changeset 42:ae9b5c72c3f3

Decoded reveal command.
author William Astle <lost@l-w.ca>
date Sat, 27 Dec 2014 00:53:28 -0700
parents 1152ddbb3781
children 0f6cab894de8
files dod.s
diffstat 1 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/dod.s	Sat Dec 27 00:51:24 2014 -0700
+++ b/dod.s	Sat Dec 27 00:53:28 2014 -0700
@@ -3449,20 +3449,20 @@
 		fcb $9d,$06,$44,$f7
 		fcb $bc
 LD621		bra LD621			; Do nothing until IRQ decides something should happen
-cmd_reveal	jsr LCC31
-		ldu ,u
-		beq LD63E
-		lda 11,u
-		beq LD63E
-		ldb #$19
-		mul
-		cmpd powerlevel
-		bgt LD63E
-		lda 9,u
-LD638		setobjectspecs
-		clr 11,u
-		updatestatus
-LD63E		rts
+cmd_reveal	jsr LCC31			; parse a hand and get pointer to hand
+		ldu ,u				; is there an object there?
+		beq LD63E			; brif not
+		lda 11,u			; has object been revealed?
+		beq LD63E			; brif so
+		ldb #$19			; add multiplier to get needed power to reveal it
+		mul				; multiply out
+		cmpd powerlevel			; is player strong enough?
+		bgt LD63E			; brif not
+		lda 9,u				; fetch specific object type
+LD638		setobjectspecs			; update specs to revealed type
+		clr 11,u			; mark object as revealed
+		updatestatus			; update the status area
+LD63E		rts				; return to caller
 cmd_turn	ldx #kwlist_dir
 		jsr LCBEC
 		ble LD693