mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-21 19:11:06 +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
|
#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__
|
#if defined __GNUC__ || defined __clang__
|
||||||
# define CON_USE_COMPUTED_GOTO
|
# define CON_USE_COMPUTED_GOTO
|
||||||
#endif
|
#endif
|
||||||
|
@ -1300,6 +1290,17 @@ void Screen_Play(void)
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} 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*/)
|
GAMEEXEC_STATIC void VM_Execute(bool const loop /*= false*/)
|
||||||
{
|
{
|
||||||
native_t vm_execution_depth = loop;
|
native_t vm_execution_depth = loop;
|
||||||
|
@ -2997,11 +2998,11 @@ badindex:
|
||||||
|
|
||||||
vInstruction(CON_IFRESPAWN):
|
vInstruction(CON_IFRESPAWN):
|
||||||
if (A_CheckEnemySprite(vm.pSprite))
|
if (A_CheckEnemySprite(vm.pSprite))
|
||||||
VM_CONDITIONAL(ud.respawn_monsters)
|
VM_CONDITIONAL(ud.respawn_monsters);
|
||||||
else if (A_CheckInventorySprite(vm.pSprite))
|
else if (A_CheckInventorySprite(vm.pSprite))
|
||||||
VM_CONDITIONAL(ud.respawn_inventory)
|
VM_CONDITIONAL(ud.respawn_inventory);
|
||||||
else
|
else
|
||||||
VM_CONDITIONAL(ud.respawn_items)
|
VM_CONDITIONAL(ud.respawn_items);
|
||||||
dispatch();
|
dispatch();
|
||||||
|
|
||||||
vInstruction(CON_IFINOUTERSPACE):
|
vInstruction(CON_IFINOUTERSPACE):
|
||||||
|
|
Loading…
Reference in a new issue