File: saiint.h

package info (click to toggle)
xscorch 0.2.0-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 4,636 kB
  • ctags: 3,399
  • sloc: ansic: 31,504; sh: 8,826; makefile: 467; perl: 16
file content (90 lines) | stat: -rw-r--r-- 3,640 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/* $Header: /fridge/cvs/xscorch/sai/saiint.h,v 1.15 2004/02/26 06:34:54 justins Exp $ */
/*

   xscorch - saiint.h         Copyright(c) 2001,2000 Justin David Smith
                              Copyright(c) 2002 Jacob Luna Lundberg
   justins(at)chaos2.org      http://chaos2.org/
   jacob(at)chaos2.org        http://chaos2.org/~jacob

   Internal header file for AI code


   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, version 2 of the License ONLY. 

   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, write to the Free Software Foundation, 
   Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

*/
#ifndef __saiint_h_included
#define __saiint_h_included


/* Includes */
#include <sai.h>           /* AI basic header */


/* Structures */
struct _sc_config;


/* Debugging definitions */
#define  SC_AI_DEBUG_BUY         0
#define  SC_AI_DEBUG_TRAJECTORY  0
#define  SC_AI_DEBUG_SELECT      0
#define  SC_AI_DEBUG_VICTIMS     0
#define  SC_AI_DEBUG_SCAN        0


/* General definitions */
#define  SC_AI_POWER_DELTA_MAX   100   /* Maximum change in power */
#define  SC_AI_ANGLE_DELTA_MAX   60    /* Maximum change in angle */
#define  SC_AI_COMPENSATE_DELTA  8     /* Compensation for shields */

/* Definitions specific to moron */
#define  SC_AI_MORON_MIN_POWER   200   /* Minimum permitted power */

/* Definitions specific to shooter */
#define  SC_AI_SHOOTER_START_A   3     /* Start angle for shooter */
#define  SC_AI_SHOOTER_DELTA_A   45    /* Delta angle (no line-of-sight) */
#define  SC_AI_SHOOTER_SIGHT_A   70    /* Sight angle (if we have line-of-sight) */

/* Constants for scan refinement */
#define  SC_AI_SCAN_MIN_POWER    200   /* Minimum permitted refinement power */


/* Definitions used by the validation */
#define  SC_AI_VALIDATE_DIST     100   /* Distance to validate trajectory to */


/* Budget concerns */
#define  SC_AI_CONSERVATIVE_BUDGET  0.10  /* Conservative budget (naive) */
#define  SC_AI_AGGRESSIVE_BUDGET    0.30  /* Aggressive budget (naive) */
#define  SC_AI_BUY_MAX_OF_WEAPON    3     /* Maximum amt of one weapon to buy */
#define  SC_AI_BUY_MAX_OF_ACCESSORY 1     /* Maximum amt of one acces. to buy */
#define  SC_AI_INVENTORY_HIGH       2     /* AI target purchase in bundles */
#define  SC_AI_MAX_BATTERIES        30    /* Maximum number of batteries to buy */


/* AI prediction for trajectory selection */
#define  SC_AI_WILL_OFFSET(c, p)    ( (c)->aicontrol->allowoffsets &&	\
                                     ((c)->aicontrol->alwaysoffset ||	\
                                      (p)->shield != NULL) )


/* Trajectory selection code */
bool sc_ai_trajectory(const struct _sc_config *c, struct _sc_player *p, const struct _sc_player *victim);
bool sc_ai_trajectory_line(const struct _sc_config *c, struct _sc_player *p, const struct _sc_player *victim);
bool sc_ai_trajectory_wind(const struct _sc_config *c, struct _sc_player *p, const struct _sc_player *victim);
bool sc_ai_trajectory_line_wind(const struct _sc_config *c, struct _sc_player *p, const struct _sc_player *victim);
bool sc_ai_trajectory_scan(const struct _sc_config *c, struct _sc_player *p, const struct _sc_player *victim);


#endif /* __saiint_h_included? */