jataka5000
New member
I'm working on reversing gravity -- My modifications to the gravity part of the code now work (yay!) -- however, when I run into a solid tile from below, my speed is reset to zero, then keep moving (in this case upwards) through the object.
My goal: Upon collision with a solid, I want the top of my character stopped just under the solid tile, and still able to run left and right...
It seems that my key difficulty is understanding "isSolidSoLand":
Would someone be willing to give me some more insights (commenting the lines would be awesome!) as to what this part of the code is really doing? e.g. I'm not sure why "AND #%11110000", or why we are subtracting the self_bottom position. I'm also not sure on the real meaning of yHold_hi and Object_y_hi. I tried modifying "self_bottom" to "self_top" but it doesn't seem that simple...
Thanks for any help!
-j5k
My goal: Upon collision with a solid, I want the top of my character stopped just under the solid tile, and still able to run left and right...
It seems that my key difficulty is understanding "isSolidSoLand":
Code:
isSolidSoLand:
;; move to position
;;; load the top of the tile that is being run into.
LDA tileY
AND #%11110000
SEC
SBC self_bottom
SEC
SBC #$01
STA Object_y_hi,x
STA yHold_hi
doneWithGravity:
Would someone be willing to give me some more insights (commenting the lines would be awesome!) as to what this part of the code is really doing? e.g. I'm not sure why "AND #%11110000", or why we are subtracting the self_bottom position. I'm also not sure on the real meaning of yHold_hi and Object_y_hi. I tried modifying "self_bottom" to "self_top" but it doesn't seem that simple...
Thanks for any help!
-j5k