diff options
author | PikalaxALT <pikalax1@gmail.com> | 2017-05-29 19:12:46 -0400 |
---|---|---|
committer | PikalaxALT <pikalax1@gmail.com> | 2017-05-29 19:12:46 -0400 |
commit | b5f8543486212d937cb74512f595124d398e4d9f (patch) | |
tree | dc2a076b06a213080637e9f45451ef54cb608816 | |
parent | e18309037970a8034c4c3022c978bb7122984953 (diff) |
TurnOffTVScreen
-rwxr-xr-x | asm/tv.s | 15 | ||||
-rw-r--r-- | include/fieldmap.h | 1 | ||||
-rw-r--r-- | include/global.fieldmap.h | 7 | ||||
-rw-r--r-- | src/fieldmap.c | 8 | ||||
-rwxr-xr-x | src/tv.c | 8 |
5 files changed, 16 insertions, 23 deletions
@@ -7,21 +7,6 @@ .text - thumb_func_start TurnOffTVScreen -TurnOffTVScreen: @ 80BD9F0 - push {lr} - ldr r1, _080BDA08 @ =gUnknown_03004870 - ldr r0, [r1] - ldr r1, [r1, 0x4] - movs r2, 0x2 - bl SetTVMetatilesOnMap - bl DrawWholeMapView - pop {r0} - bx r0 - .align 2, 0 -_080BDA08: .4byte gUnknown_03004870 - thumb_func_end TurnOffTVScreen - thumb_func_start sub_80BDA0C sub_80BDA0C: @ 80BDA0C ldr r2, _080BDA24 @ =gSaveBlock1 diff --git a/include/fieldmap.h b/include/fieldmap.h index 530e15798..1aa99031d 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -2,6 +2,7 @@ #define GUARD_FIELDMAP2_H #include "field_map_obj.h" +extern struct BackupMapData gUnknown_03004870; struct MapHeader *mapconnection_get_mapheader(struct MapConnection *connection); int GetMapBorderIdAt(int x, int y); extern bool8 IsMetatileDirectionallyImpassable(struct MapObject *mapObject, s16 x, s16 y, u8 direction); diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 0b72bbec5..62b699e67 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -63,6 +63,13 @@ struct MapData struct Tileset *secondaryTileset; }; +struct BackupMapData +{ + s32 width; + s32 height; + u16 *map; +}; + struct MapObjectTemplate { /*0x00*/ u8 localId; diff --git a/src/fieldmap.c b/src/fieldmap.c index 0301115d5..46b996e52 100644 --- a/src/fieldmap.c +++ b/src/fieldmap.c @@ -2,13 +2,6 @@ #include "fieldmap.h" #include "palette.h" -struct BackupMapData -{ - s32 width; - s32 height; - u16 *map; -}; - extern struct MapHeader * const get_mapheader_by_bank_and_number(u8, u8); extern void mapheader_run_script_with_tag_x1(void); extern void sub_80BB970(struct MapEvents *); @@ -32,7 +25,6 @@ struct Coords32 }; extern const struct Coords32 gUnknown_0821664C[]; -extern struct BackupMapData gUnknown_03004870; EWRAM_DATA static u16 gUnknown_02029828[0x2800] = {0}; EWRAM_DATA struct MapHeader gMapHeader = {0}; @@ -3,7 +3,9 @@ #include "tv.h" #include "data2.h" #include "event_data.h" +#include "fieldmap.h" #include "field_message_box.h" +#include "field_camera.h" #include "flags.h" #include "rng.h" #include "string_util.h" @@ -339,6 +341,12 @@ void SetTVMetatilesOnMap(int width, int height, u16 tileId) } } +void TurnOffTVScreen(void) +{ + SetTVMetatilesOnMap(gUnknown_03004870.width, gUnknown_03004870.height, 0x2); + DrawWholeMapView(); +} + asm(".section .text_a"); s8 sub_80BF74C(TVShow tvShow[]); |