3 * Daniel Nelson - 8/24/0
5 * Copyright (C) 2000 Daniel Nelson
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
32 #include "ComboTabulator.h"
35 #define BS_STATIC (1 << 0)
36 #define BS_SWAPPING (1 << 1)
37 #define BS_FALLING (1 << 2)
38 #define BS_DYING (1 << 3)
39 #define BS_AWAKING (1 << 4)
40 #define BS_SWAP_DIRECTION_MASK (1 << 5)
43 #define BR_DIRECTION_1 (1 << 0)
44 #define BR_DIRECTION_2 (1 << 1)
45 #define BR_DIRECTION_3 (1 << 2)
46 #define BR_DIRECTION_4 (1 << 3)
50 void initializeStatic ( int _x
, int _y
, int _flavor
);
51 void initializeAwaking ( int _x
, int _y
, int _flavor
, int pop_delay
,
52 int awake_delay
, ComboTabulator
*combo
, int _pop_color
);
54 void startFalling ( ComboTabulator
*combo
= null
, bool no_hang
= false );
55 void startDying ( ComboTabulator
*combo
, int spark_number
);
56 void startSwapping ( int direction
);
57 void finishSwapping ( int s_x
);
59 inline void beginComboInvolvement ( ComboTabulator
*new_combo
)
62 current_combo
->decrementInvolvement();
63 current_combo
= new_combo
;
64 current_combo
->incrementInvolvement();
67 inline void endComboInvolvement ( ComboTabulator
*old_combo
)
69 if (current_combo
&& current_combo
== old_combo
) {
70 current_combo
->decrementInvolvement();
81 // grid position; if between grid locations, this is the location of our
82 // lowest and left most edge
85 // fine position control; GC_STEPS_PER_GRID number of increments per grid
91 // time until pop - also used for other random crap; should be renamed
94 // current combo we're involved with, if any
95 ComboTabulator
*current_combo
;
97 // time until awakening
100 // death rotation axis
101 float axis_x
, axis_y
;
103 // direction of rotation upon popping
106 // the block color before popping
109 // used by the extreme effects