Time to give a hint. If you can't find what you're looking for in the Dark GDK functions, start looking at the standard library functions for C/C++. DGDK gives you a pointer to the memblock and the size of the memblock in bytes.
Some example code from a class that I've created for a game that I'm stalled out on:
void Grid::Save()
{
char fname [128];
strcpy (fname, fileName);
strcat (fname, ".lvl");
// TODO: add some exception handling
levelFile.open(fname, std::ios::out | std::ios::binary);
levelFile.write((const char *)isections, sizeof (isections));
levelFile.close();
}
And the code to load it back in
void Grid::Load(char *infile)
{
levelIn.open(infile, std::ios::binary);
levelIn.read((char *) isections, sizeof(isections));
DrawAllStreets();
// Connect();
}
Lilith, Night Butterfly
I'm not a programmer but I play one in the office