Skip to content

Commit

Permalink
Port tilemap-test to TiledMap
Browse files Browse the repository at this point in the history
Easy enough, just need to disable the default tile as this example doesn't want the background
  • Loading branch information
Daft-Freak committed Sep 24, 2024
1 parent 4428878 commit 8ab7b46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions tilemap-test/assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ assets.cpp:
name: asset_platformer
../assets/tilemap-test.tmx:
name: asset_tilemap
output_struct: true
empty_tile: 256 # we don't want an empty tile
4 changes: 2 additions & 2 deletions tilemap-test/tilemap-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

using namespace blit;

TileMap* environment;
TiledMap *environment;

/* setup */
void init() {
blit::set_screen_mode(ScreenMode::lores);

screen.sprites = Surface::load(asset_platformer);
environment = new TileMap((uint8_t*)asset_tilemap, nullptr, Size(64, 64), screen.sprites);
environment = new TiledMap(asset_tilemap, screen.sprites, LAYER_TRANSFORMS);
}


Expand Down

0 comments on commit 8ab7b46

Please sign in to comment.