yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
overworld_map_screen.h
Go to the documentation of this file.
1#ifndef YAZE_APP_ZELDA3_OVERWORLD_MAP_SCREEN_H
2#define YAZE_APP_ZELDA3_OVERWORLD_MAP_SCREEN_H
3
4#include <array>
5
6#include "absl/status/status.h"
9#include "app/rom.h"
10
11namespace yaze {
12namespace zelda3 {
13
25 public:
30 absl::Status Create(Rom* rom);
31
36 absl::Status Save(Rom* rom);
37
38 // Accessors for tile data
39 auto& lw_tiles() { return lw_map_tiles_; }
40 auto& dw_tiles() { return dw_map_tiles_; }
41
42 // Mutable accessors for editing
43 auto& mutable_lw_tiles() { return lw_map_tiles_; }
44 auto& mutable_dw_tiles() { return dw_map_tiles_; }
45
46 // Bitmap accessors
47 auto& tiles8_bitmap() { return tiles8_bitmap_; }
48 auto& map_bitmap() { return map_bitmap_; }
49
50 // Palette accessors
51 auto& lw_palette() { return lw_palette_; }
52 auto& dw_palette() { return dw_palette_; }
53
58 absl::Status RenderMapLayer(bool use_dark_world);
59
64 absl::Status LoadCustomMap(const std::string& file_path);
65
71 absl::Status SaveCustomMap(const std::string& file_path, bool use_dark_world);
72
73 private:
78 absl::Status LoadMapData(Rom* rom);
79
80 std::array<uint8_t, 64 * 64> lw_map_tiles_; // Light World tile indices
81 std::array<uint8_t, 64 * 64> dw_map_tiles_; // Dark World tile indices
82
83 gfx::Bitmap tiles8_bitmap_; // 128x128 tileset (mode 7 graphics)
84 gfx::Bitmap map_bitmap_; // 512x512 rendered map (64 tiles × 8 pixels)
85
86 gfx::SnesPalette lw_palette_; // Light World palette
87 gfx::SnesPalette dw_palette_; // Dark World palette
88};
89
90} // namespace zelda3
91} // namespace yaze
92
93#endif // YAZE_APP_ZELDA3_OVERWORLD_MAP_SCREEN_H
94
The Rom class is used to load, save, and modify Rom data.
Definition rom.h:74
Represents a bitmap image optimized for SNES ROM hacking.
Definition bitmap.h:66
Represents a palette of colors for the Super Nintendo Entertainment System (SNES).
OverworldMapScreen manages the overworld map (pause menu) graphics.
std::array< uint8_t, 64 *64 > dw_map_tiles_
absl::Status SaveCustomMap(const std::string &file_path, bool use_dark_world)
Save map data to external binary file.
absl::Status LoadCustomMap(const std::string &file_path)
Load custom map from external binary file.
std::array< uint8_t, 64 *64 > lw_map_tiles_
absl::Status LoadMapData(Rom *rom)
Load map tile data from ROM Reads the interleaved tile format from 4 ROM sections.
absl::Status Save(Rom *rom)
Save changes back to ROM.
absl::Status RenderMapLayer(bool use_dark_world)
Render map tiles into bitmap.
absl::Status Create(Rom *rom)
Initialize and load overworld map data from ROM.
Main namespace for the application.
Definition controller.cc:20