Overview -------- Here are described only functions you can use with an existing window (X window) or at graphic mode (console graphic library). For opening and closing the window, please see Initializing and ending functions. The functions ------------- int reopen_window(int arg1): this function has no effect with console graphic libraries. For X window it is used to resize an existing window, that means to use another scaling factor. If you want to distinguish between running with X window and console graphic libraries, use "#ifdef WINDOW_RESIZABLE". If defined, resizing is possible. Arguments: - arg1: scaling factor as for open_window() in arg2 (0: largest size for the actual screen) (VGAWINDOW_1: original size (draws 1 pixel per pixel)) (VGAWINDOW_2: scaling factor 2 (draws 4 pixel per pixel)) (VGAWINDOW_3: scaling factor 3 (draws 9 pixel per pixel)) (VGAWINDOW_FULL: full screen mode, can be added to the other values) (VGAWINDOW_NOSWITCH: don't switch to another mode in X window, can be added to the other values) Return value: 0=ok -1=error Example: // open window with scaling factor 1 and full screen if (open_window("MyWindow",VGAWINDOW_1+VGAWINDOW_FULL)==-1) { [...error...] } [ ... ] // reopen window with scaling factor 2 and full screen if (reopen_window(VGAWINDOW_2+VGAWINDOW_FULL)==-1) { [...error...] } void flush_window(): flush all graphical data to screen. All you put out with any graphic drawing function you have to flush with this function from backbuffer to screen to see it. Call this function only one time in your game loop, not more - it needs time. Example: flush_window();
Home | Previous: Initializing and ending functions | Next: Graphic box functions