lugre_scripting.general.cpp File Reference

#include "lugre_prefix.h"
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <cstdio>
#include <string>
#include <vector>
#include "lugre_net.h"
#include "lugre_fifo.h"
#include "lugre_game.h"
#include "lugre_listener.h"
#include "lugre_scripting.h"
#include "lugre_input.h"
#include "lugre_robstring.h"
#include "lugre_gfx3D.h"
#include "lugre_gfx2D.h"
#include "lugre_widget.h"
#include "lugre_luabind.h"
#include "lugre_luabind_direct.h"
#include "lugre_shell.h"
#include "lugre_timer.h"
#include "lugre_bitmask.h"
#include "lugre_camera.h"
#include "lugre_viewport.h"
#include "lugre_rendertexture.h"
#include "lugre_sound.h"
#include "lugre_luaxml.h"
#include "lugre_meshshape.h"
#include "lugre_random.h"
#include "lugre_thread.h"
#include "lugre_ode.h"
#include "lugre_cadune.h"
#include "lugre_md5.h"
#include "lugre_paged_geometry.h"
#include "lugre_caelum.h"
#include "lugre_texatlas.h"
#include "lugre_image.h"
#include "lugre_commondialog.h"
#include "lugre_main.h"
#include "lugre_utils.h"
#include <sys/types.h>
#include <unistd.h>

Include dependency graph for lugre_scripting.general.cpp:

Go to the source code of this file.

Namespaces

namespace  Lugre

Defines

#define BIND_LUA_CONSTANT(name)   cScripting::SetGlobal(L,#name,name);

Functions

void Lugre::DisplayNotice (const char *szMsg)
 defined in main.cpp, OS-specific
void Lugre::DisplayErrorMessage (const char *szMsg)
 defined in main.cpp, OS-specific
void Lugre::Material_LuaRegister (void *L)
void Lugre::Beam_LuaRegister (void *L)
 lua binding
void Lugre::LuaRegister_VertexBuffer (lua_State *L)
 lua binding
void Lugre::LuaRegister_LuaBinds_Ogre (lua_State *L)
 lua binding
void Lugre::PrintLuaStackTrace ()
 defined in scripting.cpp
void Lugre::ProfileDumpCallCount ()
 defined in profile.cpp, only does something if PROFILE_CALLCOUNT is enabled
void Lugre::rob_dirlist (const char *path, std::vector< std::string > &res, const bool bDirs, const bool bFiles)
int Lugre::rob_mkdir (const char *path, int perm)
int Lugre::rob_rmdir (const char *path)
static int l_GetAllKeyNames (lua_State *L)
 lua: string_array GetAllKeyNames ()
static int l_GetNamedKey (lua_State *L)
 called from lua : string keyname
static int l_GetKeyName (lua_State *L)
 called from lua : int keycode
static int l_Terminate (lua_State *L)
 terminates the application
static int l_GetPointerSize (lua_State *L)
static int l_Client_IsAlive (lua_State *L)
 only call this once at startup
static int l_PollInput (lua_State *L)
 called from lua : no params, returns mousex,mousey,4xmousewheel info...
static int l_ProfileDumpCallCount (lua_State *L)
static int l_Client_GetCurFPS (lua_State *L)
static int l_Client_GetFrameNum (lua_State *L)
static int l_Client_GetTicks (lua_State *L)
static int l_Client_GetMemoryUsage (lua_State *L)
static int l_Uo16Color2Rgb (lua_State *L)
 r,g,b = Uo16Color2Rgb(color)
static int l_Client_Sleep (lua_State *L)
 just do nothing for x seconds
static int l_Client_USleep (lua_State *L)
 just do nothing for x milliseconds (1000msec = 1sec)
static int l_Client_GetPhysStepTime (lua_State *L)
static int l_file_exists (lua_State *L)
static int l_remove_file (lua_State *L)
static int l_file_size (lua_State *L)
static int l_mkdir (lua_State *L)
static int l_rmdir (lua_State *L)
static int l_dirlist (lua_State *L)
 table={filename,...} dirlist (dirpath,bDirs,bFiles)
static int l_GetRandomHexString (lua_State *L)
static int l_Hex2Num (lua_State *L)
 converts "0x1234" to a number
static int l_BitwiseAND (lua_State *L)
static int l_BitwiseOR (lua_State *L)
static int l_BitwiseXOR (lua_State *L)
static int l_BitwiseSHL (lua_State *L)
static int l_BitwiseSHR (lua_State *L)
static int l_TestBit (lua_State *L)
static int l_SetBit (lua_State *L)
static int l_ClearBit (lua_State *L)
static int l_Exit (lua_State *L)
static int l_Crash (lua_State *L)
static int l_CrashSegFault (lua_State *L)
 triggers a segfault, for testing our segfault handlers lua stacktrace
static int l_DisplayNotice (lua_State *L)
static int l_FatalErrorMessage (lua_State *L)
static int l_GetMainWorkingDir (lua_State *L)
static int l_GetLugreLuaPath (lua_State *L)
static int l_LugreMessageBox (lua_State *L)
 for lua: bool LugreMessageBox (eLugreMessageBoxType iType,sTitle,sText) -- returns one of kLugreMessageBoxResult_*
static int l_OpenBrowser (lua_State *L)
 for lua: bool OpenBrowser (sURL) -- returns true on success
static int l_FileOpenDialog (lua_State *L)
 for lua: string FileOpenDialog (sInitialDir,sFilePattern,sTitle) (sFilePattern="*.txt" for example)
static int l_FileSaveDialog (lua_State *L)
 for lua: string FileSaveDialog (sInitialDir,sFilePattern,sTitle) (sFilePattern="*.txt" for example)
void RegisterLua_General_GlobalFunctions (lua_State *L)
void RegisterLua_General_Classes (lua_State *L)


Define Documentation

#define BIND_LUA_CONSTANT ( name   )     cScripting::SetGlobal(L,#name,name);


Function Documentation

static int l_BitwiseAND ( lua_State *  L  )  [static]

Definition at line 313 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_BitwiseOR ( lua_State *  L  )  [static]

Definition at line 323 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_BitwiseSHL ( lua_State *  L  )  [static]

Definition at line 347 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_BitwiseSHR ( lua_State *  L  )  [static]

Definition at line 358 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_BitwiseXOR ( lua_State *  L  )  [static]

Definition at line 335 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_ClearBit ( lua_State *  L  )  [static]

Definition at line 372 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_Client_GetCurFPS ( lua_State *  L  )  [static]

Definition at line 149 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_Client_GetFrameNum ( lua_State *  L  )  [static]

Definition at line 154 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_Client_GetMemoryUsage ( lua_State *  L  )  [static]

static int l_Client_GetPhysStepTime ( lua_State *  L  )  [static]

Definition at line 232 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_Client_GetTicks ( lua_State *  L  )  [static]

Definition at line 159 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_Client_IsAlive ( lua_State *  L  )  [static]

only call this once at startup

Definition at line 110 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_Client_Sleep ( lua_State *  L  )  [static]

just do nothing for x seconds

Definition at line 210 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_Client_USleep ( lua_State *  L  )  [static]

just do nothing for x milliseconds (1000msec = 1sec)

Definition at line 221 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_Crash ( lua_State *  L  )  [static]

static int l_CrashSegFault ( lua_State *  L  )  [static]

triggers a segfault, for testing our segfault handlers lua stacktrace

Definition at line 392 of file lugre_scripting.general.cpp.

References Lugre::DisplayErrorMessage(), and PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_dirlist ( lua_State *  L  )  [static]

table={filename,...} dirlist (dirpath,bDirs,bFiles)

Definition at line 285 of file lugre_scripting.general.cpp.

References PROFILE, and Lugre::rob_dirlist().

Referenced by RegisterLua_General_GlobalFunctions().

static int l_DisplayNotice ( lua_State *  L  )  [static]

Definition at line 399 of file lugre_scripting.general.cpp.

