Go to the source code of this file.
Functions | |
Planner * | getPlanner (lua_State *L) |
DialogStack * | getDialogs (lua_State *L) |
int | script_game_planAction (lua_State *L) throw () |
void game_planAction(func) | |
int | script_game_isPlanning (lua_State *L) throw () |
bool game_isPlanning() | |
int | script_game_killPlan (lua_State *L) throw () |
bool game_killPlan() | |
int | script_dialog_isDialog (lua_State *L) throw () |
bool dialog_isDialog() | |
int | script_dialog_addFont (lua_State *L) throw () |
void dialog_addFont(fontname, red, green, blue) | |
int | script_dialog_addDialog (lua_State *L) throw () |
void dialog_addDialog(name, lang, soundfile, fontname="", subtitle="") | |
int | script_model_isTalking (lua_State *L) throw () |
bool model_isTalking(model_index) | |
int | script_model_talk (lua_State *L) throw () |
void model_talk(model_index, name, volume, loops=0, dialogFlag=false) | |
int | script_model_killSound (lua_State *L) throw () |
void model_killSound(model_index) | |
int | script_sound_playMusic (lua_State *L) throw () |
void sound_playMusic(music_name) | |
int | script_sound_stopMusic (lua_State *L) throw () |
void sound_stopMusic() |
|
Definition at line 32 of file dialog-script.cpp. 00033 { 00034 return getPlanner(L)->dialogs(); 00035 }
|
|
Definition at line 26 of file dialog-script.cpp. 00027 { 00028 return dynamic_cast<Planner*>(script_getLeader(L)); 00029 }
|
|
void dialog_addDialog(name, lang, soundfile, fontname="", subtitle="")
Definition at line 116 of file dialog-script.cpp. 00117 { 00118 BEGIN_NOEXCEPTION; 00119 const char *name = luaL_checkstring(L, 1); 00120 const char *lang = luaL_checkstring(L, 2); 00121 const char *soundfile = luaL_checkstring(L, 3); 00122 const char *fontname = luaL_optstring(L, 4, ""); 00123 const char *subtitle = luaL_optstring(L, 5, ""); 00124 00125 FishDialog *dialog = 00126 new FishDialog(lang, soundfile, subtitle, fontname); 00127 getDialogs(L)->addDialog(name, dialog); 00128 00129 END_NOEXCEPTION; 00130 return 0; 00131 }
|
|
void dialog_addFont(fontname, red, green, blue)
Definition at line 98 of file dialog-script.cpp. 00099 { 00100 BEGIN_NOEXCEPTION; 00101 const char *name = luaL_checkstring(L, 1); 00102 int red = luaL_checkint(L, 2); 00103 int green = luaL_checkint(L, 3); 00104 int blue = luaL_checkint(L, 4); 00105 00106 SubTitleAgent::agent()->addFont(name, new Color(red, green, blue)); 00107 00108 END_NOEXCEPTION; 00109 return 0; 00110 }
|
|
bool dialog_isDialog()
Definition at line 84 of file dialog-script.cpp. 00085 { 00086 BEGIN_NOEXCEPTION; 00087 bool isDialog = getDialogs(L)->isDialog(); 00088 lua_pushboolean(L, isDialog); 00089 END_NOEXCEPTION; 00090 //NOTE: return isDialog 00091 return 1; 00092 }
|
|
bool game_isPlanning()
Definition at line 57 of file dialog-script.cpp. 00058 { 00059 BEGIN_NOEXCEPTION; 00060 bool planning = getPlanner(L)->isPlanning(); 00061 lua_pushboolean(L, planning); 00062 END_NOEXCEPTION; 00063 //NOTE: return planning 00064 return 1; 00065 }
|
|
bool game_killPlan()
Definition at line 71 of file dialog-script.cpp. 00072 { 00073 BEGIN_NOEXCEPTION; 00074 getPlanner(L)->interruptPlan(); 00075 END_NOEXCEPTION; 00076 return 0; 00077 }
|
|
void game_planAction(func)
Definition at line 42 of file dialog-script.cpp. 00043 { 00044 BEGIN_NOEXCEPTION; 00045 luaL_checktype(L, 1, LUA_TFUNCTION); 00046 int funcRef = luaL_ref(L, LUA_REGISTRYINDEX); 00047 00048 getPlanner(L)->planAction(funcRef); 00049 END_NOEXCEPTION; 00050 return 0; 00051 }
|
|
bool model_isTalking(model_index)
Definition at line 137 of file dialog-script.cpp. 00138 { 00139 BEGIN_NOEXCEPTION; 00140 int model_index = luaL_checkint(L, 1); 00141 00142 bool talking = getDialogs(L)->isTalking(model_index); 00143 lua_pushboolean(L, talking); 00144 END_NOEXCEPTION; 00145 //NOTE: return talking 00146 return 1; 00147 }
|
|
void model_killSound(model_index)
Definition at line 171 of file dialog-script.cpp. 00172 { 00173 BEGIN_NOEXCEPTION; 00174 int model_index = luaL_checkint(L, 1); 00175 00176 getDialogs(L)->killSound(model_index); 00177 END_NOEXCEPTION; 00178 return 0; 00179 }
|
|
void model_talk(model_index, name, volume, loops=0, dialogFlag=false)
Definition at line 153 of file dialog-script.cpp. 00154 { 00155 BEGIN_NOEXCEPTION; 00156 int model_index = luaL_checkint(L, 1); 00157 const char *name = luaL_checkstring(L, 2); 00158 int volume = luaL_optint(L, 3, 75); 00159 int loops = luaL_optint(L, 4, 0); 00160 bool dialogFlag = lua_toboolean(L, 5); 00161 00162 getDialogs(L)->actorTalk(model_index, name, volume, loops, dialogFlag); 00163 END_NOEXCEPTION; 00164 return 0; 00165 }
|
|
void sound_playMusic(music_name)
Definition at line 186 of file dialog-script.cpp. 00187 { 00188 BEGIN_NOEXCEPTION; 00189 const char *music_name = luaL_checkstring(L, 1); 00190 00191 SoundAgent::agent()->playMusic(Path::dataReadPath(music_name), NULL); 00192 END_NOEXCEPTION; 00193 return 0; 00194 }
|
|
void sound_stopMusic()
Definition at line 200 of file dialog-script.cpp. 00201 { 00202 BEGIN_NOEXCEPTION; 00203 SoundAgent::agent()->stopMusic(); 00204 END_NOEXCEPTION; 00205 return 0; 00206 }
|