Last active
August 10, 2017 14:03
-
-
Save xriss/cd4951d249936329a0e08a79c111d17e to your computer and use it in GitHub Desktop.
Fun64 Hello World test code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- This is fun64 code, you can copy paste it into https://xriss.github.io/fun64/pad/ to run it. | |
-- | |
hardware,main=system.configurator({ | |
mode="fun64", -- select the standard 320x240 screen using the swanky32 palette. | |
update=function() update() end, -- called repeatedly to update+draw | |
}) | |
-- we will call this once in the update function | |
setup=function() | |
-- system.components.screen.bloom=0 | |
-- system.components.screen.filter=nil | |
-- system.components.screen.shadow=nil | |
print("Setup complete!") | |
end | |
-- updates are run at 60fps | |
update=function() | |
if setup then setup() setup=nil end | |
local ctext=system.components.text | |
local bg=9 | |
local fg=system.ticks%32 -- cycle the foreground color | |
ctext.text_clear(0x01000000*bg) -- clear text forcing a background color | |
ctext.text_print("Hello World!",34,15,fg,bg) -- (text,x,y,color,background) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment