Skip to content

Commit

Permalink
feat: add optimize functions for luajit
Browse files Browse the repository at this point in the history
  • Loading branch information
pure01fx committed Sep 13, 2022
1 parent 795c96b commit 8631b2a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ endif()

# Used as public API to be included into other projects
set(raylib_public_headers
luaopt.h
raylib.h
rlgl.h
raymath.h
)

# Sources to be compiled
set(raylib_sources
luaopt.c
rcore.c
rmodels.c
rshapes.c
Expand Down
13 changes: 13 additions & 0 deletions src/luaopt.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include "raylib.h"

void pGetWindowPosition(Vector2* v) {
*v = GetWindowPosition();
}

void pClearBackground(Color* v) {
ClearBackground(*v);
}

void pBeginMode2D(Camera2D* v) {
BeginMode2D(*v);
}
5 changes: 5 additions & 0 deletions src/luaopt.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "raylib.h"

RLAPI void pGetWindowPosition(Vector2* v);
RLAPI void pClearBackground(Color* v);
RLAPI void pBeginMode2D(Camera2D* v);

0 comments on commit 8631b2a

Please sign in to comment.