github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/examples/gba-display/gba-display.go (about)

     1  package main
     2  
     3  // Draw a red square on the GameBoy Advance screen.
     4  
     5  import (
     6  	"image/color"
     7  	"machine"
     8  )
     9  
    10  var display = machine.Display
    11  
    12  func main() {
    13  	display.Configure()
    14  
    15  	for x := int16(30); x < 50; x++ {
    16  		for y := int16(80); y < 100; y++ {
    17  			display.SetPixel(x, y, color.RGBA{255, 0, 0, 255})
    18  		}
    19  	}
    20  	display.Display()
    21  }