Polyphase Game Engine
Loading...
Searching...
No Matches
Asset_Lua.h
Go to the documentation of this file.
1#pragma once
2
3#include "Engine.h"
4#include "Asset.h"
5#include "AssetRef.h"
6
7#if LUA_ENABLED
8
9#define ASSET_LUA_NAME "Asset"
10#define ASSET_LUA_FLAG "cfAsset"
11#define CHECK_ASSET(L, Arg) CheckAssetLuaType<Asset>(L, Arg, ASSET_LUA_NAME, ASSET_LUA_FLAG);
12#define CHECK_ASSET_USERDATA(L, Arg) CheckHierarchyLuaType<Asset_Lua>(L, Arg, ASSET_LUA_NAME, ASSET_LUA_FLAG)->mAsset.Get();
13
14struct POLYPHASE_API Asset_Lua
15{
16 AssetRef mAsset;
17
18 Asset_Lua() { }
19 ~Asset_Lua() { }
20
21 static int Create(lua_State* L, const Asset* asset, bool allowNull = false);
22 static int Destroy(lua_State* L);
23
24 static int Equals(lua_State* L);
25
26 static int GetName(lua_State* L);
27 static int IsRefCounted(lua_State* L);
28 static int GetRefCount(lua_State* L);
29
30 static int GetTypeName(lua_State* L);
31 static int IsTransient(lua_State* L);
32
33 static int IsLoaded(lua_State* L);
34
35 static void BindCommon(lua_State* L, int mtIndex);
36 static void Bind();
37};
38
39#endif
#define POLYPHASE_API
Definition PolyphaseAPI.h:31
Definition AssetRef.h:18
Definition Asset.h:113