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

📄 config.inc

📁 著名的游戏开发库Allegro4.2.0 for DELPHI
💻 INC
字号:
{*         ______   ___    ___
 *        /\  _  \ /\_ \  /\_ \
 *        \ \ \L\ \\//\ \ \//\ \      __     __   _ __   ___
 *         \ \  __ \ \ \ \  \ \ \   /'__`\ /'_ `\/\`'__\/ __`\
 *          \ \ \/\ \ \_\ \_ \_\ \_/\  __//\ \L\ \ \ \//\ \L\ \
 *           \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
 *            \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
 *                                           /\____/
 *                                           \_/__/
 *
 *      Configuration file access routines.
 *
 *      By Shawn Hargreaves.
 *
 *      See readme.txt for copyright information.
 *}
{$IFDEF ALLEGRO_INTERFACE}
type
  // config routines
  intgetter_ptr                 = function(const str: PChar; i: Integer): Integer; cdecl;
  strgetter_ptr                 = function(const str, s: PChar): PChar; cdecl;
  strsetter_ptr                 = procedure(const str, text: PChar); cdecl;

var
  set_config_file: procedure(const filename: PChar); cdecl;
  set_config_data: procedure(const data: p_uint8s; length: sint32); cdecl;
  override_config_file: procedure(const filename: PChar); cdecl;
  override_config_data: procedure(const data: p_uint8s; length: sint32); cdecl;
  flush_config_file: procedure; cdecl;
  reload_config_texts: procedure(const new_language: PChar); cdecl;

  push_config_state: procedure; cdecl;
  pop_config_state: procedure; cdecl;

  hook_config_section: procedure(const section: PChar; intgetter: intgetter_ptr;
    stringgetter: strgetter_ptr; stringsetter: strsetter_ptr); cdecl;

  config_is_hooked: function(const section: PChar): sint32;  cdecl;

  get_config_string: function(const section, name, def: PChar): PChar; cdecl;
  get_config_int: function(const section, name: PChar; def: sint32): sint32; cdecl;
  get_config_hex: function(const section, name: PChar; def: sint32): sint32; cdecl;
  get_config_float: function(const section, name: PChar; def: single): single; cdecl;
  get_config_id: function(const section, name: PChar; def: sint32): sint32; cdecl;
  get_config_argv: function(const section, name: PChar; argc: p_sint32): p_pchar; cdecl;
  get_config_text: function(const msg: PChar): PChar; cdecl;

  set_config_string: procedure(const section, name, val: PChar); cdecl;
  set_config_int: procedure(const section, name: PChar; val: sint32); cdecl;
  set_config_hex: procedure(const section, name: PChar; val: sint32); cdecl;
  set_config_float: procedure(const section, name: PChar; val: single); cdecl;
  set_config_id: procedure(const section, name: PChar; val: sint32); cdecl;
{$ENDIF ALLEGRO_INTERFACE}

{$IFDEF ALLEGRO_IMPLEMENTATION}
{$ENDIF ALLEGRO_IMPLEMENTATION}

{$IFDEF ALLEGRO_LOADVARIABLE}
  set_config_file            := LoadDLL('set_config_file');
  set_config_data            := LoadDLL('set_config_data');
  override_config_file       := LoadDLL('override_config_file');
  override_config_data       := LoadDLL('override_config_data');
  flush_config_file          := LoadDLL('flush_config_file');
  reload_config_texts        := LoadDLL('reload_config_texts');

  push_config_state          := LoadDLL('push_config_state');
  pop_config_state           := LoadDLL('pop_config_state');

  hook_config_section        := LoadDLL('hook_config_section');
  config_is_hooked           := LoadDLL('config_is_hooked');

  get_config_string          := LoadDLL('get_config_string');
  get_config_int             := LoadDLL('get_config_int');
  get_config_hex             := LoadDLL('get_config_hex');
  get_config_float           := LoadDLL('get_config_float');
  get_config_id              := LoadDLL('get_config_id');
  get_config_argv            := LoadDLL('get_config_argv');
  get_config_text            := LoadDLL('get_config_text');

  set_config_string          := LoadDLL('set_config_string');
  set_config_int             := LoadDLL('set_config_int');
  set_config_hex             := LoadDLL('set_config_hex');
  set_config_float           := LoadDLL('set_config_float');
  set_config_id              := LoadDLL('set_config_id');
{$ENDIF ALLEGRO_LOADVARIABLE}

⌨️ 快捷键说明

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