<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Die Macht des Feuers</title>
	<atom:link href="http://diemachtdesfeuers.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://diemachtdesfeuers.wordpress.com</link>
	<description>Information about some projects related to Warcraft III: The Frozen Throne.</description>
	<lastBuildDate>Tue, 29 Nov 2011 08:03:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='diemachtdesfeuers.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Die Macht des Feuers</title>
		<link>http://diemachtdesfeuers.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://diemachtdesfeuers.wordpress.com/osd.xml" title="Die Macht des Feuers" />
	<atom:link rel='hub' href='http://diemachtdesfeuers.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Advanced Script Library 1.3</title>
		<link>http://diemachtdesfeuers.wordpress.com/2011/11/21/advanced-script-library-1-3/</link>
		<comments>http://diemachtdesfeuers.wordpress.com/2011/11/21/advanced-script-library-1-3/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 17:04:12 +0000</pubDate>
		<dc:creator>Baradé</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[Advanced Script Library]]></category>
		<category><![CDATA[Die Macht des Feuers]]></category>
		<category><![CDATA[JASS++]]></category>
		<category><![CDATA[JassHelper]]></category>
		<category><![CDATA[vJass]]></category>
		<category><![CDATA[vjassdoc]]></category>
		<category><![CDATA[wc3lib]]></category>

		<guid isPermaLink="false">http://diemachtdesfeuers.wordpress.com/?p=324</guid>
		<description><![CDATA[On 12th September 2010 I released version 1.2. Since then I tried to spend more time for my other project wc3lib but finally went back to &#8220;Die Macht des Feuers&#8221; from time to time which relies on the ASL. Therefore I had to improve ASL 1.* tree. Actually, the planned 2.0 version got much improvement [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diemachtdesfeuers.wordpress.com&amp;blog=4538949&amp;post=324&amp;subd=diemachtdesfeuers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>On 12th September 2010 I released version 1.2. Since then I tried to spend more time for my other project <a href="https://gitorious.org/wc3lib">wc3lib</a> but finally went back to <a href="http://www.hiveworkshop.com/forums/project-recruitment-256/power-fire-138998/">&#8220;Die Macht des Feuers&#8221;</a> from time to time which relies on the ASL. Therefore I had to improve ASL 1.* tree. Actually, the planned 2.0 version got much improvement and revisions, as well but still based on the current vJass version supported by JassHelper which lacks of some heavily required features.<span id="more-324"></span></p>
<p>In the meantime, I moved to <a href="https://gitorious.org/">Gitorious.org</a> with most of my projects, so you can checkout the latest version of the ASL following <a href="https://gitorious.org/advanced-script-library">this</a> link. All 2.0 stuff is available, too in the same repository but still not usable. At the moment there is no 1.3 release since two systems (A_MAP and ARoutine) still need to be fixed for the release and I want to take a look on some other systems I usually don&#8217;t use myself which makes them hard to be maintained for me. However, this article should give you a digest of the most important changes and of course of all remaining issues.</p>
<p>First of all, I am proud to mention that JassHelper option [forcemethodevaluate] is fully supported by ASL 1.3 which helps you to optimize your function calls. The next &#8220;big&#8221; thing in 1.3 is the fact that there are many stub &#8220;on&lt;identifier&gt;&#8221; methods for most structures now which allow you to redefine behavior by extending structures not only by passing custom function objects.  Amongst many many bug fixes, I improved the API documentation based on the <a href="http://doxygen.org">Doxygen</a> syntax massively but since my own tool <a href="http://www.wc3c.net/showthread.php?t=104560">vjassdoc </a>hasn&#8217;t been updated by me yet and there is no similar tool I still cannot create a proper HTML API documentation. Anyway, it might help users to understand functions easier (including myself as I&#8217;ve figured out when reading old code). I&#8217;ve added some text from the German tutorials (of course translated) and documented some Blizzard JASS functions, as well. Besides, I&#8217;ve added various sections explaning specific topics like containers.</p>
<p>Please bear in mind that this version may break with the old API completely at some points since I made really big revisions for some systems (such as ARoutine, ATalk and AVideo). This version won&#8217;t drop all static initialization stuff but I&#8217;ve already made some systems more dynamic which do use default values for dynamic members instead of an annoying .init() method.</p>
<p>Since the creation of the ASL, missing vJass features have always been a big problem because they prevented me from adding some really cool stuff. I really don&#8217;t want to blame anyone and I am very happy that the JassHelper has been created but today there isn&#8217;t anyone left who is able to maintain it. Vexorian had been the only maintainer at all and this isn&#8217;t ever going to change. I&#8217;ve taken several looks at JassHelper&#8217;s Pascal/Delphi/whatever source code and even if I was familiar with that language I probably wouldn&#8217;t be able to maintain it for a long time. Additionally, there is the bad fact that it depends on Windows. In his <a href="http://www.wc3c.net/showpost.php?p=1120435&amp;postcount=3491">announcement</a> Vexorian mentioned that he was going to create a new, much better tool but because this announcement was made in February 2010 I wouldn&#8217;t expect any initial release anymore. On <a href="http://hiveworkshop.com">hiveworkshop.com</a> I&#8217;ve seen some ideas for a new scripting language but without any usable results. Using <a href="http://www.boost.org/doc/libs/1_48_0/libs/spirit/doc/html/index.html">Spirit</a> I could try it on my own but I really, really don&#8217;t have the time to create another project, especially if there isn&#8217;t anyone who could help me. Let&#8217;s see what the future brings to vJass and the ASL. You can check out the file &#8220;doc/vJass/vJass suggestions.txt&#8221; if you would like to get a list of all annoying lacks of vJass/JassHelper.</p>
<p>Text macro A_MAP has seen a huge revision to make its lookups and insertions as fast as usual dictionary implementations (O(log n)). As mentioned above the revision hasn&#8217;t been completed yet, so you&#8217;ll have to wait some time for the final 1.3 release. All default container types generated and used by the ASL itself got a huge increase of size required by &#8220;Die Macht des Feuers&#8221;. Over the weekend, I revised ARoutine completely and dropped many methods which took much performance but provided less features. ATalk and AInfo got much more documentation and dynamic members. There&#8217;s more debugging functionality now (including more cheats). Global strings can be configured using custom constants now (look into README file for further information). Deprecated module AObjects has been removed and AVideo provides better actor and custom function support. Some important bug fixes have been made, mainly related to structures AAbstractQuest, AVideo, AUnitCopy, AHeroIcon and functions ShowInterface() and CopyUnit(), as well as debugging cheats. Furthermore, I&#8217;ve fixed many compilation issues when setting specific options. The README file includes more details about tool support (e. g. <a href="http://www.wc3c.net/showthread.php?t=79652">jAPI</a>) and trigger editor integration which is a quite unfinished feature but brings many German strings to your trigger editor since I started with the German version which includes a translation of the existing GUI actions.</p>
<p>The following lists of new features and changes might be incomplete. Please use the ChangeLog file to get all detailed information about the new version.</p>
<p>New functions:</p>
<ul>
<li>waitForCondition()</li>
<li>GetPlayerColorValue()</li>
<li>GetPlayerColorRed()</li>
<li>GetPlayerColorGreen()</li>
<li>GetPlayerColorBlue()</li>
<li>player only effect functions</li>
<li>WaitCheckingCondition()</li>
<li>GetDistanceBetweenPointsWithoutZ()</li>
<li>KeyIsValid() &#8211; available without debug mode now</li>
<li>CopyItemToItem()</li>
<li>IsTimeOfDay()</li>
</ul>
<p>New structures:</p>
<ul>
<li>AVideoCharacterData</li>
<li>AVideoPlayerData</li>
<li>AUnitSpell</li>
</ul>
<p>New debugging cheats:</p>
<ul>
<li>&#8220;remove&#8221;</li>
<li>&#8220;execution&#8221;</li>
</ul>
<p>Finally, there aren&#8217;t any screenshots this time <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  but I want to thank the user &#8220;Pali&#8221; for his awesome tool <a href="https://launchpad.net/smpq">SMPQ</a> which uses <a href="http://www.zezula.net/en/mpq/download.html">StormLib</a> to provide a KDE IO slave and a simple prompt tool. Both helped me to create various bash scripts which make testing &#8220;Die Macht des Feuers&#8221; including ASL much faster and easier than before. If you&#8217;re interested in any contribution please contact me. ASL really needs much better documentation and to become more stable to be used more generally. At the moment, it is very limited to my own project &#8220;Die Macht des Feuers&#8221; because I usually try to fix stuff which doesn&#8217;t work in my modification. If you&#8217;re interested in seeing my modification to be finished as soon as possible, you could contribute, as well by creating graphical stuff etc. Any contribution will always be appreciated!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/diemachtdesfeuers.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/diemachtdesfeuers.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/diemachtdesfeuers.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/diemachtdesfeuers.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/diemachtdesfeuers.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/diemachtdesfeuers.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/diemachtdesfeuers.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/diemachtdesfeuers.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/diemachtdesfeuers.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/diemachtdesfeuers.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/diemachtdesfeuers.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/diemachtdesfeuers.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/diemachtdesfeuers.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/diemachtdesfeuers.wordpress.com/324/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diemachtdesfeuers.wordpress.com&amp;blog=4538949&amp;post=324&amp;subd=diemachtdesfeuers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://diemachtdesfeuers.wordpress.com/2011/11/21/advanced-script-library-1-3/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/92435cd7ab0de0d8ea614b32e0cb59fb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Baradé</media:title>
		</media:content>
	</item>
		<item>
		<title>wc3lib: MDLX view implementation</title>
		<link>http://diemachtdesfeuers.wordpress.com/2011/05/14/wc3lib-mdlx-view-implementation/</link>
		<comments>http://diemachtdesfeuers.wordpress.com/2011/05/14/wc3lib-mdlx-view-implementation/#comments</comments>
		<pubDate>Sat, 14 May 2011 16:17:43 +0000</pubDate>
		<dc:creator>Baradé</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[BLP]]></category>
		<category><![CDATA[MDLX]]></category>
		<category><![CDATA[wc3lib]]></category>

		<guid isPermaLink="false">http://diemachtdesfeuers.wordpress.com/?p=295</guid>
		<description><![CDATA[Preface School is annoying and therefore we have to do some project work this year, so I got the idea to combine one of my current projects with this. Initially, I wanted to do some compiler things with Bison and Flex to create first JASS++ or vJass compiler support but since I haven&#8217;t been very [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diemachtdesfeuers.wordpress.com&amp;blog=4538949&amp;post=295&amp;subd=diemachtdesfeuers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Preface</h2>
<p>School is annoying and therefore we have to do some project work this year, so I got the idea to combine one of my current projects with this.<br />
Initially, I wanted to do some compiler things with Bison and Flex to create first JASS++ or vJass compiler support but since I haven&#8217;t been very familiar with these things (not enough to make sure that I had got finished with everything I would have planned) I dropped the idea.<span id="more-295"></span> Later I dropped the MPQ support as possible project work as well because I thought it would be too boring only presenting some archive format and tools, so finally I came to MDLX support.<br />
The really big problem about this is the huge amount of things which could be supported by an implementation. Of course I limited my project work goals for that reason and made sure I would be able to use <a href="http://www.ogre3d.org/">OGRE</a>, <a href="http://qt.nokia.com/">Qt</a>, <a href="http://kde.org/">KDE</a> and everything else I needed to finish my program.<br />
Besides, most of MDLX loading had already been supported at the end of my recent summer holidays (2010) when I made that decision.</p>
<p>Let&#8217;s come to the point. Here&#8217;s a list of things I originally wanted to support with my project work:</p>
<ul>
<li>loading MDX files</li>
<li>loading texture files (as well BLP)</li>
<li>setup a light configurable model view widget in KDE</li>
<li>displaying Geosets of a model file with material layers and their corresponding textures</li>
<li>displaying light sources</li>
<li>using pivot points</li>
<li>displaying attachments</li>
<li>using cameras</li>
<li>displaying and using collision forms for &#8220;hit tests&#8221;</li>
</ul>
<p>In the meantime, some things have changed. Fortunately, I&#8217;ve been able to add BLP reading support for JFIF compression. Hence I&#8217;m able to add all kinds of &#8220;Warcraft: III&#8221; BLP textures now. On the other hand unfortunately OGRE does not support image object pixel modification like Qt does. For this reason, I have to read BLP files into a Qt image object and write it as raw data (e. g. PNG/BMP) into another data stream which OGRE has to read from. Recently I&#8217;ve come a bit more familiar with OGRE&#8217;s class <a href="http://www.ogre3d.org/docs/api/html/classOgre_1_1ImageCodec.html">ImageCodec</a> so maybe I&#8217;m going to implement more direct read and write functionality for BLP in OGRE in future. Furthermore, I&#8217;ve added some team color and glow selection actions and dialogs for displayed models.</p>
<p>Back in 2009 I was already starting to create C++ classes for Blizzard Entertainment&#8217;s MDX format by using the unofficial <a title="specification" href="http://www.wc3c.net/tools/specs/NubMdxFormat.txt">specification</a>. Later I did some more abstraction to it and added classes for &#8220;blocks&#8221;, &#8220;nodes&#8221;, &#8220;objects&#8221;, &#8220;scalings&#8221;, &#8220;translations&#8221;, &#8220;rotations&#8221;, &#8220;alphas&#8221;, &#8220;animated properties&#8221; etc.</p>
<p>The whole reading process of MDX files has never been a big problem since it is a simple binary format. Reading MDL files is much more complicated because you have to defined correct, abstract parsing rules.</p>
<p>Actually, the main question was &#8220;How should it be displayed?&#8221;. There are several ways of doing this:</p>
<ul>
<li>converting MDLX files into another format and reading this format &#8211; slow but useful for editing it with a format supporting tool like <a title="Blender" href="http://www.blender.org/">Blender</a></li>
<li>reading MDLX files into heap and displaying it by using state functions of OpenGL or Direct3D &#8211; fast but complicated and dependent to one renderer implementation</li>
<li>reading MDLX files into heap and displaying it by using an abstract render library &#8211; faster than converting it, more abstract (you could choose your native renderer implementation)</li>
</ul>
<p>In my opinion, first solution is the best one in most cases. It&#8217;s <strong>always</strong> very useful to have an importing/exporting tool for a common format such as <a title="Blend" href="http://www.atmind.nl/blender/mystery_ot_blend.html">Blend</a> because it allows you to edit models of MDLX format with some great tool and additionally allows you to convert it into many other formats by using Blender&#8217;s importing/exporting tools for instance.</p>
<p>The problem about that solution mainly is its waste of performance. Imagine you want to display models like in its corresponding game, as fast as possible. The only possibility to do this would be to use Blender&#8217;s renderer which probably is not optimized for games/clearly displaying loaded scenes.</p>
<p>Of course there is a game engine by now but there still would be loaded too much data for being really fast since Blender has always been a tool for editing not only displaying scenes and supports much more rendering features than actually required by MDLX format (besides some physics and game logic features etc.).</p>
<p>Additionally Blend format is very special and not abstract enough to display MDLX files easily. It would be a long and taxing process to create a really good import/export add-on such as <a href="http://www.hiveworkshop.com/forums/modeling-animation-276/neodex-78b-mdl-kit-3dsmax-6-2010-gmax-115767/">3ds Max</a> one&#8217;s which still has a massive lack of supported features as well.</p>
<p>If you want to have the fastest displaying tool you would have to choose the second solution. Calling renderer routines directly probably is the most efficient way to render scenes by using hardware acceleration. The main problem about that solution is that you have to rely on one specific render API (e. g. OpenGL). Besides you can&#8217;t expand it easily. It&#8217;s like a comparison between C and C++ code. The second one is much more abstract than the first one and therefore can be expanded and maintained much easier.</p>
<p>Mago&#8217;s <a href="http://home.magosx.com/index.php?topic=6.0">War3 Model Editor</a> uses the second solution by calling Direct3d routines to display MDL and MDx files. Unfortunately that is one of the reasons why it is only available on Windows systems (except you&#8217;re using some kind of emulation like <a href="http://www.winehq.org/">wine</a>). The lack of abstraction brings much more further issues if you think of implementing advanced 3d editor and scene rendering functionality to your tool.</p>
<p>That&#8217;s the main reason why I&#8217;ve chosen the last solution for my project work/the wc3lib.</p>
<h2>Implementation</h2>
<p>Finally, I handed in my project work on 6th May 2011. At that moment I had finished common loading display of MDX files in an OGRE based scene. By reading and copying some stuff about OGRE and <a href="http://qt-apps.org/content/show.php?action=content&amp;content=92912">QtOgre</a> on the Internet I was able to create the C++ class &#8220;ModelView&#8221; deriving from class <a href="http://doc.qt.nokia.com/4.7/qwidget.html">QWidget</a>. That class probably is the most basic one of the whole project work since it connects the two big frameworks Qt and OGRE and allows you to create 3d graphics scene displaying Qt widgets.</p>
<p>OGRE has some really useful classes which allow you to modularize and split up views and scene data. For example you can add multiple <a href="http://www.ogre3d.org/docs/api/html/classOgre_1_1Viewport.html">viewports</a> to one single <a href="http://www.ogre3d.org/docs/api/html/classOgre_1_1RenderWindow.html">render window</a>. At the moment my class &#8220;ModelView&#8221; has one primary viewport and render window member but theoretically one view could be expanded to multiple views. Due to this well designed abstraction it&#8217;s very easy to add new features once you got used to<a href="http://www.ogre3d.org/docs/api/html/"> OGRE&#8217;s API.</a></p>
<p>The actual implementation of my school project work&#8217;s goals differs a little bit to its original list. I dropped light sources, attachments and pivot points. The latter was dropped because pivot points are only used by nodes which aren&#8217;t a part of the project work at all (originally I thought they would be used by Geosets, too). Light sources and attachments were dropped because they are some kind of animated properties (which aren&#8217;t part of my project work as well).</p>
<p>As already mentioned above I have been able to add BLP support which became a new item on my goals list.</p>
<p>Let&#8217;s take a look at some screenshots I made for the project work&#8217;s documentation:</p>
<p><a href="http://diemachtdesfeuers.files.wordpress.com/2011/05/dunkles-portal-ohne-animationen-projektarbeit.png"><img class="alignnone size-medium wp-image-310" title="Dark Portal (without animations)" src="http://diemachtdesfeuers.files.wordpress.com/2011/05/dunkles-portal-ohne-animationen-projektarbeit.png?w=300&#038;h=265" alt="" width="300" height="265" /></a></p>
<p>That&#8217;s the famous &#8220;dark portal&#8221; you may know from the &#8220;Warcraft III: The Frozen Throne&#8221; alliance campaign. I took it as example since it most people who know the game will know the portal as well.</p>
<p>It&#8217;s not animated as you might see when you look at the ray texture.</p>
<p>In wc3lib we have different modules for Blizzard&#8217;s file formats which allow us to read and write them actually. There&#8217;s the abstract class &#8220;Format&#8221; which is derived from all format classes such as &#8220;Mdlx&#8221; and &#8220;Blp&#8221;.</p>
<p>For all categories of formats there are different modules in wc3lib which are logically separated by sub directories. &#8220;mdlx&#8221; is the MDLX format&#8217;s sub directory, for instance. Indeed, there&#8217;s only one module which relies on all formats. It&#8217;s called &#8220;editor&#8221; and combines all formats for graphical usage using Qt, KDE and OGRE libraries. &#8220;ModelView&#8221; class which was mentioned above is part of it as well since it uses Qt and OGRE for MDLX display.</p>
<p>Actually, &#8220;editor&#8221; module is optional and has not to be compiled together with the other modules. Initially it had been created as playground module to test the other modules correctness. Now, among class &#8220;ModelView&#8221; there are some World Editor and World Editor modules emulation classes which allow simple global resource and MPQ archive handling (for data sources, consider MPQ support of wc3lib has been not finished yet). For my school project work the class &#8220;OgreMdlx&#8221; is one of the most important ones among &#8220;ModelView&#8221;. It allows you to create <a href="http://www.ogre3d.org/docs/api/html/classOgre_1_1ManualObject.html">ManualObject</a> instances in its corresponding OGRE scene/model view by using its corresponding MDLX data. Simply imagine it as OGRE/MDLX pair.</p>
<p>The initial creation process of the OGRE object can be very time expansive so it wouldn&#8217;t be a good idea to use &#8220;OgreMdlx&#8221; instances for every unit, doodad etc. if you want to display your &#8220;Warcraft: III&#8221; map rather than creating <a href="http://www.ogre3d.org/docs/api/html/classOgre_1_1Mesh.html">Mesh</a> instances for all MDLX geosets (via <a href="http://www.ogre3d.org/docs/api/html/classOgre_1_1ManualObject.html#a657275e617d9558951a3037f02b07efe">convertToMesh</a>) and using them as <a href="http://www.ogre3d.org/docs/api/html/classOgre_1_1Entity.html">entities</a>. Probably, this has to be done anyway since only meshes can use animations. Therefore &#8220;OgreMdlx&#8221; only represents a bunch of static geometry data which can be used for dynamic animated entities once it has been loaded.</p>
<p>As animations are not part of my school project work the second &#8220;secret&#8221; class which uses those meshes and can be animated and instanced via OGRE&#8217;s entity system hasn&#8217;t been created or designed yet.</p>
<p><a href="http://diemachtdesfeuers.files.wordpress.com/2011/05/fixed-wireframe-model.png"><img class="alignnone size-medium wp-image-309" title="Dark Portal (wireframe mode)" src="http://diemachtdesfeuers.files.wordpress.com/2011/05/fixed-wireframe-model.png?w=300&#038;h=297" alt="" width="300" height="297" /></a></p>
<p>OGRE allows you to change user&#8217;s view easily for example to wireframe mode as you can see in the picture above. For simple user control I&#8217;ve added some mouse rotation and translation control to class &#8220;ModelView&#8221; via Qt&#8217;s events. There&#8217;s still a massive lack on &#8220;when the scene should be rendered&#8221;. At the moment member function called &#8220;render&#8221; of class &#8220;ModelView&#8221; is called every time something is changed via control/view actions or Qt&#8217;s widget paint/resize etc. events.</p>
<p>In my opinion a multithreaded solution would be much nicer and more efficient than calling &#8220;render&#8221; all the time which can be very annoying if you think of the nearly unlimited range of model editing scenarios which could be added in the future.</p>
<p>As OGRE&#8217;s API reference states using <a href="http://www.ogre3d.org/docs/api/html/classOgre_1_1Root.html#a8eda253befda1255cbfd3b298f62449e">Ogre::Root::startRendering()</a> which does exactly what I want to have (automatic rendering cycle) should not be used in model editing programs for example. Probably, because it is much faster to change only things which were changed actually. The best compromise could be optional rendering loop for model views which show you map terrain with placed objects for example where objects are constantly animated.</p>
<p>Some days before I had to hand in my project work I was able to fix an annoying display bug which actually occurred because of one line in my code. <a href="http://www.ogre3d.org/forums/viewtopic.php?f=2&amp;t=64556">There</a> you can read about my problem which fortunately could be solved since it was that simple. I just thought you would have to call the index function not only for creating faces. Thank you <a href="http://www.ogre3d.org/forums/memberlist.php?mode=viewprofile&amp;u=1187">Kojack</a> for helping a noob like me finishing his school work on time <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
<p>Here&#8217;s a picture of the nasty model faces distortion:</p>
<p><a href="http://diemachtdesfeuers.files.wordpress.com/2011/05/broken-model.png"><img class="alignnone size-medium wp-image-308" title="Dark Portal (bugged)" src="http://diemachtdesfeuers.files.wordpress.com/2011/05/broken-model.png?w=300&#038;h=296" alt="" width="300" height="296" /></a></p>
<p>As mentioned in my goals list I&#8217;ve added collision shapes and team color/glow support as well. Collision shapes are some kind of simplification for Geoset selection which can either be spheres or boxes. Team colors are used in &#8220;Warcraft: III&#8221; to indicate a unit&#8217;s or building&#8217;s owner/player. Team glows are nearly the same but used for heroes only.</p>
<p>Team color and glow textures are loaded globally in my project work and can be used by member functions of class &#8220;Editor&#8221;.  Collision shape &#8220;hit test&#8221; (as it is called by Blizzard in their <a href="http://www.wc3c.net/showthread.php?t=81629">Art Tools&#8217;</a> manual) is implemented in class &#8220;ModelEditorView&#8221; (deriving from class &#8220;ModelView&#8221;) using an OGRE-based <a href="http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Raycasting+to+the+polygon+level">ray query</a>.</p>
<p>Unfortunately, collision shapes seem to be too big at the moment as you can see on the following screenshot (the little thing it the center of the view is an <a href="http://classic.battle.net/war3/neutral/arachnathid.shtml">Arachnathid</a>):</p>
<p><a href="http://diemachtdesfeuers.files.wordpress.com/2011/05/kollisionsform.png"><img class="alignnone size-medium wp-image-311" title="Collision Form (sphere)" src="http://diemachtdesfeuers.files.wordpress.com/2011/05/kollisionsform.png?w=300&#038;h=224" alt="" width="300" height="224" /></a></p>
<h2>Future</h2>
<p>At the beginning of the creation of the &#8220;editor&#8221; module of &#8220;wc3lib&#8221; I defined the abstract class &#8220;Resource&#8221; from which class &#8220;OgreMdlx&#8221; derives. Meanwhile, I&#8217;ve expanded it and added some multithreading support via virtual member functions and by the fact that &#8220;Resources&#8221; derives from <a href="http://doc.trolltech.com/latest/qthread.html">QThread</a>. It should be possible to load as many resources as possible at the same time to take advantage of multiprocessor systems. For this reason I will have to take a look on Qt&#8217;s classes and their <a href="http://doc.trolltech.com/latest/threads.html">threading support</a> since I&#8217;ve got already some issues when creating objects in separated threads etc.. When I begun writing this article I had already taken a look on <a href="http://www.ogre3d.org/docs/api/html/classOgre_1_1ImageCodec.html">ImageCodec</a> of the OGRE framework. By the meantime, I was able to implement some read functionality for the BLP format which should heavily improve the speed of loading BLP textures in OGRE (without Qt&#8217;s import/export step).</p>
<p>Furthermore, I want to improve the mouse and key control and make some model view settings more customizable. Actually the most important issues I will have to fix are the ones which are related to my school project work&#8217;s goals. As I have to present my project work in school on 28th or 29th June 2011 it would be annoying to have some unfinished stuff, so I will try to fix the collision shapes size, the corresponding &#8220;hit test&#8221; implementation and to improve the team color and glow dialog selection until that date.</p>
<p>Hopefully, the new <a href="http://www.open-std.org/jtc1/sc22/wg21/">C++ ISO</a> will be released this year. The new language standard would allow you to create more maintainable code and use some completely new language features.</p>
<h2>Publication</h2>
<p>Of course I&#8217;ve uploaded my school project work which is almost completely written in German (except its required English summary). Some parts are nearly equal to this article but it&#8217;s larger, I think and written more detailed for people who don&#8217;t know much about the MDLX format (as my teacher(s): one of my teachers thought MDLX must be a Roman number &#8230;):</p>
<p><a href="http://diemachtdesfeuers.files.wordpress.com/2011/05/projektarbeit.pdf">Project Work (German)</a></p>
<p>All corresponding source code of &#8220;wc3lib&#8221; can be found in <a href="http://vjasssdk.svn.sourceforge.net/viewvc/vjasssdk/wc3lib/">my SVN respository on SourceForge.net</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/diemachtdesfeuers.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/diemachtdesfeuers.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/diemachtdesfeuers.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/diemachtdesfeuers.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/diemachtdesfeuers.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/diemachtdesfeuers.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/diemachtdesfeuers.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/diemachtdesfeuers.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/diemachtdesfeuers.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/diemachtdesfeuers.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/diemachtdesfeuers.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/diemachtdesfeuers.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/diemachtdesfeuers.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/diemachtdesfeuers.wordpress.com/295/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diemachtdesfeuers.wordpress.com&amp;blog=4538949&amp;post=295&amp;subd=diemachtdesfeuers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://diemachtdesfeuers.wordpress.com/2011/05/14/wc3lib-mdlx-view-implementation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/92435cd7ab0de0d8ea614b32e0cb59fb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Baradé</media:title>
		</media:content>

		<media:content url="http://diemachtdesfeuers.files.wordpress.com/2011/05/dunkles-portal-ohne-animationen-projektarbeit.png?w=300" medium="image">
			<media:title type="html">Dark Portal (without animations)</media:title>
		</media:content>

		<media:content url="http://diemachtdesfeuers.files.wordpress.com/2011/05/fixed-wireframe-model.png?w=300" medium="image">
			<media:title type="html">Dark Portal (wireframe mode)</media:title>
		</media:content>

		<media:content url="http://diemachtdesfeuers.files.wordpress.com/2011/05/broken-model.png?w=300" medium="image">
			<media:title type="html">Dark Portal (bugged)</media:title>
		</media:content>

		<media:content url="http://diemachtdesfeuers.files.wordpress.com/2011/05/kollisionsform.png?w=300" medium="image">
			<media:title type="html">Collision Form (sphere)</media:title>
		</media:content>
	</item>
		<item>
		<title>ASL: Release of 1.2 and planning of 2.0</title>
		<link>http://diemachtdesfeuers.wordpress.com/2010/09/12/asl-release-of-1-2-and-planning-of-2-0/</link>
		<comments>http://diemachtdesfeuers.wordpress.com/2010/09/12/asl-release-of-1-2-and-planning-of-2-0/#comments</comments>
		<pubDate>Sun, 12 Sep 2010 17:53:41 +0000</pubDate>
		<dc:creator>Baradé</dc:creator>
				<category><![CDATA[historical]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[Advanced Script Library]]></category>
		<category><![CDATA[Die Macht des Feuers]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[wc3sdk]]></category>

		<guid isPermaLink="false">http://diemachtdesfeuers.wordpress.com/?p=267</guid>
		<description><![CDATA[First entry in ASL&#8217;s ChangeLog was made on 2008-08-24. As you can see the ASL became 2 years old on 24th August this year. Last release of the ASL was on 2009-12-20 (version 1.1) and first on 2009-11-07 (version 1.0). Since this has been a really long time ago I thought it would be necessary [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diemachtdesfeuers.wordpress.com&amp;blog=4538949&amp;post=267&amp;subd=diemachtdesfeuers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>First entry in ASL&#8217;s ChangeLog was made on 2008-08-24. As you can see the ASL became 2 years old on 24th August this year.<br />
Last release of the ASL was on 2009-12-20 (version 1.1) and first on 2009-11-07 (version 1.0). Since this has been a really long time ago I thought it would be necessary to create another release on its birthday.<br />
Unfortunately I missed the 24th August because I had to solve some troubles with my hard disk but finally I&#8217;ve prepared and uploaded everything. Simply follow <a href="https://sourceforge.net/projects/vjasssdk/files/wc3sdk/Advanced%20Script%20Library/releases/ASL%201.2.7z/download">this</a> link to download the current release version.<br />
<span id="more-267"></span><br />
Maybe I will add an API documentation later if &#8220;vjassdoc&#8221; still works correctly with the current vJass and code revision.<br />
Many things were changed since version 1.1 and I want to thank those people from <a href="http://www.wc3c.net/">Wc3C.net</a> and other websites who still contribute some vJass code.<br />
While the core becomes more and more stable and usable the systems got some really big reworks. Although there are some completely new structures this release will be version 1.2.<br />
That&#8217;s because many changes were required to complete release 1.0 by fixing bugs and renaming identifiers for instance.<br />
Sadly much documentation still lacks and the tutorials are written in German only yet and are often obsolete. The best way to get help is reading the <a href="http://www.doxygen.org/">Doxygen</a> comments in code files or simply writing me an e-mail. I hadn&#8217;t left much time to revise and improve the documentation but I&#8217;ve added some to the system and core structures and also to the new functions. Another big problem of the ASL development progress is that the JassHelper is not maintained by user Vexorian anymore. As there are some problems with vJass (e. g. <a href="http://www.wc3c.net/showpost.php?p=1124945&amp;postcount=3566">extending size-limited structures by interfaces</a> or running text macros in text macro definitions) I could not create everything I wanted, so there&#8217;s still no abstract interface for container and iterator structures. Just watch the <a href="http://www.wc3c.net/showthread.php?t=88142">JassHelper thread</a> on <a href="http://www.wc3c.net">Wc3C.net</a> to see how many problems people do still have with JassHelper.<br />
Maintaining JassHelper wouldn&#8217;t be a (good) choice for me since it&#8217;s written in ugly Pascal code and honestly I hate vJass&#8217;s syntax. Therefore I hope I will have left enough time to realize my own language JASS++ someday.<br />
Anyway, here&#8217;s a list of new features in ASL 1.2:</p>
<ul>
<li>new debugging print functions</li>
<li>added more debugging cheats</li>
<li>added many new global functions</li>
<li>added custom trigger and trigger editor UI data that some functions and types can be used in World Editor&#8217;s trigger editor now</li>
<li>added many stub methods (identifiers starting with &#8220;on&#8221;) which makes structures better extendible</li>
<li>structure ARoutine supports the same routine type for the same unit several times at one day now</li>
<li>structure ALayer supports multiple regions with different heights now</li>
<li>item charges of rucksack created by structure AInventory do always start at one now</li>
<li>new structure AFormat and old formatting functions support many more arguments now</li>
<li>added many new container methods for all three container implementations (A_VECTOR, A_LIST and A_MAP)</li>
<li>improved page implementation and added current page display support to structure ADialog</li>
<li>quest messages of structures AAbstractQuest, AQuest and AQuestItem are like in Warcraft 3 now and user can call some more methods to show whole updates to the players</li>
<li>structure AAbstractQuest supports dynamic widgets now (for pings)</li>
<li>added global damage detection system based on structure ADamageRecorder</li>
<li>structure AVote uses forces now not all playing players</li>
<li>added text macro A_MAP</li>
<li>added GUI system structures AStyle, AFrameBar, AFrame, AWindow and AArrowButton (usable in 2.0, see below)</li>
<li>added structure AItemSpawnPoint</li>
<li>added interface ASpawnPointInterface</li>
<li>added text macro A_NUMERIC_VECTOR</li>
<li>added RtC 1.0 support</li>
<li>added text macros A_FOREACH, A_FOREACH_2, A_FOREACH_END, A_REVERSE_FOREACH, A_REVERSE_FOREACH_2 and A_REVERSE_FOREACH_END</li>
<li>added interfaces AIteratorInterface and AContainerInterface (not usable because of JassHelper bug)</li>
<li>added structure AFormat</li>
<li>added default container instance struct APlayerVector</li>
<li>added structure AForce</li>
<li>added structures AUnitCopy and AHeroIcon</li>
<li>added interface ABarInterface which is extended by AMultiboardBar</li>
<li>added map constants A_MAX_COLLISION_SIZE and A_MAX_COLLISION_SIZE_ITERATIONS</li>
<li>added text macro A_DESTROY</li>
<li>improved structure APoint</li>
<li>added many camera related functions</li>
</ul>
<p>This is a list of all new global functions:</p>
<ul>
<li>PlaySoundFileOnUnit</li>
<li>PrintIf, PrintFunctionErrorIf and methods of text macro A_STRUCT_DEBUG printIf, printMethodErrorIf and staticPrintMethodErrorIf</li>
<li>speech2</li>
<li>ShowShadowStrikeTextTagForPlayer</li>
<li>CreateCorpseAtRect and CreateCorpsesAtPoint</li>
<li>EndCinematicSceneForPlayer</li>
<li>CreateUnitsAtRect</li>
<li>SetUserUIForPlayer and SetUserControlForPlayer</li>
<li>GetUnitLevelXP, GetUnitXP and GetUnitHeroXP</li>
<li>GetHeroLevelMaxXP and GetHeroMaxXP</li>
<li>GetTimeOfDayElapsedHours, GetTimeOfDayElapsedMinutesInHour, GetTimeOfDayRemainingHours, GetTimeOfDayElapsedMinutes, GetTimeOfDayElapsedSecondsInMinute, GetTimeOfDayRemainingMinutes, GetTimeOfDayElapsedSeconds, GetTimeOfDayRemainingSeconds and GetTimeOfDayString</li>
<li>String and Format</li>
<li>FlushUnitCollisionSizes, FlushUnitTypeCollisionSize, GetUnitCollisionSizeEx and GetUnitCollisionSize</li>
<li>GetPlayingUsers and GetPlayingPlayers</li>
<li>GetRectX and GetRectY</li>
<li>StringSplit</li>
<li>GetTimeOfDayMinutesPercentage and GetTimeOfDaySecondsPercentage</li>
</ul>
<p>And finally here&#8217;s a list of all new debugging cheats:</p>
<ul>
<li>xp</li>
<li>enable</li>
<li>disable</li>
<li>pathing</li>
<li>nopathing</li>
<li>lumber</li>
<li>gold</li>
<li>timeofday</li>
<li>foodcap</li>
<li>order</li>
<li>timer</li>
</ul>
<p>If you want to contribute something please test systems and functions and report your bugs at the project&#8217;s <a href="http://sourceforge.net/tracker/?group_id=252191&amp;atid=1127353">bug tracker</a>.<br />
At the moment I&#8217;m trying to fix some bugs of structures AInventory and ALayer and to add some more and better documentation. Help is primarily required for testing <a href="http://www.wc3c.net/showthread.php?t=109255">RtC</a> and <a href="http://www.wc3c.net/showthread.php?t=79652">jAPI</a> support but also for general testing.<br />
Consider that structures AMissile, AJump, AFocus and AFight are still unusable since I do not require them for &#8220;Die Macht des Feuers&#8221;.<br />
Furthermore global options A_DEBUG_HANDLES, A_FPS_MOVEMENT and A_NET should not be used yet.<br />
Structures AUnitCopy and AHeroIcon were added because of requirement in &#8220;Die Macht des Feuers&#8221; like most new features (including ADialog improvements, AItemSpawnPoint etc.).<br />
Since there are more stub methods now (keyword stub isn&#8217;t implemented that long in vJass) extending structures is much easier. Unfortunately keyword &#8220;protected&#8221; hasn&#8217;t been added to vJass yet and probably never will. Therefore many methods are public which should only be used by derived structures. I&#8217;ve added todo comments which indicate that those methods should be protected if possible.<br />
By meantime, most stub method identifiers start with &#8220;on&#8221; and call function pointers in their original implementation of their structure if there are any. Actually they should also be protected because nobody has to call them from outside of their structure.<br />
Please read file &#8220;README&#8221; before using the new version! File &#8220;TODO&#8221; contains many current issues which are not all reported on online bug tracker.<br />
If you&#8217;re interested in more detailed changes descriptions please take a look into file &#8220;ChangeLog&#8221; because I try to log most of my changes very exactly.</p>
<p>As you can read in my <a href="http://diemachtdesfeuers.wordpress.com/2010/07/27/project-renamings/">recent web log article</a> I&#8217;ve already changed some project names. The main project (formerly called &#8220;vjasssdk&#8221;) is called &#8220;wc3sdk&#8221; now and the original &#8220;wc3sdk&#8221; which contains ASL and the MPQ archives has been split up into projects &#8220;ASL&#8221; and &#8220;archives&#8221;.<br />
Unfortunately I hadn&#8217;t have enough time to move SVN sub folders. Anyway, this project is completely separated now although there are some functions which allow you do preload data from the archives.</p>
<p>For those of you who&#8217;re interested in the whole development progress and history of the ASL I&#8217;ve uploaded several images:</p>
<p><a href="http://diemachtdesfeuers.files.wordpress.com/2010/09/dmdf-quest-functions.png"><img src="http://diemachtdesfeuers.files.wordpress.com/2010/09/dmdf-quest-functions.png?w=300&#038;h=172" alt="" title="DMdF - quest functions" width="300" height="172" class="alignnone size-medium wp-image-279" /></a><br />
This is some really old JASS-only stuff I had created when did not know vJass yet (long time before I started to work on ASL). As you can see I created custom data types by using global variables for properties and I had to write custom constructors and destructors which I would never recommend anyone.<br />
Anyway, at that time I released a promotion video for &#8220;Die Macht des Feuers&#8221;. Maybe I will upload it here again someday.</p>
<p><a href="http://diemachtdesfeuers.files.wordpress.com/2010/09/wc3se-categories.png"><img src="http://diemachtdesfeuers.files.wordpress.com/2010/09/wc3se-categories.png?w=184&#038;h=300" alt="" title="wc3se - categories" width="184" height="300" class="alignnone size-medium wp-image-285" /></a><br />
When ASL had been launched it was called &#8220;Warcraft 3 Script Engine&#8221; and I used <a href="http://www.wc3c.net/showthread.php?t=95267">TESH</a> and ugly vJass. It was launched after discarding current work on &#8220;Die Macht des Feuers&#8221; in 2007.</p>
<p><a href="http://diemachtdesfeuers.files.wordpress.com/2010/09/wc3se-interface-system.png"><img src="http://diemachtdesfeuers.files.wordpress.com/2010/09/wc3se-interface-system.png?w=300&#038;h=232" alt="" title="wc3se - interface system" width="300" height="232" class="alignnone size-medium wp-image-286" /></a><br />
This was the initial custom GUI system which used very ugly code since I didn&#8217;t really used object oriented programming.</p>
<p><a href="http://diemachtdesfeuers.files.wordpress.com/2010/09/kate-asl.png"><img src="http://diemachtdesfeuers.files.wordpress.com/2010/09/kate-asl.png?w=300&#038;h=187" alt="" title="Kate - ASL" width="300" height="187" class="alignnone size-medium wp-image-281" /></a><br />
I&#8217;m still using this modified syntax highlighting of <a href="http://www.wc3c.net/showthread.php?t=105158">Flame_Phoenix&#8217;s version</a>. I&#8217;ve never created some auto completion stuff. Real nerds have to know all JASS natives <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> .</p>
<p><a href="http://diemachtdesfeuers.files.wordpress.com/2010/09/kate-dmdf.png"><img src="http://diemachtdesfeuers.files.wordpress.com/2010/09/kate-dmdf.png?w=300&#038;h=187" alt="" title="Kate - DMDF" width="300" height="187" class="alignnone size-medium wp-image-282" /></a><br />
And this is the RPG modification code. As there had been some mysterious wizards you won&#8217;t recognize any quest file name.</p>
<p><a href="http://diemachtdesfeuers.files.wordpress.com/2010/09/pjass-bug.png"><img src="http://diemachtdesfeuers.files.wordpress.com/2010/09/pjass-bug.png?w=300&#038;h=188" alt="" title="pjass bug" width="300" height="188" class="alignnone size-medium wp-image-284" /></a><br />
Later I got serious problems with pjass since it was limited (Flex/Bison) so I had to move to <a href="http://www.wc3c.net/showthread.php?t=105235">Zoxc&#8217;s JASS parser</a>. Fortunately JassHelper got parser configuration support around that time.</p>
<p><a href="http://diemachtdesfeuers.files.wordpress.com/2010/09/dmdf-trigger-editor.jpg"><img src="http://diemachtdesfeuers.files.wordpress.com/2010/09/dmdf-trigger-editor.jpg?w=300&#038;h=232" alt="" title="DMdF - trigger editor" width="300" height="232" class="alignnone size-medium wp-image-280" /></a><br />
That&#8217;s the custom script code of the current &#8220;Die Macht des Feuers&#8221; map called &#8220;Talras&#8221;. Again you won&#8217;t recognize the mini map &#8211; those mysterious wizards must be really powerful.</p>
<p><a href="http://diemachtdesfeuers.files.wordpress.com/2010/09/linux-test.png"><img src="http://diemachtdesfeuers.files.wordpress.com/2010/09/linux-test.png?w=300&#038;h=225" alt="" title="Linux test" width="300" height="225" class="alignnone size-medium wp-image-283" /></a><br />
And finally I would like to recommend you to test all your maps on Linux systems with deprecated versions of wine. Just minimize your game and open it again and you&#8217;ll see such beauty textures.</p>
<p>Finally I want to write which systems probably will get more attention next time since they&#8217;re used in my project &#8220;Die Macht des Feuers&#8221;.<br />
First of all I need to improve the interface of structure AInventory since it doesn&#8217;t easily allow developer to remove or count items. Besides video, class selection and talk systems may be improved a little bit.<br />
Since custom GUIs won&#8217;t be provided by first &#8220;Die Macht des Feuers&#8221; release ASL&#8217;s GUI system will be revised in version 2.0 only!<br />
As there are many different spells which may need some &#8220;extra functionality&#8221; which isn&#8217;t given by the current systems there can be some new ones in version 1.*. All in all version 1.* should support the whole current planning state of &#8220;Die Macht des Feuers&#8221; so I can get a really stable version.<br />
Therefore I won&#8217;t stop supporting and fixing version 1.* until I&#8217;ve created a new, stable release of version 2.* which supports my RPG modification, too.<br />
Consider that structures like AMissile, the AI module and RtC/jAPI support will probably suffer from those decisions but I won&#8217;t really care about.</p>
<p>Version 2.0:<br />
Of course I&#8217;ve already made some planning for version 2.0. I will create a new SVN branch for release 2.0 and continue development of version 1.2 as I wrote above. So there will probably be another release like 1.3 with many bug fixes and other important improvements.<br />
I think version 2.0 will be the last version of the ASL and I will stop development since my other projects need some more attention and vJass has never been my favorite scripting language though I&#8217;m very happy I don&#8217;t have to use JASS anymore.<br />
The main purpose of the ASL project has always been my modification &#8220;Die Macht des Feuers&#8221;. For this reason I will primarily add new features to 2.0 which are heavily required by &#8220;Die Macht des Feuers&#8221; but also some new and better core functionality.<br />
Additionally I want to add some more documentation stuff than the current German tutorials and all those Doxygen comments. Since vjassdoc development had also been stopped it&#8217;s hard to create a really nice, automatically generated documentation.<br />
In my opinion there should be a step-by-step tutorial about &#8220;How to use ASL?&#8221; because it&#8217;s hard to see the huge amount of functions, libraries and structures for new users although they mostly won&#8217;t need many parts of it.<br />
Here&#8217;s a list of main changes and features which should be realized with 2.0:</p>
<ul>
<li>release test map for 2.0</li>
<li>add much more detailed Doxygen comments to code (include examples etc.)</li>
<li>add step-by-step tutorial &#8220;How to use ASL?&#8221; which is related to example map</li>
<li>decrease number of structure initializers which has to be called manually (identified as &#8220;init&#8221;) and increase number of dynamic members</li>
<li>decrease number of global options</li>
<li>add new core functions for interface (sound, camera, cinematic filters) and strings (such as Trim&#8230;)</li>
<li>add new core structures like AImageBar, ATextTagBar, AReverseIterator and some more container types</li>
<li>add A_PAIR and A_SORTED_CONTAINER</li>
<li>add interface ASerializable for all serializable structures (such as character system&#8217;s ones)</li>
<li>add structure APlayerUIData which stores and restores player&#8217;s user interface data (required for in-game videos)</li>
<li>function interfaces should become static members of structures if possible</li>
<li>many ACharacter related structures (such as AInventory, AFight and ARevival) should be implemented unit-based and extended by those character system related structures</li>
<li>add new implementation of structure AInventory which is extended by AEquipment and ARucksack</li>
<li>improve GUI system by adding/improving structures AWindow, AStyle, ALayout etc. and using graphics from project &#8220;archives&#8221;</li>
<li>add more trigger and trigger editor UI data (primarily for global functions and core types) to provide easier access</li>
<li>add JassHelper option [forcemethodevaluate] support</li>
<li>add structure AUnitStats based on ADamageRecorder which could be usable in strategy games and for various spells</li>
<li>structure ATokenizer should get backwards functionality and extends AContainerInterface</li>
</ul>
<p>If you have some more cool ideas just write an e-mail. All contributions are appreciated.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/diemachtdesfeuers.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/diemachtdesfeuers.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/diemachtdesfeuers.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/diemachtdesfeuers.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/diemachtdesfeuers.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/diemachtdesfeuers.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/diemachtdesfeuers.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/diemachtdesfeuers.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/diemachtdesfeuers.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/diemachtdesfeuers.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/diemachtdesfeuers.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/diemachtdesfeuers.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/diemachtdesfeuers.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/diemachtdesfeuers.wordpress.com/267/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diemachtdesfeuers.wordpress.com&amp;blog=4538949&amp;post=267&amp;subd=diemachtdesfeuers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://diemachtdesfeuers.wordpress.com/2010/09/12/asl-release-of-1-2-and-planning-of-2-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/92435cd7ab0de0d8ea614b32e0cb59fb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Baradé</media:title>
		</media:content>

		<media:content url="http://diemachtdesfeuers.files.wordpress.com/2010/09/dmdf-quest-functions.png?w=300" medium="image">
			<media:title type="html">DMdF - quest functions</media:title>
		</media:content>

		<media:content url="http://diemachtdesfeuers.files.wordpress.com/2010/09/wc3se-categories.png?w=184" medium="image">
			<media:title type="html">wc3se - categories</media:title>
		</media:content>

		<media:content url="http://diemachtdesfeuers.files.wordpress.com/2010/09/wc3se-interface-system.png?w=300" medium="image">
			<media:title type="html">wc3se - interface system</media:title>
		</media:content>

		<media:content url="http://diemachtdesfeuers.files.wordpress.com/2010/09/kate-asl.png?w=300" medium="image">
			<media:title type="html">Kate - ASL</media:title>
		</media:content>

		<media:content url="http://diemachtdesfeuers.files.wordpress.com/2010/09/kate-dmdf.png?w=300" medium="image">
			<media:title type="html">Kate - DMDF</media:title>
		</media:content>

		<media:content url="http://diemachtdesfeuers.files.wordpress.com/2010/09/pjass-bug.png?w=300" medium="image">
			<media:title type="html">pjass bug</media:title>
		</media:content>

		<media:content url="http://diemachtdesfeuers.files.wordpress.com/2010/09/dmdf-trigger-editor.jpg?w=300" medium="image">
			<media:title type="html">DMdF - trigger editor</media:title>
		</media:content>

		<media:content url="http://diemachtdesfeuers.files.wordpress.com/2010/09/linux-test.png?w=300" medium="image">
			<media:title type="html">Linux test</media:title>
		</media:content>
	</item>
		<item>
		<title>Project renamings</title>
		<link>http://diemachtdesfeuers.wordpress.com/2010/07/27/project-renamings/</link>
		<comments>http://diemachtdesfeuers.wordpress.com/2010/07/27/project-renamings/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 16:41:13 +0000</pubDate>
		<dc:creator>Baradé</dc:creator>
				<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://diemachtdesfeuers.wordpress.com/?p=252</guid>
		<description><![CDATA[As project &#8220;vjasssdk&#8221; was initially intended for providing various tools to work with scripting languages vJass, JASS etc. it got its name &#8220;vjasssdk&#8221; which means vJass Software Development Kit. Since I&#8217;ve changed and extended it later by adding tools like &#8220;wc3lib&#8221;, &#8220;mpqeditor&#8221; and there has always been my MPQ archives filled with models and textures [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diemachtdesfeuers.wordpress.com&amp;blog=4538949&amp;post=252&amp;subd=diemachtdesfeuers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As project &#8220;vjasssdk&#8221; was initially intended for providing various tools to work with scripting languages vJass, JASS etc. it got its name &#8220;vjasssdk&#8221; which means vJass Software Development Kit.<br />
Since I&#8217;ve changed and extended it later by adding tools like &#8220;wc3lib&#8221;, &#8220;mpqeditor&#8221; and there has always been my MPQ archives filled with models and textures the name became more and more misleading. Therefore I&#8217;ve changed it to &#8220;wc3sdk&#8221; which was the name of the &#8220;Advanced Script Library&#8221; and the archives before.<br />
<span id="more-252"></span><br />
These two projects will be split up into two independent projects that there aren&#8217;t two projects called the same.<br />
I&#8217;ve already changed the name on <a href="http://sourceforge.net/projects/vjasssdk/">SourceForge.net</a>. Unfortunately you can&#8217;t use the feature of changing your project&#8217;s name by moving its domain and folder names so the domain address will still be the same.<br />
Besides it will take some time to change the SVN sub folder names since my Internet connection is very limited. Consider that there isn&#8217;t all archive files available in the SVN repository yet because of this reason.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/diemachtdesfeuers.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/diemachtdesfeuers.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/diemachtdesfeuers.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/diemachtdesfeuers.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/diemachtdesfeuers.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/diemachtdesfeuers.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/diemachtdesfeuers.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/diemachtdesfeuers.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/diemachtdesfeuers.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/diemachtdesfeuers.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/diemachtdesfeuers.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/diemachtdesfeuers.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/diemachtdesfeuers.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/diemachtdesfeuers.wordpress.com/252/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diemachtdesfeuers.wordpress.com&amp;blog=4538949&amp;post=252&amp;subd=diemachtdesfeuers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://diemachtdesfeuers.wordpress.com/2010/07/27/project-renamings/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/92435cd7ab0de0d8ea614b32e0cb59fb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Baradé</media:title>
		</media:content>
	</item>
		<item>
		<title>JASS++</title>
		<link>http://diemachtdesfeuers.wordpress.com/2010/06/19/jass-2/</link>
		<comments>http://diemachtdesfeuers.wordpress.com/2010/06/19/jass-2/#comments</comments>
		<pubDate>Sat, 19 Jun 2010 15:48:03 +0000</pubDate>
		<dc:creator>Baradé</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[JASS++]]></category>

		<guid isPermaLink="false">http://diemachtdesfeuers.wordpress.com/?p=241</guid>
		<description><![CDATA[Some months have passed since I wrote the recent and first article about my own scripting language JASS++. By meantime, the language specification has become much improvement (old version 607 lines, current version on my local computer 2344 lines). I&#8217;ve added things like templates, container types, AI blocks, preload blocks, local blocks, exception handling, declaration [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diemachtdesfeuers.wordpress.com&amp;blog=4538949&amp;post=241&amp;subd=diemachtdesfeuers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Some months have passed since I wrote the recent and first <a href="http://diemachtdesfeuers.wordpress.com/2009/12/06/jass/">article</a> about my own scripting language JASS++.<br />
By meantime, the language specification has become much improvement (old version 607 lines, current version on my local computer 2344 lines).<br />
I&#8217;ve added things like templates, container types, AI blocks, preload blocks, local blocks, exception handling, declaration requirements, object type literals and those in strings, locking, function types and variables, lambda functions, enumerations, aliases, finally, friends, serialization and a standard library.<br />
All in all the language has become bigger and harder to implement but also more logical.<br />
<span id="more-241"></span><br />
For better understanding why I&#8217;ve specified so many new features I&#8217;ve created some <a href="http://tdauth.cdauth.eu/wc3sdk/JASS++/examples/">code examples</a> which compare JASS, vJass and JASS++ solutions.<br />
Container types specification helps you to use types such as force, group, string, arrays and enums. In addition to the possibility to use the &#8220;size&#8221; keyword an those types you could use &#8220;foreach&#8221; keyword for iterating them safely.<br />
Using keywords like &#8220;executewait&#8221;, &#8220;sleep&#8221; or &#8220;wait&#8221; helps you to get some delayed statements, synchronized or using local time.<br />
Furthermore &#8220;local&#8221; can be used to create synchronized statement scopes for local code and provide something safer than just those Blizzard comments used in their own code when checking for local player by using &#8220;GetLocalPlayer&#8221;.<br />
Aliases are useful when providing new identifiers for existing stuff without reimplementing it.<br />
Templates should be known from C++ since they are declared (and probably compiled) very similarly.<br />
AI blocks can be used for creating custom AI scripts with some more safety (since there are <a href="http://jass.sourceforge.net/doc/library.shtml">various rules</a> to create working AI scripts.<br />
Function types and lambda functions should also be known from other programming languages and vJass. JASS++ uses keyword &#8220;abstract&#8221; for function types declarations. Finally, known from Java, helps you to clean some memory without saving results into local variables and returning them at the end of your function. Serialization provides a standardised way to save values (also class objects and arrays!) into hash tables and game caches and of course to load them from.<br />
Conditional statements and loop statements do behave some differently than in common programming languages.<br />
&#8220;switch&#8221; statements will be recalled until a value is being returned or &#8220;break&#8221; is being used.<br />
Loops can have &#8220;case&#8221;, &#8220;default&#8221; and &#8220;else&#8221; statements, too (Python inspired me to add those since it allows you to use &#8220;default&#8221; and &#8220;else&#8221; for loops). &#8220;case&#8221; needs an integer expression and will be used when the loop was iterated as many times as the integer expression pretends. &#8220;default&#8221; will be used when the loop has not been stopped by using &#8220;break&#8221; otherwise your optional &#8220;else&#8221; scope will be used.<br />
Scopes has been specified much more precise than before. The language allows you to declare nested scopes like C++, so you can declare classes in class declarations etc.<br />
It is also allowed to access static variables of functions if they are public.<br />
Additionally you can use access modifiers to make declarations usable by its outer scopes. For this reason theoretically it is possible to write something like <code>package package package package public void test() {}</code> If your function is declared inside 5 (not 4 since first is used implicitly) nested packages. Friend declarations can be used to allow some advanced access to declaration which are not in the same scope branch and can also be used in functions for static variables. Enumerations are not necessarily integer-based and there is some specific rules on how enumerations which inherit native types like &#8220;playercolor&#8221; do get their values. Object type literals are a useful way to get some data from SLK and w3o-based file data of the map and its corresponding game MPQ archives.<br />
They can also be used in strings (like in object editor &#8211; tooltips). Declaration requirements is an essential feature since you can only use functions before their declaration by using &#8220;execute&#8221;, &#8220;evaluate&#8221; and &#8220;executewait&#8221; which can only be used on threaded functions.<br />
One of my first ideas when I started creating initial drafts of JASS++ was to handle declaration requirements automatically but I discarded everything since I&#8217;ve always hated such implicit invisible declaration order behaviour and preferred some explicit statements so developer can see which function or package is used/required. I think this can be discussed a long time and surely would sometimes be much easier without explicit statements but actually if you split up your code into several packages you won&#8217;t have to use more than package identifiers as declaration requirements anymore to make sure everything will work correctly.<br />
Note that vJass does only provide &#8220;requires&#8221; for libraries and does also auto generate &#8220;.evaluate&#8221; for methods if you don&#8217;t disable this behaviour.<br />
At the moment I am working on some parts of the specification which are still inscrutable or not precise. Actually I wanted to create some LaTeX based documentation split up into several documents but it seems that I have not enough time for doing this next days.<br />
First I want to rework or initially write the multi inheritance specification which I have already some drafts for but did not add yet.<br />
It probably will be very similar to C++ since I&#8217;ve read the C++ documentation when I created my drafts and for sure I am a real C++ fan.<br />
I&#8217;ve also added keywords &#8220;type&#8221;, &#8220;var&#8221; and &#8220;function&#8221; to allow users making their code more readable and also for template type interfaces/constraints.<br />
Another big advantage of JASS++ will be its standard library. This is maybe one of the most discussible parts of any language. Although I won&#8217;t discuss much since I&#8217;m the only one who really cares anyway and I have some experience with JASS and vJass by now.<br />
Some parts of my project ASL will be used reimplemented by using JASS++ syntax and some of its language features but I will separate everything into API modules like described in &#8220;common.j&#8221; file split up into packages.<br />
There will also be classes for native types and some more specified systems like an RPG&#8217;s ones for inventories and characters.<br />
You can find the current version of drafts and the German specification itself as linked above on <a href="http://tdauth.cdauth.eu/wc3sdk/JASS++/">my brother&#8217;s server</a> since I had some file system corruptions and do not use my SVN repository at the moment until I fixed everything.<br />
If you want to contribute something, please do it. I really don&#8217;t care if it&#8217;s crap as long as I can laugh about it.<br />
Just write comments or an e-mail.<br />
Btw. I&#8217;ve revised the specification while I was writing this article. It has 2396 lines now (before 2344) since I had to revise friends, access modifiers and scopes sections which were some kind of misty.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/diemachtdesfeuers.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/diemachtdesfeuers.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/diemachtdesfeuers.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/diemachtdesfeuers.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/diemachtdesfeuers.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/diemachtdesfeuers.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/diemachtdesfeuers.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/diemachtdesfeuers.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/diemachtdesfeuers.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/diemachtdesfeuers.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/diemachtdesfeuers.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/diemachtdesfeuers.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/diemachtdesfeuers.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/diemachtdesfeuers.wordpress.com/241/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diemachtdesfeuers.wordpress.com&amp;blog=4538949&amp;post=241&amp;subd=diemachtdesfeuers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://diemachtdesfeuers.wordpress.com/2010/06/19/jass-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/92435cd7ab0de0d8ea614b32e0cb59fb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Baradé</media:title>
		</media:content>
	</item>
		<item>
		<title>ASL: Better internationalization and foreach support</title>
		<link>http://diemachtdesfeuers.wordpress.com/2010/05/25/asl-better-internationalization-and-foreach-support/</link>
		<comments>http://diemachtdesfeuers.wordpress.com/2010/05/25/asl-better-internationalization-and-foreach-support/#comments</comments>
		<pubDate>Tue, 25 May 2010 16:26:25 +0000</pubDate>
		<dc:creator>Baradé</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[Advanced Script Library]]></category>

		<guid isPermaLink="false">http://diemachtdesfeuers.wordpress.com/?p=235</guid>
		<description><![CDATA[I&#8217;ve improved ASL&#8217;s internationalization support recently by being geared to C++ Boost libraries and its format library. ASL does now contain struct type &#8220;AFormat&#8221; which allows you to add arguments to strings by using shortcut methods like &#8220;s&#8221; which means string or &#8220;r&#8221; which means real. Since it would be very annoying to create an [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diemachtdesfeuers.wordpress.com&amp;blog=4538949&amp;post=235&amp;subd=diemachtdesfeuers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve improved ASL&#8217;s internationalization support recently by being geared to <a href="http://www.boost.org/">C++ Boost libraries</a> and its <a href="http://www.boost.org/doc/libs/1_43_0/libs/format/index.html">format library</a>.<br />
ASL does now contain struct type &#8220;AFormat&#8221; which allows you to add arguments to strings by using shortcut methods like &#8220;s&#8221; which means string or &#8220;r&#8221; which means real.<br />
<span id="more-235"></span><br />
Since it would be very annoying to create an &#8220;AFormat&#8221; object and destroying it each time you want to format a string I&#8217;ve written the global function &#8220;Format&#8221; which creates an object automatically.<br />
For releasing it in the same line you could call the method &#8220;result&#8221; which returns the formatted string and destroys the format object (similar to Boost libraries I think).<br />
The ASL did already have some string formatting support by providing functions like &#8220;IntegerArg&#8221; and &#8220;RealArg&#8221; but since there are no parameter types like &#8220;&#8230;&#8221; (C/C++) for unlimited arguments it was nearly unreadable when formatting strings by adding many arguments.<br />
Additionally I had an implementation which did only allow user to specify his format arguments by using <a href="http://www.cplusplus.com/reference/clibrary/cstdio/printf/">C-like</a> expressions: %r, %i etc.<br />
&#8220;AFormat&#8221; allows you to specify it like in Boost library or <a href="http://qt.nokia.com/products">Qt</a>, by its order: %1%, %2% etc. since it stores internal argument position.<br />
Furthermore I&#8217;ve added support for various native types of Jass like handles, units, players etc.<br />
Here&#8217;s a simple comparison example for formatting strings with ASL:<br />
<code><br />
local string result0 = StringArg(StringArg(IntegerArg(tr("You're %i years old and you're called %s. Besides you're %s."), 0), "Peter"), "gay")<br />
local string result1 = Format(tr("It's %1% o'clock and you're going to die in %2% hours. Maybe you should ask %3% why you're still alive.")).t(GetTimeOfDay()).i(3).s("Peter").result() // t means time and can be used for formatting time automatically (real values)<br />
local string result2 = String(Format(tr("In the name of %s")).p(Player(0))) // You can also use the global String function (like in Boost libraries). p means player and adds player's name.<br />
</code></p>
<p>Another new feature of ASL is the foreach loop. Many programming languages do have native foreach support. C++ does not have native support but libraries like Boost and Qt do have preprocessors which generate them automatically for specific types of containers.<br />
Since vJass allows you to define <a href="http://www.wc3c.net/vexorian/jasshelpermanual.html#textm">text macros</a> this can be done with it, too. Surely it doesn&#8217;t look as nice as in C++ since you have to call text macros by the statement &#8220;//! runtextmacro&#8221; and you can not declare local variables anywhere but it&#8217;s a funny and nice feature, although:<br />
<code><br />
local AIntegerList list = AIntegerList.createWithSize(10, 12)<br />
local integer value<br />
//! runtextmacro A_FOREACH("list")<br />
	debug call Print("Value " + I2S(aIterator.data())) // Use global iterator "aIterator".<br />
	call aIterator.setValue(GetRandomInt(0, 100))<br />
//! runtextmacro A_FOREACH_END()</p>
<p>//! runtextmacro A_FOREACH_2("value", "list", "AIntegerListIterator")<br />
	debug call Print("Value " + I2S(value))<br />
//! runtextmacro A_FOREACH_END()<br />
</code><br />
Unfortunately there is a <a href="http://www.wc3c.net/showpost.php?p=1124945&amp;postcount=3566">vJass bug</a> when implementing an interface in size limited structs. Otherwise you probably could remove the iterator type argument.<br />
Note that since &#8220;aIterator&#8221; is global you should not use &#8220;TriggerSleepAction&#8221; calls in foreach loops.<br />
Maybe I will add a third version which takes an iterator as argument but usually you could write it commonly if you want to use your own iterator:<br />
<code><br />
local AIntegerListIterator iterator = list.begin()<br />
loop<br />
	exitwhen (not iterator.isValid())<br />
	debug call Print("Value " + I2S(iterator.data()))<br />
	call iterator.next()<br />
endloop<br />
iterator.destroy()<br />
</code><br />
At the moment foreach loops can only be used on map and list containers. Vector container does not support iterators, yet.<br />
I will release ASL version 1.2 next months I hope because there had been made lots of changes and fixes lately.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/diemachtdesfeuers.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/diemachtdesfeuers.wordpress.com/235/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/diemachtdesfeuers.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/diemachtdesfeuers.wordpress.com/235/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/diemachtdesfeuers.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/diemachtdesfeuers.wordpress.com/235/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/diemachtdesfeuers.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/diemachtdesfeuers.wordpress.com/235/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/diemachtdesfeuers.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/diemachtdesfeuers.wordpress.com/235/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/diemachtdesfeuers.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/diemachtdesfeuers.wordpress.com/235/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/diemachtdesfeuers.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/diemachtdesfeuers.wordpress.com/235/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diemachtdesfeuers.wordpress.com&amp;blog=4538949&amp;post=235&amp;subd=diemachtdesfeuers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://diemachtdesfeuers.wordpress.com/2010/05/25/asl-better-internationalization-and-foreach-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/92435cd7ab0de0d8ea614b32e0cb59fb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Baradé</media:title>
		</media:content>
	</item>
		<item>
		<title>Neratia</title>
		<link>http://diemachtdesfeuers.wordpress.com/2010/05/25/neratia/</link>
		<comments>http://diemachtdesfeuers.wordpress.com/2010/05/25/neratia/#comments</comments>
		<pubDate>Tue, 25 May 2010 15:48:17 +0000</pubDate>
		<dc:creator>Baradé</dc:creator>
				<category><![CDATA[graphical]]></category>
		<category><![CDATA[Die Macht des Feuers]]></category>

		<guid isPermaLink="false">http://diemachtdesfeuers.wordpress.com/?p=233</guid>
		<description><![CDATA[Maybe you&#8217;re familiar with the German project Neratia. If not just have a look at it. It&#8217;s an old RPG modification which did already exist when I wasn&#8217;t able to use Warcraft&#8217;s GUI trigger editor yet! Since they discarded everything several times (I think) and moved to &#8220;real texture models&#8221; which were created by German [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diemachtdesfeuers.wordpress.com&amp;blog=4538949&amp;post=233&amp;subd=diemachtdesfeuers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Maybe you&#8217;re familiar with the German project <a href="http://warcraft.ingame.de/forum/forumdisplay.php?f=760">Neratia</a>. If not just have a look at it.<br />
It&#8217;s an <a href="http://warcraft.ingame.de/forum/showthread.php?p=1838279&amp;postcount=1#post1838279">old</a> RPG modification which did already exist when I wasn&#8217;t able to use Warcraft&#8217;s GUI trigger editor yet!<br />
<span id="more-233"></span><br />
Since they discarded everything several times (I think) and moved to &#8220;real texture models&#8221; which were created by German user Born2Modificate at that time, it took that long and finally has been <a href="http://warcraft.ingame.de/forum/showthread.php?p=4626650&amp;postcount=1459#post4626650">discarded</a> at all.<br />
They wanted to create an RPG modification based on Warcraft 3 The Frozen Throne similar to &#8220;Die Macht des Feuers&#8221; but for single player only and with better graphics/terrain and FPS support. In my opinion they did concentrate too much on graphics and wanted to create something by using Warcraft&#8217;s engine which could never really be made since Warcraft is old and does not allow to change everything you want. Although it&#8217;s easy to modify which probably is reason number one why people do start projects based on it (including me).<br />
As the creators of Neratia wrote (user xXm0RpH3usXX) in the mentioned post Warcraft is limited and therefore they stopped.<br />
The good thing about this faulting of so much work is that they released their custom models!<br />
When Born2Modificate was an active graphic artist for Warcraft 3 and his own project(s) he released <a href="http://www.wc3c.net/showthread.php?t=83031">two real texture packages</a>. Without having them it would have never been possible to create my modification &#8220;Die Macht des Feuers&#8221; as a real texture map project since they were almost the only real texture resources for Warcraft 3 available.<br />
Now they have been extended indirectly by user xXm0RpH3usXX who <a href="http://www.wc3c.net/showthread.php?t=109433">released</a> most Neratia real texture models on wc3c.net.<br />
I&#8217;ve already added all models to my custom MPQ archive and will add the corresponding doodad objects next time.<br />
Unfortunately most of them are usable for creating castles and town stuff and I&#8217;ve already done this work for my first map.<br />
However, I want to thank both Neratia creators (xXm0RpH3usXX and Corexx) a lot for releasing some of their work.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/diemachtdesfeuers.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/diemachtdesfeuers.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/diemachtdesfeuers.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/diemachtdesfeuers.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/diemachtdesfeuers.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/diemachtdesfeuers.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/diemachtdesfeuers.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/diemachtdesfeuers.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/diemachtdesfeuers.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/diemachtdesfeuers.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/diemachtdesfeuers.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/diemachtdesfeuers.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/diemachtdesfeuers.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/diemachtdesfeuers.wordpress.com/233/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diemachtdesfeuers.wordpress.com&amp;blog=4538949&amp;post=233&amp;subd=diemachtdesfeuers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://diemachtdesfeuers.wordpress.com/2010/05/25/neratia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/92435cd7ab0de0d8ea614b32e0cb59fb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Baradé</media:title>
		</media:content>
	</item>
		<item>
		<title>wc3lib: MPQ support</title>
		<link>http://diemachtdesfeuers.wordpress.com/2010/05/25/wc3lib-mpq-support/</link>
		<comments>http://diemachtdesfeuers.wordpress.com/2010/05/25/wc3lib-mpq-support/#comments</comments>
		<pubDate>Tue, 25 May 2010 15:20:34 +0000</pubDate>
		<dc:creator>Baradé</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[MPQ]]></category>
		<category><![CDATA[mpqeditor]]></category>
		<category><![CDATA[wc3lib]]></category>

		<guid isPermaLink="false">http://diemachtdesfeuers.wordpress.com/?p=227</guid>
		<description><![CDATA[A long time ago I&#8217;ve posted the last web log entry, so now it&#8217;s time for a new one. In this article I want to describe Blizzard&#8217;s MPQ format for those of you who don&#8217;t know already and I want to write how I&#8217;m going to add read and write support to the wc3lib. The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diemachtdesfeuers.wordpress.com&amp;blog=4538949&amp;post=227&amp;subd=diemachtdesfeuers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A long time ago I&#8217;ve posted the last web log entry, so now it&#8217;s time for a new one.<br />
In this article I want to describe Blizzard&#8217;s MPQ format for those of you who don&#8217;t know already and I want to write how I&#8217;m going to add read and write support to the wc3lib.<br />
<span id="more-227"></span><br />
The <a href="http://en.wikipedia.org/wiki/MPQ">MPQ</a> format a format created by Blizzard Entertainment to create file archives for their games.<br />
Like most (or all) Blizzard&#8217;s formats its documentation has never been made public so people had to analyse it themselves.<br />
As some sources do state (<a href="http://shadowflare.samods.org/inside_mopaq/prologue.htm#acknowledgements_and_credits">[1]</a>, <a href="http://www.zezula.net/en/mpq/stormlib.html">[2]</a>)  Tom Amigo was the first person who created a &#8220;stormless&#8221; <a href="http://www.angelfire.com/sc/mpq/">MPQ editor</a> (in the year 2000).<br />
Stormless means without the Storm library. The Storm library is Blizzard&#8217;s own MPQ library which is dispatched with all of their games.<br />
It doesn&#8217;t only provide MPQ read- and writing functionality, it does also provide many other cross-platform functions which are required by Blizzard&#8217;s games.<br />
The easiest way to use MPQ archives is to use this library. Since it has been checked out and <a href="http://shadowflare.samods.org/inside_mopaq/chapter3.htm">documented</a> well enough to read and write MPQ archives and there are already some closed and open source tools which do use its API, people should be able to easily create their own library/tool or whatever.<br />
So maybe at this point you&#8217;re asking yourself why we should discuss any longer since there&#8217;s already a nice possibility to use the format.<br />
The answer is easy: Blizzard&#8217;s Storm library is closed source and maybe not optimized for your usages.<br />
Surely it&#8217;s not really necessary to work any further on this but (for me) it&#8217;s very interesting to work on such a format, although. Additionally there comes the fact that I nearly always use Linux and want to write some scripts for my project (&#8220;Die Macht des Feuers&#8221;) which create/release my custom MPQ archives automatically.<br />
Using Windows code is very annoying since most times it&#8217;s very unclear and almost unreadable. Besides I&#8217;ve to use wine every time I want to do something with it.<br />
As I did not want to create or write everything myself when I started the wc3lib project I searched for some MPQ libraries/tools which do implement their own functions.<br />
My searching results were: <a href="http://shadowflare.samods.org/downloads/SFmpqapi.html">SFmpqapi</a>, <a href="http://www.zezula.net/en/mpq/stormlib.html">StormLib</a>, <a href="http://home.magosx.com/index.php?topic=77.0">MpqLib</a> and <a href="https://libmpq.org/">libmpq</a>.<br />
The last one does only support reading MPQ archives and is written in C. The MpqLib is written in C++ but it&#8217;s .NET and therefore not cross-platform. Additionally it&#8217;s only a wrapper over the StormLib which makes it (in my opinion) completely useless for most people. The StormLib in my opinion is the best choice if you want to create a cross-platform application which can read AND write MPQ archives.<br />
It was ported to Linux and Mac OS X (Marko Friedemann and Sam Wilkins) in 2006 and provides nearly the same API as SFmpqapi does.<br />
The main disadvantages of  the SFmpqapi library are that it doesn&#8217;t seem to be maintained anymore (last update 2002, StormLib 2009) and it does only provide Linux support which didn&#8217;t work on my system (tried to compile it with g++, it also doesn&#8217;t provide any makefiles).<br />
The StormLib and the libmpq libraries were the only ones which I was able to compile on my platform.<br />
libmpq seems to work as well but since it does only provide read functionality it&#8217;s useless. However, its code is written very well (ISO C) and it provides some nice <a href="https://libmpq.org/wiki/Applications">tools</a> (fuse MPQ plug in) which makes it particularly interesting for Linux users/programmers.<br />
However, SFmpqapi is used by the <a href="http://www.wc3c.net/showthread.php?t=87407">WEHelper</a> project and additionally by the <a href="http://www.wc3c.net/showthread.php?t=90999">Jass NewGen Pack</a> project since it probably was the first real usable MPQ library when people started modifying Warcraft 3 .<br />
When I began  writing and designing the wc3lib I intended to use the StormLib for providing MPQ support. I wanted to write some wrapper classes (as MpqLib creator Magos did).<br />
My first contact to the StormLib goes back to June in 2009 when started creating a simple <a href="http://diemachtdesfeuers.wordpress.com/2009/06/30/the-mpq-editor/">MPQ editor</a>. In fact I was able to use the StormLib as programming interface but creating and reading archives didn&#8217;t work correctly.<br />
However, I still wanted to use the library and to improve it as needed.<br />
Later (after writing first implementations of BLP and MDLX modules) I started reading Justin Olbrantz&#8217; MPQ format specification (version 1.0, year 2006) and became more interested in it. First I wrote some classes for providing a nice programming interface to MPQ archives but then I started implementing my own functions. For this reason wc3lib&#8217;s MPQ support is a custom one now and unfortunately still in beta stage.<br />
Since wc3lib is created by using the programming language C++ it provides some classes to read and modify MPQ archives.<br />
At the moment there are four different classes which provide access to all MPQ archive&#8217;s elements:</p>
<ul>
<li>Mpq: Main class which represents single archive.</li>
<li>Hash: Should be read-only class and provides access to single hash table entry.</li>
<li>Block: Also read-only class which provides access to single block table entry.</li>
<li>MpqFile: Represents single file contained by an archive.</li>
<li>Sector: Provides access to an MPQ file data sector. Usually this class should not be used by users.</li>
</ul>
<p>Normally you just need to know the classes Mpq and MpqFile which provide all functions you need to add, rename, move or remove files from archives or to modify files and archives attributes.<br />
MPQ archives do always contain hash and block table which provide entry lists for files.<br />
Each file has exactly one hash table entry which allows user to search for files using their hash values and the hash table of the archive.<br />
Additionally the file consists of blocks which again do consist of sectors.<br />
Each sector can be compressed differently by using various compression methods (<a href="http://en.wikipedia.org/wiki/Huffman_coding">Huffman</a>, <a href="http://en.wikipedia.org/wiki/Bzip2">Bzip2</a> etc.).<br />
Some compression and decompression functions have been imported from the StormLib (e. g. PKWare and Wave) since it would be much and unnecessary work to write custom ones.<br />
Some others (like inflate and deflate &#8211; <a href="http://en.wikipedia.org/wiki/Zlib">Zlib</a>) were implemented by myself using some documentation stuff.<br />
All MPQ related compressing, decompression and hashing functions can be reached by including header file &#8220;&#8221; but should usually not be required by user.<br />
There are various surrounding conditions to clarify when creating such a library. First of all I had design the classes and their methods based on the MPQ specification (which incorrectly uses int8 instead of int16 by the way).<br />
At the moment you can only get constant access to MPQ files and writing file functionality is not implemented yet.<br />
The variety of compression algorithm made me creating some kind of dependencies since I have to use external libraries for some of the compression algorithm.<br />
These dependencies did also occur when I created the BLP module since it needs to compress and decompress JPEG images.<br />
At the moment I work on changes from compile time linking support (to shared objects) to run time linking by using functions like <a href="http://www.opengroup.org/onlinepubs/009695399/functions/dlopen.html">dlopen</a>.<br />
This feature would prevent unnecessary recompiling when using other compile flags but also means much more work.<br />
There&#8217;s a simple class now called LibraryLoader which I&#8217;ve added to solve this.<br />
Another problem I&#8217;ve to consider is code licensing of externally and internally used code.<br />
For instance Zlib and bzip2 do use open source licenses and has to be installed additionally to the wc3lib when using MPQ module but as I mentioned there&#8217;s also some code which is directly implemented in the wc3lib itself (took from StormLib and MPQ specification) which I&#8217;ll have to license separately.<br />
The author of the MPQ specification, Justin Olbrantz, mentions that you&#8217;re allowed to distribute everything as long as stating the author which should not be a big problem for me.<br />
By contrast, Ladislav Zezula  author of StormLib does not specify any license and therefore owns copyright to it.<br />
It would be nice to see StormLib with GPL or any similar license.<br />
mpqlib uses GPLv2 license, MpqLib uses GPLv3 (but consider that it needs StormLib) and SFmpqapi is licensed in a similar way to the MPQ specification.<br />
C++ does provide nice features (operator overloading, friends) to develop such API. For example you can use stream operators to add files to archives:<br />
<code><br />
#include  // Include MPQ module of wc3lib.</p>
<p>using namespace wc3lib::mpq; // Use MPQ module namespace.</p>
<p>void testFunction()<br />
{<br />
	class Mpq mpq1;</p>
<p>	// Using exception handling to catch errors.<br />
	try<br />
	{<br />
		mpq1.open("War3x.mpq"); // Opens an existing MPQ archive.<br />
	}<br />
	catch (class Exception &amp;exception)<br />
	{<br />
		std::cerr &lt;&lt; &quot;Unable to open archive: &quot; &lt;&lt; exception &lt;&lt; std::endl;</p>
<p>		return;<br />
	}</p>
<p>	class MpqFile *listfileFile = mpq1.findFile(&quot;(listfile)&quot;);</p>
<p>	if (listfileFile == 0) // Did not find file.<br />
		return;</p>
<p>	std::cout &lt;&lt; &quot;(listfile) file data:\n&quot; &lt;&lt; *listfileFile &lt;&lt; std::endl; // Writes file content into output stream.</p>
<p>	class Mpq mpq2;</p>
<p>	try<br />
	{<br />
		mpq2.open(&quot;War3.mpq&quot;);<br />
	}<br />
	catch (class Exception &amp;exception)<br />
	{<br />
		std::cerr &lt;&lt; &quot;Unable to open archive: &quot; &lt;&lt; exception &lt;&lt; std::endl;</p>
<p>		return;<br />
	}</p>
<p>	try<br />
	{<br />
		mpq2 &lt;&lt; *listfileFile; // Copies file content data and adds file to second archive.<br />
	}<br />
	catch (class Exception &amp;exception) // Should an exception if file does already exist.<br />
	{<br />
		std::cerr &lt;&lt; &quot;Unable to add file: &quot; &lt;&lt; exception &lt;&lt; std::endl;</p>
<p>		return;<br />
	}</p>
<p>	// Like fstreams, MPQ archives are being closed automatically when being deleted (at end of scope).<br />
}<br />
</code><br />
This little (completely useless) example shows you how to use stream operators and some functions (open and findFile). Of course there is already more functionality than this but I just wanted to show you that it&#8217;s not hard to use the library.<br />
Exception handling improves (in my opinion) error handling and makes it easier for developers to check if everything was fine.<br />
Internally Mpq and MpqFile classes do only read meta data (like hash, block and file sector table). Primary when user wants to read some file data (e. g. file data is being written into output stream as in the example above) it&#8217;s allocated. For this reason it would be hard to work with two instances of the same MPQ archive and adding or deleting some files (multithreading). I hope I will have left some time to add multithreading support one day but usually it should be enough without for most applications. Consider that MPQ archives do not save file paths in header, hash or block table. They&#8217;re always stored separately in the &#8220;(listfile)&#8221; file which is not required necessarily.<br />
Further plans I&#8217;ve made are for the editor module of wc3lib which allow users some GUI support for Blizzards formats. Maybe I&#8217;m going to implement some formats like the MPQ one as <a href="http://en.wikipedia.org/wiki/KIO">KIO</a> slaves.<br />
This would allow KDE users to open and modify MPQ archives e. g. in <a href="http://en.wikipedia.org/wiki/Konqueror">Konqueror</a> directly.<br />
Contribution would be appreciated, so if you know Python or C++ (I would like to add Python bindings or to write some parts of wc3lib in Python since it&#8217;s easier to maintain) and want to help just contact me.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/diemachtdesfeuers.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/diemachtdesfeuers.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/diemachtdesfeuers.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/diemachtdesfeuers.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/diemachtdesfeuers.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/diemachtdesfeuers.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/diemachtdesfeuers.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/diemachtdesfeuers.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/diemachtdesfeuers.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/diemachtdesfeuers.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/diemachtdesfeuers.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/diemachtdesfeuers.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/diemachtdesfeuers.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/diemachtdesfeuers.wordpress.com/227/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diemachtdesfeuers.wordpress.com&amp;blog=4538949&amp;post=227&amp;subd=diemachtdesfeuers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://diemachtdesfeuers.wordpress.com/2010/05/25/wc3lib-mpq-support/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/92435cd7ab0de0d8ea614b32e0cb59fb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Baradé</media:title>
		</media:content>
	</item>
		<item>
		<title>How to fix your map environment?</title>
		<link>http://diemachtdesfeuers.wordpress.com/2010/03/07/how-to-fix-your-map-environment/</link>
		<comments>http://diemachtdesfeuers.wordpress.com/2010/03/07/how-to-fix-your-map-environment/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 21:49:48 +0000</pubDate>
		<dc:creator>Baradé</dc:creator>
				<category><![CDATA[graphical]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[Die Macht des Feuers]]></category>

		<guid isPermaLink="false">http://diemachtdesfeuers.wordpress.com/?p=214</guid>
		<description><![CDATA[Since I&#8217;ve revised my custom tilesets of &#8220;Die Macht des Feuers&#8221; the environment of my first map &#8220;Talras&#8221; wasn&#8217;t displayed correctly by editor anymore. There were only red textures left on the whole map because it still used the old tileset ids, so I started to create the new list of my new custom tileset [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diemachtdesfeuers.wordpress.com&amp;blog=4538949&amp;post=214&amp;subd=diemachtdesfeuers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Since I&#8217;ve revised my custom tilesets of &#8220;Die Macht des Feuers&#8221; the environment of my first map &#8220;Talras&#8221; wasn&#8217;t displayed correctly by editor anymore.<br />
There were only red textures left on the whole map because it still used the old tileset ids, so I started to create the new list of my new custom tileset ids.<br />
<span id="more-214"></span><br />
Unfortunately the tilesetter tool of the <a href="http://www.wc3c.net/showthread.php?p=1050064">Grim Extension Pack</a> seemed to be bugged (I used it by writing //! external TileSetter  ). As I did not find any source code of the tilesetter tool I had to write my own tilesetter tool.<br />
<a href="http://www.wc3c.net/tools/specs/index.html">This</a> documentation explains how map environment is saved.<br />
As I planned to write some environment read- and writing code anyway (for the wc3lib project) I started to write a little C++ programm which allows you to replace some tilepoint data in the &#8220;war3map.w3e&#8221; file of any Warcraft 3 map which contains the environment data (tilepoints) of the map.<br />
Most things seemed to work correctly but water height was to big, so I had to calculate the original height by using the display water height formula of the mentioned documentation and decrease the water height of all tilepoints by 512 (which should be 2 cliff levels considering the formula).<br />
One interesting thing about my corrupted map tileset was that there were much more tileset ids than 16 (which is maximum) which all had value 0.<br />
I don&#8217;t know how this could be happen, maybe it&#8217;s a bug of the tilesetter tool or maybe it was because I wrote my custom CliffTypes.slk file.<br />
Finally everything seems to work correctly NOW and I dropped all cliff types.<br />
Cliffs are created by elevation brush of terrain editor now.<br />
You have to define your custom values in file &#8220;UI/MiscData.txt&#8221; (category &#8220;[Terrain]&#8220;, set value &#8220;MaxSlope&#8221; to 90 and maybe increase value &#8220;MaxHeight&#8221; and decrease value &#8220;MinHeight&#8221;) if you want to place nice vertical cliffs.<br />
The bad thing about all those changes is that I&#8217;ve lost much time and I&#8217;ll have to replace all cliffs but the good thing is that there will be much nicer cliffs, more space on map and 16 different tileset ids.<br />
In the end I want to show some &#8220;Joy of Terrain&#8221; and of course the code of my C++ program which hopefully will be available in a much better way in my wc3lib project someday:<br />
<a href="http://diemachtdesfeuers.files.wordpress.com/2010/03/the-joy-of-terrain.png"><img src="http://diemachtdesfeuers.files.wordpress.com/2010/03/the-joy-of-terrain.png?w=300&#038;h=241" alt="Some weird terrain of my map &quot;Talras&quot; after trying to fix the environment file." title="The Joy of Terrain" width="300" height="241" class="alignnone size-medium wp-image-220" /></a></p>
<p><a href="http://tdauth.cdauth.eu/Die Macht des Feuers/tilesetter.cpp">Link to C++ program source code</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/diemachtdesfeuers.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/diemachtdesfeuers.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/diemachtdesfeuers.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/diemachtdesfeuers.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/diemachtdesfeuers.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/diemachtdesfeuers.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/diemachtdesfeuers.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/diemachtdesfeuers.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/diemachtdesfeuers.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/diemachtdesfeuers.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/diemachtdesfeuers.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/diemachtdesfeuers.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/diemachtdesfeuers.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/diemachtdesfeuers.wordpress.com/214/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diemachtdesfeuers.wordpress.com&amp;blog=4538949&amp;post=214&amp;subd=diemachtdesfeuers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://diemachtdesfeuers.wordpress.com/2010/03/07/how-to-fix-your-map-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/92435cd7ab0de0d8ea614b32e0cb59fb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Baradé</media:title>
		</media:content>

		<media:content url="http://diemachtdesfeuers.files.wordpress.com/2010/03/the-joy-of-terrain.png?w=300" medium="image">
			<media:title type="html">The Joy of Terrain</media:title>
		</media:content>
	</item>
		<item>
		<title>Releasing archives</title>
		<link>http://diemachtdesfeuers.wordpress.com/2010/03/07/releasing-archives/</link>
		<comments>http://diemachtdesfeuers.wordpress.com/2010/03/07/releasing-archives/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 14:44:07 +0000</pubDate>
		<dc:creator>Baradé</dc:creator>
				<category><![CDATA[graphical]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[archives]]></category>
		<category><![CDATA[Die Macht des Feuers]]></category>

		<guid isPermaLink="false">http://diemachtdesfeuers.wordpress.com/?p=216</guid>
		<description><![CDATA[Today I&#8217;ve started uploading 7z archives of wc3sdk&#8217;s archives. Unfortunately my Internet connection is very slow, so it may take a really long time until all archives are available on the vjasssdk project website. There are six different archives: Ambient Asl Creatures Interface Items Spells The archive &#8220;Asl&#8221; won&#8217;t be uploaded since it does only [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diemachtdesfeuers.wordpress.com&amp;blog=4538949&amp;post=216&amp;subd=diemachtdesfeuers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;ve started uploading 7z archives of wc3sdk&#8217;s archives.<br />
<span id="more-216"></span><br />
Unfortunately my Internet connection is very slow, so it may take a really long time until all archives are available on the <a href="https://sourceforge.net/projects/vjasssdk/files/">vjasssdk project website</a>.<br />
There are six different archives:</p>
<ul>
<li>Ambient</li>
<li>Asl</li>
<li>Creatures</li>
<li>Interface</li>
<li>Items</li>
<li>Spells</li>
</ul>
<p>The archive &#8220;Asl&#8221; won&#8217;t be uploaded since it does only contain some unfinished trigger data files for using ASL functions in trigger editor.<br />
Most of texture and model files do have German names. Only the newer ones have English names because when I started this project I decided to give all files German names but later I thought it would be much better to make it available to people from all nations.<br />
Each directory which contains at least one file which is not a directory itself should contain a file called &#8220;Credits.txt&#8221;.<br />
Those credits files contain all or most of file authors and sources where I downloaded them.<br />
Some of the files were especially created for my project &#8220;Die Macht des Feuers&#8221; but most of them were downloaded (sometimes renamed and customized) by me from websites like <a href="http://www.wc3c.net/">Wc3C.net</a>, <a href="http://www.hiveworkshop.com/">The Hive Workshop</a> and <a href="http://xgm.ru/">\\XGM\\</a>. Note that &#8220;Die Macht des Feuers&#8221; has its own additonal archive which contains stuff like game music, dialogue sounds and customized files like e. g. Terrain.slk and Water.slk. Besides you should consider how to use them as MPQ archives. At the moment I always create a completely new huge MPQ archive (or add the updated archive directories) since I&#8217;m not able to start Grimoire hacked Warcraft TFT and to load custom MPQ archives into game which would probably be the best way.<br />
Primarily I was going to commit them all to my wc3sdk SVN repository (archives sub folder) but it&#8217;s unimaginable to upload all those files uncompressed (should have started with git :-/) with my current Internet connection speed.<br />
I thank all people who created any of the files since without them I would be unable to make my modification &#8220;Die Macht des Feuers&#8221;.</p>
<p>Update (2010-07-26): <a href="https://sourceforge.net/projects/vjasssdk/files/wc3sdk/archives/releases/Doodads%28415%2C%20villager%20scaled%201.20%29.w3d/download">This</a> is a corresponding doodad file which can be used together with the Ambient archive.<br />
It&#8217;s the same which is used for the project &#8220;Die Macht des Feuers&#8221; and contains 415 different doodads at the moment with default scale values fitting to the Warcraft 3 villager model scaled with value 1.20.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/diemachtdesfeuers.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/diemachtdesfeuers.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/diemachtdesfeuers.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/diemachtdesfeuers.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/diemachtdesfeuers.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/diemachtdesfeuers.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/diemachtdesfeuers.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/diemachtdesfeuers.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/diemachtdesfeuers.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/diemachtdesfeuers.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/diemachtdesfeuers.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/diemachtdesfeuers.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/diemachtdesfeuers.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/diemachtdesfeuers.wordpress.com/216/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=diemachtdesfeuers.wordpress.com&amp;blog=4538949&amp;post=216&amp;subd=diemachtdesfeuers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://diemachtdesfeuers.wordpress.com/2010/03/07/releasing-archives/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/92435cd7ab0de0d8ea614b32e0cb59fb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Baradé</media:title>
		</media:content>
	</item>
	</channel>
</rss>
