Kiritow
bc189b4951
分离各SDL类的包装代码. 事件分发处理全部转移至Lua Init层. C层只提供获取事件的方法. 这样有助于提高性能,以及今后Coroutine scheduler的添加.
17 lines
311 B
C++
17 lines
311 B
C++
#pragma once
|
|
#include "LuaVM.h"
|
|
#include "SDL2/include/SDL.h"
|
|
#include <memory>
|
|
|
|
class Surface
|
|
{
|
|
public:
|
|
std::shared_ptr<SDL_Surface> surf;
|
|
|
|
Surface(SDL_Surface* s);
|
|
|
|
static int close(lua_State* L);
|
|
// static int create(lua_State* L, SDL_Surface* surf);
|
|
static int create(lua_State* L, SDL_Surface* s);
|
|
};
|