2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 02:27:40 -04:00

Initial Commit of CyanWorlds.com Engine Open Source Client/Plugin

This commit is contained in:
JWPlatt
2011-03-12 12:34:52 -05:00
commit a20a222fc2
3976 changed files with 1301356 additions and 0 deletions

View File

@ -0,0 +1,44 @@
/*==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/>.
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/pnProduct/Private/pnPrAllIncludes.h
*
***/
#ifndef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRALLINCLUDES_H
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRALLINCLUDES_H
#include "../pnUtils/pnUtils.h"
#include "pnPrBuildId.h"
#include "pnPrBuildType.h"
#include "pnPrBranchId.h"
#include "pnPrProductId.h"
#include "pnPrBuildString.h"
#endif // PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRALLINCLUDES_H

View File

@ -0,0 +1,67 @@
/*==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/>.
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/pnProduct/Private/pnPrBranchId.cpp
*
***/
#include "../Pch.h"
#pragma hdrstop
/*****************************************************************************
*
* Private definitions
*
***/
#ifndef PATCHER
// This value is manually changed upon each branch so that client applications
// built from this branch may not connect to servers built from another.
#define BRANCH_ID 1
COMPILER_ASSERT(BRANCH_ID != 0);
#else
// Patcher branchId may never change, otherwise its CRC would differ from
// branch to branch, causing unnecessary self-patching to occur.
#define BRANCH_ID 0
#endif
/*****************************************************************************
*
* Exports
*
***/
//============================================================================
unsigned BranchId () {
return BRANCH_ID;
}

View File

@ -0,0 +1,44 @@
/*==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/>.
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/pnProduct/Private/pnPrBranchId.h
*
***/
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRBRANCHID_H
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBranchId.h included more than once"
#endif
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRBRANCHID_H
/*****************************************************************************
*
* BranchId functions
*
***/
unsigned BranchId ();

View File

@ -0,0 +1,71 @@
/*==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/>.
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/pnProduct/Private/pnPrBuildId.cpp
*
***/
#include "../Pch.h"
#pragma hdrstop
/*****************************************************************************
*
* Private definitions
*
***/
// This line must NEVER be modified manually; it is automatically updated
// by the build server.
#define BUILD_ID 897
COMPILER_ASSERT(BUILD_ID != 0);
/*****************************************************************************
*
* Private data
*
***/
static unsigned s_buildIdOverride;
/*****************************************************************************
*
* Exports
*
***/
//============================================================================
unsigned BuildId () {
return s_buildIdOverride ? s_buildIdOverride : BUILD_ID;
}
//============================================================================
void OverrideBuildId (unsigned buildId) {
s_buildIdOverride = buildId;
}

View File

@ -0,0 +1,45 @@
/*==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/>.
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/pnProduct/Private/pnPrBuildId.h
*
***/
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRBUILDID_H
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildId.h included more than once"
#endif
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRBUILDID_H
/*****************************************************************************
*
* BuildId functions
*
***/
unsigned BuildId ();
void OverrideBuildId (unsigned buildId);

View 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/>.
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/pnProduct/Private/pnPrBuildString.cpp
*
***/
#include "../Pch.h"
#pragma hdrstop
/*****************************************************************************
*
* Exports
*
***/
//============================================================================
const wchar * ProductBuildString () {
// This string is replaced by plMarkBuild.exe with the following string:
// "date:YYMMDD time:HHMMSS user:%USERNAME%"
static const wchar PRODUCT_BUILD_STRING[64] = {
L"PRODUCT_BUILD_STRING "
};
return PRODUCT_BUILD_STRING;
}

View File

@ -0,0 +1,45 @@
/*==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/>.
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/pnProduct/Private/pnPrBuildString.h
*
***/
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRBUILDSTRING_H
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildString.h included more than once"
#endif
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRBUILDSTRING_H
/*****************************************************************************
*
* BuildString functions
*
***/
const wchar * ProductBuildString ();

View File

@ -0,0 +1,83 @@
/*==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/>.
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/pnProduct/Private/pnPrBuildType.cpp
*
***/
#include "../Pch.h"
#pragma hdrstop
/*****************************************************************************
*
* Exports
*
***/
//============================================================================
unsigned BuildType () {
return BUILD_TYPE;
}
//============================================================================
const wchar * BuildTypeString () {
#if BUILD_TYPE == BUILD_TYPE_DEV
return L"Dev";
#elif BUILD_TYPE == BUILD_TYPE_QA
return L"QA";
#elif BUILD_TYPE == BUILD_TYPE_TEST
return L"Test";
#elif BUILD_TYPE == BUILD_TYPE_BETA
return L"Beta";
#elif BUILD_TYPE == BUILD_TYPE_LIVE
return L"Live";
#else
# error "Unknown build type"
#endif
}
//============================================================================
const wchar *BuildTypeServerStatusPath () {
#if BUILD_TYPE == BUILD_TYPE_DEV
return nil;
#elif BUILD_TYPE == BUILD_TYPE_QA
return nil;
#elif BUILD_TYPE == BUILD_TYPE_TEST
return nil;
#elif BUILD_TYPE == BUILD_TYPE_BETA
return L"/serverstatus/moulbeta.php";
#elif BUILD_TYPE == BUILD_TYPE_LIVE
return L"/serverstatus/moullive.php";
#else
# error "Unknown build type"
#endif
}

View File

@ -0,0 +1,62 @@
/*==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/>.
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/pnProduct/Private/pnPrBuildType.h
*
***/
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRBUILDTYPE_H
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildType.h included more than once"
#endif
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRBUILDTYPE_H
/*****************************************************************************
*
* BuildType definitions
*
***/
#ifndef BUILD_TYPE
#define BUILD_TYPE BUILD_TYPE_DEV
#endif
#define BUILD_TYPE_DEV 10
#define BUILD_TYPE_QA 20
#define BUILD_TYPE_TEST 30
#define BUILD_TYPE_BETA 40
#define BUILD_TYPE_LIVE 50
/*****************************************************************************
*
* BuildType functions
*
***/
unsigned BuildType ();
const wchar * BuildTypeString ();
const wchar * BuildTypeServerStatusPath ();

View File

@ -0,0 +1,125 @@
/*==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/>.
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/pnProduct/Private/pnPrProductId.cpp
*
***/
#include "../Pch.h"
#pragma hdrstop
/*****************************************************************************
*
* Private data
*
***/
namespace Product {
namespace Uru {
static const wchar kCoreName[] = L"UruLive";
static const wchar kShortName[] = L"UruLive";
static const wchar kLongName[] = L"Uru Live";
static const Uuid kId(L"ea489821-6c35-4bd0-9dae-bb17c585e680");
}
// @@@: add your product namespace here
}
/*****************************************************************************
*
* Private definitions
*
***/
#if BUILD_PRODUCT_ID == BUILD_PRODUCT_ID_URU
#define PRODUCT_CORE_NAME Product::Uru::kCoreName
#define PRODUCT_SHORT_NAME Product::Uru::kShortName
#define PRODUCT_LONG_NAME Product::Uru::kLongName
#define PRODUCT_ID Product::Uru::kId
#else
#error "No product id defined"
#endif
/*****************************************************************************
*
* Exported functions
*
***/
//============================================================================
const Uuid & ProductId () {
return PRODUCT_ID;
}
//============================================================================
const wchar * ProductCoreName () {
return PRODUCT_CORE_NAME;
}
//============================================================================
const wchar * ProductShortName () {
return PRODUCT_SHORT_NAME;
}
//============================================================================
const wchar * ProductLongName () {
return PRODUCT_LONG_NAME;
}
//============================================================================
void ProductString (wchar * dest, unsigned destChars) {
// Example: "UruLive.Beta.2.214 - External.Release"
StrPrintf(
dest,
destChars,
L"%s.%s.%u.%u - %s.%s",
ProductCoreName(),
BuildTypeString(),
BranchId(),
BuildId(),
#ifdef PLASMA_EXTERNAL_RELEASE
L"External",
#else
L"Internal",
#endif
#ifdef HS_DEBUGGING
L"Debug"
#else
L"Release"
#endif
);
}

View File

@ -0,0 +1,78 @@
/*==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/>.
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/pnProduct/Private/pnPrProductId.h
*
***/
#ifdef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRPRODUCTID_H
#error "Header $/Plasma20/Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.h included more than once"
#endif
#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNPRODUCT_PRIVATE_PNPRPRODUCTID_H
/*****************************************************************************
*
* Global data
*
***/
//============================================================================
// Build productIds
//
// These values must never be stored on disk or sent over the network,
// use the value returned from ProductId() for that purpose.
//============================================================================
#define BUILD_PRODUCT_ID_URU 1
// @@@ Add your build product id above this line
//============================================================================
// Default to Uru for lack of a better idea
//============================================================================
#ifndef BUILD_PRODUCT_ID
# define BUILD_PRODUCT_ID BUILD_PRODUCT_ID_URU
#endif
/*****************************************************************************
*
* Product functions
*
***/
const Uuid & ProductId ();
const wchar * ProductCoreName (); // e.g: L"Uru"
const wchar * ProductShortName (); // e.g: L"Uru" (filename/registry friendly)
const wchar * ProductLongName (); // e.g: L"Uru: Ages Beyond Myst" (human friendly)
// Returns: "<ProductCoreName>.<BuildTypeString>.<BranchId>.<BuildId>"
// Example: "Uru.Beta.3.204"
void ProductString (wchar * dest, unsigned destChars);