diff options
| author | jussi | 2023-05-19 13:46:24 +0300 |
|---|---|---|
| committer | jussi | 2023-05-19 13:46:24 +0300 |
| commit | 335321e3aa238069df88cf06c98119ef4ef348d3 (patch) | |
| tree | c15ba6edb5d13a022ef88e9a2cdc6a3644a5b737 /src/lua_core.c | |
| parent | 870e3a46a6fcdbd5b264406984d232874f138ea3 (diff) | |
| download | reilua-enhanced-335321e3aa238069df88cf06c98119ef4ef348d3.tar.gz reilua-enhanced-335321e3aa238069df88cf06c98119ef4ef348d3.tar.bz2 reilua-enhanced-335321e3aa238069df88cf06c98119ef4ef348d3.zip | |
Material getter and get/set for parameters.
Diffstat (limited to 'src/lua_core.c')
| -rw-r--r-- | src/lua_core.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lua_core.c b/src/lua_core.c index 5b51114..a65c95a 100644 --- a/src/lua_core.c +++ b/src/lua_core.c @@ -17,21 +17,18 @@ static void assignGlobalInt( int value, const char *name ) { lua_State *L = state->luaState; lua_pushinteger( L, value ); - // lua_setglobal( L, name ); lua_setfield( L, -2, name ); } static void assignGlobalFloat( float value, const char *name ) { lua_State *L = state->luaState; lua_pushnumber( L, value ); - // lua_setglobal( L, name ); lua_setfield( L, -2, name ); } static void assignGlobalColor( Color color, const char *name ) { lua_State *L = state->luaState; uluaPushColor( L, color ); - // lua_setglobal( L, name ); lua_setfield( L, -2, name ); } @@ -368,7 +365,7 @@ void defineGlobals() { assignGlobalInt( NPATCH_NINE_PATCH, "NPATCH_NINE_PATCH" ); assignGlobalInt( NPATCH_THREE_PATCH_VERTICAL, "NPATCH_THREE_PATCH_VERTICAL" ); assignGlobalInt( NPATCH_THREE_PATCH_HORIZONTAL, "NPATCH_THREE_PATCH_HORIZONTAL" ); - /* TextureModes */ + /* TextureTypes */ assignGlobalInt( TEXTURE_TYPE_TEXTURE, "TEXTURE_TYPE_TEXTURE" ); assignGlobalInt( TEXTURE_TYPE_RENDER_TEXTURE, "TEXTURE_TYPE_RENDER_TEXTURE" ); /* Colors */ @@ -1088,6 +1085,12 @@ void luaRegister() { assingGlobalFunction( "SetMaterialColor", lmodelsSetMaterialColor ); assingGlobalFunction( "SetMaterialValue", lmodelsSetMaterialValue ); assingGlobalFunction( "SetMaterialShader", lmodelsSetMaterialShader ); + assingGlobalFunction( "SetMaterialParams", lmodelsSetMaterialParams ); + assingGlobalFunction( "GetMaterialTexture", lmodelsGetMaterialTexture ); + assingGlobalFunction( "GetMaterialColor", lmodelsGetMaterialColor ); + assingGlobalFunction( "GetMaterialValue", lmodelsGetMaterialValue ); + assingGlobalFunction( "GetMaterialShader", lmodelsGetMaterialShader ); + assingGlobalFunction( "GetMaterialParams", lmodelsGetMaterialParams ); /* Model. */ assingGlobalFunction( "LoadModel", lmodelsLoadModel ); assingGlobalFunction( "LoadModelFromMesh", lmodelsLoadModelFromMesh ); |
