Move global strings to new define.cpp file

This commit is contained in:
disinvite 2023-09-27 15:10:53 -04:00
parent 30730cfb74
commit 0b9c9824c9
8 changed files with 23 additions and 12 deletions

View File

@ -21,6 +21,7 @@ add_library(lego1 SHARED
LEGO1/buildingentity.cpp
LEGO1/bumpbouy.cpp
LEGO1/carrace.cpp
LEGO1/define.cpp
LEGO1/dllmain.cpp
LEGO1/dunebuggy.cpp
LEGO1/elevatorbottom.cpp

10
LEGO1/define.cpp Normal file
View File

@ -0,0 +1,10 @@
#include "define.h"
// 0x10101eac
const char *g_parseExtraTokens = ":;";
// 0x10101edc
const char *g_strWORLD = "WORLD";
// 0x10102040
const char *g_strACTION = "ACTION";

8
LEGO1/define.h Normal file
View File

@ -0,0 +1,8 @@
#ifndef DEFINE_H
#define DEFINE_H
extern const char *g_parseExtraTokens;
extern const char *g_strWORLD;
extern const char *g_strACTION;
#endif // DEFINE_H

View File

@ -2,12 +2,10 @@
#include "legoomni.h"
#include "legoutil.h"
#include "define.h"
DECOMP_SIZE_ASSERT(LegoEntity, 0x68)
// 0x10102040
char *g_strACTION = "ACTION";
// OFFSET: LEGO1 0x1000c290
LegoEntity::~LegoEntity()
{

View File

@ -58,7 +58,7 @@ void MakeSourceName(char *p_output, const char *p_input)
}
// OFFSET: LEGO1 0x100b7050
MxBool KeyValueStringParse(char *p_outputValue, char *p_key, char *p_source)
MxBool KeyValueStringParse(char *p_outputValue, const char *p_key, const char *p_source)
{
MxBool didMatch = FALSE;

View File

@ -113,6 +113,6 @@ __declspec(dllexport) MxLong Start(MxDSAction *a);
LegoBuildingManager* BuildingManager();
Isle* GetIsle();
LegoPlantManager* PlantManager();
MxBool KeyValueStringParse(char *, char *, char *);
MxBool KeyValueStringParse(char *, const char *, const char *);
#endif // LEGOOMNI_H

View File

@ -7,15 +7,10 @@
#include <string.h>
#include "decomp.h"
#include "define.h"
DECOMP_SIZE_ASSERT(MxPresenter, 0x40);
// 0x10101eac
char *g_parseExtraTokens = ":;";
// 0x10101edc
char *g_strWORLD = "WORLD";
// OFFSET: LEGO1 0x100b4d50
void MxPresenter::Init()
{

View File

@ -85,6 +85,5 @@ class MxPresenter : public MxCore
};
char *PresenterNameDispatch(const MxDSAction &);
extern char *g_parseExtraTokens;
#endif // MXPRESENTER_H