⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 base.inc

📁 著名的游戏开发库Allegro4.2.0 for DELPHI
💻 INC
字号:
{*         ______   ___    ___
 *        /\  _  \ /\_ \  /\_ \
 *        \ \ \L\ \\//\ \ \//\ \      __     __   _ __   ___
 *         \ \  __ \ \ \ \  \ \ \   /'__`\ /'_ `\/\`'__\/ __`\
 *          \ \ \/\ \ \_\ \_ \_\ \_/\  __//\ \L\ \ \ \//\ \L\ \
 *           \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
 *            \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
 *                                           /\____/
 *                                           \_/__/
 *
 *      Base header, defines basic stuff needed by pretty much
 *      everything else.
 *
 *      By Shawn Hargreaves.
 *
 *      See readme.txt for copyright information.
 *}
{$IFDEF ALLEGRO_INTERFACE}
//#include "internal/alconfig.h"
const
  ALLEGRO_VERSION     = 4;
  ALLEGRO_SUB_VERSION = 2;
  ALLEGRO_WIP_VERSION = 0;
  ALLEGRO_VERSION_STR = '4.2.0';
  ALLEGRO_DATE_STR    = '2005';
  ALLEGRO_DATE        = 20051105;    // yyyymmdd
   
  AL_PI               = 3.14159265358979323846;
{*******************************************/
/************ Some global stuff ************/
/*******************************************}
//#define MIN(x,y)     (((x) < (y)) ? (x) : (y))
//#define MAX(x,y)     (((x) > (y)) ? (x) : (y))
//#define MID(x,y,z)   MAX((x), MIN((y), (z)))

//#undef ABS
//#define ABS(x)       (((x) >= 0) ? (x) : (-(x)))

//#undef SGN
//#define SGN(x)       (((x) >= 0) ? 1 : -1)

//#define AL_ID(a,b,c,d)     (((a)<<24) | ((b)<<16) | ((c)<<8) | (d))
type
  P_DRIVER_INFO = ^_DRIVER_INFO;
  _DRIVER_INFO = record         // info about a hardware driver
    id         : sint32;        // integer ID
    driver     : Pointer;       // the driver structure
    autodetect : sint32;        // set to allow autodetection
  end;

var
  allegro_errno: ^p_sint32s;    // int *
{$ENDIF ALLEGRO_INTERFACE}

{$IFDEF ALLEGRO_IMPLEMENTATION}
{$ENDIF ALLEGRO_IMPLEMENTATION}

{$IFDEF ALLEGRO_LOADVARIABLE}
  allegro_errno := GetProcAddress(allegro_handle, 'allegro_errno');
{$ENDIF ALLEGRO_LOADVARIABLE}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -