URL:
  <http://gna.org/patch/?func=detailitem&item_id=552>

                 Summary: patch for maps that are smaller than the window and
for scrolling of background
                 Project: Wormux
            Submitted by: toony
            Submitted on: Thursday 05/11/2006 at 12:02
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open

    _______________________________________________________

Details:

Hi,

As proposed on the mailinglist, this patch deals with two related problems in
the last revision wormux:

1) on large screen sizes (1280x1024) maps like Grenouilles do not completely
fill the screen. margins around the map are not cleared correctly

2) The sky is always scrolled slower than the ground with a given percentage.
This is not always useful, and the map-designer can not control the amount of
slowdown. Currently I'm designing a level where sky and background should not
have any relative displacements.

To adress these issues, the patch makes the following changes:

1) The camera object calculates the margins when a new level is loaded. These
margins are non-zero when the sky image is smaller than the screen.

2) The camera implements two methods for doing coordinate transformations:
WorldToScreen and ScreenToWorld, that take into account the effect of the
margins.

3) At all places in the code where such coordinate transformations are done,
these two methods are subsituted.

4) Slower scrolling of the sky can now only be achieved by making the sky
bitmap smaller than the ground bitmap. When the user scrolls completely to
the left of the map, the left border of the sky image and the map image
coincide. The same goes for the right side.

5) The margin is drawn after all level elements are drawn and before all
interface elements are drawn. This is done by the method Camera::DrawMargin.

The patch can be applied to revision 734.

It think that's it. If you have questions, remarks or anything, ... shoot.

Toon





    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thursday 05/11/2006 at 12:02  Name: camera.patch  Size: 21.52KB   By:
toony
camera.patch
<http://gna.org/patch/download.php?file_id=866>

    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?func=detailitem&item_id=552>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wormux-gna mailing list
[email protected]
https://mail.gna.org/listinfo/wormux-gna

Reply via email to