🛠️ UTILITIES#
The utilities provided are essential for managing files and performance metrics in ANTIRUINS.
Note
There is a global table called STATS that contains various information just as FPS, Lua update and render time, the PVR render time and memory, etc.
STATS = {
dt = 0, -- delta time in mS.
update = 0, -- time taken by the Lua update function. (uS)
render = 0, -- time taken by the Lua render function. (uS)
pvrTime = 0, -- time taken by the PVR render function. (uS)
pvrMem = 0, -- memory used by the PVR render function. (% used)
fps = 0, -- frames per second.
sprites = 0, -- number of sprites current drawn.
memory = 0, -- memory used by the game. (Kb)
}
File Management#
Returns a path if the filename is found on the /cd, /rd, /pc, or in the loaded game folder.Mounts a romdisk at the specified mountpoint. The most common mountpoint is “/rd”.
Unmounts the specified mountpoint and frees up memory.
Executes a binary file. Works only on Dreamcast.
Timing#
Returns the current microseconds since the game has started.Returns the current milliseconds since the game has started.
Returns the current frames per second.