diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-02-02 21:00:59 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-02-02 21:00:59 +0000 |
commit | 7b53da553fdc1389a159703bfade87083155f15f (patch) | |
tree | bb508d379289aec01d342575d11da11c89b892f8 /src/graphic/graphic.cpp | |
parent | c4e5b796f722c3f65c5431ff2f67f4d23fcbf98d (diff) | |
download | mana-7b53da553fdc1389a159703bfade87083155f15f.tar.gz mana-7b53da553fdc1389a159703bfade87083155f15f.tar.bz2 mana-7b53da553fdc1389a159703bfade87083155f15f.tar.xz mana-7b53da553fdc1389a159703bfade87083155f15f.zip |
Turned MAP struct into Map class.
Diffstat (limited to 'src/graphic/graphic.cpp')
-rw-r--r-- | src/graphic/graphic.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/graphic/graphic.cpp b/src/graphic/graphic.cpp index 3058ce56..591c7443 100644 --- a/src/graphic/graphic.cpp +++ b/src/graphic/graphic.cpp @@ -331,14 +331,14 @@ void Engine::draw() // Draw tiles below nodes for (int j = 0; j < 20; j++) { for (int i = 0; i < 26; i++) { - unsigned short tile0 = get_tile(i + camera_x, j + camera_y, 0); - unsigned short tile1 = get_tile(i + camera_x, j + camera_y, 1); + int tile0 = tiledMap.getTile(i + camera_x, j + camera_y, 0); + int tile1 = tiledMap.getTile(i + camera_x, j + camera_y, 1); - if (tile0 < tileset->spriteset.size()) { + if (tile0 < (int)tileset->spriteset.size()) { tileset->spriteset[tile0]->draw(screen, i * 32 - offset_x, j * 32 - offset_y); } - if (tile1 > 0 && tile1 < tileset->spriteset.size()) { + if (tile1 > 0 && tile1 < (int)tileset->spriteset.size()) { tileset->spriteset[tile1]->draw(screen, i * 32 - offset_x, j * 32 - offset_y); } @@ -461,9 +461,9 @@ void Engine::draw() // Draw tiles above nodes for (int j = 0; j < 20; j++) { for (int i = 0; i < 26; i++) { - unsigned short tile = get_tile(i + camera_x, j + camera_y, 2); + int tile = tiledMap.getTile(i + camera_x, j + camera_y, 2); - if (tile > 0 && tile < tileset->spriteset.size()) { + if (tile > 0 && tile < (int)tileset->spriteset.size()) { tileset->spriteset[tile]->draw( screen, i * 32 - offset_x, j * 32 - offset_y); } |