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

📄 m_supertank.pas

📁 雷神之锤2(Quake2)Delphi源码
💻 PAS
📖 第 1 页 / 共 3 页
字号:
// PLEASE, don't modify this file
// 99% complete

{----------------------------------------------------------------------------}
{                                                                            }
{ File(s): m_supertank.c                                                     }
{                                                                            }
{ Initial conversion by : YgriK (Igor Karpov) - glYgriK@hotbox.ru            }
{ Initial conversion on : 25-Jan-2002                                        }
{                                                                            }
{ This File contains part of convertion of Quake2 source to ObjectPascal.    }
{ More information about this project can be found at:                       }
{ http://www.sulaco.co.za/quake2/                                            }
{                                                                            }
{ Copyright (C) 1997-2001 Id Software, Inc.                                  }
{                                                                            }
{ This program is free software; you can redistribute it and/or              }
{ modify it under the terms of the GNU General Public License                }
{ as published by the Free Software Foundation; either version 2             }
{ of the License, or (at your option) any later version.                     }
{                                                                            }
{ This program is distributed in the hope that it will be useful,            }
{ but WITHOUT ANY WARRANTY; without even the implied warranty of             }
{ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                       }
{                                                                            }
{ See the GNU General Public License for more details.                       }
{                                                                            }
{----------------------------------------------------------------------------}
{ Updated on :                                                               }
{ Updated by :                                                               }
{                                                                            }
{----------------------------------------------------------------------------}
{ * Still dependent (to compile correctly) on:                               }
{ 1) unit: g_local                                                           }
{ 2) unit: q_shared                                                          }
{ 3) unit: game                                                              }
{                                                                            }
{ .) unit: g_ai                                                              }
{                                                                            }
{ 1) inc:  m_supertank                                                       }
{                                                                            }
{----------------------------------------------------------------------------}
{ * TODO:                                                                    }
{ 1) Do more tests                                                           }
{                                                                            }
{----------------------------------------------------------------------------}


{*
==============================================================================

SUPERTANK

==============================================================================
*}

unit m_supertank;

interface

uses g_local;

procedure SP_monster_supertank (self : edict_p);

implementation

uses q_shared, game{, m_flash {, g_ai};

{$I 'm_supertank.inc'}




//REMOVE!!!
var
  gi : game_import_t;  //from G_LOCAL or G_MAIN;

type
  float = single;

//from G_AI
procedure ai_stand (self : edict_p; dist : float); cdecl;
begin
end;
procedure ai_walk (self : edict_p; dist : float); cdecl;
begin
end;
procedure ai_move (self : edict_p; dist : float); cdecl;
begin
end;
procedure ai_charge(self : edict_p; dist : float); cdecl;
begin
end;
procedure ai_run(self : edict_p; dist : float); cdecl;
begin
end;

//function fire_hit - from G_WEAPON or G_LOCAL

//from G_MISC or G_LOCAL
//proc ThrowHead
//proc ThrowGib

//from G_MONSTER or G_LOCAL
//proc walkmonster_start

//REMOVE!!!




//qboolean visible (edict_t *self, edict_t *other);

//static	int	tread_sound;
var
  sound_pain1,
  sound_pain2,
  sound_pain3,
  sound_death,
  sound_search1,
  sound_search2,
  tread_sound : integer;


procedure BossExplode (self : edict_p); cdecl; forward;
procedure supertank_dead (self : edict_p); cdecl; forward;
procedure supertankRocket (self : edict_p); cdecl; forward;
procedure supertankMachineGun (self : edict_p); cdecl; forward;
procedure supertank_reattack1 (self : edict_p); cdecl; forward;


procedure TreadSound (self : edict_p); cdecl;
begin
  gi.sound (self, CHAN_VOICE, tread_sound, 1, ATTN_NORM, 0);
end;//procedure

procedure supertank_search (self : edict_p);
begin
  if (random < 0.5)
  then gi.sound (self, CHAN_VOICE, sound_search1, 1, ATTN_NORM, 0)
  else gi.sound (self, CHAN_VOICE, sound_search2, 1, ATTN_NORM, 0);
end;//procedure


//
// stand
//

//mframe_t supertank_frames_stand []=
const
  supertank_frames_stand : array[0..59] of mframe_t = (
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil),
    (aifunc: ai_stand;  dist: 0;  thinkfunc: Nil) );
  supertank_move_stand : mmove_t =
    (firstframe: FRAME_stand_1;  lastframe: FRAME_stand_60;  frame: @supertank_frames_stand;  endfunc: Nil);

