diff --git a/mm/2s2h/z_scene_2SH.cpp b/mm/2s2h/z_scene_2SH.cpp index 586d9d6b4..7a3c522b0 100644 --- a/mm/2s2h/z_scene_2SH.cpp +++ b/mm/2s2h/z_scene_2SH.cpp @@ -151,7 +151,7 @@ void Scene_CommandObjectList(PlayState* play, LUS::ISceneCommand* cmd) { s16* entry = (s16*)objList->GetRawPointer(); for (unsigned int i = 0; i < objList->objects.size(); i++) { - bool alreadyIncluded = true; + bool alreadyIncluded = false; for (unsigned int j = 0; j < play->objectCtx.numEntries; j++) { if (play->objectCtx.slots[j].id == objList->objects[i]) { diff --git a/mm/src/code/z_scene.c b/mm/src/code/z_scene.c index 445afdf4d..4da709541 100644 --- a/mm/src/code/z_scene.c +++ b/mm/src/code/z_scene.c @@ -78,6 +78,14 @@ void Object_UpdateEntries(ObjectContext* objectCtx) { if (entry->id < 0) { s32 id = -entry->id; + // #region 2S2H [Port] We don't care to load the object from DMA, consider it already loaded + // There is a weird case handled below that accounts for RomFiles with a size of 0, but according + // to object_table.h there is only one instance of this, along with a bunch of placeholder entries + // so we _should_ be fine. Famous last words. + entry->id = id; + continue; + // #endregion + if (entry->dmaReq.vromAddr == 0) { objectFile = &gObjectTable[id]; size = objectFile->vromEnd - objectFile->vromStart; @@ -100,8 +108,7 @@ void Object_UpdateEntries(ObjectContext* objectCtx) { s32 Object_GetSlot(ObjectContext* objectCtx, s16 objectId) { s32 i; - // BENTODO there has to be a cleaner fix. - return 1; + for (i = 0; i < objectCtx->numEntries; i++) { if (ABS_ALT(objectCtx->slots[i].id) == objectId) { return i;