>>4
Oh, I did that first.
(let ((pictures))
(defun init-pics ()
(setf pictures (make-hash-table)))
(defun get-pic (image-name)
(gethash image-name pictures))
(defun load-pic (game-file image-name)
(setf (gethash image-name pictures)
(sdl-image:load (game-file game-file)))))
Trivial. (I should probably make this work with setf rather than having both get and load.) But each tile has a function (probably implemented in terms of get-pic) to return its proper image. The upshot of this system is that they can animate themselves with no outside code if I want. The functions don't know how to get the tile's state without a minor rewrite, but they can be swapped out easily, so this isn't really an issue.
The question is whether I should store these in a hash table or just give them names. It seems kind of silly to make a hash table for them when there's already a system for referring to functions by name. On the other hand, it seems strange to use the function system in this way.