Spawn tables

This commit is contained in:
Egor Ananyin 2020-08-13 13:41:23 +03:00
parent ab812ef21a
commit c96ef9c9b9
5 changed files with 14 additions and 14 deletions

View File

@ -16553,12 +16553,12 @@ _0800A3FC:
_0800A410: .4byte gUnk_0203AD30
_0800A414: .4byte gUnk_02023530
_0800A418:
ldr r1, _0800A41C @ =gUnk_0835107C
ldr r1, _0800A41C @ =gSpawnFuncTable1
b _0800A422
.align 2, 0
_0800A41C: .4byte gUnk_0835107C
_0800A41C: .4byte gSpawnFuncTable1
_0800A420:
ldr r1, _0800A45C @ =gUnk_082D91D4
ldr r1, _0800A45C @ =gSpawnFuncTable2
_0800A422:
ldrb r0, [r5, #0xc]
lsls r0, r0, #2
@ -16590,7 +16590,7 @@ _0800A44A:
pop {r0}
bx r0
.align 2, 0
_0800A45C: .4byte gUnk_082D91D4
_0800A45C: .4byte gSpawnFuncTable2
thumb_func_start sub_0800A460
sub_0800A460: @ 0x0800A460
@ -16780,12 +16780,12 @@ _0800A5A8:
_0800A5BC: .4byte gUnk_0203AD30
_0800A5C0: .4byte gUnk_02023530
_0800A5C4:
ldr r1, _0800A5C8 @ =gUnk_0835107C
ldr r1, _0800A5C8 @ =gSpawnFuncTable1
b _0800A5CE
.align 2, 0
_0800A5C8: .4byte gUnk_0835107C
_0800A5C8: .4byte gSpawnFuncTable1
_0800A5CC:
ldr r1, _0800A608 @ =gUnk_082D91D4
ldr r1, _0800A608 @ =gSpawnFuncTable2
_0800A5CE:
ldrb r0, [r5, #0xc]
lsls r0, r0, #2
@ -16817,7 +16817,7 @@ _0800A5F6:
pop {r0}
bx r0
.align 2, 0
_0800A608: .4byte gUnk_082D91D4
_0800A608: .4byte gSpawnFuncTable2
thumb_func_start sub_0800A60C
sub_0800A60C: @ 0x0800A60C

View File

@ -9921,7 +9921,7 @@ gUnk_082D91A4:: @ 082D91A4
gUnk_082D91BC:: @ 082D91BC
.incbin "baserom.gba", 0x2D91BC, 0x0000018
gUnk_082D91D4:: @ 082D91D4
gSpawnFuncTable2:: @ 082D91D4
.incbin "baserom.gba", 0x2D91D4, 0x0000010
gUnk_082D91E4:: @ 082D91E4

View File

@ -2052,7 +2052,7 @@ gUnk_0835104A:: @ 0835104A
gUnk_0835105C:: @ 0835105C
.incbin "baserom.gba", 0x35105C, 0x0000020
gUnk_0835107C:: @ 0835107C
gSpawnFuncTable1:: @ 0835107C
.incbin "baserom.gba", 0x35107C, 0x000036C
gUnk_083513E8:: @ 083513E8

View File

@ -196,8 +196,8 @@ extern u32 gRngVal;
extern const struct Unk_082D7850* gUnk_082D7850[];
extern struct Object2 *(*gUnk_082D91D4[])(struct Object *, u8);
extern struct Object2 *(*gUnk_0835107C[])(struct Object *, u8);
extern struct Object2 *(*gSpawnFuncTable2[])(struct Object *, u8);
extern struct Object2 *(*gSpawnFuncTable1[])(struct Object *, u8);
extern const u32 gUnk_083B909C;

View File

@ -13,11 +13,11 @@ struct Object2 *CreateObject(u8 playerId, struct Object *obj)
switch (obj->unk0) {
case 1:
var1 = gUnk_0835107C[obj->type](obj, playerId);
var1 = gSpawnFuncTable1[obj->type](obj, playerId);
var0[2] = (s32) &var1->unk56;
break;
case 2:
var1 = gUnk_082D91D4[obj->type](obj, playerId);
var1 = gSpawnFuncTable2[obj->type](obj, playerId);
var0[2] = (s32) &var1->unk56;
break;
default: