<?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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Wesley&#039;s Techblog &#187; C</title>
	<atom:link href="http://wesley.vidiqatch.org/category/programming/c/feed/" rel="self" type="application/rss+xml" />
	<link>http://wesley.vidiqatch.org</link>
	<description>This blog does not need a smart-ass tagline</description>
	<lastBuildDate>Wed, 09 Sep 2009 21:36:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Small pseudo-assembler interpreter</title>
		<link>http://wesley.vidiqatch.org/30-08-2009/small-pseudo-assembler-interpreter/</link>
		<comments>http://wesley.vidiqatch.org/30-08-2009/small-pseudo-assembler-interpreter/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 14:02:56 +0000</pubDate>
		<dc:creator>Wesley</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[School]]></category>

		<guid isPermaLink="false">http://wesley.vidiqatch.org/?p=527</guid>
		<description><![CDATA[I had to develop a pseudo-assembler interpreter for the course Microprocessing.
Since it was just lying around on my hard drive I figured I could just as well put it on-line. It contains a few things that might be interesting to developers:

Using a C library in C++/Qt applications and translating C function callbacks into Qt signals
Implementation [...]]]></description>
			<content:encoded><![CDATA[<p>I had to develop a <strong>pseudo-assembler interpreter</strong> for the course <em><strong>Microprocessing</strong></em>.</p>
<p>Since it was just lying around on my hard drive I figured I could just as well put it on-line. It contains a few things that might be interesting to developers:</p>
<ul>
<li>Using a C library in C++/Qt applications and translating C function callbacks into Qt signals</li>
<li>Implementation of virtual static and virtual dynamic memory</li>
<li>Converting between virtual signed and unsigned values (system independent)</li>
<li>Saving data and instructions in same virtual memory (Von Neumann architecture)</li>
</ul>
<p style="text-align: center;"><a href="http://wesley.vidiqatch.org/files/qpasm/qpasm_1.0_screen.png"><img class="aligncenter" title="QPasm 1.0" src="http://wesley.vidiqatch.org/files/qpasm/qpasm_1.0_screen.png" alt="" width="614" height="340" /></a></p>
<p>More information (and source code) is available here: <a href="http://wesley.vidiqatch.org/files/qpasm/">http://wesley.vidiqatch.org/files/qpasm/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wesley.vidiqatch.org/30-08-2009/small-pseudo-assembler-interpreter/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Overriding dynamic library calls (function interposition)</title>
		<link>http://wesley.vidiqatch.org/18-08-2009/overriding-dynamic-library-calls-function-interposition/</link>
		<comments>http://wesley.vidiqatch.org/18-08-2009/overriding-dynamic-library-calls-function-interposition/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 07:32:57 +0000</pubDate>
		<dc:creator>Wesley</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://wesley.vidiqatch.org/?p=497</guid>
		<description><![CDATA[About function interposition
I was wondering how I could override dynamic library calls in Linux, and I came across this technique known as function interposition. It is a powerful technique that allows you to override dynamic library calls. It might sound dull, but it can be very, very useful. There are some memory trace tools that [...]]]></description>
			<content:encoded><![CDATA[<h4>About function interposition</h4>
<p>I was wondering how I could <em>override dynamic library calls</em> in Linux, and I came across this technique known as <strong>function interposition</strong>. It is a powerful technique that allows you to override dynamic library calls. It might sound dull, but it can be very, very useful. There are some memory trace tools that make use of this technique to work, but perhaps a cooler example is the <a href="http://nullkey.ath.cx/projects/glc/">OpenGL capture system</a> which was created by <a href="nullkey.ath.cx">nullkey</a>: it can capture OpenGL frames by overriding certain OpenGL functions. Another example are cheat tools (wallhacks, aimbots) which also make use of this technique a lot.</p>
<h4>Some background</h4>
<p>While Googling <em>(did I spell that right?)</em> I came across <a href="http://www.jayconrod.com/cgi/view_post.py?23">this</a> recent blog article which explains the background very well. I will quote it here:</p>
<blockquote><p>First, some background. When a program that uses dynamic libraries is compiled, a list of undefined symbols is included in the binary, along with a list of libraries the program is linked with. There is no correspondence between the symbols and the libraries; the two lists just tell the loader which libraries to load and which symbols need to be resolved. At runtime, each symbol is resolved using the first library that provides it. This means that if we can get a library containing our wrapper functions to load before other libraries, the undefined symbols in the program will be resolved to our wrappers instead of the real functions.</p></blockquote>
<p>So if we create a custom shared library which overrides some of the functions of the original library, our functions will be called instead of those of the original library.</p>
<h4>How to do it</h4>
<ul>
<li>Write new functions which override existing functions</li>
<li>Compile the written code to a dynamic library that is linked to the dynamic linking interface library</li>
<li>Use the <em>LD_PRELOAD</em> environment variable when running an application to preload your custom library before all other dynamic libraries</li>
</ul>
<p><a href="http://www.jayconrod.com/cgi/view_post.py?23">The article by Jay Conrod</a> has an example which shows you the basic implementation of a simple memory allocation tracer.</p>
<p>I have also cooked up an example myself. Because I&#8217;ve been busy learning more about OpenGL, I thought that it shouldn&#8217;t be too hard to create a wallhack for one of my favourite games: <a href="http://en.wikipedia.org/wiki/Soldier_of_Fortune_II:_Double_Helix">Soldier of Fortune 2</a> running in Wine. Just for testing purposes of course! I am no cheater <img src='http://wesley.vidiqatch.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  It turned out to be relatively simple, although my first tries weren&#8217;t so very successful:</p>
<ul>
<li><a href="http://wesley.vidiqatch.org/images/hack_v1.png">Epic fail</a> &#8211; At least I know my library is used now.</li>
<li><a href="http://wesley.vidiqatch.org/images/hack_v2.png">Partial success</a> &#8211; Disabling depth testing completely was only a partial success.</li>
<li><a href="http://wesley.vidiqatch.org/images/hack_v3.png">Success</a> &#8211; A debugger can tell that players are drawn using glDrawElements(). By knowing the number of elements for each character, we can disable depth testing selectively.</li>
</ul>
<div class="wp-caption aligncenter" style="width: 568px"><a href="/images/hack_v3.png"><img title="SoF2 wallhack" src="/images/hack_v3.png" alt="Soldier of Fortune 2 wallhack example" width="558" height="430" /></a><p class="wp-caption-text">Soldier of Fortune 2 wallhack example</p></div>
<p>For those of you who are interested in the code:</p>
<div class="codecolorer-container cpp-qt default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:500px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br /></div></td><td><div class="cpp-qt codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #888888; font-style: italic;">/*<br />
&nbsp; &nbsp; Simple wallhack example for Soldier of Fortune 2 (Wine) in Linux using function interposition<br />
<br />
&nbsp; &nbsp; This code snippet was written by Wesley Stessens (wesley@ubuntu.com)<br />
&nbsp; &nbsp; It is released in the Public Domain.<br />
<br />
&nbsp; &nbsp; Compilation: gcc -Wall -ansi -pedantic -shared -ldl -fPIC glhack.c -o glhack.so<br />
&nbsp; &nbsp; Usage: LD_PRELOAD=glhack.so wine game.exe<br />
*/</span><br />
<br />
<span style="color: #006E28;">#define _GNU_SOURCE</span><br />
<span style="color: #006E28;">#include &lt;dlfcn.h&gt;</span><br />
<span style="color: #006E28;">#include &lt;stdio.h&gt;</span><br />
<span style="color: #006E28;">#include &lt;stdint.h&gt;</span><br />
<span style="color: #006E28;">#include &lt;GL/gl.h&gt;</span><br />
<br />
<span style="color: #888888; font-style: italic;">/* Override the glDrawElements function */</span><br />
GLAPI <span style="color: #0057AE;">void</span> GLAPIENTRY glDrawElements<span style="color: #006E28;">&#40;</span>GLenum mode<span style="color: #006E28;">,</span> GLsizei count<span style="color: #006E28;">,</span> GLenum type<span style="color: #006E28;">,</span> <span style="color: #0057AE;">const</span> GLvoid <span style="color: #006E28;">*</span>indices<span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #888888; font-style: italic;">/* Store the actual function in a static function pointer */</span><br />
&nbsp; &nbsp; <span style="color: #0057AE;">static</span> <span style="color: #0057AE;">void</span> <span style="color: #006E28;">&#40;</span><span style="color: #006E28;">*</span>glDrawElements_<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#40;</span>GLenum mode<span style="color: #006E28;">,</span> GLsizei count<span style="color: #006E28;">,</span> GLenum type<span style="color: #006E28;">,</span> <span style="color: #0057AE;">const</span> GLvoid <span style="color: #006E28;">*</span>indices<span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">=</span> NULL<span style="color: #006E28;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight:bold;">if</span> <span style="color: #006E28;">&#40;</span><span style="color: #006E28;">!</span>glDrawElements_<span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; glDrawElements_ <span style="color: #006E28;">=</span> <span style="color: #006E28;">&#40;</span><span style="color: #0057AE;">void</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">*</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#40;</span>intptr_t<span style="color: #006E28;">&#41;</span>dlsym<span style="color: #006E28;">&#40;</span>RTLD_NEXT<span style="color: #006E28;">,</span> <span style="color: #BF0303;">&quot;glDrawElements&quot;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #2B74C7;">puts</span><span style="color: #006E28;">&#40;</span><span style="color: #BF0303;">&quot;GLHack: glDrawElements call has been overridden&quot;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span><br />
&nbsp; &nbsp; <span style="color: #006E28;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #888888; font-style: italic;">/* Disable depth testing if the number of elements to draw is one of the following, which means a player is being drawn */</span><br />
&nbsp; &nbsp; <span style="color: #888888; font-style: italic;">/* To avoid abuse of this code by cheaters, I have changed all count constants below to VALUEX */</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight:bold;">if</span> <span style="color: #006E28;">&#40;</span>count <span style="color: #006E28;">==</span> VALUE1 <span style="color: #006E28;">||</span> count <span style="color: #006E28;">==</span> VALUE2 <span style="color: #006E28;">||</span> count <span style="color: #006E28;">==</span> VALUE3 <span style="color: #006E28;">||</span> count <span style="color: #006E28;">==</span> VALUE4<span style="color: #006E28;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; glDisable<span style="color: #006E28;">&#40;</span>GL_DEPTH_TEST<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight:bold;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; glEnable<span style="color: #006E28;">&#40;</span>GL_DEPTH_TEST<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span><br />
&nbsp; &nbsp; glDrawElements_<span style="color: #006E28;">&#40;</span>mode<span style="color: #006E28;">,</span> count<span style="color: #006E28;">,</span> type<span style="color: #006E28;">,</span> indices<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span><br />
<span style="color: #006E28;">&#125;</span></div></td></tr></tbody></table></div>
<h4>Interesting thought about multiplayer cheats and Wine</h4>
<p>If anti-cheat tools would perform a sanity check of the OpenGL or DirectX DLL, they would only find the virtual DLL&#8217;s when a game is run in Wine, right? I&#8217;m wondering whether this sort of cheats can be made undetectable then. In a way I hope not, because cheaters are very annoying when you&#8217;re playing a game, but on the other hand, it would be an amazing technological achievement. Anyway, anti-cheat tools like <em>PunkBuster</em> don&#8217;t even work with Wine at the moment, so it might be a non-issue. What are your thoughts?</p>
]]></content:encoded>
			<wfw:commentRss>http://wesley.vidiqatch.org/18-08-2009/overriding-dynamic-library-calls-function-interposition/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>GBA programming in Linux</title>
		<link>http://wesley.vidiqatch.org/12-07-2007/gba-programming-in-linux/</link>
		<comments>http://wesley.vidiqatch.org/12-07-2007/gba-programming-in-linux/#comments</comments>
		<pubDate>Thu, 12 Jul 2007 20:37:18 +0000</pubDate>
		<dc:creator>Wesley</dc:creator>
				<category><![CDATA[Assembler]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[GBA]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://wesley.debianbox.be/2007/07/12/gba-programming-in-linux/</guid>
		<description><![CDATA[
Mijn eerste GBA rom aan de linkerkant   Nouja, afgekeken van een voorbeeldbestand&#8230; 
Gisterenavond wou ik eens proberen om iets te programmeren voor mijn oude Game Boy Advance. Na wat rondgezocht te hebben bleek het niet eens zo moeilijk te zijn. Er is slechts weinig kennis nodig van ARM assembler. Programma&#8217;s kunnen gewoon in [...]]]></description>
			<content:encoded><![CDATA[<p><img title="GBA Rom" src="http://wesley.vidiqatch.org/images/gba1.png" alt="GBA Rom" align="left" /></p>
<p><strong><em>Mijn eerste GBA rom aan de linkerkant <img src='http://wesley.vidiqatch.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Nouja, afgekeken van een voorbeeldbestand&#8230; </em></strong></p>
<p>Gisterenavond wou ik eens proberen om iets te programmeren voor mijn oude <em>Game Boy Advance</em>. Na wat rondgezocht te hebben bleek het niet eens zo moeilijk te zijn. Er is slechts <em>weinig kennis nodig van ARM assembler</em>. Programma&#8217;s kunnen gewoon in <em>C/C++</em> worden geschreven en trage stukken nadien <em>eventueel geoptimaliseerd met assembler</em>.</p>
<p>Wel ga ik me moeten inwerken in het <em>registersysteem</em> van de Game Boy Advance.</p>
<p>Het was niet moeilijk om een <em>cross compiler</em> (compiler die uitvoerbare code genereert voor een ander platform dan hetgeen waarop de compiler draait) te compileren en gebruiken.</p>
<p>Mijn gecompileerd testproject werkte op emulators (zoals mednafen of visualboyadvance) maar het niet kon worden ingelezen door mijn <em>EZF Advance client</em> software! (software die ik gebruik om roms te uploaden naar een Flashkaart zodat ik de roms ook op mijn echte Game Boy Advance kan testen)<br />
<a href="http://wesley.vidiqatch.org/images/gba_rom_problem.png">Screenshot van het probleem</a></p>
<p>Vandaag ben ik dus even bezig geweest met het uitzoeken van het probleem. De <em>rom header</em> moest gefixt worden en nog allerlei zaken. Ik had een <em>perl script</em> gevonden die alles voor me zou gefixt hebben, en de headers leken daarna inderdaad in orde, maar het programma wou nog steeds niet importeren in <em>EZF Advance</em>.</p>
<p>Toen vond ik <strong>devkitPro/devkitARM</strong>. Een heel pakket met alles wat ik nodig had. Heel veel<em><strong> GBA libs, voorbeelden, een cross compiler, header-fix-tool</strong></em>, etc.! Dus dat maar eens geïnstalleerd en een nieuw project gecompileerd op basis van één van de voorbeelden. En zie daar. <strong>Het draait nu ook op mijn Game Boy Advance (hardware)!</strong> Ik zou er een foto van hebben genomen, maar ik heb geen digitale camera <img src='http://wesley.vidiqatch.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div>Handige links:<br />
<em><a href="http://www.devkitpro.org/">devkitPro/devkitARM</a> </em><em><a href="http://www.devrs.com/gba/files/gbadevfaqs.php">Handige FAQ</a> </em><em><a href="http://belogic.com/gba/">GBA sound system</a> </em><em><a href="http://www.coranac.com/tonc/text/toc.htm">Uitgebreide tutorial</a></em></div>
<p align="right">
]]></content:encoded>
			<wfw:commentRss>http://wesley.vidiqatch.org/12-07-2007/gba-programming-in-linux/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>XFiSH 0.99p: Blowfish encryptie voor XChat</title>
		<link>http://wesley.vidiqatch.org/06-05-2007/xfish-099p-blowfish-encryptie-voor-xchat/</link>
		<comments>http://wesley.vidiqatch.org/06-05-2007/xfish-099p-blowfish-encryptie-voor-xchat/#comments</comments>
		<pubDate>Sun, 06 May 2007 19:59:48 +0000</pubDate>
		<dc:creator>Wesley</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://wesley.debianbox.be/2007/05/06/xfish-099p-blowfish-encryptie-voor-xchat/</guid>
		<description><![CDATA[Ik ben gisteren beziggeweest met de XFiSH plugin voor XChat. Met deze plugin is het mogelijk om met Blowfish gecodeerde berichten te versturen en ontvangen in XChat.
Er waren echter een paar problemen met de originele XFiSH plugin. De source wou niet compileren en er was geen ondersteuning voor het Freenode netwerk. Een zekere Gnilor heeft [...]]]></description>
			<content:encoded><![CDATA[<p>Ik ben gisteren beziggeweest met de <strong>XFiSH plugin</strong> voor <strong>XChat</strong>. Met deze plugin is het mogelijk om met <strong>Blowfish gecodeerde berichten</strong> te versturen en ontvangen in XChat.</p>
<p><img title="Blowfish = strong crypto" src="http://www.linux-france.org/article/pro/entrepreneur-howto/03_visit-card/Lamiral/images/blowfish.png" alt="Blowfish = strong crypto" align="left" />Er waren echter een paar problemen met de originele XFiSH plugin. De source wou niet compileren en er was geen ondersteuning voor het Freenode netwerk. Een zekere Gnilor heeft de oorzaak van deze problemen gevonden.</p>
<p>Ook was het behoorlijk irritant dat je geen melding (notificatie) kreeg bij nieuwe berichten of hilights. Deze mogelijkheid heb ik dan maar meteen erbij geprogrammeerd, maar de notificaties werken momenteel enkel voor privéberichten op IRC.</p>
<p>Omdat ik XFiSH zelf alleen gebruik voor privéberichten had ik dus ook geen zin om het op kanalen te laten werken, maar het is niet zo moeilijk om het nu ook toe te passen bij kanalen&#8230; Misschien dat ik dat nog wel doe, als ik er zin in krijg. Ook moet de Freenode ondersteuning wat beter getest worden, maar voorlopig lijkt het erop alsof alles prima werkt.</p>
<p>Changelog 0.98 &#8211;&gt; 0.99p</p>
<ul>
<li>Ondersteuning voor het Freenode netwerk</li>
<li>Ondersteuning voor notificaties bij privéberichten (taskbar glow, icon blink, color usage in channel/user list)</li>
</ul>
<p><em>Let op: dit is een onofficiële patch </em></p>
<p><strong>Stap 1: compileerprobleem oplossen </strong></p>
<p>1. Miracl downloaden, compileren en miracl.h kopiëren naar de source folder van XFiSH. In het archief van XFiSH zit standaard namelijk een te oude versie van miracl.</p>
<p><strong>Stap 2: patch toepassen</strong></p>
<p>Bekijk .diff file: <a href="http://pastebin.sk/en/1535/">http://pastebin.sk/en/1535/</a><br />
Download .diff file: <a href="http://wesley.vidiqatch.org/files/xfish.diff">http://wesley.vidiqatch.org/files/xfish.diff</a></p>
<p>Ik heb de patch ook voorgecompileerd beschikbaar gemaakt op:<br />
<a href="http://wesley.vidiqatch.org/files/xfish.so">http://wesley.vidiqatch.org/files/xfish.so</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wesley.vidiqatch.org/06-05-2007/xfish-099p-blowfish-encryptie-voor-xchat/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Beryl code: Switcher tekst verbetering</title>
		<link>http://wesley.vidiqatch.org/01-11-2006/switcher-tekst-verbetering/</link>
		<comments>http://wesley.vidiqatch.org/01-11-2006/switcher-tekst-verbetering/#comments</comments>
		<pubDate>Wed, 01 Nov 2006 12:38:38 +0000</pubDate>
		<dc:creator>Wesley</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Composited desktop]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://wesley.debianbox.be/2006/11/01/switcher-tekst-verbetering/</guid>
		<description><![CDATA[Tada   
Verbeteringen aan het algoritme om de tekst te schalen in de Switcher.
Werkt nu zoals het hoort met praktisch elk lettertype/lettergrootte.
voor de patch:

na de patch:

Verbeteringen aan de code zijn van kracht in beryl-svn vanaf r898
edit: kleine update aan de vorige patch zit in r899 (hardgecodeerde nummers vervangen door betere, compactere code)
]]></description>
			<content:encoded><![CDATA[<p>Tada <strong> <img src='http://wesley.vidiqatch.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </strong></p>
<p>Verbeteringen aan het algoritme om de tekst te schalen in de Switcher.<br />
Werkt nu zoals het hoort met praktisch elk lettertype/lettergrootte.</p>
<p><strong><span style="color: #1447e0;">voor de patch:</span></strong></p>
<p><a href="http://wesley.vidiqatch.org/images/switcher_old2.png" target="_blank"><img title="Switcher" src="http://wesley.vidiqatch.org/images/switcher_old2.png" alt="Switcher" /></a></p>
<p><strong><span style="color: #1447e0;">na de patch:</span></strong></p>
<p><a href="http://wesley.vidiqatch.org/images/switcher_ellipsize1.png" target="_blank"><img title="Switcher" src="http://wesley.vidiqatch.org/images/switcher_ellipsize1.png" alt="Switcher" /></a></p>
<p>Verbeteringen aan de code zijn van kracht in beryl-svn vanaf <a href="http://bugs.beryl-project.org/changeset/898" target="_blank">r898</a><br />
<em>edit: kleine update aan de vorige patch zit in <a href="http://bugs.beryl-project.org/changeset/899" target="_blank">r899</a> (hardgecodeerde nummers vervangen door betere, compactere code)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://wesley.vidiqatch.org/01-11-2006/switcher-tekst-verbetering/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beryl Code: Center/Pointer Split, Mystic Fire</title>
		<link>http://wesley.vidiqatch.org/30-10-2006/beryl-patches-centerpointer-split-mystic-fire/</link>
		<comments>http://wesley.vidiqatch.org/30-10-2006/beryl-patches-centerpointer-split-mystic-fire/#comments</comments>
		<pubDate>Mon, 30 Oct 2006 08:12:27 +0000</pubDate>
		<dc:creator>Wesley</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Composited desktop]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://wesley.debianbox.be/2006/10/30/beryl-patches-centerpointer-split-mystic-fire/</guid>
		<description><![CDATA[Center/Pointer Split 
Ik heb voorlopig een patch voor mezelf gemaakt die het mogelijk maakt om in plaats van 1 globale &#8220;Zoom from Center&#8221; variabele 4 verschillende animations te hebben die we kunnen gebruiken voor verschillende acties/windowtypes.
De patch zal niet officieel worden geupload op SVN, omdat het slechts een tijdelijke patch is die uiteindelijk weer ongedaan [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #1447e0;"><strong>Center/Pointer Split </strong></span></p>
<p>Ik heb voorlopig een patch voor mezelf gemaakt die het mogelijk maakt om in plaats van 1 globale &#8220;Zoom from Center&#8221; variabele 4 verschillende animations te hebben die we kunnen gebruiken voor verschillende acties/windowtypes.</p>
<p><strong>De patch zal niet officieel worden geupload op SVN</strong>, omdat het slechts een tijdelijke patch is die uiteindelijk weer ongedaan moet gemaakt worden als het instellingensysteem van animations.c uitgebreid wordt. Tegen die tijd zal Magic Lamp 1 en 2 ook gewoon 1 globale Magic Lamp animatie worden met meer uitgebreide mogelijkheden per actie/windowtype.</p>
<p>Anyway, de voorlopige patch is hier te vinden: <a href="http://pastebin.mozilla.org/1097" target="_blank">http://pastebin.mozilla.org/1097</a><br />
Het is een .diff tegenover SVN revisie <strong>r877</strong></p>
<p><span style="color: #1447e0;"><strong>Mystical Fire </strong></span></p>
<p>Iemand op het Beryl forum had een patch geschreven om het vlammeneffect in animations.c willekleurige kleuren te geven, wat een leuk effect als gevolg had:</p>
<p><a href="http://static.flickr.com/119/282546373_980aedfa72_b.jpg" target="_blank"><img title="Mystic Fire" src="http://static.flickr.com/119/282546373_980aedfa72_b.jpg" alt="Mystic Fire" width="406" height="253" /></a></p>
<p>Het effect was jammer genoeg hardgecodeerd in de code door <strong>toxicgonzo</strong>, maar ik heb samengewerkt met <strong>toxicgonzo</strong> om dit effect een extra optie te maken in de bestaande programmacode en het is nu reeds in de officiële SVN verschenen als een extra optie in het configuratiescherm van Beryl sinds revisie <a href="http://bugs.beryl-project.org/changeset/878" target="_blank"><strong>r878</strong></a></p>
]]></content:encoded>
			<wfw:commentRss>http://wesley.vidiqatch.org/30-10-2006/beryl-patches-centerpointer-split-mystic-fire/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smooth Cube Patch</title>
		<link>http://wesley.vidiqatch.org/15-10-2006/smooth-cube-patch/</link>
		<comments>http://wesley.vidiqatch.org/15-10-2006/smooth-cube-patch/#comments</comments>
		<pubDate>Sun, 15 Oct 2006 16:43:52 +0000</pubDate>
		<dc:creator>Wesley</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Composited desktop]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://wesley.debianbox.be/2006/10/15/smooth-cube-patch/</guid>
		<description><![CDATA[Ik heb een patch geschreven voor rotate.c (Rotate Cube plugin) om overal een vloeiende beweging van de draaiende kubus te krijgen.
Ik heb dit gefixt door timestep afhankelijk te maken van automatische (kubus ronddraaien met toetsenbord sneltoetsen) of manuele rotatie (kubus ronddraaien met muis)
Voor de patch was er 1 algemene timestep variabele, en dan had je [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Ik heb een patch geschreven voor rotate.c (Rotate Cube plugin) om overal een vloeiende beweging van de draaiende kubus te krijgen.</strong></p>
<p>Ik heb dit gefixt door timestep afhankelijk te maken van automatische (kubus ronddraaien met toetsenbord sneltoetsen) of manuele rotatie (kubus ronddraaien met muis)</p>
<p>Voor de patch was er 1 algemene timestep variabele, en dan had je maar 2 mogelijkheden:</p>
<ul>
<li><strong>timestep &lt; 1</strong>
<ul>
<li><span style="text-decoration: underline;">automatische rotatie</span>: vloeiend, zonder terugkaatsing (bounce)</li>
<li><span style="text-decoration: underline;">manuele rotatie</span>: abrupte beëindiging van de beweging van de kubus zodra je de muis stil houdt</li>
</ul>
</li>
</ul>
<ul>
<li><strong>timestep &gt; 1</strong>
<ul>
<li><span style="text-decoration: underline;">automatische rotatie</span>: ongewenst terugkaatsingseffect (bounce)</li>
<li><span style="text-decoration: underline;">manuele rotatie</span>: korte vloeiende glijbeweging van de kubus als je de muis stilhoudt</li>
</ul>
</li>
</ul>
<p>Met deze patch is het nu mogelijk om timestep &lt; 1 te gebruiken voor automatische rotatie en timestep &gt; 1 te gebruiken voor manuele rotatie. De waarden voor automatische en manuele timestep zijn natuurlijk gewoon aan te passen in <strong>beryl-settings-manager</strong>.</p>
<p>De patch tegenover <strong>svn r643</strong>:</p>
<p><span style="text-decoration: line-through;">Patch file (.diff) for rotate.c r643<br />
</span></p>
<p><em><strong>Edit:</strong> Patch is niet meer nodig bij een nieuwe svn update!<br />
De patch is geaccepteerd in <a title="svn r647" href="http://bugs.beryl-project.org/changeset/647" target="_blank"><strong>svn r647</strong></a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://wesley.vidiqatch.org/15-10-2006/smooth-cube-patch/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

