bmap_for_screen (BMAP*, var modify, var delay);

Grabs the screen image into a bitmap. The bitmap can then be displayed as a button or window in a panel, to indicate screenshots of saved games.


BMAP* - pointer to a BMAP of the desired size.
modify - 1 for marking the bitmap as modified for game_save instructions (slower).
delay - 1 for immediately grabbing the screen, 0 for waiting for the next screen update.


BMAP* pointer if successful, 0 otherwise.


BMAP* - the content will be overwritten by the screenshot. The bitmap will be marked as modified for game_save instructions.





BMAP* screen_shot_map = "emptypanel.pcx";

// copies the screen into a bitmap and saves the modified bmap in the game score
function grab_screen() {
  bmap_for_screen (screen_shot_map, 1, 0);   
  wait (1);  // wait 1 frame until the bitmap can be saved
  game_save (app_name, 0, SV_INFO + SV_BMAPS);

See also:

file_for_screen, game_save ► latest version online