Last change
on this file since 604 was
49,
checked in by Sam Hocevar, 15 years ago
|
- Imported original public domain release, for future reference.
|
File size:
932 bytes
|
Rev | Line | |
---|
[49] | 1 | #ifndef __PARTICLE_HPP_ |
---|
| 2 | #define __PARTICLE_HPP_ |
---|
| 3 | |
---|
| 4 | #include "specs.hpp" |
---|
| 5 | #include "image.hpp" |
---|
| 6 | |
---|
| 7 | class view; |
---|
| 8 | |
---|
| 9 | int defun_pseq(void *args); |
---|
| 10 | void add_panim(int id, long x, long y, int dir); |
---|
| 11 | void delete_panims(); // called by ~level |
---|
| 12 | void draw_panims(view *v); |
---|
| 13 | void tick_panims(); |
---|
| 14 | void free_pframes(); |
---|
| 15 | |
---|
| 16 | struct part |
---|
| 17 | { |
---|
| 18 | short x,y; |
---|
| 19 | uchar color; |
---|
| 20 | } ; |
---|
| 21 | |
---|
| 22 | class 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 | |
---|
| 32 | class 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 | |
---|
| 41 | class 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.