procedure supertank_stand (self : edict_p);
begin
  self.monsterinfo.currentmove := @supertank_move_stand;
end;//procedure


const
  supertank_frames_run : array [0..17] of mframe_t = (
    (aifunc: ai_run;  dist: 12;  thinkfunc: TreadSound),
    (aifunc: ai_run;  dist: 12;  thinkfunc: Nil),
    (aifunc: ai_run;  dist: 12;  thinkfunc: Nil),
    (aifunc: ai_run;  dist: 12;  thinkfunc: Nil),
    (aifunc: ai_run;  dist: 12;  thinkfunc: Nil),
    (aifunc: ai_run;  dist: 12;  thinkfunc: Nil),
    (aifunc: ai_run;  dist: 12;  thinkfunc: Nil),
    (aifunc: ai_run;  dist: 12;  thinkfunc: Nil),
    (aifunc: ai_run;  dist: 12;  thinkfunc: Nil),
    (aifunc: ai_run;  dist: 12;  thinkfunc: Nil),
    (aifunc: ai_run;  dist: 12;  thinkfunc: Nil),
    (aifunc: ai_run;  dist: 12;  thinkfunc: Nil),
    (aifunc: ai_run;  dist: 12;  thinkfunc: Nil),
    (aifunc: ai_run;  dist: 12;  thinkfunc: Nil),
    (aifunc: ai_run;  dist: 12;  thinkfunc: Nil),
    (aifunc: ai_run;  dist: 12;  thinkfunc: Nil),
    (aifunc: ai_run;  dist: 12;  thinkfunc: Nil),
    (aifunc: ai_run;  dist: 12;  thinkfunc: Nil) );
  supertank_move_run : mmove_t =
    (firstframe: FRAME_forwrd_1;  lastframe: FRAME_forwrd_18;  frame: @supertank_frames_run;  endfunc: Nil);

//
// walk
//

const
  supertank_frames_forward : array [0..17] of mframe_t = (
    (aifunc: ai_walk;  dist: 4;  thinkfunc: TreadSound),
    (aifunc: ai_walk;  dist: 4;  thinkfunc: Nil),
    (aifunc: ai_walk;  dist: 4;  thinkfunc: Nil),
    (aifunc: ai_walk;  dist: 4;  thinkfunc: Nil),
    (aifunc: ai_walk;  dist: 4;  thinkfunc: Nil),
    (aifunc: ai_walk;  dist: 4;  thinkfunc: Nil),
    (aifunc: ai_walk;  dist: 4;  thinkfunc: Nil),
    (aifunc: ai_walk;  dist: 4;  thinkfunc: Nil),
    (aifunc: ai_walk;  dist: 4;  thinkfunc: Nil),
    (aifunc: ai_walk;  dist: 4;  thinkfunc: Nil),
    (aifunc: ai_walk;  dist: 4;  thinkfunc: Nil),
    (aifunc: ai_walk;  dist: 4;  thinkfunc: Nil),
    (aifunc: ai_walk;  dist: 4;  thinkfunc: Nil),
    (aifunc: ai_walk;  dist: 4;  thinkfunc: Nil),
    (aifunc: ai_walk;  dist: 4;  thinkfunc: Nil),
    (aifunc: ai_walk;  dist: 4;  thinkfunc: Nil),
    (aifunc: ai_walk;  dist: 4;  thinkfunc: Nil),
    (aifunc: ai_walk;  dist: 4;  thinkfunc: Nil) );
  supertank_move_forward : mmove_t =

⌨️ 快捷键说明

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