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

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

Fuck the history, I'm renaming all .hpp files to .h for my own sanity.

  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
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
10#ifndef __TIMAGE_HPP_
11#define __TIMAGE_HPP_
12
13#include "image.h"
14#include "macs.h"
15#include "palette.h"
16#include "filter.h"
17
18/* data is stored in the following format
19
20  skip amount, data size, data  // no scan line wraps allowed
21
22*/
23
24
25class trans_image       // transpernet image
26{
27  unsigned char *data;
28  short w,h;
29
30public :
31  short height() { return h; }
32  short width() { return w; }
33  trans_image(image *im, char const *name);  // name has no meaning if MEM_CHECK is off
34  void put_image(image *screen, int x, int y);   // always transparent
35
36  // if screen x & y offset already calculated save a mul
37  // and no clipping, but fast use this
38  void put_image_offseted(image *screen, uint8_t *s_off);
39  void put_image_filled(image *screen, int x, int y,
40            uint8_t fill_color);
41  void put_fade(image *screen, int x, int y,
42               int frame_on, int total_frames,
43               color_filter *f, palette *pal);
44  void put_fade_tint(image *screen, int x, int y,
45             int frame_on, int total_frames,
46             uint8_t *tint,
47             color_filter *f, palette *pal);
48  void put_color(image *screen, int x, int y, int color);
49  unsigned char *clip_y(image *screen, int x1, int y1, int x2, int y2,
50                                   int x, int &y, int &ysteps);
51
52  void put_blend16(image *screen, image *blend, int x, int y,
53               int blendx, int blendy, int blend_amount, color_filter *f, palette *pal);
54  void put_double_remaped(image *screen, int x, int y, unsigned char *remap, unsigned char *remap2);
55  void put_remaped(image *screen, int x, int y, unsigned char *remap);
56  void put_predator(image *screen, int x, int y);
57  void put_scan_line(image *screen, int x, int y, int line);   // always transparent
58  unsigned char *t_data() { return data; }
59  void make_color(int c);
60  int size();
61  image *make_image();
62  ~trans_image() { free(data); }
63} ;
64
65
66#endif
67
68
69
70
71
Note: See TracBrowser for help on using the repository browser.