Funky bomb bounces off the walls!

And optimizations.
This commit is contained in:
Pecusx
2022-08-23 17:55:26 +02:00
parent 492b662252
commit d2b412e860
9 changed files with 56 additions and 46 deletions
+2 -2
View File
@@ -178,9 +178,9 @@ Only these points determine the order in the summary
* **Nuclear Winter** - adds nothing, takes nothing away :) - in fact, it is not so much a defensive weapon as a double-edged one. It floods the area with "radioactive" fallout, which is ordinary soil. If you do not have at hand any weapon that digs up the terrain, and for that a shield (preferably disposable), then after such "fallout" you will have to shoot yourself - because being underground is otherwise impossible. Alternatively, **White Flag** always remains. * **Nuclear Winter** - adds nothing, takes nothing away :) - in fact, it is not so much a defensive weapon as a double-edged one. It floods the area with "radioactive" fallout, which is ordinary soil. If you do not have at hand any weapon that digs up the terrain, and for that a shield (preferably disposable), then after such "fallout" you will have to shoot yourself - because being underground is otherwise impossible. Alternatively, **White Flag** always remains.
* **Long Schlong** - a special weapon :) - Costs a lot, doesn't really help with anything (except possibly digging yourself out but only when slightly buried but it has a cool name and looks cool :) - It can be activated independently of other defensive weapons and remains active until the end of the round (it cannot be deactivated). * **Long Schlong** - a special weapon :) - Costs a lot, doesn't really help with anything (except possibly digging yourself out but only when slightly buried but it has a cool name and looks cool :) - It can be activated independently of other defensive weapons and remains active until the end of the round (it cannot be deactivated).
Due to the different operations of **MIRV** weapons, **Bouncy Castle** and **Mag Deflector** only use the shielding function when hit by these weapons. Due to the different operations of **MIRV**, defensive weapons **Bouncy Castle** and **Mag Deflector** only use the shielding function when hit by these weapons. In addition, **MIRV** heads do not bounce or fly through sidewalls during descent!
In addition, none of the shields protect against **Napalm**. **Bouncy Castle** or **Mag Deflector** on a direct hit will deflect it or carry it past, but just hit very close to a tank and its shield will not work. None of the shields protect against **Napalm**. **Bouncy Castle** or **Mag Deflector** on a direct hit will deflect it or carry it past, but just hit very close to a tank and its shield will not work.
**White Flag**, **Hovercraft** and **Nuclear Winter** weapons, when selected, require activation, this is accomplished by "firing a shot" after the selection of that weapon. Of course, the shot of the offensive weapon is then not fired, but only the selected defensive weapon is activated. **White Flag**, **Hovercraft** and **Nuclear Winter** weapons, when selected, require activation, this is accomplished by "firing a shot" after the selection of that weapon. Of course, the shot of the offensive weapon is then not fired, but only the selected defensive weapon is activated.
+2 -2
View File
@@ -173,9 +173,9 @@ Tylko te punkty decydują o kolejności w podsumowaniu
* **Nuclear Winter** - nic nie dodaje, nic nie zabiera :) - w zasadzie to broń nie tyle defensywna co obosieczna. Zasypuje teren opadem "radioaktywnym", który jest zwyczajną glebą. Jeśli nie mamy pod ręką żadnej broni odkopującej teren i do tego osłony (najlepiej jednorazowej), to po takim "opadzie" będzie trzeba strzelić do siebie - bo będąc pod ziemią inaczej się nie da. Ewentualnie pozostaje zawsze White Flag. * **Nuclear Winter** - nic nie dodaje, nic nie zabiera :) - w zasadzie to broń nie tyle defensywna co obosieczna. Zasypuje teren opadem "radioaktywnym", który jest zwyczajną glebą. Jeśli nie mamy pod ręką żadnej broni odkopującej teren i do tego osłony (najlepiej jednorazowej), to po takim "opadzie" będzie trzeba strzelić do siebie - bo będąc pod ziemią inaczej się nie da. Ewentualnie pozostaje zawsze White Flag.
* **Long Schlong** - broń specjalna :) - kosztuje dużo, nie bardzo w czymkolwiek pomaga (poza ewentualnym odkopaniem się ale tylko przy niewielkim przysypaniu ale fanie się nazywa i wygląda :) - Można ją aktywować niezależnie od innych broni defensywnych i pozostaje aktywna do końca rundy (nie da się jej deaktywować). * **Long Schlong** - broń specjalna :) - kosztuje dużo, nie bardzo w czymkolwiek pomaga (poza ewentualnym odkopaniem się ale tylko przy niewielkim przysypaniu ale fanie się nazywa i wygląda :) - Można ją aktywować niezależnie od innych broni defensywnych i pozostaje aktywna do końca rundy (nie da się jej deaktywować).
W związku z odmiennym działaniem broni **MIRV**, **Bouncy Castle** i **Mag Deflector** wykorzystują tylko funkcję osłony przy trafieniu tą bronią. W związku z odmiennym działaniem broni **MIRV**, bronie defensywne **Bouncy Castle** i **Mag Deflector** wykorzystują tylko funkcję osłony przy trafieniu tą bronią. Dodatkowo głowice **MIRV** w czasie opadania nie odbijają się i nie przelatują przez ściany boczne!
Dodatkowo, żadna z osłon nie chroni przed Napalmem. Auto Defense czy Mag Deflector przy bezpośrednim trafieniu odbije je lub przeniesie obok, ale wystarczy trafić bardzo blisko czołgu i nie zadziała jego osłona. Żadna z osłon nie chroni przed **Napalm**. **Auto Defense** czy **Mag Deflector** przy bezpośrednim trafieniu odbije je lub przeniesie obok, ale wystarczy trafić bardzo blisko czołgu i nie zadziała jego osłona.
Bronie **White Flag**, **Hovercraft** i **Nuclear Winter** po aktywacji wymagają uruchomienia, jest to realizowanie przez "oddanie strzału" po aktywacji tej broni. Oczywiście strzał bronią ofensywną nie jest wtedy oddawany, a jedynie uruchamiana jest wybrana broń defensywna. Bronie **White Flag**, **Hovercraft** i **Nuclear Winter** po aktywacji wymagają uruchomienia, jest to realizowanie przez "oddanie strzału" po aktywacji tej broni. Oczywiście strzał bronią ofensywną nie jest wtedy oddawany, a jedynie uruchamiana jest wybrana broń defensywna.
+4 -4
View File
@@ -104,18 +104,18 @@ OptionsScreen
dta d" Please select option with cursor keys " dta d" Please select option with cursor keys "
dta d" and press (Return) to proceed " dta d" and press (Return) to proceed "
MoreUp MoreUp
dta d" " dta d" "
dta 92,92,92 dta 92,92,92
dta d" more " dta d" more "
dta 92,92,92 dta 92,92,92
dta d" " dta d" "
.ALIGN $1000 ; WARNING!!!! 4KiB barrier crossing here, might need reassignment!!! .ALIGN $1000 ; WARNING!!!! 4KiB barrier crossing here, might need reassignment!!!
MoreDown MoreDown
dta d" " dta d" "
dta 93,93,93 dta 93,93,93
dta d" more " dta d" more "
dta 93,93,93 dta 93,93,93
dta d" " dta d" "
WeaponsDescription WeaponsDescription
; 0123456789012345678901234567890123456789 ; 0123456789012345678901234567890123456789
dta d"Tab"* dta d"Tab"*
+1 -6
View File
@@ -1899,7 +1899,7 @@ EndPutChar
; puts 4x4 pixels char on the graphics screen ; puts 4x4 pixels char on the graphics screen
; in: dx, dy (LOWER left corner of the char) ; in: dx, dy (LOWER left corner of the char)
; in: CharCode4x4 (.sbyte) ; in: CharCode4x4 (.sbyte)
; in: plot4x4color (0/1) ; in: plot4x4color (0/255)
; all pixels are being drawn ; all pixels are being drawn
; (empty and not empty) ; (empty and not empty)
;-------------------------------------------------- ;--------------------------------------------------
@@ -1911,11 +1911,6 @@ EndPutChar
cpw dx #(screenwidth-4) cpw dx #(screenwidth-4)
jcs TypeChar.EndPutChar ;nearest RTS jcs TypeChar.EndPutChar ;nearest RTS
; checks ommited. ; checks ommited.
lda plot4x4color
beq FontColor0
lda #$ff ; better option to check (plot4x4color = $00 or $ff)
sta plot4x4color
FontColor0
; char to the table ; char to the table
lda CharCode4x4 lda CharCode4x4
and #%00000001 and #%00000001
+8 -8
View File
@@ -36,7 +36,7 @@
;we decided it must go in 'English' to let other people work on it ;we decided it must go in 'English' to let other people work on it
.macro build .macro build
dta d"1.11" ; number of this build (3 bytes) dta d"1.12" ; number of this build (3 bytes)
.endm .endm
icl 'definitions.asm' icl 'definitions.asm'
@@ -128,7 +128,7 @@
.zpvar escFlag .byte .zpvar escFlag .byte
.zpvar LineYdraw .byte .zpvar LineYdraw .byte
.zpvar LineXdraw .word .zpvar LineXdraw .word
.zpvar plot4x4color .byte .zpvar plot4x4color .byte ; $00 / $ff
.zpvar Multiplier .word .zpvar Multiplier .word
.zpvar Multiplier_ .byte ; 3 bytes .zpvar Multiplier_ .byte ; 3 bytes
.zpvar HowToDraw .byte .zpvar HowToDraw .byte
@@ -552,7 +552,7 @@ DoNotFinishTheRound
mva #1 plot4x4color mva #$ff plot4x4color
jsr DisplayTankNameAbove jsr DisplayTankNameAbove
mva #1 color ;to display flying point mva #1 color ;to display flying point
@@ -592,7 +592,7 @@ ManualShooting
seq:rts ; keys Esc or O seq:rts ; keys Esc or O
AfterManualShooting AfterManualShooting
mva #0 plot4x4color mva #$00 plot4x4color
jsr DisplayTankNameAbove jsr DisplayTankNameAbove
; defensive weapons without flight handling ; defensive weapons without flight handling
ldx TankNr ldx TankNr
@@ -631,7 +631,7 @@ ShootNow
jsr Shoot jsr Shoot
;here we clear offensive text (after a shoot) ;here we clear offensive text (after a shoot)
ldy TankNr ldy TankNr
mva #0 plot4x4color mva #$00 plot4x4color
jsr DisplayOffensiveTextNr jsr DisplayOffensiveTextNr
lda HitFlag ;0 if missed lda HitFlag ;0 if missed
@@ -685,7 +685,7 @@ missed
;here we clear offensive text (after a shoot) ;here we clear offensive text (after a shoot)
;shit -- it's second time, but it must be like this ;shit -- it's second time, but it must be like this
ldy TankNr ldy TankNr
mva #0 plot4x4color mva #$00 plot4x4color
jsr DisplayOffensiveTextNr jsr DisplayOffensiveTextNr
NextPlayerShoots NextPlayerShoots
@@ -773,7 +773,7 @@ NoPlayerNoDeath
randomize talk.NumberOfOffensiveTexts (talk.NumberOfDeffensiveTexts+talk.NumberOfOffensiveTexts-1) randomize talk.NumberOfOffensiveTexts (talk.NumberOfDeffensiveTexts+talk.NumberOfOffensiveTexts-1)
sta TextNumberOff sta TextNumberOff
ldy TankTempY ldy TankTempY
mva #1 plot4x4color mva #$ff plot4x4color
jsr DisplayOffensiveTextNr jsr DisplayOffensiveTextNr
; tank flash ; tank flash
ldy TankTempY ldy TankTempY
@@ -785,7 +785,7 @@ NoPlayerNoDeath
;Deffensive text cleanup ;Deffensive text cleanup
;here we clear Deffensive text (after a shoot) ;here we clear Deffensive text (after a shoot)
ldy TankTempY ldy TankTempY
mva #0 plot4x4color mva #$00 plot4x4color
jsr DisplayOffensiveTextNr jsr DisplayOffensiveTextNr
; calculate position of the explosion (the post-death one) ; calculate position of the explosion (the post-death one)
BIN
View File
Binary file not shown.
+3 -3
View File
@@ -1598,7 +1598,7 @@ end_found
;address in LineAddress4x4 (it is the same as `temp`) ;address in LineAddress4x4 (it is the same as `temp`)
;starting from LineXdraw, LineYdraw ;starting from LineXdraw, LineYdraw
lda #1 lda #$ff
staplot4x4color staplot4x4color
sta plot4x4color sta plot4x4color
@@ -1665,7 +1665,7 @@ skip01
mva #3 di mva #3 di
mva #4 ResultY mva #4 ResultY
@ @
mva #1 plot4x4color mva #$ff plot4x4color
mwa #lineClear LineAddress4x4 mwa #lineClear LineAddress4x4
mwa #((ScreenWidth/2)-(8*4)) LineXdraw ; centering mwa #((ScreenWidth/2)-(8*4)) LineXdraw ; centering
mva ResultY LineYdraw mva ResultY LineYdraw
@@ -1734,7 +1734,7 @@ quit_seppuku
jsr RoundOverSprites jsr RoundOverSprites
mva #1 plot4x4color mva #$ff plot4x4color
;centering the result screen ;centering the result screen
mva #((ScreenHeight/2)-(8*4)) ResultY mva #((ScreenHeight/2)-(8*4)) ResultY
+1
View File
@@ -203,6 +203,7 @@ PreviousFall .DS 1
EndOfTheFallFlag .DS 1 ; in case of the infinite fall EndOfTheFallFlag .DS 1 ; in case of the infinite fall
;Parachute .DS 1 ; are you insured with parachute? ;Parachute .DS 1 ; are you insured with parachute?
FloatingAlt .DS 1 ; floating tank altitude FloatingAlt .DS 1 ; floating tank altitude
FunkyWallFlag = FloatingAlt ; reuse this variable in different weapon (Funky Bomb)!
;---------------------------------------------------- ;----------------------------------------------------
;Flight ;Flight
;variables for 5 missiles (used for mirv) ;variables for 5 missiles (used for mirv)
+34 -20
View File
@@ -5,10 +5,7 @@
.proc Explosion .proc Explosion
;-------------------------------------------------- ;--------------------------------------------------
;cleanup of the soil fall down ranges (left and right) ;cleanup of the soil fall down ranges (left and right)
mwa #screenwidth RangeLeft jsr ClearScreenSoilRange
lda #0
sta RangeRight
sta RangeRight+1
ldx TankNr ldx TankNr
lda ActiveWeapon,x lda ActiveWeapon,x
@@ -192,6 +189,7 @@ EndOfLeapping
mva #1 Erase mva #1 Erase
jsr drawtanks jsr drawtanks
mva #0 Erase mva #0 Erase
sta FunkyWallFlag
pla pla
sta TankNr sta TankNr
mva #1 color mva #1 color
@@ -224,6 +222,10 @@ NoExplosionInFunkyBomb
dec FunkyBombCounter dec FunkyBombCounter
bne FunkyBombLoop bne FunkyBombLoop
mva #0 tracerflag mva #0 tracerflag
lda FunkyWallFlag
beq NoWallsInFunky
jsr SetFullScreenSoilRange
NoWallsInFunky
rts rts
.endp .endp
; ------------------------ ; ------------------------
@@ -1519,7 +1521,7 @@ RandomizeOffensiveText
sta TextNumberOff sta TextNumberOff
ldy TankNr ldy TankNr
mva #1 plot4x4color mva #$ff plot4x4color
jsr DisplayOffensiveTextNr jsr DisplayOffensiveTextNr
mva #0 LaserFlag ; $ff - Laser mva #0 LaserFlag ; $ff - Laser
@@ -2099,10 +2101,7 @@ MIRVcopyParameters
sta vx03+4 sta vx03+4
; clearing ranges of soil down registers ; clearing ranges of soil down registers
mwa #screenwidth RangeLeft jsr ClearScreenSoilRange
lda #0
sta RangeRight
sta RangeRight+1
ldx #$FF ; it will turn 0 in a moment anyway ldx #$FF ; it will turn 0 in a moment anyway
stx MirvMissileCounter stx MirvMissileCounter
@@ -2334,7 +2333,7 @@ MIRValreadyAll
;first clean the offensive text... ;first clean the offensive text...
ldy TankNr ldy TankNr
mva #0 plot4x4color mva #$00 plot4x4color
jsr DisplayOffensiveTextNr jsr DisplayOffensiveTextNr
; temporary removing tanks from the screen (otherwise they will fall down with soil) ; temporary removing tanks from the screen (otherwise they will fall down with soil)
@@ -2377,12 +2376,14 @@ MakeBump
sbc vx+# sbc vx+#
sta vx+# sta vx+#
.endr .endr
inc FunkyWallFlag
rts rts
WrapAndNone WrapAndNone
bvc NoWall bvc NoWall
cpw xtraj+1 #screenwidth cpw xtraj+1 #screenwidth
bcc OnScreen bcc OnScreen
; (wrapping wall) ; (wrapping wall)
inc FunkyWallFlag
bit xtraj+2 bit xtraj+2
bmi LeftWrap bmi LeftWrap
RightWrap RightWrap
@@ -2464,10 +2465,7 @@ NextLine2
lda #0 lda #0
ldx TankNr ldx TankNr
sta ActiveDefenceWeapon,x ; deactivate Nuclear Winter sta ActiveDefenceWeapon,x ; deactivate Nuclear Winter
jsr SetFullScreenSoilRange
sta RangeLeft ; whole screen in range of soil down
sta RangeLeft+1
mwa #screenwidth RangeRight
jsr SoilDown2 jsr SoilDown2
jsr drawtanks ; for restore PM jsr drawtanks ; for restore PM
rts rts
@@ -2560,7 +2558,7 @@ ReachSky
lda FloatingAlt lda FloatingAlt
sbc #12 sbc #12
sta LineYdraw sta LineYdraw
lda #0 lda #$00
jsr TypeLine4x4.staplot4x4color jsr TypeLine4x4.staplot4x4color
; and Soildown at the start (for correct mountaintable if tank was buried) ; and Soildown at the start (for correct mountaintable if tank was buried)
; calculate range ; calculate range
@@ -2727,7 +2725,7 @@ pressedSpace
lda FloatingAlt lda FloatingAlt
sbc #12 sbc #12
sta LineYdraw sta LineYdraw
lda #0 lda #$00
jsr TypeLine4x4.staplot4x4color jsr TypeLine4x4.staplot4x4color
ldx TankNr ldx TankNr
;================================= ;=================================
@@ -2981,10 +2979,7 @@ CalculateExplosionRange0
;(for the first or single explosion) ;(for the first or single explosion)
;zero soil fall out ranges ;zero soil fall out ranges
mwa #screenwidth RangeLeft jsr ClearScreenSoilRange
lda #0
sta RangeRight
sta RangeRight+1
;-------------------------------------------------- ;--------------------------------------------------
.proc CalculateExplosionRange .proc CalculateExplosionRange
;-------------------------------------------------- ;--------------------------------------------------
@@ -3017,6 +3012,25 @@ RangesChecked
rts rts
.endp .endp
;--------------------------------------------------
.proc SetFullScreenSoilRange
; whole screen in range of soil down
;--------------------------------------------------
lda #0
sta RangeLeft
sta RangeLeft+1
mwa #screenwidth RangeRight
rts
.endp
;--------------------------------------------------
.proc ClearScreenSoilRange
; cleanup of the soil fall down ranges (left and right) ;--------------------------------------------------
mwa #screenwidth RangeLeft
lda #0
sta RangeRight
sta RangeRight+1
rts
.endp
;-------------------------------------------------- ;--------------------------------------------------
.proc DecreaseWeaponBeforeShoot .proc DecreaseWeaponBeforeShoot
;-------------------------------------------------- ;--------------------------------------------------