Minor Misc Cleanup (#1360)

* misc cleanup

* missed one

* EffectSsDust_UpdateFire

* revert change, needs more testing
This commit is contained in:
engineer124
2022-08-23 21:13:03 -04:00
committed by GitHub
parent c0f7f4ad26
commit 9e2aee3fa3
13 changed files with 29 additions and 29 deletions
@@ -16,7 +16,7 @@
typedef enum {
/* 0 */ FAIRY_UPGRADE_MAGIC,
/* 1 */ FAIRY_UPGRADE_DOUBLE_MAGIC,
/* 2 */ FAIRY_UPGRADE_HALF_DAMAGE
/* 2 */ FAIRY_UPGRADE_DOUBLE_DEFENSE
} BgDyYoseizoRewardType;
typedef enum {
@@ -240,8 +240,8 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, PlayState* play) {
givingReward = true;
}
break;
case FAIRY_UPGRADE_HALF_DAMAGE:
if (!gSaveContext.doubleDefense) {
case FAIRY_UPGRADE_DOUBLE_DEFENSE:
if (!gSaveContext.isDoubleDefenseAcquired) {
// "Damage halved"
osSyncPrintf(VT_FGCOL(MAGENTA) " ☆☆☆☆☆ ダメージ半減 ☆☆☆☆☆ \n" VT_RST);
this->givingSpell = true;
@@ -278,8 +278,8 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, PlayState* play) {
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gGreatFairyDoubleMagicCs);
gSaveContext.cutsceneTrigger = 1;
break;
case FAIRY_UPGRADE_HALF_DAMAGE:
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gGreatFairyDoubleDefenceCs);
case FAIRY_UPGRADE_DOUBLE_DEFENSE:
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gGreatFairyDoubleDefenseCs);
gSaveContext.cutsceneTrigger = 1;
break;
}
@@ -724,8 +724,8 @@ void BgDyYoseizo_Give_Reward(BgDyYoseizo* this, PlayState* play) {
gSaveContext.magicLevel = 0;
Interface_ChangeAlpha(9);
break;
case FAIRY_UPGRADE_HALF_DAMAGE:
gSaveContext.doubleDefense = true;
case FAIRY_UPGRADE_DOUBLE_DEFENSE:
gSaveContext.isDoubleDefenseAcquired = true;
Interface_ChangeAlpha(9);
break;
}
@@ -51,7 +51,7 @@ u32 EffectSsBlast_Init(PlayState* play, u32 index, EffectSs* this, void* initPar
this->rAlphaTarget = initParams->primColor.a / initParams->life;
this->rScale = initParams->scale;
this->rScaleStep = initParams->scaleStep;
this->rScaleStepDecay = initParams->sclaeStepDecay;
this->rScaleStepDecay = initParams->scaleStepDecay;
return 1;
}
@@ -12,7 +12,7 @@ typedef struct {
/* 0x28 */ Color_RGBA8 envColor;
/* 0x2C */ s16 scale;
/* 0x2E */ s16 scaleStep;
/* 0x30 */ s16 sclaeStepDecay;
/* 0x30 */ s16 scaleStepDecay;
/* 0x32 */ s16 life;
} EffectSsBlastParams; // size = 0x34
@@ -23,7 +23,7 @@
u32 EffectSsDust_Init(PlayState* play, u32 index, EffectSs* this, void* initParamsx);
void EffectSsDust_Update(PlayState* play, u32 index, EffectSs* this);
void EffectSsBlast_UpdateFire(PlayState* play, u32 index, EffectSs* this);
void EffectSsDust_UpdateFire(PlayState* play, u32 index, EffectSs* this);
void EffectSsDust_Draw(PlayState* play, u32 index, EffectSs* this);
EffectSsInit Effect_Ss_Dust_InitVars = {
@@ -33,7 +33,7 @@ EffectSsInit Effect_Ss_Dust_InitVars = {
static EffectSsUpdateFunc sUpdateFuncs[] = {
EffectSsDust_Update,
EffectSsBlast_UpdateFire,
EffectSsDust_UpdateFire,
};
u32 EffectSsDust_Init(PlayState* play, u32 index, EffectSs* this, void* initParamsx) {
@@ -146,7 +146,7 @@ void EffectSsDust_Update(PlayState* play, u32 index, EffectSs* this) {
}
// this update mode is unused in the original game
void EffectSsBlast_UpdateFire(PlayState* play, u32 index, EffectSs* this) {
void EffectSsDust_UpdateFire(PlayState* play, u32 index, EffectSs* this) {
this->accel.x = (Rand_ZeroOne() * 0.4f) - 0.2f;
this->accel.z = (Rand_ZeroOne() * 0.4f) - 0.2f;