mirror of
https://github.com/encounter/mkdd.git
synced 2026-03-30 11:30:02 -07:00
111 lines
2.4 KiB
C++
111 lines
2.4 KiB
C++
#ifndef READPRINTMESSAGE_H
|
|
#define READPRINTMESSAGE_H
|
|
|
|
#include <JSystem/J2D/J2DPane.h>
|
|
|
|
#include "Kameda/PrintDvdError.h"
|
|
#include "Kameda/PrintProgressive.h"
|
|
#include "Kameda/PrintMemoryCard.h"
|
|
#include "Kawano/PrintPal.h"
|
|
|
|
// Move to JSystem?
|
|
|
|
struct Header
|
|
{
|
|
u32 signature;
|
|
u32 dataType;
|
|
u32 dataSize;
|
|
u32 numBlocks;
|
|
u8 charset;
|
|
u8 _pad[0xf];
|
|
};
|
|
|
|
struct Block
|
|
{
|
|
u32 kind;
|
|
u32 size;
|
|
u8 data[];
|
|
};
|
|
|
|
enum BlockKind
|
|
{
|
|
BLOCK_KIND_INF = 0x494e4631,
|
|
BLOCK_KIND_DAT = 0x44415431,
|
|
BLOCK_KIND_STR = 0x53545231,
|
|
BLOCK_KIND_MID = 0x4d494431
|
|
};
|
|
|
|
struct Entry
|
|
{
|
|
u32 offset;
|
|
u16 rate;
|
|
s8 charSpace;
|
|
};
|
|
|
|
struct Inf
|
|
{
|
|
u32 kind;
|
|
u32 size;
|
|
u16 numEntries;
|
|
u16 entrySize;
|
|
u16 groupID;
|
|
u8 defaultColor;
|
|
u8 _pad[0x1];
|
|
Entry entries[];
|
|
};
|
|
|
|
struct Mid
|
|
{
|
|
u32 kind;
|
|
u32 size;
|
|
u16 numEntries;
|
|
u8 format;
|
|
u8 info;
|
|
u8 _pad[0x4];
|
|
u32 messageIds[];
|
|
};
|
|
|
|
struct BMC
|
|
{
|
|
Header header;
|
|
struct
|
|
{
|
|
struct
|
|
{
|
|
u32 kind;
|
|
u32 size;
|
|
} header;
|
|
|
|
u16 numColors;
|
|
u16 colorFormat;
|
|
u32 entries[256];
|
|
// padding bytes, 32 byte alignment
|
|
} colorTable;
|
|
};
|
|
|
|
namespace ReadPrintMessage
|
|
{ // Autogenerated
|
|
// Global
|
|
u32 getColor(void *bmcPtr, int index); // 0x801690b4
|
|
u8 getDefaultColor(void *bmgPtr); // 0x80169330
|
|
u16 getRate(void *bmgPtr, int); // 0x801694ec
|
|
s8 getCharSpace(void *bmgPtr, int); // 0x801696b4
|
|
char *getMessage(void *bmgPtr, int); // 0x8016987c
|
|
void tagCnv(char *, void *, J2DTextBox::TFontSize, int, char *); // 0x80169a50
|
|
int getBmgMessageID(PrintDvdError::MessageID); // 0x8016a600
|
|
int getBmgMessageID(PrintProgressive::MessageID); // 0x8016a6f8
|
|
int getBmgMessageID(PrintPal::MessageID); // 0x801520b8(PAL)
|
|
int getBmgMessageID(PrintMemoryCard::MessageID); // 0x8016a7a8
|
|
int getBmgMessageID(int); // 0x8016aa10
|
|
|
|
void readBmg(void *bmgPtr);
|
|
|
|
extern int mNum[10]; // 0x803fbf34, TODO: make this a struct ig
|
|
extern char *mStr[5]; // 0x803fbf70
|
|
extern Inf *mInfoPtr; // 0x80416350
|
|
extern Block *mDataPtr; // 0x80416354
|
|
|
|
}; // namespace ReadPrintMessage
|
|
|
|
#endif // READPRINTMESSAGE_H
|