mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +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
|
||||
{
|
||||
handleevents();
|
||||
Net_GetPackets();
|
||||
G_HandleAsync();
|
||||
|
||||
if (I_CheckAllInput())
|
||||
{
|
||||
|
@ -404,8 +403,7 @@ void G_PlayAnim(const char *fn,char t)
|
|||
|
||||
while (totalclock < ototalclock)
|
||||
{
|
||||
handleevents();
|
||||
Net_GetPackets();
|
||||
G_HandleAsync();
|
||||
|
||||
if (I_CheckAllInput())
|
||||
goto ENDOFANIMLOOP;
|
||||
|
|
|
@ -1919,12 +1919,6 @@ void P_DoQuote(int32_t q, DukePlayer_t *p)
|
|||
|
||||
|
||||
////////// OFTEN-USED FEW-LINERS //////////
|
||||
static void G_HandleAsync(void)
|
||||
{
|
||||
handleevents();
|
||||
Net_GetPackets();
|
||||
}
|
||||
|
||||
static void handle_events_while_no_input(void)
|
||||
{
|
||||
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 S_StopSound(num) S_StopEnvSound(num, -1)
|
||||
|
||||
static inline void G_HandleAsync(void)
|
||||
{
|
||||
handleevents();
|
||||
Net_GetPackets();
|
||||
}
|
||||
|
||||
// sector effector lotags
|
||||
enum {
|
||||
SE_16_REACTOR = 16,
|
||||
|
|
|
@ -2005,8 +2005,7 @@ void Net_WaitForServer(void)
|
|||
if (g_netClientPeer)
|
||||
enet_peer_send(g_netClientPeer, CHAN_GAMESTATE, enet_packet_create(packbuf, 2, ENET_PACKET_FLAG_RELIABLE));
|
||||
|
||||
handleevents();
|
||||
Net_GetPackets();
|
||||
G_HandleAsync();
|
||||
|
||||
if (g_player[0].pingcnt > server_ready)
|
||||
{
|
||||
|
|
|
@ -330,10 +330,8 @@ static void G_PrecacheSounds(void)
|
|||
{
|
||||
j++;
|
||||
if ((j&7) == 0)
|
||||
{
|
||||
handleevents();
|
||||
Net_GetPackets();
|
||||
}
|
||||
G_HandleAsync();
|
||||
|
||||
G_CacheSound(i);
|
||||
}
|
||||
}
|
||||
|
@ -545,10 +543,8 @@ void G_CacheMapData(void)
|
|||
MUSIC_Update();
|
||||
|
||||
if ((j&7) == 0)
|
||||
{
|
||||
handleevents();
|
||||
Net_GetPackets();
|
||||
}
|
||||
G_HandleAsync();
|
||||
|
||||
if (totalclock - tc > TICRATE/4)
|
||||
{
|
||||
/*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;
|
||||
int32_t i;
|
||||
|
||||
handleevents();
|
||||
Net_GetPackets();
|
||||
G_HandleAsync();
|
||||
|
||||
if (g_skillSoundID >= 0 && ud.config.FXDevice >= 0 && ud.config.SoundToggle)
|
||||
{
|
||||
while (S_CheckSoundPlaying(-1, g_skillSoundID))
|
||||
{
|
||||
handleevents();
|
||||
Net_GetPackets();
|
||||
}
|
||||
G_HandleAsync();
|
||||
}
|
||||
|
||||
g_skillSoundID = -1;
|
||||
|
|
Loading…
Reference in a new issue