Skip to content

Commit

Permalink
Boss 8 (#145)
Browse files Browse the repository at this point in the history
* Unify adding entries to GFX queue

* Match CreateSuperEggRoboZ

* Some screen shake doc

* Move Task_804AB24 into non-matching

* Match sub_804AD68

* Move sub_804AE40 into non-matching

* move sub_804B2EC into non-match

* Match sub_804B43C

* Add SWITCH_ARM_VARIANT macro

* Match sub_804B594

* Match sub_804B734

* Match sub_804B984

* Match sub_804BAC0

* Match sub_804C5B8

* Match sub_804C3AC

* Move sub_804C240 to non-matching

* Match sub_804C080

* Match sub_804BE6C

* Move sub_804BC44 into non-matching. Remove boss_8_2.c

* Match sub_8031138 by making the generated code less efficient. Yay.

* Do a pass on sub_8004E14 and move it into non-matching

* Merge sprite_2.c and sprite_3.c into sprite.c

* Match sub_8023B5C

* Progress on sub_804AE40 by Ollie

Co-authored-by: Oliver Bell <freshollie@gmail.com>

* Merge animation_commands.c into sprite.c

* gUnknown_03002794 -> gRefSpriteTables

* Replace UB_FIX -> BUG_FIX; General cleanup

* sub_8004518 -> Base10DigitsToHexNibbles

* Move animation_commands_bg.c into background.c

---------

Co-authored-by: Oliver Bell <freshollie@gmail.com>
  • Loading branch information
JaceCear and freshollie committed Jun 9, 2024
1 parent b035c69 commit ea91089
Show file tree
Hide file tree
Showing 83 changed files with 7,094 additions and 8,946 deletions.
4,885 changes: 0 additions & 4,885 deletions asm/boss_8.s

This file was deleted.

11 changes: 5 additions & 6 deletions asm/boss_9.s
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ gUnknown_080D8F10:
.syntax unified
.arm

.if 0
.endif

.if 01
thumb_func_start CreateTrueArea53Boss
CreateTrueArea53Boss: @ 0x0804CEC4
push {r4, r5, r6, r7, lr}
Expand Down Expand Up @@ -182,7 +180,7 @@ _0804CEF8:
movs r0, #0xc0
lsls r0, r0, #0x12
adds r0, r4, r0
str r0, [sp, #4]
str r0, [sp, #4] @ sp04 = boss
ldr r0, _0804D2B8 @ =IWRAM_START + 0x1C
adds r2, r4, r0 @ r2 = &boss->unk1C
ldr r1, _0804D2BC @ =IWRAM_START + 0x48
Expand All @@ -200,12 +198,12 @@ _0804CEF8:
str r1, [sp, #0xc]
movs r3, #0
movs r0, #0xc
ldr r5, [sp, #4]
ldr r5, [sp, #4] @ r5 = boss
strb r0, [r5, #0xc]
strb r3, [r5, #0xd]
movs r1, #0
movs r0, #1
mov sb, r0
mov sb, r0 @ sb = 1
mov r0, sb
strh r0, [r5, #0x10]
movs r0, #0x50
Expand Down Expand Up @@ -981,6 +979,7 @@ _0804D584: .4byte 0x000002CE
_0804D588: .4byte 0x00000467
_0804D58C: .4byte 0x000002CD
_0804D590: .4byte 0x000002CF
.endif

thumb_func_start sub_804D594
sub_804D594: @ 0x0804D594
Expand Down
12 changes: 6 additions & 6 deletions asm/non_matching/engine/sub_80039E4.inc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ _08003A84:
lsls r0, r1
lsrs r0, r0, #0x10
str r0, [sp, #0x10] @ sp10 = bg_affine_pixelcount
ldr r0, _08003BB4 @ =gUnknown_03002794
ldr r0, _08003BB4 @ =gRefSpriteTables
ldr r1, [r0]
ldr r2, [sp, #0xc]
ldrh r0, [r2, #0xa]
Expand Down Expand Up @@ -242,7 +242,7 @@ _08003BA4: .4byte gUnknown_03005390
_08003BA8: .4byte gUnknown_03004D10
_08003BAC: .4byte gBgCntRegs
_08003BB0: .4byte gDispCnt
_08003BB4: .4byte gUnknown_03002794
_08003BB4: .4byte gRefSpriteTables
_08003BB8: .4byte 0x040000D4
_08003BBC: .4byte 0x80000003
_08003BC0: .4byte gOamShapesSizes
Expand Down Expand Up @@ -316,15 +316,15 @@ _08003C2C:
movs r7, #0x40
str r7, [sp, #0x10]
_08003C46:
ldr r0, _08003D14 @ =gUnknown_03002794
ldr r0, _08003D14 @ =gRefSpriteTables
ldr r1, [r0]
ldr r2, [sp, #0xc]
ldrh r0, [r2, #0xa]
ldr r1, [r1, #8] @ r1 = gUnknown_03002794->oamData
ldr r1, [r1, #8] @ r1 = gRefSpriteTables->oamData
lsls r0, r0, #2
adds r0, r0, r1
ldr r0, [r0]
str r0, [sp, #0x1c] @ sp1C = gUnknown_03002794->oamData[s->graphics.anim];
str r0, [sp, #0x1c] @ sp1C = gRefSpriteTables->oamData[s->graphics.anim];
mov r3, sl @ r3 = dims
ldrb r1, [r3, #1] @ r1 = dims->oamIndex
lsls r0, r1, #1
Expand Down Expand Up @@ -424,7 +424,7 @@ __08003D04:
ldrsh r1, [r7, r2]
b _08003D3C
.align 2, 0
_08003D14: .4byte gUnknown_03002794
_08003D14: .4byte gRefSpriteTables
_08003D18: .4byte 0x040000D4
_08003D1C: .4byte 0x80000003
_08003D20: .4byte gOamShapesSizes
Expand Down
Loading

0 comments on commit ea91089

Please sign in to comment.