mirror of
https://github.com/a2-4am/pitch-dark.git
synced 2024-06-03 14:29:27 +00:00
MOAR MACROS
This commit is contained in:
parent
820d75fac2
commit
20444d6723
|
@ -122,9 +122,8 @@ SetInterpreterOptions
|
|||
jsr okvs_as_boolean
|
||||
beq SetInterpreterOptionsExceptForce40
|
||||
lda #$CE
|
||||
!byte $2C
|
||||
+HIDE_NEXT_2_BYTES
|
||||
; execution falls through here
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; SetInterpreterOptionsExceptForce40
|
||||
; set options struct based on global preferences store, except always specify
|
||||
|
@ -143,7 +142,7 @@ SetInterpreterOptionsExceptForce40
|
|||
jsr okvs_as_boolean
|
||||
beq +
|
||||
lda #0
|
||||
!byte $2C
|
||||
+HIDE_NEXT_2_BYTES
|
||||
+ lda #1
|
||||
sta kOnBeyondCase
|
||||
|
||||
|
@ -153,7 +152,7 @@ SetInterpreterOptionsExceptForce40
|
|||
jsr okvs_as_boolean
|
||||
beq +
|
||||
lda #1
|
||||
!byte $2C
|
||||
+HIDE_NEXT_2_BYTES
|
||||
+ lda #0
|
||||
sta kOnBeyondScriptToFile
|
||||
|
||||
|
@ -163,7 +162,7 @@ SetInterpreterOptionsExceptForce40
|
|||
jsr okvs_as_boolean
|
||||
beq +
|
||||
lda #1
|
||||
!byte $2C
|
||||
+HIDE_NEXT_2_BYTES
|
||||
+ lda #0
|
||||
sta kOnBeyondAutoScript
|
||||
|
||||
|
|
|
@ -53,3 +53,8 @@ PARAM = $00
|
|||
sta .ptr
|
||||
sty .ptr+1
|
||||
}
|
||||
|
||||
; use BIT to swallow the following 2-byte opcode
|
||||
!macro HIDE_NEXT_2_BYTES {
|
||||
!byte $2C
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ ParseKeyValueText
|
|||
and #1
|
||||
sta gVal ; single-character values get converted to #$00 or #$01 in prefs store
|
||||
lda #0
|
||||
!byte $2C
|
||||
+HIDE_NEXT_2_BYTES
|
||||
.useMaxLength
|
||||
lda #$FD ; SMC
|
||||
sta .appendMaxLength ; all other values get upgraded to max_length so we can update them in place
|
||||
|
|
|
@ -94,11 +94,11 @@ LoadGameInfo
|
|||
cmp #$26 ; '&' -> open-apple mousetext
|
||||
beq .oa
|
||||
ora #$80 ; all other characters -> set high bit
|
||||
!byte $2C
|
||||
+HIDE_NEXT_2_BYTES
|
||||
.null lda #$00
|
||||
!byte $2C
|
||||
+HIDE_NEXT_2_BYTES
|
||||
.ca lda #$40
|
||||
!byte $2C
|
||||
+HIDE_NEXT_2_BYTES
|
||||
.oa lda #$41
|
||||
sta ($FE),y
|
||||
bra .convertSectionLoop
|
||||
|
@ -200,11 +200,11 @@ CheckForSavedGames
|
|||
bne +
|
||||
lda auxtype
|
||||
and #$0F
|
||||
!byte $2C
|
||||
+HIDE_NEXT_2_BYTES
|
||||
+ lda #$FF ; no save slot
|
||||
sta gLastSavedGameSlot
|
||||
lda #1
|
||||
!byte $2C
|
||||
+HIDE_NEXT_2_BYTES
|
||||
.no lda #0
|
||||
sta gHasSavedGames
|
||||
rts
|
||||
|
|
|
@ -139,7 +139,7 @@ addGameToPrefs
|
|||
|
||||
addBooleanFromStore
|
||||
lda #$24 ; BIT opcode
|
||||
!byte $2C
|
||||
+HIDE_NEXT_2_BYTES
|
||||
addStringFromStore
|
||||
lda #$80 ; BRA opcode
|
||||
sta .skipOverBooleanLogic
|
||||
|
|
|
@ -39,7 +39,7 @@ ResetPath
|
|||
!zone {
|
||||
AddToPathWithHighBit
|
||||
ldx #$80
|
||||
!byte $2C
|
||||
+HIDE_NEXT_2_BYTES
|
||||
AddToPath
|
||||
ldx #0
|
||||
stx .mask
|
||||
|
|
|
@ -100,10 +100,10 @@ ClearPendingInput
|
|||
!zone {
|
||||
CreateRadio
|
||||
ldx #WGCreateRadio
|
||||
!byte $2C ; hide next 2 bytes
|
||||
+HIDE_NEXT_2_BYTES
|
||||
CreateCheckbox
|
||||
ldx #WGCreateCheckbox
|
||||
!byte $2C ; hide next 2 bytes
|
||||
+HIDE_NEXT_2_BYTES
|
||||
CreateButton
|
||||
ldx #WGCreateButton
|
||||
stx .type
|
||||
|
@ -255,7 +255,7 @@ GetCheckedRadioButton
|
|||
.max=*+1
|
||||
cmp #$FD ; SMC
|
||||
bcc -
|
||||
!byte $2C
|
||||
+HIDE_NEXT_2_BYTES
|
||||
.found pla
|
||||
clc
|
||||
rts
|
||||
|
|
|
@ -46,7 +46,7 @@ PaintMain
|
|||
stz gViewInUse+ID_VERSIONS
|
||||
ldx #1 ; flag - clear screen before painting
|
||||
stx gMainScreenPaintDirty
|
||||
!byte $2C
|
||||
+HIDE_NEXT_2_BYTES
|
||||
RepaintMainIfDirty
|
||||
ldx #0 ; flag - do not clear screen before painting
|
||||
lda gMainScreenPaintDirty
|
||||
|
@ -254,8 +254,7 @@ PaintInfoView
|
|||
jsr CreateNullTerminatedString ; copies string to kNullTerminatedBuffer
|
||||
|
||||
+LDADDR kNullTerminatedBuffer ; now use that as the buffer to print the last line
|
||||
!byte $2C
|
||||
; execution falls through here
|
||||
+HIDE_NEXT_2_BYTES
|
||||
MultiPrint
|
||||
stz SAVE ; VTAB, but 0-indexed
|
||||
stx .printLineLength+1
|
||||
|
|
|
@ -76,7 +76,7 @@ HandleKey
|
|||
beq .handleScrollDown
|
||||
.handleScrollUp
|
||||
lda #$01
|
||||
!byte $2C ; hide next LDA
|
||||
+HIDE_NEXT_2_BYTES
|
||||
.handleScrollDown
|
||||
lda #$FF
|
||||
pha
|
||||
|
@ -115,16 +115,16 @@ HandleKey
|
|||
bra .xyzzyReset
|
||||
.x
|
||||
lda #1
|
||||
!byte $2C
|
||||
+HIDE_NEXT_2_BYTES
|
||||
.y1
|
||||
lda #2
|
||||
!byte $2C
|
||||
+HIDE_NEXT_2_BYTES
|
||||
.z1
|
||||
lda #3
|
||||
!byte $2C
|
||||
+HIDE_NEXT_2_BYTES
|
||||
.z2
|
||||
lda #4
|
||||
!byte $2C
|
||||
+HIDE_NEXT_2_BYTES
|
||||
.xyzzyReset
|
||||
lda #0
|
||||
.xyzzyStoreAndExit
|
||||
|
|
|
@ -110,7 +110,7 @@ ResumeDialog
|
|||
lda gLastSavedGameSlot ; initial checked radio button = last save slot + 1
|
||||
bmi +
|
||||
inc
|
||||
!byte $2C
|
||||
+HIDE_NEXT_2_BYTES
|
||||
+ lda #ID_RESUME_NEWGAME ; if last save slot is invalid, just check 'new game'
|
||||
ldx #WGSelectView
|
||||
jsr WeeGUI
|
||||
|
|
|
@ -221,7 +221,7 @@ HandleVersionsKey
|
|||
cpx iNumVersions ; find 'next' view ID (wrapping around to 1)
|
||||
bcs +
|
||||
inx
|
||||
!byte $2C
|
||||
+HIDE_NEXT_2_BYTES
|
||||
+ ldx #1
|
||||
bra .gotNewID
|
||||
.previous
|
||||
|
|
Loading…
Reference in New Issue
Block a user