mazaal hand

This commit is contained in:
Henny022p 2021-04-29 21:28:22 +02:00
parent f111a5a781
commit 1ea5469a6b
4 changed files with 40 additions and 87 deletions

View File

@ -1,57 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start MazaalHand
MazaalHand: @ 0x08035164
push {r4, lr}
adds r4, r0, #0
ldrb r0, [r4, #0xc]
cmp r0, #0
bne _0803518C
movs r2, #1
movs r0, #1
strb r0, [r4, #0xc]
ldrb r1, [r4, #0xa]
ands r1, r2
lsls r1, r1, #6
ldrb r2, [r4, #0x18]
subs r0, #0x42
ands r0, r2
orrs r0, r1
strb r0, [r4, #0x18]
adds r0, r4, #0
movs r1, #0
bl InitAnimationForceUpdate
_0803518C:
adds r0, r4, #0
bl sub_08035194
pop {r4, pc}
thumb_func_start sub_08035194
sub_08035194: @ 0x08035194
push {lr}
adds r2, r0, #0
ldrb r0, [r2, #0xa]
cmp r0, #0
bne _080351A8
ldr r0, _080351A4 @ =gUnk_080CEF34
b _080351AA
.align 2, 0
_080351A4: .4byte gUnk_080CEF34
_080351A8:
ldr r0, _080351B8 @ =gUnk_080CEF58
_080351AA:
ldrb r1, [r2, #0x1e]
lsls r1, r1, #2
adds r1, r1, r0
ldr r0, [r1]
str r0, [r2, #0x48]
pop {pc}
.align 2, 0
_080351B8: .4byte gUnk_080CEF58

View File

@ -1,27 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_080CEF34:: @ 080CEF34
.4byte gUnk_080FD394
.4byte gUnk_080FD394
.4byte gUnk_080FD394
.4byte gUnk_080FD39C
.4byte gUnk_080FD3A4
.4byte gUnk_080FD3AC
.4byte gUnk_080FD3AC
.4byte gUnk_080FD3AC
.4byte gUnk_080FD3AC
gUnk_080CEF58:: @ 080CEF58
.4byte gUnk_080FD3B4
.4byte gUnk_080FD3B4
.4byte gUnk_080FD3B4
.4byte gUnk_080FD3BC
.4byte gUnk_080FD3A4
.4byte gUnk_080FD3C4
.4byte gUnk_080FD3C4
.4byte gUnk_080FD3C4
.4byte gUnk_080FD3C4

View File

@ -398,7 +398,7 @@ SECTIONS {
asm/spinyBeetle.o(.text);
asm/mazaalHead.o(.text);
asm/mazaalMacro.o(.text);
asm/mazaalHand.o(.text);
src/enemy/mazaalHand.o(.text);
asm/octorokBoss.o(.text);
asm/flyingPot.o(.text);
src/enemy/gibdo.o(.text);
@ -1097,7 +1097,7 @@ SECTIONS {
data/animations/enemy/mazaalHead.o(.rodata);
data/const/enemy/mazaalMacro.o(.rodata);
data/animations/enemy/mazaalMacro.o(.rodata);
data/const/enemy/mazaalHand.o(.rodata);
src/enemy/mazaalHand.o(.rodata);
data/animations/enemy/mazaalHand.o(.rodata);
data/const/enemy/octorokBoss.o(.rodata);
data/animations/enemy/octorokBoss.o(.rodata);

View File

@ -1 +1,38 @@
#include "global.h"
#include "entity.h"
void sub_08035194(Entity*);
extern const Hitbox gUnk_080FD394;
extern const Hitbox gUnk_080FD39C;
extern const Hitbox gUnk_080FD3A4;
extern const Hitbox gUnk_080FD3AC;
extern const Hitbox gUnk_080FD3B4;
extern const Hitbox gUnk_080FD3BC;
extern const Hitbox gUnk_080FD3C4;
const Hitbox* const gUnk_080CEF34[] = {
&gUnk_080FD394, &gUnk_080FD394, &gUnk_080FD394, &gUnk_080FD39C, &gUnk_080FD3A4,
&gUnk_080FD3AC, &gUnk_080FD3AC, &gUnk_080FD3AC, &gUnk_080FD3AC,
};
const Hitbox* const gUnk_080CEF58[] = {
&gUnk_080FD3B4, &gUnk_080FD3B4, &gUnk_080FD3B4, &gUnk_080FD3BC, &gUnk_080FD3A4,
&gUnk_080FD3C4, &gUnk_080FD3C4, &gUnk_080FD3C4, &gUnk_080FD3C4,
};
void MazaalHand(Entity* this) {
if (this->action == 0) {
this->action = 1;
this->spriteSettings.b.flipX = this->type;
InitAnimationForceUpdate(this, 0);
}
sub_08035194(this);
}
void sub_08035194(Entity* this) {
if (this->type == 0) {
this->hitbox = (Hitbox*)gUnk_080CEF34[this->frameIndex];
} else {
this->hitbox = (Hitbox*)gUnk_080CEF58[this->frameIndex];
}
}