Remove global args from scriptclass

This commit removes all global args from the parameters of each function
on the scriptclass object, and updates all places they are called
accordingly. It also changes all instances of 'dwgfx' to 'graphics' in
Script.cpp.

Interestingly enough, it looks like editor.h depended on Script.h's
class define of the musicclass. I've temporarily placed the class define
in editor.h, but by the end of this patchset it'll be gone.
This commit is contained in:
Misa
2020-03-31 12:38:52 -07:00
committed by Ethan Lee
parent 2826bd828c
commit ea3c778b84
7 changed files with 172 additions and 180 deletions

View File

@@ -278,7 +278,7 @@ void towerlogic(Graphics& dwgfx, Game& game, entityclass& obj, musicclass& musi
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);
if (dwgfx.fademode == 1) script.resetgametomenu();
}
else
{
@@ -523,7 +523,7 @@ void towerlogic(Graphics& dwgfx, Game& game, entityclass& obj, musicclass& musi
//Looping around, room change conditions!
}
if (game.teleport_to_new_area) script.teleport(dwgfx, game, map, obj, help, music);
if (game.teleport_to_new_area) script.teleport();
}
void gamelogic(Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music, mapclass& map, UtilityClass& help)
@@ -657,7 +657,7 @@ void gamelogic(Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music
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);
if (dwgfx.fademode == 1) script.resetgametomenu();
}
else
{
@@ -1544,5 +1544,5 @@ void gamelogic(Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music
}
if (game.teleport_to_new_area)
script.teleport(dwgfx, game, map, obj, help, music);
script.teleport();
}