Riko4: Difference between revisions
Jump to navigation
Jump to search
m (fixed cat) |
m (→Console Commands: left an empty bullet) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{stub}} | {{stub}} | ||
'''Riko4''' is a fantasy computer first released in 2017 by Emma. Games and applications written for Riko4 using Lua. | '''Riko4''' is a fantasy computer first released in 2017 by [https://github.com/emmachase Emma]. Games and applications written for Riko4 using Lua. | ||
==Specifications== | ==Specifications== | ||
Line 18: | Line 18: | ||
* <code>ls</code> | * <code>ls</code> | ||
* <code>lua</code> | * <code>lua</code> | ||
===Graphics=== | ===Graphics=== |
Latest revision as of 13:36, 1 December 2023
This article is incomplete. You can help this wiki by expanding it.
Riko4 is a fantasy computer first released in 2017 by Emma. Games and applications written for Riko4 using Lua.
Specifications[edit]
- Screen: 280x160, 16 color fixed palette
- Sound: yes
API[edit]
Riko4 has a few functions built-in that are called by the system.
_update()
- Called every frame before_draw()
_draw()
- Called every frame after_update()
_event(evt, ...)
- Called when an event is created
Console Commands[edit]
cd [folder]
ls
lua
Graphics[edit]
Many of these are wrapper functions for the GPU module.
cam(x, y)
- move the cameracls()
line(x1, y1, x2, y2, color, lineWidth)
pal(paletteTable)
pget(x, y)
pix(x, y, color)
pixb(centerX, centerY, width, height, pixelTable)
- blit pixelspop()
push()
rgb(red, blue, green)
- creates an RGB valuerect(x, y, width, height, color)
rectFill(x, y, width, height, color)
sheet(file, area, spacing, margin)
spr(x, y, dx, dy)
swap()
trans(x, y)
write(text, width, height, color)
writeScaled(text, width, height, color)
?writeWidth(text, width)
?
GPU[edit]
gpu.blitPalette(palette)
gpu.blitPixels(centerX, centerY, width, height, pixelTable)
gpu.clear(color)
gpu.clip(x, y, width, height)
gpu.drawPixel(x, y, color)
gpu.drawRectangle(x, y, width, height, color)
gpu.getPalette()
gpu.getPixel(x, y)
gpu.pop()
gpu.push()
gpu.translate(x, y)
gpu.setPaletteColor(index, r, g, b)
gpu.swap()
Filesystem[edit]
FSRef:close()
- close the file handle FSRefbool fs.delete(filename)
fs.getAttr(filename)
fs.getCWD()
fs.getClipboard()
fs.getLastFile()
fs.list(directory)
bool fs.mkdir(folderName)
- Creates folderName with 0777 maskbool fs.move(originalFilename, destFilename)
FSRef = fs.open(filename, flags)
- opens a file handle (must also be closed manually)FSRef:read(someWeirdKeyword)
fs.setClipboard(text)
fs.setCWD(directory)
Sound[edit]
speaker.play(params)