summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh <32826900+ShinyDragonHunter@users.noreply.github.com>2020-12-22 05:22:50 +0000
committerJosh <32826900+ShinyDragonHunter@users.noreply.github.com>2020-12-22 05:22:50 +0000
commit4b04ae41bb1bdfc534033b0695d3a277a41911fc (patch)
treecd44eb569a5f0c463607775fca6b042ab3d3878d
parentf6ef9d6fba6f17434585235bf46bddea5a8969e2 (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.md7
1 files changed, 5 insertions, 2 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 1dece20..d2bd9f5 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
@@ -1,8 +1,11 @@
In FireRed and LeafGreen, there is a scripting command that allows text to be a different colour. When it was used, it also stored the value of the last text colour in `gSpecialVar_PrevTextColor` so the colour could be restored later on in the script. The script for the player obtaining an item used this so it could get the correct colour of the text before the obtain item script was executed. This method was also integrated into object event interaction in that the text colour would be blue if the player was interacting with any “male” pic like a Youngster, a Bug Catcher or Brock and red if the player was interacting with any “female” pic like a Lass, a Picnicker or Misty. Anything else was the default dark grey. This feature only allowed 3 possible text colours, which are blue, red and dark grey and used a look up table for getting the correct text colour for the object event.
-This tutorial will walk you through how to implement this into Emerald whilst also removing the restrictions it had. `NOTE:` this tutorial expects you to have dynamic overworld palettes as this uses bytes in the object event graphics info struct that got made redundant with the dynamic palette system.
+This tutorial will walk you through how to implement this into Emerald whilst also removing the restrictions it had.
+```NOTE: this tutorial expects you to have dynamic overworld palettes as this uses bytes in the object event graphics info struct that got made redundant with the dynamic palette system.```
-Firstly, open field_specials.c and add the following function:
+Without further adieu…
+
+Open field_specials.c and add the following function:
```c
u8 ContextNpcGetTextColor(void)