diff --git a/src/Starfighter.cpp b/src/Starfighter.cpp index 6ae33cf..1d99e2d 100644 --- a/src/Starfighter.cpp +++ b/src/Starfighter.cpp @@ -2,7 +2,7 @@ Project: Starfighter Copyright (C) 2003 Parallel Realities Copyright (C) 2011, 2012 Guus Sliepen -Copyright (C) 2015, 2016 Julie Marchant +Copyright (C) 2015-2017 Julie Marchant This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -18,15 +18,38 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "Starfighter.h" - -#include "defs.h" -#include "structs.h" +#include +#include +#include +#include +#include #ifdef __APPLE__ #include "CoreFoundation/CoreFoundation.h" #endif +#include "SDL.h" + +#ifndef NOSOUND +#include "SDL_mixer.h" +#endif + +#include "colors.h" +#include "defs.h" +#include "structs.h" + +#include "alien.h" +#include "audio.h" +#include "cutscene.h" +#include "engine.h" +#include "game.h" +#include "gfx.h" +#include "intermission.h" +#include "renderer.h" +#include "screen.h" +#include "title.h" +#include "weapons.h" + int main(int argc, char **argv) { int cheatAttempt; diff --git a/src/Starfighter.h b/src/Starfighter.h deleted file mode 100644 index 76d916a..0000000 --- a/src/Starfighter.h +++ /dev/null @@ -1,62 +0,0 @@ -/* -Copyright (C) 2003 Parallel Realities -Copyright (C) 2011 Guus Sliepen -Copyright (C) 2015, 2016 Julie Marchant - -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 3 -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, see . -*/ - -#ifndef STARFIGHTER_H -#define STARFIGHTER_H - -#include -#include -#include -#include -#include -#include - -#include "SDL.h" -#include "SDL_image.h" - -#ifndef NOSOUND -#include "SDL_mixer.h" -#endif - -#include "alien.h" -#include "audio.h" -#include "bullet.h" -#include "cargo.h" -#include "collectable.h" -#include "colors.h" -#include "cutscene.h" -#include "engine.h" -#include "event.h" -#include "explosion.h" -#include "game.h" -#include "gfx.h" -#include "intermission.h" -#include "save.h" -#include "info.h" -#include "mission.h" -#include "player.h" -#include "renderer.h" -#include "screen.h" -#include "ship.h" -#include "shop.h" -#include "title.h" -#include "weapons.h" -#include "window.h" - -#endif diff --git a/src/alien.cpp b/src/alien.cpp index 7bcf4f4..9fe5cda 100644 --- a/src/alien.cpp +++ b/src/alien.cpp @@ -18,6 +18,7 @@ along with this program. If not, see . */ #include +#include #include "defs.h" #include "structs.h" diff --git a/src/bullet.cpp b/src/bullet.cpp index 86a567a..0a5a49a 100644 --- a/src/bullet.cpp +++ b/src/bullet.cpp @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include +#include #include "defs.h" #include "structs.h" diff --git a/src/collectable.cpp b/src/collectable.cpp index f3d4215..d7ac000 100644 --- a/src/collectable.cpp +++ b/src/collectable.cpp @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include +#include #include "defs.h" #include "structs.h" diff --git a/src/cutscene.cpp b/src/cutscene.cpp index cc164f6..429ad8c 100644 --- a/src/cutscene.cpp +++ b/src/cutscene.cpp @@ -17,6 +17,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#include +#include + #include "colors.h" #include "defs.h" #include "structs.h" diff --git a/src/engine.cpp b/src/engine.cpp index 3a178f0..d83a6bf 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -19,6 +19,7 @@ along with this program. If not, see . #include #include +#include #include #include diff --git a/src/engine.h b/src/engine.h index 422a057..d241923 100644 --- a/src/engine.h +++ b/src/engine.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 GLOBALS_H -#define GLOBALS_H +#ifndef ENGINE_H +#define ENGINE_H #include "SDL.h" diff --git a/src/event.cpp b/src/event.cpp index 06a532e..2fb7b7c 100644 --- a/src/event.cpp +++ b/src/event.cpp @@ -17,6 +17,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#include +#include + #include "defs.h" #include "structs.h" diff --git a/src/explosion.cpp b/src/explosion.cpp index 48e4723..f40a610 100644 --- a/src/explosion.cpp +++ b/src/explosion.cpp @@ -17,6 +17,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#include + #include "defs.h" #include "structs.h" diff --git a/src/game.cpp b/src/game.cpp index 1fd7a3c..4906dcf 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -18,6 +18,10 @@ along with this program. If not, see . */ #include +#include +#include + +#include "SDL.h" #include "colors.h" #include "defs.h" diff --git a/src/gfx.cpp b/src/gfx.cpp index 4109c0a..ac96445 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -18,6 +18,8 @@ along with this program. If not, see . */ #include +#include +#include #include "SDL.h" #include "SDL_image.h" diff --git a/src/intermission.cpp b/src/intermission.cpp index 807d636..1273757 100644 --- a/src/intermission.cpp +++ b/src/intermission.cpp @@ -17,6 +17,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#include +#include +#include + #include "SDL.h" #include "colors.h" @@ -1489,7 +1493,7 @@ int intermission() } - if (rand() % 1000 < 2) + if (CHANCE(1. / 500)) { engine.ssx = RANDRANGE(-100, 100); engine.ssy = RANDRANGE(-100, 100); diff --git a/src/mission.cpp b/src/mission.cpp index 847cbf4..4684f68 100644 --- a/src/mission.cpp +++ b/src/mission.cpp @@ -17,6 +17,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#include +#include +#include + #include "SDL.h" #include "colors.h" diff --git a/src/player.cpp b/src/player.cpp index 31f9dd1..7b40ccd 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -1,7 +1,7 @@ /* Copyright (C) 2003 Parallel Realities Copyright (C) 2011, 2012, 2013 Guus Sliepen -Copyright (C) 2012, 2015, 2016 Julie Marchant +Copyright (C) 2012, 2015-2017 Julie Marchant This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -17,11 +17,20 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "Starfighter.h" +#include "SDL.h" #include "defs.h" #include "structs.h" +#include "alien.h" +#include "audio.h" +#include "engine.h" +#include "game.h" +#include "gfx.h" +#include "screen.h" +#include "weapons.h" +#include "window.h" + Object player; int player_chargerFired = 0; diff --git a/src/radio.cpp b/src/radio.cpp index f65487e..2babbcb 100644 --- a/src/radio.cpp +++ b/src/radio.cpp @@ -1,7 +1,7 @@ /* Copyright (C) 2003 Parallel Realities Copyright (C) 2011, 2012, 2013 Guus Sliepen -Copyright (C) 2015, 2016 Julie Marchant +Copyright (C) 2015-2017 Julie Marchant This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -17,11 +17,13 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "Starfighter.h" +#include "SDL.h" #include "defs.h" #include "structs.h" +#include "gfx.h" + /* Sets a radio message that appears at the top of the screen. Used for script events, etc. We send a message priority too, since we don't want diff --git a/src/renderer.cpp b/src/renderer.cpp index 0d2fee9..8cb576e 100644 --- a/src/renderer.cpp +++ b/src/renderer.cpp @@ -1,7 +1,7 @@ /* Copyright (C) 2003 Parallel Realities Copyright (C) 2011, 2012, 2013 Guus Sliepen -Copyright (C) 2015 Julie Marchant +Copyright (C) 2015, 2017 Julie Marchant This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License diff --git a/src/save.cpp b/src/save.cpp index 6b97eb4..998ecc3 100644 --- a/src/save.cpp +++ b/src/save.cpp @@ -1,7 +1,7 @@ /* Copyright (C) 2003 Parallel Realities Copyright (C) 2011, 2012, 2013 Guus Sliepen -Copyright (C) 2015, 2016 Julie Marchant +Copyright (C) 2015-2017 Julie Marchant This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -17,11 +17,22 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "Starfighter.h" +#include +#include + +#include "SDL.h" #include "defs.h" #include "structs.h" +#include "engine.h" +#include "game.h" +#include "gfx.h" +#include "intermission.h" +#include "player.h" +#include "screen.h" +#include "weapons.h" + static char saveSlot[10][25]; /* diff --git a/src/ship.cpp b/src/ship.cpp index 8cd307a..115191e 100644 --- a/src/ship.cpp +++ b/src/ship.cpp @@ -1,7 +1,7 @@ /* Copyright (C) 2003 Parallel Realities Copyright (C) 2011, 2012 Guus Sliepen -Copyright (C) 2015, 2016 Julie Marchant +Copyright (C) 2015-2017 Julie Marchant This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -17,11 +17,24 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "Starfighter.h" +#include + +#include "SDL.h" #include "defs.h" #include "structs.h" +#include "alien.h" +#include "audio.h" +#include "bullet.h" +#include "engine.h" +#include "explosion.h" +#include "game.h" +#include "info.h" +#include "player.h" +#include "screen.h" +#include "weapons.h" + int ship_collision(Object *ship, Object *otherShip) { float x0 = ship->x; diff --git a/src/shop.cpp b/src/shop.cpp index 277ae9a..ccdb3ee 100644 --- a/src/shop.cpp +++ b/src/shop.cpp @@ -1,7 +1,7 @@ /* Copyright (C) 2003 Parallel Realities Copyright (C) 2011, 2012, 2013 Guus Sliepen -Copyright (C) 2015, 2016 Julie Marchant +Copyright (C) 2015-2017 Julie Marchant This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -17,11 +17,21 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "Starfighter.h" +#include + +#include "SDL.h" #include "defs.h" #include "structs.h" +#include "engine.h" +#include "game.h" +#include "gfx.h" +#include "player.h" +#include "save.h" +#include "screen.h" +#include "weapons.h" + typedef struct ShopItem_ { int x, y; diff --git a/src/title.cpp b/src/title.cpp index 63d9f7f..1300955 100644 --- a/src/title.cpp +++ b/src/title.cpp @@ -1,7 +1,7 @@ /* Copyright (C) 2003 Parallel Realities Copyright (C) 2011, 2012, 2013 Guus Sliepen -Copyright (C) 2012, 2015, 2016 Julie Marchant +Copyright (C) 2012, 2015-2017 Julie Marchant This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -17,11 +17,28 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "Starfighter.h" +#include +#include +#include "SDL.h" + +#include "colors.h" #include "defs.h" #include "structs.h" +#include "alien.h" +#include "audio.h" +#include "engine.h" +#include "explosion.h" +#include "game.h" +#include "gfx.h" +#include "player.h" +#include "renderer.h" +#include "save.h" +#include "screen.h" +#include "title.h" +#include "window.h" + static int showGameMenu(int continueSaveSlot) { screen_blitText(TS_START_NEW_GAME); @@ -432,7 +449,7 @@ int title_show() 5, screen->h - 60, FONT_WHITE, 0, gfx_background); gfx_renderString("Copyright Guus Sliepen, Astrid S. de Wijn and others 2012", 5, screen->h - 40, FONT_WHITE, 0, gfx_background); - gfx_renderString("Copyright 2015, 2016 Julie Marchant", + gfx_renderString("Copyright 2015-2017 Julie Marchant", 5, screen->h - 20, FONT_WHITE, 0, gfx_background); gfx_renderString(buildVersion, screen->w - 6 - strlen(buildVersion) * 9, screen->h - 20, FONT_WHITE, 0, gfx_background); diff --git a/src/weapons.cpp b/src/weapons.cpp index 0a6eb1f..4585cd0 100644 --- a/src/weapons.cpp +++ b/src/weapons.cpp @@ -1,7 +1,7 @@ /* Copyright (C) 2003 Parallel Realities Copyright (C) 2011, 2013 Guus Sliepen -Copyright (C) 2015, 2016 Julie Marchant +Copyright (C) 2015-2017 Julie Marchant This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -17,8 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "Starfighter.h" - #include "defs.h" #include "structs.h"