- bugfix: When loading an I.M.P by nickname or 90210 the voice was not set correct

- feature: Now it is possible to load an I.M.P. even if it has multiple blanks (spaces) in the nickname. E.g. "Mr D 2", "Jack 1", ...

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@559 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2006-09-25 07:55:58 +00:00
parent 236e26fe8a
commit 0aa610ac40
7 changed files with 41 additions and 23 deletions
+2 -2
View File
@@ -23,12 +23,12 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" };
#else
//RELEASE BUILD VERSION
INT16 zVersionLabel[256] = { L"Release v1.13.555" };
INT16 zVersionLabel[256] = { L"Release v1.13.558" };
#endif
INT8 czVersionNumber[16] = { "Build 06.09.22" };
INT8 czVersionNumber[16] = { "Build 06.09.25" };
INT16 zTrackingNumber[16] = { L"Z" };
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -767,7 +767,7 @@ BOOLEAN LoadImpCharacter( STR nickName )
}
// Set the ID of the new IMP
iProfileId = GetFreeIMPSlot(iProfileId);
iProfileId = GetFreeIMPSlot(iProfileId, iProfileId);
// We can create the new imp, beacuse we found an empty slot
if (iProfileId != -1)
+1 -1
View File
@@ -339,7 +339,7 @@ void HandleTextEvent( UINT32 uiKey )
if( uiKey >= 'A' && uiKey <= 'Z' ||
uiKey >= 'a' && uiKey <= 'z' ||
uiKey >= '0' && uiKey <= '9' ||
uiKey == '_' || uiKey == '.' )
uiKey == '_' || uiKey == '.' || uiKey ==' ') // WANNE NEW: added ' '
{
// if the current string position is at max or great, do nothing
if( iStringPos >= 8 )
+32 -17
View File
@@ -839,36 +839,51 @@ INT32 GetFilledIMPSlots( INT8 iSex )
}
// WANNE NEW
INT32 GetFreeIMPSlot(INT32 iIMPId)
INT32 GetFreeIMPSlot(INT32 iIMPId, INT32 iDefaultIMPId)
{
INT32 iStart;
INT32 iEnd;
INT32 i;
INT32 iFreeSlot = -1;
BOOLEAN bFoundDefaultIMP = FALSE;
if (iIMPId != -1)
{
// Female
if (iIMPId >= PLAYER_GENERATED_CHARACTER_ID + 3)
// We have a default imp id (90210 or nickname)
if (iDefaultIMPId != -1)
{
iStart = PLAYER_GENERATED_CHARACTER_ID + 3;
iEnd = PLAYER_GENERATED_CHARACTER_ID + 6;
}
// Male
else
{
iStart = PLAYER_GENERATED_CHARACTER_ID;
iEnd = PLAYER_GENERATED_CHARACTER_ID + 3;
if (wcscmp(gMercProfiles[iDefaultIMPId].zName, L"") == 0)
{
iFreeSlot = iDefaultIMPId;
return iFreeSlot;
}
}
// Find a free imp slot
for (i = iStart; i < iEnd; i++)
// The default IMP id is already used, find next free imp id
if (bFoundDefaultIMP == FALSE)
{
// Found a free imp slot
if (wcscmp(gMercProfiles[i].zName, L"") == 0)
// Female
if (iIMPId >= PLAYER_GENERATED_CHARACTER_ID + 3)
{
iFreeSlot = i;
break;
iStart = PLAYER_GENERATED_CHARACTER_ID + 3;
iEnd = PLAYER_GENERATED_CHARACTER_ID + 6;
}
// Male
else
{
iStart = PLAYER_GENERATED_CHARACTER_ID;
iEnd = PLAYER_GENERATED_CHARACTER_ID + 3;
}
// Find a free imp slot
for (i = iStart; i < iEnd; i++)
{
// Found a free imp slot
if (wcscmp(gMercProfiles[i].zName, L"") == 0)
{
iFreeSlot = i;
break;
}
}
}
+1 -1
View File
@@ -10,7 +10,7 @@ void NextProfilingMode( void );
void ShadeUnSelectableButtons( void );
// WANNE NEW
INT32 GetFreeIMPSlot(INT32 iIMPId);
INT32 GetFreeIMPSlot(INT32 iIMPId, INT32 iDefaultIMPId);
INT32 GetFilledIMPSlots( INT8 iSex );
extern INT32 iCurrentProfileMode;
+4 -1
View File
@@ -1237,7 +1237,10 @@ void RenderQuestDebugSystem()
DisplayQDSCurrentlyQuoteNum( );
MarkButtonsDirty( );
InvalidateRegion( 0, 0, 640, 480 );
// WANNE NEW:
//InvalidateRegion( 0, 0, 640, 480 );
InvalidateRegion( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
}