source: abuse/tags/pd/abuse/inc/particle.hpp @ 49

Last change on this file since 49 was 49, checked in by Sam Hocevar, 12 years ago
  • Imported original public domain release, for future reference.
File size: 932 bytes
RevLine 
[49]1#ifndef __PARTICLE_HPP_
2#define __PARTICLE_HPP_
3
4#include "specs.hpp"
5#include "image.hpp"
6
7class view;
8
9int defun_pseq(void *args);
10void add_panim(int id, long x, long y, int dir);
11void delete_panims();      // called by ~level
12void draw_panims(view *v);
13void tick_panims();
14void free_pframes();
15
16struct part
17{
18  short x,y;
19  uchar color;
20} ;
21
22class part_frame
23{
24  public :
25  int t,x1,y1,x2,y2;
26  part *data;
27  part_frame(bFILE *fp);
28  void draw(image *screen, int x, int y, int dir);
29  ~part_frame();
30} ;
31
32class part_sequence
33{
34  public :
35  int tframes;
36  int *frames;  // array of id's
37  part_sequence(void *args);
38  ~part_sequence() { if (tframes) jfree(frames); }
39} ;
40
41class part_animation
42{
43  public :
44  part_animation *next;
45  part_sequence *seq;
46  int frame,dir;
47  long x,y;
48  part_animation(part_sequence *s, long X, long Y, int Dir, part_animation *Next)
49  { x=X; y=Y; seq=s; next=Next; frame=0; dir=Dir; }
50} ;
51
52
53#endif
54
55
Note: See TracBrowser for help on using the repository browser.