mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Source v1.13 Mod High Resolution version from 2006-04-19
********************************************************* * 2006/04/19 * * Madd_Mugsy * * Developed in VS 2003 * ********************************************************* - Restored the ?accurate? and ?inaccurate? strings that Rowa21 overwrote ;) - IMP.dat file changed to save a different file for each IMP - Different existing IMPs can be loaded by typing their names in the IMP webpage git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@28 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1244,7 +1244,7 @@ void Print8CharacterOnlyString( void )
|
||||
|
||||
BOOLEAN CheckCharacterInputForEgg( void )
|
||||
{
|
||||
MERC_HIRE_STRUCT HireMercStruct;
|
||||
// MERC_HIRE_STRUCT HireMercStruct;
|
||||
|
||||
#ifndef JA2BETAVERSION
|
||||
return( FALSE );
|
||||
|
||||
+13
-4
@@ -33,7 +33,7 @@
|
||||
#include "strategic.h"
|
||||
#endif
|
||||
|
||||
#define IMP_MERC_FILE "IMP.dat"
|
||||
#define IMP_FILENAME_SUFFIX ".dat"
|
||||
|
||||
IMP_ITEM_CHOICE_TYPE gIMPItemChoices[MAX_IMP_ITEM_TYPES];
|
||||
|
||||
@@ -657,7 +657,7 @@ void WriteOutCurrentImpCharacter( INT32 iProfileId )
|
||||
UINT32 uiBytesWritten = 0;
|
||||
|
||||
// open the file for writing
|
||||
hFile = FileOpen(IMP_MERC_FILE, FILE_ACCESS_WRITE | FILE_CREATE_ALWAYS, FALSE);
|
||||
hFile = FileOpen(strcat((STR)(&gMercProfiles[iProfileId].zNickname),IMP_FILENAME_SUFFIX), FILE_ACCESS_WRITE | FILE_CREATE_ALWAYS, FALSE);
|
||||
|
||||
// write out the profile id
|
||||
if (!FileWrite(hFile, &iProfileId, sizeof( INT32 ), &uiBytesWritten))
|
||||
@@ -683,14 +683,23 @@ void WriteOutCurrentImpCharacter( INT32 iProfileId )
|
||||
return;
|
||||
}
|
||||
|
||||
void LoadInCurrentImpCharacter( void )
|
||||
BOOLEAN ImpExists ( STR nickName )
|
||||
{
|
||||
DWORD attribs = GetFileAttributes(strcat(nickName,IMP_FILENAME_SUFFIX));
|
||||
if ( attribs != INVALID_FILE_ATTRIBUTES && !(attribs & FILE_ATTRIBUTE_DIRECTORY) )
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void LoadImpCharacter( STR nickName )
|
||||
{
|
||||
INT32 iProfileId = 0;
|
||||
HWFILE hFile;
|
||||
UINT32 uiBytesRead = 0;
|
||||
|
||||
// open the file for writing
|
||||
hFile = FileOpen(IMP_MERC_FILE, FILE_ACCESS_READ, FALSE);
|
||||
hFile = FileOpen(strcat(nickName,IMP_FILENAME_SUFFIX), FILE_ACCESS_READ, FALSE);
|
||||
|
||||
// valid file?
|
||||
if( hFile == -1 )
|
||||
|
||||
@@ -7,11 +7,12 @@ void ExitIMPConfirm( void );
|
||||
void HandleIMPConfirm( void );
|
||||
|
||||
BOOLEAN AddCharacterToPlayersTeam( void );
|
||||
void LoadInCurrentImpCharacter( void );
|
||||
void LoadImpCharacter( STR fileName );
|
||||
void WriteOutCurrentImpCharacter( INT32 iProfileId );
|
||||
|
||||
void ResetIMPCharactersEyesAndMouthOffsets( UINT8 ubMercProfileID );
|
||||
|
||||
BOOLEAN ImpExists ( STR fileName );
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -396,10 +396,11 @@ void ProcessPlayerInputActivationString( void )
|
||||
iCurrentImpPage = IMP_MAIN_PAGE;
|
||||
|
||||
}
|
||||
//Madd multiple imps else if( ( wcscmp(pPlayerActivationString, L"90210") == 0 ) && ( LaptopSaveInfo.fIMPCompletedFlag == FALSE ) )
|
||||
else if( ( wcscmp(pPlayerActivationString, L"90210") == 0 ) )
|
||||
//Madd multiple imps else if( ( wcscmp(pPlayerActivationString, L"90210") == 0 ) && ( LaptopSaveInfo.fIMPCompletedFlag == FALSE ) )
|
||||
// Madd: load characters by name:
|
||||
else if ( ImpExists( (STR)pPlayerActivationString ) )
|
||||
{
|
||||
LoadInCurrentImpCharacter( );
|
||||
LoadImpCharacter( (STR)pPlayerActivationString );
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user