mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 05:23:40 +00:00
9846c062b3
Only tested in an emulator (mGBA). Almost nothing is supported, but drawing to the screen works.
22 lines
326 B
Go
22 lines
326 B
Go
package main
|
|
|
|
// Draw a red square on the GameBoy Advance screen.
|
|
|
|
import (
|
|
"image/color"
|
|
"machine"
|
|
)
|
|
|
|
var display = machine.Display
|
|
|
|
func main() {
|
|
display.Configure()
|
|
|
|
for x := int16(30); x < 50; x++ {
|
|
for y := int16(80); y < 100; y++ {
|
|
display.SetPixel(x, y, color.RGBA{255, 0, 0, 255})
|
|
}
|
|
}
|
|
display.Display()
|
|
}
|