Advertisement
NovaYoshi

metaplayer.s

Dec 28th, 2015
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SpecialMiscList:
  2.   .byt Metatiles::COIN
  3.   .byt Metatiles::SPRING
  4.   .byt Metatiles::SIGNPOST
  5.   .byt Metatiles::DOOR_BOTTOM
  6.   .byt Metatiles::SPRING_DOWN
  7.   .byt Metatiles::KEY_RED
  8.   .byt Metatiles::KEY_GREEN
  9.   .byt Metatiles::KEY_BLUE
  10.   .byt Metatiles::TOGGLE_SWITCH
  11.   .byt Metatiles::TELEPORTER
  12.   .byt Metatiles::CLONE_SWITCH
  13.   .byt Metatiles::GENERIC_SWITCH
  14.   .byt Metatiles::FORCE_LEFT
  15.   .byt Metatiles::FORCE_RIGHT
  16.   .byt Metatiles::FORCE_UP
  17.   .byt Metatiles::FORCE_DOWN
  18.   .byt Metatiles::CHIP
  19.   .byt Metatiles::CHERRY_BOMB
  20.   .byt Metatiles::CAMPFIRE
  21.   .byt Metatiles::RED_BOOTS
  22.   .byt Metatiles::GREEN_BOOTS
  23.   .byt Metatiles::GRAY_BOOTS
  24.   .byt Metatiles::BLUE_BOOTS
  25.  
  26. SpecialMiscLo:
  27.   .byt <(TouchedCoin-1)
  28.   .byt <(TouchedSpring-1)
  29.   .byt <(TouchedSignpost-1)
  30.   .byt <(TouchedDoorBottom-1)
  31.   .byt <(TouchedSpringDown-1)
  32.   .byt <(TouchedKey-1)
  33.   .byt <(TouchedKey-1)
  34.   .byt <(TouchedKey-1)
  35.   .byt <(TouchedToggleSwitch-1)
  36.   .byt <(TouchedTeleporter-1)
  37.   .byt <(TouchedCloneSwitch-1)
  38.   .byt <(TouchedGenericSwitch-1)
  39.   .byt <(TouchedForce-1)
  40.   .byt <(TouchedForce-1)
  41.   .byt <(TouchedForce-1)
  42.   .byt <(TouchedForce-1)
  43.   .byt <(TouchedChip-1)
  44.   .byt <(TouchedCherryBomb-1)
  45.   .byt <(TouchedCampfire-1)
  46.   .byt <(TouchedBoots-1)
  47.   .byt <(TouchedBoots-1)
  48.   .byt <(TouchedBoots-1)
  49.   .byt <(TouchedBoots-1)
  50.  
  51. SpecialMiscHi:
  52.   .byt >(TouchedCoin-1)
  53.   .byt >(TouchedSpring-1)
  54.   .byt >(TouchedSignpost-1)
  55.   .byt >(TouchedDoorBottom-1)
  56.   .byt >(TouchedSpringDown-1)
  57.   .byt >(TouchedKey-1)
  58.   .byt >(TouchedKey-1)
  59.   .byt >(TouchedKey-1)
  60.   .byt >(TouchedToggleSwitch-1)
  61.   .byt >(TouchedTeleporter-1)
  62.   .byt >(TouchedCloneSwitch-1)
  63.   .byt >(TouchedGenericSwitch-1)
  64.   .byt >(TouchedForce-1)
  65.   .byt >(TouchedForce-1)
  66.   .byt >(TouchedForce-1)
  67.   .byt >(TouchedForce-1)
  68.   .byt >(TouchedChip-1)
  69.   .byt >(TouchedCherryBomb-1)
  70.   .byt >(TouchedCampfire-1)
  71.   .byt >(TouchedBoots-1)
  72.   .byt >(TouchedBoots-1)
  73.   .byt >(TouchedBoots-1)
  74.   .byt >(TouchedBoots-1)
  75.  
  76. .proc TouchedCoin
  77.   lda #0
  78.   jsr ChangeBlock
  79.   lda #SFX::COIN
  80.   jsr PlaySound
  81.   jmp AddCoin
  82. .endproc
  83.  
  84. .proc TouchedSpring
  85.   inc HandlePlayer::SkipFourCorners
  86.   lda #-1
  87.   sta PlayerVYH
  88.   lda #-$70
  89.   sta PlayerVYL
  90.   lda #30
  91.   sta PlayerJumpCancelLock
  92.   lda #SFX::SPRING
  93.   jsr PlaySoundDebounce
  94.  
  95.   ldy TempSpace
  96.   ; animate the spring
  97.   lda #1
  98.   sta 0
  99.   lda #Metatiles::SPRING
  100.   jsr DelayChangeBlock
  101.   lda #Metatiles::SPRING_PRESSED
  102.   jmp ChangeBlock
  103. .endproc
  104.  
  105. .proc TouchedSignpost
  106.   rts
  107. .endproc
  108.  
  109. .proc TouchedDoorBottom
  110.   rts
  111. .endproc
  112.  
  113. .proc TouchedSpringDown
  114.   rts
  115. .endproc
  116.  
  117. .proc TouchedKey
  118.   rts
  119. .endproc
  120.  
  121. .proc TouchedToggleSwitch
  122.   rts
  123. .endproc
  124.  
  125. .proc TouchedTeleporter
  126.   rts
  127. .endproc
  128.  
  129. .proc TouchedCloneSwitch
  130.   rts
  131. .endproc
  132.  
  133. .proc TouchedGenericSwitch
  134.   rts
  135. .endproc
  136.  
  137. .proc TouchedForce
  138.   rts
  139. .endproc
  140.  
  141. .proc TouchedChip
  142.   rts
  143. .endproc
  144.  
  145. .proc TouchedCherryBomb
  146.   rts
  147. .endproc
  148.  
  149. .proc TouchedCampfire
  150.   rts
  151. .endproc
  152.  
  153. .proc TouchedBoots
  154.   rts
  155. .endproc
  156.  
  157. SpecialWallList:
  158.   .byt Metatiles::LOCK_RED
  159.   .byt Metatiles::LOCK_GREEN
  160.   .byt Metatiles::LOCK_BLUE
  161.   .byt Metatiles::CHIP_SOCKET
  162.   .byt Metatiles::PICKUP_BLOCK
  163.   .byt Metatiles::PUSHABLE_BLOCK
  164.  
  165. SpecialCeilingList:
  166.   .byt Metatiles::PRIZE
  167.  
  168. SpecialFloorList:
  169.   .byt Metatiles::SPIKES
  170.  
  171. .proc DoSpecialMisc
  172.   sty TempY
  173.   sta TempVal
  174.   ldy #0
  175. : cmp SpecialMiscList,y ; unrolled a bit
  176.   beq Yes
  177.   iny
  178.   cmp SpecialMiscList,y
  179.   beq Yes
  180.   iny
  181.   cmp SpecialMiscList,y
  182.   beq Yes
  183.   iny
  184.   bne :-
  185. Yes:
  186.   lda SpecialMiscHi,y
  187.   pha
  188.   lda SpecialMiscLo,y
  189.   pha
  190.   ldy TempY
  191.   lda TempVal
  192.   rts
  193. .endproc
  194.  
  195. .proc DoSpecialWall
  196.   rts
  197. .endproc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement