CChitin Class¶
Overview¶
The structure used for this class is CChitin
Quick Reference¶
Quick Ref |
void CChitin::CChitin(int argc, char** argv) |
void CChitin::~CChitin() |
void CChitin::AddEngine(CWarp* pNewEngine) |
virtual CRes* CChitin::AllocResObject(int nType) |
virtual void CChitin::AsynchronousUpdate(unsigned int __formal) |
virtual void CChitin::BroadcastMultiplayerProgressBarInfo() |
virtual int CChitin::ConfirmQuit() |
virtual unsigned char CChitin::CutsceneModeActive() |
virtual int CChitin::FontRectOutline() |
unsigned char CChitin::FullScreen() |
void CChitin::EnginesGameInit() |
void CChitin::EnginesGameUninit() |
virtual int CChitin::GetEAXActive() |
virtual unsigned char CChitin::GetGamespyResponse(unsigned char __formal) |
virtual void CChitin::GetGameSpyCode(CString& sGameSpyCode) |
virtual void CChitin::GetGameSpyGameName(CString& sGameSpyName) |
virtual CString& CChitin::GetIconRes() |
virtual unsigned long CChitin::GetIDSBadDeskTopBitDepth() |
virtual unsigned long CChitin::GetIDSChoosePixelFormat() |
virtual unsigned long CChitin::GetIDSExclusiveMode() |
virtual unsigned long CChitin::GetIDSInvalidVideoMode() |
virtual unsigned long CChitin::GetIDSOpenGLDll() |
virtual unsigned long CChitin::GetIDSSetGameBitDepth() |
virtual unsigned long CChitin::GetIDSSetGameResolution() |
virtual unsigned long CChitin::GetIDSSetPixelFormat() |
virtual unsigned long CChitin::GetIDSWindowsFonts() |
virtual const char* CChitin::GetKeyFileName() |
virtual long CChitin::GetMovieVolume() |
virtual CString __cdecl CChitin::GetNetworkVersionString() = 0 |
virtual unsigned char CChitin::GetNumberSoundChannels() |
virtual void CChitin::GetPanicCDStrings(CString& sMediaRemoved, CString& sPlaceCD, CString& sInDrive) |
virtual void CChitin::GetScreenShotFilePrefix(CString& szGameFileName) |
int CChitin::GetTimer(int timer) |
virtual CString __cdecl CChitin::GetVersionString() = 0 |
virtual unsigned short CChitin::GetMultiplayerDirectPlayPort() |
virtual unsigned short CChitin::GetMultiplayerGameSpyPort() |
int CChitin::HasDirectX() |
void CChitin::HideVirtualKeyboard() |
int CChitin::InitInstance() |
void CChitin::InitResources() |
unsigned char CChitin::InitSound() |
void CChitin::InitVideo() |
virtual int CChitin::InitializeServices() |
void CChitin::InitializeVariables() |
virtual int CChitin::Is3DSound(int nChannel) |
int CChitin::IsAndroid() |
int CChitin::IsHosting() |
int CChitin::IsIOS() |
int CChitin::IsMultiplayer() |
int CChitin::IsTouchUI() |
virtual void CChitin::LoadOptions() |
void CChitin::OnAltEnter() |
void CChitin::OnDropFile(const char* path) |
void CChitin::OnLowMemory() |
virtual void CChitin::OnMixerInitialize() |
virtual void CChitin::OnMultiplayerPlayerJoin(int __formal) |
virtual void CChitin::OnMultiplayerPlayerLeave(int __formal) |
virtual void CChitin::OnMultiplayerPlayerVisible(int __formal) |
virtual void CChitin::OnMultiplayerSessionClose() |
virtual void CChitin::OnMultiplayerSessionOpen(CString& __formal) |
virtual void CChitin::OnMultiplayerSessionToClose() |
void CChitin::OnResizeWindow(int w, int h) |
virtual int CChitin::MessageCallback(unsigned char* __formal) |
void CChitin::ParseCommandLine() |
virtual void CChitin::PreLoadFonts() |
int CChitin::ProcessEvents() |
void CChitin::ReadIniFiles() |
virtual void CChitin::RedrawScreen() |
void CChitin::Resume() |
virtual void CChitin::SetCDSwitchActivateEngine(int bValue) |
virtual void CChitin::SetCDSwitchStatus(unsigned char __formal) |
virtual void CChitin::SelectEngine(CWarp* pNewEngine) |
virtual void CChitin::SetupPanels() |
virtual void CChitin::SetProgressBar(unsigned char __formal) |
virtual void CChitin::SetProgressBarActivateEngine(int bValue) |
virtual void CChitin::SetRenderCount(unsigned char nCount) |
virtual void CChitin::SetSoundVolumes() |
void CChitin::ShowVirtualKeyboard(int multiline) |
virtual void CChitin::ShutDown(int nLineNumber, const char* szFileName, const char* text) |
virtual void CChitin::SynchronousUpdate() |
unsigned char CChitin::UninitSound() |
void CChitin::Update() |
int CChitin::WinMain() |
Constructors¶
Name |
Description |
Constructs a |
|
Destroys a |
CChitin::CChitin¶
Constructs a CChitin
object
void CChitin::CChitin(
int argc,
char** argv);
Parameters
int
argc - An integer that contains the count of arguments that follow in argvchar
** argv - An array of null-terminated strings representing command-line arguments
Remarks
By convention, argv[0]
is the command with which the program is invoked, argv[1]
is the first command-line argument, and so on. See CChitin::ParseCommandLine for details on command line parsing.
Constructs a CChitin
object
CChitin::~CChitin¶
Destroys the CChitin
object
void CChitin::~CChitin();
Remarks
Destroys the CChitin
object
Methods¶
Name |
Description |
Creates and allocates memory for a resource |
|
Broadcast to all connected sessions the progress bar information |
|
Displays a prompt to confirm if players wishes to quit, save before quit, etc |
|
Determines if the cutscene mode is active or not (for dreams etc) |
|
Determines if the EAX sound feature is active or not |
|
Gets the game spy code |
|
Gets the game spy game name |
|
Gets default icon resolution |
|
Returns a pointer to a string containing the default key file (usually |
|
Returns movie volume |
|
Returns number of sound channels supported by local machine |
|
Legacy function for when game was distributed on CD/DVD |
|
Returns port no used in DirectPlay |
|
Returns port no used in GameSpy |
|
Returns if 3D sound is supported on local machine |
|
Returns true if running on an Android operating system |
|
Returns true if game instance is hosting a multiplayer game |
|
Returns true if running on an Apple IOS (iPad) operating system |
|
Returns true if game instance is a multiplayer game |
|
Returns true if a touch sensitive interface is supported on device |
|
Load options |
|
Event action for when Alt+Enter keys are pressed |
|
Event for handling a file dropped onto running game instance |
|
Event action when a player joins a multiplayer game session |
|
Event action when a player leaves a multiplayer game session |
|
Event action when a player in a multiplayer game session becomes visible to others |
|
Event action when a multiplayer game session closes |
|
Event action when a multiplayer game session opens |
|
Event action when a multiplayer game session is about to close |
|
Event action for when window is being resized |
|
Parses the command line passed to the game executable |
|
Preload fonts for game |
|
Set progress bar on screen |
|
CChitin::AddEngine¶
void CChitin::AddEngine(CWarp* pNewEngine);
Parameters
CWarp* pNewEngine - pointer to new engine instance to add
Remarks
CChitin::AllocResObject¶
Creates and allocates memory for a resource
virtual CRes* CChitin::AllocResObject(int nType);
Parameters
int
nType - type of resource to create
Return Value
Returns a CRes object
Remarks
CChitin::AsynchronousUpdate¶
virtual void CChitin::AsynchronousUpdate(unsigned int __formal);
Parameters
unsigned int
__formal -
Remarks
CChitin::BroadcastMultiplayerProgressBarInfo¶
Broadcast to all connected sessions the progress bar information
virtual void CChitin::BroadcastMultiplayerProgressBarInfo();
Remarks
CChitin::ConfirmQuit¶
Displays a prompt to confirm if players wishes to quit, save before quit, etc
virtual int CChitin::ConfirmQuit();
Return Value
Returns an int
Remarks
CChitin::CutsceneModeActive¶
Determines if the cutscene mode is active or not (for dreams etc)
virtual unsigned char CChitin::CutsceneModeActive();
Return Value
Returns an unsigned char
Remarks
CChitin::FontRectOutline¶
virtual int CChitin::FontRectOutline();
Return Value
Returns an int
Remarks
CChitin::FullScreen¶
unsigned char CChitin::FullScreen();
Return Value
Returns an unsigned char
Remarks
CChitin::EnginesGameInit¶
void CChitin::EnginesGameInit();
Remarks
CChitin::EnginesGameUninit¶
void CChitin::EnginesGameUninit();
Remarks
CChitin::GetEAXActive¶
Determines if the EAX sound feature is active or not
virtual int CChitin::GetEAXActive();
Return Value
Returns an int
representing true 1
or false 0
Remarks
CChitin::GetGamespyResponse¶
virtual unsigned char CChitin::GetGamespyResponse(unsigned char __formal);
Parameters
unsigned char
__formal -
Return Value
Returns unsigned char
Remarks
CChitin::GetGameSpyCode¶
Gets the game spy code
virtual void CChitin::GetGameSpyCode(CString& sGameSpyCode);
Parameters
CString& sGameSpyCode - address of string variable to store game spy code
Remarks
CChitin::GetGameSpyGameName¶
Gets the game spy game name
virtual void CChitin::GetGameSpyGameName(CString& sGameSpyName);
Parameters
CString& sGameSpyName - address of string variable to store game spy name
Remarks
CChitin::GetIconRes¶
Gets default icon resolution
virtual CString& CChitin::GetIconRes();
Return Value
Returns a CString&
Remarks
CChitin::GetIDSBadDeskTopBitDepth¶
virtual unsigned long CChitin::GetIDSBadDeskTopBitDepth();
Return Value
Returns unsigned long
Remarks
CChitin::GetIDSChoosePixelFormat¶
virtual unsigned long CChitin::GetIDSChoosePixelFormat();
Return Value
Returns unsigned long
Remarks
CChitin::GetIDSExclusiveMode¶
virtual unsigned long CChitin::GetIDSExclusiveMode();
Return Value
Returns unsigned long
Remarks
CChitin::GetIDSInvalidVideoMode¶
virtual unsigned long CChitin::GetIDSInvalidVideoMode();
Return Value
Returns unsigned long
Remarks
CChitin::GetIDSOpenGLDll¶
virtual unsigned long CChitin::GetIDSOpenGLDll();
Return Value
Returns unsigned long
Remarks
CChitin::GetIDSSetGameBitDepth¶
virtual unsigned long CChitin::GetIDSSetGameBitDepth();
Return Value
Returns unsigned long
Remarks
CChitin::GetIDSSetGameResolution¶
virtual unsigned long CChitin::GetIDSSetGameResolution();
Return Value
Returns unsigned long
Remarks
CChitin::GetIDSSetPixelFormat¶
virtual unsigned long CChitin::GetIDSSetPixelFormat();
Return Value
Returns unsigned long
Remarks
CChitin::GetIDSWindowsFonts¶
virtual unsigned long CChitin::GetIDSWindowsFonts();
Return Value
Returns unsigned long
Remarks
CChitin::GetKeyFileName¶
Returns a pointer to a string containing the default key file (usually chitin.key
)
virtual const char* CChitin::GetKeyFileName();
Return Value
Returns const char
*, a pointer to a string containing key file
Remarks
CChitin::GetMovieVolume¶
Returns movie volume
virtual long CChitin::GetMovieVolume();
Return Value
Returns long
representing movie volume
Remarks
CChitin::GetNetworkVersionString¶
virtual CString __cdecl CChitin::GetNetworkVersionString();
Return Value
Returns a CString containing the network version
Remarks
CChitin::GetNumberSoundChannels¶
Returns number of sound channels supported by local machine
virtual unsigned char CChitin::GetNumberSoundChannels();
Return Value
Returns unsigned char
Remarks
CChitin::GetPanicCDStrings¶
Legacy function for when game was distributed on CD/DVD
virtual void CChitin::GetPanicCDStrings(
CString& sMediaRemoved,
CString& sPlaceCD,
CString& sInDrive);
Parameters
CString& sMediaRemoved - address of string to store media string
CString& sPlaceCD - address of string to store place cd/dvd string
CString& sInDrive - address of string to store in drive string
Remarks
CChitin::GetScreenShotFilePrefix¶
virtual void CChitin::GetScreenShotFilePrefix(CString& szGameFileName);
Parameters
CString& szGameFileName - address of string to store screenshot filename prefix to
Remarks
CChitin::GetTimer¶
int CChitin::GetTimer(int timer);
Parameters
int
timer -
Return Value
Returns an int
value
Remarks
CChitin::GetVersionString¶
virtual CString __cdecl CChitin::GetVersionString();
Return Value
Returns a CString containing the game version
Remarks
CChitin::GetMultiplayerDirectPlayPort¶
Returns port no used in DirectPlay
virtual unsigned short CChitin::GetMultiplayerDirectPlayPort();
Return Value
Returns an unsigned short
representing the port
Remarks
CChitin::GetMultiplayerGameSpyPort¶
Returns port no used in GameSpy
virtual unsigned short CChitin::GetMultiplayerGameSpyPort();
Return Value
Returns an unsigned short
representing the port
Remarks
CChitin::HasDirectX¶
int CChitin::HasDirectX();
Return Value
Returns an int
representing true 1
or false 0
Remarks
CChitin::HideVirtualKeyboard¶
Hides the virtual keyboard from the screen ui
void CChitin::HideVirtualKeyboard();
Remarks
See also CChitin::ShowVirtualKeyboard
CChitin::InitInstance¶
int CChitin::InitInstance();
Return Value
Returns an int
value
Remarks
CChitin::InitResources¶
void CChitin::InitResources();
Remarks
CChitin::InitSound¶
unsigned char CChitin::InitSound();
Return Value
Returns unsigned char
Remarks
CChitin::InitVideo¶
void CChitin::InitVideo();
Remarks
CChitin::InitializeServices¶
virtual int CChitin::InitializeServices();
Return Value
Returns an int
value
Remarks
CChitin::InitializeVariables¶
void CChitin::InitializeVariables();
Remarks
CChitin::Is3DSound¶
Returns if 3D sound is supported on local machine
virtual int CChitin::Is3DSound(int nChannel);
Parameters
int
nChannel -
Return Value
Returns an int
representing true 1
or false 0
Remarks
CChitin::IsAndroid¶
Returns true if running on an Android operating system
int CChitin::IsAndroid();
Return Value
Returns an int
representing true 1
or false 0
Remarks
Compiled and hardcoded to return false 0
on other operating system builds
CChitin::IsHosting¶
Returns true if game instance is hosting a multiplayer game, or false otherwise
int CChitin::IsHosting();
Return Value
Returns an int
representing true 1
or false 0
Remarks
CChitin::IsIOS¶
Returns true if running on an Apple IOS (iPad) operating system
int CChitin::IsIOS();
Return Value
Returns an int
representing true 1
or false 0
Remarks
Compiled and hardcoded to return false 0
on other operating system builds
CChitin::IsMultiplayer¶
Returns true if game instance is a multiplayer game, or false otherwise
int CChitin::IsMultiplayer();
Return Value
Returns an int
representing true 1
or false 0
Remarks
CChitin::IsTouchUI¶
Returns true if a touch sensitive interface is supported on device (IOS, Android, Surface etc), or false otherwise
int CChitin::IsTouchUI();
Return Value
Returns an int
representing true 1
or false 0
Remarks
CChitin::LoadOptions¶
Load options
virtual void CChitin::LoadOptions();
Remarks
CChitin::OnAltEnter¶
Event action for when Alt+Enter keys are pressed
void CChitin::OnAltEnter();
Remarks
Legacy function for entering and exiting fullscreen mode
CChitin::OnDropFile¶
Event for handling a file dropped into a specific folder whilst the game instance is running.
void CChitin::OnDropFile(const char* path);
Parameters
const char* path - full filepath to file “dropped”
Remarks
Unzips the archive file contents to specific folders (based on the extension detected) and then deletes the zip archive.
Looks for files with the following extensions:
“.bg1character”
“.bg2character”
“.iwdcharacter”
“.bg1data”
“.bg2data”
“.iwddata”
“.bg1portrait”
“.bg2portrait”
“.iwdportrait”
“.bg1override”
“.bg2override”
“.iwdoverride”
“.bg1sounds”
“.bg2sounds”
“.iwdsounds”
“.bg1save”
“.bg1mpsave”
“.bg1mpbpsave”
“.bg2save”
“.bg2mpsave”
“.bg2mpbpsave”
“.iwdsave”
“.iwdmpsave”
“.sodsave”
“.sodmpsave”
“.mpsodsave”
CChitin::OnLowMemory¶
void CChitin::OnLowMemory();
Remarks
CChitin::OnMixerInitialize¶
virtual void CChitin::OnMixerInitialize();
Remarks
CChitin::OnMultiplayerPlayerJoin¶
Event action when a player joins a multiplayer game session
virtual void CChitin::OnMultiplayerPlayerJoin(int __formal);
Parameters
int
__formal -
Remarks
See also CBaldurChitin::OnMultiplayerPlayerJoin
CChitin::OnMultiplayerPlayerLeave¶
Event action when a player leaves a multiplayer game session
virtual void CChitin::OnMultiplayerPlayerLeave(int __formal);
Parameters
int
__formal -
Remarks
See also CBaldurChitin::OnMultiplayerPlayerLeave
CChitin::OnMultiplayerPlayerVisible¶
Event action when a player in a multiplayer game session becomes visible to other existing players
virtual void CChitin::OnMultiplayerPlayerVisible(int __formal);
Parameters
int
__formal -
Remarks
See also CBaldurChitin::OnMultiplayerPlayerVisible
CChitin::OnMultiplayerSessionClose¶
Event action when a multiplayer game session closes
virtual void CChitin::OnMultiplayerSessionClose();
Remarks
See also CBaldurChitin::OnMultiplayerSessionClose
CChitin::OnMultiplayerSessionOpen¶
Event action when a multiplayer game session opens
virtual void CChitin::OnMultiplayerSessionOpen(CString& __formal);
Parameters
CString& __formal -
Remarks
See also CBaldurChitin::OnMultiplayerSessionOpen
CChitin::OnMultiplayerSessionToClose¶
Event action when a multiplayer game session is about to close
virtual void CChitin::OnMultiplayerSessionToClose();
Remarks
See also CBaldurChitin::OnMultiplayerSessionToClose
CChitin::OnResizeWindow¶
Event action for when window is being resized
void CChitin::OnResizeWindow(
int w,
int h);
Parameters
int
w - new width of main windowint
h - new height of main window
Remarks
CChitin::MessageCallback¶
virtual int CChitin::MessageCallback(unsigned char* __formal);
Parameters
unsigned char* __formal -
Return Value
Returns an int
value
Remarks
CChitin::ParseCommandLine¶
Parses the command line passed to the game executable
void CChitin::ParseCommandLine();
Remarks
The command line accepts the following recognised options and parameters:
+host
"201.48.99.234"
- address of the host machine for all players to connect to+connect
"201.48.99.234"
- address of machine to connect to that is hosting the session+name
"Super5Gang Adventure"
- custom description of the hosted session+password
"mypassword"
- secure the online session with a custom password+newgame
- specified a new multiplayer game is to be created+loadgame
- specifies an existing game+hostname
"Boo"
- name of the host machine+location
"location"
- location+maxplayers
"5"
- specified max players to allow: 1-6+tob
- multiplayer game is set for Throne of Bhaal
Options are preceded with a +
, parameter values can be enclosed in quotes "
Note
After some reasech it has been determined that this method does not work in the EE games, it can be considered legacy code that was originally intended to work with GameSpy networking.
CChitin::PreLoadFonts¶
Preload fonts for game
virtual void CChitin::PreLoadFonts();
Remarks
CChitin::ProcessEvents¶
int CChitin::ProcessEvents();
Return Value
Returns an int
value
Remarks
CChitin::ReadIniFiles¶
void CChitin::ReadIniFiles();
Remarks
CChitin::RedrawScreen¶
virtual void CChitin::RedrawScreen();
Remarks
CChitin::Resume¶
void CChitin::Resume();
Remarks
CChitin::SetCDSwitchActivateEngine¶
virtual void CChitin::SetCDSwitchActivateEngine(int bValue);
Parameters
int
bValue - true or false
Remarks
CChitin::SetCDSwitchStatus¶
virtual void CChitin::SetCDSwitchStatus(unsigned char __formal);
Parameters
unsigned char
__formal -
Remarks
CChitin::SelectEngine¶
virtual void CChitin::SelectEngine(CWarp* pNewEngine);
Parameters
CWarp* pNewEngine - pointer to new engine to select
Remarks
CChitin::SetupPanels¶
virtual void CChitin::SetupPanels();
Remarks
CChitin::SetProgressBar¶
Set progress bar on screen
virtual void CChitin::SetProgressBar(unsigned char __formal);
Parameters
unsigned char
__formal -
Remarks
CChitin::SetProgressBarActivateEngine¶
virtual void CChitin::SetProgressBarActivateEngine(int bValue);
Parameters
int
bValue - true or false
Remarks
CChitin::SetRenderCount¶
virtual void CChitin::SetRenderCount(unsigned char nCount);
Parameters
unsigned char
nCount - set render count
Remarks
CChitin::SetSoundVolumes¶
virtual void CChitin::SetSoundVolumes();
Remarks
CChitin::ShowVirtualKeyboard¶
void CChitin::ShowVirtualKeyboard(int multiline);
Parameters
int
multiline - true or false to show multiline virtual keyboard
Remarks
See also CChitin::HideVirtualKeyboard
CChitin::ShutDown¶
virtual void CChitin::ShutDown(
int nLineNumber,
const char* szFileName,
const char* text);
Parameters
int
nLineNumber - line number that shutdown occured atconst char
* szFileName - file that shutdown occured atconst char
* text - message text for shutdown reason to output to log
Remarks
CChitin::SynchronousUpdate¶
virtual void CChitin::SynchronousUpdate();
Remarks
CChitin::UninitSound¶
unsigned char CChitin::UninitSound();
Return Value
Returns unsigned char
Remarks
CChitin::Update¶
void CChitin::Update();
Remarks
CChitin::WinMain¶
Main entry point function for windows OS build
int CChitin::WinMain();
Return Value
Returns an int
value
Remarks