source: abuse/trunk/src/particle.hpp @ 112

Last change on this file since 112 was 57, checked in by Sam Hocevar, 11 years ago
  • Move each header to the same directory as its corresponding source, to get a better idea of which files are likely to export symbols.
File size: 1.2 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 __PARTICLE_HPP_
11#define __PARTICLE_HPP_
12
13#include "specs.hpp"
14#include "image.hpp"
15
16class view;
17
18int defun_pseq(void *args);
19void add_panim(int id, long x, long y, int dir);
20void delete_panims();      // called by ~level
21void draw_panims(view *v);
22void tick_panims();
23void free_pframes();
24
25struct part
26{
27  short x,y;
28  uint8_t color;
29} ;
30
31class part_frame
32{
33  public :
34  int t,x1,y1,x2,y2;
35  part *data;
36  part_frame(bFILE *fp);
37  void draw(image *screen, int x, int y, int dir);
38  ~part_frame();
39} ;
40
41class part_sequence
42{
43  public :
44  int tframes;
45  int *frames;  // array of id's
46  part_sequence(void *args);
47  ~part_sequence() { if (tframes) jfree(frames); }
48} ;
49
50class part_animation
51{
52  public :
53  part_animation *next;
54  part_sequence *seq;
55  int frame,dir;
56  long x,y;
57  part_animation(part_sequence *s, long X, long Y, int Dir, part_animation *Next)
58  { x=X; y=Y; seq=s; next=Next; frame=0; dir=Dir; }
59} ;
60
61
62#endif
63
64
Note: See TracBrowser for help on using the repository browser.