summaryrefslogtreecommitdiff
path: root/src/uqm/build.h
blob: 4bf21cccc9381d4712196c8373a1e32de0131cbc (plain)
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
//Copyright Paul Reiche, Fred Ford. 1992-2002

/*
 *  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.
 *
 *  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 UQM_BUILD_H_
#define UQM_BUILD_H_

#include "races.h"
#include "displist.h"
#include "libs/compiler.h"

#if defined(__cplusplus)
extern "C" {
#endif

#define NAME_OFFSET 5
#define NUM_CAPTAINS_NAMES 16

#define PickCaptainName() (((COUNT)TFB_Random () \
								& (NUM_CAPTAINS_NAMES - 1)) \
								+ NAME_OFFSET)

extern HLINK Build (QUEUE *pQueue, SPECIES_ID SpeciesID);
extern HSHIPFRAG CloneShipFragment (COUNT shipIndex, QUEUE *pDstQueue,
		COUNT crew_level);
extern HLINK GetStarShipFromIndex (QUEUE *pShipQ, COUNT Index);
extern HSHIPFRAG GetEscortByStarShipIndex (COUNT index);
extern BYTE NameCaptain (QUEUE *pQueue, SPECIES_ID SpeciesID);

extern COUNT ActivateStarShip (COUNT which_ship, SIZE state);
extern COUNT GetIndexFromStarShip (QUEUE *pShipQ, HLINK hStarShip);
extern int SetEscortCrewComplement (COUNT which_ship, COUNT crew_level,
		BYTE captain);

extern COUNT AddEscortShips (COUNT race, SIZE count);
extern COUNT CalculateEscortsWorth (void);
//extern COUNT GetRaceKnownSize (COUNT race);
extern COUNT SetRaceAllied (COUNT race, BOOLEAN flag);
extern COUNT StartSphereTracking (COUNT race);
extern COUNT CountEscortShips (COUNT race);
extern BOOLEAN HaveEscortShip (COUNT race);
extern COUNT EscortFeasibilityStudy (COUNT race);
extern COUNT CheckAlliance (COUNT race);
extern COUNT RemoveSomeEscortShips (COUNT race, COUNT count);
extern void RemoveEscortShips (COUNT race);

extern RACE_DESC *load_ship (SPECIES_ID SpeciesID, BOOLEAN LoadBattleData);
extern void free_ship (RACE_DESC *RaceDescPtr, BOOLEAN FreeIconData,
		BOOLEAN FreeBattleData);

#if defined(__cplusplus)
}
#endif

#endif /* UQM_BUILD_H_ */