Skip to content

Commit

Permalink
Fix bug with object "loading"
Browse files Browse the repository at this point in the history
  • Loading branch information
louist103 committed Apr 27, 2024
1 parent 103583c commit 9b3f5eb
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions mm/src/code/z_scene.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,26 +83,9 @@ void Object_UpdateEntries(ObjectContext* objectCtx) {
// 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;

if (size == 0) {
entry->id = 0;
} else {
osCreateMesgQueue(&entry->loadQueue, &entry->loadMsg, 1);
DmaMgr_SendRequestImpl(&entry->dmaReq, entry->segment, objectFile->vromStart, size, 0,
&entry->loadQueue, OS_MESG_PTR(NULL));
}
} else if (!osRecvMesg(&entry->loadQueue, NULL, OS_MESG_NOBLOCK)) {
entry->id = id;
}
}

entry++;

}
}

Expand Down

0 comments on commit 9b3f5eb

Please sign in to comment.