| 1 | #include "Layout/MapTerrainLayout.h" |
|---|---|
| 2 | |
| 3 | #include "Library/Layout/LayoutActor.h" |
| 4 | #include "Library/Layout/LayoutActorUtil.h" |
| 5 | |
| 6 | #include "System/MapDataHolder.h" |
| 7 | |
| 8 | MapTerrainLayout::MapTerrainLayout(const char* name) : al::LayoutActor(name) {} |
| 9 | |
| 10 | bool MapTerrainLayout::tryChangePrintWorld(s32 worldId) { |
| 11 | if (worldId < 0) |
| 12 | return false; |
| 13 | |
| 14 | mMapData = rs::findMapData(this, worldId); |
| 15 | if (!mMapData) |
| 16 | return false; |
| 17 | |
| 18 | al::setPaneTexture(this, "PicMap00", mMapData->texture2dMap); |
| 19 | al::setPaneLocalScale(this, "PicMap00", sead::Vector2f(256.0f, 256.0f)); |
| 20 | |
| 21 | return true; |
| 22 | } |
| 23 | |
| 24 | f32 MapTerrainLayout::getPaneSize() const { |
| 25 | return 2048.0f; |
| 26 | } |
| 27 |