mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-08 11:57:25 +00:00
DIRECTOR: Lingo: Implemented b_field() method
This commit is contained in:
parent
d2fe6628f2
commit
9cdeb4c88e
@ -1505,7 +1505,21 @@ void Lingo::b_cast(int nargs) {
|
||||
void Lingo::b_field(int nargs) {
|
||||
Datum d = g_lingo->pop();
|
||||
|
||||
warning("STUB: b_field");
|
||||
int id;
|
||||
|
||||
if (d.type == STRING) {
|
||||
if (g_director->getCurrentScore()->_castsNames.contains(*d.u.s))
|
||||
id = g_director->getCurrentScore()->_castsNames[*d.u.s];
|
||||
else
|
||||
error("b_filed: Reference to non-existent field: %s", d.u.s->c_str());
|
||||
} else if (d.type == INT || d.type == FLOAT) {
|
||||
d.toInt();
|
||||
id = d.u.i;
|
||||
} else {
|
||||
error("b_field: Incorrect reference type: %s", d.type2str());
|
||||
}
|
||||
|
||||
d.u.i = id;
|
||||
|
||||
d.type = REFERENCE;
|
||||
|
||||
|
@ -653,6 +653,9 @@ void Score::loadCastInfo(Common::SeekableSubReadStreamEndian &stream, uint16 id)
|
||||
debugC(5, kDebugLoading, "CastInfo: name: '%s' directory: '%s', fileName: '%s', type: '%s'",
|
||||
ci->name.c_str(), ci->directory.c_str(), ci->fileName.c_str(), ci->type.c_str());
|
||||
|
||||
if (!ci->name.empty())
|
||||
_castsNames[ci->name] = id;
|
||||
|
||||
_castsInfo[id] = ci;
|
||||
}
|
||||
|
||||
|
@ -102,6 +102,7 @@ public:
|
||||
Common::Array<Frame *> _frames;
|
||||
Common::HashMap<int, Cast *> _casts;
|
||||
Common::HashMap<uint16, CastInfo *> _castsInfo;
|
||||
Common::HashMap<Common::String, int> _castsNames;
|
||||
Common::SortedArray<Label *> *_labels;
|
||||
Common::HashMap<uint16, Common::String> _actions;
|
||||
Common::HashMap<uint16, Common::String> _fontMap;
|
||||
|
Loading…
x
Reference in New Issue
Block a user