Merge remote-tracking branch 'upstream/main' into d_lyt_meter_stuff

This commit is contained in:
robojumper
2025-04-25 18:40:43 +02:00
12 changed files with 181 additions and 60 deletions
+2 -3
View File
@@ -62,9 +62,8 @@ public:
void setTextWithTextProcessor(const wchar_t *str, dTagProcessor_c *tagProcessor, void *, ...);
s32 calcTextLines(const wchar_t *src, dTagProcessor_c *tagProcessor);
void setMessageWithGlobalTextProcessorAndMsbtInfo(
const MsbtInfo *info, const char *labelId, wchar_t *destBuf, u32 maxLen
);
void
setMessageWithGlobalTextProcessorAndMsbtInfo(MsbtInfo *info, const char *labelId, wchar_t *destBuf, u32 maxLen);
void loadTextFormatVars();
void setupGX() const;
+2
View File
@@ -48,6 +48,8 @@ void LMSi_AnalyzeMessageBinary(struct MsbInfo *info, const char *type);
int LMSi_SearchBlockByName(struct MsbInfo *info, const char *name);
int LMSi_GetHashTableIndexFromLabel(const char *label, int tableSize);
#define LMS_OFS_TO_PTR(ty, ptr, offset) (ty *)((char *)(ptr) + (offset))
#ifdef __cplusplus
}
#endif
+4 -4
View File
@@ -10,23 +10,23 @@ extern "C" {
struct MsbfInfo;
struct MsbFlowInfo {
/* 0x00 */ char type;
/* 0x00 */ unsigned char type;
/* 0x01 */ char subType;
/* 0x04 */ int params1n2;
/* 0x08 */ short next;
/* 0x0A */ short param3;
/* 0x0C */ short param4;
/* 0x0E */ short param5;
/* 0x0E */ unsigned short param5;
};
// Func names are made up
struct MsbfInfo *LMS_InitFlow(void *data);
void LMS_CloseFlow(struct MsbfInfo *info);
int LMS_GetFlow(struct MsbfInfo *info, int index);
int LMS_GetFlow(struct MsbfInfo *info);
int LMS_GetEntrypoint(struct MsbfInfo *info, const char *label);
struct MsbFlowInfo *LMS_GetFlowElement(struct MsbfInfo *info, int index);
const unsigned short *LMS_GetBranchPoints(struct MsbfInfo *info, int index);
unsigned short *LMS_GetBranchPoints(struct MsbfInfo *info, int index);
#ifdef __cplusplus
}
+8
View File
@@ -7,6 +7,14 @@
extern "C" {
#endif
// made up
enum LMS_Error {
LMS_NOT_FOUND = -1,
LMS_MISSING_LBL1_DATA = -2,
LMS_MISSING_FLW3_DATA = -4,
LMS_MISSING_FEN1_DATA = -10,
};
void LMS_SetMemFuncs(void *(*alloc)(size_t size), void (*free)(void *ptr));
// internal
+5 -5
View File
@@ -17,11 +17,11 @@ struct MsbtAttrInfo {
struct MsbtInfo *LMS_InitMessage(void *data);
void LMS_CloseMessage(struct MsbtInfo *info);
int LMS_GetTextIndexByLabel(const struct MsbtInfo *info, const char *label);
const wchar_t *LMS_GetText(const struct MsbtInfo *info, int index);
const wchar_t *LMS_GetTextByLabel(const struct MsbtInfo *info, const char *label);
const char *LMS_GetLabelByTextIndex(const struct MsbtInfo *info, int index);
struct MsbtAttrInfo *LMS_GetAttribute(const struct MsbtInfo *info, int index);
int LMS_GetTextIndexByLabel(struct MsbtInfo *info, const char *label);
const wchar_t *LMS_GetText(struct MsbtInfo *info, int index);
const wchar_t *LMS_GetTextByLabel(struct MsbtInfo *info, const char *label);
int LMS_GetLabelByTextIndex(struct MsbtInfo *info, int index, char *outLabel);
struct MsbtAttrInfo *LMS_GetAttribute(struct MsbtInfo *info, int index);
#ifdef __cplusplus
}