-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.nelua
37 lines (33 loc) · 1.44 KB
/
config.nelua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
##[[
-- default options
DEFAULT_LANG = DEFAULT_LANG or 'en-US'
if DEFAULT_LANG ~= 'pt-BR' and DEFAULT_LANG ~= 'en-US' then
print('language "' .. DEFAULT_LANG .. '" is not available, using en-US')
DEFAULT_LANG = 'en-US'
end
WIN_WIDTH = WIN_WIDTH or 800
WIN_HEIGHT = WIN_HEIGHT or 600
WIN_TITLE = WIN_TITLE or (DEFAULT_LANG == 'en-US' and 'Castle Escape' or 'Fuga do Castelo')
PL_POS_X = PL_POS_X or 28
PL_POS_Y = PL_POS_Y or 103
PL_VEL = PL_VEL or 2
-- web, from Edubart's 2048 game: https://github.com/edubart/nelua-game2048/blob/56d0609097ae9353fe71f2a2f306dcdf2b4b2e4c/config.nelua#L1
local compiler = require 'nelua.ccompiler'
if compiler.get_cc_info().is_emscripten then
PLATFORM_WEB = true
primtypes.integer = primtypes.int32
primtypes.uinteger = primtypes.uint32
primtypes.number = primtypes.float32
cflags '-Oz -fno-plt -flto' -- --llvm-lto 1 --closure 1'
cflags '-DGRAPHICS_API_OPENGL_ES2'
cflags '-s USE_GLFW=3 -s ASSERTIONS=1 -s WASM=1 -s TOTAL_MEMORY=40632320'
cflags '-I/home/andre_la/Downloads/git/nelua-projs/nelua-raylib/raylib-3.0.0/build/src/ /home/andre_la/Downloads/git/nelua-projs/nelua-raylib/raylib-3.0.0/build/src/libraylib.bc'
cflags '--preload-file resources'
cflags '--shell-file ./docs/extra/shell.html'
else
linklib 'raylib'
end
]]
## if PLATFORM_WEB then
global function emscripten_set_main_loop(func: function(), fps: cint, simulate_infinite_loop: cint) <cimport,cinclude'<emscripten.h>',nodecl> end
## end