gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > Please Help me to understande this windows game .map

#2054 - Link - Tue Jan 28, 2003 12:56 pm

Ok i have this code:

std::ifstream mapFile(fileName, std::ios::binary);
mapFile.read((char*)&m_byMapType, 1);
mapFile.read(m_Sectors, sizeof m_Sectors);
mapFile.close();

in the address of m_byMapType was inserted the first Byte of the file (the id), but in the m_Sectors (array) was inserted the rest of the file. But i don't understand if is inserted the byte or the contents of the file. However i would know the array that is in the following .map file:

DOWNLOAD HERE
Can you help me to extract the array by this file and what in this string became doing: mapFile.read(m_Sectors, sizeof m_Sectors);

#2059 - Link - Tue Jan 28, 2003 3:55 pm

Please someone!!! :(

#2061 - XeroxBoy - Tue Jan 28, 2003 4:23 pm

Perhaps it would help if you told us which Windows game the map file came from?

#2063 - Splam - Tue Jan 28, 2003 4:29 pm

How big is m_Sectors, what size is each entry etc etc you can't expect people to know the format of an unknown map file by showing some code like that. Then even if we knew how big the array was how does that convert to the map graphics? is it 1 entry = 1 tile? How big (x and y) is the map suppsoed to be?

I've downloaded the file and looked at it and it does indeed look like a map (but it could be something else) and from the code you posted it looks like it does indeed load the 1st byte into m_byMapType and the rest of the file to m_Sectors. Do you have the graphics which go with the map?

And PLEASE stop posting UP or Please help!! and starting other threads that just point to this one saying HELP SOMEONE!! I'm not a moderator so It's not my place to complain but you're less likely to get help from people if every time they come to the forum there are lots of posts from you basically asking for the same thing.

#2069 - Link - Tue Jan 28, 2003 6:04 pm

THX Friend i made!

#2084 - Maddox - Wed Jan 29, 2003 5:04 am

To Splam: That's right -- keep rockin' that boat. We need more coolness on this forum and less crybabies asking for solutions to problems that high school Hypercard students could answer.

THAT'S RIGHT: CRYBABIES!
_________________
You probably suck. I hope you're is not a game programmer.

#2097 - Link - Wed Jan 29, 2003 10:43 am

Maddox wrote:
To Splam: That's right -- keep rockin' that boat. We need more coolness on this forum and less crybabies asking for solutions to problems that high school Hypercard students could answer.

THAT'S RIGHT: CRYBABIES!


I don't understand. Have you a CRYBABY?