Basic output system
This commit is contained in:
@ -1,21 +1,31 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func main() {
|
||||
count := 0
|
||||
t := 0
|
||||
for {
|
||||
fmt.Printf("Hello! %d", count)
|
||||
count++
|
||||
for y := 0; y < 120; y++ {
|
||||
for x := 0; x < 160; x++ {
|
||||
Pset(
|
||||
int32(x),
|
||||
int32(y),
|
||||
int32((x+y+t)%64),
|
||||
)
|
||||
}
|
||||
}
|
||||
// fmt.Printf("Hello! %d", count)
|
||||
// count++
|
||||
/*
|
||||
debug.PrintStack()
|
||||
*/
|
||||
YieldFrame()
|
||||
t += 1
|
||||
}
|
||||
}
|
||||
|
||||
//go:wasmimport viperid Pset
|
||||
//go:noescape
|
||||
func Pset(x int32, y int32, color int32)
|
||||
|
||||
//go:wasmimport viperid YieldFrame
|
||||
//go:noescape
|
||||
func YieldFrame()
|
||||
|
Reference in New Issue
Block a user