Some cleanup, bumped version number.
This commit is contained in:
parent
e6f8b3a65f
commit
e6c59d2a24
2
Makefile
2
Makefile
|
@ -3,7 +3,7 @@ CXXFLAGS += `pkg-config --cflags sdl2 SDL2_image SDL2_mixer` -DLINUX
|
|||
LIBS = `pkg-config --libs sdl2 SDL2_image SDL2_mixer`
|
||||
OBJS = ai.o aliens.o audio.o bullets.o cargo.o collectable.o comms.o debris.o events.o explosions.o game.o globals.o graphics.o init.o intermission.o loadSave.o messages.o misc.o missions.o player.o resources.o script.o shop.o Starfighter.o title.o weapons.o
|
||||
|
||||
VERSION = 1.2-SDL2
|
||||
VERSION = 1.3
|
||||
PROG = starfighter
|
||||
DOCS = docs/*
|
||||
DATA = data gfx sound
|
||||
|
|
|
@ -21,7 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
chdir(DATADIR);
|
||||
if (chdir(DATADIR) == -1)
|
||||
printf("Warning: failed to change directory to \"%s\"\n", DATADIR);
|
||||
|
||||
defineGlobals(); // Must do this first!
|
||||
|
||||
|
|
|
@ -58,7 +58,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "script.h"
|
||||
#include "shop.h"
|
||||
#include "title.h"
|
||||
#include "version.h"
|
||||
#include "weapons.h"
|
||||
|
||||
#endif
|
||||
|
|
|
@ -289,9 +289,6 @@ enum {
|
|||
|
||||
#define SHIP_HIT_INDEX 60
|
||||
|
||||
#ifndef PACKLOCATION
|
||||
#define PACKLOCATION "starfighter.pak"
|
||||
#endif
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX 4096
|
||||
#endif
|
||||
|
|
|
@ -202,7 +202,11 @@ static void setSystemPlanets()
|
|||
|
||||
for (int i = 0 ; i < 10 ; i++)
|
||||
{
|
||||
fscanf(fp, "%d %s %d", &distance, name, &image);
|
||||
if (fscanf(fp, "%d %s %d", &distance, name, &image) < 3)
|
||||
{
|
||||
printf("Warning: Data file \"%s\" is not correctly formatted\n", string);
|
||||
break;
|
||||
}
|
||||
|
||||
systemPlanet[i].y = distance;
|
||||
strcpy(systemPlanet[i].name, name);
|
||||
|
@ -217,9 +221,13 @@ static void setSystemPlanets()
|
|||
|
||||
for (int i = 0 ; i < 10 ; i++)
|
||||
{
|
||||
fscanf(fp, "%d %d %s%*c", &messageMission, &messageSlot, face);
|
||||
fscanf(fp, "%[^\n]%*c", from);
|
||||
fscanf(fp, "%[^\n]%*c", subject);
|
||||
if ((fscanf(fp, "%d %d %s%*c", &messageMission, &messageSlot, face) < 3) ||
|
||||
(fscanf(fp, "%[^\n]%*c", from) < 1) ||
|
||||
(fscanf(fp, "%[^\n]%*c", subject) < 1))
|
||||
{
|
||||
printf("Warning: Data file \"%s\" is not correctly formatted\n", string);
|
||||
break;
|
||||
}
|
||||
|
||||
systemPlanet[i].messageMission = messageMission;
|
||||
systemPlanet[i].messageSlot = messageSlot;
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
|
Loading…
Reference in New Issue