123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- ************************************************************************
- * *
- * 044 OBJECT ACTION PROGRAM *
- * *
- ************************************************************************
- XDEF SET_HIT_AREA,SET_HIT_AREA_HERO
- XDEF REDUCTION_MOVE
- XDEF USER_HIT,USER_HIT_OFF,USER_HITD
- XDEF USER_HIT2
- XREF ?A5
- SECT GAMES,,C
- INCLUDE NEO_GEO.INC
- INCLUDE LABEL.INC
- USER_HIT:
- MOVEP.W WORK_N0(A6),D0
- CLR.B D0
- MOVE.B WORK_N0(A5,D0.W),(A5)
- MOVE.W (A5),D0
- MOVE.L (A0),VX(A5,D0.W)
- MOVE.L (A0)+,VY(A5,D0.W)
- RTS
- USER_HITD:
- MOVEP.W WORK_N0(A6),D0
- CLR.B D0
- MOVE.B WORK_N0(A5,D0.W),(A5)
- MOVE.W (A5),D0
- MOVE.L (A0)+,VX(A5,D0.W)
- MOVE.L (A0)+,VY(A5,D0.W)
- RTS
- USER_HIT2:
- MOVEP.W WORK_N0(A6),D0
- CLR.B D0
- MOVE.B WORK_N1(A5,D0.W),(A5)
- MOVE.W (A5),D0
- MOVE.L (A0)+,HIT_OFS_X(A5,D0.W)
- RTS
- USER_HIT_OFF:
- MOVEP.W WORK_N0(A6),D0
- CLR.B D0
- MOVE.B WORK_N0(A5,D0.W),(A5)
- MOVE.W (A5),D0
- CLR.L VX(A5,D0.W)
- CLR.L VY(A5,D0.W)
- RTS
- REDUCTION_MOVE:
- MOVE.W BACK2+BIG_X(A5),D4
- MOVE.W D4,D0
- SUBQ.W #1,D0
- MOVE.B D0,BIG_X(A6)
- MOVE.B D0,BIG_Y(A6)
- MOVE.W X_POSITION(A6),D0
- MOVE.W BACK2+Wx(A5),D1
- BSR REDM_SUB
- MOVE.W D0,REL_X(A6)
- MOVE.W Y_POSITION(A6),D0
- ADD.W Z_POSITION(A6),D0
- MOVE.W BACK2+Wy(A5),D1
- ADD.W BACK2+Z_POSITION+2(A5),D1
- BSR REDM_SUB
- MOVE.W D0,REL_Y(A6)
- RTS
- REDM_SUB:
- SUB.W D1,D0
- MULS.W D4,D0
- ASR.L #8,D0
- RTS
- SET_HIT_AREA_HERO:
- TST.L HIT_OFS_X(A6)
- BNE.S SET_HIT_AREA
- BCLR.B #0,HIT_FLAG(A6)
- SET_HIT_AREA:
- ; hit area calucurate
- MOVE.B HIT_OFS_Y(A6),D3
- MOVE.B HIT_SIZE_Y(A6),D4
- EXT.W D3
- EXT.W D4
- ADD.W D3,D3
- ADD.W D4,D4
- ADD.W Z_POSITION(A6),D3
- MOVE.W D3,HIT_UPPER(A6)
- SUB.W D4,D3
- MOVE.W D3,HIT_LOWER(A6)
- MOVE.B HIT_OFS_X(A6),D1
- MOVE.B HIT_SIZE_X(A6),D2
- EXT.W D1
- EXT.W D2
- ADD.W D1,D1
- ADD.W D2,D2
- BTST.B #ACTAT_FLIP,ACT_ATTR(A6)
- BNE.S SET_HIT_AREA_2
- ADD.W X_POSITION(A6),D1
- MOVE.W D1,HIT_LEFT(A6)
- ADD.W D2,D1
- MOVE.W D1,HIT_RIGHT(A6)
- RTS
- SET_HIT_AREA_2:
- NEG.W D1
- ADD.W X_POSITION(A6),D1
- MOVE.W D1,HIT_RIGHT(A6)
- SUB.W D2,D1
- MOVE.W D1,HIT_LEFT(A6)
- RTS
- INCLUDE WORK.INC
|