mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-25 19:24:16 +01:00
this file is
This commit is contained in:
parent
6d0d69f3a5
commit
487a6c2b2c
@ -1,8 +1,4 @@
|
|||||||
gFonts
|
gFonts
|
||||||
gUnknown_03002F84
|
gUnknown_03002F84
|
||||||
gUnknown_03002F90
|
gUnknown_03002F90
|
||||||
gUnknown_03002FB0
|
|
||||||
gUnknown_03002FD0
|
|
||||||
gUnknown_03002FF0
|
|
||||||
gGlyphDimensions
|
|
||||||
gTextFlags
|
gTextFlags
|
||||||
|
@ -120,7 +120,7 @@ enum {
|
|||||||
FONTATTR_COLOR_SHADOW
|
FONTATTR_COLOR_SHADOW
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TextPrinterSubSubStruct
|
struct TextPrinterSubStruct
|
||||||
{
|
{
|
||||||
u8 font_type:4; // 0x14
|
u8 font_type:4; // 0x14
|
||||||
u8 font_type_upper:1;
|
u8 font_type_upper:1;
|
||||||
@ -129,16 +129,6 @@ struct TextPrinterSubSubStruct
|
|||||||
u8 field_1_upmid:2;
|
u8 field_1_upmid:2;
|
||||||
u8 field_1_top:1;
|
u8 field_1_top:1;
|
||||||
u8 frames_visible_counter;
|
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
|
struct TextSubPrinter // TODO: Better name
|
||||||
@ -164,14 +154,14 @@ struct TextPrinter
|
|||||||
|
|
||||||
void (*callback)(struct TextSubPrinter *, u16); // 0x10
|
void (*callback)(struct TextSubPrinter *, u16); // 0x10
|
||||||
|
|
||||||
union {
|
union __attribute__((packed)) {
|
||||||
struct TextPrinterSubStruct sub;
|
struct TextPrinterSubStruct sub;
|
||||||
|
u8 sub_fields[7];
|
||||||
u8 sub_fields[8];
|
|
||||||
} sub_union;
|
} sub_union;
|
||||||
|
|
||||||
|
u8 active;
|
||||||
u8 state; // 0x1C
|
u8 state; // 0x1C
|
||||||
u8 text_speed;
|
u8 textSpeed;
|
||||||
u8 delayCounter;
|
u8 delayCounter;
|
||||||
u8 scrollDistance;
|
u8 scrollDistance;
|
||||||
u8 minLetterSpacing; // 0x20
|
u8 minLetterSpacing; // 0x20
|
||||||
@ -213,6 +203,16 @@ typedef struct {
|
|||||||
u8 flag_3:1;
|
u8 flag_3:1;
|
||||||
} TextFlags;
|
} TextFlags;
|
||||||
|
|
||||||
|
struct Struct_03002F90
|
||||||
|
{
|
||||||
|
u8 unk0[0x20];
|
||||||
|
u8 unk20[0x20];
|
||||||
|
u8 unk40[0x20];
|
||||||
|
u8 unk60[0x20];
|
||||||
|
u8 unk80;
|
||||||
|
u8 unk81;
|
||||||
|
};
|
||||||
|
|
||||||
extern TextFlags gTextFlags;
|
extern TextFlags gTextFlags;
|
||||||
|
|
||||||
extern u8 gStringVar1[];
|
extern u8 gStringVar1[];
|
||||||
@ -220,12 +220,8 @@ extern u8 gStringVar2[];
|
|||||||
extern u8 gStringVar3[];
|
extern u8 gStringVar3[];
|
||||||
extern u8 gStringVar4[];
|
extern u8 gStringVar4[];
|
||||||
|
|
||||||
u8 gUnknown_03002F84;
|
extern u8 gUnknown_03002F84;
|
||||||
u8 gUnknown_03002F90[];
|
extern struct Struct_03002F90 gUnknown_03002F90;
|
||||||
u8 gUnknown_03002FB0[0x20];
|
|
||||||
u8 gUnknown_03002FD0[0x20];
|
|
||||||
u8 gUnknown_03002FF0[0x20];
|
|
||||||
u8 gGlyphDimensions[0x2];
|
|
||||||
|
|
||||||
void SetFontsPointer(const struct FontInfo *fonts);
|
void SetFontsPointer(const struct FontInfo *fonts);
|
||||||
void DeactivateAllTextPrinters(void);
|
void DeactivateAllTextPrinters(void);
|
||||||
|
752
src/text.c
752
src/text.c
File diff suppressed because it is too large
Load Diff
@ -23,7 +23,7 @@ u16 Font6Func(struct TextPrinter *textPrinter)
|
|||||||
{
|
{
|
||||||
textPrinter->delayCounter = 0;
|
textPrinter->delayCounter = 0;
|
||||||
}
|
}
|
||||||
if (textPrinter->delayCounter && textPrinter->text_speed)
|
if (textPrinter->delayCounter && textPrinter->textSpeed)
|
||||||
{
|
{
|
||||||
textPrinter->delayCounter --;
|
textPrinter->delayCounter --;
|
||||||
if (gTextFlags.flag_0 && gMain.newKeys & (A_BUTTON | B_BUTTON))
|
if (gTextFlags.flag_0 && gMain.newKeys & (A_BUTTON | B_BUTTON))
|
||||||
@ -39,7 +39,7 @@ u16 Font6Func(struct TextPrinter *textPrinter)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
textPrinter->delayCounter = textPrinter->text_speed;
|
textPrinter->delayCounter = textPrinter->textSpeed;
|
||||||
}
|
}
|
||||||
char_ = *textPrinter->subPrinter.current_text_offset ++;
|
char_ = *textPrinter->subPrinter.current_text_offset ++;
|
||||||
switch (char_)
|
switch (char_)
|
||||||
@ -135,7 +135,7 @@ u16 Font6Func(struct TextPrinter *textPrinter)
|
|||||||
}
|
}
|
||||||
DecompressGlyphFont6(char_);
|
DecompressGlyphFont6(char_);
|
||||||
CopyGlyphToWindow(textPrinter);
|
CopyGlyphToWindow(textPrinter);
|
||||||
textPrinter->subPrinter.currentX += gUnknown_03002F90[0x80] + textPrinter->subPrinter.letterSpacing;
|
textPrinter->subPrinter.currentX += gUnknown_03002F90.unk80 + textPrinter->subPrinter.letterSpacing;
|
||||||
return 0;
|
return 0;
|
||||||
case 1:
|
case 1:
|
||||||
if (TextPrinterWait(textPrinter))
|
if (TextPrinterWait(textPrinter))
|
||||||
@ -206,12 +206,12 @@ static void DecompressGlyphFont6(u16 glyph)
|
|||||||
const u16 *glyphs;
|
const u16 *glyphs;
|
||||||
|
|
||||||
glyphs = sFont6BrailleGlyphs + 0x100 * (glyph / 8) + 0x10 * (glyph % 8);
|
glyphs = sFont6BrailleGlyphs + 0x100 * (glyph / 8) + 0x10 * (glyph % 8);
|
||||||
DecompressGlyphTile(glyphs, (u16 *)gUnknown_03002F90);
|
DecompressGlyphTile(glyphs, (u16 *)gUnknown_03002F90.unk0);
|
||||||
DecompressGlyphTile(glyphs + 0x8, (u16 *)(gUnknown_03002F90 + 0x20));
|
DecompressGlyphTile(glyphs + 0x8, (u16 *)(gUnknown_03002F90.unk20));
|
||||||
DecompressGlyphTile(glyphs + 0x80, (u16 *)(gUnknown_03002F90 + 0x40));
|
DecompressGlyphTile(glyphs + 0x80, (u16 *)(gUnknown_03002F90.unk40));
|
||||||
DecompressGlyphTile(glyphs + 0x88, (u16 *)(gUnknown_03002F90 + 0x60));
|
DecompressGlyphTile(glyphs + 0x88, (u16 *)(gUnknown_03002F90.unk60));
|
||||||
gUnknown_03002F90[0x80] = 0x10;
|
gUnknown_03002F90.unk80 = 0x10;
|
||||||
gUnknown_03002F90[0x81] = 0x10;
|
gUnknown_03002F90.unk81 = 0x10;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 GetGlyphWidthFont6(void)
|
u8 GetGlyphWidthFont6(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user