0x0wl

lpp

Sep 12th, 2015
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 47.61 KB | None | 0 0
  1. return {
  2.     -- environment variables
  3.    
  4.     -- keys
  5.    
  6.     TOP_SCREEN = {  type = "value",
  7.                     description = "Top Screen Image_ID for Screen functions." },
  8.                  
  9.     BOTTOM_SCREEN = { type = "value",
  10.                       description = "Bottom Screen Image_ID for Screen functions." },
  11.                    
  12.     LEFT_EYE = {  type = "value",
  13.                   description = "ID to print for left eye in stereoscopic 3D." },
  14.                
  15.     RIGHT_EYE = { type = "value",
  16.                   description = "ID to print for right eye in stereoscopic 3D." },
  17.                
  18.     KEY_A = { type = "value",
  19.               description = "Key A value in u32 format for Controls functions." },
  20.            
  21.     KEY_B = { type = "value",
  22.               description = "Key B value in u32 format for Controls functions." },
  23.                  
  24.     KEY_R = { type = "value",
  25.               description = "Key R value in u32 format for Controls functions." },
  26.                  
  27.     KEY_L = { type = "value",
  28.               description = "Key L value in u32 format for Controls functions." },
  29.                  
  30.     KEY_START = { type = "value",
  31.                   description = "Key START value in u32 format for Controls functions." },
  32.                  
  33.     KEY_SELECT = {  type = "value",
  34.                     description = "Key SELECT value in u32 format for Controls functions." },
  35.                  
  36.     KEY_X = { type = "value",
  37.               description = "Key X value in u32 format for Controls functions." },
  38.                  
  39.     KEY_Y = { type = "value",
  40.               description = "Key Y value in u32 format for Controls functions." },
  41.  
  42.     KEY_ZL = { type = "value",
  43.               description = "Key ZL value in u32 format for Controls functions." },
  44.                  
  45.     KEY_ZR = {  type = "value",
  46.                 description = "Key ZR value in u32 format for Controls functions." },
  47.  
  48.     KEY_DRIGHT = {  type = "value",
  49.                     description = "Key Digital Right value in u32 format for Controls functions." },
  50.                  
  51.     KEY_DLEFT = { type = "value",
  52.                   description = "Key Digital Left value in u32 format for Controls functions." },
  53.            
  54.     KEY_DUP = { type = "value",
  55.                 description = "Key Digital Up value in u32 format for Controls functions." },
  56.                  
  57.     KEY_DDOWN = { type = "value",
  58.                   description = "Key Digital Down value in u32 format for Controls functions." },
  59.                  
  60.     KEY_TOUCH = { type = "value",
  61.                   description = "Key Touchscreen value in u32 format for Controls functions." },
  62.                  
  63.     KEY_HOME = {  type = "value",
  64.                   description = "Key Home value in u32 format for Controls functions." },
  65.                  
  66.     KEY_POWER = { type = "value",
  67.                   description = "Key Power value in u32 format for Controls functions." },
  68.            
  69.     -- attributes
  70.                  
  71.     FREAD = { type = "value",
  72.               description = "Attribute for I/O functions for opening a file with Read attribute." },
  73.                  
  74.     FWRITE = {  type = "value",
  75.                 description = "Attribute for I/O functions for opening a file with Write attribute." },
  76.                  
  77.     FCREATE = { type = "value",
  78.                 description = "Attribute for I/O functions for opening a file with Create/Write attributes." },
  79.                  
  80.     LOOP = {  type = "value",
  81.               description = "Attribute for Audio/Video functions for looping buffer." },
  82.                  
  83.     NO_LOOP = { type = "value",
  84.                 description = "Attribute for Audio/Video functions for no looping buffer." },
  85.                  
  86.     NAND = {  type = "value",
  87.               description = "Attribute for CIA NAND managing." },
  88.                  
  89.     SDMC = {  type = "value",
  90.               description = " Attribute for CIA SDMC managing." },
  91.                  
  92.     APP_RUNNING = { type = "value",
  93.                     description = "Status for homebrew while is not suspended/exiting." },
  94.                  
  95.     APP_EXITING = { type = "value",
  96.                     description = "Status for homebrew while is exiting." },
  97.  
  98.  
  99.  -- I/O module
  100.  
  101.   io = {
  102.     type = "class",
  103.     description = "Handles file operations.",
  104.    
  105.     childs = {
  106.       open = {
  107.         type = "function",
  108.         description = [[Open a file.
  109. Sample usage: fileStream = io.open("/file.txt",FCREATE)]],
  110.         args = "(string file,int attribute,[u64 extdata_archive])",
  111.         returns = "s64",
  112.         valuetype = "userdata",
  113.       },
  114.      
  115.       read = {
  116.         type = "function",
  117.         description = [[Read from an opened file.
  118. Sample usage: text = io.read(fileStream,0,10)]],
  119.         args = "(s64 filestream,u64 offset,u64 size)",
  120.         returns = "string",
  121.         valuetype = "string",
  122.       },
  123.      
  124.       write = {
  125.         type = "function",
  126.         description = [[Write a text in an opened file.
  127. Sample usage: io.write(fileStream,0,"Text written with LPP", 21)]],
  128.         args = "(s64 filestream,u64 offset,string text,u64 size)",
  129.         returns = "void",
  130.         valuetype = "nil",
  131.       },
  132.      
  133.       size = {
  134.         type = "function",
  135.         description = [[Get size of an opened file.
  136. Sample usage: size = io.size(fileStream)]],
  137.         args = "(s64 filestream)",
  138.         returns = "u64",
  139.         valuetype = "number",
  140.       },
  141.      
  142.       close = {
  143.         type = "function",
  144.         description = [[Close an opened file.
  145. Sample usage: io.close(fileStream)]],
  146.         args = "(s64 filestream, [bool extdata_file])",
  147.         returns = "void",
  148.         valuetype = "nil",
  149.       },
  150.     },
  151.   },
  152.  
  153.   -- System module
  154.  
  155.   System = {
  156.     type = "class",
  157.     description = "Handles system calls.",
  158.    
  159.     childs = {
  160.       exit = {
  161.         type = "function",
  162.         description = [[Exit homebrew and returns to Homebrew Menu.
  163. Sample usage: System.exit()]],
  164.         args = "(void)",
  165.         returns = "void",
  166.         valuetype = "nil",
  167.       },
  168.      
  169.       getFirmware = {
  170.         type = "function",
  171.         description = [[Returns firmware version.
  172. Sample usage: fw_ver = System.getFirmware()]],
  173.         args = "(void)",
  174.         returns = "u32",
  175.         valuetype = "number",
  176.       },
  177.      
  178.       getKernel = {
  179.         type = "function",
  180.         description = [[Returns kernel version.
  181. Sample usage: kr_ver = System.getKernel()]],
  182.         args = "(void)",
  183.         returns = "u32",
  184.         valuetype = "number",
  185.       },
  186.      
  187.       getRegion = {
  188.         type = "function",
  189.         description = [[Get console region (1 = USA, 2 = EUR, Other = JPN).
  190. Sample usage: reg = System.getRegion()]],
  191.         args = "(void)",
  192.         returns = "int",
  193.         valuetype = "number",
  194.       },
  195.      
  196.       takeScreenshot = {
  197.         type = "function",
  198.         description = [[Take a screenshot in BMP/JPG format.
  199. Sample usage: System.takeScreenshot("/file.bmp",false)]],
  200.         args = "(string filename,bool jpg_compression)",
  201.         returns = "void",
  202.         valuetype = "nil",
  203.       },
  204.      
  205.       checkBuild = {
  206.         type = "function",
  207.         description = [[Check current working lpp-3ds build type. (0 = 3DSX, 1 = 3DS/CIA)
  208. Sample usage: build = System.checkBuild()]],
  209.         args = "(void)",
  210.         returns = "int",
  211.         valuetype = "number",
  212.       },
  213.      
  214.       currentDirectory = {
  215.         type = "function",
  216.         description = [[Get or set current directory.
  217. Sample usage: dir = System.currentDirectory() / System.currentDirectory("/lpp-3ds/")]],
  218.         args = "([string path])",
  219.         returns = "[string]",
  220.         valuetype = "[string|nil]",
  221.       },
  222.      
  223.       deleteFile = {
  224.         type = "function",
  225.         description = [[Delete a file.
  226. Sample usage: System.deleteFile("/file.txt")]],
  227.         args = "(string path)",
  228.         returns = "void",
  229.         valuetype = "nil",
  230.       },
  231.      
  232.       deleteDirectory = {
  233.         type = "function",
  234.         description = [[Delete a directory.
  235. Sample usage: System.deleteDirectory("/dir")]],
  236.         args = "(string path)",
  237.         returns = "void",
  238.         valuetype = "nil",
  239.       },
  240.      
  241.       renameDirectory = {
  242.         type = "function",
  243.         description = [[Move or rename a directory.
  244. Sample usage: System.renameDirectory("/path","/path2")]],
  245.         args = "(string path,string path2)",
  246.         returns = "void",
  247.         valuetype = "nil",
  248.       },
  249.      
  250.       renameFile = {
  251.         type = "function",
  252.         description = [[Move or rename a file.
  253. Sample usage: System.renameFile("/file.txt","/file.sh")]],
  254.         args = "(string path,string path2)",
  255.         returns = "void",
  256.         valuetype = "nil",
  257.       },
  258.      
  259.       createDirectory = {
  260.         type = "function",
  261.         description = [[Create a directory.
  262. Sample usage: System.createDirectory("/test_dir")]],
  263.         args = "(string path)",
  264.         returns = "void",
  265.         valuetype = "nil",
  266.       },
  267.      
  268.       listDirectory = {
  269.         type = "function",
  270.         description = [[List a directory.
  271. Sample usage: list_dir = System.listDirectory("/test_dir/")]],
  272.         args = "(string path)",
  273.         returns = "table",
  274.         valuetype = "table",
  275.       },
  276.      
  277.       isBatteryCharging = {
  278.         type = "function",
  279.         description = [[Check if battery is in charging.
  280. Sample usage: if (System.isBatteryCharging()) then ... end]],
  281.         args = "(void)",
  282.         returns = "boolean",
  283.         valuetype = "boolean",
  284.       },
  285.      
  286.       getBatteryLife = {
  287.         type = "function",
  288.         description = [[Get battery life.
  289. Sample usage: life_battery = System.getBatteryLife()]],
  290.         args = "(void)",
  291.         returns = "int",
  292.         valuetype = "number",
  293.       },
  294.      
  295.       getModel = {
  296.         type = "function",
  297.         description = [[Get 3DS Model. (0 = 3DS, 1 = 3DS XL, 2 = New 3DS, 3 = 2DS, 4 = New 3DS XL)
  298. Sample usage: model = System.getModel()]],
  299.         args = "(void)",
  300.         returns = "int",
  301.         valuetype = "number",
  302.       },
  303.      
  304.       getLanguage = {
  305.         type = "function",
  306.         description = [[Get 3DS system language.
  307. Sample usage: language = System.getLanguage()]],
  308.         args = "(void)",
  309.         returns = "int",
  310.         valuetype = "number",
  311.       },
  312.      
  313.       startKeyboard = {
  314.         type = "function",
  315.         description = [[Start a virtual built-in keyboard.
  316. Sample usage: my_name = System.startKeyboard("Paul")]],
  317.         args = "([string text])",
  318.         returns = "string",
  319.         valuetype = "string",
  320.       },
  321.      
  322.       launch3DSX = {
  323.         type = "function",
  324.         description = [[Launch a 3DSX homebrew.
  325. Sample usage: System.launch3DSX("/boot.3dsx")]],
  326.         args = "(string filename)",
  327.         returns = "void",
  328.         valuetype = "nil",
  329.       },
  330.      
  331.       launchCIA = {
  332.         type = "function",
  333.         description = [[ Launch an imported CIA.
  334. Sample usage: System.launchCIA(0x00133700,SDMC)]],
  335.         args = "(u32 unique_id,u32 mediatype) ",
  336.         returns = "void",
  337.         valuetype = "nil",
  338.       },
  339.      
  340.       extractSMDH = {
  341.         type = "function",
  342.         description = [[Extract title, desc, author and icon from a SMDH file.
  343. Sample usage: smdh = System.extractSMDH("/file.smdh") [smdh.title, smdh.desc, smdh.author, smdh.icon] ]],
  344.         args = "(string filename)",
  345.         returns = "table",
  346.         valuetype = "table",
  347.       },
  348.      
  349.       listExtdataDir = {
  350.         type = "function",
  351.         description = [[List a folder in extdata.
  352. Sample usage: banner = System.listExtdataDir("/ExBanner",0x227)]],
  353.         args = "(string path,u64 archive)",
  354.         returns = "table",
  355.         valuetype = "table",
  356.       },
  357.      
  358.       scanExtdata = {
  359.         type = "function",
  360.         description = [[List all extdata folders and files.
  361. Sample usage: extdata_dir = System.scanExtdata()]],
  362.         args = "(void)",
  363.         returns = "table",
  364.         valuetype = "table",
  365.       },
  366.      
  367.       listCIA = {
  368.         type = "function",
  369.         description = [[List all imported CIA files.
  370. Sample usage: cia_table = System.listCIA()]],
  371.         args = "(void)",
  372.         returns = "table",
  373.         valuetype = "table",
  374.       },
  375.      
  376.       installCIA = {
  377.         type = "function",
  378.         description = [[Install a CIA file.
  379. Sample usage: System.installCIA("/file.cia")]],
  380.         args = "(string filename)",
  381.         returns = "void",
  382.         valuetype = "nil",
  383.       },
  384.      
  385.       uninstallCIA = {
  386.         type = "function",
  387.         description = [[Uninstall a CIA file.
  388. Sample usage: System.uninstallCIA(1,SDMC)]],
  389.         args = "(u32 delete_id,u32 mediatype)",
  390.         returns = "void",
  391.         valuetype = "nil",
  392.       },
  393.      
  394.       extractZIP = {
  395.         type = "function",
  396.         description = [[Extract a ZIP file.
  397. Sample usage: System.extractZIP("/file.zip","/file")]],
  398.         args = "(string file,string path_to_extract,[string password])",
  399.         returns = "void",
  400.         valuetype = "nil",
  401.       },
  402.      
  403.       extractCIA = {
  404.         type = "function",
  405.         description = [[Extract ProductCode and UniqueID from a CIA file.
  406. Sample usage: cia_info = System.extractCIA("/file.cia") [cia_info.unique_id , cia_info.title] ]],
  407.         args = "(string file)",
  408.         returns = "void",
  409.         valuetype = "userdata",
  410.       },
  411.      
  412.       checkStatus = {
  413.         type = "function",
  414.         description = [[Check homebrew status (Like APP_EXITING).
  415. Sample usage: status = System.checkStatus()]],
  416.         args = "(void)",
  417.         returns = "u8",
  418.         valuetype = "number",
  419.       },
  420.      
  421.       showHomeMenu = {
  422.         type = "function",
  423.         description = [[Sets up necessary syscall for Home/Power buttons support.
  424. Sample usage: System.showHomeMenu()]],
  425.         args = "(void)",
  426.         returns = "void",
  427.         valuetype = "nil",
  428.       },
  429.      
  430.       reboot = {
  431.         type = "function",
  432.         description = [[Reboot Nintendo 3DS.
  433. Sample usage: System.reboot()]],
  434.         args = "(void)",
  435.         returns = "void",
  436.         valuetype = "nil",
  437.       },
  438.      
  439.       launchGamecard = {
  440.         type = "function",
  441.         description = [[Launch inserted game cartridge.
  442. Sample usage: System.launchGamecard()]],
  443.         args = "(void)",
  444.         returns = "void",
  445.         valuetype = "nil",
  446.       },
  447.      
  448.       getFreeSpace = {
  449.         type = "function",
  450.         description = [[Get SD card free space.
  451. Sample usage: free_space = System.getFreeSpace(void)]],
  452.         args = "(void)",
  453.         returns = "u64",
  454.         valuetype = "number",
  455.       },
  456.      
  457.       getTime = {
  458.         type = "function",
  459.         description = [[Get console time.
  460. Sample usage: h,m,s = System.getTime()]],
  461.         args = "(void)",
  462.         returns = "int,int,int",
  463.         valuetype = "number,number,number",
  464.       },
  465.      
  466.       getDate = {
  467.         type = "function",
  468.         description = [[Get console date.
  469. Sample usage: day_value,day,month,year = System.getDate() [day_value: 5 = Friday, 6 = Saturday...] ]],
  470.         args = "(void)",
  471.         returns = "int,int,int,int",
  472.         valuetype = "number,number,number,number",
  473.       },
  474.      
  475.       getGWRomID = {
  476.         type = "function",
  477.         description = [[Get Product ID for current loaded rom on a Gateway/Mt Card.
  478. Sample usage: product_id = System.getGWRomID()]],
  479.         args = "(void)",
  480.         returns = "string",
  481.         valuetype = "string",
  482.       },
  483.     },
  484.   },
  485.  
  486.  
  487.   -- Screen module
  488.  
  489.   Screen = {
  490.     type = "class",
  491.     description = "Handles screen updates and drawing.",
  492.    
  493.     childs = {
  494.       waitVblankStart = {
  495.         type = "function",
  496.         description = [[Wait Screen Refresh.
  497. Sample usage: Screen.waitVblankStart()]],
  498.         args = "(void)",
  499.         returns = "void",
  500.         valuetype = "nil",
  501.       },
  502.      
  503.       flip = {
  504.         type = "function",
  505.         description = [[Flip screen (Needed for every Screen function).
  506. Sample usage: Screen.flip()]],
  507.         args = "(void)",
  508.         returns = "void",
  509.         valuetype = "nil",
  510.       },
  511.      
  512.       debugPrint = {
  513.         type = "function",
  514.         description = [[Write a string on screen or image.
  515. Sample usage: Screen.debugPrint(0, 0, "Hello World", Color.new(255,255,255), TOP_SCREEN)]],
  516.         args = "(int x, int y, string text, u32 color, Image_id screen_id, [Eye_id] eye)",
  517.         returns = "void",
  518.         valuetype = "nil",
  519.       },
  520.      
  521.       refresh = {
  522.         type = "function",
  523.         description = [[Refresh screen buffers.
  524. Sample usage: Screen.refresh()]],
  525.         args = "(void)",
  526.         returns = "void",
  527.         valuetype = "nil",
  528.       },
  529.      
  530.       clear = {
  531.         type = "function",
  532.         description = [[Clear screen.
  533. Sample usage: Screen.clear(TOP_SCREEN)]],
  534.         args = "(Image_id screen_id)",
  535.         returns = "void",
  536.         valuetype = "nil",
  537.       },
  538.      
  539.       fillRect = {
  540.         type = "function",
  541.         description = [[Draw a rectangle.
  542. Sample usage: Screen.fillRect(5, 20, 5, 40, Color.new(255,0,0), BOTTOM_SCREEN)]],
  543.         args = "(int x1, int x2, int y1, int y2, u32 color, Image_id screen_id, [Eye_id] eye)",
  544.         returns = "void",
  545.         valuetype = "nil",
  546.       },
  547.      
  548.       fillEmptyRect = {
  549.         type = "function",
  550.         description = [[Draw a rectangular box.
  551. Sample usage: Screen.fillEmptyRect(5, 20, 5, 40, Color.new(255,0,0), BOTTOM_SCREEN)]],
  552.         args = "(int x1, int x2, int y1, int y2, u32 color, Image_id screen_id, [Eye_id] eye)",
  553.         returns = "void",
  554.         valuetype = "nil",
  555.       },
  556.      
  557.       drawLine = {
  558.         type = "function",
  559.         description = [[Draw a line.
  560. Sample usage: Screen.drawLine(5, 20, 5, 40, Color.new(255,0,0), BOTTOM_SCREEN)]],
  561.         args = "(int x1, int x2, int y1, int y2, u32 color, Image_id screen_id, [Eye_id] eye)",
  562.         returns = "void",
  563.         valuetype = "nil",
  564.       },
  565.      
  566.       drawPixel = {
  567.         type = "function",
  568.         description = [[Draw a pixel.
  569. Sample usage: Screen.drawPixel(5, 5, Color.new(255,0,0), BOTTOM_SCREEN)]],
  570.         args = "(int x, int y, u32 color, Image_id screen_id, [Eye_id] eye)",
  571.         returns = "void",
  572.         valuetype = "nil",
  573.       },
  574.      
  575.       getPixel = {
  576.         type = "function",
  577.         description = [[Get the color of a pixel.
  578. Sample usage: Screen.getPixel(5, 5, BOTTOM_SCREEN)]],
  579.         args = "(int x, int y, Image_id screen_id, [Eye_id] eye)",
  580.         returns = "u32",
  581.         valuetype = "number",
  582.       },
  583.      
  584.       loadImage = {
  585.         type = "function",
  586.         description = [[Load a BMP, PNG or JPG image file.
  587. Sample usage: bitmap = Screen.loadImage("/file.bmp")]],
  588.         args = "(string filename)",
  589.         returns = "Image_id",
  590.         valuetype = "userdata",
  591.       },
  592.      
  593.       drawImage = {
  594.         type = "function",
  595.         description = [[Draw an image.
  596. Sample usage: Screen.drawImage(10,20,bitmap,TOP_SCREEN)]],
  597.         args = "(int x,int y,Image_id image,Image_id screen_id, [Eye_id] eye)",
  598.         returns = "void",
  599.         valuetype = "nil",
  600.       },
  601.      
  602.       drawPartialImage = {
  603.         type = "function",
  604.         description = [[Draw a part of an image.
  605. Sample usage: Screen.drawPartialImage(10,20,0,0,100,100,bitmap,BOTTOM_SCREEN)]],
  606.         args = "(int x,int y,int image_x,int image_y,int width,int height,Image_id image,Image_id screen_id, [Eye_id] eye)",
  607.         returns = "void",
  608.         valuetype = "nil",
  609.       },
  610.      
  611.       getImageWidth = {
  612.         type = "function",
  613.         description = [[Get width of an image.
  614. Sample usage: width = Screen.getImageWidth(bitmap_file)]],
  615.         args = "(Image_id image)",
  616.         returns = "int",
  617.         valuetype = "number",
  618.       },
  619.      
  620.       getImageHeight = {
  621.         type = "function",
  622.         description = [[Get height of an image.
  623. Sample usage: height = Screen.getImageHeight(bitmap_file)]],
  624.         args = "(Image_id image)",
  625.         returns = "int",
  626.         valuetype = "number",
  627.       },
  628.      
  629.       flipImage = {
  630.         type = "function",
  631.         description = [[Flip an image.
  632. Sample usage: Screen.flipImage(image,flipped_image)]],
  633.         args = "(Image_id source,Image_id destination)",
  634.         returns = "void",
  635.         valuetype = "nil",
  636.       },
  637.      
  638.       createImage = {
  639.         type = "function",
  640.         description = [[Create an empty image.
  641. Sample usage: image = Screen.createImage(10,10, Color.new(255,255,255))]],
  642.         args = "(int width, int height, u32 color)",
  643.         returns = "Image_id",
  644.         valuetype = "userdata",
  645.       },
  646.      
  647.       freeImage = {
  648.         type = "function",
  649.         description = [[Delete an image from memory.
  650. Sample usage: Screen.freeImage(image)]],
  651.         args = "(Image_id image)",
  652.         returns = "void",
  653.         valuetype = "nil",
  654.       },
  655.      
  656.       saveImage = {
  657.         type = "function",
  658.         description = [[Save an image as BMP/JPG file.
  659. Sample usage: Screen.saveImage(image,"/file.bmp",false)]],
  660.         args = "(Image_id image,string file,bool jpg_compression)",
  661.         returns = "void",
  662.         valuetype = "nil",
  663.       },
  664.      
  665.       enable3D = {
  666.         type = "function",
  667.         description = [[Enable stereoscopic 3D.
  668. Sample usage: Screen.enable3D()]],
  669.         args = "(void)",
  670.         returns = "void",
  671.         valuetype = "nil",
  672.       },
  673.      
  674.       disable3D = {
  675.         type = "function",
  676.         description = [[Disable stereoscopic 3D.
  677. Sample usage: Screen.disable3D()]],
  678.         args = "(void)",
  679.         returns = "void",
  680.         valuetype = "nil",
  681.       },
  682.      
  683.       get3DLevel = {
  684.         type = "function",
  685.         description = [[Get current stereoscopic 3D slide level.
  686. Sample usage: lvl_3d = Screen.get3DLevel()]],
  687.         args = "(void)",
  688.         returns = "float",
  689.         valuetype = "number",
  690.       },
  691.     },
  692.   },
  693.  
  694.   -- Graphics module
  695.  
  696.   Graphics = {
  697.     type = "class",
  698.     description = "Handles screen updates and drawing.",
  699.    
  700.     childs = {
  701.       init = {
  702.         type = "function",
  703.         description = [[Init GPU.
  704. Sample usage: Graphics.init()]],
  705.         args = "(void)",
  706.         returns = "void",
  707.         valuetype = "nil",
  708.       },
  709.      
  710.       term = {
  711.         type = "function",
  712.         description = [[Terminate GPU.
  713. Sample usage: Graphics.term()]],
  714.         args = "(void)",
  715.         returns = "void",
  716.         valuetype = "nil",
  717.       },
  718.      
  719.       initBlend = {
  720.         type = "function",
  721.         description = [[Init GPU blending.
  722. Sample usage: Graphics.initBlend(TOP_SCREEN)]],
  723.         args = "(int screen, [int side])",
  724.         returns = "void",
  725.         valuetype = "nil",
  726.       },
  727.      
  728.       termBlend = {
  729.         type = "function",
  730.         description = [[Terminate GPU blending.
  731. Sample usage: Graphics.termBlend()]],
  732.         args = "(void) ",
  733.         returns = "void",
  734.         valuetype = "nil",
  735.       },
  736.      
  737.       loadImage = {
  738.         type = "function",
  739.         description = [[Load an image as GPU texture.
  740. Sample usage: texture = Graphics.loadImage("/file.png")]],
  741.         args = "(string filename)",
  742.         returns = "u32",
  743.         valuetype = "number",
  744.       },
  745.      
  746.       freeImage = {
  747.         type = "function",
  748.         description = [[Free a GPU texture.
  749. Sample usage: Graphics.freeImage(texture)]],
  750.         args = "(u32 texture)",
  751.         returns = "void",
  752.         valuetype = "nil",
  753.       },
  754.      
  755.       flip = {
  756.         type = "function",
  757.         description = [[Swap GPU screens.
  758. Sample usage: Graphics.flip()]],
  759.         args = "(void)",
  760.         returns = "void",
  761.         valuetype = "nil",
  762.       },
  763.      
  764.       drawImage = {
  765.         type = "function",
  766.         description = [[Blit a GPU texture.
  767. Sample usage: Graphics.drawImage(5, 5, texture)]],
  768.         args = "(int x, int y, int texture)",
  769.         returns = "void",
  770.         valuetype = "nil",
  771.       },
  772.      
  773.       drawPartialImage = {
  774.         type = "function",
  775.         description = [[Blit a part of a GPU texture.
  776. Sample usage: Graphics.drawPartialImage(5, 5, 0, 10, 100, 100, texture)]],
  777.         args = "(int x, int y, int img_x, int img_y, int width, int height int texture)",
  778.         returns = "void",
  779.         valuetype = "nil",
  780.       },
  781.      
  782.       fillRect = {
  783.         type = "function",
  784.         description = [[Blit a rectangle using GPU.
  785. Sample usage: Graphics.fillRect(0,10,0,10,Color.new(255,255,255))]],
  786.         args = "(int x1, int x2, int y1, int y2, u32 color)",
  787.         returns = "void",
  788.         valuetype = "nil",
  789.       },
  790.      
  791.       fillEmptyRect = {
  792.         type = "function",
  793.         description = [[Blit an empty rectangle using GPU.
  794. Sample usage: Graphics.fillEmptyRect(0,10,0,10,Color.new(255,255,255))]],
  795.         args = "(int x1, int x2, int y1, int y2, u32 color)",
  796.         returns = "void",
  797.         valuetype = "nil",
  798.       },
  799.      
  800.       drawLine = {
  801.         type = "function",
  802.         description = [[Blit a line using GPU.
  803. Sample usage: Graphics.drawLine(0,10,0,10,Color.new(255,255,255))]],
  804.         args = "(int x1, int x2, int y1, int y2, u32 color)",
  805.         returns = "void",
  806.         valuetype = "nil",
  807.       },
  808.     },
  809.   },
  810.  
  811.   -- Console module
  812.  
  813.   Console = {
  814.     type = "class",
  815.     description = "Handles console init and updating.",
  816.  
  817.     childs = {
  818.       new = {
  819.         type = "function",
  820.         description = [[Create a new console.
  821. Sample usage: console = Console.new(TOP_SCREEN)]],
  822.         args = "(Image_id screen)",
  823.         returns = "u32",
  824.         valuetype = "number",
  825.       },
  826.      
  827.       clear = {
  828.         type = "function",
  829.         description = [[Clear a console.
  830. Sample usage: Console.clear(console)]],
  831.         args = "(u32 console)",
  832.         returns = "void",
  833.         valuetype = "nil",
  834.       },
  835.      
  836.       show = {
  837.         type = "function",
  838.         description = [[Print content of a console.
  839. Sample usage: real_wrote_characters = Console.show(console)]],
  840.         args = "(u32 console)",
  841.         returns = "int",
  842.         valuetype = "number",
  843.       },
  844.      
  845.       append = {
  846.         type = "function",
  847.         description = [[Append text to a console.
  848. Sample usage: Console.append(console,"Hello world!\n")]],
  849.         args = "(u32 console,string text)",
  850.         returns = "void",
  851.         valuetype = "nil",
  852.       },
  853.      
  854.       destroy = {
  855.         type = "function",
  856.         description = [[Free a console.
  857. Sample usage: Console.destroy(console)]],
  858.         args = "(u32 console)",
  859.         returns = "void",
  860.         valuetype = "nil",
  861.       },
  862.     },
  863.   },
  864.  
  865.  
  866.   -- Font module
  867.  
  868.   Font = {
  869.     type = "class",
  870.     description = "Handles font loading.",
  871.  
  872.     childs = {
  873.       load = {
  874.         type = "function",
  875.         description = [[Load a TTF font.
  876. Sample usage: my_font = Font.load("/font.ttf")]],
  877.         args = "(string filename)",
  878.         returns = "u32",
  879.         valuetype = "number",
  880.       },
  881.      
  882.       setPixelSizes = {
  883.         type = "function",
  884.         description = [[Set size for a font.
  885. Sample usage: Font.setPixelSizes(my_font,18)]],
  886.         args = "(u32 font,u32 size)",
  887.         returns = "void",
  888.         valuetype = "nil",
  889.       },
  890.      
  891.       print = {
  892.         type = "function",
  893.         description = [[Print a text with a font.
  894. Sample usage: Font.print(my_font, 5, 5, "Hello World!", Color.new(255,255,255), TOP_SCREEN)]],
  895.         args = "(u32 font, int x, int y, string text, u32 color, u32 screen, [u32 side])",
  896.         returns = "void",
  897.         valuetype = "nil",
  898.       },
  899.      
  900.       unload = {
  901.         type = "function",
  902.         description = [[Free a font.
  903. Sample usage: Font.unload(my_font)]],
  904.         args = "(u32 font)",
  905.         returns = "void",
  906.         valuetype = "nil",
  907.       },
  908.     },
  909.   },
  910.  
  911.   -- Color module
  912.  
  913.   Color = {
  914.     type = "class",
  915.     description = "Object for color values.",
  916.  
  917.     childs = {
  918.       new = {
  919.         type = "function",
  920.         description = [[Create a new RGB or RGBA color.
  921. Sample usage: red = Color.new(255,0,0)]],
  922.         args = "(int r, int g, int b,[int a])",
  923.         returns = "u32",
  924.         valuetype = "number",
  925.       },
  926.      
  927.       getR = {
  928.         type = "function",
  929.         description = [[Get R value of a color.
  930. Sample usage: red_value = Color.getR(Color.new(255,0,0))]],
  931.         args = "(u32 color)",
  932.         returns = "int",
  933.         valuetype = "number",
  934.       },
  935.      
  936.       getG = {
  937.         type = "function",
  938.         description = [[Get G value of a color.
  939. Sample usage: green_value = Color.getG(Color.new(255,0,0))]],
  940.         args = "(u32 color)",
  941.         returns = "int",
  942.         valuetype = "number",
  943.       },
  944.      
  945.       getB = {
  946.         type = "function",
  947.         description = [[Get B value of a color.
  948. Sample usage: blue_value = Color.getB(Color.new(255,0,0))]],
  949.         args = "(u32 color)",
  950.         returns = "int",
  951.         valuetype = "number",
  952.       },
  953.      
  954.       getA = {
  955.         type = "function",
  956.         description = [[Get A value of a color.
  957. Sample usage: alpha_value = Color.getA(Color.new(255,0,0,0))]],
  958.         args = "(u32 color)",
  959.         returns = "int",
  960.         valuetype = "number",
  961.       },
  962.     },
  963.   },
  964.  
  965.   -- Controls module
  966.  
  967.   Controls = {
  968.     type = "class",
  969.     description = "Handles input status.",
  970.  
  971.     childs = {
  972.       init = {
  973.         type = "function",
  974.         description = [[Sets up controls environment.
  975. Sample usage: Controls.init()]],
  976.         args = "(void)",
  977.         returns = "void",
  978.         valuetype = "nil",
  979.       },
  980.      
  981.       read = {
  982.         type = "function",
  983.         description = [[Read controls input.
  984. Sample usage: pad = Controls.read()]],
  985.         args = "(void)",
  986.         returns = "u32",
  987.         valuetype = "number",
  988.       },
  989.      
  990.       check = {
  991.         type = "function",
  992.         description = [[Check if a button is pressed.
  993. Sample usage: if (Controls.check(Controls.read(),KEY_A)) then ... end]],
  994.         args = "(u32 controls,u32 button)",
  995.         returns = "boolean",
  996.         valuetype = "boolean",
  997.       },
  998.      
  999.       readCirclePad = {
  1000.         type = "function",
  1001.         description = [[Get X,Y position of Circle Pad.
  1002. Sample usage: x,y = Controls.readCirclePad()]],
  1003.         args = "(void)",
  1004.         returns = "int,int",
  1005.         valuetype = "number,number",
  1006.       },
  1007.      
  1008.       readCstickPad = {
  1009.         type = "function",
  1010.         description = [[Get X,Y position of Circle Pad Pro.
  1011. Sample usage: x,y = Controls.readCstickPad()]],
  1012.         args = "(void)",
  1013.         returns = "int,int",
  1014.         valuetype = "number,number",
  1015.       },
  1016.      
  1017.       readTouch = {
  1018.         type = "function",
  1019.         description = [[Get X,Y position of touchscreen pixel.
  1020. Sample usage: x,y = Controls.readTouch()]],
  1021.         args = "(void)",
  1022.         returns = "int,int",
  1023.         valuetype = "number,number",
  1024.       },
  1025.      
  1026.       getVolume = {
  1027.         type = "function",
  1028.         description = [[Get current console volume.
  1029. Sample usage: vol = Controls.getVolume()]],
  1030.         args = "(void)",
  1031.         returns = "int",
  1032.         valuetype = "number",
  1033.       },
  1034.      
  1035.       headsetStatus = {
  1036.         type = "function",
  1037.         description = [[Check if headset is inserted.
  1038. Sample usage: if Controls.headsetStatus() then ... end]],
  1039.         args = "(void)",
  1040.         returns = "boolean",
  1041.         valuetype = "boolean",
  1042.       },
  1043.     },
  1044.   },
  1045.  
  1046.   -- Timer module
  1047.  
  1048.   Timer = {
  1049.     type = "class",
  1050.     description = "Timer functionality with millisecond accuracy.",
  1051.  
  1052.     childs = {
  1053.       new = {
  1054.         type = "function",
  1055.         description = [[Create a new timer.
  1056. Sample usage: timer = Timer.new()]],
  1057.         args = "(void)",
  1058.         returns = "u32",
  1059.         valuetype = "number",
  1060.       },
  1061.      
  1062.       getTime = {
  1063.         type = "function",
  1064.         description = [[Returns time in milliseconds of timer object.
  1065. Sample usage: time = Timer.getTime(timer)]],
  1066.         args = "(u32 timer)",
  1067.         returns = "u32",
  1068.         valuetype = "number",
  1069.       },
  1070.      
  1071.       destroy = {
  1072.         type = "function",
  1073.         description = [[Free a timer object.
  1074. Sample usage: Timer.destroy(timer)]],
  1075.         args = "(u32 timer)",
  1076.         returns = "void",
  1077.         valuetype = "nil",
  1078.       },
  1079.      
  1080.       reset = {
  1081.         type = "function",
  1082.         description = [[Reset time of a timer object.
  1083. Sample usage: Timer.reset(timer)]],
  1084.         args = "(u32 timer)",
  1085.         returns = "void",
  1086.         valuetype = "nil",
  1087.       },
  1088.      
  1089.       pause = {
  1090.         type = "function",
  1091.         description = [[Pause a timer object.
  1092. Sample usage: Timer.pause(timer)]],
  1093.         args = "(u32 timer)",
  1094.         returns = "void",
  1095.         valuetype = "nil",
  1096.       },
  1097.      
  1098.       resume = {
  1099.         type = "function",
  1100.         description = [[Resume a timer object.
  1101. Sample usage: Timer.resume(timer)]],
  1102.         args = "(u32 timer)",
  1103.         returns = "void",
  1104.         valuetype = "nil",
  1105.       },
  1106.      
  1107.       isPlaying = {
  1108.         type = "function",
  1109.         description = [[Check if a timer is paused or not.
  1110. Sample usage: if Timer.isPlaying(timer) then .. end]],
  1111.         args = "(u32 timer)",
  1112.         returns = "boolean",
  1113.         valuetype = "boolean",
  1114.       },
  1115.     },
  1116.   },
  1117.  
  1118.   -- Network module
  1119.  
  1120.   Network = {
  1121.     type = "class",
  1122.     description = "Handles connections to a network.",
  1123.  
  1124.     childs = {
  1125.       isWifiEnabled = {
  1126.         type = "function",
  1127.         description = [[Check if WiFi is enabled.
  1128. Sample usage: if (Network.isWifiEnabled()) then ... end]],
  1129.         args = "(void)",
  1130.         returns = "boolean",
  1131.         valuetype = "boolean",
  1132.       },
  1133.      
  1134.       getMacAddress = {
  1135.         type = "function",
  1136.         description = [[Get console MAC address.
  1137. Sample usage: mac = Network.getMacAddress()]],
  1138.         args = "(void)",
  1139.         returns = "string",
  1140.         valuetype = "string",
  1141.       },
  1142.      
  1143.       getIpAddress = {
  1144.         type = "function",
  1145.         description = [[Get LAN IP address.
  1146. Sample usage: ip = Network.getIpAddress()]],
  1147.         args = "(void)",
  1148.         returns = "string",
  1149.         valuetype = "string",
  1150.       },
  1151.      
  1152.       initFTP = {
  1153.         type = "function",
  1154.         description = [[Init FTP on port 5000.
  1155. Sample usage: Network.initFTP()]],
  1156.         args = "(void)",
  1157.         returns = "void",
  1158.         valuetype = "nil",
  1159.       },
  1160.      
  1161.       termFTP = {
  1162.         type = "function",
  1163.         description = [[Terminate FTP on port 5000.
  1164. Sample usage: Network.termFTP()]],
  1165.         args = "(void)",
  1166.         returns = "void",
  1167.         valuetype = "nil",
  1168.       },
  1169.      
  1170.       updateFTP = {
  1171.         type = "function",
  1172.         description = [[Update FTP state and get last received command.
  1173. Sample usage: cmd = Network.updateFTP()]],
  1174.         args = "(void)",
  1175.         returns = "string",
  1176.         valuetype = "string",
  1177.       },
  1178.      
  1179.       downloadFile = {
  1180.         type = "function",
  1181.         description = [[Download a file via HTTP protocol.
  1182. Sample usage: Network.downloadFile("http://rinnegatamante.netsons.org/3DSBriscola.rar","/3DSBriscola.rar")]],
  1183.         args = "(string url,string filename)",
  1184.         returns = "void",
  1185.         valuetype = "nil",
  1186.       },
  1187.      
  1188.       requestString = {
  1189.         type = "function",
  1190.         description = [[Request a string via HTTP protocool.
  1191. Sample usage: string = Network.requestString("http://rinnegatamante.netsons.org/ORGANIZ3D.txt")]],
  1192.         args = "(string url)",
  1193.         returns = "string",
  1194.         valuetype = "string",
  1195.       },
  1196.      
  1197.       sendMail = {
  1198.         type = "function",
  1199.         description = [[Send e-mail via HTTP protocol.
  1200. Sample usage: is_mail_sent = Network.sendMail("[email protected]","Sample e-mail","This is a sample e-mail.")]],
  1201.         args = "(string to,string subject,string body)",
  1202.         returns = "boolean",
  1203.         valuetype = "boolean",
  1204.       },
  1205.     },
  1206.   },
  1207.  
  1208.   -- Sound module
  1209.  
  1210.   Sound = {
  1211.     type = "class",
  1212.     description = "Handles sound system.",
  1213.  
  1214.     childs = {
  1215.       init = {
  1216.         type = "function",
  1217.         description = [[Initialize sound system.
  1218. Sample usage: Sound.init()]],
  1219.         args = "(void)",
  1220.         returns = "void",
  1221.         valuetype = "nil",
  1222.       },
  1223.      
  1224.       term = {
  1225.         type = "function",
  1226.         description = [[Terminate sound system.
  1227. Sample usage: Sound.term()]],
  1228.         args = "(void)",
  1229.         returns = "void",
  1230.         valuetype = "nil",
  1231.       },
  1232.      
  1233.       openWav = {
  1234.         type = "function",
  1235.         description = [[Open a WAV file.
  1236. Sample usage: wav = Sound.openWav("/file.wav",false)]],
  1237.         args = "(string filename,[bool use_streaming])",
  1238.         returns = "wav_id",
  1239.         valuetype = "userdata",
  1240.       },
  1241.      
  1242.       openAiff = {
  1243.         type = "function",
  1244.         description = [[Open an AIFF/AIF file.
  1245. Sample usage: aiff = Sound.openAiff("/file.aiff",true)]],
  1246.         args = "(string filename,[bool use_streaming])",
  1247.         returns = "wav_id",
  1248.         valuetype = "userdata",
  1249.       },
  1250.      
  1251.       openOgg = {
  1252.         type = "function",
  1253.         description = [[Open an OGG file.
  1254. Sample usage: wav = Sound.openOgg("/file.ogg",true)]],
  1255.         args = "(string filename,[bool use_streaming])",
  1256.         returns = "wav_id",
  1257.         valuetype = "userdata",
  1258.       },
  1259.      
  1260.       updateStream = {
  1261.         type = "function",
  1262.         description = [[Update buffer for a sound stream.
  1263. Sample usage: Sound.updateStream()]],
  1264.         args = "(void)",
  1265.         returns = "void",
  1266.         valuetype = "nil",
  1267.       },
  1268.      
  1269.       isPlaying = {
  1270.         type = "function",
  1271.         description = [[Get sound playing state.
  1272. Sample usage: if Sound.isPlaying(wav) then ... end]],
  1273.         args = "(wav_id wav_file)",
  1274.         returns = "boolean",
  1275.         valuetype = "boolean",
  1276.       },
  1277.      
  1278.       play = {
  1279.         type = "function",
  1280.         description = [[Play a loaded sound.
  1281. Sample usage: Sound.play(wav,NO_LOOP,0x09)]],
  1282.         args = "(wav_id wav_file, int loop, u32 channel, [u32 channel2])",
  1283.         returns = "void",
  1284.         valuetype = "nil",
  1285.       },
  1286.      
  1287.       close = {
  1288.         type = "function",
  1289.         description = [[Close and free a loaded sound.
  1290. Sample usage: Sound.close(wav)]],
  1291.         args = "(wav_id wav_file)",
  1292.         returns = "void",
  1293.         valuetype = "nil",
  1294.       },
  1295.      
  1296.       pause = {
  1297.         type = "function",
  1298.         description = [[Pause a sound.
  1299. Sample usage: Sound.pause(wav)]],
  1300.         args = "(wav_id wav_file)",
  1301.         returns = "void",
  1302.         valuetype = "nil",
  1303.       },
  1304.      
  1305.       resume = {
  1306.         type = "function",
  1307.         description = [[Resume a sound.
  1308. Sample usage: Sound.resume(wav)]],
  1309.         args = "(wav_id wav_file)",
  1310.         returns = "void",
  1311.         valuetype = "nil",
  1312.       },
  1313.      
  1314.       saveWav = {
  1315.         type = "function",
  1316.         description = [[Save a sound as WAV file.
  1317. Sample usage: Sound.saveWav(sound,"/test.wav")]],
  1318.         args = "(wav_id wav_file,string filename)",
  1319.         returns = "void",
  1320.         valuetype = "nil",
  1321.       },
  1322.      
  1323.       register = {
  1324.         type = "function",
  1325.         description = [[Register a sound with microphone.
  1326. Sample usage: sound = Sound.register(10)]],
  1327.         args = "(int seconds)",
  1328.         returns = "wav_id",
  1329.         valuetype = "userdata",
  1330.       },
  1331.      
  1332.       getTotalTime = {
  1333.         type = "function",
  1334.         description = [[Get Total Time of a sound.
  1335. Sample usage: time = Sound.getTotalTime(wav_file)]],
  1336.         args = "(wav_id wav_file)",
  1337.         returns = "int",
  1338.         valuetype = "number",
  1339.       },
  1340.      
  1341.       getTime = {
  1342.         type = "function",
  1343.         description = [[Get Current Time of a sound.
  1344. Sample usage: time = Sound.getTime(wav_file)]],
  1345.         args = "(wav_id wav_file)",
  1346.         returns = "int",
  1347.         valuetype = "number",
  1348.       },
  1349.      
  1350.       getSrate = {
  1351.         type = "function",
  1352.         description = [[Get samplerate of a sound.
  1353. Sample usage: samplerate = Sound.getSrate(wav_file)]],
  1354.         args = "(wav_id wav_file)",
  1355.         returns = "int",
  1356.         valuetype = "number",
  1357.       },
  1358.      
  1359.       getTitle = {
  1360.         type = "function",
  1361.         description = [[Get Title of a sound.
  1362. Sample usage: title = Sound.getTitle(wav_file)]],
  1363.         args = "(wav_id wav_file)",
  1364.         returns = "string",
  1365.         valuetype = "string",
  1366.       },
  1367.      
  1368.       getAuthor = {
  1369.         type = "function",
  1370.         description = [[Get Author of a sound.
  1371. Sample usage:author = Sound.getAuthor(wav_file)]],
  1372.         args = "(wav_id wav_file)",
  1373.         returns = "string",
  1374.         valuetype = "string",
  1375.       },
  1376.      
  1377.       getType = {
  1378.         type = "function",
  1379.         description = [[Get audiotype of a sound. (1 = Mono, 2 = Stereo)
  1380. Sample usage:atype = Sound.getType(wav_file)]],
  1381.         args = "(wav_id wav_file)",
  1382.         returns = "int",
  1383.         valuetype = "number",
  1384.       },
  1385.     },
  1386.   },
  1387.  
  1388.   -- Video module
  1389.  
  1390.   BMPV = {
  1391.     type = "class",
  1392.     description = "Handles BMPV video system.",
  1393.  
  1394.     childs = {
  1395.       load = {
  1396.         type = "function",
  1397.         description = [[Load a BMPV file.
  1398. Sample usage: bmpv = BMPV.load("/file.bmpv")]],
  1399.         args = "(string filename)",
  1400.         returns = "bmpv_id",
  1401.         valuetype = "userdata",
  1402.       },
  1403.      
  1404.       start = {
  1405.         type = "function",
  1406.         description = [[Start a BMPV video.
  1407. Sample usage: BMPV.start(bmpv, NO_LOOP, 0x08, 0x09)]],
  1408.         args = "(bmpv_id bmpv, int loop, u32 channel1, [u32 channel2])",
  1409.         returns = "void",
  1410.         valuetype = "nil",
  1411.       },
  1412.      
  1413.       draw = {
  1414.         type = "function",
  1415.         description = [[Draw BMPV current frame.
  1416. Sample usage: BMPV.draw(0,0,bmpv,TOP_SCREEN)]],
  1417.         args = "(int x, int y, bmpv_id bmpv, int screen, [Eye_id] eye)",
  1418.         returns = "void",
  1419.         valuetype = "nil",
  1420.       },
  1421.      
  1422.       unload = {
  1423.         type = "function",
  1424.         description = [[Unload a BMPV file.
  1425. Sample usage: BMPV.unload(bmpv)]],
  1426.         args = "(bmpv_id bmpv)",
  1427.         returns = "void",
  1428.         valuetype = "nil",
  1429.       },
  1430.      
  1431.       getFPS = {
  1432.         type = "function",
  1433.         description = [[Get BMPV framerate.
  1434. Sample usage: fps = BMPV.getFPS(bmpv)]],
  1435.         args = "(bmpv_id bmpv)",
  1436.         returns = "u32",
  1437.         valuetype = "number",
  1438.       },
  1439.      
  1440.       getFrame = {
  1441.         type = "function",
  1442.         description = [[Get BMPV current frame number.
  1443. Sample usage: cur = BMPV.getFrame(bmpv)]],
  1444.         args = "(bmpv_id bmpv)",
  1445.         returns = "u32",
  1446.         valuetype = "number",
  1447.       },
  1448.      
  1449.       showFrame = {
  1450.         type = "function",
  1451.         description = [[Show a selected frame from BMPV file.
  1452. Sample usage: BMPV.showFrame(0,0,bmpv,50,TOP_SCREEN)]],
  1453.         args = "(int x,int y,bmpv_id bmpv,int frame_number,int screen,[Eye_Id] eye)",
  1454.         returns = "void",
  1455.         valuetype = "nil",
  1456.       },
  1457.      
  1458.       getSrate = {
  1459.         type = "function",
  1460.         description = [[Get BMPV audio samplerate.
  1461. Sample usage: samplerate = BMPV.getSrate(bmpv)]],
  1462.         args = "(bmpv_id bmpv)",
  1463.         returns = "u32",
  1464.         valuetype = "number",
  1465.       },
  1466.      
  1467.       getSize = {
  1468.         type = "function",
  1469.         description = [[Get BMPV total frame number.
  1470. Sample usage: tot = BMPV.getSize(bmpv)]],
  1471.         args = "(bmpv_id bmpv)",
  1472.         returns = "u32",
  1473.         valuetype = "number",
  1474.       },
  1475.      
  1476.       isPlaying = {
  1477.         type = "function",
  1478.         description = [[Get BMPV playback state.
  1479. Sample usage: if (BMPV.isPlaying(bmpv)) then ... end]],
  1480.         args = "(bmpv_id bmpv)",
  1481.         returns = "boolean",
  1482.         valuetype = "boolean",
  1483.       },
  1484.      
  1485.       stop = {
  1486.         type = "function",
  1487.         description = [[Stop a BMPV video.
  1488. Sample usage: BMPV.stop(bmpv)]],
  1489.         args = "(bmpv_id bmpv)",
  1490.         returns = "void",
  1491.         valuetype = "nil",
  1492.       },
  1493.      
  1494.       pause = {
  1495.         type = "function",
  1496.         description = [[Pause a BMPV video.
  1497. Sample usage: BMPV.pause(bmpv)]],
  1498.         args = "(bmpv_id bmpv)",
  1499.         returns = "void",
  1500.         valuetype = "nil",
  1501.       },
  1502.      
  1503.       resume = {
  1504.         type = "function",
  1505.         description = [[Resume a BMPV video.
  1506. Sample usage: BMPV.resume(bmpv)]],
  1507.         args = "(bmpv_id bmpv)",
  1508.         returns = "void",
  1509.         valuetype = "nil",
  1510.       },
  1511.     },
  1512.   },
  1513.  
  1514.   JPGV = {
  1515.     type = "class",
  1516.     description = "Handles JPGV video system.",
  1517.  
  1518.     childs = {
  1519.       load = {
  1520.         type = "function",
  1521.         description = [[Load a JPGV file.
  1522. Sample usage: jpgv = JPGV.load("/file.jpgv")]],
  1523.         args = "(string filename)",
  1524.         returns = "jpgv_id",
  1525.         valuetype = "userdata",
  1526.       },
  1527.      
  1528.       start = {
  1529.         type = "function",
  1530.         description = [[Start a JPGV video.
  1531. Sample usage: JPGV.start(jpgv, NO_LOOP, 0x08, 0x09)]],
  1532.         args = "(jpgv_id jpgv, int loop, u32 channel1, [u32 channel2])",
  1533.         returns = "void",
  1534.         valuetype = "nil",
  1535.       },
  1536.      
  1537.       draw = {
  1538.         type = "function",
  1539.         description = [[Draw JPGV current frame.
  1540. Sample usage: JPGV.draw(0,0,jpgv,TOP_SCREEN)]],
  1541.         args = "(int x, int y, jpgv_id jpgv, int screen, [Eye_id] eye)",
  1542.         returns = "void",
  1543.         valuetype = "nil",
  1544.       },
  1545.      
  1546.       unload = {
  1547.         type = "function",
  1548.         description = [[Unload a JPGV file.
  1549. Sample usage: JPGV.unload(jpgv)]],
  1550.         args = "(jpgv_id jpgv)",
  1551.         returns = "void",
  1552.         valuetype = "nil",
  1553.       },
  1554.      
  1555.       getFPS = {
  1556.         type = "function",
  1557.         description = [[Get JPGV framerate.
  1558. Sample usage: fps = JPGV.getFPS(jpgv)]],
  1559.         args = "(jpgv_id jpgv)",
  1560.         returns = "u32",
  1561.         valuetype = "number",
  1562.       },
  1563.      
  1564.       getFrame = {
  1565.         type = "function",
  1566.         description = [[Get JPGV current frame number.
  1567. Sample usage: cur = JPGV.getFrame(jpgv)]],
  1568.         args = "(jpgv_id jpgv)",
  1569.         returns = "u32",
  1570.         valuetype = "number",
  1571.       },
  1572.      
  1573.       showFrame = {
  1574.         type = "function",
  1575.         description = [[Show a selected frame from JPGV file.
  1576. Sample usage: JPGV.showFrame(0,0,jpgv,50,TOP_SCREEN)]],
  1577.         args = "(int x,int y,jpgv_id jpgv,int frame_number,int screen,[Eye_Id] eye)",
  1578.         returns = "void",
  1579.         valuetype = "nil",
  1580.       },
  1581.      
  1582.       getSrate = {
  1583.         type = "function",
  1584.         description = [[Get JPGV audio samplerate.
  1585. Sample usage: samplerate = JPGV.getSrate(jpgv)]],
  1586.         args = "(jpgv_id jpgv)",
  1587.         returns = "u32",
  1588.         valuetype = "number",
  1589.       },
  1590.      
  1591.       getSize = {
  1592.         type = "function",
  1593.         description = [[Get JPGV total frame number.
  1594. Sample usage: tot = JPGV.getSize(jpgv)]],
  1595.         args = "(jpgv_id jpgv)",
  1596.         returns = "u32",
  1597.         valuetype = "number",
  1598.       },
  1599.      
  1600.       isPlaying = {
  1601.         type = "function",
  1602.         description = [[Get JPGV playback state.
  1603. Sample usage: if (JPGV.isPlaying(jpgv)) then ... end]],
  1604.         args = "(jpgv_id jpgv)",
  1605.         returns = "boolean",
  1606.         valuetype = "boolean",
  1607.       },
  1608.      
  1609.       stop = {
  1610.         type = "function",
  1611.         description = [[Stop a JPGV video.
  1612. Sample usage: JPGV.stop(jpgv)]],
  1613.         args = "(jpgv_id jpgv)",
  1614.         returns = "void",
  1615.         valuetype = "nil",
  1616.       },
  1617.      
  1618.       pause = {
  1619.         type = "function",
  1620.         description = [[Pause a JPGV video.
  1621. Sample usage: JPGV.pause(jpgv)]],
  1622.         args = "(jpgv_id jpgv)",
  1623.         returns = "void",
  1624.         valuetype = "nil",
  1625.       },
  1626.      
  1627.       resume = {
  1628.         type = "function",
  1629.         description = [[Resume a JPGV video.
  1630. Sample usage: JPGV.resume(jpgv)]],
  1631.         args = "(jpgv_id jpgv)",
  1632.         returns = "void",
  1633.         valuetype = "nil",
  1634.       },
  1635.     },
  1636.   },
  1637. }
Advertisement
Add Comment
Please, Sign In to add comment