Merge pull request #17 from sigonasr2/fix-casting-that-emscripten-didn't-like

use static_cast to make emscripten happy
sigonasr2, Sig, Sigo 3 months ago committed by GitHub
commit e8ea578031
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      src/HamsterGame.cpp

@ -163,7 +163,7 @@ void HamsterGame::LoadLevel(const std::string&mapName){
for(const LayerTag&layer:currentMap.value().GetData().GetLayers()){
for(size_t y:std::ranges::iota_view(0U,layer.tiles.size())){
for(size_t x:std::ranges::iota_view(0U,layer.tiles[y].size())){
unsigned int tileID{unsigned int(layer.tiles[y][x]-1)};
unsigned int tileID{(unsigned int)(layer.tiles[y][x]-1)};
if(Powerup::TileIDIsUpperLeftPowerupTile(tileID))mapPowerups.emplace_back(vf2d{float(x),float(y)}*16+vf2d{16,16},Powerup::TileIDPowerupType(tileID));
if(tileID==1484)checkpoints.emplace_back(vf2d{float(x),float(y)}*16+vf2d{64,64});

Loading…
Cancel
Save