diff options
author | Eugene Sandulenko | 2016-07-04 16:55:08 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | 22baf62312a94f272f8780697853140ae3b30434 (patch) | |
tree | 38509be3c55fbf3bf952ee456904682c1671d2fd /engines/director/lingo | |
parent | 97e80a0c7a376817b4304c57a355ebfe30e4ee12 (diff) | |
download | scummvm-rg350-22baf62312a94f272f8780697853140ae3b30434.tar.gz scummvm-rg350-22baf62312a94f272f8780697853140ae3b30434.tar.bz2 scummvm-rg350-22baf62312a94f272f8780697853140ae3b30434.zip |
DIRECTOR: Lingo: Added stub for 'the' entities
Diffstat (limited to 'engines/director/lingo')
-rw-r--r-- | engines/director/lingo/lingo-the.cpp | 113 | ||||
-rw-r--r-- | engines/director/lingo/lingo-the.h | 52 | ||||
-rw-r--r-- | engines/director/lingo/lingo.h | 7 |
3 files changed, 172 insertions, 0 deletions
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp new file mode 100644 index 0000000000..a0a24249b0 --- /dev/null +++ b/engines/director/lingo/lingo-the.cpp @@ -0,0 +1,113 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "engines/director/lingo/lingo.h" + +namespace Director { + +static struct TheEntityProto { + TheEntity entity; + const char *name; + bool hasID; +} entities[] = { + { kTheFrame, "frame", false }, + { kThePathName, "pathname", false }, + { kTheMovie, "movie", false }, + { kTheMouseH, "mouseh", false }, + { kTheMouseV, "mousev", false }, + { kTheSprite, "sprite", true }, + { kThePerFrameHook, "perframehook", false }, + { kTheTicks, "ticks", false }, + { kTheTimer, "timer", false }, + { kTheTimeoutLength,"timeoutlength",false }, + + { kTheNOEntity, NULL, false } +}; + +static struct TheEntityFieldProto { + TheEntity entity; + const char *name; + TheField field; +} fields[] = { + { kTheSprite, "castnum", kTheCastNum }, + { kTheSprite, "cursor", kTheCursor }, + { kTheSprite, "loch", kTheLocH }, + { kTheSprite, "locv", kTheLocV }, + + { kTheNOEntity, NULL, kTheNOField } +}; + +void Lingo::setTheEntity(TheEntity entity, int id, TheField field, Datum &d) { + switch (entity) { + case kTheSprite: + setTheSprite(id, field, d); + break; + case kThePerFrameHook: + warning("STUB: setting the perframehook"); + break; + default: + error("Unprocessed setting field %d of entity %d", field, entity); + } +} + +void Lingo::setTheSprite(int id, TheField field, Datum &d) { + switch (field) { + case kTheCastNum: + warning("STUB: setting thecastnum of sprite %d", id); + break; + default: + error("Unprocessed setting field %d of sprite", field); + } +} + +Datum Lingo::getTheEntity(TheEntity entity, int id, TheField field) { + Datum d; + + switch (entity) { + case kTheSprite: + d = getTheSprite(id, field); + break; + case kThePerFrameHook: + warning("STUB: getting the perframehook"); + break; + default: + error("Unprocessed getting field %d of entity %d", field, entity); + } + + return d; +} + +Datum Lingo::getTheSprite(int id, TheField field) { + Datum d; + + switch (field) { + case kTheCastNum: + warning("STUB: getting thecastnum of sprite %d", id); + break; + default: + error("Unprocessed getting field %d of sprite", field); + } + + return d; +} + +} // End of namespace Director diff --git a/engines/director/lingo/lingo-the.h b/engines/director/lingo/lingo-the.h new file mode 100644 index 0000000000..e867283d8e --- /dev/null +++ b/engines/director/lingo/lingo-the.h @@ -0,0 +1,52 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + + #ifndef DIRECTOR_LINGO_LINGO_THE_H + #define DIRECTOR_LINGO_LINGO_THE_H + +namespace Director { + +enum TheEntity { + kTheNOEntity = 0, + kTheFrame = 1, + kThePathName, + kTheMovie, + kTheMouseH, + kTheMouseV, + kTheSprite, + kThePerFrameHook, + kTheTicks, + kTheTimer, + kTheTimeoutLength +}; + +enum TheField { + kTheNOField = 0, + kTheCastNum = 1, + kTheCursor, + kTheLocH, + kTheLocV +}; + +} // End of namespace Director + +#endif diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h index 0f66706efa..8885b7f539 100644 --- a/engines/director/lingo/lingo.h +++ b/engines/director/lingo/lingo.h @@ -31,6 +31,7 @@ #include "engines/director/director.h" #include "engines/director/score.h" #include "director/lingo/lingo-gr.h" +#include "director/lingo/lingo-the.h" namespace Director { @@ -221,6 +222,12 @@ public: void func_gotoprevious(); public: + void setTheEntity(TheEntity entity, int id, TheField field, Datum &d); + void setTheSprite(int id, TheField field, Datum &d); + Datum getTheEntity(TheEntity entity, int id, TheField field); + Datum getTheSprite(int id, TheField field); + +public: ScriptData *_currentScript; ScriptType _currentScriptType; bool _returning; |