Advertisement
Nightseeker

Virtua Hamster (32X) code fragment

Mar 10th, 2020
1,087
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  returns d1 weapon select else -1
  2.  
  3.  -----------------------------------------------------------------------------
  4.  
  5.  cycle_weapon  
  6.  move.w  current_stick,d0 ;joystick values
  7.  moveq   #numcol-1,d2     ;number to check
  8.  moveq   #0,d1
  9.  move.b  numcol*2(a5),d1  ;this indexes select
  10.  bmi.s  
  11.  @none
  12.  add.w   d1,d1            ;which one  
  13.  lea     (a5,d1.w),a1     ;this points to the def
  14.  tst.b   (a1)             ;any?
  15.  beq.s  
  16.  @search  
  17.  btst    #c_jp,d0         ;do nothing
  18.  beq.s  
  19.  @found    
  20.  bra.s  
  21.  @next
  22.  @none
  23.  moveq   #-2,d1           ;compensation
  24.  bra.s  
  25.  @next
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement