src/message.c file

Classes

struct Window

Enums

enum (anonymous) { MSG_BORDER_CORNER = 0x7B, MSG_BORDER_H_CORNER = 0x7C, MSG_BORDER_H_STRAIGHT = 0x7D, MSG_BORDER_V_CORNER = 0x7E, MSG_BORDER_V_STRAIGHT = 0x7F, MSG_CURSOR = 0x80, MSG_BACKGROUND = 0x81, MSG_TEXT_LINE1TOP = 0x82, MSG_TEXT_LINE1BOTTOM = 0x83, MSG_TEXT_LINE2TOP = 0xb6, MSG_TEXT_LINE2BOTTOM = 0xb7 }
enum MessageStatus { MSG_IDLE, MSG_INIT, MSG_UPDATE, MSG_OPEN, MSG_CLOSE, MSG_DIE }
enum TextRenderStatus { RENDER_INIT, RENDER_UPDATE, RENDER_DIE, RENDER_WAIT, RENDER_ROLL, RENDER_ENQUIRY }

Typedefs

using MessageFunction = u32(*)(void)
using TextRenderFunction = void(*)(TextRender*)

Functions

void WriteBit(u32*, u32)
auto sub_0805EF40(Token* tok, const u8* param_2) -> bool32
void sub_0805F918(u32 idx, u32 idx2, void* dest)
auto DecToHex(u32, u8*, u32) -> u32
auto sub_08056FEC(u32, u8*) -> u32
auto GetCharacter(Token* tok) -> u32
void sub_0805EEB4(Token* tok, u32 textIdx)
auto sub_0805F7DC(u32 r0, WStruct* r1) -> u32
auto GetFontStrWith(Token* param_1, u32 param_2) -> u32
static void StatusUpdate(u32 status)
auto RunTextCommand(TextRender* this) -> u16
void PaletteChange(TextRender* this, u32 id)
static void SwitchChoice(u32 to, u32 from)
static void MsgChangeLine(u32 lineNo)
static void SetState(u32 status)
static void DeleteWindow(void)
static auto ChangeWindowSize(u32 delta) -> u32
static void CreateWindow(void)
static void DispString(void)
static void DispCursor(void)
static void DrawCanvasLine(void)
static void sub_08056F88(u32, u32)
static void sub_08056FBC(TextRender*)
static auto MsgIdle(void) -> u32
auto MsgInit(void) -> u32
static auto MsgUpdate(void) -> u32
auto MsgOpen(void) -> u32
static auto MsgClose(void) -> u32
static auto MsgDie(void) -> u32
static void TextDispInit(TextRender* this)
static void TextDispUpdate(TextRender* this)
static void TextDispDie(TextRender* this)
static void TextDispWait(TextRender* this)
static void TextDispRoll(TextRender* this)
void TextDispEnquiry(TextRender* this)
auto sub_08056338(void) -> s32
void MessageClose(void)
Close message.
void MessageFromTarget(u32 index)
Show a message that attempts not to obscure the camera target.
void MessageNoOverlap(u32 index, Entity* entity)
Show a message that attempts not to obscure the entity.
void MessageAtHeight(u32 index, u32 y)
Display message at y position.
void MessageAtPos(u32 index, u32 x, u32 y)
Show a message at screen posiiton.
void MessageRequest(u32 index)
Show a message on screen.
void MessageInitialize(void)
Initialize the message system.
void MessageMain(void)
Update the message system.
static void StatusUpdate(MessageStatus status)
void DispMessageFrame(u16* buffer, s32 width, s32 height, u32 flags)
void sub_08057044(u32 a1, struct_020227E8* a2, u32 a3)

Variables

Window gCurrentWindow
Window gNewWindow
u8 unk_00
u8 unk_01
s8 choiceCount
s8 currentChoice
u8 unk_04
u16 unk_08
u16 unk_10
struct @25 gMessageChoices
u8 gTextGfxBuffer
u8 gUnk_020227DC
u8 gUnk_020227E8
u8 gUnk_020227F0
u8 gUnk_020227F8
u8 gUnk_02022800
u8*const gUnk_08107BE0
const u8 gUnk_08107C0F
const u8 gUnk_08107C14

Defines

#define MESSAGE_ADVANCE_KEYS
#define MESSAGE_PRESS_ANY_ADVANCE_KEYS
#define MESSAGE_WIDTH
#define MESSAGE_POSITION_INDEX(window)
#define MESSAGE_PALETTE

Function documentation

static void DispString(void)

void MessageFromTarget(u32 index)

Show a message that attempts not to obscure the camera target.

Parameters
index u32 Message index

void MessageNoOverlap(u32 index, Entity* entity)

Show a message that attempts not to obscure the entity.

Parameters
index u32 Message index
entity Entity* Your important entity

void MessageAtHeight(u32 index, u32 y)

Display message at y position.

Parameters
index u32 Message index
y u32 Screen y

void MessageAtPos(u32 index, u32 x, u32 y)

Show a message at screen posiiton.

Parameters
index u32 Message index
x u32 Screen x
y u32 Screen y

void MessageRequest(u32 index)

Show a message on screen.

Parameters
index u32 Message index