papermario
Decompilation of Paper Mario
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Loading...
Searching...
No Matches
msg_draw.c File Reference

Macros

#define MSG_NORMAL_WIDTH   218
 
#define MSG_NORMAL_X   22
 
#define MSG_NORMAL_WIN_WIDTH   296
 
#define MSG_NORMAL_WIN_HEIGHT   68
 
#define MSG_NORMAL_TEXT_Y   6
 
#define MSG_NORMAL_ARROW_X   276
 
#define MSG_NORMAL_ARROW_Y   57
 
#define MSG_NORMAL_HEIGHT_CAP   68
 
#define MSG_NORMAL_PAGE_HT   14
 
#define MSG_INSPECT_TEXT_Y   3
 
#define MSG_SIGN_TEXT_Y   11
 
#define MSG_SIGN_WIDTH   280
 
#define MSG_SIGN_OFFSET_X   0
 
#define MSG_POPUP_TEXT_Y   4
 
#define MSG_EPILOGUE_TEXT_Y   -2
 
#define MSG_FADE_IN_DURATION   7
 
#define MSG_FADE_OUT_DURATION   5
 

Typedefs

typedef MessageImageDataMessageImageDataList[1]
 

Functions

void appendGfx_message (MessagePrintState *, s16, s16, u16, u16, u16, u8)
 
void appendGfx_msg_prim_rect (u8 r, u8 g, u8 b, u8 a, u16 ulX, u16 ulY, u16 lrX, u16 lrY)
 
void msg_reset_gfx_state (void)
 
void msg_draw_char (MessagePrintState *printer, MessageDrawState *drawState, s32 charIndex, s32 palette, s32 posX, s32 posY)
 
void msg_draw_prim_rect (u8 r, u8 g, u8 b, u8 a, u16 posX, u16 posY, u16 sizeX, u16 sizeY)
 
void msg_draw_speech_arrow (MessagePrintState *printer)
 
void msg_draw_frame (s32 posX, s32 posY, s32 sizeX, s32 sizeY, s32 style, s32 palette, s32 fading, s32 bgAlpha, s32 frameAlpha)
 
void msg_draw_speech_bubble (MessagePrintState *printer, s16 posX, s16 posY, s16 straightWidth, s16 curveWidth, s16 height, f32 scaleX, f32 scaleY, u8 opacity, s32 arg9)
 
s32 msg_get_draw_char_width (s32 character, s32 charset, s32 variation, f32 msgScale, s32 overrideCharWidth, u16 flags)
 
