Added support for the Squirrel programming language.
This commit is contained in:
@@ -134,6 +134,11 @@ typedef struct
|
||||
#if defined(TIC_BUILD_WITH_WREN)
|
||||
struct WrenVM* wren;
|
||||
#endif
|
||||
|
||||
#if defined(TIC_BUILD_WITH_SQUIRREL)
|
||||
struct SQVM* squirrel;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
blip_buffer_t* blip;
|
||||
@@ -169,6 +174,10 @@ s32 drawSpriteFont(tic_mem* memory, u8 symbol, s32 x, s32 y, s32 width, s32 heig
|
||||
s32 drawFixedSpriteFont(tic_mem* memory, u8 index, s32 x, s32 y, s32 width, s32 height, u8 chromakey, s32 scale);
|
||||
void parseCode(const tic_script_config* config, const char* start, u8* color, const tic_code_theme* theme);
|
||||
|
||||
#if defined(TIC_BUILD_WITH_SQUIRREL)
|
||||
const tic_script_config* getSquirrelScriptConfig();
|
||||
#endif
|
||||
|
||||
#if defined(TIC_BUILD_WITH_LUA)
|
||||
const tic_script_config* getLuaScriptConfig();
|
||||
|
||||
|
||||
1558
src/squirrelapi.c
Normal file
1558
src/squirrelapi.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1153,7 +1153,7 @@ static void processGamepadMapping()
|
||||
|
||||
for(s32 i = 0; i < KEYMAP_COUNT; i++)
|
||||
if(impl.keycodes[i] && tic->api.key(tic, impl.keycodes[i]))
|
||||
tic->ram.input.gamepads.data |= 1 << i;
|
||||
tic->ram.input.gamepads.data |= 1 << i;
|
||||
}
|
||||
|
||||
static bool isGameMenu()
|
||||
|
||||
11
src/tic.c
11
src/tic.c
@@ -559,6 +559,10 @@ void tic_close(tic_mem* tic)
|
||||
|
||||
machine->state.initialized = false;
|
||||
|
||||
#if defined(TIC_BUILD_WITH_SQUIRREL)
|
||||
getSquirrelScriptConfig()->close(tic);
|
||||
#endif
|
||||
|
||||
#if defined(TIC_BUILD_WITH_LUA)
|
||||
getLuaScriptConfig()->close(tic);
|
||||
|
||||
@@ -1586,12 +1590,19 @@ static const tic_script_config* getScriptConfig(const char* code)
|
||||
return getWrenScriptConfig();
|
||||
#endif
|
||||
|
||||
#if defined(TIC_BUILD_WITH_SQUIRREL)
|
||||
if (compareMetatag(code, "script", "squirrel", getSquirrelScriptConfig()->singleComment))
|
||||
return getSquirrelScriptConfig();
|
||||
#endif
|
||||
|
||||
#if defined(TIC_BUILD_WITH_LUA)
|
||||
return getLuaScriptConfig();
|
||||
#elif defined(TIC_BUILD_WITH_JS)
|
||||
return getJsScriptConfig();
|
||||
#elif defined(TIC_BUILD_WITH_WREN)
|
||||
return getWrenScriptConfig();
|
||||
#elif defined(TIC_BUILD_WITH_SQUIRREL)
|
||||
return getSquirrelScriptConfig();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user