summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjussi2023-02-15 01:10:03 +0200
committerjussi2023-02-15 01:10:03 +0200
commit9df23e32b02167dd41c8b5c25b852717163dfeda (patch)
tree5e78bba46f30a7de33ff3cc67cbda2bb465a4742
parentcf7c480aca8e24c62e6563e96a1bb4636a1ac81f (diff)
downloadreilua-enhanced-9df23e32b02167dd41c8b5c25b852717163dfeda.tar.gz
reilua-enhanced-9df23e32b02167dd41c8b5c25b852717163dfeda.tar.bz2
reilua-enhanced-9df23e32b02167dd41c8b5c25b852717163dfeda.zip
RL_GetWindowSize renamed to RL_GetScreenSize.
-rw-r--r--API.md6
-rw-r--r--changelog7
-rw-r--r--examples/2D_camera/main.lua2
-rw-r--r--examples/ReiLuaGui_examples/main.lua2
-rw-r--r--examples/ReiLuaGui_test/main.lua2
-rw-r--r--examples/dungeon_crawler/main.lua2
-rw-r--r--examples/heightmap/main.lua2
-rw-r--r--examples/image_draw/main.lua2
-rw-r--r--examples/instancing/main.lua2
-rw-r--r--examples/iqm_test/main.lua2
-rw-r--r--examples/lightmap/main.lua2
-rw-r--r--examples/pixelated/main.lua2
-rw-r--r--examples/platformer/main.lua2
-rw-r--r--examples/ray/main.lua2
-rw-r--r--examples/shaders/main.lua2
-rw-r--r--examples/waving_cubes/main.lua2
-rw-r--r--examples/window/main.lua2
-rw-r--r--include/core.h2
-rw-r--r--src/core.c6
-rw-r--r--src/lua_core.c2
20 files changed, 28 insertions, 25 deletions
diff --git a/API.md b/API.md
index 514c5cb..836b5b7 100644
--- a/API.md
+++ b/API.md
@@ -617,6 +617,8 @@ BLEND_ADD_COLORS
BLEND_SUBTRACT_COLORS
+BLEND_ALPHA_PREMULTIPLY
+
BLEND_CUSTOM
## Globals - Gesture
@@ -1194,9 +1196,9 @@ Get window position on monitor
---
-> size = RL_GetWindowPosition()
+> size = RL_GetScreenSize()
-Get window size
+Get screen size
- Success return Vector2
diff --git a/changelog b/changelog
index 5ab34e4..7e639bb 100644
--- a/changelog
+++ b/changelog
@@ -15,8 +15,8 @@ KEY CHANGES:
Detailed changes:
ADDED: Help argument.
-CHANGED: Changed fuction name RL_rlSetLineWidth to RL_rlglSetLineWidth.
-CHANGED: Changed fuction name RL_rlGetLineWidth to RL_rlglGetLineWidth.
+CHANGED: RL_rlSetLineWidth renamed to RL_rlglSetLineWidth.
+CHANGED: RL_rlGetLineWidth renamed to RL_rlglGetLineWidth.
FIXED: DrawRectangleGradient V and H expecting wrong arguments.
ADDED: RL_LoadDirectoryFilesEx.
FIXED: RL_DrawLineBezierQuad was called RL_DrawLineBezier in API.
@@ -27,4 +27,5 @@ ADDED: RL_SetMaterialShader.
ADDED: RL_GetFileLength.
ADDED: RL_LoadFontEx.
FIXED: RL_ImageAlphaClear expecting wrong arguments.
-ADDED: BLEND_ALPHA_PREMULTIPLY
+ADDED: BLEND_ALPHA_PREMULTIPLY.
+CHANGED: RL_GetWindowSize renamed to RL_GetScreenSize.
diff --git a/examples/2D_camera/main.lua b/examples/2D_camera/main.lua
index 55c3b5a..b23d606 100644
--- a/examples/2D_camera/main.lua
+++ b/examples/2D_camera/main.lua
@@ -11,7 +11,7 @@ function init()
local monitor = 0
local mPos = RL_GetMonitorPosition( monitor )
local mSize = RL_GetMonitorSize( monitor )
- local winSize = RL_GetWindowSize()
+ local winSize = RL_GetScreenSize()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
RL_SetWindowState( FLAG_VSYNC_HINT )
diff --git a/examples/ReiLuaGui_examples/main.lua b/examples/ReiLuaGui_examples/main.lua
index 3a54c30..f67e27f 100644
--- a/examples/ReiLuaGui_examples/main.lua
+++ b/examples/ReiLuaGui_examples/main.lua
@@ -65,7 +65,7 @@ function init()
local monitor = 0
local mPos = RL_GetMonitorPosition( monitor )
local mSize = RL_GetMonitorSize( monitor )
- winSize = RL_GetWindowSize()
+ winSize = RL_GetScreenSize()
RL_SetWindowTitle( "ReiLuaGui examples" )
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
diff --git a/examples/ReiLuaGui_test/main.lua b/examples/ReiLuaGui_test/main.lua
index ecf3084..b36a7da 100644
--- a/examples/ReiLuaGui_test/main.lua
+++ b/examples/ReiLuaGui_test/main.lua
@@ -138,7 +138,7 @@ function init()
local monitor = 0
local mPos = RL_GetMonitorPosition( monitor )
local mSize = RL_GetMonitorSize( monitor )
- winSize = RL_GetWindowSize()
+ winSize = RL_GetScreenSize()
RL_SetWindowTitle( "ReiLuaGui Test" )
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
diff --git a/examples/dungeon_crawler/main.lua b/examples/dungeon_crawler/main.lua
index bfc98e1..e1342ec 100644
--- a/examples/dungeon_crawler/main.lua
+++ b/examples/dungeon_crawler/main.lua
@@ -4,7 +4,7 @@ local camera = -1
local texture = -1
local textureSize = { 256, 96 }
local res = { 384, 216 }
-local winSize = RL_GetWindowSize()
+local winSize = RL_GetScreenSize()
local winScale = 4
local framebuffer = -1
diff --git a/examples/heightmap/main.lua b/examples/heightmap/main.lua
index 4b5e70e..e8cc4ea 100644
--- a/examples/heightmap/main.lua
+++ b/examples/heightmap/main.lua
@@ -21,7 +21,7 @@ local matrix = {}
function init()
local mPos = RL_GetMonitorPosition( monitor )
local mSize = RL_GetMonitorSize( monitor )
- local winSize = RL_GetWindowSize()
+ local winSize = RL_GetScreenSize()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
RL_SetWindowState( FLAG_VSYNC_HINT )
diff --git a/examples/image_draw/main.lua b/examples/image_draw/main.lua
index 2da0c58..2a78a13 100644
--- a/examples/image_draw/main.lua
+++ b/examples/image_draw/main.lua
@@ -8,7 +8,7 @@ local textImage = -1
function init()
local mPos = RL_GetMonitorPosition( monitor )
local mSize = RL_GetMonitorSize( monitor )
- local winSize = RL_GetWindowSize()
+ local winSize = RL_GetScreenSize()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
RL_SetWindowState( FLAG_VSYNC_HINT )
diff --git a/examples/instancing/main.lua b/examples/instancing/main.lua
index 17a2acb..d0760ec 100644
--- a/examples/instancing/main.lua
+++ b/examples/instancing/main.lua
@@ -22,7 +22,7 @@ function init()
local monitor = 0
local mPos = RL_GetMonitorPosition( monitor )
local mSize = RL_GetMonitorSize( monitor )
- local winSize = RL_GetWindowSize()
+ local winSize = RL_GetScreenSize()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
RL_SetWindowSize( winSize )
diff --git a/examples/iqm_test/main.lua b/examples/iqm_test/main.lua
index 105af12..8471c86 100644
--- a/examples/iqm_test/main.lua
+++ b/examples/iqm_test/main.lua
@@ -15,7 +15,7 @@ local animSpeed = 60
function init()
local mPos = RL_GetMonitorPosition( monitor )
local mSize = RL_GetMonitorSize( monitor )
- local winSize = RL_GetWindowSize()
+ local winSize = RL_GetScreenSize()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
RL_SetWindowState( FLAG_VSYNC_HINT )
diff --git a/examples/lightmap/main.lua b/examples/lightmap/main.lua
index 8f8038e..e0b5da0 100644
--- a/examples/lightmap/main.lua
+++ b/examples/lightmap/main.lua
@@ -13,7 +13,7 @@ local matrix = {}
function init()
local mPos = RL_GetMonitorPosition( monitor )
local mSize = RL_GetMonitorSize( monitor )
- local winSize = RL_GetWindowSize()
+ local winSize = RL_GetScreenSize()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
RL_SetWindowState( FLAG_VSYNC_HINT )
diff --git a/examples/pixelated/main.lua b/examples/pixelated/main.lua
index d130c1c..f5239ac 100644
--- a/examples/pixelated/main.lua
+++ b/examples/pixelated/main.lua
@@ -34,7 +34,7 @@ function process( delta )
end
if RL_IsWindowResized() then
- winSize = RL_GetWindowSize()
+ winSize = RL_GetScreenSize()
end
end
diff --git a/examples/platformer/main.lua b/examples/platformer/main.lua
index c9b17bf..dde3c1e 100644
--- a/examples/platformer/main.lua
+++ b/examples/platformer/main.lua
@@ -222,7 +222,7 @@ end
function process( delta )
if RL_IsWindowResized() then
- winSize:set( RL_GetWindowSize() )
+ winSize:set( RL_GetScreenSize() )
end
playerMovement( delta )
diff --git a/examples/ray/main.lua b/examples/ray/main.lua
index 248cec6..0c594d0 100644
--- a/examples/ray/main.lua
+++ b/examples/ray/main.lua
@@ -6,7 +6,7 @@ local function setupWindow()
local monitor = 0
local mPos = RL_GetMonitorPosition( monitor )
local mSize = RL_GetMonitorSize( monitor )
- local winSize = RL_GetWindowSize()
+ local winSize = RL_GetScreenSize()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
RL_SetWindowState( FLAG_VSYNC_HINT )
diff --git a/examples/shaders/main.lua b/examples/shaders/main.lua
index f603a5d..a91f1ee 100644
--- a/examples/shaders/main.lua
+++ b/examples/shaders/main.lua
@@ -11,7 +11,7 @@ local secondsLoc
function init()
local mPos = RL_GetMonitorPosition( monitor )
local mSize = RL_GetMonitorSize( monitor )
- local winSize = RL_GetWindowSize()
+ local winSize = RL_GetScreenSize()
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
RL_SetWindowState( FLAG_VSYNC_HINT )
diff --git a/examples/waving_cubes/main.lua b/examples/waving_cubes/main.lua
index faf4a9f..eab9758 100644
--- a/examples/waving_cubes/main.lua
+++ b/examples/waving_cubes/main.lua
@@ -13,7 +13,7 @@ function init()
local monitor = 0
local mPos = RL_GetMonitorPosition( monitor )
local mSize = RL_GetMonitorSize( monitor )
- local winSize = RL_GetWindowSize()
+ local winSize = RL_GetScreenSize()
RL_SetWindowTitle( "Waving cubes" )
RL_SetWindowState( FLAG_WINDOW_RESIZABLE )
diff --git a/examples/window/main.lua b/examples/window/main.lua
index 7ddf828..1fa5744 100644
--- a/examples/window/main.lua
+++ b/examples/window/main.lua
@@ -11,7 +11,7 @@ end
function process( delta )
if RL_IsKeyPressed( KEY_ENTER ) then
local textSize = RL_MeasureText( 0, text, 20, 2 )
- local winSize = RL_GetWindowSize()
+ local winSize = RL_GetScreenSize()
textColor = BLUE
textPos = { winSize[1] / 2 - textSize[1] / 2, winSize[2] / 2 - textSize[2] / 2 }
diff --git a/include/core.h b/include/core.h
index 3c2cb65..5c60894 100644
--- a/include/core.h
+++ b/include/core.h
@@ -17,7 +17,7 @@ int lcoreSetWindowMinSize( lua_State *L );
int lcoreGetMonitorPosition( lua_State *L );
int lcoreGetMonitorSize( lua_State *L );
int lcoreGetWindowPosition( lua_State *L );
-int lcoreGetWindowSize( lua_State *L );
+int lcoreGetScreenSize( lua_State *L );
int lcoreSetWindowState( lua_State *L );
int lcoreIsWindowState( lua_State *L );
int lcoreClearWindowState( lua_State *L );
diff --git a/src/core.c b/src/core.c
index 1cd9b80..8a2d964 100644
--- a/src/core.c
+++ b/src/core.c
@@ -298,13 +298,13 @@ int lcoreGetWindowPosition( lua_State *L ) {
}
/*
-> size = RL_GetWindowPosition()
+> size = RL_GetScreenSize()
-Get window size
+Get screen size
- Success return Vector2
*/
-int lcoreGetWindowSize( lua_State *L ) {
+int lcoreGetScreenSize( lua_State *L ) {
Vector2 size = (Vector2){ GetScreenWidth(), GetScreenHeight() };
uluaPushVector2( L, size );
diff --git a/src/lua_core.c b/src/lua_core.c
index 32759bf..4f6dde8 100644
--- a/src/lua_core.c
+++ b/src/lua_core.c
@@ -681,7 +681,7 @@ void luaRegister() {
lua_register( L, "RL_GetMonitorPosition", lcoreGetMonitorPosition );
lua_register( L, "RL_GetMonitorSize", lcoreGetMonitorSize );
lua_register( L, "RL_GetWindowPosition", lcoreGetWindowPosition );
- lua_register( L, "RL_GetWindowSize", lcoreGetWindowSize );
+ lua_register( L, "RL_GetScreenSize", lcoreGetScreenSize );
lua_register( L, "RL_SetWindowState", lcoreSetWindowState );
lua_register( L, "RL_IsWindowState", lcoreIsWindowState );
lua_register( L, "RL_ClearWindowState", lcoreClearWindowState );