#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. | |
| 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 224 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_.

| 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 593 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 611 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 577 of file usage_preview.cc.
References map_.
Referenced by Render(), and Tile16sUsingTile().
|
private |
Definition at line 246 of file usage_preview.h.
Referenced by Configure().
|
private |
Definition at line 247 of file usage_preview.h.
Referenced by Configure().
|
private |
Definition at line 248 of file usage_preview.h.
Referenced by area(), and Configure().
|
private |
Definition at line 249 of file usage_preview.h.
Referenced by Configure(), Render(), and TileIdsFor().
|
private |
Definition at line 250 of file usage_preview.h.
Referenced by Configure(), Render(), and Tile16sUsingTile().