123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583 |
- ************************************************************************
- * *
- * 044 [ART OF FIGHT] *
- * HERO MAIN PROGRAM *
- * by S.OKADA from 91/09/19 Thu 16:52 *
- * *
- ************************************************************************
- XDEF HERO_1st,LM_HERO,DIR_CHANGE
- XDEF Z_MINIMUM
- XDEF ADC_SET
- XREF ?A5
- ;by MOVE_CHG
- XREF MOVE_CHANGE,CTRL_CHANGE
- XREF SPECIAL_CHECK
- XREF ATTACK_OFF,ATTACK_OFF_LM
- XREF TO_JUMP
- ;by HERO_CML
- XREF HERO_STATE_DISP
- ;by HERO_PM
- XREF STAR_MAKE
- ;by DMG_SET
- XREF ALL_DEAD_SOUND,RIKI_SOUND_CUT
- ;by BACK
- XREF GL
- ;by GAME_SUB
- XREF GET_OBJ_BACK_ADRS
- ;by SUB
- XREF PWORK_SET,SEC_TIME
- SECT HERO,,C
- INCLUDE GAME_SYM.INC
- INCLUDE MACRO.INC
- INCLUDE NEO_GEO.INC
- INCLUDE LABEL.INC
- INCLUDE HFLAG.INC
- INCLUDE HERO_STP.INC
- INCLUDE ACT_GRP.INC
- INCLUDE CTRL_No.INC
- INCLUDE ACT_No.INC
- ;
- ; *** hero's work configration ***
- ;
- ;HERO1,2 N0(0) p_main N0(1) weak point T2 N0(5) attack
- ; & gard T3 N1(2) head T1
- ; N2(3) body1 T0
- ; N3(4) shadow & body2 T0
- HERO_1st:
- MOVE.W #GL,Y_POSITION(A6)
- MOVEQ.L #0,D0
- MOVE.L D0,Z_POSITION(A6)
- MOVE.W D0,X_POSITION+2(A6)
- MOVE.W D0,Y_POSITION+2(A6)
- MOVE.L D0,VX(A6)
- MOVE.L D0,VY(A6)
- MOVE.L D0,VZ(A6)
- MOVE.B D0,STEP1(A6)
- MOVE.B D0,STEP2(A6)
- MOVE.B D0,HIT_OFF(A6)
- MOVE.B D0,ATTACK_LEVEL(A6)
- MOVE.B D0,SPECIAL_LEVER(A6)
- MOVE.B D0,ATTACK_TIMER(A6)
- MOVE.B D0,STATE(A6)
- MOVE.B D0,RUNNING_CT(A6)
- MOVE.B D0,ADC_COMMAND(A6)
- MOVE.W D0,HERO_SPIRIT_D(A6)
- MOVE.B D0,FLAG(A6)
- MOVE.W D0,DIRECT_CTRL(A6)
- MOVE.B D0,CTRL_FLAG(A6)
- MOVE.B D0,BEFOR_ATTACK(A6)
- MOVE.B D0,AREA_POSITION(A6)
- MOVE.B D0,RIKI_TIMER(A6)
- MOVE.B D0,REV_TRIG_OFF(A6)
- MOVE.B D0,SPECIAL_USE(A6)
- MOVE.B D0,WEAK_HIT(A6)
- MOVE.B D0,DOWN_DMG(A6)
- MOVE.B D0,TAMA_No(A6)
- MOVE.B D0,HERO_STATE_ON(A6)
- MOVE.B D0,PLAY_LEVER2(A6)
- MOVE.B D0,NON_ADC(A6)
- MOVE.W D0,RENDA_COUNT(A6)
- MOVE.B #11B,FURA_COUNT(A6)
- MOVE.L #1,HERO_SCORE_D(A6)
- MOVE.B #-1,SPECIAL_No(A6)
- MOVE.B #HS_AUTO,HERO_STATE(A6)
- MOVE.W #200H,WORD_TIMER(A6)
- BSR GAGE_SET
- MOVE.B LIFE_GAGE(A6),D0
- ADD.W D0,D0
- ADD.W D0,D0
- ADD.W D0,D0
- MOVE.W D0,HERO_LIFE(A6)
- SUBQ.W #1,D0
- MOVE.W D0,HERO_LIFE_D(A6)
- MOVE.B SPIRIT_GAGE(A6),D0
- ADD.W D0,D0
- ADD.W D0,D0
- ADD.W D0,D0
- MOVE.B D0,HERO_SPIRIT(A6)
- MOVE.B D0,(A5)
- MOVE.W (A5),RIKI_MAX(A6)
- CLR.B HERO_SPIRIT+1(A6)
- BSR HERO_MAIN_SET
- BSR HERO_WEAK_SET
- BSR HERO_HEAD_SET
- BSR HERO_BODY1_SET
- BSR HERO_BODY2_SET
- BSR HERO_ATTACK_SET
- BSR HERO_AREA_SET
- TST.B HOW_TO_FLAG(A5)
- BNE.S HERO_1st_001
- BSR HERO_FACE_SET
- BSR HERO_BALL_SET
- HERO_1st_001:
- MOVE.W #CTRL_STOP,D4
- JSR CTRL_CHANGE(PC)
- MOVE.B #00001111B,D0
- AND.B PHASE+1(A5),D0
- BEQ HERO_1st_1
- MOVE.B #HERO_STOP_STEP,D0
- BCLR.B #BHS_AUTO,HERO_STATE(A6)
- HERO_1st_1:
- MOVE.B D0,STEP1(A6)
- MOVE.W HERO_TYPE(A6),D0
- ADD.W D0,D0
- MOVE.W HERO_MIN_DIST(PC,D0.W),D0
- ADD.W D0,MIN_DISTANCE(A5)
- RTS
- HERO_MIN_DIST:
- DC.W 32,32
- DC.W 32,32,32,32
- DC.W 32,32,32,32
- GAGE_SET:
- BTST.B #6,PHASE+1(A5)
- BNE.S GAGE_COM
- BTST.B #4,PHASE+1(A5)
- BNE.S GAGE_VS
- BTST.B #BPS_COM_FLAG,PLAYER_STATE+PLAYER_OFFSET(A6)
- BEQ.S GAGE_COM
- MOVE.B STORY_LIFE(A5),LIFE_GAGE(A6)
- MOVE.B STORY_SPIRIT(A5),SPIRIT_GAGE(A6)
- RTS
- GAGE_VS:
- MOVE.B #16,LIFE_GAGE(A6)
- MOVE.B #16,SPIRIT_GAGE(A6)
- RTS
- GAGE_COM:
- MOVE.W HERO_TYPE(A6),D0
- ADD.W D0,D0
- MOVE.B GAGE_COMD(PC,D0.W),LIFE_GAGE(A6)
- MOVE.B GAGE_COMD+1(PC,D0.W),SPIRIT_GAGE(A6)
- RTS
- GAGE_COMD:
- DC.B 12,12 H1
- DC.B 12,12 H2
- DC.B 12,13 E1
- DC.B 14,12 E2
- DC.B 13,16 E3
- DC.B 13,14 E4
- DC.B 14,13 E5
- DC.B 14,13 E6
- DC.B 16,13 E7
- DC.B 16,16 E8
- HERO_MAIN_SET:
- MOVEP.W HERO_OBJ_START(A6),D0
- CLR.B D0
- LEA.L 0(A5,D0.W),A0
- MOVE.L #P_HERO*10000H,D2
- MOVE.B #90H,D5 PRIORITY
- JSR.S PWORK_SET
- LEA.L (A0),A4
- MOVE.B WORK_No(A6),MASTER_No(A4)
- MOVE.B WORK_No(A4),WORK_N0(A6)
- MOVE.L X_POSITION(A6),X_POSITION(A4)
- MOVE.L Y_POSITION(A6),Y_POSITION(A4)
- MOVE.L Z_POSITION(A6),Z_POSITION(A4)
- CLR.L VX(A4)
- CLR.L VY(A4)
- CLR.L VZ(A4)
- MOVE.B #0010B,HIT_ACTIVE(A4)
- MOVE.B #0001B,HIT_PASSIVE(A4)
- MOVE.W PLAYER_No+PLAYER_OFFSET(A6),D0
- OR.B D0,ACT_ATTR(A4)
- MOVE.B #3,HIT_TYPE_No(A4)
- RTS
- HERO_WEAK_SET:
- LEA.L 100H(A0),A0
- LEA.L (A0),A1
- MOVE.B WORK_No(A4),MASTER_No(A0)
- MOVE.B WORK_No(A0),WORK_N0(A4)
- MOVE.W #P_HERO_WEAK,TYPE(A0)
- MOVE.B #0010B,HIT_ACTIVE(A0)
- MOVE.B #0001B,HIT_PASSIVE(A0)
- MOVE.B #2,HIT_TYPE_No(A0)
- MOVEQ.L #0,D0
- MOVE.B D0,HIT_FLAG(A0)
- MOVE.L D0,HIT_OFS_X(A0)
- MOVE.L D0,HIT_LEFT(A0)
- MOVE.L D0,HIT_UPPER(A0)
- RTS
- HERO_HEAD_SET:
- LEA.L 100H(A0),A0
- MOVE.B WORK_No(A4),MASTER_No(A0)
- MOVE.B WORK_No(A0),WORK_N1(A4)
- MOVE.W #P_HERO_HEAD,TYPE(A0)
- MOVE.B #0010B,HIT_ACTIVE(A0)
- MOVE.B #0001B,HIT_PASSIVE(A0)
- MOVE.B #1,HIT_TYPE_No(A0)
- MOVEQ.L #0,D0
- MOVE.W D0,ACT_No(A0)
- MOVE.B D0,HIT_FLAG(A0)
- MOVE.L D0,HIT_OFS_X(A0)
- MOVE.L D0,HIT_LEFT(A0)
- MOVE.L D0,HIT_UPPER(A0)
- RTS
- HERO_BODY1_SET:
- LEA.L 100H(A0),A0
- MOVE.B WORK_No(A4),MASTER_No(A0)
- MOVE.B WORK_No(A0),WORK_N2(A4)
- MOVE.W #P_HERO_BODY,TYPE(A0)
- MOVE.B #0010B,HIT_ACTIVE(A0)
- MOVE.B #0001B,HIT_PASSIVE(A0)
- MOVE.B #0,HIT_TYPE_No(A0)
- MOVEQ.L #0,D0
- MOVE.B D0,ACT_TYPE(A0)
- MOVE.B D0,HIT_FLAG(A0)
- MOVE.L D0,HIT_OFS_X(A0)
- MOVE.L D0,HIT_LEFT(A0)
- MOVE.L D0,HIT_UPPER(A0)
- RTS
- HERO_BODY2_SET:
- LEA.L 100H(A0),A0
- MOVE.L #P_HERO_SHADOW*10000H+63H,D2 C_KAGE
- MOVE.B #8FH,D5 PRIORITY
- JSR.S PWORK_SET
- MOVE.B WORK_No(A4),MASTER_No(A0)
- MOVE.B WORK_No(A0),WORK_N3(A4)
- MOVE.B #0010B,HIT_ACTIVE(A0)
- MOVE.B #0001B,HIT_PASSIVE(A0)
- MOVE.B #0,HIT_TYPE_No(A0)
- MOVE.B PLAYER_No+PLAYER_OFFSET+1(A6),ACT_TYPE(A0)
- MOVEQ.L #0,D0
- MOVE.B D0,HIT_FLAG(A0)
- MOVE.L D0,HIT_OFS_X(A0)
- MOVE.L D0,HIT_LEFT(A0)
- MOVE.L D0,HIT_UPPER(A0)
- RTS
- HERO_ATTACK_SET:
- LEA.L 100H(A0),A0
- MOVE.B WORK_No(A4),MASTER_No(A0)
- MOVE.B WORK_No(A0),WORK_N0(A1)
- MOVE.W #P_HERO_ATTACK,TYPE(A0)
- MOVE.B #0001B,HIT_ACTIVE(A0)
- MOVE.B #0010B,HIT_PASSIVE(A0)
- MOVE.B #0,HIT_TYPE_No(A0)
- MOVEQ.L #0,D0
- MOVE.L D0,VX(A0)
- MOVE.L D0,VY(A0)
- MOVE.B D0,HIT_FLAG(A0)
- MOVE.L D0,HIT_OFS_X(A0)
- MOVE.L D0,HIT_LEFT(A0)
- MOVE.L D0,HIT_UPPER(A0)
- MOVE.B D0,LEVEL(A0)
- RTS
- HERO_AREA_SET:
- LEA.L 100H(A0),A0
- MOVE.B WORK_No(A4),MASTER_No(A0)
- MOVE.B WORK_No(A0),WORK_N1(A1)
- MOVE.W #P_HERO_AREA,TYPE(A0)
- MOVEQ.L #0,D0
- MOVE.B D0,HIT_FLAG(A0)
- MOVE.L D0,HIT_OFS_X(A0)
- MOVE.L D0,HIT_LEFT(A0)
- MOVE.L D0,HIT_UPPER(A0)
- RTS
- HERO_FACE_SET:
- LEA.L 100H(A0),A0
- MOVE.B WORK_No(A0),WORK_N1(A6)
- MOVE.L #P_HERO_DISP*10000H+C_PLAY_FACE,D2
- MOVE.B #0E0H,D5
- JSR.S PWORK_SET
- MOVE.W #0C7H,REL_Y(A0)
- MOVE.W #28H,REL_X(A0)
- TST.W PLAYER_No+PLAYER_OFFSET(A6)
- BEQ.S HERO_FACE_SET_1
- MOVE.W #320-28H,REL_X(A0)
- BSET.B #ACTAT_FLIP,ACT_ATTR(A0)
- HERO_FACE_SET_1:
- MOVE.W HERO_TYPE(A6),D0
- SUBQ.B #1,D0
- MOVE.B D0,ACT_COUNT(A0)
- RTS
- HERO_BALL_SET:
- LEA.L 100H(A0),A0
- MOVE.B WORK_No(A0),WORK_N2(A6)
- MOVE.L #P_HERO_DISP*10000H+C_WIN_BALL,D2
- MOVE.B #0E0H,D5
- JSR.S PWORK_SET
- MOVE.W #0BFH,REL_Y(A0)
- RTS
- LM_HERO:
- ; hero move
- ; A4 sub PWORK :WORK_N0
- ; auto send to A4 X,Y,Z_POSITION
- ; VX
- ; move caluculation in PM_HERO and position back
- ; VY,VZ send by command own.(if need. default 0)
- JSR HERO_STATE_DISP(PC)
- MOVE.B WORK_N0(A6),(A5)
- MOVE.W (A5),D0
- LEA.L 0(A5,D0.W),A4
- CLR.L VY(A4)
- CLR.L VZ(A4)
- BSR RENDA_DEC
- BSR ACT_DEAD_CUT
- BSR LOWER_SET
- BSR REV_TRIG_CHECK
- BSR BEFOR_STEP
- BSR ATTACK_DEC
- BSR FALL_CHECK
- BSR DAMAGE_CHECK
- BSR LOCK_CHECK
- JSR SPECIAL_CHECK(PC)
- BCLR.B #BHS_DEFENCE,HERO_STATE(A6)
- MOVEQ.L #0,D0
- MOVE.B STEP1(A6),D0
- ADD.B D0,D0
- ADD.B D0,D0
- MOVE.L LM_HERO_VECTOR(PC,D0.W),A0
- JSR (A0)
- MOVE.L X_POSITION(A6),X_POSITION(A4)
- MOVE.L Y_POSITION(A6),Y_POSITION(A4)
- MOVE.L Z_POSITION(A6),Z_POSITION(A4)
- MOVE.L VX(A6),VX(A4)
- JSR ACT_DATA_MOVE(PC)
- ; JSR BACK_OBJ_JUDGE(PC)
- ; JSR OBJECT_HIT(PC)
- RTS
- LM_HERO_VECTOR:
- DC.L HERO_START start ready wait
- DC.L HERO_WALK front walk
- DC.L HERO_BACK back walk
- DC.L HERO_ATTACK normal attack
- DC.L HERO_JUMP jump
- DC.L HERO_SIT down
- DC.L HERO_DAMAGE1 move bururu
- DC.L HERO_DAMAGE2 non bururu
- DC.L HERO_FALL after jump
- DC.L HERO_CHECK action check
- DC.L HERO_TO_SIT to sit down
- DC.L HERO_UP to up from down
- DC.L HERO_LOCK_OFF lock
- DC.L HERO_LOCK_DEF lock
- DC.L HERO_STOP stop
- DC.L HERO_DAMAGE3 stop bururu
- DC.L HERO_RUN running
- DC.L HERO_RUNB running
- DC.L HERO_NAGERARE nagerare
- DC.L HERO_STARTC start jump
- DC.L HERO_WIN win or los
- DC.L HERO_WIN
- DC.L HERO_RIKI
- DC.L HERO_COM
- DC.L HERO_FURA
- DC.L HERO_RET100
- DC.L HERO_STARTD
- BEFOR_STEP:
- MOVEQ.L #0,D0
- MOVE.B STEP2(A6),D0
- ADD.B D0,D0
- ADD.B D0,D0
- MOVE.L LM2_HERO_VECTOR(PC,D0.W),A0
- JMP (A0)
- LM2_HERO_VECTOR:
- DC.L LM2_HERO0 no
- DC.L LM2_HERO1 no move
- DC.L LM2_HERO2 stop
- DC.L LM2_HERO3 no damage
- DC.L LM2_HERO4 bururu
- DC.L LM2_HERO5 no damage
- ACT_DEAD_CUT:
- MOVE.L ANOTHER_PLAYER(A6),A0
- TST.W HERO_LIFE(A0)
- BNE.S ACT_DEAD_CUT_1
- CLR.B DOWN_DMG(A6)
- TST.B ACT_No(A4)
- BPL.S ACT_DEAD_CUT_1
- BCLR.B #6,ACT_No(A4)
- BEQ.S ACT_DEAD_CUT_1
- MOVE.L CML_STACK(A4),ADRS1(A4)
- ACT_DEAD_CUT_1:
- RTS
- REV_TRIG_CHECK:
- BTST.B #B_C_BUTTON,PLAY_LEVER+1(A6)
- BEQ.S RTC_1
- CLR.B REV_TRIG_OFF(A6)
- RTC_1:
- RTS
- ATTACK_DEC:
- ; TST.B ATTACK_TIMER(A6)
- ; BEQ.S ATTACK_DEC_1
- ;
- ; SUBQ.B #1,ATTACK_TIMER(A6)
- ;ATTACK_DEC_1:
- RTS
- HERO_RET100:
- CLR.L VX(A6)
- CLR.L VZ(A6)
- MOVE.L ANOTHER_PLAYER(A6),A0
- CMP.B #ATTACK_STEP,STEP1(A0)
- BNE RET100_OFF
- CMP.B #1,ACT_TIMER(A4)
- BNE HERO_RET100_END
- MOVE.L ADRS1(A4),A1
- MOVE.W RET100_No(A0),D0
- ADD.W D0,D0
- ADD.W D0,D0
- MOVE.W 0(A1,D0.W),D1
- BTST.B #ACTAT_FLIP,ACT_ATTR(A4)
- BNE.S HERO_RET100_1
- NEG.W D1
- HERO_RET100_1:
- MOVE.W X_POSITION(A6),D2
- SUB.W X_POSITION(A0),D2
- SUB.W D2,D1
- ASR.W #3,D1
- ADD.W D1,X_POSITION(A6)
- MOVE.W 2(A1,D0.W),D1
- MOVE.W Z_POSITION(A6),D2
- SUB.W Z_POSITION(A0),D2
- SUB.W D2,D1
- ASR.W #3,D1
- ADD.W D1,Z_POSITION(A6)
- HERO_RET100_END:
- RTS
- RET100_OFF:
- MOVE.W #6FH*2,D0 100RETU_STOP
- JSR.S SET_SOUND
- MOVE.B #0,DEF_DAMAGE_ACT_TYPE(A6)
- MOVE.B #0,DAMAGE_LEVEL(A6)
- MOVE.B #1,DEF_HIT_TYPE_No(A6)
- MOVE.W #CTRL_DAMAGE,D4
- JMP CTRL_CHANGE(PC)
- HERO_WIN:
- CLR.L VX(A6)
- CLR.L VZ(A6)
- CLR.L VX(A4)
- CLR.L VZ(A4)
- RTS
- HERO_STARTD:
- HERO_COM:
- CLR.L VX(A6)
- TST.B ACT_FLAG(A4)
- BPL.S HERO_COM_3
- MOVE.W #CTRL_STOP,D4
- JSR CTRL_CHANGE(PC)
- HERO_COM_3:
- RTS
- HERO_RIKI:
- CLR.L VX(A6)
- MOVE.B PLAY_LEVER(A6),D0
- AND.B #A_BUTTON+B_BUTTON,D0
- BNE.S HERO_RIKI_1
- HERO_RIKI_0:
- JSR RIKI_SOUND_CUT(PC)
- MOVE.W #CTRL_STOP,D4
- JMP CTRL_CHANGE(PC)
- HERO_RIKI_1:
- ; SUBQ.B #1,RIKI_TIMER(A6)
- ; BCS HERO_RIKI_END
- LEA.L RIKI_RIKI_TIME(PC),A0
- BSR RIKI_UP
- MOVE.W RIKI_MAX(A6),D0
- CMP.W HERO_SPIRIT(A6),D0
- BEQ.S HERO_RIKI_0
- RTS
- RIKI_DEC:
- LEA.L AUTO_RIKI_TIME(PC),A0
- MOVE.W HERO_TYPE(A6),D0
- ADD.W D0,D0
- BTST.B #BPS_COM_FLAG,PLAYER_STATE+PLAYER_OFFSET(A6)
- BNE.S RIKI_DEC_11
- ADDQ.W #1,D0
- RIKI_DEC_11:
- ADD.W D0,D0
- MOVE.W 0(A0,D0.W),D0
- ADD.W D0,D0
- ADD.W D0,D0
- SUB.W D0,HERO_SPIRIT(A6)
- CMP.B #129,HERO_SPIRIT(A6)
- BCS.S RIKI_DEC_2
- MOVE.W #1,HERO_SPIRIT(A6)
- RIKI_DEC_2:
- RTS
- AUTO_RIKI_UP:
- LEA.L AUTO_RIKI_TIME(PC),A0
- RIKI_UP:
- MOVE.W HERO_TYPE(A6),D0
- ADD.W D0,D0
- BTST.B #BPS_COM_FLAG,PLAYER_STATE+PLAYER_OFFSET(A6)
- BNE.S HERO_RIKI_11
- ADDQ.W #1,D0
- HERO_RIKI_11:
- ADD.W D0,D0
- MOVE.W 0(A0,D0.W),D0
- ADD.W HERO_SPIRIT(A6),D0
- CMP.W RIKI_MAX(A6),D0
- BCS.S HERO_RIKI_2
- MOVE.W RIKI_MAX(A6),D0
- HERO_RIKI_2:
- MOVE.W D0,HERO_SPIRIT(A6)
- RTS
- HERO_RIKI_END:
- MOVE.W #CTRL_STOP,D4
- JMP CTRL_CHANGE(PC)
- RIKI_RIKI_TIME:
- DC.W 80H,80H H1
- DC.W 80H,80H H2
- DC.W 80H,70H E1
- DC.W 80H,70H E2
- DC.W 80H,80H E3
- DC.W 60H,90H E4
- DC.W 80H,90H E5
- DC.W 60H,0A0H E6
- DC.W 80H,0C0H E7
- DC.W 80H,100H E8
- AUTO_RIKI_TIME:
- DC.W 4,4 H1
- DC.W 4,4 H2
- DC.W 4,4 E1
- DC.W 4,4 E2
- DC.W 4,4 E3
- DC.W 4,4 E4
- DC.W 4,4 E5
- DC.W 4,5 E6
- DC.W 4,8 E7
- DC.W 4,16 E8
- HERO_START:
- ; start ready wait
- JSR DIR_CHANGE(PC)
- LEA.L WORD_TIMER(A6),A0
- JSR.S SEC_TIME
- BCC HERO_START_1
- MOVE.W #CTRL_STARTC,D4
- JSR CTRL_CHANGE(PC)
- HERO_START_1:
- RTS
- HERO_STARTC:
- CLR.L VX(A6)
- TST.B ACT_FLAG(A4)
- BMI HERO_STARTC_END
- BTST.B #BHS_JUMP,HERO_STATE(A6)
- BEQ.S HERO_STARTC_10
- JSR JUMP_MOVE(PC)
- TST.L D0
- BNE.S HERO_STARTC_1
- BTST.B #5,ACT_FLAG(A4) down stop ?
- BNE.S HERO_STARTC_1
- MOVE.B #1,ACT_DEC(A4)
- HERO_STARTC_1:
- BTST.B #BHS_JUMP,HERO_STATE(A6)
- BNE.S HERO_STARTC_2
- HERO_STARTC_10:
- MOVE.B #1,ACT_DEC(A4)
- HERO_STARTC_2:
- RTS
- HERO_STARTC_END:
- MOVE.W #CTRL_STOP,D4
- JSR CTRL_CHANGE(PC)
- RTS
- HERO_STOP:
- ; stop
- JSR AUTO_RIKI_UP(PC)
- MOVE.W RIKI_MAX(A6),D0
- CMP.W HERO_SPIRIT(A6),D0
- BEQ.S HERO_STOP_2
- MOVE.B PLAY_LEVER(A6),D0
- AND.B #A_BUTTON+B_BUTTON,D0
- BEQ.S HERO_STOP_2
- AND.B #0F0H,PLAY_LEVER(A6)
- AND.B #0F0H,PLAY_LEVER+1(A6)
- AND.B #0F0H,PLAY_LEVER+2(A6)
- ADDQ.B #1,RIKI_TIMER(A6)
- CMP.B #30,RIKI_TIMER(A6)
- BCS.S HERO_STOP_2
- CLR.B RIKI_TIMER(A6)
- MOVE.W RIKI_MAX(A6),D0
- CMP.W HERO_SPIRIT(A6),D0
- BEQ.S HERO_STOP_2
- MOVE.W #CTRL_RIKI,D4
- JMP CTRL_CHANGE(PC)
- HERO_STOP_2:
- JSR DIR_CHANGE(PC)
- HERO_STOP_3:
- JSR RUNNING_CHECK(PC)
- BNE TO_RUNNING
- JSR MOVE_CHANGE(PC)
- BNE HERO_STOP_1
- TST.B BEFOR_PUSH(A6)
- BEQ.S HERO_STOP_301
- SUBQ.B #1,BEFOR_PUSH(A6)
- BRA.S HERO_STOP_1
- HERO_STOP_301:
- JSR WALK_JUDGE(PC)
- CMP.B #HERO_STOP_STEP,STEP1(A6)
- BNE HERO_STOP_MOVE move
- CMP.B #CG_STOP,ACT_GROUP(A6)
- BEQ.S HERO_STOP_1
- BTST.B #6,ACT_FLAG(A4)
- BNE.S HERO_STOP_1
- MOVE.W #CTRL_STOP,D4
- JSR CTRL_CHANGE(PC)
- HERO_STOP_1:
- RTS
- HERO_STOP_MOVE:
- CMP.B #BACK_STEP,STEP1(A6)
- BEQ HERO_BACK_00
- RTS
- HERO_WALK:
- ; front walk
- JSR AUTO_RIKI_UP(PC)
- JSR DIR_CHANGE(PC)
- JSR RUNNING_CHECK(PC)
- BNE TO_RUNNING
- JSR MOVE_CHANGE(PC)
- BNE HERO_WALK_1
- JSR WALK_JUDGE(PC)
- HERO_WALK_1:
- RTS
- HERO_BACK:
- ; back walk or standing gard
- JSR AUTO_RIKI_UP(PC)
- JSR DIR_CHANGE(PC)
- JSR RUNNING_CHECK(PC)
- BNE TO_RUNNING
- JSR MOVE_CHANGE(PC)
- BNE HERO_BACK_4
- JSR WALK_JUDGE(PC)
- HERO_BACK_00:
- CMP.B #BACK_STEP,STEP1(A6)
- BNE HERO_BACK_4
- BSET.B #BHS_DEFENCE,HERO_STATE(A6)
- JSR GARD_JUDGE(PC)
- BEQ HERO_BACK_2
- CLR.L VX(A6)
- CMP.B #CG_WALKG,ACT_GROUP(A6)
- BEQ HERO_BACK_1
- MOVE.W #CTRL_GARD,D4
- JSR CTRL_CHANGE(PC)
- HERO_BACK_1:
- RTS
- HERO_BACK_2:
- CMP.B #CG_WALKB,ACT_GROUP(A6)
- BEQ HERO_BACK_4
- CMP.B #CG_WALKG,ACT_GROUP(A6)
- BNE HERO_BACK_3
- MOVE.B #1,ACT_DEC(A4)
- TST.B ACT_FLAG(A4)
- BMI HERO_BACK_3
- CLR.L VX(A6)
- RTS
- HERO_BACK_3:
- MOVE.W #CTRL_WALK_BACK,D4
- JSR CTRL_CHANGE(PC)
- HERO_BACK_4:
- RTS
- GARD_JUDGE:
- MOVE.L ANOTHER_PLAYER(A6),A0
- TST.B SPECIAL_USE(A0)
- BNE GARD_JUDGE_1
- CMP.B #2,BACK2+STEP1(A5)
- BEQ GARD_JUDGE_1
- MOVEP.W WORK_N0(A0),D0
- CLR.B D0
- BTST.B #4,ACT_FLAG(A5,D0.W)
- GARD_JUDGE_1:
- RTS
- WALK_JUDGE:
- MOVEQ.L #LEFT+RIGHT,D0
- AND.B PLAY_LEVER(A6),D0
- BEQ WALK_JUDGE_2 walk
- BSR WALK_SPEED
- MOVE.L D1,VX(A6)
- CMP.B D3,D0
- BNE WALK_JUDGE_3
- CMP.B #WALK_STEP,STEP1(A6)
- BEQ.S WALK_JUDGE_1
- MOVE.W #CTRL_WALK,D4
- JSR CTRL_CHANGE(PC)
- WALK_JUDGE_1:
- RTS
- WALK_JUDGE_2:
- CLR.L VX(A6)
- MOVE.B #HERO_STOP_STEP,STEP1(A6)
- RTS
- WALK_JUDGE_3:
- CMP.B #BACK_STEP,STEP1(A6)
- BEQ.S WALK_JUDGE_4
- MOVE.B #BACK_STEP,STEP1(A6)
- WALK_JUDGE_4:
- RTS
- WALK_SPEED:
- MOVE.W HERO_TYPE(A6),D1
- ADD.W D1,D1
- ADD.W D1,D1
- ADD.W D1,D1
- BSR FOWARD_JUDGE
- BEQ.S WALK_SPEED_1
- ADDQ.W #4,D1
- WALK_SPEED_1:
- MOVE.L WALK_SPEED_DATA(PC,D1.W),D1
- TST.B D2
- BEQ.S WALK_SPEED_2
- NEG.L D1
- WALK_SPEED_2:
- RTS
- FOWARD_JUDGE:
- MOVEQ.L #1,D2
- AND.B ACT_ATTR(A4),D2
- MOVE.B FOWARD_LEVER(PC,D2.W),D3
- CMP.B D3,D0
- RTS
- FOWARD_LEVER:
- DC.B RIGHT,LEFT
- WALK MACRO SPEED1,SPEED2
- SH SET SPEED1/100
- SL SET SPEED1-SH*100
- DC.W SH,(SL*10000H)/100
- SH SET SPEED2/100
- SL SET SPEED2-SH*100
- DC.W SH,(SL*10000H)/100
- ENDM
- WALK_SPEED_DATA:
- WALK 300,-300 0
- WALK 300,-300 1
- WALK 300,-300 2
- WALK 200,-250 3
- WALK 450,-450 4
- WALK 300,-300 5
- WALK 300,-300 6
- WALK 300,-300 7
- WALK 300,-300 8
- WALK 300,-300 9
- WALK 300,-300 10
- TO_RUNNING:
- MOVE.W #30,RUNNING_TIMER(A6)
- MOVEQ.L #LEFT+RIGHT,D0
- AND.B PLAY_LEVER(A6),D0
- BSR FOWARD_JUDGE
- BNE TO_BACK_RUN
- MOVE.W #CTRL_RUN,D4
- JSR CTRL_CHANGE(PC)
- RTS
- TO_BACK_RUN:
- MOVE.W #CTRL_RUN_BACK,D4
- JSR CTRL_CHANGE(PC)
- RTS
- HERO_RUN:
- ; foward running
- JSR AUTO_RIKI_UP(PC)
- JSR RUN_ATTACK(PC)
- MOVE.B ACT_FLAG(A4),D0
- BMI RUNNING_STOP
- BTST.L #6,D0
- BNE.S HERO_RUN_0
- JSR MOVE_CHANGE(PC)
- BNE HERO_RUN_1
- MOVE.B PLAY_LEVER(A6),D0
- AND.B #00001111B,D0
- BEQ.S HERO_RUN_0
- CMP.B RUNNING_LEVER(A6),D0
- BNE RUNNING_STOP
- HERO_RUN_0:
- BSR RUN_SPEED
- HERO_RUN_1:
- RTS
- RUN_ATTACK:
- MOVEQ.L #CTRL_RUN_PUNCH,D4
- BTST.B #B_A_BUTTON,PLAY_LEVER+1(A6)
- BNE.S RA_ATTACK
- MOVEQ.L #CTRL_RUN_KICK,D4
- BTST.B #B_B_BUTTON,PLAY_LEVER+1(A6)
- BNE.S RA_ATTACK
- RAA_1:
- RTS
- RA_ATTACK:
- JSR CTRL_CHANGE(PC)
- BEQ.S RAA_1
- ADDQ.L #4,SP
- RTS
- HERO_RUNB:
- ; back running
- JSR AUTO_RIKI_UP(PC)
- MOVE.B ACT_FLAG(A4),D0
- BMI RUNNING_STOP
- BTST.L #6,D0
- BNE.S HERO_RUNB_0
- JSR MOVE_CHANGE(PC)
- BNE HERO_RUNB_1
- MOVE.B PLAY_LEVER(A6),D0
- AND.B #00001111B,D0
- BEQ.S HERO_RUNB_0
- CMP.B RUNNING_LEVER(A6),D0
- BNE RUNNING_STOP
- HERO_RUNB_0:
- BSR RUN_SPEED
- HERO_RUNB_1:
- RTS
- RUNNING_STOP:
- MOVE.W #CTRL_STOP,D4
- JSR CTRL_CHANGE(PC)
- RTS
- RUN_SPEED:
- MOVEQ.L #LEFT+RIGHT,D0
- AND.B RUNNING_LEVER(A6),D0
- MOVE.W HERO_TYPE(A6),D1
- ADD.W D1,D1
- ADD.W D1,D1
- ADD.W D1,D1
- BSR FOWARD_JUDGE
- BEQ.S RUN_SPEED_1
- ADDQ.W #4,D1
- RUN_SPEED_1:
- MOVE.L RUN_SPEED_DATA(PC,D1.W),D1
- TST.B D2
- BEQ.S RUN_SPEED_2
- NEG.L D1
- RUN_SPEED_2:
- MOVE.L D1,VX(A6)
- RTS
- RUN_SPEED_DATA:
- WALK 561,-561 0
- WALK 561,-561 1
- WALK 395,-395 1
- WALK 400,-600 2
- WALK 190,-190 3
- WALK 425,-425 4
- WALK 425,-566 5
- WALK 425,-425 6
- WALK 840,-840 7
- WALK 561,-561 8
- HERO_ATTACK:
- ; normal attack
- CLR.L VX(A6)
- JSR RENDA_CHECK(PC)
- BTST.B #BHS_JUMP,HERO_STATE(A6)
- BEQ.S HERO_ATTACK_101
- JSR JUMP_MOVE(PC)
- BTST.B #BHS_JUMP,HERO_STATE(A6)
- BNE.S HERO_ATTACK_1
- BTST.B #3,ACT_FLAG(A4)
- BEQ.S HERO_ATTACK_6
- HERO_ATTACK_101:
- MOVE.B #1,ACT_DEC(A4)
- HERO_ATTACK_1:
- TST.B ACT_FLAG(A4)
- BPL.S HERO_ATTACK_5
- BTST.B #BHS_JUMP,HERO_STATE(A6)
- BNE.S HERO_ATTACK_3
- BTST.B #BHS_DOWN,HERO_STATE(A6)
- BNE.S HERO_ATTACK_4
- HERO_ATTACK_2:
- JSR ATTACK_OFF_LM(PC)
- MOVE.B #ATTACK_TIME1,ATTACK_TIMER(A6)
- MOVE.W #CTRL_STOP,D4
- JSR CTRL_CHANGE(PC)
- MOVE.B #12,BEFOR_PUSH(A6)
- RTS
- HERO_ATTACK_3:
- JSR ATTACK_OFF_LM(PC)
- MOVE.B #ATTACK_TIME1,ATTACK_TIMER(A6)
- MOVE.W #CTRL_FALL,D4
- JSR CTRL_CHANGE(PC)
- RTS
- HERO_ATTACK_4:
- JSR ATTACK_OFF_LM(PC)
- MOVE.B #ATTACK_TIME1,ATTACK_TIMER(A6)
- MOVE.W #CTRL_SIT,D4
- JSR CTRL_CHANGE(PC)
- HERO_ATTACK_5:
- RTS
- HERO_ATTACK_6:
- JSR ATTACK_OFF_LM(PC)
- MOVE.B #ATTACK_TIME1,ATTACK_TIMER(A6)
- MOVE.W #CTRL_LANDING,D4
- JSR CTRL_CHANGE(PC)
- RTS
- RENDA_CHECK:
- BTST.B #RENDA_ON,DEBUG_DIP2(A5)
- BEQ RENDA_CHECK_1
- MOVE.B HERO_STATE(A6),D0
- AND.B #HS_DOWN+HS_JUMP,D0
- BNE RENDA_OFF
- MOVE.W HERO_TYPE(A6),D1
- MOVE.B RENDA_BUTTON(PC,D1.W),D0
- AND.B PLAY_LEVER+1(A6),D0
- BEQ.S RENDA_CHECK_1
- ADD.W D1,D1
- MOVE.W RENDA_ATTACK(PC,D1.W),D4
- CMP.W ACT_CTRL(A6),D4
- BEQ.S RENDA_OFF
- ADD.W #25,RENDA_COUNT(A6)
- CMP.W #60,RENDA_COUNT(A6)
- BCS.S RENDA_CHECK_1
- JSR CTRL_CHANGE(PC)
- ADDQ.L #4,SP
- RENDA_OFF:
- CLR.W RENDA_COUNT(A6)
- RENDA_CHECK_1:
- RTS
- RENDA_DEC:
- BTST.B #RENDA_ON,DEBUG_DIP2(A5)
- BEQ RENDA_DEC_1
- TST.W RENDA_COUNT(A6)
- BEQ.S RENDA_DEC_1
- SUBQ.W #1,RENDA_COUNT(A6)
- RENDA_DEC_1:
- RTS
- RENDA_BUTTON:
- DC.B A_BUTTON,B_BUTTON
- DC.B 0,0
- DC.B A_BUTTON,0
- DC.B 0,0,0,A_BUTTON
- RENDA_ATTACK:
- DC.W 42H,42H,42H,42H,43H,42H
- DC.W 42H,42H,42H,42H
- HERO_JUMP:
- ; jump
- JSR JUMP_MOVE(PC)
- TST.B ACT_FLAG(A4)
- BPL.S HERO_JUMP_2
- MOVE.L D0,-(SP)
- MOVE.W #CTRL_FALL,D4
- JSR CTRL_CHANGE(PC)
- MOVE.L (SP)+,D0
- HERO_JUMP_2:
- TST.L D0
- BNE.S HERO_JUMP_3
- BCLR.B #7,ACT_DEC(A4)
- HERO_JUMP_3:
- BTST.B #BHS_JUMP,HERO_STATE(A6)
- BNE HERO_JUMP_1
- MOVE.W #CTRL_STOP,D4
- JSR CTRL_CHANGE(PC)
- AND.B #00001111B,PLAY_LEVER(A6)
- AND.B #00001111B,PLAY_LEVER+1(A6)
- JSR MOVE_CHANGE(PC)
- RTS
- HERO_JUMP_1:
- MOVE.W PLAY_LEVER(A6),-(SP)
- AND.B #11111100B,PLAY_LEVER(A6)
- AND.B #11111100B,PLAY_LEVER+1(A6)
- JSR MOVE_CHANGE(PC)
- MOVE.W (SP)+,PLAY_LEVER(A6)
- RTS
- HERO_FALL:
- ; after jump
- BTST.B #BHS_JUMP,HERO_STATE(A6)
- BEQ HERO_FALL_4
- JSR JUMP_MOVE(PC)
- BTST.B #BHS_JUMP,HERO_STATE(A6)
- BNE HERO_FALL_1
- CLR.B BEFORE_LEVER+PLAYER_OFFSET(A6)
- BCLR.B #7,ACT_DEC(A4)
- HERO_FALL_1:
- MOVE.W PLAY_LEVER(A6),-(SP)
- AND.B #11111100B,PLAY_LEVER(A6)
- AND.B #11111100B,PLAY_LEVER+1(A6)
- JSR MOVE_CHANGE(PC)
- MOVE.W (SP)+,PLAY_LEVER(A6)
- RTS
- HERO_FALL_4:
- TST.B ACT_FLAG(A4)
- BPL.S HERO_FALL_5
- BCLR.B #BHS_AUTO,HERO_STATE(A6)
- MOVE.W #CTRL_STOP,D4
- BTST.B #B_DOWN,PLAY_LEVER(A6)
- BEQ.S HERO_FALL_41
- MOVE.W #CTRL_SIT,D4
- HERO_FALL_41:
- JSR CTRL_CHANGE(PC)
- AND.B #00001101B,PLAY_LEVER(A6)
- AND.B #00001101B,PLAY_LEVER+1(A6)
- JSR MOVE_CHANGE(PC)
- RTS
- HERO_FALL_5:
- BCLR.B #7,ACT_DEC(A4)
- RTS
- HERO_TO_SIT:
- ; to sit down
- JSR AUTO_RIKI_UP(PC)
- CLR.L VX(A6)
- TST.B ACT_FLAG(A4)
- BPL.S HERO_TO_SIT_1
- MOVE.W #CTRL_SIT,D4
- JSR CTRL_CHANGE(PC)
- HERO_TO_SIT_1:
- AND.B #11111100B,PLAY_LEVER(A6)
- AND.B #11111100B,PLAY_LEVER+1(A6)
- JSR MOVE_CHANGE(PC)
- RTS
- HERO_UP:
- ; to up from down
- JSR AUTO_RIKI_UP(PC)
- CLR.L VX(A6)
- TST.B ACT_FLAG(A4)
- BPL.S HERO_UP_1
- BCLR.B #BHS_DOWN,HERO_STATE(A6)
- MOVE.W PLAYER_No+PLAYER_OFFSET(A6),D0
- BCLR.B D0,BACK2+MOVE_DIR(A5)
- MOVE.W #CTRL_STOP,D4
- JSR CTRL_CHANGE(PC)
- RTS
- HERO_UP_1:
- AND.B #11111100B,PLAY_LEVER(A6)
- AND.B #11111100B,PLAY_LEVER+1(A6)
- JSR MOVE_CHANGE(PC)
- RTS
- HERO_SIT:
- ; sit down
- JSR AUTO_RIKI_UP(PC)
- JSR DIR_CHANGE(PC)
- MOVE.W #CTRL_SIT,ACT_CTRL(A6)
- CLR.L VX(A6)
- BTST.B #B_DOWN,PLAY_LEVER(A6)
- BNE.S HERO_SIT_1
- MOVE.W #CTRL_TO_UP,D4
- JSR CTRL_CHANGE(PC)
- RTS
- HERO_SIT_1:
- AND.B #11111100B,PLAY_LEVER(A6)
- AND.B #11111100B,PLAY_LEVER+1(A6)
- JSR MOVE_CHANGE(PC)
- BNE HERO_SIT_5 action changed
- MOVEQ.L #1,D0
- AND.B ACT_ATTR(A4),D0
- MOVE.B DOWN_DEF_LEV(PC,D0.W),D0
- AND.B PLAY_LEVER(A6),D0
- BNE.S HERO_SIT_4
- HERO_SIT_2:
- CMP.B #CG_SIT,ACT_GROUP(A6)
- BEQ HERO_SIT_3
- MOVE.B #1,ACT_DEC(A4)
- TST.B ACT_FLAG(A4)
- BPL.S HERO_SIT_3
- MOVE.W #CTRL_SIT,D4
- JSR CTRL_CHANGE(PC)
- HERO_SIT_3:
- RTS
- HERO_SIT_4:
- MOVE.W #CTRL_SIT_GARD,ACT_CTRL(A6)
- BSET.B #BHS_DEFENCE,HERO_STATE(A6)
- JSR GARD_JUDGE(PC)
- BEQ HERO_SIT_6
- CMP.B #CG_SITG,ACT_GROUP(A6)
- BEQ.S HERO_SIT_5
- MOVE.W #CTRL_SIT_GARD,D4
- JSR CTRL_CHANGE(PC)
- HERO_SIT_5:
- RTS
- HERO_SIT_6:
- ; JSR RIKI_DEC(PC)
- JMP HERO_SIT_2(PC)
- DOWN_DEF_LEV:
- DC.B LEFT,RIGHT
- HERO_LOCK_DEF:
- ; lock
- CLR.L VX(A6)
- SUBQ.B #1,LOCK_TIMER(A6)
- BNE HERO_LOCK_DEF_1
- BCLR.B #BHSS_LOCK_DEF,STATE(A6)
- MOVE.B #HERO_STOP_STEP,STEP1(A6)
- HERO_LOCK_DEF_1:
- RTS
- HERO_LOCK_OFF:
- ; lock
- CLR.L VX(A6)
- SUBQ.B #1,LOCK_TIMER(A6)
- BNE HERO_LOCK_OFF_1
- BCLR.B #BHSS_LOCK_OFF,STATE(A6)
- MOVE.B #HERO_STOP_STEP,STEP1(A6)
- HERO_LOCK_OFF_1:
- RTS
- HERO_NAGERARE:
- BCLR.B #BHS_DAMAGE,HERO_STATE(A6)
- BTST.B #BHS_JUMP,HERO_STATE(A6)
- BEQ.S HERO_NAGERARE_1
- BCLR.B #BHSS_NAGERARE,STATE(A6)
- MOVE.B #DAMAGE2_STEP,STEP1(A6)
- HERO_NAGERARE_1:
- RTS
- HERO_DAMAGE3:
- CLR.L VX(A6)
- TST.B ADC_COMMAND(A6)
- BEQ HERO_DAM_END_1
- MOVE.B ADC_VZ(A6),D0
- CMP.B ACT_TIMER(A4),D0
- BNE.S HERO_DAMAGE3_1
- MOVE.B #11000000B,ADC_COMMAND(A6)
- CLR.W ADC_VZ(A6)
- HERO_DAMAGE3_1:
- RTS
- HERO_DAMAGE1:
- ; move bururu
- TST.B ACT_FLAG(A4)
- BMI HERO_DAM_END
- EOR.W #2,DISP_X(A4)
- MOVEQ.L #0,D0
- BTST.B #6,ACT_FLAG(A4)
- BNE.S HERO_DAM1_1
- MOVEQ.L #1,D0
- BTST.B #ACTAT_FLIP,ACT_ATTR(A4)
- BNE.S HERO_DAM1_1
- MOVEQ.L #-1,D0
- HERO_DAM1_1:
- MOVE.W D0,VX(A6)
- RTS
- HERO_DAMAGE2:
- ; non bururu
- CLR.L VX(A6)
- TST.B ACT_FLAG(A4)
- BMI HERO_DAM_END
- BTST.B #BHS_JUMP,HERO_STATE(A6)
- BEQ.S HERO_DAM2_10
- JSR JUMP_MOVE(PC)
- TST.L D0
- BNE.S HERO_DAM2_1
- BSET.B #BHS_DAMAGE,HERO_STATE(A6)
- OR.B #81H,HIT_OFF(A6)
- BTST.B #5,ACT_FLAG(A4) down stop ?
- BNE.S HERO_DAM2_1
- MOVE.B #1,ACT_DEC(A4)
- HERO_DAM2_1:
- BTST.B #BHS_JUMP,HERO_STATE(A6)
- BNE.S HERO_DAM2_2
- TST.B SLOW_CUT(A5)
- BEQ.S HERO_DAM2_10
- MOVE.B #10000011B,SLOW_CUT(A5)
- HERO_DAM2_10:
- MOVE.B #1,ACT_DEC(A4)
- HERO_DAM2_2:
- RTS
- HERO_DAM_END:
- CLR.W DISP_X(A4)
- TST.W HERO_LIFE(A6)
- BNE.S HERO_DAM_END_1
- ; MOVE.L ANOTHER_PLAYER+PLAYER_OFFSET(A6),A0
- ; MOVE.L A0,WIN_PLAYER(A5)
- RTS
- HERO_DAM_END_1:
- CLR.B NON_ADC(A6)
- TST.B DOWN_DMG(A6)
- BMI.S HERO_DAM_END_101
- BEQ HERO_DAM_END_9
- JSR TO_FURA(PC)
- HERO_DAM_END_101:
- CLR.B DOWN_DMG(A6)
- MOVE.B #NO_DAMAGE_STEP3,STEP2(A6)
- MOVE.B #6,BYTE_TIMER(A6)
- BRA HERO_DAM_END_8
- HERO_DAM_END_9:
- AND.B #7EH,HIT_OFF(A6)
- HERO_DAM_END_8:
- BCLR.B #BHS_DAMAGE,HERO_STATE(A6)
- BTST.B #BHS_DOWN,HERO_STATE(A6)
- BNE.S HERO_DAM_END_2
- BTST.B #B_DOWN,PLAY_LEVER(A6)
- BNE.S HERO_DAM_END_2
- HERO_FURA_END:
- MOVE.W #CTRL_STOP,D4
- JSR CTRL_CHANGE(PC)
- JMP HERO_STOP(PC)
- HERO_DAM_END_2:
- MOVE.W #CTRL_SIT,D4
- JSR CTRL_CHANGE(PC)
- JMP HERO_SIT(PC)
- TO_FURA:
- MOVEQ.L #0,D1
- CMP.W #16,HERO_LIFE(A6)
- BCS.S TO_FURA_2
- CMP.W #64,HERO_LIFE(A6)
- BCS.S TO_FURA_1
- MOVEQ.L #1,D1
- TO_FURA_1:
- BTST.B D1,FURA_COUNT(A6)
- BEQ.S TO_FURA_2
- JSR.S RAND8
- BTST.B #6,PHASE+1(A5)
- BNE.S TO_FURA_2
- CMP.B #40H,D0
- BCS.S TO_FURA_3
- TO_FURA_2:
- RTS
- TO_FURA_3:
- ADDQ.L #4,SP
- CLR.B DOWN_DMG(A6)
- BCLR.B D1,FURA_COUNT(A6)
- AND.B #7EH,HIT_OFF(A6)
- BCLR.B #BHS_DAMAGE,HERO_STATE(A6)
- MOVE.W #CTRL_FURA,D4
- JMP CTRL_CHANGE(PC)
- HERO_FURA:
- CLR.L VX(A6)
- TST.B STAGE_TIME(A5)
- BEQ HERO_FURA_END
- SUBQ.W #1,FURA_TIMER(A6)
- BEQ HERO_FURA_END
- BTST.B #BPS_COM_FLAG,PLAYER_STATE+PLAYER_OFFSET(A6)
- BEQ.S HERO_FURA_1
- MOVE.B PLAY_LEVER+1(A6),D0
- ; AND.B #00001111B,D0
- BEQ.S HERO_FURA_1
- SUBQ.B #1,FURA_LEVER(A6)
- BEQ HERO_FURA_END
- HERO_FURA_1:
- RTS
- HERO_CHECK:
- ; action check mode
- RTS
- LM2_HERO0:
- RTS
- LM2_HERO1:
- ; no move
- BSET.B #BHF_NON_ACT,FLAG(A6)
- CLR.L VX(A6)
- CLR.L VX(A4)
- ADDQ.W #4,SP
- RTS
- LM2_HERO2:
- ; stop
- CLR.L VX(A4)
- CLR.L VX(A6)
- BTST.B #BHS_DAMAGE,HERO_STATE(A6)
- BNE LM_HERO2_2
- BTST.B #BHF_DAMAGE,FLAG(A6)
- BEQ LM_HERO2_2
- MOVE.B #0,STEP2(A6)
- BCLR.B #BHF_NON_ACT,FLAG(A6)
- CLR.B BYTE_TIMER(A6)
- BSR DAMAGE_CHECK
- RTS
- LM_HERO2_2:
- BSET.B #BHF_NON_ACT,FLAG(A6)
- ADDQ.W #4,SP
- SUBQ.B #1,BYTE_TIMER(A6)
- BNE.S LM2_HERO2_1
- SUBQ.W #4,SP
- MOVE.B #0,STEP2(A6)
- BCLR.B #BHF_NON_ACT,FLAG(A6)
- LM2_HERO2_1:
- RTS
- LM2_HERO3:
- ; no damage
- SUBQ.B #1,BYTE_TIMER(A6)
- BNE.S LM2_HERO3_1
- ; CMP.B #NO_DAMAGE_STEP2,STEP2(A6)
- ; BNE.S LM2_HERO3_1
- MOVE.B #0,STEP2(A6)
- DAMAGE_STEP_OFF:
- AND.B #7EH,HIT_OFF(A6)
- LM2_HERO3_1:
- RTS
- LM2_HERO4:
- ; bururu
- CLR.L VX(A4)
- CLR.L VX(A6)
- BSET.B #BHF_NON_ACT,FLAG(A6)
- ADDQ.W #4,SP
- EOR.W #2,DISP_X(A4)
- SUBQ.B #1,BYTE_TIMER(A6)
- BNE.S LM2_HERO4_1
- BCLR.B #BHF_NON_ACT,FLAG(A6)
- MOVE.W #0,DISP_X(A4)
- MOVE.B #0,STEP2(A6)
- SUBQ.W #4,SP
- MOVE.L ANOTHER_PLAYER(A6),A0
- CMP.B #NO_MOVE_STEP2,STEP2(A0)
- BNE.S LM2_HERO4_1
- MOVE.B #0,STEP2(A0)
- LM2_HERO4_1:
- RTS
- LM2_HERO5:
- SUBQ.B #1,BYTE_TIMER(A6)
- BNE.S LM2_HERO5_1
- AND.B #7EH,HIT_OFF(A6)
- MOVE.B #0,STEP2(A6)
- LM2_HERO5_1:
- RTS
- JUMP_MOVE:
- Z_MINIMUM EQU 30000H
- CLR.L VX(A6)
- MOVEQ.L #1,D0
- TST.W Z_POSITION(A6)
- ; TST.W HERO_LOWER(A6)
- BGE.S JUMP_MOVE_1
- CLR.L Z_POSITION(A6)
- CLR.L VX(A6)
- CLR.L VZ(A6)
- CLR.L VZ(A4)
- CLR.W JUMP_VX(A6)
- CLR.W JUMP_AX(A6)
- BCLR.B #BHS_JUMP,HERO_STATE(A6)
- BCLR.B #BHF_NO_DIR_CHG,FLAG(A6)
- RTS
- JUMP_MOVE_1:
- BTST.B #6,ACT_FLAG(A4)
- BNE.S JUMP_MOVE_4
- BCLR.B #BHF_NO_BJUDGE,FLAG(A6)
- MOVE.W JUMP_VX(A6),D0
- MOVE.W D0,D1
- SUB.W JUMP_AX(A6),D0
- EOR.W D0,D1
- BPL.S JUMP_MOVE_11
- MOVE.W JUMP_VX(A6),D0
- JUMP_MOVE_11:
- MOVE.W D0,JUMP_VX(A6)
- EXT.L D0
- LSL.L #8,D0
- MOVE.L D0,VX(A6)
- MOVE.W AZ(A6),D0
- EXT.L D0
- LSL.L #8,D0
- ADD.L VZ(A6),D0
- MOVE.L D0,VZ(A6)
- MOVE.L D0,D1
- BPL.S JUMP_MOVE_2
- NEG.L D1
- JUMP_MOVE_2:
- CMP.L #Z_MINIMUM,D1
- BCC.S JUMP_MOVE_3
- MOVEQ.L #0,D0
- JUMP_MOVE_3:
- MOVE.L D0,VZ(A4)
- RTS
- JUMP_MOVE_4:
- BSET.B #BHF_NO_BJUDGE,FLAG(A6)
- RTS
- ADC_SET:
- MOVEP.W MASTER_No(A6),D0
- CLR.B D0
- LEA.L -LOG(A5,D0.W),A4
- MOVE.W ACT_No(A6),ADC_ACT_No(A4)
- MOVE.B ACT_COUNT(A6),ADC_ACT_COUNT(A4)
- MOVE.W (A0)+,D0
- MOVE.B D0,ADC_COMMAND(A4)
- MOVE.L (A0)+,ADC_VX(A4)
- RTS
- ACT_DATA_MOVE:
- ; action data command move
- ; ADC_COMMAND d7 bururu
- ; d6 x move
- ; d5 z move
- ; d4 x move (last time only)
- ; d3 z move (last time only)
- ; d2 x move from another hero (last time only)
- ; d1 z move from another hero (last time only)
- ; d0 action inner loop
- TST.B NON_ADC(A6)
- BEQ.S ADM_00
- AND.B #10011111B,ADC_COMMAND(A6)
- ADM_00:
- MOVE.B ADC_COMMAND(A6),D4
- BEQ.S ADC_OFF_1
- MOVE.W ACT_No(A4),D0
- CMP.W ADC_ACT_No(A6),D0
- BNE.S ADC_OFF
- MOVE.B ACT_COUNT(A4),D0
- CMP.B ADC_ACT_COUNT(A6),D0
- BEQ.S ADM_1
- ADC_OFF:
- CLR.B ADC_COMMAND(A6)
- CLR.W DISP_X(A4)
- ADC_OFF_1:
- RTS
- ADM_1:
- ADD.B D4,D4
- BCC.S ADM_2
- BSR ADC_BURURU
- ADM_2:
- ADD.B D4,D4
- BCC.S ADM_3
- BSR ADC_X_MOVE_1
- ADM_3:
- ADD.B D4,D4
- BCC.S ADM_4
- BSR ADC_Z_MOVE_1
- ADM_4:
- ADD.B D4,D4
- BCC.S ADM_5
- BSR ADC_X_MOVE
- ADM_5:
- ADD.B D4,D4
- BCC.S ADM_6
- BSR ADC_Z_MOVE
- ADM_6:
- ADD.B D4,D4
- BCC.S ADM_7
- BSR ADC_X_OFS
- ADM_7:
- ADD.B D4,D4
- BCC.S ADM_8
- BSR ADC_Z_OFS
- ADM_8:
- ADD.B D4,D4
- BCC.S ADM_9
- BSR ADC_LOOP
- ADM_9:
- RTS
- ADC_BURURU:
- CLR.L VX(A4)
- CLR.L VZ(A4)
- EOR.W #2,DISP_X(A4)
- RTS
- ADC_X_MOVE:
- MOVE.B ACT_DEC(A4),D0
- BLE.S ADC_X_MOVE_3
- MOVE.B ACT_TIMER(A4),D1
- SUB.B D0,D1
- BGT.S ADC_X_MOVE_3
- ADC_X_MOVE_1:
- BTST.B #BHF_NON_ACT,FLAG(A6)
- BNE.S ADC_X_MOVE_3
- MOVE.W ADC_VX(A6),D0
- BTST.B #0,ACT_ATTR(A4)
- BEQ.S ADC_X_MOVE_2
- NEG.W D0
- ADC_X_MOVE_2:
- EXT.L D0
- LSL.L #8,D0
- ADD.L D0,VX(A4)
- ADC_X_MOVE_3:
- RTS
- ADC_Z_MOVE:
- MOVE.B ACT_DEC(A4),D0
- BLE.S ADC_Z_MOVE_3
- MOVE.B ACT_TIMER(A4),D1
- SUB.B D0,D1
- BGT.S ADC_Z_MOVE_3
- ADC_Z_MOVE_1:
- BTST.B #BHF_NON_ACT,FLAG(A6)
- BNE.S ADC_Z_MOVE_3
- MOVE.W ADC_VZ(A6),D0
- EXT.L D0
- LSL.L #8,D0
- ADD.L D0,VZ(A4)
- ADC_Z_MOVE_3:
- RTS
- ADC_X_OFS:
- MOVE.B ACT_DEC(A4),D0
- BLE.S ADC_X_OFS_3
- MOVE.B ACT_TIMER(A4),D1
- SUB.B D0,D1
- BGT.S ADC_X_OFS_3
- ADC_X_OFS_1:
- BTST.B #BHF_NON_ACT,FLAG(A6)
- BNE.S ADC_X_OFS_3
- MOVEQ.L #0,D0
- MOVE.W ADC_VX(A6),D0
- BTST.B #0,ACT_ATTR(A4)
- BEQ.S ADC_X_OFS_2
- NEG.W D0
- ADC_X_OFS_2:
- MOVE.L ANOTHER_PLAYER(A6),A0
- ADD.W X_POSITION(A0),D0
- SUB.W X_POSITION(A6),D0
- SWAP D0
- MOVE.L D0,VX(A4)
- ADC_X_OFS_3:
- RTS
- ADC_Z_OFS:
- MOVE.B ACT_DEC(A4),D0
- BLE.S ADC_Z_OFS_3
- MOVE.B ACT_TIMER(A4),D1
- SUB.B D0,D1
- BGT.S ADC_Z_OFS_3
- ADC_Z_OFS_1:
- BTST.B #BHF_NON_ACT,FLAG(A6)
- BNE.S ADC_Z_OFS_3
- MOVEQ.L #0,D0
- MOVE.W ADC_VZ(A6),D0
- MOVE.L ANOTHER_PLAYER(A6),A0
- ADD.W Z_POSITION(A0),D0
- SUB.W Z_POSITION(A6),D0
- SWAP D0
- MOVE.L D0,VZ(A4)
- ADC_Z_OFS_3:
- RTS
- ADC_LOOP:
- MOVE.B ACT_DEC(A4),D0
- BLE.S ADC_LOOP_3
- MOVE.B ACT_TIMER(A4),D1
- SUB.B D0,D1
- BGT.S ADC_LOOP_3
- BTST.B #BHF_NON_ACT,FLAG(A6)
- BNE.S ADC_LOOP_3
- MOVE.W ADC_VX(A6),D0
- SUBQ.W #2,D0
- MOVE.B D0,ACT_COUNT(A4)
- ADC_LOOP_3:
- RTS
- RUNNING_CHECK:
- MOVEQ.L #0,D0
- MOVE.B RUNNING_CT(A6),D0
- ADD.W D0,D0
- ADD.W D0,D0
- JMP RUNNING_VECTOR(PC,D0.W)
- RUNNING_VECTOR:
- JMP RUN_CT0(PC)
- JMP RUN_CT1(PC)
- JMP RUN_CT2(PC)
- JMP RUN_CT3(PC)
- RUN_CT0:
- TST.B PLAY_LEVER(A6)
- BNE.S RUN_CT0_1
- MOVE.B #1,RUNNING_CT(A6)
- RUN_CT0_1:
- MOVEQ.L #0,D0
- RTS
- RUN_CT1:
- MOVE.B PLAY_LEVER(A6),D0
- BEQ RUN_CT1_1
- CMP.B #LEFT,D0
- BEQ.S RUN_CT1_0
- CMP.B #RIGHT,D0
- BEQ.S RUN_CT1_0
- MOVE.B #0,RUNNING_CT(A6)
- MOVEQ.L #0,D0
- RTS
- RUN_CT1_0:
- MOVE.B #2,RUNNING_CT(A6)
- MOVE.B D0,RUNNING_LEVER(A6)
- MOVE.W #16,RUNNING_TIMER(A6)
- RUN_CT1_1:
- MOVEQ.L #0,D0
- RTS
- RUN_CT2:
- MOVE.B PLAY_LEVER(A6),D0
- BEQ.S RUN_CT2_3
- CMP.B RUNNING_LEVER(A6),D0
- BNE.S RUN_CT2_1
- SUBQ.W #1,RUNNING_TIMER(A6)
- BPL.S RUN_CT2_4
- RUN_CT2_1:
- MOVE.B #0,RUNNING_CT(A6)
- MOVEQ.L #0,D0
- RTS
- RUN_CT2_3:
- MOVE.B #3,RUNNING_CT(A6)
- MOVE.W #16,RUNNING_TIMER(A6)
- RUN_CT2_4:
- MOVEQ.L #0,D0
- RTS
- RUN_CT3:
- MOVE.B PLAY_LEVER(A6),D0
- BEQ.S RUN_CT3_0
- CMP.B RUNNING_LEVER(A6),D0
- BNE.S RUN_CT3_1
- MOVE.B #0,RUNNING_CT(A6)
- MOVEQ.L #1,D0
- RTS
- RUN_CT3_0:
- SUBQ.W #1,RUNNING_TIMER(A6)
- BPL.S RUN_CT3_4
- RUN_CT3_1:
- MOVE.B #0,RUNNING_CT(A6)
- RUN_CT3_4:
- MOVEQ.L #0,D0
- RTS
- DIR_CHANGE:
- MOVE.L ANOTHER_PLAYER(A6),A0
- MOVE.L X_POSITION(A6),D0
- CMP.L X_POSITION(A0),D0
- BCS.S DIR_CHANGE_1
- BSET.B #ACTAT_FLIP,ACT_ATTR(A4)
- RTS
- DIR_CHANGE_1:
- BCLR.B #ACTAT_FLIP,ACT_ATTR(A4)
- RTS
- DAMAGE_CHECK:
- BCLR.B #BHF_DAMAGE,FLAG(A6)
- BEQ DAMAGE_CHECK_2
- CMP.W #2EH,ACT_CTRL(A6)
- BEQ DAMAGE_CHECK_2
- BTST.B #BHS_DAMAGE,HERO_STATE(A6)
- BNE DAMAGE_CHECK_2
- BSR DAMAGE_NEXT
- AND.W #3FFFH,ACT_No(A4)
- TST.B STAGE_TIME(A5)
- BNE.S DMC_0000
- CLR.B DAMAGE_LEVEL(A6)
- DMC_0000:
- MOVEQ.L #0,D0
- MOVE.B DAMAGE_LEVEL(A6),D0
- SUB.W D0,HERO_LIFE(A6)
- BGT DAMAGE_CHECK_1
- MOVEQ.L #0,D0
- MOVE.B DEMO_FLAG(A5),D0
- MOVE.W D0,HERO_LIFE(A6)
- BNE.S DAMAGE_CHECK_1
- BTST.B #5,DEBUG_DIP1(A5)
- BEQ.S DAMAGE_DEAD_00
- MOVE.W #1,HERO_LIFE(A6)
- BRA.S DAMAGE_CHECK_1
- DAMAGE_DEAD_00:
- BTST.B #BHSS_NAGERARE,STATE(A6)
- BNE ALL_DEAD_SOUND NAGE_DEAD
- JSR DIR_CHANGE(PC)
- MOVE.W #CTRL_DEAD,D4
- JMP CTRL_CHANGE(PC)
- DAMAGE_CHECK_1:
- BTST.B #BHSS_NAGERARE,STATE(A6)
- BNE DAMAGE_CHECK_2
- JSR DIR_CHANGE(PC)
- MOVE.W #CTRL_DAMAGE,D4
- JMP CTRL_CHANGE(PC)
- DAMAGE_CHECK_2:
- RTS
- DAMAGE_NEXT:
- MOVE.L ANOTHER_PLAYER(A6),A0
- TST.B DAMAGE_LOCK(A0)
- BMI DAMAGE_100RET
- BNE DAMAGE_CHECK_LOCK
- MOVE.B DEF_HIT_STOP(A6),BYTE_TIMER(A0)
- BEQ.S DAMAGE_CHECK_0
- ADDQ.B #4,BYTE_TIMER(A0)
- MOVE.B #STOP_STEP2,STEP2(A0)
- DAMAGE_CHECK_0:
- BSR GET_DAMAGE_LEVEL
- BSR SCORE_UP
- JSR STAR_MAKE(PC)
- JSR ATTACK_OFF_LM(PC)
- MOVE.L ANOTHER_PLAYER(A6),A0
- CLR.B ACT_FLAG(A4)
- CLR.L VX(A6)
- BSET.B #BHS_DAMAGE,HERO_STATE(A6)
- OR.B #81H,HIT_OFF(A6)
- RTS
- DAMAGE_CHECK_LOCK:
- BSR GET_DAMAGE_LEVEL
- BSR SCORE_UP
- JSR STAR_MAKE(PC)
- JSR ATTACK_OFF_LM(PC)
- MOVE.L ANOTHER_PLAYER(A6),A0
- CLR.B ACT_FLAG(A4)
- CLR.L VX(A6)
- ; BSET.B #BHS_DAMAGE,HERO_STATE(A6)
- ; OR.B #81H,HIT_OFF(A6)
- RTS
- DAMAGE_100RET:
- BSR GET_DAMAGE_LEVEL
- JSR STAR_MAKE(PC)
- JSR ATTACK_OFF_LM(PC)
- MOVE.L ANOTHER_PLAYER(A6),A0
- CLR.B ACT_FLAG(A4)
- CLR.L VX(A6)
- ; BSET.B #BHS_DAMAGE,HERO_STATE(A6)
- ; OR.B #81H,HIT_OFF(A6)
- CLR.B DAMAGE_LEVEL(A6)
- RTS
- XDEF GET_DAMAGE_LEVEL
- GET_DAMAGE_LEVEL:
- MOVE.L ANOTHER_PLAYER(A6),A0
- MOVE.B DAMAGE_LEVEL(A6),D0
- MOVEQ.L #0FH,D1
- AND.B DEF_HIT_TYPE_No(A6),D1
- CMP.B #3,D1 gard ?
- BNE.S GDL_1
- BSR GDL_1
- MOVE.B D0,DAMAGE_LEVEL2(A6)
- MOVE.B DEF_GARD_LEVEL(A6),D0
- GDL_1:
- TST.B D0
- BEQ GDL_4
- MOVE.W HERO_TYPE(A6),D1
- ADD.W D1,D1
- ADD.W D1,D1
- ADD.W HERO_TYPE(A6),D1 *5
- BTST.B #4,PHASE+1(A5)
- BNE.S GDL_3
- MOVE.W LEVEL_TEMP(A5),D2
- LSR.W #1,D2
- ADD.W D2,D1
- ADDQ.W #1,D1
- GDL_3:
- ADD.W D1,D1
- ADD.W D1,D1
- MOVE.W HERO_LIFE(A6),D2
- TST.B D2
- BPL.S GDL_301
- MOVEQ.L #127,D2
- GDL_301:
- LSR.W #5,D2
- ADD.W D2,D1
- MOVEQ.L #0,D2
- MOVE.B DEFENCE_POINT(PC,D1.W),D2
- BEQ.S GDL_4
- AND.W #0FFH,D0
- MULU D2,D0
- LSR.W #8,D0
- GDL_4:
- BCLR.B #0,WEAK_HIT(A6)
- BEQ.S GDL_2
- ADD.B COUNTER_LEVEL(A6),D0
- GDL_2:
- MOVE.B D0,DAMAGE_LEVEL(A6)
- RTS
- DP MACRO L1,L2,L3,L4
- DC.B (L4*256)/100
- DC.B (L3*256)/100
- DC.B (L2*256)/100
- DC.B (L1*256)/100
- ENDM
- DEFENCE_POINT:
- ;H1
- DP 80,75,65,50 vs
- DP 80,75,65,50
- DP 80,75,65,50
- DP 80,75,65,50
- DP 80,75,65,50
- ;H2
- DP 80,75,65,50 vs
- DP 80,75,65,50
- DP 80,75,65,50
- DP 80,75,65,50
- DP 80,75,65,50
- ;E1
- DP 80,75,65,50 vs
- DP 90,85,75,60
- DP 80,75,65,50
- DP 75,70,60,45
- DP 70,65,55,40
- ;E2
- DP 70,65,55,40
- DP 80,75,65,50
- DP 70,65,55,40
- DP 65,60,50,35
- DP 60,55,45,30
- ;E3
- DP 90,85,75,60 vs
- DP 00,95,85,70
- DP 90,85,75,60
- DP 85,80,70,55
- DP 80,75,65,50
- ;E4
- DP 80,75,65,50
- DP 90,85,75,60
- DP 80,75,65,50
- DP 75,70,60,45
- DP 70,65,55,40
- ; DP 90,85,75,60 vs
- ; DP 00,95,85,70
- ; DP 90,85,75,60
- ; DP 80,75,65,50
- ; DP 70,65,55,40
- ;E5
- DP 70,65,55,40 vs
- DP 80,75,65,50
- DP 70,65,55,40
- DP 65,60,50,35
- DP 60,55,45,30
- ;E6
- DP 75,70,60,45 vs
- DP 85,80,70,55
- DP 75,70,60,45
- DP 70,65,55,40
- DP 65,60,50,35
- ;E7
- DP 70,65,55,40 vs
- DP 80,75,65,50
- DP 70,65,55,40
- DP 75,60,50,35
- DP 60,55,45,30
- ;E8
- DP 85,75,60,45 vs
- DP 85,75,60,45
- DP 75,65,50,35
- DP 70,60,45,30
- DP 65,55,40,25
- SCORE_UP:
- BTST.B #4,PHASE+1(A5)
- BNE SCORE_UP_END
- TST.B HOW_TO_FLAG(A5)
- BNE SCORE_UP_END
- MOVEM.L A0-A1,-(SP)
- CLR.L REG_D0(A5)
- MOVEQ.L #7CH,D1
- AND.B DAMAGE_LEVEL(A6),D1
- LSR.B #1,D1
- MOVE.W DAMAGE_POINT(PC,D1.W),REG_D0+2(A5)
- LEA.L HERO_SCORE+4(A0),A0
- LEA.L REG_D0+4(A5),A1
- SUB.W D1,D1
- ABCD.B -(A1),-(A0)
- ABCD.B -(A1),-(A0)
- ABCD.B -(A1),-(A0)
- ABCD.B -(A1),-(A0)
- ADDQ.L #4,A0
- LEA.L DEF_HIT_SCORE+4(A6),A1
- SUB.W D1,D1
- ABCD.B -(A1),-(A0)
- ABCD.B -(A1),-(A0)
- ABCD.B -(A1),-(A0)
- ABCD.B -(A1),-(A0)
- MOVEM.L (SP)+,A0-A1
- SCORE_UP_END:
- RTS
- DAMAGE_POINT:
- DC.W 0000H,0010H,0020H,0030H 00
- DC.W 0040H,0050H,0060H,0070H 10
- DC.W 0080H,0090H,0100H,0110H 20
- DC.W 0120H,0130H,0140H,0150H 30
- DC.W 0160H,0170H,0180H,0190H 40
- DC.W 0200H,0210H,0220H,0230H 50
- DC.W 0240H,0250H,0260H,0270H 60
- DC.W 0280H,0290H,0300H,0310H 70
- DC.W 0320H,0330H,0340H,0350H 80
- DC.W 0360H,0370H,0380H,0390H 90
- DC.W 0400H,0410H,0420H,0430H A0
- DC.W 0440H,0450H,0460H,0470H B0
- DC.W 0480H,0490H,0500H,0510H C0
- DC.W 0520H,0530H,0540H,0550H D0
- DC.W 0560H,0570H,0580H,0590H E0
- DC.W 0600H,0610H,0620H,0630H F0
- LOCK_CHECK:
- BTST.B #BHSS_NAGERARE,STATE(A6)
- BEQ.S NAGE_CK_1
- CMP.B #NAGERARE_STEP,STEP1(A6)
- BEQ.S NAGE_CK_1
- CLR.L VX(A6)
- CLR.L VX(A4)
- MOVE.W PLAYER_No+PLAYER_OFFSET(A6),D0
- BCLR.B D0,BACK2+MOVE_DIR(A5)
- BCLR.B #BHS_DOWN,HERO_STATE(A6)
- MOVE.W #CTRL_NAGERARE,D4
- JSR CTRL_CHANGE(PC)
- NAGE_CK_1:
- RTS
- BTST.B #BHSS_LOCK_DEF,STATE(A6)
- BEQ.S LOCK_CHECK_1
- CMP.B #LOCK_DEF_STEP,STEP1(A6)
- BEQ.S LOCK_CHECK_1
- MOVE.B #LOCK_DEF_STEP,STEP1(A6)
- MOVE.B #60,LOCK_TIMER(A6)
- LOCK_CHECK_1:
- RTS
- LOWER_SET:
- MOVEP.W WORK_N2(A4),D0
- CLR.B D0
- MOVE.W HIT_LOWER(A5,D0.W),HERO_LOWER(A6)
- ; MOVE.W Z_POSITION(A4),HERO_LOWER(A6)
- RTS
- FALL_CHECK:
- CMP.B #FALL_STEP,STEP1(A6)
- BEQ.S FALL_CHECK_1
- BTST.B #BHS_JUMP,HERO_STATE(A6)
- BNE.S FALL_CHECK_1
- BTST.B #5,ACT_FLAG(A4) offset jump
- BNE.S FALL_CHECK_1
- ; BTST.B #BHF_OBJ_STOP,FLAG(A6)
- ; BNE.S FALL_CHECK_2
- ; TST.W HIT_LOWER(A4)
- TST.W Z_POSITION(A6)
- BLE.S FALL_CHECK_1
- CLR.L VZ(A6)
- CLR.W JUMP_VX(A6)
- MOVE.W #-0D00H/20,AZ(A6)
- BSET.B #BHS_JUMP,HERO_STATE(A6)
- JSR ATTACK_OFF_LM(PC)
- BTST.B #BHS_DAMAGE,HERO_STATE(A6)
- BNE.S FALL_CHECK_1
- MOVE.W #CTRL_FALL,D4
- JSR CTRL_CHANGE(PC)
- FALL_CHECK_1:
- RTS
- FALL_CHECK_2:
- TST.L HERO_LOWER(A6)
- BGT.S FALL_CHECK_3
- BCLR.B #BHF_OBJ_STOP,FLAG(A6)
- CLR.L Z_POSITION(A6)
- CLR.L VZ(A6)
- FALL_CHECK_3:
- RTS
- BACK_OBJ_JUDGE:
- BCLR.B #BHF_NO_BJUDGE,FLAG(A6)
- BNE BOJ_3
- MOVE.L HIT_LEFT(A4),-(SP)
- MOVE.W VX(A4),D0
- ADD.W X_POSITION(A4),D0
- SUB.W #12,D0
- MOVE.W D0,HIT_LEFT(A4)
- ADD.W #24,D0
- MOVE.W D0,HIT_RIGHT(A4)
- MOVE.W VZ(A4),D0
- ADD.W D0,HIT_UPPER(A4)
- ADD.W D0,HIT_LOWER(A4)
- LEA.L (A4),A0
- JSR.S GET_OBJ_BACK_ADRS
- BOJ_1:
- LEA.L (A1),A0
- MOVE.W D6,D7
- BOJ_2:
- TST.B (A0)+
- BNE.S BOJ_4 hit
- DBRA D7,BOJ_2
- LEA.L 20H(A1),A1
- DBRA D5,BOJ_1
- MOVE.L (SP)+,HIT_LEFT(A4)
- AND.B #"(HF_OBJ_STOP+HF_ON_OBJ),FLAG(A6)
- BOJ_3:
- RTS
- BOJ_4:
- MOVE.B -1(A0),(A5)
- MOVE.W (A5),D0
- LEA.L 0(A5,D0.W),A2
- MOVE.W HIT_LEFT(A4),D0
- MOVE.W HIT_RIGHT(A4),D5
- MOVE.L (SP)+,HIT_LEFT(A4)
- SUB.W HIT_LEFT(A2),D5
- BMI BOJ_NON
- MOVE.W HIT_RIGHT(A2),D6
- SUB.W D0,D6 HIT_LEFT(A4),D6
- BMI BOJ_NON
- MOVE.W HIT_UPPER(A4),D3
- SUB.W HIT_LOWER(A2),D3
- BMI BOJ_NON
- MOVE.W HIT_UPPER(A2),D4
- SUB.W HIT_LOWER(A4),D4
- BPL BOJ_5
- BCLR.B #BHF_OBJ_STOP,FLAG(A6)
- BSET.B #BHF_ON_OBJ,FLAG(A6)
- RTS
- BOJ_5:
- MOVEQ.L #0,D1
- CMP.W D4,D3
- BCS.S BOJ_6
- MOVEQ.L #1,D1
- EXG.L D3,D4
- BOJ_6:
- CMP.W D6,D5
- BCS.S BOJ_7
- ADDQ.W #2,D1
- EXG.L D5,D6
- BOJ_7:
- ; CMP.W D3,D5
- ; BCS BOJ_X_IN
- BTST.L #0,D1
- BEQ BOJ_LOW
- MOVE.B FLAG(A6),D0
- AND.B #HF_OBJ_STOP+HF_ON_OBJ,D0
- BEQ BOJ_NON
- ; SWAP D3
- ; CLR.W D3
- ; ADD.L VZ(A2),D3
- ; MOVE.L D3,VZ(A4)
- MOVEQ.L #0,D0
- MOVE.W HIT_UPPER(A2),D0
- SWAP D0
- SUB.L Z_POSITION(A6),D0
- ADD.L VZ(A2),D0
- MOVE.L D0,VZ(A4)
- MOVE.L VX(A2),D0
- ADD.L D0,VX(A4)
- BSET.B #BHF_OBJ_STOP,FLAG(A6)
- BCLR.B #BHS_JUMP,HERO_STATE(A6)
- BEQ.S BOJ_8
- BTST.B #BHS_DAMAGE,HERO_STATE(A6)
- BNE.S BOJ_8
- JSR ATTACK_OFF_LM(PC)
- MOVE.W #CTRL_STOP,D4
- JSR CTRL_CHANGE(PC)
- BOJ_8:
- RTS
- BOJ_LOW:
- BOJ_X_IN:
- BOJ_NON:
- AND.B #"(HF_OBJ_STOP+HF_ON_OBJ),FLAG(A6)
- RTS
- ;************************************************************************
- ;
- ; * objcet vs object judge program
- ;
- ; version 1.0*10^-9 date 1991/11/11
- ;
- ; this program is special hit_judge_prog
- ; 1.back_object_no check(looking buffer)
- ; 2.now_object fall_direction is down_check
- ; 3.moving character is taller than object chararcter_check
- ;
- ; *receive_resista:A1(object_buffer address)
- ; A4(physical_work address)
- ; A6(logical_work address)
- ; D5(x_size counter)
- ;
- ; *return_code :FLAG(bit_6 => fall_flag)
- ; (bit_7 => hit_flag)
- ;
- OBJECT_HIT:
- MOVE.L HIT_LEFT(A4),-(SP)
- MOVE.W VX(A4),D0
- ADD.W X_POSITION(A4),D0
- SUB.W #16,D0
- MOVE.W D0,HIT_LEFT(A4)
- ADD.W #8,D0
- MOVE.W D0,HIT_RIGHT(A4)
- MOVE.W VZ(A4),D0
- ADD.W D0,HIT_UPPER(A4)
- ADD.W D0,HIT_LOWER(A4)
- ; MOVE.W VX(A4),D0
- ; ADD.W D0,HIT_LEFT(A4)
- ; ADD.W D0,HIT_RIGHT(A4)
- ; MOVE.W VZ(A4),D0
- ; ADD.W D0,HIT_UPPER(A4)
- ; ADD.W D0,HIT_LOWER(A4) :01
- LEA.L (A4),A0
- JSR.S GET_OBJ_BACK_ADRS
- OH_LOOP1:
- TST.B (A1)+ ;check 1
- BNE.S OH_CHK_1 ;
- DBRA D5,OH_LOOP1
- MOVE.L (SP)+,HIT_LEFT(A4)
- BSET.B #BHF_ON_OBJ,FLAG(A6)
- BCLR.B #BHF_OBJ_STOP,FLAG(A6)
- RTS
- OH_CHK_1:
- MOVE.B -1(A1),(A5)
- MOVE.W (A5),D0
- LEA.L 0(A5,D0.W),A2
- MOVE.L (SP)+,HIT_LEFT(A4)
- BSET.B #BHF_OBJ_STOP,FLAG(A6)
- MOVE.L VX(A2),D0
- ADD.L D0,VX(A4)
- MOVE.L VZ(A2),D0
- ADD.L D0,VZ(A4)
- MOVE.W VZ(A4),D0 ;check 2
- BPL.L OH_CHK_END ;
- MOVE.W HIT_UPPER(A2),D0;check 3
- SUB.W HIT_LOWER(A4),D0;
- BPL.L OH_CHK_END ;
- MOVE.W HIT_UPPER(A2),Z_POSITION(A4)
- MOVE.W HIT_UPPER(A2),Z_POSITION(A6)
- MOVE.L #0,VZ(A4)
- MOVE.L #0,AZ(A6)
- JSR ATTACK_OFF_LM(PC)
- BSET.B #BHF_OBJ_STOP,FLAG(A6)
- BCLR.B #BHS_JUMP,HERO_STATE(A6)
- MOVE.W #CTRL_STOP,D4
- JSR CTRL_CHANGE(PC)
- OH_CHK_END:
- RTS
- ;************************************************************************
- INCLUDE WORK.INC
|