[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src/ui menus.c
From: |
Mohydine |
Subject: |
[Stratagus-CVS] stratagus/src/ui menus.c |
Date: |
Fri, 17 Oct 2003 20:54:31 -0400 |
CVSROOT: /cvsroot/stratagus
Module name: stratagus
Branch:
Changes by: Mohydine <address@hidden> 03/10/17 20:54:31
Modified files:
src/ui : menus.c
Log message:
Clean up on some MetaServer functions
Patches:
Index: stratagus/src/ui/menus.c
diff -u stratagus/src/ui/menus.c:1.566 stratagus/src/ui/menus.c:1.567
--- stratagus/src/ui/menus.c:1.566 Fri Oct 17 20:02:51 2003
+++ stratagus/src/ui/menus.c Fri Oct 17 20:54:30 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: menus.c,v 1.566 2003/10/18 00:02:51 mohydine Exp $
+// $Id: menus.c,v 1.567 2003/10/18 00:54:30 mohydine Exp $
//@{
@@ -4682,7 +4682,7 @@
menu->Items[3].flags = MenuButtonDisabled;
}
- if (MetaServerInUse){
+ if (MetaServerInUse) {
ChangeGameServer();
}
}
@@ -4808,7 +4808,7 @@
MultiGamePlayerSelectorsUpdate(1);
DebugLevel3Fn("h = %d, NetPlayers = %d\n" _C_ h _C_ NetPlayers);
- if (MetaServerInUse){
+ if (MetaServerInUse) {
ChangeGameServer();
}
@@ -7322,7 +7322,8 @@
if (RecvMetaReply(&reply) == -1) {
//TODO: Notify player that connection was aborted...
nummenus = 0;
- } else {
+ }
+ else {
GetMetaParameter(reply, 0, ¶meter);
nummenus = atoi(parameter);
}
@@ -7340,14 +7341,15 @@
// Check if connection to meta server is there.
SendMetaCommand("GameNumber","%d\n",k + 1);
- i=RecvMetaReply(&reply);
+ i = RecvMetaReply(&reply);
if (i == 0) {
// fill the menus with the right info.
menu->Items[j].d.text.text = NULL;
menu->Items[j + 1].d.text.text = NULL;
menu->Items[j + 2].d.text.text = NULL;
menu->Items[j + 3].d.text.text = NULL;
- } else {
+ }
+ else {
GetMetaParameter(reply, 0, ¶meter); // Player Name
menu->Items[j].d.text.text = parameter;
@@ -7391,15 +7393,15 @@
char *port;
int j;
- j=mi - mi->menu->Items;
- mi->menu->Items[j].d.gem.state=MI_GSTATE_UNCHECKED;
+ j = mi - mi->menu->Items;
+ mi->menu->Items[j].d.gem.state = MI_GSTATE_UNCHECKED;
VideoLockScreen();
MenusSetBackground();
VideoUnlockScreen();
Invalidate();
EndMenu();
- strcpy(server_host_buffer,mi->menu->Items[j-4].d.text.text);
+ strcpy(server_host_buffer, mi->menu->Items[j-4].d.text.text);
//Launch join directly
@@ -7463,9 +7465,12 @@
{
//send message to meta server. meta server will detect IP address.
//Meta-server will return "ERR" if the list of online games is busy.
- int i,freespots,players;
- freespots=0;
- players=0;
+ int i;
+ int freespots;
+ int players;
+
+ freespots = 0;
+ players = 0;
for (i = 0; i < PlayerMax - 1; ++i) {
if (MenuMapInfo->PlayerType[i] == PlayerPerson) {
++players;
@@ -7498,7 +7503,7 @@
local void MultiMetaServerClose(void)
{
MetaClose();
- MetaServerInUse=0;
+ MetaServerInUse = 0;
EndMenu();
}
//@}
- [Stratagus-CVS] stratagus/src/ui menus.c, Mohydine, 2003/10/17
- [Stratagus-CVS] stratagus/src/ui menus.c, Mohydine, 2003/10/17
- [Stratagus-CVS] stratagus/src/ui menus.c,
Mohydine <=
- [Stratagus-CVS] stratagus/src/ui menus.c, Mohydine, 2003/10/17
- [Stratagus-CVS] stratagus/src/ui menus.c, Mohydine, 2003/10/20
- [Stratagus-CVS] stratagus/src/ui menus.c, Mohydine, 2003/10/25
- [Stratagus-CVS] stratagus/src/ui menus.c, Mohydine, 2003/10/25
- [Stratagus-CVS] stratagus/src/ui menus.c, Mohydine, 2003/10/25
- [Stratagus-CVS] stratagus/src/ui menus.c, Russell Smith, 2003/10/27
- [Stratagus-CVS] stratagus/src/ui menus.c, Mohydine, 2003/10/27
- [Stratagus-CVS] stratagus/src/ui menus.c, Mohydine, 2003/10/28
- [Stratagus-CVS] stratagus/src/ui menus.c, Jimmy Salmon, 2003/10/29
- [Stratagus-CVS] stratagus/src/ui menus.c, Russell Smith, 2003/10/29