From 16a04140b85fae5fd61bb3efda0880bd2559cf38 Mon Sep 17 00:00:00 2001 From: Paul Merrill Date: Thu, 9 Jun 2011 02:08:47 -0700 Subject: [PATCH] TileTypes load after first row --- src/area.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/area.cpp b/src/area.cpp index b91403f..dc91611 100644 --- a/src/area.cpp +++ b/src/area.cpp @@ -191,8 +191,8 @@ bool Area::processTileset(xmlNode* node) Area::TileType Area::defaultTileType(const Gosu::Bitmap source, coord_t tiledim, int id) { - int x = tiledim.x * (id % source.width()); - int y = tiledim.y * (id / source.height()); + int x = (tiledim.x * id) % source.width(); + int y = (tiledim.y * id) / source.height() * tiledim.y; // ??? TileType tt; Gosu::Image* img = rc->bitmapSection(source, x, y, -- 2.11.4.GIT