Mercurial > repos > tabletprog
comparison samples/sdl.tp @ 274:a923b5b7da3d
Initial work on an SDL2 binding
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 20 Jul 2014 00:13:01 -0700 |
parents | |
children | 2b58eafa360b |
comparison
equal
deleted
inserted
replaced
273:0dc7322590da | 274:a923b5b7da3d |
---|---|
1 #{ | |
2 import: [ | |
3 video | |
4 timer | |
5 ] from: (sdl subsystems) | |
6 main <- { | |
7 if: (sdl init: (video or timer)) = 0 { | |
8 (sdl createWindow: "SDL Test" pos: 0 0 size: 640 480 flags: 0u32) value: :window { | |
9 sdl delay: 3000u32 | |
10 window destroy | |
11 } none: { | |
12 print: "Failed to create window\n" | |
13 1 | |
14 } | |
15 } else: { | |
16 print: "Failed to initialize SDL\n" | |
17 1 | |
18 } | |
19 } | |
20 } |