source: abuse/trunk/src/particle.h @ 555

Last change on this file since 555 was 555, checked in by Sam Hocevar, 11 years ago

ps3: make everything compile on the PS3. Of course, nothing links yet
because so much support is missing.

  • Property svn:keywords set to Id
File size: 1.2 KB
Line 
1/*
2 *  Abuse - dark 2D side-scrolling platform game
3 *  Copyright (c) 1995 Crack dot Com
4 *  Copyright (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
5 *
6 *  This software was released into the Public Domain. As with most public
7 *  domain software, no warranty is made or implied by Crack dot Com, by
8 *  Jonathan Clark, or by Sam Hocevar.
9 */
10
11#ifndef __PARTICLE_HPP_
12#define __PARTICLE_HPP_
13
14#include "specs.h"
15#include "image.h"
16
17class view;
18
19int defun_pseq(void *args);
20void add_panim(int id, long x, long y, int dir);
21void delete_panims();      // called by ~level
22void draw_panims(view *v);
23void tick_panims();
24void free_pframes();
25
26struct part
27{
28  short x,y;
29  uint8_t color;
30} ;
31
32class part_frame
33{
34  public :
35  int t,x1,y1,x2,y2;
36  part *data;
37  part_frame(bFILE *fp);
38  void draw(image *screen, int x, int y, int dir);
39  ~part_frame();
40} ;
41
42class part_sequence
43{
44  public :
45  int tframes;
46  int *frames;  // array of id's
47  part_sequence(void *args);
48  ~part_sequence() { if (tframes) free(frames); }
49} ;
50
51class part_animation
52{
53  public :
54  part_animation *next;
55  part_sequence *seq;
56  int frame,dir;
57  long x,y;
58  part_animation(part_sequence *s, long X, long Y, int Dir, part_animation *Next)
59  { x=X; y=Y; seq=s; next=Next; frame=0; dir=Dir; }
60} ;
61
62
63#endif
64
65
Note: See TracBrowser for help on using the repository browser.