From 8e20d6280ce89927ff00ad940ff8cf1b91e987b4 Mon Sep 17 00:00:00 2001 From: aerinon Date: Thu, 6 Oct 2022 14:16:47 -0600 Subject: [PATCH] Enemizer Cleanup --- dungeonmap.asm | 10 +- enemizer/blindboss.asm | 4 +- enemizer/bushes.asm | 6 +- enemizer/bushes_table.asm | 8 ++ enemizer/enemizerflags.asm | 1 - enemizer/hooks/blindboss_hooks.asm | 2 - enemizer/hooks/bosses_hooks.asm | 147 ----------------------------- enemizer/hooks/moldorm_hooks.asm | 8 +- enemizer/main.asm | 1 - 9 files changed, 21 insertions(+), 166 deletions(-) diff --git a/dungeonmap.asm b/dungeonmap.asm index 39b4624..6c97932 100644 --- a/dungeonmap.asm +++ b/dungeonmap.asm @@ -27,12 +27,13 @@ DoDungeonMapBossIcon: ; get sprite pointer for room LDA.l $89D62E,X - INC ; to skip the "sort" - TAX + STA.b $00 ; pointer in $00 + LDA.w #$0028 : STA.b $02 ; set the bank to 28 for now + LDY.w #$0001 ; to skip the "sort" ; get first byte to make sure it isn't an empty room SEP #$20 - LDA.l $890000,X + LDA.b [$00], Y CMP.b #$FF BNE ++ @@ -40,7 +41,8 @@ DoDungeonMapBossIcon: BRA .cave ; check first sprite -++ LDA.l $890002,X +++ INY #2 + LDA.b [$00], Y SEP #$10 ; match boss id diff --git a/enemizer/blindboss.asm b/enemizer/blindboss.asm index 7e860b5..4e495dc 100644 --- a/enemizer/blindboss.asm +++ b/enemizer/blindboss.asm @@ -5,8 +5,8 @@ print "Blind Spawn Code Check: ", pc check_blind_boss_room: LDA $A0 ; load room index (low byte) - CMP #172 : BNE + ; Is is Thieve Town Boss Room - LDA $09DE81 : BEQ + ; Blind maiden does not need rescuing + CMP #172 : BNE + ; Is is Thieves Town Boss Room + LDA !BLIND_DOOR_FLAG : BNE + ; Blind maiden does not need rescuing LDA FollowerIndicator : JML Check_for_Blind_Fight + diff --git a/enemizer/bushes.asm b/enemizer/bushes.asm index 8de86d3..7ec7080 100644 --- a/enemizer/bushes.asm +++ b/enemizer/bushes.asm @@ -38,10 +38,6 @@ sprite_bush_spawn: LDA.w sprite_bush_spawn_table_random_sprites, Y BRL .return - .item_table - db #$00, #$D9, #$3E, #$79, #$D9, #$DC, #$D8, #$DA, #$E4, #$E1, #$DC - db #$D8, #$DF, #$E0, #$0B, #$42, #$D3, #$41, #$D4, #$D9, #$E3, #$D8 - .not_random CPY.b #$0F : BEQ .newSpriteSpawn @@ -49,7 +45,7 @@ sprite_bush_spawn: CPY.b #$10 : BEQ .newSpriteSpawn ;CPY.b #$0E : BEQ .newSpriteSpawn - LDA .item_table, Y + LDA.w item_drop_table_override, Y BRA .return .newSpriteSpawn diff --git a/enemizer/bushes_table.asm b/enemizer/bushes_table.asm index a05da38..41f75e5 100644 --- a/enemizer/bushes_table.asm +++ b/enemizer/bushes_table.asm @@ -11,3 +11,11 @@ sprite_bush_spawn_table: .random_sprites ; if item == 04 db #$00, #$D8, #$E3, #$D8 } + +warnpc $B68374 +; the drop table has $E1 at B6837D which needs to be #$DA with retro bow +item_drop_table_override: +db #$00, #$D9, #$3E, #$79, #$D9, #$DC, #$D8, #$DA, #$E4, #$E1, #$DC +db #$D8, #$DF, #$E0, #$0B, #$42, #$D3, #$41, #$D4, #$D9, #$E3, #$D8 + + diff --git a/enemizer/enemizerflags.asm b/enemizer/enemizerflags.asm index 5852c49..6c7db3f 100644 --- a/enemizer/enemizerflags.asm +++ b/enemizer/enemizerflags.asm @@ -17,7 +17,6 @@ db #$00 ;408106 : 200106 ; toggle to turn on terrorpin ai "fix" .center_boss_drops db #$00 ;368107 -db #$00 ;408107 : 200107 db #$00 ;408108 : 200108 db #$00 ;408109 : 200109 db #$00 ;40810A : 20010A diff --git a/enemizer/hooks/blindboss_hooks.asm b/enemizer/hooks/blindboss_hooks.asm index 3ed2538..9871abe 100644 --- a/enemizer/hooks/blindboss_hooks.asm +++ b/enemizer/hooks/blindboss_hooks.asm @@ -7,7 +7,5 @@ org $1DA081 ; Original Code JML check_blind_boss_room Check_for_Blind_Fight: - - org $1DA090 Initialize_Blind_Fight: \ No newline at end of file diff --git a/enemizer/hooks/bosses_hooks.asm b/enemizer/hooks/bosses_hooks.asm index c71c121..d4c4425 100644 --- a/enemizer/hooks/bosses_hooks.asm +++ b/enemizer/hooks/bosses_hooks.asm @@ -28,142 +28,6 @@ Dungeon_ResetSprites: ; Bank09.asm(822) org $9C44E Sprite_ResetAll: ; Bank09.asm(1344) -;================================================================================ -; fix skull woods gibdo key drop -;-------------------------------------------------------------------------------- -;Gibdo key drop hardcoded in skullwoods to fix problems -;some bosses are dropping a key when there's a key drop avaiable in -;the previous room - -; org $09DD74 ; Gibdo draw code (JSL Sprite_DrawShadowLong) -; db #$00, #$00 ; Remove key drop in skull woods - -; org $1EBB37 ; Gibdo draw code (JSL Sprite_DrawShadowLong) -; JSL gibdo_drop_key -;-------------------------------------------------------------------------------- -; todo make the boss data change dynamic -;================================================================================ -; Move All Bosses Sprites in Top Left Quadrant -;-------------------------------------------------------------------------------- -; sprite values for rooms, with coordinates changed -;Trinexx -org $09E5BA ; 0x4E5BA ; [0xB] -db $00 ; "Sort Spr" in Hyrule Magic -db $05, $07, $CB ; trinexx body? ; 15 07 CB -db $05, $07, $CC ; trinexx ice head? ; 15 07 CC -db $05, $07, $CD ; trinexx fire head? ; 15 07 CD -db $FF ; terminator - -;Armos - Eastern -org $09E887 ; 0x4E887 ; [0x17] -db $00 ; "Sort Spr" in Hyrule Magic -db $05, $04, $53 ; armos ;15 14 53 -db $05, $07, $53 ; armos ;15 17 53 -db $05, $0A, $53 ; armos ;15 1A 53 -db $08, $0A, $53 ; armos ;18 1A 53 -db $08, $07, $53 ; armos ;18 17 53 -db $08, $04, $53 ; armos ;18 14 53 -db $08, $E7, $19 ; armos overlord ;18 F7 19 -db $FF ; terminator - -;Kholdstare -org $09EA01 ; 0x4EA01 ; [0xB] -db $00 ; "Sort Spr" in Hyrule Magic -db $05, $07, $A3 ; kholdstare shell ;05 17 A3 -db $05, $07, $A4 ; fallling ice ;05 17 A4 -db $05, $07, $A2 ; kholdstare ;05 17 A2 -db $FF ; terminator - -;Arrghus -org $09D997 ; 0x4D997 ; [0x2C] -db $00 ; "Sort Spr" in Hyrule Magic -db $07, $07, $8C ; arrghus ;17 07 8C -db $07, $07, $8D ; spawn ;17 07 8D -db $07, $07, $8D ; spawn ;17 07 8D -db $07, $07, $8D ; spawn ;17 07 8D -db $07, $07, $8D ; spawn ;17 07 8D -db $07, $07, $8D ; spawn ;17 07 8D -db $07, $07, $8D ; spawn ;17 07 8D -db $07, $07, $8D ; spawn ;17 07 8D -db $07, $07, $8D ; spawn ;17 07 8D -db $07, $07, $8D ; spawn ;17 07 8D -db $07, $07, $8D ; spawn ;17 07 8D -db $07, $07, $8D ; spawn ;17 07 8D -db $07, $07, $8D ; spawn ;17 07 8D -db $07, $07, $8D ; spawn ;17 07 8D -db $FF ; terminator - -;Moldorm - ToH -org $09D9C3 ; 0x4D9C3 ; [0x5] -db $00 ; "Sort Spr" in Hyrule Magic -db $09, $09, $09 ; moldorm ;0E 12 09 -db $FF ; terminator - -;Mothula -org $09DC31 ; 0x4DC31 ; [0x5] (really [0x8]) -db $00 ; "Sort Spr" in Hyrule Magic -db $06, $08, $88 ; mothula ;16 18 88 -; truncated moving floor overlord ;16 E7 07 -db $FF ; terminator - -;Lanmolas - Desert -org $09DCCB ; 0x4DCCB ; [0xB] -db $00 ; "Sort Spr" in Hyrule Magic -db $07, $06, $54 ; lanmolas ;17 06 54 -db $07, $09, $54 ; lanmolas ;17 09 54 -db $09, $07, $54 ; lanmolas ;19 07 54 -db $FF ; terminator - -;Helmasaure -org $09E049 ; 0x4E049 ; [0x5] -db $00 ; "Sort Spr" in Hyrule Magic -db $06, $07, $92 ; helmasaur ;16 17 92 -db $FF ; terminator - -;Vitreous -org $09E457 ; 0x4E457 ; [0x5] -db $00 ; "Sort Spr" in Hyrule Magic -db $05, $07, $BD ; vitreous ;15 07 BD -db $FF ; terminator - -;Blind -org $09E654 ; 0x4E654 ; [0x5] -db $00 ; "Sort Spr" in Hyrule Magic -db $05, $09, $CE ; blind ;15 19 CE -db $FF ; terminator - -; Armos - GT ; this shouldn't get used unless boss randomization is turned off -org $09DB23 ; 0x4DB23 ; [0x23] // need 0x38 to fit arrghus+spawn and fairies (use 0x4D87E-) -db $00 -db $05, $04, $53 ; armos ;15 14 53 -db $05, $07, $53 ; armos ;15 17 53 -db $05, $0A, $53 ; armos ;15 1A 53 -db $08, $0A, $53 ; armos ;18 1A 53 -db $08, $07, $53 ; armos ;18 17 53 -db $08, $04, $53 ; armos ;18 14 53 -db $08, $E7, $19 ; armos overlord ;18 F7 19 -db $07, $07, $E3 ; fairy ;07 07 E3 -db $07, $08, $E3 ; fairy ;07 08 E3 -db $08, $07, $E3 ; fairy ;08 07 E3 -db $08, $08, $E3 ; fairy ;08 08 E3 -db $FF - -; Lanmola - GT ; this shouldn't get used unless boss randomization is turned off -org $09E1BE ; 0x4E1BE ; [0x11] // need 0x32 to fit arrghus+spawn and bunny beam+medusa (use 0x4D8B6-) -db $00 -db $07, $06, $54 ; lanmolas ;17 06 54 -db $07, $09, $54 ; lanmolas ;17 09 54 -db $09, $07, $54 ; lanmolas ;19 07 54 -db $18, $17, $D1 ; bunny beam ;18 17 D1 -db $1C, $03, $C5 ; medusa ;1C 03 C5 -db $FF - -; Moldorm - GT ; this shouldn't get used unless boss randomization is turned off -org $09DF1E ; 0x4DF1E ; [0x5] -db $00 ; "Sort Spr" in Hyrule Magic -db $09, $09, $09 ; moldorm ;0E 12 09 -db $FF ; terminator - ;-------------------------------------------------------------------------------- ;================================================================================ @@ -179,17 +43,6 @@ org $028256 ; JSL Dungeon_ResetSprites ; REPLACE THAT (Sprite initialization) o JSL boss_move ;-------------------------------------------------------------------------------- -; todo make arghuss room change dynamic - -;================================================================================ -; water tiles removed in arrghus room -;-------------------------------------------------------------------------------- -org $1FA15C -db $FF, $FF, $FF, $FF, $F0, $FF, $61, $18, $FF, $FF - -; Arrghus can stand on ground -org $0DB6BE -db $00 ;-------------------------------------------------------------------------------- ;================================================================================ diff --git a/enemizer/hooks/moldorm_hooks.asm b/enemizer/hooks/moldorm_hooks.asm index a443913..976a7b7 100644 --- a/enemizer/hooks/moldorm_hooks.asm +++ b/enemizer/hooks/moldorm_hooks.asm @@ -11,10 +11,10 @@ org $1DD88E } ; set number of eyes -org $1DDBB2 ;$0EDBB2 -{ +;org $1DDBB2 ;$0EDBB2 +;{ ; LDX.b #$01 ; number of eyes (-1) ;0EDBB2 0EDBB3 - LDX.b #$07 -} +; LDX.b #$01 +;} diff --git a/enemizer/main.asm b/enemizer/main.asm index c12d982..e2487ef 100644 --- a/enemizer/main.asm +++ b/enemizer/main.asm @@ -34,7 +34,6 @@ EnemizerTablesStart: incsrc enemizer_info_table.asm incsrc enemizerflags.asm incsrc bushes_table.asm -; todo: room header table EnemizerCodeStart: incsrc bushes.asm