Small fix to dungeon cravler demo.
This commit is contained in:
@@ -12,7 +12,7 @@ Reilua means fair in finnish.
|
|||||||
|
|
||||||
ReiLua is currently in arbitrary version 0.1 and some planned raylib functionality is still missing but it already has over 300 functions.
|
ReiLua is currently in arbitrary version 0.1 and some planned raylib functionality is still missing but it already has over 300 functions.
|
||||||
|
|
||||||
List of some missing features that are planned to be included. For specific function check API.
|
List of some MISSING features that are planned to be included. For specific function, check API.
|
||||||
|
|
||||||
* Core
|
* Core
|
||||||
* Some screen-space-related functions
|
* Some screen-space-related functions
|
||||||
@@ -123,8 +123,6 @@ If you now see extremely low res snake racing off the window then you are succes
|
|||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
I don't have much experience on compiling on Windows, but I got the following method to work.
|
|
||||||
|
|
||||||
* Download "w64devkit" from https://github.com/skeeto/w64devkit and "CMake" from https://cmake.org/download/. Install CMake with path environment variables set.
|
* Download "w64devkit" from https://github.com/skeeto/w64devkit and "CMake" from https://cmake.org/download/. Install CMake with path environment variables set.
|
||||||
* Download Raylib source.
|
* Download Raylib source.
|
||||||
* Run "w64devkit.exe" and navigate( ls == dir ) to "raylib-master/src" folder and run...
|
* Run "w64devkit.exe" and navigate( ls == dir ) to "raylib-master/src" folder and run...
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ local speed = 5.0
|
|||||||
local camera = -1
|
local camera = -1
|
||||||
local texture = -1
|
local texture = -1
|
||||||
local mesh = -1
|
local mesh = -1
|
||||||
local textureSize = { 128, 128 }
|
local textureSize = { 256, 96 }
|
||||||
local res = { 384, 216 }
|
local res = { 384, 216 }
|
||||||
local winSize = RL_GetWindowSize()
|
local winSize = RL_GetWindowSize()
|
||||||
local winScale = 5
|
local winScale = 5
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ function init()
|
|||||||
RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } )
|
RL_SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } )
|
||||||
|
|
||||||
camera = RL_CreateCamera3D()
|
camera = RL_CreateCamera3D()
|
||||||
RL_SetCamera3DPosition( camera, { 0, 2, 4 } )
|
RL_SetCamera3DPosition( camera, { 0, 8, 16 } )
|
||||||
RL_SetCamera3DTarget( camera, { 0, 0, 0 } )
|
RL_SetCamera3DTarget( camera, { 0, 0, 0 } )
|
||||||
RL_SetCamera3DUp( camera, { 0, 2, 0 } )
|
RL_SetCamera3DUp( camera, { 0, 2, 0 } )
|
||||||
RL_SetCamera3DMode( camera, CAMERA_FREE )
|
RL_SetCamera3DMode( camera, CAMERA_FREE )
|
||||||
@@ -70,6 +70,27 @@ function init()
|
|||||||
matrix = RL_MatrixMultiply( RL_MatrixIdentity(), RL_MatrixTranslate( { -4, 0, -4 } ) )
|
matrix = RL_MatrixMultiply( RL_MatrixIdentity(), RL_MatrixTranslate( { -4, 0, -4 } ) )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function process( delta )
|
||||||
|
-- print( "RL_GetTouchPointCount()", RL_GetTouchPointCount() )
|
||||||
|
-- print( "RL_GetGestureDetected()", RL_GetGestureDetected() )
|
||||||
|
-- local gesture = RL_GetGestureDetected()
|
||||||
|
|
||||||
|
-- if gesture then
|
||||||
|
-- local dragVec = RL_GetGestureDragVector()
|
||||||
|
-- local pinchVec = RL_GetGesturePinchVector()
|
||||||
|
-- -- print( "gesture "..gesture, "dragVec "..dragVec[1]..", "..dragVec[2] )
|
||||||
|
-- print( "gesture "..gesture, "dragVec "..pinchVec[1]..", "..pinchVec[2] )
|
||||||
|
-- end
|
||||||
|
|
||||||
|
-- local vec = RL_GetGestureDragVector()
|
||||||
|
|
||||||
|
-- print( vec[1]..", "..vec[2] )
|
||||||
|
|
||||||
|
-- if RL_IsGestureDetected() then
|
||||||
|
-- print( RL_GetGestureDetected() )
|
||||||
|
-- end
|
||||||
|
end
|
||||||
|
|
||||||
function draw()
|
function draw()
|
||||||
RL_ClearBackground( { 100, 150, 100 } )
|
RL_ClearBackground( { 100, 150, 100 } )
|
||||||
RL_UpdateCamera3D( camera )
|
RL_UpdateCamera3D( camera )
|
||||||
|
|||||||
@@ -16,3 +16,5 @@
|
|||||||
#include <lualib.h>
|
#include <lualib.h>
|
||||||
#include <lauxlib.h>
|
#include <lauxlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "glfw3.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user