Fixes for datatype size on amd64.
[crack-attack.git] / src / SparkleManager.h
blob5fb01cc22d66f7afae648da0853fd5a8421cb276
1 /*
2 * SparkleManager.h
3 * Daniel Nelson - 8/24/0
5 * Copyright (C) 2000 Daniel Nelson
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 * Daniel Nelson - aluminumangel.org
22 * 174 W. 18th Ave.
23 * Columbus, OH 43210
26 #ifndef SPARKMANAGER_H
27 #define SPARKMANAGER_H
30 #include "Displayer.h"
32 class Spark {
33 public:
34 bool active;
35 float x, y;
36 float v_x, v_y;
37 float a;
38 float v_a;
39 float size;
40 int color;
41 int life_time;
44 class Mote {
45 public:
46 bool active;
47 float x, y;
48 float v_x, v_y;
49 float a;
50 float initial_a;
51 float v_a;
52 int color;
53 int type;
54 float size;
55 float inverse_mass;
56 float brightness;
57 int life_time;
58 int sibling_delay;
59 int associated_light;
60 int light_color;
63 /* static */ class SparkleManager {
64 public:
65 static void initialize ( );
66 static void timeStep ( );
68 static void createBlockDeathSpark ( int x, int y, int color, int n );
69 static void createCelebrationSpark ( int source, int color );
70 static void createRewardMote ( int x, int y, int level,
71 int sibling_number = 0 );
73 // the block death sparkles
74 static int spark_count;
75 static Spark sparks[DC_MAX_SPARK_NUMBER];
77 // the combo reward sparkles
78 static int mote_count;
79 static Mote motes[DC_MAX_MOTE_NUMBER];
81 private:
82 static const int mote_colors[DC_NUMBER_MOTE_LEVELS];
83 static const int mote_light_colors[DC_NUMBER_MOTE_LEVELS];
84 static const int mote_types[DC_NUMBER_MOTE_LEVELS];
85 static const GLfloat mote_sizes[DC_NUMBER_MOTE_LEVELS];
86 static const float mote_inverse_masses[DC_NUMBER_MOTE_LEVELS];
89 #endif