mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-01 00:21:35 +00:00
- Added NecroMage's submission for bitwise/shift assignment operators for ACS.
SVN r261 (trunk)
This commit is contained in:
parent
e5a26c75fa
commit
1ff4d09bed
3 changed files with 278 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
July 16, 2006 (Changes by Graf Zahl)
|
||||
- Added NecroMage's submission for bitwise/shift assignment operators for ACS.
|
||||
- Added replacement handling to A_BossDeath.
|
||||
- Fixed: The check for no skill menu was incorrect when a custom player
|
||||
class menu was present so instead of starting the game specific skill menu
|
||||
|
|
238
src/p_acs.cpp
238
src/p_acs.cpp
|
@ -3010,6 +3010,243 @@ int DLevelScript::RunScript ()
|
|||
}
|
||||
break;
|
||||
|
||||
//[MW] start
|
||||
case PCD_ANDSCRIPTVAR:
|
||||
locals[NEXTBYTE] &= STACK(1);
|
||||
sp--;
|
||||
break;
|
||||
|
||||
case PCD_ANDMAPVAR:
|
||||
*(activeBehavior->MapVars[NEXTBYTE]) &= STACK(1);
|
||||
sp--;
|
||||
break;
|
||||
|
||||
case PCD_ANDWORLDVAR:
|
||||
ACS_WorldVars[NEXTBYTE] &= STACK(1);
|
||||
sp--;
|
||||
break;
|
||||
|
||||
case PCD_ANDGLOBALVAR:
|
||||
ACS_GlobalVars[NEXTBYTE] &= STACK(1);
|
||||
sp--;
|
||||
break;
|
||||
|
||||
case PCD_ANDMAPARRAY:
|
||||
{
|
||||
int a = *(activeBehavior->MapVars[NEXTBYTE]);
|
||||
int i = STACK(2);
|
||||
activeBehavior->SetArrayVal (a, i, activeBehavior->GetArrayVal (a, i) & STACK(1));
|
||||
sp -= 2;
|
||||
}
|
||||
break;
|
||||
|
||||
case PCD_ANDWORLDARRAY:
|
||||
{
|
||||
int a = NEXTBYTE;
|
||||
int i = STACK(2);
|
||||
ACS_WorldArrays[a].SetVal (i, ACS_WorldArrays[a].GetVal (i) & STACK(1));
|
||||
sp -= 2;
|
||||
}
|
||||
break;
|
||||
|
||||
case PCD_ANDGLOBALARRAY:
|
||||
{
|
||||
int a = NEXTBYTE;
|
||||
int i = STACK(2);
|
||||
ACS_GlobalArrays[a].SetVal (i, ACS_GlobalArrays[a].GetVal (i) & STACK(1));
|
||||
sp -= 2;
|
||||
}
|
||||
break;
|
||||
|
||||
case PCD_EORSCRIPTVAR:
|
||||
locals[NEXTBYTE] ^= STACK(1);
|
||||
sp--;
|
||||
break;
|
||||
|
||||
case PCD_EORMAPVAR:
|
||||
*(activeBehavior->MapVars[NEXTBYTE]) ^= STACK(1);
|
||||
sp--;
|
||||
break;
|
||||
|
||||
case PCD_EORWORLDVAR:
|
||||
ACS_WorldVars[NEXTBYTE] ^= STACK(1);
|
||||
sp--;
|
||||
break;
|
||||
|
||||
case PCD_EORGLOBALVAR:
|
||||
ACS_GlobalVars[NEXTBYTE] ^= STACK(1);
|
||||
sp--;
|
||||
break;
|
||||
|
||||
case PCD_EORMAPARRAY:
|
||||
{
|
||||
int a = *(activeBehavior->MapVars[NEXTBYTE]);
|
||||
int i = STACK(2);
|
||||
activeBehavior->SetArrayVal (a, i, activeBehavior->GetArrayVal (a, i) ^ STACK(1));
|
||||
sp -= 2;
|
||||
}
|
||||
break;
|
||||
|
||||
case PCD_EORWORLDARRAY:
|
||||
{
|
||||
int a = NEXTBYTE;
|
||||
int i = STACK(2);
|
||||
ACS_WorldArrays[a].SetVal (i, ACS_WorldArrays[a].GetVal (i) ^ STACK(1));
|
||||
sp -= 2;
|
||||
}
|
||||
break;
|
||||
|
||||
case PCD_EORGLOBALARRAY:
|
||||
{
|
||||
int a = NEXTBYTE;
|
||||
int i = STACK(2);
|
||||
ACS_GlobalArrays[a].SetVal (i, ACS_GlobalArrays[a].GetVal (i) ^ STACK(1));
|
||||
sp -= 2;
|
||||
}
|
||||
break;
|
||||
|
||||
case PCD_ORSCRIPTVAR:
|
||||
locals[NEXTBYTE] |= STACK(1);
|
||||
sp--;
|
||||
break;
|
||||
|
||||
case PCD_ORMAPVAR:
|
||||
*(activeBehavior->MapVars[NEXTBYTE]) |= STACK(1);
|
||||
sp--;
|
||||
break;
|
||||
|
||||
case PCD_ORWORLDVAR:
|
||||
ACS_WorldVars[NEXTBYTE] |= STACK(1);
|
||||
sp--;
|
||||
break;
|
||||
|
||||
case PCD_ORGLOBALVAR:
|
||||
ACS_GlobalVars[NEXTBYTE] |= STACK(1);
|
||||
sp--;
|
||||
break;
|
||||
|
||||
case PCD_ORMAPARRAY:
|
||||
{
|
||||
int a = *(activeBehavior->MapVars[NEXTBYTE]);
|
||||
int i = STACK(2);
|
||||
activeBehavior->SetArrayVal (a, i, activeBehavior->GetArrayVal (a, i) | STACK(1));
|
||||
sp -= 2;
|
||||
}
|
||||
break;
|
||||
|
||||
case PCD_ORWORLDARRAY:
|
||||
{
|
||||
int a = NEXTBYTE;
|
||||
int i = STACK(2);
|
||||
ACS_WorldArrays[a].SetVal (i, ACS_WorldArrays[a].GetVal (i) | STACK(1));
|
||||
sp -= 2;
|
||||
}
|
||||
break;
|
||||
|
||||
case PCD_ORGLOBALARRAY:
|
||||
{
|
||||
int a = NEXTBYTE;
|
||||
int i = STACK(2);
|
||||
ACS_GlobalArrays[a].SetVal (i, ACS_GlobalArrays[a].GetVal (i) | STACK(1));
|
||||
sp -= 2;
|
||||
}
|
||||
break;
|
||||
|
||||
case PCD_LSSCRIPTVAR:
|
||||
locals[NEXTBYTE] <<= STACK(1);
|
||||
sp--;
|
||||
break;
|
||||
|
||||
case PCD_LSMAPVAR:
|
||||
*(activeBehavior->MapVars[NEXTBYTE]) <<= STACK(1);
|
||||
sp--;
|
||||
break;
|
||||
|
||||
case PCD_LSWORLDVAR:
|
||||
ACS_WorldVars[NEXTBYTE] <<= STACK(1);
|
||||
sp--;
|
||||
break;
|
||||
|
||||
case PCD_LSGLOBALVAR:
|
||||
ACS_GlobalVars[NEXTBYTE] <<= STACK(1);
|
||||
sp--;
|
||||
break;
|
||||
|
||||
case PCD_LSMAPARRAY:
|
||||
{
|
||||
int a = *(activeBehavior->MapVars[NEXTBYTE]);
|
||||
int i = STACK(2);
|
||||
activeBehavior->SetArrayVal (a, i, activeBehavior->GetArrayVal (a, i) << STACK(1));
|
||||
sp -= 2;
|
||||
}
|
||||
break;
|
||||
|
||||
case PCD_LSWORLDARRAY:
|
||||
{
|
||||
int a = NEXTBYTE;
|
||||
int i = STACK(2);
|
||||
ACS_WorldArrays[a].SetVal (i, ACS_WorldArrays[a].GetVal (i) << STACK(1));
|
||||
sp -= 2;
|
||||
}
|
||||
break;
|
||||
|
||||
case PCD_LSGLOBALARRAY:
|
||||
{
|
||||
int a = NEXTBYTE;
|
||||
int i = STACK(2);
|
||||
ACS_GlobalArrays[a].SetVal (i, ACS_GlobalArrays[a].GetVal (i) << STACK(1));
|
||||
sp -= 2;
|
||||
}
|
||||
break;
|
||||
|
||||
case PCD_RSSCRIPTVAR:
|
||||
locals[NEXTBYTE] >>= STACK(1);
|
||||
sp--;
|
||||
break;
|
||||
|
||||
case PCD_RSMAPVAR:
|
||||
*(activeBehavior->MapVars[NEXTBYTE]) >>= STACK(1);
|
||||
sp--;
|
||||
break;
|
||||
|
||||
case PCD_RSWORLDVAR:
|
||||
ACS_WorldVars[NEXTBYTE] >>= STACK(1);
|
||||
sp--;
|
||||
break;
|
||||
|
||||
case PCD_RSGLOBALVAR:
|
||||
ACS_GlobalVars[NEXTBYTE] >>= STACK(1);
|
||||
sp--;
|
||||
break;
|
||||
|
||||
case PCD_RSMAPARRAY:
|
||||
{
|
||||
int a = *(activeBehavior->MapVars[NEXTBYTE]);
|
||||
int i = STACK(2);
|
||||
activeBehavior->SetArrayVal (a, i, activeBehavior->GetArrayVal (a, i) >> STACK(1));
|
||||
sp -= 2;
|
||||
}
|
||||
break;
|
||||
|
||||
case PCD_RSWORLDARRAY:
|
||||
{
|
||||
int a = NEXTBYTE;
|
||||
int i = STACK(2);
|
||||
ACS_WorldArrays[a].SetVal (i, ACS_WorldArrays[a].GetVal (i) >> STACK(1));
|
||||
sp -= 2;
|
||||
}
|
||||
break;
|
||||
|
||||
case PCD_RSGLOBALARRAY:
|
||||
{
|
||||
int a = NEXTBYTE;
|
||||
int i = STACK(2);
|
||||
ACS_GlobalArrays[a].SetVal (i, ACS_GlobalArrays[a].GetVal (i) >> STACK(1));
|
||||
sp -= 2;
|
||||
}
|
||||
break;
|
||||
//[MW] end
|
||||
|
||||
case PCD_INCSCRIPTVAR:
|
||||
++locals[NEXTBYTE];
|
||||
break;
|
||||
|
@ -4615,6 +4852,7 @@ int DLevelScript::RunScript ()
|
|||
STACK(1) = players[STACK(1)].CurrentPlayerClass;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
41
src/p_acs.h
41
src/p_acs.h
|
@ -483,7 +483,7 @@ public:
|
|||
PCD_GRABINPUT, // Unused but acc defines them
|
||||
PCD_SETMOUSEPOINTER, // "
|
||||
PCD_MOVEMOUSEPOINTER, // "
|
||||
PCD_SPAWNPROJECTILE,
|
||||
/*280*/ PCD_SPAWNPROJECTILE,
|
||||
PCD_GETSECTORLIGHTLEVEL,
|
||||
PCD_GETACTORCEILINGZ,
|
||||
PCD_SETACTORPOSITION,
|
||||
|
@ -493,7 +493,44 @@ public:
|
|||
PCD_CHECKACTORINVENTORY,
|
||||
PCD_THINGCOUNTNAME,
|
||||
PCD_SPAWNSPOTFACING,
|
||||
PCD_PLAYERCLASS, // [GRB]
|
||||
/*290*/ PCD_PLAYERCLASS, // [GRB]
|
||||
//[MW] start my p-codes
|
||||
PCD_ANDSCRIPTVAR,
|
||||
PCD_ANDMAPVAR,
|
||||
PCD_ANDWORLDVAR,
|
||||
PCD_ANDGLOBALVAR,
|
||||
PCD_ANDMAPARRAY,
|
||||
PCD_ANDWORLDARRAY,
|
||||
PCD_ANDGLOBALARRAY,
|
||||
PCD_EORSCRIPTVAR,
|
||||
PCD_EORMAPVAR,
|
||||
/*300*/ PCD_EORWORLDVAR,
|
||||
PCD_EORGLOBALVAR,
|
||||
PCD_EORMAPARRAY,
|
||||
PCD_EORWORLDARRAY,
|
||||
PCD_EORGLOBALARRAY,
|
||||
PCD_ORSCRIPTVAR,
|
||||
PCD_ORMAPVAR,
|
||||
PCD_ORWORLDVAR,
|
||||
PCD_ORGLOBALVAR,
|
||||
PCD_ORMAPARRAY,
|
||||
/*310*/ PCD_ORWORLDARRAY,
|
||||
PCD_ORGLOBALARRAY,
|
||||
PCD_LSSCRIPTVAR,
|
||||
PCD_LSMAPVAR,
|
||||
PCD_LSWORLDVAR,
|
||||
PCD_LSGLOBALVAR,
|
||||
PCD_LSMAPARRAY,
|
||||
PCD_LSWORLDARRAY,
|
||||
PCD_LSGLOBALARRAY,
|
||||
PCD_RSSCRIPTVAR,
|
||||
/*320*/ PCD_RSMAPVAR,
|
||||
PCD_RSWORLDVAR,
|
||||
PCD_RSGLOBALVAR,
|
||||
PCD_RSMAPARRAY,
|
||||
PCD_RSWORLDARRAY,
|
||||
PCD_RSGLOBALARRAY,
|
||||
//[MW] end my p-codes
|
||||
|
||||
PCODE_COMMAND_COUNT
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue