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

Build 918

This commit is contained in:
CyanWorlds
2013-07-05 15:28:19 -07:00
parent 68ba122afe
commit 46a0cf6206
808 changed files with 152430 additions and 77945 deletions

View File

@ -54,7 +54,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "../pfAudio/pfAudioCreatable.h"
#include "../pfPython/pfPythonCreatable.h"
#include "../pfGameGUIMgr/pfGameGUIMgrCreatable.h"
#ifdef PLASMA_CCR_RELEASE
#include "../pfCCR/plCCRCreatable.h"
#endif // PLASMA_CCR_RELEASE
#include "../pfJournalBook/pfJournalBookCreatable.h"
#include "../pfGameMgr/pfGameMgrCreatables.h"
#include "../pfSecurePreloader/pfSecurePreloaderCreatable.h"

View File

@ -57,7 +57,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "../plAvatar/plAvatarMgr.h"
#include "../plAvatar/plArmatureMod.h"
#include "../plAvatar/plAvCallbackAction.h"
#include "../plAvatar/plPhysicalControllerCore.h"
hsBool plListener::fPrintDbgInfo = false;

View File

@ -1,48 +0,0 @@
/*==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==*/
#ifndef plCCRCreatable_inc
#define plCCRCreatable_inc
#include "plCCRMgr.h"
#endif // plCCRCreatable_inc

View File

@ -1,47 +0,0 @@
/*==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==*/
#include "plCCRMgrBase.h"
#include "plCCRMgr.h"
// static
plCCRMgrBase* plCCRMgrBase::fBaseInstance=nil;

View File

@ -1,72 +0,0 @@
/*==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==*/
#ifndef plCCRMgr_h
#define plCCRMgr_h
//
// Implementation for CCR commands
//
#include "hsTypes.h"
// Error constants and conversion are outside of the CCR_RELEASE define,
// So that non-CCR code can report CCR errors, and the plCCRMgr can
// share this code.
namespace plCCRError
{
enum Errors
{
kError = hsFail,
kNotAuthorized = -2,
kNilLocalAvatar = -3,
kCCRAlreadyAllocated = -4,
kNetworkingIsDisabled = -5,
kCantFindPlayer = -6,
kInvalidLevel = -7,
kPlayerNotInAge = -8,
kVaultTimedOut = -9,
kVaultFetchFailed = -10,
kAuthTimedOut = -11
};
}
#endif // plCCRMgr_h

View File

@ -1,41 +0,0 @@
/*==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==*/

View File

@ -1,46 +0,0 @@
/*==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==*/
#ifndef plCCRVault_h
#define plCCRVault_h
#endif // plCCRVault_h

View File

@ -238,7 +238,7 @@ public:
plCameraBrain1_Drive(plCameraModifier1* pMod);
~plCameraBrain1_Drive();
static SetSensitivity(hsScalar f) { fTurnRate = f; }
static void SetSensitivity(hsScalar f) { fTurnRate = f; }
CLASSNAME_REGISTER( plCameraBrain1_Drive );
GETINTERFACE_ANY( plCameraBrain1_Drive, plCameraBrain1 );

View File

@ -63,7 +63,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "../pnSceneObject/plSimulationInterface.h"
#include "../plAvatar/plAvatarMgr.h"
#include "../plAvatar/plArmatureMod.h"
#include "../plAvatar/plAvCallbackAction.h"
#include "../plAvatar/plPhysicalControllerCore.h"
// new stuff

View File

@ -1,76 +0,0 @@
/*==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==*/
//////////////////////////////////////////////////////////////////////////////
// //
// CCR Console Commands and Groups //
// These console commands are meant for use by customer care reps. //
// Eventually the functionality defined here will be accessed through a GUI//
// //
//////////////////////////////////////////////////////////////////////////////
//
// Only calls to the CCRMgr interface are allowed here
// See me if you need to include any other files...
//
#include "pfConsoleCmd.h"
#include "pfConsole.h"
#include "../pfCCR/plCCRMgr.h"
#include "../plNetClient/plNetClientMgr.h"
//// This is here so Microsoft VC won't decide to "optimize" this file out
// YOU ALSO NEED TO CALL THIS FXN
void pfConsoleCmdGroup::DummyCCR( void )
{
}
void PrintStringF(void pfun(const char *),const char * fmt, ...);
/////////////////////////////////////////////////////////////////
//
// Please see pfConsoleCommands.cpp for detailed instructions on
// how to add console commands.
//
/////////////////////////////////////////////////////////////////
#define PF_SANITY_CHECK( cond, msg ) { if( !( cond ) ) { PrintString( msg ); return; } }

View File

@ -752,7 +752,7 @@ public:
if(strncmp("SampleCmd",c->GetName(), 9) != 0)
{
fprintf(fFile, "<P><I>%s </I><BR>%s </P>\n",c->GetSignature(),
fprintf(fFile, "<p><em>%s </em><br />%s </p>\n",c->GetSignature(),
c->GetHelp());
}
}
@ -760,10 +760,11 @@ public:
{
// if(g->GetFirstCommand() != nil)
{
fprintf(fFile, "<P><B><H%s>Command %sGroup %s </B></H2></P>\n",
fprintf(fFile, "<p><strong><h%s>Command %sGroup %s </strong></h%s></p>\n",
(depth > 0) ? "3" : "2",
(depth > 0) ? "Sub" :"" ,
g->GetName());
g->GetName(),
(depth > 0) ? "3" : "2");
}
return true;
}
@ -781,7 +782,7 @@ public:
if(strncmp("SampleCmd",c->GetName(), 9) != 0)
{
fprintf(fFile, "<I>%s.%s </I> - %s <BR>\n",fGrpName,c->GetSignature(),
fprintf(fFile, "<em>%s.%s </em> - %s <br />\n",fGrpName,c->GetSignature(),
c->GetHelp());
}
}
@ -789,11 +790,14 @@ public:
{
// if(g->GetFirstCommand() != nil)
{
fprintf(fFile, "<BR>\n");
fprintf(fFile, "<br />\n");
if(depth <1)
strcpy(fGrpName, g->GetName());
else
{
pfConsoleCmdGroup *parentGrp;
parentGrp = g->GetParent();
strcpy(fGrpName, parentGrp->GetName());
strcat(fGrpName,".");
strcat(fGrpName,g->GetName());
}
@ -822,7 +826,7 @@ PF_CONSOLE_CMD( Console, CreateDocumentation, "string fileName",
}
fprintf(f, "<CENTER> <H2> Console Commands for Plasma 2.0 Client </H2> <I>Built %s on %s.</I></CENTER><BR>",
fprintf(f, "<h2 style=\"text-align: center;\"> Console Commands for Plasma 2.0 Client </h2> <em style=\"display: block; text-align: center;\">Built %s on %s.</em><br />",
pnBuildDates::fBuildTime, pnBuildDates::fBuildDate );
DocGenIterator iter(f);
@ -852,7 +856,7 @@ PF_CONSOLE_CMD( Console, CreateBriefDocumentation, "string fileName",
return;
}
fprintf(f, "<CENTER> <H3> Console Commands for Plasma 2.0 Client </H3> <I>Built %s on %s.</I></CENTER><BR>",
fprintf(f, "<h2 style=\"text-align: center;\"> Console Commands for Plasma 2.0 Client </h2> <em style=\"display: block; text-align: center;\">Built %s on %s.</em><br />",
pnBuildDates::fBuildTime, pnBuildDates::fBuildDate );
BriefDocGenIterator iter(f);
group = pfConsoleCmdGroup::GetBaseGroup();
@ -6997,38 +7001,6 @@ PF_CONSOLE_CMD( KI, // Group name
PF_CONSOLE_GROUP( Python ) // Defines a main command group
PF_CONSOLE_CMD( Python, // Group name
RunFile, // Function name
"string filename", // Params
"Run the specified Python file program" ) // Help string
{
// now evaluate this mess they made
PyObject* mymod = PythonInterface::FindModule("__main__");
// make sure the filename doesn't have the .py extension (import doesn't need it)
char importname[200];
int i;
for (i=0; i<199; i++ )
{
char ch = ((const char*)params[0])[i];
// if we are at the end of the string or at a dot, truncate here
if ( ch == '.' || ch == 0 )
break;
else
importname[i] = ((const char*)params[0])[i];
}
importname[i] = 0;
// create the line to execute the file
char runline[256];
sprintf(runline,"import %s", importname);
PythonInterface::RunString(runline,mymod);
std::string output;
// get the messages
PythonInterface::getOutputAndReset(&output);
PrintString(output.c_str());
}
#include "../pfPython/cyMisc.h"
PF_CONSOLE_CMD( Python, // Group name
@ -7070,16 +7042,18 @@ PF_CONSOLE_CMD( Python,
"string functions, ...", // Params
"Run a cheat command" )
{
const char* extraParms = "";
std::string extraParms;
if (numParams > 1)
extraParms = params[1];
// now evaluate this mess they made
PyObject* mymod = PythonInterface::FindModule("__main__");
{
extraParms = "(";
extraParms.append(params[1]);
extraParms.append(",)");
}
else
extraParms = "()";
PythonInterface::RunFunctionSafe("xCheat", params[0], extraParms.c_str());
// create the line to execute the file
char runline[256];
sprintf(runline,"import xCheat;xCheat.%s('%s')", (const char*)params[0],extraParms);
PythonInterface::RunString(runline,mymod);
std::string output;
// get the messages
PythonInterface::getOutputAndReset(&output);

View File

@ -68,10 +68,10 @@ public:
virtual ~pfGUIMultiLineEditProc() {}
// we've hit the end of the control list (by moving the cursor)
virtual OnEndOfControlList(Int32 cursorPos) {}
virtual void OnEndOfControlList(Int32 cursorPos) {}
// we've hit the beginning of the control ist (by moving the cursor)
virtual OnBeginningOfControlList(Int32 cursorPos) {}
virtual void OnBeginningOfControlList(Int32 cursorPos) {}
};
class pfGUIMultiLineEditCtrl : public pfGUIControlMod

View File

@ -150,7 +150,7 @@ void IBlueSpiral::OnOwnerChange (const Srv2Cli_Game_OwnerChange & msg) {
//============================================================================
void IBlueSpiral::RecvClothOrder (const Srv2Cli_BlueSpiral_ClothOrder & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
@ -159,7 +159,7 @@ void IBlueSpiral::RecvClothOrder (const Srv2Cli_BlueSpiral_ClothOrder & msg, voi
//============================================================================
void IBlueSpiral::RecvSuccessfulHit (const Srv2Cli_BlueSpiral_SuccessfulHit & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
@ -168,7 +168,7 @@ void IBlueSpiral::RecvSuccessfulHit (const Srv2Cli_BlueSpiral_SuccessfulHit & ms
//============================================================================
void IBlueSpiral::RecvGameWon (const Srv2Cli_BlueSpiral_GameWon & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
@ -177,7 +177,7 @@ void IBlueSpiral::RecvGameWon (const Srv2Cli_BlueSpiral_GameWon & msg, void * pa
//============================================================================
void IBlueSpiral::RecvGameOver (const Srv2Cli_BlueSpiral_GameOver & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
@ -186,7 +186,7 @@ void IBlueSpiral::RecvGameOver (const Srv2Cli_BlueSpiral_GameOver & msg, void *
//============================================================================
void IBlueSpiral::RecvGameStarted (const Srv2Cli_BlueSpiral_GameStarted & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);

View File

@ -151,7 +151,7 @@ void IClimbingWall::OnOwnerChange (const Srv2Cli_Game_OwnerChange & msg) {
//============================================================================
void IClimbingWall::RecvNumBlockersChanged (const Srv2Cli_ClimbingWall_NumBlockersChanged & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
@ -160,7 +160,7 @@ void IClimbingWall::RecvNumBlockersChanged (const Srv2Cli_ClimbingWall_NumBlocke
//============================================================================
void IClimbingWall::RecvReady (const Srv2Cli_ClimbingWall_Ready & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
@ -169,7 +169,7 @@ void IClimbingWall::RecvReady (const Srv2Cli_ClimbingWall_Ready & msg, void * pa
//============================================================================
void IClimbingWall::RecvBlockersChanged (const Srv2Cli_ClimbingWall_BlockersChanged & msg, void * param) {
ref (param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
@ -178,7 +178,7 @@ void IClimbingWall::RecvBlockersChanged (const Srv2Cli_ClimbingWall_BlockersChan
//============================================================================
void IClimbingWall::RecvPlayerEntered (const Srv2Cli_ClimbingWall_PlayerEntered & msg, void * param) {
ref (param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
@ -187,7 +187,7 @@ void IClimbingWall::RecvPlayerEntered (const Srv2Cli_ClimbingWall_PlayerEntered
//============================================================================
void IClimbingWall::RecvSuitMachineLocked (const Srv2Cli_ClimbingWall_SuitMachineLocked & msg, void * param) {
ref (param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
@ -196,7 +196,7 @@ void IClimbingWall::RecvSuitMachineLocked (const Srv2Cli_ClimbingWall_SuitMachin
//============================================================================
void IClimbingWall::RecvGameOver (const Srv2Cli_ClimbingWall_GameOver & msg, void * param) {
ref (param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);

View File

@ -151,7 +151,7 @@ void IHeek::OnOwnerChange (const Srv2Cli_Game_OwnerChange & msg) {
//============================================================================
void IHeek::RecvPlayGame (const Srv2Cli_Heek_PlayGame & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
gameCliMsg->Send(gameCli->GetReceiver());
@ -159,7 +159,7 @@ void IHeek::RecvPlayGame (const Srv2Cli_Heek_PlayGame & msg, void * param) {
//============================================================================
void IHeek::RecvGoodbye (const Srv2Cli_Heek_Goodbye & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
gameCliMsg->Send(gameCli->GetReceiver());
@ -167,7 +167,7 @@ void IHeek::RecvGoodbye (const Srv2Cli_Heek_Goodbye & msg, void * param) {
//============================================================================
void IHeek::RecvWelcome (const Srv2Cli_Heek_Welcome & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
gameCliMsg->Send(gameCli->GetReceiver());
@ -175,7 +175,7 @@ void IHeek::RecvWelcome (const Srv2Cli_Heek_Welcome & msg, void * param) {
//============================================================================
void IHeek::RecvDrop (const Srv2Cli_Heek_Drop & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
gameCliMsg->Send(gameCli->GetReceiver());
@ -183,7 +183,7 @@ void IHeek::RecvDrop (const Srv2Cli_Heek_Drop & msg, void * param) {
//============================================================================
void IHeek::RecvSetup (const Srv2Cli_Heek_Setup & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
gameCliMsg->Send(gameCli->GetReceiver());
@ -191,7 +191,7 @@ void IHeek::RecvSetup (const Srv2Cli_Heek_Setup & msg, void * param) {
//============================================================================
void IHeek::RecvLightState (const Srv2Cli_Heek_LightState & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
gameCliMsg->Send(gameCli->GetReceiver());
@ -199,7 +199,7 @@ void IHeek::RecvLightState (const Srv2Cli_Heek_LightState & msg, void * param) {
//============================================================================
void IHeek::RecvInterfaceState (const Srv2Cli_Heek_InterfaceState & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
gameCliMsg->Send(gameCli->GetReceiver());
@ -207,7 +207,7 @@ void IHeek::RecvInterfaceState (const Srv2Cli_Heek_InterfaceState & msg, void *
//============================================================================
void IHeek::RecvCountdownState (const Srv2Cli_Heek_CountdownState & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
gameCliMsg->Send(gameCli->GetReceiver());
@ -215,7 +215,7 @@ void IHeek::RecvCountdownState (const Srv2Cli_Heek_CountdownState & msg, void *
//============================================================================
void IHeek::RecvWinLose (const Srv2Cli_Heek_WinLose & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
gameCliMsg->Send(gameCli->GetReceiver());
@ -223,7 +223,7 @@ void IHeek::RecvWinLose (const Srv2Cli_Heek_WinLose & msg, void * param) {
//============================================================================
void IHeek::RecvGameWin (const Srv2Cli_Heek_GameWin & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
gameCliMsg->Send(gameCli->GetReceiver());
@ -231,7 +231,7 @@ void IHeek::RecvGameWin (const Srv2Cli_Heek_GameWin & msg, void * param) {
//============================================================================
void IHeek::RecvPointUpdate (const Srv2Cli_Heek_PointUpdate & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
gameCliMsg->Send(gameCli->GetReceiver());

View File

@ -175,7 +175,7 @@ void IMarker::RecvTeamAssigned (const Srv2Cli_Marker_TeamAssigned & msg, void *
//============================================================================
void IMarker::RecvGameType (const Srv2Cli_Marker_GameType & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
@ -184,7 +184,7 @@ void IMarker::RecvGameType (const Srv2Cli_Marker_GameType & msg, void * param) {
//============================================================================
void IMarker::RecvGameStarted (const Srv2Cli_Marker_GameStarted & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
@ -193,7 +193,7 @@ void IMarker::RecvGameStarted (const Srv2Cli_Marker_GameStarted & msg, void * pa
//============================================================================
void IMarker::RecvGamePaused (const Srv2Cli_Marker_GamePaused & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
@ -202,7 +202,7 @@ void IMarker::RecvGamePaused (const Srv2Cli_Marker_GamePaused & msg, void * para
//============================================================================
void IMarker::RecvGameReset (const Srv2Cli_Marker_GameReset & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
@ -211,7 +211,7 @@ void IMarker::RecvGameReset (const Srv2Cli_Marker_GameReset & msg, void * param)
//============================================================================
void IMarker::RecvGameOver (const Srv2Cli_Marker_GameOver & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
@ -220,7 +220,7 @@ void IMarker::RecvGameOver (const Srv2Cli_Marker_GameOver & msg, void * param) {
//============================================================================
void IMarker::RecvGameNameChanged (const Srv2Cli_Marker_GameNameChanged & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
@ -229,7 +229,7 @@ void IMarker::RecvGameNameChanged (const Srv2Cli_Marker_GameNameChanged & msg, v
//============================================================================
void IMarker::RecvTimeLimitChanged (const Srv2Cli_Marker_TimeLimitChanged & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
@ -238,7 +238,7 @@ void IMarker::RecvTimeLimitChanged (const Srv2Cli_Marker_TimeLimitChanged & msg,
//============================================================================
void IMarker::RecvGameDeleted (const Srv2Cli_Marker_GameDeleted & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
@ -250,7 +250,7 @@ void IMarker::RecvGameDeleted (const Srv2Cli_Marker_GameDeleted & msg, void * pa
//============================================================================
void IMarker::RecvMarkerAdded (const Srv2Cli_Marker_MarkerAdded & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
@ -259,7 +259,7 @@ void IMarker::RecvMarkerAdded (const Srv2Cli_Marker_MarkerAdded & msg, void * pa
//============================================================================
void IMarker::RecvMarkerDeleted (const Srv2Cli_Marker_MarkerDeleted & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
@ -268,7 +268,7 @@ void IMarker::RecvMarkerDeleted (const Srv2Cli_Marker_MarkerDeleted & msg, void
//============================================================================
void IMarker::RecvMarkerNameChanged (const Srv2Cli_Marker_MarkerNameChanged & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
@ -277,7 +277,7 @@ void IMarker::RecvMarkerNameChanged (const Srv2Cli_Marker_MarkerNameChanged & ms
//============================================================================
void IMarker::RecvMarkerCaptured (const Srv2Cli_Marker_MarkerCaptured & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);

View File

@ -153,7 +153,7 @@ void ITicTacToe::OnOwnerChange (const Srv2Cli_Game_OwnerChange & msg) {
//============================================================================
void ITicTacToe::RecvGameStarted (const Srv2Cli_TTT_GameStarted & msg, void * param) {
ref(param);
REF(param);
// player that goes first is shown as X's.
if (msg.yourTurn) {
@ -172,7 +172,7 @@ void ITicTacToe::RecvGameStarted (const Srv2Cli_TTT_GameStarted & msg, void * pa
//============================================================================
void ITicTacToe::RecvGameOver (const Srv2Cli_TTT_GameOver & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
@ -183,7 +183,7 @@ void ITicTacToe::RecvGameOver (const Srv2Cli_TTT_GameOver & msg, void * param) {
//============================================================================
void ITicTacToe::RecvMoveMade (const Srv2Cli_TTT_MoveMade & msg, void * param) {
ref(param);
REF(param);
// Update the board with the appropriate piece
if (msg.playerId == NetCommGetPlayer()->playerInt)

View File

@ -150,7 +150,7 @@ void IVarSync::OnOwnerChange (const Srv2Cli_Game_OwnerChange & msg) {
//============================================================================
void IVarSync::RecvStringVarChanged (const Srv2Cli_VarSync_StringVarChanged & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
@ -159,7 +159,7 @@ void IVarSync::RecvStringVarChanged (const Srv2Cli_VarSync_StringVarChanged & ms
//============================================================================
void IVarSync::RecvNumericVarChanged (const Srv2Cli_VarSync_NumericVarChanged & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
@ -168,7 +168,7 @@ void IVarSync::RecvNumericVarChanged (const Srv2Cli_VarSync_NumericVarChanged &
//============================================================================
void IVarSync::RecvAllVarsSent (const Srv2Cli_VarSync_AllVarsSent & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
@ -177,7 +177,7 @@ void IVarSync::RecvAllVarsSent (const Srv2Cli_VarSync_AllVarsSent & msg, void *
//============================================================================
void IVarSync::RecvStringVarCreated (const Srv2Cli_VarSync_StringVarCreated & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);
@ -186,7 +186,7 @@ void IVarSync::RecvStringVarCreated (const Srv2Cli_VarSync_StringVarCreated & ms
//============================================================================
void IVarSync::RecvNumericVarCreated (const Srv2Cli_VarSync_NumericVarCreated & msg, void * param) {
ref(param);
REF(param);
pfGameCliMsg * gameCliMsg = NEWZERO(pfGameCliMsg);
gameCliMsg->Set(gameCli, msg);

View File

@ -64,7 +64,7 @@ struct Factory : THashKeyVal<Uuid> {
const GameTypeReg & reg;
Factory (const GameTypeReg & reg);
operator= (const Factory &); // not impl
Factory& operator= (const Factory &); // not impl
};
//============================================================================
@ -205,7 +205,7 @@ void IGameMgr::RecvGameInstance (const Srv2Cli_GameMgr_GameInstance & msg, void
//============================================================================
void IGameMgr::RecvInviteReceived (const Srv2Cli_GameMgr_InviteReceived & msg, void * param) {
ref(param);
REF(param);
pfGameMgrMsg * gameMgrMsg = NEWZERO(pfGameMgrMsg);
gameMgrMsg->Set(msg);
@ -216,7 +216,7 @@ void IGameMgr::RecvInviteReceived (const Srv2Cli_GameMgr_InviteReceived & msg, v
//============================================================================
void IGameMgr::RecvInviteRevoked (const Srv2Cli_GameMgr_InviteRevoked & msg, void * param) {
ref(param);
REF(param);
pfGameMgrMsg * gameMgrMsg = NEWZERO(pfGameMgrMsg);
gameMgrMsg->Set(msg);
@ -587,7 +587,7 @@ void IGameCli::Recv (GameMsgHeader * msg, void * param) {
//============================================================================
void IGameCli::RecvPlayerJoined (const Srv2Cli_Game_PlayerJoined & msg, void * param) {
ref(param);
REF(param);
++playerCount;
gameCli->OnPlayerJoined(msg);
@ -595,7 +595,7 @@ void IGameCli::RecvPlayerJoined (const Srv2Cli_Game_PlayerJoined & msg, void * p
//============================================================================
void IGameCli::RecvPlayerLeft (const Srv2Cli_Game_PlayerLeft & msg, void * param) {
ref(param);
REF(param);
--playerCount;
gameCli->OnPlayerLeft(msg);
@ -603,14 +603,14 @@ void IGameCli::RecvPlayerLeft (const Srv2Cli_Game_PlayerLeft & msg, void * param
//============================================================================
void IGameCli::RecvInviteFailed (const Srv2Cli_Game_InviteFailed & msg, void * param) {
ref(param);
REF(param);
gameCli->OnInviteFailed(msg);
}
//============================================================================
void IGameCli::RecvOwnerChange (const Srv2Cli_Game_OwnerChange & msg, void * param) {
ref(param);
REF(param);
gameCli->OnOwnerChange(msg);
}

View File

@ -78,7 +78,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "../plSurface/plLayer.h"
#include "../plSurface/hsGMaterial.h"
#include "../plAgeLoader/plAgeLoader.h"
#ifdef USE_BINK_SDK
#include "../pfSurface/plLayerBink.h"
#endif
// So we can do image searches in our local age
#include "../plNetClient/plNetClientMgr.h"
@ -438,8 +440,8 @@ public:
pfBookMultiLineEditProc(pfBookData *owner) { bookData = owner; }
virtual ~pfBookMultiLineEditProc() {}
virtual OnEndOfControlList(Int32 cursorPos) { bookData->HitEndOfControlList(cursorPos); }
virtual OnBeginningOfControlList(Int32 cursorPos) { bookData->HitBeginningOfControlList(cursorPos); }
virtual void OnEndOfControlList(Int32 cursorPos) { bookData->HitEndOfControlList(cursorPos); }
virtual void OnBeginningOfControlList(Int32 cursorPos) { bookData->HitBeginningOfControlList(cursorPos); }
};
//// Book data class /////////////////////////////////////////////////////////
@ -1000,8 +1002,10 @@ void pfBookData::IFinishTriggeredFlip(hsBool wasBackwards)
if (fCurrBook)
{
fCurrBook->IRenderPage(fCurrBook->fCurrentPage, pfJournalDlgProc::kTagLeftDTMap);
#ifdef USE_BINK_SDK
// move the videos over
fCurrBook->IMoveMovies(PageMaterial(kTurnFrontPage),PageMaterial(kRightPage));
#endif // USE_BINK_SDK
}
}
else
@ -1022,8 +1026,10 @@ void pfBookData::IFinishTriggeredFlip(hsBool wasBackwards)
if (fCurrBook)
{
fCurrBook->IRenderPage(fCurrBook->fCurrentPage + 1, pfJournalDlgProc::kTagRightDTMap);
#ifdef USE_BINK_SDK
// move the videos over
fCurrBook->IMoveMovies(PageMaterial(kTurnBackPage),PageMaterial(kLeftPage));
#endif // USE_BINK_SDK
}
}
@ -1324,6 +1330,7 @@ void pfJournalBook::Show( hsBool startOpened /*= false */)
if (decal != nil)
layers.Append(IMakeDecalLayer(fCoverDecals[i],decal,mip));
}
#ifdef USE_BINK_SDK
else
{
// it's a cover movie, not a decal, so we make a layer, thinking it's at 0,0 and a left map (which gives us the results we want)
@ -1335,6 +1342,7 @@ void pfJournalBook::Show( hsBool startOpened /*= false */)
layers.Append(plLayerInterface::ConvertNoRef(movieLayer));
fVisibleLinks.Reset(); // remove any links that the make movie layer might have added, since a cover movie can't link
}
#endif
}
ISetDecalLayers(cover,layers);
}
@ -1394,6 +1402,7 @@ void pfJournalBook::Hide( void )
// purge the dynaTextMaps, we're done with them for now
IPurgeDynaTextMaps();
// nuke the movies so they don't stay in memory (they're big!)
#ifdef USE_BINK_SDK
int i;
for( i = 0; i < fLoadedMovies.GetCount(); i++ )
{
@ -1402,6 +1411,7 @@ void pfJournalBook::Hide( void )
delete fLoadedMovies[ i ];
}
fLoadedMovies.Reset();
#endif // USE_BINK_SDK
}
}
@ -1548,8 +1558,10 @@ void pfJournalBook::NextPage( void )
if( turnFront->GetDeviceRef() != nil )
turnFront->GetDeviceRef()->SetDirty( true );
}
#ifdef USE_BINK_SDK
// copy the videos over
IMoveMovies( fBookGUIs[fCurBookGUI]->PageMaterial(pfBookData::kRightPage), fBookGUIs[fCurBookGUI]->PageMaterial(pfBookData::kTurnFrontPage) );
#endif // USE_BINK_SDK
IRenderPage( fCurrentPage, pfJournalDlgProc::kTagTurnBackDTMap );
// This will fire a callback when it's done that'll let us continue the setup
@ -1616,8 +1628,10 @@ void pfJournalBook::PreviousPage( void )
if( turnBack->GetDeviceRef() != nil )
turnBack->GetDeviceRef()->SetDirty( true );
}
#ifdef USE_BINK_SDK
// copy the videos over
IMoveMovies( fBookGUIs[fCurBookGUI]->PageMaterial(pfBookData::kLeftPage), fBookGUIs[fCurBookGUI]->PageMaterial(pfBookData::kTurnBackPage) );
#endif // USE_BINK_SDK
IRenderPage( fCurrentPage + 1, pfJournalDlgProc::kTagTurnFrontDTMap );
// This will fire a callback when it's done that'll let us continue the setup
@ -2475,6 +2489,7 @@ void pfJournalBook::IFreeSource( void )
delete fCoverDecals[ i ];
fCoverDecals.Reset();
#ifdef USE_BINK_SDK
for( i = 0; i < fLoadedMovies.GetCount(); i++ )
{
plLayerBink *movie = fLoadedMovies[ i ]->movieLayer;
@ -2482,6 +2497,7 @@ void pfJournalBook::IFreeSource( void )
delete fLoadedMovies[ i ];
}
fLoadedMovies.Reset();
#endif // USE_BINK_SDK
}
//// IGetMipmapKey ///////////////////////////////////////////////////////////
@ -2584,6 +2600,7 @@ void pfJournalBook::IRenderPage( UInt32 page, UInt32 whichDTMap, hsBool suppress
else if (whichDTMap == pfJournalDlgProc::kTagTurnBackDTMap)
material = fBookGUIs[fCurBookGUI]->PageMaterial(pfBookData::kTurnBackPage);
#ifdef USE_BINK_SDK
if (material)
{
// clear any exiting layers (movies) from the material
@ -2599,6 +2616,7 @@ void pfJournalBook::IRenderPage( UInt32 page, UInt32 whichDTMap, hsBool suppress
}
}
}
#endif // USE_BINK_SDK
hsAssert(page < fPageStarts.GetCount() || page > fLastPage, "UnInitialized page start!");
if( page <= fLastPage
@ -2786,6 +2804,7 @@ void pfJournalBook::IRenderPage( UInt32 page, UInt32 whichDTMap, hsBool suppress
break;
case pfEsHTMLChunk::kMovie:
#ifdef USE_BINK_SDK
movieAlreadyLoaded = (IMovieAlreadyLoaded(chunk) != nil); // have we already cached it?
plLayerBink *movieLayer = IMakeMovieLayer(chunk, x, y, (plMipmap*)dtMap, whichDTMap, suppressRendering);
if (movieLayer)
@ -2826,6 +2845,7 @@ void pfJournalBook::IRenderPage( UInt32 page, UInt32 whichDTMap, hsBool suppress
if (material && !suppressRendering)
material->AddLayerViaNotify(movieLayer);
}
#endif // USE_BINK_SDK
break;
}
}
@ -2850,6 +2870,7 @@ void pfJournalBook::IRenderPage( UInt32 page, UInt32 whichDTMap, hsBool suppress
//// IMoveMovies /////////////////////////////////////////////////////////////
#ifdef USE_BINK_SDK
void pfJournalBook::IMoveMovies( hsGMaterial *source, hsGMaterial *dest )
{
hsTArray<plLayerBink*> moviesOnPage;
@ -2886,6 +2907,7 @@ void pfJournalBook::IMoveMovies( hsGMaterial *source, hsGMaterial *dest )
}
}
}
#endif // USE_BINK_SDK
//// IDrawMipmap /////////////////////////////////////////////////////////////
@ -2983,6 +3005,7 @@ void pfJournalBook::IDrawMipmap( pfEsHTMLChunk *chunk, UInt16 x, UInt16 y, plMip
delete copy;
}
#ifdef USE_BINK_SDK
pfJournalBook::loadedMovie *pfJournalBook::IMovieAlreadyLoaded(pfEsHTMLChunk *chunk)
{
int i;
@ -2993,15 +3016,19 @@ pfJournalBook::loadedMovie *pfJournalBook::IMovieAlreadyLoaded(pfEsHTMLChunk *ch
}
return nil;
}
#endif // USE_BINK_SDK
plKey pfJournalBook::GetMovie(UInt8 index)
{
#ifdef USE_BINK_SDK
loadedMovie *movie = IGetMovieByIndex(index);
if (movie)
return movie->movieLayer->GetKey();
#endif // USE_BINK_SDK
return plKey(nil);
}
#ifdef USE_BINK_SDK
pfJournalBook::loadedMovie *pfJournalBook::IGetMovieByIndex(UInt8 index)
{
int i;
@ -3012,7 +3039,9 @@ pfJournalBook::loadedMovie *pfJournalBook::IGetMovieByIndex(UInt8 index)
}
return nil;
}
#endif // USE_BINK_SDK
#ifdef USE_BINK_SDK
plLayerBink *pfJournalBook::IMakeMovieLayer(pfEsHTMLChunk *chunk, UInt16 x, UInt16 y, plMipmap *baseMipmap, UInt32 whichDTMap, hsBool dontRender)
{
// see if it's already loaded
@ -3175,6 +3204,7 @@ plLayerBink *pfJournalBook::IMakeMovieLayer(pfEsHTMLChunk *chunk, UInt16 x, UInt
return movieLayer;
}
#endif // USE_BINK_SDK
plLayerInterface *pfJournalBook::IMakeBaseLayer(plMipmap *image)
{

View File

@ -528,8 +528,10 @@ class pfJournalBook : public hsKeyedObject
// Renders one (1) page into the given DTMap
void IRenderPage( UInt32 page, UInt32 whichDTMap, hsBool suppressRendering = false );
#ifdef USE_BINK_SDK
// moves the movie layers from one material onto another
void IMoveMovies( hsGMaterial *source, hsGMaterial *dest);
#endif
// Starting at the given chunk, works backwards to determine the full set of current
// font properties at that point, or assigns defaults if none were specified
@ -570,9 +572,11 @@ class pfJournalBook : public hsKeyedObject
void IDrawMipmap( pfEsHTMLChunk *chunk, UInt16 x, UInt16 y, plMipmap *mip, plDynamicTextMap *dtMap, UInt32 whichDTMap, hsBool dontRender );
// Movie functions
#ifdef USE_BINK_SDK
loadedMovie *IMovieAlreadyLoaded(pfEsHTMLChunk *chunk);
loadedMovie *IGetMovieByIndex(UInt8 index);
plLayerBink *IMakeMovieLayer(pfEsHTMLChunk *chunk, UInt16 x, UInt16 y, plMipmap *baseMipmap, UInt32 whichDTMap, hsBool dontRender);
#endif
// Cover functions
plLayerInterface *IMakeBaseLayer(plMipmap *image);

View File

@ -1718,6 +1718,20 @@ void PythonInterface::WriteToStdErr(const char* text)
}
}
PyObject* PythonInterface::ImportModule(const char* module)
{
PyObject* result = nil;
PyObject* name = PyString_FromString(module);
if (name != nil)
{
result = PyImport_Import(name);
Py_DECREF(name);
}
return result;
}
/////////////////////////////////////////////////////////////////////////////
//
// Function : FindModule
@ -2061,6 +2075,78 @@ hsBool PythonInterface::RunPYC(PyObject* code, PyObject* module)
return true;
}
/////////////////////////////////////////////////////////////////////////////
//
// Function : RunFunction
// PARAMETERS : module - module name to run 'name' in
// : name - name of function
// : args - tuple with arguments
//
//
PyObject* PythonInterface::RunFunction(PyObject* module, const char* name, PyObject* args)
{
if (module == NULL)
return NULL;
PyObject* function = PyObject_GetAttrString(module, const_cast<char*>(name));
PyObject* result = NULL;
if (function != nil)
{
result = PyObject_Call(function, args, NULL);
Py_DECREF(function);
}
return result;
}
PyObject* PythonInterface::ParseArgs(const char* args)
{
PyObject* result = NULL;
PyObject* scope = PyDict_New();
if (scope)
{
//- Py_eval_input makes this function accept only single expresion (not statement)
//- When using empty scope, functions and classes like 'file' or '__import__' are not visible
result = PyRun_String(args, Py_eval_input, scope, NULL);
Py_DECREF(scope);
}
return result;
}
bool PythonInterface::RunFunctionSafe(const char* module, const char* function, const char* args)
{
PyObject* moduleObj = ImportModule(module);
bool result = false;
if (moduleObj)
{
PyObject* argsObj = ParseArgs(args);
if (argsObj)
{
PyObject* callResult = RunFunction(moduleObj, function, argsObj);
if (callResult)
{
result = true;
Py_DECREF(callResult);
}
Py_DECREF(argsObj);
}
Py_DECREF(moduleObj);
}
if (!result)
{
PyErr_Print();
if (Py_FlushLine())
PyErr_Clear();
}
return result;
}
/////////////////////////////////////////////////////////////////////////////
//
// Function : GetpyKeyFromPython
@ -2073,4 +2159,4 @@ pyKey* PythonInterface::GetpyKeyFromPython(PyObject* pkey)
if (!pyKey::Check(pkey))
return nil;
return pyKey::ConvertFrom(pkey);
}
}

View File

@ -138,6 +138,8 @@ public:
// Writes 'text' to stderr specified in the python interface
static void WriteToStdErr(const char* text);
static PyObject* ImportModule(const char* module);
// Find module. If it doesn't exist then don't create, return nil.
static PyObject* FindModule(char* module);
@ -219,6 +221,12 @@ public:
//
static hsBool RunPYC(PyObject* code, PyObject* module);
static PyObject* RunFunction(PyObject* module, const char* name, PyObject* args);
static PyObject* ParseArgs(const char* args);
static bool RunFunctionSafe(const char* module, const char* function, const char* args);
/////////////////////////////////////////////////////////////////////////////
//
// Function : GetpyKeyFromPython

View File

@ -1,49 +0,0 @@
/*==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==*/
//////////////////////////////////////////////////////////////////////
//
// pyCCRMgr - a wrapper class to provide interface to the pfCCR stuff
//
//////////////////////////////////////////////////////////////////////
#include "../pfCCR/plCCRMgr.h"

View File

@ -1,56 +0,0 @@
/*==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==*/
#ifndef pyCCRMgr_h_inc
#define pyCCRMgr_h_inc
//////////////////////////////////////////////////////////////////////
//
// pyCCRMgr - a wrapper class to provide interface to the pfCCR stuff
//
//////////////////////////////////////////////////////////////////////
#include "hsTypes.h"
#include "hsStlUtils.h"
#include "../pfCCR/plCCRMgr.h"
#endif // pyCCRMgr_h_inc

View File

@ -1,45 +0,0 @@
/*==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==*/
#include "pyCCRMgr.h"
#include "pyAgeLinkStruct.h"
#include <python.h>

View File

@ -1,44 +0,0 @@
/*==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==*/
#include "pyCCRMgr.h"
#include <python.h>

View File

@ -176,6 +176,13 @@ void pyImage::SaveAsJPEG(const wchar* fileName, UInt8 quality)
plJPEG::Instance().WriteToFile( fileName, this->GetImage() );
}
#include "../plGImage/plPNG.h"
void pyImage::SaveAsPNG(const wchar* fileName)
{
plPNG::Instance().WriteToFile( fileName, this->GetImage() );
}
#include "hsResMgr.h"
#include "../pnKeyedObject/plUoid.h"
PyObject* pyImage::LoadJPEGFromDisk(const wchar* filename, UInt16 width, UInt16 height)

View File

@ -166,6 +166,7 @@ public:
UInt32 GetWidth(); // returns the width of the image
UInt32 GetHeight(); // returns the height of the image
void SaveAsJPEG(const wchar* fileName, UInt8 quality = 75);
void SaveAsPNG(const wchar* fileName);
static PyObject* LoadJPEGFromDisk(const wchar* filename, UInt16 width, UInt16 height); // returns pyImage
#endif
};

View File

@ -174,6 +174,41 @@ PYTHON_METHOD_DEFINITION(ptImage, saveAsJPEG, args)
PYTHON_RETURN_ERROR;
}
}
PYTHON_METHOD_DEFINITION(ptImage, saveAsPNG, args)
{
PyObject* filenameObj;
if (!PyArg_ParseTuple(args, "O", &filenameObj))
{
PyErr_SetString(PyExc_TypeError, "saveAsPNG expects a string");
PYTHON_RETURN_ERROR;
}
if (PyUnicode_Check(filenameObj))
{
int strLen = PyUnicode_GetSize(filenameObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)filenameObj, text, strLen);
text[strLen] = L'\0';
self->fThis->SaveAsPNG(text);
delete [] text;
PYTHON_RETURN_NONE;
}
else if (PyString_Check(filenameObj))
{
// we'll allow this, just in case something goes weird
char* text = PyString_AsString(filenameObj);
wchar_t* wText = hsStringToWString(text);
self->fThis->SaveAsPNG(wText);
delete [] wText;
PYTHON_RETURN_NONE;
}
else
{
PyErr_SetString(PyExc_TypeError, "saveAsPNG expects a string");
PYTHON_RETURN_ERROR;
}
}
#endif // BUILDING_PYPLASMA
PYTHON_START_METHODS_TABLE(ptImage)
@ -183,6 +218,7 @@ PYTHON_START_METHODS_TABLE(ptImage)
PYTHON_METHOD_NOARGS(ptImage, getWidth, "Returns the width of the image"),
PYTHON_METHOD_NOARGS(ptImage, getHeight, "Returns the height of the image"),
PYTHON_METHOD(ptImage, saveAsJPEG, "Params: filename,quality=75\nSaves this image to disk as a JPEG file"),
PYTHON_METHOD(ptImage, saveAsPNG, "Params: filename\nSaves this image to disk as a PNG file"),
#endif
PYTHON_END_METHODS_TABLE;

View File

@ -545,7 +545,7 @@ hsBool pySceneObject::IsAvatar()
return false;
}
#include "../plAvatar/plAvCallbackAction.h"
#include "../plAvatar/plPhysicalControllerCore.h"
PyObject* pySceneObject::GetAvatarVelocity()
{

View File

@ -171,6 +171,8 @@ PyObject* pyVaultImageNode::Image_GetImage( void )
else
fMipmapKey->RefObject();
}
else
PYTHON_RETURN_NONE;
}
return pyImage::New(fMipmap);

View File

@ -49,9 +49,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
REGISTER_NONCREATABLE( plLayerMovie );
#ifdef USE_BINK_SDK
#include "plLayerBink.h"
REGISTER_CREATABLE( plLayerBink );
#endif
#include "plLayerAVI.h"