Cleanups, docs, header file dependancy removal.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1457 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -2188,6 +2188,10 @@ SOURCE=..\sc2code\planets\surface.c
|
||||
# Begin Group "ships"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\sc2code\ships\ship.h
|
||||
# End Source File
|
||||
# Begin Group "androsyn"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include "starcon.h"
|
||||
#include "collide.h"
|
||||
|
||||
//#define DEBUG_COLLIDE
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#ifndef _COLLIDE_H
|
||||
#define _COLLIDE_H
|
||||
|
||||
#include "element.h"
|
||||
|
||||
#define COLLISION_TURN_WAIT 1
|
||||
#define COLLISION_THRUST_WAIT 3
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include "starcon.h"
|
||||
#include "collide.h"
|
||||
|
||||
//#define DEBUG_CYBORG
|
||||
|
||||
|
||||
@@ -19,6 +19,11 @@
|
||||
#ifndef _ELEMENT_H
|
||||
#define _ELEMENT_H
|
||||
|
||||
#include "displist.h"
|
||||
#include "velocity.h"
|
||||
#include "libs/gfxlib.h"
|
||||
#include "libs/sndlib.h"
|
||||
|
||||
#define BATTLE_FRAME_RATE (ONE_SECOND / 24)
|
||||
|
||||
#define SHIP_INFO_HEIGHT 65
|
||||
@@ -160,6 +165,8 @@ extern BOOLEAN DeltaEnergy (ELEMENTPTR ElementPtr, SIZE
|
||||
extern BOOLEAN DeltaCrew (ELEMENTPTR ElementPtr, SIZE
|
||||
crew_delta);
|
||||
|
||||
// XXX: To be moved to some separate file.
|
||||
// Don't forget to remove the '#include "libs/sndlib.h"'
|
||||
extern void PlaySound (SOUND S, SoundPosition Pos,
|
||||
ELEMENTPTR PositionalObject, BYTE Priority);
|
||||
extern void ProcessSound (SOUND Sound, ELEMENTPTR PositionalObject);
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include "starcon.h"
|
||||
#include "collide.h"
|
||||
|
||||
//#define DEBUG_GRAVITY
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include "starcon.h"
|
||||
#include "collide.h"
|
||||
#include "libs/graphics/gfx_common.h"
|
||||
|
||||
//Added by Chris
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include "starcon.h"
|
||||
#include "collide.h"
|
||||
|
||||
void
|
||||
NotifyOthers (COUNT which_race, BYTE target_loc)
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include "starcon.h"
|
||||
#include "collide.h"
|
||||
#include "libs/graphics/gfx_common.h"
|
||||
#include "libs/graphics/drawable.h"
|
||||
#include "libs/graphics/drawcmd.h"
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include "starcon.h"
|
||||
#include "collide.h"
|
||||
|
||||
void
|
||||
animation_preprocess (PELEMENT ElementPtr)
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/androsyn/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define MAX_CREW 20
|
||||
#define MAX_ENERGY 24
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/arilou/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define MAX_CREW 6
|
||||
#define MAX_ENERGY 20
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/blackurq/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define MAX_CREW MAX_CREW_SIZE
|
||||
#define MAX_ENERGY MAX_ENERGY_SIZE
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/chenjesu/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define MAX_CREW 36
|
||||
#define MAX_ENERGY 30
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/chmmr/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define MAX_CREW MAX_CREW_SIZE
|
||||
#define MAX_ENERGY MAX_ENERGY_SIZE
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/druuge/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define MAX_CREW 14
|
||||
#define MAX_ENERGY 32
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/human/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define MAX_CREW 18
|
||||
#define MAX_ENERGY 18
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/ilwrath/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define MAX_CREW 22
|
||||
#define MAX_ENERGY 16
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/lastbat/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define num_generators characteristics.max_thrust
|
||||
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/melnorme/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define MAX_CREW 20
|
||||
#define MAX_ENERGY MAX_ENERGY_SIZE
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/mmrnmhrm/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define MAX_CREW 20
|
||||
#define MAX_ENERGY 10
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/mycon/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define MAX_CREW 20
|
||||
#define MAX_ENERGY 40
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/orz/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define MAX_CREW 16
|
||||
#define MAX_ENERGY 20
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/pkunk/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define MAX_CREW 8
|
||||
#define MAX_ENERGY 12
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/probe/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define MAX_CREW 1
|
||||
#define MAX_ENERGY 1
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file contains definitions that are common to all ship files.
|
||||
*/
|
||||
|
||||
#ifndef _SHIP_H
|
||||
#define _SHIP_H
|
||||
|
||||
#include "collide.h"
|
||||
|
||||
// XXX: Do we really need this one?
|
||||
#include "reslib.h"
|
||||
|
||||
// XXX: Remove this one later.
|
||||
#include "starcon.h"
|
||||
|
||||
#endif /* _SHIP_H */
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/shofixti/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define MAX_CREW 6
|
||||
#define MAX_ENERGY 4
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/sis_ship/resinst.h"
|
||||
#include "starcon.h"
|
||||
#include "controls.h"
|
||||
|
||||
#define MAX_TRACKING 3
|
||||
|
||||
@@ -16,10 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/slylandr/resinst.h"
|
||||
#include "starcon.h"
|
||||
#include "element.h"
|
||||
|
||||
#define MAX_CREW 12
|
||||
#define MAX_ENERGY 20
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/spathi/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define MAX_CREW 30
|
||||
#define MAX_ENERGY 10
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/supox/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define MAX_CREW 12
|
||||
#define MAX_ENERGY 16
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/syreen/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define SYREEN_MAX_CREW_SIZE MAX_CREW_SIZE
|
||||
#define MAX_CREW 12
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/thradd/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define MAX_CREW 8
|
||||
#define MAX_ENERGY 24
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/umgah/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define MAX_CREW 10
|
||||
#define MAX_ENERGY 30
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/urquan/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define MAX_CREW MAX_CREW_SIZE
|
||||
#define MAX_ENERGY MAX_ENERGY_SIZE
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/utwig/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define MAX_CREW 20
|
||||
#define MAX_ENERGY 20
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/vux/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define MAX_CREW 20
|
||||
#define MAX_ENERGY 40
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/yehat/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define MAX_CREW 20
|
||||
#define MAX_ENERGY 10
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "reslib.h"
|
||||
#include "ships/ship.h"
|
||||
#include "ships/zoqfot/resinst.h"
|
||||
#include "starcon.h"
|
||||
|
||||
#define MAX_CREW 10
|
||||
#define MAX_ENERGY 10
|
||||
|
||||
@@ -68,7 +68,6 @@ extern int ScreenHeight;
|
||||
#include "element.h"
|
||||
#include "races.h"
|
||||
#include "weapon.h"
|
||||
#include "collide.h"
|
||||
#include "build.h"
|
||||
#include "intel.h"
|
||||
#include "sounds.h"
|
||||
@@ -219,18 +218,11 @@ extern void ToggleSoundEffect (void);
|
||||
extern void PlaySoundEffect (SOUND S, COUNT Channel, SoundPosition Pos,
|
||||
void *PositionalObject, BYTE Priority);
|
||||
|
||||
extern BOOLEAN CopyProtection (void);
|
||||
|
||||
/* dummy.c */
|
||||
extern void SetSoundTracking (BOOLEAN toggle);
|
||||
extern void GetSoundTrackingBuf (PSBYTE pdigi_buf);
|
||||
|
||||
extern void StopVid (void);
|
||||
extern void PlayVid (MEM_HANDLE VidRef, BOOLEAN Continuous);
|
||||
extern MEM_HANDLE LoadVidFile (PSTR pStr);
|
||||
extern MEM_HANDLE LoadVidInstance (DWORD res);
|
||||
//extern MEM_HANDLE VidPlaying (void); // superseeded by VIDEO_REF version
|
||||
extern BOOLEAN DestroyVid (MEM_HANDLE VidRef);
|
||||
|
||||
extern DRAWABLE CreatePixmapRegion (FRAME Frame, PPOINT pOrg, SIZE width,
|
||||
SIZE height);
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include "starcon.h"
|
||||
#include "collide.h"
|
||||
|
||||
BOOLEAN
|
||||
OpponentAlive (STARSHIPPTR TestStarShipPtr)
|
||||
@@ -401,6 +402,9 @@ spawn_ion_trail (PELEMENT ElementPtr)
|
||||
}
|
||||
}
|
||||
|
||||
// Preprocess function for spawning a ship into or out of battle.
|
||||
// Used when a new ship warps in, or a ship escapes by warping out, but not
|
||||
// when a Pkunk ship is reborn.
|
||||
void
|
||||
ship_transition (PELEMENT ElementPtr)
|
||||
{
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#define _VELOCITY_H
|
||||
|
||||
#include <string.h> /* for memset */
|
||||
#include "libs/gfxlib.h"
|
||||
|
||||
typedef struct velocity_desc
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user