mirror of
https://github.com/zeldaret/oot.git
synced 2025-02-09 05:44:26 +00:00
format
Signed-off-by: angie <angheloalf95@gmail.com>
This commit is contained in:
parent
ee8bf86091
commit
777a710570
1 changed files with 374 additions and 455 deletions
|
@ -28,7 +28,6 @@ extern CollisionHeader D_060033E0;
|
|||
extern Gfx D_06003710;
|
||||
extern CollisionHeader D_06003AF0;
|
||||
|
||||
|
||||
// sCylinderInit
|
||||
static ColliderCylinderInitType1 sCylinderInit1 = {
|
||||
{
|
||||
|
@ -88,57 +87,32 @@ static ColliderCylinderInitType1 sCylinderInit3 = {
|
|||
};
|
||||
|
||||
// velocity
|
||||
static Vec3f sVelocity = {
|
||||
0.0f, 6.0f, 0.0f
|
||||
};
|
||||
static Vec3f sVelocity = { 0.0f, 6.0f, 0.0f };
|
||||
|
||||
// accel
|
||||
static Vec3f sAccel = {
|
||||
0.0f, 0.0f, 0.0f
|
||||
};
|
||||
static Vec3f sAccel = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
// primColor
|
||||
static Color_RGBA8 sPrimColor = {
|
||||
0, 0, 0, 0
|
||||
};
|
||||
static Color_RGBA8 sPrimColor = { 0, 0, 0, 0 };
|
||||
|
||||
// envColor
|
||||
static Color_RGBA8 sEnvColor = {
|
||||
0, 0, 0, 0
|
||||
};
|
||||
|
||||
static Color_RGBA8 sEnvColor = { 0, 0, 0, 0 };
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
static Vec3f D_8097BE88 = { -371.0f, 1188.0f, -303.0f };
|
||||
|
||||
static Vec3f D_8097BE88 = {
|
||||
-371.0f, 1188.0f, -303.0f
|
||||
};
|
||||
static Vec3f D_8097BE94 = { -119.0f, 1056.0f, -147.0f };
|
||||
|
||||
static Vec3f D_8097BE94 = {
|
||||
-119.0f, 1056.0f, -147.0f
|
||||
};
|
||||
static Vec3f D_8097BEA0 = { -6.0f, 1053.0f, -473.0f };
|
||||
|
||||
static Vec3f D_8097BEA0 = {
|
||||
-6.0f, 1053.0f, -473.0f
|
||||
};
|
||||
|
||||
|
||||
static Vec3f D_8097BEAC = {
|
||||
0.0f, 0.0f, 0.0f
|
||||
};
|
||||
|
||||
static Vec3f D_8097BEB8 = {
|
||||
0.0f, 0.0f, 0.0f
|
||||
};
|
||||
|
||||
static Vec3f D_8097BEC4 = {
|
||||
0.0f, 0.0f, 0.0f
|
||||
};
|
||||
static Vec3f D_8097BEAC = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
static Vec3f D_8097BEB8 = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
static Vec3f D_8097BEC4 = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
typedef void (*DemoGjActionFunc)(DemoGj*, GlobalContext*);
|
||||
|
||||
|
@ -165,30 +139,12 @@ void DemoGj_Update19(DemoGj* this, GlobalContext* globalCtx);
|
|||
void DemoGj_Update20(DemoGj* this, GlobalContext* globalCtx);
|
||||
|
||||
static DemoGjActionFunc sUpdateFuncs[] = {
|
||||
DemoGj_Update0,
|
||||
DemoGj_Update1,
|
||||
DemoGj_Update2,
|
||||
DemoGj_Update3,
|
||||
DemoGj_Update4,
|
||||
DemoGj_Update5,
|
||||
DemoGj_Update6,
|
||||
DemoGj_Update7,
|
||||
DemoGj_Update8,
|
||||
DemoGj_Update9,
|
||||
DemoGj_Update10,
|
||||
DemoGj_Update11,
|
||||
DemoGj_Update12,
|
||||
DemoGj_Update13,
|
||||
DemoGj_Update14,
|
||||
DemoGj_Update15,
|
||||
DemoGj_Update16,
|
||||
DemoGj_Update17,
|
||||
DemoGj_Update18,
|
||||
DemoGj_Update19,
|
||||
DemoGj_Update20,
|
||||
DemoGj_Update0, DemoGj_Update1, DemoGj_Update2, DemoGj_Update3, DemoGj_Update4, DemoGj_Update5,
|
||||
DemoGj_Update6, DemoGj_Update7, DemoGj_Update8, DemoGj_Update9, DemoGj_Update10, DemoGj_Update11,
|
||||
DemoGj_Update12, DemoGj_Update13, DemoGj_Update14, DemoGj_Update15, DemoGj_Update16, DemoGj_Update17,
|
||||
DemoGj_Update18, DemoGj_Update19, DemoGj_Update20,
|
||||
};
|
||||
|
||||
|
||||
void DemoGj_Draw0(DemoGj* this, GlobalContext* globalCtx);
|
||||
void DemoGj_Draw1(DemoGj* this, GlobalContext* globalCtx);
|
||||
void DemoGj_Draw2(DemoGj* this, GlobalContext* globalCtx);
|
||||
|
@ -209,31 +165,12 @@ void DemoGj_Draw16(DemoGj* this, GlobalContext* globalCtx);
|
|||
void DemoGj_Draw17(DemoGj* this, GlobalContext* globalCtx);
|
||||
void DemoGj_Draw18(DemoGj* this, GlobalContext* globalCtx);
|
||||
|
||||
|
||||
static DemoGjActionFunc sDrawFuncs[] = {
|
||||
DemoGj_Draw0,
|
||||
DemoGj_Draw1,
|
||||
DemoGj_Draw2,
|
||||
DemoGj_Draw3,
|
||||
DemoGj_Draw4,
|
||||
DemoGj_Draw5,
|
||||
DemoGj_Draw6,
|
||||
DemoGj_Draw7,
|
||||
DemoGj_Draw8,
|
||||
DemoGj_Draw9,
|
||||
DemoGj_Draw10,
|
||||
DemoGj_Draw11,
|
||||
DemoGj_Draw12,
|
||||
DemoGj_Draw13,
|
||||
DemoGj_Draw14,
|
||||
DemoGj_Draw15,
|
||||
DemoGj_Draw16,
|
||||
DemoGj_Draw17,
|
||||
DemoGj_Draw18,
|
||||
DemoGj_Draw0, DemoGj_Draw1, DemoGj_Draw2, DemoGj_Draw3, DemoGj_Draw4, DemoGj_Draw5, DemoGj_Draw6,
|
||||
DemoGj_Draw7, DemoGj_Draw8, DemoGj_Draw9, DemoGj_Draw10, DemoGj_Draw11, DemoGj_Draw12, DemoGj_Draw13,
|
||||
DemoGj_Draw14, DemoGj_Draw15, DemoGj_Draw16, DemoGj_Draw17, DemoGj_Draw18,
|
||||
};
|
||||
|
||||
|
||||
|
||||
const ActorInit Demo_Gj_InitVars = {
|
||||
ACTOR_DEMO_GJ,
|
||||
ACTORCAT_PROP,
|
||||
|
@ -246,7 +183,6 @@ const ActorInit Demo_Gj_InitVars = {
|
|||
(ActorFunc)DemoGj_Draw,
|
||||
};
|
||||
|
||||
|
||||
// bits 11-15
|
||||
s32 DemoGj_GetCollectibleType(DemoGj* this) {
|
||||
s32 params = this->dyna.actor.params >> 0xB;
|
||||
|
@ -265,7 +201,8 @@ s32 DemoGj_GetType(DemoGj *this) {
|
|||
return params & 0xFF;
|
||||
}
|
||||
|
||||
void DemoGj_Cylinder_Init(DemoGj* this, GlobalContext* globalCtx, ColliderCylinder* cylinder, ColliderCylinderInitType1* cylinderInit) {
|
||||
void DemoGj_Cylinder_Init(DemoGj* this, GlobalContext* globalCtx, ColliderCylinder* cylinder,
|
||||
ColliderCylinderInitType1* cylinderInit) {
|
||||
Collider_InitCylinder(globalCtx, cylinder);
|
||||
Collider_SetCylinderType1(globalCtx, cylinder, &this->dyna.actor, cylinderInit);
|
||||
}
|
||||
|
@ -312,19 +249,11 @@ void DemoGj_PlayExplosionSfx(DemoGj* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80978AFC(GlobalContext* globalCtx, Vec3f* pos, f32 arg2) {
|
||||
f32 temp = arg2 * 0.2f;
|
||||
if (1)
|
||||
if (1) {
|
||||
// this function just calls EffectSsDust_Spawn() with drawflags=1 and updateMode=0
|
||||
func_800283D4(
|
||||
globalCtx,
|
||||
pos,
|
||||
&sVelocity,
|
||||
&sAccel,
|
||||
&sPrimColor,
|
||||
&sEnvColor,
|
||||
temp * Rand_ZeroOne() + arg2,
|
||||
0xF,
|
||||
0x5A
|
||||
);
|
||||
func_800283D4(globalCtx, pos, &sVelocity, &sAccel, &sPrimColor, &sEnvColor, temp * Rand_ZeroOne() + arg2, 0xF,
|
||||
0x5A);
|
||||
}
|
||||
}
|
||||
|
||||
void DemoGj_DropCollectible(DemoGj* this, GlobalContext* globalCtx) {
|
||||
|
@ -372,28 +301,13 @@ void func_80978C20(DemoGj *this, GlobalContext *globalCtx, Vec3f *arg2, Vec3f *a
|
|||
phi_s0 = 0x61;
|
||||
} else if (aux < 0.7f) {
|
||||
phi_s0 = 0x41;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
phi_s0 = 0x21;
|
||||
}
|
||||
|
||||
EffectSsKakera_Spawn(
|
||||
globalCtx,
|
||||
&pos,
|
||||
&velocity,
|
||||
arg2,
|
||||
-0xC8,
|
||||
phi_s0,
|
||||
0xA,
|
||||
0xA,
|
||||
0,
|
||||
Rand_ZeroOne() * 20.0f + 20.0f,
|
||||
0x14,
|
||||
0x12C,
|
||||
(s32) (Rand_ZeroOne() * 30.0f) + 0x1E,
|
||||
-1,
|
||||
0x186,
|
||||
&D_06000EA0);
|
||||
EffectSsKakera_Spawn(globalCtx, &pos, &velocity, arg2, -0xC8, phi_s0, 0xA, 0xA, 0,
|
||||
Rand_ZeroOne() * 20.0f + 20.0f, 0x14, 0x12C, (s32)(Rand_ZeroOne() * 30.0f) + 0x1E, -1,
|
||||
0x186, &D_06000EA0);
|
||||
|
||||
theta += 0x2AAA;
|
||||
}
|
||||
|
@ -447,7 +361,8 @@ void DemoGj_InitCommon(DemoGj* this, GlobalContext* globalCtx, CollisionHeader *
|
|||
}
|
||||
}
|
||||
|
||||
s32 DemoGj_InitSetIndexes(DemoGj* this, GlobalContext* globalCtx, s32 updateIndex, s32 drawIndex, CollisionHeader* header) {
|
||||
s32 DemoGj_InitSetIndexes(DemoGj* this, GlobalContext* globalCtx, s32 updateIndex, s32 drawIndex,
|
||||
CollisionHeader* header) {
|
||||
if (!DemoGj_IsSceneInvalid()) {
|
||||
this->updateIndex = updateIndex;
|
||||
this->drawIndex = drawIndex;
|
||||
|
@ -465,7 +380,8 @@ void DemoGj_DrawCommon(DemoGj* this, GlobalContext* globalCtx, Gfx* displayList)
|
|||
|
||||
func_80093D18(gfxCtx);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gfxCtx, "../z_demo_gj.c", 1165), G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gfxCtx, "../z_demo_gj.c", 1165),
|
||||
G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, displayList);
|
||||
gSPPopMatrix(POLY_OPA_DISP++, G_MTX_MODELVIEW);
|
||||
|
@ -584,7 +500,8 @@ void DemoGj_Reflect(DemoGj *this, GlobalContext *globalCtx) {
|
|||
|
||||
default:
|
||||
// Demo_Gj_common_Reflect : This arg_data is not supported = %d
|
||||
osSyncPrintf(VT_FGCOL(RED) "Demo_Gj_common_Reflect : そんなarg_dataには対応していない = %d\n" VT_RST, this->dyna.actor.params);
|
||||
osSyncPrintf(VT_FGCOL(RED) "Demo_Gj_common_Reflect : そんなarg_dataには対応していない = %d\n" VT_RST,
|
||||
this->dyna.actor.params);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -719,7 +636,8 @@ void DemoGj_SetupMovement(DemoGj *this, GlobalContext *globalCtx) {
|
|||
|
||||
default:
|
||||
// Demo_Gj_Setup_Move_common : This arg_data is not supported = %d
|
||||
osSyncPrintf(VT_FGCOL(RED) "Demo_Gj_Setup_Move_common : そんなarg_dataには対応していない = %d\n" VT_RST, actor->params);
|
||||
osSyncPrintf(VT_FGCOL(RED) "Demo_Gj_Setup_Move_common : そんなarg_dataには対応していない = %d\n" VT_RST,
|
||||
actor->params);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1539,7 +1457,8 @@ void DemoGj_Init(Actor *thisx, GlobalContext *globalCtx) {
|
|||
|
||||
default:
|
||||
// Demo_Gj_Actor_ct There is no such argument!!!!!!!!!!!!!!!!!!!!!!
|
||||
osSyncPrintf(VT_FGCOL(RED) "Demo_Gj_Actor_ct そんな引数は無い!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST, globalCtx, this);
|
||||
osSyncPrintf(VT_FGCOL(RED) "Demo_Gj_Actor_ct そんな引数は無い!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST, globalCtx,
|
||||
this);
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue