LPCGame
A Simple 2d Game Engine
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
luacanimatedimage.h
1 #ifndef LUAC_ANIMATEDIMAGE_H
2 #define LUAC_ANIMATEDIMAGE_H
3 
4 #include <string>
5 #include <memory>
6 #include <lua.hpp>
7 #include "luacudata.h"
8 #include "core/animatedimage.h"
9 
11 
15 namespace LuaC {
17  const std::string animatedImageMeta = "LPC.AnimatedImage";
19  const std::string animatedImageClass = "AnimatedImage";
21  template<>
22  const std::string UdataLib<std::shared_ptr<AnimatedImage>>::mMetaTable = animatedImageMeta;
26  class AnimatedImageLib : public UdataLib<std::shared_ptr<AnimatedImage>> {
27  public:
29  static int luaopen_animatedimage(lua_State *l);
30 
31  private:
33  static const struct luaL_reg luaAnimatedImageLib[];
35  static int newAnimatedImage(lua_State *l);
37  static int update(lua_State *l);
39  static int play(lua_State *l);
41  static int playing(lua_State *l);
43  static int size(lua_State *l);
45  static int width(lua_State *l);
47  static int height(lua_State *l);
49  static int file(lua_State *l);
51  static int release(lua_State *l);
53  static int garbageCollection(lua_State *l);
54  };
55 }
56 
57 #endif