From a1da4ddcdc97e10c444b403f68ed5c261c632130 Mon Sep 17 00:00:00 2001 From: Petr Sykora Date: Wed, 6 May 2009 00:58:49 +0200 Subject: [PATCH] little step in map saving & TODO update --- TODO.txt | 25 +++++++++++++++++-------- map.c | 14 ++++++++++++++ 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/TODO.txt b/TODO.txt index 0ace44d..c172773 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,12 +1,21 @@ -HUD -Bounding boxes for Areas if needed -Loading mechanism for levels -Loading mechanism for lilaneks -Range of particles -Explosions +Save/Loading mechanism for levels -- in progress (map.[hc]) +Save/Loading mechanism for lilaneks +text rendering +Menu +Better HUD +Settings + +Network protocol +Basic P2P networking +Game lobby -weapon switching -mine area +mine chain reaction/mines blowable by some projectiles +Range of particles +Better Explosions +Bounding boxes for Areas if needed Polish code +Balance + +Map Editor -- ?module for inkscape? diff --git a/map.c b/map.c index e1bbf81..ee171f7 100644 --- a/map.c +++ b/map.c @@ -60,10 +60,24 @@ uint32 AddStringToFile(TMapFileHelper *h, char *s) { return h->buffer_lenght - strl*sizeof(char) + 1; } + //TODO: +void FillTMapFileHeader(TMapFileHeader *header, TMap *m) { +} +char *TMapFileHeader2String (TMapFileHeader *header) { +} + char *Map2String(TMap *m, size_t *bytes) { TMapFileHelper h; + char *buffer; + memset(&h, 0, sizeof(TMapFileHelper)); + + FillTMapFileHeader(&h.header, m); //warning, Layer_seek&Sprite_seek are only allocated, not filled + buffer = TMapFileHeader2String (&h.header); + AddStringToFile(&h, buffer); + free (buffer); + //TODO: *bytes = h.buffer_lenght; -- 2.11.4.GIT