pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

openfodder: update to openfodder-1.4.0



Module Name:	pkgsrc-wip
Committed By:	Yorick Hardy <yorickhardy%gmail.com@localhost>
Pushed By:	yhardy
Date:		Sun Feb 4 23:40:49 2018 +0200
Changeset:	e9a18a79028cfae4f4f77b294881ef536d5e304d

Modified Files:
	openfodder/Makefile
	openfodder/PLIST
	openfodder/distinfo
	openfodder/patches/patch-Source_stdafx.cpp

Log Message:
openfodder: update to openfodder-1.4.0

From the github release page:

Whats New

* Interactive Campaign selection menu (replaces platform selection)
* Custom Campaigns
* Single Maps
* Pre-Alpha random map generator

Windows Installer

* Packaged installation now provided
* Installer will ask for paths to copy Dos/Amiga data, cancel if you don't have a version
* The path "%USERPROFILE%\Documents\OpenFodder" is now used for data and save games

Notes

* The Save game format has changed
* The engine will default to the Amiga platform data, if available.
* It is not currently possible to switch or select platform without removing data

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=e9a18a79028cfae4f4f77b294881ef536d5e304d

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 openfodder/Makefile                        |  23 +--
 openfodder/PLIST                           | 233 +++++++++++++++--------------
 openfodder/distinfo                        |  14 +-
 openfodder/patches/patch-Source_stdafx.cpp |  37 +++--
 4 files changed, 169 insertions(+), 138 deletions(-)

diffs:
diff --git a/openfodder/Makefile b/openfodder/Makefile
index 70047bbded..78853fc432 100644
--- a/openfodder/Makefile
+++ b/openfodder/Makefile
@@ -1,11 +1,15 @@
 # $NetBSD$
 
 GITHUB_PROJECT=	openfodder
-DISTNAME=	1.3.1
+DISTNAME=	1.4.0
 PKGNAME=	${GITHUB_PROJECT}-${DISTNAME}
 CATEGORIES=	games
 MASTER_SITES=	${MASTER_SITE_GITHUB:=segrax/}
 DIST_SUBDIR=	${GITHUB_PROJECT}
+DISTFILES=	${DEFAULT_DISTFILES}
+DISTFILES+=	data-${PKGVERSION_NOREV}.zip
+SITES.data-1.4.0.zip= \
+		-https://github.com/OpenFodder/data/releases/download/1.4/OpenFodder.zip
 
 MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=	https://github.com/segrax/openfodder/
@@ -13,31 +17,30 @@ COMMENT=	Engine for the Cannon Fodder game
 LICENSE=	gnu-gpl-v3
 
 WRKSRC=		${WRKDIR}/openfodder-${PKGVERSION_NOREV}
-USE_LANGUAGES=	c++
+USE_LANGUAGES=	c++14
 
-CXXFLAGS+=	-std=c++0x
-CXXFLAGS+=	-D OPENFODDER_DATADIR=\"${PREFIX}/share/openfodder\"
+CXXFLAGS+=	-D OPENFODDER_DATADIR=\"${PREFIX}/share/\"
 CXXFLAGS+=	-I${WRKSRC}/Source
 CXXFLAGS+=	`sdl2-config --cflags`
 LIBS+=		`sdl2-config --libs`
 LIBS+=		-lSDL2_mixer
 LIBS+=		${X11_LDFLAGS}
 
