1 | #ifndef __TIMAGE_HPP_ |
---|
2 | #define __TIMAGE_HPP_ |
---|
3 | |
---|
4 | #include "image.hpp" |
---|
5 | #include "macs.hpp" |
---|
6 | #include "palette.hpp" |
---|
7 | #include "filter.hpp" |
---|
8 | #include "jmalloc.hpp" |
---|
9 | |
---|
10 | /* data is stored in the following format |
---|
11 | |
---|
12 | skip amount, data size, data // no scan line wraps allowed |
---|
13 | |
---|
14 | */ |
---|
15 | |
---|
16 | |
---|
17 | class trans_image // transpernet image |
---|
18 | { |
---|
19 | unsigned char *data; |
---|
20 | short w,h; |
---|
21 | |
---|
22 | public : |
---|
23 | short height() { return h; } |
---|
24 | short width() { return w; } |
---|
25 | trans_image(image *im, char *name); // name has no meaning if MEM_CHECK is off |
---|
26 | void put_image(image *screen, int x, int y); // always transparent |
---|
27 | |
---|
28 | // if screen x & y offset already calculated save a mul |
---|
29 | // and no clipping, but fast use this |
---|
30 | void put_image_offseted(image *screen, uchar *s_off); |
---|
31 | void put_image_filled(image *screen, int x, int y, |
---|
32 | uchar fill_color); |
---|
33 | void put_fade(image *screen, int x, int y, |
---|
34 | int frame_on, int total_frames, |
---|
35 | color_filter *f, palette *pal); |
---|
36 | void put_fade_tint(image *screen, int x, int y, |
---|
37 | int frame_on, int total_frames, |
---|
38 | uchar *tint, |
---|
39 | color_filter *f, palette *pal); |
---|
40 | void put_color(image *screen, int x, int y, int color); |
---|
41 | unsigned char *clip_y(image *screen, int x1, int y1, int x2, int y2, |
---|
42 | int x, int &y, int &ysteps); |
---|
43 | |
---|
44 | void put_blend16(image *screen, image *blend, int x, int y, |
---|
45 | int blendx, int blendy, int blend_amount, color_filter *f, palette *pal); |
---|
46 | void put_double_remaped(image *screen, int x, int y, unsigned char *remap, unsigned char *remap2); |
---|
47 | void put_remaped(image *screen, int x, int y, unsigned char *remap); |
---|
48 | void put_predator(image *screen, int x, int y); |
---|
49 | void put_scan_line(image *screen, int x, int y, int line); // always transparent |
---|
50 | unsigned char *t_data() { return data; } |
---|
51 | void make_color(int c); |
---|
52 | int size(); |
---|
53 | image *make_image(); |
---|
54 | ~trans_image() { jfree(data); } |
---|
55 | } ; |
---|
56 | |
---|
57 | |
---|
58 | #endif |
---|
59 | |
---|
60 | |
---|
61 | |
---|
62 | |
---|
63 | |
---|