mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 19:20:38 +00:00
Fix events added in recent commits
git-svn-id: https://svn.eduke32.com/eduke32@6537 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
9e9f4168af
commit
de5f16b1c5
9 changed files with 23 additions and 23 deletions
|
@ -323,7 +323,7 @@ int32_t Anim_Play(const char *fn)
|
||||||
if (!pic)
|
if (!pic)
|
||||||
break; // no more pics!
|
break; // no more pics!
|
||||||
|
|
||||||
VM_OnEventWithReturn(EVENT_PRECUTSCENE, -1, myconnectindex, framenum);
|
VM_OnEventWithReturn(EVENT_PRECUTSCENE, g_player[screenpeek].ps->i, screenpeek, framenum);
|
||||||
|
|
||||||
clearallviews(0);
|
clearallviews(0);
|
||||||
|
|
||||||
|
@ -331,7 +331,7 @@ int32_t Anim_Play(const char *fn)
|
||||||
|
|
||||||
animvpx_render_frame(&codec);
|
animvpx_render_frame(&codec);
|
||||||
|
|
||||||
VM_OnEventWithReturn(EVENT_CUTSCENE, -1, myconnectindex, framenum);
|
VM_OnEventWithReturn(EVENT_CUTSCENE, g_player[screenpeek].ps->i, screenpeek, framenum);
|
||||||
|
|
||||||
// after rendering the frame but before displaying: maybe play sound...
|
// after rendering the frame but before displaying: maybe play sound...
|
||||||
framenum++;
|
framenum++;
|
||||||
|
@ -374,7 +374,7 @@ int32_t Anim_Play(const char *fn)
|
||||||
{
|
{
|
||||||
G_HandleAsync();
|
G_HandleAsync();
|
||||||
|
|
||||||
if (VM_OnEventWithReturn(EVENT_SKIPCUTSCENE, -1, myconnectindex, I_CheckAllInput()))
|
if (VM_OnEventWithReturn(EVENT_SKIPCUTSCENE, g_player[screenpeek].ps->i, screenpeek, I_CheckAllInput()))
|
||||||
{
|
{
|
||||||
running = 0;
|
running = 0;
|
||||||
break;
|
break;
|
||||||
|
@ -472,12 +472,12 @@ int32_t Anim_Play(const char *fn)
|
||||||
if (totalclock < ototalclock - 1)
|
if (totalclock < ototalclock - 1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
i = VM_OnEventWithReturn(EVENT_PRECUTSCENE, -1, myconnectindex, i);
|
i = VM_OnEventWithReturn(EVENT_PRECUTSCENE, g_player[screenpeek].ps->i, screenpeek, i);
|
||||||
|
|
||||||
waloff[TILE_ANIM] = (intptr_t)ANIM_DrawFrame(i);
|
waloff[TILE_ANIM] = (intptr_t)ANIM_DrawFrame(i);
|
||||||
invalidatetile(TILE_ANIM, 0, 1 << 4); // JBF 20031228
|
invalidatetile(TILE_ANIM, 0, 1 << 4); // JBF 20031228
|
||||||
|
|
||||||
if (VM_OnEventWithReturn(EVENT_SKIPCUTSCENE, -1, myconnectindex, I_CheckAllInput()))
|
if (VM_OnEventWithReturn(EVENT_SKIPCUTSCENE, g_player[screenpeek].ps->i, screenpeek, I_CheckAllInput()))
|
||||||
{
|
{
|
||||||
running = 0;
|
running = 0;
|
||||||
goto end_anim_restore_gl;
|
goto end_anim_restore_gl;
|
||||||
|
@ -496,7 +496,7 @@ int32_t Anim_Play(const char *fn)
|
||||||
rotatesprite_fs(0 << 16, 0 << 16, 65536L, 512, TILE_ANIM, 0, 0, 2 + 4 + 8 + 16 + 64 + BGSTRETCH);
|
rotatesprite_fs(0 << 16, 0 << 16, 65536L, 512, TILE_ANIM, 0, 0, 2 + 4 + 8 + 16 + 64 + BGSTRETCH);
|
||||||
|
|
||||||
g_animPtr = anim;
|
g_animPtr = anim;
|
||||||
i = VM_OnEventWithReturn(EVENT_CUTSCENE, -1, myconnectindex, i);
|
i = VM_OnEventWithReturn(EVENT_CUTSCENE, g_player[screenpeek].ps->i, screenpeek, i);
|
||||||
g_animPtr = NULL;
|
g_animPtr = NULL;
|
||||||
|
|
||||||
nextpage();
|
nextpage();
|
||||||
|
|
|
@ -1247,7 +1247,7 @@ void Screen_Play(void)
|
||||||
G_HandleAsync();
|
G_HandleAsync();
|
||||||
|
|
||||||
clearallviews(0);
|
clearallviews(0);
|
||||||
if (VM_OnEventWithReturn(EVENT_SCREEN, -1, myconnectindex, I_CheckAllInput()))
|
if (VM_OnEventWithReturn(EVENT_SCREEN, g_player[screenpeek].ps->i, screenpeek, I_CheckAllInput()))
|
||||||
running = 0;
|
running = 0;
|
||||||
|
|
||||||
nextpage();
|
nextpage();
|
||||||
|
|
|
@ -3778,7 +3778,7 @@ int Menu_Change(MenuID_t cm)
|
||||||
{
|
{
|
||||||
Menu_t * beginMenu = m_currentMenu;
|
Menu_t * beginMenu = m_currentMenu;
|
||||||
|
|
||||||
cm = VM_OnEventWithReturn(EVENT_CHANGEMENU, g_player[myconnectindex].ps->i, myconnectindex, cm);
|
cm = VM_OnEventWithReturn(EVENT_CHANGEMENU, g_player[screenpeek].ps->i, screenpeek, cm);
|
||||||
|
|
||||||
if (cm == MENU_PREVIOUS)
|
if (cm == MENU_PREVIOUS)
|
||||||
{
|
{
|
||||||
|
|
|
@ -610,12 +610,12 @@ static int32_t osdcmd_setvar(osdfuncparm_t const * const parm)
|
||||||
varval = Batol(varname);
|
varval = Batol(varname);
|
||||||
i = hash_find(&h_gamevars,varname);
|
i = hash_find(&h_gamevars,varname);
|
||||||
if (i >= 0)
|
if (i >= 0)
|
||||||
varval=Gv_GetVar(i, g_player[myconnectindex].ps->i, myconnectindex);
|
varval=Gv_GetVar(i, g_player[screenpeek].ps->i, screenpeek);
|
||||||
|
|
||||||
strcpy(varname,parm->parms[0]);
|
strcpy(varname,parm->parms[0]);
|
||||||
i = hash_find(&h_gamevars,varname);
|
i = hash_find(&h_gamevars,varname);
|
||||||
if (i >= 0)
|
if (i >= 0)
|
||||||
Gv_SetVar(i, varval, g_player[myconnectindex].ps->i, myconnectindex);
|
Gv_SetVar(i, varval, g_player[screenpeek].ps->i, screenpeek);
|
||||||
return OSDCMD_OK;
|
return OSDCMD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -635,7 +635,7 @@ static int32_t osdcmd_addlogvar(osdfuncparm_t const * const parm)
|
||||||
strcpy(varname,parm->parms[0]);
|
strcpy(varname,parm->parms[0]);
|
||||||
i = hash_find(&h_gamevars,varname);
|
i = hash_find(&h_gamevars,varname);
|
||||||
if (i >= 0)
|
if (i >= 0)
|
||||||
OSD_Printf("%s = %d\n", varname, Gv_GetVar(i, g_player[myconnectindex].ps->i, myconnectindex));
|
OSD_Printf("%s = %d\n", varname, Gv_GetVar(i, g_player[screenpeek].ps->i, screenpeek));
|
||||||
return OSDCMD_OK;
|
return OSDCMD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -664,7 +664,7 @@ static int32_t osdcmd_setactorvar(osdfuncparm_t const * const parm)
|
||||||
varval = Batol(varname);
|
varval = Batol(varname);
|
||||||
i = hash_find(&h_gamevars,varname);
|
i = hash_find(&h_gamevars,varname);
|
||||||
if (i >= 0)
|
if (i >= 0)
|
||||||
varval=Gv_GetVar(i, g_player[myconnectindex].ps->i, myconnectindex);
|
varval=Gv_GetVar(i, g_player[screenpeek].ps->i, screenpeek);
|
||||||
|
|
||||||
strcpy(varname,parm->parms[1]);
|
strcpy(varname,parm->parms[1]);
|
||||||
i = hash_find(&h_gamevars,varname);
|
i = hash_find(&h_gamevars,varname);
|
||||||
|
|
|
@ -319,7 +319,7 @@ static void G_DoLoadScreen(const char *statustext, int32_t percent)
|
||||||
|
|
||||||
if (ud.recstat != 2)
|
if (ud.recstat != 2)
|
||||||
{
|
{
|
||||||
j = VM_OnEventWithReturn(EVENT_GETLOADTILE, -1, myconnectindex, LOADSCREEN);
|
j = VM_OnEventWithReturn(EVENT_GETLOADTILE, g_player[screenpeek].ps->i, screenpeek, LOADSCREEN);
|
||||||
|
|
||||||
//g_player[myconnectindex].ps->palette = palette;
|
//g_player[myconnectindex].ps->palette = palette;
|
||||||
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 1); // JBF 20040308
|
P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 1); // JBF 20040308
|
||||||
|
@ -390,7 +390,7 @@ static void G_DoLoadScreen(const char *statustext, int32_t percent)
|
||||||
}
|
}
|
||||||
/*Gv_SetVar(g_iReturnVarID,LOADSCREEN, -1, -1);*/
|
/*Gv_SetVar(g_iReturnVarID,LOADSCREEN, -1, -1);*/
|
||||||
|
|
||||||
j = VM_OnEventWithReturn(EVENT_GETLOADTILE, -1, myconnectindex, LOADSCREEN);
|
j = VM_OnEventWithReturn(EVENT_GETLOADTILE, g_player[screenpeek].ps->i, screenpeek, LOADSCREEN);
|
||||||
|
|
||||||
if ((uint32_t)j < 2*MAXTILES)
|
if ((uint32_t)j < 2*MAXTILES)
|
||||||
{
|
{
|
||||||
|
@ -1462,7 +1462,7 @@ end_vol4a:
|
||||||
El_CreateGameState();
|
El_CreateGameState();
|
||||||
G_PostCreateGameState();
|
G_PostCreateGameState();
|
||||||
#endif
|
#endif
|
||||||
VM_OnEvent(EVENT_NEWGAME, g_player[myconnectindex].ps->i, myconnectindex);
|
VM_OnEvent(EVENT_NEWGAME, g_player[screenpeek].ps->i, screenpeek);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void resetpspritevars(char gameMode)
|
static void resetpspritevars(char gameMode)
|
||||||
|
|
|
@ -263,7 +263,7 @@ int32_t G_LoadPlayer(int32_t spot)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
VM_OnEvent(EVENT_PRELOADGAME, g_player[myconnectindex].ps->i, myconnectindex);
|
VM_OnEvent(EVENT_PRELOADGAME, g_player[screenpeek].ps->i, screenpeek);
|
||||||
|
|
||||||
// some setup first
|
// some setup first
|
||||||
ud.multimode = h.numplayers;
|
ud.multimode = h.numplayers;
|
||||||
|
@ -332,7 +332,7 @@ int32_t G_LoadPlayer(int32_t spot)
|
||||||
}
|
}
|
||||||
sv_postudload(); // ud.m_XXX = ud.XXX
|
sv_postudload(); // ud.m_XXX = ud.XXX
|
||||||
|
|
||||||
VM_OnEvent(EVENT_LOADGAME, g_player[myconnectindex].ps->i, myconnectindex);
|
VM_OnEvent(EVENT_LOADGAME, g_player[screenpeek].ps->i, screenpeek);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -438,7 +438,7 @@ int32_t G_SavePlayer(int32_t spot)
|
||||||
polymer_resetlights();
|
polymer_resetlights();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
VM_OnEvent(EVENT_SAVEGAME, g_player[myconnectindex].ps->i, myconnectindex);
|
VM_OnEvent(EVENT_SAVEGAME, g_player[screenpeek].ps->i, screenpeek);
|
||||||
|
|
||||||
// SAVE!
|
// SAVE!
|
||||||
sv_saveandmakesnapshot(fil, spot, 0, 0, 0);
|
sv_saveandmakesnapshot(fil, spot, 0, 0, 0);
|
||||||
|
@ -462,7 +462,7 @@ int32_t G_SavePlayer(int32_t spot)
|
||||||
G_RestoreTimers();
|
G_RestoreTimers();
|
||||||
ototalclock = totalclock;
|
ototalclock = totalclock;
|
||||||
|
|
||||||
VM_OnEvent(EVENT_POSTSAVEGAME, g_player[myconnectindex].ps->i, myconnectindex);
|
VM_OnEvent(EVENT_POSTSAVEGAME, g_player[screenpeek].ps->i, screenpeek);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1037,7 +1037,7 @@ void G_DrawBackground(void)
|
||||||
|
|
||||||
// when not rendering a game, fullscreen wipe
|
// when not rendering a game, fullscreen wipe
|
||||||
// Gv_SetVar(g_iReturnVarID,tilesizx[MENUTILE]==320&&tilesizy[MENUTILE]==200?MENUTILE:BIGHOLE, -1, -1);
|
// Gv_SetVar(g_iReturnVarID,tilesizx[MENUTILE]==320&&tilesizy[MENUTILE]==200?MENUTILE:BIGHOLE, -1, -1);
|
||||||
bgtile = VM_OnEventWithReturn(EVENT_GETMENUTILE, -1, myconnectindex, bgtile);
|
bgtile = VM_OnEventWithReturn(EVENT_GETMENUTILE, g_player[screenpeek].ps->i, screenpeek, bgtile);
|
||||||
// MENU_TILE: is the menu tile tileable?
|
// MENU_TILE: is the menu tile tileable?
|
||||||
#if !defined LUNATIC
|
#if !defined LUNATIC
|
||||||
if (Gv_GetVarByLabel("MENU_TILE", !fstilep, -1, -1))
|
if (Gv_GetVarByLabel("MENU_TILE", !fstilep, -1, -1))
|
||||||
|
|
|
@ -1198,7 +1198,7 @@ void G_DisplayRest(int32_t smoothratio)
|
||||||
G_PrintFPS();
|
G_PrintFPS();
|
||||||
|
|
||||||
// JBF 20040124: display level stats in screen corner
|
// JBF 20040124: display level stats in screen corner
|
||||||
if (ud.overhead_on != 2 && ud.levelstats && VM_OnEvent(EVENT_DISPLAYLEVELSTATS, g_player[myconnectindex].ps->i, myconnectindex) == 0)
|
if (ud.overhead_on != 2 && ud.levelstats && VM_OnEvent(EVENT_DISPLAYLEVELSTATS, g_player[screenpeek].ps->i, screenpeek) == 0)
|
||||||
{
|
{
|
||||||
DukePlayer_t const * const myps = g_player[myconnectindex].ps;
|
DukePlayer_t const * const myps = g_player[myconnectindex].ps;
|
||||||
|
|
||||||
|
@ -1629,7 +1629,7 @@ void G_DisplayLogo(void)
|
||||||
#ifdef LUNATIC
|
#ifdef LUNATIC
|
||||||
g_elEventError = 0;
|
g_elEventError = 0;
|
||||||
#endif
|
#endif
|
||||||
VM_OnEvent(EVENT_LOGO, -1, screenpeek);
|
VM_OnEvent(EVENT_LOGO, g_player[screenpeek].ps->i, screenpeek);
|
||||||
|
|
||||||
if (g_restorePalette)
|
if (g_restorePalette)
|
||||||
{
|
{
|
||||||
|
|
|
@ -181,7 +181,7 @@ void S_MenuSound(void)
|
||||||
PISTOL_RICOCHET, PISTOL_BODYHIT, PISTOL_FIRE, SHOTGUN_FIRE, BOS1_WALK, RPG_EXPLODE,
|
PISTOL_RICOCHET, PISTOL_BODYHIT, PISTOL_FIRE, SHOTGUN_FIRE, BOS1_WALK, RPG_EXPLODE,
|
||||||
PIPEBOMB_BOUNCE, PIPEBOMB_EXPLODE, NITEVISION_ONOFF, RPG_SHOOT, SELECT_WEAPON,
|
PIPEBOMB_BOUNCE, PIPEBOMB_EXPLODE, NITEVISION_ONOFF, RPG_SHOOT, SELECT_WEAPON,
|
||||||
};
|
};
|
||||||
int32_t s = VM_OnEventWithReturn(EVENT_OPENMENUSOUND, -1, myconnectindex, menusnds[SoundNum++ % ARRAY_SIZE(menusnds)]);
|
int32_t s = VM_OnEventWithReturn(EVENT_OPENMENUSOUND, g_player[screenpeek].ps->i, screenpeek, menusnds[SoundNum++ % ARRAY_SIZE(menusnds)]);
|
||||||
if (s != -1)
|
if (s != -1)
|
||||||
S_PlaySound(s);
|
S_PlaySound(s);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue