📄 m_float.pas
字号:
// PLEASE, don't modify this file
// 99% complete
{----------------------------------------------------------------------------}
{ }
{ File(s): m_float.c }
{ }
{ Initial conversion by : YgriK (Igor Karpov) - glYgriK@hotbox.ru }
{ Initial conversion on : 01-Feb-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 }
{ 4) unit: m_flash }
{ }
{ .) unit: g_ai }
{ }
{ 1) inc: m_float }
{ }
{----------------------------------------------------------------------------}
{ * TODO: }
{ 1) Do more tests }
{ }
{----------------------------------------------------------------------------}
{*
==============================================================================
floater
==============================================================================
*}
unit m_float;
interface
uses g_local;
procedure SP_monster_floater (self : edict_p);
implementation
uses q_shared, game, m_flash {, g_ai};
{$I 'm_float.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!!!
//static int sound_Xxx;
var
sound_attack2,
sound_attack3,
sound_death1, a
sound_idle,
sound_pain1,
sound_pain2,
sound_sight : integer;
//procedure floater_sight (edict_t *self, edict_t *other);
procedure floater_sight (self, other : edict_p);
begin
gi.sound (self, CHAN_VOICE, sound_sight, 1, ATTN_NORM, 0);
end;//procedure
procedure floater_idle (self : edict_p);
begin
gi.sound (self, CHAN_VOICE, sound_idle, 1, ATTN_IDLE, 0);
end;//procedure
//void floater_stand1 (edict_t *self);
procedure floater_dead (self : edict_p); cdecl; forward;
//void floater_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point);*)
procedure floater_run (self : edict_p); cdecl; forward;
procedure floater_wham (self : edict_p); cdecl; forward;
procedure floater_zap (self : edict_p); cdecl; forward;
procedure floater_fire_blaster (self : edict_p); cdecl;
var
start,
forward_, right,
end_,
dir : vec3_t;
effect : integer;
begin
if ((self.s.frame = FRAME_attak104) OR (self.s.frame = FRAME_attak107))
then effect := EF_HYPERBLASTER
else effect := 0;
AngleVectors (self.s.angles, @forward_, @right, Nil);
//Y G_ProjectSource (self.s.origin, monster_flash_offset[MZ2_FLOAT_BLASTER_1], forward_, right, start);
VectorCopy (self.enemy.s.origin, end_);
end_[2] := end_[2] +self.enemy.viewheight;
VectorSubtract (end_, start, dir);
//Y monster_fire_blaster (self, start, dir, 1, 1000, MZ2_FLOAT_BLASTER_1, effect);
end;//procedure
const
floater_frames_stand1 : array [0..51] 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) );
floater_move_stand1 : mmove_t = (firstframe: FRAME_stand101; lastframe: FRAME_stand152; frame: @floater_frames_stand1; endfunc: Nil);
floater_frames_stand2 : array [0..51] 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),
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -