source: abuse/trunk/src/imlib/timage.h @ 494

Last change on this file since 494 was 494, checked in by Sam Hocevar, 12 years ago

style: remove trailing spaces, fix copyright statements.

  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1/*
2 *  Abuse - dark 2D side-scrolling platform game
3 *  Copyright (c) 1995 Crack dot Com
4 *  Copyright (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
5 *
6 *  This software was released into the Public Domain. As with most public
7 *  domain software, no warranty is made or implied by Crack dot Com or
8 *  Jonathan Clark.
9 */
10
11#ifndef __TIMAGE_HPP_
12#define __TIMAGE_HPP_
13
14#include "image.h"
15#include "macs.h"
16#include "palette.h"
17#include "filter.h"
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
26class trans_image       // transpernet image
27{
28  unsigned char *data;
29  short w,h;
30
31public :
32  short height() { return h; }
33  short width() { return w; }
34  trans_image(image *im, char const *name);  // name has no meaning if MEM_CHECK is off
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
39  void put_image_offseted(image *screen, uint8_t *s_off);
40  void put_image_filled(image *screen, int x, int y,
41            uint8_t fill_color);
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,
47             uint8_t *tint,
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() { free(data); }
64} ;
65
66
67#endif
68
69
70
71
72
Note: See TracBrowser for help on using the repository browser.