mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-22 07:04:54 -04:00
wire decomp static savestates with macros (#6904)
This commit is contained in:
+35
-6
@@ -9,6 +9,7 @@
|
||||
#include "soh/frame_interpolation.h"
|
||||
#include "soh/Enhancements/controls/Mouse.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||
#include "soh/Enhancements/savestate_serialize.h"
|
||||
|
||||
s16 Camera_ChangeSettingFlags(Camera* camera, s16 setting, s16 flags);
|
||||
s32 Camera_ChangeModeFlags(Camera* camera, s16 mode, u8 flags);
|
||||
@@ -573,9 +574,9 @@ s16 Camera_XZAngle(Vec3f* to, Vec3f* from) {
|
||||
return DEGF_TO_BINANG(RADF_TO_DEGF(Math_FAtan2F(from->x - to->x, from->z - to->z)));
|
||||
}
|
||||
|
||||
f32 D_8015CE50;
|
||||
f32 D_8015CE54;
|
||||
CamColChk D_8015CE58;
|
||||
static f32 D_8015CE50;
|
||||
static f32 D_8015CE54;
|
||||
static CamColChk D_8015CE58;
|
||||
s16 func_80044ADC(Camera* camera, s16 yaw, s16 arg2) {
|
||||
Vec3f playerPos;
|
||||
Vec3f rotatedPos;
|
||||
@@ -7424,8 +7425,8 @@ s32 Camera_DbgChangeMode(Camera* camera) {
|
||||
return true;
|
||||
}
|
||||
|
||||
s16 depthPhase = 0x3F0;
|
||||
s16 screenPlanePhase = 0x156;
|
||||
static s16 depthPhase = 0x3F0;
|
||||
static s16 screenPlanePhase = 0x156;
|
||||
void Camera_UpdateDistortion(Camera* camera) {
|
||||
f32 scaleFactor;
|
||||
f32 speedFactor;
|
||||
@@ -7509,7 +7510,7 @@ void Camera_UpdateDistortion(Camera* camera) {
|
||||
}
|
||||
}
|
||||
|
||||
s32 sOOBTimer = 0;
|
||||
static s32 sOOBTimer = 0;
|
||||
Vec3s Camera_Update(Camera* camera) {
|
||||
Vec3f viewAt;
|
||||
Vec3f viewEye;
|
||||
@@ -8353,3 +8354,31 @@ s16 func_8005B1A4(Camera* camera) {
|
||||
|
||||
return camera->thisIdx;
|
||||
}
|
||||
|
||||
#define CAMERA_SHIP_SAVESTATE_FIELDS(F) \
|
||||
F(sInitRegs) \
|
||||
F(gDbgCamEnabled) \
|
||||
F(sDbgModeIdx) \
|
||||
F(sNextUID) \
|
||||
F(sCameraInterfaceFlags) \
|
||||
F(sCameraInterfaceAlpha) \
|
||||
F(sCameraShrinkWindowVal) \
|
||||
F(D_8011D3AC) \
|
||||
F(sDemo5PrevAction12Frame) \
|
||||
F(sDemo5PrevSfxFrame) \
|
||||
F(D_8011D3F0) \
|
||||
F(D_8011D6AC) \
|
||||
F(D_8011D724) \
|
||||
F(D_8011D79C) \
|
||||
F(D_8011D83C) \
|
||||
F(D_8011D88C) \
|
||||
F(D_8011D8DC) \
|
||||
F(D_8011D954) \
|
||||
F(D_8011D9F4) \
|
||||
F(depthPhase) \
|
||||
F(screenPlanePhase) \
|
||||
F(sOOBTimer) \
|
||||
F(D_8015CE50) \
|
||||
F(D_8015CE54) \
|
||||
F(D_8015CE58)
|
||||
SHIP_SAVESTATE_DEFINE(Camera, CAMERA_SHIP_SAVESTATE_FIELDS)
|
||||
|
||||
Reference in New Issue
Block a user