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

📄 draw.inc

📁 著名的游戏开发库Allegro4.2.0 for DELPHI
💻 INC
字号:
{*         ______   ___    ___
 *        /\  _  \ /\_ \  /\_ \
 *        \ \ \L\ \\//\ \ \//\ \      __     __   _ __   ___
 *         \ \  __ \ \ \ \  \ \ \   /'__`\ /'_ `\/\`'__\/ __`\
 *          \ \ \/\ \ \_\ \_ \_\ \_/\  __//\ \L\ \ \ \//\ \L\ \
 *           \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
 *            \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
 *                                           /\____/
 *                                           \_/__/
 *
 *      Drawing and sprite routines.
 *
 *      By Shawn Hargreaves.
 *
 *      See readme.txt for copyright information.
 *}
{$IFDEF ALLEGRO_INTERFACE}
const
  DRAW_MODE_SOLID            = 0;        // flags for drawing_mode() 
  DRAW_MODE_XOR              = 1;
  DRAW_MODE_COPY_PATTERN     = 2;
  DRAW_MODE_SOLID_PATTERN    = 3;
  DRAW_MODE_MASKED_PATTERN   = 4;
  DRAW_MODE_TRANS            = 5;

type
  doproc_ptr = procedure(bmp: P_BITMAP; a, b, c: sint32); cdecl;

var
  drawing_mode: procedure(mode: sint32; pattern: P_BITMAP; x_anchor, y_anchor: sint32); cdecl;
  xor_mode: procedure(ons: sint32); cdecl;
  solid_mode: procedure; cdecl;
  do_line: procedure(bmp: P_BITMAP; x1, y1, x2, y2, d: sint32; proc: doproc_ptr); cdecl;
  _soft_triangle: procedure(bmp: P_BITMAP; x1, y1, x2, y2, x3, y3, color: sint32); cdecl;
  _soft_polygon: procedure(bmp: P_BITMAP; vertices: sint32; const points: p_sint32s; color: sint32); cdecl;
  _soft_rect: procedure(bmp: P_BITMAP; x1, y1, x2, y2, color: sint32); cdecl;
  do_circle: procedure(bmp: P_BITMAP; x, y, radius, d: sint32; proc: doproc_ptr); cdecl;
  _soft_circle: procedure(bmp: P_BITMAP; x, y, radius, color: sint32); cdecl;
  _soft_circlefill: procedure(bmp: P_BITMAP; x, y, radius, color: sint32); cdecl;
  do_ellipse: procedure(bmp: P_BITMAP; x, y, rx, ry, d: sint32; proc: doproc_ptr); cdecl;
  _soft_ellipse: procedure(bmp: P_BITMAP; x, y, rx, ry, color: sint32); cdecl;
  _soft_ellipsefill: procedure(bmp: P_BITMAP; x, y, rx, ry, color: sint32); cdecl;
  do_arc: procedure(bmp: P_BITMAP; x, y: sint32; ang1, ang2: fixed; r, d: sint32; proc: doproc_ptr); cdecl;
  _soft_arc: procedure(bmp: P_BITMAP; x, y: sint32; ang1, ang2: fixed; r, color: sint32); cdecl;
  calc_spline: procedure(const points: spline_points; npts: sint32; var x, y: sint32); cdecl;
  _soft_spline: procedure(bmp: P_BITMAP; const points: spline_points; color: sint32); cdecl;
  _soft_floodfill: procedure(bmp: P_BITMAP; x, y, color: sint32); cdecl;
  blit: procedure(source, dest: P_BITMAP; source_x, source_y, dest_x, dest_y, width, height: sint32); cdecl;
  masked_blit: procedure(source, dest: P_BITMAP; source_x, source_y, dest_x, dest_y, width, height: sint32); cdecl;
  stretch_blit: procedure(source, dest: P_BITMAP; sx, sy, sw, sh, dx, dy, dw, dh: sint32); cdecl;
  masked_stretch_blit: procedure(source, dest: P_BITMAP; sx, sy, sw, sh, dx, dy, dw, dh: sint32); cdecl;
  stretch_sprite: procedure(bmp, sprite: P_BITMAP; x, y, w, h: sint32); cdecl;
  _soft_draw_gouraud_sprite: procedure(bmp, sprite: P_BITMAP; x, y, c1, c2, c3, c4: sint32); cdecl;
{$ENDIF ALLEGRO_INTERFACE}
{$IFDEF ALLEGRO_IMPLEMENTATION}
{$ENDIF ALLEGRO_IMPLEMENTATION}
{$IFDEF ALLEGRO_LOADVARIABLE}
  drawing_mode              := LoadDLL('drawing_mode');
  xor_mode                  := LoadDLL('xor_mode');
  solid_mode                := LoadDLL('solid_mode');
  do_line                   := LoadDLL('do_line');
  _soft_triangle            := LoadDLL('_soft_triangle');
  _soft_polygon             := LoadDLL('_soft_polygon');
  _soft_rect                := LoadDLL('_soft_rect');
  do_circle                 := LoadDLL('do_circle');
  _soft_circle              := LoadDLL('do_circle');
  _soft_circlefill          := LoadDLL('_soft_circlefill');
  do_ellipse                := LoadDLL('do_ellipse');
  _soft_ellipse             := LoadDLL('_soft_ellipse');
  _soft_ellipsefill         := LoadDLL('_soft_ellipsefill');
  do_arc                    := LoadDLL('do_arc');
  _soft_arc                 := LoadDLL('_soft_arc');
  calc_spline               := LoadDLL('calc_spline');
  _soft_spline              := LoadDLL('_soft_spline');
  _soft_floodfill           := LoadDLL('_soft_floodfill');
  blit                      := LoadDLL('blit');
  masked_blit               := LoadDLL('masked_blit');
  stretch_blit              := LoadDLL('stretch_blit');
  masked_stretch_blit       := LoadDLL('masked_stretch_blit');
  stretch_sprite            := LoadDLL('stretch_sprite');
  _soft_draw_gouraud_sprite := LoadDLL('_soft_draw_gouraud_sprite');
{$ENDIF ALLEGRO_LOADVARIABLE}

⌨️ 快捷键说明

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