summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/tv.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/tv.c b/src/tv.c
index 6a1034f81..94aab8f56 100755
--- a/src/tv.c
+++ b/src/tv.c
@@ -294,11 +294,11 @@ u8 sub_80BD8B8(void)
}
u8 CheckForBigMovieOrEmergencyNewsOnTV(void);
-void SetTVMetatilesOnMap(s32, s32, u16);
+void SetTVMetatilesOnMap(int, int, u16);
bool8 sub_80BECA0(void);
bool8 IsTVShowInSearchOfTrainersAiring(void);
-void UpdateTVScreensOnMap(s32 a0, s32 a1)
+void UpdateTVScreensOnMap(int a0, int a1)
{
u8 bigMovieOrEmergencyNewsOnTv;
FlagSet(SYS_TV_WATCH);
@@ -323,6 +323,22 @@ void UpdateTVScreensOnMap(s32 a0, s32 a1)
}
}
+void SetTVMetatilesOnMap(int width, int height, u16 tileId)
+{
+ int x;
+ int y;
+ for (y=0; y<height; y++)
+ {
+ for (x=0; x<width; x++)
+ {
+ if (MapGridGetMetatileBehaviorAt(x, y) == 0x86)
+ {
+ MapGridSetMetatileIdAt(x, y, tileId | 0xc00);
+ }
+ }
+ }
+}
+
asm(".section .text_a");
s8 sub_80BF74C(TVShow tvShow[]);