source: golgotha/src/i4/image/image16.hh @ 608

Last change on this file since 608 was 80, checked in by Sam Hocevar, 15 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
File size: 2.1 KB
Line 
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
9#ifndef __I4_IMAGE16_HPP_
10#define __I4_IMAGE16_HPP_
11
12#include "image/image.hh"
13#include "error/error.hh"
14
15class i4_image16 : public i4_image_class
16{
17public:
18  w16 *paddr(int x, int y) { return (w16 *)(((w8 *)data)+y*bpl) + x; }
19  w16 *typed_data() { return (w16 *)data; }
20 
21  i4_image16(w16 w, w16 h, const i4_pal *pal);
22  i4_image16(w16 w, w16 h, const i4_pal *pal, void *data, int bpl);
23 
24  i4_color get_pixel(i4_coord x, i4_coord y); 
25  void put_pixel(i4_coord x, i4_coord y, w32 color);
26
27  void put_part_one_pixel_at_a_time(i4_image_class *to,
28                                    i4_coord _x,  i4_coord _y,                             
29                                    i4_coord x1, i4_coord y1, i4_coord x2, i4_coord y2,
30                                    i4_draw_context_class &context);
31
32  void put_part(i4_image_class *to,
33                i4_coord _x,  i4_coord _y,                             
34                i4_coord x1, i4_coord y1, i4_coord x2, i4_coord y2,
35                i4_draw_context_class &context);
36
37  void put_part_trans(i4_image_class *to,
38                      i4_coord _x,  i4_coord _y,                             
39                      i4_coord x1, i4_coord y1, i4_coord x2, i4_coord y2,
40                      i4_color trans_color,
41                      i4_draw_context_class &context);
42
43  void bar(i4_coord x1,    i4_coord y1,
44           i4_coord x2,    i4_coord y2,
45           i4_color color, i4_draw_context_class &context);
46 
47  void line(i4_coord ox1, i4_coord oy1,
48            i4_coord ox2, i4_coord oy2,
49            i4_color color, i4_draw_context_class &context);
50
51  ~i4_image16();
52};
53
54
55#endif
Note: See TracBrowser for help on using the repository browser.