PDA

View Full Version : aLttP-style pushable 1x2 blocks



Imprisoned
10-20-2007, 08:44 AM
I was mainly looking for Saffith's script but the links were broken... if someone has the script, please.

shadowfall1976
11-19-2007, 07:36 PM
I think this is it..... I have never used it, but he is where I got it from.
in case you didn't get it yet., no point in asking first, for anyone else
it's here.



MULTV d1, 16 ; Find the combo type at the given
ADDR d0, d1 ; position and load it into d1
SETR d1, combodd
wait COMPARER combodd, d1 ; Wait until the block is pushed
GOTOFALSE pushed
WAITFRAME
GOTO wait
pushed COMPAREV linkdir, 0 ; Determine which way the block
GOTOTRUE up ; was pushed based on which way
COMPAREV linkdir, 1 ; Link is facing
GOTOTRUE down
COMPAREV linkdir, 2
GOTOTRUE left
GOTO right
up SETV d2, 16 ; Move upward 1 pixel every other frame
upLoop SUBV y, 1 ; for 32 frames
WAITFRAME
WAITFRAME
SUBV d2, 1
COMPAREV d2, 0
GOTOFALSE upLoop
SUBV d0, 16 ; Adjust the position of the combo
GOTO wait ; being tracked and go back to waiting
down SETV d2, 16 ; Move downward
downLoop ADDV y, 1
WAITFRAME
WAITFRAME
SUBV d2, 1
COMPAREV d2, 0
GOTOFALSE downLoop
ADDV d0, 16
GOTO wait
left SETV d2, 16 ; Move left
leftLoop SUBV x, 1
WAITFRAME
WAITFRAME
SUBV d2, 1
COMPAREV d2, 0
GOTOFALSE leftLoop
SUBV d0, 1
GOTO wait
right SETV d2, 16 ; Move right
rightLoop ADDV x, 1
WAITFRAME
WAITFRAME
SUBV d2, 1
COMPAREV d2, 0
GOTOFALSE rightLoop
ADDV d0, 1
GOTO wait