From d480c1011c44f9cc8c587f0b5d0367dba454b9ae Mon Sep 17 00:00:00 2001 From: Misa Date: Sat, 4 Jul 2020 15:59:21 -0700 Subject: [PATCH] Make scriptclass::load(other) rely less on std::string Instead of comparing against an std::string (which is heavily templated), just use good ol' SDL_strcmp(). --- desktop_version/src/Script.h | 8 +- desktop_version/src/Scripts.cpp | 328 ++++++++++++------------ desktop_version/src/TerminalScripts.cpp | 83 +++--- 3 files changed, 210 insertions(+), 209 deletions(-) diff --git a/desktop_version/src/Script.h b/desktop_version/src/Script.h index ae7b727d..351bfec8 100644 --- a/desktop_version/src/Script.h +++ b/desktop_version/src/Script.h @@ -22,9 +22,9 @@ public: scriptclass(); - void load(std::string t); - void loadother(std::string t); - + void load(std::string name); + void loadother(const char* t); + void loadcustom(std::string t); void inline add(std::string t) { @@ -45,8 +45,6 @@ public: void hardreset(); - void loadcustom(std::string t); - //Script contents std::vector commands; std::string words[40]; diff --git a/desktop_version/src/Scripts.cpp b/desktop_version/src/Scripts.cpp index 40b60c65..60aee83b 100644 --- a/desktop_version/src/Scripts.cpp +++ b/desktop_version/src/Scripts.cpp @@ -1,21 +1,23 @@ #include "Script.h" +#include -void scriptclass::load(std::string t) +void scriptclass::load(std::string name) { //loads script name t into the array position = 0; commands.clear(); running = true; - std::string customstring=""; - if(t.length()){ - customstring=t.substr(0, 7); - } + const char* t = name.c_str(); - if (customstring == "custom_"){ - loadcustom(t); + char customstring[8] = {'\0'}; + SDL_strlcpy(customstring, t, sizeof(customstring)); + + if (strcmp(customstring, "custom_") == 0) + { + loadcustom(name); } - else if (t == "intro") + else if (SDL_strcmp(t, "intro") == 0) { static const char* lines[] = { "ifskip(quickstart)", @@ -241,7 +243,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "quickstart") + else if (SDL_strcmp(t, "quickstart") == 0) { //Finally, appear at the start of the game: static const char* lines[] = { @@ -260,7 +262,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "firststeps") + else if (SDL_strcmp(t, "firststeps") == 0) { static const char* lines[] = { "cutscene()", @@ -287,7 +289,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "trenchwarfare") + else if (SDL_strcmp(t, "trenchwarfare") == 0) { static const char* lines[] = { "cutscene()", @@ -316,7 +318,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "newtrenchwarfare") + else if (SDL_strcmp(t, "newtrenchwarfare") == 0) { static const char* lines[] = { "squeak(player)", @@ -341,7 +343,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "trinketcollector") + else if (SDL_strcmp(t, "trinketcollector") == 0) { static const char* lines[] = { "cutscene()", @@ -374,7 +376,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "newtrinketcollector") + else if (SDL_strcmp(t, "newtrinketcollector") == 0) { static const char* lines[] = { "squeak(player)", @@ -402,7 +404,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "new2trinketcollector") + else if (SDL_strcmp(t, "new2trinketcollector") == 0) { static const char* lines[] = { "squeak(cry)", @@ -421,7 +423,7 @@ void scriptclass::load(std::string t) filllines(lines); return; } - if (t == "communicationstation") + if (SDL_strcmp(t, "communicationstation") == 0) { static const char* lines[] = { "ifskip(communicationstationskip)", @@ -574,7 +576,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "communicationstationskip") + else if (SDL_strcmp(t, "communicationstationskip") == 0) { static const char* lines[] = { "changemood(player,0)", @@ -606,7 +608,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "teleporterback") + else if (SDL_strcmp(t, "teleporterback") == 0) { static const char* lines[] = { "cutscene()", @@ -634,7 +636,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "levelonecomplete") + else if (SDL_strcmp(t, "levelonecomplete") == 0) { static const char* lines[] = { "nocontrol()", @@ -651,7 +653,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "levelonecomplete_ending") + else if (SDL_strcmp(t, "levelonecomplete_ending") == 0) { static const char* lines[] = { "squeak(purple)", @@ -669,7 +671,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "levelonecompleteskip") + else if (SDL_strcmp(t, "levelonecompleteskip") == 0) { static const char* lines[] = { "nocontrol()", @@ -677,7 +679,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "bigopenworld") + else if (SDL_strcmp(t, "bigopenworld") == 0) { static const char* lines[] = { "play(5)", @@ -986,7 +988,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "bigopenworldskip") + else if (SDL_strcmp(t, "bigopenworldskip") == 0) { static const char* lines[] = { "gotoroom(4,10)", @@ -1042,7 +1044,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "rescueblue") + else if (SDL_strcmp(t, "rescueblue") == 0) { static const char* lines[] = { "ifskip(skipblue)", @@ -1123,7 +1125,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "skipblue") + else if (SDL_strcmp(t, "skipblue") == 0) { static const char* lines[] = { "changeai(blue,followplayer)", @@ -1135,7 +1137,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "rescueyellow") + else if (SDL_strcmp(t, "rescueyellow") == 0) { static const char* lines[] = { "ifskip(skipyellow)", @@ -1237,7 +1239,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "skipyellow") + else if (SDL_strcmp(t, "skipyellow") == 0) { static const char* lines[] = { "changeai(yellow,followplayer)", @@ -1248,7 +1250,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "rescuegreen") + else if (SDL_strcmp(t, "rescuegreen") == 0) { static const char* lines[] = { "ifskip(skipgreen)", @@ -1317,7 +1319,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "skipgreen") + else if (SDL_strcmp(t, "skipgreen") == 0) { static const char* lines[] = { "changeai(green,followplayer)", @@ -1328,7 +1330,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "rescuered") + else if (SDL_strcmp(t, "rescuered") == 0) { static const char* lines[] = { "ifskip(skipred)", @@ -1397,7 +1399,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "skipred") + else if (SDL_strcmp(t, "skipred") == 0) { static const char* lines[] = { "changeai(red,followplayer)", @@ -1408,7 +1410,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "startexpolevel_station1") + else if (SDL_strcmp(t, "startexpolevel_station1") == 0) { static const char* lines[] = { //For the Eurogamer EXPO! Scrap later. @@ -1432,7 +1434,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "startexpolevel_lab") + else if (SDL_strcmp(t, "startexpolevel_lab") == 0) { static const char* lines[] = { //For the Eurogamer EXPO! Scrap later. @@ -1454,7 +1456,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "startexpolevel_warp") + else if (SDL_strcmp(t, "startexpolevel_warp") == 0) { static const char* lines[] = { //For the Eurogamer EXPO! Scrap later. @@ -1476,7 +1478,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "startexpolevel_tower") + else if (SDL_strcmp(t, "startexpolevel_tower") == 0) { static const char* lines[] = { //For the Eurogamer EXPO! Scrap later. @@ -1498,7 +1500,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "skipint1") + else if (SDL_strcmp(t, "skipint1") == 0) { static const char* lines[] = { "finalmode(41,56)", @@ -1518,7 +1520,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "intermission_1") + else if (SDL_strcmp(t, "intermission_1") == 0) { static const char* lines[] = { "ifskip(skipint1)", @@ -1559,7 +1561,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1blue_1") + else if (SDL_strcmp(t, "int1blue_1") == 0) { static const char* lines[] = { "delay(45)", @@ -1613,7 +1615,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1blue_2") + else if (SDL_strcmp(t, "int1blue_2") == 0) { static const char* lines[] = { "cutscene()", @@ -1645,7 +1647,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1blue_3") + else if (SDL_strcmp(t, "int1blue_3") == 0) { static const char* lines[] = { "cutscene()", @@ -1707,7 +1709,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1blue_4") + else if (SDL_strcmp(t, "int1blue_4") == 0) { static const char* lines[] = { "cutscene()", @@ -1748,7 +1750,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1blue_5") + else if (SDL_strcmp(t, "int1blue_5") == 0) { static const char* lines[] = { "cutscene()", @@ -1785,7 +1787,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1blue_6") + else if (SDL_strcmp(t, "int1blue_6") == 0) { static const char* lines[] = { "cutscene()", @@ -1835,7 +1837,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1blue_7") + else if (SDL_strcmp(t, "int1blue_7") == 0) { static const char* lines[] = { "cutscene()", @@ -1882,7 +1884,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1green_1") + else if (SDL_strcmp(t, "int1green_1") == 0) { static const char* lines[] = { "delay(45)", @@ -1947,7 +1949,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1green_2") + else if (SDL_strcmp(t, "int1green_2") == 0) { static const char* lines[] = { "cutscene()", @@ -1974,7 +1976,7 @@ void scriptclass::load(std::string t) filllines(lines); } - else if (t == "int1green_3") + else if (SDL_strcmp(t, "int1green_3") == 0) { static const char* lines[] = { "cutscene()", @@ -2038,7 +2040,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1green_4") + else if (SDL_strcmp(t, "int1green_4") == 0) { static const char* lines[] = { "cutscene()", @@ -2079,7 +2081,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1green_5") + else if (SDL_strcmp(t, "int1green_5") == 0) { static const char* lines[] = { "cutscene()", @@ -2150,7 +2152,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1green_6") + else if (SDL_strcmp(t, "int1green_6") == 0) { static const char* lines[] = { "cutscene()", @@ -2195,7 +2197,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1green_7") + else if (SDL_strcmp(t, "int1green_7") == 0) { static const char* lines[] = { "cutscene()", @@ -2229,7 +2231,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1red_1") + else if (SDL_strcmp(t, "int1red_1") == 0) { static const char* lines[] = { "cutscene()", @@ -2280,7 +2282,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1red_2") + else if (SDL_strcmp(t, "int1red_2") == 0) { static const char* lines[] = { "cutscene()", @@ -2307,7 +2309,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1red_3") + else if (SDL_strcmp(t, "int1red_3") == 0) { static const char* lines[] = { "cutscene()", @@ -2357,7 +2359,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1red_4") + else if (SDL_strcmp(t, "int1red_4") == 0) { static const char* lines[] = { "cutscene()", @@ -2393,7 +2395,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1red_5") + else if (SDL_strcmp(t, "int1red_5") == 0) { static const char* lines[] = { "cutscene()", @@ -2425,7 +2427,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1red_6") + else if (SDL_strcmp(t, "int1red_6") == 0) { static const char* lines[] = { "cutscene()", @@ -2461,7 +2463,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1red_7") + else if (SDL_strcmp(t, "int1red_7") == 0) { static const char* lines[] = { "cutscene()", @@ -2489,7 +2491,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1yellow_1") + else if (SDL_strcmp(t, "int1yellow_1") == 0) { static const char* lines[] = { "cutscene()", @@ -2548,7 +2550,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1yellow_2") + else if (SDL_strcmp(t, "int1yellow_2") == 0) { static const char* lines[] = { "cutscene()", @@ -2575,7 +2577,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1yellow_3") + else if (SDL_strcmp(t, "int1yellow_3") == 0) { static const char* lines[] = { "cutscene()", @@ -2628,7 +2630,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1yellow_4") + else if (SDL_strcmp(t, "int1yellow_4") == 0) { static const char* lines[] = { "cutscene()", @@ -2696,7 +2698,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1yellow_5") + else if (SDL_strcmp(t, "int1yellow_5") == 0) { static const char* lines[] = { "cutscene()", @@ -2760,7 +2762,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1yellow_6") + else if (SDL_strcmp(t, "int1yellow_6") == 0) { static const char* lines[] = { "cutscene()", @@ -2790,7 +2792,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int1yellow_7") + else if (SDL_strcmp(t, "int1yellow_7") == 0) { static const char* lines[] = { "cutscene()", @@ -2816,7 +2818,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "skipint2") + else if (SDL_strcmp(t, "skipint2") == 0) { static const char* lines[] = { "finalmode(53,49)", @@ -2835,7 +2837,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "intermission_2") + else if (SDL_strcmp(t, "intermission_2") == 0) { static const char* lines[] = { "ifskip(skipint2)", @@ -2889,7 +2891,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int2intro_yellow") + else if (SDL_strcmp(t, "int2intro_yellow") == 0) { static const char* lines[] = { "squeak(cry)", @@ -2932,7 +2934,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int2intro_red") + else if (SDL_strcmp(t, "int2intro_red") == 0) { static const char* lines[] = { "squeak(cry)", @@ -2975,7 +2977,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int2intro_green") + else if (SDL_strcmp(t, "int2intro_green") == 0) { static const char* lines[] = { "squeak(cry)", @@ -3018,7 +3020,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int2intro_blue") + else if (SDL_strcmp(t, "int2intro_blue") == 0) { static const char* lines[] = { "squeak(cry)", @@ -3061,7 +3063,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int2_yellow") + else if (SDL_strcmp(t, "int2_yellow") == 0) { static const char* lines[] = { "ifskip(skipint2yellow)", @@ -3094,7 +3096,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "skipint2yellow") + else if (SDL_strcmp(t, "skipint2yellow") == 0) { static const char* lines[] = { "squeak(yellow)", @@ -3102,7 +3104,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int2_red") + else if (SDL_strcmp(t, "int2_red") == 0) { static const char* lines[] = { "ifskip(skipint2red)", @@ -3135,7 +3137,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "skipint2red") + else if (SDL_strcmp(t, "skipint2red") == 0) { static const char* lines[] = { "squeak(red)", @@ -3143,7 +3145,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int2_green") + else if (SDL_strcmp(t, "int2_green") == 0) { static const char* lines[] = { "ifskip(skipint2green)", @@ -3176,7 +3178,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "skipint2green") + else if (SDL_strcmp(t, "skipint2green") == 0) { static const char* lines[] = { "squeak(green)", @@ -3184,7 +3186,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "int2_blue") + else if (SDL_strcmp(t, "int2_blue") == 0) { static const char* lines[] = { "ifskip(skipint2blue)", @@ -3218,7 +3220,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "skipint2blue") + else if (SDL_strcmp(t, "skipint2blue") == 0) { static const char* lines[] = { "squeak(blue)", @@ -3226,7 +3228,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "startexpolevel_station2") + else if (SDL_strcmp(t, "startexpolevel_station2") == 0) { //For the Eurogamer EXPO! Scrap later. static const char* lines[] = { @@ -3248,7 +3250,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "finallevel_teleporter") + else if (SDL_strcmp(t, "finallevel_teleporter") == 0) { static const char* lines[] = { "delay(10)", @@ -3325,7 +3327,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "skipfinal") + else if (SDL_strcmp(t, "skipfinal") == 0) { static const char* lines[] = { "finalmode(46,54)", @@ -3343,7 +3345,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "startlevel_final") + else if (SDL_strcmp(t, "startlevel_final") == 0) { static const char* lines[] = { "ifskip(skipfinal)", @@ -3366,7 +3368,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "regularreturn") + else if (SDL_strcmp(t, "regularreturn") == 0) { static const char* lines[] = { "cutscene()", @@ -3389,7 +3391,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "returntohub") + else if (SDL_strcmp(t, "returntohub") == 0) { //For the Eurogamer EXPO! Scrap later. static const char* lines[] = { @@ -3411,7 +3413,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "resetgame") + else if (SDL_strcmp(t, "resetgame") == 0) { //For the Eurogamer EXPO! Scrap later. static const char* lines[] = { @@ -3421,42 +3423,42 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkred") + else if (SDL_strcmp(t, "talkred") == 0) { static const char* lines[] = { "redcontrol", }; filllines(lines); } - else if (t == "talkyellow") + else if (SDL_strcmp(t, "talkyellow") == 0) { static const char* lines[] = { "yellowcontrol", }; filllines(lines); } - else if (t == "talkgreen") + else if (SDL_strcmp(t, "talkgreen") == 0) { static const char* lines[] = { "greencontrol", }; filllines(lines); } - else if (t == "talkblue") + else if (SDL_strcmp(t, "talkblue") == 0) { static const char* lines[] = { "bluecontrol", }; filllines(lines); } - else if (t == "talkpurple") + else if (SDL_strcmp(t, "talkpurple") == 0) { static const char* lines[] = { "purplecontrol", }; filllines(lines); } - else if (t == "talkred_1") + else if (SDL_strcmp(t, "talkred_1") == 0) { static const char* lines[] = { "cutscene()", @@ -3485,7 +3487,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkred_2") + else if (SDL_strcmp(t, "talkred_2") == 0) { static const char* lines[] = { "cutscene()", @@ -3514,7 +3516,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkred_3") + else if (SDL_strcmp(t, "talkred_3") == 0) { static const char* lines[] = { "cutscene()", @@ -3545,7 +3547,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkred_4") + else if (SDL_strcmp(t, "talkred_4") == 0) { static const char* lines[] = { "cutscene()", @@ -3576,7 +3578,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkred_5") + else if (SDL_strcmp(t, "talkred_5") == 0) { static const char* lines[] = { "cutscene()", @@ -3612,7 +3614,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkred_6") + else if (SDL_strcmp(t, "talkred_6") == 0) { static const char* lines[] = { "cutscene()", @@ -3642,7 +3644,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkred_7") + else if (SDL_strcmp(t, "talkred_7") == 0) { static const char* lines[] = { "cutscene()", @@ -3666,7 +3668,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkred_8") + else if (SDL_strcmp(t, "talkred_8") == 0) { static const char* lines[] = { "cutscene()", @@ -3696,7 +3698,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkred_9") + else if (SDL_strcmp(t, "talkred_9") == 0) { static const char* lines[] = { "cutscene()", @@ -3726,7 +3728,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkred_10") + else if (SDL_strcmp(t, "talkred_10") == 0) { static const char* lines[] = { "cutscene()", @@ -3755,7 +3757,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkred_11") + else if (SDL_strcmp(t, "talkred_11") == 0) { static const char* lines[] = { "cutscene()", @@ -3777,7 +3779,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkred_12") + else if (SDL_strcmp(t, "talkred_12") == 0) { static const char* lines[] = { "cutscene()", @@ -3814,7 +3816,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkred_13") + else if (SDL_strcmp(t, "talkred_13") == 0) { static const char* lines[] = { "cutscene()", @@ -3843,7 +3845,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkred_14") + else if (SDL_strcmp(t, "talkred_14") == 0) { static const char* lines[] = { "cutscene()", @@ -3872,7 +3874,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkyellow_1") + else if (SDL_strcmp(t, "talkyellow_1") == 0) { static const char* lines[] = { "cutscene()", @@ -3895,7 +3897,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkyellow_2") + else if (SDL_strcmp(t, "talkyellow_2") == 0) { static const char* lines[] = { "cutscene()", @@ -3926,7 +3928,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkyellow_3") + else if (SDL_strcmp(t, "talkyellow_3") == 0) { static const char* lines[] = { "cutscene()", @@ -3988,7 +3990,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkyellow_4") + else if (SDL_strcmp(t, "talkyellow_4") == 0) { static const char* lines[] = { "cutscene()", @@ -4027,7 +4029,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkyellow_5") + else if (SDL_strcmp(t, "talkyellow_5") == 0) { static const char* lines[] = { "cutscene()", @@ -4050,7 +4052,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkyellow_6") + else if (SDL_strcmp(t, "talkyellow_6") == 0) { static const char* lines[] = { "cutscene()", @@ -4083,7 +4085,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkyellow_7") + else if (SDL_strcmp(t, "talkyellow_7") == 0) { //Vertigris is back static const char* lines[] = { @@ -4114,7 +4116,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkyellow_8") + else if (SDL_strcmp(t, "talkyellow_8") == 0) { //Victoria is back static const char* lines[] = { @@ -4144,7 +4146,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkyellow_9") + else if (SDL_strcmp(t, "talkyellow_9") == 0) { //Vermilion is back static const char* lines[] = { @@ -4183,7 +4185,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkyellow_10") + else if (SDL_strcmp(t, "talkyellow_10") == 0) { //Back on the ship! static const char* lines[] = { @@ -4213,7 +4215,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkyellow_11") + else if (SDL_strcmp(t, "talkyellow_11") == 0) { //Game Complete static const char* lines[] = { @@ -4252,7 +4254,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkyellow_12") + else if (SDL_strcmp(t, "talkyellow_12") == 0) { static const char* lines[] = { "cutscene()", @@ -4288,7 +4290,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkgreen_1") + else if (SDL_strcmp(t, "talkgreen_1") == 0) { static const char* lines[] = { "cutscene()", @@ -4310,7 +4312,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkgreen_2") + else if (SDL_strcmp(t, "talkgreen_2") == 0) { static const char* lines[] = { "cutscene()", @@ -4334,7 +4336,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkgreen_3") + else if (SDL_strcmp(t, "talkgreen_3") == 0) { static const char* lines[] = { "cutscene()", @@ -4358,7 +4360,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkgreen_4") + else if (SDL_strcmp(t, "talkgreen_4") == 0) { static const char* lines[] = { "cutscene()", @@ -4380,7 +4382,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkgreen_5") + else if (SDL_strcmp(t, "talkgreen_5") == 0) { static const char* lines[] = { "cutscene()", @@ -4419,7 +4421,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkgreen_6") + else if (SDL_strcmp(t, "talkgreen_6") == 0) { static const char* lines[] = { "cutscene()", @@ -4442,7 +4444,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkgreen_7") + else if (SDL_strcmp(t, "talkgreen_7") == 0) { static const char* lines[] = { "cutscene()", @@ -4466,7 +4468,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkgreen_8") + else if (SDL_strcmp(t, "talkgreen_8") == 0) { static const char* lines[] = { "cutscene()", @@ -4490,7 +4492,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkgreen_9") + else if (SDL_strcmp(t, "talkgreen_9") == 0) { static const char* lines[] = { "cutscene()", @@ -4520,7 +4522,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkgreen_10") + else if (SDL_strcmp(t, "talkgreen_10") == 0) { static const char* lines[] = { "cutscene()", @@ -4543,7 +4545,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkgreen_11") + else if (SDL_strcmp(t, "talkgreen_11") == 0) { static const char* lines[] = { "cutscene()", @@ -4576,7 +4578,7 @@ void scriptclass::load(std::string t) } - if (t == "talkpurple_1") + if (SDL_strcmp(t, "talkpurple_1") == 0) { static const char* lines[] = { "cutscene()", @@ -4607,7 +4609,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkpurple_2") + else if (SDL_strcmp(t, "talkpurple_2") == 0) { static const char* lines[] = { "cutscene()", @@ -4630,7 +4632,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkpurple_3") + else if (SDL_strcmp(t, "talkpurple_3") == 0) { static const char* lines[] = { "cutscene()", @@ -4673,7 +4675,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkpurple_4") + else if (SDL_strcmp(t, "talkpurple_4") == 0) { static const char* lines[] = { "cutscene()", @@ -4709,7 +4711,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkpurple_5") + else if (SDL_strcmp(t, "talkpurple_5") == 0) { static const char* lines[] = { "cutscene()", @@ -4739,7 +4741,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkpurple_6") + else if (SDL_strcmp(t, "talkpurple_6") == 0) { static const char* lines[] = { "cutscene()", @@ -4767,7 +4769,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkpurple_7") + else if (SDL_strcmp(t, "talkpurple_7") == 0) { static const char* lines[] = { "cutscene()", @@ -4804,7 +4806,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkpurple_8") + else if (SDL_strcmp(t, "talkpurple_8") == 0) { static const char* lines[] = { "cutscene()", @@ -4837,7 +4839,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkpurple_9") + else if (SDL_strcmp(t, "talkpurple_9") == 0) { static const char* lines[] = { "cutscene()", @@ -4861,7 +4863,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkpurple_intermission1") + else if (SDL_strcmp(t, "talkpurple_intermission1") == 0) { static const char* lines[] = { "cutscene()", @@ -4915,7 +4917,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkpurple_intermission2") + else if (SDL_strcmp(t, "talkpurple_intermission2") == 0) { static const char* lines[] = { "cutscene()", @@ -4961,7 +4963,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkpurple_intermission3") + else if (SDL_strcmp(t, "talkpurple_intermission3") == 0) { static const char* lines[] = { "cutscene()", @@ -5026,7 +5028,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkpurple_intro") + else if (SDL_strcmp(t, "talkpurple_intro") == 0) { static const char* lines[] = { "cutscene()", @@ -5095,7 +5097,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkblue_1") + else if (SDL_strcmp(t, "talkblue_1") == 0) { static const char* lines[] = { "cutscene()", @@ -5131,7 +5133,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkblue_2") + else if (SDL_strcmp(t, "talkblue_2") == 0) { static const char* lines[] = { "cutscene()", @@ -5155,7 +5157,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkblue_3") + else if (SDL_strcmp(t, "talkblue_3") == 0) { static const char* lines[] = { "cutscene()", @@ -5187,7 +5189,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkblue_4") + else if (SDL_strcmp(t, "talkblue_4") == 0) { static const char* lines[] = { "cutscene()", @@ -5263,7 +5265,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkblue_5") + else if (SDL_strcmp(t, "talkblue_5") == 0) { static const char* lines[] = { "cutscene()", @@ -5302,7 +5304,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkblue_6") + else if (SDL_strcmp(t, "talkblue_6") == 0) { static const char* lines[] = { "cutscene()", @@ -5344,7 +5346,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkblue_7") + else if (SDL_strcmp(t, "talkblue_7") == 0) { static const char* lines[] = { "cutscene()", @@ -5388,7 +5390,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkblue_8") + else if (SDL_strcmp(t, "talkblue_8") == 0) { static const char* lines[] = { "cutscene()", @@ -5420,7 +5422,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkblue_9") + else if (SDL_strcmp(t, "talkblue_9") == 0) { static const char* lines[] = { "cutscene()", @@ -5443,7 +5445,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkblue_trinket1") + else if (SDL_strcmp(t, "talkblue_trinket1") == 0) { static const char* lines[] = { "cutscene()", @@ -5505,7 +5507,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkblue_trinket2") + else if (SDL_strcmp(t, "talkblue_trinket2") == 0) { static const char* lines[] = { "cutscene()", @@ -5542,7 +5544,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkblue_trinket3") + else if (SDL_strcmp(t, "talkblue_trinket3") == 0) { //If you missed the first conversation static const char* lines[] = { @@ -5599,7 +5601,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkblue_trinket4") + else if (SDL_strcmp(t, "talkblue_trinket4") == 0) { static const char* lines[] = { "hidetrinkets()", @@ -5658,7 +5660,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkblue_trinket5") + else if (SDL_strcmp(t, "talkblue_trinket5") == 0) { static const char* lines[] = { "squeak(blue)", @@ -5692,7 +5694,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkblue_trinket6") + else if (SDL_strcmp(t, "talkblue_trinket6") == 0) { static const char* lines[] = { "squeak(blue)", @@ -5741,7 +5743,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkyellow_trinket1") + else if (SDL_strcmp(t, "talkyellow_trinket1") == 0) { static const char* lines[] = { "cutscene()", @@ -5808,7 +5810,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkyellow_trinket2") + else if (SDL_strcmp(t, "talkyellow_trinket2") == 0) { static const char* lines[] = { "hidetrinkets()", @@ -5865,7 +5867,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "talkyellow_trinket3") + else if (SDL_strcmp(t, "talkyellow_trinket3") == 0) { static const char* lines[] = { "squeak(yellow)", @@ -5890,7 +5892,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "gamecomplete") + else if (SDL_strcmp(t, "gamecomplete") == 0) { static const char* lines[] = { "gotoroom(2,11)", @@ -5922,7 +5924,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "gamecomplete_ending") + else if (SDL_strcmp(t, "gamecomplete_ending") == 0) { const char* lines[] = { "delay(15)", @@ -6175,7 +6177,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "startepilogue") + else if (SDL_strcmp(t, "startepilogue") == 0) { static const char* lines[] = { "cutscene()", @@ -6707,7 +6709,7 @@ void scriptclass::load(std::string t) }; filllines(lines); } - else if (t == "returntolab") + else if (SDL_strcmp(t, "returntolab") == 0) { //To get back to the lab from the gravitron static const char* lines[] = { diff --git a/desktop_version/src/TerminalScripts.cpp b/desktop_version/src/TerminalScripts.cpp index d22d7627..fabb8cbc 100644 --- a/desktop_version/src/TerminalScripts.cpp +++ b/desktop_version/src/TerminalScripts.cpp @@ -1,9 +1,10 @@ #include "Script.h" +#include -void scriptclass::loadother(std::string t) +void scriptclass::loadother(const char* t) { //loads script name t into the array - if (t == "terminal_station_1") + if (SDL_strcmp(t, "terminal_station_1") == 0) { static const char* lines[] = { "cutscene()", @@ -34,7 +35,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "alreadyvisited") + else if (SDL_strcmp(t, "alreadyvisited") == 0) { static const char* lines[] = { "squeak(player)", @@ -49,7 +50,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_outside_1") + else if (SDL_strcmp(t, "terminal_outside_1") == 0) { static const char* lines[] = { "cutscene()", @@ -100,7 +101,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_outside_2") + else if (SDL_strcmp(t, "terminal_outside_2") == 0) { static const char* lines[] = { "cutscene()", @@ -149,7 +150,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_outside_3") + else if (SDL_strcmp(t, "terminal_outside_3") == 0) { static const char* lines[] = { "cutscene()", @@ -198,7 +199,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_outside_4") + else if (SDL_strcmp(t, "terminal_outside_4") == 0) { static const char* lines[] = { "cutscene()", @@ -236,7 +237,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_outside_5") + else if (SDL_strcmp(t, "terminal_outside_5") == 0) { static const char* lines[] = { "cutscene()", @@ -285,7 +286,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_outside_6") + else if (SDL_strcmp(t, "terminal_outside_6") == 0) { static const char* lines[] = { "cutscene()", @@ -334,7 +335,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_finallevel") + else if (SDL_strcmp(t, "terminal_finallevel") == 0) { static const char* lines[] = { "cutscene()", @@ -409,7 +410,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "finalterminal_finish") + else if (SDL_strcmp(t, "finalterminal_finish") == 0) { @@ -440,7 +441,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_station_2") + else if (SDL_strcmp(t, "terminal_station_2") == 0) { static const char* lines[] = { "cutscene()", @@ -468,7 +469,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_station_3") + else if (SDL_strcmp(t, "terminal_station_3") == 0) { static const char* lines[] = { "cutscene()", @@ -495,7 +496,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_station_4") + else if (SDL_strcmp(t, "terminal_station_4") == 0) { static const char* lines[] = { "cutscene()", @@ -522,7 +523,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_warp_1") + else if (SDL_strcmp(t, "terminal_warp_1") == 0) { static const char* lines[] = { "cutscene()", @@ -549,7 +550,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_warp_2") + else if (SDL_strcmp(t, "terminal_warp_2") == 0) { static const char* lines[] = { "cutscene()", @@ -577,7 +578,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_lab_1") + else if (SDL_strcmp(t, "terminal_lab_1") == 0) { static const char* lines[] = { "cutscene()", @@ -615,7 +616,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_lab_2") + else if (SDL_strcmp(t, "terminal_lab_2") == 0) { static const char* lines[] = { "cutscene()", @@ -634,7 +635,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_secretlab") + else if (SDL_strcmp(t, "terminal_secretlab") == 0) { static const char* lines[] = { "cutscene()", @@ -665,7 +666,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_shipcomputer") + else if (SDL_strcmp(t, "terminal_shipcomputer") == 0) { static const char* lines[] = { "cutscene()", @@ -695,7 +696,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_letsgo") + else if (SDL_strcmp(t, "terminal_letsgo") == 0) { static const char* lines[] = { "squeak(player)", @@ -725,7 +726,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_radio") + else if (SDL_strcmp(t, "terminal_radio") == 0) { static const char* lines[] = { "cutscene()", @@ -747,7 +748,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_jukebox") + else if (SDL_strcmp(t, "terminal_jukebox") == 0) { static const char* lines[] = { "cutscene()", @@ -781,7 +782,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_jukeunlock1") + else if (SDL_strcmp(t, "terminal_jukeunlock1") == 0) { static const char* lines[] = { "squeak(terminal)", @@ -799,7 +800,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_jukeunlock2") + else if (SDL_strcmp(t, "terminal_jukeunlock2") == 0) { static const char* lines[] = { "squeak(terminal)", @@ -817,7 +818,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_jukeunlock3") + else if (SDL_strcmp(t, "terminal_jukeunlock3") == 0) { static const char* lines[] = { "squeak(terminal)", @@ -835,7 +836,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_jukeunlock4") + else if (SDL_strcmp(t, "terminal_jukeunlock4") == 0) { static const char* lines[] = { "squeak(terminal)", @@ -853,7 +854,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_jukeunlock41") + else if (SDL_strcmp(t, "terminal_jukeunlock41") == 0) { static const char* lines[] = { "squeak(terminal)", @@ -871,7 +872,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_jukeunlock5") + else if (SDL_strcmp(t, "terminal_jukeunlock5") == 0) { static const char* lines[] = { "squeak(terminal)", @@ -889,7 +890,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_jukeunlock6") + else if (SDL_strcmp(t, "terminal_jukeunlock6") == 0) { static const char* lines[] = { "squeak(terminal)", @@ -907,7 +908,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_jukeunlock7") + else if (SDL_strcmp(t, "terminal_jukeunlock7") == 0) { static const char* lines[] = { "squeak(terminal)", @@ -925,7 +926,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_juke1") + else if (SDL_strcmp(t, "terminal_juke1") == 0) { static const char* lines[] = { "play(4)", @@ -934,7 +935,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_juke2") + else if (SDL_strcmp(t, "terminal_juke2") == 0) { static const char* lines[] = { "play(1)", @@ -943,7 +944,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_juke3") + else if (SDL_strcmp(t, "terminal_juke3") == 0) { static const char* lines[] = { "play(2)", @@ -952,7 +953,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_juke4") + else if (SDL_strcmp(t, "terminal_juke4") == 0) { static const char* lines[] = { "play(6)", @@ -961,7 +962,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_juke5") + else if (SDL_strcmp(t, "terminal_juke5") == 0) { static const char* lines[] = { "play(3)", @@ -970,7 +971,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_juke6") + else if (SDL_strcmp(t, "terminal_juke6") == 0) { static const char* lines[] = { "play(8)", @@ -979,7 +980,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_juke7") + else if (SDL_strcmp(t, "terminal_juke7") == 0) { static const char* lines[] = { "play(11)", @@ -988,7 +989,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_juke8") + else if (SDL_strcmp(t, "terminal_juke8") == 0) { static const char* lines[] = { "play(10)", @@ -997,7 +998,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_juke9") + else if (SDL_strcmp(t, "terminal_juke9") == 0) { static const char* lines[] = { "play(12)", @@ -1006,7 +1007,7 @@ void scriptclass::loadother(std::string t) }; filllines(lines); } - else if (t == "terminal_juke10") + else if (SDL_strcmp(t, "terminal_juke10") == 0) { static const char* lines[] = { "play(9)",