Skip to content

Commit

Permalink
ACS|Hexen: Removed more unnecessary globals used by the bytecode inte…
Browse files Browse the repository at this point in the history
…rpreter
  • Loading branch information
danij-deng committed Jan 27, 2014
1 parent 58436cc commit a24cbb9
Show file tree
Hide file tree
Showing 4 changed files with 167 additions and 162 deletions.
29 changes: 9 additions & 20 deletions doomsday/plugins/hexen/include/acscript.h
Expand Up @@ -75,6 +75,8 @@ void P_ReadMapACScriptData(void);
} // extern "C"
#endif

class Interpreter;

/**
* Action script thinker.
*/
Expand All @@ -89,28 +91,15 @@ typedef struct acscript_s {
int stack[ACS_STACK_DEPTH];
int stackPtr;
int vars[MAX_ACS_SCRIPT_VARS];
int const *ip;
int const *pcodePtr;

#ifdef __cplusplus
void push(int value)
{
stack[stackPtr++] = value;
}

int pop()
{
return stack[--stackPtr];
}

int top()
{
return stack[stackPtr - 1];
}

void drop()
{
stackPtr--;
}
Interpreter &interpreter() const;

void push(int value);
int pop();
int top() const;
void drop();
#endif
} ACScript;

Expand Down
8 changes: 4 additions & 4 deletions doomsday/plugins/hexen/include/p_spec.h
Expand Up @@ -50,11 +50,11 @@ void P_SpawnAllSpecialThinkers(void);

dd_bool P_SectorTagIsBusy(int tag);

dd_bool P_ExecuteLineSpecial(int special, byte* args, Line* line, int side, mobj_t* mo);
dd_bool P_ActivateLine(Line* ld, mobj_t* mo, int side, int activationType);
dd_bool P_ExecuteLineSpecial(int special, byte args[5], Line *line, int side, mobj_t *mo);
dd_bool P_ActivateLine(Line* ld, mobj_t *mo, int side, int activationType);

void P_PlayerInSpecialSector(player_t* plr);
void P_PlayerOnSpecialFloor(player_t* plr);
void P_PlayerInSpecialSector(player_t *plr);
void P_PlayerOnSpecialFloor(player_t *plr);

/**
* Parse an ANIMDEFS definition for flat/texture animations.
Expand Down

0 comments on commit a24cbb9

Please sign in to comment.