mirror of https://github.com/zeldaret/tmc.git
split unrelated code
This commit is contained in:
parent
2d2f371f22
commit
fc71c983d0
|
@ -0,0 +1,101 @@
|
||||||
|
.include "asm/macros.inc"
|
||||||
|
|
||||||
|
.include "constants/constants.inc"
|
||||||
|
|
||||||
|
.syntax unified
|
||||||
|
|
||||||
|
.text
|
||||||
|
|
||||||
|
thumb_func_start sub_080300E8
|
||||||
|
sub_080300E8: @ 0x080300E8
|
||||||
|
push {lr}
|
||||||
|
ldr r1, _08030110 @ =gScreenTransition
|
||||||
|
adds r3, r1, #0
|
||||||
|
adds r3, #0xae
|
||||||
|
ldrh r0, [r3]
|
||||||
|
cmp r0, #0xff
|
||||||
|
beq _0803010C
|
||||||
|
lsls r0, r0, #2
|
||||||
|
adds r1, #0x6c
|
||||||
|
adds r0, r0, r1
|
||||||
|
ldr r2, _08030114 @ =gPlayerEntity
|
||||||
|
ldrh r1, [r0]
|
||||||
|
strh r1, [r2, #0x2e]
|
||||||
|
ldrh r0, [r0, #2]
|
||||||
|
adds r0, #0xc
|
||||||
|
strh r0, [r2, #0x32]
|
||||||
|
movs r0, #0xff
|
||||||
|
strh r0, [r3]
|
||||||
|
_0803010C:
|
||||||
|
pop {pc}
|
||||||
|
.align 2, 0
|
||||||
|
_08030110: .4byte gScreenTransition
|
||||||
|
_08030114: .4byte gPlayerEntity
|
||||||
|
|
||||||
|
thumb_func_start sub_08030118
|
||||||
|
sub_08030118: @ 0x08030118
|
||||||
|
push {lr}
|
||||||
|
adds r2, r0, #0
|
||||||
|
ldr r0, _0803013C @ =gScreenTransition
|
||||||
|
adds r0, #0xac
|
||||||
|
ldrh r0, [r0]
|
||||||
|
asrs r0, r2
|
||||||
|
movs r1, #1
|
||||||
|
ands r0, r1
|
||||||
|
cmp r0, #0
|
||||||
|
beq _08030140
|
||||||
|
movs r0, #0xc0
|
||||||
|
lsls r0, r0, #2
|
||||||
|
adds r1, r2, #0
|
||||||
|
adds r1, #0x67
|
||||||
|
bl SetLocalFlagByOffset
|
||||||
|
b _0803014C
|
||||||
|
.align 2, 0
|
||||||
|
_0803013C: .4byte gScreenTransition
|
||||||
|
_08030140:
|
||||||
|
movs r0, #0xc0
|
||||||
|
lsls r0, r0, #2
|
||||||
|
adds r1, r2, #0
|
||||||
|
adds r1, #0x67
|
||||||
|
bl ClearLocalFlagByOffset
|
||||||
|
_0803014C:
|
||||||
|
pop {pc}
|
||||||
|
.align 2, 0
|
||||||
|
|
||||||
|
thumb_func_start sub_08030150
|
||||||
|
sub_08030150: @ 0x08030150
|
||||||
|
push {r4, r5, lr}
|
||||||
|
mov ip, r0
|
||||||
|
ldr r2, _08030194 @ =gScreenTransition
|
||||||
|
adds r5, r2, #0
|
||||||
|
adds r5, #0xac
|
||||||
|
mov r3, ip
|
||||||
|
adds r3, #0x80
|
||||||
|
ldrb r4, [r3]
|
||||||
|
movs r0, #1
|
||||||
|
lsls r0, r4
|
||||||
|
ldrh r1, [r5]
|
||||||
|
bics r1, r0
|
||||||
|
mov r0, ip
|
||||||
|
adds r0, #0x84
|
||||||
|
ldr r0, [r0]
|
||||||
|
lsls r0, r4
|
||||||
|
orrs r1, r0
|
||||||
|
strh r1, [r5]
|
||||||
|
ldrb r0, [r3]
|
||||||
|
lsls r0, r0, #2
|
||||||
|
adds r2, #0x6c
|
||||||
|
adds r0, r0, r2
|
||||||
|
mov r4, ip
|
||||||
|
ldrh r1, [r4, #0x2e]
|
||||||
|
strh r1, [r0]
|
||||||
|
ldrb r0, [r3]
|
||||||
|
lsls r0, r0, #1
|
||||||
|
adds r0, #1
|
||||||
|
lsls r0, r0, #1
|
||||||
|
adds r0, r0, r2
|
||||||
|
ldrh r1, [r4, #0x32]
|
||||||
|
strh r1, [r0]
|
||||||
|
pop {r4, r5, pc}
|
||||||
|
.align 2, 0
|
||||||
|
_08030194: .4byte gScreenTransition
|
|
@ -375,133 +375,4 @@ _080300A2:
|
||||||
adds r0, r4, #0
|
adds r0, r4, #0
|
||||||
bl sub_0802F9C8
|
bl sub_0802F9C8
|
||||||
pop {r4, pc}
|
pop {r4, pc}
|
||||||
.align 2, 0
|
.align 2, 0
|
||||||
|
|
||||||
thumb_func_start sub_080300AC
|
|
||||||
sub_080300AC: @ 0x080300AC
|
|
||||||
push {r4, lr}
|
|
||||||
ldr r4, _080300C0 @ =gUnk_0300110C
|
|
||||||
adds r0, r4, #0
|
|
||||||
movs r1, #0x44
|
|
||||||
bl _DmaZero
|
|
||||||
adds r4, #0x42
|
|
||||||
movs r0, #0xff
|
|
||||||
strh r0, [r4]
|
|
||||||
pop {r4, pc}
|
|
||||||
.align 2, 0
|
|
||||||
_080300C0: .4byte gUnk_0300110C
|
|
||||||
|
|
||||||
thumb_func_start sub_080300C4
|
|
||||||
sub_080300C4: @ 0x080300C4
|
|
||||||
push {lr}
|
|
||||||
ldr r2, _080300E4 @ =gScreenTransition
|
|
||||||
adds r0, r2, #0
|
|
||||||
adds r0, #0xae
|
|
||||||
ldrh r0, [r0]
|
|
||||||
cmp r0, #0xff
|
|
||||||
bne _080300E2
|
|
||||||
adds r0, r2, #0
|
|
||||||
adds r0, #0xac
|
|
||||||
movs r1, #0
|
|
||||||
strh r1, [r0]
|
|
||||||
subs r0, #0x40
|
|
||||||
movs r1, #0x40
|
|
||||||
bl _DmaZero
|
|
||||||
_080300E2:
|
|
||||||
pop {pc}
|
|
||||||
.align 2, 0
|
|
||||||
_080300E4: .4byte gScreenTransition
|
|
||||||
|
|
||||||
thumb_func_start sub_080300E8
|
|
||||||
sub_080300E8: @ 0x080300E8
|
|
||||||
push {lr}
|
|
||||||
ldr r1, _08030110 @ =gScreenTransition
|
|
||||||
adds r3, r1, #0
|
|
||||||
adds r3, #0xae
|
|
||||||
ldrh r0, [r3]
|
|
||||||
cmp r0, #0xff
|
|
||||||
beq _0803010C
|
|
||||||
lsls r0, r0, #2
|
|
||||||
adds r1, #0x6c
|
|
||||||
adds r0, r0, r1
|
|
||||||
ldr r2, _08030114 @ =gPlayerEntity
|
|
||||||
ldrh r1, [r0]
|
|
||||||
strh r1, [r2, #0x2e]
|
|
||||||
ldrh r0, [r0, #2]
|
|
||||||
adds r0, #0xc
|
|
||||||
strh r0, [r2, #0x32]
|
|
||||||
movs r0, #0xff
|
|
||||||
strh r0, [r3]
|
|
||||||
_0803010C:
|
|
||||||
pop {pc}
|
|
||||||
.align 2, 0
|
|
||||||
_08030110: .4byte gScreenTransition
|
|
||||||
_08030114: .4byte gPlayerEntity
|
|
||||||
|
|
||||||
thumb_func_start sub_08030118
|
|
||||||
sub_08030118: @ 0x08030118
|
|
||||||
push {lr}
|
|
||||||
adds r2, r0, #0
|
|
||||||
ldr r0, _0803013C @ =gScreenTransition
|
|
||||||
adds r0, #0xac
|
|
||||||
ldrh r0, [r0]
|
|
||||||
asrs r0, r2
|
|
||||||
movs r1, #1
|
|
||||||
ands r0, r1
|
|
||||||
cmp r0, #0
|
|
||||||
beq _08030140
|
|
||||||
movs r0, #0xc0
|
|
||||||
lsls r0, r0, #2
|
|
||||||
adds r1, r2, #0
|
|
||||||
adds r1, #0x67
|
|
||||||
bl SetLocalFlagByOffset
|
|
||||||
b _0803014C
|
|
||||||
.align 2, 0
|
|
||||||
_0803013C: .4byte gScreenTransition
|
|
||||||
_08030140:
|
|
||||||
movs r0, #0xc0
|
|
||||||
lsls r0, r0, #2
|
|
||||||
adds r1, r2, #0
|
|
||||||
adds r1, #0x67
|
|
||||||
bl ClearLocalFlagByOffset
|
|
||||||
_0803014C:
|
|
||||||
pop {pc}
|
|
||||||
.align 2, 0
|
|
||||||
|
|
||||||
thumb_func_start sub_08030150
|
|
||||||
sub_08030150: @ 0x08030150
|
|
||||||
push {r4, r5, lr}
|
|
||||||
mov ip, r0
|
|
||||||
ldr r2, _08030194 @ =gScreenTransition
|
|
||||||
adds r5, r2, #0
|
|
||||||
adds r5, #0xac
|
|
||||||
mov r3, ip
|
|
||||||
adds r3, #0x80
|
|
||||||
ldrb r4, [r3]
|
|
||||||
movs r0, #1
|
|
||||||
lsls r0, r4
|
|
||||||
ldrh r1, [r5]
|
|
||||||
bics r1, r0
|
|
||||||
mov r0, ip
|
|
||||||
adds r0, #0x84
|
|
||||||
ldr r0, [r0]
|
|
||||||
lsls r0, r4
|
|
||||||
orrs r1, r0
|
|
||||||
strh r1, [r5]
|
|
||||||
ldrb r0, [r3]
|
|
||||||
lsls r0, r0, #2
|
|
||||||
adds r2, #0x6c
|
|
||||||
adds r0, r0, r2
|
|
||||||
mov r4, ip
|
|
||||||
ldrh r1, [r4, #0x2e]
|
|
||||||
strh r1, [r0]
|
|
||||||
ldrb r0, [r3]
|
|
||||||
lsls r0, r0, #1
|
|
||||||
adds r0, #1
|
|
||||||
lsls r0, r0, #1
|
|
||||||
adds r0, r0, r2
|
|
||||||
ldrh r1, [r4, #0x32]
|
|
||||||
strh r1, [r0]
|
|
||||||
pop {r4, r5, pc}
|
|
||||||
.align 2, 0
|
|
||||||
_08030194: .4byte gScreenTransition
|
|
|
@ -83,6 +83,7 @@ typedef struct {
|
||||||
u16 field_0x4a;
|
u16 field_0x4a;
|
||||||
u8 field_0x4c[0x60];
|
u8 field_0x4c[0x60];
|
||||||
u16 field_0xac;
|
u16 field_0xac;
|
||||||
|
u16 field_0xae;
|
||||||
} ScreenTransition;
|
} ScreenTransition;
|
||||||
|
|
||||||
extern ScreenTransition gScreenTransition;
|
extern ScreenTransition gScreenTransition;
|
||||||
|
|
|
@ -370,6 +370,8 @@ SECTIONS {
|
||||||
asm/wizzrobeWind.o(.text);
|
asm/wizzrobeWind.o(.text);
|
||||||
asm/wizzrobeFire.o(.text);
|
asm/wizzrobeFire.o(.text);
|
||||||
asm/wizzrobeIce.o(.text);
|
asm/wizzrobeIce.o(.text);
|
||||||
|
src/code_080300AC.o(.text); /* ??? */
|
||||||
|
asm/code_080300AC.o(.text); /* ??? */
|
||||||
asm/armos.o(.text);
|
asm/armos.o(.text);
|
||||||
asm/eyegore.o(.text);
|
asm/eyegore.o(.text);
|
||||||
asm/rope.o(.text);
|
asm/rope.o(.text);
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
#include "global.h"
|
||||||
|
#include "entity.h"
|
||||||
|
#include "functions.h"
|
||||||
|
|
||||||
|
//extern void DmaZero(void*, u32);
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
u16 unk0;
|
||||||
|
u16 filler2[32];
|
||||||
|
u16 unk66;
|
||||||
|
} struct_0300110C;
|
||||||
|
|
||||||
|
extern struct_0300110C gUnk_0300110C;
|
||||||
|
|
||||||
|
void sub_080300AC(void) {
|
||||||
|
_DmaZero(&gUnk_0300110C.unk0, 0x44);
|
||||||
|
gUnk_0300110C.unk66 = 0xff;
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_080300C4(void) {
|
||||||
|
if (gScreenTransition.field_0xae == 0xff) {
|
||||||
|
gScreenTransition.field_0xac = 0;
|
||||||
|
_DmaZero(&gScreenTransition.field_0x4c[32], 0x40);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue