2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-13 18:17:49 -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,84 @@
/*==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==*/
//////////////////////////////////////////////////////////////////////////////
// //
// pfBackdoorMsg Header //
// //
//////////////////////////////////////////////////////////////////////////////
#ifndef _pfBackdoorMsg_h
#define _pfBackdoorMsg_h
#include "hsTypes.h"
#include "hsStream.h"
#include "../pnMessage/plMessage.h"
class pfBackdoorMsg : public plMessage
{
protected:
char *fTarget;
char *fString;
public:
pfBackdoorMsg() : plMessage( nil, nil, nil ),fTarget(nil),fString(nil) {}
pfBackdoorMsg( const char* target, const char* string) : plMessage( nil, nil, nil )
{
// across the net and just to those listening
SetBCastFlag( plMessage::kNetPropagate );
SetBCastFlag( plMessage::kBCastByExactType );
fTarget = hsStrcpy( target );
fString = hsStrcpy( string );
}
~pfBackdoorMsg()
{
delete [] fTarget;
delete [] fString;
}
CLASSNAME_REGISTER( pfBackdoorMsg );
GETINTERFACE_ANY( pfBackdoorMsg, plMessage );
virtual void Read(hsStream* s, hsResMgr* mgr)
{
plMessage::IMsgRead( s, mgr );
fTarget = s->ReadSafeString();
fString = s->ReadSafeString();
}
virtual void Write(hsStream* s, hsResMgr* mgr)
{
plMessage::IMsgWrite( s, mgr );
s->WriteSafeString( fTarget );
s->WriteSafeString( fString );
}
const char *GetTarget( void ) { return fTarget; }
const char *GetString( void ) { return fString; }
};
#endif // _pfBackdoorMsg_h

View File

@ -0,0 +1,126 @@
/*==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==*/
#ifndef _pfGUINotifyMsg_h_
#define _pfGUINotifyMsg_h_
#include "../pnMessage/plMessage.h"
#include "hsResMgr.h"
#include "../pnModifier/plSingleModifier.h"
#include "hsUtils.h"
/////////////////////////////////////////////////////////////////////////////
//
// MESSAGE : plGUINotifyMsg
// PARAMETERS : none
//
// PURPOSE : This is the message that notifies someone (either a responder or activator)
// : that some event or transition of state has happened on a GUI control
//
//
class pfGUINotifyMsg : public plMessage
{
protected:
plKey fControlKey; // who start this mess
UInt32 fEvent; // what was the event that happened
public:
pfGUINotifyMsg() : plMessage() {}
pfGUINotifyMsg(const plKey &s,
const plKey &r,
const double* t) : plMessage(s, r, t) {}
~pfGUINotifyMsg() {}
CLASSNAME_REGISTER( pfGUINotifyMsg );
GETINTERFACE_ANY( pfGUINotifyMsg, plMessage );
enum GUIEventType
{
kShowHide = 1, // show or hide change
kAction, // button clicked, ListBox click on item, EditBox hit enter
kValueChanged, // value changed in control
kDialogLoaded, // the dialog is now loaded and ready for action
kFocusChange, // when one of its controls loses focus to another
kExitMode, // GUI Exit Mode key was pressed
kInterestingEvent, // GUI interesting-ness has changed
kEndEventList
};
/////////////////
// Currently, the following is the only event types that get produced:
//
// kDialog
// kShowHide - when the dialog is shown or hidden
// kButton
// kAction - when the button clicked (should be on mouse button up)
// kListBox
// kAction - single click on item(s)
// kEditBox
// kAction - enter key hit
// kUpDownPair
// kValueChanged - the value of the pair has been changed
// kKnob
// kValueChanged - the value of the knob has been changed
// kCheckBox
// kValueChanged - the checkbox state has been changed
// kRadioGroup
// kValueChanged - the radio group button has been changed
//
// Control types that don't create events
//
// kDraggable
// kTextBox
// kDragBar
void SetEvent( plKey &key, UInt32 event)
{
fControlKey = key;
fEvent = event;
}
plKey GetControlKey() { return fControlKey; }
UInt32 GetEvent() { return fEvent; }
// IO
void Read(hsStream* stream, hsResMgr* mgr)
{
plMessage::IMsgRead(stream, mgr);
fControlKey = mgr->ReadKey(stream);
fEvent = stream->ReadSwap32();
}
void Write(hsStream* stream, hsResMgr* mgr)
{
plMessage::IMsgWrite(stream, mgr);
mgr->WriteKey(stream, fControlKey);
stream->WriteSwap32(fEvent);
}
};
#endif // _pfGUINotifyMsg_h_

View File

@ -0,0 +1,87 @@
/*==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==*/
//////////////////////////////////////////////////////////////////////////////
// //
// pfGameGUIMsg Header //
// //
//////////////////////////////////////////////////////////////////////////////
#ifndef _pfGameGUIMsg_h
#define _pfGameGUIMsg_h
#include "hsTypes.h"
#include "hsStream.h"
#include "../pnMessage/plMessage.h"
class pfGameGUIMsg : public plMessage
{
protected:
UInt8 fCommand;
char fString[ 128 ];
char *fAge;
public:
enum
{
kShowDialog,
kHideDialog,
kLoadDialog
};
pfGameGUIMsg() : plMessage( nil, nil, nil ) { SetBCastFlag( kBCastByExactType ); fAge = nil; }
pfGameGUIMsg( plKey &receiver, UInt8 command ) : plMessage( nil, nil, nil ) { AddReceiver( receiver ); fCommand = command; fAge = nil; }
~pfGameGUIMsg() { delete [] fAge; }
CLASSNAME_REGISTER( pfGameGUIMsg );
GETINTERFACE_ANY( pfGameGUIMsg, plMessage );
virtual void Read(hsStream* s, hsResMgr* mgr)
{
plMessage::IMsgRead( s, mgr );
s->ReadSwap( &fCommand );
s->Read( sizeof( fString ), fString );
fAge = s->ReadSafeString();
}
virtual void Write(hsStream* s, hsResMgr* mgr)
{
plMessage::IMsgWrite( s, mgr );
s->WriteSwap( fCommand );
s->Write( sizeof( fString ), fString );
s->WriteSafeString( fAge );
}
UInt8 GetCommand( void ) { return fCommand; }
void SetString( const char *str ) { hsStrncpy( fString, str, sizeof( fString ) - 1 ); }
const char *GetString( void ) { return fString; }
void SetAge( const char *str ) { delete [] fAge; if( str == nil ) fAge = nil; else fAge = hsStrcpy( str ); }
const char *GetAge( void ) { return fAge; }
};
#endif // _pfGameGUIMsg_h

View File

@ -0,0 +1,50 @@
/*==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==*/
//////////////////////////////////////////////////////////////////////////////
// //
// pfKIMsg Header //
// //
//////////////////////////////////////////////////////////////////////////////
#include "../pfMessage/pfKIMsg.h"
const char* pfKIMsg::kChronicleKILevel = "PlayerKILevel";
void pfKIMsg::SetString( const char *str )
{
wchar_t *temp = hsStringToWString( str );
fString = temp;
delete [] temp;
}
std::string pfKIMsg::GetString( void )
{
char *temp = hsWStringToString( fString.c_str() );
std::string retVal = temp;
delete [] temp;
return retVal;
}

View File

@ -0,0 +1,227 @@
/*==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==*/
//////////////////////////////////////////////////////////////////////////////
// //
// pfKIMsg Header //
// //
//////////////////////////////////////////////////////////////////////////////
#ifndef _pfKIMsg_h
#define _pfKIMsg_h
#include "hsTypes.h"
#include "hsStlUtils.h"
#include "hsStream.h"
#include "../pnMessage/plMessage.h"
class pfKIMsg : public plMessage
{
#ifndef KI_CONSTANTS_ONLY
protected:
UInt8 fCommand;
UInt32 fFlags;
// for the hack chat message thingy
char *fUser;
UInt32 fPlayerID;
std::wstring fString;
// for the SetChatFadeDelay
hsScalar fDelay;
// other values
Int32 fValue;
void IInit()
{
fCommand = kNoCommand;
fString = L"";
fUser = nil;
fPlayerID = 0;
fFlags = 0;
fDelay = 0.0;
fValue = 0;
}
#endif // def KI_CONSTANTS_ONLY
public:
enum
{
kHACKChatMsg, // send chat message via pfKIMsg
kEnterChatMode, // toggle chat mode
kSetChatFadeDelay, // set the chat delay
kSetTextChatAdminMode, // set the chat admin mode... not used (see CCR)
kDisableKIandBB, // disable KI and blackbar (for things like AvaCusta)
kEnableKIandBB, // re-enable the KI and blackbar
kYesNoDialog, // display a Yes/No dialog
kAddPlayerDevice, // add a device player list, such as imager
kRemovePlayerDevice, // remove a device from player list
kUpgradeKILevel, // upgrade the KI to higher level
kDowngradeKILevel, // downgrade KI to next lower level
kRateIt, // display the "RateIt"(tm) dialog
kSetPrivateChatChannel, // set the private chat channel (for private rooms)
kUnsetPrivateChatChannel, // unset private chat channel
kStartBookAlert, // blink the book image on the blackbar
kMiniBigKIToggle, // shortcut to toggling the miniKI/bigKI
kKIPutAway, // shortcut to hiding all of the KI
kChatAreaPageUp, // shortcut to paging up the chat area
kChatAreaPageDown, // shortcut to paging down the chat area
kChatAreaGoToBegin, // shortcut to going to the beginning of the chat area
kChatAreaGoToEnd, // shortcut to going to the end of the chat area
kKITakePicture, // shortcut to taking a picture in the KI
kKICreateJournalNote, // shortcut to creating a journal note in the KI
kKIToggleFade, // shortcut to toggle fade mode
kKIToggleFadeEnable, // shortcut to toggling fade enabled
kKIChatStatusMsg, // display status message in chat window
kKILocalChatStatusMsg, // display status message in chat window
kKIUpSizeFont, // bump up the size of the chat area font
kKIDownSizeFont, // down size the font of the chat area
kKIOpenYeehsaBook, // open the playerbook if not already open
kKIOpenKI, // open up in degrees the KI
kKIShowCCRHelp, // show the CCR help dialog
kKICreateMarker, // create a marker
kKICreateMarkerFolder, // create a marker folder in the current Age's journal folder
kKILocalChatErrorMsg, // display error message in chat window
kKIPhasedAllOn, // turn on all the phased KI functionality
kKIPhasedAllOff, // turn off all the phased KI functionality
kKIOKDialog, // display an OK dialog box (localized)
kDisableYeeshaBook, // don't allow linking with the Yeesha book (gameplay)
kEnableYeeshaBook, // re-allow linking with the Yeesha book
kQuitDialog, // put up quit dialog
kTempDisableKIandBB, // temp disable KI and blackbar (done by av system)
kTempEnableKIandBB, // temp re-enable the KI and blackbar (done by av system)
kDisableEntireYeeshaBook, // disable the entire Yeeshabook, not for gameplay, but prevent linking
kEnableEntireYeeshaBook,
kKIOKDialogNoQuit, // display OK dialog in the KI without quiting afterwards
kGZUpdated, // the GZ game was updated
kGZInRange, // a GZ marker is in range
kGZOutRange, // GZ markers are out of range
kUpgradeKIMarkerLevel, // upgrade the KI Marker level (current 0 and 1)
kKIShowMiniKI, // force the miniKI up
kGZFlashUpdate, // flash an update without saving (for animation of GZFill in)
kStartJournalAlert, // blink the journal image on the blackbar
kAddJournalBook, // add the journal to the blackbar
kRemoveJournalBook, // remove the journal from the blackbar
kKIOpenJournalBook, // open the journal book
kMGStartCGZGame, // Start CGZ Marker Game
kMGStopCGZGame, // Stop CGZ Marker Game
kKICreateMarkerNode, // Creates the marker game vault Node
kStartKIAlert, // start the KI alert
kUpdatePelletScore, // Updates the pellet score
kFriendInviteSent, // Friend invite was attempted and result received
kRegisterImager, // Register imager with the KI
kNoCommand
};
enum Flags
{
kPrivateMsg = 0x00000001,
kAdminMsg = 0x00000002,
kDead = 0x00000004,
kUNUSED1 = 0x00000008,
kStatusMsg = 0x00000010,
kNeighborMsg = 0x00000020, // sending to all the neighbors
kChannelMask = 0x0000ff00
};
static const char* kChronicleKILevel;
enum KILevels
{
kNanoKI = 0,
kMicroKI = 1,
kNormalKI = 2
};
#ifndef KI_CONSTANTS_ONLY
pfKIMsg() : plMessage( nil, nil, nil ) { SetBCastFlag( kBCastByExactType ); IInit(); }
pfKIMsg( UInt8 command ) : plMessage( nil, nil, nil ) { SetBCastFlag( kBCastByExactType ); IInit(); fCommand = command; }
pfKIMsg( plKey &receiver, UInt8 command ) : plMessage( nil, nil, nil ) { AddReceiver( receiver ); IInit(); fCommand = command; }
~pfKIMsg() { delete [] fUser; }
CLASSNAME_REGISTER( pfKIMsg );
GETINTERFACE_ANY( pfKIMsg, plMessage );
virtual void Read(hsStream* s, hsResMgr* mgr)
{
plMessage::IMsgRead( s, mgr );
s->ReadSwap( &fCommand );
fUser = s->ReadSafeString();
fPlayerID = s->ReadSwap32();
wchar_t *temp = s->ReadSafeWString();
if (temp) // apparently ReadSafeWString can return null, which std::wstring doesn't like being assigned
fString = temp;
else
fString = L"";
delete [] temp;
fFlags = s->ReadSwap32();
fDelay = s->ReadSwapScalar();
fValue = s->ReadSwap32();
}
virtual void Write(hsStream* s, hsResMgr* mgr)
{
plMessage::IMsgWrite( s, mgr );
s->WriteSwap( fCommand );
s->WriteSafeString( fUser );
s->WriteSwap32( fPlayerID );
s->WriteSafeWString( fString.c_str() );
s->WriteSwap32( fFlags );
s->WriteSwapScalar(fDelay);
s->WriteSwap32( fValue );
}
UInt8 GetCommand( void ) const { return fCommand; }
void SetString( const char *str );
void SetString( const wchar_t *str ) { fString = str; }
std::string GetString( void );
std::wstring GetStringU( void ) { return fString; }
void SetUser( const char *str, UInt32 pid=0 ) { fUser = hsStrcpy( str ); fPlayerID = pid; }
const char *GetUser( void ) { return fUser; }
UInt32 GetPlayerID( void ) { return fPlayerID; }
void SetFlags( UInt32 flags ) { fFlags = flags; }
UInt32 GetFlags( void ) const { return fFlags; }
void SetDelay( hsScalar delay ) { fDelay = delay; }
hsScalar GetDelay( void ) { return fDelay; }
void SetIntValue( Int32 value ) { fValue = value; }
Int32 GetIntValue( void ) { return fValue; }
#endif // def KI_CONSTANTS_ONLY
};
#endif // _pfKIMsg_h

View File

@ -0,0 +1,70 @@
/*==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==*/
#include "pfMarkerMsg.h"
#include "hsStream.h"
#include "hsGeometry3.h"
pfMarkerMsg::pfMarkerMsg() :
fType(kMarkerCaptured),
fMarkerID(0)
{
SetBCastFlag(plMessage::kBCastByExactType);
SetBCastFlag(plMessage::kNetPropagate | plMessage::kNetForce, false);
}
pfMarkerMsg::~pfMarkerMsg()
{
}
void pfMarkerMsg::Read(hsStream* stream, hsResMgr* mgr)
{
plMessage::IMsgRead(stream, mgr);
fType = (Type)stream->ReadByte();
if (fType == kMarkerCaptured)
fMarkerID = stream->ReadSwap32();
}
void pfMarkerMsg::Write(hsStream* stream, hsResMgr* mgr)
{
plMessage::IMsgWrite(stream, mgr);
stream->WriteByte(fType);
if (fType == kMarkerCaptured)
stream->WriteSwap32(fMarkerID);
}
void pfMarkerMsg::PrintDebug(char* buf)
{
switch (fType)
{
case pfMarkerMsg::kMarkerCaptured:
sprintf(buf, "Marker Captured - ID %d", fMarkerID);
break;
}
}

View File

@ -0,0 +1,57 @@
/*==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==*/
#ifndef pfMarkerMsg_h_inc
#define pfMarkerMsg_h_inc
#include "../pnMessage/plMessage.h"
struct hsPoint3;
class pfMarkerMsg : public plMessage
{
public:
enum Type
{
// Sent by yourself when you hit a marker
// - fMarkerID is the id number of the marker we hit
kMarkerCaptured,
};
Type fType;
UInt32 fMarkerID;
pfMarkerMsg();
virtual ~pfMarkerMsg();
void PrintDebug(char* buf);
CLASSNAME_REGISTER(pfMarkerMsg);
GETINTERFACE_ANY(pfMarkerMsg, plMessage);
virtual void Read(hsStream* stream, hsResMgr* mgr);
virtual void Write(hsStream* stream, hsResMgr* mgr);
};
#endif // pfMarkerMsg_h_inc

View File

@ -0,0 +1,86 @@
/*==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==*/
#ifndef pfMessageCreatable_inc
#define pfMessageCreatable_inc
#include "../pnFactory/plCreator.h"
#if 0
#include "plTriggerMsg.h"
REGISTER_CREATABLE( plTriggerMsg );
#include "plPlayerMsg.h"
REGISTER_CREATABLE( plPlayerMsg );
#include "plAvatarMsg.h"
REGISTER_CREATABLE( plAvatarMsg );
REGISTER_NONCREATABLE( plAvTaskMsg );
REGISTER_CREATABLE( plAvSeekMsg );
REGISTER_CREATABLE( plAvOneShotMsg );
REGISTER_CREATABLE( plAvEnableMsg );
#endif
#include "pfGameGUIMsg.h"
REGISTER_CREATABLE( pfGameGUIMsg );
#include "pfGUINotifyMsg.h"
REGISTER_CREATABLE( pfGUINotifyMsg );
#include "plClothingMsg.h"
REGISTER_CREATABLE( plClothingMsg );
REGISTER_CREATABLE( plElementRefMsg );
REGISTER_CREATABLE( plClothingUpdateBCMsg );
#include "plArmatureEffectMsg.h"
REGISTER_CREATABLE( plArmatureEffectMsg );
REGISTER_CREATABLE( plArmatureEffectStateMsg );
#include "pfKIMsg.h"
REGISTER_CREATABLE( pfKIMsg );
#include "pfMarkerMsg.h"
REGISTER_CREATABLE(pfMarkerMsg);
#include "pfBackdoorMsg.h"
REGISTER_CREATABLE(pfBackdoorMsg);
#include "pfMovieEventMsg.h"
REGISTER_CREATABLE(pfMovieEventMsg);
#endif pfMessageCreatable_inc

View File

@ -0,0 +1,53 @@
/*==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==*/
#include "pfMovieEventMsg.h"
#include "hsStream.h"
pfMovieEventMsg::~pfMovieEventMsg()
{
delete [] fMovieName;
}
void pfMovieEventMsg::Read(hsStream* stream, hsResMgr* mgr)
{
plMessage::IMsgRead(stream, mgr);
fReason = (Reason)stream->ReadByte();
fMovieName = stream->ReadSafeString();
}
void pfMovieEventMsg::Write(hsStream* stream, hsResMgr* mgr)
{
plMessage::IMsgWrite(stream, mgr);
stream->WriteByte(fReason);
stream->WriteSafeString(fMovieName);
}

View File

@ -0,0 +1,66 @@
/*==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==*/
#ifndef pfMovieEventMsg_h_inc
#define pfMovieEventMsg_h_inc
#include "../pnMessage/plMessage.h"
class pfMovieEventMsg : public plMessage
{
public:
enum Reason
{
kMovieDone,
};
Reason fReason;
char* fMovieName;
pfMovieEventMsg(const char* movieName, Reason reason=kMovieDone) : plMessage(nil, nil, nil)
{
fReason = reason;
if (movieName)
fMovieName = hsStrcpy(movieName);
else
fMovieName = nil;
}
pfMovieEventMsg() : plMessage(nil, nil, nil), fMovieName(nil), fReason(kMovieDone)
{
}
virtual ~pfMovieEventMsg();
CLASSNAME_REGISTER(pfMovieEventMsg);
GETINTERFACE_ANY(pfMovieEventMsg, plMessage);
virtual void Read(hsStream* stream, hsResMgr* mgr);
virtual void Write(hsStream* stream, hsResMgr* mgr);
};
#endif // pfMovieEventMsg_h_inc

View 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/>.
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 "hsStream.h"
#include "plArmatureEffectMsg.h"
#include "../plAvatar/plArmatureEffects.h"
plArmatureEffectStateMsg::plArmatureEffectStateMsg() :
fSurface(plArmatureEffectsMgr::kFootNoSurface), fAddSurface(false) {}
plArmatureEffectStateMsg::~plArmatureEffectStateMsg() {}
void plArmatureEffectStateMsg::Read(hsStream* stream, hsResMgr* mgr)
{
plMessage::IMsgRead(stream, mgr);
fSurface = stream->ReadByte();
fAddSurface = stream->ReadBool();
}
void plArmatureEffectStateMsg::Write(hsStream* stream, hsResMgr* mgr)
{
plMessage::IMsgWrite(stream, mgr);
stream->WriteByte(fSurface);
stream->WriteBool(fAddSurface);
}

View File

@ -0,0 +1,65 @@
/*==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==*/
#ifndef plArmatureEffectMsg_inc
#define plArmatureEffectMsg_inc
#include "../pnMessage/plEventCallbackMsg.h"
class plArmatureEffectMsg : public plEventCallbackMsg
{
public:
plArmatureEffectMsg() : plEventCallbackMsg(), fTriggerIdx(-1) {}
plArmatureEffectMsg(const plKey &receiver, CallbackEvent e, int idx=0, hsScalar t=0, Int16 repeats=-1, UInt16 user=0) :
plEventCallbackMsg(receiver, e, idx, t, repeats, user), fTriggerIdx(-1) {}
CLASSNAME_REGISTER( plArmatureEffectMsg );
GETINTERFACE_ANY( plArmatureEffectMsg, plEventCallbackMsg );
// These aren't meant to go across the net, so no IO necessary.
void Read(hsStream* stream, hsResMgr* mgr) {}
void Write(hsStream* stream, hsResMgr* mgr) {}
Int8 fTriggerIdx;
};
class plArmatureEffectStateMsg : public plMessage
{
public:
plArmatureEffectStateMsg();
~plArmatureEffectStateMsg();
CLASSNAME_REGISTER( plArmatureEffectStateMsg );
GETINTERFACE_ANY( plArmatureEffectStateMsg, plMessage );
virtual void Read(hsStream* stream, hsResMgr* mgr);
virtual void Write(hsStream* stream, hsResMgr* mgr);
Int8 fSurface;
hsBool fAddSurface;
};
#endif

View File

@ -0,0 +1,114 @@
/*==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==*/
#include "plClothingMsg.h"
#include "hsResMgr.h"
#include "hsBitVector.h"
void plClothingMsg::Read(hsStream* stream, hsResMgr* mgr)
{
plMessage::IMsgRead(stream, mgr);
fCommands = stream->ReadSwap32();
if (stream->ReadBool())
fItemKey = mgr->ReadKey(stream);
fColor.Read(stream);
fLayer = stream->ReadByte();
fDelta = stream->ReadByte();
fWeight = stream->ReadSwapScalar();
}
void plClothingMsg::Write(hsStream* stream, hsResMgr* mgr)
{
plMessage::IMsgWrite(stream, mgr);
stream->WriteSwap32(fCommands);
stream->WriteBool(fItemKey != nil);
if (fItemKey)
mgr->WriteKey(stream, fItemKey);
fColor.Write(stream);
stream->WriteByte(fLayer);
stream->WriteByte(fDelta);
stream->WriteSwapScalar(fWeight);
}
enum ClothingFlags
{
kClothingCommands,
kClothingItemKey,
kClothingColor,
};
void plClothingMsg::ReadVersion(hsStream* s, hsResMgr* mgr)
{
plMessage::IMsgReadVersion(s, mgr);
hsBitVector contentFlags;
contentFlags.Read(s);
if (contentFlags.IsBitSet(kClothingCommands))
fCommands = s->ReadSwap32();
if (contentFlags.IsBitSet(kClothingItemKey))
{
if (s->ReadBool())
fItemKey = mgr->ReadKey(s);
}
if (contentFlags.IsBitSet(kClothingColor))
fColor.Read(s);
}
void plClothingMsg::WriteVersion(hsStream* s, hsResMgr* mgr)
{
plMessage::IMsgWriteVersion(s, mgr);
hsBitVector contentFlags;
contentFlags.SetBit(kClothingCommands);
contentFlags.SetBit(kClothingItemKey);
contentFlags.SetBit(kClothingColor);
contentFlags.Write(s);
// kClothingCommands
s->WriteSwap32(fCommands);
// kClothingItemKey
s->WriteBool(fItemKey != nil);
if (fItemKey)
mgr->WriteKey(s, fItemKey);
// kClothingColor
fColor.Write(s);
}
/////////////////////////////////////////////////////////////////////////////////
plClothingUpdateBCMsg::plClothingUpdateBCMsg() { SetBCastFlag(plMessage::kBCastByExactType); }
void plClothingUpdateBCMsg::Read(hsStream* stream, hsResMgr* mgr)
{
plMessage::IMsgRead(stream, mgr);
}
void plClothingUpdateBCMsg::Write(hsStream* stream, hsResMgr* mgr)
{
plMessage::IMsgWrite(stream, mgr);
}

