This repository has been archived by the owner on Nov 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEngine_Merged.json
1 lines (1 loc) · 84.1 KB
/
Engine_Merged.json
1
{"Peripherals":{"Audio":{"availableSince":[0,7,0],"lastUpdatedIn":[0,8,0],"methods":{"generate":{"arguments":[{"description":"The waveform id, it should be at least 0, but no more then 5.","name":"wave","type":"number"},{"description":"The frequency of the tune.","name":"freq","type":"number"},{"description":"The amplitude of the tune.","name":"amp","type":"number"}],"availableSince":[[1,0,0],[0,7,0]],"lastUpdatedIn":[[1,0,0],[0,8,0]],"shortDescription":"Generates a tune from wave, frequency, and amplitude"},"play":{"arguments":[{"description":"The sound effect data.","name":"sfx","type":"table"},{"default":"0","description":"A channel from 0 to 3.","name":"chn","type":"number"}],"availableSince":[[1,0,0],[0,7,0]],"lastUpdatedIn":[[1,0,0],[0,8,0]],"shortDescription":"Plays a sound effect over a channel."},"stop":{"availableSince":[[1,0,0],[0,7,0]],"lastUpdatedIn":[[1,0,0],[0,8,0]],"shortDescription":"Stops the playing music."}},"name":"Audio","shortDescription":"Allows the generation of chiptune audio.","version":[1,0,0]},"BIOS":{"availableSince":[0,6,0],"fullDescription":"Provides APIs to get information about the peripherals, and their methods, are the direct or indirect.\n\nAlso gives info about LIKO-12's version, and previous version when updated from an old one (only the first boot with the new version).\nStarting with LIKO-12 0.9.0, It also gives the .love of LIKO-12.","lastUpdatedIn":[1,0,0],"methods":{"HandledAPIS":{"availableSince":[[1,15,2],[0,7,0]],"extra":"The peripherals handled APIS is a table where the keys and values are:\n- **Keys**: The mount name.\n- **Values**: The peripheral methods (functions).","lastUpdatedIn":[[1,15,2],[0,7,0]],"notes":["The HandledAPIS table is passed to the operating system's `boot.lua` as an argument:\n```lua\n--In C:/boot.lua\nlocal HandledAPIS = ...\n```"],"returns":[{"description":"The peripherals handled APIS.","name":"HandledAPIS","type":"table"}],"shortDescription":"Returns the handled peripherals APIS, that can be used directly."},"PeripheralFunctions":{"arguments":[{"description":"The peripheral mount name.","name":"mountName","type":"string"}],"availableSince":[[1,15,2],[0,7,0]],"extra":"The peripheral functions list is a table where the keys and values are:\n- **Keys**: The function/method name.\n- **Values**: The function/method type (`\"Direct\"` or `\"Yield\"`).","lastUpdatedIn":[[1,15,2],[0,7,0]],"notes":["It's good to know if a method/function is a yield or direct one:\n- **Direct Methods** are called directly, _fast_.\n- **Yielding Methods** requires a coroutine yield, _slow_."],"returns":[{"description":"The peripheral functions list.","name":"functions","type":"table"}],"shortDescription":"Returns the list of available peripheral functions, and their type (Direct,Yield)."},"Peripherals":{"availableSince":[[1,15,2],[0,7,0]],"extra":"The peripherals list is a table where the keys and values are:\n- **Keys**: The mount name.\n- **Values**: The peripheral type.","lastUpdatedIn":[[1,15,2],[0,7,0]],"returns":[{"description":"The peripherals list.","name":"peripherals","type":"table"}],"shortDescription":"Returns a list of mounted peripherals and their types."},"getSRC":{"availableSince":[[1,18,2],[1,0,0]],"lastUpdatedIn":[[1,18,2],[1,0,0]],"notes":["`LIKO-12_Source.love` is created at the first boot whenever a different LIKO-12 version is used, with the message `Generating internal file...` shown."],"returns":[{"description":"The file data of LIKO-12's source code .love file.","name":"LIKO_SRC","type":["string","boolean"]},{"description":"The failure reason if `LIKO_SRC` was `false`.","name":"err","type":["string","nil"]}],"shortDescription":"Returns `LIKO-12_Source.love` data."},"getVersion":{"availableSince":[[1,15,2],[0,7,0]],"lastUpdatedIn":[[1,15,2],[0,7,0]],"notes":["The `LIKO_Old` value is only provided when LIKO-12 boots for the __first time__ with the new version."],"returns":[{"description":"Current LIKO-12's version string (ex: `1.0.0_DEV`).","name":"LIKO_Version","type":"string"},{"description":"The previous installed LIKO-12's version string (ex: `0.8.0_PRE`).","name":"LIKO_Old","type":["string","nil"]}],"shortDescription":"Returns LIKO-12's Version."},"isFirstBoot":{"availableSince":[[1,18,3],[1,0,0]],"lastUpdatedIn":[[1,18,3],[1,0,0]],"returns":[{"description":"True when this is the first boot of LIKO-12 ever.","name":"FirstBoot","type":"boolean"}],"shortDescription":"Tells if this is the first boot of LIKO-12 ever."}},"name":"Basic Integrated Operating System","shortDescription":"Gives access to miscellaneous functions.","version":[1,18,3]},"CPU":{"availableSince":[0,6,0],"events":{"update":{"arguments":[{"description":"The time passed since the previous `update` triggered, measured in seconds.","name":"dt","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["`update` is triggered 60 times a second for most of the devices, but that depends on the screen refresh rate, so it can be more or less!","`update` can be triggered for over than 2000 times a second if the vsync of the GPU was disabled due to user's configuration!"],"shortDescription":"Triggered almost every frame, with the delta-time between each called passed in."}},"lastUpdatedIn":[0,8,0],"methods":{"clearClipboard":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Clears the clipboard content."},"clearEStack":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Clears the events stack."},"clipboard":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Read or write to/from the clipboard.","usages":[{"name":"Read the clipboard content:","returns":[{"description":"The clipboard content.","name":"content","type":"string"}]},{"arguments":[{"description":"The new clipboard content.","name":"content","type":["string","number"]}],"name":"Set the clipboard content:"}]},"cprint":{"arguments":[{"description":"The text to print.","name":"text","type":"any"},{"default":"nil","description":"Will be automatically concated with the first argument, works the same way of the standard Lua print.","name":"...","type":"any"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Print into the developer terminal, that can be shown by running LIKO-12 from terminal."},"getFPS":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The FPS.","name":"fps","type":"number"}],"shortDescription":"Returns the current frame per second count."},"getHostOS":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The current operating system. \"OS X\", \"Windows\", \"Linux\", \"Android\" or \"iOS\".","name":"os","type":"string"}],"shortDescription":"Returns the operating system that's LIKO-12 is running on."},"getSaveDirectory":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"LIKO-12 save directory (the appdata directory) in the HOST filesystem.","name":"dir","type":"string"}],"shortDescription":"Returns LIKO-12 save directory (the appdata directory) in the HOST filesystem."},"isMobile":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"Is LIKO-12 running on a mobile device ?","name":"mobile","type":"boolean"}],"shortDescription":"Returns true if LIKO-12 is running on a mobile device (Android or iOS)."},"openAppdata":{"arguments":[{"description":"The directory to open in the HOST file explorer.","name":"dir","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"longDescription":"Opens a specific directory inside the LIKO-12 appdata folder using the HOST file explorer.\n\nIn order to show a folder inside the virtual drives open `/drives/[driveName]/...`.","shortDescription":"Opens a specific directory inside the LIKO-12 appdata folder using the HOST file explorer."},"pullEvent":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"longDescription":"This function is used internally by DiskOS to run the default event loop, which calls the callback functions that start by `_` like `_update` and `_mousepressed`, etc..\n\nEvents in LIKO-12 may be pulled directly, or pulled from a stack if there are already, the stack may fill up when CPU `sleep()` or GPU `flip()` are called.","returns":[{"description":"The event name, can be any of the callbacks names without the \"_\" at the start.","name":"event","type":"string"},{"description":"First argument.","name":"a","type":"any"},{"description":"Second argument.","name":"b","type":"any"},{"description":"Third argument.","name":"c","type":"any"},{"description":"Forth argument.","name":"d","type":"any"},{"description":"Fifth argument.","name":"e","type":"any"},{"description":"Sixth argument.","name":"f","type":"any"}],"shortDescription":"Pulls an event from the events stack."},"rawPullEvent":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The event name, can be any of the callbacks names without the \"_\" at the start.","name":"event","type":"string"},{"description":"First argument.","name":"a","type":"any"},{"description":"Second argument.","name":"b","type":"any"},{"description":"Third argument.","name":"c","type":"any"},{"description":"Forth argument.","name":"d","type":"any"},{"description":"Fifth argument.","name":"e","type":"any"},{"description":"Sixth argument.","name":"f","type":"any"}],"shortDescription":"Pulls a new event directly, returns it and stores it in the events stack, used by DiskOS to handle the `escape` key."},"reboot":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Reboot LIKO-12.","usages":[{"name":"Soft Reboot:","shortDescription":"Soft reboots LIKO-12 by doing an internal trick to reload the BIOS and bootup again, will leave some garbage that will be cleaned automatically by the Lua garbage collector."},{"arguments":[{"default":"true","type":"boolean"}],"name":"Hard Reboot:","shortDescription":"Hard reboots LIKO-12 by reinitializing the LÖVE engine, will clear the whole Lua state, and re-create the window."}]},"shutdown":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Shutdown/exit LIKO-12."},"sleep":{"arguments":[{"description":"The amount of seconds to sleep.","name":"time","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Sleeps (pauses) the current execution for specific amount of seconds."},"triggerEvent":{"arguments":[{"description":"The event name.","name":"event","type":"string"},{"default":"nil","description":"First argument.","name":"a","type":"any"},{"default":"nil","description":"Second argument.","name":"b","type":"any"},{"default":"nil","description":"Third argument.","name":"c","type":"any"},{"default":"nil","description":"Forth argument.","name":"d","type":"any"},{"default":"nil","description":"Fifth argument.","name":"e","type":"any"},{"default":"nil","description":"Sixth argument.","name":"f","type":"any"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Add a new event to the events stack."}},"name":"Central Processing Unit","shortDescription":"This peripheral contains most of miscellaneous functions that LIKO-12 would use.","version":[1,0,0]},"FDD":{"availableSince":[0,6,0],"lastUpdatedIn":[0,8,0],"methods":{"exportDisk":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The current floppy disk.","name":"fimg","type":"string"}],"shortDescription":"Exports current floppy disk"},"importDisk":{"arguments":[{"description":"Disk to import.","name":"data","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Imports and mounts a floppy disk"},"newDisk":{"arguments":[{"default":"\"Blue\"","description":"Template name, without the .png extension.","name":"tname","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Creates a new floppy disk and mounts it"}},"name":"Floppy Disk Drive","shortDescription":"This peripheral is responsible for loading and reading data inside of PNGs, invisibly to the user.","version":[1,0,0]},"GPU":{"availableSince":[0,6,0],"events":{"filedropped":{"arguments":[{"description":"The filename of the dropped file.","name":"filename","type":"string"},{"description":"The content of the dropped file.","name":"data","type":"string"}],"availableSince":[[1,0,0],[0,7,0]],"lastUpdatedIn":[[1,0,0],[0,7,0]],"shortDescription":"Triggered when a file is dropped into LIKO-12's window."},"mousemoved":{"arguments":[{"description":"Mouse x position, in pixels.","name":"x","type":"number"},{"description":"Mouse y position, in pixels.","name":"y","type":"number"},{"description":"The amount moved along the x-axis since the last time mousemoved was triggered.","name":"dx","type":"number"},{"description":"The amount moved along the y-axis since the last time mousemoved was triggered.","name":"dy","type":"number"},{"description":"True if the mouse move originated from a touchscreen touch-move.","name":"istouch","type":"boolean"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Triggered when the mouse is moved, or if a screen touch was moved."},"mousepressed":{"arguments":[{"description":"Mouse x position, in pixels.","name":"x","type":"number"},{"description":"Mouse y position, in pixels.","name":"y","type":"number"},{"description":"The button index that was pressed. 1 is the primary mouse button, 2 is the secondary mouse button and 3 is the middle button. Further buttons are mouse dependent.","name":"button","type":"number"},{"description":"True if the mouse button press originated from a touchscreen touch-press.","name":"istouch","type":"boolean"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Triggered when a mouse button is pressed, or if the screen was touched."},"mousereleased":{"arguments":[{"description":"Mouse x position, in pixels.","name":"x","type":"number"},{"description":"Mouse y position, in pixels.","name":"y","type":"number"},{"description":"The button index that was released. 1 is the primary mouse button, 2 is the secondary mouse button and 3 is the middle button. Further buttons are mouse dependent.","name":"button","type":"number"},{"description":"True if the mouse button release originated from a touchscreen touch-release.","name":"istouch","type":"boolean"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Triggered when a mouse button is released, or if the screen was no longer touched."},"touchmoved":{"arguments":[{"description":"The identifier for the touch press.","name":"id","type":"userdata"},{"description":"The x-axis position of the touch press inside the window, in pixels.","name":"x","type":"number"},{"description":"The y-axis position of the touch press inside the window, in pixels.","name":"y","type":"number"},{"description":"The x-axis movement of the touch press inside the window, in pixels.","name":"dx","type":"number"},{"description":"The y-axis movement of the touch press inside the window, in pixels.","name":"dy","type":"number"},{"description":"The amount of pressure being applied. Most touch screens aren't pressure sensitive, in which case the pressure will be 1.","name":"pressure","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["The identifier is only guaranteed to be unique for the specific touch press until touchreleased is triggered with that identifier, at which point it may be reused for new touch presses."],"shortDescription":"Triggered when a touch press moves inside the touchscreen."},"touchpressed":{"arguments":[{"description":"The identifier for the touch press.","name":"id","type":"userdata"},{"description":"The x-axis position of the touch press inside the window, in pixels.","name":"x","type":"number"},{"description":"The y-axis position of the touch press inside the window, in pixels.","name":"y","type":"number"},{"description":"The x-axis movement of the touch press inside the window, in pixels. This should always be zero.","name":"dx","type":"number"},{"description":"The y-axis movement of the touch press inside the window, in pixels. This should always be zero.","name":"dy","type":"number"},{"description":"The amount of pressure being applied. Most touch screens aren't pressure sensitive, in which case the pressure will be 1.","name":"pressure","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["The identifier is only guaranteed to be unique for the specific touch press until touchreleased is triggered with that identifier, at which point it may be reused for new touch presses."],"shortDescription":"Triggered when the touchscreen is touched."},"touchreleased":{"arguments":[{"description":"The identifier for the touch press.","name":"id","type":"userdata"},{"description":"The x-axis position of the touch press inside the window, in pixels.","name":"x","type":"number"},{"description":"The y-axis position of the touch press inside the window, in pixels.","name":"y","type":"number"},{"description":"The x-axis movement of the touch press inside the window, in pixels.","name":"dx","type":"number"},{"description":"The y-axis movement of the touch press inside the window, in pixels.","name":"dy","type":"number"},{"description":"The amount of pressure being applied. Most touch screens aren't pressure sensitive, in which case the pressure will be 1.","name":"pressure","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["The identifier is only guaranteed to be unique for the specific touch press until touchreleased is triggered with that identifier, at which point it may be reused for new touch presses."],"shortDescription":"Triggered when the touchscreen stops being touched."},"wheelmoved":{"arguments":[{"description":"Amount of horizontal mouse wheel movement. Positive values indicate movement to the right.","name":"x","type":"number"},{"description":"Amount of vertical mouse wheel movement. Positive values indicate upward movement.","name":"y","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Triggered when the mouse wheel is moved."}},"lastUpdatedIn":[0,8,0],"methods":{"_systemMessage":{"arguments":[{"description":"The message to show.","name":"msg","type":"string"},{"default":"1","description":"How long the message to be shown, (in seconds).","name":"time","type":"number"},{"default":"4","description":"The color of the text (0-15).","name":"tColor","type":"number"},{"default":"9","description":"The color of the background (0-15).","name":"bgColor","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Shows a system message: A single line message at the bottom of the screen."},"cam":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["The transforming operations sums up, to reset check the fifth usage of this function."],"shortDescription":"Transforms the drawing operations.","usages":[{"arguments":[{"default":"\"translate\"","type":"string"},{"description":"The translation relative to the x-axis.","name":"x","type":"number"},{"description":"The translation relative to the y-axis.","name":"y","type":"number"}],"name":"Translate drawing positions:","shortDescription":"Shifts all drawing operations."},{"arguments":[{"default":"\"scale\"","type":"string"},{"description":"The scaling in the direction of the x-axis.","name":"sx","type":"number"},{"description":"The scaling in the direction of the y-axis.","name":"sy","type":"number"}],"name":"Scale drawing operations:","shortDescription":"Scales all the drawing operations."},{"arguments":[{"default":"\"rotate\"","type":"string"},{"description":"The amount to rotate the coordinate system in radians.","name":"a","type":"number"}],"name":"Rotate drawing operations:"},{"arguments":[{"default":"\"shear\"","type":"string"},{"description":"The shear factor on the x-axis.","name":"x","type":"number"},{"description":"The shear factor on the y-axis.","name":"y","type":"number"}],"name":"Shear drawing operations:"},{"name":"Reset all the tranformations:","shortDescription":"Resets all the tranformations done back to their original state."}]},"circle":{"arguments":[{"description":"The x coord of circle center.","name":"x","type":"number"},{"description":"The y coord of circle center.","name":"y","type":"number"},{"description":"The radius of circle.","name":"r","type":"number"},{"description":"(false/nil) The circle will be filled, (true) The circle will have only lines (outline).","name":"l","type":"boolean"},{"description":"The color of the circle (0-15), defaults to the active color.","name":"c","type":"number"},{"description":"The number of the segments used when drawing the circle.","name":"seg","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["The arguments can be passed in a table."],"shortDescription":"Draws a circle on the screen."},"clear":{"arguments":[{"default":"0","description":"The ID of the color to fill the screen with, can be 0-15.","name":"id","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Clears the screen and fills it with a specific color, useful when clearing the screen for a new frame."},"clearMatrixStack":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Clears the matrix stack (By calling `popMatrix()`)."},"clip":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Sets the region that the GPU can draw on.","usages":[{"arguments":[{"description":"The top-left X coord of the clipping area.","name":"x","type":"number"},{"description":"The top-left Y coord of the clipping area.","name":"y","type":"number"},{"description":"The width of the clipping area.","name":"w","type":"number"},{"description":"The height of the clipping area.","name":"h","type":"number"}],"name":"Enable clipping:","note":"The arguments can be passed in a table."},{"name":"Disable clipping:"}]},"color":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"longDescription":"Set's the current active color.\n\n---\n\n![Palette](_media/Palette.png)","shortDescription":"Set's the current active color.","usages":[{"arguments":[{"description":"The new active color id (0-15).","name":"id","type":"number"}],"name":"Set the current active color:"},{"name":"Get the current active color:","returns":[{"description":"The current active color id (0-15).","name":"id","type":"number"}]}]},"colorPalette":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Allows you to read and modify the real RGBA values of a color in the palette.","usages":[{"arguments":[{"description":"The color id.","name":"id","type":"number"}],"name":"Read the RGB values of a color:","returns":[{"description":"The channel red value [0-225]","name":"r","type":"number"},{"description":"The channel green value [0-225]","name":"g","type":"number"},{"description":"The channel blue value [0-225]","name":"b","type":"number"}]},{"arguments":[{"description":"The color id.","name":"id","type":"number"},{"description":"The channel red value [0-225]","name":"r","type":"number"},{"description":"The channel green value [0-225]","name":"g","type":"number"},{"description":"The channel blue value [0-225]","name":"b","type":"number"}],"name":"Set the RGB values of a color:"},{"name":"Reset the palette colors to their defaults (PICO-8 Palette):"}]},"cursor":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Sets the current active mouse cursor, or creates a new one.","usages":[{"arguments":[{"description":"The name of the cursor.","name":"name","type":"string"},{"default":"false","description":"True -> Grap the cursor to the pixelated screen.","name":"grap","type":"boolean"}],"name":"Set the current mouse cursor:"},{"name":"Get the current mouse cursor:","returns":[{"description":"The current active cursor name.","name":"current","type":"string"}]},{"arguments":[{"description":"The imagedata of the cursor.","name":"imgdata","type":[["Peripherals","GPU","objects","imageData"]]},{"default":"\"default\"","description":"The name of the cursor.","name":"name","type":"string"},{"default":"0","description":"The X coord of the cursor hot position.","name":"hx","type":"number"},{"default":"0","description":"The Y coord of the cursor hot position.","name":"hy","type":"number"}],"name":"Create a new cursor:"}]},"ellipse":{"arguments":[{"description":"The x coord of ellipse center.","name":"x","type":"number"},{"description":"The y coord of ellipse center.","name":"y","type":"number"},{"description":"The radius of the ellipse along the x-axis (half the ellipse's width).","name":"rx","type":"number"},{"description":"The radius of the ellipse along the y-axis (half the ellipse's height).","name":"ry","type":"number"},{"default":"false","description":"(false/nil) The ellipse will be filled, (true) The ellipse will have only lines (outline).","name":"l","type":"boolean"},{"description":"The color of the ellipse (0-15), defaults to the active color.","name":"r","type":"number"},{"description":"The number of the segments used when drawing the ellipse.","name":"seg","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["The arguments can be passed in a table"],"shortDescription":"Draws an ellipse on the screen."},"endGifRecording":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"End LIKO-12 screen Gif recording by code."},"flip":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Waits till the screen is applied and shown to the user, helpful when doing some loading operations."},"fontHeight":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The height of the font character.","name":"height","type":"number"}],"shortDescription":"Returns height of the font character in pixels."},"fontSize":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The height of the font character.","name":"height","type":"number"},{"description":"The width of the font character.","name":"width","type":"number"}],"shortDescription":"Returns size of the font character in pixels."},"fontWidth":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The width of the font character.","name":"width","type":"number"}],"shortDescription":"Returns width of the font character in pixels."},"getLabelImage":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The imagedata object of the label.","name":"limg","type":[["Peripherals","GPU","objects","imageData"]]}],"shortDescription":"Returns the imagedata object of LabelImage, which can be capture by pressing F6, It will automatically update to the latest capture."},"getMPos":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The x position of the mouse.","name":"mx","type":"number"},{"description":"The y position of the mouse.","name":"my","type":"number"}],"shortDescription":"Gets position of the mouse."},"image":{"arguments":[{"description":"The image data, must be in Image format.","name":"data","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The created image object.","name":"img","type":[["Peripherals","GPU","objects","image"]]}],"shortDescription":"Creats a new image that can be used for drawing."},"imagedata":{"arguments":[{"description":"The image data, (png binary string or in lk12 format)","name":"data","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["All transparent pixels and all colors that are not from the palette will be loaded as black!"],"returns":[{"description":"The created imagedata object.","name":"imgdata","type":[["Peripherals","GPU","objects","imageData"]]}],"shortDescription":"Creates a new imagedata object, which can be used for images processing (Set pixels, Get Pixels, encode, export, etc...)."},"isGifRecording":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"Is the GPU recording the screen or not.","name":"recording","type":"boolean"}],"shortDescription":"Tells if the GPU is recording the screen or not."},"isMDown":{"arguments":[{"description":" The button to check, 1 for left mouse button, 2 for right mouse button, 3 for middle mouse button.","name":"button","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"True if mouse button is down, false if not.","name":"bool","type":"boolean"}],"shortDescription":"Checks if a mouse button is down."},"line":{"arguments":[{"description":"The x position of the first end of the line.","name":"x1","type":"number"},{"description":"The y position of the first end of the line.","name":"y1","type":"number"},{"description":"The x position of the second end of the line.","name":"x2","type":"number"},{"description":"The y position of the second end of the line.","name":"y2","type":"number"},{"description":"Any other lines to draw at the same time.","name":"...","type":"number"},{"description":"The color of the line(s) (0-15), defaults to the active color.","name":"color","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Draws line(s) on the screen."},"pal":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["There are 2 palettes in LIKO-12: The Images palette which affects images only. And the Drawing palette which affects all other GPU functions."],"shortDescription":"Maps a color in the palette to another color.","usages":[{"arguments":[{"description":"The color to replace, or false for all","name":"A","type":["boolean","number"]},{"description":"The color which will replace A","name":"B","type":"number"},{"description":"(0) will reset the color in the Drawing palette only, (1) will reset the color in the Images palette only, (nil/false) will reset the color in both palettes.","name":"palette","type":["number","boolean"]}],"name":"Reset the whole palette."},{"arguments":[{"description":"The color to reset to it's default.","name":"color","type":"number"},{"description":"literal","name":"false","type":"boolean"},{"description":"(0) will reset the color in the Drawing palette only, (1) will reset the color in the Images palette only, (nil/false) will reset the color in both palettes.","name":"p","type":["number","boolean"]}],"name":"Reset a specific color to it's default."}]},"palt":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["This only affects images."],"shortDescription":"Makes a specific color transparent or not, by default the color 0 is transparent.","usages":[{"arguments":[{"description":"The color id (0-15).","name":"color","type":"number"},{"default":"nil","description":"(true) The color will be transparent, (false/nil) The color will be opaque.","name":"transparent","type":"boolean"}],"name":" Make a specific color transparent or not."},{"name":"Reset the colors to it's default."}]},"pauseGifRecording":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Pause LIKO-12 screen Gif recording by code."},"point":{"arguments":[{"description":"The x position of the point.","name":"x","type":"number"},{"description":"The y position of the point.","name":"y","type":"number"},{"description":"Any other points to draw at the same time.","name":"...","type":"number"},{"description":"The color of the point(s) (0-15), defaults to the active color.","name":"color","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Draws point(s) on the screen."},"polygon":{"arguments":[{"description":"The x position of the first vertex of the polygon.","name":"x1","type":"number"},{"description":"The y position of the first vertex of the polygon.","name":"y1","type":"number"},{"description":"The x position of the second vertex of the polygon.","name":"x2","type":"number"},{"description":"The y position of the second vertex of the polygon.","name":"y2","type":"number"},{"description":"The x position of the third vertex of the polygon.","name":"x3","type":"number"},{"description":"The y position of the third vertex of the polygon.","name":"y3","type":"number"},{"description":"Any other vertices of the polygon.","name":"...","type":"number"},{"description":"The color of the polygon (0-15), defaults to the active color.","name":"color","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Draws a polygon on the screen."},"popColor":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Pops the last active color from the ColorStack."},"popMatrix":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Pops the last cam transformations from the MatrixStack."},"popPalette":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Pop the last color mapping and transparent colors list from the palettes stack."},"print":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Prints text to the screen, uses the current active color.","usages":[{"arguments":[{"description":"The text to draw.","name":"text","type":"string"},{"description":"The X coord to draw at.","name":"x","type":"number"},{"description":"The y coord to draw at.","name":"y","type":"number"},{"description":"Wrap the line after this many horizontal pixels.","name":"limit","type":"number"},{"default":"\"left\"","description":"The text alignment (can be \"left\", \"center\" and \"right\").","name":"align","type":"string"},{"default":"0","description":"Rotation (radians).","name":"r","type":"number"},{"default":"1","description":"Scale factor (x-axis).","name":"sx","type":"number"},{"default":"sx","description":"Scale factor (y-axis).","name":"sy","type":"number"},{"default":"0","description":"Origin offset (x-axis).","name":"ox","type":"number"},{"default":"0","description":"Origin offset (y-axis).","name":"oy","type":"number"},{"default":"0","description":"Shear factor (x-axis).","name":"kx","type":"number"},{"default":"0","description":"Shear factor (y-axis).","name":"ky","type":"number"}],"name":"Print at a specific position on the screen with wrapping mode"},{"arguments":[{"description":"The text to draw.","name":"text","type":"string"},{"description":"The X coord to draw at.","name":"x","type":"number"},{"description":"The y coord to draw at.","name":"y","type":"number"},{"default":"false","type":"boolean"},{"default":"false","type":"boolean"},{"default":"0","description":"Rotation (radians).","name":"r","type":"number"},{"default":"1","description":"Scale factor (x-axis).","name":"sx","type":"number"},{"default":"sx","description":"Scale factor (y-axis).","name":"sy","type":"number"},{"default":"0","description":"Origin offset (x-axis).","name":"ox","type":"number"},{"default":"0","description":"Origin offset (y-axis).","name":"oy","type":"number"},{"default":"0","description":"Shear factor (x-axis).","name":"kx","type":"number"},{"default":"0","description":"Shear factor (y-axis).","name":"ky","type":"number"}],"name":"Print at a specific position on the screen without wrapping."},{"arguments":[{"description":"The text to draw.","name":"text","type":"string"}],"name":"Print in terminal grid way."},{"arguments":[{"description":"The text to draw.","name":"text","type":"string"},{"default":"false","type":"boolean"}],"name":"Print in terminal grid without auto newline."},{"arguments":[{"description":"The text to draw.","name":"text","type":"string"},{"default":"false","type":"boolean"},{"default":"true","type":"boolean"}],"name":"Print in terminal grid directly without wrapping nor new line."}]},"printBackspace":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Deletes the last printed character via the 3rd and 4th variants of `print()`, and it updates the cursor position.","usages":[{"arguments":[{"description":"The background color to fill the character with (**-1**,**15**), **-1** means no background, defaults to the current print cursor background color.","name":"c","type":"number"}],"name":"Delete the last character:"},{"arguments":[{"description":"The background color to fill the character with (**-1**,**15**), **-1** means no background, defaults to the current print cursor background color.","name":"c","type":"number"},{"default":"true","type":"boolean"}],"name":"Delete the last character without doing a carriage return if needed:"}]},"printCursor":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["The positions are on a characters grid, the size of the grid can be requested from `termSize()`."],"shortDescription":"Changes the print cursor position used by `print()` in the grid variant.","usages":[{"arguments":[{"description":"The X coord of the cursor in characters, defaults to the current X coord.","name":"x","type":"number"},{"description":"The Y corrd of the cursor in characters, defaults to the current Y coord.","name":"y","type":"number"},{"description":"The background color used when printing (**-1**,**15**), **-1** means no background, defaults to the current background color.","name":"bgcolor","type":"number"}],"name":"Set cursor position:"},{"name":"Get cursor position","returns":[{"description":"The current X coord of the cursor in characters.","name":"x","type":"number"},{"description":"The current Y corrd of the cursor in characters.","name":"y","type":"number"},{"description":"The current background color.","name":"bgcolor","type":"number"}]}]},"pushColor":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Pushes the current active color to the ColorStack."},"pushMatrix":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Pushes the current active camera transformations to the MatrixStack."},"pushPalette":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Pushes the current color mapping and transparent colors list to the palettes stack."},"quad":{"arguments":[{"description":"The x coord of the quad's top-left corner.","name":"x","type":"number"},{"description":"The y coord of the quad's top-left corner.","name":"y","type":"number"},{"description":"The width of the quad.","name":"w","type":"number"},{"description":"The height of the quad.","name":"h","type":"number"},{"description":"The width of the reference image.","name":"sw","type":"number"},{"description":"The height of the reference image.","name":"sh","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"longDescription":"Creates a new quad.\n\nQuads can be used to select a part of an image to draw. In this way, one large images atlas (sheet) can be loaded, and then split up into sub-images.","returns":[{"description":"The created quad","name":"q","type":[["Peripherals","GPU","objects","quad"]]}],"shortDescription":"Creates a new quad."},"rect":{"arguments":[{"description":"The top-left x position of the rectangle.","name":"x","type":"number"},{"description":"The top-left y position of the rectangle.","name":"y","type":"number"},{"description":"The width of rectangle.","name":"w","type":"number"},{"description":"The height of rectangle.","name":"h","type":"number"},{"default":"false","description":"(false/nil) The rectangle will be filled, (true) The rectangle will have only lines (border).","name":"l","type":"boolean"},{"description":"The color of the rectangle (0-15), defaults to the active color.","name":"c","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["The arguments can be passed in a table"],"shortDescription":"Draws a rectangle on the screen."},"screenHeight":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The height of the screen (By default - 128)","name":"h","type":"number"}],"shortDescription":"Returns the height of the screen."},"screenSize":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The width of the screen (By default - 192)","name":"w","type":"number"},{"description":"The height of the screen (By default - 128)","name":"h","type":"number"}],"shortDescription":"Returns the dimensions of the screen."},"screenWidth":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The width of the screen (By default - 192)","name":"w","type":"number"}],"shortDescription":"Returns the width of the screen."},"screenshot":{"arguments":[{"default":"0","description":"The top-left X coord of the area to take the screenshot of.","name":"x","type":"number"},{"default":"0","description":"The top-left Y coord of the area to take the screenshot of.","name":"y","type":"number"},{"description":"The width of the area to take the screenshot of.","name":"w","type":"number"},{"description":"The height of the area to take the screenshot of.","name":"h","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The created imagedata object.","name":"imgdata","type":[["Peripherals","GPU","objects","imageData"]]}],"shortDescription":"Takes a screenshot of the canvas (without the cursor), and returns its imagedata."},"startGifRecording":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Start LIKO-12 screen Gif recording by code."},"termHeight":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["Custom fonts can change the output values, don't assume anything."],"returns":[{"description":"The height of the terminal","name":"h","type":"number"}],"shortDescription":"Returns height of the terminal in characters."},"termSize":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["Custom fonts can change the output values, don't assume anything."],"returns":[{"description":"The width of the terminal","name":"w","type":"number"},{"description":"The height of the terminal","name":"h","type":"number"}],"shortDescription":"Returns size of the terminal in characters."},"termWidth":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["Custom fonts can change the output values, don't assume anything."],"returns":[{"description":"The width of the terminal","name":"w","type":"number"}],"shortDescription":"Returns width of the terminal in characters."},"triangle":{"arguments":[{"description":"The first x coordinate of triangle vector.","name":"x1","type":"number"},{"description":"The first y coordinate of triangle vector.","name":"y1","type":"number"},{"description":"The second x coordinate of triangle vector.","name":"x2","type":"number"},{"description":"The second y coordinate of triangle vector.","name":"y2","type":"number"},{"description":"The third x coordinate of triangle vector.","name":"x3","type":"number"},{"description":"The third y coordinate of triangle vector.","name":"y3","type":"number"},{"default":"false","description":"(false/nil) The triangle will be filled, (true) The triangle will have only lines (outline).","name":"l","type":"boolean"},{"description":"The color of triangle (0-15), defaults to the active color.","name":"c","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["The arguments can be passed in a table"],"shortDescription":"Draws a triangle on the screen."},"wrapText":{"arguments":[{"description":"The text that will be wrapped.","name":"text","type":"string"},{"description":"The maximum width in pixels of each line that text is allowed before wrapping.","name":"wraplimit","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"longDescription":"Gets formatting information for text, given a wrap limit.\n\nThis function accounts for newlines correctly (i.e. '\\n').","returns":[{"description":"The maximum width of the wrapped text.","name":"width","type":"string"},{"description":"A sequence containing each line of text that was wrapped.","name":"wrappedText","type":"table"}],"shortDescription":"Gets formatting information for text, given a wrap limit."}},"name":"Graphics Processing Unit","objects":{"fontData":{"availableSince":[[1,0,0],[1,1,0]],"lastUpdatedIn":[[1,0,0],[1,1,0]],"shortDescription":"fontData, modifiable pixel data, not drawable, convert to an font to print with."},"image":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,8,0]],"methods":{"data":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["This function is fast, unlike imagedata:image()"],"returns":[{"description":"The imagedata object of this image.","name":"imgdata","type":[["Peripherals","GPU","objects","imageData"]]}],"self":true,"shortDescription":"Returns the imagedata object of this image, which can be used to set and get pixels of the image."},"draw":{"arguments":[{"default":"0","description":"The top-left image corner x position.","name":"x","type":"number"},{"default":"0","description":"The top-left image corner y position.","name":"y","type":"number"},{"default":"0","description":"The image rotation in radians.","name":"r","type":"number"},{"default":"1","description":"The image width scale.","name":"sw","type":"number"},{"default":"1","description":"The image height scale.","name":"sh","type":"number"},{"default":"nil","description":"Optional, A quad to draw the image with, check GPU.quad for more info.","name":"q","type":[["Peripherals","GPU","objects","quad"]]}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"self":true,"shortDescription":"Draws the image on the screen."},"height":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The image height in pixels.","name":"height","type":"number"}],"self":true,"shortDescription":"Returns the image height."},"quad":{"arguments":[{"description":"The x coord of the quad's top-left corner.","name":"x","type":"number"},{"description":"The y coord of the quad's top-left corner.","name":"y","type":"number"},{"description":"The width of the quad.","name":"width","type":"number"},{"description":"The height of the quad.","name":"height","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The created quad.","name":"q","type":[["Peripherals","GPU","objects","quad"]]}],"self":true,"shortDescription":"Creates a new quad passing the image dimensions automatically."},"refresh":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"self":true,"shortDescription":"Reloads the Image's contents from the ImageData used to create the image."},"size":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The image width in pixels.","name":"width","type":"number"},{"description":"The image height in pixels.","name":"height","type":"number"}],"self":true,"shortDescription":"Returns the image dimensions."},"type":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The object type, (GPU.image).","name":"type","type":"string"}],"self":true,"shortDescription":"Gets the type of the object as a string."},"typeOf":{"arguments":[{"description":"The name of the type to check for.","name":"type","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["For GPUImg, it returns true for the folowing types: 'GPU', 'image', 'GPU.image', 'LK12'"],"returns":[{"description":"True if the object is of the specified type, false otherwise.","name":"bool","type":"boolean"}],"self":true,"shortDescription":"Checks whether an object is of a certain type. If the object has the type with the specified name in its hierarchy, this function will return true."},"width":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The image width in pixels.","name":"width","type":"number"}],"self":true,"shortDescription":"Returns the image width."}},"shortDescription":"Drawable Image, not modifiable, convert to imageData to modify."},"imageData":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,8,0]],"methods":{"encode":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The imagedata into lk12 image string.","name":"data","type":"string"}],"self":true,"shortDescription":"Encodes the imagedata into lk12 image string."},"enlarge":{"arguments":[{"description":"The scale to multiply the image dimensions with, must be bigger than zero and integer.","name":"scale","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The resulting imagedata.","name":"enimgdata","type":[["Peripherals","GPU","objects","imageData"]]}],"self":true,"shortDescription":"This function will multiply the image dimensions with the given scale, and automatically scales the image data, then returns the result imagedata."},"export":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The binary png data.","name":"png","type":"string"}],"self":true,"shortDescription":"Exports the imagedata to png, all transparent pixel in palt() will be transparent in the result png."},"exportOpaque":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The binary png data.","name":"png","type":"string"}],"self":true,"shortDescription":"Exports the imagedata to png, all the colors will be opaque."},"getPixel":{"arguments":[{"description":"The pixel x position.","name":"x","type":"number"},{"description":"The pixel y position.","name":"y","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The pixel color (0-15).","name":"color","type":"number"}],"self":true,"shortDescription":"Get a pixel color in the imagedata."},"height":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The imagedata height in pixels.","name":"height","type":"number"}],"self":true,"shortDescription":"Returns the imagedata height."},"image":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["This function is slow if called repeatly, unlike image:data(). image:refresh() will reload it's content from it's source imagedata."],"returns":[{"description":"The created image object.","name":"img","type":[["Peripherals","GPU","objects","image"]]}],"self":true,"shortDescription":"Converts the imagedata to an image, which can be drawn to the screen."},"map":{"arguments":[{"description":"The callback function. The x, y coord and color are passed. And the function can return the new pixel color, otherwise the pixel color will stay the same.","name":"f","type":"function"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["The function that's passed as an argument will be called for every pixel in the image, starting with the top-left one, and going in horizental lines."],"self":true,"shortDescription":"Transform an image by applying a function to every pixel."},"paste":{"arguments":[{"description":"The source imagedata (To copy from).","name":"source","type":[["Peripherals","GPU","objects","imageData"]]},{"default":"0","description":"Destination top-left x position.","name":"dx","type":"number"},{"default":"0","description":"Destination top-left y position.","name":"dy","type":"number"},{"default":"0","description":"Source top-left x position.","name":"sx","type":"number"},{"default":"0","description":"Source top-left y position.","name":"sy","type":"number"},{"description":"Source width.","name":"sw","type":"number"},{"description":"Source height.","name":"sh","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["The function returns the imagedata object itself, so it can be used for chain calls."],"returns":[{"description":"The imagedata itself.","name":"imgdata","type":[["Peripherals","GPU","objects","imageData"]]}],"self":true,"shortDescription":"Paste into ImageData from another source ImageData."},"quad":{"arguments":[{"description":"The x coord of the quad's top-left corner.","name":"x","type":"number"},{"description":"The y coord of the quad's top-left corner.","name":"y","type":"number"},{"description":"The width of the quad.","name":"width","type":"number"},{"description":"The height of the quad.","name":"height","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The created quad.","name":"q","type":[["Peripherals","GPU","objects","quad"]]}],"self":true,"shortDescription":"Creates a new quad passing the imagedata dimensions automatically."},"setPixel":{"arguments":[{"description":"The pixel x position.","name":"x","type":"number"},{"description":"The pixel y position.","name":"y","type":"number"},{"description":"The new pixel color (0-15).","name":"color","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["The function returns the imagedata object itself, so it can be used for chain calls."],"returns":[{"description":"The imagedata itself.","name":"imgdata","type":[["Peripherals","GPU","objects","imageData"]]}],"self":true,"shortDescription":"Set a pixel color in the imagedata."},"size":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The imagedata width in pixels.","name":"width","type":"number"},{"description":"The imagedata height in pixels.","name":"height","type":"number"}],"self":true,"shortDescription":"Returns the imagedata dimensions."},"type":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The object type, (GPU.imageData).","name":"type","type":"string"}],"self":true,"shortDescription":"Gets the type of the object as a string."},"typeOf":{"arguments":[{"description":"The name of the type to check for.","name":"type","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["For GPUImg, it returns true for the folowing types: 'GPU', 'imageData', 'GPU.imageData', 'LK12'"],"returns":[{"description":"True if the object is of the specified type, false otherwise.","name":"bool","type":"boolean"}],"self":true,"shortDescription":"Checks whether an object is of a certain type. If the object has the type with the specified name in its hierarchy, this function will return true."},"width":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The imagedata width in pixels.","name":"width","type":"number"}],"self":true,"shortDescription":"Returns the imagedata width."}},"shortDescription":"ImageData, modifiable pixel data, not drawable, convert to an image to draw."},"quad":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,8,0]],"methods":{"getTextureDimensions":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The image width used by the quad.","name":"sw","type":"number"},{"description":"The image height used by the quad.","name":"sh","type":"number"}],"self":true,"shortDescription":"Gets reference image dimensions initially specified in GPU.quad()."},"getViewport":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The x coord of the quad's top-left corner.","name":"x","type":"number"},{"description":"The y coord of the quad's top-left corner.","name":"y","type":"number"},{"description":"The width of the quad.","name":"w","type":"number"},{"description":"The height of the quad.","name":"h","type":"number"}],"self":true,"shortDescription":"Gets the current viewport of this quad."},"setViewport":{"arguments":[{"description":"The x coord of the quad's top-left corner.","name":"x","type":"number"},{"description":"The y coord of the quad's top-left corner.","name":"y","type":"number"},{"description":"The width of the quad.","name":"w","type":"number"},{"description":"The height of the quad.","name":"h","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"self":true,"shortDescription":"Sets the viewport of the quad."},"type":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The object type, (Quad).","name":"type","type":"string"}],"self":true,"shortDescription":"Gets the type of the object as a string."},"typeOf":{"arguments":[{"description":"The name of the type to check for.","name":"type","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["For GPUQuad, it returns true for the folowing types: 'Object', 'Quad'"],"returns":[{"description":"True if the object is of the specified type, false otherwise.","name":"bool","type":"boolean"}],"self":true,"shortDescription":"Checks whether an object is of a certain type. If the object has the type with the specified name in its hierarchy, this function will return true."}},"shortDescription":"Quad, a region from an image, used when drawing an image to only draw that section."},"spriteBatch":{"availableSince":[[1,0,0],[0,9,0]],"lastUpdatedIn":[[1,0,0],[0,9,0]],"methods":{"add":{"arguments":[{"description":"The quad to add.","name":"quad","type":[["Peripherals","GPU","objects","quad"]]},{"default":"0","description":"The x position of the new sprite.","name":"x","type":"number"},{"default":"0","description":"The y position of the new sprite.","name":"y","type":"number"},{"default":"0","description":"The rotation of the new sprite.","name":"r","type":"number"},{"default":"1","description":"The x scale of the new sprite.","name":"sx","type":"number"},{"description":"The y scale of the new sprite.","name":"sy","type":"number"},{"default":"0","description":"The x origin offset of the new sprite.","name":"ox","type":"number"},{"default":"0","description":"The y origin offset of the new sprite.","name":"oy","type":"number"},{"default":"0","description":"The x shear factor of the new sprite.","name":"kx","type":"number"},{"default":"0","description":"The y shear factor of the new sprite.","name":"ky","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The id of the added sprite.","name":"id","type":"number"}],"self":true,"shortDescription":"Adds a sprite to the batch."},"clear":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["The function returns the spritebatch object itself, so it can be used for chain calls."],"returns":[{"description":"The spritebatch itself.","name":"sb","type":[["Peripherals","GPU","objects","spriteBatch"]]}],"self":true,"shortDescription":"Clears the sprites from the buffer."},"draw":{"arguments":[{"default":"0","description":"The x position to draw the sprite batch.","name":"x","type":"number"},{"default":"0","description":"The y position to draw the sprite batch.","name":"y","type":"number"},{"description":"The rotation to draw the sprite batch with.","name":"r","type":"number"},{"default":"1","description":"The x scale to draw the sprite batch with.","name":"sx","type":"number"},{"default":"1","description":"The y sacle to draw the sprite batch with.","name":"sy","type":"number"},{"default":"nil","description":"The quad to draw the sprite batch with.","name":"quad","type":[["Peripherals","GPU","objects","quad"]]}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["The function returns the spritebatch object itself, so it can be used for chain calls."],"returns":[{"description":"The spritebatch itself.","name":"sb","type":[["Peripherals","GPU","objects","spriteBatch"]]}],"self":true,"shortDescription":"Draws the sprite batch"},"flush":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["The function returns the spritebatch object itself, so it can be used for chain calls."],"returns":[{"description":"The spritebatch itself.","name":"sb","type":[["Peripherals","GPU","objects","spriteBatch"]]}],"self":true,"shortDescription":"Immediately refreshes the sprite data."},"getBufferSize":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The size of the buffer.","name":"size","type":"number"}],"self":true,"shortDescription":"Returns the buffer size."},"getCount":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"Number of sprites in the batch..","name":"count","type":"number"}],"self":true,"shortDescription":"Returns the number of sprites currently in the batch."},"set":{"arguments":[{"description":"The index of the sprite to change.","name":"id","type":"number"},{"description":"The quad to add.","name":"quad","type":[["Peripherals","GPU","objects","quad"]]},{"default":"0","description":"The x position of the new sprite.","name":"x","type":"number"},{"default":"0","description":"The y position of the new sprite.","name":"y","type":"number"},{"default":"0","description":"The rotation of the new sprite.","name":"r","type":"number"},{"default":"1","description":"The x scale of the new sprite.","name":"sx","type":"number"},{"description":"The y scale of the new sprite.","name":"sy","type":"number"},{"default":"0","description":"The x origin offset of the new sprite.","name":"ox","type":"number"},{"default":"0","description":"The y origin offset of the new sprite.","name":"oy","type":"number"},{"default":"0","description":"The x shear factor of the new sprite.","name":"kx","type":"number"},{"default":"0","description":"The y shear factor of the new sprite.","name":"ky","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["The function returns the spritebatch object itself, so it can be used for chain calls."],"returns":[{"description":"The spritebatch itself.","name":"sb","type":[["Peripherals","GPU","objects","spriteBatch"]]}],"self":true,"shortDescription":"Changes a sprite to the batch."},"setBufferSize":{"arguments":[{"description":"The new buffer size.","name":"size","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["The function returns the spritebatch object itself, so it can be used for chain calls."],"returns":[{"description":"The spritebatch itself.","name":"sb","type":[["Peripherals","GPU","objects","spriteBatch"]]}],"self":true,"shortDescription":"Sets the buffer size."},"type":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The object type, (GPU.spritebatch).","name":"type","type":"string"}],"self":true,"shortDescription":"Gets the type of the object as a string."},"typeOf":{"arguments":[{"description":"The name of the type to check for.","name":"type","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["For GPUSprBatch, it returns true for the folowing types: 'GPU', 'spritebatch', 'GPU.spritebatch', 'LK12'"],"returns":[{"description":"True if the object is of the specified type, false otherwise.","name":"bool","type":"boolean"}],"self":true,"shortDescription":"Checks whether an object is of a certain type. If the object has the type with the specified name in its hierarchy, this function will return true."},"usage":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The usage of the sprite batch.","name":"usage","type":"string"}],"self":true,"shortDescription":"Returns the batch usage."}},"shortDescription":"Spritebatch, draw multiple parts of an image at once instantly, useful for maps."}},"shortDescription":"It's the strongest peripheral in LIKO-12, it's responsible for creating the window and doing all the drawing operations.","version":[1,0,0]},"Gamepad":{"availableSince":[0,6,0],"events":{"gamepadaxis":{"arguments":[{"description":"The joystick that was moved.","name":"joystick","type":"table"},{"description":"The axis is was pushed on (leftx or lefty).","name":"axis","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,8,0]],"shortDescription":"Triggered when the joystick is moved."},"gamepadpressed":{"arguments":[{"description":"The joystick with the pressed button.","name":"joystick","type":"table"},{"description":"The name of the pressed button.","name":"button","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,8,0]],"shortDescription":"A button on the gamepad was pressed."},"gamepadreleased":{"arguments":[{"description":"The joystick with the released button.","name":"joystick","type":"table"},{"description":"The name of the released button.","name":"button","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,8,0]],"shortDescription":"A button on the gamepad was released."},"joystickadded":{"arguments":[{"description":"The joystick that was added.","name":"joystick","type":"table"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,8,0]],"shortDescription":"Triggered when a joystick is connected."},"joystickaxis":{"arguments":[{"description":"The joystick to map.","name":"joystick","type":"table"},{"description":"The index to map to.","name":"axis","type":"number"},{"description":"Value of the axis.","name":"value","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,8,0]],"shortDescription":"Map the joystick movements."},"joystickhat":{"arguments":[{"description":"The joystick to map.","name":"joystick","type":"table"},{"description":"The index to map to.","name":"hat","type":"number"},{"description":"Direction to map for.","name":"direction","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,8,0]],"notes":["direction can be: 'd' (down), 'l' (left), 'r' (right), or 'u' (up)"],"shortDescription":"Map the 8-direction hat movements."},"joystickpressed":{"arguments":[{"description":"The joystick with the button.","name":"joystick","type":"table"},{"description":"The button to map.","name":"button","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,8,0]],"shortDescription":"Map a button on the joysitck."}},"lastUpdatedIn":[0,8,0],"methods":{"_CancelMapping":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Erases mapping state."},"_GetGUID":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Sets mapping state to GUID."},"_MapButton":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Sets mapping state to MapButton."},"_SaveMap":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Saves mapping to 'Miscellaneous/GamepadMapping.txt'."}},"name":"Gamepad","shortDescription":"Handles the input of the gamepads.","version":[1,0,0]},"HDD":{"availableSince":[0,6,0],"lastUpdatedIn":[0,8,0],"methods":{"append":{"arguments":[{"description":"File to append to.","name":"file","type":"string"},{"description":"Text to append.","name":"text","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Appends content to the end of a file."},"delete":{"arguments":[{"description":"File to delete.","name":"file","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Deletes a file."},"drive":{"arguments":[{"description":"Drive to change to.","name":"drive","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Changes the current drive."},"exists":{"arguments":[{"description":"File to check.","name":"file","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"Existence of file or directory.","name":"existent","type":"boolean"}],"shortDescription":"Returns true if a file or directory exists."},"getDirectoryItems":{"arguments":[{"description":"Directory to list items of.","name":"directory","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"List of files in the directory.","name":"files","type":"table"}],"shortDescription":"Returns a table containing items in a directory."},"getLastModified":{"arguments":[{"description":"File to get timestamp of.","name":"file","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"Unix timestamp of the file.","name":"timestamp","type":"number"}],"shortDescription":"Returns the Unix timestamp of a file."},"isDirectory":{"arguments":[{"description":"File to check if it is a directory.","name":"file","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"True if it is a directory, false otherwise.","name":"isDirectory","type":"boolean"}],"shortDescription":"Returns true if the path given represents a directory."},"isFile":{"arguments":[{"description":"Checks if it is a file.","name":"file","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"True if it is a file, false otherwise.","name":"isFile","type":"boolean"}],"shortDescription":"Returns true if the path given represents a file."},"load":{"arguments":[{"description":"File to load.","name":"file","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"Loaded file function, nil when fails to load.","name":"chunk","type":["function","nil"]},{"description":"The error message when failed to load.","name":"ok","type":["string","nil"]}],"shortDescription":"Loads the contents of a Lua script as a function."},"newDirectory":{"arguments":[{"description":"Path to new directory.","name":"path","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Creates a directory."},"read":{"arguments":[{"description":"File to read.","name":"file","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The content of the file.","name":"data","type":"string"}],"shortDescription":"Returns the content of a file."},"size":{"arguments":[{"description":"File to get size of.","name":"file","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The size of the file in bytes.","name":"size","type":"number"}],"shortDescription":"Gets the size of a file in bytes."},"write":{"arguments":[{"description":"File to write to.","name":"file","type":"string"},{"description":"Text to write.","name":"text","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Writes content to a file (Will override anything in the file)."}},"name":"Hard Disk Drive","shortDescription":"This peripheral gives access to LIKO-12's virtual drives.","version":[1,0,0]},"Keyboard":{"availableSince":[0,6,0],"events":{"keypressed":{"arguments":[{"description":"The character/id of the pressed key.","name":"key","type":"string"},{"description":"The scancode representing the key.","name":"scancode","type":"string"},{"description":"Whether this keypress event is a repeat. The delay between key repeats depends on the user's system settings.","name":"isrepeat","type":"boolean"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Triggered when a keyboard button is pressed."},"keyreleased":{"arguments":[{"description":"The character/id of the released key.","name":"key","type":"string"},{"description":"The scancode representing the key.","name":"scancode","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Triggered when a keyboard button is released."},"textinput":{"arguments":[{"description":"The ASCII encoded text.","name":"text","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"notes":["All non ASCII characters are filtered out and replaced with nothing, so in case of non-English input, the event would be triggered with empty strings."],"shortDescription":"Called when text has been entered by the user. For example if shift-2 is pressed on an American keyboard layout, the text '@' will be generated."}},"lastUpdatedIn":[0,8,0],"methods":{"isKDown":{"arguments":[{"description":" A key to check.","name":"key","type":"string"},{"description":"Additional keys to check.","name":"...","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"longDescription":"Checks whether a certain key is down.\n\nCheck [Enums/KeyConstants](/Documentation/Enums/KeyConstants.md).","returns":[{"description":"True if any supplied key is down, false if not.","name":"down","type":"boolean"}],"shortDescription":"Checks whether a certain key is down."},"keyrepeat":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"longDescription":"Enables or disables key repeat. It is disabled by default.\n\nThe interval between repeats depends on the user's system settings.\n\n**Note:** It's better to do `if isrepeat then return true end` than calling this function.","shortDescription":"Enables or disables key repeat.","usages":[{"arguments":[{"description":"Whether repeat keypress events should be enabled when a key is held down.","name":"state","type":"boolean"}],"name":"Disable/Enable key repeat:"},{"name":"Get the current key repeat state:","returns":[{"description":"Whether repeat keypress events should be enabled when a key is held down.","name":"state","type":"boolean"}]}]},"keytoscancode":{"arguments":[{"description":"The key to get the scancode from.","name":"key","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"longDescription":"Gets the hardware scancode corresponding to the given key.\n\nUnlike key constants, Scancodes are keyboard layout-independent. For example the scancode \"w\" will be generated if the key in the same place as the \"w\" key on an American keyboard is pressed, no matter what the key is labelled or what the user's operating system settings are.\n\nScancodes are useful for creating default controls that have the same physical locations on on all systems.\n\nCheck [Enums/Scancodes](/Documentation/Enums/Scancodes.md) and [Enums/KeyConstants](/Documentation/Enums/KeyConstants.md).","returns":[{"description":"The scancode corresponding to the given key, or \"unknown\" if the given key has no known physical representation on the current system.","name":"scancode","type":"string"}],"shortDescription":"Gets the hardware scancode corresponding to the given key."},"scancodetokey":{"arguments":[{"description":"The scancode to get the key from.","name":"scancode","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"longDescription":"Gets the key corresponding to the given hardware scancode.\n\nUnlike key constants, Scancodes are keyboard layout-independent. For example the scancode \"w\" will be generated if the key in the same place as the \"w\" key on an American keyboard is pressed, no matter what the key is labelled or what the user's operating system settings are.\n\nScancodes are useful for creating default controls that have the same physical locations on on all systems.\n\nCheck [Enums/Scancodes](/Documentation/Enums/Scancodes.md) and [Enums/KeyConstants](/Documentation/Enums/KeyConstants.md).","returns":[{"description":"The key corresponding to the given scancode, or \"unknown\" if the scancode doesn't map to a KeyConstant on the current system.","name":"key","type":"string"}],"shortDescription":"Gets the key corresponding to the given hardware scancode."},"textinput":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"shortDescription":"Enables the text input, and shows the onscreen keyboard for the mobile users.","usages":[{"arguments":[{"description":"True to enable the input, False to disable it.","name":"state","type":"boolean"}],"name":"Disable/Enable textinput:"},{"name":"Get the current textinput state:","returns":[{"description":"True if the textinput is enabled, false is the text input is disabled.","name":"state","type":"boolean"}]}]}},"name":"Keyboard","shortDescription":"This peripheral is responsible for handling keyboard input.","version":[1,0,0]},"RAM":{"availableSince":[0,6,0],"fullDescription":"Allows the creation of video memory effects.\n\n## Memory Table:\n\n```\n0x0 -> 0x2FFF - The Video RAM\n0x3000 -> 0x5FFF - The Label Image\n0x6000 -> 0x15FFF - The FDD RAM\n```\n**Note:** The FDD RAM is used by DiskOS when saving your game into a `.png`","lastUpdatedIn":[0,8,0],"methods":{"memcpy":{"arguments":[{"description":"The address of the data to be copied.","name":"from_address","type":"number"},{"description":"The address the data should be copied to.","name":"to_address","type":"number"},{"description":"Length of the data to copy.","name":"length","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"longDescription":"Copies data from one location to another in video memory.","shortDescription":"Copies data in RAM."},"memget":{"arguments":[{"description":"The address of the data to read.","name":"address","type":"number"},{"description":"Length of the data to read.","name":"length","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"longDescription":"Returns a string of data from video memory.","returns":[{"description":"Data that was read.","name":"data","type":"string"}],"shortDescription":"Gets data from RAM."},"memset":{"arguments":[{"description":"The address of the location to write to.","name":"address","type":"number"},{"description":"Data to write to that location.","name":"data","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"longDescription":"Writes a string of data to video memory.","shortDescription":"Sets data to RAM."},"peek":{"arguments":[{"description":"An address to the location to read.","name":"address","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"longDescription":"Peeks (reads) a byte section in video memory.","returns":[{"description":"Value of the byte, that was read.","name":"value","type":"number"}],"shortDescription":"Peeks a byte section in RAM."},"peek4":{"arguments":[{"description":"An address to the location to read.","name":"address","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"longDescription":"Peeks (reads) a half byte section in video memory.","notes":["The address is for the specific half byte."],"returns":[{"description":"Value of the half byte, that was read.","name":"value","type":"number"}],"shortDescription":"Peeks a half byte section in RAM."},"poke":{"arguments":[{"description":"An address to the location to read.","name":"address","type":"number"},{"description":"Value to write to the byte.","name":"value","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"longDescription":"Pokes (writes) to a byte section in video memory.","shortDescription":"Pokes a byte section in RAM."},"poke4":{"arguments":[{"description":"An address to the location to read.","name":"address","type":"number"},{"description":"Value to write to the half byte.","name":"value","type":"number"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"longDescription":"Pokes (writes) to a half byte section in video memory.","notes":["The address is for the specific half byte."],"shortDescription":"Pokes a half byte section in RAM."}},"name":"Random Access Memory","shortDescription":"Allows the creation of video memory effects.","version":[1,0,0]},"TouchControls":{"availableSince":[0,6,0],"events":{"touchcontrol":{"arguments":[{"description":"The state of the button: True when pressed, False when released.","name":"state","type":"boolean"},{"description":"The ID of the button: (1: Left, 2: Right, 3: Up, 4: Down, 5: A, 6: B, 6: Start).","name":"button","type":"number"}],"availableSince":[[1,0,0],[0,7,0]],"lastUpdatedIn":[[1,0,0],[0,7,0]],"shortDescription":"Triggered when the state of a virtual touch button has changed."}},"lastUpdatedIn":[0,8,0],"methods":{"setInput":{"arguments":[{"description":"Wheather the touch controls should be on","name":"bool","type":"boolean"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,8,0]],"self":false,"shortDescription":"Turns on or off the touch controls."}},"name":"The Touch Gamepad Input","shortDescription":"Shows a gamepad like touch controls for mobile users.","version":[1,0,0]},"WEB":{"availableSince":[0,6,0],"events":{"HTTP_Body":{"arguments":[{"description":"The requestID returned by WEB.send().","name":"requestID","type":"number"},{"description":"A chunk (part) of the response body, they're recieved in the correct order.","name":"chunk","type":"string"}],"availableSince":[[1,0,0],[1,0,0]],"lastUpdatedIn":[[1,0,0],[1,0,0]],"shortDescription":"Triggered when a chunk of the HTTP response body is recieved."},"HTTP_Failed":{"arguments":[{"description":"The requestID returned by WEB.send().","name":"requestID","type":"number"},{"description":"The reason of the request failure.","name":"reason","type":"string"}],"availableSince":[[1,0,0],[1,0,0]],"lastUpdatedIn":[[1,0,0],[1,0,0]],"shortDescription":"Triggered when a HTTP request fails."},"HTTP_Respond":{"arguments":[{"description":"The requestID returned by WEB.send().","name":"requestID","type":"number"},{"description":"The content of the response.","name":"response","type":[["Peripherals","WEB","objects","response"]]}],"availableSince":[[1,0,0],[1,0,0]],"lastUpdatedIn":[[1,0,0],[1,0,0]],"shortDescription":"Triggered when a HTTP response is received."}},"lastUpdatedIn":[0,8,0],"methods":{"hasLuaSec":{"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"True if it has LuaSec, false otherwise.","name":"hasLuaSec","type":"boolean"}],"shortDescription":"Checks if it has Luasec."},"luasec":{"arguments":[{"description":"Name of submodule to load.","name":"name","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The loaded submodule.","name":"submodule","type":"table"}],"shortDescription":"Load a luasec submodule."},"luasocket":{"arguments":[{"description":"Name of submodule to load.","name":"name","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The loaded submodule.","name":"submodule","type":"table"}],"shortDescription":"Load a submodule."},"send":{"arguments":[{"description":"URL to send request to.","name":"url","type":"string"},{"default":"nil","description":"Arguements to send in the request.","name":"args","type":"table"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The request's id, used to read it later.","name":"requestID","type":"number"}],"shortDescription":"Send a request to a URL."},"urlEncode":{"arguments":[{"description":"URL to encode.","name":"url","type":"string"}],"availableSince":[[1,0,0],[0,6,0]],"lastUpdatedIn":[[1,0,0],[0,6,0]],"returns":[{"description":"The encoded URL.","name":"url","type":"string"}],"shortDescription":"Encode a url to send it."}},"name":"WEB","objects":{"response":{"availableSince":[[1,0,0],[1,0,0]],"fields":{"body":{"availableSince":[[1,0,0],[1,0,0]],"lastUpdatedIn":[[1,0,0],[1,0,0]],"shortDescription":"The body of the response.","type":"string"},"code":{"availableSince":[[1,0,0],[1,0,0]],"lastUpdatedIn":[[1,0,0],[1,0,0]],"shortDescription":"The HTTP status code the response gave.","type":"string"},"headers":{"availableSince":[[1,0,0],[1,0,0]],"lastUpdatedIn":[[1,0,0],[1,0,0]],"shortDescription":"A table of headers and their values.","type":"table"},"headers_raw":{"availableSince":[[1,0,0],[1,0,0]],"lastUpdatedIn":[[1,0,0],[1,0,0]],"notes":["This field is nil when the LuaJIT-Request backend is used for the HTTP request."],"shortDescription":"A raw string containing the actual headers the server send back.","type":["string","nil"]},"set_cookies":{"availableSince":[[1,0,0],[1,0,0]],"lastUpdatedIn":[[1,0,0],[1,0,0]],"shortDescription":"A table of cookies given by the \"Set-Cookie\" header from the server.","type":"table"}},"lastUpdatedIn":[[1,0,0],[1,0,0]],"shortDescription":"The response table returnd when a HTTP response is received."}},"shortDescription":"This peripheral gives access into the Internet.","version":[1,0,0]}},"engineVersion":[1,1,0],"revisionDate":"2019-11-17","revisionNumber":0,"specificationDate":"2019-11-17","specificationLink":"https://github.com/LIKO-12/API-Documentation/blob/master/Specifications_Archive/2019-11-17-Specification.md"}