mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- Fixed: Direct instructions need to tag their strings before lookup.
SVN r3686 (trunk)
This commit is contained in:
parent
3d7c6811c1
commit
af30e933e4
1 changed files with 12 additions and 10 deletions
|
@ -3895,6 +3895,8 @@ enum
|
|||
#define NEXTSHORT (fmt==ACS_LittleEnhanced?getshort(pc):NEXTWORD)
|
||||
#define STACK(a) (Stack[sp - (a)])
|
||||
#define PushToStack(a) (Stack[sp++] = (a))
|
||||
// Direct instructions that take strings need to have the tag applied.
|
||||
#define TAGSTR(a) (a|activeBehavior->GetLibraryID())
|
||||
|
||||
inline int getbyte (int *&pc)
|
||||
{
|
||||
|
@ -5188,7 +5190,7 @@ int DLevelScript::RunScript ()
|
|||
break;
|
||||
|
||||
case PCD_CHANGEFLOORDIRECT:
|
||||
ChangeFlat (uallong(pc[0]), uallong(pc[1]), 0);
|
||||
ChangeFlat (uallong(pc[0]), TAGSTR(uallong(pc[1])), 0);
|
||||
pc += 2;
|
||||
break;
|
||||
|
||||
|
@ -5198,7 +5200,7 @@ int DLevelScript::RunScript ()
|
|||
break;
|
||||
|
||||
case PCD_CHANGECEILINGDIRECT:
|
||||
ChangeFlat (uallong(pc[0]), uallong(pc[1]), 1);
|
||||
ChangeFlat (uallong(pc[0]), TAGSTR(uallong(pc[1])), 1);
|
||||
pc += 2;
|
||||
break;
|
||||
|
||||
|
@ -5702,7 +5704,7 @@ int DLevelScript::RunScript ()
|
|||
break;
|
||||
|
||||
case PCD_SETFONTDIRECT:
|
||||
DoSetFont (uallong(pc[0]));
|
||||
DoSetFont (TAGSTR(uallong(pc[0])));
|
||||
pc++;
|
||||
break;
|
||||
|
||||
|
@ -6034,7 +6036,7 @@ int DLevelScript::RunScript ()
|
|||
break;
|
||||
|
||||
case PCD_SPAWNDIRECT:
|
||||
PushToStack (DoSpawn (uallong(pc[0]), uallong(pc[1]), uallong(pc[2]), uallong(pc[3]), uallong(pc[4]), uallong(pc[5]), false));
|
||||
PushToStack (DoSpawn (TAGSTR(uallong(pc[0])), uallong(pc[1]), uallong(pc[2]), uallong(pc[3]), uallong(pc[4]), uallong(pc[5]), false));
|
||||
pc += 6;
|
||||
break;
|
||||
|
||||
|
@ -6044,7 +6046,7 @@ int DLevelScript::RunScript ()
|
|||
break;
|
||||
|
||||
case PCD_SPAWNSPOTDIRECT:
|
||||
PushToStack (DoSpawnSpot (uallong(pc[0]), uallong(pc[1]), uallong(pc[2]), uallong(pc[3]), false));
|
||||
PushToStack (DoSpawnSpot (TAGSTR(uallong(pc[0])), uallong(pc[1]), uallong(pc[2]), uallong(pc[3]), false));
|
||||
pc += 4;
|
||||
break;
|
||||
|
||||
|
@ -6100,7 +6102,7 @@ int DLevelScript::RunScript ()
|
|||
break;
|
||||
|
||||
case PCD_GIVEINVENTORYDIRECT:
|
||||
GiveInventory (activator, FBehavior::StaticLookupString (uallong(pc[0])), uallong(pc[1]));
|
||||
GiveInventory (activator, FBehavior::StaticLookupString (TAGSTR(uallong(pc[0]))), uallong(pc[1]));
|
||||
pc += 2;
|
||||
break;
|
||||
|
||||
|
@ -6130,7 +6132,7 @@ int DLevelScript::RunScript ()
|
|||
break;
|
||||
|
||||
case PCD_TAKEINVENTORYDIRECT:
|
||||
TakeInventory (activator, FBehavior::StaticLookupString (uallong(pc[0])), uallong(pc[1]));
|
||||
TakeInventory (activator, FBehavior::StaticLookupString (TAGSTR(uallong(pc[0]))), uallong(pc[1]));
|
||||
pc += 2;
|
||||
break;
|
||||
|
||||
|
@ -6145,7 +6147,7 @@ int DLevelScript::RunScript ()
|
|||
break;
|
||||
|
||||
case PCD_CHECKINVENTORYDIRECT:
|
||||
PushToStack (CheckInventory (activator, FBehavior::StaticLookupString (uallong(pc[0]))));
|
||||
PushToStack (CheckInventory (activator, FBehavior::StaticLookupString (TAGSTR(uallong(pc[0])))));
|
||||
pc += 1;
|
||||
break;
|
||||
|
||||
|
@ -6249,7 +6251,7 @@ int DLevelScript::RunScript ()
|
|||
break;
|
||||
|
||||
case PCD_SETMUSICDIRECT:
|
||||
S_ChangeMusic (FBehavior::StaticLookupString (uallong(pc[0])), uallong(pc[1]));
|
||||
S_ChangeMusic (FBehavior::StaticLookupString (TAGSTR(uallong(pc[0]))), uallong(pc[1]));
|
||||
pc += 3;
|
||||
break;
|
||||
|
||||
|
@ -6264,7 +6266,7 @@ int DLevelScript::RunScript ()
|
|||
case PCD_LOCALSETMUSICDIRECT:
|
||||
if (activator == players[consoleplayer].mo)
|
||||
{
|
||||
S_ChangeMusic (FBehavior::StaticLookupString (uallong(pc[0])), uallong(pc[1]));
|
||||
S_ChangeMusic (FBehavior::StaticLookupString (TAGSTR(uallong(pc[0]))), uallong(pc[1]));
|
||||
}
|
||||
pc += 3;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue