Tuesday, September 19, 2006

Scheme scheme scheme

Here's my first scheme (that I've written off my own back rather than copying from the text book) function it's very very simple. If you pass in a true value it returns hello, if you pass in a false value is return goodbye. Goodbye and hello aren't strings they're more like unitialized variables.

Anyway behold:

(define test?
(lambda (a)
((eq? a #t) 'hello)
(else 'goodbye))))

Yesterday I played with the map editor program a bit more. I'm having trouble transforming the device for my various swap chains so that's something I need to play with. (this looks like a reasonable place to start) I also added a moving camera to my tile renderer to make sure there are no artifacts. It works fine. So I documented my simple rendering stuff - the RenderPrimitives library that handles batching. Time to find another suspect for the artifacts.


Jani said...

The Scheme syntax looks annoying :D
So many brackets.. and on the same line... eww.

Primitives. Not Primatives ;)

balaam said...

Haha my library is actually called "RenderPrimatives" :D so I least I mispell consistently!

That's something I'll have to change :D

I think eventually you learn not to see the brackets. In emacs I have it so everytime I open a bracket, it automatically adds the closing one and puts my cursor in the middle.