image32.hh 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /********************************************************************** <BR>
  2. This file is part of Crack dot Com's free source code release of
  3. Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
  4. information about compiling & licensing issues visit this URL</a>
  5. <PRE> If that doesn't help, contact Jonathan Clark at
  6. golgotha_source@usa.net (Subject should have "GOLG" in it)
  7. ***********************************************************************/
  8. #ifndef __I4_IMAGE32_HPP_
  9. #define __I4_IMAGE32_HPP_
  10. #include "image/image.hh"
  11. class i4_image32 : public i4_image_class
  12. {
  13. public:
  14. w32 *paddr(int x, int y) { return (w32 *)(((w8 *)data)+x*4+y*bpl); }
  15. i4_image32(w16 w, w16 h, const i4_pal *pal);
  16. i4_image32(w16 w, w16 h, const i4_pal *pal, void *data, int bpl);
  17. i4_color get_pixel(i4_coord x, i4_coord y);
  18. void put_pixel(i4_coord x, i4_coord y, w32 color);
  19. i4_image_class *quantize(const i4_pal *pal,
  20. w32 skip_colors,
  21. i4_coord x1, i4_coord y1,
  22. i4_coord x2, i4_coord y2);
  23. ~i4_image32();
  24. };
  25. #endif