Changeset f66d04f in network-game for client/Client/GameRender.cpp
- Timestamp:
- Jan 24, 2014, 12:37:10 AM (11 years ago)
- Branches:
- master
- Children:
- 99cf349
- Parents:
- 7f884ea
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
client/Client/GameRender.cpp
r7f884ea rf66d04f 16 16 for (int y=0; y<gameMap->height; y++) 17 17 { 18 WorldMap::TerrainType el = gameMap->getElement(x, y);19 WorldMap::StructureType structure = gameMap->getStructure(x, y);18 TerrainType el = gameMap->getElement(x, y); 19 StructureType structure = gameMap->getStructure(x, y); 20 20 21 if (el == WorldMap::TERRAIN_GRASS)21 if (el == TERRAIN_GRASS) 22 22 al_draw_filled_rectangle(x*25+mapPos.x, y*25+mapPos.y, x*25+25+mapPos.x, y*25+25+mapPos.y, al_map_rgb(0, 255, 0)); 23 else if (el == WorldMap::TERRAIN_OCEAN)23 else if (el == TERRAIN_OCEAN) 24 24 al_draw_filled_rectangle(x*25+mapPos.x, y*25+mapPos.y, x*25+25+mapPos.x, y*25+25+mapPos.y, al_map_rgb(0, 0, 255)); 25 else if (el == WorldMap::TERRAIN_ROCK)25 else if (el == TERRAIN_ROCK) 26 26 al_draw_filled_rectangle(x*25+mapPos.x, y*25+mapPos.y, x*25+25+mapPos.x, y*25+25+mapPos.y, al_map_rgb(100, 100, 0)); 27 27 28 if (structure == WorldMap::STRUCTURE_BLUE_FLAG) {28 if (structure == STRUCTURE_BLUE_FLAG) { 29 29 al_draw_circle(x*25+12+mapPos.x, y*25+12+mapPos.y, 12, al_map_rgb(0, 0, 0), 3); 30 30 //al_draw_filled_rectangle(x*25+5+mapPos.x, y*25+5+mapPos.y, x*25+20+mapPos.x, y*25+20+mapPos.y, al_map_rgb(0, 0, 255)); 31 }else if (structure == WorldMap::STRUCTURE_RED_FLAG) {31 }else if (structure == STRUCTURE_RED_FLAG) { 32 32 al_draw_circle(x*25+12+mapPos.x, y*25+12+mapPos.y, 12, al_map_rgb(0, 0, 0), 3); 33 33 //al_draw_filled_rectangle(x*25+5+mapPos.x, y*25+5+mapPos.y, x*25+20+mapPos.x, y*25+20+mapPos.y, al_map_rgb(255, 0, 0)); … … 45 45 for(it = vctObjects.begin(); it != vctObjects.end(); it++) { 46 46 switch(it->type) { 47 case WorldMap::OBJECT_BLUE_FLAG:47 case OBJECT_BLUE_FLAG: 48 48 al_draw_filled_rectangle(it->pos.x-8+mapPos.x, it->pos.y-8+mapPos.y, it->pos.x+8+mapPos.x, it->pos.y+8+mapPos.y, al_map_rgb(0, 0, 255)); 49 49 break; 50 case WorldMap::OBJECT_RED_FLAG:50 case OBJECT_RED_FLAG: 51 51 al_draw_filled_rectangle(it->pos.x-8+mapPos.x, it->pos.y-8+mapPos.y, it->pos.x+8+mapPos.x, it->pos.y+8+mapPos.y, al_map_rgb(255, 0, 0)); 52 52 break;
Note:
See TracChangeset
for help on using the changeset viewer.