summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh <32826900+ShinyDragonHunter@users.noreply.github.com>2020-12-22 18:11:53 +0000
committerJosh <32826900+ShinyDragonHunter@users.noreply.github.com>2020-12-22 18:11:53 +0000
commit9890318b658902505f745312f5eb78d8da02fc77 (patch)
tree0310c5933b954585dab435020733559d8431bd3f
parentdebde63ccac2b4dd591d09856977465fc6524563 (diff)
Updated Implementing the “textcolor” script command from FRLG and give object events their own text colour (markdown)
-rw-r--r--Implementing-the-“textcolor”-script-command-from-FRLG-and-give-object-events-their-own-text-colour.md22
1 files changed, 11 insertions, 11 deletions
diff --git a/Implementing-the-“textcolor”-script-command-from-FRLG-and-give-object-events-their-own-text-colour.md b/Implementing-the-“textcolor”-script-command-from-FRLG-and-give-object-events-their-own-text-colour.md
index 6b8d446..2ad026e 100644
--- a/Implementing-the-“textcolor”-script-command-from-FRLG-and-give-object-events-their-own-text-colour.md
+++ b/Implementing-the-“textcolor”-script-command-from-FRLG-and-give-object-events-their-own-text-colour.md
@@ -91,7 +91,7 @@ struct ObjectEventGraphicsInfo
{
/*0x00*/ u16 tileTag;
/*0x02*/ u16 paletteTag;
-- /*0x04*/ u16 reflectionPaletteTag;
+- /*0x04*/ u16 reflectionPaletteTag;
+ /*0x04*/ u16 textColor;
/*0x06*/ u16 size;
/*0x08*/ s16 width;
@@ -158,9 +158,9 @@ EWRAM_DATA u16 gSpecialVar_LastTalked = 0;
EWRAM_DATA u16 gSpecialVar_Facing = 0;
EWRAM_DATA u16 gSpecialVar_MonBoxId = 0;
EWRAM_DATA u16 gSpecialVar_MonBoxPos = 0;
--EWRAM_DATA u16 gSpecialVar_Unused_0x8014 = 0;
-+EWRAM_DATA u16 gSpecialVar_TextColor = 0;
-+EWRAM_DATA u16 gSpecialVar_PrevTextColor = 0;
+- EWRAM_DATA u16 gSpecialVar_Unused_0x8014 = 0;
++ EWRAM_DATA u16 gSpecialVar_TextColor = 0;
++ EWRAM_DATA u16 gSpecialVar_PrevTextColor = 0;
EWRAM_DATA static u8 gSpecialFlags[SPECIAL_FLAGS_SIZE] = {0};
```
And on line 30 in `include/event_data.h`, make the following change:
@@ -183,18 +183,18 @@ extern u16 gSpecialVar_LastTalked;
extern u16 gSpecialVar_Facing;
extern u16 gSpecialVar_MonBoxId;
extern u16 gSpecialVar_MonBoxPos;
--extern u16 gSpecialVar_Unused_0x8014;
-+extern u16 gSpecialVar_TextColor;
+- extern u16 gSpecialVar_Unused_0x8014;
++ extern u16 gSpecialVar_TextColor;
+extern u16; gSpecialVar_PrevTextColor;
```
We need to define them to constants because `PrevTextColor` and `TextColor` can be used in scripts. So we need to go to `include/constants/vars` and find `#define VAR_UNUSED_0x08014` with `#define VAR_TEXT_COLOR` and add a new constant.
The changes should look something like this:
```diff
--#define VAR_UNUSED_08014 0x0814
-+#define VAR_TEXT_COLOR 0x8014
+- #define VAR_UNUSED_08014 0x0814
++ #define VAR_TEXT_COLOR 0x8014
#define VAR_TRAINER_BATTLE_OPPONENT_A 0x8015 // Alias of gTrainerBattleOpponent_A
-+#define VAR_PREV_TEXT_COLOR 0x8016
++ #define VAR_PREV_TEXT_COLOR 0x8016
--#define SPECIAL_VARS_END 0x8015
-+#define SPECIAL_VARS_END 0x8016
+- #define SPECIAL_VARS_END 0x8015
++ #define SPECIAL_VARS_END 0x8016
``` \ No newline at end of file