Advertisement
Guest User

hellth blocks

a guest
Jun 28th, 2018
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; ---------------------------------------
  2. .PATCH 01:E863
  3. ; NEW CODE
  4. ; ---------------------------------------
  5.  
  6.     IsFuckTile:
  7.         ; New implementation of IsWalkableTile that does
  8.         ; additional testing for healy blocks
  9.            
  10.    
  11.            ldy IsSamus
  12.            beq @NotSamus
  13.        
  14.         ; special case for Samus
  15.        
  16.        
  17.     ; Test for healing block
  18.             cmp #HealyTile
  19.             bne @NotHealyBlock
  20.        
  21.                 lda #$01      
  22.                 sta TouchingHealyBlock      
  23.                
  24.                     sec
  25.                 rts
  26.             @NotHealyBlock:
  27.        
  28.         ; Below code is unchagned from original routine
  29.        
  30.         dey         ; = 0
  31.         sty SamusDoorData
  32.         cmp #$A0
  33.         beq +
  34.         cmp #$A1
  35.         bne ++
  36.         inc SamusDoorData
  37.         *
  38.         inc SamusDoorData
  39.         *    
  40.        
  41.         @NotSamus:
  42.         dex
  43.         beq +
  44.         jsr $E98E
  45.         jmp $E7E6
  46.        
  47.         *
  48.         sec         ; no crash
  49.         ; NO ;  Exit16:
  50.             rts
  51.        
  52.  
  53.     HealthBlockCheck:
  54.         ; New routine that checks the TouchingHealyBlock variable and
  55.         ; heals samus if applicable
  56.  
  57.             lda TouchingHealyBlock
  58.             beq +
  59.            
  60.                 ; Add health
  61.                 .if HealRate > $00FF
  62.                     lda #>HealRate
  63.                     sta HealthHiChange
  64.                 .endif
  65.                 lda #<HealRate
  66.                 sta HealthLoChange
  67.                 jsr AddHealth
  68.                
  69.                 lda FrameCount
  70.                 and #$1F
  71.                 bne +
  72.                 jsr $CBCA
  73.            
  74.             *
  75.         jmp LavaAndMoveCheck        ; Return from hijack
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement