Pots destroyed by L2-L4 Sword

Page 2 of 2 Previous  1, 2

View previous topic View next topic Go down

20140318

Post 

Pots destroyed by L2-L4 Sword






Information: destroys pots with Sword level 2, 3 or 4
Rom: ALTTP (US), without header
Screenshots:



Ips Patch: http://bszelda.zeldalegends.net/stuff/Con/pott_l2sword.zip

Code Addresses:
$0x77B70 - 0x77B9B: code to implement feature
$0x77f00- 0x77f18: bugfix to not ram posts into ground with sword
Update: The old hack let you ram posts into the ground with the sword (posts on the overworld and these little "face"-tiles in dungeons). So here is a bugfix version that does another test for the hammer when the games checks for these tiles.

ASM

Code:

; This is for destroying pots with L2 -L4 sword.
;WRITTEN:    by Conn and XaserLE
;THANKS TO: -MathOnNapkins' Zelda Doc's
;        -wiiqwertyuiop for his Zelda Disassembly

;header
lorom

ORG $01DABD      ; go to the code that handles hammer-destroyable objects
JMP.l $0EFB70  ; insert a jump to unused space

org $0EFB70      ; go to unused space
LDA $0301      ; load the slot that tells us if link has something in his hand poised to strike (boomerang, rods, powder....)
AND #$0002      ; check if it was the hammer
BEQ $04        ; if not (AND was zero), go to next test (sword)
JMP.l $01DAC5  ; otherwise jump to the code that handles destroying the object
LDA $0354      ; load animation state of link (0x27 means sword strike)
AND #$0027      ; check if sword was used
BNE $04        ; if it was the sword (AND was not zero), go for testing the sword level
JMP.l $01DAB6  ; otherwise leave this whole routine (leads to a reset of cpu flags and a RTL)
LDA $7EF359      ; load sword level
AND #$00FF      ; isolate last 8 bits
CMP #$0001      ; check sword level ($00 = No Sword ; $01 = L1-Sword ; $02 = Master Sword ; $03 = Tempered Master Sword ; $04 = Magic Master Sword)
BNE $04        ; if CMP is not zero, our sword level is higher than 1, so do the code that handles destroying the object
JMP.l $01DAB6  ; otherwise leave this whole routine (leads to a reset of cpu flags and a RTL)
JMP.l $01DAC5  ; this leads to the code for object destroying

; The following will hinder to ram posts into the ground with the sword (side-effect of the above code, cause hammer can do this).

ORG $01DAFC      ; go to the code that checks for the hammer-destroyable "face"-tiles (we jump to a CMP instruction)
JMP.l $0EFf00  ; insert a jump to unused space
nop

ORG $0EFf00      ; go to unused space
CMP #$4040      ; check accumulator for "face"-tile
BEQ $04        ; if "face"-tile (CMP was zero), go for "hammer was used" test
JMP.l $01DB16  ; else jump to next tile test
LDA $0301      ; load the slot that tells us if link has something in his hand poised to strike (boomerang, rods, powder....)
AND #$0002      ; check if it was the hammer
BNE $04        ; if it was the hammer (AND was not zero), go back to normal code and keep ramming the post into the ground
JMP.l $01DAB6  ; otherwise leave this whole routine (leads to a reset of cpu flags and a RTL)
JMP.l $01DB01  ; go back to normal code


avatar
Conn



Since : 2013-06-30

Back to top Go down

Share this post on: Excite BookmarksDiggRedditDel.icio.usGoogleLiveSlashdotNetscapeTechnoratiStumbleUponNewsvineFurlYahooSmarking

Pots destroyed by L2-L4 Sword :: Comments

avatar

Post on Fri 22 Apr 2016 - 4:32 by Conn

I am not sure whether this is fixable. I did not alter the collision detection routines. I guess that the pot is marked as hit at a certain pixel first and then destroys. Check the bushes, they seem to have the same issue.

Back to top Go down

avatar

Post on Fri 22 Apr 2016 - 6:30 by Puzzledude

I don't think this is a problem though, since it is logical you need to stand close to a pot to breake it.

Back to top Go down

avatar

Post on Fri 22 Apr 2016 - 13:02 by qwertymodo

It's not a problem necessarily, but I don't think it's logical, because you can see that you've hit it, but it doesn't break (e.g. 0:03 in the video).  Not really a big deal, but it is something I noticed.

Back to top Go down

Page 2 of 2 Previous  1, 2

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum