changeset 32:6ec4dae00652

Add skeleton ZPAUSE command. Don't use it yet. Added a ZPAUSE command which shows **PAUSED** on the status line and then freezes the game.
author William Astle <lost@l-w.ca>
date Fri, 02 Jan 2015 18:04:21 -0700
parents 15236650550d
children ddac2cf283b2
files dod.s
diffstat 1 files changed, 18 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dod.s	Fri Jan 02 17:50:08 2015 -0700
+++ b/dod.s	Fri Jan 02 18:04:21 2015 -0700
@@ -3884,7 +3884,7 @@
 ; These are the keyword tables used in parsing. Each table is prefixed by a byte with the number
 ; of keywords in the list. Each keyword has a single byte flag (usually type object number)
 ; followed by a NUL terminated ASCII string.
-kwlist_cmd	fcb 15				; 15 commands
+kwlist_cmd	fcb 16				; 15 commands
 		fcb 0				; ATTACK
 kw_attack	fcn 'ATTACK'
 		fcb 0				; CLIMB
@@ -3915,6 +3915,8 @@
 		fcn 'ZLOAD'
 		fcb 0				; ZSAVE
 		fcn 'ZSAVE'
+		fcb 0				; ZPAUSE
+		fcn 'ZPAUSE'
 kwlist_dir	fcb 6
 		fcb 0				; LEFT
 kw_left		fcn 'LEFT'
@@ -4052,6 +4054,7 @@
 		fdb cmd_use			; USE
 		fdb cmd_zload			; ZLOAD
 		fdb cmd_zsave			; ZSAVE
+		fdb cmd_zpause			; ZPAUSE
 ; pointers to the image data for object types
 LD9EE		fdb img_flask			; flask
 		fdb img_ring			; ring
@@ -5444,6 +5447,20 @@
 load_001	clr error_handler		; mark the error handler as disabled
 		clr error_handler+1
 		jmp START			; transfer control to the main stream code
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; This is the "pause mode". Pause mode has a completely different list of commands available to it.
+cmd_zpause	inc loadsaveflag		; freeze the game
+		clearstatus			; clear the status bar
+		ldu #statusarea			; point to status area parameters
+		dec textother			; set to nonstandard rendering
+		ldd #11				; offset to centre "**PAUSED**"
+		std 4,u				; set offset into area
+		jsr putstrimm			; display the pause notice
+		fcn '**PAUSED**'
+		clr textother			; reset display parameters
+cmd_zpause000	bra *
+		
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ; This is the bit that intercepts RVEC12. It requires at least Extended Basic to work because it relies on multi-origin binaries.
 ; That will always be the case for Disk Basic. Theoretically, with just this, a loader will work from tape in Extended Basic
 ; or higher, too.