|
Planeshift
|
psEngine This is the main class that contains all the object. More...
#include <psengine.h>
Public Types | |
| enum | LoadState { LS_NONE, LS_LOAD_SCREEN, LS_INIT_ENGINE, LS_REQUEST_WORLD, LS_SETTING_CHARACTERS, LS_CREATE_GUI, LS_DONE, LS_ERROR } |
Public Member Functions | |
| void | AddLoadingWindowMsg (const csString &msg) |
| void | AdjustBrightnessCorrectionDown () |
| Adjust brightness down and inform user. More... | |
| void | AdjustBrightnessCorrectionUp () |
| Adjust brightness up and inform user. More... | |
| bool | BackgroundWorldLoading () |
| Whether or not we're background loading. More... | |
| void | Cleanup () |
| Clean up stuff. More... | |
| void | Disconnect () |
| Formally disconnects a client and allows time for an info box to be shown. More... | |
| void | FatalError (const char *msg) |
| Shortcut to pawsQuitInfoBox. More... | |
| const char * | FindCommonString (unsigned int cstr_id) |
| FindCommonString. More... | |
| csStringID | FindCommonStringId (const char *str) |
| FindCommonStringId. More... | |
| void | FinishFrame () |
| Wait to finish drawing the current frame. More... | |
| void | ForceRefresh () |
| Force the next frame to get drawn. Used when updating LoadWindow. More... | |
| ActionHandler * | GetActionHandler () |
| Autoexec * | GetAutoexec () |
| float | GetBrightnessCorrection () |
| Get the current brightness correlation value. More... | |
| psCelClient * | GetCelClient () |
| psCharController * | GetCharControl () |
| psClientCharManager * | GetCharManager () |
| psChatBubbles * | GetChatBubbles () |
| CmdHandler * | GetCmdHandler () |
| iConfigManager * | GetConfig () |
| psCSSetup * | GetCSSetup () |
| int | GetDuelConfirm () const |
| Simply returns the duel confirmation setting. More... | |
| psEffectManager * | GetEffectManager () |
| iEngine * | GetEngine () |
| iEventNameRegistry * | GetEventNameRegistry () |
| float | getFPS () |
| iGraphics2D * | GetG2D () |
| iGraphics3D * | GetG3D () |
| const char * | GetGuildName () |
| Get GuildName. More... | |
| psInventoryCache * | GetInventoryCache (void) |
| get the inventory cache More... | |
| float | GetKFactor () |
| iEvent * | GetLastEvent () |
| int | getLimitFPS () |
| iBgLoader * | GetLoader () |
| const char * | GetMainPlayerName () |
| Get the main character's name. More... | |
| psMainWidget * | GetMainWidget () |
| bool | GetMarriageProposal () const |
| Simply returns if marriage proposals should be read or automatically ignored. More... | |
| ModeHandler * | GetModeHandler () |
| psMouseBinds * | GetMouseBinds () |
| ClientMsgHandler * | GetMsgHandler () |
| csStringHashReversible * | GetMsgStrings () |
| Get the message strings/common string table. More... | |
| bool | GetMuteSoundsOnFocusLoss (void) const |
| Gets whether sounds should be muted when the application loses focus. More... | |
| psNetManager * | GetNetManager () |
| int | GetNumChars () |
| Get the number of characters this player should have. More... | |
| iObjectRegistry * | GetObjectRegistry () |
| psOptions * | GetOptions () |
| psCamera * | GetPSCamera () |
| float | GetRandom () |
| csRandomGen & | GetRandomGen () |
| iSceneManipulate * | GetSceneManipulator () |
| psSlotManager * | GetSlotManager () |
| ClientSongManager * | GetSongManager () |
| iSoundManager * | GetSoundManager () |
| bool | GetSoundStatus () |
| Get the status of the sound plugin, if available or not. More... | |
| const char * | GetTargetPetitioner () |
| iTextureManager * | GetTextureManager () |
| size_t | GetTime () |
| iVFS * | GetVFS () |
| iVirtualClock * | GetVirtualClock () |
| iDocumentSystem * | GetXMLParser () |
| ZoneHandler * | GetZoneHandler () |
| bool | HasLoadedMap () const |
| Checks if the client has loaded its map. More... | |
| bool | Initialize (int level) |
| Creates and loads other interfaces. More... | |
| bool | IsGameLoaded () |
| check if the game has been loaded or not More... | |
| bool | IsLoggedIn () |
| Logged in? More... | |
| bool | LoadConfirmationSettings () |
| Confirmation settings for marriage proposals and duels are read from /planeshift/userdata/options/confirmation.xml. More... | |
| bool | LoadCustomPawsWidgets (const char *filename) |
| Loads custom paws widgets that are specified as a list in an xml file. More... | |
| void | LoadError (bool value) |
| Sets the LoadError value. More... | |
| void | LoadGame () |
| Load game calls LoadWorld and also load characters, cameras, items, etc. More... | |
| bool | LoadingError () |
| Checks if the client had any errors during the loading state. More... | |
| bool | LoadPawsWidget (const char *title, const char *filename) |
| Loads a widget. More... | |
| bool | LoadSoundSettings (bool forceDef) |
| Loads and applies the sound settings. More... | |
| void | MuteAllSounds (void) |
| Mute all sounds. More... | |
| bool | Process2D (iEvent &Event) |
| bool | Process3D (iEvent &Event) |
| bool | ProcessFrame (iEvent &Event) |
| bool | ProcessLogic (iEvent &Event) |
| Everything is event base for csApp based system. More... | |
| psEngine (iObjectRegistry *object_reg, psCSSetup *CSSetup) | |
| Default constructor. It calls csApp constructor. More... | |
| void | QuitClient () |
| Quits client. More... | |
| void | RegisterDelayedLoader (DelayedLoader *obj) |
| void | ResetBrightnessCorrection () |
| Reset brightness and inform user. More... | |
| void | ResetEngine () |
| Resets the engine to a state in which we can login again, without requiring a reload of the entire application or CS stuff. More... | |
| void | SetBrightnessCorrection (float B) |
| Set the current brightness correlation value. More... | |
| void | SetDuelConfirm (int confirmType) |
| Sets the duel confirm type and updates the confirmation settings XML. More... | |
| void | SetGuildName (const char *name) |
| Set Guild Name here for use with Entity labels. More... | |
| void | SetKFactor (float K) |
| void | setLimitFPS (int) |
| void | SetLoadedMap (bool value) |
| Sets the HasLoadedMap value. More... | |
| void | SetLoggedIn (bool v) |
| void | SetMarriageProposal (bool ignore) |
| Sets if marriage proposals should be ignored and updates the confirmation settings XML. More... | |
| void | SetMuteSoundsOnFocusLoss (bool value) |
| Sets whether sounds should be muted when the application loses focus. More... | |
| void | SetNumChars (int chars) |
| Set the number of characters this player has. More... | |
| void | SetTargetPetitioner (const char *pet) |
| Access the player's petitioner target. More... | |
| void | StartLoad () |
| Tell the engine to start the load proceedure. More... | |
| bool | toggleFPS () |
| void | UnmuteAllSounds (void) |
| Unmute all sounds. More... | |
| void | UnregisterDelayedLoader (DelayedLoader *obj) |
| void | UpdateLights () |
| void | UpdatePerFrame () |
| Do anything that needs to happen after the frame is rendered each time. More... | |
| bool | UpdateWindowTitleInformations () |
| Update the window title with the current informations. More... | |
| void | WriteConfirmationSettings () |
| Confirmation settings for marriage proposals and duels are written to /planeshift/userdata/options/confirmation.xml. More... | |
| virtual | ~psEngine () |
| Destructor. More... | |
Public Attributes | |
| LoadState | loadstate |
| SlotNameHash | slotName |
Static Public Attributes | |
| static csString | hwRenderer |
| static csString | hwVersion |
| static csString | playerName |
psEngine This is the main class that contains all the object.
This class responsible for the whole game functionality.
Definition at line 94 of file psengine.h.
| enum psEngine::LoadState |
| Enumerator | |
|---|---|
| LS_NONE | |
| LS_LOAD_SCREEN | |
| LS_INIT_ENGINE | |
| LS_REQUEST_WORLD | |
| LS_SETTING_CHARACTERS | |
| LS_CREATE_GUI | |
| LS_DONE | |
| LS_ERROR | |
Definition at line 97 of file psengine.h.
| psEngine::psEngine | ( | iObjectRegistry * | object_reg, |
| psCSSetup * | CSSetup | ||
| ) |
Default constructor. It calls csApp constructor.
|
virtual |
Destructor.
| void psEngine::AddLoadingWindowMsg | ( | const csString & | msg | ) |
| void psEngine::AdjustBrightnessCorrectionDown | ( | ) |
Adjust brightness down and inform user.
| void psEngine::AdjustBrightnessCorrectionUp | ( | ) |
Adjust brightness up and inform user.
|
inline |
Whether or not we're background loading.
Definition at line 618 of file psengine.h.
| void psEngine::Cleanup | ( | ) |
Clean up stuff.
Needs to be called before the engine is destroyed, since some objects owned by the engine require the engine during their destruction.
| void psEngine::Disconnect | ( | ) |
Formally disconnects a client and allows time for an info box to be shown.
| void psEngine::FatalError | ( | const char * | msg | ) |
Shortcut to pawsQuitInfoBox.
| msg | Message to display before quiting |
FindCommonString.
| cstr_id | The id of the common string to find. |
| csStringID psEngine::FindCommonStringId | ( | const char * | str | ) |
FindCommonStringId.
| [in] | str | The string we are looking for |
|
inline |
Wait to finish drawing the current frame.
Definition at line 153 of file psengine.h.
|
inline |
Force the next frame to get drawn. Used when updating LoadWindow.
Definition at line 553 of file psengine.h.
|
inline |
Definition at line 285 of file psengine.h.
|
inline |
Definition at line 310 of file psengine.h.
|
inline |
Get the current brightness correlation value.
Definition at line 352 of file psengine.h.
|
inline |
Definition at line 261 of file psengine.h.
|
inline |
Definition at line 289 of file psengine.h.
|
inline |
Definition at line 257 of file psengine.h.
|
inline |
Definition at line 273 of file psengine.h.
|
inline |
Definition at line 245 of file psengine.h.
|
inline |
< config file
Definition at line 215 of file psengine.h.
|
inline |
Definition at line 302 of file psengine.h.
|
inline |
Simply returns the duel confirmation setting.
Definition at line 425 of file psengine.h.
|
inline |
Definition at line 269 of file psengine.h.
|
inline |
Definition at line 187 of file psengine.h.
|
inline |
Definition at line 183 of file psengine.h.
|
inline |
Definition at line 399 of file psengine.h.
|
inline |
Definition at line 195 of file psengine.h.
|
inline |
Definition at line 191 of file psengine.h.
|
inline |
Get GuildName.
Definition at line 565 of file psengine.h.
|
inline |
get the inventory cache
Definition at line 612 of file psengine.h.
|
inline |
Definition at line 379 of file psengine.h.
|
inline |
Definition at line 388 of file psengine.h.
|
inline |
Definition at line 395 of file psengine.h.
|
inline |
Definition at line 219 of file psengine.h.
| const char* psEngine::GetMainPlayerName | ( | ) |
Get the main character's name.
|
inline |
Definition at line 265 of file psengine.h.
|
inline |
Simply returns if marriage proposals should be read or automatically ignored.
Definition at line 443 of file psengine.h.
|
inline |
Definition at line 281 of file psengine.h.
| psMouseBinds* psEngine::GetMouseBinds | ( | ) |
|
inline |
Definition at line 241 of file psengine.h.
| csStringHashReversible* psEngine::GetMsgStrings | ( | ) |
Get the message strings/common string table.
|
inline |
Gets whether sounds should be muted when the application loses focus.
Definition at line 573 of file psengine.h.
|
inline |
Definition at line 298 of file psengine.h.
|
inline |
Get the number of characters this player should have.
Definition at line 541 of file psengine.h.
|
inline |
Definition at line 179 of file psengine.h.
|
inline |
Definition at line 277 of file psengine.h.
|
inline |
Definition at line 294 of file psengine.h.
|
inline |
Definition at line 236 of file psengine.h.
|
inline |
Definition at line 232 of file psengine.h.
|
inline |
Definition at line 223 of file psengine.h.
|
inline |
Definition at line 249 of file psengine.h.
|
inline |
Definition at line 253 of file psengine.h.
|
inline |
Definition at line 227 of file psengine.h.
|
inline |
Get the status of the sound plugin, if available or not.
Definition at line 606 of file psengine.h.
|
inline |
Definition at line 323 of file psengine.h.
|
inline |
Definition at line 199 of file psengine.h.
| size_t psEngine::GetTime | ( | ) |
|
inline |
Definition at line 203 of file psengine.h.
|
inline |
Definition at line 207 of file psengine.h.
|
inline |
Definition at line 211 of file psengine.h.
|
inline |
Definition at line 306 of file psengine.h.
|
inline |
Checks if the client has loaded its map.
Definition at line 470 of file psengine.h.
| bool psEngine::Initialize | ( | int | level | ) |
Creates and loads other interfaces.
There are 2 levels for the setup.
| level | The level we want to load At level 0:
|
|
inline |
check if the game has been loaded or not
Definition at line 173 of file psengine.h.
|
inline |
Logged in?
Definition at line 521 of file psengine.h.
| bool psEngine::LoadConfirmationSettings | ( | ) |
Confirmation settings for marriage proposals and duels are read from /planeshift/userdata/options/confirmation.xml.
Loads confimration settings for duels and marriages
| bool psEngine::LoadCustomPawsWidgets | ( | const char * | filename | ) |
Loads custom paws widgets that are specified as a list in an xml file.
| filename | The xml file that holds the list of custom widgets. |
|
inline |
Sets the LoadError value.
Definition at line 488 of file psengine.h.
| void psEngine::LoadGame | ( | ) |
Load game calls LoadWorld and also load characters, cameras, items, etc.
|
inline |
Checks if the client had any errors during the loading state.
Definition at line 482 of file psengine.h.
| bool psEngine::LoadPawsWidget | ( | const char * | title, |
| const char * | filename | ||
| ) |
Loads a widget.
| title | Title to show in the logs if an error occurs |
| filename | XML file |
| bool psEngine::LoadSoundSettings | ( | bool | forceDef | ) |
Loads and applies the sound settings.
| forceDef | True if you want to load the default settings |
| void psEngine::MuteAllSounds | ( | void | ) |
Mute all sounds.
| bool psEngine::Process2D | ( | iEvent & | Event | ) |
| bool psEngine::Process3D | ( | iEvent & | Event | ) |
| bool psEngine::ProcessFrame | ( | iEvent & | Event | ) |
| bool psEngine::ProcessLogic | ( | iEvent & | Event | ) |
Everything is event base for csApp based system.
This method is called when any event is triggered such as when a button is pushed, mouse move, or keyboard pressed.
| void psEngine::QuitClient | ( | ) |
Quits client.
|
inline |
Definition at line 623 of file psengine.h.
| void psEngine::ResetBrightnessCorrection | ( | ) |
Reset brightness and inform user.
| void psEngine::ResetEngine | ( | ) |
Resets the engine to a state in which we can login again, without requiring a reload of the entire application or CS stuff.
| void psEngine::SetBrightnessCorrection | ( | float | B | ) |
Set the current brightness correlation value.
|
inline |
Sets the duel confirm type and updates the confirmation settings XML.
Sets duel confirm type
| confirmType | Updates duelConfirmation with this value |
Definition at line 416 of file psengine.h.
|
inline |
Set Guild Name here for use with Entity labels.
Definition at line 559 of file psengine.h.
|
inline |
Definition at line 383 of file psengine.h.
| void psEngine::setLimitFPS | ( | int | ) |
|
inline |
Sets the HasLoadedMap value.
Definition at line 476 of file psengine.h.
|
inline |
Definition at line 525 of file psengine.h.
|
inline |
Sets if marriage proposals should be ignored and updates the confirmation settings XML.
Sets if marriage proposals should be ignored
| ignore | Updates marriageProposal with this value |
Definition at line 434 of file psengine.h.
|
inline |
Sets whether sounds should be muted when the application loses focus.
| value | true if sounds should be muted, false otherwise |
Definition at line 580 of file psengine.h.
|
inline |
Set the number of characters this player has.
Used to wait for full loading of characters in selection screen.
Definition at line 535 of file psengine.h.
|
inline |
Access the player's petitioner target.
Definition at line 318 of file psengine.h.
|
inline |
Tell the engine to start the load proceedure.
Definition at line 341 of file psengine.h.
|
inline |
Definition at line 404 of file psengine.h.
| void psEngine::UnmuteAllSounds | ( | void | ) |
Unmute all sounds.
|
inline |
Definition at line 627 of file psengine.h.
| void psEngine::UpdateLights | ( | ) |
| void psEngine::UpdatePerFrame | ( | ) |
Do anything that needs to happen after the frame is rendered each time.
| bool psEngine::UpdateWindowTitleInformations | ( | ) |
Update the window title with the current informations.
| void psEngine::WriteConfirmationSettings | ( | ) |
Confirmation settings for marriage proposals and duels are written to /planeshift/userdata/options/confirmation.xml.
Writes confirmation settings for duels and marriages
|
static |
Definition at line 632 of file psengine.h.
|
static |
Definition at line 633 of file psengine.h.
| LoadState psEngine::loadstate |
Definition at line 345 of file psengine.h.
|
static |
Definition at line 634 of file psengine.h.
| SlotNameHash psEngine::slotName |
Definition at line 509 of file psengine.h.