new disabilities:

- 'deaf' reduces hearing ability
- 'shortsighted' reduces sight range

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6049 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2013-05-02 00:15:51 +00:00
parent 265fd3bc61
commit 8fb494ff53
20 changed files with 249 additions and 47 deletions
+33 -16
View File
@@ -41,8 +41,14 @@ enum
#define IMP_DISABILITY_COLUMN_START_X ( LAPTOP_SCREEN_UL_X + 136 )
//#define IMP_DISABILITY_COLUMN_START_X ( LAPTOP_SCREEN_UL_X + 136 )
#define IMP_DISABILITY_COLUMN_START_X ( LAPTOP_SCREEN_UL_X + 15 )
#define IMP_DISABILITY_2ND_COLUMN_START_X ( IMP_DISABILITY_COLUMN_START_X + 241 )
#define IMP_DISABILITY_COLUMN_START_Y ( LAPTOP_SCREEN_WEB_UL_Y + 40 )
#define IMP_DISABILITY_2ND_COLUMN_START_Y IMP_DISABILITY_COLUMN_START_Y
#define IMP_DISABILITY_TRAIT_NUMBER_TO_START_2ND_COLUMN 6
#define IMP_DISABILITY_TRAIT__SPACE_BTN_BUTTONS 38
@@ -146,15 +152,26 @@ void EnterIMPDisabilityTrait( void )
HandleDisabilityTraitButtonStates( );
// add regions for help texts
UINT16 usPosX = IMP_DISABILITY_COLUMN_START_X + 62;
UINT16 usPosY = IMP_DISABILITY_COLUMN_START_Y + 8;
for( UINT8 ubCnt=0; ubCnt<IMP_DISABILITIES_NUMBER; ubCnt++ )
{
MSYS_DefineRegion( &gMR_DisabilityHelpTextRegions[ubCnt], ( IMP_DISABILITY_COLUMN_START_X + 62 ), ( usPosY ),
(IMP_DISABILITY_COLUMN_START_X + 218), ( usPosY + 17), MSYS_PRIORITY_HIGH,
MSYS_DefineRegion( &gMR_DisabilityHelpTextRegions[ubCnt], usPosX, ( usPosY ),
(usPosX + 156), ( usPosY + 17), MSYS_PRIORITY_HIGH,
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, NULL );
MSYS_AddRegion( &gMR_DisabilityHelpTextRegions[ubCnt] );
usPosY += IMP_DISABILITY_TRAIT__SPACE_BTN_BUTTONS;
//Determine the next x location
if( ubCnt < IMP_DISABILITY_TRAIT_NUMBER_TO_START_2ND_COLUMN )
usPosX = IMP_DISABILITY_COLUMN_START_X + 62;
else
usPosX = IMP_DISABILITY_2ND_COLUMN_START_X + 62;
//Determine the next Y location
if( ubCnt == IMP_DISABILITY_TRAIT_NUMBER_TO_START_2ND_COLUMN )
usPosY = IMP_DISABILITY_COLUMN_START_Y + 8;
else
usPosY += IMP_DISABILITY_TRAIT__SPACE_BTN_BUTTONS;
}
}
@@ -242,15 +259,15 @@ void AddImpDisabilityTraitButtons()
//ButtonList[ giIMPDisabilityTraitAnswerButton[ ubCnt ] ]->ubSoundSchemeID = 0;
//Determine the next x location
//if( ubCnt < IMP_DISABILITY_TRAIT_NUMBER_TO_START_2ND_COLUMN )
if( ubCnt < IMP_DISABILITY_TRAIT_NUMBER_TO_START_2ND_COLUMN )
usPosX = IMP_DISABILITY_COLUMN_START_X;
//else
// usPosX = IMP_DISABILITY_2ND_COLUMN_START_X;
else
usPosX = IMP_DISABILITY_2ND_COLUMN_START_X;
//Determine the next Y location
//if( ubCnt == IMP_DISABILITY_TRAIT_NUMBER_TO_START_2ND_COLUMN )
// usPosY = IMP_DISABILITY_2ND_COLUMN_START_Y;
//else
if( ubCnt == IMP_DISABILITY_TRAIT_NUMBER_TO_START_2ND_COLUMN )
usPosY = IMP_DISABILITY_2ND_COLUMN_START_Y;
else
usPosY += IMP_DISABILITY_TRAIT__SPACE_BTN_BUTTONS;
}
}
@@ -380,15 +397,15 @@ void IMPDisabilityTraitDisplayDisabilityTraits()
AssignDisabilityHelpText( ubCnt );
//Determine the next x location
// if( ubCnt < IMP_DISABILITY_TRAIT_NUMBER_TO_START_2ND_COLUMN )
if( ubCnt < IMP_DISABILITY_TRAIT_NUMBER_TO_START_2ND_COLUMN )
usPosX = IMP_DISABILITY_COLUMN_START_X + IMP_DISABILITY_TRAIT__TEXT_OFFSET_X;
//else
// usPosX = IMP_DISABILITY_2ND_COLUMN_START_X + IMP_DISABILITY_TRAIT__TEXT_OFFSET_X;
else
usPosX = IMP_DISABILITY_2ND_COLUMN_START_X + IMP_DISABILITY_TRAIT__TEXT_OFFSET_X;
//Determine the next Y location
//if( ubCnt == IMP_DISABILITY_TRAIT_NUMBER_TO_START_2ND_COLUMN )
// usPosY = IMP_DISABILITY_2ND_COLUMN_START_Y + IMP_DISABILITY_TRAIT__TEXT_OFFSET_Y;
//else
if( ubCnt == IMP_DISABILITY_TRAIT_NUMBER_TO_START_2ND_COLUMN )
usPosY = IMP_DISABILITY_2ND_COLUMN_START_Y + IMP_DISABILITY_TRAIT__TEXT_OFFSET_Y;
else
usPosY += IMP_DISABILITY_TRAIT__SPACE_BTN_BUTTONS;
}
}
+2
View File
@@ -20,6 +20,8 @@ typedef enum
IMP_DISABILITY_FEAR_OF_INSECTS,
IMP_DISABILITY_FORGETFUL,
IMP_DISABILITY_PSYCHO,
IMP_DISABILITY_DEAF,
IMP_DISABILITY_SHORTSIGHTED,
IMP_DISABILITIES_NUMBER,
};
+43 -19
View File
@@ -4065,13 +4065,13 @@ void HandleIMPCharProfileResultsMessage( void)
switch( gMercProfiles[ iCurrentIMPSlot ].bDisability)
{
// normal as can be
case( NO_DISABILITY ):
iOffSet = IMP_PERSONALITY_NORMAL;
case( NO_DISABILITY ):
iOffSet = IMP_PERSONALITY_NORMAL;
break;
case( HEAT_INTOLERANT ):
iOffSet = IMP_PERSONALITY_HEAT;
break;
case( NERVOUS ):
case( NERVOUS ):
iOffSet = IMP_PERSONALITY_NERVOUS;
break;
case( CLAUSTROPHOBIC ):
@@ -4091,25 +4091,49 @@ void HandleIMPCharProfileResultsMessage( void)
break;
}
// personality tick
// DEF: removed 1/12/99, cause it was changing the length of email that were already calculated
// LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( iOffSet + Random( IMP_PERSONALITY_LENGTH - 1 ) + 1 ), MAIL_STRING_SIZE );
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( iOffSet + 1 ), MAIL_STRING_SIZE );
// add to list
AddEmailRecordToList( pString );
// persoanlity paragraph
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( iOffSet + IMP_PERSONALITY_LENGTH ), MAIL_STRING_SIZE );
// add to list
AddEmailRecordToList( pString );
// extra paragraph for bugs
if( gMercProfiles[ iCurrentIMPSlot ].bDisability == FEAR_OF_INSECTS )
// Flugente: new personalities do not get their text from .edt files
if ( gMercProfiles[ iCurrentIMPSlot ].bDisability == DEAF )
{
// persoanlity paragraph
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( iOffSet + IMP_PERSONALITY_LENGTH + 1 ), MAIL_STRING_SIZE );
swprintf( pString, gzIMPDisabilityTraitEmailTextDeaf[0] );
AddEmailRecordToList( pString );
swprintf( pString, gzIMPDisabilityTraitEmailTextDeaf[1] );
AddEmailRecordToList( pString );
}
else if ( gMercProfiles[ iCurrentIMPSlot ].bDisability == SHORTSIGHTED )
{
swprintf( pString, gzIMPDisabilityTraitEmailTextShortSighted[0] );
AddEmailRecordToList( pString );
swprintf( pString, gzIMPDisabilityTraitEmailTextShortSighted[1] );
AddEmailRecordToList( pString );
}
else
{
// personality tick
// DEF: removed 1/12/99, cause it was changing the length of email that were already calculated
//LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( iOffSet + Random( IMP_PERSONALITY_LENGTH - 1 ) + 1 ), MAIL_STRING_SIZE );
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( iOffSet + 1 ), MAIL_STRING_SIZE );
// add to list
AddEmailRecordToList( pString );
// personality paragraph
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( iOffSet + IMP_PERSONALITY_LENGTH ), MAIL_STRING_SIZE );
// add to list
AddEmailRecordToList( pString );
// extra paragraph for bugs
if( gMercProfiles[ iCurrentIMPSlot ].bDisability == FEAR_OF_INSECTS )
{
// personality paragraph
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( iOffSet + IMP_PERSONALITY_LENGTH + 1 ), MAIL_STRING_SIZE );
// add to list
AddEmailRecordToList( pString );
}
}
// attitude intro