mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-22 10:17:22 +00:00
MOHAWK: Implement LBCode::itemIsLoaded.
This commit is contained in:
parent
9b00b3d5b7
commit
82ff40c548
@ -410,6 +410,7 @@ public:
|
||||
const Common::String &getName() { return _desc; }
|
||||
const Common::Rect &getRect() { return _rect; }
|
||||
uint16 getSoundPriority() { return _soundMode; }
|
||||
bool isLoaded() { return _loaded; }
|
||||
bool isAmbient() { return _isAmbient; }
|
||||
|
||||
Common::List<LBItem *>::iterator _iterator;
|
||||
|
@ -1246,7 +1246,7 @@ CodeCommandInfo itemCommandInfo[NUM_ITEM_COMMANDS] = {
|
||||
{ "isMuted", 0 },
|
||||
{ "isPlaying", &LBCode::itemIsPlaying },
|
||||
{ "isVisible", 0 },
|
||||
{ "isLoaded", 0 },
|
||||
{ "isLoaded", &LBCode::itemIsLoaded },
|
||||
{ "isDragging", 0 },
|
||||
{ "load", 0 },
|
||||
{ "moveTo", &LBCode::itemMoveTo },
|
||||
@ -1284,6 +1284,17 @@ void LBCode::itemIsPlaying(const Common::Array<LBValue> ¶ms) {
|
||||
_stack.push(0);
|
||||
}
|
||||
|
||||
void LBCode::itemIsLoaded(const Common::Array<LBValue> ¶ms) {
|
||||
if (params.size() != 1)
|
||||
error("incorrect number of parameters (%d) to isLoaded", params.size());
|
||||
|
||||
LBItem *item = resolveItem(params[0]);
|
||||
if (!item || !item->isLoaded())
|
||||
_stack.push(0);
|
||||
else
|
||||
_stack.push(1);
|
||||
}
|
||||
|
||||
void LBCode::itemMoveTo(const Common::Array<LBValue> ¶ms) {
|
||||
if (params.size() != 1 && params.size() != 2)
|
||||
error("incorrect number of parameters (%d) to moveTo", params.size());
|
||||
|
@ -275,6 +275,7 @@ public:
|
||||
void cmdKey(const Common::Array<LBValue> ¶ms);
|
||||
|
||||
void itemIsPlaying(const Common::Array<LBValue> ¶ms);
|
||||
void itemIsLoaded(const Common::Array<LBValue> ¶ms);
|
||||
void itemMoveTo(const Common::Array<LBValue> ¶ms);
|
||||
void itemSeek(const Common::Array<LBValue> ¶ms);
|
||||
void itemSeekToFrame(const Common::Array<LBValue> ¶ms);
|
||||
|
Loading…
x
Reference in New Issue
Block a user