Copyright updates. I hope that I didn't miss anybody.
[crack-attack.git] / src / SparkleManager.h
blob1fa3119cb689cf5bdd6d6d1502b2348898c2117b
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
29 using namespace std;
31 #include "Displayer.h"
33 class Spark {
34 public:
35 bool active;
36 float x, y;
37 float v_x, v_y;
38 float a;
39 float v_a;
40 float size;
41 int color;
42 int life_time;
45 class Mote {
46 public:
47 bool active;
48 float x, y;
49 float v_x, v_y;
50 float a;
51 float initial_a;
52 float v_a;
53 int color;
54 int type;
55 float size;
56 float inverse_mass;
57 float brightness;
58 int life_time;
59 int sibling_delay;
60 int associated_light;
61 int light_color;
64 /* static */ class SparkleManager {
65 public:
66 static void initialize ( );
67 static void timeStep ( );
69 static void createBlockDeathSpark ( int x, int y, int color, int n );
70 static void createCelebrationSpark ( int source, int color );
71 static void createRewardMote ( int x, int y, int level,
72 int sibling_number = 0 );
74 // the block death sparkles
75 static int spark_count;
76 static Spark sparks[DC_MAX_SPARK_NUMBER];
78 // the combo reward sparkles
79 static int mote_count;
80 static Mote motes[DC_MAX_MOTE_NUMBER];
82 private:
83 static const int mote_colors[DC_NUMBER_MOTE_LEVELS];
84 static const int mote_light_colors[DC_NUMBER_MOTE_LEVELS];
85 static const int mote_types[DC_NUMBER_MOTE_LEVELS];
86 static const GLfloat mote_sizes[DC_NUMBER_MOTE_LEVELS];
87 static const float mote_inverse_masses[DC_NUMBER_MOTE_LEVELS];
90 #endif