aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorNipun Garg2019-06-05 16:37:18 +0530
committerEugene Sandulenko2019-09-03 17:16:43 +0200
commitb8a4fa2902483b0262f251b78327bf85d8223f91 (patch)
tree0fc52b9e98305640faf064761f8f57bbe9073ec9 /engines
parentbcd4de2c7ef7ad80b9cba06b365d6c536ac1d7f5 (diff)
downloadscummvm-rg350-b8a4fa2902483b0262f251b78327bf85d8223f91.tar.gz
scummvm-rg350-b8a4fa2902483b0262f251b78327bf85d8223f91.tar.bz2
scummvm-rg350-b8a4fa2902483b0262f251b78327bf85d8223f91.zip
HDB: Add stubs for the Lua extensions
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/lua-script.cpp489
1 files changed, 487 insertions, 2 deletions
diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp
index e99cfe62e0..e98d1c4417 100644
--- a/engines/hdb/lua-script.cpp
+++ b/engines/hdb/lua-script.cpp
@@ -59,11 +59,415 @@ bool LuaScript::init() {
Called from Lua, this will pop into the menu
*/
+static int cineStart(lua_State *L) {
+ warning("STUB: START CINE");
+ return 0;
+}
+
+static int cineStop(lua_State *L) {
+ warning("STUB: STOP CINE");
+ return 0;
+}
+
+static int cineFadeInBlack(lua_State *L) {
+ warning("STUB: CINE FADE IN BLACK");
+ return 0;
+}
+
+static int cineFadeOutBlack(lua_State *L) {
+ warning("STUB: CINE FADE OUT BLACK");
+ return 0;
+}
+
+static int cineFadeInWhite(lua_State *L) {
+ warning("STUB: CINE FADE IN WHITE");
+ return 0;
+}
+
+static int cineFadeOutWhite(lua_State *L) {
+ warning("STUB: CINE FADE OUT WHITE");
+ return 0;
+}
+
+static int cineStartMap(lua_State *L) {
+ warning("STUB: CINE START MAP");
+ return 0;
+}
+
+static int cineLockPlayer(lua_State *L) {
+ warning("STUB: CINE LOCK PLAYER");
+ return 0;
+}
+
+static int cineUnlockPlayer(lua_State *L) {
+ warning("STUB: CINE UNLOCK PLAYER");
+ return 0;
+}
+
+static int cineSetCamera(lua_State *L) {
+ warning("STUB: CINE SET CAMERA");
+ return 0;
+}
+
+static int cineResetCamera(lua_State *L) {
+ warning("STUB: CINE RESET CAMERA");
+ return 0;
+}
+
+static int cineMoveCamera(lua_State *L) {
+ warning("STUB: CINE MOVE CAMERA");
+ return 0;
+}
+
+static int cineWait(lua_State *L) {
+ warning("STUB: CINE WAIT");
+ return 0;
+}
+
+static int cineWaitUntilDone(lua_State *L) {
+ warning("STUB: CINE WAIT UNTIL DONE");
+ return 0;
+}
+
+static int cinePlaySound(lua_State *L) {
+ warning("STUB: CINE PLAY SOUND");
+ return 0;
+}
+
+static int cinePlayVoice(lua_State *L) {
+ warning("STUB: CINE PLAY VOICE");
+ return 0;
+}
+
+static int cineUseEntity(lua_State *L) {
+ warning("STUB: CINE USE ENTITY");
+ return 0;
+}
+
+static int cineSetEntity(lua_State *L) {
+ warning("STUB: CINE SET ENTITY");
+ return 0;
+}
+
+static int cineRemoveEntity(lua_State *L) {
+ warning("STUB: CINE REMOVE ENTITY");
+ return 0;
+}
+
+static int cineMoveEntity(lua_State *L) {
+ warning("STUB: CINE MOVE ENTITY");
+ return 0;
+}
+
+static int cineAnimEntity(lua_State *L) {
+ warning("STUB: CINE ANIM ENTITY");
+ return 0;
+}
+
+static int cineSetAnimFrame(lua_State *L) {
+ warning("STUB: CINE SET ANIM FRAME");
+ return 0;
+}
+
+static int cineDialog(lua_State *L) {
+ warning("STUB: CINE DIALOG");
+ return 0;
+}
+
+static int cineDrawPic(lua_State *L) {
+ warning("STUB: CINE DRAW PIC");
+ return 0;
+}
+
+static int cineDrawMaskedPic(lua_State *L) {
+ warning("STUB: CINE DRAW MASKED PIC");
+ return 0;
+}
+
+static int cineMovePic(lua_State *L) {
+ warning("STUB: CINE MOVE PIC");
+ return 0;
+}
+
+static int cineMoveMaskedPic(lua_State *L) {
+ warning("STUB: CINE MOVE MASKED PIC");
+ return 0;
+}
+
+static int cineSpawnEntity(lua_State *L) {
+ warning("STUB: CINE SPAWN ENTITY");
+ return 0;
+}
+
+static int cineClearForeground(lua_State *L) {
+ warning("STUB: CINE CLEAR FOREGROUND");
+ return 0;
+}
+
+static int cineSetForeground(lua_State *L) {
+ warning("STUB: CINE SET FOREGROUND");
+ return 0;
+}
+
+static int cineSetBackground(lua_State *L) {
+ warning("STUB: CINE SET BACKGROUND");
+ return 0;
+}
+
+static int cineFunction(lua_State *L) {
+ warning("STUB: CINE FUNCTION");
+ return 0;
+}
+
+static int cineEntityFace(lua_State *L) {
+ warning("STUB: CINE ENTITY FACE");
+ return 0;
+}
+
+static int cineTextOut(lua_State *L) {
+ warning("STUB: CINE TEXT OUT");
+ return 0;
+}
+
+static int cineCenterTextOut(lua_State *L) {
+ warning("STUB: CINE CENTER TEXT OUT");
+ return 0;
+}
+
+static int newDelivery(lua_State *L) {
+ warning("STUB: NEW DELIVERY");
+ return 0;
+}
+
+static int completeDelivery(lua_State *L) {
+ warning("STUB: COMPLETE DELIVERY");
+ return 0;
+}
+
+static int deliveriesLeft(lua_State *L) {
+ warning("STUB: DELIVERIES LEFT");
+ return 0;
+}
+
+static int getEntityXY(lua_State *L) {
+ warning("STUB: GET ENTITYXY");
+ return 0;
+}
+
+static int setEntity(lua_State *L) {
+ warning("STUB: SET ENTITY");
+ return 0;
+}
+
+static int setEntDir(lua_State *L) {
+ warning("STUB: SET ENTITY DIR");
+ return 0;
+}
+
+static int removeEntity(lua_State *L) {
+ warning("STUB: REMOVE ENTITY");
+ return 0;
+}
+
+static int animEntity(lua_State *L) {
+ warning("STUB: ANIM ENTITY");
+ return 0;
+}
+
+static int setAnimFrame(lua_State *L) {
+ warning("STUB: SET ANIM FRAME");
+ return 0;
+}
+
+static int useEntity(lua_State *L) {
+ warning("STUB: USE ENTITY");
+ return 0;
+}
+
+static int entityFace(lua_State *L) {
+ warning("STUB: ENTITY FACE");
+ return 0;
+}
+
+static int clearForeground(lua_State *L) {
+ warning("STUB: CLEAR FOREGROUND");
+ return 0;
+}
+
+static int setForeground(lua_State *L) {
+ warning("STUB: SET FOREGROUND");
+ return 0;
+}
+
+static int setBackground(lua_State *L) {
+ warning("STUB: CLEAR BACKGROUND");
+ return 0;
+}
+
+static int dialog(lua_State *L) {
+ warning("STUB: DIALOG");
+ return 0;
+}
+
+static int dialogChoice(lua_State *L) {
+ warning("STUB: DIALOG CHOICE");
+ return 0;
+}
+
+static int message(lua_State *L) {
+ warning("STUB: MESSAGE");
+ return 0;
+}
+
+static int animation(lua_State *L) {
+ warning("STUB: ANIMATION");
+ return 0;
+}
+
+static int spawnEntity(lua_State *L) {
+ warning("STUB: SPAWN ENTITY");
+ return 0;
+}
+
+static int addInvItem(lua_State *L) {
+ warning("STUB: ADD INVENTORY ITEM");
+ return 0;
+}
+
+static int keepInvItem(lua_State *L) {
+ warning("STUB: KEEP INVENTORY ITEM");
+ return 0;
+}
+
+static int queryInv(lua_State *L) {
+ warning("STUB: QUERY INVENTORY");
+ return 0;
+}
+
+static int purgeInv(lua_State *L) {
+ warning("STUB: PURGE INVENTORY");
+ return 0;
+}
+
+static int queryInvItem(lua_State *L) {
+ warning("STUB: QUERY INVENTORY ITEM");
+ return 0;
+}
+
+static int removeInv(lua_State *L) {
+ warning("STUB: REMOVE INVENTORY");
+ return 0;
+}
+
+static int removeInvItem(lua_State *L) {
+ warning("STUB: REMOVE INVENTORY ITEM");
+ return 0;
+}
+
+static int killTrigger(lua_State *L) {
+ warning("STUB: KILL TRIGGER");
+ return 0;
+}
+
+static int startMusic(lua_State *L) {
+ warning("STUB: START MUSIC");
+ return 0;
+}
+
+static int fadeInMusic(lua_State *L) {
+ warning("STUB: FADE IN MUSIC");
+ return 0;
+}
+
+static int stopMusic(lua_State *L) {
+ warning("STUB: STOP MUSIC");
+ return 0;
+}
+
+static int fadeOutMusic(lua_State *L) {
+ warning("STUB: FADE OUT MUSIC");
+ return 0;
+}
+
+static int registerSound(lua_State *L) {
+ warning("STUB: REGISTER SOUND");
+ return 0;
+}
+
+static int playSound(lua_State *L) {
+ warning("STUB: PLAY SOUND");
+ return 0;
+}
+
+static int freeSound(lua_State *L) {
+ warning("STUB: FREE SOUND");
+ return 0;
+}
+
+static int startMap(lua_State *L) {
+ warning("STUB: START MAP");
+ return 0;
+}
+
+static int saveGlobal(lua_State *L) {
+ warning("STUB: SAVE GLOBAL");
+ return 0;
+}
+
+static int loadGlobal(lua_State *L) {
+ warning("STUB: LOAD GLOBAL");
+ return 0;
+}
+
+static int purgeGlobals(lua_State *L) {
+ warning("STUB: PURGE GLOBALS");
+ return 0;
+}
+
+static int textOut(lua_State *L) {
+ warning("STUB: TEXT OUT");
+ return 0;
+}
+
+static int centerTextOut(lua_State *L) {
+ warning("STUB: CENTER TEXT OUT");
+ return 0;
+}
+
+static int turnOnSnow(lua_State *L) {
+ warning("STUB: TURN ON SNOW");
+ return 0;
+}
+
+static int turnOffSnow(lua_State *L) {
+ warning("STUB: TURN OFF SNOW");
+ return 0;
+}
+
static int gotoMenu(lua_State *L) {
g_hdb->changeGameState();
return 0;
}
+static int setInfobarDark(lua_State *L) {
+ warning("STUB: SET INFOBAR DARK");
+ return 0;
+}
+
+static int setPointerState(lua_State *L) {
+ warning("STUB: SET POINTER STATE");
+ return 0;
+}
+
+static int playVoice(lua_State *L) {
+ warning("STUB: PLAY VOICE");
+ return 0;
+}
+
+/*
+ Lua Initialization Code
+*/
+
struct VarInit {
char *realName;
char *luaName;
@@ -84,8 +488,89 @@ struct FuncInit {
char *luaName;
int (*function) (lua_State *L);
} luaFuncs[] = {
- {"GotoMenu", gotoMenu},
- {NULL, NULL}
+ { "Dialog", dialog },
+ { "DialogChoice", dialogChoice },
+ { "Message", message },
+ { "QueryInv", queryInv },
+ { "QueryInvItem", queryInvItem },
+ { "RemoveInv", removeInv },
+ { "RemoveInvItem", removeInvItem },
+ { "AddInvItem", addInvItem },
+ { "KeepInvItem", keepInvItem },
+ { "PurgeInv", purgeInv },
+ { "StartMusic", startMusic },
+ { "StopMusic", stopMusic },
+ { "FadeInMusic", fadeInMusic },
+ { "FadeOutMusic", fadeOutMusic },
+ { "RegisterSound", registerSound },
+ { "PlaySound", playSound },
+ { "FreeSound", freeSound },
+ { "StartMap", startMap },
+ { "Tile_ClearFG", clearForeground },
+ { "Tile_SetFG", setForeground },
+ { "Tile_SetBG", setBackground },
+ { "GetEntityXY", getEntityXY },
+ { "UseEntity", useEntity },
+ { "SetEntity", setEntity },
+ { "SetEntDir", setEntDir },
+ { "RemoveEntity", removeEntity },
+ { "AnimEntity", animEntity },
+ { "SetAnimFrame", setAnimFrame },
+ { "EntityFace", entityFace },
+ { "KillTrigger", killTrigger },
+ { "SpawnEntity", spawnEntity },
+ { "Animation", animation },
+ { "NewDelivery", newDelivery },
+ { "CompleteDelivery", completeDelivery },
+ { "DeliveriesLeft", deliveriesLeft },
+ { "SaveGlobal", saveGlobal },
+ { "LoadGlobal", loadGlobal },
+ { "PurgeGlobals", purgeGlobals },
+ { "TextOut", textOut },
+ { "CenterTextOut", centerTextOut },
+ { "SnowOn", turnOnSnow },
+ { "SnowOff", turnOffSnow },
+ { "GotoMenu", gotoMenu },
+ { "SetInfobarDark", setInfobarDark },
+ { "SetPointerState", setPointerState },
+ { "PlayVoice", playVoice },
+
+ { "Cine_StartCine", cineStart },
+ { "Cine_StopCine", cineStop },
+ { "Cine_StartMap", cineStartMap },
+ { "Cine_LockPlayer", cineLockPlayer },
+ { "Cine_UnlockPlayer", cineUnlockPlayer },
+ { "Cine_SetCamera", cineSetCamera },
+ { "Cine_ResetCamera", cineResetCamera },
+ { "Cine_MoveCamera", cineMoveCamera },
+ { "Cine_Wait", cineWait },
+ { "Cine_WaitUntilDone", cineWaitUntilDone },
+ { "Cine_UseEntity", cineUseEntity },
+ { "Cine_SetEntity", cineSetEntity },
+ { "Cine_RemoveEntity", cineRemoveEntity },
+ { "Cine_EntityFace", cineEntityFace },
+ { "Cine_MoveEntity", cineMoveEntity },
+ { "Cine_AnimEntity", cineAnimEntity },
+ { "Cine_SetAnimFrame", cineSetAnimFrame },
+ { "Cine_Dialog", cineDialog },
+ { "Cine_DrawPic", cineDrawPic },
+ { "Cine_DrawMaskedPic", cineDrawMaskedPic },
+ { "Cine_MovePic", cineMovePic },
+ { "Cine_MoveMaskedPic", cineMoveMaskedPic },
+ { "Cine_FadeOutBlack", cineFadeOutBlack },
+ { "Cine_FadeInBlack", cineFadeInBlack },
+ { "Cine_FadeOutWhite", cineFadeOutWhite },
+ { "Cine_FadeInWhite", cineFadeInWhite },
+ { "Cine_SpawnEntity", cineSpawnEntity },
+ { "Cine_PlaySound", cinePlaySound },
+ { "Cine_Tile_ClearFG", cineClearForeground },
+ { "Cine_Tile_SetFG", cineSetForeground },
+ { "Cine_Tile_SetBG", cineSetBackground },
+ { "Cine_Function", cineFunction },
+ { "Cine_TextOut", cineTextOut },
+ { "Cine_CenterTextOut", cineCenterTextOut },
+ { "Cine_PlayVoice", cinePlayVoice },
+ { NULL, NULL }
};
bool LuaScript::initScript(Common::SeekableReadStream *stream, const char *name, int32 length) {