Applied labels and byte designators
This commit is contained in:
@@ -1,32 +1,13 @@
|
||||
; this is set inside randomizer application
|
||||
; org $1AFBBB ;Increases chance of getting enemies under random bush
|
||||
; db $01, $0F, $0F, $0F, $0F, $0F, $0F, $12
|
||||
; db $0F, $01, $0F, $0F, $11, $0F, $0F, $03
|
||||
|
||||
; sprite_bush_spawn_table:
|
||||
; {
|
||||
; ; SPRITE DATA TABLE GENERATED BY ENEMIZER
|
||||
; .overworld
|
||||
; ; Skip 0x80(overworld) + 0x128 (dungeons)
|
||||
; skip #$80
|
||||
; .dungeons
|
||||
; skip #$128
|
||||
|
||||
; ;Old sprite table - Could be changed as well (for the item id 04)
|
||||
; .random_sprites ; if item == 04
|
||||
; db #$00, #$D8, #$E3, #$D8
|
||||
; }
|
||||
|
||||
sprite_bush_spawn:
|
||||
{
|
||||
STY $0D ; restored code
|
||||
LDA !BUSHES_FLAG ; That byte is the flag to activate random enemies under bush
|
||||
STY.b Scrap0D ; restored code
|
||||
LDA.l !BUSHES_FLAG ; That byte is the flag to activate random enemies under bush
|
||||
BNE .continue
|
||||
CPY.b #$04 : BNE .not_random_old
|
||||
JSL GetRandomInt : AND.b #$03 : !ADD.b #$13 : TAY
|
||||
|
||||
.not_random_old
|
||||
LDA $81F3, Y;restored code
|
||||
LDA.w $81F3, Y;restored code
|
||||
RTL
|
||||
|
||||
.continue
|
||||
@@ -49,13 +30,13 @@ sprite_bush_spawn:
|
||||
BRA .return
|
||||
|
||||
.newSpriteSpawn
|
||||
LDA $7E040A : TAY ; load the area ID
|
||||
LDA $7EF3C5 : CMP.b #$03 : !BLT .dontGoPhase2 ; check if agahnim 1 is alive
|
||||
LDA.l OverworldIndexMirror : TAY ; load the area ID
|
||||
LDA.l ProgressIndicator : CMP.b #$03 : !BLT .dontGoPhase2 ; check if agahnim 1 is alive
|
||||
; aga1 is dead
|
||||
LDA $7E040A : CMP.b #$40 : !BGE .dontGoPhase2 ; check if we are in DW, if so we can skip shifting table index
|
||||
!ADD #$90 : TAY ; agahnim 1 is dead, so we need to go to the 2nd phase table for LW
|
||||
LDA.l OverworldIndexMirror : CMP.b #$40 : !BGE .dontGoPhase2 ; check if we are in DW, if so we can skip shifting table index
|
||||
!ADD.b #$90 : TAY ; agahnim 1 is dead, so we need to go to the 2nd phase table for LW
|
||||
.dontGoPhase2
|
||||
LDA sprite_bush_spawn_table_overworld, Y ;LDA 408000 + area id
|
||||
LDA.w sprite_bush_spawn_table_overworld, Y ;LDA 408000 + area id
|
||||
|
||||
.return
|
||||
PLB ; restore bank to where it was
|
||||
|
||||
Reference in New Issue
Block a user