Put const data in bigVortex

This commit is contained in:
Tal Hayon
2022-04-18 00:39:22 +03:00
parent 589d80bc74
commit 9557443a85
4 changed files with 18 additions and 29 deletions
-5
View File
@@ -43653,11 +43653,6 @@
"size": 18,
"type": "animation"
},
{
"path": "bigVortex/gUnk_08123690.bin",
"start": 1193616,
"size": 8
},
{
"path": "animations/gSpriteAnimations_BigPushableLever_0.bin",
"start": 1193724,
-16
View File
@@ -1,16 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_0812367C:: @ 0812367C
.4byte sub_08098D1C
.4byte sub_08098D6C
.4byte sub_08098D9C
.4byte sub_08098DC4
.4byte sub_08098E34
gUnk_08123690:: @ 08123690
.incbin "bigVortex/gUnk_08123690.bin"
+1 -1
View File
@@ -1487,7 +1487,7 @@ SECTIONS {
data/animations/object/picoBloom.o(.rodata);
src/object/board.o(.rodata);
src/object/object81.o(.rodata);
data/const/object/bigVortex.o(.rodata);
src/object/bigVortex.o(.rodata);
data/animations/object/bigVortex.o(.rodata);
src/object/bigPushableLever.o(.rodata);
data/animations/object/bigPushableLever.o(.rodata);
+17 -7
View File
@@ -4,14 +4,18 @@
#include "object.h"
#include "functions.h"
extern void sub_08098E3C(Entity*);
extern void sub_08098E88(Entity*);
extern void (*const gUnk_0812367C[])(Entity*);
extern u16 gUnk_08123690[];
void sub_08098E3C(Entity*);
void sub_08098E88(Entity*);
void sub_08098D1C(Entity*);
void sub_08098D6C(Entity*);
void sub_08098D9C(Entity*);
void sub_08098DC4(Entity*);
void sub_08098E34(Entity*);
void BigVortex(Entity* this) {
static void (*const gUnk_0812367C[])(Entity*) = {
sub_08098D1C, sub_08098D6C, sub_08098D9C, sub_08098DC4, sub_08098E34,
};
if (this->type == 0) {
gUnk_0812367C[this->action](this);
} else {
@@ -83,7 +87,13 @@ void sub_08098E34(Entity* this) {
}
void sub_08098E3C(Entity* this) {
u16* temp;
static const u16 gUnk_08123690[] = {
0x1c0,
0x160,
0x300,
0x200,
};
const u16* temp;
if (this->action == 0) {
this->action = 1;