-
Notifications
You must be signed in to change notification settings - Fork 1
/
astro_ship_shield_data.asm
48 lines (37 loc) · 1.64 KB
/
astro_ship_shield_data.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//////////////////////////////////////////////////////////////////////////////
// astro_ship_shield_data.asm
// Copyright(c) 2021 Neal Smith.
// License: MIT. See LICENSE file in root directory.
//////////////////////////////////////////////////////////////////////////////
// contains the data that is needed by astro_ship_shield_code.asm
// This includes some variables that can be tested by the main engine
// to determine what to do based on shield state
//
//////////////////////////////////////////////////////////////////////////////
#importonce
#import "astro_sprite_data.asm"
//////////////////////////////////////////////////////////////////////////////
// Constants
// number of frames the shield stays on
.const SHIP_SHIELD_FRAMES = 60
.const SHIP_SHIELD_ANIMATION_FRAMES = 5
// Constants end
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
// internal variables
shield_sprite_data_ptr_table:
.word sprite_shield_00
.word sprite_shield_01
.word sprite_shield_02
.word sprite_shield_03
.word sprite_shield_04
// internal variables end
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
// exposed variables, for engine to get state of ship death
// Will be zero when ship is not shielded or
// the number of frames remaining in the effect if it is active
ship_1_shield_count: .byte 0
ship_2_shield_count: .byte 0
// exposed variables end
//////////////////////////////////////////////////////////////////////////////