Skip to content

Commit

Permalink
Tiles now use the given pixel tile size for their graphics, instead o…
Browse files Browse the repository at this point in the history
…f having 32x32 as their hardcoded size
  • Loading branch information
Andrettin committed Oct 24, 2018
1 parent c2b6412 commit 0478b2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/map/script_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1502,7 +1502,7 @@ static int CclDefineTerrainType(lua_State *l)
LuaError(l, "File \"%s\" doesn't exist." _C_ graphics_file.c_str());
}
if (CGraphic::Get(graphics_file) == NULL) {
CGraphic *graphics = CGraphic::New(graphics_file, 32, 32);
CGraphic *graphics = CGraphic::New(graphics_file, PixelTileSize.x, PixelTileSize.y);
}
terrain->Graphics = CGraphic::Get(graphics_file);
} else if (!strcmp(value, "ElevationGraphics")) {
Expand All @@ -1511,7 +1511,7 @@ static int CclDefineTerrainType(lua_State *l)
LuaError(l, "File \"%s\" doesn't exist." _C_ graphics_file.c_str());
}
if (CGraphic::Get(graphics_file) == NULL) {
CGraphic *graphics = CGraphic::New(graphics_file, 32, 32);
CGraphic *graphics = CGraphic::New(graphics_file, PixelTileSize.x, PixelTileSize.y);
}
terrain->ElevationGraphics = CGraphic::Get(graphics_file);
} else if (!strcmp(value, "PlayerColorGraphics")) {
Expand All @@ -1520,7 +1520,7 @@ static int CclDefineTerrainType(lua_State *l)
LuaError(l, "File \"%s\" doesn't exist." _C_ graphics_file.c_str());
}
if (CPlayerColorGraphic::Get(graphics_file) == NULL) {
CPlayerColorGraphic *graphics = CPlayerColorGraphic::New(graphics_file, 32, 32);
CPlayerColorGraphic *graphics = CPlayerColorGraphic::New(graphics_file, PixelTileSize.x, PixelTileSize.y);
}
terrain->PlayerColorGraphics = CPlayerColorGraphic::Get(graphics_file);
} else if (!strcmp(value, "SolidTiles")) {
Expand Down

0 comments on commit 0478b2d

Please sign in to comment.