💾 VMU#
Note
The VMU (Visual Memory Unit) is used for saving game data and displaying animations.
Save#
Keep these in mind when you create a new savefile:
gameName - 16 character long.
saveName - 26 character long.
descShort - 16 character long.
descLong - 32 character long.
saveID - from 1 to 3.
You should be able to save just about any Lua table on the VMU.
Check if there is a valid VMU present.
Initializes a save file with the specified parameters.
Check if a save file exists with the specified
saveID.
Save the
data table in the specified saveID. data can be any valid Lua Table.
Returns a
data table from the specified saveID.
Deletes the save file with the specified
saveID.
VMU Animation#
To display images on the VMU, you need to create “animations”. These animations can be 1 frame long (static).
local ANIMATION = {
icon = {}, -- image data
cFrame = 1, -- current frame displayed
length = frameNum or 1,
speed = speed or 1,
priority = priority or 1,
active = false,
filename = filename,
}
Returns an animation.
frameNum is the number of frames in the animation. Use 1 for static images.If you have multiple frame, make sure the files are named filename1.bin, filename2.bin, etc.
Displays the
frame (integer) of the specified animation.
Displays an animation for the specified number of
repeats. If clearAfter is true, the VMU image will be cleared once the animation is done.
Clears the VMU screen.
Frees the memory of the animation.