From 40857d8942d8962a6f98f99336d9f929fcf95777 Mon Sep 17 00:00:00 2001 From: Karol Trzcionka Date: Nov 16 2008 11:35:42 +0000 Subject: - Update to v2.1.0-rc1 - Fix typo in changelog - Update License tag - Fix game-crash while saving and loading (svn revision 6283) --- diff --git a/.cvsignore b/.cvsignore index 5d858a9..fcf13f8 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -warzone2100-2.1_beta5.tar.bz2 +warzone2100-2.1_rc1.tar.bz2 diff --git a/sources b/sources index 5abc477..1d594b9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c71951dc28a764af604d729b0cdf4742 warzone2100-2.1_beta5.tar.bz2 +154208e2a1df4549b74c8016b38b50f0 warzone2100-2.1_rc1.tar.bz2 diff --git a/warzone2100.spec b/warzone2100.spec index 0d60763..fd69c8a 100644 --- a/warzone2100.spec +++ b/warzone2100.spec @@ -1,12 +1,13 @@ Name: warzone2100 Version: 2.1.0 -Release: 0.6.beta5%{?dist} +Release: 0.7.rc1%{?dist} Summary: Innovative 3D real-time strategy Group: Amusements/Games -License: GPLv2+ +License: GPLv2+ and CC-BY-SA URL: http://wz2100.net/ -Source0: http://download.gna.org/warzone/releases/2.0/%{name}-2.1_beta5.tar.bz2 +Source0: http://download.gna.org/warzone/releases/2.0/%{name}-2.1_rc1.tar.bz2 +Patch0: warzone2100_fixsave.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: physfs-devel SDL_net-devel openal-devel bison flex zip @@ -24,10 +25,12 @@ game's source code was liberated on December 6th, 2004, under a GPL license ReDev project was formed to take care of its future. %prep -%setup -q -n %{name}-2.1_beta5 +%setup -q -n %{name}-2.1_rc1 +%patch0 %build -%configure --disable-mp3 --with-distributor="Fedora" +./autogen.sh +%configure --disable-rpath --disable-debug --with-distributor="Fedora" make %{_smp_mflags} %install @@ -50,11 +53,16 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/warzone* %{_datadir}/applications/fedora-%{name}.desktop %{_datadir}/warzone2100 -%doc AUTHORS ChangeLog COPYING COPYING.README +%doc AUTHORS ChangeLog COPYING COPYING.NONGPL COPYING.README %changelog +* Sun Nov 16 2008 Karol Trzcionka - 2.1.0-0.7.rc1 +- Update to v2.1.0-rc1 +- Fix typo in changelog +- Update License tag +- Fix game-crash while saving and loading (svn revision 6283) * Thu Oct 02 2008 Karol Trzcionka - 2.1.0-0.6.beta5 -- Update to v2.1.0-beta2 +- Update to v2.1.0-beta5 * Tue Apr 22 2008 Karol Trzcionka - 2.1.0-0.5.beta2 - Update to v2.1.0-beta2 - Add requires diff --git a/warzone2100_fixsave.patch b/warzone2100_fixsave.patch new file mode 100644 index 0000000..45fd46f --- /dev/null +++ b/warzone2100_fixsave.patch @@ -0,0 +1,138 @@ +--- ./src/multiplay.h 2008/11/13 22:42:02 6282 ++++ ./src/multiplay.h 2008/11/13 22:42:05 6283 +@@ -118,9 +118,9 @@ + extern WZ_DECL_WARN_UNUSED_RESULT DROID_TEMPLATE *IdToTemplate(UDWORD tempId,UDWORD player); + extern WZ_DECL_WARN_UNUSED_RESULT DROID_TEMPLATE *NameToTemplate(const char *sName,UDWORD player); + +-extern char *getPlayerName (UDWORD player); ++extern const char* getPlayerName(unsigned int player); + extern BOOL setPlayerName (UDWORD player, const char *sName); +-extern char *getPlayerColourName(SDWORD player); ++extern const char* getPlayerColourName(unsigned int player); + extern BOOL isHumanPlayer (UDWORD player); //to tell if the player is a computer or not. + extern BOOL myResponsibility (UDWORD player); + extern BOOL responsibleFor (UDWORD player, UDWORD playerinquestion); +--- ./src/multiplay.c 2008/11/13 22:42:02 6282 ++++ ./src/multiplay.c 2008/11/13 22:42:05 6283 +@@ -80,7 +80,6 @@ + + BOOL bSendingMap = false; // map broadcasting. + +-char tempString[12]; + char beaconReceiveMsg[MAX_PLAYERS][MAX_CONSOLE_STRING_LENGTH]; //beacon msg for each player + char playerName[MAX_PLAYERS][MAX_STR_LENGTH]; //Array to store all player names (humans and AIs) + BOOL bPlayerReadyGUI[MAX_PLAYERS] = {false}; +@@ -433,7 +432,7 @@ + + // //////////////////////////////////////////////////////////////////////////// + // return a players name. +-char *getPlayerName(UDWORD player) ++const char* getPlayerName(unsigned int player) + { + UDWORD i; + +@@ -455,7 +454,7 @@ + return getPlayerColourName(player); + } + +- return (char*)&NetPlay.players[i].name; ++ return NetPlay.players[i].name; + } + } + +@@ -1903,35 +1902,28 @@ + return addBeaconBlip(locX, locY, receiver, sender, beaconReceiveMsg[sender]); + } + +-static const char* playerColors[] = ++const char* getPlayerColourName(unsigned int player) + { +- N_("Green"), +- N_("Orange"), +- N_("Grey"), +- N_("Black"), +- N_("Red"), +- N_("Blue"), +- N_("Pink"), +- N_("Cyan") +-}; +- +-char *getPlayerColourName(SDWORD player) +-{ +- static const unsigned int end = sizeof(playerColors) / sizeof(const char*); ++ static const char* playerColors[] = ++ { ++ N_("Green"), ++ N_("Orange"), ++ N_("Grey"), ++ N_("Black"), ++ N_("Red"), ++ N_("Blue"), ++ N_("Pink"), ++ N_("Cyan") ++ }; + +- ASSERT(player < end, +- "getPlayerColourName: player number (%d) exceeds maximum (%d)\n", player, end - 1); ++ ASSERT(player < ARRAY_SIZE(playerColors), "player number (%d) exceeds maximum (%zu)", player, ARRAY_SIZE(playerColors)); + +- if (player < end) +- { +- strcpy(tempString, _(playerColors[ getPlayerColour(player) ])); +- } +- else ++ if (player >= ARRAY_SIZE(playerColors)) + { +- tempString[0] = '0'; ++ return ""; + } + +- return tempString; ++ return gettext(playerColors[getPlayerColour(player)]); + } + + /* +--- ./src/scriptfuncs.c 2008/11/13 22:42:02 6282 ++++ ./src/scriptfuncs.c 2008/11/13 22:42:05 6283 +@@ -5919,7 +5919,10 @@ + return false; + } + +- scrFunctionResult.v.sval = getPlayerColourName(player); ++ /* Casting away constness because stackPushResult doesn't modify it's ++ * value (i.e. in this case it's not const correct). ++ */ ++ scrFunctionResult.v.sval = (char*)getPlayerColourName(player); + if (!stackPushResult(VAL_STRING, &scrFunctionResult)) + { + debug(LOG_ERROR, "scrGetPlayerColourName(): failed to push result"); +@@ -10745,7 +10748,10 @@ + return false; + } + +- scrFunctionResult.v.sval = getPlayerName((UDWORD)player); ++ /* Casting away constness because stackPushResult doesn't modify it's ++ * value (i.e. in this case it's not const correct). ++ */ ++ scrFunctionResult.v.sval = (char*)getPlayerName((UDWORD)player); + if (!stackPushResult(VAL_STRING, &scrFunctionResult)) + { + debug(LOG_ERROR, "scrGetPlayerName(): failed to push result"); +@@ -10791,7 +10797,7 @@ + { + /* check name */ + //debug(LOG_SCRIPT, "checking (%s,%s)",getPlayerName(playerIndex), playerName); +- if (strncasecmp(getPlayerName(playerIndex),playerName, 255) == 0) ++ if (strncasecmp(getPlayerName(playerIndex), playerName, 255) == 0) + { + //debug(LOG_SCRIPT, "matched, returning %d", playerIndex); + return playerIndex; +@@ -10799,7 +10805,7 @@ + + /* check color */ + //debug(LOG_SCRIPT, "checking (%s,%s)",getPlayerColourName(playerIndex), playerName); +- if (strncasecmp(getPlayerColourName(playerIndex),playerName, 255) == 0) ++ if (strncasecmp(getPlayerColourName(playerIndex), playerName, 255) == 0) + { + //debug(LOG_SCRIPT, "matched, returning %d", playerIndex); + return playerIndex;