diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index 06c9b4a6..8cd31a2f 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -393,7 +393,7 @@ void Game::init(void) teststring = "TEST = True"; state = 1; statedelay = 0; - //updatestate(dwgfx, map, obj, help, music); + //updatestate(); skipfakeload = false; @@ -503,7 +503,7 @@ Game::~Game(void) { } -void Game::lifesequence( entityclass& obj ) +void Game::lifesequence() { if (lifeseq > 0) { @@ -696,7 +696,7 @@ void Game::savecustomlevelstats() } } -void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, UtilityClass& help, musicclass& music ) +void Game::updatestate() { int i; statedelay--; @@ -720,23 +720,23 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit advancetext = true; hascontrol = false; state = 3; - dwgfx.createtextbox("To do: write quick", 50, 80, 164, 164, 255); - dwgfx.addline("intro to story!"); + graphics.createtextbox("To do: write quick", 50, 80, 164, 164, 255); + graphics.addline("intro to story!"); //Oh no! what happen to rest of crew etc crash into dimension break; case 4: //End of opening cutscene for now - dwgfx.createtextbox(" Press arrow keys or WASD to move ", -1, 195, 174, 174, 174); - dwgfx.textboxtimer(60); + graphics.createtextbox(" Press arrow keys or WASD to move ", -1, 195, 174, 174, 174); + graphics.textboxtimer(60); state = 0; break; case 5: //Demo over advancetext = true; hascontrol = false; - /*dwgfx.createtextbox(" Prototype Complete ", 50, 80, 164, 164, 255); - dwgfx.addline("Congrats! More Info Soon!"); - dwgfx.textboxcenter(); + /*graphics.createtextbox(" Prototype Complete ", 50, 80, 164, 164, 255); + graphics.addline("Congrats! More Info Soon!"); + graphics.textboxcenter(); */ startscript = true; @@ -746,7 +746,7 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit break; case 7: //End of opening cutscene for now - dwgfx.textboxremove(); + graphics.textboxremove(); hascontrol = true; advancetext = false; state = 0; @@ -757,9 +757,9 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit if (obj.flags[13] == 0) { obj.changeflag(13, 1); - dwgfx.createtextbox(" Press ENTER to view map ", -1, 155, 174, 174, 174); - dwgfx.addline(" and quicksave"); - dwgfx.textboxtimer(60); + graphics.createtextbox(" Press ENTER to view map ", -1, 155, 174, 174, 174); + graphics.addline(" and quicksave"); + graphics.textboxtimer(60); } state = 0; break; @@ -808,49 +808,49 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit case 11: //Intermission 1 instructional textbox, depends on last saved - dwgfx.textboxremovefast(); - dwgfx.createtextbox(" When you're NOT standing on ", -1, 3, 174, 174, 174); - if (dwgfx.flipmode) + graphics.textboxremovefast(); + graphics.createtextbox(" When you're NOT standing on ", -1, 3, 174, 174, 174); + if (graphics.flipmode) { if (lastsaved == 2) { - dwgfx.addline(" the ceiling, Vitellary will"); + graphics.addline(" the ceiling, Vitellary will"); } else if (lastsaved == 3) { - dwgfx.addline(" the ceiling, Vermilion will"); + graphics.addline(" the ceiling, Vermilion will"); } else if (lastsaved == 4) { - dwgfx.addline(" the ceiling, Verdigris will"); + graphics.addline(" the ceiling, Verdigris will"); } else if (lastsaved == 5) { - dwgfx.addline(" the ceiling, Victoria will"); + graphics.addline(" the ceiling, Victoria will"); } } else { if (lastsaved == 2) { - dwgfx.addline(" the floor, Vitellary will"); + graphics.addline(" the floor, Vitellary will"); } else if (lastsaved == 3) { - dwgfx.addline(" the floor, Vermilion will"); + graphics.addline(" the floor, Vermilion will"); } else if (lastsaved == 4) { - dwgfx.addline(" the floor, Verdigris will"); + graphics.addline(" the floor, Verdigris will"); } else if (lastsaved == 5) { - dwgfx.addline(" the floor, Victoria will"); + graphics.addline(" the floor, Victoria will"); } } - dwgfx.addline(" stop and wait for you."); - dwgfx.textboxtimer(180); + graphics.addline(" stop and wait for you."); + graphics.textboxtimer(180); state = 0; break; case 12: @@ -859,53 +859,53 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit if (obj.flags[61] == 0) { obj.changeflag(61, 1); - dwgfx.textboxremovefast(); - dwgfx.createtextbox(" You can't continue to the next ", -1, 8, 174, 174, 174); + graphics.textboxremovefast(); + graphics.createtextbox(" You can't continue to the next ", -1, 8, 174, 174, 174); if (lastsaved == 5) { - dwgfx.addline(" room until she is safely across. "); + graphics.addline(" room until she is safely across. "); } else { - dwgfx.addline(" room until he is safely across. "); + graphics.addline(" room until he is safely across. "); } - dwgfx.textboxtimer(120); + graphics.textboxtimer(120); } state = 0; break; case 13: //textbox removal obj.removetrigger(13); - dwgfx.textboxremovefast(); + graphics.textboxremovefast(); state = 0; break; case 14: //Intermission 1 instructional textbox, depends on last saved - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(" When you're standing on the ceiling, ", -1, 3, 174, 174, 174); + graphics.createtextbox(" When you're standing on the ceiling, ", -1, 3, 174, 174, 174); } else { - dwgfx.createtextbox(" When you're standing on the floor, ", -1, 3, 174, 174, 174); + graphics.createtextbox(" When you're standing on the floor, ", -1, 3, 174, 174, 174); } if (lastsaved == 2) { - dwgfx.addline(" Vitellary will try to walk to you. "); + graphics.addline(" Vitellary will try to walk to you. "); } else if (lastsaved == 3) { - dwgfx.addline(" Vermilion will try to walk to you. "); + graphics.addline(" Vermilion will try to walk to you. "); } else if (lastsaved == 4) { - dwgfx.addline(" Verdigris will try to walk to you. "); + graphics.addline(" Verdigris will try to walk to you. "); } else if (lastsaved == 5) { - dwgfx.addline(" Victoria will try to walk to you. "); + graphics.addline(" Victoria will try to walk to you. "); } - dwgfx.textboxtimer(280); + graphics.textboxtimer(280); state = 0; break; @@ -928,9 +928,9 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit case 17: //Arrow key tutorial obj.removetrigger(17); - dwgfx.createtextbox(" If you prefer, you can press UP or ", -1, 195, 174, 174, 174); - dwgfx.addline(" DOWN instead of ACTION to flip."); - dwgfx.textboxtimer(100); + graphics.createtextbox(" If you prefer, you can press UP or ", -1, 195, 174, 174, 174); + graphics.addline(" DOWN instead of ACTION to flip."); + graphics.textboxtimer(100); state = 0; break; @@ -939,7 +939,7 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit { obj.changeflag(1, 1); state = 0; - dwgfx.textboxremove(); + graphics.textboxremove(); } obj.removetrigger(20); break; @@ -948,18 +948,18 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit { obj.changeflag(2, 1); state = 0; - dwgfx.textboxremove(); + graphics.textboxremove(); } obj.removetrigger(21); break; case 22: if (obj.flags[3] == 0) { - dwgfx.textboxremovefast(); + graphics.textboxremovefast(); obj.changeflag(3, 1); state = 0; - dwgfx.createtextbox(" Press ACTION to flip ", -1, 25, 174, 174, 174); - dwgfx.textboxtimer(60); + graphics.createtextbox(" Press ACTION to flip ", -1, 25, 174, 174, 174); + graphics.textboxtimer(60); } obj.removetrigger(22); break; @@ -1299,54 +1299,54 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit case 50: music.playef(15, 10); - dwgfx.createtextbox("Help! Can anyone hear", 35, 15, 255, 134, 255); - dwgfx.addline("this message?"); - dwgfx.textboxtimer(60); + graphics.createtextbox("Help! Can anyone hear", 35, 15, 255, 134, 255); + graphics.addline("this message?"); + graphics.textboxtimer(60); state++; statedelay = 100; break; case 51: music.playef(15, 10); - dwgfx.createtextbox("Verdigris? Are you out", 30, 12, 255, 134, 255); - dwgfx.addline("there? Are you ok?"); - dwgfx.textboxtimer(60); + graphics.createtextbox("Verdigris? Are you out", 30, 12, 255, 134, 255); + graphics.addline("there? Are you ok?"); + graphics.textboxtimer(60); state++; statedelay = 100; break; case 52: music.playef(15, 10); - dwgfx.createtextbox("Please help us! We've crashed", 5, 22, 255, 134, 255); - dwgfx.addline("and need assistance!"); - dwgfx.textboxtimer(60); + graphics.createtextbox("Please help us! We've crashed", 5, 22, 255, 134, 255); + graphics.addline("and need assistance!"); + graphics.textboxtimer(60); state++; statedelay = 100; break; case 53: music.playef(15, 10); - dwgfx.createtextbox("Hello? Anyone out there?", 40, 15, 255, 134, 255); - dwgfx.textboxtimer(60); + graphics.createtextbox("Hello? Anyone out there?", 40, 15, 255, 134, 255); + graphics.textboxtimer(60); state++; statedelay = 100; break; case 54: music.playef(15, 10); - dwgfx.createtextbox("This is Doctor Violet from the", 5, 8, 255, 134, 255); - dwgfx.addline("D.S.S. Souleye! Please respond!"); - dwgfx.textboxtimer(60); + graphics.createtextbox("This is Doctor Violet from the", 5, 8, 255, 134, 255); + graphics.addline("D.S.S. Souleye! Please respond!"); + graphics.textboxtimer(60); state++; statedelay = 100; break; case 55: music.playef(15, 10); - dwgfx.createtextbox("Please... Anyone...", 45, 14, 255, 134, 255); - dwgfx.textboxtimer(60); + graphics.createtextbox("Please... Anyone...", 45, 14, 255, 134, 255); + graphics.textboxtimer(60); state++; statedelay = 100; break; case 56: music.playef(15, 10); - dwgfx.createtextbox("Please be alright, everyone...", 25, 18, 255, 134, 255); - dwgfx.textboxtimer(60); + graphics.createtextbox("Please be alright, everyone...", 25, 18, 255, 134, 255); + graphics.textboxtimer(60); state=50; statedelay = 100; break; @@ -1354,15 +1354,15 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit case 80: //Used to return to menu from the game - if(dwgfx.fademode == 1) state++; + if(graphics.fademode == 1) state++; break; case 81: gamestate = 1; - dwgfx.fademode = 4; + graphics.fademode = 4; music.play(6); - dwgfx.backgrounddrawn = false; + graphics.backgrounddrawn = false; map.tdrawback = true; - dwgfx.flipmode = false; + graphics.flipmode = false; createmenu("mainmenu"); state = 0; break; @@ -1402,21 +1402,21 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit } } - savestats(map, dwgfx); + savestats(); - dwgfx.fademode = 2; + graphics.fademode = 2; music.fadeout(); state++; break; case 83: frames--; - if(dwgfx.fademode == 1) state++; + if(graphics.fademode == 1) state++; break; case 84: - dwgfx.flipmode = false; + graphics.flipmode = false; gamestate = 1; - dwgfx.fademode = 4; - dwgfx.backgrounddrawn = true; + graphics.fademode = 4; + graphics.backgrounddrawn = true; map.tdrawback = true; createmenu("timetrialcomplete"); state = 0; @@ -1491,11 +1491,11 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit case 96: //Used to return to gravitron to game - if(dwgfx.fademode == 1) state++; + if(graphics.fademode == 1) state++; break; case 97: gamestate = 0; - dwgfx.fademode = 4; + graphics.fademode = 4; startscript = true; newscript="returntolab"; state = 0; @@ -1541,36 +1541,36 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit advancetext = true; hascontrol = false; - dwgfx.createtextbox("Captain! I've been so worried!", 60, 90, 164, 255, 164); + graphics.createtextbox("Captain! I've been so worried!", 60, 90, 164, 255, 164); state++; music.playef(12, 10); } break; case 104: - dwgfx.createtextbox("I'm glad you're ok!", 135, 152, 164, 164, 255); + graphics.createtextbox("I'm glad you're ok!", 135, 152, 164, 164, 255); state++; music.playef(11, 10); - dwgfx.textboxactive(); + graphics.textboxactive(); break; case 106: { - dwgfx.createtextbox("I've been trying to find a", 74, 70, 164, 255, 164); - dwgfx.addline("way out, but I keep going"); - dwgfx.addline("around in circles..."); + graphics.createtextbox("I've been trying to find a", 74, 70, 164, 255, 164); + graphics.addline("way out, but I keep going"); + graphics.addline("around in circles..."); state++; music.playef(2, 10); - dwgfx.textboxactive(); + graphics.textboxactive(); i = obj.getcompanion(6); obj.entities[i].tile = 54; obj.entities[i].state = 0; } break; case 108: - dwgfx.createtextbox("Don't worry! I have a", 125, 152, 164, 164, 255); - dwgfx.addline("teleporter key!"); + graphics.createtextbox("Don't worry! I have a", 125, 152, 164, 164, 255); + graphics.addline("teleporter key!"); state++; music.playef(11, 10); - dwgfx.textboxactive(); + graphics.textboxactive(); break; case 110: { @@ -1578,15 +1578,15 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit i = obj.getcompanion(6); obj.entities[i].tile = 0; obj.entities[i].state = 1; - dwgfx.createtextbox("Follow me!", 185, 154, 164, 164, 255); + graphics.createtextbox("Follow me!", 185, 154, 164, 164, 255); state++; music.playef(11, 10); - dwgfx.textboxactive(); + graphics.textboxactive(); } break; case 112: - dwgfx.textboxremove(); + graphics.textboxremove(); hascontrol = true; advancetext = false; @@ -1607,13 +1607,13 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit advancetext = true; hascontrol = false; - dwgfx.createtextbox("Sorry Eurogamers! Teleporting around", 60 - 20, 200, 255, 64, 64); - dwgfx.addline("the map doesn't work in this version!"); - dwgfx.textboxcenterx(); + graphics.createtextbox("Sorry Eurogamers! Teleporting around", 60 - 20, 200, 255, 64, 64); + graphics.addline("the map doesn't work in this version!"); + graphics.textboxcenterx(); state++; break; case 118: - dwgfx.textboxremove(); + graphics.textboxremove(); hascontrol = true; advancetext = false; @@ -1657,43 +1657,43 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit advancetext = true; hascontrol = false; - dwgfx.createtextbox("Captain! You're ok!", 60-10, 90-40, 255, 255, 134); + graphics.createtextbox("Captain! You're ok!", 60-10, 90-40, 255, 255, 134); state++; music.playef(14, 10); break; case 124: - dwgfx.createtextbox("I've found a teleporter, but", 60-20, 90 - 40, 255, 255, 134); - dwgfx.addline("I can't get it to go anywhere..."); + graphics.createtextbox("I've found a teleporter, but", 60-20, 90 - 40, 255, 255, 134); + graphics.addline("I can't get it to go anywhere..."); state++; music.playef(2, 10); - dwgfx.textboxactive(); + graphics.textboxactive(); i = obj.getcompanion(7); //obj.entities[i].tile = 66; obj.entities[i].state = 0; break; case 126: - dwgfx.createtextbox("I can help with that!", 125, 152-40, 164, 164, 255); + graphics.createtextbox("I can help with that!", 125, 152-40, 164, 164, 255); state++; music.playef(11, 10); - dwgfx.textboxactive(); + graphics.textboxactive(); break; case 128: - dwgfx.createtextbox("I have the teleporter", 130, 152-35, 164, 164, 255); - dwgfx.addline("codex for our ship!"); + graphics.createtextbox("I have the teleporter", 130, 152-35, 164, 164, 255); + graphics.addline("codex for our ship!"); state++; music.playef(11, 10); - dwgfx.textboxactive(); + graphics.textboxactive(); break; case 130: - dwgfx.createtextbox("Yey! Let's go home!", 60-30, 90-35, 255, 255, 134); + graphics.createtextbox("Yey! Let's go home!", 60-30, 90-35, 255, 255, 134); state++; music.playef(14, 10); - dwgfx.textboxactive(); + graphics.textboxactive(); i = obj.getcompanion(7); obj.entities[i].tile = 6; obj.entities[i].state = 1; break; case 132: - dwgfx.textboxremove(); + graphics.textboxremove(); hascontrol = true; advancetext = false; @@ -1947,7 +1947,7 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit break; case 1000: - dwgfx.showcutscenebars = true; + graphics.showcutscenebars = true; hascontrol = false; completestop = true; state++; @@ -1957,56 +1957,56 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit //Found a trinket! advancetext = true; state++; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(" Congratulations! ", 50, 105, 174, 174, 174); - dwgfx.addline(""); - dwgfx.addline("You have found a shiny trinket!"); - dwgfx.textboxcenterx(); + graphics.createtextbox(" Congratulations! ", 50, 105, 174, 174, 174); + graphics.addline(""); + graphics.addline("You have found a shiny trinket!"); + graphics.textboxcenterx(); if(map.custommode) { - dwgfx.createtextbox(" " + help.number(trinkets) + " out of " + help.number(map.customtrinkets)+ " ", 50, 65, 174, 174, 174); - dwgfx.textboxcenterx(); + graphics.createtextbox(" " + help.number(trinkets) + " out of " + help.number(map.customtrinkets)+ " ", 50, 65, 174, 174, 174); + graphics.textboxcenterx(); } else { - dwgfx.createtextbox(" " + help.number(trinkets) + " out of Twenty ", 50, 65, 174, 174, 174); - dwgfx.textboxcenterx(); + graphics.createtextbox(" " + help.number(trinkets) + " out of Twenty ", 50, 65, 174, 174, 174); + graphics.textboxcenterx(); } } else { - dwgfx.createtextbox(" Congratulations! ", 50, 85, 174, 174, 174); - dwgfx.addline(""); - dwgfx.addline("You have found a shiny trinket!"); - dwgfx.textboxcenterx(); + graphics.createtextbox(" Congratulations! ", 50, 85, 174, 174, 174); + graphics.addline(""); + graphics.addline("You have found a shiny trinket!"); + graphics.textboxcenterx(); if(map.custommode) { - dwgfx.createtextbox(" " + help.number(trinkets) + " out of " + help.number(map.customtrinkets)+ " ", 50, 135, 174, 174, 174); - dwgfx.textboxcenterx(); + graphics.createtextbox(" " + help.number(trinkets) + " out of " + help.number(map.customtrinkets)+ " ", 50, 135, 174, 174, 174); + graphics.textboxcenterx(); } else { - dwgfx.createtextbox(" " + help.number(trinkets) + " out of Twenty ", 50, 135, 174, 174, 174); - dwgfx.textboxcenterx(); + graphics.createtextbox(" " + help.number(trinkets) + " out of Twenty ", 50, 135, 174, 174, 174); + graphics.textboxcenterx(); } } break; case 1003: - dwgfx.textboxremove(); + graphics.textboxremove(); hascontrol = true; advancetext = false; completestop = false; state = 0; //music.play(music.resumesong); if(!muted && music.currentsong>-1) music.fadeMusicVolumeIn(3000); - dwgfx.showcutscenebars = false; + graphics.showcutscenebars = false; break; case 1010: - dwgfx.showcutscenebars = true; + graphics.showcutscenebars = true; hascontrol = false; completestop = true; state++; @@ -2016,53 +2016,53 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit //Found a crewmate! advancetext = true; state++; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(" Congratulations! ", 50, 105, 174, 174, 174); - dwgfx.addline(""); - dwgfx.addline("You have found a lost crewmate!"); - dwgfx.textboxcenterx(); + graphics.createtextbox(" Congratulations! ", 50, 105, 174, 174, 174); + graphics.addline(""); + graphics.addline("You have found a lost crewmate!"); + graphics.textboxcenterx(); if(int(map.customcrewmates-crewmates)==0) { - dwgfx.createtextbox(" All crewmates rescued! ", 50, 65, 174, 174, 174); + graphics.createtextbox(" All crewmates rescued! ", 50, 65, 174, 174, 174); } else if(map.customcrewmates-crewmates==1) { - dwgfx.createtextbox(" " + help.number(int(map.customcrewmates-crewmates))+ " remains ", 50, 65, 174, 174, 174); + graphics.createtextbox(" " + help.number(int(map.customcrewmates-crewmates))+ " remains ", 50, 65, 174, 174, 174); } else { - dwgfx.createtextbox(" " + help.number(int(map.customcrewmates-crewmates))+ " remain ", 50, 65, 174, 174, 174); + graphics.createtextbox(" " + help.number(int(map.customcrewmates-crewmates))+ " remain ", 50, 65, 174, 174, 174); } - dwgfx.textboxcenterx(); + graphics.textboxcenterx(); } else { - dwgfx.createtextbox(" Congratulations! ", 50, 85, 174, 174, 174); - dwgfx.addline(""); - dwgfx.addline("You have found a lost crewmate!"); - dwgfx.textboxcenterx(); + graphics.createtextbox(" Congratulations! ", 50, 85, 174, 174, 174); + graphics.addline(""); + graphics.addline("You have found a lost crewmate!"); + graphics.textboxcenterx(); if(int(map.customcrewmates-crewmates)==0) { - dwgfx.createtextbox(" All crewmates rescued! ", 50, 135, 174, 174, 174); + graphics.createtextbox(" All crewmates rescued! ", 50, 135, 174, 174, 174); } else if(map.customcrewmates-crewmates==1) { - dwgfx.createtextbox(" " + help.number(int(map.customcrewmates-crewmates))+ " remains ", 50, 135, 174, 174, 174); + graphics.createtextbox(" " + help.number(int(map.customcrewmates-crewmates))+ " remains ", 50, 135, 174, 174, 174); } else { - dwgfx.createtextbox(" " + help.number(int(map.customcrewmates-crewmates))+ " remain ", 50, 135, 174, 174, 174); + graphics.createtextbox(" " + help.number(int(map.customcrewmates-crewmates))+ " remain ", 50, 135, 174, 174, 174); } - dwgfx.textboxcenterx(); + graphics.textboxcenterx(); } break; #if !defined(NO_CUSTOM_LEVELS) case 1013: - dwgfx.textboxremove(); + graphics.textboxremove(); hascontrol = true; advancetext = false; completestop = false; @@ -2072,7 +2072,7 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit { if(map.custommodeforreal) { - dwgfx.fademode = 2; + graphics.fademode = 2; if(!muted && ed.levmusic>0) music.fadeMusicVolumeIn(3000); if(ed.levmusic>0) music.fadeout(); state=1014; @@ -2080,7 +2080,7 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit else { gamestate = EDITORMODE; - dwgfx.backgrounddrawn=false; + graphics.backgrounddrawn=false; if(!muted && ed.levmusic>0) music.fadeMusicVolumeIn(3000); if(ed.levmusic>0) music.fadeout(); } @@ -2089,19 +2089,19 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit { if(!muted && ed.levmusic>0) music.fadeMusicVolumeIn(3000); } - dwgfx.showcutscenebars = false; + graphics.showcutscenebars = false; break; #endif case 1014: frames--; - if(dwgfx.fademode == 1) state++; + if(graphics.fademode == 1) state++; break; case 1015: - dwgfx.flipmode = false; + graphics.flipmode = false; gamestate = TITLEMODE; - dwgfx.fademode = 4; + graphics.fademode = 4; music.play(6); - dwgfx.backgrounddrawn = true; + graphics.backgrounddrawn = true; map.tdrawback = true; //Update level stats if(map.customcrewmates-crewmates==0) @@ -2130,16 +2130,16 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit } else { - savetele(map, obj, music); - if (dwgfx.flipmode) + savetele(); + if (graphics.flipmode) { - dwgfx.createtextbox(" Game Saved ", -1, 202, 174, 174, 174); - dwgfx.textboxtimer(25); + graphics.createtextbox(" Game Saved ", -1, 202, 174, 174, 174); + graphics.textboxtimer(25); } else { - dwgfx.createtextbox(" Game Saved ", -1, 12, 174, 174, 174); - dwgfx.textboxtimer(25); + graphics.createtextbox(" Game Saved ", -1, 12, 174, 174, 174); + graphics.textboxtimer(25); } state = 0; } @@ -2223,21 +2223,21 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit case 2510: advancetext = true; hascontrol = false; - dwgfx.createtextbox("Hello?", 125+24, 152-20, 164, 164, 255); + graphics.createtextbox("Hello?", 125+24, 152-20, 164, 164, 255); state++; music.playef(11, 10); - dwgfx.textboxactive(); + graphics.textboxactive(); break; case 2512: advancetext = true; hascontrol = false; - dwgfx.createtextbox("Is anyone there?", 125+8, 152-24, 164, 164, 255); + graphics.createtextbox("Is anyone there?", 125+8, 152-24, 164, 164, 255); state++; music.playef(11, 10); - dwgfx.textboxactive(); + graphics.textboxactive(); break; case 2514: - dwgfx.textboxremove(); + graphics.textboxremove(); hascontrol = true; advancetext = false; @@ -2330,48 +2330,48 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit case 3006: //Level complete! (warp zone) - unlocknum(4, map, dwgfx); + unlocknum(4); lastsaved = 4; music.play(0); state++; statedelay = 75; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox("", -1, 180, 165, 165, 255); + graphics.createtextbox("", -1, 180, 165, 165, 255); } else { - dwgfx.createtextbox("", -1, 12, 165, 165, 255); + graphics.createtextbox("", -1, 12, 165, 165, 255); } - //dwgfx.addline(" Level Complete! "); - dwgfx.addline(" "); - dwgfx.addline(""); - dwgfx.addline(""); - dwgfx.textboxcenterx(); + //graphics.addline(" Level Complete! "); + graphics.addline(" "); + graphics.addline(""); + graphics.addline(""); + graphics.textboxcenterx(); /* advancetext = true; hascontrol = false; state = 3; - dwgfx.createtextbox("To do: write quick", 50, 80, 164, 164, 255); - dwgfx.addline("intro to story!");*/ + graphics.createtextbox("To do: write quick", 50, 80, 164, 164, 255); + graphics.addline("intro to story!");*/ break; case 3007: state++; statedelay = 45; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox("", -1, 104, 175,174,174); + graphics.createtextbox("", -1, 104, 175,174,174); } else { - dwgfx.createtextbox("", -1, 64+8+16, 175,174,174); + graphics.createtextbox("", -1, 64+8+16, 175,174,174); } - dwgfx.addline(" You have rescued "); - dwgfx.addline(" a crew member! "); - dwgfx.addline(""); - dwgfx.textboxcenterx(); + graphics.addline(" You have rescued "); + graphics.addline(" a crew member! "); + graphics.addline(""); + graphics.textboxcenterx(); break; case 3008: state++; @@ -2381,60 +2381,60 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit if (temp == 1) { tempstring = " One remains "; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + graphics.createtextbox(tempstring, -1, 72, 174, 174, 174); } else { - dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); + graphics.createtextbox(tempstring, -1, 128+16, 174, 174, 174); } } else if (temp > 0) { tempstring = " " + help.number(temp) + " remain "; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + graphics.createtextbox(tempstring, -1, 72, 174, 174, 174); } else { - dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); + graphics.createtextbox(tempstring, -1, 128+16, 174, 174, 174); } } else { - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 72, 174, 174, 174); + graphics.createtextbox(" All Crew Members Rescued! ", -1, 72, 174, 174, 174); } else { - dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 128+16, 174, 174, 174); + graphics.createtextbox(" All Crew Members Rescued! ", -1, 128+16, 174, 174, 174); } } - dwgfx.textboxcenterx(); + graphics.textboxcenterx(); break; case 3009: state++; statedelay = 0; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(" Press ACTION to continue ", -1, 20, 164, 164, 255); + graphics.createtextbox(" Press ACTION to continue ", -1, 20, 164, 164, 255); } else { - dwgfx.createtextbox(" Press ACTION to continue ", -1, 196, 164, 164, 255); + graphics.createtextbox(" Press ACTION to continue ", -1, 196, 164, 164, 255); } - dwgfx.textboxcenterx(); + graphics.textboxcenterx(); break; case 3010: if (jumppressed) { state++; statedelay = 30; - dwgfx.textboxremove(); + graphics.textboxremove(); } break; case 3011: @@ -2444,49 +2444,49 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit case 3020: //Level complete! (Space Station 2) - unlocknum(3, map, dwgfx); + unlocknum(3); lastsaved = 2; music.play(0); state++; statedelay = 75; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox("", -1, 180, 165, 165, 255); + graphics.createtextbox("", -1, 180, 165, 165, 255); } else { - dwgfx.createtextbox("", -1, 12, 165, 165, 255); + graphics.createtextbox("", -1, 12, 165, 165, 255); } - //dwgfx.addline(" Level Complete! "); - dwgfx.addline(" "); - dwgfx.addline(""); - dwgfx.addline(""); - dwgfx.textboxcenterx(); + //graphics.addline(" Level Complete! "); + graphics.addline(" "); + graphics.addline(""); + graphics.addline(""); + graphics.textboxcenterx(); /* advancetext = true; hascontrol = false; state = 3; - dwgfx.createtextbox("To do: write quick", 50, 80, 164, 164, 255); - dwgfx.addline("intro to story!");*/ + graphics.createtextbox("To do: write quick", 50, 80, 164, 164, 255); + graphics.addline("intro to story!");*/ break; case 3021: state++; statedelay = 45; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox("", -1, 104, 174,175,174); + graphics.createtextbox("", -1, 104, 174,175,174); } else { - dwgfx.createtextbox("", -1, 64+8+16, 174,175,174); + graphics.createtextbox("", -1, 64+8+16, 174,175,174); } - dwgfx.addline(" You have rescued "); - dwgfx.addline(" a crew member! "); - dwgfx.addline(""); - dwgfx.textboxcenterx(); + graphics.addline(" You have rescued "); + graphics.addline(" a crew member! "); + graphics.addline(""); + graphics.textboxcenterx(); break; case 3022: state++; @@ -2496,60 +2496,60 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit if (temp == 1) { tempstring = " One remains "; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + graphics.createtextbox(tempstring, -1, 72, 174, 174, 174); } else { - dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); + graphics.createtextbox(tempstring, -1, 128+16, 174, 174, 174); } } else if (temp > 0) { tempstring = " " + help.number(temp) + " remain "; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + graphics.createtextbox(tempstring, -1, 72, 174, 174, 174); } else { - dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); + graphics.createtextbox(tempstring, -1, 128+16, 174, 174, 174); } } else { - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 72, 174, 174, 174); + graphics.createtextbox(" All Crew Members Rescued! ", -1, 72, 174, 174, 174); } else { - dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 128+16, 174, 174, 174); + graphics.createtextbox(" All Crew Members Rescued! ", -1, 128+16, 174, 174, 174); } } - dwgfx.textboxcenterx(); + graphics.textboxcenterx(); break; case 3023: state++; statedelay = 0; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(" Press ACTION to continue ", -1, 20, 164, 164, 255); + graphics.createtextbox(" Press ACTION to continue ", -1, 20, 164, 164, 255); } else { - dwgfx.createtextbox(" Press ACTION to continue ", -1, 196, 164, 164, 255); + graphics.createtextbox(" Press ACTION to continue ", -1, 196, 164, 164, 255); } - dwgfx.textboxcenterx(); + graphics.textboxcenterx(); break; case 3024: if (jumppressed) { state++; statedelay = 30; - dwgfx.textboxremove(); + graphics.textboxremove(); } break; case 3025: @@ -2559,48 +2559,48 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit case 3040: //Level complete! (Lab) - unlocknum(1, map, dwgfx); + unlocknum(1); lastsaved = 5; music.play(0); state++; statedelay = 75; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox("", -1, 180, 165, 165, 255); + graphics.createtextbox("", -1, 180, 165, 165, 255); } else { - dwgfx.createtextbox("", -1, 12, 165, 165, 255); + graphics.createtextbox("", -1, 12, 165, 165, 255); } - //dwgfx.addline(" Level Complete! "); - dwgfx.addline(" "); - dwgfx.addline(""); - dwgfx.addline(""); - dwgfx.textboxcenterx(); + //graphics.addline(" Level Complete! "); + graphics.addline(" "); + graphics.addline(""); + graphics.addline(""); + graphics.textboxcenterx(); /* advancetext = true; hascontrol = false; state = 3; - dwgfx.createtextbox("To do: write quick", 50, 80, 164, 164, 255); - dwgfx.addline("intro to story!");*/ + graphics.createtextbox("To do: write quick", 50, 80, 164, 164, 255); + graphics.addline("intro to story!");*/ break; case 3041: state++; statedelay = 45; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox("", -1, 104, 174,174,175); + graphics.createtextbox("", -1, 104, 174,174,175); } else { - dwgfx.createtextbox("", -1, 64+8+16, 174,174,175); + graphics.createtextbox("", -1, 64+8+16, 174,174,175); } - dwgfx.addline(" You have rescued "); - dwgfx.addline(" a crew member! "); - dwgfx.addline(""); - dwgfx.textboxcenterx(); + graphics.addline(" You have rescued "); + graphics.addline(" a crew member! "); + graphics.addline(""); + graphics.textboxcenterx(); break; case 3042: state++; @@ -2610,60 +2610,60 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit if (temp == 1) { tempstring = " One remains "; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + graphics.createtextbox(tempstring, -1, 72, 174, 174, 174); } else { - dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); + graphics.createtextbox(tempstring, -1, 128+16, 174, 174, 174); } } else if (temp > 0) { tempstring = " " + help.number(temp) + " remain "; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + graphics.createtextbox(tempstring, -1, 72, 174, 174, 174); } else { - dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); + graphics.createtextbox(tempstring, -1, 128+16, 174, 174, 174); } } else { - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 72, 174, 174, 174); + graphics.createtextbox(" All Crew Members Rescued! ", -1, 72, 174, 174, 174); } else { - dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 128+16, 174, 174, 174); + graphics.createtextbox(" All Crew Members Rescued! ", -1, 128+16, 174, 174, 174); } } - dwgfx.textboxcenterx(); + graphics.textboxcenterx(); break; case 3043: state++; statedelay = 0; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(" Press ACTION to continue ", -1, 20, 164, 164, 255); + graphics.createtextbox(" Press ACTION to continue ", -1, 20, 164, 164, 255); } else { - dwgfx.createtextbox(" Press ACTION to continue ", -1, 196, 164, 164, 255); + graphics.createtextbox(" Press ACTION to continue ", -1, 196, 164, 164, 255); } - dwgfx.textboxcenterx(); + graphics.textboxcenterx(); break; case 3044: if (jumppressed) { state++; statedelay = 30; - dwgfx.textboxremove(); + graphics.textboxremove(); } break; case 3045: @@ -2673,49 +2673,49 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit case 3050: //Level complete! (Space Station 1) - unlocknum(0, map, dwgfx); + unlocknum(0); lastsaved = 1; music.play(0); state++; statedelay = 75; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox("", -1, 180, 165, 165, 255); + graphics.createtextbox("", -1, 180, 165, 165, 255); } else { - dwgfx.createtextbox("", -1, 12, 165, 165, 255); + graphics.createtextbox("", -1, 12, 165, 165, 255); } - //dwgfx.addline(" Level Complete! "); - dwgfx.addline(" "); - dwgfx.addline(""); - dwgfx.addline(""); - dwgfx.textboxcenterx(); + //graphics.addline(" Level Complete! "); + graphics.addline(" "); + graphics.addline(""); + graphics.addline(""); + graphics.textboxcenterx(); /* advancetext = true; hascontrol = false; state = 3; - dwgfx.createtextbox("To do: write quick", 50, 80, 164, 164, 255); - dwgfx.addline("intro to story!");*/ + graphics.createtextbox("To do: write quick", 50, 80, 164, 164, 255); + graphics.addline("intro to story!");*/ break; case 3051: state++; statedelay = 45; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox("", -1, 104, 175,175,174); + graphics.createtextbox("", -1, 104, 175,175,174); } else { - dwgfx.createtextbox("", -1, 64+8+16, 175,175,174); + graphics.createtextbox("", -1, 64+8+16, 175,175,174); } - dwgfx.addline(" You have rescued "); - dwgfx.addline(" a crew member! "); - dwgfx.addline(""); - dwgfx.textboxcenterx(); + graphics.addline(" You have rescued "); + graphics.addline(" a crew member! "); + graphics.addline(""); + graphics.textboxcenterx(); break; case 3052: state++; @@ -2725,71 +2725,71 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit if (temp == 1) { tempstring = " One remains "; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + graphics.createtextbox(tempstring, -1, 72, 174, 174, 174); } else { - dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); + graphics.createtextbox(tempstring, -1, 128+16, 174, 174, 174); } } else if (temp > 0) { tempstring = " " + help.number(temp) + " remain "; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + graphics.createtextbox(tempstring, -1, 72, 174, 174, 174); } else { - dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); + graphics.createtextbox(tempstring, -1, 128+16, 174, 174, 174); } } else { - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 72, 174, 174, 174); + graphics.createtextbox(" All Crew Members Rescued! ", -1, 72, 174, 174, 174); } else { - dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 128+16, 174, 174, 174); + graphics.createtextbox(" All Crew Members Rescued! ", -1, 128+16, 174, 174, 174); } } - dwgfx.textboxcenterx(); + graphics.textboxcenterx(); break; case 3053: state++; statedelay = 0; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(" Press ACTION to continue ", -1, 20, 164, 164, 255); + graphics.createtextbox(" Press ACTION to continue ", -1, 20, 164, 164, 255); } else { - dwgfx.createtextbox(" Press ACTION to continue ", -1, 196, 164, 164, 255); + graphics.createtextbox(" Press ACTION to continue ", -1, 196, 164, 164, 255); } - dwgfx.textboxcenterx(); + graphics.textboxcenterx(); break; case 3054: if (jumppressed) { state++; statedelay = 30; - dwgfx.textboxremove(); + graphics.textboxremove(); crewstats[1] = 0; //Set violet's rescue script to 0 to make the next bit easier teleportscript = ""; } break; case 3055: - dwgfx.fademode = 2; + graphics.fademode = 2; state++; statedelay = 10; break; case 3056: - if(dwgfx.fademode==1) + if(graphics.fademode==1) { startscript = true; if (nocutscenes) @@ -2807,48 +2807,48 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit case 3060: //Level complete! (Tower) - unlocknum(2, map, dwgfx); + unlocknum(2); lastsaved = 3; music.play(0); state++; statedelay = 75; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox("", -1, 180, 165, 165, 255); + graphics.createtextbox("", -1, 180, 165, 165, 255); } else { - dwgfx.createtextbox("", -1, 12, 165, 165, 255); + graphics.createtextbox("", -1, 12, 165, 165, 255); } - //dwgfx.addline(" Level Complete! "); - dwgfx.addline(" "); - dwgfx.addline(""); - dwgfx.addline(""); - dwgfx.textboxcenterx(); + //graphics.addline(" Level Complete! "); + graphics.addline(" "); + graphics.addline(""); + graphics.addline(""); + graphics.textboxcenterx(); /* advancetext = true; hascontrol = false; state = 3; - dwgfx.createtextbox("To do: write quick", 50, 80, 164, 164, 255); - dwgfx.addline("intro to story!");*/ + graphics.createtextbox("To do: write quick", 50, 80, 164, 164, 255); + graphics.addline("intro to story!");*/ break; case 3061: state++; statedelay = 45; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox("", -1, 104, 175,174,175); + graphics.createtextbox("", -1, 104, 175,174,175); } else { - dwgfx.createtextbox("", -1, 64+8+16, 175,174,175); + graphics.createtextbox("", -1, 64+8+16, 175,174,175); } - dwgfx.addline(" You have rescued "); - dwgfx.addline(" a crew member! "); - dwgfx.addline(""); - dwgfx.textboxcenterx(); + graphics.addline(" You have rescued "); + graphics.addline(" a crew member! "); + graphics.addline(""); + graphics.textboxcenterx(); break; case 3062: state++; @@ -2858,60 +2858,60 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit if (temp == 1) { tempstring = " One remains "; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + graphics.createtextbox(tempstring, -1, 72, 174, 174, 174); } else { - dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); + graphics.createtextbox(tempstring, -1, 128+16, 174, 174, 174); } } else if (temp > 0) { tempstring = " " + help.number(temp) + " remain "; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + graphics.createtextbox(tempstring, -1, 72, 174, 174, 174); } else { - dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); + graphics.createtextbox(tempstring, -1, 128+16, 174, 174, 174); } } else { - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 72, 174, 174, 174); + graphics.createtextbox(" All Crew Members Rescued! ", -1, 72, 174, 174, 174); } else { - dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 128+16, 174, 174, 174); + graphics.createtextbox(" All Crew Members Rescued! ", -1, 128+16, 174, 174, 174); } } - dwgfx.textboxcenterx(); + graphics.textboxcenterx(); break; case 3063: state++; statedelay = 0; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(" Press ACTION to continue ", -1, 20, 164, 164, 255); + graphics.createtextbox(" Press ACTION to continue ", -1, 20, 164, 164, 255); } else { - dwgfx.createtextbox(" Press ACTION to continue ", -1, 196, 164, 164, 255); + graphics.createtextbox(" Press ACTION to continue ", -1, 196, 164, 164, 255); } - dwgfx.textboxcenterx(); + graphics.textboxcenterx(); break; case 3064: if (jumppressed) { state++; statedelay = 30; - dwgfx.textboxremove(); + graphics.textboxremove(); } break; case 3065: @@ -2921,11 +2921,11 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit case 3070: - dwgfx.fademode = 2; + graphics.fademode = 2; state++; break; case 3071: - if (dwgfx.fademode == 1) state++; + if (graphics.fademode == 1) state++; break; case 3072: //Ok, we need to adjust some flags based on who've we've rescued. Some of there conversation options @@ -3000,20 +3000,20 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit //returning from an intermission, very like 3070 if (inintermission) { - dwgfx.fademode = 2; + graphics.fademode = 2; companion = 0; state=3100; } else { - unlocknum(7, map, dwgfx); - dwgfx.fademode = 2; + unlocknum(7); + graphics.fademode = 2; companion = 0; state++; } break; case 3081: - if (dwgfx.fademode == 1) state++; + if (graphics.fademode == 1) state++; break; case 3082: map.finalmode = false; @@ -3030,21 +3030,21 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit companion = 0; supercrewmate = false; state++; - dwgfx.fademode = 2; + graphics.fademode = 2; music.fadeout(); state=3100; } else { - unlocknum(6, map, dwgfx); - dwgfx.fademode = 2; + unlocknum(6); + graphics.fademode = 2; companion = 0; supercrewmate = false; state++; } break; case 3086: - if (dwgfx.fademode == 1) state++; + if (graphics.fademode == 1) state++; break; case 3087: map.finalmode = false; @@ -3054,13 +3054,13 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit break; case 3100: - if(dwgfx.fademode == 1) state++; + if(graphics.fademode == 1) state++; break; case 3101: - dwgfx.flipmode = false; + graphics.flipmode = false; gamestate = 1; - dwgfx.fademode = 4; - dwgfx.backgrounddrawn = true; + graphics.fademode = 4; + graphics.backgrounddrawn = true; map.tdrawback = true; createmenu("play"); music.play(6); @@ -3077,17 +3077,17 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit help.toclipboard(recordstring); } test = true; teststring = recordstring; - dwgfx.createtextbox(" Congratulations! ", 50, 80, 164, 164, 255); - dwgfx.addline(""); - dwgfx.addline("Your play of this level has"); - dwgfx.addline("been copied to the clipboard."); - dwgfx.addline(""); - dwgfx.addline("Please consider pasting and"); - dwgfx.addline("sending it to me! Even if you"); - dwgfx.addline("made a lot of mistakes - knowing"); - dwgfx.addline("exactly where people are having"); - dwgfx.addline("trouble is extremely useful!"); - dwgfx.textboxcenter(); + graphics.createtextbox(" Congratulations! ", 50, 80, 164, 164, 255); + graphics.addline(""); + graphics.addline("Your play of this level has"); + graphics.addline("been copied to the clipboard."); + graphics.addline(""); + graphics.addline("Please consider pasting and"); + graphics.addline("sending it to me! Even if you"); + graphics.addline("made a lot of mistakes - knowing"); + graphics.addline("exactly where people are having"); + graphics.addline("trouble is extremely useful!"); + graphics.textboxcenter(); state = 0; break;*/ @@ -3100,53 +3100,53 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit case 3501: //Game complete! NETWORK_unlockAchievement("vvvvvvgamecomplete"); - unlocknum(5, map, dwgfx); + unlocknum(5); crewstats[0] = true; state++; statedelay = 75; music.play(7); - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox("", -1, 180, 164, 165, 255); + graphics.createtextbox("", -1, 180, 164, 165, 255); } else { - dwgfx.createtextbox("", -1, 12, 164, 165, 255); + graphics.createtextbox("", -1, 12, 164, 165, 255); } - dwgfx.addline(" "); - dwgfx.addline(""); - dwgfx.addline(""); - dwgfx.textboxcenterx(); + graphics.addline(" "); + graphics.addline(""); + graphics.addline(""); + graphics.textboxcenterx(); break; case 3502: state++; statedelay = 45+15; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 175-24, 0, 0, 0); + graphics.createtextbox(" All Crew Members Rescued! ", -1, 175-24, 0, 0, 0); } else { - dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 64, 0, 0, 0); + graphics.createtextbox(" All Crew Members Rescued! ", -1, 64, 0, 0, 0); } - savetime = timestring(help); + savetime = timestring(); break; case 3503: state++; statedelay = 45; tempstring = help.number(trinkets); - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox("Trinkets Found:", 48, 155-24, 0,0,0); - dwgfx.createtextbox(tempstring, 180, 155-24, 0, 0, 0); + graphics.createtextbox("Trinkets Found:", 48, 155-24, 0,0,0); + graphics.createtextbox(tempstring, 180, 155-24, 0, 0, 0); } else { - dwgfx.createtextbox("Trinkets Found:", 48, 84, 0,0,0); - dwgfx.createtextbox(tempstring, 180, 84, 0, 0, 0); + graphics.createtextbox("Trinkets Found:", 48, 84, 0,0,0); + graphics.createtextbox(tempstring, 180, 84, 0, 0, 0); } break; case 3504: @@ -3154,84 +3154,84 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit statedelay = 45+15; tempstring = savetime; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(" Game Time:", 64, 143-24, 0,0,0); - dwgfx.createtextbox(tempstring, 180, 143-24, 0, 0, 0); + graphics.createtextbox(" Game Time:", 64, 143-24, 0,0,0); + graphics.createtextbox(tempstring, 180, 143-24, 0, 0, 0); } else { - dwgfx.createtextbox(" Game Time:", 64, 96, 0,0,0); - dwgfx.createtextbox(tempstring, 180, 96, 0, 0, 0); + graphics.createtextbox(" Game Time:", 64, 96, 0,0,0); + graphics.createtextbox(tempstring, 180, 96, 0, 0, 0); } break; case 3505: state++; statedelay = 45; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(" Total Flips:", 64, 116-24, 0,0,0); - dwgfx.createtextbox(help.String(totalflips), 180, 116-24, 0, 0, 0); + graphics.createtextbox(" Total Flips:", 64, 116-24, 0,0,0); + graphics.createtextbox(help.String(totalflips), 180, 116-24, 0, 0, 0); } else { - dwgfx.createtextbox(" Total Flips:", 64, 123, 0,0,0); - dwgfx.createtextbox(help.String(totalflips), 180, 123, 0, 0, 0); + graphics.createtextbox(" Total Flips:", 64, 123, 0,0,0); + graphics.createtextbox(help.String(totalflips), 180, 123, 0, 0, 0); } break; case 3506: state++; statedelay = 45+15; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox("Total Deaths:", 64, 104-24, 0,0,0); - dwgfx.createtextbox(help.String(deathcounts), 180, 104-24, 0, 0, 0); + graphics.createtextbox("Total Deaths:", 64, 104-24, 0,0,0); + graphics.createtextbox(help.String(deathcounts), 180, 104-24, 0, 0, 0); } else { - dwgfx.createtextbox("Total Deaths:", 64, 135, 0,0,0); - dwgfx.createtextbox(help.String(deathcounts), 180, 135, 0, 0, 0); + graphics.createtextbox("Total Deaths:", 64, 135, 0,0,0); + graphics.createtextbox(help.String(deathcounts), 180, 135, 0, 0, 0); } break; case 3507: state++; statedelay = 45+15; - if (dwgfx.flipmode) + if (graphics.flipmode) { tempstring = "Hardest Room (with " + help.String(hardestroomdeaths) + " deaths)"; - dwgfx.createtextbox(tempstring, -1, 81-24, 0,0,0); - dwgfx.createtextbox(hardestroom, -1, 69-24, 0, 0, 0); + graphics.createtextbox(tempstring, -1, 81-24, 0,0,0); + graphics.createtextbox(hardestroom, -1, 69-24, 0, 0, 0); } else { tempstring = "Hardest Room (with " + help.String(hardestroomdeaths) + " deaths)"; - dwgfx.createtextbox(tempstring, -1, 158, 0,0,0); - dwgfx.createtextbox(hardestroom, -1, 170, 0, 0, 0); + graphics.createtextbox(tempstring, -1, 158, 0,0,0); + graphics.createtextbox(hardestroom, -1, 170, 0, 0, 0); } break; case 3508: state++; statedelay = 0; - if (dwgfx.flipmode) + if (graphics.flipmode) { - dwgfx.createtextbox(" Press ACTION to continue ", -1, 20, 164, 164, 255); + graphics.createtextbox(" Press ACTION to continue ", -1, 20, 164, 164, 255); } else { - dwgfx.createtextbox(" Press ACTION to continue ", -1, 196, 164, 164, 255); + graphics.createtextbox(" Press ACTION to continue ", -1, 196, 164, 164, 255); } - dwgfx.textboxcenterx(); + graphics.textboxcenterx(); break; case 3509: if (jumppressed) { state++; statedelay = 30; - dwgfx.textboxremove(); + graphics.textboxremove(); } break; case 3510: @@ -3271,7 +3271,7 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit } - savestats(map, dwgfx); + savestats(); if (nodeathmode) { NETWORK_unlockAchievement("vvvvvvmaster"); //bloody hell @@ -3335,18 +3335,18 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit statedelay = 60; break; case 3516: - dwgfx.fademode = 2; + graphics.fademode = 2; state++; break; case 3517: - if (dwgfx.fademode == 1) + if (graphics.fademode == 1) { state++; statedelay = 30; } break; case 3518: - dwgfx.fademode = 4; + graphics.fademode = 4; state = 0; statedelay = 30; //music.play(5); @@ -3360,7 +3360,7 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit map.finalx = 100; map.finaly = 100; - dwgfx.cutscenebarspos = 320; + graphics.cutscenebarspos = 320; teleport_to_new_area = true; teleportscript = "gamecomplete"; @@ -3371,17 +3371,17 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit hascontrol = false; crewstats[0] = true; - dwgfx.fademode = 2; + graphics.fademode = 2; state++; break; case 3521: - if(dwgfx.fademode == 1) state++; + if(graphics.fademode == 1) state++; break; case 3522: - dwgfx.flipmode = false; + graphics.flipmode = false; gamestate = 1; - dwgfx.fademode = 4; - dwgfx.backgrounddrawn = true; + graphics.fademode = 4; + graphics.backgrounddrawn = true; map.tdrawback = true; createmenu("nodeathmodecomplete"); state = 0; @@ -3506,7 +3506,7 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit } else { - savetele(map, obj, music); + savetele(); } i = obj.getteleporter(); activetele = true; @@ -4151,7 +4151,7 @@ void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, Utilit } } -void Game::gethardestroom( mapclass& map ) +void Game::gethardestroom() { if (currentroomdeaths > hardestroomdeaths) { @@ -4187,7 +4187,7 @@ void Game::gethardestroom( mapclass& map ) } } -void Game::deletestats( mapclass& map, Graphics& dwgfx ) +void Game::deletestats() { for (int i = 0; i < 25; i++) { @@ -4201,12 +4201,12 @@ void Game::deletestats( mapclass& map, Graphics& dwgfx ) bestlives[i] = -1; bestrank[i] = -1; } - dwgfx.setflipmode = false; + graphics.setflipmode = false; stat_trinkets = 0; - savestats(map, dwgfx); + savestats(); } -void Game::unlocknum( int t, mapclass& map, Graphics& dwgfx ) +void Game::unlocknum( int t ) { if (map.custommode) { @@ -4215,16 +4215,16 @@ void Game::unlocknum( int t, mapclass& map, Graphics& dwgfx ) } unlock[t] = true; - savestats(map, dwgfx); + savestats(); } -void Game::loadstats( mapclass& map, Graphics& dwgfx ) +void Game::loadstats() { // TODO loadstats TiXmlDocument doc; if (!FILESYSTEM_loadTiXmlDocument("saves/unlock.vvv", &doc)) { - savestats(map, dwgfx); + savestats(); printf("No Stats found. Assuming a new player\n"); } @@ -4390,7 +4390,7 @@ void Game::loadstats( mapclass& map, Graphics& dwgfx ) if (pKey == "setflipmode") { - dwgfx.setflipmode = atoi(pText); + graphics.setflipmode = atoi(pText); } if (pKey == "invincibility") @@ -4440,7 +4440,7 @@ void Game::loadstats( mapclass& map, Graphics& dwgfx ) if (pKey == "advanced_smoothing") { fullScreenEffect_badSignal = atoi(pText); - dwgfx.screenbuffer->badSignalEffect = fullScreenEffect_badSignal; + graphics.screenbuffer->badSignalEffect = fullScreenEffect_badSignal; } if (pKey == "usingmmmmmm") @@ -4459,17 +4459,17 @@ void Game::loadstats( mapclass& map, Graphics& dwgfx ) if (pKey == "notextoutline") { - dwgfx.notextoutline = atoi(pText); + graphics.notextoutline = atoi(pText); } if (pKey == "translucentroomname") { - dwgfx.translucentroomname = atoi(pText); + graphics.translucentroomname = atoi(pText); } if (pKey == "showmousecursor") { - dwgfx.showmousecursor = atoi(pText); + graphics.showmousecursor = atoi(pText); } if (pKey == "flipButton") @@ -4508,19 +4508,19 @@ void Game::loadstats( mapclass& map, Graphics& dwgfx ) if(fullscreen) { - dwgfx.screenbuffer->toggleFullScreen(); + graphics.screenbuffer->toggleFullScreen(); } for (int i = 0; i < stretchMode; i += 1) { - dwgfx.screenbuffer->toggleStretchMode(); + graphics.screenbuffer->toggleStretchMode(); } if (useLinearFilter) { - dwgfx.screenbuffer->toggleLinearFilter(); + graphics.screenbuffer->toggleLinearFilter(); } - dwgfx.screenbuffer->ResizeScreen(width, height); + graphics.screenbuffer->ResizeScreen(width, height); - if (dwgfx.showmousecursor == true) + if (graphics.showmousecursor == true) { SDL_ShowCursor(SDL_ENABLE); } @@ -4542,7 +4542,7 @@ void Game::loadstats( mapclass& map, Graphics& dwgfx ) } } -void Game::savestats( mapclass& _map, Graphics& _dwgfx ) +void Game::savestats() { TiXmlDocument doc; TiXmlElement* msg; @@ -4635,7 +4635,7 @@ void Game::savestats( mapclass& _map, Graphics& _dwgfx ) dataNode->LinkEndChild( msg ); int width, height; - _dwgfx.screenbuffer->GetWindowSize(&width, &height); + graphics.screenbuffer->GetWindowSize(&width, &height); msg = new TiXmlElement( "window_width" ); msg->LinkEndChild( new TiXmlText( tu.String(width).c_str())); dataNode->LinkEndChild( msg ); @@ -4652,11 +4652,11 @@ void Game::savestats( mapclass& _map, Graphics& _dwgfx ) dataNode->LinkEndChild( msg ); msg = new TiXmlElement( "setflipmode" ); - msg->LinkEndChild( new TiXmlText( tu.String(_dwgfx.setflipmode).c_str())); + msg->LinkEndChild( new TiXmlText( tu.String(graphics.setflipmode).c_str())); dataNode->LinkEndChild( msg ); msg = new TiXmlElement( "invincibility" ); - msg->LinkEndChild( new TiXmlText( tu.String(_map.invincibility).c_str())); + msg->LinkEndChild( new TiXmlText( tu.String(map.invincibility).c_str())); dataNode->LinkEndChild( msg ); msg = new TiXmlElement( "slowdown" ); @@ -4690,15 +4690,15 @@ void Game::savestats( mapclass& _map, Graphics& _dwgfx ) dataNode->LinkEndChild(msg); msg = new TiXmlElement("notextoutline"); - msg->LinkEndChild(new TiXmlText(tu.String((int) _dwgfx.notextoutline).c_str())); + msg->LinkEndChild(new TiXmlText(tu.String((int) graphics.notextoutline).c_str())); dataNode->LinkEndChild(msg); msg = new TiXmlElement("translucentroomname"); - msg->LinkEndChild(new TiXmlText(tu.String((int) _dwgfx.translucentroomname).c_str())); + msg->LinkEndChild(new TiXmlText(tu.String((int) graphics.translucentroomname).c_str())); dataNode->LinkEndChild(msg); msg = new TiXmlElement("showmousecursor"); - msg->LinkEndChild(new TiXmlText(tu.String((int)_dwgfx.showmousecursor).c_str())); + msg->LinkEndChild(new TiXmlText(tu.String((int)graphics.showmousecursor).c_str())); dataNode->LinkEndChild(msg); for (size_t i = 0; i < controllerButton_flip.size(); i += 1) @@ -4727,7 +4727,7 @@ void Game::savestats( mapclass& _map, Graphics& _dwgfx ) FILESYSTEM_saveTiXmlDocument("saves/unlock.vvv", &doc); } -void Game::customstart( entityclass& obj, musicclass& music ) +void Game::customstart() { jumpheld = true; @@ -4755,7 +4755,7 @@ void Game::customstart( entityclass& obj, musicclass& music ) //if (!nocutscenes) music.play(5); } -void Game::start( entityclass& obj, musicclass& music ) +void Game::start() { jumpheld = true; @@ -4782,7 +4782,7 @@ void Game::start( entityclass& obj, musicclass& music ) if (!nocutscenes) music.play(5); } -void Game::deathsequence( mapclass& map, entityclass& obj, musicclass& music ) +void Game::deathsequence() { int i; if (supercrewmate && scmhurt) @@ -4833,7 +4833,7 @@ void Game::deathsequence( mapclass& map, entityclass& obj, musicclass& music ) } } -void Game::startspecial( int t, entityclass& obj, musicclass& music ) +void Game::startspecial( int t ) { jumpheld = true; @@ -4874,7 +4874,7 @@ void Game::startspecial( int t, entityclass& obj, musicclass& music ) lifeseq = 0; } -void Game::starttrial( int t, entityclass& obj, musicclass& music ) +void Game::starttrial( int t ) { jumpheld = true; @@ -4950,7 +4950,7 @@ void Game::starttrial( int t, entityclass& obj, musicclass& music ) lifeseq = 0; } -void Game::loadquick( mapclass& map, entityclass& obj, musicclass& music ) +void Game::loadquick() { TiXmlDocument doc; if (!FILESYSTEM_loadTiXmlDocument("saves/qsave.vvv", &doc)) return; @@ -5171,7 +5171,7 @@ void Game::loadquick( mapclass& map, entityclass& obj, musicclass& music ) } -void Game::customloadquick(std::string savfile, mapclass& map, entityclass& obj, musicclass& music ) +void Game::customloadquick(std::string savfile) { std::string levelfile = savfile.substr(7); TiXmlDocument doc; @@ -5429,7 +5429,7 @@ void Game::customloadquick(std::string savfile, mapclass& map, entityclass& obj, } //TODO load summary -void Game::loadsummary( mapclass& map, UtilityClass& help ) +void Game::loadsummary() { //quickcookie = SharedObject.getLocal("dwvvvvvv_quick"); //telecookie = SharedObject.getLocal("dwvvvvvv_tele"); @@ -5545,7 +5545,7 @@ void Game::loadsummary( mapclass& map, UtilityClass& help ) } } - tele_gametime = giventimestring(l_hours,l_minute, l_second,help); + tele_gametime = giventimestring(l_hours,l_minute, l_second); tele_currentarea = map.currentarea(map.area(l_saveX, l_saveY)); } @@ -5637,7 +5637,7 @@ void Game::loadsummary( mapclass& map, UtilityClass& help ) } - quick_gametime = giventimestring(l_hours,l_minute, l_second,help); + quick_gametime = giventimestring(l_hours,l_minute, l_second); quick_currentarea = map.currentarea(map.area(l_saveX, l_saveY)); } @@ -5645,7 +5645,7 @@ void Game::loadsummary( mapclass& map, UtilityClass& help ) } -void Game::initteleportermode( mapclass& map ) +void Game::initteleportermode() { //Set the teleporter variable to the right position! teleport_to_teleporter = 0; @@ -5659,7 +5659,7 @@ void Game::initteleportermode( mapclass& map ) } } -void Game::savetele( mapclass& map, entityclass& obj, musicclass& music ) +void Game::savetele() { //TODO make this code a bit cleaner. @@ -5891,8 +5891,7 @@ void Game::savetele( mapclass& map, entityclass& obj, musicclass& music ) msg = new TiXmlElement( "summary" ); - UtilityClass tempUtil; - std::string summary = savearea + ", " + timestring(tempUtil); + std::string summary = savearea + ", " + timestring(); msg->LinkEndChild( new TiXmlText( summary.c_str() )); msgs->LinkEndChild( msg ); @@ -5912,7 +5911,7 @@ void Game::savetele( mapclass& map, entityclass& obj, musicclass& music ) } -void Game::savequick( mapclass& map, entityclass& obj, musicclass& music ) +void Game::savequick() { quickcookieexists = true; @@ -6141,8 +6140,7 @@ void Game::savequick( mapclass& map, entityclass& obj, musicclass& music ) msgs->LinkEndChild( msg ); msg = new TiXmlElement( "summary" ); - UtilityClass tempUtil; - std::string summary = savearea + ", " + timestring(tempUtil); + std::string summary = savearea + ", " + timestring(); msg->LinkEndChild( new TiXmlText( summary.c_str() )); msgs->LinkEndChild( msg ); @@ -6162,7 +6160,7 @@ void Game::savequick( mapclass& map, entityclass& obj, musicclass& music ) } -void Game::customsavequick(std::string savfile, mapclass& map, entityclass& obj, musicclass& music ) +void Game::customsavequick(std::string savfile) { quickcookieexists = true; @@ -6401,8 +6399,7 @@ void Game::customsavequick(std::string savfile, mapclass& map, entityclass& obj, msgs->LinkEndChild( msg ); msg = new TiXmlElement( "summary" ); - UtilityClass tempUtil; - std::string summary = savearea + ", " + timestring(tempUtil); + std::string summary = savearea + ", " + timestring(); msg->LinkEndChild( new TiXmlText( summary.c_str() )); msgs->LinkEndChild( msg ); @@ -6423,7 +6420,7 @@ void Game::customsavequick(std::string savfile, mapclass& map, entityclass& obj, } -void Game::loadtele( mapclass& map, entityclass& obj, musicclass& music ) +void Game::loadtele() { TiXmlDocument doc; if (!FILESYSTEM_loadTiXmlDocument("saves/tsave.vvv", &doc)) return; @@ -6700,7 +6697,7 @@ teststring = os.str(); } } -std::string Game::giventimestring( int hrs, int min, int sec, UtilityClass& help ) +std::string Game::giventimestring( int hrs, int min, int sec ) { tempstring = ""; if (hrs > 0) @@ -6711,7 +6708,7 @@ std::string Game::giventimestring( int hrs, int min, int sec, UtilityClass& help return tempstring; } -std::string Game::timestring( UtilityClass& help ) +std::string Game::timestring() { tempstring = ""; if (hours > 0) @@ -6722,7 +6719,7 @@ std::string Game::timestring( UtilityClass& help ) return tempstring; } -std::string Game::partimestring( UtilityClass& help ) +std::string Game::partimestring() { //given par time in seconds: tempstring = ""; @@ -6737,7 +6734,7 @@ std::string Game::partimestring( UtilityClass& help ) return tempstring; } -std::string Game::resulttimestring( UtilityClass& help ) +std::string Game::resulttimestring() { //given result time in seconds: tempstring = ""; @@ -6753,7 +6750,7 @@ std::string Game::resulttimestring( UtilityClass& help ) return tempstring; } -std::string Game::timetstring( int t, UtilityClass& help ) +std::string Game::timetstring( int t ) { //given par time in seconds: tempstring = ""; diff --git a/desktop_version/src/Game.h b/desktop_version/src/Game.h index 7468feb4..7f95e907 100644 --- a/desktop_version/src/Game.h +++ b/desktop_version/src/Game.h @@ -9,11 +9,6 @@ #include "GraphicsUtil.h" -class entityclass; -class mapclass; -class Graphics; -class musicclass; - class Game { public: @@ -37,52 +32,52 @@ public: void resetgameclock(); - void customsavequick(std::string savfile, mapclass& map, entityclass& obj, musicclass& music); - void savequick(mapclass& map, entityclass& obj, musicclass& music); + void customsavequick(std::string savfile); + void savequick(); void gameclock(); - std::string giventimestring(int hrs, int min, int sec, UtilityClass& help ); + std::string giventimestring(int hrs, int min, int sec); - std::string timestring(UtilityClass& help); + std::string timestring(); - std::string partimestring(UtilityClass& help); + std::string partimestring(); - std::string resulttimestring(UtilityClass& help); + std::string resulttimestring(); - std::string timetstring(int t, UtilityClass& help); + std::string timetstring(int t); void createmenu(std::string t); - void lifesequence(entityclass& obj); + void lifesequence(); - void gethardestroom(mapclass& map); + void gethardestroom(); - void updatestate(Graphics& dwgfx, mapclass& map, entityclass& obj, UtilityClass& help, musicclass& music); + void updatestate(); - void unlocknum(int t, mapclass& map, Graphics& dwgfx); + void unlocknum(int t); - void loadstats(mapclass& map, Graphics& dwgfx); + void loadstats(); - void savestats(mapclass& map, Graphics& dwgfx); + void savestats(); - void deletestats(mapclass& map, Graphics& dwgfx); + void deletestats(); void deletequick(); - void savetele(mapclass& map, entityclass& obj, musicclass& music); + void savetele(); - void loadtele(mapclass& map, entityclass& obj, musicclass& music); + void loadtele(); void deletetele(); - void customstart(entityclass& obj, musicclass& music ); + void customstart(); - void start(entityclass& obj, musicclass& music ); + void start(); - void startspecial(int t, entityclass& obj, musicclass& music); + void startspecial(int t); - void starttrial(int t, entityclass& obj, musicclass& music); + void starttrial(int t); void telegotoship() { @@ -104,14 +99,14 @@ public: void swnpenalty(); - void deathsequence(mapclass& map, entityclass& obj, musicclass& music); + void deathsequence(); - void customloadquick(std::string savfile, mapclass& map, entityclass& obj, musicclass& music); - void loadquick(mapclass& map, entityclass& obj, musicclass& music); + void customloadquick(std::string savfile); + void loadquick(); - void loadsummary(mapclass& map, UtilityClass& help); + void loadsummary(); - void initteleportermode(mapclass& map); + void initteleportermode(); std::string saveFilePath; diff --git a/desktop_version/src/Graphics.h b/desktop_version/src/Graphics.h index 22fbe0bd..d9978066 100644 --- a/desktop_version/src/Graphics.h +++ b/desktop_version/src/Graphics.h @@ -19,7 +19,8 @@ #include "GraphicsUtil.h" #include "Screen.h" -class map; +class mapclass; +class entityclass; class Graphics { diff --git a/desktop_version/src/Input.cpp b/desktop_version/src/Input.cpp index 3d1a4506..cf8b9988 100644 --- a/desktop_version/src/Input.cpp +++ b/desktop_version/src/Input.cpp @@ -511,7 +511,7 @@ SDL_assert(0 && "Remove open level dir"); dwgfx.screenbuffer->toggleFullScreen(); game.fullscreen = !game.fullscreen; updategraphicsmode(game, dwgfx); - game.savestats(map, dwgfx); + game.savestats(); game.createmenu("graphicoptions"); game.currentmenuoption = 0; }else if (game.currentmenuoption == 1){ @@ -519,7 +519,7 @@ SDL_assert(0 && "Remove open level dir"); dwgfx.screenbuffer->toggleStretchMode(); game.stretchMode = (game.stretchMode + 1) % 3; updategraphicsmode(game, dwgfx); - game.savestats(map, dwgfx); + game.savestats(); game.createmenu("graphicoptions"); game.currentmenuoption = 1; }else if (game.currentmenuoption == 2){ @@ -527,7 +527,7 @@ SDL_assert(0 && "Remove open level dir"); dwgfx.screenbuffer->toggleLinearFilter(); game.useLinearFilter = !game.useLinearFilter; updategraphicsmode(game, dwgfx); - game.savestats(map, dwgfx); + game.savestats(); game.createmenu("graphicoptions"); game.currentmenuoption = 2; }else if (game.currentmenuoption == 3){ @@ -537,7 +537,7 @@ SDL_assert(0 && "Remove open level dir"); //Hook the analogue thing in here: ABCDEFG updategraphicsmode(game, dwgfx); dwgfx.screenbuffer->badSignalEffect= !dwgfx.screenbuffer->badSignalEffect; - game.savestats(map, dwgfx); + game.savestats(); game.createmenu("graphicoptions"); game.currentmenuoption = 3; }else if (game.currentmenuoption == 4) { @@ -577,7 +577,7 @@ SDL_assert(0 && "Remove open level dir"); game.fullscreen = true; } updategraphicsmode(game, dwgfx); - game.savestats(map, dwgfx); + game.savestats(); game.createmenu("graphicoptions"); } else if (game.currentmenuoption == 1) @@ -593,7 +593,7 @@ SDL_assert(0 && "Remove open level dir"); } updategraphicsmode(game, dwgfx); - game.savestats(map, dwgfx); + game.savestats(); game.createmenu("graphicoptions"); game.currentmenuoption = 1; } @@ -606,7 +606,7 @@ SDL_assert(0 && "Remove open level dir"); dwgfx.screenbuffer->SetScale(game.advanced_scaling); updategraphicsmode(game, dwgfx); - game.savestats(map, dwgfx); + game.savestats(); game.createmenu("graphicoptions"); game.currentmenuoption = 2; } @@ -617,7 +617,7 @@ SDL_assert(0 && "Remove open level dir"); game.advanced_smoothing = !game.advanced_smoothing; updategraphicsmode(game, dwgfx); - game.savestats(map, dwgfx); + game.savestats(); game.createmenu("graphicoptions"); game.currentmenuoption = 3; } @@ -646,7 +646,7 @@ SDL_assert(0 && "Remove open level dir"); } updategraphicsmode(game, dwgfx); - game.savestats(map, dwgfx); + game.savestats(); game.createmenu("graphicoptions"); } else if (game.currentmenuoption == 1) @@ -662,7 +662,7 @@ SDL_assert(0 && "Remove open level dir"); } updategraphicsmode(game, dwgfx); - game.savestats(map, dwgfx); + game.savestats(); game.createmenu("graphicoptions"); game.currentmenuoption = 1; } @@ -707,7 +707,7 @@ SDL_assert(0 && "Remove open level dir"); map.invincibility = !map.invincibility; //game.deletequick(); //game.deletetele(); - game.savestats(map, dwgfx); + game.savestats(); music.playef(11, 10); game.createmenu("accessibility"); game.currentmenuoption = 3; @@ -741,7 +741,7 @@ SDL_assert(0 && "Remove open level dir"); //back game.gameframerate=34; game.slowdown = 30; - game.savestats(map, dwgfx); + game.savestats(); music.playef(11, 10); game.createmenu("accessibility"); game.currentmenuoption = 4; @@ -751,7 +751,7 @@ SDL_assert(0 && "Remove open level dir"); { game.gameframerate=41; game.slowdown = 24; - game.savestats(map, dwgfx); + game.savestats(); music.playef(11, 10); game.createmenu("accessibility"); game.currentmenuoption = 4; @@ -761,7 +761,7 @@ SDL_assert(0 && "Remove open level dir"); { game.gameframerate=55; game.slowdown = 18; - game.savestats(map, dwgfx); + game.savestats(); music.playef(11, 10); game.createmenu("accessibility"); game.currentmenuoption = 4; @@ -771,7 +771,7 @@ SDL_assert(0 && "Remove open level dir"); { game.gameframerate=83; game.slowdown = 12; - game.savestats(map, dwgfx); + game.savestats(); music.playef(11, 10); game.createmenu("accessibility"); game.currentmenuoption = 4; @@ -784,7 +784,7 @@ SDL_assert(0 && "Remove open level dir"); { //disable animated backgrounds game.colourblindmode = !game.colourblindmode; - game.savestats(map, dwgfx); + game.savestats(); map.tdrawback = true; music.playef(11, 10); } @@ -792,7 +792,7 @@ SDL_assert(0 && "Remove open level dir"); { //disable screeneffects game.noflashingmode = !game.noflashingmode; - game.savestats(map, dwgfx); + game.savestats(); if (!game.noflashingmode) { music.playef(18, 10); @@ -806,7 +806,7 @@ SDL_assert(0 && "Remove open level dir"); { //disable text outline dwgfx.notextoutline = !dwgfx.notextoutline; - game.savestats(map, dwgfx); + game.savestats(); music.playef(11, 10); } else if (game.currentmenuoption == 3) @@ -912,7 +912,7 @@ SDL_assert(0 && "Remove open level dir"); music.usingmmmmmm = !music.usingmmmmmm; music.playef(11, 10); music.play(6); - game.savestats(map, dwgfx); + game.savestats(); game.createmenu("mainmenu"); map.nexttowercolour(); } @@ -975,7 +975,7 @@ SDL_assert(0 && "Remove open level dir"); music.usingmmmmmm = !music.usingmmmmmm; music.playef(11, 10); music.play(6); - game.savestats(map, dwgfx); + game.savestats(); game.createmenu("mainmenu"); map.nexttowercolour(); } @@ -1004,7 +1004,7 @@ SDL_assert(0 && "Remove open level dir"); game.unlock[9] = true; game.unlocknotify[9] = true; music.playef(11, 10); - game.savestats(map, dwgfx); + game.savestats(); game.createmenu("unlockmenutrials"); game.currentmenuoption = 0; } @@ -1013,7 +1013,7 @@ SDL_assert(0 && "Remove open level dir"); game.unlock[10] = true; game.unlocknotify[10] = true; music.playef(11, 10); - game.savestats(map, dwgfx); + game.savestats(); game.createmenu("unlockmenutrials"); game.currentmenuoption = 1; } @@ -1022,7 +1022,7 @@ SDL_assert(0 && "Remove open level dir"); game.unlock[11] = true; game.unlocknotify[11] = true; music.playef(11, 10); - game.savestats(map, dwgfx); + game.savestats(); game.createmenu("unlockmenutrials"); game.currentmenuoption = 2; } @@ -1031,7 +1031,7 @@ SDL_assert(0 && "Remove open level dir"); game.unlock[12] = true; game.unlocknotify[12] = true; music.playef(11, 10); - game.savestats(map, dwgfx); + game.savestats(); game.createmenu("unlockmenutrials"); game.currentmenuoption = 3; } @@ -1040,7 +1040,7 @@ SDL_assert(0 && "Remove open level dir"); game.unlock[13] = true; game.unlocknotify[13] = true; music.playef(11, 10); - game.savestats(map, dwgfx); + game.savestats(); game.createmenu("unlockmenutrials"); game.currentmenuoption = 4; } @@ -1049,7 +1049,7 @@ SDL_assert(0 && "Remove open level dir"); game.unlock[14] = true; game.unlocknotify[14] = true; music.playef(11, 10); - game.savestats(map, dwgfx); + game.savestats(); game.createmenu("unlockmenutrials"); game.currentmenuoption = 5; } @@ -1078,7 +1078,7 @@ SDL_assert(0 && "Remove open level dir"); game.unlocknotify[16] = true; game.unlock[6] = true; game.unlock[7] = true; - game.savestats(map, dwgfx); + game.savestats(); game.createmenu("unlockmenu"); game.currentmenuoption = 1; } @@ -1088,7 +1088,7 @@ SDL_assert(0 && "Remove open level dir"); music.playef(11, 10); game.unlock[17] = true; game.unlocknotify[17] = true; - game.savestats(map, dwgfx); + game.savestats(); game.createmenu("unlockmenu"); game.currentmenuoption = 2; } @@ -1098,7 +1098,7 @@ SDL_assert(0 && "Remove open level dir"); music.playef(11, 10); game.unlock[18] = true; game.unlocknotify[18] = true; - game.savestats(map, dwgfx); + game.savestats(); game.createmenu("unlockmenu"); game.currentmenuoption = 3; } @@ -1107,7 +1107,7 @@ SDL_assert(0 && "Remove open level dir"); //unlock jukebox music.playef(11, 10); game.stat_trinkets = 20; - game.savestats(map, dwgfx); + game.savestats(); game.createmenu("unlockmenu"); game.currentmenuoption = 4; } @@ -1117,7 +1117,7 @@ SDL_assert(0 && "Remove open level dir"); music.playef(11, 10); game.unlock[8] = true; game.unlocknotify[8] = true; - game.savestats(map, dwgfx); + game.savestats(); game.createmenu("unlockmenu"); game.currentmenuoption = 5; } @@ -1313,7 +1313,7 @@ SDL_assert(0 && "Remove open level dir"); { //go to a menu! music.playef(11, 10); - game.loadsummary(map, help); //Prepare save slots to display + game.loadsummary(); //Prepare save slots to display game.createmenu("continue"); map.settowercolour(3); } @@ -1363,7 +1363,7 @@ SDL_assert(0 && "Remove open level dir"); { //go to a menu! music.playef(11, 10); - game.loadsummary(map, help); //Prepare save slots to display + game.loadsummary(); //Prepare save slots to display game.createmenu("continue"); map.settowercolour(3); } @@ -1486,7 +1486,7 @@ SDL_assert(0 && "Remove open level dir"); music.playef(23, 10); game.deletequick(); game.deletetele(); - game.deletestats(map, dwgfx); + game.deletestats(); game.flashlight = 5; game.screenshake = 15; game.createmenu("mainmenu"); @@ -2071,7 +2071,7 @@ void gameinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, dwgfx.resumegamemode = false; game.useteleporter = true; - game.initteleportermode(map); + game.initteleportermode(); } else { @@ -2403,7 +2403,7 @@ void mapinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, music.playef(18, 10); game.gamesaved = true; - game.savetime = game.timestring(help); + game.savetime = game.timestring(); game.savearea = map.currentarea(map.area(game.roomx, game.roomy)); game.savetrinkets = game.trinkets; @@ -2412,12 +2412,12 @@ void mapinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, #if !defined(NO_CUSTOM_LEVELS) if(map.custommodeforreal) { - game.customsavequick(ed.ListOfMetaData[game.playcustomlevel].filename, map, obj, music); + game.customsavequick(ed.ListOfMetaData[game.playcustomlevel].filename); } else #endif { - game.savequick(map, obj, music); + game.savequick(); } } diff --git a/desktop_version/src/Logic.cpp b/desktop_version/src/Logic.cpp index eefff6b5..35771fae 100644 --- a/desktop_version/src/Logic.cpp +++ b/desktop_version/src/Logic.cpp @@ -114,7 +114,7 @@ void gamecompletelogic2(Graphics& dwgfx, Game& game, entityclass& obj, musiccla game.deletequick(); int tmp=music.currentsong; music.currentsong=4; - game.savetele(map,obj,music); + game.savetele(); music.currentsong=tmp; game.telegotoship(); //Return to game @@ -254,7 +254,7 @@ void towerlogic(Graphics& dwgfx, Game& game, entityclass& obj, musicclass& musi { if (map.resumedelay <= 0) { - game.lifesequence(obj); + game.lifesequence(); if (game.lifeseq == 0) map.cameramode = 1; } else @@ -268,14 +268,14 @@ void towerlogic(Graphics& dwgfx, Game& game, entityclass& obj, musicclass& musi { map.colsuperstate = 1; map.cameramode = 2; - game.deathsequence(map, obj, music); + game.deathsequence(); game.deathseq--; if (game.deathseq <= 0) { if (game.nodeathmode) { game.deathseq = 1; - game.gethardestroom(map); + game.gethardestroom(); //start depressing sequence here... if (game.gameoverdelay <= -10 && dwgfx.fademode==0) dwgfx.fademode = 2; if (dwgfx.fademode == 1) script.resetgametomenu(dwgfx, game, map, obj, help, music); @@ -297,7 +297,7 @@ void towerlogic(Graphics& dwgfx, Game& game, entityclass& obj, musicclass& musi else { //State machine for game logic - game.updatestate(dwgfx, map, obj, help, music); + game.updatestate(); //Time trial stuff @@ -571,7 +571,7 @@ void gamelogic(Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music obj.upset = 0; } - game.lifesequence(obj); + game.lifesequence(); if (game.deathseq != -1) @@ -647,14 +647,14 @@ void gamelogic(Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music } } - game.deathsequence(map, obj, music); + game.deathsequence(); game.deathseq--; if (game.deathseq <= 0) { if (game.nodeathmode) { game.deathseq = 1; - game.gethardestroom(map); + game.gethardestroom(); //start depressing sequence here... if (game.gameoverdelay <= -10 && dwgfx.fademode==0) dwgfx.fademode = 2; if (dwgfx.fademode == 1) script.resetgametomenu(dwgfx, game, map, obj, help, music); @@ -672,7 +672,7 @@ void gamelogic(Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music } } - game.gethardestroom(map); + game.gethardestroom(); game.hascontrol = true; @@ -715,7 +715,7 @@ void gamelogic(Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music } } //State machine for game logic - game.updatestate(dwgfx, map, obj, help, music); + game.updatestate(); if (game.startscript) { script.load(game.newscript); diff --git a/desktop_version/src/Script.cpp b/desktop_version/src/Script.cpp index ac14e83c..6dbfbce2 100644 --- a/desktop_version/src/Script.cpp +++ b/desktop_version/src/Script.cpp @@ -1987,7 +1987,7 @@ void scriptclass::run( KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, } else if (words[0] == "telesave") { - if (!game.intimetrial && !game.nodeathmode && !game.inintermission) game.savetele(map, obj, music); + if (!game.intimetrial && !game.nodeathmode && !game.inintermission) game.savetele(); } else if (words[0] == "createlastrescued") { @@ -2548,7 +2548,7 @@ void scriptclass::startgamemode( int t, KeyPoll& key, Graphics& dwgfx, Game& gam case 0: //Normal new game game.gamestate = GAMEMODE; hardreset(key, dwgfx, game, map, obj, help, music); - game.start(obj, music); + game.start(); game.jumpheld = true; dwgfx.showcutscenebars = true; dwgfx.cutscenebarspos = 320; @@ -2571,8 +2571,8 @@ void scriptclass::startgamemode( int t, KeyPoll& key, Graphics& dwgfx, Game& gam case 1: game.gamestate = GAMEMODE; hardreset(key, dwgfx, game, map, obj, help, music); - game.start(obj, music); - game.loadtele(map, obj, music); + game.start(); + game.loadtele(); game.gravitycontrol = game.savegc; game.jumpheld = true; @@ -2593,8 +2593,8 @@ void scriptclass::startgamemode( int t, KeyPoll& key, Graphics& dwgfx, Game& gam case 2: //Load Quicksave game.gamestate = GAMEMODE; hardreset(key, dwgfx, game, map, obj, help, music); - game.start(obj, music); - game.loadquick(map, obj, music); + game.start(); + game.loadquick(); game.gravitycontrol = game.savegc; game.jumpheld = true; @@ -2636,7 +2636,7 @@ void scriptclass::startgamemode( int t, KeyPoll& key, Graphics& dwgfx, Game& gam music.fadeout(); game.gamestate = GAMEMODE; - game.starttrial(game.timetriallevel, obj, music); + game.starttrial(game.timetriallevel); game.jumpheld = true; if (dwgfx.setflipmode) dwgfx.flipmode = true;//set flipmode @@ -2664,7 +2664,7 @@ void scriptclass::startgamemode( int t, KeyPoll& key, Graphics& dwgfx, Game& gam music.fadeout(); game.gamestate = GAMEMODE; - game.starttrial(game.timetriallevel, obj, music); + game.starttrial(game.timetriallevel); game.jumpheld = true; if (dwgfx.setflipmode) dwgfx.flipmode = true;//set flipmode @@ -2692,7 +2692,7 @@ void scriptclass::startgamemode( int t, KeyPoll& key, Graphics& dwgfx, Game& gam music.fadeout(); game.gamestate = GAMEMODE; - game.starttrial(game.timetriallevel, obj, music); + game.starttrial(game.timetriallevel); game.jumpheld = true; if (dwgfx.setflipmode) dwgfx.flipmode = true;//set flipmode @@ -2720,7 +2720,7 @@ void scriptclass::startgamemode( int t, KeyPoll& key, Graphics& dwgfx, Game& gam music.fadeout(); game.gamestate = GAMEMODE; - game.starttrial(game.timetriallevel, obj, music); + game.starttrial(game.timetriallevel); game.jumpheld = true; if (dwgfx.setflipmode) dwgfx.flipmode = true;//set flipmode @@ -2748,7 +2748,7 @@ void scriptclass::startgamemode( int t, KeyPoll& key, Graphics& dwgfx, Game& gam music.fadeout(); game.gamestate = GAMEMODE; - game.starttrial(game.timetriallevel, obj, music); + game.starttrial(game.timetriallevel); game.jumpheld = true; if (dwgfx.setflipmode) dwgfx.flipmode = true;//set flipmode @@ -2782,7 +2782,7 @@ void scriptclass::startgamemode( int t, KeyPoll& key, Graphics& dwgfx, Game& gam map.final_mapcol = 0; map.final_colorframe = 0; game.gamestate = GAMEMODE; - game.starttrial(game.timetriallevel, obj, music); + game.starttrial(game.timetriallevel); game.jumpheld = true; if (dwgfx.setflipmode) dwgfx.flipmode = true;//set flipmode @@ -2801,11 +2801,11 @@ void scriptclass::startgamemode( int t, KeyPoll& key, Graphics& dwgfx, Game& gam game.gamestate = GAMEMODE; hardreset(key, dwgfx, game, map, obj, help, music); game.nodeathmode = true; - game.start(obj, music); + game.start(); game.jumpheld = true; dwgfx.showcutscenebars = true; dwgfx.cutscenebarspos = 320; - //game.starttest(obj, music); + //game.starttest(); //music.play(4); //set flipmode @@ -2830,11 +2830,11 @@ void scriptclass::startgamemode( int t, KeyPoll& key, Graphics& dwgfx, Game& gam game.nodeathmode = true; game.nocutscenes = true; - game.start(obj, music); + game.start(); game.jumpheld = true; dwgfx.showcutscenebars = true; dwgfx.cutscenebarspos = 320; - //game.starttest(obj, music); + //game.starttest(); //music.play(4); //set flipmode @@ -2857,7 +2857,7 @@ void scriptclass::startgamemode( int t, KeyPoll& key, Graphics& dwgfx, Game& gam game.gamestate = GAMEMODE; hardreset(key, dwgfx, game, map, obj, help, music); - game.startspecial(0, obj, music); + game.startspecial(0); game.jumpheld = true; //Secret lab, so reveal the map, give them all 20 trinkets @@ -2906,7 +2906,7 @@ void scriptclass::startgamemode( int t, KeyPoll& key, Graphics& dwgfx, Game& gam map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; - game.startspecial(1, obj, music); + game.startspecial(1); game.jumpheld = true; //set flipmode @@ -2941,7 +2941,7 @@ void scriptclass::startgamemode( int t, KeyPoll& key, Graphics& dwgfx, Game& gam map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; - game.startspecial(1, obj, music); + game.startspecial(1); game.jumpheld = true; //set flipmode @@ -2976,7 +2976,7 @@ void scriptclass::startgamemode( int t, KeyPoll& key, Graphics& dwgfx, Game& gam map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; - game.startspecial(1, obj, music); + game.startspecial(1); game.jumpheld = true; //set flipmode @@ -3011,7 +3011,7 @@ void scriptclass::startgamemode( int t, KeyPoll& key, Graphics& dwgfx, Game& gam map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; - game.startspecial(1, obj, music); + game.startspecial(1); game.jumpheld = true; //set flipmode @@ -3043,7 +3043,7 @@ void scriptclass::startgamemode( int t, KeyPoll& key, Graphics& dwgfx, Game& gam map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; - game.startspecial(1, obj, music); + game.startspecial(1); game.jumpheld = true; //set flipmode @@ -3075,7 +3075,7 @@ void scriptclass::startgamemode( int t, KeyPoll& key, Graphics& dwgfx, Game& gam map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; - game.startspecial(1, obj, music); + game.startspecial(1); game.jumpheld = true; //set flipmode @@ -3107,7 +3107,7 @@ void scriptclass::startgamemode( int t, KeyPoll& key, Graphics& dwgfx, Game& gam map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; - game.startspecial(1, obj, music); + game.startspecial(1); game.jumpheld = true; //set flipmode @@ -3139,7 +3139,7 @@ void scriptclass::startgamemode( int t, KeyPoll& key, Graphics& dwgfx, Game& gam map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; - game.startspecial(1, obj, music); + game.startspecial(1); game.jumpheld = true; //set flipmode @@ -3190,7 +3190,7 @@ void scriptclass::startgamemode( int t, KeyPoll& key, Graphics& dwgfx, Game& gam ed.kludgewarpdir[i+(j*ed.maxwidth)]=ed.level[i+(j*ed.maxwidth)].warpdir; } } - game.customstart(obj, music); + game.customstart(); game.jumpheld = true; @@ -3229,7 +3229,7 @@ void scriptclass::startgamemode( int t, KeyPoll& key, Graphics& dwgfx, Game& gam game.gamestate = GAMEMODE; music.fadeout(); hardreset(key, dwgfx, game, map, obj, help, music); - game.customstart(obj, music); + game.customstart(); game.jumpheld = true; map.custommodeforreal = true; @@ -3277,8 +3277,8 @@ void scriptclass::startgamemode( int t, KeyPoll& key, Graphics& dwgfx, Game& gam map.customx = 100; map.customy = 100; - game.customstart(obj, music); - game.customloadquick(ed.ListOfMetaData[game.playcustomlevel].filename, map, obj, music); + game.customstart(); + game.customloadquick(ed.ListOfMetaData[game.playcustomlevel].filename); game.jumpheld = true; game.gravitycontrol = game.savegc; @@ -3311,7 +3311,7 @@ void scriptclass::startgamemode( int t, KeyPoll& key, Graphics& dwgfx, Game& gam break; #endif case 100: - game.savestats(map, dwgfx); + game.savestats(); SDL_Quit(); exit(0); @@ -3422,7 +3422,7 @@ void scriptclass::teleport( Graphics& dwgfx, Game& game, mapclass& map, entitycl dwgfx.createtextbox(" Game Saved ", -1, 12, 174, 174, 174); dwgfx.textboxtimer(25); } - game.savetele(map, obj, music); + game.savetele(); } } } diff --git a/desktop_version/src/main.cpp b/desktop_version/src/main.cpp index 6a825bdf..afe4a4ce 100644 --- a/desktop_version/src/main.cpp +++ b/desktop_version/src/main.cpp @@ -191,7 +191,7 @@ int main(int argc, char *argv[]) map.bypos = map.ypos / 2; //Moved screensetting init here from main menu V2.1 - game.loadstats(map, graphics); + game.loadstats(); if (game.skipfakeload) game.gamestate = TITLEMODE; if(game.usingmmmmmm==0) music.usingmmmmmm=false; @@ -500,7 +500,7 @@ int main(int argc, char *argv[]) if (game.savemystats) { game.savemystats = false; - game.savestats(map, graphics); + game.savestats(); } //Mute button @@ -565,7 +565,7 @@ int main(int argc, char *argv[]) //SDL_FreeSurface( gameScreen ); //Quit SDL - game.savestats(map, graphics); + game.savestats(); NETWORK_shutdown(); SDL_Quit(); FILESYSTEM_deinit(); diff --git a/desktop_version/src/titlerender.cpp b/desktop_version/src/titlerender.cpp index 9c79cbcd..f0345c2a 100644 --- a/desktop_version/src/titlerender.cpp +++ b/desktop_version/src/titlerender.cpp @@ -733,7 +733,7 @@ void titlerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, U { dwgfx.bigprint( -1, 20, "Results", tr, tg, tb, true, 3); - tempstring = game.resulttimestring(help) + " / " + game.partimestring(help); + tempstring = game.resulttimestring() + " / " + game.partimestring(); dwgfx.drawspritesetcol(30, 80-15, 50, 22, help); dwgfx.Print(65, 80-15, "TIME TAKEN:", 255, 255, 255); @@ -807,7 +807,7 @@ void titlerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, U dwgfx.Print( 16, 65, "BEST TIME ", tr, tg, tb); dwgfx.Print( 16, 75, "BEST SHINY ", tr, tg, tb); dwgfx.Print( 16, 85, "BEST LIVES ", tr, tg, tb); - dwgfx.Print( 110, 65, game.timetstring(game.besttimes[0], help), tr, tg, tb); + dwgfx.Print( 110, 65, game.timetstring(game.besttimes[0]), tr, tg, tb); dwgfx.Print( 110, 75, help.String(game.besttrinkets[0])+"/2", tr, tg, tb); dwgfx.Print( 110, 85,help.String(game.bestlives[0]), tr, tg, tb); @@ -854,7 +854,7 @@ void titlerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, U dwgfx.Print( 16, 65, "BEST TIME ", tr, tg, tb); dwgfx.Print( 16, 75, "BEST SHINY ", tr, tg, tb); dwgfx.Print( 16, 85, "BEST LIVES ", tr, tg, tb); - dwgfx.Print( 110, 65, game.timetstring(game.besttimes[1], help), tr, tg, tb); + dwgfx.Print( 110, 65, game.timetstring(game.besttimes[1]), tr, tg, tb); dwgfx.Print( 110, 75, help.String(game.besttrinkets[1])+"/4", tr, tg, tb); dwgfx.Print( 110, 85, help.String(game.bestlives[1]), tr, tg, tb); @@ -901,7 +901,7 @@ void titlerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, U dwgfx.Print( 16, 65, "BEST TIME ", tr, tg, tb); dwgfx.Print( 16, 75, "BEST SHINY ", tr, tg, tb); dwgfx.Print( 16, 85, "BEST LIVES ", tr, tg, tb); - dwgfx.Print( 110, 65, game.timetstring(game.besttimes[2], help), tr, tg, tb); + dwgfx.Print( 110, 65, game.timetstring(game.besttimes[2]), tr, tg, tb); dwgfx.Print( 110, 75, help.String(game.besttrinkets[2])+"/2", tr, tg, tb); dwgfx.Print( 110, 85, help.String(game.bestlives[2]), tr, tg, tb); @@ -948,7 +948,7 @@ void titlerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, U dwgfx.Print( 16, 65, "BEST TIME ", tr, tg, tb); dwgfx.Print( 16, 75, "BEST SHINY ", tr, tg, tb); dwgfx.Print( 16, 85, "BEST LIVES ", tr, tg, tb); - dwgfx.Print( 110, 65, game.timetstring(game.besttimes[3], help), tr, tg, tb); + dwgfx.Print( 110, 65, game.timetstring(game.besttimes[3]), tr, tg, tb); dwgfx.Print( 110, 75, help.String(game.besttrinkets[3])+"/5", tr, tg, tb); dwgfx.Print( 110, 85, help.String(game.bestlives[3]), tr, tg, tb); @@ -995,7 +995,7 @@ void titlerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, U dwgfx.Print( 16, 65, "BEST TIME ", tr, tg, tb); dwgfx.Print( 16, 75, "BEST SHINY ", tr, tg, tb); dwgfx.Print( 16, 85, "BEST LIVES ", tr, tg, tb); - dwgfx.Print( 110, 65, game.timetstring(game.besttimes[4], help), tr, tg, tb); + dwgfx.Print( 110, 65, game.timetstring(game.besttimes[4]), tr, tg, tb); dwgfx.Print( 110, 75, help.String(game.besttrinkets[4])+"/1", tr, tg, tb); dwgfx.Print( 110, 85, help.String(game.bestlives[4]), tr, tg, tb); @@ -1042,7 +1042,7 @@ void titlerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, U dwgfx.Print( 16, 65, "BEST TIME ", tr, tg, tb); dwgfx.Print( 16, 75, "BEST SHINY ", tr, tg, tb); dwgfx.Print( 16, 85, "BEST LIVES ", tr, tg, tb); - dwgfx.Print( 110, 65, game.timetstring(game.besttimes[5], help), tr, tg, tb); + dwgfx.Print( 110, 65, game.timetstring(game.besttimes[5]), tr, tg, tb); dwgfx.Print( 110, 75, help.String(game.besttrinkets[5])+"/1", tr, tg, tb); dwgfx.Print( 110, 85, help.String(game.bestlives[5]), tr, tg, tb); @@ -1741,11 +1741,11 @@ void gamerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, Ut if(game.timetrialparlost) { - dwgfx.bprint(56, 18, game.timestring(help), 196, 80, 80); + dwgfx.bprint(56, 18, game.timestring(), 196, 80, 80); } else { - dwgfx.bprint(56, 18, game.timestring(help), 196, 196, 196); + dwgfx.bprint(56, 18, game.timestring(), 196, 196, 196); } if(game.deathcounts>0) { @@ -1767,12 +1767,12 @@ void gamerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, Ut if(game.timetrialparlost) { dwgfx.bprint(195, 214, "PAR TIME:", 80, 80, 80); - dwgfx.bprint(275, 214, game.partimestring(help), 80, 80, 80); + dwgfx.bprint(275, 214, game.partimestring(), 80, 80, 80); } else { dwgfx.bprint(195, 214, "PAR TIME:", 255, 255, 255); - dwgfx.bprint(275, 214, game.partimestring(help), 196, 196, 196); + dwgfx.bprint(275, 214, game.partimestring(), 196, 196, 196); } } } @@ -2397,7 +2397,7 @@ void maprender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, Uti dwgfx.Print(0, 102,help.String(game.deathcounts), 96,96,96, true); dwgfx.Print(0, 64, "[Time Taken]", 196, 196, 255 - help.glow, true); - dwgfx.Print(0, 52, game.timestring(help), 96, 96, 96, true); + dwgfx.Print(0, 52, game.timestring(), 96, 96, 96, true); } else { @@ -2408,7 +2408,7 @@ void maprender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, Uti dwgfx.Print(0, 114,help.String(game.deathcounts), 96,96,96, true); dwgfx.Print(0, 152, "[Time Taken]", 196, 196, 255 - help.glow, true); - dwgfx.Print(0, 164, game.timestring(help), 96, 96, 96, true); + dwgfx.Print(0, 164, game.timestring(), 96, 96, 96, true); } }else{ if (dwgfx.flipmode) @@ -2420,7 +2420,7 @@ void maprender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, Uti dwgfx.Print(0, 102,help.String(game.deathcounts), 96,96,96, true); dwgfx.Print(0, 64, "[Time Taken]", 196, 196, 255 - help.glow, true); - dwgfx.Print(0, 52, game.timestring(help), 96, 96, 96, true); + dwgfx.Print(0, 52, game.timestring(), 96, 96, 96, true); } else { @@ -2431,7 +2431,7 @@ void maprender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, Uti dwgfx.Print(0, 114,help.String(game.deathcounts), 96,96,96, true); dwgfx.Print(0, 152, "[Time Taken]", 196, 196, 255 - help.glow, true); - dwgfx.Print(0, 164, game.timestring(help), 96, 96, 96, true); + dwgfx.Print(0, 164, game.timestring(), 96, 96, 96, true); } } break; @@ -2851,11 +2851,11 @@ void towerrender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, U if(game.timetrialparlost) { - dwgfx.bprint(56, 18, game.timestring(help), 196, 80, 80); + dwgfx.bprint(56, 18, game.timestring(), 196, 80, 80); } else { - dwgfx.bprint(56, 18, game.timestring(help), 196, 196, 196); + dwgfx.bprint(56, 18, game.timestring(), 196, 196, 196); } if(game.deathcounts>0) { @@ -2877,12 +2877,12 @@ void towerrender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, U if(game.timetrialparlost) { dwgfx.bprint(195, 214, "PAR TIME:", 80, 80, 80); - dwgfx.bprint(275, 214, game.partimestring(help), 80, 80, 80); + dwgfx.bprint(275, 214, game.partimestring(), 80, 80, 80); } else { dwgfx.bprint(195, 214, "PAR TIME:", 255, 255, 255); - dwgfx.bprint(275, 214, game.partimestring(help), 196, 196, 196); + dwgfx.bprint(275, 214, game.partimestring(), 196, 196, 196); } } }