[aquaria] [patch] 4 little things

False.Genesis false.genesis at googlemail.com
Sat Jul 2 23:19:33 EDT 2011


Hi all, here are 4 small patches that cleanup a few things that have 
been bothering me lately:

- One fix for OpenAL channel code allocations with stupid drivers on 
windows (see http://www.bit-blot.com/forum/index.php?topic=3797.15).
Has been a while since this was last discussed, and i totally forgot i 
had written this patch back then.
Does not fix the problem (blame the drivers instead), but helps tracking 
it down. It was also impossible to compile with MSVC in debug mode 
because of the SANITY_CHECK_OPENAL_CALL() everywhere. 
Insta-assertion-fail-and-crash guaranteed.

- The settexture one eliminates the fact that a texture is first 
refcounted down and eventually deleted, and then the new one loaded.
Now, a texture is first loaded and then the old one removed. May speed 
up loading time and cause less harddisk seek when reloading stuff.

- The next one drops some unnecessarily complicated and 
exists()/fopen()-prone code, as well as the empty loadBMP() method, 
whose existence is just misleading.
Besides that no functional changes, except less fopen() spam.
As far as i know, .jp2 files were never supported.

- And the last one has been requested on the forum years ago, i wonder 
why noone thought about adding Alt+F4 so far. Interesting is that quit() 
alone can't exit nested mains, i hope the code there is enough to fix 
that in all cases.


By the way, is anyone (more or less actively) working on the Aquaria 
code right now? I am in the process of preparing a rather big blob of 
changes, so that would be good to know.
One of my plans is to get rid of the ugly OS specific file path and home 
dir mangling, and replace that with a cleaner virtual file system 
approach. I have recently written a tiny lib for this, and if there are 
no major objections i would like to include that into Aquaria.
(There is some more stuff in the works that depends on this VFS already, 
but i won't spoil it, yet)

I'd need a bit of help with a list of used paths on mac and linux, just 
skimming the source code for them is not so effective because they are 
scattered everywhere. If anyone knows them that'd be cool :)

-- fg
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: channelcount2.patch
URL: <http://icculus.org/pipermail/aquaria/attachments/20110703/e7c6b7d2/attachment.diff>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: enable_alt_f4.patch
URL: <http://icculus.org/pipermail/aquaria/attachments/20110703/e7c6b7d2/attachment-0001.diff>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: settexture.patch
URL: <http://icculus.org/pipermail/aquaria/attachments/20110703/e7c6b7d2/attachment-0002.diff>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: loadtexture.patch
URL: <http://icculus.org/pipermail/aquaria/attachments/20110703/e7c6b7d2/attachment-0003.diff>


More information about the aquaria mailing list