1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-29 07:58:30 +02:00

Remove global args from Input.cpp

This removes all global args from functions in Input.cpp. Additionally,
'dwgfx' has been renamed to 'graphics' in Input.cpp.
This commit is contained in:
Misa 2020-04-01 14:52:45 -07:00 committed by Ethan Lee
parent 2c138a4a60
commit a1fd4c6f02
3 changed files with 164 additions and 175 deletions

View File

@ -10,9 +10,9 @@
extern scriptclass script; extern scriptclass script;
// Found in titlerender.cpp // Found in titlerender.cpp
void updategraphicsmode(Game& game, Graphics& dwgfx); void updategraphicsmode(Game& game, Graphics& graphics);
void updatebuttonmappings(Game& game, KeyPoll& key, musicclass& music, int bind) void updatebuttonmappings(int bind)
{ {
for ( for (
SDL_GameControllerButton i = SDL_CONTROLLER_BUTTON_A; SDL_GameControllerButton i = SDL_CONTROLLER_BUTTON_A;
@ -113,7 +113,7 @@ void updatebuttonmappings(Game& game, KeyPoll& key, musicclass& music, int bind)
} }
} }
void titleinput(KeyPoll& key, Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, UtilityClass& help, musicclass& music) void titleinput()
{ {
//game.mx = (mouseX / 4); //game.mx = (mouseX / 4);
//game.my = (mouseY / 4); //game.my = (mouseY / 4);
@ -126,7 +126,7 @@ void titleinput(KeyPoll& key, Graphics& dwgfx, mapclass& map, Game& game, entity
game.press_action = false; game.press_action = false;
game.press_map = false; game.press_map = false;
if (dwgfx.flipmode) if (graphics.flipmode)
{ {
//GAMEPAD TODO //GAMEPAD TODO
if (key.isDown(KEYBOARD_LEFT) || key.isDown(KEYBOARD_DOWN) || key.isDown(KEYBOARD_a) || key.isDown(KEYBOARD_s) || key.controllerWantsRight(true)) game.press_left = true; if (key.isDown(KEYBOARD_LEFT) || key.isDown(KEYBOARD_DOWN) || key.isDown(KEYBOARD_a) || key.isDown(KEYBOARD_s) || key.controllerWantsRight(true)) game.press_left = true;
@ -151,7 +151,7 @@ void titleinput(KeyPoll& key, Graphics& dwgfx, mapclass& map, Game& game, entity
if (!game.press_action && !game.press_left && !game.press_right) game.jumpheld = false; if (!game.press_action && !game.press_left && !game.press_right) game.jumpheld = false;
if (!game.press_map) game.mapheld = false; if (!game.press_map) game.mapheld = false;
if (!game.jumpheld && dwgfx.fademode==0) if (!game.jumpheld && graphics.fademode==0)
{ {
if (game.press_action || game.press_left || game.press_right || game.press_map) if (game.press_action || game.press_left || game.press_right || game.press_map)
{ {
@ -180,14 +180,14 @@ void titleinput(KeyPoll& key, Graphics& dwgfx, mapclass& map, Game& game, entity
game.flashlight = 5; game.flashlight = 5;
}else{ }else{
if(game.mainmenu==0){ if(game.mainmenu==0){
dwgfx.fademode = 2; graphics.fademode = 2;
}else if (game.mainmenu == 1) { }else if (game.mainmenu == 1) {
if (game.telesummary != "") { if (game.telesummary != "") {
dwgfx.fademode = 2; graphics.fademode = 2;
} }
}else if (game.mainmenu == 2) { }else if (game.mainmenu == 2) {
if (game.quicksummary != "") { if (game.quicksummary != "") {
dwgfx.fademode = 2; graphics.fademode = 2;
} }
} }
} }
@ -270,7 +270,7 @@ void titleinput(KeyPoll& key, Graphics& dwgfx, mapclass& map, Game& game, entity
//bye! //bye!
music.playef(2, 10); music.playef(2, 10);
game.mainmenu = 100; game.mainmenu = 100;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
} }
#elif !defined(MAKEANDPLAY) #elif !defined(MAKEANDPLAY)
@ -282,7 +282,7 @@ void titleinput(KeyPoll& key, Graphics& dwgfx, mapclass& map, Game& game, entity
{ {
//No saves exist, just start a new game //No saves exist, just start a new game
game.mainmenu = 0; game.mainmenu = 0;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else else
{ {
@ -327,7 +327,7 @@ void titleinput(KeyPoll& key, Graphics& dwgfx, mapclass& map, Game& game, entity
//bye! //bye!
music.playef(2, 10); music.playef(2, 10);
game.mainmenu = 100; game.mainmenu = 100;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
#else #else
if (game.currentmenuoption == 0) if (game.currentmenuoption == 0)
@ -337,7 +337,7 @@ void titleinput(KeyPoll& key, Graphics& dwgfx, mapclass& map, Game& game, entity
{ {
//No saves exist, just start a new game //No saves exist, just start a new game
game.mainmenu = 0; game.mainmenu = 0;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else else
{ {
@ -389,7 +389,7 @@ void titleinput(KeyPoll& key, Graphics& dwgfx, mapclass& map, Game& game, entity
//bye! //bye!
music.playef(2, 10); music.playef(2, 10);
game.mainmenu = 100; game.mainmenu = 100;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
#endif #endif
} }
@ -425,7 +425,7 @@ void titleinput(KeyPoll& key, Graphics& dwgfx, mapclass& map, Game& game, entity
TiXmlDocument doc; TiXmlDocument doc;
if (!FILESYSTEM_loadTiXmlDocument(name.c_str(), &doc)){ if (!FILESYSTEM_loadTiXmlDocument(name.c_str(), &doc)){
game.mainmenu = 22; game.mainmenu = 22;
dwgfx.fademode = 2; graphics.fademode = 2;
}else{ }else{
game.createmenu("quickloadlevel"); game.createmenu("quickloadlevel");
map.nexttowercolour(); map.nexttowercolour();
@ -437,10 +437,10 @@ void titleinput(KeyPoll& key, Graphics& dwgfx, mapclass& map, Game& game, entity
{ {
if(game.currentmenuoption==0){//continue save if(game.currentmenuoption==0){//continue save
game.mainmenu = 23; game.mainmenu = 23;
dwgfx.fademode = 2; graphics.fademode = 2;
}else if(game.currentmenuoption==1){ }else if(game.currentmenuoption==1){
game.mainmenu = 22; game.mainmenu = 22;
dwgfx.fademode = 2; graphics.fademode = 2;
}else if(game.currentmenuoption==2){ }else if(game.currentmenuoption==2){
music.playef(11, 10); music.playef(11, 10);
game.levelpage=0; game.levelpage=0;
@ -464,7 +464,7 @@ void titleinput(KeyPoll& key, Graphics& dwgfx, mapclass& map, Game& game, entity
//LEVEL EDITOR HOOK //LEVEL EDITOR HOOK
music.playef(11, 10); music.playef(11, 10);
game.mainmenu = 20; game.mainmenu = 20;
dwgfx.fademode = 2; graphics.fademode = 2;
ed.filename=""; ed.filename="";
}/*else if(game.currentmenuoption==2){ }/*else if(game.currentmenuoption==2){
music.playef(11, 10); music.playef(11, 10);
@ -508,25 +508,25 @@ SDL_assert(0 && "Remove open level dir");
{ {
if (game.currentmenuoption == 0){ if (game.currentmenuoption == 0){
music.playef(11, 10); music.playef(11, 10);
dwgfx.screenbuffer->toggleFullScreen(); graphics.screenbuffer->toggleFullScreen();
game.fullscreen = !game.fullscreen; game.fullscreen = !game.fullscreen;
updategraphicsmode(game, dwgfx); updategraphicsmode(game, graphics);
game.savestats(); game.savestats();
game.createmenu("graphicoptions"); game.createmenu("graphicoptions");
game.currentmenuoption = 0; game.currentmenuoption = 0;
}else if (game.currentmenuoption == 1){ }else if (game.currentmenuoption == 1){
music.playef(11, 10); music.playef(11, 10);
dwgfx.screenbuffer->toggleStretchMode(); graphics.screenbuffer->toggleStretchMode();
game.stretchMode = (game.stretchMode + 1) % 3; game.stretchMode = (game.stretchMode + 1) % 3;
updategraphicsmode(game, dwgfx); updategraphicsmode(game, graphics);
game.savestats(); game.savestats();
game.createmenu("graphicoptions"); game.createmenu("graphicoptions");
game.currentmenuoption = 1; game.currentmenuoption = 1;
}else if (game.currentmenuoption == 2){ }else if (game.currentmenuoption == 2){
music.playef(11, 10); music.playef(11, 10);
dwgfx.screenbuffer->toggleLinearFilter(); graphics.screenbuffer->toggleLinearFilter();
game.useLinearFilter = !game.useLinearFilter; game.useLinearFilter = !game.useLinearFilter;
updategraphicsmode(game, dwgfx); updategraphicsmode(game, graphics);
game.savestats(); game.savestats();
game.createmenu("graphicoptions"); game.createmenu("graphicoptions");
game.currentmenuoption = 2; game.currentmenuoption = 2;
@ -535,21 +535,21 @@ SDL_assert(0 && "Remove open level dir");
music.playef(11, 10); music.playef(11, 10);
game.fullScreenEffect_badSignal = !game.fullScreenEffect_badSignal; game.fullScreenEffect_badSignal = !game.fullScreenEffect_badSignal;
//Hook the analogue thing in here: ABCDEFG //Hook the analogue thing in here: ABCDEFG
updategraphicsmode(game, dwgfx); updategraphicsmode(game, graphics);
dwgfx.screenbuffer->badSignalEffect= !dwgfx.screenbuffer->badSignalEffect; graphics.screenbuffer->badSignalEffect= !graphics.screenbuffer->badSignalEffect;
game.savestats(); game.savestats();
game.createmenu("graphicoptions"); game.createmenu("graphicoptions");
game.currentmenuoption = 3; game.currentmenuoption = 3;
}else if (game.currentmenuoption == 4) { }else if (game.currentmenuoption == 4) {
//toggle mouse cursor //toggle mouse cursor
music.playef(11, 10); music.playef(11, 10);
if (dwgfx.showmousecursor == true) { if (graphics.showmousecursor == true) {
SDL_ShowCursor(SDL_DISABLE); SDL_ShowCursor(SDL_DISABLE);
dwgfx.showmousecursor = false; graphics.showmousecursor = false;
} }
else { else {
SDL_ShowCursor(SDL_ENABLE); SDL_ShowCursor(SDL_ENABLE);
dwgfx.showmousecursor = true; graphics.showmousecursor = true;
} }
} }
else else
@ -566,7 +566,7 @@ SDL_assert(0 && "Remove open level dir");
if (game.currentmenuoption == 0) if (game.currentmenuoption == 0)
{ {
//toggle fullscreen //toggle fullscreen
dwgfx.screenbuffer->toggleFullScreen(); graphics.screenbuffer->toggleFullScreen();
music.playef(11, 10); music.playef(11, 10);
if (game.fullscreen) if (game.fullscreen)
{ {
@ -576,7 +576,7 @@ SDL_assert(0 && "Remove open level dir");
{ {
game.fullscreen = true; game.fullscreen = true;
} }
updategraphicsmode(game, dwgfx); updategraphicsmode(game, graphics);
game.savestats(); game.savestats();
game.createmenu("graphicoptions"); game.createmenu("graphicoptions");
} }
@ -588,10 +588,10 @@ SDL_assert(0 && "Remove open level dir");
if (game.fullscreen) if (game.fullscreen)
{ {
game.fullscreen = false; game.fullscreen = false;
updategraphicsmode(game, dwgfx); updategraphicsmode(game, graphics);
game.fullscreen = true; game.fullscreen = true;
} }
updategraphicsmode(game, dwgfx); updategraphicsmode(game, graphics);
game.savestats(); game.savestats();
game.createmenu("graphicoptions"); game.createmenu("graphicoptions");
@ -602,9 +602,9 @@ SDL_assert(0 && "Remove open level dir");
//change scaling mode //change scaling mode
music.playef(11, 10); music.playef(11, 10);
game.advanced_scaling = (game.advanced_scaling + 1) % 5; game.advanced_scaling = (game.advanced_scaling + 1) % 5;
dwgfx.screenbuffer->ResizeScreen(320 *game.advanced_scaling,240*game.advanced_scaling ); graphics.screenbuffer->ResizeScreen(320 *game.advanced_scaling,240*game.advanced_scaling );
dwgfx.screenbuffer->SetScale(game.advanced_scaling); graphics.screenbuffer->SetScale(game.advanced_scaling);
updategraphicsmode(game, dwgfx); updategraphicsmode(game, graphics);
game.savestats(); game.savestats();
game.createmenu("graphicoptions"); game.createmenu("graphicoptions");
@ -615,7 +615,7 @@ SDL_assert(0 && "Remove open level dir");
//change smoothing //change smoothing
music.playef(11, 10); music.playef(11, 10);
game.advanced_smoothing = !game.advanced_smoothing; game.advanced_smoothing = !game.advanced_smoothing;
updategraphicsmode(game, dwgfx); updategraphicsmode(game, graphics);
game.savestats(); game.savestats();
game.createmenu("graphicoptions"); game.createmenu("graphicoptions");
@ -633,7 +633,7 @@ SDL_assert(0 && "Remove open level dir");
{ {
if (game.currentmenuoption == 0) if (game.currentmenuoption == 0)
{ {
dwgfx.screenbuffer->toggleFullScreen(); graphics.screenbuffer->toggleFullScreen();
//toggle fullscreen //toggle fullscreen
music.playef(11, 10); music.playef(11, 10);
if (game.fullscreen) if (game.fullscreen)
@ -644,7 +644,7 @@ SDL_assert(0 && "Remove open level dir");
{ {
game.fullscreen = true; game.fullscreen = true;
} }
updategraphicsmode(game, dwgfx); updategraphicsmode(game, graphics);
game.savestats(); game.savestats();
game.createmenu("graphicoptions"); game.createmenu("graphicoptions");
@ -657,10 +657,10 @@ SDL_assert(0 && "Remove open level dir");
if (game.fullscreen) if (game.fullscreen)
{ {
game.fullscreen = false; game.fullscreen = false;
updategraphicsmode(game, dwgfx); updategraphicsmode(game, graphics);
game.fullscreen = true; game.fullscreen = true;
} }
updategraphicsmode(game, dwgfx); updategraphicsmode(game, graphics);
game.savestats(); game.savestats();
game.createmenu("graphicoptions"); game.createmenu("graphicoptions");
@ -683,7 +683,7 @@ SDL_assert(0 && "Remove open level dir");
//bye! //bye!
music.playef(2, 10); music.playef(2, 10);
game.mainmenu = 100; game.mainmenu = 100;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else else
{ {
@ -805,7 +805,7 @@ SDL_assert(0 && "Remove open level dir");
else if (game.currentmenuoption == 2) else if (game.currentmenuoption == 2)
{ {
//disable text outline //disable text outline
dwgfx.notextoutline = !dwgfx.notextoutline; graphics.notextoutline = !graphics.notextoutline;
game.savestats(); game.savestats();
music.playef(11, 10); music.playef(11, 10);
} }
@ -839,7 +839,7 @@ SDL_assert(0 && "Remove open level dir");
else if (game.currentmenuoption == 6) else if (game.currentmenuoption == 6)
{ {
// toggle translucent roomname BG // toggle translucent roomname BG
dwgfx.translucentroomname = !dwgfx.translucentroomname; graphics.translucentroomname = !graphics.translucentroomname;
music.playef(11, 10); music.playef(11, 10);
} }
else if (game.currentmenuoption == 7) else if (game.currentmenuoption == 7)
@ -1301,13 +1301,13 @@ SDL_assert(0 && "Remove open level dir");
{ {
//You at least have a quicksave, or you couldn't have gotten here //You at least have a quicksave, or you couldn't have gotten here
game.mainmenu = 2; game.mainmenu = 2;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else if (game.quicksummary == "") else if (game.quicksummary == "")
{ {
//You at least have a telesave, or you couldn't have gotten here //You at least have a telesave, or you couldn't have gotten here
game.mainmenu = 1; game.mainmenu = 1;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else else
{ {
@ -1351,13 +1351,13 @@ SDL_assert(0 && "Remove open level dir");
{ {
//You at least have a quicksave, or you couldn't have gotten here //You at least have a quicksave, or you couldn't have gotten here
game.mainmenu = 2; game.mainmenu = 2;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else if (game.quicksummary == "") else if (game.quicksummary == "")
{ {
//You at least have a telesave, or you couldn't have gotten here //You at least have a telesave, or you couldn't have gotten here
game.mainmenu = 1; game.mainmenu = 1;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else else
{ {
@ -1372,7 +1372,7 @@ SDL_assert(0 && "Remove open level dir");
{ {
if(!map.invincibility){ if(!map.invincibility){
game.mainmenu = 11; game.mainmenu = 11;
dwgfx.fademode = 2; graphics.fademode = 2;
}else{ }else{
//Can't do yet! play sad sound //Can't do yet! play sad sound
music.playef(2, 10); music.playef(2, 10);
@ -1406,7 +1406,7 @@ SDL_assert(0 && "Remove open level dir");
{ {
//yep //yep
game.mainmenu = 0; game.mainmenu = 0;
dwgfx.fademode = 2; graphics.fademode = 2;
game.deletequick(); game.deletequick();
game.deletetele(); game.deletetele();
} }
@ -1519,7 +1519,7 @@ SDL_assert(0 && "Remove open level dir");
music.playef(18, 10); music.playef(18, 10);
game.screenshake = 10; game.screenshake = 10;
game.flashlight = 5; game.flashlight = 5;
dwgfx.setflipmode = !dwgfx.setflipmode; graphics.setflipmode = !graphics.setflipmode;
game.savemystats = true; game.savemystats = true;
} }
else if (game.currentmenuoption == 4) else if (game.currentmenuoption == 4)
@ -1540,12 +1540,12 @@ SDL_assert(0 && "Remove open level dir");
if (game.currentmenuoption == 0) //start no death mode, disabling cutscenes if (game.currentmenuoption == 0) //start no death mode, disabling cutscenes
{ {
game.mainmenu = 10; game.mainmenu = 10;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else if (game.currentmenuoption == 1) else if (game.currentmenuoption == 1)
{ {
game.mainmenu = 9; game.mainmenu = 9;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else if (game.currentmenuoption == 2) else if (game.currentmenuoption == 2)
{ {
@ -1560,12 +1560,12 @@ SDL_assert(0 && "Remove open level dir");
if (game.currentmenuoption == 0) if (game.currentmenuoption == 0)
{ {
game.mainmenu = 1; game.mainmenu = 1;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else if (game.currentmenuoption == 1) else if (game.currentmenuoption == 1)
{ {
game.mainmenu = 2; game.mainmenu = 2;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else if (game.currentmenuoption == 2) else if (game.currentmenuoption == 2)
{ {
@ -1604,22 +1604,22 @@ SDL_assert(0 && "Remove open level dir");
if (game.currentmenuoption == 0) if (game.currentmenuoption == 0)
{ {
game.mainmenu = 12; game.mainmenu = 12;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else if (game.currentmenuoption == 1) else if (game.currentmenuoption == 1)
{ {
game.mainmenu = 13; game.mainmenu = 13;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else if (game.currentmenuoption == 2) else if (game.currentmenuoption == 2)
{ {
game.mainmenu = 14; game.mainmenu = 14;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else if (game.currentmenuoption == 3) else if (game.currentmenuoption == 3)
{ {
game.mainmenu = 15; game.mainmenu = 15;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else if (game.currentmenuoption == 4) else if (game.currentmenuoption == 4)
{ {
@ -1634,22 +1634,22 @@ SDL_assert(0 && "Remove open level dir");
if (game.currentmenuoption == 0) if (game.currentmenuoption == 0)
{ {
game.mainmenu = 16; game.mainmenu = 16;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else if (game.currentmenuoption == 1) else if (game.currentmenuoption == 1)
{ {
game.mainmenu = 17; game.mainmenu = 17;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else if (game.currentmenuoption == 2) else if (game.currentmenuoption == 2)
{ {
game.mainmenu = 18; game.mainmenu = 18;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else if (game.currentmenuoption == 3) else if (game.currentmenuoption == 3)
{ {
game.mainmenu = 19; game.mainmenu = 19;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else if (game.currentmenuoption == 4) else if (game.currentmenuoption == 4)
{ {
@ -1687,32 +1687,32 @@ SDL_assert(0 && "Remove open level dir");
if (game.currentmenuoption == 0 && game.unlock[9]) //space station 1 if (game.currentmenuoption == 0 && game.unlock[9]) //space station 1
{ {
game.mainmenu = 3; game.mainmenu = 3;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else if (game.currentmenuoption == 1 && game.unlock[10]) //lab else if (game.currentmenuoption == 1 && game.unlock[10]) //lab
{ {
game.mainmenu = 4; game.mainmenu = 4;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else if (game.currentmenuoption == 2 && game.unlock[11]) //tower else if (game.currentmenuoption == 2 && game.unlock[11]) //tower
{ {
game.mainmenu = 5; game.mainmenu = 5;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else if (game.currentmenuoption == 3 && game.unlock[12]) //station 2 else if (game.currentmenuoption == 3 && game.unlock[12]) //station 2
{ {
game.mainmenu = 6; game.mainmenu = 6;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else if (game.currentmenuoption == 4 && game.unlock[13]) //warp else if (game.currentmenuoption == 4 && game.unlock[13]) //warp
{ {
game.mainmenu = 7; game.mainmenu = 7;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else if (game.currentmenuoption == 5 && game.unlock[14]) //final else if (game.currentmenuoption == 5 && game.unlock[14]) //final
{ {
game.mainmenu = 8; game.mainmenu = 8;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else if (game.currentmenuoption == 6) //go to the time trial menu else if (game.currentmenuoption == 6) //go to the time trial menu
{ {
@ -1743,32 +1743,32 @@ SDL_assert(0 && "Remove open level dir");
if (game.timetriallevel == 0) //space station 1 if (game.timetriallevel == 0) //space station 1
{ {
game.mainmenu = 3; game.mainmenu = 3;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else if (game.timetriallevel == 1) //lab else if (game.timetriallevel == 1) //lab
{ {
game.mainmenu = 4; game.mainmenu = 4;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else if (game.timetriallevel == 2) //tower else if (game.timetriallevel == 2) //tower
{ {
game.mainmenu = 5; game.mainmenu = 5;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else if (game.timetriallevel == 3) //station 2 else if (game.timetriallevel == 3) //station 2
{ {
game.mainmenu = 6; game.mainmenu = 6;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else if (game.timetriallevel == 4) //warp else if (game.timetriallevel == 4) //warp
{ {
game.mainmenu = 7; game.mainmenu = 7;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
else if (game.timetriallevel == 5) //final else if (game.timetriallevel == 5) //final
{ {
game.mainmenu = 8; game.mainmenu = 8;
dwgfx.fademode = 2; graphics.fademode = 2;
} }
} }
} }
@ -1789,17 +1789,16 @@ SDL_assert(0 && "Remove open level dir");
game.currentmenuoption < 4 && game.currentmenuoption < 4 &&
key.controllerButtonDown() ) key.controllerButtonDown() )
{ {
updatebuttonmappings(game, key, music, game.currentmenuoption); updatebuttonmappings(game.currentmenuoption);
} }
} }
if (dwgfx.fademode == 1) if (graphics.fademode == 1)
script.startgamemode(game.mainmenu); script.startgamemode(game.mainmenu);
} }
void gameinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, void gameinput()
entityclass& obj, UtilityClass& help, musicclass& music)
{ {
//TODO mouse input //TODO mouse input
//game.mx = (mouseX / 2); //game.mx = (mouseX / 2);
@ -1924,18 +1923,18 @@ void gameinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
/* /*
if (key.isDown("1".charCodeAt(0))) { if (key.isDown("1".charCodeAt(0))) {
dwgfx.screen.width = 640; graphics.screen.width = 640;
dwgfx.screen.height = 480; graphics.screen.height = 480;
setstage(640,480); setstage(640,480);
} }
if (key.isDown("2".charCodeAt(0))) { if (key.isDown("2".charCodeAt(0))) {
dwgfx.screen.width = 960; graphics.screen.width = 960;
dwgfx.screen.height = 720; graphics.screen.height = 720;
setstage(960,720); setstage(960,720);
} }
if (key.isDown("3".charCodeAt(0))) { if (key.isDown("3".charCodeAt(0))) {
dwgfx.screen.width = 1280; graphics.screen.width = 1280;
dwgfx.screen.height = 960; graphics.screen.height = 960;
setstage(1280,960); setstage(1280,960);
} }
*/ */
@ -1952,7 +1951,7 @@ void gameinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
if (key.isDown("9".charCodeAt(0))) game.inertia = 1.3; if (key.isDown("9".charCodeAt(0))) game.inertia = 1.3;
if (key.isDown("0".charCodeAt(0))) game.inertia = 1.4;*/ if (key.isDown("0".charCodeAt(0))) game.inertia = 1.4;*/
if (game.intimetrial && dwgfx.fademode == 1 && game.quickrestartkludge) if (game.intimetrial && graphics.fademode == 1 && game.quickrestartkludge)
{ {
//restart the time trial //restart the time trial
game.quickrestartkludge = false; game.quickrestartkludge = false;
@ -1976,14 +1975,14 @@ void gameinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
}else{ }else{
game.gamestate = EDITORMODE; game.gamestate = EDITORMODE;
dwgfx.textboxremove(); graphics.textboxremove();
game.hascontrol = true; game.hascontrol = true;
game.advancetext = false; game.advancetext = false;
game.completestop = false; game.completestop = false;
game.state = 0; game.state = 0;
dwgfx.showcutscenebars = false; graphics.showcutscenebars = false;
dwgfx.backgrounddrawn=false; graphics.backgrounddrawn=false;
music.fadeout(); music.fadeout();
//If warpdir() is used during playtesting, we need to set it back after! //If warpdir() is used during playtesting, we need to set it back after!
for (int j = 0; j < ed.maxheight; j++) for (int j = 0; j < ed.maxheight; j++)
@ -2016,7 +2015,7 @@ void gameinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
/* /*
if (key.isDown(27)) { if (key.isDown(27)) {
game.state = 0; game.state = 0;
dwgfx.textboxremove(); graphics.textboxremove();
map.tdrawback = true; map.tdrawback = true;
music.haltdasmusik(); music.haltdasmusik();
@ -2030,7 +2029,7 @@ void gameinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
if (game.activetele && game.readytotele > 20 && !game.intimetrial) if (game.activetele && game.readytotele > 20 && !game.intimetrial)
{ {
if(!dwgfx.flipmode) if(!graphics.flipmode)
{ {
obj.flags[73] = 1; //Flip mode test obj.flags[73] = 1; //Flip mode test
} }
@ -2060,15 +2059,15 @@ void gameinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
{ {
//Alright, normal teleporting //Alright, normal teleporting
game.gamestate = 5; game.gamestate = 5;
dwgfx.menuoffset = 240; //actually this should count the roomname graphics.menuoffset = 240; //actually this should count the roomname
if (map.extrarow) dwgfx.menuoffset -= 10; if (map.extrarow) graphics.menuoffset -= 10;
//dwgfx.menubuffer.copyPixels(dwgfx.screenbuffer, dwgfx.screenbuffer.rect, dwgfx.tl, null, null, false); //graphics.menubuffer.copyPixels(graphics.screenbuffer, graphics.screenbuffer.rect, graphics.tl, null, null, false);
//TODO TESTHIS //TODO TESTHIS
//dwgfx.screenbuffer->UpdateScreen(dwgfx.menubuffer, NULL); //graphics.screenbuffer->UpdateScreen(graphics.menubuffer, NULL);
BlitSurfaceStandard(dwgfx.menubuffer,NULL,dwgfx.backBuffer, NULL); BlitSurfaceStandard(graphics.menubuffer,NULL,graphics.backBuffer, NULL);
dwgfx.resumegamemode = false; graphics.resumegamemode = false;
game.useteleporter = true; game.useteleporter = true;
game.initteleportermode(); game.initteleportermode();
@ -2110,38 +2109,38 @@ void gameinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
//Quit menu, same conditions as in game menu //Quit menu, same conditions as in game menu
game.gamestate = MAPMODE; game.gamestate = MAPMODE;
game.gamesaved = false; game.gamesaved = false;
dwgfx.resumegamemode = false; graphics.resumegamemode = false;
game.menupage = 20; // The Map Page game.menupage = 20; // The Map Page
//dwgfx.menubuffer.copyPixels(dwgfx.screenbuffer, dwgfx.screenbuffer.rect, dwgfx.tl, null, null, false); //graphics.menubuffer.copyPixels(graphics.screenbuffer, graphics.screenbuffer.rect, graphics.tl, null, null, false);
//dwgfx.screenbuffer->UpdateScreen(dwgfx.menubuffer, NULL); //graphics.screenbuffer->UpdateScreen(graphics.menubuffer, NULL);
BlitSurfaceStandard(dwgfx.menubuffer,NULL,dwgfx.backBuffer, NULL); BlitSurfaceStandard(graphics.menubuffer,NULL,graphics.backBuffer, NULL);
dwgfx.menuoffset = 240; //actually this should count the roomname graphics.menuoffset = 240; //actually this should count the roomname
if (map.extrarow) dwgfx.menuoffset -= 10; if (map.extrarow) graphics.menuoffset -= 10;
} }
else if (game.intimetrial && dwgfx.fademode==0) else if (game.intimetrial && graphics.fademode==0)
{ {
//Quick restart of time trial //Quick restart of time trial
script.hardreset(); script.hardreset();
if (dwgfx.setflipmode) dwgfx.flipmode = true; if (graphics.setflipmode) graphics.flipmode = true;
dwgfx.fademode = 2; graphics.fademode = 2;
game.completestop = true; game.completestop = true;
music.fadeout(); music.fadeout();
game.intimetrial = true; game.intimetrial = true;
game.quickrestartkludge = true; game.quickrestartkludge = true;
} }
else if (dwgfx.fademode==0) else if (graphics.fademode==0)
{ {
//Normal map screen, do transition later //Normal map screen, do transition later
game.gamestate = MAPMODE; game.gamestate = MAPMODE;
map.cursordelay = 0; map.cursordelay = 0;
map.cursorstate = 0; map.cursorstate = 0;
game.gamesaved = false; game.gamesaved = false;
dwgfx.resumegamemode = false; graphics.resumegamemode = false;
game.menupage = 0; // The Map Page game.menupage = 0; // The Map Page
BlitSurfaceStandard(dwgfx.menubuffer,NULL,dwgfx.backBuffer, NULL); BlitSurfaceStandard(graphics.menubuffer,NULL,graphics.backBuffer, NULL);
//dwgfx.screenbuffer->UpdateScreen(dwgfx.menubuffer, NULL); //graphics.screenbuffer->UpdateScreen(graphics.menubuffer, NULL);
dwgfx.menuoffset = 240; //actually this should count the roomname graphics.menuoffset = 240; //actually this should count the roomname
if (map.extrarow) dwgfx.menuoffset -= 10; if (map.extrarow) graphics.menuoffset -= 10;
} }
} }
@ -2151,15 +2150,15 @@ void gameinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
//Quit menu, same conditions as in game menu //Quit menu, same conditions as in game menu
game.gamestate = MAPMODE; game.gamestate = MAPMODE;
game.gamesaved = false; game.gamesaved = false;
dwgfx.resumegamemode = false; graphics.resumegamemode = false;
game.menupage = 10; // The Map Page game.menupage = 10; // The Map Page
//dwgfx.menubuffer.copyPixels(dwgfx.screenbuffer, dwgfx.screenbuffer.rect, dwgfx.tl, NULL, NULL, false); //graphics.menubuffer.copyPixels(graphics.screenbuffer, graphics.screenbuffer.rect, graphics.tl, NULL, NULL, false);
//dwgfx.screenbuffer->UpdateScreen(dwgfx.menubuffer, NULL); //graphics.screenbuffer->UpdateScreen(graphics.menubuffer, NULL);
BlitSurfaceStandard(dwgfx.menubuffer,NULL,dwgfx.backBuffer, NULL); BlitSurfaceStandard(graphics.menubuffer,NULL,graphics.backBuffer, NULL);
dwgfx.menuoffset = 240; //actually this should count the roomname graphics.menuoffset = 240; //actually this should count the roomname
if (map.extrarow) dwgfx.menuoffset -= 10; if (map.extrarow) graphics.menuoffset -= 10;
} }
if (key.keymap[SDLK_r] && game.deathseq<=0)// && map.custommode) //Have fun glitchrunners! if (key.keymap[SDLK_r] && game.deathseq<=0)// && map.custommode) //Have fun glitchrunners!
@ -2267,8 +2266,7 @@ void gameinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
} }
} }
void mapinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, void mapinput()
entityclass& obj, UtilityClass& help, musicclass& music)
{ {
//TODO Mouse Input! //TODO Mouse Input!
//game.mx = (mouseX / 2); //game.mx = (mouseX / 2);
@ -2279,9 +2277,9 @@ void mapinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
game.press_action = false; game.press_action = false;
game.press_map = false; game.press_map = false;
if(dwgfx.menuoffset==0) if(graphics.menuoffset==0)
{ {
if (dwgfx.flipmode) if (graphics.flipmode)
{ {
if (key.isDown(KEYBOARD_LEFT) || key.isDown(KEYBOARD_DOWN) || key.isDown(KEYBOARD_a) || key.isDown(KEYBOARD_s) || key.controllerWantsLeft(false) ) game.press_left = true; if (key.isDown(KEYBOARD_LEFT) || key.isDown(KEYBOARD_DOWN) || key.isDown(KEYBOARD_a) || key.isDown(KEYBOARD_s) || key.controllerWantsLeft(false) ) game.press_left = true;
if (key.isDown(KEYBOARD_RIGHT) || key.isDown(KEYBOARD_UP) || key.isDown(KEYBOARD_d) || key.isDown(KEYBOARD_w) || key.controllerWantsRight(false)) game.press_right = true; if (key.isDown(KEYBOARD_RIGHT) || key.isDown(KEYBOARD_UP) || key.isDown(KEYBOARD_d) || key.isDown(KEYBOARD_w) || key.controllerWantsRight(false)) game.press_right = true;
@ -2336,14 +2334,14 @@ void mapinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
if(game.press_map && game.menupage < 10) if(game.press_map && game.menupage < 10)
{ {
//Normal map screen, do transition later //Normal map screen, do transition later
dwgfx.resumegamemode = true; graphics.resumegamemode = true;
} }
} }
if (dwgfx.fademode == 1) if (graphics.fademode == 1)
{ {
FillRect(dwgfx.menubuffer, 0x000000); FillRect(graphics.menubuffer, 0x000000);
dwgfx.resumegamemode = true; graphics.resumegamemode = true;
obj.removeallblocks(); obj.removeallblocks();
game.menukludge = false; game.menukludge = false;
if (game.menupage >= 20) if (game.menupage >= 20)
@ -2377,7 +2375,7 @@ void mapinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
if (game.menupage == 1 && obj.flags[67] == 1 && game.press_action && !game.insecretlab && !map.custommode) if (game.menupage == 1 && obj.flags[67] == 1 && game.press_action && !game.insecretlab && !map.custommode)
{ {
//Warp back to the ship //Warp back to the ship
dwgfx.resumegamemode = true; graphics.resumegamemode = true;
game.teleport_to_x = 2; game.teleport_to_x = 2;
game.teleport_to_y = 11; game.teleport_to_y = 11;
@ -2424,20 +2422,20 @@ void mapinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
if (game.menupage == 10 && game.press_action) if (game.menupage == 10 && game.press_action)
{ {
//return to game //return to game
dwgfx.resumegamemode = true; graphics.resumegamemode = true;
} }
if (game.menupage == 11 && game.press_action) if (game.menupage == 11 && game.press_action)
{ {
//quit to menu //quit to menu
if (dwgfx.fademode == 0) if (graphics.fademode == 0)
{ {
//Kill contents of offset render buffer, since we do that for some reason. //Kill contents of offset render buffer, since we do that for some reason.
//This fixes an apparent frame flicker. //This fixes an apparent frame flicker.
FillRect(dwgfx.tempBuffer, 0x000000); FillRect(graphics.tempBuffer, 0x000000);
if (game.intimetrial || game.insecretlab || game.nodeathmode) game.menukludge = true; if (game.intimetrial || game.insecretlab || game.nodeathmode) game.menukludge = true;
script.hardreset(); script.hardreset();
if(dwgfx.setflipmode) dwgfx.flipmode = true; if(graphics.setflipmode) graphics.flipmode = true;
dwgfx.fademode = 2; graphics.fademode = 2;
music.fadeout(); music.fadeout();
map.nexttowercolour(); map.nexttowercolour();
} }
@ -2446,15 +2444,15 @@ void mapinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
if (game.menupage == 20 && game.press_action) if (game.menupage == 20 && game.press_action)
{ {
//return to game //return to game
dwgfx.resumegamemode = true; graphics.resumegamemode = true;
} }
if (game.menupage == 21 && game.press_action) if (game.menupage == 21 && game.press_action)
{ {
//quit to menu //quit to menu
if (dwgfx.fademode == 0) if (graphics.fademode == 0)
{ {
game.swnmode = false; game.swnmode = false;
dwgfx.fademode = 2; graphics.fademode = 2;
music.fadeout(); music.fadeout();
} }
} }
@ -2471,8 +2469,7 @@ void mapinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
} }
} }
void teleporterinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, void teleporterinput()
entityclass& obj, UtilityClass& help, musicclass& music)
{ {
//Todo Mouseinput! //Todo Mouseinput!
//game.mx = (mouseX / 2); //game.mx = (mouseX / 2);
@ -2485,7 +2482,7 @@ void teleporterinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
game.press_action = false; game.press_action = false;
game.press_map = false; game.press_map = false;
if(dwgfx.menuoffset==0) if(graphics.menuoffset==0)
{ {
if (key.isDown(KEYBOARD_LEFT)|| key.isDown(KEYBOARD_a) || key.controllerWantsLeft(false) ) game.press_left = true; if (key.isDown(KEYBOARD_LEFT)|| key.isDown(KEYBOARD_a) || key.controllerWantsLeft(false) ) game.press_left = true;
if (key.isDown(KEYBOARD_RIGHT) || key.isDown(KEYBOARD_d)|| key.controllerWantsRight(false) ) game.press_right = true; if (key.isDown(KEYBOARD_RIGHT) || key.isDown(KEYBOARD_d)|| key.controllerWantsRight(false) ) game.press_right = true;
@ -2546,12 +2543,12 @@ void teleporterinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
if (game.roomx == tempx + 100 && game.roomy == tempy + 100) if (game.roomx == tempx + 100 && game.roomy == tempy + 100)
{ {
//cancel! //cancel!
dwgfx.resumegamemode = true; graphics.resumegamemode = true;
} }
else else
{ {
//teleport //teleport
dwgfx.resumegamemode = true; graphics.resumegamemode = true;
game.teleport_to_x = tempx; game.teleport_to_x = tempx;
game.teleport_to_y = tempy; game.teleport_to_y = tempy;
@ -2574,8 +2571,7 @@ void teleporterinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
} }
} }
void gamecompleteinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, void gamecompleteinput()
entityclass& obj, UtilityClass& help, musicclass& music)
{ {
//game.mx = (mouseX / 2); //game.mx = (mouseX / 2);
//game.my = (mouseY / 2); //game.my = (mouseY / 2);
@ -2590,9 +2586,9 @@ void gamecompleteinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
game.creditposition -= 6; game.creditposition -= 6;
if (game.creditposition <= -game.creditmaxposition) if (game.creditposition <= -game.creditmaxposition)
{ {
if(dwgfx.fademode==0) if(graphics.fademode==0)
{ {
dwgfx.fademode = 2; graphics.fademode = 2;
} }
game.creditposition = -game.creditmaxposition; game.creditposition = -game.creditmaxposition;
} }
@ -2611,16 +2607,15 @@ void gamecompleteinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
if(game.press_map) if(game.press_map)
{ {
//Return to game //Return to game
if(dwgfx.fademode==0) if(graphics.fademode==0)
{ {
dwgfx.fademode = 2; graphics.fademode = 2;
} }
} }
} }
} }
void gamecompleteinput2(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, void gamecompleteinput2()
entityclass& obj, UtilityClass& help, musicclass& music)
{ {
//TODO Mouse Input! //TODO Mouse Input!
//game.mx = (mouseX / 2); //game.mx = (mouseX / 2);
@ -2638,9 +2633,9 @@ void gamecompleteinput2(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map
game.creditposx++; game.creditposx++;
if (game.creditposy >= 30) if (game.creditposy >= 30)
{ {
if(dwgfx.fademode==0) if(graphics.fademode==0)
{ {
dwgfx.fademode = 2; graphics.fademode = 2;
music.fadeout(); music.fadeout();
} }
} }
@ -2654,9 +2649,9 @@ void gamecompleteinput2(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map
if(game.press_map) if(game.press_map)
{ {
//Return to game //Return to game
if(dwgfx.fademode==0) if(graphics.fademode==0)
{ {
dwgfx.fademode = 2; graphics.fademode = 2;
music.fadeout(); music.fadeout();
} }
} }

View File

@ -9,22 +9,16 @@
#include "Music.h" #include "Music.h"
#include "Map.h" #include "Map.h"
void titleinput(KeyPoll& key, Graphics& dwgfx, mapclass& map, Game& game, void titleinput();
entityclass& obj, UtilityClass& help, musicclass& music);
void gameinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, void gameinput();
entityclass& obj, UtilityClass& help, musicclass& music);
void mapinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, void mapinput();
entityclass& obj, UtilityClass& help, musicclass& music);
void teleporterinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, void teleporterinput();
entityclass& obj, UtilityClass& help, musicclass& music);
void gamecompleteinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, void gamecompleteinput();
entityclass& obj, UtilityClass& help, musicclass& music);
void gamecompleteinput2(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, void gamecompleteinput2();
entityclass& obj, UtilityClass& help, musicclass& music);
#endif /* INPUT_H */ #endif /* INPUT_H */

View File

@ -372,7 +372,7 @@ int main(int argc, char *argv[])
#endif #endif
case TITLEMODE: case TITLEMODE:
//Input //Input
titleinput(key, graphics, map, game, obj, help, music); titleinput();
//Render //Render
titlerender(graphics, map, game, obj, help, music); titlerender(graphics, map, game, obj, help, music);
////Logic ////Logic
@ -381,11 +381,11 @@ int main(int argc, char *argv[])
case GAMEMODE: case GAMEMODE:
if (map.towermode) if (map.towermode)
{ {
gameinput(key, graphics, game, map, obj, help, music); gameinput();
//if(game.recording==1) //if(game.recording==1)
//{ //{
// ///recordinput(key, graphics, game, map, obj, help, music); // ///recordinput();
//} //}
//else //else
//{ //{
@ -399,7 +399,7 @@ int main(int argc, char *argv[])
if (game.recording == 1) if (game.recording == 1)
{ {
//recordinput(key, dwgfx, game, map, obj, help, music); //recordinput();
} }
else else
{ {
@ -408,7 +408,7 @@ int main(int argc, char *argv[])
script.run(); script.run();
} }
gameinput(key, graphics, game, map, obj, help, music); gameinput();
//} //}
gamerender(graphics,map, game, obj, help); gamerender(graphics,map, game, obj, help);
gamelogic(); gamelogic();
@ -420,11 +420,11 @@ int main(int argc, char *argv[])
maprender(graphics, game, map, obj, help); maprender(graphics, game, map, obj, help);
if (game.recording == 1) if (game.recording == 1)
{ {
//recordinput(key, dwgfx, game, map, obj, help, music); //will implement this later if it's actually needed //recordinput(); //will implement this later if it's actually needed
} }
else else
{ {
mapinput(key, graphics, game, map, obj, help, music); mapinput();
} }
maplogic(); maplogic();
break; break;
@ -432,13 +432,13 @@ int main(int argc, char *argv[])
teleporterrender(graphics, game, map, obj, help); teleporterrender(graphics, game, map, obj, help);
if (game.recording == 1) if (game.recording == 1)
{ {
//recordinput(key, graphics, game, map, obj, help, music); //recordinput();
} }
else else
{ {
if(game.useteleporter) if(game.useteleporter)
{ {
teleporterinput(key, graphics, game, map, obj, help, music); teleporterinput();
} }
else else
{ {
@ -446,7 +446,7 @@ int main(int argc, char *argv[])
{ {
script.run(); script.run();
} }
gameinput(key, graphics, game, map, obj, help, music); gameinput();
} }
} }
maplogic(); maplogic();
@ -454,14 +454,14 @@ int main(int argc, char *argv[])
case GAMECOMPLETE: case GAMECOMPLETE:
gamecompleterender(graphics, game, obj, help, map); gamecompleterender(graphics, game, obj, help, map);
//Input //Input
gamecompleteinput(key, graphics, game, map, obj, help, music); gamecompleteinput();
//Logic //Logic
gamecompletelogic(); gamecompletelogic();
break; break;
case GAMECOMPLETE2: case GAMECOMPLETE2:
gamecompleterender2(graphics, game, obj, help); gamecompleterender2(graphics, game, obj, help);
//Input //Input
gamecompleteinput2(key, graphics, game, map, obj, help, music); gamecompleteinput2();
//Logic //Logic
gamecompletelogic2(); gamecompletelogic2();
break; break;