mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-14 00:21:38 +00:00
Add vm_player, vm_sprite and vm_distance to get/setuserdef. This controls the sprite and player referenced by things like "THISACTOR", all of the "ifp" conditionals, per-actor gamevar access, etc. This is intended to be used to un-gimp things like EVENT_WORLD.
git-svn-id: https://svn.eduke32.com/eduke32@5489 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
6f43820a12
commit
97c4b40ca2
3 changed files with 12 additions and 0 deletions
|
@ -1168,6 +1168,9 @@ const memberlabel_t UserdefsLabels[]=
|
||||||
{ "m_gametypeflags", USERDEFS_M_GAMETYPEFLAGS, 0, 0 },
|
{ "m_gametypeflags", USERDEFS_M_GAMETYPEFLAGS, 0, 0 },
|
||||||
{ "globalflags", USERDEFS_GLOBALFLAGS, 0, 0 },
|
{ "globalflags", USERDEFS_GLOBALFLAGS, 0, 0 },
|
||||||
{ "globalgameflags", USERDEFS_GLOBALGAMEFLAGS, 0, 0 },
|
{ "globalgameflags", USERDEFS_GLOBALGAMEFLAGS, 0, 0 },
|
||||||
|
{ "vm_player", USERDEFS_VM_PLAYER, 0, 0 },
|
||||||
|
{ "vm_sprite", USERDEFS_VM_SPRITE, 0, 0 },
|
||||||
|
{ "vm_distance", USERDEFS_VM_DISTANCE, 0, 0 },
|
||||||
{ "", -1, 0, 0 } // END OF LIST
|
{ "", -1, 0, 0 } // END OF LIST
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -472,6 +472,9 @@ enum UserdefsLabel_t
|
||||||
USERDEFS_M_GAMETYPEFLAGS,
|
USERDEFS_M_GAMETYPEFLAGS,
|
||||||
USERDEFS_GLOBALFLAGS,
|
USERDEFS_GLOBALFLAGS,
|
||||||
USERDEFS_GLOBALGAMEFLAGS,
|
USERDEFS_GLOBALGAMEFLAGS,
|
||||||
|
USERDEFS_VM_PLAYER,
|
||||||
|
USERDEFS_VM_SPRITE,
|
||||||
|
USERDEFS_VM_DISTANCE,
|
||||||
USERDEFS_END
|
USERDEFS_END
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -170,6 +170,9 @@ int32_t __fastcall VM_GetUserdef(register int32_t lLabelID)
|
||||||
case USERDEFS_M_GAMETYPEFLAGS: lLabelID = GametypeFlags[ud.m_coop]; break;
|
case USERDEFS_M_GAMETYPEFLAGS: lLabelID = GametypeFlags[ud.m_coop]; break;
|
||||||
case USERDEFS_GLOBALFLAGS: lLabelID = globalflags; break;
|
case USERDEFS_GLOBALFLAGS: lLabelID = globalflags; break;
|
||||||
case USERDEFS_GLOBALGAMEFLAGS: lLabelID = duke3d_globalflags; break;
|
case USERDEFS_GLOBALGAMEFLAGS: lLabelID = duke3d_globalflags; break;
|
||||||
|
case USERDEFS_VM_PLAYER: lLabelID = vm.g_p; break;
|
||||||
|
case USERDEFS_VM_SPRITE: lLabelID = vm.g_i; break;
|
||||||
|
case USERDEFS_VM_DISTANCE: lLabelID = vm.g_x; break;
|
||||||
default: lLabelID = -1; break;
|
default: lLabelID = -1; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -286,6 +289,9 @@ void __fastcall VM_SetUserdef(register int32_t const lLabelID, register int32_t
|
||||||
case USERDEFS_M_ORIGIN_Y: ud.m_origin.y = iSet; break;
|
case USERDEFS_M_ORIGIN_Y: ud.m_origin.y = iSet; break;
|
||||||
case USERDEFS_GLOBALFLAGS: globalflags = iSet; break;
|
case USERDEFS_GLOBALFLAGS: globalflags = iSet; break;
|
||||||
case USERDEFS_GLOBALGAMEFLAGS: duke3d_globalflags = iSet; break;
|
case USERDEFS_GLOBALGAMEFLAGS: duke3d_globalflags = iSet; break;
|
||||||
|
case USERDEFS_VM_PLAYER: vm.g_p = iSet; vm.g_pp = g_player[iSet].ps; break;
|
||||||
|
case USERDEFS_VM_SPRITE: vm.g_i = iSet; vm.g_sp = &sprite[iSet]; vm.g_t = &actor[iSet].t_data[0]; break;
|
||||||
|
case USERDEFS_VM_DISTANCE: vm.g_x = iSet; break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue