[script] add operators, add reboot to payload

- Add a function to reboot to payload
- Add an "Empty array" variable type that is created when you try to assign []. This will get filled with a valid entry upon first addition
- Adds operator string array plus string
This commit is contained in:
suchmememanyskill
2021-01-10 16:32:50 +01:00
parent 3f80693d9e
commit 963987d639
3 changed files with 70 additions and 23 deletions

View File

@@ -396,6 +396,12 @@ scriptFunction(funcGetMs){
return varInt(get_tmr_ms());
}
extern int launch_payload(char *path);
scriptFunction(funcLaunchPayload){
return varInt(launch_payload(vars[0].stringType));
}
u8 fiveInts[] = {IntType, IntType, IntType, IntType, IntType};
u8 singleIntArray[] = { IntArrayType };
u8 singleInt[] = { IntType };
@@ -448,6 +454,7 @@ functionStruct_t scriptFunctions[] = {
{"ncaGetType", funcGetNcaType, 1, singleStr},
{"saveSign", funcSignSave, 1, singleStr},
{"timerMs", funcGetMs, 0, NULL},
{"launchPayload", funcLaunchPayload, 1, singleStr},
// Left from old: keyboard(?)
};