|
math Library - Arithmetical functions. Official documentation: Read Now |
| SCE_CTRL_CROSS - Key CROSS value in u32 format for Controls functions. |
| SCE_CTRL_SQUARE - Key SQUARE value in u32 format for Controls functions. |
| SCE_CTRL_CIRCLE - Key CIRCLE value in u32 format for Controls functions. |
| SCE_CTRL_TRIANGLE - Key TRIANGLE value in u32 format for Controls functions. |
| SCE_CTRL_START - Key START value in u32 format for Controls functions. |
| SCE_CTRL_SELECT - Key SELECT value in u32 format for Controls functions. |
| SCE_CTRL_RTRIGGER - Key RIGHT TRIGGER value in u32 format for Controls functions. |
| SCE_CTRL_LTRIGGER - Key LEFT TRIGGER value in u32 format for Controls functions. |
| SCE_CTRL_UP - Key UP value in u32 format for Controls functions. |
| SCE_CTRL_DOWN - Key DOWN value in u32 format for Controls functions. |
| SCE_CTRL_LEFT - Key LEFT value in u32 format for Controls functions. |
| SCE_CTRL_RIGHT - Key RIGHT value in u32 format for Controls functions. |
| SET - Seek SET value in u32 format for I/O functions. |
| CUR - Seek CUR (Current) value in u32 format for I/O functions. |
| END - Seek END value in u32 format for I/O functions. |
| FREAD - Attribute for I/O functions for opening a file with Read attribute. |
| FWRITE - Attribute for I/O functions for opening a file with Write attribute. |
| FCREATE - Attribute for I/O functions for opening a file with Create/Write attributes. |
| FRDWR - Attribute for I/O functions for opening a file with Read/Write attributes. |
|
s64 io.open(string file,int attribute) - Open a file. Sample usage: fileStream = io.open("cache0:/file.txt",FCREATE) |
|
string io.read(s64 filestream,u64 size) - Read from an opened file. Sample usage: text = io.read(fileStream,10) |
|
void io.write(s64 filestream,string text,u64 size) - Write a text in an opened file. Sample usage: io.write(fileStream,"Text written with LPP", 21) |
|
u64 io.size(s64 filestream) - Get size of an opened file. Sample usage: size = io.size(fileStream) |
|
u64 io.seek(s64 filestream,u32 pos,u8 type) - Move pointer in an opened file. Sample usage: size = io.seek(fileStream, 0, END) -- Move to the end of the file |
|
void io.close(s64 filestream, [bool extdata_file]) - Close an opened file. Sample usage: io.close(fileStream) |
|
void System.exit(void) - Exit homebrew and returns to Main Menu. Sample usage: System.exit() |
|
void System.deleteFile(string path) - Delete a file. Sample usage: System.deleteFile("cache0:/file.txt") |
|
void System.deleteDirectory(string path) - Delete a directory. Sample usage: System.deleteDirectory("cache0:/dir") |
|
void System.rename(string path,string path2) - Move or rename a file/directory. Sample usage: System.rename("cache0:/file.txt","cache0:/file.sh") |
|
void System.createDirectory(string path) - Create a directory. Sample usage: System.createDirectory("cache0:/test_dir") |
|
table System.listDirectory(string path) - List a directory. Sample usage: list_dir = System.listDirectory("cache0:/test_dir/") |
|
bool System.doesFileExist(string path) - Check if a file exists. Sample usage: System.doesFileExist("cache0:/test.txt") |
|
void System.wait(int microseconds) - Wait for an amount of microseconds. Sample usage: System.wait(800000) |
|
bool System.isBatteryCharging() - Check if battery is currently under charge. Sample usage: if System.isBatteryCharging() then ... end |
|
int System.getBatteryPercentage() - Returns battery lifetime percentage. Sample usage: percentage = System.getBatteryPercentage() |
|
int System.getBatteryLifetime() - Returns battery lifetime in seconds. Sample usage: lifetime = System.getBatteryLifetime() |
|
void System.powerTick() - Prevents PSVITA to go in standby mode. Sample usage: System.powerTick() |
|
int System.getCpuSpeed() - Gets current CPU clock rate. Sample usage: freq = System.getCpuSpeed() |
|
void System.setCpuSpeed(int freq) - Sets current CPU clock rate. Sample usage: System.setCpuSpeed(444) |
|
u32 Color.new(int r, int g, int b,[int a]) - Create a new RGB or RGBA color. Sample usage: red = Color.new(255,0,0) |
|
int Color.getR(u32 color) - Get R value of a color. Sample usage: red_value = Color.getR(Color.new(255,0,0)) |
|
int Color.getG(u32 color) - Get G value of a color. Sample usage: green_value = Color.getG(Color.new(255,0,0)) |
|
int Color.getB(u32 color) - Get B value of a color. Sample usage: blue_value = Color.getB(Color.new(255,0,0)) |
|
int Color.getA(u32 color) - Get A value of a color. Sample usage: alpha_value = Color.getA(Color.new(255,0,0)) |
|
void Screen.clear() - Clear screen. Sample usage: Screen.clear() |
|
void Screen.flip(void) - Flip screen. Sample usage: Screen.flip() |
|
void Graphics.initBlend(void) - Init drawing phase. Sample usage: Graphics.initBlend() |
|
void Graphics.termBlend(void) - Term drawing phase. Sample usage: Graphics.termBlend() |
|
void Graphics.debugPrint(float x, float y, string text, u32 color) - Write a string on screen. Sample usage: Graphics.debugPrint(0, 0, "Hello World", Color.new(255,255,255)) |
|
void Graphics.fillRect(float x1, float x2, float y1, float y2, u32 color) - Draw a rectangle. Sample usage: Graphics.fillRect(5, 20, 5, 40, Color.new(255,0,0)) |
|
void Graphics.drawLine(float x1, float x2, float y1, float y2, u32 color) - Draw a line. Sample usage: Graphics.drawLine(5, 20, 5, 40, Color.new(255,0,0)) |
|
void Graphics.drawPixel(float x, float y, u32 color) - Draw a pixel. Sample usage: Graphics.drawPixel(5, 5, Color.new(255,0,0)) |
|
void Graphics.fillCircle(float x, float y, float radius, u32 color) - Draw a circle. Sample usage: Graphics.fillCircle(5, 5, 1, Color.new(255,0,0)) |
|
u32 Graphics.loadImage(string file) - Load a JPG/PNG/BMP image. Sample usage: image = Graphics.loadImage("cache0:/image.jpg") |
|
void Graphics.drawImage(float x, float y, u32 image) - Draw a loaded image. Sample usage: Graphics.drawImage(10, 10, image) |
|
void Graphics.drawPartialImage(float x, float y, int img_x, int img_y, int width, int height, u32 image) - Draw a part of a loaded image. Sample usage: Graphics.drawPartialImage(10, 10, 5, 5, 50, 50, image) |
|
void Graphics.drawRotateImage(float x, float y, float radius, u32 image) - Draw a rotated image. Sample usage: Graphics.drawRotateImage(10, 10, 2.5, image) |
|
void Graphics.drawScaleImage(float x, float y, float x_scale, float y_scale, u32 image) - Draw a scaled image. Sample usage: Graphics.drawScaleImage(10, 10, 2.5, 2.5, image) |
|
void Graphics.drawImageExtended(float x, float y, int img_x, int_img_y, int width, int height, float x_scale, float y_scale, u32 image) - Draw a partial scaled image. Sample usage: Graphics.drawScaleImage(10, 10, 2.5, 2.5, image) |
|
u32 Graphics.createImage(int width, int height) - Create an empty image. Sample usage:img = Graphics.createImage(10, 10) |
|
u32 Graphics.getImageWidth(u32 image) - Get width of a loaded image. Sample usage:width = Graphics.getImageWidth(image) |
|
u32 Graphics.getImageHeight(u32 image) - Get height of a loaded image. Sample usage:height = Graphics.getImageHeight(image) |
|
void Graphics.freeImage(u32 image) - Free an image. Sample usage: Graphics.freeImage(image) |
|
u32 Font.load(string filename) - Load a TTF font. Sample usage: my_font = Font.load("/font.ttf") |
|
void Font.setPixelSizes(u32 font,u32 size) - Set size for a font. Sample usage: Font.setPixelSizes(my_font,18) |
|
void Font.print(u32 font, int x, int y, string text, u32 color) - Print a text with a font. Sample usage: Font.print(my_font, 5, 5, "Hello World!", Color.new(255,255,255)) |
|
void Font.unload(u32 font) - Free a font. Sample usage: Font.unload(my_font) |
|
u32 Controls.read(void) - Read controls input. Sample usage: pad = Controls.read() |
|
bool Controls.check(u32 controls,u32 button) - Check if a button is pressed. Sample usage: if (Controls.check(Controls.read(),KEY_A)) then ... end |
|
int,int Controls.readLeftAnalog(void) - Get X,Y position of Left Analog. Sample usage: x,y = Controls.readLeftAnalog() |
|
int,int Controls.readRightAnalog(void) - Get X,Y position of Right Analog. Sample usage: x,y = Controls.readRightAnalog() |
|
int, int, ... Controls.readTouch(void) - Get X,Y position of touchscreen pixel. Sample usage: x1,y1,x2,y2 = Controls.readTouch() |
|
int, int, ... Controls.readRetroTouch(void) - Get X,Y position of retrotouch pixel. Sample usage: x1,y1,x2,y2 = Controls.readRetroTouch() |
|
string ip, u32 port Network.initFTP() - Start FTP server. Sample usage: ip, port = Network.initFTP() |
|
void Network.termFTP() - Close FTP server. Sample usage: Network.termFTP() |
|
u32 Timer.new(void) - Create a new timer. Sample usage: timer = Timer.new() |
|
u32 Timer.getTime(u32 timer) - Returns time in milliseconds of timer object. Sample usage: time = Timer.getTime(timer) |
|
void Timer.destroy(u32 timer) - Free a timer object. Sample usage: Timer.destroy(timer) |
|
void Timer.reset(u32 timer) - Reset time of a timer object. Sample usage: Timer.reset(timer) |
|
void Timer.pause(u32 timer) - Pause a timer object. Sample usage: Timer.pause(timer) |
|
void Timer.resume(u32 timer) - Resume a timer object. Sample usage: Timer.resume(timer) |
|
bool Timer.isPlaying(u32 timer) - Check if a timer is paused or not. Sample usage: if Timer.isPlaying(timer) then .. end |