mirror of
https://github.com/zeldaret/tmc
synced 2026-07-03 21:10:35 -04:00
Put const data in mineralWaterSource
This commit is contained in:
@@ -1,22 +1,28 @@
|
||||
#include "object.h"
|
||||
|
||||
extern void (*MineralWaterSourceActionFuncs[])(Entity*);
|
||||
void MineralWaterSource_Init(Entity*);
|
||||
void sub_080973DC(Entity*);
|
||||
|
||||
typedef struct {
|
||||
u8 field_0x00;
|
||||
u8 field_0x01;
|
||||
u8 field_0x02;
|
||||
u8 field_0x03;
|
||||
u8 type2;
|
||||
u8 hitboxWidth;
|
||||
u8 hitboxHeight;
|
||||
u8 hurtType;
|
||||
} UnkStruct_MineralWater;
|
||||
|
||||
extern UnkStruct_MineralWater MineralWaterSourceParameters[];
|
||||
|
||||
void MineralWaterSource(Entity* this) {
|
||||
static void (*const MineralWaterSourceActionFuncs[])(Entity*) = {
|
||||
MineralWaterSource_Init,
|
||||
sub_080973DC,
|
||||
};
|
||||
MineralWaterSourceActionFuncs[this->action](this);
|
||||
}
|
||||
|
||||
void MineralWaterSource_Init(Entity* this) {
|
||||
UnkStruct_MineralWater* unknownParameters;
|
||||
static const UnkStruct_MineralWater MineralWaterSourceParameters[] = {
|
||||
{ 0x27, 0x30, 0x20, 0x4D },
|
||||
};
|
||||
const UnkStruct_MineralWater* unknownParameters;
|
||||
|
||||
if (AllocMutableHitbox(this) == NULL) {
|
||||
return;
|
||||
@@ -24,11 +30,11 @@ void MineralWaterSource_Init(Entity* this) {
|
||||
|
||||
unknownParameters = &MineralWaterSourceParameters[this->type];
|
||||
|
||||
this->type2 = unknownParameters->field_0x00;
|
||||
this->hurtType = unknownParameters->field_0x03;
|
||||
this->type2 = unknownParameters->type2;
|
||||
this->hurtType = unknownParameters->hurtType;
|
||||
|
||||
this->hitbox->width = unknownParameters->field_0x01;
|
||||
this->hitbox->height = unknownParameters->field_0x02;
|
||||
this->hitbox->width = unknownParameters->hitboxWidth;
|
||||
this->hitbox->height = unknownParameters->hitboxHeight;
|
||||
|
||||
COLLISION_ON(this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user