This is the block of code for middle left for example: (commented out)WillElm wrote: ↑Wed May 15, 2019 12:50 amWhat exactly am I gonna comment out here? I got rid of everything from the left middle comment to the doRightHorColCheck label, and also got rid of what I thought was the same corresponding code for the right. This is the code I got rid of
It didn't seem to hurt anything, but I also can't tell if it made any difference in my game.
I hope this isn't too ridiculous. I've learned a good bit of asm in my short time, mostly to do with movement and variables, but I'm having a tough time following most collision related stuff.
Code: Select all
;;;;; left middle ; LDA Object_bottom,x ; SEC ; SBC Object_top,x ; LSR ; STA temp3 ;; temp 3 now equals half of the height of the object, so top+temp3 = mid point vertically. ; LDA xHold_hi ; CLC ; ADC Object_left,x ; STA tileX ; LDA Object_y_hi,x ; CLC ; ADC Object_top,x ; CLC ; ADC temp3 ; STA tileY ; JSR GetTileAtPosition ;;JSR DetermineCollisionTable ; LDA #$00 ; STA temp ; DetermineCollisionTableOfPoints temp ; STA collisionPoint4 ; JSR CheckForCollision ; LDA tile_solidity ; AND #%00000001 ; BEQ + ; JMP HandleSolidCollision ;; hit a solid so won't update position. ; + ; LDA tile_solidity ; AND #%00000010 ; BEQ + ; LDA Object_physics_byte,x ; AND #%00000010 ; BNE + ;; DO LADDER STUFF ; JSR DoLadderStuff ; + ; JMP doneWithHorColCheck ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;