From: Tobias Gläßer Date: Mon, 2 Feb 2004 13:35:53 +0000 (+0000) Subject: fixed compilation. fixed a bug in the level-save function. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=135e6a0f9beeb3a5fca5fdddaa52b4d0cc21bdcb;p=supertux.git fixed compilation. fixed a bug in the level-save function. SVN-Revision: 109 --- diff --git a/src/leveleditor.c b/src/leveleditor.c index 9981c8d17..c182c1d7d 100644 --- a/src/leveleditor.c +++ b/src/leveleditor.c @@ -135,7 +135,7 @@ int leveleditor() char str[LEVEL_NAME_MAX]; int done; int x, y, i; /* for cicles */ - int pos_x, cursor_x, cursor_y, fire; + int pos_x, cursor_x, cursor_y, cursor_tile, fire; SDL_Event event; SDLKey key; SDLMod keymod; @@ -458,7 +458,7 @@ int leveleditor() drawshape(x * 32, y * 32, current_level.tiles[y][x + (pos_x / 32)]); /* draw whats inside stuff when cursor is selecting those */ -int cursor_tile = current_level.tiles[cursor_y/32][cursor_x/32]; +cursor_tile = current_level.tiles[cursor_y/32][cursor_x/32]; switch(cursor_tile) { case 'B': @@ -586,6 +586,8 @@ void savelevel(void) sprintf(str, "%d\n", current_level.time_left); /* time */ fputs(str, fi); fputs(current_level.song_title, fi); /* song filename */ + fputs("\n",fi); + fputs(current_level.bkgd_image, fi); /* background image */ sprintf(str, "\n%d\n", current_level.bkgd_red); /* red background color */ fputs(str, fi); sprintf(str, "%d\n", current_level.bkgd_green); /* green background color */ @@ -611,7 +613,7 @@ void savelevel(void) void showhelp() { SDL_Event event; - int done; + int i, done; char *text[] = { "X/x - Brick0", "Y/y - Brick1", @@ -639,8 +641,7 @@ void showhelp() text_drawf(&red_text, "- Help -", 0, 30, A_HMIDDLE, A_TOP, 2, NO_UPDATE); text_draw(&gold_text, "Keys:", 80, 60, 1, NO_UPDATE); - - int i; + for(i = 0; i < sizeof(text)/sizeof(char *); i++) text_draw(&blue_text, text[i], 40, 90+(i*16), 1, NO_UPDATE);