mirror of
https://github.com/zeldaret/mm.git
synced 2025-02-21 14:00:48 +00:00
parent
3086543498
commit
2d6a74c0aa
@ -31,7 +31,7 @@
|
||||
<TextureAnimation Name="object_mtoride_Matanimheader_00AA50" Offset="0xAA50" />
|
||||
<DList Name="object_mtoride_DL_00AF90" Offset="0xAF90" />
|
||||
<DList Name="object_mtoride_DL_00AF98" Offset="0xAF98" />
|
||||
<!-- <Blob Name="object_mtoride_Blob_00B1A0" Size="0x10" Offset="0xB1A0" /> -->
|
||||
<TextureAnimation Name="object_mtoride_Matanimheader_00B1A0" Offset="0xB1A0" />
|
||||
<DList Name="object_mtoride_DL_00DE50" Offset="0xDE50" />
|
||||
<DList Name="object_mtoride_DL_00DF18" Offset="0xDF18" />
|
||||
<DList Name="object_mtoride_DL_00F3C0" Offset="0xF3C0" />
|
||||
@ -40,7 +40,7 @@
|
||||
<DList Name="object_mtoride_DL_00FAE0" Offset="0xFAE0" />
|
||||
<DList Name="object_mtoride_DL_00FAE8" Offset="0xFAE8" />
|
||||
<Collision Name="object_mtoride_Colheader_00FE5C" Offset="0xFE5C" />
|
||||
<!-- <Blob Name="object_mtoride_Blob_00FE90" Size="0x10" Offset="0xFE90" /> -->
|
||||
<TextureAnimation Name="object_mtoride_Matanimheader_00FE90" Offset="0xFE90" />
|
||||
<Collision Name="object_mtoride_Colheader_010C3C" Offset="0x10C3C" />
|
||||
<DList Name="object_mtoride_DL_010EF0" Offset="0x10EF0" />
|
||||
<DList Name="object_mtoride_DL_010FD8" Offset="0x10FD8" />
|
||||
|
7
assets/xml/overlays/ovl_Dm_Char01.xml
Normal file
7
assets/xml/overlays/ovl_Dm_Char01.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<Root>
|
||||
<File Name="ovl_Dm_Char01" BaseAddress="0x80AA81E0" RangeStart="0x1BE0" RangeEnd="0x28B0">
|
||||
<Array Name="ovl_dm_char01_Vtx_1BE0" Count="205" Offset="0x1BE0">
|
||||
<Vtx/>
|
||||
</Array>
|
||||
</File>
|
||||
</Root>
|
4
spec
4
spec
@ -3267,9 +3267,7 @@ beginseg
|
||||
name "ovl_Dm_Char01"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Dm_Char01/z_dm_char01.o"
|
||||
include "build/data/ovl_Dm_Char01/ovl_Dm_Char01.data.o"
|
||||
include "build/data/ovl_Dm_Char01/ovl_Dm_Char01.bss.o"
|
||||
include "build/data/ovl_Dm_Char01/ovl_Dm_Char01.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_Dm_Char01/ovl_Dm_Char01_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
@ -5,8 +5,9 @@
|
||||
*/
|
||||
|
||||
#include "z_dm_char01.h"
|
||||
#include "objects/object_mtoride/object_mtoride.h"
|
||||
|
||||
#define FLAGS 0x02000030
|
||||
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_2000000)
|
||||
|
||||
#define THIS ((DmChar01*)thisx)
|
||||
|
||||
@ -15,7 +16,24 @@ void DmChar01_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void DmChar01_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void DmChar01_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
#if 0
|
||||
void func_80AA8698(DmChar01* this, GlobalContext* globalCtx);
|
||||
void func_80AA884C(DmChar01* this, GlobalContext* globalCtx);
|
||||
void func_80AA88A8(DmChar01* this, GlobalContext* globalCtx);
|
||||
void func_80AA892C(DmChar01* this, GlobalContext* globalCtx);
|
||||
void func_80AA8C28(DmChar01* this, GlobalContext* globalCtx);
|
||||
void func_80AA8F1C(DmChar01* this, GlobalContext* globalCtx);
|
||||
void func_80AA8F2C(DmChar01* this, GlobalContext* globalCtx);
|
||||
void func_80AA9020(DmChar01* this, GlobalContext* globalCtx);
|
||||
void func_80AA90AC(DmChar01* this, GlobalContext* globalCtx);
|
||||
void func_80AA90F4(DmChar01* this, GlobalContext* globalCtx);
|
||||
|
||||
s16 D_80AAAE20;
|
||||
s16 D_80AAAE22;
|
||||
s16 D_80AAAE24;
|
||||
s16 D_80AAAE26;
|
||||
|
||||
#include "overlays/ovl_Dm_Char01/ovl_Dm_Char01.c"
|
||||
|
||||
const ActorInit Dm_Char01_InitVars = {
|
||||
ACTOR_DM_CHAR01,
|
||||
ACTORCAT_ITEMACTION,
|
||||
@ -28,44 +46,500 @@ const ActorInit Dm_Char01_InitVars = {
|
||||
(ActorFunc)DmChar01_Draw,
|
||||
};
|
||||
|
||||
// static InitChainEntry sInitChain[] = {
|
||||
static InitChainEntry D_80AAAAB0[] = {
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_F32(uncullZoneScale, 300, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
#endif
|
||||
s16 D_80AAAAB4 = false;
|
||||
|
||||
extern InitChainEntry D_80AAAAB0[];
|
||||
void DmChar01_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
DmChar01* this = THIS;
|
||||
s32 i;
|
||||
|
||||
extern UNK_TYPE D_06009E4C;
|
||||
extern UNK_TYPE D_0600AA50;
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
Actor_SetScale(&this->dyna.actor, 1.0f);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char01/DmChar01_Init.s")
|
||||
this->unk_346 = 0;
|
||||
this->unk_34D = false;
|
||||
D_80AAAE24 = 0;
|
||||
D_80AAAE26 = 0;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char01/DmChar01_Destroy.s")
|
||||
switch (DMCHAR01_GET(&this->dyna.actor)) {
|
||||
case DMCHAR01_0:
|
||||
if (gSaveContext.weekEventReg[20] & 2) {
|
||||
this->unk_34C = 2;
|
||||
this->actionFunc = func_80AA8F1C;
|
||||
break;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char01/func_80AA8698.s")
|
||||
if (gSaveContext.sceneSetupIndex == 0) {
|
||||
globalCtx->envCtx.unk_1F = 5;
|
||||
globalCtx->envCtx.unk_20 = 5;
|
||||
}
|
||||
this->unk_348 = 255.0f;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char01/func_80AA884C.s")
|
||||
for (i = 0; i < ARRAY_COUNT(this->unk_1AC); i++) {
|
||||
this->unk_1AC[i] = ovl_dm_char01_Vtx_1BE0[i].v.ob[1] * 409.6f;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char01/func_80AA88A8.s")
|
||||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &object_mtoride_Colheader_009E4C);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char01/func_80AA892C.s")
|
||||
this->unk_34D = true;
|
||||
if (gSaveContext.sceneSetupIndex == 1) {
|
||||
this->unk_34C = 1;
|
||||
this->actionFunc = func_80AA8C28;
|
||||
} else {
|
||||
this->unk_34C = 0;
|
||||
this->actionFunc = func_80AA892C;
|
||||
}
|
||||
break;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char01/func_80AA8C28.s")
|
||||
case DMCHAR01_1:
|
||||
if ((gSaveContext.weekEventReg[20] & 2) || (gSaveContext.sceneSetupIndex == 1)) {
|
||||
this->unk_34C = 1;
|
||||
this->actionFunc = func_80AA8F1C;
|
||||
} else {
|
||||
this->actionFunc = func_80AA8698;
|
||||
}
|
||||
break;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char01/func_80AA8F0C.s")
|
||||
case DMCHAR01_2:
|
||||
this->unk_34C = 0;
|
||||
if (!(gSaveContext.weekEventReg[20] & 1)) {
|
||||
this->unk_34C = 1;
|
||||
this->dyna.actor.world.pos.y -= 400.0f;
|
||||
}
|
||||
this->dyna.actor.world.rot.y += 0x8000;
|
||||
this->dyna.actor.shape.rot.y += 0x8000;
|
||||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &object_mtoride_Colheader_010C3C);
|
||||
this->unk_34D = true;
|
||||
this->unk_348 = 200.0f;
|
||||
this->actionFunc = func_80AA8F2C;
|
||||
break;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char01/func_80AA8F1C.s")
|
||||
case DMCHAR01_3:
|
||||
this->dyna.actor.world.rot.y += 0x8000;
|
||||
this->dyna.actor.shape.rot.y += 0x8000;
|
||||
if (!(gSaveContext.weekEventReg[20] & 1)) {
|
||||
Actor_MarkForDeath(&this->dyna.actor);
|
||||
return;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char01/func_80AA8F2C.s")
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_OBJ_ETCETERA, 5.0f, 202.0f, 294.0f, 0, 0, 0, 0x80);
|
||||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &object_mtoride_Colheader_00FE5C);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char01/func_80AA9020.s")
|
||||
this->unk_34D = true;
|
||||
if (!(gSaveContext.weekEventReg[20] & 2)) {
|
||||
this->actionFunc = func_80AA9020;
|
||||
this->dyna.actor.world.pos.y -= 120.0f;
|
||||
} else {
|
||||
this->actionFunc = func_80AA8F1C;
|
||||
}
|
||||
break;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char01/func_80AA90AC.s")
|
||||
default:
|
||||
this->actionFunc = func_80AA88A8;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char01/func_80AA90F4.s")
|
||||
void DmChar01_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
DmChar01* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char01/DmChar01_Update.s")
|
||||
if (this->unk_34D) {
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char01/DmChar01_Draw.s")
|
||||
void func_80AA8698(DmChar01* this, GlobalContext* globalCtx) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
Player* player2 = GET_PLAYER(globalCtx);
|
||||
|
||||
if (gSaveContext.weekEventReg[20] & 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((player->stateFlags2 & 0x8000000) && (player2->actor.world.pos.x > -40.0f) &&
|
||||
(player2->actor.world.pos.x < 40.0f) && (player2->actor.world.pos.z > 1000.0f) &&
|
||||
(player2->actor.world.pos.z < 1078.0f)) {
|
||||
if (!D_80AAAAB4) {
|
||||
play_sound(NA_SE_SY_TRE_BOX_APPEAR);
|
||||
D_80AAAAB4 = true;
|
||||
}
|
||||
} else {
|
||||
D_80AAAAB4 = false;
|
||||
}
|
||||
|
||||
if ((player->transformation == PLAYER_FORM_DEKU) && (globalCtx->msgCtx.ocarinaMode == 3) &&
|
||||
(globalCtx->msgCtx.unk1202E == 0)) {
|
||||
|
||||
if ((player2->actor.world.pos.x > -40.0f) && (player2->actor.world.pos.x < 40.0f) &&
|
||||
(player2->actor.world.pos.z > 1000.0f) && (player2->actor.world.pos.z < 1078.0f)) {
|
||||
gSaveContext.weekEventReg[20] |= 1;
|
||||
this->actionFunc = func_80AA884C;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AA884C(DmChar01* this, GlobalContext* globalCtx) {
|
||||
s16 sp1E = this->dyna.actor.cutscene;
|
||||
|
||||
if (ActorCutscene_GetCanPlayNext(sp1E)) {
|
||||
ActorCutscene_Start(sp1E, &this->dyna.actor);
|
||||
this->actionFunc = func_80AA88A8;
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(sp1E);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AA88A8(DmChar01* this, GlobalContext* globalCtx) {
|
||||
if (func_800EE29C(globalCtx, 0x87)) {
|
||||
if (globalCtx->csCtx.frames == globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x87)]->startFrame) {
|
||||
D_80AAAE24 = 1;
|
||||
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_FORT_RISING);
|
||||
}
|
||||
} else {
|
||||
D_80AAAE24 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AA892C(DmChar01* this, GlobalContext* globalCtx) {
|
||||
f32 temp_f18;
|
||||
s32 temp_v0_4;
|
||||
s32 i;
|
||||
|
||||
switch (this->unk_346) {
|
||||
case 0:
|
||||
D_80AAAE22 = -2200;
|
||||
D_80AAAE20 = 380;
|
||||
this->unk_346++;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
if (D_80AAAE24 != 0) {
|
||||
this->unk_34C = 1;
|
||||
if (D_80AAAE22 > -2000) {
|
||||
D_80AAAE26 = 1;
|
||||
}
|
||||
|
||||
D_80AAAE22 += 40;
|
||||
if (D_80AAAE22 > 3400) {
|
||||
if (D_80AAAE20 > 100) {
|
||||
D_80AAAE20 -= 230;
|
||||
}
|
||||
this->unk_346++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
D_80AAAE22 -= 40;
|
||||
if (D_80AAAE22 <= -2200) {
|
||||
if (D_80AAAE20 > 100) {
|
||||
D_80AAAE20 -= 70;
|
||||
}
|
||||
this->unk_346--;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (D_80AAAE24 == 0) {
|
||||
this->unk_34C = 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(ovl_dm_char01_Vtx_1BE0); i++) {
|
||||
s32 temp_s2 = sqrtf(SQ((f32)ovl_dm_char01_Vtx_1BE0[i].v.ob[2]) + SQ((f32)ovl_dm_char01_Vtx_1BE0[i].v.ob[0]));
|
||||
f32 cos = Math_CosS((temp_s2 / 1892.0f) * 0x4000);
|
||||
f32 temp_f20 = (1.0f - (ABS_ALT(temp_s2 - D_80AAAE22) / 1892.0f)) * D_80AAAE20 * cos;
|
||||
|
||||
if (temp_f20 < 0.0f) {
|
||||
temp_f20 = 0.0f;
|
||||
}
|
||||
|
||||
temp_f18 = Math_SinS(this->unk_1AC[i]) * 15.0f;
|
||||
temp_f20 += temp_f18;
|
||||
|
||||
this->unk_1AC[i] += 1600;
|
||||
ovl_dm_char01_Vtx_1BE0[i].v.ob[1] = temp_f20;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AA8C28(DmChar01* this, GlobalContext* globalCtx) {
|
||||
f32 temp_f18;
|
||||
s32 temp_v0_4;
|
||||
s32 i;
|
||||
|
||||
switch (this->unk_346) {
|
||||
case 0:
|
||||
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_WATER_PURIFICATION);
|
||||
D_80AAAE22 = -2200;
|
||||
D_80AAAE20 = 100;
|
||||
this->unk_346++;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
D_80AAAE22 += 40;
|
||||
if (D_80AAAE22 > 3400) {
|
||||
this->unk_346++;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
D_80AAAE22 -= 40;
|
||||
if (D_80AAAE22 <= -2200) {
|
||||
this->unk_346--;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(ovl_dm_char01_Vtx_1BE0); i++) {
|
||||
s32 temp_s2 = sqrtf(SQ((f32)ovl_dm_char01_Vtx_1BE0[i].v.ob[2]) + SQ((f32)ovl_dm_char01_Vtx_1BE0[i].v.ob[0]));
|
||||
f32 cos = Math_CosS((temp_s2 / 1892.0f) * 0x4000);
|
||||
f32 temp_f20 = (1.0f - (ABS_ALT(temp_s2 - D_80AAAE22) / 1892.0f)) * D_80AAAE20 * cos;
|
||||
|
||||
if (temp_f20 < 0.0f) {
|
||||
temp_f20 = 0.0f;
|
||||
}
|
||||
|
||||
temp_f18 = Math_SinS(this->unk_1AC[i]) * 15.0f;
|
||||
temp_f20 += temp_f18;
|
||||
|
||||
this->unk_1AC[i] += 1600;
|
||||
ovl_dm_char01_Vtx_1BE0[i].v.ob[1] = temp_f20;
|
||||
}
|
||||
|
||||
Math_SmoothStepToF(&this->unk_348, 0.0f, 0.02f, 0.6f, 0.4f);
|
||||
|
||||
if (this->unk_348 < 0.01f) {
|
||||
this->unk_34C = 2;
|
||||
this->actionFunc = func_80AA8F1C;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AA8F0C(DmChar01* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void func_80AA8F1C(DmChar01* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void func_80AA8F2C(DmChar01* this, GlobalContext* globalCtx) {
|
||||
if (D_80AAAE26 != 0) {
|
||||
Math_SmoothStepToF(&this->dyna.actor.world.pos.y, 0.0f, 0.05f, 6.0f, 0.001f);
|
||||
Math_SmoothStepToF(&this->unk_348, 0.0f, 0.01f, 0.5f, 0.4f);
|
||||
if ((s32)this->dyna.actor.world.pos.y >= 0) {
|
||||
D_80AAAE26 = 2;
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_OBJ_ETCETERA, 5.0f, 202.0f, 294.0f, 0, 0, 0, 0x80);
|
||||
this->actionFunc = func_80AA90F4;
|
||||
}
|
||||
}
|
||||
func_80AA8F0C(this, globalCtx);
|
||||
}
|
||||
|
||||
void func_80AA9020(DmChar01* this, GlobalContext* globalCtx) {
|
||||
if (func_800EE29C(globalCtx, 0x87)) {
|
||||
CsCmdActorAction* temp_v1 = globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x87)];
|
||||
|
||||
if ((temp_v1->startFrame == globalCtx->csCtx.frames) && (temp_v1->unk0 == 2)) {
|
||||
gSaveContext.weekEventReg[20] |= 2;
|
||||
this->actionFunc = func_80AA90AC;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AA90AC(DmChar01* this, GlobalContext* globalCtx) {
|
||||
Math_SmoothStepToF(&this->dyna.actor.world.pos.y, 0.0f, 0.05f, 2.0f, 0.001f);
|
||||
}
|
||||
|
||||
void func_80AA90F4(DmChar01* this, GlobalContext* globalCtx) {
|
||||
Math_SmoothStepToF(&this->unk_348, 0.0f, 0.02f, 0.8f, 0.4f);
|
||||
}
|
||||
|
||||
void DmChar01_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
DmChar01* this = THIS;
|
||||
|
||||
this->actionFunc(this, globalCtx);
|
||||
|
||||
if (this->unk_34D) {
|
||||
if (DMCHAR01_GET(&this->dyna.actor) == DMCHAR01_0) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
if (player->actor.world.pos.y > 5.0f) {
|
||||
func_800C62BC(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
} else {
|
||||
func_800C6314(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
}
|
||||
|
||||
if (DMCHAR01_GET(&this->dyna.actor) == DMCHAR01_2) {
|
||||
if (this->dyna.actor.xzDistToPlayer > 600.0f) {
|
||||
func_800C62BC(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
} else {
|
||||
func_800C6314(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DmChar01_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
static f32 D_80AAAAB8 = 0.0f;
|
||||
static f32 D_80AAAABC = 0.0f;
|
||||
static s16 D_80AAAAC0 = 0;
|
||||
static s16 D_80AAAAC4 = 0;
|
||||
static s16 D_80AAAAC8 = 0;
|
||||
static s16 D_80AAAACC = 0;
|
||||
DmChar01* this = THIS;
|
||||
f32 temp_f12;
|
||||
f32 spBC;
|
||||
s32 i;
|
||||
u8 spB7 = false;
|
||||
|
||||
switch (DMCHAR01_GET(thisx)) {
|
||||
case DMCHAR01_0:
|
||||
switch (this->unk_34C) {
|
||||
case 0:
|
||||
AnimatedMat_Draw(globalCtx, Lib_SegmentedToVirtual(&object_mtoride_Matanimheader_00AA50));
|
||||
Gfx_DrawDListOpa(globalCtx, object_mtoride_DL_00A8F8);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
if (gSaveContext.sceneSetupIndex == 1) {
|
||||
AnimatedMat_Draw(globalCtx, Lib_SegmentedToVirtual(&object_mtoride_Matanimheader_0110B8));
|
||||
Gfx_DrawDListOpa(globalCtx, object_mtoride_DL_010FD8);
|
||||
Gfx_DrawDListXlu(globalCtx, object_mtoride_DL_010EF0);
|
||||
Matrix_InsertTranslation(0.0f, 10.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
AnimatedMat_Draw(globalCtx, Lib_SegmentedToVirtual(&object_mtoride_Matanimheader_009D70));
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
if ((u8)this->unk_348 == 255) {
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
|
||||
gDPSetRenderMode(POLY_OPA_DISP++, G_RM_FOG_SHADE_A, G_RM_AA_ZB_OPA_SURF2);
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0x96, 255, 255, 255, 255);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0B, Lib_SegmentedToVirtual(ovl_dm_char01_Vtx_1BE0));
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_mtoride_DL_009928);
|
||||
} else {
|
||||
func_8012C2DC(globalCtx->state.gfxCtx);
|
||||
|
||||
gDPSetRenderMode(POLY_XLU_DISP++, G_RM_FOG_SHADE_A, G_RM_AA_ZB_XLU_SURF2);
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, (u8)this->unk_348);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x96, 255, 255, 255, (u8)this->unk_348);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x0B, Lib_SegmentedToVirtual(ovl_dm_char01_Vtx_1BE0));
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_mtoride_DL_009928);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
AnimatedMat_Draw(globalCtx, Lib_SegmentedToVirtual(&object_mtoride_Matanimheader_0110B8));
|
||||
Gfx_DrawDListOpa(globalCtx, object_mtoride_DL_010FD8);
|
||||
Gfx_DrawDListXlu(globalCtx, object_mtoride_DL_010EF0);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case DMCHAR01_1:
|
||||
switch (this->unk_34C) {
|
||||
case 0:
|
||||
AnimatedMat_Draw(globalCtx, Lib_SegmentedToVirtual(&object_mtoride_Matanimheader_00A5C0));
|
||||
Gfx_DrawDListOpa(globalCtx, object_mtoride_DL_00A398);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
AnimatedMat_Draw(globalCtx, Lib_SegmentedToVirtual(&object_mtoride_Matanimheader_00B1A0));
|
||||
Gfx_DrawDListOpa(globalCtx, object_mtoride_DL_00AF98);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case DMCHAR01_2:
|
||||
AnimatedMat_Draw(globalCtx, Lib_SegmentedToVirtual(&object_mtoride_Matanimheader_00FE90));
|
||||
Gfx_DrawDListOpa(globalCtx, object_mtoride_DL_00DF18);
|
||||
|
||||
if ((this->unk_34C != 0) && ((u8)this->unk_348 != 0)) {
|
||||
AnimatedMat_Draw(globalCtx, Lib_SegmentedToVirtual(&object_mtoride_Matanimheader_00F768));
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
func_8012C2DC(globalCtx->state.gfxCtx);
|
||||
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, (u8)this->unk_348);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 255, 255, 255, (u8)this->unk_348);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_mtoride_DL_00F3C0);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
||||
if (D_80AAAE24 != 0) {
|
||||
if ((D_80AAAE22 > -1800) && (D_80AAAE22 < 3000)) {
|
||||
temp_f12 = D_80AAAE22 - 640.0f;
|
||||
if ((D_80AAAE20 == 380) && (D_80AAAE22 > 640)) {
|
||||
D_80AAAAC0 = 2;
|
||||
D_80AAAAC4 = 0;
|
||||
D_80AAAAC8 = 900;
|
||||
D_80AAAACC = 700;
|
||||
spB7 = true;
|
||||
if (D_80AAAE22 < 1350) {
|
||||
f32 temp_f0 = temp_f12 / 2000.0f;
|
||||
|
||||
D_80AAAAB8 = 420.0f - (420.0f * temp_f0);
|
||||
D_80AAAABC = (200.0f * temp_f0) + 200.0f;
|
||||
} else {
|
||||
f32 temp_f0 = temp_f12 / 2000.0f;
|
||||
|
||||
D_80AAAAB8 = 420.0f - (420.0f * temp_f0);
|
||||
D_80AAAABC = 400.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (spB7) {
|
||||
for (i = 0; i < D_80AAAAC0 * 2; i++) {
|
||||
Vec3f sp44;
|
||||
f32 phi_f2 = D_80AAAABC;
|
||||
s16 temp;
|
||||
|
||||
spBC = Rand_ZeroOne() * D_80AAAAC8;
|
||||
if ((globalCtx->state.frames % 2) != 0) {
|
||||
sp44.x = (Rand_ZeroOne() - 0.5f) * (2.0f * phi_f2);
|
||||
sp44.y = D_80AAAAB8;
|
||||
sp44.z = (Rand_ZeroOne() * D_80AAAAC4) + phi_f2;
|
||||
temp = (s16)spBC + D_80AAAACC;
|
||||
EffectSsGSplash_Spawn(globalCtx, &sp44, NULL, NULL, 0, temp);
|
||||
} else {
|
||||
sp44.x = -phi_f2 - (Rand_ZeroOne() * D_80AAAAC4);
|
||||
sp44.y = D_80AAAAB8;
|
||||
sp44.z = (Rand_ZeroOne() - 0.5f) * (2.0f * phi_f2);
|
||||
temp = (s16)spBC + D_80AAAACC;
|
||||
EffectSsGSplash_Spawn(globalCtx, &sp44, NULL, NULL, 0, temp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Gfx_DrawDListXlu(globalCtx, object_mtoride_DL_00DE50);
|
||||
break;
|
||||
|
||||
case DMCHAR01_3:
|
||||
if (thisx->world.pos.y > -120.0f) {
|
||||
Gfx_DrawDListOpa(globalCtx, object_mtoride_DL_00FAE8);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -7,11 +7,25 @@ struct DmChar01;
|
||||
|
||||
typedef void (*DmChar01ActionFunc)(struct DmChar01*, GlobalContext*);
|
||||
|
||||
#define DMCHAR01_GET(thisx) ((thisx)->params)
|
||||
|
||||
enum {
|
||||
/* 0 */ DMCHAR01_0,
|
||||
/* 1 */ DMCHAR01_1,
|
||||
/* 2 */ DMCHAR01_2,
|
||||
/* 3 */ DMCHAR01_3,
|
||||
};
|
||||
|
||||
typedef struct DmChar01 {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x0144 */ char unk_144[0x5C];
|
||||
/* 0x0000 */ DynaPolyActor dyna;
|
||||
/* 0x015C */ UNK_TYPE1 unk15C[0x44];
|
||||
/* 0x01A0 */ DmChar01ActionFunc actionFunc;
|
||||
/* 0x01A4 */ char unk_1A4[0x1AC];
|
||||
/* 0x01A4 */ UNK_TYPE1 unk1A4[0x8];
|
||||
/* 0x01AC */ s16 unk_1AC[205];
|
||||
/* 0x0346 */ s16 unk_346;
|
||||
/* 0x0348 */ f32 unk_348;
|
||||
/* 0x034C */ u8 unk_34C;
|
||||
/* 0x034D */ u8 unk_34D;
|
||||
} DmChar01; // size = 0x350
|
||||
|
||||
extern const ActorInit Dm_Char01_InitVars;
|
||||
|
@ -984,29 +984,6 @@ D_060005FC = 0x060005FC;
|
||||
D_06001804 = 0x06001804;
|
||||
D_0600A6D0 = 0x0600A6D0;
|
||||
|
||||
// ovl_Dm_Char01
|
||||
|
||||
D_06009928 = 0x06009928;
|
||||
D_06009D70 = 0x06009D70;
|
||||
D_06009E4C = 0x06009E4C;
|
||||
D_0600A398 = 0x0600A398;
|
||||
D_0600A5C0 = 0x0600A5C0;
|
||||
D_0600A8F8 = 0x0600A8F8;
|
||||
D_0600AA50 = 0x0600AA50;
|
||||
D_0600AF98 = 0x0600AF98;
|
||||
D_0600B1A0 = 0x0600B1A0;
|
||||
D_0600DE50 = 0x0600DE50;
|
||||
D_0600DF18 = 0x0600DF18;
|
||||
D_0600F3C0 = 0x0600F3C0;
|
||||
D_0600F768 = 0x0600F768;
|
||||
D_0600FAE8 = 0x0600FAE8;
|
||||
D_0600FE5C = 0x0600FE5C;
|
||||
D_0600FE90 = 0x0600FE90;
|
||||
D_06010C3C = 0x06010C3C;
|
||||
D_06010EF0 = 0x06010EF0;
|
||||
D_06010FD8 = 0x06010FD8;
|
||||
D_060110B8 = 0x060110B8;
|
||||
|
||||
// ovl_Dm_Char02
|
||||
|
||||
D_0600AD68 = 0x0600AD68;
|
||||
|
Loading…
x
Reference in New Issue
Block a user