Refactored some code relating to colours, trivially simplified some calculations

This commit is contained in:
Maruno17
2022-08-13 23:59:24 +01:00
parent aa9b1a9e23
commit b1cde2db42
42 changed files with 294 additions and 250 deletions

View File

@@ -67,7 +67,7 @@ module RPG
ret.addRef
else
ret = BitmapWrapper.new(32 * width, 32 * height)
x = (tile_id - 384) % 8 * 32
x = ((tile_id - 384) % 8) * 32
y = (((tile_id - 384) / 8) - height + 1) * 32
tileset = yield(filename)
ret.blt(0, 0, tileset, Rect.new(x, y, 32 * width, 32 * height))