Files
source/Laptop/IMP MainPage.cpp
T
Wanne 7ca53fadc7 *** MERGED source code from development trunk revision 4890 up to latest current revision 5105 ***
Development Trunk (now obsolete): https://ja2svn.dyndns.org/source/ja2/branches/Wanne/JA2%201.13%20MP
A detailed list of all the features (changes) is visible in the history log of the development trunk:

INFO: There will be no further development in the development source trunk, so is obsolete from now on!

This commit contains the following features (bugfixes are not listed):

- New Feature: Show merc ranks in Strategy Screen before merc name
o Toggle on/off in the ingame options screen
o For each experience level (0-10) there are defined rank names in the language specific text files
o Additional language text that is not translated yet is marked with // TODO.Translate

- New Feature: Faster Bobby Ray Shipments
o This feature is selectable in the ja2_options.ini
o When activated Bobby Ray shipments will be really fast
-> Overnight Express: 5 - 7 hours
-> Air Service: 10, 12 or 14 hours
-> Standard Service: 15, 18 or 21 hours
o In a multiplayer game, this feature is disabled (because shipment arrive immediately in the destination sector)

- New Feature: AP cost for manipulating the merc inventory
o This feature is selectable in the start new game screen
o For example, putting a weapon from hand in the backpack costs APs
o The AP costs are defined in the APBPConstants.ini
o In a multiplayer game, this feature is disabled

- New Feature: Added possibility to set individual Gear Kit names
o Set individual names in the optional new tag <mGearKitName> inside the <GEARKIT> root element (File: TableData\MercStartingGear.xml)

- New Feature: Externalized the maximum purchase amount (JA2 vanilla: 10) for Bobby Rays purchases per shipment
o Define the max. amount in the ja2_options.ini: BOBBY_RAY_MAX_PURCHASE_AMOUNT, Range: 10 - 100)
o Nice scrolling bars to scroll through all the purchases

- New Feature: Now it is possible to walk on "water" tiles or handle those tiles like "normal" tiles 
o (instead of showing the swimming animation and counting the APs for swimming), when the soldier is located on the second level (level > 0)

- New Feature: Externalized AIM Veterans laptop site
o Add maximum of 4 pages
o Add  new AIM to veterans page, and remove AIM from veterans page.
o New XML file: OldAIMArchive.xml (language specific XML files: *.OldAIMArchive.xml)

- New Feature: Added possibility to choose from 254 IMP faces
o Modified IMPPortraits.xml
o Added new GameDir folder "IMPFaces" which contains the IMP face portraits
o Moved IMP faces in the new "IMPFaces" folder

- New Feature: ARSP - All Resolution Support Project
o See here: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=298698&page=1
o Support any kind of screen resolution. This works by choosing the matching full supported resolution (640x480, 800x600, 1024x768) and then centering the graphics
o See ja2.ini for defining the screen resolution

- New Feature: AI Turn Speed Up (FF-MOD)
o see here: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=298699#Post298699
o When this feature is activated it allows fast enemy turns
o New entry in ja2.ini to enable this feature: HIGHSPEED_TIMER = TRUE
o Turn on/off auto fast turns in ingame options
o New ja2_options.ini settings for fine tuning: [Clock Settings] ini block

- New Feature: "Lock" / "Release" mouse cursor in tactical windowed mode, so the mouse can stay within window boundary
o This is very helpful for doing scrolling with the mouse (by moving the mouse to the window edge) in windowed mode
o You can toggle on/off the feature by pressing CTRL + Z. It is also possible to press CTRL + Y. So the user can decide which fits better :)
o Whenever you toggle on/off a screen message appears on the tactical log to notify the player

- New Feature: Weapon overheating
o Basically, every shot fired from a gun increases its temperature. On higher temperatures, the gun jams more frequently
o On/off toggle in the ingame options
o Graphical thermometer indication on the weapon picture
o New ja2_options.ini section with a few options, Section: [Tactical Weapon Overheating Settings]
o XML changes (New Tags)
--> AmmoTypes.xml: <temperatureModificator>
--> Items.xml: <barrel>, <usOverheatingCooldownFactor>
--> Weapons.xml: <usOverheatingJamThreshold>, <usOverheatingDamageThreshold>, <usOverheatingSingleShotTemperature>
o Added a few barells to Items.xml (end of the file)
o more infos: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=301059&page=1

- New Feature: Resting weapons on a surfaces
o You can now rest your weapon on crates, low walls, rocks, debris, open windows etc. while you are crouched. Resting will give yu the superior gun handling modifiers from PRONE position.
o A little 'A' on your gun indicates if you are resting it or not.
o Both settings can be turned on and off in Ja2_Options.ini under 'Tactical Gameplay Settings'

- New Feature: Externalized option on whether mercs can exit sector using grid exit in turn based mode
o new ja2_options.ini property: GRID_EXIT_IN_TURNBASED
o This ini setting does not affect leaving sectors on map edges

