This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: dothellrc | |
version: 0.1.0.0 | |
synopsis: My personal ".hellrc" | |
license: WTFPL | |
license-file: COPYING | |
author: Karl-Oskar "klrr" Rikås | |
maintainer: [email protected] | |
copyright: (C) 2013, Karl-Oskar Rikås | |
category: System | |
build-type: Simple |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- some stuff taken from ocharle's SDL and netwire tutorial, https://github.com/ocharles/ocharles.org.uk--Getting-Started-with-Netwire-and-SDL/blob/master/Challenge3.hs | |
{-# LANGUAGE StandaloneDeriving #-} | |
import Data.Word (Word16) | |
import Data.Set (Set) | |
import qualified Data.Set as Set | |
import qualified Graphics.UI.SDL as SDL | |
import Reactive.Banana | |
import Reactive.Banana.Frameworks | |
main = do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.Bits | |
import Data.Word | |
import Data.IORef | |
import qualified Graphics.UI.SDL as SDL | |
import qualified Graphics.UI.SDL.Primitives as SDL | |
main = do | |
SDL.init [SDL.InitEverything] | |
SDL.setVideoMode 640 480 32 [] | |
var <- newIORef (0, 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.Bits | |
import Data.Word | |
import Data.IORef | |
import qualified Graphics.UI.SDL as SDL | |
import qualified Graphics.UI.SDL.Primitives as SDL | |
main = do | |
SDL.init [SDL.InitEverything] | |
SDL.setVideoMode 640 480 32 [] | |
var <- newIORef (0, 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qualified Graphics.UI.SDL as SDL | |
import qualified Graphics.UI.SDL.Primitives as SDL | |
main = do | |
SDL.init [SDL.InitEverything] | |
SDL.setVideoMode 640 480 32 [] >>= loop | |
loop screen = do | |
SDL.rectangle screen (SDL.Rect 50 50 100 100) (SDL.Pixel 101) | |
SDL.flip screen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE RankNTypes #-} | |
import Control.Monad (when) | |
import Reactive.Banana | |
import Reactive.Banana.Frameworks | |
main = do | |
source <- newAddHandler | |
network <- setupNetwork source | |
actuate network | |
eventLoop source |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE RankNTypes #-} | |
import Reactive.Banana | |
import Reactive.Banana.Frameworks | |
import qualified Graphics.UI.SDL as SDL | |
import qualified Graphics.UI.SDL.Image as Image | |
main = do | |
SDL.init [SDL.InitEverything] | |
SDL.rawSetCaption (Just "foobar") Nothing | |
SDL.setVideoMode 640 480 32 [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE RankNTypes #-} | |
import Reactive.Banana | |
import Reactive.Banana.Frameworks | |
import qualified Graphics.UI.SDL as SDL | |
import qualified Graphics.UI.SDL.Image as Image | |
main = do | |
SDL.init [SDL.InitEverything] | |
SDL.rawSetCaption (Just "foobar") Nothing | |
SDL.setVideoMode 640 480 32 [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE RankNTypes #-} | |
import Reactive.Banana | |
import Reactive.Banana.Frameworks | |
import qualified Graphics.UI.SDL as SDL | |
import qualified Graphics.UI.SDL.Image as Image | |
main = do | |
SDL.init [SDL.InitEverything] | |
SDL.rawSetCaption (Just "foobar") Nothing | |
SDL.setVideoMode 640 480 32 [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Window | |
ith i lst = case lst of | |
x::xs -> if i == 0 then x else ith (i-1) xs | |
images = [ "http://www.xonotic.org/m/uploads/2012/07/frontpage_007.jpg", | |
"http://www.xonotic.org/m/uploads/2012/07/frontpage_021.jpg", | |
"http://www.xonotic.org/m/uploads/2012/07/frontpage_008.jpg", | |
"http://www.xonotic.org/m/uploads/2012/07/frontpage_005.jpg" ] |