int arraySize(i->second->GetLiteral().ArraySize());
size_t memberSize = fd.IsReferenced() ? sizeof(char *) : fieldType.Size();
Array array;
+ array.typeId = fd.TypeId();
array.size = arraySize * memberSize;
array.data = alloc.Alloc(array.size);
array.ref = fd.IsReferenced();
}
}
+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");
+}
+
bool Interpreter::CanLink(const Value &v) const {
return v.IsLiteral() || source.IsDefined(v.GetIdentifier());