- Rework/Update: Ammo boxes and Ammo crates
o Ammo crate items added for remaining calibers.  Tweaked prices to correspond to magazines, tweaked capacities and weights to be reasonable (~800 or less).
o Shift-R reload now looks at both boxes and crates in sector items and merc's inventory to reload, and tops off magazines in inventory as well.  Only possible outside of combat.
o Ctrl-Shift-A still creates crates as per usual, with some fixes to ensure all ammo is caught on the first press.
o Shift-A now creates ammo boxes in the same loop.  They mostly behave like crates, but fit in mercs inventories.
o Ammo boxes are available to purchase at BR and tony, sam, etc.  Individual magazines/drums/etc are no longer available.
o Removed ammo crate xml tag.  Added ubMagType tag to Magazines array.  This allows us to differentiate between magazines, bullets, boxes and crates.
o Changed ammo filtering in BR's to display boxes appropriately.  Added back the "Mag:" display (changed text to "Size:")
o Added ja2set.dat.xml file (WF map version in WF maps folder) to be used instead of ja2set.dat file (ja2.ini setting added) For now, if you want to play vanilla instead, just change the setting in the ini (see comments in file).
o Added P4-P9Items image files (up to 5k images each) and tileslots.  1.13 core items will continue to use Guns and P1-P3Items for the foreseeable future.  P4-P9 can be used by customizers/modders to avoid conflicts with Guns/P1-P3 items.  TODO: Need to discuss a strategy for this in the forums.
o Added in Ambient/0.bad and 32.bad to avoid an exception in the code.
o Updated the XML Editor
o Standardized the text on all the ammo items.

- New Multiplayer Feature: Sharing same FOV (field of view) in a coop/team-dm (for friendly teams) game
o You will also see enemies, that your teammate sees

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5108 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-03-23 18:46:54 +00:00

1211 lines
32 KiB
C++

