mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-16 12:40:38 +00:00
- cleaned out another header file.
This commit is contained in:
parent
83bcfcfd0c
commit
0d0f6854c3
9 changed files with 67 additions and 127 deletions
|
@ -448,3 +448,51 @@ enum sflags_t
|
||||||
SFLAG_KILLCOUNT = 0x10000000,
|
SFLAG_KILLCOUNT = 0x10000000,
|
||||||
SFLAG_NOCANSEECHECK = 0x20000000,
|
SFLAG_NOCANSEECHECK = 0x20000000,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
EVENT_INIT = 0,
|
||||||
|
EVENT_ENTERLEVEL,
|
||||||
|
EVENT_RESETWEAPONS, // for each player
|
||||||
|
EVENT_RESETINVENTORY, // for each player
|
||||||
|
EVENT_HOLSTER, // for each player
|
||||||
|
EVENT_LOOKLEFT, // for each player
|
||||||
|
EVENT_LOOKRIGHT, // for each player
|
||||||
|
EVENT_SOARUP, // for each player
|
||||||
|
EVENT_SOARDOWN, // for each player
|
||||||
|
EVENT_CROUCH, // for each player
|
||||||
|
EVENT_JUMP, // for each player
|
||||||
|
EVENT_RETURNTOCENTER, // for each player
|
||||||
|
EVENT_LOOKUP, // for each player
|
||||||
|
EVENT_LOOKDOWN, // for each player
|
||||||
|
EVENT_AIMUP, // for each player
|
||||||
|
EVENT_AIMDOWN, // for each player
|
||||||
|
EVENT_FIRE, // for each player
|
||||||
|
EVENT_CHANGEWEAPON, // for each player
|
||||||
|
EVENT_GETSHOTRANGE, // for each player
|
||||||
|
EVENT_GETAUTOAIMANGLE, // for each player
|
||||||
|
EVENT_GETLOADTILE,
|
||||||
|
|
||||||
|
EVENT_CHEATGETSTEROIDS,
|
||||||
|
EVENT_CHEATGETHEAT,
|
||||||
|
EVENT_CHEATGETBOOT,
|
||||||
|
EVENT_CHEATGETSHIELD,
|
||||||
|
EVENT_CHEATGETSCUBA,
|
||||||
|
EVENT_CHEATGETHOLODUKE,
|
||||||
|
EVENT_CHEATGETJETPACK,
|
||||||
|
EVENT_CHEATGETFIRSTAID,
|
||||||
|
EVENT_QUICKKICK,
|
||||||
|
EVENT_INVENTORY,
|
||||||
|
EVENT_USENIGHTVISION,
|
||||||
|
EVENT_USESTEROIDS,
|
||||||
|
EVENT_INVENTORYLEFT,
|
||||||
|
EVENT_INVENTORYRIGHT,
|
||||||
|
EVENT_HOLODUKEON,
|
||||||
|
EVENT_HOLODUKEOFF,
|
||||||
|
EVENT_USEMEDKIT,
|
||||||
|
EVENT_USEJETPACK,
|
||||||
|
EVENT_TURNAROUND,
|
||||||
|
|
||||||
|
EVENT_NUMEVENTS,
|
||||||
|
EVENT_MAXEVENT = EVENT_NUMEVENTS - 1
|
||||||
|
};
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
#include "gamecontrol.h"
|
#include "gamecontrol.h"
|
||||||
#include "game.h"
|
#include "game.h"
|
||||||
#include "gamedef.h"
|
#include "gamedef.h"
|
||||||
#include "gameexec.h"
|
|
||||||
#include "gamevar.h"
|
#include "gamevar.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
|
|
|
@ -146,4 +146,11 @@ void clearcamera(player_struct* ps);
|
||||||
void showtwoscreens(CompletionFunc func);
|
void showtwoscreens(CompletionFunc func);
|
||||||
void doorders(CompletionFunc func);
|
void doorders(CompletionFunc func);
|
||||||
|
|
||||||
|
void execute(int s, int p, int d);
|
||||||
|
void makeitfall(int s);
|
||||||
|
int furthestangle(int spriteNum, int angDiv);
|
||||||
|
void getglobalz(int s);
|
||||||
|
int getincangle(int c, int n);
|
||||||
|
void OnEvent(int id, int pnum = -1, int snum = -1, int dist = -1);
|
||||||
|
|
||||||
END_DUKE_NS
|
END_DUKE_NS
|
||||||
|
|
|
@ -74,6 +74,8 @@ typedef struct {
|
||||||
|
|
||||||
extern char const * VM_GetKeywordForID(int32_t id);
|
extern char const * VM_GetKeywordForID(int32_t id);
|
||||||
|
|
||||||
|
extern TArray<int> ScriptCode;
|
||||||
|
|
||||||
|
|
||||||
#include "concmd.h"
|
#include "concmd.h"
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,6 @@ source as it is released.
|
||||||
#include "duke3d.h"
|
#include "duke3d.h"
|
||||||
#include "gamedef.h"
|
#include "gamedef.h"
|
||||||
#include "gamevar.h"
|
#include "gamevar.h"
|
||||||
#include "gameexec.h"
|
|
||||||
|
|
||||||
BEGIN_DUKE_NS
|
BEGIN_DUKE_NS
|
||||||
|
|
||||||
|
|
|
@ -1,122 +0,0 @@
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
/*
|
|
||||||
Copyright (C) 2010 EDuke32 developers and contributors
|
|
||||||
|
|
||||||
This file is part of EDuke32.
|
|
||||||
|
|
||||||
EDuke32 is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU General Public License version 2
|
|
||||||
as published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
|
|
||||||
See the GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#ifndef gameexec_h_
|
|
||||||
#define gameexec_h_
|
|
||||||
|
|
||||||
#include "build.h"
|
|
||||||
#include "global.h"
|
|
||||||
#include "gamedef.h" // vmstate_t
|
|
||||||
|
|
||||||
BEGIN_DUKE_NS
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
EVENT_INIT = 0,
|
|
||||||
EVENT_ENTERLEVEL,
|
|
||||||
EVENT_RESETWEAPONS, // for each player
|
|
||||||
EVENT_RESETINVENTORY, // for each player
|
|
||||||
EVENT_HOLSTER, // for each player
|
|
||||||
EVENT_LOOKLEFT, // for each player
|
|
||||||
EVENT_LOOKRIGHT, // for each player
|
|
||||||
EVENT_SOARUP, // for each player
|
|
||||||
EVENT_SOARDOWN, // for each player
|
|
||||||
EVENT_CROUCH, // for each player
|
|
||||||
EVENT_JUMP, // for each player
|
|
||||||
EVENT_RETURNTOCENTER, // for each player
|
|
||||||
EVENT_LOOKUP, // for each player
|
|
||||||
EVENT_LOOKDOWN, // for each player
|
|
||||||
EVENT_AIMUP, // for each player
|
|
||||||
EVENT_AIMDOWN, // for each player
|
|
||||||
EVENT_FIRE, // for each player
|
|
||||||
EVENT_CHANGEWEAPON, // for each player
|
|
||||||
EVENT_GETSHOTRANGE, // for each player
|
|
||||||
EVENT_GETAUTOAIMANGLE, // for each player
|
|
||||||
EVENT_GETLOADTILE,
|
|
||||||
|
|
||||||
EVENT_CHEATGETSTEROIDS,
|
|
||||||
EVENT_CHEATGETHEAT,
|
|
||||||
EVENT_CHEATGETBOOT,
|
|
||||||
EVENT_CHEATGETSHIELD,
|
|
||||||
EVENT_CHEATGETSCUBA,
|
|
||||||
EVENT_CHEATGETHOLODUKE,
|
|
||||||
EVENT_CHEATGETJETPACK,
|
|
||||||
EVENT_CHEATGETFIRSTAID,
|
|
||||||
EVENT_QUICKKICK,
|
|
||||||
EVENT_INVENTORY,
|
|
||||||
EVENT_USENIGHTVISION,
|
|
||||||
EVENT_USESTEROIDS,
|
|
||||||
EVENT_INVENTORYLEFT,
|
|
||||||
EVENT_INVENTORYRIGHT,
|
|
||||||
EVENT_HOLODUKEON,
|
|
||||||
EVENT_HOLODUKEOFF,
|
|
||||||
EVENT_USEMEDKIT,
|
|
||||||
EVENT_USEJETPACK,
|
|
||||||
EVENT_TURNAROUND,
|
|
||||||
|
|
||||||
EVENT_NUMEVENTS,
|
|
||||||
EVENT_MAXEVENT = EVENT_NUMEVENTS - 1
|
|
||||||
};
|
|
||||||
|
|
||||||
extern TArray<int> ScriptCode;
|
|
||||||
|
|
||||||
|
|
||||||
void OnEvent(int id, int pnum = -1, int snum = -1, int dist = -1);
|
|
||||||
|
|
||||||
static FORCE_INLINE int32_t VM_OnEvent(int nEventID, int spriteNum=-1, int playerNum=-1, int nDist=-1, int32_t nReturn=0)
|
|
||||||
{
|
|
||||||
// set return
|
|
||||||
if (IsGameEvent(nEventID))
|
|
||||||
{
|
|
||||||
SetGameVarID(g_iReturnVarID, nReturn, spriteNum, playerNum);
|
|
||||||
OnEvent(nEventID, spriteNum, playerNum, -1);
|
|
||||||
return GetGameVarID(g_iReturnVarID, spriteNum, playerNum);
|
|
||||||
}
|
|
||||||
return nReturn;
|
|
||||||
}
|
|
||||||
|
|
||||||
static FORCE_INLINE int32_t VM_OnEventWithReturn(int nEventID, int spriteNum, int playerNum, int32_t nReturn)
|
|
||||||
{
|
|
||||||
// set return
|
|
||||||
if (IsGameEvent(nEventID))
|
|
||||||
{
|
|
||||||
SetGameVarID(g_iReturnVarID, nReturn, spriteNum, playerNum);
|
|
||||||
OnEvent(nEventID, spriteNum, playerNum, -1);
|
|
||||||
return GetGameVarID(g_iReturnVarID, spriteNum, playerNum);
|
|
||||||
}
|
|
||||||
return nReturn;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void execute(int s, int p, int d);
|
|
||||||
|
|
||||||
void makeitfall(int s);
|
|
||||||
int furthestangle(int spriteNum, int angDiv);
|
|
||||||
void getglobalz(int s);
|
|
||||||
int getincangle(int c, int n);
|
|
||||||
|
|
||||||
void G_GetTimeDate(int32_t * pValues);
|
|
||||||
int G_StartTrack(int levelNum);
|
|
||||||
|
|
||||||
END_DUKE_NS
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -30,7 +30,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "quotemgr.h"
|
#include "quotemgr.h"
|
||||||
#include "sounds.h"
|
#include "sounds.h"
|
||||||
#include "constants.h"
|
#include "constants.h"
|
||||||
#include "gameexec.h"
|
|
||||||
|
|
||||||
BEGIN_DUKE_NS
|
BEGIN_DUKE_NS
|
||||||
|
|
||||||
|
|
|
@ -334,7 +334,11 @@ static void G_CompileScripts(void)
|
||||||
Bmemset(sector, 0, MAXSECTORS*sizeof(sectortype));
|
Bmemset(sector, 0, MAXSECTORS*sizeof(sectortype));
|
||||||
Bmemset(wall, 0, MAXWALLS*sizeof(walltype));
|
Bmemset(wall, 0, MAXWALLS*sizeof(walltype));
|
||||||
|
|
||||||
VM_OnEvent(EVENT_INIT);
|
if (IsGameEvent(EVENT_INIT))
|
||||||
|
{
|
||||||
|
SetGameVarID(g_iReturnVarID, -1, -1, -1);
|
||||||
|
OnEvent(EVENT_INIT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int G_CheckPlayerColor(int color)
|
inline int G_CheckPlayerColor(int color)
|
||||||
|
|
|
@ -319,7 +319,11 @@ int G_EnterLevel(int gameMode)
|
||||||
if ((gameMode & MODE_DEMO) == 0 && ud.recstat == 2)
|
if ((gameMode & MODE_DEMO) == 0 && ud.recstat == 2)
|
||||||
ud.recstat = 0;
|
ud.recstat = 0;
|
||||||
|
|
||||||
VM_OnEvent(EVENT_ENTERLEVEL);
|
if (IsGameEvent(EVENT_ENTERLEVEL))
|
||||||
|
{
|
||||||
|
SetGameVarID(g_iReturnVarID, -1, -1, -1);
|
||||||
|
OnEvent(EVENT_ENTERLEVEL);
|
||||||
|
}
|
||||||
|
|
||||||
//if (g_networkMode != NET_DEDICATED_SERVER)
|
//if (g_networkMode != NET_DEDICATED_SERVER)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue