Mail Archives: djgpp/1999/01/22/21:10:32
ANDERS PEDERSEN (anders_p AT get2net DOT dk) wrote:
: Hi!
: I'm making a crpg using Djgpp and Allegro. I want to create a map-file
: that store the map information, but I don't know how.
: Right now i'm using something like:
: int map[100][100]{0,0,0,0,0,.....,}
^
Isn't a "=" missing here?
If you just want everything set to zero "= {0};" should the job.
: Does anybody know how to create a map-file that i can read from, and write
: to. I don't wan't a file you can edit in a text editor.
Fill in your structure with a C program, then dump it to a file with
fwrite(). Later (in your real program) read it in with fread().
And any file can be editted with a decent text editor (emacs).
Right,
MartinS
- Raw text -