#ifdef PRECOMPILEDHEADERS
#include "Laptop All.h"
#else
#include "IMP MainPage.h"
#include "CharProfile.h"
#include "IMPVideoObjects.h"
#include "Utilities.h"
#include "WCheck.h"
#include "Debug.h"
#include "WordWrap.h"
#include "Render Dirty.h"
#include "Encrypted File.h"
#include "cursors.h"
#include "laptop.h"
#include "finances.h"
#include "IMP Attribute Selection.h"
#include "IMP Text System.h"
#include "IMP Finish.h"
#include "mousesystem.h"
#include "Merc Hiring.h"
#include "LaptopSave.h"
#include "IMP Compile Character.h"
#include "IMP Portraits.h"
#include "soldier profile type.h"
#include "GameSettings.h"
#include "Soldier Profile.h"
#include "Squads.h"
#endif
#include "IMP Confirm.h"
#define MAIN_PAGE_BUTTON_TEXT_WIDTH 95
#define MAIN_PAGE_SPACE_BTN_BUTTONS 120
#define MAIN_PAGE__FIRST_BUTTON_POS_X ( LAPTOP_SCREEN_UL_X + 15 )
#define MAIN_PAGE__SECOND_BUTTON_POS_X ( MAIN_PAGE__FIRST_BUTTON_POS_X + MAIN_PAGE_SPACE_BTN_BUTTONS )
#define MAIN_PAGE__THIRD_BUTTON_POS_X ( MAIN_PAGE__SECOND_BUTTON_POS_X + MAIN_PAGE_SPACE_BTN_BUTTONS )
#define MAIN_PAGE__FOURTH_BUTTON_POS_X ( MAIN_PAGE__THIRD_BUTTON_POS_X + MAIN_PAGE_SPACE_BTN_BUTTONS )
// main page buttons
INT32 giIMPMainPageButton[6];
INT32 giIMPMainPageButtonImage[6];
// mouse regions for not entablable warning
MOUSE_REGION pIMPMainPageMouseRegions[ 4 ];
UINT32 guiCHARACTERPORTRAITFORMAINPAGE;
// function definitions
void CreateIMPMainPageButtons( void );
void DeleteIMPMainPageButtons( void );
void BtnIMPMainPageBackCallback(GUI_BUTTON *btn,INT32 reason);
void BtnIMPMainPageBeginCallback(GUI_BUTTON *btn,INT32 reason);
void BtnIMPMainPagePersonalityCallback(GUI_BUTTON *btn,INT32 reason);
void BtnIMPMainPagePortraitCallback(GUI_BUTTON *btn,INT32 reason);
void BtnIMPMainPageAttributesCallback(GUI_BUTTON *btn,INT32 reason);
void BtnIMPMainPagePortraitCallback(GUI_BUTTON *btn,INT32 reason);
void BtnIMPMainPageVoiceCallback(GUI_BUTTON *btn,INT32 reason);
void ShadeUnSelectableButtons( void );
void UpDateIMPMainPageButtons( void );
void BeginMessageBoxCallBack( UINT8 bExitValue );
void DestoryMouseRegionsForIMPMainPageBasedOnCharGenStatus( void );
void CreateMouseRegionsForIMPMainPageBasedOnCharGenStatus( void );
void IMPMainPageNotSelectableBtnCallback(MOUSE_REGION * pRegion, INT32 iReason );
BOOLEAN LoadCharacterPortraitForMainPage( void );
BOOLEAN IMP_CanWeDisplayVoiceGraph( );
BOOLEAN IMP_CanWeDisplaySpecialtiesGraph( );
BOOLEAN IMP_CanWeDisplayAttributeGraph( );
BOOLEAN IMP_CanWeDisplayPortrait( );
BOOLEAN CheckIfFinishedCharacterGeneration( void );
// this is the current state of profiling the player is in.
/*
0 - Beginning
1 - Personnality
2 - Attributes and Skills
3 - Portrait
4 - Voice
5 - Done
*/
INT32 iCurrentProfileMode = IMP__REGISTRY;
extern INT32 iCurrentVoice;
// Return a count of how many IMP slots there are in total
INT32 CountIMPSlots()
{
INT32 idx;
// Keep a static count so we only count once
static INT32 iMaxIMPs = -1;
if (iMaxIMPs != -1)
return iMaxIMPs;
iMaxIMPs = 0;
// Count the males
for (idx = GetFirstMaleSlot(); idx <= GetLastMaleSlot(); ++idx)
{
++iMaxIMPs;
}
// Count the females
for (idx = GetFirstFemaleSlot(); idx <= GetLastFemaleSlot(); ++idx)
{
++iMaxIMPs;
}
Assert(iMaxIMPs > 0);
return iMaxIMPs;
}
INT32 GetFirstSlot(INT8 iSex)
{
if (iSex == MALE)
return GetFirstMaleSlot();
else if (iSex == FEMALE)
return GetFirstFemaleSlot();
else {
return GetFirstMaleSlot();
}
}
INT32 GetLastSlot(INT8 iSex)
{
if (iSex == MALE)
return GetLastMaleSlot();
else if (iSex == FEMALE)
return GetLastFemaleSlot();
else {
return GetLastFemaleSlot();
}
}
INT32 GetFirstFreeSlot(INT8 iSex) {
INT32 iStart = GetFirstSlot(iSex);
INT32 iEnd = GetLastSlot(iSex);
INT32 idx;
for (idx = iStart; idx <= iEnd; ++idx)
{
if (IsIMPSlotFree(gGameExternalOptions.iaIMPSlots[idx]) == TRUE)
return idx;
}
return -1;
}
// Return a count of how many IMP slots there are for males
INT32 CountMaleIMPSlots() {
INT32 idx;
// Keep a static count so we only count once
static INT32 iMaxMaleIMPS = -1;
if (iMaxMaleIMPS != -1)
return iMaxMaleIMPS;
iMaxMaleIMPS = 0;
for (idx = GetFirstMaleSlot(); idx <= GetLastMaleSlot(); ++idx)
// Count the males
{
++iMaxMaleIMPS;
}
Assert(iMaxMaleIMPS > 0);
return iMaxMaleIMPS;
}
INT32 GetFirstMaleSlot() {
Assert(gGameExternalOptions.iaIMPSlots[0] != -1);
return 0;
}
INT32 GetLastMaleSlot() {
// Keep a static count so we only count once
static INT32 idx = -1;
if (idx != -1)
return idx;
idx = 0;
// Skip the males
while (gGameExternalOptions.iaIMPSlots[idx] != -1)
{
++idx;
}
--idx;
Assert(idx >= 0);
Assert(gGameExternalOptions.iaIMPSlots[idx] != -1);
return idx;
}
// Return a count of how many IMP slots there are for females
INT32 CountFemaleIMPSlots() {
INT32 idx;
// Keep a static count so we only count once
static INT32 iMaxFemaleIMPS = -1;
if (iMaxFemaleIMPS != -1)
return iMaxFemaleIMPS;
iMaxFemaleIMPS = 0;
for (idx = GetFirstFemaleSlot(); idx <= GetLastFemaleSlot(); ++idx)
// Count the males
{
++iMaxFemaleIMPS;
}
Assert(iMaxFemaleIMPS > 0);
return iMaxFemaleIMPS;
}
INT32 GetFirstFemaleSlot() {
// Keep a static count so we only count once
static INT32 idx = -1;
if (idx != -1)
return idx;
idx = 0;
// Skip the males
while (gGameExternalOptions.iaIMPSlots[idx] != -1)
{
++idx;
}
++idx;
Assert(idx >= 0);
Assert(gGameExternalOptions.iaIMPSlots[idx] != -1);
return idx;
}
INT32 GetLastFemaleSlot() {
// Keep a static count so we only count once
static INT32 idx = -1;
if (idx != -1)
return idx;
idx = 0;
// Skip the males
while (gGameExternalOptions.iaIMPSlots[idx] != -1)
{
++idx;
}
++idx;
// Skip the females
while (gGameExternalOptions.iaIMPSlots[idx] != -1)
{
++idx;
}
--idx;
Assert(idx >= 0);
Assert(gGameExternalOptions.iaIMPSlots[idx] != -1);
return idx;
}
INT32 GetVoiceCountFromVoiceSlot(INT32 iSlot) {
if (iSlot <= GetLastMaleSlot())
return iSlot - GetFirstMaleSlot() + 1;
else
return iSlot - GetFirstFemaleSlot() + 1;
}
BOOLEAN IsIMPSlotFree(INT32 iIMPId)
{
if ((iIMPId >= 0) && (iIMPId < NUM_PROFILES) &&
((wcscmp(gMercProfiles[iIMPId].zName, L"") == 0) ||
(gMercProfiles[iIMPId].bMercStatus == MERC_IS_DEAD)))
{
return TRUE;
}
else
{
return FALSE;
}
}
void EnterIMPMainPage( void )
{
// turn off review mode
fReviewStats = FALSE;
// create buttons
CreateIMPMainPageButtons( );
// load portrait for face button, if applicable
LoadCharacterPortraitForMainPage( );
// create button masks for this screen
CreateMouseRegionsForIMPMainPageBasedOnCharGenStatus( );
// alter states
UpDateIMPMainPageButtons( );
// entry into IMP about us page
RenderIMPMainPage( );
return;
}
void ExitIMPMainPage( void )
{
// exit from IMP About us page
// delete Buttons
DeleteIMPMainPageButtons( );
DestoryMouseRegionsForIMPMainPageBasedOnCharGenStatus( );
return;
}
void RenderIMPMainPage( void )
{
// rneders the IMP about us page
// the background
RenderProfileBackGround( );
// the IMP symbol
//RenderIMPSymbol( 106, 1 );
// indent
RenderMainIndentFrame( 164, 74 );
return;
}
void HandleIMPMainPage( void )
{
// handles the IMP about main page
if ( CheckIfFinishedCharacterGeneration( ) )
{
iCurrentImpPage = IMP_FINISH;
}
// shade out buttons that should be shaded/unselectable
//ShadeUnSelectableButtons( );
return;
}
//
// this function will create the buttons needed for th IMP about us page
//
void CreateIMPMainPageButtons( void )
{
CHAR16 sString[ 128 ];
// the back button button
giIMPMainPageButtonImage[0]= LoadButtonImage( "LAPTOP\\button_3.sti" ,-1,0,-1,1,-1 );
/* giIMPMainPageButton[0] = QuickCreateButton( giIMPMainPageButtonImage[0], LAPTOP_SCREEN_UL_X + 10 , LAPTOP_SCREEN_WEB_UL_Y + ( 360 ),
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPageBackCallback);
*/
//Cancel/back button
giIMPMainPageButton[0] = CreateIconAndTextButton( giIMPMainPageButtonImage[0], pImpButtonText[ 19 ], FONT12ARIAL,
FONT_WHITE, DEFAULT_SHADOW,
FONT_WHITE, DEFAULT_SHADOW,
TEXT_CJUSTIFIED,
LAPTOP_SCREEN_UL_X + 15, LAPTOP_SCREEN_WEB_UL_Y + ( 360 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPageBackCallback);
SpecifyButtonTextSubOffsets( giIMPMainPageButton[0], 0, -1, FALSE );
// the begin profiling button
giIMPMainPageButtonImage[1]= LoadButtonImage( "LAPTOP\\button_2.sti" ,-1,0,-1,1,-1 );
/*giIMPMainPageButton[1] = QuickCreateButton( giIMPMainPageButtonImage[1], LAPTOP_SCREEN_UL_X + 136 , LAPTOP_SCREEN_WEB_UL_Y + ( 174 ),
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPageBeginCallback);
*/
//Registry/Begin button
if(( iCurrentProfileMode == IMP__REGISTRY )||( iCurrentProfileMode > IMP__ATTRIBUTES) )
{
giIMPMainPageButton[1] = CreateIconAndTextButton( giIMPMainPageButtonImage[ 1 ], pImpButtonText[ 1 ], FONT12ARIAL,
FONT_WHITE, DEFAULT_SHADOW,
FONT_WHITE, DEFAULT_SHADOW,
TEXT_CJUSTIFIED,
LAPTOP_SCREEN_UL_X + 136 , LAPTOP_SCREEN_WEB_UL_Y + ( 174 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPageBeginCallback);
}
else
{
giIMPMainPageButton[1] = CreateIconAndTextButton( giIMPMainPageButtonImage[ 1 ], pImpButtonText[ 22 ], FONT12ARIAL,
FONT_WHITE, DEFAULT_SHADOW,
FONT_WHITE, DEFAULT_SHADOW,
TEXT_CJUSTIFIED,
LAPTOP_SCREEN_UL_X + 136 , LAPTOP_SCREEN_WEB_UL_Y + ( 174 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPageBeginCallback);
}
// the personality button
giIMPMainPageButtonImage[2]= LoadButtonImage( "LAPTOP\\button_8.sti" ,-1,0,-1,1,-1 );
/*
giIMPMainPageButton[2] = QuickCreateButton( giIMPMainPageButtonImage[2], LAPTOP_SCREEN_UL_X + 13 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ),
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPagePersonalityCallback);
*/
//Personality
giIMPMainPageButton[2] = CreateIconAndTextButton( giIMPMainPageButtonImage[ 2 ], pImpButtonText[ 2 ], FONT12ARIAL,
FONT_WHITE, DEFAULT_SHADOW,
FONT_WHITE, DEFAULT_SHADOW,
TEXT_CJUSTIFIED,
MAIN_PAGE__THIRD_BUTTON_POS_X, LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPagePersonalityCallback);
if( IMP_CanWeDisplaySpecialtiesGraph( ) )
{
SpecifyButtonIcon( giIMPMainPageButton[2], guiANALYSE, 0, 33, 23, FALSE );
}
// the attribs button
giIMPMainPageButtonImage[3]= LoadButtonImage( "LAPTOP\\button_8.sti" ,-1,0,-1,1,-1 );
/*
giIMPMainPageButton[3] = QuickCreateButton( giIMPMainPageButtonImage[3], LAPTOP_SCREEN_UL_X + 133 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ),
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPageAttributesCallback);
*/
//Attributes
giIMPMainPageButton[3] = CreateIconAndTextButton( giIMPMainPageButtonImage[ 3 ], pImpButtonText[ 3 ], FONT12ARIAL,
FONT_WHITE, DEFAULT_SHADOW,
FONT_WHITE, DEFAULT_SHADOW,
TEXT_CJUSTIFIED,
MAIN_PAGE__FOURTH_BUTTON_POS_X, LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPageAttributesCallback);
if( IMP_CanWeDisplayAttributeGraph( ) )
{
SpecifyButtonIcon( giIMPMainPageButton[3], guiATTRIBUTEGRAPH, 0, 25, 25, FALSE );
}
// the portrait button
giIMPMainPageButtonImage[4]= LoadButtonImage( "LAPTOP\\button_8.sti" ,-1,0,-1,1,-1 );
/*giIMPMainPageButton[4] = QuickCreateButton( giIMPMainPageButtonImage[4], LAPTOP_SCREEN_UL_X + 253 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ),
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPagePortraitCallback);
*/
//Portrait
giIMPMainPageButton[4] = CreateIconAndTextButton( giIMPMainPageButtonImage[ 4 ], pImpButtonText[ 4 ], FONT12ARIAL,
FONT_WHITE, DEFAULT_SHADOW,
FONT_WHITE, DEFAULT_SHADOW,
TEXT_CJUSTIFIED,
MAIN_PAGE__FIRST_BUTTON_POS_X, LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPagePortraitCallback);
// the voice button
giIMPMainPageButtonImage[5]= LoadButtonImage( "LAPTOP\\button_8.sti" ,-1,0,-1,1,-1 );
/*giIMPMainPageButton[5] = QuickCreateButton( giIMPMainPageButtonImage[5], LAPTOP_SCREEN_UL_X + 373 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ),
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPageVoiceCallback);
*/
// Changed to display "Character" instead of "Voice" - SANDRO
//if( iCurrentProfileMode != IMP__VOICE && iCurrentProfileMode != IMP__PORTRAIT )
//{
// swprintf( sString, pImpButtonText[ 5 ], GetVoiceCountFromVoiceSlot(iCurrentVoice) );
//}
//else
//{
swprintf( sString, pImpButtonText[ 25 ] ); // "Character"
//}
//Voice
giIMPMainPageButton[5] = CreateIconAndTextButton( giIMPMainPageButtonImage[ 5 ], sString, FONT12ARIAL,
FONT_WHITE, DEFAULT_SHADOW,
FONT_WHITE, DEFAULT_SHADOW,
TEXT_CJUSTIFIED,
MAIN_PAGE__SECOND_BUTTON_POS_X, LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPageVoiceCallback);
if( IMP_CanWeDisplayVoiceGraph( ) )
{
SpecifyButtonIcon( giIMPMainPageButton[5], guiSMALLSILHOUETTE, 0, 33, 23, FALSE );
}
SetButtonCursor(giIMPMainPageButton[ 0 ], CURSOR_WWW);
SetButtonCursor(giIMPMainPageButton[ 1 ], CURSOR_WWW);
SetButtonCursor(giIMPMainPageButton[ 2 ], CURSOR_WWW);
SetButtonCursor(giIMPMainPageButton[ 3 ], CURSOR_WWW);
SetButtonCursor(giIMPMainPageButton[ 4 ], CURSOR_WWW);
SetButtonCursor(giIMPMainPageButton[ 5 ], CURSOR_WWW);
SpecifyButtonTextOffsets( giIMPMainPageButton[ 2 ], 10, 40, TRUE );
SpecifyButtonTextOffsets( giIMPMainPageButton[ 3 ], 10, 40, TRUE );
SpecifyButtonTextOffsets( giIMPMainPageButton[ 4 ], 10, 40, TRUE );
SpecifyButtonTextOffsets( giIMPMainPageButton[ 5 ], 10, 40, TRUE );
SpecifyButtonTextWrappedWidth( giIMPMainPageButton[ 2 ], MAIN_PAGE_BUTTON_TEXT_WIDTH);
SpecifyButtonTextWrappedWidth( giIMPMainPageButton[ 3 ], MAIN_PAGE_BUTTON_TEXT_WIDTH);
SpecifyButtonTextWrappedWidth( giIMPMainPageButton[ 4 ], MAIN_PAGE_BUTTON_TEXT_WIDTH);
SpecifyButtonTextWrappedWidth( giIMPMainPageButton[ 5 ], MAIN_PAGE_BUTTON_TEXT_WIDTH);
return;
}
void DeleteIMPMainPageButtons( void )
{
// this function destroys the buttons needed for the IMP about Us Page
// the back button
RemoveButton(giIMPMainPageButton[0] );
UnloadButtonImage(giIMPMainPageButtonImage[0] );
// begin profiling button
RemoveButton(giIMPMainPageButton[1] );
UnloadButtonImage(giIMPMainPageButtonImage[1] );
// begin personna button
RemoveButton(giIMPMainPageButton[2] );
UnloadButtonImage(giIMPMainPageButtonImage[2] );
// begin attribs button
RemoveButton(giIMPMainPageButton[3] );
UnloadButtonImage(giIMPMainPageButtonImage[3] );
// begin portrait button
RemoveButton(giIMPMainPageButton[4] );
UnloadButtonImage(giIMPMainPageButtonImage[4] );
// begin voice button
RemoveButton(giIMPMainPageButton[5] );
UnloadButtonImage(giIMPMainPageButtonImage[5] );
return;
}
void BtnIMPMainPageBackCallback(GUI_BUTTON *btn,INT32 reason)
{
// btn callback for IMP Homepage About US button
if (!(btn->uiFlags & BUTTON_ENABLED))
return;
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
{
btn->uiFlags|=(BUTTON_CLICKED_ON);
}
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
{
if (btn->uiFlags & BUTTON_CLICKED_ON)
{
btn->uiFlags&=~(BUTTON_CLICKED_ON);
iCurrentImpPage = IMP_HOME_PAGE;
fButtonPendingFlag = TRUE;
iCurrentProfileMode = IMP__REGISTRY;
fFinishedCharGeneration = FALSE;
ResetCharacterStats( );
}
}
}
void BtnIMPMainPageBeginCallback(GUI_BUTTON *btn,INT32 reason)
{
// btn callback for Main Page Begin Profiling
if (!(btn->uiFlags & BUTTON_ENABLED))
return;
// too far along to change gender
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
{
btn->uiFlags|=(BUTTON_CLICKED_ON);
}
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
{
if (btn->uiFlags & BUTTON_CLICKED_ON)
{
btn->uiFlags&=~(BUTTON_CLICKED_ON);
// are we going to change name, or do we have to start over from scratch
if( iCurrentProfileMode > IMP__ATTRIBUTES )
{
// too far along, restart
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 1 ], LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, BeginMessageBoxCallBack);
}
else
{
//if( LaptopSaveInfo.iCurrentBalance < COST_OF_PROFILE )
if( LaptopSaveInfo.iCurrentBalance < iGetProfileCost() ) // SANDRO - changed to find actual profile cost in IMPConfirm
{
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 3 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, BeginMessageBoxCallBack);
}
else if( NumberOfMercsOnPlayerTeam() >= gGameExternalOptions.ubGameMaximumNumberOfPlayerMercs )
{
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 5 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, BeginMessageBoxCallBack);
}
else
{
// change name
iCurrentImpPage = IMP_BEGIN;
fButtonPendingFlag = TRUE;
}
}
}
}
}
void BtnIMPMainPagePersonalityCallback(GUI_BUTTON *btn,INT32 reason)
{
// btn callback for Main Page Begin Profiling
if (!(btn->uiFlags & BUTTON_ENABLED))
return;
/*
// if not this far in char generation, don't alot ANY action
if( iCurrentProfileMode != IMP__PERSONALITY )
{
btn->uiFlags&=~(BUTTON_CLICKED_ON);
return;
}
*/
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
{
btn->uiFlags|=(BUTTON_CLICKED_ON);
}
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
{
if (btn->uiFlags & BUTTON_CLICKED_ON)
{
btn->uiFlags&=~(BUTTON_CLICKED_ON);
iCurrentImpPage = IMP_PERSONALITY;
fButtonPendingFlag = TRUE;
}
}
}
void BtnIMPMainPageAttributesCallback(GUI_BUTTON *btn,INT32 reason)
{
// btn callback for Main Page Begin Profiling
if (!(btn->uiFlags & BUTTON_ENABLED))
return;
// if not this far in char generation, don't alot ANY action
if( iCurrentProfileMode < IMP__ATTRIBUTES )
{
btn->uiFlags&=~(BUTTON_CLICKED_ON);
return;
}
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
{
btn->uiFlags|=(BUTTON_CLICKED_ON);
}
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
{
if (btn->uiFlags & BUTTON_CLICKED_ON)
{
btn->uiFlags&=~(BUTTON_CLICKED_ON);
iCurrentImpPage = IMP_ATTRIBUTE_ENTRANCE;
fButtonPendingFlag = TRUE;
}
}
}
void BtnIMPMainPagePortraitCallback(GUI_BUTTON *btn,INT32 reason)
{
// btn callback for Main Page Begin Profiling
if (!(btn->uiFlags & BUTTON_ENABLED))
return;
// if not this far in char generation, don't alot ANY action
if( ( iCurrentProfileMode != IMP__PORTRAIT )&&( iCurrentProfileMode != IMP__VOICE ) && ( iCurrentProfileMode > IMP__FINISH ) )
{
btn->uiFlags&=~(BUTTON_CLICKED_ON);
return;
}
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
{
btn->uiFlags|=(BUTTON_CLICKED_ON);
}
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
{
if (btn->uiFlags & BUTTON_CLICKED_ON)
{
btn->uiFlags&=~(BUTTON_CLICKED_ON);
iCurrentImpPage = IMP_PORTRAIT;
fButtonPendingFlag = TRUE;
}
}
}
void BtnIMPMainPageVoiceCallback(GUI_BUTTON *btn,INT32 reason)
{
// btn callback for Main Page Begin Profiling
if (!(btn->uiFlags & BUTTON_ENABLED))
return;
// if not this far in char generation, don't alot ANY action
if( ( iCurrentProfileMode != IMP__PORTRAIT ) && ( iCurrentProfileMode > IMP__FINISH ) )
{
btn->uiFlags&=~(BUTTON_CLICKED_ON);
return;
}
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
{
btn->uiFlags|=(BUTTON_CLICKED_ON);
}
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
{
if (btn->uiFlags & BUTTON_CLICKED_ON)
{
btn->uiFlags&=~(BUTTON_CLICKED_ON);
// changed to go to character analysis - SANDRO
iCurrentImpPage = IMP_CHARACTER_AND_DISABILITY_ENTRANCE;
//iCurrentImpPage = IMP_VOICE;
fButtonPendingFlag = TRUE;
}
}
}
void NextProfilingMode( void )
{
// this function will change to mode the player is in for profiling
// if less than done
if(iCurrentProfileMode < IMP__VOICE)
iCurrentProfileMode++;
return;
}
BOOLEAN CheckIfFinishedCharacterGeneration( void )
{
// this function checks to see if character is done character generation
// are we done character generation
if( iCurrentProfileMode == IMP__FINISH )
{
// yes
return ( TRUE );
}
else
{
// no
return ( FALSE );
}
}
void ShadeUnSelectableButtons( void )
{
INT32 iCounter =0;
// this function looks at the status ofiCurrentProfileMode and decides which buttons
// should be shaded ( unselectable )
for( iCounter = iCurrentProfileMode; iCounter < 5; iCounter++ )
{
ShadowVideoSurfaceRect( FRAME_BUFFER, 13 + (iCounter ) * 120 + 114, 245, 13 + ( iCounter + 1 ) * 120 + 90, 245 + 92 );
InvalidateRegion(13 + (iCounter ) * 120 + 114, 245, 13 + (iCounter ) * 120 + 114, 245 + 92 );
}
fMarkButtonsDirtyFlag = FALSE;
return;
}
void UpDateIMPMainPageButtons( void )
{
// update mainpage button states
INT32 iCount = 0;
// disable all
for( iCount = 2; iCount < 6; iCount++)
{
DisableButton( giIMPMainPageButton[ iCount ] );
}
for( iCount = 0; iCount < 4; iCount++ )
{
MSYS_DisableRegion( &pIMPMainPageMouseRegions[ iCount ]);
}
// enable
switch( iCurrentProfileMode )
{
//begin
case IMP__REGISTRY:
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 0 ]);
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 1 ]);
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 2 ]);
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 3 ]);
break;
//Personality ( 3RD BUTTON )
case IMP__PERSONALITY:
EnableButton( giIMPMainPageButton[2] );
EnableButton( giIMPMainPageButton[4] );
EnableButton( giIMPMainPageButton[5] );
// MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 0 ]);
// MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 1 ]);
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 3 ]);
/*
EnableButton( giIMPMainPageButton[2] );
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 1 ]);
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 2 ]);
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 3 ]);
*/
break;
//Attributes ( 4th button )
case IMP__ATTRIBUTES:
EnableButton( giIMPMainPageButton[2] );
EnableButton( giIMPMainPageButton[4] );
EnableButton( giIMPMainPageButton[5] );
EnableButton( giIMPMainPageButton[3] );
// MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 0 ]);
// MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 1 ]);
// MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 2 ]);
/*
EnableButton( giIMPMainPageButton[3] );
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 0 ]);
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 2 ]);
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 3 ]);
*/
break;
//Portrait ( ist button
case IMP__PORTRAIT:
// EnableButton( giIMPMainPageButton[3] );
EnableButton( giIMPMainPageButton[4] );
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 1 ]);
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 2 ]);
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 3 ]);
/*
EnableButton( giIMPMainPageButton[3] );
EnableButton( giIMPMainPageButton[4] );
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 0 ]);
//MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 1 ]);
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 3 ]);
*/
break;
//Voice ( 2nd button )
case IMP__VOICE:
EnableButton( giIMPMainPageButton[4] );
EnableButton( giIMPMainPageButton[5] );
// MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 0 ]);
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 2 ]);
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 3 ]);
/*
//MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 1 ]);
MSYS_EnableRegion( &pIMPMainPageMouseRegions[ 0 ]);
EnableButton( giIMPMainPageButton[3] );
EnableButton( giIMPMainPageButton[4] );
EnableButton( giIMPMainPageButton[5] );
*/
break;
}
return;
}
void BeginMessageBoxCallBack( UINT8 bExitValue )
{
// yes, so start over, else stay here and do nothing for now
if( bExitValue == MSG_BOX_RETURN_YES )
{
iCurrentImpPage = IMP_BEGIN;
iCurrentProfileMode = IMP__REGISTRY;
}
else if( bExitValue == MSG_BOX_RETURN_OK )
{
// if ok, then we are coming from financial warning, allow continue
}
return;
}
void CreateMouseRegionsForIMPMainPageBasedOnCharGenStatus( void )
{
// this procedure will create masks for the char generation main page
// mask for personality page button
MSYS_DefineRegion( &pIMPMainPageMouseRegions[ 0 ],LAPTOP_SCREEN_UL_X + 13 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), LAPTOP_SCREEN_UL_X + 13 + 115 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ) + 93 , MSYS_PRIORITY_HIGH+5,
CURSOR_WWW, MSYS_NO_CALLBACK, IMPMainPageNotSelectableBtnCallback );
// mask for attrib page button
MSYS_DefineRegion( &pIMPMainPageMouseRegions[ 1 ],LAPTOP_SCREEN_UL_X + 133 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), LAPTOP_SCREEN_UL_X + 133 + 115 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ) + 93 , MSYS_PRIORITY_HIGH+5,
CURSOR_WWW, MSYS_NO_CALLBACK, IMPMainPageNotSelectableBtnCallback );
// mask for portrait page button
MSYS_DefineRegion( &pIMPMainPageMouseRegions[ 2 ],LAPTOP_SCREEN_UL_X + 253 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), LAPTOP_SCREEN_UL_X + 253 + 115 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ) + 93 , MSYS_PRIORITY_HIGH+5,
CURSOR_WWW, MSYS_NO_CALLBACK, IMPMainPageNotSelectableBtnCallback );
// mask for voice page button
MSYS_DefineRegion( &pIMPMainPageMouseRegions[ 3 ],LAPTOP_SCREEN_UL_X + 373 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), LAPTOP_SCREEN_UL_X + 373 + 115 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ) + 93 , MSYS_PRIORITY_HIGH+5,
CURSOR_WWW, MSYS_NO_CALLBACK, IMPMainPageNotSelectableBtnCallback );
return;
}
void DestoryMouseRegionsForIMPMainPageBasedOnCharGenStatus( void )
{
// will destroy button masks for the char gen pages
MSYS_RemoveRegion( &pIMPMainPageMouseRegions[ 0 ]);
MSYS_RemoveRegion( &pIMPMainPageMouseRegions[ 1 ]);
MSYS_RemoveRegion( &pIMPMainPageMouseRegions[ 2 ]);
MSYS_RemoveRegion( &pIMPMainPageMouseRegions[ 3 ]);
return;
}
void IMPMainPageNotSelectableBtnCallback(MOUSE_REGION * pRegion, INT32 iReason )
{
if (iReason & MSYS_CALLBACK_REASON_INIT)
{
return;
}
if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
{
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 4 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, BeginMessageBoxCallBack);
}
return;
}
// WDS: Allow flexible numbers of IMPs of each sex
INT32 CountFilledIMPSlots( INT8 iSex )
{
INT32 i;
INT32 iCount = 0;
INT32 iStart;
INT32 iEnd;
iStart = GetFirstSlot(iSex);
iEnd = GetLastSlot(iSex);
// Count the used slots
for (i = iStart; i <= iEnd; ++i)
{
if ((gGameExternalOptions.iaIMPSlots[i] != -1) &&
(!IsIMPSlotFree(gGameExternalOptions.iaIMPSlots[i])))
{
++iCount;
}
}
// Return the count of filled imp slots
return iCount;
}
INT32 CountEmptyIMPSlots( INT8 iSex )
{
INT32 i;
INT32 iCount = 0;
INT32 iStart;
INT32 iEnd;
iStart = GetFirstSlot(iSex);
iEnd = GetLastSlot(iSex);
// Count the free slots
for (i = iStart; i <= iEnd; ++i)
{
if (IsIMPSlotFree(gGameExternalOptions.iaIMPSlots[i]))
{
++iCount;
}
}
// Return the count of free imp slots
return iCount;
}
INT32 GetSexOfIMP(INT32 iIMPId)
{
INT32 ui;
//CHRISL: There is "padding" build into the iaIMPSLots array. The index after the last male and female entry are both set
// to -1. The following loop, however, does not take this into consideration. A female IMP using iIMPId 56 will never
// get setup correctly, resulting in the "Assert(FALSE)" the occurs after the loop. Since the array is initially setup
// by adding 2 to the male/female totals, do the same here.
//for (ui = 0; ui < CountIMPSlots(); ++ui)
for (ui = 0; ui < CountIMPSlots()+2; ++ui)
{
if (gGameExternalOptions.iaIMPSlots[ui] == iIMPId)
{
if (ui <= GetLastMaleSlot())
return MALE;
else
return FEMALE;
}
}
Assert(FALSE);
return MALE;
}
INT32 GetFreeIMPSlot(INT32 iIMPId, INT32 iDefaultIMPId)
{
INT32 iStart;
INT32 iEnd;
INT32 i;
UINT32 iSex = GetSexOfIMP(iIMPId);
if (iIMPId != -1)
{
// We have a default imp id (90210 or nickname)
if (iDefaultIMPId != -1)
{
if (IsIMPSlotFree(iDefaultIMPId))
{
return iDefaultIMPId;
}
}
// The default IMP id is already used, find next free imp id
// Female
if (iSex == FEMALE)
{
iStart = GetFirstFemaleSlot();
iEnd = GetLastFemaleSlot();
}
else if (iSex == MALE)
{
iStart = GetFirstMaleSlot();
iEnd = GetLastMaleSlot();
}
else
{
AssertMsg( 0, "Merc neither male nor female");
return -1;
}
// Find a free imp slot
for (i = iStart; i <= iEnd; ++i)
{
// Found a free imp slot
if (IsIMPSlotFree(gGameExternalOptions.iaIMPSlots[i]))
{
return gGameExternalOptions.iaIMPSlots[i];
}
}
}
/* Didn't find one */
return -1;
}
BOOLEAN LoadCharacterPortraitForMainPage( void )
{
// this function will load the character's portrait, to be used on portrait button
VOBJECT_DESC VObjectDesc;
if( IMP_CanWeDisplayPortrait( ) )
{
// load it
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
if( fCharacterIsMale )
{
if ( gIMPMaleValues[ iPortraitNumber ].Enabled == 1 )
{
// sprintf( VObjectDesc.ImageFile, "Faces\\%02d.sti", gIMPMaleValues[ iPortraitNumber ].PortraitId );
sprintf( VObjectDesc.ImageFile, "IMPFaces\\%02d.sti", gIMPMaleValues[ iPortraitNumber ].PortraitId );
}
}
else
{
if ( gIMPFemaleValues[ iPortraitNumber ].Enabled == 1 )
{
//sprintf( VObjectDesc.ImageFile, "Faces\\%02d.sti", gIMPFemaleValues[ iPortraitNumber ].PortraitId );
sprintf( VObjectDesc.ImageFile, "IMPFaces\\%02d.sti", gIMPFemaleValues[ iPortraitNumber ].PortraitId );
}
}
//FilenameForBPP( pPlayerSelectedFaceFileNames[ iPortraitNumber ] , VObjectDesc.ImageFile);
CHECKF(AddVideoObject(&VObjectDesc, &guiCHARACTERPORTRAITFORMAINPAGE));
// now specify
SpecifyButtonIcon( giIMPMainPageButton[4], guiCHARACTERPORTRAITFORMAINPAGE, 0,
33, 23, FALSE );
}
return( TRUE );
}
BOOLEAN IMP_CanWeDisplayPortrait( )
{
if( iCurrentProfileMode == IMP__VOICE ||
iCurrentProfileMode == IMP__ATTRIBUTES ||
iCurrentProfileMode == IMP__PERSONALITY ||
iCurrentProfileMode == IMP__FINISH )
{
return( TRUE );
}
else
{
return( FALSE );
}
}
BOOLEAN IMP_CanWeDisplayAttributeGraph( )
{
if( iCurrentProfileMode == IMP__FINISH )
{
return( TRUE );
}
else
{
return( FALSE );
}
}
BOOLEAN IMP_CanWeDisplaySpecialtiesGraph( )
{
if( iCurrentProfileMode == IMP__ATTRIBUTES ||
iCurrentProfileMode == IMP__FINISH )
{
return( TRUE );
}
else
{
return( FALSE );
}
}
BOOLEAN IMP_CanWeDisplayVoiceGraph( )
{
if( iCurrentProfileMode == IMP__ATTRIBUTES ||
// iCurrentProfileMode == IMP__VOICE ||
iCurrentProfileMode == IMP__PERSONALITY ||
iCurrentProfileMode == IMP__FINISH )
{
return( TRUE );
}
else
{
return( FALSE );
}
}