From 28f84f5236b18c478f9895ae34d2979f5c3f9182 Mon Sep 17 00:00:00 2001 From: Steve Date: Wed, 21 Mar 2018 18:26:46 +0000 Subject: [PATCH] Tidied all headers. --- src/combat/combat.h | 1 - src/combat/explosions.h | 1 - src/combat/weapons.h | 1 - src/entities/blobs/bob.h | 1 - src/entities/blobs/mia.h | 1 - src/entities/blobs/teeka.h | 1 - src/entities/boss/blaze.h | 1 - src/entities/boss/blobBoss.h | 1 - src/entities/boss/boss.h | 1 - src/entities/boss/eyeDroidCommander.h | 1 - src/entities/boss/frost.h | 1 - src/entities/boss/tankCommander.h | 1 - src/entities/boss/tankTrack.h | 1 - src/entities/bullets/bullet.h | 1 - src/entities/bullets/grenade.h | 1 - src/entities/bullets/laser.h | 1 - src/entities/bullets/missile.h | 1 - src/entities/cannons/cannon.h | 1 - src/entities/decoration/debris.h | 1 - src/entities/decoration/fleshChunk.h | 1 - src/entities/entity.h | 1 - src/entities/entityFactory.h | 1 - src/entities/evilBlobs/aquaBlob.h | 1 - src/entities/evilBlobs/evilBlob.h | 1 - src/entities/evilBlobs/grenadeBlob.h | 1 - src/entities/evilBlobs/laserBlob.h | 1 - src/entities/evilBlobs/machineGunBlob.h | 1 - src/entities/evilBlobs/pistolBlob.h | 1 - src/entities/evilBlobs/plasmaBlob.h | 1 - src/entities/evilBlobs/shotgunBlob.h | 1 - src/entities/evilBlobs/spreadGunBlob.h | 1 - src/entities/eyeDroids/eyeDroid.h | 1 - src/entities/eyeDroids/grenadeDroid.h | 1 - src/entities/eyeDroids/laserDroid.h | 1 - src/entities/eyeDroids/machineGunDroid.h | 1 - src/entities/eyeDroids/pistolDroid.h | 1 - src/entities/eyeDroids/plasmaDroid.h | 1 - src/entities/eyeDroids/shotgunDroid.h | 1 - src/entities/eyeDroids/spreadGunDroid.h | 1 - src/entities/items/battery.h | 1 - src/entities/items/cell.h | 1 - src/entities/items/cherry.h | 1 - src/entities/items/consumable.h | 1 - src/entities/items/heart.h | 1 - src/entities/items/item.h | 1 - src/entities/items/key.h | 1 - src/entities/items/keycard.h | 1 - src/entities/items/weaponPickup.h | 1 - src/entities/misc/destructable.h | 1 - src/entities/misc/infoPoint.h | 1 - src/entities/structures/cardReader.h | 1 - src/entities/structures/door.h | 1 - src/entities/structures/exit.h | 1 - src/entities/structures/horizontalDoor.h | 1 - src/entities/structures/itemPad.h | 1 - src/entities/structures/lift.h | 1 - src/entities/structures/powerPoint.h | 1 - src/entities/structures/powerPool.h | 1 - src/entities/structures/pressurePlate.h | 1 - src/entities/structures/pushBlock.h | 1 - src/entities/structures/structures.h | 1 - src/entities/structures/teleporter.h | 1 - src/entities/traps/horizontalLaserTrap.h | 1 - src/entities/traps/laserTrap.h | 1 - src/entities/unit.h | 1 - src/game/credits.h | 1 - src/game/ending.h | 1 - src/game/game.h | 1 - src/game/options.h | 1 - src/game/stats.h | 1 - src/game/title.h | 3 +-- src/game/trophies.h | 1 - src/hub/hub.h | 1 - src/hub/postMission.h | 1 - src/plat/unix/unixInit.h | 1 - src/plat/win32/win32Init.h | 1 - src/system/atlas.h | 1 - src/system/controls.h | 1 - src/system/draw.h | 1 - src/system/i18n.h | 1 - src/system/init.h | 1 - src/system/input.h | 1 - src/system/io.h | 1 - src/system/sound.h | 1 - src/system/sprites.h | 1 - src/system/text.h | 1 - src/system/textures.h | 1 - src/system/transition.h | 1 - src/system/widgets.h | 1 - src/test/worldTest.h | 1 - src/world/camera.h | 1 - src/world/effects.h | 1 - src/world/entities.h | 1 - src/world/hud.h | 1 - src/world/items.h | 1 - src/world/map.h | 1 - src/world/objectives.h | 1 - src/world/particles.h | 1 - src/world/player.h | 1 - src/world/quadtree.h | 1 - src/world/radar.h | 1 - src/world/triggers.h | 1 - src/world/world.h | 1 - src/world/worldLoader.h | 1 - src/world/worldSaver.h | 1 - tools/tidyHeaders.sh | 26 +++++++++++++++--------- 106 files changed, 17 insertions(+), 116 deletions(-) diff --git a/src/combat/combat.h b/src/combat/combat.h index 06118ff..4fa8e2e 100644 --- a/src/combat/combat.h +++ b/src/combat/combat.h @@ -26,4 +26,3 @@ extern void getSlope(int x1, int y1, int x2, int y2, float *dx, float *dy); extern int isSolid(int x, int y); extern World world; - diff --git a/src/combat/explosions.h b/src/combat/explosions.h index 48ec7d8..cf4ffc9 100644 --- a/src/combat/explosions.h +++ b/src/combat/explosions.h @@ -30,4 +30,3 @@ extern void stunBob(void); extern void swapSelf(Entity *e); extern Game game; - diff --git a/src/combat/weapons.h b/src/combat/weapons.h index c8b8545..748d68a 100644 --- a/src/combat/weapons.h +++ b/src/combat/weapons.h @@ -31,4 +31,3 @@ extern void playSound(int snd, int ch); extern int rrnd(int low, int high); extern World world; - diff --git a/src/entities/blobs/bob.h b/src/entities/blobs/bob.h index e13abfc..dec15ce 100644 --- a/src/entities/blobs/bob.h +++ b/src/entities/blobs/bob.h @@ -53,4 +53,3 @@ extern App app; extern Dev dev; extern Game game; extern World world; - diff --git a/src/entities/blobs/mia.h b/src/entities/blobs/mia.h index d1edc0a..d502b9a 100644 --- a/src/entities/blobs/mia.h +++ b/src/entities/blobs/mia.h @@ -32,4 +32,3 @@ extern void updateObjective(char *targetName); extern Entity *self; extern Game game; extern World world; - diff --git a/src/entities/blobs/teeka.h b/src/entities/blobs/teeka.h index 7787b86..6df5eee 100644 --- a/src/entities/blobs/teeka.h +++ b/src/entities/blobs/teeka.h @@ -32,4 +32,3 @@ extern int rrnd(int low, int high); extern Entity *self; extern World world; - diff --git a/src/entities/boss/blaze.h b/src/entities/boss/blaze.h index bcff580..2b9e033 100644 --- a/src/entities/boss/blaze.h +++ b/src/entities/boss/blaze.h @@ -22,4 +22,3 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern Sprite *getSprite(char *name); extern Boss *initBlobBoss(void); - diff --git a/src/entities/boss/blobBoss.h b/src/entities/boss/blobBoss.h index 8165849..32cd85a 100644 --- a/src/entities/boss/blobBoss.h +++ b/src/entities/boss/blobBoss.h @@ -40,4 +40,3 @@ extern void updateObjective(char *targetName); extern Entity *self; extern Game game; extern World world; - diff --git a/src/entities/boss/boss.h b/src/entities/boss/boss.h index 4a1cff6..6acd68f 100644 --- a/src/entities/boss/boss.h +++ b/src/entities/boss/boss.h @@ -24,4 +24,3 @@ extern Sprite *getSprite(char *name); extern void initEntity(Entity *e); extern World world; - diff --git a/src/entities/boss/eyeDroidCommander.h b/src/entities/boss/eyeDroidCommander.h index 135b944..d1eae93 100644 --- a/src/entities/boss/eyeDroidCommander.h +++ b/src/entities/boss/eyeDroidCommander.h @@ -42,4 +42,3 @@ extern void updateObjective(char *targetName); extern Entity *self; extern Game game; extern World world; - diff --git a/src/entities/boss/frost.h b/src/entities/boss/frost.h index bcff580..2b9e033 100644 --- a/src/entities/boss/frost.h +++ b/src/entities/boss/frost.h @@ -22,4 +22,3 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern Sprite *getSprite(char *name); extern Boss *initBlobBoss(void); - diff --git a/src/entities/boss/tankCommander.h b/src/entities/boss/tankCommander.h index 45ad246..baa4550 100644 --- a/src/entities/boss/tankCommander.h +++ b/src/entities/boss/tankCommander.h @@ -42,4 +42,3 @@ extern void updateObjective(char *targetName); extern Entity *self; extern Game game; extern World world; - diff --git a/src/entities/boss/tankTrack.h b/src/entities/boss/tankTrack.h index f32efd9..f55bb8a 100644 --- a/src/entities/boss/tankTrack.h +++ b/src/entities/boss/tankTrack.h @@ -27,4 +27,3 @@ extern int rrnd(int low, int high); extern Entity *self; extern World world; - diff --git a/src/entities/bullets/bullet.h b/src/entities/bullets/bullet.h index ea8c5c0..2e778d0 100644 --- a/src/entities/bullets/bullet.h +++ b/src/entities/bullets/bullet.h @@ -31,4 +31,3 @@ extern Camera camera; extern Entity *self; extern Game game; extern World world; - diff --git a/src/entities/bullets/grenade.h b/src/entities/bullets/grenade.h index 3b4d4bb..bccc9d3 100644 --- a/src/entities/bullets/grenade.h +++ b/src/entities/bullets/grenade.h @@ -31,4 +31,3 @@ extern void swapSelf(Entity *e); extern Entity *self; extern Game game; extern World world; - diff --git a/src/entities/bullets/laser.h b/src/entities/bullets/laser.h index 922e255..b64a642 100644 --- a/src/entities/bullets/laser.h +++ b/src/entities/bullets/laser.h @@ -31,4 +31,3 @@ extern void swapSelf(Entity *e); extern Entity *self; extern Game game; extern World world; - diff --git a/src/entities/bullets/missile.h b/src/entities/bullets/missile.h index 4fffa55..818fff1 100644 --- a/src/entities/bullets/missile.h +++ b/src/entities/bullets/missile.h @@ -26,4 +26,3 @@ extern void initMissile(Bullet *b); extern int rrnd(int low, int high); extern Entity *self; - diff --git a/src/entities/cannons/cannon.h b/src/entities/cannons/cannon.h index f12766b..ccbe011 100644 --- a/src/entities/cannons/cannon.h +++ b/src/entities/cannons/cannon.h @@ -35,4 +35,3 @@ extern void updateObjective(char *targetName); extern Dev dev; extern Entity *self; extern World world; - diff --git a/src/entities/decoration/debris.h b/src/entities/decoration/debris.h index aef3ae4..b3914df 100644 --- a/src/entities/decoration/debris.h +++ b/src/entities/decoration/debris.h @@ -25,4 +25,3 @@ extern void addSmokeParticles(float x, float y, int rising); extern void initEntity(Entity *e); extern Entity *self; - diff --git a/src/entities/decoration/fleshChunk.h b/src/entities/decoration/fleshChunk.h index 7794ba6..e0d8983 100644 --- a/src/entities/decoration/fleshChunk.h +++ b/src/entities/decoration/fleshChunk.h @@ -26,4 +26,3 @@ extern void initEntity(Entity *e); extern App app; extern Entity *self; - diff --git a/src/entities/entity.h b/src/entities/entity.h index cc21e40..3377cd3 100644 --- a/src/entities/entity.h +++ b/src/entities/entity.h @@ -22,4 +22,3 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern Entity *self; extern World world; - diff --git a/src/entities/entityFactory.h b/src/entities/entityFactory.h index e2074e0..4ff18e6 100644 --- a/src/entities/entityFactory.h +++ b/src/entities/entityFactory.h @@ -75,4 +75,3 @@ extern Entity *initWhiteKeycard(void); extern Entity *initYellowKeycard(void); extern World world; - diff --git a/src/entities/evilBlobs/aquaBlob.h b/src/entities/evilBlobs/aquaBlob.h index c2f049b..fb03d17 100644 --- a/src/entities/evilBlobs/aquaBlob.h +++ b/src/entities/evilBlobs/aquaBlob.h @@ -22,4 +22,3 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern Unit *createEvilBlob(void); extern Sprite *getSprite(char *name); - diff --git a/src/entities/evilBlobs/evilBlob.h b/src/entities/evilBlobs/evilBlob.h index 73d9644..d5531b1 100644 --- a/src/entities/evilBlobs/evilBlob.h +++ b/src/entities/evilBlobs/evilBlob.h @@ -41,4 +41,3 @@ extern Dev dev; extern Entity *self; extern Game game; extern World world; - diff --git a/src/entities/evilBlobs/grenadeBlob.h b/src/entities/evilBlobs/grenadeBlob.h index a05bab5..cc1431d 100644 --- a/src/entities/evilBlobs/grenadeBlob.h +++ b/src/entities/evilBlobs/grenadeBlob.h @@ -24,4 +24,3 @@ extern Unit *createEvilBlob(void); extern Sprite *getSprite(char *name); extern Entity *self; - diff --git a/src/entities/evilBlobs/laserBlob.h b/src/entities/evilBlobs/laserBlob.h index a05bab5..cc1431d 100644 --- a/src/entities/evilBlobs/laserBlob.h +++ b/src/entities/evilBlobs/laserBlob.h @@ -24,4 +24,3 @@ extern Unit *createEvilBlob(void); extern Sprite *getSprite(char *name); extern Entity *self; - diff --git a/src/entities/evilBlobs/machineGunBlob.h b/src/entities/evilBlobs/machineGunBlob.h index a05bab5..cc1431d 100644 --- a/src/entities/evilBlobs/machineGunBlob.h +++ b/src/entities/evilBlobs/machineGunBlob.h @@ -24,4 +24,3 @@ extern Unit *createEvilBlob(void); extern Sprite *getSprite(char *name); extern Entity *self; - diff --git a/src/entities/evilBlobs/pistolBlob.h b/src/entities/evilBlobs/pistolBlob.h index c2f049b..fb03d17 100644 --- a/src/entities/evilBlobs/pistolBlob.h +++ b/src/entities/evilBlobs/pistolBlob.h @@ -22,4 +22,3 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern Unit *createEvilBlob(void); extern Sprite *getSprite(char *name); - diff --git a/src/entities/evilBlobs/plasmaBlob.h b/src/entities/evilBlobs/plasmaBlob.h index a05bab5..cc1431d 100644 --- a/src/entities/evilBlobs/plasmaBlob.h +++ b/src/entities/evilBlobs/plasmaBlob.h @@ -24,4 +24,3 @@ extern Unit *createEvilBlob(void); extern Sprite *getSprite(char *name); extern Entity *self; - diff --git a/src/entities/evilBlobs/shotgunBlob.h b/src/entities/evilBlobs/shotgunBlob.h index c2f049b..fb03d17 100644 --- a/src/entities/evilBlobs/shotgunBlob.h +++ b/src/entities/evilBlobs/shotgunBlob.h @@ -22,4 +22,3 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern Unit *createEvilBlob(void); extern Sprite *getSprite(char *name); - diff --git a/src/entities/evilBlobs/spreadGunBlob.h b/src/entities/evilBlobs/spreadGunBlob.h index a05bab5..cc1431d 100644 --- a/src/entities/evilBlobs/spreadGunBlob.h +++ b/src/entities/evilBlobs/spreadGunBlob.h @@ -24,4 +24,3 @@ extern Unit *createEvilBlob(void); extern Sprite *getSprite(char *name); extern Entity *self; - diff --git a/src/entities/eyeDroids/eyeDroid.h b/src/entities/eyeDroids/eyeDroid.h index 5b8f3a2..c424a1c 100644 --- a/src/entities/eyeDroids/eyeDroid.h +++ b/src/entities/eyeDroids/eyeDroid.h @@ -41,4 +41,3 @@ extern Dev dev; extern Entity *self; extern Game game; extern World world; - diff --git a/src/entities/eyeDroids/grenadeDroid.h b/src/entities/eyeDroids/grenadeDroid.h index 019b604..34975f9 100644 --- a/src/entities/eyeDroids/grenadeDroid.h +++ b/src/entities/eyeDroids/grenadeDroid.h @@ -24,4 +24,3 @@ extern Unit *createEyeDroid(void); extern Sprite *getSprite(char *name); extern Entity *self; - diff --git a/src/entities/eyeDroids/laserDroid.h b/src/entities/eyeDroids/laserDroid.h index 019b604..34975f9 100644 --- a/src/entities/eyeDroids/laserDroid.h +++ b/src/entities/eyeDroids/laserDroid.h @@ -24,4 +24,3 @@ extern Unit *createEyeDroid(void); extern Sprite *getSprite(char *name); extern Entity *self; - diff --git a/src/entities/eyeDroids/machineGunDroid.h b/src/entities/eyeDroids/machineGunDroid.h index 019b604..34975f9 100644 --- a/src/entities/eyeDroids/machineGunDroid.h +++ b/src/entities/eyeDroids/machineGunDroid.h @@ -24,4 +24,3 @@ extern Unit *createEyeDroid(void); extern Sprite *getSprite(char *name); extern Entity *self; - diff --git a/src/entities/eyeDroids/pistolDroid.h b/src/entities/eyeDroids/pistolDroid.h index 4070d6d..b1c91e1 100644 --- a/src/entities/eyeDroids/pistolDroid.h +++ b/src/entities/eyeDroids/pistolDroid.h @@ -22,4 +22,3 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern Unit *createEyeDroid(void); extern Sprite *getSprite(char *name); - diff --git a/src/entities/eyeDroids/plasmaDroid.h b/src/entities/eyeDroids/plasmaDroid.h index 019b604..34975f9 100644 --- a/src/entities/eyeDroids/plasmaDroid.h +++ b/src/entities/eyeDroids/plasmaDroid.h @@ -24,4 +24,3 @@ extern Unit *createEyeDroid(void); extern Sprite *getSprite(char *name); extern Entity *self; - diff --git a/src/entities/eyeDroids/shotgunDroid.h b/src/entities/eyeDroids/shotgunDroid.h index 4070d6d..b1c91e1 100644 --- a/src/entities/eyeDroids/shotgunDroid.h +++ b/src/entities/eyeDroids/shotgunDroid.h @@ -22,4 +22,3 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern Unit *createEyeDroid(void); extern Sprite *getSprite(char *name); - diff --git a/src/entities/eyeDroids/spreadGunDroid.h b/src/entities/eyeDroids/spreadGunDroid.h index 019b604..34975f9 100644 --- a/src/entities/eyeDroids/spreadGunDroid.h +++ b/src/entities/eyeDroids/spreadGunDroid.h @@ -24,4 +24,3 @@ extern Unit *createEyeDroid(void); extern Sprite *getSprite(char *name); extern Entity *self; - diff --git a/src/entities/items/battery.h b/src/entities/items/battery.h index 2a2b6e5..444f32d 100644 --- a/src/entities/items/battery.h +++ b/src/entities/items/battery.h @@ -29,4 +29,3 @@ extern int touchedPlayer(Entity *e); extern Entity *self; extern Game game; extern World world; - diff --git a/src/entities/items/cell.h b/src/entities/items/cell.h index 3ce7d19..8eb3ae6 100644 --- a/src/entities/items/cell.h +++ b/src/entities/items/cell.h @@ -29,4 +29,3 @@ extern void updateHeartCellObjective(void); extern Entity *self; extern Game game; extern World world; - diff --git a/src/entities/items/cherry.h b/src/entities/items/cherry.h index 4347661..6606c08 100644 --- a/src/entities/items/cherry.h +++ b/src/entities/items/cherry.h @@ -30,4 +30,3 @@ extern int touchedPlayer(Entity *other); extern Entity *self; extern Game game; extern World world; - diff --git a/src/entities/items/consumable.h b/src/entities/items/consumable.h index 6a39b8d..7da08cf 100644 --- a/src/entities/items/consumable.h +++ b/src/entities/items/consumable.h @@ -23,4 +23,3 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern void initEntity(Entity *e); extern Entity *self; - diff --git a/src/entities/items/heart.h b/src/entities/items/heart.h index 729931c..2ba258a 100644 --- a/src/entities/items/heart.h +++ b/src/entities/items/heart.h @@ -30,4 +30,3 @@ extern void updateHeartCellObjective(void); extern Entity *self; extern Game game; extern World world; - diff --git a/src/entities/items/item.h b/src/entities/items/item.h index 296558a..5d6cb00 100644 --- a/src/entities/items/item.h +++ b/src/entities/items/item.h @@ -33,4 +33,3 @@ extern void updateObjective(char *targetName); extern Entity *self; extern Game game; extern World world; - diff --git a/src/entities/items/key.h b/src/entities/items/key.h index 2aa5207..550e089 100644 --- a/src/entities/items/key.h +++ b/src/entities/items/key.h @@ -21,4 +21,3 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "../../common.h" extern Entity *createItem(void); - diff --git a/src/entities/items/keycard.h b/src/entities/items/keycard.h index ece356b..b43ba9d 100644 --- a/src/entities/items/keycard.h +++ b/src/entities/items/keycard.h @@ -26,4 +26,3 @@ extern void teekaExitMission(void); extern void updateObjective(char *targetName); extern World world; - diff --git a/src/entities/items/weaponPickup.h b/src/entities/items/weaponPickup.h index 815fdba..366ab3a 100644 --- a/src/entities/items/weaponPickup.h +++ b/src/entities/items/weaponPickup.h @@ -33,4 +33,3 @@ extern int touchedPlayer(Entity *e); extern Entity *self; extern Game game; extern World world; - diff --git a/src/entities/misc/destructable.h b/src/entities/misc/destructable.h index 7312027..3bf482a 100644 --- a/src/entities/misc/destructable.h +++ b/src/entities/misc/destructable.h @@ -31,4 +31,3 @@ extern int rrnd(int low, int high); extern void updateObjective(char *targetName); extern Entity *self; - diff --git a/src/entities/misc/infoPoint.h b/src/entities/misc/infoPoint.h index f9a69c0..fabe2fb 100644 --- a/src/entities/misc/infoPoint.h +++ b/src/entities/misc/infoPoint.h @@ -28,4 +28,3 @@ extern void showInfoMessage(char *message); extern Entity *self; extern Game game; extern World world; - diff --git a/src/entities/structures/cardReader.h b/src/entities/structures/cardReader.h index d94d495..13c70f2 100644 --- a/src/entities/structures/cardReader.h +++ b/src/entities/structures/cardReader.h @@ -31,4 +31,3 @@ extern void setGameplayMessage(int type, char *format, ...); extern Dev dev; extern Entity *self; - diff --git a/src/entities/structures/door.h b/src/entities/structures/door.h index 2ee9506..878f780 100644 --- a/src/entities/structures/door.h +++ b/src/entities/structures/door.h @@ -36,4 +36,3 @@ extern void setGameplayMessage(int type, char *format, ...); extern Dev dev; extern Entity *self; - diff --git a/src/entities/structures/exit.h b/src/entities/structures/exit.h index dfecc6a..bfb7b0b 100644 --- a/src/entities/structures/exit.h +++ b/src/entities/structures/exit.h @@ -29,4 +29,3 @@ extern void updateObjective(char *targetName); extern Entity *self; extern World world; - diff --git a/src/entities/structures/horizontalDoor.h b/src/entities/structures/horizontalDoor.h index a366b64..a1bba85 100644 --- a/src/entities/structures/horizontalDoor.h +++ b/src/entities/structures/horizontalDoor.h @@ -22,4 +22,3 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern Sprite *getSprite(char *name); extern Entity *initDoor(void); - diff --git a/src/entities/structures/itemPad.h b/src/entities/structures/itemPad.h index 98cf5ef..4ece4a6 100644 --- a/src/entities/structures/itemPad.h +++ b/src/entities/structures/itemPad.h @@ -30,4 +30,3 @@ extern void setGameplayMessage(int type, char *format, ...); extern void updateObjective(char *targetName); extern Entity *self; - diff --git a/src/entities/structures/lift.h b/src/entities/structures/lift.h index 7f8fc5c..e5593d7 100644 --- a/src/entities/structures/lift.h +++ b/src/entities/structures/lift.h @@ -31,4 +31,3 @@ extern void observeActivation(Entity *e); extern void setGameplayMessage(int type, char *format, ...); extern Entity *self; - diff --git a/src/entities/structures/powerPoint.h b/src/entities/structures/powerPoint.h index 1f5a23b..9847a2d 100644 --- a/src/entities/structures/powerPoint.h +++ b/src/entities/structures/powerPoint.h @@ -31,4 +31,3 @@ extern Dev dev; extern Entity *self; extern Game game; extern World world; - diff --git a/src/entities/structures/powerPool.h b/src/entities/structures/powerPool.h index e611d39..bc2ce8b 100644 --- a/src/entities/structures/powerPool.h +++ b/src/entities/structures/powerPool.h @@ -27,4 +27,3 @@ extern void playSound(int snd, int ch); extern Entity *self; extern World world; - diff --git a/src/entities/structures/pressurePlate.h b/src/entities/structures/pressurePlate.h index 42f3306..22b6898 100644 --- a/src/entities/structures/pressurePlate.h +++ b/src/entities/structures/pressurePlate.h @@ -27,4 +27,3 @@ extern Sprite *getSprite(char *name); extern void playBattleSound(int snd, int ch, int x, int y); extern Entity *self; - diff --git a/src/entities/structures/pushBlock.h b/src/entities/structures/pushBlock.h index 7ab46c6..f841176 100644 --- a/src/entities/structures/pushBlock.h +++ b/src/entities/structures/pushBlock.h @@ -28,4 +28,3 @@ extern void playBattleSound(int snd, int ch, int x, int y); extern int rrnd(int low, int high); extern Entity *self; - diff --git a/src/entities/structures/structures.h b/src/entities/structures/structures.h index f14e979..7caefce 100644 --- a/src/entities/structures/structures.h +++ b/src/entities/structures/structures.h @@ -21,4 +21,3 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "../../common.h" extern void initEntity(Entity *e); - diff --git a/src/entities/structures/teleporter.h b/src/entities/structures/teleporter.h index a63d874..53346d4 100644 --- a/src/entities/structures/teleporter.h +++ b/src/entities/structures/teleporter.h @@ -31,4 +31,3 @@ extern void setGameplayMessage(int type, char *format, ...); extern void teleportEntity(Entity *e, float tx, float ty); extern Entity *self; - diff --git a/src/entities/traps/horizontalLaserTrap.h b/src/entities/traps/horizontalLaserTrap.h index 9fa4a1c..59e39a0 100644 --- a/src/entities/traps/horizontalLaserTrap.h +++ b/src/entities/traps/horizontalLaserTrap.h @@ -22,4 +22,3 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern Sprite *getSprite(char *name); extern Entity *initLaserTrap(void); - diff --git a/src/entities/traps/laserTrap.h b/src/entities/traps/laserTrap.h index a88b702..cc5a1cb 100644 --- a/src/entities/traps/laserTrap.h +++ b/src/entities/traps/laserTrap.h @@ -35,4 +35,3 @@ extern void swapSelf(Entity *e); extern Entity *self; extern World world; - diff --git a/src/entities/unit.h b/src/entities/unit.h index 9eb335c..4407afc 100644 --- a/src/entities/unit.h +++ b/src/entities/unit.h @@ -38,4 +38,3 @@ extern int rrnd(int low, int high); extern Entity *self; extern World world; - diff --git a/src/game/credits.h b/src/game/credits.h index 4d03361..ee256d5 100644 --- a/src/game/credits.h +++ b/src/game/credits.h @@ -38,4 +38,3 @@ extern void startSectionTransition(void); extern App app; extern Colors colors; - diff --git a/src/game/ending.h b/src/game/ending.h index 98e897c..ff0118c 100644 --- a/src/game/ending.h +++ b/src/game/ending.h @@ -36,4 +36,3 @@ extern void startSectionTransition(void); extern App app; extern Colors colors; - diff --git a/src/game/game.h b/src/game/game.h index b179e3a..cde2097 100644 --- a/src/game/game.h +++ b/src/game/game.h @@ -38,4 +38,3 @@ extern App app; extern Entity *self; extern Game game; extern World world; - diff --git a/src/game/options.h b/src/game/options.h index 5b489d5..2d42326 100644 --- a/src/game/options.h +++ b/src/game/options.h @@ -42,4 +42,3 @@ extern void startSectionTransition(void); extern App app; extern Colors colors; - diff --git a/src/game/stats.h b/src/game/stats.h index 8758291..39b96f6 100644 --- a/src/game/stats.h +++ b/src/game/stats.h @@ -40,4 +40,3 @@ extern char *timeToString(int seconds, int showHours); extern App app; extern Colors colors; extern Game game; - diff --git a/src/game/title.h b/src/game/title.h index 27dcb9a..c546eb5 100644 --- a/src/game/title.h +++ b/src/game/title.h @@ -29,6 +29,7 @@ enum }; extern void blitRect(SDL_Texture *texture, int x, int y, SDL_Rect *srcRect, int center); +extern void deleteSaveSlot(int slot); extern void destroyGame(void); extern void doWidgets(void); extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...); @@ -53,9 +54,7 @@ extern void setSelectedWidget(char *name, char *group); extern void showWidgetGroup(char *group); extern void startSectionTransition(void); extern void stopMusic(void); -extern void deleteSaveSlot(int slot); extern App app; extern Colors colors; extern Game game; - diff --git a/src/game/trophies.h b/src/game/trophies.h index dc90ee4..c282510 100644 --- a/src/game/trophies.h +++ b/src/game/trophies.h @@ -48,4 +48,3 @@ extern char *timeToDate(long millis); extern App app; extern Colors colors; extern Game game; - diff --git a/src/hub/hub.h b/src/hub/hub.h index a1fd688..4af4c57 100644 --- a/src/hub/hub.h +++ b/src/hub/hub.h @@ -78,4 +78,3 @@ extern App app; extern Colors colors; extern Dev dev; extern Game game; - diff --git a/src/hub/postMission.h b/src/hub/postMission.h index 35898c2..6868ff3 100644 --- a/src/hub/postMission.h +++ b/src/hub/postMission.h @@ -42,4 +42,3 @@ extern App app; extern Colors colors; extern Game game; extern World world; - diff --git a/src/plat/unix/unixInit.h b/src/plat/unix/unixInit.h index 3ef55d2..3d612a0 100644 --- a/src/plat/unix/unixInit.h +++ b/src/plat/unix/unixInit.h @@ -27,4 +27,3 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern App app; extern Dev dev; - diff --git a/src/plat/win32/win32Init.h b/src/plat/win32/win32Init.h index c0f1ffe..6579e25 100644 --- a/src/plat/win32/win32Init.h +++ b/src/plat/win32/win32Init.h @@ -26,4 +26,3 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern App app; extern Dev dev; - diff --git a/src/system/atlas.h b/src/system/atlas.h index 005734f..1a28b99 100644 --- a/src/system/atlas.h +++ b/src/system/atlas.h @@ -23,4 +23,3 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern unsigned long hashcode(const char *str); extern char *readFile(const char *filename); - diff --git a/src/system/controls.h b/src/system/controls.h index f74e302..321c2dc 100644 --- a/src/system/controls.h +++ b/src/system/controls.h @@ -23,4 +23,3 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define AXIS_MAX 32767 extern App app; - diff --git a/src/system/draw.h b/src/system/draw.h index 2e53195..3893efa 100644 --- a/src/system/draw.h +++ b/src/system/draw.h @@ -27,4 +27,3 @@ extern App app; extern Colors colors; extern Dev dev; extern Game game; - diff --git a/src/system/i18n.h b/src/system/i18n.h index 0615495..a40d207 100644 --- a/src/system/i18n.h +++ b/src/system/i18n.h @@ -24,4 +24,3 @@ Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. #endif #define TABLE_SIZE 255 - diff --git a/src/system/init.h b/src/system/init.h index 811016a..a55dfc4 100644 --- a/src/system/init.h +++ b/src/system/init.h @@ -54,4 +54,3 @@ extern void setLanguage(char *applicationName, char *languageCode); extern int writeFile(const char *filename, const char *data); extern App app; - diff --git a/src/system/input.h b/src/system/input.h index b8fccce..decc46b 100644 --- a/src/system/input.h +++ b/src/system/input.h @@ -23,4 +23,3 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define MOUSE_DRAG_THRESHOLD 4 extern App app; - diff --git a/src/system/io.h b/src/system/io.h index 1ee0e21..b4a7fb8 100644 --- a/src/system/io.h +++ b/src/system/io.h @@ -23,4 +23,3 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "sys/stat.h" #include "dirent.h" #include - diff --git a/src/system/sound.h b/src/system/sound.h index ada30e7..a705fcb 100644 --- a/src/system/sound.h +++ b/src/system/sound.h @@ -30,4 +30,3 @@ extern int getDistance(int x1, int y1, int x2, int y2); extern char *getFileLocation(char *filename); extern World world; - diff --git a/src/system/sprites.h b/src/system/sprites.h index 1ef6528..396d0e7 100644 --- a/src/system/sprites.h +++ b/src/system/sprites.h @@ -25,4 +25,3 @@ extern char **getFileList(const char *dir, int *count); extern Atlas *getImageFromAtlas(char *filename); extern char *readFile(const char *filename); extern float wrap(float value, float low, float high); - diff --git a/src/system/text.h b/src/system/text.h index 7ca35c3..663a84d 100644 --- a/src/system/text.h +++ b/src/system/text.h @@ -28,4 +28,3 @@ extern unsigned long hashcode(const char *str); extern App app; extern Colors colors; - diff --git a/src/system/textures.h b/src/system/textures.h index 78af6d5..4cbb518 100644 --- a/src/system/textures.h +++ b/src/system/textures.h @@ -26,4 +26,3 @@ extern char *getFileLocation(const char *filename); extern unsigned long hashcode(const char *str); extern App app; - diff --git a/src/system/transition.h b/src/system/transition.h index 9c82a85..7396d6e 100644 --- a/src/system/transition.h +++ b/src/system/transition.h @@ -24,4 +24,3 @@ extern void clearInput(void); extern void expireTexts(int all); extern void prepareScene(void); extern void presentScene(void); - diff --git a/src/system/widgets.h b/src/system/widgets.h index d0f9e35..7917820 100644 --- a/src/system/widgets.h +++ b/src/system/widgets.h @@ -40,4 +40,3 @@ extern void textSize(const char *text, int size, int *w, int *h); extern App app; extern Colors colors; - diff --git a/src/test/worldTest.h b/src/test/worldTest.h index d84eff6..5244f97 100644 --- a/src/test/worldTest.h +++ b/src/test/worldTest.h @@ -27,4 +27,3 @@ extern void loadGame(void); extern void saveGame(void); extern Game game; - diff --git a/src/world/camera.h b/src/world/camera.h index e3c95bd..4cb59aa 100644 --- a/src/world/camera.h +++ b/src/world/camera.h @@ -24,4 +24,3 @@ extern float limit(float i, float a, float b); extern Camera camera; extern World world; - diff --git a/src/world/effects.h b/src/world/effects.h index 4e6f535..36626ab 100644 --- a/src/world/effects.h +++ b/src/world/effects.h @@ -26,4 +26,3 @@ extern void initFleshChunk(Decoration *d); extern int rrnd(int low, int high); extern App app; - diff --git a/src/world/entities.h b/src/world/entities.h index 0fab5e3..10da106 100644 --- a/src/world/entities.h +++ b/src/world/entities.h @@ -44,4 +44,3 @@ extern void terminateJetpack(void); extern Camera camera; extern Entity *self; extern World world; - diff --git a/src/world/hud.h b/src/world/hud.h index 927e9a5..20d3e55 100644 --- a/src/world/hud.h +++ b/src/world/hud.h @@ -39,4 +39,3 @@ extern Camera camera; extern Colors colors; extern Dev dev; extern World world; - diff --git a/src/world/items.h b/src/world/items.h index 2eaeeaa..745a34b 100644 --- a/src/world/items.h +++ b/src/world/items.h @@ -29,4 +29,3 @@ extern Item *initCherry(void); extern int rrnd(int low, int high); extern World world; - diff --git a/src/world/map.h b/src/world/map.h index e1eb034..ddc855b 100644 --- a/src/world/map.h +++ b/src/world/map.h @@ -30,4 +30,3 @@ extern int rrnd(int low, int high); extern App app; extern Camera camera; extern World world; - diff --git a/src/world/objectives.h b/src/world/objectives.h index 6228d00..9beef1b 100644 --- a/src/world/objectives.h +++ b/src/world/objectives.h @@ -26,4 +26,3 @@ extern void setGameplayMessage(int type, char *format, ...); extern Game game; extern World world; - diff --git a/src/world/particles.h b/src/world/particles.h index 4620983..a60fcd0 100644 --- a/src/world/particles.h +++ b/src/world/particles.h @@ -31,4 +31,3 @@ extern int rrnd(int low, int high); extern Camera camera; extern World world; - diff --git a/src/world/player.h b/src/world/player.h index 615d93d..743291a 100644 --- a/src/world/player.h +++ b/src/world/player.h @@ -26,4 +26,3 @@ extern void quitMission(void); extern App app; extern Dev dev; extern World world; - diff --git a/src/world/quadtree.h b/src/world/quadtree.h index a921dd8..d0c91f4 100644 --- a/src/world/quadtree.h +++ b/src/world/quadtree.h @@ -26,4 +26,3 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern void *resize(void *array, int oldSize, int newSize); extern World world; - diff --git a/src/world/radar.h b/src/world/radar.h index 41631e2..1ae0ca0 100644 --- a/src/world/radar.h +++ b/src/world/radar.h @@ -55,4 +55,3 @@ extern void startSectionTransition(void); extern App app; extern Colors colors; extern World world; - diff --git a/src/world/triggers.h b/src/world/triggers.h index 469d395..c5bda8d 100644 --- a/src/world/triggers.h +++ b/src/world/triggers.h @@ -25,4 +25,3 @@ extern int collision(int x1, int y1, int w1, int h1, int x2, int y2, int w2, int extern void setGameplayMessage(int type, char *format, ...); extern World world; - diff --git a/src/world/world.h b/src/world/world.h index dc99c87..cd08688 100644 --- a/src/world/world.h +++ b/src/world/world.h @@ -124,4 +124,3 @@ extern Dev dev; extern Entity *self; extern Game game; extern World world; - diff --git a/src/world/worldLoader.h b/src/world/worldLoader.h index 52c88ee..e4b9390 100644 --- a/src/world/worldLoader.h +++ b/src/world/worldLoader.h @@ -30,4 +30,3 @@ extern Dev dev; extern Entity *self; extern Game game; extern World world; - diff --git a/src/world/worldSaver.h b/src/world/worldSaver.h index 5f039f3..563ebf3 100644 --- a/src/world/worldSaver.h +++ b/src/world/worldSaver.h @@ -27,4 +27,3 @@ extern App app; extern Entity *self; extern Game game; extern World world; - diff --git a/tools/tidyHeaders.sh b/tools/tidyHeaders.sh index fc3ee25..f834297 100755 --- a/tools/tidyHeaders.sh +++ b/tools/tidyHeaders.sh @@ -42,34 +42,28 @@ function updateExterns($header, $defines, $functions, $structs) asort($structs); $newHeader = []; - $wasBlank = false; foreach ($header as $line) { - if (strlen($line) > 1 || (strlen($line) == 1 && !$wasBlank)) - { - $newHeader[] = $line; - } - - $wasBlank = strlen($line) == 1; + $newHeader[] = $line; } if (count($defines) > 0) { - $newHeader = array_merge($newHeader, $defines); $newHeader[] = "\n"; + $newHeader = array_merge($newHeader, $defines); } if (count($functions) > 0) { - $newHeader = array_merge($newHeader, $functions); $newHeader[] = "\n"; + $newHeader = array_merge($newHeader, $functions); } if (count($structs) > 0) { - $newHeader = array_merge($newHeader, $structs); $newHeader[] = "\n"; + $newHeader = array_merge($newHeader, $structs); } return $newHeader; @@ -178,6 +172,18 @@ function cleanHeader($headerFile) $i++; } + + do + { + $wasBlank = false; + $line = trim(end($header)); + if (strlen($line) == 0) + { + array_pop($header); + $wasBlank = true; + } + } + while ($wasBlank); $header = updateExterns($header, $defines, $functions, $structs);