raylua v3.5-pre1
This commit is contained in:
parent
37a89f7b18
commit
0d06ef4ea9
2
makefile
2
makefile
@ -7,7 +7,7 @@ LUA ?= luajit/src/luajit
|
||||
WINDRES ?= windres
|
||||
|
||||
CFLAGS += -Iluajit/src -Iraylib/src -Iraygui/src
|
||||
LDFLAGS += luajit/src/libluajit.a raylib/libraylib.a
|
||||
LDFLAGS += luajit/src/libluajit.a raylib/src/libraylib.a
|
||||
|
||||
MODULES := raymath rlgl easings gestures physac raygui
|
||||
|
||||
|
2
raylib
2
raylib
@ -1 +1 @@
|
||||
Subproject commit a54d9f734b7d473c44386217cf653976c22d44da
|
||||
Subproject commit 51e75be9d1ffeaf6d47d3670017cca36f4785a17
|
@ -118,6 +118,7 @@ ffi.cdef [[
|
||||
typedef struct Font {
|
||||
int baseSize;
|
||||
int charsCount;
|
||||
int charsPadding;
|
||||
Texture2D texture;
|
||||
Rectangle *recs;
|
||||
CharInfo *chars;
|
||||
@ -270,16 +271,20 @@ ffi.cdef [[
|
||||
} VrDeviceInfo;
|
||||
|
||||
typedef enum {
|
||||
FLAG_RESERVED = 1,
|
||||
FLAG_FULLSCREEN_MODE = 2,
|
||||
FLAG_WINDOW_RESIZABLE = 4,
|
||||
FLAG_WINDOW_UNDECORATED = 8,
|
||||
FLAG_WINDOW_TRANSPARENT = 16,
|
||||
FLAG_WINDOW_HIDDEN = 128,
|
||||
FLAG_WINDOW_ALWAYS_RUN = 256,
|
||||
FLAG_MSAA_4X_HINT = 32,
|
||||
FLAG_VSYNC_HINT = 64,
|
||||
FLAG_INTERLACED_HINT = 512
|
||||
FLAG_VSYNC_HINT = 0x00000040,
|
||||
FLAG_FULLSCREEN_MODE = 0x00000002,
|
||||
FLAG_WINDOW_RESIZABLE = 0x00000004,
|
||||
FLAG_WINDOW_UNDECORATED = 0x00000008,
|
||||
FLAG_WINDOW_HIDDEN = 0x00000080,
|
||||
FLAG_WINDOW_MINIMIZED = 0x00000200,
|
||||
FLAG_WINDOW_MAXIMIZED = 0x00000400,
|
||||
FLAG_WINDOW_UNFOCUSED = 0x00000800,
|
||||
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;
|
||||
|
||||
typedef enum {
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
local load = loadstring
|
||||
|
||||
raylua.version = "v3.1-dev2"
|
||||
raylua.version = "v3.5-pre1"
|
||||
|
||||
function raylua.repl()
|
||||
print("> raylua " .. raylua.version .. " <")
|
||||
|
74
tools/api.h
74
tools/api.h
@ -2,18 +2,18 @@ void InitWindow(int width, int height, const char *title)
|
||||
bool WindowShouldClose(void)
|
||||
void CloseWindow(void)
|
||||
bool IsWindowReady(void)
|
||||
bool IsWindowFullscreen(void)
|
||||
bool IsWindowHidden(void)
|
||||
bool IsWindowMinimized(void)
|
||||
bool IsWindowMaximized(void)
|
||||
bool IsWindowFocused(void)
|
||||
bool IsWindowResized(void)
|
||||
bool IsWindowHidden(void)
|
||||
bool IsWindowFullscreen(void)
|
||||
bool IsWindowState(unsigned int flag)
|
||||
void SetWindowState(unsigned int flags)
|
||||
void ClearWindowState(unsigned int flags)
|
||||
void ToggleFullscreen(void)
|
||||
void UnhideWindow(void)
|
||||
void HideWindow(void)
|
||||
void DecorateWindow(void)
|
||||
void UndecorateWindow(void)
|
||||
void MaximizeWindow(void)
|
||||
void MinimizeWindow(void)
|
||||
void RestoreWindow(void)
|
||||
void SetWindowIcon(Image image)
|
||||
void SetWindowTitle(const char *title)
|
||||
@ -25,6 +25,7 @@ void *GetWindowHandle(void)
|
||||
int GetScreenWidth(void)
|
||||
int GetScreenHeight(void)
|
||||
int GetMonitorCount(void)
|
||||
Vector2 GetMonitorPosition(int monitor)
|
||||
int GetMonitorWidth(int monitor)
|
||||
int GetMonitorHeight(int monitor)
|
||||
int GetMonitorPhysicalWidth(int monitor)
|
||||
@ -68,12 +69,16 @@ void SetTraceLogLevel(int logType)
|
||||
void SetTraceLogExit(int logType)
|
||||
void SetTraceLogCallback(TraceLogCallback callback)
|
||||
void TraceLog(int logType, const char *text, ...)
|
||||
void *MemAlloc(int size)
|
||||
void MemFree(void *ptr)
|
||||
void TakeScreenshot(const char *fileName)
|
||||
int GetRandomValue(int min, int max)
|
||||
uint8_t *LoadFileData(const char *fileName, unsigned int *bytesRead)
|
||||
void SaveFileData(const char *fileName, void *data, unsigned int bytesToWrite)
|
||||
void UnloadFileData(unsigned char *data)
|
||||
bool SaveFileData(const char *fileName, void *data, unsigned int bytesToWrite)
|
||||
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 DirectoryExists(const char *dirPath)
|
||||
bool IsFileExtension(const char *fileName, const char *ext)
|
||||
@ -92,7 +97,7 @@ void ClearDroppedFiles(void)
|
||||
long GetFileModTime(const char *fileName)
|
||||
uint8_t *CompressData(uint8_t *data, int dataLength, int *compDataLength)
|
||||
uint8_t *DecompressData(uint8_t *compData, int compDataLength, int *dataLength)
|
||||
void SaveStorageValue(unsigned int position, int value)
|
||||
bool SaveStorageValue(unsigned int position, int value)
|
||||
int LoadStorageValue(unsigned int position)
|
||||
void OpenURL(const char *url)
|
||||
bool IsKeyPressed(int key)
|
||||
@ -101,6 +106,7 @@ bool IsKeyReleased(int key)
|
||||
bool IsKeyUp(int key)
|
||||
void SetExitKey(int key)
|
||||
int GetKeyPressed(void)
|
||||
int GetCharPressed(void)
|
||||
bool IsGamepadAvailable(int gamepad)
|
||||
bool IsGamepadName(int gamepad, const char *name)
|
||||
const char *GetGamepadName(int gamepad)
|
||||
@ -138,17 +144,17 @@ Vector2 GetGesturePinchVector(void)
|
||||
float GetGesturePinchAngle(void)
|
||||
void SetCameraMode(Camera camera, int mode)
|
||||
void UpdateCamera(Camera *camera)
|
||||
void SetCameraPanControl(int panKey)
|
||||
void SetCameraAltControl(int altKey)
|
||||
void SetCameraSmoothZoomControl(int szKey)
|
||||
void SetCameraMoveControls(int frontKey, int backKey, int rightKey, int leftKey, int upKey, int downKey)
|
||||
void SetCameraPanControl(int keyPan)
|
||||
void SetCameraAltControl(int keyAlt)
|
||||
void SetCameraSmoothZoomControl(int keySmoothZoom)
|
||||
void SetCameraMoveControls(int keyFront, int keyBack, int keyRight, int keyLeft, int keyUp, int keyDown)
|
||||
void DrawPixel(int posX, int posY, Color color)
|
||||
void DrawPixelV(Vector2 position, Color color)
|
||||
void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color)
|
||||
void DrawLineV(Vector2 startPos, Vector2 endPos, Color color)
|
||||
void DrawLineEx(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 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)
|
||||
@ -172,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 DrawTriangle(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 DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color)
|
||||
void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color)
|
||||
@ -188,8 +194,8 @@ Image LoadImageRaw(const char *fileName, int width, int height, int format, int
|
||||
Image LoadImageAnim(const char *fileName, int *frames)
|
||||
Image LoadImageFromMemory(const char *fileType, const uint8_t *fileData, int dataSize)
|
||||
void UnloadImage(Image image)
|
||||
void ExportImage(Image image, const char *fileName)
|
||||
void ExportImageAsCode(Image image, const char *fileName)
|
||||
bool ExportImage(Image image, const char *fileName)
|
||||
bool ExportImageAsCode(Image image, const char *fileName)
|
||||
Image GenImageColor(int width, int height, Color color)
|
||||
Image GenImageGradientV(int width, int height, Color top, Color bottom)
|
||||
Image GenImageGradientH(int width, int height, Color left, Color right)
|
||||
@ -224,9 +230,10 @@ void ImageColorGrayscale(Image *image)
|
||||
void ImageColorContrast(Image *image, float contrast)
|
||||
void ImageColorBrightness(Image *image, int brightness)
|
||||
void ImageColorReplace(Image *image, Color color, Color replace)
|
||||
Color *GetImageData(Image image)
|
||||
Color *GetImagePalette(Image image, int maxPaletteSize, int *extractCount)
|
||||
Vector4 *GetImageDataNormalized(Image image)
|
||||
Color *LoadImageColors(Image image)
|
||||
Color *LoadImagePalette(Image image, int maxPaletteSize, int *colorsCount)
|
||||
void UnloadImageColors(Color *colors)
|
||||
void UnloadImagePalette(Color *colors)
|
||||
Rectangle GetImageAlphaBorder(Image image, float threshold)
|
||||
void ImageClearBackground(Image *dst, Color color)
|
||||
void ImageDrawPixel(Image *dst, int posX, int posY, Color color)
|
||||
@ -258,11 +265,11 @@ void SetTextureWrap(Texture2D texture, int wrapMode)
|
||||
void DrawTexture(Texture2D texture, int posX, int posY, Color tint)
|
||||
void DrawTextureV(Texture2D texture, Vector2 position, 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 DrawTextureTiled(Texture2D texture, Rectangle sourceRec, Rectangle destRec, Vector2 origin, float rotation, float scale, Color tint)
|
||||
void DrawTexturePro(Texture2D texture, Rectangle sourceRec, Rectangle destRec, Vector2 origin, float rotation, Color tint)
|
||||
void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, 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 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)
|
||||
@ -282,12 +289,14 @@ Font LoadFontFromImage(Image image, Color key, int firstChar)
|
||||
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)
|
||||
void UnloadFontData(CharInfo *chars, int charsCount)
|
||||
void UnloadFont(Font font)
|
||||
void DrawFPS(int posX, int posY)
|
||||
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 DrawTextRec(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint)
|
||||
void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float scale, 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 DrawTextCodepoint(Font font, int codepoint, Vector2 position, float fontSize, Color tint)
|
||||
int MeasureText(const char *text, int fontSize)
|
||||
Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing)
|
||||
int GetGlyphIndex(Font font, int codepoint)
|
||||
@ -333,8 +342,9 @@ void DrawGizmo(Vector3 position)
|
||||
Model LoadModel(const char *fileName)
|
||||
Model LoadModelFromMesh(Mesh mesh)
|
||||
void UnloadModel(Model model)
|
||||
void UnloadModelKeepMeshes(Model model)
|
||||
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)
|
||||
Material *LoadMaterials(const char *fileName, int *materialCount)
|
||||
Material LoadMaterialDefault(void)
|
||||
@ -365,13 +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 DrawBoundingBox(BoundingBox box, Color color)
|
||||
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)
|
||||
bool CheckCollisionSpheres(Vector3 centerA, float radiusA, Vector3 centerB, float radiusB)
|
||||
void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 center, float size, Color tint)
|
||||
bool CheckCollisionSpheres(Vector3 center1, float radius1, Vector3 center2, float radius2)
|
||||
bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2)
|
||||
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 CheckCollisionRayBox(Ray ray, BoundingBox box)
|
||||
RayHitInfo GetCollisionRayMesh(Ray ray, Mesh mesh, Matrix transform)
|
||||
RayHitInfo GetCollisionRayModel(Ray ray, Model model)
|
||||
RayHitInfo GetCollisionRayTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3)
|
||||
RayHitInfo GetCollisionRayGround(Ray ray, float groundHeight)
|
||||
@ -420,8 +431,8 @@ Sound LoadSoundFromWave(Wave wave)
|
||||
void UpdateSound(Sound sound, const void *data, int samplesCount)
|
||||
void UnloadWave(Wave wave)
|
||||
void UnloadSound(Sound sound)
|
||||
void ExportWave(Wave wave, const char *fileName)
|
||||
void ExportWaveAsCode(Wave wave, const char *fileName)
|
||||
bool ExportWave(Wave wave, const char *fileName)
|
||||
bool ExportWaveAsCode(Wave wave, const char *fileName)
|
||||
void PlaySound(Sound sound)
|
||||
void StopSound(Sound sound)
|
||||
void PauseSound(Sound sound)
|
||||
@ -435,7 +446,8 @@ void SetSoundPitch(Sound sound, float pitch)
|
||||
void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels)
|
||||
Wave WaveCopy(Wave wave)
|
||||
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)
|
||||
void UnloadMusicStream(Music music)
|
||||
void PlayMusicStream(Music music)
|
||||
|
@ -28,6 +28,8 @@ void rlEnableFramebuffer(unsigned int id)
|
||||
void rlDisableFramebuffer(void)
|
||||
void rlEnableDepthTest(void)
|
||||
void rlDisableDepthTest(void)
|
||||
void rlEnableDepthMask(void)
|
||||
void rlDisableDepthMask(void)
|
||||
void rlEnableBackfaceCulling(void)
|
||||
void rlDisableBackfaceCulling(void)
|
||||
void rlEnableScissorTest(void)
|
||||
@ -35,6 +37,10 @@ void rlDisableScissorTest(void)
|
||||
void rlScissor(int x, int y, int width, int height)
|
||||
void rlEnableWireMode(void)
|
||||
void rlDisableWireMode(void)
|
||||
void rlSetLineWidth(float width)
|
||||
float rlGetLineWidth(void)
|
||||
void rlEnableSmoothLines(void)
|
||||
void rlDisableSmoothLines(void)
|
||||
void rlClearColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
|
||||
void rlClearScreenBuffers(void)
|
||||
void rlUpdateBuffer(int bufferId, void *data, int dataSize)
|
||||
|
Loading…
Reference in New Issue
Block a user