image16.hh 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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_IMAGE16_HPP_
  9. #define __I4_IMAGE16_HPP_
  10. #include "image/image.hh"
  11. #include "error/error.hh"
  12. class i4_image16 : public i4_image_class
  13. {
  14. public:
  15. w16 *paddr(int x, int y) { return (w16 *)(((w8 *)data)+y*bpl) + x; }
  16. w16 *typed_data() { return (w16 *)data; }
  17. i4_image16(w16 w, w16 h, const i4_pal *pal);
  18. i4_image16(w16 w, w16 h, const i4_pal *pal, void *data, int bpl);
  19. i4_color get_pixel(i4_coord x, i4_coord y);
  20. void put_pixel(i4_coord x, i4_coord y, w32 color);
  21. void put_part_one_pixel_at_a_time(i4_image_class *to,
  22. i4_coord _x, i4_coord _y,
  23. i4_coord x1, i4_coord y1, i4_coord x2, i4_coord y2,
  24. i4_draw_context_class &context);
  25. void put_part(i4_image_class *to,
  26. i4_coord _x, i4_coord _y,
  27. i4_coord x1, i4_coord y1, i4_coord x2, i4_coord y2,
  28. i4_draw_context_class &context);
  29. void put_part_trans(i4_image_class *to,
  30. i4_coord _x, i4_coord _y,
  31. i4_coord x1, i4_coord y1, i4_coord x2, i4_coord y2,
  32. i4_color trans_color,
  33. i4_draw_context_class &context);
  34. void bar(i4_coord x1, i4_coord y1,
  35. i4_coord x2, i4_coord y2,
  36. i4_color color, i4_draw_context_class &context);
  37. void line(i4_coord ox1, i4_coord oy1,
  38. i4_coord ox2, i4_coord oy2,
  39. i4_color color, i4_draw_context_class &context);
  40. ~i4_image16();
  41. };
  42. #endif