mapSavestate_save

This commit is contained in:
Banjo Kazooie
2024-05-06 20:35:27 -05:00
parent 861e460347
commit dee99f4207
5 changed files with 48 additions and 55 deletions

View File

@@ -1,4 +1,4 @@
# banjo (98.9919%) # banjo (99.0163%)
<img src="./progress/progress_total.svg"> <img src="./progress/progress_total.svg">

View File

@@ -17,7 +17,7 @@
<text x="22.0" y="14">core2</text> <text x="22.0" y="14">core2</text>
</g> </g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="78.5" y="15" fill="#010101" fill-opacity=".3">98.4605%</text> <text x="78.5" y="15" fill="#010101" fill-opacity=".3">98.5031%</text>
<text x="77.5" y="14">98.4605%</text> <text x="77.5" y="14">98.5031%</text>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -9,7 +9,7 @@
</mask> </mask>
<g mask="url(#anybadge_1)"> <g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h150v20H0z"/> <path fill="#555" d="M0 0h150v20H0z"/>
<path fill="#05e000" d="M150 0h67v20H150z"/> <path fill="#04e000" d="M150 0h67v20H150z"/>
<path fill="url(#b)" d="M0 0h217v20H0z"/> <path fill="url(#b)" d="M0 0h217v20H0z"/>
</g> </g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
@@ -17,7 +17,7 @@
<text x="75.0" y="14">Banjo-Kazooie (us.v10)</text> <text x="75.0" y="14">Banjo-Kazooie (us.v10)</text>
</g> </g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="184.5" y="15" fill="#010101" fill-opacity=".3">98.9919%</text> <text x="184.5" y="15" fill="#010101" fill-opacity=".3">99.0163%</text>
<text x="183.5" y="14">98.9919%</text> <text x="183.5" y="14">99.0163%</text>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -42,54 +42,47 @@ void mapSavestate_defrag_all(void){
} }
} }
#ifndef NONMATCHING void mapSavestate_save(enum map_e map)
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_5BEB0/mapSavestate_save.s") {
#else u32 wSize;
void mapSavestate_save(enum map_e map){ s32 iBit;
u32 wSize; s32 reg_s4;
MapSavestate * sp38; u32 *valPtr;
s32 iBit; int new_var;
s32 bit_max; wSize = 4;
s32 reg_s4; if (D_8037E650[map] != 0)
u32* reg_v1; {
u32* valPtr; free(D_8037E650[map]);
s32 i; }
D_8037E650[map] = (MapSavestate *) malloc(4 * (sizeof(u32)));
valPtr = (u32 *) D_8037E650[map];
wSize = 4; *valPtr = mapSpecificFlags_getAll();
if(D_8037E650[map]) iBit = 0x20;
free(D_8037E650[map]); func_80308230(1);
func_803083B0(-1);
D_8037E650[map] = sp38 = (MapSavestate *) malloc(4*sizeof(u32)); for (reg_s4 = func_803083B0(-2); reg_s4 != (-1); reg_s4 = func_803083B0(-2))
{
sp38->flags = mapSpecificFlags_getAll(); new_var = sizeof(u32);
if (!(iBit < ((wSize * (sizeof(u32))) * 8)))
iBit = 0x20; {
func_80308230(1); wSize += 4;
func_803083B0(-1); D_8037E650[map] = (MapSavestate *) realloc(D_8037E650[map], wSize * new_var);
valPtr = ((s32) D_8037E650[map]) + (wSize * new_var);
for(reg_s4 = func_803083B0(-2); reg_s4 != -1; reg_s4 = func_803083B0(-2, valPtr)){ valPtr[-1] = 0;
if( !(iBit < wSize*sizeof(u32)*8)){ new_var = 1;
wSize += 4; valPtr[-2] = 0;
D_8037E650[map] = (MapSavestate *)realloc( D_8037E650[map], wSize*sizeof(u32)); valPtr[-3] = 0;
reg_v1 = ((s32)D_8037E650[map] + wSize*sizeof(u32)); if (1) if (1) if (1) if (1) if (1) if (1) if (1) ;
reg_v1[-1] = 0; valPtr[-4] = 0;
reg_v1[-2] = 0;
reg_v1[-3] = 0;
reg_v1[-4] = 0;
}
valPtr = D_8037E650[map];
valPtr[(iBit >> 5)] = (reg_s4)
? valPtr[(iBit >> 5)] | (1 << (iBit & 0x1f))
: valPtr[(iBit >> 5)] & ~(1 << (iBit & 0x1f));
iBit++;
} }
//if(sp38); valPtr = D_8037E650[map];
D_8037E650[map] = actors_appendToSavestate( D_8037E650[map], (s32)D_8037E650[map] + 16*((iBit + 0x7F) >> 7)); valPtr[iBit >> 5] = (reg_s4) ? (valPtr[iBit >> 5] | (1 << (iBit & 0x1f))) : (valPtr[iBit >> 5] & (~((1 ^ 0) << (iBit & 0x1f))));
iBit++;
wSize = wSize;
}
D_8037E650[map] = actors_appendToSavestate(D_8037E650[map], ((u32 *) D_8037E650[map]) + (4 * ((iBit + 0x7F) >> 7)));
} }
#endif
#define AS_BOOL(expr) ((expr)? TRUE : FALSE) #define AS_BOOL(expr) ((expr)? TRUE : FALSE)

View File

@@ -467,11 +467,11 @@ void func_8032DB2C(Cube *cube, NodeProp *arg1) {
} }
} }
void func_8032DC70(void) { void func_8032DC70(s32 arg0) {
NodeProp *sp1C; NodeProp *sp1C;
s32 temp_v0; s32 temp_v0;
sp1C = func_803080C8(); sp1C = func_803080C8(arg0);
if (sp1C != NULL) { if (sp1C != NULL) {
func_8032DB2C(func_80308224(), sp1C); func_8032DB2C(func_80308224(), sp1C);
} }