mirror of
https://github.com/zeldaret/ss
synced 2026-05-23 15:01:38 -04:00
d3d4bd253c
* d_tag_processor WIP * Progress * Unconst * Fix switch command (thanks Roeming!) * Match a random text related file instead * More progress * More progress * No missing breaks * Some repair * Some repair and shuffling * More repair * a bit better * a bit better 2 * what a switch order * Closer unrolling * Minor cleanup * Fix accidental cases * More fixes * even better * More fixes * Down to regswaps * Some renames * Review feedback * cleanup more sdata2 values and eventFlowTextProcessingRelated match --------- Co-authored-by: elijah-thomas774 <elijahthomas774@gmail.com>
57 lines
1.3 KiB
C
57 lines
1.3 KiB
C
#ifndef LIBMS_COMMONLIB_H
|
|
#define LIBMS_COMMONLIB_H
|
|
|
|
#include "common.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct MsbBlockHeader {
|
|
/* 0x00 */ char name[4];
|
|
/* 0x04 */ int sectionLength;
|
|
/* 0x08 */ unsigned short field_0x08;
|
|
/* 0x0A */ unsigned char field_0x0A[0x10 - 0x0A];
|
|
/* 0x10 */ int numEntries;
|
|
};
|
|
|
|
struct MsbBlock {
|
|
/* 0x00 */ int *ptr;
|
|
/* 0x04 */ char name[4];
|
|
/* 0x08 */ int sectionLength;
|
|
/* 0x0C */ u16 field_0x0C;
|
|
};
|
|
|
|
#pragma push
|
|
#pragma pack(2)
|
|
|
|
struct MsbHeader {
|
|
/* 0x00 */ unsigned char field_0x00[0x0C - 0x00];
|
|
/* 0x0C */ unsigned char version;
|
|
/* 0x0E */ unsigned short sectionCount;
|
|
/* 0x10 */ unsigned char field_0x10[0x12 - 0x10];
|
|
/* 0x12 */ int fileLength;
|
|
};
|
|
|
|
#pragma pop
|
|
|
|
struct MsbInfo {
|
|
/* 0x00 */ struct MsbHeader *header;
|
|
/* 0x04 */ int fileLength;
|
|
/* 0x08 */ unsigned char version;
|
|
/* 0x0A */ unsigned short sectionCount;
|
|
/* 0x0C */ struct MsbBlock *sectionInfos;
|
|
};
|
|
|
|
void LMSi_AnalyzeMessageHeader(struct MsbInfo *info);
|
|
void LMSi_AnalyzeMessageBlocks(struct MsbInfo *info);
|
|
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);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|