Work on cm data

This commit is contained in:
Zac 2024-07-13 22:47:03 +00:00 committed by GitHub
parent b71869bae1
commit 6072950215
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 101 additions and 6 deletions

View File

@ -223,9 +223,22 @@ s_vecRange = 0x261900; // size:0x10
s_vecOffset = 0x261910; // size:0x10
R_SetCmSpring = 0x261920; // size:0x4
R_SetCmDamping = 0x261924; // size:0x4
// ...
D_00261928 = 0x261928; // size:0x24
D_0026194C = 0x26194c; // size:0x4
D_00261950 = 0x261950; // size:0x4
s_smpSquishEye = 0x261958; // size:0xc
// ...
D_00261970 = 0x261970; // size:0x4
D_00261974 = 0x261974; // size:0x4
D_00261978 = 0x261978; // size:0x4
D_0026197C = 0x26197c; // size:0x4
D_00261980 = 0x261980; // size:0x4
D_00261984 = 0x261984; // size:0x4
D_00261988 = 0x261988; // size:0x4
D_0026198C = 0x26198c; // size:0x4
g_pcm = 0x261990; // size:0x4

View File

@ -331,4 +331,35 @@ void SetSwCameraRgbaFog(SW *psw, RGBA *prgbaFog);
*/
void SetCmRgbaFog(CM *pcm, RGBA *prgbaFog);
// todo fix undefined reference
/* extern VECTOR g_posEyeDefault;
extern VECTOR g_posCenterDefault;
extern float g_sNearFog;
extern float g_sFarFog;
extern float g_uFogMax;
extern RGBA g_rgbaFog;
extern VECTOR D_2618b8;
extern float DT_CmJoltMax;
extern float SW_CmJolt;
extern CLQ s_clqUToUJolt;
extern VECTOR s_dposJolt;
extern VECTOR s_rotJolt;
extern VECTOR s_vecRange;
extern VECTOR s_vecOffset;
extern float R_SetCmSpring;
extern float R_SetCmDamping;
extern float D_00261928[9];
extern float D_0026194c;
extern float D_00261950;
extern SMP s_smpSquishEye;
extern float D_00261970;
extern float D_00261974;
extern float D_00261978;
extern float D_0026197c;
extern float D_00261980;
extern float D_00261984;
extern float D_00261988;
extern float D_0026198c;
extern CM* g_pcm; */
#endif // CM_H

View File

@ -17,6 +17,7 @@ struct SMA;
struct SMT;
struct SMS;
struct SMP;
struct SMPA; // todo define
/**
* @brief State machine.
@ -76,6 +77,7 @@ struct SMS
*/
struct SMP
{
float svFast; // todo check if this is correct
float svSlow;
float dtFast;
};

View File

@ -9,11 +9,17 @@
#include "common.h"
#include <mat.h>
#include <vec.h>
#include <sm.h>
// todo: determine where these structs should be defined
struct CLQ;
struct SMP;
struct SMPA;
/**
* @brief Unknown.
*
* @todo Figure out what this is.
*/
struct CLQ
{
float u, v, w, x;
};
/**
* @brief Limits for a float.

View File

@ -2,6 +2,49 @@
* @todo Mangle all function names.
*/
#include <cm.h>
#include <util.h>
#include <binoc.h>
// todo fix data
/*VECTOR g_posEyeDefault = { 0.0f, -2000.0f, 500.0f, 0.0f };
VECTOR g_posCenterDefault = { 0.0f, 0.0f, 0.0f, 0.0f };
float g_sNearFog = 500.0f;
float g_sFarFog = 20000.0f;
float g_uFogMax = 0.5f;
RGBA g_rgbaFog = { 0, 0, 0, 0 };
VECTOR D_002618B8 = { 0.5f, 0.0f, 0.1f, 10.0f }; // unknown
float DT_CmJoltMax = 0.5f;
float SW_CmJolt = 50.0f;
CLQ s_clqUToUJolt = { 1.0f, -2.0f, 1.0f, 0.0f };
VECTOR s_dposJolt = { 0.0f, 0.0f, 0.0f, 0.0f };
VECTOR s_rotJolt = { 0.05f, 0.0f, 0.0f, 0.0f };
VECTOR s_vecRange = { 0.0f, 0.0f, 0.0f, 0.0f };
VECTOR s_vecOffset = { 0.0f, 0.0f, 0.0f, 0.0f };
float R_SetCmSpring = 15.0f;
float R_SetCmDamping = -8.0f;
float D_00261928[] = { 1.0f, 5.0f, 10.0f, 12.0f, 15.0f, 12.0f, 10.0f, 5.0f, 1.0f }; // array of 9 floats
float D_0026194C = 250.0f;
float D_00261950 = 1500.0f;
SMP s_smpSquishEye = { 2500.0f, 0.0f, 0.25f };
SMP unk_padding = { 0.0f, 0.0f, 0.0f }; // needed to align next variables
float D_00261970 = -250.0f;
float D_00261974 = 250.0f;
float D_00261978 = 250.0f;
float D_0026197C = 0.0f;
float D_00261980 = 250.0f;
float D_00261984 = 250.0f;
float D_00261988 = 250.0f;
float D_0026198C = 0.0f;
CM* g_pcm = (CM *)0x0;*/
INCLUDE_ASM(const s32, "P2/cm", CalcCmAdjust__FP2CMP2SOP6CPDEFIP6VECTOR);