void drawbox_message_delegate (s32 data, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
 
void draw_message_window (MessagePrintState *printer)
 
void msg_get_glyph (s32 font, s32 variation, s32 charIndex, s32 palette, MesasgeFontGlyphData *out)
 

Variables

IMG_BIN ui_msg_bubble_left_png []
 
IMG_BIN ui_msg_bubble_mid_png []
 
IMG_BIN ui_msg_bubble_right_png []
 
IMG_BIN ui_msg_arrow_png []
 
unsigned char ui_msg_palettes [16][32]
 
IMG_BIN ui_msg_sign_corner_topleft_png []
 
IMG_BIN ui_msg_sign_corner_topright_png []
 
IMG_BIN ui_msg_sign_corner_bottomleft_png []
 
IMG_BIN ui_msg_sign_corner_bottomright_png []
 
IMG_BIN ui_msg_lamppost_corner_bottomright_png []
 
IMG_BIN ui_msg_sign_side_top_png []
 
IMG_BIN ui_msg_sign_side_left_png []
 
IMG_BIN ui_msg_sign_side_right_png []
 
IMG_BIN ui_msg_sign_side_bottom_png []
 
IMG_BIN ui_msg_sign_fill_png []
 
PAL_BIN ui_msg_sign_pal []
 
PAL_BIN ui_msg_lamppost_pal []
 
IMG_BIN ui_msg_background_png []
 
s32 gMsgBGScrollAmtX
 
u16 gMsgGlobalWaveCounter
 
MessageImageDataList gMsgVarImages
 
s32 gMsgBGScrollAmtY
 
u8 * D_8015131C
 
Gfx * D_80151338
 
IMG_BIN D_80159B50 [0x200]
 
PAL_BIN D_8015C7E0 [0x10]
 
s16 MsgStyleVerticalLineOffsets []
 
MessageCharsetMsgCharsets [5]
 
PAL_BIN D_802F4560 [80][8]
 
s32 gMessageBoxFrameParts [2][16]
 
Vtx gMsgSpeechBoxLQuad [4]
 
Vtx gMsgSpeechBoxMQuad []
 
Vtx gMsgSpeechBoxRQuad []
 
Vtx gMsgArrowQuad1 []
 
Vtx gMsgArrowQuad2 []
 
Gfx D_8014C500 []
 
u8 D_8014C580 [] = { 50, 80, 100, 105, 100, 0, 0, 0 }
 
u8 D_8014C588 [] = { 105, 100, 77, 57, 40, 27, 16, 8, 3, 0, 0, 0}
 

Macro Definition Documentation

◆ MSG_EPILOGUE_TEXT_Y

#define MSG_EPILOGUE_TEXT_Y   -2

Referenced by appendGfx_message().

◆ MSG_FADE_IN_DURATION

#define MSG_FADE_IN_DURATION   7

Referenced by appendGfx_message().

◆ MSG_FADE_OUT_DURATION

#define MSG_FADE_OUT_DURATION   5

Referenced by appendGfx_message().

◆ MSG_INSPECT_TEXT_Y

#define MSG_INSPECT_TEXT_Y   3

Referenced by appendGfx_message().

◆ MSG_NORMAL_ARROW_X

#define MSG_NORMAL_ARROW_X   276

Referenced by appendGfx_message().

◆ MSG_NORMAL_ARROW_Y

#define MSG_NORMAL_ARROW_Y   57

Referenced by appendGfx_message().

◆ MSG_NORMAL_HEIGHT_CAP

#define MSG_NORMAL_HEIGHT_CAP   68

Referenced by appendGfx_message().

◆ MSG_NORMAL_PAGE_HT

#define MSG_NORMAL_PAGE_HT   14

Referenced by appendGfx_message().

◆ MSG_NORMAL_TEXT_Y

#define MSG_NORMAL_TEXT_Y   6

Referenced by appendGfx_message().

◆ MSG_NORMAL_WIDTH

#define MSG_NORMAL_WIDTH   218

Referenced by appendGfx_message().

◆ MSG_NORMAL_WIN_HEIGHT

#define MSG_NORMAL_WIN_HEIGHT   68

Referenced by appendGfx_message().

◆ MSG_NORMAL_WIN_WIDTH

#define MSG_NORMAL_WIN_WIDTH   296

Referenced by appendGfx_message().

◆ MSG_NORMAL_X

#define MSG_NORMAL_X   22

Referenced by appendGfx_message().

◆ MSG_POPUP_TEXT_Y

#define MSG_POPUP_TEXT_Y   4

Referenced by appendGfx_message().

◆ MSG_SIGN_OFFSET_X

#define MSG_SIGN_OFFSET_X   0

Referenced by appendGfx_message().

◆ MSG_SIGN_TEXT_Y

#define MSG_SIGN_TEXT_Y   11

Referenced by appendGfx_message().

◆ MSG_SIGN_WIDTH

#define MSG_SIGN_WIDTH   280

Referenced by appendGfx_message().

Typedef Documentation

◆ MessageImageDataList

typedef MessageImageData* MessageImageDataList[1]

Function Documentation

◆ appendGfx_message()

void appendGfx_message ( MessagePrintState * printer,
s16 posX,
s16 posY,
u16 additionalOffsetX,
u16 additionalOffsetY,
u16 flag,
u8 alpha )

◆ appendGfx_msg_prim_rect()

void appendGfx_msg_prim_rect ( u8 r,
u8 g,
u8 b,
u8 a,
u16 ulX,
u16 ulY,
u16 lrX,
u16 lrY )

Referenced by msg_draw_prim_rect().

◆ draw_message_window()

void draw_message_window ( MessagePrintState * printer)

Referenced by render_messages().

◆ drawbox_message_delegate()

void drawbox_message_delegate ( s32 data,
s32 baseX,
s32 baseY,
s32 width,
s32 height,
s32 opacity,
s32 darkening )

Referenced by draw_message_window().

◆ msg_draw_char()

void msg_draw_char ( MessagePrintState * printer,
MessageDrawState * drawState,
s32 charIndex,
s32 palette,
s32 posX,
s32 posY )

Referenced by appendGfx_message().

◆ msg_draw_frame()

void msg_draw_frame ( s32 posX,
s32 posY,
s32 sizeX,
s32 sizeY,
s32 style,
s32 palette,
s32 fading,
s32 bgAlpha,
s32 frameAlpha )

◆ msg_draw_prim_rect()

void msg_draw_prim_rect ( u8 r,
u8 g,
u8 b,
u8 a,
u16 posX,
u16 posY,
u16 sizeX,
u16 sizeY )

◆ msg_draw_speech_arrow()

void msg_draw_speech_arrow ( MessagePrintState * printer)

Referenced by appendGfx_message().

◆ msg_draw_speech_bubble()

void msg_draw_speech_bubble ( MessagePrintState * printer,
s16 posX,
s16 posY,
s16 straightWidth,
s16 curveWidth,
s16 height,
f32 scaleX,
f32 scaleY,
u8 opacity,
s32 arg9 )

Referenced by appendGfx_message().

◆ msg_get_draw_char_width()

s32 msg_get_draw_char_width ( s32 character,
s32 charset,
s32 variation,
f32 msgScale,
s32 overrideCharWidth,
u16 flags )

Referenced by appendGfx_message(), and msg_get_glyph().

◆ msg_get_glyph()

◆ msg_reset_gfx_state()

void msg_reset_gfx_state ( void )

Referenced by appendGfx_message().

Variable Documentation

◆ D_8014C500

Gfx D_8014C500[]
Initial value:
= {
gsDPSetCycleType(G_CYC_1CYCLE),
gsDPSetRenderMode(G_RM_TEX_EDGE, G_RM_TEX_EDGE2),
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
gsDPSetTextureFilter(G_TF_AVERAGE),
gsSPTexture(-1, -1, 0, G_TX_RENDERTILE, G_ON),
gsDPSetTexturePersp(G_TP_NONE),
gsDPSetColorDither(G_CD_DISABLE),
gsDPSetAlphaDither(G_AD_DISABLE),
gsDPSetTextureLOD(G_TL_TILE),
gsDPSetTextureLUT(G_TT_RGBA16),
gsDPSetTextureDetail(G_TD_CLAMP),
gsDPSetTextureConvert(G_TC_FILT),
gsDPSetCombineKey(G_CK_NONE),
gsDPSetAlphaCompare(G_AC_NONE),
gsDPNoOp(),
gsSPEndDisplayList(),
}

Referenced by appendGfx_message(), and msg_reset_gfx_state().

◆ D_8014C580

u8 D_8014C580[] = { 50, 80, 100, 105, 100, 0, 0, 0 }

Referenced by draw_message_window().

◆ D_8014C588

u8 D_8014C588[] = { 105, 100, 77, 57, 40, 27, 16, 8, 3, 0, 0, 0}

Referenced by draw_message_window().

◆ D_8015131C

u8* D_8015131C
extern

◆ D_80151338

Gfx* D_80151338
extern

◆ D_80159B50

IMG_BIN D_80159B50[0x200]
extern

◆ D_8015C7E0

PAL_BIN D_8015C7E0[0x10]
extern

◆ D_802F4560

PAL_BIN D_802F4560[80][8]
extern

Referenced by msg_draw_char(), and msg_get_glyph().

◆ gMessageBoxFrameParts

s32 gMessageBoxFrameParts[2][16]
extern

Referenced by msg_draw_frame().

◆ gMsgArrowQuad1

Vtx gMsgArrowQuad1[]
Initial value:
= {
{ .v = { .ob = {0xFFF1, 0x001E, 0}, .tc = {0, 0}, .cn = {191, 184, 176, 255} } },
{ .v = { .ob = {0xF, 0x001E, 0}, .tc = {0x1E0, 0}, .cn = {191, 184, 176, 255} } },
{ .v = { .ob = {0xFFFF, 0, 0}, .tc = {0, 0x1E0}, .cn = {191, 184, 176, 255} } },
{ .v = { .ob = {1, 0, 0}, .tc = {0x1E0, 0x1E0}, .cn = {191, 184, 176, 255} } },
}

Referenced by msg_draw_speech_arrow().

◆ gMsgArrowQuad2

Vtx gMsgArrowQuad2[]
Initial value:
= {
{ .v = { .ob = {0xFFF1, 0x001E, 0}, .tc = {0, 0}, .cn = {191, 184, 176, 255} } },
{ .v = { .ob = {0xF, 0x001E, 0}, .tc = {0x1E0, 0}, .cn = {191, 184, 176, 255} } },
{ .v = { .ob = {0xFFFF, 0, 0}, .tc = {0, 0x1E0}, .cn = {191, 184, 176, 255} } },
{ .v = { .ob = {1, 0, 0}, .tc = {0x1E0, 0x1E0}, .cn = {191, 184, 176, 255} } },
}

Referenced by msg_draw_speech_arrow().

◆ gMsgBGScrollAmtX

s32 gMsgBGScrollAmtX
extern

◆ gMsgBGScrollAmtY

s32 gMsgBGScrollAmtY
extern

◆ gMsgGlobalWaveCounter

u16 gMsgGlobalWaveCounter
extern

◆ gMsgSpeechBoxLQuad

Vtx gMsgSpeechBoxLQuad[4]
Initial value:
= {
{ .v = { .ob = {1, 0, 0}, .tc = {0, 0}, .cn = {255, 255, 248, 255} } },
{ .v = { .ob = {0x20, 0, 0}, .tc = {0x400, 0}, .cn = {255, 255, 248, 255} } },
{ .v = { .ob = {0x1, 0xFFC0, 0}, .tc = {0, 0x800}, .cn = {191, 184, 176, 255} } },
{ .v = { .ob = {0x20, 0xFFC0, 0}, .tc = {0x400, 0x800}, .cn = {191, 184, 176, 255} } },
}

Referenced by msg_draw_speech_bubble().

◆ gMsgSpeechBoxMQuad

Vtx gMsgSpeechBoxMQuad[]
Initial value:
= {
{ .v = { .ob = {0x20, 0, 0}, .tc = {0, 0}, .cn = {255, 255, 248, 255} } },
{ .v = { .ob = {0xE1, 0, 0}, .tc = {0x100, 0}, .cn = {255, 255, 248, 255} } },
{ .v = { .ob = {0x20, 0xFFC0, 0}, .tc = {0, 0x800}, .cn = {191, 184, 176, 255} } },
{ .v = { .ob = {0xE1, 0xFFC0, 0}, .tc = {0x100, 0x800}, .cn = {191, 184, 176, 255} } },
}

Referenced by msg_draw_speech_bubble().

◆ gMsgSpeechBoxRQuad

Vtx gMsgSpeechBoxRQuad[]
Initial value:
= {
{ .v = { .ob = {0xE1, 0, 0}, .tc = {0, 0}, .cn = {255, 255, 248, 255} } },
{ .v = { .ob = {0x100, 0, 0}, .tc = {0x400, 0}, .cn = {255, 255, 248, 255} } },
{ .v = { .ob = {0xE1, 0xFFC0, 0}, .tc = {0, 0x800}, .cn = {191, 184, 176, 255} } },
{ .v = { .ob = {0x100, 0xFFC0, 0}, .tc = {0x400, 0x800}, .cn = {191, 184, 176, 255} } },
}

Referenced by msg_draw_speech_bubble().

◆ gMsgVarImages

MessageImageDataList gMsgVarImages
extern

Referenced by set_message_images().

◆ MsgCharsets

MessageCharset* MsgCharsets[5]
extern

◆ MsgStyleVerticalLineOffsets

s16 MsgStyleVerticalLineOffsets[]
extern

Referenced by appendGfx_message().

◆ ui_msg_arrow_png

IMG_BIN ui_msg_arrow_png[]
extern

Referenced by msg_draw_speech_arrow().

◆ ui_msg_background_png

IMG_BIN ui_msg_background_png[]
extern

Referenced by msg_draw_frame().

◆ ui_msg_bubble_left_png

IMG_BIN ui_msg_bubble_left_png[]
extern

Referenced by msg_draw_speech_bubble().

◆ ui_msg_bubble_mid_png

IMG_BIN ui_msg_bubble_mid_png[]
extern

Referenced by msg_draw_speech_bubble().

◆ ui_msg_bubble_right_png

IMG_BIN ui_msg_bubble_right_png[]
extern

Referenced by msg_draw_speech_bubble().

◆ ui_msg_lamppost_corner_bottomright_png

IMG_BIN ui_msg_lamppost_corner_bottomright_png[]
extern

Referenced by appendGfx_message().

◆ ui_msg_lamppost_pal

PAL_BIN ui_msg_lamppost_pal[]
extern

Referenced by appendGfx_message().

◆ ui_msg_palettes

unsigned char ui_msg_palettes[16][32]
extern

◆ ui_msg_sign_corner_bottomleft_png

IMG_BIN ui_msg_sign_corner_bottomleft_png[]
extern

Referenced by appendGfx_message().

◆ ui_msg_sign_corner_bottomright_png

IMG_BIN ui_msg_sign_corner_bottomright_png[]
extern

Referenced by appendGfx_message().

◆ ui_msg_sign_corner_topleft_png

IMG_BIN ui_msg_sign_corner_topleft_png[]
extern

Referenced by appendGfx_message().

◆ ui_msg_sign_corner_topright_png

IMG_BIN ui_msg_sign_corner_topright_png[]
extern

Referenced by appendGfx_message().

◆ ui_msg_sign_fill_png

IMG_BIN ui_msg_sign_fill_png[]
extern

Referenced by appendGfx_message().

◆ ui_msg_sign_pal

PAL_BIN ui_msg_sign_pal[]
extern

Referenced by appendGfx_message().

◆ ui_msg_sign_side_bottom_png

IMG_BIN ui_msg_sign_side_bottom_png[]
extern

Referenced by appendGfx_message().

◆ ui_msg_sign_side_left_png

IMG_BIN ui_msg_sign_side_left_png[]
extern

Referenced by appendGfx_message().

◆ ui_msg_sign_side_right_png

IMG_BIN ui_msg_sign_side_right_png[]
extern

Referenced by appendGfx_message().

◆ ui_msg_sign_side_top_png

IMG_BIN ui_msg_sign_side_top_png[]
extern

Referenced by appendGfx_message().