View File

@ -0,0 +1,111 @@
/*==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==*/
#ifndef plClothingMsg_inc
#define plClothingMsg_inc
#include "../pnMessage/plRefMsg.h"
#include "hsStream.h"
#include "../CoreLib/hsColorRGBA.h"
class hsResMgr;
class plClothingMsg : public plMessage
{
protected:
UInt32 fCommands;
public:
plKey fItemKey;
hsColorRGBA fColor;
UInt8 fLayer;
UInt8 fDelta;
hsScalar fWeight;
plClothingMsg() : fCommands(0), fItemKey(nil), fLayer(0), fDelta(0), fWeight(0) { fColor.Set(1.f, 1.f, 1.f, 1.f); }
~plClothingMsg() {}
CLASSNAME_REGISTER( plClothingMsg );
GETINTERFACE_ANY( plClothingMsg, plMessage );
enum commands
{
kAddItem = 0x0001,
kRemoveItem = 0x0002,
kUpdateTexture = 0x0004,
kTintItem = 0x0008,
kRetry = 0x0010,
kTintSkin = 0x0020,
kBlendSkin = 0x0040,
kMorphItem = 0x0080,
kSaveCustomizations = 0x0100,
};
hsBool GetCommand(UInt32 command) { return fCommands & command; }
void AddCommand(UInt32 command) { fCommands |= command; }
hsBool ResendUpdate() { return fCommands != kUpdateTexture; }
// IO
virtual void Read(hsStream* stream, hsResMgr* mgr);
virtual void Write(hsStream* stream, hsResMgr* mgr);
// WriteVersion writes the current version of this creatable and ReadVersion will read in
// any previous version.
virtual void ReadVersion(hsStream* s, hsResMgr* mgr);
virtual void WriteVersion(hsStream* s, hsResMgr* mgr);
};
class plElementRefMsg : public plGenRefMsg
{
public:
char *fElementName;
UInt32 fLayer;
plElementRefMsg() : plGenRefMsg(), fElementName(nil), fLayer(1) {}
plElementRefMsg(const plKey &r, UInt8 c, int which, int type, char *name, UInt8 layer) : plGenRefMsg(r, c, which, type)
{
fLayer = layer;
fElementName = hsStrcpy(name);
}
~plElementRefMsg() { delete [] fElementName; }
CLASSNAME_REGISTER( plElementRefMsg );
GETINTERFACE_ANY( plElementRefMsg, plGenRefMsg );
};
class plClothingUpdateBCMsg : public plMessage
{
public:
plClothingUpdateBCMsg();
~plClothingUpdateBCMsg() {}
CLASSNAME_REGISTER( plClothingUpdateBCMsg );
GETINTERFACE_ANY( plClothingUpdateBCMsg, plMessage );
virtual void Read(hsStream* stream, hsResMgr* mgr);
virtual void Write(hsStream* stream, hsResMgr* mgr);
};
#endif // plClothingMsg_inc