forked from CaitSith2/z3randomizer
-
Notifications
You must be signed in to change notification settings - Fork 4
/
catfish.asm
64 lines (57 loc) · 2.05 KB
/
catfish.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
;================================================================================
; Randomize Catfish
;--------------------------------------------------------------------------------
!HEART_REDRAW = "$7F5000"
LoadCatfishItemGFX:
%GetPossiblyEncryptedPlayerID(CatfishItem_Player) : STA !MULTIWORLD_SPRITEITEM_PLAYER_ID
LDA.l $1DE185 ; location randomizer writes catfish item to
JSL.l PrepDynamicTile
RTL
;--------------------------------------------------------------------------------
DrawThrownItem:
LDA $8A : CMP.b #$81 : BNE .catfish
.zora
LDA.b #$01 : STA !HEART_REDRAW
LDA.l $1DE1C3 ; location randomizer writes zora item to
BRA .draw
.catfish
LDA.l $1DE185 ; location randomizer writes catfish item to
.draw
JSL.l DrawDynamicTile
RTL
;--------------------------------------------------------------------------------
MarkThrownItem:
PHA
LDA $8A : CMP.b #$81 : BNE .catfish
.zora
JSL.l ItemSet_ZoraKing
%GetPossiblyEncryptedPlayerID(ZoraItem_Player) : STA !MULTIWORLD_ITEM_PLAYER_ID
BRA .done
.catfish
JSL.l ItemSet_Catfish
%GetPossiblyEncryptedPlayerID(CatfishItem_Player) : STA !MULTIWORLD_ITEM_PLAYER_ID
.done
PLA
JSL Link_ReceiveItem ; thing we wrote over
RTL
;--------------------------------------------------------------------------------
;DecryptQuakeMedallion:
; %GetPossiblyEncryptedItem(CatfishItem, SpriteItemValues) : STA $7F5400
; LDA.b #$C0 : JSL Sprite_SpawnDynamically ; thing we wrote over
;RTL
;--------------------------------------------------------------------------------
;MakeQuakeMedallion:
; LDA $7F5400
; STA $0D90, X ; thing we wrote over
; RTL
;--------------------------------------------------------------------------------
;DecryptFlippers:
; %GetPossiblyEncryptedItem(ZoraItem, SpriteItemValues) : STA $7F5400
; LDA.b #$C0 : JSL Sprite_SpawnDynamically ; thing we wrote over
;RTL
;--------------------------------------------------------------------------------
;MakeFlippers:
; LDA $7F5400
; STA $0D90, X ; thing we wrote over
; RTL
;--------------------------------------------------------------------------------