Put const data in pinwheel

This commit is contained in:
Tal Hayon 2022-04-18 14:11:34 +03:00
parent 268ac11430
commit 868c950e50
4 changed files with 13 additions and 67 deletions

View File

@ -44107,45 +44107,6 @@
"size": 20,
"type": "animation"
},
{
"path": "pinwheel/gUnk_08125050_JP.bin",
"variants": [
"JP"
],
"starts": {
"JP": 1199380
},
"size": 12
},
{
"path": "pinwheel/gUnk_08125050_1_DEMO_JP.bin",
"variants": [
"DEMO_JP"
],
"starts": {
"DEMO_JP": 1198016
},
"size": 12
},
{
"path": "pinwheel/gUnk_08125050_2_EU.bin",
"variants": [
"EU"
],
"starts": {
"EU": 1197976
},
"size": 12
},
{
"path": "pinwheel/gUnk_08125050_3_USA-DEMO_USA.bin",
"variants": [
"USA",
"DEMO_USA"
],
"start": 1200208,
"size": 12
},
{
"offsets": {
"EU": -2248

View File

@ -1,25 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_08125050:: @ 08125050
.ifdef JP
.incbin "pinwheel/gUnk_08125050_JP.bin"
.else
.ifdef DEMO_JP
.incbin "pinwheel/gUnk_08125050_1_DEMO_JP.bin"
.else
.ifdef EU
.incbin "pinwheel/gUnk_08125050_2_EU.bin"
.else
.incbin "pinwheel/gUnk_08125050_3_USA-DEMO_USA.bin"
.endif
.endif
.endif
gUnk_0812505C:: @ 0812505C
.4byte sub_080A23DC
.4byte sub_080A2420
.4byte sub_080A243C

View File

@ -1558,7 +1558,7 @@ SECTIONS {
src/object/gyorgBossObject.o(.rodata);
data/const/object/windcrest.o(.rodata);
src/object/objectBD.o(.rodata);
data/const/object/pinwheel.o(.rodata);
src/object/pinwheel.o(.rodata);
data/animations/object/pinwheel.o(.rodata);
src/object/objectC1.o(.rodata);
src/objectDefinitions.o(.rodata);

View File

@ -3,11 +3,21 @@
#include "flags.h"
#include "object.h"
static const u16 gUnk_08125050[] = {
KUMOUE_02_AWASE_01, KUMOUE_02_AWASE_02, KUMOUE_02_AWASE_03, KUMOUE_02_AWASE_04, KUMOUE_02_AWASE_05, BEGIN_1,
};
extern u32 gUnk_020342F8;
extern u16 gUnk_08125050[];
extern void (*gUnk_0812505C[])(Entity*);
void sub_080A23DC(Entity*);
void sub_080A2420(Entity*);
void sub_080A243C(Entity*);
void Pinwheel(Entity* this) {
static void (*const gUnk_0812505C[])(Entity*) = {
sub_080A23DC,
sub_080A2420,
sub_080A243C,
};
u16 x = this->health;
if ((x & 0x7f) != 0) {
if (ReadBit(&gUnk_020342F8, x - 1) == 0) {