+
+\f
+;;; Utilities every gameobj has
+;;; ---------------------------
+
+(define (dyn-ref gameobj special-symbol)
+ "Dynamically look up a special object from the gm"
+ (match special-symbol
+ ;; if it's a symbol, look it up dynamically
+ ((? symbol? _)
+ (message-ref
+ (<-wait gameobj (slot-ref gameobj 'gm) 'lookup-special
+ #:symbol special-symbol)
+ 'val))
+ ;; if it's false, return nothing
+ ((#f #f))
+ ;; otherwise it's probably an address, return it as-is
+ (_ special-symbol)))