Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;~@sa1 <-- DO NOT REMOVE THIS LINE!
- lorom ;\ the ROM is LoRom
- header ;/ Header exists.
- !normalslip = $60 ;Customizable slipperity. DO NOT put $80.
- ;------(IMPORTANT)----i!i![FREESPACE]!i!i----(IMPORTANT)------
- ; |
- !freecode = $278100 ;| If you don't know what it means, refer some tutorials in SMWC.
- !freeram = $7415 ;|
- ; |
- ;------(IMPORTANT)----i!i![???? ???????]!i!i----(IMPORTANT)------
- org $A21B ; (Hijack Routine):Executes at every frame in the game.
- JSL Slippery
- org $CFDE ; (?????? ???):Executes only when the level is ALREADY slippery.
- JSL OrigSlip
- NOP ; Removes 1 byte trash.
- org !freecode
- OrigSlip:
- LDA $86 ;\ If the level is...
- CMP #$80 ;| NOT slippery...
- BNE return ;/ REJECTED.
- LDA #$68 ;\ Restore hijacked code.
- STA $73E5 ;/ Nothing is done in slippery level.
- Slippery:
- LDA $6DB3 ;\ If the player is...
- CMP #$01 ;| NOT Luigi...
- BNE return ;/ Rejected
- main:
- LDA $86 ;\ If the level is...
- CMP #$80 ;| Slippery...
- BEQ return ;/ do as usual.
- LDA $77 ; \
- AND #$04 ;| Check if Luigi is on the ground..
- BEQ timerreset ;/
- LDA $7B ; If Luigi is not moving..
- BEQ timerreset ; It is not slippery.
- LDA $15
- AND #$03
- BEQ timerset
- LDA !freeram
- BNE doit
- LDA $7B ;\If Luigi is moving left..
- BMI left ;/??Branch??
- right: ;<Moving Right>
- LDA $15
- AND #$02
- BNE timerset
- BRA timerset
- left: ;<Moving Left>
- LDA $15
- AND #$01
- BNE timerset
- timerset: ; Set Slippery timer.
- LDA #$0B ; To prevent over-slipperification (?) of Luigi.
- STA !freeram
- doit:
- LDA !freeram ; \ This obviously indicates that
- CMP #$01 ; | I am a bad coder.
- BEQ slipreset ; / unslipperize when the timer reached its limit.
- DEC !freeram
- LDA #!normalslip ; Do slip!
- STA $86 ; Store the customized slipperity.
- BRA return
- timerreset:
- STZ !freeram
- BRA slipreset
- slipreset: ;\Makes unslippery.
- LDA #$00 ;|If this is not zero, Luigi will always slips
- STA $86 ;/So have mercy on poor Luigi.
- BRA return
- return:
- LDA $16 ;\ Restore hijacked code.
- AND #$10 ;/ Do not touch.
- RTL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement