Writing a Program for loading Maps
Moderator: Moderators
Writing a Program for loading Maps
Hi
I wanted to know how to write a Program (in c++ or delphi) for loading a Map.
I'm using Opengl and got information about the File Formats of GND RSW and GAT.
But i realy don't know how preceed.
Is somebody willing to help me?
I wanted to know how to write a Program (in c++ or delphi) for loading a Map.
I'm using Opengl and got information about the File Formats of GND RSW and GAT.
But i realy don't know how preceed.
Is somebody willing to help me?
Re: Writing a Program for loading Maps
Are you asking for help? or asking for someone to do your work for you?
Where is your own work anyway? Exactly what kind of help do you need? Have you first helped yourself before asking help from others? It would be nice if you can show us where you're going wrong so we can focus our help in straightening you out.
Where is your own work anyway? Exactly what kind of help do you need? Have you first helped yourself before asking help from others? It would be nice if you can show us where you're going wrong so we can focus our help in straightening you out.
Got your topic trashed by a mod?
Trashing topics is one click, and moving a topic to its proper forum is a lot harder. You expend the least effort in deciding where to post, mods expend the least effort by trashing.
Have a nice day.
Trashing topics is one click, and moving a topic to its proper forum is a lot harder. You expend the least effort in deciding where to post, mods expend the least effort by trashing.
Have a nice day.
Re: Writing a Program for loading Maps
He's asking us to write it for him and let him take credit.
cs : ee : realist
Re: Writing a Program for loading Maps
eAthena forums have documentation on some of the formats.
GAT format can be found on the main openkore site in the developer section.
memcpy(fileHandle, yourStruct, sizeof(structType)) to load a structure from a file
GAT format can be found on the main openkore site in the developer section.
memcpy(fileHandle, yourStruct, sizeof(structType)) to load a structure from a file
Oh no.
Re: Writing a Program for loading Maps
no i don't want somebody to write me the code
i want someone to explain me if possible step by step how a map should be loaded
@sli
no need to be aggressive
i can't remember saying the words "Please write me a Map Loader"
i want someone to explain me if possible step by step how a map should be loaded
@sli
no need to be aggressive
i can't remember saying the words "Please write me a Map Loader"
Re: Writing a Program for loading Maps
I've seen a million people ask for help with a million lines of code and everyone who has had a question like yours has expected a giant code sample doing exactly what they want it to do. If you wanna know how to proceed, then first maybe you should learn C/C++ or Delphi, OpenGL or DirectX (or any 2D-capable rendering engine), and maybe MFC, GTK, wxWidgets, or something along those lines.
cs : ee : realist
Re: Writing a Program for loading Maps
Check http://forums.openkore.com/viewtopic.php?f=37&t=1808 that thread... but don't reuse that code because it is really bad and probably won't even compile due to me copy/pasting parts of it.
It also doesn't do what you want, but if you research the format and attempt to learn C++ it at least gives you an idea of what type of things you need to learn for the map loading part alone.
It also doesn't do what you want, but if you research the format and attempt to learn C++ it at least gives you an idea of what type of things you need to learn for the map loading part alone.
Oh no.
Re: Writing a Program for loading Maps
I got another Porblem
I can't read the Number of Textures
Everytime i try and change the numbers of bytes read out it won't change
although they say that i has to be at the offset 22 and a size of 4 integer bytes
i only get huge results like 3.000 millions in that way
sometimes i get -800 million
i tried to get this information of the payon.gnd
i used me++ to compare my results with the editor ones
and the editor says it has to be 26 not 3000 million Oo
I can't read the Number of Textures
Everytime i try and change the numbers of bytes read out it won't change
although they say that i has to be at the offset 22 and a size of 4 integer bytes
i only get huge results like 3.000 millions in that way
sometimes i get -800 million
Code: Select all
// Count
GND.seekg(18);
buffer=new char[4];
GND.read(buffer,4);
curpos += 4;
cout<<"Count : "<<*((int*)buffer)<<endl;
delete buffer;
curpos=26;
//Textures
for (int i=0;i<count;i++){
GND.seekg(curpos);
buffer=new char[40];
GND.read(buffer,40);
curpos += 80;
cout<<"Bitmap : "<<buffer<<endl;
delete buffer;
}
i used me++ to compare my results with the editor ones
and the editor says it has to be 26 not 3000 million Oo
Re: Writing a Program for loading Maps
If it's at 22 why load from 18?
0x18 would be 24 in hex, just put 22 and load from that.
0x18 would be 24 in hex, just put 22 and load from that.
Oh no.
Re: Writing a Program for loading Maps
In the GND File of Payon for Example:
how do I know on which Cell has to be which Texture?
I don't realy know at what offset I can find the Texture position and Cell Position.
From here I can't realy understand what Offset they are kept.
What do they mean by
how do I know on which Cell has to be which Texture?
I don't realy know at what offset I can find the Texture position and Cell Position.
From here I can't realy understand what Offset they are kept.
What do they mean by
And what is the Difference here between Tile and Cell?Lightmaps (Header + Texture + Unknown + Tiles Offset )
Tiles (Header + Texture + Unknown Offset )
Cubes (Header + Texture + Unknown + Tiles + Lightmaps Offset )