diff --git a/src/Starfighter.h b/src/Starfighter.h
index 293163a..764afb0 100644
--- a/src/Starfighter.h
+++ b/src/Starfighter.h
@@ -17,8 +17,8 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#ifndef __STARFIGHTER_H__
-#define __STARFIGHTER_H__
+#ifndef STARFIGHTER_H
+#define STARFIGHTER_H
#include
#include
diff --git a/src/ai.h b/src/ai.h
index cbc6710..0f65e4b 100644
--- a/src/ai.h
+++ b/src/ai.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
+Copyright (C) 2015 Julian Marchant
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,6 +17,11 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef AI_H
+#define AI_H
+
extern void setEnemyAI(object *theEnemy);
extern void setKlineAttackMethod(object *theEnemy);
extern void setKlineAI(object *theEnemy);
+
+#endif
diff --git a/src/aliens.h b/src/aliens.h
index 3125e3a..0ffae41 100644
--- a/src/aliens.h
+++ b/src/aliens.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
+Copyright (C) 2015 Julian Marchant
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,6 +17,9 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef ALIENS_H
+#define ALIENS_H
+
extern object defEnemy[MAX_DEFALIENS];
extern object enemy[MAX_ALIENS];
@@ -26,3 +30,5 @@ extern void killAllAliens();
extern void doAliens();
extern void setAlienShapes();
extern void defineAliens();
+
+#endif
diff --git a/src/audio.h b/src/audio.h
index 264f7ca..960a7a1 100644
--- a/src/audio.h
+++ b/src/audio.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011, 2012 Guus Sliepen
+Copyright (C) 2015 Julian Marchant
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,9 +17,14 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef AUDIO_H
+#define AUDIO_H
+
extern Mix_Chunk *sound[MAX_SOUNDS];
extern void playSound(int sid, float x = 400);
extern Mix_Chunk *loadSound(const char *filename);
extern void loadMusic(const char *filename);
extern void playRandomTrack();
+
+#endif
diff --git a/src/bullets.h b/src/bullets.h
index 786ee08..82e1162 100644
--- a/src/bullets.h
+++ b/src/bullets.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
+Copyright (C) 2015 Julian Marchant
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,8 +17,13 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef _BULLETS_H_
+#define _BULLETS_H_
+
extern void addBullet(object *theWeapon, object *attacker, int y, int dy);
extern void fireBullet(object *attacker, int weaponType);
extern char checkPlayerShockDamage(float x, float y);
extern void fireRay(object *attacker);
extern void doBullets();
+
+#endif
diff --git a/src/cargo.h b/src/cargo.h
index c1da79a..27c626c 100644
--- a/src/cargo.h
+++ b/src/cargo.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
+Copyright (C) 2015 Julian Marchant
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,8 +17,13 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef _CARGO_H_
+#define _CARGO_H_
+
extern object cargo[MAX_CARGO];
extern void initCargo();
extern object *addCargo(object *owner, int cargoType);
extern void doCargo();
+
+#endif
diff --git a/src/collectable.h b/src/collectable.h
index 8fa4288..107d87d 100644
--- a/src/collectable.h
+++ b/src/collectable.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
+Copyright (C) 2015 Julian Marchant
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,6 +17,11 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef COLLECTABLE_H
+#define COLLECTABLE_H
+
extern void addCollectable(float x, float y, int type, int value, int life);
extern void checkMineBulletCollisions(object *bullet);
extern void doCollectables();
+
+#endif
diff --git a/src/comms.h b/src/comms.h
index 407084f..c239e24 100644
--- a/src/comms.h
+++ b/src/comms.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
+Copyright (C) 2015 Julian Marchant
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,6 +17,11 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef COMMS_H
+#define COMMS_H
+
extern void updateCommsSurface(SDL_Surface *comms);
extern void createCommsSurface(SDL_Surface *comms);
extern void doComms(SDL_Surface *comms);
+
+#endif
diff --git a/src/debris.h b/src/debris.h
index d832038..d469397 100644
--- a/src/debris.h
+++ b/src/debris.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
+Copyright (C) 2015 Julian Marchant
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,5 +17,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef DEBRIS_H
+#define DEBRIS_H
+
extern void addDebris(int x, int y, int amount);
extern void doDebris();
+
+#endif
diff --git a/src/defs.h b/src/defs.h
index ef36845..883aacb 100644
--- a/src/defs.h
+++ b/src/defs.h
@@ -17,6 +17,9 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef DEFS_H
+#define DEFS_H
+
#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))
@@ -365,3 +368,5 @@ const float cameraMaxSpeed = 3.;
const int maxHoming = 20;
const int maxDoubleHoming = 15;
const int maxMicroHoming = 10;
+
+#endif
diff --git a/src/events.h b/src/events.h
index 093d502..0a59c23 100644
--- a/src/events.h
+++ b/src/events.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
+Copyright (C) 2015 Julian Marchant
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,4 +17,9 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef EVENTS_H
+#define EVENTS_H
+
extern bool checkPauseRequest();
+
+#endif
diff --git a/src/explosions.h b/src/explosions.h
index 54ab20e..1ae127c 100644
--- a/src/explosions.h
+++ b/src/explosions.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
+Copyright (C) 2015 Julian Marchant
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,6 +17,11 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef EXPLOSIONS_H
+#define EXPLOSIONS_H
+
extern void addExplosion(float x, float y, int type);
extern void addEngine(object *craft);
extern void doExplosions();
+
+#endif
diff --git a/src/game.h b/src/game.h
index ec38b91..17eb3ae 100644
--- a/src/game.h
+++ b/src/game.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
+Copyright (C) 2015 Julian Marchant
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,7 +17,12 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef GAME_H
+#define GAME_H
+
extern Game currentGame;
extern void newGame();
extern int mainGameLoop();
+
+#endif
diff --git a/src/globals.h b/src/globals.h
index 4c3af2e..babc92a 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
+Copyright (C) 2015 Julian Marchant
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,7 +17,12 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef GLOBALS_H
+#define GLOBALS_H
+
extern devVariables dev;
extern globalEngineVariables engine;
extern void defineGlobals();
+
+#endif
diff --git a/src/graphics.h b/src/graphics.h
index 965665d..3f4e71f 100644
--- a/src/graphics.h
+++ b/src/graphics.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
+Copyright (C) 2015 Julian Marchant
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,6 +17,9 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef GRAPHICS_H
+#define GRAPHICS_H
+
extern Star star[200];
extern Uint32 red;
@@ -80,3 +84,5 @@ extern void freeGraphics();
extern SDL_Surface *loadImage(const char *filename);
extern void doStarfield();
+
+#endif
diff --git a/src/init.h b/src/init.h
index c18093c..a58848c 100644
--- a/src/init.h
+++ b/src/init.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
+Copyright (C) 2015 Julian Marchant
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,7 +17,12 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef INIT_H
+#define INIT_H
+
extern void initVars();
extern void showErrorAndExit(int errorId, const char *name);
extern void initSystem();
extern void cleanUp();
+
+#endif
diff --git a/src/intermission.h b/src/intermission.h
index 8d893a5..7bb8537 100644
--- a/src/intermission.h
+++ b/src/intermission.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
+Copyright (C) 2015 Julian Marchant
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,4 +17,9 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef INTERMISSION_H
+#define INTERMISSION_H
+
extern int galaxyMap();
+
+#endif
diff --git a/src/loadSave.h b/src/loadSave.h
index 847dbd0..8356291 100644
--- a/src/loadSave.h
+++ b/src/loadSave.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
+Copyright (C) 2015 Julian Marchant
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,8 +17,13 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef LOADSAVE_H
+#define LOADSAVE_H
+
extern int initSaveSlots();
extern bool loadGame(int slot);
extern void saveGame(int slot);
extern void createSavesSurface(SDL_Surface *savesSurface, signed char clickedSlot);
extern int showSaveSlots(SDL_Surface *savesSurface, signed char saveSlot);
+
+#endif
diff --git a/src/math.h b/src/math.h
index 4f791da..b618191 100644
--- a/src/math.h
+++ b/src/math.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
+Copyright (C) 2015 Julian Marchant
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,6 +17,9 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef MATH_H
+#define MATH_H
+
static inline void limitChar(signed char *in, int low, int high)
{
if (*in < low)
@@ -105,3 +109,5 @@ static inline int rrand(int min, int max)
return r;
}
+
+#endif
diff --git a/src/messages.h b/src/messages.h
index b5f4873..ca0d0af 100644
--- a/src/messages.h
+++ b/src/messages.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
+Copyright (C) 2015 Julian Marchant
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,8 +17,13 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef MESSAGES_H
+#define MESSAGES_H
+
extern void getKillMessage(object *ally);
extern const char *getKlineInsult();
extern void getPlayerDeathMessage();
extern void getMissFireMessage(object *ally);
extern void getPlayerHitMessage(object *ally);
+
+#endif
diff --git a/src/misc.h b/src/misc.h
index 7e4c14b..5bff93b 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
+Copyright (C) 2015 Julian Marchant
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,9 +17,14 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef MISC_H
+#define MISC_H
+
extern void clearInfoLines();
extern void setInfoLine(const char *in, int color);
extern void setRadioMessage(signed char face, const char *in, int priority);
extern void doInfo();
extern int getFace(const char *face);
extern void resetLists();
+
+#endif
diff --git a/src/missions.h b/src/missions.h
index 9ea2403..e7f4008 100644
--- a/src/missions.h
+++ b/src/missions.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
+Copyright (C) 2015 Julian Marchant
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,6 +17,9 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef MISSIONS_H
+#define MISSIONS_H
+
extern Planet systemPlanet[10];
extern mission currentMission;
@@ -30,3 +34,5 @@ extern bool missionFailed();
extern void missionBriefScreen();
extern void missionFinishedScreen();
extern void initMissions();
+
+#endif
diff --git a/src/player.h b/src/player.h
index fee5052..1d3662b 100644
--- a/src/player.h
+++ b/src/player.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
+Copyright (C) 2015 Julian Marchant
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,6 +17,9 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef PLAYER_H
+#define PLAYER_H
+
extern object player;
extern void initPlayer();
@@ -24,3 +28,5 @@ extern void doPlayer();
extern void flushInput();
extern void getPlayerInput();
extern void leaveSector();
+
+#endif
diff --git a/src/resources.h b/src/resources.h
index 779b4a4..1ce92e2 100644
--- a/src/resources.h
+++ b/src/resources.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
+Copyright (C) 2015 Julian Marchant
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,8 +17,13 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef RESOURCES_H
+#define RESOURCES_H
+
extern void loadBackground(const char *filename);
extern void loadGameGraphics();
extern void loadSound();
extern void freeSound();
extern void loadFont();
+
+#endif
diff --git a/src/script.h b/src/script.h
index 846aca4..29ec9ec 100644
--- a/src/script.h
+++ b/src/script.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
+Copyright (C) 2015 Julian Marchant
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,7 +17,12 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef SCRIPT_H
+#define SCRIPT_H
+
extern void loadScriptEvents();
extern void checkScriptEvents();
extern void syncScriptEvents();
extern void doCutscene(int scene);
+
+#endif
diff --git a/src/shop.h b/src/shop.h
index a4399e2..ba93fe9 100644
--- a/src/shop.h
+++ b/src/shop.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
+Copyright (C) 2015 Julian Marchant
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,5 +17,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef SHOP_H
+#define SHOP_H
+
extern void initShop();
extern void showShop();
+
+#endif
diff --git a/src/structs.h b/src/structs.h
index 48b8270..86fc538 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -17,6 +17,9 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef STRUCTS_H
+#define STRUCTS_H
+
struct object {
bool active;
@@ -317,5 +320,4 @@ struct devVariables {
};
-
-
+#endif
diff --git a/src/title.h b/src/title.h
index 21af1a1..316cae3 100644
--- a/src/title.h
+++ b/src/title.h
@@ -17,7 +17,12 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef TITLE_H
+#define TITLE_H
+
extern int doTitle();
extern void showStory();
extern void gameover();
extern void doCredits();
+
+#endif
diff --git a/src/weapons.h b/src/weapons.h
index 2483a1f..0fd8493 100644
--- a/src/weapons.h
+++ b/src/weapons.h
@@ -1,6 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
+Copyright (C) 2015 Julian Marchant
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -16,7 +17,12 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#ifndef WEAPONS_H
+#define WEAPONS_H
+
extern object weapon[MAX_WEAPONS];
extern void setWeaponShapes();
extern void initWeapons();
+
+#endif