Skip to content

Commit

Permalink
Finalize version 1.2
Browse files Browse the repository at this point in the history
Move Makefile
Install icon and .desktop entry
Update .gitignore
  • Loading branch information
carstene1ns committed Jun 2, 2019
1 parent 07410d1 commit 958e0c3
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 30 deletions.
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
alex4
*.o
/src/alex4.hi
/src/alex4.sav
/src/data
/src/log.txt
alex4.hi
alex4.sav
log.txt
allegro.log
44 changes: 44 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
TARGET = alex4
PREFIX = /usr/local
DATADIR = $(PREFIX)/share/$(TARGET)

CFLAGS ?= -g -Wall -O2
CFLAGS += `allegro-config --cflags`
LIBS = -laldmb -ldumb `allegro-config --libs`
DEFINES = -DDATADIR=\"$(DATADIR)/\"

OBJS = src/main.o \
src/actor.o \
src/bullet.o \
src/control.o \
src/edit.o \
src/hisc.o \
src/map.o \
src/options.o \
src/particle.o \
src/player.o \
src/script.o \
src/scroller.o \
src/shooter.o \
src/timer.o \
src/token.o \
src/unix.o

$(TARGET): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)

%.o: %.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -o $@ -c $<

install: $(TARGET)
mkdir -p $(DESTDIR)$(PREFIX)/bin
mkdir -p $(DESTDIR)$(DATADIR)
mkdir -p $(DESTDIR)$(PREFIX)/share/pixmaps
mkdir -p $(DESTDIR)$(PREFIX)/share/applications
install -p -m 755 $(TARGET) $(DESTDIR)$(PREFIX)/bin
install -p -m 644 data/*.dat $(DESTDIR)$(DATADIR)
install -p -m 644 $(TARGET).png $(DESTDIR)$(PREFIX)/share/pixmaps
install -p -m 644 $(TARGET).desktop $(DESTDIR)$(PREFIX)/share/applications

clean:
rm -f $(OBJS) $(TARGET) *~
9 changes: 9 additions & 0 deletions alex4.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Desktop Entry]
Type=Application
Name=Alex the Allegator 4
Comment=Retro platform game
Icon=alex4
Exec=alex4
Terminal=false
Categories=Game;ActionGame;
StartupNotify=false
Binary file added alex4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 0 additions & 24 deletions src/Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ void load_level_files(const char *filename) {
mode = 2;
}
else {
char full_path_to_map[1024];
char full_path_to_map[2048];

clear_trailing_whitespace(buf);
sprintf(full_path_to_map, "%s%s", path, buf);
Expand Down
2 changes: 1 addition & 1 deletion src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "control.h"

// version string
#define GAME_VERSION_STR "v1.1"
#define GAME_VERSION_STR "v1.2"

// sample shortcuts
#define SMPL_STARTUP 0
Expand Down

0 comments on commit 958e0c3

Please sign in to comment.