mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-21 06:39:46 +02:00
Fix for different types of joysticks in different ports.
This commit is contained in:
+5
-4
@@ -16,8 +16,9 @@
|
||||
; - money each player has on the beginning of the game (moneyL i moneyH)
|
||||
; - and I am sure maxwind, gravity, no_of_rounds in a game, speed of shell flight
|
||||
|
||||
mwa #(display+40*140) temp ; we only need to clear last 60 lines (faster)
|
||||
jsr clearscreen.Go ;let the screen be clean
|
||||
; mwa #(display+40*140) temp ; we only need to clear last 60 lines (faster)
|
||||
; jsr clearscreen.Go ;let the screen be clean
|
||||
jsr clearscreen ;let the screen be clean
|
||||
|
||||
mwa #DisplayCopyRom temp
|
||||
mwa #display temp2
|
||||
@@ -221,7 +222,7 @@ invertme
|
||||
jmp AfterManualPurchase
|
||||
ManualPurchase
|
||||
lda JoyNumber,x
|
||||
sta JoystickNumber ; set joystick port for player
|
||||
jsr SetJoystickPort ; set joystick port for player
|
||||
mva #0 isInventory
|
||||
jsr Purchase ; purchase weapons
|
||||
bit escFlag
|
||||
@@ -1542,7 +1543,7 @@ displayloop1
|
||||
mva #0 COLOR1
|
||||
sta COLBAKS ; set color of background
|
||||
sta CreditsVScrol
|
||||
sta JoystickNumber ; set joystick port for player
|
||||
jsr SetJoystickPort ; set joystick port for player
|
||||
mva #TextForegroundColor COLOR2
|
||||
SetDLI DLIinterruptGameOver ; jsr SetDLI for Game Over screen
|
||||
; make text and color lines for each tank
|
||||
|
||||
@@ -52,7 +52,7 @@ MainGameLoop
|
||||
|
||||
mva #0 TankNr ;
|
||||
sta COLBAKS ; set background color to black
|
||||
sta JoystickNumber ; set joystick port for player
|
||||
jsr SetJoystickPort ; set joystick port for player
|
||||
|
||||
; Hide all (easier than hide last ;) ) tanks
|
||||
jsr cleartanks ; A=0
|
||||
@@ -374,7 +374,7 @@ RoboTanks
|
||||
|
||||
ManualShooting
|
||||
lda JoyNumber,x
|
||||
sta JoystickNumber ; set joystick port for player
|
||||
jsr SetJoystickPort ; set joystick port for player
|
||||
jsr WaitForKeyRelease
|
||||
lda #%00000000
|
||||
sta TestFlightFlag ; set "Test Fight" off
|
||||
@@ -809,7 +809,6 @@ deletePtr = temp
|
||||
; clean variables
|
||||
lda #0
|
||||
sta escFlag
|
||||
sta JoystickNumber
|
||||
tay
|
||||
mwa #variablesStart deletePtr
|
||||
@ tya
|
||||
@@ -817,6 +816,8 @@ deletePtr = temp
|
||||
inw deletePtr
|
||||
cpw deletePtr #variablesEnd
|
||||
bne @-
|
||||
tya
|
||||
jsr SetJoystickPort
|
||||
|
||||
; ser initial shapes for each tank (tanks 0-5 has shape 0 now)
|
||||
ldy #1
|
||||
|
||||
@@ -375,6 +375,15 @@ NoRMT_PALchange
|
||||
icl 'game.asm'
|
||||
;--------------------------------------------------
|
||||
|
||||
.proc SetJoystickPort
|
||||
sta JoystickNumber
|
||||
.IF TARGET = 800
|
||||
jsr WaitOneFrame
|
||||
jmp GetKey.Check2button ; update state second joy button
|
||||
.ELSE
|
||||
rts
|
||||
.ENDIF
|
||||
.endp
|
||||
|
||||
;--------------------------------------------------
|
||||
.proc GetKey
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -235,6 +235,9 @@ FirstSTART
|
||||
icl 'game.asm'
|
||||
;--------------------------------------------------
|
||||
|
||||
.proc SetJoystickPort
|
||||
rts
|
||||
.endp
|
||||
|
||||
;--------------------------------------------------
|
||||
.proc GetKey
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user