yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
tile16_usage_index.h
Go to the documentation of this file.
1#ifndef YAZE_ZELDA3_OVERWORLD_TILE16_USAGE_INDEX_H
2#define YAZE_ZELDA3_OVERWORLD_TILE16_USAGE_INDEX_H
3
4#include <array>
5#include <functional>
6#include <vector>
7
8#include "absl/status/status.h"
9#include "absl/status/statusor.h"
11
12namespace yaze::zelda3 {
13
15 int tile16_id = 0;
16 int quadrant = 0;
17};
18
19constexpr int kMaxTile8UsageId = 1024;
20using Tile8UsageIndex = std::array<std::vector<Tile8UsageHit>, kMaxTile8UsageId>;
21
22void ClearTile8UsageIndex(Tile8UsageIndex* usage_index);
23
24void AddTile16ToUsageIndex(const gfx::Tile16& tile_data, int tile16_id,
25 Tile8UsageIndex* usage_index);
26
27absl::Status BuildTile8UsageIndex(
28 int total_tiles,
29 const std::function<absl::StatusOr<gfx::Tile16>(int)>& tile_provider,
30 Tile8UsageIndex* usage_index);
31
32} // namespace yaze::zelda3
33
34#endif // YAZE_ZELDA3_OVERWORLD_TILE16_USAGE_INDEX_H
Tile composition of four 8x8 tiles.
Definition snes_tile.h:142
Zelda 3 specific classes and functions.
std::array< std::vector< Tile8UsageHit >, kMaxTile8UsageId > Tile8UsageIndex
void ClearTile8UsageIndex(Tile8UsageIndex *usage_index)
absl::Status BuildTile8UsageIndex(int total_tiles, const std::function< absl::StatusOr< gfx::Tile16 >(int)> &tile_provider, Tile8UsageIndex *usage_index)
constexpr int kMaxTile8UsageId
void AddTile16ToUsageIndex(const gfx::Tile16 &tile_data, int tile16_id, Tile8UsageIndex *usage_index)