ACT_SUB.SRC 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. ************************************************************************
  2. * *
  3. * 044 OBJECT ACTION PROGRAM *
  4. * *
  5. ************************************************************************
  6. XDEF SET_HIT_AREA,SET_HIT_AREA_HERO
  7. XDEF REDUCTION_MOVE
  8. XDEF USER_HIT,USER_HIT_OFF,USER_HITD
  9. XDEF USER_HIT2
  10. XREF ?A5
  11. SECT GAMES,,C
  12. INCLUDE NEO_GEO.INC
  13. INCLUDE LABEL.INC
  14. USER_HIT:
  15. MOVEP.W WORK_N0(A6),D0
  16. CLR.B D0
  17. MOVE.B WORK_N0(A5,D0.W),(A5)
  18. MOVE.W (A5),D0
  19. MOVE.L (A0),VX(A5,D0.W)
  20. MOVE.L (A0)+,VY(A5,D0.W)
  21. RTS
  22. USER_HITD:
  23. MOVEP.W WORK_N0(A6),D0
  24. CLR.B D0
  25. MOVE.B WORK_N0(A5,D0.W),(A5)
  26. MOVE.W (A5),D0
  27. MOVE.L (A0)+,VX(A5,D0.W)
  28. MOVE.L (A0)+,VY(A5,D0.W)
  29. RTS
  30. USER_HIT2:
  31. MOVEP.W WORK_N0(A6),D0
  32. CLR.B D0
  33. MOVE.B WORK_N1(A5,D0.W),(A5)
  34. MOVE.W (A5),D0
  35. MOVE.L (A0)+,HIT_OFS_X(A5,D0.W)
  36. RTS
  37. USER_HIT_OFF:
  38. MOVEP.W WORK_N0(A6),D0
  39. CLR.B D0
  40. MOVE.B WORK_N0(A5,D0.W),(A5)
  41. MOVE.W (A5),D0
  42. CLR.L VX(A5,D0.W)
  43. CLR.L VY(A5,D0.W)
  44. RTS
  45. REDUCTION_MOVE:
  46. MOVE.W BACK2+BIG_X(A5),D4
  47. MOVE.W D4,D0
  48. SUBQ.W #1,D0
  49. MOVE.B D0,BIG_X(A6)
  50. MOVE.B D0,BIG_Y(A6)
  51. MOVE.W X_POSITION(A6),D0
  52. MOVE.W BACK2+Wx(A5),D1
  53. BSR REDM_SUB
  54. MOVE.W D0,REL_X(A6)
  55. MOVE.W Y_POSITION(A6),D0
  56. ADD.W Z_POSITION(A6),D0
  57. MOVE.W BACK2+Wy(A5),D1
  58. ADD.W BACK2+Z_POSITION+2(A5),D1
  59. BSR REDM_SUB
  60. MOVE.W D0,REL_Y(A6)
  61. RTS
  62. REDM_SUB:
  63. SUB.W D1,D0
  64. MULS.W D4,D0
  65. ASR.L #8,D0
  66. RTS
  67. SET_HIT_AREA_HERO:
  68. TST.L HIT_OFS_X(A6)
  69. BNE.S SET_HIT_AREA
  70. BCLR.B #0,HIT_FLAG(A6)
  71. SET_HIT_AREA:
  72. ; hit area calucurate
  73. MOVE.B HIT_OFS_Y(A6),D3
  74. MOVE.B HIT_SIZE_Y(A6),D4
  75. EXT.W D3
  76. EXT.W D4
  77. ADD.W D3,D3
  78. ADD.W D4,D4
  79. ADD.W Z_POSITION(A6),D3
  80. MOVE.W D3,HIT_UPPER(A6)
  81. SUB.W D4,D3
  82. MOVE.W D3,HIT_LOWER(A6)
  83. MOVE.B HIT_OFS_X(A6),D1
  84. MOVE.B HIT_SIZE_X(A6),D2
  85. EXT.W D1
  86. EXT.W D2
  87. ADD.W D1,D1
  88. ADD.W D2,D2
  89. BTST.B #ACTAT_FLIP,ACT_ATTR(A6)
  90. BNE.S SET_HIT_AREA_2
  91. ADD.W X_POSITION(A6),D1
  92. MOVE.W D1,HIT_LEFT(A6)
  93. ADD.W D2,D1
  94. MOVE.W D1,HIT_RIGHT(A6)
  95. RTS
  96. SET_HIT_AREA_2:
  97. NEG.W D1
  98. ADD.W X_POSITION(A6),D1
  99. MOVE.W D1,HIT_RIGHT(A6)
  100. SUB.W D2,D1
  101. MOVE.W D1,HIT_LEFT(A6)
  102. RTS
  103. INCLUDE WORK.INC
  104.