{"author_name":"Lerc","cat":"LD #15 - Caverns - 2009","comments":[{"author_name":"","time":"August 24, 2009 3:52 am","epoch":1251103920,"text":"Nice lib. I&#8217;ll be using my own library still, but it&#8217;s nice to see someone else besides me is using Pascal. <img src=\"http:\/\/ludumdare.com\/compo\/wp-includes\/images\/smilies\/simple-smile.png\" alt=\":)\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/>","spam":"N"}],"epoch":1251070020,"likes":0,"metadata":{"p_key":"73190","p_author":"Lerc","p_authorkey":"20","p_urlkey":"109012","p_title":"Easy Peasy Pascal Library.","p_cat":"LD #15 - Caverns - 2009","p_event":"LD15","p_time":"1251070020","p_likes":"0","p_comments":"1","p_status":"UPD5","us_key":"20","us_name":"Lerc","us_username":"lerc","event_start":"1251417600","event_key":"1","event_name":"LD15"},"text":"<p>I&#8217;m probably using a new library this time. \u00a0 It&#8217;s not terribly full featured at the moment but what it does have is a simple way to get a nice Fullscreen framebuffer on the OLPC-XO. \u00a0 I figure If I can write a halfway decent Game during the Ludum Dare then it can be added to the XO&#8217;s repertoire.<\/p>\n <p>The source for the library is in here along with a small test program I wrote last week to give it a try.<\/p>\n <p>http:\/\/screamingduck.com\/Cruft\/doodle.tar.gz<\/p>\n <p>I&#8217;ll probably be be adding things to the library right up to and most likely during competition time. \u00a0If anyone else wants to give the lib a go (Yes, It&#8217;s pascal) get in touch and I&#8217;ll make sure you&#8217;re up to date with the code.<\/p>\n <p>This is how simple a program can be using the Lib.<\/p>\n <pre style=\"border:1px solid black;padding:10px; background-color:#efe\">program demo;\n \n uses\n Drawing,simple16;\n \n var\n pic : tPicture;\n \n procedure Load;\n begin\n ScreenMode(640,480);\n pic := tPicture.loadFromFile('Frog.png');\n end;\n \n var\n X : Single = 320.0;\n Y : Single = 200.0;\n dy : Single =0.0;\n dx : Single =0.0;\n \n procedure Update(ticks : integer);\n begin\n X:=X+dx;\n Y:=Y+dy;\n dx:=dx+ random()*0.2-0.1;\n dy:=dy+ random()*0.2-0.1;\n dx*=0.99;\n dy*=0.99;\n end;\n \n procedure Draw;\n var\n i:integer;\n begin\n ClearScreen;\n DrawImage(pic,X,Y);\n end;\n \n begin\n Run(@load,@update,@draw);\n end.\n <\/pre>\n <p>The run procedure calls the Load update and Draw functions at the appropriate times, giving a picture that does an inertial drunkards walk around the screen.<\/p>","time":"August 23rd, 2009 6:27 pm","title":"Easy Peasy Pascal Library."}