Lua/Functions

From iPodLinux

Jump to: navigation, search

Contents

About

This section is devoted to the iPod library implementation into iPodLua. Most, if not all will be related to the iPod's functions such as buttons, settings, etc, etc.

Hotdog Table

(Under Development)

Command Arguments Description Current State Notes
hotdog.init() None Initializes Hotdog Y Tick.png *Required* No further console output
hotdog.quit() None Destroys Hotdog (And all resources) Y Tick.png Free doesn't work.
hotdog.new_object(srf, x, y, width, height, z) srf(Integer of hd_object 0-14) x, y, width, height, z(Integer) Creates a hotdog object (hd_object) Y Tick.png Due to technical limitations and develop laziness, it is limited to 15 surfaces so far.
hotdog.pixel(srf, x, y) srf(0-14) x, y(Integer) Draws a pixel Y Tick.png No Colour input yet
hotdog.line(srf, x1, y1, x2, y2) srf(0-14) x1, y1, x2, y2(Integer) Draws a line Y Tick.png No Colour input yet
hotdog.fillrect(srf, x, y, height, width) srf(0-14) x, y, height, width(Integer) Draws a filled rectangle Y Tick.png No Colour input yet
hotdog.animate() None Animates engine Y Tick.png
hotdog.render() None Renders everything to screen Y Tick.png Call after EVERYTHING you want drawn

Function Table

Command Arguments Description Current State Notes
ipod.beep() None iPod piezo beeps N Cross.png Doesn't do a thing
ipod.set_wheel_speed(amount) Amount(Integer(between num 1-9) Sets wheel speed Testing
ipod.contrast_set(amount) Amount(Integer(between num 1 - 128)) Sets the contrast for the iPod N Cross.png Doesn't do a thing
ipod.run(app) App(string "app -args") Launches a external application Broken Not properly implemented yet!
ipod.reboot() None Reboots the iPod Y Tick.png
ipod.diskmode() None iPod is restarted into Diskmode Y Tick.png
ipod.usb_connected() None Checks if USB cable is connected N Cross.png Doesn't do a thing
ipod.charging() None Checks if recharging N Cross.png Doesn't do a thing
ipod.get_ipod() None Returns a string of the ipod type Testing/Fixing See table "get_ipod" for more details! (When created)


Anything marked as Testing, Not Available, Broken is not in current builds of iPodLua unless specified!

get_ipod Table

This table explains the return data from the function ipod.get_ipod() (See above for more details).

String Returned iPod Type
"1" 1st Generation
"2" 2nd Generation
"3" 3rd Generation
"4" 4th Generation
"P" 4G Photo
"M1" Mini 1st Generation
"M2" Mini 2nd Generation
"N" Nano 1st Generation
"V" 5th Generation Video (1st Generation)