2017-08-15 19:40:14 +00:00
|
|
|
;
|
|
|
|
; players
|
|
|
|
; Code and data structures related to the players
|
|
|
|
;
|
|
|
|
; Created by Quinn Dunki on 8/13/17
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
playerData:
|
2021-09-23 18:36:48 +00:00
|
|
|
;;;;;;;;;;;; PLAYER 1 ;;;;;;;;;;;;;;
|
2017-08-15 19:40:14 +00:00
|
|
|
; gameobject data
|
2017-09-02 19:32:40 +00:00
|
|
|
.word 0 ; X pos in pixels (from left terrain edge)
|
|
|
|
.word 0 ; Y pos in pixels (from bottom terrain edge)
|
2017-08-27 05:34:49 +00:00
|
|
|
.word 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Saved background
|
2017-09-30 00:53:05 +00:00
|
|
|
.word 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.word 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.word 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
2017-08-15 19:40:14 +00:00
|
|
|
|
2023-06-22 03:07:30 +00:00
|
|
|
.word 24 ; Angle in degrees from +X
|
2017-10-22 20:37:06 +00:00
|
|
|
.word 2 ; Power
|
|
|
|
.word 100 ; Anger
|
2017-09-03 00:31:12 +00:00
|
|
|
.byte 8,"SPROCKET " ; Name
|
2023-07-06 03:27:47 +00:00
|
|
|
.word 29 ; Base Sprite
|
2021-09-23 18:36:48 +00:00
|
|
|
.word 0,5,7,0,0,0,0,0 ; Prices
|
2018-06-11 00:05:20 +00:00
|
|
|
.word 0 ; Current weapon
|
2021-09-23 19:00:53 +00:00
|
|
|
.word 7 ; Treats
|
2021-09-23 18:36:48 +00:00
|
|
|
.repeat 86
|
2017-09-30 00:53:05 +00:00
|
|
|
.byte 0 ; Padding to 256-byte boundary
|
|
|
|
.endrepeat
|
2017-09-03 00:31:12 +00:00
|
|
|
|
2021-09-23 18:36:48 +00:00
|
|
|
;;;;;;;;;;;; PLAYER 2 ;;;;;;;;;;;;;;
|
2017-09-03 00:31:12 +00:00
|
|
|
; gameobject data
|
|
|
|
.word 0 ; X pos in pixels (from left terrain edge)
|
|
|
|
.word 0 ; Y pos in pixels (from bottom terrain edge)
|
|
|
|
.word 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; Saved background
|
2017-09-30 00:53:05 +00:00
|
|
|
.word 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.word 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
|
|
.word 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
2017-09-03 00:31:12 +00:00
|
|
|
|
2023-06-22 03:07:30 +00:00
|
|
|
.word 154 ; Angle in degrees from +X
|
2017-10-22 20:37:06 +00:00
|
|
|
.word 2 ; Power
|
2021-09-23 18:36:48 +00:00
|
|
|
.word 100 ; Anger
|
2017-09-03 00:31:12 +00:00
|
|
|
.byte 8,"TINKER " ; Name
|
2023-06-30 22:32:17 +00:00
|
|
|
.word 20 ; Base Sprite
|
2021-09-23 18:36:48 +00:00
|
|
|
.word 0,5,7,0,0,0,0,0 ; Prices
|
2018-06-11 00:05:20 +00:00
|
|
|
.word 0 ; Current weapon
|
2021-09-23 18:36:48 +00:00
|
|
|
.word 7 ; Treats
|
2017-08-15 19:40:14 +00:00
|
|
|
|
2021-09-23 18:36:48 +00:00
|
|
|
.repeat 86
|
2017-09-30 00:53:05 +00:00
|
|
|
.byte 0 ; Padding to 256-byte boundary
|
|
|
|
.endrepeat
|
|
|
|
|
|
|
|
PD_ANGLE = 132
|
|
|
|
PD_POWER = 134
|
|
|
|
PD_ANGER = 136
|
|
|
|
PD_NAME = 138
|
2018-06-08 17:49:29 +00:00
|
|
|
PD_BASESPRITE = 148
|
2021-09-23 18:36:48 +00:00
|
|
|
PD_PRICES = 150
|
2018-06-11 00:05:20 +00:00
|
|
|
PD_CURRWEAPON = 166
|
2021-09-23 18:36:48 +00:00
|
|
|
PD_TREATS = 168
|
2017-09-30 00:53:05 +00:00
|
|
|
PD_SIZE = 256
|
2017-08-16 01:03:19 +00:00
|
|
|
|
2023-06-26 01:43:07 +00:00
|
|
|
MAX_POWER = 5
|
|
|
|
MAX_ANGLE = 180
|
|
|
|
|
2017-08-16 01:03:19 +00:00
|
|
|
.macro PLAYERPTR_Y
|
|
|
|
tya ; Pointer to player structure from index
|
|
|
|
asl
|
|
|
|
asl
|
|
|
|
asl
|
2017-09-03 00:31:12 +00:00
|
|
|
asl
|
|
|
|
asl
|
|
|
|
asl
|
2017-09-30 00:53:05 +00:00
|
|
|
asl
|
|
|
|
asl
|
2017-08-16 01:03:19 +00:00
|
|
|
tay
|
|
|
|
.endmacro
|
|
|
|
|
|
|
|
|
2018-12-24 00:39:22 +00:00
|
|
|
.macro PLAYERPTR_X
|
|
|
|
txa ; Pointer to player structure from index
|
|
|
|
asl
|
|
|
|
asl
|
|
|
|
asl
|
|
|
|
asl
|
|
|
|
asl
|
|
|
|
asl
|
|
|
|
asl
|
|
|
|
asl
|
|
|
|
tax
|
|
|
|
.endmacro
|
|
|
|
|
|
|
|
|
2017-09-02 19:32:40 +00:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; playerCreate
|
|
|
|
;
|
|
|
|
; A = Player X pos
|
2017-09-03 00:31:12 +00:00
|
|
|
; Y = Index
|
|
|
|
; Trashes SCRATCHL
|
2017-09-02 19:32:40 +00:00
|
|
|
;
|
|
|
|
playerCreate:
|
2017-09-03 00:31:12 +00:00
|
|
|
pha
|
|
|
|
PLAYERPTR_Y
|
|
|
|
sty SCRATCHL
|
|
|
|
pla
|
|
|
|
|
|
|
|
sta playerData+GO_POSX,y
|
2017-09-02 19:32:40 +00:00
|
|
|
lda #playerData
|
2017-09-03 00:31:12 +00:00
|
|
|
clc
|
|
|
|
adc SCRATCHL
|
2017-09-02 19:32:40 +00:00
|
|
|
sta PARAML0
|
|
|
|
jsr placeGameObjectOnTerrain
|
|
|
|
rts
|
|
|
|
|
2017-09-03 00:31:12 +00:00
|
|
|
|
2017-08-16 01:03:19 +00:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; playerDeltaAngle
|
|
|
|
;
|
|
|
|
; Y = Player index
|
|
|
|
; X = Delta
|
|
|
|
;
|
|
|
|
playerDeltaAngle:
|
|
|
|
SAVE_AXY
|
|
|
|
PLAYERPTR_Y
|
|
|
|
|
|
|
|
txa
|
|
|
|
clc
|
|
|
|
adc playerData+PD_ANGLE,y
|
|
|
|
bmi playerDeltaAngleClampLow
|
2023-06-26 01:43:07 +00:00
|
|
|
cmp #MAX_ANGLE
|
2017-08-16 01:03:19 +00:00
|
|
|
bpl playerDeltaAngleClampHigh
|
|
|
|
|
|
|
|
playerDeltaAngleStore:
|
|
|
|
sta playerData+PD_ANGLE,y
|
|
|
|
RESTORE_AXY
|
|
|
|
rts
|
|
|
|
|
|
|
|
playerDeltaAngleClampLow:
|
|
|
|
lda #0
|
|
|
|
bra playerDeltaAngleStore
|
|
|
|
|
|
|
|
playerDeltaAngleClampHigh:
|
2023-06-26 01:43:07 +00:00
|
|
|
lda #MAX_ANGLE
|
2017-08-16 01:03:19 +00:00
|
|
|
bra playerDeltaAngleStore
|
|
|
|
|
2017-08-15 19:40:14 +00:00
|
|
|
|
2017-09-05 19:55:27 +00:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; playerDeltaPower
|
|
|
|
;
|
|
|
|
; Y = Player index
|
|
|
|
; X = Delta
|
|
|
|
;
|
|
|
|
playerDeltaPower:
|
|
|
|
SAVE_AXY
|
|
|
|
PLAYERPTR_Y
|
|
|
|
|
|
|
|
txa
|
|
|
|
clc
|
|
|
|
adc playerData+PD_POWER,y
|
|
|
|
beq playerDeltaPowerClampLow
|
2023-06-26 01:43:07 +00:00
|
|
|
cmp #MAX_POWER
|
2017-09-05 19:55:27 +00:00
|
|
|
bpl playerDeltaPowerClampHigh
|
|
|
|
|
|
|
|
playerDeltaPowerStore:
|
|
|
|
sta playerData+PD_POWER,y
|
|
|
|
RESTORE_AXY
|
|
|
|
rts
|
|
|
|
|
|
|
|
playerDeltaPowerClampLow:
|
|
|
|
lda #1
|
|
|
|
bra playerDeltaPowerStore
|
|
|
|
|
|
|
|
playerDeltaPowerClampHigh:
|
2023-06-26 01:43:07 +00:00
|
|
|
lda #MAX_POWER
|
2017-09-05 19:55:27 +00:00
|
|
|
bra playerDeltaPowerStore
|
|
|
|
|
|
|
|
|
2017-08-21 00:51:12 +00:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; playerFire
|
|
|
|
;
|
|
|
|
; Y = Player index
|
2021-09-23 18:36:48 +00:00
|
|
|
; Trashes SCRATCHL,SCRATCHL2
|
2017-08-21 00:51:12 +00:00
|
|
|
;
|
|
|
|
playerFire:
|
2021-09-23 18:36:48 +00:00
|
|
|
SAVE_AXY
|
2023-07-06 03:27:47 +00:00
|
|
|
sty SCRATCHL2
|
2017-08-21 00:51:12 +00:00
|
|
|
PLAYERPTR_Y
|
|
|
|
|
2021-09-23 18:36:48 +00:00
|
|
|
; Check that we can afford it
|
2018-06-11 23:22:34 +00:00
|
|
|
lda playerData+PD_CURRWEAPON,y
|
|
|
|
pha
|
|
|
|
asl
|
|
|
|
tax
|
2018-12-30 01:19:10 +00:00
|
|
|
stx SCRATCHL
|
2021-09-23 18:36:48 +00:00
|
|
|
lda #playerData+PD_PRICES
|
2018-12-30 01:19:10 +00:00
|
|
|
clc
|
|
|
|
adc SCRATCHL
|
|
|
|
sta SCRATCHL
|
|
|
|
lda (SCRATCHL),y
|
2021-09-23 18:36:48 +00:00
|
|
|
sta SCRATCHL
|
|
|
|
|
|
|
|
lda playerData+PD_TREATS,y
|
|
|
|
cmp SCRATCHL
|
|
|
|
bmi playerFire_abort
|
2018-06-11 23:22:34 +00:00
|
|
|
|
2021-09-23 18:36:48 +00:00
|
|
|
sec ; Spend money
|
|
|
|
sbc SCRATCHL
|
|
|
|
sta playerData+PD_TREATS,y
|
2018-06-11 23:22:34 +00:00
|
|
|
|
2023-07-06 03:27:47 +00:00
|
|
|
; Animate the shooting
|
|
|
|
phy
|
|
|
|
ldy SCRATCHL2
|
|
|
|
jsr renderShootAnimation
|
|
|
|
ply
|
|
|
|
|
2018-06-11 23:22:34 +00:00
|
|
|
; Prepare projectile parameters
|
|
|
|
pla
|
|
|
|
sta projectileParams+8
|
2017-08-27 05:34:49 +00:00
|
|
|
lda playerData+GO_POSX,y
|
2017-08-21 00:51:12 +00:00
|
|
|
sta projectileParams
|
2017-08-27 05:34:49 +00:00
|
|
|
lda playerData+GO_POSY,y
|
2017-08-21 00:51:12 +00:00
|
|
|
sta projectileParams+2
|
|
|
|
lda playerData+PD_ANGLE,y
|
|
|
|
sta projectileParams+4
|
|
|
|
lda playerData+PD_POWER,y
|
|
|
|
sta projectileParams+6
|
|
|
|
jsr fireProjectile
|
|
|
|
|
2018-06-11 23:22:34 +00:00
|
|
|
playerFire_done:
|
2021-09-23 18:36:48 +00:00
|
|
|
RESTORE_AXY
|
2017-09-03 03:52:19 +00:00
|
|
|
rts
|
|
|
|
|
2018-06-11 23:22:34 +00:00
|
|
|
playerFire_abort:
|
|
|
|
pla ; Balance stack
|
|
|
|
bra playerFire_done
|
|
|
|
|
2017-09-03 03:52:19 +00:00
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; playerIntersectRect
|
|
|
|
;
|
2018-12-24 00:39:22 +00:00
|
|
|
; X = Player index
|
2017-09-03 03:52:19 +00:00
|
|
|
; rectParams = Rectangle to intersect with us
|
|
|
|
; A => non zero if rectangle is intersecting player
|
|
|
|
;
|
|
|
|
playerIntersectRect:
|
2018-12-24 00:39:22 +00:00
|
|
|
phx
|
|
|
|
PLAYERPTR_X
|
2017-09-03 03:52:19 +00:00
|
|
|
|
2018-12-24 00:39:22 +00:00
|
|
|
lda playerData+GO_POSX,x
|
2017-09-03 03:52:19 +00:00
|
|
|
sta rectParams2+0
|
2018-12-24 00:39:22 +00:00
|
|
|
lda playerData+GO_POSY,x
|
2017-09-03 03:52:19 +00:00
|
|
|
sta rectParams2+2
|
|
|
|
lda #GAMEOBJECTWIDTH
|
|
|
|
sta rectParams2+4
|
|
|
|
lda #GAMEOBJECTHEIGHT
|
|
|
|
sta rectParams2+6
|
|
|
|
|
2017-09-30 00:53:05 +00:00
|
|
|
jsr intersectRectRect
|
2018-12-24 00:39:22 +00:00
|
|
|
plx
|
2017-08-21 00:51:12 +00:00
|
|
|
rts
|
|
|
|
|
|
|
|
|
2017-08-16 02:04:22 +00:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; renderPlayers
|
|
|
|
;
|
|
|
|
;
|
|
|
|
renderPlayers:
|
2017-10-09 21:53:24 +00:00
|
|
|
SAVE_AXY
|
2017-10-27 03:15:52 +00:00
|
|
|
|
|
|
|
lda #playerData
|
|
|
|
sta PARAML0
|
2018-06-08 17:49:29 +00:00
|
|
|
lda playerData+PD_BASESPRITE
|
2017-10-27 03:15:52 +00:00
|
|
|
jsr renderGameObject
|
|
|
|
|
|
|
|
lda #playerData+PD_SIZE
|
|
|
|
sta PARAML0
|
2018-06-08 17:49:29 +00:00
|
|
|
lda playerData+PD_SIZE+PD_BASESPRITE
|
2017-10-27 03:15:52 +00:00
|
|
|
jsr renderGameObject
|
|
|
|
|
|
|
|
RESTORE_AXY
|
2017-08-16 02:04:22 +00:00
|
|
|
rts
|
|
|
|
|
|
|
|
|
2017-10-19 19:59:24 +00:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; protectPlayers
|
|
|
|
;
|
2018-12-24 00:39:22 +00:00
|
|
|
; Trashes PARAML0
|
2017-10-19 19:59:24 +00:00
|
|
|
;
|
|
|
|
protectPlayers:
|
|
|
|
SAVE_AXY
|
|
|
|
|
2017-10-27 03:15:52 +00:00
|
|
|
lda #playerData
|
|
|
|
sta PARAML0
|
|
|
|
jsr vramPtr
|
2019-02-23 00:00:48 +00:00
|
|
|
cpx #$ffff
|
|
|
|
beq protectPlayerNext
|
2017-10-27 03:15:52 +00:00
|
|
|
|
2017-10-19 19:59:24 +00:00
|
|
|
lda #playerData+GO_BACKGROUND
|
2018-12-24 00:39:22 +00:00
|
|
|
sta PARAML0
|
2017-10-19 19:59:24 +00:00
|
|
|
jsr protectGameObject
|
|
|
|
|
2017-10-27 03:15:52 +00:00
|
|
|
protectPlayerNext:
|
|
|
|
lda #playerData+PD_SIZE
|
|
|
|
sta PARAML0
|
|
|
|
jsr vramPtr
|
2019-02-23 00:00:48 +00:00
|
|
|
cpx #$ffff
|
|
|
|
beq protectPlayerDone
|
2017-10-27 03:15:52 +00:00
|
|
|
|
2017-10-19 19:59:24 +00:00
|
|
|
lda #playerData+GO_BACKGROUND+PD_SIZE
|
2018-12-24 00:39:22 +00:00
|
|
|
sta PARAML0
|
2017-10-19 19:59:24 +00:00
|
|
|
jsr protectGameObject
|
|
|
|
|
2017-10-27 03:15:52 +00:00
|
|
|
protectPlayerDone:
|
2017-10-19 19:59:24 +00:00
|
|
|
RESTORE_AXY
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
2017-10-07 22:15:22 +00:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; unrenderPlayers
|
|
|
|
;
|
|
|
|
;
|
|
|
|
unrenderPlayers:
|
2017-10-09 21:53:24 +00:00
|
|
|
SAVE_AXY
|
2017-10-27 03:15:52 +00:00
|
|
|
lda #playerData
|
|
|
|
sta PARAML0
|
|
|
|
jsr unrenderGameObject
|
|
|
|
|
|
|
|
lda #playerData+PD_SIZE
|
|
|
|
sta PARAML0
|
|
|
|
jsr unrenderGameObject
|
2017-10-09 21:53:24 +00:00
|
|
|
RESTORE_AXY
|
2017-10-07 22:15:22 +00:00
|
|
|
rts
|
|
|
|
|
|
|
|
|
2023-06-30 22:32:17 +00:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; renderHitAnimation
|
|
|
|
;
|
|
|
|
; Y = Player index to render
|
|
|
|
; Trashes PARAML0,SCRATCHL
|
|
|
|
;
|
|
|
|
renderHitAnimation:
|
|
|
|
SAVE_AXY
|
2023-07-05 03:09:17 +00:00
|
|
|
|
|
|
|
; Play hit sound
|
|
|
|
phy
|
|
|
|
ldy #SOUND_HOWL
|
|
|
|
jsr playSound
|
|
|
|
ply
|
|
|
|
|
2023-06-30 22:32:17 +00:00
|
|
|
PLAYERPTR_Y
|
|
|
|
|
|
|
|
jsr unrenderPlayers
|
|
|
|
jsr unrenderCrosshair
|
|
|
|
|
|
|
|
lda playerData+GO_POSX,y
|
2023-07-06 03:27:47 +00:00
|
|
|
sta renderAnimationPos
|
2023-06-30 22:32:17 +00:00
|
|
|
lda playerData+GO_POSY,y
|
|
|
|
clc
|
|
|
|
adc #GAMEOBJECTHEIGHT
|
2023-07-06 03:27:47 +00:00
|
|
|
sta renderAnimationPos+2
|
|
|
|
lda #renderAnimationPos
|
2023-06-30 22:32:17 +00:00
|
|
|
sta PARAML0
|
|
|
|
ldx #5
|
|
|
|
|
|
|
|
lda playerData+PD_BASESPRITE,y
|
|
|
|
inc ; Hit animation starts right above base sprite
|
|
|
|
tay
|
2023-07-06 03:27:47 +00:00
|
|
|
lda #ANIMATION_SIZE_16x32
|
2023-06-30 22:32:17 +00:00
|
|
|
jsr renderAnimation
|
|
|
|
|
|
|
|
jsr renderPlayers
|
|
|
|
|
2023-07-06 03:27:47 +00:00
|
|
|
RESTORE_AXY
|
2023-06-30 22:32:17 +00:00
|
|
|
rts
|
|
|
|
|
2023-07-06 03:27:47 +00:00
|
|
|
renderAnimationPos:
|
2023-06-30 22:32:17 +00:00
|
|
|
.word 0,0
|
|
|
|
|
|
|
|
|
2023-07-06 03:27:47 +00:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; renderShootAnimation
|
|
|
|
;
|
|
|
|
; Y = Player index to render
|
|
|
|
; Trashes PARAML0,SCRATCHL
|
|
|
|
;
|
|
|
|
renderShootAnimation:
|
|
|
|
SAVE_AXY
|
|
|
|
|
2023-07-06 18:03:41 +00:00
|
|
|
jsr playIterativeMeowSound
|
2023-07-06 03:27:47 +00:00
|
|
|
|
|
|
|
PLAYERPTR_Y
|
|
|
|
|
|
|
|
jsr unrenderPlayers
|
|
|
|
jsr unrenderCrosshair
|
|
|
|
|
|
|
|
lda playerData+GO_POSX,y
|
|
|
|
sta renderAnimationPos
|
|
|
|
lda playerData+GO_POSY,y
|
|
|
|
sta renderAnimationPos+2
|
|
|
|
lda #renderAnimationPos
|
|
|
|
sta PARAML0
|
|
|
|
|
|
|
|
ldx #3
|
|
|
|
|
|
|
|
lda playerData+PD_BASESPRITE,y
|
|
|
|
clc
|
|
|
|
adc #6 ; Shoot animation starts 6 above base sprite
|
|
|
|
tay
|
|
|
|
lda #ANIMATION_SIZE_16x16
|
|
|
|
jsr renderAnimation
|
|
|
|
|
|
|
|
jsr renderPlayers
|
|
|
|
|
|
|
|
RESTORE_AXY
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
2017-08-15 19:40:14 +00:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; renderPlayerHeader
|
|
|
|
;
|
|
|
|
; Y = Player index to render
|
|
|
|
;
|
|
|
|
renderPlayerHeader:
|
|
|
|
SAVE_AXY
|
2017-08-16 01:03:19 +00:00
|
|
|
PLAYERPTR_Y
|
2017-08-15 19:40:14 +00:00
|
|
|
|
2017-10-23 19:40:44 +00:00
|
|
|
ldx #0 + 321
|
2017-09-03 00:31:12 +00:00
|
|
|
tya
|
|
|
|
clc
|
|
|
|
adc #playerData
|
|
|
|
adc #PD_NAME
|
|
|
|
jsr DrawString
|
|
|
|
|
2017-10-23 19:40:44 +00:00
|
|
|
ldx #48 + 321
|
2017-08-15 19:40:14 +00:00
|
|
|
lda #angleStr
|
|
|
|
jsr DrawString
|
|
|
|
|
2017-08-16 01:03:19 +00:00
|
|
|
lda playerData+PD_ANGLE,y
|
2017-10-23 19:40:44 +00:00
|
|
|
ldx #56 + 321
|
2017-08-15 19:40:14 +00:00
|
|
|
jsr drawNumber
|
|
|
|
|
2017-10-23 19:40:44 +00:00
|
|
|
ldx #68 + 321
|
2017-08-20 22:15:46 +00:00
|
|
|
lda #powerStr
|
|
|
|
jsr DrawString
|
|
|
|
|
|
|
|
lda playerData+PD_POWER,y
|
2017-10-23 19:40:44 +00:00
|
|
|
ldx #76 + 321
|
2017-09-04 00:20:24 +00:00
|
|
|
jsr drawNumber
|
|
|
|
|
2017-10-23 19:40:44 +00:00
|
|
|
ldx #88 + 321
|
2017-09-04 00:20:24 +00:00
|
|
|
lda #angerStr
|
|
|
|
jsr DrawString
|
|
|
|
|
|
|
|
lda playerData+PD_ANGER,y
|
2017-10-23 19:40:44 +00:00
|
|
|
ldx #96 + 321
|
2017-08-20 22:15:46 +00:00
|
|
|
jsr drawNumber
|
|
|
|
|
2021-09-23 18:36:48 +00:00
|
|
|
lda #treatsStr
|
2021-09-23 18:59:53 +00:00
|
|
|
ldx #142 + 321
|
2021-09-23 18:36:48 +00:00
|
|
|
jsr DrawString
|
|
|
|
|
|
|
|
lda playerData+PD_TREATS,y
|
2021-09-23 18:59:53 +00:00
|
|
|
ldx #146 + 321
|
2021-09-23 18:36:48 +00:00
|
|
|
jsr drawNumber
|
|
|
|
|
2017-08-15 19:40:14 +00:00
|
|
|
RESTORE_AXY
|
|
|
|
rts
|
|
|
|
|
|
|
|
angleStr:
|
2017-09-04 00:20:24 +00:00
|
|
|
pstring "*: "
|
2017-08-20 22:15:46 +00:00
|
|
|
powerStr:
|
2017-09-04 00:20:24 +00:00
|
|
|
pstring "+: "
|
|
|
|
angerStr:
|
|
|
|
pstring "): "
|
2021-09-23 18:36:48 +00:00
|
|
|
treatsStr:
|
2021-09-23 18:59:53 +00:00
|
|
|
pstring "$ "
|
2017-08-20 22:15:46 +00:00
|
|
|
|
|
|
|
|
2023-07-06 18:03:41 +00:00
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
; playIterativeMeowSound
|
|
|
|
;
|
|
|
|
playIterativeMeowSound:
|
|
|
|
phy
|
|
|
|
|
|
|
|
ldy meowDex
|
|
|
|
jsr playSound
|
|
|
|
iny
|
|
|
|
iny
|
|
|
|
cpy #SOUND_MEOW4
|
|
|
|
bcc playIterativeMeowSoundDone
|
|
|
|
beq playIterativeMeowSoundDone
|
|
|
|
ldy #SOUND_MEOW1
|
|
|
|
|
|
|
|
playIterativeMeowSoundDone:
|
|
|
|
sty meowDex
|
|
|
|
|
|
|
|
ply
|
|
|
|
rts
|
|
|
|
|
|
|
|
meowDex:
|
|
|
|
.word SOUND_MEOW1
|
|
|
|
|