Guest User

Untitled

a guest
Sep 4th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Obj45:                  ; XREF: Obj_Index
  2.         moveq   #0, d0                                      ; Clr d0
  3.         move.b  $24(a0), d0                                 ; Copy routine ctr to d0
  4.         move.w  Obj45_Index(pc,d0.w), d1                    ; Get the apt index
  5.         jsr     Obj45_Index(pc,d1.w)                        ; Jump there
  6.         bra DisplaySprite
  7. ; ===========================================================================
  8. Obj45_Index:   
  9.         dc.w Obj45_Main-Obj45_Index
  10.         dc.w Obj45_Solid-Obj45_Index
  11.         dc.w Obj45_Teleport-Obj45_Index
  12.  
  13. Obj45_Main:             ; XREF: Obj45_Index
  14.         move.b  #2, $24(a0)                                 ; Increase routine counter.
  15.        
  16.         move.w  #$C240, $2(a0)                              ; Art at tile $240, 3rd palette line, priority ($4240 w/o)
  17.         move.l  #Map_Teleporter, $4(a0)                     ; moves the mappings into the mapping's SST
  18.         move.b  #$40, $19(a0)                               ; 64 pixels wide
  19.         move.b  #$40, $17(a0)                               ; 64 pixels wide hitbox
  20.         move.b  #$18, $16(a0)                               ; 24 pixels tall hitbox
  21.         move.b  #0, $18(a0)                                 ; Sprite is in front of things
  22.         move.b  #0, $1C(a0)                                 ; Display active animation
  23.         rts
  24. Obj45_Solid:                ; XREF: Obj45_Index
  25.         lea     #Ani_Teleporter, a1                         ; Animation script
  26.         bsr AnimateSprite                               ; Animate the frame
  27.        
  28.         moveq   #$40, d1                                    ; 64 pixels wide
  29.         moveq   #$0B, d2                                    ; 24 pixels tall when jumping
  30.         moveq   #$0B, d3                                    ; 24 pixels tall when walking
  31.         move.w  8(a0),d4                                    ; X pos
  32.         bra SolidObject                                 ; Jump to solid object routine.
  33. Obj45_Teleport:
  34.         rts
  35.  
  36. ; Object subtype is an offset into this array, format is XXXX, YYYY
  37. Obj45_TeleportPositions:
  38.         dc.w    $100, $700
  39.         even
  40.    
  41. Ani_Teleporter:
  42.         dc.w    @ani_static-Ani_Teleporter
  43.        
  44. @ani_static:
  45.         dc.b    $FF, $01, $01, $01, $01, $FF
  46.         even
Add Comment
Please, Sign In to add comment