mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
CON: Add EVENT_WORLD, EVENT_PREWORLD, and EVENT_PRELEVEL, which respectively function as EVENT_GAME, EVENT_PREGAME, and EVENT_LOADACTOR, but only running once instead of per-actor.
git-svn-id: https://svn.eduke32.com/eduke32@5098 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
c784fdb21c
commit
8a9fb41d5f
5 changed files with 16 additions and 1 deletions
|
@ -8228,6 +8228,8 @@ void G_MoveWorld(void)
|
|||
{
|
||||
extern double g_moveActorsTime;
|
||||
|
||||
VM_OnEvent(EVENT_PREWORLD, -1, -1);
|
||||
|
||||
if (EDUKE32_PREDICT_FALSE(VM_HaveEvent(EVENT_PREGAME)))
|
||||
{
|
||||
int32_t i, j, k = 0, p, pl;
|
||||
|
@ -8279,6 +8281,8 @@ void G_MoveWorld(void)
|
|||
G_MoveStandables(); //ST 6
|
||||
|
||||
|
||||
VM_OnEvent(EVENT_WORLD, -1, -1);
|
||||
|
||||
if (EDUKE32_PREDICT_FALSE(VM_HaveEvent(EVENT_GAME)))
|
||||
{
|
||||
int32_t i, j, k = 0, p, pl;
|
||||
|
|
|
@ -110,6 +110,9 @@ enum GameEvent_t {
|
|||
EVENT_DISPLAYCAMERAOSD,
|
||||
EVENT_DISPLAYROOMSCAMERA,
|
||||
EVENT_DISPLAYSTART,
|
||||
EVENT_WORLD,
|
||||
EVENT_PREWORLD,
|
||||
EVENT_PRELEVEL,
|
||||
#ifdef LUNATIC
|
||||
EVENT_ANIMATEALLSPRITES,
|
||||
#endif
|
||||
|
|
|
@ -678,6 +678,9 @@ const char *EventNames[MAXEVENTS] =
|
|||
"EVENT_DISPLAYCAMERAOSD",
|
||||
"EVENT_DISPLAYROOMSCAMERA",
|
||||
"EVENT_DISPLAYSTART",
|
||||
"EVENT_WORLD",
|
||||
"EVENT_PREWORLD",
|
||||
"EVENT_PRELEVEL",
|
||||
#ifdef LUNATIC
|
||||
"EVENT_ANIMATEALLSPRITES",
|
||||
#endif
|
||||
|
|
|
@ -182,11 +182,14 @@ EVENT = {
|
|||
EVENT_DISPLAYCAMERAOSD = 102,
|
||||
EVENT_DISPLAYROOMSCAMERA = 103,
|
||||
EVENT_DISPLAYSTART = 104,
|
||||
EVENT_WORLD = 105,
|
||||
EVENT_PREWORLD = 106,
|
||||
EVENT_PRELEVEL = 107,
|
||||
-- EVENT_ANIMATEALLSPRITES = previous+1, -- internal
|
||||
-- KEEPINSYNC with MAXEVENTS below
|
||||
}
|
||||
|
||||
MAXEVENTS = 105 -- KEEPINSYNC with above EVENT_* list
|
||||
MAXEVENTS = 108 -- KEEPINSYNC with above EVENT_* list
|
||||
|
||||
-- NOTE: negated values are not exported to the ffi.C namespace or CON.
|
||||
-- See TWEAK_SFLAG below.
|
||||
|
|
|
@ -1041,6 +1041,8 @@ static void prelevel(char g)
|
|||
|
||||
G_SetupGlobalPsky();
|
||||
|
||||
VM_OnEvent(EVENT_PRELEVEL, -1, -1);
|
||||
|
||||
for (i=0; i<numsectors; i++)
|
||||
{
|
||||
sector[i].extra = 256;
|
||||
|
|
Loading…
Reference in a new issue