-FODDER_SRCDIRS=	Source Source/PC Source/Amiga
+FODDER_SRCDIRS=	Source Source/Amiga Source/PC Source/Structures
 FODDER_SRCS=	${FODDER_SRCDIRS:=/*.cpp}
 
-INSTALLATION_DIRS+=	bin share/openfodder
+INSTALLATION_DIRS+=	bin share/OpenFodder
 
 do-build:
 	cd ${WRKSRC} && ${CXX} ${CXXFLAGS} -o OpenFodder ${FODDER_SRCS} ${LIBS}
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/OpenFodder ${DESTDIR}${PREFIX}/bin
-	cd ${WRKSRC}/Run && ${FIND} . -type d | while read d; do \
-		${INSTALL_DATA_DIR} "${DESTDIR}${PREFIX}/share/openfodder/$$d" || exit 1; \
+	cd ${WRKDIR}/OpenFodder && ${FIND} . -type d | while read d; do \
+		${INSTALL_DATA_DIR} "${DESTDIR}${PREFIX}/share/OpenFodder/$$d" || exit 1; \
 	done
-	cd ${WRKSRC}/Run && ${FIND} . -type f | while read f; do \
-		${INSTALL_DATA} "$$f" "${DESTDIR}${PREFIX}/share/openfodder/$${f%/*}" || exit 1; \
+	cd ${WRKDIR}/OpenFodder && ${FIND} . -type f | while read f; do \
+		${INSTALL_DATA} "$$f" "${DESTDIR}${PREFIX}/share/OpenFodder/$${f%/*}" || exit 1; \
 	done
 
 .include "../../audio/SDL2_mixer/buildlink3.mk"
diff --git a/openfodder/PLIST b/openfodder/PLIST
index d00deb56c9..7617d01421 100644
--- a/openfodder/PLIST
+++ b/openfodder/PLIST
@@ -1,114 +1,123 @@
 @comment $NetBSD$
 bin/OpenFodder
-share/openfodder/Data/Amiga/_AmigaDataHere
-share/openfodder/Data/AmigaFormat_XMAS/AFXBASE.BLK
-share/openfodder/Data/AmigaFormat_XMAS/AFXBASE.INS
-share/openfodder/Data/AmigaFormat_XMAS/AFXBASE.SNG
-share/openfodder/Data/AmigaFormat_XMAS/AFXSUB0.BLK
-share/openfodder/Data/AmigaFormat_XMAS/_AmigaFormatDataHere
-share/openfodder/Data/AmigaFormat_XMAS/afxarmy.lbm
-share/openfodder/Data/AmigaFormat_XMAS/afxbase.bht
-share/openfodder/Data/AmigaFormat_XMAS/afxbase.hit
-share/openfodder/Data/AmigaFormat_XMAS/afxbase.pal
-share/openfodder/Data/AmigaFormat_XMAS/afxbase.swp
-share/openfodder/Data/AmigaFormat_XMAS/afxcopt.lbm
-share/openfodder/Data/AmigaFormat_XMAS/afxsub0.bht
-share/openfodder/Data/AmigaFormat_XMAS/afxsub0.hit
-share/openfodder/Data/AmigaFormat_XMAS/afxsub0.swp
-share/openfodder/Data/AmigaFormat_XMAS/apmenu.lbm
-share/openfodder/Data/AmigaFormat_XMAS/mapm1.map
-share/openfodder/Data/AmigaFormat_XMAS/mapm1.spt
-share/openfodder/Data/AmigaFormat_XMAS/mapm2.map
-share/openfodder/Data/AmigaFormat_XMAS/mapm2.spt
-share/openfodder/Data/AmigaFormat_XMAS/pstuff.lbm
-share/openfodder/Data/Amiga_CD/_AmigaCD32DataHere
-share/openfodder/Data/Custom/Segras First.map
-share/openfodder/Data/Custom/Segras First.spt
-share/openfodder/Data/Dos2_CD/_Dos2CDDataHere
-share/openfodder/Data/Dos_CD/_DosCDDataHere
-share/openfodder/Data/Plus/1.lbm
-share/openfodder/Data/Plus/10.lbm
-share/openfodder/Data/Plus/11.lbm
-share/openfodder/Data/Plus/2.lbm
-share/openfodder/Data/Plus/3.lbm
-share/openfodder/Data/Plus/4.lbm
-share/openfodder/Data/Plus/5.lbm
-share/openfodder/Data/Plus/6.lbm
-share/openfodder/Data/Plus/7.lbm
-share/openfodder/Data/Plus/8.lbm
-share/openfodder/Data/Plus/9.lbm
-share/openfodder/Data/Plus/apmenu.lbm
-share/openfodder/Data/Plus/junarmy.lbm
-share/openfodder/Data/Plus/junbase.bht
-share/openfodder/Data/Plus/junbase.blk
-share/openfodder/Data/Plus/junbase.hit
-share/openfodder/Data/Plus/junbase.ins
-share/openfodder/Data/Plus/junbase.pal
-share/openfodder/Data/Plus/junbase.sng
-share/openfodder/Data/Plus/junbase.swp
-share/openfodder/Data/Plus/juncopt.lbm
-share/openfodder/Data/Plus/junsub1.bht
-share/openfodder/Data/Plus/junsub1.blk
-share/openfodder/Data/Plus/junsub1.hit
-share/openfodder/Data/Plus/junsub1.swp
-share/openfodder/Data/Plus/mapm1.map
-share/openfodder/Data/Plus/mapm1.spt
-share/openfodder/Data/Plus/mapm2.map
-share/openfodder/Data/Plus/mapm2.spt
-share/openfodder/Data/Plus/mapm3.map
-share/openfodder/Data/Plus/mapm3.spt
-share/openfodder/Data/Plus/mapm4.map
-share/openfodder/Data/Plus/mapm4.spt
-share/openfodder/Data/Plus/pstuff.lbm
-share/openfodder/Data/WAV/rjp.DESBASE(1).wav
-share/openfodder/Data/WAV/rjp.DESBASE(2).wav
-share/openfodder/Data/WAV/rjp.DESBASE(3).wav
-share/openfodder/Data/WAV/rjp.DESBASE(4).wav
-share/openfodder/Data/WAV/rjp.DESBASE(5).wav
-share/openfodder/Data/WAV/rjp.ICEBASE(1).wav
-share/openfodder/Data/WAV/rjp.ICEBASE(2).wav
-share/openfodder/Data/WAV/rjp.ICEBASE(3).wav
-share/openfodder/Data/WAV/rjp.ICEBASE(4).wav
-share/openfodder/Data/WAV/rjp.ICEBASE(5).wav
-share/openfodder/Data/WAV/rjp.INTBASE(1).wav
-share/openfodder/Data/WAV/rjp.INTBASE(2).wav
-share/openfodder/Data/WAV/rjp.INTBASE(3).wav
-share/openfodder/Data/WAV/rjp.INTBASE(4).wav
-share/openfodder/Data/WAV/rjp.INTBASE(5).wav
-share/openfodder/Data/WAV/rjp.INTBASE(6).wav
-share/openfodder/Data/WAV/rjp.INTBASE(7).wav
-share/openfodder/Data/WAV/rjp.JON(1).wav
-share/openfodder/Data/WAV/rjp.JON(10).wav
-share/openfodder/Data/WAV/rjp.JON(11).wav
-share/openfodder/Data/WAV/rjp.JON(12).wav
-share/openfodder/Data/WAV/rjp.JON(13).wav
-share/openfodder/Data/WAV/rjp.JON(14).wav
-share/openfodder/Data/WAV/rjp.JON(15).wav
-share/openfodder/Data/WAV/rjp.JON(16).wav
-share/openfodder/Data/WAV/rjp.JON(2).wav
-share/openfodder/Data/WAV/rjp.JON(3).wav
-share/openfodder/Data/WAV/rjp.JON(4).wav
-share/openfodder/Data/WAV/rjp.JON(5).wav
-share/openfodder/Data/WAV/rjp.JON(6).wav
-share/openfodder/Data/WAV/rjp.JON(7).wav
-share/openfodder/Data/WAV/rjp.JON(8).wav
-share/openfodder/Data/WAV/rjp.JON(9).wav
-share/openfodder/Data/WAV/rjp.JUNBASE(1).wav
-share/openfodder/Data/WAV/rjp.JUNBASE(2).wav
-share/openfodder/Data/WAV/rjp.JUNBASE(3).wav
-share/openfodder/Data/WAV/rjp.JUNBASE(4).wav
-share/openfodder/Data/WAV/rjp.JUNBASE(5).wav
-share/openfodder/Data/WAV/rjp.JUNBASE(6).wav
-share/openfodder/Data/WAV/rjp.JUNBASE(7).wav
-share/openfodder/Data/WAV/rjp.JUNBASE(8).wav
-share/openfodder/Data/WAV/rjp.MORBASE(1).wav
-share/openfodder/Data/WAV/rjp.MORBASE(2).wav
-share/openfodder/Data/WAV/rjp.MORBASE(3).wav
-share/openfodder/Data/WAV/rjp.MORBASE(4).wav
-share/openfodder/Data/WAV/rjp.MORBASE(5).wav
-share/openfodder/Data/WAV/rjp.MORBASE(6).wav
-share/openfodder/Data/WAV/rjp.MORBASE(7).wav
-share/openfodder/Data/WAV/rjp.MORBASE(8).wav
-share/openfodder/Data/WAV/rjp.WARX4(1).wav
-share/openfodder/Data/WAV/rjp.WARX4(2).wav
-share/openfodder/Saves/_SavesHere
+share/OpenFodder/Campaigns/Amiga Format Christmas Special.ofc
+share/OpenFodder/Campaigns/Cannon Fodder 2.ofc
+share/OpenFodder/Campaigns/Cannon Fodder Plus.ofc
+share/OpenFodder/Campaigns/Cannon Fodder.ofc
+share/OpenFodder/Campaigns/segras.ofc
+share/OpenFodder/Campaigns/segras/alessandro.map
+share/OpenFodder/Campaigns/segras/alessandro.spt
+share/OpenFodder/Campaigns/segras/segras first.map
+share/OpenFodder/Campaigns/segras/segras first.spt
+share/OpenFodder/Data/Amiga/_AmigaDataHere
+share/OpenFodder/Data/AmigaFormat_XMAS/AFXBASE.BLK
+share/OpenFodder/Data/AmigaFormat_XMAS/AFXBASE.INS
+share/OpenFodder/Data/AmigaFormat_XMAS/AFXBASE.SNG
+share/OpenFodder/Data/AmigaFormat_XMAS/AFXSUB0.BLK
+share/OpenFodder/Data/AmigaFormat_XMAS/afxarmy.lbm
+share/OpenFodder/Data/AmigaFormat_XMAS/afxbase.bht
+share/OpenFodder/Data/AmigaFormat_XMAS/afxbase.hit
+share/OpenFodder/Data/AmigaFormat_XMAS/afxbase.pal
+share/OpenFodder/Data/AmigaFormat_XMAS/afxbase.swp
+share/OpenFodder/Data/AmigaFormat_XMAS/afxcopt.lbm
+share/OpenFodder/Data/AmigaFormat_XMAS/afxsub0.bht
+share/OpenFodder/Data/AmigaFormat_XMAS/afxsub0.hit
+share/OpenFodder/Data/AmigaFormat_XMAS/afxsub0.swp
+share/OpenFodder/Data/AmigaFormat_XMAS/apmenu.lbm
+share/OpenFodder/Data/AmigaFormat_XMAS/mapm1.map
+share/OpenFodder/Data/AmigaFormat_XMAS/mapm1.spt
+share/OpenFodder/Data/AmigaFormat_XMAS/mapm2.map
+share/OpenFodder/Data/AmigaFormat_XMAS/mapm2.spt
+share/OpenFodder/Data/AmigaFormat_XMAS/pstuff.lbm
+share/OpenFodder/Data/Amiga_CD/_AmigaCD32DataHere
+share/OpenFodder/Data/Custom/Maps/Segras First.map
+share/OpenFodder/Data/Custom/Maps/Segras First.spt
+share/OpenFodder/Data/Dos2_CD/_Dos2CDDataHere
+share/OpenFodder/Data/Dos_CD/_DosCDDataHere
+share/OpenFodder/Data/Plus/1.lbm
+share/OpenFodder/Data/Plus/10.lbm
+share/OpenFodder/Data/Plus/11.lbm
+share/OpenFodder/Data/Plus/2.lbm
+share/OpenFodder/Data/Plus/3.lbm
+share/OpenFodder/Data/Plus/4.lbm
+share/OpenFodder/Data/Plus/5.lbm
+share/OpenFodder/Data/Plus/6.lbm
+share/OpenFodder/Data/Plus/7.lbm
+share/OpenFodder/Data/Plus/8.lbm
+share/OpenFodder/Data/Plus/9.lbm
+share/OpenFodder/Data/Plus/apmenu.lbm
+share/OpenFodder/Data/Plus/junarmy.lbm
+share/OpenFodder/Data/Plus/junbase.bht
+share/OpenFodder/Data/Plus/junbase.blk
+share/OpenFodder/Data/Plus/junbase.hit
+share/OpenFodder/Data/Plus/junbase.ins
+share/OpenFodder/Data/Plus/junbase.pal
+share/OpenFodder/Data/Plus/junbase.sng
+share/OpenFodder/Data/Plus/junbase.swp
+share/OpenFodder/Data/Plus/juncopt.lbm
+share/OpenFodder/Data/Plus/junsub1.bht
+share/OpenFodder/Data/Plus/junsub1.blk
+share/OpenFodder/Data/Plus/junsub1.hit
+share/OpenFodder/Data/Plus/junsub1.swp
+share/OpenFodder/Data/Plus/mapm1.map
+share/OpenFodder/Data/Plus/mapm1.spt
+share/OpenFodder/Data/Plus/mapm2.map
+share/OpenFodder/Data/Plus/mapm2.spt
+share/OpenFodder/Data/Plus/mapm3.map
+share/OpenFodder/Data/Plus/mapm3.spt
+share/OpenFodder/Data/Plus/mapm4.map
+share/OpenFodder/Data/Plus/mapm4.spt
+share/OpenFodder/Data/Plus/pstuff.lbm
+share/OpenFodder/Data/WAV/rjp.DESBASE(1).wav
+share/OpenFodder/Data/WAV/rjp.DESBASE(2).wav
+share/OpenFodder/Data/WAV/rjp.DESBASE(3).wav
+share/OpenFodder/Data/WAV/rjp.DESBASE(4).wav
+share/OpenFodder/Data/WAV/rjp.DESBASE(5).wav
+share/OpenFodder/Data/WAV/rjp.ICEBASE(1).wav
+share/OpenFodder/Data/WAV/rjp.ICEBASE(2).wav
+share/OpenFodder/Data/WAV/rjp.ICEBASE(3).wav
+share/OpenFodder/Data/WAV/rjp.ICEBASE(4).wav
+share/OpenFodder/Data/WAV/rjp.ICEBASE(5).wav
+share/OpenFodder/Data/WAV/rjp.INTBASE(1).wav
+share/OpenFodder/Data/WAV/rjp.INTBASE(2).wav
+share/OpenFodder/Data/WAV/rjp.INTBASE(3).wav
+share/OpenFodder/Data/WAV/rjp.INTBASE(4).wav
+share/OpenFodder/Data/WAV/rjp.INTBASE(5).wav
+share/OpenFodder/Data/WAV/rjp.INTBASE(6).wav
+share/OpenFodder/Data/WAV/rjp.INTBASE(7).wav
+share/OpenFodder/Data/WAV/rjp.JON(1).wav
+share/OpenFodder/Data/WAV/rjp.JON(10).wav
+share/OpenFodder/Data/WAV/rjp.JON(11).wav
+share/OpenFodder/Data/WAV/rjp.JON(12).wav
+share/OpenFodder/Data/WAV/rjp.JON(13).wav
+share/OpenFodder/Data/WAV/rjp.JON(14).wav
+share/OpenFodder/Data/WAV/rjp.JON(15).wav
+share/OpenFodder/Data/WAV/rjp.JON(16).wav
+share/OpenFodder/Data/WAV/rjp.JON(2).wav
+share/OpenFodder/Data/WAV/rjp.JON(3).wav
+share/OpenFodder/Data/WAV/rjp.JON(4).wav
+share/OpenFodder/Data/WAV/rjp.JON(5).wav
+share/OpenFodder/Data/WAV/rjp.JON(6).wav
+share/OpenFodder/Data/WAV/rjp.JON(7).wav
+share/OpenFodder/Data/WAV/rjp.JON(8).wav
+share/OpenFodder/Data/WAV/rjp.JON(9).wav
+share/OpenFodder/Data/WAV/rjp.JUNBASE(1).wav
+share/OpenFodder/Data/WAV/rjp.JUNBASE(2).wav
+share/OpenFodder/Data/WAV/rjp.JUNBASE(3).wav
+share/OpenFodder/Data/WAV/rjp.JUNBASE(4).wav
+share/OpenFodder/Data/WAV/rjp.JUNBASE(5).wav
+share/OpenFodder/Data/WAV/rjp.JUNBASE(6).wav
+share/OpenFodder/Data/WAV/rjp.JUNBASE(7).wav
+share/OpenFodder/Data/WAV/rjp.JUNBASE(8).wav
+share/OpenFodder/Data/WAV/rjp.MORBASE(1).wav
+share/OpenFodder/Data/WAV/rjp.MORBASE(2).wav
+share/OpenFodder/Data/WAV/rjp.MORBASE(3).wav
+share/OpenFodder/Data/WAV/rjp.MORBASE(4).wav
+share/OpenFodder/Data/WAV/rjp.MORBASE(5).wav
+share/OpenFodder/Data/WAV/rjp.MORBASE(6).wav
+share/OpenFodder/Data/WAV/rjp.MORBASE(7).wav
+share/OpenFodder/Data/WAV/rjp.MORBASE(8).wav
+share/OpenFodder/Data/WAV/rjp.WARX4(1).wav
+share/OpenFodder/Data/WAV/rjp.WARX4(2).wav
+share/OpenFodder/README.md
+share/OpenFodder/Saves/_SavesHere
diff --git a/openfodder/distinfo b/openfodder/distinfo
index 9dbbe69b88..106fc1a75b 100644
--- a/openfodder/distinfo
+++ b/openfodder/distinfo
@@ -1,7 +1,11 @@
 $NetBSD$
 
-SHA1 (openfodder/1.3.1.tar.gz) = eb76ee9972a5bf4d5be57abab3595eff6a3be376
-RMD160 (openfodder/1.3.1.tar.gz) = d3fd4e8175bffa102261870f7e944ea760bcf6f4
-SHA512 (openfodder/1.3.1.tar.gz) = 6d1b595785c76e7fd552046a0691e03d487dfd94e4c52bdc0db992daa62553b4c88e724104e487be611dd360f4452626c19d6e5ed310c9101e10e89aa3e97281
-Size (openfodder/1.3.1.tar.gz) = 34369352 bytes
-SHA1 (patch-Source_stdafx.cpp) = cfac2ac52d190d80c2e361271f8bce3ee5da34b5
+SHA1 (openfodder/1.4.0.tar.gz) = 266e9c53cbb17c2873b5875f066f173962caad44
+RMD160 (openfodder/1.4.0.tar.gz) = b6e48fcf0669fa6bc8f1009e085a2139f745232c
+SHA512 (openfodder/1.4.0.tar.gz) = 7242cb2809843f60e86494f34d007abe4973bbb895a60ec5de0790071fa6b8cf2023ca2f33cedab3472da8ee40348e4646190e544de10b90329a64298ee0ac4f
+Size (openfodder/1.4.0.tar.gz) = 331036 bytes
+SHA1 (openfodder/data-1.4.0.zip) = 6e19e158385ab9703656f6ce6522be1fb89f78fb
+RMD160 (openfodder/data-1.4.0.zip) = f0f95230b280fcf58f7abe9b0e762dec4dc22b4a
+SHA512 (openfodder/data-1.4.0.zip) = ee6c812be3f619460d5a1277b9e2d3fc2d4e3a1f195c19749823befe4fe5b861fefd87029ab0f1f48fcaae1693bd703658ca0b0e6581c8ec721dfe58d4c432ed
+Size (openfodder/data-1.4.0.zip) = 34426431 bytes
+SHA1 (patch-Source_stdafx.cpp) = a085c1868f11bbfd497f70c6abd240d83c4d496f
diff --git a/openfodder/patches/patch-Source_stdafx.cpp b/openfodder/patches/patch-Source_stdafx.cpp
index 064a10fe43..30c747f058 100644
--- a/openfodder/patches/patch-Source_stdafx.cpp
+++ b/openfodder/patches/patch-Source_stdafx.cpp
@@ -4,9 +4,9 @@ Check argc before accessing argv.
 
 Use PREFIX when searching for data.
 
---- ./Source/stdafx.cpp.orig	2015-11-08 06:10:34.000000000 +0000
-+++ ./Source/stdafx.cpp
-@@ -32,7 +32,7 @@ int main(int argc, char *args[]) {
+--- Source/stdafx.cpp.orig	2018-02-01 19:54:26.000000000 +0000
++++ Source/stdafx.cpp
+@@ -39,7 +39,7 @@ int main(int argc, char *args[]) {
  		if (strcmp( args[1], "skipintro" ) == 0)
  			SkipIntro = true;
  
@@ -15,12 +15,27 @@ Use PREFIX when searching for data.
  			MapNumber = atoi( args[3] );
  		}
  	}
-@@ -51,6 +51,8 @@ int main(int argc, char *args[]) {
- std::string local_PathGenerate( const std::string& pFile, const std::string& pPath, bool pData = true ) {
- 	std::stringstream	 filePathFinal;
+@@ -110,14 +110,19 @@ std::string local_PathGenerate( const st
+             if (path) {
+                 FinalPath = path;
+                 FinalPath.append("/.local/share/");
++                filePathFinal << FinalPath << "OpenFodder/";
++                if (!local_FileExists(filePathFinal.str())) {
++                    FinalPath = "";
++                    filePathFinal.str("");
++                }
+             }
+         }
+ 
+         // Fall back just incase
+-        if(!FinalPath.size())
+-            FinalPath = "/usr/local/share/";
+-
+-        filePathFinal << FinalPath << "OpenFodder/";
++        if(!FinalPath.size()) {
++            FinalPath = OPENFODDER_DATADIR;
++            filePathFinal << FinalPath << "OpenFodder/";
++        }
+ 
+     #endif
  
-+	filePathFinal << OPENFODDER_DATADIR << "/";
-+
- 	if (pData)
- 		filePathFinal << "Data/";
- 	else


Home | Main Index | Thread Index | Old Index