Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2003:
[Freeciv-Dev] (PR#2960) First step towards eliminating sprite padding
Home

[Freeciv-Dev] (PR#2960) First step towards eliminating sprite padding

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: esr@xxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#2960) First step towards eliminating sprite padding
From: "Jason Short via RT" <rt@xxxxxxxxxxxxxx>
Date: Sun, 2 Feb 2003 09:24:37 -0800
Reply-to: rt@xxxxxxxxxxxxxx

I really don't want to introduce a hack in the sprite loading code to do
this.  We should fix it at the core, by changing the drawing code to be
able to handle offset sprites.

My idea on this for some time has been to introduce

  struct drawn_sprite [
   struct Sprite sprite;
   int x_offset, y_offset;
  };

and change function prototypes to

  int fill_tile_sprite_array_iso(struct drawn_sprite **sprs,
                                 struct Sprite **dither,
                                 int x, int y, bool citymode,
                                 int *solid_bg)

  int fill_tile_sprite_array(struct drawn_sprite **sprs,
                             int abs_x0, int abs_y0,
                             bool citymode, int *solid_bg,
                             struct player **pplayer)

with corresponding changes inside and outside these functions.  (Note,
this is similar or identical to something you recently proposed as the
"long-term solution".)

jason



[Prev in Thread] Current Thread [Next in Thread]