From 227ef1afd4b6acc6096a354777693a77c4c7d7ef Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Feb 18 2016 20:37:11 +0000 Subject: fixup building Signed-off-by: Igor Gnatenko --- diff --git a/0001-fixed-compiling-using-visual-studio-2013-by-renaming.patch b/0001-fixed-compiling-using-visual-studio-2013-by-renaming.patch new file mode 100644 index 0000000..9f44df7 --- /dev/null +++ b/0001-fixed-compiling-using-visual-studio-2013-by-renaming.patch @@ -0,0 +1,102 @@ +From bdd4b8c2b0ce4be986cb51a1dbc5d05db9a76867 Mon Sep 17 00:00:00 2001 +From: SushiTee +Date: Mon, 9 Dec 2013 14:00:24 +0100 +Subject: [PATCH] fixed compiling using visual studio 2013 by renaming the + round function + +--- + src/base/math.h | 2 +- + src/game/collision.h | 4 ++-- + src/game/editor/layer_tiles.cpp | 2 +- + src/game/gamecore.cpp | 16 ++++++++-------- + src/game/server/entity.cpp | 4 ++-- + 5 files changed, 14 insertions(+), 14 deletions(-) + +diff --git a/src/base/math.h b/src/base/math.h +index d58dbf1..07b0639 100644 +--- a/src/base/math.h ++++ b/src/base/math.h +@@ -20,7 +20,7 @@ inline float sign(float f) + return f<0.0f?-1.0f:1.0f; + } + +-inline int round(float f) ++inline int round_to_int(float f) + { + if(f > 0) + return (int)(f+0.5f); +diff --git a/src/game/collision.h b/src/game/collision.h +index d16f2d5..cad75bb 100644 +--- a/src/game/collision.h ++++ b/src/game/collision.h +@@ -25,9 +25,9 @@ public: + + CCollision(); + void Init(class CLayers *pLayers); +- bool CheckPoint(float x, float y) { return IsTileSolid(round(x), round(y)); } ++ bool CheckPoint(float x, float y) { return IsTileSolid(round_to_int(x), round_to_int(y)); } + bool CheckPoint(vec2 Pos) { return CheckPoint(Pos.x, Pos.y); } +- int GetCollisionAt(float x, float y) { return GetTile(round(x), round(y)); } ++ int GetCollisionAt(float x, float y) { return GetTile(round_to_int(x), round_to_int(y)); } + int GetWidth() { return m_Width; }; + int GetHeight() { return m_Height; }; + int IntersectLine(vec2 Pos0, vec2 Pos1, vec2 *pOutCollision, vec2 *pOutBeforeCollision); +diff --git a/src/game/editor/layer_tiles.cpp b/src/game/editor/layer_tiles.cpp +index 032f391..0cdd760 100644 +--- a/src/game/editor/layer_tiles.cpp ++++ b/src/game/editor/layer_tiles.cpp +@@ -248,7 +248,7 @@ void CLayerTiles::BrushFlipY() + + void CLayerTiles::BrushRotate(float Amount) + { +- int Rotation = (round(360.0f*Amount/(pi*2))/90)%4; // 0=0�, 1=90�, 2=180�, 3=270� ++ int Rotation = (round_to_int(360.0f*Amount/(pi*2))/90)%4; // 0=0�, 1=90�, 2=180�, 3=270� + if(Rotation < 0) + Rotation +=4; + +diff --git a/src/game/gamecore.cpp b/src/game/gamecore.cpp +index d43492a..a325a53 100644 +--- a/src/game/gamecore.cpp ++++ b/src/game/gamecore.cpp +@@ -401,17 +401,17 @@ void CCharacterCore::Move() + + void CCharacterCore::Write(CNetObj_CharacterCore *pObjCore) + { +- pObjCore->m_X = round(m_Pos.x); +- pObjCore->m_Y = round(m_Pos.y); ++ pObjCore->m_X = round_to_int(m_Pos.x); ++ pObjCore->m_Y = round_to_int(m_Pos.y); + +- pObjCore->m_VelX = round(m_Vel.x*256.0f); +- pObjCore->m_VelY = round(m_Vel.y*256.0f); ++ pObjCore->m_VelX = round_to_int(m_Vel.x*256.0f); ++ pObjCore->m_VelY = round_to_int(m_Vel.y*256.0f); + pObjCore->m_HookState = m_HookState; + pObjCore->m_HookTick = m_HookTick; +- pObjCore->m_HookX = round(m_HookPos.x); +- pObjCore->m_HookY = round(m_HookPos.y); +- pObjCore->m_HookDx = round(m_HookDir.x*256.0f); +- pObjCore->m_HookDy = round(m_HookDir.y*256.0f); ++ pObjCore->m_HookX = round_to_int(m_HookPos.x); ++ pObjCore->m_HookY = round_to_int(m_HookPos.y); ++ pObjCore->m_HookDx = round_to_int(m_HookDir.x*256.0f); ++ pObjCore->m_HookDy = round_to_int(m_HookDir.y*256.0f); + pObjCore->m_HookedPlayer = m_HookedPlayer; + pObjCore->m_Jumped = m_Jumped; + pObjCore->m_Direction = m_Direction; +diff --git a/src/game/server/entity.cpp b/src/game/server/entity.cpp +index 788c3f4..3b47e02 100644 +--- a/src/game/server/entity.cpp ++++ b/src/game/server/entity.cpp +@@ -51,6 +51,6 @@ int CEntity::NetworkClipped(int SnappingClient, vec2 CheckPos) + + bool CEntity::GameLayerClipped(vec2 CheckPos) + { +- return round(CheckPos.x)/32 < -200 || round(CheckPos.x)/32 > GameServer()->Collision()->GetWidth()+200 || +- round(CheckPos.y)/32 < -200 || round(CheckPos.y)/32 > GameServer()->Collision()->GetHeight()+200 ? true : false; ++ return round_to_int(CheckPos.x)/32 < -200 || round_to_int(CheckPos.x)/32 > GameServer()->Collision()->GetWidth()+200 || ++ round_to_int(CheckPos.y)/32 < -200 || round_to_int(CheckPos.y)/32 > GameServer()->Collision()->GetHeight()+200 ? true : false; + } +-- +2.7.1 + diff --git a/teeworlds-0.5.2-cstddef.patch b/teeworlds-0.5.2-cstddef.patch deleted file mode 100644 index d957164..0000000 --- a/teeworlds-0.5.2-cstddef.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- src/game/server/entity.hpp~ 2009-10-26 13:04:31.000000000 -0500 -+++ src/game/server/entity.hpp 2011-02-10 11:02:01.496813180 -0600 -@@ -3,6 +3,7 @@ - - #include - #include -+#include - - #define MACRO_ALLOC_HEAP() \ - public: \ diff --git a/teeworlds-0.5.2-extlibs.patch b/teeworlds-0.5.2-extlibs.patch deleted file mode 100644 index f1d3d77..0000000 --- a/teeworlds-0.5.2-extlibs.patch +++ /dev/null @@ -1,158 +0,0 @@ -diff -Naur teeworlds-0.5.2-src.orig/default.bam teeworlds-0.5.2-src/default.bam ---- teeworlds-0.5.2-src.orig/default.bam 2009-10-26 19:04:31.000000000 +0100 -+++ teeworlds-0.5.2-src/default.bam 2009-12-24 18:57:43.000000000 +0100 -@@ -7,6 +7,8 @@ - config:Add(OptFindCompiler()) - config:Add(OptTestCompileC("stackprotector", "int main(){return 0;}", "-fstack-protector -fstack-protector-all")) - config:Add(OptFindLibrary("zlib", "zlib.h", false)) -+config:Add(OptFindLibrary("wavpack", "wavpack/wavpack.h", false)) -+config:Add(OptFindLibrary("pnglite", "sys/types.h", false)) - config:Add(SDL.OptFind("sdl", true)) - config:Finalize("config.bam") - -@@ -151,8 +153,29 @@ - end - - -- build the small libraries -- wavpack = Compile(settings, Collect("src/engine/external/wavpack/*.c")) -- pnglite = Compile(settings, Collect("src/engine/external/pnglite/*.c")) -+ -- compile wavpack if needed -+ if config.wavpack.value == 1 then -+ settings.link.libs:Add("wavpack") -+ if config.wavpack.include_path then -+ settings.cc.includes:Add(config.wavpack.include_path) -+ end -+ wavpack = {} -+ else -+ wavpack = Compile(settings, Collect("src/engine/external/wavpack/*.c")) -+ settings.cc.includes:Add("src/engine/external") -+ end -+ -+ -- compile pnglite if needed -+ if config.pnglite.value == 1 then -+ settings.link.libs:Add("pnglite") -+ if config.pnglite.include_path then -+ settings.cc.includes:Add(config.pnglite.include_path) -+ end -+ pnglite = {} -+ else -+ pnglite = Compile(settings, Collect("src/engine/external/pnglite/*.c")) -+ settings.cc.includes:Add("src/engine/external/pnglite") -+ end - - -- build game components - engine_settings = settings:Copy() -diff -Naur teeworlds-0.5.2-src.orig/src/engine/client/ec_gfx.c teeworlds-0.5.2-src/src/engine/client/ec_gfx.c ---- teeworlds-0.5.2-src.orig/src/engine/client/ec_gfx.c 2009-10-26 19:04:31.000000000 +0100 -+++ teeworlds-0.5.2-src/src/engine/client/ec_gfx.c 2009-12-24 18:57:43.000000000 +0100 -@@ -18,7 +18,7 @@ - #endif - - #include --#include -+#include - - #include - #include -diff -Naur teeworlds-0.5.2-src.orig/src/engine/client/ec_snd.c teeworlds-0.5.2-src/src/engine/client/ec_snd.c ---- teeworlds-0.5.2-src.orig/src/engine/client/ec_snd.c 2009-10-26 19:04:31.000000000 +0100 -+++ teeworlds-0.5.2-src/src/engine/client/ec_snd.c 2009-12-24 18:57:43.000000000 +0100 -@@ -6,7 +6,7 @@ - - #include "SDL.h" - --#include -+#include - #include - #include - #include -@@ -358,19 +358,12 @@ - snd->num_frames = num_frames; - } - -- --static IOHANDLE file = NULL; -- --static int read_data(void *buffer, int size) --{ -- return io_read(file, buffer, size); --} -- - int snd_load_wv(const char *filename) - { - SAMPLE *snd; - int sid = -1; - char error[100]; -+ char completefilename[512]; - WavpackContext *context; - - /* don't waste memory on sound when we are stress testing */ -@@ -381,19 +374,13 @@ - if(!sound_enabled) - return 1; - -- file = engine_openfile(filename, IOFLAG_READ); /* TODO: use system.h stuff for this */ -- if(!file) -- { -- dbg_msg("sound/wv", "failed to open %s", filename); -- return -1; -- } -- - sid = snd_alloc_id(); - if(sid < 0) - return -1; - snd = &samples[sid]; - -- context = WavpackOpenFileInput(read_data, error); -+ engine_getpath(completefilename, sizeof(completefilename), filename, IOFLAG_READ); -+ context = WavpackOpenFileInput(completefilename, error, 0, 0); - if (context) - { - int samples = WavpackGetNumSamples(context); -@@ -410,7 +397,7 @@ - - if(snd->channels > 2) - { -- dbg_msg("sound/wv", "file is not mono or stereo. filename='%s'", filename); -+ dbg_msg("sound/wv", "failed to open %s: %s", completefilename, error); - return -1; - } - -@@ -448,9 +435,6 @@ - dbg_msg("sound/wv", "failed to open %s: %s", filename, error); - } - -- io_close(file); -- file = NULL; -- - if(config.debug) - dbg_msg("sound/wv", "loaded %s", filename); - -diff -Naur teeworlds-0.5.2-src.orig/src/tools/dilate.c teeworlds-0.5.2-src/src/tools/dilate.c ---- teeworlds-0.5.2-src.orig/src/tools/dilate.c 2009-10-26 19:04:31.000000000 +0100 -+++ teeworlds-0.5.2-src/src/tools/dilate.c 2009-12-24 18:57:43.000000000 +0100 -@@ -1,6 +1,9 @@ - /* copyright (c) 2007 magnus auvinen, see licence.txt for more info */ - --#include "../engine/external/pnglite/pnglite.c" -+#include -+#include -+#include -+#include - - typedef struct pixel_t - { -diff -Naur teeworlds-0.5.2-src.orig/src/tools/tileset_borderfix.c teeworlds-0.5.2-src/src/tools/tileset_borderfix.c ---- teeworlds-0.5.2-src.orig/src/tools/tileset_borderfix.c 2009-10-26 19:04:31.000000000 +0100 -+++ teeworlds-0.5.2-src/src/tools/tileset_borderfix.c 2009-12-24 18:57:43.000000000 +0100 -@@ -1,6 +1,9 @@ - /* copyright (c) 2007 magnus auvinen, see licence.txt for more info */ - --#include "../engine/external/pnglite/pnglite.c" -+#include -+#include -+#include -+#include - - typedef struct pixel_t - { diff --git a/teeworlds-0.5.2-optflags.patch b/teeworlds-0.5.2-optflags.patch deleted file mode 100644 index b012340..0000000 --- a/teeworlds-0.5.2-optflags.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Naur teeworlds-0.5.2-src.orig/default.bam teeworlds-0.5.2-src/default.bam ---- teeworlds-0.5.2-src.orig/default.bam 2009-10-26 19:04:31.000000000 +0100 -+++ teeworlds-0.5.2-src/default.bam 2009-12-24 18:55:37.000000000 +0100 -@@ -106,6 +106,9 @@ - function build(settings) - --settings.objdir = Path("objs") - settings.cc.Output = Intermediate_Output -+ settings.cc.flags:Add(os.getenv ('CFLAGS')) -+ settings.cc.flags:Add(os.getenv ('CPPFLAGS')) -+ settings.cc.flags:Add(os.getenv ('LDFLAGS')) - - if config.compiler.value == "cl" then - settings.cc.flags:Add("/wd4244") diff --git a/teeworlds-0.6.0-cstddef.patch b/teeworlds-0.6.0-cstddef.patch deleted file mode 100644 index 211d3ca..0000000 --- a/teeworlds-0.6.0-cstddef.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- teeworlds-0.6.0-source.orig/src/game/server/entity.h 2011-04-09 14:15:25.000000000 -0500 -+++ teeworlds-0.6.0-source/src/game/server/entity.h 2011-04-26 13:28:01.556440593 -0500 -@@ -6,6 +6,7 @@ - #include - #include - #include -+#include - - #define MACRO_ALLOC_HEAP() \ - public: \ diff --git a/teeworlds-0.6.0-extlibs.patch b/teeworlds-0.6.0-extlibs.patch deleted file mode 100644 index 2bac194..0000000 --- a/teeworlds-0.6.0-extlibs.patch +++ /dev/null @@ -1,145 +0,0 @@ -diff -U3 teeworlds-0.6.0-source.orig/src/engine/client/graphics.cpp teeworlds-0.6.0-source/src/engine/client/graphics.cpp ---- teeworlds-0.6.0-source.orig/src/engine/client/graphics.cpp 2011-04-09 14:15:25.000000000 -0500 -+++ teeworlds-0.6.0-source/src/engine/client/graphics.cpp 2011-04-26 13:07:44.443440997 -0500 -@@ -19,7 +19,7 @@ - #endif - - #include --#include -+#include - - #include - #include -diff -U3 teeworlds-0.6.0-source.orig/src/engine/client/sound.cpp teeworlds-0.6.0-source/src/engine/client/sound.cpp ---- teeworlds-0.6.0-source.orig/src/engine/client/sound.cpp 2011-04-09 14:15:25.000000000 -0500 -+++ teeworlds-0.6.0-source/src/engine/client/sound.cpp 2011-04-26 13:09:36.005441312 -0500 -@@ -10,7 +10,7 @@ - #include "sound.h" - - extern "C" { // wavpack -- #include -+ #include - } - #include - -#@@ -395,9 +395,6 @@ -# dbg_msg("sound/wv", "failed to open %s: %s", pFilename, aError); -# } -# -#- io_close(ms_File); -#- ms_File = NULL; -#- -# if(g_Config.m_Debug) -# dbg_msg("sound/wv", "loaded %s", pFilename); -# -diff -U3 teeworlds-0.6.0-source.orig/src/tools/dilate.cpp teeworlds-0.6.0-source/src/tools/dilate.cpp ---- teeworlds-0.6.0-source.orig/src/tools/dilate.cpp 2011-04-09 14:15:25.000000000 -0500 -+++ teeworlds-0.6.0-source/src/tools/dilate.cpp 2011-04-26 13:10:12.820441195 -0500 -@@ -2,7 +2,11 @@ - /* If you are missing that file, acquire a complete release at teeworlds.com. */ - #include - #include --#include -+#include -+#include -+#include -+#include -+ - - typedef struct - { ---- teeworlds-0.6.0-source.orig/src/engine/client/sound.cpp 2011-04-26 14:11:17.267441002 -0500 -+++ teeworlds-0.6.0-source/src/engine/client/sound.cpp 2011-04-26 14:11:02.897441026 -0500 -@@ -315,6 +315,7 @@ - CSample *pSample; - int SampleID = -1; - char aError[100]; -+ char completefilename[102400]; - WavpackContext *pContext; - - // don't waste memory on sound when we are stress testing -@@ -340,7 +341,9 @@ - return -1; - pSample = &m_aSamples[SampleID]; - -- pContext = WavpackOpenFileInput(ReadData, aError); -+ //GetPath(completefilename, sizeof(completefilename), pFilename, IOFLAG_READ); -+ pContext = WavpackOpenFileInput(completefilename, aError, 0, 0); -+ - if (pContext) - { - int m_aSamples = WavpackGetNumSamples(pContext); ---- teeworlds-0.6.0-source.orig/src/engine/client/sound.cpp 2011-04-09 14:15:25.000000000 -0500 -+++ teeworlds-0.6.0-source/src/engine/client/sound.cpp 2011-04-27 13:36:48.745660009 -0500 -@@ -328,7 +329,11 @@ - if(!m_pStorage) - return -1; - -- ms_File = m_pStorage->OpenFile(pFilename, IOFLAG_READ, IStorage::TYPE_ALL); -+ //char longname[50]; -+ //strncpy(longname, pFilename, strlen(pFilename)); -+ strncat(completefilename, "/usr/share/teeworlds/data/", 50); -+ strncat(completefilename, pFilename, strlen(pFilename)); -+ ms_File = m_pStorage->OpenFile(completefilename, IOFLAG_READ, IStorage::TYPE_ALL); - if(!ms_File) - { - dbg_msg("sound/wv", "failed to open file. filename='%s'", pFilename); ---- teeworlds-0.6.0-source/src/tools/tileset_borderfix.cpp~ 2011-07-31 16:17:00.000000000 -0500 -+++ teeworlds-0.6.0-source/src/tools/tileset_borderfix.cpp 2011-08-22 12:48:43.621537000 -0500 -@@ -1,7 +1,11 @@ - /* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */ - /* If you are missing that file, acquire a complete release at teeworlds.com. */ - #include --#include -+#include -+#include -+#include -+#include -+ - - typedef struct - { ---- teeworlds-0.6.0-source/bam.lua~ 2011-07-31 16:17:00.000000000 -0500 -+++ teeworlds-0.6.0-source/bam.lua 2011-08-24 08:50:56.929500961 -0500 -@@ -9,6 +9,8 @@ - config:Add(OptCCompiler("compiler")) - config:Add(OptTestCompileC("stackprotector", "int main(){return 0;}", "-fstack-protector -fstack-protector-all")) - config:Add(OptLibrary("zlib", "zlib.h", false)) -+config:Add(OptLibrary("wavpack", "wavpack/wavpack.h", false)) -+config:Add(OptLibrary("pnglite", "sys/types.h", false)) - config:Add(SDL.OptFind("sdl", true)) - config:Add(FreeType.OptFind("freetype", true)) - config:Finalize("config.lua") -@@ -177,8 +179,30 @@ - end - - -- build the small libraries -- wavpack = Compile(settings, Collect("src/engine/external/wavpack/*.c")) -- pnglite = Compile(settings, Collect("src/engine/external/pnglite/*.c")) -+ -- compile wavpack if needed -+ if config.wavpack.value == 1 then -+ settings.link.libs:Add("wavpack") -+ if config.wavpack.include_path then -+ settings.cc.includes:Add(config.wavpack.include_path) -+ end -+ wavpack = {} -+ else -+ wavpack = Compile(settings, Collect("src/engine/external/wavpack/*.c")) -+ settings.cc.includes:Add("src/engine/external") -+ end -+ -+ -- compile pnglite if needed -+ if config.pnglite.value == 1 then -+ settings.link.libs:Add("pnglite") -+ if config.pnglite.include_path then -+ settings.cc.includes:Add(config.pnglite.include_path) -+ end -+ pnglite = {} -+ else -+ pnglite = Compile(settings, Collect("src/engine/external/pnglite/*.c")) -+ settings.cc.includes:Add("src/engine/external/pnglite") -+ end -+ - - -- build game components - engine_settings = settings:Copy() diff --git a/teeworlds-0.6.0-optflags.patch b/teeworlds-0.6.0-optflags.patch deleted file mode 100644 index 2f8198c..0000000 --- a/teeworlds-0.6.0-optflags.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- teeworlds-0.6.0-source/bam.lua~ 2011-04-26 13:22:16.000000000 -0500 -+++ teeworlds-0.6.0-source/bam.lua 2011-04-26 13:24:47.412441073 -0500 -@@ -134,6 +134,14 @@ - function build(settings) - --settings.objdir = Path("objs") - settings.cc.Output = Intermediate_Output -+ settings.cc.flags:Add(os.getenv ('CFLAGS')) -+ settings.cc.flags:Add(os.getenv ('CPPFLAGS')) -+ settings.cc.flags:Add(os.getenv ('LDFLAGS')) -+ settings.link.libs:Add("wavpack") -+ settings.link.libs:Add("z") -+ settings.link.libs:Add("pnglite") -+ settings.link.flags:Add('-lpng12') -+ - - if config.compiler.driver == "cl" then - settings.cc.flags:Add("/wd4244") diff --git a/teeworlds-0.6.1-extlibs.patch b/teeworlds-0.6.1-extlibs.patch deleted file mode 100644 index 0999b96..0000000 --- a/teeworlds-0.6.1-extlibs.patch +++ /dev/null @@ -1,131 +0,0 @@ -diff -ur teeworlds-b177-r50edfd37-source.orig/bam.lua teeworlds-b177-r50edfd37-source/bam.lua ---- teeworlds-b177-r50edfd37-source.orig/bam.lua 2011-07-31 23:17:00.000000000 +0200 -+++ teeworlds-b177-r50edfd37-source/bam.lua 2011-08-07 11:41:07.596001939 +0200 -@@ -9,6 +9,8 @@ - config:Add(OptCCompiler("compiler")) - config:Add(OptTestCompileC("stackprotector", "int main(){return 0;}", "-fstack-protector -fstack-protector-all")) - config:Add(OptLibrary("zlib", "zlib.h", false)) -+config:Add(OptLibrary("wavpack", "wavpack/wavpack.h", false)) -+config:Add(OptLibrary("pnglite", "sys/types.h", false)) - config:Add(SDL.OptFind("sdl", true)) - config:Add(FreeType.OptFind("freetype", true)) - config:Finalize("config.lua") -@@ -132,6 +134,13 @@ - function build(settings) - --settings.objdir = Path("objs") - settings.cc.Output = Intermediate_Output -+ settings.cc.flags:Add(os.getenv ('CFLAGS')) -+ settings.cc.flags:Add(os.getenv ('CPPFLAGS')) -+ settings.cc.flags:Add(os.getenv ('LDFLAGS')) -+ settings.link.libs:Add("wavpack") -+ settings.link.libs:Add("z") -+ settings.link.libs:Add("pnglite") -+ --settings.link.flags:Add('-lpng12') - - if config.compiler.driver == "cl" then - settings.cc.flags:Add("/wd4244") -@@ -164,21 +173,6 @@ - settings.link.libs:Add("shell32") - end - -- -- compile zlib if needed -- if config.zlib.value == 1 then -- settings.link.libs:Add("z") -- if config.zlib.include_path then -- settings.cc.includes:Add(config.zlib.include_path) -- end -- zlib = {} -- else -- zlib = Compile(settings, Collect("src/engine/external/zlib/*.c")) -- settings.cc.includes:Add("src/engine/external/zlib") -- end -- -- -- build the small libraries -- wavpack = Compile(settings, Collect("src/engine/external/wavpack/*.c")) -- pnglite = Compile(settings, Collect("src/engine/external/pnglite/*.c")) - - -- build game components - engine_settings = settings:Copy() -diff -ur teeworlds-b177-r50edfd37-source.orig/src/engine/client/graphics.cpp teeworlds-b177-r50edfd37-source/src/engine/client/graphics.cpp ---- teeworlds-b177-r50edfd37-source.orig/src/engine/client/graphics.cpp 2011-07-31 23:17:00.000000000 +0200 -+++ teeworlds-b177-r50edfd37-source/src/engine/client/graphics.cpp 2011-08-07 10:44:09.524885861 +0200 -@@ -20,7 +20,7 @@ - #endif - - #include --#include -+#include - - #include - #include -diff -ur teeworlds-b177-r50edfd37-source.orig/src/engine/client/sound.cpp teeworlds-b177-r50edfd37-source/src/engine/client/sound.cpp ---- teeworlds-b177-r50edfd37-source.orig/src/engine/client/sound.cpp 2011-07-31 23:17:00.000000000 +0200 -+++ teeworlds-b177-r50edfd37-source/src/engine/client/sound.cpp 2011-08-07 11:28:31.946001646 +0200 -@@ -10,7 +10,7 @@ - #include "sound.h" - - extern "C" { // wavpack -- #include -+ #include - } - #include - -@@ -320,6 +320,7 @@ - CSample *pSample; - int SampleID = -1; - char aError[100]; -+ char completefilename[102400] = ""; - WavpackContext *pContext; - - // don't waste memory on sound when we are stress testing -@@ -333,7 +334,10 @@ - if(!m_pStorage) - return -1; - -- ms_File = m_pStorage->OpenFile(pFilename, IOFLAG_READ, IStorage::TYPE_ALL); -+ strncat(completefilename, "/usr/share/teeworlds/data/", 50); -+ strncat(completefilename, pFilename, strlen(pFilename)); -+ ms_File = m_pStorage->OpenFile(completefilename, IOFLAG_READ, IStorage::TYPE_ALL); -+ - if(!ms_File) - { - dbg_msg("sound/wv", "failed to open file. filename='%s'", pFilename); -@@ -345,7 +349,7 @@ - return -1; - pSample = &m_aSamples[SampleID]; - -- pContext = WavpackOpenFileInput(ReadData, aError); -+ pContext = WavpackOpenFileInput(completefilename, aError, 0, 0); - if (pContext) - { - int m_aSamples = WavpackGetNumSamples(pContext); -diff -ur teeworlds-b177-r50edfd37-source.orig/src/tools/dilate.cpp teeworlds-b177-r50edfd37-source/src/tools/dilate.cpp ---- teeworlds-b177-r50edfd37-source.orig/src/tools/dilate.cpp 2011-07-31 23:17:00.000000000 +0200 -+++ teeworlds-b177-r50edfd37-source/src/tools/dilate.cpp 2011-08-07 10:50:25.516018255 +0200 -@@ -2,7 +2,10 @@ - /* If you are missing that file, acquire a complete release at teeworlds.com. */ - #include - #include --#include -+#include -+#include -+#include -+#include - - typedef struct - { -diff -ur teeworlds-b177-r50edfd37-source.orig/src/tools/tileset_borderfix.cpp teeworlds-b177-r50edfd37-source/src/tools/tileset_borderfix.cpp ---- teeworlds-b177-r50edfd37-source.orig/src/tools/tileset_borderfix.cpp 2011-07-31 23:17:00.000000000 +0200 -+++ teeworlds-b177-r50edfd37-source/src/tools/tileset_borderfix.cpp 2011-08-07 10:59:37.986019889 +0200 -@@ -1,7 +1,10 @@ - /* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */ - /* If you are missing that file, acquire a complete release at teeworlds.com. */ - #include --#include -+#include -+#include -+#include -+#include - - typedef struct - { diff --git a/teeworlds.spec b/teeworlds.spec index b13db30..cab60fd 100644 --- a/teeworlds.spec +++ b/teeworlds.spec @@ -17,6 +17,7 @@ Source4: server_dm.cfg Source5: server_tdm.cfg Source6: server_ctf.cfg Patch0: %{name}-0.6.2-extlibs-optflags.patch +Patch1: 0001-fixed-compiling-using-visual-studio-2013-by-renaming.patch BuildRequires: mesa-libGLU-devel BuildRequires: bam >= 0.4.0