mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
New Feature: IMP gear selection allows choosing what items an IMP starts with instead of relying upon randomness.
Requires GameDir >= r2152, as required images were added. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7529 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+9
-9
@@ -15,9 +15,9 @@
|
||||
#ifdef JA2EDITOR
|
||||
|
||||
#ifdef JA2UB
|
||||
CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.7517 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.7529 (Development Build)" };
|
||||
#else
|
||||
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.7517 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.7529 (Development Build)" };
|
||||
#endif
|
||||
|
||||
// ------------------------------
|
||||
@@ -27,11 +27,11 @@
|
||||
|
||||
//DEBUG BUILD VERSION
|
||||
#ifdef JA2UB
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.7517 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.7529 (Development Build)" };
|
||||
#elif defined (JA113DEMO)
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.7517 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.7529 (Development Build)" };
|
||||
#else
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: v1.13.7517 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: v1.13.7529 (Development Build)" };
|
||||
#endif
|
||||
|
||||
#elif defined CRIPPLED_VERSION
|
||||
@@ -46,16 +46,16 @@
|
||||
|
||||
//RELEASE BUILD VERSION
|
||||
#ifdef JA2UB
|
||||
CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.7517 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.7529 (Development Build)" };
|
||||
#elif defined (JA113DEMO)
|
||||
CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.7517 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.7529 (Development Build)" };
|
||||
#else
|
||||
CHAR16 zVersionLabel[256] = { L"Release v1.13.7517 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Release v1.13.7529 (Development Build)" };
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
CHAR8 czVersionNumber[16] = { "Build 14.09.14" }; //YY.MM.DD
|
||||
CHAR8 czVersionNumber[16] = { "Build 14.09.24" }; //YY.MM.DD
|
||||
CHAR16 zTrackingNumber[16] = { L"Z" };
|
||||
|
||||
// SAVE_GAME_VERSION is defined in header, change it there
|
||||
|
||||
+38
-24
@@ -33,6 +33,8 @@
|
||||
#include "IMP Minor Trait.h"
|
||||
#include "IMP Background.h" // added by Flugente
|
||||
#include "IMP Prejudice.h" // added by Flugente
|
||||
#include "IMP Gear Entrance.h" // added by Flugente
|
||||
#include "IMP Gear.h" // added by Flugente
|
||||
#endif
|
||||
|
||||
|
||||
@@ -163,9 +165,8 @@ void HandleCharProfile()
|
||||
if( fReDrawCharProfile )
|
||||
{
|
||||
// re draw
|
||||
RenderCharProfile( );
|
||||
RenderCharProfile( );
|
||||
fReDrawCharProfile = FALSE;
|
||||
|
||||
}
|
||||
|
||||
// button pending, but not changing mode, still need a rernder, but under different circumstances
|
||||
@@ -181,8 +182,7 @@ void HandleCharProfile()
|
||||
{
|
||||
//make sure we are not hosing memory
|
||||
Assert( iCurrentImpPage < IMP_NUM_PAGES );
|
||||
|
||||
|
||||
|
||||
fFastLoadFlag = HasTheCurrentIMPPageBeenVisited( );
|
||||
fVisitedIMPSubPages[ iCurrentImpPage ] = TRUE;
|
||||
fConnectingToSubPage = TRUE;
|
||||
@@ -197,36 +197,30 @@ void HandleCharProfile()
|
||||
{
|
||||
fDoneLoadPending = TRUE;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
fVisitedIMPSubPages[ iCurrentImpPage ] = TRUE;
|
||||
|
||||
if( fButtonPendingFlag == TRUE )
|
||||
{
|
||||
// render screen
|
||||
RenderCharProfile( );
|
||||
return;
|
||||
// render screen
|
||||
RenderCharProfile( );
|
||||
return;
|
||||
}
|
||||
|
||||
// exity old mode
|
||||
ExitOldIMPMode( );
|
||||
ExitOldIMPMode( );
|
||||
|
||||
// set previous page
|
||||
iPreviousImpPage = iCurrentImpPage;
|
||||
|
||||
// enter new
|
||||
EnterNewIMPMode( );
|
||||
|
||||
EnterNewIMPMode( );
|
||||
|
||||
// render screen
|
||||
RenderCharProfile( );
|
||||
RenderCharProfile( );
|
||||
|
||||
// render title bar
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// handle
|
||||
@@ -296,9 +290,13 @@ void HandleCharProfile()
|
||||
case( IMP_PREJUDICE ):
|
||||
HandleIMPPrejudice( );
|
||||
break;
|
||||
case IMP_GEAR_ENTRANCE:
|
||||
HandleIMPGearEntrance( );
|
||||
break;
|
||||
case IMP_GEAR:
|
||||
HandleIMPGear( );
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void RenderCharProfile()
|
||||
@@ -378,6 +376,12 @@ void RenderCharProfile()
|
||||
case( IMP_PREJUDICE ):
|
||||
RenderIMPPrejudice( );
|
||||
break;
|
||||
case IMP_GEAR_ENTRANCE:
|
||||
RenderIMPGearEntrance( );
|
||||
break;
|
||||
case IMP_GEAR:
|
||||
RenderIMPGear( );
|
||||
break;
|
||||
}
|
||||
|
||||
// render title bar
|
||||
@@ -491,9 +495,15 @@ void ExitOldIMPMode( void )
|
||||
DestroyIMPButtons( );
|
||||
ExitIMPPrejudice( );
|
||||
break;
|
||||
case IMP_GEAR_ENTRANCE:
|
||||
DestroyIMPButtons( );
|
||||
ExitIMPGearEntrance( );
|
||||
break;
|
||||
case IMP_GEAR:
|
||||
DestroyIMPButtons( );
|
||||
ExitIMPGear( );
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -586,11 +596,15 @@ void EnterNewIMPMode( void )
|
||||
CreateIMPButtons( );
|
||||
EnterIMPPrejudice( );
|
||||
break;
|
||||
case IMP_GEAR_ENTRANCE:
|
||||
CreateIMPButtons( );
|
||||
EnterIMPGearEntrance( );
|
||||
break;
|
||||
case IMP_GEAR:
|
||||
CreateIMPButtons( );
|
||||
EnterIMPGear( );
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -103,6 +103,8 @@ enum{
|
||||
// added by Flugente
|
||||
IMP_BACKGROUND,
|
||||
IMP_PREJUDICE,
|
||||
IMP_GEAR_ENTRANCE,
|
||||
IMP_GEAR,
|
||||
|
||||
IMP_NUM_PAGES,
|
||||
};
|
||||
|
||||
+89
-53
@@ -106,6 +106,8 @@ DropDownBase::Init(UINT16 sX, UINT16 sY)
|
||||
musUpArrowY = GetY() + 2;
|
||||
|
||||
musFontHeight = GetFontHeight( DEF_DROPDOWN_FONT ); // does not work on init of static objects, as the fonts do not yet exist!
|
||||
|
||||
mfDropScrollBar = (size > DROPDOWN_REGIONS);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -170,7 +172,7 @@ DropDownBase::Create_Drop()
|
||||
UINT16 usPosY = musStartY_Drop;
|
||||
UINT16 usHeight = 0;
|
||||
|
||||
for( i=0; i< DROPDOWN_REGIONS; ++i)
|
||||
for ( i = 0; i< mNumDisplayedEntries; ++i )
|
||||
{
|
||||
MSYS_DefineRegion( &mDropDownRegion[i], usPosX, (UINT16)(usPosY+4), (UINT16)(usPosX+musWidth-6), (UINT16)(usPosY+musFontHeight+7), MSYS_PRIORITY_HIGH,
|
||||
CURSOR_WWW, CallBackWrapper((void*) this, DROPDOWN_MOVEMENT, &DropDownBase::Dummyfunc), CallBackWrapper((void*) this, DROPDOWN_REGION, &DropDownBase::Dummyfunc));
|
||||
@@ -180,7 +182,7 @@ DropDownBase::Create_Drop()
|
||||
usPosY += musFontHeight + 2;
|
||||
}
|
||||
usHeight = usPosY - musStartY_Drop + 10;
|
||||
|
||||
|
||||
//create the scroll bars regions
|
||||
//up arrow
|
||||
usPosX = musUpArrowX;
|
||||
@@ -195,25 +197,30 @@ DropDownBase::Create_Drop()
|
||||
usPosY = musDownArrowY;
|
||||
}
|
||||
|
||||
//the scroll area itself
|
||||
usPosX = musUpArrowX;
|
||||
usPosY = musUpArrowY + DEF_SCROLL_ARROW_HEIGHT;
|
||||
|
||||
usHeight = ( musAreaHeight - DEF_SCROLL_ARROW_HEIGHT - 4 ) / (mNumDisplayedEntries);
|
||||
for(i=0; i<DROPDOWN_REGIONS - 1; ++i)
|
||||
// create scrollbars only if they are needed
|
||||
if ( mfDropScrollBar )
|
||||
{
|
||||
MSYS_DefineRegion( &mSelectedScrollAreaDropDownRegion[i], usPosX, usPosY, (UINT16)(usPosX+musWidth), (UINT16)(usPosY+usHeight), MSYS_PRIORITY_HIGH+1,
|
||||
//the scroll area itself
|
||||
usPosX = musUpArrowX;
|
||||
usPosY = musUpArrowY + DEF_SCROLL_ARROW_HEIGHT;
|
||||
|
||||
usHeight = ( musAreaHeight - DEF_SCROLL_ARROW_HEIGHT - 4 ) / (mNumDisplayedEntries);
|
||||
for ( i = 0; i<mNumDisplayedEntries - 1; ++i )
|
||||
{
|
||||
MSYS_DefineRegion( &mSelectedScrollAreaDropDownRegion[i], usPosX, usPosY, (UINT16)(usPosX+musWidth), (UINT16)(usPosY+usHeight), MSYS_PRIORITY_HIGH+1,
|
||||
CURSOR_LAPTOP_SCREEN, CallBackWrapper((void*) this, DROPDOWN_SCROLL_MOVEMENT, &DropDownBase::Dummyfunc), CallBackWrapper((void*) this, DROPDOWN_SCROLL_REGION, &DropDownBase::Dummyfunc));
|
||||
MSYS_AddRegion(&mSelectedScrollAreaDropDownRegion[i]);
|
||||
MSYS_SetRegionUserData( &mSelectedScrollAreaDropDownRegion[ i ], 0, i);
|
||||
usPosY += usHeight;
|
||||
}
|
||||
|
||||
//put the last one down to cover the remaining area
|
||||
MSYS_DefineRegion( &mSelectedScrollAreaDropDownRegion[i], usPosX, usPosY, (UINT16)(usPosX+musWidth), musDownArrowY, MSYS_PRIORITY_HIGH+1,
|
||||
CURSOR_LAPTOP_SCREEN, CallBackWrapper((void*) this, DROPDOWN_SCROLL_MOVEMENT, &DropDownBase::Dummyfunc), CallBackWrapper((void*) this, DROPDOWN_SCROLL_REGION, &DropDownBase::Dummyfunc));
|
||||
MSYS_AddRegion(&mSelectedScrollAreaDropDownRegion[i]);
|
||||
MSYS_SetRegionUserData( &mSelectedScrollAreaDropDownRegion[ i ], 0, i);
|
||||
usPosY += usHeight;
|
||||
}
|
||||
//put the last one down to cover the remaining area
|
||||
MSYS_DefineRegion( &mSelectedScrollAreaDropDownRegion[i], usPosX, usPosY, (UINT16)(usPosX+musWidth), musDownArrowY, MSYS_PRIORITY_HIGH+1,
|
||||
CURSOR_LAPTOP_SCREEN, CallBackWrapper((void*) this, DROPDOWN_SCROLL_MOVEMENT, &DropDownBase::Dummyfunc), CallBackWrapper((void*) this, DROPDOWN_SCROLL_REGION, &DropDownBase::Dummyfunc));
|
||||
MSYS_AddRegion(&mSelectedScrollAreaDropDownRegion[i]);
|
||||
MSYS_SetRegionUserData( &mSelectedScrollAreaDropDownRegion[ i ], 0, i);
|
||||
|
||||
|
||||
MSYS_EnableRegion(&mSelectedCloseDropDownRegion);
|
||||
|
||||
mfMouseRegionsCreated_Drop = TRUE;
|
||||
@@ -245,16 +252,20 @@ DropDownBase::Destroy_Drop()
|
||||
return;
|
||||
|
||||
UINT8 i;
|
||||
for( i=0; i< DROPDOWN_REGIONS; ++i)
|
||||
for ( i = 0; i< mNumDisplayedEntries; ++i )
|
||||
MSYS_RemoveRegion( &mDropDownRegion[i]);
|
||||
|
||||
//destroy the scroll bar arrow regions
|
||||
for( i=0; i< 2; ++i)
|
||||
MSYS_RemoveRegion( &mgSelectedUpDownArrowOnScrollAreaRegion[i]);
|
||||
|
||||
//destroy the scroll bar regions
|
||||
for( i=0; i<DROPDOWN_REGIONS; ++i)
|
||||
MSYS_RemoveRegion( &mSelectedScrollAreaDropDownRegion[i]);
|
||||
// create scrollbars and arrows only if they are needed
|
||||
if ( mfDropScrollBar )
|
||||
{
|
||||
//destroy the scroll bar regions
|
||||
for ( i = 0; i<mNumDisplayedEntries; ++i )
|
||||
MSYS_RemoveRegion( &mSelectedScrollAreaDropDownRegion[i]);
|
||||
}
|
||||
|
||||
//disable the close region
|
||||
MSYS_DisableRegion(&mSelectedCloseDropDownRegion);
|
||||
@@ -357,16 +368,19 @@ void
|
||||
DropDownBase::DrawTopEntry()
|
||||
{
|
||||
// make sure we don't get bogus values
|
||||
mSelectedEntry = min(mSelectedEntry, mEntryVector.size() - 1);
|
||||
if ( !mEntryVector.empty( ) )
|
||||
{
|
||||
mSelectedEntry = min( mSelectedEntry, mEntryVector.size( ) - 1 );
|
||||
|
||||
//display the name in the list
|
||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, GetX( ) + 4, GetY( ) + 4, GetX( ) + musWidth - 4, GetY( ) + musFontHeight + 8, GetColorMarked( ) );
|
||||
//display the name in the list
|
||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, GetX( ) + 4, GetY( ) + 4, GetX( ) + musWidth - 4, GetY( ) + musFontHeight + 8, GetColorMarked( ) );
|
||||
|
||||
SetFontShadow(NO_SHADOW);
|
||||
SetFontShadow(NO_SHADOW);
|
||||
|
||||
DrawTextToScreen( mEntryVector[mSelectedEntry].second, GetX( ) + CITY_NAME_OFFSET, (UINT16)(GetY( ) + 7), 0, DEF_DROPDOWN_FONT, FONT_BLACK, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
DrawTextToScreen( mEntryVector[mSelectedEntry].second, GetX( ) + CITY_NAME_OFFSET, (UINT16)(GetY( ) + 7), 0, DEF_DROPDOWN_FONT, FONT_BLACK, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
|
||||
SetFontShadow(DEFAULT_SHADOW);
|
||||
SetFontShadow(DEFAULT_SHADOW);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@@ -405,30 +419,43 @@ DropDownBase::DrawGoldRectangle()
|
||||
{
|
||||
UINT32 uiDestPitchBYTES;
|
||||
UINT8 *pDestBuf;
|
||||
UINT16 usWidth, usTempHeight, usTempPosY, usHeight;
|
||||
UINT16 usWidth, usTempHeight, usHeight;
|
||||
UINT16 usPosX, usPosY;
|
||||
|
||||
UINT16 temp;
|
||||
|
||||
usTempPosY = GetY();
|
||||
usTempPosY += DEF_SCROLL_ARROW_HEIGHT;
|
||||
|
||||
usPosX = musScrollAreaX;
|
||||
usWidth = musArrowWidth - 5;
|
||||
usTempHeight = ( musAreaHeight - DEF_SCROLL_ARROW_HEIGHT ) - 4;
|
||||
|
||||
if ( mEntryVector.size() > 1 )
|
||||
if ( mEntryVector.size( ) > 1 )
|
||||
{
|
||||
usHeight = usTempHeight / (mEntryVector.size() - 1);
|
||||
usTempHeight = (musAreaHeight - DEF_SCROLL_ARROW_HEIGHT) - 4;
|
||||
|
||||
usPosY = usTempPosY + (UINT16)( ( usHeight * mSelectedEntry ) );
|
||||
if ( mEntryVector.size( ) < DROPDOWN_REGIONS )
|
||||
{
|
||||
usHeight = usTempHeight;
|
||||
usPosY = musStartY_Drop;
|
||||
}
|
||||
else
|
||||
{
|
||||
usHeight = usTempHeight / (mEntryVector.size( ));
|
||||
|
||||
temp = musStartY_Drop + musAreaHeight - DEF_SCROLL_ARROW_HEIGHT - usHeight;
|
||||
usPosY = musStartY_Drop + (UINT16)((usHeight * mFirstShownEntry));
|
||||
|
||||
if( usPosY >= temp )
|
||||
usPosY = musStartY_Drop + musAreaHeight - DEF_SCROLL_ARROW_HEIGHT - usHeight - 5;
|
||||
usHeight *= mNumDisplayedEntries;
|
||||
}
|
||||
|
||||
if ( mfDropScrollBar )
|
||||
{
|
||||
if ( usPosY >= musStartY_Drop + musAreaHeight - DEF_SCROLL_ARROW_HEIGHT - usHeight )
|
||||
usPosY = musStartY_Drop + musAreaHeight - DEF_SCROLL_ARROW_HEIGHT - usHeight - 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( usPosY >= musStartY_Drop + musAreaHeight - usHeight )
|
||||
usPosY = musStartY_Drop + musAreaHeight - usHeight - 5;
|
||||
}
|
||||
|
||||
// color everything black and then color te rectangle, that way we dont have to redraw the entire page
|
||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, musScrollAreaX, usTempPosY, musScrollAreaX+usWidth, usTempPosY+usTempHeight, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
||||
// color everything black and then color the rectangle, that way we dont have to redraw the entire page
|
||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, musScrollAreaX, musStartY_Drop, musScrollAreaX + usWidth, musStartY_Drop + usTempHeight, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, musScrollAreaX, usPosY, musScrollAreaX + usWidth, usPosY + usHeight, GetColorMarked( ) );
|
||||
|
||||
//display the line
|
||||
@@ -499,21 +526,21 @@ DropDownBase::SelectUpDownArrowOnScrollAreaRegionCallBack(MOUSE_REGION * pRegion
|
||||
{
|
||||
if( mSelectedEntry < mEntryVector.size() - 1 )
|
||||
{
|
||||
mSelectedEntry++;
|
||||
++mSelectedEntry;
|
||||
}
|
||||
|
||||
if( ( mSelectedEntry - mFirstShownEntry ) >= mNumDisplayedEntries && mFirstShownEntry <= mEntryVector.size() - 1 - mNumDisplayedEntries )
|
||||
{
|
||||
mFirstShownEntry++;
|
||||
++mFirstShownEntry;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( mSelectedEntry > 0 )
|
||||
mSelectedEntry--;
|
||||
--mSelectedEntry;
|
||||
|
||||
if( mSelectedEntry < mFirstShownEntry )
|
||||
mFirstShownEntry--;
|
||||
--mFirstShownEntry;
|
||||
}
|
||||
|
||||
DrawTopEntry();
|
||||
@@ -576,15 +603,15 @@ DropDownBase::SelectScrollAreaDropDownRegionCallBack(MOUSE_REGION * pRegion, INT
|
||||
|
||||
if( ubCityNum < mSelectedEntry )
|
||||
{
|
||||
mSelectedEntry--;
|
||||
--mSelectedEntry;
|
||||
if( mSelectedEntry < mFirstShownEntry )
|
||||
mFirstShownEntry--;
|
||||
--mFirstShownEntry;
|
||||
}
|
||||
else if( ubCityNum > mSelectedEntry )
|
||||
{
|
||||
mSelectedEntry++;
|
||||
++mSelectedEntry;
|
||||
if( ( mSelectedEntry - mFirstShownEntry ) >= mNumDisplayedEntries )
|
||||
mFirstShownEntry++;
|
||||
++mFirstShownEntry;
|
||||
}
|
||||
|
||||
DrawTopEntry();
|
||||
@@ -599,15 +626,15 @@ DropDownBase::SelectScrollAreaDropDownRegionCallBack(MOUSE_REGION * pRegion, INT
|
||||
|
||||
if( ubCityNum < mSelectedEntry )
|
||||
{
|
||||
mSelectedEntry--;
|
||||
--mSelectedEntry;
|
||||
if( mSelectedEntry < mFirstShownEntry )
|
||||
mFirstShownEntry--;
|
||||
--mFirstShownEntry;
|
||||
}
|
||||
else if( ubCityNum > mSelectedEntry )
|
||||
{
|
||||
mSelectedEntry++;
|
||||
++mSelectedEntry;
|
||||
if( ( mSelectedEntry - mFirstShownEntry ) >= mNumDisplayedEntries )
|
||||
mFirstShownEntry++;
|
||||
++mFirstShownEntry;
|
||||
}
|
||||
|
||||
InvalidateRegion(pRegion->RegionTopLeftX, pRegion->RegionTopLeftY, pRegion->RegionBottomRightX, pRegion->RegionBottomRightY);
|
||||
@@ -638,6 +665,15 @@ DropDownBase::SetSelectedEntryKey( INT16 aKey )
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* set the nth entry as the selected one
|
||||
*/
|
||||
void
|
||||
DropDownBase::SetNthEntry( UINT8 aNr )
|
||||
{
|
||||
mSelectedEntry = min( aNr, max(0, mEntryVector.size() - 1) );
|
||||
}
|
||||
|
||||
void
|
||||
DropDownBase::OpenDropDownRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
|
||||
+42
-1
@@ -105,6 +105,34 @@ enum definedDropDowns
|
||||
DROPDOWNNR_MERCCOMPARE_SQUADSELECTION,
|
||||
|
||||
DROPDOWNNR_PMC_LOCATION,
|
||||
|
||||
DROPDOWNNR_IMPGEAR_LBE1,
|
||||
DROPDOWNNR_IMPGEAR_LBE2,
|
||||
DROPDOWNNR_IMPGEAR_LBE3,
|
||||
DROPDOWNNR_IMPGEAR_LBE4,
|
||||
DROPDOWNNR_IMPGEAR_LBE5,
|
||||
|
||||
DROPDOWNNR_IMPGEAR_GUN_1,
|
||||
DROPDOWNNR_IMPGEAR_AMMO_1,
|
||||
DROPDOWNNR_IMPGEAR_GUN_2,
|
||||
DROPDOWNNR_IMPGEAR_AMMO_2,
|
||||
DROPDOWNNR_IMPGEAR_MELEE,
|
||||
|
||||
DROPDOWNNR_IMPGEAR_HELMET,
|
||||
DROPDOWNNR_IMPGEAR_VEST,
|
||||
DROPDOWNNR_IMPGEAR_LEGS,
|
||||
DROPDOWNNR_IMPGEAR_FACE1,
|
||||
DROPDOWNNR_IMPGEAR_FACE2,
|
||||
|
||||
DROPDOWNNR_IMPGEAR_MISC_1,
|
||||
DROPDOWNNR_IMPGEAR_MISC_2,
|
||||
DROPDOWNNR_IMPGEAR_MISC_3,
|
||||
DROPDOWNNR_IMPGEAR_MISC_4,
|
||||
DROPDOWNNR_IMPGEAR_MISC_5,
|
||||
DROPDOWNNR_IMPGEAR_MISC_6,
|
||||
DROPDOWNNR_IMPGEAR_MISC_7,
|
||||
|
||||
DROPDOWNNR_IMPGEAR_MAX = DROPDOWNNR_IMPGEAR_MISC_7,
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -185,13 +213,24 @@ public:
|
||||
/*
|
||||
* Get key of selected entry
|
||||
*/
|
||||
INT16 GetSelectedEntryKey() { return mEntryVector[mSelectedEntry].first; }
|
||||
INT16 GetSelectedEntryKey()
|
||||
{
|
||||
if ( mEntryVector.empty() )
|
||||
return -1;
|
||||
|
||||
return mEntryVector[mSelectedEntry].first;
|
||||
}
|
||||
|
||||
/*
|
||||
* If aKey exists among our keys, set it as the current one
|
||||
*/
|
||||
void SetSelectedEntryKey( INT16 aKey );
|
||||
|
||||
/*
|
||||
* set the nth entry as the selected one
|
||||
*/
|
||||
void SetNthEntry( UINT8 aNr );
|
||||
|
||||
/*
|
||||
* Get width of entire DropDownBase
|
||||
*/
|
||||
@@ -297,6 +336,8 @@ private:
|
||||
UINT8 mSelectedEntry; // keeps track of the currently selected city
|
||||
UINT8 mFirstShownEntry; // top entry of the dropped region
|
||||
UINT8 mNumDisplayedEntries; // number of entries displayed. Calculated internally, no need to change by user
|
||||
|
||||
BOOLEAN mfDropScrollBar; // do we need a scrollbar and a down arrow?
|
||||
};
|
||||
|
||||
template<int N>
|
||||
|
||||
@@ -187,8 +187,6 @@ INT32 iBonusPointsRecievedForLevelDown();
|
||||
|
||||
void EnterIMPAttributeSelection( void )
|
||||
{
|
||||
|
||||
|
||||
// set attributes and skills
|
||||
if( ( fReturnStatus == FALSE ) && ( fFirstIMPAttribTime == TRUE ) )
|
||||
{
|
||||
@@ -229,23 +227,18 @@ void EnterIMPAttributeSelection( void )
|
||||
|
||||
// render background
|
||||
RenderIMPAttributeSelection( );
|
||||
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void RenderIMPAlteredAttribute( void )
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void RenderIMPAttributeSelection( void )
|
||||
{
|
||||
// the background
|
||||
RenderProfileBackGround( );
|
||||
|
||||
|
||||
// attribute frame
|
||||
RenderAttributeFrame( 51, 87 );
|
||||
|
||||
@@ -256,7 +249,7 @@ void RenderIMPAttributeSelection( void )
|
||||
|
||||
if( fReviewStats != TRUE )
|
||||
{
|
||||
RenderAttrib2IndentFrame(350, 42 );
|
||||
RenderAttrib2IndentFrame(350, 42 );
|
||||
}
|
||||
|
||||
// reset rerender flag
|
||||
@@ -285,7 +278,6 @@ void RenderIMPAttributeSelection( void )
|
||||
DisplayWrappedString( LAPTOP_SCREEN_UL_X + 59, LAPTOP_SCREEN_WEB_UL_Y + 36, ( 240 ), 2, FONT10ARIAL, 142, sMaxPntsString,FONT_BLACK,FALSE,0);
|
||||
|
||||
InvalidateRegion( LAPTOP_SCREEN_UL_X + 65, LAPTOP_SCREEN_WEB_UL_Y + 51, LAPTOP_SCREEN_UL_X + 85, LAPTOP_SCREEN_WEB_UL_Y + 71 );
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -315,8 +307,6 @@ void RenderIMPAttributeSelection( void )
|
||||
InvalidateRegion( STARTING_LEVEL_BOX_POS_X + LAPTOP_SCREEN_UL_X + 94, STARTING_LEVEL_BOX_POS_Y + LAPTOP_SCREEN_WEB_UL_Y + 8, STARTING_LEVEL_BOX_POS_X + LAPTOP_SCREEN_UL_X + 130, STARTING_LEVEL_BOX_POS_Y + LAPTOP_SCREEN_WEB_UL_Y + 42 );
|
||||
|
||||
//****************************************
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void ExitIMPAttributeSelection( void )
|
||||
@@ -332,14 +322,11 @@ void ExitIMPAttributeSelection( void )
|
||||
DestroyIMPAttributeSelectionButtons( );
|
||||
|
||||
fReturnStatus = FALSE;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void HandleIMPAttributeSelection( void )
|
||||
{
|
||||
|
||||
// review mode, do not allow changes
|
||||
if( fReviewStats )
|
||||
{
|
||||
@@ -453,7 +440,6 @@ void HandleIMPAttributeSelection( void )
|
||||
fSkillAtZeroWarning = FALSE;
|
||||
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1017,24 +1003,17 @@ BOOLEAN DoWeHaveThisManyBonusPoints( INT32 iBonusPoints )
|
||||
|
||||
void CreateIMPAttributeSelectionButtons( void )
|
||||
{
|
||||
|
||||
// the finished button
|
||||
giIMPAttributeSelectionButtonImage[0]= LoadButtonImage( "LAPTOP\\button_5.sti" ,-1,0,-1,1,-1 );
|
||||
/* giIMPAttributeSelectionButton[0] = QuickCreateButton( giIMPAttributeSelectionButtonImage[0], LAPTOP_SCREEN_UL_X + ( 136 ), LAPTOP_SCREEN_WEB_UL_Y + ( 314 ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAttributeFinishCallback );
|
||||
*/
|
||||
giIMPAttributeSelectionButton[0] = CreateIconAndTextButton( giIMPAttributeSelectionButtonImage[0], pImpButtonText[ 11 ], FONT12ARIAL,
|
||||
|
||||
giIMPAttributeSelectionButton[0] = CreateIconAndTextButton( giIMPAttributeSelectionButtonImage[0], pImpButtonText[24], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + ( 350 ), LAPTOP_SCREEN_WEB_UL_Y + ( 340 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAttributeFinishCallback);
|
||||
|
||||
|
||||
|
||||
SetButtonCursor(giIMPAttributeSelectionButton[0], CURSOR_WWW);
|
||||
return;
|
||||
}
|
||||
|
||||
void DestroyIMPAttributeSelectionButtons( void )
|
||||
@@ -1050,14 +1029,11 @@ void DestroyIMPAttributeSelectionButtons( void )
|
||||
RemoveButton(giIMPStartingLevelButton[ 1 ] );
|
||||
UnloadButtonImage(giIMPStartingLevelButtonImage[ 0 ] );
|
||||
UnloadButtonImage(giIMPStartingLevelButtonImage[ 1 ] );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void BtnIMPAttributeFinishCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
|
||||
// btn callback for IMP attrbite begin button
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
@@ -1070,23 +1046,13 @@ void BtnIMPAttributeFinishCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
|
||||
//iCurrentImpPage = IMP_MAIN_PAGE;
|
||||
|
||||
// SANDRO WAS HERE - THE FINISH PAGE AFTER ATTRIBUTES IS WORTHLESS AND HAVE BEEN CUT OUT
|
||||
//if ( fReviewStats == TRUE )
|
||||
//{
|
||||
iCurrentImpPage = IMP_FINISH;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
iCurrentProfileMode = IMP__FINISH; // All done
|
||||
//}
|
||||
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
|
||||
iCurrentImpPage = IMP_GEAR_ENTRANCE;
|
||||
fButtonPendingFlag = TRUE;
|
||||
|
||||
// SET ATTRIBUTES NOW
|
||||
SetGeneratedCharacterAttributes( );
|
||||
//fButtonPendingFlag = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1096,7 +1062,6 @@ void CreateIMPStartingLevelSelectionButtons( void )
|
||||
giIMPStartingLevelButtonImage[ 0 ]= LoadButtonImage( "LAPTOP\\AttributeArrows.sti" ,-1,0,-1,1,-1 );
|
||||
giIMPStartingLevelButtonImage[ 1 ]= LoadButtonImage( "LAPTOP\\AttributeArrows.sti" ,-1,3,-1,4,-1 );
|
||||
|
||||
|
||||
// left button - decrement level
|
||||
giIMPStartingLevelButton[ 0 ] = QuickCreateButton( giIMPStartingLevelButtonImage[ 0 ], STARTING_LEVEL_BOX_POS_X + LAPTOP_SCREEN_UL_X + 112, STARTING_LEVEL_BOX_POS_Y + LAPTOP_SCREEN_WEB_UL_Y + 3,
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
@@ -1120,6 +1085,7 @@ void CreateIMPStartingLevelSelectionButtons( void )
|
||||
|
||||
MarkButtonsDirty( );
|
||||
}
|
||||
|
||||
void BtnIMPLevelSelectionLeftCallback( GUI_BUTTON *btn,INT32 reason )
|
||||
{
|
||||
// btn callback for IMP personality quiz answer button
|
||||
@@ -1168,6 +1134,7 @@ void BtnIMPLevelSelectionLeftCallback( GUI_BUTTON *btn,INT32 reason )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BtnIMPLevelSelectionRightCallback( GUI_BUTTON *btn,INT32 reason )
|
||||
{
|
||||
// btn callback for IMP personality quiz answer button
|
||||
@@ -1227,7 +1194,6 @@ INT32 iBonusPointsNeededForLevelUp()
|
||||
}
|
||||
|
||||
return( iBonusPointsNeeded );
|
||||
|
||||
}
|
||||
|
||||
INT32 iBonusPointsRecievedForLevelDown()
|
||||
@@ -1241,12 +1207,11 @@ INT32 iBonusPointsRecievedForLevelDown()
|
||||
|
||||
return( iBonusPointsRecieved );
|
||||
}
|
||||
|
||||
void RenderAttributeBoxes( void )
|
||||
{
|
||||
|
||||
INT32 iMinAttribute = gGameExternalOptions.iMinAttribute;
|
||||
|
||||
|
||||
// this function will render the boxes in the sliding attribute bar, based on position
|
||||
INT32 iCnt=STRENGTH_ATTRIBUTE;
|
||||
INT16 sX = 0;
|
||||
@@ -1263,7 +1228,7 @@ void RenderAttributeBoxes( void )
|
||||
SetFontBackground(FONT_BLACK);
|
||||
|
||||
// run through and render each slider bar
|
||||
for( iCnt = HEALTH_ATTRIBUTE; iCnt <= MECHANICAL_SKILL; iCnt++)
|
||||
for( iCnt = HEALTH_ATTRIBUTE; iCnt <= MECHANICAL_SKILL; ++iCnt)
|
||||
{
|
||||
// position is ( width * ( stat - 35 ) ) /50]
|
||||
// unless 0, then it is 0 - for skills
|
||||
@@ -1423,10 +1388,8 @@ void RenderAttributeBoxes( void )
|
||||
}
|
||||
}
|
||||
|
||||
// reset shadow
|
||||
// reset shadow
|
||||
SetFontShadow(DEFAULT_SHADOW);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1442,15 +1405,15 @@ void CreateAttributeSliderButtons( void )
|
||||
|
||||
for(iCounter = 0; iCounter < 20; iCounter+=2 )
|
||||
{
|
||||
// left button - decrement stat
|
||||
giIMPAttributeSelectionSliderButton[ iCounter ] = QuickCreateButton( giIMPAttributeSelectionSliderButtonImage[ 0 ], LAPTOP_SCREEN_UL_X + ( 163 ), ( INT16 ) ( LAPTOP_SCREEN_WEB_UL_Y + ( 99 + iCounter / 2 * 20 ) ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAttributeSliderLeftCallback );
|
||||
// left button - decrement stat
|
||||
giIMPAttributeSelectionSliderButton[ iCounter ] = QuickCreateButton( giIMPAttributeSelectionSliderButtonImage[ 0 ], LAPTOP_SCREEN_UL_X + ( 163 ), ( INT16 ) ( LAPTOP_SCREEN_WEB_UL_Y + ( 99 + iCounter / 2 * 20 ) ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAttributeSliderLeftCallback );
|
||||
|
||||
// right button - increment stat
|
||||
giIMPAttributeSelectionSliderButton[ iCounter + 1 ] = QuickCreateButton( giIMPAttributeSelectionSliderButtonImage[ 1 ], LAPTOP_SCREEN_UL_X + ( 420 ), ( INT16 ) ( LAPTOP_SCREEN_WEB_UL_Y + ( 99 + iCounter / 2 * 20 ) ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAttributeSliderRightCallback );
|
||||
// right button - increment stat
|
||||
giIMPAttributeSelectionSliderButton[ iCounter + 1 ] = QuickCreateButton( giIMPAttributeSelectionSliderButtonImage[ 1 ], LAPTOP_SCREEN_UL_X + ( 420 ), ( INT16 ) ( LAPTOP_SCREEN_WEB_UL_Y + ( 99 + iCounter / 2 * 20 ) ),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAttributeSliderRightCallback );
|
||||
|
||||
SetButtonCursor(giIMPAttributeSelectionSliderButton[iCounter], CURSOR_WWW);
|
||||
SetButtonCursor(giIMPAttributeSelectionSliderButton[iCounter + 1 ], CURSOR_WWW);
|
||||
@@ -1473,14 +1436,11 @@ void DestroyAttributeSliderButtons( void )
|
||||
UnloadButtonImage(giIMPAttributeSelectionSliderButtonImage[ 0 ] );
|
||||
UnloadButtonImage(giIMPAttributeSelectionSliderButtonImage[ 1 ] );
|
||||
|
||||
for(iCounter = 0; iCounter < 20; iCounter++ )
|
||||
for(iCounter = 0; iCounter < 20; ++iCounter )
|
||||
{
|
||||
// get rid of button
|
||||
RemoveButton(giIMPAttributeSelectionSliderButton[ iCounter ] );
|
||||
|
||||
RemoveButton(giIMPAttributeSelectionSliderButton[ iCounter ] );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1492,23 +1452,21 @@ void BtnIMPAttributeSliderLeftCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
|
||||
iValue = (INT32)MSYS_GetBtnUserData( btn, 0 );
|
||||
|
||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_REPEAT )
|
||||
{
|
||||
DecrementStat( iValue );
|
||||
// stat has changed, rerender
|
||||
// stat has changed, rerender
|
||||
fHasAnySlidingBarMoved = TRUE;
|
||||
uiBarToReRender = iValue;
|
||||
uiBarToReRender = iValue;
|
||||
}
|
||||
else if( reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
|
||||
DecrementStat( iValue );
|
||||
DecrementStat( iValue );
|
||||
fHasAnySlidingBarMoved = TRUE;
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
uiBarToReRender = iValue;
|
||||
uiBarToReRender = iValue;
|
||||
}
|
||||
|
||||
else if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
@@ -1535,26 +1493,22 @@ void BtnIMPAttributeSliderRightCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_REPEAT )
|
||||
{
|
||||
IncrementStat( iValue );
|
||||
// stat has changed, rerender
|
||||
// stat has changed, rerender
|
||||
fHasAnySlidingBarMoved = TRUE;
|
||||
uiBarToReRender = iValue;
|
||||
uiBarToReRender = iValue;
|
||||
}
|
||||
else if( reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
|
||||
IncrementStat( iValue );
|
||||
IncrementStat( iValue );
|
||||
fHasAnySlidingBarMoved = TRUE;
|
||||
uiBarToReRender = iValue;
|
||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||
|
||||
}
|
||||
|
||||
else if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||
{
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
|
||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1564,30 +1518,24 @@ void BtnIMPAttributeSliderRightCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
void CreateSlideRegionMouseRegions( void )
|
||||
{
|
||||
// this function will create that mouse regions on the sliding area, that, if the player clicks on, the bar will automatically jump to
|
||||
INT32 iCounter = 0;
|
||||
|
||||
for( iCounter = 0; iCounter < 10; iCounter++ )
|
||||
for ( INT32 iCounter = 0; iCounter < 10; ++iCounter )
|
||||
{
|
||||
// define the region
|
||||
MSYS_DefineRegion( &pSliderRegions[ iCounter ], ( INT16 ) ( SKILL_SLIDE_START_X + LAPTOP_SCREEN_UL_X), ( INT16 ) ( LAPTOP_SCREEN_WEB_UL_Y + SKILL_SLIDE_START_Y + iCounter * SKILL_SLIDE_HEIGHT ) , ( INT16 ) ( LAPTOP_SCREEN_UL_X + SKILL_SLIDE_START_X + BAR_WIDTH ), ( INT16 ) ( LAPTOP_SCREEN_WEB_UL_Y + SKILL_SLIDE_START_Y + iCounter * SKILL_SLIDE_HEIGHT + 15 ),
|
||||
MSYS_PRIORITY_HIGH + 2, CURSOR_WWW, MSYS_NO_CALLBACK, SliderRegionButtonCallback);
|
||||
|
||||
// define user data
|
||||
MSYS_SetRegionUserData(&pSliderRegions[iCounter],0,iCounter);
|
||||
MSYS_SetRegionUserData(&pSliderRegions[iCounter],0,iCounter);
|
||||
// now add it
|
||||
MSYS_AddRegion(&pSliderRegions[ iCounter ]);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void CreateSliderBarMouseRegions( void )
|
||||
{
|
||||
|
||||
INT32 iMinAttribute = gGameExternalOptions.iMinAttribute;
|
||||
|
||||
// this function will create that mouse regions on the sliding bars, that, if the player clicks on, the bar will automatically jump to
|
||||
INT32 iCounter = 0;
|
||||
INT16 sX = 0;
|
||||
|
||||
// set the starting X
|
||||
@@ -1595,55 +1543,43 @@ void CreateSliderBarMouseRegions( void )
|
||||
//sX = DetermineNewPosition( gGameExternalOptions.iStartAttribute - iMinAttribute );
|
||||
sX = DetermineNewPosition( 0 );
|
||||
|
||||
for( iCounter = 0; iCounter < 10; iCounter++ )
|
||||
for ( INT32 iCounter = 0; iCounter < 10; ++iCounter )
|
||||
{
|
||||
// define the region
|
||||
MSYS_DefineRegion( &pSliderBarRegions[ iCounter ], ( INT16 ) ( sX ), ( INT16 ) ( LAPTOP_SCREEN_WEB_UL_Y + SKILL_SLIDE_START_Y + iCounter * SKILL_SLIDE_HEIGHT ) , ( INT16 ) (sX + SLIDER_BAR_WIDTH ), ( INT16 ) ( LAPTOP_SCREEN_WEB_UL_Y + SKILL_SLIDE_START_Y + iCounter * SKILL_SLIDE_HEIGHT + 15 ),
|
||||
MSYS_PRIORITY_HIGH + 2, CURSOR_WWW, MSYS_NO_CALLBACK, SliderBarRegionButtonCallback);
|
||||
|
||||
// define user data
|
||||
MSYS_SetRegionUserData(&pSliderBarRegions[iCounter],0,iCounter);
|
||||
MSYS_SetRegionUserData(&pSliderBarRegions[iCounter],0,iCounter);
|
||||
// now add it
|
||||
MSYS_AddRegion(&pSliderBarRegions[ iCounter ]);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void DestroySlideRegionMouseRegions( void )
|
||||
{
|
||||
// this function will destroy the regions user for the slider ' jumping'
|
||||
INT32 iCounter=0;
|
||||
|
||||
// delete the regions
|
||||
for( iCounter=0; iCounter < 10; iCounter++ )
|
||||
for ( INT32 iCounter = 0; iCounter < 10; ++iCounter )
|
||||
{
|
||||
MSYS_RemoveRegion( &pSliderRegions[ iCounter ] );
|
||||
MSYS_RemoveRegion( &pSliderRegions[ iCounter ] );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void DestroySlideBarMouseRegions( void )
|
||||
{
|
||||
// this function will destroy the regions user for the slider ' jumping'
|
||||
INT32 iCounter=0;
|
||||
|
||||
// delete the regions
|
||||
for( iCounter=0; iCounter < 10; iCounter++ )
|
||||
for ( INT32 iCounter = 0; iCounter < 10; ++iCounter )
|
||||
{
|
||||
MSYS_RemoveRegion( &pSliderBarRegions[ iCounter ] );
|
||||
MSYS_RemoveRegion( &pSliderBarRegions[ iCounter ] );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void SliderRegionButtonCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
|
||||
INT32 iMinAttribute = gGameExternalOptions.iMinAttribute;
|
||||
INT32 iMaxAttribute = gGameExternalOptions.iMaxAttribute;
|
||||
|
||||
@@ -1659,33 +1595,30 @@ void SliderRegionButtonCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
INT32 iNewValue = 0;
|
||||
INT16 sNewX = -1;
|
||||
|
||||
|
||||
//if we already have an anchored slider bar
|
||||
if( gpCurrentScrollBox != pRegion && gpCurrentScrollBox != NULL )
|
||||
return;
|
||||
|
||||
|
||||
if (iReason & MSYS_CALLBACK_REASON_INIT)
|
||||
{
|
||||
return;
|
||||
return;
|
||||
}
|
||||
if (iReason & MSYS_CALLBACK_REASON_LBUTTON_REPEAT)
|
||||
{
|
||||
if( fSlideIsActive == FALSE)
|
||||
{
|
||||
// not active leave
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// check to see if we have moved
|
||||
if( MSYS_GetRegionUserData(pRegion, 0) != iAttribute )
|
||||
// check to see if we have moved
|
||||
if( MSYS_GetRegionUserData(pRegion, 0) != iAttribute )
|
||||
{
|
||||
// different regions
|
||||
iAttribute = MSYS_GetRegionUserData(pRegion, 0);
|
||||
sOldX = -1;
|
||||
sOldX = -1;
|
||||
sOldY = -1;
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
uiBarToReRender = iAttribute;
|
||||
@@ -1693,34 +1626,34 @@ void SliderRegionButtonCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
giCurrentlySelectedStat = iAttribute;
|
||||
gpCurrentScrollBox = pRegion;
|
||||
|
||||
// get new attribute value x
|
||||
// get new attribute value x
|
||||
sNewX = pRegion->MouseXPos;
|
||||
|
||||
// sOldX has been reset, set to sNewX
|
||||
if( sOldX == -1)
|
||||
{
|
||||
sOldX = sNewX;
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
// check against old x
|
||||
if( sNewX != sOldX )
|
||||
{
|
||||
|
||||
// get old stat value
|
||||
iCurrentAttributeValue = GetCurrentAttributeValue( iAttribute );
|
||||
iCurrentAttributeValue = GetCurrentAttributeValue( iAttribute );
|
||||
iNewValue = DetermineNewValue( sNewX );
|
||||
// chenged, move mouse region if change large enough
|
||||
if( iCurrentAttributeValue != iNewValue )
|
||||
if( iCurrentAttributeValue != iNewValue )
|
||||
{
|
||||
// update screen
|
||||
fHasAnySlidingBarMoved = TRUE;
|
||||
// update screen
|
||||
fHasAnySlidingBarMoved = TRUE;
|
||||
}
|
||||
|
||||
// change is enough
|
||||
if ( iNewValue - iCurrentAttributeValue > 0)
|
||||
// change is enough
|
||||
if ( iNewValue - iCurrentAttributeValue > 0)
|
||||
{
|
||||
// positive, increment stat
|
||||
iCounter = iNewValue - iCurrentAttributeValue;
|
||||
iCounter = iNewValue - iCurrentAttributeValue;
|
||||
for( iCounter; iCounter > 0; iCounter--)
|
||||
{
|
||||
IncrementStat( iAttribute );
|
||||
@@ -1729,7 +1662,7 @@ void SliderRegionButtonCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
else
|
||||
{
|
||||
// negative, decrement stat
|
||||
iCounter = iCurrentAttributeValue - iNewValue;
|
||||
iCounter = iCurrentAttributeValue - iNewValue;
|
||||
for( iCounter; iCounter > 0; iCounter--)
|
||||
{
|
||||
DecrementStat( iAttribute );
|
||||
@@ -1741,25 +1674,23 @@ void SliderRegionButtonCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
}
|
||||
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
|
||||
if( fSlideIsActive )
|
||||
{
|
||||
// reset slide is active flag
|
||||
fSlideIsActive = FALSE;
|
||||
// reset slide is active flag
|
||||
fSlideIsActive = FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// get mouse XY
|
||||
|
||||
sX = pRegion->MouseXPos;
|
||||
sY = pRegion->MouseYPos;
|
||||
|
||||
// which region are we in?
|
||||
// which region are we in?
|
||||
|
||||
// get attribute
|
||||
iAttribute = MSYS_GetRegionUserData(pRegion, 0);
|
||||
uiBarToReRender = iAttribute;
|
||||
uiBarToReRender = iAttribute;
|
||||
|
||||
// get value of attribute
|
||||
iCurrentAttributeValue = GetCurrentAttributeValue( iAttribute );
|
||||
@@ -1769,7 +1700,7 @@ void SliderRegionButtonCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
|
||||
// too high, reset to MAX_ATTIBUTEPOINT
|
||||
if( iNewAttributeValue > iMaxAttribute )
|
||||
{
|
||||
{
|
||||
iNewAttributeValue = iMaxAttribute;
|
||||
}
|
||||
|
||||
@@ -1783,44 +1714,41 @@ void SliderRegionButtonCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
if( iAttributeDelta > 0)
|
||||
{
|
||||
// decrement
|
||||
for( iCounter = 0; iCounter < iAttributeDelta; iCounter++ )
|
||||
for( iCounter = 0; iCounter < iAttributeDelta; ++iCounter )
|
||||
{
|
||||
DecrementStat( iAttribute );
|
||||
DecrementStat( iAttribute );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// increment attribute
|
||||
for( iCounter = iAttributeDelta; iCounter < 0; iCounter++ )
|
||||
for( iCounter = iAttributeDelta; iCounter < 0; ++iCounter )
|
||||
{
|
||||
if( iCurrentAttributeValue == 0)
|
||||
{
|
||||
iCounter = 0;
|
||||
}
|
||||
IncrementStat( iAttribute );
|
||||
|
||||
IncrementStat( iAttribute );
|
||||
}
|
||||
}
|
||||
|
||||
// update screen
|
||||
fHasAnySlidingBarMoved = TRUE;
|
||||
|
||||
|
||||
fHasAnySlidingBarMoved = TRUE;
|
||||
}
|
||||
else if ( iReason & MSYS_CALLBACK_REASON_RBUTTON_UP )
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
else if( iReason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
|
||||
// get mouse positions
|
||||
sX = pRegion->MouseXPos;
|
||||
sY = pRegion->MouseYPos;
|
||||
|
||||
// get attribute
|
||||
iAttribute = MSYS_GetRegionUserData(pRegion, 0);
|
||||
uiBarToReRender = iAttribute;
|
||||
uiBarToReRender = iAttribute;
|
||||
|
||||
// get value of attribute
|
||||
iCurrentAttributeValue = GetCurrentAttributeValue( iAttribute );
|
||||
@@ -1838,7 +1766,7 @@ void SliderRegionButtonCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
if( ( sX > sNewX )&&( sX < sNewX + SLIDER_BAR_WIDTH) )
|
||||
{
|
||||
// we are within the slide bar, set fact we want to drag and draw
|
||||
fSlideIsActive = TRUE;
|
||||
fSlideIsActive = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1846,23 +1774,21 @@ void SliderRegionButtonCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
fSlideIsActive =FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void SliderBarRegionButtonCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
|
||||
|
||||
if( iReason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
fSlideIsActive = TRUE;
|
||||
fSlideIsActive = TRUE;
|
||||
SliderRegionButtonCallback( &pSliderRegions[ MSYS_GetRegionUserData(pRegion, 0) ], MSYS_CALLBACK_REASON_LBUTTON_REPEAT);
|
||||
}
|
||||
|
||||
if( iReason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
fSlideIsActive = FALSE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
INT32 GetCurrentAttributeValue( INT32 iAttribute )
|
||||
@@ -1878,10 +1804,10 @@ INT32 GetCurrentAttributeValue( INT32 iAttribute )
|
||||
case ( DEXTERITY_ATTRIBUTE ):
|
||||
iValue = iCurrentDexterity;
|
||||
break;
|
||||
case ( AGILITY_ATTRIBUTE ):
|
||||
case ( AGILITY_ATTRIBUTE ):
|
||||
iValue = iCurrentAgility;
|
||||
break;
|
||||
case ( HEALTH_ATTRIBUTE ):
|
||||
case ( HEALTH_ATTRIBUTE ):
|
||||
iValue = iCurrentHealth;
|
||||
break;
|
||||
case ( WISDOM_ATTRIBUTE ):
|
||||
@@ -1902,8 +1828,6 @@ INT32 GetCurrentAttributeValue( INT32 iAttribute )
|
||||
case ( EXPLOSIVE_SKILL ):
|
||||
iValue = iCurrentExplosives;
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
|
||||
return iValue;
|
||||
@@ -2111,8 +2035,6 @@ void SetAttributes( void )
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
ResetIncrementCharacterAttributes( );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -2124,8 +2046,9 @@ void DrawBonusPointsRemaining( void )
|
||||
// just reviewing, don't blit stats
|
||||
if( fReviewStats == TRUE )
|
||||
{
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
// parse amountof bns pts remaining
|
||||
swprintf(sString, L"%d", iCurrentBonusPoints);
|
||||
|
||||
@@ -2137,28 +2060,24 @@ void DrawBonusPointsRemaining( void )
|
||||
mprintf( LAPTOP_SCREEN_UL_X + 425 ,LAPTOP_SCREEN_WEB_UL_Y + 51, sString );
|
||||
|
||||
InvalidateRegion( LAPTOP_SCREEN_UL_X + 425, LAPTOP_SCREEN_WEB_UL_Y + 51, LAPTOP_SCREEN_UL_X + 475, LAPTOP_SCREEN_WEB_UL_Y + 71 );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void SetGeneratedCharacterAttributes( void )
|
||||
{
|
||||
// copies over the attributes of the player generated character
|
||||
iStrength = iCurrentStrength ;
|
||||
iDexterity = iCurrentDexterity;
|
||||
iHealth = iCurrentHealth;
|
||||
iLeadership = iCurrentLeaderShip;
|
||||
iWisdom = iCurrentWisdom;
|
||||
iAgility = iCurrentAgility;
|
||||
iStrength = iCurrentStrength;
|
||||
iDexterity = iCurrentDexterity;
|
||||
iHealth = iCurrentHealth;
|
||||
iLeadership = iCurrentLeaderShip;
|
||||
iWisdom = iCurrentWisdom;
|
||||
iAgility = iCurrentAgility;
|
||||
|
||||
// skills
|
||||
iMarksmanship = iCurrentMarkmanship;
|
||||
iMechanical = iCurrentMechanical;
|
||||
iMedical = iCurrentMedical;
|
||||
iExplosives = iCurrentExplosives;
|
||||
|
||||
|
||||
return;
|
||||
iMechanical = iCurrentMechanical;
|
||||
iMedical = iCurrentMedical;
|
||||
iExplosives = iCurrentExplosives;
|
||||
}
|
||||
|
||||
|
||||
@@ -2175,13 +2094,10 @@ void StatAtZeroBoxCallBack( UINT8 bExitValue )
|
||||
fHasAnySlidingBarMoved = TRUE;
|
||||
MarkButtonsDirty();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
INT32 DetermineNewValue( INT32 iNewX )
|
||||
{
|
||||
|
||||
INT32 iMinAttribute = gGameExternalOptions.iMinAttribute;
|
||||
INT32 iMaxAttribute = gGameExternalOptions.iMaxAttribute;
|
||||
|
||||
@@ -2206,7 +2122,6 @@ INT32 DetermineNewValue( INT32 iNewX )
|
||||
|
||||
INT32 DetermineNewPosition( INT32 iAttribute )
|
||||
{
|
||||
|
||||
INT32 iMinAttribute = gGameExternalOptions.iMinAttribute;
|
||||
INT32 iMaxAttribute = gGameExternalOptions.iMaxAttribute;
|
||||
|
||||
@@ -2230,6 +2145,6 @@ INT8 StartingLevelChosen()
|
||||
{
|
||||
if ( (iStartingLevel > 0) && (iStartingLevel <= 10) )
|
||||
return(iStartingLevel);
|
||||
else
|
||||
return(1);
|
||||
|
||||
return(1);
|
||||
}
|
||||
|
||||
+310
-302
@@ -32,6 +32,8 @@
|
||||
#include "Random.h"
|
||||
#include "GameVersion.h"
|
||||
#include "GameSettings.h"
|
||||
#include "IMP Gear.h" // added by Flugente
|
||||
#include "IMP Gear Entrance.h" // added by Flugente
|
||||
#endif
|
||||
|
||||
#include <vfs/Core/vfs.h>
|
||||
@@ -156,7 +158,6 @@ BOOLEAN fLoadingCharacterForPreviousImpProfile = FALSE;
|
||||
void CreateConfirmButtons( void );
|
||||
void DestroyConfirmButtons( void );
|
||||
void GiveItemsToPC( UINT8 ubProfileId );
|
||||
void MakeProfileInvItemAnySlot(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubStatus, UINT8 ubHowMany);
|
||||
void MakeProfileInvItemThisSlot(MERCPROFILESTRUCT *pProfile, UINT32 uiPos, UINT16 usItem, UINT8 ubStatus, UINT8 ubHowMany);
|
||||
INT32 FirstFreeBigEnoughPocket(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubHowMany);
|
||||
|
||||
@@ -610,341 +611,349 @@ void GiveItemsToPC( UINT8 ubProfileId )
|
||||
|
||||
pProfile = &(gMercProfiles[ubProfileId]);
|
||||
|
||||
// STANDARD EQUIPMENT
|
||||
// SANDRO - obsolete code deleted
|
||||
|
||||
GiveIMPItems(pProfile, 100, IMP_DEFAULT);
|
||||
GiveIMPRandomItems(pProfile, IMP_RANDOMDEFAULT);
|
||||
|
||||
GiveIMPItems (pProfile,pProfile->bWisdom,IMP_WISDOM);
|
||||
GiveIMPItems (pProfile,pProfile->bMarksmanship,IMP_MARKSMANSHIP);
|
||||
GiveIMPItems (pProfile,pProfile->bMedical,IMP_MEDICAL);
|
||||
GiveIMPItems (pProfile,pProfile->bMechanical,IMP_MECHANICAL);
|
||||
GiveIMPItems (pProfile,pProfile->bExplosive,IMP_EXPLOSIVE);
|
||||
GiveIMPItems (pProfile,pProfile->bAgility,IMP_AGILITY);
|
||||
GiveIMPItems (pProfile,pProfile->bDexterity,IMP_DEXTERITY);
|
||||
GiveIMPItems (pProfile,pProfile->bStrength,IMP_STRENGTH);
|
||||
GiveIMPItems (pProfile,pProfile->bLifeMax,IMP_HEALTH);
|
||||
GiveIMPItems (pProfile,pProfile->bLeadership,IMP_LEADERSHIP);
|
||||
|
||||
// check for special skills
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
// Check for new traits - SANDRO
|
||||
// DBrot: experts get other stuff
|
||||
if ( gGameOptions.fNewTraitSystem )
|
||||
// Flugente: if necessary, give us the gear we selected
|
||||
if ( IsIMPGearUsed() )
|
||||
{
|
||||
// MAJOR TRAITS
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, AUTO_WEAPONS_NT))
|
||||
{
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, AUTO_WEAPONS_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_AUTO_WEAPONS_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_AUTO_WEAPONS);
|
||||
}
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, HEAVY_WEAPONS_NT ))
|
||||
{
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, HEAVY_WEAPONS_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_HEAVY_WEAPONS_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_HEAVY_WEAPONS);
|
||||
}
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, SNIPER_NT))
|
||||
{
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, SNIPER_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_SNIPER_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_SNIPER);
|
||||
}
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, RANGER_NT))
|
||||
{
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, RANGER_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_RANGER_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_RANGER);
|
||||
}
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, GUNSLINGER_NT))
|
||||
{
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, GUNSLINGER_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_GUNSLINGER_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_GUNSLINGER);
|
||||
}
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, MARTIAL_ARTS_NT))
|
||||
{
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, MARTIAL_ARTS_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_MARTIAL_ARTS_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_MARTIAL_ARTS);
|
||||
}
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, SQUADLEADER_NT))
|
||||
{
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, SQUADLEADER_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_SQUADLEADER_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_SQUADLEADER);
|
||||
}
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, TECHNICIAN_NT) && ( iMechanical ) )
|
||||
{
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, TECHNICIAN_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_TECHNICIAN_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_TECHNICIAN);
|
||||
}
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, DOCTOR_NT ))
|
||||
{
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, DOCTOR_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_DOCTOR_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_DOCTOR);
|
||||
}
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, COVERT_NT))
|
||||
{
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, COVERT_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_COVERT_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_COVERT);
|
||||
}
|
||||
}
|
||||
// MINOR TRAITS
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, AMBIDEXTROUS_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_AMBIDEXTROUS);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, MELEE_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_MELEE);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, THROWING_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_THROWING);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, NIGHT_OPS_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_NIGHT_OPS);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, STEALTHY_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_STEALTHY);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, ATHLETICS_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_ATHLETICS);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, BODYBUILDING_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_BODYBUILDING);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, DEMOLITIONS_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_DEMOLITIONS);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, TEACHING_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_TEACHING);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, SCOUTING_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_SCOUTING);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, RADIO_OPERATOR_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_RADIO_OPERATOR);
|
||||
}
|
||||
GiveIMPSelectedGear( pProfile );
|
||||
}
|
||||
else
|
||||
{
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, LOCKPICKING_OT) && ( iMechanical ) )
|
||||
// STANDARD EQUIPMENT
|
||||
// SANDRO - obsolete code deleted
|
||||
|
||||
GiveIMPItems(pProfile, 100, IMP_DEFAULT);
|
||||
GiveIMPRandomItems(pProfile, IMP_RANDOMDEFAULT);
|
||||
|
||||
GiveIMPItems (pProfile,pProfile->bWisdom,IMP_WISDOM);
|
||||
GiveIMPItems (pProfile,pProfile->bMarksmanship,IMP_MARKSMANSHIP);
|
||||
GiveIMPItems (pProfile,pProfile->bMedical,IMP_MEDICAL);
|
||||
GiveIMPItems (pProfile,pProfile->bMechanical,IMP_MECHANICAL);
|
||||
GiveIMPItems (pProfile,pProfile->bExplosive,IMP_EXPLOSIVE);
|
||||
GiveIMPItems (pProfile,pProfile->bAgility,IMP_AGILITY);
|
||||
GiveIMPItems (pProfile,pProfile->bDexterity,IMP_DEXTERITY);
|
||||
GiveIMPItems (pProfile,pProfile->bStrength,IMP_STRENGTH);
|
||||
GiveIMPItems (pProfile,pProfile->bLifeMax,IMP_HEALTH);
|
||||
GiveIMPItems (pProfile,pProfile->bLeadership,IMP_LEADERSHIP);
|
||||
|
||||
// check for special skills
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
// Check for new traits - SANDRO
|
||||
// DBrot: experts get other stuff
|
||||
if ( gGameOptions.fNewTraitSystem )
|
||||
{
|
||||
//MakeProfileInvItemAnySlot(pProfile, LOCKSMITHKIT, 100, 1);
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, LOCKPICKING_OT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_LOCKPICKING_EXP);
|
||||
// MAJOR TRAITS
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, AUTO_WEAPONS_NT))
|
||||
{
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, AUTO_WEAPONS_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_AUTO_WEAPONS_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_AUTO_WEAPONS);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, HEAVY_WEAPONS_NT ))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_LOCKPICKING);
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, HEAVY_WEAPONS_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_HEAVY_WEAPONS_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_HEAVY_WEAPONS);
|
||||
}
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, SNIPER_NT))
|
||||
{
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, SNIPER_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_SNIPER_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_SNIPER);
|
||||
}
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, RANGER_NT))
|
||||
{
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, RANGER_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_RANGER_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_RANGER);
|
||||
}
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, GUNSLINGER_NT))
|
||||
{
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, GUNSLINGER_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_GUNSLINGER_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_GUNSLINGER);
|
||||
}
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, MARTIAL_ARTS_NT))
|
||||
{
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, MARTIAL_ARTS_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_MARTIAL_ARTS_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_MARTIAL_ARTS);
|
||||
}
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, SQUADLEADER_NT))
|
||||
{
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, SQUADLEADER_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_SQUADLEADER_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_SQUADLEADER);
|
||||
}
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, TECHNICIAN_NT) && ( iMechanical ) )
|
||||
{
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, TECHNICIAN_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_TECHNICIAN_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_TECHNICIAN);
|
||||
}
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, DOCTOR_NT ))
|
||||
{
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, DOCTOR_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_DOCTOR_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_DOCTOR);
|
||||
}
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, COVERT_NT))
|
||||
{
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, COVERT_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_COVERT_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_COVERT);
|
||||
}
|
||||
}
|
||||
// MINOR TRAITS
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, AMBIDEXTROUS_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_AMBIDEXTROUS);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, MELEE_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_MELEE);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, THROWING_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_THROWING);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, NIGHT_OPS_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_NIGHT_OPS);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, STEALTHY_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_STEALTHY);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, ATHLETICS_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_ATHLETICS);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, BODYBUILDING_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_BODYBUILDING);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, DEMOLITIONS_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_DEMOLITIONS);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, TEACHING_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_TEACHING);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, SCOUTING_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_SCOUTING);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, RADIO_OPERATOR_NT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_RADIO_OPERATOR);
|
||||
}
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, ELECTRONICS_OT) && ( iMechanical ) )
|
||||
else
|
||||
{
|
||||
//MakeProfileInvItemAnySlot(pProfile, METALDETECTOR, 100, 1);
|
||||
GiveIMPRandomItems(pProfile,IMP_ELECTRONICS);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, CAMOUFLAGED_OT)) // TODO: Madd - other camouflage types, once we figure out a way to enable more traits
|
||||
{
|
||||
//MakeProfileInvItemAnySlot(pProfile, CAMOUFLAGEKIT, 100, 1);
|
||||
GiveIMPRandomItems(pProfile,IMP_CAMOUFLAGED);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, AMBIDEXT_OT))
|
||||
{
|
||||
//MakeProfileInvItemAnySlot(pProfile, M950, 100, 1);
|
||||
GiveIMPRandomItems(pProfile,IMP_AMBIDEXTROUS);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, NIGHTOPS_OT))
|
||||
{
|
||||
// MakeProfileInvItemAnySlot(pProfile, SILENCER, 100, 2);
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, NIGHTOPS_OT))
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, LOCKPICKING_OT) && ( iMechanical ) )
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_NIGHT_OPS_EXP);
|
||||
//MakeProfileInvItemAnySlot(pProfile, LOCKSMITHKIT, 100, 1);
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, LOCKPICKING_OT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_LOCKPICKING_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_LOCKPICKING);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, ELECTRONICS_OT) && ( iMechanical ) )
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_NIGHT_OPS);
|
||||
//MakeProfileInvItemAnySlot(pProfile, METALDETECTOR, 100, 1);
|
||||
GiveIMPRandomItems(pProfile,IMP_ELECTRONICS);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, CAMOUFLAGED_OT)) // TODO: Madd - other camouflage types, once we figure out a way to enable more traits
|
||||
{
|
||||
//MakeProfileInvItemAnySlot(pProfile, CAMOUFLAGEKIT, 100, 1);
|
||||
GiveIMPRandomItems(pProfile,IMP_CAMOUFLAGED);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, AMBIDEXT_OT))
|
||||
{
|
||||
//MakeProfileInvItemAnySlot(pProfile, M950, 100, 1);
|
||||
GiveIMPRandomItems(pProfile,IMP_AMBIDEXTROUS);
|
||||
}
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, NIGHTOPS_OT))
|
||||
{
|
||||
// MakeProfileInvItemAnySlot(pProfile, SILENCER, 100, 2);
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, NIGHTOPS_OT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_NIGHT_OPS_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_NIGHT_OPS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, HANDTOHAND_OT))
|
||||
{
|
||||
//MakeProfileInvItemAnySlot(pProfile, BRASS_KNUCKLES, 100, 1);
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, HANDTOHAND_OT))
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, HANDTOHAND_OT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_MARTIAL_ARTS_EXP);
|
||||
//MakeProfileInvItemAnySlot(pProfile, BRASS_KNUCKLES, 100, 1);
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, HANDTOHAND_OT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_MARTIAL_ARTS_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_MARTIAL_ARTS);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_MARTIAL_ARTS);
|
||||
}
|
||||
}
|
||||
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, THROWING_OT))
|
||||
{
|
||||
// MakeProfileInvItemAnySlot(pProfile, THROWING_KNIFE, 100, 1);
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, THROWING_OT))
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, THROWING_OT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_THROWING_EXP);
|
||||
// MakeProfileInvItemAnySlot(pProfile, THROWING_KNIFE, 100, 1);
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, THROWING_OT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_THROWING_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_THROWING);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_THROWING);
|
||||
}
|
||||
}
|
||||
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, STEALTHY_OT))
|
||||
{
|
||||
// MakeProfileInvItemAnySlot(pProfile, SILENCER, 100, 1);
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, STEALTHY_OT))
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, STEALTHY_OT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_STEALTHY_EXP);
|
||||
// MakeProfileInvItemAnySlot(pProfile, SILENCER, 100, 1);
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, STEALTHY_OT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_STEALTHY_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_STEALTHY);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_STEALTHY);
|
||||
}
|
||||
}
|
||||
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, KNIFING_OT))
|
||||
{
|
||||
// MakeProfileInvItemAnySlot(pProfile, COMBAT_KNIFE, 100, 1);
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, KNIFING_OT))
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, KNIFING_OT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_MELEE_EXP);
|
||||
// MakeProfileInvItemAnySlot(pProfile, COMBAT_KNIFE, 100, 1);
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, KNIFING_OT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_MELEE_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_MELEE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_MELEE);
|
||||
}
|
||||
}
|
||||
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, MARTIALARTS_OT))
|
||||
{
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, MARTIALARTS_OT))
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, MARTIALARTS_OT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_MARTIAL_ARTS_EXP);
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, MARTIALARTS_OT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_MARTIAL_ARTS_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_MARTIAL_ARTS);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_MARTIAL_ARTS);
|
||||
}
|
||||
}
|
||||
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, PROF_SNIPER_OT))
|
||||
{
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, PROF_SNIPER_OT))
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, PROF_SNIPER_OT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_SNIPER_EXP);
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, PROF_SNIPER_OT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_SNIPER_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_SNIPER);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_SNIPER);
|
||||
}
|
||||
}
|
||||
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, TEACHING_OT))
|
||||
{
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, TEACHING_OT))
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, TEACHING_OT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_TEACHING_EXP);
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, TEACHING_OT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_TEACHING_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_TEACHING);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_TEACHING);
|
||||
}
|
||||
}
|
||||
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, AUTO_WEAPS_OT))
|
||||
{
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, AUTO_WEAPS_OT))
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, AUTO_WEAPS_OT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_AUTO_WEAPONS_EXP);
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, AUTO_WEAPS_OT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_AUTO_WEAPONS_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_AUTO_WEAPONS);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_AUTO_WEAPONS);
|
||||
}
|
||||
}
|
||||
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, HEAVY_WEAPS_OT ))
|
||||
{
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, HEAVY_WEAPS_OT))
|
||||
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, HEAVY_WEAPS_OT ))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_HEAVY_WEAPONS_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_HEAVY_WEAPONS);
|
||||
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, HEAVY_WEAPS_OT))
|
||||
{
|
||||
GiveIMPRandomItems(pProfile,IMP_HEAVY_WEAPONS_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
GiveIMPRandomItems(pProfile, IMP_HEAVY_WEAPONS);
|
||||
}
|
||||
}
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
// CHRISL: Now that all items have been issued, distribute them into appropriate pockets, starting with the largest items
|
||||
DistributeInitialGear(pProfile);
|
||||
@@ -1785,20 +1794,19 @@ void GiveIMPItems( MERCPROFILESTRUCT *pProfile, INT8 abilityValue, UINT8 typeInd
|
||||
// SANDRO - Function to determine actual cost of profile
|
||||
INT32 iGetProfileCost()
|
||||
{
|
||||
// Flugente: aditional imp gear cost
|
||||
INT32 impgearcost = GetIMPGearCost();
|
||||
|
||||
if (gGameExternalOptions.fDynamicIMPProfileCost)
|
||||
{
|
||||
INT32 iIMPProfileCost;
|
||||
|
||||
// silversurfer: When we create an IMP he doesn't occupy a slot yet so we need to add 1 to get the correct price in advance.
|
||||
iIMPProfileCost = gGameExternalOptions.iIMPProfileCost * ( CountFilledIMPSlots(-1) + 1 );
|
||||
INT32 iIMPProfileCost = gGameExternalOptions.iIMPProfileCost * (CountFilledIMPSlots( -1 ) + 1);
|
||||
|
||||
if (iIMPProfileCost >= gGameExternalOptions.iIMPProfileCost)
|
||||
return(iIMPProfileCost);
|
||||
else
|
||||
return(gGameExternalOptions.iIMPProfileCost);
|
||||
if ( iIMPProfileCost + impgearcost >= gGameExternalOptions.iIMPProfileCost )
|
||||
return iIMPProfileCost + impgearcost;
|
||||
}
|
||||
else
|
||||
return(gGameExternalOptions.iIMPProfileCost);
|
||||
|
||||
return gGameExternalOptions.iIMPProfileCost + impgearcost;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -89,5 +89,7 @@ BOOLEAN ImpExists ( STR fileName );
|
||||
|
||||
INT32 iGetProfileCost( void ); // added by SANDRO
|
||||
|
||||
void MakeProfileInvItemAnySlot( MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubStatus, UINT8 ubHowMany );
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
/**
|
||||
* @file
|
||||
* @author Flugente (bears-pit.com)
|
||||
*/
|
||||
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#else
|
||||
#include "CharProfile.h"
|
||||
#include "IMP Gear Entrance.h"
|
||||
#include "IMP MainPage.h"
|
||||
#include "IMPVideoObjects.h"
|
||||
#include "Utilities.h"
|
||||
#include "Debug.h"
|
||||
#include "WordWrap.h"
|
||||
#include "Encrypted File.h"
|
||||
#include "cursors.h"
|
||||
#include "laptop.h"
|
||||
#include "IMP Text System.h"
|
||||
#include "Text.h"
|
||||
#endif
|
||||
|
||||
// the buttons
|
||||
UINT32 giIMPGearEntranceButtonImage[2];
|
||||
UINT32 giIMPGearEntranceButton[2];
|
||||
|
||||
// function definitions
|
||||
void DestroyIMPGearEntranceButtons( void );
|
||||
void CreateIMPGearEntranceButtons( void );
|
||||
|
||||
|
||||
// callbacks
|
||||
void BtnIMPGearBeginCallbackOld( GUI_BUTTON *btn, INT32 reason );
|
||||
void BtnIMPGearBeginCallbackNew( GUI_BUTTON *btn, INT32 reason );
|
||||
|
||||
BOOLEAN fNewIMPGearMethodUsed = FALSE;
|
||||
|
||||
BOOLEAN IsIMPGearUsed()
|
||||
{
|
||||
return fNewIMPGearMethodUsed;
|
||||
}
|
||||
|
||||
void EnterIMPGearEntrance( void )
|
||||
{
|
||||
CreateIMPGearEntranceButtons( );
|
||||
}
|
||||
|
||||
void RenderIMPGearEntrance( void )
|
||||
{
|
||||
// the background
|
||||
RenderProfileBackGround( );
|
||||
|
||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, LAPTOP_SCREEN_UL_X + 50, LAPTOP_SCREEN_WEB_UL_Y + 50, LAPTOP_SCREEN_LR_X - 50, LAPTOP_SCREEN_WEB_UL_Y + 200, Get16BPPColor( FROMRGB( 100, 100, 100 ) ) );
|
||||
|
||||
UINT16 usY = DisplayWrappedString( LAPTOP_SCREEN_UL_X + 60, LAPTOP_SCREEN_WEB_UL_Y + 60, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X - 120, 2, FONT14ARIAL, FONT_WHITE,
|
||||
szIMPGearWebSiteText[0], FONT_MCOLOR_BLACK, FALSE, 0 );
|
||||
usY += DisplayWrappedString( LAPTOP_SCREEN_UL_X + 60, LAPTOP_SCREEN_WEB_UL_Y + 60 + usY, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X - 120, 2, FONT14ARIAL, FONT_WHITE,
|
||||
szIMPGearWebSiteText[1], FONT_MCOLOR_BLACK, FALSE, 0 );
|
||||
usY += DisplayWrappedString( LAPTOP_SCREEN_UL_X + 60, LAPTOP_SCREEN_WEB_UL_Y + 60 + usY, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X - 120, 2, FONT14ARIAL, FONT_WHITE,
|
||||
szIMPGearWebSiteText[2], FONT_MCOLOR_BLACK, FALSE, 0 );
|
||||
}
|
||||
|
||||
void ExitIMPGearEntrance( void )
|
||||
{
|
||||
// destroy the finish buttons
|
||||
DestroyIMPGearEntranceButtons( );
|
||||
}
|
||||
|
||||
void HandleIMPGearEntrance( void )
|
||||
{
|
||||
InvalidateRegion( LAPTOP_SCREEN_UL_X, LAPTOP_SCREEN_WEB_UL_Y, LAPTOP_SCREEN_LR_X, LAPTOP_SCREEN_WEB_LR_Y );
|
||||
}
|
||||
|
||||
void CreateIMPGearEntranceButtons( void )
|
||||
{
|
||||
// the begin button
|
||||
giIMPGearEntranceButtonImage[0] = LoadButtonImage( "LAPTOP\\button_2.sti", -1, 0, -1, 1, -1 );
|
||||
|
||||
giIMPGearEntranceButton[0] = CreateIconAndTextButton( giIMPGearEntranceButtonImage[0], szIMPGearWebSiteText[3], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + (136), LAPTOP_SCREEN_WEB_UL_Y + (220), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPGearBeginCallbackOld );
|
||||
|
||||
giIMPGearEntranceButton[1] = CreateIconAndTextButton( giIMPGearEntranceButtonImage[0], szIMPGearWebSiteText[4], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + (136), LAPTOP_SCREEN_WEB_UL_Y + (280), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPGearBeginCallbackNew );
|
||||
|
||||
SetButtonCursor( giIMPGearEntranceButton[0], CURSOR_WWW );
|
||||
}
|
||||
|
||||
|
||||
void DestroyIMPGearEntranceButtons( void )
|
||||
{
|
||||
RemoveButton( giIMPGearEntranceButton[0] );
|
||||
RemoveButton( giIMPGearEntranceButton[1] );
|
||||
UnloadButtonImage( giIMPGearEntranceButtonImage[0] );
|
||||
}
|
||||
|
||||
|
||||
void BtnIMPGearBeginCallbackOld( GUI_BUTTON *btn, INT32 reason )
|
||||
{
|
||||
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_FINISH;
|
||||
iCurrentProfileMode = IMP__FINISH;
|
||||
|
||||
fButtonPendingFlag = TRUE;
|
||||
|
||||
fNewIMPGearMethodUsed = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BtnIMPGearBeginCallbackNew( GUI_BUTTON *btn, INT32 reason )
|
||||
{
|
||||
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_GEAR;
|
||||
fButtonPendingFlag = TRUE;
|
||||
|
||||
fNewIMPGearMethodUsed = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#ifndef __IMP_GEAR_ENTRANCE__H_
|
||||
#define __IMP_GEAR_ENTRANCE__H_
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @author Flugente (bears-pit.com)
|
||||
*/
|
||||
|
||||
#include "Types.h"
|
||||
|
||||
void EnterIMPGearEntrance( void );
|
||||
void RenderIMPGearEntrance( void );
|
||||
void ExitIMPGearEntrance( void );
|
||||
void HandleIMPGearEntrance( void );
|
||||
|
||||
BOOLEAN IsIMPGearUsed();
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,923 @@
|
||||
/**
|
||||
* @file
|
||||
* @author Flugente (bears-pit.com)
|
||||
*/
|
||||
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Laptop All.h"
|
||||
#include "IMP Skill Trait.h"
|
||||
#include "_Ja25Englishtext.h"
|
||||
#else
|
||||
#include "IMP Gear.h"
|
||||
#include "IMP Skill Trait.h"
|
||||
#include "Button System.h"
|
||||
#include "utilities.h"
|
||||
#include "Debug.h"
|
||||
#include "Text.h"
|
||||
#include "Font Control.h"
|
||||
#include "font.h"
|
||||
#include "laptop.h"
|
||||
#include "cursors.h"
|
||||
#include "IMP MainPage.h"
|
||||
#include "IMPVideoObjects.h"
|
||||
#include "_Ja25EnglishText.h"
|
||||
#include "wordwrap.h"
|
||||
#include "CharProfile.h"
|
||||
#include "soldier profile type.h"
|
||||
#include "IMP Compile Character.h"
|
||||
#include "GameSettings.h"
|
||||
#include "Interface.h"
|
||||
#include "DropDown.h"
|
||||
#include "Interface Items.h"
|
||||
#include "InterfaceItemImages.h"
|
||||
#include "IMP Confirm.h"
|
||||
#include "IMP Skill Trait.h"
|
||||
#include "IMP Minor Trait.h"
|
||||
#include "IMP Gear Entrance.h"
|
||||
#endif
|
||||
|
||||
|
||||
//*******************************************************************
|
||||
//
|
||||
// Local Defines
|
||||
//
|
||||
//*******************************************************************
|
||||
|
||||
#define IMP_GEAR__FONT FONT12ARIAL
|
||||
#define IMP_GEAR__COLOR FONT_MCOLOR_WHITE
|
||||
|
||||
#define IMP_GEAR__TITLE_X LAPTOP_SCREEN_UL_X - 111
|
||||
|
||||
#define IMP_GEAR_ITEMDISPLAY_WIDTH 60
|
||||
#define IMP_GEAR_ITEMDISPLAY_HEIGHT 25
|
||||
|
||||
#define IMP_GEAR_SPACE_BETWEEN_BOXES 1
|
||||
|
||||
//*******************************************************************
|
||||
//
|
||||
// Local Variables
|
||||
//
|
||||
//*******************************************************************
|
||||
|
||||
BOOLEAN gfIMPGear_Redraw = FALSE;
|
||||
|
||||
// this is the Done button
|
||||
INT32 giIMPGearFinishButton;
|
||||
INT32 giIMPGearFinishButtonImage;
|
||||
|
||||
// We access the dropdowns via pointers, which we identify with these enums
|
||||
// They corrspond with the enums in Dropdown.h
|
||||
// NOTE: make sure that there are as many of these enums as there are DropDowns for this site. Otherwise odd things migt happen - consider yourself warned.
|
||||
enum impgeardropdownenums
|
||||
{
|
||||
IMPGEAR_DROPDOWN_LBE1 = 0,
|
||||
IMPGEAR_DROPDOWN_LBE2,
|
||||
IMPGEAR_DROPDOWN_LBE3,
|
||||
IMPGEAR_DROPDOWN_LBE4,
|
||||
IMPGEAR_DROPDOWN_LBE5,
|
||||
|
||||
IMPGEAR_DROPDOWN_GUN_1,
|
||||
IMPGEAR_DROPDOWN_AMMO_1,
|
||||
IMPGEAR_DROPDOWN_GUN_2,
|
||||
IMPGEAR_DROPDOWN_AMMO_2,
|
||||
IMPGEAR_DROPDOWN_MELEE,
|
||||
|
||||
IMPGEAR_DROPDOWN_HELMET,
|
||||
IMPGEAR_DROPDOWN_VEST,
|
||||
IMPGEAR_DROPDOWN_LEGS,
|
||||
IMPGEAR_DROPDOWN_FACE1,
|
||||
IMPGEAR_DROPDOWN_FACE2,
|
||||
|
||||
IMPGEAR_DROPDOWN_MISC_1,
|
||||
IMPGEAR_DROPDOWN_MISC_2,
|
||||
IMPGEAR_DROPDOWN_MISC_3,
|
||||
IMPGEAR_DROPDOWN_MISC_4,
|
||||
IMPGEAR_DROPDOWN_MISC_5,
|
||||
IMPGEAR_DROPDOWN_MISC_6,
|
||||
IMPGEAR_DROPDOWN_MISC_7,
|
||||
|
||||
IMPGEAR_DROPDOWN_MAX,
|
||||
};
|
||||
|
||||
// as accessing DropDowns via parameter is tedious, we use pointers, which allows looping
|
||||
DropDownBase* pIMPGEARDropDown[IMPGEAR_DROPDOWN_MAX] = {NULL};
|
||||
INT16 gIMPGearGun1 = -1;
|
||||
INT16 gIMPGearGun2 = -1;
|
||||
|
||||
// a set of all items that we can choose from
|
||||
std::set<UINT16> gIMPGearPossibleItems;
|
||||
|
||||
// a map with all items we have selected, and how many we want
|
||||
std::map<UINT16, UINT8> gIMPGearSelectedItems;
|
||||
|
||||
extern BOOLEAN gfSkillTraitQuestions[20];
|
||||
extern BOOLEAN gfSkillTraitQuestions2[20];
|
||||
|
||||
extern BOOLEAN gfMinorTraitQuestions[IMP_SKILL_TRAITS_NEW_NUMBER_MINOR_SKILLS];
|
||||
|
||||
// +/- buttons to alter the number of items
|
||||
INT32 gIMPGearAddButtonImage[2];
|
||||
INT32 gIMPGearAddButton[2 * IMPGEAR_DROPDOWN_MAX] = {-1};
|
||||
BOOLEAN gIMPGearButtonCreated[2 * IMPGEAR_DROPDOWN_MAX] = {FALSE};
|
||||
|
||||
UINT8 gIMPGearCount[IMPGEAR_DROPDOWN_MAX] = {0};
|
||||
UINT8 gIMPGearMaximum[IMPGEAR_DROPDOWN_MAX] = {0};
|
||||
|
||||
// cost of IMP gear
|
||||
INT32 gIMPGearCost = 0;
|
||||
|
||||
extern BOOLEAN fNewIMPGearMethodUsed;
|
||||
|
||||
//*******************************************************************
|
||||
//
|
||||
// Function Prototypes
|
||||
//
|
||||
//*******************************************************************
|
||||
|
||||
|
||||
void IMPGearDisplay( );
|
||||
void DisplayGear( UINT16 usItem, UINT16 usPosX, UINT16 usPosY );
|
||||
void BtnIMPGearFinishCallback( GUI_BUTTON *btn, INT32 reason );
|
||||
|
||||
// determine all items that are selectable according to xml and choices
|
||||
void CalculatePossibleItems();
|
||||
|
||||
// store the selected gear
|
||||
void StoreSelectedIMPGear();
|
||||
|
||||
// fill dropdowns with items
|
||||
void DistributePossibleItemsOnDropDowns();
|
||||
|
||||
void GearAddButtonCallback( GUI_BUTTON *btn, INT32 reason );
|
||||
|
||||
|
||||
//*******************************************************************
|
||||
//
|
||||
// DropDown instances
|
||||
//
|
||||
//*******************************************************************
|
||||
|
||||
template<> void DropDownTemplate<DROPDOWNNR_IMPGEAR_GUN_1>::SetRefresh( ) { gfIMPGear_Redraw = TRUE; }
|
||||
template<> void DropDownTemplate<DROPDOWNNR_IMPGEAR_AMMO_1>::SetRefresh( ) { gfIMPGear_Redraw = TRUE; }
|
||||
template<> void DropDownTemplate<DROPDOWNNR_IMPGEAR_GUN_2>::SetRefresh( ) { gfIMPGear_Redraw = TRUE; }
|
||||
template<> void DropDownTemplate<DROPDOWNNR_IMPGEAR_AMMO_2>::SetRefresh( ) { gfIMPGear_Redraw = TRUE; }
|
||||
template<> void DropDownTemplate<DROPDOWNNR_IMPGEAR_MELEE>::SetRefresh( ) { gfIMPGear_Redraw = TRUE; }
|
||||
template<> void DropDownTemplate<DROPDOWNNR_IMPGEAR_LBE1>::SetRefresh( ) { gfIMPGear_Redraw = TRUE; }
|
||||
template<> void DropDownTemplate<DROPDOWNNR_IMPGEAR_LBE2>::SetRefresh( ) { gfIMPGear_Redraw = TRUE; }
|
||||
template<> void DropDownTemplate<DROPDOWNNR_IMPGEAR_LBE3>::SetRefresh( ) { gfIMPGear_Redraw = TRUE; }
|
||||
template<> void DropDownTemplate<DROPDOWNNR_IMPGEAR_LBE4>::SetRefresh( ) { gfIMPGear_Redraw = TRUE; }
|
||||
template<> void DropDownTemplate<DROPDOWNNR_IMPGEAR_LBE5>::SetRefresh( ) { gfIMPGear_Redraw = TRUE; }
|
||||
template<> void DropDownTemplate<DROPDOWNNR_IMPGEAR_HELMET>::SetRefresh( ) { gfIMPGear_Redraw = TRUE; }
|
||||
template<> void DropDownTemplate<DROPDOWNNR_IMPGEAR_VEST>::SetRefresh( ) { gfIMPGear_Redraw = TRUE; }
|
||||
template<> void DropDownTemplate<DROPDOWNNR_IMPGEAR_LEGS>::SetRefresh( ) { gfIMPGear_Redraw = TRUE; }
|
||||
template<> void DropDownTemplate<DROPDOWNNR_IMPGEAR_FACE1>::SetRefresh( ) { gfIMPGear_Redraw = TRUE; }
|
||||
template<> void DropDownTemplate<DROPDOWNNR_IMPGEAR_FACE2>::SetRefresh( ) { gfIMPGear_Redraw = TRUE; }
|
||||
template<> void DropDownTemplate<DROPDOWNNR_IMPGEAR_MISC_1>::SetRefresh( ) { gfIMPGear_Redraw = TRUE; }
|
||||
template<> void DropDownTemplate<DROPDOWNNR_IMPGEAR_MISC_2>::SetRefresh( ) { gfIMPGear_Redraw = TRUE; }
|
||||
template<> void DropDownTemplate<DROPDOWNNR_IMPGEAR_MISC_3>::SetRefresh( ) { gfIMPGear_Redraw = TRUE; }
|
||||
template<> void DropDownTemplate<DROPDOWNNR_IMPGEAR_MISC_4>::SetRefresh( ) { gfIMPGear_Redraw = TRUE; }
|
||||
template<> void DropDownTemplate<DROPDOWNNR_IMPGEAR_MISC_5>::SetRefresh( ) { gfIMPGear_Redraw = TRUE; }
|
||||
template<> void DropDownTemplate<DROPDOWNNR_IMPGEAR_MISC_6>::SetRefresh( ) { gfIMPGear_Redraw = TRUE; }
|
||||
template<> void DropDownTemplate<DROPDOWNNR_IMPGEAR_MISC_7>::SetRefresh( ) { gfIMPGear_Redraw = TRUE; }
|
||||
|
||||
void EnterIMPGear( void )
|
||||
{
|
||||
RenderProfileBackGround( );
|
||||
|
||||
giIMPGearFinishButtonImage = LoadButtonImage( "LAPTOP\\button_5.sti", -1, 0, -1, 1, -1 );
|
||||
giIMPGearFinishButton = CreateIconAndTextButton( giIMPGearFinishButtonImage, pImpButtonText[11], FONT12ARIAL,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
FONT_WHITE, DEFAULT_SHADOW,
|
||||
TEXT_CJUSTIFIED,
|
||||
LAPTOP_SCREEN_UL_X + (350), LAPTOP_SCREEN_WEB_UL_Y + (340), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPGearFinishCallback );
|
||||
|
||||
SetButtonCursor( giIMPGearFinishButton, CURSOR_WWW );
|
||||
|
||||
// we access the dropdowns via pointers, which allows us to loop over them
|
||||
// for each category, we set a maximum of items that can be stacked at once, as multiple magazines are reasonably, but multiple guns are a no-no
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_LBE1] = &DropDownTemplate<DROPDOWNNR_IMPGEAR_LBE1>::getInstance( );
|
||||
gIMPGearMaximum[IMPGEAR_DROPDOWN_LBE1] = 1;
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_LBE2] = &DropDownTemplate<DROPDOWNNR_IMPGEAR_LBE2>::getInstance( );
|
||||
gIMPGearMaximum[IMPGEAR_DROPDOWN_LBE2] = 1;
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_LBE3] = &DropDownTemplate<DROPDOWNNR_IMPGEAR_LBE3>::getInstance( );
|
||||
gIMPGearMaximum[IMPGEAR_DROPDOWN_LBE3] = 1;
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_LBE4] = &DropDownTemplate<DROPDOWNNR_IMPGEAR_LBE4>::getInstance( );
|
||||
gIMPGearMaximum[IMPGEAR_DROPDOWN_LBE4] = 1;
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_LBE5] = &DropDownTemplate<DROPDOWNNR_IMPGEAR_LBE5>::getInstance( );
|
||||
gIMPGearMaximum[IMPGEAR_DROPDOWN_LBE5] = 1;
|
||||
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_GUN_1] = &DropDownTemplate<DROPDOWNNR_IMPGEAR_GUN_1>::getInstance( );
|
||||
gIMPGearMaximum[IMPGEAR_DROPDOWN_GUN_1] = 1;
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_AMMO_1] = &DropDownTemplate<DROPDOWNNR_IMPGEAR_AMMO_1>::getInstance( );
|
||||
gIMPGearMaximum[IMPGEAR_DROPDOWN_AMMO_1] = 6;
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_GUN_2] = &DropDownTemplate<DROPDOWNNR_IMPGEAR_GUN_2>::getInstance( );
|
||||
gIMPGearMaximum[IMPGEAR_DROPDOWN_GUN_2] = 1;
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_AMMO_2] = &DropDownTemplate<DROPDOWNNR_IMPGEAR_AMMO_2>::getInstance( );
|
||||
gIMPGearMaximum[IMPGEAR_DROPDOWN_AMMO_2] = 6;
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_MELEE] = &DropDownTemplate<DROPDOWNNR_IMPGEAR_MELEE>::getInstance( );
|
||||
gIMPGearMaximum[IMPGEAR_DROPDOWN_MELEE] = 1;
|
||||
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_HELMET] = &DropDownTemplate<DROPDOWNNR_IMPGEAR_HELMET>::getInstance( );
|
||||
gIMPGearMaximum[IMPGEAR_DROPDOWN_HELMET] = 1;
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_VEST] = &DropDownTemplate<DROPDOWNNR_IMPGEAR_VEST>::getInstance( );
|
||||
gIMPGearMaximum[IMPGEAR_DROPDOWN_VEST] = 1;
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_LEGS] = &DropDownTemplate<DROPDOWNNR_IMPGEAR_LEGS>::getInstance( );
|
||||
gIMPGearMaximum[IMPGEAR_DROPDOWN_LEGS] = 1;
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_FACE1] = &DropDownTemplate<DROPDOWNNR_IMPGEAR_FACE1>::getInstance( );
|
||||
gIMPGearMaximum[IMPGEAR_DROPDOWN_FACE1] = 1;
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_FACE2] = &DropDownTemplate<DROPDOWNNR_IMPGEAR_FACE2>::getInstance( );
|
||||
gIMPGearMaximum[IMPGEAR_DROPDOWN_FACE2] = 1;
|
||||
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_MISC_1] = &DropDownTemplate<DROPDOWNNR_IMPGEAR_MISC_1>::getInstance( );
|
||||
gIMPGearMaximum[IMPGEAR_DROPDOWN_MISC_1] = 4;
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_MISC_2] = &DropDownTemplate<DROPDOWNNR_IMPGEAR_MISC_2>::getInstance( );
|
||||
gIMPGearMaximum[IMPGEAR_DROPDOWN_MISC_2] = 4;
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_MISC_3] = &DropDownTemplate<DROPDOWNNR_IMPGEAR_MISC_3>::getInstance( );
|
||||
gIMPGearMaximum[IMPGEAR_DROPDOWN_MISC_3] = 4;
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_MISC_4] = &DropDownTemplate<DROPDOWNNR_IMPGEAR_MISC_4>::getInstance( );
|
||||
gIMPGearMaximum[IMPGEAR_DROPDOWN_MISC_4] = 4;
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_MISC_5] = &DropDownTemplate<DROPDOWNNR_IMPGEAR_MISC_5>::getInstance( );
|
||||
gIMPGearMaximum[IMPGEAR_DROPDOWN_MISC_5] = 4;
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_MISC_6] = &DropDownTemplate<DROPDOWNNR_IMPGEAR_MISC_6>::getInstance( );
|
||||
gIMPGearMaximum[IMPGEAR_DROPDOWN_MISC_6] = 4;
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_MISC_7] = &DropDownTemplate<DROPDOWNNR_IMPGEAR_MISC_7>::getInstance( );
|
||||
gIMPGearMaximum[IMPGEAR_DROPDOWN_MISC_7] = 4;
|
||||
|
||||
// determine all possible items
|
||||
CalculatePossibleItems();
|
||||
|
||||
DistributePossibleItemsOnDropDowns();
|
||||
|
||||
UINT16 usX = LAPTOP_SCREEN_UL_X + 20 + IMP_GEAR_ITEMDISPLAY_WIDTH;
|
||||
UINT16 usY = LAPTOP_SCREEN_WEB_UL_Y + 30;
|
||||
|
||||
int placement = 0;
|
||||
for ( int i = 0; i < IMPGEAR_DROPDOWN_MAX; ++i )
|
||||
{
|
||||
gIMPGearCount[i] = min( 1, gIMPGearMaximum[i]);
|
||||
|
||||
if ( i == IMPGEAR_DROPDOWN_LBE1 )
|
||||
{
|
||||
usX = LAPTOP_SCREEN_UL_X + 20 + IMP_GEAR_ITEMDISPLAY_WIDTH + 230;
|
||||
placement = 5;
|
||||
}
|
||||
else if ( i == IMPGEAR_DROPDOWN_HELMET )
|
||||
{
|
||||
usX = LAPTOP_SCREEN_UL_X + 20 + IMP_GEAR_ITEMDISPLAY_WIDTH + 230;
|
||||
placement = 0;
|
||||
}
|
||||
else if ( i == IMPGEAR_DROPDOWN_MISC_1 )
|
||||
{
|
||||
usX = LAPTOP_SCREEN_UL_X + 20 + IMP_GEAR_ITEMDISPLAY_WIDTH;
|
||||
placement = 5;
|
||||
}
|
||||
else if ( i == IMPGEAR_DROPDOWN_GUN_1 )
|
||||
{
|
||||
usX = LAPTOP_SCREEN_UL_X + 20 + IMP_GEAR_ITEMDISPLAY_WIDTH;
|
||||
placement = 0;
|
||||
}
|
||||
|
||||
// if not using LBE gear, don't show any
|
||||
if ( !UsingNewInventorySystem() )
|
||||
{
|
||||
if ( i >= IMPGEAR_DROPDOWN_LBE1 && i < IMPGEAR_DROPDOWN_LBE5 )
|
||||
continue;
|
||||
}
|
||||
|
||||
pIMPGEARDropDown[i]->SetHelpText( szIMPGearDropDownText[i] );
|
||||
pIMPGEARDropDown[i]->Create( usX, usY + placement * (IMP_GEAR_ITEMDISPLAY_HEIGHT + IMP_GEAR_SPACE_BETWEEN_BOXES) );
|
||||
|
||||
++placement;
|
||||
}
|
||||
|
||||
// load the images for the +/- buttons
|
||||
gIMPGearAddButtonImage[0] = LoadButtonImage( "INTERFACE\\plusminusbuttons.sti", -1, 2, -1, 2, -1 );
|
||||
gIMPGearAddButtonImage[1] = LoadButtonImage( "INTERFACE\\plusminusbuttons.sti", -1, 3, -1, 3, -1 );
|
||||
}
|
||||
|
||||
|
||||
void RenderIMPGear( void )
|
||||
{
|
||||
//render the metal background graphic
|
||||
RenderProfileBackGround( );
|
||||
|
||||
IMPGearDisplay( );
|
||||
|
||||
// reversed order - lower boxes first. It is otherwise possible that open boxes are overlayed by closed boxes
|
||||
for ( int i = IMPGEAR_DROPDOWN_MAX - 1; i >= 0; --i )
|
||||
{
|
||||
if ( pIMPGEARDropDown[i] )
|
||||
pIMPGEARDropDown[i]->Display( );
|
||||
}
|
||||
|
||||
// we have to destroy and recreate the +/- buttons on every refresh, as they would otherwise get overdrawn or work when they shouldn't be there
|
||||
for ( int i = 0; i < 2 * IMPGEAR_DROPDOWN_MAX; ++i )
|
||||
{
|
||||
if ( gIMPGearButtonCreated[i] )
|
||||
{
|
||||
// delete militia panel bottom
|
||||
RemoveButton( gIMPGearAddButton[i] );
|
||||
|
||||
gIMPGearButtonCreated[i] = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
for ( int i = 0; i < IMPGEAR_DROPDOWN_MAX; ++i )
|
||||
{
|
||||
// if dropdown is displayed, has real items in it and can be bought in bulk, add '+'/'-'-buttons
|
||||
if ( pIMPGEARDropDown[i] && pIMPGEARDropDown[i]->IsDisplayed( ) && pIMPGEARDropDown[i]->HasEntries( ) && pIMPGEARDropDown[i]->GetSelectedEntryKey( ) > 0 && gIMPGearMaximum[i] > 1 )
|
||||
{
|
||||
// '+' button
|
||||
gIMPGearAddButton[i] = QuickCreateButton( gIMPGearAddButtonImage[0], pIMPGEARDropDown[i]->GetX( ) - 6, pIMPGEARDropDown[i]->GetY(), BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1, BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)GearAddButtonCallback );
|
||||
ButtonList[gIMPGearAddButton[i]]->UserData[0] = i;
|
||||
gIMPGearButtonCreated[i] = TRUE;
|
||||
|
||||
// '-' button
|
||||
gIMPGearAddButton[IMPGEAR_DROPDOWN_MAX + i] = QuickCreateButton( gIMPGearAddButtonImage[1], pIMPGEARDropDown[i]->GetX( ) - 6, pIMPGEARDropDown[i]->GetY( ) + IMP_GEAR_ITEMDISPLAY_HEIGHT - 6, BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1, BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)GearAddButtonCallback );
|
||||
ButtonList[gIMPGearAddButton[IMPGEAR_DROPDOWN_MAX + i]]->UserData[0] = IMPGEAR_DROPDOWN_MAX + i;
|
||||
gIMPGearButtonCreated[IMPGEAR_DROPDOWN_MAX + i] = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ExitIMPGear( void )
|
||||
{
|
||||
// before we leave, we store all the gear that was selected (the dropdowns will be destroyed, so we cannot get the values from them later on)
|
||||
StoreSelectedIMPGear();
|
||||
|
||||
for ( int i = 0; i < 2 * IMPGEAR_DROPDOWN_MAX; ++i )
|
||||
{
|
||||
if ( gIMPGearButtonCreated[i] )
|
||||
{
|
||||
RemoveButton( gIMPGearAddButton[i] );
|
||||
gIMPGearButtonCreated[i] = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
UnloadButtonImage( gIMPGearAddButtonImage[0] );
|
||||
UnloadButtonImage( gIMPGearAddButtonImage[1] );
|
||||
|
||||
for ( int i = 0; i < IMPGEAR_DROPDOWN_MAX; ++i )
|
||||
{
|
||||
if ( pIMPGEARDropDown[i] )
|
||||
{
|
||||
pIMPGEARDropDown[i]->Destroy( );
|
||||
pIMPGEARDropDown[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
gIMPGearGun1 = -1;
|
||||
gIMPGearGun2 = -1;
|
||||
|
||||
RemoveButton( giIMPGearFinishButton );
|
||||
UnloadButtonImage( giIMPGearFinishButtonImage );
|
||||
}
|
||||
|
||||
|
||||
void HandleIMPGear( void )
|
||||
{
|
||||
if ( gfIMPGear_Redraw )
|
||||
{
|
||||
RenderIMPGear( );
|
||||
gfIMPGear_Redraw = FALSE;
|
||||
}
|
||||
|
||||
InvalidateRegion( LAPTOP_SCREEN_UL_X, LAPTOP_SCREEN_WEB_UL_Y, LAPTOP_SCREEN_LR_X, LAPTOP_SCREEN_WEB_LR_Y );
|
||||
}
|
||||
|
||||
void IMPGearDisplay( )
|
||||
{
|
||||
//Display the title
|
||||
DrawTextToScreen( szIMPGearWebSiteText[5], IMP_GEAR__TITLE_X, LAPTOP_TITLE_Y, LAPTOP_TEXT_WIDTH, FONT14ARIAL, IMP_GEAR__COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||
|
||||
// depending on guns selected, we need to alter the ammochoices
|
||||
{
|
||||
if ( pIMPGEARDropDown[IMPGEAR_DROPDOWN_GUN_1]->HasEntries() )
|
||||
{
|
||||
if ( !pIMPGEARDropDown[IMPGEAR_DROPDOWN_AMMO_1]->HasEntries( ) || gIMPGearGun1 != pIMPGEARDropDown[IMPGEAR_DROPDOWN_GUN_1]->GetSelectedEntryKey( ) )
|
||||
{
|
||||
gIMPGearGun1 = pIMPGEARDropDown[IMPGEAR_DROPDOWN_GUN_1]->GetSelectedEntryKey( );
|
||||
|
||||
std::vector<std::pair<INT16, STR16> > entries;
|
||||
entries.push_back( std::make_pair( 0, szIMPGearDropDownNoneText[IMPGEAR_DROPDOWN_AMMO_1] ) );
|
||||
|
||||
if ( Item[gIMPGearGun1].usItemClass & IC_GUN )
|
||||
{
|
||||
WEAPONTYPE* pWeapon = &(Weapon[gIMPGearGun1]);
|
||||
UINT16 usLoop = 0;
|
||||
while ( Magazine[usLoop].ubCalibre != NOAMMO )
|
||||
{
|
||||
if ( Magazine[usLoop].ubCalibre == pWeapon->ubCalibre && Magazine[usLoop].ubMagSize == pWeapon->ubMagSize )//&& AmmoTypes[Magazine[usLoop].ubAmmoType].standardIssue )
|
||||
{
|
||||
UINT16 mag = MagazineClassIndexToItemType( usLoop );
|
||||
|
||||
entries.push_back( std::make_pair( mag, Item[mag].szItemName ) );
|
||||
}
|
||||
|
||||
++usLoop;
|
||||
}
|
||||
}
|
||||
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_AMMO_1]->SetEntries( entries );
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_AMMO_1]->SetNthEntry( 1 );
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_AMMO_1]->Create( pIMPGEARDropDown[IMPGEAR_DROPDOWN_AMMO_1]->GetX(), pIMPGEARDropDown[IMPGEAR_DROPDOWN_AMMO_1]->GetY() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
if ( pIMPGEARDropDown[IMPGEAR_DROPDOWN_GUN_2]->HasEntries() )
|
||||
{
|
||||
if ( !pIMPGEARDropDown[IMPGEAR_DROPDOWN_AMMO_2]->HasEntries( ) || gIMPGearGun2 != pIMPGEARDropDown[IMPGEAR_DROPDOWN_GUN_2]->GetSelectedEntryKey( ) )
|
||||
{
|
||||
gIMPGearGun2 = pIMPGEARDropDown[IMPGEAR_DROPDOWN_GUN_2]->GetSelectedEntryKey();
|
||||
|
||||
std::vector<std::pair<INT16, STR16> > entries;
|
||||
entries.push_back( std::make_pair( 0, szIMPGearDropDownNoneText[IMPGEAR_DROPDOWN_AMMO_2] ) );
|
||||
|
||||
if ( Item[gIMPGearGun2].usItemClass & IC_GUN )
|
||||
{
|
||||
WEAPONTYPE* pWeapon = &(Weapon[gIMPGearGun2]);
|
||||
UINT16 usLoop = 0;
|
||||
while ( Magazine[usLoop].ubCalibre != NOAMMO )
|
||||
{
|
||||
if ( Magazine[usLoop].ubCalibre == pWeapon->ubCalibre && Magazine[usLoop].ubMagSize == pWeapon->ubMagSize )//&& AmmoTypes[Magazine[usLoop].ubAmmoType].standardIssue )
|
||||
{
|
||||
UINT16 mag = MagazineClassIndexToItemType( usLoop );
|
||||
|
||||
entries.push_back( std::make_pair( mag, Item[mag].szItemName ) );
|
||||
}
|
||||
|
||||
++usLoop;
|
||||
}
|
||||
}
|
||||
else if ( Item[gIMPGearGun2].usItemClass & IC_LAUNCHER )
|
||||
{
|
||||
std::set<UINT16>::iterator itend = gIMPGearPossibleItems.end( );
|
||||
for ( std::set<UINT16>::iterator it = gIMPGearPossibleItems.begin( ); it != itend; ++it )
|
||||
{
|
||||
UINT16 usItem = (*it);
|
||||
|
||||
if ( ValidLaunchable( usItem, gIMPGearGun2 ) )
|
||||
entries.push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
}
|
||||
}
|
||||
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_AMMO_2]->SetEntries( entries );
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_AMMO_2]->SetNthEntry( 1 );
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_AMMO_2]->Create( pIMPGEARDropDown[IMPGEAR_DROPDOWN_AMMO_2]->GetX( ), pIMPGEARDropDown[IMPGEAR_DROPDOWN_AMMO_2]->GetY( ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gIMPGearCost = 0;
|
||||
for ( int i = 0; i < IMPGEAR_DROPDOWN_MAX; ++i )
|
||||
{
|
||||
if ( pIMPGEARDropDown[i] && pIMPGEARDropDown[i]->IsDisplayed( ) && pIMPGEARDropDown[i]->HasEntries( ) )
|
||||
{
|
||||
// if something is shown, it has to appear at least once...
|
||||
gIMPGearCount[i] = max( 1, gIMPGearCount[i] );
|
||||
|
||||
INT16 sItem = (UINT16)pIMPGEARDropDown[i]->GetSelectedEntryKey( );
|
||||
|
||||
DisplayGear( (UINT16)sItem, pIMPGEARDropDown[i]->GetX( ) - IMP_GEAR_ITEMDISPLAY_WIDTH, pIMPGEARDropDown[i]->GetY( ) );
|
||||
|
||||
if ( sItem > 0 )
|
||||
{
|
||||
if ( sItem )
|
||||
gIMPGearCost += gIMPGearCount[i] * Item[sItem].usPrice;
|
||||
|
||||
// if more than 1?
|
||||
if ( gIMPGearCount[i] > 1 )
|
||||
{
|
||||
CHAR16 sString[128];
|
||||
swprintf( sString, L"%d", gIMPGearCount[i] );
|
||||
INT16 sX, sY;
|
||||
FindFontRightCoordinates( (INT16)(pIMPGEARDropDown[i]->GetX( ) - IMP_GEAR_ITEMDISPLAY_WIDTH), (INT16)(pIMPGEARDropDown[i]->GetY( ) + 6), (INT16)(10), (INT16)(GetFontHeight( FONT10ARIAL )), sString, FONT10ARIAL, &sX, &sY );
|
||||
mprintf( sX, sY, sString );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gIMPGearCount[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
CHAR16 wTemp[50];
|
||||
swprintf( wTemp, szIMPGearWebSiteText[6], GetIMPGearCost( ) );
|
||||
DrawTextToScreen( wTemp, LAPTOP_SCREEN_UL_X + 180, LAPTOP_SCREEN_WEB_UL_Y + 360, LAPTOP_TEXT_WIDTH, FONT14ARIAL, IMP_GEAR__COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
}
|
||||
|
||||
void DisplayGear( UINT16 usItem, UINT16 usPosX, UINT16 usPosY )
|
||||
{
|
||||
if ( usItem )
|
||||
{
|
||||
// draw background 'box' for an item
|
||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, usPosX, usPosY, usPosX + IMP_GEAR_ITEMDISPLAY_WIDTH, usPosY + IMP_GEAR_ITEMDISPLAY_HEIGHT, Get16BPPColor( FROMRGB( 200, 169, 87 ) ) );
|
||||
|
||||
HVOBJECT hVObject;
|
||||
ETRLEObject *pTrav;
|
||||
|
||||
INVTYPE* pItem = &Item[usItem];
|
||||
|
||||
UINT16 usGraphicNum = g_bUsePngItemImages ? 0 : pItem->ubGraphicNum;
|
||||
|
||||
GetVideoObject( &hVObject, GetInterfaceGraphicForItem( pItem ) );
|
||||
|
||||
if ( usGraphicNum < hVObject->usNumberOfObjects )
|
||||
{
|
||||
pTrav = &(hVObject->pETRLEObject[usGraphicNum]);
|
||||
}
|
||||
else
|
||||
{
|
||||
SGP_THROW( _BS( L"Number of images in VObject [" ) << hVObject->usNumberOfObjects
|
||||
<< L"] is smaller than the requested index [" << (int)pItem->ubGraphicNum << L"]" << _BS::wget );
|
||||
}
|
||||
|
||||
INT16 PosX = usPosX + (IMP_GEAR_ITEMDISPLAY_WIDTH - pTrav->usWidth) / 2 - pTrav->sOffsetX;
|
||||
INT16 PosY = usPosY + (IMP_GEAR_ITEMDISPLAY_HEIGHT - pTrav->usHeight) / 2 - pTrav->sOffsetY;
|
||||
|
||||
//blt the shadow of the item
|
||||
if ( gGameSettings.fOptions[TOPTION_SHOW_ITEM_SHADOW] )
|
||||
BltVideoObjectOutlineShadowFromIndex( FRAME_BUFFER, GetInterfaceGraphicForItem( pItem ), usGraphicNum, PosX, PosY );
|
||||
|
||||
//blt the item
|
||||
BltVideoObjectOutlineFromIndex( FRAME_BUFFER, GetInterfaceGraphicForItem( pItem ), usGraphicNum, PosX, PosY, 0, FALSE );
|
||||
}
|
||||
else
|
||||
{
|
||||
// if there is not item to display, sue a different colour for the box
|
||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, usPosX, usPosY, usPosX + IMP_GEAR_ITEMDISPLAY_WIDTH, usPosY + IMP_GEAR_ITEMDISPLAY_HEIGHT, Get16BPPColor( FROMRGB( 230, 84, 43 ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
void BtnIMPGearFinishCallback( GUI_BUTTON *btn, INT32 reason )
|
||||
{
|
||||
// btn callback for IMP personality quiz answer button
|
||||
if ( !(btn->uiFlags & BUTTON_ENABLED) )
|
||||
return;
|
||||
|
||||
if ( reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||
{
|
||||
btn->uiFlags |= (BUTTON_CLICKED_ON);
|
||||
|
||||
iCurrentImpPage = IMP_FINISH;
|
||||
iCurrentProfileMode = IMP__FINISH;
|
||||
}
|
||||
}
|
||||
|
||||
INT32 GetIMPGearCost( )
|
||||
{
|
||||
if ( IsIMPGearUsed( ) )
|
||||
return max( 0, gIMPGearCost - 3000 );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void AddItemCategoryToPossibleGear(UINT8 aCategory)
|
||||
{
|
||||
for ( int j = 0; j < 50; ++j )
|
||||
{
|
||||
UINT16 usItem = gIMPItemChoices[aCategory].bItemNo[j];
|
||||
if ( usItem && ItemIsLegal( usItem ) )
|
||||
{
|
||||
gIMPGearPossibleItems.insert( usItem );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CalculatePossibleItems()
|
||||
{
|
||||
gIMPGearPossibleItems.clear( );
|
||||
|
||||
for ( int i = 0; i < IMP_AUTO_WEAPONS; ++i )
|
||||
{
|
||||
AddItemCategoryToPossibleGear(i);
|
||||
}
|
||||
|
||||
//loop through all the buttons and reset them
|
||||
for ( UINT8 uiCnt = 0; uiCnt< (gGameOptions.fNewTraitSystem ? IMP_SKILL_TRAITS_NEW_MAJOR_NONE : IMP_SKILL_TRAITS__NONE); ++uiCnt )
|
||||
{
|
||||
//if the trait is selected
|
||||
if ( gfSkillTraitQuestions[uiCnt] && gfSkillTraitQuestions2[uiCnt] )
|
||||
{
|
||||
if ( gGameOptions.fNewTraitSystem )
|
||||
{
|
||||
switch ( uiCnt )
|
||||
{
|
||||
case IMP_SKILL_TRAITS_NEW_AUTO_WEAPONS: AddItemCategoryToPossibleGear( IMP_AUTO_WEAPONS_EXP ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_HEAVY_WEAPONS: AddItemCategoryToPossibleGear( IMP_HEAVY_WEAPONS_EXP ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_PROF_SNIPER: AddItemCategoryToPossibleGear( IMP_SNIPER_EXP ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_RANGER: AddItemCategoryToPossibleGear( IMP_RANGER_EXP ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_GUNSLINGER: AddItemCategoryToPossibleGear( IMP_GUNSLINGER_EXP ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_MARTIAL_ARTS: AddItemCategoryToPossibleGear( IMP_MARTIAL_ARTS_EXP ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_SQUADLEADER: AddItemCategoryToPossibleGear( IMP_SQUADLEADER_EXP ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_TECHNICIAN: AddItemCategoryToPossibleGear( IMP_TECHNICIAN_EXP ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_DOCTOR: AddItemCategoryToPossibleGear( IMP_DOCTOR_EXP ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_COVERT: AddItemCategoryToPossibleGear( IMP_COVERT_EXP ); break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch ( uiCnt )
|
||||
{
|
||||
case IMP_SKILL_TRAITS__LOCKPICK: AddItemCategoryToPossibleGear( IMP_LOCKPICKING_EXP ); break;
|
||||
case IMP_SKILL_TRAITS__HAND_2_HAND: AddItemCategoryToPossibleGear( IMP_MARTIAL_ARTS_EXP ); break;
|
||||
case IMP_SKILL_TRAITS__ELECTRONICS: AddItemCategoryToPossibleGear( IMP_ELECTRONICS ); break;
|
||||
case IMP_SKILL_TRAITS__NIGHT_OPS: AddItemCategoryToPossibleGear( IMP_NIGHT_OPS_EXP ); break;
|
||||
case IMP_SKILL_TRAITS__THROWING: AddItemCategoryToPossibleGear( IMP_THROWING_EXP ); break;
|
||||
case IMP_SKILL_TRAITS__TEACHING: AddItemCategoryToPossibleGear( IMP_TEACHING_EXP ); break;
|
||||
case IMP_SKILL_TRAITS__HEAVY_WEAPONS: AddItemCategoryToPossibleGear( IMP_HEAVY_WEAPONS_EXP ); break;
|
||||
case IMP_SKILL_TRAITS__AUTO_WEAPONS: AddItemCategoryToPossibleGear( IMP_AUTO_WEAPONS_EXP ); break;
|
||||
case IMP_SKILL_TRAITS__STEALTHY: AddItemCategoryToPossibleGear( IMP_STEALTHY_EXP ); break;
|
||||
case IMP_SKILL_TRAITS__AMBIDEXTROUS: AddItemCategoryToPossibleGear( IMP_AMBIDEXTROUS ); break;
|
||||
case IMP_SKILL_TRAITS__KNIFING: AddItemCategoryToPossibleGear( IMP_MELEE_EXP );
|
||||
case IMP_SKILL_TRAITS__PROF_SNIPER: AddItemCategoryToPossibleGear( IMP_SNIPER_EXP ); break;
|
||||
case IMP_SKILL_TRAITS__CAMO: AddItemCategoryToPossibleGear( IMP_CAMOUFLAGED ); break;
|
||||
case IMP_SKILL_TRAITS__MARTIAL_ARTS: AddItemCategoryToPossibleGear( IMP_MARTIAL_ARTS_EXP ); break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( gfSkillTraitQuestions[uiCnt] || gfSkillTraitQuestions2[uiCnt] )
|
||||
{
|
||||
if ( gGameOptions.fNewTraitSystem )
|
||||
{
|
||||
switch ( uiCnt )
|
||||
{
|
||||
case IMP_SKILL_TRAITS_NEW_AUTO_WEAPONS: AddItemCategoryToPossibleGear( IMP_AUTO_WEAPONS ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_HEAVY_WEAPONS: AddItemCategoryToPossibleGear( IMP_HEAVY_WEAPONS ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_PROF_SNIPER: AddItemCategoryToPossibleGear( IMP_SNIPER ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_RANGER: AddItemCategoryToPossibleGear( IMP_RANGER ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_GUNSLINGER: AddItemCategoryToPossibleGear( IMP_GUNSLINGER ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_MARTIAL_ARTS: AddItemCategoryToPossibleGear( IMP_MARTIAL_ARTS ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_SQUADLEADER: AddItemCategoryToPossibleGear( IMP_SQUADLEADER ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_TECHNICIAN: AddItemCategoryToPossibleGear( IMP_TECHNICIAN ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_DOCTOR: AddItemCategoryToPossibleGear( IMP_DOCTOR ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_COVERT: AddItemCategoryToPossibleGear( IMP_COVERT ); break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch ( uiCnt )
|
||||
{
|
||||
case IMP_SKILL_TRAITS__LOCKPICK: AddItemCategoryToPossibleGear( IMP_LOCKPICKING ); break;
|
||||
case IMP_SKILL_TRAITS__HAND_2_HAND: AddItemCategoryToPossibleGear( IMP_MARTIAL_ARTS_EXP ); break;
|
||||
case IMP_SKILL_TRAITS__ELECTRONICS: AddItemCategoryToPossibleGear( IMP_ELECTRONICS ); break;
|
||||
case IMP_SKILL_TRAITS__NIGHT_OPS: AddItemCategoryToPossibleGear( IMP_NIGHT_OPS ); break;
|
||||
case IMP_SKILL_TRAITS__THROWING: AddItemCategoryToPossibleGear( IMP_THROWING ); break;
|
||||
case IMP_SKILL_TRAITS__TEACHING: AddItemCategoryToPossibleGear( IMP_TEACHING ); break;
|
||||
case IMP_SKILL_TRAITS__HEAVY_WEAPONS: AddItemCategoryToPossibleGear( IMP_HEAVY_WEAPONS ); break;
|
||||
case IMP_SKILL_TRAITS__AUTO_WEAPONS: AddItemCategoryToPossibleGear( IMP_AUTO_WEAPONS ); break;
|
||||
case IMP_SKILL_TRAITS__STEALTHY: AddItemCategoryToPossibleGear( IMP_STEALTHY ); break;
|
||||
case IMP_SKILL_TRAITS__AMBIDEXTROUS: AddItemCategoryToPossibleGear( IMP_AMBIDEXTROUS ); break;
|
||||
case IMP_SKILL_TRAITS__KNIFING: AddItemCategoryToPossibleGear( IMP_MELEE );
|
||||
case IMP_SKILL_TRAITS__PROF_SNIPER: AddItemCategoryToPossibleGear( IMP_SNIPER ); break;
|
||||
case IMP_SKILL_TRAITS__CAMO: AddItemCategoryToPossibleGear( IMP_CAMOUFLAGED ); break;
|
||||
case IMP_SKILL_TRAITS__MARTIAL_ARTS: AddItemCategoryToPossibleGear( IMP_MARTIAL_ARTS ); break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( gGameOptions.fNewTraitSystem )
|
||||
{
|
||||
for ( UINT8 uiCnt = 0; uiCnt < IMP_SKILL_TRAITS_NEW_MINOR_NONE; ++uiCnt )
|
||||
{
|
||||
//if the trait is selected
|
||||
if ( gfMinorTraitQuestions[uiCnt] )
|
||||
{
|
||||
//switch on the trait, and add it to the list
|
||||
switch ( uiCnt )
|
||||
{
|
||||
case IMP_SKILL_TRAITS_NEW_AMBIDEXTROUS: AddItemCategoryToPossibleGear( IMP_AMBIDEXTROUS ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_MELEE: AddItemCategoryToPossibleGear( IMP_MELEE ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_THROWING: AddItemCategoryToPossibleGear( IMP_THROWING ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_NIGHT_OPS: AddItemCategoryToPossibleGear( IMP_NIGHT_OPS ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_STEALTHY: AddItemCategoryToPossibleGear( IMP_STEALTHY ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_ATHLETICS: AddItemCategoryToPossibleGear( IMP_ATHLETICS ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_BODYBUILDING: AddItemCategoryToPossibleGear( IMP_BODYBUILDING ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_DEMOLITIONS: AddItemCategoryToPossibleGear( IMP_DEMOLITIONS ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_TEACHING: AddItemCategoryToPossibleGear( IMP_TEACHING ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_SCOUTING: AddItemCategoryToPossibleGear( IMP_SCOUTING ); break;
|
||||
case IMP_SKILL_TRAITS_NEW_RADIO_OPERATOR: AddItemCategoryToPossibleGear( IMP_RADIO_OPERATOR ); break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// store the selected gear
|
||||
void StoreSelectedIMPGear()
|
||||
{
|
||||
gIMPGearSelectedItems.clear();
|
||||
|
||||
for ( int i = 0; i < IMPGEAR_DROPDOWN_MAX; ++i )
|
||||
{
|
||||
if ( pIMPGEARDropDown[i] && pIMPGEARDropDown[i]->IsDisplayed( ) && pIMPGEARDropDown[i]->HasEntries( ) )
|
||||
{
|
||||
UINT16 usItem = (UINT16)pIMPGEARDropDown[i]->GetSelectedEntryKey( );
|
||||
|
||||
if ( usItem )
|
||||
{
|
||||
// add item (make sure it is at least 1)
|
||||
gIMPGearSelectedItems[usItem] = max(1, gIMPGearCount[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DistributePossibleItemsOnDropDowns()
|
||||
{
|
||||
// these vectors contain the items to be shown in the dropdowns
|
||||
std::map< UINT16, std::vector<std::pair<INT16, STR16> > > entryvec;
|
||||
|
||||
// it is always possible to not select something
|
||||
for ( int i = 0; i < IMPGEAR_DROPDOWN_MAX; ++i )
|
||||
{
|
||||
entryvec[i].push_back( std::make_pair( 0, szIMPGearDropDownNoneText[i] ) );
|
||||
}
|
||||
|
||||
std::set<UINT16>::iterator itend = gIMPGearPossibleItems.end( );
|
||||
for ( std::set<UINT16>::iterator it = gIMPGearPossibleItems.begin(); it != itend; ++it )
|
||||
{
|
||||
UINT16 usItem = (*it);
|
||||
|
||||
if ( Item[usItem].usItemClass & IC_GUN )
|
||||
{
|
||||
entryvec[IMPGEAR_DROPDOWN_GUN_1].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
|
||||
if ( !Item[usItem].twohanded )
|
||||
entryvec[IMPGEAR_DROPDOWN_GUN_2].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
}
|
||||
else if ( Item[usItem].usItemClass & IC_LAUNCHER )
|
||||
{
|
||||
entryvec[IMPGEAR_DROPDOWN_GUN_2].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
}
|
||||
else if ( Item[usItem].usItemClass & (IC_BLADE | IC_THROWING_KNIFE | IC_PUNCH) )
|
||||
{
|
||||
entryvec[IMPGEAR_DROPDOWN_MELEE].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
}
|
||||
else if ( Item[usItem].usItemClass & IC_ARMOUR )
|
||||
{
|
||||
if ( Armour[Item[usItem].ubClassIndex].ubArmourClass == ARMOURCLASS_HELMET )
|
||||
entryvec[IMPGEAR_DROPDOWN_HELMET].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
else if ( Armour[Item[usItem].ubClassIndex].ubArmourClass == ARMOURCLASS_VEST )
|
||||
entryvec[IMPGEAR_DROPDOWN_VEST].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
else if ( Armour[Item[usItem].ubClassIndex].ubArmourClass == ARMOURCLASS_LEGGINGS )
|
||||
entryvec[IMPGEAR_DROPDOWN_LEGS].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
}
|
||||
else if ( Item[usItem].usItemClass & IC_LBEGEAR )
|
||||
{
|
||||
switch ( LoadBearingEquipment[Item[usItem].ubClassIndex].lbeClass )
|
||||
{
|
||||
case THIGH_PACK:
|
||||
entryvec[IMPGEAR_DROPDOWN_LBE4].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
entryvec[IMPGEAR_DROPDOWN_LBE5].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
break;
|
||||
case VEST_PACK:
|
||||
entryvec[IMPGEAR_DROPDOWN_LBE1].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
break;
|
||||
case COMBAT_PACK:
|
||||
entryvec[IMPGEAR_DROPDOWN_LBE2].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
break;
|
||||
case BACKPACK:
|
||||
entryvec[IMPGEAR_DROPDOWN_LBE3].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
break;
|
||||
default:
|
||||
entryvec[IMPGEAR_DROPDOWN_LBE4].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
entryvec[IMPGEAR_DROPDOWN_LBE5].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if ( Item[usItem].usItemClass & IC_FACE )
|
||||
{
|
||||
entryvec[IMPGEAR_DROPDOWN_FACE1].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
entryvec[IMPGEAR_DROPDOWN_FACE2].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
}
|
||||
else if ( Item[usItem].usItemClass & ( IC_GRENADE | IC_BOMB ) )
|
||||
{
|
||||
// ignore item if it is a launchable - we already list it under ammo if a launcher is selected
|
||||
BOOLEAN found = FALSE;
|
||||
UINT16 iLoop = 0;
|
||||
while ( Launchable[iLoop][0] != 0 )
|
||||
{
|
||||
if ( Launchable[iLoop][0] == usItem )
|
||||
{
|
||||
found = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
++iLoop;
|
||||
}
|
||||
|
||||
if ( !found )
|
||||
{
|
||||
entryvec[IMPGEAR_DROPDOWN_MISC_1].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
entryvec[IMPGEAR_DROPDOWN_MISC_2].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
entryvec[IMPGEAR_DROPDOWN_MISC_3].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
entryvec[IMPGEAR_DROPDOWN_MISC_4].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
entryvec[IMPGEAR_DROPDOWN_MISC_5].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
entryvec[IMPGEAR_DROPDOWN_MISC_6].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
entryvec[IMPGEAR_DROPDOWN_MISC_7].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
entryvec[IMPGEAR_DROPDOWN_MISC_1].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
entryvec[IMPGEAR_DROPDOWN_MISC_2].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
entryvec[IMPGEAR_DROPDOWN_MISC_3].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
entryvec[IMPGEAR_DROPDOWN_MISC_4].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
entryvec[IMPGEAR_DROPDOWN_MISC_5].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
entryvec[IMPGEAR_DROPDOWN_MISC_6].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
entryvec[IMPGEAR_DROPDOWN_MISC_7].push_back( std::make_pair( usItem, Item[usItem].szItemName ) );
|
||||
}
|
||||
}
|
||||
|
||||
// check for oddities...
|
||||
SGP_THROW_IFFALSE( pIMPGEARDropDown[0] != NULL, L"Bad pointer in DistributePossibleItemsOnDropDowns. How did you do that?" );
|
||||
|
||||
for ( int i = 0; i < IMPGEAR_DROPDOWN_MAX; ++i )
|
||||
{
|
||||
pIMPGEARDropDown[i]->SetEntries( entryvec[i] );
|
||||
}
|
||||
|
||||
// per default, each dropdown selects 'no item'. Here we set some defaults
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_GUN_1]->SetNthEntry( 1 );
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_AMMO_1]->SetNthEntry( 1 );
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_MELEE]->SetNthEntry( 1 );
|
||||
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_LBE1]->SetNthEntry( 1 );
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_LBE2]->SetNthEntry( 1 );
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_LBE3]->SetNthEntry( 1 );
|
||||
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_HELMET]->SetNthEntry( 1 );
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_VEST]->SetNthEntry( 1 );
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_LEGS]->SetNthEntry( 1 );
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_FACE1]->SetNthEntry( 1 );
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_FACE2]->SetNthEntry( 2 );
|
||||
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_MISC_1]->SetNthEntry( 4 );
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_MISC_2]->SetNthEntry( 3 );
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_MISC_3]->SetNthEntry( 2 );
|
||||
pIMPGEARDropDown[IMPGEAR_DROPDOWN_MISC_4]->SetNthEntry( 1 );
|
||||
}
|
||||
|
||||
void GiveIMPSelectedGear( MERCPROFILESTRUCT *pProfile )
|
||||
{
|
||||
std::map<UINT16, UINT8>::iterator itend = gIMPGearSelectedItems.end( );
|
||||
for ( std::map<UINT16, UINT8>::iterator it = gIMPGearSelectedItems.begin( ); it != itend; ++it )
|
||||
{
|
||||
MakeProfileInvItemAnySlot( pProfile, (*it).first, 100, (*it).second );
|
||||
}
|
||||
}
|
||||
|
||||
void GearAddButtonCallback( GUI_BUTTON *btn, INT32 reason )
|
||||
{
|
||||
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);
|
||||
|
||||
INT32 id = btn->UserData[0];
|
||||
|
||||
if ( id >= 0 )
|
||||
{
|
||||
if ( id < IMPGEAR_DROPDOWN_MAX )
|
||||
{
|
||||
// increase
|
||||
gIMPGearCount[id] = min( gIMPGearCount[id] + 1, gIMPGearMaximum[id] );
|
||||
}
|
||||
else if ( id < 2 * IMPGEAR_DROPDOWN_MAX )
|
||||
{
|
||||
// decrease
|
||||
gIMPGearCount[id - IMPGEAR_DROPDOWN_MAX] = max( gIMPGearCount[id - IMPGEAR_DROPDOWN_MAX] - 1, 1 );
|
||||
}
|
||||
}
|
||||
|
||||
RenderIMPGear( );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef __IMP_GEAR__H_
|
||||
#define __IMP_GEAR__H_
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @author Flugente (bears-pit.com)
|
||||
*/
|
||||
|
||||
#include "Types.h"
|
||||
#include "soldier profile type.h"
|
||||
|
||||
void EnterIMPGear( void );
|
||||
void RenderIMPGear( void );
|
||||
void ExitIMPGear( void );
|
||||
void HandleIMPGear( void );
|
||||
|
||||
void GiveIMPSelectedGear( MERCPROFILESTRUCT *pProfile );
|
||||
INT32 GetIMPGearCost();
|
||||
|
||||
#endif
|
||||
@@ -545,7 +545,15 @@
|
||||
<File
|
||||
RelativePath=".\IMP Finish.h"
|
||||
>
|
||||
</File>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\IMP Gear Entrance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\IMP Gear.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\IMP HomePage.h"
|
||||
>
|
||||
@@ -880,6 +888,14 @@
|
||||
RelativePath=".\IMP Finish.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\IMP Gear Entrance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\IMP Gear.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\IMP HomePage.cpp"
|
||||
>
|
||||
|
||||
@@ -546,6 +546,14 @@
|
||||
RelativePath="IMP Finish.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="IMP Gear Entrance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="IMP Gear.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="IMP HomePage.h"
|
||||
>
|
||||
@@ -882,6 +890,14 @@
|
||||
RelativePath="IMP Finish.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="IMP Gear Entrance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="IMP Gear.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="IMP HomePage.cpp"
|
||||
>
|
||||
|
||||
@@ -75,6 +75,8 @@
|
||||
<ClInclude Include="IMP Confirm.h" />
|
||||
<ClInclude Include="IMP Disability Trait.h" />
|
||||
<ClInclude Include="IMP Finish.h" />
|
||||
<ClInclude Include="IMP Gear Entrance.h" />
|
||||
<ClInclude Include="IMP Gear.h" />
|
||||
<ClInclude Include="IMP HomePage.h" />
|
||||
<ClInclude Include="IMP MainPage.h" />
|
||||
<ClInclude Include="IMP Minor Trait.h" />
|
||||
@@ -160,6 +162,8 @@
|
||||
<ClCompile Include="IMP Confirm.cpp" />
|
||||
<ClCompile Include="IMP Disability Trait.cpp" />
|
||||
<ClCompile Include="IMP Finish.cpp" />
|
||||
<ClCompile Include="IMP Gear Entrance.cpp" />
|
||||
<ClCompile Include="IMP Gear.cpp" />
|
||||
<ClCompile Include="IMP HomePage.cpp" />
|
||||
<ClCompile Include="IMP MainPage.cpp" />
|
||||
<ClCompile Include="IMP Minor Trait.cpp" />
|
||||
|
||||
@@ -128,6 +128,12 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="IMP Finish.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="IMP Gear Entrance.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="IMP Gear.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="IMP HomePage.h">
|
||||
<Filter>Header Files</Filter>
|
||||
@@ -382,6 +388,12 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="IMP Finish.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="IMP Gear Entrance.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="IMP Gear.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="IMP HomePage.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
|
||||
@@ -75,6 +75,8 @@
|
||||
<ClInclude Include="IMP Confirm.h" />
|
||||
<ClInclude Include="IMP Disability Trait.h" />
|
||||
<ClInclude Include="IMP Finish.h" />
|
||||
<ClInclude Include="IMP Gear Entrance.h" />
|
||||
<ClInclude Include="IMP Gear.h" />
|
||||
<ClInclude Include="IMP HomePage.h" />
|
||||
<ClInclude Include="IMP MainPage.h" />
|
||||
<ClInclude Include="IMP Minor Trait.h" />
|
||||
@@ -160,6 +162,8 @@
|
||||
<ClCompile Include="IMP Confirm.cpp" />
|
||||
<ClCompile Include="IMP Disability Trait.cpp" />
|
||||
<ClCompile Include="IMP Finish.cpp" />
|
||||
<ClCompile Include="IMP Gear Entrance.cpp" />
|
||||
<ClCompile Include="IMP Gear.cpp" />
|
||||
<ClCompile Include="IMP HomePage.cpp" />
|
||||
<ClCompile Include="IMP MainPage.cpp" />
|
||||
<ClCompile Include="IMP Minor Trait.cpp" />
|
||||
|
||||
@@ -261,6 +261,12 @@
|
||||
<ClInclude Include="PMC.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="IMP Gear.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="IMP Gear Entrance.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="aim.cpp">
|
||||
@@ -536,5 +542,11 @@
|
||||
<ClCompile Include="PMC.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="IMP Gear.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="IMP Gear Entrance.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -2926,45 +2926,50 @@ INT8 ProfileHasSkillTrait( INT32 ubProfileID, INT8 bSkillTrait )
|
||||
// bMaxMajorTraits++;
|
||||
//}
|
||||
|
||||
for ( INT8 bCnt = 0; bCnt < bMaxTraits; bCnt++ )
|
||||
if ( TwoStagedTrait( bSkillTrait ) )
|
||||
{
|
||||
if ( TwoStagedTrait(bSkillTrait) )
|
||||
for ( INT8 bCnt = 0; bCnt < bMaxTraits; ++bCnt )
|
||||
{
|
||||
if ( gMercProfiles[ubProfileID].bSkillTraits[ bCnt ] == bSkillTrait )
|
||||
if ( gMercProfiles[ubProfileID].bSkillTraits[bCnt] == bSkillTrait )
|
||||
{
|
||||
bNumTraits++;
|
||||
bNumMajorTraitsCounted++;
|
||||
++bNumTraits;
|
||||
++bNumMajorTraitsCounted;
|
||||
}
|
||||
else if ( TwoStagedTrait(gMercProfiles[ubProfileID].bSkillTraits[ bCnt ]) )
|
||||
else if ( TwoStagedTrait( gMercProfiles[ubProfileID].bSkillTraits[bCnt] ) )
|
||||
{
|
||||
bNumMajorTraitsCounted++;
|
||||
++bNumMajorTraitsCounted;
|
||||
}
|
||||
|
||||
// if we exceeded the allowed number of major traits, ignore the rest of them
|
||||
if ( bNumMajorTraitsCounted >= bMaxMajorTraits )
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
// cannot have more than 2 grades of a major traits
|
||||
return (min( 2, bNumTraits ));
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( INT8 bCnt = 0; bCnt < bMaxTraits; ++bCnt )
|
||||
{
|
||||
if ( gMercProfiles[ubProfileID].bSkillTraits[ bCnt ] == bSkillTrait )
|
||||
if ( gMercProfiles[ubProfileID].bSkillTraits[bCnt] == bSkillTrait )
|
||||
{
|
||||
bNumTraits++;
|
||||
++bNumTraits;
|
||||
}
|
||||
}
|
||||
|
||||
// cannot have more than 1 grade of minor traits
|
||||
return (min( 1, bNumTraits ));
|
||||
}
|
||||
// cannot have more than 1 rade of minor traits or 2 grades of a major traits
|
||||
if( bSkillTrait > DOCTOR_NT && bSkillTrait != COVERT_NT )
|
||||
return ( min(1, bNumTraits) );
|
||||
else
|
||||
return ( min(2, bNumTraits) );
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gMercProfiles[ubProfileID].bSkillTraits[ 0 ] == bSkillTrait)
|
||||
bNumTraits++;
|
||||
++bNumTraits;
|
||||
if (gMercProfiles[ubProfileID].bSkillTraits[ 1 ] == bSkillTrait)
|
||||
bNumTraits++;
|
||||
++bNumTraits;
|
||||
|
||||
// Electronics, Ambidextrous and Camouflaged can only be of one grade
|
||||
if( bSkillTrait == ELECTRONICS_OT ||
|
||||
|
||||
@@ -2904,6 +2904,10 @@ enum
|
||||
|
||||
extern STR16 szDiseaseText[];
|
||||
|
||||
extern STR16 szIMPGearWebSiteText[];
|
||||
extern STR16 szIMPGearDropDownText[];
|
||||
extern STR16 szIMPGearDropDownNoneText[];
|
||||
|
||||
#define TACTICAL_INVENTORY_DIALOG_NUM 16
|
||||
#define TACTICAL_COVER_DIALOG_NUM 16
|
||||
|
||||
|
||||
@@ -9739,6 +9739,78 @@ STR16 szDiseaseText[] =
|
||||
L"Cancel",
|
||||
};
|
||||
|
||||
STR16 szIMPGearWebSiteText[] = // TODO.Translate
|
||||
{
|
||||
// IMP Gear Entrance
|
||||
L"How should gear be selected?",
|
||||
L"Old method: Random gear according to your choices",
|
||||
L"New method: Free selection of gear",
|
||||
L"Old method",
|
||||
L"New method",
|
||||
|
||||
// IMP Gear Entrance
|
||||
L"I.M.P. Equipment",
|
||||
L"Equipment cost: %d$",
|
||||
};
|
||||
|
||||
STR16 szIMPGearDropDownText[] =
|
||||
{
|
||||
L"Select LBE vest",
|
||||
L"Select LBE combat pack",
|
||||
L"Select LBE backpack",
|
||||
L"Select LBE holster",
|
||||
L"Select LBE holster",
|
||||
|
||||
L"Select main gun",
|
||||
L"Select ammo",
|
||||
L"Select sidearm",
|
||||
L"Select additional ammo",
|
||||
L"Select melee weapon",
|
||||
|
||||
L"Select helmet",
|
||||
L"Select vest",
|
||||
L"Select pants",
|
||||
L"Select face gear",
|
||||
L"Select face gear",
|
||||
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
};
|
||||
|
||||
STR16 szIMPGearDropDownNoneText[] =
|
||||
{
|
||||
L"No LBE vest",
|
||||
L"No LBE combat pack",
|
||||
L"No LBE backpack",
|
||||
L"No LBE holster",
|
||||
L"No LBE holster",
|
||||
|
||||
L"No gun",
|
||||
L"No ammo",
|
||||
L"No gun",
|
||||
L"No ammo",
|
||||
L"No weapon",
|
||||
|
||||
L"No helmet",
|
||||
L"No vest",
|
||||
L"No pants",
|
||||
L"No face gear",
|
||||
L"No face gear",
|
||||
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
};
|
||||
|
||||
// WANNE: Some Chinese specific strings that needs to be in unicode!
|
||||
STR16 ChineseSpecString1 = L"%%"; //defined in _ChineseText.cpp as this file is already unicode
|
||||
STR16 ChineseSpecString2 = L"*%3d%%%%"; //defined in _ChineseText.cpp as this file is already unicode
|
||||
|
||||
@@ -9751,4 +9751,76 @@ STR16 szDiseaseText[] =
|
||||
L"Cancel",
|
||||
};
|
||||
|
||||
STR16 szIMPGearWebSiteText[] = // TODO.Translate
|
||||
{
|
||||
// IMP Gear Entrance
|
||||
L"How should gear be selected?",
|
||||
L"Old method: Random gear according to your choices",
|
||||
L"New method: Free selection of gear",
|
||||
L"Old method",
|
||||
L"New method",
|
||||
|
||||
// IMP Gear Entrance
|
||||
L"I.M.P. Equipment",
|
||||
L"Equipment cost: %d$",
|
||||
};
|
||||
|
||||
STR16 szIMPGearDropDownText[] =
|
||||
{
|
||||
L"Select LBE vest",
|
||||
L"Select LBE combat pack",
|
||||
L"Select LBE backpack",
|
||||
L"Select LBE holster",
|
||||
L"Select LBE holster",
|
||||
|
||||
L"Select main gun",
|
||||
L"Select ammo",
|
||||
L"Select sidearm",
|
||||
L"Select additional ammo",
|
||||
L"Select melee weapon",
|
||||
|
||||
L"Select helmet",
|
||||
L"Select vest",
|
||||
L"Select pants",
|
||||
L"Select face gear",
|
||||
L"Select face gear",
|
||||
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
};
|
||||
|
||||
STR16 szIMPGearDropDownNoneText[] =
|
||||
{
|
||||
L"No LBE vest",
|
||||
L"No LBE combat pack",
|
||||
L"No LBE backpack",
|
||||
L"No LBE holster",
|
||||
L"No LBE holster",
|
||||
|
||||
L"No gun",
|
||||
L"No ammo",
|
||||
L"No gun",
|
||||
L"No ammo",
|
||||
L"No weapon",
|
||||
|
||||
L"No helmet",
|
||||
L"No vest",
|
||||
L"No pants",
|
||||
L"No face gear",
|
||||
L"No face gear",
|
||||
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
};
|
||||
|
||||
#endif //DUTCH
|
||||
|
||||
@@ -9789,4 +9789,76 @@ STR16 szDiseaseText[] =
|
||||
L"Cancel",
|
||||
};
|
||||
|
||||
STR16 szIMPGearWebSiteText[] =
|
||||
{
|
||||
// IMP Gear Entrance
|
||||
L"How should gear be selected?",
|
||||
L"Old method: Random gear according to your choices",
|
||||
L"New method: Free selection of gear",
|
||||
L"Old method",
|
||||
L"New method",
|
||||
|
||||
// IMP Gear Entrance
|
||||
L"I.M.P. Equipment",
|
||||
L"Equipment cost: %d$",
|
||||
};
|
||||
|
||||
STR16 szIMPGearDropDownText[] =
|
||||
{
|
||||
L"Select LBE vest",
|
||||
L"Select LBE combat pack",
|
||||
L"Select LBE backpack",
|
||||
L"Select LBE holster",
|
||||
L"Select LBE holster",
|
||||
|
||||
L"Select main gun",
|
||||
L"Select ammo",
|
||||
L"Select sidearm",
|
||||
L"Select additional ammo",
|
||||
L"Select melee weapon",
|
||||
|
||||
L"Select helmet",
|
||||
L"Select vest",
|
||||
L"Select pants",
|
||||
L"Select face gear",
|
||||
L"Select face gear",
|
||||
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
};
|
||||
|
||||
STR16 szIMPGearDropDownNoneText[] =
|
||||
{
|
||||
L"No LBE vest",
|
||||
L"No LBE combat pack",
|
||||
L"No LBE backpack",
|
||||
L"No LBE holster",
|
||||
L"No LBE holster",
|
||||
|
||||
L"No gun",
|
||||
L"No ammo",
|
||||
L"No gun",
|
||||
L"No ammo",
|
||||
L"No weapon",
|
||||
|
||||
L"No helmet",
|
||||
L"No vest",
|
||||
L"No pants",
|
||||
L"No face gear",
|
||||
L"No face gear",
|
||||
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
};
|
||||
|
||||
#endif //ENGLISH
|
||||
|
||||
@@ -9741,4 +9741,76 @@ STR16 szDiseaseText[] =
|
||||
L"Cancel",
|
||||
};
|
||||
|
||||
STR16 szIMPGearWebSiteText[] = // TODO.Translate
|
||||
{
|
||||
// IMP Gear Entrance
|
||||
L"How should gear be selected?",
|
||||
L"Old method: Random gear according to your choices",
|
||||
L"New method: Free selection of gear",
|
||||
L"Old method",
|
||||
L"New method",
|
||||
|
||||
// IMP Gear Entrance
|
||||
L"I.M.P. Equipment",
|
||||
L"Equipment cost: %d$",
|
||||
};
|
||||
|
||||
STR16 szIMPGearDropDownText[] =
|
||||
{
|
||||
L"Select LBE vest",
|
||||
L"Select LBE combat pack",
|
||||
L"Select LBE backpack",
|
||||
L"Select LBE holster",
|
||||
L"Select LBE holster",
|
||||
|
||||
L"Select main gun",
|
||||
L"Select ammo",
|
||||
L"Select sidearm",
|
||||
L"Select additional ammo",
|
||||
L"Select melee weapon",
|
||||
|
||||
L"Select helmet",
|
||||
L"Select vest",
|
||||
L"Select pants",
|
||||
L"Select face gear",
|
||||
L"Select face gear",
|
||||
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
};
|
||||
|
||||
STR16 szIMPGearDropDownNoneText[] =
|
||||
{
|
||||
L"No LBE vest",
|
||||
L"No LBE combat pack",
|
||||
L"No LBE backpack",
|
||||
L"No LBE holster",
|
||||
L"No LBE holster",
|
||||
|
||||
L"No gun",
|
||||
L"No ammo",
|
||||
L"No gun",
|
||||
L"No ammo",
|
||||
L"No weapon",
|
||||
|
||||
L"No helmet",
|
||||
L"No vest",
|
||||
L"No pants",
|
||||
L"No face gear",
|
||||
L"No face gear",
|
||||
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
};
|
||||
|
||||
#endif //FRENCH
|
||||
|
||||
@@ -9568,4 +9568,76 @@ STR16 szDiseaseText[] =
|
||||
L"Cancel",
|
||||
};
|
||||
|
||||
STR16 szIMPGearWebSiteText[] = // TODO.Translate
|
||||
{
|
||||
// IMP Gear Entrance
|
||||
L"How should gear be selected?",
|
||||
L"Old method: Random gear according to your choices",
|
||||
L"New method: Free selection of gear",
|
||||
L"Old method",
|
||||
L"New method",
|
||||
|
||||
// IMP Gear Entrance
|
||||
L"I.M.P. Equipment",
|
||||
L"Equipment cost: %d$",
|
||||
};
|
||||
|
||||
STR16 szIMPGearDropDownText[] =
|
||||
{
|
||||
L"Select LBE vest",
|
||||
L"Select LBE combat pack",
|
||||
L"Select LBE backpack",
|
||||
L"Select LBE holster",
|
||||
L"Select LBE holster",
|
||||
|
||||
L"Select main gun",
|
||||
L"Select ammo",
|
||||
L"Select sidearm",
|
||||
L"Select additional ammo",
|
||||
L"Select melee weapon",
|
||||
|
||||
L"Select helmet",
|
||||
L"Select vest",
|
||||
L"Select pants",
|
||||
L"Select face gear",
|
||||
L"Select face gear",
|
||||
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
};
|
||||
|
||||
STR16 szIMPGearDropDownNoneText[] =
|
||||
{
|
||||
L"No LBE vest",
|
||||
L"No LBE combat pack",
|
||||
L"No LBE backpack",
|
||||
L"No LBE holster",
|
||||
L"No LBE holster",
|
||||
|
||||
L"No gun",
|
||||
L"No ammo",
|
||||
L"No gun",
|
||||
L"No ammo",
|
||||
L"No weapon",
|
||||
|
||||
L"No helmet",
|
||||
L"No vest",
|
||||
L"No pants",
|
||||
L"No face gear",
|
||||
L"No face gear",
|
||||
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
};
|
||||
|
||||
#endif //GERMAN
|
||||
|
||||
@@ -9747,4 +9747,76 @@ STR16 szDiseaseText[] =
|
||||
L"Cancel",
|
||||
};
|
||||
|
||||
STR16 szIMPGearWebSiteText[] = // TODO.Translate
|
||||
{
|
||||
// IMP Gear Entrance
|
||||
L"How should gear be selected?",
|
||||
L"Old method: Random gear according to your choices",
|
||||
L"New method: Free selection of gear",
|
||||
L"Old method",
|
||||
L"New method",
|
||||
|
||||
// IMP Gear Entrance
|
||||
L"I.M.P. Equipment",
|
||||
L"Equipment cost: %d$",
|
||||
};
|
||||
|
||||
STR16 szIMPGearDropDownText[] =
|
||||
{
|
||||
L"Select LBE vest",
|
||||
L"Select LBE combat pack",
|
||||
L"Select LBE backpack",
|
||||
L"Select LBE holster",
|
||||
L"Select LBE holster",
|
||||
|
||||
L"Select main gun",
|
||||
L"Select ammo",
|
||||
L"Select sidearm",
|
||||
L"Select additional ammo",
|
||||
L"Select melee weapon",
|
||||
|
||||
L"Select helmet",
|
||||
L"Select vest",
|
||||
L"Select pants",
|
||||
L"Select face gear",
|
||||
L"Select face gear",
|
||||
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
};
|
||||
|
||||
STR16 szIMPGearDropDownNoneText[] =
|
||||
{
|
||||
L"No LBE vest",
|
||||
L"No LBE combat pack",
|
||||
L"No LBE backpack",
|
||||
L"No LBE holster",
|
||||
L"No LBE holster",
|
||||
|
||||
L"No gun",
|
||||
L"No ammo",
|
||||
L"No gun",
|
||||
L"No ammo",
|
||||
L"No weapon",
|
||||
|
||||
L"No helmet",
|
||||
L"No vest",
|
||||
L"No pants",
|
||||
L"No face gear",
|
||||
L"No face gear",
|
||||
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
};
|
||||
|
||||
#endif //ITALIAN
|
||||
|
||||
@@ -9763,4 +9763,76 @@ STR16 szDiseaseText[] =
|
||||
L"Cancel",
|
||||
};
|
||||
|
||||
STR16 szIMPGearWebSiteText[] = // TODO.Translate
|
||||
{
|
||||
// IMP Gear Entrance
|
||||
L"How should gear be selected?",
|
||||
L"Old method: Random gear according to your choices",
|
||||
L"New method: Free selection of gear",
|
||||
L"Old method",
|
||||
L"New method",
|
||||
|
||||
// IMP Gear Entrance
|
||||
L"I.M.P. Equipment",
|
||||
L"Equipment cost: %d$",
|
||||
};
|
||||
|
||||
STR16 szIMPGearDropDownText[] =
|
||||
{
|
||||
L"Select LBE vest",
|
||||
L"Select LBE combat pack",
|
||||
L"Select LBE backpack",
|
||||
L"Select LBE holster",
|
||||
L"Select LBE holster",
|
||||
|
||||
L"Select main gun",
|
||||
L"Select ammo",
|
||||
L"Select sidearm",
|
||||
L"Select additional ammo",
|
||||
L"Select melee weapon",
|
||||
|
||||
L"Select helmet",
|
||||
L"Select vest",
|
||||
L"Select pants",
|
||||
L"Select face gear",
|
||||
L"Select face gear",
|
||||
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
};
|
||||
|
||||
STR16 szIMPGearDropDownNoneText[] =
|
||||
{
|
||||
L"No LBE vest",
|
||||
L"No LBE combat pack",
|
||||
L"No LBE backpack",
|
||||
L"No LBE holster",
|
||||
L"No LBE holster",
|
||||
|
||||
L"No gun",
|
||||
L"No ammo",
|
||||
L"No gun",
|
||||
L"No ammo",
|
||||
L"No weapon",
|
||||
|
||||
L"No helmet",
|
||||
L"No vest",
|
||||
L"No pants",
|
||||
L"No face gear",
|
||||
L"No face gear",
|
||||
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
};
|
||||
|
||||
#endif //POLISH
|
||||
|
||||
@@ -9751,5 +9751,77 @@ STR16 szDiseaseText[] =
|
||||
L"Cancel",
|
||||
};
|
||||
|
||||
STR16 szIMPGearWebSiteText[] = // TODO.Translate
|
||||
{
|
||||
// IMP Gear Entrance
|
||||
L"How should gear be selected?",
|
||||
L"Old method: Random gear according to your choices",
|
||||
L"New method: Free selection of gear",
|
||||
L"Old method",
|
||||
L"New method",
|
||||
|
||||
// IMP Gear Entrance
|
||||
L"I.M.P. Equipment",
|
||||
L"Equipment cost: %d$",
|
||||
};
|
||||
|
||||
STR16 szIMPGearDropDownText[] =
|
||||
{
|
||||
L"Select LBE vest",
|
||||
L"Select LBE combat pack",
|
||||
L"Select LBE backpack",
|
||||
L"Select LBE holster",
|
||||
L"Select LBE holster",
|
||||
|
||||
L"Select main gun",
|
||||
L"Select ammo",
|
||||
L"Select sidearm",
|
||||
L"Select additional ammo",
|
||||
L"Select melee weapon",
|
||||
|
||||
L"Select helmet",
|
||||
L"Select vest",
|
||||
L"Select pants",
|
||||
L"Select face gear",
|
||||
L"Select face gear",
|
||||
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
L"Select additional items",
|
||||
};
|
||||
|
||||
STR16 szIMPGearDropDownNoneText[] =
|
||||
{
|
||||
L"No LBE vest",
|
||||
L"No LBE combat pack",
|
||||
L"No LBE backpack",
|
||||
L"No LBE holster",
|
||||
L"No LBE holster",
|
||||
|
||||
L"No gun",
|
||||
L"No ammo",
|
||||
L"No gun",
|
||||
L"No ammo",
|
||||
L"No weapon",
|
||||
|
||||
L"No helmet",
|
||||
L"No vest",
|
||||
L"No pants",
|
||||
L"No face gear",
|
||||
L"No face gear",
|
||||
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
L"No additional items",
|
||||
};
|
||||
|
||||
|
||||
#endif //RUSSIAN
|
||||
|
||||
Reference in New Issue
Block a user