📄 m_boss31.pas
字号:
{----------------------------------------------------------------------------}
{ }
{ File(s): m_boss31.h }
{ }
{ Initial conversion by : Ben Watt (ben@delphigamedev.com) }
{ Initial conversion on : 10-March-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.) g_local.h and game.h }
{----------------------------------------------------------------------------}
{ * TODO: }
{ 1.) test compilation with the above two units }
{----------------------------------------------------------------------------}
{
==============================================================================
jorg
==============================================================================
}
unit m_boss31;
interface
const MODEL_SCALE = 1.000000;
var
sound_pain1,
sound_pain2,
sound_pain3,
sound_idle,
sound_death,
sound_search1,
sound_search2,
sound_search3,
sound_attack1,
sound_attack2,
sound_firegun,
sound_step_left,
sound_step_right,
sound_death_hit : Integer;
{$I g_local.inc}
{$I m_boss31.inc}
function SP_monster_makron(self : edict_t): extern;
function visible(self, other : edict_t): qboolean;
procedure jorg_search(self : edict_t);
var
r : single;
begin
r := random();
if r <= 0.3 then
gi.sound(self, CHAN_VOICE, sound_search1, 1, ATTN_NORM, 0)
else
if r <= 0.6 then
gi.sound(self, CHAN_VOICE, sound_search2, 1, ATTN_NORM, 0)
else
gi.sound(self, CHAN_VOICE, sound_search3, 1, ATTN_NORM, 0);
end;
//
// stand
//
const
jorg_frames_stand : Array[0..50] of mframe_t =
((aifunc:ai_stand; dist:0; thinkfunc:jorg_idle),
(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), // 10
(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), // 20
(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), // 30
(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:19; thinkfunc:nil),
(aifunc:ai_stand; dist:11; thinkfunc:jorg_step_left),
(aifunc:ai_stand; dist:0; thinkfunc:nil),
(aifunc:ai_stand; dist:0; thinkfunc:nil),
(aifunc:ai_stand; dist:6; thinkfunc:nil),
(aifunc:ai_stand; dist:9; thinkfunc:jorg_step_right),
(aifunc:ai_stand; dist:0; thinkfunc:nil), // 40
(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:-17; thinkfunc:jorg_step_left),
(aifunc:ai_stand; dist:0; thinkfunc:nil),
(aifunc:ai_stand; dist:-12; thinkfunc:nil), // 50
(aifunc:ai_stand; dist:-14; thinkfunc:jorg_step_right)); // 51
jorg_move_stand : mmove_t =
(firstframe:FRAME_stand01; lastframe:FRAME_stand51; frame:jorg_frames_stand; endfunc:nil);
procedure jorg_idle(self : edict_t);
begin
gi.sound(self, CHAN_VOICE, sound_idle, 1, ATTN_NORM,0);
end;
procedure jorg_death_hit(self : edict_t);
begin
gi.sound(self, CHAN_BODY, sound_death_hit, 1, ATTN_NORM,0);
end;
procedure jorg_step_left(self : edict_t);
begin
gi.sound(self, CHAN_BODY, sound_step_left, 1, ATTN_NORM,0);
end;
procedure jorg_step_right(self : edict_t);
begin
gi.sound(self, CHAN_BODY, sound_step_right, 1, ATTN_NORM,0);
end;
procedure jorg_stand(self : edict_t);
begin
self.monsterinfo.currentmove := jorg_move_stand;
end;
const
jorg_frames_run : Array[0..13] of mframe_t =
((aifunc:ai_run; dist:17; thinkfunc:jorg_step_left),
(aifunc:ai_run; dist:0; thinkfunc:nil),
(aifunc:ai_run; dist:0; thinkfunc:nil),
(aifunc:ai_run; dist:0; thinkfunc:nil),
(aifunc:ai_run; dist:12; thinkfunc:nil),
(aifunc:ai_run; dist:8; thinkfunc:nil),
(aifunc:ai_run; dist:10; thinkfunc:nil),
(aifunc:ai_run; dist:33; thinkfunc:jorg_step_right),
(aifunc:ai_run; dist:0; thinkfunc:nil),
(aifunc:ai_run; dist:0; thinkfunc:nil),
(aifunc:ai_run; dist:0; thinkfunc:nil),
(aifunc:ai_run; dist:9; thinkfunc:nil),
(aifunc:ai_run; dist:9; thinkfunc:nil),
(aifunc:ai_run; dist:9; thinkfunc:nil));
jorg_move_run : mmove_t =
(firstframe:FRAME_walk06; lastframe:FRAME_walk19; frame:jorg_frames_run; endfunc:nil);
//
// walk
//
jorg_frames_start_walk : Array[0..4] of mframe_t =
((aifunc:ai_walk; dist:5; thinkfunc:nil),
(aifunc:ai_walk; dist:6; thinkfunc:nil),
(aifunc:ai_walk; dist:7; thinkfunc:nil),
(aifunc:ai_walk; dist:9; thinkfunc:nil),
(aifunc:ai_walk; dist:15; thinkfunc:nil));
jorg_move_start_walk : mmove_t =
(firstframe:FRAME_walk01; lastframe:FRAME_walk05; frame:jorg_frames_start_walk; endfunc:nil);
jorg_frames_walk : Array[0..13] of mframe_t =
((aifunc:ai_walk; dist:17; thinkfunc:nil),
(aifunc:ai_walk; dist:0; thinkfunc:nil),
(aifunc:ai_walk; dist:0; thinkfunc:nil),
(aifunc:ai_walk; dist:0; thinkfunc:nil),
(aifunc:ai_walk; dist:12; thinkfunc:nil),
(aifunc:ai_walk; dist:8; thinkfunc:nil),
(aifunc:ai_walk; dist:10; thinkfunc:nil),
(aifunc:ai_walk; dist:33; thinkfunc:nil),
(aifunc:ai_walk; dist:0; thinkfunc:nil),
(aifunc:ai_walk; dist:0; thinkfunc:nil),
(aifunc:ai_walk; dist:0; thinkfunc:nil),
(aifunc:ai_walk; dist:9; thinkfunc:nil),
(aifunc:ai_walk; dist:9; thinkfunc:nil),
(aifunc:ai_walk; dist:9; thinkfunc:nil));
jorg_move_walk : mmove_t =
(firstframe:FRAME_walk06; lastframe:FRAME_walk19; frame:jorg_frames_walk; endfunc:nil);
jorg_frames_end_walk : Array[0..5] of mframe_t =
((aifunc:ai_walk; dist:11; thinkfunc:nil),
(aifunc:ai_walk; dist:0; thinkfunc:nil),
(aifunc:ai_walk; dist:0; thinkfunc:nil),
(aifunc:ai_walk; dist:0; thinkfunc:nil),
(aifunc:ai_walk; dist:8; thinkfunc:nil),
(aifunc:ai_walk; dist:-8; thinkfunc:nil));
jorg_move_end_walk : mmove_t =
(firstframe:FRAME_walk20; lastframe:FRAME_walk25; frame:jorg_frames_end_walk; endfunc:nil);
procedure jorg_walk(self : edict_t);
begin
self.monsterinfo.currentmove := jorg_move_walk;
end;
procedure jorg_run(self : edict_t);
begin
if (self.monsterinfo.aiflags and AI_STAND_GROUND) then
self.monsterinfo.currentmove := jorg_move_stand
else
self.monsterinfo.currentmove := jorg_move_run;
end;
const
jorg_frames_pain3 : Array[0..24] of mframe_t =
((aifunc:ai_move; dist:-28; thinkfunc:nil),
(aifunc:ai_move; dist:-6; thinkfunc:nil),
(aifunc:ai_move; dist:-3; thinkfunc:jorg_step_left),
(aifunc:ai_move; dist:-9; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:jorg_step_right),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:-7; thinkfunc:nil),
(aifunc:ai_move; dist:1; thinkfunc:nil),
(aifunc:ai_move; dist:-11; thinkfunc:nil),
(aifunc:ai_move; dist:-4; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:10; thinkfunc:nil),
(aifunc:ai_move; dist:11; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:10; thinkfunc:nil),
(aifunc:ai_move; dist:3; thinkfunc:nil),
(aifunc:ai_move; dist:10; thinkfunc:nil),
(aifunc:ai_move; dist:7; thinkfunc:jorg_step_left),
(aifunc:ai_move; dist:17; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:jorg_step_right));
jorg_move_pain3 : mmove_t =
(firstframe:FRAME_pain301; lastframe:FRAME_pain325; frame:jorg_frames_pain3; endfunc:jorg_run);
jorg_frames_pain2 : Array[0..2] of mframe_t =
((aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil));
jorg_move_pain2 : mmove_t =
(firstframe:FRAME_pain201; lastframe:FRAME_pain203; frame:jorg_frames_pain2; endfunc:jorg_run);
jorg_frames_pain1 : Array[0..2] of mframe_t =
((aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil));
jorg_move_pain1 : mmove_t =
(firstframe:FRAME_pain101; lastframe:FRAME_pain103; frame:jorg_frames_pain1; endfunc:jorg_run);
jorg_frames_death1 : Array[0..49] of mframe_t =
((aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil), // 10
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil), // 20
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil), // 30
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil), // 40
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:MakronToss),
(aifunc:ai_move; dist:0; thinkfunc:BossExplode)); // 50
jorg_move_death : mmove_t =
(firstframe:FRAME_death01; lastframe:FRAME_death50; frame:jorg_frames_death1; endfunc:jorg_dead);
jorg_frames_attack2 : Array[0..12] of mframe_t =
((aifunc:ai_charge; dist:0; thinkfunc:nil),
(aifunc:ai_charge; dist:0; thinkfunc:nil),
(aifunc:ai_charge; dist:0; thinkfunc:nil),
(aifunc:ai_charge; dist:0; thinkfunc:nil),
(aifunc:ai_charge; dist:0; thinkfunc:nil),
(aifunc:ai_charge; dist:0; thinkfunc:nil),
(aifunc:ai_charge; dist:0; thinkfunc:jorgBFG),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil),
(aifunc:ai_move; dist:0; thinkfunc:nil));
jorg_move_attack2 : mmove_t =
(firstframe:FRAME_attak201; lastframe:FRAME_attak213; frame:jorg_frames_attack2; endfunc:jorg_run);
jorg_frames_start_attack1 : Array[0..7] of mframe_t =
((aifunc:ai_charge; dist:0; thinkfunc:nil),
(aifunc:ai_charge; dist:0; thinkfunc:nil),
(aifunc:ai_charge; dist:0; thinkfunc:nil),
(aifunc:ai_charge; dist:0; thinkfunc:nil),
(aifunc:ai_charge; dist:0; thinkfunc:nil),
(aifunc:ai_charge; dist:0; thinkfunc:nil),
(aifunc:ai_charge; dist:0; thinkfunc:nil),
(aifunc:ai_charge; dist:0; thinkfunc:nil));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -