Finished removing Starfighter.h.

This commit is contained in:
onpon4 2017-01-25 10:48:29 -05:00
parent e209c9c2f1
commit 788ee5eae4
22 changed files with 134 additions and 89 deletions

View File

@ -2,7 +2,7 @@
Project: Starfighter
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011, 2012 Guus Sliepen
Copyright (C) 2015, 2016 Julie Marchant <onpon4@riseup.net>
Copyright (C) 2015-2017 Julie Marchant <onpon4@riseup.net>
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 <http://www.gnu.org/licenses/>.
*/
#include "Starfighter.h"
#include "defs.h"
#include "structs.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#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;

View File

@ -1,62 +0,0 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
Copyright (C) 2015, 2016 Julie Marchant <onpon4@riseup.net>
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 <http://www.gnu.org/licenses/>.
*/
#ifndef STARFIGHTER_H
#define STARFIGHTER_H
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <math.h>
#include <sys/stat.h>
#include <unistd.h>
#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

View File

@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <math.h>
#include <stdlib.h>
#include "defs.h"
#include "structs.h"

View File

@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <math.h>
#include <stdlib.h>
#include "defs.h"
#include "structs.h"

View File

@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <math.h>
#include <stdlib.h>
#include "defs.h"
#include "structs.h"

View File

@ -17,6 +17,9 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#include <string.h>
#include "colors.h"
#include "defs.h"
#include "structs.h"

View File

@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <errno.h>
#include <pwd.h>
#include <stdio.h>
#include <sys/stat.h>
#include <unistd.h>

View File

@ -17,8 +17,8 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GLOBALS_H
#define GLOBALS_H
#ifndef ENGINE_H
#define ENGINE_H
#include "SDL.h"

View File

@ -17,6 +17,9 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#include <string.h>
#include "defs.h"
#include "structs.h"

View File

@ -17,6 +17,8 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#include "defs.h"
#include "structs.h"

View File

@ -18,6 +18,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include "SDL.h"
#include "colors.h"
#include "defs.h"

View File

@ -18,6 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include "SDL.h"
#include "SDL_image.h"

View File

@ -17,6 +17,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#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);

View File

@ -17,6 +17,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "SDL.h"
#include "colors.h"

View File

@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011, 2012, 2013 Guus Sliepen
Copyright (C) 2012, 2015, 2016 Julie Marchant <onpon4@riseup.net>
Copyright (C) 2012, 2015-2017 Julie Marchant <onpon4@riseup.net>
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 <http://www.gnu.org/licenses/>.
*/
#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;

View File

@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011, 2012, 2013 Guus Sliepen
Copyright (C) 2015, 2016 Julie Marchant <onpon4@riseup.net>
Copyright (C) 2015-2017 Julie Marchant <onpon4@riseup.net>
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 <http://www.gnu.org/licenses/>.
*/
#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

View File

@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011, 2012, 2013 Guus Sliepen
Copyright (C) 2015 Julie Marchant <onpon4@riseup.net>
Copyright (C) 2015, 2017 Julie Marchant <onpon4@riseup.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011, 2012, 2013 Guus Sliepen
Copyright (C) 2015, 2016 Julie Marchant <onpon4@riseup.net>
Copyright (C) 2015-2017 Julie Marchant <onpon4@riseup.net>
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 <http://www.gnu.org/licenses/>.
*/
#include "Starfighter.h"
#include <stdio.h>
#include <sys/stat.h>
#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];
/*

View File

@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011, 2012 Guus Sliepen
Copyright (C) 2015, 2016 Julie Marchant <onpon4@riseup.net>
Copyright (C) 2015-2017 Julie Marchant <onpon4@riseup.net>
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 <http://www.gnu.org/licenses/>.
*/
#include "Starfighter.h"
#include <stdlib.h>
#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;

View File

@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011, 2012, 2013 Guus Sliepen
Copyright (C) 2015, 2016 Julie Marchant <onpon4@riseup.net>
Copyright (C) 2015-2017 Julie Marchant <onpon4@riseup.net>
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 <http://www.gnu.org/licenses/>.
*/
#include "Starfighter.h"
#include <stdio.h>
#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;

View File

@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011, 2012, 2013 Guus Sliepen
Copyright (C) 2012, 2015, 2016 Julie Marchant <onpon4@riseup.net>
Copyright (C) 2012, 2015-2017 Julie Marchant <onpon4@riseup.net>
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 <http://www.gnu.org/licenses/>.
*/
#include "Starfighter.h"
#include <stdlib.h>
#include <stdio.h>
#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);

View File

@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011, 2013 Guus Sliepen
Copyright (C) 2015, 2016 Julie Marchant <onpon4@riseup.net>
Copyright (C) 2015-2017 Julie Marchant <onpon4@riseup.net>
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 <http://www.gnu.org/licenses/>.
*/
#include "Starfighter.h"
#include "defs.h"
#include "structs.h"