mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 19:20:38 +00:00
Move G_HandleAsync() into game.h as 'static inline' and use everywhere else.
git-svn-id: https://svn.eduke32.com/eduke32@2996 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
9311432cbf
commit
e417274c1e
5 changed files with 15 additions and 26 deletions
|
@ -332,8 +332,7 @@ void G_PlayAnim(const char *fn,char t)
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
handleevents();
|
G_HandleAsync();
|
||||||
Net_GetPackets();
|
|
||||||
|
|
||||||
if (I_CheckAllInput())
|
if (I_CheckAllInput())
|
||||||
{
|
{
|
||||||
|
@ -404,8 +403,7 @@ void G_PlayAnim(const char *fn,char t)
|
||||||
|
|
||||||
while (totalclock < ototalclock)
|
while (totalclock < ototalclock)
|
||||||
{
|
{
|
||||||
handleevents();
|
G_HandleAsync();
|
||||||
Net_GetPackets();
|
|
||||||
|
|
||||||
if (I_CheckAllInput())
|
if (I_CheckAllInput())
|
||||||
goto ENDOFANIMLOOP;
|
goto ENDOFANIMLOOP;
|
||||||
|
|
|
@ -1919,12 +1919,6 @@ void P_DoQuote(int32_t q, DukePlayer_t *p)
|
||||||
|
|
||||||
|
|
||||||
////////// OFTEN-USED FEW-LINERS //////////
|
////////// OFTEN-USED FEW-LINERS //////////
|
||||||
static void G_HandleAsync(void)
|
|
||||||
{
|
|
||||||
handleevents();
|
|
||||||
Net_GetPackets();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void handle_events_while_no_input(void)
|
static void handle_events_while_no_input(void)
|
||||||
{
|
{
|
||||||
I_ClearInputWaiting();
|
I_ClearInputWaiting();
|
||||||
|
|
|
@ -335,6 +335,12 @@ extern char forcegl;
|
||||||
#define Net_EnterText(x, y, t, dalen, c) _EnterText(1,x,y,t,dalen,c)
|
#define Net_EnterText(x, y, t, dalen, c) _EnterText(1,x,y,t,dalen,c)
|
||||||
#define S_StopSound(num) S_StopEnvSound(num, -1)
|
#define S_StopSound(num) S_StopEnvSound(num, -1)
|
||||||
|
|
||||||
|
static inline void G_HandleAsync(void)
|
||||||
|
{
|
||||||
|
handleevents();
|
||||||
|
Net_GetPackets();
|
||||||
|
}
|
||||||
|
|
||||||
// sector effector lotags
|
// sector effector lotags
|
||||||
enum {
|
enum {
|
||||||
SE_16_REACTOR = 16,
|
SE_16_REACTOR = 16,
|
||||||
|
|
|
@ -2005,8 +2005,7 @@ void Net_WaitForServer(void)
|
||||||
if (g_netClientPeer)
|
if (g_netClientPeer)
|
||||||
enet_peer_send(g_netClientPeer, CHAN_GAMESTATE, enet_packet_create(packbuf, 2, ENET_PACKET_FLAG_RELIABLE));
|
enet_peer_send(g_netClientPeer, CHAN_GAMESTATE, enet_packet_create(packbuf, 2, ENET_PACKET_FLAG_RELIABLE));
|
||||||
|
|
||||||
handleevents();
|
G_HandleAsync();
|
||||||
Net_GetPackets();
|
|
||||||
|
|
||||||
if (g_player[0].pingcnt > server_ready)
|
if (g_player[0].pingcnt > server_ready)
|
||||||
{
|
{
|
||||||
|
|
|
@ -330,10 +330,8 @@ static void G_PrecacheSounds(void)
|
||||||
{
|
{
|
||||||
j++;
|
j++;
|
||||||
if ((j&7) == 0)
|
if ((j&7) == 0)
|
||||||
{
|
G_HandleAsync();
|
||||||
handleevents();
|
|
||||||
Net_GetPackets();
|
|
||||||
}
|
|
||||||
G_CacheSound(i);
|
G_CacheSound(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -545,10 +543,8 @@ void G_CacheMapData(void)
|
||||||
MUSIC_Update();
|
MUSIC_Update();
|
||||||
|
|
||||||
if ((j&7) == 0)
|
if ((j&7) == 0)
|
||||||
{
|
G_HandleAsync();
|
||||||
handleevents();
|
|
||||||
Net_GetPackets();
|
|
||||||
}
|
|
||||||
if (totalclock - tc > TICRATE/4)
|
if (totalclock - tc > TICRATE/4)
|
||||||
{
|
{
|
||||||
/*Bsprintf(tempbuf,"%d resources remaining\n",g_precacheCount-pc+1);*/
|
/*Bsprintf(tempbuf,"%d resources remaining\n",g_precacheCount-pc+1);*/
|
||||||
|
@ -1446,16 +1442,12 @@ void G_NewGame(int32_t vn,int32_t ln,int32_t sk)
|
||||||
DukePlayer_t *p = g_player[0].ps;
|
DukePlayer_t *p = g_player[0].ps;
|
||||||
int32_t i;
|
int32_t i;
|
||||||
|
|
||||||
handleevents();
|
G_HandleAsync();
|
||||||
Net_GetPackets();
|
|
||||||
|
|
||||||
if (g_skillSoundID >= 0 && ud.config.FXDevice >= 0 && ud.config.SoundToggle)
|
if (g_skillSoundID >= 0 && ud.config.FXDevice >= 0 && ud.config.SoundToggle)
|
||||||
{
|
{
|
||||||
while (S_CheckSoundPlaying(-1, g_skillSoundID))
|
while (S_CheckSoundPlaying(-1, g_skillSoundID))
|
||||||
{
|
G_HandleAsync();
|
||||||
handleevents();
|
|
||||||
Net_GetPackets();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
g_skillSoundID = -1;
|
g_skillSoundID = -1;
|
||||||
|
|
Loading…
Reference in a new issue