Decomped sub_0205B7C8

Decomped by @slaw-22
This commit is contained in:
AnonymousRandomPerson 2026-03-17 22:52:13 -04:00
parent e30df6fa7b
commit 93c4cf4dde
5 changed files with 30 additions and 24 deletions

View File

@ -388,4 +388,5 @@
.public sub_0205B44C
.public sub_0205B560
.public sub_0205B77C
.public sub_0205B7C8
.public vsprintf

View File

@ -1,30 +1,8 @@
.include "asm/macros.inc"
.include "main_0205B7C8.inc"
.include "main_0205B80C.inc"
.text
arm_func_start sub_0205B7C8
sub_0205B7C8: ; 0x0205B7C8
stmdb sp!, {r4, lr}
mov r2, #0xb0
mul r4, r0, r2
ldr r0, _0205B808 ; =_020B0A54
mov r1, #0
ldr r0, [r0]
add r0, r0, r4
bl MemsetSimple
ldr r0, _0205B808 ; =_020B0A54
mov r2, #0
ldr r1, [r0]
strb r2, [r1, r4]
ldr r0, [r0]
add r0, r0, r4
strh r2, [r0, #0xa2]
ldmia sp!, {r4, pc}
.align 2, 0
_0205B808: .word _020B0A54
arm_func_end sub_0205B7C8
arm_func_start sub_0205B80C
sub_0205B80C: ; 0x0205B80C
stmdb sp!, {r4, r5, r6, r7, r8, sb, sl, lr}

6
include/main_0205B7C8.h Normal file
View File

@ -0,0 +1,6 @@
#ifndef PMDSKY_MAIN_0205B7C8_H
#define PMDSKY_MAIN_0205B7C8_H
void sub_0205B7C8(s32 index);
#endif //PMDSKY_MAIN_0205B7C8_H

View File

@ -152,7 +152,8 @@ Static main
Object src/main_0205B6EC.o
Object asm/main_0205B738.o
Object src/main_0205B77C.o
Object asm/main_0205B7C8.o
Object src/main_0205B7C8.o
Object asm/main_0205B80C.o
Object src/dungeon_init_2.o
Object asm/main_0206A750.o
Object src/main_0206C98C.o

20
src/main_0205B7C8.c Normal file
View File

@ -0,0 +1,20 @@
#include "main_0205B7C8.h"
#include "main_0200330C.h"
struct unkStruct_020B0A54 {
u8 f0;
u8 pad[161];
u16 fA2;
u8 pad2[12];
};
// Should match the struct in main_0205B77C, but haven't gotten it to match yet.
// https://decomp.me/scratch/WXX6d
extern struct unkStruct_020B0A54 *_020B0A54;
void sub_0205B7C8(s32 index)
{
MemsetSimple((u8*) &_020B0A54[index], 0, 0xB0);
_020B0A54[index].f0 = 0;
_020B0A54[index].fA2 = 0;
}