mirror of https://github.com/zeldaret/tmc.git
Put const data in playerItemFireRodProjectile
This commit is contained in:
parent
26b9110180
commit
1ac2d10b8d
|
@ -44064,11 +44064,6 @@
|
||||||
"start": 1208936,
|
"start": 1208936,
|
||||||
"size": 8
|
"size": 8
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "playerItemFireRodProjectile/gUnk_08127278.bin",
|
|
||||||
"start": 1208952,
|
|
||||||
"size": 8
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"offsets": {
|
"offsets": {
|
||||||
"DEMO_USA": 2640
|
"DEMO_USA": 2640
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
.include "asm/macros.inc"
|
|
||||||
.include "constants/constants.inc"
|
|
||||||
|
|
||||||
.section .rodata
|
|
||||||
.align 2
|
|
||||||
|
|
||||||
gUnk_08127270:: @ 08127270
|
|
||||||
.4byte sub_080A3084
|
|
||||||
.4byte sub_080A310C
|
|
||||||
|
|
||||||
gUnk_08127278:: @ 08127278
|
|
||||||
.incbin "playerItemFireRodProjectile/gUnk_08127278.bin"
|
|
||||||
|
|
|
@ -1567,7 +1567,7 @@ SECTIONS {
|
||||||
src/playerItemDefinitions.o(.rodata);
|
src/playerItemDefinitions.o(.rodata);
|
||||||
data/data_08125104.o(.rodata);
|
data/data_08125104.o(.rodata);
|
||||||
data/const/playerItem/playerItemShield.o(.rodata);
|
data/const/playerItem/playerItemShield.o(.rodata);
|
||||||
data/const/playerItem/playerItemFireRodProjectile.o(.rodata);
|
src/playerItem/playerItemFireRodProjectile.o(.rodata);
|
||||||
#ifdef DEMO_USA
|
#ifdef DEMO_USA
|
||||||
src/demo.o(.rodata);
|
src/demo.o(.rodata);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -15,22 +15,25 @@ typedef struct {
|
||||||
|
|
||||||
extern u8 gUnk_08003E44;
|
extern u8 gUnk_08003E44;
|
||||||
|
|
||||||
extern void (*const gUnk_08127270[])(FireRodProjectileEntity*);
|
void sub_080A3084(FireRodProjectileEntity*);
|
||||||
|
|
||||||
extern Hitbox gUnk_08127278;
|
|
||||||
void sub_080A310C(FireRodProjectileEntity*);
|
void sub_080A310C(FireRodProjectileEntity*);
|
||||||
|
|
||||||
void PlayerItemFireRodProjectile(Entity* this) {
|
void PlayerItemFireRodProjectile(Entity* this) {
|
||||||
gUnk_08127270[this->action]((FireRodProjectileEntity*)this);
|
static void (*const actionFuncs[])(FireRodProjectileEntity*) = {
|
||||||
|
sub_080A3084,
|
||||||
|
sub_080A310C,
|
||||||
|
};
|
||||||
|
actionFuncs[this->action]((FireRodProjectileEntity*)this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_080A3084(FireRodProjectileEntity* this) {
|
void sub_080A3084(FireRodProjectileEntity* this) {
|
||||||
|
static const Hitbox gUnk_08127278 = { 0, 0, { 4, 2, 2, 4 }, 6, 6 };
|
||||||
super->spriteSettings.draw = 1;
|
super->spriteSettings.draw = 1;
|
||||||
super->action = 0x01;
|
super->action = 0x01;
|
||||||
CopyPosition(super->parent, super);
|
CopyPosition(super->parent, super);
|
||||||
if (super->type == 0) {
|
if (super->type == 0) {
|
||||||
super->collisionFlags = gPlayerEntity.collisionFlags + 1;
|
super->collisionFlags = gPlayerEntity.collisionFlags + 1;
|
||||||
super->hitbox = &gUnk_08127278;
|
super->hitbox = (Hitbox*)&gUnk_08127278;
|
||||||
super->speed = 0x400;
|
super->speed = 0x400;
|
||||||
if (super->collisionLayer == 0x02) {
|
if (super->collisionLayer == 0x02) {
|
||||||
super->type2 = 0x01;
|
super->type2 = 0x01;
|
||||||
|
|
Loading…
Reference in New Issue