From a76a51d1a4daf0404a0fda907e80512a2816a3f9 Mon Sep 17 00:00:00 2001 From: scawful Date: Fri, 23 Feb 2024 12:11:53 -0500 Subject: [PATCH] Add KydreeokBody dungeon object, wall sword display, heavy pot --- Dungeons/Objects/heavy_pot.bin | Bin 0 -> 14 bytes Dungeons/Objects/kydreeok_body.bin | Bin 0 -> 100 bytes Dungeons/Objects/object_handler.asm | 36 +++++++++++++++++++++++++- Dungeons/Objects/wall_sword_house.bin | Bin 0 -> 14 bytes 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 Dungeons/Objects/heavy_pot.bin create mode 100644 Dungeons/Objects/kydreeok_body.bin create mode 100644 Dungeons/Objects/wall_sword_house.bin diff --git a/Dungeons/Objects/heavy_pot.bin b/Dungeons/Objects/heavy_pot.bin new file mode 100644 index 0000000000000000000000000000000000000000..ccb3666ce4365acf0ede36354128a6fd460fe4bc GIT binary patch literal 14 VcmZQ-(2&%KWNNUGw1{M2000%10;vE1 literal 0 HcmV?d00001 diff --git a/Dungeons/Objects/kydreeok_body.bin b/Dungeons/Objects/kydreeok_body.bin new file mode 100644 index 0000000000000000000000000000000000000000..33f76525b282c2f16c83cf1b40154fe9503d414b GIT binary patch literal 100 zcmW-ZK@NZ*5Ccgx>jMBi%?ug+<3a+rJZEb+Hj16L#9b1b8>O%RF;jKhnH86 f?rx*?jh$Va+H_7Nkre-(;}pu|^|G>3`|1!rjolIv literal 0 HcmV?d00001 diff --git a/Dungeons/Objects/object_handler.asm b/Dungeons/Objects/object_handler.asm index 802f1c9..5b83476 100644 --- a/Dungeons/Objects/object_handler.asm +++ b/Dungeons/Objects/object_handler.asm @@ -17,6 +17,8 @@ NewObjectsCode: { PHB : PHK : PLB PHX + + STZ $03 ; 03 will be used to store the object ID for custom config LDA $00 : PHA LDA $02 : PHA ; $00 Will be used for tile count and tile to skip @@ -38,8 +40,10 @@ NewObjectsCode: -- ;Tiles Loop INX : INX - + ; Vhopppcc cccccccc + print "Object Handler", pc LDA .ObjData, X : BEQ + + JSR CustomDrawConfig STA [$BF], Y + @@ -77,6 +81,9 @@ NewObjectsCode: dw .BottomleftFloor-.ObjData ; 10 dw .BottomRightFloor-.ObjData ; 11 dw .FloorAny-.ObjData ; 12 + dw .WallSwordHouse-.ObjData ; 13 + dw .KydreeokBody-.ObjData ; 14 + dw .HeavyPot-.ObjData ; 15 .ObjData .LeftRight @@ -105,7 +112,34 @@ NewObjectsCode: incbin track_floor_corner_BR.bin .FloorAny incbin track_floor_any.bin + .WallSwordHouse + incbin wall_sword_house.bin + .KydreeokBody + incbin kydreeok_body.bin + .HeavyPot + incbin heavy_pot.bin } + +; May need to make this a table +; This modifies object 0xOE to use the spritesheets for the object +CustomDrawConfig: +{ + PHA + LDA $03 : CMP.w #$000E : BEQ .custom_config + + TYA : LSR : AND #$00FF + + CMP #$000E : BNE .no_spriteset + LDA #$000E : STA $03 + .custom_config + PLA + ORA.w #$0300 : JMP .return +.no_spriteset + PLA +.return + RTS +} + pushpc \ No newline at end of file diff --git a/Dungeons/Objects/wall_sword_house.bin b/Dungeons/Objects/wall_sword_house.bin new file mode 100644 index 0000000000000000000000000000000000000000..0a720a8f7e640cfa98408674e683df9640965201 GIT binary patch literal 14 VcmZQ-SirfElc`|}=TuGx1^^z+1Csy% literal 0 HcmV?d00001