Instead of storing where the tile is on the image, use Gosu::Image.load_tiles and store the image as tiles/image objects.
Then instead of passing the coordinates of the tile and where to draw it to a function drawImage(..., x, y), you just pass
where to draw the tile to the tile itself, tile.draw(x, y)
The following code: http://dpaste.com/08BT5KR
yields, a tad unexpectedly, this: http://pasteboard.co/2LOGwr5r.png
I can post this as a github issue once I get confirmation that I'm not completely misunderstanding how this is supposed to work.
// Let's hope I never have to debug/understand this again! :D
Yeah, I can see why.
Here's something though, the corner ordering is off,
it's top_right, top_left, bottom_right, bottom_left:
x2, y2, WHITE,
x1, y1, WHITE,
x3, y3, WHITE,
x4, y4, WHITE)
seems to get it right, as far as I can tell
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill