add fast unsafe sendinput for roms
This commit is contained in:
parent
7cb6e531c5
commit
3baf0071cb
@ -157,5 +157,5 @@ function lualogic_rom_updatedata_final(%brick) {
|
||||
|
||||
// send output
|
||||
//talk("rom" SPC %brick SPC %data_str);
|
||||
lualogic_sendinput(%brick, 1, %data_str);
|
||||
lualogic_sendinput_raw(%brick, 1, %data_str);
|
||||
}
|
||||
|
@ -131,16 +131,14 @@ function lualogic_savedata(){
|
||||
lualogic_send("SAVE");
|
||||
}
|
||||
|
||||
function lualogic_sendinput(%gate, %argc, %arg0, %arg1, %arg2, %arg3, %arg4, %arg5, %arg6, %arg7, %arg8, %arg9, %arg10, %arg11, %arg12, %arg13, %arg14, %arg15)
|
||||
{
|
||||
function lualogic_sendinput(%gate, %argc, %arg0, %arg1, %arg2, %arg3, %arg4, %arg5, %arg6, %arg7, %arg8, %arg9, %arg10, %arg11, %arg12, %arg13, %arg14, %arg15) {
|
||||
%args = lualogic_expandescape(%arg0);
|
||||
for(%i = 1; %i < %argc; %i++)
|
||||
%args = %args @ ";" @ lualogic_expandescape(%arg[%i]);
|
||||
|
||||
if(%argc > 0)
|
||||
lualogic_send("IN;" @ %gate.getID() @ ";" @ %argc @ ";" @ %args);
|
||||
else
|
||||
lualogic_send("IN;" @ %gate.getID() @ ";" @ %argc);
|
||||
for(%i = 1; %i < %argc; %i++) { %args = %args @ ";" @ lualogic_expandescape(%arg[%i]); }
|
||||
lualogic_sendinput_raw(%gate, %argc, %args);
|
||||
}
|
||||
function lualogic_sendinput_raw(%gate, %argc, %args) {
|
||||
if(%argc > 0) { lualogic_send("IN;" @ %gate.getID() @ ";" @ %argc @ ";" @ %args); }
|
||||
else { lualogic_send("IN;" @ %gate.getID() @ ";0"); }
|
||||
}
|
||||
|
||||
function lualogic_ss(%obj, %state)
|
||||
|
Loading…
x
Reference in New Issue
Block a user