Allegro Screen Shot Freezes

This is a discussion on Allegro Screen Shot Freezes within the Game Programming forums, part of the General Programming Boards category; BITMAP *bmp; PALETTE pal; if (key[KEY_P]) { get_palette(pal); bmp = create_sub_bitmap(screen, 0, 0, SCREEN_W, SCREEN_H); save_bitmap("dump.pcx", bmp, pal); destroy_bitmap(bmp); ScreenSaveNumber++; ...

  1. #1
    Registered User compjinx's Avatar
    Join Date
    Aug 2001
    Posts
    214

    Allegro Screen Shot Freezes

    BITMAP *bmp;
    PALETTE pal;


    if (key[KEY_P])
    {
    get_palette(pal);
    bmp = create_sub_bitmap(screen, 0, 0, SCREEN_W, SCREEN_H);
    save_bitmap("dump.pcx", bmp, pal);
    destroy_bitmap(bmp);
    ScreenSaveNumber++;
    }

    The Program Freezes and it DOES save an Image named dump.pcx, only it has only half of a screen shot.
    "The most overlooked advantage of owning a computer is that if they foul up there's no law against whacking them around a bit."
    Eric Porterfield.

  2. #2
    Registered User
    Join Date
    Oct 2001
    Posts
    375
    Hmm, try commenting out the line:
    bmp = create_sub_bitmap(screen, 0, 0, SCREEN_W, SCREEN_H);
    and see if that clears up the problem. I'm not sure the documentation on that part has been updated and I'm pretty sure it doesn't apply to Windows.
    Allegro precompiled Installer for Dev-C++, MSVC, and Borland: http://galileo.spaceports.com/~springs/

  3. #3
    Registered User compjinx's Avatar
    Join Date
    Aug 2001
    Posts
    214

    Hmmm...

    I forget all about this question, i had already fixed it but thanks anyways.
    "The most overlooked advantage of owning a computer is that if they foul up there's no law against whacking them around a bit."
    Eric Porterfield.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Feedback: Functional Specification Wording
    By Ragsdale85 in forum C++ Programming
    Replies: 0
    Last Post: 01-18-2006, 04:56 PM
  2. char copy
    By variable in forum C Programming
    Replies: 8
    Last Post: 02-06-2005, 10:18 PM
  3. i am not able to figure ot the starting point of this
    By youngashish in forum C++ Programming
    Replies: 7
    Last Post: 10-07-2004, 03:41 AM
  4. screen shot
    By muttski in forum Windows Programming
    Replies: 5
    Last Post: 10-30-2002, 04:10 PM
  5. Special Allegro Information
    By TechWins in forum Game Programming
    Replies: 12
    Last Post: 08-21-2002, 12:35 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21