mirror of
https://github.com/stevenhowes/CTheEscape.git
synced 2026-05-27 00:03:27 +01:00
Allow saving from map editor. More tiles (all a bit WIP) and some more map.
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -89,6 +89,19 @@ void game2_loadmap(char* filename)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void game2_savemap(char* filename)
|
||||||
|
{
|
||||||
|
// Attempt to get file info
|
||||||
|
inreg.r[0] = 10;
|
||||||
|
inreg.r[1] = (int) filename;
|
||||||
|
inreg.r[2] = 0xffd;
|
||||||
|
inreg.r[4] = (int) fullmap;
|
||||||
|
inreg.r[5] = (int) fullmap + sizeof(fullmap);
|
||||||
|
|
||||||
|
_kernel_swi(OS_File,&inreg,&outreg);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void game2_fillmap(int xoffset, int yoffset)
|
void game2_fillmap(int xoffset, int yoffset)
|
||||||
{
|
{
|
||||||
memcpy(map[0][0],fullmap+yoffset+(xoffset*100),10);
|
memcpy(map[0][0],fullmap+yoffset+(xoffset*100),10);
|
||||||
@@ -235,6 +248,11 @@ void game2_tick_input()
|
|||||||
readmodkey = tick + 10;
|
readmodkey = tick + 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// C
|
||||||
|
if(input_readkey(81))
|
||||||
|
{
|
||||||
|
game2_savemap("mission2");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int game2_tick()
|
int game2_tick()
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user