Changeset 1e250bf in network-game
- Timestamp:
- Jan 26, 2014, 12:02:49 AM (11 years ago)
- Branches:
- master
- Children:
- c51da03
- Parents:
- 9ee50ce
- Location:
- client
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
client/Client/GameRender.cpp
r9ee50ce r1e250bf 1 1 #include "GameRender.h" 2 3 #include <cmath> 2 4 3 5 #include <allegro5/allegro_primitives.h> … … 50 52 case OBJECT_RED_FLAG: 51 53 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)); 54 break; 55 case OBJECT_NONE: 52 56 break; 53 57 } -
client/Client/RadioButtonList.cpp
r9ee50ce r1e250bf 23 23 al_clear_to_color(al_map_rgb(0, 0, 0)); 24 24 25 int fontHeight = al_get_font_line_height(font);25 //int fontHeight = al_get_font_line_height(font); 26 26 27 27 al_draw_text(font, al_map_rgb(0, 255, 0), 0, 0, ALLEGRO_ALIGN_LEFT, this->strLabel.c_str()); … … 44 44 if (e.type == ALLEGRO_EVENT_MOUSE_BUTTON_UP) { 45 45 if (e.mouse.button == 1) { 46 for ( int i=0; i<this->vctRadioButtons.size(); i++) {46 for (unsigned int i=0; i<this->vctRadioButtons.size(); i++) { 47 47 centerY = y+26+i*20; 48 48 -
client/Client/RadioButtonList.h
r9ee50ce r1e250bf 15 15 string strLabel; 16 16 vector<string> vctRadioButtons; 17 int selectedButton;17 unsigned int selectedButton; 18 18 19 19 public: -
client/Client/main.cpp
r9ee50ce r1e250bf 15 15 #include <cstdio> 16 16 #include <cstdlib> 17 #include <cmath>17 //#include <cmath> 18 18 #include <sys/types.h> 19 19 #include <string> … … 134 134 ALLEGRO_EVENT_QUEUE *event_queue = NULL; 135 135 ALLEGRO_TIMER *timer = NULL; 136 bool key[4] = { false, false, false, false };137 136 map<unsigned int, Player*> mapPlayers; 138 137 map<unsigned int, Projectile> mapProjectiles; … … 706 705 cout << "Got a logout message" << endl; 707 706 708 int playerId;707 unsigned int playerId; 709 708 710 709 // Check if it's about you or another player -
client/makefile
r9ee50ce r1e250bf 1 1 CC = g++ 2 2 LIB_FLAGS = `pkg-config --cflags --libs --static allegro-static-5.0 allegro_ttf-static-5.0 allegro_primitives-static-5.0` 3 FLAGS = $(LIB_FLAGS)3 FLAGS = -Wall 4 4 COMMON_PATH = ../common 5 5 DEPENDENCIES = Common.o MessageContainer.o MessageProcessor.o Player.o WorldMap.o Projectile.o Game.o GameRender.o GameSummary.o chat.o GuiComponent.o Window.o Textbox.o Button.o RadioButtonList.o TextLabel.o 6 6 7 7 gameClient : Client/main.cpp $(DEPENDENCIES) 8 $(CC) -o $@ $+ $(FLAGS) 8 $(CC) -o $@ $+ $(FLAGS) $(LIB_FLAGS) 9 10 %.o : Client/%.cpp 11 $(CC) -c -o $@ $? $(FLAGS) 9 12 10 13 Common.o : $(COMMON_PATH)/Common.cpp … … 32 35 $(CC) -c -o $@ $? $(FLAGS) 33 36 34 %.o : Client/%.cpp35 $(CC) -c -o $@ $? $(FLAGS)36 37 37 clean: 38 38 rm *.o
Note:
See TracChangeset
for help on using the changeset viewer.