Added installation of starfighter.desktop and starfighter.png.
This commit is contained in:
parent
855481e965
commit
3c35f4043d
8
Makefile
8
Makefile
|
@ -8,11 +8,15 @@ PROG = starfighter
|
|||
DOCS = docs/*
|
||||
DATA = data gfx sound music
|
||||
DATAFILES = data/* gfx/* sound/* music/*
|
||||
LAUNCHER = misc/starfighter.desktop
|
||||
ICON = misc/starfighter.png
|
||||
|
||||
PREFIX ?= /usr
|
||||
BINDIR ?= $(PREFIX)/games/
|
||||
DATADIR ?= $(PREFIX)/share/games/parallelrealities/
|
||||
DOCDIR ?= $(PREFIX)/share/doc/$(PROG)/
|
||||
MENUDIR ?= $(PREFIX)/share/applications/
|
||||
ICONDIR ?= $(PREFIX)/share/icons/
|
||||
|
||||
# top-level rule to create the program.
|
||||
ALL = $(PROG)
|
||||
|
@ -36,10 +40,14 @@ install: $(ALL)
|
|||
mkdir -p $(DESTDIR)$(BINDIR)
|
||||
mkdir -p $(DESTDIR)$(DATADIR)
|
||||
mkdir -p $(DESTDIR)$(DOCDIR)
|
||||
mkdir -p $(MENUDIR)
|
||||
mkdir -p $(ICONDIR)
|
||||
|
||||
install -m 755 $(PROG) $(DESTDIR)$(BINDIR)$(PROG)
|
||||
cp -r $(DATA) $(DESTDIR)$(DATADIR)
|
||||
cp $(DOCS) $(DESTDIR)$(DOCDIR)
|
||||
cp $(LAUNCHER) $(MENUDIR)
|
||||
cp $(ICON) $(ICONDIR)
|
||||
|
||||
optimise:
|
||||
advpng -z gfx/*.png
|
||||
|
|
|
@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
typedef struct Event_ {
|
||||
|
||||
int time;
|
||||
Uint32 time;
|
||||
int face;
|
||||
char message[255];
|
||||
int entity;
|
||||
|
|
|
@ -144,6 +144,7 @@ bool loadGame(int slot)
|
|||
{
|
||||
char filename[PATH_MAX];
|
||||
FILE *fp;
|
||||
unsigned long timeTaken;
|
||||
|
||||
sprintf(filename, "%ssave%.2d.sav", engine.configDirectory, slot);
|
||||
fp = fopen(filename, "rb");
|
||||
|
@ -195,10 +196,14 @@ bool loadGame(int slot)
|
|||
&game.totalOtherKills, &game.shieldPickups,
|
||||
&game.rocketPickups, &game.cellPickups, &game.powerups,
|
||||
&game.minesKilled, &game.slavesRescued) < 15) ||
|
||||
(fscanf(fp, "%ld%*c", &game.timeTaken) < 1))
|
||||
(fscanf(fp, "%lu%*c", &timeTaken) < 1))
|
||||
{
|
||||
printf("Warning: Save data is not correctly formatted. Some data may be lost.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
engine.timeTaken = (Uint32)(timeTaken);
|
||||
}
|
||||
game.destinationPlanet = game.stationedPlanet;
|
||||
break;
|
||||
default:
|
||||
|
@ -282,7 +287,7 @@ void saveGame(int slot)
|
|||
"%d\n"
|
||||
"%d %d\n"
|
||||
"%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d\n"
|
||||
"%ld\n",
|
||||
"%lu\n",
|
||||
|
||||
game.saveFormat,
|
||||
|
||||
|
@ -325,7 +330,7 @@ void saveGame(int slot)
|
|||
game.rocketPickups, game.cellPickups, game.powerups,
|
||||
game.minesKilled, game.slavesRescued,
|
||||
|
||||
game.timeTaken) <= 0)
|
||||
(unsigned long)(game.timeTaken)) <= 0)
|
||||
{
|
||||
printf("Error Saving Game to Slot %d\n", slot);
|
||||
}
|
||||
|
|
|
@ -911,9 +911,10 @@ void missionFinishedScreen()
|
|||
|
||||
game.timeTaken += engine.timeTaken;
|
||||
|
||||
snprintf(temp, sizeof temp, "Mission Time: %2ld:%02ld:%02ld",
|
||||
engine.timeTaken / 3600, (engine.timeTaken / 60) % 60,
|
||||
engine.timeTaken % 60);
|
||||
snprintf(temp, sizeof temp, "Mission Time: %2lu:%02lu:%02lu",
|
||||
(unsigned long)(engine.timeTaken / 3600),
|
||||
(unsigned long)((engine.timeTaken / 60) % 60),
|
||||
(unsigned long)(engine.timeTaken % 60));
|
||||
|
||||
screen_renderString(temp, -1, 500, FONT_WHITE);
|
||||
|
||||
|
|
Loading…
Reference in New Issue