• R/O
  • SSH

zandronum-zdoom-sync: Commit


Commit MetaInfo

Revision8c377d2f469a3d4e710077d64a44833e64f0f2d6 (tree)
Time2016-01-28 19:56:47
AuthorChristoph Oelckers <c.oelckers@zdoo...>
CommiterChristoph Oelckers

Log Message

- fixed: The ACS String garbage collector only looked at the active script's stack but never considered a recursive call from another script.

Fixing this required adding an external list of active stack objects that the garbage collector can access.
A nice side effect: It's no longer necessary to pass around the stack info to various functions that might end up triggering a garbage collection.

Change Summary

Incremental Difference

diff -r c11f78a5b028 -r 8c377d2f469a src/medal.cpp
--- a/src/medal.cpp Sun Jan 07 09:46:00 2018 +0100
+++ b/src/medal.cpp Thu Jan 28 11:56:47 2016 +0100
@@ -361,7 +361,7 @@
361361 pPlayer = &players[ulPlayer];
362362
363363 // [CK] Trigger events if a medal is received
364- GAMEMODE_HandleEvent ( GAMEEVENT_MEDALS, pPlayer->mo, ACS_PushAndReturnDynamicString ( g_Medals[ulMedal].szAnnouncerEntry, NULL, 0 ) );
364+ GAMEMODE_HandleEvent ( GAMEEVENT_MEDALS, pPlayer->mo, ACS_PushAndReturnDynamicString ( g_Medals[ulMedal].szAnnouncerEntry ) );
365365
366366 // Increase the player's count of this type of medal.
367367 pPlayer->ulMedalCount[ulMedal]++;
diff -r c11f78a5b028 -r 8c377d2f469a src/p_acs.cpp
--- a/src/p_acs.cpp Sun Jan 07 09:46:00 2018 +0100
+++ b/src/p_acs.cpp Thu Jan 28 11:56:47 2016 +0100
@@ -323,6 +323,52 @@
323323 SDWORD ACS_GlobalVars[NUM_GLOBALVARS];
324324 FWorldGlobalArray ACS_GlobalArrays[NUM_GLOBALVARS];
325325
326+//----------------------------------------------------------------------------
327+//
328+// ACS stack management
329+//
330+// This is needed so that the garbage collector has access to all active
331+// script stacks
332+//
333+//----------------------------------------------------------------------------
334+
335+struct FACSStack
336+{
337+ SDWORD buffer[STACK_SIZE];
338+ int sp;
339+ FACSStack *next;
340+ FACSStack *prev;
341+ static FACSStack *head;
342+
343+ FACSStack();
344+ ~FACSStack();
345+};
346+
347+FACSStack *FACSStack::head;
348+
349+FACSStack::FACSStack()
350+{
351+ sp = 0;
352+ next = head;
353+ prev = NULL;
354+ head = this;
355+
356+ Printf("Adding stack %08d\n", this);
357+}
358+
359+FACSStack::~FACSStack()
360+{
361+ if (next != NULL) next->prev = prev;
362+ if (prev == NULL)
363+ {
364+ head = next;
365+ }
366+ else
367+ {
368+ prev->next = next;
369+ }
370+ Printf("Removing stack %08d\n", this);
371+}
326372
327373 //----------------------------------------------------------------------------
328374 //
@@ -367,9 +413,9 @@
367413 ACSStringPool GlobalACSStrings;
368414
369415 // [BB] Extracted from PCD_SAVESTRING.
370-int ACS_PushAndReturnDynamicString ( const FString &Work, const SDWORD *stack, int stackdepth )
371-{
372- return GlobalACSStrings.AddString(strbin1(Work), stack, stackdepth);
416+int ACS_PushAndReturnDynamicString ( const FString &Work )
417+{
418+ return GlobalACSStrings.AddString(strbin1(Work));
373419 }
374420
375421 ACSStringPool::ACSStringPool()
@@ -402,7 +448,7 @@
402448 //
403449 //============================================================================
404450
405-int ACSStringPool::AddString(const char *str, const SDWORD *stack, int stackdepth)
451+int ACSStringPool::AddString(const char *str)
406452 {
407453 size_t len = strlen(str);
408454 unsigned int h = SuperFastHash(str, len);
@@ -413,10 +459,10 @@
413459 return i | STRPOOL_LIBRARYID_OR;
414460 }
415461 FString fstr(str);
416- return InsertString(fstr, h, bucketnum, stack, stackdepth);
417-}
418-
419-int ACSStringPool::AddString(FString &str, const SDWORD *stack, int stackdepth)
462+ return InsertString(fstr, h, bucketnum);
463+}
464+
465+int ACSStringPool::AddString(FString &str)
420466 {
421467 unsigned int h = SuperFastHash(str.GetChars(), str.Len());
422468 unsigned int bucketnum = h % NUM_BUCKETS;
@@ -425,7 +471,7 @@
425471 {
426472 return i | STRPOOL_LIBRARYID_OR;
427473 }
428- return InsertString(str, h, bucketnum, stack, stackdepth);
474+ return InsertString(str, h, bucketnum);
429475 }
430476
431477 //============================================================================
@@ -695,12 +741,12 @@
695741 //
696742 //============================================================================
697743
698-int ACSStringPool::InsertString(FString &str, unsigned int h, unsigned int bucketnum, const SDWORD *stack, int stackdepth)
744+int ACSStringPool::InsertString(FString &str, unsigned int h, unsigned int bucketnum)
699745 {
700746 unsigned int index = FirstFreeEntry;
701747 if (index >= MIN_GC_SIZE && index == Pool.Max())
702748 { // We will need to grow the array. Try a garbage collection first.
703- P_CollectACSGlobalStrings(stack, stackdepth);
749+ P_CollectACSGlobalStrings();
704750 index = FirstFreeEntry;
705751 }
706752 if (FirstFreeEntry >= STRPOOL_LIBRARYID_OR)
@@ -909,11 +955,11 @@
909955 //
910956 //============================================================================
911957
912-void P_CollectACSGlobalStrings(const SDWORD *stack, int stackdepth)
913-{
914- if (stack != NULL && stackdepth != 0)
915- {
916- GlobalACSStrings.MarkStringArray(stack, stackdepth);
958+void P_CollectACSGlobalStrings()
959+{
960+ for (FACSStack *stack = FACSStack::head; stack != NULL; stack = stack->next)
961+ {
962+ GlobalACSStrings.MarkStringArray(stack->buffer, stack->sp);
917963 }
918964 FBehavior::StaticMarkLevelVarStrings();
919965 P_MarkWorldVarStrings();
@@ -924,7 +970,7 @@
924970 #ifdef _DEBUG
925971 CCMD(acsgc)
926972 {
927- P_CollectACSGlobalStrings(NULL, 0);
973+ P_CollectACSGlobalStrings();
928974 }
929975 CCMD(globstr)
930976 {
@@ -1507,7 +1553,7 @@
15071553 // Returns some information of a team
15081554 //
15091555 //============================================================================
1510-static int GetTeamProperty (unsigned int team, int prop, const SDWORD *stack, int stackdepth) {
1556+static int GetTeamProperty (unsigned int team, int prop) {
15111557 switch (prop) {
15121558 case TPROP_NumLivePlayers:
15131559 return TEAM_CountLivingAndRespawnablePlayers (team);
@@ -1571,7 +1617,7 @@
15711617 }
15721618
15731619 // [Dusk]
1574- res = ACS_PushAndReturnDynamicString ( work, stack, stackdepth );
1620+ res = ACS_PushAndReturnDynamicString ( work );
15751621
15761622 STRINGBUILDER_FINISH(work);
15771623 return res;
@@ -2274,7 +2320,7 @@
22742320 const char *str = LookupString(MapVarStore[chunk[i+2]]);
22752321 if (str != NULL)
22762322 {
2277- MapVarStore[chunk[i+2]] = GlobalACSStrings.AddString(str, NULL, 0);
2323+ MapVarStore[chunk[i+2]] = GlobalACSStrings.AddString(str);
22782324 }
22792325 }
22802326 }
@@ -2294,7 +2340,7 @@
22942340 const char *str = LookupString(*elems);
22952341 if (str != NULL)
22962342 {
2297- *elems = GlobalACSStrings.AddString(str, NULL, 0);
2343+ *elems = GlobalACSStrings.AddString(str);
22982344 }
22992345 }
23002346 }
@@ -2328,7 +2374,7 @@
23282374 const char *str = LookupString(*elems);
23292375 if (str != NULL)
23302376 {
2331- *elems = GlobalACSStrings.AddString(str, NULL, 0);
2377+ *elems = GlobalACSStrings.AddString(str);
23322378 }
23332379 }
23342380 }
@@ -4407,7 +4453,7 @@
44074453 }
44084454 }
44094455
4410-int DLevelScript::GetActorProperty (int tid, int property, const SDWORD *stack, int stackdepth)
4456+int DLevelScript::GetActorProperty (int tid, int property)
44114457 {
44124458 AActor *actor = SingleActorFromTID (tid, activator);
44134459
@@ -4491,13 +4537,13 @@
44914537 return 0;
44924538 }
44934539
4494- case APROP_SeeSound: return GlobalACSStrings.AddString(actor->SeeSound, stack, stackdepth);
4495- case APROP_AttackSound: return GlobalACSStrings.AddString(actor->AttackSound, stack, stackdepth);
4496- case APROP_PainSound: return GlobalACSStrings.AddString(actor->PainSound, stack, stackdepth);
4497- case APROP_DeathSound: return GlobalACSStrings.AddString(actor->DeathSound, stack, stackdepth);
4498- case APROP_ActiveSound: return GlobalACSStrings.AddString(actor->ActiveSound, stack, stackdepth);
4499- case APROP_Species: return GlobalACSStrings.AddString(actor->GetSpecies(), stack, stackdepth);
4500- case APROP_NameTag: return GlobalACSStrings.AddString(actor->GetTag(), stack, stackdepth);
4540+ case APROP_SeeSound: return GlobalACSStrings.AddString(actor->SeeSound);
4541+ case APROP_AttackSound: return GlobalACSStrings.AddString(actor->AttackSound);
4542+ case APROP_PainSound: return GlobalACSStrings.AddString(actor->PainSound);
4543+ case APROP_DeathSound: return GlobalACSStrings.AddString(actor->DeathSound);
4544+ case APROP_ActiveSound: return GlobalACSStrings.AddString(actor->ActiveSound);
4545+ case APROP_Species: return GlobalACSStrings.AddString(actor->GetSpecies());
4546+ case APROP_NameTag: return GlobalACSStrings.AddString(actor->GetTag());
45014547 case APROP_StencilColor:return actor->fillcolor;
45024548
45034549 default: return 0;
@@ -4546,7 +4592,7 @@
45464592 case APROP_ViewHeight:
45474593 case APROP_AttackZOffset:
45484594 case APROP_StencilColor:
4549- return (GetActorProperty(tid, property, NULL, 0) == value);
4595+ return (GetActorProperty(tid, property) == value);
45504596
45514597 // Boolean values need to compare to a binary version of value
45524598 case APROP_Ambush:
@@ -4558,7 +4604,7 @@
45584604 case APROP_Notarget:
45594605 case APROP_Notrigger:
45604606 case APROP_Dormant:
4561- return (GetActorProperty(tid, property, NULL, 0) == (!!value));
4607+ return (GetActorProperty(tid, property) == (!!value));
45624608
45634609 // Strings are covered by GetActorProperty, but they're fairly
45644610 // heavy-duty, so make the check here.
@@ -5111,14 +5157,14 @@
51115157 }
51125158
51135159 // Converts floating- to fixed-point as required.
5114-static int DoGetCVar(FBaseCVar *cvar, bool is_string, const SDWORD *stack, int stackdepth)
5160+static int DoGetCVar(FBaseCVar *cvar, bool is_string)
51155161 {
51165162 UCVarValue val;
51175163
51185164 if (is_string)
51195165 {
51205166 val = cvar->GetGenericRep(CVAR_String);
5121- return GlobalACSStrings.AddString(val.String, stack, stackdepth);
5167+ return GlobalACSStrings.AddString(val.String);
51225168 }
51235169 else if (cvar->GetRealType() == CVAR_Float)
51245170 {
@@ -5132,7 +5178,7 @@
51325178 }
51335179 }
51345180
5135-static int GetUserCVar(int playernum, const char *cvarname, bool is_string, const SDWORD *stack, int stackdepth)
5181+static int GetUserCVar(int playernum, const char *cvarname, bool is_string)
51365182 {
51375183 if ((unsigned)playernum >= MAXPLAYERS || !playeringame[playernum])
51385184 {
@@ -5144,10 +5190,10 @@
51445190 {
51455191 return 0;
51465192 }
5147- return DoGetCVar(cvar, is_string, stack, stackdepth);
5148-}
5149-
5150-static int GetCVar(AActor *activator, const char *cvarname, bool is_string, const SDWORD *stack, int stackdepth)
5193+ return DoGetCVar(cvar, is_string);
5194+}
5195+
5196+static int GetCVar(AActor *activator, const char *cvarname, bool is_string)
51515197 {
51525198 FBaseCVar *cvar = FindCVar(cvarname, NULL);
51535199 // Either the cvar doesn't exist, or it's for a mod that isn't loaded, so return 0.
@@ -5165,13 +5211,13 @@
51655211 // [BB] Compatibility with Zandronum 2.x: In CLIENTSIDE scripts,
51665212 // return the value belonging to the consoleplayer
51675213 if ( NETWORK_InClientMode() )
5168- return GetUserCVar(consoleplayer, cvarname, is_string, stack, stackdepth);
5214+ return GetUserCVar(consoleplayer, cvarname, is_string);
51695215
51705216 return 0;
51715217 }
5172- return GetUserCVar(int(activator->player - players), cvarname, is_string, stack, stackdepth);
5173- }
5174- return DoGetCVar(cvar, is_string, stack, stackdepth);
5218+ return GetUserCVar(int(activator->player - players), cvarname, is_string);
5219+ }
5220+ return DoGetCVar(cvar, is_string);
51755221 }
51765222 }
51775223
@@ -5314,7 +5360,7 @@
53145360
53155361
53165362
5317-int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args, const SDWORD *stack, int stackdepth)
5363+int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args)
53185364 {
53195365 AActor *actor;
53205366 switch(funcIndex)
@@ -5489,7 +5535,7 @@
54895535 switch(args[0])
54905536 {
54915537 case ARMORINFO_CLASSNAME:
5492- return GlobalACSStrings.AddString(equippedarmor->ArmorType.GetChars(), stack, stackdepth);
5538+ return GlobalACSStrings.AddString(equippedarmor->ArmorType.GetChars());
54935539
54945540 case ARMORINFO_SAVEAMOUNT:
54955541 return equippedarmor->MaxAmount;
@@ -5507,7 +5553,7 @@
55075553 return 0;
55085554 }
55095555 }
5510- return args[0] == ARMORINFO_CLASSNAME ? GlobalACSStrings.AddString("None", stack, stackdepth) : 0;
5556+ return args[0] == ARMORINFO_CLASSNAME ? GlobalACSStrings.AddString("None") : 0;
55115557 }
55125558
55135559 case ACSF_SpawnSpotForced:
@@ -5626,7 +5672,7 @@
56265672 case ACSF_GetActorClass:
56275673 {
56285674 AActor *a = SingleActorFromTID(args[0], activator);
5629- return GlobalACSStrings.AddString(a == NULL ? "None" : a->GetClass()->TypeName.GetChars(), stack, stackdepth);
5675+ return GlobalACSStrings.AddString(a == NULL ? "None" : a->GetClass()->TypeName.GetChars());
56305676 }
56315677
56325678 case ACSF_SoundSequenceOnActor:
@@ -5803,7 +5849,7 @@
58035849 case ACSF_GetCVarString:
58045850 if (argCount == 1)
58055851 {
5806- return GetCVar(activator, FBehavior::StaticLookupString(args[0]), true, stack, stackdepth);
5852+ return GetCVar(activator, FBehavior::StaticLookupString(args[0]), true);
58075853 }
58085854 break;
58095855
@@ -5824,14 +5870,14 @@
58245870 case ACSF_GetUserCVar:
58255871 if (argCount == 2)
58265872 {
5827- return GetUserCVar(args[0], FBehavior::StaticLookupString(args[1]), false, stack, stackdepth);
5873+ return GetUserCVar(args[0], FBehavior::StaticLookupString(args[1]), false);
58285874 }
58295875 break;
58305876
58315877 case ACSF_GetUserCVarString:
58325878 if (argCount == 2)
58335879 {
5834- return GetUserCVar(args[0], FBehavior::StaticLookupString(args[1]), true, stack, stackdepth);
5880+ return GetUserCVar(args[0], FBehavior::StaticLookupString(args[1]), true);
58355881 }
58365882 break;
58375883
@@ -6007,7 +6053,7 @@
60076053 const char *oldstr = FBehavior::StaticLookupString(args[0]);
60086054 if (oldstr == NULL || *oldstr == '\0')
60096055 {
6010- return GlobalACSStrings.AddString("", stack, stackdepth);
6056+ return GlobalACSStrings.AddString("");
60116057 }
60126058 size_t oldlen = strlen(oldstr);
60136059 size_t newlen = args[1];
@@ -6017,7 +6063,7 @@
60176063 newlen = oldlen;
60186064 }
60196065 FString newstr(funcIndex == ACSF_StrLeft ? oldstr : oldstr + oldlen - newlen, newlen);
6020- return GlobalACSStrings.AddString(newstr, stack, stackdepth);
6066+ return GlobalACSStrings.AddString(newstr);
60216067 }
60226068 break;
60236069
@@ -6027,7 +6073,7 @@
60276073 const char *oldstr = FBehavior::StaticLookupString(args[0]);
60286074 if (oldstr == NULL || *oldstr == '\0')
60296075 {
6030- return GlobalACSStrings.AddString("", stack, stackdepth);
6076+ return GlobalACSStrings.AddString("");
60316077 }
60326078 size_t oldlen = strlen(oldstr);
60336079 size_t pos = args[1];
@@ -6035,13 +6081,13 @@
60356081
60366082 if (pos >= oldlen)
60376083 {
6038- return GlobalACSStrings.AddString("", stack, stackdepth);
6084+ return GlobalACSStrings.AddString("");
60396085 }
60406086 if (pos + newlen > oldlen || pos + newlen < pos)
60416087 {
60426088 newlen = oldlen - pos;
60436089 }
6044- return GlobalACSStrings.AddString(FString(oldstr + pos, newlen), stack, stackdepth);
6090+ return GlobalACSStrings.AddString(FString(oldstr + pos, newlen));
60456091 }
60466092 break;
60476093
@@ -6049,11 +6095,11 @@
60496095 if (activator == NULL || activator->player == NULL || // Non-players do not have weapons
60506096 activator->player->ReadyWeapon == NULL)
60516097 {
6052- return GlobalACSStrings.AddString("None", stack, stackdepth);
6098+ return GlobalACSStrings.AddString("None");
60536099 }
60546100 else
60556101 {
6056- return GlobalACSStrings.AddString(activator->player->ReadyWeapon->GetClass()->TypeName.GetChars(), stack, stackdepth);
6102+ return GlobalACSStrings.AddString(activator->player->ReadyWeapon->GetClass()->TypeName.GetChars());
60576103 }
60586104
60596105 case ACSF_SpawnDecal:
@@ -6542,7 +6588,7 @@
65426588 // [Dusk]
65436589 case ACSF_GetTeamProperty:
65446590 {
6545- return GetTeamProperty (args[0], args[1], stack, stackdepth);
6591+ return GetTeamProperty (args[0], args[1]);
65466592 }
65476593
65486594 case ACSF_GetPlayerLivesLeft:
@@ -6607,7 +6653,7 @@
66076653 // [BB]
66086654 case ACSF_GetDBEntryString:
66096655 {
6610- return ACS_PushAndReturnDynamicString ( DATABASE_SaveGetEntry ( FBehavior::StaticLookupString(args[0]), FBehavior::StaticLookupString(args[1]) ), stack, stackdepth );
6656+ return ACS_PushAndReturnDynamicString ( DATABASE_SaveGetEntry ( FBehavior::StaticLookupString(args[0]), FBehavior::StaticLookupString(args[1]) ) );
66116657 }
66126658
66136659 // [BB]
@@ -6637,7 +6683,7 @@
66376683 {
66386684 work = SERVER_GetClient( ulPlayer )->GetAccountName();
66396685 }
6640- return ACS_PushAndReturnDynamicString ( work, stack, stackdepth );
6686+ return ACS_PushAndReturnDynamicString ( work );
66416687 }
66426688
66436689 case ACSF_SortDBEntries:
@@ -6689,7 +6735,7 @@
66896735 }
66906736 else
66916737 work = "Invalid handle";
6692- return ACS_PushAndReturnDynamicString ( work, stack, stackdepth );
6738+ return ACS_PushAndReturnDynamicString ( work );
66936739 }
66946740
66956741 case ACSF_GetDBResultValue:
@@ -6780,7 +6826,7 @@
67806826 if ( strftime( buffer, sizeof buffer, format, timeinfo ) == 0 )
67816827 buffer[0] = '\0'; // Zero the result if strftime fails
67826828
6783- return ACS_PushAndReturnDynamicString( buffer, stack, stackdepth );
6829+ return ACS_PushAndReturnDynamicString( buffer );
67846830 }
67856831
67866832 case ACSF_SetDeadSpectator:
@@ -6867,11 +6913,11 @@
68676913 auto a = SingleActorFromTID(args[0], activator);
68686914 if (a != nullptr)
68696915 {
6870- return GlobalACSStrings.AddString(TexMan[a->floorpic]->Name, stack, stackdepth);
6916+ return GlobalACSStrings.AddString(TexMan[a->floorpic]->Name);
68716917 }
68726918 else
68736919 {
6874- return GlobalACSStrings.AddString("", stack, stackdepth);
6920+ return GlobalACSStrings.AddString("");
68756921 }
68766922 break;
68776923 }
@@ -6978,8 +7024,10 @@
69787024 break;
69797025 }
69807026
6981- SDWORD Stack[STACK_SIZE];
6982- int sp = 0;
7027+ FACSStack stackobj;
7028+ SDWORD *Stack = stackobj.buffer;
7029+ int &sp = stackobj.sp;
7030+
69837031 int *pc = this->pc;
69847032 ACSFormat fmt = activeBehavior->GetFormat();
69857033 unsigned int runaway = 0; // used to prevent infinite loops
@@ -7035,7 +7083,7 @@
70357083
70367084 case PCD_TAGSTRING:
70377085 //Stack[sp-1] |= activeBehavior->GetLibraryID();
7038- Stack[sp-1] = GlobalACSStrings.AddString(activeBehavior->LookupString(Stack[sp-1]), Stack, sp);
7086+ Stack[sp-1] = GlobalACSStrings.AddString(activeBehavior->LookupString(Stack[sp-1]));
70397087 break;
70407088
70417089 case PCD_PUSHNUMBER:
@@ -7233,7 +7281,7 @@
72337281 int argCount = NEXTBYTE;
72347282 int funcIndex = NEXTSHORT;
72357283
7236- int retval = CallFunction(argCount, funcIndex, &STACK(argCount), Stack, sp);
7284+ int retval = CallFunction(argCount, funcIndex, &STACK(argCount));
72377285 sp -= argCount-1;
72387286 STACK(1) = retval;
72397287 }
@@ -10024,7 +10072,7 @@
1002410072 break;
1002510073
1002610074 case PCD_GETACTORPROPERTY:
10027- STACK(2) = GetActorProperty (STACK(2), STACK(1), Stack, sp);
10075+ STACK(2) = GetActorProperty (STACK(2), STACK(1));
1002810076 sp -= 1;
1002910077 break;
1003010078
@@ -10156,7 +10204,7 @@
1015610204 break;
1015710205
1015810206 case PCD_GETCVAR:
10159- STACK(1) = GetCVar(activator, FBehavior::StaticLookupString(STACK(1)), false, Stack, sp);
10207+ STACK(1) = GetCVar(activator, FBehavior::StaticLookupString(STACK(1)), false);
1016010208 break;
1016110209
1016210210 case PCD_SETHUDSIZE:
@@ -10536,7 +10584,7 @@
1053610584 case PCD_SAVESTRING:
1053710585 // Saves the string
1053810586 {
10539- const int str = GlobalACSStrings.AddString(work, Stack, sp);
10587+ const int str = GlobalACSStrings.AddString(work);
1054010588 PushToStack(str);
1054110589 STRINGBUILDER_FINISH(work);
1054210590 }
diff -r c11f78a5b028 -r 8c377d2f469a src/p_acs.h
--- a/src/p_acs.h Sun Jan 07 09:46:00 2018 +0100
+++ b/src/p_acs.h Thu Jan 28 11:56:47 2016 +0100
@@ -88,8 +88,8 @@
8888 {
8989 public:
9090 ACSStringPool();
91- int AddString(const char *str, const SDWORD *stack, int stackdepth);
92- int AddString(FString &str, const SDWORD *stack, int stackdepth);
91+ int AddString(const char *str);
92+ int AddString(FString &str);
9393 const char *GetString(int strnum);
9494 void LockString(int strnum);
9595 void UnlockString(int strnum);
@@ -107,7 +107,7 @@
107107
108108 private:
109109 int FindString(const char *str, size_t len, unsigned int h, unsigned int bucketnum);
110- int InsertString(FString &str, unsigned int h, unsigned int bucketnum, const SDWORD *stack, int stackdepth);
110+ int InsertString(FString &str, unsigned int h, unsigned int bucketnum);
111111 void FindFirstFreeEntry(unsigned int base);
112112
113113 enum { NUM_BUCKETS = 251 };
@@ -127,7 +127,7 @@
127127 };
128128 extern ACSStringPool GlobalACSStrings;
129129
130-void P_CollectACSGlobalStrings(const SDWORD *stack, int stackdepth);
130+void P_CollectACSGlobalStrings();
131131 void P_ReadACSVars(PNGHandle *);
132132 void P_WriteACSVars(FILE*);
133133 void P_ClearACSVars(bool);
@@ -929,7 +929,7 @@
929929 int DoSpawnSpot (int type, int spot, int tid, int angle, bool forced);
930930 int DoSpawnSpotFacing (int type, int spot, int tid, bool forced);
931931 int DoClassifyActor (int tid);
932- int CallFunction(int argCount, int funcIndex, SDWORD *args, const SDWORD *stack, int stackdepth);
932+ int CallFunction(int argCount, int funcIndex, SDWORD *args);
933933
934934 void DoFadeTo (int r, int g, int b, int a, fixed_t time);
935935 void DoFadeRange (int r1, int g1, int b1, int a1,
@@ -937,7 +937,7 @@
937937 void DoSetFont (int fontnum);
938938 void SetActorProperty (int tid, int property, int value);
939939 void DoSetActorProperty (AActor *actor, int property, int value);
940- int GetActorProperty (int tid, int property, const SDWORD *stack, int stackdepth);
940+ int GetActorProperty (int tid, int property);
941941 int CheckActorProperty (int tid, int property, int value);
942942 int GetPlayerInput (int playernum, int inputnum);
943943
@@ -1008,7 +1008,7 @@
10081008 bool ACS_IsScriptClientSide( const ScriptPtr *pScriptData );
10091009 bool ACS_IsScriptPukeable( ULONG ulScript );
10101010 int ACS_GetTranslationIndex( FRemapTable *pTranslation );
1011-int ACS_PushAndReturnDynamicString ( const FString &Work, const SDWORD *stack, int stackdepth );
1011+int ACS_PushAndReturnDynamicString ( const FString &Work );
10121012 bool ACS_ExistsScript( int script );
10131013
10141014 // [BB] Export DoGiveInv
Show on old repository browser