From: James W Sager Iii Newsgroups: comp.os.msdos.djgpp Subject: Allegro: rotate_sprite? Date: Fri, 20 Mar 1998 15:22:45 -0500 Organization: Junior, MCS Undeclared, Carnegie Mellon, Pittsburgh, PA Lines: 57 Message-ID: NNTP-Posting-Host: po8.andrew.cmu.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I had trouble using the allegro rotate_sprite command. I wanted to make a program to help me paint images for my game. My paint program lacks a rotation tool. I decided to code one up myself, but I couldn't get the rotate command to work. Can you look through my code, and see why the rotate command isn't working? //my helper functions :) #include "util1.h" //Pass 3 arguments: File to be converted, Degrees to be rotated s1-359 , Final file name void main(int argc, char *argv[]) { //Bunch of fun variables :) int a,b,c,i; char c3[30]; BITMAP *B,*C; FILE *f1; //catches if command line is done wrong if(argc!=4) { cout<<"Rotate usage:"< "<359 || a<1) { cout<<"Rotate usage:"< <1-359 degrees> "<w*150000)/100000,(B->h*150000)/100000); //inits the bitmap clear(C); //The actual rotation step. //It does nothing besides copy B onto C. rotate_sprite(C,B,0,0,a); save_pcx(argv[3],C,stndpal); }