Throw exception in deprecated functions

This commit is contained in:
oakes
2014-09-17 14:11:18 -04:00
parent 83b980b30d
commit d36a87bff5
2 changed files with 3 additions and 3 deletions

View File

@@ -567,4 +567,4 @@ of key-value pairs, which will be given to the function via its screen map.
(defn run!
"Deprecated. Please use `screen!` instead."
[& args]
(apply screen! args))
(throw (Exception. "Replace run! with screen!")))

View File

@@ -101,8 +101,8 @@
:fps (graphics! :get-frames-per-second)
:fullscreen? (graphics! :is-fullscreen)
:touched? (input! :is-touched)
:x (input! :get-x) ; deprecated, use :point-x instead
:y (input! :get-y) ; deprecated, use :point-y instead (it is flipped)
:x (throw (Exception. "Replace (game :x) with (input! :get-x)"))
:y (throw (Exception. "Replace (game :y) with (input! :get-y)"))
:point-x (input! :get-x (or arg 0))
:point-y (- (graphics! :get-height) (input! :get-y (or arg 0)))
(u/throw-key-not-found k)))