www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/15/07:39:51

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro 2.2 BETA available
Date: Fri, 14 Feb 1997 21:15:15 +0000
Organization: None
Distribution: world
Message-ID: <EjUyv+AjXNBzEwOI@talula.demon.co.uk>
References: <iYyLBDAD+2$yEwsh AT talula DOT demon DOT co DOT uk>
<5e23s3$19sg AT elmo DOT cadvision DOT com>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 21
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Calvin French writes:
>Hey Shawn one more thing. There is still a slight "glitch" in the
>sprite rotation function. This is simple to fix though. Anyways,
>shouldn't the sprite rotation function rotate the sprite *about* the
>x|y coords it is passed, not rotate the sprite with the ulc there?

I'm not sure this is a bug: maybe more of an obscure "feature" :-) If I
was designing it from scratch today, I would certainly use the position
as the centre of the rotation, but I don't think I should change it now,
because that would break too much code.

My original thinking was that calling rotate_sprite() with a zero angle
of rotation should be identical to draw_sprite(). If you prefer to
specify the centre position, it's easy enough to write a wrapper that
subtracts half the sprite width from the x position, and half the sprite
height from y...

/*
 *  Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
 *  Ghoti: 'gh' as in 'enough', 'o' as in 'women', and 'ti' as in 'nation'.
 */

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019