cs sdk v 1.14 released

Home  |  Product  |  Documents  |  Tutorials  |  FAQ |   Download  |   Forum |   Contacts  |   Link  


  Cross Suit

 Cross Suit SDK

 Documents
      classes
 Starting...
           Tutorials

 LUA tutorials

   Support

  Forum
  q&a

 Product parts

 Virtual File system

 Virtual Render
 Virtual Machine
   

  Demo Games

   

 3D Engine

  gvSystem(dx9)

 Link

 

 

lua_sgLUA.h

Go to the documentation of this file.
00001 #pragma once
00002 
00003 #ifndef SGLUA_H_
00004 #define SGLUA_H_
00005 
00006 
00007 extern "C" {
00008 #include "./script_lua/lua_main/lua-5.1.2/src/lua.h"
00009 #include "./script_lua/lua_main/lua-5.1.2/src/lauxlib.h"
00010 #include "./script_lua/lua_main/lua-5.1.2/src/lualib.h"
00011 }
00012 
00013 #include "script_lua/lua_main/luna/luna.h"
00014 
00015 // LUNA
00016 
00017 #define DECLARE_SCRIPT_LUA_CLASS(ClassName)                     \
00018         public:                                                                                 \
00019         static const char className[];                                  \
00020         static Luna<ClassName>::RegType methods[];
00021 
00022 #define IMPLEMENT_SCRIPT_CLASS(ClassName)               \
00023         const char ClassName::className[] = #ClassName;
00024 
00025 #define DEFINE_SCRIPT_CLASS(ClassName)                  \
00026         Luna<ClassName>::RegType ClassName::methods[] = {
00027 
00028 #define SCRIPT_METHOD(ClassName, MethodName) { #MethodName, &ClassName::MethodName }
00029 
00030 #define END_SCRIPT_CLASS        };
00031 
00032 #define REGISTER_CLASS(ClassName)                                       \
00033         Luna<ClassName>::Register(m_pLuaState);
00034 
00035 // Macros
00036 
00037 #define SCRIPT_FUNCTION(FunctionName) int FunctionName(lua_State* L);
00038 
00039 #endif // SGLUA_H_
00040 
00041 

Copyright(C) gvSystem & GamePlus All Rights Reserved.