Merge pull request #534 from GriffinRichards/sync-scriptcmds
Sync script commands
This commit is contained in:
+12
-4
@@ -1542,18 +1542,26 @@ void SetSeenMon(void)
|
||||
void ResetContextNpcTextColor(void)
|
||||
{
|
||||
gSelectedObjectEvent = 0;
|
||||
gSpecialVar_TextColor = 0xFF;
|
||||
gSpecialVar_TextColor = NPC_TEXT_COLOR_DEFAULT;
|
||||
}
|
||||
|
||||
u8 ContextNpcGetTextColor(void)
|
||||
{
|
||||
u8 gfxId;
|
||||
if (gSpecialVar_TextColor != 0xFF)
|
||||
if (gSpecialVar_TextColor != NPC_TEXT_COLOR_DEFAULT)
|
||||
{
|
||||
// A text color has been specified, use that
|
||||
return gSpecialVar_TextColor;
|
||||
}
|
||||
else if (gSelectedObjectEvent == 0)
|
||||
return 3;
|
||||
{
|
||||
// No text color specified and no object selected, use neutral
|
||||
return NPC_TEXT_COLOR_NEUTRAL;
|
||||
}
|
||||
else
|
||||
{
|
||||
// An object is selected and no color has been specified.
|
||||
// Use the text color normally associated with this object's sprite.
|
||||
gfxId = gObjectEvents[gSelectedObjectEvent].graphicsId;
|
||||
if (gfxId >= OBJ_EVENT_GFX_VAR_0)
|
||||
gfxId = VarGetObjectEventGraphicsId(gfxId - OBJ_EVENT_GFX_VAR_0);
|
||||
@@ -2419,7 +2427,7 @@ static void MoveDeoxysObject(u8 num)
|
||||
else
|
||||
gFieldEffectArguments[5] = 5;
|
||||
FieldEffectStart(FLDEFF_MOVE_DEOXYS_ROCK);
|
||||
Overworld_SetMapObjTemplateCoords(1, sDeoxysCoords[num][0], sDeoxysCoords[num][1]);
|
||||
SetObjEventTemplateCoords(1, sDeoxysCoords[num][0], sDeoxysCoords[num][1]);
|
||||
}
|
||||
|
||||
static void Task_WaitDeoxysFieldEffect(u8 taskId)
|
||||
|
||||
Reference in New Issue
Block a user