include "flib.h" include "tios.h" include "hexlib.h" xdef _main xdef _comment ;************** Start of Fargo program *************** _main: move.b #0,(scr_b1) move.b #0,(scr_b2) jsr flib::clr_scr move.w #1,-(a7) jsr tios::FontSetSys lea 2(a7),a7 move.w #90,-(a7) move.w #180,-(a7) move.w #30,-(a7) move.w #60,-(a7) jsr flib::frame_rect lea 8(a7),a7 move.w #4,-(a7) pea menu(pc) move.w #45,-(a7) move.w #81,-(a7) jsr tios::DrawStrXY lea 10(a7),a7 move.w #4,-(a7) pea menu2(pc) move.w #53,-(a7) move.w #81,-(a7) jsr tios::DrawStrXY lea 10(a7),a7 move.w #4,-(a7) pea menu3(pc) move.w #61,-(a7) move.w #81,-(a7) jsr tios::DrawStrXY lea 10(a7),a7 move.w #4,-(a7) pea menu4(pc) move.w #69,-(a7) move.w #81,-(a7) jsr tios::DrawStrXY lea 10(a7),a7 tmenu clr.w tios::kb_vars+$1C jsr flib::idle_loop cmp.w #$10c,d0 beq debut cmp.w #$10d,d0 beq option cmp.w #$10e,d0 beq maide cmp.w #$10f,d0 beq quitte bra tmenu quitte: rts debut: jsr flib::clr_scr move.w #120,-(a7) move.w #220,-(a7) move.w #1,-(a7) move.w #140,-(a7) jsr flib::frame_rect lea 8(a7),a7 move.w #2,-(a7) jsr tios::FontSetSys lea 2(a7),a7 move.w #0,-(a7) pea texte(pc) move.w #5,-(a7) move.w #140,-(a7) jsr tios::DrawStrXY lea 10(a7),a7 move.w #0,-(a7) jsr tios::FontSetSys lea 2(a7),a7 move.w #4,-(a7) pea texte2(pc) move.w #123,-(a7) move.w #64,-(a7) jsr tios::DrawStrXY lea 10(a7),a7 lea perso1(pc),a0 move.l #21,d1 move.l #5,d0 bsr aff_sprite lea perso2(pc),a0 move.l #21,d1 move.l #10,d0 bsr aff_sprite clr.l d0 move.b (scr_b2),d0 move.l #5,d1 move.l #23,d2 jsr hexlib::put_char clr.l d0 move.b (scr_b1),d0 move.l #10,d1 move.l #23,d2 jsr hexlib::put_char move.b #0,(ct_b) move.b #0,(ct_b1) move.b #0,(ct_b2) move.b #2,(max_b1) move.b #2,(max_b2) move.b #1,(pui_b1) move.b #1,(pui_b2) lea lst_bx(pc),a0 lea lst_by(pc),a1 lea lst_bt(pc),a2 lea lst_bp(pc),a3 lea lst_be(pc),a4 move.l #27,d0 bcle0: move.b #0,(a0)+ move.b #0,(a1)+ move.w #0,(a2)+ move.b #0,(a3)+ move.b #0,(a4)+ dbra d0,bcle0 lea table(pc),a2 ;init_tab move.l #222,d0 bcle: move.b #0,(a2)+ dbra d0,bcle move.l #0,d0 lea table(PC),a2 bcle1: move.l d0,d1 mulu.b #15,d1 move.l a2,a1 add.w d1,a1 move.b #6,(a1) move.b #6,14(a1) add #1,d0 cmpi #14,d0 bne bcle1 move.l #2,d0 move.l #2,d1 bcle5: move.l d0,d2 mulu.b #15,d2 move.l a2,a1 add.w d2,a1 add.w d1,a1 move.b #6,(a1) add #2,d0 cmpi #14,d0 bne bcle5 move.b #2,d0 add #2,d1 cmpi #14,d1 bne bcle5 move.l #14,d0 bcle2: move.l a2,a1 add.w #210,a1 move.b #6,(a1) move.b #6,(a2)+ dbra d0,bcle2 lea table(PC),a2 ;tir mur move.l #55,d3 tir_mur3: bsr tirage move.b #3,(a0) dbra d3,tir_mur3 move.l #19,d3 tir_mur4: bsr tirage move.b #4,(a0) dbra d3,tir_mur4 move.l #16,d3 tir_mur5: bsr tirage move.b #5,(a0) dbra d3,tir_mur5 move.b #0,17(a2) ;autres init move.b #0,207(a2) move.b #0,31(a2) move.b #0,193(a2) move.b #0,16(a2) move.b #0,208(a2) move.l #0,d2 move.l #0,d3 lea table(PC),a2 bcle3: move.l d2,d1 move.l d3,d0 move.l d3,d4 mulu.b #15,d4 add.b d2,d4 move.l a2,a3 add.l d4,a3 lea mur(PC),a0 cmpi.b #6,(a3) ;affichage bne suite lea mur2(PC),a0 suite: cmpi.b #0,(a3) bne suite2 lea rien(PC),a0 suite2: bsr aff_sprite add.b #1,d2 cmpi.b #15,d2 bne bcle3 move.l #0,d2 ;l add.b #1,d3 cmpi #15,d3 bne bcle3 move.l #1,d7 ;x perso2 move.l #1,d6 ;y perso2 move.l #13,d5 ;x perso1 move.l #13,d4 ;y perso1 bsr aff_perso ;gestion déplacement corps: move.b #0,d3 :pas d'affichage move.w #65527,($600018) nop nop nop nop nop move.b ($60001B),d0 cmpi.b #251,d0 beq fin move.w #$FFFD,($600018) nop nop nop nop nop move.b ($60001B),d0 not.b d0 and.b #32,d0 ;test cmpi.b #32,d0 bne suite3 bsr aff_ancien move.b #1,d3 subi.b #1,d5 move.l d4,d0 mulu.b #15,d0 add.b d5,d0 move.l a2,a0 add.w d0,a0 bsr test_bonus1 cmp.b #8,(a0) beq gagn1 cmpi.b #0,(a0) beq suite3 addi.b #1,d5 suite3: move.w #$FFFD,($600018) nop nop nop nop nop move.b ($60001B),d0 not.b d0 and.b #128,d0 cmpi.b #128,d0 bne suite4 bsr aff_ancien move.b #1,d3 addi.b #1,d5 move.l d4,d0 mulu.b #15,d0 add.b d5,d0 move.l a2,a0 add.w d0,a0 bsr test_bonus1 cmp.b #8,(a0) beq gagn1 cmpi.b #0,(a0) beq suite4 subi.b #1,d5 suite4: move.w #$FFF7,($600018) nop nop nop nop nop move.b ($60001B),d0 not.b d0 and.b #64,d0 cmpi.b #64,d0 bne suite5 bsr aff_ancien move.b #1,d3 addi.b #1,d4 move.l d4,d0 mulu.b #15,d0 add.b d5,d0 move.l a2,a0 add.w d0,a0 bsr test_bonus1 cmp.b #8,(a0) beq gagn1 cmpi.b #0,(a0) beq suite5 subi.b #1,d4 suite5: move.w #$FFDF,($600018) nop nop nop nop nop move.b ($60001B),d0 not.b d0 and.b #64,d0 cmpi.b #64,d0 bne suite6 bsr aff_ancien move.b #1,d3 subi.b #1,d4 move.l d4,d0 mulu.b #15,d0 add.b d5,d0 move.l a2,a0 add.w d0,a0 bsr test_bonus1 cmp.b #8,(a0) beq gagn1 cmpi.b #0,(a0) beq suite6 addi.b #1,d4 suite6: move.w #$FFEF,($600018) nop nop nop nop nop move.b ($60001B),d0 not.b d0 and.b #16,d0 ;test cmpi.b #16,d0 bne suite7 bsr aff_ancien move.b #1,d3 subi.b #1,d7 move.l d6,d0 mulu.b #15,d0 add.b d7,d0 move.l a2,a0 add.w d0,a0 bsr test_bonus2 cmp.b #8,(a0) beq gagn2 cmpi.b #0,(a0) beq suite7 addi.b #1,d7 suite7: move.w #$FFDF,($600018) nop nop nop nop nop move.b ($60001B),d0 not.b d0 and.b #16,d0 cmpi.b #16,d0 bne suite8 bsr aff_ancien move.b #1,d3 addi.b #1,d7 move.l d6,d0 mulu.b #15,d0 add.b d7,d0 move.l a2,a0 add.w d0,a0 bsr test_bonus2 cmp.b #8,(a0) beq gagn2 cmpi.b #0,(a0) beq suite8 subi.b #1,d7 suite8: move.w #$FFFD,($600018) nop nop nop nop nop move.b ($60001B),d0 not.b d0 and.b #2,d0 cmpi.b #2,d0 bne suite9 bsr aff_ancien move.b #1,d3 addi.b #1,d6 move.l d6,d0 mulu.b #15,d0 add.b d7,d0 move.l a2,a0 add.w d0,a0 bsr test_bonus2 cmp.b #8,(a0) beq gagn2 cmpi.b #0,(a0) beq suite9 subi.b #1,d6 suite9: move.w #$FFFD,($600018) nop nop nop nop nop move.b ($60001B),d0 not.b d0 and.b #8,d0 cmpi.b #8,d0 bne suite10 bsr aff_ancien move.b #1,d3 subi.b #1,d6 move.l d6,d0 mulu.b #15,d0 add.b d7,d0 move.l a2,a0 add.w d0,a0 bsr test_bonus2 cmp.b #8,(a0) beq gagn2 cmpi.b #0,(a0) beq suite10 addi.b #1,d6 clr.w tios::kb_vars+$1C suite10: ;bombes move.w #$FF7F,($600018) nop nop nop nop nop move.b ($60001B),d0 not.b d0 and.b #64,d0 cmpi.b #64,d0 bne suite11 move.l d4,d0 mulu.b #15,d0 add.b d5,d0 move.l a2,a0 add.w d0,a0 cmpi.b #7,(a0) beq suite11 clr.l d0 add.b #1,(ct_b1) move.b (ct_b1),d0 cmp.b (max_b1),d0 beq bride_b1 move.b #0,d3 move.l d4,d0 mulu.b #15,d0 add.b d5,d0 move.l a2,a0 add.w d0,a0 move.b #7,(a0) lea lst_bt(pc),a0 clr.w d0 move.b (ct_b),d0 add.w d0,a0 add.w d0,a0 clr.w d0 move.b (tbombe),d0 mulu.b #40,d0 move.w d0,(a0) move.b (ct_b),d0 lea lst_bx(pc),a0 add.w d0,a0 move.b d5,(a0) lea lst_by(pc),a0 add.w d0,a0 move.b d4,(a0) lea lst_bp(pc),a0 add.w d0,a0 move.b (pui_b1),(a0) lea lst_bn(pc),a0 add.w d0,a0 move.b #1,(a0) add.b #1,(ct_b) bsr test_ctb lea bombe(pc),a0 move.l d5,d1 move.l d4,d0 bsr aff_sprite suite11: move.w #$FFFE,($600018) nop nop nop nop nop move.b ($60001B),d0 not.b d0 and.b #1,d0 cmpi.b #1,d0 bne suite12 move.l d6,d0 mulu.b #15,d0 add.b d7,d0 move.l a2,a0 add.w d0,a0 cmpi.b #7,(a0) beq suite12 clr.l d0 add.b #1,(ct_b2) move.b (ct_b2),d0 cmp.b (max_b2),d0 beq bride_b2 move.b #0,d3 move.l d6,d0 mulu.b #15,d0 add.b d7,d0 move.l a2,a0 add.w d0,a0 move.b #7,(a0) lea lst_bt(pc),a0 clr.w d0 move.b (ct_b),d0 add.w d0,a0 add.w d0,a0 clr.w d0 move.b (tbombe),d0 mulu.b #40,d0 move.w d0,(a0) move.b (ct_b),d0 lea lst_bx(pc),a0 add.w d0,a0 move.b d7,(a0) lea lst_by(pc),a0 add.w d0,a0 move.b d6,(a0) lea lst_bp(pc),a0 add.w d0,a0 move.b (pui_b2),(a0) lea lst_bn(pc),a0 add.w d0,a0 move.b #2,(a0) add.b #1,(ct_b) bsr test_ctb lea bombe(pc),a0 move.l d7,d1 move.l d6,d0 bsr aff_sprite suite12: move.l d3,-(a7) clr.l d3 ges_bombe: cmp.b #29,d3 beq fin_ges lea lst_bt(pc),a0 add.w d3,a0 add.w d3,a0 cmp.w #0,(a0) beq inc_d3 sub.w #1,(a0) cmp.w #1,(a0) bne inc_d3 sub.w #1,(a0) move.l d5,-(a7) move.l d4,-(a7) clr.l d5 clr.l d4 lea lst_bx(pc),a0 add.w d3,a0 move.b (a0),d5 lea lst_by(pc),a0 add.w d3,a0 move.b (a0),d4 lea lst_be(pc),a0 add.w d3,a0 move.b (texpl),d0 mulu.b #12,d0 move.b d0,(a0) move.l #0,d2 explosion: lea lst_bp(pc),a0 add.w d3,a0 cmp.b (a0),d2 bhi fin_explo move.l a2,a1 move.l d4,d0 mulu.b #15,d0 add.b d5,d0 add.w d0,a1 cmp.b #6,(a1) beq fin_explo cmp.b #0,d2 beq pb cmp.b #7,(a1) beq fin_explo pb: cmp.b #5,(a1) beq traite_mur cmp.b #4,(a1) beq traite_mur cmp.b #3,(a1) beq traite_mur bsr test_fin cmp.b #0,d7 beq dec_ct1 move.b #8,(a1) lea explo(pc),a0 move.l d5,d1 move.l d4,d0 bsr aff_sprite add.b #1,d4 add.b #1,d2 bra explosion fin_explo: lea lst_bx(pc),a0 add.w d3,a0 move.b (a0),d5 lea lst_by(pc),a0 add.w d3,a0 move.b (a0),d4 move.l #0,d2 explosion2: sub.b #1,d4 add.b #1,d2 lea lst_bp(pc),a0 add.w d3,a0 cmp.b (a0),d2 bhi fin_explo2 move.l a2,a1 move.l d4,d0 mulu.b #15,d0 add.b d5,d0 add.w d0,a1 cmp.b #6,(a1) beq fin_explo2 cmp.b #0,d2 beq pb2 cmp.b #7,(a1) beq fin_explo2 pb2: cmp.b #5,(a1) beq traite_mur2 cmp.b #4,(a1) beq traite_mur2 cmp.b #3,(a1) beq traite_mur2 bsr test_fin cmp.b #0,d7 beq dec_ct1 move.b #8,(a1) lea explo(pc),a0 move.l d5,d1 move.l d4,d0 bsr aff_sprite bra explosion2 fin_explo2: lea lst_bx(pc),a0 add.w d3,a0 move.b (a0),d5 lea lst_by(pc),a0 add.w d3,a0 move.b (a0),d4 move.l #0,d2 explosion3: add.b #1,d5 add.b #1,d2 lea lst_bp(pc),a0 add.w d3,a0 cmp.b (a0),d2 bhi fin_explo3 move.l a2,a1 move.l d4,d0 mulu.b #15,d0 add.b d5,d0 add.w d0,a1 cmp.b #6,(a1) beq fin_explo3 cmp.b #0,d2 beq pb3 cmp.b #7,(a1) beq fin_explo3 pb3: cmp.b #5,(a1) beq traite_mur3 cmp.b #4,(a1) beq traite_mur3 cmp.b #3,(a1) beq traite_mur3 bsr test_fin cmp.b #0,d7 beq dec_ct1 move.b #8,(a1) lea explo(pc),a0 move.l d5,d1 move.l d4,d0 bsr aff_sprite bra explosion3 fin_explo3: lea lst_bx(pc),a0 add.w d3,a0 move.b (a0),d5 lea lst_by(pc),a0 add.w d3,a0 move.b (a0),d4 move.l #0,d2 explosion4: sub.b #1,d5 add.b #1,d2 lea lst_bp(pc),a0 add.w d3,a0 cmp.b (a0),d2 bhi fin_explo4 move.l a2,a1 move.l d4,d0 mulu.b #15,d0 add.b d5,d0 add.w d0,a1 cmp.b #6,(a1) beq fin_explo4 cmp.b #0,d2 beq pb4 cmp.b #7,(a1) beq fin_explo4 pb4: cmp.b #5,(a1) beq traite_mur4 cmp.b #4,(a1) beq traite_mur4 cmp.b #3,(a1) beq traite_mur4 bsr test_fin cmp.b #0,d7 beq dec_ct1 move.b #8,(a1) lea explo(pc),a0 move.l d5,d1 move.l d4,d0 bsr aff_sprite bra explosion4 fin_explo4: lea lst_bn(pc),a0 add.w d3,a0 cmp.b #1,(a0) bne dec_ct2 sub.b #1,(ct_b1) dec_ct2: cmp.b #2,(a0) bne dec_ct1 sub.b #1,(ct_b2) dec_ct1: move.l (a7)+,d4 move.l (a7)+,d5 cmp.b #0,d7 beq fin_ges bra inc_d3 fin_ges: move.l (a7)+,d3 cmp.b #0,d7 bne suite_jeu bra sortir_jeu suite_jeu: ;;;;;;;;;;;;;;;;;;;;;;;;;; move.l d3,-(a7) clr.l d3 eff_bombe: cmp.b #29,d3 beq fin_gese lea lst_be(pc),a0 add.w d3,a0 cmp.b #0,(a0) beq inc_d3e sub.b #1,(a0) cmp.b #1,(a0) bne inc_d3e move.l (a7)+,a6 ;;; move.l #1,a6 move.l a6,-(a7) move.l d5,-(a7) move.l d4,-(a7) clr.l d5 clr.l d4 lea lst_bx(pc),a0 add.w d3,a0 move.b (a0),d5 lea lst_by(pc),a0 add.w d3,a0 move.b (a0),d4 move.l #0,d2 efface: lea lst_bp(pc),a0 add.w d3,a0 cmp.b (a0),d2 bhi fin_eff move.l a2,a1 move.l d4,d0 mulu.b #15,d0 add.b d5,d0 add.w d0,a1 cmp.b #8,(a1) beq et1 cmp.b #0,(a1) beq et1 bra fin_eff et1: move.b #0,(a1) lea rien(pc),a0 move.l d5,d1 move.l d4,d0 bsr aff_sprite add.b #1,d4 add.b #1,d2 bra efface fin_eff: lea lst_bx(pc),a0 add.w d3,a0 move.b (a0),d5 lea lst_by(pc),a0 add.w d3,a0 move.b (a0),d4 move.l #0,d2 efface2: sub.b #1,d4 add.b #1,d2 lea lst_bp(pc),a0 add.w d3,a0 cmp.b (a0),d2 bhi fin_eff2 move.l a2,a1 move.l d4,d0 mulu.b #15,d0 add.b d5,d0 add.w d0,a1 cmp.b #8,(a1) beq et2 cmp.b #0,(a1) beq et2 bra fin_eff2 et2: move.b #0,(a1) lea rien(pc),a0 move.l d5,d1 move.l d4,d0 bsr aff_sprite bra efface2 fin_eff2: lea lst_bx(pc),a0 add.w d3,a0 move.b (a0),d5 lea lst_by(pc),a0 add.w d3,a0 move.b (a0),d4 move.l #0,d2 efface3: add.b #1,d5 add.b #1,d2 lea lst_bp(pc),a0 add.w d3,a0 cmp.b (a0),d2 bhi fin_eff3 move.l a2,a1 move.l d4,d0 mulu.b #15,d0 add.b d5,d0 add.w d0,a1 cmp.b #8,(a1) beq et3 cmp.b #0,(a1) beq et3 bra fin_eff3 et3: move.b #0,(a1) lea rien(pc),a0 move.l d5,d1 move.l d4,d0 bsr aff_sprite bra efface3 fin_eff3: lea lst_bx(pc),a0 add.w d3,a0 move.b (a0),d5 lea lst_by(pc),a0 add.w d3,a0 move.b (a0),d4 move.l #0,d2 efface4: sub.b #1,d5 add.b #1,d2 lea lst_bp(pc),a0 add.w d3,a0 cmp.b (a0),d2 bhi fin_eff4 move.l a2,a1 move.l d4,d0 mulu.b #15,d0 add.b d5,d0 add.w d0,a1 cmp.b #8,(a1) beq et4 cmp.b #0,(a1) beq et4 bra fin_eff4 et4: move.b #0,(a1) lea rien(pc),a0 move.l d5,d1 move.l d4,d0 bsr aff_sprite bra efface4 fin_eff4: move.l (a7)+,d4 move.l (a7)+,d5 bra inc_d3e fin_gese: move.l (a7)+,d3 ;;;;;; cmpi.b #0,d3 beq perso bsr aff_perso perso: move.l #14000,d0 ralentit: dbra d0,ralentit bra corps fin: clr.w tios::kb_vars+$1C move.w #0,($600018) nop nop nop nop move.b ($60001B),d0 not.b d0 and.b #$ffff,d0 cmpi.b #0,d0 beq fin rts aff_sprite: ;a0-adresse d1-x d0-y mulu.w #240,d0 add.w d1,d0 move.l #7,d1 bcle4: move.l #tios::main_lcd,a1 add.w d0,a1 move.b (a0)+,(a1) add #30,d0 dbra d1,bcle4 rts tirage: move.l #13,d0 ;murs au hasard jsr flib::random add.w #1,d0 move.l d0,d1 move.l #13,d0 jsr flib::random add.b #1,d0 mulu.w #15,d0 add.w d1,d0 move.l a2,a0 add.l d0,a0 cmpi.b #6,(a0) beq tirage ;tir pos rts aff_perso: lea perso2(pc),a0 move.l d5,d1 move.l d4,d0 bsr aff_sprite lea perso1(pc),a0 move.l d7,d1 move.l d6,d0 bsr aff_sprite rts aff_ancien: move.l d4,d0 mulu.b #15,d0 add.b d5,d0 move.l a2,a0 add.l d0,a0 move.l d5,d1 move.l d4,d0 cmpi.b #7,(a0) bne test_anc lea bombe(pc),a0 bsr aff_sprite bra test_anc2 test_anc: lea rien(pc),a0 bsr aff_sprite test_anc2: move.l d6,d0 mulu.b #15,d0 add.b d7,d0 move.l a2,a0 add.w d0,a0 move.l d7,d1 move.l d6,d0 cmpi.b #7,(a0) bne test_anc3 lea bombe(pc),a0 bsr aff_sprite bra test_anc4 test_anc3: lea rien(pc),a0 bsr aff_sprite test_anc4: rts traite_mur: move.l d5,d1 move.l d4,d0 move.l a1,-(a7) lea rien(pc),a0 bsr aff_sprite move.l (a7)+,a1 move.l a1,-(a7) subi.b #3,(a1) cmp.b #1,(a1) bne suite_tr move.l d5,d1 move.l d4,d0 lea bombus(pc),a0 bsr aff_sprite move.l (a7)+,a1 bra fin_explo suite_tr: cmp.b #2,(a1) bne suite_tr2 move.l d5,d1 move.l d4,d0 lea puiss(pc),a0 bsr aff_sprite suite_tr2: move.l (a7)+,a1 bra fin_explo traite_mur2: move.l d5,d1 move.l d4,d0 move.l a1,-(a7) lea rien(pc),a0 bsr aff_sprite move.l (a7)+,a1 move.l a1,-(a7) subi.b #3,(a1) cmp.b #1,(a1) bne suite_tr3 move.l d5,d1 move.l d4,d0 lea bombus(pc),a0 bsr aff_sprite move.l (a7)+,a1 bra fin_explo2 suite_tr3: cmp.b #2,(a1) bne suite_tr4 move.l d5,d1 move.l d4,d0 lea puiss(pc),a0 bsr aff_sprite suite_tr4: move.l (a7)+,a1 bra fin_explo2 traite_mur3: move.l d5,d1 move.l d4,d0 move.l a1,-(a7) lea rien(pc),a0 bsr aff_sprite move.l (a7)+,a1 move.l a1,-(a7) subi.b #3,(a1) cmp.b #1,(a1) bne suite_tr5 move.l d5,d1 move.l d4,d0 lea bombus(pc),a0 bsr aff_sprite move.l (a7)+,a1 bra fin_explo3 suite_tr5: cmp.b #2,(a1) bne suite_tr6 move.l d5,d1 move.l d4,d0 lea puiss(pc),a0 bsr aff_sprite suite_tr6: move.l (a7)+,a1 bra fin_explo3 traite_mur4: move.l d5,d1 move.l d4,d0 move.l a1,-(a7) lea rien(pc),a0 bsr aff_sprite move.l (a7)+,a1 move.l a1,-(a7) subi.b #3,(a1) cmp.b #1,(a1) bne suite_tr7 move.l d5,d1 move.l d4,d0 lea bombus(pc),a0 bsr aff_sprite move.l (a7)+,a1 bra fin_explo4 suite_tr7: cmp.b #2,(a1) bne suite_tr8 move.l d5,d1 move.l d4,d0 lea puiss(pc),a0 bsr aff_sprite suite_tr8: move.l (a7)+,a1 bra fin_explo4 inc_d3: add.b #1,d3 bra ges_bombe inc_d3e: add.b #1,d3 bra eff_bombe test_bonus1: cmpi.b #1,(a0) bne bon1 move.b #0,(a0) add.b #1,(max_b1) bon1: cmpi.b #2,(a0) bne bon2 move.b #0,(a0) add.b #1,(pui_b1) bon2: rts test_bonus2: cmpi.b #1,(a0) bne bon3 move.b #0,(a0) add.b #1,(max_b2) bon3: cmpi.b #2,(a0) bne bon4 move.b #0,(a0) add.b #1,(pui_b2) bon4: rts bride_b1: sub.b #1,(ct_b1) bra suite11 bride_b2: sub.b #1,(ct_b2) bra suite12 test_ctb: cmp.b #29,(ct_b) bne fin_ctb move.b #0,(ct_b) fin_ctb: rts test_fin: move.l (a7)+,a6 move.l (a7)+,d0 move.l (a7)+,d1 cmp.b d5,d1 bne tfin2 cmp.b d4,d0 bne tfin2 move.b #0,d7 move.l d1,-(a7) move.l d0,-(a7) move.l a6,-(a7) add.b #1,(scr_b2) lea jfin(pc),a0 move.l d4,d0 move.l d5,d1 bsr aff_sprite rts tfin2: move.l d1,-(a7) move.l d0,-(a7) move.l a6,-(a7) cmp.b d6,d4 bne tfin3 cmp.b d7,d5 bne tfin3 lea jfin(pc),a0 move.l d4,d0 move.l d5,d1 bsr aff_sprite move.b #0,d7 add.b #1,(scr_b1) tfin3: rts sortir_jeu: move.l #$Fff,d3 pause: clr.l d0 move.b (scr_b2),d0 move.l #5,d1 move.l #23,d2 jsr hexlib::put_char clr.l d0 move.b (scr_b1),d0 move.l #10,d1 move.l #23,d2 jsr hexlib::put_char dbra.l d3,pause clr.l d0 move.b (match),d0 cmp.b (scr_b1),d0 beq fin cmp.b (scr_b2),d0 beq fin bra debut gagn1: lea jfin(pc),a0 move.l d4,d0 move.l d5,d1 bsr aff_sprite add.b #1,(scr_b2) bra sortir_jeu gagn2: lea jfin(pc),a0 move.l d6,d0 move.l d7,d1 bsr aff_sprite add.b #1,(scr_b1) bra sortir_jeu maide: jsr flib::clr_scr move.w #2,-(a7) jsr tios::FontSetSys lea 2(a7),a7 move.w #4,-(a7) pea aide(pc) move.w #36,-(a7) move.w #20,-(a7) jsr tios::DrawStrXY lea 10(a7),a7 move.w #1,-(a7) jsr tios::FontSetSys lea 2(a7),a7 move.w #4,-(a7) pea aide2(pc) move.w #54,-(a7) move.w #20,-(a7) jsr tios::DrawStrXY lea 10(a7),a7 move.w #4,-(a7) pea aide3(pc) move.w #62,-(a7) move.w #20,-(a7) jsr tios::DrawStrXY lea 10(a7),a7 move.w #4,-(a7) pea aide4(pc) move.w #70,-(a7) move.w #20,-(a7) jsr tios::DrawStrXY lea 10(a7),a7 move.w #4,-(a7) pea aide6(pc) move.w #86,-(a7) move.w #20,-(a7) jsr tios::DrawStrXY lea 10(a7),a7 move.w #0,-(a7) jsr tios::FontSetSys lea 2(a7),a7 move.w #4,-(a7) pea aide5(pc) move.w #122,-(a7) move.w #1,-(a7) jsr tios::DrawStrXY lea 10(a7),a7 jsr flib::idle_loop bra _main option: move.w #90,-(a7) move.w #180,-(a7) move.w #30,-(a7) move.w #60,-(a7) jsr flib::erase_rect jsr flib::frame_rect lea 8(a7),a7 move.w #4,-(a7) pea opt(pc) move.w #48,-(a7) move.w #65,-(a7) jsr tios::DrawStrXY lea 10(a7),a7 move.w #4,-(a7) pea opt2(pc) move.w #56,-(a7) move.w #65,-(a7) jsr tios::DrawStrXY lea 10(a7),a7 move.w #4,-(a7) pea opt3(pc) move.w #64,-(a7) move.w #65,-(a7) jsr tios::DrawStrXY lea 10(a7),a7 bm: clr.l d0 move.b (match),d0 move.l #6,d1 move.l #17,d2 jsr hexlib::put_char jsr flib::idle_loop cmp.w #$154,d0 bne bm2 cmp.b #9,(match) beq bm2 add.b #1,(match) bm2: cmp.w #$151,d0 bne bm3 cmp.b #3,(match) beq bm3 sub.b #1,(match) bm3: cmp.w #$D,d0 beq finbm bra bm finbm: move.w #4,-(a7) cmp.b #1,(tbombe) bne afb pea rapide(pc) afb: cmp.b #2,(tbombe) bne afb2 pea normal(pc) afb2: cmp.b #3,(tbombe) bne afb3 pea lent(pc) afb3: move.w #56,-(a7) move.w #132,-(a7) jsr tios::DrawStrXY lea 10(a7),a7 jsr flib::idle_loop cmp.w #$d,d0 beq finbt cmp.w #$151,d0 bne bt add.b #1,(tbombe) cmp.b #4,(tbombe) bne bt move.b #3,(tbombe) bt: cmp.b #$154,d0 bne bt2 sub.b #1,(tbombe) cmp.b #0,(tbombe) bne bt2 move.b #1,(tbombe) bt2: bra finbm finbt: move.w #4,-(a7) cmp.b #1,(texpl) bne afexp pea rapide(pc) afexp: cmp.b #2,(texpl) bne afexp2 pea normal(pc) afexp2: cmp.b #3,(texpl) bne afexp3 pea lent(pc) afexp3: move.w #64,-(a7) move.w #132,-(a7) jsr tios::DrawStrXY lea 10(a7),a7 jsr flib::idle_loop cmp.w #$d,d0 beq finexp cmp.w #$151,d0 bne exp add.b #1,(texpl) cmp.b #4,(texpl) bne exp move.b #3,(texpl) exp: cmp.b #$154,d0 bne exp2 sub.b #1,(texpl) cmp.b #0,(texpl) bne exp2 move.b #1,(texpl) exp2: bra finbt finexp: bra _main ;***************************************************** ; Program data ;***************************************************** mur dc.b 32,32,255,4,4,4,255,32 mur2 dc.b 60,126,255,255,255,255,126,60 perso1 dc.b 0,90,36,24,24,36,102,0 perso2 dc.b 0,24,102,24,24,36,102,0 bombe dc.b 0,6,56,124,124,124,56,0 explo dc.b 170,85,170,85,170,85,170,85 jfin dc.b 170,85,190,125,190,125,170,85 puiss dc.b 0,24,24,102,102,24,24,0 bombus dc.b 0,6,56,68,68,68,56,0 rien ds.b 8 table ds.b 225 lst_bx ds.b 30 lst_by ds.b 30 lst_bt ds.w 30 lst_bp ds.b 30 lst_bn ds.b 30 lst_be ds.b 30 ct_b1 dc.b 0 ct_b2 dc.b 0 pui_b1 dc.b 1 pui_b2 dc.b 1 ct_b dc.b 0 max_b1 dc.b 0 max_b2 dc.b 0 scr_b1 dc.b 0 scr_b2 dc.b 0 texte dc.b " DYNA92 ",0 texte2 dc.b "v2.0+-by Apm 1997-FII Dolphy 1998-Ti92+ by Roby",0 menu dc.b "F1 - Game",0 menu2 dc.b "F2 - Options",0 menu3 dc.b "F3 - Help",0 menu4 dc.b "F4 - Quit",0 aide dc.b "Player 1 Player 2",0 aide2 dc.b " F6 1",0 aide3 dc.b " W Z 8 cos",0 aide4 dc.b " F2 2nd 3 Apps",0 aide6 dc.b " F to quit",0 aide5 dc.b "Dyna92 by APM-FII by Dolphy-Ti92+ by Roby",0 opt dc.b "Match ",17," ",18,0 opt2 dc.b "Bomb time ",17," ",18,0 opt3 dc.b "Expl time ",17," ",18,0 normal dc.b "Normal",0 rapide dc.b "Fast ",0 lent dc.b "Slow ",0 match dc.b 3 tbombe dc.b 2 texpl dc.b 2 _comment: dc.b "Dyna92 - Version 2.0+",0 ;*************** End of Fargo program **************** end