source: abuse/trunk/src/include/items.hpp @ 48

Last change on this file since 48 was 39, checked in by Sam Hocevar, 15 years ago
  • Fix almost 2,000 warnings by using proper "const" keywords where needed.
File size: 2.0 KB
RevLine 
[2]1#ifndef __ITEMS_HPP__
2#define __ITEMS_HPP__
3#include "image.hpp"
4#include "specs.hpp"
5#include "points.hpp"
6#include "timage.hpp"
7#include <stdio.h>
8#include <stdlib.h>
9
10#define AUTOTILE_WIDTH 6
11#define AUTOTILE_HEIGHT 3
12
13class boundary : public point_list      //  a list of points with
14{
15public : 
[39]16  boundary(bFILE *fp,char const *er_name);
[17]17  uint8_t *inside;     // tells which side of the line is on the inside
[2]18  boundary(boundary *p);      // flips the *inside list
19  ~boundary() { if (tot) jfree(inside); }
20} ;
21
22class backtile
23{
24public :
[17]25  uint16_t next;
[2]26  image *im;
27  backtile(spec_entry *e, bFILE *fp);
28  backtile(bFILE *fp);
[17]29  int32_t size() { return 2+4+im->width()*im->height(); }
[2]30  ~backtile() { delete im; }
31} ;
32
33class foretile
34{
35public :
36  trans_image *im;
[17]37  uint16_t next;
38  uint8_t damage;
39  uint8_t ylevel;            // for fast intersections, this is the y level offset for the ground
[2]40                           // if ground is not level this is 255
41  boundary *points;
42
43  image *micro_image;
44
45  foretile(bFILE *fp);
[17]46  int32_t size() { return im->width()*im->height()+4+2+1+points->size(); }
[2]47  ~foretile() { delete im; delete points; delete micro_image; }
48} ;
49
50class figure
51{
52public :
53  trans_image *forward,*backward;
[17]54  uint8_t hit_damage,xcfg;
55  int8_t advance;
[2]56  point_list *hit;
57  boundary *f_damage,*b_damage;
58  int size();
59
60  figure(bFILE *fp, int type);
61  int width() { return forward->width(); }
62  int height() { return forward->height(); }
63
[17]64/*  int32_t size(int type)         // taken from spaint items
[2]65  {
66    if
67    return forward->width()*backward->height()+4+
68                       1+1+       // hit & xcfg
69                       touch->size()+
70                       hit->size()+
71                       damage->size();
72  }*/
73
74  ~figure() { delete forward; delete backward;
75              delete hit;
76              delete f_damage; delete b_damage; }
77} ;
78
79class char_tint
80{
81  public :
[17]82  uint8_t data[256];
[2]83  ~char_tint() { ; }
84  char_tint(bFILE *fp);               // should be a palette entry
85} ;
86
87#endif
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
Note: See TracBrowser for help on using the repository browser.