this file is

This commit is contained in:
DizzyEggg 2018-11-05 21:42:12 +01:00
parent 6d0d69f3a5
commit 487a6c2b2c
4 changed files with 395 additions and 417 deletions

View File

@ -1,8 +1,4 @@
gFonts
gUnknown_03002F84
gUnknown_03002F90
gUnknown_03002FB0
gUnknown_03002FD0
gUnknown_03002FF0
gGlyphDimensions
gTextFlags

View File

@ -120,7 +120,7 @@ enum {
FONTATTR_COLOR_SHADOW
};
struct TextPrinterSubSubStruct
struct TextPrinterSubStruct
{
u8 font_type:4; // 0x14
u8 font_type_upper:1;
@ -129,16 +129,6 @@ struct TextPrinterSubSubStruct
u8 field_1_upmid:2;
u8 field_1_top:1;
u8 frames_visible_counter;
u8 field_3;
};
struct TextPrinterSubStruct
{
struct TextPrinterSubSubStruct sub;
u8 field_4; // 0x18
u8 field_5;
u8 field_6;
u8 active;
};
struct TextSubPrinter // TODO: Better name
@ -164,14 +154,14 @@ struct TextPrinter
void (*callback)(struct TextSubPrinter *, u16); // 0x10
union {
union __attribute__((packed)) {
struct TextPrinterSubStruct sub;
u8 sub_fields[8];
u8 sub_fields[7];
} sub_union;
u8 active;
u8 state; // 0x1C
u8 text_speed;
u8 textSpeed;
u8 delayCounter;
u8 scrollDistance;
u8 minLetterSpacing; // 0x20
@ -213,6 +203,16 @@ typedef struct {
u8 flag_3:1;
} TextFlags;
struct Struct_03002F90
{
u8 unk0[0x20];
u8 unk20[0x20];
u8 unk40[0x20];
u8 unk60[0x20];
u8 unk80;
u8 unk81;
};
extern TextFlags gTextFlags;
extern u8 gStringVar1[];
@ -220,12 +220,8 @@ extern u8 gStringVar2[];
extern u8 gStringVar3[];
extern u8 gStringVar4[];
u8 gUnknown_03002F84;
u8 gUnknown_03002F90[];
u8 gUnknown_03002FB0[0x20];
u8 gUnknown_03002FD0[0x20];
u8 gUnknown_03002FF0[0x20];
u8 gGlyphDimensions[0x2];
extern u8 gUnknown_03002F84;
extern struct Struct_03002F90 gUnknown_03002F90;
void SetFontsPointer(const struct FontInfo *fonts);
void DeactivateAllTextPrinters(void);

File diff suppressed because it is too large Load Diff

View File

@ -23,7 +23,7 @@ u16 Font6Func(struct TextPrinter *textPrinter)
{
textPrinter->delayCounter = 0;
}
if (textPrinter->delayCounter && textPrinter->text_speed)
if (textPrinter->delayCounter && textPrinter->textSpeed)
{
textPrinter->delayCounter --;
if (gTextFlags.flag_0 && gMain.newKeys & (A_BUTTON | B_BUTTON))
@ -39,7 +39,7 @@ u16 Font6Func(struct TextPrinter *textPrinter)
}
else
{
textPrinter->delayCounter = textPrinter->text_speed;
textPrinter->delayCounter = textPrinter->textSpeed;
}
char_ = *textPrinter->subPrinter.current_text_offset ++;
switch (char_)
@ -135,7 +135,7 @@ u16 Font6Func(struct TextPrinter *textPrinter)
}
DecompressGlyphFont6(char_);
CopyGlyphToWindow(textPrinter);
textPrinter->subPrinter.currentX += gUnknown_03002F90[0x80] + textPrinter->subPrinter.letterSpacing;
textPrinter->subPrinter.currentX += gUnknown_03002F90.unk80 + textPrinter->subPrinter.letterSpacing;
return 0;
case 1:
if (TextPrinterWait(textPrinter))
@ -206,12 +206,12 @@ static void DecompressGlyphFont6(u16 glyph)
const u16 *glyphs;
glyphs = sFont6BrailleGlyphs + 0x100 * (glyph / 8) + 0x10 * (glyph % 8);
DecompressGlyphTile(glyphs, (u16 *)gUnknown_03002F90);
DecompressGlyphTile(glyphs + 0x8, (u16 *)(gUnknown_03002F90 + 0x20));
DecompressGlyphTile(glyphs + 0x80, (u16 *)(gUnknown_03002F90 + 0x40));
DecompressGlyphTile(glyphs + 0x88, (u16 *)(gUnknown_03002F90 + 0x60));
gUnknown_03002F90[0x80] = 0x10;
gUnknown_03002F90[0x81] = 0x10;
DecompressGlyphTile(glyphs, (u16 *)gUnknown_03002F90.unk0);
DecompressGlyphTile(glyphs + 0x8, (u16 *)(gUnknown_03002F90.unk20));
DecompressGlyphTile(glyphs + 0x80, (u16 *)(gUnknown_03002F90.unk40));
DecompressGlyphTile(glyphs + 0x88, (u16 *)(gUnknown_03002F90.unk60));
gUnknown_03002F90.unk80 = 0x10;
gUnknown_03002F90.unk81 = 0x10;
}
u8 GetGlyphWidthFont6(void)