Say hello to D-Pad Hero 2 repository
[dpadhero2.git] / target.h
blob0f9f43ffc9ab69798d7e4e487ac1c8a975367c91
2 ; Copyright (C) 2010 Kent Hansen.
4 ; This program is free software; you can redistribute it and/or modify
5 ; it under the terms of the GNU General Public License as published by
6 ; the Free Software Foundation; either version 3 of the License, or
7 ; (at your option) any later version.
9 ; This program is distributed in the hope that it will be useful,
10 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ; GNU General Public License for more details.
14 ; You should have received a copy of the GNU General Public License
15 ; along with this program. If not, see <http://www.gnu.org/licenses/>.
18 .ifndef TARGET_H
19 .define TARGET_H
21 .include "common/fixedpoint.h"
23 MAX_TARGETS .equ 32
25 ; Holds the state of a falling target.
26 ; Types:
27 ; 0 - normal orb
28 ; 1 - skull
29 ; 2 - POW
30 ; 3 - star
31 ; 4 - clock
32 ; 5 - letter (special orb)
33 ; 6 - fake skull
34 ; 7 - ???
35 .struc target_1
36 state .db ; b2..0:lane, b5..b3:type, b7:exploding
37 pos_y .fp_8_8
38 pos_x .fp_8_8
39 pad0 .db
40 .ends
42 .struc target_2
43 speed_y .fp_8_8
44 speed_x .fp_8_8
45 duration .db ; number of rows it lasts
46 next .db ; next target on linked list
47 .ends
49 .if sizeof target_1 != sizeof target_2
50 .error "target_1 and target_2 must have the same size"
51 .endif
53 .extrn free_targets_list:byte
54 .extrn active_targets_head:byte
55 .extrn active_targets_tail:byte
56 .extrn targets_1:target_1
57 .extrn targets_2:target_2
59 .extrn initialize_target_lists:proc
60 .extrn move_target:proc
61 .extrn add_to_active_targets_list:proc
63 .endif