Bug #10457, was updated on 2007-Feb-22 14:59
Here is a current snapshot of the bug.

Project: LinCityNG
Category: confirmed
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Submitted by: alainb
Assigned to : none
Summary: Some 3D animations alignment wrong

Details: lincity-ng 1.1, build on linux + nvidia-glx-dev, 1024x768
Communes, Mills, Light and Heavy industries animation are bad aligned. So the 
building moves up and down when the animation shows activities.

Follow-Ups:

Date: 2008-Dec-18 11:54
By: jaky_lincity

Comment:
I think there are two reasons for this behaviour: The first one is a bug in 
zoomSurface from SDL_gfx which creates textures which are 1 pixel two small. 
The other reason is the way the PainterSDL::drawStretchTexture function handles 
non-integer values for the size and the upper left corner of a texture. Both of 
them are rounded up with the result that the position of the lower right corner 
is changed as well. But the lower right corner is used in GameView.cpp to 
position the image. So the lower right corner changes for different images of 
the same building, because they have different sizes and some are rounded while 
others aren't. This causes the moving of the images.
The second reason can be fixed by rounding down the X and Y Values of the upper 
left corner while the size is rounded up. This way the rounding chancels each 
other out.
As a workaround for the bug in SDL_gfx we could check if the size of the zoomed 
texture is correct and try again with a different zoom factor if it isn't.
To avoid this problem and workaround we could also change the sizes of the 
images so that all images of the same building have the same size. It did that 
for most of the images. You can download them at 
http://files.mail.ru/eng?back=%2F37A9BJ (9.1 MB). I didn't change the monument, 
coal-power-plant, tip and rocket, because they are difficult to change and you 
don't see the moving images because they don't have an animation. Some of the 
images changed from colormap to fullcolor because I didn't find a way to 
preserve the colormap with imagemagick. The shadows of the modern windmill also 
changed, but this change is only visible in gimp, not in the game.
If you don't like the changed images and prefer a patch to work around this 
issue, please tell me.
-------------------------------------------------------

Date: 2007-Feb-22 18:10
By: bugmenot

Comment:
When running OpenGL mode it works here. (lincity-ng --gl)
But in SDL mode the buildings are jumping (lincity-ng --sdl)
I use Nvidia, too.
-------------------------------------------------------

Date: 2007-Feb-22 16:13
By: alainb

Comment:
Blacksmith too.

I have checked the data/images/tiles for the blacksmith and they have not the 
same size, and aligment is different. But i m completely dumb with gimp to fix 
this
-------------------------------------------------------

Date: 2007-Feb-22 15:50
By: alainb

Comment:
hight tech windmills too, but not always !
-------------------------------------------------------

For detailed info, follow this link:
http://developer.berlios.de/bugs/?func=detailbug&bug_id=10457&group_id=2929
_______________________________________________
Lincity-ng-devel mailing list
Lincity-ng-devel@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/lincity-ng-devel

Reply via email to