Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.17 KB | None | 0 0
  1. #ifndef gracz_h_
  2. #define gracz_h_
  3. #include <allegro5/allegro.h>
  4. #include "ekran.h"
  5. #include "surowce.h"
  6. #include "mapa.h"
  7. #include "marker.h"
  8. #include "textmaster.h"
  9. #include <string>
  10. using namespace std;
  11.  
  12. #define RET_VAR(nazwa,typ,fun) typ fun() { return nazwa ; }
  13. class Mapa;class Lista;
  14. class Gracz
  15. {
  16.     public :
  17.     Gracz(string nazwa,ALLEGRO_COLOR kol,bool bot = false);
  18.     void wyswietl();
  19.     void operator +=(Surowce nowe);
  20.     void operator -=(Surowce nowe);
  21.     bool operator <=(Surowce nowe);
  22.     bool operator <(Surowce nowe);
  23.     bool operator >=(Surowce nowe);
  24.     bool operator >(Surowce nowe);
  25.  
  26.     void ustaw_poparcie(int);
  27.     void dodaj_poparcie(int);
  28.     void ustaw_PA(int);
  29.     void dodaj_PA(int);
  30.     void dodaj_armie(int);
  31.     void dodaj_maxarmie(int);
  32.     void odejmij_maxPA(int i);
  33.     void dodaj_budynek(int ktory,int i=1);
  34.     void usun_budynek(int i);
  35.     bool jedz(int ile);
  36.  
  37.     bool ruch_klawiatura(Ekran &gdzie,Mapa &map,TextMaster&);
  38.  
  39.  
  40.     bool isbot();bool czybot(); //to samo
  41.     RET_VAR(x,int,retx);
  42.     RET_VAR(y,int,rety); // o rety! :D
  43.     int zwroc_x();
  44.     int zwroc_y();
  45.     int zwroc_PA();
  46.     RET_VAR(poparcie,int,zwroc_poparcie);
  47.     RET_VAR(kolor_gracza,ALLEGRO_COLOR,zwroc_kolor);
  48.     RET_VAR(zolnierze,int,zwroc_armie);
  49.     RET_VAR(zolnierzemax,int,zwroc_maxarmie);
  50.     Surowce& zwroc_surowce();
  51.  
  52.     Marker* zrob_marker();
  53.     Marker* zwroc_marker();
  54.  
  55.     protected :
  56.     string nazwa;
  57.     int poparcie;
  58.     int zolnierze,zolnierzemax;
  59.     int PA,maxPA;
  60.     int ilosc_budynkow[8]; //pamietasz jak to na klawiaturze zrobiles?Pamietasz o wiszacej kartce przed toba?Jak tak to zrozumiesz o co chodzi.
  61.     //dla niewtajemiczonych ten tekst nigdy nie bedzie zrozumialy.
  62.     Surowce surka;
  63.  
  64.     static ALLEGRO_BITMAP *gui;
  65.     static ALLEGRO_BITMAP *bZloto;
  66.     static ALLEGRO_BITMAP *bDrewno;
  67.     static ALLEGRO_BITMAP *bKamien;
  68.     static ALLEGRO_BITMAP *bPoparcie;
  69.     static ALLEGRO_BITMAP *bZolnierze;
  70.     static ALLEGRO_BITMAP *bRuch;
  71.  
  72.     bool bot;
  73.  
  74.     ALLEGRO_COLOR kolor_gracza;
  75.  
  76.     int x,y; //gdzie patrzy gracz,gdzie cos robil
  77.  
  78.     Marker *mark;
  79.  
  80.     Lista *lis;
  81. };
  82.  
  83. #endif // gracz_h_
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement