Merge pull request #108 from pkali/develop

build 147
This commit is contained in:
2022-07-10 21:14:18 -04:00
committed by GitHub
16 changed files with 540 additions and 334 deletions
+19 -4
View File
@@ -14,9 +14,9 @@ Contributors:
- Bocianu (@bocianu) - important ideas, FujiNet implementation, QA
- Emkay - splash screen music
QA: Probabilitydragon, KrzysRog, Beeblebrox, EnderDude, lopezpb, Dracon, brad-colbert
QA: Probabilitydragon, KrzysRog, Beeblebrox, EnderDude, lopezpb, Dracon, brad-colbert, archon800, Shaggy the Atarian
You can contact us at pecus@poczta.fm or pirx@5oft.pl
You can contact us via [AtariAge](https://atariage.com) or [AtariOnLine](https://atarionline.pl) forums.
This source code was originally compiled under [OMC65 crossassembler](https://github.com/pkali/omc65) and on 2012-06-21 translated to [mads](https://github.com/tebe6502/Mad-Assembler).
@@ -47,6 +47,21 @@ With the advent of fujinet (https://fujinet.online/) we are thinking about makin
## Changes:
###### Build 147
2022-07-10
LOST build. We were watching [LOST party](https://www.lostparty.pl/2022/) streams so maybe a little less done, but still some nice improvements.
- new weapons by @Pecusx - Napalm and Hot Napalm. Fire penetrates all shields, so beware!
- status bar showing outdated info on the beginning of the round fix
- various small optimizations incl. memory usage, soildown, weapon ranges
- improved shapes of Heavy and Force Shields
Issues closed:
- revert to the old but slightly improved version of showing angles (#105)
- zero page loading eliminated (#106)
- active player name appear over his tank when aiming (#107)
- configurable mountain heights (The Netherlands, Belgium, Czechia, Switzerland, Nepal) (#86)
- angle speeds up when joystick / keyboard are pressed (#75)
###### Build 146
2022-07-03
Super heavy rewrite build.
@@ -55,9 +70,9 @@ Not much changed visually since the last build, but really large parts of the co
- silly angle system rewritten to a proper, primary school angling. BTW - I had to dig into 8th grade trig to make it work. About 200 bytes saved, complexity reduced. Next build will have improved angle speed UI. I will also allow for an easier improvement of tank visuals.
- Weapon price and quantity balance - this is our honest attempt to make game more fun. We'll accept any critique and improvement proposals.
- New AI opponent - Tosser! Not much better than Poolshark, but still beats sharks most of the time.
- AI opponents can purchase defensive weapons what makes playing against AI somewhat more challenging.
- AI opponents can purchase defensive weapons which make playing against AI somewhat more challenging.
- Improved Laser. It is still not ideal, but better. Still hard to aim :]
- Few small parachute related bugs fixed
- Few small parachute-related bugs fixed
- Death's Head bug fix
Issues closed:
+14 -14
View File
@@ -31,19 +31,19 @@ loop
;----------------------------------------------
.proc ArtificialIntelligence ;
; A - skill of the TankNr
; A - skill of the TankNr (in X)
; returns shoot energy and angle in
; ForceTable/L/H and AngleTable
;----------------------------------------------
asl
tax
:2 dex ;credit KK
lda AIRoutines+1,x
tay
:2 dey ;credit KK
lda AIRoutines+1,y
pha
lda AIRoutines,x
lda AIRoutines,y
pha
ldx TankNr ; common values used in AI routines
; common values used in AI routines
; address of weapons table (for future use)
lda TanksWeaponsTableL,x
sta temp
@@ -57,10 +57,10 @@ AIRoutines
.word Shooter-1 ;Shooter
.word Poolshark-1 ;Poolshark
.word Tosser-1 ;Tosser
.word Poolshark-1 ;Chooser
.word Poolshark-1 ;Spoiler
.word Poolshark-1 ;Cyborg
.word Poolshark-1 ;Unknown
.word Tosser-1 ;Chooser
.word Tosser-1 ;Spoiler
.word Tosser-1 ;Cyborg
.word Tosser-1 ;Unknown
;----------------------------------------------
.proc Moron
@@ -335,10 +335,10 @@ PurchaseAIRoutines
.word ShooterPurchase-1 ;ShooterPurchase
.word PoolsharkPurchase-1 ;PoolsharkPurchase
.word TosserPurchase-1 ;TosserPurchase
.word PoolsharkPurchase-1 ;ChooserPurchase
.word PoolsharkPurchase-1 ;SpoilerPurchase
.word PoolsharkPurchase-1 ;CyborgPurchase
.word PoolsharkPurchase-1 ;UnknownPurchase
.word TosserPurchase-1 ;ChooserPurchase
.word TosserPurchase-1 ;SpoilerPurchase
.word TosserPurchase-1 ;CyborgPurchase
.word TosserPurchase-1 ;UnknownPurchase
;----------------------------------------------
.proc MoronPurchase
+19 -16
View File
@@ -23,17 +23,8 @@ bptr .ds 2
cur_pos .ds 1
chn_bits .ds 1
bit_data .byte 1
bit_data .ds 1
.proc get_byte
lda song_data+1
inc song_ptr
bne skip
inc song_ptr+1
skip
rts
.endp
song_ptr = get_byte + 1
fcnt .ds 2
@@ -86,6 +77,8 @@ buffers
;
.proc init_song
mva #1 bit_data
; Example: here initializes song pointer:
;mwa #song_data song_ptr
@@ -182,18 +175,28 @@ skip_chn:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Check for ending of song and jump to the next frame
;
.proc check_end_song
lda song_ptr + 1
cmp #>song_end
; not checking really so the tune gets funky :)))
;lda song_ptr + 1
;cmp #>song_end
;bne wait_frame
lda song_ptr
cmp #<song_end
;lda song_ptr
;cmp #<song_end
;bne wait_frame
.endp
end_loop
rts
song_ptr = get_byte + 1
.proc get_byte
lda song_data+1
inc song_ptr
bne skip
inc song_ptr+1
skip
rts
.endp
main
jsr init_song
+121 -118
View File
@@ -1,125 +1,128 @@
.proc talk
L0 dta c"IN TIMES OF TROUBLE, GO WITH WHAT YOU KNOW."
L1 dta c"DIE!"
L2 dta c"EAT MY SHORTS!"
L3 dta c"YOU'RE TOAST!"
L4 dta c"BANZAI!"
L5 dta c"FROM HELL'S HEART I STAB AT THEE..."
L6 dta c"I DIDN'T DO IT. NOBODY SAW ME DO IT."
L7 dta c"TAKE A HIKE!"
L8 dta c"YOU'RE DEAD MEAT."
L9 dta c"MAKE MY DAY."
L10 dta c"CHARGE!"
L11 dta c"ATTACK!"
L12 dta c"YOU'RE OUTTA HERE."
L13 dta c"WATTSA MATTA YOU?"
L14 dta c"FREEZE, OR I'LL SHOOT!"
L15 dta c"HA HA HA."
L16 dta c"WE COME IN PEACE - SHOOT TO KILL!"
L17 dta c"IN YOUR FACE!"
L18 dta c"DIE COMMIE PIG!"
L19 dta c"I LOVE THE SMELL OF NAPALM IN THE MORNING."
L20 dta c"VICTORY!"
L21 dta c"SHOW SOME RESPECT."
L22 dta c"JUST WHO DO YOU THINK YOU ARE?"
L23 dta c"LOOK OUT BELOW!"
L24 dta c"KNOCK, KNOCK."
L25 dta c"LOOK OVER THERE."
L26 dta c"GUESS WHAT'S COMING FOR DINNER?"
L27 dta c"MERRY CHRISTMAS."
L28 dta c"OPEN WIDE!"
L29 dta c"HERE GOES NOTHING..."
L30 dta c"DON'T WORRY, IT ISN'T A LIVE ROUND."
L31 dta c"BLOOD, PAIN, VIOLENCE!"
L32 dta c"TAKE THIS, SISSY!"
L33 dta c"I SHALL FLATTEN YOU!"
L34 dta c"I SHALL SMASH YOUR UGLY TANK!"
L35 dta c"I WONDER WHAT THIS BUTTON DOES?"
L36 dta c"DON'T TAKE THIS PERSONALLY."
L37 dta c"WOULD THIS MAKE YOU MAD?"
L38 dta c"I TOLD YOU TO LEAVE MY SISTER ALONE!"
L39 dta c"I COULD SPARE YOU, BUT WHY?"
L40 dta c"MY BOMB IS BIGGER THAN YOURS."
L41 dta c"DON'T FORGET ABOUT ME!"
L42 dta c"HASTA LA VISTA, BABY!"
L43 dta c"THIS IS YOUR BRAIN ON SCORCH."
L44 dta c"TAKE THIS!"
L45 dta c"THIS SCREEN AIN'T BIG ENOUGH FOR THE BOTH OF US."
L46 dta c"DIE, ALIEN SWINE!"
L47 dta c"SAY ARRGGHHHHH...."
L48 dta c"I SHALL OIL MY TURRET WITH YOUR BLOOD."
L49 dta c"DIE, TANK-SCUM!"
L50 dta c"I'M GONNA BREAK YOUR FACE!"
L51 dta c"MAMA SAID KNOCK YOU OUT!"
L52 dta c"I HOPE YOU ENJOY PAIN!"
L0 dta d"IN TIMES OF TROUBLE, GO WITH WHAT YOU KNOW."
L1 dta d"DIE!"
L2 dta d"EAT MY SHORTS!"
L3 dta d"YOU'RE TOAST!"
L4 dta d"BANZAI!"
L5 dta d"FROM HELL'S HEART I STAB AT THEE..."
L6 dta d"I DIDN'T DO IT. NOBODY SAW ME DO IT."
L7 dta d"TAKE A HIKE!"
L8 dta d"YOU'RE DEAD MEAT."
L9 dta d"MAKE MY DAY."
L10 dta d"CHARGE!"
L11 dta d"ATTACK!"
L12 dta d"YOU'RE OUTTA HERE."
L13 dta d"WATTSA MATTA YOU?"
L14 dta d"FREEZE, OR I'LL SHOOT!"
L15 dta d"HA HA HA."
L16 dta d"WE COME IN PEACE - SHOOT TO KILL!"
L17 dta d"IN YOUR FACE!"
L18 dta d"DIE COMMIE PIG!"
L19 dta d"I LOVE THE SMELL OF NAPALM IN THE MORNING."
L20 dta d"VICTORY!"
L21 dta d"SHOW SOME RESPECT."
L22 dta d"JUST WHO DO YOU THINK YOU ARE?"
L23 dta d"LOOK OUT BELOW!"
L24 dta d"KNOCK, KNOCK."
L25 dta d"LOOK OVER THERE."
L26 dta d"GUESS WHAT'S COMING FOR DINNER?"
L27 dta d"MERRY CHRISTMAS."
L28 dta d"OPEN WIDE!"
L29 dta d"HERE GOES NOTHING..."
L30 dta d"DON'T WORRY, IT ISN'T A LIVE ROUND."
L31 dta d"BLOOD, PAIN, VIOLENCE!"
L32 dta d"TAKE THIS, SISSY!"
L33 dta d"I SHALL FLATTEN YOU!"
L34 dta d"I SHALL SMASH YOUR UGLY TANK!"
L35 dta d"I WONDER WHAT THIS BUTTON DOES?"
L36 dta d"DON'T TAKE THIS PERSONALLY."
L37 dta d"WOULD THIS MAKE YOU MAD?"
L38 dta d"I TOLD YOU TO LEAVE MY SISTER ALONE!"
L39 dta d"I COULD SPARE YOU, BUT WHY?"
L40 dta d"MY BOMB IS BIGGER THAN YOURS."
L41 dta d"DON'T FORGET ABOUT ME!"
L42 dta d"HASTA LA VISTA, BABY!"
L43 dta d"THIS IS YOUR BRAIN ON SCORCH."
L44 dta d"TAKE THIS!"
L45 dta d"THIS SCREEN AIN'T BIG ENOUGH FOR THE BOTH OF US."
L46 dta d"DIE, ALIEN SWINE!"
L47 dta d"SAY ARRGGHHHHH...."
L48 dta d"I SHALL OIL MY TURRET WITH YOUR BLOOD."
L49 dta d"DIE, TANK-SCUM!"
L50 dta d"I'M GONNA BREAK YOUR FACE!"
L51 dta d"MAMA SAID KNOCK YOU OUT!"
L52 dta d"I HOPE YOU ENJOY PAIN!"
;--------------------------------
L53 dta c"PARTING IS SUCH SWEET SORROW... NOT!"
L54 dta c"UGH!"
L55 dta c"AARGH!"
L56 dta c"AAAGGHHH!"
L57 dta c"I'M MELTING!"
L58 dta c"OOF.."
L59 dta c"OH!"
L60 dta c"EEEK!"
L61 dta c"AACCH!"
L62 dta c"I HATE IT WHEN THAT HAPPENS."
L63 dta c"ONE DIRECT HIT CAN RUIN YOUR WHOLE DAY."
L64 dta c"OH NO!"
L65 dta c"NOT ME!"
L66 dta c"OUCH."
L67 dta c"OH NO, NOT AGAIN."
L68 dta c"ANOTHER ONE BITES THE DUST."
L69 dta c"GOODBYE."
L70 dta c"HELP ME!"
L71 dta c"FAREWELL, CRUEL WORLD."
L72 dta c"REMEMBER THE ALAMO!"
L73 dta c"OH MAN!"
L74 dta c"DOOUGH!"
L75 dta c"ANOTHER DAY, ANOTHER BOMB."
L76 dta c"THIS IS THE END, MY ONLY FRIEND."
L77 dta c"IT'S ALL OVER."
L78 dta c"THE FAT LADY SANG."
L79 dta c"WHY DOES EVERYTHING HAPPEN TO ME?"
L80 dta c"I'M GOING DOWN."
L81 dta c"I'VE GOT A BAD FEELING ABOUT THIS."
L82 dta c"CRAPOLA."
L83 dta c"POW!"
L84 dta c"BIF!"
L85 dta c"BAM!"
L86 dta c"ZONK!"
L87 dta c"I SHOULD'VE LISTENED TO MY MOTHER..."
L88 dta c"NO... A BUD LIGHT!"
L89 dta c"WHAT WAS THAT NOISE?"
L90 dta c"MAMA SAID THERE'D BE DAYS LIKE THIS."
L91 dta c"ITS JUST ONE OF THOSE DAYS..."
L92 dta c"I SEE A BRIGHT LIGHT..."
L93 dta c"MOMMY? IS THAT YOU?"
L94 dta c"I LET YOU HIT ME!"
L95 dta c"SUCKER SHOT!"
L96 dta c"I DIDN'T WANT TO LIVE ANYWAY."
L97 dta c"-<SOB>-"
L98 dta c"WAS THAT AS CLOSE AS I THINK IT WAS?"
L99 dta c"JOIN THE ARMY, SEE THE WORLD THEY SAID."
L100 dta c"IT WASN'T JUST A JOB IT WAS AN ADVENTURE!"
L101 dta c"I DIDN'T LIKE VIOLENCE ANYWAY!"
L102 dta c"I THOUGHT YOU LIKED ME?"
L103 dta c"SUCH SENSELESS VIOLENCE! I DON'T UNDERSTAND IT."
L104 dta c"I THINK THIS GUY'S A LITTLE CRAZY."
L105 dta c"SOMEHOW I DON'T FEEL LIKE KILLING ANYMORE."
L106 dta c"HEY! KILLIN' AIN'T COOL."
L107 dta c"GEE... THANKS."
L108 dta c"I'VE FALLEN AND I CAN'T GET UP!"
L109 dta c"911?"
L110 dta c"OH NO! HERE I BLOW AGAIN!"
L111 dta c"I'LL BE BACK..."
L112 dta c"HEY - I'VE GOT LAWYERS."
L113 dta c"TIME TO CALL 1-900-SUE-TANK."
L53 dta d"PARTING IS SUCH SWEET SORROW... NOT!"
L54 dta d"UGH!"
L55 dta d"AARGH!"
L56 dta d"AAAGGHHH!"
L57 dta d"I'M MELTING!"
L58 dta d"OOF.."
L59 dta d"OH!"
L60 dta d"EEEK!"
L61 dta d"AACCH!"
L62 dta d"I HATE IT WHEN THAT HAPPENS."
L63 dta d"ONE DIRECT HIT CAN RUIN YOUR WHOLE DAY."
L64 dta d"OH NO!"
L65 dta d"NOT ME!"
L66 dta d"OUCH."
L67 dta d"OH NO, NOT AGAIN."
L68 dta d"ANOTHER ONE BITES THE DUST."
L69 dta d"GOODBYE."
L70 dta d"HELP ME!"
L71 dta d"FAREWELL, CRUEL WORLD."
L72 dta d"REMEMBER THE ALAMO!"
L73 dta d"OH MAN!"
L74 dta d"DOOUGH!"
L75 dta d"ANOTHER DAY, ANOTHER BOMB."
L76 dta d"THIS IS THE END, MY ONLY FRIEND."
L77 dta d"IT'S ALL OVER."
L78 dta d"THE FAT LADY SANG."
L79 dta d"WHY DOES EVERYTHING HAPPEN TO ME?"
L80 dta d"I'M GOING DOWN."
L81 dta d"I'VE GOT A BAD FEELING ABOUT THIS."
L82 dta d"CRAPOLA."
L83 dta d"POW!"
L84 dta d"BIF!"
L85 dta d"BAM!"
L86 dta d"ZONK!"
L87 dta d"I SHOULD'VE LISTENED TO MY MOTHER..."
L88 dta d"NO... A BUD LIGHT!"
L89 dta d"WHAT WAS THAT NOISE?"
L90 dta d"MAMA SAID THERE'D BE DAYS LIKE THIS."
L91 dta d"ITS JUST ONE OF THOSE DAYS..."
L92 dta d"I SEE A BRIGHT LIGHT..."
L93 dta d"MOMMY? IS THAT YOU?"
L94 dta d"I LET YOU HIT ME!"
L95 dta d"SUCKER SHOT!"
L96 dta d"I DIDN'T WANT TO LIVE ANYWAY."
L97 dta d"-<SOB>-"
L98 dta d"WAS THAT AS CLOSE AS I THINK IT WAS?"
L99 dta d"JOIN THE ARMY, SEE THE WORLD THEY SAID."
L100 dta d"IT WASN'T JUST A JOB IT WAS AN ADVENTURE!"
L101 dta d"I DIDN'T LIKE VIOLENCE ANYWAY!"
L102 dta d"I THOUGHT YOU LIKED ME?"
L103 dta d"SUCH SENSELESS VIOLENCE! I DON'T UNDERSTAND IT."
L104 dta d"I THINK THIS GUY'S A LITTLE CRAZY."
L105 dta d"SOMEHOW I DON'T FEEL LIKE KILLING ANYMORE."
L106 dta d"HEY! KILLIN' AIN'T COOL."
L107 dta d"GEE... THANKS."
L108 dta d"I'VE FALLEN AND I CAN'T GET UP!"
L109 dta d"911?"
L110 dta d"OH NO! HERE I BLOW AGAIN!"
L111 dta d"I'LL BE BACK..."
L112 dta d"HEY - I'VE GOT LAWYERS."
L113 dta d"TIME TO CALL 1-900-SUE-TANK."
LEND
OffensiveTextTableL
dta <L0,<L1,<L2,<L3,<L4,<L5,<L6,<L7,<L8,<L9,<L10,<L11,<L12,<L13,<L14,<L15,<L16,<L17,<L18,<L19,<L20,<L21,<L22,<L23,<L24,<L25,<L26,<L27,<L28,<L29,<L30,<L31,<L32,<L33,<L34,<L35,<L36,<L37,<L38,<L39,<L40,<L41,<L42,<L43,<L44,<L45,<L46,<L47,<L48,<L49,<L50,<L51,<L52,<L53,<L54,<L55,<L56,<L57,<L58,<L59,<L60,<L61,<L62,<L63,<L64,<L65,<L66,<L67,<L68,<L69,<L70,<L71,<L72,<L73,<L74,<L75,<L76,<L77,<L78,<L79,<L80,<L81,<L82,<L83,<L84,<L85,<L86,<L87,<L88,<L89,<L90,<L91,<L92,<L93,<L94,<L95,<L96,<L97,<L98,<L99,<L100,<L101,<L102,<L103,<L104,<L105,<L106,<L107,<L108,<L109,<L110,<L111,<L112,<L113
dta <L0,<L1,<L2,<L3,<L4,<L5,<L6,<L7,<L8,<L9,<L10,<L11,<L12,<L13,<L14,<L15,<L16,<L17,<L18,<L19,<L20,<L21,<L22,<L23,<L24,<L25,<L26,<L27,<L28,<L29,<L30,<L31,<L32,<L33,<L34,<L35,<L36,<L37,<L38,<L39,<L40,<L41,<L42,<L43,<L44,<L45,<L46,<L47,<L48,<L49,<L50,<L51,<L52
dta <L53,<L54,<L55,<L56,<L57,<L58,<L59,<L60,<L61,<L62,<L63,<L64,<L65,<L66,<L67,<L68,<L69,<L70,<L71,<L72,<L73,<L74,<L75,<L76,<L77,<L78,<L79,<L80,<L81,<L82,<L83,<L84,<L85,<L86,<L87,<L88,<L89,<L90,<L91,<L92,<L93,<L94,<L95,<L96,<L97,<L98,<L99,<L100,<L101,<L102,<L103,<L104,<L105,<L106,<L107,<L108,<L109,<L110,<L111,<L112,<L113
dta <LEND
OffensiveTextTableH
dta >L0,>L1,>L2,>L3,>L4,>L5,>L6,>L7,>L8,>L9,>L10,>L11,>L12,>L13,>L14,>L15,>L16,>L17,>L18,>L19,>L20,>L21,>L22,>L23,>L24,>L25,>L26,>L27,>L28,>L29,>L30,>L31,>L32,>L33,>L34,>L35,>L36,>L37,>L38,>L39,>L40,>L41,>L42,>L43,>L44,>L45,>L46,>L47,>L48,>L49,>L50,>L51,>L52,>L53,>L54,>L55,>L56,>L57,>L58,>L59,>L60,>L61,>L62,>L63,>L64,>L65,>L66,>L67,>L68,>L69,>L70,>L71,>L72,>L73,>L74,>L75,>L76,>L77,>L78,>L79,>L80,>L81,>L82,>L83,>L84,>L85,>L86,>L87,>L88,>L89,>L90,>L91,>L92,>L93,>L94,>L95,>L96,>L97,>L98,>L99,>L100,>L101,>L102,>L103,>L104,>L105,>L106,>L107,>L108,>L109,>L110,>L111,>L112,>L113
OffensiveTextLengths
dta 43,4,14,13,7,35,37,12,17,12,7,7,18,17,22,9,33,13,15,42,8,18,30,15,13,16,31,16,10,20,35,22,17,20,29,31,27,24,36,27,29,22,21,29,10,48,17,20,38,15,26,24,22,36,4,6,9,12,5,3,5,6,28,39,6,7,5,17,27,8,8,22,19,7,7,26,32,14,18,33,15,34,8,4,4,4,5,36,18,20,36,29,23,19,17,12,29,7,36,39,41,30,23,48,34,42,25,14,31,4,26,15,23,28
dta >L0,>L1,>L2,>L3,>L4,>L5,>L6,>L7,>L8,>L9,>L10,>L11,>L12,>L13,>L14,>L15,>L16,>L17,>L18,>L19,>L20,>L21,>L22,>L23,>L24,>L25,>L26,>L27,>L28,>L29,>L30,>L31,>L32,>L33,>L34,>L35,>L36,>L37,>L38,>L39,>L40,>L41,>L42,>L43,>L44,>L45,>L46,>L47,>L48,>L49,>L50,>L51,>L52
dta >L53,>L54,>L55,>L56,>L57,>L58,>L59,>L60,>L61,>L62,>L63,>L64,>L65,>L66,>L67,>L68,>L69,>L70,>L71,>L72,>L73,>L74,>L75,>L76,>L77,>L78,>L79,>L80,>L81,>L82,>L83,>L84,>L85,>L86,>L87,>L88,>L89,>L90,>L91,>L92,>L93,>L94,>L95,>L96,>L97,>L98,>L99,>L100,>L101,>L102,>L103,>L104,>L105,>L106,>L107,>L108,>L109,>L110,>L111,>L112,>L113
dta >LEND
NumberOfOffensiveTexts=54
NumberOfDeffensiveTexts=60
.endp
BIN
View File
Binary file not shown.
Binary file not shown.
-48
View File
@@ -1,48 +0,0 @@
import sys
from string import strip
lineCount = 0
lengths = []
alltexts = []
for line in open("TALK1.txt"):
lineCount+=1
line = strip(line)
lengths.append(len(line))
alltexts.append(line)
off = lineCount
for line in open("TALK2.txt"):
lineCount+=1
line = strip(line)
lengths.append(len(line))
alltexts.append(line)
tmpNo = 0
for line in alltexts:
print ("L"+str(tmpNo)+' dta "'+line+'"')
tmpNo+= 1
l=""
for i in range(0,lineCount):
l+="<L"+str(i)+","
l=l[:-1]
print ("OffensiveTextTableL")
print (" dta "+l)
l=""
for i in range(0,lineCount):
l+=">L"+str(i)+","
l=l[:-1]
print ("OffensiveTextTableH")
print (" dta "+l)
l=""
for i in range(0,lineCount):
l+=str(lengths[i])+","
l=l[:-1]
print ("OffensiveTextLengths")
print (" dta "+l)
deff = lineCount-off
print ("NumberOfOffensiveTexts="+str(off))
print ("NumberOfDeffensiveTexts="+str(deff))
+14 -12
View File
@@ -22,6 +22,8 @@ MaxWindTable .by 5,20,40,70,99
RoundsTable .by 10,20,30,40,50
flyDelayTable .by 255,150,75,35,1
seppukuTable .by 255, 45,25,15,9
mountainsDeltaTableH .by 0,1,3,5,7
mountainsDeltaTableL .by $1f, $7f, $ff, $7f, $ff
;------------------------------------------------
LevelNameBeginL ; begins of level names
.by <NamesOfLevels,<(NamesOfLevels+10),<(NamesOfLevels+20)
@@ -347,8 +349,8 @@ WeaponPriceH ; weapons prices (tables with prices of weapons)
.by >price_StrongParachute
.by >price_Mag_Deflector__
.by >price_Shield_________
.by >price_Force_Shield___
.by >price_Heavy_Shield___
.by >price_Force_Shield___
.by >price_Super_Mag______
.by >price_Auto_Defense___
.by >price_Fuel_Tank______
@@ -413,8 +415,8 @@ WeaponPriceL
.by <price_StrongParachute
.by <price_Mag_Deflector__
.by <price_Shield_________
.by <price_Force_Shield___
.by <price_Heavy_Shield___
.by <price_Force_Shield___
.by <price_Super_Mag______
.by <price_Auto_Defense___
.by <price_Fuel_Tank______
@@ -435,7 +437,7 @@ WeaponUnits
.by 3 ;Funky_Bomb_____
.by 2 ;MIRV___________
.by 1 ;Death_s_Head___
.by 10 ;Napalm_________
.by 4 ;Napalm_________
.by 2 ;Hot_Napalm_____
.by 20 ;Tracer_________
.by 10 ;Smoke_Tracer___
@@ -485,8 +487,8 @@ WeaponUnits
.by 2 ;StrongParachute
.by 2 ;Mag_Deflector__
.by 3 ;Shield_________
.by 3 ;Force_Shield___
.by 2 ;Heavy_Shield___
.by 3 ;Force_Shield___
.by 2 ;Super_Mag______
.by 1 ;Auto_Defense___
.by 10 ;Fuel_Tank______
@@ -502,8 +504,8 @@ PurchaseMeTable ;weapons good to be purchased by the robot
dta 1 ;"Funky Bomb " ; 5
dta 1 ;"MIRV " ; 6
dta 1 ;"Death's Head " ; 7
dta 0 ;"Napalm " ; 8
dta 0 ;"Hot Napalm " ; 9
dta 1 ;"Napalm " ; 8
dta 1 ;"Hot Napalm " ; 9
dta 0 ;"Tracer " ; 10
dta 0 ;"Smoke Tracer " ; 11
dta 1 ;"Baby Roller " ; 12
@@ -552,8 +554,8 @@ PurchaseMeTable ;weapons good to be purchased by the robot
dta 1 ;"Strong Parachute" ; 55
dta 1 ;"Mag Deflector " ; 56
dta 1 ;"Shield " ; 57
dta 1 ;"Force Shield " ; 58
dta 1 ;"Heavy Shield " ; 59
dta 1 ;"Heavy Shield " ; 58
dta 1 ;"Force Shield " ; 59
dta 0 ;"Super Mag " ; 60
dta 1 ;"Auto Defense " ; 61
dta 0 ;"Fuel Tank " ; 62
@@ -570,7 +572,7 @@ WeaponSymbols
.by $20,$00,$00,$00,$00,$00,$00,$00
.by $00,$00,$00,$00,$00,$00,$00,$00
.by $5f,$1c,$03,$06,$1d,$0a,$1b,$1b ; defensives
.by $1e,$3b,$3c,$3d,$3e,$3f,$5e,$7d
.by $1e,$3b,$3d,$3c,$3e,$3f,$5e,$7d
; Names of weapons (16 chars long)
NamesOfWeapons ;the comment is an index in the tables
@@ -633,8 +635,8 @@ NamesOfWeapons ;the comment is an index in the tables
dta d"Strong Parachute" ; 55 - with energy (earlier Battery)
dta d"Mag Deflector " ; 56 - with shield and energy
dta d"Shield " ; 57 - shield for one shot - no energy
dta d"Force Shield " ; 58 - shield with energy and parachute
dta d"Heavy Shield " ; 59 - shield with energy
dta d"Heavy Shield " ; 58 - shield with energy
dta d"Force Shield " ; 59 - shield with energy and parachute
dta d"Super Mag " ; 60
dta d"Auto Defense " ; 61 - with shield and energy
dta d"Fuel Tank " ; 62
@@ -650,8 +652,8 @@ DefensiveEnergy = * - 48
.by 99 ; Strong Parachute
.by 99 ; Mag Deflector
.by 00 ; Shield
.by 99 ; Force Shield
.by 99 ; Heavy Shield
.by 99 ; Force Shield
.by 00 ; Super Mag
.by 99 ; Auto Defense
.by 00 ; Fuel Tank
+9 -9
View File
@@ -3,12 +3,12 @@
screenheight = 200
screenBytes = 40
screenwidth = screenBytes*8 ; Max screenwidth = 512!!!
margin = 48 ;mountain drawing Y variable margin
margin = 40 ;mountain drawing Y variable margin
display = $1010 ;screen takes $2K due to clearing routine
MaxPlayers = 6
maxOptions = 7 ;number of all options
maxOptions = 8 ;number of all options
PMOffset = $23 ; P/M to graphics offset
napalmRadius = 10
;Weapon prices (*10 on screen)
price_Baby_Missile___ = 0 ;_0
@@ -19,8 +19,8 @@ price_LeapFrog_______ = 192 ;_4
price_Funky_Bomb_____ = 293 ;_5
price_MIRV___________ = 456 ;_6
price_Death_s_Head___ = 337 ;_7
price_Napalm_________ = $ffff ;496 ;_8
price_Hot_Napalm_____ = $ffff ;511 ;_9
price_Napalm_________ = 125 ;_8
price_Hot_Napalm_____ = 162 ;_9
price_Tracer_________ = 102 ;_10
price_Smoke_Tracer___ = 291 ;_11
price_Baby_Roller____ = 211 ;_12
@@ -69,8 +69,8 @@ price_Parachute______ = 234 ;_54
price_StrongParachute = 1000 ;_55
price_Mag_Deflector__ = 745 ;_56
price_Shield_________ = 224 ;_57
price_Force_Shield___ = 1100 ;_58
price_Heavy_Shield___ = 628 ;_59
price_Heavy_Shield___ = 628 ;_58
price_Force_Shield___ = 1100 ;_59
price_Super_Mag______ = $ffff ;_60
price_Auto_Defense___ = 512 ;_61
price_Fuel_Tank______ = $ffff ;_62
@@ -134,8 +134,8 @@ ind_Parachute______ = 54
ind_StrongParachute = 55
ind_Mag_Deflector__ = 56
ind_Shield_________ = 57
ind_Force_Shield___ = 58
ind_Heavy_Shield___ = 59
ind_Heavy_Shield___ = 58
ind_Force_Shield___ = 59
ind_Super_Mag______ = 60
ind_Auto_Defense___ = 61
ind_Fuel_Tank______ = 62
+2 -3
View File
@@ -89,7 +89,7 @@ dl ; MAIN game display list
.by $0f+$80 ; DLI (black to end);1
:38 .byte $0f ;35 ..... = 200
.by $4f
.wo LastLine ; additional line of ground
.wo EmptyLine ; additional line of ground
.byte $41
.word dl
;-----------------------------------------------
@@ -110,6 +110,7 @@ OptionsHere
dta d"Rounds : 10 20 30 40 50 "
dta d"Missiles : slug slow norm fast hare "
dta d"Seppuku : nevr rare norm oftn alws "
dta d"Mountains: NL BE CZ CH NP "
OptionsScreenEnd
;-----------------------------------------------
MoreUp
@@ -143,8 +144,6 @@ purchaseActivate
dta d" - Finish "
EmptyLine
dta d" "
LastLine
:40 dta $00
; -------------------------------------------------
.ALIGN $1000 ; WARNING!!!! 4KiB barrier crossing here, might need reassignment!!!
NameScreen
+33 -13
View File
@@ -684,11 +684,11 @@ NoPlayerMissile
; in xdraw, ydraw we have coordinates left LOWER corner of Tank char
lda ActiveDefenceWeapon,x
cmp #ind_Shield_________ ; one shot shield
beq ShieldDraw
beq DrawTankShield
cmp #ind_Force_Shield___ ; shield with energy and parachute
beq ShieldDraw
beq DrawTankShieldBold
cmp #ind_Heavy_Shield___ ; shield with energy
beq ShieldDraw
beq DrawTankShieldBold
cmp #ind_Auto_Defense___ ; Auto Defence
beq DrawTankShieldWihHorns
cmp #ind_Mag_Deflector__ ; Mag Deflector
@@ -696,15 +696,14 @@ NoPlayerMissile
cmp #ind_White_Flag_____ ; White Flag
beq DrawTankFlag
bne NoShieldDraw
ShieldDraw
jsr DrawTankShield.DrawInPosition
NoShieldDraw
DoNotDrawTankNr
rts
DrawTankShield
jmp DrawTankShield.DrawInPosition
DrawTankShieldWihHorns
jsr DrawTankShield.DrawInPosition
jsr DrawTankShieldHorns
rts
jmp DrawTankShieldHorns
DrawTankShieldBold
jsr DrawTankShield.DrawInPosition
jmp DrawTankShieldBoldLine
DrawTankFlag
lda #$5E ; flag symbol
sta CharCode
@@ -717,6 +716,8 @@ DrawTankFlag
lda XtanksTableH,x
sta xdraw+1
jsr TypeChar
NoShieldDraw
DoNotDrawTankNr
rts
.endp
@@ -823,6 +824,23 @@ ShieldVisible
jsr plot
rts
.endp
;--------------------------------------------------
.proc DrawTankShieldBoldLine
; use only directly after DrawTankShield
; this proc draws bold top on shield.
; Symbol of ablative shield ? :)
;--------------------------------------------------
sbw xdraw #$04 ; 5 pixels left
sbw ydraw #$0a ; 10 pixels up
; draw additional top horizontal line of shield ( _ )
mva #6 temp
@
jsr plot
.nowarn dew xdraw
dec temp
bne @-
rts
.endp
;--------------------------------------------------
.proc drawmountains
@@ -922,7 +940,6 @@ StillNothing
lda ydraw
sta (tempor2),y
sta (temp),y
jmp FoundPeek1
FoundPeek1
inw tempor2
inw temp
@@ -990,7 +1007,7 @@ ColumnIsReady
; level of the mountains
jeq MainFallout2
; now correct heights are in the mountaintable
mva #1 color
sta color ; Pozor! :) we know - now A=1
mva #sfx_silencer sfx_effect
rts
.endp
@@ -1011,6 +1028,8 @@ getrandomY ;getting random Y coordinate
sta ydraw
sta yfloat+1
mva #0 yfloat ;yfloat equals to e.g. 140.0
mva #screenheight-margin-5 yfloat+1
sta ydraw
; how to make nice looking mountains?
; randomize points and join them with lines
@@ -1019,9 +1038,10 @@ getrandomY ;getting random Y coordinate
NextPart
lda random
and mountainDeltaL
sta delta ; it is after the dot (xxx.delta)
lda random
and #$03 ;(max delta)
and mountainDeltaH ;(max delta)
sta delta+1 ; before the dot (delta+1.delta)
lda random
+16 -4
View File
@@ -36,7 +36,7 @@
;we decided it must go in 'English' to let other people work on it
.macro build
dta d"146" ; number of this build (3 bytes)
dta d"147" ; number of this build (3 bytes)
.endm
icl 'definitions.asm'
@@ -81,6 +81,7 @@
.zpvar dliCounter .byte
.zpvar pressTimer .byte
.zpvar NTSCcounter .byte
.zpvar IsEndOfTheFallFlag .byte ; for small speedup ground falling
;.zpvar dliA .byte
;.zpvar dliX .byte
;.zpvar dliY .byte
@@ -393,8 +394,13 @@ DoNotFinishTheRound
jeq NextPlayerShoots
mva #1 plot4x4color
jsr DisplayTankNameAbove
mva #1 color ;to display flying point
ldx tankNr
lda TankStatusColoursTable,x
sta colpf2s ; set color of status line
@@ -402,11 +408,14 @@ DoNotFinishTheRound
beq ManualShooting
RoboTanks
; robotanks shoot here
; robotanks shoot here
; TankNr still in X
jsr ArtificialIntelligence
jsr MoveBarrelToNewPosition
jsr DisplayStatus ;all digital values like force, angle, wind, etc.
jsr PutTankNameOnScreen
jsr DisplayStatus
pause 30
ldx TankNr
jsr MoveBarrelToNewPosition
lda kbcode
cmp #28 ; ESC
bne @+
@@ -427,6 +436,8 @@ ManualShooting
seq:rts
AfterManualShooting
mva #0 plot4x4color
jsr DisplayTankNameAbove
; defensive weapons without flight handling
ldx TankNr
lda ActiveDefenceWeapon,x
@@ -1145,6 +1156,7 @@ LimitForce
;----------------------------------------------
.proc MoveBarrelToNewPosition
jsr DrawTankNr
jsr DisplayStatus.displayAngle
ldx TankNr
lda NewAngle
cmp AngleTable,x
BIN
View File
Binary file not shown.
+128 -76
View File
@@ -124,6 +124,14 @@ OptionsFinished
lda seppukuTable,y
sta seppukuVal
;8th option (how aggressive are mountains)
ldy OptionsTable+7
lda mountainsDeltaTableH,y
sta mountainDeltaH
lda mountainsDeltaTableL,y
sta mountainDeltaL
rts
;--------
; inversing selected option (cursor)
@@ -1320,26 +1328,27 @@ nineplus dta d"9"+1
space dta d" "
;--------------------------------------------------------
.proc DisplayOffensiveTextNr ;
;This routine displays texts using PutChar4x4
;pretty cool, eh
.proc Display4x4AboveTank ;
; Displays texts using PutChar4x4 above tank and mountains.
; Pretty cool, eh!
;parameters are:
;Y - number of tank above which text is displayed
;TextNumber - number of offensive text to display
;fx - length of text
;textAddress - address of the text
;lets calculate position of the text first!
;that's easy because we have number of tank
;and xtankstableL and H keep X position of a given tank
;save vars (messed when printing...)
lda xtankstableL,y
sta temp
lda xtankstableH,y
sta temp+1
;now we should substract length of the text
ldx TextNumberOff
lda talk.OffensiveTextLengths,x
;now we should substract length of the text-1
ldy fx
dey
tya
asl
sta temp2
mva #0 temp2+1
@@ -1350,7 +1359,7 @@ space dta d" "
;stored in temp2
sbw temp temp2 ; here begin of the text is in TEMP !!!!
;now we should check overflows
lda temp+1
;lda temp+1 ; opty
bpl DOTNnotLessThanZero
;less than zero, so should be zero
mwa #0 temp
@@ -1360,7 +1369,7 @@ DOTNnotLessThanZero
;so check if end larger than screenwidth
lda talk.OffensiveTextLengths,x
lda fx
asl
asl
;length in pixels -
@@ -1381,7 +1390,7 @@ DOTNnotLessThanZero
;then screenwidth - length is fine
lda talk.OffensiveTextLengths,x
lda fx
asl
asl
sta temp
@@ -1401,7 +1410,7 @@ DOTNnoOverflow
;now let's get y position
;we will try to put text as low as possible
;just above mountains (so mountaintable will be checked)
lda talk.OffensiveTextLengths,x
lda fx
asl
asl
tay
@@ -1433,19 +1442,13 @@ DOTOldLowestValue
sbc #(4+9) ;9 pixels above ground (and tanks...)
sta TextPositionY
lda talk.OffensiveTextTableL,x
sta TextAddress
lda talk.OffensiveTextTableH,x
sta TextAddress+1
mva #0 TextCounter
DOTNcharloop
mwa TextAddress temp
DOTNcharloop
ldy TextCounter
lda (temp),y
SEC
sbc #32 ;conversion from ASCII to .sbyte
and #$3f ;always CAPITAL letters
sta CharCode4x4
lda TextCounter
@@ -1462,13 +1465,63 @@ DOTNcharloop
jsr PutChar4x4
inc TextCounter
ldx TextNumberOff
lda talk.OffensiveTextLengths,x
lda fx
cmp TextCounter
bne DOTNcharloop
rts
.endp
;--------------------------------------------------------
.proc DisplayOffensiveTextNr ;
ldx TextNumberOff
lda talk.OffensiveTextTableL,x
sta TextAddress
lda talk.OffensiveTextTableH,x
sta TextAddress+1
inx ; the next text
lda talk.OffensiveTextTableH,x
sta temp+1
lda talk.OffensiveTextTableL,x
sta temp ; opty possible
; substract address of the next text from previous to get text length
sbw temp TextAddress temp2
mva temp2 fx
jsr Display4x4AboveTank
rts
.endp
;--------------------------------------------------------
.proc DisplayTankNameAbove ;
lda tankNr
:3 asl ; *8
clc
adc #<TanksNames
sta temp ; TextAddress
lda #0
adc #>Tanksnames
sta temp+1 ; TextAddress+1
mwa temp TextAddress
;find length of the tank's name
ldy #0
@
lda (temp),y
beq end_found
iny
cpy #8
bne @-
dey
end_found
iny
sty fx
ldy tankNr
jsr Display4x4AboveTank
rts
.endp
;-------------------------------
.proc TypeLine4x4 ;
;-------------------------------
@@ -1479,6 +1532,7 @@ DOTNcharloop
ldy #0
sty LineCharNr
mva #1 plot4x4color
TypeLine4x4Loop
ldy LineCharNr
@@ -1491,7 +1545,6 @@ TypeLine4x4Loop
sta CharCode4x4
mwa LineXdraw dx
mva LineYdraw dy
mva #1 plot4x4color
jsr PutChar4x4 ;type empty pixels as well!
adw LineXdraw #4
inc LineCharNr
@@ -1791,7 +1844,6 @@ FinishResultDisplay
;---------------------
;displaying quantity of the given weapon
;---------------------
ldx TankNr
lda ActiveWeapon,x
jsr HowManyBullets
sta decimal
@@ -1888,56 +1940,6 @@ ActiveDefence
NoDefenceWeapon
NoShieldEnergy
;=========================
;display Force
;=========================
ldx TankNr
lda ForceTableL,x
sta decimal
lda ForceTableH,x
sta decimal+1
mwa #textbuffer+40+36 displayposition
jsr displaydec
;=========================
;display Angle
;=========================
; additionally we are getting charcode of the tank
; (for future display)
ldx TankNr
lda AngleTable,x
bmi AngleToLeft
lda AngleTable,x
sta decimal
;lda #$7f ; (tab) character
;sta textbuffer+40+25
lda #0 ;space
;sta textbuffer+40+22
sta decimal+1 ; angle is single byte, but displayed with displaydec (word) routine
;lda #90
;sec
;sbc AngleTable,x
tay
lda BarrelTable,y
sta CharCode
bne AngleDisplay ;like jmp, because code always <>0
AngleToLeft
;sec
;sbc #(255-90)
sta decimal
tay
lda BarrelTable,y
sta CharCode
;lda #$7e ;(del) char
;sta textbuffer+40+22
;lda #0 ;space
;sta textbuffer+40+25
AngleDisplay
mwa #textbuffer+40+21 displayposition
jsr displaydec
;=========================
;display Wind
;=========================
@@ -1975,12 +1977,62 @@ DisplayWindValue
sta decimal
mwa #textbuffer+80+7 displayposition
jsr displaybyte ;decimal (byte), displayposition (word)
;=========================
;display Force
;=========================
ldx TankNr
lda ForceTableL,x
sta decimal
lda ForceTableH,x
sta decimal+1
mwa #textbuffer+40+36 displayposition
jsr displaydec
;=========================
;display Angle
;=========================
displayAngle
ldx TankNr
lda AngleTable,x
cmp #90
beq VerticallyUp
bcs AngleToLeft
AngleToRight
; now we have values from 0 to 89 and right angle
sta decimal
lda #$7f ; (tab) character
sta textbuffer+40+25
lda #0 ;space
sta textbuffer+40+22
beq AngleDisplay
AngleToLeft
sec
lda #180
sbc AngleTable,x
; angles 180 - 91 converted to 0 - 89
sta decimal
lda #$7e ;(del) char
sta textbuffer+40+22
lda #0 ;space
sta textbuffer+40+25
beq AngleDisplay
VerticallyUp
; now we have value 90
sta decimal
lda #0 ;space
sta textbuffer+40+25
sta textbuffer+40+22
AngleDisplay
mwa #textbuffer+40+23 displayposition
jsr displaybyte
rts
.endp
;-------------------------------------------------
.proc PutTankNameOnScreen
; puts name of the tan on the screen
; puts name of the tank on the screen
ldy #$00
lda tanknr
asl
+3 -4
View File
@@ -12,9 +12,11 @@ TanksNames ; DO NOT ZERO - ticket #24
:6 dta d" "
;----------------------------------------------------
;Options DO NOT ZERO - ticket #27
OptionsTable .by 0,1,2,2,0,1,3
OptionsTable .by 0,1,2,2,0,1,3,2
RoundsInTheGame .by 10 ;how many rounds in the current game
seppukuVal .by 75
mountainDeltaH .by 3
mountainDeltaL .by $ff
;----------------------------------------------------
skilltable ; computer controlled players' skills (1-8), 0 - human (no cleaning, ticket #30)
.DS [MaxPlayers]
@@ -211,9 +213,6 @@ Multiplier .ds 3 ; 0,0,0
Multiplee .ds 2 ; 0,0
goleft .DS 1 ;if 1 then flights left
;----------------------------------------------------
;SoilDown2
IsEndOfTheFallFlag .DS 1
;----------------------------------------------------
;unPlot
WhichUnPlot .DS 1
; max 5 concurrent unPlots
+162 -13
View File
@@ -30,8 +30,8 @@ ExplosionRoutines
.word funkybomb-1
.word mirv-1
.word deathshead-1
.word VOID-1 ;napalm
.word VOID-1 ;hotnapalm
.word napalm-1 ;napalm
.word hotnapalm-1 ;hotnapalm
.word tracer-1
.word tracer-1 ;smoketracer
.word babyroller-1
@@ -282,6 +282,127 @@ NoLowerCircle
rts
.endp
; ------------------------
.proc napalm
inc FallDown2
mva #(napalmRadius+4) ExplosionRadius ; real radius + 4 pixels (half characrer width)
jsr CalculateExplosionRange
mva #0 ExplosionRadius ; in this weapon - flag: 0 - napalm, 1 - hotnapalm
jmp xnapalm
.endp
; ------------------------
.proc hotnapalm
inc FallDown2
mva #(napalmRadius+4) ExplosionRadius ; real radius + 4 pixels (half characrer width)
jsr CalculateExplosionRange
mva #1 ExplosionRadius ; in this weapon - flag: 0 - napalm, 1 - hotnapalm
jmp xnapalm
.endp
; ------------------------
.proc xnapalm
mwa xdraw xcircle ; store hitpoint for future repeats
ldy #30 ; repeat 30 times
sty magic
RepeatNapalm ; external loop (for fire animation)
mwa xcircle xdraw
sbw xdraw #(napalmRadius) ; 10 pixels on left side hit point
ldy #0
sty magic+1
RepeatFlame ; internal loop (draw flames)
ldy #0
adw xdraw #mountaintable temp
sty ydraw+1
lda (temp),y
sec
sbc #1 ; over ground
sta ydraw
lda xdraw
and ExplosionRadius ; if hotnapalm and x is odd:
:2 asl ; modify y position 4 pixels up
ldy ydraw
sta ydraw
tya
sec
sbc ydraw
sta ydraw
sbw xdraw #4 ; half character correction
; draw flame symbol
lda magic ; if last repeat - clear flames
beq LastNapalmRepeat
lda random
and #%00000110
clc
adc #$46
bne PutFlameChar
LastNapalmRepeat
lda #$4e ; clear flame symbol
PutFlameChar
sta CharCode
; check coordinates
cpw xdraw #(screenwidth-7)
bcs CharOffTheScreen
lda ydraw
cmp #7
bcc CharOffTheScreen
cmp #(screenHeight-1)
bcs CharOffTheScreen
jsr TypeChar
CharOffTheScreen
adw xdraw #4 ; reverse half character correction (we need positon of character center)
adw xdraw #1 ; next char 1 pixels to right
inc magic+1
lda magic+1
cmp #(2*napalmRadius+1) ; 10 pixels on left, 10 pixels on right and 1 in center
jne RepeatFlame
dec magic
jpl RepeatNapalm
; after napalm
inc FallDown2
;now we must check tanks in range
ldx NumberOfPlayers
dex
BurnedCheckLoop
lda eXistenZ,x
beq EndNurnedCheckLoop
;here the tank exist
; calculate right edge of the fire
adw xcircle #(napalmRadius+4+4) xdraw ; 10 pixels on right side hit point + half character width + correction
; now we compare tank position with right edge of the fire (napalm)
lda XtankstableH,x
cmp xdraw+1
bne @+
lda XtankstableL,x
cmp xdraw
@
bcs TankOutOfFire
; let's calculate left edge of the fire
sbw xcircle #(napalmRadius+8+4-4) xdraw ; 10 pixels on left + character width (tank) + half character - correction
bpl @+
mwa #0 xdraw ; left screen edge
@
; now we compare tank position with left edge of the fire (napalm)
lda XtankstableH,x
cmp xdraw+1
bne @+
lda XtankstableL,x
cmp xdraw
@
bcc TankOutOfFire
ldy #40 ; energy decrease (napalm) - but if hotnapalm:
lda ExplosionRadius
beq NotHot
ldy #80 ; energy decrease (hotnapalm)
NotHot
; check shields ( joke :) )
jsr DecreaseEnergyX
TankOutOfFire
EndNurnedCheckLoop
dex
bpl BurnedCheckLoop
mva #sfx_silencer sfx_effect
rts
.endp
; ------------------------
.proc babyroller
inc FallDown2
mva #11 ExplosionRadius
@@ -990,7 +1111,6 @@ ToHighFill
jne RepeatFill
rts
.endp
;--------------------------------------------------
.proc BeforeFire ;TankNr (byte)
;--------------------------------------------------
@@ -1025,6 +1145,7 @@ ContinueToCheckMaxForce2
wait ; best after drawing a tank
;keyboard reading
; KBCODE keeps code of last keybi
@@ -1192,36 +1313,64 @@ CTRLPressedDown
jmp BeforeFire
pressedRight
lda pressTimer
spl:mva #0 pressTimer ; if >128 then reset to 0
cmp #25 ; 1/2s
bcs CTRLPressedRight
mva #sfx_set_power_2 sfx_effect
ldx TankNr
dec AngleTable,x
lda AngleTable,x
;cmp #180 ; if angle goes through 180 we clear the barrel
;bne NotThrough90DegreesLeft
;mva #$2e CharCode ; TODO: change
;jsr DrawTankNr.drawtankNrX
;NotThrough90DegreesLeft
cmp #255 ; -1
jne BeforeFire
lda #180
sta AngleTable,x
jmp BeforeFire
CTRLPressedRight
mva #sfx_set_power_2 sfx_effect
ldx TankNr
lda AngleTable,x
sec
sbc #4
sta AngleTable,x
cmp #4 ; smalles angle for speed rotating
jcs BeforeFire
lda #180
sta AngleTable,x
jmp BeforeFire
pressedLeft
lda pressTimer
spl:mva #0 pressTimer ; if >128 then reset to 0
cmp #25 ; 1/2s
bcs CTRLPressedLeft
mva #sfx_set_power_2 sfx_effect
ldx TankNr
INC AngleTable,x
lda AngleTable,x
;bne NotThrough90DegreesRight
;mva #$30 CharCode ; if angle goes through 0 we clear the barrel
;jsr DrawTankNr.drawtankNrX
;NotThrough90DegreesRight
cmp #181
jne BeforeFire
lda #0
sta AngleTable,x
jmp BeforeFire
CTRLPressedLeft
mva #sfx_set_power_2 sfx_effect
ldx TankNr
lda AngleTable,x
clc
adc #4
sta AngleTable,x
cmp #181-4
jcc BeforeFire
lda #0
sta AngleTable,x
jmp BeforeFire
pressedTAB
mva #sfx_purchase sfx_effect
ldx TankNr
@@ -1271,6 +1420,7 @@ pressedS
pressedSpace
;=================================
;we shoot here!!!
mva #0 pressTimer ; reset
jsr WaitForKeyRelease
lda pressTimer
@@ -2530,7 +2680,6 @@ CalculateExplosionRange0
lda #0
sta RangeRight
sta RangeRight+1
mva #11 ExplosionRadius ; what is this magic value?
;--------------------------------------------------
.proc CalculateExplosionRange
;--------------------------------------------------