sge_surface.h 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * SDL Graphics Extension
  3. * Pixel, surface and color functions (header)
  4. *
  5. * Started 990815 (split from sge_draw 010611)
  6. *
  7. * License: LGPL v2+ (see the file LICENSE)
  8. * (c)1999-2003 Anders Lindström
  9. */
  10. /* MODIFIED: 02/27/2004 Janson
  11. *
  12. * REMOVED: _sge_update and all related functions
  13. * sge_CreateAlphaSurface
  14. * all palette, copy, block, fill functions
  15. */
  16. /*********************************************************************
  17. * This library is free software; you can redistribute it and/or *
  18. * modify it under the terms of the GNU Library General Public *
  19. * License as published by the Free Software Foundation; either *
  20. * version 2 of the License, or (at your option) any later version. *
  21. *********************************************************************/
  22. #ifndef sge_surface_H
  23. #define sge_surface_H
  24. #include "SDL.h"
  25. #include "sge_internal.h"
  26. #ifdef _SGE_C
  27. extern "C" {
  28. #endif
  29. DECLSPEC void sge_Lock_OFF(void);
  30. DECLSPEC void sge_Lock_ON(void);
  31. DECLSPEC Uint8 sge_getLock(void);
  32. DECLSPEC Uint32 sge_MapAlpha(Uint8 R, Uint8 G, Uint8 B, Uint8 A);
  33. DECLSPEC void sge_SetError(const char *format, ...);
  34. DECLSPEC void _PutPixel(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color);
  35. DECLSPEC void _PutPixel8(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color);
  36. DECLSPEC void _PutPixel16(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color);
  37. DECLSPEC void _PutPixel24(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color);
  38. DECLSPEC void _PutPixel32(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color);
  39. DECLSPEC void _PutPixelX(SDL_Surface *dest,Sint16 x,Sint16 y,Uint32 color);
  40. DECLSPEC Sint32 sge_CalcYPitch(SDL_Surface *dest,Sint16 y);
  41. DECLSPEC void sge_pPutPixel(SDL_Surface *surface, Sint16 x, Sint32 ypitch, Uint32 color);
  42. DECLSPEC void sge_PutPixel(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color);
  43. DECLSPEC Uint32 sge_GetPixel(SDL_Surface *surface, Sint16 x, Sint16 y);
  44. DECLSPEC void _PutPixelAlpha(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color, Uint8 alpha);
  45. DECLSPEC void sge_PutPixelAlpha(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color, Uint8 alpha);
  46. DECLSPEC void sge_write_block8(SDL_Surface *Surface, Uint8 *block, Sint16 y);
  47. DECLSPEC void sge_write_block16(SDL_Surface *Surface, Uint16 *block, Sint16 y);
  48. DECLSPEC void sge_write_block32(SDL_Surface *Surface, Uint32 *block, Sint16 y);
  49. DECLSPEC void sge_read_block8(SDL_Surface *Surface, Uint8 *block, Sint16 y);
  50. DECLSPEC void sge_read_block16(SDL_Surface *Surface, Uint16 *block, Sint16 y);
  51. DECLSPEC void sge_read_block32(SDL_Surface *Surface, Uint32 *block, Sint16 y);
  52. DECLSPEC void sge_ClearSurface(SDL_Surface *Surface, Uint32 color);
  53. #ifdef _SGE_C
  54. }
  55. #endif
  56. #ifndef sge_C_ONLY
  57. DECLSPEC void _PutPixel(SDL_Surface *screen, Sint16 x, Sint16 y, Uint8 R, Uint8 G, Uint8 B);
  58. DECLSPEC void sge_PutPixel(SDL_Surface *screen, Sint16 x, Sint16 y, Uint8 R, Uint8 G, Uint8 B);
  59. DECLSPEC void _PutPixelAlpha(SDL_Surface *surface, Sint16 x, Sint16 y, Uint8 R, Uint8 G, Uint8 B, Uint8 alpha);
  60. DECLSPEC void sge_PutPixelAlpha(SDL_Surface *surface, Sint16 x, Sint16 y, Uint8 R, Uint8 G, Uint8 B, Uint8 alpha);
  61. DECLSPEC void sge_ClearSurface(SDL_Surface *Surface, Uint8 R, Uint8 G, Uint8 B);
  62. #endif /* sge_C_ONLY */
  63. #endif /* sge_surface_H */