2008-09-03 04:20:46 +00:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
/*
|
2010-05-25 10:56:00 +00:00
|
|
|
Copyright (C) 2010 EDuke32 developers and contributors
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2010-05-25 10:56:00 +00:00
|
|
|
This file is part of EDuke32.
|
2008-09-03 04:20:46 +00:00
|
|
|
|
|
|
|
EDuke32 is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License version 2
|
|
|
|
as published by the Free Software Foundation.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
2014-07-20 08:55:56 +00:00
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2008-09-03 04:20:46 +00:00
|
|
|
*/
|
|
|
|
//-------------------------------------------------------------------------
|
2010-05-25 10:56:00 +00:00
|
|
|
|
2008-12-13 08:02:22 +00:00
|
|
|
/*
|
2008-09-03 04:20:46 +00:00
|
|
|
#include "duke3d.h"
|
|
|
|
#include "gamedef.h"
|
|
|
|
#include "osd.h"
|
2008-12-13 08:02:22 +00:00
|
|
|
*/
|
2008-09-03 04:20:46 +00:00
|
|
|
// this is all the crap for accessing the game's structs through the CON VM
|
2008-12-13 21:01:33 +00:00
|
|
|
// I got a 3-4 fps gain by inlining these...
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2009-01-07 14:05:13 +00:00
|
|
|
#ifndef _gamevars_c_
|
2010-05-02 23:27:30 +00:00
|
|
|
static void __fastcall VM_AccessUserdef(int32_t iSet, int32_t lLabelID, int32_t lVar2)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2009-01-09 09:29:17 +00:00
|
|
|
int32_t lValue=0;
|
2008-12-13 08:02:22 +00:00
|
|
|
|
2014-10-25 03:36:34 +00:00
|
|
|
if (EDUKE32_PREDICT_FALSE(vm.g_p != myconnectindex))
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2009-06-24 08:20:10 +00:00
|
|
|
// if (lVar2 == MAXGAMEVARS)
|
|
|
|
// insptr++;
|
2008-09-03 04:20:46 +00:00
|
|
|
insptr += (lVar2 == MAXGAMEVARS);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2008-12-13 08:02:22 +00:00
|
|
|
if (iSet)
|
2011-03-04 08:50:58 +00:00
|
|
|
lValue=Gv_GetVarX(lVar2);
|
2008-12-13 08:02:22 +00:00
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case USERDEFS_GOD:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.god = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.god);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_WARP_ON:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.warp_on = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.warp_on);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_CASHMAN:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.cashman = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.cashman);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_EOG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.eog = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.eog);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_SHOWALLMAP:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.showallmap = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.showallmap);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_SHOW_HELP:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.show_help = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.show_help);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_SCROLLMODE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.scrollmode = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.scrollmode);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_CLIPPING:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-03-11 17:38:50 +00:00
|
|
|
ud.noclip = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-03-11 17:38:50 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.noclip);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
// case USERDEFS_USER_NAME:
|
|
|
|
// if(iSet)
|
|
|
|
// {
|
2008-12-13 08:02:22 +00:00
|
|
|
// ud.user_name[MAXPLAYERS][32] = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
// return;
|
|
|
|
// }
|
2011-03-04 08:50:58 +00:00
|
|
|
// Gv_SetVarX(lVar2, ud.user_name[MAXPLAYERS][32]);
|
2008-09-03 04:20:46 +00:00
|
|
|
// return;
|
|
|
|
|
|
|
|
// case USERDEFS_RIDECULE:
|
|
|
|
// if(iSet)
|
|
|
|
// {
|
2008-12-13 08:02:22 +00:00
|
|
|
// ud.ridecule = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
// return;
|
|
|
|
// }
|
2011-03-04 08:50:58 +00:00
|
|
|
// Gv_SetVarX(lVar2, ud.ridecule);
|
2008-09-03 04:20:46 +00:00
|
|
|
// return;
|
|
|
|
|
|
|
|
// case USERDEFS_SAVEGAME:
|
|
|
|
// if(iSet)
|
|
|
|
// {
|
2008-12-13 08:02:22 +00:00
|
|
|
// ud.savegame = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
// return;
|
|
|
|
// }
|
2011-03-04 08:50:58 +00:00
|
|
|
// Gv_SetVarX(lVar2, ud.savegame);
|
2008-09-03 04:20:46 +00:00
|
|
|
// return;
|
|
|
|
|
|
|
|
// case USERDEFS_PWLOCKOUT:
|
|
|
|
// if(iSet)
|
|
|
|
// {
|
2008-12-13 08:02:22 +00:00
|
|
|
// ud.pwlockout = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
// return;
|
|
|
|
// }
|
2011-03-04 08:50:58 +00:00
|
|
|
// Gv_SetVarX(lVar2, ud.pwlockout);
|
2008-09-03 04:20:46 +00:00
|
|
|
// return;
|
|
|
|
|
|
|
|
// case USERDEFS_RTSNAME:
|
|
|
|
// if(iSet)
|
|
|
|
// {
|
2008-12-13 08:02:22 +00:00
|
|
|
// ud.rtsname = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
// return;
|
|
|
|
// }
|
2011-03-04 08:50:58 +00:00
|
|
|
// Gv_SetVarX(lVar2, ud.rtsname);
|
2008-09-03 04:20:46 +00:00
|
|
|
// return;
|
|
|
|
|
|
|
|
case USERDEFS_OVERHEAD_ON:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.overhead_on = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.overhead_on);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_LAST_OVERHEAD:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.last_overhead = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.last_overhead);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_SHOWWEAPONS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.showweapons = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.showweapons);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_PAUSE_ON:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.pause_on = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.pause_on);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_FROM_BONUS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.from_bonus = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.from_bonus);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_CAMERASPRITE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.camerasprite = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.camerasprite);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_LAST_CAMSPRITE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.last_camsprite = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.last_camsprite);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_LAST_LEVEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.last_level = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.last_level);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_SECRETLEVEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.secretlevel = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.secretlevel);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_CONST_VISIBILITY:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.const_visibility = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.const_visibility);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_UW_FRAMERATE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.uw_framerate = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.uw_framerate);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_CAMERA_TIME:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.camera_time = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.camera_time);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_FOLFVEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.folfvel = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.folfvel);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_FOLAVEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.folavel = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.folavel);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_FOLX:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.folx = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.folx);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_FOLY:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.foly = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.foly);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_FOLA:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.fola = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.fola);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_RECCNT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.reccnt = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.reccnt);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_ENTERED_NAME:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.entered_name = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.entered_name);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_SCREEN_TILTING:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.screen_tilting = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.screen_tilting);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_SHADOWS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.shadows = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.shadows);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_FTA_ON:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.fta_on = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.fta_on);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_EXECUTIONS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.executions = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.executions);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_AUTO_RUN:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.auto_run = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.auto_run);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_COORDS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.coords = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.coords);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_TICKRATE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.tickrate = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.tickrate);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_M_COOP:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.m_coop = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.m_coop);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_COOP:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.coop = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.coop);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_SCREEN_SIZE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
|
|
|
if (ud.screen_size != lValue)
|
|
|
|
{
|
|
|
|
ud.screen_size = lValue;
|
2008-11-20 14:06:36 +00:00
|
|
|
G_UpdateScreenArea();
|
2008-09-03 04:20:46 +00:00
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.screen_size);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_LOCKOUT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.lockout = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.lockout);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_CROSSHAIR:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.crosshair = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.crosshair);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_PLAYERAI:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.playerai = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.playerai);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_RESPAWN_MONSTERS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.respawn_monsters = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.respawn_monsters);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_RESPAWN_ITEMS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.respawn_items = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.respawn_items);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_RESPAWN_INVENTORY:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.respawn_inventory = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.respawn_inventory);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_RECSTAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.recstat = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.recstat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_MONSTERS_OFF:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.monsters_off = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.monsters_off);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_BRIGHTNESS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.brightness = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.brightness);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_M_RESPAWN_ITEMS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.m_respawn_items = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.m_respawn_items);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_M_RESPAWN_MONSTERS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.m_respawn_monsters = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.m_respawn_monsters);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_M_RESPAWN_INVENTORY:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.m_respawn_inventory = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.m_respawn_inventory);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_M_RECSTAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.m_recstat = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.m_recstat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_M_MONSTERS_OFF:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.m_monsters_off = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.m_monsters_off);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_DETAIL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-05-29 20:01:55 +00:00
|
|
|
// REMINDER: must implement "boolean" setters like this in Lunatic, too.
|
|
|
|
ud.detail = !!lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.detail);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_M_FFIRE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.m_ffire = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.m_ffire);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_FFIRE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.ffire = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.ffire);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_M_PLAYER_SKILL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.m_player_skill = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.m_player_skill);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_M_LEVEL_NUMBER:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.m_level_number = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.m_level_number);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_M_VOLUME_NUMBER:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.m_volume_number = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.m_volume_number);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_MULTIMODE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.multimode = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.multimode);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_PLAYER_SKILL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.player_skill = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.player_skill);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_LEVEL_NUMBER:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.level_number = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.level_number);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_VOLUME_NUMBER:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.volume_number = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.volume_number);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_M_MARKER:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.m_marker = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.m_marker);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_MARKER:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.marker = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.marker);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_MOUSEFLIP:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.mouseflip = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.mouseflip);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_STATUSBARSCALE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.statusbarscale = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.statusbarscale);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_DRAWWEAPON:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.drawweapon = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.drawweapon);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_MOUSEAIMING:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.mouseaiming = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.mouseaiming);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_WEAPONSWITCH:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.weaponswitch = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.weaponswitch);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_DEMOCAMS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.democams = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.democams);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_COLOR:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.color = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.color);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_MSGDISPTIME:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.msgdisptime = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.msgdisptime);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_STATUSBARMODE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.statusbarmode = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.statusbarmode);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_M_NOEXITS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.m_noexits = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.m_noexits);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_NOEXITS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.noexits = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.noexits);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_AUTOVOTE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.autovote = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.autovote);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_AUTOMSG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.automsg = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.automsg);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_IDPLAYERS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.idplayers = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.idplayers);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_TEAM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.team = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.team);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_VIEWBOB:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.viewbob = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.viewbob);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_WEAPONSWAY:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.weaponsway = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.weaponsway);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_ANGLEINTERPOLATION:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.angleinterpolation = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.angleinterpolation);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_OBITUARIES:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.obituaries = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.obituaries);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_LEVELSTATS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.levelstats = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.levelstats);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_CROSSHAIRSCALE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.crosshairscale = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.crosshairscale);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_ALTHUD:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.althud = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.althud);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case USERDEFS_DISPLAY_BONUS_SCREEN:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.display_bonus_screen = lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.display_bonus_screen);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
2008-09-29 02:12:53 +00:00
|
|
|
case USERDEFS_SHOW_LEVEL_TEXT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.show_level_text = lValue;
|
2008-09-29 02:12:53 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.show_level_text);
|
2008-09-29 02:12:53 +00:00
|
|
|
return;
|
|
|
|
|
2008-10-05 11:51:59 +00:00
|
|
|
case USERDEFS_WEAPONSCALE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.weaponscale = lValue;
|
2008-10-05 11:51:59 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.weaponscale);
|
2008-10-05 11:51:59 +00:00
|
|
|
return;
|
|
|
|
|
2008-10-11 09:20:04 +00:00
|
|
|
case USERDEFS_TEXTSCALE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
ud.textscale = lValue;
|
2008-10-11 09:20:04 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, ud.textscale);
|
2008-10-11 09:20:04 +00:00
|
|
|
return;
|
|
|
|
|
2012-10-14 18:18:30 +00:00
|
|
|
case USERDEFS_RUNKEY_MODE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
|
|
|
ud.runkey_mode = lValue;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
Gv_SetVarX(lVar2, ud.runkey_mode);
|
|
|
|
return;
|
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-05-02 23:27:30 +00:00
|
|
|
static void __fastcall VM_AccessActiveProjectile(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2009-01-09 09:29:17 +00:00
|
|
|
int32_t lValue=0,proj=vm.g_i;
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2013-01-24 20:02:52 +00:00
|
|
|
// http://forums.duke4.net/topic/775-eduke32-20-and-polymer/page__view__findpost__p__143260
|
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
if (lVar1 != g_iThisActorID)
|
2011-03-04 08:50:58 +00:00
|
|
|
proj=Gv_GetVarX(lVar1);
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2014-10-25 03:36:34 +00:00
|
|
|
if (EDUKE32_PREDICT_FALSE((unsigned)proj >= MAXSPRITES))
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2010-05-02 23:27:30 +00:00
|
|
|
// OSD_Printf("VM_AccessActiveProjectile(): invalid projectile (%d)\n",proj);
|
2012-09-05 17:25:47 +00:00
|
|
|
CON_ERRPRINTF("tried to %s %s on invalid target projectile (%d) %d %d from %s\n",
|
2012-11-26 08:26:04 +00:00
|
|
|
iSet?"set":"get",ProjectileLabels[lLabelID].name,proj,vm.g_i,TrackerCast(vm.g_sp->picnum),
|
2012-09-05 17:25:47 +00:00
|
|
|
(lVar1<MAXGAMEVARS)?aGameVars[lVar1].szLabel:"extended");
|
2008-09-03 04:20:46 +00:00
|
|
|
insptr += (lVar2 == MAXGAMEVARS);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2008-12-13 08:02:22 +00:00
|
|
|
if (iSet)
|
2011-03-04 08:50:58 +00:00
|
|
|
lValue=Gv_GetVarX(lVar2);
|
2008-12-13 08:02:22 +00:00
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case PROJ_WORKSLIKE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].workslike=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].workslike);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_SPAWNS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].spawns=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].spawns);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_SXREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].sxrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].sxrepeat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_SYREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].syrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].syrepeat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_SOUND:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].sound=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].sound);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_ISOUND:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].isound=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].isound);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_VEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].vel=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].vel);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_EXTRA:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].extra=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].extra);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_DECAL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].decal=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].decal);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_TRAIL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].trail=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].trail);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_TXREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].txrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].txrepeat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_TYREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].tyrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].tyrepeat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_TOFFSET:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].toffset=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].toffset);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_TNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].tnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].tnum);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_DROP:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].drop=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].drop);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_CSTAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].cstat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].cstat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_CLIPDIST:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].clipdist=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].clipdist);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_SHADE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].shade=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].shade);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_XREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].xrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].xrepeat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_YREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].yrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].yrepeat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_PAL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].pal=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].pal);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_EXTRA_RAND:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].extra_rand=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].extra_rand);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_HITRADIUS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].hitradius=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].hitradius);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
2012-10-05 20:48:10 +00:00
|
|
|
case PROJ_MOVECNT:
|
2008-09-03 04:20:46 +00:00
|
|
|
if (iSet)
|
|
|
|
{
|
2012-10-05 20:48:10 +00:00
|
|
|
SpriteProjectile[proj].movecnt=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-10-05 20:48:10 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].movecnt);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_OFFSET:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].offset=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].offset);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_BOUNCES:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].bounces=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].bounces);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_BSOUND:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].bsound=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].bsound);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_RANGE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].range=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].range);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
2009-04-13 06:01:50 +00:00
|
|
|
case PROJ_FLASH_COLOR:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2009-07-12 01:55:34 +00:00
|
|
|
SpriteProjectile[proj].flashcolor=lValue;
|
2009-04-13 06:01:50 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].flashcolor);
|
2009-04-13 06:01:50 +00:00
|
|
|
return;
|
|
|
|
|
2013-06-09 16:37:18 +00:00
|
|
|
case PROJ_USERDATA:
|
|
|
|
if (iSet)
|
|
|
|
{
|
|
|
|
SpriteProjectile[proj].userdata=lValue;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
Gv_SetVarX(lVar2, SpriteProjectile[proj].userdata);
|
|
|
|
return;
|
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-05-02 23:27:30 +00:00
|
|
|
static void __fastcall VM_GetPlayer(register int32_t lVar1, register int32_t lLabelID, register int32_t lVar2, int32_t lParm2)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2009-06-24 08:20:10 +00:00
|
|
|
register int32_t iPlayer=vm.g_p;
|
2012-08-10 19:11:53 +00:00
|
|
|
DukePlayer_t *ps;
|
2008-09-03 04:20:46 +00:00
|
|
|
|
|
|
|
if (lVar1 != g_iThisActorID)
|
2011-03-04 08:50:58 +00:00
|
|
|
iPlayer=Gv_GetVarX(lVar1);
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2014-10-25 03:36:34 +00:00
|
|
|
if (EDUKE32_PREDICT_FALSE((unsigned)iPlayer >= (unsigned)playerswhenstarted))
|
2009-06-24 08:20:10 +00:00
|
|
|
goto badplayer;
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2014-10-25 03:36:34 +00:00
|
|
|
if (EDUKE32_PREDICT_FALSE(PlayerLabels[lLabelID].flags & LABEL_HASPARM2 && ((unsigned)lParm2 >= (unsigned)PlayerLabels[lLabelID].maxParm2)))
|
2009-06-24 08:20:10 +00:00
|
|
|
goto badpos;
|
2008-12-13 08:02:22 +00:00
|
|
|
|
2012-08-10 19:11:53 +00:00
|
|
|
ps = g_player[iPlayer].ps;
|
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case PLAYER_ZOOM:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->zoom); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_EXITX:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->exitx); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_EXITY:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->exity); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_LOOGIEX:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->loogiex[lParm2]); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_LOOGIEY:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->loogiey[lParm2]); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_NUMLOOGS:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->numloogs); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_LOOGCNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->loogcnt); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_POSX:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->pos.x); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_POSY:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->pos.y); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_POSZ:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->pos.z); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_HORIZ:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->horiz); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_OHORIZ:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->ohoriz); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_OHORIZOFF:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->ohorizoff); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_INVDISPTIME:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->invdisptime); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_BOBPOSX:
|
Clean up some player code a bit... make bobposx/bobposy a vec2_t, make fricxv/fricyv a per-player vec2_t (TODO: CON access), promote angvel in input_t to int16_t and allow for player angle changes that result in odd numbered angles (we were effectively artificially limiting the angle to 1024 values before), fix some HUD model ID stuff that should help with the weapons in the HRP, clean up a bunch of random functions (P_FireWeapon(), P_DisplayTip(), P_DisplayAccess(), P_DisplayWeapon(), P_GetInput(), etc). Also clean up G_SetupFilenameBasedMusic() to loop through flac/ogg/mid when searching for usermap music replacements. Some of this really needs a BYTEVERSION bump, but these commits aren't for synthesis to build so we're not doing it yet. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4703 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:07:11 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->bobpos.x); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_BOBPOSY:
|
Clean up some player code a bit... make bobposx/bobposy a vec2_t, make fricxv/fricyv a per-player vec2_t (TODO: CON access), promote angvel in input_t to int16_t and allow for player angle changes that result in odd numbered angles (we were effectively artificially limiting the angle to 1024 values before), fix some HUD model ID stuff that should help with the weapons in the HRP, clean up a bunch of random functions (P_FireWeapon(), P_DisplayTip(), P_DisplayAccess(), P_DisplayWeapon(), P_GetInput(), etc). Also clean up G_SetupFilenameBasedMusic() to loop through flac/ogg/mid when searching for usermap music replacements. Some of this really needs a BYTEVERSION bump, but these commits aren't for synthesis to build so we're not doing it yet. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4703 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:07:11 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->bobpos.y); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_OPOSX:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->opos.x); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_OPOSY:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->opos.y); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_OPOSZ:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->opos.z); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_PYOFF:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->pyoff); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_OPYOFF:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->opyoff); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_POSXV:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->vel.x); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_POSYV:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->vel.y); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_POSZV:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->vel.z); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_LAST_PISSED_TIME:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->last_pissed_time); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_TRUEFZ:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->truefz); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_TRUECZ:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->truecz); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_PLAYER_PAR:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->player_par); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_VISIBILITY:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->visibility); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_BOBCOUNTER:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->bobcounter); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_WEAPON_SWAY:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->weapon_sway); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_PALS_TIME:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->pals.f); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_RANDOMFLAMEX:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->randomflamex); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_CRACK_TIME:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->crack_time); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_AIM_MODE:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->aim_mode); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_ANG:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->ang); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_OANG:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->oang); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_ANGVEL:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->angvel); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_CURSECTNUM:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->cursectnum); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_LOOK_ANG:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->look_ang); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_LAST_EXTRA:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->last_extra); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_SUBWEAPON:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->subweapon); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_AMMO_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->ammo_amount[lParm2]); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_WACKEDBYACTOR:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->wackedbyactor); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_FRAG:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->frag); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_FRAGGEDSELF:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->fraggedself); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_CURR_WEAPON:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->curr_weapon); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_LAST_WEAPON:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->last_weapon); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_TIPINCS:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->tipincs); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_HORIZOFF:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->horizoff); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_WANTWEAPONFIRE:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->wantweaponfire); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_HOLODUKE_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->inv_amount[GET_HOLODUKE]); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_NEWOWNER:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->newowner); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_HURT_DELAY:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->hurt_delay); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_HBOMB_HOLD_DELAY:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->hbomb_hold_delay); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_JUMPING_COUNTER:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->jumping_counter); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_AIRLEFT:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->airleft); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_KNEE_INCS:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->knee_incs); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_ACCESS_INCS:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->access_incs); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_FTA:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->fta); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_FTQ:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->ftq); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_ACCESS_WALLNUM:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->access_wallnum); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_ACCESS_SPRITENUM:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->access_spritenum); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_KICKBACK_PIC:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->kickback_pic); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_GOT_ACCESS:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->got_access); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_WEAPON_ANG:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->weapon_ang); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_FIRSTAID_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->inv_amount[GET_FIRSTAID]); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_SOMETHINGONPLAYER:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->somethingonplayer); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_ON_CRANE:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->on_crane); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_I:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->i); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_ONE_PARALLAX_SECTNUM:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->one_parallax_sectnum); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_OVER_SHOULDER_ON:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->over_shoulder_on); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_RANDOM_CLUB_FRAME:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->random_club_frame); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_FIST_INCS:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->fist_incs); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_ONE_EIGHTY_COUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->one_eighty_count); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_CHEAT_PHASE:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->cheat_phase); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_DUMMYPLAYERSPRITE:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->dummyplayersprite); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_EXTRA_EXTRA8:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->extra_extra8); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_QUICK_KICK:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->quick_kick); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_HEAT_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->inv_amount[GET_HEATS]); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_ACTORSQU:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->actorsqu); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_TIMEBEFOREEXIT:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->timebeforeexit); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_CUSTOMEXITSOUND:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->customexitsound); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_WEAPRECS:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->weaprecs[lParm2]); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_WEAPRECCNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->weapreccnt); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_INTERFACE_TOGGLE_FLAG:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->interface_toggle_flag); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_ROTSCRNANG:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->rotscrnang); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_DEAD_FLAG:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->dead_flag); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_SHOW_EMPTY_WEAPON:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->show_empty_weapon); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_SCUBA_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->inv_amount[GET_SCUBA]); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_JETPACK_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->inv_amount[GET_JETPACK]); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_STEROIDS_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->inv_amount[GET_STEROIDS]); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_SHIELD_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->inv_amount[GET_SHIELD]); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_HOLODUKE_ON:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->holoduke_on); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_PYCOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->pycount); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_WEAPON_POS:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->weapon_pos); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_FRAG_PS:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->frag_ps); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_TRANSPORTER_HOLD:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->transporter_hold); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_LAST_FULL_WEAPON:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->last_full_weapon); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_FOOTPRINTSHADE:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->footprintshade); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_BOOT_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->inv_amount[GET_BOOTS]); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_SCREAM_VOICE:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->scream_voice); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_GM:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->gm); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_ON_WARPING_SECTOR:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->on_warping_sector); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_FOOTPRINTCOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->footprintcount); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_HBOMB_ON:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->hbomb_on); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_JUMPING_TOGGLE:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->jumping_toggle); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_RAPID_FIRE_HOLD:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->rapid_fire_hold); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_ON_GROUND:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->on_ground); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_INVEN_ICON:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->inven_icon); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_BUTTONPALETTE:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->buttonpalette); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_JETPACK_ON:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->jetpack_on); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_SPRITEBRIDGE:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->spritebridge); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_LASTRANDOMSPOT:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->lastrandomspot); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_SCUBA_ON:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->scuba_on); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_FOOTPRINTPAL:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->footprintpal); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_HEAT_ON:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->heat_on); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_HOLSTER_WEAPON:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->holster_weapon); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_FALLING_COUNTER:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->falling_counter); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_GOTWEAPON:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, (ps->gotweapon & (1<<lParm2)) != 0); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_REFRESH_INVENTORY:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->refresh_inventory); return;
|
2011-12-29 14:26:30 +00:00
|
|
|
case PLAYER_PALETTE: // no set
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->palette); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_TOGGLE_KEY_FLAG:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->toggle_key_flag); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_KNUCKLE_INCS:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->knuckle_incs); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_WALKING_SND_TOGGLE:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->walking_snd_toggle); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_PALOOKUP:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->palookup); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_HARD_LANDING:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->hard_landing); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_MAX_SECRET_ROOMS:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->max_secret_rooms); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_SECRET_ROOMS:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->secret_rooms); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_PALS:
|
2010-05-02 23:27:30 +00:00
|
|
|
switch (lParm2)
|
|
|
|
{
|
|
|
|
case 0:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->pals.r); return;
|
2010-05-02 23:27:30 +00:00
|
|
|
case 1:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->pals.g); return;
|
2010-05-02 23:27:30 +00:00
|
|
|
case 2:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->pals.b); return;
|
2010-05-02 23:27:30 +00:00
|
|
|
}
|
|
|
|
return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_MAX_ACTORS_KILLED:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->max_actors_killed); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_ACTORS_KILLED:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->actors_killed); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_RETURN_TO_CENTER:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->return_to_center); return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_RUNSPEED:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->runspeed); return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_SBS:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->sbs); return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_RELOADING:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->reloading); return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_AUTO_AIM:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->auto_aim); return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_MOVEMENT_LOCK:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->movement_lock); return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_SOUND_PITCH:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->sound_pitch); return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_WEAPONSWITCH:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->weaponswitch); return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_TEAM:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->team); return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_MAX_PLAYER_HEALTH:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->max_player_health); return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_MAX_SHIELD_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->max_shield_amount); return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_MAX_AMMO_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->max_ammo_amount[lParm2]); return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_LAST_QUICK_KICK:
|
2012-10-29 04:29:17 +00:00
|
|
|
Gv_SetVarX(lVar2, ps->last_quick_kick); return;
|
|
|
|
case PLAYER_AUTOSTEP:
|
|
|
|
Gv_SetVarX(lVar2, ps->autostep); return;
|
|
|
|
case PLAYER_AUTOSTEP_SBW:
|
|
|
|
Gv_SetVarX(lVar2, ps->autostep_sbw);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
2009-06-24 08:20:10 +00:00
|
|
|
default:
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
2009-06-24 08:20:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
badplayer:
|
2010-05-02 23:27:30 +00:00
|
|
|
// OSD_Printf("VM_AccessPlayer(): invalid target player (%d) %d\n",iPlayer,vm.g_i);
|
2012-09-05 17:25:47 +00:00
|
|
|
CON_ERRPRINTF("tried to get %s on invalid target player (%d) from spr %d gv %s\n",
|
|
|
|
PlayerLabels[lLabelID].name,iPlayer,vm.g_i,
|
|
|
|
(lVar1<MAXGAMEVARS)?aGameVars[lVar1].szLabel:"extended");
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
badpos:
|
2012-09-05 17:25:47 +00:00
|
|
|
CON_ERRPRINTF("tried to get invalid %s position %d on player (%d) from spr %d\n",
|
|
|
|
PlayerLabels[lLabelID].name,lParm2,iPlayer,vm.g_i);
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
}
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2010-05-02 23:27:30 +00:00
|
|
|
static void __fastcall VM_SetPlayer(int32_t lVar1, int32_t lLabelID, int32_t lVar2, int32_t lParm2)
|
2009-06-24 08:20:10 +00:00
|
|
|
{
|
|
|
|
register int32_t iPlayer=vm.g_p;
|
2012-08-10 19:11:53 +00:00
|
|
|
DukePlayer_t *ps;
|
2009-06-24 08:20:10 +00:00
|
|
|
|
|
|
|
if (lVar1 != g_iThisActorID)
|
2011-03-04 08:50:58 +00:00
|
|
|
iPlayer=Gv_GetVarX(lVar1);
|
2009-06-24 08:20:10 +00:00
|
|
|
|
2012-08-10 19:11:53 +00:00
|
|
|
ps = g_player[iPlayer].ps;
|
|
|
|
|
2014-10-25 03:36:34 +00:00
|
|
|
if (EDUKE32_PREDICT_FALSE((unsigned)iPlayer >= (unsigned)playerswhenstarted))
|
2009-06-24 08:20:10 +00:00
|
|
|
goto badplayer;
|
|
|
|
|
2014-10-25 03:36:34 +00:00
|
|
|
if (EDUKE32_PREDICT_FALSE(PlayerLabels[lLabelID].flags & LABEL_HASPARM2 && (unsigned)lParm2 >= (unsigned)PlayerLabels[lLabelID].maxParm2))
|
2009-06-24 08:20:10 +00:00
|
|
|
goto badpos;
|
|
|
|
|
2011-03-04 08:50:58 +00:00
|
|
|
lVar1=Gv_GetVarX(lVar2);
|
2009-06-24 08:20:10 +00:00
|
|
|
|
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case PLAYER_ZOOM:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->zoom=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_EXITX:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->exitx=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_EXITY:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->exity=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_LOOGIEX:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->loogiex[lParm2]=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_LOOGIEY:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->loogiey[lParm2]=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_NUMLOOGS:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->numloogs=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_LOOGCNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->loogcnt=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_POSX:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->pos.x=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_POSY:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->pos.y=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_POSZ:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->pos.z=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_HORIZ:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->horiz=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_OHORIZ:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->ohoriz=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_OHORIZOFF:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->ohorizoff=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_INVDISPTIME:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->invdisptime=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_BOBPOSX:
|
Clean up some player code a bit... make bobposx/bobposy a vec2_t, make fricxv/fricyv a per-player vec2_t (TODO: CON access), promote angvel in input_t to int16_t and allow for player angle changes that result in odd numbered angles (we were effectively artificially limiting the angle to 1024 values before), fix some HUD model ID stuff that should help with the weapons in the HRP, clean up a bunch of random functions (P_FireWeapon(), P_DisplayTip(), P_DisplayAccess(), P_DisplayWeapon(), P_GetInput(), etc). Also clean up G_SetupFilenameBasedMusic() to loop through flac/ogg/mid when searching for usermap music replacements. Some of this really needs a BYTEVERSION bump, but these commits aren't for synthesis to build so we're not doing it yet. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4703 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:07:11 +00:00
|
|
|
ps->bobpos.x=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_BOBPOSY:
|
Clean up some player code a bit... make bobposx/bobposy a vec2_t, make fricxv/fricyv a per-player vec2_t (TODO: CON access), promote angvel in input_t to int16_t and allow for player angle changes that result in odd numbered angles (we were effectively artificially limiting the angle to 1024 values before), fix some HUD model ID stuff that should help with the weapons in the HRP, clean up a bunch of random functions (P_FireWeapon(), P_DisplayTip(), P_DisplayAccess(), P_DisplayWeapon(), P_GetInput(), etc). Also clean up G_SetupFilenameBasedMusic() to loop through flac/ogg/mid when searching for usermap music replacements. Some of this really needs a BYTEVERSION bump, but these commits aren't for synthesis to build so we're not doing it yet. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4703 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:07:11 +00:00
|
|
|
ps->bobpos.y=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_OPOSX:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->opos.x=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_OPOSY:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->opos.y=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_OPOSZ:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->opos.z=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_PYOFF:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->pyoff=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_OPYOFF:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->opyoff=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_POSXV:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->vel.x=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_POSYV:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->vel.y=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_POSZV:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->vel.z=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_LAST_PISSED_TIME:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->last_pissed_time=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_TRUEFZ:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->truefz=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_TRUECZ:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->truecz=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_PLAYER_PAR:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->player_par=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_VISIBILITY:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->visibility=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_BOBCOUNTER:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->bobcounter=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_WEAPON_SWAY:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->weapon_sway=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_PALS_TIME:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->pals.f=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_RANDOMFLAMEX:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->randomflamex=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_CRACK_TIME:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->crack_time=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_AIM_MODE:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->aim_mode=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_ANG:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->ang=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_OANG:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->oang=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_ANGVEL:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->angvel=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_CURSECTNUM:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->cursectnum=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_LOOK_ANG:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->look_ang=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_LAST_EXTRA:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->last_extra=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_SUBWEAPON:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->subweapon=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_AMMO_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->ammo_amount[lParm2]=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_WACKEDBYACTOR:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->wackedbyactor=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_FRAG:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->frag=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_FRAGGEDSELF:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->fraggedself=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_CURR_WEAPON:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->curr_weapon=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_LAST_WEAPON:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->last_weapon=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_TIPINCS:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->tipincs=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_HORIZOFF:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->horizoff=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_WANTWEAPONFIRE:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->wantweaponfire=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_HOLODUKE_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->inv_amount[GET_HOLODUKE]=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_NEWOWNER:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->newowner=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_HURT_DELAY:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->hurt_delay=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_HBOMB_HOLD_DELAY:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->hbomb_hold_delay=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_JUMPING_COUNTER:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->jumping_counter=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_AIRLEFT:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->airleft=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_KNEE_INCS:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->knee_incs=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_ACCESS_INCS:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->access_incs=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_FTA:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->fta=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_FTQ:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->ftq=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_ACCESS_WALLNUM:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->access_wallnum=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_ACCESS_SPRITENUM:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->access_spritenum=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_KICKBACK_PIC:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->kickback_pic=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_GOT_ACCESS:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->got_access=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_WEAPON_ANG:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->weapon_ang=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_FIRSTAID_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->inv_amount[GET_FIRSTAID]=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_SOMETHINGONPLAYER:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->somethingonplayer=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_ON_CRANE:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->on_crane=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_I:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->i=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_ONE_PARALLAX_SECTNUM:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->one_parallax_sectnum=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_OVER_SHOULDER_ON:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->over_shoulder_on=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_RANDOM_CLUB_FRAME:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->random_club_frame=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_FIST_INCS:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->fist_incs=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_ONE_EIGHTY_COUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->one_eighty_count=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_CHEAT_PHASE:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->cheat_phase=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_DUMMYPLAYERSPRITE:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->dummyplayersprite=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_EXTRA_EXTRA8:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->extra_extra8=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_QUICK_KICK:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->quick_kick=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_HEAT_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->inv_amount[GET_HEATS]=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_ACTORSQU:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->actorsqu=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_TIMEBEFOREEXIT:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->timebeforeexit=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_CUSTOMEXITSOUND:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->customexitsound=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_WEAPRECS:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->weaprecs[lParm2]=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_WEAPRECCNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->weapreccnt=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_INTERFACE_TOGGLE_FLAG:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->interface_toggle_flag=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_ROTSCRNANG:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->rotscrnang=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_DEAD_FLAG:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->dead_flag=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_SHOW_EMPTY_WEAPON:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->show_empty_weapon=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_SCUBA_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->inv_amount[GET_SCUBA]=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_JETPACK_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->inv_amount[GET_JETPACK]=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_STEROIDS_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->inv_amount[GET_STEROIDS]=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_SHIELD_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->inv_amount[GET_SHIELD]=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_HOLODUKE_ON:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->holoduke_on=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_PYCOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->pycount=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_WEAPON_POS:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->weapon_pos=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_FRAG_PS:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->frag_ps=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_TRANSPORTER_HOLD:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->transporter_hold=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_LAST_FULL_WEAPON:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->last_full_weapon=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_FOOTPRINTSHADE:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->footprintshade=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_BOOT_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->inv_amount[GET_BOOTS]=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_SCREAM_VOICE:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->scream_voice=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_GM:
|
2014-11-17 07:39:12 +00:00
|
|
|
if (!(ps->gm & MODE_MENU) && (lVar1 & MODE_MENU))
|
|
|
|
M_OpenMenu(iPlayer);
|
|
|
|
else if ((ps->gm & MODE_MENU) && !(lVar1 & MODE_MENU))
|
|
|
|
M_CloseMenu(iPlayer);
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->gm=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_ON_WARPING_SECTOR:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->on_warping_sector=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_FOOTPRINTCOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->footprintcount=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_HBOMB_ON:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->hbomb_on=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_JUMPING_TOGGLE:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->jumping_toggle=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_RAPID_FIRE_HOLD:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->rapid_fire_hold=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_ON_GROUND:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->on_ground=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_INVEN_ICON:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->inven_icon=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_BUTTONPALETTE:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->buttonpalette=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_JETPACK_ON:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->jetpack_on=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_SPRITEBRIDGE:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->spritebridge=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_LASTRANDOMSPOT:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->lastrandomspot=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_SCUBA_ON:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->scuba_on=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_FOOTPRINTPAL:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->footprintpal=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_HEAT_ON:
|
2012-08-10 19:11:53 +00:00
|
|
|
if (ps->heat_on != lVar1)
|
2009-06-24 08:20:10 +00:00
|
|
|
{
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->heat_on=lVar1;
|
|
|
|
P_UpdateScreenPal(ps);
|
2009-06-24 08:20:10 +00:00
|
|
|
} return;
|
|
|
|
case PLAYER_HOLSTER_WEAPON:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->holster_weapon=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_FALLING_COUNTER:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->falling_counter=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_GOTWEAPON:
|
2010-05-02 23:27:30 +00:00
|
|
|
if (lVar1)
|
|
|
|
{
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->gotweapon |= (1<<lParm2);
|
2010-05-02 23:27:30 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->gotweapon &= ~(1<<lParm2);
|
2010-05-02 23:27:30 +00:00
|
|
|
return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_REFRESH_INVENTORY:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->refresh_inventory=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_TOGGLE_KEY_FLAG:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->toggle_key_flag=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_KNUCKLE_INCS:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->knuckle_incs=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_WALKING_SND_TOGGLE:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->walking_snd_toggle=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_PALOOKUP:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->palookup=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_HARD_LANDING:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->hard_landing=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_MAX_SECRET_ROOMS:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->max_secret_rooms=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_SECRET_ROOMS:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->secret_rooms=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_PALS:
|
2010-05-02 23:27:30 +00:00
|
|
|
switch (lParm2)
|
|
|
|
{
|
|
|
|
case 0:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->pals.r = lVar1; return;
|
2010-05-02 23:27:30 +00:00
|
|
|
case 1:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->pals.g = lVar1; return;
|
2010-05-02 23:27:30 +00:00
|
|
|
case 2:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->pals.b = lVar1; return;
|
2010-05-02 23:27:30 +00:00
|
|
|
}
|
|
|
|
return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_MAX_ACTORS_KILLED:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->max_actors_killed=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_ACTORS_KILLED:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->actors_killed=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_RETURN_TO_CENTER:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->return_to_center=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_RUNSPEED:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->runspeed=lVar1; return;
|
2009-06-24 08:20:10 +00:00
|
|
|
case PLAYER_SBS:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->sbs=lVar1; return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_RELOADING:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->reloading=lVar1; return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_AUTO_AIM:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->auto_aim=lVar1; return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_MOVEMENT_LOCK:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->movement_lock=lVar1; return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_SOUND_PITCH:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->sound_pitch=lVar1; return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_WEAPONSWITCH:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->weaponswitch=lVar1; return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_TEAM:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->team=lVar1; return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_MAX_PLAYER_HEALTH:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->max_player_health = lVar1; return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_MAX_SHIELD_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->max_shield_amount = lVar1; return;
|
2008-09-03 04:20:46 +00:00
|
|
|
case PLAYER_MAX_AMMO_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
ps->max_ammo_amount[lParm2]=lVar1; return;
|
2008-09-11 09:24:45 +00:00
|
|
|
case PLAYER_LAST_QUICK_KICK:
|
2012-10-29 04:29:17 +00:00
|
|
|
ps->last_quick_kick=lVar1; return;
|
|
|
|
case PLAYER_AUTOSTEP:
|
|
|
|
ps->autostep=lVar1; return;
|
|
|
|
case PLAYER_AUTOSTEP_SBW:
|
|
|
|
ps->autostep_sbw=lVar1;
|
2008-09-11 09:24:45 +00:00
|
|
|
return;
|
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
2009-06-24 08:20:10 +00:00
|
|
|
|
|
|
|
badplayer:
|
2010-05-02 23:27:30 +00:00
|
|
|
// OSD_Printf("VM_AccessPlayer(): invalid target player (%d) %d\n",iPlayer,vm.g_i);
|
2012-09-05 17:25:47 +00:00
|
|
|
CON_ERRPRINTF("tried to set %s on invalid target player (%d) from spr %d gv %s\n",
|
|
|
|
PlayerLabels[lLabelID].name,iPlayer,vm.g_i,
|
|
|
|
(lVar1<MAXGAMEVARS)?aGameVars[lVar1].szLabel:"extended");
|
2009-06-24 08:20:10 +00:00
|
|
|
insptr += (lVar2 == MAXGAMEVARS);
|
|
|
|
return;
|
|
|
|
|
|
|
|
badpos:
|
2012-09-05 17:25:47 +00:00
|
|
|
CON_ERRPRINTF("tried to set invalid %s position %d on player (%d) from spr %d\n",
|
|
|
|
PlayerLabels[lLabelID].name,lParm2,iPlayer,vm.g_i);
|
2009-06-24 08:20:10 +00:00
|
|
|
insptr += (lVar2 == MAXGAMEVARS);
|
|
|
|
return;
|
2008-09-03 04:20:46 +00:00
|
|
|
}
|
|
|
|
|
2010-05-02 23:27:30 +00:00
|
|
|
static void __fastcall VM_AccessPlayerInput(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2009-01-09 09:29:17 +00:00
|
|
|
int32_t lValue=0;
|
|
|
|
int32_t iPlayer=vm.g_p;
|
2008-09-03 04:20:46 +00:00
|
|
|
|
|
|
|
if (lVar1 != g_iThisActorID)
|
2011-03-04 08:50:58 +00:00
|
|
|
iPlayer=Gv_GetVarX(lVar1);
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2014-10-25 03:36:34 +00:00
|
|
|
if (EDUKE32_PREDICT_FALSE((unsigned)iPlayer >= (unsigned)playerswhenstarted))
|
2009-06-24 08:20:10 +00:00
|
|
|
goto badplayer;
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2008-12-13 08:02:22 +00:00
|
|
|
if (iSet)
|
2011-03-04 08:50:58 +00:00
|
|
|
lValue=Gv_GetVarX(lVar2);
|
2008-12-13 08:02:22 +00:00
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case INPUT_AVEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].sync->avel=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, g_player[iPlayer].sync->avel);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case INPUT_HORZ:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].sync->horz=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, g_player[iPlayer].sync->horz);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case INPUT_FVEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].sync->fvel=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, g_player[iPlayer].sync->fvel);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case INPUT_SVEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].sync->svel=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, g_player[iPlayer].sync->svel);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case INPUT_BITS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].sync->bits=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, g_player[iPlayer].sync->bits);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case INPUT_EXTBITS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
g_player[iPlayer].sync->extbits=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, g_player[iPlayer].sync->extbits);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
2009-06-24 08:20:10 +00:00
|
|
|
|
|
|
|
badplayer:
|
|
|
|
insptr += (lVar2 == MAXGAMEVARS);
|
2012-09-05 17:25:47 +00:00
|
|
|
CON_ERRPRINTF("invalid target player (%d) %d\n", iPlayer,vm.g_i);
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
2008-09-03 04:20:46 +00:00
|
|
|
}
|
|
|
|
|
2010-05-02 23:27:30 +00:00
|
|
|
static void __fastcall VM_AccessWall(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2009-01-09 09:29:17 +00:00
|
|
|
int32_t lValue=0;
|
2011-03-04 08:50:58 +00:00
|
|
|
int32_t iWall = Gv_GetVarX(lVar1);
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2014-10-25 03:36:34 +00:00
|
|
|
if (EDUKE32_PREDICT_FALSE((unsigned)iWall >= (unsigned)numwalls))
|
2009-06-24 08:20:10 +00:00
|
|
|
goto badwall;
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2008-12-13 08:02:22 +00:00
|
|
|
if (iSet)
|
2011-03-04 08:50:58 +00:00
|
|
|
lValue=Gv_GetVarX(lVar2);
|
2008-12-13 08:02:22 +00:00
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case WALL_X:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].x=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, wall[iWall].x);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_Y:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].y=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, wall[iWall].y);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_POINT2:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].point2=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, wall[iWall].point2);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_NEXTWALL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].nextwall=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, wall[iWall].nextwall);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_NEXTSECTOR:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].nextsector=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, wall[iWall].nextsector);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_CSTAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].cstat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, wall[iWall].cstat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_PICNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].picnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, wall[iWall].picnum);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_OVERPICNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].overpicnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, wall[iWall].overpicnum);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_SHADE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].shade=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, wall[iWall].shade);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_PAL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].pal=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, wall[iWall].pal);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_XREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].xrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, wall[iWall].xrepeat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_YREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].yrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, wall[iWall].yrepeat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_XPANNING:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].xpanning=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, wall[iWall].xpanning);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_YPANNING:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].ypanning=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, wall[iWall].ypanning);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_LOTAG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-16 00:54:04 +00:00
|
|
|
wall[iWall].lotag=(int16_t)lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-15 21:10:02 +00:00
|
|
|
Gv_SetVarX(lVar2, (int16_t)wall[iWall].lotag);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_HITAG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-16 00:54:04 +00:00
|
|
|
wall[iWall].hitag=(int16_t)lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-15 21:10:02 +00:00
|
|
|
Gv_SetVarX(lVar2, (int16_t)wall[iWall].hitag);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
2012-11-16 00:54:04 +00:00
|
|
|
case WALL_ULOTAG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
|
|
|
wall[iWall].lotag=lValue;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
Gv_SetVarX(lVar2, wall[iWall].lotag);
|
|
|
|
return;
|
|
|
|
|
|
|
|
case WALL_UHITAG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
|
|
|
wall[iWall].hitag=lValue;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
Gv_SetVarX(lVar2, wall[iWall].hitag);
|
|
|
|
return;
|
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
case WALL_EXTRA:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
wall[iWall].extra=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, wall[iWall].extra);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
2009-06-24 08:20:10 +00:00
|
|
|
|
|
|
|
badwall:
|
|
|
|
insptr += (lVar2 == MAXGAMEVARS);
|
2012-09-05 17:25:47 +00:00
|
|
|
CON_ERRPRINTF("Invalid wall %d\n", iWall);
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
2008-09-03 04:20:46 +00:00
|
|
|
}
|
|
|
|
|
2010-05-02 23:27:30 +00:00
|
|
|
static void __fastcall VM_AccessSector(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2009-01-09 09:29:17 +00:00
|
|
|
int32_t lValue=0;
|
|
|
|
int32_t iSector=sprite[vm.g_i].sectnum;
|
2008-09-03 04:20:46 +00:00
|
|
|
|
|
|
|
if (lVar1 != g_iThisActorID)
|
2011-03-04 08:50:58 +00:00
|
|
|
iSector=Gv_GetVarX(lVar1);
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2014-10-25 03:36:34 +00:00
|
|
|
if (EDUKE32_PREDICT_FALSE((unsigned)iSector >= (unsigned)numsectors))
|
2009-06-24 08:20:10 +00:00
|
|
|
goto badsector;
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2008-12-13 08:02:22 +00:00
|
|
|
if (iSet)
|
2011-03-04 08:50:58 +00:00
|
|
|
lValue=Gv_GetVarX(lVar2);
|
2008-12-13 08:02:22 +00:00
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case SECTOR_WALLPTR:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].wallptr=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sector[iSector].wallptr);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_WALLNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].wallnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sector[iSector].wallnum);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_CEILINGZ:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].ceilingz=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sector[iSector].ceilingz);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_FLOORZ:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].floorz=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sector[iSector].floorz);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_CEILINGSTAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].ceilingstat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sector[iSector].ceilingstat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_FLOORSTAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].floorstat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sector[iSector].floorstat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_CEILINGPICNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].ceilingpicnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sector[iSector].ceilingpicnum);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_CEILINGSLOPE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].ceilingheinum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sector[iSector].ceilingheinum);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_CEILINGSHADE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].ceilingshade=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sector[iSector].ceilingshade);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_CEILINGPAL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].ceilingpal=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sector[iSector].ceilingpal);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_CEILINGXPANNING:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].ceilingxpanning=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sector[iSector].ceilingxpanning);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_CEILINGYPANNING:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].ceilingypanning=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sector[iSector].ceilingypanning);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_FLOORPICNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].floorpicnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sector[iSector].floorpicnum);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_FLOORSLOPE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].floorheinum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sector[iSector].floorheinum);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_FLOORSHADE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].floorshade=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sector[iSector].floorshade);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_FLOORPAL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].floorpal=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sector[iSector].floorpal);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_FLOORXPANNING:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].floorxpanning=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sector[iSector].floorxpanning);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_FLOORYPANNING:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].floorypanning=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sector[iSector].floorypanning);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_VISIBILITY:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
sector[iSector].visibility=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sector[iSector].visibility);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
2014-04-05 11:28:10 +00:00
|
|
|
case SECTOR_FOGPAL:
|
2008-09-03 04:20:46 +00:00
|
|
|
if (iSet)
|
|
|
|
{
|
2014-04-05 11:28:10 +00:00
|
|
|
sector[iSector].fogpal=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2014-04-05 11:28:10 +00:00
|
|
|
Gv_SetVarX(lVar2, sector[iSector].fogpal);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_LOTAG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-16 00:54:04 +00:00
|
|
|
sector[iSector].lotag=(int16_t)lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-15 21:10:02 +00:00
|
|
|
Gv_SetVarX(lVar2, (int16_t)sector[iSector].lotag);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_HITAG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-16 00:54:04 +00:00
|
|
|
sector[iSector].hitag=(int16_t)lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-15 21:10:02 +00:00
|
|
|
Gv_SetVarX(lVar2, (int16_t)sector[iSector].hitag);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
2012-11-16 00:54:04 +00:00
|
|
|
case SECTOR_ULOTAG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
|
|
|
sector[iSector].lotag=lValue;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
Gv_SetVarX(lVar2, sector[iSector].lotag);
|
|
|
|
return;
|
|
|
|
|
|
|
|
case SECTOR_UHITAG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
|
|
|
sector[iSector].hitag=lValue;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
Gv_SetVarX(lVar2, sector[iSector].hitag);
|
|
|
|
return;
|
|
|
|
|
2009-06-24 08:20:10 +00:00
|
|
|
case SECTOR_EXTRA:
|
|
|
|
if (iSet)
|
|
|
|
{
|
|
|
|
sector[iSector].extra=lValue;
|
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sector[iSector].extra);
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
2011-07-10 15:39:21 +00:00
|
|
|
case SECTOR_CEILINGBUNCH:
|
|
|
|
case SECTOR_FLOORBUNCH:
|
|
|
|
if (!iSet)
|
|
|
|
{
|
|
|
|
#ifdef YAX_ENABLE
|
|
|
|
Gv_SetVarX(lVar2, yax_getbunch(iSector, lLabelID==SECTOR_FLOORBUNCH));
|
|
|
|
#else
|
|
|
|
Gv_SetVarX(lVar2, -1);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
|
2009-06-24 08:20:10 +00:00
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
badsector:
|
2012-09-05 17:25:47 +00:00
|
|
|
CON_ERRPRINTF("Invalid sector %d\n", iSector);
|
2009-06-24 08:20:10 +00:00
|
|
|
insptr += (lVar2 == MAXGAMEVARS);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2010-05-02 23:27:30 +00:00
|
|
|
static void __fastcall VM_SetSprite(int32_t lVar1, int32_t lLabelID, int32_t lVar2, int32_t lParm2)
|
2009-06-24 08:20:10 +00:00
|
|
|
{
|
|
|
|
register int32_t iActor=vm.g_i;
|
|
|
|
|
|
|
|
if (lVar1 != g_iThisActorID)
|
2011-03-04 08:50:58 +00:00
|
|
|
iActor=Gv_GetVarX(lVar1);
|
2009-06-24 08:20:10 +00:00
|
|
|
|
2014-10-25 03:36:34 +00:00
|
|
|
if (EDUKE32_PREDICT_FALSE((unsigned)iActor >= MAXSPRITES))
|
2009-06-24 08:20:10 +00:00
|
|
|
goto badactor;
|
|
|
|
|
2014-10-25 03:36:34 +00:00
|
|
|
if (EDUKE32_PREDICT_FALSE(ActorLabels[lLabelID].flags & LABEL_HASPARM2 && (unsigned)lParm2 >= (unsigned)ActorLabels[lLabelID].maxParm2))
|
2009-06-24 08:20:10 +00:00
|
|
|
goto badpos;
|
|
|
|
|
2011-03-04 08:50:58 +00:00
|
|
|
lVar1=Gv_GetVarX(lVar2);
|
2009-06-24 08:20:10 +00:00
|
|
|
|
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case ACTOR_X:
|
|
|
|
sprite[iActor].x=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_Y:
|
|
|
|
sprite[iActor].y=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_Z:
|
|
|
|
sprite[iActor].z=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_CSTAT:
|
|
|
|
sprite[iActor].cstat=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_PICNUM:
|
|
|
|
sprite[iActor].picnum=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_SHADE:
|
|
|
|
sprite[iActor].shade=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_PAL:
|
|
|
|
sprite[iActor].pal=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_CLIPDIST:
|
|
|
|
sprite[iActor].clipdist=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_DETAIL:
|
2014-02-08 14:37:55 +00:00
|
|
|
sprite[iActor].blend=lVar1;
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_XREPEAT:
|
|
|
|
sprite[iActor].xrepeat=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_YREPEAT:
|
|
|
|
sprite[iActor].yrepeat=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_XOFFSET:
|
|
|
|
sprite[iActor].xoffset=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_YOFFSET:
|
|
|
|
sprite[iActor].yoffset=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_SECTNUM:
|
|
|
|
changespritesect(iActor,lVar1);
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_STATNUM:
|
|
|
|
changespritestat(iActor,lVar1);
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_ANG:
|
|
|
|
sprite[iActor].ang=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_OWNER:
|
|
|
|
sprite[iActor].owner=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_XVEL:
|
|
|
|
sprite[iActor].xvel=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_YVEL:
|
|
|
|
sprite[iActor].yvel=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_ZVEL:
|
|
|
|
sprite[iActor].zvel=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_LOTAG:
|
2012-11-16 00:54:04 +00:00
|
|
|
sprite[iActor].lotag=(int16_t)lVar1;
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HITAG:
|
2012-11-16 00:54:04 +00:00
|
|
|
sprite[iActor].hitag=(int16_t)lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_ULOTAG:
|
|
|
|
sprite[iActor].lotag=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_UHITAG:
|
2009-06-24 08:20:10 +00:00
|
|
|
sprite[iActor].hitag=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_EXTRA:
|
|
|
|
sprite[iActor].extra=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTCGG:
|
2010-05-02 23:27:30 +00:00
|
|
|
actor[iActor].cgg=lVar1;
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTPICNUM :
|
2010-05-02 23:27:30 +00:00
|
|
|
actor[iActor].picnum=lVar1;
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTANG:
|
2010-05-02 23:27:30 +00:00
|
|
|
actor[iActor].ang=lVar1;
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTEXTRA:
|
2010-05-02 23:27:30 +00:00
|
|
|
actor[iActor].extra=lVar1;
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTOWNER:
|
2010-05-02 23:27:30 +00:00
|
|
|
actor[iActor].owner=lVar1;
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTMOVFLAG:
|
2010-05-02 23:27:30 +00:00
|
|
|
actor[iActor].movflag=lVar1;
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTTEMPANG:
|
2010-05-02 23:27:30 +00:00
|
|
|
actor[iActor].tempang=lVar1;
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTACTORSTAYPUT:
|
2010-05-02 23:27:30 +00:00
|
|
|
actor[iActor].actorstayput=lVar1;
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTDISPICNUM:
|
2010-05-02 23:27:30 +00:00
|
|
|
actor[iActor].dispicnum=lVar1;
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTTIMETOSLEEP:
|
2010-05-02 23:27:30 +00:00
|
|
|
actor[iActor].timetosleep=lVar1;
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTFLOORZ:
|
2010-05-02 23:27:30 +00:00
|
|
|
actor[iActor].floorz=lVar1;
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTCEILINGZ:
|
2010-05-02 23:27:30 +00:00
|
|
|
actor[iActor].ceilingz=lVar1;
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTLASTVX:
|
2010-05-02 23:27:30 +00:00
|
|
|
actor[iActor].lastvx=lVar1;
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTLASTVY:
|
2010-05-02 23:27:30 +00:00
|
|
|
actor[iActor].lastvy=lVar1;
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTBPOSX:
|
2012-12-23 14:00:08 +00:00
|
|
|
actor[iActor].bpos.x=lVar1;
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTBPOSY:
|
2012-12-23 14:00:08 +00:00
|
|
|
actor[iActor].bpos.y=lVar1;
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTBPOSZ:
|
2012-12-23 14:00:08 +00:00
|
|
|
actor[iActor].bpos.z=lVar1;
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTG_T:
|
2010-05-02 23:27:30 +00:00
|
|
|
actor[iActor].t_data[lParm2]=lVar1;
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_ANGOFF:
|
|
|
|
spriteext[iActor].angoff=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_PITCH:
|
|
|
|
spriteext[iActor].pitch=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_ROLL:
|
|
|
|
spriteext[iActor].roll=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_MDXOFF:
|
2014-10-25 03:36:34 +00:00
|
|
|
spriteext[iActor].offset.x=lVar1;
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_MDYOFF:
|
2014-10-25 03:36:34 +00:00
|
|
|
spriteext[iActor].offset.y=lVar1;
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_MDZOFF:
|
2014-10-25 03:36:34 +00:00
|
|
|
spriteext[iActor].offset.z=lVar1;
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_MDFLAGS:
|
|
|
|
spriteext[iActor].flags=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_XPANNING:
|
|
|
|
spriteext[iActor].xpanning=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_YPANNING:
|
|
|
|
spriteext[iActor].ypanning=lVar1;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTFLAGS:
|
2010-05-02 23:27:30 +00:00
|
|
|
actor[iActor].flags=lVar1;
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_ALPHA:
|
2014-09-30 04:14:21 +00:00
|
|
|
spriteext[iActor].alpha=(float)lVar1 * (1.f/255.0f);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
2009-06-24 08:20:10 +00:00
|
|
|
|
|
|
|
badactor:
|
2012-09-05 17:25:47 +00:00
|
|
|
CON_ERRPRINTF("tried to set %s on invalid target sprite (%d) from spr %d pic %d gv %s\n",
|
2012-11-26 08:26:04 +00:00
|
|
|
ActorLabels[lLabelID].name,iActor,vm.g_i,TrackerCast(vm.g_sp->picnum),
|
2012-09-05 17:25:47 +00:00
|
|
|
(lVar1<MAXGAMEVARS)?aGameVars[lVar1].szLabel:"extended");
|
2009-06-24 08:20:10 +00:00
|
|
|
insptr += (lVar2 == MAXGAMEVARS);
|
|
|
|
return;
|
|
|
|
|
|
|
|
badpos:
|
2012-09-05 17:25:47 +00:00
|
|
|
CON_ERRPRINTF("tried to set invalid %s position %d on sprite (%d) from spr %d\n",
|
|
|
|
ActorLabels[lLabelID].name,lParm2,iActor,vm.g_i);
|
2009-06-24 08:20:10 +00:00
|
|
|
insptr += (lVar2 == MAXGAMEVARS);
|
|
|
|
return;
|
2008-09-03 04:20:46 +00:00
|
|
|
}
|
|
|
|
|
2009-06-24 08:20:10 +00:00
|
|
|
|
2010-05-02 23:27:30 +00:00
|
|
|
static void __fastcall VM_GetSprite(int32_t lVar1, int32_t lLabelID, int32_t lVar2, int32_t lParm2)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2009-06-24 08:20:10 +00:00
|
|
|
register int32_t iActor=vm.g_i;
|
2008-09-03 04:20:46 +00:00
|
|
|
|
|
|
|
if (lVar1 != g_iThisActorID)
|
2011-03-04 08:50:58 +00:00
|
|
|
iActor=Gv_GetVarX(lVar1);
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2014-10-25 03:36:34 +00:00
|
|
|
if (EDUKE32_PREDICT_FALSE((unsigned)iActor >= MAXSPRITES))
|
2009-06-24 08:20:10 +00:00
|
|
|
goto badactor;
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2014-10-25 03:36:34 +00:00
|
|
|
if (EDUKE32_PREDICT_FALSE(ActorLabels[lLabelID].flags & LABEL_HASPARM2 &&
|
|
|
|
(unsigned)lParm2 >= (unsigned)ActorLabels[lLabelID].maxParm2))
|
2009-06-24 08:20:10 +00:00
|
|
|
goto badpos;
|
2008-12-13 08:02:22 +00:00
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case ACTOR_X:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sprite[iActor].x);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_Y:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sprite[iActor].y);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_Z:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sprite[iActor].z);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_CSTAT:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sprite[iActor].cstat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_PICNUM:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sprite[iActor].picnum);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_SHADE:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sprite[iActor].shade);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_PAL:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sprite[iActor].pal);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_CLIPDIST:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sprite[iActor].clipdist);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_DETAIL:
|
2014-02-08 14:37:55 +00:00
|
|
|
Gv_SetVarX(lVar2, sprite[iActor].blend);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_XREPEAT:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sprite[iActor].xrepeat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_YREPEAT:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sprite[iActor].yrepeat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_XOFFSET:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sprite[iActor].xoffset);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_YOFFSET:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sprite[iActor].yoffset);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_SECTNUM:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sprite[iActor].sectnum);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_STATNUM:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sprite[iActor].statnum);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_ANG:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sprite[iActor].ang);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_OWNER:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sprite[iActor].owner);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_XVEL:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sprite[iActor].xvel);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_YVEL:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sprite[iActor].yvel);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_ZVEL:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sprite[iActor].zvel);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_LOTAG:
|
2012-11-15 21:10:02 +00:00
|
|
|
Gv_SetVarX(lVar2, (int16_t)sprite[iActor].lotag);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HITAG:
|
2012-11-15 21:10:02 +00:00
|
|
|
Gv_SetVarX(lVar2, (int16_t)sprite[iActor].hitag);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
2012-11-16 00:54:04 +00:00
|
|
|
case ACTOR_ULOTAG:
|
|
|
|
Gv_SetVarX(lVar2, sprite[iActor].lotag);
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_UHITAG:
|
|
|
|
Gv_SetVarX(lVar2, sprite[iActor].hitag);
|
|
|
|
return;
|
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
case ACTOR_EXTRA:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, sprite[iActor].extra);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTCGG:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, actor[iActor].cgg);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTPICNUM :
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, actor[iActor].picnum);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTANG:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, actor[iActor].ang);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTEXTRA:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2,actor[iActor].extra);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTOWNER:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2,actor[iActor].owner);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTMOVFLAG:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2,actor[iActor].movflag);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTTEMPANG:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2,actor[iActor].tempang);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTACTORSTAYPUT:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2,actor[iActor].actorstayput);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTDISPICNUM:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2,actor[iActor].dispicnum);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTTIMETOSLEEP:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2,actor[iActor].timetosleep);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTFLOORZ:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2,actor[iActor].floorz);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTCEILINGZ:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2,actor[iActor].ceilingz);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTLASTVX:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2,actor[iActor].lastvx);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTLASTVY:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2,actor[iActor].lastvy);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTBPOSX:
|
2012-12-23 14:00:08 +00:00
|
|
|
Gv_SetVarX(lVar2,actor[iActor].bpos.x);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTBPOSY:
|
2012-12-23 14:00:08 +00:00
|
|
|
Gv_SetVarX(lVar2,actor[iActor].bpos.y);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTBPOSZ:
|
2012-12-23 14:00:08 +00:00
|
|
|
Gv_SetVarX(lVar2,actor[iActor].bpos.z);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTG_T:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, actor[iActor].t_data[lParm2]);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_ANGOFF:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2,spriteext[iActor].angoff);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_PITCH:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2,spriteext[iActor].pitch);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_ROLL:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2,spriteext[iActor].roll);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_MDXOFF:
|
2014-10-25 03:36:34 +00:00
|
|
|
Gv_SetVarX(lVar2,spriteext[iActor].offset.x);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_MDYOFF:
|
2014-10-25 03:36:34 +00:00
|
|
|
Gv_SetVarX(lVar2,spriteext[iActor].offset.y);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_MDZOFF:
|
2014-10-25 03:36:34 +00:00
|
|
|
Gv_SetVarX(lVar2,spriteext[iActor].offset.z);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_MDFLAGS:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2,spriteext[iActor].flags);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_XPANNING:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, spriteext[iActor].xpanning);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_YPANNING:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, spriteext[iActor].ypanning);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HTFLAGS:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2,actor[iActor].flags);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
2009-04-24 02:53:50 +00:00
|
|
|
case ACTOR_ALPHA:
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, (uint8_t)(spriteext[iActor].alpha * 255.0f));
|
2009-04-24 02:53:50 +00:00
|
|
|
return;
|
|
|
|
|
2013-11-11 16:48:17 +00:00
|
|
|
case ACTOR_ISVALID:
|
|
|
|
Gv_SetVarX(lVar2, sprite[iActor].statnum != MAXSTATUS);
|
|
|
|
return;
|
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
2009-06-24 08:20:10 +00:00
|
|
|
|
|
|
|
badactor:
|
2012-09-05 17:25:47 +00:00
|
|
|
CON_ERRPRINTF("tried to get %s on invalid target sprite (%d) from spr %d pic %d gv %s\n",
|
2012-11-26 08:26:04 +00:00
|
|
|
ActorLabels[lLabelID].name,iActor,vm.g_i,TrackerCast(vm.g_sp->picnum),
|
2012-09-05 17:25:47 +00:00
|
|
|
(lVar1<MAXGAMEVARS)?aGameVars[lVar1].szLabel:"extended");
|
2009-06-24 08:20:10 +00:00
|
|
|
insptr += (lVar2 == MAXGAMEVARS);
|
|
|
|
return;
|
|
|
|
|
|
|
|
badpos:
|
2012-09-05 17:25:47 +00:00
|
|
|
CON_ERRPRINTF("tried to get invalid %s position %d on sprite (%d) from spr %d\n",
|
|
|
|
ActorLabels[lLabelID].name,lParm2,iActor,vm.g_i);
|
2009-06-24 08:20:10 +00:00
|
|
|
insptr += (lVar2 == MAXGAMEVARS);
|
|
|
|
return;
|
2008-09-03 04:20:46 +00:00
|
|
|
}
|
|
|
|
|
2009-06-24 08:20:10 +00:00
|
|
|
|
2010-05-02 23:27:30 +00:00
|
|
|
static void __fastcall VM_AccessTsprite(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2009-01-09 09:29:17 +00:00
|
|
|
int32_t lValue=0;
|
|
|
|
int32_t iActor=vm.g_i;
|
2008-09-03 04:20:46 +00:00
|
|
|
|
|
|
|
if (lVar1 != g_iThisActorID)
|
2011-03-04 08:50:58 +00:00
|
|
|
iActor=Gv_GetVarX(lVar1);
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2014-10-25 03:36:34 +00:00
|
|
|
if (EDUKE32_PREDICT_FALSE((unsigned)iActor >= MAXSPRITES))
|
2009-06-24 08:20:10 +00:00
|
|
|
goto badsprite;
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2008-12-13 08:02:22 +00:00
|
|
|
if (iSet)
|
2011-03-04 08:50:58 +00:00
|
|
|
lValue=Gv_GetVarX(lVar2);
|
2008-12-13 08:02:22 +00:00
|
|
|
|
2014-10-25 03:36:34 +00:00
|
|
|
if (EDUKE32_PREDICT_FALSE(!spriteext[iActor].tspr))
|
2009-06-24 08:20:10 +00:00
|
|
|
goto badtspr;
|
2008-09-03 04:20:46 +00:00
|
|
|
|
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case ACTOR_X:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->x=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, spriteext[iActor].tspr->x);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_Y:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->y=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, spriteext[iActor].tspr->y);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_Z:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->z=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, spriteext[iActor].tspr->z);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_CSTAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->cstat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, spriteext[iActor].tspr->cstat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_PICNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->picnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, spriteext[iActor].tspr->picnum);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_SHADE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->shade=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, spriteext[iActor].tspr->shade);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_PAL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->pal=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, spriteext[iActor].tspr->pal);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_CLIPDIST:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->clipdist=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, spriteext[iActor].tspr->clipdist);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_DETAIL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2014-02-08 14:37:55 +00:00
|
|
|
spriteext[iActor].tspr->blend=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2014-02-08 14:37:55 +00:00
|
|
|
Gv_SetVarX(lVar2, spriteext[iActor].tspr->blend);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_XREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->xrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, spriteext[iActor].tspr->xrepeat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_YREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->yrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, spriteext[iActor].tspr->yrepeat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_XOFFSET:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->xoffset=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, spriteext[iActor].tspr->xoffset);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_YOFFSET:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->yoffset=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, spriteext[iActor].tspr->yoffset);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_SECTNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->sectnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, spriteext[iActor].tspr->sectnum);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_STATNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->statnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, spriteext[iActor].tspr->statnum);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_ANG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->ang=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, spriteext[iActor].tspr->ang);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_OWNER:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->owner=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, spriteext[iActor].tspr->owner);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
#if 1
|
|
|
|
case ACTOR_XVEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->xvel=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, spriteext[iActor].tspr->xvel);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_YVEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->yvel=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, spriteext[iActor].tspr->yvel);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_ZVEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->zvel=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, spriteext[iActor].tspr->zvel);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_LOTAG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-16 00:54:04 +00:00
|
|
|
spriteext[iActor].tspr->lotag=(int16_t)lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-15 21:10:02 +00:00
|
|
|
Gv_SetVarX(lVar2, (int16_t)spriteext[iActor].tspr->lotag);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_HITAG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-16 00:54:04 +00:00
|
|
|
spriteext[iActor].tspr->hitag=(int16_t)lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-15 21:10:02 +00:00
|
|
|
Gv_SetVarX(lVar2, (int16_t)spriteext[iActor].tspr->hitag);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
2012-11-16 00:54:04 +00:00
|
|
|
case ACTOR_ULOTAG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
|
|
|
spriteext[iActor].tspr->lotag=lValue;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
Gv_SetVarX(lVar2, spriteext[iActor].tspr->lotag);
|
|
|
|
return;
|
|
|
|
|
|
|
|
case ACTOR_UHITAG:
|
|
|
|
if (iSet)
|
|
|
|
{
|
|
|
|
spriteext[iActor].tspr->hitag=lValue;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
Gv_SetVarX(lVar2, spriteext[iActor].tspr->hitag);
|
|
|
|
return;
|
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
case ACTOR_EXTRA:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2008-12-13 08:02:22 +00:00
|
|
|
spriteext[iActor].tspr->extra=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2011-03-04 08:50:58 +00:00
|
|
|
Gv_SetVarX(lVar2, spriteext[iActor].tspr->extra);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
2009-06-24 08:20:10 +00:00
|
|
|
|
|
|
|
badsprite:
|
2012-11-26 08:26:04 +00:00
|
|
|
CON_ERRPRINTF("invalid target sprite (%d) %d %d\n", iActor, vm.g_i, TrackerCast(vm.g_sp->picnum));
|
2009-06-24 08:20:10 +00:00
|
|
|
insptr += (lVar2 == MAXGAMEVARS);
|
|
|
|
return;
|
|
|
|
|
|
|
|
badtspr:
|
2012-09-05 17:25:47 +00:00
|
|
|
CON_ERRPRINTF("Internal bug, tsprite is unavailable\n");
|
2009-06-24 08:20:10 +00:00
|
|
|
return;
|
2008-09-03 04:20:46 +00:00
|
|
|
}
|
|
|
|
|
2010-05-02 23:27:30 +00:00
|
|
|
static void __fastcall VM_AccessProjectile(int32_t iSet, int32_t lVar1, int32_t lLabelID, int32_t lVar2)
|
2008-09-03 04:20:46 +00:00
|
|
|
{
|
2009-01-09 09:29:17 +00:00
|
|
|
int32_t lValue=0;
|
2008-12-13 08:02:22 +00:00
|
|
|
|
2014-10-25 03:36:34 +00:00
|
|
|
if (EDUKE32_PREDICT_FALSE((unsigned)lVar1 >= MAXTILES))
|
2009-06-24 08:20:10 +00:00
|
|
|
goto badtile;
|
2008-09-03 04:20:46 +00:00
|
|
|
|
2008-12-13 08:02:22 +00:00
|
|
|
if (iSet)
|
2011-03-04 08:50:58 +00:00
|
|
|
lValue=Gv_GetVarX(lVar2);
|
2008-12-13 08:02:22 +00:00
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case PROJ_WORKSLIKE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].workslike=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].workslike);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_SPAWNS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].spawns=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].spawns);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_SXREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].sxrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].sxrepeat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_SYREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].syrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].syrepeat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_SOUND:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].sound=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].sound);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_ISOUND:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].isound=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].isound);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_VEL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].vel=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].vel);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_EXTRA:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].extra=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].extra);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_DECAL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].decal=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].decal);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_TRAIL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].trail=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].trail);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_TXREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].txrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].txrepeat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_TYREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].tyrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].tyrepeat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_TOFFSET:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].toffset=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].toffset);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_TNUM:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].tnum=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].tnum);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_DROP:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].drop=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].drop);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_CSTAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].cstat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].cstat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_CLIPDIST:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].clipdist=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].clipdist);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_SHADE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].shade=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].shade);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_XREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].xrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].xrepeat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_YREPEAT:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].yrepeat=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].yrepeat);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_PAL:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].pal=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].pal);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_EXTRA_RAND:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].extra_rand=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].extra_rand);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_HITRADIUS:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].hitradius=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].hitradius);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
2012-10-05 20:48:10 +00:00
|
|
|
case PROJ_MOVECNT:
|
2008-09-03 04:20:46 +00:00
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].movecnt=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].movecnt);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_OFFSET:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].offset=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].offset);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_BOUNCES:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].bounces=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].bounces);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_BSOUND:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].bsound=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].bsound);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
case PROJ_RANGE:
|
|
|
|
if (iSet)
|
|
|
|
{
|
2012-11-11 17:57:06 +00:00
|
|
|
ProjectileData[lVar1].range=lValue;
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-11-11 17:57:06 +00:00
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].range);
|
2008-09-03 04:20:46 +00:00
|
|
|
return;
|
|
|
|
|
2014-07-06 22:36:34 +00:00
|
|
|
case PROJ_FLASH_COLOR:
|
|
|
|
if (iSet)
|
|
|
|
{
|
|
|
|
ProjectileData[lVar1].flashcolor=lValue;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].flashcolor);
|
|
|
|
return;
|
|
|
|
|
2013-06-09 16:37:18 +00:00
|
|
|
case PROJ_USERDATA:
|
|
|
|
if (iSet)
|
|
|
|
{
|
|
|
|
ProjectileData[lVar1].userdata=lValue;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
Gv_SetVarX(lVar2, ProjectileData[lVar1].userdata);
|
|
|
|
return;
|
|
|
|
|
2008-09-03 04:20:46 +00:00
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
2009-06-24 08:20:10 +00:00
|
|
|
|
|
|
|
badtile:
|
2012-09-05 17:25:47 +00:00
|
|
|
CON_ERRPRINTF("invalid tile (%d)\n", lVar1);
|
2009-06-24 08:20:10 +00:00
|
|
|
insptr += (lVar2 == MAXGAMEVARS);
|
|
|
|
return;
|
2008-09-03 04:20:46 +00:00
|
|
|
}
|
2009-01-07 14:05:13 +00:00
|
|
|
#else
|
2010-05-02 23:27:30 +00:00
|
|
|
static int32_t __fastcall VM_AccessSpriteX(int32_t iActor, int32_t lLabelID, int32_t lParm2)
|
2009-01-07 14:05:13 +00:00
|
|
|
{
|
2014-10-25 03:36:34 +00:00
|
|
|
if (EDUKE32_PREDICT_FALSE(ActorLabels[lLabelID].flags & LABEL_HASPARM2 &&
|
|
|
|
(unsigned)lParm2 >= (unsigned)ActorLabels[lLabelID].maxParm2))
|
2009-06-24 08:20:10 +00:00
|
|
|
goto badpos;
|
2009-01-07 14:05:13 +00:00
|
|
|
|
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case ACTOR_X: return sprite[iActor].x;
|
|
|
|
case ACTOR_Y: return sprite[iActor].y;
|
|
|
|
case ACTOR_Z: return sprite[iActor].z;
|
|
|
|
case ACTOR_CSTAT: return sprite[iActor].cstat;
|
|
|
|
case ACTOR_PICNUM: return sprite[iActor].picnum;
|
|
|
|
case ACTOR_SHADE: return sprite[iActor].shade;
|
|
|
|
case ACTOR_PAL: return sprite[iActor].pal;
|
|
|
|
case ACTOR_CLIPDIST: return sprite[iActor].clipdist;
|
2014-02-08 14:37:55 +00:00
|
|
|
case ACTOR_DETAIL: return sprite[iActor].blend;
|
2009-01-07 14:05:13 +00:00
|
|
|
case ACTOR_XREPEAT: return sprite[iActor].xrepeat;
|
|
|
|
case ACTOR_YREPEAT: return sprite[iActor].yrepeat;
|
|
|
|
case ACTOR_XOFFSET: return sprite[iActor].xoffset;
|
|
|
|
case ACTOR_YOFFSET: return sprite[iActor].yoffset;
|
|
|
|
case ACTOR_SECTNUM: return sprite[iActor].sectnum;
|
|
|
|
case ACTOR_STATNUM: return sprite[iActor].statnum;
|
|
|
|
case ACTOR_ANG: return sprite[iActor].ang;
|
|
|
|
case ACTOR_OWNER: return sprite[iActor].owner;
|
|
|
|
case ACTOR_XVEL: return sprite[iActor].xvel;
|
|
|
|
case ACTOR_YVEL: return sprite[iActor].yvel;
|
|
|
|
case ACTOR_ZVEL: return sprite[iActor].zvel;
|
2012-11-15 21:10:02 +00:00
|
|
|
case ACTOR_LOTAG: return (int16_t)sprite[iActor].lotag;
|
|
|
|
case ACTOR_HITAG: return (int16_t)sprite[iActor].hitag;
|
2012-11-16 00:54:04 +00:00
|
|
|
case ACTOR_ULOTAG: return sprite[iActor].lotag;
|
|
|
|
case ACTOR_UHITAG: return sprite[iActor].hitag;
|
2009-01-07 14:05:13 +00:00
|
|
|
case ACTOR_EXTRA: return sprite[iActor].extra;
|
2010-05-02 23:27:30 +00:00
|
|
|
case ACTOR_HTCGG: return actor[iActor].cgg;
|
|
|
|
case ACTOR_HTPICNUM : return actor[iActor].picnum;
|
|
|
|
case ACTOR_HTANG: return actor[iActor].ang;
|
|
|
|
case ACTOR_HTEXTRA: return actor[iActor].extra;
|
|
|
|
case ACTOR_HTOWNER: return actor[iActor].owner;
|
|
|
|
case ACTOR_HTMOVFLAG: return actor[iActor].movflag;
|
|
|
|
case ACTOR_HTTEMPANG: return actor[iActor].tempang;
|
|
|
|
case ACTOR_HTACTORSTAYPUT: return actor[iActor].actorstayput;
|
|
|
|
case ACTOR_HTDISPICNUM: return actor[iActor].dispicnum;
|
|
|
|
case ACTOR_HTTIMETOSLEEP: return actor[iActor].timetosleep;
|
|
|
|
case ACTOR_HTFLOORZ: return actor[iActor].floorz;
|
|
|
|
case ACTOR_HTCEILINGZ: return actor[iActor].ceilingz;
|
|
|
|
case ACTOR_HTLASTVX: return actor[iActor].lastvx;
|
|
|
|
case ACTOR_HTLASTVY: return actor[iActor].lastvy;
|
2012-12-23 14:00:08 +00:00
|
|
|
case ACTOR_HTBPOSX: return actor[iActor].bpos.x;
|
|
|
|
case ACTOR_HTBPOSY: return actor[iActor].bpos.y;
|
|
|
|
case ACTOR_HTBPOSZ: return actor[iActor].bpos.z;
|
2010-05-02 23:27:30 +00:00
|
|
|
case ACTOR_HTG_T: return actor[iActor].t_data[lParm2];
|
2009-01-07 14:05:13 +00:00
|
|
|
case ACTOR_ANGOFF: return spriteext[iActor].angoff;
|
|
|
|
case ACTOR_PITCH: return spriteext[iActor].pitch;
|
|
|
|
case ACTOR_ROLL: return spriteext[iActor].roll;
|
2014-10-25 03:36:34 +00:00
|
|
|
case ACTOR_MDXOFF: return spriteext[iActor].offset.x;
|
|
|
|
case ACTOR_MDYOFF: return spriteext[iActor].offset.y;
|
|
|
|
case ACTOR_MDZOFF: return spriteext[iActor].offset.z;
|
2009-01-07 14:05:13 +00:00
|
|
|
case ACTOR_MDFLAGS: return spriteext[iActor].flags;
|
|
|
|
case ACTOR_XPANNING: return spriteext[iActor].xpanning;
|
|
|
|
case ACTOR_YPANNING: return spriteext[iActor].ypanning;
|
2010-05-02 23:27:30 +00:00
|
|
|
case ACTOR_HTFLAGS: return actor[iActor].flags;
|
2009-04-24 03:29:28 +00:00
|
|
|
case ACTOR_ALPHA: return (uint8_t)(spriteext[iActor].alpha*255.0f);
|
2013-11-11 16:48:17 +00:00
|
|
|
case ACTOR_ISVALID: return (sprite[iActor].statnum != MAXSTATUS);
|
2009-01-07 14:05:13 +00:00
|
|
|
default: return -1;
|
|
|
|
}
|
2009-06-24 08:20:10 +00:00
|
|
|
|
|
|
|
badpos:
|
2012-09-05 17:25:47 +00:00
|
|
|
CON_ERRPRINTF("tried to get invalid %s position %d on sprite (%d) from spr %d\n",
|
|
|
|
ActorLabels[lLabelID].name,lParm2,iActor,vm.g_i);
|
2009-06-24 08:20:10 +00:00
|
|
|
return -1;
|
2009-01-07 14:05:13 +00:00
|
|
|
}
|
|
|
|
|
2010-05-02 23:27:30 +00:00
|
|
|
static int32_t __fastcall VM_AccessSectorX(int32_t iSector, int32_t lLabelID)
|
2009-01-07 14:05:13 +00:00
|
|
|
{
|
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case SECTOR_WALLPTR: return sector[iSector].wallptr;
|
|
|
|
case SECTOR_WALLNUM: return sector[iSector].wallnum;
|
|
|
|
case SECTOR_CEILINGZ: return sector[iSector].ceilingz;
|
|
|
|
case SECTOR_FLOORZ: return sector[iSector].floorz;
|
|
|
|
case SECTOR_CEILINGSTAT: return sector[iSector].ceilingstat;
|
|
|
|
case SECTOR_FLOORSTAT: return sector[iSector].floorstat;
|
|
|
|
case SECTOR_CEILINGPICNUM: return sector[iSector].ceilingpicnum;
|
|
|
|
case SECTOR_CEILINGSLOPE: return sector[iSector].ceilingheinum;
|
|
|
|
case SECTOR_CEILINGSHADE: return sector[iSector].ceilingshade;
|
|
|
|
case SECTOR_CEILINGPAL: return sector[iSector].ceilingpal;
|
|
|
|
case SECTOR_CEILINGXPANNING: return sector[iSector].ceilingxpanning;
|
|
|
|
case SECTOR_CEILINGYPANNING: return sector[iSector].ceilingypanning;
|
|
|
|
case SECTOR_FLOORPICNUM: return sector[iSector].floorpicnum;
|
|
|
|
case SECTOR_FLOORSLOPE: return sector[iSector].floorheinum;
|
|
|
|
case SECTOR_FLOORSHADE: return sector[iSector].floorshade;
|
|
|
|
case SECTOR_FLOORPAL: return sector[iSector].floorpal;
|
|
|
|
case SECTOR_FLOORXPANNING: return sector[iSector].floorxpanning;
|
|
|
|
case SECTOR_FLOORYPANNING: return sector[iSector].floorypanning;
|
|
|
|
case SECTOR_VISIBILITY: return sector[iSector].visibility;
|
2014-04-05 11:28:10 +00:00
|
|
|
case SECTOR_FOGPAL: return sector[iSector].fogpal;
|
2012-11-15 21:10:02 +00:00
|
|
|
case SECTOR_LOTAG: return (int16_t)sector[iSector].lotag;
|
|
|
|
case SECTOR_HITAG: return (int16_t)sector[iSector].hitag;
|
2012-11-16 00:54:04 +00:00
|
|
|
case SECTOR_ULOTAG: return sector[iSector].lotag;
|
|
|
|
case SECTOR_UHITAG: return sector[iSector].hitag;
|
2009-01-07 14:05:13 +00:00
|
|
|
case SECTOR_EXTRA: return sector[iSector].extra;
|
2011-07-10 15:39:21 +00:00
|
|
|
case SECTOR_CEILINGBUNCH:
|
|
|
|
case SECTOR_FLOORBUNCH:
|
|
|
|
#ifdef YAX_ENABLE
|
|
|
|
return yax_getbunch(iSector, lLabelID==SECTOR_FLOORBUNCH);
|
|
|
|
#else
|
|
|
|
return -1;
|
|
|
|
#endif
|
2009-01-07 14:05:13 +00:00
|
|
|
default: return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-05-02 23:27:30 +00:00
|
|
|
static int32_t __fastcall VM_AccessPlayerX(int32_t iPlayer, int32_t lLabelID, int32_t lParm2)
|
2009-01-07 14:05:13 +00:00
|
|
|
{
|
2012-08-10 19:11:53 +00:00
|
|
|
DukePlayer_t *const ps = g_player[iPlayer].ps;
|
|
|
|
|
2014-10-25 03:36:34 +00:00
|
|
|
if (EDUKE32_PREDICT_FALSE(PlayerLabels[lLabelID].flags & LABEL_HASPARM2 &&
|
|
|
|
(unsigned)lParm2 >= (unsigned)PlayerLabels[lLabelID].maxParm2))
|
2009-06-24 08:20:10 +00:00
|
|
|
goto badpos;
|
2009-01-07 14:05:13 +00:00
|
|
|
|
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case PLAYER_ZOOM:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->zoom;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_EXITX:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->exitx;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_EXITY:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->exity;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_LOOGIEX:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->loogiex[lParm2];
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_LOOGIEY:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->loogiey[lParm2];
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_NUMLOOGS:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->numloogs;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_LOOGCNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->loogcnt;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_POSX:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->pos.x;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_POSY:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->pos.y;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_POSZ:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->pos.z;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_HORIZ:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->horiz;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_OHORIZ:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->ohoriz;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_OHORIZOFF:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->ohorizoff;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_INVDISPTIME:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->invdisptime;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_BOBPOSX:
|
Clean up some player code a bit... make bobposx/bobposy a vec2_t, make fricxv/fricyv a per-player vec2_t (TODO: CON access), promote angvel in input_t to int16_t and allow for player angle changes that result in odd numbered angles (we were effectively artificially limiting the angle to 1024 values before), fix some HUD model ID stuff that should help with the weapons in the HRP, clean up a bunch of random functions (P_FireWeapon(), P_DisplayTip(), P_DisplayAccess(), P_DisplayWeapon(), P_GetInput(), etc). Also clean up G_SetupFilenameBasedMusic() to loop through flac/ogg/mid when searching for usermap music replacements. Some of this really needs a BYTEVERSION bump, but these commits aren't for synthesis to build so we're not doing it yet. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4703 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:07:11 +00:00
|
|
|
return ps->bobpos.x;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_BOBPOSY:
|
Clean up some player code a bit... make bobposx/bobposy a vec2_t, make fricxv/fricyv a per-player vec2_t (TODO: CON access), promote angvel in input_t to int16_t and allow for player angle changes that result in odd numbered angles (we were effectively artificially limiting the angle to 1024 values before), fix some HUD model ID stuff that should help with the weapons in the HRP, clean up a bunch of random functions (P_FireWeapon(), P_DisplayTip(), P_DisplayAccess(), P_DisplayWeapon(), P_GetInput(), etc). Also clean up G_SetupFilenameBasedMusic() to loop through flac/ogg/mid when searching for usermap music replacements. Some of this really needs a BYTEVERSION bump, but these commits aren't for synthesis to build so we're not doing it yet. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4703 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:07:11 +00:00
|
|
|
return ps->bobpos.y;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_OPOSX:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->opos.x;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_OPOSY:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->opos.y;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_OPOSZ:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->opos.z;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_PYOFF:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->pyoff;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_OPYOFF:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->opyoff;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_POSXV:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->vel.x;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_POSYV:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->vel.y;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_POSZV:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->vel.z;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_LAST_PISSED_TIME:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->last_pissed_time;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_TRUEFZ:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->truefz;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_TRUECZ:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->truecz;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_PLAYER_PAR:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->player_par;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_VISIBILITY:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->visibility;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_BOBCOUNTER:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->bobcounter;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_WEAPON_SWAY:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->weapon_sway;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_PALS_TIME:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->pals.f;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_RANDOMFLAMEX:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->randomflamex;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_CRACK_TIME:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->crack_time;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_AIM_MODE:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->aim_mode;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_ANG:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->ang;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_OANG:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->oang;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_ANGVEL:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->angvel;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_CURSECTNUM:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->cursectnum;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_LOOK_ANG:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->look_ang;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_LAST_EXTRA:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->last_extra;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_SUBWEAPON:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->subweapon;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_AMMO_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->ammo_amount[lParm2];
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_WACKEDBYACTOR:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->wackedbyactor;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_FRAG:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->frag;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_FRAGGEDSELF:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->fraggedself;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_CURR_WEAPON:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->curr_weapon;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_LAST_WEAPON:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->last_weapon;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_TIPINCS:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->tipincs;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_HORIZOFF:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->horizoff;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_WANTWEAPONFIRE:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->wantweaponfire;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_HOLODUKE_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->inv_amount[GET_HOLODUKE];
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_NEWOWNER:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->newowner;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_HURT_DELAY:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->hurt_delay;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_HBOMB_HOLD_DELAY:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->hbomb_hold_delay;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_JUMPING_COUNTER:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->jumping_counter;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_AIRLEFT:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->airleft;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_KNEE_INCS:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->knee_incs;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_ACCESS_INCS:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->access_incs;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_FTA:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->fta;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_FTQ:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->ftq;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_ACCESS_WALLNUM:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->access_wallnum;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_ACCESS_SPRITENUM:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->access_spritenum;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_KICKBACK_PIC:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->kickback_pic;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_GOT_ACCESS:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->got_access;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_WEAPON_ANG:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->weapon_ang;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_FIRSTAID_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->inv_amount[GET_FIRSTAID];
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_SOMETHINGONPLAYER:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->somethingonplayer;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_ON_CRANE:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->on_crane;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_I:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->i;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_ONE_PARALLAX_SECTNUM:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->one_parallax_sectnum;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_OVER_SHOULDER_ON:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->over_shoulder_on;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_RANDOM_CLUB_FRAME:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->random_club_frame;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_FIST_INCS:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->fist_incs;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_ONE_EIGHTY_COUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->one_eighty_count;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_CHEAT_PHASE:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->cheat_phase;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_DUMMYPLAYERSPRITE:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->dummyplayersprite;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_EXTRA_EXTRA8:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->extra_extra8;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_QUICK_KICK:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->quick_kick;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_HEAT_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->inv_amount[GET_HEATS];
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_ACTORSQU:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->actorsqu;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_TIMEBEFOREEXIT:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->timebeforeexit;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_CUSTOMEXITSOUND:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->customexitsound;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_WEAPRECS:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->weaprecs[lParm2];
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_WEAPRECCNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->weapreccnt;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_INTERFACE_TOGGLE_FLAG:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->interface_toggle_flag;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_ROTSCRNANG:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->rotscrnang;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_DEAD_FLAG:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->dead_flag;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_SHOW_EMPTY_WEAPON:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->show_empty_weapon;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_SCUBA_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->inv_amount[GET_SCUBA];
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_JETPACK_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->inv_amount[GET_JETPACK];
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_STEROIDS_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->inv_amount[GET_STEROIDS];
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_SHIELD_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->inv_amount[GET_SHIELD];
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_HOLODUKE_ON:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->holoduke_on;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_PYCOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->pycount;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_WEAPON_POS:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->weapon_pos;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_FRAG_PS:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->frag_ps;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_TRANSPORTER_HOLD:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->transporter_hold;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_LAST_FULL_WEAPON:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->last_full_weapon;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_FOOTPRINTSHADE:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->footprintshade;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_BOOT_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->inv_amount[GET_BOOTS];
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_SCREAM_VOICE:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->scream_voice;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_GM:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->gm;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_ON_WARPING_SECTOR:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->on_warping_sector;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_FOOTPRINTCOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->footprintcount;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_HBOMB_ON:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->hbomb_on;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_JUMPING_TOGGLE:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->jumping_toggle;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_RAPID_FIRE_HOLD:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->rapid_fire_hold;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_ON_GROUND:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->on_ground;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_INVEN_ICON:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->inven_icon;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_BUTTONPALETTE:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->buttonpalette;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_JETPACK_ON:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->jetpack_on;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_SPRITEBRIDGE:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->spritebridge;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_LASTRANDOMSPOT:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->lastrandomspot;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_SCUBA_ON:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->scuba_on;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_FOOTPRINTPAL:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->footprintpal;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_HEAT_ON:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->heat_on;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_HOLSTER_WEAPON:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->holster_weapon;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_FALLING_COUNTER:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->falling_counter;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_GOTWEAPON:
|
2012-08-10 19:11:53 +00:00
|
|
|
return (ps->gotweapon & (1<<lParm2)) != 0;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_REFRESH_INVENTORY:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->refresh_inventory;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_TOGGLE_KEY_FLAG:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->toggle_key_flag;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_KNUCKLE_INCS:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->knuckle_incs;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_WALKING_SND_TOGGLE:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->walking_snd_toggle;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_PALOOKUP:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->palookup;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_HARD_LANDING:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->hard_landing;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_MAX_SECRET_ROOMS:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->max_secret_rooms;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_SECRET_ROOMS:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->secret_rooms;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_PALS:
|
2010-05-02 23:27:30 +00:00
|
|
|
switch (lParm2)
|
|
|
|
{
|
|
|
|
case 0:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->pals.r;
|
2010-05-02 23:27:30 +00:00
|
|
|
case 1:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->pals.g;
|
2010-05-02 23:27:30 +00:00
|
|
|
case 2:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->pals.b;
|
2010-05-02 23:27:30 +00:00
|
|
|
}
|
|
|
|
return -1;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_MAX_ACTORS_KILLED:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->max_actors_killed;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_ACTORS_KILLED:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->actors_killed;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_RETURN_TO_CENTER:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->return_to_center;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_RUNSPEED:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->runspeed;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_SBS:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->sbs;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_RELOADING:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->reloading;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_AUTO_AIM:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->auto_aim;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_MOVEMENT_LOCK:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->movement_lock;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_SOUND_PITCH:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->sound_pitch;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_WEAPONSWITCH:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->weaponswitch;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_TEAM:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->team;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_MAX_PLAYER_HEALTH:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->max_player_health;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_MAX_SHIELD_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->max_shield_amount;
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_MAX_AMMO_AMOUNT:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->max_ammo_amount[lParm2];
|
2009-01-07 14:05:13 +00:00
|
|
|
case PLAYER_LAST_QUICK_KICK:
|
2012-08-10 19:11:53 +00:00
|
|
|
return ps->last_quick_kick;
|
2012-10-29 04:29:17 +00:00
|
|
|
case PLAYER_AUTOSTEP:
|
|
|
|
return ps->autostep;
|
|
|
|
case PLAYER_AUTOSTEP_SBW:
|
|
|
|
return ps->autostep_sbw;
|
2009-01-07 14:05:13 +00:00
|
|
|
default:
|
|
|
|
return -1;
|
|
|
|
}
|
2009-06-24 08:20:10 +00:00
|
|
|
|
|
|
|
badpos:
|
2012-09-05 17:25:47 +00:00
|
|
|
CON_ERRPRINTF("tried to get invalid %s position %d on player (%d) from spr %d\n",
|
|
|
|
PlayerLabels[lLabelID].name,lParm2,iPlayer,vm.g_i);
|
2009-06-24 08:20:10 +00:00
|
|
|
return -1;
|
2009-01-07 14:05:13 +00:00
|
|
|
}
|
|
|
|
|
2010-05-02 23:27:30 +00:00
|
|
|
static int32_t __fastcall VM_AccessWallX(int32_t iWall, int32_t lLabelID)
|
2009-01-09 09:29:17 +00:00
|
|
|
{
|
|
|
|
switch (lLabelID)
|
|
|
|
{
|
|
|
|
case WALL_X:
|
|
|
|
return wall[iWall].x;
|
|
|
|
case WALL_Y:
|
|
|
|
return wall[iWall].y;
|
|
|
|
case WALL_POINT2:
|
|
|
|
return wall[iWall].point2;
|
|
|
|
case WALL_NEXTWALL:
|
|
|
|
return wall[iWall].nextwall;
|
|
|
|
case WALL_NEXTSECTOR:
|
|
|
|
return wall[iWall].nextsector;
|
|
|
|
case WALL_CSTAT:
|
|
|
|
return wall[iWall].cstat;
|
|
|
|
case WALL_PICNUM:
|
|
|
|
return wall[iWall].picnum;
|
|
|
|
case WALL_OVERPICNUM:
|
|
|
|
return wall[iWall].overpicnum;
|
|
|
|
case WALL_SHADE:
|
|
|
|
return wall[iWall].shade;
|
|
|
|
case WALL_PAL:
|
|
|
|
return wall[iWall].pal;
|
|
|
|
case WALL_XREPEAT:
|
|
|
|
return wall[iWall].xrepeat;
|
|
|
|
case WALL_YREPEAT:
|
|
|
|
return wall[iWall].yrepeat;
|
|
|
|
case WALL_XPANNING:
|
|
|
|
return wall[iWall].xpanning;
|
|
|
|
case WALL_YPANNING:
|
|
|
|
return wall[iWall].ypanning;
|
|
|
|
case WALL_LOTAG:
|
2012-11-15 21:10:02 +00:00
|
|
|
return (int16_t)wall[iWall].lotag;
|
2009-01-09 09:29:17 +00:00
|
|
|
case WALL_HITAG:
|
2012-11-15 21:10:02 +00:00
|
|
|
return (int16_t)wall[iWall].hitag;
|
2012-11-16 00:54:04 +00:00
|
|
|
case WALL_ULOTAG:
|
|
|
|
return wall[iWall].lotag;
|
|
|
|
case WALL_UHITAG:
|
|
|
|
return wall[iWall].hitag;
|
2009-01-09 09:29:17 +00:00
|
|
|
case WALL_EXTRA:
|
|
|
|
return wall[iWall].extra;
|
|
|
|
default:
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif // _gamevars_c_
|