mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Fix old issue with VM_CONDITIONAL macro
git-svn-id: https://svn.eduke32.com/eduke32@7655 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
e69fb3934e
commit
9ba2a3b719
1 changed files with 14 additions and 13 deletions
|
@ -1257,16 +1257,6 @@ void Screen_Play(void)
|
|||
}
|
||||
|
||||
#if !defined LUNATIC
|
||||
// be careful when changing this--the assignment used as a condition doubles as a null pointer check
|
||||
#define VM_CONDITIONAL(xxx) \
|
||||
{ \
|
||||
if ((xxx) || ((insptr = (intptr_t *)insptr[1]) && ((*insptr & VM_INSTMASK) == CON_ELSE))) \
|
||||
{ \
|
||||
insptr += 2; \
|
||||
VM_Execute(); \
|
||||
} \
|
||||
}
|
||||
|
||||
#if defined __GNUC__ || defined __clang__
|
||||
# define CON_USE_COMPUTED_GOTO
|
||||
#endif
|
||||
|
@ -1300,6 +1290,17 @@ void Screen_Play(void)
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
// be careful when changing this--the assignment used as a condition doubles as a null pointer check
|
||||
#define VM_CONDITIONAL(xxx) \
|
||||
do \
|
||||
{ \
|
||||
if ((xxx) || ((insptr = (intptr_t *)insptr[1]) && ((*insptr & VM_INSTMASK) == CON_ELSE))) \
|
||||
{ \
|
||||
insptr += 2; \
|
||||
VM_Execute(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
GAMEEXEC_STATIC void VM_Execute(bool const loop /*= false*/)
|
||||
{
|
||||
native_t vm_execution_depth = loop;
|
||||
|
@ -2997,11 +2998,11 @@ badindex:
|
|||
|
||||
vInstruction(CON_IFRESPAWN):
|
||||
if (A_CheckEnemySprite(vm.pSprite))
|
||||
VM_CONDITIONAL(ud.respawn_monsters)
|
||||
VM_CONDITIONAL(ud.respawn_monsters);
|
||||
else if (A_CheckInventorySprite(vm.pSprite))
|
||||
VM_CONDITIONAL(ud.respawn_inventory)
|
||||
VM_CONDITIONAL(ud.respawn_inventory);
|
||||
else
|
||||
VM_CONDITIONAL(ud.respawn_items)
|
||||
VM_CONDITIONAL(ud.respawn_items);
|
||||
dispatch();
|
||||
|
||||
vInstruction(CON_IFINOUTERSPACE):
|
||||
|
|
Loading…
Reference in a new issue