diff --git a/src/tile.cc b/src/tile.cc index af68a39..4bee912 100644 --- a/src/tile.cc +++ b/src/tile.cc @@ -654,6 +654,17 @@ static void tileRefreshGame(Rect* rect, int elevation) gTileWindowRefreshProc(&rectToUpdate); } +// 0x4B1634 +void tile_toggle_roof(bool refresh) +{ + gTileRoofIsVisible = !gTileRoofIsVisible; + + if (refresh) { + // NOTE: Uninline. + tileWindowRefresh(); + } +} + // 0x4B166C int tileRoofIsVisible() { diff --git a/src/tile.h b/src/tile.h index ae227d2..97acc8f 100644 --- a/src/tile.h +++ b/src/tile.h @@ -26,6 +26,7 @@ void tileEnable(); void tileWindowRefreshRect(Rect* rect, int elevation); void tileWindowRefresh(); int tileSetCenter(int tile, int flags); +void tile_toggle_roof(bool refresh); int tileRoofIsVisible(); int tileToScreenXY(int tile, int* x, int* y, int elevation); int tileFromScreenXY(int x, int y, int elevation, bool ignoreBounds = false);