mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
Add a THISACTOR for tiledata and paldata, referring to the current actor's picnum and pal.
git-svn-id: https://svn.eduke32.com/eduke32@6351 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
ebe2e67439
commit
bbff77b20e
1 changed files with 15 additions and 3 deletions
|
@ -703,11 +703,15 @@ special:
|
|||
break;
|
||||
|
||||
case STRUCT_TILEDATA:
|
||||
if (arrayIndexVar == g_thisActorVarID)
|
||||
arrayIndex = vm.pSprite->picnum;
|
||||
CHECK_INDEX(MAXTILES);
|
||||
returnValue = VM_GetTileData(arrayIndex, labelNum);
|
||||
break;
|
||||
|
||||
case STRUCT_PALDATA:
|
||||
if (arrayIndexVar == g_thisActorVarID)
|
||||
arrayIndex = vm.pSprite->pal;
|
||||
CHECK_INDEX(MAXPALOOKUPS);
|
||||
returnValue = VM_GetPalData(arrayIndex, labelNum);
|
||||
break;
|
||||
|
@ -721,18 +725,21 @@ special:
|
|||
break;
|
||||
|
||||
case STRUCT_INPUT:
|
||||
if (arrayIndexVar == g_thisActorVarID) arrayIndex = vm.playerNum;
|
||||
if (arrayIndexVar == g_thisActorVarID)
|
||||
arrayIndex = vm.playerNum;
|
||||
CHECK_INDEX(MAXPLAYERS);
|
||||
returnValue = VM_GetPlayerInput(arrayIndex, labelNum);
|
||||
break;
|
||||
|
||||
case STRUCT_ACTORVAR:
|
||||
case STRUCT_PLAYERVAR:
|
||||
// no THISACTOR check here because we convert those cases to setvarvar
|
||||
returnValue = Gv_GetVar(labelNum, arrayIndex, playerNum);
|
||||
break;
|
||||
|
||||
case STRUCT_SECTOR:
|
||||
if (arrayIndexVar == g_thisActorVarID) arrayIndex = sprite[vm.spriteNum].sectnum;
|
||||
if (arrayIndexVar == g_thisActorVarID)
|
||||
arrayIndex = vm.pSprite->sectnum;
|
||||
CHECK_INDEX(MAXSECTORS);
|
||||
returnValue = VM_GetSector(arrayIndex, labelNum);
|
||||
break;
|
||||
|
@ -894,11 +901,15 @@ int __fastcall Gv_GetSpecialVarX(int gameVar)
|
|||
break;
|
||||
|
||||
case STRUCT_TILEDATA:
|
||||
if (arrayIndexVar == g_thisActorVarID)
|
||||
arrayIndex = vm.pSprite->picnum;
|
||||
CHECK_INDEX(MAXTILES, GVX_BADTILE);
|
||||
returnValue = VM_GetTileData(arrayIndex, labelNum);
|
||||
break;
|
||||
|
||||
case STRUCT_PALDATA:
|
||||
if (arrayIndexVar == g_thisActorVarID)
|
||||
arrayIndex = vm.pSprite->pal;
|
||||
CHECK_INDEX(MAXPALOOKUPS, GVX_BADPAL);
|
||||
returnValue = VM_GetPalData(arrayIndex, labelNum);
|
||||
break;
|
||||
|
@ -921,12 +932,13 @@ int __fastcall Gv_GetSpecialVarX(int gameVar)
|
|||
|
||||
case STRUCT_ACTORVAR:
|
||||
case STRUCT_PLAYERVAR:
|
||||
// no THISACTOR check here because we convert those cases to setvarvar
|
||||
returnValue = Gv_GetVar(labelNum, arrayIndex, vm.playerNum);
|
||||
break;
|
||||
|
||||
case STRUCT_SECTOR:
|
||||
if (arrayIndexVar == g_thisActorVarID)
|
||||
arrayIndex = sprite[vm.spriteNum].sectnum;
|
||||
arrayIndex = vm.pSprite->sectnum;
|
||||
CHECK_INDEX(MAXSECTORS, GVX_BADSECTOR);
|
||||
returnValue = VM_GetSector(arrayIndex, labelNum);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue