Link in lots of files
This commit is contained in:
parent
f4b023df31
commit
0250682281
25 changed files with 723 additions and 446 deletions
|
|
@ -16,6 +16,7 @@
|
|||
#include "game/wipe.h"
|
||||
#include "math.h"
|
||||
|
||||
#include "port/byteswap.h"
|
||||
|
||||
#include "data_num/title.h"
|
||||
|
||||
|
|
@ -290,10 +291,7 @@ void ObjectSetup(void)
|
|||
HuTHPClose();
|
||||
#endif
|
||||
HuPrcVSleep();
|
||||
#ifdef __MWERKS__
|
||||
// TODO PC
|
||||
HuSprGrpKill(group_thp);
|
||||
#endif
|
||||
if (!skip_wait) {
|
||||
HuPrcSleep(60);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ void fn_2_10240(Vec *arg0, Vec *arg1)
|
|||
camera = &Hu3DCamera[0];
|
||||
MTXLookAt(lookat, &camera->pos, &camera->up, &camera->target);
|
||||
MTXMultVec(lookat, arg0, arg0);
|
||||
MTXPerspective(proj, camera->fov, camera->aspect, camera->near, camera->far);
|
||||
MTXPerspective(proj, camera->fov, camera->aspect, camera->nnear, camera->ffar);
|
||||
coord[0] = (arg0->x * proj[0][0]) + (arg0->y * proj[0][1]) + (arg0->z * proj[0][2]) + proj[0][3];
|
||||
coord[1] = (arg0->x * proj[1][0]) + (arg0->y * proj[1][1]) + (arg0->z * proj[1][2]) + proj[1][3];
|
||||
coord[2] = (arg0->x * proj[2][0]) + (arg0->y * proj[2][1]) + (arg0->z * proj[2][2]) + proj[2][3];
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ void ObjectSetup(void)
|
|||
var_r29 = Hu3DGLightCreateV(&lbl_1_data_770, &lbl_1_bss_10, &lbl_1_data_788);
|
||||
Hu3DGLightInfinitytSet(var_r29);
|
||||
Hu3DGLightStaticSet(var_r29, 1);
|
||||
Hu3DShadowCreate(45.0f, var_r30->near, var_r30->far);
|
||||
Hu3DShadowCreate(45.0f, var_r30->nnear, var_r30->ffar);
|
||||
Hu3DShadowTPLvlSet(0.625f);
|
||||
Hu3DShadowPosSet(&lbl_1_data_78C, &lbl_1_data_798, &lbl_1_data_77C);
|
||||
HuAudSndGrpSet(29);
|
||||
|
|
|
|||
|
|
@ -377,7 +377,7 @@ void fn_1_1074(void)
|
|||
CameraData *var_r31;
|
||||
|
||||
var_r31 = &Hu3DCamera[0];
|
||||
C_MTXPerspective(sp64, var_r31->fov, var_r31->aspect, var_r31->near, var_r31->far);
|
||||
C_MTXPerspective(sp64, var_r31->fov, var_r31->aspect, var_r31->nnear, var_r31->ffar);
|
||||
GXSetProjection(sp64, GX_PERSPECTIVE);
|
||||
GXSetViewport(0.0f, 0.0f, 640.0f, 480.0f, 0.0f, 1.0f);
|
||||
GXSetScissor(0, 0, 640, 480);
|
||||
|
|
|
|||
|
|
@ -4864,7 +4864,7 @@ void fn_1_10BC8(void)
|
|||
if (var_r31->fov <= 0.0f) {
|
||||
return;
|
||||
}
|
||||
C_MTXPerspective(sp64, var_r31->fov, var_r31->aspect, var_r31->near, var_r31->far);
|
||||
C_MTXPerspective(sp64, var_r31->fov, var_r31->aspect, var_r31->nnear, var_r31->ffar);
|
||||
GXSetProjection(sp64, GX_PERSPECTIVE);
|
||||
GXSetViewport(0.0f, 0.0f, 640.0f, 480.0f, 0.0f, 1.0f);
|
||||
GXSetScissor(0, 0, 640, 480);
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ void ObjectSetup(void)
|
|||
var_r29 = Hu3DGLightCreateV(&lbl_1_data_54, &lbl_1_bss_14, &lbl_1_data_6C);
|
||||
Hu3DGLightInfinitytSet(var_r29);
|
||||
Hu3DGLightStaticSet(var_r29, 1);
|
||||
Hu3DShadowCreate(10.0f, var_r30->near, var_r30->far);
|
||||
Hu3DShadowCreate(10.0f, var_r30->nnear, var_r30->ffar);
|
||||
Hu3DShadowTPLvlSet(0.625f);
|
||||
Hu3DShadowPosSet(&lbl_1_data_70, &lbl_1_data_7C, &lbl_1_data_60);
|
||||
HuAudSndGrpSet(0x44);
|
||||
|
|
@ -1527,7 +1527,7 @@ void fn_1_485C(ModelData *model, Mtx mtx)
|
|||
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
|
||||
GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT);
|
||||
C_MTXPerspective(sp40, var_r29->fov, var_r29->aspect, var_r29->near, var_r29->far);
|
||||
C_MTXPerspective(sp40, var_r29->fov, var_r29->aspect, var_r29->nnear, var_r29->ffar);
|
||||
GXSetProjection(sp40, GX_PERSPECTIVE);
|
||||
MTXInverse(mtx, spA0);
|
||||
spA0[0][3] = spA0[1][3] = spA0[2][3] = 0.0f;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ void fn_1_D9F4(s16 arg0)
|
|||
CameraData *var_r31;
|
||||
|
||||
var_r31 = &Hu3DCamera[0];
|
||||
C_MTXPerspective(sp64, var_r31->fov, var_r31->aspect, var_r31->near, var_r31->far);
|
||||
C_MTXPerspective(sp64, var_r31->fov, var_r31->aspect, var_r31->nnear, var_r31->ffar);
|
||||
GXSetProjection(sp64, GX_PERSPECTIVE);
|
||||
GXSetViewport(0.0f, 0.0f, 640.0f, 480.0f, 0.0f, 1.0f);
|
||||
GXSetScissor(0, 0, 0x280, 0x1E0);
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ void ObjectSetup(void)
|
|||
light = Hu3DGLightCreateV(&lbl_1_data_38, &lbl_1_bss_8, &lbl_1_data_50);
|
||||
Hu3DGLightInfinitytSet(light);
|
||||
Hu3DGLightStaticSet(light, 1);
|
||||
Hu3DShadowCreate(10, camera->near, camera->far);
|
||||
Hu3DShadowCreate(10, camera->nnear, camera->ffar);
|
||||
Hu3DShadowTPLvlSet(0.7f);
|
||||
Hu3DShadowPosSet(&lbl_1_data_54, &lbl_1_data_60, &lbl_1_data_44);
|
||||
HuAudSndGrpSet(77);
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ void ObjectSetup(void)
|
|||
var_r29 = Hu3DGLightCreateV(&lbl_1_data_38, &lbl_1_bss_8, &lbl_1_data_50);
|
||||
Hu3DGLightInfinitytSet(var_r29);
|
||||
Hu3DGLightStaticSet(var_r29, 1);
|
||||
Hu3DShadowCreate(10.0f, var_r30->near, var_r30->far);
|
||||
Hu3DShadowCreate(10.0f, var_r30->nnear, var_r30->ffar);
|
||||
Hu3DShadowTPLvlSet(0.7f);
|
||||
Hu3DShadowPosSet(&lbl_1_data_54, &lbl_1_data_60, &lbl_1_data_44);
|
||||
HuAudSndGrpSet(0x4E);
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ void fn_1_26C54(s16 layer)
|
|||
Vec pos, target, up;
|
||||
GXColor color;
|
||||
CameraData *camera = &Hu3DCamera[0];
|
||||
MTXPerspective(proj, camera->fov, camera->aspect, camera->near, camera->far);
|
||||
MTXPerspective(proj, camera->fov, camera->aspect, camera->nnear, camera->ffar);
|
||||
GXSetProjection(proj, GX_PERSPECTIVE);
|
||||
GXSetViewport(0, 0, 640, 480, 0, 1);
|
||||
GXSetScissor(0, 0, 640, 480);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "REL/modeseldll.h"
|
||||
#include "ext_math.h"
|
||||
#include "game/audio.h"
|
||||
#include "game/esprite.h"
|
||||
#include "game/gamework_data.h"
|
||||
#include "game/hsfman.h"
|
||||
#include "game/object.h"
|
||||
|
|
@ -8,7 +10,8 @@
|
|||
#include "game/process.h"
|
||||
#include "game/window.h"
|
||||
#include "game/wipe.h"
|
||||
#include "ext_math.h"
|
||||
|
||||
#include <msm/msmsys.h>
|
||||
|
||||
typedef struct camera_view_params {
|
||||
Vec rot;
|
||||
|
|
|
|||
|
|
@ -1016,21 +1016,21 @@ void BoardCameraRotSet(float x, float y)
|
|||
camera->rot.y = y;
|
||||
}
|
||||
|
||||
void BoardCameraNearFarSet(float near, float far)
|
||||
void BoardCameraNearFarSet(float nnear, float ffar)
|
||||
{
|
||||
BoardCameraData *camera = &boardCamera;
|
||||
camera->near = near;
|
||||
camera->far = far;
|
||||
camera->nnear = nnear;
|
||||
camera->ffar = ffar;
|
||||
}
|
||||
|
||||
void BoardCameraNearFarGet(float *near, float *far)
|
||||
void BoardCameraNearFarGet(float *nnear, float *ffar)
|
||||
{
|
||||
BoardCameraData *camera = &boardCamera;
|
||||
if(near) {
|
||||
*near = camera->near;
|
||||
if(nnear) {
|
||||
*nnear = camera->nnear;
|
||||
}
|
||||
if(far) {
|
||||
*far = camera->far;
|
||||
if(ffar) {
|
||||
*ffar = camera->ffar;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1137,8 +1137,8 @@ void BoardCameraInit(void)
|
|||
memset(&boardCamera, 0, sizeof(BoardCameraData));
|
||||
camera = &boardCamera;
|
||||
camera->fov = 25;
|
||||
camera->near = 100;
|
||||
camera->far = 13000;
|
||||
camera->nnear = 100;
|
||||
camera->ffar = 13000;
|
||||
camera->aspect = HU_DISP_ASPECT;
|
||||
camera->viewport_x = 0;
|
||||
camera->viewport_y = 0;
|
||||
|
|
@ -1187,7 +1187,7 @@ static void UpdateCamera(omObjData *object)
|
|||
}
|
||||
CalcCameraView();
|
||||
camera = &boardCamera;
|
||||
Hu3DCameraPerspectiveSet(camera->mask, camera->fov, camera->near, camera->far, camera->aspect);
|
||||
Hu3DCameraPerspectiveSet(camera->mask, camera->fov, camera->nnear, camera->ffar, camera->aspect);
|
||||
Hu3DCameraViewportSet(camera->mask, camera->viewport_x, camera->viewport_y, camera->viewport_w, camera->viewport_h, camera->viewport_near, camera->viewport_far);
|
||||
target = &camera->target;
|
||||
if(camera->pos_calc) {
|
||||
|
|
|
|||
|
|
@ -817,7 +817,7 @@ static void DrawSpaces(ModelData *model, Mtx matrix)
|
|||
camera = &boardCamera;
|
||||
BoardCameraPosGet(&pos);
|
||||
BoardCameraTargetGet(&target);
|
||||
MTXPerspective(proj, camera->fov, camera->aspect, camera->near, camera->far);
|
||||
MTXPerspective(proj, camera->fov, camera->aspect, camera->nnear, camera->ffar);
|
||||
GXSetProjection(proj, GX_PERSPECTIVE);
|
||||
MTXLookAt(lookat, &pos, &camera->up, &target);
|
||||
GXSetViewport(camera->viewport_x, camera->viewport_y, camera->viewport_w, camera->viewport_h, camera->viewport_near, camera->viewport_far);
|
||||
|
|
|
|||
|
|
@ -13,6 +13,10 @@
|
|||
|
||||
#include "ext_math.h"
|
||||
|
||||
#ifndef __MWERKS__
|
||||
#include "game/frand.h"
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 unk00;
|
||||
/* 0x02 */ s16 unk02;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -14,9 +14,12 @@
|
|||
|
||||
#include "dolphin/gx/GXVert.h"
|
||||
|
||||
#include "math.h"
|
||||
#include "ext_math.h"
|
||||
|
||||
#ifndef __MWERKS__
|
||||
#include "string.h"
|
||||
#endif
|
||||
|
||||
#define SHADOW_HEAP_SIZE 0x9000
|
||||
|
||||
ModelData Hu3DData[HU3D_MODEL_MAX];
|
||||
|
|
@ -178,7 +181,7 @@ void Hu3DExec(void) {
|
|||
HuSprExec(0x7F);
|
||||
}
|
||||
if (FogData.fogType != GX_FOG_NONE) {
|
||||
GXSetFog(FogData.fogType, FogData.start, FogData.end, camera->near, camera->far, FogData.color);
|
||||
GXSetFog(FogData.fogType, FogData.start, FogData.end, camera->nnear, camera->ffar, FogData.color);
|
||||
}
|
||||
for (j = 0; j < 8; j++) {
|
||||
if (layerHook[j] != 0) {
|
||||
|
|
@ -1121,7 +1124,7 @@ void Hu3DCameraCreate(s32 cam) {
|
|||
}
|
||||
}
|
||||
|
||||
void Hu3DCameraPerspectiveSet(s32 cam, f32 fov, f32 near, f32 far, f32 aspect) {
|
||||
void Hu3DCameraPerspectiveSet(s32 cam, f32 fov, f32 nnear, f32 ffar, f32 aspect) {
|
||||
s16 mask;
|
||||
s16 i;
|
||||
CameraData* cam_ptr;
|
||||
|
|
@ -1130,8 +1133,8 @@ void Hu3DCameraPerspectiveSet(s32 cam, f32 fov, f32 near, f32 far, f32 aspect) {
|
|||
if ((cam & mask) != 0) {
|
||||
cam_ptr = &Hu3DCamera[i];
|
||||
cam_ptr->fov = fov;
|
||||
cam_ptr->near = near;
|
||||
cam_ptr->far = far;
|
||||
cam_ptr->nnear = nnear;
|
||||
cam_ptr->ffar = ffar;
|
||||
cam_ptr->aspect = aspect;
|
||||
}
|
||||
}
|
||||
|
|
@ -1248,7 +1251,7 @@ void Hu3DCameraSet(s32 arg0, Mtx arg1) {
|
|||
CameraData* temp_r31;
|
||||
|
||||
temp_r31 = &Hu3DCamera[arg0];
|
||||
C_MTXPerspective(sp10, temp_r31->fov, temp_r31->aspect, temp_r31->near, temp_r31->far);
|
||||
C_MTXPerspective(sp10, temp_r31->fov, temp_r31->aspect, temp_r31->nnear, temp_r31->ffar);
|
||||
GXSetProjection(sp10, GX_PERSPECTIVE);
|
||||
if (RenderMode->field_rendering != 0) {
|
||||
GXSetViewportJitter(temp_r31->viewport_x, temp_r31->viewport_y, temp_r31->viewport_w, temp_r31->viewport_h, temp_r31->near_z, temp_r31->far_z, VIGetNextField());
|
||||
|
|
@ -1299,7 +1302,7 @@ BOOL Hu3DModelCameraInfoSet(s16 arg0, u16 arg1) {
|
|||
sp8.x, sp8.y, sp8.z,
|
||||
obj_copy->camera.pos.x, obj_copy->camera.pos.y, obj_copy->camera.pos.z);
|
||||
|
||||
Hu3DCameraPerspectiveSet(arg1, obj_copy->camera.fov, obj_copy->camera.near, obj_copy->camera.far, HU_DISP_ASPECT);
|
||||
Hu3DCameraPerspectiveSet(arg1, obj_copy->camera.fov, obj_copy->camera.nnear, obj_copy->camera.ffar, HU_DISP_ASPECT);
|
||||
|
||||
temp_r28->unk_01 = arg1;
|
||||
temp_r24 = &Hu3DData[arg0];
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
#include "game/mapspace.h"
|
||||
#include "game/hsfman.h"
|
||||
|
||||
#include "math.h"
|
||||
#include <ext_math.h>
|
||||
|
||||
#ifdef __MWERKS__
|
||||
extern void HuSetVecF(Vec*, double, double, double);
|
||||
#endif
|
||||
|
||||
static BOOL PolygonRangeCheck(HsfMapAttr *arg0, float arg1, float arg2, float *arg3, float arg4);
|
||||
static s32 DefIfnnerMapCircle(Vec *arg0, s16 *arg1, Vec *arg2, Vec *arg3);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
#include <types.h>
|
||||
|
||||
#include <game/dvd.h>
|
||||
#include <game/msm.h>
|
||||
#include <game/object.h>
|
||||
|
||||
// Credits: Super Monkey Ball
|
||||
|
|
@ -196,6 +197,16 @@ s32 CARDWriteAsync(CARDFileInfo *fileInfo, const void *addr, s32 length, s32 off
|
|||
return 0;
|
||||
}
|
||||
|
||||
s32 CARDGetSerialNo(s32 chan, u64* serialNo)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 CARDSetStatus(s32 chan, s32 fileNo, CARDStat* stat)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void DCFlushRange(void *addr, u32 nBytes)
|
||||
{
|
||||
//puts("DCFlushRange is a stub");
|
||||
|
|
@ -647,16 +658,39 @@ void msmMusFdoutEnd(void)
|
|||
{
|
||||
}
|
||||
|
||||
int msmMusPlay(int musId, MSM_MUSPARAM *musParam)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 msmMusGetStatus(int musNo)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 msmStreamGetStatus(int streamNo)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 msmSeSetParam(int seNo, MSM_SEPARAM* param)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 msmMusSetParam(s32 arg0, MSM_MUSPARAM* arg1)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 HuSoftResetButtonCheck(void)
|
||||
{
|
||||
//puts("HuSoftResetButtonCheck is a stub");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void MGSeqMain(void)
|
||||
{
|
||||
// puts("MGSeqMain is a stub");
|
||||
}
|
||||
|
||||
// TODO remove
|
||||
u8 fadeStat = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue