Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. ;~@sa1 <-- DO NOT REMOVE THIS LINE!
  2.  
  3.  
  4.  
  5. lorom ;\ the ROM is LoRom
  6. header ;/ Header exists.
  7.  
  8. !normalslip = $60 ;Customizable slipperity. DO NOT put $80.
  9.  
  10. ;------(IMPORTANT)----i!i![FREESPACE]!i!i----(IMPORTANT)------
  11. ; |
  12. !freecode = $278100 ;| If you don't know what it means, refer some tutorials in SMWC.
  13. !freeram = $7415 ;|
  14. ; |
  15. ;------(IMPORTANT)----i!i![???? ???????]!i!i----(IMPORTANT)------
  16. org $A21B ; (Hijack Routine):Executes at every frame in the game.
  17. JSL Slippery
  18.  
  19. org $CFDE ; (?????? ???):Executes only when the level is ALREADY slippery.
  20. JSL OrigSlip
  21. NOP ; Removes 1 byte trash.
  22. org !freecode
  23.  
  24. OrigSlip:
  25. LDA $86 ;\ If the level is...
  26. CMP #$80 ;| NOT slippery...
  27. BNE return ;/ REJECTED.
  28. LDA #$68 ;\ Restore hijacked code.
  29. STA $73E5 ;/ Nothing is done in slippery level.
  30. Slippery:
  31. LDA $6DB3 ;\ If the player is...
  32. CMP #$01 ;| NOT Luigi...
  33. BNE return ;/ Rejected
  34.  
  35. main:
  36. LDA $86 ;\ If the level is...
  37. CMP #$80 ;| Slippery...
  38. BEQ return ;/ do as usual.
  39.  
  40. LDA $77 ; \
  41. AND #$04 ;| Check if Luigi is on the ground..
  42. BEQ timerreset ;/
  43. LDA $7B ; If Luigi is not moving..
  44. BEQ timerreset ; It is not slippery.
  45. LDA $15
  46. AND #$03
  47. BEQ timerset
  48.  
  49. LDA !freeram
  50. BNE doit
  51.  
  52. LDA $7B ;\If Luigi is moving left..
  53. BMI left ;/??Branch??
  54. right: ;<Moving Right>
  55.  
  56. LDA $15
  57. AND #$02
  58. BNE timerset
  59. BRA timerset
  60. left: ;<Moving Left>
  61.  
  62. LDA $15
  63. AND #$01
  64. BNE timerset
  65.  
  66. timerset: ; Set Slippery timer.
  67. LDA #$0B ; To prevent over-slipperification (?) of Luigi.
  68. STA !freeram
  69. doit:
  70. LDA !freeram ; \ This obviously indicates that
  71. CMP #$01 ; | I am a bad coder.
  72. BEQ slipreset ; / unslipperize when the timer reached its limit.
  73. DEC !freeram
  74. LDA #!normalslip ; Do slip!
  75. STA $86 ; Store the customized slipperity.
  76. BRA return
  77. timerreset:
  78. STZ !freeram
  79. BRA slipreset
  80. slipreset: ;\Makes unslippery.
  81. LDA #$00 ;|If this is not zero, Luigi will always slips
  82. STA $86 ;/So have mercy on poor Luigi.
  83. BRA return
  84. return:
  85. LDA $16 ;\ Restore hijacked code.
  86. AND #$10 ;/ Do not touch.
  87. RTL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement