#2257: deploy scripts as shared libs
This commit is contained in:
+95
-264
File diff suppressed because it is too large
Load Diff
+10
-8
@@ -14,19 +14,20 @@ message("VERSION_HASH: ${VERSION_HASH}")
|
||||
|
||||
configure_file("${PROJECT_SOURCE_DIR}/version.h.in" "${CMAKE_CURRENT_BINARY_DIR}/version.h")
|
||||
|
||||
if(ANDROID OR EMSCRIPTEN OR N3DS OR RPI)
|
||||
set(BUILD_LIBRETRO_DEFAULT OFF)
|
||||
set(BUILD_PLAYER_DEFAULT OFF)
|
||||
set(BUILD_TOOLS OFF)
|
||||
if(ANDROID OR EMSCRIPTEN OR N3DS OR BAREMETALPI)
|
||||
set(BUILD_STATIC_DEFAULT ON)
|
||||
else()
|
||||
set(BUILD_LIBRETRO_DEFAULT ON)
|
||||
set(BUILD_PLAYER_DEFAULT ON)
|
||||
set(BUILD_TOOLS ON)
|
||||
set(BUILD_STATIC_DEFAULT OFF)
|
||||
endif()
|
||||
|
||||
set(BUILD_PLAYER_DEFAULT OFF)
|
||||
set(BUILD_LIBRETRO_DEFAULT OFF)
|
||||
set(BUILD_TOUCH_INPUT_DEFAULT ${ANDROID})
|
||||
set(BUILD_TOOLS OFF)
|
||||
set(BUILD_WITH_ALL_DEFAULT OFF)
|
||||
|
||||
option(BUILD_STATIC "Static runtime" ON)
|
||||
option(BUILD_STATIC "Static runtime" ${BUILD_STATIC_DEFAULT})
|
||||
option(BUILD_WITH_ALL "Build all supported scripts" ${BUILD_WITH_ALL_DEFAULT})
|
||||
option(BUILD_SDL "SDL Enabled" ON)
|
||||
option(BUILD_SDLGPU "SDL GPU Enabled" OFF)
|
||||
option(BUILD_SOKOL "Sokol Enabled" OFF)
|
||||
@@ -66,6 +67,7 @@ target_compile_definitions(runtime INTERFACE BUILD_DEPRECATED)
|
||||
message("BUILD_STATIC: ${BUILD_STATIC}")
|
||||
message("BUILD_SDLGPU: ${BUILD_SDLGPU}")
|
||||
message("BUILD_TOUCH_INPUT: ${BUILD_TOUCH_INPUT}")
|
||||
message("BUILD_WITH_ALL: ${BUILD_WITH_ALL}")
|
||||
|
||||
if (N3DS)
|
||||
set(BUILD_SDL OFF)
|
||||
|
||||
@@ -25,7 +25,7 @@ android {
|
||||
arguments "APP_PLATFORM=android-31"
|
||||
}
|
||||
cmake {
|
||||
arguments "-DBUILD_WITH_MRUBY=Off", "-DBUILD_PRO=Off", "-DCMAKE_BUILD_TYPE=MinSizeRel"
|
||||
arguments "-DBUILD_WITH_MRUBY=OFF", "-DBUILD_PRO=Off", "-DCMAKE_BUILD_TYPE=MinSizeRel", "-DBUILD_WITH_ALL=ON"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ LIBS := \
|
||||
$(TIC80LIB)/libtic80core.a \
|
||||
$(TIC80LIB)/libgiflib.a \
|
||||
$(TIC80LIB)/liblpeg.a \
|
||||
$(TIC80LIB)/libluaapi.a \
|
||||
$(TIC80LIB)/liblua.a \
|
||||
$(TIC80LIB)/libmoon.a \
|
||||
$(TIC80LIB)/libfennel.a \
|
||||
|
||||
+1
-1
@@ -108,5 +108,5 @@ if(BUILD_DEPRECATED)
|
||||
endif()
|
||||
|
||||
if(LINUX)
|
||||
target_link_libraries(tic80core PRIVATE m)
|
||||
target_link_libraries(tic80core PRIVATE m dl)
|
||||
endif()
|
||||
|
||||
+4
-1
@@ -2,6 +2,9 @@
|
||||
# Fennel
|
||||
################################
|
||||
|
||||
option(BUILD_WITH_FENNEL "Fennel Enabled" ${BUILD_WITH_ALL})
|
||||
message("BUILD_WITH_FENNEL: ${BUILD_WITH_FENNEL}")
|
||||
|
||||
if(BUILD_WITH_FENNEL)
|
||||
|
||||
add_library(fennel ${TIC_RUNTIME} ${CMAKE_SOURCE_DIR}/src/api/fennel.c)
|
||||
@@ -10,7 +13,7 @@ if(BUILD_WITH_FENNEL)
|
||||
set_target_properties(fennel PROPERTIES PREFIX "")
|
||||
endif()
|
||||
|
||||
target_link_libraries(fennel PRIVATE lua runtime)
|
||||
target_link_libraries(fennel PRIVATE runtime luaapi)
|
||||
target_include_directories(fennel
|
||||
PRIVATE
|
||||
${THIRDPARTY_DIR}/fennel
|
||||
|
||||
+1
-3
@@ -2,9 +2,7 @@
|
||||
# Janet
|
||||
################################
|
||||
|
||||
set(BUILD_WITH_JANET_DEFAULT TRUE)
|
||||
|
||||
option(BUILD_WITH_JANET "Janet Enabled" ${BUILD_WITH_JANET_DEFAULT})
|
||||
option(BUILD_WITH_JANET "Janet Enabled" ${BUILD_WITH_ALL})
|
||||
message("BUILD_WITH_JANET: ${BUILD_WITH_JANET}")
|
||||
|
||||
if(BUILD_WITH_JANET)
|
||||
|
||||
+17
-21
@@ -2,23 +2,9 @@
|
||||
# LUA
|
||||
################################
|
||||
|
||||
set(BUILD_WITH_LUA_DEFAULT TRUE)
|
||||
set(BUILD_WITH_MOON_DEFAULT TRUE)
|
||||
set(BUILD_WITH_FENNEL_DEFAULT TRUE)
|
||||
|
||||
option(BUILD_WITH_LUA "Lua Enabled" ${BUILD_WITH_LUA_DEFAULT})
|
||||
option(BUILD_WITH_LUA "Lua Enabled" ON)
|
||||
message("BUILD_WITH_LUA: ${BUILD_WITH_LUA}")
|
||||
|
||||
option(BUILD_WITH_MOON "Moon Enabled" ${BUILD_WITH_MOON_DEFAULT})
|
||||
message("BUILD_WITH_MOON: ${BUILD_WITH_MOON}")
|
||||
|
||||
option(BUILD_WITH_FENNEL "Fennel Enabled" ${BUILD_WITH_FENNEL_DEFAULT})
|
||||
message("BUILD_WITH_FENNEL: ${BUILD_WITH_FENNEL}")
|
||||
|
||||
if(BUILD_WITH_MOON OR BUILD_WITH_FENNEL)
|
||||
set(BUILD_WITH_LUA TRUE)
|
||||
endif()
|
||||
|
||||
if(BUILD_WITH_LUA)
|
||||
|
||||
set(LUA_DIR ${THIRDPARTY_DIR}/lua)
|
||||
@@ -58,18 +44,28 @@ if(BUILD_WITH_LUA)
|
||||
${LUA_DIR}/lbitlib.c
|
||||
)
|
||||
|
||||
list(APPEND LUA_SRC ${CMAKE_SOURCE_DIR}/src/api/lua.c)
|
||||
list(APPEND LUA_SRC ${CMAKE_SOURCE_DIR}/src/api/parse_note.c)
|
||||
add_library(luaapi STATIC
|
||||
${LUA_SRC}
|
||||
${CMAKE_SOURCE_DIR}/src/api/luaapi.c
|
||||
${CMAKE_SOURCE_DIR}/src/api/parse_note.c
|
||||
)
|
||||
|
||||
add_library(lua ${TIC_RUNTIME} ${LUA_SRC})
|
||||
add_library(lua ${TIC_RUNTIME} ${CMAKE_SOURCE_DIR}/src/api/lua.c)
|
||||
|
||||
if(NOT BUILD_STATIC)
|
||||
set_target_properties(lua PROPERTIES PREFIX "")
|
||||
endif()
|
||||
|
||||
target_link_libraries(lua PRIVATE runtime)
|
||||
target_link_libraries(lua PRIVATE runtime luaapi)
|
||||
|
||||
target_compile_definitions(luaapi PRIVATE LUA_COMPAT_5_2)
|
||||
|
||||
target_include_directories(luaapi
|
||||
PUBLIC ${THIRDPARTY_DIR}/lua
|
||||
${CMAKE_SOURCE_DIR}/include
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
target_compile_definitions(lua PRIVATE LUA_COMPAT_5_2)
|
||||
target_include_directories(lua
|
||||
PUBLIC ${THIRDPARTY_DIR}/lua
|
||||
PRIVATE
|
||||
@@ -78,7 +74,7 @@ if(BUILD_WITH_LUA)
|
||||
)
|
||||
|
||||
if(N3DS)
|
||||
target_compile_definitions(lua PUBLIC LUA_32BITS)
|
||||
target_compile_definitions(luaapi PUBLIC LUA_32BITS)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(lua INTERFACE TIC_BUILD_WITH_LUA)
|
||||
|
||||
+4
-1
@@ -2,6 +2,9 @@
|
||||
# MoonScript
|
||||
################################
|
||||
|
||||
option(BUILD_WITH_MOON "Moon Enabled" ${BUILD_WITH_ALL})
|
||||
message("BUILD_WITH_MOON: ${BUILD_WITH_MOON}")
|
||||
|
||||
if(BUILD_WITH_MOON)
|
||||
|
||||
set(LPEG_DIR ${THIRDPARTY_DIR}/lpeg)
|
||||
@@ -22,7 +25,7 @@ if(BUILD_WITH_MOON)
|
||||
set_target_properties(moon PROPERTIES PREFIX "")
|
||||
endif()
|
||||
|
||||
target_link_libraries(moon PRIVATE lpeg lua runtime)
|
||||
target_link_libraries(moon PRIVATE lpeg runtime luaapi)
|
||||
|
||||
target_include_directories(moon
|
||||
PRIVATE
|
||||
|
||||
+4
-8
@@ -2,18 +2,14 @@
|
||||
# MRUBY
|
||||
################################
|
||||
|
||||
find_program(RUBY ruby)
|
||||
find_program(RAKE rake)
|
||||
if(NOT RAKE)
|
||||
set(BUILD_WITH_MRUBY_DEFAULT FALSE)
|
||||
else()
|
||||
set(BUILD_WITH_MRUBY_DEFAULT TRUE)
|
||||
endif()
|
||||
option(BUILD_WITH_MRUBY "mruby Enabled" ${BUILD_WITH_MRUBY_DEFAULT})
|
||||
option(BUILD_WITH_MRUBY "mruby Enabled" ${BUILD_WITH_ALL})
|
||||
message("BUILD_WITH_MRUBY: ${BUILD_WITH_MRUBY}")
|
||||
|
||||
if(BUILD_WITH_MRUBY)
|
||||
|
||||
find_program(RUBY ruby)
|
||||
find_program(RAKE rake)
|
||||
|
||||
list(APPEND RUBY_SRC ${CMAKE_SOURCE_DIR}/src/api/mruby.c)
|
||||
list(APPEND RUBY_SRC ${CMAKE_SOURCE_DIR}/src/api/parse_note.c)
|
||||
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ if(USE_NAETT)
|
||||
target_link_libraries(naett INTERFACE winhttp)
|
||||
elseif(LINUX)
|
||||
target_include_directories(naett PRIVATE ${CURL_INCLUDE_DIRS})
|
||||
target_link_libraries(naett ${CURL_LIBRARIES})
|
||||
target_link_libraries(naett ${CURL_LIBRARIES} pthread)
|
||||
elseif(APPLE)
|
||||
target_link_libraries(naett
|
||||
"-framework Cocoa")
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
# pocketpy (Python)
|
||||
################################
|
||||
|
||||
set(BUILD_WITH_PYTHON_DEFAULT TRUE)
|
||||
|
||||
option(BUILD_WITH_PYTHON "Python Enabled" ${BUILD_WITH_PYTHON_DEFAULT})
|
||||
option(BUILD_WITH_PYTHON "Python Enabled" ${BUILD_WITH_ALL})
|
||||
message("BUILD_WITH_PYTHON: ${BUILD_WITH_PYTHON}")
|
||||
|
||||
if(BUILD_WITH_PYTHON)
|
||||
|
||||
+1
-3
@@ -2,9 +2,7 @@
|
||||
# QuickJS
|
||||
################################
|
||||
|
||||
set(BUILD_WITH_JS_DEFAULT TRUE)
|
||||
|
||||
option(BUILD_WITH_JS "JS Enabled" ${BUILD_WITH_JS_DEFAULT})
|
||||
option(BUILD_WITH_JS "JS Enabled" ${BUILD_WITH_ALL})
|
||||
message("BUILD_WITH_JS: ${BUILD_WITH_JS}")
|
||||
|
||||
if(BUILD_WITH_JS)
|
||||
|
||||
+1
-3
@@ -2,9 +2,7 @@
|
||||
# SCHEME (S7)
|
||||
################################
|
||||
|
||||
set(BUILD_WITH_SCHEME_DEFAULT TRUE)
|
||||
|
||||
option(BUILD_WITH_SCHEME "Scheme Enabled" ${BUILD_WITH_SCHEME_DEFAULT})
|
||||
option(BUILD_WITH_SCHEME "Scheme Enabled" ${BUILD_WITH_ALL})
|
||||
message("BUILD_WITH_SCHEME: ${BUILD_WITH_SCHEME}")
|
||||
|
||||
if(BUILD_WITH_SCHEME)
|
||||
|
||||
+6
-18
@@ -12,6 +12,8 @@ if(BUILD_SDL AND NOT EMSCRIPTEN AND NOT RPI)
|
||||
set(SDL_STATIC_PIC ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
||||
set(SDL_SHARED OFF CACHE BOOL "" FORCE)
|
||||
|
||||
add_subdirectory(${THIRDPARTY_DIR}/sdl2)
|
||||
|
||||
endif()
|
||||
@@ -39,13 +41,7 @@ if(BUILD_SDL AND BUILD_PLAYER AND NOT RPI)
|
||||
target_link_options(player-sdl PRIVATE -static)
|
||||
endif()
|
||||
|
||||
target_link_libraries(player-sdl PRIVATE tic80core SDL2main)
|
||||
|
||||
if(BUILD_STATIC)
|
||||
target_link_libraries(player-sdl PRIVATE SDL2-static)
|
||||
else()
|
||||
target_link_libraries(player-sdl PRIVATE SDL2)
|
||||
endif()
|
||||
target_link_libraries(player-sdl PRIVATE tic80core SDL2main SDL2-static)
|
||||
endif()
|
||||
|
||||
################################
|
||||
@@ -117,11 +113,7 @@ if(ANDROID)
|
||||
endif()
|
||||
|
||||
if(NOT EMSCRIPTEN)
|
||||
if(BUILD_STATIC)
|
||||
target_link_libraries(sdlgpu SDL2-static)
|
||||
else()
|
||||
target_link_libraries(sdlgpu SDL2)
|
||||
endif()
|
||||
target_link_libraries(sdlgpu SDL2-static)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
@@ -190,13 +182,9 @@ if(BUILD_SDL)
|
||||
else()
|
||||
if(EMSCRIPTEN)
|
||||
elseif(RPI)
|
||||
target_link_libraries(tic80 libSDL2.a bcm_host)
|
||||
target_link_libraries(tic80 libSDL2.a bcm_host pthread)
|
||||
else()
|
||||
if(BUILD_STATIC)
|
||||
target_link_libraries(tic80 SDL2-static)
|
||||
else()
|
||||
target_link_libraries(tic80 SDL2)
|
||||
endif()
|
||||
target_link_libraries(tic80 SDL2-static)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
# SQUIRREL
|
||||
################################
|
||||
|
||||
set(BUILD_WITH_SQUIRREL_DEFAULT TRUE)
|
||||
|
||||
option(BUILD_WITH_SQUIRREL "Squirrel Enabled" ${BUILD_WITH_SQUIRREL_DEFAULT})
|
||||
option(BUILD_WITH_SQUIRREL "Squirrel Enabled" ${BUILD_WITH_ALL})
|
||||
message("BUILD_WITH_SQUIRREL: ${BUILD_WITH_SQUIRREL}")
|
||||
|
||||
if(BUILD_WITH_SQUIRREL)
|
||||
|
||||
+1
-3
@@ -2,9 +2,7 @@
|
||||
# WASM
|
||||
################################
|
||||
|
||||
set(BUILD_WITH_WASM_DEFAULT TRUE)
|
||||
|
||||
option(BUILD_WITH_WASM "Wasm Enabled" ${BUILD_WITH_WASM_DEFAULT})
|
||||
option(BUILD_WITH_WASM "Wasm Enabled" ${BUILD_WITH_ALL})
|
||||
message("BUILD_WITH_WASM: ${BUILD_WITH_WASM}")
|
||||
|
||||
if(BUILD_WITH_WASM)
|
||||
|
||||
+1
-3
@@ -2,9 +2,7 @@
|
||||
# WREN
|
||||
################################
|
||||
|
||||
set(BUILD_WITH_WREN_DEFAULT TRUE)
|
||||
|
||||
option(BUILD_WITH_WREN "WREN Enabled" ${BUILD_WITH_WREN_DEFAULT})
|
||||
option(BUILD_WITH_WREN "WREN Enabled" ${BUILD_WITH_ALL})
|
||||
message("BUILD_WITH_WREN: ${BUILD_WITH_WREN}")
|
||||
|
||||
if(BUILD_WITH_WREN)
|
||||
|
||||
+13
-3
@@ -37,9 +37,9 @@
|
||||
# undef __TIC_WINDOWS__
|
||||
# define __TIC_WINDOWS__ 1
|
||||
# define TIC_MODULE_EXT ".dll"
|
||||
# if defined(_MSC_VER) && defined(_USING_V110_SDK71_)
|
||||
# define __TIC_WIN7__ 1
|
||||
# endif
|
||||
# if defined(_MSC_VER) && defined(_USING_V110_SDK71_)
|
||||
# define __TIC_WIN7__ 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(ANDROID) || defined(__ANDROID__)
|
||||
@@ -52,6 +52,16 @@
|
||||
# define TIC_MODULE_EXT ".so"
|
||||
#endif
|
||||
|
||||
#if defined(TIC_RUNTIME_STATIC)
|
||||
# define TIC_EXPORT
|
||||
#else
|
||||
# if defined(__TIC_WINDOWS__)
|
||||
# define TIC_EXPORT __declspec(dllexport)
|
||||
# elif defined(__GNUC__) && __GNUC__ >= 4
|
||||
# define TIC_EXPORT __attribute__ ((visibility("default")))
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef TIC80_API
|
||||
# if defined(TIC80_SHARED)
|
||||
# if defined(__TIC_WINDOWS__)
|
||||
|
||||
+11
-11
@@ -21,7 +21,7 @@
|
||||
// SOFTWARE.
|
||||
|
||||
#include "core/core.h"
|
||||
#include "lua_api.h"
|
||||
#include "luaapi.h"
|
||||
|
||||
#include "fennel.h"
|
||||
|
||||
@@ -41,12 +41,12 @@ static const char* execute_fennel_src = FENNEL_CODE(
|
||||
static bool initFennel(tic_mem* tic, const char* code)
|
||||
{
|
||||
tic_core* core = (tic_core*)tic;
|
||||
closeLua(tic);
|
||||
luaapi_close(tic);
|
||||
|
||||
lua_State* lua = core->currentVM = luaL_newstate();
|
||||
lua_open_builtins(lua);
|
||||
luaapi_open(lua);
|
||||
|
||||
initLuaAPI(core);
|
||||
luaapi_init(core);
|
||||
|
||||
{
|
||||
lua_State* fennel = core->currentVM;
|
||||
@@ -187,7 +187,7 @@ static const u8 DemoRom[] =
|
||||
#include "../build/assets/fenneldemo.tic.dat"
|
||||
};
|
||||
|
||||
const tic_script EXPORT_SCRIPT(Fennel) =
|
||||
TIC_EXPORT const tic_script EXPORT_SCRIPT(Fennel) =
|
||||
{
|
||||
.id = 14,
|
||||
.name = "fennel",
|
||||
@@ -195,15 +195,15 @@ const tic_script EXPORT_SCRIPT(Fennel) =
|
||||
.projectComment = ";;",
|
||||
{
|
||||
.init = initFennel,
|
||||
.close = closeLua,
|
||||
.tick = callLuaTick,
|
||||
.boot = callLuaBoot,
|
||||
.close = luaapi_close,
|
||||
.tick = luaapi_tick,
|
||||
.boot = luaapi_boot,
|
||||
|
||||
.callback =
|
||||
{
|
||||
.scanline = callLuaScanline,
|
||||
.border = callLuaBorder,
|
||||
.menu = callLuaMenu,
|
||||
.scanline = luaapi_scn,
|
||||
.border = luaapi_bdr,
|
||||
.menu = luaapi_menu,
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
+1
-1
@@ -1276,7 +1276,7 @@ static const u8 MarkRom[] =
|
||||
#include "../build/assets/janetmark.tic.dat"
|
||||
};
|
||||
|
||||
JANET_API const tic_script EXPORT_SCRIPT(Janet) =
|
||||
TIC_EXPORT const tic_script EXPORT_SCRIPT(Janet) =
|
||||
{
|
||||
.id = 18,
|
||||
.name = "janet",
|
||||
|
||||
+1
-1
@@ -1264,7 +1264,7 @@ static const u8 MarkRom[] =
|
||||
#include "../build/assets/jsmark.tic.dat"
|
||||
};
|
||||
|
||||
const tic_script EXPORT_SCRIPT(Js) =
|
||||
TIC_EXPORT const tic_script EXPORT_SCRIPT(Js) =
|
||||
{
|
||||
.id = 12,
|
||||
.name = "js",
|
||||
|
||||
+13
-1702
File diff suppressed because it is too large
Load Diff
+1720
File diff suppressed because it is too large
Load Diff
@@ -29,14 +29,11 @@
|
||||
#include <lualib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
extern void initLuaAPI(tic_core* core);
|
||||
extern void callLuaTick(tic_mem* tic);
|
||||
extern void callLuaBoot(tic_mem* tic);
|
||||
extern void callLuaScanlineName(tic_mem* tic, s32 row, void* data, const char* name);
|
||||
extern void callLuaScanline(tic_mem* tic, s32 row, void* data);
|
||||
extern void callLuaBorder(tic_mem* tic, s32 row, void* data);
|
||||
extern void callLuaOverline(tic_mem* tic, void* data);
|
||||
extern void callLuaMenu(tic_mem* tic, s32 index, void* data);
|
||||
extern void closeLua(tic_mem* tic);
|
||||
extern void callLuaTick(tic_mem* tic);
|
||||
extern void lua_open_builtins(lua_State *lua);
|
||||
void luaapi_init(tic_core* core);
|
||||
void luaapi_tick(tic_mem* tic);
|
||||
void luaapi_boot(tic_mem* tic);
|
||||
void luaapi_scn(tic_mem* tic, s32 row, void* data);
|
||||
void luaapi_bdr(tic_mem* tic, s32 row, void* data);
|
||||
void luaapi_menu(tic_mem* tic, s32 index, void* data);
|
||||
void luaapi_close(tic_mem* tic);
|
||||
void luaapi_open(lua_State *lua);
|
||||
+11
-11
@@ -21,7 +21,7 @@
|
||||
// SOFTWARE.
|
||||
|
||||
#include "core/core.h"
|
||||
#include "lua_api.h"
|
||||
#include "luaapi.h"
|
||||
|
||||
static const char _ms_loadstring[] = "_ms_loadstring";
|
||||
|
||||
@@ -77,15 +77,15 @@ extern s32 luaopen_lpeg(lua_State *lua);
|
||||
static bool initMoonscript(tic_mem* tic, const char* code)
|
||||
{
|
||||
tic_core* core = (tic_core*)tic;
|
||||
closeLua(tic);
|
||||
luaapi_close(tic);
|
||||
|
||||
lua_State* lua = core->currentVM = luaL_newstate();
|
||||
lua_open_builtins(lua);
|
||||
luaapi_open(lua);
|
||||
|
||||
luaopen_lpeg(lua);
|
||||
setloaded(lua, "lpeg");
|
||||
|
||||
initLuaAPI(core);
|
||||
luaapi_init(core);
|
||||
|
||||
{
|
||||
lua_State* moon = lua;
|
||||
@@ -196,7 +196,7 @@ static const u8 MarkRom[] =
|
||||
#include "../build/assets/moonmark.tic.dat"
|
||||
};
|
||||
|
||||
const tic_script EXPORT_SCRIPT(Moon) =
|
||||
TIC_EXPORT const tic_script EXPORT_SCRIPT(Moon) =
|
||||
{
|
||||
.id = 13,
|
||||
.name = "moon",
|
||||
@@ -204,15 +204,15 @@ const tic_script EXPORT_SCRIPT(Moon) =
|
||||
.projectComment = "--",
|
||||
{
|
||||
.init = initMoonscript,
|
||||
.close = closeLua,
|
||||
.tick = callLuaTick,
|
||||
.boot = callLuaBoot,
|
||||
.close = luaapi_close,
|
||||
.tick = luaapi_tick,
|
||||
.boot = luaapi_boot,
|
||||
|
||||
.callback =
|
||||
{
|
||||
.scanline = callLuaScanline,
|
||||
.border = callLuaBorder,
|
||||
.menu = callLuaMenu,
|
||||
.scanline = luaapi_scn,
|
||||
.border = luaapi_bdr,
|
||||
.menu = luaapi_menu,
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
+1
-1
@@ -1226,7 +1226,7 @@ static const u8 MarkRom[] =
|
||||
#include "../build/assets/rubymark.tic.dat"
|
||||
};
|
||||
|
||||
const tic_script EXPORT_SCRIPT(Ruby) =
|
||||
TIC_EXPORT const tic_script EXPORT_SCRIPT(Ruby) =
|
||||
{
|
||||
.id = 11,
|
||||
.name = "ruby",
|
||||
|
||||
+1
-1
@@ -1527,7 +1527,7 @@ static const u8 MarkRom[] =
|
||||
#include "../build/assets/pythonmark.tic.dat"
|
||||
};
|
||||
|
||||
PK_EXPORT const tic_script EXPORT_SCRIPT(Python) =
|
||||
TIC_EXPORT const tic_script EXPORT_SCRIPT(Python) =
|
||||
{
|
||||
.id = 20,
|
||||
.name = "python",
|
||||
|
||||
+1
-1
@@ -1028,7 +1028,7 @@ static const u8 MarkRom[] =
|
||||
#include "../build/assets/schememark.tic.dat"
|
||||
};
|
||||
|
||||
const tic_script EXPORT_SCRIPT(Scheme) =
|
||||
TIC_EXPORT const tic_script EXPORT_SCRIPT(Scheme) =
|
||||
{
|
||||
.id = 19,
|
||||
.name = "scheme",
|
||||
|
||||
+1
-1
@@ -1858,7 +1858,7 @@ static const u8 MarkRom[] =
|
||||
#include "../build/assets/squirrelmark.tic.dat"
|
||||
};
|
||||
|
||||
const tic_script EXPORT_SCRIPT(Squirrel) =
|
||||
TIC_EXPORT const tic_script EXPORT_SCRIPT(Squirrel) =
|
||||
{
|
||||
.id = 15,
|
||||
.name = "squirrel",
|
||||
|
||||
+1
-1
@@ -1322,7 +1322,7 @@ static const u8 MarkRom[] =
|
||||
#include "../build/assets/wasmmark.tic.dat"
|
||||
};
|
||||
|
||||
const tic_script EXPORT_SCRIPT(Wasm) =
|
||||
TIC_EXPORT const tic_script EXPORT_SCRIPT(Wasm) =
|
||||
{
|
||||
.id = 17,
|
||||
.name = "wasm",
|
||||
|
||||
+1
-1
@@ -1829,7 +1829,7 @@ static const u8 MarkRom[] =
|
||||
#include "../build/assets/wrenmark.tic.dat"
|
||||
};
|
||||
|
||||
const tic_script EXPORT_SCRIPT(Wren) =
|
||||
TIC_EXPORT const tic_script EXPORT_SCRIPT(Wren) =
|
||||
{
|
||||
.id = 16,
|
||||
.name = "wren",
|
||||
|
||||
Reference in New Issue
Block a user