From 49f337538a7a6a93cc86b0eb66a88932ce1f9d61 Mon Sep 17 00:00:00 2001 From: meep-eep Date: Tue, 18 Jan 2005 11:37:38 +0000 Subject: [PATCH] Cleanups, docs, header file dependancy removal. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1457 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/msvc++/UrQuanMasters.dsp | 4 +++ sc2/src/sc2code/collide.c | 1 + sc2/src/sc2code/collide.h | 2 ++ sc2/src/sc2code/cyborg.c | 1 + sc2/src/sc2code/element.h | 7 +++++ sc2/src/sc2code/gravity.c | 1 + sc2/src/sc2code/hyper.c | 1 + sc2/src/sc2code/ipdisp.c | 1 + sc2/src/sc2code/process.c | 1 + sc2/src/sc2code/ship.c | 1 + sc2/src/sc2code/ships/androsyn/androsyn.c | 3 +-- sc2/src/sc2code/ships/arilou/arilou.c | 3 +-- sc2/src/sc2code/ships/blackurq/blackurq.c | 3 +-- sc2/src/sc2code/ships/chenjesu/chenjesu.c | 3 +-- sc2/src/sc2code/ships/chmmr/chmmr.c | 3 +-- sc2/src/sc2code/ships/druuge/druuge.c | 3 +-- sc2/src/sc2code/ships/human/human.c | 3 +-- sc2/src/sc2code/ships/ilwrath/ilwrath.c | 3 +-- sc2/src/sc2code/ships/lastbat/lastbat.c | 3 +-- sc2/src/sc2code/ships/melnorme/melnorme.c | 3 +-- sc2/src/sc2code/ships/mmrnmhrm/mmrnmhrm.c | 3 +-- sc2/src/sc2code/ships/mycon/mycon.c | 3 +-- sc2/src/sc2code/ships/orz/orz.c | 3 +-- sc2/src/sc2code/ships/pkunk/pkunk.c | 3 +-- sc2/src/sc2code/ships/probe/probe.c | 3 +-- sc2/src/sc2code/ships/ship.h | 33 +++++++++++++++++++++++ sc2/src/sc2code/ships/shofixti/shofixti.c | 3 +-- sc2/src/sc2code/ships/sis_ship/sis_ship.c | 3 +-- sc2/src/sc2code/ships/slylandr/slylandr.c | 4 +-- sc2/src/sc2code/ships/spathi/spathi.c | 3 +-- sc2/src/sc2code/ships/supox/supox.c | 3 +-- sc2/src/sc2code/ships/syreen/syreen.c | 3 +-- sc2/src/sc2code/ships/thradd/thradd.c | 3 +-- sc2/src/sc2code/ships/umgah/umgah.c | 3 +-- sc2/src/sc2code/ships/urquan/urquan.c | 3 +-- sc2/src/sc2code/ships/utwig/utwig.c | 3 +-- sc2/src/sc2code/ships/vux/vux.c | 3 +-- sc2/src/sc2code/ships/yehat/yehat.c | 3 +-- sc2/src/sc2code/ships/zoqfot/zoqfot.c | 3 +-- sc2/src/sc2code/starcon.h | 8 ------ sc2/src/sc2code/tactrans.c | 4 +++ sc2/src/sc2code/velocity.h | 1 + 42 files changed, 86 insertions(+), 65 deletions(-) create mode 100644 sc2/src/sc2code/ships/ship.h diff --git a/sc2/src/msvc++/UrQuanMasters.dsp b/sc2/src/msvc++/UrQuanMasters.dsp index f0ce715c0..781dccb19 100644 --- a/sc2/src/msvc++/UrQuanMasters.dsp +++ b/sc2/src/msvc++/UrQuanMasters.dsp @@ -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 "" diff --git a/sc2/src/sc2code/collide.c b/sc2/src/sc2code/collide.c index 23a5c35ac..10fdb05e0 100644 --- a/sc2/src/sc2code/collide.c +++ b/sc2/src/sc2code/collide.c @@ -17,6 +17,7 @@ */ #include "starcon.h" +#include "collide.h" //#define DEBUG_COLLIDE diff --git a/sc2/src/sc2code/collide.h b/sc2/src/sc2code/collide.h index 1821a33a9..6b00706fb 100644 --- a/sc2/src/sc2code/collide.h +++ b/sc2/src/sc2code/collide.h @@ -19,6 +19,8 @@ #ifndef _COLLIDE_H #define _COLLIDE_H +#include "element.h" + #define COLLISION_TURN_WAIT 1 #define COLLISION_THRUST_WAIT 3 diff --git a/sc2/src/sc2code/cyborg.c b/sc2/src/sc2code/cyborg.c index ee9586f39..d14c9cf2a 100644 --- a/sc2/src/sc2code/cyborg.c +++ b/sc2/src/sc2code/cyborg.c @@ -17,6 +17,7 @@ */ #include "starcon.h" +#include "collide.h" //#define DEBUG_CYBORG diff --git a/sc2/src/sc2code/element.h b/sc2/src/sc2code/element.h index 8fb47390e..4378307f2 100644 --- a/sc2/src/sc2code/element.h +++ b/sc2/src/sc2code/element.h @@ -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); diff --git a/sc2/src/sc2code/gravity.c b/sc2/src/sc2code/gravity.c index 90b8171ae..e93e5d465 100644 --- a/sc2/src/sc2code/gravity.c +++ b/sc2/src/sc2code/gravity.c @@ -17,6 +17,7 @@ */ #include "starcon.h" +#include "collide.h" //#define DEBUG_GRAVITY diff --git a/sc2/src/sc2code/hyper.c b/sc2/src/sc2code/hyper.c index 298c0135b..c472e09e0 100644 --- a/sc2/src/sc2code/hyper.c +++ b/sc2/src/sc2code/hyper.c @@ -17,6 +17,7 @@ */ #include "starcon.h" +#include "collide.h" #include "libs/graphics/gfx_common.h" //Added by Chris diff --git a/sc2/src/sc2code/ipdisp.c b/sc2/src/sc2code/ipdisp.c index dc8972adc..933babce6 100644 --- a/sc2/src/sc2code/ipdisp.c +++ b/sc2/src/sc2code/ipdisp.c @@ -17,6 +17,7 @@ */ #include "starcon.h" +#include "collide.h" void NotifyOthers (COUNT which_race, BYTE target_loc) diff --git a/sc2/src/sc2code/process.c b/sc2/src/sc2code/process.c index fca6a4bad..c586e62b2 100644 --- a/sc2/src/sc2code/process.c +++ b/sc2/src/sc2code/process.c @@ -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" diff --git a/sc2/src/sc2code/ship.c b/sc2/src/sc2code/ship.c index fe7ecd15a..3e9e1832d 100644 --- a/sc2/src/sc2code/ship.c +++ b/sc2/src/sc2code/ship.c @@ -17,6 +17,7 @@ */ #include "starcon.h" +#include "collide.h" void animation_preprocess (PELEMENT ElementPtr) diff --git a/sc2/src/sc2code/ships/androsyn/androsyn.c b/sc2/src/sc2code/ships/androsyn/androsyn.c index cf4058baa..b43ac22a7 100644 --- a/sc2/src/sc2code/ships/androsyn/androsyn.c +++ b/sc2/src/sc2code/ships/androsyn/androsyn.c @@ -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 diff --git a/sc2/src/sc2code/ships/arilou/arilou.c b/sc2/src/sc2code/ships/arilou/arilou.c index fdc015fb6..37281c664 100644 --- a/sc2/src/sc2code/ships/arilou/arilou.c +++ b/sc2/src/sc2code/ships/arilou/arilou.c @@ -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 diff --git a/sc2/src/sc2code/ships/blackurq/blackurq.c b/sc2/src/sc2code/ships/blackurq/blackurq.c index 22af128de..c514232d7 100644 --- a/sc2/src/sc2code/ships/blackurq/blackurq.c +++ b/sc2/src/sc2code/ships/blackurq/blackurq.c @@ -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 diff --git a/sc2/src/sc2code/ships/chenjesu/chenjesu.c b/sc2/src/sc2code/ships/chenjesu/chenjesu.c index 836cdad65..5d733aced 100644 --- a/sc2/src/sc2code/ships/chenjesu/chenjesu.c +++ b/sc2/src/sc2code/ships/chenjesu/chenjesu.c @@ -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 diff --git a/sc2/src/sc2code/ships/chmmr/chmmr.c b/sc2/src/sc2code/ships/chmmr/chmmr.c index 36b003f23..1c4fe9687 100644 --- a/sc2/src/sc2code/ships/chmmr/chmmr.c +++ b/sc2/src/sc2code/ships/chmmr/chmmr.c @@ -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 diff --git a/sc2/src/sc2code/ships/druuge/druuge.c b/sc2/src/sc2code/ships/druuge/druuge.c index 7728f2cfd..7bc8d3401 100644 --- a/sc2/src/sc2code/ships/druuge/druuge.c +++ b/sc2/src/sc2code/ships/druuge/druuge.c @@ -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 diff --git a/sc2/src/sc2code/ships/human/human.c b/sc2/src/sc2code/ships/human/human.c index e8e9226e3..b3250ae2e 100644 --- a/sc2/src/sc2code/ships/human/human.c +++ b/sc2/src/sc2code/ships/human/human.c @@ -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 diff --git a/sc2/src/sc2code/ships/ilwrath/ilwrath.c b/sc2/src/sc2code/ships/ilwrath/ilwrath.c index 1be20edb0..1454372cc 100644 --- a/sc2/src/sc2code/ships/ilwrath/ilwrath.c +++ b/sc2/src/sc2code/ships/ilwrath/ilwrath.c @@ -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 diff --git a/sc2/src/sc2code/ships/lastbat/lastbat.c b/sc2/src/sc2code/ships/lastbat/lastbat.c index 99e3ce4b3..0e8a0dd90 100644 --- a/sc2/src/sc2code/ships/lastbat/lastbat.c +++ b/sc2/src/sc2code/ships/lastbat/lastbat.c @@ -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 diff --git a/sc2/src/sc2code/ships/melnorme/melnorme.c b/sc2/src/sc2code/ships/melnorme/melnorme.c index 08cfeaf2c..2ef6ca50e 100644 --- a/sc2/src/sc2code/ships/melnorme/melnorme.c +++ b/sc2/src/sc2code/ships/melnorme/melnorme.c @@ -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 diff --git a/sc2/src/sc2code/ships/mmrnmhrm/mmrnmhrm.c b/sc2/src/sc2code/ships/mmrnmhrm/mmrnmhrm.c index e93862ced..67b355acd 100644 --- a/sc2/src/sc2code/ships/mmrnmhrm/mmrnmhrm.c +++ b/sc2/src/sc2code/ships/mmrnmhrm/mmrnmhrm.c @@ -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 diff --git a/sc2/src/sc2code/ships/mycon/mycon.c b/sc2/src/sc2code/ships/mycon/mycon.c index eb0b378af..adefdd995 100644 --- a/sc2/src/sc2code/ships/mycon/mycon.c +++ b/sc2/src/sc2code/ships/mycon/mycon.c @@ -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 diff --git a/sc2/src/sc2code/ships/orz/orz.c b/sc2/src/sc2code/ships/orz/orz.c index d41e81145..f6d9a623c 100644 --- a/sc2/src/sc2code/ships/orz/orz.c +++ b/sc2/src/sc2code/ships/orz/orz.c @@ -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 diff --git a/sc2/src/sc2code/ships/pkunk/pkunk.c b/sc2/src/sc2code/ships/pkunk/pkunk.c index 5a044d5e4..4d39d68db 100644 --- a/sc2/src/sc2code/ships/pkunk/pkunk.c +++ b/sc2/src/sc2code/ships/pkunk/pkunk.c @@ -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 diff --git a/sc2/src/sc2code/ships/probe/probe.c b/sc2/src/sc2code/ships/probe/probe.c index 43e8debea..bd69905d5 100644 --- a/sc2/src/sc2code/ships/probe/probe.c +++ b/sc2/src/sc2code/ships/probe/probe.c @@ -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 diff --git a/sc2/src/sc2code/ships/ship.h b/sc2/src/sc2code/ships/ship.h new file mode 100644 index 000000000..c606243c2 --- /dev/null +++ b/sc2/src/sc2code/ships/ship.h @@ -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 */ + diff --git a/sc2/src/sc2code/ships/shofixti/shofixti.c b/sc2/src/sc2code/ships/shofixti/shofixti.c index a17b5dbfd..d5bdc2b04 100644 --- a/sc2/src/sc2code/ships/shofixti/shofixti.c +++ b/sc2/src/sc2code/ships/shofixti/shofixti.c @@ -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 diff --git a/sc2/src/sc2code/ships/sis_ship/sis_ship.c b/sc2/src/sc2code/ships/sis_ship/sis_ship.c index 0a7a69286..e8bbadf48 100644 --- a/sc2/src/sc2code/ships/sis_ship/sis_ship.c +++ b/sc2/src/sc2code/ships/sis_ship/sis_ship.c @@ -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 diff --git a/sc2/src/sc2code/ships/slylandr/slylandr.c b/sc2/src/sc2code/ships/slylandr/slylandr.c index d82e7eb71..df6ad4336 100644 --- a/sc2/src/sc2code/ships/slylandr/slylandr.c +++ b/sc2/src/sc2code/ships/slylandr/slylandr.c @@ -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 diff --git a/sc2/src/sc2code/ships/spathi/spathi.c b/sc2/src/sc2code/ships/spathi/spathi.c index 4ad7cdac9..3022a14da 100644 --- a/sc2/src/sc2code/ships/spathi/spathi.c +++ b/sc2/src/sc2code/ships/spathi/spathi.c @@ -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 diff --git a/sc2/src/sc2code/ships/supox/supox.c b/sc2/src/sc2code/ships/supox/supox.c index 0f0557909..ac8a089af 100644 --- a/sc2/src/sc2code/ships/supox/supox.c +++ b/sc2/src/sc2code/ships/supox/supox.c @@ -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 diff --git a/sc2/src/sc2code/ships/syreen/syreen.c b/sc2/src/sc2code/ships/syreen/syreen.c index f24e662db..f3159a1b1 100644 --- a/sc2/src/sc2code/ships/syreen/syreen.c +++ b/sc2/src/sc2code/ships/syreen/syreen.c @@ -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 diff --git a/sc2/src/sc2code/ships/thradd/thradd.c b/sc2/src/sc2code/ships/thradd/thradd.c index f706b04d8..c73231b2c 100644 --- a/sc2/src/sc2code/ships/thradd/thradd.c +++ b/sc2/src/sc2code/ships/thradd/thradd.c @@ -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 diff --git a/sc2/src/sc2code/ships/umgah/umgah.c b/sc2/src/sc2code/ships/umgah/umgah.c index 14fae53df..21e9d753c 100644 --- a/sc2/src/sc2code/ships/umgah/umgah.c +++ b/sc2/src/sc2code/ships/umgah/umgah.c @@ -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 diff --git a/sc2/src/sc2code/ships/urquan/urquan.c b/sc2/src/sc2code/ships/urquan/urquan.c index b3d9b7c82..0b28a8991 100644 --- a/sc2/src/sc2code/ships/urquan/urquan.c +++ b/sc2/src/sc2code/ships/urquan/urquan.c @@ -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 diff --git a/sc2/src/sc2code/ships/utwig/utwig.c b/sc2/src/sc2code/ships/utwig/utwig.c index 8d101e2b1..e105960ec 100644 --- a/sc2/src/sc2code/ships/utwig/utwig.c +++ b/sc2/src/sc2code/ships/utwig/utwig.c @@ -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 diff --git a/sc2/src/sc2code/ships/vux/vux.c b/sc2/src/sc2code/ships/vux/vux.c index cfc8440e5..2af2d30b0 100644 --- a/sc2/src/sc2code/ships/vux/vux.c +++ b/sc2/src/sc2code/ships/vux/vux.c @@ -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 diff --git a/sc2/src/sc2code/ships/yehat/yehat.c b/sc2/src/sc2code/ships/yehat/yehat.c index fcc1f5342..a67da3c25 100644 --- a/sc2/src/sc2code/ships/yehat/yehat.c +++ b/sc2/src/sc2code/ships/yehat/yehat.c @@ -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 diff --git a/sc2/src/sc2code/ships/zoqfot/zoqfot.c b/sc2/src/sc2code/ships/zoqfot/zoqfot.c index 4a94e5ef3..56597d55c 100644 --- a/sc2/src/sc2code/ships/zoqfot/zoqfot.c +++ b/sc2/src/sc2code/ships/zoqfot/zoqfot.c @@ -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 diff --git a/sc2/src/sc2code/starcon.h b/sc2/src/sc2code/starcon.h index 729acf153..1c0e282d3 100644 --- a/sc2/src/sc2code/starcon.h +++ b/sc2/src/sc2code/starcon.h @@ -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); diff --git a/sc2/src/sc2code/tactrans.c b/sc2/src/sc2code/tactrans.c index 5d5e05205..e9d166058 100644 --- a/sc2/src/sc2code/tactrans.c +++ b/sc2/src/sc2code/tactrans.c @@ -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) { diff --git a/sc2/src/sc2code/velocity.h b/sc2/src/sc2code/velocity.h index 30146c7c3..ab15bf6ff 100644 --- a/sc2/src/sc2code/velocity.h +++ b/sc2/src/sc2code/velocity.h @@ -20,6 +20,7 @@ #define _VELOCITY_H #include /* for memset */ +#include "libs/gfxlib.h" typedef struct velocity_desc {