gcsx_mouse.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /* GCSx
  2. ** MOUSE.H
  3. **
  4. ** Basic mouse display
  5. */
  6. /*****************************************************************************
  7. ** Copyright (C) 2003-2006 Janson
  8. **
  9. ** This program is free software; you can redistribute it and/or modify
  10. ** it under the terms of the GNU General Public License as published by
  11. ** the Free Software Foundation; either version 2 of the License, or
  12. ** (at your option) any later version.
  13. **
  14. ** This program is distributed in the hope that it will be useful,
  15. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. ** GNU General Public License for more details.
  18. **
  19. ** You should have received a copy of the GNU General Public License
  20. ** along with this program; if not, write to the Free Software
  21. ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
  22. *****************************************************************************/
  23. #ifndef __GCSx_MOUSE_H_
  24. #define __GCSx_MOUSE_H_
  25. // Mouse pointers
  26. class MousePointer {
  27. protected:
  28. SDL_Surface* original;
  29. SDL_Surface* converted;
  30. int hotX;
  31. int hotY;
  32. class TextureMap* tex;
  33. int texNum;
  34. public:
  35. // (x and y of hot spot)
  36. MousePointer(const char* filename, int x = 0, int y = 0);
  37. ~MousePointer();
  38. int tooltipYOffset() const;
  39. // Size for storage
  40. int xSize() const;
  41. int ySize() const;
  42. // (also clears any references to previous textures)
  43. void convertFor(SDL_Surface* screen);
  44. void displayAt(int x, int y, SDL_Surface* save, SDL_Rect* storeRect);
  45. void unDisplay(int x, int y, SDL_Surface* saved, SDL_Rect* storeRect) const;
  46. // (call after convertFor)
  47. void convertGL(class TextureMap* texmap, int gNum, int xSize, int ySize);
  48. void textureAt(int x, int y) const;
  49. };
  50. #endif