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