summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/field_effect_helpers.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/field_effect_helpers.c b/src/field_effect_helpers.c
index 44403eef8..3771d24e4 100644
--- a/src/field_effect_helpers.c
+++ b/src/field_effect_helpers.c
@@ -18,7 +18,7 @@
// Static ROM declarations
/*static*/ void sub_81269E0(struct Sprite *);
static void npc_pal_op(struct MapObject *mapObject, struct Sprite *sprite);
-/*static*/ void npc_pal_op_A(struct MapObject *, u8);
+static void npc_pal_op_A(struct MapObject *, u8);
static void npc_pal_op_B(struct MapObject *, u8);
/*static*/ void sub_81275A0(struct Sprite *);
/*static*/ void sub_81275C4(struct Sprite *);
@@ -145,3 +145,15 @@ static void npc_pal_op_B(struct MapObject *mapObject, u8 paletteNum)
sub_807D78C(paletteNum);
}
}
+
+static void npc_pal_op_A(struct MapObject *mapObject, u8 paletteNum)
+{
+ const struct MapObjectGraphicsInfo *graphicsInfo;
+
+ graphicsInfo = GetFieldObjectGraphicsInfo(mapObject->graphicsId);
+ if (graphicsInfo->paletteTag2 != 0x11ff)
+ {
+ pal_patch_for_npc(graphicsInfo->paletteTag2, paletteNum);
+ sub_807D78C(paletteNum);
+ }
+}