You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(36) |
May
(328) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: Weeblie <we...@us...> - 2004-05-30 16:03:06
|
Update of /cvsroot/tofs/src/test/server/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20684/src/test/server/config Modified Files: server.cfg Log Message: AWS Index: server.cfg =================================================================== RCS file: /cvsroot/tofs/src/test/server/config/server.cfg,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 Binary files /tmp/cvsTNoJbC and /tmp/cvs4zh09C differ |
From: Weeblie <we...@us...> - 2004-05-30 16:03:06
|
Update of /cvsroot/tofs/src/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20684/src/server Modified Files: osserver.cpp Log Message: AWS Index: osserver.cpp =================================================================== RCS file: /cvsroot/tofs/src/server/osserver.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** osserver.cpp 27 May 2004 14:12:40 -0000 1.34 --- osserver.cpp 30 May 2004 16:02:21 -0000 1.35 *************** *** 385,390 **** consoleOutput->SetFont(defaultFont); consoleOutput->AutoUpdate(false); ! consoleOutput->SetTransparency(false); ! consoleOutput->PerformExtension("SetPos",0,0,g2d->GetWidth(),g2d->GetHeight()-30); consoleOutput->PerformExtension("SetForegroundColor", g2d->FindRGB(0,0,255)); consoleOutput->PerformExtension("SetBackgroundColor", g2d->FindRGB(255,255,128)); --- 385,390 ---- consoleOutput->SetFont(defaultFont); consoleOutput->AutoUpdate(false); ! consoleOutput->SetTransparency(true); ! consoleOutput->PerformExtension("SetPos",0,0,g2d->GetWidth(),g2d->GetHeight()); consoleOutput->PerformExtension("SetForegroundColor", g2d->FindRGB(0,0,255)); consoleOutput->PerformExtension("SetBackgroundColor", g2d->FindRGB(255,255,128)); *************** *** 575,578 **** --- 575,580 ---- void osServer::BeginDrawFrame() { + csfxScreenDPFXPartial(g3d, 0, 0,g2d->GetWidth(), g2d->GetHeight(),0, CS_FX_SETALPHA(192), 20, 20, 100); + consoleOutput->Draw3D(); if(g3d->BeginDraw (CSDRAW_2DGRAPHICS)) |
From: Weeblie <we...@us...> - 2004-05-30 16:03:04
|
Update of /cvsroot/tofs/src/mk/vs7.1/tofsserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20684/src/mk/vs7.1/tofsserver Modified Files: tofsserver.vcproj Log Message: AWS Index: tofsserver.vcproj =================================================================== RCS file: /cvsroot/tofs/src/mk/vs7.1/tofsserver/tofsserver.vcproj,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tofsserver.vcproj 29 May 2004 15:02:10 -0000 1.17 --- tofsserver.vcproj 30 May 2004 16:02:21 -0000 1.18 *************** *** 306,309 **** --- 306,312 ---- </File> </Filter> + <File + RelativePath="..\..\..\..\docs\history.txt"> + </File> </Files> <Globals> |
From: Weeblie <we...@us...> - 2004-05-30 16:03:04
|
Update of /cvsroot/tofs/src/mk/vs7.1/tofsclient In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20684/src/mk/vs7.1/tofsclient Modified Files: tofsclient.vcproj Log Message: AWS Index: tofsclient.vcproj =================================================================== RCS file: /cvsroot/tofs/src/mk/vs7.1/tofsclient/tofsclient.vcproj,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** tofsclient.vcproj 29 May 2004 15:02:09 -0000 1.15 --- tofsclient.vcproj 30 May 2004 16:02:20 -0000 1.16 *************** *** 136,139 **** --- 136,142 ---- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> <File + RelativePath="..\..\..\client\osawsmanager.cpp"> + </File> + <File RelativePath="..\..\..\common\osbuffer.cpp"> </File> *************** *** 175,178 **** --- 178,184 ---- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> <File + RelativePath="..\..\..\client\osawsmanager.h"> + </File> + <File RelativePath="..\..\..\common\osbuffer.h"> </File> *************** *** 232,235 **** --- 238,244 ---- </File> </Filter> + <File + RelativePath="..\..\..\..\docs\history.txt"> + </File> </Files> <Globals> |
From: Weeblie <we...@us...> - 2004-05-30 16:03:04
|
Update of /cvsroot/tofs/src/common/osinputoutput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20684/src/common/osinputoutput Modified Files: osiosocket.cpp Log Message: AWS Index: osiosocket.cpp =================================================================== RCS file: /cvsroot/tofs/src/common/osinputoutput/osiosocket.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** osiosocket.cpp 29 May 2004 15:42:17 -0000 1.15 --- osiosocket.cpp 30 May 2004 16:02:20 -0000 1.16 *************** *** 31,37 **** notifyBytes(0), sock(INVALID_SOCKET), csRefCount(0) { - connectionStatus=osConnectionStatus::NotAvailable; readableAddress[0]=NULL; DEBUG_VERYVERBOSE(ioLog->Write("osIOSocket()",true,osLogger::OS_LOG_VVDEBUG)); --- 31,37 ---- notifyBytes(0), sock(INVALID_SOCKET), + connectionStatus(osIOSocket::osConnectionStatus::NotAvailable), csRefCount(0) { readableAddress[0]=NULL; DEBUG_VERYVERBOSE(ioLog->Write("osIOSocket()",true,osLogger::OS_LOG_VVDEBUG)); *************** *** 44,50 **** notifyBytes(0), sock(INVALID_SOCKET), csRefCount(0) { - connectionStatus=osConnectionStatus::NotAvailable; readableAddress[0]=NULL; sock=socket; --- 44,50 ---- notifyBytes(0), sock(INVALID_SOCKET), + connectionStatus(osIOSocket::osConnectionStatus::NotAvailable), csRefCount(0) { readableAddress[0]=NULL; sock=socket; |
From: Weeblie <we...@us...> - 2004-05-30 16:03:03
|
Update of /cvsroot/tofs/src/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20684/src/common Modified Files: osinputoutput.cpp osstdincludes.h Log Message: AWS Index: osinputoutput.cpp =================================================================== RCS file: /cvsroot/tofs/src/common/osinputoutput.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** osinputoutput.cpp 29 May 2004 15:02:07 -0000 1.7 --- osinputoutput.cpp 30 May 2004 16:02:20 -0000 1.8 *************** *** 35,39 **** return true; // Error >_< ! osAssert(len>0); // Hm... Good size? if(len<=0) return true; --- 35,39 ---- return true; // Error >_< ! //osAssert(len>0); // Hm... Good size? if(len<=0) return true; Index: osstdincludes.h =================================================================== RCS file: /cvsroot/tofs/src/common/osstdincludes.h,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** osstdincludes.h 29 May 2004 15:42:18 -0000 1.26 --- osstdincludes.h 30 May 2004 16:02:20 -0000 1.27 *************** *** 58,61 **** --- 58,64 ---- #include "csutil/objreg.h" #include "csutil/sysfunc.h" + #include "iaws/aws.h" + #include "iaws/awscnvs.h" + #include "iaws/awsdefs.h" #include "iengine/engine.h" #include "iengine/mesh.h" |
From: Weeblie <we...@us...> - 2004-05-30 16:03:01
|
Update of /cvsroot/tofs/debug/win32_vs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20684/debug/win32_vs Modified Files: tofsclient.exe tofsserver.exe Log Message: AWS Index: tofsclient.exe =================================================================== RCS file: /cvsroot/tofs/debug/win32_vs/tofsclient.exe,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 Binary files /tmp/cvsld6FWu and /tmp/cvsnMwktr differ Index: tofsserver.exe =================================================================== RCS file: /cvsroot/tofs/debug/win32_vs/tofsserver.exe,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 Binary files /tmp/cvssiJdD7 and /tmp/cvseAEvE4 differ |
From: Weeblie <we...@us...> - 2004-05-30 16:03:00
|
Update of /cvsroot/tofs/src/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20684/src/client Modified Files: osclient.cpp osclient.h Added Files: osawsmanager.cpp osawsmanager.h Log Message: AWS --- NEW FILE: osawsmanager.h --- /* Copyright (C) 2004 Chen Xing (Weeblie) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef OSAWSMANAGER_H #define OSAWSMANAGER_H struct iVFS; struct iGraphics2D; struct iGraphics3D; struct iAws; /* osAWSManager - Alternate Windowing System Manager */ class osAWSManager { public: osAWSManager(); ~osAWSManager(); public: int Initialize(csRef<iAws> Aws, csRef<iVFS> Vfs, csRef<iGraphics3D> G3d, csRef<iGraphics2D> G2d); void Cleanup(); private: csRef<iAws> aws; csRef<iVFS> vfs; csRef<iGraphics3D> g3d; csRef<iGraphics2D> g2d; }; #endif // OSAWSMANAGER_H Index: osclient.h =================================================================== RCS file: /cvsroot/tofs/src/client/osclient.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** osclient.h 20 May 2004 16:04:44 -0000 1.7 --- osclient.h 30 May 2004 16:02:19 -0000 1.8 *************** *** 22,25 **** --- 22,26 ---- #include "osclientconfig.h" #include "osinputoutput/osiosocket.h" + #include "osawsmanager.h" struct iObjectRegistry; *************** *** 33,36 **** --- 34,38 ---- struct iFont; struct iFontServer; + struct iAws; class osClient *************** *** 51,55 **** iObjectRegistry* object_reg; // Some strange CrystalSpace thing... :) csRef<osIOSocket> clientSocket; // The main connection to server... ! // list< csRef<osIOSocket> > clusterServerSockets; // Connections to cluster servers (to all servers in the nearby areas) N/A yet... private: --- 53,58 ---- iObjectRegistry* object_reg; // Some strange CrystalSpace thing... :) csRef<osIOSocket> clientSocket; // The main connection to server... ! osAWSManager* awsManager; ! // list< csRef<osIOSocket> > clusterServerSockets; // Connections to cluster servers (to all servers in the nearby areas) N/A yet... private: *************** *** 64,67 **** --- 67,71 ---- csRef<iEngine> engine; csRef<iLoader> loader; + csRef<iAws> aws; }; Index: osclient.cpp =================================================================== RCS file: /cvsroot/tofs/src/client/osclient.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** osclient.cpp 27 May 2004 14:12:39 -0000 1.14 --- osclient.cpp 30 May 2004 16:02:19 -0000 1.15 *************** *** 122,126 **** osClient::osClient(): ! object_reg(NULL) { --- 122,127 ---- osClient::osClient(): ! object_reg(NULL), ! awsManager(NULL) { *************** *** 129,133 **** osClient::~osClient() { ! } --- 130,135 ---- osClient::~osClient() { ! if(awsManager) ! delete awsManager; } *************** *** 150,153 **** --- 152,163 ---- ioLog->Write("Cleaning up...",true,osLogger::OS_LOG_INFO); + if(awsManager) + { + awsManager->Cleanup(); + delete awsManager; + awsManager=NULL; + } + + if(clientConfig!=NULL) { *************** *** 352,356 **** consoleOutput->AutoUpdate(false); // We don't need CS to handle it... ! consoleOutput->SetTransparency(false); consoleOutput->PerformExtension("SetPos",0,0,g2d->GetWidth(),clientConfig->GetCSConsoleHeight()); consoleOutput->PerformExtension("SetForegroundColor", g2d->FindRGB(0,0,255)); --- 362,366 ---- consoleOutput->AutoUpdate(false); // We don't need CS to handle it... ! consoleOutput->SetTransparency(true); consoleOutput->PerformExtension("SetPos",0,0,g2d->GetWidth(),clientConfig->GetCSConsoleHeight()); consoleOutput->PerformExtension("SetForegroundColor", g2d->FindRGB(0,0,255)); *************** *** 384,388 **** } ! engine->SetLightingCacheMode(clientConfig->GetLightningCache()); if(clientConfig->GetLogToConsole()) // Logging to screen? Or only to file? --- 394,418 ---- } ! // AWS ! ioLog->Write("Initializing CrystalSpace AWS...",true,osLogger::OS_LOG_INFO); ! if ((aws = CS_QUERY_REGISTRY (object_reg, iAws)) == 0) ! { ! ioLog->Write("Couldn't initialize CrystalSpace AWS!",true,osLogger::OS_LOG_CRITICAL); ! return true; ! } ! ! // AWS Manager ! ioLog->Write("Initializing AWS Manager...",true,osLogger::OS_LOG_INFO); ! awsManager = new osAWSManager; ! if(awsManager == NULL) ! { ! ioLog->Write("Couldn't allocate memory for AWS Manager!",true,osLogger::OS_LOG_CRITICAL); ! return true; ! } ! if(awsManager->Initialize(aws,vfs,g3d,g2d)) ! { ! ioLog->Write("Couldn't initialize AWS Manager!",true,osLogger::OS_LOG_CRITICAL); ! return true; ! } if(clientConfig->GetLogToConsole()) // Logging to screen? Or only to file? *************** *** 462,467 **** consoleOutput->Draw3D(); ! if(g3d->BeginDraw (CSDRAW_2DGRAPHICS)) ! consoleOutput->Draw2D(); } --- 492,501 ---- consoleOutput->Draw3D(); ! ! if(!g3d->BeginDraw (CSDRAW_2DGRAPHICS)) ! return; ! ! // 2D Draw Phase... ! consoleOutput->Draw2D(); } --- NEW FILE: osawsmanager.cpp --- /* Copyright (C) 2004 Chen Xing (Weeblie) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "osstdincludes.h" #include "osawsmanager.h" osAWSManager::osAWSManager() { } osAWSManager::~osAWSManager() { } int osAWSManager::Initialize(csRef<iAws> Aws, csRef<iVFS> Vfs, csRef<iGraphics3D> G3d, csRef<iGraphics2D> G2d) { aws=Aws; vfs=Vfs; g3d=G3d; g2d=G2d; if(!aws->SetupCanvas (0, myG2D, myG3D)) { ioLog->Write("Couldn't setup AWS canvas!",true,osLogger::OS_LOG_CRITICAL); return 1; } aws->SetFlag(AWSF_AlwaysRedrawWindows); //aws->GetPrefMgr()->SetFontServer(fontServer); //aws->GetPrefMgr()->SetDefaultFont(defaultFont); // TODO: Add code return 0; } void osAWSManager::Cleanup() { } |
From: Weeblie <we...@us...> - 2004-05-30 16:03:00
|
Update of /cvsroot/tofs/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20684/docs Modified Files: history.txt Log Message: AWS Index: history.txt =================================================================== RCS file: /cvsroot/tofs/docs/history.txt,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** history.txt 29 May 2004 15:02:06 -0000 1.14 --- history.txt 30 May 2004 16:02:19 -0000 1.15 *************** *** 4,7 **** --- 4,10 ---- The history order is reversed so new features are at the top + 30-May-2004 + - Started to make on the AWS (Chen Xing, Weeblie) + 29-May-2004 - Fixed a serious error with osWorldPosition, and moved a few files not used by the client |
From: Weeblie <we...@us...> - 2004-05-30 16:02:37
|
Update of /cvsroot/tofs/src/test/client/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20684/src/test/client/config Added Files: aws.cfg Log Message: AWS --- NEW FILE: aws.cfg --- skin "Normal Windows" { Texture: "/this/data/gui/default/windowbackground.jpg" HighlightColor: 255,255,255 ShadowColor: 96,96,96 FillColor: 192,192,192 TextDisabledColor: 128,128,0 TextForeColor: 0,0,0 TextBackColor: 255,255,255 ButtonTextColor: 0,0,192 OverlayTextureAlpha: 64 ScrollBarHeight: 16 ScrollBarWidth: 16 WindowMin: "/aws/minimize.png" WindowZoom: "/aws/zoom.png" WindowClose: "/aws/close.png" WindowMinAt: (46, 6) - (46-11, 6+10) WindowZoomAt: (34, 6) - (34-11, 6+10) WindowCloseAt: (19, 6) - (19-11, 6+10) CheckBoxUp: "/aws/chkup.png" CheckBoxDn: "/aws/chkdn.png" CheckBoxOn: "/aws/chkon.png" CheckBoxOff: "/aws/chkoff.png" RadioButtonUp: "/aws/radup.png" RadioButtonDn: "/aws/raddn.png" RadioButtonOn: "/aws/radon.png" RadioButtonOff: "/aws/radoff.png" TreeCollapsed: "/aws/treecol.png" TreeExpanded: "/aws/treeexp.png" TreeCollapsed: "/aws/treecol.png" TreeVertLine: "/aws/treevl.png" TreeHorzLine: "/aws/treehl.png" TreeChkUnmarked: "/aws/treechke.png" TreeChkMarked: "/aws/treechkf.png" TreeGrpUnmarked: "/aws/treegrpe.png" TreeGrpMarked: "/aws/treegrpf.png" ScrollBarUp: "/aws/sbup.png" ScrollBarDn: "/aws/sbdn.png" ScrollBarRt: "/aws/sbrt.png" ScrollBarLt: "/aws/sblt.png" } |
From: Weeblie <we...@us...> - 2004-05-30 16:02:36
|
Update of /cvsroot/tofs/src/test/client/data/gui/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20684/src/test/client/data/gui/default Added Files: readme.txt windowbackground.jpg Log Message: AWS --- NEW FILE: windowbackground.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: readme.txt --- Default window files... |
From: Weeblie <we...@us...> - 2004-05-30 16:02:36
|
Update of /cvsroot/tofs/src/test/client/data/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20684/src/test/client/data/gui Added Files: readme.txt Log Message: AWS --- NEW FILE: readme.txt --- Files used by AWS... |
From: Weeblie <we...@us...> - 2004-05-30 16:00:49
|
Update of /cvsroot/tofs/src/test/client/data/gui/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20513/default Log Message: Directory /cvsroot/tofs/src/test/client/data/gui/default added to the repository |
From: Weeblie <we...@us...> - 2004-05-30 16:00:29
|
Update of /cvsroot/tofs/src/test/client/data/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20457/gui Log Message: Directory /cvsroot/tofs/src/test/client/data/gui added to the repository |
From: Weeblie <we...@us...> - 2004-05-29 15:42:30
|
Update of /cvsroot/tofs/src/common/osinputoutput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21464/src/common/osinputoutput Modified Files: osiosocket.cpp Log Message: GCC problem... Index: osiosocket.cpp =================================================================== RCS file: /cvsroot/tofs/src/common/osinputoutput/osiosocket.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** osiosocket.cpp 29 May 2004 15:02:07 -0000 1.14 --- osiosocket.cpp 29 May 2004 15:42:17 -0000 1.15 *************** *** 31,37 **** notifyBytes(0), sock(INVALID_SOCKET), - connectionStatus(osConnectionStatus::NotAvailable), csRefCount(0) { readableAddress[0]=NULL; DEBUG_VERYVERBOSE(ioLog->Write("osIOSocket()",true,osLogger::OS_LOG_VVDEBUG)); --- 31,37 ---- notifyBytes(0), sock(INVALID_SOCKET), csRefCount(0) { + connectionStatus=osConnectionStatus::NotAvailable; readableAddress[0]=NULL; DEBUG_VERYVERBOSE(ioLog->Write("osIOSocket()",true,osLogger::OS_LOG_VVDEBUG)); *************** *** 44,50 **** notifyBytes(0), sock(INVALID_SOCKET), - connectionStatus(osConnectionStatus::NotAvailable), csRefCount(0) { readableAddress[0]=NULL; sock=socket; --- 44,50 ---- notifyBytes(0), sock(INVALID_SOCKET), csRefCount(0) { + connectionStatus=osConnectionStatus::NotAvailable; readableAddress[0]=NULL; sock=socket; |
From: Weeblie <we...@us...> - 2004-05-29 15:42:30
|
Update of /cvsroot/tofs/src/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21464/src/common Modified Files: osstdincludes.h Log Message: GCC problem... Index: osstdincludes.h =================================================================== RCS file: /cvsroot/tofs/src/common/osstdincludes.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** osstdincludes.h 27 May 2004 14:12:40 -0000 1.25 --- osstdincludes.h 29 May 2004 15:42:18 -0000 1.26 *************** *** 113,116 **** --- 113,117 ---- #define _Ios_Openmode int #else // Linux + typedef unsigned char byte; #define SOCKET int #define UCHAR unsigned char |
From: Weeblie <we...@us...> - 2004-05-29 15:02:51
|
Update of /cvsroot/tofs/src/common/osinputoutput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13980/src/common/osinputoutput Modified Files: osiosocket.cpp osiosocket.h Log Message: update... Index: osiosocket.cpp =================================================================== RCS file: /cvsroot/tofs/src/common/osinputoutput/osiosocket.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** osiosocket.cpp 23 May 2004 16:47:41 -0000 1.13 --- osiosocket.cpp 29 May 2004 15:02:07 -0000 1.14 *************** *** 380,387 **** if(notifyClass!=NULL && readBuffer.GetSize()>=notifyBytes) // Notify someone? { ! osSendEvent(notifyClass,osEvent(osEvent::OSEVENT_ID_SOCKET_RECEIVED,this)); notifyClass=NULL; notifyBytes=0; } --- 380,393 ---- if(notifyClass!=NULL && readBuffer.GetSize()>=notifyBytes) // Notify someone? { ! // Tricky here, the notified class might want to get notified again... ! // So we have to "unnotify" it first, but, then we can't use "notifyClass"... ! // The solution is to use a temp variable. ! osEventHandler* tempNotifyClass=notifyClass; notifyClass=NULL; notifyBytes=0; + + // Then notify + osSendEvent(tempNotifyClass,osEvent(osEvent::OSEVENT_ID_SOCKET_RECEIVED,this)); } Index: osiosocket.h =================================================================== RCS file: /cvsroot/tofs/src/common/osinputoutput/osiosocket.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** osiosocket.h 26 May 2004 19:14:04 -0000 1.12 --- osiosocket.h 29 May 2004 15:02:07 -0000 1.13 *************** *** 72,75 **** --- 72,76 ---- Login_Step_3_1, Login_Step_3_2, + Login_Step_3_3, In_World, // The player is in the world now Mesh_Connection, // This is a "mesh connection" |
From: Weeblie <we...@us...> - 2004-05-29 15:02:51
|
Update of /cvsroot/tofs/src/libs/CS In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13980/src/libs/CS Modified Files: readme.txt Log Message: update... Index: readme.txt =================================================================== RCS file: /cvsroot/tofs/src/libs/CS/readme.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** readme.txt 8 May 2004 14:04:46 -0000 1.3 --- readme.txt 29 May 2004 15:02:08 -0000 1.4 *************** *** 3,7 **** Please note that the archives is no longer available from CVS! Try to download them from my personal FTP server instead! The address is: ! ftp://icebaloon.dyndns.org/ ! Extract the "CS.rar" (you can find winrar on www.rarsoft.com) to this directory, and extract the "CS_BINS.rar" to "C:\CS" (or any other suitable dir). Create a "envoriment variable" (in "My computer->Properties->Advanced->Env. variables") with name "CRYSTAL" and data "C:\CS" (or the path to your dir). \ No newline at end of file --- 3,7 ---- Please note that the archives is no longer available from CVS! Try to download them from my personal FTP server instead! The address is: ! ftp://icebaloon.dyndns.org/CS/ ! Download the CS_"SOMEDATE+TIME".rar file, extract and install it (preferable in "Dev" mode). It should configure your Visual Studio automaticly... |
From: Weeblie <we...@us...> - 2004-05-29 15:02:51
|
Update of /cvsroot/tofs/debug/win32_vs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13980/debug/win32_vs Modified Files: tofsclient.exe tofsserver.exe Log Message: update... Index: tofsclient.exe =================================================================== RCS file: /cvsroot/tofs/debug/win32_vs/tofsclient.exe,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 Binary files /tmp/cvsOtYyg2 and /tmp/cvsLZV5Lt differ Index: tofsserver.exe =================================================================== RCS file: /cvsroot/tofs/debug/win32_vs/tofsserver.exe,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 Binary files /tmp/cvsH9fNNu and /tmp/cvscs5mxX differ |
From: Weeblie <we...@us...> - 2004-05-29 15:02:51
|
Update of /cvsroot/tofs/src/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13980/src/common Modified Files: osinputoutput.cpp osinputoutput.h osworldposition.h Removed Files: osmonster.cpp osmonster.h osnpc.cpp osnpc.h osobject.cpp osobject.h osobjectliving.cpp osobjectliving.h osplayer.cpp osplayer.h Log Message: update... --- osmonster.cpp DELETED --- Index: osworldposition.h =================================================================== RCS file: /cvsroot/tofs/src/common/osworldposition.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** osworldposition.h 20 May 2004 16:04:45 -0000 1.5 --- osworldposition.h 29 May 2004 15:02:07 -0000 1.6 *************** *** 57,61 **** inline void operator-=(const osWorldPosition &a){osAssert(area==a.area); x-=a.x;y-=a.y;z-=a.z;} inline void operator=(const osWorldPosition &a){x=a.x;y=a.y;z=a.z;area=a.area;} ! inline bool operator==(const osWorldPosition &a){return (x==a.x || y==a.y || z==a.z || area==a.area);} }; --- 57,62 ---- inline void operator-=(const osWorldPosition &a){osAssert(area==a.area); x-=a.x;y-=a.y;z-=a.z;} inline void operator=(const osWorldPosition &a){x=a.x;y=a.y;z=a.z;area=a.area;} ! inline bool operator==(const osWorldPosition &a){return (x==a.x && y==a.y && z==a.z && area==a.area);} ! inline bool operator!=(const osWorldPosition &a){return (x!=a.x || y!=a.y || z!=a.z || area!=a.area);} }; --- osmonster.h DELETED --- --- osobjectliving.h DELETED --- --- osplayer.cpp DELETED --- Index: osinputoutput.cpp =================================================================== RCS file: /cvsroot/tofs/src/common/osinputoutput.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** osinputoutput.cpp 23 May 2004 16:47:40 -0000 1.6 --- osinputoutput.cpp 29 May 2004 15:02:07 -0000 1.7 *************** *** 23,81 **** #include "osinputoutput.h" - - //---------------------------------------------------------------------- - // Write functions - //---------------------------------------------------------------------- - - bool osInputOutput::WriteChar(const char &c) - { - return Write(&c,sizeof(char)); - } - - bool osInputOutput::WriteUChar(const unsigned char &uc) - { - return Write(&uc,sizeof(unsigned char)); - } - - bool osInputOutput::WriteInt16(const int16 &i16) - { - return Write(&i16,sizeof(int16)); - } - - bool osInputOutput::WriteUInt16(const uint16 &ui16) - { - return Write(&ui16,sizeof(uint16)); - } - - bool osInputOutput::WriteInt32(const int32 &i32) - { - return Write(&i32,sizeof(int32)); - } - - bool osInputOutput::WriteUInt32(const uint32 &ui32) - { - return Write(&ui32,sizeof(uint32)); - } - - bool osInputOutput::WriteInt64(const int64 &i64) - { - return Write(&i64,sizeof(int64)); - } - - bool osInputOutput::WriteUInt64(const uint64 &ui64) - { - return Write(&ui64,sizeof(uint64)); - } - - bool osInputOutput::WriteInt(const int &i) - { - return Write(&i,sizeof(int)); - } - - bool osInputOutput::WriteUInt(const unsigned int &ui) - { - return Write(&ui,sizeof(unsigned int)); - } - bool osInputOutput::WriteCSString(const csString &s) { --- 23,26 ---- *************** *** 84,146 **** } - bool osInputOutput::WriteBool(const bool &b) - { - return Write(&b,sizeof(bool)); - } - - //---------------------------------------------------------------------- - // Read functions - //---------------------------------------------------------------------- - - bool osInputOutput::ReadChar(char &c) - { - return Read(&c,sizeof(char)); - } - - bool osInputOutput::ReadUChar(unsigned char &uc) - { - return Read(&uc,sizeof(unsigned char)); - } - - bool osInputOutput::ReadInt16(int16 &i16) - { - return Read(&i16,sizeof(int16)); - } - - bool osInputOutput::ReadUInt16(uint16 &ui16) - { - return Read(&ui16,sizeof(uint16)); - } - - bool osInputOutput::ReadInt32(int32 &i32) - { - return Read(&i32,sizeof(int32)); - } - - bool osInputOutput::ReadUInt32(uint32 &ui32) - { - return Read(&ui32,sizeof(uint32)); - } - - bool osInputOutput::ReadInt64(int64 &i64) - { - return Read(&i64,sizeof(int64)); - } - - bool osInputOutput::ReadUInt64(uint64 &ui64) - { - return Read(&ui64,sizeof(uint64)); - } - - bool osInputOutput::ReadInt(int &i) - { - return Read(&i,sizeof(int)); - } - - bool osInputOutput::ReadUInt(unsigned int &ui) - { - return Read(&ui,sizeof(unsigned int)); - } - bool osInputOutput::ReadCSString(csString &s) { --- 29,32 ---- *************** *** 176,185 **** } - bool osInputOutput::ReadBool(bool &b) - { - return Read(&b,sizeof(bool)); - } - - - --- 62,64 ---- --- osnpc.cpp DELETED --- --- osobject.h DELETED --- --- osobject.cpp DELETED --- --- osobjectliving.cpp DELETED --- Index: osinputoutput.h =================================================================== RCS file: /cvsroot/tofs/src/common/osinputoutput.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** osinputoutput.h 23 May 2004 16:47:40 -0000 1.7 --- osinputoutput.h 29 May 2004 15:02:07 -0000 1.8 *************** *** 34,49 **** //---------------------------------------------------------------------- /*inline*/ virtual bool Write(const void *data,const uint64 size) = 0; // This is the actual "writing data function"... ! /*inline*/ bool WriteChar(const char &c); ! /*inline*/ bool WriteUChar(const unsigned char &uc); ! /*inline*/ bool WriteInt16(const int16 &i16); ! /*inline*/ bool WriteUInt16(const uint16 &ui16); ! /*inline*/ bool WriteInt32(const int32 &i32); ! /*inline*/ bool WriteUInt32(const uint32 &ui32); ! /*inline*/ bool WriteInt64(const int64 &i64); ! /*inline*/ bool WriteUInt64(const uint64 &ui64); ! /*inline*/ bool WriteInt(const int &i); ! /*inline*/ bool WriteUInt(const unsigned int &ui); /*inline*/ bool WriteCSString(const csString &s); ! /*inline*/ bool WriteBool(const bool &b); //---------------------------------------------------------------------- --- 34,51 ---- //---------------------------------------------------------------------- /*inline*/ virtual bool Write(const void *data,const uint64 size) = 0; // This is the actual "writing data function"... ! inline bool WriteByte(const byte &b){ return Write(&b,sizeof(byte)); } ! inline bool WriteChar(const char &c){ return Write(&c,sizeof(char)); } ! inline bool WriteUChar(const unsigned char &uc){ return Write(&uc,sizeof(unsigned char)); } ! inline bool WriteInt16(const int16 &i16){ return Write(&i16,sizeof(int16)); } ! inline bool WriteUInt16(const uint16 &ui16){ return Write(&ui16,sizeof(uint16)); } ! inline bool WriteInt32(const int32 &i32){ return Write(&i32,sizeof(int32)); } ! inline bool WriteUInt32(const uint32 &ui32){ return Write(&ui32,sizeof(uint32)); } ! inline bool WriteInt64(const int64 &i64){ return Write(&i64,sizeof(int64)); } ! inline bool WriteUInt64(const uint64 &ui64){ return Write(&ui64,sizeof(uint64)); } ! inline bool WriteInt(const int &i){ return Write(&i,sizeof(int)); } ! inline bool WriteUInt(const unsigned int &ui){ return Write(&ui,sizeof(unsigned int)); } /*inline*/ bool WriteCSString(const csString &s); ! inline bool WriteBool(const bool &b){ return Write(&b,sizeof(bool)); } ! template<class T> inline void WriteStruct(const T &s){ return Write(&s,sizeof(T)); } // Arrays, pointer, etc ARE NOT COPIED!! This isn't a "safe" function!!! //---------------------------------------------------------------------- *************** *** 51,66 **** //---------------------------------------------------------------------- /*inline*/ virtual bool Read(void *data,const uint64 size) = 0; // This is the actual "reading data function", returns true on error ! /*inline*/ bool ReadChar(char &c); ! /*inline*/ bool ReadUChar(unsigned char &uc); ! /*inline*/ bool ReadInt16(int16 &i16); ! /*inline*/ bool ReadUInt16(uint16 &ui16); ! /*inline*/ bool ReadInt32(int32 &i32); ! /*inline*/ bool ReadUInt32(uint32 &ui32); ! /*inline*/ bool ReadInt64(int64 &i64); ! /*inline*/ bool ReadUInt64(uint64 &ui64); ! /*inline*/ bool ReadInt(int &i); ! /*inline*/ bool ReadUInt(unsigned int &ui); /*inline*/ bool ReadCSString(csString &s); ! /*inline*/ bool ReadBool(bool &b); }; --- 53,70 ---- //---------------------------------------------------------------------- /*inline*/ virtual bool Read(void *data,const uint64 size) = 0; // This is the actual "reading data function", returns true on error ! inline bool ReadByte(byte &b){ return Read(&b,sizeof(byte)); } ! inline bool ReadChar(char &c){ return Read(&c,sizeof(char)); } ! inline bool ReadUChar(unsigned char &uc){ return Read(&uc,sizeof(unsigned char)); } ! inline bool ReadInt16(int16 &i16){ return Read(&i16,sizeof(int16)); } ! inline bool ReadUInt16(uint16 &ui16){ return Read(&ui16,sizeof(uint16)); } ! inline bool ReadInt32(int32 &i32){ return Read(&i32,sizeof(int32)); } ! inline bool ReadUInt32(uint32 &ui32){ return Read(&ui32,sizeof(uint32)); } ! inline bool ReadInt64(int64 &i64){ return Read(&i64,sizeof(int64)); } ! inline bool ReadUInt64(uint64 &ui64){ return Read(&ui64,sizeof(uint64)); } ! inline bool ReadInt(int &i){ return Read(&i,sizeof(int)); } ! inline bool ReadUInt(unsigned int &ui){ return Read(&ui,sizeof(unsigned int)); } /*inline*/ bool ReadCSString(csString &s); ! inline bool ReadBool(bool &b){ return Read(&b,sizeof(bool)); } ! template<class T> inline bool ReadStruct(T &s){ return Read(&s,sizeof(T)); } // This isn't a "safe" function!!! }; --- osnpc.h DELETED --- --- osplayer.h DELETED --- |
From: Weeblie <we...@us...> - 2004-05-29 15:02:47
|
Update of /cvsroot/tofs/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13980/docs Modified Files: history.txt Log Message: update... Index: history.txt =================================================================== RCS file: /cvsroot/tofs/docs/history.txt,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** history.txt 27 May 2004 14:12:39 -0000 1.13 --- history.txt 29 May 2004 15:02:06 -0000 1.14 *************** *** 4,7 **** --- 4,11 ---- The history order is reversed so new features are at the top + 29-May-2004 + - Fixed a serious error with osWorldPosition, and moved a few files not used by the client + (Chen Xing, Weeblie) + 27-May-2004 - Added a handy TPS metter in both client and server, also fixed a bug in the client |
From: Weeblie <we...@us...> - 2004-05-29 15:02:25
|
Update of /cvsroot/tofs/src/libs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13980/src/libs Modified Files: readme.txt Log Message: update... Index: readme.txt =================================================================== RCS file: /cvsroot/tofs/src/libs/readme.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** readme.txt 5 May 2004 15:16:49 -0000 1.2 --- readme.txt 29 May 2004 15:02:09 -0000 1.3 *************** *** 2,7 **** Compiled libraries (+headers)... For lazy people who doesn't want to compile CrystalSpace, etc... - - Don't forget to download the extra "External utilities and libraries" from the bottom of - - http://crystal.sourceforge.net/tikiwiki/tiki-index.php?page=Download \ No newline at end of file --- 2,3 ---- |
From: Weeblie <we...@us...> - 2004-05-29 15:02:24
|
Update of /cvsroot/tofs/src/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13980/src/server Modified Files: osloginmanager.cpp osloginmanager.h osplayermanager.h osserverconfig.cpp osserverconfig.h Added Files: osmonster.cpp osmonster.h osnpc.cpp osnpc.h osobject.cpp osobject.h osobjectliving.cpp osobjectliving.h osplayer.cpp osplayer.h Log Message: update... --- NEW FILE: osmonster.cpp --- /* Copyright (C) 2004 Chen Xing (Weeblie) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // Standard tOfS include file... #include "osstdincludes.h" // Include it's own header file... #include "osmonster.h" Index: osloginmanager.h =================================================================== RCS file: /cvsroot/tofs/src/server/osloginmanager.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** osloginmanager.h 26 May 2004 19:14:05 -0000 1.4 --- osloginmanager.h 29 May 2004 15:02:10 -0000 1.5 *************** *** 23,26 **** --- 23,29 ---- /* + + Username must be letters (case insensitive, and they're converted to lowercase) and/or numbers + Login: *************** *** 28,36 **** BUILD_NUMBER - 8 bytes (int64) ! "Server name" - 128 bytes (char, null terminated) ! 2. Client -> Server ! ! - 1 byte (char) ( 0 == "Wrong build number, [DISCONNECTING]" ) ( 1 == "Login" ) --- 31,38 ---- BUILD_NUMBER - 8 bytes (int64) ! "Server name" - 128 bytes (char, null terminated), LOGIN_MANAGER_SERVER_NAME_LENGTH ! 2. Client -> Server (1 byte) ! "Control packet" - 1 byte (byte) ( 0 == "Wrong build number, [DISCONNECTING]" ) ( 1 == "Login" ) *************** *** 41,58 **** [DISCONNECTS] ! [1] Client -> Server "User name" - 64 bytes (char, null terminated) ! "MD5 Password" - 16 bytes (uchar, NOT null terminated) ! [2] Client -> Server "User name" - 64 bytes (char, null terminated) ! "MD5 Password" - 16 bytes (uchar, NOT null terminated) ! [3] Client -> Server "User name" - 64 bytes (char, null terminated) ! "MD5 Password" - 16 bytes (uchar, NOT null terminated) */ class osLoginManager: public osEventHandler { --- 43,87 ---- [DISCONNECTS] ! [1] Client -> Server (80 bytes) "User name" - 64 bytes (char, null terminated) ! "Password" - 16 bytes (uchar, NOT null terminated) ! [2] Client -> Server (80 bytes) "User name" - 64 bytes (char, null terminated) ! "Password" - 16 bytes (uchar, NOT null terminated) ! [3] Client -> Server (80 bytes) "User name" - 64 bytes (char, null terminated) ! "Password" - 16 bytes (uchar, NOT null terminated) ! ! 3.2. Server -> Client (1 byte) ! "Control packet" - 1 byte (byte) ! ( 0 == "Wrong username or password, [DISCONNECTING]" ) ! ( 1 == "Login succeful!", continue to 3.2.1 ) ! ! 3.2.1 Server -> Client ! */ + #define LOGIN_MANAGER_SERVER_NAME_LENGTH 128 + #define LOGIN_MANAGER_MAX_USER_NAME_LENGTH 64 + #define LOGIN_MANAGER_PASSWORD_LENGTH 16 + #define LOGIN_MANAGER_SIZE_3_1 80 + #define LOGIN_MANAGER_SIZE_3_2 80 + #define LOGIN_MANAGER_SIZE_3_3 80 + + struct osPassword + { + byte data[16]; + + osPassword() + { + memset(data,0,LOGIN_MANAGER_PASSWORD_LENGTH); + } + inline bool operator==(const osPassword &a){return (memcmp(a.data,data,LOGIN_MANAGER_PASSWORD_LENGTH)==0?true:false);} + inline bool operator!=(const osPassword &a){return (memcmp(a.data,data,LOGIN_MANAGER_PASSWORD_LENGTH)!=0?true:false);} + }; + class osLoginManager: public osEventHandler { *************** *** 68,74 **** int AddConnection(const csRef<osIOSocket> &sock); // New connection... ! private: ! csMD5 md5Handler; public: // osEventHandler --- 97,106 ---- int AddConnection(const csRef<osIOSocket> &sock); // New connection... ! bool isValidUsername(char* username, uint64 len); // Check if the username is valid or not... ! // It's NOT checking if the username exists or not! ! // "username" must be a lowercase string! ! osPassword GetPassword(csString playername); private: ! char serverName[LOGIN_MANAGER_SERVER_NAME_LENGTH]; public: // osEventHandler --- NEW FILE: osmonster.h --- /* Copyright (C) 2004 Chen Xing (Weeblie) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef OSMONSTER_H #define OSMONSTER_H #include "osobjectliving.h" class osMonster : public osObjectLiving { }; #endif // OSMONSTER_H --- NEW FILE: osobjectliving.h --- /* Copyright (C) 2004 Chen Xing (Weeblie) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef OSOBJECTLIVING_H #define OSOBJECTLIVING_H #include "osobject.h" class osObjectLiving : public osObject { int HP; }; #endif // OSOBJECTLIVING_H Index: osloginmanager.cpp =================================================================== RCS file: /cvsroot/tofs/src/server/osloginmanager.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** osloginmanager.cpp 21 May 2004 19:46:03 -0000 1.2 --- osloginmanager.cpp 29 May 2004 15:02:10 -0000 1.3 *************** *** 19,22 **** --- 19,24 ---- #include "osstdincludes.h" + #include "osserver.h" + #include "osloginmanager.h" *************** *** 33,36 **** --- 35,42 ---- int osLoginManager::Initialize() { + osAssert(serverConfig->GetServerName().Length()<LOGIN_MANAGER_SERVER_NAME_LENGTH); + memcpy(serverName,serverConfig->GetServerName().GetData(),serverConfig->GetServerName().Length()); + serverName[serverConfig->GetServerName().Length()]='\0'; + return 0; } *************** *** 48,58 **** int osLoginManager::AddConnection(const csRef<osIOSocket> &sock) { return 0; } void osLoginManager::osReceivedEvent(const osEvent& event) { ! } --- 54,175 ---- int osLoginManager::AddConnection(const csRef<osIOSocket> &sock) { + // Login step 1... + sock->SetConnectionStatus(sock->Login_Step_1); + sock->WriteInt64(BUILD_NUMBER); + sock->Write(serverName,LOGIN_MANAGER_SERVER_NAME_LENGTH); + + // Wait for step 2 + sock->SetConnectionStatus(sock->Login_Step_2); + sock->NotifyOnReceive(this,1); + return 0; } + bool osLoginManager::isValidUsername(char* username, uint64 len) + { + // Backwards... + len--; + while(len>=0) + { + if(!((username[len]>='a' && username[len]<='z')||(username[len]>='0' && username[len]<='9'))) + return false; + } + return true; + } + void osLoginManager::osReceivedEvent(const osEvent& event) { ! osIOSocket* sock=(osIOSocket*)event.sender; ! ! osAssert(sock!=NULL); ! osAssert(event.eventID==event.OSEVENT_ID_SOCKET_RECEIVED); // This class is only handling this event... ! ! char userName[LOGIN_MANAGER_MAX_USER_NAME_LENGTH]; ! osPassword password; ! byte controlPacket; ! ! switch(sock->GetConnectionStatus()) ! { ! case sock->Login_Step_2: ! sock->ReadByte(controlPacket); ! ! switch(controlPacket) ! { ! case 0: // Wrong build number... Closing connection... ! // TODO: Write something to the log file... ! sock->Close(); ! return; ! case 1: // "Login" ! sock->SetConnectionStatus(sock->Login_Step_3_1); ! sock->NotifyOnReceive(this,LOGIN_MANAGER_SIZE_3_1); ! break; ! case 2: // Create user... ! sock->SetConnectionStatus(sock->Login_Step_3_2); ! sock->NotifyOnReceive(this,LOGIN_MANAGER_SIZE_3_2); ! break; ! case 3: // Mesh connection... ! sock->SetConnectionStatus(sock->Login_Step_3_3); ! sock->NotifyOnReceive(this,LOGIN_MANAGER_SIZE_3_3); ! break; ! default: ! // TODO: Add more specific logging... (i.e. IP, etc...) ! ioLog->Write("osLoginManager: Invalid control packet ID! Shutting down connection..."); ! sock->Close(); ! return; ! } ! break; ! case sock->Login_Step_3_1: // Login ! // Username ! sock->Read(userName,LOGIN_MANAGER_MAX_USER_NAME_LENGTH); ! userName[LOGIN_MANAGER_MAX_USER_NAME_LENGTH-1]='\0'; // Buffer overflow counter measure... ! // Make lowercase... Not sure if this is supported by GCC or not... ! _strlwr(userName); ! ! // Password ! sock->Read(&password.data,LOGIN_MANAGER_PASSWORD_LENGTH); ! ! if(!isValidUsername(userName,strlen(userName))) ! { ! // Invalid username! ! // TODO: Write to log... ! } ! else ! { ! // Checks if the password is correct... ! if(GetPassword(userName)!=password) ! { ! // Wrong password! ! // TODO: Write to log... ! } ! else ! { ! // TODO: ADD CODE ! } ! } ! ! break; ! default: ! osAssert(false); ! ioLog->Write("osLoginManager: Unkown connection status!"); ! break; ! } } + osPassword osLoginManager::GetPassword(csString playername) + { + csString fileName; + fileName="/players/"; + fileName+=playername; + fileName+="/password.tpf"; + osIOFile file; + if(file.Open(fileName.GetData(),file.READ)) + { + ioLog->Write("osPlayer: Couldn't load password file!" + fileName); + return osPassword(); + } + // TODO: ADD CODE + + file.Close(); + return osPassword(); + } --- NEW FILE: osplayer.cpp --- /* Copyright (C) 2004 Chen Xing (Weeblie) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // Standard tOfS include file... #include "osstdincludes.h" #include "osinputoutput/osiofile.h" // Include it's own header file... #include "osplayer.h" osPlayer::osPlayer(): playerLog(NULL) { DEBUG_VERYVERBOSE(ioLog->Write("osPlayer()",true,osLogger::OS_LOG_VVDEBUG)); } osPlayer::~osPlayer() { DEBUG_VERYVERBOSE(ioLog->Write("~osPlayer()",true,osLogger::OS_LOG_VVDEBUG)); } int osPlayer::Initialize(csRef<osIOSocket> sock, csString playername, csString charactername, uint64 characterID) { socket=sock; characterName=charactername; // Loads the character... csString fileName; fileName="/players/"; fileName+=playername; fileName+="/"; fileName+=charactername; fileName+="/"; fileName+=charactername; fileName+=".tpc"; osIOFile file; if(file.Open(fileName.GetData(),file.READ)) { ioLog->Write("osPlayer: Couldn't load character at " + fileName); return 1; } // TODO: ADD CODE file.Close(); return 0; } void osPlayer::Cleanup() { // Saves the character... // TODO: ADD CODE if(socket->GetMode()==socket->Connected) socket->Close(); } void osPlayer::Serialize(osInputOutput& io, osSerialType serialType) { // TODO: ADD CODE } bool osPlayer::Deserialize(osInputOutput& io, osSerialType serialType) { // TODO: ADD CODE return false; } --- NEW FILE: osnpc.cpp --- /* Copyright (C) 2004 Chen Xing (Weeblie) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // Standard tOfS include file... #include "osstdincludes.h" // Include it's own header file... #include "osnpc.h" Index: osserverconfig.cpp =================================================================== RCS file: /cvsroot/tofs/src/server/osserverconfig.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** osserverconfig.cpp 23 May 2004 16:47:41 -0000 1.15 --- osserverconfig.cpp 29 May 2004 15:02:10 -0000 1.16 *************** *** 33,37 **** numOfAreas(SERVER_CONFIG_DEFAULT_NUM_OF_AREAS), areaNames(NULL), ! maximumNumberOfNetworkConnections(SERVER_CONFIG_DEFAULT_MAXIMUM_NUMBER_OF_NETWORK_CONNECTIONS) { DEBUG_VERYVERBOSE(ioLog->Write("osServerConfig()",true,osLogger::OS_LOG_VVDEBUG)); --- 33,38 ---- numOfAreas(SERVER_CONFIG_DEFAULT_NUM_OF_AREAS), areaNames(NULL), ! maximumNumberOfNetworkConnections(SERVER_CONFIG_DEFAULT_MAXIMUM_NUMBER_OF_NETWORK_CONNECTIONS), ! serverName(SERVER_CONFIG_DEFAULT_SERVER_NAME) { DEBUG_VERYVERBOSE(ioLog->Write("osServerConfig()",true,osLogger::OS_LOG_VVDEBUG)); *************** *** 68,71 **** --- 69,73 ---- maximumNumberOfNetworkConnections=SERVER_CONFIG_DEFAULT_MAXIMUM_NUMBER_OF_NETWORK_CONNECTIONS; meshIndexFile=SERVER_CONFIG_DEFAULT_MESH_INDEX_FILE; + serverName=SERVER_CONFIG_DEFAULT_SERVER_NAME; // Area names *************** *** 119,122 **** --- 121,125 ---- OSSERVERCONFIG_CHECK_READING_MACRO(serverConfigFile.ReadInt(maximumNumberOfNetworkConnections)); OSSERVERCONFIG_CHECK_READING_MACRO(serverConfigFile.ReadCSString(meshIndexFile)); + OSSERVERCONFIG_CHECK_READING_MACRO(serverConfigFile.ReadCSString(serverName)); serverConfigFile.Close(); *************** *** 154,157 **** --- 157,161 ---- serverConfigFile.WriteInt(maximumNumberOfNetworkConnections); serverConfigFile.WriteCSString(meshIndexFile); + serverConfigFile.WriteCSString(serverName); serverConfigFile.Close(); *************** *** 213,216 **** --- 217,224 ---- } + csString osServerConfig::GetServerName() + { + return serverName; + } --- NEW FILE: osobject.h --- /* Copyright (C) 2004 Chen Xing (Weeblie) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef OSOBJECT_H #define OSOBJECT_H /* Everything is an object. Tables, flowers, fishes, birds, NPC, PC, fireballs, arrows... They are all objects. But there is exceptions. The sky isn't an object, nor is the sea. They just exists. *Great poem written by Weeblie* :P */ #include "osserial.h" #include "osworldposition.h" #include "osevent.h" #include "osmesh.h" #define OBJECT_ID_INVALID 0 static uint64 osGetObjectID_curClassID; inline static uint64 osGetObjectID(){return osGetObjectID_curClassID++;} // Get's current class ID and increases it by one... inline static void osSetCurrentObjectID(int64 ID){osGetObjectID_curClassID=ID;} // Sets the current object id... Probably called by a server "init" routine... class osObject : public osSerial, public osEventHandler // Event handler is used for notifying "the object have died" and maybe for collision system. { public: osObject(); virtual ~osObject(); void UpdateRadius(); // Must be called when the model is changed! virtual void Tick() = 0; // Called each cycle, if the object wants to get called... (It should add itself to osWorld public: // Functions for getting access to the private/protected members :) inline const osWorldPosition GetPosition() const {return position;} inline const csVector3 GetRotation() const {return rotation;} inline const csVector3 GetMovement() const {return movement;} inline const csRef<osMesh> GetMesh() const {return mesh;} inline const uint64 GetObjectID() const {return objectID;} inline const double GetRadius() const {return radius;} inline void SetPosition(const osWorldPosition &pos){position=pos;} inline void SetRotation(const csVector3 &rot){rotation=rot;} inline void SetMovement(const csVector3 &mov){movement=mov;} protected: uint64 objectID; // All object's have their own UNIQE ID (used for logging)! This one MUST be saved IF the object is getting saved too! csRef<osMesh> mesh; // The actual "model" Clients: We are going to use a "dynamic caching" of meshes (i.e. when the thing is close enough to the player, the mesh is going to get cached, and when it's too far away, the mesh will be removed from memory) osWorldPosition position; // Position of this object... csVector3 movement; // This one describes how the object is moving... (each ms!) csVector3 rotation; // Around it's own ***-axis, in radians (each ms) double radius; // Very useful for "pre collision detection" }; #endif // OSOBJECT_H --- NEW FILE: osobject.cpp --- /* Copyright (C) 2004 Chen Xing (Weeblie) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // Standard tOfS include file... #include "osstdincludes.h" // Include it's own header file... #include "osobject.h" osObject::osObject(): objectID(OBJECT_ID_INVALID), radius(0), // No object = no radius mesh(NULL) // Not really necessary... { movement.Set(0,0,0); // The object isn't moving... position.SetPosition(); // The object's position isn't set rotation.Set(0,0,0); // No rotation... DEBUG_CRAZYVERBOSE(ioLog->Write("osObject()",true,osLogger::OS_LOG_CDEBUG)); } osObject::~osObject() { DEBUG_CRAZYVERBOSE(ioLog->Write("~osObject()",true,osLogger::OS_LOG_CDEBUG)); } void osObject::UpdateRadius() { csVector3 cent; csVector3 rad; mesh->mesh->GetRadius(rad,cent); radius=rad.Norm(); } --- NEW FILE: osobjectliving.cpp --- /* Copyright (C) 2004 Chen Xing (Weeblie) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // Standard tOfS include file... #include "osstdincludes.h" // Include it's own header file... #include "osobjectliving.h" Index: osserverconfig.h =================================================================== RCS file: /cvsroot/tofs/src/server/osserverconfig.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** osserverconfig.h 23 May 2004 16:47:41 -0000 1.11 --- osserverconfig.h 29 May 2004 15:02:10 -0000 1.12 *************** *** 45,48 **** --- 45,49 ---- int GetMaximumNumberOfNetworkConnections(); csString GetMeshIndexFile(); + csString GetServerName(); private: *************** *** 55,60 **** int maximumNumberOfNetworkConnections; csString meshIndexFile; - csString* areaNames; // A "areaID to name"-vector }; --- 56,61 ---- int maximumNumberOfNetworkConnections; csString meshIndexFile; csString* areaNames; // A "areaID to name"-vector + csString serverName; }; *************** *** 68,71 **** --- 69,73 ---- #define SERVER_CONFIG_DEFAULT_MAXIMUM_NUMBER_OF_NETWORK_CONNECTIONS 10000 #define SERVER_CONFIG_DEFAULT_MESH_INDEX_FILE "./data/meshIndex.cfg" + #define SERVER_CONFIG_DEFAULT_SERVER_NAME "The Orb of Shadows MMORPG Server" #endif // OSSERVERCONFIG_H Index: osplayermanager.h =================================================================== RCS file: /cvsroot/tofs/src/server/osplayermanager.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** osplayermanager.h 11 May 2004 16:38:53 -0000 1.2 --- osplayermanager.h 29 May 2004 15:02:10 -0000 1.3 *************** *** 23,26 **** --- 23,27 ---- { public: + }; --- NEW FILE: osnpc.h --- /* Copyright (C) 2004 Chen Xing (Weeblie) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef OSNPC_H #define OSNPC_H #include "osserial.h" class osNPC : public osSerial { }; #endif // OSNPC_H --- NEW FILE: osplayer.h --- /* Copyright (C) 2004 Chen Xing (Weeblie) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef OSPLAYER_H #define OSPLAYER_H /* This is actually the "osCharacter" class... /players/[PLAYER_NAME]/[CHARACTER_NAME]/[CHARACTER_NAME].tch - The character is stored here /players/[PLAYER_NAME]/[CHARACTER_NAME]/id.tpc - Here's the character ID /players/[PLAYER_NAME]/password.tpf - The MD5 encrypted password */ #include "osobjectliving.h" #include "osinputoutput/osiosocket.h" class osPlayer : public osObjectLiving { public: osPlayer(); virtual ~osPlayer(); int Initialize(csRef<osIOSocket> sock, csString playername, csString charactername, uint64 characterID); void Cleanup(); public: csRef<osIOSocket> socket; // Socket to client osInputOutput* playerLog; // Player log file csString characterName; public: // osSerial virtual void Serialize(osInputOutput& io, osSerialType serialType); // Serialize function virtual bool Deserialize(osInputOutput& io, osSerialType serialType); // Deserialize function, returns true on error... }; #endif // OSPLAYER_H |
From: Weeblie <we...@us...> - 2004-05-29 15:02:24
|
Update of /cvsroot/tofs/src/test/server/players In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13980/src/test/server/players Added Files: Readme.txt Log Message: update... --- NEW FILE: Readme.txt --- The characters is stored here... |
From: Weeblie <we...@us...> - 2004-05-29 15:02:24
|
Update of /cvsroot/tofs/src/mk/vs7.1/tofsclient In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13980/src/mk/vs7.1/tofsclient Modified Files: tofsclient.vcproj Log Message: update... Index: tofsclient.vcproj =================================================================== RCS file: /cvsroot/tofs/src/mk/vs7.1/tofsclient/tofsclient.vcproj,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** tofsclient.vcproj 21 May 2004 19:46:02 -0000 1.14 --- tofsclient.vcproj 29 May 2004 15:02:09 -0000 1.15 *************** *** 154,169 **** </File> <File - RelativePath="..\..\..\common\osnpc.cpp"> - </File> - <File - RelativePath="..\..\..\common\osobject.cpp"> - </File> - <File - RelativePath="..\..\..\common\osobjectliving.cpp"> - </File> - <File - RelativePath="..\..\..\common\osplayer.cpp"> - </File> - <File RelativePath="..\..\..\common\osrand.cpp"> </File> --- 154,157 ---- *************** *** 172,182 **** </File> <Filter - Name="monsters" - Filter=""> - <File - RelativePath="..\..\..\common\osmonster.cpp"> - </File> - </Filter> - <Filter Name="osintputoutput" Filter=""> --- 160,163 ---- *************** *** 215,230 **** </File> <File - RelativePath="..\..\..\common\osnpc.h"> - </File> - <File - RelativePath="..\..\..\common\osobject.h"> - </File> - <File - RelativePath="..\..\..\common\osobjectliving.h"> - </File> - <File - RelativePath="..\..\..\common\osplayer.h"> - </File> - <File RelativePath="..\..\..\common\osrand.h"> </File> --- 196,199 ---- *************** *** 242,252 **** </File> <Filter - Name="monsters" - Filter=""> - <File - RelativePath="..\..\..\common\osmonster.h"> - </File> - </Filter> - <Filter Name="osintputoutput" Filter=""> --- 211,214 ---- |