2024-04-09 01:25:56 +03:00
|
|
|
#include "prevent_bss_reordering.h"
|
2024-03-09 00:53:53 +03:00
|
|
|
#include "global.h"
|
2024-08-15 17:54:53 +03:00
|
|
|
#include "sf64object.h"
|
2024-04-01 19:54:47 +03:00
|
|
|
#include "assets/ast_katina.h"
|
2024-04-02 03:08:01 +03:00
|
|
|
#include "assets/ast_venom_1.h"
|
2024-04-01 19:54:47 +03:00
|
|
|
#include "assets/ast_venom_2.h"
|
|
|
|
#include "assets/ast_fortuna.h"
|
2024-03-29 22:09:14 +03:00
|
|
|
#include "assets/ast_corneria.h"
|
2024-04-01 04:04:45 +03:00
|
|
|
#include "assets/ast_meteo.h"
|
2024-04-02 03:08:01 +03:00
|
|
|
#include "assets/ast_solar.h"
|
2024-03-15 00:31:03 +03:00
|
|
|
#include "assets/ast_sector_x.h"
|
2024-04-02 03:08:01 +03:00
|
|
|
#include "assets/ast_sector_y.h"
|
2024-03-15 00:31:03 +03:00
|
|
|
#include "assets/ast_aquas.h"
|
2024-03-29 20:40:09 +03:00
|
|
|
#include "assets/ast_macbeth.h"
|
2024-03-15 00:31:03 +03:00
|
|
|
#include "assets/ast_7_ti_1.h"
|
|
|
|
#include "assets/ast_andross.h"
|
|
|
|
#include "assets/ast_star_wolf.h"
|
|
|
|
#include "assets/ast_arwing.h"
|
|
|
|
#include "assets/ast_blue_marine.h"
|
2024-03-30 02:19:29 +03:00
|
|
|
#include "assets/ast_versus.h"
|
2024-03-17 02:10:21 +03:00
|
|
|
#include "assets/ast_enmy_space.h"
|
2024-03-21 21:45:13 +03:00
|
|
|
#include "assets/ast_enmy_planet.h"
|
|
|
|
#include "assets/ast_ve1_boss.h"
|
2024-04-01 21:17:46 +03:00
|
|
|
#include "assets/ast_zoness.h"
|
2024-10-16 20:53:41 +03:00
|
|
|
#include "port/interpolation/FrameInterpolation.h"
|
2024-04-01 23:32:21 +03:00
|
|
|
|
2024-04-03 02:20:08 +03:00
|
|
|
Vec3f D_edisplay_801615D0;
|
2024-05-02 23:46:51 +03:00
|
|
|
Vec3f sViewPos;
|
2024-05-11 23:53:37 +03:00
|
|
|
bool sDrewActor;
|
2024-04-03 02:20:08 +03:00
|
|
|
Matrix D_edisplay_801615F0;
|
2024-08-15 17:54:53 +03:00
|
|
|
ArwingInfo gActorTeamArwing;
|
2023-11-27 00:27:05 +03:00
|
|
|
|
2024-04-03 02:20:08 +03:00
|
|
|
char D_edisplay_800CF970[] = "$Id: fox_edisplay.c,v 1.196 1997/05/08 08:31:50 morita Exp $";
|
|
|
|
|
2024-05-02 23:46:51 +03:00
|
|
|
void Object_ApplyWaterDistortion(void) {
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 13.0f * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_Scale(gGfxMatrix, 1.02f, 0.98f, 1.0f, MTXF_APPLY);
|
|
|
|
Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 13.0f * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_Scale(gGfxMatrix, 1.02f, 0.98f, 1.0f, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
|
|
|
}
|
|
|
|
|
2024-05-02 23:46:51 +03:00
|
|
|
void Object_SetCullDirection(s32 arg0) {
|
2023-11-22 17:56:29 +03:00
|
|
|
if (arg0 < 0) {
|
|
|
|
gSPSetGeometryMode(gMasterDisp++, G_CULL_FRONT);
|
|
|
|
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-12-24 22:28:35 +03:00
|
|
|
void Graphics_SetScaleMtx(f32 scale) {
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
|
|
|
}
|
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
void Sprite168_Draw(Sprite168* this) {
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_64);
|
2023-11-22 17:56:29 +03:00
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 60);
|
2024-08-15 12:19:21 +03:00
|
|
|
// Missing DList
|
2023-12-14 17:41:43 +03:00
|
|
|
RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-05-02 23:46:51 +03:00
|
|
|
void Object_dummy_800598DC(s32 arg0) {
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-08-12 17:58:54 +03:00
|
|
|
void MeteoBall_Draw(MeteoBall* this) {
|
2023-12-14 17:41:43 +03:00
|
|
|
RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
2024-08-15 17:54:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aMeMeteoBallDL);
|
2023-12-14 17:41:43 +03:00
|
|
|
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-08-15 17:54:53 +03:00
|
|
|
void MeHopBot_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* index) {
|
2023-11-22 17:56:29 +03:00
|
|
|
Vec3f sp24;
|
|
|
|
Vec3f sp18;
|
|
|
|
|
2023-12-19 17:54:50 +03:00
|
|
|
if (limbIndex == 1) {
|
2023-11-22 17:56:29 +03:00
|
|
|
sp24.x = 0.0f;
|
|
|
|
sp24.y = 0.0f;
|
|
|
|
sp24.z = 0.0f;
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_MultVec3f(gCalcMatrix, &sp24, &sp18);
|
2024-01-14 01:45:37 +03:00
|
|
|
gActors[*((s32*) index)].fwork[0] = sp18.y;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-03 02:20:08 +03:00
|
|
|
f32 D_edisplay_800CF9B0[] = {
|
2023-12-04 21:50:52 +03:00
|
|
|
-12.324226f, -12.008495f, -11.083107f, -9.56147f, -7.440754f, -4.713318f, -1.393303f, 2.48587f,
|
|
|
|
6.872662f, 11.668991f, 16.752102f, 21.98127f, 27.193024f, 32.21534f, 36.875694f, 41.007812f,
|
|
|
|
44.462303f, 47.094223f, 48.761005f, 49.345966f, 47.6453f, 42.988186f, 36.062622f, 27.662722f,
|
|
|
|
18.646473f, 9.883305f, 2.113918f, -4.157948f, -8.673706f, -11.395222f, -12.324226f,
|
2023-11-27 00:27:05 +03:00
|
|
|
};
|
2024-04-03 02:20:08 +03:00
|
|
|
f32 D_edisplay_800CFA2C[] = {
|
2023-11-27 00:27:05 +03:00
|
|
|
1.0f, 1.0f, 0.95f, 0.9f, 0.85f, 0.8f, 0.75f, 0.7f, 0.65f, 0.6f,
|
|
|
|
};
|
|
|
|
|
2024-08-15 17:54:53 +03:00
|
|
|
void MeHopBot_Draw(MeHopBot* this) {
|
2023-11-22 17:56:29 +03:00
|
|
|
Vec3f sp30[30];
|
2024-08-25 01:36:53 +03:00
|
|
|
f32 yTrans = D_edisplay_800CF9B0[this->animFrame] - 114.0f;
|
2023-11-22 17:56:29 +03:00
|
|
|
|
2024-08-25 01:36:53 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, 0.f, -yTrans, 0.0f, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-08-15 17:54:53 +03:00
|
|
|
Animation_GetFrameData(&aMeHopBotAnim, this->animFrame, sp30);
|
|
|
|
Animation_DrawSkeleton(1, aMeHopBotSkel, sp30, NULL, MeHopBot_PostLimbDraw, &this->index, &gIdentityMatrix);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-08-12 17:58:54 +03:00
|
|
|
void MeteoTunnel_Draw(MeTunnel* this) {
|
2024-08-15 12:19:21 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aMeMeteoTunnelDL);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-08-25 01:36:53 +03:00
|
|
|
void Scenery_DrawTitaniaBones(Scenery* this) {
|
|
|
|
if (this->obj.id == OBJ_SCENERY_TI_SKULL) {
|
2024-03-15 00:31:03 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_TI1_7007350);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-08-25 01:36:53 +03:00
|
|
|
Graphics_SetScaleMtx(D_edisplay_800CFA2C[this->obj.id - 29]);
|
2024-03-15 00:31:03 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_TI1_700BB10);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-03 02:20:08 +03:00
|
|
|
void func_edisplay_80059BB0(void* arg0) {
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-07-06 15:47:49 +03:00
|
|
|
void CoIBeam_Draw(CoIBeam* this) {
|
2024-08-15 12:19:21 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aCoIBeamDL);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-08-15 11:10:00 +03:00
|
|
|
void CoMoleMissile_Draw(CoMoleMissile* this) {
|
2024-05-11 23:53:37 +03:00
|
|
|
if (this->animFrame != 0) {
|
2024-08-15 12:19:21 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, CoMoleMissileDL);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-03 02:20:08 +03:00
|
|
|
void func_edisplay_80059C28(void* arg0) {
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
void Sprite167_Draw(Sprite167* this) {
|
2024-08-15 12:19:21 +03:00
|
|
|
/* Unimplemented */
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
void FogShadow_Draw(FogShadow* this) {
|
2023-12-14 17:41:43 +03:00
|
|
|
RCP_SetupDL_47(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
2023-11-22 17:56:29 +03:00
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 180);
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-05-11 23:53:37 +03:00
|
|
|
switch (this->sceneryId) {
|
2024-07-06 15:47:49 +03:00
|
|
|
case OBJ_SCENERY_CO_STONE_ARCH:
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Scale(gGfxMatrix, 2.0f, 1.0f, 0.7f, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-08-15 12:19:21 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aCoShadow1DL);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-07-06 15:47:49 +03:00
|
|
|
case OBJ_SCENERY_CO_ARCH_2:
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.7f, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-08-15 12:19:21 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aCoShadow1DL);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-07-06 15:47:49 +03:00
|
|
|
case OBJ_SCENERY_CO_HIGHWAY_1:
|
|
|
|
case OBJ_SCENERY_CO_HIGHWAY_2:
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 10.55f, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-08-15 12:19:21 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aCoHighwayShadowDL);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-07-06 15:47:49 +03:00
|
|
|
case OBJ_SCENERY_CO_DOORS:
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Scale(gGfxMatrix, 1.6f, 1.0f, 1.0f, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-08-15 12:19:21 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aCoShadow1DL);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-07-06 15:47:49 +03:00
|
|
|
case OBJ_SCENERY_CO_ARCH_1:
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Scale(gGfxMatrix, 1.2f, 1.0f, 1.3f, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-08-15 12:19:21 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aCoShadow1DL);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-07-06 15:47:49 +03:00
|
|
|
case OBJ_SCENERY_CO_ARCH_3:
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Scale(gGfxMatrix, 2.2f, 1.0f, 1.4f, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-08-15 12:19:21 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aCoShadow1DL);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
|
|
|
}
|
2023-12-14 17:41:43 +03:00
|
|
|
RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-08-15 11:10:00 +03:00
|
|
|
void CoBuilding9_Draw(CoBuilding9* this) {
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -95.0f, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-08-15 12:19:21 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aCoBuilding9DL);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-08-15 11:10:00 +03:00
|
|
|
void CoBuilding10_Draw(CoBuilding10* this) {
|
2024-10-17 03:16:05 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aCoBuilding9DL);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-07-06 15:47:49 +03:00
|
|
|
// repurposed into OBJ_SCENERY_CO_BUILDING_6
|
2024-08-15 11:10:00 +03:00
|
|
|
void func_edisplay_8005A010(Sprite* this) {
|
|
|
|
if (!this->toLeft) {
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateY(gGfxMatrix, M_PI / 2, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-07-06 15:47:49 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aCoBuilding6DL);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-03 02:20:08 +03:00
|
|
|
void func_edisplay_8005A07C(void* arg0) {
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-04-03 02:20:08 +03:00
|
|
|
void func_edisplay_8005A088(void* arg0) {
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-04-03 02:20:08 +03:00
|
|
|
Gfx* D_edisplay_800CFA54[] = {
|
2024-04-02 03:08:01 +03:00
|
|
|
D_SY_6027960, D_SY_60273A0, D_SY_60183B0, D_SY_60121E0, D_SY_602A2E0, D_SY_602A720, D_SY_602B8F0,
|
|
|
|
D_SY_602A8C0, D_SY_6028E70, D_SY_602E0A0, D_SY_602DE70, D_SY_602DC40, D_SY_602D830, D_SY_602D340,
|
|
|
|
D_CO_6031280, D_CO_6031130, D_CO_6030850, D_CO_6030FD0, D_CO_602DD40, D_CO_6033AF0, D_CO_60186E0,
|
|
|
|
D_CO_6024160, D_CO_6033290, D_CO_6017F10, D_FO_60074E0, D_FO_6007590, D_FO_6007730, D_FO_6005CC0,
|
2023-11-27 00:27:05 +03:00
|
|
|
};
|
2024-04-03 02:20:08 +03:00
|
|
|
Gfx* D_edisplay_800CFAC4[] = {
|
2024-04-02 03:08:01 +03:00
|
|
|
D_ZO_60176D0, D_ZO_6017810, D_ZO_6017770, D_ZO_6016D90, D_ZO_6016E30, D_ZO_60178B0,
|
2023-11-27 00:27:05 +03:00
|
|
|
};
|
2024-04-03 02:20:08 +03:00
|
|
|
Gfx* D_edisplay_800CFADC[] = {
|
2024-04-02 03:08:01 +03:00
|
|
|
D_ZO_6023690, D_ZO_6021BB0, D_ZO_6021C50, D_ZO_6021CE0, D_ZO_6021D80, D_ZO_6016350,
|
|
|
|
D_ZO_6021E20, D_ZO_60222A0, D_ZO_6022BE0, D_ZO_6022D70, D_ZO_6022F00,
|
2023-11-27 00:27:05 +03:00
|
|
|
};
|
2024-04-03 02:20:08 +03:00
|
|
|
Gfx* D_edisplay_800CFB08[] = { D_ZO_6020F10, D_ZO_6021100, D_ZO_60214B0 };
|
|
|
|
Gfx* D_edisplay_800CFB14[] = { D_ZO_60163E0, D_ZO_60165D0, D_ZO_6016880, D_ZO_6016B50, D_ZO_6000C40 };
|
2024-07-06 15:47:49 +03:00
|
|
|
Gfx* D_edisplay_800CFB28[] = { aCoBuilding7DL, D_ZO_601F620, D_ZO_601F420, D_ZO_6018C80, D_ZO_601F940, D_ZO_601F260 };
|
2024-04-03 02:20:08 +03:00
|
|
|
Gfx* D_edisplay_800CFB40[] = {
|
2024-04-02 03:08:01 +03:00
|
|
|
D_SO_6014DB0, D_SO_60146D0, D_SO_6014B80, D_SO_6014470, D_SO_6014930,
|
|
|
|
D_SO_60138A0, D_SO_60151A0, D_SO_600F750, D_SO_6015810,
|
2023-11-27 00:27:05 +03:00
|
|
|
};
|
2024-04-03 02:20:08 +03:00
|
|
|
Gfx* D_edisplay_800CFB64[] = {
|
2024-04-02 03:08:01 +03:00
|
|
|
D_AQ_600D4A0, D_AQ_600D720, D_AQ_600D810, D_AQ_600CFF0, D_AQ_600BD20,
|
|
|
|
D_AQ_600D390, D_AQ_600E150, D_AQ_6007160, D_AQ_600D900,
|
2023-11-27 00:27:05 +03:00
|
|
|
};
|
2024-04-03 02:20:08 +03:00
|
|
|
Gfx* D_edisplay_800CFB88[] = {
|
2024-04-02 03:08:01 +03:00
|
|
|
D_AQ_600A8E0, D_AQ_600A840, D_AQ_600A480, D_AQ_600A720, D_AQ_600A970, D_AQ_6007D70, D_AQ_600A520, D_AQ_6009990,
|
2023-11-27 00:27:05 +03:00
|
|
|
};
|
2024-04-03 02:20:08 +03:00
|
|
|
Gfx* D_edisplay_800CFBA8[] = {
|
2024-04-02 03:08:01 +03:00
|
|
|
D_AQ_6026460, D_AQ_60266B0, D_AQ_6026950, D_AQ_60276F0, D_AQ_6027810, D_AQ_6027330, D_AQ_60273C0, D_AQ_6026E30,
|
|
|
|
D_AQ_6026EC0, D_AQ_6026DA0, D_AQ_6026D10, D_AQ_6026C80, D_AQ_6026BF0, D_AQ_6027460, D_AQ_6026F60,
|
2023-11-27 00:27:05 +03:00
|
|
|
};
|
2024-04-03 02:20:08 +03:00
|
|
|
Gfx* D_edisplay_800CFBE4[] = { D_AQ_60040F0, D_AQ_6027C90, D_AQ_6027FA0, D_AQ_6003350, D_AQ_6028240,
|
|
|
|
D_AQ_6028550, D_AQ_6004DB0, D_AQ_6027930, D_AQ_600F030, D_AQ_60050F0 };
|
|
|
|
Gfx* D_edisplay_800CFC0C[] = {
|
2024-04-02 03:08:01 +03:00
|
|
|
D_AQ_60294A0, D_AQ_60291B0, D_AQ_60287F0, D_AQ_6029330, D_AQ_6029240, D_AQ_6029790, D_AQ_6029900,
|
|
|
|
D_AQ_6028F50, D_AQ_60290C0, D_AQ_6029530, D_AQ_60296A0, D_AQ_6028A80, D_AQ_6028910,
|
2023-11-27 00:27:05 +03:00
|
|
|
};
|
2024-08-12 17:58:54 +03:00
|
|
|
Gfx* D_edisplay_800CFC40[] = { aAqBoulderDL, aAqBoulderDL, aAqBoulderDL, aAqBoulderDL };
|
2024-04-03 02:20:08 +03:00
|
|
|
Gfx* D_edisplay_800CFC50[] = { D_AQ_601EDE0, D_AQ_601F2F0, D_AQ_601F830, D_AQ_601FD70, D_AQ_601D110 };
|
|
|
|
Gfx* D_edisplay_800CFC64[] = { D_AQ_6023940, D_AQ_6023D70, D_AQ_60249C0, D_AQ_6023EB0, D_AQ_60249C0, D_AQ_6023B80 };
|
|
|
|
Gfx* D_edisplay_800CFC7C[] = { D_ZO_601B570, D_ZO_601B710, D_ZO_60209B0, D_ZO_6020B70, D_ZO_6020D50,
|
|
|
|
D_ZO_601B8F0, D_ZO_601B3B0, D_ZO_601B1C0, D_ZO_6011660 };
|
2023-11-27 00:27:05 +03:00
|
|
|
|
2024-05-07 01:45:24 +03:00
|
|
|
void ActorDebris_Draw(ActorDebris* this) {
|
2024-04-09 01:25:56 +03:00
|
|
|
switch (this->state) {
|
2023-11-22 17:56:29 +03:00
|
|
|
case 0:
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, 18.0f, 15.0f, -15.0f, MTXF_APPLY);
|
|
|
|
Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-09-13 06:59:33 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aAwLeftWingDL);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-11-22 17:56:29 +03:00
|
|
|
case 1:
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, -18.0f, 15.0f, -15.0f, MTXF_APPLY);
|
|
|
|
Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-09-13 06:59:33 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aAwRightWingDL);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-11-22 17:56:29 +03:00
|
|
|
case 2:
|
2024-04-09 01:25:56 +03:00
|
|
|
Graphics_SetScaleMtx(this->scale);
|
2024-09-13 06:59:33 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aAwFlap1DL);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-11-22 17:56:29 +03:00
|
|
|
case 3:
|
2024-09-13 06:59:33 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aAwLaserGun1DL);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-11-22 17:56:29 +03:00
|
|
|
case 4:
|
2024-04-09 01:25:56 +03:00
|
|
|
Graphics_SetScaleMtx(this->scale);
|
|
|
|
if ((this->index % 2) != 0) {
|
2023-11-22 17:56:29 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_10194C0);
|
|
|
|
} else {
|
|
|
|
gSPDisplayList(gMasterDisp++, D_1024290);
|
|
|
|
}
|
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
case 39:
|
2023-11-22 17:56:29 +03:00
|
|
|
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_edisplay_800CFAC4[this->work_048]);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
case 40:
|
2023-11-22 17:56:29 +03:00
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
|
2024-08-25 01:36:53 +03:00
|
|
|
switch (this->work_048) {
|
2023-11-22 17:56:29 +03:00
|
|
|
case 0:
|
|
|
|
break;
|
|
|
|
case 1:
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_61);
|
2023-11-22 17:56:29 +03:00
|
|
|
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
|
|
|
break;
|
|
|
|
case 2:
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_57);
|
2023-11-22 17:56:29 +03:00
|
|
|
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
|
|
|
break;
|
|
|
|
case 3:
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_33);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
if (gCurrentLevel != LEVEL_SOLAR) {
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_TI_801B769C[this->work_046]);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-01-07 01:39:23 +03:00
|
|
|
if (gBosses[0].fwork[3] < 4800.0f) {
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_30);
|
2024-04-05 23:11:36 +03:00
|
|
|
gDPSetFogColor(gMasterDisp++, 64, 32, 32, gFogAlpha);
|
2023-12-14 17:41:43 +03:00
|
|
|
gSPFogPosition(gMasterDisp++, gFogNear, gFogFar);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_30);
|
2024-04-05 23:11:36 +03:00
|
|
|
gDPSetFogColor(gMasterDisp++, 16, 16, 16, gFogAlpha);
|
2023-12-14 17:41:43 +03:00
|
|
|
gSPFogPosition(gMasterDisp++, gFogNear, gFogFar);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-04-09 01:25:56 +03:00
|
|
|
Graphics_SetScaleMtx(this->scale);
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB40[this->work_046]);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
case 41:
|
2024-04-09 01:25:56 +03:00
|
|
|
Graphics_SetScaleMtx(this->scale);
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_edisplay_800CFADC[this->work_048]);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
case 42:
|
2024-04-09 01:25:56 +03:00
|
|
|
Graphics_SetScaleMtx(this->scale);
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB08[this->work_048]);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
case 43:
|
2024-04-09 01:25:56 +03:00
|
|
|
Graphics_SetScaleMtx(this->scale);
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB14[this->work_048]);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
case 44:
|
2024-04-09 01:25:56 +03:00
|
|
|
Graphics_SetScaleMtx(this->scale);
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB28[this->work_048]);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
case 45:
|
2024-03-21 23:19:38 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40018A0);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
case 46:
|
2024-08-25 01:36:53 +03:00
|
|
|
if ((this->work_048 == 2) || (this->work_048 == 3) || (this->work_048 == 4)) {
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_33);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_TI_801B7584[this->work_048]);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
case 47:
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_TI_801B7608[this->work_048]);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
case 48:
|
2024-04-09 01:25:56 +03:00
|
|
|
Graphics_SetScaleMtx(this->scale);
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB64[this->work_048]);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
case 49:
|
2024-04-09 01:25:56 +03:00
|
|
|
Graphics_SetScaleMtx(this->scale);
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB88[this->work_048]);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
case 50:
|
2023-12-24 22:28:35 +03:00
|
|
|
Graphics_SetScaleMtx(0.7f);
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
if (this->iwork[1] == 1) {
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_30);
|
2023-11-22 17:56:29 +03:00
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
|
2024-04-09 01:25:56 +03:00
|
|
|
} else if (this->iwork[1] == 2) {
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_30);
|
2023-11-22 17:56:29 +03:00
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
|
2023-12-24 22:28:35 +03:00
|
|
|
Graphics_SetScaleMtx(0.7f);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
switch (this->iwork[0]) {
|
2023-11-22 17:56:29 +03:00
|
|
|
case 0:
|
2024-03-21 21:45:13 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_VE1_90234D0);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
|
|
|
case 1:
|
2024-03-21 21:45:13 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_VE1_9023290);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
|
|
|
case 2:
|
2024-03-21 21:45:13 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_VE1_900D180);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
|
|
|
case 3:
|
2024-03-21 21:45:13 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_VE1_9010FD0);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
if (this->iwork[1] != 0) {
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_29);
|
2023-12-24 22:28:35 +03:00
|
|
|
Graphics_SetScaleMtx(0.7f);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
case 51:
|
2024-04-09 01:25:56 +03:00
|
|
|
Graphics_SetScaleMtx(this->scale);
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_edisplay_800CFBA8[this->work_048]);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
case 52:
|
2024-04-09 01:25:56 +03:00
|
|
|
Graphics_SetScaleMtx(this->scale);
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_edisplay_800CFBE4[this->work_048]);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
case 53:
|
2024-04-09 01:25:56 +03:00
|
|
|
Graphics_SetScaleMtx(this->scale);
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_edisplay_800CFC0C[this->work_048]);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
case 54:
|
2024-04-09 01:25:56 +03:00
|
|
|
Graphics_SetScaleMtx(this->scale);
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_edisplay_800CFC40[this->work_048]);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
case 55:
|
2024-04-09 01:25:56 +03:00
|
|
|
Graphics_SetScaleMtx(this->scale);
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_edisplay_800CFC50[this->work_048]);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
case 56:
|
2024-04-09 01:25:56 +03:00
|
|
|
Graphics_SetScaleMtx(this->scale);
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_41);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 191, 255, 223, 255);
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_edisplay_800CFC64[this->work_048]);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
case 58:
|
2024-04-09 01:25:56 +03:00
|
|
|
Graphics_SetScaleMtx(this->scale);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-03-15 00:31:03 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_AQ_60148B0);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
case 59:
|
2024-04-09 01:25:56 +03:00
|
|
|
Graphics_SetScaleMtx(this->scale);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_edisplay_800CFC7C[this->work_048]);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
case 70:
|
2024-08-15 17:54:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aActorSuppliesDL);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
case 57:
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_VE1_8019A008[this->work_048]);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-11-22 17:56:29 +03:00
|
|
|
default:
|
2024-05-07 01:45:24 +03:00
|
|
|
if (this->state >= 10) {
|
2024-04-09 01:25:56 +03:00
|
|
|
if (this->state == 36) {
|
2023-11-22 17:56:29 +03:00
|
|
|
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
|
|
|
}
|
2024-04-09 01:25:56 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_edisplay_800CFA54[this->state - 10]);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-08-15 11:10:00 +03:00
|
|
|
void Actor_DrawEngineAndContrails(Actor* this) {
|
2023-11-22 17:56:29 +03:00
|
|
|
f32 sp5C;
|
|
|
|
f32 temp1;
|
|
|
|
f32 sp54;
|
2024-08-25 01:36:53 +03:00
|
|
|
s32 pad[5];
|
2023-11-22 17:56:29 +03:00
|
|
|
|
2024-08-15 11:10:00 +03:00
|
|
|
if ((this->iwork[11] != 0) && (this->obj.status == OBJ_ACTIVE)) {
|
2023-12-14 17:41:43 +03:00
|
|
|
temp1 = 652.5f * 0.001f; // 0.65250003f;
|
2024-08-15 11:10:00 +03:00
|
|
|
if (this->iwork[11] >= 2) {
|
2023-11-22 17:56:29 +03:00
|
|
|
temp1 = 1.3050001f;
|
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
|
|
|
Math_SmoothStepToF(&this->fwork[29], temp1, 0.3f, 5.0f, 0.0f);
|
|
|
|
|
|
|
|
sp5C = this->fwork[29];
|
2024-04-09 01:25:56 +03:00
|
|
|
if ((gGameFrameCount % 2) != 0) {
|
2023-11-22 17:56:29 +03:00
|
|
|
sp5C *= 1.111f;
|
|
|
|
}
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
|
|
|
|
Matrix_Scale(gGfxMatrix, sp5C, sp5C * 0.7f, sp5C, MTXF_APPLY);
|
2024-08-15 11:10:00 +03:00
|
|
|
Matrix_RotateZ(gGfxMatrix, -this->obj.rot.z * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gGfxMatrix, -this->obj.rot.x * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateY(gGfxMatrix, -this->obj.rot.y * M_DTOR, MTXF_APPLY);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-08-12 17:58:54 +03:00
|
|
|
Display_DrawEngineGlow(gLevelType);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
|
|
|
sp5C = this->fwork[21];
|
2023-12-24 22:28:35 +03:00
|
|
|
if ((sp5C != 0.0f) && (gLevelType == LEVELTYPE_PLANET)) {
|
2023-11-22 17:56:29 +03:00
|
|
|
sp54 = 0.0f;
|
2024-04-09 01:25:56 +03:00
|
|
|
if ((gGameFrameCount % 2) != 0) {
|
2023-11-22 17:56:29 +03:00
|
|
|
sp54 = 180.0f;
|
|
|
|
}
|
2023-12-04 21:50:52 +03:00
|
|
|
RCP_SetupDL_64_2();
|
2023-11-22 17:56:29 +03:00
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 100);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, 70.0f, -10.0f, -100.0f, MTXF_APPLY);
|
|
|
|
Matrix_Scale(gGfxMatrix, sp5C, 1.0f, 50.0f, MTXF_APPLY);
|
|
|
|
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY);
|
|
|
|
Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-09-13 06:59:33 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aRadarMarkKaSaucererDL);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, -70.0f, -10.0f, -100.0f, MTXF_APPLY);
|
|
|
|
Matrix_Scale(gGfxMatrix, sp5C, 1.0f, 50.0f, MTXF_APPLY);
|
|
|
|
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY);
|
|
|
|
Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-09-13 06:59:33 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aRadarMarkKaSaucererDL);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-03 02:20:08 +03:00
|
|
|
f32 D_edisplay_800CFCA0[] = {
|
2023-11-27 00:27:05 +03:00
|
|
|
1.7f, 1.8f, 2.0f, 3.0f, 3.0f, 3.0f, 3.0f, 3.0f,
|
|
|
|
};
|
|
|
|
|
2024-08-25 01:36:53 +03:00
|
|
|
void Actor_DrawEngineGlow(Actor* actor, EngineGlowColor color) {
|
2023-12-19 17:54:50 +03:00
|
|
|
f32 scale;
|
2023-11-22 17:56:29 +03:00
|
|
|
|
2024-01-21 23:42:06 +03:00
|
|
|
if ((actor->iwork[11] != 0) && (actor->obj.status == OBJ_ACTIVE)) {
|
2023-12-19 17:54:50 +03:00
|
|
|
scale = 0.63f;
|
2024-01-14 01:45:37 +03:00
|
|
|
if (actor->iwork[11] >= 2) {
|
2024-04-03 02:20:08 +03:00
|
|
|
scale = D_edisplay_800CFCA0[actor->iwork[11] - 2] * 0.45f;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-04-09 01:25:56 +03:00
|
|
|
if ((gGameFrameCount % 2) != 0) {
|
2023-12-19 17:54:50 +03:00
|
|
|
scale *= 1.2f;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY);
|
|
|
|
Matrix_RotateZ(gGfxMatrix, -actor->obj.rot.z * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gGfxMatrix, -actor->obj.rot.x * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateY(gGfxMatrix, -actor->obj.rot.y * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-08-25 01:36:53 +03:00
|
|
|
Display_DrawEngineGlow(color);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-08-15 17:54:53 +03:00
|
|
|
void ActorTeamArwing_Draw(ActorTeamArwing* this) {
|
2024-08-15 11:10:00 +03:00
|
|
|
Vec3f src = { 0.0f, 0.0f, 0.0f };
|
|
|
|
Vec3f dest;
|
2023-11-22 17:56:29 +03:00
|
|
|
|
2024-08-15 11:10:00 +03:00
|
|
|
Matrix_MultVec3f(gGfxMatrix, &src, &dest);
|
2024-08-12 17:58:54 +03:00
|
|
|
|
2024-08-15 11:10:00 +03:00
|
|
|
if ((((fabsf(dest.z) < 3000.0f) && (fabsf(dest.x) < 3000.0f) && !gBossActive) ||
|
2024-04-16 02:38:19 +03:00
|
|
|
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) || (gCurrentLevel == LEVEL_VENOM_ANDROSS) ||
|
|
|
|
(gCurrentLevel == LEVEL_VENOM_2) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) &&
|
2023-12-14 17:41:43 +03:00
|
|
|
(gCurrentLevel != LEVEL_MACBETH) && (gCurrentLevel != LEVEL_TITANIA)) {
|
2024-08-15 11:10:00 +03:00
|
|
|
if (this->obj.id == OBJ_ACTOR_CUTSCENE) {
|
2024-04-16 02:38:19 +03:00
|
|
|
if (((gCurrentLevel == LEVEL_VENOM_2) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) &&
|
2024-08-15 11:10:00 +03:00
|
|
|
(this->index == 10)) ||
|
2024-05-02 23:46:51 +03:00
|
|
|
((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gPlayer[0].csState >= 100) &&
|
2024-08-15 11:10:00 +03:00
|
|
|
(gCurrentLevel == LEVEL_KATINA) && (this->index == 1)) ||
|
2024-04-16 02:38:19 +03:00
|
|
|
((gCurrentLevel == LEVEL_SECTOR_Y) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) &&
|
2024-08-15 11:10:00 +03:00
|
|
|
(this->state == 5))) {
|
2024-08-15 17:54:53 +03:00
|
|
|
gActorTeamArwing.rightWingState = gPlayer[0].arwing.rightWingState;
|
|
|
|
gActorTeamArwing.leftWingState = gPlayer[0].arwing.leftWingState;
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-08-15 17:54:53 +03:00
|
|
|
gActorTeamArwing.rightWingState = gActorTeamArwing.leftWingState = WINGSTATE_INTACT;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
} else {
|
2024-08-15 17:54:53 +03:00
|
|
|
gActorTeamArwing.rightWingState = gActorTeamArwing.leftWingState = WINGSTATE_INTACT;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 17:54:53 +03:00
|
|
|
|
|
|
|
gActorTeamArwing.upperRightFlapYrot = this->fwork[15];
|
|
|
|
gActorTeamArwing.upperLeftFlapYrot = this->fwork[16];
|
|
|
|
gActorTeamArwing.bottomRightFlapYrot = this->fwork[26];
|
|
|
|
gActorTeamArwing.bottomLeftFlapYrot = this->fwork[27];
|
|
|
|
gActorTeamArwing.laserGunsYpos = gActorTeamArwing.laserGunsXpos = gActorTeamArwing.wingsXrot =
|
2024-09-13 06:59:33 +03:00
|
|
|
gActorTeamArwing.wingsYrot = gActorTeamArwing.cockpitGlassXrot = gActorTeamArwing.wingsZrot = 0.0f;
|
2024-08-15 17:54:53 +03:00
|
|
|
gActorTeamArwing.unk_28 = this->fwork[17];
|
|
|
|
gActorTeamArwing.drawFace = this->iwork[14];
|
|
|
|
gActorTeamArwing.teamFaceXrot = this->fwork[20];
|
|
|
|
gActorTeamArwing.teamFaceYrot = this->fwork[19];
|
|
|
|
|
2023-12-19 17:54:50 +03:00
|
|
|
if (gLevelType == LEVELTYPE_SPACE) {
|
2024-08-15 17:54:53 +03:00
|
|
|
gActorTeamArwing.upperRightFlapYrot = gActorTeamArwing.bottomRightFlapYrot =
|
|
|
|
gActorTeamArwing.upperLeftFlapYrot = gActorTeamArwing.bottomLeftFlapYrot = 0.0f;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 17:54:53 +03:00
|
|
|
Display_ArwingWings(&gActorTeamArwing);
|
2023-12-24 22:28:35 +03:00
|
|
|
} else if (gLevelType == LEVELTYPE_PLANET) {
|
2024-03-21 23:19:38 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40018A0);
|
2024-05-25 20:17:03 +03:00
|
|
|
} else if (gPlayer[0].wingPosition == 2) {
|
2024-03-17 02:10:21 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_4003BD0);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-03-17 02:10:21 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_4007870);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
Actor_DrawEngineAndContrails(this);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-08-15 11:10:00 +03:00
|
|
|
void MeMolarRock_Draw(MeMolarRock* this) {
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-08-15 12:19:21 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aMeMolarRockDL);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-08-15 11:10:00 +03:00
|
|
|
void MeMeteor2_Draw(MeMeteor2* this) {
|
2024-08-25 01:36:53 +03:00
|
|
|
RCP_SetupDL_29(this->work_046, gFogGreen, gFogBlue, gFogAlpha, this->work_048, gFogFar);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aMeMeteor1DL);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-08-15 11:10:00 +03:00
|
|
|
void MeLaserCannon1_Draw(MeLaserCannon1* this) {
|
2024-08-25 01:36:53 +03:00
|
|
|
RCP_SetupDL_29(this->work_046, gFogGreen, gFogBlue, gFogAlpha, this->work_048, gFogFar);
|
2024-08-15 12:19:21 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aMeLaserCannon1DL);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-08-15 11:10:00 +03:00
|
|
|
void ActorMissileSeek_Draw(Actor* missile) {
|
2023-12-19 17:54:50 +03:00
|
|
|
f32 scale;
|
2023-11-22 17:56:29 +03:00
|
|
|
|
2024-08-15 11:10:00 +03:00
|
|
|
switch (missile->eventType) {
|
2023-11-22 17:56:29 +03:00
|
|
|
case 0:
|
|
|
|
gSPDisplayList(gMasterDisp++, D_1028230);
|
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-11-22 17:56:29 +03:00
|
|
|
case 1:
|
2023-12-14 17:41:43 +03:00
|
|
|
if (gCurrentLevel == LEVEL_AREA_6) {
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aAttacker3DL);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aGrangaFighter2DL);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-19 17:54:50 +03:00
|
|
|
scale = 2.0f;
|
2024-04-09 01:25:56 +03:00
|
|
|
if ((gGameFrameCount % 2) != 0) {
|
2023-12-19 17:54:50 +03:00
|
|
|
scale = 1.7f;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
|
2024-08-15 11:10:00 +03:00
|
|
|
missile->iwork[11] = 1;
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY);
|
2024-08-25 01:36:53 +03:00
|
|
|
Actor_DrawEngineGlow(missile, EG_GREEN);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-08-15 11:10:00 +03:00
|
|
|
void CoSkibot_Draw(CoSkibot* this) {
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, 0.0f, -124.0f, 0.0f, MTXF_APPLY);
|
2024-08-15 17:54:53 +03:00
|
|
|
Animation_GetFrameData(&aCoSkibotAnim, this->animFrame, this->vwork);
|
|
|
|
Animation_DrawSkeleton(1, aCoSkibotSkel, this->vwork, NULL, NULL, this, &gIdentityMatrix);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-08-15 11:10:00 +03:00
|
|
|
void CoRadar_Draw(CoRadar* this) {
|
|
|
|
if (this->timer_0BC != 0) {
|
2023-12-04 21:50:52 +03:00
|
|
|
RCP_SetupDL_27();
|
2023-11-22 17:56:29 +03:00
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
|
|
|
|
}
|
2024-08-15 17:54:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aCoRadarDL);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-04-03 02:20:08 +03:00
|
|
|
void func_edisplay_8005BAAC(void) {
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-04-03 02:20:08 +03:00
|
|
|
f32 D_edisplay_800CFCCC[] = {
|
2023-11-27 00:27:05 +03:00
|
|
|
0.0f, 0.05f, 0.03f, 0.02f, 0.01f, 0.05f, 0.0f, 0.02f,
|
|
|
|
};
|
|
|
|
|
2024-05-11 23:53:37 +03:00
|
|
|
void Object_SetShadowDL(ObjectId objId, s32 index) {
|
2023-11-22 17:56:29 +03:00
|
|
|
f32 temp_fv0;
|
|
|
|
f32 temp1;
|
|
|
|
f32 temp2;
|
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
switch (objId) {
|
2024-01-13 16:43:04 +03:00
|
|
|
case OBJ_EFFECT_374:
|
2024-01-24 17:45:55 +03:00
|
|
|
if (gEffects[index].state == 0) {
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Scale(gGfxMatrix, 1.2f, 0.0f, 1.2f, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-09-13 06:59:33 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aRadarMarkKaSaucererDL);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_64);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-05-02 23:46:51 +03:00
|
|
|
case OBJ_ACTOR_CUTSCENE:
|
2024-04-05 23:11:36 +03:00
|
|
|
case OBJ_ACTOR_TEAM_BOSS:
|
|
|
|
case OBJ_ACTOR_EVENT:
|
2024-05-11 23:53:37 +03:00
|
|
|
switch (gActors[index].eventType) {
|
2024-08-25 01:36:53 +03:00
|
|
|
case EVID_SPY_EYE:
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Scale(gGfxMatrix, 2.3f, 0.0f, 2.3f, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
|
|
|
gSPDisplayList(gMasterDisp++, D_102A010);
|
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-08-25 01:36:53 +03:00
|
|
|
case EVID_VE1_BLOCKER:
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_48);
|
2023-11-22 17:56:29 +03:00
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255);
|
|
|
|
gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 255);
|
2024-01-14 01:45:37 +03:00
|
|
|
temp_fv0 = gActors[index].fwork[15] * 3.0f;
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Scale(gGfxMatrix, temp_fv0, temp_fv0, temp_fv0, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-09-13 06:59:33 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aOrbDL);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-11-22 17:56:29 +03:00
|
|
|
default:
|
2024-04-03 02:20:08 +03:00
|
|
|
temp1 = D_edisplay_800CFCCC[gGameFrameCount % 8U];
|
|
|
|
temp2 = D_edisplay_800CFCCC[(gGameFrameCount + 4) % 8U];
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Scale(gGfxMatrix, 1.4f + temp1, 0.0f, 1.4f + temp2, MTXF_APPLY);
|
|
|
|
Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY);
|
|
|
|
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
|
|
|
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aArwingShadowDL);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-07-06 15:47:49 +03:00
|
|
|
case OBJ_BOSS_CO_GRANGA:
|
2024-08-15 12:19:21 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aCoShadow1DL);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-08-12 17:58:54 +03:00
|
|
|
case OBJ_BOSS_KA_SAUCERER:
|
2024-04-16 02:38:19 +03:00
|
|
|
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) {
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_64);
|
2023-11-22 17:56:29 +03:00
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 200);
|
|
|
|
}
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY);
|
2023-12-24 22:28:35 +03:00
|
|
|
Graphics_SetScaleMtx(150.0f);
|
2024-09-13 06:59:33 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aRadarMarkKaSaucererDL);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-07-06 15:47:49 +03:00
|
|
|
case OBJ_BOSS_CO_CARRIER:
|
2024-08-12 17:58:54 +03:00
|
|
|
case OBJ_BOSS_CO_CARRIER_LEFT:
|
|
|
|
case OBJ_BOSS_CO_CARRIER_UPPER:
|
|
|
|
case OBJ_BOSS_CO_CARRIER_BOTTOM:
|
2024-01-29 00:27:23 +03:00
|
|
|
COS_DEG(gBosses[index].obj.rot.z);
|
2024-04-26 01:01:25 +03:00
|
|
|
if (gGroundSurface == SURFACE_WATER) {
|
2023-11-22 17:56:29 +03:00
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 90);
|
|
|
|
} else {
|
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 150);
|
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
switch (objId) {
|
2024-07-06 15:47:49 +03:00
|
|
|
case OBJ_BOSS_CO_CARRIER:
|
2024-03-29 22:09:14 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_CO_6036840);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-12 17:58:54 +03:00
|
|
|
case OBJ_BOSS_CO_CARRIER_LEFT:
|
2024-03-29 22:09:14 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_CO_6036CD0);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-12 17:58:54 +03:00
|
|
|
case OBJ_BOSS_CO_CARRIER_UPPER:
|
|
|
|
case OBJ_BOSS_CO_CARRIER_BOTTOM:
|
2024-03-29 22:09:14 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_CO_60363B0);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-08-12 17:58:54 +03:00
|
|
|
case OBJ_ACTOR_CO_SKIBOT:
|
2023-11-22 17:56:29 +03:00
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 150);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, gActors[index].scale, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-08-15 12:19:21 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aCoShadow1DL);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-08-12 17:58:54 +03:00
|
|
|
case OBJ_ACTOR_TI_BOULDER:
|
2023-12-04 21:50:52 +03:00
|
|
|
RCP_SetupDL_48();
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_69);
|
2023-11-22 17:56:29 +03:00
|
|
|
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
|
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255);
|
|
|
|
gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateX(gGfxMatrix, gActors[index].fwork[0], MTXF_APPLY);
|
|
|
|
Matrix_RotateZ(gGfxMatrix, gActors[index].fwork[2], MTXF_APPLY);
|
|
|
|
Matrix_Scale(gGfxMatrix, gActors[index].scale, 1.0f, gActors[index].scale, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-09-13 06:59:33 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aOrbDL);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-08-12 17:58:54 +03:00
|
|
|
case OBJ_ACTOR_TI_DESERT_CRAWLER:
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_68);
|
2023-11-22 17:56:29 +03:00
|
|
|
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
|
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255);
|
|
|
|
gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 120.0f, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gGfxMatrix, gActors[index].fwork[1] * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateZ(gGfxMatrix, gActors[index].fwork[2] * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateY(gGfxMatrix, gActors[index].obj.rot.y * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_Scale(gGfxMatrix, 6.0f, 1.0f, 7.5f, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-09-13 06:59:33 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aOrbDL);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-08-12 17:58:54 +03:00
|
|
|
case OBJ_ACTOR_TI_BOMB:
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_69);
|
2023-11-22 17:56:29 +03:00
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255);
|
|
|
|
gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateX(gGfxMatrix, gActors[index].fwork[1], MTXF_APPLY);
|
|
|
|
Matrix_RotateZ(gGfxMatrix, gActors[index].fwork[2], MTXF_APPLY);
|
|
|
|
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 0.0f, MTXF_APPLY);
|
|
|
|
Matrix_Scale(gGfxMatrix, 1.2f, 1.0f, 1.2f, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-09-13 06:59:33 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aOrbDL);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-08-12 17:58:54 +03:00
|
|
|
case OBJ_ACTOR_MA_BOULDER:
|
2023-12-04 21:50:52 +03:00
|
|
|
RCP_SetupDL_48();
|
2023-11-22 17:56:29 +03:00
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255);
|
|
|
|
gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 255);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Scale(gGfxMatrix, 4.0f, 4.0f, 4.0f, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-09-13 06:59:33 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aOrbDL);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-08-12 17:58:54 +03:00
|
|
|
case OBJ_BOSS_VE1_GOLEMECH:
|
|
|
|
Venom1_Ve1Golemech_SetShadow(&gBosses[index]);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
void ItemCheckpoint_Draw(ItemCheckpoint* this) {
|
2023-11-22 17:56:29 +03:00
|
|
|
s32 i;
|
|
|
|
|
2024-05-11 23:53:37 +03:00
|
|
|
if (((gGameFrameCount & 0x18) != 0) && (this->state == 0)) {
|
2024-10-17 00:32:08 +03:00
|
|
|
FrameInterpolation_RecordOpenChild(this, 0);
|
2024-10-17 18:53:40 +03:00
|
|
|
FrameInterpolation_RecordMarker(__FILE__, __LINE__);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_64);
|
2023-11-22 17:56:29 +03:00
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Scale(gGfxMatrix, 3.2f, 3.2f, 3.2f, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
|
|
|
gDPSetTextureFilter(gMasterDisp++, G_TF_POINT);
|
|
|
|
gSPDisplayList(gMasterDisp++, D_1023C80);
|
|
|
|
gDPSetTextureFilter(gMasterDisp++, G_TF_BILERP);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2024-10-17 00:32:08 +03:00
|
|
|
FrameInterpolation_RecordCloseChild();
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-10-17 00:32:08 +03:00
|
|
|
FrameInterpolation_RecordOpenChild(this, 1);
|
2024-10-17 18:53:40 +03:00
|
|
|
FrameInterpolation_RecordMarker(__FILE__, __LINE__);
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_29);
|
2023-11-22 17:56:29 +03:00
|
|
|
gSPTexture(gMasterDisp++, 2000, 2000, 0, G_TX_RENDERTILE, G_ON);
|
|
|
|
gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateZ(gGfxMatrix, this->unk_58 * M_DTOR, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
|
|
|
|
for (i = 0; i < 8; i++) {
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateZ(gGfxMatrix, i * 45.0f * M_DTOR, MTXF_APPLY);
|
2024-05-02 23:46:51 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, 2.0f * this->width, 0.0f, 0.0f, MTXF_APPLY);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateZ(gGfxMatrix, (gGameFrameCount + (i * 110.0f)) * M_DTOR * 7.2f * this->unk_54, MTXF_APPLY);
|
2024-04-09 01:25:56 +03:00
|
|
|
Graphics_SetScaleMtx(2.0f * this->unk_50);
|
2023-11-22 17:56:29 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_101CAE0);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
gSPClearGeometryMode(gMasterDisp++, G_TEXTURE_GEN);
|
2024-10-17 00:32:08 +03:00
|
|
|
FrameInterpolation_RecordCloseChild();
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
void ItemSilverRing_Draw(ItemSilverRing* this) {
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_29);
|
2023-11-22 17:56:29 +03:00
|
|
|
gSPTexture(gMasterDisp++, 3000, 0, 0, G_TX_RENDERTILE, G_ON);
|
|
|
|
gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR);
|
2024-05-02 23:46:51 +03:00
|
|
|
Graphics_SetScaleMtx(this->width);
|
2023-11-22 17:56:29 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_101A570);
|
|
|
|
gSPClearGeometryMode(gMasterDisp++, G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR);
|
|
|
|
}
|
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
void ItemSilverStar_Draw(ItemSilverStar* this) {
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_29);
|
2023-11-22 17:56:29 +03:00
|
|
|
gSPTexture(gMasterDisp++, 3000, 0, 0, G_TX_RENDERTILE, G_ON);
|
|
|
|
gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR);
|
2024-05-02 23:46:51 +03:00
|
|
|
Graphics_SetScaleMtx(this->width);
|
2023-11-22 17:56:29 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_1019CA0);
|
|
|
|
gSPClearGeometryMode(gMasterDisp++, G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR);
|
|
|
|
}
|
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
void ItemGoldRing_Draw(ItemGoldRing* this) {
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_29);
|
2023-11-22 17:56:29 +03:00
|
|
|
gSPTexture(gMasterDisp++, 1900, 1700, 0, G_TX_RENDERTILE, G_ON);
|
|
|
|
gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR);
|
2024-05-02 23:46:51 +03:00
|
|
|
Graphics_SetScaleMtx(this->width);
|
2023-11-22 17:56:29 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_1016870);
|
|
|
|
gSPClearGeometryMode(gMasterDisp++, G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR);
|
|
|
|
}
|
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
void ItemBomb_Draw(ItemBomb* this) {
|
2023-12-14 17:41:43 +03:00
|
|
|
if (gCurrentLevel == LEVEL_AQUAS) {
|
2024-05-02 23:46:51 +03:00
|
|
|
Graphics_SetScaleMtx(this->width);
|
2024-03-17 07:06:28 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_blue_marine_3005980);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-05-02 23:46:51 +03:00
|
|
|
Graphics_SetScaleMtx(this->width * 0.1f);
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_29);
|
2023-11-22 17:56:29 +03:00
|
|
|
gSPTexture(gMasterDisp++, 2000, 2000, 0, G_TX_RENDERTILE, G_ON);
|
|
|
|
gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN);
|
|
|
|
gSPDisplayList(gMasterDisp++, D_10231A0);
|
|
|
|
gSPClearGeometryMode(gMasterDisp++, G_TEXTURE_GEN);
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_27);
|
2023-11-22 17:56:29 +03:00
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
|
|
|
|
gSPDisplayList(gMasterDisp++, D_1022E80);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
void ItemLasers_Draw(ItemLasers* this) {
|
2024-05-02 23:46:51 +03:00
|
|
|
Graphics_SetScaleMtx(this->width * 0.1f);
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_29);
|
2023-11-22 17:56:29 +03:00
|
|
|
gSPTexture(gMasterDisp++, 2000, 2000, 0, G_TX_RENDERTILE, G_ON);
|
|
|
|
gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN);
|
|
|
|
gSPDisplayList(gMasterDisp++, D_1019820);
|
|
|
|
gSPClearGeometryMode(gMasterDisp++, G_TEXTURE_GEN);
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_27);
|
2023-11-22 17:56:29 +03:00
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
|
|
|
|
gSPDisplayList(gMasterDisp++, D_101A8E0);
|
|
|
|
}
|
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
void ItemMeteoWarp_Draw(ItemMeteoWarp* this) {
|
2023-11-22 17:56:29 +03:00
|
|
|
s32 i;
|
|
|
|
|
2024-04-16 02:38:19 +03:00
|
|
|
this->obj.rot.y = (Math_Atan2F(gPlayer[gPlayerNum].cam.eye.x - this->obj.pos.x,
|
2024-05-02 23:46:51 +03:00
|
|
|
gPlayer[gPlayerNum].cam.eye.z - (this->obj.pos.z + gPathProgress)) *
|
2023-12-20 22:32:50 +03:00
|
|
|
180.0f) /
|
|
|
|
M_PI;
|
2024-04-09 01:25:56 +03:00
|
|
|
if (this->state != 0) {
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_41);
|
2024-04-09 01:25:56 +03:00
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, this->unk_44);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2023-12-14 17:41:43 +03:00
|
|
|
RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-01-22 06:28:02 +03:00
|
|
|
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK | G_LIGHTING);
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-11-22 17:56:29 +03:00
|
|
|
for (i = 0; i < 7; i++) {
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateZ(gGfxMatrix, (i * 360.0f / 7.0f) * M_DTOR, MTXF_APPLY);
|
2024-05-02 23:46:51 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, 0.0f, this->width, 0.0f, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
|
|
|
gSPDisplayList(gMasterDisp++, D_102FE80);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-11-22 17:56:29 +03:00
|
|
|
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK | G_LIGHTING);
|
|
|
|
}
|
|
|
|
|
2024-04-03 02:20:08 +03:00
|
|
|
void func_edisplay_8005D008(Object* obj, s32 drawType) {
|
2024-10-17 03:16:05 +03:00
|
|
|
bool isBanned = (obj->id >= OBJ_SCENERY_CO_BUILDING_5 &&
|
|
|
|
obj->id <= OBJ_SCENERY_CO_BUILDING_8 || obj->id == OBJ_SCENERY_CO_BUILDING_10);
|
|
|
|
bool skipRot = false;
|
|
|
|
|
|
|
|
if(isBanned){
|
|
|
|
f32 prevRot = obj->rot.y;
|
|
|
|
if (gPlayer[0].cam.eye.x < obj->pos.x) {
|
|
|
|
obj->rot.y = 271.0f;
|
|
|
|
} else {
|
|
|
|
obj->rot.y = 0.0f;
|
|
|
|
}
|
|
|
|
|
|
|
|
skipRot = prevRot != obj->rot.y;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-19 17:54:50 +03:00
|
|
|
if (drawType == 2) {
|
2024-05-02 23:46:51 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, gPathProgress, MTXF_APPLY);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Translate(gCalcMatrix, obj->pos.x, obj->pos.y, obj->pos.z, MTXF_NEW);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY);
|
2024-04-03 02:20:08 +03:00
|
|
|
Matrix_Copy(&D_edisplay_801615F0, gGfxMatrix);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2024-10-17 03:16:05 +03:00
|
|
|
if(isBanned && skipRot){
|
|
|
|
FrameInterpolation_ShouldInterpolateFrame(false);
|
|
|
|
}
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gCalcMatrix, obj->rot.x * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateZ(gCalcMatrix, obj->rot.z * M_DTOR, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-05-02 23:46:51 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, obj->pos.x, obj->pos.y, obj->pos.z + gPathProgress, MTXF_APPLY);
|
2024-04-03 02:20:08 +03:00
|
|
|
Matrix_Copy(&D_edisplay_801615F0, gGfxMatrix);
|
2024-10-17 03:16:05 +03:00
|
|
|
if(isBanned && skipRot){
|
|
|
|
FrameInterpolation_ShouldInterpolateFrame(false);
|
|
|
|
}
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gGfxMatrix, obj->rot.x * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateZ(gGfxMatrix, obj->rot.z * M_DTOR, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
|
|
|
}
|
2024-10-17 03:16:05 +03:00
|
|
|
|
|
|
|
if(isBanned && skipRot){
|
|
|
|
FrameInterpolation_ShouldInterpolateFrame(true);
|
|
|
|
}
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-04-03 02:20:08 +03:00
|
|
|
void func_edisplay_8005D1F0(Object* obj, s32 drawType) {
|
2023-12-19 17:54:50 +03:00
|
|
|
if (drawType == 2) {
|
2024-05-02 23:46:51 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, gPathProgress, MTXF_APPLY);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Translate(gCalcMatrix, obj->pos.x, obj->pos.y, obj->pos.z, MTXF_NEW);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY);
|
2024-04-03 02:20:08 +03:00
|
|
|
Matrix_Copy(&D_edisplay_801615F0, gGfxMatrix);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gCalcMatrix, obj->rot.x * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateZ(gCalcMatrix, obj->rot.z * M_DTOR, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-05-02 23:46:51 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, obj->pos.x, obj->pos.y, obj->pos.z + gPathProgress, MTXF_APPLY);
|
2024-04-03 02:20:08 +03:00
|
|
|
Matrix_Copy(&D_edisplay_801615F0, gGfxMatrix);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gGfxMatrix, obj->rot.x * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateZ(gGfxMatrix, obj->rot.z * M_DTOR, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-03 02:20:08 +03:00
|
|
|
void func_edisplay_8005D3CC(Object* obj, f32 xRot, f32 yRot, f32 zRot, s32 drawType) {
|
2023-12-19 17:54:50 +03:00
|
|
|
if (drawType == 2) {
|
2024-05-02 23:46:51 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, gPathProgress, MTXF_APPLY);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Translate(gCalcMatrix, obj->pos.x, obj->pos.y, obj->pos.z, MTXF_NEW);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY);
|
2024-04-03 02:20:08 +03:00
|
|
|
Matrix_Copy(&D_edisplay_801615F0, gGfxMatrix);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gCalcMatrix, M_DTOR * xRot, MTXF_APPLY);
|
|
|
|
Matrix_RotateZ(gCalcMatrix, M_DTOR * zRot, MTXF_APPLY);
|
|
|
|
Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gCalcMatrix, obj->rot.x * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateZ(gCalcMatrix, obj->rot.z * M_DTOR, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-05-02 23:46:51 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, obj->pos.x, obj->pos.y, obj->pos.z + gPathProgress, MTXF_APPLY);
|
2024-04-03 02:20:08 +03:00
|
|
|
Matrix_Copy(&D_edisplay_801615F0, gGfxMatrix);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateY(gGfxMatrix, M_DTOR * yRot, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gGfxMatrix, M_DTOR * xRot, MTXF_APPLY);
|
|
|
|
Matrix_RotateZ(gGfxMatrix, M_DTOR * zRot, MTXF_APPLY);
|
|
|
|
Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gGfxMatrix, obj->rot.x * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateZ(gGfxMatrix, obj->rot.z * M_DTOR, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-23 05:51:20 +03:00
|
|
|
void Scenery_Draw(Scenery* this, s32 arg1) {
|
2024-04-09 01:25:56 +03:00
|
|
|
this->obj.pos.y += gCameraShakeY;
|
|
|
|
func_edisplay_8005D008(&this->obj, this->info.drawType);
|
|
|
|
this->obj.pos.y -= gCameraShakeY;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
if (this->info.drawType == 0) {
|
2024-07-06 15:47:49 +03:00
|
|
|
if ((this->obj.id == OBJ_SCENERY_CO_TOWER) || (this->obj.id == OBJ_SCENERY_CO_ROCKWALL) ||
|
2024-08-12 17:58:54 +03:00
|
|
|
(this->obj.id == OBJ_SCENERY_CO_HIGHWAY_4) || (this->obj.id == OBJ_SCENERY_VE1_WALL_3)) {
|
2023-12-14 17:41:43 +03:00
|
|
|
RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
2023-11-22 17:56:29 +03:00
|
|
|
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-11-22 17:56:29 +03:00
|
|
|
if (arg1 < 0) {
|
2024-05-02 23:46:51 +03:00
|
|
|
Object_ApplyWaterDistortion();
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, this->info.dList);
|
2023-12-14 17:41:43 +03:00
|
|
|
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-07-06 15:47:49 +03:00
|
|
|
if (this->obj.id == OBJ_SCENERY_CO_HIGHWAY_3) {
|
2023-11-22 17:56:29 +03:00
|
|
|
if (arg1 < 0) {
|
|
|
|
return; // weird control flow
|
|
|
|
}
|
2023-12-14 17:41:43 +03:00
|
|
|
RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-05-02 23:46:51 +03:00
|
|
|
Object_SetCullDirection(arg1);
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-11-22 17:56:29 +03:00
|
|
|
if (arg1 < 0) {
|
2024-05-02 23:46:51 +03:00
|
|
|
Object_ApplyWaterDistortion();
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, this->info.dList);
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-07-06 15:47:49 +03:00
|
|
|
if (this->obj.id == OBJ_SCENERY_CO_HIGHWAY_3) {
|
2023-12-14 17:41:43 +03:00
|
|
|
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
2024-04-09 01:25:56 +03:00
|
|
|
} else if (this->info.draw != NULL) {
|
2024-05-02 23:46:51 +03:00
|
|
|
Object_SetCullDirection(arg1);
|
2024-04-09 01:25:56 +03:00
|
|
|
this->info.draw(&this->obj);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
void Sprite_Draw(Sprite* this, s32 arg1) {
|
2023-11-22 17:56:29 +03:00
|
|
|
if (arg1 >= 0) {
|
2024-04-09 01:25:56 +03:00
|
|
|
this->obj.pos.y += gCameraShakeY;
|
|
|
|
func_edisplay_8005D008(&this->obj, 0);
|
|
|
|
this->obj.pos.y -= gCameraShakeY;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
if (this->info.drawType == 0) {
|
|
|
|
gSPDisplayList(gMasterDisp++, this->info.dList);
|
|
|
|
} else if (this->info.draw != NULL) {
|
|
|
|
this->info.draw(&this->obj);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
void Actor_DrawOnRails(Actor* this) {
|
2023-11-27 00:27:05 +03:00
|
|
|
Vec3f sp34 = { 0.0f, 0.0f, 0.0f };
|
2023-11-22 17:56:29 +03:00
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
if (this->info.draw != NULL) {
|
|
|
|
switch (this->obj.id) {
|
2024-08-12 17:58:54 +03:00
|
|
|
case OBJ_ACTOR_ME_MORA:
|
|
|
|
MeMora_Draw(this);
|
2023-11-22 17:56:29 +03:00
|
|
|
return;
|
2024-08-12 17:58:54 +03:00
|
|
|
case OBJ_ACTOR_ZO_DODORA:
|
|
|
|
Zoness_ZoDodora_Draw(this);
|
2023-11-22 17:56:29 +03:00
|
|
|
return;
|
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-05-11 23:53:37 +03:00
|
|
|
if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->eventType == EVID_200)) {
|
2024-08-12 17:58:54 +03:00
|
|
|
MeMora_Draw(this);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-04-09 01:25:56 +03:00
|
|
|
if (this->info.unk_19 != 0) {
|
|
|
|
this->obj.pos.y += gCameraShakeY;
|
|
|
|
func_edisplay_8005D008(&this->obj, this->info.drawType);
|
|
|
|
this->obj.pos.y -= gCameraShakeY;
|
2024-08-25 01:36:53 +03:00
|
|
|
} else if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->eventType != EVID_A6_UMBRA_STATION)) {
|
2024-04-09 01:25:56 +03:00
|
|
|
func_edisplay_8005D3CC(&this->obj, this->vwork[29].x, this->vwork[29].y,
|
2024-05-11 23:53:37 +03:00
|
|
|
this->vwork[29].z + this->rot_0F4.z, this->info.drawType);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-04-09 01:25:56 +03:00
|
|
|
func_edisplay_8005D008(&this->obj, this->info.drawType);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
if (this->info.drawType == 0) {
|
|
|
|
gSPDisplayList(gMasterDisp++, this->info.dList);
|
2024-05-07 01:45:24 +03:00
|
|
|
Object_UpdateSfxSource(this->sfxSource);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-04-09 01:25:56 +03:00
|
|
|
this->info.draw(&this->obj);
|
2024-05-07 01:45:24 +03:00
|
|
|
Object_UpdateSfxSource(this->sfxSource);
|
2024-04-09 01:25:56 +03:00
|
|
|
if (((this->obj.id == OBJ_ACTOR_TEAM_BOSS) ||
|
2024-08-15 17:54:53 +03:00
|
|
|
((this->obj.id == OBJ_ACTOR_SX_SLIPPY) && (this->animFrame > 0))) &&
|
2024-04-09 01:25:56 +03:00
|
|
|
(gReflectY > 0)) {
|
|
|
|
Matrix_MultVec3f(gGfxMatrix, &sp34, &gTeamArrowsViewPos[this->aiType]);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
2024-04-25 07:14:49 +03:00
|
|
|
if ((this->lockOnTimers[TEAM_ID_FOX] != 0) && (gReflectY > 0)) {
|
2024-05-02 23:46:51 +03:00
|
|
|
sp34.y += this->info.targetOffset;
|
|
|
|
Matrix_MultVec3f(gGfxMatrix, &sp34, &gLockOnTargetViewPos[TEAM_ID_FOX]);
|
|
|
|
if (gLockOnTargetViewPos[TEAM_ID_FOX].z > -200.0f) {
|
2024-04-25 07:14:49 +03:00
|
|
|
this->lockOnTimers[TEAM_ID_FOX] = 0;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
void Actor_DrawAllRange(Actor* this) {
|
2024-05-02 23:46:51 +03:00
|
|
|
s32 playerNum;
|
2024-08-15 11:10:00 +03:00
|
|
|
Vec3f srcViewPos = { 0.0f, 0.0f, 0.0f };
|
2023-11-22 17:56:29 +03:00
|
|
|
f32 var_fa1;
|
|
|
|
f32 var_ft5;
|
|
|
|
f32 var_fv0;
|
|
|
|
f32 var_fv1;
|
|
|
|
|
2024-05-02 23:46:51 +03:00
|
|
|
sDrewActor = false;
|
2024-04-09 01:25:56 +03:00
|
|
|
if (this->info.drawType == 2) {
|
2024-05-02 23:46:51 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, gPathProgress, MTXF_APPLY);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Translate(gCalcMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, MTXF_NEW);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY);
|
2024-08-15 11:10:00 +03:00
|
|
|
Matrix_MultVec3f(gGfxMatrix, &srcViewPos, &sViewPos);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-11-22 17:56:29 +03:00
|
|
|
var_fv0 = 0.0f;
|
|
|
|
var_fv1 = -12000.0f;
|
2024-04-09 01:25:56 +03:00
|
|
|
if ((this->obj.id == OBJ_ACTOR_ALLRANGE) && (this->aiType >= AI360_GREAT_FOX)) {
|
2023-11-22 17:56:29 +03:00
|
|
|
var_fv0 = 1000.0f;
|
|
|
|
var_fv1 = -25000.0f;
|
|
|
|
}
|
2024-05-02 23:46:51 +03:00
|
|
|
if ((var_fv0 > sViewPos.z) && (sViewPos.z > var_fv1)) {
|
|
|
|
if (fabsf(sViewPos.x) < (fabsf(sViewPos.z * 0.5f) + 500.0f)) {
|
|
|
|
if (fabsf(sViewPos.y) < (fabsf(sViewPos.z * 0.5f) + 500.0f)) {
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY);
|
2024-04-09 01:25:56 +03:00
|
|
|
this->info.draw(&this->obj);
|
2024-05-02 23:46:51 +03:00
|
|
|
sDrewActor = true;
|
2024-04-16 02:38:19 +03:00
|
|
|
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (this->obj.id == OBJ_ACTOR_ALLRANGE) &&
|
2024-04-09 01:25:56 +03:00
|
|
|
(this->aiType == AI360_MISSILE)) {
|
2024-05-02 23:46:51 +03:00
|
|
|
gTeamArrowsViewPos[0] = sViewPos;
|
2023-12-14 20:58:53 +03:00
|
|
|
}
|
|
|
|
}
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, MTXF_APPLY);
|
2024-08-15 11:10:00 +03:00
|
|
|
Matrix_MultVec3f(gGfxMatrix, &srcViewPos, &sViewPos);
|
|
|
|
|
2024-04-16 02:38:19 +03:00
|
|
|
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) ||
|
|
|
|
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) ||
|
2024-04-09 01:25:56 +03:00
|
|
|
((this->obj.id == OBJ_ACTOR_ALLRANGE) && (this->aiType >= AI360_GREAT_FOX)) ||
|
2024-05-02 23:46:51 +03:00
|
|
|
((this->obj.id == OBJ_ACTOR_CUTSCENE) && (this->info.bonus != 0))) {
|
2023-11-22 17:56:29 +03:00
|
|
|
var_ft5 = var_fv0 = 3000.0f;
|
|
|
|
var_fv1 = -29000.0f;
|
|
|
|
var_fa1 = 0.7f;
|
|
|
|
} else {
|
|
|
|
var_ft5 = 500.0f;
|
|
|
|
var_fv0 = 0.0f;
|
|
|
|
var_fv1 = -20000.0f;
|
|
|
|
var_fa1 = 0.5f;
|
|
|
|
}
|
2024-05-02 23:46:51 +03:00
|
|
|
if ((var_fv0 > sViewPos.z) && (sViewPos.z > var_fv1)) {
|
|
|
|
if (fabsf(sViewPos.x) < (fabsf(sViewPos.z * var_fa1) + var_ft5)) {
|
|
|
|
if (fabsf(sViewPos.y) < (fabsf(sViewPos.z * var_fa1) + var_ft5)) {
|
2024-04-09 01:25:56 +03:00
|
|
|
if (this->info.draw != NULL) {
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY);
|
2023-12-14 20:58:53 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-04-09 01:25:56 +03:00
|
|
|
this->info.draw(&this->obj);
|
2024-05-02 23:46:51 +03:00
|
|
|
sDrewActor = true;
|
2024-04-16 02:38:19 +03:00
|
|
|
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) &&
|
2024-04-09 01:25:56 +03:00
|
|
|
(((this->obj.id == OBJ_ACTOR_ALLRANGE) &&
|
|
|
|
((this->aiType <= AI360_PEPPY) || (this->aiType == AI360_KATT) ||
|
|
|
|
(this->aiType == AI360_BILL))) ||
|
|
|
|
(this->obj.id == OBJ_ACTOR_TEAM_BOSS))) {
|
2024-05-02 23:46:51 +03:00
|
|
|
gTeamArrowsViewPos[this->aiType] = sViewPos;
|
2023-12-14 20:58:53 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-05-02 23:46:51 +03:00
|
|
|
if (!sDrewActor) {
|
2024-04-23 05:51:20 +03:00
|
|
|
this->lockOnTimers[gPlayerNum] = 0;
|
2024-08-12 17:58:54 +03:00
|
|
|
if ((this->obj.id == OBJ_ACTOR_DEBRIS) || (this->obj.id == OBJ_ACTOR_AND_BRAIN_WASTE)) {
|
2024-04-09 01:25:56 +03:00
|
|
|
Object_Kill(&this->obj, this->sfxSource);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-05-02 23:46:51 +03:00
|
|
|
for (playerNum = 0; playerNum < gCamCount; playerNum++) {
|
|
|
|
if (this->lockOnTimers[playerNum] != 0) {
|
|
|
|
gLockOnTargetViewPos[playerNum] = sViewPos;
|
|
|
|
gLockOnTargetViewPos[playerNum].y += this->info.targetOffset;
|
|
|
|
if ((playerNum == gPlayerNum) && (gLockOnTargetViewPos[playerNum].z > -300.0f)) {
|
|
|
|
this->lockOnTimers[playerNum] = 0;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-05-07 01:45:24 +03:00
|
|
|
Object_SetSfxSourceToView(this->sfxSource, &sViewPos);
|
2024-05-02 23:46:51 +03:00
|
|
|
this->iwork[24] = sDrewActor;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
void Boss_Draw(Boss* this, s32 arg1) {
|
2023-11-22 17:56:29 +03:00
|
|
|
f32 var_fa1;
|
|
|
|
f32 var_ft5;
|
|
|
|
f32 var_fv0;
|
|
|
|
f32 var_fv1;
|
|
|
|
f32 sp3C;
|
2024-05-07 01:45:24 +03:00
|
|
|
Vec3f origin = { 0.0f, 0.0f, 0.0f };
|
2023-11-22 17:56:29 +03:00
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
if (this->info.unk_19 != 0) {
|
2024-05-11 23:53:37 +03:00
|
|
|
this->obj.pos.y += this->yOffset + gCameraShakeY;
|
2024-04-09 01:25:56 +03:00
|
|
|
func_edisplay_8005D1F0(&this->obj, this->info.drawType);
|
2024-05-11 23:53:37 +03:00
|
|
|
this->obj.pos.y -= this->yOffset + gCameraShakeY;
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-04-09 01:25:56 +03:00
|
|
|
func_edisplay_8005D1F0(&this->obj, this->info.drawType);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-05-07 01:45:24 +03:00
|
|
|
Matrix_MultVec3f(&D_edisplay_801615F0, &origin, &D_edisplay_801615D0);
|
|
|
|
Object_SetSfxSourceToView(this->sfxSource, &D_edisplay_801615D0);
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-08-12 17:58:54 +03:00
|
|
|
if ((this->obj.id == OBJ_BOSS_KA_SAUCERER) || (this->obj.id == OBJ_BOSS_KA_FLBASE)) {
|
2023-11-22 17:56:29 +03:00
|
|
|
var_fa1 = 6000.0f;
|
|
|
|
var_fv0 = 6000.0f;
|
|
|
|
var_ft5 = 0.9f;
|
|
|
|
var_fv1 = -20000.0f;
|
2024-07-06 15:47:49 +03:00
|
|
|
} else if (this->obj.id == OBJ_BOSS_SZ_GREAT_FOX) {
|
2023-11-22 17:56:29 +03:00
|
|
|
var_fv1 = -25000.0f;
|
|
|
|
var_ft5 = 0.7f;
|
|
|
|
var_fa1 = 3000.0f;
|
|
|
|
var_fv0 = 2000.0f;
|
|
|
|
} else {
|
|
|
|
var_ft5 = 0.5f;
|
|
|
|
var_fa1 = 2000.0f;
|
|
|
|
var_fv0 = 1000.0f;
|
|
|
|
var_fv1 = -15000.0f;
|
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-11-22 17:56:29 +03:00
|
|
|
sp3C = -1.0f;
|
2024-04-03 02:20:08 +03:00
|
|
|
if ((D_edisplay_801615D0.z < var_fv0) && (var_fv1 < D_edisplay_801615D0.z)) {
|
|
|
|
if (fabsf(D_edisplay_801615D0.x) < (fabsf(D_edisplay_801615D0.z * var_ft5) + var_fa1)) {
|
|
|
|
if (fabsf(D_edisplay_801615D0.y) < (fabsf(D_edisplay_801615D0.z * var_ft5) + var_fa1)) {
|
2023-12-14 20:58:53 +03:00
|
|
|
sp3C = 1.0f;
|
2024-08-12 17:58:54 +03:00
|
|
|
if (this->obj.id != OBJ_BOSS_BO_BASE) {
|
|
|
|
if (this->obj.id != OBJ_BOSS_KA_SAUCERER) {
|
2024-04-23 05:51:20 +03:00
|
|
|
Display_SetSecondLight(&this->obj.pos);
|
2023-12-14 20:58:53 +03:00
|
|
|
}
|
2024-04-09 01:25:56 +03:00
|
|
|
if (this->info.drawType != 2) {
|
2023-12-14 20:58:53 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
|
|
|
}
|
|
|
|
if (arg1 < 0) {
|
2024-05-02 23:46:51 +03:00
|
|
|
Object_ApplyWaterDistortion();
|
2023-12-14 20:58:53 +03:00
|
|
|
}
|
2024-04-09 01:25:56 +03:00
|
|
|
this->info.draw(&this->obj);
|
2023-12-14 20:58:53 +03:00
|
|
|
}
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-04-03 02:20:08 +03:00
|
|
|
D_edisplay_801615D0.y = sp3C;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-08-12 17:58:54 +03:00
|
|
|
if (this->obj.id == OBJ_BOSS_BO_BASE) {
|
2024-04-09 01:25:56 +03:00
|
|
|
this->vwork[30] = D_edisplay_801615D0;
|
2024-04-23 05:51:20 +03:00
|
|
|
Display_SetSecondLight(&this->obj.pos);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-04-09 01:25:56 +03:00
|
|
|
this->info.draw(&this->obj);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
void Effect_DrawOnRails(Effect* this, s32 arg1) {
|
|
|
|
if ((arg1 < 0) && (this->obj.pos.y < 7.0f)) {
|
2023-11-22 17:56:29 +03:00
|
|
|
return;
|
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-07-06 15:47:49 +03:00
|
|
|
if ((this->obj.id == OBJ_EFFECT_ENEMY_LASER_1) || (this->obj.id == OBJ_EFFECT_369)) {
|
2024-04-09 01:25:56 +03:00
|
|
|
func_edisplay_8005D3CC(&this->obj, this->unk_60.x, this->unk_60.y, this->unk_60.z, 0);
|
|
|
|
} else if (this->info.unk_14 == -1) {
|
|
|
|
this->obj.pos.y += gCameraShakeY;
|
|
|
|
func_edisplay_8005D008(&this->obj, 0);
|
|
|
|
this->obj.pos.y -= gCameraShakeY;
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-04-09 01:25:56 +03:00
|
|
|
func_edisplay_8005D008(&this->obj, 0);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
if (this->info.draw != NULL) {
|
|
|
|
this->info.draw(&this->obj);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
void Effect_DrawAllRange(Effect* this) {
|
2024-08-15 11:10:00 +03:00
|
|
|
Vec3f src = { 0.0f, 0.0f, 0.0f };
|
|
|
|
Vec3f dest;
|
2024-05-02 23:46:51 +03:00
|
|
|
f32 minZ;
|
|
|
|
u8 drawn = false;
|
2023-11-22 17:56:29 +03:00
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
if (this->info.unk_14 == -1) {
|
2024-05-02 23:46:51 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y + gCameraShakeY, this->obj.pos.z + gPathProgress,
|
2024-04-16 02:38:19 +03:00
|
|
|
MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-05-02 23:46:51 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + gPathProgress, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
|
|
|
Matrix_MultVec3f(gGfxMatrix, &src, &dest);
|
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
if ((gCurrentLevel == LEVEL_SECTOR_Z) || (gCurrentLevel == LEVEL_BOLSE)) {
|
2024-05-02 23:46:51 +03:00
|
|
|
minZ = -20000.0f;
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-05-02 23:46:51 +03:00
|
|
|
minZ = -10000.0f;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
|
|
|
if ((dest.z < 0.0f) && (minZ < dest.z)) {
|
|
|
|
if (fabsf(dest.x) < (fabsf(dest.z * 0.5f) + 500.0f)) {
|
|
|
|
if (fabsf(dest.y) < (fabsf(dest.z * 0.5f) + 500.0f)) {
|
2024-04-09 01:25:56 +03:00
|
|
|
if (this->info.draw != NULL) {
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY);
|
2023-12-14 20:58:53 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-04-09 01:25:56 +03:00
|
|
|
this->info.draw(&this->obj);
|
2023-12-14 20:58:53 +03:00
|
|
|
}
|
2024-05-02 23:46:51 +03:00
|
|
|
drawn = true;
|
2023-12-14 20:58:53 +03:00
|
|
|
}
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
|
|
|
Object_SetSfxSourceToView(this->sfxSource, &dest);
|
|
|
|
|
2024-07-06 15:47:49 +03:00
|
|
|
if (!drawn && (this->obj.id != OBJ_EFFECT_CLOUDS) && (this->obj.id != OBJ_EFFECT_TIMED_SFX) && (!gVersusMode)) {
|
2024-04-09 01:25:56 +03:00
|
|
|
Object_Kill(&this->obj, this->sfxSource);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
void Item_Draw(Item* this, s32 arg1) {
|
2024-08-15 11:10:00 +03:00
|
|
|
Vec3f src = { 0.0f, 0.0f, 0.0f };
|
|
|
|
Vec3f dest;
|
2024-05-02 23:46:51 +03:00
|
|
|
u8 drawn;
|
2023-11-22 17:56:29 +03:00
|
|
|
|
2024-05-02 23:46:51 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + gPathProgress, MTXF_APPLY);
|
2024-08-15 11:10:00 +03:00
|
|
|
Matrix_MultVec3f(gGfxMatrix, &src, &dest);
|
|
|
|
|
2024-05-02 23:46:51 +03:00
|
|
|
drawn = false;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
|
|
|
if ((dest.z < 0.0f) && (dest.z > -12000.0f)) {
|
|
|
|
if (fabsf(dest.x) < (fabsf(dest.z * 0.5f) + 500.0f)) {
|
|
|
|
if (fabsf(dest.y) < (fabsf(dest.z * 0.5f) + 500.0f)) {
|
2024-04-09 01:25:56 +03:00
|
|
|
if (this->info.draw != NULL) {
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY);
|
2023-12-14 20:58:53 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-04-09 01:25:56 +03:00
|
|
|
if (this->info.drawType == 0) {
|
|
|
|
gSPDisplayList(gMasterDisp++, this->info.dList);
|
2023-12-14 20:58:53 +03:00
|
|
|
} else {
|
2024-04-09 01:25:56 +03:00
|
|
|
this->info.draw(&this->obj);
|
2023-12-14 20:58:53 +03:00
|
|
|
}
|
|
|
|
}
|
2024-05-02 23:46:51 +03:00
|
|
|
drawn = true;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
|
|
|
Object_SetSfxSourceToView(this->sfxSource, &dest);
|
|
|
|
|
2024-05-02 23:46:51 +03:00
|
|
|
if (!drawn && (gLevelMode == LEVELMODE_ALL_RANGE) && (gCamCount == 1) && (this->obj.id < OBJ_ITEM_GOLD_RING) &&
|
2023-12-24 22:28:35 +03:00
|
|
|
(gCurrentLevel != LEVEL_VENOM_ANDROSS)) {
|
2024-04-09 01:25:56 +03:00
|
|
|
Object_Kill(&this->obj, this->sfxSource);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-08-25 01:36:53 +03:00
|
|
|
void ActorAllRange_DrawShadow(ActorAllRange* this) {
|
|
|
|
Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->fwork[25] + 3.0f, this->obj.pos.z, MTXF_APPLY);
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
if (gCurrentLevel == LEVEL_FORTUNA) {
|
2024-08-25 01:36:53 +03:00
|
|
|
Matrix_RotateY(gGfxMatrix, this->fwork[27], MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gGfxMatrix, this->fwork[26], MTXF_APPLY);
|
|
|
|
Matrix_RotateZ(gGfxMatrix, this->fwork[28], MTXF_APPLY);
|
|
|
|
Matrix_RotateY(gGfxMatrix, -this->fwork[27], MTXF_APPLY);
|
2024-04-16 02:38:19 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Scale(gGfxMatrix, 1.4f, 0.0f, 1.4f, MTXF_APPLY);
|
2024-08-25 01:36:53 +03:00
|
|
|
Matrix_RotateY(gGfxMatrix, (this->obj.rot.y + 180.0f) * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-08-25 01:36:53 +03:00
|
|
|
if (this->aiType <= AI360_PEPPY) {
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aArwingShadowDL);
|
2023-12-14 17:41:43 +03:00
|
|
|
} else if (gCurrentLevel == LEVEL_KATINA) {
|
2024-08-25 01:36:53 +03:00
|
|
|
if ((this->animFrame == 1) || (this->animFrame == 2)) {
|
|
|
|
gSPDisplayList(gMasterDisp++, aKaCornerianFighterShadowDL);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aKaEnemyShadowDL);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-25 01:36:53 +03:00
|
|
|
} else if ((this->aiType <= AI360_ANDREW) || (gCurrentLevel != LEVEL_FORTUNA)) {
|
|
|
|
gSPDisplayList(gMasterDisp++, aStarWolfShadowDL);
|
2023-12-14 17:41:43 +03:00
|
|
|
} else if (gCurrentLevel == LEVEL_FORTUNA) {
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aFoEnemyShadowDL);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-08-25 01:36:53 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, aStarWolfShadowDL);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-20 22:18:31 +03:00
|
|
|
void Object_DrawShadow(s32 index, Object* obj) {
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_66);
|
2023-11-22 17:56:29 +03:00
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 180);
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-04-05 23:11:36 +03:00
|
|
|
if (obj->id == OBJ_ACTOR_ALLRANGE) {
|
2024-04-20 22:18:31 +03:00
|
|
|
ActorAllRange_DrawShadow(&gActors[index]);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2023-12-19 17:54:50 +03:00
|
|
|
switch (obj->id) {
|
2024-08-12 17:58:54 +03:00
|
|
|
case OBJ_ACTOR_TI_BOULDER:
|
2024-04-23 05:51:20 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f + gActors[index].fwork[1],
|
2024-05-02 23:46:51 +03:00
|
|
|
obj->pos.z + gPathProgress, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-08-12 17:58:54 +03:00
|
|
|
case OBJ_ACTOR_TI_DESERT_CRAWLER:
|
|
|
|
case OBJ_ACTOR_TI_BOMB:
|
2024-04-23 05:51:20 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f + gActors[index].fwork[0],
|
2024-05-02 23:46:51 +03:00
|
|
|
obj->pos.z + gPathProgress, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-08-12 17:58:54 +03:00
|
|
|
case OBJ_BOSS_KA_SAUCERER:
|
2024-04-23 05:51:20 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f + gCameraShakeY, obj->pos.z, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-11-22 17:56:29 +03:00
|
|
|
default:
|
2024-05-02 23:46:51 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f, obj->pos.z + gPathProgress, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
break;
|
|
|
|
}
|
2024-05-02 23:46:51 +03:00
|
|
|
if ((gGroundType != 4) || (obj->id == OBJ_ACTOR_EVENT) || (obj->id == OBJ_ACTOR_CUTSCENE) ||
|
2024-04-05 23:11:36 +03:00
|
|
|
(obj->id == OBJ_ACTOR_TEAM_BOSS)) {
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Scale(gGfxMatrix, 1.0f, 0.0f, 1.0f, MTXF_APPLY);
|
|
|
|
Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-08-12 17:58:54 +03:00
|
|
|
if ((obj->id < OBJ_ACTOR_MAX) && (obj->id != OBJ_ACTOR_TI_BOULDER) &&
|
|
|
|
(obj->id != OBJ_ACTOR_TI_DESERT_CRAWLER) && (obj->id != OBJ_ACTOR_TI_BOMB)) {
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateX(gGfxMatrix, obj->rot.x * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateZ(gGfxMatrix, obj->rot.z * M_DTOR, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-05-11 23:53:37 +03:00
|
|
|
Object_SetShadowDL(obj->id, index);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-05 23:11:36 +03:00
|
|
|
void Object_ClampSfxSource(f32* sfxSrc) {
|
2024-01-21 23:42:06 +03:00
|
|
|
if (sfxSrc[0] > 5000.0f) {
|
|
|
|
sfxSrc[0] = 5000.0f;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-01-21 23:42:06 +03:00
|
|
|
if (sfxSrc[0] < -5000.0f) {
|
|
|
|
sfxSrc[0] = -5000.0f;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-01-21 23:42:06 +03:00
|
|
|
if (sfxSrc[1] > 2000.0f) {
|
|
|
|
sfxSrc[1] = 2000.0f;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-01-21 23:42:06 +03:00
|
|
|
if (sfxSrc[1] < -2000.0f) {
|
|
|
|
sfxSrc[1] = -2000.0f;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-01-21 23:42:06 +03:00
|
|
|
if (sfxSrc[2] > 5000.0f) {
|
|
|
|
sfxSrc[2] = 5000.0f;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-01-21 23:42:06 +03:00
|
|
|
if (sfxSrc[2] < -5000.0f) {
|
|
|
|
sfxSrc[2] = -5000.0f;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-05-07 01:45:24 +03:00
|
|
|
void Object_SetSfxSourceToPos(f32* sfxSrc, Vec3f* pos) {
|
2024-08-15 11:10:00 +03:00
|
|
|
Vec3f src;
|
|
|
|
Vec3f dest;
|
2023-11-22 17:56:29 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
if (gCamCount != 1) {
|
2024-01-21 23:42:06 +03:00
|
|
|
sfxSrc[0] = sfxSrc[1] = sfxSrc[2] = 0.0f;
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateY(gCalcMatrix, gPlayer[0].camYaw, MTXF_NEW);
|
|
|
|
Matrix_RotateX(gCalcMatrix, gPlayer[0].camPitch, MTXF_APPLY);
|
2024-08-15 11:10:00 +03:00
|
|
|
src.x = pos->x - gPlayCamEye.x;
|
|
|
|
src.y = pos->y - gPlayCamEye.y;
|
|
|
|
src.z = pos->z + gPathProgress - gPlayCamEye.z;
|
|
|
|
Matrix_MultVec3f(gCalcMatrix, &src, &dest);
|
|
|
|
sfxSrc[0] = dest.x;
|
|
|
|
sfxSrc[1] = dest.y;
|
|
|
|
sfxSrc[2] = dest.z;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-04-05 23:11:36 +03:00
|
|
|
Object_ClampSfxSource(sfxSrc);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-01-22 06:28:02 +03:00
|
|
|
|
2024-05-07 01:45:24 +03:00
|
|
|
void Object_UpdateSfxSource(f32* sfxSrc) {
|
2024-08-15 11:10:00 +03:00
|
|
|
Vec3f src = { 0.0f, 0.0f, 0.0f };
|
|
|
|
Vec3f dest;
|
2023-11-22 17:56:29 +03:00
|
|
|
s32 pad;
|
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
if (gCamCount != 1) {
|
2024-01-21 23:42:06 +03:00
|
|
|
sfxSrc[0] = sfxSrc[1] = sfxSrc[2] = 0.0f;
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-08-15 11:10:00 +03:00
|
|
|
Matrix_MultVec3f(&D_edisplay_801615F0, &src, &dest);
|
|
|
|
sfxSrc[0] = dest.x;
|
|
|
|
sfxSrc[1] = dest.y;
|
|
|
|
sfxSrc[2] = dest.z;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-04-05 23:11:36 +03:00
|
|
|
Object_ClampSfxSource(sfxSrc);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-05-07 01:45:24 +03:00
|
|
|
void Object_SetSfxSourceToView(f32* sfxSrc, Vec3f* viewPos) {
|
2023-12-14 17:41:43 +03:00
|
|
|
if (gCamCount != 1) {
|
2024-01-21 23:42:06 +03:00
|
|
|
sfxSrc[0] = sfxSrc[1] = sfxSrc[2] = 0.0f;
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-05-07 01:45:24 +03:00
|
|
|
sfxSrc[0] = viewPos->x;
|
|
|
|
sfxSrc[1] = viewPos->y;
|
|
|
|
sfxSrc[2] = viewPos->z;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-04-05 23:11:36 +03:00
|
|
|
Object_ClampSfxSource(sfxSrc);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-04-23 05:51:20 +03:00
|
|
|
void Scenery360_Draw(Scenery360* this) {
|
2023-11-27 00:27:05 +03:00
|
|
|
Vec3f sp54 = { 0.0f, 0.0f, 0.0f };
|
2023-11-22 17:56:29 +03:00
|
|
|
Vec3f sp48;
|
|
|
|
f32 sp44 = 1000.0f;
|
|
|
|
f32 sp40 = -12000.0f;
|
|
|
|
f32 sp3C = 2000.0f;
|
|
|
|
f32 sp38 = 0.5f;
|
|
|
|
|
2024-09-17 08:04:15 +03:00
|
|
|
if (this->obj.id == OBJ_SCENERY_SY_SHOGUN_SHIP) {
|
2023-11-22 17:56:29 +03:00
|
|
|
sp44 = 4000.0f;
|
|
|
|
sp40 = -13000.0f;
|
|
|
|
sp3C = 4500.0f;
|
2023-12-24 22:28:35 +03:00
|
|
|
} else if (gCurrentLevel == LEVEL_VENOM_ANDROSS) {
|
2023-11-22 17:56:29 +03:00
|
|
|
sp40 = -20000.0f;
|
|
|
|
sp38 = 0.4f;
|
2024-08-12 17:58:54 +03:00
|
|
|
} else if (this->obj.id == OBJ_SCENERY_VS_KA_FLBASE) {
|
2023-11-22 17:56:29 +03:00
|
|
|
sp44 = 6000.0f;
|
|
|
|
sp40 = -20000.0f;
|
|
|
|
sp3C = 6000.0f;
|
|
|
|
sp38 = 0.9f;
|
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-24 22:28:35 +03:00
|
|
|
if ((gLevelType == LEVELTYPE_PLANET) || (gCurrentLevel == LEVEL_BOLSE)) {
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y + gCameraShakeY, this->obj.pos.z, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_MultVec3f(gGfxMatrix, &sp54, &sp48);
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 20:58:53 +03:00
|
|
|
if ((sp48.z < sp44) && (sp40 < sp48.z)) {
|
|
|
|
if (fabsf(sp48.y) < (fabsf(sp48.z * sp38) + sp3C)) {
|
|
|
|
if (fabsf(sp48.x) < (fabsf(sp48.z * sp38) + sp3C)) {
|
2024-04-23 05:51:20 +03:00
|
|
|
Display_SetSecondLight(&this->obj.pos);
|
2024-08-12 17:58:54 +03:00
|
|
|
if (this->obj.id == OBJ_SCENERY_AND_PASSAGE) {
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY);
|
|
|
|
Matrix_RotateY(gGfxMatrix, M_PI / 2, MTXF_APPLY);
|
|
|
|
Matrix_Translate(gGfxMatrix, -551.0f, 0.0f, 0.0f, MTXF_APPLY);
|
2023-12-14 20:58:53 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-04-01 19:54:47 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_VE2_6007650);
|
2023-12-14 20:58:53 +03:00
|
|
|
} else {
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY);
|
2023-12-14 20:58:53 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-04-09 01:25:56 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, this->info.dList);
|
2023-12-14 20:58:53 +03:00
|
|
|
}
|
|
|
|
}
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-23 05:51:20 +03:00
|
|
|
void Display_SetSecondLight(Vec3f* pos) {
|
2023-11-22 17:56:29 +03:00
|
|
|
Vec3f sp9C;
|
|
|
|
f32 sp98;
|
|
|
|
f32 sp94;
|
2024-05-02 23:46:51 +03:00
|
|
|
f32 lightDist;
|
2023-11-22 17:56:29 +03:00
|
|
|
Vec3f sp84;
|
|
|
|
f32 temp1;
|
|
|
|
f32 temp2;
|
2024-05-02 23:46:51 +03:00
|
|
|
f32 lightFade;
|
2023-11-22 17:56:29 +03:00
|
|
|
Vec3f sp6C;
|
|
|
|
f32 temp3;
|
|
|
|
f32 pad;
|
|
|
|
|
2024-04-23 05:51:20 +03:00
|
|
|
if (gLight3Brightness > 0.01f) {
|
|
|
|
sp9C.x = pos->x - gLight3x;
|
|
|
|
sp9C.y = pos->y - gLight3y;
|
|
|
|
sp9C.z = pos->z - gLight3z;
|
2024-05-02 23:46:51 +03:00
|
|
|
lightDist = VEC3F_MAG(&sp9C);
|
2024-04-16 02:38:19 +03:00
|
|
|
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) {
|
2024-05-02 23:46:51 +03:00
|
|
|
lightFade = 700.0f / lightDist;
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-05-02 23:46:51 +03:00
|
|
|
lightFade = 200.0f / lightDist;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-05-02 23:46:51 +03:00
|
|
|
if (lightFade > 1.0f) {
|
|
|
|
lightFade = 1.0f;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-05-11 23:53:37 +03:00
|
|
|
if (gGroundClipMode == 2) {
|
2024-05-02 23:46:51 +03:00
|
|
|
lightFade = 1.0f;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-11-22 17:56:29 +03:00
|
|
|
sp94 = Math_Atan2F(sp9C.x, sp9C.z);
|
|
|
|
sp98 = -Math_Atan2F(sp9C.y, sqrtf(SQ(sp9C.x) + SQ(sp9C.z)));
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gCalcMatrix);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateZ(gCalcMatrix, gPlayer[gPlayerNum].camRoll * D_ctx_80177950 * M_DTOR, MTXF_NEW);
|
|
|
|
Matrix_RotateX(gCalcMatrix, -gPlayer[gPlayerNum].camPitch, MTXF_APPLY);
|
|
|
|
Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].camYaw + sp94, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gCalcMatrix, sp98, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
sp6C.x = 0.0f;
|
|
|
|
sp6C.y = 0.0f;
|
|
|
|
sp6C.z = -100.0f;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp6C, &sp84);
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gCalcMatrix);
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-05-02 23:46:51 +03:00
|
|
|
temp1 = gLight3R * gLight3Brightness * lightFade;
|
|
|
|
temp2 = gLight3G * gLight3Brightness * lightFade;
|
|
|
|
temp3 = gLight3B * gLight3Brightness * lightFade;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
Lights_SetTwoLights(&gMasterDisp, gLight1x, gLight1y, gLight1z, sp84.x, sp84.y, sp84.z, gLight1R, gLight1G,
|
|
|
|
gLight1B, temp1, temp2, temp3, gAmbientR, gAmbientG, gAmbientB);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-03 02:20:08 +03:00
|
|
|
bool func_edisplay_8005F9DC(Vec3f* arg0) {
|
2024-08-15 11:10:00 +03:00
|
|
|
Vec3f src;
|
|
|
|
Vec3f dest;
|
2023-11-22 17:56:29 +03:00
|
|
|
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].camYaw, MTXF_NEW);
|
|
|
|
Matrix_RotateX(gCalcMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY);
|
2024-08-15 11:10:00 +03:00
|
|
|
|
|
|
|
src.x = arg0->x - gPlayer[gPlayerNum].cam.eye.x;
|
|
|
|
src.y = arg0->y - gPlayer[gPlayerNum].cam.eye.y;
|
|
|
|
src.z = arg0->z - gPlayer[gPlayerNum].cam.eye.z;
|
|
|
|
|
|
|
|
Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest);
|
|
|
|
|
|
|
|
if ((dest.z < 1000.0f) && (dest.z > -13000.0f)) {
|
|
|
|
if (fabsf(dest.x) < (fabsf(dest.z * 0.4f) + 2000.0f)) {
|
|
|
|
if (fabsf(dest.y) < (fabsf(dest.y * 0.4f) + 2000.0f)) {
|
2023-12-14 20:58:53 +03:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-04 21:50:52 +03:00
|
|
|
return false;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2023-12-19 17:54:50 +03:00
|
|
|
void Object_DrawAll(s32 arg0) {
|
2023-11-22 17:56:29 +03:00
|
|
|
Vec3f spAC;
|
|
|
|
s32 i;
|
|
|
|
s32 pad[5]; // probably separate iterators for each loop
|
2024-01-14 01:45:37 +03:00
|
|
|
Actor* actor;
|
2024-01-07 01:39:23 +03:00
|
|
|
Boss* boss;
|
2024-04-09 01:25:56 +03:00
|
|
|
Sprite* sprite;
|
2024-04-23 05:51:20 +03:00
|
|
|
Scenery360* scenery360;
|
2023-12-20 22:32:50 +03:00
|
|
|
Item* item;
|
2024-04-23 05:51:20 +03:00
|
|
|
Scenery* scenery;
|
2023-11-22 17:56:29 +03:00
|
|
|
|
2023-12-24 22:28:35 +03:00
|
|
|
if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gCurrentLevel != LEVEL_KATINA)) {
|
2023-12-14 17:41:43 +03:00
|
|
|
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-05-11 23:53:37 +03:00
|
|
|
if (gDrawBackdrop == 5) {
|
2023-11-22 17:56:29 +03:00
|
|
|
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-04-23 05:51:20 +03:00
|
|
|
for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) {
|
2024-10-17 00:32:08 +03:00
|
|
|
FrameInterpolation_RecordOpenChild(scenery360, i);
|
2024-10-17 18:53:40 +03:00
|
|
|
FrameInterpolation_RecordMarker(__FILE__, __LINE__);
|
2024-08-15 17:54:53 +03:00
|
|
|
if ((scenery360->obj.status == OBJ_ACTIVE) && (scenery360->obj.id != OBJ_SCENERY_LEVEL_OBJECTS)) {
|
2023-12-14 17:41:43 +03:00
|
|
|
if (gCurrentLevel == LEVEL_BOLSE) {
|
2024-04-23 05:51:20 +03:00
|
|
|
spAC.x = scenery360->sfxSource[0];
|
|
|
|
spAC.y = scenery360->sfxSource[1];
|
|
|
|
spAC.z = scenery360->sfxSource[2];
|
|
|
|
Matrix_MultVec3fNoTranslate(&D_BO_8019EE80, &spAC, &scenery360->obj.pos);
|
|
|
|
scenery360->obj.rot.y = scenery360->unk_54 + gBosses->obj.rot.y;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-04-23 05:51:20 +03:00
|
|
|
Scenery360_Draw(scenery360);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-10-17 00:32:08 +03:00
|
|
|
FrameInterpolation_RecordCloseChild();
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
} else {
|
2023-12-14 17:41:43 +03:00
|
|
|
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
2024-04-23 05:51:20 +03:00
|
|
|
for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) {
|
|
|
|
if (scenery->obj.status >= OBJ_ACTIVE) {
|
2024-10-17 18:53:40 +03:00
|
|
|
FrameInterpolation_RecordOpenChild(scenery, i);
|
|
|
|
FrameInterpolation_RecordMarker(__FILE__, __LINE__);
|
2023-11-22 17:56:29 +03:00
|
|
|
if (arg0 > 0) {
|
2024-04-23 05:51:20 +03:00
|
|
|
Display_SetSecondLight(&scenery->obj.pos);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-04-23 05:51:20 +03:00
|
|
|
Scenery_Draw(scenery, arg0);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2024-05-07 01:45:24 +03:00
|
|
|
Object_UpdateSfxSource(scenery->sfxSource);
|
2024-10-17 18:53:40 +03:00
|
|
|
FrameInterpolation_RecordCloseChild();
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-01-07 01:39:23 +03:00
|
|
|
for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) {
|
2024-08-12 17:58:54 +03:00
|
|
|
if ((boss->obj.status >= OBJ_ACTIVE) && (boss->obj.id != OBJ_BOSS_BO_BASE_SHIELD)) {
|
2024-10-16 20:53:41 +03:00
|
|
|
FrameInterpolation_RecordOpenChild(boss, i);
|
2024-10-17 18:53:40 +03:00
|
|
|
FrameInterpolation_RecordMarker(__FILE__, __LINE__);
|
2024-04-09 01:25:56 +03:00
|
|
|
if ((boss->timer_05C % 2) == 0) {
|
2023-12-14 17:41:43 +03:00
|
|
|
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2023-12-04 21:50:52 +03:00
|
|
|
RCP_SetupDL_27();
|
2023-11-22 17:56:29 +03:00
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 64, 64, 255, 255);
|
|
|
|
}
|
2024-05-02 23:46:51 +03:00
|
|
|
Object_SetCullDirection(arg0);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-01-07 01:39:23 +03:00
|
|
|
Boss_Draw(boss, arg0);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2024-05-11 23:53:37 +03:00
|
|
|
if (boss->drawShadow && (D_edisplay_801615D0.y > 0.0f)) {
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-04-20 22:18:31 +03:00
|
|
|
Object_DrawShadow(i, &boss->obj);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-10-16 20:53:41 +03:00
|
|
|
FrameInterpolation_RecordCloseChild();
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
Lights_SetOneLight(&gMasterDisp, gLight1x, gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG,
|
|
|
|
gAmbientB);
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
for (i = 0, sprite = gSprites; i < ARRAY_COUNT(gSprites); i++, sprite++) {
|
|
|
|
if ((sprite->obj.status >= OBJ_ACTIVE) && func_enmy_80060FE4(&sprite->obj.pos, -12000.0f)) {
|
2024-10-16 20:53:41 +03:00
|
|
|
FrameInterpolation_RecordOpenChild(sprite, i);
|
2024-10-17 18:53:40 +03:00
|
|
|
FrameInterpolation_RecordMarker(__FILE__, __LINE__);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
if ((sprite->obj.id == OBJ_SPRITE_CO_RUIN1) || (sprite->obj.id == OBJ_SPRITE_CO_RUIN2)) {
|
2023-12-14 17:41:43 +03:00
|
|
|
RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2023-12-14 17:41:43 +03:00
|
|
|
RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-04-09 01:25:56 +03:00
|
|
|
Sprite_Draw(sprite, arg0);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2024-10-16 20:53:41 +03:00
|
|
|
FrameInterpolation_RecordCloseChild();
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-09-17 08:04:15 +03:00
|
|
|
for (i = 0, actor = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor++) {
|
2024-01-21 23:42:06 +03:00
|
|
|
if (actor->obj.status >= OBJ_ACTIVE) {
|
2024-10-16 20:53:41 +03:00
|
|
|
FrameInterpolation_RecordOpenChild(actor, i);
|
2024-10-17 18:53:40 +03:00
|
|
|
FrameInterpolation_RecordMarker(__FILE__, __LINE__);
|
2024-04-09 01:25:56 +03:00
|
|
|
if ((actor->timer_0C6 % 2) == 0) {
|
2023-12-14 17:41:43 +03:00
|
|
|
if (gCurrentLevel == LEVEL_UNK_15) {
|
2023-12-04 21:50:52 +03:00
|
|
|
RCP_SetupDL_23();
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2023-12-14 17:41:43 +03:00
|
|
|
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
} else {
|
2023-12-04 21:50:52 +03:00
|
|
|
RCP_SetupDL_27();
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-01-14 01:45:37 +03:00
|
|
|
if (actor->scale >= 0.0f) {
|
2023-11-22 17:56:29 +03:00
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
|
|
|
|
} else {
|
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 64, 64, 255, 255);
|
|
|
|
}
|
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-24 22:28:35 +03:00
|
|
|
switch (gLevelMode) {
|
|
|
|
case LEVELMODE_ON_RAILS:
|
2024-08-15 07:02:52 +03:00
|
|
|
case LEVELMODE_TURRET:
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-04-16 02:38:19 +03:00
|
|
|
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) ||
|
|
|
|
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) || (gCurrentLevel == LEVEL_AQUAS)) {
|
2024-04-23 05:51:20 +03:00
|
|
|
Display_SetSecondLight(&actor->obj.pos);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-05-02 23:46:51 +03:00
|
|
|
Object_SetCullDirection(arg0);
|
2024-04-05 23:11:36 +03:00
|
|
|
Actor_DrawOnRails(actor);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-05-11 23:53:37 +03:00
|
|
|
if (actor->drawShadow) {
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-04-20 22:18:31 +03:00
|
|
|
Object_DrawShadow(i, &actor->obj);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
break;
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-24 22:28:35 +03:00
|
|
|
case LEVELMODE_ALL_RANGE:
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-04-05 23:11:36 +03:00
|
|
|
Actor_DrawAllRange(actor);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2024-05-11 23:53:37 +03:00
|
|
|
if (actor->drawShadow && sDrewActor &&
|
2024-05-02 23:46:51 +03:00
|
|
|
((sViewPos.z > -4000.0f) || (gCurrentLevel != LEVEL_KATINA))) {
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-04-20 22:18:31 +03:00
|
|
|
Object_DrawShadow(i, &actor->obj);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
2024-10-17 18:53:40 +03:00
|
|
|
FrameInterpolation_RecordCloseChild();
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
gDPSetFogColor(gMasterDisp++, gFogRed, gFogGreen, gFogBlue, gFogAlpha);
|
|
|
|
gSPFogPosition(gMasterDisp++, gFogNear, gFogFar);
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-24 22:28:35 +03:00
|
|
|
Lights_SetOneLight(&gMasterDisp, -60, -60, 60, 150, 150, 150, 20, 20, 20);
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-08-25 01:36:53 +03:00
|
|
|
for (i = 0, item = &gItems[0]; i < ARRAY_COUNT(gItems); i++, item++) {
|
2024-01-21 23:42:06 +03:00
|
|
|
if (item->obj.status >= OBJ_ACTIVE) {
|
2024-10-16 20:53:41 +03:00
|
|
|
FrameInterpolation_RecordOpenChild(item, i);
|
2024-10-17 18:53:40 +03:00
|
|
|
FrameInterpolation_RecordMarker(__FILE__, __LINE__);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_29);
|
2024-05-02 23:46:51 +03:00
|
|
|
Object_SetCullDirection(arg0);
|
2023-12-20 22:32:50 +03:00
|
|
|
Item_Draw(item, arg0);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2024-10-16 20:53:41 +03:00
|
|
|
FrameInterpolation_RecordCloseChild();
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
Lights_SetOneLight(&gMasterDisp, gLight1x, gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG,
|
|
|
|
gAmbientB);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-04-05 23:11:36 +03:00
|
|
|
void Effect_DrawAll(s32 arg0) {
|
2023-11-22 17:56:29 +03:00
|
|
|
s32 i;
|
2024-01-07 01:39:23 +03:00
|
|
|
Boss* boss;
|
2024-01-13 16:43:04 +03:00
|
|
|
Effect* effect;
|
2023-11-22 17:56:29 +03:00
|
|
|
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_64);
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-08-25 01:36:53 +03:00
|
|
|
for (i = 0, effect = &gEffects[0]; i < ARRAY_COUNT(gEffects); i++, effect++) {
|
2024-01-21 23:42:06 +03:00
|
|
|
if (effect->obj.status >= OBJ_ACTIVE) {
|
2024-10-16 20:53:41 +03:00
|
|
|
FrameInterpolation_RecordOpenChild(effect, i);
|
2024-10-17 18:53:40 +03:00
|
|
|
FrameInterpolation_RecordMarker(__FILE__, __LINE__);
|
2024-01-13 16:43:04 +03:00
|
|
|
if (effect->info.unk_14 == 1) {
|
2024-04-16 02:38:19 +03:00
|
|
|
effect->obj.rot.y = RAD_TO_DEG(-gPlayer[gPlayerNum].camYaw);
|
|
|
|
effect->obj.rot.x = RAD_TO_DEG(gPlayer[gPlayerNum].camPitch);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-12-24 22:28:35 +03:00
|
|
|
if (gLevelMode == LEVELMODE_ALL_RANGE) {
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-04-05 23:11:36 +03:00
|
|
|
Effect_DrawAllRange(effect);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-04-05 23:11:36 +03:00
|
|
|
Effect_DrawOnRails(effect, arg0);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2024-05-07 01:45:24 +03:00
|
|
|
Object_UpdateSfxSource(effect->sfxSource);
|
2024-01-13 16:43:04 +03:00
|
|
|
if (effect->obj.id == OBJ_EFFECT_374) {
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-04-20 22:18:31 +03:00
|
|
|
Object_DrawShadow(i, &effect->obj);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
2024-10-16 20:53:41 +03:00
|
|
|
FrameInterpolation_RecordCloseChild();
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-08-25 01:36:53 +03:00
|
|
|
for (i = 0, boss = &gBosses[0]; i < ARRAY_COUNT(gBosses); i++, boss++) {
|
2024-08-12 17:58:54 +03:00
|
|
|
if ((boss->obj.status >= OBJ_ACTIVE) && (boss->obj.id == OBJ_BOSS_BO_BASE_SHIELD)) {
|
2024-10-16 20:53:41 +03:00
|
|
|
FrameInterpolation_RecordOpenChild(boss, i);
|
2024-10-17 18:53:40 +03:00
|
|
|
FrameInterpolation_RecordMarker(__FILE__, __LINE__);
|
2024-04-09 01:25:56 +03:00
|
|
|
if ((boss->timer_05C % 2) == 0) {
|
2023-12-14 17:41:43 +03:00
|
|
|
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2023-12-04 21:50:52 +03:00
|
|
|
RCP_SetupDL_27();
|
2023-11-22 17:56:29 +03:00
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 64, 64, 255, 255);
|
|
|
|
}
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-01-07 01:39:23 +03:00
|
|
|
Boss_Draw(boss, arg0);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2024-10-16 20:53:41 +03:00
|
|
|
FrameInterpolation_RecordCloseChild();
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-05 23:11:36 +03:00
|
|
|
void Object_Draw(s32 arg0) {
|
2024-04-09 01:25:56 +03:00
|
|
|
gReflectY = 1;
|
2023-12-19 17:54:50 +03:00
|
|
|
Object_DrawAll(1);
|
2024-04-26 01:01:25 +03:00
|
|
|
if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
|
2024-04-09 01:25:56 +03:00
|
|
|
gReflectY = -1;
|
2023-12-14 17:41:43 +03:00
|
|
|
Lights_SetOneLight(&gMasterDisp, gLight1x, -1 * gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR,
|
|
|
|
gAmbientG, gAmbientB);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY);
|
2023-12-19 17:54:50 +03:00
|
|
|
Object_DrawAll(-1);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2023-12-14 17:41:43 +03:00
|
|
|
Lights_SetOneLight(&gMasterDisp, gLight1x, gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR,
|
|
|
|
gAmbientG, gAmbientB);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-05 23:11:36 +03:00
|
|
|
void Effect_Draw(u8 arg0) {
|
2023-11-22 17:56:29 +03:00
|
|
|
if (arg0 == 0) {
|
2024-04-09 01:25:56 +03:00
|
|
|
gReflectY = 1;
|
2024-04-05 23:11:36 +03:00
|
|
|
Effect_DrawAll(1);
|
2024-04-26 01:01:25 +03:00
|
|
|
} else if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
|
2024-04-09 01:25:56 +03:00
|
|
|
gReflectY = -1;
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY);
|
2024-04-05 23:11:36 +03:00
|
|
|
Effect_DrawAll(-1);
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-04-09 01:25:56 +03:00
|
|
|
gReflectY = 1;
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
|
2024-04-03 02:20:08 +03:00
|
|
|
Vtx D_edisplay_800CFD40[] = {
|
2023-11-27 00:27:05 +03:00
|
|
|
VTX(1, 0, 0, 0, 0, 255, 255, 255, 255),
|
|
|
|
VTX(-1, 0, 0, 0, 0, 255, 255, 255, 255),
|
|
|
|
VTX(-1, 0, -1, 0, 0, 255, 255, 255, 255),
|
|
|
|
VTX(1, 0, -1, 0, 0, 255, 255, 255, 255),
|
|
|
|
};
|
2024-04-03 02:20:08 +03:00
|
|
|
Gfx D_edisplay_800CFD80[] = {
|
|
|
|
gsSPVertex(D_edisplay_800CFD40, 4, 0),
|
2023-11-27 00:27:05 +03:00
|
|
|
gsSP1Quadrangle(1, 2, 3, 0, 0),
|
|
|
|
gsSPEndDisplayList(),
|
|
|
|
};
|
|
|
|
|
2024-03-17 07:06:28 +03:00
|
|
|
void TexturedLine_Draw(void) {
|
2023-11-22 17:56:29 +03:00
|
|
|
s32 i;
|
|
|
|
|
2023-12-14 17:41:43 +03:00
|
|
|
if (gCurrentLevel == LEVEL_MACBETH) {
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_33);
|
2023-11-22 17:56:29 +03:00
|
|
|
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
2023-12-24 22:28:35 +03:00
|
|
|
} else if ((gCurrentLevel == LEVEL_AQUAS) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) {
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_41);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2023-12-04 21:50:52 +03:00
|
|
|
RCP_SetupDL_14();
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-03-17 07:06:28 +03:00
|
|
|
for (i = 0; i < ARRAY_COUNT(gTexturedLines); i++) {
|
|
|
|
TexturedLine* texLine = &gTexturedLines[i];
|
2024-10-16 20:53:41 +03:00
|
|
|
FrameInterpolation_RecordOpenChild(texLine, i);
|
2024-10-17 18:53:40 +03:00
|
|
|
FrameInterpolation_RecordMarker(__FILE__, __LINE__);
|
2023-12-14 20:58:53 +03:00
|
|
|
|
2024-03-17 07:06:28 +03:00
|
|
|
if (gTexturedLines[i].mode != 0) {
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-05-02 23:46:51 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, texLine->posAA.x, texLine->posAA.y, texLine->posAA.z + gPathProgress,
|
2024-04-16 02:38:19 +03:00
|
|
|
MTXF_APPLY);
|
2024-05-02 23:46:51 +03:00
|
|
|
Matrix_RotateY(gGfxMatrix, texLine->yRot, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gGfxMatrix, texLine->xRot, MTXF_APPLY);
|
|
|
|
Matrix_RotateZ(gGfxMatrix, texLine->yRot, MTXF_APPLY);
|
|
|
|
Matrix_Scale(gGfxMatrix, texLine->xyScale, texLine->xyScale, texLine->zScale, MTXF_APPLY);
|
2023-12-14 20:58:53 +03:00
|
|
|
|
2023-12-24 22:28:35 +03:00
|
|
|
if ((gCurrentLevel == LEVEL_AQUAS) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) {
|
2024-04-09 01:25:56 +03:00
|
|
|
s32 alpha = ((gGameFrameCount % 2) != 0) ? 180 : 50;
|
2023-12-14 20:58:53 +03:00
|
|
|
|
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, alpha);
|
2023-12-14 17:41:43 +03:00
|
|
|
if (gCurrentLevel == LEVEL_AQUAS) {
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Scale(gGfxMatrix, 0.01f, 0.3f, 0.0025f, MTXF_APPLY);
|
|
|
|
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -200.0f, MTXF_APPLY);
|
|
|
|
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 5.0f * M_DTOR, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-03-15 00:31:03 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_AQ_60119A0);
|
2023-12-24 22:28:35 +03:00
|
|
|
} else if (gCurrentLevel == LEVEL_VENOM_ANDROSS) {
|
2024-04-16 02:38:19 +03:00
|
|
|
Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.0025f, MTXF_APPLY);
|
|
|
|
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -200.0f, MTXF_APPLY);
|
|
|
|
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 25.0f * M_DTOR, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-04-01 04:53:09 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_ANDROSS_C017440);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2023-12-14 17:41:43 +03:00
|
|
|
if (gCurrentLevel == LEVEL_MACBETH) {
|
2024-03-29 20:40:09 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_MA_6012C00);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-05-11 23:53:37 +03:00
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, texLine->prim.r, texLine->prim.g, texLine->prim.b,
|
|
|
|
texLine->prim.a);
|
2024-04-03 02:20:08 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_edisplay_800CFD80);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-10-16 20:53:41 +03:00
|
|
|
FrameInterpolation_RecordCloseChild();
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-05 23:11:36 +03:00
|
|
|
void TexturedLine_DrawPath(s32 index) {
|
|
|
|
TexturedLine* texLine = &gTexturedLines[index];
|
2023-11-22 17:56:29 +03:00
|
|
|
|
2024-05-11 23:53:37 +03:00
|
|
|
if (texLine->prim.a == 255) {
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_5);
|
2023-11-22 17:56:29 +03:00
|
|
|
} else {
|
2024-05-17 20:22:51 +03:00
|
|
|
RCP_SetupDL(&gMasterDisp, SETUPDL_14);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2024-05-11 23:53:37 +03:00
|
|
|
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, texLine->prim.r, texLine->prim.g, texLine->prim.b, texLine->prim.a);
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Push(&gGfxMatrix);
|
2024-05-02 23:46:51 +03:00
|
|
|
Matrix_Translate(gGfxMatrix, texLine->posAA.x, texLine->posAA.y, texLine->posAA.z, MTXF_APPLY);
|
|
|
|
Matrix_RotateY(gGfxMatrix, texLine->yRot, MTXF_APPLY);
|
|
|
|
Matrix_RotateX(gGfxMatrix, texLine->xRot, MTXF_APPLY);
|
|
|
|
Matrix_RotateZ(gGfxMatrix, texLine->xRot, MTXF_APPLY);
|
|
|
|
Matrix_Scale(gGfxMatrix, texLine->xyScale, 1.0f, texLine->zScale, MTXF_APPLY);
|
2023-11-22 17:56:29 +03:00
|
|
|
Matrix_SetGfxMtx(&gMasterDisp);
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-11-22 17:56:29 +03:00
|
|
|
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
2024-04-03 02:20:08 +03:00
|
|
|
gSPDisplayList(gMasterDisp++, D_edisplay_800CFD80);
|
2023-11-22 17:56:29 +03:00
|
|
|
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
|
2024-08-15 11:10:00 +03:00
|
|
|
|
2023-11-24 22:11:20 +03:00
|
|
|
Matrix_Pop(&gGfxMatrix);
|
2023-11-22 17:56:29 +03:00
|
|
|
}
|