From ff449a2c3a74ca2d12cf77435522436e9de0db78 Mon Sep 17 00:00:00 2001 From: Misa Date: Thu, 2 Apr 2020 14:52:14 -0700 Subject: [PATCH] Remove game.test and game.teststring It looks like this may have been used earlier in development, judging from the name, obviously, but right now it seems like it's used as an error message if a main game level is asked for an invalid room (well, only two of them - the Lab and Warp Zone). It should probably be formalized into an error system, if we want to keep teststring, and also people would never see it anyway because I don't think there's a reliable and consistent way to trigger loading a non-existent room. I have seen someone manage to load a non-existent Warp Zone room only one time, but even then this teststring didn't pop up. So this teststring doesn't even trigger in the right circumstances. Also, when it does pop up, as far as I can tell it will stay onscreen, which is kinda annoying. So I'm just removing this ancient relic from the code. --- desktop_version/src/Game.cpp | 2 -- desktop_version/src/Game.h | 3 +-- desktop_version/src/Labclass.cpp | 3 --- desktop_version/src/WarpClass.cpp | 3 --- desktop_version/src/editor.cpp | 5 ----- desktop_version/src/preloader.cpp | 5 ----- desktop_version/src/titlerender.cpp | 35 ----------------------------- 7 files changed, 1 insertion(+), 55 deletions(-) diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index 34f39e31..fca4589d 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -384,8 +384,6 @@ void Game::init(void) stat_trinkets = 0; - test = false; - teststring = "TEST = True"; state = 1; statedelay = 0; //updatestate(); diff --git a/desktop_version/src/Game.h b/desktop_version/src/Game.h index 36555eaf..852dba09 100644 --- a/desktop_version/src/Game.h +++ b/desktop_version/src/Game.h @@ -243,8 +243,7 @@ public: int mx, my; int screenshake, flashlight; - bool test; - std::string teststring, tempstring; + std::string tempstring; bool advancetext, pausescript; int deathseq, lifeseq; diff --git a/desktop_version/src/Labclass.cpp b/desktop_version/src/Labclass.cpp index f02ad5b0..c439e44f 100644 --- a/desktop_version/src/Labclass.cpp +++ b/desktop_version/src/Labclass.cpp @@ -1855,9 +1855,6 @@ std::vector labclass::loadlevel(int rx, int ry) tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); roomname = "Outer Space"; - - game.test = true; - game.teststring = "ERROR: Map not found in Lab Area"; break; #else default: diff --git a/desktop_version/src/WarpClass.cpp b/desktop_version/src/WarpClass.cpp index c377b135..3b687e8b 100644 --- a/desktop_version/src/WarpClass.cpp +++ b/desktop_version/src/WarpClass.cpp @@ -1022,9 +1022,6 @@ std::vector warpclass::loadlevel(int rx, int ry) tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); //roomname = "Outer Space"; - - game.test = true; - game.teststring = "ERROR: Map not found in Warp Area"; break; #else default: diff --git a/desktop_version/src/editor.cpp b/desktop_version/src/editor.cpp index 008ad269..8693d72a 100644 --- a/desktop_version/src/editor.cpp +++ b/desktop_version/src/editor.cpp @@ -3486,11 +3486,6 @@ void editorrender() graphics.Print(0,121, ed.note,196-((45-ed.notedelay)*4), 196-((45-ed.notedelay)*4), 196-((45-ed.notedelay)*4), true); } - if (game.test) - { - graphics.bprint(5, 5, game.teststring, 196, 196, 255 - help.glow, false); - } - graphics.drawfade(); if (game.flashlight > 0 && !game.noflashingmode) diff --git a/desktop_version/src/preloader.cpp b/desktop_version/src/preloader.cpp index af8ddd3c..763c6c62 100644 --- a/desktop_version/src/preloader.cpp +++ b/desktop_version/src/preloader.cpp @@ -100,11 +100,6 @@ void preloaderrender() graphics.Print(282-(15*8), 204, "LOADING... 100%", 124, 112, 218, false); } - if (game.test) - { - graphics.Print(5, 5, game.teststring, 196, 196, 255 - help.glow, false); - } - graphics.drawfade(); if (game.flashlight > 0 && !game.noflashingmode) diff --git a/desktop_version/src/titlerender.cpp b/desktop_version/src/titlerender.cpp index bd11e877..a1b8a336 100644 --- a/desktop_version/src/titlerender.cpp +++ b/desktop_version/src/titlerender.cpp @@ -1207,11 +1207,6 @@ void titlerender() //graphics.Print(5, 228, "Left/Right to Choose, V to Select", tr, tg, tb, true); } - if (game.test) - { - graphics.Print(5, 5, game.teststring, 196, 196, 255, false); - } - graphics.drawfade(); if (game.flashlight > 0 && !game.noflashingmode) @@ -1385,11 +1380,6 @@ void gamecompleterender() creditOffset += 140; if (graphics.onscreen(creditOffset + game.creditposition)) graphics.bigprint( -1, creditOffset + game.creditposition, "Thanks for playing!", tr, tg, tb, true, 2); - if (game.test) - { - graphics.Print(5, 5, game.teststring, 196, 196, 255, false); - } - graphics.drawfade(); if (game.flashlight > 0 && !game.noflashingmode) @@ -1436,11 +1426,6 @@ void gamecompleterender2() } } - if (game.test) - { - graphics.Print(5, 5, game.teststring, 196, 196, 255, false); - } - graphics.drawfade(); if (game.flashlight > 0 && !game.noflashingmode) @@ -1845,11 +1830,6 @@ void gamerender() */ - if (game.test) - { - graphics.Print(5, 5, game.teststring, 196, 196, 255, false); - } - if (game.flashlight > 0 && !game.noflashingmode) { game.flashlight--; @@ -2673,11 +2653,6 @@ void maprender() graphics.drawfade(); - if (game.test) - { - graphics.Print(5, 5, game.teststring, 196, 196, 255, false); - } - if (game.flashlight > 0 && !game.noflashingmode) { game.flashlight--; @@ -2882,11 +2857,6 @@ void towerrender() graphics.drawfade(); - if (game.test) - { - graphics.Print(5, 5, game.teststring, 196, 196, 255, false); - } - if (game.flashlight > 0 && !game.noflashingmode) { game.flashlight--; @@ -3032,11 +3002,6 @@ void teleporterrender() } - if (game.test) - { - graphics.Print(5, 5, game.teststring, 196, 196, 255, false); - } - if (game.flashlight > 0 && !game.noflashingmode) { game.flashlight--;