Re: [AD] drawing modes

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Tuesday 01 March 2005 23:13, Victor wrote:
> Hi, i'm the guy who posted some modifications to the drawing modes in 
allegro.cc (now that i've got access to this list, i'll try to post 
anything needed in the future here).
>  
> I just want to know if it's ok, or if i need change something. I've 
posted the two diffs there (thanks to gnolam and Evert).

My profound apologies for responding to this so late. I hadn't realized I 
hadn't replied again... :(
There actually is a problem with the patch, which has to do with your 
Allegro installation: the filenames are in mixed caps, which means I can't 
apply the patch in Linux without editing it first.
More serious, however, and something I apprently didn't notice or comment 
on earlier, is that the patch does not contain C only versions of the new 
drawing modes. The patch is otherwise ok as far as I am concerned, but 
these have to be there if I want to apply the patch.
Do you think you can make a modified patch in time for friday (considering 
that I need time to prepare the release and need to have it tested by a 
few people as well)?

I've attached your original patch (for the new drawing modes) and the 
corresponding changes file. The second patch (removing power-of-two size 
restrictions) is post 4.2 anyway, so I prefer to deal with that sometime 
after friday :)

Again, sorry for neglecting to reply sooner :-/

Evert

--------------------------------
I've made modifications in allegro to create new drawing modes:

DRAW_MODE_SPRITE_PATTERN - It's the fusion of DRAW_MODE_COPY_PATTERN and 
  DRAW_MODE_MASKED_PATTERN modes, if the pixel of the pattern is the mask, 
it
  will be skiped, like DRAW_MODE_MASKED_PATTERN, but if it isn't, the pixel
  from the pattern will be ploted, like DRAW_MODE_COPY_PATTERN.

DRAW_MODE_AND - It's like the DRAW_MODE_XOR drawing mode, but instead of
  XOR'ing the pixel, this will AND the pixel.

DRAW_MODE_OR - It's like the DRAW_MODE_XOR drawing mode too, but instead of
  XOR'ing the pixel, this will OR the pixel.

Changed files:

  \include\allegro\draw.h -> Slightly modified (three lines) to define the 
new
      drawing modes.

  \src\c\cdefs8.h -> Modified the PATTERN_LINE() and GET_PATTERN_PIXEL()
      macros.

  \src\c\cdefs15.h -> Modified the PATTERN_LINE() and GET_PATTERN_PIXEL()
      macros.

  \src\c\cdefs16.h -> Modified the PATTERN_LINE() and GET_PATTERN_PIXEL()
      macros to eliminate the power-of-two-sized restriction.

  \src\c\cdefs24.h -> Modified the PATTERN_LINE() and GET_PATTERN_PIXEL()
      macros.

  \src\c\cdefs32.h -> Modified the PATTERN_LINE() and GET_PATTERN_PIXEL()
      macros.

  \src\c\cgfx.h -> Modified the behavior of the FUNC_LINEAR_PUTPIXEL() and
      FUNC_LINEAR_HLINE() functions (or maybe macros :-) to understand the 
new
      drawing modes.

  \src\i386\igfx8.s -> Modified the behavior of _linear_putpixel8() and
      _linear_hline8() functions to understand the new drawing modes.

  \src\i386\igfx15.s -> Modified the behavior of _linear_putpixel15() and
      _linear_hline15() functions to understand the new drawing modes.

  \src\i386\igfx16.s -> Modified the behavior of _linear_putpixel16() and
      _linear_hline16() functions to understand the new drawing modes.

  \src\i386\igfx24.s -> Modified the behavior of _linear_putpixel24() and
      _linear_hline24() functions to understand the new drawing modes.

  \src\i386\igfx32.s -> Modified the behavior of _linear_putpixel32() and
      _linear_hline32() functions to understand the new drawing modes.

  \src\misc\modexgfx.s -> Modified the behavior of _x_putpixel() and
      _x_hline() functions to understand the new drawing modes.

  \src\misc\asmdef.c -> Slightly modified (three lines) to understand the 
new
      drawing modes.

  \src\scene3d.c -> Slightly modified (one line) the init_poly() function 
to
      understand the DRAW_MODE_SPRITE_PATTERN mode.

By Victor Williams Stafusa da Silva - vwss1984 at yahoo dot com dot br

Attachment: Diff01.diff.gz
Description: GNU Zip compressed data



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/