diff --git a/TODO b/TODO index b84dfa5..dfac010 100644 --- a/TODO +++ b/TODO @@ -11,8 +11,6 @@ GAME * fix news popup window - -* fix response to prolonged key presses * implement look/walk/attack modes diff --git a/TODO b/TODO index b84dfa5..dfac010 100644 --- a/TODO +++ b/TODO @@ -11,8 +11,6 @@ GAME * fix news popup window - -* fix response to prolonged key presses * implement look/walk/attack modes diff --git a/client/user-interface.lisp b/client/user-interface.lisp index bfb46be..13c3aa8 100644 --- a/client/user-interface.lisp +++ b/client/user-interface.lisp @@ -169,13 +169,14 @@ (#\n (croatoan:draw-menu (message-window))) ;;XXX How about moving diagonally? ;;TODO remove the duplicated `update-ui' calls - (:up (query-server "move n") + ;;TODO also `flushinp' (clears input to prevent inertia effect) + (:up (query-server "move n") (de.anvi.ncurses:%flushinp) (update-ui mapwin playerwin placewin newswin)) - (:down (query-server "move s") + (:down (query-server "move s") (de.anvi.ncurses:%flushinp) (update-ui mapwin playerwin placewin newswin)) - (:left (query-server "move w") + (:left (query-server "move w") (de.anvi.ncurses:%flushinp) (update-ui mapwin playerwin placewin newswin)) - (:right (query-server "move e") + (:right (query-server "move e") (de.anvi.ncurses:%flushinp) (update-ui mapwin playerwin placewin newswin)) ((nil) (update-ui mapwin playerwin placewin newswin)) (otherwise (notify (string event))))))) ;;DEBUG diff --git a/TODO b/TODO index b84dfa5..dfac010 100644 --- a/TODO +++ b/TODO @@ -11,8 +11,6 @@ GAME * fix news popup window - -* fix response to prolonged key presses * implement look/walk/attack modes diff --git a/client/user-interface.lisp b/client/user-interface.lisp index bfb46be..13c3aa8 100644 --- a/client/user-interface.lisp +++ b/client/user-interface.lisp @@ -169,13 +169,14 @@ (#\n (croatoan:draw-menu (message-window))) ;;XXX How about moving diagonally? ;;TODO remove the duplicated `update-ui' calls - (:up (query-server "move n") + ;;TODO also `flushinp' (clears input to prevent inertia effect) + (:up (query-server "move n") (de.anvi.ncurses:%flushinp) (update-ui mapwin playerwin placewin newswin)) - (:down (query-server "move s") + (:down (query-server "move s") (de.anvi.ncurses:%flushinp) (update-ui mapwin playerwin placewin newswin)) - (:left (query-server "move w") + (:left (query-server "move w") (de.anvi.ncurses:%flushinp) (update-ui mapwin playerwin placewin newswin)) - (:right (query-server "move e") + (:right (query-server "move e") (de.anvi.ncurses:%flushinp) (update-ui mapwin playerwin placewin newswin)) ((nil) (update-ui mapwin playerwin placewin newswin)) (otherwise (notify (string event))))))) ;;DEBUG diff --git a/package.lisp b/package.lisp index 8b530cd..f65aa04 100644 --- a/package.lisp +++ b/package.lisp @@ -30,6 +30,3 @@ ;; global variables *host* *port*)) - -;;set debug level during development -;;(declaim (optimize (debug 3))) diff --git a/TODO b/TODO index b84dfa5..dfac010 100644 --- a/TODO +++ b/TODO @@ -11,8 +11,6 @@ GAME * fix news popup window - -* fix response to prolonged key presses * implement look/walk/attack modes diff --git a/client/user-interface.lisp b/client/user-interface.lisp index bfb46be..13c3aa8 100644 --- a/client/user-interface.lisp +++ b/client/user-interface.lisp @@ -169,13 +169,14 @@ (#\n (croatoan:draw-menu (message-window))) ;;XXX How about moving diagonally? ;;TODO remove the duplicated `update-ui' calls - (:up (query-server "move n") + ;;TODO also `flushinp' (clears input to prevent inertia effect) + (:up (query-server "move n") (de.anvi.ncurses:%flushinp) (update-ui mapwin playerwin placewin newswin)) - (:down (query-server "move s") + (:down (query-server "move s") (de.anvi.ncurses:%flushinp) (update-ui mapwin playerwin placewin newswin)) - (:left (query-server "move w") + (:left (query-server "move w") (de.anvi.ncurses:%flushinp) (update-ui mapwin playerwin placewin newswin)) - (:right (query-server "move e") + (:right (query-server "move e") (de.anvi.ncurses:%flushinp) (update-ui mapwin playerwin placewin newswin)) ((nil) (update-ui mapwin playerwin placewin newswin)) (otherwise (notify (string event))))))) ;;DEBUG diff --git a/package.lisp b/package.lisp index 8b530cd..f65aa04 100644 --- a/package.lisp +++ b/package.lisp @@ -30,6 +30,3 @@ ;; global variables *host* *port*)) - -;;set debug level during development -;;(declaim (optimize (debug 3))) diff --git a/server/server.lisp b/server/server.lisp index 185c13d..e2dcb8a 100644 --- a/server/server.lisp +++ b/server/server.lisp @@ -183,17 +183,6 @@ (apply (cassoc cmd *API* :test #'equalp) args)) (progn (logf 4 "SERVER: dropped request") "")))) (T (apply (cassoc cmd *API* :test #'equalp) args))))) - - ;; (if (member cmd (keys *API*) :test #'equalp) - ;; ;;XXX Surely there must be a way to simplify the next few lines?! - ;; ;; `cond'?! - ;; (if (and (equalp (thread-player) "anon") - ;; (not (or (equalp cmd "login") (equalp cmd "signup")))) - ;; "ERROR: not logged in" - ;; (if (eq (third (assoc cmd *API* :test #'equalp)) 'ACTION) - ;; (if () - ;; (apply (cassoc cmd *API* :test #'equalp) args)) - ;; "ERROR: unknown command"))) ;;; COMMUNICATION FUNCTIONS @@ -248,6 +237,8 @@ (dotimes (w width) (let ((p (coord (+ w x0 1) (+ h y0 1))) (next-char #\space) (next-col ':black)) + ;;FIXME crashes if occupant moves away between the next + ;; two calls... (if (and p (patch-occupant p)) (setf next-char (.char (patch-occupant p)) next-col (.color (patch-occupant p)))