pic.hpp 762 B

123456789101112131415161718192021222324252627282930313233
  1. /* This file is part of Invaders.
  2. *
  3. * Copyright (C) 2020 LCM.
  4. * You may use, distribute and modify Invaders under the terms of the
  5. * GPLv3 license, available at <https://www.gnu.org/licenses/\>.
  6. */
  7. #ifndef _pic_hpp
  8. #define _pic_hpp
  9. #include "body.hpp"
  10. #include <fstream>
  11. #include <iostream>
  12. using std::ifstream; using std::ios;
  13. using std::cout; using std::endl;
  14. class pic : public body
  15. {
  16. public:
  17. pic() : body() { clear(); } //carica picture piena di spazi (??????? crea un body di dimensioni indefinite!!)
  18. pic(int w,int h);
  19. ~pic();
  20. char** picture;
  21. void loadpicture(const char*); //loads picture from a file
  22. void clear(); //deletes picture
  23. void set_values(int W, int H); //sets coordinates of body
  24. void print();
  25. };
  26. #endif