lego1/isle: Add MxDSObject, implement SetObjectName, adjust MxDSAction (#20)

* add MxDSObject, implement SetObjectName, adjust MxDSAction

* add a TODO

* update project files

* add WIP MxDSObject stuff

* merge

* update project file

* add addresses and SetAtomId

* switch addresses

* remove comment since it's fixed now (?)

* refactor

* update project file

* refactor into separate unit

* refactor into separate unit

* rename unit to avoid NMAKE issue

* rename param

* add last missing piece to Isle::Close

* fix spelling

* merge

* use union hack
This commit is contained in:
Christian Semmler
2023-06-20 02:18:53 +02:00
committed by GitHub
parent 66dd2cdeb9
commit 0ab8fc52d2
11 changed files with 291 additions and 30 deletions

View File

@@ -84,6 +84,7 @@ Isle::~Isle()
void Isle::Close()
{
MxDSAction ds;
ds.SetUnknown24(0xFFFE);
if (Lego()) {
GameState()->Save(0);
@@ -93,8 +94,7 @@ void Isle::Close()
VideoManager()->Get3DManager()->GetLego3DView()->GetViewManager()->RemoveAll(NULL);
long local_88 = 0;
Lego()->RemoveWorld(ds.m_atomId, local_88);
Lego()->RemoveWorld(ds.GetAtomId(), ds.GetUnknown1c());
Lego()->vtable24(ds);
TransitionManager()->SetWaitIndicator(NULL);
Lego()->vtable3c();
@@ -608,18 +608,18 @@ void Isle::Tick(BOOL sleepIfNotNextFrame)
return;
}
ds.setAtomId(stream->atom);
ds.m_unk24 = 0xFFFF;
ds.m_unk1c = 0;
ds.SetAtomId(stream->atom);
ds.SetUnknown24(0xFFFF);
ds.SetUnknown1c(0);
VideoManager()->EnableFullScreenMovie(TRUE, TRUE);
if (Start(&ds) != SUCCESS) {
return;
}
} else {
ds.setAtomId(stream->atom);
ds.m_unk24 = 0xFFFF;
ds.m_unk1c = 0;
ds.SetAtomId(stream->atom);
ds.SetUnknown24(0xFFFF);
ds.SetUnknown1c(0);
if (Start(&ds) != SUCCESS) {
return;
}