mirror of
https://github.com/suchmememanyskill/TegraExplorer.git
synced 2024-11-09 13:41:45 +00:00
add setpixels, printpos
This commit is contained in:
parent
d3aa69308e
commit
fb3951435f
2 changed files with 21 additions and 9 deletions
|
@ -7,13 +7,9 @@ a.print()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mountsys("SYSTEM")
|
printpos(20, 30)
|
||||||
s = readsave("sd:/8000000000000120")
|
setpixels(0, 0, 1279, 100, 0xFF0000)
|
||||||
f = s.read("/meta/imkvdb.arc")
|
println("sup")
|
||||||
println(f.len())
|
|
||||||
println(f.slice(1,1).project()[0])
|
|
||||||
s.write("/meta/imkvdb.arc", ["BYTE[]", 1,2]).print()
|
|
||||||
s.commit().print()
|
|
||||||
|
|
||||||
#a = s.readdir("/")
|
#a = s.readdir("/")
|
||||||
pause()
|
pause()
|
||||||
|
@ -24,6 +20,8 @@ println(a.files.len())
|
||||||
println(a.folders.len())
|
println(a.folders.len())
|
||||||
println(a.fileSizes.len())
|
println(a.fileSizes.len())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
a.files.foreach("b") {
|
a.files.foreach("b") {
|
||||||
println(b)
|
println(b)
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,6 +162,18 @@ ClassFunction(stdSetPixel) {
|
||||||
return &emptyClass;
|
return &emptyClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ClassFunction(stdSetPixels){
|
||||||
|
gfx_box(getIntValue(args[0]), getIntValue(args[1]), getIntValue(args[2]), getIntValue(args[3]), (u32)getIntValue(args[4]));
|
||||||
|
return &emptyClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
ClassFunction(stdSetPrintPos){
|
||||||
|
if (getIntValue(args[0]) > 0 && getIntValue(args[1]) > 0){
|
||||||
|
gfx_con_setpos((getIntValue(args[0]) % 78) * 16, (getIntValue(args[1]) % 42) * 16);
|
||||||
|
}
|
||||||
|
return &emptyClass;
|
||||||
|
}
|
||||||
|
|
||||||
// Takes [str]. Returns empty. str: path to dir
|
// Takes [str]. Returns empty. str: path to dir
|
||||||
ClassFunction(stdReadDir){
|
ClassFunction(stdReadDir){
|
||||||
Variable_t* resPtr = newIntVariablePtr(0);
|
Variable_t* resPtr = newIntVariablePtr(0);
|
||||||
|
@ -441,7 +453,7 @@ STUBBED(stdFileRead)
|
||||||
u8 oneIntoneFunction[] = { IntClass, FunctionClass };
|
u8 oneIntoneFunction[] = { IntClass, FunctionClass };
|
||||||
u8 doubleFunctionClass[] = { FunctionClass, FunctionClass };
|
u8 doubleFunctionClass[] = { FunctionClass, FunctionClass };
|
||||||
u8 oneStringArgStd[] = {StringClass};
|
u8 oneStringArgStd[] = {StringClass};
|
||||||
u8 threeIntsStd[] = { IntClass, IntClass, IntClass };
|
u8 threeIntsStd[] = { IntClass, IntClass, IntClass, IntClass, IntClass };
|
||||||
u8 twoStringArgStd[] = {StringClass, StringClass};
|
u8 twoStringArgStd[] = {StringClass, StringClass};
|
||||||
u8 oneIntStd[] = {IntClass};
|
u8 oneIntStd[] = {IntClass};
|
||||||
u8 menuArgsStd[] = {StringArrayClass, IntClass, IntArrayClass};
|
u8 menuArgsStd[] = {StringArrayClass, IntClass, IntArrayClass};
|
||||||
|
@ -461,7 +473,9 @@ ClassFunctionTableEntry_t standardFunctionDefenitions[] = {
|
||||||
// Utils
|
// Utils
|
||||||
{"print", stdPrint, VARARGCOUNT, 0},
|
{"print", stdPrint, VARARGCOUNT, 0},
|
||||||
{"println", stdPrintLn, VARARGCOUNT, 0},
|
{"println", stdPrintLn, VARARGCOUNT, 0},
|
||||||
{"setpixel", stdSetPixel, 3, threeIntsStd}, // TODO: change for setblock
|
{"printpos", stdSetPrintPos, 2, threeIntsStd},
|
||||||
|
{"setpixel", stdSetPixel, 3, threeIntsStd},
|
||||||
|
{"setpixels", stdSetPixels, 5, threeIntsStd},
|
||||||
{"emu", stdHasEmu, 0, 0},
|
{"emu", stdHasEmu, 0, 0},
|
||||||
{"clear", stdClear, 0, 0},
|
{"clear", stdClear, 0, 0},
|
||||||
{"timer", stdGetMs, 0, 0},
|
{"timer", stdGetMs, 0, 0},
|
||||||
|
|
Loading…
Reference in a new issue