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

📄 aintern.inc

📁 著名的游戏开发库Allegro4.2.0 for DELPHI
💻 INC
📖 第 1 页 / 共 5 页
字号:
  _poly_zbuf_flat24: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_grgb24: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_atex24: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_ptex24: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_atex_mask24: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_ptex_mask24: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_atex_lit24: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_ptex_lit24: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_atex_mask_lit24: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_ptex_mask_lit24: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_atex_trans24: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_ptex_trans24: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_atex_mask_trans24: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_ptex_mask_trans24: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;

  _poly_scanline_grgb32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_scanline_atex32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_scanline_ptex32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_scanline_atex_mask32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_scanline_ptex_mask32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_scanline_atex_lit32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_scanline_ptex_lit32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_scanline_atex_mask_lit32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_scanline_ptex_mask_lit32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_scanline_atex_trans32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_scanline_ptex_trans32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_scanline_atex_mask_trans32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_scanline_ptex_mask_trans32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_flat32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_grgb32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_atex32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_ptex32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_atex_mask32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_ptex_mask32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_atex_lit32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_ptex_lit32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_atex_mask_lit32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_ptex_mask_lit32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_atex_trans32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_ptex_trans32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_atex_mask_trans32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;
  _poly_zbuf_ptex_mask_trans32: procedure(addr: p_uint8s; w: sint32; info: P_POLYGON_SEGMENT); cdecl;

  // sound lib stuff
  _midi_none: ^MIDI_DRIVER;
  _digi_volume: p_sint32;
  _midi_volume: p_sint32;
  _sound_flip_pan: p_sint32;
  _sound_hq: p_sint32;
  _sound_stereo: p_sint32;
  _sound_bits: p_sint32;
  _sound_freq: p_sint32;
  _sound_port: p_sint32;
  _sound_dma: p_sint32;
  _sound_irq: p_sint32;

  _sound_installed: p_sint32;
  _sound_input_installed: p_sint32;

  _midi_allocate_voice: function(min, max: sint32): sint32; cdecl;

threadvar
  _midi_tick: p_sint32;

var
  _digmid_find_patches: function(dir: PChar; dir_size: sint32; files: PChar; size_of_file: sint32): sint32; cdecl;

const
  VIRTUAL_VOICES = 256;

type
  P_VOICE = ^VOICE;
  VOICE = record        // a virtual (as seen by the user) soundcard voice
    sample    : P_SAMPLE; // which sample are we playing? (NULL = free)
    num       : sint32; // physical voice number (-1 = been killed off)
    autokill  : sint32; // set to free the voice when the sample finishes
    time      : sint32; // when we were started (for voice allocation)
    priority  : sint32; // how important are we?
  end;

  P_PHYS_VOICE = ^PHYS_VOICE;
  PHYS_VOICE = record   // a physical (as used by hardware) soundcard voice
    num         : sint32; // the virtual voice currently using me (-1 = free)
    playmode    : sint32; // are we looping?
    vol         : sint32; // current volume (fixed point .12)
    dvol        : sint32; // volume delta, for ramping
    target_vol  : sint32; // target volume, for ramping
    pan         : sint32; // current pan (fixed point .12)
    dpan        : sint32; // pan delta, for sweeps
    target_pan  : sint32; // target pan, for sweeps
    freq        : sint32; // current frequency (fixed point .12)
    dfreq       : sint32; // frequency delta, for sweeps
    target_freq : sint32; // target frequency, for sweeps
  end;

var
  _phys_voice: P_PHYS_VOICE;

const
  MIXER_DEF_SFX              = 8;
  MIXER_MAX_SFX              = 64;

var
  _mixer_init: function(bufsize, freq, stereo, is16bit: sint32; voices: p_sint32): sint32; cdecl;
  _mixer_exit: procedure; cdecl;
  _mix_some_samples: procedure(buf: p_uint8s; seg: uint16; issigned: sint32); cdecl;
  _mixer_init_voice: procedure(voice: sint32; const sample: P_SAMPLE); cdecl;
  _mixer_release_voice: procedure(voice: sint32); cdecl;
  _mixer_start_voice: procedure(voice: sint32); cdecl;
  _mixer_stop_voice: procedure(voice: sint32); cdecl;
  _mixer_loop_voice: procedure(voice, loopmode: sint32); cdecl;
  _mixer_get_position: function(voice: sint32): sint32; cdecl;
  _mixer_set_position: procedure(voice, position: sint32); cdecl;
  _mixer_get_volume: function(voice: sint32): sint32; cdecl;
  _mixer_set_volume: procedure(voice, volume: sint32); cdecl;
  _mixer_ramp_volume: procedure(voice, tyme, endvol: sint32); cdecl;
  _mixer_stop_volume_ramp: procedure(voice: sint32); cdecl;
  _mixer_get_frequency: function(voice: sint32): sint32; cdecl;
  _mixer_set_frequency: procedure(voice, frequency: sint32); cdecl;
  _mixer_sweep_frequency: procedure(voice, tyme, endfreq: sint32); cdecl;
  _mixer_stop_frequency_sweep: procedure(voice: sint32); cdecl;
  _mixer_get_pan: function(voice: sint32): sint32; cdecl;
  _mixer_set_pan: procedure(voice, pan: sint32); cdecl;
  _mixer_sweep_pan: procedure(voice, tyme, endpan: sint32); cdecl;
  _mixer_stop_pan_sweep: procedure(voice: sint32); cdecl;
  _mixer_set_echo: procedure(voice, strength, delay: sint32); cdecl;
  _mixer_set_tremolo: procedure(voice, rate, depth: sint32); cdecl;
  _mixer_set_vibrato: procedure(voice, rate, depth: sint32); cdecl;

  _dummy_noop1: procedure(p: sint32); cdecl;
  _dummy_noop2: procedure(p1, p2: sint32); cdecl;
  _dummy_noop3: procedure(p1, p2, p3: sint32); cdecl;
  _dummy_load_patches: function(const patches, drums: PChar): sint32; cdecl;
  _dummy_adjust_patches: procedure(const patches, drums: PChar); cdecl;
  _dummy_key_on: procedure(inst, note, bend, vol, pan: sint32); cdecl;

const
  // datafile ID's for compatibility with the old datafile format
  V1_DAT_MAGIC            = $616C6C2E;

  V1_DAT_DATA             = 0;
  V1_DAT_FONT             = 1;
  V1_DAT_BITMAP_16        = 2;
  V1_DAT_BITMAP_256       = 3;
  V1_DAT_SPRITE_16        = 4;
  V1_DAT_SPRITE_256       = 5;
  V1_DAT_PALETTE_16       = 6;
  V1_DAT_PALETTE_256      = 7;
  V1_DAT_FONT_8x8         = 8;
  V1_DAT_FONT_PROP        = 9;
  V1_DAT_BITMAP           = 10;
  V1_DAT_PALETTE          = 11;
  V1_DAT_SAMPLE           = 12;
  V1_DAT_MIDI             = 13;
  V1_DAT_RLE_SPRITE       = 14;
  V1_DAT_FLI              = 15;
  V1_DAT_C_SPRITE         = 16;
  V1_DAT_XC_SPRITE        = 17;

  OLD_FONT_SIZE           = 95;
  LESS_OLD_FONT_SIZE      = 224;

var
  // datafile object loading functions
  _unload_datafile_object: procedure(dat: P_DATAFILE); cdecl;

type
  // information about a datafile object
  P_DATAFILE_TYPE = ^DATAFILE_TYPE;
  DATAFILE_TYPE = record
    types   : sint32;
    load    : function(f: P_PACKFILE; size: sint32): Pointer; cdecl;
    destroy : procedure(p: Pointer); cdecl;
  end;

const
  MAX_DATAFILE_TYPES   = 32;

var
  _datafile_type: P_DATAFILE_TYPE;

  _compile_sprites: p_sint32;

  _construct_datafile: procedure(data: P_DATAFILE); cdecl;

// for readbmp.c
  _register_bitmap_file_type_init: procedure; cdecl;

// for readsmp.c 
  _register_sample_file_type_init: procedure; cdecl;

// for readfont.c 
  _register_font_file_type_init: procedure; cdecl;


type
  // for module linking system; see comment in allegro.c
  P_AL_LINKER_MIDI = ^__AL_LINKER_MIDI;
  __AL_LINKER_MIDI = record
    init : function: sint32; cdecl;
    exit : procedure; cdecl;
  end;

var
  _al_linker_midi: P_AL_LINKER_MIDI;

type
  P_AL_LINKER_MOUSE = ^__AL_LINKER_MOUSE;
  __AL_LINKER_MOUSE = record
    set_mouse_etc: procedure; cdecl;
    show_mouse: procedure(bmp: P_BITMAP); cdecl;
    mouse_screen_ptr: ^P_BITMAP;
  end;

var
  _al_linker_mouse: ^P_AL_LINKER_MOUSE;

type
  PP_DRIVER_INFO = ^P_DRIVER_INFO;

var
// dynamic driver lists
  _create_driver_list: function: P_DRIVER_INFO; cdecl;
  _destroy_driver_list: procedure(drvlist: P_DRIVER_INFO); cdecl;
  _driver_list_append_driver: procedure(drvlist: PP_DRIVER_INFO; id: sint32; driver: Pointer; autodetect: sint32); cdecl;
  _driver_list_prepend_driver: procedure(drvlist: PP_DRIVER_INFO; id: sint32; driver: Pointer; autodetect: sint32); cdecl;
  _driver_list_append_list: procedure(drvlist: PP_DRIVER_INFO; srclist: P_DRIVER_INFO); cdecl;

  // various libc stuff
  _al_sane_realloc: function(ptr: Pointer; size: sint32): Pointer; cdecl;
  _al_sane_strncpy: function(dest: PChar; const src: PChar; n: sint32): PChar; cdecl;

⌨️ 快捷键说明

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