LPCGame
A Simple 2d Game Engine
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
luaccamera.h
1 #ifndef LUACCAMERA_H
2 #define LUACCAMERA_H
3 
4 #include <string>
5 #include <memory>
6 #include <lua.hpp>
7 #include "luacudata.h"
8 #include "core/camera.h"
9 
11 
15 namespace LuaC {
17  const std::string cameraMeta = "LPC.Camera";
19  const std::string cameraClass = "Camera";
21  template<>
22  const std::string UdataLib<std::weak_ptr<Camera>>::mMetaTable = cameraMeta;
26  class CameraLib : public UdataLib<std::weak_ptr<Camera>> {
27  public:
29  static int luaopen_camera(lua_State *l);
30 
31  private:
33  static const struct luaL_reg luaCameraLib[];
38  static int setFocus(lua_State *l);
39  //static int update(lua_State *l);
40  static int inCamera(lua_State *l);
41  //TODO: Add these later, but are they even needed?
42  //static int move(lua_State *l);
43  //static int pan(lua_State *l);
44  //static int scene(lua_State *l);
45  static int getBox(lua_State *l);
46  //static int setBox(lua_State *l);
47  static int getSceneBox(lua_State *l);
48  //static int setSceneBox(lua_State *l);
49  static int offset(lua_State *l);
50  static int centering(lua_State *l);
51  };
52 }
53 
54 #endif