mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 06:21:16 +00:00
Actor prototype cleanup (#1276)
* Fix some ActorFunc prototypes * Add defaults to switches in object_kankyo
This commit is contained in:
parent
0832b5af68
commit
030594a457
4 changed files with 78 additions and 55 deletions
|
@ -27,11 +27,11 @@ void ObjectKankyo_SunGraveSpark(ObjectKankyo* this, PlayState* play);
|
|||
void ObjectKankyo_WaitForBeamObject(ObjectKankyo* this, PlayState* play);
|
||||
void ObjectKankyo_Beams(ObjectKankyo* this, PlayState* play);
|
||||
|
||||
void ObjectKankyo_DrawFairies(ObjectKankyo* this, PlayState* play);
|
||||
void ObjectKankyo_DrawSnow(ObjectKankyo* this, PlayState* play);
|
||||
void ObjectKankyo_DrawLightning(ObjectKankyo* this, PlayState* play);
|
||||
void ObjectKankyo_DrawSunGraveSpark(ObjectKankyo* this, PlayState* play);
|
||||
void ObjectKankyo_DrawBeams(ObjectKankyo* this, PlayState* play);
|
||||
void ObjectKankyo_DrawFairies(Actor* this, PlayState* play);
|
||||
void ObjectKankyo_DrawSnow(Actor* this, PlayState* play);
|
||||
void ObjectKankyo_DrawLightning(Actor* this, PlayState* play);
|
||||
void ObjectKankyo_DrawSunGraveSpark(Actor* this, PlayState* play);
|
||||
void ObjectKankyo_DrawBeams(Actor* this, PlayState* play);
|
||||
|
||||
static void* sEffLightningTextures[] = {
|
||||
gEffLightning1Tex, gEffLightning2Tex, gEffLightning3Tex, gEffLightning4Tex,
|
||||
|
@ -155,6 +155,9 @@ void ObjectKankyo_Init(Actor* thisx, PlayState* play) {
|
|||
this->requiredObjectLoaded = false;
|
||||
ObjectKankyo_SetupAction(this, ObjectKankyo_InitBeams);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -217,6 +220,9 @@ void ObjectKankyo_Fairies(ObjectKankyo* this, PlayState* play) {
|
|||
case 771:
|
||||
func_80078884(NA_SE_VO_RT_THROW);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -348,6 +354,9 @@ void ObjectKankyo_Fairies(ObjectKankyo* this, PlayState* play) {
|
|||
this->effects[i].dirPhase.y += 0.08f * Rand_ZeroOne();
|
||||
this->effects[i].dirPhase.z += 0.05f * Rand_ZeroOne();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else if (this->effects[i].state == 2) {
|
||||
// scatter when the player moves or after a long enough time
|
||||
|
@ -444,6 +453,9 @@ void ObjectKankyo_Fairies(ObjectKankyo* this, PlayState* play) {
|
|||
case 3: // reset, never reached
|
||||
this->effects[i].state = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -455,34 +467,35 @@ void ObjectKankyo_Update(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
void ObjectKankyo_Draw(Actor* thisx, PlayState* play) {
|
||||
ObjectKankyo* this = (ObjectKankyo*)thisx;
|
||||
|
||||
switch (this->actor.params) {
|
||||
switch (thisx->params) {
|
||||
case 0:
|
||||
ObjectKankyo_DrawFairies(this, play);
|
||||
ObjectKankyo_DrawFairies(thisx, play);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
ObjectKankyo_DrawLightning(this, play);
|
||||
ObjectKankyo_DrawLightning(thisx, play);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
ObjectKankyo_DrawSnow(this, play);
|
||||
ObjectKankyo_DrawSnow(thisx, play);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
ObjectKankyo_DrawSunGraveSpark(this, play);
|
||||
ObjectKankyo_DrawSunGraveSpark(thisx, play);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
ObjectKankyo_DrawBeams(this, play);
|
||||
ObjectKankyo_DrawBeams(thisx, play);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void ObjectKankyo_DrawFairies(ObjectKankyo* this2, PlayState* play2) {
|
||||
ObjectKankyo* this = this2;
|
||||
void ObjectKankyo_DrawFairies(Actor* thisx, PlayState* play2) {
|
||||
PlayState* play = play2;
|
||||
ObjectKankyo* this = (ObjectKankyo*)thisx;
|
||||
f32 alphaScale;
|
||||
Vec3f vec1 = { 0.0f, 0.0f, 0.0f };
|
||||
Vec3f vec2 = { 0.0f, 0.0f, 0.0f };
|
||||
|
@ -565,9 +578,9 @@ void ObjectKankyo_DrawFairies(ObjectKankyo* this2, PlayState* play2) {
|
|||
}
|
||||
}
|
||||
|
||||
void ObjectKankyo_DrawSnow(ObjectKankyo* this2, PlayState* play2) {
|
||||
ObjectKankyo* this = this2;
|
||||
void ObjectKankyo_DrawSnow(Actor* thisx, PlayState* play2) {
|
||||
PlayState* play = play2;
|
||||
ObjectKankyo* this = (ObjectKankyo*)thisx;
|
||||
f32 dist;
|
||||
f32 dx;
|
||||
f32 dy;
|
||||
|
@ -674,6 +687,9 @@ void ObjectKankyo_DrawSnow(ObjectKankyo* this2, PlayState* play2) {
|
|||
case 2:
|
||||
this->effects[i].state = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (1) {}
|
||||
|
@ -726,13 +742,16 @@ void ObjectKankyo_Lightning(ObjectKankyo* this, PlayState* play) {
|
|||
this->effects[0].state = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ObjectKankyo_DrawLightning(ObjectKankyo* this, PlayState* play) {
|
||||
void ObjectKankyo_DrawLightning(Actor* thisx, PlayState* play) {
|
||||
s32 pad;
|
||||
s32 pad2;
|
||||
ObjectKankyo* this = (ObjectKankyo*)thisx;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_object_kankyo.c", 1182);
|
||||
|
||||
|
@ -791,9 +810,9 @@ void ObjectKankyo_SunGraveSpark(ObjectKankyo* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
void ObjectKankyo_DrawSunGraveSpark(ObjectKankyo* this2, PlayState* play2) {
|
||||
ObjectKankyo* this = this2;
|
||||
void ObjectKankyo_DrawSunGraveSpark(Actor* thisx, PlayState* play2) {
|
||||
PlayState* play = play2;
|
||||
ObjectKankyo* this = (ObjectKankyo*)thisx;
|
||||
Vec3f start;
|
||||
Vec3f end;
|
||||
f32 weight;
|
||||
|
@ -889,7 +908,7 @@ void ObjectKankyo_Beams(ObjectKankyo* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
void ObjectKankyo_DrawBeams(ObjectKankyo* this2, PlayState* play2) {
|
||||
void ObjectKankyo_DrawBeams(Actor* thisx, PlayState* play2) {
|
||||
static Color_RGB8 sBeamPrimColors[] = {
|
||||
{ 255, 255, 170 }, { 170, 255, 255 }, { 255, 170, 255 },
|
||||
{ 255, 255, 170 }, { 255, 255, 170 }, { 255, 255, 170 },
|
||||
|
@ -897,8 +916,8 @@ void ObjectKankyo_DrawBeams(ObjectKankyo* this2, PlayState* play2) {
|
|||
static Color_RGB8 sBeamEnvColors[] = {
|
||||
{ 0, 200, 0 }, { 0, 50, 255 }, { 100, 0, 200 }, { 200, 0, 0 }, { 200, 255, 0 }, { 255, 120, 0 },
|
||||
};
|
||||
ObjectKankyo* this = this2;
|
||||
PlayState* play = play2;
|
||||
ObjectKankyo* this = (ObjectKankyo*)thisx;
|
||||
s16 i;
|
||||
f32 beamX[] = { 430.0f, 860.0f, 430.0f, -426.0f, -862.0f, -440.0f };
|
||||
f32 beamY[] = { 551.0f, 551.0f, 551.0f, 554.0f, 551.0f, 547.0f };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue