Commit 2f605c3f authored by Mark Oteiza's avatar Mark Oteiza

Prefix global var

* lisp/play/dunnet.el (room): Rename to dun-room.
(dun-messages, dunnet, dun-describe-room, dun-drop, dun-move):
(dun-restore, dun-do-logfile, dun-batch-loop): Use new name.
parent 0db5ba48
......@@ -63,7 +63,7 @@
(defvar dun-numsaves 0)
(defvar dun-jar nil)
(defvar dun-dead nil)
(defvar room 0)
(defvar dun-room 0)
(defvar dun-numcmds 0)
(defvar dun-wizard nil)
(defvar dun-endgame-question nil)
......@@ -1155,9 +1155,9 @@ treasures for points?" "4" "four")
(if dun-dead
(text-mode)
(when (eq dungeon-mode 'dungeon)
(when (not (= room dun-current-room))
(when (not (= dun-room dun-current-room))
(dun-describe-room dun-current-room)
(setq room dun-current-room))
(setq dun-room dun-current-room))
(dun-fix-screen)
(dun-mprinc ">"))))
......@@ -1169,7 +1169,7 @@ treasures for points?" "4" "four")
(switch-to-buffer "*dungeon*")
(dun-mode)
(setq dun-dead nil)
(setq room 0)
(setq dun-room 0)
(dun-messages))
;;;;
......@@ -1186,7 +1186,8 @@ treasures for points?" "4" "four")
(dun-mprincl "It is pitch dark. You are likely to be eaten by a grue.")
(dun-mprincl (cadr (nth (abs room) dun-rooms)))
(if (and (and (or (member room dun-visited)
(string= dun-mode "dun-superb")) (> room 0))
(string= dun-mode "dun-superb"))
(> room 0))
(not (string= dun-mode "long")))
nil
(dun-mprinc (car (nth (abs room) dun-rooms)))
......@@ -1357,7 +1358,7 @@ on your head.")
;;; Dropping certain things causes things to happen.
(defun dun-drop-check (objnum)
(if (and (= objnum obj-food) (= room bear-hangout)
(if (and (= objnum obj-food) (= dun-room bear-hangout)
(member obj-bear (nth bear-hangout dun-room-objects)))
(progn
(dun-mprincl
......@@ -1700,7 +1701,7 @@ body.")
(dun-mprinc "You can't go that way.\n")
(if (eq newroom 255)
(dun-special-move dir)
(setq room -1)
(setq dun-room -1)
(setq dun-lastdir dir)
(if dun-inbus
(progn
......@@ -3117,7 +3118,7 @@ File not found")))
(if (not (dun-load-d file))
(dun-mprincl "Could not load restore file.")
(dun-mprincl "Done.")
(setq room 0)))))
(setq dun-room 0)))))
(defun dun-do-logfile (type how)
......@@ -3144,7 +3145,7 @@ File not found")))
(dun-minsert how)
(dun-minsert " "))))
(dun-minsert "at ")
(dun-minsert (cadr (nth (abs room) dun-rooms)))
(dun-minsert (cadr (nth (abs dun-room) dun-rooms)))
(dun-minsert ". score: ")
(if (> (dun-endgame-score) 0)
(dun-minsert (+ 90 (dun-endgame-score)))
......@@ -3191,14 +3192,14 @@ File not found")))
(defun dun-batch-loop ()
(setq dun-dead nil)
(setq room 0)
(setq dun-room 0)
(while (not dun-dead)
(if (eq dungeon-mode 'dungeon)
(progn
(if (not (= room dun-current-room))
(if (not (= dun-room dun-current-room))
(progn
(dun-describe-room dun-current-room)
(setq room dun-current-room)))
(setq dun-room dun-current-room)))
(dun-mprinc ">")
(setq line (downcase (dun-read-line)))
(if (eq (dun-vparse dun-ignore dun-verblist line) -1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment