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 authored and Ethan Lee committed 2020-04-03 10:40:50 -04:00
1 parent 2826bd828c
commit ea3c778b84
7 files changed
+172 -180

No files matched your search

+4 -4
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();
}