DEADSOFTWARE

added license info
[d2df-sdl.git] / src / game / g_monsters.pas
index 15790197f17980f45913930944a37349e8bec432..81829c6aea292a657ef5f86d3bfbb02b759cb62c 100644 (file)
@@ -1,3 +1,19 @@
+(* Copyright (C)  DooM 2D:Forever Developers
+ *
+ * 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 3 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *)
+{$MODE DELPHI}
 unit g_monsters;
 
 interface
@@ -158,7 +174,7 @@ implementation
 uses
   e_log, g_main, g_sound, g_gfx, g_player, g_game,
   g_weapons, g_triggers, MAPDEF, g_items, g_options,
-  g_console, g_map, Math, SysUtils, g_menu, WADEDITOR,
+  g_console, g_map, Math, SysUtils, g_menu, wadreader,
   g_language, g_netmsg;
 
 const
@@ -220,7 +236,7 @@ const
 
     (Name:'SERG'; Rect:(X:15; Y:8; Width:34; Height:52); Health:20;
      RunVel: 3; MinPain: 0; Pain: 10; Jump: 10),
-                                          
+
     (Name:'CYBER'; Rect:(X:24; Y:9; Width:80; Height:110); Health:500;
      RunVel: 5; MinPain: 50; Pain: 70; Jump: 10),
 
@@ -1051,7 +1067,7 @@ begin
             gMonsters[a].Update();
         end
         else
-          begin 
+          begin
             gMonsters[a].Free();
             gMonsters[a] := nil;
           end;
@@ -1416,7 +1432,7 @@ begin
   FWaitAttackAnim := False;
   FChainFire := False;
   FShellTimer := -1;
-  
+
   FState := STATE_SLEEP;
   FCurAnim := ANIM_SLEEP;
 
@@ -1790,7 +1806,7 @@ begin
         // Ýòî çíà÷èò: dX := -frameWidth - animDeltaX + hitX + hitWidth + hitX
         end;
       end
-    else // Ïðàâàÿ àíèìàöèÿ                    
+    else // Ïðàâàÿ àíèìàöèÿ
       begin
         dx := MONSTER_ANIMTABLE[FMonsterType].AnimDeltaRight[FCurAnim].X;
         dy := MONSTER_ANIMTABLE[FMonsterType].AnimDeltaRight[FCurAnim].Y;
@@ -1876,7 +1892,7 @@ begin
 
         FObj.Rect := MONSTERTABLE[FMonsterType].Rect;
         FHealth := MONSTERTABLE[FMonsterType].Health;
-        FAmmo := 0; 
+        FAmmo := 0;
         FPain := 0;
       end;
     else Exit;
@@ -1886,7 +1902,7 @@ begin
   if ForceAnim <> 255 then
     Anim := ForceAnim;
 
-// Åñëè àíèìàöèÿ íîâàÿ - ïåðåçàïóñêàåì å¸: 
+// Åñëè àíèìàöèÿ íîâàÿ - ïåðåçàïóñêàåì å¸:
   if FCurAnim <> Anim then
     if FAnim[Anim, FDirection] <> nil then
     begin
@@ -2272,7 +2288,7 @@ begin
               FDirection := D_LEFT
             else
               FDirection := D_RIGHT;
-              
+
             goto _end;
           end;
 
@@ -2675,7 +2691,7 @@ _end:
 
           FWaitAttackAnim := False;
         end
-        
+
       else // Àíèìàöèÿ àòàêè åùå èäåò (èñêëþ÷åíèå - Lost_Soul):
         if (FMonsterType = MONSTER_SOUL) or
            ( (not FWaitAttackAnim) and
@@ -3430,7 +3446,7 @@ _end:
 
           FWaitAttackAnim := False;
         end
-        
+
       else // Àíèìàöèÿ àòàêè åùå èäåò (èñêëþ÷åíèå - Lost_Soul):
         if (FMonsterType = MONSTER_SOUL) or
            ( (not FWaitAttackAnim) and
@@ -3451,7 +3467,7 @@ _end:
                   // Lost_Soul óêóñèë êîãî-òî => ïåðåõîäèò íà øàã:
                     if FMonsterType = MONSTER_SOUL then
                       SetState(STATE_GO);
-                          
+
                 MONSTER_FISH:
                   g_Weapon_Hit(@FObj, 10, FUID, HIT_SOME);
 
@@ -3528,7 +3544,7 @@ _end:
   if g_Obj_CollidePanel(@FObj, 0, 0, PANEL_LIFTLEFT or PANEL_LIFTRIGHT) and
      not ((FState = STATE_DEAD) or (FState = STATE_DIE))  then
     FObj.Vel.X := oldvelx;
-    
+
 // Åñëè åñòü àíèìàöèÿ, òî ïóñòü îíà èäåò:
   if FAnim[FCurAnim, FDirection] <> nil then
     FAnim[FCurAnim, FDirection].Update();