#include <usage_preview.h>

Public Member Functions | |
| absl::Status | Configure (Rom *rom, zelda3::GameData *game_data, int area) |
Loads overworld area area (graphics and palette) and the tile16 table. | |
| absl::Status | ConfigureFromLive (const zelda3::OverworldMap &map, const std::vector< gfx::Tile16 > &definitions, const zelda3::GameData *owner) |
| std::vector< int > | Tile16sUsingTile (uint16_t sheet, int tile_index) const |
| PreviewImage | Render (const SheetPixels &sheets, const std::vector< int > &tile16s, uint16_t sheet, int tile_index, std::vector< SDL_Rect > *highlights=nullptr) |
| int | area () const |
Private Member Functions | |
| std::vector< int > | TileIdsFor (uint16_t sheet, int tile_index) const |
Private Attributes | |
| Rom * | rom_ = nullptr |
| zelda3::GameData * | game_data_ = nullptr |
| int | area_ = -1 |
| std::unique_ptr< zelda3::OverworldMap > | map_ |
| std::vector< gfx::Tile16 > | tiles16_ |
Definition at line 229 of file usage_preview.h.
| absl::Status yaze::editor::usage_preview::Tile16UsagePreview::Configure | ( | Rom * | rom, |
| zelda3::GameData * | game_data, | ||
| int | area ) |
Loads overworld area area (graphics and palette) and the tile16 table.
Definition at line 545 of file usage_preview.cc.
References area(), area_, game_data_, yaze::Rom::is_loaded(), yaze::zelda3::kNumOverworldAreas, map_, yaze::zelda3::ReadMap16Tiles(), rom_, and tiles16_.

| absl::Status yaze::editor::usage_preview::Tile16UsagePreview::ConfigureFromLive | ( | const zelda3::OverworldMap & | map, |
| const std::vector< gfx::Tile16 > & | definitions, | ||
| const zelda3::GameData * | owner ) |
Definition at line 578 of file usage_preview.cc.
References area_, yaze::zelda3::OverworldMap::game_data(), game_data_, yaze::zelda3::OverworldMap::index(), yaze::zelda3::kNumTile16Individual, map_, rom_, and tiles16_.

| std::vector< int > yaze::editor::usage_preview::Tile16UsagePreview::Tile16sUsingTile | ( | uint16_t | sheet, |
| int | tile_index ) const |
Tile16s in the loaded area's blockset that use 8x8 tile tile_index (0-63) of sheet, in any of the slots the area loads it into.
Definition at line 612 of file usage_preview.cc.
References TileIdsFor(), and tiles16_.

| PreviewImage yaze::editor::usage_preview::Tile16UsagePreview::Render | ( | const SheetPixels & | sheets, |
| const std::vector< int > & | tile16s, | ||
| uint16_t | sheet, | ||
| int | tile_index, | ||
| std::vector< SDL_Rect > * | highlights = nullptr ) |
Draws tile16s in rows of 8 (16x16 each) with sheets swapped in. Quadrants that use sheet/tile_index are listed in highlights as pixel rectangles.
Definition at line 630 of file usage_preview.cc.
References yaze::editor::usage_preview::PreviewImage::colors, yaze::editor::usage_preview::PreviewImage::height, yaze::editor::usage_preview::PreviewImage::index0_transparent, map_, yaze::editor::usage_preview::PreviewImage::pixels, TileIdsFor(), tiles16_, and yaze::editor::usage_preview::PreviewImage::width.

|
inline |
|
private |
Definition at line 596 of file usage_preview.cc.
References map_.
Referenced by Render(), and Tile16sUsingTile().
|
private |
Definition at line 257 of file usage_preview.h.
Referenced by Configure(), and ConfigureFromLive().
|
private |
Definition at line 258 of file usage_preview.h.
Referenced by Configure(), and ConfigureFromLive().
|
private |
Definition at line 259 of file usage_preview.h.
Referenced by area(), Configure(), and ConfigureFromLive().
|
private |
Definition at line 260 of file usage_preview.h.
Referenced by Configure(), ConfigureFromLive(), Render(), and TileIdsFor().
|
private |
Definition at line 261 of file usage_preview.h.
Referenced by Configure(), ConfigureFromLive(), Render(), and Tile16sUsingTile().