Changeset 7efed11 in network-game
- Timestamp:
- May 18, 2013, 6:42:59 PM (12 years ago)
- Branches:
- master
- Children:
- c987d79
- Parents:
- d436ac4
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
client/Client/main.cpp
rd436ac4 r7efed11 564 564 pos = mapToScreen(p->pos); 565 565 566 p->draw(pos, p->id == curPlayerId); 566 if (p->id == curPlayerId) 567 al_draw_filled_circle(pos.x, pos.y, 12, al_map_rgb(255, 0, 0)); 568 else 569 al_draw_filled_circle(pos.x, pos.y, 12, al_map_rgb(191, 0, 0)); 570 571 if (o->hasBlueFlag) 572 al_draw_filled_rectangle(pos.x+4, pos.y-18, pos.x+18, pos.y-4, al_map_rgb(0, 0, 255)); 573 else if(o->hasRedFlag) 574 al_draw_filled_rectangle(pos.x+4, pos.y-18, pos.x+18, pos.y-4, al_map_rgb(255, 0, 0)); 567 575 } 568 576 } -
common/Player.cpp
rd436ac4 r7efed11 91 91 } 92 92 93 void Player::draw(POSITION pos, bool curPlayer) {94 if (curPlayer)95 al_draw_filled_circle(pos.x, pos.y, 12, al_map_rgb(255, 0, 0));96 else97 al_draw_filled_circle(pos.x, pos.y, 12, al_map_rgb(191, 0, 0));98 99 if (this->hasBlueFlag)100 al_draw_filled_rectangle(pos.x+4, pos.y-18, pos.x+18, pos.y-4, al_map_rgb(0, 0, 255));101 else if(this->hasRedFlag)102 al_draw_filled_rectangle(pos.x+4, pos.y-18, pos.x+18, pos.y-4, al_map_rgb(255, 0, 0));103 }104 105 93 bool Player::move(WorldMap *map) { 106 94 int speed = 100; // pixels per second -
common/Player.h
rd436ac4 r7efed11 32 32 void setAddr(sockaddr_in addr); 33 33 34 void draw(POSITION pos, bool curPlayer);35 34 bool move(WorldMap *map); 36 35
Note:
See TracChangeset
for help on using the changeset viewer.