mirror of
https://github.com/suchmememanyskill/TegraExplorer.git
synced 2024-12-26 19:36:03 +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")
|
||||
s = readsave("sd:/8000000000000120")
|
||||
f = s.read("/meta/imkvdb.arc")
|
||||
println(f.len())
|
||||
println(f.slice(1,1).project()[0])
|
||||
s.write("/meta/imkvdb.arc", ["BYTE[]", 1,2]).print()
|
||||
s.commit().print()
|
||||
printpos(20, 30)
|
||||
setpixels(0, 0, 1279, 100, 0xFF0000)
|
||||
println("sup")
|
||||
|
||||
#a = s.readdir("/")
|
||||
pause()
|
||||
|
@ -24,6 +20,8 @@ println(a.files.len())
|
|||
println(a.folders.len())
|
||||
println(a.fileSizes.len())
|
||||
|
||||
|
||||
|
||||
a.files.foreach("b") {
|
||||
println(b)
|
||||
}
|
||||
|
|
|
@ -162,6 +162,18 @@ ClassFunction(stdSetPixel) {
|
|||
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
|
||||
ClassFunction(stdReadDir){
|
||||
Variable_t* resPtr = newIntVariablePtr(0);
|
||||
|
@ -441,7 +453,7 @@ STUBBED(stdFileRead)
|
|||
u8 oneIntoneFunction[] = { IntClass, FunctionClass };
|
||||
u8 doubleFunctionClass[] = { FunctionClass, FunctionClass };
|
||||
u8 oneStringArgStd[] = {StringClass};
|
||||
u8 threeIntsStd[] = { IntClass, IntClass, IntClass };
|
||||
u8 threeIntsStd[] = { IntClass, IntClass, IntClass, IntClass, IntClass };
|
||||
u8 twoStringArgStd[] = {StringClass, StringClass};
|
||||
u8 oneIntStd[] = {IntClass};
|
||||
u8 menuArgsStd[] = {StringArrayClass, IntClass, IntArrayClass};
|
||||
|
@ -461,7 +473,9 @@ ClassFunctionTableEntry_t standardFunctionDefenitions[] = {
|
|||
// Utils
|
||||
{"print", stdPrint, 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},
|
||||
{"clear", stdClear, 0, 0},
|
||||
{"timer", stdGetMs, 0, 0},
|
||||
|
|
Loading…
Reference in a new issue