1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-27 07:07:09 +00:00

Fix reloc data used for some actors and Match Bg_Spot01_Idohashira (#327)

This commit is contained in:
Roman971 2020-08-17 23:47:48 +02:00 committed by GitHub
parent f11a74d41d
commit 3dc3722570
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 18 additions and 136 deletions

View file

@ -1,65 +0,0 @@
.rdata
glabel D_808AB938
.asciz "../z_bg_spot01_idohashira.c"
.balign 4
glabel D_808AB954
.asciz "../z_bg_spot01_idohashira.c"
.balign 4
glabel D_808AB970
.asciz "../z_bg_spot01_idohashira.c"
.balign 4
.text
glabel func_808AB700
/* 00A20 808AB700 27BDFFB8 */ addiu $sp, $sp, 0xFFB8 ## $sp = FFFFFFB8
/* 00A24 808AB704 AFBF001C */ sw $ra, 0x001C($sp)
/* 00A28 808AB708 AFB00018 */ sw $s0, 0x0018($sp)
/* 00A2C 808AB70C AFA40048 */ sw $a0, 0x0048($sp)
/* 00A30 808AB710 AFA5004C */ sw $a1, 0x004C($sp)
/* 00A34 808AB714 8CB00000 */ lw $s0, 0x0000($a1) ## 00000000
/* 00A38 808AB718 3C06808B */ lui $a2, %hi(D_808AB938) ## $a2 = 808B0000
/* 00A3C 808AB71C 24C6B938 */ addiu $a2, $a2, %lo(D_808AB938) ## $a2 = 808AB938
/* 00A40 808AB720 27A40030 */ addiu $a0, $sp, 0x0030 ## $a0 = FFFFFFE8
/* 00A44 808AB724 240702B1 */ addiu $a3, $zero, 0x02B1 ## $a3 = 000002B1
/* 00A48 808AB728 0C031AB1 */ jal Graph_OpenDisps
/* 00A4C 808AB72C 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000
/* 00A50 808AB730 0C024F46 */ jal func_80093D18
/* 00A54 808AB734 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00A58 808AB738 8E0302C0 */ lw $v1, 0x02C0($s0) ## 000002C0
/* 00A5C 808AB73C 3C18DA38 */ lui $t8, 0xDA38 ## $t8 = DA380000
/* 00A60 808AB740 37180003 */ ori $t8, $t8, 0x0003 ## $t8 = DA380003
/* 00A64 808AB744 246F0008 */ addiu $t7, $v1, 0x0008 ## $t7 = 00000008
/* 00A68 808AB748 AE0F02C0 */ sw $t7, 0x02C0($s0) ## 000002C0
/* 00A6C 808AB74C 3C05808B */ lui $a1, %hi(D_808AB954) ## $a1 = 808B0000
/* 00A70 808AB750 AC780000 */ sw $t8, 0x0000($v1) ## 00000000
/* 00A74 808AB754 24A5B954 */ addiu $a1, $a1, %lo(D_808AB954) ## $a1 = 808AB954
/* 00A78 808AB758 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00A7C 808AB75C 240602BB */ addiu $a2, $zero, 0x02BB ## $a2 = 000002BB
/* 00A80 808AB760 0C0346A2 */ jal Matrix_NewMtx
/* 00A84 808AB764 AFA3002C */ sw $v1, 0x002C($sp)
/* 00A88 808AB768 8FA7002C */ lw $a3, 0x002C($sp)
/* 00A8C 808AB76C ACE20004 */ sw $v0, 0x0004($a3) ## 00000004
/* 00A90 808AB770 8FA5004C */ lw $a1, 0x004C($sp)
/* 00A94 808AB774 0C22ABCD */ jal func_808AAF34
/* 00A98 808AB778 8FA40048 */ lw $a0, 0x0048($sp)
/* 00A9C 808AB77C 8E0302C0 */ lw $v1, 0x02C0($s0) ## 000002C0
/* 00AA0 808AB780 3C090600 */ lui $t1, 0x0600 ## $t1 = 06000000
/* 00AA4 808AB784 25290420 */ addiu $t1, $t1, 0x0420 ## $t1 = 06000420
/* 00AA8 808AB788 24790008 */ addiu $t9, $v1, 0x0008 ## $t9 = 00000008
/* 00AAC 808AB78C AE1902C0 */ sw $t9, 0x02C0($s0) ## 000002C0
/* 00AB0 808AB790 3C08DE00 */ lui $t0, 0xDE00 ## $t0 = DE000000
/* 00AB4 808AB794 3C06808B */ lui $a2, %hi(D_808AB970) ## $a2 = 808B0000
/* 00AB8 808AB798 24C6B970 */ addiu $a2, $a2, %lo(D_808AB970) ## $a2 = 808AB970
/* 00ABC 808AB79C 27A40030 */ addiu $a0, $sp, 0x0030 ## $a0 = FFFFFFE8
/* 00AC0 808AB7A0 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000
/* 00AC4 808AB7A4 240702C4 */ addiu $a3, $zero, 0x02C4 ## $a3 = 000002C4
/* 00AC8 808AB7A8 AC680000 */ sw $t0, 0x0000($v1) ## 00000000
/* 00ACC 808AB7AC 0C031AD5 */ jal Graph_CloseDisps
/* 00AD0 808AB7B0 AC690004 */ sw $t1, 0x0004($v1) ## 00000004
/* 00AD4 808AB7B4 8FBF001C */ lw $ra, 0x001C($sp)
/* 00AD8 808AB7B8 8FB00018 */ lw $s0, 0x0018($sp)
/* 00ADC 808AB7BC 27BD0048 */ addiu $sp, $sp, 0x0048 ## $sp = 00000000
/* 00AE0 808AB7C0 03E00008 */ jr $ra
/* 00AE4 808AB7C4 00000000 */ nop

View file

@ -1,13 +0,0 @@
.include "macro.inc"
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers
.section .rodata
.balign 16
glabel D_808AB9E0
.incbin "baserom/ovl_Bg_Spot01_Idohashira", 0xD00, 0x00000100

View file

@ -1,13 +0,0 @@
.include "macro.inc"
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers
.section .rodata
.balign 16
glabel D_809D25C0
.incbin "baserom/ovl_En_Bx", 0xAE0, 0x000000D0

View file

@ -1,13 +0,0 @@
.include "macro.inc"
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers
.section .rodata
.balign 16
glabel D_80A4FF60
.incbin "baserom/ovl_En_Gs", 0x1C40, 0x000002C0

16
spec
View file

@ -1217,11 +1217,7 @@ endseg
beginseg beginseg
name "ovl_Bg_Spot01_Idohashira" name "ovl_Bg_Spot01_Idohashira"
include "build/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.o" include "build/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.o"
#ifdef NON_MATCHING
include "build/src/overlays/actors/ovl_Bg_Spot01_Idohashira/ovl_Bg_Spot01_Idohashira_reloc.o" include "build/src/overlays/actors/ovl_Bg_Spot01_Idohashira/ovl_Bg_Spot01_Idohashira_reloc.o"
#else
include "build/data/overlays/actors/z_bg_spot01_idohashira.reloc.o"
#endif
endseg endseg
beginseg beginseg
@ -2140,11 +2136,7 @@ endseg
beginseg beginseg
name "ovl_En_Bx" name "ovl_En_Bx"
include "build/src/overlays/actors/ovl_En_Bx/z_en_bx.o" include "build/src/overlays/actors/ovl_En_Bx/z_en_bx.o"
#ifdef NON_MATCHING
include "build/src/overlays/actors/ovl_En_Bx/ovl_En_Bx_reloc.o" include "build/src/overlays/actors/ovl_En_Bx/ovl_En_Bx_reloc.o"
#else
include "build/data/overlays/actors/z_en_bx.reloc.o"
#endif
endseg endseg
beginseg beginseg
@ -2529,11 +2521,7 @@ endseg
beginseg beginseg
name "ovl_En_Gs" name "ovl_En_Gs"
include "build/src/overlays/actors/ovl_En_Gs/z_en_gs.o" include "build/src/overlays/actors/ovl_En_Gs/z_en_gs.o"
#ifdef NON_MATCHING
include "build/src/overlays/actors/ovl_En_Gs/ovl_En_Gs_reloc.o" include "build/src/overlays/actors/ovl_En_Gs/ovl_En_Gs_reloc.o"
#else
include "build/data/overlays/actors/z_en_gs.reloc.o"
#endif
endseg endseg
beginseg beginseg
@ -2684,7 +2672,11 @@ endseg
beginseg beginseg
name "ovl_En_Insect" name "ovl_En_Insect"
include "build/src/overlays/actors/ovl_En_Insect/z_en_insect.o" include "build/src/overlays/actors/ovl_En_Insect/z_en_insect.o"
#ifdef NON_MATCHING
include "build/src/overlays/actors/ovl_En_Insect/ovl_En_Insect_reloc.o"
#else
include "build/data/overlays/actors/z_en_insect.reloc.o" include "build/data/overlays/actors/z_en_insect.reloc.o"
#endif
endseg endseg
beginseg beginseg

View file

@ -322,25 +322,21 @@ void BgSpot01Idohashira_Init(Actor* thisx, GlobalContext* globalCtx) {
} }
} }
#ifdef NON_MATCHING
// regalloc differences
void func_808AB700(BgSpot01Idohashira* this, GlobalContext* globalCtx) { void func_808AB700(BgSpot01Idohashira* this, GlobalContext* globalCtx) {
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; GraphicsContext* localGfxCtx = globalCtx->state.gfxCtx;
Gfx* dispRefs[5]; GraphicsContext* gfxCtx = localGfxCtx;
Gfx* dispRefs[4];
Graph_OpenDisps(dispRefs, gfxCtx, "../z_bg_spot01_idohashira.c", 689); Graph_OpenDisps(dispRefs, localGfxCtx, "../z_bg_spot01_idohashira.c", 689);
func_80093D18(gfxCtx); func_80093D18(localGfxCtx);
gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(gfxCtx, "../z_bg_spot01_idohashira.c", 699), gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(localGfxCtx, "../z_bg_spot01_idohashira.c", 699),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
func_808AAF34(this, globalCtx); func_808AAF34(this, globalCtx);
gSPDisplayList(gfxCtx->polyOpa.p++, D_06000420); gSPDisplayList(gfxCtx->polyOpa.p++, D_06000420);
Graph_CloseDisps(dispRefs, gfxCtx, "../z_bg_spot01_idohashira.c", 708); Graph_CloseDisps(dispRefs, localGfxCtx, "../z_bg_spot01_idohashira.c", 708);
} }
#else
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Idohashira/func_808AB700.s")
#endif
void BgSpot01Idohashira_Draw(Actor* thisx, GlobalContext* globalCtx) { void BgSpot01Idohashira_Draw(Actor* thisx, GlobalContext* globalCtx) {
BgSpot01Idohashira* this = THIS; BgSpot01Idohashira* this = THIS;

View file

@ -127,20 +127,18 @@ void BgZg_Init(Actor* thisx, GlobalContext* globalCtx) {
} }
void func_808C0EEC(BgZg* this, GlobalContext* globalCtx) { void func_808C0EEC(BgZg* this, GlobalContext* globalCtx) {
GraphicsContext* gfxCtx; GraphicsContext* localGfxCtx = globalCtx->state.gfxCtx;
GraphicsContext* tempgfxCtx; // oddly needs this to match GraphicsContext* gfxCtx = localGfxCtx;
Gfx* dispRefs[4]; Gfx* dispRefs[4];
tempgfxCtx = globalCtx->state.gfxCtx; Graph_OpenDisps(dispRefs, localGfxCtx, "../z_bg_zg.c", 311);
gfxCtx = tempgfxCtx;
Graph_OpenDisps(dispRefs, gfxCtx, "../z_bg_zg.c", 311);
func_80093D18(gfxCtx); func_80093D18(localGfxCtx);
gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(gfxCtx, "../z_bg_zg.c", 315), gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(localGfxCtx, "../z_bg_zg.c", 315),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gfxCtx->polyOpa.p++, D_06001080); gSPDisplayList(gfxCtx->polyOpa.p++, D_06001080);
Graph_CloseDisps(dispRefs, gfxCtx, "../z_bg_zg.c", 320);
Graph_CloseDisps(dispRefs, localGfxCtx, "../z_bg_zg.c", 320);
} }
void BgZg_Draw(Actor* thisx, GlobalContext* globalCtx) { void BgZg_Draw(Actor* thisx, GlobalContext* globalCtx) {