Go to the source code of this file.
Functions | |
| WorldBranch * | getWorld (lua_State *L) |
| int | script_worldmap_addDesc (lua_State *L) throw () |
| Fuctions for worldmap. | |
| int | script_branch_addNode (lua_State *L) throw () |
| void branch_addNode(parent, codename, datafile, x, y, hidden=false, poster="") | |
| int | script_branch_setEnding (lua_State *L) throw () |
| void branch_setEnding(codename, datafile, poster="") | |
| int | script_node_bestSolution (lua_State *L) throw () |
| void node_bestSolution(codename, moves, author) | |
|
|
Definition at line 18 of file worldmap-script.cpp. 00019 {
00020 return dynamic_cast<WorldBranch*>(script_getLeader(L));
00021 }
|
|
|
void branch_addNode(parent, codename, datafile, x, y, hidden=false, poster="")
Definition at line 47 of file worldmap-script.cpp. 00048 {
00049 BEGIN_NOEXCEPTION;
00050 const char *parent = luaL_checkstring(L, 1);
00051 const char *codename = luaL_checkstring(L, 2);
00052 const char *datafile = luaL_checkstring(L, 3);
00053 int nodeX = luaL_checkint(L, 4);
00054 int nodeY = luaL_checkint(L, 5);
00055 bool hidden = lua_toboolean(L, 6);
00056 const char *poster = luaL_optstring(L, 7, "");
00057
00058 LevelNode *node = new LevelNode(codename,
00059 Path::dataReadPath(datafile), V2(nodeX, nodeY), poster);
00060 getWorld(L)->addNode(parent, node, hidden);
00061 END_NOEXCEPTION;
00062 return 0;
00063 }
|
|
|
void branch_setEnding(codename, datafile, poster="")
Definition at line 69 of file worldmap-script.cpp. 00070 {
00071 BEGIN_NOEXCEPTION;
00072 const char *codename = luaL_checkstring(L, 1);
00073 const char *datafile = luaL_checkstring(L, 2);
00074 const char *poster = luaL_optstring(L, 3, "");
00075
00076 LevelNode *node = new LevelNode(codename,
00077 Path::dataReadPath(datafile), V2(-1, -1), poster);
00078 getWorld(L)->setEnding(node);
00079 END_NOEXCEPTION;
00080 return 0;
00081 }
|
|
|
void node_bestSolution(codename, moves, author)
Definition at line 87 of file worldmap-script.cpp. 00088 {
00089 BEGIN_NOEXCEPTION;
00090 const char *codename = luaL_checkstring(L, 1);
00091 int moves = luaL_checkint(L, 2);
00092 const char *author = luaL_checkstring(L, 3);
00093
00094 getWorld(L)->bestSolution(codename, moves, author);
00095 END_NOEXCEPTION;
00096 return 0;
00097 }
|
|
|
Fuctions for worldmap.
Definition at line 28 of file worldmap-script.cpp. 00029 {
00030 BEGIN_NOEXCEPTION;
00031 const char *codename = luaL_checkstring(L, 1);
00032 const char *lang = luaL_checkstring(L, 2);
00033 const char *levelname = luaL_checkstring(L, 3);
00034 const char *desc = luaL_checkstring(L, 4);
00035
00036 LevelDesc *dialog = new LevelDesc(lang, levelname, desc);
00037 getWorld(L)->addDesc(codename, dialog);
00038 END_NOEXCEPTION;
00039 return 0;
00040 }
|
1.4.2