1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-04 06:54:33 +00:00

Rename AT effect to hitSpecialEffect (#2637)

* Rename AT `effect` to `hitSpecialEffect`

* bss
This commit is contained in:
Dragorn421 2025-06-20 10:12:45 +02:00 committed by GitHub
parent b11fdab792
commit 04a92708cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 41 additions and 30 deletions

View file

@ -80,9 +80,17 @@ typedef struct ColliderInitToActor {
/* 0x07 */ u8 shape; /* 0x07 */ u8 shape;
} ColliderInitToActor; // size = 0x08 } ColliderInitToActor; // size = 0x08
typedef enum HitSpecialEffect {
HIT_SPECIAL_EFFECT_0, // None
HIT_SPECIAL_EFFECT_1, // Fire
HIT_SPECIAL_EFFECT_2, // Ice
HIT_SPECIAL_EFFECT_3,
HIT_SPECIAL_EFFECT_4
} HitSpecialEffect;
typedef struct ColliderElementDamageInfoAT { typedef struct ColliderElementDamageInfoAT {
/* 0x00 */ u32 dmgFlags; // Damage types dealt by this collider element as AT. /* 0x00 */ u32 dmgFlags; // Damage types dealt by this collider element as AT.
/* 0x04 */ u8 effect; // Damage Effect (Knockback, Fire, etc.) /* 0x04 */ u8 hitSpecialEffect; // The hit special effect applied to any actor attacked by this AT collider.
/* 0x05 */ u8 damage; // Damage /* 0x05 */ u8 damage; // Damage
} ColliderElementDamageInfoAT; // size = 0x08 } ColliderElementDamageInfoAT; // size = 0x08
@ -471,7 +479,7 @@ typedef struct CollisionCheckInfo {
/* 0x18 */ u8 damage; // Amount to decrement health by /* 0x18 */ u8 damage; // Amount to decrement health by
/* 0x19 */ u8 damageReaction; // Stores what reaction should occur after being hit /* 0x19 */ u8 damageReaction; // Stores what reaction should occur after being hit
/* 0x1A */ u8 atHitBacklash; // Stores the hit backlash type received from attacking an AC collider /* 0x1A */ u8 atHitBacklash; // Stores the hit backlash type received from attacking an AC collider
/* 0x1B */ u8 acHitEffect; // Stores what effect should occur when AC is touched by an AT /* 0x1B */ u8 acHitSpecialEffect; // Stores the hit special effect received from being attacked by an AT collider
} CollisionCheckInfo; // size = 0x1C } CollisionCheckInfo; // size = 0x1C
DamageTable* DamageTable_Get(s32 index); DamageTable* DamageTable_Get(s32 index);

View file

@ -35,8 +35,8 @@
#include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" #include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
#include "assets/objects/object_bdoor/object_bdoor.h" #include "assets/objects/object_bdoor/object_bdoor.h"
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.0:0" \ #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0" "ntsc-1.0:0 ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0"
CollisionPoly* sCurCeilingPoly; CollisionPoly* sCurCeilingPoly;
s32 sCurCeilingBgId; s32 sCurCeilingBgId;

View file

@ -14,7 +14,7 @@
#include "player.h" #include "player.h"
#include "skin_matrix.h" #include "skin_matrix.h"
#pragma increment_block_number "ntsc-1.0:144 ntsc-1.1:144 ntsc-1.2:144" #pragma increment_block_number "ntsc-1.0:136 ntsc-1.1:136 ntsc-1.2:136"
u16 DynaSSNodeList_GetNextNodeIdx(DynaSSNodeList* nodeList); u16 DynaSSNodeList_GetNextNodeIdx(DynaSSNodeList* nodeList);
void BgCheck_GetStaticLookupIndicesFromPos(CollisionContext* colCtx, Vec3f* pos, Vec3i* sector); void BgCheck_GetStaticLookupIndicesFromPos(CollisionContext* colCtx, Vec3f* pos, Vec3i* sector);

View file

@ -3661,7 +3661,7 @@ s32 Camera_KeepOn3(Camera* camera) {
} }
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ique-cn:128 ntsc-1.0:76 ntsc-1.1:76 ntsc-1.2:76 pal-1.0:76 pal-1.1:76" "ique-cn:128 ntsc-1.0:73 ntsc-1.1:73 ntsc-1.2:73 pal-1.0:73 pal-1.1:73"
s32 Camera_KeepOn4(Camera* camera) { s32 Camera_KeepOn4(Camera* camera) {
static Vec3f sAtTarget; static Vec3f sAtTarget;

View file

@ -172,7 +172,7 @@ s32 Collider_DestroyElementDamageInfoAT(PlayState* play, ColliderElementDamageIn
s32 Collider_SetElementDamageInfoAT(PlayState* play, ColliderElementDamageInfoAT* dest, s32 Collider_SetElementDamageInfoAT(PlayState* play, ColliderElementDamageInfoAT* dest,
ColliderElementDamageInfoAT* src) { ColliderElementDamageInfoAT* src) {
dest->dmgFlags = src->dmgFlags; dest->dmgFlags = src->dmgFlags;
dest->effect = src->effect; dest->hitSpecialEffect = src->hitSpecialEffect;
dest->damage = src->damage; dest->damage = src->damage;
return true; return true;
} }
@ -1735,7 +1735,7 @@ s32 CollisionCheck_SetATvsAC(PlayState* play, Collider* atCol, ColliderElement*
acElem->acHitElem = atElem; acElem->acHitElem = atElem;
acElem->acElemFlags |= ACELEM_HIT; acElem->acElemFlags |= ACELEM_HIT;
if (acCol->actor != NULL) { if (acCol->actor != NULL) {
acCol->actor->colChkInfo.acHitEffect = atElem->atDmgInfo.effect; acCol->actor->colChkInfo.acHitSpecialEffect = atElem->atDmgInfo.hitSpecialEffect;
} }
acElem->acDmgInfo.hitPos.x = hitPos->x; acElem->acDmgInfo.hitPos.x = hitPos->x;
acElem->acDmgInfo.hitPos.y = hitPos->y; acElem->acDmgInfo.hitPos.y = hitPos->y;
@ -3016,7 +3016,7 @@ void CollisionCheck_ResetDamage(CollisionCheckInfo* info) {
info->damage = 0; info->damage = 0;
info->damageReaction = 0; info->damageReaction = 0;
info->atHitBacklash = HIT_BACKLASH_0; info->atHitBacklash = HIT_BACKLASH_0;
info->acHitEffect = 0; info->acHitSpecialEffect = HIT_SPECIAL_EFFECT_0;
info->displacement.x = info->displacement.y = info->displacement.z = 0.0f; info->displacement.x = info->displacement.y = info->displacement.z = 0.0f;
} }

View file

@ -26,7 +26,7 @@
#include "assets/textures/parameter_static/parameter_static.h" #include "assets/textures/parameter_static/parameter_static.h"
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.0:16" \ #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.0:16" \
"ntsc-1.1:16 ntsc-1.2:16 pal-1.0:0 pal-1.1:0" "ntsc-1.1:16 ntsc-1.2:16 pal-1.0:0 pal-1.1:0"
#if !PLATFORM_IQUE #if !PLATFORM_IQUE

View file

@ -29,7 +29,8 @@
#include "assets/textures/do_action_static/do_action_static.h" #include "assets/textures/do_action_static/do_action_static.h"
#include "assets/textures/icon_item_static/icon_item_static.h" #include "assets/textures/icon_item_static/icon_item_static.h"
#pragma increment_block_number "gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" #pragma increment_block_number "gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128 ntsc-1.0:128 ntsc-1.1:128" \
"ntsc-1.2:128"
typedef struct RestrictionFlags { typedef struct RestrictionFlags {
/* 0x00 */ u8 sceneId; /* 0x00 */ u8 sceneId;

View file

@ -31,7 +31,7 @@
#include "assets/objects/object_geff/object_geff.h" #include "assets/objects/object_geff/object_geff.h"
#include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/gameplay_keep/gameplay_keep.h"
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ique-cn:128" \ #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ique-cn:128" \
"ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128" "ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
#define FLAGS \ #define FLAGS \

View file

@ -39,7 +39,7 @@
#include "assets/objects/object_mo/object_mo.h" #include "assets/objects/object_mo/object_mo.h"
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"pal-1.0:128 pal-1.1:128" "ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
#define FLAGS \ #define FLAGS \
(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \

View file

@ -492,7 +492,7 @@ void BossTw_Init(Actor* thisx, PlayState* play2) {
if (this->actor.params == TW_FIRE_BLAST || this->actor.params == TW_FIRE_BLAST_GROUND) { if (this->actor.params == TW_FIRE_BLAST || this->actor.params == TW_FIRE_BLAST_GROUND) {
this->actionFunc = BossTw_BlastFire; this->actionFunc = BossTw_BlastFire;
this->collider.elem.atDmgInfo.effect = 1; this->collider.elem.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_1;
} else if (this->actor.params == TW_ICE_BLAST || this->actor.params == TW_ICE_BLAST_GROUND) { } else if (this->actor.params == TW_ICE_BLAST || this->actor.params == TW_ICE_BLAST_GROUND) {
this->actionFunc = BossTw_BlastIce; this->actionFunc = BossTw_BlastIce;
} else if (this->actor.params >= TW_DEATHBALL_KOTAKE) { } else if (this->actor.params >= TW_DEATHBALL_KOTAKE) {

View file

@ -369,7 +369,7 @@ void EnBb_Init(Actor* thisx, PlayState* play) {
thisx->naviEnemyId = NAVI_ENEMY_RED_BUBBLE; thisx->naviEnemyId = NAVI_ENEMY_RED_BUBBLE;
thisx->colChkInfo.damageTable = &sDamageTableRed; thisx->colChkInfo.damageTable = &sDamageTableRed;
this->flameEnvColor.r = 255; this->flameEnvColor.r = 255;
this->collider.elements[0].base.atDmgInfo.effect = 1; this->collider.elements[0].base.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_1;
EnBb_SetupRed(play, this); EnBb_SetupRed(play, this);
break; break;
case ENBB_WHITE: case ENBB_WHITE:

View file

@ -110,7 +110,7 @@ u32 func_809CBCBC(EnBubble* this) {
ColliderElement* elem = &this->colliderJntSph.elements[0].base; ColliderElement* elem = &this->colliderJntSph.elements[0].base;
elem->atDmgInfo.dmgFlags = DMG_EXPLOSIVE; elem->atDmgInfo.dmgFlags = DMG_EXPLOSIVE;
elem->atDmgInfo.effect = 0; elem->atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_0;
elem->atDmgInfo.damage = 4; elem->atDmgInfo.damage = 4;
elem->atElemFlags = ATELEM_ON; elem->atElemFlags = ATELEM_ON;
this->actor.velocity.y = 0.0f; this->actor.velocity.y = 0.0f;

View file

@ -786,7 +786,7 @@ void EnBw_Update(Actor* thisx, PlayState* play2) {
func_8002836C(play, &thisx->world.pos, &velocity, &accel, &sp50, &sp4C, 0x3C, 0, 0x14); func_8002836C(play, &thisx->world.pos, &velocity, &accel, &sp50, &sp4C, 0x3C, 0, 0x14);
} }
if (this->unk_248 <= 0.4f) { if (this->unk_248 <= 0.4f) {
this->collider1.elem.atDmgInfo.effect = 0; this->collider1.elem.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_0;
if (((play->gameplayFrames & 1) == 0) && (this->unk_220 < 5) && (this->unk_23C == 0)) { if (((play->gameplayFrames & 1) == 0) && (this->unk_220 < 5) && (this->unk_23C == 0)) {
accel.y = -0.1f; accel.y = -0.1f;
velocity.x = Rand_CenteredFloat(4.0f); velocity.x = Rand_CenteredFloat(4.0f);
@ -806,7 +806,7 @@ void EnBw_Update(Actor* thisx, PlayState* play2) {
20.0f - (this->unk_248 * 40.0f)); 20.0f - (this->unk_248 * 40.0f));
} }
} else { } else {
this->collider1.elem.atDmgInfo.effect = 1; this->collider1.elem.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_1;
} }
this->unk_234 = Actor_TestFloorInDirection(thisx, play, 50.0f, thisx->world.rot.y); this->unk_234 = Actor_TestFloorInDirection(thisx, play, 50.0f, thisx->world.rot.y);

View file

@ -134,7 +134,7 @@ static InitChainEntry sInitChain[] = {
void EnFirefly_Extinguish(EnFirefly* this) { void EnFirefly_Extinguish(EnFirefly* this) {
this->actor.params += 2; this->actor.params += 2;
this->collider.elements[0].base.atDmgInfo.effect = 0; // None this->collider.elements[0].base.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_0;
this->auraType = KEESE_AURA_NONE; this->auraType = KEESE_AURA_NONE;
this->onFire = false; this->onFire = false;
this->actor.naviEnemyId = NAVI_ENEMY_KEESE; this->actor.naviEnemyId = NAVI_ENEMY_KEESE;
@ -146,7 +146,7 @@ void EnFirefly_Ignite(EnFirefly* this) {
} else { } else {
this->actor.params -= 2; this->actor.params -= 2;
} }
this->collider.elements[0].base.atDmgInfo.effect = 1; // Fire this->collider.elements[0].base.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_1;
this->auraType = KEESE_AURA_FIRE; this->auraType = KEESE_AURA_FIRE;
this->onFire = true; this->onFire = true;
this->actor.naviEnemyId = NAVI_ENEMY_FIRE_KEESE; this->actor.naviEnemyId = NAVI_ENEMY_FIRE_KEESE;
@ -190,10 +190,10 @@ void EnFirefly_Init(Actor* thisx, PlayState* play) {
} }
if (this->actor.params == KEESE_ICE_FLY) { if (this->actor.params == KEESE_ICE_FLY) {
this->collider.elements[0].base.atDmgInfo.effect = 2; // Ice this->collider.elements[0].base.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_2;
this->actor.naviEnemyId = NAVI_ENEMY_ICE_KEESE; this->actor.naviEnemyId = NAVI_ENEMY_ICE_KEESE;
} else { } else {
this->collider.elements[0].base.atDmgInfo.effect = 0; // Nothing this->collider.elements[0].base.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_0;
this->actor.naviEnemyId = NAVI_ENEMY_KEESE; this->actor.naviEnemyId = NAVI_ENEMY_KEESE;
} }

View file

@ -151,7 +151,7 @@ void EnReeba_Init(Actor* thisx, PlayState* play) {
PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ リーバぼす登場 ☆☆☆☆☆ %f\n", "☆☆☆☆☆ Reeba boss appears ☆☆☆☆☆ %f\n") VT_RST, PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ リーバぼす登場 ☆☆☆☆☆ %f\n", "☆☆☆☆☆ Reeba boss appears ☆☆☆☆☆ %f\n") VT_RST,
this->scale); this->scale);
this->actor.colChkInfo.health = 20; this->actor.colChkInfo.health = 20;
this->collider.elem.atDmgInfo.effect = 4; this->collider.elem.atDmgInfo.hitSpecialEffect = HIT_SPECIAL_EFFECT_4;
this->collider.elem.atDmgInfo.damage = 16; this->collider.elem.atDmgInfo.damage = 16;
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY); Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY);
} }

View file

@ -25,6 +25,8 @@
#include "assets/objects/object_torch2/object_torch2.h" #include "assets/objects/object_torch2/object_torch2.h"
#pragma increment_block_number "ique-cn:128"
#define FLAGS \ #define FLAGS \
(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
ACTOR_FLAG_DRAW_CULLING_DISABLED) ACTOR_FLAG_DRAW_CULLING_DISABLED)

View file

@ -37,8 +37,8 @@
#include "cic6105.h" #include "cic6105.h"
#endif #endif
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.0:128" \ #pragma increment_block_number "gc-eu:224 gc-eu-mq:224 gc-jp:224 gc-jp-ce:224 gc-jp-mq:224 gc-us:224 gc-us-mq:224" \
"ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128" "ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED

View file

@ -4798,7 +4798,7 @@ void func_8083821C(Player* this) {
} }
void func_80838280(Player* this) { void func_80838280(Player* this) {
if (this->actor.colChkInfo.acHitEffect == 1) { if (this->actor.colChkInfo.acHitSpecialEffect == HIT_SPECIAL_EFFECT_1) {
func_8083821C(this); func_8083821C(this);
} }
Player_PlayVoiceSfx(this, NA_SE_VO_LI_FALL_L); Player_PlayVoiceSfx(this, NA_SE_VO_LI_FALL_L);
@ -4915,7 +4915,7 @@ s32 func_808382DC(Player* this, PlayState* play) {
} }
} }
if (sp64 && (this->shieldQuad.elem.acHitElem->atDmgInfo.effect == 1)) { if (sp64 && (this->shieldQuad.elem.acHitElem->atDmgInfo.hitSpecialEffect == HIT_SPECIAL_EFFECT_1)) {
func_8083819C(this, play); func_8083819C(this, play);
} }
@ -4938,11 +4938,11 @@ s32 func_808382DC(Player* this, PlayState* play) {
if (this->stateFlags1 & PLAYER_STATE1_27) { if (this->stateFlags1 & PLAYER_STATE1_27) {
sp4C = PLAYER_HIT_RESPONSE_NONE; sp4C = PLAYER_HIT_RESPONSE_NONE;
} else if (this->actor.colChkInfo.acHitEffect == 2) { } else if (this->actor.colChkInfo.acHitSpecialEffect == HIT_SPECIAL_EFFECT_2) {
sp4C = PLAYER_HIT_RESPONSE_ICE_TRAP; sp4C = PLAYER_HIT_RESPONSE_ICE_TRAP;
} else if (this->actor.colChkInfo.acHitEffect == 3) { } else if (this->actor.colChkInfo.acHitSpecialEffect == HIT_SPECIAL_EFFECT_3) {
sp4C = PLAYER_HIT_RESPONSE_ELECTRIC_SHOCK; sp4C = PLAYER_HIT_RESPONSE_ELECTRIC_SHOCK;
} else if (this->actor.colChkInfo.acHitEffect == 4) { } else if (this->actor.colChkInfo.acHitSpecialEffect == HIT_SPECIAL_EFFECT_4) {
sp4C = PLAYER_HIT_RESPONSE_KNOCKBACK_LARGE; sp4C = PLAYER_HIT_RESPONSE_KNOCKBACK_LARGE;
} else { } else {
func_80838280(this); func_80838280(this);