- Timestamp:
- May 21, 2013, 10:00:54 PM (12 years ago)
- Branches:
- master
- Children:
- 5f868c0
- Parents:
- cc1c6c1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
client/Client/main.cpp
rcc1c6c1 r6e66ffd 530 530 mapPos.y = 0; 531 531 mapPos = mapToScreen(mapPos); 532 532 533 for (int x=0; x<12; x++) 533 534 { … … 544 545 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)); 545 546 546 if (structure == WorldMap::STRUCTURE_BLUE_FLAG) 547 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)); 548 else if (structure == WorldMap::STRUCTURE_RED_FLAG) 549 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)); 547 if (structure == WorldMap::STRUCTURE_BLUE_FLAG) { 548 al_draw_circle(x*25+12+mapPos.x, y*25+12+mapPos.y, 12, al_map_rgb(0, 0, 0), 3); 549 //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)); 550 }else if (structure == WorldMap::STRUCTURE_RED_FLAG) { 551 al_draw_circle(x*25+12+mapPos.x, y*25+12+mapPos.y, 12, al_map_rgb(0, 0, 0), 3); 552 //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)); 553 } 554 } 555 } 556 557 for (int x=0; x<12; x++) 558 { 559 for (int y=0; y<12; y++) 560 { 561 vector<WorldMap::Object> vctObjects = gameMap->getObjects(x, y); 562 563 vector<WorldMap::Object>::iterator it; 564 for(it = vctObjects.begin(); it != vctObjects.end(); it++) { 565 switch(it->type) { 566 case WorldMap::OBJECT_BLUE_FLAG: 567 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)); 568 break; 569 case WorldMap::OBJECT_RED_FLAG: 570 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)); 571 break; 572 } 573 } 550 574 } 551 575 }
Note:
See TracChangeset
for help on using the changeset viewer.