/*
            __
           / /_______________  ____  ___
          / __/ ___/ ___/ __ \/ __ \/ _ \
         / /_(__  ) /__/ /_/ / /_/ /  __/
         \__/____/\___/\____/ .___/\___/
                           /_/

    graphics modes and basic screen operations

    By Michael Stevens

    See license.html for copyright information
*/

#ifndef TSCOPE_SCREEN_H
#define TSCOPE_SCREEN_H

#ifdef __cplusplus
extern "C" {
#endif

    int ts_init();
    void ts_fatal(const char *format, ...);

    void ts_scrcfg(char *file);

    int ts_debug(int mode);

    int ts_refreshrate(int rate);
    int ts_colordepth(int depth);
    int ts_scrsize(int size);
    int ts_scrxy (int x, int y);
    int ts_scrmode(int mode);
    int ts_doublebuff(int mode);

    void ts_clrscr();
    void ts_scrdump();
    void ts_tobuff();
    void ts_toscr();
    void ts_clrbuff();
    void ts_blitbuff();

#ifdef __cplusplus
}
#endif

// screen modes
#ifdef ALLEGRO_WINDOWS
#define FULLSCREEN_ACCEL    GFX_DIRECTX_ACCEL
#define FULLSCREEN          GFX_DIRECTX_SOFT
#define WINDOW              GFX_AUTODETECT_WINDOWED
#endif

#ifdef ALLEGRO_LINUX
#define FULLSCREEN_ACCEL    GFX_AUTODETECT_FULLSCREEN
#define FULLSCREEN          GFX_AUTODETECT_FULLSCREEN
#define WINDOW              GFX_AUTODETECT_WINDOWED
#endif

#ifdef ALLEGRO_MACOSX
#define FULLSCREEN_ACCEL    GFX_QUARTZ_FULLSCREEN
#define FULLSCREEN          GFX_QUARTZ_FULLSCREEN
#define WINDOW              GFX_QUARTZ_WINDOW
#endif


// screen resolutions - industry standards
#define QVGA_X      320
#define QVGA_Y      240
#define VGA_X       640
#define VGA_Y       480
#define SVGA_X      800
#define SVGA_Y      600
#define XGA_X       1024
#define XGA_Y       768
#define XGAplus_X   1152
#define XGAplus_Y   864
#define SXGA_X      1280
#define SXGA_Y      1024
#define SXGAplus_X  1400
#define SXGAplus_Y  1050
#define UXGA_X      1600
#define UXGA_Y      1200
#define WXGA_X      1280
#define WXGA_Y      768
#define WXGAplus_X  1440
#define WXGAplus_Y  900
#define WSXGA_X     1600
#define WSXGA_Y     1024
#define WSXGAplus_X 1680
#define WSXGAplus_Y 1050
#define WUXGA_X     1920
#define WUXGA_Y     1200

// user defined screen resolution
#define USERDEFINED -1

// older resolutions
#define QVGA        0
#define VGA         1
#define SVGA        2

// normal resolutions
#define XGA         3
#define XGAplus     5
#define SXGA        7
#define SXGAplus    9
#define UXGA        11

// widescreen
#define WXGA        4
#define WXGAplus    6
#define WSXGA       8
#define WSXGAplus   10
#define WUXGA       12

// screen resolutions - tscope definitions// normal
#define SIZE0   QVGA
#define SIZE1   VGA
#define SIZE2   SVGA
#define SIZE3   XGA
#define SIZE4   XGAplus
#define SIZE5   SXGA
#define SIZE6   SXGAplus
#define SIZE7   UXGA

// widescreen
#define WSIZE3  WXGA
#define WSIZE4  WXGAplus
#define WSIZE5  WSXGA
#define WSIZE6  WSXGAplus
#define WSIZE7  WUXGA

// debug values
#define DEBUG0  0
#define DEBUG1  1
#define DEBUG2  2
#define DEBUG3  3
#define DEBUG4  4
#define DEBUG5  5

// double buffer settings
#define ON  1
#define OFF 0
#endif                          // TSCOPE_SCREEN_H


top
Persoonlijke pagina Universiteit GentTscope
Allegro | Cygwin | Gcc
© See license.html for copyright information