diff options
| author | Drahflow <drahflow@gmx.de> | 2013-10-15 11:04:12 +0200 |
|---|---|---|
| committer | Drahflow <drahflow@gmx.de> | 2013-10-15 11:04:12 +0200 |
| commit | 596a42abc73e5d3cb12538248ce1ebc90f42ec24 (patch) | |
| tree | 83dfec063dd078e78e7535d4f4ebc8ebf3725e1a | |
| parent | 64419a3ffee442e831dc3d54a64fe382baf7c297 (diff) | |
Now drawing (blue)
| -rw-r--r-- | elymas/lib/ffi/sdl.ey | 20 | ||||
| -rw-r--r-- | elymas/lib/sys/so.ey | 2 | ||||
| -rw-r--r-- | examples/working-shared/sdl.ey | 15 |
3 files changed, 26 insertions, 11 deletions
diff --git a/elymas/lib/ffi/sdl.ey b/elymas/lib/ffi/sdl.ey index 605e6e3..96f43fe 100644 --- a/elymas/lib/ffi/sdl.ey +++ b/elymas/lib/ffi/sdl.ey @@ -3,13 +3,23 @@ "/usr/lib/x86_64-linux-gnu/libSDL2.so" :dlopen -- - 32 ==:SDL_INIT_VIDEO + 32 ==:INIT_VIDEO - { -0021 :resolveFunction -01 deffd }' "->" deffd + { _ "SDL_" -01 cat -1032 :resolveFunction -01 deffd }' "->" deffd - "i" "i32" ->SDL_Init - "" "s" ->SDL_GetError - "siiiii" "p" ->SDL_CreateWindow + "" "" ->SetMainReady + "i" "i32" ->Init + "" "" ->Quit + "" "s" ->GetError + + "siiiii" "p" ->CreateWindow + "p" "" ->DestroyWindow + "p" "i32" ->UpdateWindowSurface + "p" "p" ->GetWindowSurface + "pbi" "i32" ->FillRect + { 0 -201 } /SDL_FillRect "pii" "i32" :resolveFunction ; /Fill deffd + + SetMainReady > /sdl ffi .defv # vim: syn=elymas diff --git a/elymas/lib/sys/so.ey b/elymas/lib/sys/so.ey index 4a0632f..274a4e3 100644 --- a/elymas/lib/sys/so.ey +++ b/elymas/lib/sys/so.ey @@ -262,7 +262,7 @@ { [ - { rets "v" streq }' { } + { rets "" streq }' { } { rets "s" streq }' { /rax :pushqReg /rcx /rcx :xorqRegReg 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 |
