[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Enigma-devel] 320x240 support, need help
From: |
Ronald Lamprecht |
Subject: |
Re: [Enigma-devel] 320x240 support, need help |
Date: |
Mon, 31 Dec 2007 18:47:45 +0100 |
User-agent: |
Thunderbird 2.0.0.9 (Windows/20071031) |
Hi,
Clarence Risher wrote:
find attached a tarball containing my patch to crudely/partially enable
320x240 support. inside you will find a patch against current svn trunk
as well as the following new files:
O.k. - you decided to jump on the 1.10 development branch - namely the
trunk. I personally favour this approach as a merge from the 1.01 branch
to the 1.10 would be painful. Additionally the GP2X will profit from the
performance improvements and the improved support of new
screenresolutions in 1.10. Be aware the trunk is currently the main
development branch and may thus be instabile in some svn revisions!
BTW you did not attach the compressed svn diff! Please email it directly
to me as the size may be too large for the mailing list.
data/models-16.lua
data/gfx16/inventory.jpg
data/gfx16/menu_bg.jpg
data/gfx16/Makefile
data/gfx16/Makefile.am
data/gfx16/Makefile.in
data/gfx16/unavailable.png
data/gfx16/unknown.png
data/gfx16/solved.png
data/gfx16/thumbborder.png
you will also need to duplicate data/gfx32/*.png to data/gfx16/ scaled
down 50%, I used imagemagick convert to do this:
cd data/gfx32; for i in *.png; do echo $i; convert -resize 50% $i
../gfx16/$i; done
There should be no need to scale the 32 bit images to external 16 bit
files. Enigma can scale down not existing 16 bit images from the 32 bit
ones. I did the same trick for the new 64 bit based resolutions. This
saves space on the svn and marks clearly which images have been
optimized for the new resolutions.
You may still distribute scaled 16 bit images with a 320x240 Enigma
version.
And then 320x240 will be playable, if not pretty. Some of the textual
screens (credits, help) have not been resized yet, but that is
inconsequential to gameplay. More importantly, and the reason I ask for
help here, is that I cannot actually get the game to change into 320x240
mode. It works if I edit my ~/.enigmarc.xml and set my video modes to
"-10-", but when I try to change to 320x240 from the options menu i end
up back in 640x480. I got lost following all the sdl video mode
validation code, so I hope someone here can point out where I went wrong.
Besides problems with menus not fitting on the 320x240 screen the
support of the new resolution should be limited to a few lines of code.
Please test your 320x240 support in the window mode. In full screen mode
SDL will refuse to switch to 320x240 if the graphic does not support
this resolution. In this case the base resolution is chosen.
PS: some of my methods for deciding when to scale down are inconsistent,
because I did not want to use data not already available. I used
vminfo.width in most places, but in some places that was lacking while
tt/vtt was not.
Unfortunaly I did not yet reengineer all menus to the new style. I just
made sure that Enigma runs reasonable with 64 bit based modes to allow
testing of new graphics.
PPS: I am quite open to suggestions on better ways to handle the
conditional scaling.
Need your diffs for comments.
Wish you all a happy new year,
Ronald