rpms/warzone2100/devel warzone2100_fixsave.patch, NONE, 1.1 .cvsignore, 1.9, 1.10 sources, 1.9, 1.10 warzone2100.spec, 1.19, 1.20
Karol Trzcionka
karlik at fedoraproject.org
Sun Nov 16 11:36:13 UTC 2008
- Previous message (by thread): rpms/LabPlot/devel LabPlot.spec, 1.13, 1.14 import.log, 1.1, 1.2 LabPlot-gcc43.patch, 1.1, NONE LabPlot-init-smg-before-open-files.patch, 1.1, NONE
- Next message (by thread): rpms/mono/devel import.log,1.11,1.12
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: karlik
Update of /cvs/pkgs/rpms/warzone2100/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23794
Modified Files:
.cvsignore sources warzone2100.spec
Added Files:
warzone2100_fixsave.patch
Log Message:
- Update to v2.1.0-rc1
- Fix typo in changelog
- Update License tag
- Fix game-crash while saving and loading (svn revision 6283)
warzone2100_fixsave.patch:
--- NEW FILE warzone2100_fixsave.patch ---
--- ./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;
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/warzone2100/devel/.cvsignore,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- .cvsignore 2 Oct 2008 21:16:50 -0000 1.9
+++ .cvsignore 16 Nov 2008 11:35:42 -0000 1.10
@@ -1 +1 @@
-warzone2100-2.1_beta5.tar.bz2
+warzone2100-2.1_rc1.tar.bz2
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/warzone2100/devel/sources,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- sources 2 Oct 2008 21:16:50 -0000 1.9
+++ sources 16 Nov 2008 11:35:42 -0000 1.10
@@ -1 +1 @@
-c71951dc28a764af604d729b0cdf4742 warzone2100-2.1_beta5.tar.bz2
+154208e2a1df4549b74c8016b38b50f0 warzone2100-2.1_rc1.tar.bz2
Index: warzone2100.spec
===================================================================
RCS file: /cvs/pkgs/rpms/warzone2100/devel/warzone2100.spec,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- warzone2100.spec 2 Oct 2008 21:16:50 -0000 1.19
+++ warzone2100.spec 16 Nov 2008 11:35:42 -0000 1.20
@@ -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 @@
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 @@
%{_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 <karlikt at gmail.com> - 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 <karlikt at gmail.com> - 2.1.0-0.6.beta5
-- Update to v2.1.0-beta2
+- Update to v2.1.0-beta5
* Tue Apr 22 2008 Karol Trzcionka <karlikt at gmail.com> - 2.1.0-0.5.beta2
- Update to v2.1.0-beta2
- Add requires
- Previous message (by thread): rpms/LabPlot/devel LabPlot.spec, 1.13, 1.14 import.log, 1.1, 1.2 LabPlot-gcc43.patch, 1.1, NONE LabPlot-init-smg-before-open-files.patch, 1.1, NONE
- Next message (by thread): rpms/mono/devel import.log,1.11,1.12
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list