mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
CWE Directory Reorganization
Rearrange directory structure of CWE to be loosely equivalent to the H'uru Plasma repository. Part 1: Movement of directories and files.
This commit is contained in:
@ -0,0 +1,49 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Additional permissions under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or
|
||||
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
|
||||
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
|
||||
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
|
||||
(or a modified version of those libraries),
|
||||
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
|
||||
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
|
||||
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
|
||||
licensors of this Program grant you additional
|
||||
permission to convey the resulting work. Corresponding Source for a
|
||||
non-source form of such a combination shall include the source code for
|
||||
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
|
||||
work.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* $/Plasma20/Sources/Plasma/NucleusLib/pnGameMgr/BlueSpiral/pnGmBlueSpiral.cpp
|
||||
*
|
||||
***/
|
||||
|
||||
#include "../Pch.h"
|
||||
#pragma hdrstop
|
138
Sources/Plasma/NucleusLib/pnGameMgr/BlueSpiral/pnGmBlueSpiral.h
Normal file
138
Sources/Plasma/NucleusLib/pnGameMgr/BlueSpiral/pnGmBlueSpiral.h
Normal file
@ -0,0 +1,138 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Additional permissions under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or
|
||||
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
|
||||
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
|
||||
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
|
||||
(or a modified version of those libraries),
|
||||
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
|
||||
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
|
||||
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
|
||||
licensors of this Program grant you additional
|
||||
permission to convey the resulting work. Corresponding Source for a
|
||||
non-source form of such a combination shall include the source code for
|
||||
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
|
||||
work.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* $/Plasma20/Sources/Plasma/NucleusLib/pnGameMgr/BlueSpiral/pnGmBlueSpiral.h
|
||||
*
|
||||
***/
|
||||
|
||||
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNGAMEMGR_BLUESPIRAL_PNGMBLUESPIRAL_H
|
||||
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnGameMgr/BlueSpiral/pnGmBlueSpiral.h included more than once"
|
||||
#endif
|
||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNGAMEMGR_BLUESPIRAL_PNGMBLUESPIRAL_H
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* BlueSpiral
|
||||
*
|
||||
***/
|
||||
|
||||
enum EBlueSpiralInitResult {
|
||||
kBlueSpiralInitSuccess,
|
||||
kBlueSpiralInitError,
|
||||
kNumBlueSpiralInitResults
|
||||
};
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Game type id
|
||||
//============================================================================
|
||||
|
||||
const Uuid kGameTypeId_BlueSpiral = Uuid(L"5ff98165-913e-4fd1-a2c2-9c7f31be2cc8");
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Network message ids
|
||||
//============================================================================
|
||||
|
||||
// Cli2Srv message ids
|
||||
enum {
|
||||
kCli2Srv_BlueSpiral_StartGame = kCli2Srv_NumGameMsgIds,
|
||||
kCli2Srv_BlueSpiral_HitCloth,
|
||||
};
|
||||
|
||||
// Srv2Cli message ids
|
||||
enum {
|
||||
kSrv2Cli_BlueSpiral_ClothOrder = kSrv2Cli_NumGameMsgIds,
|
||||
kSrv2Cli_BlueSpiral_SuccessfulHit,
|
||||
kSrv2Cli_BlueSpiral_GameWon,
|
||||
kSrv2Cli_BlueSpiral_GameOver, // sent on time out and incorrect entry
|
||||
kSrv2Cli_BlueSpiral_GameStarted,
|
||||
};
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Begin networked data scructures
|
||||
#include <PshPack1.h>
|
||||
//============================================================================
|
||||
|
||||
//========================================================================
|
||||
// Message parameters
|
||||
//========================================================================
|
||||
struct BlueSpiral_CreateParam {
|
||||
// empty
|
||||
};
|
||||
|
||||
//========================================================================
|
||||
// Tic-Tac-Toe message structures
|
||||
//========================================================================
|
||||
|
||||
// Cli2Srv
|
||||
struct Cli2Srv_BlueSpiral_StartGame : GameMsgHeader {
|
||||
// empty
|
||||
};
|
||||
struct Cli2Srv_BlueSpiral_HitCloth : GameMsgHeader {
|
||||
byte clothNum; // the cloth we hit, 0..6
|
||||
};
|
||||
|
||||
// Srv2Cli
|
||||
struct Srv2Cli_BlueSpiral_ClothOrder : GameMsgHeader {
|
||||
byte order[7]; // each value is the cloth to hit, 0..6, the order is the order in the array
|
||||
};
|
||||
struct Srv2Cli_BlueSpiral_SuccessfulHit : GameMsgHeader {
|
||||
// empty
|
||||
};
|
||||
struct Srv2Cli_BlueSpiral_GameWon : GameMsgHeader {
|
||||
// empty
|
||||
};
|
||||
struct Srv2Cli_BlueSpiral_GameOver : GameMsgHeader {
|
||||
// empty
|
||||
};
|
||||
struct Srv2Cli_BlueSpiral_GameStarted : GameMsgHeader {
|
||||
bool startSpin; // if true, start spinning the door thingy
|
||||
};
|
||||
|
||||
//============================================================================
|
||||
// End networked data structures
|
||||
#include <PopPack.h>
|
||||
//============================================================================
|
@ -0,0 +1,49 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Additional permissions under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or
|
||||
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
|
||||
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
|
||||
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
|
||||
(or a modified version of those libraries),
|
||||
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
|
||||
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
|
||||
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
|
||||
licensors of this Program grant you additional
|
||||
permission to convey the resulting work. Corresponding Source for a
|
||||
non-source form of such a combination shall include the source code for
|
||||
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
|
||||
work.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* $/Plasma20/Sources/Plasma/NucleusLib/pnGameMgr/ClimbingWall/pnGmClimbingWall.cpp
|
||||
*
|
||||
***/
|
||||
|
||||
#include "../Pch.h"
|
||||
#pragma hdrstop
|
@ -0,0 +1,184 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Additional permissions under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or
|
||||
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
|
||||
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
|
||||
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
|
||||
(or a modified version of those libraries),
|
||||
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
|
||||
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
|
||||
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
|
||||
licensors of this Program grant you additional
|
||||
permission to convey the resulting work. Corresponding Source for a
|
||||
non-source form of such a combination shall include the source code for
|
||||
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
|
||||
work.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* $/Plasma20/Sources/Plasma/NucleusLib/pnGameMgr/ClimbingWall/pnGmClimbingWall.h
|
||||
*
|
||||
***/
|
||||
|
||||
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNGAMEMGR_CLIMBINGWALL_PNGMCLIMBINGWALL_H
|
||||
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnGameMgr/ClimbingWall/pnGmClimbingWall.h included more than once"
|
||||
#endif
|
||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNGAMEMGR_CLIMBINGWALL_PNGMCLIMBINGWALL_H
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Climbing Wall
|
||||
*
|
||||
***/
|
||||
|
||||
enum EClimbingWallInitResult {
|
||||
kClimbingWallInitSuccess,
|
||||
kClimbingWallInitError,
|
||||
kNumClimbingWallInitResults
|
||||
};
|
||||
enum EClimbingWallReadyType {
|
||||
kClimbingWallReadyNumBlockers,
|
||||
kClimbingWallReadyBlockers,
|
||||
};
|
||||
|
||||
const unsigned kClimbingWallMaxBlockers = 20; // TODO: Adjust this to the right size
|
||||
const int kClimbingWallNoBlocker = -1; // the value of a slot in the blocker array when no blocker is in that slot
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Game type id
|
||||
//============================================================================
|
||||
|
||||
const Uuid kGameTypeId_ClimbingWall = Uuid(L"6224cdf4-3556-4740-b7cd-d637562d07be");
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Network message ids
|
||||
//============================================================================
|
||||
|
||||
// Cli2Srv message ids
|
||||
enum {
|
||||
kCli2Srv_ClimbingWall_ChangeNumBlockers = kCli2Srv_NumGameMsgIds,
|
||||
kCli2Srv_ClimbingWall_Ready,
|
||||
kCli2Srv_ClimbingWall_BlockerChanged,
|
||||
kCli2Srv_ClimbingWall_Reset,
|
||||
kCli2Srv_ClimbingWall_PlayerEntered,
|
||||
kCli2Srv_ClimbingWall_FinishedGame,
|
||||
kCli2Srv_ClimbingWall_Panic,
|
||||
};
|
||||
|
||||
// Srv2Cli message ids
|
||||
enum {
|
||||
kSrv2Cli_ClimbingWall_NumBlockersChanged = kSrv2Cli_NumGameMsgIds,
|
||||
kSrv2Cli_ClimbingWall_Ready,
|
||||
kSrv2Cli_ClimbingWall_BlockersChanged,
|
||||
kSrv2Cli_ClimbingWall_PlayerEntered,
|
||||
kSrv2Cli_ClimbingWall_SuitMachineLocked,
|
||||
kSrv2Cli_ClimbingWall_GameOver,
|
||||
};
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Begin networked data structures
|
||||
#include <PshPack1.h>
|
||||
//============================================================================
|
||||
|
||||
//========================================================================
|
||||
// Message parameters
|
||||
//========================================================================
|
||||
struct ClimbingWall_CreateParam {
|
||||
// no params
|
||||
};
|
||||
|
||||
//========================================================================
|
||||
// Climbing Wall message structures
|
||||
//========================================================================
|
||||
|
||||
// Cli2Srv
|
||||
struct Cli2Srv_ClimbingWall_ChangeNumBlockers : GameMsgHeader {
|
||||
int amountToAdjust; // + or - value to adjust the number of blockers by
|
||||
};
|
||||
struct Cli2Srv_ClimbingWall_Ready : GameMsgHeader {
|
||||
byte readyType; // the type of ready this message represents (EClimbingWallReadyType)
|
||||
byte teamNumber; // the team that you are saying is ready (1 or 2)
|
||||
};
|
||||
struct Cli2Srv_ClimbingWall_BlockerChanged : GameMsgHeader {
|
||||
byte teamNumber; // the team that is adjusting their blockers
|
||||
byte blockerNumber; // the number of the blocker that was added/removed
|
||||
bool added; // was the blocker added, or removed?
|
||||
};
|
||||
struct Cli2Srv_ClimbingWall_Reset : GameMsgHeader {
|
||||
// <no data>
|
||||
};
|
||||
struct Cli2Srv_ClimbingWall_PlayerEntered : GameMsgHeader {
|
||||
byte teamNumber; // the team this player is playing for
|
||||
};
|
||||
struct Cli2Srv_ClimbingWall_FinishedGame : GameMsgHeader {
|
||||
// <no data>
|
||||
};
|
||||
struct Cli2Srv_ClimbingWall_Panic : GameMsgHeader {
|
||||
// <no data>
|
||||
};
|
||||
|
||||
// Srv2Cli
|
||||
struct Srv2Cli_ClimbingWall_NumBlockersChanged : GameMsgHeader {
|
||||
byte newBlockerCount; // the new number of blocker we are playing with
|
||||
bool localOnly; // only adjust your local display, don't net prop
|
||||
};
|
||||
struct Srv2Cli_ClimbingWall_Ready : GameMsgHeader {
|
||||
byte readyType; // the type of ready this message represents (EClimbingWallReadyType)
|
||||
bool team1Ready;
|
||||
bool team2Ready;
|
||||
bool localOnly; // only adjust your local display, don't net prop
|
||||
};
|
||||
struct Srv2Cli_ClimbingWall_BlockersChanged : GameMsgHeader {
|
||||
byte teamNumber; // the team this set of blockers is for
|
||||
int blockersSet[kClimbingWallMaxBlockers]; // which blockers are set
|
||||
bool localOnly; // only adjust your local display, don't net prop
|
||||
};
|
||||
struct Srv2Cli_ClimbingWall_PlayerEntered : GameMsgHeader {
|
||||
// <no data>
|
||||
};
|
||||
struct Srv2Cli_ClimbingWall_SuitMachineLocked : GameMsgHeader {
|
||||
bool team1MachineLocked;
|
||||
bool team2MachineLocked;
|
||||
bool localOnly; // only adjust your local display, don't net prop
|
||||
};
|
||||
struct Srv2Cli_ClimbingWall_GameOver : GameMsgHeader {
|
||||
byte teamWon; // which team won the game
|
||||
int team1Blockers[kClimbingWallMaxBlockers];
|
||||
int team2Blockers[kClimbingWallMaxBlockers];
|
||||
bool localOnly; // only adjust your local display, don't net prop
|
||||
};
|
||||
|
||||
|
||||
//============================================================================
|
||||
// End networked data structures
|
||||
#include <PopPack.h>
|
||||
//============================================================================
|
49
Sources/Plasma/NucleusLib/pnGameMgr/Heek/pnGmHeek.cpp
Normal file
49
Sources/Plasma/NucleusLib/pnGameMgr/Heek/pnGmHeek.cpp
Normal file
@ -0,0 +1,49 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Additional permissions under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or
|
||||
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
|
||||
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
|
||||
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
|
||||
(or a modified version of those libraries),
|
||||
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
|
||||
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
|
||||
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
|
||||
licensors of this Program grant you additional
|
||||
permission to convey the resulting work. Corresponding Source for a
|
||||
non-source form of such a combination shall include the source code for
|
||||
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
|
||||
work.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* $/Plasma20/Sources/Plasma/NucleusLib/pnGameMgr/Heek/pnGmHeek.cpp
|
||||
*
|
||||
***/
|
||||
|
||||
#include "../Pch.h"
|
||||
#pragma hdrstop
|
203
Sources/Plasma/NucleusLib/pnGameMgr/Heek/pnGmHeek.h
Normal file
203
Sources/Plasma/NucleusLib/pnGameMgr/Heek/pnGmHeek.h
Normal file
@ -0,0 +1,203 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Additional permissions under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or
|
||||
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
|
||||
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
|
||||
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
|
||||
(or a modified version of those libraries),
|
||||
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
|
||||
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
|
||||
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
|
||||
licensors of this Program grant you additional
|
||||
permission to convey the resulting work. Corresponding Source for a
|
||||
non-source form of such a combination shall include the source code for
|
||||
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
|
||||
work.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* $/Plasma20/Sources/Plasma/NucleusLib/pnGameMgr/Heek/pnGmHeek.h
|
||||
*
|
||||
***/
|
||||
|
||||
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNGAMEMGR_HEEK_PNGMHEEK_H
|
||||
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnGameMgr/Heek/pnGmHeek.h included more than once"
|
||||
#endif
|
||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNGAMEMGR_HEEK_PNGMHEEK_H
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Heek
|
||||
*
|
||||
***/
|
||||
|
||||
enum EHeekInitResult {
|
||||
kHeekInitSuccess,
|
||||
kHeekInitError,
|
||||
kNumHeekInitResults
|
||||
};
|
||||
enum EHeekChoice {
|
||||
kHeekRock,
|
||||
kHeekPaper,
|
||||
kHeekScissors,
|
||||
kNumHeekChoices
|
||||
};
|
||||
enum EHeekSeqFinished {
|
||||
kHeekCountdownSeq,
|
||||
kHeekChoiceAnimSeq,
|
||||
kHeekGameWinAnimSeq,
|
||||
kNumHeekSeq
|
||||
};
|
||||
enum EHeekLightState {
|
||||
kHeekLightOn,
|
||||
kHeekLightOff,
|
||||
kHeekLightFlash,
|
||||
kNumHeekLightStates
|
||||
};
|
||||
enum EHeekCountdownState {
|
||||
kHeekCountdownStart,
|
||||
kHeekCountdownStop,
|
||||
kHeekCountdownIdle,
|
||||
kNumHeekCountdownStates
|
||||
};
|
||||
|
||||
//============================================================================
|
||||
// Game type id
|
||||
//============================================================================
|
||||
|
||||
const Uuid kGameTypeId_Heek = Uuid(L"9d83c2e2-7835-4477-9aaa-22254c59a753");
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Network message ids
|
||||
//============================================================================
|
||||
|
||||
// Cli2Srv message ids
|
||||
enum {
|
||||
kCli2Srv_Heek_PlayGame = kCli2Srv_NumGameMsgIds, // Sent when a player wants to join in the game (instead of observing)
|
||||
kCli2Srv_Heek_LeaveGame, // Sent when a player is done playing (and starts observing)
|
||||
kCli2Srv_Heek_Choose, // Sent when a player choses a move
|
||||
kCli2Srv_Heek_SeqFinished, // Sent when a client-side animation ends
|
||||
};
|
||||
|
||||
// Srv2Cli message ids
|
||||
enum {
|
||||
kSrv2Cli_Heek_PlayGame = kSrv2Cli_NumGameMsgIds, // Sent when the server allows or disallows a player to play
|
||||
kSrv2Cli_Heek_Goodbye, // Sent when the server confirms the player leaving
|
||||
kSrv2Cli_Heek_Welcome, // Sent to everyone when a new player joins
|
||||
kSrv2Cli_Heek_Drop, // Sent when the admin needs to reset a position
|
||||
kSrv2Cli_Heek_Setup, // Sent on link-in so observers see the correct game state (fast-forwarded)
|
||||
kSrv2Cli_Heek_LightState, // Sent to a player when a light he owns changes state (animated)
|
||||
kSrv2Cli_Heek_InterfaceState, // Sent to a player when his buttons change state (animated)
|
||||
kSrv2Cli_Heek_CountdownState, // Sent to the admin to adjust the countdown state
|
||||
kSrv2Cli_Heek_WinLose, // Sent to a player when he wins or loses a hand
|
||||
kSrv2Cli_Heek_GameWin, // Sent to the admin when a game is won
|
||||
kSrv2Cli_Heek_PointUpdate, // Sent to a player when their points change
|
||||
};
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Begin networked data structures
|
||||
#include <PshPack1.h>
|
||||
//============================================================================
|
||||
|
||||
//========================================================================
|
||||
// Message parameters
|
||||
//========================================================================
|
||||
// No creation parameters
|
||||
|
||||
//========================================================================
|
||||
// Heek message structures
|
||||
//========================================================================
|
||||
|
||||
// Cli2Srv
|
||||
struct Cli2Srv_Heek_PlayGame : GameMsgHeader {
|
||||
byte position; // 0...4
|
||||
dword points;
|
||||
wchar name[256];
|
||||
};
|
||||
struct Cli2Srv_Heek_LeaveGame : GameMsgHeader {
|
||||
// no extra data
|
||||
};
|
||||
struct Cli2Srv_Heek_Choose : GameMsgHeader {
|
||||
byte choice; // kHeekRock...kHeekScissors
|
||||
};
|
||||
struct Cli2Srv_Heek_SeqFinished : GameMsgHeader {
|
||||
byte seqFinished; // kHeekCountdownSeq...kHeekGameWinSeq
|
||||
};
|
||||
|
||||
// Srv2Cli
|
||||
struct Srv2Cli_Heek_PlayGame : GameMsgHeader {
|
||||
bool isPlaying;
|
||||
bool isSinglePlayer;
|
||||
bool enableButtons;
|
||||
};
|
||||
struct Srv2Cli_Heek_Goodbye : GameMsgHeader {
|
||||
// no extra data
|
||||
};
|
||||
struct Srv2Cli_Heek_Welcome : GameMsgHeader {
|
||||
dword points;
|
||||
dword rank;
|
||||
wchar name[256];
|
||||
};
|
||||
struct Srv2Cli_Heek_Drop : GameMsgHeader {
|
||||
byte position; // 0...4
|
||||
};
|
||||
struct Srv2Cli_Heek_Setup : GameMsgHeader {
|
||||
byte position; // 0...4
|
||||
bool buttonState;
|
||||
bool lightOn[6];
|
||||
};
|
||||
struct Srv2Cli_Heek_LightState : GameMsgHeader {
|
||||
byte lightNum;
|
||||
byte state; // kHeekLightOn...kHeekLightFlash
|
||||
};
|
||||
struct Srv2Cli_Heek_InterfaceState : GameMsgHeader {
|
||||
bool buttonsEnabled;
|
||||
};
|
||||
struct Srv2Cli_Heek_CountdownState : GameMsgHeader {
|
||||
byte state; // kHeekCountdownStart...kHeekCountdownIdle
|
||||
};
|
||||
struct Srv2Cli_Heek_WinLose : GameMsgHeader {
|
||||
bool win;
|
||||
byte choice; // kHeekRock...kHeekScissors
|
||||
};
|
||||
struct Srv2Cli_Heek_GameWin : GameMsgHeader {
|
||||
byte choice; // kHeekRock...kHeekScissors
|
||||
};
|
||||
struct Srv2Cli_Heek_PointUpdate : GameMsgHeader {
|
||||
bool displayUpdate;
|
||||
dword points;
|
||||
dword rank;
|
||||
};
|
||||
|
||||
//============================================================================
|
||||
// End networked data structures
|
||||
#include <PopPack.h>
|
||||
//============================================================================
|
51
Sources/Plasma/NucleusLib/pnGameMgr/Intern.h
Normal file
51
Sources/Plasma/NucleusLib/pnGameMgr/Intern.h
Normal file
@ -0,0 +1,51 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Additional permissions under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or
|
||||
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
|
||||
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
|
||||
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
|
||||
(or a modified version of those libraries),
|
||||
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
|
||||
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
|
||||
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
|
||||
licensors of this Program grant you additional
|
||||
permission to convey the resulting work. Corresponding Source for a
|
||||
non-source form of such a combination shall include the source code for
|
||||
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
|
||||
work.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* $/Plasma20/Sources/Plasma/NucleusLib/pnGamesCommon/Intern.h
|
||||
*
|
||||
***/
|
||||
|
||||
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNGAMESCOMMON_INTERN_H
|
||||
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnGamesCommon/Intern.h included more than once"
|
||||
#endif
|
||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNGAMESCOMMON_INTERN_H
|
49
Sources/Plasma/NucleusLib/pnGameMgr/Marker/pnGmMarker.cpp
Normal file
49
Sources/Plasma/NucleusLib/pnGameMgr/Marker/pnGmMarker.cpp
Normal file
@ -0,0 +1,49 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Additional permissions under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or
|
||||
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
|
||||
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
|
||||
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
|
||||
(or a modified version of those libraries),
|
||||
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
|
||||
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
|
||||
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
|
||||
licensors of this Program grant you additional
|
||||
permission to convey the resulting work. Corresponding Source for a
|
||||
non-source form of such a combination shall include the source code for
|
||||
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
|
||||
work.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* $/Plasma20/Sources/Plasma/NucleusLib/pnGameMgr/Marker/pnGmMarker.cpp
|
||||
*
|
||||
***/
|
||||
|
||||
#include "../Pch.h"
|
||||
#pragma hdrstop
|
229
Sources/Plasma/NucleusLib/pnGameMgr/Marker/pnGmMarker.h
Normal file
229
Sources/Plasma/NucleusLib/pnGameMgr/Marker/pnGmMarker.h
Normal file
@ -0,0 +1,229 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Additional permissions under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or
|
||||
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
|
||||
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
|
||||
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
|
||||
(or a modified version of those libraries),
|
||||
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
|
||||
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
|
||||
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
|
||||
licensors of this Program grant you additional
|
||||
permission to convey the resulting work. Corresponding Source for a
|
||||
non-source form of such a combination shall include the source code for
|
||||
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
|
||||
work.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* $/Plasma20/Sources/Plasma/NucleusLib/pnGameMgr/Marker/pnGmMarker.h
|
||||
*
|
||||
***/
|
||||
|
||||
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNGAMEMGR_MARKER_PNGMMARKER_H
|
||||
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnGameMgr/Marker/pnGmMarker.h included more than once"
|
||||
#endif
|
||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNGAMEMGR_MARKER_PNGMMARKER_H
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Marker
|
||||
*
|
||||
***/
|
||||
|
||||
enum EMarkerInitResult {
|
||||
kMarkerInitSuccess,
|
||||
kMarkerInitError,
|
||||
kNumMarkerInitResults
|
||||
};
|
||||
enum EMarkerGameType {
|
||||
kMarkerGameQuest,
|
||||
kMarkerGameCGZ, // this is a quest game, but differentiating between the two on the client side makes some things easier
|
||||
kMarkerGameCapture,
|
||||
kMarkerGameCaptureAndHold,
|
||||
kNumMarkerGameTypes
|
||||
};
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Game type id
|
||||
//============================================================================
|
||||
|
||||
const Uuid kGameTypeId_Marker = Uuid(L"000b2c39-0319-4be1-b06c-7a105b160fcf");
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Network message ids
|
||||
//============================================================================
|
||||
|
||||
// Cli2Srv message ids
|
||||
enum {
|
||||
kCli2Srv_Marker_StartGame = kCli2Srv_NumGameMsgIds,
|
||||
kCli2Srv_Marker_PauseGame,
|
||||
kCli2Srv_Marker_ResetGame,
|
||||
kCli2Srv_Marker_ChangeGameName,
|
||||
kCli2Srv_Marker_ChangeTimeLimit,
|
||||
kCli2Srv_Marker_DeleteGame,
|
||||
kCli2Srv_Marker_AddMarker,
|
||||
kCli2Srv_Marker_DeleteMarker,
|
||||
kCli2Srv_Marker_ChangeMarkerName,
|
||||
kCli2Srv_Marker_CaptureMarker,
|
||||
};
|
||||
|
||||
// Srv2Cli message ids
|
||||
enum {
|
||||
kSrv2Cli_Marker_TemplateCreated = kSrv2Cli_NumGameMsgIds,
|
||||
kSrv2Cli_Marker_TeamAssigned,
|
||||
kSrv2Cli_Marker_GameType,
|
||||
kSrv2Cli_Marker_GameStarted,
|
||||
kSrv2Cli_Marker_GamePaused,
|
||||
kSrv2Cli_Marker_GameReset,
|
||||
kSrv2Cli_Marker_GameOver,
|
||||
kSrv2Cli_Marker_GameNameChanged,
|
||||
kSrv2Cli_Marker_TimeLimitChanged,
|
||||
kSrv2Cli_Marker_GameDeleted,
|
||||
kSrv2Cli_Marker_MarkerAdded,
|
||||
kSrv2Cli_Marker_MarkerDeleted,
|
||||
kSrv2Cli_Marker_MarkerNameChanged,
|
||||
kSrv2Cli_Marker_MarkerCaptured,
|
||||
};
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Begin networked data structures
|
||||
#include <PshPack1.h>
|
||||
//============================================================================
|
||||
|
||||
//========================================================================
|
||||
// Message parameters
|
||||
//========================================================================
|
||||
struct Marker_CreateParam {
|
||||
byte gameType; // member of EMarkerGameType
|
||||
wchar gameName[256];
|
||||
dword timeLimit;
|
||||
wchar templateID[80]; // empty if creating a new game, guid if a quest game and we need to grab the data from the state server
|
||||
};
|
||||
|
||||
//========================================================================
|
||||
// Tic-Tac-Toe message structures
|
||||
//========================================================================
|
||||
|
||||
// Cli2Srv
|
||||
struct Cli2Srv_Marker_StartGame : GameMsgHeader {
|
||||
// nothing
|
||||
};
|
||||
struct Cli2Srv_Marker_PauseGame : GameMsgHeader {
|
||||
// nothing
|
||||
};
|
||||
struct Cli2Srv_Marker_ResetGame : GameMsgHeader {
|
||||
// nothing
|
||||
};
|
||||
struct Cli2Srv_Marker_ChangeGameName : GameMsgHeader {
|
||||
wchar gameName[256];
|
||||
};
|
||||
struct Cli2Srv_Marker_ChangeTimeLimit : GameMsgHeader {
|
||||
dword timeLimit;
|
||||
};
|
||||
struct Cli2Srv_Marker_DeleteGame : GameMsgHeader {
|
||||
// nothing
|
||||
};
|
||||
struct Cli2Srv_Marker_AddMarker : GameMsgHeader {
|
||||
double x;
|
||||
double y;
|
||||
double z;
|
||||
wchar name[256];
|
||||
wchar age[80];
|
||||
};
|
||||
struct Cli2Srv_Marker_DeleteMarker : GameMsgHeader {
|
||||
dword markerID;
|
||||
};
|
||||
struct Cli2Srv_Marker_ChangeMarkerName : GameMsgHeader {
|
||||
dword markerID;
|
||||
wchar markerName[256];
|
||||
};
|
||||
struct Cli2Srv_Marker_CaptureMarker : GameMsgHeader {
|
||||
dword markerID;
|
||||
};
|
||||
|
||||
// Srv2Cli
|
||||
struct Srv2Cli_Marker_TemplateCreated : GameMsgHeader {
|
||||
wchar templateID[80];
|
||||
};
|
||||
struct Srv2Cli_Marker_TeamAssigned : GameMsgHeader {
|
||||
byte teamNumber; // 1 or 2
|
||||
};
|
||||
struct Srv2Cli_Marker_GameType : GameMsgHeader {
|
||||
byte gameType; // member of EMarkerGameType
|
||||
};
|
||||
struct Srv2Cli_Marker_GameStarted : GameMsgHeader {
|
||||
// nothing
|
||||
};
|
||||
struct Srv2Cli_Marker_GamePaused : GameMsgHeader {
|
||||
dword timeLeft; // 0 if quest game, since they don't have a timer
|
||||
};
|
||||
struct Srv2Cli_Marker_GameReset : GameMsgHeader {
|
||||
// nothing
|
||||
};
|
||||
struct Srv2Cli_Marker_GameOver : GameMsgHeader {
|
||||
// nothing
|
||||
};
|
||||
struct Srv2Cli_Marker_GameNameChanged : GameMsgHeader {
|
||||
wchar newName[256];
|
||||
};
|
||||
struct Srv2Cli_Marker_TimeLimitChanged : GameMsgHeader {
|
||||
dword newTimeLimit;
|
||||
};
|
||||
struct Srv2Cli_Marker_GameDeleted : GameMsgHeader {
|
||||
bool failed; // did the delete fail?
|
||||
};
|
||||
struct Srv2Cli_Marker_MarkerAdded : GameMsgHeader {
|
||||
double x;
|
||||
double y;
|
||||
double z;
|
||||
dword markerID;
|
||||
wchar name[256];
|
||||
wchar age[80];
|
||||
};
|
||||
struct Srv2Cli_Marker_MarkerDeleted : GameMsgHeader {
|
||||
dword markerID;
|
||||
};
|
||||
struct Srv2Cli_Marker_MarkerNameChanged : GameMsgHeader {
|
||||
dword markerID;
|
||||
wchar newName[256];
|
||||
};
|
||||
struct Srv2Cli_Marker_MarkerCaptured : GameMsgHeader {
|
||||
dword markerID;
|
||||
byte team; // 0 for no team, or for quest games
|
||||
};
|
||||
|
||||
|
||||
//============================================================================
|
||||
// End networked data structures
|
||||
#include <PopPack.h>
|
||||
//============================================================================
|
59
Sources/Plasma/NucleusLib/pnGameMgr/Pch.h
Normal file
59
Sources/Plasma/NucleusLib/pnGameMgr/Pch.h
Normal file
@ -0,0 +1,59 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Additional permissions under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or
|
||||
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
|
||||
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
|
||||
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
|
||||
(or a modified version of those libraries),
|
||||
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
|
||||
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
|
||||
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
|
||||
licensors of this Program grant you additional
|
||||
permission to convey the resulting work. Corresponding Source for a
|
||||
non-source form of such a combination shall include the source code for
|
||||
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
|
||||
work.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* $/Plasma20/Sources/Plasma/NucleusLib/pnGamesCommon/Pch.h
|
||||
*
|
||||
***/
|
||||
|
||||
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNGAMESCOMMON_PCH_H
|
||||
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnGamesCommon/Pch.h included more than once"
|
||||
#endif
|
||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNGAMESCOMMON_PCH_H
|
||||
|
||||
|
||||
#include "../pnUtils/pnUtils.h"
|
||||
#include "../pnNetBase/pnNetBase.h"
|
||||
#include "../pnProduct/pnProduct.h"
|
||||
|
||||
#include "pnGameMgr.h"
|
||||
#include "Intern.h"
|
@ -0,0 +1,49 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Additional permissions under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or
|
||||
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
|
||||
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
|
||||
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
|
||||
(or a modified version of those libraries),
|
||||
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
|
||||
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
|
||||
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
|
||||
licensors of this Program grant you additional
|
||||
permission to convey the resulting work. Corresponding Source for a
|
||||
non-source form of such a combination shall include the source code for
|
||||
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
|
||||
work.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* $/Plasma20/Sources/Plasma/NucleusLib/pnGameMgr/TicTacToe/pnGmTicTacToe.cpp
|
||||
*
|
||||
***/
|
||||
|
||||
#include "../Pch.h"
|
||||
#pragma hdrstop
|
136
Sources/Plasma/NucleusLib/pnGameMgr/TicTacToe/pnGmTicTacToe.h
Normal file
136
Sources/Plasma/NucleusLib/pnGameMgr/TicTacToe/pnGmTicTacToe.h
Normal file
@ -0,0 +1,136 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Additional permissions under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or
|
||||
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
|
||||
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
|
||||
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
|
||||
(or a modified version of those libraries),
|
||||
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
|
||||
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
|
||||
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
|
||||
licensors of this Program grant you additional
|
||||
permission to convey the resulting work. Corresponding Source for a
|
||||
non-source form of such a combination shall include the source code for
|
||||
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
|
||||
work.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* $/Plasma20/Sources/Plasma/NucleusLib/pnGameMgr/TicTacToe/pnGmTicTacToe.h
|
||||
*
|
||||
***/
|
||||
|
||||
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNGAMEMGR_TICTACTOE_PNGMTICTACTOE_H
|
||||
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnGameMgr/TicTacToe/pnGmTicTacToe.h included more than once"
|
||||
#endif
|
||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNGAMEMGR_TICTACTOE_PNGMTICTACTOE_H
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Tic-Tac-Toe
|
||||
*
|
||||
***/
|
||||
|
||||
enum ETTTInitResult {
|
||||
kTTTInitSuccess,
|
||||
kTTTInitError,
|
||||
kNumTTTInitResults
|
||||
};
|
||||
enum ETTTGameResult {
|
||||
kTTTGameResultWinner, // there was a winning player
|
||||
kTTTGameResultTied, // players tied (a "cat's game")
|
||||
kTTTGameResultGave, // other player left the game
|
||||
kTTTGameResultError, // something bad happened on the server
|
||||
kNumTTTGameResults
|
||||
};
|
||||
|
||||
//============================================================================
|
||||
// Game type id
|
||||
//============================================================================
|
||||
|
||||
const Uuid kGameTypeId_TicTacToe = Uuid(L"a7236529-11d8-4758-9368-59cb43445a83");
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Network message ids
|
||||
//============================================================================
|
||||
|
||||
// Cli2Srv message ids
|
||||
enum {
|
||||
kCli2Srv_TTT_MakeMove = kCli2Srv_NumGameMsgIds,
|
||||
};
|
||||
|
||||
// Srv2Cli message ids
|
||||
enum {
|
||||
kSrv2Cli_TTT_GameStarted = kSrv2Cli_NumGameMsgIds,
|
||||
kSrv2Cli_TTT_GameOver,
|
||||
kSrv2Cli_TTT_MoveMade,
|
||||
};
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Begin networked data scructures
|
||||
#include <PshPack1.h>
|
||||
//============================================================================
|
||||
|
||||
//========================================================================
|
||||
// Message parameters
|
||||
//========================================================================
|
||||
struct TTT_CreateParam {
|
||||
byte playerCount; // 1 or 2
|
||||
};
|
||||
|
||||
//========================================================================
|
||||
// Tic-Tac-Toe message structures
|
||||
//========================================================================
|
||||
|
||||
// Cli2Srv
|
||||
struct Cli2Srv_TTT_MakeMove : GameMsgHeader {
|
||||
byte row; // 1..3
|
||||
byte col; // 1..3
|
||||
};
|
||||
|
||||
// Srv2Cli
|
||||
struct Srv2Cli_TTT_GameStarted : GameMsgHeader {
|
||||
bool yourTurn; // randomly selected first player
|
||||
};
|
||||
struct Srv2Cli_TTT_GameOver : GameMsgHeader {
|
||||
ETTTGameResult result;
|
||||
dword winnerId;
|
||||
};
|
||||
struct Srv2Cli_TTT_MoveMade : GameMsgHeader {
|
||||
dword playerId;
|
||||
byte row; // 1..3
|
||||
byte col; // 1..3
|
||||
};
|
||||
|
||||
//============================================================================
|
||||
// End networked data structures
|
||||
#include <PopPack.h>
|
||||
//============================================================================
|
49
Sources/Plasma/NucleusLib/pnGameMgr/VarSync/pnGmVarSync.cpp
Normal file
49
Sources/Plasma/NucleusLib/pnGameMgr/VarSync/pnGmVarSync.cpp
Normal file
@ -0,0 +1,49 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Additional permissions under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or
|
||||
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
|
||||
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
|
||||
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
|
||||
(or a modified version of those libraries),
|
||||
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
|
||||
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
|
||||
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
|
||||
licensors of this Program grant you additional
|
||||
permission to convey the resulting work. Corresponding Source for a
|
||||
non-source form of such a combination shall include the source code for
|
||||
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
|
||||
work.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* $/Plasma20/Sources/Plasma/NucleusLib/pnGameMgr/VarSync/pnGmVarSync.cpp
|
||||
*
|
||||
***/
|
||||
|
||||
#include "../Pch.h"
|
||||
#pragma hdrstop
|
157
Sources/Plasma/NucleusLib/pnGameMgr/VarSync/pnGmVarSync.h
Normal file
157
Sources/Plasma/NucleusLib/pnGameMgr/VarSync/pnGmVarSync.h
Normal file
@ -0,0 +1,157 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Additional permissions under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or
|
||||
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
|
||||
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
|
||||
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
|
||||
(or a modified version of those libraries),
|
||||
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
|
||||
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
|
||||
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
|
||||
licensors of this Program grant you additional
|
||||
permission to convey the resulting work. Corresponding Source for a
|
||||
non-source form of such a combination shall include the source code for
|
||||
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
|
||||
work.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* $/Plasma20/Sources/Plasma/NucleusLib/pnGameMgr/VarSync/pnGmVarSync.h
|
||||
*
|
||||
***/
|
||||
|
||||
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNGAMEMGR_VARSYNC_PNGMVARSYNC_H
|
||||
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnGameMgr/VarSync/pnGmVarSync.h included more than once"
|
||||
#endif
|
||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNGAMEMGR_VARSYNC_PNGMVARSYNC_H
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Var Sync
|
||||
*
|
||||
***/
|
||||
|
||||
enum EVarSyncInitResult {
|
||||
kVarSyncInitSuccess,
|
||||
kVarSyncInitError,
|
||||
kNumVarSyncInitResults
|
||||
};
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Game type id
|
||||
//============================================================================
|
||||
|
||||
const Uuid kGameTypeId_VarSync = Uuid(L"475c2e9b-a245-4106-a047-9b25d41ff333");
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Network message ids
|
||||
//============================================================================
|
||||
|
||||
// Cli2Srv message ids
|
||||
enum {
|
||||
kCli2Srv_VarSync_SetStringVar = kCli2Srv_NumGameMsgIds,
|
||||
kCli2Srv_VarSync_SetNumericVar,
|
||||
kCli2Srv_VarSync_RequestAllVars,
|
||||
kCli2Srv_VarSync_CreateStringVar,
|
||||
kCli2Srv_VarSync_CreateNumericVar,
|
||||
};
|
||||
|
||||
// Srv2Cli message ids
|
||||
enum {
|
||||
kSrv2Cli_VarSync_StringVarChanged = kSrv2Cli_NumGameMsgIds,
|
||||
kSrv2Cli_VarSync_NumericVarChanged,
|
||||
kSrv2Cli_VarSync_AllVarsSent,
|
||||
kSrv2Cli_VarSync_StringVarCreated,
|
||||
kSrv2Cli_VarSync_NumericVarCreated,
|
||||
};
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Begin networked data structures
|
||||
#include <PshPack1.h>
|
||||
//============================================================================
|
||||
|
||||
//========================================================================
|
||||
// Message parameters
|
||||
//========================================================================
|
||||
struct VarSync_CreateParam {
|
||||
};
|
||||
|
||||
//========================================================================
|
||||
// VarSync message structures
|
||||
//========================================================================
|
||||
|
||||
// Cli2Srv
|
||||
struct Cli2Srv_VarSync_SetStringVar : GameMsgHeader {
|
||||
unsigned long varID;
|
||||
wchar varValue[256];
|
||||
};
|
||||
struct Cli2Srv_VarSync_SetNumericVar : GameMsgHeader {
|
||||
unsigned long varID;
|
||||
double varValue;
|
||||
};
|
||||
struct Cli2Srv_VarSync_RequestAllVars : GameMsgHeader {
|
||||
};
|
||||
struct Cli2Srv_VarSync_CreateStringVar : GameMsgHeader {
|
||||
wchar varName[256];
|
||||
wchar varValue[256];
|
||||
};
|
||||
struct Cli2Srv_VarSync_CreateNumericVar : GameMsgHeader {
|
||||
wchar varName[256];
|
||||
double varValue;
|
||||
};
|
||||
|
||||
// Srv2Cli
|
||||
struct Srv2Cli_VarSync_StringVarChanged : GameMsgHeader {
|
||||
unsigned long varID;
|
||||
wchar varValue[256];
|
||||
};
|
||||
struct Srv2Cli_VarSync_NumericVarChanged : GameMsgHeader {
|
||||
unsigned long varID;
|
||||
double varValue;
|
||||
};
|
||||
struct Srv2Cli_VarSync_AllVarsSent : GameMsgHeader {
|
||||
};
|
||||
struct Srv2Cli_VarSync_StringVarCreated : GameMsgHeader {
|
||||
wchar varName[256];
|
||||
unsigned long varID;
|
||||
wchar varValue[256];
|
||||
};
|
||||
struct Srv2Cli_VarSync_NumericVarCreated : GameMsgHeader {
|
||||
wchar varName[256];
|
||||
unsigned long varID;
|
||||
double varValue;
|
||||
};
|
||||
|
||||
//============================================================================
|
||||
// End networked data structures
|
||||
#include <PopPack.h>
|
||||
//============================================================================
|
49
Sources/Plasma/NucleusLib/pnGameMgr/pnGameMgr.cpp
Normal file
49
Sources/Plasma/NucleusLib/pnGameMgr/pnGameMgr.cpp
Normal file
@ -0,0 +1,49 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Additional permissions under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or
|
||||
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
|
||||
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
|
||||
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
|
||||
(or a modified version of those libraries),
|
||||
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
|
||||
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
|
||||
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
|
||||
licensors of this Program grant you additional
|
||||
permission to convey the resulting work. Corresponding Source for a
|
||||
non-source form of such a combination shall include the source code for
|
||||
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
|
||||
work.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* $/Plasma20/Sources/Plasma/NucleusLib/pnGameMgr/pnGameMgr.cpp
|
||||
*
|
||||
***/
|
||||
|
||||
#include "Pch.h"
|
||||
#pragma hdrstop
|
268
Sources/Plasma/NucleusLib/pnGameMgr/pnGameMgr.h
Normal file
268
Sources/Plasma/NucleusLib/pnGameMgr/pnGameMgr.h
Normal file
@ -0,0 +1,268 @@
|
||||
/*==LICENSE==*
|
||||
|
||||
CyanWorlds.com Engine - MMOG client, server and tools
|
||||
Copyright (C) 2011 Cyan Worlds, Inc.
|
||||
|
||||
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Additional permissions under GNU GPL version 3 section 7
|
||||
|
||||
If you modify this Program, or any covered work, by linking or
|
||||
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
|
||||
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
|
||||
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
|
||||
(or a modified version of those libraries),
|
||||
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
|
||||
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
|
||||
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
|
||||
licensors of this Program grant you additional
|
||||
permission to convey the resulting work. Corresponding Source for a
|
||||
non-source form of such a combination shall include the source code for
|
||||
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
|
||||
work.
|
||||
|
||||
You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
or by snail mail at:
|
||||
Cyan Worlds, Inc.
|
||||
14617 N Newport Hwy
|
||||
Mead, WA 99021
|
||||
|
||||
*==LICENSE==*/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* $/Plasma20/Sources/Plasma/NucleusLib/pnGameMgr/pnGameMgr.h
|
||||
*
|
||||
***/
|
||||
|
||||
#ifndef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNGAMEMGR_PNGAMEMGR_H
|
||||
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNGAMEMGR_PNGAMEMGR_H
|
||||
|
||||
|
||||
#include "../pnUtils/pnUtils.h"
|
||||
#include "../pnNetBase/pnNetBase.h"
|
||||
#include "../pnAsyncCore/pnAsyncCore.h"
|
||||
#include "../pnNetCli/pnNetCli.h"
|
||||
#include "../pnProduct/pnProduct.h"
|
||||
#include "../pnKeyedObject/plKey.h"
|
||||
|
||||
#include "hsGeometry3.h"
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* GameMgr
|
||||
*
|
||||
***/
|
||||
|
||||
const unsigned kGameMgrGlobalGameIdFlag = !((unsigned)-1 - 1); // 0x10000000
|
||||
|
||||
//============================================================================
|
||||
// EGameJoinError
|
||||
//============================================================================
|
||||
enum EGameJoinError {
|
||||
kGameJoinSuccess,
|
||||
kGameJoinErrNotExist,
|
||||
kGameJoinErrInitFailed,
|
||||
kGameJoinErrGameStarted,
|
||||
kGameJoinErrGameOver,
|
||||
kGameJoinErrMaxPlayers,
|
||||
kGameJoinErrAlreadyJoined,
|
||||
kGameJoinErrNoInvite,
|
||||
kNumGameJoinErrors
|
||||
};
|
||||
|
||||
//============================================================================
|
||||
// EGameInviteError
|
||||
//============================================================================
|
||||
enum EGameInviteError {
|
||||
kGameInviteSuccess,
|
||||
kGameInviteErrNotOwner,
|
||||
kGameInviteErrAlreadyInvited,
|
||||
kGameInviteErrAlreadyJoined,
|
||||
kGameInviteErrGameStarted,
|
||||
kGameInviteErrGameOver,
|
||||
kGameInviteErrGameFull,
|
||||
kGameInviteErrNoJoin, // GameSrv reports the player may not join right now
|
||||
kNumGameInviteErrors
|
||||
};
|
||||
|
||||
//============================================================================
|
||||
// Game create/join options
|
||||
//============================================================================
|
||||
/*
|
||||
If set : Anyone may join; no invite necessary.
|
||||
Not set : Only players with invites may join.
|
||||
*/
|
||||
const unsigned kGameCreatePublic = 1<<0;
|
||||
/*
|
||||
If set : Anyone may invite others to play.
|
||||
Not set : Only the game owner may send invites.
|
||||
*/
|
||||
const unsigned kGameCreateOpen = 1<<1;
|
||||
/*
|
||||
If set : Player joins or creates the "common" instance of the game. In
|
||||
this case, the 'newGameId' field is not meaningful. If the
|
||||
common instance doesn't exist, it'll be created on-the-fly and
|
||||
the player will receive a GameCreated message as well as the
|
||||
normal GameJoined. This allows the game to be initialized once
|
||||
when first instanced.
|
||||
Not set : A game with the specified gameId must exist on the server.
|
||||
Depending on the options set during the game's creation, the
|
||||
player may need to have been sent an invite. Also, the game may
|
||||
not be in a state where it allows new players to join. Player
|
||||
receives a GameJoined reply in any case. Inspect the 'result'
|
||||
field to see whether the join was successful.
|
||||
*/
|
||||
const unsigned kGameJoinCommon = 1<<2;
|
||||
/*
|
||||
*/
|
||||
const unsigned kGameJoinObserver = 1<<3;
|
||||
|
||||
|
||||
//============================================================================
|
||||
// GameMgr Network message ids
|
||||
//============================================================================
|
||||
enum {
|
||||
kCli2Srv_GameMgr_CreateGame,
|
||||
kCli2Srv_GameMgr_JoinGame,
|
||||
};
|
||||
enum {
|
||||
kSrv2Cli_GameMgr_GameInstance, // Internal, not sent out in pfGameMgrMsg
|
||||
kSrv2Cli_GameMgr_InviteReceived,
|
||||
kSrv2Cli_GameMgr_InviteRevoked,
|
||||
};
|
||||
|
||||
//============================================================================
|
||||
// GameCli/Srv Network message ids
|
||||
//============================================================================
|
||||
enum {
|
||||
kCli2Srv_Game_LeaveGame,
|
||||
kCli2Srv_Game_Invite,
|
||||
kCli2Srv_Game_Uninvite,
|
||||
// Cli2Srv msgIds for specific games must begin with this value. See TicTacToe for example
|
||||
kCli2Srv_NumGameMsgIds
|
||||
};
|
||||
enum {
|
||||
kSrv2Cli_Game_PlayerJoined,
|
||||
kSrv2Cli_Game_PlayerLeft,
|
||||
kSrv2Cli_Game_InviteFailed,
|
||||
kSrv2Cli_Game_OwnerChange,
|
||||
// Srv2Cli msgIds for specific games must begin with this value. See TicTacToe for example
|
||||
kSrv2Cli_NumGameMsgIds
|
||||
};
|
||||
|
||||
|
||||
//============================================================================
|
||||
// Begin networked data scructures
|
||||
#include <PshPack1.h>
|
||||
//============================================================================
|
||||
|
||||
struct GameMsgHeader {
|
||||
dword messageId;
|
||||
dword transId;
|
||||
dword recvGameId; // 0 --> GameMgr, non-zero --> GameSrv
|
||||
dword messageBytes;
|
||||
};
|
||||
|
||||
//========================================================================
|
||||
// GameMgr message structures
|
||||
//========================================================================
|
||||
|
||||
// Cli2Srv
|
||||
struct Cli2Srv_GameMgr_CreateGame : GameMsgHeader {
|
||||
Uuid gameTypeId;
|
||||
dword createOptions;
|
||||
dword createDataBytes;
|
||||
byte createData[1]; // [createDataBytes]
|
||||
};
|
||||
struct Cli2Srv_GameMgr_JoinGame : GameMsgHeader {
|
||||
// Field ordering here is vitally important, see pfGameMgr::JoinGame for explanation
|
||||
dword newGameId;
|
||||
dword createOptions;
|
||||
Uuid gameTypeId;
|
||||
dword createDataBytes;
|
||||
byte createData[1]; // [createDataBytes]
|
||||
};
|
||||
|
||||
// Srv2Cli
|
||||
struct Srv2Cli_GameMgr_GameInstance : GameMsgHeader {
|
||||
EGameJoinError result;
|
||||
dword ownerId;
|
||||
Uuid gameTypeId;
|
||||
dword newGameId;
|
||||
};
|
||||
struct Srv2Cli_GameMgr_InviteReceived : GameMsgHeader {
|
||||
dword inviterId;
|
||||
Uuid gameTypeId;
|
||||
dword newGameId;
|
||||
};
|
||||
struct Srv2Cli_GameMgr_InviteRevoked : GameMsgHeader {
|
||||
dword inviterId;
|
||||
Uuid gameTypeId;
|
||||
dword newGameId;
|
||||
};
|
||||
|
||||
|
||||
//========================================================================
|
||||
// GameCli/Srv message structures
|
||||
//========================================================================
|
||||
|
||||
// Cli2Srv
|
||||
struct Cli2Srv_Game_LeaveGame : GameMsgHeader {
|
||||
};
|
||||
struct Cli2Srv_Game_Invite : GameMsgHeader {
|
||||
dword playerId;
|
||||
};
|
||||
struct Cli2Srv_Game_Uninvite : GameMsgHeader {
|
||||
dword playerId;
|
||||
};
|
||||
|
||||
// Srv2Cli
|
||||
struct Srv2Cli_Game_PlayerJoined : GameMsgHeader {
|
||||
dword playerId;
|
||||
};
|
||||
struct Srv2Cli_Game_PlayerLeft : GameMsgHeader {
|
||||
dword playerId;
|
||||
};
|
||||
struct Srv2Cli_Game_InviteFailed : GameMsgHeader {
|
||||
dword inviteeId;
|
||||
dword operationId;
|
||||
EGameInviteError error;
|
||||
};
|
||||
struct Srv2Cli_Game_OwnerChange : GameMsgHeader {
|
||||
dword ownerId;
|
||||
};
|
||||
|
||||
|
||||
//============================================================================
|
||||
// End networked data structures
|
||||
#include <PopPack.h>
|
||||
//============================================================================
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Games
|
||||
*
|
||||
***/
|
||||
|
||||
#include "TicTacToe/pnGmTicTacToe.h"
|
||||
#include "Heek/pnGmHeek.h"
|
||||
#include "Marker/pnGmMarker.h"
|
||||
#include "BlueSpiral/pnGmBlueSpiral.h"
|
||||
#include "ClimbingWall/pnGmClimbingWall.h"
|
||||
#include "VarSync/pnGmVarSync.h"
|
||||
|
||||
|
||||
#endif // PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNGAMEMGR_PNGAMEMGR_H
|
Reference in New Issue
Block a user