VERSIÓ 1.4.2
- [NEW] excutar "mini --version" torna la versió - [NEW] executar "mini dura/a/un/data.jf2" usará eixe arxiu jf2 - [NEW] sys.version()
This commit is contained in:
5
lua.cpp
5
lua.cpp
@@ -808,6 +808,10 @@ extern "C" {
|
||||
}
|
||||
}
|
||||
|
||||
static int cpp_sys_version(lua_State *L) {
|
||||
lua_pushstring(L, MINI_VERSION);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// win
|
||||
// ===============================================
|
||||
@@ -1092,6 +1096,7 @@ void push_lua_funcs() {
|
||||
lua_pushcfunction(L,cpp_sys_fps); lua_setfield(L, -2, "fps");
|
||||
lua_pushcfunction(L,cpp_sys_debug); lua_setfield(L, -2, "debug");
|
||||
lua_pushcfunction(L,cpp_sys_clipboard); lua_setfield(L, -2, "clipboard");
|
||||
lua_pushcfunction(L,cpp_sys_version); lua_setfield(L, -2, "version");
|
||||
|
||||
lua_pushinteger(L, 0); lua_setfield(L, -2, "UPDATE_ALWAYS");
|
||||
lua_pushinteger(L, 1); lua_setfield(L, -2, "UPDATE_WAIT");
|
||||
|
||||
9
mini.cpp
9
mini.cpp
@@ -459,6 +459,9 @@ int main(int argc,char*argv[]){
|
||||
if (strcmp(command, "new")==0) {
|
||||
createNewProject();
|
||||
exit(0);
|
||||
} else if (strcmp(command, "version")==0) {
|
||||
//createNewProject();
|
||||
exit(0);
|
||||
}
|
||||
} else if (strstr(argv[1], ".lua")!=nullptr) {
|
||||
file_setresourcefolder("./");
|
||||
@@ -466,6 +469,12 @@ int main(int argc,char*argv[]){
|
||||
strcpy(main_lua_file, argv[1]);
|
||||
strcpy(window_title, argv[1]);
|
||||
override_ini = true;
|
||||
} else if (strstr(argv[1], ".jf2")!=nullptr) {
|
||||
file_setresourcefilename(argv[1]);
|
||||
file_setsource(SOURCE_FILE);
|
||||
//strcpy(main_lua_file, argv[1]);
|
||||
//strcpy(window_title, argv[1]);
|
||||
//override_ini = true;
|
||||
} else {
|
||||
char path[256] = "./";
|
||||
strcat(path, argv[1]);
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#define MINI_VERSION "1.4.1"
|
||||
#define MINI_VERSION "1.4.2"
|
||||
|
||||
@@ -310,13 +310,6 @@ function draw.surfrot(sx, sy, sw, sh, x, y, a) end
|
||||
---Draw text to (x,y) using the specified color
|
||||
function draw.text(text, x, y, color) end
|
||||
|
||||
---@param text number
|
||||
---@param x number
|
||||
---@param y number
|
||||
---@param color number
|
||||
---Draw text to (x,y) using the specified color
|
||||
function draw.text(text, x, y, color) end
|
||||
|
||||
---@param mode number
|
||||
---Specify the mode for the drawing functions
|
||||
function draw.mode(mode) end
|
||||
@@ -486,6 +479,10 @@ function sys.clipboard(value) end
|
||||
---Returns true if running on debug version of mini. False otherwise.
|
||||
function sys.debug() end
|
||||
|
||||
---@return string
|
||||
---Returns the current mini version as a string.
|
||||
function sys.version() end
|
||||
|
||||
|
||||
---@class win
|
||||
win = {}
|
||||
|
||||
Reference in New Issue
Block a user