delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/26/16:03:01

From: jerry AT eteklabs DOT nospam DOT com (Jerry Lawrence)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Writing Sprite Editor for Allegro Need help, (Source Included)
Date: Sun, 26 Apr 1998 15:35:24 -0400
Message-ID: <MPG.fad56813a9d0420989686@gateway>
References: <354346ed DOT 0 AT daisy DOT ans DOT com DOT au> <L4WF0BASL1Q1Ewev AT talula DOT demon DOT co DOT uk>
Organization: e-Tek Labs
NNTP-Posting-Host: dial-q-12.netacc.net
Lines: 24
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <L4WF0BASL1Q1Ewev AT talula DOT demon DOT co DOT uk>, 
Shawn AT talula DOT demon DOT co DOT uk says...
> WWynd's writes:

> 
> >Rotating a BMP 90degrees
> 
> You could use the Allegro rotate_sprite() function. Or, since this is
> fixed to a right angle, just make a loop that scans through an image
> calling getpixel(), and putpixel() to write each value to a new
> location: this rotation is just a matter of flipping the two axis.


Incidently, Shawn, at very low resolutions, ie 8x8 pixels, the sprite 
rotate functions lose a pixel row on the top and left side (i believe)
I am working on a arcade game graphics editor, AGE, which uses Allegro
as a graphics library, and I was adding a set of tools, rotate, slide,
flood fill, etc... and i found i could use the allegro analogs.  It
wa then that i found this rotate behavior.  I made a simple nested-for
to rotate it, lossless.

just thought yo might want to know.

	-jerry

- Raw text -


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