90 lines
2.6 KiB
C++
90 lines
2.6 KiB
C++
/*
|
|
* PVVMUD a 3D MUD
|
|
* Copyright (C) 1998-1999 Programvareverkstedet (pvv@pvv.org)
|
|
*
|
|
* 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 _WORLDSRV_H
|
|
#define _WORLDSRV_H
|
|
|
|
#include "timekeeper.H"
|
|
#include "worldclisrvsocket.H"
|
|
#include "worldsrvsrvsocket.H"
|
|
#include "objectlist.H"
|
|
#include "worldgos.H"
|
|
#include "worldsrvworld.H"
|
|
#include "option.H"
|
|
|
|
class CWorldCliManager;
|
|
class CWorldSrvManager;
|
|
|
|
class CWorldSrv : public CTimeKeeperItem {
|
|
|
|
CTimeKeeper * m_timeKeeper;
|
|
|
|
CWorldCliSrvSocket * m_cliSocket;
|
|
CWorldSrvSrvSocket * m_srvSocket;
|
|
|
|
CObjectList * m_cliManagerList;
|
|
// Don't allow a list of servers
|
|
CWorldSrvManager * m_srvManager;
|
|
|
|
CWorldGOS * m_worldGOS;
|
|
|
|
CWorldSrvWorld * m_world;
|
|
|
|
public:
|
|
CWorldSrv(COption *option);
|
|
virtual ~CWorldSrv();
|
|
|
|
CWorldSrvWorld* getWorld(){ return m_world; }
|
|
|
|
void setGOS(CInetAddress & gosAddress);
|
|
|
|
CInetAddress &getAddress();
|
|
|
|
DWORD getTime();
|
|
|
|
virtual int timeKeeperHB();
|
|
|
|
void addCliManager( CWorldCliManager * cliManager );
|
|
void removeCliManager( CWorldCliManager * cliManager );
|
|
|
|
void addSrvManager( CWorldSrvManager * srvManager );
|
|
void removeSrvManager( CWorldSrvManager * srvManager );
|
|
|
|
void startSrvSocket();
|
|
void stopSrvSocket();
|
|
|
|
void quit();
|
|
void restart();
|
|
void run();
|
|
|
|
void createWorld();
|
|
// void addCell( DWORD cellId, DWORD geometryId );
|
|
// void removeCell( DWORD cellId );
|
|
void addObject( DWORD objectId, DWORD geometryId, DWORD parentId,
|
|
const CPosition & position, const CDirection & direction );
|
|
void removeObject( DWORD objectId, DWORD parentId );
|
|
void addPVCell( DWORD cellId, DWORD PVCellId, const CPosition & position );
|
|
void updatePosition( DWORD objectId, const CPosition& position);
|
|
void updateDirection( DWORD objectId, const CDirection& direction);
|
|
void updateHierarchy( DWORD objectId, DWORD parentId);
|
|
void rotate( DWORD objectId, const CDirection& angleSpeed);
|
|
};
|
|
|
|
#endif // _WORLDSRV_H
|