[AD] Bug in rotate_sprite_flip

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


Oops - I got the width and height muddled up when I flipped the sprite in rotate_sprite_flip (well, actually, Sven did, and I just copied it out of his e-mail)

This should fix it.

Andy 
--- src/oldrotate.c	Sat May  6 18:34:10 2000
+++ src/rotate.c	Sat May  6 18:33:24 2000
@@ -227,9 +227,9 @@
       f2y = f1y;
 
       if (h_flip)
-         f2x = itofix(sprite->h) - f2x - itofix(1);
+         f2x = itofix(sprite->w) - f2x - itofix(1);
       if (v_flip)
-         f2y = itofix(sprite->w) - f2y - itofix(1);
+         f2y = itofix(sprite->h) - f2y - itofix(1);
 
       if (is_linear_bitmap(bmp)) {           /* draw onto a linear bitmap */
 	 switch (bitmap_color_depth(bmp)) {
--
Bart's Blackboard Quote:
I will not spank others.

Andrew Geers
mailto:andy@xxxxxxxxxx
http://www.geerswj.clara.net



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