1 //------------------------------------------------------------------------- 2 /* 3 Copyright (C) 1997, 2005 - 3D Realms Entertainment 4 5 This file is part of Shadow Warrior version 1.2 6 7 Shadow Warrior is free software; you can redistribute it and/or 8 modify it under the terms of the GNU General Public License 9 as published by the Free Software Foundation; either version 2 10 of the License, or (at your option) any later version. 11 12 This program is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 16 See the GNU General Public License for more details. 17 18 You should have received a copy of the GNU General Public License 19 along with this program; if not, write to the Free Software 20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 22 Original Source: 1997 - Frank Maddin and Jim Norwood 23 Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms 24 */ 25 //------------------------------------------------------------------------- 26 27 // BOTS.H 28 // Contains useful header information for bot creation 29 30 #ifndef BOTS_H 31 #define BOTS_H 32 33 34 // BOT DEFINITIONS AND STRUCTURES 35 36 typedef enum 37 { 38 BOTstand, BOThide, BOTrun, BOTduck, BOTjump, BOTstrafe, BOTshoot, BOTuseinv, 39 BOTopen, BOTswimup, BOTswimdown, BOTturn, BOTuserts 40 } BOT_Actions; 41 42 // Linked lists containing node trees that are chosen based on desired actions 43 struct NODEstruct; 44 typedef struct NODEstruct NODE, *NODEp; 45 46 struct NODEstruct 47 { 48 NODEp p, l, r; // Pointers to tree nodes 49 int goalx, goaly, goalz; // x,y,z point bot wants to get to 50 BOT_Actions action; // Action to take if this node is reached 51 int tics; // Optionally stay in this node for x tics. 52 }; 53 54 struct NODETREEstruct; 55 typedef struct NODETREEstruct NODETREE, *NODETREEp; 56 57 struct NODETREEstruct 58 { 59 short SpriteNum; // Sprite number in sprite array of goal item 60 NODEp tree; // This is the node tree used to navigate to goal 61 BOOL Locked; // If list is locked, a bot is using/modifying it and 62 // other bots cannot modify it while it's locked 63 }; 64 65 // Bots main action variables 66 typedef struct BOT_BRAIN 67 { 68 short tgt_inv; // Inventory item it wants to use 69 short tgt_weapon; // Weapon in wants to activate and use 70 short tgt_enemy; // Enemy it wants to kill 71 short tgt_sprite; // Sprite it wants to pickup or operate 72 short tgt_sector; // Sector it wants to get to 73 short tgt_wall; // Wall it wants to touch 74 BOT_Actions action; // Bot's current action 75 } BotBrain, *BotBrain_p; 76 77 // NOTE: 78 // The following arrays should be saved off with save games! 79 80 // 0 = Item not accessible, no item of type was found 81 // 1 = Shuriken 82 // 3 = Caltrops 83 // 4 = Gas Bomb 84 // 5 = Flash Bomb 85 // 6 = Uzi Ammo 86 // 7 = Shotgun Ammo 87 // 8 = Rocket Ammo 88 // 9 = 40mm Ammo 89 // 10 = Sticky Bombs 90 // 11 = Rail Ammo 91 // 12 = Head Ammo 92 // 13 = Heart Ammo 93 // 14 = Uzi 94 // 15 = Shotgun 95 // 16 = Rocket Launcher 96 // 17 = 40mm Launcher 97 // 18 = Rail Gun 98 // 19 = Head 99 // 20 = Heart 100 // 21 = MedKit 101 // 22 = Armor 102 // 23 = Big Armor 103 // 24 = Portable MedKit 104 // 25 = Fortune Cookie 105 //////////////////////// 106 extern NODETREE BOT_TREELIST[25][50]; // There can be up to 50 of each item 107 // with a cooresponding search tree for each 108 109 #endif 110