Enum Time

This commit is contained in:
PokeCodec 2020-08-14 18:08:16 -04:00
parent 50d6e9ea34
commit d3e00cadcc
2 changed files with 12 additions and 5 deletions

View File

@ -451,11 +451,11 @@ u8 GetLastTextColor(u8 colorType)
{ {
switch (colorType) switch (colorType)
{ {
case 0: case COLOR_FOREGROUND:
return gLastTextFgColor; return gLastTextFgColor;
case 2: case COLOR_BACKGROUND:
return gLastTextBgColor; return gLastTextBgColor;
case 1: case COLOR_SHADOW:
return gLastTextShadowColor; return gLastTextShadowColor;
default: default:
return 0; return 0;
@ -482,8 +482,8 @@ u8 GetLastTextColor(u8 colorType)
const u32 toOrr = r5 & 0xF; \ const u32 toOrr = r5 & 0xF; \
if (toOrr) \ if (toOrr) \
{ \ { \
dst = windowTiles + ((j >> 3) * 32) + ((j & 7) >> 1) + ((i >> 3) * widthOffset) + ((i & 7) * 4); \ dst = windowTiles + ((j / 8) * 32) + ((j & 7) >> 1) + ((i / 8) * widthOffset) + ((i & 7) * 4); \
bits = ((j & 1) << 2); \ bits = ((j & 1) * 4); \
*dst = (toOrr << bits) | ((0xF0 >> bits) & *dst); \ *dst = (toOrr << bits) | ((0xF0 >> bits) & *dst); \
} \ } \
r5 >>= 4; \ r5 >>= 4; \

View File

@ -269,6 +269,13 @@
#define TEXT_SPEED_FF 0xFF #define TEXT_SPEED_FF 0xFF
enum
{
COLOR_FOREGROUND,
COLOR_SHADOW,
COLOR_BACKGROUND
};
enum enum
{ {
FONTATTR_MAX_LETTER_WIDTH, FONTATTR_MAX_LETTER_WIDTH,