changeset 23:7c2f57937862

Additional description and cleanup for game startup Describe the map display and final steps in starting up a game. Also clean up some comment formatting.
author William Astle <lost@l-w.ca>
date Fri, 26 Dec 2014 01:01:12 -0700
parents b54feb3d64eb
children 966dd9bc8659
files dod.s
diffstat 1 files changed, 57 insertions(+), 57 deletions(-) [+]
line wrap: on
line diff
--- a/dod.s	Fri Dec 26 00:51:50 2014 -0700
+++ b/dod.s	Fri Dec 26 01:01:12 2014 -0700
@@ -462,85 +462,85 @@
 		inca
 		cmpu #LDAA3
 		blo LC08C
-		ldu #V388				point to text parameters for status area
-		dec V2B7				indicate nonstandard text area
-		clearstatus				blank status line (where we'll put the copyright notice)
-		renderstrimmp				display copyright message
-		fcb $f8,$df,$0c,$c9			packed string "COPYRIGHT  DYNA MICRO  MCMLXXXII"
+		ldu #V388			point to text parameters for status area
+		dec V2B7			indicate nonstandard text area
+		clearstatus			blank status line (where we'll put the copyright notice)
+		renderstrimmp			display copyright message
+		fcb $f8,$df,$0c,$c9		packed string "COPYRIGHT  DYNA MICRO  MCMLXXXII"
 		fcb $27,$45,$00,$02
 		fcb $65,$c1,$03,$52
 		fcb $39,$3c,$00,$68
 		fcb $da,$cc,$63,$09
 		fcb $48
-		clr V2B7				reset text rendering to standard mode
+		clr V2B7			reset text rendering to standard mode
 		rts					
-dodemo		dec V277
-		bsr LC114
-		ldx #img_wizard				; point to wizard image
+dodemo		dec V277			; flag demo game
+		bsr LC114			; set up interrupts and sound
+		ldx #img_wizard			; point to wizard image
 		dec V29E
-		fadein					; fade the wizard in
-		renderstrimmp				; display <CR>"I DARE YE ENTER..."<CR>
-		fcb $9f,$d2,$02,$06			; packed "\rI DARE YE ENTER...\r" string
+		fadein				; fade the wizard in
+		renderstrimmp			; display <CR>"I DARE YE ENTER..."<CR>
+		fcb $9f,$d2,$02,$06		; packed "\rI DARE YE ENTER...\r" string
 		fcb $45,$06,$4a,$02
 		fcb $ba,$85,$97,$bd
 		fcb $ef,$80
-		renderstrimmp				; display "...THE DUNGEONS OF DAGGORATH!!!"
-		fcb $f7,$bd,$ea,$20			; packed "...THE DUNGEONS OF DAGGORATH!!!" string
+		renderstrimmp			; display "...THE DUNGEONS OF DAGGORATH!!!"
+		fcb $f7,$bd,$ea,$20		; packed "...THE DUNGEONS OF DAGGORATH!!!" string
 		fcb $a0,$25,$5c,$72
 		fcb $bd,$d3,$03,$cc
 		fcb $02,$04,$e7,$7c
 		fcb $83,$44,$6f,$7b
-		delay					;* wait for about 2.6 seconds
-		delay					;*
-		fadeout					; fade the wizard out
-		cleargfx2				; clear second graphics screen
-		dec pageswap				; flag graphics swap ready
-		sync					; wait for swap to happen
-		lda #2					; create maze for level 3
-		ldu #startobjdemo			; point to demo game object list
-		bra LC131				; go start demo running
-LC114		ldd #$343c				; set up initializers for PIAs
-		sta PIA1+1				; set data mode, no interrupts, cassette off
-		stb PIA1+3				; set data mode, no interrupts, sound on
-		inca					; adjust to enable interrupt
-		sta PIA0+3				; set data mode, enable VSYNC, clear MSB of analog MUX
-		cwai #$ef				; enable IRQ and wait for one
-		rts					; return to caller
-dogame		bsr LC114				; set up interrupts and sound
+		delay				;* wait for about 2.6 seconds
+		delay				;*
+		fadeout				; fade the wizard out
+		cleargfx2			; clear second graphics screen
+		dec pageswap			; flag graphics swap ready
+		sync				; wait for swap to happen
+		lda #2				; create maze for level 3
+		ldu #startobjdemo		; point to demo game object list
+		bra LC131			; go start demo running
+LC114		ldd #$343c			; set up initializers for PIAs
+		sta PIA1+1			; set data mode, no interrupts, cassette off
+		stb PIA1+3			; set data mode, no interrupts, sound on
+		inca				; adjust to enable interrupt
+		sta PIA0+3			; set data mode, enable VSYNC, clear MSB of analog MUX
+		cwai #$ef			; enable IRQ and wait for one
+		rts				; return to caller
+dogame		bsr LC114			; set up interrupts and sound
 		ldd #$100b
 		std V213
-		clr powerlevel				; reset power level to new game level (keeps LSB of default value)
-		clra					; create maze for level 1
-		ldu #startobj				; point to new game backpack object list
-LC131		showprepare				; show the PREPARE! screen
-		dod S1A					; create maze
-		ldy #backpack				; point to backpack list head pointer
-LC139		lda ,u+					; get object to create
-		bmi LC14F				; brif end of list
-		createobject				; create requested object
+		clr powerlevel			; reset power level to new game level (keeps LSB of default value)
+		clra				; create maze for level 1
+		ldu #startobj			; point to new game backpack object list
+LC131		showprepare			; show the PREPARE! screen
+		dod S1A				; create maze
+		ldy #backpack			; point to backpack list head pointer
+LC139		lda ,u+				; get object to create
+		bmi LC14F			; brif end of list
+		createobject			; create requested object
 		inc 5,x
-		exg x,u					; swap object pointer and list pointer
-		setobjectspecs				; set the specs properly (as in fully revealed)
-		exg x,u					; swap pointers back
-		clr 11,x				; mark object revealed
-		stx ,y					; save new object in backpack list
-		tfr x,y					; move list pointer to object just created
-		bra LC139				; go look for another object to create
-LC14F		tst V277
-		beq LC166
+		exg x,u				; swap object pointer and list pointer
+		setobjectspecs			; set the specs properly (as in fully revealed)
+		exg x,u				; swap pointers back
+		clr 11,x			; mark object revealed
+		stx ,y				; save new object in backpack list
+		tfr x,y				; move list pointer to object just created
+		bra LC139			; go look for another object to create
+LC14F		tst V277			; are we doing a demo game?
+		beq LC166			; brif not
 		dec V29B
-		ldx #LCDB2
+		ldx #LCDB2			; set to scroll display
 		stx displayptr
-		dec V294
-		dod S0E
-		delay
+		dec V294			; set to show creatures on map
+		dod S0E				; show the dungeon map
+		delay				; delay for about 2.5 seconds
 		delay
 		clr V29B
-		sync
+		sync				; wait a couple of ticks
 		sync
-LC166		dod S19
-		showprompt
-		jmp LC1F5
+LC166		dod S19				; clear command and status areas and show the dungeon
+		showprompt			; show command prompt
+		jmp LC1F5			; go to main loop
 LC16D		stx CBUFAD			; set address to read to
 		romcall BLKIN			; read a block
 		tsta				; is it the end of the file?