Merge branch 'v3.1-dev'
This commit is contained in:
commit
a6e3c328a4
70
.travis.yml
Normal file
70
.travis.yml
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
language: c
|
||||||
|
dist: xenial
|
||||||
|
|
||||||
|
git:
|
||||||
|
depth: 3
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: linux
|
||||||
|
- os: osx
|
||||||
|
- os: windows
|
||||||
|
|
||||||
|
addons:
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- build
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- gcc-multilib
|
||||||
|
- libasound2-dev
|
||||||
|
- libxcursor-dev
|
||||||
|
- libxinerama-dev
|
||||||
|
- mesa-common-dev
|
||||||
|
- libx11-dev
|
||||||
|
- libxrandr-dev
|
||||||
|
- libxrandr2
|
||||||
|
- libxi-dev
|
||||||
|
- libgl1-mesa-dev
|
||||||
|
- libglu1-mesa-dev
|
||||||
|
|
||||||
|
before_cache:
|
||||||
|
- case $TRAVIS_OS_NAME in
|
||||||
|
windows)
|
||||||
|
$msys2 pacman --sync --clean --noconfirm
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- $HOME/AppData/Local/Temp/chocolatey
|
||||||
|
- /C/tools/msys64
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- export MAKE=make
|
||||||
|
- case $TRAVIS_OS_NAME in
|
||||||
|
windows)
|
||||||
|
[[ ! -f C:/tools/msys64/msys2_shell.cmd ]] && rm -rf C:/tools/msys64
|
||||||
|
choco uninstall -y mingw
|
||||||
|
choco upgrade --no-progress -y msys2
|
||||||
|
export msys2='cmd //C RefreshEnv.cmd '
|
||||||
|
export msys2+='& set MSYS=winsymlinks:nativestrict '
|
||||||
|
export msys2+='& C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start'
|
||||||
|
export mingw64="$msys2 -mingw64 -full-path -here -c "\"\$@"\" --"
|
||||||
|
export msys2+=" -msys2 -c "\"\$@"\" --"
|
||||||
|
$msys2 pacman --sync --noconfirm --needed mingw-w64-x86_64-toolchain
|
||||||
|
taskkill //IM gpg-agent.exe //F
|
||||||
|
export PATH=/C/tools/msys64/mingw64/bin:$PATH
|
||||||
|
export MAKE="$mingw64 make"
|
||||||
|
$msys2 pacman -S mingw-w64-x86_64-toolchain
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
- mkdir build
|
||||||
|
- $RUNNER $CC --version
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
|
||||||
|
script:
|
||||||
|
- $RUNNER $MAKE
|
||||||
|
- mv raylua_s build/
|
||||||
|
- mv raylua_e build/
|
23
examples/embedding/main.lua
Normal file
23
examples/embedding/main.lua
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
local width, height = 800, 450
|
||||||
|
|
||||||
|
rl.SetConfigFlags(rl.FLAG_VSYNC_HINT)
|
||||||
|
rl.InitWindow(800, 450, "raylib [shapes] example - basic shapes drawing")
|
||||||
|
rl.InitAudioDevice()
|
||||||
|
|
||||||
|
local logo = rl.LoadTexture "ressources/logo.png"
|
||||||
|
local music = rl.LoadSound "ressources/mini1111.ogg"
|
||||||
|
|
||||||
|
rl.PlaySound(music)
|
||||||
|
|
||||||
|
while not rl.WindowShouldClose() do
|
||||||
|
rl.BeginDrawing()
|
||||||
|
rl.ClearBackground(rl.RAYWHITE)
|
||||||
|
|
||||||
|
rl.DrawTexture(logo, width/2 - logo.width/2, height/2 - logo.height/2, rl.WHITE)
|
||||||
|
rl.DrawText("this is a texture!", 350, 370, 10, rl.GRAY)
|
||||||
|
|
||||||
|
rl.EndDrawing()
|
||||||
|
end
|
||||||
|
|
||||||
|
rl.CloseAudioDevice()
|
||||||
|
rl.CloseWindow()
|
BIN
examples/embedding/ressources/logo.png
Normal file
BIN
examples/embedding/ressources/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
BIN
examples/embedding/ressources/mini1111.ogg
Normal file
BIN
examples/embedding/ressources/mini1111.ogg
Normal file
Binary file not shown.
BIN
examples/embedding/ressources/mini1111.xm
Normal file
BIN
examples/embedding/ressources/mini1111.xm
Normal file
Binary file not shown.
@ -48,9 +48,7 @@ while not rl.WindowShouldClose() do
|
|||||||
(z - num_blocks / 2) * (scale * 3.0) + scatter)
|
(z - num_blocks / 2) * (scale * 3.0) + scatter)
|
||||||
|
|
||||||
local cube_color = rl.ColorFromHSV(
|
local cube_color = rl.ColorFromHSV(
|
||||||
rl.new("Vector3",
|
(((x + y + z) * 18) % 360), 0.75, 0.9
|
||||||
(((x + y + z) * 18) % 360), 0.75, 0.9
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
local cube_size = (2.4 - scale) * block_scale
|
local cube_size = (2.4 - scale) * block_scale
|
||||||
|
28
makefile
28
makefile
@ -7,10 +7,17 @@ LUA ?= luajit/src/luajit
|
|||||||
WINDRES ?= windres
|
WINDRES ?= windres
|
||||||
|
|
||||||
CFLAGS += -Iluajit/src -Iraylib/src -Iraygui/src
|
CFLAGS += -Iluajit/src -Iraylib/src -Iraygui/src
|
||||||
LDFLAGS += -Lluajit/src -Lraylib -lraylib
|
LDFLAGS += luajit/src/libluajit.a raylib/src/libraylib.a
|
||||||
|
|
||||||
MODULES := raymath rlgl easings gestures physac raygui
|
MODULES := raymath rlgl easings gestures physac raygui
|
||||||
|
|
||||||
|
# raylib settings
|
||||||
|
PLATFORM ?= PLATFORM_DESKTOP
|
||||||
|
GRAPHICS ?= GRAPHICS_API_OPENGL_33
|
||||||
|
|
||||||
|
USE_WAYLAND_DISPLAY ?= FALSE
|
||||||
|
USE_EXTERNAL_GLFW ?= FALSE
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
LDFLAGS += -lopengl32 -lgdi32 -lwinmm -static
|
LDFLAGS += -lopengl32 -lgdi32 -lwinmm -static
|
||||||
EXTERNAL_FILES := src/res/icon.res
|
EXTERNAL_FILES := src/res/icon.res
|
||||||
@ -20,7 +27,12 @@ else ifeq ($(shell uname),Darwin)
|
|||||||
-Wl,-pagezero_size,10000,-image_base,100000000
|
-Wl,-pagezero_size,10000,-image_base,100000000
|
||||||
EXTERNAL_FILES :=
|
EXTERNAL_FILES :=
|
||||||
else
|
else
|
||||||
LDFLAGS += -ldl -lX11 -lpthread
|
LDFLAGS += -ldl -lpthread
|
||||||
|
ifeq ($(PLATFORM),PLATFORM_DRM)
|
||||||
|
LDFLAGS += -ldrm -lGLESv2 -lEGL -lgbm
|
||||||
|
else
|
||||||
|
LDFLAGS += -lX11
|
||||||
|
endif
|
||||||
EXTERNAL_FILES :=
|
EXTERNAL_FILES :=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -30,10 +42,17 @@ all: raylua_s raylua_e luajit raylib
|
|||||||
$(CC) -c -o $@ $< $(CFLAGS)
|
$(CC) -c -o $@ $< $(CFLAGS)
|
||||||
|
|
||||||
luajit:
|
luajit:
|
||||||
$(MAKE) -C luajit amalg CC=$(CC) BUILDMODE=static MACOSX_DEPLOYMENT_TARGET=10.13
|
$(MAKE) -C luajit amalg \
|
||||||
|
CC=$(CC) BUILDMODE=static \
|
||||||
|
MACOSX_DEPLOYMENT_TARGET=10.13
|
||||||
|
|
||||||
raylib:
|
raylib:
|
||||||
$(MAKE) CC=$(CC) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" -C raylib/src
|
$(MAKE) -C raylib/src \
|
||||||
|
CC=$(CC) AR=$(AR) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
|
||||||
|
USE_WAYLAND_DISPLAY="$(USE_WAYLAND_DISPLAY)" \
|
||||||
|
USE_EXTERNAL_GLFW="$(USE_EXTERNAL_GLFW)" \
|
||||||
|
PLATFORM="$(PLATFORM)" GRAPHICS="$(GRAPHICS)"
|
||||||
|
|
||||||
|
|
||||||
raylua_s: src/raylua_s.o $(EXTERNAL_FILES) libraylua.a
|
raylua_s: src/raylua_s.o $(EXTERNAL_FILES) libraylua.a
|
||||||
$(CC) -o $@ $^ $(LDFLAGS) luajit/src/libluajit.a
|
$(CC) -o $@ $^ $(LDFLAGS) luajit/src/libluajit.a
|
||||||
@ -73,6 +92,7 @@ clean:
|
|||||||
src/lib/miniz.o
|
src/lib/miniz.o
|
||||||
$(MAKE) -C luajit clean
|
$(MAKE) -C luajit clean
|
||||||
$(MAKE) -C raylib/src clean
|
$(MAKE) -C raylib/src clean
|
||||||
|
rm -f raylib/libraylib.a
|
||||||
|
|
||||||
.PHONY: all src/autogen/bind.c src/autogen/boot.c raylua_s raylua_e luajit \
|
.PHONY: all src/autogen/bind.c src/autogen/boot.c raylua_s raylua_e luajit \
|
||||||
raylib clean
|
raylib clean
|
||||||
|
2
raylib
2
raylib
@ -1 +1 @@
|
|||||||
Subproject commit be03613d1b6f9b0051d78c790f97df069150c65f
|
Subproject commit 51e75be9d1ffeaf6d47d3670017cca36f4785a17
|
@ -14,22 +14,67 @@
|
|||||||
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
-- LoadImageEx removed function
|
|
||||||
rawset(rl, "LoadImageEx", function (pixels, width, height)
|
|
||||||
local image = rl.new "Image"
|
|
||||||
image.width = width
|
|
||||||
image.height = height
|
|
||||||
image.data = pixels
|
|
||||||
image.format = rl.UNCOMPRESSED_R8G8B8A8
|
|
||||||
return image
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- rlUnproject moved to Vector3Unproject
|
|
||||||
rawset(rl, "rlUnproject", rl.Vector3Unproject)
|
|
||||||
|
|
||||||
-- math metamethods
|
|
||||||
local new = ffi.new
|
local new = ffi.new
|
||||||
|
|
||||||
|
-- Load*() wrappers.
|
||||||
|
if raylua.loadfile then
|
||||||
|
local LoadImage = rl.LoadImage
|
||||||
|
function rl.LoadImage(path)
|
||||||
|
local f, err = raylua.loadfile(path)
|
||||||
|
|
||||||
|
if f then
|
||||||
|
local ext = path:gsub(".+%.", "")
|
||||||
|
|
||||||
|
return rl.LoadImageFromMemory(ext, f, #f)
|
||||||
|
else
|
||||||
|
print(("RAYLUA: %s"):format(err))
|
||||||
|
return LoadImage(path)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function rl.LoadTexture(path)
|
||||||
|
return rl.LoadTextureFromImage(rl.LoadImage(path))
|
||||||
|
end
|
||||||
|
|
||||||
|
local LoadFont, LoadFontEx = rl.LoadFont, rl.LoadFontEx
|
||||||
|
function rl.LoadFontEx(path, sz, chars, count)
|
||||||
|
local f, err = raylua.loadfile(path)
|
||||||
|
|
||||||
|
if f then
|
||||||
|
local ext = path:gsub(".+%.", "")
|
||||||
|
|
||||||
|
return rl.LoadFontFromMemory(ext, f, #f, sz, chars, count)
|
||||||
|
else
|
||||||
|
return LoadFontEx(sz, chars, count)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function rl.LoadFont(path)
|
||||||
|
-- HACK: Hardcoded values (FONT_TTF_DEFAULT_SIZE,
|
||||||
|
-- FONT_TTF_DEFAULT_NUMCHARS)
|
||||||
|
return rl.LoadFontEx(path, 32, nil, 95)
|
||||||
|
end
|
||||||
|
|
||||||
|
local LoadWave = rl.LoadWave
|
||||||
|
function rl.LoadWave(path)
|
||||||
|
local f, err = raylua.loadfile(path)
|
||||||
|
|
||||||
|
if f then
|
||||||
|
local ext = path:gsub(".+%.", "")
|
||||||
|
|
||||||
|
return rl.LoadWaveFromMemory(ext, f, #f)
|
||||||
|
else
|
||||||
|
print(("RAYLUA: %s"):format(err))
|
||||||
|
return LoadWave(path)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function rl.LoadSound(path)
|
||||||
|
return rl.LoadSoundFromWave(rl.LoadWave(path))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- math metamethods
|
||||||
ffi.metatype("Vector2", {
|
ffi.metatype("Vector2", {
|
||||||
__add = function (a, b)
|
__add = function (a, b)
|
||||||
if ffi.istype("Vector2", b) then
|
if ffi.istype("Vector2", b) then
|
||||||
|
120
src/raylib.lua
120
src/raylib.lua
@ -78,24 +78,26 @@ ffi.cdef [[
|
|||||||
int format;
|
int format;
|
||||||
} Image;
|
} Image;
|
||||||
|
|
||||||
typedef struct Texture2D {
|
typedef struct Texture {
|
||||||
unsigned int id;
|
unsigned int id;
|
||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
int mipmaps;
|
int mipmaps;
|
||||||
int format;
|
int format;
|
||||||
} Texture2D;
|
} Texture;
|
||||||
typedef Texture2D Texture;
|
typedef Texture Texture2D;
|
||||||
typedef Texture2D TextureCubemap;
|
typedef Texture TextureCubemap;
|
||||||
|
|
||||||
typedef struct RenderTexture2D {
|
typedef struct RenderTexture {
|
||||||
unsigned int id;
|
unsigned int id;
|
||||||
Texture2D texture;
|
Texture texture;
|
||||||
Texture2D depth;
|
Texture depth;
|
||||||
bool depthTexture;
|
} RenderTexture;
|
||||||
} RenderTexture2D;
|
|
||||||
|
typedef RenderTexture RenderTexture2D;
|
||||||
|
|
||||||
|
typedef enum { OPENGL_11 = 1, OPENGL_21, OPENGL_33, OPENGL_ES_20 } GlVersion;
|
||||||
|
|
||||||
typedef RenderTexture2D RenderTexture;
|
|
||||||
typedef struct NPatchInfo {
|
typedef struct NPatchInfo {
|
||||||
Rectangle sourceRec;
|
Rectangle sourceRec;
|
||||||
int left;
|
int left;
|
||||||
@ -116,6 +118,7 @@ ffi.cdef [[
|
|||||||
typedef struct Font {
|
typedef struct Font {
|
||||||
int baseSize;
|
int baseSize;
|
||||||
int charsCount;
|
int charsCount;
|
||||||
|
int charsPadding;
|
||||||
Texture2D texture;
|
Texture2D texture;
|
||||||
Rectangle *recs;
|
Rectangle *recs;
|
||||||
CharInfo *chars;
|
CharInfo *chars;
|
||||||
@ -188,9 +191,9 @@ ffi.cdef [[
|
|||||||
Matrix transform;
|
Matrix transform;
|
||||||
|
|
||||||
int meshCount;
|
int meshCount;
|
||||||
Mesh *meshes;
|
|
||||||
|
|
||||||
int materialCount;
|
int materialCount;
|
||||||
|
Mesh *meshes;
|
||||||
Material *materials;
|
Material *materials;
|
||||||
int *meshMaterial;
|
int *meshMaterial;
|
||||||
int boneCount;
|
int boneCount;
|
||||||
@ -200,9 +203,9 @@ ffi.cdef [[
|
|||||||
|
|
||||||
typedef struct ModelAnimation {
|
typedef struct ModelAnimation {
|
||||||
int boneCount;
|
int boneCount;
|
||||||
BoneInfo *bones;
|
|
||||||
|
|
||||||
int frameCount;
|
int frameCount;
|
||||||
|
BoneInfo *bones;
|
||||||
Transform **framePoses;
|
Transform **framePoses;
|
||||||
} ModelAnimation;
|
} ModelAnimation;
|
||||||
|
|
||||||
@ -233,26 +236,25 @@ ffi.cdef [[
|
|||||||
|
|
||||||
typedef struct rAudioBuffer rAudioBuffer;
|
typedef struct rAudioBuffer rAudioBuffer;
|
||||||
typedef struct AudioStream {
|
typedef struct AudioStream {
|
||||||
|
rAudioBuffer *buffer;
|
||||||
|
|
||||||
unsigned int sampleRate;
|
unsigned int sampleRate;
|
||||||
unsigned int sampleSize;
|
unsigned int sampleSize;
|
||||||
unsigned int channels;
|
unsigned int channels;
|
||||||
|
|
||||||
rAudioBuffer *buffer;
|
|
||||||
} AudioStream;
|
} AudioStream;
|
||||||
|
|
||||||
typedef struct Sound {
|
typedef struct Sound {
|
||||||
unsigned int sampleCount;
|
|
||||||
AudioStream stream;
|
AudioStream stream;
|
||||||
|
unsigned int sampleCount;
|
||||||
} Sound;
|
} Sound;
|
||||||
|
|
||||||
typedef struct Music {
|
typedef struct Music {
|
||||||
|
AudioStream stream;
|
||||||
|
unsigned int sampleCount;
|
||||||
|
bool looping;
|
||||||
|
|
||||||
int ctxType;
|
int ctxType;
|
||||||
void *ctxData;
|
void *ctxData;
|
||||||
|
|
||||||
bool looping;
|
|
||||||
unsigned int sampleCount;
|
|
||||||
|
|
||||||
AudioStream stream;
|
|
||||||
} Music;
|
} Music;
|
||||||
|
|
||||||
typedef struct VrDeviceInfo {
|
typedef struct VrDeviceInfo {
|
||||||
@ -269,15 +271,20 @@ ffi.cdef [[
|
|||||||
} VrDeviceInfo;
|
} VrDeviceInfo;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
FLAG_RESERVED = 1,
|
FLAG_VSYNC_HINT = 0x00000040,
|
||||||
FLAG_FULLSCREEN_MODE = 2,
|
FLAG_FULLSCREEN_MODE = 0x00000002,
|
||||||
FLAG_WINDOW_RESIZABLE = 4,
|
FLAG_WINDOW_RESIZABLE = 0x00000004,
|
||||||
FLAG_WINDOW_UNDECORATED = 8,
|
FLAG_WINDOW_UNDECORATED = 0x00000008,
|
||||||
FLAG_WINDOW_TRANSPARENT = 16,
|
FLAG_WINDOW_HIDDEN = 0x00000080,
|
||||||
FLAG_WINDOW_HIDDEN = 128,
|
FLAG_WINDOW_MINIMIZED = 0x00000200,
|
||||||
FLAG_WINDOW_ALWAYS_RUN = 256,
|
FLAG_WINDOW_MAXIMIZED = 0x00000400,
|
||||||
FLAG_MSAA_4X_HINT = 32,
|
FLAG_WINDOW_UNFOCUSED = 0x00000800,
|
||||||
FLAG_VSYNC_HINT = 64
|
FLAG_WINDOW_TOPMOST = 0x00001000,
|
||||||
|
FLAG_WINDOW_ALWAYS_RUN = 0x00000100,
|
||||||
|
FLAG_WINDOW_TRANSPARENT = 0x00000010,
|
||||||
|
FLAG_WINDOW_HIGHDPI = 0x00002000,
|
||||||
|
FLAG_MSAA_4X_HINT = 0x00000020,
|
||||||
|
FLAG_INTERLACED_HINT = 0x00010000
|
||||||
} ConfigFlag;
|
} ConfigFlag;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@ -412,6 +419,20 @@ ffi.cdef [[
|
|||||||
MOUSE_MIDDLE_BUTTON = 2
|
MOUSE_MIDDLE_BUTTON = 2
|
||||||
} MouseButton;
|
} MouseButton;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
MOUSE_CURSOR_DEFAULT = 0,
|
||||||
|
MOUSE_CURSOR_ARROW = 1,
|
||||||
|
MOUSE_CURSOR_IBEAM = 2,
|
||||||
|
MOUSE_CURSOR_CROSSHAIR = 3,
|
||||||
|
MOUSE_CURSOR_POINTING_HAND = 4,
|
||||||
|
MOUSE_CURSOR_RESIZE_EW = 5,
|
||||||
|
MOUSE_CURSOR_RESIZE_NS = 6,
|
||||||
|
MOUSE_CURSOR_RESIZE_NWSE = 7,
|
||||||
|
MOUSE_CURSOR_RESIZE_NESW = 8,
|
||||||
|
MOUSE_CURSOR_RESIZE_ALL = 9,
|
||||||
|
MOUSE_CURSOR_NOT_ALLOWED = 10
|
||||||
|
} MouseCursor;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GAMEPAD_PLAYER1 = 0,
|
GAMEPAD_PLAYER1 = 0,
|
||||||
GAMEPAD_PLAYER2 = 1,
|
GAMEPAD_PLAYER2 = 1,
|
||||||
@ -537,6 +558,13 @@ ffi.cdef [[
|
|||||||
FILTER_ANISOTROPIC_16X,
|
FILTER_ANISOTROPIC_16X,
|
||||||
} TextureFilterMode;
|
} TextureFilterMode;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
WRAP_REPEAT = 0,
|
||||||
|
WRAP_CLAMP,
|
||||||
|
WRAP_MIRROR_REPEAT,
|
||||||
|
WRAP_MIRROR_CLAMP
|
||||||
|
} TextureWrapMode;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
CUBEMAP_AUTO_DETECT = 0,
|
CUBEMAP_AUTO_DETECT = 0,
|
||||||
CUBEMAP_LINE_VERTICAL,
|
CUBEMAP_LINE_VERTICAL,
|
||||||
@ -546,13 +574,6 @@ ffi.cdef [[
|
|||||||
CUBEMAP_PANORAMA
|
CUBEMAP_PANORAMA
|
||||||
} CubemapLayoutType;
|
} CubemapLayoutType;
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
WRAP_REPEAT = 0,
|
|
||||||
WRAP_CLAMP,
|
|
||||||
WRAP_MIRROR_REPEAT,
|
|
||||||
WRAP_MIRROR_CLAMP
|
|
||||||
} TextureWrapMode;
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
FONT_DEFAULT = 0,
|
FONT_DEFAULT = 0,
|
||||||
FONT_BITMAP,
|
FONT_BITMAP,
|
||||||
@ -610,6 +631,33 @@ ffi.cdef [[
|
|||||||
typedef struct float16 { float v[16]; } float16;
|
typedef struct float16 { float v[16]; } float16;
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
-- rlgl cdef
|
||||||
|
ffi.cdef [[
|
||||||
|
typedef enum {
|
||||||
|
RL_ATTACHMENT_COLOR_CHANNEL0 = 0,
|
||||||
|
RL_ATTACHMENT_COLOR_CHANNEL1,
|
||||||
|
RL_ATTACHMENT_COLOR_CHANNEL2,
|
||||||
|
RL_ATTACHMENT_COLOR_CHANNEL3,
|
||||||
|
RL_ATTACHMENT_COLOR_CHANNEL4,
|
||||||
|
RL_ATTACHMENT_COLOR_CHANNEL5,
|
||||||
|
RL_ATTACHMENT_COLOR_CHANNEL6,
|
||||||
|
RL_ATTACHMENT_COLOR_CHANNEL7,
|
||||||
|
RL_ATTACHMENT_DEPTH = 100,
|
||||||
|
RL_ATTACHMENT_STENCIL = 200,
|
||||||
|
} FramebufferAttachType;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0,
|
||||||
|
RL_ATTACHMENT_CUBEMAP_NEGATIVE_X,
|
||||||
|
RL_ATTACHMENT_CUBEMAP_POSITIVE_Y,
|
||||||
|
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y,
|
||||||
|
RL_ATTACHMENT_CUBEMAP_POSITIVE_Z,
|
||||||
|
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z,
|
||||||
|
RL_ATTACHMENT_TEXTURE2D = 100,
|
||||||
|
RL_ATTACHMENT_RENDERBUFFER = 200,
|
||||||
|
} FramebufferTexType;
|
||||||
|
]]
|
||||||
|
|
||||||
-- Physac cdef
|
-- Physac cdef
|
||||||
ffi.cdef [[
|
ffi.cdef [[
|
||||||
typedef struct PhysicsBodyData *PhysicsBody;
|
typedef struct PhysicsBodyData *PhysicsBody;
|
||||||
|
@ -68,8 +68,10 @@ void raylua_boot(lua_State *L, lua_CFunction loadfile, lua_CFunction listfiles,
|
|||||||
|
|
||||||
lua_setglobal(L, "raylua");
|
lua_setglobal(L, "raylua");
|
||||||
|
|
||||||
if (luaL_dostring(L, raylua_boot_lua))
|
if (luaL_dostring(L, raylua_boot_lua)) {
|
||||||
fputs(luaL_checkstring(L, -1), stderr);
|
fputs(luaL_checkstring(L, -1), stderr);
|
||||||
|
fputc('\n', stderr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int luaopen_raylua(lua_State *L)
|
int luaopen_raylua(lua_State *L)
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
local load = loadstring
|
local load = loadstring
|
||||||
|
|
||||||
raylua.version = "v3.0f"
|
raylua.version = "v3.5-pre1"
|
||||||
|
|
||||||
function raylua.repl()
|
function raylua.repl()
|
||||||
print("> raylua " .. raylua.version .. " <")
|
print("> raylua " .. raylua.version .. " <")
|
||||||
@ -65,16 +65,37 @@ if raylua.loadfile then
|
|||||||
end
|
end
|
||||||
|
|
||||||
print "RAYLUA: Load main.lua from payload."
|
print "RAYLUA: Load main.lua from payload."
|
||||||
require "main"
|
|
||||||
|
local f, err = load(raylua.loadfile "main.lua", "main.lua")
|
||||||
|
if f then
|
||||||
|
local status, f_err = xpcall(f, debug.traceback)
|
||||||
|
|
||||||
|
if not status then
|
||||||
|
print(f_err)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
print(err)
|
||||||
|
end
|
||||||
|
|
||||||
if not raylua.isrepl then
|
if not raylua.isrepl then
|
||||||
-- Keep launching the repl even with `loadfile` defined.
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Keep launching the repl even with `loadfile` defined.
|
||||||
end
|
end
|
||||||
|
|
||||||
if arg and arg[1] then
|
if arg and arg[1] then
|
||||||
dofile(arg[1])
|
local f, err = loadfile(arg[1])
|
||||||
|
if f then
|
||||||
|
local status, f_err = xpcall(f, debug.traceback)
|
||||||
|
|
||||||
|
if not status then
|
||||||
|
print(f_err)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
print(err)
|
||||||
|
end
|
||||||
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ static int list_dir(lua_State *L)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
struct dirent *entry;
|
struct dirent *entry;
|
||||||
size_t count = 0;
|
size_t count = 1;
|
||||||
|
|
||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ if t == "directory" then
|
|||||||
|
|
||||||
local function add_dir(root, dir)
|
local function add_dir(root, dir)
|
||||||
for i,file in ipairs(list_dir(path_concat(root, dir))) do
|
for i,file in ipairs(list_dir(path_concat(root, dir))) do
|
||||||
if file ~= ".." then
|
if file ~= ".." and file ~= "." then
|
||||||
local partial_file_path, full_file_path
|
local partial_file_path, full_file_path
|
||||||
|
|
||||||
if dir then
|
if dir then
|
||||||
|
@ -88,60 +88,6 @@ int raylua_listfiles(lua_State *L)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned char *raylua_loadFileData(const char *path, unsigned int *out_size)
|
|
||||||
{
|
|
||||||
int index = mz_zip_reader_locate_file(&zip_file, path, NULL, 0);
|
|
||||||
if (index == -1) {
|
|
||||||
printf("RAYLUA: WARN: File not found in payload : '%s'", path);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
mz_zip_archive_file_stat stat;
|
|
||||||
if (!mz_zip_reader_file_stat(&zip_file, index, &stat)) {
|
|
||||||
printf("RAYLUA: WARN: Can't get file information of '%s' in payload.", path);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t size = stat.m_uncomp_size;
|
|
||||||
unsigned char *buffer = RL_MALLOC(size);
|
|
||||||
if (buffer == NULL) {
|
|
||||||
printf("RAYLUA: WARN: Can't allocate file buffer for '%s'.", path);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
mz_zip_reader_extract_to_mem(&zip_file, index, buffer, size, 0);
|
|
||||||
|
|
||||||
*out_size = size;
|
|
||||||
return buffer;
|
|
||||||
}
|
|
||||||
|
|
||||||
char *raylua_loadFileText(const char *path)
|
|
||||||
{
|
|
||||||
int index = mz_zip_reader_locate_file(&zip_file, path, NULL, 0);
|
|
||||||
if (index == -1) {
|
|
||||||
printf("RAYLUA: WARN: File not found in payload : '%s'", path);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
mz_zip_archive_file_stat stat;
|
|
||||||
if (!mz_zip_reader_file_stat(&zip_file, index, &stat)) {
|
|
||||||
printf("RAYLUA: WARN: Can't get file information of '%s' in payload.", path);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t size = stat.m_uncomp_size;
|
|
||||||
char *buffer = RL_MALLOC(size + 1);
|
|
||||||
if (buffer == NULL) {
|
|
||||||
printf("RAYLUA: WARN: Can't allocate file buffer for '%s'.", path);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
buffer[size] = '\0';
|
|
||||||
|
|
||||||
mz_zip_reader_extract_to_mem(&zip_file, index, buffer, size, 0);
|
|
||||||
return buffer;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool raylua_init_payload(FILE *self)
|
static bool raylua_init_payload(FILE *self)
|
||||||
{
|
{
|
||||||
mz_zip_zero_struct(&zip_file);
|
mz_zip_zero_struct(&zip_file);
|
||||||
@ -174,11 +120,6 @@ int main(int argc, const char **argv)
|
|||||||
|
|
||||||
lua_setglobal(L, "arg");
|
lua_setglobal(L, "arg");
|
||||||
|
|
||||||
SetFilesystemOverride((FilesystemOverride){
|
|
||||||
.loadFileData = &raylua_loadFileData,
|
|
||||||
.loadFileText = &raylua_loadFileText,
|
|
||||||
});
|
|
||||||
|
|
||||||
FILE *self = raylua_open_self(argv[0]);
|
FILE *self = raylua_open_self(argv[0]);
|
||||||
|
|
||||||
if (self == NULL) {
|
if (self == NULL) {
|
||||||
|
215
tools/api.h
215
tools/api.h
@ -2,18 +2,18 @@ void InitWindow(int width, int height, const char *title)
|
|||||||
bool WindowShouldClose(void)
|
bool WindowShouldClose(void)
|
||||||
void CloseWindow(void)
|
void CloseWindow(void)
|
||||||
bool IsWindowReady(void)
|
bool IsWindowReady(void)
|
||||||
|
bool IsWindowFullscreen(void)
|
||||||
|
bool IsWindowHidden(void)
|
||||||
bool IsWindowMinimized(void)
|
bool IsWindowMinimized(void)
|
||||||
bool IsWindowMaximized(void)
|
bool IsWindowMaximized(void)
|
||||||
bool IsWindowFocused(void)
|
bool IsWindowFocused(void)
|
||||||
bool IsWindowResized(void)
|
bool IsWindowResized(void)
|
||||||
bool IsWindowHidden(void)
|
bool IsWindowState(unsigned int flag)
|
||||||
bool IsWindowFullscreen(void)
|
void SetWindowState(unsigned int flags)
|
||||||
|
void ClearWindowState(unsigned int flags)
|
||||||
void ToggleFullscreen(void)
|
void ToggleFullscreen(void)
|
||||||
void UnhideWindow(void)
|
|
||||||
void HideWindow(void)
|
|
||||||
void DecorateWindow(void)
|
|
||||||
void UndecorateWindow(void)
|
|
||||||
void MaximizeWindow(void)
|
void MaximizeWindow(void)
|
||||||
|
void MinimizeWindow(void)
|
||||||
void RestoreWindow(void)
|
void RestoreWindow(void)
|
||||||
void SetWindowIcon(Image image)
|
void SetWindowIcon(Image image)
|
||||||
void SetWindowTitle(const char *title)
|
void SetWindowTitle(const char *title)
|
||||||
@ -25,6 +25,7 @@ void *GetWindowHandle(void)
|
|||||||
int GetScreenWidth(void)
|
int GetScreenWidth(void)
|
||||||
int GetScreenHeight(void)
|
int GetScreenHeight(void)
|
||||||
int GetMonitorCount(void)
|
int GetMonitorCount(void)
|
||||||
|
Vector2 GetMonitorPosition(int monitor)
|
||||||
int GetMonitorWidth(int monitor)
|
int GetMonitorWidth(int monitor)
|
||||||
int GetMonitorHeight(int monitor)
|
int GetMonitorHeight(int monitor)
|
||||||
int GetMonitorPhysicalWidth(int monitor)
|
int GetMonitorPhysicalWidth(int monitor)
|
||||||
@ -33,8 +34,8 @@ int GetMonitorRefreshRate(int monitor)
|
|||||||
Vector2 GetWindowPosition(void)
|
Vector2 GetWindowPosition(void)
|
||||||
Vector2 GetWindowScaleDPI(void)
|
Vector2 GetWindowScaleDPI(void)
|
||||||
const char *GetMonitorName(int monitor)
|
const char *GetMonitorName(int monitor)
|
||||||
const char *GetClipboardText(void)
|
|
||||||
void SetClipboardText(const char *text)
|
void SetClipboardText(const char *text)
|
||||||
|
const char *GetClipboardText(void)
|
||||||
void ShowCursor(void)
|
void ShowCursor(void)
|
||||||
void HideCursor(void)
|
void HideCursor(void)
|
||||||
bool IsCursorHidden(void)
|
bool IsCursorHidden(void)
|
||||||
@ -63,28 +64,25 @@ void SetTargetFPS(int fps)
|
|||||||
int GetFPS(void)
|
int GetFPS(void)
|
||||||
float GetFrameTime(void)
|
float GetFrameTime(void)
|
||||||
double GetTime(void)
|
double GetTime(void)
|
||||||
int ColorToInt(Color color)
|
|
||||||
Vector4 ColorNormalize(Color color)
|
|
||||||
Color ColorFromNormalized(Vector4 normalized)
|
|
||||||
Vector3 ColorToHSV(Color color)
|
|
||||||
Color ColorFromHSV(Vector3 hsv)
|
|
||||||
Color GetColor(int hexValue)
|
|
||||||
Color Fade(Color color, float alpha)
|
|
||||||
void SetConfigFlags(unsigned int flags)
|
void SetConfigFlags(unsigned int flags)
|
||||||
void SetTraceLogLevel(int logType)
|
void SetTraceLogLevel(int logType)
|
||||||
void SetTraceLogExit(int logType)
|
void SetTraceLogExit(int logType)
|
||||||
void SetTraceLogCallback(TraceLogCallback callback)
|
void SetTraceLogCallback(TraceLogCallback callback)
|
||||||
void TraceLog(int logType, const char *text, ...)
|
void TraceLog(int logType, const char *text, ...)
|
||||||
|
void *MemAlloc(int size)
|
||||||
|
void MemFree(void *ptr)
|
||||||
void TakeScreenshot(const char *fileName)
|
void TakeScreenshot(const char *fileName)
|
||||||
int GetRandomValue(int min, int max)
|
int GetRandomValue(int min, int max)
|
||||||
unsigned char *LoadFileData(const char *fileName, int *bytesRead)
|
uint8_t *LoadFileData(const char *fileName, unsigned int *bytesRead)
|
||||||
void SaveFileData(const char *fileName, void *data, int bytesToWrite)
|
void UnloadFileData(unsigned char *data)
|
||||||
|
bool SaveFileData(const char *fileName, void *data, unsigned int bytesToWrite)
|
||||||
char *LoadFileText(const char *fileName)
|
char *LoadFileText(const char *fileName)
|
||||||
void SaveFileText(const char *fileName, char *text)
|
void UnloadFileText(unsigned char *text)
|
||||||
|
bool SaveFileText(const char *fileName, char *text)
|
||||||
bool FileExists(const char *fileName)
|
bool FileExists(const char *fileName)
|
||||||
bool IsFileExtension(const char *fileName, const char *ext)
|
|
||||||
bool DirectoryExists(const char *dirPath)
|
bool DirectoryExists(const char *dirPath)
|
||||||
const char *GetExtension(const char *fileName)
|
bool IsFileExtension(const char *fileName, const char *ext)
|
||||||
|
const char *GetFileExtension(const char *fileName)
|
||||||
const char *GetFileName(const char *filePath)
|
const char *GetFileName(const char *filePath)
|
||||||
const char *GetFileNameWithoutExt(const char *filePath)
|
const char *GetFileNameWithoutExt(const char *filePath)
|
||||||
const char *GetDirectoryPath(const char *filePath)
|
const char *GetDirectoryPath(const char *filePath)
|
||||||
@ -97,10 +95,10 @@ bool IsFileDropped(void)
|
|||||||
char **GetDroppedFiles(int *count)
|
char **GetDroppedFiles(int *count)
|
||||||
void ClearDroppedFiles(void)
|
void ClearDroppedFiles(void)
|
||||||
long GetFileModTime(const char *fileName)
|
long GetFileModTime(const char *fileName)
|
||||||
unsigned char *CompressData(unsigned char *data, int dataLength, int *compDataLength)
|
uint8_t *CompressData(uint8_t *data, int dataLength, int *compDataLength)
|
||||||
unsigned char *DecompressData(unsigned char *compData, int compDataLength, int *dataLength)
|
uint8_t *DecompressData(uint8_t *compData, int compDataLength, int *dataLength)
|
||||||
void SaveStorageValue(int position, int value)
|
bool SaveStorageValue(unsigned int position, int value)
|
||||||
int LoadStorageValue(int position)
|
int LoadStorageValue(unsigned int position)
|
||||||
void OpenURL(const char *url)
|
void OpenURL(const char *url)
|
||||||
bool IsKeyPressed(int key)
|
bool IsKeyPressed(int key)
|
||||||
bool IsKeyDown(int key)
|
bool IsKeyDown(int key)
|
||||||
@ -108,6 +106,7 @@ bool IsKeyReleased(int key)
|
|||||||
bool IsKeyUp(int key)
|
bool IsKeyUp(int key)
|
||||||
void SetExitKey(int key)
|
void SetExitKey(int key)
|
||||||
int GetKeyPressed(void)
|
int GetKeyPressed(void)
|
||||||
|
int GetCharPressed(void)
|
||||||
bool IsGamepadAvailable(int gamepad)
|
bool IsGamepadAvailable(int gamepad)
|
||||||
bool IsGamepadName(int gamepad, const char *name)
|
bool IsGamepadName(int gamepad, const char *name)
|
||||||
const char *GetGamepadName(int gamepad)
|
const char *GetGamepadName(int gamepad)
|
||||||
@ -128,7 +127,9 @@ Vector2 GetMousePosition(void)
|
|||||||
void SetMousePosition(int x, int y)
|
void SetMousePosition(int x, int y)
|
||||||
void SetMouseOffset(int offsetX, int offsetY)
|
void SetMouseOffset(int offsetX, int offsetY)
|
||||||
void SetMouseScale(float scaleX, float scaleY)
|
void SetMouseScale(float scaleX, float scaleY)
|
||||||
int GetMouseWheelMove(void)
|
float GetMouseWheelMove(void)
|
||||||
|
int GetMouseCursor(void)
|
||||||
|
void SetMouseCursor(int cursor)
|
||||||
int GetTouchX(void)
|
int GetTouchX(void)
|
||||||
int GetTouchY(void)
|
int GetTouchY(void)
|
||||||
Vector2 GetTouchPosition(int index)
|
Vector2 GetTouchPosition(int index)
|
||||||
@ -143,17 +144,17 @@ Vector2 GetGesturePinchVector(void)
|
|||||||
float GetGesturePinchAngle(void)
|
float GetGesturePinchAngle(void)
|
||||||
void SetCameraMode(Camera camera, int mode)
|
void SetCameraMode(Camera camera, int mode)
|
||||||
void UpdateCamera(Camera *camera)
|
void UpdateCamera(Camera *camera)
|
||||||
void SetCameraPanControl(int panKey)
|
void SetCameraPanControl(int keyPan)
|
||||||
void SetCameraAltControl(int altKey)
|
void SetCameraAltControl(int keyAlt)
|
||||||
void SetCameraSmoothZoomControl(int szKey)
|
void SetCameraSmoothZoomControl(int keySmoothZoom)
|
||||||
void SetCameraMoveControls(int frontKey, int backKey, int rightKey, int leftKey, int upKey, int downKey)
|
void SetCameraMoveControls(int keyFront, int keyBack, int keyRight, int keyLeft, int keyUp, int keyDown)
|
||||||
void DrawPixel(int posX, int posY, Color color)
|
void DrawPixel(int posX, int posY, Color color)
|
||||||
void DrawPixelV(Vector2 position, Color color)
|
void DrawPixelV(Vector2 position, Color color)
|
||||||
void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color)
|
void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color)
|
||||||
void DrawLineV(Vector2 startPos, Vector2 endPos, Color color)
|
void DrawLineV(Vector2 startPos, Vector2 endPos, Color color)
|
||||||
void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color)
|
void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color)
|
||||||
void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color)
|
void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color)
|
||||||
void DrawLineStrip(Vector2 *points, int numPoints, Color color)
|
void DrawLineStrip(Vector2 *points, int pointsCount, Color color)
|
||||||
void DrawCircle(int centerX, int centerY, float radius, Color color)
|
void DrawCircle(int centerX, int centerY, float radius, Color color)
|
||||||
void DrawCircleSector(Vector2 center, float radius, int startAngle, int endAngle, int segments, Color color)
|
void DrawCircleSector(Vector2 center, float radius, int startAngle, int endAngle, int segments, Color color)
|
||||||
void DrawCircleSectorLines(Vector2 center, float radius, int startAngle, int endAngle, int segments, Color color)
|
void DrawCircleSectorLines(Vector2 center, float radius, int startAngle, int endAngle, int segments, Color color)
|
||||||
@ -177,7 +178,7 @@ void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color co
|
|||||||
void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, int lineThick, Color color)
|
void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, int lineThick, Color color)
|
||||||
void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color)
|
void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color)
|
||||||
void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color)
|
void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color)
|
||||||
void DrawTriangleFan(Vector2 *points, int numPoints, Color color)
|
void DrawTriangleFan(Vector2 *points, int pointsCount, Color color)
|
||||||
void DrawTriangleStrip(Vector2 *points, int pointsCount, Color color)
|
void DrawTriangleStrip(Vector2 *points, int pointsCount, Color color)
|
||||||
void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color)
|
void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color)
|
||||||
void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color)
|
void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color)
|
||||||
@ -191,54 +192,34 @@ bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2
|
|||||||
Image LoadImage(const char *fileName)
|
Image LoadImage(const char *fileName)
|
||||||
Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize)
|
Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize)
|
||||||
Image LoadImageAnim(const char *fileName, int *frames)
|
Image LoadImageAnim(const char *fileName, int *frames)
|
||||||
void ExportImage(Image image, const char *fileName)
|
Image LoadImageFromMemory(const char *fileType, const uint8_t *fileData, int dataSize)
|
||||||
void ExportImageAsCode(Image image, const char *fileName)
|
|
||||||
Texture2D LoadTexture(const char *fileName)
|
|
||||||
Texture2D LoadTextureFromImage(Image image)
|
|
||||||
TextureCubemap LoadTextureCubemap(Image image, int layoutType)
|
|
||||||
RenderTexture2D LoadRenderTexture(int width, int height)
|
|
||||||
void UnloadImage(Image image)
|
void UnloadImage(Image image)
|
||||||
void UnloadTexture(Texture2D texture)
|
bool ExportImage(Image image, const char *fileName)
|
||||||
void UnloadRenderTexture(RenderTexture2D target)
|
bool ExportImageAsCode(Image image, const char *fileName)
|
||||||
Color *GetImageData(Image image)
|
Image GenImageColor(int width, int height, Color color)
|
||||||
Vector4 *GetImageDataNormalized(Image image)
|
Image GenImageGradientV(int width, int height, Color top, Color bottom)
|
||||||
Rectangle GetImageAlphaBorder(Image image, float threshold)
|
Image GenImageGradientH(int width, int height, Color left, Color right)
|
||||||
int GetPixelDataSize(int width, int height, int format)
|
Image GenImageGradientRadial(int width, int height, float density, Color inner, Color outer)
|
||||||
Image GetTextureData(Texture2D texture)
|
Image GenImageChecked(int width, int height, int checksX, int checksY, Color col1, Color col2)
|
||||||
Image GetScreenData(void)
|
Image GenImageWhiteNoise(int width, int height, float factor)
|
||||||
void UpdateTexture(Texture2D texture, const void *pixels)
|
Image GenImagePerlinNoise(int width, int height, int offsetX, int offsetY, float scale)
|
||||||
void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels)
|
Image GenImageCellular(int width, int height, int tileSize)
|
||||||
Image ImageCopy(Image image)
|
Image ImageCopy(Image image)
|
||||||
Image ImageFromImage(Image image, Rectangle rec)
|
Image ImageFromImage(Image image, Rectangle rec)
|
||||||
void ImageToPOT(Image *image, Color fillColor)
|
|
||||||
void ImageFormat(Image *image, int newFormat)
|
|
||||||
void ImageAlphaMask(Image *image, Image alphaMask)
|
|
||||||
void ImageAlphaClear(Image *image, Color color, float threshold)
|
|
||||||
void ImageAlphaCrop(Image *image, float threshold)
|
|
||||||
void ImageAlphaPremultiply(Image *image)
|
|
||||||
void ImageCrop(Image *image, Rectangle crop)
|
|
||||||
void ImageResize(Image *image, int newWidth, int newHeight)
|
|
||||||
void ImageResizeNN(Image *image, int newWidth,int newHeight)
|
|
||||||
void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color color)
|
|
||||||
void ImageMipmaps(Image *image)
|
|
||||||
void ImageDither(Image *image, int rBpp, int gBpp, int bBpp, int aBpp)
|
|
||||||
Color *GetImagePalette(Image image, int maxPaletteSize, int *extractCount)
|
|
||||||
Image ImageText(const char *text, int fontSize, Color color)
|
Image ImageText(const char *text, int fontSize, Color color)
|
||||||
Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint)
|
Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint)
|
||||||
void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint)
|
void ImageFormat(Image *image, int newFormat)
|
||||||
void ImageDrawRectangle(Image *dst, int posX, int posY, int width, int height, Color color)
|
void ImageToPOT(Image *image, Color fill)
|
||||||
void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color)
|
void ImageCrop(Image *image, Rectangle crop)
|
||||||
void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color)
|
void ImageAlphaCrop(Image *image, float threshold)
|
||||||
void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color color)
|
void ImageAlphaClear(Image *image, Color color, float threshold)
|
||||||
void ImageClearBackground(Image *dst, Color color)
|
void ImageAlphaMask(Image *image, Image alphaMask)
|
||||||
void ImageDrawPixel(Image *dst, int posX, int posY, Color color)
|
void ImageAlphaPremultiply(Image *image)
|
||||||
void ImageDrawPixelV(Image *dst, Vector2 position, Color color)
|
void ImageResize(Image *image, int newWidth, int newHeight)
|
||||||
void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color)
|
void ImageResizeNN(Image *image, int newWidth,int newHeight)
|
||||||
void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color)
|
void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color fill)
|
||||||
void ImageDrawLine(Image *dst, int startPosX, int startPosY, int endPosX, int endPosY, Color color)
|
void ImageMipmaps(Image *image)
|
||||||
void ImageDrawLineV(Image *dst, Vector2 start, Vector2 end, Color color)
|
void ImageDither(Image *image, int rBpp, int gBpp, int bBpp, int aBpp)
|
||||||
void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color)
|
|
||||||
void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint)
|
|
||||||
void ImageFlipVertical(Image *image)
|
void ImageFlipVertical(Image *image)
|
||||||
void ImageFlipHorizontal(Image *image)
|
void ImageFlipHorizontal(Image *image)
|
||||||
void ImageRotateCW(Image *image)
|
void ImageRotateCW(Image *image)
|
||||||
@ -249,37 +230,73 @@ void ImageColorGrayscale(Image *image)
|
|||||||
void ImageColorContrast(Image *image, float contrast)
|
void ImageColorContrast(Image *image, float contrast)
|
||||||
void ImageColorBrightness(Image *image, int brightness)
|
void ImageColorBrightness(Image *image, int brightness)
|
||||||
void ImageColorReplace(Image *image, Color color, Color replace)
|
void ImageColorReplace(Image *image, Color color, Color replace)
|
||||||
Image GenImageColor(int width, int height, Color color)
|
Color *LoadImageColors(Image image)
|
||||||
Image GenImageGradientV(int width, int height, Color top, Color bottom)
|
Color *LoadImagePalette(Image image, int maxPaletteSize, int *colorsCount)
|
||||||
Image GenImageGradientH(int width, int height, Color left, Color right)
|
void UnloadImageColors(Color *colors)
|
||||||
Image GenImageGradientRadial(int width, int height, float density, Color inner, Color outer)
|
void UnloadImagePalette(Color *colors)
|
||||||
Image GenImageChecked(int width, int height, int checksX, int checksY, Color col1, Color col2)
|
Rectangle GetImageAlphaBorder(Image image, float threshold)
|
||||||
Image GenImageWhiteNoise(int width, int height, float factor)
|
void ImageClearBackground(Image *dst, Color color)
|
||||||
Image GenImagePerlinNoise(int width, int height, int offsetX, int offsetY, float scale)
|
void ImageDrawPixel(Image *dst, int posX, int posY, Color color)
|
||||||
Image GenImageCellular(int width, int height, int tileSize)
|
void ImageDrawPixelV(Image *dst, Vector2 position, Color color)
|
||||||
|
void ImageDrawLine(Image *dst, int startPosX, int startPosY, int endPosX, int endPosY, Color color)
|
||||||
|
void ImageDrawLineV(Image *dst, Vector2 start, Vector2 end, Color color)
|
||||||
|
void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color)
|
||||||
|
void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color)
|
||||||
|
void ImageDrawRectangle(Image *dst, int posX, int posY, int width, int height, Color color)
|
||||||
|
void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color)
|
||||||
|
void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color)
|
||||||
|
void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color color)
|
||||||
|
void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint)
|
||||||
|
void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color)
|
||||||
|
void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint)
|
||||||
|
Texture2D LoadTexture(const char *fileName)
|
||||||
|
Texture2D LoadTextureFromImage(Image image)
|
||||||
|
TextureCubemap LoadTextureCubemap(Image image, int layoutType)
|
||||||
|
RenderTexture2D LoadRenderTexture(int width, int height)
|
||||||
|
void UnloadTexture(Texture2D texture)
|
||||||
|
void UnloadRenderTexture(RenderTexture2D target)
|
||||||
|
void UpdateTexture(Texture2D texture, const void *pixels)
|
||||||
|
void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels)
|
||||||
|
Image GetTextureData(Texture2D texture)
|
||||||
|
Image GetScreenData(void)
|
||||||
void GenTextureMipmaps(Texture2D *texture)
|
void GenTextureMipmaps(Texture2D *texture)
|
||||||
void SetTextureFilter(Texture2D texture, int filterMode)
|
void SetTextureFilter(Texture2D texture, int filterMode)
|
||||||
void SetTextureWrap(Texture2D texture, int wrapMode)
|
void SetTextureWrap(Texture2D texture, int wrapMode)
|
||||||
void DrawTexture(Texture2D texture, int posX, int posY, Color tint)
|
void DrawTexture(Texture2D texture, int posX, int posY, Color tint)
|
||||||
void DrawTextureV(Texture2D texture, Vector2 position, Color tint)
|
void DrawTextureV(Texture2D texture, Vector2 position, Color tint)
|
||||||
void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint)
|
void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint)
|
||||||
void DrawTextureRec(Texture2D texture, Rectangle sourceRec, Vector2 position, Color tint)
|
void DrawTextureRec(Texture2D texture, Rectangle source, Vector2 position, Color tint)
|
||||||
void DrawTextureQuad(Texture2D texture, Vector2 tiling, Vector2 offset, Rectangle quad, Color tint)
|
void DrawTextureQuad(Texture2D texture, Vector2 tiling, Vector2 offset, Rectangle quad, Color tint)
|
||||||
void DrawTexturePro(Texture2D texture, Rectangle sourceRec, Rectangle destRec, Vector2 origin, float rotation, Color tint)
|
void DrawTextureTiled(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, float scale, Color tint)
|
||||||
void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle destRec, Vector2 origin, float rotation, Color tint)
|
void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint)
|
||||||
|
void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint)
|
||||||
|
Color Fade(Color color, float alpha)
|
||||||
|
int ColorToInt(Color color)
|
||||||
|
Vector4 ColorNormalize(Color color)
|
||||||
|
Color ColorFromNormalized(Vector4 normalized)
|
||||||
|
Vector3 ColorToHSV(Color color)
|
||||||
|
Color ColorFromHSV(float hue, float saturation, float value)
|
||||||
|
Color ColorAlpha(Color color, float alpha)
|
||||||
|
Color ColorAlphaBlend(Color dst, Color src, Color tint)
|
||||||
|
Color GetColor(int hexValue)
|
||||||
|
Color GetPixelColor(void *srcPtr, int format)
|
||||||
|
void SetPixelColor(void *dstPtr, Color color, int format)
|
||||||
|
int GetPixelDataSize(int width, int height, int format)
|
||||||
Font GetFontDefault(void)
|
Font GetFontDefault(void)
|
||||||
Font LoadFont(const char *fileName)
|
Font LoadFont(const char *fileName)
|
||||||
Font LoadFontEx(const char *fileName, int fontSize, int *fontChars, int charsCount)
|
Font LoadFontEx(const char *fileName, int fontSize, int *fontChars, int charsCount)
|
||||||
Font LoadFontFromImage(Image image, Color key, int firstChar)
|
Font LoadFontFromImage(Image image, Color key, int firstChar)
|
||||||
CharInfo *LoadFontData(const char *fileName, int fontSize, int *fontChars, int charsCount, int type)
|
Font LoadFontFromMemory(const char *fileType, const uint8_t *fileData, int dataSize, int fontSize, int *fontChars, int charsCount)
|
||||||
|
CharInfo *LoadFontData(const uint8_t *fileData, int dataSize, int fontSize, int *fontChars, int charsCount, int type)
|
||||||
Image GenImageFontAtlas(const CharInfo *chars, Rectangle **recs, int charsCount, int fontSize, int padding, int packMethod)
|
Image GenImageFontAtlas(const CharInfo *chars, Rectangle **recs, int charsCount, int fontSize, int padding, int packMethod)
|
||||||
|
void UnloadFontData(CharInfo *chars, int charsCount)
|
||||||
void UnloadFont(Font font)
|
void UnloadFont(Font font)
|
||||||
void DrawFPS(int posX, int posY)
|
void DrawFPS(int posX, int posY)
|
||||||
void DrawText(const char *text, int posX, int posY, int fontSize, Color color)
|
void DrawText(const char *text, int posX, int posY, int fontSize, Color color)
|
||||||
void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint)
|
void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint)
|
||||||
void DrawTextRec(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint)
|
void DrawTextRec(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint)
|
||||||
void DrawTextRecEx(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint)
|
void DrawTextRecEx(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint)
|
||||||
void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float scale, Color tint)
|
void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float fontSize, Color tint)
|
||||||
int MeasureText(const char *text, int fontSize)
|
int MeasureText(const char *text, int fontSize)
|
||||||
Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing)
|
Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing)
|
||||||
int GetGlyphIndex(Font font, int codepoint)
|
int GetGlyphIndex(Font font, int codepoint)
|
||||||
@ -306,6 +323,8 @@ const char *CodepointToUtf8(int codepoint, int *byteLength)
|
|||||||
void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color)
|
void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color)
|
||||||
void DrawPoint3D(Vector3 position, Color color)
|
void DrawPoint3D(Vector3 position, Color color)
|
||||||
void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color)
|
void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color)
|
||||||
|
void DrawTriangle3D(Vector3 v1, Vector3 v2, Vector3 v3, Color color)
|
||||||
|
void DrawTriangleStrip3D(Vector3 *points, int pointsCount, Color color)
|
||||||
void DrawCube(Vector3 position, float width, float height, float length, Color color)
|
void DrawCube(Vector3 position, float width, float height, float length, Color color)
|
||||||
void DrawCubeV(Vector3 position, Vector3 size, Color color)
|
void DrawCubeV(Vector3 position, Vector3 size, Color color)
|
||||||
void DrawCubeWires(Vector3 position, float width, float height, float length, Color color)
|
void DrawCubeWires(Vector3 position, float width, float height, float length, Color color)
|
||||||
@ -323,8 +342,9 @@ void DrawGizmo(Vector3 position)
|
|||||||
Model LoadModel(const char *fileName)
|
Model LoadModel(const char *fileName)
|
||||||
Model LoadModelFromMesh(Mesh mesh)
|
Model LoadModelFromMesh(Mesh mesh)
|
||||||
void UnloadModel(Model model)
|
void UnloadModel(Model model)
|
||||||
|
void UnloadModelKeepMeshes(Model model)
|
||||||
Mesh *LoadMeshes(const char *fileName, int *meshCount)
|
Mesh *LoadMeshes(const char *fileName, int *meshCount)
|
||||||
void ExportMesh(Mesh mesh, const char *fileName)
|
bool ExportMesh(Mesh mesh, const char *fileName)
|
||||||
void UnloadMesh(Mesh mesh)
|
void UnloadMesh(Mesh mesh)
|
||||||
Material *LoadMaterials(const char *fileName, int *materialCount)
|
Material *LoadMaterials(const char *fileName, int *materialCount)
|
||||||
Material LoadMaterialDefault(void)
|
Material LoadMaterialDefault(void)
|
||||||
@ -355,12 +375,14 @@ void DrawModelWires(Model model, Vector3 position, float scale, Color tint)
|
|||||||
void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint)
|
void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint)
|
||||||
void DrawBoundingBox(BoundingBox box, Color color)
|
void DrawBoundingBox(BoundingBox box, Color color)
|
||||||
void DrawBillboard(Camera camera, Texture2D texture, Vector3 center, float size, Color tint)
|
void DrawBillboard(Camera camera, Texture2D texture, Vector3 center, float size, Color tint)
|
||||||
void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle sourceRec, Vector3 center, float size, Color tint)
|
void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 center, float size, Color tint)
|
||||||
bool CheckCollisionSpheres(Vector3 centerA, float radiusA, Vector3 centerB, float radiusB)
|
bool CheckCollisionSpheres(Vector3 center1, float radius1, Vector3 center2, float radius2)
|
||||||
bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2)
|
bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2)
|
||||||
bool CheckCollisionBoxSphere(BoundingBox box, Vector3 center, float radius)
|
bool CheckCollisionBoxSphere(BoundingBox box, Vector3 center, float radius)
|
||||||
|
bool CheckCollisionRaySphere(Ray ray, Vector3 center, float radius)
|
||||||
bool CheckCollisionRaySphereEx(Ray ray, Vector3 center, float radius, Vector3 *collisionPoint)
|
bool CheckCollisionRaySphereEx(Ray ray, Vector3 center, float radius, Vector3 *collisionPoint)
|
||||||
bool CheckCollisionRayBox(Ray ray, BoundingBox box)
|
bool CheckCollisionRayBox(Ray ray, BoundingBox box)
|
||||||
|
RayHitInfo GetCollisionRayMesh(Ray ray, Mesh mesh, Matrix transform)
|
||||||
RayHitInfo GetCollisionRayModel(Ray ray, Model model)
|
RayHitInfo GetCollisionRayModel(Ray ray, Model model)
|
||||||
RayHitInfo GetCollisionRayTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3)
|
RayHitInfo GetCollisionRayTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3)
|
||||||
RayHitInfo GetCollisionRayGround(Ray ray, float groundHeight)
|
RayHitInfo GetCollisionRayGround(Ray ray, float groundHeight)
|
||||||
@ -373,6 +395,7 @@ Texture2D GetShapesTexture(void)
|
|||||||
Rectangle GetShapesTextureRec(void)
|
Rectangle GetShapesTextureRec(void)
|
||||||
void SetShapesTexture(Texture2D texture, Rectangle source)
|
void SetShapesTexture(Texture2D texture, Rectangle source)
|
||||||
int GetShaderLocation(Shader shader, const char *uniformName)
|
int GetShaderLocation(Shader shader, const char *uniformName)
|
||||||
|
int GetShaderLocationAttrib(Shader shader, const char *attribName)
|
||||||
void SetShaderValue(Shader shader, int uniformLoc, const void *value, int uniformType)
|
void SetShaderValue(Shader shader, int uniformLoc, const void *value, int uniformType)
|
||||||
void SetShaderValueV(Shader shader, int uniformLoc, const void *value, int uniformType, int count)
|
void SetShaderValueV(Shader shader, int uniformLoc, const void *value, int uniformType, int count)
|
||||||
void SetShaderValueMatrix(Shader shader, int uniformLoc, Matrix mat)
|
void SetShaderValueMatrix(Shader shader, int uniformLoc, Matrix mat)
|
||||||
@ -381,9 +404,9 @@ void SetMatrixProjection(Matrix proj)
|
|||||||
void SetMatrixModelview(Matrix view)
|
void SetMatrixModelview(Matrix view)
|
||||||
Matrix GetMatrixModelview(void)
|
Matrix GetMatrixModelview(void)
|
||||||
Matrix GetMatrixProjection(void)
|
Matrix GetMatrixProjection(void)
|
||||||
Texture2D GenTextureCubemap(Shader shader, Texture2D map, int size)
|
TextureCubemap GenTextureCubemap(Shader shader, Texture2D panorama, int size, int format)
|
||||||
Texture2D GenTextureIrradiance(Shader shader, Texture2D cubemap, int size)
|
TextureCubemap GenTextureIrradiance(Shader shader, TextureCubemap cubemap, int size)
|
||||||
Texture2D GenTexturePrefilter(Shader shader, Texture2D cubemap, int size)
|
TextureCubemap GenTexturePrefilter(Shader shader, TextureCubemap cubemap, int size)
|
||||||
Texture2D GenTextureBRDF(Shader shader, int size)
|
Texture2D GenTextureBRDF(Shader shader, int size)
|
||||||
void BeginShaderMode(Shader shader)
|
void BeginShaderMode(Shader shader)
|
||||||
void EndShaderMode(void)
|
void EndShaderMode(void)
|
||||||
@ -402,13 +425,14 @@ void CloseAudioDevice(void)
|
|||||||
bool IsAudioDeviceReady(void)
|
bool IsAudioDeviceReady(void)
|
||||||
void SetMasterVolume(float volume)
|
void SetMasterVolume(float volume)
|
||||||
Wave LoadWave(const char *fileName)
|
Wave LoadWave(const char *fileName)
|
||||||
|
Wave LoadWaveFromMemory(const char *fileType, const uint8_t *fileData, int dataSize)
|
||||||
Sound LoadSound(const char *fileName)
|
Sound LoadSound(const char *fileName)
|
||||||
Sound LoadSoundFromWave(Wave wave)
|
Sound LoadSoundFromWave(Wave wave)
|
||||||
void UpdateSound(Sound sound, const void *data, int samplesCount)
|
void UpdateSound(Sound sound, const void *data, int samplesCount)
|
||||||
void UnloadWave(Wave wave)
|
void UnloadWave(Wave wave)
|
||||||
void UnloadSound(Sound sound)
|
void UnloadSound(Sound sound)
|
||||||
void ExportWave(Wave wave, const char *fileName)
|
bool ExportWave(Wave wave, const char *fileName)
|
||||||
void ExportWaveAsCode(Wave wave, const char *fileName)
|
bool ExportWaveAsCode(Wave wave, const char *fileName)
|
||||||
void PlaySound(Sound sound)
|
void PlaySound(Sound sound)
|
||||||
void StopSound(Sound sound)
|
void StopSound(Sound sound)
|
||||||
void PauseSound(Sound sound)
|
void PauseSound(Sound sound)
|
||||||
@ -422,7 +446,8 @@ void SetSoundPitch(Sound sound, float pitch)
|
|||||||
void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels)
|
void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels)
|
||||||
Wave WaveCopy(Wave wave)
|
Wave WaveCopy(Wave wave)
|
||||||
void WaveCrop(Wave *wave, int initSample, int finalSample)
|
void WaveCrop(Wave *wave, int initSample, int finalSample)
|
||||||
float *GetWaveData(Wave wave)
|
float *LoadWaveSamples(Wave wave)
|
||||||
|
void UnloadWaveSamples(float *samples)
|
||||||
Music LoadMusicStream(const char *fileName)
|
Music LoadMusicStream(const char *fileName)
|
||||||
void UnloadMusicStream(Music music)
|
void UnloadMusicStream(Music music)
|
||||||
void PlayMusicStream(Music music)
|
void PlayMusicStream(Music music)
|
||||||
|
@ -52,7 +52,8 @@ for _,modname in ipairs(modules) do
|
|||||||
|
|
||||||
line = line:gsub("(%W)([%l%d][%w_]*)", function (before, part)
|
line = line:gsub("(%W)([%l%d][%w_]*)", function (before, part)
|
||||||
for i,keyword in ipairs(keywords) do
|
for i,keyword in ipairs(keywords) do
|
||||||
if part == keyword then
|
if part == keyword
|
||||||
|
or part == "t" then -- uintX_t workaround
|
||||||
return before .. part
|
return before .. part
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -9,6 +9,7 @@ Vector2 Vector2AddValue(Vector2 v, float add)
|
|||||||
Vector2 Vector2Subtract(Vector2 v1, Vector2 v2)
|
Vector2 Vector2Subtract(Vector2 v1, Vector2 v2)
|
||||||
Vector2 Vector2SubtractValue(Vector2 v, float sub)
|
Vector2 Vector2SubtractValue(Vector2 v, float sub)
|
||||||
float Vector2Length(Vector2 v)
|
float Vector2Length(Vector2 v)
|
||||||
|
float Vector2LengthSqr(Vector2 v)
|
||||||
float Vector2DotProduct(Vector2 v1, Vector2 v2)
|
float Vector2DotProduct(Vector2 v1, Vector2 v2)
|
||||||
float Vector2Distance(Vector2 v1, Vector2 v2)
|
float Vector2Distance(Vector2 v1, Vector2 v2)
|
||||||
float Vector2Angle(Vector2 v1, Vector2 v2)
|
float Vector2Angle(Vector2 v1, Vector2 v2)
|
||||||
@ -18,6 +19,7 @@ Vector2 Vector2Negate(Vector2 v)
|
|||||||
Vector2 Vector2Divide(Vector2 v1, Vector2 v2)
|
Vector2 Vector2Divide(Vector2 v1, Vector2 v2)
|
||||||
Vector2 Vector2Normalize(Vector2 v)
|
Vector2 Vector2Normalize(Vector2 v)
|
||||||
Vector2 Vector2Lerp(Vector2 v1, Vector2 v2, float amount)
|
Vector2 Vector2Lerp(Vector2 v1, Vector2 v2, float amount)
|
||||||
|
Vector2 Vector2Reflect(Vector2 v, Vector2 normal)
|
||||||
Vector2 Vector2Rotate(Vector2 v, float degs)
|
Vector2 Vector2Rotate(Vector2 v, float degs)
|
||||||
Vector2 Vector2MoveTowards(Vector2 v, Vector2 target, float maxDistance)
|
Vector2 Vector2MoveTowards(Vector2 v, Vector2 target, float maxDistance)
|
||||||
Vector3 Vector3Zero(void)
|
Vector3 Vector3Zero(void)
|
||||||
@ -31,6 +33,7 @@ Vector3 Vector3Multiply(Vector3 v1, Vector3 v2)
|
|||||||
Vector3 Vector3CrossProduct(Vector3 v1, Vector3 v2)
|
Vector3 Vector3CrossProduct(Vector3 v1, Vector3 v2)
|
||||||
Vector3 Vector3Perpendicular(Vector3 v)
|
Vector3 Vector3Perpendicular(Vector3 v)
|
||||||
float Vector3Length(const Vector3 v)
|
float Vector3Length(const Vector3 v)
|
||||||
|
float Vector3LengthSqr(const Vector3 v)
|
||||||
float Vector3DotProduct(Vector3 v1, Vector3 v2)
|
float Vector3DotProduct(Vector3 v1, Vector3 v2)
|
||||||
float Vector3Distance(Vector3 v1, Vector3 v2)
|
float Vector3Distance(Vector3 v1, Vector3 v2)
|
||||||
Vector3 Vector3Negate(Vector3 v)
|
Vector3 Vector3Negate(Vector3 v)
|
||||||
@ -53,14 +56,15 @@ Matrix MatrixNormalize(Matrix mat)
|
|||||||
Matrix MatrixIdentity(void)
|
Matrix MatrixIdentity(void)
|
||||||
Matrix MatrixAdd(Matrix left, Matrix right)
|
Matrix MatrixAdd(Matrix left, Matrix right)
|
||||||
Matrix MatrixSubtract(Matrix left, Matrix right)
|
Matrix MatrixSubtract(Matrix left, Matrix right)
|
||||||
|
Matrix MatrixMultiply(Matrix left, Matrix right)
|
||||||
Matrix MatrixTranslate(float x, float y, float z)
|
Matrix MatrixTranslate(float x, float y, float z)
|
||||||
Matrix MatrixRotate(Vector3 axis, float angle)
|
Matrix MatrixRotate(Vector3 axis, float angle)
|
||||||
Matrix MatrixRotateXYZ(Vector3 ang)
|
|
||||||
Matrix MatrixRotateX(float angle)
|
Matrix MatrixRotateX(float angle)
|
||||||
Matrix MatrixRotateY(float angle)
|
Matrix MatrixRotateY(float angle)
|
||||||
Matrix MatrixRotateZ(float angle)
|
Matrix MatrixRotateZ(float angle)
|
||||||
|
Matrix MatrixRotateXYZ(Vector3 ang)
|
||||||
|
Matrix MatrixRotateZYX(Vector3 ang)
|
||||||
Matrix MatrixScale(float x, float y, float z)
|
Matrix MatrixScale(float x, float y, float z)
|
||||||
Matrix MatrixMultiply(Matrix left, Matrix right)
|
|
||||||
Matrix MatrixFrustum(double left, double right, double bottom, double top, double near, double far)
|
Matrix MatrixFrustum(double left, double right, double bottom, double top, double near, double far)
|
||||||
Matrix MatrixPerspective(double fovy, double aspect, double near, double far)
|
Matrix MatrixPerspective(double fovy, double aspect, double near, double far)
|
||||||
Matrix MatrixOrtho(double left, double right, double bottom, double top, double near, double far)
|
Matrix MatrixOrtho(double left, double right, double bottom, double top, double near, double far)
|
||||||
|
31
tools/rlgl.h
31
tools/rlgl.h
@ -16,16 +16,20 @@ void rlVertex2f(float x, float y)
|
|||||||
void rlVertex3f(float x, float y, float z)
|
void rlVertex3f(float x, float y, float z)
|
||||||
void rlTexCoord2f(float x, float y)
|
void rlTexCoord2f(float x, float y)
|
||||||
void rlNormal3f(float x, float y, float z)
|
void rlNormal3f(float x, float y, float z)
|
||||||
void rlColor4ub(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
|
void rlColor4ub(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
|
||||||
void rlColor3f(float x, float y, float z)
|
void rlColor3f(float x, float y, float z)
|
||||||
void rlColor4f(float x, float y, float z, float w)
|
void rlColor4f(float x, float y, float z, float w)
|
||||||
void rlEnableTexture(unsigned int id)
|
void rlEnableTexture(unsigned int id)
|
||||||
void rlDisableTexture(void)
|
void rlDisableTexture(void)
|
||||||
void rlTextureParameters(unsigned int id, int param, int value)
|
void rlTextureParameters(unsigned int id, int param, int value)
|
||||||
void rlEnableRenderTexture(unsigned int id)
|
void rlEnableShader(unsigned int id)
|
||||||
void rlDisableRenderTexture(void)
|
void rlDisableShader(void)
|
||||||
|
void rlEnableFramebuffer(unsigned int id)
|
||||||
|
void rlDisableFramebuffer(void)
|
||||||
void rlEnableDepthTest(void)
|
void rlEnableDepthTest(void)
|
||||||
void rlDisableDepthTest(void)
|
void rlDisableDepthTest(void)
|
||||||
|
void rlEnableDepthMask(void)
|
||||||
|
void rlDisableDepthMask(void)
|
||||||
void rlEnableBackfaceCulling(void)
|
void rlEnableBackfaceCulling(void)
|
||||||
void rlDisableBackfaceCulling(void)
|
void rlDisableBackfaceCulling(void)
|
||||||
void rlEnableScissorTest(void)
|
void rlEnableScissorTest(void)
|
||||||
@ -33,12 +37,11 @@ void rlDisableScissorTest(void)
|
|||||||
void rlScissor(int x, int y, int width, int height)
|
void rlScissor(int x, int y, int width, int height)
|
||||||
void rlEnableWireMode(void)
|
void rlEnableWireMode(void)
|
||||||
void rlDisableWireMode(void)
|
void rlDisableWireMode(void)
|
||||||
void rlDeleteTextures(unsigned int id)
|
void rlSetLineWidth(float width)
|
||||||
void rlDeleteRenderTextures(RenderTexture2D target)
|
float rlGetLineWidth(void)
|
||||||
void rlDeleteShader(unsigned int id)
|
void rlEnableSmoothLines(void)
|
||||||
void rlDeleteVertexArrays(unsigned int id)
|
void rlDisableSmoothLines(void)
|
||||||
void rlDeleteBuffers(unsigned int id)
|
void rlClearColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
|
||||||
void rlClearColor(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
|
|
||||||
void rlClearScreenBuffers(void)
|
void rlClearScreenBuffers(void)
|
||||||
void rlUpdateBuffer(int bufferId, void *data, int dataSize)
|
void rlUpdateBuffer(int bufferId, void *data, int dataSize)
|
||||||
unsigned int rlLoadAttribBuffer(unsigned int vaoId, int shaderLoc, void *buffer, int size, bool dynamic)
|
unsigned int rlLoadAttribBuffer(unsigned int vaoId, int shaderLoc, void *buffer, int size, bool dynamic)
|
||||||
@ -52,7 +55,7 @@ void rlSetDebugMarker(const char *text)
|
|||||||
void rlSetBlendMode(int glSrcFactor, int glDstFactor, int glEquation)
|
void rlSetBlendMode(int glSrcFactor, int glDstFactor, int glEquation)
|
||||||
void rlLoadExtensions(void *loader)
|
void rlLoadExtensions(void *loader)
|
||||||
unsigned int rlLoadTexture(void *data, int width, int height, int format, int mipmapCount)
|
unsigned int rlLoadTexture(void *data, int width, int height, int format, int mipmapCount)
|
||||||
unsigned int rlLoadTextureDepth(int width, int height, int bits, bool useRenderBuffer)
|
unsigned int rlLoadTextureDepth(int width, int height, bool useRenderBuffer)
|
||||||
unsigned int rlLoadTextureCubemap(void *data, int size, int format)
|
unsigned int rlLoadTextureCubemap(void *data, int size, int format)
|
||||||
void rlUpdateTexture(unsigned int id, int offsetX, int offsetY, int width, int height, int format, const void *data)
|
void rlUpdateTexture(unsigned int id, int offsetX, int offsetY, int width, int height, int format, const void *data)
|
||||||
void rlGetGlTextureFormats(int format, unsigned int *glInternalFormat, unsigned int *glFormat, unsigned int *glType)
|
void rlGetGlTextureFormats(int format, unsigned int *glInternalFormat, unsigned int *glFormat, unsigned int *glType)
|
||||||
@ -60,11 +63,13 @@ void rlUnloadTexture(unsigned int id)
|
|||||||
void rlGenerateMipmaps(Texture2D *texture)
|
void rlGenerateMipmaps(Texture2D *texture)
|
||||||
void *rlReadTexturePixels(Texture2D texture)
|
void *rlReadTexturePixels(Texture2D texture)
|
||||||
unsigned char *rlReadScreenPixels(int width, int height)
|
unsigned char *rlReadScreenPixels(int width, int height)
|
||||||
RenderTexture2D rlLoadRenderTexture(int width, int height, int format, int depthBits, bool useDepthTexture)
|
unsigned int rlLoadFramebuffer(int width, int height)
|
||||||
void rlRenderTextureAttach(RenderTexture target, unsigned int id, int attachType)
|
void rlFramebufferAttach(unsigned int fboId, unsigned int texId, int attachType)
|
||||||
bool rlRenderTextureComplete(RenderTexture target)
|
bool rlFramebufferComplete(unsigned int id)
|
||||||
|
void rlUnloadFramebuffer(unsigned int id)
|
||||||
void rlLoadMesh(Mesh *mesh, bool dynamic)
|
void rlLoadMesh(Mesh *mesh, bool dynamic)
|
||||||
void rlUpdateMesh(Mesh mesh, int buffer, int num)
|
void rlUpdateMesh(Mesh mesh, int buffer, int num)
|
||||||
void rlUpdateMeshAt(Mesh mesh, int buffer, int num, int index)
|
void rlUpdateMeshAt(Mesh mesh, int buffer, int num, int index)
|
||||||
|
void rlDrawMeshInstanced(Mesh mesh, Material material, Matrix *transforms, int count)
|
||||||
void rlDrawMesh(Mesh mesh, Material material, Matrix transform)
|
void rlDrawMesh(Mesh mesh, Material material, Matrix transform)
|
||||||
void rlUnloadMesh(Mesh mesh)
|
void rlUnloadMesh(Mesh mesh)
|
||||||
|
Loading…
Reference in New Issue
Block a user