Skip to content

Commit

Permalink
Fixed the warp escape delay bug.
Browse files Browse the repository at this point in the history
That's embarassing.
  • Loading branch information
onpon4 committed May 24, 2020
1 parent 7ef5382 commit 9863aef
Show file tree
Hide file tree
Showing 58 changed files with 106 additions and 94 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# information. This file is offered as-is, without any warranty.

AC_PREREQ([2.69])
AC_INIT([Project: Starfighter], [2.1], [[email protected]], [starfighter])
AC_INIT([Project: Starfighter], [2.1.1], [[email protected]], [starfighter])
AM_INIT_AUTOMAKE([foreign -Wall -Werror])
AC_CONFIG_SRCDIR([src/Starfighter.c])
AC_CONFIG_HEADERS([config.h])
Expand Down
2 changes: 1 addition & 1 deletion data/credits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@
350 Project: Starfighter
020 Copyright 2003 Parallel Realities
020 Copyright 2012 Guus Sliepen, Astrid S. de Wijn and others
020 Copyright 2015-2019 Layla Marchant
020 Copyright 2015-2020 Layla Marchant
120 pr-starfighter.github.io
4 changes: 2 additions & 2 deletions locale/en.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Project: Starfighter Translatable Text
# Copyright (C) 2003 Parallel Relaities
# Copyright (C) 2011, 2012, 2013 Guus Sliepen
# Copyright (C) 2012, 2015-2019 Layla Marchant
# Copyright (C) 2012, 2015-2020 Layla 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
Expand All @@ -20,7 +20,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: 2.0.1\n"
"Project-Id-Version: 2.1.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-06 19:09-0500\n"
"PO-Revision-Date: 2020-03-06 19:22-0500\n"
Expand Down
4 changes: 2 additions & 2 deletions locale/pr-starfighter.pot
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Project: Starfighter Translatable Text
# Copyright (C) 2003 Parallel Relaities
# Copyright (C) 2011, 2012, 2013 Guus Sliepen
# Copyright (C) 2012, 2015-2019 Layla Marchant
# Copyright (C) 2012, 2015-2020 Layla 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
Expand All @@ -21,7 +21,7 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: 2.0.1\n"
"Project-Id-Version: 2.1.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-06 19:09-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
Expand Down
2 changes: 1 addition & 1 deletion src/Starfighter.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Project: Starfighter
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011, 2012 Guus Sliepen
Copyright (C) 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion src/alien.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011, 2012 Guus Sliepen
Copyright (C) 2012, 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2012, 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion src/alien.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
Copyright (C) 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion src/audio.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011, 2012 Guus Sliepen
Copyright (C) 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion src/audio.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011, 2012 Guus Sliepen
Copyright (C) 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion src/bullet.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011, 2012 Guus Sliepen
Copyright (C) 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion src/bullet.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
Copyright (C) 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion src/cargo.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
Copyright (C) 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion src/cargo.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
Copyright (C) 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion src/collectable.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011, 2012 Guus Sliepen
Copyright (C) 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion src/collectable.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
Copyright (C) 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion src/colors.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011, 2012, 2013 Guus Sliepen
Copyright (C) 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion src/colors.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
Copyright (C) 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion src/cutscene.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011, 2012, 2013 Guus Sliepen
Copyright (C) 2012, 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2012, 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion src/cutscene.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
Copyright (C) 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion src/defs.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011, 2012 Guus Sliepen
Copyright (C) 2012, 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2012, 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
10 changes: 9 additions & 1 deletion src/defs.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011, 2012 Guus Sliepen
Copyright (C) 2012, 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2012, 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -802,6 +802,14 @@ enum {
DIFFICULTY_MAX
};

// Engine state values (used for engine.done)
enum {
ENGINE_RUNNING = 0,
ENGINE_CLOSING,
ENGINE_SYSEXIT,
ENGINE_FORMATION
};

extern const char * const systemBackground[];
extern const int rate2reload[6];

Expand Down
2 changes: 1 addition & 1 deletion src/engine.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011, 2012, 2013 Guus Sliepen
Copyright (C) 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion src/engine.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
Copyright (C) 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion src/event.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011, 2012, 2013 Guus Sliepen
Copyright (C) 2012, 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2012, 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion src/event.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
Copyright (C) 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion src/explosion.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
Copyright (C) 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion src/explosion.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
Copyright (C) 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
28 changes: 16 additions & 12 deletions src/game.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011, 2012, 2013 Guus Sliepen
Copyright (C) 2012, 2014-2019 Layla Marchant <[email protected]>
Copyright (C) 2012, 2014-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -1444,11 +1444,12 @@ static void game_doPlayer()

if (engine.keyState[KEY_ESCAPE])
{
if ((engine.done == 0) && (engine.gameSection == SECTION_GAME) &&
if ((engine.done == ENGINE_RUNNING) &&
(engine.gameSection == SECTION_GAME) &&
(mission.remainingObjectives1 == 0))
{
audio_playSound(SFX_FLY, screen->w / 2, screen->h / 2);
engine.done = 2;
engine.done = ENGINE_SYSEXIT;
engine.missionCompleteTimer = (SDL_GetTicks() - 1);
}
}
Expand All @@ -1467,7 +1468,7 @@ static void game_doPlayer()
ymoved = 1;
}

if (engine.done == 0)
if (engine.done == ENGINE_RUNNING)
{
if (game.difficulty == DIFFICULTY_ORIGINAL)
{
Expand Down Expand Up @@ -2541,7 +2542,7 @@ int game_mainLoop()
engine.smx = 0;
engine.smy = 0;

engine.done = 0;
engine.done = ENGINE_RUNNING;

engine.counter = (SDL_GetTicks() + 1000);
engine.counter2 = (SDL_GetTicks() + 1000);
Expand Down Expand Up @@ -2581,7 +2582,7 @@ int game_mainLoop()
engine.keyState[KEY_ALTFIRE] = 0;
player_flushInput();

while (engine.done != 1)
while (engine.done != ENGINE_CLOSING)
{
renderer_update();

Expand All @@ -2605,13 +2606,16 @@ int game_mainLoop()
((game.difficulty == DIFFICULTY_ORIGINAL) ||
(game.difficulty == DIFFICULTY_NIGHTMARE) ||
(game.area == MISN_INTERCEPTION) ||
(game.area == MISN_ELLESH) || (game.area == MISN_MARS) ||
(mission_checkFailed()) || (collectable_numGood() <= 0)))
(game.area == MISN_ELLESH) ||
(game.area == MISN_MARS) ||
(mission_checkFailed()) ||
(collectable_numGood() <= 0) ||
(engine.done == ENGINE_SYSEXIT)))
{
if ((!mission_checkFailed()) && (game.area != MISN_VENUS))
{
player_leaveSector();
if ((engine.done == 2) &&
if ((engine.done == ENGINE_SYSEXIT) &&
(game.area != MISN_DORIM) &&
(game.area != MISN_SIVEDI))
{
Expand Down Expand Up @@ -2654,7 +2658,7 @@ int game_mainLoop()
}
else
{
engine.done = 1;
engine.done = ENGINE_CLOSING;
}
}
else
Expand All @@ -2668,7 +2672,7 @@ int game_mainLoop()
audio_setMusicVolume(engine.musicVolume);
if (SDL_GetTicks() >= engine.missionCompleteTimer)
{
engine.done = 1;
engine.done = ENGINE_CLOSING;
}
}
}
Expand Down Expand Up @@ -2716,7 +2720,7 @@ int game_mainLoop()
game_delayFrame();
}

if (!engine.done)
if (engine.done == ENGINE_RUNNING)
audio_resumeMusic();
}

Expand Down
2 changes: 1 addition & 1 deletion src/game.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
Copyright (C) 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion src/gfx.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011, 2012, 2013 Guus Sliepen
Copyright (C) 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion src/gfx.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011 Guus Sliepen
Copyright (C) 2015-2019 Layla Marchant <[email protected]>
Copyright (C) 2015-2020 Layla Marchant <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
Loading

0 comments on commit 9863aef

Please sign in to comment.