summary refs log tree commit diff stats
path: root/examples
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-10-14 14:35:21 +0200
committerAraq <rumpf_a@web.de>2015-10-14 14:35:44 +0200
commit3fef9f08bd6cab91b996df89585cb0d781879b8f (patch)
treeb3df6d50d4ab2b186a860a3b3d43e56cf4093b12 /examples
parent5a02230bf97c96cf4f74ed99024148476f9a2588 (diff)
downloadNim-3fef9f08bd6cab91b996df89585cb0d781879b8f.tar.gz
fixes regression: tactiontable
Diffstat (limited to 'examples')
-rw-r--r--examples/sdlex.nim52
1 files changed, 0 insertions, 52 deletions
diff --git a/examples/sdlex.nim b/examples/sdlex.nim
deleted file mode 100644
index 7a4ebf3db..000000000
--- a/examples/sdlex.nim
+++ /dev/null
@@ -1,52 +0,0 @@
-# Test the SDL interface:
-
-import
-  sdl, sdl_image, colors
-
-var
-  screen, greeting: PSurface
-  r: TRect
-  event: TEvent
-  bgColor = colChocolate.int32
-
-if init(INIT_VIDEO) != 0:
-  quit "SDL failed to initialize!"
-
-screen = setVideoMode(640, 480, 16, SWSURFACE or ANYFORMAT)
-if screen.isNil:
-  quit($sdl.getError())
-
-greeting = imgLoad("tux.png")
-if greeting.isNil:
-  echo "Failed to load tux.png"
-else:
-  ## convert the image to alpha and free the old one
-  var s = greeting.displayFormatAlpha()
-  swap(greeting, s)
-  s.freeSurface()
-
-r.x = 0
-r.y = 0
-
-block game_loop:
-  while true:
-
-    while pollEvent(addr event) > 0:
-      case event.kind
-      of QUITEV:
-        break game_loop
-      of KEYDOWN:
-        if evKeyboard(addr event).keysym.sym == K_ESCAPE:
-          break game_loop
-      else:
-        discard
-
-    discard fillRect(screen, nil, bgColor)
-    discard blitSurface(greeting, nil, screen, addr r)
-    discard flip(screen)
-
-greeting.freeSurface()
-screen.freeSurface()
-sdl.quit()
-
-## fowl wuz here 10/2012