mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- Blood: add all statically stored EventObjects to the GC processor.
This commit is contained in:
parent
b1e2b2addf
commit
ef7c72ce9f
4 changed files with 24 additions and 3 deletions
|
@ -138,7 +138,6 @@ void CreateAltHUD()
|
|||
{
|
||||
if (AltHud)
|
||||
{
|
||||
GC::DelSoftRoot(AltHud);
|
||||
AltHud->Destroy();
|
||||
AltHud = nullptr;
|
||||
}
|
||||
|
@ -152,7 +151,7 @@ void CreateAltHUD()
|
|||
AltHud = DoCreateAltHUD(NAME_AltHud);
|
||||
|
||||
assert(AltHud);
|
||||
GC::AddSoftRoot(AltHud);
|
||||
GC::AddMarkerFunc([]() { GC::Mark(AltHud); });
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "statusbar.h"
|
||||
#include "vm.h"
|
||||
#include "tilesetbuilder.h"
|
||||
#include "nnexts.h"
|
||||
|
||||
BEGIN_BLD_NS
|
||||
|
||||
|
@ -75,6 +76,8 @@ IMPLEMENT_POINTERS_END
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
void MarkSprInSect();
|
||||
void MarkSeq();
|
||||
|
||||
|
||||
size_t DBloodActor::PropagateMark()
|
||||
{
|
||||
|
@ -102,6 +105,15 @@ static void markgcroots()
|
|||
GC::Mark(pl.fragger);
|
||||
GC::Mark(pl.voodooTarget);
|
||||
}
|
||||
for (auto& evobj : rxBucket)
|
||||
{
|
||||
evobj.Mark();
|
||||
}
|
||||
for (auto& cond : gConditions)
|
||||
{
|
||||
for (auto& obj : cond.objects) obj.obj.Mark();
|
||||
}
|
||||
MarkSeq();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ enum {
|
|||
kChannelMax = 4096,
|
||||
};
|
||||
|
||||
extern EventObject rxBucket[];
|
||||
extern EventObject rxBucket[kChannelMax];
|
||||
extern unsigned short bucketHead[];
|
||||
|
||||
enum COMMAND_ID {
|
||||
|
|
|
@ -468,10 +468,20 @@ struct ActiveList
|
|||
remove(SS_SPRITE, EventObject(actor));
|
||||
}
|
||||
|
||||
void Mark()
|
||||
{
|
||||
for (auto& seqinst : list) seqinst.target.Mark();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
static ActiveList activeList;
|
||||
|
||||
void MarkSeq()
|
||||
{
|
||||
activeList.Mark();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue