From 1003fe3579e49b5b4e9f5f849f9967c005db3df8 Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Wed, 3 Mar 2021 12:05:52 +0300 Subject: God Mode for easy level design. --- src/game.c | 4 ++-- src/map.c | 2 +- src/player.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/game.c b/src/game.c index ffde400..664fa0b 100644 --- a/src/game.c +++ b/src/game.c @@ -1196,11 +1196,11 @@ void changeroom(int out) SDL_SetTextureColorMod(tttxr, 255, 0, 0); SDL_RenderCopy(ttrdr, tttxr, &src, &d); } - if (ttplayer.room == ttmap + 'G') { + if (ttplayer.variant) { SDL_Rect src = { 16 * 14, 16 * 11, 32, 32 }; SDL_Rect d = { ttplayer.x - 32, ttplayer.y - 21, 128, 128 }; - SDL_SetTextureColorMod(tttxr, 255, 255, 255); + SDL_SetTextureColorMod(tttxr, 255, 0, 0); SDL_RenderCopy(ttrdr, tttxr, &src, &d); } SDL_SetTextureColorMod(tttxr, 255, 255, 255); diff --git a/src/map.c b/src/map.c index 2b35c51..a08749a 100644 --- a/src/map.c +++ b/src/map.c @@ -284,7 +284,7 @@ static void loadroom(tt_room *r, FILE *f) b->txrcol = id; b->anim = 4; b->rate = 100 + (rand() % 50 - 25); - b->collision_act = colact_gulag; + b->collision_act = /*colact_gulag*/ 0; b->isdoor = 0; } } diff --git a/src/player.c b/src/player.c index 02703ec..abfff35 100644 --- a/src/player.c +++ b/src/player.c @@ -161,13 +161,13 @@ void tt_player_draw() SDL_SetTextureColorMod(tttxr, 255, 0, 0); SDL_RenderCopy(ttrdr, tttxr, &src, &d); } - if (curmus == lenin || ttplayer.room == ttmap + 'G') { + if (ttplayer.variant) { SDL_Rect src = { 16 * 14, 16 * 11, 32, 32 }; SDL_Rect d = { ttplayer.x - 32, ttplayer.y - 32, 128, 128 }; - SDL_SetTextureColorMod(tttxr, 255, 255, 255); + SDL_SetTextureColorMod(tttxr, 255, 0, 0); SDL_RenderCopy(ttrdr, tttxr, &src, &d); - if (curmus == lenin) SDL_SetTextureAlphaMod(tttxr, 16); } + if (curmus == lenin) SDL_SetTextureAlphaMod(tttxr, 16); int j; for (i = 0; i != TT_ROOM_H; ++i) { for (j = 0; j != TT_ROOM_W; ++j) { -- cgit v1.2.3