aboutsummaryrefslogtreecommitdiff
path: root/examples/working-shared/sdl.ey
diff options
context:
space:
mode:
Diffstat (limited to 'examples/working-shared/sdl.ey')
-rw-r--r--examples/working-shared/sdl.ey15
1 files changed, 10 insertions, 5 deletions
diff --git a/examples/working-shared/sdl.ey b/examples/working-shared/sdl.ey
index 23d2e79..52a22b5 100644
--- a/examples/working-shared/sdl.ey
+++ b/examples/working-shared/sdl.ey
@@ -3,13 +3,18 @@
ffi .sdl ":" via
-:SDL_INIT_VIDEO :SDL_Init {
- :SDL_GetError dump
- "SDL_Init failed" die
+:INIT_VIDEO :Init {
+ :GetError dump
+ "Init failed" die
} rep
-"Ohai!" 0 0 800 600 0 :SDL_CreateWindow
+"Ohai!" 0 0 800 600 0 :CreateWindow ==w
-"done" die
+w :GetWindowSurface ==s
+s 255 :Fill dump
+w :UpdateWindowSurface
+
+1 sys .out .read dump
+:Quit
# vim: syn=elymas