<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>Dev Tutorial</title>
	<atom:link href="http://dev.indra-ehm.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://dev.indra-ehm.net</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Tue, 30 Dec 2008 10:37:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Creating GUI with SDL</title>
		<link>http://dev.indra-ehm.net/2008/12/creating-gui-with-sdl/</link>
		<comments>http://dev.indra-ehm.net/2008/12/creating-gui-with-sdl/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 09:53:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[All]]></category>

		<category><![CDATA[Code]]></category>

		<category><![CDATA[GUI]]></category>

		<category><![CDATA[SDL]]></category>

		<guid isPermaLink="false">http://dev.indra-ehm.net/?p=17</guid>
		<description><![CDATA[To create a GUI with the SDL, the first time have to do the settings for Microsoft Visual Studio such as this description.
Examples of &#8216;GUI.h&#8217; in the program:
#include "SDL/GUI.h"
int main(int argc, char* args[])
{
bool quit = false;      //variable quit

This code will make a window with 256 x 192 size, window initialisation

if(init(256, 192,"Dev Window") == false)
{
return 1;
}
Making [...]]]></description>
			<content:encoded><![CDATA[<p>To create a GUI with the SDL, the first time have to do the settings for Microsoft Visual Studio such as <a title="Setting Visual Studio 2008 for SDL" href="http://dev.indra-ehm.net/2008/12/setting-visual-studio-2008-for-sdl/" target="_blank">this</a> description.<br />
Examples of &#8216;GUI.h&#8217; in the program:</p>
<p><code>#include "SDL/GUI.h"</code></p>
<p><code>int main(int argc, char* args[])<br />
{<br />
bool quit = false;      //variable quit<br />
</code><br />
This code will make a window with 256 x 192 size, window initialisation<br />
<code><br />
if(init(256, 192,"Dev Window") == false)<br />
{<br />
return 1;<br />
}</code></p>
<p>Making Object<br />
<code><br />
Label inputLbl(30, 20, "Input :");</code><br />
<code> TextBox txtInput (140, 20, 100, 26, "");<br />
Label outputLbl(30, 60, "Output :");<br />
Label resultLbl(140, 60, "");<br />
Button showBtn (140, 100, 100, 26, 170, 101, "Show");<br />
Button quitBtn (140, 140, 100, 26, 173, 141, "Quit");</code></p>
<p>This is main loop for SDL program<br />
<code><br />
while(!quit)<br />
{<br />
clearWindow();                        //to refresh SDL buffer<br />
if(SDL_PollEvent(&amp;event))   //save all event on keyboard and mouse<br />
{<br />
showBtn.handle_events();              //updated object as event<br />
quitBtn.handle_events();<br />
txtInput.handle_events();<br />
if(showBtn.isClicked())               //handled event for button<br />
{<br />
resultLbl.setText(txtInput.getText());<br />
}</code></p>
<p><code><br />
if(quitBtn.isClicked())<br />
{<br />
quit = true;<br />
}</code><br />
<code><br />
if (event.type == SDL_QUIT) //handled evet if closed button clicked<br />
{<br />
quit = true;<br />
}<br />
}</code><br />
<code><br />
inputLbl.show();<br />
outputLbl.show();<br />
resultLbl.show();<br />
txtInput.show();<br />
showBtn.show();<br />
quitBtn.show();</code><br />
<code><br />
if(SDL_Flip(screen) == -1)        //show SDL buffer on window<br />
{<br />
return 1;<br />
}<br />
}<br />
</code><br />
<code>clean_up();     //cleaning memory from SDL buffer<br />
return 0;<br />
}</code></p>
<p>The program will produce the above output as follows :<br />
<a href="http://picasaweb.google.co.id/lh/photo/_ds9IMWJU_UdMEZfWHLgDQ?feat=embedwebsite"><img src="http://lh5.ggpht.com/_eRf3LGO0JM0/SVnu71Ygz0I/AAAAAAAAAZg/Yac8-uBjQ8g/s288/sample%20window.jpg" alt="" /></a><a href="http://picasaweb.google.co.id/lh/photo/e3I6eH7O30lTvn8zCyiOGg?feat=embedwebsite"><img src="http://lh3.ggpht.com/_eRf3LGO0JM0/SVnu7-l2MwI/AAAAAAAAAZo/BIrPNKHH2go/s288/sample%20window2.jpg" alt="" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://dev.indra-ehm.net/2008/12/creating-gui-with-sdl/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Setting Visual Studio 2008 for SDL</title>
		<link>http://dev.indra-ehm.net/2008/12/setting-visual-studio-2008-for-sdl/</link>
		<comments>http://dev.indra-ehm.net/2008/12/setting-visual-studio-2008-for-sdl/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 08:58:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[All]]></category>

		<category><![CDATA[Settings]]></category>

		<category><![CDATA[SDL]]></category>

		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://dev.indra-ehm.net/?p=14</guid>
		<description><![CDATA[You must have Microsoft Visual C++ 2008 Express Edition and need SDL header and library before starting to the next step. You can download SDL header and library here.
1. What you should do is just run VS8.bat. This application will run the cmd command to copy the files that you download to a folder in [...]]]></description>
			<content:encoded><![CDATA[<p>You must have <strong>Microsoft Visual C++ 2008 Express Edition</strong> and need <strong>SDL</strong> header and library before starting to the next step. You can download SDL header and library <a title="SDL download" href="http://dev.indra-ehm.net/download/VS8.zip" target="_blank">here</a>.</p>
<p>1. What you should do is just run <em>VS8.bat</em>. This application will run the cmd command to copy the files that you download to a folder in your Visual Studio library.</p>
<p>When we see the command in the application, which we see are:</p>
<p><code>copy lib\*.lib "C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\"*.lib<br />
mkdir "C:\Program Files\Microsoft Visual Studio 9.0\VC\include\SDL"<br />
copy SDL "C:\Program Files\Microsoft Visual Studio 9.0\VC\include\SDL"<br />
copy system32 C:\WINDOWS\system32<br />
pause<br />
</code></p>
<p>So if you fail in the running VS8.bat (some or all of the files are not copied), you can do manual <em>copy-paste</em>. This problem often occurs if you use Windows Vista. This is because the UAC (User Account Control). You can read about <a title="UAC - User Account Control Windows Vista" href="http://blog.indra-ehm.net/2007/12/access-is-denied-unable-to-open-service.html" target="_blank">UAC here</a>.</p>
<p>2. Run Microsoft Visual C++ 2008 Express Edition.</p>
<p>3. <em>Select File - New Project</em>. In the Project types select <em>Visual C + + - Win32</em>. In the Templates section, select <em>Win32 Console Application</em>. Enter the name and location of the project want to make, and then click OK.<br />
<a href="http://picasaweb.google.co.id/lh/photo/iEyDevA9HdMl5bVf9kjYCQ?feat=embedwebsite"><img src="http://lh6.ggpht.com/_eRf3LGO0JM0/SVncg-0htQI/AAAAAAAAAYc/dw_Db7MHcM4/s400/New%20Project%20VS08.jpg" alt="" /></a></p>
<p>4. In the dialog box that appears, select the <em>Application Settings</em>, then <em>Empty contents</em> check box project. Then click <em>Finish</em>.<br />
<a href="http://picasaweb.google.co.id/lh/photo/XeD62Q-a5HO1bwk_87iwtA?feat=embedwebsite"><img src="http://lh3.ggpht.com/_eRf3LGO0JM0/SVnZ1mILwQI/AAAAAAAAAW0/-2IbHMBClps/s400/Application%20Settings.jpg" alt="" /></a></p>
<p>5. Right-click on the files in the folder Source Solution Explorer, select <em>Add - New Item</em> to create a new file.<br />
<a href="http://picasaweb.google.co.id/lh/photo/gJmNLrMJzADgodKqW6yhew?feat=embedwebsite"><img src="http://lh5.ggpht.com/_eRf3LGO0JM0/SVnZ1dJ6XkI/AAAAAAAAAWk/o9RQDHVJ6YA/s288/Add%20New%20Item.jpg" alt="" /></a></p>
<p>6. Select <em>Visual C + + - Code on the Categories</em>, and then select &#8220;<em>C + + File (. CPP)</em>&#8221; at the Templates. Enter the name of the file you want and click the Add button.<br />
<a href="http://picasaweb.google.co.id/lh/photo/XlGwATaToweB-jxwavsglw?feat=embedwebsite"><img src="http://lh5.ggpht.com/_eRf3LGO0JM0/SVnZ1d8i4-I/AAAAAAAAAWs/y6zwN3XT9p4/s400/Add%20New%20Item2.jpg" alt="" /></a></p>
<p>7. In the Menu bar select <em>Project - Properties  the Add button</em>.<br />
<a href="http://picasaweb.google.co.id/lh/photo/M5VF64Fh9aJLizcK0VQbBQ?feat=embedwebsite"><img src="http://lh6.ggpht.com/_eRf3LGO0JM0/SVncgq-u9sI/AAAAAAAAAYU/La8aCl9ZTQw/s288/Menu%20Project.jpg" alt="" /></a></p>
<p>8. Select the <em>Configuration Properties - C + + - General</em>. Then change the contents <em>Detect 64-bit Portability Issues</em> to be &#8216;<em>No</em>&#8216;.<br />
<a href="http://picasaweb.google.co.id/lh/photo/kogidQGsF5McQEzg2cvA5A?feat=embedwebsite"><img src="http://lh5.ggpht.com/_eRf3LGO0JM0/SVncgaNy-8I/AAAAAAAAAX8/L7VXcUrSL0U/s400/Config%20General.jpg" alt="" /></a></p>
<p>9. Select the <em>Configuration Properties - C + + - Code Generation</em>. Then change the <em>contents</em> to be <em>Runtime Library Multi-threaded DLL (/ MD)</em>.<br />
<a href="http://picasaweb.google.co.id/lh/photo/V91ugz9JPV5rqwlV3u6Jqw?feat=embedwebsite"><img src="http://lh5.ggpht.com/_eRf3LGO0JM0/SVnZ1xa8bsI/AAAAAAAAAW8/mWrk_g-sW9o/s400/Config%20Code%20Generation.jpg" alt="" /></a></p>
<p>10. Select the Configuration P<em>roperties - Linker - Input</em>. Then fill with Additional dependencies &#8220;<strong>SDL.lib SDLmain.lib SDL_image.lib SDL_ttf.lib</strong>&#8220;.<br />
<a href="http://picasaweb.google.co.id/lh/photo/lnnhLl6IWgEuNC-7VhqIIg?feat=embedwebsite"><img src="http://lh5.ggpht.com/_eRf3LGO0JM0/SVncgT5mYhI/AAAAAAAAAYE/6aGPhGi8QLQ/s400/Config%20Input.jpg" alt="" /></a></p>
<p>11. Select the Configuration <em>Properties - Linker - System</em>. Then change the <em>property</em> into <em>Windows Subsystem (/ subsystem: WINDOWS</em>). Then click the OK button.<br />
<a href="http://picasaweb.google.co.id/lh/photo/sarsWlVo_1gS_5auLpO3Hg?feat=embedwebsite"><img src="http://lh4.ggpht.com/_eRf3LGO0JM0/SVncggIwhSI/AAAAAAAAAYM/MW5xmvy8Ku0/s400/Config%20System.jpg" alt="" /></a></p>
<p>12.   Finish.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.indra-ehm.net/2008/12/setting-visual-studio-2008-for-sdl/feed/</wfw:commentRss>
		</item>
		<item>
		<title>About that Interference</title>
		<link>http://dev.indra-ehm.net/2008/12/about-that-interference/</link>
		<comments>http://dev.indra-ehm.net/2008/12/about-that-interference/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 04:18:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[All]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dev.indra-ehm.net/?p=11</guid>
		<description><![CDATA[Sorry, for a few days of this site to crash. This is because I failed to do upgrade Wordpress to version 2.7. Unfortunately because of the error, then all the articles I write previously can not be saved. However, now I have successfully install the wordpress 2.7. I will strive to re-fill this blog with [...]]]></description>
			<content:encoded><![CDATA[<p>Sorry, for a few days of this site to crash. This is because I failed to do upgrade Wordpress to version 2.7. Unfortunately because of the error, then all the articles I write previously can not be saved. However, now I have successfully install the wordpress 2.7. I will strive to re-fill this blog with a useful tutorial as soon as possible.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.indra-ehm.net/2008/12/about-that-interference/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Under Construction</title>
		<link>http://dev.indra-ehm.net/2008/12/under-construction/</link>
		<comments>http://dev.indra-ehm.net/2008/12/under-construction/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 19:18:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[All]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dev.indra-ehm.net/?p=6</guid>
		<description><![CDATA[I&#8217;m sorry, this site is under construction for some days.
Thanks,
Indra EHM
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sorry, this site is under construction for some days.</p>
<p>Thanks,</p>
<p>Indra EHM</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.indra-ehm.net/2008/12/under-construction/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
