diff options
| author | Tal Hayon <talhayon1@gmail.com> | 2022-04-18 00:33:29 +0300 |
|---|---|---|
| committer | Tal Hayon <talhayon1@gmail.com> | 2022-04-18 00:33:29 +0300 |
| commit | 551c36849c528574da44d93e964fe8ded3d3307b (patch) | |
| tree | 96131d6d123a843afd6382c08b25d55e6068a057 /src/object | |
| parent | 90eac705f2871b3897a0d718c2a51b7f22b64f10 (diff) | |
Put const data in mineralWaterSource
Diffstat (limited to 'src/object')
| -rw-r--r-- | src/object/mineralWaterSource.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/object/mineralWaterSource.c b/src/object/mineralWaterSource.c index 40f40837..12f066f4 100644 --- a/src/object/mineralWaterSource.c +++ b/src/object/mineralWaterSource.c @@ -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); |
