+const string &Interpreter::FindImage(SDL_Surface *img) const {
+ for (std::map<string, SDL_Surface *>::const_iterator
+ i(imageCache.begin()), end(imageCache.end());
+ i != end; ++i) {
+ if (i->second == img) {
+ return i->first;
+ }
+ }
+ throw Error("unable to locate image");
+}
+