Match LoadSwapGFX

This commit is contained in:
Tal Hayon
2022-06-29 14:32:15 +03:00
parent eb2cf39bcf
commit d526edda8e
2 changed files with 3 additions and 98 deletions
+3 -7
View File
@@ -167,13 +167,13 @@ bool32 LoadFixedGFX(Entity* entity, u32 gfxIndex) {
}
// If slotIndex != 0 the gfx loaded starting from that slot, else in the first fitting free one.
NONMATCH("asm/non_matching/vram/LoadSwapGFX.inc", u32 LoadSwapGFX(Entity* entity, u32 count, u32 slotIndex)) {
bool32 LoadSwapGFX(Entity* entity, u32 count, u32 slotIndex) {
u32 status;
if ((slotIndex == 0) && (slotIndex = FindFreeGFXSlots(count), slotIndex == 0)) {
#ifndef EU
CleanUpGFXSlots();
#endif
slotIndex = FindFreeGFXSlots(count);
#endif
if (slotIndex == 0) {
goto _080AE058;
}
@@ -185,12 +185,8 @@ NONMATCH("asm/non_matching/vram/LoadSwapGFX.inc", u32 LoadSwapGFX(Entity* entity
}
sub_080AE0C8(slotIndex, entity, status);
_080AE058:
if (slotIndex != 0) {
slotIndex = 1;
}
return slotIndex;
return slotIndex != 0;
}
END_NONMATCH
void UnloadGFXSlots(Entity* param_1) {
u32 slotIndex;