<?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>ExJam</title>
	<atom:link href="http://exjam.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://exjam.co.uk</link>
	<description>I do programming and stuff</description>
	<lastBuildDate>Sun, 13 Sep 2009 12:08:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Fiesta Online Private Server</title>
		<link>http://exjam.co.uk/2009/09/13/fiesta-online-private-server/</link>
		<comments>http://exjam.co.uk/2009/09/13/fiesta-online-private-server/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 11:36:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://exjam.co.uk/?p=319</guid>
		<description><![CDATA[This is for all those people who repeatedly ask me for the Fiesta Online Private Server.
I do not work on it anymore! Its development has been continued a bit recently by Drakia. You can find the code at:
http://code.google.com/p/titanfiesta/
Do not ask me for help for any aspect of it including compiling, because I won&#8217;t give it, [...]]]></description>
			<content:encoded><![CDATA[<p>This is for all those people who repeatedly ask me for the Fiesta Online Private Server.</p>
<p>I do not work on it anymore! Its development has been continued a bit recently by Drakia. You can find the code at:<br />
<a href="http://code.google.com/p/titanfiesta/">http://code.google.com/p/titanfiesta/</a></p>
<p>Do not ask me for help for any aspect of it including compiling, because I won&#8217;t give it, I do not work on this project any more.</p>
<p>There are simple instructions provided here: <a href="http://titanfiesta.wikidot.com/basic:compile">http://titanfiesta.wikidot.com/basic:compile</a></p>
<p>Thanks for no longer annoying me.</p>
]]></content:encoded>
			<wfw:commentRss>http://exjam.co.uk/2009/09/13/fiesta-online-private-server/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>R3E revision 3</title>
		<link>http://exjam.co.uk/2009/09/13/r3e-revision-3/</link>
		<comments>http://exjam.co.uk/2009/09/13/r3e-revision-3/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 01:16:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[ROSE Online]]></category>

		<guid isPermaLink="false">http://exjam.co.uk/?p=314</guid>
		<description><![CDATA[Just uploaded revision 3 of my ROSE 3D Engine, very exciting. It now has full support for skeletal animation! Hurray.
Here is a beautiful picture for you to enjoy:
The thing I do rather like about my engine is how easy it is to use, this scene was created with just the following code:
mPlayer = new Player();
mPlayer-&#62;SetSkeleton("3DDATA\\AVATAR\\MALE.ZMD");
mPlayer-&#62;SetAnimation("3DDATA\\MOTION\\AVATAR\\EMPTY_RUN_M1.ZMO");
mPlayer-&#62;SetItem(ROSE::IT_BODY, [...]]]></description>
			<content:encoded><![CDATA[<p>Just uploaded revision 3 of my ROSE 3D Engine, very exciting. It now has full support for skeletal animation! Hurray.</p>
<p>Here is a beautiful picture for you to enjoy:</p>
<div id="attachment_315" class="wp-caption aligncenter" style="width: 310px"><a href="http://exjam.co.uk/wp-content/uploads/2009/09/r3erev3.png"><img class="size-medium wp-image-315" title="R3E Revision 3" src="http://exjam.co.uk/wp-content/uploads/2009/09/r3erev3-300x235.png" alt="R3E Revision 3" width="300" height="235" /></a><p class="wp-caption-text">R3E Revision 3</p></div>
<p>The thing I do rather like about my engine is how easy it is to use, this scene was created with just the following code:<br />
<code>mPlayer = new Player();</code></p>
<p><code>mPlayer-&gt;SetSkeleton("3DDATA\\AVATAR\\MALE.ZMD");<br />
mPlayer-&gt;SetAnimation("3DDATA\\MOTION\\AVATAR\\EMPTY_RUN_M1.ZMO");</code></p>
<p><code>mPlayer-&gt;SetItem(ROSE::IT_BODY, 2);<br />
mPlayer-&gt;SetItem(ROSE::IT_FOOT, 2);<br />
mPlayer-&gt;SetItem(ROSE::IT_ARM, 2);<br />
mPlayer-&gt;SetItem(ROSE::IT_HAIR, 1);<br />
mPlayer-&gt;SetItem(ROSE::IT_FACE, 2);<br />
mPlayer-&gt;SetItem(ROSE::IT_WEAPON, 1);<br />
mPlayer-&gt;SetItem(ROSE::IT_SUBWPN, 1);<br />
mPlayer-&gt;SetItem(ROSE::IT_BACK, 223);</code></p>
<p><code>mScene.AddEntity(mPlayer);</code></p>
<p>Yay.</p>
<p>Code is available at http://code.google.com/p/r3e/</p>
]]></content:encoded>
			<wfw:commentRss>http://exjam.co.uk/2009/09/13/r3e-revision-3/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>New ROSE 3D Engine (R3E)</title>
		<link>http://exjam.co.uk/2009/09/10/new-rose-3d-engine-r3e/</link>
		<comments>http://exjam.co.uk/2009/09/10/new-rose-3d-engine-r3e/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 01:40:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[ROSE Online]]></category>

		<guid isPermaLink="false">http://exjam.co.uk/?p=311</guid>
		<description><![CDATA[So following the previous &#8216;tutorial&#8217; I decided to create a new version of R3E, my open source ROSE 3D Engine.
The googlecode page for it can be found at http://code.google.com/p/r3e/ and the svn at http://r3e.googlecode.com/svn/trunk/.
This 3D engine is designed in a way which is optimised for rendering with OpenGL, incase you wonder why I do odd [...]]]></description>
			<content:encoded><![CDATA[<p>So following the previous &#8216;tutorial&#8217; I decided to create a new version of R3E, my open source ROSE 3D Engine.</p>
<p>The googlecode page for it can be found at <a href="http://code.google.com/p/r3e/">http://code.google.com/p/r3e/</a> and the svn at <a href="http://r3e.googlecode.com/svn/trunk/">http://r3e.googlecode.com/svn/trunk/</a>.</p>
<p>This 3D engine is designed in a way which is optimised for rendering with OpenGL, incase you wonder why I do odd things.</p>
<p>I hope to update it to the point of being able to display everything and anything from ROSE in 100% accuracy (that will be fun when it comes to effects and particles&#8230;).</p>
<p>Currently, although the code base is very large at the moment, all that is supported is rendering simple meshes (.ZMS files), the next feature I plan to support is using .ZSC files and then on to using skeleton (.ZMD) and animation files (.ZMO) to provide a full animated render of ROSE NPCs and Characters. How exciting.</p>
<p>Once the engine gets to that stage I will code a few simple things such as the Item Viewer which was included with the old R3E.</p>
<p>Currently I am not offering binary builds of the engine as there is not much to show, if you are interested in those then expect them some time in the near future.</p>
<p>Note: Sorry if you get lost when looking at my code, it has 0 comments (excluding commented out old code). Maybe one day I shall consider commenting it <img src='http://exjam.co.uk/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://exjam.co.uk/2009/09/10/new-rose-3d-engine-r3e/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Tutorial: Rendering ROSE Items in OpenGL and C++ (Part 1)</title>
		<link>http://exjam.co.uk/2009/09/03/rendering-rose-objects-in-opengl-and-c/</link>
		<comments>http://exjam.co.uk/2009/09/03/rendering-rose-objects-in-opengl-and-c/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 01:52:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[ROSE Online]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://exjam.co.uk/?p=292</guid>
		<description><![CDATA[The aim of this tutorial is to render ROSE items up to the point of showing a full player with items! How exciting. It will be based upon the use of OpenGL and C++ using the Windows API to setup the window. This tutorial is not really aimed at those who cannot do C++ but [...]]]></description>
			<content:encoded><![CDATA[<p>The aim of this tutorial is to render ROSE items up to the point of showing a full player with items! How exciting. It will be based upon the use of OpenGL and C++ using the Windows API to setup the window. This tutorial is not really aimed at those who cannot do C++ but more at those who are competent need help with 3D and OpenGL. I may also stress that this &#8216;tutorial&#8217; as such is not going to tell you in depth how to create the code yourself but be a light informative source on how the code works, you will have to download the source for yourself to get the full idea.</p>
<p>The first boring bit is creating the window and all that rubbish, so I have decided to go ahead and do that for you and create a very basic framework from which we will work off of. This framework includes creating the OpenGL window, a few math classes such as support for Matrices and Vectors and a Camera class. This leaves me to focus the tutorial on uses OpenGL to render the items as the code mentioned beforehand is not really anything new or special to ROSE and can be found anywhere.</p>
<p>So if you download my basic framework and compile it you will see that there is just 3 axis lines which you can move the camera around using the right mouse button with dragging to rotate and the mouse wheel to zoom in and out. This is not very pretty at all! So we shall now focus on loading ZMS, the ROSE mesh files, into this application.</p>
<p>The file format for ZMS can be found here: <a href='http://exjam.co.uk/wp-content/uploads/2009/09/zms.html'>ZMS File Format</a></p>
<p>It is pretty simple to load this into memory, the only trick is using the bone lookups. At the beginning of the file there is a list of bone indices, these are the actual bone index of the ZMD, the ROSE skeleton files, I name it the &#8216;bone lookup&#8217; list. The BoneWeights for each vertex actually reference an ID in the bone lookup list. Here is an example: the first bone for a vertex would actually be boneLookup[boneWeight.id[0]] for the correct index in the ZMD file.</p>
<p>There are multiple ways to render this model, I use things called Vertex Buffer Objects which actually upload the model data into your graphics card and uses the RAM on it to store the data there. This is much faster as the vertex data does not get sent every frame. Unfortunately to use VBOs we must use OpenGL ARB extensions which makes our code a lot messier <img src='http://exjam.co.uk/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> . The required functions are: glBindBuffer, glGenBuffers, glBufferData and glDeleteBuffers for clean up.</p>
<p>To load these extensions we have to call the function wglGetProcAddress (when on Windows), and example for glGenBuffers:</p>
<pre class="brush: php">
PFNGLGENBUFFERSPROC glGenBuffers = (PFNGLGENBUFFERSPROC)wglGetProcAddress(&amp;amp;amp;amp;amp;amp;amp;quot;glGenBuffers&amp;amp;amp;amp;amp;amp;amp;quot;);
</pre>
<p>The type PFNGLGENBUFFERSPROC is defined in gl/glext.h which is an include which should come with the OpenGL headers which can be found in the windows sdk.</p>
<p>There are two types of buffers I use, Vertex Buffers and Index Buffers, the difference is Vertex Buffers store the per-vertex data such as position, UV coordinates, colouring, normals etc whereas Index Buffers store the face -> vertex links. ROSE ZMS files are defined with a list of vertices and a list of faces which reference those vertices. These faces -> vertex references are loaded into and index buffer and used to draw faces from the list of vertices.</p>
<p>I also created two helper functions for creating Vertex Buffers and Index Buffers:</p>
<pre class="brush: php">
GLuint CreateIndexBuffer(void* data, unsigned int size){
	GLuint buf = 0;
	glGenBuffers(1, &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;buf);
	if(!buf) return -1;
	glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, buf);
	glBufferData(GL_ELEMENT_ARRAY_BUFFER, size, data, GL_STATIC_DRAW);
	return buf;
}

GLuint CreateVertexBuffer(void* data, unsigned int size){
	GLuint buf;
	glGenBuffers(1, &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;buf);
	if(!buf) return -1;
	glBindBuffer(GL_ARRAY_BUFFER, buf);
	glBufferData(GL_ARRAY_BUFFER, size, data, GL_STATIC_DRAW);
	return buf;
}
</pre>
<p>As you can see these take two arguments, data and size. The data should be an array of the vertex data, this is not only vertex positions but also uv maps, normals, colours or any other per vertex data you would like to send to the graphics card, to render from these buffers you can use the glVertexPointer and glDrawElements calls.</p>
<p>As mesh rendering now works at this point (I am writing the code as I write the tutorial) I come to the problem of texture loading, this requires an external library as we are loading DDS files which are not natively compliant with OpenGL! I use the <a href="http://openil.sourceforge.net/">DevIL library</a> which I have always found to be reliable and work with the ROSE textures.</p>
<p>With an addition of loading images from DevIL and using glTexCoordPointer we can now render the textured ZMS:<br />
<div id="attachment_300" class="wp-caption aligncenter" style="width: 310px"><a href="http://exjam.co.uk/wp-content/uploads/2009/09/render.JPG"><img src="http://exjam.co.uk/wp-content/uploads/2009/09/render-300x235.jpg" alt="ZMS Texture Render" title="ZMS Texture Render" width="300" height="235" class="size-medium wp-image-300" /></a><p class="wp-caption-text">ZMS Texture Render</p></div></p>
<p>As the first part of this &#8216;tutorial&#8217; comes to an end I realise this is either 1. a really shit tutorial or 2. not really a tutorial at all. There is the bare minimum of explanation here, it is more of a source code release with a slight explanation. I apologise for this, but maybe once this rendering engine is complete I can make a nice item viewer and people will use that rather than read this &#8216;tutorial&#8217; <img src='http://exjam.co.uk/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> .</p>
<p>Coming up in the part 2: using the ZSC files to render full models!</p>
<p>Edit: Sorry I forgot the source, you can find it here: <a href='http://exjam.co.uk/wp-content/uploads/2009/09/Rendering-ROSE-Part-1.zip'>Rendering ROSE Part 1</a></p>
]]></content:encoded>
			<wfw:commentRss>http://exjam.co.uk/2009/09/03/rendering-rose-objects-in-opengl-and-c/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>It&#8217;s my 18th Birthday</title>
		<link>http://exjam.co.uk/2009/08/20/its-my-18th-birthday/</link>
		<comments>http://exjam.co.uk/2009/08/20/its-my-18th-birthday/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 23:38:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://exjam.co.uk/?p=287</guid>
		<description><![CDATA[I am sure you would all love to know that it is my birthday today, here is a lovely picture of me wearing the t-shirt that donan sent me as a present  
]]></description>
			<content:encoded><![CDATA[<p>I am sure you would all love to know that it is my birthday today, here is a lovely picture of me wearing the t-shirt that donan sent me as a present <img src='http://exjam.co.uk/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<div id="attachment_288" class="wp-caption aligncenter" style="width: 235px"><a href="http://exjam.co.uk/wp-content/uploads/2009/08/titanrose_tshirt.jpg"><img class="size-medium wp-image-288" title="TitanROSE T-Shirt" src="http://exjam.co.uk/wp-content/uploads/2009/08/titanrose_tshirt-225x300.jpg" alt="TitanROSE T-Shirt" width="225" height="300" /></a><p class="wp-caption-text">TitanROSE T-Shirt</p></div>
]]></content:encoded>
			<wfw:commentRss>http://exjam.co.uk/2009/08/20/its-my-18th-birthday/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>I&#8217;m Back</title>
		<link>http://exjam.co.uk/2009/08/17/im-back/</link>
		<comments>http://exjam.co.uk/2009/08/17/im-back/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 12:24:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ROSE Online]]></category>

		<guid isPermaLink="false">http://exjam.co.uk/?p=283</guid>
		<description><![CDATA[Finally I am back from my holidays, I spent 2 weeks in Greece, came home for 2 days then went out to France for a week  . So that is why nothing has been on here for a very long time!
I have only been back for one day and have already done some very [...]]]></description>
			<content:encoded><![CDATA[<p>Finally I am back from my holidays, I spent 2 weeks in Greece, came home for 2 days then went out to France for a week <img src='http://exjam.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . So that is why nothing has been on here for a very long time!</p>
<p>I have only been back for one day and have already done some very exciting never before done things <img src='http://exjam.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I have just finished coding up the system to load and save achievement data server side to MSSQL and to send it to the client, here is a kind of unexciting picture showing the client displaying the achievement data sent to it from the server:</p>
<div id="attachment_284" class="wp-caption aligncenter" style="width: 310px"><a href="http://exjam.co.uk/wp-content/uploads/2009/08/achievements.jpg"><img class="size-medium wp-image-284" title="Server Side Achievements" src="http://exjam.co.uk/wp-content/uploads/2009/08/achievements-300x187.jpg" alt="Server Side Achievements" width="300" height="187" /></a><p class="wp-caption-text">Server Side Achievements</p></div>
<p>Previously, at Ruff-Rose, achievements were stored and unlocked client side so was pretty rubbish and unsecure and would require you to use the same computer every time, now they are loaded server side when the player enters the game, checked every 5 seconds to see if the player has unlocked any new achievements and saved when the player quits the game. This also gives us more control and allows us to do things such as display an animation to all players when someone has unlocked an achievement, the effect shown below was created by Razor:</p>
<div id="attachment_285" class="wp-caption aligncenter" style="width: 310px"><a href="http://exjam.co.uk/wp-content/uploads/2009/08/achievetitan.png"><img class="size-medium wp-image-285" title="Achievement Unlocked!" src="http://exjam.co.uk/wp-content/uploads/2009/08/achievetitan-300x262.png" alt="Achievement Unlocked!" width="300" height="262" /></a><p class="wp-caption-text">Achievement Unlocked!</p></div>
<p>Very exciting things are happening at titanROSE and expect alot of good news coming soon, the website and vault are very close to completion, I cannot wait to show off mine and Dae&#8217;s hard work on the vault, I am very proud of it <img src='http://exjam.co.uk/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> .</p>
<p>Anyway this was just a quick update and I will look at posting more tutorials shortly <img src='http://exjam.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://exjam.co.uk/2009/08/17/im-back/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>TRose.exe the library</title>
		<link>http://exjam.co.uk/2009/07/20/troseexe-the-library/</link>
		<comments>http://exjam.co.uk/2009/07/20/troseexe-the-library/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 09:25:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[ROSE Online]]></category>
		<category><![CDATA[Reverse Engineering]]></category>

		<guid isPermaLink="false">http://exjam.co.uk/?p=280</guid>
		<description><![CDATA[So there comes a time when you decide &#8216;hey, I am going to have to edit the client to do this&#8217; which is where my TRose library comes into use. I attempted to keep the interface to it as clean as possible which is why if you look at the code (I suggest you don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>So there comes a time when you decide &#8216;hey, I am going to have to edit the client to do this&#8217; which is where my TRose library comes into use. I attempted to keep the interface to it as clean as possible which is why if you look at the code (I suggest you don&#8217;t <img src='http://exjam.co.uk/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> ) you will probably be like &#8216;wtf is he doing&#8217;.</p>
<p>It works in the way that every class and its functions are defined in my library, I also have one function which must be used before all others (RoseAPI::Init()) this function goes through every class member functions and rewrites the first bytes of them to a JMP to the original code using my function &#8216;FixMemberFuncAddress&#8217;.</p>
<p><code>
<pre class="brush: c++">template&lt;class T&gt; void FixMemberFuncAddress(int troseAddr, T func){
	CodeHook::ApplyJmpHook((unsigned char*)(*((void**)&amp;func)), (unsigned char*)troseAddr, 0);
}</pre>
<p></code></p>
<p>The crazy recasting of func is to get around the fact that you cannot convert a member function pointer to a memory address directly so I used the redirection shown above to get around this compiler restriction.</p>
<p>There was one more challenge to handle though, rewriting constructor and destructor addresses, so far I only have a need for constructor so I did not bother with writing a handler for them. The reason this was a challenge is because in the c++ specification it is stated that constructors are not functions, not physically existent and thus you cannot get their address. Well, fuck the standards, we don&#8217;t want any of that shit. So I declared it was time for a workaround!</p>
<p>This is where my code gets dodgy and I highly recommend you use my .lib file and do not attempt to recompile the lib as this constructor code is based on the final assembly generated and it <strong>will</strong> differ between compilers.</p>
<p>First step was making a small function which just creates an object:<br />
<code>
<pre class="brush: c++">void CSlotCreator(){
	CSlot* slot = new CSlot();
}</pre>
<p></code></p>
<p>The next step was to write a function which reads the assembly generated for this small function and attempts to get the address of the constructor, I found two types of constructing, one which used a CALL and one which used a JMP to go to the constructor, both are able to be processed in my code.</p>
<p><code>
<pre class="brush: c++">void FixConstructorAddress(int addrROSE, unsigned char* createFunc){
	unsigned char* addr = createFunc;
	if(addr[2] == 0xE8){
		for(int i = 0; i &lt; 0x20; ++i){
			if(addr[i] != 0xE9) continue;
			int relAddr = *(int*)(addr + i + 1);
			int cAddr = (int)(addr + i);
			int ctorAddr = cAddr + relAddr + 5;
			unsigned char* codePtr = (unsigned char*)ctorAddr;
			DWORD oldProtect;
			VirtualProtect(codePtr, 5, PAGE_EXECUTE_READWRITE, &amp;oldProtect);
			codePtr[0] = 0x8B;
			codePtr[1] = 0xC8;
			VirtualProtect(codePtr, 5, oldProtect, &amp;oldProtect);
			CodeHook::ApplyJmpHook(codePtr + 2, (unsigned char*)addrROSE, 0);
			break;
		}
	}else{
		addr = addr + 0x30;
		for(int i = 0; i &lt; 0x20; ++i){
			if(addr[i] != 0xE8) continue;
			int relAddr = *(int*)(addr + i + 1);
			int cAddr = (int)(addr + i);
			int ctorAddr = cAddr + relAddr + 5;
			unsigned char* codePtr = (unsigned char*)ctorAddr;
			DWORD oldProtect;
			VirtualProtect(codePtr, 5, PAGE_EXECUTE_READWRITE, &amp;oldProtect);
			codePtr[0] = 0x8B;
			codePtr[1] = 0xCE;
			VirtualProtect(codePtr, 5, oldProtect, &amp;oldProtect);
			CodeHook::ApplyJmpHook(codePtr + 2, (unsigned char*)addrROSE, 1);
			break;
		}
	}
}</pre>
<p></code></p>
<p>So as you can see, it reads the bytes until it finds a JMP or CALL and then reads the address to the constructor, once this is done it rewrites the first bytes of the constructor to MOV ECX, ESI or MOV ECX, EAX (depending on CALL or JMP style) then JMP to the original TRose constructor! Hurray, that was fun.</p>
<p>Download the code and library here: <a href='http://exjam.co.uk/wp-content/uploads/2009/07/troselib.rar'>TRose.lib</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://exjam.co.uk/2009/07/20/troseexe-the-library/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Lame excuses galore</title>
		<link>http://exjam.co.uk/2009/07/09/lame-excuses-galore/</link>
		<comments>http://exjam.co.uk/2009/07/09/lame-excuses-galore/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 22:57:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[ROSE Online]]></category>

		<guid isPermaLink="false">http://exjam.co.uk/?p=273</guid>
		<description><![CDATA[So this website has become very boring lately, you can judge by the topic of this post that I am going to tell you why.
As many of you are aware now titanRose has been started once again, this means one hell of a work load and thus a lack of time to do anything on [...]]]></description>
			<content:encoded><![CDATA[<p>So this website has become very boring lately, you can judge by the topic of this post that I am going to tell you why.</p>
<p>As many of you are aware now <a href="http://titanrose.com/">titanRose</a> has been started once again, this means one hell of a work load and thus a lack of time to do anything on this website! In my last post I mentioned Project Colossus and that is titanRose, if you google &#8216;define: titan&#8217; colossus is the first word that comes up <img src='http://exjam.co.uk/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  hur hur that was fun.</p>
<p>What am I doing that takes so much time you may ask, well Dae and I are working on <a href="http://vault.titanrose.com/">titanVault</a>, it is a very large web project coded in PHP and the database in MySQL. Most of the database is generated by a C++ program which reads many files from the ROSE client and generates a complex source of information on everything ROSE.</p>
<p>The titanVault can be seen as our version of <a href="http://eu.wowarmory.com/">World of Warcraft&#8217;s Armoury</a>, as we are not only showing game data but also player data, it will show off players items, stats and achievements but for those who want this to remain hidden there are options to do so.</p>
<p>I am very excited about this as no one has done anything similar for ROSE before, it will be very cool and is progressing very quickly, I can&#8217;t wait to show it off to everyone <img src='http://exjam.co.uk/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> . To show you how much work we have done, here is a beautiful graph:</p>
<div id="attachment_274" class="wp-caption aligncenter" style="width: 310px"><a href="http://exjam.co.uk/wp-content/uploads/2009/07/lines_of_code.png"><img src="http://exjam.co.uk/wp-content/uploads/2009/07/lines_of_code-300x187.png" alt="TitanVault Lines of Code" title="TitanVault Lines of Code" width="300" height="187" class="size-medium wp-image-274" /></a><p class="wp-caption-text">TitanVault Lines of Code</p></div>
<p>I personally have wrote 9807 lines of code (76.4%) and Dae 3023 lines of code (23.6%), he needs to pick up the pace!</p>
<p>Here is another graph I found amusing, it shows what time of the day we did commits, notice the low levels around lunch time and dinner time <img src='http://exjam.co.uk/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> .</p>
<div id="attachment_275" class="wp-caption aligncenter" style="width: 310px"><a href="http://exjam.co.uk/wp-content/uploads/2009/07/activity_time.png"><img src="http://exjam.co.uk/wp-content/uploads/2009/07/activity_time-300x187.png" alt="TitanVault Activity Time" title="TitanVault Activity Time" width="300" height="187" class="size-medium wp-image-275" /></a><p class="wp-caption-text">TitanVault Activity Time</p></div>
<p>And you probably want some more statistics:<br />
Total Files: 132<br />
Average File Size: 51.9 lines<br />
Average Revisions Per File: 4.3</p>
<p>I am going on holiday for 1 week now so Dae has plenty of opportunity to catch up with me!</p>
<p>Bye <img src='http://exjam.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://exjam.co.uk/2009/07/09/lame-excuses-galore/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>TGameCtrl lib released</title>
		<link>http://exjam.co.uk/2009/06/23/tgamectrl-lib-released/</link>
		<comments>http://exjam.co.uk/2009/06/23/tgamectrl-lib-released/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 10:12:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://exjam.co.uk/?p=270</guid>
		<description><![CDATA[Sorry for the lack of posts lately, I have been busy.
You can download the library and source code to it here:
http://tgamectrl.exjam.co.uk/tgamectrl.lib.zip
I have also produced a kind of documentation with doxygen, there isn&#8217;t much detail in there but it lets you see all the classes in the library with relative ease 
http://tgamectrl.exjam.co.uk/
Later I shall release a [...]]]></description>
			<content:encoded><![CDATA[<p>Sorry for the lack of posts lately, I have been <a href="http://colossus.exjam.co.uk">busy.</a></p>
<p>You can download the library and source code to it here:<br />
<a href="http://tgamectrl.exjam.co.uk/tgamectrl.lib.zip">http://tgamectrl.exjam.co.uk/tgamectrl.lib.zip</a></p>
<p>I have also produced a kind of documentation with doxygen, there isn&#8217;t much detail in there but it lets you see all the classes in the library with relative ease <img src='http://exjam.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<a href="http://tgamectrl.exjam.co.uk/">http://tgamectrl.exjam.co.uk/</a></p>
<p>Later I shall release a little tutorial on how to use it <img src='http://exjam.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://exjam.co.uk/2009/06/23/tgamectrl-lib-released/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>TGameCtrl_r.lib, doing the impossible :D</title>
		<link>http://exjam.co.uk/2009/06/11/tgamectrl_rlib-doing-the-impossible-d/</link>
		<comments>http://exjam.co.uk/2009/06/11/tgamectrl_rlib-doing-the-impossible-d/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 09:52:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[ROSE Online]]></category>
		<category><![CDATA[Reverse Engineering]]></category>

		<guid isPermaLink="false">http://exjam.co.uk/?p=263</guid>
		<description><![CDATA[After my lovely TriggerVFS.lib I decided to move onto something a bit more complex, making a lib for TGameCtrl_r.dll, which is probably over 9000% more complex as it uses full classes, multiple inheritance and virtual functions. Making a lib for that would be madness surely!
Yes it is madness, but I actually got it to work. [...]]]></description>
			<content:encoded><![CDATA[<p>After my lovely TriggerVFS.lib I decided to move onto something a bit more complex, making a lib for TGameCtrl_r.dll, which is probably over 9000% more complex as it uses full classes, multiple inheritance and virtual functions. Making a lib for that would be madness surely!</p>
<p>Yes it is madness, but I actually got it to work. I still can&#8217;t believe it even works to be honest as it is completely reliant on Visual C++ compiling my lib (with all its inheritance and virtual functions) to be identical to the ROSE dll. Which is ridiculous, yet worked.</p>
<p>Most likely you will not understand how ridiculous it is that this works unless you have a good knowledge of C++ and how those aforementioned features compile into assembly.</p>
<p>What does this mean then? This means it is piss easy to create a custom dialog for ROSE Online, simple link to my library and include required header files such as #include &#8216;TDialog.H&#8217; or &#8216;WinCtrl.h&#8217; or w/e you want <img src='http://exjam.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>Custom dialogs are now as easy as this:<br />
<code></p>
<pre class="brush: c++">
class TestDialog : public CTDialog {
public:
	TestDialog(){}
	virtual ~TestDialog(){}
};

void AddTestDialog(){
	TestDialog* testDlg = new TestDialog();
	testDlg-&gt;Create(&quot;dlgAchievements&quot;);
	AddDialog(1339, testDlg, testDlg-&gt;GetControlID());
	testDlg-&gt;Show();
}
</pre>
<p></code></p>
<p>How simple eh? It is as if we actually have the real code to TGameCtrl, this is how it would be used in ROSE, with the simple inheritance, all the virtual functions working properly and everything <img src='http://exjam.co.uk/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> .</p>
<p>Pretty awesome <img src='http://exjam.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>It is not yet ready for release as I have many more classes to reverse from TGameCtrl_r.dll, below is a list of what I have done so far after many hours of reverse engineering. It may look light a random assortment of classes but it is basically every class which CTDialog depends on, other than the scroll bar related ones, I began implementing them now so I can implement the ZListBox class so I can fully recreate my achievements dialog with my new code.</p>
<p><code><br />
Directory of C:\Programming\Libraries\TGameCtrl\TGameCtrl</p>
<p>221 ActionListenerList.h<br />
161 IActionListener.h<br />
115 IScrollModel.cpp<br />
495 IScrollModel.h<br />
79 ITControl.cpp<br />
340 ITControl.h<br />
134 ITDraw.h<br />
319 SinglelineString.h<br />
886 TButton.cpp<br />
1,300 TButton.h<br />
677 TCaption.cpp<br />
886 TCaption.h<br />
171 TCommand.h<br />
217 TCommandQ.h<br />
2,281 TDialog.cpp<br />
2,582 TDialog.h<br />
345 TGameCtrl.h<br />
5,878 TGameCtrl.vcproj<br />
593 TImage.cpp<br />
923 TImage.h<br />
131 TObject.cpp<br />
256 TObject.h<br />
1,012 TScrollBar.cpp<br />
1,289 TScrollBar.h<br />
190 TScrollBarType.h<br />
704 TScrollBox.cpp<br />
974 TScrollBox.h<br />
251 TStatusBar.cpp<br />
411 TStatusBar.h<br />
2,156 WinCtrl.cpp<br />
2,892 WinCtrl.h<br />
33 File(s) 28,869 bytes<br />
</code></p>
<p>Sorry if you guys are not as excited as I am but I thought this was totally awesome, it might not seem as awesome if you do not know how C++ works and how it compiles into ASM.</p>
<p>Expect a release soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://exjam.co.uk/2009/06/11/tgamectrl_rlib-doing-the-impossible-d/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
<noscript><a href="http://www.hosting24.com/"><img src="http://analytics.hosting24.com/count.php" alt="web hosting" /></a></noscript>
<!-- End Of Analytics Code -->
