#include <bits/stdc++.h>
using namespace std;
int main(int argc, char** argv)
{
if (argc < 2) { std::cout << "usage: " << argv[0] << " SECTORS.lmp\n"; return 1; }
ifstream file(argv[1]);
for (int i = 0; file.peek() != EOF; ++i)
{
struct Sector {
int16_t floor, ceil;
char floortex[8], ceiltex[8];
int16_t light, special, tag;
} sector;
file.read((char*)§or, sizeof(Sector));
cout << "id: " << i << "\t"
<< "floor: " << sector.floor << "\t"
<< "ceil: " << sector.ceil << "\t"
<< "floortex: " << sector.floortex << "\t"
<< "ceiltex: " << sector.ceiltex << "\t"
<< "light: " << sector.light << "\t"
<< "special: " << sector.special << "\t"
<< "tag: " << sector.tag << "\n\n";
}
return 0;
}