þþd$X;Demonstration of player/missilenX;graphics macrosxX;‚X;by Karl E. WiegersŒX;–F=EI X;ª#X;******************************´X; PULL IN MACRO LIBRARIES¾#X;******************************ÈX;Ò>ŒD8:MACRO.LIBÜ>D8:GRAPHICS.LIBæX;ðX;equates we need todayúX; †ATRACTM†STICK0x†STRIG0„" „M0PLÐ,†COLPF0Ð6†HITCLRÐ@†CONSOLÐJ …WSYNC ÔTX;^$X;*******************************hX; SET UP PMG STORAGEr$X;*******************************|X;†0X;š ƒPMG¤ ƒMIS® ƒPL0¸ ƒPL1 ƒPL2Ì ƒPL3Ö †XPOSP0à †YPOSP0ê †XPOSM0ô †YPOSM0þ „LEFT …RIGHT ƒTOPX;&$X;*******************************0X; VBI ROUTINE STARTS HERE:$X;*******************************DX;N@XX;bƒVBIl…POKE †ATRACT=v#†XPOSP0;;move car 1€Q†XPOSP0;;pixel to rightŠP†HPOSP0”Q†STICK0;;get stick 1žM>;;left?¨HˆCHKRIGHT;;no,check right²Q†XPOSP0;;yes - at left¼R„LEFT;;edge?ÆF‹MOVEMISSILE;;yes, go onÐ"†XPOSP0;;no, move BonzoÚ"…POKE †HPOSP0=†XPOSP0;;to leftäH‹MOVEMISSILE;;go onî ˆCHKRIGHTøQ†STICK0;;get stick 1M>;;right? H‹MOVEMISSILE;;no, go onQ†XPOSP0;;yes - at right R…RIGHT;;edge?*F‹MOVEMISSILE;;yes, go on4#†XPOSP0;;no, move him to> …POKE †HPOSP0=†XPOSP0;;rightH‹MOVEMISSILERQ†XPOSM0;;missile fired?\F‡CHKTRIG;;no, check trigfQ†YPOSM0;;yes - at thepRƒTOP;;top?zH…MOVEM;;no, move it„ …POKE †XPOSM0=;;yes - moveŽ…POKE †HPOSM0=;;missile˜…POKE †YPOSM0=¸;;offscreen¢$>;;zero out¬A;;missile 1 area¶ ˆZMISSILEÀ PƒMIS9Ê2Ô(>¸Þ HˆZMISSILEèF‡CHKTRIG;;check triggerò …MOVEMüQ>5ƒMIS;;move missilePˆMOVEFROM;;up 1 scan!…POKE ˆMOVEFROM=†YPOSM0;;line%>$ †LOOPUP.Q@ˆMOVEFROM781BP@ˆMOVEFROM7L3V3`)> ;;missile is 10jH†LOOPUP;;bytes tallt "†YPOSM0~ ‡CHKTRIGˆQ†STRIG0;;trigger pressed?’H‰COPYBONZO;;no, go onœ$X;yes-copy shooting form of Bonzo¦…MOVE ‡SHOOTER=ƒPL0À=°Q†XPOSM0;;missile fired?ºH‡VBIEXIT;;yes, exitÄ$†XPOSP0;;no, copy missileÎ2;;form into PMGØ2;;and move toâ&†HPOSM0;;Bonzo's locationì &†XPOSM0ö…MOVE ‡MISSILE=ƒMIS¸= ,  D‡VBIEXITX;copy normal Bonzo form ‰COPYBONZO(…MOVE …BONZO=ƒPL0À=2X;leave VBI routine< ‡VBIEXITF !†XITVBVPX;Z$X;*******************************dX; MAIN PROGRAM STARTS HEREn$X;*******************************xX;‚PŒX;– …START -;;binary modeª ‰GRAPHICS ;;open screen´…POKE „LEFT=8;;set limits¾…POKE …RIGHT=¿È…POKE ƒTOP=Ò$>;;zero PMG areaÜAæ„INITð PƒMIS9ú PƒPL09 PƒPL19 PƒPL29 PƒPL39"2, H„INIT6X;@$X;-------------------------------J X;now point to PMG area, moveT"X;car and Bonzo shapes into PMG^!X;RAM, set colors, widths, andh#X;positions, and resolution, andrX;turn on PMG and VBI|$X;-------------------------------†X;…MOVE …BONZO=ƒPL0À=š…MOVE ƒCAR=ƒPL1€=¤ŠSETPCOLOR == ®ŠSETPCOLOR ==¸ˆPLFIELD ‡PMGRES ̇PWIDTH =Ö‡PWIDTH =à‡MWIDTH =ê†PMGON ƒPMGôˆHPLAYER =xþˆHPLAYER =‰HMISSILE =…POKE †YPOSM0=¸†VBION ƒVBI&X;0$X;-------------------------------:X;clear collision registers;D#X;loop until you get a collisionN$X;between the missile and the carX$X;-------------------------------bX;l…POKE †HITCLR=v †CHKCOL€ Q„M0PLŠM>” F†CHKCOLžX;¨$X;-------------------------------² X;when collide, turn off VBI,¼ X;move missile offstage, copyÆ%X;wreck shape on car; flash colorsÐ$X;-------------------------------ÚX;ä ‡VBIOFF î…POKE †HPOSM0=ø…POKE †XPOSM0=…MOVE …WRECK=ƒPL1€= „FOR I== ŠSETPCOLOR ==  †PAUSE *ŠSETPCOLOR ==4 †PAUSE > …NEXT IHX;R$X;-------------------------------\"X;change color registers, printf"X;messages, turn on rainbow forp%X;color register 0, wait for presszX;of START or RESET keys„$X;-------------------------------ŽX;˜‰SETCOLOR ==¢‰SETCOLOR = =¬‰POSITION =¶†PRINT =†WINNERÀ‰POSITION =ʆPRINT =ˆWHATNEXTÔ ‡RAINBOWÞ%>è2ò &…WSYNCüA P†COLPF08 Q†CONSOL R>$ H‡RAINBOW. X;8 $X;-------------------------------B "X;close screen, reset collisionL %X;registers, turn off PMG, go backV #X;and start it all over if START` X;was pressedj $X;-------------------------------t X;~ †CLOSE ˆ …POKE †HITCLR=’ ‡PMGOFF œ !…START¦ X;° $X;-------------------------------º "X;lines to print, player shapesÄ $X;-------------------------------Î X;Ø †WINNERâ  A‹BONZO WINS!A=ƒEOLì ˆWHATNEXTö  A’start to go again A  A‘ ÒÅÓÅÔ ÔÏ ÅØÉÔA=ƒEOL X; …BONZO  =<==~=½(  ½=½=½=<=<2  $=$=$=f===< X;F ƒCARP  ==~=Ã=Û=ÛZ  [=Û=Û=Û=Ûd  [=Û=Û=Ã=~n X;x ‡SHOOTER‚  ==$=B==½Œ  ™=~=<=<=<=<–  <=$=B=$=f  X;ª …WRECK´  =Y=b=V=œ=)¾  V=’=Y=l=¸=VÈ  (=T=V=== Ò X;Ü ‡MISSILEæ ! =========ð X;ú #X;****************************** X; DON'T FORGET THE SUBS! #X;****************************** X;" >‹D8:SUBS.LIB