mirror of
https://github.com/raysan5/raylib.git
synced 2026-02-07 22:59:17 -05:00
Replaced tabs by spaces
This commit is contained in:
63
src/rlua.h
63
src/rlua.h
@ -2201,8 +2201,8 @@ int lua_DrawFPS(lua_State* L)
|
||||
return 0;
|
||||
}
|
||||
|
||||
// TODO: const char *FormatText(const char *text, ...);
|
||||
// TODO: const char *SubText(const char *text, int position, int length);
|
||||
// NOTE: FormatText() can be replaced by Lua function: string.format()
|
||||
// NOTE: SubText() can be replaced by Lua function: string.sub()
|
||||
|
||||
int lua_DrawCube(lua_State* L)
|
||||
{
|
||||
@ -2706,8 +2706,23 @@ int lua_EndBlendMode(lua_State* L)
|
||||
return 0;
|
||||
}
|
||||
|
||||
// TODO: Light CreateLight(int type, Vector3 position, Color diffuse);
|
||||
// TODO: void DestroyLight(Light light);
|
||||
int lua_CreateLight(lua_State* L)
|
||||
{
|
||||
int arg1 = LuaGetArgument_int(L, 1);
|
||||
Vector3 arg2 = LuaGetArgument_Vector3(L, 2);
|
||||
Color arg3 = LuaGetArgument_Color(L, 3);
|
||||
Light result = CreateLight(arg1, arg2, arg3);
|
||||
LuaPush_Light(L, result);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int lua_DestroyLight(lua_State* L)
|
||||
{
|
||||
Light arg1 = LuaGetArgument_Light(L, 1);
|
||||
DestroyLight(arg1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// raylib [rlgl] module functions - VR experience
|
||||
@ -2725,24 +2740,6 @@ int lua_CloseVrDevice(lua_State* L)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lua_UpdateVrTracking(lua_State* L)
|
||||
{
|
||||
UpdateVrTracking();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lua_BeginVrDrawing(lua_State* L)
|
||||
{
|
||||
BeginVrDrawing();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lua_EndVrDrawing(lua_State* L)
|
||||
{
|
||||
EndVrDrawing();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lua_IsVrDeviceReady(lua_State* L)
|
||||
{
|
||||
bool result = IsVrDeviceReady();
|
||||
@ -2750,6 +2747,12 @@ int lua_IsVrDeviceReady(lua_State* L)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int lua_UpdateVrTracking(lua_State* L)
|
||||
{
|
||||
UpdateVrTracking();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lua_ToggleVrMode(lua_State* L)
|
||||
{
|
||||
ToggleVrMode();
|
||||
@ -3681,8 +3684,6 @@ static luaL_Reg raylib_functions[] = {
|
||||
REG(MeasureText)
|
||||
REG(MeasureTextEx)
|
||||
REG(DrawFPS)
|
||||
//REG(FormatText)
|
||||
//REG(SubText)
|
||||
|
||||
REG(DrawCube)
|
||||
REG(DrawCubeV)
|
||||
@ -3740,15 +3741,13 @@ static luaL_Reg raylib_functions[] = {
|
||||
REG(EndShaderMode)
|
||||
REG(BeginBlendMode)
|
||||
REG(EndBlendMode)
|
||||
//REG(CreateLight)
|
||||
//REG(DestroyLight)
|
||||
REG(CreateLight)
|
||||
REG(DestroyLight)
|
||||
|
||||
REG(InitVrDevice)
|
||||
REG(CloseVrDevice)
|
||||
REG(UpdateVrTracking)
|
||||
REG(BeginVrDrawing)
|
||||
REG(EndVrDrawing)
|
||||
REG(IsVrDeviceReady)
|
||||
REG(UpdateVrTracking)
|
||||
REG(ToggleVrMode)
|
||||
|
||||
REG(InitAudioDevice)
|
||||
@ -4042,6 +4041,12 @@ RLUADEF void InitLuaDevice(void)
|
||||
LuaSetEnum("MULTIPLIED", BLEND_MULTIPLIED);
|
||||
LuaEndEnum("BlendMode");
|
||||
|
||||
LuaStartEnum();
|
||||
LuaSetEnum("POINT", LIGHT_POINT);
|
||||
LuaSetEnum("DIRECTIONAL", LIGHT_DIRECTIONAL);
|
||||
LuaSetEnum("SPOT", LIGHT_SPOT);
|
||||
LuaEndEnum("LightType");
|
||||
|
||||
LuaStartEnum();
|
||||
LuaSetEnum("NONE", GESTURE_NONE);
|
||||
LuaSetEnum("TAP", GESTURE_TAP);
|
||||
|
||||
Reference in New Issue
Block a user