summaryrefslogtreecommitdiff
path: root/include/text.h
blob: edc5f58c7e5619fcc5583b38123471b9e278d714 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef POKEDIAMOND_TEXT_H
#define POKEDIAMOND_TEXT_H

#include "global.h"

struct TextPrinterTemplate
{
    const u8* currentChar;
    u32 windowId;
    u8 padding[1];
    u8 fontId;
    u8 x;
    u8 y;
    u8 currentX;
    u8 currentY;
    u8 letterSpacing;
    u8 lineSpacing;
    u8 unk;
    u8 fgColor;
    u8 bgColor;
    u8 shadowColor;
    u16 unk2;
    u8 unk3;
    u8 unk4;
};

struct TextPrinter
{
    struct TextPrinterTemplate printerTemplate;

    void (*callback)(struct TextPrinterTemplate *, u16); // 0x10

    u8 subStructFields[7]; // always cast to struct TextPrinterSubStruct... so why bother
    u8 active;
    u8 state;       // 0x1C
    u8 textSpeed;
    u8 delayCounter;
    u8 scrollDistance;
    u8 minLetterSpacing;  // 0x20
    u8 japanese;
};

struct FontInfo
{
    u8 maxLetterWidth;
    u8 maxLetterHeight;
    u8 letterSpacing;
    u8 lineSpacing;
    u8 unk;
    u8 fgColor;
    u8 bgColor;
    u8 shadowColor;
};

void SetFontsPointer(const struct FontInfo *fonts);
u8 FUN_0201BCC8(void *param0, u32 param1, u32 param2);
void FUN_0201BCFC(u32 param0);
BOOL FUN_0201BD44(u32 param0);
void FUN_0201BD5C(void);
u8 FUN_0201BD70(u32 param0);
void FUN_0201BCFC(u32 param0);
u16 AddTextPrinterParameterized(u32 windowId, u8 fontId, const u8 *str, u32 x, u32 y, u32 speed, void (*callback)(void *, u16));
u16 AddTextPrinterParameterized2(u32 windowId, u8 fontId, const u8 *str, u32 x, u32 y, u32 speed, u32 colors, void (*callback)(void *, u16));
u16 AddTextPrinterParameterized3(u32 windowId, u8 fontId, const u8 *str, u32 x, u32 y, u32 speed, u32 colors, u32 letterSpacing, u32 lineSpacing, void (*callback)(void *, u16));

#endif //POKEDIAMOND_TEXT_H