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.
* **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.
+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.
* **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.
+1 -6
View File
@@ -1899,7 +1899,7 @@ EndPutChar
; puts 4x4 pixels char on the graphics screen
; in: dx, dy (LOWER left corner of the char)
; in: CharCode4x4 (.sbyte)
; in: plot4x4color (0/1)
; in: plot4x4color (0/255)
; all pixels are being drawn
; (empty and not empty)
;--------------------------------------------------
@@ -1911,11 +1911,6 @@ EndPutChar
cpw dx #(screenwidth-4)
jcs TypeChar.EndPutChar ;nearest RTS
; checks ommited.
lda plot4x4color
beq FontColor0
lda #$ff ; better option to check (plot4x4color = $00 or $ff)
sta plot4x4color
FontColor0
; char to the table
lda CharCode4x4
and #%00000001
+8 -8
View File
@@ -36,7 +36,7 @@
;we decided it must go in 'English' to let other people work on it
.macro build
dta d"1.11" ; number of this build (3 bytes)
dta d"1.12" ; number of this build (3 bytes)
.endm
icl 'definitions.asm'
@@ -128,7 +128,7 @@
.zpvar escFlag .byte
.zpvar LineYdraw .byte
.zpvar LineXdraw .word
.zpvar plot4x4color .byte
.zpvar plot4x4color .byte ; $00 / $ff
.zpvar Multiplier .word
.zpvar Multiplier_ .byte ; 3 bytes
.zpvar HowToDraw .byte
@@ -552,7 +552,7 @@ DoNotFinishTheRound
mva #1 plot4x4color
mva #$ff plot4x4color
jsr DisplayTankNameAbove
mva #1 color ;to display flying point
@@ -592,7 +592,7 @@ ManualShooting
seq:rts ; keys Esc or O
AfterManualShooting
mva #0 plot4x4color
mva #$00 plot4x4color
jsr DisplayTankNameAbove
; defensive weapons without flight handling
ldx TankNr
@@ -631,7 +631,7 @@ ShootNow
jsr Shoot
;here we clear offensive text (after a shoot)
ldy TankNr
mva #0 plot4x4color
mva #$00 plot4x4color
jsr DisplayOffensiveTextNr
lda HitFlag ;0 if missed
@@ -685,7 +685,7 @@ missed
;here we clear offensive text (after a shoot)
;shit -- it's second time, but it must be like this
ldy TankNr
mva #0 plot4x4color
mva #$00 plot4x4color
jsr DisplayOffensiveTextNr
NextPlayerShoots
@@ -773,7 +773,7 @@ NoPlayerNoDeath
randomize talk.NumberOfOffensiveTexts (talk.NumberOfDeffensiveTexts+talk.NumberOfOffensiveTexts-1)
sta TextNumberOff
ldy TankTempY
mva #1 plot4x4color
mva #$ff plot4x4color
jsr DisplayOffensiveTextNr
; tank flash
ldy TankTempY
@@ -785,7 +785,7 @@ NoPlayerNoDeath
;Deffensive text cleanup
;here we clear Deffensive text (after a shoot)
ldy TankTempY
mva #0 plot4x4color
mva #$00 plot4x4color
jsr DisplayOffensiveTextNr
; 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`)
;starting from LineXdraw, LineYdraw
lda #1
lda #$ff
staplot4x4color
sta plot4x4color
@@ -1665,7 +1665,7 @@ skip01
mva #3 di
mva #4 ResultY
@
mva #1 plot4x4color
mva #$ff plot4x4color
mwa #lineClear LineAddress4x4
mwa #((ScreenWidth/2)-(8*4)) LineXdraw ; centering
mva ResultY LineYdraw
@@ -1734,7 +1734,7 @@ quit_seppuku
jsr RoundOverSprites
mva #1 plot4x4color
mva #$ff plot4x4color
;centering the result screen
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
;Parachute .DS 1 ; are you insured with parachute?
FloatingAlt .DS 1 ; floating tank altitude
FunkyWallFlag = FloatingAlt ; reuse this variable in different weapon (Funky Bomb)!
;----------------------------------------------------
;Flight
;variables for 5 missiles (used for mirv)
+34 -20
View File
@@ -5,10 +5,7 @@
.proc Explosion
;--------------------------------------------------
;cleanup of the soil fall down ranges (left and right)
mwa #screenwidth RangeLeft
lda #0
sta RangeRight
sta RangeRight+1
jsr ClearScreenSoilRange
ldx TankNr
lda ActiveWeapon,x
@@ -192,6 +189,7 @@ EndOfLeapping
mva #1 Erase
jsr drawtanks
mva #0 Erase
sta FunkyWallFlag
pla
sta TankNr
mva #1 color
@@ -224,6 +222,10 @@ NoExplosionInFunkyBomb
dec FunkyBombCounter
bne FunkyBombLoop
mva #0 tracerflag
lda FunkyWallFlag
beq NoWallsInFunky
jsr SetFullScreenSoilRange
NoWallsInFunky
rts
.endp
; ------------------------
@@ -1519,7 +1521,7 @@ RandomizeOffensiveText
sta TextNumberOff
ldy TankNr
mva #1 plot4x4color
mva #$ff plot4x4color
jsr DisplayOffensiveTextNr
mva #0 LaserFlag ; $ff - Laser
@@ -2099,10 +2101,7 @@ MIRVcopyParameters
sta vx03+4
; clearing ranges of soil down registers
mwa #screenwidth RangeLeft
lda #0
sta RangeRight
sta RangeRight+1
jsr ClearScreenSoilRange
ldx #$FF ; it will turn 0 in a moment anyway
stx MirvMissileCounter
@@ -2334,7 +2333,7 @@ MIRValreadyAll
;first clean the offensive text...
ldy TankNr
mva #0 plot4x4color
mva #$00 plot4x4color
jsr DisplayOffensiveTextNr
; temporary removing tanks from the screen (otherwise they will fall down with soil)
@@ -2377,12 +2376,14 @@ MakeBump
sbc vx+#
sta vx+#
.endr
inc FunkyWallFlag
rts
WrapAndNone
bvc NoWall
cpw xtraj+1 #screenwidth
bcc OnScreen
; (wrapping wall)
inc FunkyWallFlag
bit xtraj+2
bmi LeftWrap
RightWrap
@@ -2464,10 +2465,7 @@ NextLine2
lda #0
ldx TankNr
sta ActiveDefenceWeapon,x ; deactivate Nuclear Winter
sta RangeLeft ; whole screen in range of soil down
sta RangeLeft+1
mwa #screenwidth RangeRight
jsr SetFullScreenSoilRange
jsr SoilDown2
jsr drawtanks ; for restore PM
rts
@@ -2560,7 +2558,7 @@ ReachSky
lda FloatingAlt
sbc #12
sta LineYdraw
lda #0
lda #$00
jsr TypeLine4x4.staplot4x4color
; and Soildown at the start (for correct mountaintable if tank was buried)
; calculate range
@@ -2727,7 +2725,7 @@ pressedSpace
lda FloatingAlt
sbc #12
sta LineYdraw
lda #0
lda #$00
jsr TypeLine4x4.staplot4x4color
ldx TankNr
;=================================
@@ -2981,10 +2979,7 @@ CalculateExplosionRange0
;(for the first or single explosion)
;zero soil fall out ranges
mwa #screenwidth RangeLeft
lda #0
sta RangeRight
sta RangeRight+1
jsr ClearScreenSoilRange
;--------------------------------------------------
.proc CalculateExplosionRange
;--------------------------------------------------
@@ -3017,6 +3012,25 @@ RangesChecked
rts
.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
;--------------------------------------------------