|
|
|
@ -210,10 +210,10 @@ public: |
|
|
|
|
case GAMEWORLD:{ |
|
|
|
|
for (int y=-1;y<=HEIGHT/32;y++) { |
|
|
|
|
for (int x=-1;x<=WIDTH/32;x++) { |
|
|
|
|
float xOffset=PLAYER_COORDS[0]-(WIDTH/64); |
|
|
|
|
float yOffset=PLAYER_COORDS[1]-(HEIGHT/64); |
|
|
|
|
int xOffset=PLAYER_COORDS[0]-(WIDTH/64); |
|
|
|
|
int yOffset=PLAYER_COORDS[1]-(HEIGHT/64); |
|
|
|
|
if (xOffset+x>=0&&xOffset+x<MAP_WIDTH&&yOffset+y>=0&&yOffset+y<MAP_HEIGHT) { |
|
|
|
|
DrawPartialDecal({(x-(PLAYER_COORDS[0]-(int)PLAYER_COORDS[0]))*32,(y-(PLAYER_COORDS[1]-(int)PLAYER_COORDS[1]))*32},{32,32},TILES,{0,0},{32,32}); |
|
|
|
|
DrawPartialDecal({(x-(PLAYER_COORDS[0]-(int)PLAYER_COORDS[0]))*32,(y-(PLAYER_COORDS[1]-(int)PLAYER_COORDS[1]))*32},{32,32},TILES,{0,0},{32,32},TILE_COLORS[MAP[yOffset+y][xOffset+x]]); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|