[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Small map aspect ratio patch
From: |
Gervase Lam |
Subject: |
Small map aspect ratio patch |
Date: |
Sun, 6 Oct 2002 02:57:17 +0100 |
Attached is a patch to make the small map keep the aspect ratio. There is
also a minor patch that allows the position of the small map by only
changing the position variables.
I've used the position change patch to move the map a few pixels away from
the left-hand edge of the screen. I've also increased the maximum
vertical size of the map from 75 pixels to 100 pixels. If any of the new
pixel sizes and positions aren't OK, then they may be changed.
Interestingly, there is code there to draw the positions of the Pingus.
But for some reason, they don't appear on the small map.
There is also a comment in the pertinent piece of code saying that put
pixel should be used rather than the draw_line that is being used at the
moment. However, they I can't find a put pixel method in the ClanLib
documentation. The closest I can get to it is CL_Target::draw_pixel().
Would using CL_Target::draw_pixel() slow down Pingus? I must admit, I
don't quite know how to use it if it were OK to use. I'll probably try to
find more about it tomorrow.
There is also commented out code that draws the entrances and exits for
the Pingus. However, a plf (Pingu Level Format) object is used. But
Pingu Level Formats are no more.
This led me to look at ExitData::create_WorldObj() and then
World::init_worldobjs(PLF* plf), which puts the objects into the World
with a plf object passed in (I thought plf was no more?).
But I don't know how to get the exit object data from this so that an exit
can be put on to the small map. All the objects seem all jumbled up to
me. Surely I don't have to go through every World object to find
entrances and exits!?
Thanks,
Gervase.
pingus.200210060255.cvs.diff
Description: Text Data
- Small map aspect ratio patch,
Gervase Lam <=