From d343426b639cee3b7bf6440a2e166afa2a5eb69d Mon Sep 17 00:00:00 2001 From: pkali Date: Sun, 27 Mar 2022 23:55:17 -0400 Subject: [PATCH] build 132 --- README.md | 29 +- ai.asm | 2 +- display.asm | 2 +- grafproc.asm | 12 - scorch.asm | 190 ++++---- scorch.xex | Bin 35631 -> 33790 bytes textproc.asm | 71 +-- variables.asm | 1176 +++++++++---------------------------------------- weapons.asm | 73 ++- 9 files changed, 389 insertions(+), 1166 deletions(-) diff --git a/README.md b/README.md index b69ae15..6d117c2 100755 --- a/README.md +++ b/README.md @@ -4,42 +4,51 @@ by Tomasz 'pecus' Pecko and Pawel 'pirx' Kalinowski Warsaw, Miami 2000, 2001, 2002, 2003, 2009, 2012, 2013, 2022 -you can contact us at pecus@poczta.fm or pirx@5oft.pl +You can contact us at pecus@poczta.fm or pirx@5oft.pl home page of this project is https://github.com/pkali/scorch_src -this source code was compiled under OMC65 crossassembler +This source code was originally compiled under OMC65 crossassembler (https://github.com/pkali/omc65) and on 2012-06-21 translated to mads -game source code is split into 5+1 parts: +Game source code is split into 5+3 parts: - scorch.asm is the main game code (with many assorted routines) - grafproc.asm - graphics routines like line or circle - textproc.asm - text routines like list of weapons and shop -- variables.asm - all non-zero page variables and constants +- variables.asm - all non-zero page variables +- constants.asm - various tables of constants - display.asm - display lists and text screen definitions - ai.asm - artificial stupidity of computer opponents +- weapons.asm - general arsenal of tankies -we were trying to use as much macros and pseudo-ops as possible -they are defined in atari.hea and macro.hea files together with many +We were trying to use as much macros and pseudo-ops as possible. +They are defined in atari.hea and macro.hea files together with many atari constants. This way it should be relatively easy to port this code to e.g. C64 After those N years of working on this piece of code we are sure it would be much wiser to write it in C, Action! or MadPascal but on the other hand it is so much fun to type 150 chars -where you want to have y=ax+b :) +where all you want to have y=ax+b :) -originally most variables were in Polish, comments were sparse +Originally most variables were in Polish, comments were sparse but we wanted to release this piece of code to public and due to being always short of time/energy (to finish the game) we decided it must go in 'English' to let other people work on it. -it never happened, but we got some encouraging comments and we are still +It never happened, but we got some encouraging comments and we are still trying to do something from time to time. -with the advent of fujinet (https://fujinet.online/) we are thinking about making the game interplanetary, err, with multiplayer over the net. we'll see. +With the advent of fujinet (https://fujinet.online/) we are thinking about making the game interplanetary, err, with multiplayer over the net. We'll see. ## Changes: +###### Build 132 +2022-03-27 +- fixed bug: https://github.com/pkali/scorch_src/issues/21 Wrong number of shells purchased +- fixed bug: https://github.com/pkali/scorch_src/issues/19 Inventory not cleared on next match. When fixing in a general way (cleaning all variables on game restart) I encountered a very old and nasty bug that made the game running basically by pure chance. +- fixed bug: https://github.com/pkali/scorch_src/issues/18 selecting players using fire sometimes selects more than one. Rewritten keyboard handling to prepare for enhancements like #17 +- tables of constants moved to a separate file, variables declared with .DS directive in preparation for memory map optimization. + ###### Build 131 2022-03-20 - fixed bug: https://github.com/pkali/scorch_src/issues/4 It was really hard one, because I had to unspaghetti our own lousy code :] diff --git a/ai.asm b/ai.asm index 04f7f63..9e13183 100755 --- a/ai.asm +++ b/ai.asm @@ -1,4 +1,4 @@ -; @com.wudsn.ide.asm.mainsourcefile=program.asm +; @com.wudsn.ide.asm.mainsourcefile=scorch.asm ; artificial intelligence of tanks goes here! ; in A there is a level of tank's intelligence diff --git a/display.asm b/display.asm index 13d8edb..1725dff 100755 --- a/display.asm +++ b/display.asm @@ -77,7 +77,7 @@ PlotLine = display + screenHeight*screenBytes ; the last line is plot pointer ;Screen displays go first to avoid crossing 4kb barrier ;----------------------------------------------- OptionsScreen - dta d"Welcome to Scorch ver. 131 (un)2000-2022" + dta d"Welcome to Scorch ver. 132 (un)2000-2022" dta d" Please select option with cursor keys " dta d" and press (Return) to proceed " OptionsHere diff --git a/grafproc.asm b/grafproc.asm index 875d278..ff81ab2 100755 --- a/grafproc.asm +++ b/grafproc.asm @@ -438,18 +438,6 @@ splot8 .proc RTS .endp -;-------------------------------------------------- -WaitForKeyRelease .proc -;-------------------------------------------------- - lda SKSTAT - cmp #$ff - beq KeyIsReleased - cmp #$f7 - bne WaitForKeyRelease -KeyIsReleased - rts -.endp - ;-------------------------------------------------- clearscreen .proc ;-------------------------------------------------- diff --git a/scorch.asm b/scorch.asm index 5d7063f..648a616 100644 --- a/scorch.asm +++ b/scorch.asm @@ -11,13 +11,14 @@ ;(https://github.com/pkali/omc65) ;and on 2012-06-21 translated to mads ; -;game source code is split into 5+1 parts: +;game source code is split into 5+2 parts: ;scorch.asm is the main game code (with many assorted routines) ;grafproc.asm - graphics routines like line or circle ;textproc.asm - text routines like list of weapons and shop ;variables.asm - all non-zero page variables and constans ;display.asm - display lists and text screen definitions ;ai.asm - artificial stupidity of computer opponents +;weapons.asm - general arsenal of tankies ;we were trying to use as much macros and pseudoops as possible ;they are defined in atari.hea and macro.hea files together with many @@ -91,6 +92,7 @@ MaxPlayers = 6 ;----------------------------------------------- icl 'display.asm' ;---------------------------------------------- + icl 'constants.asm' icl 'variables.asm' ;-------------------------------------------------- OffensiveTexts @@ -120,12 +122,11 @@ START mva #0 TankNr -loop01 - jsr EnterPlayerName - inc TankNr - lda TankNr - cmp NumberOfPlayers - bne loop01 +@ jsr EnterPlayerName + inc TankNr + lda TankNr + cmp NumberOfPlayers + bne @- mwa #dl dlptrs lda dmactls @@ -185,27 +186,12 @@ checkForHuman ; if all in skillTable other than 0 then switch to DEMO MODE beq peopleAreHere dex bpl checkForHuman - tay ; no people, just wait a bit pause 150 jmp noKey peopleAreHere - ;key ; only if there is a human player - lda SKSTAT - cmp #$ff - beq checkFire - cmp #$f7 - beq checkFire - jmp noKey ;key pressed, so go -checkFire - ;------------JOY------------- - ;happy happy joy joy - ;check for joystick now - ;fire - lda TRIG0 - bne peopleAreHere ;fire not pressed, so loop - + jsr getkey noKey ldx NumberOfPlayers dex @@ -267,11 +253,11 @@ Round .proc ; lda #0 tax -loop +@ sta previousAngle,x inx - cpx #(clearEnd-PreviousAngle) - bne loop + cpx #(singleRoundVarsEnd-PreviousAngle) + bne @- ldx #5 SettingEnergies @@ -317,11 +303,10 @@ SettingEnergies jsr drawmountains ;draw them jsr drawtanks ;finally draw tanks -.endp ; not really end of the procedure, but just for now. revisit. +.endp ; not really end of the procedure, but just for now. TODO: revisit. ;--------------------round screen is ready--------- - ;mva #0 TankNr mva #0 TankSequencePointer MainRoundLoop @@ -628,70 +613,8 @@ PlayerXdeath .proc jmp AfterExplode - -;-------------------------------------------------- -Explosion .proc -;-------------------------------------------------- - ;cleanup of the soil fall down ranges (left and right) - mwa #screenwidth RangeLeft - lda #0 - sta RangeRight - sta RangeRight+1 - - ldx TankNr - lda ActiveWeapon,x - asl -.endp -Explosion2 .proc - tax - lda ExplosionRoutines+1,x - pha - lda ExplosionRoutines,x - pha - rts -ExplosionRoutines - .word babymissile-1 - .word missile-1 - .word babynuke-1 - .word nuke-1 - .word leapfrog-1 - .word funkybomb-1 - .word mirv-1 - .word deathshead-1 - .word VOID-1 ;napalm - .word VOID-1 ;hotnapalm - .word tracer-1 - .word VOID-1 ;smoketracer - .word babyroller-1 - .word roller-1 - .word heavyroller-1 - .word VOID-1 ;riotcharge - .word VOID-1 ;riotblast - .word riotbomb-1 - .word heavyriotbomb-1 - .word babydigger-1 - .word digger-1 - .word heavydigger-1 - .word babysandhog-1 - .word sandhog-1 - .word heavysandhog-1 - .word dirtclod-1 - .word dirtball-1 - .word tonofdirt-1 - .word VOID-1 ;liquiddirt - .word dirtcharge-1 - .word VOID-1 ;earthdisrupter - .word VOID-1 ;plasmablast - .word laser-1 - -VOID - rts -.endp -; ------------------------ - icl 'weapons.asm' - ;-------------------------------------------------- DecreaseEnergyX .proc ;Decreases energy of player nr X @@ -767,7 +690,7 @@ PMoutofScreen .proc .endp ;-------------------------------------------------- -.nowarn .proc WeaponCleanup; +.proc WeaponCleanup; ; cleaning of the weapon possesion tables ; (99 of Baby Missles, all other weapons=0) ;-------------------------------------------------- @@ -792,8 +715,7 @@ loop05 Initialize .proc ;Initialization sequence ;-------------------------------------------------- - ;jsr GenerateOffensiveTextTables - ;jsr GenerateDeffensiveTextTables +deletePtr = temp lda #0 sta Erase @@ -802,6 +724,33 @@ Initialize .proc sta oldPlotPointerX+1 sta GameIsOver + + ; clean variables + tay + mwa #variablesStart deletePtr +@ tya + sta (deletePtr),y + inw deletePtr + cpw deletePtr #variablesEnd + bne @- + + lda #2 + sta OptionsTable+2 + sta OptionsTable+3 + + mwa #1024 RandBoundaryHigh + mva #$ff LastWeapon + sta HowMuchToFall + mva #1 color + mva #$40 MaxWind + mwa #$0080 Wind + mva #25 gravity + + + + jsr WeaponCleanup + + mva #$2 colpf2s mva #12 colpf3s mva #>WeaponFont chbas @@ -1121,6 +1070,61 @@ nextishigher rts .endp + +;-------------------------------------------------- +getkey .proc; waits for pressing a key and returns pressed value in A +;-------------------------------------------------- + jsr WaitForKeyRelease +@ + lda SKSTAT + cmp #$ff + beq checkJoyGetKey ; key not pressed, check Joy + + lda kbcode + and #$3f ;CTRL and SHIFT ellimination + rts +checkJoyGetKey + ;------------JOY------------- + ;happy happy joy joy + ;check for joystick now + lda JSTICK0 + and #$0f + cmp #$0f + beq notpressedJoyGetKey + tay + lda joyToKeyTable,y + rts +notpressedJoyGetKey + ;fire + lda TRIG0 + bne @- + lda #$0c ;Return key + rts +.endp +;-------------------------------------------------- +getkeynowait .proc; +;-------------------------------------------------- + jsr WaitForKeyRelease + lda kbcode + and #$3f ;CTRL and SHIFT ellimination + rts +.endp +;-------------------------------------------------- +WaitForKeyRelease .proc +;-------------------------------------------------- + lda JSTICK0 + and #$0f + cmp #$0f + bne WaitForKeyRelease + lda TRIG0 + beq WaitForKeyRelease + lda SKSTAT + cmp #$ff + bne WaitForKeyRelease +KeyIsReleased + rts +.endp + ;---------------------------------------------- icl 'textproc.asm' ;---------------------------------------------- diff --git a/scorch.xex b/scorch.xex index 784c843af60d1c8630876d79a86aa8b5928f45bf..8d50ce9096222e1ca394e0a0f07efa110a78748b 100644 GIT binary patch delta 11869 zcmb_i33yahvhF22A!!z|0f9yo2_i;te2p(*8`ShUEq1^0`DR#~JwelG0EGd(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z>L+2cV21yfo5MkB2BK7foQu_<&VCOO0utB-GuX?`*z@=z>9DcQAzYwg&l21a(d(*H z(~%3r^TkWIao_M8#ErIceq(if9~M z;_=YuQoYS8xXb`onCo5UrWeW^Jmydg>K{p?1-BVrTXmF%9ba~vk5rf&D$GiIy8~Nq z5t0e)SL!!hM%iV?*}w(*BOpT$o6O2?EBAlvGbPMMC-*&ER2#cg&2ON{(O*!6i)d11 zt&Z(GFiovk?54k>d+SN2RM&1zs%vfz++Jo5j4U%-GsXWLCXS#-lraCqI%;LBMgq~5c$kdS(>%<8K% zR2xbg-Ju`pr>0iJ1*dd{_tZG+r!b`louSE1_|%gGPBNdKWc+EyrjyL2lML#b_wt_N z&C{1npN?bD&l*Ti+Jq%12!F&sy8`Sb1m~iYPeMqKs03 z0t@d!afKdZ4^<$;^Bi)!Mj1s9K5Bawb=bBF)Li=dX_{xLSUX(X0 ;this is a trick that prevents compiling this file alone - ;===================================================== ; most important non-zero page variables +; used by the given subroutines +; moved to one place for easier +; compilation to e.g. cartridge ; zero page variables are declared in program.s65 module ;===================================================== -NumberOfPlayers .byte 0 ;current number of players (counted from 1) -TankSequence :MaxPlayers .by 0 ;sequence of shooting during the Round -GameIsOver .byte 0 ; 1 - it was the last round in the game +;-------------------------------------------------- +;Variables +;-------------------------------------------------- +variablesStart ; zeroing starts here + +NumberOfPlayers .DS 1 ;current number of players (counted from 1) +TankSequence .DS [MaxPlayers] ;sequence of shooting during the Round +GameIsOver .DS 1 ; 1 - it was the last round in the game ;----------------------------------- skilltable ; computer controlled players' skills (1-8), 0 - human - :MaxPlayers .by 0 + .DS [MaxPlayers] ;----------------------------------- moneyH ;we place zero at the end of prices and money ;and have range from 0 to 99990 (not too much) ;money players have (maybe one more byte is needed?) - :MaxPlayers .by 0 + .DS [MaxPlayers] moneyL - :MaxPlayers .by 0 + .DS [MaxPlayers] ;----------------------------------- gainH ;how much money player gets after the round ;it is gathered during the round basing on energy ;opponents loose after player's shoots - :MaxPlayers .by 0 + .DS [MaxPlayers] gainL - :MaxPlayers .by 0 + .DS [MaxPlayers] ;----------------------------------- looseH ;how much player looses after the round ;calculated from REAL energy loss ;(not only to zero energy) - :MaxPlayers .by 0 + .DS [MaxPlayers] looseL - :MaxPlayers .by 0 + .DS [MaxPlayers] ;----------------------------------- Energy - :MaxPlayers .by 0 -EnergyDecrease .by 0 + .DS [MaxPlayers] +EnergyDecrease .DS 1 eXistenZ - :MaxPlayers .by 0 + .DS [MaxPlayers] LASTeXistenZ ; eXistenZ before shoot - :MaxPlayers .by 0 + .DS [MaxPlayers] ResultsTable ;the results in the gameeeeee - :MaxPlayers .by 0 + .DS [MaxPlayers] TempResults - :MaxPlayers .by 0 + .DS [MaxPlayers] CurrentResult - .byte 0 + .DS 1 ;----------------------------------- EnergyTableL ;shooting Force of the tank during the round - :MaxPlayers .by 0 + .DS [MaxPlayers] EnergyTableH - :MaxPlayers .by 0 ;maxplayers=6 + .DS [MaxPlayers] ;maxplayers=6 MaxEnergyTableL ;Energy of the tank during the round ;(limes superior force of the Shoot) - :MaxPlayers .by 0 ;1000 is the default + .DS [MaxPlayers] ;1000 is the default MaxEnergyTableH - :MaxPlayers .by 0 + .DS [MaxPlayers] ;----------------------------------- AngleTable ;Angle of the barrel of each tank during the round - :MaxPlayers .by (255-90) -NewAngle - .by 0 + .DS [MaxPlayers] +NewAngle .DS 1 ;----------------------------------- ActiveWeapon ;number of the selected weapon - :MaxPlayers .by 0 -WeaponDepleted .by 0 ; if 0 deactivate the weapon and switch to Baby Missile + .DS [MaxPlayers] +WeaponDepleted .DS 1 ; if 0 deactivate the weapon and switch to Baby Missile ;----------------------------------- ;format of the 3-byte static point number used in the game ; 20203.5 => 128 : <20203 : >20203 ;----------------------------------- -L1 .by 0 ; variable used in multiplications (by 10:) -gravity .by 25 ;only the decimal part (1/10 = 25) +L1 .DS 1 ; variable used in multiplications (by 10:) +gravity .DS 1 ;only the decimal part (1/10 = 25) ;----------------------------------- -Wind .wo $0080 ;walue displayed on the screen +Wind .ds 2 ;walue displayed on the screen ;multiplied by 16 (decimal part only) ;----------------------------------- -MaxWind .byte $40 ; -WindOrientation .byte 0 ;(0-right,1-left) +MaxWind .ds 1 ; +WindOrientation .DS 1 ;(0-right,1-left) ;----------------------------------- -Counter .byte 0 ;temporary Counter for outside loops -HitFlag .byte 0 ;1 when missile hit anything +Counter .DS 1 ;temporary Counter for outside loops +HitFlag .DS 1 ;1 when missile hit anything ;----------------------------------- xtankstableL ;X positions of tanks (lower left point) - :MaxPlayers .by 0 + .DS [MaxPlayers] xtankstableH - :MaxPlayers .by 0 + .DS [MaxPlayers] ytankstable ;Y positions of tanks (lower left point) - :MaxPlayers .by 0 + .DS [MaxPlayers] LowResDistances ; coarse stank positions divided by 4 (to be in just one byte) - :MaxPlayers .by 0 + .DS [MaxPlayers] ;----------------------------------- -keycodes ;tables for calculating KeyCode to Screen Code (38 -1 characters) - .byte $3f,$15,$12,$3a,$2a,$38,$3d,$39 - .byte $0d,$01,$05,$00,$25,$23,$08,$0a - .byte $2f,$28,$3e,$2d,$0b,$10,$2e,$16 - .byte $2b,$17,$1f,$1e,$1a,$18,$1d,$1b - .byte $33,$35,$30,$32,$22 ;,$0e <-- hyphen removed from the table, sorry hyphen lovers -keycodesEnd -scrcodes - dta d"abcdefgh" - dta d"ijklmnop" - dta d"qrstuvwx" - dta d"yz123456" - dta d"7890." ; "-" -;----------------------------------- -Erase .byte 0 ; if 1 only mask of the character is printed +Erase .DS 1 ; if 1 only mask of the character is printed ; on the graphics screen. if 0 character is printed normally ;----------------------------------- -RangeLeft .wo 0 ;range of the soil to be fallen down -RangeRight .wo 0 ;it is being set by all Explosions +RangeLeft .DS 2 ;range of the soil to be fallen down +RangeRight .DS 2 ;it is being set by all Explosions ;----------------------------------- -WeaponRangeLeft .wo 0 ;Range of the Explosion of the given weapon -WeaponRangeRight .wo 0 -;-------------------------------------------------- -;-------------------------------------------------- -;Variables used by the given subroutines -;moved to one place for easier -;compilation to e.g. cartridge +WeaponRangeLeft .DS 2 ;Range of the Explosion of the given weapon +WeaponRangeRight .DS 2 ;-------------------------------------------------- ;xroller -HowMuchToFall .byte $FF -HeightRol .byte 0 +HowMuchToFall .ds 1 +HeightRol .DS 1 ;digger -digstartx .word 0 -digstarty .word 0 -diggery .byte 0 -DigLong .byte 0 -digtabxL :8 .by 0 -digtabxH :8 .by 0 -digtabyL :8 .by 0 -digtabyH :8 .by 0 +digstartx .DS 2 +digstarty .DS 2 +diggery .DS 1 +DigLong .DS 1 +digtabxL .DS [8] +digtabxH .DS [8] +digtabyL .DS [8] +digtabyH .DS [8] ;sandhog -sandhogflag .byte 0 ; (0 digger, 8 sandhog) +sandhogflag .DS 1 ; (0 digger, 8 sandhog) ;ofdirt -magic .word 0 ; was tempor2, but it was not compiling!!! (bug in OMC65) +magic .DS 2 ; was tempor2, but it was not compiling!!! (bug in OMC65) ;draw -DrawJumpAddr .word 0 -HowToDraw .byte 0 +DrawJumpAddr .DS 2 +HowToDraw .DS 1 ; bits here mean ; 0 - negative X (go up) ; 1 - negative Y (left) ; 2 - directional value > 1 (more than 45 degrees) ; if all 0 then standart routine -XHit .word 0 -YHit .word 0 -LineLength .word 0 +XHit .DS 2 +YHit .DS 2 +LineLength .DS 2 ;circle -radius .byte 0 -xcircle .word 0 -ycircle .byte 0 -tempcir .word 0 +radius .DS 1 +xcircle .DS 2 +ycircle .DS 1 +tempcir .DS 2 ;TankFalls -IfFallDown .byte 0 -PreviousFall .byte 0 -EndOfTheFallFlag .byte 0 ; in case of the infinite fall -Parachute .byte 0 ; are you insured with parachute? +IfFallDown .DS 1 +PreviousFall .DS 1 +EndOfTheFallFlag .DS 1 ; in case of the infinite fall +Parachute .DS 1 ; are you insured with parachute? ; ------------------------------------------------- ;Flight ;variables for 5 missiles (used for mirv) -xtraj00 :5 .by 0 -xtraj01 :5 .by 0 -xtraj02 :5 .by 0 -vx00 :5 .by 0 -vx01 :5 .by 0 -vx02 :5 .by 0 -vx03 :5 .by 0 -MirvDown :5 .by 0 ; is given missile down? -MirvMissileCounter .byte 0 ; missile Counter (mainly for X) -SmokeTracerFlag .byte 0 ; if Smoketracer +xtraj00 .DS [5] ; 3 bytes of xtraj times 5. Lowest byte +xtraj01 .DS [5] ; middle byte +xtraj02 .DS [5] ; high byte +vx00 .DS [5] +vx01 .DS [5] +vx02 .DS [5] +vx03 .DS [5] +MirvDown .DS [5] ; is given missile down? +MirvMissileCounter .DS 1 ; missile Counter (mainly for X) +SmokeTracerFlag .DS 1 ; if Smoketracer ; ------------------------------------------------- ;CheckCollisionWithTank -vx .byte 0,0,0,0 ;two decimal bytes, two whole bytes (DC.BA) -vy .byte 0,0,0,0 -xtraj .byte 0,0,0 -ytraj .byte 0,0,0 -xtrajold .byte 0,0,0 -ytrajold .byte 0,0,0 -Angle .byte 0 -Force .byte 0,0,0 -Multiplier .byte 0,0,0 -Multiplee .byte 0,0 -Result .byte 0,0,0 -goleft .byte 0 ;if 1 then flights left +vx .ds 4 ; 0,0,0,0 ;two decimal bytes, two whole bytes (DC.BA) +vy .ds 4 ;0,0,0,0 +xtraj .ds 3 ; 0,0,0 +ytraj .ds 3 ; 0,0,0 +xtrajold .ds 3 ; 0,0,0 +ytrajold .ds 3 ; 0,0,0 +Angle .DS 1 +Force .ds 3 ; 0,0,0 +Multiplier .ds 3 ; 0,0,0 +Multiplee .ds 2 ; 0,0 +Result .ds 3 ; 0,0,0 +goleft .DS 1 ;if 1 then flights left ;-------------------------------------------------- ;SoilDown2 -IsEndOfTheFallFlag .byte 0 +IsEndOfTheFallFlag .DS 1 ; ------------------------------------------------- ;unPlot -WhichUnPlot .byte 0 +WhichUnPlot .DS 1 ; max 5 concurrent unPlots -oldplotH :5 .by 0 -oldplotL :5 .by 0 -oldora :5 .by 0 -oldply :5 .by 0 -OldOraTemp .byte 0 -FunkyBombCounter .byte 0 -xtrajfb .word 0 -ytrajfb .word 0 +oldplotH .DS [5] +oldplotL .DS [5] +oldora .DS [5] +oldply .DS [5] +OldOraTemp .DS 1 +FunkyBombCounter .DS 1 +xtrajfb .DS 2 +ytrajfb .DS 2 ; -tracerflag .byte 0 +tracerflag .DS 1 ; ------------------------------------------------- ;TypeChar -mask1 :8 .by 0 -mask2 :8 .by 0 +mask1 .DS [8] +mask2 .DS [8] -char1 :8 .by 0 -char2 :8 .by 0 -color .byte 1 -ybit .byte 0 -tempbyte01 .byte 0 -delta .word 0 -yfloat .word 0 -deltaX .byte 0 -UpNdown .byte 0 +char1 .DS [8] +char2 .DS [8] +color .DS 1 +ybit .DS 1 +tempbyte01 .DS 1 +delta .DS 2 +yfloat .DS 2 +deltaX .DS 1 +UpNdown .DS 1 - -temptankX .word 0 -temptankNr .byte 0 +temptankX .DS 2 +temptankNr .DS 1 ; ------------------------------------------------- ;Variables from textproc.s65 ; tables with numbers of weapons on the right lists ; to be honest - I do not know at the moment what the above ; comment was supposed to mean... + ; OK (2022) so, L1 is list of offensive weapons, L2 - defensive NubersOfWeaponsL1 - :(8*5) .by $ff + .ds 8*5 ; :(8*5) .by $ff NubersOfWeaponsL2 - :(8*2) .by $ff + .ds 8*2 ; :(8*2) .by $ff ; ------------------------------------------------- ; variables storing amount of weapons on the first and second ; list and pointer position HowManyOnTheList1 - .byte 0 + .DS 1 HowManyOnTheList2 - .byte 0 + .DS 1 PositionOnTheList ; pointer position on the list being displayed - .byte 0 -LastWeapon ; number of the last previously purchased weapon + .DS 1 +LastWeapon + ; number of the last previously purchased weapon ; it is necessary when after purchase some weapon ; is removed from the list (because too expensive) ; and the cursor must be placed elsewhere - - .byte $ff + .DS 1 WhichList ; list currently on the screen ; (0-offensive, 1-defensive) - .byte 0 + .DS 1 OffsetDL1 ; offset of the list screen (how many lines).... - .byte 0 + .DS 1 ; ------------------------------------------------- -;Options -OptionsTable .byte 0,0,2,2,0 -OptionsY .byte 0 ;vertical position of cursor on Options screen -maxoptions = 5 ;number of all options (4 in 0.01) -CashOptionH ;(one zero less than on the screen) - .byte 0,>200,>500,>800,>1000 -CashOptionL - .byte 0,<200,<500,<800,<1000 -GravityTable .byte 10,20,25,30,40 -MaxWindTable .byte 5,20,40,60,80 -RoundsTable .byte 10,20,30,40,50 -RoundsInTheGame .byte 10 ;how many rounds in the current game -;------------------------------------------------ ;mark the level PositionInName ; cursor position in name of the player when name input - .byte 0 + .DS 1 DifficultyLevel ; Difficulty Level (human/cpu) - .byte 0 -LevelNameBeginL ; begins of level names - .byte NamesOfLevels,>(NamesOfLevels+10),>(NamesOfLevels+20) - .byte >(NamesOfLevels+32),>(NamesOfLevels+42),>(NamesOfLevels+52) - .byte >(NamesOfLevels+64),>(NamesOfLevels+74),>(NamesOfLevels+84) + .DS 1 ;------------------------------------------------- ;displaydecimal -decimal .word 0 -decimalresult dta d"0000" +decimal .DS 2 +decimalresult .DS 4 ;xmissile -ExplosionRadius .word 0 ;because when adding in xdraw it is double byte +ExplosionRadius .DS 2 ;because when adding in xdraw it is double byte ;round -CurrentRoundNr .byte 0 -FallDown1 .byte 0 -FallDown2 .byte 0 +CurrentRoundNr .DS 1 +FallDown1 .DS 1 +FallDown2 .DS 1 ;leapfrog -LeapFrogAngle .byte 0 +LeapFrogAngle .DS 1 ;laser -LaserCoordinate .word 0,0,0,0 -TanksNames - dta d"1st Tank" - dta d"2nd Tank" - dta d"3rd Tank" - dta d"4th Tank" - dta d"5th Tank" - dta d"6th Tank" +LaserCoordinate .DS 8 ; 2,2,2,2 ; ------------------------------------------------- ; Here go tables with weapons possesed by a given tank ; Index in the table means weapon type @@ -316,834 +275,95 @@ TanksNames ; from $30 the defensive weapons begin TanksWeapons TanksWeapon1 - .by 99 - :63 .by 0 + .DS [64] TanksWeapon2 - .by 99 - :63 .by 0 + .DS [64] TanksWeapon3 - .by 99 - :63 .by 0 + .DS [64] TanksWeapon4 - .by 99 - :63 .by 0 + .DS [64] TanksWeapon5 - .by 99 - :63 .by 0 + .DS [64] TanksWeapon6 - .by 99 - :63 .by 0 -TanksWeaponsTableL - .by TanksWeapon1,>TanksWeapon2,>TanksWeapon3,>TanksWeapon4,>TanksWeapon5,>TanksWeapon6 + .DS [64] mountaintable ;table of mountains (size=screenwidth) - :screenwidth .by 0 - .by 0 ; additional byte for fallout (sometimes 1 pixel) + .DS [screenwidth] + .DS 1 ; additional byte for fallout (sometimes 1 pixel) mountaintable2 ;table of mountains (size=screenwidth) - :screenwidth .by 0 - .by 0 ; additional byte for fallout (sometimes 1 pixel) + .DS [screenwidth] + .DS 1 ; additional byte for fallout (sometimes 1 pixel) mountaintable3 - :screenwidth .by 0 - .by 0 ; additional byte for fallout (sometimes 1 pixel) + .ds [screenwidth] + .ds 0 ; additional byte for fallout (sometimes 1 pixel) MountaintableEnd ;good for table clearing ;---------------------------------------------- -TextPositionX .word 0 -TextPositionY .byte 0 -TextAddress .word 0 -TextCounter .byte 0 -TextNumberOff .byte 0 +TextPositionX .DS 2 +TextPositionY .DS 1 +TextAddress .DS 2 +TextCounter .DS 1 +TextNumberOff .DS 1 ;-------------- TankTempY - .byte 0 + .DS 1 +;-------------- single round variables -------------- +previousAngle + .DS [MaxPlayers] +previousEnergyL + .DS [MaxPlayers] +previousLeftRange + .DS [MaxPlayers] +previousEnergyH + .DS [MaxPlayers] +previousRightAngle + .DS [MaxPlayers] +RandBoundaryLow + .ds 2 +RandBoundaryHigh + .ds 2 +AngleTablePointer + .DS 1 +singleRoundVarsEnd ;---------------------------------------------- ; 4x4 texts ;---------------------------------------------- LineAddress4x4 - .word 0 + .DS 2 LineCharNr - .byte 0 + .DS 1 LineXdraw - .word 0 + .DS 2 LineYdraw - .byte 0 -LineTop - dta d"(%%%%%%%%%%%%)" - .byte $ff -;# - vertical, () * +, % - horizontal -LineBottom - dta d"*%%%%%%%%%%%%+" - .byte $ff -LineEmpty - dta d"# #" - .byte $ff -LineHeader1 - dta d"# ROUND: " -RoundNrDisplay - dta d" #" - .byte $ff -LineHeader2 - dta d"# RESULTS #" - .byte $ff -LineGameOver - dta d"# GAME OVER #" - .byte $ff - + .DS 1 ;----------- -ResultLineBuffer - dta d" " - .byte $ff ResultX - .word 0 + .DS 2 ResultY - .byte 0 + .DS 1 ResultOfTankNr - .byte 0 + .DS 1 -;----------- -pmtableL ; addressess of the P/M memory for 5 tanks (6th is without P/M background) - .byte <(pmgraph+$400) - .byte <(pmgraph+$500) - .byte <(pmgraph+$600) - .byte <(pmgraph+$700) - .byte <(pmgraph+$300) ; this is a missile background -pmtableH - .byte >(pmgraph+$400) - .byte >(pmgraph+$500) - .byte >(pmgraph+$600) - .byte >(pmgraph+$700) - .byte >(pmgraph+$300) -;----------- -; this table changes Angle to the appropriate tank character -BarrelTableL - .byte $02,$02,$02,$02,$02,$02,$02,$02 - .byte $04,$04,$04,$04,$04,$04,$04,$04 - .byte $06,$06,$06,$06,$06,$06,$06,$06,$06 - .byte $08,$08,$08,$08,$08,$08,$08,$08 - .byte $0a,$0a,$0a,$0a,$0a,$0a,$0a,$0a - .byte $0c,$0c,$0c,$0c,$0c,$0c,$0c,$0c,$0c - .byte $0e,$0e,$0e,$0e,$0e,$0e,$0e,$0e - .byte $10,$10,$10,$10,$10,$10,$10,$10 - .byte $12,$12,$12,$12,$12,$12,$12,$12,$12 - .byte $14,$14,$14,$14,$14,$14,$14,$14 - .byte $16,$16,$16,$16,$16,$16,$16,$16 -BarrelTableR - .byte $2c,$2c,$2c,$2c,$2c,$2c,$2c,$2c - .byte $2a,$2a,$2a,$2a,$2a,$2a,$2a,$2a - .byte $28,$28,$28,$28,$28,$28,$28,$28,$28 - .byte $26,$26,$26,$26,$26,$26,$26,$26 - .byte $24,$24,$24,$24,$24,$24,$24,$24 - .byte $22,$22,$22,$22,$22,$22,$22,$22,$22 - .byte $20,$20,$20,$20,$20,$20,$20,$20 - .byte $1e,$1e,$1e,$1e,$1e,$1e,$1e,$1e - .byte $1c,$1c,$1c,$1c,$1c,$1c,$1c,$1c,$1c - .byte $1a,$1a,$1a,$1a,$1a,$1a,$1a,$1a - .byte $18,$18,$18,$18,$18,$18,$18,$18 - -sintable - .byte 0 - .byte 4 - .byte 8 - .byte 13 - .byte 17 - .byte 22 - .byte 26 - .byte 31 - .byte 35 - .byte 40 - .byte 44 - .byte 48 - .byte 53 - .byte 57 - .byte 61 - .byte 66 - .byte 70 - .byte 74 - .byte 79 - .byte 83 - .byte 87 - .byte 91 - .byte 95 - .byte 100 - .byte 104 - .byte 108 - .byte 112 - .byte 116 - .byte 120 - .byte 124 - .byte 128 - .byte 131 - .byte 135 - .byte 139 - .byte 143 - .byte 146 - .byte 150 - .byte 154 - .byte 157 - .byte 161 - .byte 164 - .byte 167 - .byte 171 - .byte 174 - .byte 177 - .byte 181 - .byte 184 - .byte 187 - .byte 190 - .byte 193 - .byte 196 - .byte 198 - .byte 201 - .byte 204 - .byte 207 - .byte 209 - .byte 212 - .byte 214 - .byte 217 - .byte 219 - .byte 221 - .byte 223 - .byte 226 - .byte 228 - .byte 230 - .byte 232 - .byte 233 - .byte 235 - .byte 237 - .byte 238 - .byte 240 - .byte 242 - .byte 243 - .byte 244 - .byte 246 - .byte 247 - .byte 248 - .byte 249 - .byte 250 - .byte 251 - .byte 252 - .byte 252 - .byte 253 - .byte 254 - .byte 254 - .byte 255 - .byte 255 - .byte 255 - .byte 255 - .byte 255 - .byte 255 ;anti self destruction byte - -costable - .byte 255 ;anti self destruction byte - .byte 255 - .byte 255 - .byte 255 - .byte 255 - .byte 255 - .byte 254 - .byte 254 - .byte 253 - .byte 252 - .byte 252 - .byte 251 - .byte 250 - .byte 249 - .byte 248 - .byte 247 - .byte 246 - .byte 244 - .byte 243 - .byte 242 - .byte 240 - .byte 238 - .byte 237 - .byte 235 - .byte 233 - .byte 232 - .byte 230 - .byte 228 - .byte 226 - .byte 223 - .byte 221 - .byte 219 - .byte 217 - .byte 214 - .byte 212 - .byte 209 - .byte 207 - .byte 204 - .byte 201 - .byte 198 - .byte 196 - .byte 193 - .byte 190 - .byte 187 - .byte 184 - .byte 181 - .byte 177 - .byte 174 - .byte 171 - .byte 167 - .byte 164 - .byte 161 - .byte 157 - .byte 154 - .byte 150 - .byte 146 - .byte 143 - .byte 139 - .byte 135 - .byte 131 - .byte 128 - .byte 124 - .byte 120 - .byte 116 - .byte 112 - .byte 108 - .byte 104 - .byte 100 - .byte 95 - .byte 91 - .byte 87 - .byte 83 - .byte 79 - .byte 74 - .byte 70 - .byte 66 - .byte 61 - .byte 57 - .byte 53 - .byte 48 - .byte 44 - .byte 40 - .byte 35 - .byte 31 - .byte 26 - .byte 22 - .byte 17 - .byte 13 - .byte 8 - .byte 4 - .byte 0 - -linetableL - :screenheight .by <(display+screenBytes*#) - ;:20 .by <(display+screenBytes*#) - .by (display+screenBytes*#) - ;:20 .by >(display+screenBytes*#) - .by >PlotLine ;---------------------------- oldPlotPointerX - .wo 0 + .ds 2 ;---------------------------- ;PutChar4x4 -LoopCounter4x4 .byte 0 -y4x4 .byte 0 -StoreA4x4 .byte 0 -Xcounter4x4 .byte 0 -nibbler4x4 .byte 0 -CharCode4x4 .byte 0 -plot4x4color .byte 0 ;1-white, 0-background +LoopCounter4x4 .DS 1 +y4x4 .DS 1 +StoreA4x4 .DS 1 +Xcounter4x4 .DS 1 +nibbler4x4 .DS 1 +CharCode4x4 .DS 1 +plot4x4color .DS 1 ;1-white, 0-background + -bittable - .byte $80,$40,$20,$10,$08,$04,$02,$01 -bittable2 - .byte $7f,$bf,$df,$ef,$f7,$fb,$fd,$fe ;---------------------------- -disktance ;tanks distance - .byte 0,0 - .byte screenwidth/3 - .byte screenwidth/4 - .byte screenwidth/5 - .byte screenwidth/6 - .byte screenwidth/7 - ;max number of players=6 +;Options +OptionsTable .ds 5 +OptionsY .DS 1 ;vertical position of cursor on Options screen -; this table is for deciding where a tank should slide -; accordingly to what is below the tank -; there are 3 bits used here -; bit 0 - go down -; bit 1 - go left -; bit 2 - go right -; position in the table equals to bit pattern of soil below tank - -WhereToSlideTable - ; we have 3 bits: 0 - go down, 1 - go right, 2 - go left - ;original table - ;.BYTE 1,5,4,4,4,4,4,4,0,0,0,0,0,0,0,0 - ;.BYTE 0,0,0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- .BYTE 2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - .BYTE 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - .BYTE 2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - .BYTE 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - .BYTE 2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - .BYTE 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - -EndOfTheBarrelX - .byte 4,4,4,4,4,4,4,4,4,4,4 - .byte 5,5,5,5,5,5,5,5,5,5 - .byte 6,6,6,6,6,6,6,6,6 - .byte 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7 - .byte 7,7,7,7,7,7,7,7,7 - .byte 7,7,7,7,7,7,7,7,7,7 - .byte 7,7,7,7,7,7,7,7,7,7,7,7,7 - .byte 7,7,7,7,7,7,7,7,7,7,7,7,7,7 - - .byte 0,0,0,0,0,0,0,0,0,0 - .byte 0,0,0,0,0,0,0,0,0,0 - .byte 0,0,0,0,0,0,0,0,0,0 - .byte 0,0,0,0,0,0,0,0,0,0 - .byte 0,0,0,0,0,0,0,0,0,0 - .byte 0,0,0,0,0,0,0,0,0,0 - .byte 0,0,0,0,0,0,0,0,0,0 - .byte 0,0,0,0 - - .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0 - .byte 0,0,0,0,0,0,0,0,0,0,0,0,0 - .byte 0,0,0,0,0,0,0,0,0,0 - .byte 0,0,0,0,0,0,0,0,0 - .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - .byte 1,1,1,1,1,1,1,1,1 - .byte 2,2,2,2,2,2,2,2,2,2 - .byte 3,3,3,3,3,3,3,3,3,3,3 - -EndOfTheBarrelY - .byte 7,7,7,7,7,7,7,7,7,7,7 - .byte 7,7,7,7,7,7,7,7,7,7 - .byte 7,7,7,7,7,7,7,7,7 - .byte 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7 - .byte 6,6,6,6,6,6,6,6,6 - .byte 5,5,5,5,5,5,5,5,5,5 - .byte 4,4,4,4,4,4,4,4,4,4,4,4,4 - .byte 3,3,3,3,3,3,3,3,3,3,3,3,3,3 - - .byte 0,0,0,0,0,0,0,0,0,0 - .byte 0,0,0,0,0,0,0,0,0,0 - .byte 0,0,0,0,0,0,0,0,0,0 - .byte 0,0,0,0,0,0,0,0,0,0 - .byte 0,0,0,0,0,0,0,0,0,0 - .byte 0,0,0,0,0,0,0,0,0,0 - .byte 0,0,0,0,0,0,0,0,0,0 - .byte 0,0,0,0 - - .byte 3,3,3,3,3,3,3,3,3,3,3,3,3,3 - .byte 4,4,4,4,4,4,4,4,4,4,4,4,4 - .byte 5,5,5,5,5,5,5,5,5,5 - .byte 6,6,6,6,6,6,6,6,6 - .byte 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7 - .byte 7,7,7,7,7,7,7,7,7 - .byte 7,7,7,7,7,7,7,7,7,7 - .byte 7,7,7,7,7,7,7,7,7,7,7 -;------------------------------------------------- - -TanksNamesDefault - dta d"1st Tank" - dta d"2nd Tank" - dta d"3rd Tank" - dta d"4th Tank" - dta d"5th Tank" - dta d"6th Tank" - -;Weapon prices (*10 on screen) -price_Baby_Missile___ = 0 ;_0 -price_Missile________ = 96 ;_1 -price_Baby_Nuke______ = 111 ;_2 -price_Nuke___________ = 144 ;_3 -price_LeapFrog_______ = 192 ;_4 -price_Funky_Bomb_____ = 293 ;_5 -price_MIRV___________ = 456 ;_6 -price_Death_s_Head___ = 337 ;_7 -price_Napalm_________ = 0 ;496 ;_8 -price_Hot_Napalm_____ = 0 ;511 ;_9 -price_Tracer_________ = 102 ;_10 -price_Smoke_Tracer___ = 291 ;_11 -price_Baby_Roller____ = 689 ;_12 -price_Roller_________ = 600 ;_13 -price_Heavy_Roller___ = 592 ;_14 -price_Riot_Charge____ = 0 ;330 ;_15 -price_Riot_Blast_____ = 0 ;341 ;_16 -price_Riot_Bomb______ = 369 ;_17 -price_Heavy_Riot_Bomb = 322 ;_18 -price_Baby_Digger____ = 336 ;_19 -price_Digger_________ = 276 ;_20 -price_Heavy_Digger___ = 253 ;_21 -price_Baby_Sandhog___ = 218 ;_22 -price_Sandhog________ = 191 ;_23 -price_Heavy_Sandhog__ = 305 ;_24 -price_Dirt_Clod______ = 104 ;_25 -price_Dirt_Ball______ = 130 ;_26 -price_Ton_of_Dirt____ = 171 ;_27 -price_Liquid_Dirt____ = 0 ;530 ;_28 -price_Dirt_Charge____ = 581 ;_29 -price_Earth_Disrupter = 0 ;430 ;_30 -price_Plasma_Blast___ = 0 ;274 ;_31 -price_Laser__________ = 577 ;_32 -price______________33 = 0 -price______________34 = 0 -price______________35 = 0 -price______________36 = 0 -price______________37 = 0 -price______________38 = 0 -price______________39 = 0 -price______________40 = 0 -price______________41 = 0 -price______________42 = 0 -price______________43 = 0 -price______________44 = 0 -price______________45 = 0 -price______________46 = 0 -price______________47 = 0 -price_Heat_Guidance__ = 0 ;_48_($30) -price_Bal_Guidance___ = 0 ;_49 -price_Horz_Guidance__ = 0 ;_50 -price_Vert_Guidance__ = 0 ;_51 -price_Lazy_Boy_______ = 0 ;_52 -price_Parachute______ = 1100 ;_53 -price_Battery________ = 0 ;_54 -price_Mag_Deflector__ = 0 ;_55 -price_Shield_________ = 0 ;_56 -price_Force_Shield___ = 0 ;_57 -price_Heavy_Shield___ = 0 ;_58 -price_Super_Mag______ = 0 ;_59 -price_Auto_Defense___ = 0 ;_60 -price_Fuel_Tank______ = 0 ;_61 -price_Contact_Trigger = 0 ;_62 -price______________63 = 0 - -WeaponPriceH ; weapons prices (tables with prices of weapons) - .by >price_Baby_Missile___ - .by >price_Missile________ - .by >price_Baby_Nuke______ - .by >price_Nuke___________ - .by >price_LeapFrog_______ - .by >price_Funky_Bomb_____ - .by >price_MIRV___________ - .by >price_Death_s_Head___ - .by >price_Napalm_________ - .by >price_Hot_Napalm_____ - .by >price_Tracer_________ - .by >price_Smoke_Tracer___ - .by >price_Baby_Roller____ - .by >price_Roller_________ - .by >price_Heavy_Roller___ - .by >price_Riot_Charge____ - .by >price_Riot_Blast_____ - .by >price_Riot_Bomb______ - .by >price_Heavy_Riot_Bomb - .by >price_Baby_Digger____ - .by >price_Digger_________ - .by >price_Heavy_Digger___ - .by >price_Baby_Sandhog___ - .by >price_Sandhog________ - .by >price_Heavy_Sandhog__ - .by >price_Dirt_Clod______ - .by >price_Dirt_Ball______ - .by >price_Ton_of_Dirt____ - .by >price_Liquid_Dirt____ - .by >price_Dirt_Charge____ - .by >price_Earth_Disrupter - .by >price_Plasma_Blast___ - .by >price_Laser__________ - .by >price______________33 - .by >price______________34 - .by >price______________35 - .by >price______________36 - .by >price______________37 - .by >price______________38 - .by >price______________39 - .by >price______________40 - .by >price______________41 - .by >price______________42 - .by >price______________43 - .by >price______________44 - .by >price______________45 - .by >price______________46 - .by >price______________47 - .by >price_Heat_Guidance__ - .by >price_Bal_Guidance___ - .by >price_Horz_Guidance__ - .by >price_Vert_Guidance__ - .by >price_Lazy_Boy_______ - .by >price_Parachute______ - .by >price_Battery________ - .by >price_Mag_Deflector__ - .by >price_Shield_________ - .by >price_Force_Shield___ - .by >price_Heavy_Shield___ - .by >price_Super_Mag______ - .by >price_Auto_Defense___ - .by >price_Fuel_Tank______ - .by >price_Contact_Trigger - .by >price______________63 - -WeaponPriceL - .by 0 ;this is a trick that prevents compiling this file alone +;-------------------------------------------------- +Explosion .proc +;-------------------------------------------------- + ;cleanup of the soil fall down ranges (left and right) + mwa #screenwidth RangeLeft + lda #0 + sta RangeRight + sta RangeRight+1 + + ldx TankNr + lda ActiveWeapon,x + asl +.endp +Explosion2 .proc + tax + lda ExplosionRoutines+1,x + pha + lda ExplosionRoutines,x + pha + rts +ExplosionRoutines + .word babymissile-1 + .word missile-1 + .word babynuke-1 + .word nuke-1 + .word leapfrog-1 + .word funkybomb-1 + .word mirv-1 + .word deathshead-1 + .word VOID-1 ;napalm + .word VOID-1 ;hotnapalm + .word tracer-1 + .word VOID-1 ;smoketracer + .word babyroller-1 + .word roller-1 + .word heavyroller-1 + .word VOID-1 ;riotcharge + .word VOID-1 ;riotblast + .word riotbomb-1 + .word heavyriotbomb-1 + .word babydigger-1 + .word digger-1 + .word heavydigger-1 + .word babysandhog-1 + .word sandhog-1 + .word heavysandhog-1 + .word dirtclod-1 + .word dirtball-1 + .word tonofdirt-1 + .word VOID-1 ;liquiddirt + .word dirtcharge-1 + .word VOID-1 ;earthdisrupter + .word VOID-1 ;plasmablast + .word laser-1 + +VOID + rts +.endp +; ------------------------ ; ------------------------ .proc babymissile @@ -811,7 +870,6 @@ ContinueToCheckMaxForce2 jsr DrawTankNr wait ; best after drawing a tank - ;wait ;keyboard reading @@ -822,6 +880,8 @@ ContinueToCheckMaxForce2 ; $f3 - shift+key notpressed + lda TRIG0 + beq notpressed lda SKSTAT cmp #$ff beq checkJoy @@ -866,11 +926,9 @@ checkJoy notpressedJoy ;fire lda TRIG0 - bne JNotFire - lda #$21 - jmp jumpFromStick -JNotFire - jmp notpressed + jeq pressedSpace + jmp notpressed + ; pressedUp ;force increaseeee! @@ -1060,7 +1118,6 @@ AfterStrongShoot clc lda xtraj+1 adc EndOfTheBarrelX,y ; correction of X - ;adc #4 sta xtraj+1 lda xtraj+2 adc #0 @@ -1068,7 +1125,6 @@ AfterStrongShoot sec lda ytraj+1 sbc EndOfTheBarrelY,y ; correction of Y - ;sbc #7 sta ytraj+1 lda ytraj+2 sbc #0 @@ -1078,7 +1134,6 @@ AfterStrongShoot jsr Flight mva #1 color - ;jsr WaitForKeyRelease rts .endp