Enhance tilemap functionality and improve bitmap handling
- Replaced instances of Renderer::GetInstance() with Renderer::Get() for consistency in tilemap rendering. - Introduced new functions for fetching and mirroring tile data, enhancing tile manipulation capabilities. - Added ComposeTile16 function to facilitate the composition of 16x16 tile graphics from individual tile parts. - Updated RenderTile to handle bitmap updates more efficiently and ensure proper rendering of tiles. - Included necessary header for SNES tile handling to support new functionalities.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define YAZE_GFX_TILEMAP_H
|
||||
|
||||
#include "app/gfx/bitmap.h"
|
||||
#include "app/gfx/snes_tile.h"
|
||||
#include "absl/container/flat_hash_map.h"
|
||||
|
||||
namespace yaze {
|
||||
@@ -26,6 +27,11 @@ void UpdateTilemap(Tilemap &tilemap, const std::vector<uint8_t> &data);
|
||||
|
||||
void RenderTile(Tilemap &tilemap, int tile_id);
|
||||
|
||||
void ComposeTile16(Tilemap &tilemap, const std::vector<uint8_t> &data,
|
||||
const TileInfo &top_left, const TileInfo &top_right,
|
||||
const TileInfo &bottom_left, const TileInfo &bottom_right,
|
||||
int sheet_offset);
|
||||
|
||||
std::vector<uint8_t> GetTilemapData(Tilemap &tilemap, int tile_id);
|
||||
|
||||
} // namespace gfx
|
||||
|
||||
Reference in New Issue
Block a user