func_80255200() match, core1/memory.c done

This commit is contained in:
Banjo Kazooie
2022-12-18 15:24:28 -06:00
parent d11f061000
commit 99201a8287
6 changed files with 27 additions and 27 deletions

View File

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

View File

@@ -173,7 +173,7 @@ segments:
- [0xF2E880, c, code_15630] #DONE - [0xF2E880, c, code_15630] #DONE
- [0xF2E9C0, c, code_15770] - [0xF2E9C0, c, code_15770]
- [0xF2ED80, c, code_15B30] #DONE - [0xF2ED80, c, code_15B30] #DONE
- [0xF2FCA0, c, memory] - [0xF2FCA0, c, memory] #DONE
- [0xF31360, c, code_18110] #DONE - [0xF31360, c, code_18110] #DONE
- [0xF31460, c, code_18210] #DONE - [0xF31460, c, code_18210] #DONE
- [0xF31560, c, code_18310] #DONE - [0xF31560, c, code_18310] #DONE

View File

@@ -17,7 +17,7 @@
<text x="22.0" y="14">core1</text> <text x="22.0" y="14">core1</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">93.4675%</text> <text x="78.5" y="15" fill="#010101" fill-opacity=".3">93.5796%</text>
<text x="77.5" y="14">93.4675%</text> <text x="77.5" y="14">93.5796%</text>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -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">96.5722%</text> <text x="184.5" y="15" fill="#010101" fill-opacity=".3">96.5885%</text>
<text x="183.5" y="14">96.5722%</text> <text x="183.5" y="14">96.5885%</text>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -496,28 +496,29 @@ void func_80255198(void){
} }
} }
#ifndef NONMATCHING
#pragma GLOBAL_ASM("asm/nonmatchings/core1/memory/func_80255200.s")
#else
//resizes and fragments a block; //resizes and fragments a block;
void func_80255200(HeapHeader *block, s32 size){ void func_80255200(HeapHeader *block, s32 size){
u32 chnk_size;
u32 remaining_bytes; u32 remaining_bytes;
EmptyHeapBlock *a0; EmptyHeapBlock *a0;
u32 tmp, tmp2, tmp3;
chnk_size = (u32)block->next - (u32)block; block->unusedBytes_C_31 = chunkSize(block) - size;
remaining_bytes = chnk_size - 0x20; tmp = ((u32) (block)->next) - ((u32) (block));
block->unusedBytes_C_31 = chnk_size - sizeof(HeapHeader) - size;
if(size > 0) if(size > 0)
remaining_bytes = chunkSize(block) - __heap_align(size); {
else{ // tmp2 = chunkSize(block) - sizeof(HeapHeader);
remaining_bytes = remaining_bytes; tmp2 = __heap_align(size);
remaining_bytes = chunkSize(block) - tmp2;
}
else{
remaining_bytes = tmp - sizeof(EmptyHeapBlock);
} }
if(remaining_bytes >= 0x20){ if(remaining_bytes >= sizeof(EmptyHeapBlock)){
heap_occupiedBytes = heap_occupiedBytes - remaining_bytes; tmp = (chunkSize(block) + sizeof(HeapHeader)) - remaining_bytes;
a0 = (s32)block + (chnk_size - remaining_bytes); if(tmp);
a0 = (s32)block + tmp;
heap_occupiedBytes -= remaining_bytes;
a0->hdr.prev = block; a0->hdr.prev = block;
a0->hdr.next = block->next; a0->hdr.next = block->next;
@@ -527,7 +528,6 @@ void func_80255200(HeapHeader *block, s32 size){
func_8025456C(a0); func_8025456C(a0);
} }
} }
#endif
void func_80255300(HeapHeader *block, s32 size){ void func_80255300(HeapHeader *block, s32 size){
func_80255200(block, size); func_80255200(block, size);

View File

@@ -138,19 +138,19 @@ s32 func_80350F7C(ActorMarker *marker, s32 arg1, f32 arg2[3], s32 arg3, s32 arg4
return sp4C; return sp4C;
} }
s32 func_803510B4(ActorMarker *marker, s32 arg1, f32 arg2[3], f32 arg3, s32 arg4, s32 arg5, s32 arg6) { s32 func_803510B4(ActorMarker *marker, s32 arg1, f32 arg2[3], f32 arg3, s32 arg4, s32 arg5, s32 flagFliter) {
s32 pad44; s32 pad44;
Struct68s *sp40; Struct68s *sp40;
BKVertexList *sp3C; BKVertexList *vertex_list;
BKCollisionList *sp38; BKCollisionList *collision_list;
sp40 = &D_803861B0.unk4[marker->actrArrayIdx]; sp40 = &D_803861B0.unk4[marker->actrArrayIdx];
if ((sp40->unkC == NULL) || (sp40->unk30 & 1)) { if ((sp40->unkC == NULL) || (sp40->unk30 & 1)) {
return 0; return 0;
} }
sp38 = func_8033A084(sp40->unkC); collision_list = func_8033A084(sp40->unkC);
sp3C = func_8033A148(sp40->unkC); vertex_list = func_8033A148(sp40->unkC);
return func_802E9118(sp38, sp3C, sp40->unk14, sp40->unk20, sp40->unk2C, arg1, arg2, arg3, arg4, arg5, arg6); return func_802E9118(collision_list, vertex_list, sp40->unk14, sp40->unk20, sp40->unk2C, arg1, arg2, arg3, arg4, arg5, flagFliter);
} }
s32 func_80351198(ActorMarker *marker, s32 arg1, f32 arg2, s32 arg3, s32 arg4) { s32 func_80351198(ActorMarker *marker, s32 arg1, f32 arg2, s32 arg3, s32 arg4) {