forked from GuillianSeed/MetalGear
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BanksABC.asm
65 lines (45 loc) · 1.56 KB
/
BanksABC.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
;----------------------------------------------------------------------------
;
;
; MegaROM banks A, B and C
;
;
;----------------------------------------------------------------------------
org #6000
include "data/playersprite.asm"
include "data/spritesets.asm"
include "data/weaponspratt.asm"
include "gfx/sprites.asm"
include "data/laserconfig.asm"
include "data/musicradioconfig.asm"
IF (JAPANESE)
include "data/textsjp.asm"
ELSE
include "data/texts.asm"
ENDIF
;----------------------------------------------------------------------------
;
; Initialize Metal Gear logic
;
;----------------------------------------------------------------------------
InitMetalGear_:
ld a, (MetalGear_KO) ; Metal Gear destroyed. Self destruction activated
or a
jp nz, DismissActor2_
ld hl, MetalGear_KO ; Metal Gear destroyed. Self destruction activated
ld (ix+ACTOR.BASE_SPR_ID), l
ld (ix+ACTOR.KO_POINTER_H), h
ld (ix+ACTOR.COLLISION_CFG), 3 ; Bit0 = Check collision with player, Bit1 = Check player shots, bit2 = Pitfall is closed
ChkDrawMetalGear:
ld a, (EnemyList) ; Array of enemies in the room
cp ID_METAL_GEAR
ret nz ; There is no Metal Gear
ld (ix+ACTOR.Status), 0
ld de, 6020h
jp DrawMetalGear_
RemoveMetalGear:
ld de, 6020h
jp EraseMetalGear_
; Fill empty space
ds (#C000-$),#ff
ASSERT $=#C000