#ifndef OBJEKT_H
#define OBJEKT_H
#include <allegro.h>
#include <stdio.h>
#include <math.h>
#include <time.h>

#define pi180 3.14159265/180

class Objekt{

private:
  double px,py,sx,sy;  //p je position s je smer
  int health,max_health;  //HP (nie Harry Potter ale Hit points)
  Objekt *dalsia;  //aby mal pristup k predoslemu a dalsiemu vagonu
  Objekt *predosla;  
  double max_speed;
  double speed;
  double zrychlenie;
  double otacanie;
  double uhol;
  BITMAP *obrazok;  //obsahuje obrazok, ktory sa bude vykreslovat
  int prebijanie; //POZOR je to v stotinach
  int reload;
  int vybuch;
  
public:
  Objekt();
  ~Objekt();
  void SetPoz(double x, double y){px = x; py = y;}  //tomuto asi chapete
  void SetSmer(double x, double y){sx = x; sy = y;}
  void SetPx(double x){px = x;}
  void SetPy(double x){py = x;}
  void SetSx(double x){sx = x;}
  void SetSy(double x){sy = x;}
  void SetHealth(int x){health = x;}
  void SetMax_health(int x){max_health = x;}
  double GetPx(){return px;}
  double GetPy(){return py;}
  double GetSx(){return sx;}
  double GetSy(){return sy;}
  int GetHealth(){return health;}
  int GetMax_health(){return max_health;}
  Objekt* GetDalsia(){return dalsia;}
  void SetDalsia(Objekt *p){dalsia = p;}
  Objekt* GetPredosla(){return predosla;}
  void SetPredosla(Objekt *p){predosla = p;}
  void SetBitmap(BITMAP *bmp){bitmap = bmp;}
  void SetObrazok(BITMAP *bmp){obrazok = bmp;}
  BITMAP* GetObrazok(){return obrazok;}
  
  void SetMax_speed(double x){max_speed = x;}
  void SetZrychlenie(double x){zrychlenie = x;}
  void SetOtacanie(double x){otacanie = x;}
  void SetSpeed(double x){speed = x;}
  void SetUhol(double x){uhol = x;}
  void SetVybuch(int x){vybuch = x;}
  
  double GetMax_speed(){return max_speed;}
  double GetZrychlenie(){return zrychlenie;}
  double GetOtacanie(){return otacanie;}
  double GetSpeed(){return speed;}
  double GetUhol(){return uhol;}
  int GetVybuch(){return vybuch;}
  
  void SetPrebijanie(int x){prebijanie = x;}
  void SetReload(int x){reload = x;}
  
  int GetPrebijanie(){return prebijanie;}
  int GetReload(){return reload;}
  
  void Pohni(); //posunie to objekt podla smeru
  virtual void Nakresli();  //vykreslovanie

  protected:
  BITMAP *bitmap;  //bitmapa, kde to ma kreslit
};

#endif