References Lugre::DisplayNotice(), and PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_Exit ( lua_State *  L  )  [static]

Definition at line 380 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_FatalErrorMessage ( lua_State *  L  )  [static]

static int l_file_exists ( lua_State *  L  )  [static]

Definition at line 238 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_file_size ( lua_State *  L  )  [static]

Definition at line 250 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_FileOpenDialog ( lua_State *  L  )  [static]

for lua: string FileOpenDialog (sInitialDir,sFilePattern,sTitle) (sFilePattern="*.txt" for example)

Definition at line 442 of file lugre_scripting.general.cpp.

References Lugre::FileOpenDialog(), and PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_FileSaveDialog ( lua_State *  L  )  [static]

for lua: string FileSaveDialog (sInitialDir,sFilePattern,sTitle) (sFilePattern="*.txt" for example)

Definition at line 453 of file lugre_scripting.general.cpp.

References Lugre::FileSaveDialog(), and PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_GetAllKeyNames ( lua_State *  L  )  [static]

lua: string_array GetAllKeyNames ()

Definition at line 75 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_GetKeyName ( lua_State *  L  )  [static]

called from lua : int keycode

Definition at line 92 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_GetLugreLuaPath ( lua_State *  L  )  [static]

Definition at line 416 of file lugre_scripting.general.cpp.

References Lugre::GetLugreLuaPath(), and PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_GetMainWorkingDir ( lua_State *  L  )  [static]

static int l_GetNamedKey ( lua_State *  L  )  [static]

called from lua : string keyname

Definition at line 85 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_GetPointerSize ( lua_State *  L  )  [static]

Definition at line 104 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_GetRandomHexString ( lua_State *  L  )  [static]

Definition at line 301 of file lugre_scripting.general.cpp.

References PROFILE, and Lugre::strprintf().

Referenced by RegisterLua_General_GlobalFunctions().

static int l_Hex2Num ( lua_State *  L  )  [static]

converts "0x1234" to a number

Definition at line 304 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_LugreMessageBox ( lua_State *  L  )  [static]

for lua: bool LugreMessageBox (eLugreMessageBoxType iType,sTitle,sText) -- returns one of kLugreMessageBoxResult_*

Definition at line 425 of file lugre_scripting.general.cpp.

References Lugre::LugreMessageBox(), and PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_mkdir ( lua_State *  L  )  [static]

Definition at line 269 of file lugre_scripting.general.cpp.

References PROFILE, and Lugre::rob_mkdir().

Referenced by RegisterLua_General_GlobalFunctions().

static int l_OpenBrowser ( lua_State *  L  )  [static]

for lua: bool OpenBrowser (sURL) -- returns true on success

Definition at line 434 of file lugre_scripting.general.cpp.

References Lugre::OpenBrowser(), and PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_PollInput ( lua_State *  L  )  [static]

called from lua : no params, returns mousex,mousey,4xmousewheel info...

Definition at line 116 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_ProfileDumpCallCount ( lua_State *  L  )  [static]

static int l_remove_file ( lua_State *  L  )  [static]

Definition at line 244 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_rmdir ( lua_State *  L  )  [static]

Definition at line 278 of file lugre_scripting.general.cpp.

References PROFILE, and Lugre::rob_rmdir().

Referenced by RegisterLua_General_GlobalFunctions().

static int l_SetBit ( lua_State *  L  )  [static]

Definition at line 371 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_Terminate ( lua_State *  L  )  [static]

terminates the application

Definition at line 99 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_TestBit ( lua_State *  L  )  [static]

Definition at line 370 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

static int l_Uo16Color2Rgb ( lua_State *  L  )  [static]

r,g,b = Uo16Color2Rgb(color)

Definition at line 195 of file lugre_scripting.general.cpp.

References PROFILE.

Referenced by RegisterLua_General_GlobalFunctions().

void RegisterLua_General_Classes ( lua_State *  L  ) 

void RegisterLua_General_GlobalFunctions ( lua_State *  L  ) 


Generated on Wed May 23 06:00:17 2012 for cpp by  doxygen 1.5.6