- Tota la API canviada. Fent la documentació.

- v1.0 RC1
This commit is contained in:
2025-02-14 14:14:26 +01:00
parent b56a0c0f71
commit 40e98737ce
5 changed files with 603 additions and 722 deletions

View File

@@ -24,4 +24,4 @@ linux:
strip -s -R .comment -R .gnu.version --strip-unneeded "$(executable)" strip -s -R .comment -R .gnu.version --strip-unneeded "$(executable)"
linux_debug: linux_debug:
g++ $(source) -D LUA_USE_LINUX -D DEBUG -g -Wall -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -lSDL2 -o "$(executable)_debug" g++ $(source) -D LUA_USE_LINUX -D DEBUG -g -Wall -lSDL2 -o "$(executable)_debug"

View File

@@ -1,18 +1,24 @@
other = require "other" --other = require "other"
x=0 x=0
function _init() function _init()
text=other.peiv() --text=other.peiv()
keyRight = tonumber(getconf("keyright")) or KEY_RIGHT --keyRight = tonumber(getconf("keyright")) or KEY_RIGHT
keyLeft = tonumber(getconf("keyleft")) or KEY_LEFT --keyLeft = tonumber(getconf("keyleft")) or KEY_LEFT
_update=normal_update --_update=normal_update
--turbo(false) --turbo(false)
local perico = "péricòñ" --local perico = "péricòñ"
print(utf8.len(perico)) --print(utf8.len(perico))
end end
function _update() function _update()
if key.press(key.ESCAPE) then
sys.quit()
end
draw.cls(5)
draw.print("HOLA",0,0)
end end
function normal_update() function normal_update()

1285
lua.cpp

File diff suppressed because it is too large Load Diff

View File

@@ -294,11 +294,17 @@ int main(int argc,char*argv[]){
if (argc>1) if (argc>1)
{ {
file_setresourcefolder("./"); if (strstr(argv[1], ".lua")!=nullptr) {
file_setsource(SOURCE_FOLDER); file_setresourcefolder("./");
strcpy(main_lua_file, argv[1]); file_setsource(SOURCE_FOLDER);
strcpy(window_title, argv[1]); strcpy(main_lua_file, argv[1]);
override_ini = true; strcpy(window_title, argv[1]);
override_ini = true;
} else {
char path[256] = "./";
strcat(path, argv[1]);
file_setresourcefolder(path);
}
} }
while (!should_quit) { while (!should_quit) {

View File

@@ -1,3 +1,3 @@
#pragma once #pragma once
#define MINI_VERSION "0.9.98b" #define MINI_VERSION "1.0 RC1"