ThomasSpeedrunner

RunObjects

Aug 20th, 2013
5,348
0
Never
2
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; sub_15FCC:
  2. RunObject:
  3.     move.b  (a0),d0         ; get the object's ID
  4.     beq.s   RunNextObject       ; if it's obj00, skip it
  5.  
  6.     add.w   d0,d0
  7.     add.w   d0,d0           ; d0 = object ID * 4
  8.     movea.l Obj_Index-4(pc,d0.w),a1 ; load the address of the object's code
  9.     jsr (a1)            ; dynamic call! to one of the the entries in Obj_Index
  10.     moveq   #0,d0
  11.  
  12. ; loc_15FDC:
  13. RunNextObject:
  14.     lea next_object(a0),a0 ; load 0bj address
  15.     dbf d7,RunObject
  16. ; return_15FE4:
  17. RunObjects_End:
  18.     rts
Advertisement