summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authorPhilip Dubé <159546+serprex@users.noreply.github.com>2026-07-12 15:09:47 +0000
committerGitHub <noreply@github.com>2026-07-12 15:09:47 +0000
commitc94ae8ccf379267946568ca2c448ba4fad25987a (patch)
treed68f555de2a69947855443382dc31d10cdcb971e /soh/src/code
parent2b423c36aa0708a9e042b1afe8f252a6cf91c556 (diff)
wire decomp static savestates with macros (#6904)
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/code_800EC960.c110
-rw-r--r--soh/src/code/code_800F9280.c3
-rw-r--r--soh/src/code/sys_matrix.c10
-rw-r--r--soh/src/code/z_camera.c41
-rw-r--r--soh/src/code/z_camera_data.inc34
-rw-r--r--soh/src/code/z_kankyo.c4
-rw-r--r--soh/src/code/z_lights.c6
-rw-r--r--soh/src/code/z_map_exp.c13
-rw-r--r--soh/src/code/z_map_mark.c6
-rw-r--r--soh/src/code/z_message_PAL.c33
-rw-r--r--soh/src/code/z_onepointdemo.c42
-rw-r--r--soh/src/code/z_onepointdemo_data.inc70
12 files changed, 259 insertions, 113 deletions
diff --git a/soh/src/code/code_800EC960.c b/soh/src/code/code_800EC960.c
index a9950908f..406f3348e 100644
--- a/soh/src/code/code_800EC960.c
+++ b/soh/src/code/code_800EC960.c
@@ -5,6 +5,7 @@
#include "soh/Enhancements/audio/AudioEditor.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
+#include "soh/Enhancements/savestate_serialize.h"
// TODO: can these macros be shared between files? code_800F9280 seems to use
// versions without any casts...
@@ -848,24 +849,24 @@ s32 sOcarinaB4BtnMap = BTN_CLEFT;
s32 sOcarinaA4BtnMap = BTN_CRIGHT;
s32 sOcarinaF4BtnMap = BTN_CDOWN;
s32 sOcarinaD4BtnMap = BTN_A;
-u8 sOcarinaInpEnabled = 0;
-s8 D_80130F10 = 0; // "OCA", ocarina active?
-u8 sCurOcarinaBtnVal = 0xFF;
-u8 sPrevOcarinaNoteVal = 0;
-u8 sCurOcarinaBtnIdx = 0; // note index?
-u8 sLearnSongLastBtn = 0;
-f32 D_80130F24 = 1.0f;
+static u8 sOcarinaInpEnabled = 0;
+static s8 D_80130F10 = 0; // "OCA", ocarina active?
+static u8 sCurOcarinaBtnVal = 0xFF;
+static u8 sPrevOcarinaNoteVal = 0;
+static u8 sCurOcarinaBtnIdx = 0; // note index?
+static u8 sLearnSongLastBtn = 0;
+static f32 D_80130F24 = 1.0f;
f32 D_80130F28 = 87.0f / 127.0f;
-s8 D_80130F2C = 0; // pitch?
-s8 D_80130F30 = 0x57;
-s8 D_80130F34 = 0;
-u8 sPlaybackState = 0; // 80130F38
-u32 D_80130F3C = 0; // "SEQ"
-u32 sNotePlaybackTimer = 0;
-u16 sPlaybackNotePos = 0;
-u16 sStaffPlaybackPos = 0;
+static s8 D_80130F2C = 0; // pitch?
+static s8 D_80130F30 = 0x57;
+static s8 D_80130F34 = 0;
+static u8 sPlaybackState = 0; // 80130F38
+static u32 D_80130F3C = 0; // "SEQ"
+static u32 sNotePlaybackTimer = 0;
+static u16 sPlaybackNotePos = 0;
+static u16 sStaffPlaybackPos = 0;
u16 D_80130F4C = 0;
-u8 sDisplayedNoteValue = 0xFF; // Note to display on screen?
+static u8 sDisplayedNoteValue = 0xFF; // Note to display on screen?
u8 sNotePlaybackVolume = 0;
u8 sNotePlaybackVibrato = 0;
s8 sNotePlaybackTone = 0;
@@ -1231,25 +1232,64 @@ typedef struct {
s8 y;
} OcarinaStick;
OcarinaStick sCurOcaStick;
-u32 sCurOcarinaBtnPress;
-u32 D_8016BA10;
-u32 sPrevOcarinaBtnPress;
-s32 D_8016BA18;
-s32 D_8016BA1C;
-u8 sCurOcarinaSong[8];
-u8 sOcarinaSongAppendPos;
-u8 sOcarinaHasStartedSong;
-u8 sOcarinaSongNoteStartIdx;
-u8 sOcarinaSongCnt;
-u16 sOcarinaAvailSongs;
-u8 sStaffPlayingPos;
-u16 sLearnSongPos[0x10];
-u16 D_8016BA50[0x10];
-u16 D_8016BA70[0x10];
-u8 sLearnSongExpectedNote[0x10];
-OcarinaNote D_8016BAA0;
-u8 sAudioHasMalonBgm;
-f32 sAudioMalonBgmDist;
+static u32 sCurOcarinaBtnPress;
+static u32 D_8016BA10;
+static u32 sPrevOcarinaBtnPress;
+static s32 D_8016BA18;
+static s32 D_8016BA1C;
+static u8 sCurOcarinaSong[8];
+static u8 sOcarinaSongAppendPos;
+static u8 sOcarinaHasStartedSong;
+static u8 sOcarinaSongNoteStartIdx;
+static u8 sOcarinaSongCnt;
+static u16 sOcarinaAvailSongs;
+static u8 sStaffPlayingPos;
+static u16 sLearnSongPos[0x10];
+static u16 D_8016BA50[0x10];
+static u16 D_8016BA70[0x10];
+static u8 sLearnSongExpectedNote[0x10];
+static OcarinaNote D_8016BAA0;
+static u8 sAudioHasMalonBgm;
+static f32 sAudioMalonBgmDist;
+
+#define AUDIO_OCA_SHIP_SAVESTATE_FIELDS(F) \
+ F(sOcarinaInpEnabled) \
+ F(D_80130F10) \
+ F(sCurOcarinaBtnVal) \
+ F(sPrevOcarinaNoteVal) \
+ F(sCurOcarinaBtnIdx) \
+ F(sLearnSongLastBtn) \
+ F(D_80130F24) \
+ F(D_80130F28) \
+ F(D_80130F2C) \
+ F(D_80130F30) \
+ F(D_80130F34) \
+ F(sPlaybackState) \
+ F(D_80130F3C) \
+ F(sNotePlaybackTimer) \
+ F(sPlaybackNotePos) \
+ F(sStaffPlaybackPos) \
+ F(sCurOcarinaBtnPress) \
+ F(D_8016BA10) \
+ F(sPrevOcarinaBtnPress) \
+ F(D_8016BA18) \
+ F(D_8016BA1C) \
+ F(sCurOcarinaSong) \
+ F(sOcarinaSongAppendPos) \
+ F(sOcarinaHasStartedSong) \
+ F(sOcarinaSongNoteStartIdx) \
+ F(sOcarinaSongCnt) \
+ F(sOcarinaAvailSongs) \
+ F(sStaffPlayingPos) \
+ F(sLearnSongPos) \
+ F(D_8016BA50) \
+ F(D_8016BA70) \
+ F(sLearnSongExpectedNote) \
+ F(D_8016BAA0) \
+ F(sAudioHasMalonBgm) \
+ F(sAudioMalonBgmDist) \
+ F(sDisplayedNoteValue)
+SHIP_SAVESTATE_DEFINE(AudioOca, AUDIO_OCA_SHIP_SAVESTATE_FIELDS)
// Start debug bss
u32 sDebugPadHold;
diff --git a/soh/src/code/code_800F9280.c b/soh/src/code/code_800F9280.c
index 85d44ec4e..90eaadda0 100644
--- a/soh/src/code/code_800F9280.c
+++ b/soh/src/code/code_800F9280.c
@@ -379,9 +379,6 @@ void Audio_ProcessSeqCmd(u32 cmd) {
}
}
-extern f32 D_80130F24;
-extern f32 D_80130F28;
-
void Audio_QueueSeqCmd(u32 cmd) {
// Replacement is resolved per-command in func_800F9280().
sAudioSeqCmds[sSeqCmdWrPos++] = cmd;
diff --git a/soh/src/code/sys_matrix.c b/soh/src/code/sys_matrix.c
index 3e4798d2e..a58e6dcc8 100644
--- a/soh/src/code/sys_matrix.c
+++ b/soh/src/code/sys_matrix.c
@@ -1,6 +1,7 @@
#include "global.h"
#include "soh/frame_interpolation.h"
+#include "soh/Enhancements/savestate_serialize.h"
#include <assert.h>
// clang-format off
@@ -19,8 +20,13 @@ MtxF gMtxFClear = {
};
// clang-format on
-MtxF* sMatrixStack; // "Matrix_stack"
-MtxF* sCurrentMatrix; // "Matrix_now"
+static MtxF* sMatrixStack; // "Matrix_stack"
+static MtxF* sCurrentMatrix; // "Matrix_now"
+
+void Matrix_SaveState(SaveStateCtx* ctx) {
+ SaveState_Blob(ctx, sMatrixStack, sizeof(MtxF) * 20);
+ SaveState_Blob(ctx, sCurrentMatrix, sizeof(MtxF));
+}
void Matrix_Init(GameState* gameState) {
sCurrentMatrix = GAMESTATE_ALLOC_MC(gameState, 20 * sizeof(MtxF));
diff --git a/soh/src/code/z_camera.c b/soh/src/code/z_camera.c
index 91283daf1..68bc909e2 100644
--- a/soh/src/code/z_camera.c
+++ b/soh/src/code/z_camera.c
@@ -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)
diff --git a/soh/src/code/z_camera_data.inc b/soh/src/code/z_camera_data.inc
index 90b1874c7..26ebf5f08 100644
--- a/soh/src/code/z_camera_data.inc
+++ b/soh/src/code/z_camera_data.inc
@@ -2220,16 +2220,16 @@ s32 (*sCameraFunctions[])(Camera*) = {
Camera_Special9,
};
-s32 sInitRegs = 1;
+static s32 sInitRegs = 1;
s32 gDbgCamEnabled = 0;
-s32 sDbgModeIdx = -1;
-s16 sNextUID = 0;
+static s32 sDbgModeIdx = -1;
+static s16 sNextUID = 0;
-s32 sCameraInterfaceFlags = 1;
+static s32 sCameraInterfaceFlags = 1;
-s32 sCameraInterfaceAlpha = 0x02;
-s32 sCameraShrinkWindowVal = 0x20;
+static s32 sCameraInterfaceAlpha = 0x02;
+static s32 sCameraShrinkWindowVal = 0x20;
s32 D_8011D3AC = -1;
s16 D_8011D3B0[] = {
@@ -2242,9 +2242,9 @@ s16 D_8011D3CC[] = {
s32 sUpdateCameraDirection = 0;
s32 D_8011D3EC = 0;
-s32 D_8011D3F0 = 0;
+static s32 D_8011D3F0 = 0;
-s32 sDemo5PrevAction12Frame = -16;
+static s32 sDemo5PrevAction12Frame = -16;
char sCameraFunctionNames[][8] = {
"NONE ", "NORM0()", "NORM1()", "NORM2()", "NORM3()", "NORM4()", "PARA0()", "PARA1()", "PARA2()", "PARA3()",
@@ -2274,10 +2274,10 @@ Vec3f D_8011D678[] = {
/*******************************************************
* OnePoint initalization values for Demo5
********************************************************/
-s32 sDemo5PrevSfxFrame = -200;
+static s32 sDemo5PrevSfxFrame = -200;
// target is player, far from eye
-OnePointCsFull D_8011D6AC[] = {
+static OnePointCsFull D_8011D6AC[] = {
{ // initflags & 0x00FF (at): 2, atTarget is view lookAt + atInit
// initFlags & 0xFF00 (eye): none
// action: 15, copy at, eye, roll, fov to camera
@@ -2319,14 +2319,14 @@ OnePointCsFull D_8011D6AC[] = {
};
// target is player close to current eye
-OnePointCsFull D_8011D724[] = {
+static OnePointCsFull D_8011D724[] = {
{ 0x8F, 0xFF, 0x2424, 0x0001, 0x0000, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 10.0f, -20.0f } },
{ 0x81, 0xFF, 0x2121, 0x0013, 0x0000, 50.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 60.0f } },
{ 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
// target is close to player
-OnePointCsFull D_8011D79C[] = {
+static OnePointCsFull D_8011D79C[] = {
{ 0xCF, 0xFF, 0x0002, 0x0001, 0x0000, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0xC1, 0xFF, 0x0303, 0x0013, 0x0000, 45.0f, 1.0f, { 0.0f, -20.0f, 0.0f }, { 0.0f, -10.0f, 5.0f } },
{
@@ -2344,7 +2344,7 @@ OnePointCsFull D_8011D79C[] = {
};
// target is within 300 units of eye, and player is within 30 units of eye
-OnePointCsFull D_8011D83C[] = {
+static OnePointCsFull D_8011D83C[] = {
{ 0x83, 0xFF, 0x2141, 0x0014, 0x0000, 45.0f, 0.2f, { 0.0f, 0.0f, 10.0f }, { 0.0f, 0.0f, 10.0f } },
{ 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
@@ -2352,20 +2352,20 @@ OnePointCsFull D_8011D83C[] = {
// target is within 700 units of eye, angle between player/eye and target/eye is less than
// 76.9 degrees. The x/y coordinates of the target on screen is between (21, 41) and (300, 200),
// and the player is farther than 30 units of the eye
-OnePointCsFull D_8011D88C[] = {
+static OnePointCsFull D_8011D88C[] = {
{ 0x81, 0xFF, 0x0303, 0x0014, 0x0000, 45.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
// same as above, but the target is NOT within the screen area.
-OnePointCsFull D_8011D8DC[] = {
+static OnePointCsFull D_8011D8DC[] = {
{ 0x8F, 0xFF, 0x0404, 0x0014, 0x0001, 50.0f, 1.0f, { 0.0f, 5.0f, 10.0f }, { 0.0f, 10.0f, -80.0f } },
{ 0x82, 0xFF, 0x2121, 0x0005, 0x0000, 60.0f, 1.0f, { 0.0f, 5.0f, 0.0f }, { 5.0f, 5.0f, -200.0f } },
{ 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
// target is a door.
-OnePointCsFull D_8011D954[] = {
+static OnePointCsFull D_8011D954[] = {
{ 0x0F, 0xFF, 0xC1C1, 0x0014, 0x0000, 60.0f, 1.0f, { 0.0f, 0.0f, 50.0f }, { 0.0f, 0.0f, 250.0f } },
{ 0x83, 0xFF, 0x05B1, 0x0005, 0x0000, 60.0f, 0.1f, { 0.0f, 10.0f, 50.0f }, { 0.0f, 10.0f, 100.0f } },
{ 0x82, 0xFF, 0x2121, 0x0005, 0x0002, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 20.0f, -150.0f } },
@@ -2373,7 +2373,7 @@ OnePointCsFull D_8011D954[] = {
};
// otherwise
-OnePointCsFull D_8011D9F4[] = {
+static OnePointCsFull D_8011D9F4[] = {
{ 0x8F, 0xFF, 0x0504, 0x0014, 0x0002, 60.0f, 1.0f, { 0.0f, 5.0f, 50.0f }, { 0.0f, 20.0f, 300.0f } },
{ 0x82, 0xFF, 0x2121, 0x0005, 0x0002, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 20.0f, -150.0f } },
{ 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
diff --git a/soh/src/code/z_kankyo.c b/soh/src/code/z_kankyo.c
index 9518213f2..8a413f15c 100644
--- a/soh/src/code/z_kankyo.c
+++ b/soh/src/code/z_kankyo.c
@@ -8,6 +8,7 @@
#include "soh/ResourceManagerHelpers.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
+#include "soh/Enhancements/savestate_serialize.h"
typedef enum {
/* 0 */ LENS_FLARE_CIRCLE0,
@@ -59,6 +60,9 @@ u8 gSkyboxBlendingEnabled = false;
u16 gTimeIncrement = 0;
+#define ENVIRONMENT_SHIP_SAVESTATE_FIELDS(F) F(gTimeIncrement)
+SHIP_SAVESTATE_DEFINE(Environment, ENVIRONMENT_SHIP_SAVESTATE_FIELDS)
+
u16 D_8011FB44 = 0xFFFC;
struct_8011FB48 D_8011FB48[][7] = {
diff --git a/soh/src/code/z_lights.c b/soh/src/code/z_lights.c
index 8a0fa68fd..da5e0e905 100644
--- a/soh/src/code/z_lights.c
+++ b/soh/src/code/z_lights.c
@@ -6,6 +6,7 @@
#include "soh/frame_interpolation.h"
#include "soh/OTRGlobals.h"
+#include "soh/Enhancements/savestate_serialize.h"
#define LIGHTS_BUFFER_SIZE 32
//#define LIGHTS_BUFFER_SIZE 1024 // Kill me
@@ -16,7 +17,10 @@ typedef struct {
/* 0x008 */ LightNode buf[LIGHTS_BUFFER_SIZE];
} LightsBuffer; // size = 0x188
-LightsBuffer sLightsBuffer;
+static LightsBuffer sLightsBuffer;
+
+#define LIGHTS_SHIP_SAVESTATE_FIELDS(F) F(sLightsBuffer)
+SHIP_SAVESTATE_DEFINE(Lights, LIGHTS_SHIP_SAVESTATE_FIELDS)
void Lights_PointSetInfo(LightInfo* info, s16 x, s16 y, s16 z, u8 r, u8 g, u8 b, s16 radius, s32 type) {
info->type = type;
diff --git a/soh/src/code/z_map_exp.c b/soh/src/code/z_map_exp.c
index 681e20f05..89d2770d0 100644
--- a/soh/src/code/z_map_exp.c
+++ b/soh/src/code/z_map_exp.c
@@ -9,14 +9,21 @@
#include "soh/OTRGlobals.h"
#include "soh/Enhancements/cosmetics/cosmeticsTypes.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
+#include "soh/Enhancements/savestate_serialize.h"
MapData* gMapData;
-s16 sPlayerInitialPosX = 0;
-s16 sPlayerInitialPosZ = 0;
-s16 sPlayerInitialDirection = 0;
+static s16 sPlayerInitialPosX = 0;
+static s16 sPlayerInitialPosZ = 0;
+static s16 sPlayerInitialDirection = 0;
s16 sEntranceIconMapIndex = 0;
+#define MAP_EXP_SHIP_SAVESTATE_FIELDS(F) \
+ F(sPlayerInitialPosX) \
+ F(sPlayerInitialPosZ) \
+ F(sPlayerInitialDirection)
+SHIP_SAVESTATE_DEFINE(MapExp, MAP_EXP_SHIP_SAVESTATE_FIELDS)
+
s16 Top_MM_Margin = 0;
s16 Left_MM_Margin = 0;
s16 Right_MM_Margin = 0;
diff --git a/soh/src/code/z_map_mark.c b/soh/src/code/z_map_mark.c
index 4d1496fb4..02712089f 100644
--- a/soh/src/code/z_map_mark.c
+++ b/soh/src/code/z_map_mark.c
@@ -4,6 +4,7 @@
#include "soh/OTRGlobals.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh/Enhancements/cosmetics/cosmeticsTypes.h"
+#include "soh/Enhancements/savestate_serialize.h"
typedef struct {
/* 0x00 */ void* texture;
@@ -55,7 +56,10 @@ static MapMarkInfo sMapMarkInfoTable[] = {
// gMapMarkDataTableVanilla,
// };
-MapMarkData** sLoadedMarkDataTable;
+static MapMarkData** sLoadedMarkDataTable;
+
+#define MAP_MARK_SHIP_SAVESTATE_FIELDS(F) F(sLoadedMarkDataTable)
+SHIP_SAVESTATE_DEFINE(MapMark, MAP_MARK_SHIP_SAVESTATE_FIELDS)
void MapMark_Init(PlayState* play) {
// MapMarkDataOverlay* overlay = &sMapMarkDataOvl;
diff --git a/soh/src/code/z_message_PAL.c b/soh/src/code/z_message_PAL.c
index 60cbef0bd..809a5d1af 100644
--- a/soh/src/code/z_message_PAL.c
+++ b/soh/src/code/z_message_PAL.c
@@ -14,6 +14,7 @@
#include "soh/OTRGlobals.h"
#include "soh/SaveManager.h"
#include "soh/ResourceManagerHelpers.h"
+#include "soh/Enhancements/savestate_serialize.h"
// #region SOH [NTSC] - Allows custom messages to work on japanese
static bool sDisplayNextMessageAsEnglish = false;
@@ -23,27 +24,27 @@ static u16 sTextBoxNum = 0;
s16 sTextFade = false; // original name: key_off_flag ?
-u8 D_8014B2F4 = 0;
+static u8 D_8014B2F4 = 0;
-s16 sOcarinaNoteBufPos = 0;
+static s16 sOcarinaNoteBufPos = 0;
-s16 sOcarinaNoteBufLen = 0;
+static s16 sOcarinaNoteBufLen = 0;
-u8 sTextboxSkipped = false;
+static u8 sTextboxSkipped = false;
-u16 sNextTextId = 0;
+static u16 sNextTextId = 0;
s16 sTextIsCredits = false;
UNK_TYPE D_8014B30C = 0;
-s16 sLastPlayedSong = 0xFF; // last played song?
+static s16 sLastPlayedSong = 0xFF; // last played song?
-s16 sHasSunsSong = false;
+static s16 sHasSunsSong = false;
s16 sMessageHasSetSfx = false;
-u16 sOcarinaSongBitFlags = 0; // ocarina bit flags
+static u16 sOcarinaSongBitFlags = 0; // ocarina bit flags
MessageTableEntry* sNesMessageEntryTablePtr = NULL;
MessageTableEntry* sGerMessageEntryTablePtr = NULL;
@@ -71,7 +72,7 @@ s16 sTextboxBackgroundYOffsets[] = {
};
// original name: onpu_buff
-u8 sOcarinaNoteBuf[12] = { 0 };
+static u8 sOcarinaNoteBuf[12] = { 0 };
s16 sOcarinaNotesAlphaValues[9] = { 0 };
@@ -4706,3 +4707,17 @@ UNK_TYPE D_80153D7C = 0x00000000;
// This should be part of z_game_over.c, but cannot be moved there as the entire
// late_rodata section of this file is in the way
s16 gGameOverTimer = 0;
+
+#define MESSAGE_PAL_SHIP_SAVESTATE_FIELDS(F) \
+ F(sOcarinaNoteBufPos) \
+ F(sOcarinaNoteBufLen) \
+ F(sOcarinaNoteBuf) \
+ F(D_8014B2F4) \
+ F(sTextboxSkipped) \
+ F(sNextTextId) \
+ F(sLastPlayedSong) \
+ F(sHasSunsSong) \
+ F(sMessageHasSetSfx) \
+ F(sOcarinaSongBitFlags) \
+ F(gGameOverTimer)
+SHIP_SAVESTATE_DEFINE(MessagePAL, MESSAGE_PAL_SHIP_SAVESTATE_FIELDS)
diff --git a/soh/src/code/z_onepointdemo.c b/soh/src/code/z_onepointdemo.c
index 870337fd1..3b3f87fc8 100644
--- a/soh/src/code/z_onepointdemo.c
+++ b/soh/src/code/z_onepointdemo.c
@@ -2,13 +2,53 @@
#include "vt.h"
#include "overlays/actors/ovl_En_Sw/z_en_sw.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
+#include "soh/Enhancements/savestate_serialize.h"
static s16 sDisableAttention = false;
static s16 sUnused = -1;
-s32 sPrevFrameCs1100 = -4096;
+static s32 sPrevFrameCs1100 = -4096;
#include "z_onepointdemo_data.inc"
+#define ONE_POINT_CUTSCENE_SHIP_SAVESTATE_FIELDS(F) \
+ F(sPrevFrameCs1100) \
+ F(D_8012013C) \
+ F(D_8012021C) \
+ F(D_801204D4) \
+ F(D_801205B4) \
+ F(D_801208EC) \
+ F(D_80120964) \
+ F(D_801209B4) \
+ F(D_80120ACC) \
+ F(D_80120B94) \
+ F(D_80120D4C) \
+ F(D_80120FA4) \
+ F(D_80121184) \
+ F(D_801211D4) \
+ F(D_8012133C) \
+ F(D_801213B4) \
+ F(D_8012151C) \
+ F(D_8012156C) \
+ F(D_801215BC) \
+ F(D_80121C24) \
+ F(D_80121D3C) \
+ F(D_80121F1C) \
+ F(D_80121FBC) \
+ F(D_801220D4) \
+ F(D_80122714) \
+ F(D_80122CB4) \
+ F(D_80122D04) \
+ F(D_80122E44) \
+ F(D_8012313C) \
+ F(D_801231B4) \
+ F(D_80123254) \
+ F(D_801232A4) \
+ F(D_80123894) \
+ F(D_8012390C) \
+ F(D_8012395C) \
+ F(D_801239D4)
+SHIP_SAVESTATE_DEFINE(OnePointCutscene, ONE_POINT_CUTSCENE_SHIP_SAVESTATE_FIELDS)
+
void OnePointCutscene_AddVecSphToVec3f(Vec3f* dst, Vec3f* src, VecSph* vecSph) {
Vec3f out;
Vec3f vec;
diff --git a/soh/src/code/z_onepointdemo_data.inc b/soh/src/code/z_onepointdemo_data.inc
index 2488be71b..1d1838b05 100644
--- a/soh/src/code/z_onepointdemo_data.inc
+++ b/soh/src/code/z_onepointdemo_data.inc
@@ -1,6 +1,6 @@
#include "global.h"
-CutsceneCameraPoint D_8012013C[14] = {
+static CutsceneCameraPoint D_8012013C[14] = {
{ CS_CMD_CONTINUE, 25, 40, 70.79991f, { -1814, 533, -1297 } },
{ CS_CMD_CONTINUE, 20, 40, 70.99991f, { -1805, 434, -1293 } },
{ CS_CMD_CONTINUE, 10, 30, 60.0f, { -1794, 323, -1280 } },
@@ -16,7 +16,7 @@ CutsceneCameraPoint D_8012013C[14] = {
{ CS_CMD_STOP, 0, 50, 60.0f, { -1974, 12, -1179 } },
{ CS_CMD_STOP, 0, 30, 60.0f, { -1974, 12, -1179 } },
};
-CutsceneCameraPoint D_8012021C[14] = {
+static CutsceneCameraPoint D_8012021C[14] = {
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { -1751, 604, -1233 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1752, 516, -1233 } },
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { -1751, 417, -1233 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1767, 306, -1219 } },
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { -1776, 257, -1205 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1881, 147, -1149 } },
@@ -54,7 +54,7 @@ static CutsceneCameraPoint D_80120434[10] = {
{ CS_CMD_STOP, 0, 0, 60.0f, { 0, 62, -119 } }, { CS_CMD_STOP, 0, 0, 60.0f, { 0, 62, -119 } },
};
-CutsceneCameraPoint D_801204D4[14] = {
+static CutsceneCameraPoint D_801204D4[14] = {
{ CS_CMD_CONTINUE, -15, 40, 80.600006f, { -60, 332, 183 } },
{ CS_CMD_CONTINUE, -22, 30, 80.600006f, { -60, 332, 183 } },
{ CS_CMD_CONTINUE, -20, 38, 80.600006f, { -118, 344, 41 } },
@@ -70,7 +70,7 @@ CutsceneCameraPoint D_801204D4[14] = {
{ CS_CMD_STOP, 6, 30, 85.199936f, { 25, 127, -950 } },
{ CS_CMD_STOP, 0, 30, 85.199936f, { 25, 127, -950 } },
};
-CutsceneCameraPoint D_801205B4[14] = {
+static CutsceneCameraPoint D_801205B4[14] = {
{ CS_CMD_CONTINUE, 0, 0, 60.0f, { -225, 785, -242 } },
{ CS_CMD_CONTINUE, -21, 0, 80.600006f, { -245, 784, -242 } },
{ CS_CMD_CONTINUE, -21, 0, 80.600006f, { -288, 485, -379 } },
@@ -118,18 +118,18 @@ static s16 D_801208E0 = 12;
static s16 D_801208E4 = 90;
static s16 D_801208E8 = 8;
-OnePointCsFull D_801208EC[3] = {
+static OnePointCsFull D_801208EC[3] = {
{ 0x0F, 0x08, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x81, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } },
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
-OnePointCsFull D_80120964[2] = {
+static OnePointCsFull D_80120964[2] = {
{ 0x8F, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x81, 0xFF, 0xA121, 1, 0, 75.0f, 0.6f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } },
};
-OnePointCsFull D_801209B4[4] = {
+static OnePointCsFull D_801209B4[4] = {
{ 0x8F, 0x08, 0x0101, 1, 0, 60.0f, 0.9f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x84, 0x01, 0x0100, 29, 0, 45.0f, 0.1f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } },
{ 0x83, 0xFF, 0x0000, 10, 0, 60.0f, 0.2f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } },
@@ -142,7 +142,7 @@ static OnePointCsFull D_80120A54[3] = {
{ 0x8B, 0xFF, 0x0022, 5000, 0, 75.0f, 0.005f, { 0.0f, 0.0f, -10.0f }, { -1.0f, -1.0f, -1.0f } },
};
-OnePointCsFull D_80120ACC[5] = {
+static OnePointCsFull D_80120ACC[5] = {
{ 0x8F, 0xFF, 0x0442, 10, 0, 40.0f, 1.0f, { -10.0f, 45.0f, 20.0f }, { 20.0f, 30.0f, 160.0f } },
{ 0x95, 0xFF, 0x0000, 1, 0, 40.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x8F, 0x01, 0x0442, 10, 0, 40.0f, 1.0f, { -10.0f, 45.0f, 20.0f }, { 20.0f, 30.0f, 160.0f } },
@@ -150,7 +150,7 @@ OnePointCsFull D_80120ACC[5] = {
{ 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
-OnePointCsFull D_80120B94[11] = {
+static OnePointCsFull D_80120B94[11] = {
{ 0x8F, 0x01, 0x2142, 1, 0, 40.0f, 1.0f, { 20.0f, 40.0f, 20.0f }, { -20.0f, 0.0f, -30.0f } },
{ 0x84, 0xFF, 0x0404, 19, 5, 70.0f, 0.01f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } },
{ 0x84, 0xFF, 0x0404, 20, 0, 60.0f, 0.01f, { 0.0f, 20.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } },
@@ -164,7 +164,7 @@ OnePointCsFull D_80120B94[11] = {
{ 0x98, 0xFF, 0x0000, 1, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
-OnePointCsFull D_80120D4C[7] = {
+static OnePointCsFull D_80120D4C[7] = {
{ 0x8F, 0x01, 0x2142, 1, 0, 40.0f, 1.0f, { 20.0f, 40.0f, 20.0f }, { -20.0f, 0.0f, -30.0f } },
{ 0x84, 0xFF, 0x0404, 19, 5, 70.0f, 0.01f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } },
{ 0x84, 0xFF, 0x0404, 20, 0, 60.0f, 0.01f, { 0.0f, 20.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } },
@@ -185,7 +185,7 @@ static OnePointCsFull D_80120E64[8] = {
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
-OnePointCsFull D_80120FA4[6] = {
+static OnePointCsFull D_80120FA4[6] = {
{ 0x8F, 0x01, 0x2143, 30, 0, 70.0f, 0.4f, { 0.0f, 40.0f, 50.0f }, { 30.0f, 10.0f, -50.0f } },
{ 0x95, 0xFF, 0x0000, 1, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{ 0x8F, 0xFF, 0x2222, 10, 0, 42.0f, 1.0f, { 0.0f, 40.0f, 0.0f }, { 0.0f, 85.0f, 45.0f } },
@@ -206,12 +206,12 @@ static OnePointCsFull D_8012110C[3] = {
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
-OnePointCsFull D_80121184[2] = {
+static OnePointCsFull D_80121184[2] = {
{ 0x83, 0x01, 0x0101, 40, 0, -1.0f, 0.1f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
-OnePointCsFull D_801211D4[2] = {
+static OnePointCsFull D_801211D4[2] = {
{ 0x8F, 0x08, 0x0101, 50, 0, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { -10.0f, 85.0f, 0.0f } },
{ 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
@@ -229,13 +229,13 @@ static OnePointCsFull D_80121314[1] = {
{ 0x8F, 0x08, 0x4141, 1000, 0, 75.0f, 0.6f, { 0.0f, 0.0f, 10.0f }, { 0.0f, 0.0f, 100.0f } },
};
-OnePointCsFull D_8012133C[3] = {
+static OnePointCsFull D_8012133C[3] = {
{ 0x8F, 0x01, 0x0141, 40, 0, 75.0f, 1.0f, { 0.0f, 60.0f, 0.0f }, { 0.0f, 0.0f, 100.0f } },
{ 0x83, 0xFF, 0x2121, 20, 0, 60.0f, 0.2f, { 0.0f, -10.0f, -10.0f }, { 0.0f, 10.0f, -100.0f } },
{ 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
-OnePointCsFull D_801213B4[5] = {
+static OnePointCsFull D_801213B4[5] = {
{ 0x8F, 0x08, 0xC2C2, 40, 0, 70.0f, 1.0f, { 80.0f, 0.0f, 20.0f }, { 20.0f, 0.0f, 80.0f } },
{ 0x8B, 0x01, 0xC2C2, 120, 0, 70.0f, 0.1f, { 80.0f, 0.0f, 20.0f }, { 20.0f, 0.0f, 80.0f } },
{ 0x8F, 0x53, 0xC2C2, 30, 0, 50.0f, 1.0f, { 60.0f, 0.0f, 20.0f }, { 60.0f, 0.0f, 60.0f } },
@@ -250,17 +250,17 @@ static OnePointCsFull D_8012147C[4] = {
{ 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
-OnePointCsFull D_8012151C[2] = {
+static OnePointCsFull D_8012151C[2] = {
{ 0x0F, 0x01, 0x0101, 29, 0, 60.0f, 1.0f, { -700.0f, 875.0f, -100.0f }, { -550.0f, 920.0f, -150.0f } },
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
-OnePointCsFull D_8012156C[2] = {
+static OnePointCsFull D_8012156C[2] = {
{ 0x8F, 0x4D, 0x4242, 1, 0, 65.0f, 1.0f, { 60.0f, 30.0f, 0.0f }, { 50.0f, 20.0f, 150.0f } },
{ 0x81, 0xFF, 0x4242, -1, 0, 65.0f, 1.0f, { -50.0f, 60.0f, 0.0f }, { -60.0f, 40.0f, 150.0f } },
};
-OnePointCsFull D_801215BC[1] = {
+static OnePointCsFull D_801215BC[1] = {
{ 0x0F, 0xFF, 0x0101, 5, 0, 65.0f, 1.0f, { -1185.0f, 655.0f, 1185.0f }, { -1255.0f, 735.0f, 1255.0f } },
};
@@ -331,7 +331,7 @@ static OnePointCsFull D_80121A44[12] = {
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
-OnePointCsFull D_80121C24[7] = {
+static OnePointCsFull D_80121C24[7] = {
{ 0x0F, 0x05, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x03, 0xFF, 0x0101, 89, 0, 50.0f, 0.4f, { 125.0f, 320.0f, -1500.0f }, { 125.0f, 500.0f, -1150.0f } },
{ 0x0F, 0x08, 0x0101, 40, 4, 55.0f, 1.0f, { 0.0f, 375.0f, -1440.0f }, { 5.0f, 365.0f, -1315.0f } },
@@ -341,7 +341,7 @@ OnePointCsFull D_80121C24[7] = {
{ 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
-OnePointCsFull D_80121D3C[3] = {
+static OnePointCsFull D_80121D3C[3] = {
{ 0x0F, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { 1023.0f, 738.0f, -2628.0f }, { 993.0f, 770.0f, -2740.0f } },
{ 0x02, 0xFF, 0x0101, 4, 0, 50.0f, 1.0f, { 1255.0f, 350.0f, -1870.0f }, { 1240.0f, 575.0f, -2100.0f } },
{ 0x0F, 0xFF, 0x0000, -1, 0, 75.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
@@ -359,14 +359,14 @@ static OnePointCsFull D_80121DB4[9] = {
{ 0x12, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
-OnePointCsFull D_80121F1C[4] = {
+static OnePointCsFull D_80121F1C[4] = {
{ 0x0F, 0x08, 0x0101, 10, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x01, 0xFF, 0x2121, 10, 0, 50.0f, 0.5f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } },
{ 0x01, 0x02, 0x2121, 23, 0, 50.0f, 0.5f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } },
{ 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
-OnePointCsFull D_80121FBC[4] = {
+static OnePointCsFull D_80121FBC[4] = {
{ 0x0F, 0xFF, 0x0101, 5, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x01, 0xFF, 0x0101, 10, 0, 30.0f, 1.0f, { -2130.0f, 2885.0f, -1055.0f }, { -2085.0f, 2875.0f, -1145.0f } },
{ 0x0F, 0xFF, 0x0000, 30, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
@@ -379,7 +379,7 @@ static OnePointCsFull D_8012205C[3] = {
{ 0x01, 0x01, 0x21A1, 10, 0, 60.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 10.0f, -200.0f } },
};
-OnePointCsFull D_801220D4[5] = {
+static OnePointCsFull D_801220D4[5] = {
{ 0x0F, 0x01, 0x0101, 5, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x01, 0xFF, 0x4141, 10, 5, 55.0f, 0.75f, { 400.0f, -50.0f, 800.0f }, { 600.0f, -60.0f, 800.0f } },
{ 0x01, 0xFF, 0x4141, 15, 10, 40.0f, 0.75f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 10.0f, 200.0f } },
@@ -443,7 +443,7 @@ static OnePointCsFull D_8012269C[3] = {
{ 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
-OnePointCsFull D_80122714[4] = {
+static OnePointCsFull D_80122714[4] = {
{ 0x0F, 0xFF, 0x0101, 20, 0, 45.0f, 1.0f, { -915.0f, -2185.0f, 6335.0f }, { -915.0f, -2290.0f, 6165.0f } },
{ 0x02, 0xFF, 0x0101, -1, 0, 80.0f, 0.8f, { -920.0f, -2270.0f, 6140.0f }, { -920.0f, -2280.0f, 6070.0f } },
{ 0x02, 0xFF, 0x0101, 20, 0, 80.0f, 0.9f, { -920.0f, -2300.0f, 6140.0f }, { -920.0f, -2300.0f, 6070.0f } },
@@ -512,12 +512,12 @@ static OnePointCsFull D_80122C8C[1] = {
{ 0x0F, 0xFF, 0x0101, 999, 5, 60.0f, 1.0f, { -70.0f, 140.0f, 25.0f }, { 10.0f, 180.0f, 195.0f } },
};
-OnePointCsFull D_80122CB4[2] = {
+static OnePointCsFull D_80122CB4[2] = {
{ 0x0F, 0xFF, 0x4242, 5, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 1000.0f }, { 0.0f, 0.0f, 1100.0f } },
{ 0x02, 0xFF, 0x4242, -1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, -100.0f }, { 0.0f, 0.0f, 0.0f } },
};
-OnePointCsFull D_80122D04[2] = {
+static OnePointCsFull D_80122D04[2] = {
{ 0x0F, 0xFF, 0x4242, 10, 0, 60.0f, 1.0f, { 0.0f, 0.0f, -100.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x02, 0xFF, 0x4242, -1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 1000.0f }, { 0.0f, 0.0f, 1100.0f } },
};
@@ -534,7 +534,7 @@ static OnePointCsFull D_80122DCC[3] = {
{ 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
-OnePointCsFull D_80122E44[2][7] = {
+static OnePointCsFull D_80122E44[2][7] = {
{
{ 0x83, 0xFF, 0x2222, 10, 5, 90.0f, 0.2f, { 50.0f, 100.0f, 140.0f }, { -30.0f, 10.0f, -20.0f } },
{ 0x8F, 0xFF, 0x0000, 20, 0, 90.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
@@ -563,25 +563,25 @@ static OnePointCsFull D_80123074[5] = {
{ 0x92, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
-OnePointCsFull D_8012313C[3] = {
+static OnePointCsFull D_8012313C[3] = {
{ 0x8F, 0xFF, 0xA2A2, 20, 8, 70.0f, 1.0f, { 65.0f, -150.0f, 50.0f }, { 30.0f, 10.0f, 90.0f } },
{ 0x81, 0xFF, 0xA2A2, 100, 0, 60.0f, 1.0f, { 70.0f, -160.0f, 50.0f }, { 25.0f, 180.0f, 180.0f } },
{ 0x92, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
-OnePointCsFull D_801231B4[4] = {
+static OnePointCsFull D_801231B4[4] = {
{ 0x8F, 0xC5, 0x4343, 1, 0, 50.0f, 1.0f, { 0.0f, 20.0f, 0.0f }, { 0.0f, 5.0f, -1.0f } },
{ 0x81, 0xC5, 0x4343, 48, 0, 50.0f, 0.75f, { 0.0f, 80.0f, 0.0f }, { 0.0f, 15.0f, -1.0f } },
{ 0x8F, 0xC5, 0x4343, 1, 5, 45.0f, 1.0f, { 0.0f, 0.0f, 30.0f }, { 30.0f, 120.0f, 60.0f } },
{ 0x81, 0xC5, 0x4343, -1, 0, -1.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
-OnePointCsFull D_80123254[2] = {
+static OnePointCsFull D_80123254[2] = {
{ 0x0F, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x03, 0xC5, 0x0101, 49, 0, 50.0f, 0.05f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
};
-OnePointCsFull D_801232A4[1] = {
+static OnePointCsFull D_801232A4[1] = {
{ 0x0F, 0x45, 0x0101, 9999, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
};
@@ -646,24 +646,24 @@ static OnePointCsFull D_801237CC[5] = {
{ 0x0F, 0xFF, 0x0000, 100, -45, 75.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
-OnePointCsFull D_80123894[3] = {
+static OnePointCsFull D_80123894[3] = {
{ 0x0F, 0xFF, 0x0101, 60, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x0F, 0xFF, 0x4242, 30, 0, 50.0f, 1.0f, { 0.0f, 28.0f, 0.0f }, { 0.0f, 20.0f, 40.0f } },
{ 0x0D, 0xFF, 0x0000, 120, 0, 180.0f, 0.4f, { 0.0f, -5.0f, 0.0f }, { 0.0f, 2.0f, 40.0f } },
};
-OnePointCsFull D_8012390C[2] = {
+static OnePointCsFull D_8012390C[2] = {
{ 0x0F, 0xFF, 0x0101, 30, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x0F, 0xFF, 0x4242, 180, 0, 60.0f, 1.0f, { 0.0f, 78.0f, 0.0f }, { 0.0f, 78.0f, 200.0f } },
};
-OnePointCsFull D_8012395C[3] = {
+static OnePointCsFull D_8012395C[3] = {
{ 0x0F, 0xFF, 0x0101, 60, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x0F, 0xFF, 0x4242, 30, 0, 50.0f, 1.0f, { 0.0f, 28.0f, 0.0f }, { 0.0f, 20.0f, -45.0f } },
{ 0x0D, 0xFF, 0x0000, 120, 0, 180.0f, 0.4f, { 0.0f, -5.0f, 0.0f }, { 0.0f, 2.0f, 45.0f } },
};
-OnePointCsFull D_801239D4[3] = {
+static OnePointCsFull D_801239D4[3] = {
{ 0x0F, 0xFF, 0x4242, 5, 0, 60.0f, 1.0f, { 0.0f, 20.0f, 0.0f }, { 0.0f, 40.0f, -120.0f } },
{ 0x09, 0xFF, 0x4242, 0, 0, 60.0f, 1.0f, { 0.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },