Advertisement

Help with my map editor

Started by April 28, 2001 06:59 PM
3 comments, last by tryforfulluse 23 years, 9 months ago
Hi im starting to make a map editor for an isometric type 2d game i would like to make. Ive made it windowed so far, and I have a window inside a window for the textures (So far). I have read tons of information on programming under Windows, but never how to make it so if I click outside of the textures window (Second Window) to keep it still on the screen. It minimizes itself to the toolbar. And another thing if anyone knows how to do this, is how can i get it so it will only minimize to the bottom of the Main Window.(not the toolbar) Any help would be greatly appreciated, thanks, (and by the way I am not a stupid newbie making an rpg (ive finished 2 good games now). Thanks again
bad!
use MDI
Advertisement
Thanks, but I drew up a cool looking editor for making games last night, that would run under fullscreen mode. The only thing I dont know how to do and my over 10 library of programming books using c and c++ dont explain are saving/loading files, and creating my own files. Please, can you guys tell me if there are books or articles on doing this. Thanks
bad!
quote:
Original post by tryforfulluse

The only thing I dont know how to do and my over 10 library of programming books using c and c++ dont explain are saving/loading files, and creating my own files. Please, can you guys tell me if there are books or articles on doing this. Thanks


Umm...lemme think I learned file i/o just from the Borland c++ help file (yes, I used Borland up until a few months ago). As for creating your own file type: you probably don''t want to save it as an ascii file, but what you may do is either use random access (as a friend of mine suggested, in VB) or save it as a binary and create the file header yourself (ie, what you put out to the file to mark map size, tileset, etc.) as a standard. Like I''ve said before, sometimes I''m more of a "code theorist" than an actual coder, but if you still have trouble finding how to do file I/O, post back here or email me at draqza@rocketmail.com and I''ll try to find some references for you.
--


WNDCLASSEX Reality;
...
...
Reality.lpfnWndProc=ComputerGames;
...
...
RegisterClassEx(&Reality);


Unable to register Reality...what''s wrong?
---------
Dan Upton
Lead Designer
WolfHeart Software
WNDCLASSEX Reality;......Reality.lpfnWndProc=ComputerGames;......RegisterClassEx(&Reality);Unable to register Reality...what's wrong?---------Dan Uptonhttp://0to1.orghttp://www20.brinkster.com/draqza
The simplest (i think) File I/O in C/C++ is just the fopen, fread, fwrite, and fclose commands. They take pointers to "data" and write it out, and then you can read it straight back in by supplying a pointer to this "data"

As you can see, it is easy just to save your entire class like this:

fwrite(&my_class, sizeof(my_class), 1, file);

but be warned, because I''ve had some bad experience with overwriting the VTable when I read it back in from the file, so if you have any inherited _functions_ the program crashes when you try to call them.

As for your own file type, they are damned easy to create! Just follow draqza''s instructions!

This topic is closed to new replies.

Advertisement