1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-05 07:24:34 +00:00

Reworked text extraction + add JP text extraction (#1980)

* Reworked text extraction + add JP text extraction

* Format

* Suggested changes

* Correct address for gc-us sJpnMessageEntryTable

Co-authored-by: cadmic <cadmic24@gmail.com>

---------

Co-authored-by: cadmic <cadmic24@gmail.com>
This commit is contained in:
Tharo 2024-07-03 03:42:52 +01:00 committed by GitHub
parent 264581ff3f
commit baf1e8c174
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 1326 additions and 707 deletions

View file

@ -1,7 +1,7 @@
#ifndef MESSAGE_DATA_STATIC_H
#define MESSAGE_DATA_STATIC_H
#include "global.h"
#include "ultra64.h"
#include "message_data_fmt.h"
typedef enum {
@ -35,6 +35,49 @@ typedef struct {
* Message Symbol Declarations
*/
/* Non-Credits Messages */
#if (TEXT_LANGUAGE == TEXT_LANG_US_JP)
#define DEFINE_MESSAGE_NES(textId, type, yPos, jpnMessage, nesMessage, gerMessage, fraMessage) \
extern const char _message_##textId##_nes[];
#define DEFINE_MESSAGE_JPN(textId, type, yPos, jpnMessage, nesMessage, gerMessage, fraMessage) \
extern const char _message_##textId##_jpn[];
#define DEFINE_MESSAGE_FFFC(textId, type, yPos, jpnMessage, nesMessage, gerMessage, fraMessage) \
DEFINE_MESSAGE_JPN(textId, type, yPos, jpnMessage, nesMessage, gerMessage, fraMessage)
#define FONT_MESSAGE_OFFSET (_message_0xFFFC_jpn - (const char*)_jpn_message_data_staticSegmentStart)
#define FONT_MESSAGE_LENGTH (_message_0xFFFD_jpn - _message_0xFFFC_jpn)
#else
#define DEFINE_MESSAGE_NES(textId, type, yPos, jpnMessage, nesMessage, gerMessage, fraMessage) \
extern const char _message_##textId##_nes[]; \
extern const char _message_##textId##_ger[]; \
extern const char _message_##textId##_fra[];
#define DEFINE_MESSAGE_JPN(textId, type, yPos, jpnMessage, nesMessage, gerMessage, fraMessage) \
/* Empty */
#define DEFINE_MESSAGE_FFFC(textId, type, yPos, jpnMessage, nesMessage, gerMessage, fraMessage) \
DEFINE_MESSAGE_NES(textId, type, yPos, jpnMessage, nesMessage, gerMessage, fraMessage)
#define FONT_MESSAGE_OFFSET (_message_0xFFFC_nes - (const char*)_nes_message_data_staticSegmentStart)
#define FONT_MESSAGE_LENGTH (_message_0xFFFD_nes - _message_0xFFFC_nes)
#endif
#define DEFINE_MESSAGE(textId, type, yPos, jpnMessage, nesMessage, gerMessage, fraMessage) \
DEFINE_MESSAGE_NES(textId, type, yPos, jpnMessage, nesMessage, gerMessage, fraMessage) \
DEFINE_MESSAGE_JPN(textId, type, yPos, jpnMessage, nesMessage, gerMessage, fraMessage)
#include "assets/text/message_data.h"
#undef DEFINE_MESSAGE
#undef DEFINE_MESSAGE_NES
#undef DEFINE_MESSAGE_JPN
#undef DEFINE_MESSAGE_FFFC
/* Credits Messages */
#define DEFINE_MESSAGE(textId, type, yPos, staffMessage) \
extern const char _message_##textId##_staff[];
@ -42,17 +85,4 @@ typedef struct {
#undef DEFINE_MESSAGE
#define DEFINE_MESSAGE(textId, type, yPos, nesMessage, gerMessage, fraMessage) \
extern const char _message_##textId##_nes[]; \
extern const char _message_##textId##_ger[]; \
extern const char _message_##textId##_fra[];
#define DEFINE_MESSAGE_NES(textId, type, yPos, nesMessage) \
extern const char _message_##textId##_nes[];
#include "assets/text/message_data.h"
#undef DEFINE_MESSAGE
#undef DEFINE_MESSAGE_NES
#endif