Message-ID: <37D9D699.8BFA4EF6@gtcom.net> From: Krogg X-Mailer: Mozilla 4.61 [en] (Win95; U) X-Accept-Language: en-US,en-GB,en,ja MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: c,allegro,coolness.... Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 65 Date: Sat, 11 Sep 1999 00:12:09 -0400 NNTP-Posting-Host: 12.6.67.138 X-Trace: eagle.america.net 937023294 12.6.67.138 (Sat, 11 Sep 1999 00:14:54 EDT) NNTP-Posting-Date: Sat, 11 Sep 1999 00:14:54 EDT Organization: 24hoursupport.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Sorry if this is long winded but i dont know how to explain it in a shorter way...... I wanted to get a screen shot from a program i wrote yesterday.It draws a random IFS type fractal on the screen and if you press the [space] it clears the screen and draws another else it exits. I knoticed that pressing [print screen] would not capture the screen so i made the else part see if the key pressed was "c" and if so do this: save_pcx("ifs.pcx",screen,pallete); But after looking at the .pcx file i knoticed that it was not only the screen but the whole virtual screen that was saved....not exactaly what i wanted to happen...I read the allegro docs and it said try this instead: ===========begin snip from allegro docs=================== BITMAP *bmp; PALETTE pal; get_palette(pal); bmp = create_sub_bitmap(screen, 0, 0, SCREEN_W, SCREEN_H); save_bitmap("dump.pcx", bmp, pal); destroy_bitmap(bmp); =============end snip from allegro docs=================== Well,I am lazy so i decided to try this instead: save_pcx("ifs.pcx",create_sub_bitmap(screen, 0, 0, SCREEN_W, SCREEN_H),pallete); What a shortcut!...and,it worked great! Is there anything wrong with doing stuff like this? I mean,it worked,but is there some reason i shouldnt do this kind of thing? Anyway,this really makes me think that c and allegro are totaly cool. Be Cool, Krogg. -- |"""""<`.THE PRINCE ,'>"""""""""""""""""""""""""""""""""""| | `.`/""""""\,',' my sig is too big, | |SEE HIS ( / \ \' SEE HIS but its really cool. | | FACE \/<> <>\/ SMILE | | / W \ Visit my ascii art site: | | ,'\_|||||_/`. http://www.gtcom.net/~krogg/ascii/ | | ,',' ||| `.`. krogg DOT no DOT to DOT spam AT gtcom DOT net | |____<,' TIME TO DIE `.>____Remove no.to.spam to reply____|