[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netPanzer-CVS] netpanzer/src ChangeLog Lib/View/cInputField.cp...
From: |
Matthias Braun |
Subject: |
[netPanzer-CVS] netpanzer/src ChangeLog Lib/View/cInputField.cp... |
Date: |
Mon, 15 Sep 2003 17:22:15 -0400 |
CVSROOT: /cvsroot/netpanzer
Module name: netpanzer
Branch:
Changes by: Matthias Braun <address@hidden> 03/09/15 17:22:14
Modified files:
src : ChangeLog
src/Lib/View : cInputField.cpp
src/NetPanzer/Interfaces: GameManager.cpp
src/NetPanzer/Interfaces/unix: NetworkClientUnix.cpp
NetworkServerUnix.cpp
src/NetPanzer/Views/Game: AreYouSureResignView.cpp
WinnerMesgView.cpp
src/NetPanzer/Views/MainMenu: MainMenuView.cpp
MenuTemplateView.cpp
src/NetPanzer/Views/MainMenu/Multi: GetSessionView.cpp
IPAddressView.cpp
IPAddressView.h JoinView.cpp
Removed files:
src/NetPanzer/Views/MainMenu/Multi: GetConnectionTypeView.cpp
GetConnectionTypeView.hpp
Log message:
-removed the GetConnectionTypeView menu. We're only using tcp/ip.
-made the Join view working again
Patches:
Index: netpanzer/src/ChangeLog
diff -u netpanzer/src/ChangeLog:1.22 netpanzer/src/ChangeLog:1.23
--- netpanzer/src/ChangeLog:1.22 Sun Sep 14 14:04:21 2003
+++ netpanzer/src/ChangeLog Mon Sep 15 17:22:14 2003
@@ -1,23 +1,27 @@
+15-Sep-2003 by Matthias Braun
+-removed the GetConnectionTypeView menu. We're only using tcp/ip.
+-made the Join view working again
+
14-Sep-2003 by Ivo Danihelka
-converted sdlsound to use physfs, Mix_LoadMUS_RW is not used yet
-14-Sep-2003 by Matze Braun
+14-Sep-2003 by Matthias Braun
-applied sound patch by Ivo Danihelka (thanks alot)
-added code to construct SDL_RWops in physfs files
-12-Sep-2003 by Matze Braun
+12-Sep-2003 by Matthias Braun
-use the physfs for the colortable cache now
-removed lots of unused code from Surface class
-removed the screenshot function (this allowed to remove the BMP saver too).
because there are external screenshot tools around.
-11-Sep-2003 by Matze Braun
+11-Sep-2003 by Matthias Braun
-removed more win32 specific code
-removed #ifdef USE_SDLs, the code is enabled by default now
-added a new commandline parser
-smaller fixes/cleanups
-10-Sep-2003 by Matze Braun
+10-Sep-2003 by Matthias Braun
-more random cleanups
-more cleanups so that the Stub directory is empty now
-fixed the bug where the TileEngine didn't correctly draw the last line
@@ -30,14 +34,14 @@
decided that this stuff is quiet useless.
-removed most of the win32 specific code
-9-Sep-2003 by Matze Braun
+9-Sep-2003 by Matthias Braun
-worked around issues with the block allocator code for Particl2D (new operator
is overloaded, but laste C++ draft doesn't allow to return 0 from such an
overloaded new.) I added exceptions and lots of try {} catch{} blocks, let's
hope I didn't miss something.
-eleminated isValidPtr, Util.hpp and GOTTA_HAVE_IT from codewiz.hpp
-8-Sep-2003 by Matze Braun
+8-Sep-2003 by Matthias Braun
-added some basic music plying support (all files in sfx/music are played in
random order, so simply put some .mp3 or .ogg there)
-enabled Tile engine code again
@@ -51,7 +55,7 @@
-lots of small fixes in the network code
-applied a patch from Raphael Bosshard which fixes a few warnings
-7-Sep-2003 by Matze Braun
+7-Sep-2003 by Matthias Braun
-removed NetMessageLog class (because it only contained shit ;-)
-slightly changed NetworkServer and NetworkClient interfaces
-Added a SDL_Net version of the network code
@@ -61,7 +65,7 @@
-added a client version of the SDLNet code
-replaced all FUBARs with throw Exception, so I could remove terminate.cpp
-6-Sep-2003 by Matze Braun
+6-Sep-2003 by Matthias Braun
-added a unix implementation of _findfirst, _findnext and _findclose
-removed some getDrive functions, was never used and supporting drives in unix
is hard :)
Index: netpanzer/src/Lib/View/cInputField.cpp
diff -u netpanzer/src/Lib/View/cInputField.cpp:1.7
netpanzer/src/Lib/View/cInputField.cpp:1.8
--- netpanzer/src/Lib/View/cInputField.cpp:1.7 Wed Sep 10 07:26:07 2003
+++ netpanzer/src/Lib/View/cInputField.cpp Mon Sep 15 17:22:14 2003
@@ -35,10 +35,6 @@
assert(maxCharCount > 0);
cInputFieldString::string = new char [maxCharCount + 1];
- if (this->string == 0)
- {
- throw Exception("ERROR: Unable to allocate cInputFieldString
string.");
- }
if (strlen(string) > 0 && strlen(string) < (size_t) maxCharCount)
{
@@ -54,7 +50,6 @@
void cInputFieldString::setString(const char *string)
{
strncpy(this->string, string, maxCharCount);
-
} // end setString
// reset
Index: netpanzer/src/NetPanzer/Interfaces/GameManager.cpp
diff -u netpanzer/src/NetPanzer/Interfaces/GameManager.cpp:1.39
netpanzer/src/NetPanzer/Interfaces/GameManager.cpp:1.40
--- netpanzer/src/NetPanzer/Interfaces/GameManager.cpp:1.39 Sat Sep 13
18:39:09 2003
+++ netpanzer/src/NetPanzer/Interfaces/GameManager.cpp Mon Sep 15 17:22:14 2003
@@ -82,7 +82,6 @@
#include "JoinView.hpp"
#include "HostView.hpp"
#include "GetSessionView.hpp"
-#include "GetConnectionTypeView.hpp"
#include "GetSessionHostView.hpp"
#include "ChatView.hpp"
#include "WinnerMesgView.hpp"
@@ -243,7 +242,6 @@
Desktop::add(new JoinView());
Desktop::add(new HostView());
Desktop::add(new GetSessionView());
- Desktop::add(new GetConnectionTypeView());
Desktop::add(new GetSessionHostView());
Desktop::add(new OptionsTemplateView());
Desktop::add(new OrderingView());
@@ -252,8 +250,6 @@
Desktop::add(new ControlsView());
Desktop::add(new VisualsView());
Desktop::add(new InterfaceView());
- //Desktop::add(new DirectPlayErrorExceptionView());
- //Desktop::add(new UnitSelectionView());
Desktop::add(new FlagSelectionView());
Desktop::add(new HostOptionsView());
Desktop::add(new PlayerNameView());
@@ -1559,7 +1555,7 @@
//winsock hack
//JoinSession( gapp.hwndApp );
//InitStreamClient(gapp.hwndApp);
- CLIENT->joinSession("127.0.0.1");
+ CLIENT->joinSession(IPAddressView::szServer.getString());
// XXX how should that work? we can't process (network) events while waiting
#if 0
@@ -1900,14 +1896,16 @@
// ******************************************************************
void GameManager::dedicatedGameLoop()
- {
- TimerInterface::start();
+{
+ TimerInterface::start();
- dedicatedInputLoop();
- dedicatedSimLoop();
+ dedicatedInputLoop();
+ dedicatedSimLoop();
+ // wait a bit to make the cpu happy
+ SDL_Delay(20);
- TimerInterface::update();
- }
+ TimerInterface::update();
+}
// ******************************************************************
void GameManager::dedicatedSimLoop()
Index: netpanzer/src/NetPanzer/Interfaces/unix/NetworkClientUnix.cpp
diff -u netpanzer/src/NetPanzer/Interfaces/unix/NetworkClientUnix.cpp:1.6
netpanzer/src/NetPanzer/Interfaces/unix/NetworkClientUnix.cpp:1.7
--- netpanzer/src/NetPanzer/Interfaces/unix/NetworkClientUnix.cpp:1.6 Mon Sep
8 17:25:09 2003
+++ netpanzer/src/NetPanzer/Interfaces/unix/NetworkClientUnix.cpp Mon Sep
15 17:22:14 2003
@@ -24,6 +24,8 @@
#include "NetworkState.hpp"
#include "NetworkClientUnix.hpp"
+// #define NETWORKDEBUG
+
NetworkClientUnix::NetworkClientUnix( void )
: NetworkClient(), clientsocket(0)
{
@@ -119,8 +121,10 @@
if(!clientsocket)
return;
+#ifdef NETWORKDEBUG
LOG( ( "SEND >> Class: %d ID: %d", message->message_class,
message->message_id) );
+#endif
message->size = size;
clientsocket->sendMessage((char*) message, message->size,
@@ -139,8 +143,10 @@
memmove( (void *) message, net_packet.data, net_packet.packet_size );
+#ifdef NETWORKDEBUG
LOG( ( "RECV >> Class: %d ID: %d", message->message_class,
message->message_id) );
+#endif
if ( message->message_class == _net_message_class_client_server )
{ processNetMessage( message ); }
@@ -156,8 +162,10 @@
memmove( (void *) message, net_packet.data, net_packet.packet_size );
+#ifdef NETWORKDEBUG
LOG( ( "RECV >> Class: %d ID: %d", message->message_class,
message->message_id ) );
+#endif
if ( message->message_class == _net_message_class_client_server )
{ processNetMessage( message ); }
Index: netpanzer/src/NetPanzer/Interfaces/unix/NetworkServerUnix.cpp
diff -u netpanzer/src/NetPanzer/Interfaces/unix/NetworkServerUnix.cpp:1.4
netpanzer/src/NetPanzer/Interfaces/unix/NetworkServerUnix.cpp:1.5
--- netpanzer/src/NetPanzer/Interfaces/unix/NetworkServerUnix.cpp:1.4 Sun Sep
7 14:39:33 2003
+++ netpanzer/src/NetPanzer/Interfaces/unix/NetworkServerUnix.cpp Mon Sep
15 17:22:14 2003
@@ -24,6 +24,8 @@
#include "Exception.hpp"
#include "NetworkServerUnix.hpp"
+//#define NETWORKDEBUG
+
NetworkServerUnix::NetworkServerUnix()
: NetworkServer(), serversocket(0)
{
@@ -59,8 +61,10 @@
int NetworkServerUnix::sendMessage(const PlayerID& player_id,
NetMessage* message, size_t size, int flags)
{
+#ifdef NETWORKDEBUG
LOG( ( "SEND >> Class: %d ID: %d", message->message_class,
message->message_id ) );
+#endif
message->size = size;
try {
@@ -121,9 +125,11 @@
memmove( (void *) message, net_packet.data,
net_packet.packet_size );
NetworkState::incPacketsReceived(
net_packet.packet_size );
-
+
+#ifdef NETWORKDEBUG
LOG( ( "RECV >> Class: %d ID: %d",
message->message_class,
message->message_id ) );
+#endif
if ( message->message_class ==
_net_message_class_client_server )
{ processNetMessage( message ); }
Index: netpanzer/src/NetPanzer/Views/Game/AreYouSureResignView.cpp
diff -u netpanzer/src/NetPanzer/Views/Game/AreYouSureResignView.cpp:1.9
netpanzer/src/NetPanzer/Views/Game/AreYouSureResignView.cpp:1.10
--- netpanzer/src/NetPanzer/Views/Game/AreYouSureResignView.cpp:1.9 Sat Sep
13 18:38:21 2003
+++ netpanzer/src/NetPanzer/Views/Game/AreYouSureResignView.cpp Mon Sep 15
17:22:14 2003
@@ -40,7 +40,7 @@
ParticleSystem2D::removeAll();
Particle2D::removeAll();
- sprintf(MenuTemplateView::currentMultiView, "GetConnectionTypeView");
+ sprintf(MenuTemplateView::currentMultiView, "GetSessionView");
// Vlad put all code in here for shutdown.
//----------------------
Index: netpanzer/src/NetPanzer/Views/Game/WinnerMesgView.cpp
diff -u netpanzer/src/NetPanzer/Views/Game/WinnerMesgView.cpp:1.8
netpanzer/src/NetPanzer/Views/Game/WinnerMesgView.cpp:1.9
--- netpanzer/src/NetPanzer/Views/Game/WinnerMesgView.cpp:1.8 Sat Sep 13
18:38:22 2003
+++ netpanzer/src/NetPanzer/Views/Game/WinnerMesgView.cpp Mon Sep 15
17:22:14 2003
@@ -16,6 +16,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <config.h>
+
#include "WinnerMesgView.hpp"
#include "GameViewGlobals.hpp"
#include "Desktop.hpp"
@@ -47,12 +48,11 @@
sound->stopTankIdle();
// Blank the screen.
-
GameManager::drawTextCenteredOnScreen("Loading Main View...",
Color::white);
ParticleSystem2D::removeAll();
Particle2D::removeAll();
- sprintf(MenuTemplateView::currentMultiView, "GetConnectionTypeView");
+ sprintf(MenuTemplateView::currentMultiView, "GetSessionView");
// put all code in here for shutdown.
//----------------------
Index: netpanzer/src/NetPanzer/Views/MainMenu/MainMenuView.cpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/MainMenuView.cpp:1.5
netpanzer/src/NetPanzer/Views/MainMenu/MainMenuView.cpp:1.6
--- netpanzer/src/NetPanzer/Views/MainMenu/MainMenuView.cpp:1.5 Sat Sep 6
13:54:45 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/MainMenuView.cpp Mon Sep 15
17:22:14 2003
@@ -15,9 +15,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
-
#include <config.h>
+
#include "MainMenuView.hpp"
#include "Desktop.hpp"
#include "DDHardSurface.hpp"
Index: netpanzer/src/NetPanzer/Views/MainMenu/MenuTemplateView.cpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/MenuTemplateView.cpp:1.10
netpanzer/src/NetPanzer/Views/MainMenu/MenuTemplateView.cpp:1.11
--- netpanzer/src/NetPanzer/Views/MainMenu/MenuTemplateView.cpp:1.10 Wed Sep
10 07:26:10 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/MenuTemplateView.cpp Mon Sep 15
17:22:14 2003
@@ -41,7 +41,7 @@
//PackedSurface MenuTemplateView::netPanzerLogo;
-char MenuTemplateView::currentMultiView[] = "GetConnectionTypeView";
+char MenuTemplateView::currentMultiView[] = "GetSessionView";
char MenuTemplateView::currentView[] = "";
static void bMain()
@@ -50,27 +50,11 @@
Desktop::setVisibility("MainView", true);
}
-// never used
-#if 0
-static void bSkirmish()
-{
- Desktop::setVisibilityAllWindows(false);
- Desktop::setVisibility("SkirmishView", true);
-}
-#endif
-
static void bMulti()
{
GameConfig::SetGameMode(_gamemode_multiplayer);
- // Check to see which multi menu the used is actually at since
- // it is possible to leave the multi menu at any point in the menu.
- if (strcmp(MenuTemplateView::currentMultiView, "GetConnectionTypeView")
== 0)
- {
- Desktop::setVisibilityAllWindows(false);
- Desktop::setVisibility("GetConnectionTypeView", true);
- }
- else if (strcmp(MenuTemplateView::currentMultiView, "GetSessionView")
== 0)
+ if (strcmp(MenuTemplateView::currentMultiView, "GetSessionView") == 0)
{
Desktop::setVisibilityAllWindows(false);
Desktop::setVisibility("GetSessionView", true);
@@ -89,9 +73,10 @@
{
printf("EnteringJoinView.\n");
Desktop::setVisibilityAllWindows(false);
+ // XXX
Desktop::setVisibility("JoinView", true);
- Desktop::setVisibility("GetSessionHostView", true);
- Desktop::setVisibility("UnitSelectionView", true);
+ //Desktop::setVisibility("GetSessionHostView", true);
+ //Desktop::setVisibility("UnitSelectionView", true);
Desktop::setVisibility("FlagSelectionView", true);
Desktop::setVisibility("PlayerNameView", true);
} else
Index: netpanzer/src/NetPanzer/Views/MainMenu/Multi/GetSessionView.cpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/Multi/GetSessionView.cpp:1.9
netpanzer/src/NetPanzer/Views/MainMenu/Multi/GetSessionView.cpp:1.10
--- netpanzer/src/NetPanzer/Views/MainMenu/Multi/GetSessionView.cpp:1.9 Wed Sep
10 07:26:10 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/Multi/GetSessionView.cpp Mon Sep
15 17:22:14 2003
@@ -41,7 +41,7 @@
static void bBack()
{
Desktop::setVisibilityAllWindows(false);
- Desktop::setVisibility("GetConnectionTypeView", true);
+ Desktop::setVisibility("MainView", true);
}
void bNext()
@@ -83,7 +83,8 @@
{
CLIENT->openSession();
- // XXX hack
+ // XXX no server enumertation/info yet
+#if 0
CLIENT->startEnumeration();
/*
if ( CLIENT->startEnumeration( ) == false )
@@ -93,9 +94,10 @@
}
else
{*/
+#endif
Desktop::setVisibility("JoinView", true);
- Desktop::setVisibility("GetSessionHostView", true);
- Desktop::setVisibility("UnitSelectionView", true);
+ //Desktop::setVisibility("GetSessionHostView", true);
+ //Desktop::setVisibility("UnitSelectionView", true);
Desktop::setVisibility("FlagSelectionView", true);
Desktop::setVisibility("PlayerNameView", true);
//}
Index: netpanzer/src/NetPanzer/Views/MainMenu/Multi/IPAddressView.cpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/Multi/IPAddressView.cpp:1.5
netpanzer/src/NetPanzer/Views/MainMenu/Multi/IPAddressView.cpp:1.6
--- netpanzer/src/NetPanzer/Views/MainMenu/Multi/IPAddressView.cpp:1.5 Wed Sep
10 07:26:10 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/Multi/IPAddressView.cpp Mon Sep
15 17:22:14 2003
@@ -36,8 +36,9 @@
strcpy( address.string_rep, szServerName );
+ // XXX No server info view yet
+#if 0
ret_val = CLIENT->startEnumeration( address );
- // XXX hack
ret_val = 1;
if(ret_val == 1)
@@ -57,8 +58,7 @@
Desktop::setVisibilityAllWindows(false);
Desktop::setVisibility("GetSessionView", true);
}
-
-
+#endif
}
////////////////////////////////////////////
//END buttonOkay////////////////////////////
@@ -88,29 +88,25 @@
setAllowMove(false);
setVisible(false);
- moveTo(iXY(20,70));
-
- iXY area_size = iXY(280, 110);
- resizeClientArea(area_size);
-
- addButtonCenterText(iXY(185, 10 ), 80, "Okay", "", buttonOkay);
- addButtonCenterText(iXY(185, 35 ), 80, "Cancel", "", buttonCancel);
+ moveTo(iXY(20,70));
- //addButtonCenterText(iXY(16, 50 ), area_size.x - 40, "Cancel", "",
buttonCancel);
+ iXY area_size = iXY(280, 110);
+ resizeClientArea(area_size);
+ addButtonCenterText(iXY(185, 10 ), 80, "Okay", "", buttonOkay);
+ addButtonCenterText(iXY(185, 35 ), 80, "Cancel", "", buttonCancel);
- Init();
-
+ //addButtonCenterText(iXY(16, 50 ), area_size.x - 40, "Cancel", "",
buttonCancel);
+ Init();
} // end IPAddressView constructor
void IPAddressView::Init()
{
- szServer.init(" ", 100);
+ szServer.init(" ", 100);
addInputField(iXY(10, 80), &szServer, "", true);
-
} // end PlayerNameView::init
@@ -120,8 +116,6 @@
//---------------------------------------------------------------------------
void IPAddressView::doDraw(const Surface &viewArea, const Surface &clientArea)
{
-
- clientArea.fill(Color::black);
+ clientArea.fill(Color::black);
View::doDraw(viewArea, clientArea);
-
} // end IPAddressView::doDraw
Index: netpanzer/src/NetPanzer/Views/MainMenu/Multi/IPAddressView.h
diff -u netpanzer/src/NetPanzer/Views/MainMenu/Multi/IPAddressView.h:1.1
netpanzer/src/NetPanzer/Views/MainMenu/Multi/IPAddressView.h:1.2
--- netpanzer/src/NetPanzer/Views/MainMenu/Multi/IPAddressView.h:1.1 Sun Dec
1 12:52:00 2002
+++ netpanzer/src/NetPanzer/Views/MainMenu/Multi/IPAddressView.h Mon Sep
15 17:22:14 2003
@@ -18,12 +18,6 @@
#ifndef __IPAddressView_h__
#define __IPAddressView_h__
-
-#if _MSC_VER > 1000
- #pragma once
-#endif
-
-
#include "View.hpp"
#include "Surface.hpp"
#include "cGrowList.hpp"
@@ -31,11 +25,6 @@
//---------------------------------------------------------------------------
class IPAddressView : public View
{
-
-private:
-
-protected:
-
public:
static cInputFieldString szServer;
@@ -43,8 +32,7 @@
void Init();
- virtual void doDraw(const Surface &windowArea, const Surface &clientArea);
-
+ virtual void doDraw(const Surface &windowArea, const Surface &clientArea);
}; // end IPAddressView
#endif // end __IPAddressView_h__
Index: netpanzer/src/NetPanzer/Views/MainMenu/Multi/JoinView.cpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/Multi/JoinView.cpp:1.6
netpanzer/src/NetPanzer/Views/MainMenu/Multi/JoinView.cpp:1.7
--- netpanzer/src/NetPanzer/Views/MainMenu/Multi/JoinView.cpp:1.6 Wed Sep
10 07:26:10 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/Multi/JoinView.cpp Mon Sep 15
17:22:14 2003
@@ -24,7 +24,6 @@
#include "GameManager.hpp"
#include "GameViewGlobals.hpp"
-
// JoinView
//---------------------------------------------------------------------------
JoinView::JoinView() : HostJoinTemplateView()
@@ -61,5 +60,5 @@
void JoinView::loadTitleSurface()
{
doLoadTitleSurface("pics/backgrounds/menus/menu/til/joinTitle.til");
-
} // end JoinView::loadTitleSurface
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [netPanzer-CVS] netpanzer/src ChangeLog Lib/View/cInputField.cp...,
Matthias Braun <=