************************************************************

* Merged Source Code from Development Trunk: Revision 4063 *
************************************************************
- Source Code is merged from: https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP
- This will be the Source for the Beta 2011 Test

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4064 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2011-01-18 09:11:09 +00:00
parent 44e1646410
commit 91087ca8c0
469 changed files with 118108 additions and 24678 deletions
+169 -37
View File
@@ -23,12 +23,15 @@ extern UINT8 gbCurrentIndex;
UINT32 guiMugShotBorder;
UINT32 guiAimFiFace[ MAX_NUMBER_MERCS ];
UINT32 guiAimFiFace[ NUM_PROFILES ]; //MAX_NUMBER_MERCS
BOOLEAN gAimProfiles[ NUM_PROFILES ];
#define AIM_FI_NUM_MUGSHOTS_X 8
#define AIM_FI_NUM_MUGSHOTS_Y 5
#define AIM_FI_NUM_MUHSHOTS_X 8
#define AIM_FI_NUM_MUHSHOTS_Y 5
UINT8 START_MERC =0;
UINT8 END_MERC =0;
#define AIM_FI_PORTRAIT_WIDTH 52
#define AIM_FI_PORTRAIT_HEIGHT 48
@@ -46,6 +49,9 @@ UINT32 guiAimFiFace[ MAX_NUMBER_MERCS ];
#define AIM_FI_MEMBER_TEXT_X IMAGE_OFFSET_X + 155
#define AIM_FI_MEMBER_TEXT_Y AIM_SYMBOL_Y + AIM_SYMBOL_SIZE_Y + 1
#define AIM_FI_MEMBER_TEXT_WIDTH 190
//tais: nsgi, move member text up
#define AIM_FI_MEMBER_TEXT_Y_NSGI AIM_SYMBOL_SMALL_Y + 35
#define AIM_FI_AWAY_TEXT_OFFSET_X 3
#define AIM_FI_AWAY_TEXT_OFFSET_Y 23//3//36
@@ -55,7 +61,7 @@ UINT32 guiAimFiFace[ MAX_NUMBER_MERCS ];
//Mouse Regions
//Face regions
MOUSE_REGION gMercFaceMouseRegions[ MAX_NUMBER_MERCS ];
MOUSE_REGION gMercFaceMouseRegions[ NUM_PROFILES ]; //MAX_NUMBER_MERCS
void SelectMercFaceRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
void SelectMercFaceMoveRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
@@ -66,12 +72,74 @@ void SelectScreenRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
BOOLEAN DrawMercsFaceToScreen(UINT8 ubMercID, UINT16 usPosX, UINT16 usPosY, UINT8 ubImage);
//New profiles
INT32 guiPreviousNewProfilesNextButtonImage;
void BtnNewProfilesButtonCallback(GUI_BUTTON *btn,INT32 reason);
INT32 PAGE_BUTTON;
void GameInitAimFacialIndex()
{
}
/// Calculates the needed string for the page button based on number of mercs
/// and currently displayed page.
static STR16 GetPageButtonText()
{
const int MERCS_PER_PAGE = AIM_FI_NUM_MUGSHOTS_X * AIM_FI_NUM_MUGSHOTS_Y;
int baseTextIndex;
// Display three pages of mercs (strings from gszAimPages[2] to gszAimPages[4])
if (MAX_NUMBER_MERCS > MERCS_PER_PAGE * 2)
baseTextIndex = 2;
// Display two pages of mercs (strings from gszAimPages[0] to gszAimPages[1])
else if (MAX_NUMBER_MERCS > MERCS_PER_PAGE)
{
Assert(START_MERC < MERCS_PER_PAGE * 2);
baseTextIndex = 0;
}
// Display one page of mercs (string gszAimPages[5])
else
{
Assert(START_MERC < MERCS_PER_PAGE);
baseTextIndex = 5;
}
int currentPage = START_MERC / MERCS_PER_PAGE;
int stringIndex = baseTextIndex + currentPage;
return gszAimPages[ stringIndex ];
}
void BtnNewProfilesButtonCallback(GUI_BUTTON *btn,INT32 reason)
{
UINT32 i;
for(i=0; i<MAX_NUMBER_MERCS; i++)
{
gAimProfiles[i] = TRUE;
}
if ( START_MERC == 0 )
{
START_MERC = 40;
}
else if ( START_MERC == 40 )
{
if ( MAX_NUMBER_MERCS > 80 )
START_MERC = 80;
else
START_MERC = 0;
}
else
{
START_MERC = 0;
}
ExitAimFacialIndex();
EnterAimFacialIndex();
}
BOOLEAN EnterAimFacialIndex()
{
VOBJECT_DESC VObjectDesc;
@@ -79,41 +147,66 @@ BOOLEAN EnterAimFacialIndex()
UINT16 usPosX, usPosY, x,y;
STR sFaceLoc = "FACES\\";
char sTemp[100];
UINT8 p = 0;
for(i=0; i<MAX_NUMBER_MERCS; i++)
{
gAimProfiles[i] = TRUE;
}
// load the Portait graphic and add it
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
FilenameForBPP("LAPTOP\\MugShotBorder3.sti", VObjectDesc.ImageFile);
CHECKF(AddVideoObject(&VObjectDesc, &guiMugShotBorder));
//Page button
guiPreviousNewProfilesNextButtonImage = LoadButtonImage("LAPTOP\\BottomButtons2.sti", -1,0,-1,1,-1 ); //New profiles
STR16 buttonText = GetPageButtonText();
PAGE_BUTTON = CreateIconAndTextButton( guiPreviousNewProfilesNextButtonImage, buttonText, FONT14ARIAL,
FONT_MCOLOR_DKWHITE, DEFAULT_SHADOW,
138, DEFAULT_SHADOW,
TEXT_CJUSTIFIED,
IMAGE_OFFSET_X + 6, IMAGE_OFFSET_Y + 35, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
DEFAULT_MOVE_CALLBACK, BtnNewProfilesButtonCallback);
SetButtonCursor(PAGE_BUTTON, CURSOR_WWW );
usPosX = AIM_FI_FIRST_MUGSHOT_X;
usPosY = AIM_FI_FIRST_MUGSHOT_Y;
i=0;
for(y=0; y<AIM_FI_NUM_MUHSHOTS_Y; y++)
for(y=0; y<AIM_FI_NUM_MUGSHOTS_Y; y++)
{
for(x=0; x<AIM_FI_NUM_MUHSHOTS_X; x++)
for(x=0; x<AIM_FI_NUM_MUGSHOTS_X; x++)
{
MSYS_DefineRegion( &gMercFaceMouseRegions[ i ], usPosX, usPosY, (INT16)(usPosX + AIM_FI_PORTRAIT_WIDTH), (INT16)(usPosY + AIM_FI_PORTRAIT_HEIGHT), MSYS_PRIORITY_HIGH,
CURSOR_WWW, SelectMercFaceMoveRegionCallBack, SelectMercFaceRegionCallBack);
// Add region
MSYS_AddRegion( &gMercFaceMouseRegions[ i ] );
MSYS_SetRegionUserData( &gMercFaceMouseRegions[ i ], 0, i);
if ( gAimProfiles[i+START_MERC] == TRUE ) //new profiles
{
MSYS_DefineRegion( &gMercFaceMouseRegions[ i ], usPosX, usPosY, (INT16)(usPosX + AIM_FI_PORTRAIT_WIDTH), (INT16)(usPosY + AIM_FI_PORTRAIT_HEIGHT), MSYS_PRIORITY_HIGH,
CURSOR_WWW, SelectMercFaceMoveRegionCallBack, SelectMercFaceRegionCallBack);
// Add region
MSYS_AddRegion( &gMercFaceMouseRegions[ i ] );
MSYS_SetRegionUserData( &gMercFaceMouseRegions[ i ], 0, i);
if (gGameExternalOptions.fReadProfileDataFromXML)
{
// HEADROCK PROFEX: Do not read direct profile number, instead, look inside the profile for a ubFaceIndex value.
sprintf(sTemp, "%s%02d.sti", sFaceLoc, gMercProfiles[AimMercArray[i]].ubFaceIndex);
//sprintf(sTemp, "%s%02d.sti", sFaceLoc, gMercProfiles[AimMercArray[i]].ubFaceIndex);
sprintf(sTemp, "%s%02d.sti", sFaceLoc, gMercProfiles[gAimAvailability[AimMercArray[i + START_MERC]].ProfilId].ubFaceIndex);
//sprintf(sTemp, "%s%02d.sti", sFaceLoc, gAimAvailability[AimMercArray[i]].ProfilId);
}
else
{
sprintf(sTemp, "%s%02d.sti", sFaceLoc, AimMercArray[i]);
//sprintf(sTemp, "%s%02d.sti", sFaceLoc, AimMercArray[i]);
sprintf(sTemp, "%s%02d.sti", sFaceLoc, gAimAvailability[AimMercArray[i + START_MERC]].ProfilId );
}
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
FilenameForBPP(sTemp, VObjectDesc.ImageFile);
if( !AddVideoObject(&VObjectDesc, &guiAimFiFace[i]) )
return( FALSE );
}
usPosX += AIM_FI_PORTRAIT_WIDTH + AIM_FI_MUGSHOT_GAP_X;
i++;
}
@@ -144,11 +237,18 @@ void ExitAimFacialIndex()
DeleteVideoObjectFromIndex(guiMugShotBorder);
for(i=0; i<MAX_NUMBER_MERCS; i++)
for(i=0; i<NUM_PROFILES; i++) //MAX_NUMBER_MERCS
{
DeleteVideoObjectFromIndex( guiAimFiFace[i]);
MSYS_RemoveRegion( &gMercFaceMouseRegions[ i ]);
if ( gAimProfiles[i] == TRUE )
{
DeleteVideoObjectFromIndex( guiAimFiFace[i]);
MSYS_RemoveRegion( &gMercFaceMouseRegions[ i ]);
}
}
RemoveButton( PAGE_BUTTON );
ExitAimMenuBar();
MSYS_RemoveRegion( &gScreenMouseRegions);
@@ -166,6 +266,17 @@ BOOLEAN RenderAimFacialIndex()
UINT16 usPosX, usPosY, x,y;
CHAR16 sString[150];
UINT8 i;
SpecifyButtonText( PAGE_BUTTON, GetPageButtonText() );
if ( MAX_NUMBER_MERCS > 40 )
{
ShowButton( PAGE_BUTTON );
}
else
{
HideButton( PAGE_BUTTON );
}
DrawAimDefaults();
@@ -175,21 +286,25 @@ BOOLEAN RenderAimFacialIndex()
else
swprintf(sString, AimFiText[ AIM_FI_AIM_MEMBERS_SORTED_DESCENDING ], AimFiText[gubCurrentSortMode] );
DrawTextToScreen(sString, AIM_FI_MEMBER_TEXT_X, AIM_FI_MEMBER_TEXT_Y, AIM_FI_MEMBER_TEXT_WIDTH, AIM_MAINTITLE_FONT, AIM_MAINTITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
if(gGameExternalOptions.gfUseNewStartingGearInterface) DrawTextToScreen(sString, AIM_FI_MEMBER_TEXT_X, AIM_FI_MEMBER_TEXT_Y_NSGI, AIM_FI_MEMBER_TEXT_WIDTH, AIM_MAINTITLE_FONT, AIM_MAINTITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
else DrawTextToScreen(sString, AIM_FI_MEMBER_TEXT_X, AIM_FI_MEMBER_TEXT_Y, AIM_FI_MEMBER_TEXT_WIDTH, AIM_MAINTITLE_FONT, AIM_MAINTITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
//Draw the mug shot border and face
usPosX = AIM_FI_FIRST_MUGSHOT_X;
usPosY = AIM_FI_FIRST_MUGSHOT_Y;
i=0;
for(y=0; y<AIM_FI_NUM_MUHSHOTS_Y; y++)
for(y=0; y<AIM_FI_NUM_MUGSHOTS_Y; y++)
{
for(x=0; x<AIM_FI_NUM_MUHSHOTS_X; x++)
for(x=0; x<AIM_FI_NUM_MUGSHOTS_X; x++)
{
DrawMercsFaceToScreen(i, usPosX, usPosY, 1);
DrawTextToScreen(gMercProfiles[AimMercArray[i]].zNickname, (UINT16)(usPosX - AIM_FI_NNAME_OFFSET_X), (UINT16)(usPosY + AIM_FI_NNAME_OFFSET_Y), AIM_FI_NNAME_WIDTH, AIM_FONT12ARIAL, AIM_FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
if ( gAimProfiles[i+START_MERC] == TRUE ) //new profiles
{
DrawMercsFaceToScreen(i, usPosX, usPosY, 1);
// DrawTextToScreen(gMercProfiles[AimMercArray[i]].zNickname, (UINT16)(usPosX - AIM_FI_NNAME_OFFSET_X), (UINT16)(usPosY + AIM_FI_NNAME_OFFSET_Y), AIM_FI_NNAME_WIDTH, AIM_FONT12ARIAL, AIM_FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
DrawTextToScreen(gMercProfiles[gAimAvailability[AimMercArray[i+START_MERC]].ProfilId].zNickname, (UINT16)(usPosX - AIM_FI_NNAME_OFFSET_X), (UINT16)(usPosY + AIM_FI_NNAME_OFFSET_Y), AIM_FI_NNAME_WIDTH, AIM_FONT12ARIAL, AIM_FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
}
usPosX += AIM_FI_PORTRAIT_WIDTH + AIM_FI_MUGSHOT_GAP_X;
i++;
}
@@ -200,8 +315,16 @@ BOOLEAN RenderAimFacialIndex()
DisableAimButton();
//display the 'left and right click' onscreen help msg
DrawTextToScreen(AimFiText[AIM_FI_LEFT_CLICK], AIM_FI_LEFT_CLICK_TEXT_X, AIM_FI_LEFT_CLICK_TEXT_Y, AIM_FI_CLICK_TEXT_WIDTH, AIM_FI_HELP_TITLE_FONT, AIM_FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
DrawTextToScreen(AimFiText[AIM_FI_TO_SELECT], AIM_FI_LEFT_CLICK_TEXT_X, AIM_FI_LEFT_CLICK_TEXT_Y+AIM_FI_CLICK_DESC_TEXT_Y_OFFSET, AIM_FI_CLICK_TEXT_WIDTH, AIM_FI_HELP_FONT, AIM_FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
if(gGameExternalOptions.gfUseNewStartingGearInterface)
{
DrawTextToScreen(AimFiText[AIM_FI_LEFT_CLICK], AIM_FI_LEFT_CLICK_TEXT_X_NSGI, AIM_FI_LEFT_CLICK_TEXT_Y_NSGI, AIM_FI_CLICK_TEXT_WIDTH, AIM_FI_HELP_TITLE_FONT, AIM_FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
DrawTextToScreen(AimFiText[AIM_FI_TO_SELECT], AIM_FI_LEFT_CLICK_TEXT_X_NSGI, AIM_FI_LEFT_CLICK_TEXT_Y_NSGI+AIM_FI_CLICK_DESC_TEXT_Y_OFFSET, AIM_FI_CLICK_TEXT_WIDTH, AIM_FI_HELP_FONT, AIM_FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
}
else
{
DrawTextToScreen(AimFiText[AIM_FI_LEFT_CLICK], AIM_FI_LEFT_CLICK_TEXT_X, AIM_FI_LEFT_CLICK_TEXT_Y, AIM_FI_CLICK_TEXT_WIDTH, AIM_FI_HELP_TITLE_FONT, AIM_FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
DrawTextToScreen(AimFiText[AIM_FI_TO_SELECT], AIM_FI_LEFT_CLICK_TEXT_X, AIM_FI_LEFT_CLICK_TEXT_Y+AIM_FI_CLICK_DESC_TEXT_Y_OFFSET, AIM_FI_CLICK_TEXT_WIDTH, AIM_FI_HELP_FONT, AIM_FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
}
DrawTextToScreen(AimFiText[AIM_FI_RIGHT_CLICK], AIM_FI_RIGHT_CLICK_TEXT_X, AIM_FI_LEFT_CLICK_TEXT_Y, AIM_FI_CLICK_TEXT_WIDTH, AIM_FI_HELP_TITLE_FONT, AIM_FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
DrawTextToScreen(AimFiText[AIM_FI_TO_ENTER_SORT_PAGE], AIM_FI_RIGHT_CLICK_TEXT_X, AIM_FI_LEFT_CLICK_TEXT_Y+AIM_FI_CLICK_DESC_TEXT_Y_OFFSET, AIM_FI_CLICK_TEXT_WIDTH, AIM_FI_HELP_FONT, AIM_FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
@@ -222,7 +345,7 @@ void SelectMercFaceRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
else if(iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
{
guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS;
gbCurrentIndex = (UINT8) MSYS_GetRegionUserData( pRegion, 0 );
gbCurrentIndex = (UINT8) MSYS_GetRegionUserData( pRegion, 0 ) + START_MERC;
}
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
{
@@ -257,14 +380,15 @@ void SelectMercFaceMoveRegionCallBack(MOUSE_REGION * pRegion, INT32 reason )
tx1 = AIM_FI_FIRST_MUGSHOT_X;
tx2 = (AIM_FI_PORTRAIT_WIDTH + AIM_FI_MUGSHOT_GAP_X);
usPosY = ubMercNum / AIM_FI_NUM_MUHSHOTS_X;
usPosY = ubMercNum / AIM_FI_NUM_MUGSHOTS_X;
usPosY = AIM_FI_FIRST_MUGSHOT_Y + (AIM_FI_PORTRAIT_HEIGHT + AIM_FI_MUGSHOT_GAP_Y) * usPosY;
usPosX = ubMercNum % AIM_FI_NUM_MUHSHOTS_X;
usPosX = ubMercNum % AIM_FI_NUM_MUGSHOTS_X;
usPosX = AIM_FI_FIRST_MUGSHOT_X + (AIM_FI_PORTRAIT_WIDTH + AIM_FI_MUGSHOT_GAP_X) * usPosX;
// fReDrawNewMailFlag = TRUE;
if ( gAimProfiles[ubMercNum + START_MERC] == TRUE ) //new profiles
{
if( reason & MSYS_CALLBACK_REASON_LOST_MOUSE )
{
pRegion->uiFlags &= (~BUTTON_CLICKED_ON );
@@ -277,6 +401,8 @@ void SelectMercFaceMoveRegionCallBack(MOUSE_REGION * pRegion, INT32 reason )
DrawMercsFaceToScreen(ubMercNum, usPosX, usPosY, 0);
InvalidateRegion(pRegion->RegionTopLeftX, pRegion->RegionTopLeftY, pRegion->RegionBottomRightX, pRegion->RegionBottomRightY);
}
}
}
BOOLEAN DrawMercsFaceToScreen(UINT8 ubMercID, UINT16 usPosX, UINT16 usPosY, UINT8 ubImage)
@@ -285,7 +411,10 @@ BOOLEAN DrawMercsFaceToScreen(UINT8 ubMercID, UINT16 usPosX, UINT16 usPosY, UINT
HVOBJECT hFaceHandle;
SOLDIERTYPE *pSoldier=NULL;
pSoldier = FindSoldierByProfileID( AimMercArray[ubMercID], TRUE );
//pSoldier = FindSoldierByProfileID( AimMercArray[ubMercID], TRUE );
pSoldier = FindSoldierByProfileID( gAimAvailability[AimMercArray[ubMercID + START_MERC]].ProfilId, TRUE );
//Blt the portrait background
@@ -296,7 +425,8 @@ BOOLEAN DrawMercsFaceToScreen(UINT8 ubMercID, UINT16 usPosX, UINT16 usPosY, UINT
GetVideoObject(&hFaceHandle, guiAimFiFace[ubMercID]);
BltVideoObject(FRAME_BUFFER, hFaceHandle, 0,usPosX+AIM_FI_FACE_OFFSET, usPosY+AIM_FI_FACE_OFFSET, VO_BLT_SRCTRANSPARENCY,NULL);
if( IsMercDead( AimMercArray[ubMercID] ) )
//if( IsMercDead( AimMercArray[ubMercID] ) )
if( IsMercDead( gAimAvailability[AimMercArray[ubMercID + START_MERC]].ProfilId ) )
{
//get the face object
GetVideoObject(&hFaceHandle, guiAimFiFace[ubMercID]);
@@ -315,7 +445,8 @@ BOOLEAN DrawMercsFaceToScreen(UINT8 ubMercID, UINT16 usPosX, UINT16 usPosY, UINT
}
//else if the merc is currently a POW or, the merc was fired as a pow
else if( gMercProfiles[ AimMercArray[ubMercID] ].bMercStatus == MERC_FIRED_AS_A_POW || ( pSoldier && pSoldier->bAssignment == ASSIGNMENT_POW ) )
//else if( gMercProfiles[ AimMercArray[ubMercID] ].bMercStatus == MERC_FIRED_AS_A_POW || ( pSoldier && pSoldier->bAssignment == ASSIGNMENT_POW ) )
else if( gMercProfiles[ gAimAvailability[AimMercArray[ubMercID + START_MERC]].ProfilId ].bMercStatus == MERC_FIRED_AS_A_POW || ( pSoldier && pSoldier->bAssignment == ASSIGNMENT_POW ) )
{
ShadowVideoSurfaceRect( FRAME_BUFFER, usPosX+AIM_FI_FACE_OFFSET, usPosY+AIM_FI_FACE_OFFSET, usPosX + 48+AIM_FI_FACE_OFFSET, usPosY + 43+AIM_FI_FACE_OFFSET);
DrawTextToScreen( pPOWStrings[0], (UINT16)(usPosX+AIM_FI_AWAY_TEXT_OFFSET_X), (UINT16)(usPosY+AIM_FI_AWAY_TEXT_OFFSET_Y), AIM_FI_AWAY_TEXT_OFFSET_WIDTH, FONT10ARIAL, 145, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
@@ -329,7 +460,8 @@ BOOLEAN DrawMercsFaceToScreen(UINT8 ubMercID, UINT16 usPosX, UINT16 usPosY, UINT
}
//if the merc is away, shadow his/her face and blit 'away' over top
else if( !IsMercHireable( AimMercArray[ubMercID] ) )
//else if( !IsMercHireable( AimMercArray[ubMercID] ) )
else if( !IsMercHireable( gAimAvailability[AimMercArray[ubMercID + START_MERC ]].ProfilId ) )
{
ShadowVideoSurfaceRect( FRAME_BUFFER, usPosX+AIM_FI_FACE_OFFSET, usPosY+AIM_FI_FACE_OFFSET, usPosX + 48+AIM_FI_FACE_OFFSET, usPosY + 43+AIM_FI_FACE_OFFSET);
DrawTextToScreen( AimFiText[AIM_FI_DEAD+1], (UINT16)(usPosX+AIM_FI_AWAY_TEXT_OFFSET_X), (UINT16)(usPosY+AIM_FI_AWAY_TEXT_OFFSET_Y), AIM_FI_AWAY_TEXT_OFFSET_WIDTH, FONT10ARIAL, 145, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
+7
View File
@@ -4,6 +4,11 @@
#define AIM_FI_LEFT_CLICK_TEXT_X (SCREEN_WIDTH - 640) / 2 + 116
#define AIM_FI_LEFT_CLICK_TEXT_Y (SCREEN_HEIGHT - 480) / 2 + 35 + LAPTOP_SCREEN_WEB_DELTA_Y
//tais: nsgi, left click text moved a bit to create space for small logo
#define AIM_FI_LEFT_CLICK_TEXT_X_NSGI (SCREEN_WIDTH - 640) / 2 + 200
#define AIM_FI_LEFT_CLICK_TEXT_Y_NSGI (SCREEN_HEIGHT - 480) / 2 + 35 + LAPTOP_SCREEN_WEB_DELTA_Y
#define AIM_FI_CLICK_DESC_TEXT_Y_OFFSET 16
#define AIM_FI_RIGHT_CLICK_TEXT_X (SCREEN_WIDTH - 640) / 2 + 500
@@ -22,6 +27,8 @@ BOOLEAN RenderAimFacialIndex();
BOOLEAN DisplayAimFIMugShot();
extern UINT8 START_MERC;
#endif
+85 -34
View File
@@ -11,7 +11,7 @@
#include "Text.h"
#endif
#include "LocalizedStrings.h"
// Defines
@@ -171,7 +171,6 @@ void HandleAimHistory()
void RenderAimHistory()
{
CHAR16 sText[400];
UINT32 uiStartLoc=0;
UINT16 usPosY;
DrawAimDefaults();
@@ -210,8 +209,15 @@ void RenderAimHistory()
// display coloniel Mohanned...
usPosY = AIM_HISTORY_PARAGRAPH_Y + (GetFontHeight(AIM_HISTORY_TEXT_FONT) + 2)* 5 + LAPTOP_SCREEN_WEB_DELTA_Y;
uiStartLoc = AIM_HISTORY_LINE_SIZE * COLONEL_MOHANNED;
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
if(!g_bUseXML_Strings)
{
UINT32 uiStartLoc = AIM_HISTORY_LINE_SIZE * COLONEL_MOHANNED;
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
}
else
{
Loc::GetString(Loc::AIM_HISTORY, L"Line", COLONEL_MOHANNED, sText, 400);
}
DisplayWrappedString(AIM_HISTORY_PARAGRAPH_X, iScreenHeightOffset + 210+LAPTOP_SCREEN_WEB_DELTA_Y, AIM_HISTORY_PARAGRAPH_WIDTH, 2, AIM_HISTORY_TEXT_FONT, AIM_HISTORY_TEXT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
break;
@@ -220,13 +226,27 @@ void RenderAimHistory()
DisplayAimHistoryParagraph(INCORPORATION, 2);
// display dunn and bradbord...
uiStartLoc = AIM_HISTORY_LINE_SIZE * DUNN_AND_BRADROAD;
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
if(!g_bUseXML_Strings)
{
UINT32 uiStartLoc = AIM_HISTORY_LINE_SIZE * DUNN_AND_BRADROAD;
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
}
else
{
Loc::GetString(Loc::AIM_HISTORY, L"Line", DUNN_AND_BRADROAD, sText, 400);
}
DisplayWrappedString(AIM_HISTORY_PARAGRAPH_X, iScreenHeightOffset + 270+LAPTOP_SCREEN_WEB_DELTA_Y, AIM_HISTORY_PARAGRAPH_WIDTH, 2, AIM_HISTORY_TEXT_FONT, AIM_HISTORY_TEXT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
//AIM_HISTORY_PARAGRAPH_Y
uiStartLoc = AIM_HISTORY_LINE_SIZE * INCORPORATION_3;
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
if(!g_bUseXML_Strings)
{
UINT32 uiStartLoc = AIM_HISTORY_LINE_SIZE * INCORPORATION_3;
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
}
else
{
Loc::GetString(Loc::AIM_HISTORY, L"Line", INCORPORATION_3, sText, 400);
}
DisplayWrappedString(AIM_HISTORY_PARAGRAPH_X, iScreenHeightOffset + 290+LAPTOP_SCREEN_WEB_DELTA_Y, AIM_HISTORY_PARAGRAPH_WIDTH, 2, AIM_HISTORY_TEXT_FONT, AIM_HISTORY_TEXT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
break;
}
@@ -360,21 +380,34 @@ void SelectHistoryMenuButtonsRegionCallBack(MOUSE_REGION * pRegion, INT32 iReaso
BOOLEAN DisplayAimHistoryParagraph(UINT8 ubPageNum, UINT8 ubNumParagraphs)
{
CHAR16 sText[400];
UINT32 uiStartLoc=0;
UINT16 usPosY=0;
UINT16 usNumPixels=0;
//title
uiStartLoc = AIM_HISTORY_LINE_SIZE * ubPageNum;
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
if(!g_bUseXML_Strings)
{
UINT32 uiStartLoc = AIM_HISTORY_LINE_SIZE * ubPageNum;
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
}
else
{
Loc::GetString(Loc::AIM_HISTORY, L"Line", ubPageNum, sText, 400);
}
DrawTextToScreen(sText, AIM_HISTORY_PARAGRAPH_X, AIM_HISTORY_SUBTITLE_Y, 0, AIM_HISTORY_PARAGRAPH_TITLE_FONT, AIM_HISTORY_PARAGRAPH_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
if(ubNumParagraphs >= 1)
{
usPosY = AIM_HISTORY_PARAGRAPH_Y;
//1st paragraph
uiStartLoc = AIM_HISTORY_LINE_SIZE * (ubPageNum + 1 );
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
if(!g_bUseXML_Strings)
{
UINT32 uiStartLoc = AIM_HISTORY_LINE_SIZE * (ubPageNum + 1 );
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
}
else
{
Loc::GetString(Loc::AIM_HISTORY, L"Line", ubPageNum+1, sText, 400);
}
usNumPixels = DisplayWrappedString(AIM_HISTORY_PARAGRAPH_X, usPosY, AIM_HISTORY_PARAGRAPH_WIDTH, 2, AIM_HISTORY_TEXT_FONT, AIM_HISTORY_TEXT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
}
@@ -382,8 +415,15 @@ BOOLEAN DisplayAimHistoryParagraph(UINT8 ubPageNum, UINT8 ubNumParagraphs)
{
//2nd paragraph
usPosY += usNumPixels + AIM_HISTORY_SPACE_BETWEEN_PARAGRAPHS;
uiStartLoc = AIM_HISTORY_LINE_SIZE * (ubPageNum + 2 );
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
if(!g_bUseXML_Strings)
{
UINT32 uiStartLoc = AIM_HISTORY_LINE_SIZE * (ubPageNum + 2 );
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
}
else
{
Loc::GetString(Loc::AIM_HISTORY, L"Line", ubPageNum+2, sText, 400);
}
DisplayWrappedString(AIM_HISTORY_PARAGRAPH_X, usPosY, AIM_HISTORY_PARAGRAPH_WIDTH, 2, AIM_HISTORY_TEXT_FONT, AIM_HISTORY_TEXT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
}
@@ -391,9 +431,15 @@ BOOLEAN DisplayAimHistoryParagraph(UINT8 ubPageNum, UINT8 ubNumParagraphs)
{
//3rd paragraph
usPosY += usNumPixels + AIM_HISTORY_SPACE_BETWEEN_PARAGRAPHS;
uiStartLoc = AIM_HISTORY_LINE_SIZE * (ubPageNum + 3 );
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
if(!g_bUseXML_Strings)
{
UINT32 uiStartLoc = AIM_HISTORY_LINE_SIZE * (ubPageNum + 3 );
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
}
else
{
Loc::GetString(Loc::AIM_HISTORY, L"Line", ubPageNum+3, sText, 400);
}
DisplayWrappedString(AIM_HISTORY_PARAGRAPH_X, usPosY, AIM_HISTORY_PARAGRAPH_WIDTH, 2, AIM_HISTORY_TEXT_FONT, AIM_HISTORY_TEXT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
}
@@ -404,19 +450,18 @@ BOOLEAN DisplayAimHistoryParagraph(UINT8 ubPageNum, UINT8 ubNumParagraphs)
BOOLEAN InitTocMenu()
{
UINT16 i, usPosY;
UINT16 usHeight;
UINT16 usWidth=0;
UINT32 uiStartLoc=0;
CHAR16 sText[400];
UINT8 ubLocInFile[]=
{IN_THE_BEGINNING,
THE_ISLAND_METAVIRA,
GUS_TARBALLS,
WORD_FROM_FOUNDER,
INCORPORATION};
UINT16 i, usPosY;
UINT16 usHeight;
UINT16 usWidth=0;
CHAR16 sText[400];
UINT8 ubLocInFile[] = {
IN_THE_BEGINNING,
THE_ISLAND_METAVIRA,
GUS_TARBALLS,
WORD_FROM_FOUNDER,
INCORPORATION};
HVOBJECT hContentButtonHandle;
HVOBJECT hContentButtonHandle;
GetVideoObject(&hContentButtonHandle, guiContentButton);
@@ -424,9 +469,15 @@ BOOLEAN InitTocMenu()
usPosY = AIM_HISTORY_CONTENTBUTTON_Y;
for(i=0; i<NUM_AIM_HISTORY_PAGES; i++)
{
uiStartLoc = AIM_HISTORY_LINE_SIZE * ubLocInFile[i];
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
if(!g_bUseXML_Strings)
{
UINT32 uiStartLoc = AIM_HISTORY_LINE_SIZE * ubLocInFile[i];
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
}
else
{
Loc::GetString(Loc::AIM_HISTORY, L"Line", ubLocInFile[i], sText, 400);
}
usWidth = StringPixLength(sText, AIM_HISTORY_TOC_TEXT_FONT);
//if the mouse regions havent been inited, init them
@@ -439,7 +490,7 @@ BOOLEAN InitTocMenu()
MSYS_SetRegionUserData( &gSelectedHistoryTocMenuRegion[i], 0, i+1);
}
BltVideoObject(FRAME_BUFFER, hContentButtonHandle, 0,AIM_HISTORY_TOC_X, usPosY, VO_BLT_SRCTRANSPARENCY,NULL);
BltVideoObject(FRAME_BUFFER, hContentButtonHandle, 0,AIM_HISTORY_TOC_X, usPosY, VO_BLT_SRCTRANSPARENCY,NULL);
DrawTextToScreen(sText, AIM_HISTORY_TOC_X, (UINT16)(usPosY + AIM_HISTORY_TOC_Y), AIM_CONTENTBUTTON_WIDTH, AIM_HISTORY_TOC_TEXT_FONT, AIM_HISTORY_TOC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
+1307 -330
View File
File diff suppressed because it is too large Load Diff
+87 -43
View File
@@ -9,8 +9,11 @@
#include "WordWrap.h"
#include "Encrypted File.h"
#include "Text.h"
#include "GameSettings.h"
#endif
#include "LocalizedStrings.h"
#define NUM_AIM_POLICY_PAGES 11
#define NUM_AIM_POLICY_TOC_BUTTONS 9
#define AIMPOLICYFILE "BINARYDATA\\AimPol.edt"
@@ -38,6 +41,9 @@
#define AIM_POLICY_TITLE_Y AIM_SYMBOL_Y + AIM_SYMBOL_SIZE_Y + 11
#define AIM_POLICY_TITLE_WIDTH AIM_SYMBOL_WIDTH
//tais: nsgi, move title up
#define AIM_POLICY_TITLE_Y_NSGI AIM_SYMBOL_Y + 35
#define AIM_POLICY_TITLE_STATEMENT_WIDTH 300
#define AIM_POLICY_TITLE_STATEMENT_X IMAGE_OFFSET_X + (500 - AIM_POLICY_TITLE_STATEMENT_WIDTH) / 2 +5//80
#define AIM_POLICY_TITLE_STATEMENT_Y AIM_SYMBOL_Y + AIM_SYMBOL_SIZE_Y + 75
@@ -456,21 +462,20 @@ BOOLEAN ExitAimPolicyMenuBar(void)
BOOLEAN DrawAimPolicyMenu()
{
UINT16 i, usPosY;
UINT16 usHeight;
UINT32 uiStartLoc=0;
CHAR16 sText[400];
HVOBJECT hContentButtonHandle;
UINT8 ubLocInFile[]=
{ DEFINITIONS,
LENGTH_OF_ENGAGEMENT,
LOCATION_0F_ENGAGEMENT,
CONTRACT_EXTENSIONS,
TERMS_OF_PAYMENT,
TERMS_OF_ENGAGEMENT,
ENGAGEMENT_TERMINATION,
EQUIPMENT_AND_INVENTORY,
POLICY_MEDICAL};
UINT16 i, usPosY;
UINT16 usHeight;
CHAR16 sText[400];
HVOBJECT hContentButtonHandle;
UINT8 ubLocInFile[]= {
DEFINITIONS,
LENGTH_OF_ENGAGEMENT,
LOCATION_0F_ENGAGEMENT,
CONTRACT_EXTENSIONS,
TERMS_OF_PAYMENT,
TERMS_OF_ENGAGEMENT,
ENGAGEMENT_TERMINATION,
EQUIPMENT_AND_INVENTORY,
POLICY_MEDICAL};
GetVideoObject(&hContentButtonHandle, guiContentButton);
@@ -478,10 +483,16 @@ BOOLEAN DrawAimPolicyMenu()
usPosY = AIM_POLICY_TOC_Y;
for(i=0; i<NUM_AIM_POLICY_TOC_BUTTONS; i++)
{
BltVideoObject(FRAME_BUFFER, hContentButtonHandle, 0,AIM_POLICY_TOC_X, usPosY, VO_BLT_SRCTRANSPARENCY,NULL);
uiStartLoc = AIM_POLICY_LINE_SIZE * ubLocInFile[i];
LoadEncryptedDataFromFile(AIMPOLICYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
BltVideoObject(FRAME_BUFFER, hContentButtonHandle, 0,AIM_POLICY_TOC_X, usPosY, VO_BLT_SRCTRANSPARENCY,NULL);
if(!g_bUseXML_Strings)
{
UINT32 uiStartLoc = AIM_POLICY_LINE_SIZE * ubLocInFile[i];
LoadEncryptedDataFromFile(AIMPOLICYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
}
else
{
Loc::GetString(Loc::AIM_POLICY, L"Line", ubLocInFile[i], sText, 400);
}
DrawTextToScreen(sText, AIM_POLICY_TOC_X + AIM_POLICY_TOC_TEXT_OFFSET_X, (UINT16)(usPosY + AIM_POLICY_TOC_TEXT_OFFSET_Y), AIM_CONTENTBUTTON_WIDTH, AIM_POLICY_TOC_FONT, AIM_POLICY_TOC_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
usPosY += AIM_POLICY_TOC_GAP_Y;
@@ -557,17 +568,23 @@ void SelectPolicyTocMenuRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
BOOLEAN DisplayAimPolicyTitleText(void)
{
CHAR16 sText[400];
UINT32 uiStartLoc = 0;
//Load anfd display title
uiStartLoc = AIM_POLICY_LINE_SIZE * AIM_STATEMENT_OF_POLICY;
LoadEncryptedDataFromFile(AIMPOLICYFILE, sText, uiStartLoc, AIM_POLICY_LINE_SIZE);
if(!g_bUseXML_Strings)
{
UINT32 uiStartLoc = AIM_POLICY_LINE_SIZE * AIM_STATEMENT_OF_POLICY;
LoadEncryptedDataFromFile(AIMPOLICYFILE, sText, uiStartLoc, AIM_POLICY_LINE_SIZE);
}
else
{
Loc::GetString(Loc::AIM_POLICY, L"Line", AIM_STATEMENT_OF_POLICY);
}
if(gubCurPageNum == 0)
DrawTextToScreen(sText, AIM_POLICY_TITLE_X, AIM_POLICY_TITLE_STATEMENT_Y-25, AIM_POLICY_TITLE_WIDTH, AIM_POLICY_TITLE_FONT, AIM_POLICY_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
else
DrawTextToScreen(sText, AIM_POLICY_TITLE_X, AIM_POLICY_TITLE_Y, AIM_POLICY_TITLE_WIDTH, AIM_POLICY_TITLE_FONT, AIM_POLICY_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
if(gGameExternalOptions.gfUseNewStartingGearInterface) DrawTextToScreen(sText, AIM_POLICY_TITLE_X, AIM_POLICY_TITLE_Y_NSGI, AIM_POLICY_TITLE_WIDTH, AIM_POLICY_TITLE_FONT, AIM_POLICY_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
else DrawTextToScreen(sText, AIM_POLICY_TITLE_X, AIM_POLICY_TITLE_Y, AIM_POLICY_TITLE_WIDTH, AIM_POLICY_TITLE_FONT, AIM_POLICY_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
return(TRUE);
}
@@ -575,17 +592,30 @@ BOOLEAN DisplayAimPolicyTitleText(void)
BOOLEAN DisplayAimPolicyStatement(void)
{
CHAR16 sText[400];
UINT32 uiStartLoc = 0;
UINT16 usNumPixels;
//load and display the statment of policies
uiStartLoc = AIM_POLICY_LINE_SIZE * AIM_STATEMENT_OF_POLICY_1;
LoadEncryptedDataFromFile(AIMPOLICYFILE, sText, uiStartLoc, AIM_POLICY_LINE_SIZE);
if(!g_bUseXML_Strings)
{
UINT32 uiStartLoc = AIM_POLICY_LINE_SIZE * AIM_STATEMENT_OF_POLICY_1;
LoadEncryptedDataFromFile(AIMPOLICYFILE, sText, uiStartLoc, AIM_POLICY_LINE_SIZE);
}
else
{
Loc::GetString(Loc::AIM_POLICY, L"Line", AIM_STATEMENT_OF_POLICY_1, sText, 400);
}
usNumPixels = DisplayWrappedString(AIM_POLICY_TITLE_STATEMENT_X, AIM_POLICY_TITLE_STATEMENT_Y, AIM_POLICY_TITLE_STATEMENT_WIDTH, 2, AIM_POLICY_TEXT_FONT, AIM_POLICY_TEXT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
//load and display the statment of policies
uiStartLoc = AIM_POLICY_LINE_SIZE * AIM_STATEMENT_OF_POLICY_2;
LoadEncryptedDataFromFile(AIMPOLICYFILE, sText, uiStartLoc, AIM_POLICY_LINE_SIZE);
if(!g_bUseXML_Strings)
{
UINT32 uiStartLoc = AIM_POLICY_LINE_SIZE * AIM_STATEMENT_OF_POLICY_2;
LoadEncryptedDataFromFile(AIMPOLICYFILE, sText, uiStartLoc, AIM_POLICY_LINE_SIZE);
}
else
{
Loc::GetString(Loc::AIM_POLICY, L"Line", AIM_STATEMENT_OF_POLICY_2, sText, 400);
}
DisplayWrappedString(AIM_POLICY_TITLE_STATEMENT_X, (UINT16)(AIM_POLICY_TITLE_STATEMENT_Y + usNumPixels+15), AIM_POLICY_TITLE_STATEMENT_WIDTH, 2, AIM_POLICY_TEXT_FONT, AIM_POLICY_TEXT_COLOR, sText, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
return(TRUE);
@@ -650,11 +680,17 @@ BOOLEAN ExitAgreementButton(void)
BOOLEAN DisplayAimPolicyTitle(UINT16 usPosY, UINT8 ubPageNum, FLOAT fNumber)
{
CHAR16 sText[400];
UINT32 uiStartLoc = 0;
//Load and display title
uiStartLoc = AIM_POLICY_LINE_SIZE * ubPageNum;
LoadEncryptedDataFromFile(AIMPOLICYFILE, sText, uiStartLoc, AIM_POLICY_LINE_SIZE);
if(!g_bUseXML_Strings)
{
UINT32 uiStartLoc = AIM_POLICY_LINE_SIZE * ubPageNum;
LoadEncryptedDataFromFile(AIMPOLICYFILE, sText, uiStartLoc, AIM_POLICY_LINE_SIZE);
}
else
{
Loc::GetString(Loc::AIM_POLICY,L"Line", ubPageNum, sText, 400);
}
DrawTextToScreen(sText, AIM_POLICY_SUBTITLE_NUMBER, usPosY, 0, AIM_POLICY_SUBTITLE_FONT, AIM_POLICY_SUBTITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
return(TRUE);
@@ -665,12 +701,16 @@ UINT16 DisplayAimPolicyParagraph(UINT16 usPosY, UINT8 ubPageNum, FLOAT fNumber)
{
CHAR16 sText[400];
CHAR16 sTemp[20];
UINT32 uiStartLoc=0;
UINT16 usNumPixels;
uiStartLoc = AIM_POLICY_LINE_SIZE * ubPageNum;
LoadEncryptedDataFromFile(AIMPOLICYFILE, sText, uiStartLoc, AIM_POLICY_LINE_SIZE);
if(!g_bUseXML_Strings)
{
UINT32 uiStartLoc = AIM_POLICY_LINE_SIZE * ubPageNum;
LoadEncryptedDataFromFile(AIMPOLICYFILE, sText, uiStartLoc, AIM_POLICY_LINE_SIZE);
}
else
{
Loc::GetString(Loc::AIM_POLICY, L"Line", ubPageNum, sText, 400);
}
if(fNumber != 0.0)
{
//Display the section number
@@ -688,12 +728,16 @@ UINT16 DisplayAimPolicySubParagraph(UINT16 usPosY, UINT8 ubPageNum, FLOAT fNumbe
{
CHAR16 sText[400];
CHAR16 sTemp[20];
UINT32 uiStartLoc=0;
UINT16 usNumPixels;
uiStartLoc = AIM_POLICY_LINE_SIZE * ubPageNum;
LoadEncryptedDataFromFile(AIMPOLICYFILE, sText, uiStartLoc, AIM_POLICY_LINE_SIZE);
if(!g_bUseXML_Strings)
{
UINT32 uiStartLoc = AIM_POLICY_LINE_SIZE * ubPageNum;
LoadEncryptedDataFromFile(AIMPOLICYFILE, sText, uiStartLoc, AIM_POLICY_LINE_SIZE);
}
else
{
Loc::GetString(Loc::AIM_POLICY, L"Line", ubPageNum, sText, 400);
}
//Display the section number
swprintf(sTemp, L"%2.2f", fNumber);
DrawTextToScreen(sTemp, AIM_POLICY_SUBPARAGRAPH_NUMBER, usPosY, 0, AIM_POLICY_TEXT_FONT, AIM_POLICY_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
-6
View File
@@ -174,7 +174,6 @@ BOOLEAN EnterAimSort()
VOBJECT_DESC VObjectDesc;
UINT8 ubCurNumber=0;
UINT16 ubWidth;
UINT8 i;
AimSortCheckBoxLoc[0] = AIM_SORT_SORT_BY_X + 9;
AimSortCheckBoxLoc[1] = AIM_SORT_SORT_BY_Y + 34;
@@ -193,11 +192,6 @@ BOOLEAN EnterAimSort()
AimSortCheckBoxLoc[14] = AIM_SORT_SORT_BY_X + 172;
AimSortCheckBoxLoc[15] = AIM_SORT_SORT_BY_Y + 17;
//Everytime into Aim Sort, reset array.
for(i=0; i<MAX_NUMBER_MERCS; i++)
{
AimMercArray[i] = i;
}
InitAimDefaults();
+136 -32
View File
@@ -21,6 +21,8 @@
#include "GameSettings.h"
#include "Points.h"
#include "Multi Language Graphic Utils.h"
// HEADROCK HAM 4
#include "input.h"
#endif
@@ -308,10 +310,12 @@ UINT16 DisplayLBEInfo(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
UINT16 DisplayWeight(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
UINT16 DisplayCaliber(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
void CreateMouseRegionForBigImage(UINT16 usPosY, UINT8 ubCount, INT16 *pItemNumbers );
void PurchaseBobbyRayItem(UINT16 usItemNumber);
// HEADROCK HAM 4: Now can purchase ALL items available.
void PurchaseBobbyRayItem(UINT16 usItemNumber, BOOLEAN fAllItems );
UINT8 CheckIfItemIsPurchased(UINT16 usItemNumber);
UINT8 GetNextPurchaseNumber();
void UnPurchaseBobbyRayItem(UINT16 usItemNumber);
// HEADROCK HAM 4: Now can purchase ALL items available.
void UnPurchaseBobbyRayItem(UINT16 usItemNumber, BOOLEAN fAllItems );
UINT32 CalculateTotalPurchasePrice();
void DisableBobbyRButtons();
void CalcFirstIndexForPage( STORE_INVENTORY *pInv, UINT32 uiItemClass );
@@ -1285,17 +1289,40 @@ void BtnBobbyRNextPreviousPageCallback(GUI_BUTTON *btn,INT32 reason)
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
///////////////////////////////////////////////////////////////////////////////
// HEADROCK HAM 4: Added ability to scroll forward 5 pages instead of one.
// This is done by holding down SHIFT while clicking.
//
//if previous screen
if( bNewValue == BOBBYR_PREVIOUS_PAGE)
{
if( gubCurPage > 0 )
gubCurPage--;
{
if (_KeyDown( 16 ) ) // SHIFT
{
gubCurPage = __max(gubCurPage - 5, 0);
}
else
{
gubCurPage--;
}
}
}
//else next screen
else
{
if( gubCurPage < gubNumPages-1 )
gubCurPage++;
{
if (_KeyDown( 16 ) ) // SHIFT
{
gubCurPage = __min(gubNumPages, gubCurPage+5);
}
else
{
gubCurPage++;
}
}
}
@@ -1736,10 +1763,11 @@ BOOLEAN DisplayAmmoInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16
BOOLEAN DisplayBigItemImage(UINT16 usIndex, UINT16 PosY)
{
INT16 PosX, sCenX, sCenY;
UINT32 usHeight, usWidth;
INT16 PosX, sCenX, sCenY;
UINT32 usHeight, usWidth;
INT32 sOffsetX, sOffsetY;
ETRLEObject *pTrav;
INVTYPE *pItem;
INVTYPE *pItem;
UINT32 uiImage;
HVOBJECT hPixHandle;
@@ -1749,20 +1777,43 @@ BOOLEAN DisplayBigItemImage(UINT16 usIndex, UINT16 PosY)
LoadTileGraphicForItem(pItem, &uiImage);
GetVideoObject(&hPixHandle, uiImage);
pTrav = &(hPixHandle->pETRLEObject[0]);
//center picture in frame
usHeight = (UINT32)pTrav->usHeight;
usWidth = (UINT32)pTrav->usWidth;
if(hPixHandle->ubBitDepth == 8)
{
pTrav = &(hPixHandle->pETRLEObject[ 0 ] );
//center picture in frame
usHeight = (UINT32)pTrav->usHeight;
usWidth = (UINT32)pTrav->usWidth;
sOffsetX = (INT32)pTrav->sOffsetX;
sOffsetY = (INT32)pTrav->sOffsetY;
}
else if(hPixHandle->ubBitDepth == 16 && hPixHandle->p16BPPObject)
{
usHeight = hPixHandle->p16BPPObject->usHeight;
usWidth = hPixHandle->p16BPPObject->usWidth;
sOffsetX = hPixHandle->p16BPPObject->sOffsetX;
sOffsetY = hPixHandle->p16BPPObject->sOffsetY;
}
else if(hPixHandle->ubBitDepth == 32)
{
usHeight = hPixHandle->p16BPPObject->usHeight;
usWidth = hPixHandle->p16BPPObject->usWidth;
sOffsetX = hPixHandle->p16BPPObject->sOffsetX;
sOffsetY = hPixHandle->p16BPPObject->sOffsetY;
}
// sCenX = PosX + ( abs( BOBBYR_GRID_PIC_WIDTH - usWidth ) / 2 );
// sCenY = PosY + 8;
sCenX = PosX + ( abs( BOBBYR_GRID_PIC_WIDTH - usWidth ) / 2 ) - pTrav->sOffsetX;
sCenX = PosX + ( abs( BOBBYR_GRID_PIC_WIDTH - (int)usWidth ) / 2 ) - sOffsetX;
sCenY = PosY + 8;
//blt the shadow of the item
if(gGameSettings.fOptions[ TOPTION_SHOW_ITEM_SHADOW ]) BltVideoObjectOutlineShadowFromIndex( FRAME_BUFFER, uiImage, 0, sCenX-2, sCenY+2);//pItem->ubGraphicNum
if(gGameSettings.fOptions[ TOPTION_SHOW_ITEM_SHADOW ])
{
BltVideoObjectOutlineShadowFromIndex( FRAME_BUFFER, uiImage, 0, sCenX-2, sCenY+2);//pItem->ubGraphicNum
}
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, sCenX, sCenY, VO_BLT_SRCTRANSPARENCY,NULL);
DeleteVideoObjectFromIndex(uiImage);
@@ -1923,9 +1974,13 @@ UINT16 DisplayDamage(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
UINT16 DisplayRange(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
{
CHAR16 sTemp[20];
UINT16 gunRange = 0;
DrawTextToScreen(BobbyRText[BOBBYR_GUNS_RANGE], BOBBYR_ITEM_WEIGHT_TEXT_X, (UINT16)usPosY, 0, BOBBYR_ITEM_DESC_TEXT_FONT, BOBBYR_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
swprintf(sTemp, L"%3d %s", Weapon[ usIndex ].usRange, pMessageStrings[ MSG_METER_ABBREVIATION ] );
gunRange = (UINT16)GetModifiedGunRange( usIndex);
swprintf(sTemp, L"%3d %s", gunRange, pMessageStrings[ MSG_METER_ABBREVIATION ] );
DrawTextToScreen(sTemp, BOBBYR_ITEM_WEIGHT_NUM_X, (UINT16)usPosY, BOBBYR_ITEM_WEIGHT_NUM_WIDTH, BOBBYR_ITEM_DESC_TEXT_FONT, BOBBYR_ITEM_DESC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
usPosY += usFontHeight + 2;
return(usPosY);
@@ -2417,6 +2472,7 @@ void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNum
//UINT16 gunDamage = (UINT16)( Weapon[ pItemNumbers[ i ] ].ubImpact + ( (double) Weapon[ pItemNumbers[ i ] ].ubImpact / 100) * gGameExternalOptions.ubGunDamageMultiplier );
UINT16 gunDamage = (UINT16)GetModifiedGunDamage( Weapon[ pItemNumbers[ i ] ].ubImpact );
UINT16 readyAPs = (UINT16)(( Weapon[ pItemNumbers[ i ] ].ubReadyTime * (100 - Item[ pItemNumbers[ i ] ].percentreadytimeapreduction)) / 100);
UINT16 gunRange = (UINT16)GetModifiedGunRange(pItemNumbers[ i ]);
//Calculate AP's
CHAR16 apStr[20];
@@ -2504,18 +2560,48 @@ void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNum
wcscat( attachStr, attachStr3 );
}
}
//Sum up default attachments.
BOOLEAN fFoundDefault = FALSE;
swprintf( attachStr2, L"" );
swprintf( attachStr3, L"" );
for(UINT8 cnt = 0; cnt < MAX_DEFAULT_ATTACHMENTS; cnt++){
if(Item[pItemNumbers[ i ]].defaultattachments[cnt] != 0){
if (wcslen( attachStr ) + wcslen(attachStr3) + wcslen(Item[ Item[pItemNumbers[ i ]].defaultattachments[cnt] ].szItemName) > 3800)
{
// End list early to avoid stack overflow
wcscat( attachStr3, L"\n..." );
break;
}
fFoundDefault = TRUE;
swprintf( attachStr2, L"\n%s", Item[ Item[pItemNumbers[ i ]].defaultattachments[cnt] ].szItemName );
wcscat( attachStr3, attachStr2 );
} else {
//If we found an empty entry, we can assume the rest will be empty too.
break;
}
}
if(fFoundDefault){
//Found at least one default attachment, write it to the attachment string.
CHAR16 defaultStr[50];
swprintf( defaultStr, L"\n \n%s", gWeaponStatsDesc[ 17 ] );
wcscat( attachStr, defaultStr );
wcscat( attachStr, attachStr3 );
}
// HEADROCK HAM 3: Added last string (attachStr), for display of the possible attachment list.
// If the feature is deactivated, the attachStr will simply be empty at this point
// (remember? we emptied it earlier!).
INT8 accuracy = (UsingNewCTHSystem()==true?Weapon[ pItemNumbers[ i ] ].nAccuracy:Weapon[ pItemNumbers[ i ] ].bAccuracy);
swprintf( pStr, L"%s (%s)\n%s %d\n%s %d\n%s %d\n%s (%d) %s\n%s %1.1f %s%s",
ItemNames[ pItemNumbers[ i ] ],
AmmoCaliber[ Weapon[ pItemNumbers[ i ] ].ubCalibre ],
gWeaponStatsDesc[ 9 ], //Accuracy String
Weapon[ pItemNumbers[ i ] ].bAccuracy, //Accuracy
accuracy, //Accuracy
gWeaponStatsDesc[ 11 ], //Damage String
gunDamage, //Gun damage
gWeaponStatsDesc[ 10 ], //Range String
gGameSettings.fOptions[ TOPTION_SHOW_WEAPON_RANGE_IN_TILES ] ? Weapon[ pItemNumbers[ i ] ].usRange/10 : Weapon[ pItemNumbers[ i ] ].usRange, //Gun Range
gGameSettings.fOptions[ TOPTION_SHOW_WEAPON_RANGE_IN_TILES ] ? gunRange/10 : gunRange, //Gun Range
gWeaponStatsDesc[ 6 ], //AP String
readyAPs,
apStr, //AP's
@@ -2571,16 +2657,18 @@ void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNum
{
// HEADROCK HAM 3.6: Can now take a negative modifier.
UINT16 gunDamage = (UINT16)GetModifiedGunDamage( Weapon[ pItemNumbers[ i ] ].ubImpact );
UINT16 usRange = (UINT16)GetModifiedGunRange(pItemNumbers[ i ]);
INT8 accuracy = (UsingNewCTHSystem()==true?Weapon[ pItemNumbers[ i ] ].nAccuracy:Weapon[ pItemNumbers[ i ] ].bAccuracy);
//UINT16 gunDamage = (UINT16)( Weapon[ pItemNumbers[ i ] ].ubImpact + ( (double) Weapon[ pItemNumbers[ i ] ].ubImpact / 100) * gGameExternalOptions.ubGunDamageMultiplier );
swprintf( pStr, L"%s\n%s %d\n%s %d\n%s %d\n%s %s\n%s %1.1f %s",
ItemNames[ pItemNumbers[ i ] ],
gWeaponStatsDesc[ 9 ], //Accuracy String
Weapon[ pItemNumbers[ i ] ].bAccuracy, //Accuracy
accuracy, //Accuracy
gWeaponStatsDesc[ 11 ], //Damage String
gunDamage, //Gun damage
gWeaponStatsDesc[ 10 ], //Range String
gGameSettings.fOptions[ TOPTION_SHOW_WEAPON_RANGE_IN_TILES ] ? Weapon[ pItemNumbers[ i ] ].usRange/10 : Weapon[ pItemNumbers[ i ] ].usRange, //Gun Range
gGameSettings.fOptions[ TOPTION_SHOW_WEAPON_RANGE_IN_TILES ] ? usRange/10 : usRange, //Gun Range
gWeaponStatsDesc[ 6 ], //AP String
//apStr, //AP's
L"- / - / -",
@@ -2764,7 +2852,11 @@ void SelectBigImageRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
{
UINT16 usItemNum = (UINT16)MSYS_GetRegionUserData( pRegion, 0 );
PurchaseBobbyRayItem( gusItemNumberForItemsOnScreen[ usItemNum] );
// HEADROCK HAM 4: Purchase all at once.
if (_KeyDown( 16 ) ) // SHIFT
PurchaseBobbyRayItem( gusItemNumberForItemsOnScreen[ usItemNum], TRUE );
else
PurchaseBobbyRayItem( gusItemNumberForItemsOnScreen[ usItemNum], FALSE );
fReDrawScreenFlag = TRUE;
fPausedReDrawScreenFlag = TRUE;
@@ -2773,7 +2865,11 @@ void SelectBigImageRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
{
UINT16 usItemNum = (UINT16)MSYS_GetRegionUserData( pRegion, 0 );
UnPurchaseBobbyRayItem( gusItemNumberForItemsOnScreen[ usItemNum] );
// HEADROCK HAM 4: Unpurchase all at once.
if (_KeyDown( 16 ) ) // SHIFT
UnPurchaseBobbyRayItem( gusItemNumberForItemsOnScreen[ usItemNum], TRUE );
else
UnPurchaseBobbyRayItem( gusItemNumberForItemsOnScreen[ usItemNum], FALSE );
fReDrawScreenFlag = TRUE;
fPausedReDrawScreenFlag = TRUE;
}
@@ -2781,7 +2877,7 @@ void SelectBigImageRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
{
UINT16 usItemNum = (UINT16)MSYS_GetRegionUserData( pRegion, 0 );
PurchaseBobbyRayItem( gusItemNumberForItemsOnScreen[ usItemNum] );
PurchaseBobbyRayItem( gusItemNumberForItemsOnScreen[ usItemNum], FALSE );
fReDrawScreenFlag = TRUE;
fPausedReDrawScreenFlag = TRUE;
}
@@ -2789,7 +2885,7 @@ void SelectBigImageRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
{
UINT16 usItemNum = (UINT16)MSYS_GetRegionUserData( pRegion, 0 );
UnPurchaseBobbyRayItem( gusItemNumberForItemsOnScreen[ usItemNum] );
UnPurchaseBobbyRayItem( gusItemNumberForItemsOnScreen[ usItemNum], FALSE );
fReDrawScreenFlag = TRUE;
fPausedReDrawScreenFlag = TRUE;
}
@@ -2797,7 +2893,7 @@ void SelectBigImageRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
void PurchaseBobbyRayItem(UINT16 usItemNumber)
void PurchaseBobbyRayItem(UINT16 usItemNumber, BOOLEAN fAllItems )
{
UINT8 ubPurchaseNumber;
@@ -2816,8 +2912,10 @@ void PurchaseBobbyRayItem(UINT16 usItemNumber)
if( ubPurchaseNumber != BOBBY_RAY_NOT_PURCHASED )
{
UINT8 ubNumItems = fAllItems ? LaptopSaveInfo.BobbyRayUsedInventory[ usItemNumber ].ubQtyOnHand : 1;
BobbyRayPurchases[ ubPurchaseNumber ].usItemIndex = LaptopSaveInfo.BobbyRayUsedInventory[ usItemNumber ].usItemIndex;
BobbyRayPurchases[ ubPurchaseNumber ].ubNumberPurchased = 1;
BobbyRayPurchases[ ubPurchaseNumber ].ubNumberPurchased = ubNumItems;
BobbyRayPurchases[ ubPurchaseNumber ].bItemQuality = LaptopSaveInfo.BobbyRayUsedInventory[ usItemNumber ].ubItemQuality;
BobbyRayPurchases[ ubPurchaseNumber ].usBobbyItemIndex = usItemNumber;
BobbyRayPurchases[ ubPurchaseNumber ].fUsed = TRUE;
@@ -2832,8 +2930,10 @@ void PurchaseBobbyRayItem(UINT16 usItemNumber)
// Else If the item is already purchased increment purchase amount. Only if ordering less then the max amount!
else
{
if( BobbyRayPurchases[ ubPurchaseNumber ].ubNumberPurchased <= BOBBY_RAY_MAX_AMOUNT_OF_ITEMS_TO_PURCHASE)
BobbyRayPurchases[ ubPurchaseNumber ].ubNumberPurchased++;
UINT8 ubNumItems = fAllItems ? LaptopSaveInfo.BobbyRayUsedInventory[ usItemNumber ].ubQtyOnHand - BobbyRayPurchases[ ubPurchaseNumber ].ubNumberPurchased : 1;
if( BobbyRayPurchases[ ubPurchaseNumber ].ubNumberPurchased <= BOBBY_RAY_MAX_AMOUNT_OF_ITEMS_TO_PURCHASE - (ubNumItems-1))
BobbyRayPurchases[ ubPurchaseNumber ].ubNumberPurchased += ubNumItems;
}
}
else
@@ -2858,8 +2958,10 @@ void PurchaseBobbyRayItem(UINT16 usItemNumber)
if( ubPurchaseNumber != BOBBY_RAY_NOT_PURCHASED )
{
UINT8 ubNumItems = fAllItems ? LaptopSaveInfo.BobbyRayInventory[ usItemNumber ].ubQtyOnHand : 1;
BobbyRayPurchases[ ubPurchaseNumber ].usItemIndex = LaptopSaveInfo.BobbyRayInventory[ usItemNumber ].usItemIndex;
BobbyRayPurchases[ ubPurchaseNumber ].ubNumberPurchased = 1;
BobbyRayPurchases[ ubPurchaseNumber ].ubNumberPurchased = ubNumItems;
BobbyRayPurchases[ ubPurchaseNumber ].bItemQuality = 100;
BobbyRayPurchases[ ubPurchaseNumber ].usBobbyItemIndex = usItemNumber;
BobbyRayPurchases[ ubPurchaseNumber ].fUsed = FALSE;
@@ -2873,8 +2975,10 @@ void PurchaseBobbyRayItem(UINT16 usItemNumber)
// Else If the item is already purchased increment purchase amount. Only if ordering less then the max amount!
else
{
if( BobbyRayPurchases[ ubPurchaseNumber ].ubNumberPurchased <= BOBBY_RAY_MAX_AMOUNT_OF_ITEMS_TO_PURCHASE)
BobbyRayPurchases[ ubPurchaseNumber ].ubNumberPurchased++;
UINT8 ubNumItems = fAllItems ? LaptopSaveInfo.BobbyRayInventory[ usItemNumber ].ubQtyOnHand - BobbyRayPurchases[ ubPurchaseNumber ].ubNumberPurchased : 1;
if( BobbyRayPurchases[ ubPurchaseNumber ].ubNumberPurchased <= BOBBY_RAY_MAX_AMOUNT_OF_ITEMS_TO_PURCHASE - (ubNumItems-1))
BobbyRayPurchases[ ubPurchaseNumber ].ubNumberPurchased += ubNumItems;
}
}
else
@@ -2916,7 +3020,7 @@ UINT8 GetNextPurchaseNumber()
void UnPurchaseBobbyRayItem(UINT16 usItemNumber)
void UnPurchaseBobbyRayItem(UINT16 usItemNumber, BOOLEAN fAllItems )
{
UINT8 ubPurchaseNumber;
@@ -2924,7 +3028,7 @@ void UnPurchaseBobbyRayItem(UINT16 usItemNumber)
if( ubPurchaseNumber != BOBBY_RAY_NOT_PURCHASED )
{
if( BobbyRayPurchases[ ubPurchaseNumber ].ubNumberPurchased > 1)
if( BobbyRayPurchases[ ubPurchaseNumber ].ubNumberPurchased > 1 && !fAllItems)
BobbyRayPurchases[ ubPurchaseNumber ].ubNumberPurchased--;
else
{
+11 -3
View File
@@ -31,6 +31,7 @@
#include "Strategic Event Handler.h"
#include "connect.h"
/*
typedef struct
{
STR16 *psCityLoc;
@@ -38,8 +39,9 @@ typedef struct
UINT16 us2DaysService;
UINT16 usStandardService;
} BobbyROrderLocationStruct;
*/
/*
BobbyROrderLocationStruct BobbyROrderLocations[]=
{
{ &pDeliveryLocationStrings[0], 20, 15, 10 },
@@ -60,6 +62,7 @@ BobbyROrderLocationStruct BobbyROrderLocations[]=
{ &pDeliveryLocationStrings[15], 100, 55, 30 },
{ &pDeliveryLocationStrings[16], 45, 30, 20 },
};
*/
//drop down menu
enum
@@ -829,7 +832,10 @@ void BtnBobbyRAcceptOrderCallback(GUI_BUTTON *btn,INT32 reason)
else
{
//else pop up a confirmation box
swprintf( zTemp, BobbyROrderFormText[BOBBYR_CONFIRM_DEST], *BobbyROrderLocations[gbSelectedCity].psCityLoc );
//swprintf( zTemp, BobbyROrderFormText[BOBBYR_CONFIRM_DEST], *BobbyROrderLocations[gbSelectedCity].psCityLoc );
// WANNE: Replaced hard coded town names with the externalized ones (from ShippingDestination.xml).
swprintf( zTemp, BobbyROrderFormText[BOBBYR_CONFIRM_DEST], gDestinationTable[gbSelectedCity]->wstrName.c_str() );
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, zTemp, LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, ConfirmBobbyRPurchaseMessageBoxCallBack );
}
@@ -1433,10 +1439,12 @@ BOOLEAN CreateDestroyBobbyRDropDown( UINT8 ubDropDownAction )
//display the name on the title bar
ColorFillVideoSurfaceArea( FRAME_BUFFER, BOBBYR_SHIPPING_LOC_AREA_L_X, BOBBYR_SHIPPING_LOC_AREA_T_Y, BOBBYR_SHIPPING_LOC_AREA_L_X+175, BOBBYR_SHIPPING_LOC_AREA_T_Y+BOBBYR_DROP_DOWN_HEIGHT, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
/*
if( gbSelectedCity == -1 )
DrawTextToScreen( BobbyROrderFormText[BOBBYR_SELECT_DEST], BOBBYR_CITY_START_LOCATION_X+BOBBYR_CITY_NAME_OFFSET, BOBBYR_SHIPPING_LOC_AREA_T_Y+3, 0, BOBBYR_DROPDOWN_FONT, BOBBYR_ORDER_DROP_DOWN_SELEC_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
else
else
DrawTextToScreen( *(BobbyROrderLocations[gbSelectedCity].psCityLoc), BOBBYR_CITY_START_LOCATION_X+BOBBYR_CITY_NAME_OFFSET, BOBBYR_SHIPPING_LOC_AREA_T_Y+3, 0, BOBBYR_DROPDOWN_FONT, BOBBYR_ORDER_DROP_DOWN_SELEC_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
*/
//disable the r\close regiuon
MSYS_DisableRegion(&gSelectedCloseDropDownRegion);
+29 -10
View File
@@ -25,11 +25,12 @@
#include "IMP Confirm.h"
#include "messageboxscreen.h"
#include "LaptopSave.h"
// These 4 added - SANDRO
// These 5 added - SANDRO
#include "IMP Character and Disability Entrance.h"
#include "IMP Character Trait.h"
#include "IMP Disability Trait.h"
#include "IMP Color Choosing.h"
#include "IMP Minor Trait.h"
#endif
@@ -67,6 +68,7 @@ CHAR16 pNickName[ 32 ];
// skills
INT32 iSkillA = 0;
INT32 iSkillB = 0;
INT32 iSkillC = 0; // added third skill - SANDRO
// personality
INT32 iPersonality = 0;
@@ -255,7 +257,7 @@ void HandleCharProfile()
case( IMP_CONFIRM ):
HandleIMPConfirm( );
break;
// These 4 added - SANDRO
// These 5 added - SANDRO
case( IMP_CHARACTER_AND_DISABILITY_ENTRANCE ):
HandleIMPCharacterAndDisabilityEntrance( );
break;
@@ -268,6 +270,9 @@ void HandleCharProfile()
case( IMP_COLOR_CHOICE_PAGE ):
HandleIMPColorChoice( );
break;
case( IMP_MINOR_TRAITS_PAGE ):
HandleIMPMinorTrait( );
break;
}
return;
@@ -328,7 +333,7 @@ void RenderCharProfile()
case( IMP_CONFIRM ):
RenderIMPConfirm( );
break;
// These 4 added - SANDRO
// These 5 added - SANDRO
case( IMP_CHARACTER_AND_DISABILITY_ENTRANCE ):
RenderIMPCharacterAndDisabilityEntrance( );
break;
@@ -341,6 +346,9 @@ void RenderCharProfile()
case( IMP_COLOR_CHOICE_PAGE ):
RenderIMPColorChoice( );
break;
case( IMP_MINOR_TRAITS_PAGE ):
RenderIMPMinorTrait( );
break;
}
// render title bar
@@ -425,7 +433,7 @@ void ExitOldIMPMode( void )
case( IMP_CONFIRM ):
ExitIMPConfirm( );
break;
// These 4 added - SANDRO
// These 5 added - SANDRO
case( IMP_CHARACTER_AND_DISABILITY_ENTRANCE ):
DestroyIMPButtons( );
ExitIMPCharacterAndDisabilityEntrance( );
@@ -442,6 +450,10 @@ void ExitOldIMPMode( void )
DestroyIMPButtons( );
ExitIMPColorChoice( );
break;
case( IMP_MINOR_TRAITS_PAGE ):
DestroyIMPButtons( );
ExitIMPMinorTrait( );
break;
}
return;
@@ -508,7 +520,7 @@ void EnterNewIMPMode( void )
case( IMP_CONFIRM ):
EnterIMPConfirm( );
break;
// These 4 added - SANDRO
// These 5 added - SANDRO
case( IMP_CHARACTER_AND_DISABILITY_ENTRANCE ):
CreateIMPButtons( );
EnterIMPCharacterAndDisabilityEntrance( );
@@ -525,6 +537,10 @@ void EnterNewIMPMode( void )
CreateIMPButtons( );
EnterIMPColorChoice( );
break;
case( IMP_MINOR_TRAITS_PAGE ):
CreateIMPButtons( );
EnterIMPMinorTrait( );
break;
}
@@ -552,6 +568,7 @@ void ResetCharacterStats( void )
// skills
iSkillA = 0;
iSkillB = 0;
iSkillC = 0; // SANDRO - added third skill
// personality
iPersonality = 0;
@@ -614,8 +631,9 @@ void LoadImpGraphics( void )
LoadAvgMercIndentFrame( );
LoadAboutUsIndentFrame( );
LoadAttribStartingLevelFrame( ); // Added by SANDRO
LoadColorChoiceFrame( ); // Added by SANDRO
// Added by SANDRO
LoadAttribStartingLevelFrame( );
LoadColorChoiceFrame( );
return;
@@ -666,9 +684,10 @@ void RemoveImpGraphics( void )
DeleteAttrib2IndentFrame( );
DeleteAvgMercIndentFrame( );
DeleteAboutUsIndentFrame( );
DeleteAttribStartingLevelFrame( ); // Added by SANDRO
DeleteColorChoiceFrame( ); // Added by SANDRO
// Added by SANDRO
DeleteAttribStartingLevelFrame( );
DeleteColorChoiceFrame( );
return;
}
+3 -1
View File
@@ -38,6 +38,7 @@ extern CHAR16 pNickName[];
// skills
extern INT32 iSkillA;
extern INT32 iSkillB;
extern INT32 iSkillC; // Added by SANDRO
// persoanlity
extern INT32 iPersonality;
@@ -78,11 +79,12 @@ enum{
IMP_VOICE,
IMP_ABOUT_US,
IMP_CONFIRM,
// These 4 added - SANDRO
// These 5 added - SANDRO
IMP_CHARACTER_AND_DISABILITY_ENTRANCE,
IMP_CHARACTER_PAGE,
IMP_DISABILITY_PAGE,
IMP_COLOR_CHOICE_PAGE,
IMP_MINOR_TRAITS_PAGE,
IMP_NUM_PAGES,
};
+275 -111
View File
@@ -23,7 +23,10 @@
#include "IMP Compile Character.h"
#include "text.h"
#include "GameSettings.h"
#include "IMP Disability Trait.h" // Added this one - SANDRO
// Added these 3 - SANDRO
#include "IMP Disability Trait.h"
#include "IMP Color Choosing.h"
#include "IMP Minor Trait.h"
#endif
@@ -84,6 +87,19 @@ INT32 iCurrentMechanical = 0;
INT32 iCurrentMedical = 0;
INT32 iCurrentExplosives = 0;
INT32 iStrengthMinimum = gGameExternalOptions.iMinAttribute;
INT32 iAgilityMinimum = gGameExternalOptions.iMinAttribute;
INT32 iDexterityMinimum = gGameExternalOptions.iMinAttribute;
INT32 iHealthMinimum = gGameExternalOptions.iMinAttribute;
INT32 iLeaderShipMinimum = gGameExternalOptions.iMinAttribute;
INT32 iWisdomMinimum = gGameExternalOptions.iMinAttribute;
INT32 iMarkmanshipMinimum = gGameExternalOptions.iMinAttribute;
INT32 iMechanicalMinimum = gGameExternalOptions.iMinAttribute;
INT32 iMedicalMinimum = gGameExternalOptions.iMinAttribute;
INT32 iExplosivesMinimum = gGameExternalOptions.iMinAttribute;
// which stat is message about stat at zero about
INT32 iCurrentStatAtZero = 0;
@@ -460,36 +476,36 @@ void ProcessAttributes( void )
INT32 iMaxAttribute = gGameExternalOptions.iMaxAttribute;
// strength
if( iCurrentStrength <= iMinAttribute )
if( iCurrentStrength <= iStrengthMinimum )
{
iCurrentStrength = iMinAttribute;
iCurrentStrength = iStrengthMinimum;
// disable button too
}
// dex
if( iCurrentDexterity <= iMinAttribute )
if( iCurrentDexterity <= iDexterityMinimum )
{
iCurrentDexterity = iMinAttribute;
iCurrentDexterity = iDexterityMinimum;
// disable button too
}
// agility
if( iCurrentAgility <= iMinAttribute )
if( iCurrentAgility <= iAgilityMinimum )
{
iCurrentAgility = iMinAttribute;
iCurrentAgility = iAgilityMinimum;
// disable button too
}
// wisdom
if( iCurrentWisdom <= iMinAttribute )
if( iCurrentWisdom <= iWisdomMinimum )
{
iCurrentWisdom = iMinAttribute;
iCurrentWisdom = iWisdomMinimum;
// disable button too
@@ -504,9 +520,9 @@ void ProcessAttributes( void )
//}
// health
if( iCurrentHealth <= iMinAttribute )
if( iCurrentHealth <= iHealthMinimum )
{
iCurrentHealth = iMinAttribute;
iCurrentHealth = iHealthMinimum;
// disable button too
}
@@ -668,7 +684,7 @@ UINT8 IncrementStat( INT32 iStatToIncrement )
{
if( DoWeHaveThisManyBonusPoints( iMaxZeroBonus ) == TRUE )
{
iCurrentLeaderShip+=iMinAttribute;
iCurrentLeaderShip+=iLeaderShipMinimum;
iCurrentBonusPoints-=iMaxZeroBonus;
fSkillAtZeroWarning = FALSE;
}
@@ -696,7 +712,7 @@ UINT8 IncrementStat( INT32 iStatToIncrement )
{
if( DoWeHaveThisManyBonusPoints( iMaxZeroBonus ) == TRUE )
{
iCurrentMarkmanship+=iMinAttribute;
iCurrentMarkmanship+=iMarkmanshipMinimum;
iCurrentBonusPoints-=iMaxZeroBonus;
fSkillAtZeroWarning = FALSE;
}
@@ -724,7 +740,7 @@ UINT8 IncrementStat( INT32 iStatToIncrement )
{
if( DoWeHaveThisManyBonusPoints( iMaxZeroBonus ) == TRUE )
{
iCurrentMechanical+=iMinAttribute;
iCurrentMechanical+=iMechanicalMinimum;
iCurrentBonusPoints-=iMaxZeroBonus;
fSkillAtZeroWarning = FALSE;
}
@@ -752,7 +768,7 @@ UINT8 IncrementStat( INT32 iStatToIncrement )
{
if( DoWeHaveThisManyBonusPoints( iMaxZeroBonus ) == TRUE )
{
iCurrentMedical+=iMinAttribute;
iCurrentMedical+=iMedicalMinimum;
iCurrentBonusPoints-=iMaxZeroBonus;
fSkillAtZeroWarning = FALSE;
}
@@ -780,7 +796,7 @@ UINT8 IncrementStat( INT32 iStatToIncrement )
{
if( DoWeHaveThisManyBonusPoints( iMaxZeroBonus ) == TRUE )
{
iCurrentExplosives+=iMinAttribute;
iCurrentExplosives+=iExplosivesMinimum;
iCurrentBonusPoints-=iMaxZeroBonus;
fSkillAtZeroWarning = FALSE;
}
@@ -821,23 +837,23 @@ UINT8 DecrementStat( INT32 iStatToDecrement )
switch( iStatToDecrement )
{
case( STRENGTH_ATTRIBUTE ):
if( iCurrentStrength > iMinAttribute )
if( iCurrentStrength > iStrengthMinimum )
{
// ok to decrement
iCurrentStrength--;
iCurrentBonusPoints++;
iCurrentBonusPoints++;
}
else
{
return( SLIDER_OUT_OF_RANGE );
}
break;
case( DEXTERITY_ATTRIBUTE ):
if( iCurrentDexterity > iMinAttribute )
case( DEXTERITY_ATTRIBUTE ):
if( iCurrentDexterity > iDexterityMinimum )
{
// ok to decrement
iCurrentDexterity--;
iCurrentBonusPoints++;
iCurrentBonusPoints++;
}
else
{
@@ -845,23 +861,23 @@ UINT8 DecrementStat( INT32 iStatToDecrement )
}
break;
case( AGILITY_ATTRIBUTE ):
if( iCurrentAgility > iMinAttribute )
if( iCurrentAgility > iAgilityMinimum )
{
// ok to decrement
iCurrentAgility--;
iCurrentBonusPoints++;
iCurrentBonusPoints++;
}
else
{
return( SLIDER_OUT_OF_RANGE );
}
break;
case( WISDOM_ATTRIBUTE ):
if( iCurrentWisdom > iMinAttribute )
case( WISDOM_ATTRIBUTE ):
if( iCurrentWisdom > iWisdomMinimum )
{
// ok to decrement
iCurrentWisdom--;
iCurrentBonusPoints++;
iCurrentBonusPoints++;
}
else
{
@@ -869,91 +885,106 @@ UINT8 DecrementStat( INT32 iStatToDecrement )
}
break;
case( LEADERSHIP_ATTRIBUTE ):
if( iCurrentLeaderShip > iMinAttribute )
if( iCurrentLeaderShip > iLeaderShipMinimum )
{
// ok to decrement
iCurrentLeaderShip--;
iCurrentBonusPoints++;
iCurrentBonusPoints++;
}
//Kaiden: Leadership couldn't be set to zero fixed below:
else if( iCurrentLeaderShip == iMinAttribute)
else if( iCurrentLeaderShip == iLeaderShipMinimum)
{
// ok to decrement
iCurrentLeaderShip-=iMinAttribute;
iCurrentBonusPoints+=iMaxZeroBonus;
fSkillAtZeroWarning = TRUE;
if (LeadershipRequiredDueToMajorSkills() == 0 && LeaderShipRequiredAdjustmentForMinorTraits( 0 ) == 0 )
{
// ok to decrement
iCurrentLeaderShip-=iLeaderShipMinimum;
iCurrentBonusPoints+=iMaxZeroBonus;
fSkillAtZeroWarning = TRUE;
}
}
break;
case( HEALTH_ATTRIBUTE ):
if( iCurrentHealth > iMinAttribute )
if( iCurrentHealth > iHealthMinimum )
{
// ok to decrement
iCurrentHealth--;
iCurrentBonusPoints++;
iCurrentBonusPoints++;
}
else
{
return( SLIDER_OUT_OF_RANGE );
}
break;
case( MARKSMANSHIP_SKILL ):
if( iCurrentMarkmanship > iMinAttribute )
case( MARKSMANSHIP_SKILL ):
if( iCurrentMarkmanship > iMarkmanshipMinimum )
{
// ok to decrement
iCurrentMarkmanship--;
iCurrentBonusPoints++;
iCurrentBonusPoints++;
}
else if( iCurrentMarkmanship == iMinAttribute)
else if( iCurrentMarkmanship == iMarkmanshipMinimum)
{
// ok to decrement
iCurrentMarkmanship-=iMinAttribute;
iCurrentBonusPoints+=iMaxZeroBonus;
fSkillAtZeroWarning = TRUE;
if (MarksmanshipRequiredDueToMajorSkills() == 0 && MarksmanshipRequiredAdjustmentForMinorTraits( 0 ) == 0 )
{
// ok to decrement
iCurrentMarkmanship-=iMarkmanshipMinimum;
iCurrentBonusPoints+=iMaxZeroBonus;
fSkillAtZeroWarning = TRUE;
}
}
break;
case( MEDICAL_SKILL ):
if( iCurrentMedical > iMinAttribute )
if( iCurrentMedical > iMedicalMinimum )
{
// ok to decrement
iCurrentMedical--;
iCurrentBonusPoints++;
iCurrentBonusPoints++;
}
else if( iCurrentMedical == iMinAttribute)
else if( iCurrentMedical == iMedicalMinimum)
{
// ok to decrement
iCurrentMedical-=iMinAttribute;
iCurrentBonusPoints+=iMaxZeroBonus;
fSkillAtZeroWarning = TRUE;
if (MedicalRequiredDueToMajorSkills() == 0 && MedicalRequiredAdjustmentForMinorTraits( 0 ) == 0 )
{
// ok to decrement
iCurrentMedical-=iMedicalMinimum;
iCurrentBonusPoints+=iMaxZeroBonus;
fSkillAtZeroWarning = TRUE;
}
}
break;
case( MECHANICAL_SKILL ):
if( iCurrentMechanical > iMinAttribute )
if( iCurrentMechanical > iMechanicalMinimum )
{
// ok to decrement
iCurrentMechanical--;
iCurrentBonusPoints++;
iCurrentBonusPoints++;
}
else if( iCurrentMechanical == iMinAttribute)
else if( iCurrentMechanical == iMechanicalMinimum)
{
// ok to decrement
iCurrentMechanical-=iMinAttribute;
iCurrentBonusPoints+=iMaxZeroBonus;
fSkillAtZeroWarning = TRUE;
if (MechanicalRequiredDueToMajorSkills() == 0 && MechanicalRequiredAdjustmentForMinorTraits( 0 ) == 0 )
{
// ok to decrement
iCurrentMechanical-=iMechanicalMinimum;
iCurrentBonusPoints+=iMaxZeroBonus;
fSkillAtZeroWarning = TRUE;
}
}
break;
case( EXPLOSIVE_SKILL ):
if( iCurrentExplosives > iMinAttribute )
if( iCurrentExplosives > iExplosivesMinimum )
{
// ok to decrement
iCurrentExplosives--;
iCurrentBonusPoints++;
iCurrentBonusPoints++;
}
else if( iCurrentExplosives == iMinAttribute)
else if( iCurrentExplosives == iExplosivesMinimum)
{
// ok to decrement
iCurrentExplosives-=iMinAttribute;
iCurrentBonusPoints+=iMaxZeroBonus;
fSkillAtZeroWarning = TRUE;
if (ExplosivesRequiredDueToMajorSkills() == 0 && ExplosivesRequiredAdjustmentForMinorTraits( 0 ) == 0 )
{
// ok to decrement
iCurrentExplosives-=iExplosivesMinimum;
iCurrentBonusPoints+=iMaxZeroBonus;
fSkillAtZeroWarning = TRUE;
}
}
break;
@@ -1563,7 +1594,9 @@ void CreateSliderBarMouseRegions( void )
INT16 sX = 0;
// set the starting X
sX = DetermineNewPosition( gGameExternalOptions.iStartAttribute - iMinAttribute );
// SANDRO - some changes in attribute points distribution method
//sX = DetermineNewPosition( gGameExternalOptions.iStartAttribute - iMinAttribute );
sX = DetermineNewPosition( 0 );
for( iCounter = 0; iCounter < 10; iCounter++ )
{
@@ -1882,59 +1915,190 @@ INT32 GetCurrentAttributeValue( INT32 iAttribute )
void SetAttributes( void )
{
INT8 bExtraPoints = 0;
/*
// set attributes and skills based on what is in charprofile.c
// attributes
iCurrentStrength = iStrength + iAddStrength;
iCurrentDexterity = iDexterity + iAddDexterity;
iCurrentHealth = iHealth + iAddHealth;
iCurrentLeaderShip = iLeadership + iAddLeadership;
iCurrentWisdom = iWisdom + iAddWisdom;
iCurrentAgility = iAgility + iAddAgility;
// skills
iCurrentMarkmanship = iMarksmanship + iAddMarksmanship;
iCurrentMechanical = iMechanical + iAddMechanical;
iCurrentMedical = iMedical + iAddMedical;
iCurrentExplosives = iExplosives + iAddExplosives;
// reset bonus pts
iCurrentBonusPoints = 40;
*/
INT32 iExtraPoints = 0;
// added externilized multiplier for starting level - SADNRO
iLevelCostMultiplier = gGameExternalOptions.iIMPStartingLevelCostMultiplier;
iCurrentStrength = gGameExternalOptions.iStartAttribute;
iCurrentDexterity = gGameExternalOptions.iStartAttribute;
iCurrentHealth = gGameExternalOptions.iStartAttribute;
iCurrentLeaderShip = gGameExternalOptions.iStartAttribute;
iCurrentWisdom = gGameExternalOptions.iStartAttribute;
iCurrentAgility = gGameExternalOptions.iStartAttribute;
/////////////////////////////////////////////////////////////////////////////////////////////////
// SANDRO - determine minimum attribute values due to chosen traits
// skills
iCurrentMarkmanship = gGameExternalOptions.iStartAttribute;
iCurrentMechanical = gGameExternalOptions.iStartAttribute;
iCurrentMedical = gGameExternalOptions.iStartAttribute;
iCurrentExplosives = gGameExternalOptions.iStartAttribute;
// reset bonus pts
//iCurrentBonusPoints = 40;
iCurrentBonusPoints = gGameExternalOptions.iImpAttributePoints;
//Determine if the player has any extra points
bExtraPoints += iPlayersAttributePointsBonusForDisabilitySelected(); // Added attribute bonus for chosen disability - SANDRO
bExtraPoints += DoesPlayerHaveExtraAttibutePointsToDistributeBasedOnSkillSelection();
if( bExtraPoints > 0 )
// For new trait system only though
if ( gGameOptions.fNewTraitSystem )
{
iCurrentBonusPoints += bExtraPoints;
}
// reset bonus pts
iCurrentBonusPoints = gGameExternalOptions.iImpAttributePoints;
//Determine if the player has any extra points
iExtraPoints += iPlayersAttributePointsBonusForDisabilitySelected();
iExtraPoints += DoesPlayerHaveExtraAttibutePointsToDistributeBasedOnSkillSelection();
if( iExtraPoints > 0 )
iCurrentBonusPoints += iExtraPoints;
// Get Strength minimum
iStrengthMinimum = StrengthRequiredDueToMajorSkills();
if ( iStrengthMinimum < gGameExternalOptions.iMinAttribute )
iStrengthMinimum = gGameExternalOptions.iMinAttribute;
iStrengthMinimum += StrengthRequiredAdjustmentForMinorTraits( iStrengthMinimum );
// hehehe, make the alternative weapon holding anim requiring a big strength
if ( bBadAssSelected() && iStrengthMinimum < 80 )
iStrengthMinimum = 80;
if ( iStrengthMinimum > gGameExternalOptions.iMaxAttribute )
iStrengthMinimum = gGameExternalOptions.iMaxAttribute;
iCurrentStrength = iStrengthMinimum;
iCurrentBonusPoints -= iStrengthMinimum;
// Get Agility minimum
iAgilityMinimum = AgilityRequiredDueToMajorSkills();
if ( iAgilityMinimum < gGameExternalOptions.iMinAttribute )
iAgilityMinimum = gGameExternalOptions.iMinAttribute;
iAgilityMinimum += AgilityRequiredAdjustmentForMinorTraits( iAgilityMinimum );
if ( iAgilityMinimum > gGameExternalOptions.iMaxAttribute )
iAgilityMinimum = gGameExternalOptions.iMaxAttribute;
iCurrentAgility = iAgilityMinimum;
iCurrentBonusPoints -= iAgilityMinimum;
// Get Dexterity minimum
iDexterityMinimum = DexterityRequiredDueToMajorSkills();
if ( iDexterityMinimum < gGameExternalOptions.iMinAttribute )
iDexterityMinimum = gGameExternalOptions.iMinAttribute;
iDexterityMinimum += DexterityRequiredAdjustmentForMinorTraits( iDexterityMinimum );
if ( iDexterityMinimum > gGameExternalOptions.iMaxAttribute )
iDexterityMinimum = gGameExternalOptions.iMaxAttribute;
iCurrentDexterity = iDexterityMinimum;
iCurrentBonusPoints -= iDexterityMinimum;
// Get Health minimum
iHealthMinimum = HealthRequiredDueToMajorSkills();
if ( iHealthMinimum <= 0 )
iHealthMinimum = gGameExternalOptions.iMinAttribute;
iHealthMinimum += HealthRequiredAdjustmentForMinorTraits( iHealthMinimum );
if ( iHealthMinimum > gGameExternalOptions.iMaxAttribute )
iHealthMinimum = gGameExternalOptions.iMaxAttribute;
iCurrentHealth = iHealthMinimum;
iCurrentBonusPoints -= iHealthMinimum;
// Get Leadership minimum
iLeaderShipMinimum = LeadershipRequiredDueToMajorSkills();
if ( iLeaderShipMinimum < gGameExternalOptions.iMinAttribute )
iLeaderShipMinimum = gGameExternalOptions.iMinAttribute;
iLeaderShipMinimum += LeaderShipRequiredAdjustmentForMinorTraits( iLeaderShipMinimum );
if ( iLeaderShipMinimum > gGameExternalOptions.iMaxAttribute )
iLeaderShipMinimum = gGameExternalOptions.iMaxAttribute;
iCurrentLeaderShip = iLeaderShipMinimum;
iCurrentBonusPoints -= (iLeaderShipMinimum - gGameExternalOptions.iMinAttribute + gGameExternalOptions.iMaxZeroBonus);
// Get Wisdom minimum
iWisdomMinimum = WisdomRequiredDueToMajorSkills();
if ( iWisdomMinimum < gGameExternalOptions.iMinAttribute )
iWisdomMinimum = gGameExternalOptions.iMinAttribute;
iWisdomMinimum += WisdomRequiredAdjustmentForMinorTraits( iWisdomMinimum );
if ( iWisdomMinimum > gGameExternalOptions.iMaxAttribute )
iWisdomMinimum = gGameExternalOptions.iMaxAttribute;
iCurrentWisdom = iWisdomMinimum;
iCurrentBonusPoints -= iWisdomMinimum;
// Get Marksmanship minimum
iMarkmanshipMinimum = MarksmanshipRequiredDueToMajorSkills();
if ( iMarkmanshipMinimum < gGameExternalOptions.iMinAttribute )
iMarkmanshipMinimum = gGameExternalOptions.iMinAttribute;
iMarkmanshipMinimum += MarksmanshipRequiredAdjustmentForMinorTraits( iMarkmanshipMinimum );
if ( iMarkmanshipMinimum > gGameExternalOptions.iMaxAttribute )
iMarkmanshipMinimum = gGameExternalOptions.iMaxAttribute;
iCurrentMarkmanship = iMarkmanshipMinimum;
iCurrentBonusPoints -= (iMarkmanshipMinimum - gGameExternalOptions.iMinAttribute + gGameExternalOptions.iMaxZeroBonus);
// Get Mechanical minimum
iMechanicalMinimum = MechanicalRequiredDueToMajorSkills();
if ( iMechanicalMinimum < gGameExternalOptions.iMinAttribute )
iMechanicalMinimum = gGameExternalOptions.iMinAttribute;
iMechanicalMinimum += MechanicalRequiredAdjustmentForMinorTraits( iMechanicalMinimum );
if ( iMechanicalMinimum > gGameExternalOptions.iMaxAttribute )
iMechanicalMinimum = gGameExternalOptions.iMaxAttribute;
iCurrentMechanical = iMechanicalMinimum;
iCurrentBonusPoints -= (iMechanicalMinimum - gGameExternalOptions.iMinAttribute + gGameExternalOptions.iMaxZeroBonus);
// Get Medical minimum
iMedicalMinimum = MedicalRequiredDueToMajorSkills();
if ( iMedicalMinimum < gGameExternalOptions.iMinAttribute )
iMedicalMinimum = gGameExternalOptions.iMinAttribute;
iMedicalMinimum += MedicalRequiredAdjustmentForMinorTraits( iMedicalMinimum );
if ( iMedicalMinimum > gGameExternalOptions.iMaxAttribute )
iMedicalMinimum = gGameExternalOptions.iMaxAttribute;
iCurrentMedical = iMedicalMinimum;
iCurrentBonusPoints -= (iMedicalMinimum - gGameExternalOptions.iMinAttribute + gGameExternalOptions.iMaxZeroBonus);
// Get Explosives minimum
iExplosivesMinimum = ExplosivesRequiredDueToMajorSkills();
if ( iExplosivesMinimum < gGameExternalOptions.iMinAttribute )
iExplosivesMinimum = gGameExternalOptions.iMinAttribute;
iExplosivesMinimum += ExplosivesRequiredAdjustmentForMinorTraits( iExplosivesMinimum );
if ( iExplosivesMinimum > gGameExternalOptions.iMaxAttribute )
iExplosivesMinimum = gGameExternalOptions.iMaxAttribute;
iCurrentExplosives = iExplosivesMinimum;
iCurrentBonusPoints -= (iExplosivesMinimum - gGameExternalOptions.iMinAttribute + gGameExternalOptions.iMaxZeroBonus);
// if we exceeded points available, just give us zero points, but keep the attribute minimums untouched
if ( iCurrentBonusPoints < 0 )
iCurrentBonusPoints = 0;
}
/////////////////////////////////////////////////////////////////////////////////////////////////
else // ORIGINAL
{
iCurrentBonusPoints = gGameExternalOptions.iImpAttributePoints;
//Determine if the player has any extra points
iExtraPoints += iPlayersAttributePointsBonusForDisabilitySelected();
iExtraPoints += DoesPlayerHaveExtraAttibutePointsToDistributeBasedOnSkillSelection();
if( iExtraPoints > 0 )
iCurrentBonusPoints += iExtraPoints;
iCurrentStrength = gGameExternalOptions.iMinAttribute;
iCurrentDexterity = gGameExternalOptions.iMinAttribute;
iCurrentHealth = gGameExternalOptions.iMinAttribute;
iCurrentLeaderShip = gGameExternalOptions.iMinAttribute;
iCurrentWisdom = gGameExternalOptions.iMinAttribute;
iCurrentAgility = gGameExternalOptions.iMinAttribute;
iCurrentMarkmanship = gGameExternalOptions.iMinAttribute;
iCurrentMechanical = gGameExternalOptions.iMinAttribute;
iCurrentMedical = gGameExternalOptions.iMinAttribute;
iCurrentExplosives = gGameExternalOptions.iMinAttribute;
iCurrentBonusPoints -= ((5 * gGameExternalOptions.iMinAttribute) + (5 * gGameExternalOptions.iMaxZeroBonus));
}
////////////////////////////////////////////////////
ResetIncrementCharacterAttributes( );
+28 -28
View File
@@ -32,7 +32,7 @@
#include "LaptopSave.h"
#endif
#include "VFS/Tools/ParserTools.h"
#include <vfs/Tools/vfs_parser_tools.h>
#define FULL_NAME_CURSOR_Y LAPTOP_SCREEN_WEB_UL_Y + 138
#define NICK_NAME_CURSOR_Y LAPTOP_SCREEN_WEB_UL_Y + 195
@@ -1299,9 +1299,9 @@ BOOLEAN CheckCharacterInputForEgg( void )
iMechanical = 0;
iExplosives = 99;
iMedical = 0;
iSkillA = AMBIDEXT;
iSkillB = AUTO_WEAPS;
iPersonality = NO_PERSONALITYTRAIT;
iSkillA = AMBIDEXT_OT;
iSkillB = AUTO_WEAPS_OT;
iPersonality = NO_DISABILITY;
iAttitude = ATT_ASSHOLE;
iCurrentImpPage = IMP_FINISH;
// LaptopSaveInfo.iCurrentVoice = 1;
@@ -1324,9 +1324,9 @@ BOOLEAN CheckCharacterInputForEgg( void )
iMechanical = 40;
iExplosives = 25;
iMedical = 60;
iSkillA = MARTIALARTS;
iSkillB = AUTO_WEAPS;
iPersonality = NO_PERSONALITYTRAIT;
iSkillA = MARTIALARTS_OT;
iSkillB = AUTO_WEAPS_OT;
iPersonality = NO_DISABILITY;
iAttitude = ATT_FRIENDLY;
iCurrentImpPage = IMP_FINISH;
// LaptopSaveInfo.iCurrentVoice = 1;
@@ -1349,9 +1349,9 @@ BOOLEAN CheckCharacterInputForEgg( void )
iMechanical = 100;
iExplosives = 100;
iMedical = 100;
iSkillA = MARTIALARTS;
iSkillB = AUTO_WEAPS;
iPersonality = NO_PERSONALITYTRAIT;
iSkillA = MARTIALARTS_OT;
iSkillB = AUTO_WEAPS_OT;
iPersonality = NO_DISABILITY;
iAttitude = ATT_FRIENDLY;
iCurrentImpPage = IMP_FINISH;
// LaptopSaveInfo.iCurrentVoice = 2;
@@ -1376,10 +1376,10 @@ BOOLEAN CheckCharacterInputForEgg( void )
iExplosives = 99;
iMedical = 75;
iSkillA = STEALTHY;
iSkillB = MARTIALARTS;
iSkillA = STEALTHY_OT;
iSkillB = MARTIALARTS_OT;
iPersonality = NO_PERSONALITYTRAIT;
iPersonality = NO_DISABILITY;
iAttitude = ATT_AGGRESSIVE;
iCurrentImpPage = IMP_FINISH;
// LaptopSaveInfo.iCurrentVoice = 1;
@@ -1404,10 +1404,10 @@ BOOLEAN CheckCharacterInputForEgg( void )
iExplosives = 0;
iMedical = 99;
iSkillA = AUTO_WEAPS;
iSkillB = AMBIDEXT;
iSkillA = AUTO_WEAPS_OT;
iSkillB = AMBIDEXT_OT;
iPersonality = NO_PERSONALITYTRAIT;
iPersonality = NO_DISABILITY;
iAttitude = ATT_ARROGANT;
iCurrentImpPage = IMP_FINISH;
// LaptopSaveInfo.iCurrentVoice = 1;
@@ -1432,10 +1432,10 @@ BOOLEAN CheckCharacterInputForEgg( void )
iExplosives = 99;
iMedical = 35;
iSkillA = AUTO_WEAPS;
iSkillB = MARTIALARTS;
iSkillA = AUTO_WEAPS_OT;
iSkillB = MARTIALARTS_OT;
iPersonality = NO_PERSONALITYTRAIT;
iPersonality = NO_DISABILITY;
iAttitude = ATT_AGGRESSIVE;
iCurrentImpPage = IMP_FINISH;
// LaptopSaveInfo.iCurrentVoice = 1;
@@ -1460,10 +1460,10 @@ BOOLEAN CheckCharacterInputForEgg( void )
iExplosives = 99;
iMedical = 0;
iSkillA = AUTO_WEAPS;
iSkillB = MARTIALARTS;
iSkillA = AUTO_WEAPS_OT;
iSkillB = MARTIALARTS_OT;
iPersonality = NO_PERSONALITYTRAIT;
iPersonality = NO_DISABILITY;
iAttitude = ATT_LONER;
iCurrentImpPage = IMP_FINISH;
// LaptopSaveInfo.iCurrentVoice = 1;
@@ -1486,8 +1486,8 @@ BOOLEAN CheckCharacterInputForEgg( void )
iMechanical = 0;
iExplosives = 99;
iMedical = 0;
iSkillA = AMBIDEXT;
iSkillB = AUTO_WEAPS;
iSkillA = AMBIDEXT_OT;
iSkillB = AUTO_WEAPS_OT;
iPersonality = PSYCHO;
iAttitude = ATT_ASSHOLE;
iCurrentImpPage = IMP_FINISH;
@@ -1542,10 +1542,10 @@ BOOLEAN CheckCharacterInputForEgg( void )
iExplosives = 99;
iMedical = 60;
iSkillA = ELECTRONICS;
iSkillB = LOCKPICKING;
iSkillA = ELECTRONICS_OT;
iSkillB = LOCKPICKING_OT;
iPersonality = NO_PERSONALITYTRAIT;
iPersonality = NO_DISABILITY;
iAttitude = ATT_LONER;
iCurrentImpPage = IMP_FINISH;
// LaptopSaveInfo.iCurrentVoice = 1;
@@ -1575,7 +1575,7 @@ BOOLEAN CheckCharacterInputForEgg( void )
iSkillA = 0;
iSkillB = 0;
iPersonality = NO_PERSONALITYTRAIT;
iPersonality = NO_DISABILITY;
iAttitude = ATT_LONER;
iCurrentImpPage = IMP_FINISH;
LaptopSaveInfo.iIMPIndex = 54;
+87 -37
View File
@@ -19,6 +19,7 @@
#include "CharProfile.h"
#include "soldier profile type.h"
#include "IMP Compile Character.h"
#include "GameSettings.h"
#endif
@@ -33,13 +34,6 @@
#define IMP_CHARACTER_TRAIT__FONT FONT12ARIAL
#define IMP_CHARACTER_TRAIT__COLOR FONT_MCOLOR_WHITE
enum
{
IMP_CHARACTER_TRAIT__TITLE_TEXT=IMP_CHARACTER_TRAITS_NUMBER,
};
#define IMP_CHARACTER_1ST_COLUMN_START_X ( LAPTOP_SCREEN_UL_X + 15 )
#define IMP_CHARACTER_1ST_COLUMN_START_Y ( LAPTOP_SCREEN_WEB_UL_Y + 40 )
@@ -48,7 +42,7 @@ enum
#define IMP_CHARACTER_TRAIT__SPACE_BTN_BUTTONS 38
#define IMP_CHARACTER_TRAIT_NUMBER_TO_START_2ND_COLUMN 5
//#define IMP_CHARACTER_TRAIT_NUMBER_TO_START_2ND_COLUMN 5
#define IMP_CHARACTER_TRAIT__TEXT_OFFSET_X 65
#define IMP_CHARACTER_TRAIT__TEXT_OFFSET_Y 12
@@ -69,11 +63,11 @@ enum
BOOLEAN gfIST_Redraw2=FALSE;
BOOLEAN gfCharacterTraitQuestions[ IMP_CHARACTER_TRAITS_NUMBER ];
BOOLEAN gfCharacterTraitQuestions[ 15 ];
// these are the buttons for the questions
INT32 giIMPCharacterTraitAnswerButton[ IMP_CHARACTER_TRAITS_NUMBER ];
INT32 giIMPCharacterTraitAnswerButtonImage[ IMP_CHARACTER_TRAITS_NUMBER ];
INT32 giIMPCharacterTraitAnswerButton[ 15 ];
INT32 giIMPCharacterTraitAnswerButtonImage[ 15 ];
// this is the Done buttons
INT32 giIMPCharacterTraitFinsihButton;
@@ -82,6 +76,8 @@ INT32 giIMPCharacterTraitFinsihButtonImage;
//image handle
UINT32 guiIST_GreyGoldBox2;
MOUSE_REGION gMR_CharacterTraitHelpTextRegions[IMP_NUMBER_CHARACTER_TRAITS];
//*******************************************************************
//
// Function Prototypes
@@ -100,6 +96,7 @@ void IMPCharacterTraitDisplayCharacterTraits();
//void HandleLastSelectedCharacterTraits( INT8 bNewTrait );
BOOLEAN CameBackToCharacterTraitPageButNotFinished();
//ppp
void AssignCharacterTraitHelpText( UINT8 ubNumber );
//*******************************************************************
//
@@ -111,7 +108,7 @@ BOOLEAN CameBackToCharacterTraitPageButNotFinished();
void EnterIMPCharacterTrait( void )
{
// UINT32 uiCnt;
// UINT32 ubCnt;
VOBJECT_DESC VObjectDesc;
//add the skill trait buttons
@@ -144,11 +141,36 @@ void EnterIMPCharacterTrait( void )
if( iCurrentProfileMode != IMP__FINISH )
{
//Have the NONE trait initially selected
gfCharacterTraitQuestions[ IMP_CHARACTER_TRAIT_NORMAL ] = TRUE;
gfCharacterTraitQuestions[ 0 ] = TRUE;
}
HandleCharacterTraitButtonStates( );
if ( gGameOptions.fNewTraitSystem )
{
// add regions for help texts
UINT16 usPosX = IMP_CHARACTER_1ST_COLUMN_START_X + 62;
UINT16 usPosY = IMP_CHARACTER_1ST_COLUMN_START_Y + 8;
for( UINT8 ubCnt=0; ubCnt<(gGameOptions.fNewTraitSystem ? IMP_NUMBER_CHARACTER_TRAITS : IMP_NUMBER_ATTITUDES); ubCnt++ )
{
MSYS_DefineRegion( &gMR_CharacterTraitHelpTextRegions[ubCnt], ( usPosX ), ( usPosY ),
(usPosX + 156), ( usPosY + 17), MSYS_PRIORITY_HIGH,
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, NULL );
MSYS_AddRegion( &gMR_CharacterTraitHelpTextRegions[ubCnt] );
//Determine the next x location
if( ubCnt < (gGameOptions.fNewTraitSystem ? 6 : 5) )
usPosX = IMP_CHARACTER_1ST_COLUMN_START_X + 62;
else
usPosX = IMP_CHARACTER_2ND_COLUMN_START_X + 62;
//Determine the next Y location
if( ubCnt == (gGameOptions.fNewTraitSystem ? 6 : 5) )
usPosY = IMP_CHARACTER_2ND_COLUMN_START_Y + 8;
else
usPosY += IMP_CHARACTER_TRAIT__SPACE_BTN_BUTTONS;
}
}
}
@@ -158,7 +180,10 @@ void RenderIMPCharacterTrait( void )
RenderProfileBackGround();
//Display the title
DrawTextToScreen( gzIMPCharacterTraitText[IMP_CHARACTER_TRAITS_NUMBER], LAPTOP_SCREEN_UL_X - 111, iScreenHeightOffset + 53, ( LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X ), FONT14ARIAL, FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
if ( gGameOptions.fNewTraitSystem )
DrawTextToScreen( gzIMPCharacterTraitText[IMP_NUMBER_CHARACTER_TRAITS], LAPTOP_SCREEN_UL_X - 111, iScreenHeightOffset + 53, ( LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X ), FONT14ARIAL, FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
else
DrawTextToScreen( gzIMPAttitudesText[IMP_NUMBER_ATTITUDES], LAPTOP_SCREEN_UL_X - 111, iScreenHeightOffset + 53, ( LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X ), FONT14ARIAL, FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
IMPCharacterTraitDisplayCharacterTraits();
}
@@ -171,7 +196,7 @@ void ExitIMPCharacterTrait( void )
DeleteVideoObjectFromIndex( guiIST_GreyGoldBox2 );
//remove the skill buttons
for(iCnt = 0; iCnt < IMP_CHARACTER_TRAITS_NUMBER; iCnt++)
for(iCnt = 0; iCnt < (gGameOptions.fNewTraitSystem ? IMP_NUMBER_CHARACTER_TRAITS : IMP_NUMBER_ATTITUDES); iCnt++)
{
//if there is a button allocated
if( giIMPCharacterTraitAnswerButton[iCnt] != -1 )
@@ -179,6 +204,9 @@ void ExitIMPCharacterTrait( void )
RemoveButton(giIMPCharacterTraitAnswerButton[ iCnt ] );
UnloadButtonImage(giIMPCharacterTraitAnswerButtonImage[ iCnt ] );
}
if ( gGameOptions.fNewTraitSystem )
MSYS_RemoveRegion( &gMR_CharacterTraitHelpTextRegions[iCnt] );
}
RemoveButton( giIMPCharacterTraitFinsihButton );
@@ -205,7 +233,7 @@ void AddImpCharacterTraitButtons()
usPosX = IMP_CHARACTER_1ST_COLUMN_START_X;
usPosY = IMP_CHARACTER_1ST_COLUMN_START_Y;
for(iCnt = 0; iCnt < IMP_CHARACTER_TRAITS_NUMBER; iCnt++)
for(iCnt = 0; iCnt < (gGameOptions.fNewTraitSystem ? IMP_NUMBER_CHARACTER_TRAITS : IMP_NUMBER_ATTITUDES) ; iCnt++)
{
//reset
giIMPCharacterTraitAnswerButton[iCnt] = -1;
@@ -233,13 +261,13 @@ void AddImpCharacterTraitButtons()
//ButtonList[ giIMPCharacterTraitAnswerButton[ iCnt ] ]->ubSoundSchemeID = 0;
//Determine the next x location
if( iCnt < IMP_CHARACTER_TRAIT_NUMBER_TO_START_2ND_COLUMN )
if( iCnt < (gGameOptions.fNewTraitSystem ? 6 : 5) )
usPosX = IMP_CHARACTER_1ST_COLUMN_START_X;
else
usPosX = IMP_CHARACTER_2ND_COLUMN_START_X;
//Determine the next Y location
if( iCnt == IMP_CHARACTER_TRAIT_NUMBER_TO_START_2ND_COLUMN )
if( iCnt == (gGameOptions.fNewTraitSystem ? 6 : 5) )
usPosY = IMP_CHARACTER_2ND_COLUMN_START_Y;
else
usPosY += IMP_CHARACTER_TRAIT__SPACE_BTN_BUTTONS;
@@ -265,7 +293,7 @@ void BtnIMPCharacterTraitAnswerCallback(GUI_BUTTON *btn,INT32 reason)
void HandleIMPCharacterTraitAnswers( UINT32 uiSkillPressed )
{
UINT32 uiCnt;
INT8 bCnt;
//if we are DONE and are just reviewing
if( iCurrentProfileMode == IMP__FINISH )
@@ -274,13 +302,13 @@ void HandleIMPCharacterTraitAnswers( UINT32 uiSkillPressed )
}
//reset all other buttons
for( uiCnt=0; uiCnt<IMP_CHARACTER_TRAITS_NUMBER; uiCnt++ )
for( bCnt=0; bCnt < (gGameOptions.fNewTraitSystem ? IMP_NUMBER_CHARACTER_TRAITS : IMP_NUMBER_ATTITUDES); bCnt++ )
{
gfCharacterTraitQuestions[ uiCnt ] = FALSE;
gfCharacterTraitQuestions[ bCnt ] = FALSE;
}
//make sure its a valid character trait
if( uiSkillPressed > IMP_CHARACTER_TRAITS_NUMBER )
if( uiSkillPressed > (UINT32)(gGameOptions.fNewTraitSystem ? IMP_NUMBER_CHARACTER_TRAITS : IMP_NUMBER_ATTITUDES) )
{
Assert( 0 );
return;
@@ -315,26 +343,26 @@ void HandleIMPCharacterTraitAnswers( UINT32 uiSkillPressed )
void HandleCharacterTraitButtonStates( )
{
UINT32 uiCnt;
INT8 bCnt;
for( uiCnt=0; uiCnt<IMP_CHARACTER_TRAITS_NUMBER; uiCnt++ )
for( bCnt=0; bCnt < (gGameOptions.fNewTraitSystem ? IMP_NUMBER_CHARACTER_TRAITS : IMP_NUMBER_ATTITUDES); bCnt++ )
{
//if the skill is selected ( ie depressed )
if( gfCharacterTraitQuestions[ uiCnt ] )
if( gfCharacterTraitQuestions[ bCnt ] )
{
ButtonList[ giIMPCharacterTraitAnswerButton[ uiCnt ] ]->uiFlags |= BUTTON_CLICKED_ON;
ButtonList[ giIMPCharacterTraitAnswerButton[ bCnt ] ]->uiFlags |= BUTTON_CLICKED_ON;
}
else
{
ButtonList[ giIMPCharacterTraitAnswerButton[ uiCnt ] ]->uiFlags &= ~BUTTON_CLICKED_ON;
ButtonList[ giIMPCharacterTraitAnswerButton[ bCnt ] ]->uiFlags &= ~BUTTON_CLICKED_ON;
}
}
}
void IMPCharacterTraitDisplayCharacterTraits()
{
UINT32 uiCnt;
INT8 bCnt;
UINT16 usPosX, usPosY;
UINT16 usBoxPosX, usBoxPosY;
HVOBJECT hImageHandle;
@@ -345,13 +373,13 @@ void IMPCharacterTraitDisplayCharacterTraits()
usPosX = IMP_CHARACTER_1ST_COLUMN_START_X + IMP_CHARACTER_TRAIT__TEXT_OFFSET_X;
usPosY = IMP_CHARACTER_1ST_COLUMN_START_Y + IMP_CHARACTER_TRAIT__TEXT_OFFSET_Y;
for( uiCnt=0; uiCnt<IMP_CHARACTER_TRAITS_NUMBER; uiCnt++ )
for( bCnt=0; bCnt<(gGameOptions.fNewTraitSystem ? IMP_NUMBER_CHARACTER_TRAITS : IMP_NUMBER_ATTITUDES); bCnt++ )
{
usBoxPosX = usPosX - IMP_CHARACTER_TRAIT__GREY_BOX_OFFSET_X;
usBoxPosY = usPosY - IMP_CHARACTER_TRAIT__GREY_BOX_OFFSET_Y;
//if the trait is selected
if( gfCharacterTraitQuestions[ uiCnt ] )
if( gfCharacterTraitQuestions[ bCnt ] )
{
//Display the gold background box
BltVideoObject(FRAME_BUFFER, hImageHandle, 1, usBoxPosX, usBoxPosY, VO_BLT_SRCTRANSPARENCY,NULL);
@@ -363,16 +391,24 @@ void IMPCharacterTraitDisplayCharacterTraits()
}
//draw the text to the screenx
DrawTextToScreen( gzIMPCharacterTraitText[ uiCnt ], usPosX, usPosY, 0, IMP_CHARACTER_TRAIT__FONT, IMP_CHARACTER_TRAIT__COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
if ( gGameOptions.fNewTraitSystem )
DrawTextToScreen( gzIMPCharacterTraitText[ bCnt ], usPosX, usPosY, 0, IMP_CHARACTER_TRAIT__FONT, IMP_CHARACTER_TRAIT__COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
else
DrawTextToScreen( gzIMPAttitudesText[ bCnt ], usPosX, usPosY, 0, IMP_CHARACTER_TRAIT__FONT, IMP_CHARACTER_TRAIT__COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
if ( gGameOptions.fNewTraitSystem )
{
AssignCharacterTraitHelpText( bCnt );
}
//Determine the next x location
if( uiCnt < IMP_CHARACTER_TRAIT_NUMBER_TO_START_2ND_COLUMN )
if( bCnt < (gGameOptions.fNewTraitSystem ? 6 : 5) )
usPosX = IMP_CHARACTER_1ST_COLUMN_START_X + IMP_CHARACTER_TRAIT__TEXT_OFFSET_X;
else
usPosX = IMP_CHARACTER_2ND_COLUMN_START_X + IMP_CHARACTER_TRAIT__TEXT_OFFSET_X;
//Determine the next Y location
if( uiCnt == IMP_CHARACTER_TRAIT_NUMBER_TO_START_2ND_COLUMN )
if( bCnt == (gGameOptions.fNewTraitSystem ? 6 : 5) )
usPosY = IMP_CHARACTER_2ND_COLUMN_START_Y + IMP_CHARACTER_TRAIT__TEXT_OFFSET_Y;
else
usPosY += IMP_CHARACTER_TRAIT__SPACE_BTN_BUTTONS;
@@ -429,18 +465,32 @@ BOOLEAN CameBackToCharacterTraitPageButNotFinished()
INT8 iChosenCharacterTrait()
{
UINT32 uiCnt;
INT8 bCnt;
INT8 iCharacterTraitNumber = 0;
//loop through all the buttons and reset them
for( uiCnt=0; uiCnt<IMP_CHARACTER_TRAITS_NUMBER; uiCnt++ )
for( bCnt=0; bCnt<(gGameOptions.fNewTraitSystem ? IMP_NUMBER_CHARACTER_TRAITS : IMP_NUMBER_ATTITUDES); bCnt++ )
{
//if the trait is selected
if( gfCharacterTraitQuestions[ uiCnt ] )
if( gfCharacterTraitQuestions[ bCnt ] )
{
iCharacterTraitNumber = uiCnt;
iCharacterTraitNumber = bCnt;
}
}
return( iCharacterTraitNumber );
}
void AssignCharacterTraitHelpText( UINT8 ubNumber )
{
CHAR16 apStr[ 2000 ];
swprintf( apStr, L"" );
swprintf( apStr, gzIMPNewCharacterTraitsHelpTexts[ubNumber] );
// Set region help text
SetRegionFastHelpText( &(gMR_CharacterTraitHelpTextRegions[ubNumber]), apStr );
SetRegionHelpEndCallback( &gMR_CharacterTraitHelpTextRegions[ubNumber], MSYS_NO_CALLBACK );
return;
}
+27 -8
View File
@@ -10,23 +10,42 @@ void HandleIMPCharacterTrait( void );
//enum
//{
typedef enum
{
IMP_ATTITUDE_NORMAL = 0,
IMP_ATTITUDE_FRIENDLY,
IMP_ATTITUDE_LONER,
IMP_ATTITUDE_OPTIMIST,
IMP_ATTITUDE_PESSIMIST,
IMP_ATTITUDE_AGGRESSIVE,
IMP_ATTITUDE_ARROGANT,
IMP_ATTITUDE_BIGSHOT,
IMP_ATTITUDE_ASSHOLE,
IMP_ATTITUDE_COWARD,
IMP_NUMBER_ATTITUDES,
};
typedef enum
{
IMP_CHARACTER_TRAIT_NORMAL = 0,
IMP_CHARACTER_TRAIT_FRIENDLY,
IMP_CHARACTER_TRAIT_SOCIABLE,
IMP_CHARACTER_TRAIT_LONER,
IMP_CHARACTER_TRAIT_OPTIMIST,
IMP_CHARACTER_TRAIT_PESSIMIST,
IMP_CHARACTER_TRAIT_ASSERTIVE,
IMP_CHARACTER_TRAIT_INTELLECTUAL,
IMP_CHARACTER_TRAIT_PRIMITIVE,
IMP_CHARACTER_TRAIT_AGGRESSIVE,
IMP_CHARACTER_TRAIT_ARROGANT,
IMP_CHARACTER_TRAIT_BIGSHOT,
IMP_CHARACTER_TRAIT_ASSHOLE,
IMP_CHARACTER_TRAIT_COWARD,
IMP_CHARACTER_TRAITS_NUMBER,
} ;
IMP_CHARACTER_TRAIT_PHLEGMATIC,
IMP_CHARACTER_TRAIT_DAUNTLESS,
IMP_CHARACTER_TRAIT_PACIFIST,
IMP_CHARACTER_TRAIT_MALICIOUS,
IMP_CHARACTER_TRAIT_SHOWOFF,
IMP_NUMBER_CHARACTER_TRAITS,
};
INT8 iChosenCharacterTrait();
STR16 gzIMPCharacterTraitText[];
STR16 gzIMPAttitudesText[];
#endif
@@ -102,7 +102,7 @@ void WriteIMPCharacterAndDisabilityEntranceText( void )
DisplayWrappedString( LAPTOP_SCREEN_UL_X + 106, LAPTOP_SCREEN_WEB_UL_Y + 63, ( 400 - 100 ), 2, FONT12ARIAL, FONT_WHITE, pCharacterTraitBeginIMPStrings[ 1 ],FONT_BLACK,FALSE,CENTER_JUSTIFIED);
// The disability part
DisplayWrappedString( LAPTOP_SCREEN_UL_X + 106, LAPTOP_SCREEN_WEB_UL_Y + 145, ( 400 - 100 ), 2, FONT12ARIAL, FONT_WHITE, pCharacterTraitBeginIMPStrings[ 2 ],FONT_BLACK,FALSE,CENTER_JUSTIFIED);
DisplayWrappedString( LAPTOP_SCREEN_UL_X + 106, LAPTOP_SCREEN_WEB_UL_Y + 148, ( 400 - 100 ), 2, FONT12ARIAL, FONT_WHITE, pCharacterTraitBeginIMPStrings[ 2 ],FONT_BLACK,FALSE,CENTER_JUSTIFIED);
return;
}
+51 -6
View File
@@ -23,8 +23,11 @@
#include "IMP Begin Screen.h"
#include "WCheck.h"
#include "Animation Data.h"
#include "GameSettings.h"
#endif
#include "IMP Confirm.h"
enum
{
PINKSKIN,
@@ -170,7 +173,7 @@ BOOLEAN gfIST_Redraw4=FALSE;
BOOLEAN fReDrawColorScreenFlag;
BOOLEAN bBigBody;
BOOLEAN bBadAss;
BOOLEAN bBadAss = FALSE;
// these are the buttons for the arrows
INT32 giIMPColorChoiceButton[ 11 ];
@@ -224,8 +227,33 @@ void EnterIMPColorChoice( void )
bBigBody = FALSE;
bBadAss = FALSE;
if( fCharacterIsMale )
{
if ( gIMPMaleValues[ iPortraitNumber ].uiIndex == iPortraitNumber && gIMPMaleValues[ iPortraitNumber ].bSex == 0 )
{
iCurrentSkin = gIMPMaleValues[ iPortraitNumber ].iCurrentSkin;
iCurrentHair = gIMPMaleValues[ iPortraitNumber ].iCurrentHair;
iCurrentShirt = gIMPMaleValues[ iPortraitNumber ].iCurrentShirt;
iCurrentPants = gIMPMaleValues[ iPortraitNumber ].iCurrentPants;
bBigBody = gIMPMaleValues[ iPortraitNumber ].bBigBody;
}
}
else
{
if ( gIMPFemaleValues[ iPortraitNumber ].uiIndex == iPortraitNumber && gIMPFemaleValues[ iPortraitNumber ].bSex == 1 )
{
iCurrentSkin = gIMPFemaleValues[ iPortraitNumber ].iCurrentSkin;
iCurrentHair = gIMPFemaleValues[ iPortraitNumber ].iCurrentHair;
iCurrentShirt = gIMPFemaleValues[ iPortraitNumber ].iCurrentShirt;
iCurrentPants = gIMPFemaleValues[ iPortraitNumber ].iCurrentPants;
bBigBody = gIMPFemaleValues[ iPortraitNumber ].bBigBody;
}
}
// Based on the portrait chosen, set the default colors, when colors
switch( iPortraitNumber )
/* switch( iPortraitNumber )
{
case( 0 ):
iCurrentSkin = 3;
@@ -327,7 +355,7 @@ void EnterIMPColorChoice( void )
iCurrentPants = 5;
break;
}
*/
//add the buttons
AddIMPColorChoiceButtons();
@@ -451,8 +479,8 @@ void ExitIMPColorChoice( void )
DeleteVideoObjectFromIndex( guiIST_GreyGoldBox4 );
//remove the skin buttons
for(iCnt = 0; iCnt < ( fCharacterIsMale ? 11 : 8); iCnt++) // fix of bug, removing unasigned buttons when female
//remove the buttons
for(iCnt = 0; iCnt < ( fCharacterIsMale ? 11 : 8); iCnt++)
{
//if there is a button allocated
if( giIMPColorChoiceButton[iCnt] != -1 )
@@ -643,7 +671,16 @@ void AddIMPColorChoiceButtons()
MSYS_SetBtnUserData( giIMPColorChoiceButton[10], 0, 10 );
SetButtonCursor( giIMPColorChoiceButton[10], CURSOR_WWW);
SetButtonFastHelpText( giIMPColorChoiceButton[ 10 ], gzIMPColorChoosingText[4]);
CHAR16 sBadAssHelpText[200];
if( gGameOptions.fNewTraitSystem )
{
swprintf( sBadAssHelpText, L"%s%s", gzIMPColorChoosingText[4], gzIMPColorChoosingText[5]);
}
else
{
swprintf( sBadAssHelpText, L"%s", gzIMPColorChoosingText[4]);
}
SetButtonFastHelpText( giIMPColorChoiceButton[ 10 ], sBadAssHelpText );
// Make respective button initialy pressed
@@ -1150,4 +1187,12 @@ BOOLEAN bBadAssSelected()
return( bBadAss );
else
return( FALSE );
}
void SetBadAss( BOOLEAN fSetTrue )
{
if ( fSetTrue )
bBadAss = TRUE;
else
bBadAss = FALSE;
}
+2
View File
@@ -17,4 +17,6 @@ INT8 iChosenPants();
BOOLEAN bBigBodySelected();
BOOLEAN bBadAssSelected();
void SetBadAss( BOOLEAN fSetTrue );
#endif
+179 -440
View File
@@ -34,12 +34,15 @@
#include "Animation Data.h"
#include "random.h"
#include "LaptopSave.h"
// These 3 added - SANDRO
// These 4 added - SANDRO
#include "IMP Character Trait.h"
#include "IMP Disability Trait.h"
#include "IMP Color Choosing.h"
#include "IMP Minor Trait.h"
#endif
#include "IMP Confirm.h"
// how many times should a 'die' be rolled for skills of the same type?
#define HOW_MANY_ROLLS_FOR_SAME_SKILL_CHECK 20
@@ -57,8 +60,9 @@ INT32 iLastElementInPersonalityList = 0;
extern BOOLEAN fLoadingCharacterForPreviousImpProfile;
// positions of the face x and y for eyes and mouth for the 10 portraits
INT16 sFacePositions[ NUMBER_OF_PLAYER_PORTRAITS ][ 4 ]=
{
INT16 sFacePositions[ NUMBER_OF_PLAYER_PORTRAITS ][ 4 ];
/*{
{0,0,0,0},
{0,0,0,0},
{0,0,0,0},
@@ -116,7 +120,7 @@ STR8 pPlayerSelectedBigFaceFileNames[ NUMBER_OF_PLAYER_PORTRAITS ]=
"Faces\\BigFaces\\214.sti",
"Faces\\BigFaces\\215.sti",
};
*/
// function declarations
void SelectMercFace( void );
@@ -135,8 +139,6 @@ void CreateACharacterFromPlayerEnteredStats( void )
// of changes and revisions that have been made to personalities and attitudes.
CreatePlayersPersonalitySkillsAndAttitude();
// copy over full name
wcscpy( gMercProfiles[ LaptopSaveInfo.iIMPIndex ].zName, pFullName );
@@ -174,10 +176,14 @@ void CreateACharacterFromPlayerEnteredStats( void )
// personality
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bPersonalityTrait = ( INT8 )iPersonality;
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bDisability = ( INT8 )iPersonality;
// attitude
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bAttitude = ( INT8 )iAttitude;
// SANDRO - decide here, if we use the default attitude or the new so called Character Trait for new traits
if ( gGameOptions.fNewTraitSystem)
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bCharacterTrait = ( INT8 )iAttitude;
else
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bAttitude = ( INT8 )iAttitude;
// WDS: Advanced start
//gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bExpLevel = gGameExternalOptions.ubIMPStartingLevel;
@@ -222,7 +228,7 @@ BOOLEAN DoesCharacterHaveAPersoanlity( void )
{
if( iPersonality != NO_PERSONALITYTRAIT )
if( iPersonality != NO_DISABILITY )
{
// yep
return ( TRUE );
@@ -242,7 +248,7 @@ BOOLEAN DoesCharacterHaveAPersoanlity( void )
return( FALSE );
// simply checks if caracter has a personality other than normal
if( iPersonality != NO_PERSONALITYTRAIT )
if( iPersonality != NO_DISABILITY )
{
// yep
return ( TRUE );
@@ -259,86 +265,8 @@ BOOLEAN DoesCharacterHaveAPersoanlity( void )
void CreatePlayerAttitude( void )
{
// We no longer need this - SANDRO
/*if(gGameSettings.fOptions[TOPTION_USE_RANDOM_PERSONALITY] == TRUE)
{
AddAnAttitudeToAttitudeList( ATT_OPTIMIST );
AddAnAttitudeToAttitudeList( ATT_LONER );
AddAnAttitudeToAttitudeList( ATT_FRIENDLY );
AddAnAttitudeToAttitudeList( ATT_ARROGANT );
AddAnAttitudeToAttitudeList( ATT_NORMAL );
AddAnAttitudeToAttitudeList( ATT_ASSHOLE );
AddAnAttitudeToAttitudeList( ATT_COWARD );
AddAnAttitudeToAttitudeList( ATT_AGGRESSIVE );
AddAnAttitudeToAttitudeList( ATT_PESSIMIST );
AddAnAttitudeToAttitudeList( ATT_BIG_SHOT );
// DLETED UNUSED PART OF THE CODE - SANDRO
// this function will 'roll a die' and decide if any attitude does exists
INT32 iDiceValue = 0;
INT32 iCounter = 0, iCounter2 = 0;
INT32 iAttitudeHits[NUM_ATTITUDES] = { 0 };
INT32 iHighestHits = 0;
INT32 iNumAttitudesWithHighestHits = 0;
iAttitude = ATT_NORMAL;
if ( iLastElementInAttitudeList == 0 )
{
return;
}
// count # of hits for each attitude
for ( iCounter = 0; iCounter < iLastElementInAttitudeList; iCounter++ )
{
iAttitudeHits[ AttitudeList[ iCounter ] ]++;
}
// find highest # of hits for any attitude
for ( iCounter = 0; iCounter < NUM_ATTITUDES; iCounter++ )
{
if ( iAttitudeHits[ iCounter ] )
{
if ( iAttitudeHits[ iCounter ] > iHighestHits )
{
iHighestHits = __max( iHighestHits, iAttitudeHits[ iCounter ] );
iNumAttitudesWithHighestHits = 1;
}
else if ( iAttitudeHits[ iCounter ] == iHighestHits )
{
iNumAttitudesWithHighestHits++;
}
}
}
// roll dice
iDiceValue = Random( iNumAttitudesWithHighestHits + 1 );
// find attitude
for ( iCounter = 0; iCounter < NUM_ATTITUDES; iCounter++ )
{
if ( iAttitudeHits[ iCounter ] == iHighestHits )
{
if ( iCounter2 == iDiceValue )
{
// this is it!
iAttitude = iCounter2;
break;
}
else
{
// one of the next attitudes...
iCounter2++;
}
}
}
}
else
{
iAttitude = gGameExternalOptions.iCustomAttitude;
}*/
// Chosen by ourselves - SANDRO
iAttitude = iChosenCharacterTrait();
}
@@ -382,7 +310,7 @@ void ClearAllSkillsList( void )
{
INT32 iLoop;
for ( iLoop = 0; iLoop < iLastElementInSkillsList; iLoop++ )
for ( iLoop = 0; iLoop < ATTITUDE_LIST_SIZE; iLoop++ ) // SANDRO - better clear everything to be sure
{
SkillsList[ iLoop ] = 0;
}
@@ -445,132 +373,113 @@ void ValidateSkillsList( void )
if ( pProfile->bMechanical == 0 )
{
// without mechanical, electronics is useless
iIndex = FindSkillInSkillsList( ELECTRONICS );
if ( iIndex != -1 )
// Electronics/Technician check - SANDRO
if ( gGameOptions.fNewTraitSystem )
{
pProfile->bMechanical = 1;
iIndex = FindSkillInSkillsList( TECHNICIAN_NT );
if ( iIndex != -1 )
pProfile->bMechanical = 1;
}
else
{
iIndex = FindSkillInSkillsList( ELECTRONICS_OT );
if ( iIndex != -1 )
pProfile->bMechanical = 1;
iIndex = FindSkillInSkillsList( LOCKPICKING_OT );
if ( iIndex != -1 )
pProfile->bMechanical = 1;
}
}
// Kaiden using UB's code, lockpicking can't be removed from the list "yet".
// special check for lockpicking
//iValue = pProfile->bMechanical;
//iValue = ( iValue * pProfile->bWisdom ) / 100;
//iValue = ( iValue * pProfile->bDexterity ) / 100;
//if ( iValue + gbSkillTraitBonus[ LOCKPICKING ] < 50 )
//{
// // not good enough for lockpicking!
//
// // so is lockpicking
// iIndex = FindSkillInSkillsList( LOCKPICKING );
// while ( iIndex != -1 )
// {
// RemoveSkillFromSkillsList( iIndex );
// iIndex = FindSkillInSkillsList( LOCKPICKING );
// }
//}
// SANDRO - added to give 1 medical skill to doctors
if ( pProfile->bMedical == 0 && gGameOptions.fNewTraitSystem )
{
// without medical, Doctor trait is useless
iIndex = FindSkillInSkillsList( DOCTOR_NT );
if ( iIndex != -1 )
pProfile->bMedical = 1;
}
// SANDRO - added to give 1 explosive skill to dmolitions
if ( pProfile->bExplosive == 0 && gGameOptions.fNewTraitSystem )
{
iIndex = FindSkillInSkillsList( DEMOLITIONS_NT );
if ( iIndex != -1 )
pProfile->bExplosive = 1;
}
// SANDRO - added to give 1 Leadership skill to Squadleaders
if ( pProfile->bLeadership == 0 && gGameOptions.fNewTraitSystem )
{
// without medical, Doctor trait is useless
iIndex = FindSkillInSkillsList( SQUADLEADER_NT );
if ( iIndex != -1 )
pProfile->bLeadership = 1;
}
if ( pProfile->bMarksmanship == 0 )
{
// without marksmanship, the following traits are useless:
// auto weapons, heavy weapons
iIndex = FindSkillInSkillsList( AUTO_WEAPS );
if( iIndex != -1 )
// auto weapons, heavy weapons, sniper, ranger, gunslinger
if ( gGameOptions.fNewTraitSystem ) // old/new traits - SANDRO
{
//RemoveSkillFromSkillsList( iIndex );
//iIndex = FindSkillInSkillsList( AUTO_WEAPS );
pProfile->bMarksmanship = 1;
iIndex = FindSkillInSkillsList( AUTO_WEAPONS_NT );
if( iIndex != -1 )
pProfile->bMarksmanship = 1;
iIndex = FindSkillInSkillsList( HEAVY_WEAPONS_NT );
if( iIndex != -1 )
pProfile->bMarksmanship = 1;
iIndex = FindSkillInSkillsList( SNIPER_NT );
if( iIndex != -1 )
pProfile->bMarksmanship = 1;
iIndex = FindSkillInSkillsList( RANGER_NT );
if( iIndex != -1 )
pProfile->bMarksmanship = 1;
iIndex = FindSkillInSkillsList( GUNSLINGER_NT );
if( iIndex != -1 )
pProfile->bMarksmanship = 1;
}
// so is lockpicking
iIndex = FindSkillInSkillsList( HEAVY_WEAPS );
if( iIndex != -1 )
else
{
//RemoveSkillFromSkillsList( iIndex );
//iIndex = FindSkillInSkillsList( HEAVY_WEAPS );
pProfile->bMarksmanship = 1;
iIndex = FindSkillInSkillsList( AUTO_WEAPS_OT );
if( iIndex != -1 )
{
//RemoveSkillFromSkillsList( iIndex );
//iIndex = FindSkillInSkillsList( AUTO_WEAPS_OT );
pProfile->bMarksmanship = 1;
}
iIndex = FindSkillInSkillsList( HEAVY_WEAPS_OT );
if( iIndex != -1 )
{
//RemoveSkillFromSkillsList( iIndex );
//iIndex = FindSkillInSkillsList( HEAVY_WEAPONS_NT );
pProfile->bMarksmanship = 1;
}
}
}
}
void CreatePlayerSkills( void )
{
// this function will 'roll a die' and decide if any attitude does exists
INT32 iDiceValue = 0;
ValidateSkillsList();
/* Kaiden - Commented out in UB to skip the whole random skill thing
// roll dice
iDiceValue = Random( iLastElementInSkillsList );
// set attitude
iSkillA = SkillsList[ iDiceValue ];
// second dice value
iDiceValue = Random( iLastElementInSkillsList );
iSkillB = SkillsList[ iDiceValue ];
*/
// Kaiden: This section was added in it's place:
// Kaiden: This section was added in it's place:
// SANDRO - Note: this is actually used only for old trait system
if( iLastElementInSkillsList > 0 )
{
// set attitude
iSkillA = SkillsList[ 0 ];
}
if( iLastElementInSkillsList > 1 )
{
iSkillB = SkillsList[ 1 ];
}
else
{
iSkillB = SkillsList[ 0 ];
}
// allow expert level for generated merc so you CAN have two of the same
// but there is no such thing as expert level for electronics
while ( iSkillA == iSkillB && ( iSkillB == ELECTRONICS || iSkillB == AMBIDEXT ) )
{
// remove electronics as an option and roll again
RemoveSkillFromSkillsList( iDiceValue );
if ( iLastElementInSkillsList == 0 )
{
// ok, only one trait!
iSkillB = NO_SKILLTRAIT;
break;
}
else
{
iDiceValue = Random( iLastElementInSkillsList );
iSkillB = SkillsList[ iDiceValue ];
}
}
/*
// are the same,
// reroll until different, or until ATTITUDE_LIST_SIZE times
iSkillB = Random( iLastElementInSkillsList + 1 );
while( (iSkillA == iSkillB ) && ( iCounter < HOW_MANY_ROLLS_FOR_SAME_SKILL_CHECK ) )
{
// increment counter
iCounter++;
// next random
iSkillB = Random( iLastElementInSkillsList + 1 );
}
if( iCounter == ATTITUDE_LIST_SIZE )
{
iSkillB = NO_SKILLTRAIT;
}
return;
*/
}
@@ -604,82 +513,15 @@ void AddAPersonalityToPersonalityList( INT8 bPersonlity )
void CreatePlayerPersonality( void )
{
// DELETED UNUSED PART OF THE CODE - SANDRO
// Kaiden: Added for optional Mercenary personalities and attitudes
// We don't need this - SANDRO
/*if(gGameSettings.fOptions[TOPTION_USE_RANDOM_PERSONALITY] == TRUE)
{
// Kaiden: More chances for Psycho and Normal.
AddAPersonalityToPersonalityList( NO_PERSONALITYTRAIT );
AddAPersonalityToPersonalityList( PSYCHO );
AddAPersonalityToPersonalityList( FORGETFUL );
AddAPersonalityToPersonalityList( NERVOUS );
AddAPersonalityToPersonalityList( HEAT_INTOLERANT );
AddAPersonalityToPersonalityList( NO_PERSONALITYTRAIT );
AddAPersonalityToPersonalityList( PSYCHO );
AddAPersonalityToPersonalityList( CLAUSTROPHOBIC );
AddAPersonalityToPersonalityList( NONSWIMMER );
AddAPersonalityToPersonalityList( FEAR_OF_INSECTS );
AddAPersonalityToPersonalityList( NO_PERSONALITYTRAIT );
AddAPersonalityToPersonalityList( PSYCHO );
AddAPersonalityToPersonalityList( FORGETFUL );
AddAPersonalityToPersonalityList( NERVOUS );
AddAPersonalityToPersonalityList( HEAT_INTOLERANT );
AddAPersonalityToPersonalityList( NO_PERSONALITYTRAIT );
AddAPersonalityToPersonalityList( PSYCHO );
AddAPersonalityToPersonalityList( CLAUSTROPHOBIC );
AddAPersonalityToPersonalityList( NONSWIMMER );
AddAPersonalityToPersonalityList( FEAR_OF_INSECTS );
INT32 iDiceValue = 0;
INT32 iCounter = 0;
INT32 iCounter2 = 0;
// Kaiden: Roll dice 20 times just to be on the safe side
// was getting too many repeats. Will end up scrapping
// rand() later anyway so will worry about fixing it then.
for (iCounter2 = 0; iCounter2 < 20; iCounter2++)
{
iDiceValue = Random( iLastElementInPersonalityList + 1 );
}
// Kaiden two chances to avoid a normal personality. As IMP
// says, They check it twice just to make sure :p
for( iCounter = 0; iCounter < iLastElementInPersonalityList; iCounter++ )
{
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("iDiceValue = %d",iDiceValue));
if( PersonalityList[ iDiceValue ] == NO_PERSONALITYTRAIT )
{
//Kaiden: Roll one more time for good measure:
iDiceValue = Random( iLastElementInPersonalityList + 1 );
}
}
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("And our Personality is... = %d",PersonalityList[ iDiceValue ]));
iPersonality = PersonalityList[ iDiceValue ];
}
else
{
iPersonality = gGameExternalOptions.iCustomPersonality;
}*/
// Chosen by ourselves - SANDRO
iPersonality = iChosenDisabilityTrait();
return;
}
void CreatePlayersPersonalitySkillsAndAttitude( void )
{
// creates personality, skills and attitudes from curretly built list
// personality
@@ -731,12 +573,52 @@ void ResetIncrementCharacterAttributes( void )
void SelectMercFace( void )
{
/*
UINT32 cnt;
for ( cnt = 0; cnt < MAX_NEW_IMP_PORTRAITS; cnt++ )
{
sFacePositions[ cnt ][ 0 ] = 0;
sFacePositions[ cnt ][ 1 ] = 0;
sFacePositions[ cnt ][ 2 ] = 0;
sFacePositions[ cnt ][ 3 ] = 0;
}
*/
// this procedure will select the approriate face for the merc and save offsets
// grab face filename
// strcpy( gMercProfiles[ LaptopSaveInfo.iIMPIndex ].ubUnusedFaceFileName , pPlayerSelectedFaceFileNames[ iPortraitNumber ]);
if( fCharacterIsMale )
{
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].ubFaceIndex = 200 + ( UINT8 )iPortraitNumber;
// eyes
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].usEyesX = sFacePositions[ gIMPMaleValues[iPortraitNumber].uiEyeXPositions ][ 0 ];
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].usEyesY = sFacePositions[ gIMPMaleValues[iPortraitNumber].uiEyeYPositions ][ 1 ];
// mouth
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].usMouthX = sFacePositions[ gIMPMaleValues[iPortraitNumber].uiMouthXPositions ][ 2 ];
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].usMouthY = sFacePositions[ gIMPMaleValues[iPortraitNumber].uiMouthYPositions ][ 3 ];
}
else
{
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].ubFaceIndex = 200 + ( UINT8 )iPortraitNumber;
// eyes
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].usEyesX = sFacePositions[ gIMPFemaleValues[iPortraitNumber].uiEyeXPositions ][ 0 ];
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].usEyesY = sFacePositions[ gIMPFemaleValues[iPortraitNumber].uiEyeYPositions ][ 1 ];
// mouth
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].usMouthX = sFacePositions[ gIMPFemaleValues[iPortraitNumber].uiMouthXPositions ][ 2 ];
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].usMouthY = sFacePositions[ gIMPFemaleValues[iPortraitNumber].uiMouthYPositions ][ 3 ];
}
// now the offsets
/*
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].ubFaceIndex = 200 + ( UINT8 )iPortraitNumber;
// eyes
@@ -746,7 +628,7 @@ void SelectMercFace( void )
// mouth
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].usMouthX = sFacePositions[ iPortraitNumber ][ 2 ];
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].usMouthY = sFacePositions[ iPortraitNumber ][ 3 ];
*/
// set merc skins and hair color
SetMercSkinAndHairColors( );
return;
@@ -754,40 +636,7 @@ void SelectMercFace( void )
void SetMercSkinAndHairColors( void )
{
// We don't need this - SANDRO
/*enum{ PINKSKIN, TANSKIN, DARKSKIN, BLACKSKIN, NUMSKINS };
enum{ BROWNHEAD, BLACKHEAD, //black skin (only this line )
WHITEHEAD, //dark skin (this line plus all above)
BLONDHEAD, REDHEAD, //pink/tan skin (this line plus all above )
NUMHEADS
};
enum
{
WHITEVEST,
GYELLOWSHIRT,
YELLOWVEST,
GREYVEST,
BROWNVEST,
PURPLESHIRT,
BLUEVEST,
JEANVEST,
GREENVEST,
REDVEST,
BLACKSHIRT,
NUMSHIRTS
};//shirts
enum
{
BLUEPANTS,
BLACKPANTS,
JEANPANTS,
TANPANTS,
BEIGEPANTS,
GREENPANTS,
NUMPANTS
};//pants*/
// DELETED UNUSED PART OF THE CODE - SANDRO
// skin strings
STR sSkinStrings[]={
@@ -832,117 +681,8 @@ void SetMercSkinAndHairColors( void )
"GREENPANTS",
};//pants
// We don't need this - SANDRO
// given the portrait number, set the merc's skin and hair color
/*INT16 sSkinColor = 0, sHairColor = 0, sShirtColor, sPantColor;
// DELETED UNUSED PART OF THE CODE - SANDRO
switch( iPortraitNumber )
{
case( 0 ):
sSkinColor = BLACKSKIN;
sHairColor = BROWNHEAD;
sShirtColor = JEANVEST;
sPantColor = JEANPANTS;
break;
case( 1 ):
sSkinColor = TANSKIN;
sHairColor = BROWNHEAD;
sShirtColor = BROWNVEST;
sPantColor = TANPANTS;
break;
case( 2 ):
sSkinColor = TANSKIN;
sHairColor = BROWNHEAD;
sShirtColor = WHITEVEST;
sPantColor = BLUEPANTS;
break;
case( 3 ):
sSkinColor = DARKSKIN;
sHairColor = BROWNHEAD;
sShirtColor = WHITEVEST;
sPantColor = BLACKPANTS;
break;
case( 4 ):
sSkinColor = TANSKIN;
sHairColor = BROWNHEAD;
sShirtColor = GREYVEST;
sPantColor = GREENPANTS;
break;
case( 5 ):
sSkinColor = DARKSKIN;
sHairColor = BLACKHEAD;
sShirtColor = GREYVEST;
sPantColor = BLACKPANTS;
break;
case( 6 ):
sSkinColor = TANSKIN;
sHairColor = BROWNHEAD;
sShirtColor = BROWNVEST;
sPantColor = BLUEPANTS;
break;
case( 7 ):
sSkinColor = TANSKIN;
sHairColor = BROWNHEAD;
sShirtColor = BLACKSHIRT;
sPantColor = BLACKPANTS;
break;
case( 8 ):
sSkinColor = TANSKIN;
sHairColor = BROWNHEAD;
sShirtColor = BROWNVEST;
sPantColor = TANPANTS;
break;
case( 9 ):
sSkinColor = PINKSKIN;
sHairColor = BROWNHEAD;
sShirtColor = BROWNVEST;
sPantColor = BEIGEPANTS;
break;
case( 10 ):
sSkinColor = TANSKIN;
sHairColor = BLACKHEAD;
sShirtColor = BROWNVEST;
sPantColor = BLACKPANTS;
break;
case( 11 ):
sSkinColor = TANSKIN;
sHairColor = BLACKHEAD;
sShirtColor = BLACKSHIRT;
sPantColor = BLACKPANTS;
break;
case( 12 ):
sSkinColor = PINKSKIN;
sHairColor = BROWNHEAD;
sShirtColor = WHITEVEST;
sPantColor = GREENPANTS;
break;
case( 13 ):
sSkinColor = BLACKSKIN;
sHairColor = BROWNHEAD;
sShirtColor = GREYVEST;
sPantColor = BLACKPANTS;
break;
case( 14 ):
sSkinColor = TANSKIN;
sHairColor = REDHEAD;
sShirtColor = WHITEVEST;
sPantColor = JEANPANTS;
break;
case( 15 ):
sSkinColor = TANSKIN;
sHairColor = BLONDHEAD;
sShirtColor = BROWNVEST;
sPantColor = GREENPANTS;
break;
}
// now set them
strcpy( gMercProfiles[ LaptopSaveInfo.iIMPIndex ].HAIR, sHairStrings[ sHairColor ] );
strcpy( gMercProfiles[ LaptopSaveInfo.iIMPIndex ].SKIN, sSkinStrings[ sSkinColor ] );
strcpy( gMercProfiles[ LaptopSaveInfo.iIMPIndex ].PANTS, sPantStrings[ sPantColor ] );
strcpy( gMercProfiles[ LaptopSaveInfo.iIMPIndex ].VEST, sShirtStrings[ sShirtColor ] );*/
// Cosen colors by ourselves - SANDRO
strcpy( gMercProfiles[ LaptopSaveInfo.iIMPIndex ].HAIR, sHairStrings[ iChosenHair() ] );
strcpy( gMercProfiles[ LaptopSaveInfo.iIMPIndex ].SKIN, sSkinStrings[ iChosenSkin() ] );
strcpy( gMercProfiles[ LaptopSaveInfo.iIMPIndex ].PANTS, sPantStrings[ iChosenPants() ] );
@@ -957,9 +697,12 @@ void HandleMercStatsForChangesInFace( )
return;
}
//add the skills to the skills list
//add the skills (major) to the skills list
AddSelectedSkillsToSkillsList();
if ( gGameOptions.fNewTraitSystem ) // SANDRO - add also minor traits
AddSelectedMinorTraitsToSkillsList();
// now figure out skills
CreatePlayerSkills();
@@ -969,60 +712,56 @@ void HandleMercStatsForChangesInFace( )
// male
// big or regular
// Madd - don't override the skills - override the body type instead
if( ShouldThisMercHaveABigBody() && iSkillA != MARTIALARTS && iSkillB != MARTIALARTS )
// this should not happen any more, we don't even offer the martial arts to big mercs - SANDRO
//if( ShouldThisMercHaveABigBody() && iSkillA != MARTIALARTS_OT && iSkillB != MARTIALARTS_OT )
if( ShouldThisMercHaveABigBody() ) // still added a safety check - SANDRO
{
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].ubBodyType = BIGMALE;
if (!gGameOptions.fNewTraitSystem) // SANDRO - traits
{
if (iSkillA == MARTIALARTS_OT )
iSkillA = HANDTOHAND_OT;
if (iSkillB == MARTIALARTS_OT )
iSkillB = HANDTOHAND_OT;
}
//if( iSkillA == MARTIALARTS )
//{
// iSkillA = HANDTOHAND;
//}
//if( iSkillB == MARTIALARTS )
//{
// iSkillB = HANDTOHAND;
//}
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].ubBodyType = BIGMALE;
}
else
{
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].ubBodyType = REGMALE;
}
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].ubBodyType = REGMALE;
}
}
else
{
// female
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].ubBodyType = REGFEMALE;
// female
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].ubBodyType = REGFEMALE;
if( iSkillA == MARTIALARTS )
if (!gGameOptions.fNewTraitSystem) // SANDRO - traits
{
iSkillA = HANDTOHAND;
}
if( iSkillB == MARTIALARTS )
{
iSkillB = HANDTOHAND;
if( iSkillA == MARTIALARTS_OT )
iSkillA = HANDTOHAND_OT;
if( iSkillB == MARTIALARTS_OT )
iSkillB = HANDTOHAND_OT;
}
}
// skill trait
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bSkillTrait = ( INT8 )iSkillA;
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bSkillTrait2 = ( INT8 )iSkillB;
if (gGameOptions.fNewTraitSystem)
{
for ( UINT8 ubCnt = 0; ubCnt < gSkillTraitValues.ubMaxNumberOfTraits; ubCnt++ )
{
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bSkillTraits[ ubCnt ] = ( INT8 )SkillsList[ ubCnt ];
}
}
else
{
// skill trait
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bSkillTraits[0] = ( INT8 )iSkillA;
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bSkillTraits[1] = ( INT8 )iSkillB;
}
}
BOOLEAN ShouldThisMercHaveABigBody( void )
{
// should this merc be a big body type
// Madd - don't limit it by portrait
//if ( ( iPortraitNumber == 0 ) || ( iPortraitNumber == 6 ) || ( iPortraitNumber == 7 ) )
//{
// if ( gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bStrength >= 75 )
// {
// return( TRUE );
// }
//}
//return( FALSE );
// We can now choose this ourselves - SANDRO
return( bBigBodySelected() );
}
+2 -2
View File
@@ -2,8 +2,8 @@
#define __IMP_COMPILE_H
#define PLAYER_GENERATED_CHARACTER_ID 51
#define ATTITUDE_LIST_SIZE 20
#define NUMBER_OF_PLAYER_PORTRAITS 16
#define ATTITUDE_LIST_SIZE 30
#define NUMBER_OF_PLAYER_PORTRAITS 50 //16
void AddAnAttitudeToAttitudeList( INT8 bAttitude );
void CreatePlayerAttitude( void );
+434 -179
View File
@@ -34,9 +34,13 @@
#include "weapons.h"
#include "Random.h"
#include "GameVersion.h"
#include "faces.h"
#include "GameSettings.h"
#endif
#include <vfs/Core/vfs.h>
#include <vfs/Aspects/vfs_settings.h>
// Changed by ADB (rev 1513) to resolve IMPs created prior to structural changes
//#define IMP_FILENAME_SUFFIX ".dat"
#define OLD_IMP_FILENAME_SUFFIX ".dat"
@@ -60,6 +64,13 @@ void GiveIMPItems( MERCPROFILESTRUCT *pProfile, INT8 abilityValue, UINT8 typeInd
UINT32 giIMPConfirmButton[ 2 ];
UINT32 giIMPConfirmButtonImage[ 2 ];
BOOLEAN fNoAlreadySelected = FALSE;
IMP_FACE_VALUES gIMPFaceValues[200];
IMP_FEMALE_VALUES gIMPFemaleValues[200];
IMP_MALE_VALUES gIMPMaleValues[200];
/*
UINT16 uiEyeXPositions[ ]={
8,
9,
@@ -137,7 +148,7 @@ UINT16 uiMouthYPositions[]={
24, //214
26,
};
*/
BOOLEAN fLoadingCharacterForPreviousImpProfile = FALSE;
void CreateConfirmButtons( void );
@@ -271,8 +282,23 @@ BOOLEAN AddCharacterToPlayersTeam( void )
HireMercStruct.ubInsertionCode = INSERTION_CODE_ARRIVING_GAME;
HireMercStruct.uiTimeTillMercArrives = GetMercArrivalTimeOfDay( );
SetProfileFaceData( HireMercStruct.ubProfileID , ( UINT8 ) ( 200 + iPortraitNumber ), uiEyeXPositions[ iPortraitNumber ], uiEyeYPositions[ iPortraitNumber ], uiMouthXPositions[ iPortraitNumber ], uiMouthYPositions[ iPortraitNumber ] );
if( fCharacterIsMale )
{
if ( gIMPMaleValues[ iPortraitNumber ].PortraitId !=0 )
{
SetProfileFaceData( HireMercStruct.ubProfileID , (UINT8)(gIMPMaleValues[ iPortraitNumber ].PortraitId), gIMPMaleValues[ iPortraitNumber ].uiEyeXPositions, gIMPMaleValues[ iPortraitNumber ].uiEyeYPositions, gIMPMaleValues[ iPortraitNumber ].uiMouthXPositions, gIMPMaleValues[ iPortraitNumber ].uiMouthYPositions );
}
}
else
{
if ( gIMPFemaleValues[ iPortraitNumber ].PortraitId !=0 )
{
SetProfileFaceData( HireMercStruct.ubProfileID , (UINT8)(gIMPFemaleValues[ iPortraitNumber ].PortraitId), gIMPFemaleValues[ iPortraitNumber ].uiEyeXPositions, gIMPFemaleValues[ iPortraitNumber ].uiEyeYPositions, gIMPFemaleValues[ iPortraitNumber ].uiMouthXPositions, gIMPFemaleValues[ iPortraitNumber ].uiMouthYPositions );
}
}
//if we succesfully hired the merc
if( !HireMerc( &HireMercStruct ) )
{
@@ -310,18 +336,23 @@ void BtnIMPConfirmYes(GUI_BUTTON *btn,INT32 reason)
return;
}
*/
if( LaptopSaveInfo.iCurrentBalance < COST_OF_PROFILE )
// SANDRO - changed to find the actual profile cost
//if( LaptopSaveInfo.iCurrentBalance < COST_OF_PROFILE )
if( LaptopSaveInfo.iCurrentBalance < iGetProfileCost() )
{
// not enough
return;
return;
}
// line moved by CJC Nov 28 2002 to AFTER the check for money
LaptopSaveInfo.fIMPCompletedFlag = TRUE;
// charge the player
AddTransactionToPlayersBook(IMP_PROFILE, (UINT8)(LaptopSaveInfo.iIMPIndex), GetWorldTotalMin( ), - ( COST_OF_PROFILE ) );
AddHistoryToPlayersLog( HISTORY_CHARACTER_GENERATED, 0,GetWorldTotalMin( ), -1, -1 );
// SANDRO - changed to find the actual profile cost
//AddTransactionToPlayersBook(IMP_PROFILE, (UINT8)(LaptopSaveInfo.iIMPIndex), GetWorldTotalMin( ), - ( COST_OF_PROFILE ) );
AddTransactionToPlayersBook(IMP_PROFILE, (UINT8)(LaptopSaveInfo.iIMPIndex), GetWorldTotalMin( ), - ( iGetProfileCost() ) );
AddHistoryToPlayersLog( HISTORY_CHARACTER_GENERATED, 0,GetWorldTotalMin( ), -1, -1 );
AddCharacterToPlayersTeam( );
// write the created imp merc
@@ -426,9 +457,11 @@ void BtnIMPConfirmNo( GUI_BUTTON *btn,INT32 reason )
}
*/
#define PROFILE_HAS_SKILL_TRAIT( p, t ) ((p->bSkillTrait == t) || (p->bSkillTrait2 == t))
// SANDRO - improved this function
//#define PROFILE_HAS_SKILL_TRAIT( p, t ) ( gGameOptions.fNewTraitSystem ? ((p->bSkillTrait == t) || (p->bSkillTrait2 == t) || (p->bSkillTrait3 == t)) : ((p->bSkillTrait == t) || (p->bSkillTrait2 == t)))
#define PROFILE_HAS_SKILL_TRAIT( p, t ) ( ProfileHasSkillTrait( p, t ) > 0 )
// DBrot: need a check for experts
#define PROFILE_HAS_EXPERT_TRAIT( p, t ) ( ProfileHasSkillTrait( p, t ) > 1 )
//CHRISL: New function to handle proper distribution of starting gear
void DistributeInitialGear(MERCPROFILESTRUCT *pProfile)
{
@@ -560,101 +593,26 @@ void DistributeInitialGear(MERCPROFILESTRUCT *pProfile)
}
}
void GiveItemsToPC( UINT8 ubProfileId )
{
MERCPROFILESTRUCT *pProfile;
// gives starting items to merc
// NOTE: Any guns should probably be from those available in regular gun set
pProfile = &(gMercProfiles[ubProfileId]);
// STANDARD EQUIPMENT
// SANDRO - obsolete code deleted
GiveIMPItems(pProfile, 100, IMP_DEFAULT);
GiveIMPRandomItems(pProfile, IMP_RANDOMDEFAULT);
// kevlar vest, leggings, & helmet
// MakeProfileInvItemThisSlot(pProfile, VESTPOS, FLAK_JACKET, 100, 1);
GiveIMPItems (pProfile,pProfile->bWisdom,IMP_WISDOM);
//if ( PreRandom( 100 ) < (UINT32) pProfile->bWisdom )
//{
// MakeProfileInvItemThisSlot(pProfile, HELMETPOS, STEEL_HELMET, 100, 1);
//}
// canteen
// MakeProfileInvItemThisSlot(pProfile, SMALLPOCK4POS, CANTEEN, 100, 1);
GiveIMPItems (pProfile,pProfile->bMarksmanship,IMP_MARKSMANSHIP);
//Give ANY imp the calico
// MakeProfileInvItemThisSlot( pProfile, HANDPOS, M950, 100, 1);
//No ammo clip MakeProfileInvItemThisSlot( pProfile, SMALLPOCK1POS, CLIP9_30, 100, 2);
/*
Ja25 IMP only gets 1 gun now
if (pProfile->bMarksmanship >= 80)
{
// good shooters get a better & matching ammo
MakeProfileInvItemThisSlot( pProfile, HANDPOS, MP5K, 100, 1);
MakeProfileInvItemThisSlot( pProfile, SMALLPOCK1POS, CLIP9_30, 100, 2);
}
else
{
// Automatic pistol, with matching ammo
MakeProfileInvItemThisSlot( pProfile, HANDPOS, BERETTA_93R, 100, 1 );
MakeProfileInvItemThisSlot( pProfile, SMALLPOCK1POS, CLIP9_15, 100, 3 );
}
*/
// OPTIONAL EQUIPMENT: depends on skills & special skills
GiveIMPItems (pProfile,pProfile->bMedical,IMP_MEDICAL);
//if (pProfile->bMedical >= 60)
//{
// // strong medics get full medic kit
// MakeProfileInvItemAnySlot(pProfile, MEDICKIT, 100, 1);
//}
//else
//if (pProfile->bMedical >= 30)
//{
// // passable medics get first aid kit
// MakeProfileInvItemAnySlot(pProfile, FIRSTAIDKIT, 100, 1);
//}
GiveIMPItems (pProfile,pProfile->bMechanical,IMP_MECHANICAL);
//if (pProfile->bMechanical >= 50)
//{
// // mechanics get toolkit
// MakeProfileInvItemAnySlot(pProfile, TOOLKIT, 100, 1);
//}
GiveIMPItems (pProfile,pProfile->bExplosive,IMP_EXPLOSIVE);
//if (pProfile->bExplosive >= 50)
//{
// // loonies get TNT & Detonator
//MakeProfileInvItemAnySlot(pProfile, TNT, 100, 1);
//MakeProfileInvItemAnySlot(pProfile, DETONATOR, 100, 1);
//}
GiveIMPItems (pProfile,pProfile->bAgility,IMP_AGILITY);
GiveIMPItems (pProfile,pProfile->bDexterity,IMP_DEXTERITY);
GiveIMPItems (pProfile,pProfile->bStrength,IMP_STRENGTH);
@@ -662,89 +620,309 @@ void GiveItemsToPC( UINT8 ubProfileId )
GiveIMPItems (pProfile,pProfile->bLeadership,IMP_LEADERSHIP);
// check for special skills
if (PROFILE_HAS_SKILL_TRAIT(pProfile, LOCKPICKING) && ( iMechanical ) )
/////////////////////////////////////////////////////////////////////
// Check for new traits - SANDRO
// DBrot: experts get other stuff
if ( gGameOptions.fNewTraitSystem )
{
//MakeProfileInvItemAnySlot(pProfile, LOCKSMITHKIT, 100, 1);
GiveIMPRandomItems(pProfile,IMP_LOCKPICKING);
// 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);
}
}
// 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);
}
}
else
{
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, LOCKPICKING_OT) && ( iMechanical ) )
{
//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);
}
}
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, ELECTRONICS_OT) && ( iMechanical ) )
{
//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))
{
GiveIMPRandomItems(pProfile,IMP_MARTIAL_ARTS_EXP);
}
else
{
GiveIMPRandomItems(pProfile, IMP_MARTIAL_ARTS);
}
}
if (PROFILE_HAS_SKILL_TRAIT(pProfile, HANDTOHAND))
{
//MakeProfileInvItemAnySlot(pProfile, BRASS_KNUCKLES, 100, 1);
GiveIMPRandomItems(pProfile,IMP_HTH);
}
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, THROWING_OT))
{
// 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);
}
}
if (PROFILE_HAS_SKILL_TRAIT(pProfile, ELECTRONICS) && ( iMechanical ) )
{
//MakeProfileInvItemAnySlot(pProfile, METALDETECTOR, 100, 1);
GiveIMPRandomItems(pProfile,IMP_ELECTRONICS);
}
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, STEALTHY_OT))
{
// 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);
}
}
if (PROFILE_HAS_SKILL_TRAIT(pProfile, NIGHTOPS))
{
// MakeProfileInvItemAnySlot(pProfile, SILENCER, 100, 2);
GiveIMPRandomItems(pProfile,IMP_NIGHTOPS);
}
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, KNIFING_OT))
{
// 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);
}
}
if (PROFILE_HAS_SKILL_TRAIT(pProfile, THROWING))
{
// MakeProfileInvItemAnySlot(pProfile, THROWING_KNIFE, 100, 1);
GiveIMPRandomItems(pProfile,IMP_THROWING);
}
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, MARTIALARTS_OT))
{
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, MARTIALARTS_OT))
{
GiveIMPRandomItems(pProfile,IMP_MARTIAL_ARTS_EXP);
}
else
{
GiveIMPRandomItems(pProfile, IMP_MARTIAL_ARTS);
}
}
if (PROFILE_HAS_SKILL_TRAIT(pProfile, STEALTHY))
{
// MakeProfileInvItemAnySlot(pProfile, SILENCER, 100, 1);
GiveIMPRandomItems(pProfile,IMP_STEALTHY);
}
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, PROF_SNIPER_OT))
{
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, PROF_SNIPER_OT))
{
GiveIMPRandomItems(pProfile,IMP_SNIPER_EXP);
}
else
{
GiveIMPRandomItems(pProfile, IMP_SNIPER);
}
}
if (PROFILE_HAS_SKILL_TRAIT(pProfile, KNIFING))
{
// MakeProfileInvItemAnySlot(pProfile, COMBAT_KNIFE, 100, 1);
GiveIMPRandomItems(pProfile,IMP_KNIFING);
}
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, TEACHING_OT))
{
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, TEACHING_OT))
{
GiveIMPRandomItems(pProfile,IMP_TEACHING_EXP);
}
else
{
GiveIMPRandomItems(pProfile, IMP_TEACHING);
}
}
if (PROFILE_HAS_SKILL_TRAIT(pProfile, CAMOUFLAGED)) // 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, AUTO_WEAPS_OT))
{
if( gGameExternalOptions.fExpertsGetDifferentChoices && PROFILE_HAS_EXPERT_TRAIT(ubProfileId, AUTO_WEAPS_OT))
{
GiveIMPRandomItems(pProfile,IMP_AUTO_WEAPONS_EXP);
}
else
{
GiveIMPRandomItems(pProfile, IMP_AUTO_WEAPONS);
}
}
if (PROFILE_HAS_SKILL_TRAIT(pProfile, AMBIDEXT))
{
// MakeProfileInvItemAnySlot(pProfile, M950, 100, 1);
GiveIMPRandomItems(pProfile,IMP_AMBIDEXTROUS);
}
if (PROFILE_HAS_SKILL_TRAIT(pProfile, MARTIALARTS))
{
GiveIMPRandomItems(pProfile,IMP_MARTIALARTS);
}
if (PROFILE_HAS_SKILL_TRAIT(pProfile, PROF_SNIPER))
{
GiveIMPRandomItems(pProfile,IMP_PROF_SNIPER);
}
if (PROFILE_HAS_SKILL_TRAIT(pProfile, TEACHING))
{
GiveIMPRandomItems(pProfile,IMP_TEACHING);
}
if (PROFILE_HAS_SKILL_TRAIT(pProfile, AUTO_WEAPS))
{
GiveIMPRandomItems(pProfile,IMP_AUTOWEAPONS);
}
if (PROFILE_HAS_SKILL_TRAIT(pProfile, HEAVY_WEAPS ))
{
GiveIMPRandomItems(pProfile,IMP_HEAVYWEAPONS);
}
if (PROFILE_HAS_SKILL_TRAIT(pProfile, THIEF ))
{
GiveIMPRandomItems(pProfile,IMP_THIEF);
if (PROFILE_HAS_SKILL_TRAIT(ubProfileId, HEAVY_WEAPS_OT ))
{
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);
@@ -871,7 +1049,8 @@ INT32 SpecificFreePocket(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubHow
{
if(LoadBearingEquipment[Item[usItem].ubClassIndex].lbeCombo!=0)
{
if((pProfile->inv[BPACKPOCKPOS]!=NONE && LoadBearingEquipment[Item[pProfile->inv[BPACKPOCKPOS]].ubClassIndex].lbeCombo==LoadBearingEquipment[Item[usItem].ubClassIndex].lbeCombo) || pProfile->inv[BPACKPOCKPOS]==NONE)
//DBrot: changed to bitwise comparison
if((pProfile->inv[BPACKPOCKPOS]!=NONE && (LoadBearingEquipment[Item[pProfile->inv[BPACKPOCKPOS]].ubClassIndex].lbeCombo & LoadBearingEquipment[Item[usItem].ubClassIndex].lbeCombo)) || pProfile->inv[BPACKPOCKPOS]==NONE)
return CPACKPOCKPOS;
}
else if(pProfile->inv[BPACKPOCKPOS]==NONE)
@@ -884,7 +1063,8 @@ INT32 SpecificFreePocket(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubHow
{
if(LoadBearingEquipment[Item[usItem].ubClassIndex].lbeCombo!=0)
{
if((pProfile->inv[CPACKPOCKPOS]!=NONE && LoadBearingEquipment[Item[pProfile->inv[CPACKPOCKPOS]].ubClassIndex].lbeCombo==LoadBearingEquipment[Item[usItem].ubClassIndex].lbeCombo) || pProfile->inv[CPACKPOCKPOS]==NONE)
//DBrot: changed to bitwise comparison
if((pProfile->inv[CPACKPOCKPOS]!=NONE && (LoadBearingEquipment[Item[pProfile->inv[CPACKPOCKPOS]].ubClassIndex].lbeCombo & LoadBearingEquipment[Item[usItem].ubClassIndex].lbeCombo)) || pProfile->inv[CPACKPOCKPOS]==NONE)
return BPACKPOCKPOS;
}
else if(pProfile->inv[CPACKPOCKPOS]==NONE)
@@ -1117,8 +1297,6 @@ INT32 AnyFreeBigEnoughPocket(MERCPROFILESTRUCT *pProfile, INVNODE *tInv)
return(-1);
}
#include "VFS/vfs.h"
#include "VFS/vfs_settings.h"
void WriteOutCurrentImpCharacter( INT32 iProfileId )
{
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("WriteOutCurrentImpCharacter: IMP.dat"));
@@ -1145,11 +1323,11 @@ void WriteOutCurrentImpCharacter( INT32 iProfileId )
char zFileName[32];
if(vfs::Settings::getUseUnicode())
{
strncpy(zFileName, utf8string::as_utf8(gMercProfiles[iProfileId].zNickname,10).c_str(), 32);
strncpy(zFileName, vfs::String::as_utf8(gMercProfiles[iProfileId].zNickname,10).c_str(), 32);
}
else
{
utf8string::narrow(gMercProfiles[iProfileId].zNickname, 10, zFileName, 32);
vfs::String::narrow(gMercProfiles[iProfileId].zNickname, 10, zFileName, 32);
}
#endif
@@ -1339,20 +1517,31 @@ BOOLEAN LoadImpCharacter( STR nickName )
//CHRISL: At this point, we need to resort profile inventory so that NewInv items don't accidentally appear in OldInv
DistributeInitialGear(&gMercProfiles[iProfileId]);
if( LaptopSaveInfo.iCurrentBalance < COST_OF_PROFILE )
// Changed to find actual IMP cost - SANDRO
if( LaptopSaveInfo.iCurrentBalance < iGetProfileCost() )
{
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 3 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
// not enough
return FALSE;
}
//new camo face
if ( gGameExternalOptions.fShowCamouflageFaces == TRUE )
{
gCamoFace[iProfileId].gCamoface = TRUE;
gCamoFace[iProfileId].gUrbanCamoface = FALSE;
gCamoFace[iProfileId].gDesertCamoface = FALSE;
gCamoFace[iProfileId].gSnowCamoface = FALSE;
}
// charge the player
// is the character male?
fCharacterIsMale = ( gMercProfiles[ iProfileId ].bSex == MALE );
fLoadingCharacterForPreviousImpProfile = TRUE;
AddTransactionToPlayersBook(IMP_PROFILE,0, GetWorldTotalMin( ), - ( COST_OF_PROFILE ) );
// Changed to find actual IMP cost - SANDRO
AddTransactionToPlayersBook(IMP_PROFILE,0, GetWorldTotalMin( ), - ( iGetProfileCost() ) );
AddHistoryToPlayersLog( HISTORY_CHARACTER_GENERATED, 0,GetWorldTotalMin( ), -1, -1 );
LaptopSaveInfo.iIMPIndex = iProfileId;
AddCharacterToPlayersTeam( );
@@ -1383,38 +1572,86 @@ BOOLEAN LoadImpCharacter( STR nickName )
void ResetIMPCharactersEyesAndMouthOffsets( UINT8 ubMercProfileID )
{
// ATE: Check boundary conditions!
if( ( ( gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ) > 16 ) || ( ubMercProfileID >= PROF_HUMMER ) )
if( ( ( gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ) > MAX_NEW_IMP_PORTRAITS ) || ( ubMercProfileID >= PROF_HUMMER ) ) // 16
{
return;
}
/*
gMercProfiles[ ubMercProfileID ].usEyesX = gIMPFaceValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ].uiEyeXPositions;
gMercProfiles[ ubMercProfileID ].usEyesY = gIMPFaceValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ].uiEyeYPositions;
gMercProfiles[ ubMercProfileID ].usEyesX = uiEyeXPositions[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ];
gMercProfiles[ ubMercProfileID ].usEyesY = uiEyeYPositions[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ];
gMercProfiles[ ubMercProfileID ].usMouthX = gIMPFaceValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ].uiMouthXPositions;
gMercProfiles[ ubMercProfileID ].usMouthY = gIMPFaceValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ].uiMouthYPositions;
*/
if( gMercProfiles[ ubMercProfileID ].bSex == 0 )
{
gMercProfiles[ ubMercProfileID ].usEyesX = gIMPMaleValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ].uiEyeXPositions;
gMercProfiles[ ubMercProfileID ].usEyesY = gIMPMaleValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ].uiEyeYPositions;
gMercProfiles[ ubMercProfileID ].usMouthX = uiMouthXPositions[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ];
gMercProfiles[ ubMercProfileID ].usMouthY = uiMouthYPositions[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ];
gMercProfiles[ ubMercProfileID ].usMouthX = gIMPMaleValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ].uiMouthXPositions;
gMercProfiles[ ubMercProfileID ].usMouthY = gIMPMaleValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ].uiMouthYPositions;
}
else
{
gMercProfiles[ ubMercProfileID ].usEyesX = gIMPFemaleValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ].uiEyeXPositions;
gMercProfiles[ ubMercProfileID ].usEyesY = gIMPFemaleValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ].uiEyeYPositions;
gMercProfiles[ ubMercProfileID ].usMouthX = gIMPFemaleValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ].uiMouthXPositions;
gMercProfiles[ ubMercProfileID ].usMouthY = gIMPFemaleValues[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ].uiMouthYPositions;
}
}
void GiveIMPRandomItems( MERCPROFILESTRUCT *pProfile, UINT8 typeIndex )
{
/////////////////////////////////////////////////////////////////////
// SANDRO - I've changed this formula a bit, <- me too - silversurfer
// now it should not take the same choice twice
/////////////////////////////////////////////////////////////////////
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("GiveIMPRandomItems: typeIndex = %d",typeIndex ));
UINT16 usItem = 0;
INT32 iChoice;
UINT8 ubValidChoices = 0;
UINT8 ubNumChoices = gIMPItemChoices[ typeIndex ].ubChoices;
UINT8 ubNumItemsToGive = 0;
BOOLEAN ubItemsGiven[ 50 ]={FALSE};
if ( gIMPItemChoices[ typeIndex ].ubChoices <= 0 )
return;
for ( int i=0; i < gIMPItemChoices[typeIndex].ubNumItems ;i++ )
// check how many legal items are in the choices list, this is to prevent infinite loop
for ( UINT8 cnt=0; cnt < ubNumChoices; cnt++ )
{
usItem = gIMPItemChoices[ typeIndex ].bItemNo[ cnt ];
if ( ItemIsLegal(usItem) )
ubValidChoices++;
}
// if no valid items found, bail out
if ( ubValidChoices <= 0 )
return;
// define how many items we get
if ( ubValidChoices < gIMPItemChoices[typeIndex].ubNumItems )
// if there are less legal items than the number we should get, we only get the number of legal items
ubNumItemsToGive = ubValidChoices;
else
// give us the maximum possible
ubNumItemsToGive = gIMPItemChoices[typeIndex].ubNumItems;
for ( int i=0; i < ubNumItemsToGive ;i++ )
{
usItem = 0;
while (usItem == 0 )
{
iChoice = Random(gIMPItemChoices[ typeIndex ].ubChoices);
usItem = gIMPItemChoices[ typeIndex ].bItemNo[ iChoice ];
if (!ItemIsLegal(usItem))
usItem=0;
iChoice = Random( ubNumChoices );
usItem = gIMPItemChoices[ typeIndex ].bItemNo[ iChoice ];
// is this legal and we don't have it already?
if (ItemIsLegal(usItem) && !ubItemsGiven[iChoice] )
ubItemsGiven[iChoice] = TRUE;
else
usItem=0;
}
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("GiveIMPRandomItems: typeIndex = %d, usItem = %d ",typeIndex, usItem ));
if ( usItem > 0 )
@@ -1491,5 +1728,23 @@ void GiveIMPItems( MERCPROFILESTRUCT *pProfile, INT8 abilityValue, UINT8 typeInd
}
// SANDRO - Function to determine actual cost of profile
INT32 iGetProfileCost()
{
if (gGameExternalOptions.fDynamicIMPProfileCost)
{
INT32 iIMPProfileCost;
iIMPProfileCost = gGameExternalOptions.iIMPProfileCost * CountFilledIMPSlots(-1);
if (iIMPProfileCost >= gGameExternalOptions.iIMPProfileCost)
return(iIMPProfileCost);
else
return(gGameExternalOptions.iIMPProfileCost);
}
else
return(gGameExternalOptions.iIMPProfileCost);
}
+72
View File
@@ -6,6 +6,76 @@ void RenderIMPConfirm( void );
void ExitIMPConfirm( void );
void HandleIMPConfirm( void );
#define MAX_NEW_IMP_PORTRAITS 50
typedef struct
{
UINT16 uiEyeXPositions;
UINT16 uiEyeYPositions;
UINT16 uiMouthXPositions;
UINT16 uiMouthYPositions;
UINT16 uiIndex;
UINT16 FaceIndex;
UINT16 PortraitId;
BOOLEAN bSex;
INT32 iCurrentSkin;
INT32 iCurrentHair;
INT32 iCurrentShirt;
INT32 iCurrentPants;
BOOLEAN bBigBody;
BOOLEAN bBadAss;
} IMP_FACE_VALUES;
extern IMP_FACE_VALUES gIMPFaceValues[200];
typedef struct
{
UINT16 uiIndexIMP;
BOOLEAN Enabled;
UINT16 uiEyeXPositions;
UINT16 uiEyeYPositions;
UINT16 uiMouthXPositions;
UINT16 uiMouthYPositions;
UINT16 uiIndex;
UINT16 FaceIndex;
UINT16 PortraitId;
BOOLEAN bSex;
INT32 iCurrentSkin;
INT32 iCurrentHair;
INT32 iCurrentShirt;
INT32 iCurrentPants;
BOOLEAN bBigBody;
BOOLEAN bBadAss;
} IMP_MALE_VALUES;
typedef struct
{
UINT16 uiIndexIMP;
BOOLEAN Enabled;
UINT16 uiEyeXPositions;
UINT16 uiEyeYPositions;
UINT16 uiMouthXPositions;
UINT16 uiMouthYPositions;
UINT16 uiIndex;
UINT16 FaceIndex;
UINT16 PortraitId;
BOOLEAN bSex;
INT32 iCurrentSkin;
INT32 iCurrentHair;
INT32 iCurrentShirt;
INT32 iCurrentPants;
BOOLEAN bBigBody;
BOOLEAN bBadAss;
} IMP_FEMALE_VALUES;
extern IMP_FEMALE_VALUES gIMPFemaleValues[200];
extern IMP_MALE_VALUES gIMPMaleValues[200];
BOOLEAN AddCharacterToPlayersTeam( void );
BOOLEAN LoadImpCharacter( STR fileName );
void WriteOutCurrentImpCharacter( INT32 iProfileId );
@@ -15,5 +85,7 @@ void ResetIMPCharactersEyesAndMouthOffsets( UINT8 ubMercProfileID );
BOOLEAN ImpExists ( STR fileName );
INT32 iGetProfileCost( void ); // added by SANDRO
#endif
+69 -38
View File
@@ -78,6 +78,8 @@ INT32 giIMPDisabilityTraitFinsihButtonImage;
//image handle
UINT32 guiIST_GreyGoldBox3;
MOUSE_REGION gMR_DisabilityHelpTextRegions[ IMP_DISABILITIES_NUMBER ];
//*******************************************************************
//
// Function Prototypes
@@ -93,6 +95,7 @@ void IMPDisabilityTraitDisplayDisabilityTraits();
BOOLEAN CameBackToDisabilityTraitPageButNotFinished();
void AssignDisabilityHelpText( UINT8 ubNumber );
//*******************************************************************
//
@@ -141,7 +144,18 @@ void EnterIMPDisabilityTrait( void )
}
HandleDisabilityTraitButtonStates( );
// add regions for help texts
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_NO_CURSOR, MSYS_NO_CALLBACK, NULL );
MSYS_AddRegion( &gMR_DisabilityHelpTextRegions[ubCnt] );
usPosY += IMP_DISABILITY_TRAIT__SPACE_BTN_BUTTONS;
}
}
@@ -159,19 +173,21 @@ void RenderIMPDisabilityTrait( void )
void ExitIMPDisabilityTrait( void )
{
INT32 iCnt;
INT32 ubCnt;
DeleteVideoObjectFromIndex( guiIST_GreyGoldBox3 );
//remove the skill buttons
for(iCnt = 0; iCnt < IMP_DISABILITIES_NUMBER; iCnt++)
for(ubCnt = 0; ubCnt < IMP_DISABILITIES_NUMBER; ubCnt++)
{
//if there is a button allocated
if( giIMPDisabilityTraitAnswerButton[iCnt] != -1 )
if( giIMPDisabilityTraitAnswerButton[ubCnt] != -1 )
{
RemoveButton(giIMPDisabilityTraitAnswerButton[ iCnt ] );
UnloadButtonImage(giIMPDisabilityTraitAnswerButtonImage[ iCnt ] );
RemoveButton(giIMPDisabilityTraitAnswerButton[ ubCnt ] );
UnloadButtonImage(giIMPDisabilityTraitAnswerButtonImage[ ubCnt ] );
}
MSYS_RemoveRegion( &gMR_DisabilityHelpTextRegions[ubCnt] );
}
RemoveButton( giIMPDisabilityTraitFinsihButton );
@@ -192,47 +208,47 @@ void HandleIMPDisabilityTrait( void )
void AddImpDisabilityTraitButtons()
{
INT32 iCnt = 0;
INT8 ubCnt = 0;
UINT16 usPosX, usPosY;
usPosX = IMP_DISABILITY_COLUMN_START_X;
usPosY = IMP_DISABILITY_COLUMN_START_Y;
for(iCnt = 0; iCnt < IMP_DISABILITIES_NUMBER; iCnt++)
for(ubCnt = 0; ubCnt < IMP_DISABILITIES_NUMBER; ubCnt++)
{
//reset
giIMPDisabilityTraitAnswerButton[iCnt] = -1;
giIMPDisabilityTraitAnswerButton[ubCnt] = -1;
//if we are not DONE and are just reviewing
if( iCurrentProfileMode != IMP__FINISH )
{
gfDisabilityTraitQuestions[ iCnt ] = FALSE;
gfDisabilityTraitQuestions[ ubCnt ] = FALSE;
}
if( iCnt == 0 )
giIMPDisabilityTraitAnswerButtonImage[ iCnt ] = LoadButtonImage( "LAPTOP\\button_6.sti", -1,0,-1,1,-1 );
if( ubCnt == 0 )
giIMPDisabilityTraitAnswerButtonImage[ ubCnt ] = LoadButtonImage( "LAPTOP\\button_6.sti", -1,0,-1,1,-1 );
else
giIMPDisabilityTraitAnswerButtonImage[ iCnt ] = UseLoadedButtonImage( giIMPDisabilityTraitAnswerButtonImage[ 0 ], -1,0,-1,1,-1 );
giIMPDisabilityTraitAnswerButtonImage[ ubCnt ] = UseLoadedButtonImage( giIMPDisabilityTraitAnswerButtonImage[ 0 ], -1,0,-1,1,-1 );
giIMPDisabilityTraitAnswerButton[iCnt] = QuickCreateButton( giIMPDisabilityTraitAnswerButtonImage[ iCnt ], usPosX, usPosY,
giIMPDisabilityTraitAnswerButton[ubCnt] = QuickCreateButton( giIMPDisabilityTraitAnswerButtonImage[ ubCnt ], usPosX, usPosY,
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 3,
MSYS_NO_CALLBACK, (GUI_CALLBACK)BtnIMPDisabilityTraitAnswerCallback);
//Set the button data
MSYS_SetBtnUserData( giIMPDisabilityTraitAnswerButton[iCnt], 0, iCnt );
SetButtonCursor( giIMPDisabilityTraitAnswerButton[iCnt], CURSOR_WWW);
MSYS_SetBtnUserData( giIMPDisabilityTraitAnswerButton[ubCnt], 0, ubCnt );
SetButtonCursor( giIMPDisabilityTraitAnswerButton[ubCnt], CURSOR_WWW);
//Get rid of playing the button sound, it will be handled here
//ButtonList[ giIMPDisabilityTraitAnswerButton[ iCnt ] ]->ubSoundSchemeID = 0;
//ButtonList[ giIMPDisabilityTraitAnswerButton[ ubCnt ] ]->ubSoundSchemeID = 0;
//Determine the next x location
//if( iCnt < 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;
//Determine the next Y location
//if( iCnt == IMP_DISABILITY_TRAIT_NUMBER_TO_START_2ND_COLUMN )
//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;
@@ -258,7 +274,7 @@ void BtnIMPDisabilityTraitAnswerCallback(GUI_BUTTON *btn,INT32 reason)
void HandleIMPDisabilityTraitAnswers( UINT32 uiSkillPressed )
{
UINT32 uiCnt;
UINT8 ubCnt;
//if we are DONE and are just reviewing
if( iCurrentProfileMode == IMP__FINISH )
@@ -267,9 +283,9 @@ void HandleIMPDisabilityTraitAnswers( UINT32 uiSkillPressed )
}
//reset all other buttons
for( uiCnt=0; uiCnt<IMP_DISABILITIES_NUMBER; uiCnt++ )
for( ubCnt=0; ubCnt<IMP_DISABILITIES_NUMBER; ubCnt++ )
{
gfDisabilityTraitQuestions[ uiCnt ] = FALSE;
gfDisabilityTraitQuestions[ ubCnt ] = FALSE;
}
//make sure its a valid disability trait
@@ -308,26 +324,25 @@ void HandleIMPDisabilityTraitAnswers( UINT32 uiSkillPressed )
void HandleDisabilityTraitButtonStates( )
{
UINT32 uiCnt;
UINT8 ubCnt;
for( uiCnt=0; uiCnt<IMP_DISABILITIES_NUMBER; uiCnt++ )
for( ubCnt=0; ubCnt<IMP_DISABILITIES_NUMBER; ubCnt++ )
{
//if the skill is selected ( ie depressed )
if( gfDisabilityTraitQuestions[ uiCnt ] )
if( gfDisabilityTraitQuestions[ ubCnt ] )
{
ButtonList[ giIMPDisabilityTraitAnswerButton[ uiCnt ] ]->uiFlags |= BUTTON_CLICKED_ON;
ButtonList[ giIMPDisabilityTraitAnswerButton[ ubCnt ] ]->uiFlags |= BUTTON_CLICKED_ON;
}
else
{
ButtonList[ giIMPDisabilityTraitAnswerButton[ uiCnt ] ]->uiFlags &= ~BUTTON_CLICKED_ON;
ButtonList[ giIMPDisabilityTraitAnswerButton[ ubCnt ] ]->uiFlags &= ~BUTTON_CLICKED_ON;
}
}
}
void IMPDisabilityTraitDisplayDisabilityTraits()
{
UINT32 uiCnt;
UINT8 ubCnt;
UINT16 usPosX, usPosY;
UINT16 usBoxPosX, usBoxPosY;
HVOBJECT hImageHandle;
@@ -342,13 +357,13 @@ void IMPDisabilityTraitDisplayDisabilityTraits()
usPosX = IMP_DISABILITY_COLUMN_START_X + IMP_DISABILITY_TRAIT__TEXT_OFFSET_X;
usPosY = IMP_DISABILITY_COLUMN_START_Y + IMP_DISABILITY_TRAIT__TEXT_OFFSET_Y;
for( uiCnt=0; uiCnt<IMP_DISABILITIES_NUMBER; uiCnt++ )
for( ubCnt=0; ubCnt<IMP_DISABILITIES_NUMBER; ubCnt++ )
{
usBoxPosX = usPosX - IMP_DISABILITY_TRAIT__GREY_BOX_OFFSET_X;
usBoxPosY = usPosY - IMP_DISABILITY_TRAIT__GREY_BOX_OFFSET_Y;
//if the trait is selected
if( gfDisabilityTraitQuestions[ uiCnt ] )
if( gfDisabilityTraitQuestions[ ubCnt ] )
{
//Display the gold background box
BltVideoObject(FRAME_BUFFER, hImageHandle, 1, usBoxPosX, usBoxPosY, VO_BLT_SRCTRANSPARENCY,NULL);
@@ -360,16 +375,18 @@ void IMPDisabilityTraitDisplayDisabilityTraits()
}
//draw the text to the screenx
DrawTextToScreen( gzIMPDisabilityTraitText[ uiCnt ], usPosX, usPosY, 0, IMP_DISABILITY_TRAIT__FONT, IMP_DISABILITY_TRAIT__COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen( gzIMPDisabilityTraitText[ ubCnt ], usPosX, usPosY, 0, IMP_DISABILITY_TRAIT__FONT, IMP_DISABILITY_TRAIT__COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
AssignDisabilityHelpText( ubCnt );
//Determine the next x location
// if( uiCnt < 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;
//Determine the next Y location
//if( uiCnt == IMP_DISABILITY_TRAIT_NUMBER_TO_START_2ND_COLUMN )
//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;
@@ -427,16 +444,16 @@ BOOLEAN CameBackToDisabilityTraitPageButNotFinished()
INT8 iChosenDisabilityTrait()
{
UINT32 uiCnt;
UINT8 ubCnt;
INT8 iDisabilityTraitNumber = 0;
//loop through all the buttons and reset them
for( uiCnt=0; uiCnt<IMP_DISABILITIES_NUMBER; uiCnt++ )
for( ubCnt=0; ubCnt<IMP_DISABILITIES_NUMBER; ubCnt++ )
{
//if the trait is selected
if( gfDisabilityTraitQuestions[ uiCnt ] )
if( gfDisabilityTraitQuestions[ ubCnt ] )
{
iDisabilityTraitNumber = uiCnt;
iDisabilityTraitNumber = ubCnt;
}
}
return( iDisabilityTraitNumber );
@@ -457,4 +474,18 @@ INT8 iPlayersAttributePointsBonusForDisabilitySelected()
}
return( bExtraAttributePoints );
}
void AssignDisabilityHelpText( UINT8 ubNumber )
{
CHAR16 apStr[ 2000 ];
swprintf( apStr, L"" );
swprintf( apStr, gzIMPDisabilitiesHelpTexts[ubNumber] );
// Set region help text
SetRegionFastHelpText( &(gMR_DisabilityHelpTextRegions[ubNumber]), apStr );
SetRegionHelpEndCallback( &gMR_DisabilityHelpTextRegions[ubNumber], MSYS_NO_CALLBACK );
return;
}
+22 -1
View File
@@ -24,6 +24,9 @@
#include "text.h"
#endif
#include "IMP Confirm.h"
// min time btween frames of animation
#define ANIMATE_MIN_TIME 200
@@ -659,7 +662,25 @@ BOOLEAN LoadCharacterPortrait( void )
// load it
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
FilenameForBPP( pPlayerSelectedFaceFileNames[ iPortraitNumber ] , VObjectDesc.ImageFile);
if( fCharacterIsMale )
{
if ( gIMPMaleValues[ iPortraitNumber ].Enabled == 1 )
{
sprintf( VObjectDesc.ImageFile, "Faces\\%02d.sti", gIMPMaleValues[ iPortraitNumber ].PortraitId );
}
}
else
{
if ( gIMPFemaleValues[ iPortraitNumber ].Enabled == 1 )
{
sprintf( VObjectDesc.ImageFile, "Faces\\%02d.sti", gIMPFemaleValues[ iPortraitNumber ].PortraitId );
}
}
//FilenameForBPP( pPlayerSelectedFaceFileNames[ iPortraitNumber ] , VObjectDesc.ImageFile);
CHECKF(AddVideoObject(&VObjectDesc, &guiCHARACTERPORTRAIT));
return( TRUE );
+3 -3
View File
@@ -414,7 +414,7 @@ void ProcessPlayerInputActivationString( void )
return;
}
if (CountFilledIMPSlots(-1) < gGameExternalOptions.iMaxIMPCharacters)
if (CountFilledIMPSlots(-1) < gGameOptions.ubMaxIMPCharacters)
{
// Kaiden: Need to reset skills, attributes and personalities with the new UB Method.
ResetSkillsAttributesAndPersonality( );
@@ -436,7 +436,7 @@ void ProcessPlayerInputActivationString( void )
return;
}
if (CountFilledIMPSlots(-1) < gGameExternalOptions.iMaxIMPCharacters)
if (CountFilledIMPSlots(-1) < gGameOptions.ubMaxIMPCharacters)
{
if (LoadImpCharacter( IMP_MERC_FILENAME ) == TRUE)
{
@@ -462,7 +462,7 @@ void ProcessPlayerInputActivationString( void )
return;
}
if (CountFilledIMPSlots(-1) < gGameExternalOptions.iMaxIMPCharacters)
if (CountFilledIMPSlots(-1) < gGameOptions.ubMaxIMPCharacters)
{
if (LoadImpCharacter( charPlayerActivationString ) == TRUE)
{
+20 -2
View File
@@ -27,6 +27,7 @@
#include "Squads.h"
#endif
#include "IMP Confirm.h"
#define MAIN_PAGE_BUTTON_TEXT_WIDTH 95
@@ -599,7 +600,8 @@ void BtnIMPMainPageBeginCallback(GUI_BUTTON *btn,INT32 reason)
}
else
{
if( LaptopSaveInfo.iCurrentBalance < COST_OF_PROFILE )
//if( LaptopSaveInfo.iCurrentBalance < COST_OF_PROFILE )
if( LaptopSaveInfo.iCurrentBalance < iGetProfileCost() ) // SANDRO - changed to find actual profile cost in IMPConfirm
{
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 3 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, BeginMessageBoxCallBack);
@@ -1117,7 +1119,23 @@ BOOLEAN LoadCharacterPortraitForMainPage( void )
{
// load it
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
FilenameForBPP( pPlayerSelectedFaceFileNames[ iPortraitNumber ] , VObjectDesc.ImageFile);
if( fCharacterIsMale )
{
if ( gIMPMaleValues[ iPortraitNumber ].Enabled == 1 )
{
sprintf( VObjectDesc.ImageFile, "Faces\\%02d.sti", gIMPMaleValues[ iPortraitNumber ].PortraitId );
}
}
else
{
if ( gIMPFemaleValues[ iPortraitNumber ].Enabled == 1 )
{
sprintf( VObjectDesc.ImageFile, "Faces\\%02d.sti", gIMPFemaleValues[ iPortraitNumber ].PortraitId );
}
}
//FilenameForBPP( pPlayerSelectedFaceFileNames[ iPortraitNumber ] , VObjectDesc.ImageFile);
CHECKF(AddVideoObject(&VObjectDesc, &guiCHARACTERPORTRAITFORMAINPAGE));
File diff suppressed because it is too large Load Diff
+44
View File
@@ -0,0 +1,44 @@
#ifndef __IMP_MINOR_TRAIT__H_
#define __IMP_MINOR_TRAIT__H_
#include "Types.h"
void EnterIMPMinorTrait( void );
void RenderIMPMinorTrait( void );
void ExitIMPMinorTrait( void );
void HandleIMPMinorTrait( void );
enum
{
// minor traits
IMP_SKILL_TRAITS_NEW_AMBIDEXTROUS,
IMP_SKILL_TRAITS_NEW_MELEE,
IMP_SKILL_TRAITS_NEW_THROWING,
IMP_SKILL_TRAITS_NEW_NIGHT_OPS,
IMP_SKILL_TRAITS_NEW_STEALTHY,
IMP_SKILL_TRAITS_NEW_ATHLETICS,
IMP_SKILL_TRAITS_NEW_BODYBUILDING,
IMP_SKILL_TRAITS_NEW_DEMOLITIONS,
IMP_SKILL_TRAITS_NEW_TEACHING,
IMP_SKILL_TRAITS_NEW_SCOUTING,
//////
IMP_SKILL_TRAITS_NEW_MINOR_NONE,
IMP_SKILL_TRAITS_NEW_NUMBER_MINOR_SKILLS,
};
void AddSelectedMinorTraitsToSkillsList();
INT8 CountNumMinorTraitsSelected( BOOLEAN fIncludeNoneSkill );
UINT8 StrengthRequiredAdjustmentForMinorTraits( INT32 iInitialValue );
UINT8 DexterityRequiredAdjustmentForMinorTraits( INT32 iInitialValue );
UINT8 AgilityRequiredAdjustmentForMinorTraits( INT32 iInitialValue );
UINT8 HealthRequiredAdjustmentForMinorTraits( INT32 iInitialValue );
UINT8 WisdomRequiredAdjustmentForMinorTraits( INT32 iInitialValue );
UINT8 LeaderShipRequiredAdjustmentForMinorTraits( INT32 iInitialValue );
UINT8 MarksmanshipRequiredAdjustmentForMinorTraits( INT32 iInitialValue );
UINT8 MechanicalRequiredAdjustmentForMinorTraits( INT32 iInitialValue );
UINT8 MedicalRequiredAdjustmentForMinorTraits( INT32 iInitialValue );
UINT8 ExplosivesRequiredAdjustmentForMinorTraits( INT32 iInitialValue );
#endif
+2
View File
@@ -7,4 +7,6 @@ void RenderIMPPersonalityEntrance( void );
void ExitIMPPersonalityEntrance( void );
void HandleIMPPersonalityEntrance( void );
STR16 pSkillTraitBeginIMPStrings[];
#endif
+97 -96
View File
@@ -21,6 +21,7 @@
#include "english.h"
#endif
// Kaiden this line was commented before I screwed with it
//extern struct POINT;
@@ -207,10 +208,10 @@ void CreateIMPPersonalityQuizButtons( void )
// ths Done button
giIMPPersonalityQuizButtonImage[0]= LoadButtonImage( "LAPTOP\\button_7.sti" ,-1,0,-1,1,-1 );
/* giIMPPersonalityQuizButton[0] = QuickCreateButton( giIMPPersonalityQuizButtonImage[0], LAPTOP_SCREEN_UL_X + ( 197 ), LAPTOP_SCREEN_WEB_UL_Y + ( 310 ),
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPPersonalityQuizAnswerConfirmCallback);
*/
// giIMPPersonalityQuizButton[0] = QuickCreateButton( giIMPPersonalityQuizButtonImage[0], LAPTOP_SCREEN_UL_X + ( 197 ), LAPTOP_SCREEN_WEB_UL_Y + ( 310 ),
// BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
// BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPPersonalityQuizAnswerConfirmCallback);
//
giIMPPersonalityQuizButton[0] = CreateIconAndTextButton( giIMPPersonalityQuizButtonImage[0], pImpButtonText[ 8 ], FONT12ARIAL,
FONT_WHITE, DEFAULT_SHADOW,
FONT_WHITE, DEFAULT_SHADOW,
@@ -221,10 +222,10 @@ void CreateIMPPersonalityQuizButtons( void )
// start over
giIMPPersonalityQuizButtonImage[ 1 ]= LoadButtonImage( "LAPTOP\\button_5.sti" ,-1,0,-1,1,-1 );
/* giIMPPersonalityQuizButton[ 1 ] = QuickCreateButton( giIMPPersonalityQuizButtonImage[1], LAPTOP_SCREEN_UL_X + ( BTN_FIRST_COLUMN_X ), LAPTOP_SCREEN_WEB_UL_Y + ( 310 ),
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPPersonalityQuizStartOverCallback);
*/
// giIMPPersonalityQuizButton[ 1 ] = QuickCreateButton( giIMPPersonalityQuizButtonImage[1], LAPTOP_SCREEN_UL_X + ( BTN_FIRST_COLUMN_X ), LAPTOP_SCREEN_WEB_UL_Y + ( 310 ),
// BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
// BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPPersonalityQuizStartOverCallback);
//
giIMPPersonalityQuizButton[ 1 ] = CreateIconAndTextButton( giIMPPersonalityQuizButtonImage[ 1 ], pImpButtonText[ 7 ], FONT12ARIAL,
FONT_WHITE, DEFAULT_SHADOW,
@@ -1024,12 +1025,12 @@ void CompileQuestionsInStatsAndWhatNot( void )
if( fCharacterIsMale )
{
// Martial arts
AddSkillToSkillList( MARTIALARTS );
AddSkillToSkillList( MARTIALARTS_OT );
}
else
{
// for women, ambidexterious
AddSkillToSkillList( AMBIDEXT );
AddSkillToSkillList( AMBIDEXT_OT );
}
break;
case( 1 ):
@@ -1037,15 +1038,15 @@ void CompileQuestionsInStatsAndWhatNot( void )
break;
case( 2 ):
// hand to hand
AddSkillToSkillList( HANDTOHAND );
AddSkillToSkillList( HANDTOHAND_OT );
break;
case( 3 ):
// lock picking
AddSkillToSkillList( LOCKPICKING );
AddSkillToSkillList( LOCKPICKING_OT );
break;
case( 4 ):
// throwing
AddSkillToSkillList( THROWING );
AddSkillToSkillList( THROWING_OT );
break;
case( 5 ):
// optimist
@@ -1058,10 +1059,10 @@ void CompileQuestionsInStatsAndWhatNot( void )
{
case( 0 ):
// teaching
AddSkillToSkillList( TEACHING );
AddSkillToSkillList( TEACHING_OT );
break;
case( 1 ):
AddSkillToSkillList( STEALTHY );
AddSkillToSkillList( STEALTHY_OT );
break;
case( 2 ):
// psycho
@@ -1077,14 +1078,14 @@ void CompileQuestionsInStatsAndWhatNot( void )
{
case( 0 ):
// lock picking
AddSkillToSkillList( LOCKPICKING );
AddSkillToSkillList( LOCKPICKING_OT );
break;
case( 1 ):
// arrogant
AddAnAttitudeToAttitudeList( ATT_ARROGANT );
break;
case( 2 ):
AddSkillToSkillList( STEALTHY );
AddSkillToSkillList( STEALTHY_OT );
break;
case( 3 ):
// normal
@@ -1098,7 +1099,7 @@ void CompileQuestionsInStatsAndWhatNot( void )
{
case( 0 ):
// automatic weapons
AddSkillToSkillList( AUTO_WEAPS );
AddSkillToSkillList( AUTO_WEAPS_OT );
break;
case( 1 ):
// friendly
@@ -1146,7 +1147,7 @@ void CompileQuestionsInStatsAndWhatNot( void )
AddAnAttitudeToAttitudeList( ATT_COWARD );
break;
case( 1 ):
AddSkillToSkillList( NIGHTOPS );
AddSkillToSkillList( NIGHTOPS_OT );
break;
case( 2 ):
// dont like boxes much
@@ -1165,14 +1166,14 @@ void CompileQuestionsInStatsAndWhatNot( void )
{
case( 0 ):
// electronics
AddSkillToSkillList( ELECTRONICS );
AddSkillToSkillList( ELECTRONICS_OT );
break;
case( 1 ):
//knifing
AddSkillToSkillList( KNIFING );
AddSkillToSkillList( KNIFING_OT );
break;
case( 2 ):
AddSkillToSkillList( NIGHTOPS );
AddSkillToSkillList( NIGHTOPS_OT );
break;
case( 3 ):
// none
@@ -1184,7 +1185,7 @@ void CompileQuestionsInStatsAndWhatNot( void )
{
case( 0 ):
// ambidexterous
AddSkillToSkillList( AMBIDEXT );
AddSkillToSkillList( AMBIDEXT_OT );
break;
case( 1 ):
// none
@@ -1247,7 +1248,7 @@ void CompileQuestionsInStatsAndWhatNot( void )
break;
case( 1 ):
// teaching
AddSkillToSkillList( TEACHING );
AddSkillToSkillList( TEACHING_OT );
break;
case( 2 ):
// aggressive
@@ -1269,32 +1270,32 @@ void CompileQuestionsInStatsAndWhatNot( void )
if( fCharacterIsMale )
{
// Martial arts
AddSkillToSkillList( MARTIALARTS );
AddSkillToSkillList( MARTIALARTS_OT );
}
else
{
// for women, ambidexterious
AddSkillToSkillList( AMBIDEXT );
AddSkillToSkillList( AMBIDEXT_OT );
}
break;
case( 1 ):
//knifing
AddSkillToSkillList( KNIFING );
AddSkillToSkillList( KNIFING_OT );
break;
case( 2 ):
// none
break;
case( 3 ):
// automatic weapons
AddSkillToSkillList( AUTO_WEAPS );
AddSkillToSkillList( AUTO_WEAPS_OT );
break;
case( 4 ):
// hand to hand
AddSkillToSkillList( HANDTOHAND );
AddSkillToSkillList( HANDTOHAND_OT );
break;
case( 5 ):
// electronics
AddSkillToSkillList( ELECTRONICS );
AddSkillToSkillList( ELECTRONICS_OT );
break;
case( 6 ):
// ashole
@@ -1350,11 +1351,11 @@ void CompileQuestionsInStatsAndWhatNot( void )
{
case( 0 ):
// throwing
AddSkillToSkillList( THROWING );
AddSkillToSkillList( THROWING_OT );
break;
case( 1 ):
// ambidexterous
AddSkillToSkillList( AMBIDEXT );
AddSkillToSkillList( AMBIDEXT_OT );
break;
case( 3 ):
// none
@@ -1622,71 +1623,71 @@ void HandleIMPQuizKeyBoard( void )
// HOOK INTO MOUSE HOOKS
/*
if( (InputEvent.usEvent == KEY_DOWN ) && ( InputEvent.usParam >= '1' ) && ( InputEvent.usParam <= '9') )
{
if( ( UINT16 )( iNumberOfPersonaButtons ) >= InputEvent.usParam - '0' )
{
//
//if( (InputEvent.usEvent == KEY_DOWN ) && ( InputEvent.usParam >= '1' ) && ( InputEvent.usParam <= '9') )
//{
// if( ( UINT16 )( iNumberOfPersonaButtons ) >= InputEvent.usParam - '0' )
// {
// reset buttons
ResetQuizAnswerButtons( );
// ResetQuizAnswerButtons( );
// ok, check to see if button was disabled, if so, re enable
CheckStateOfTheConfirmButton( );
// CheckStateOfTheConfirmButton( );
// toggle this button on
ButtonList[ giIMPPersonalityQuizAnswerButton[ InputEvent.usParam - '1' ] ]->uiFlags |= (BUTTON_CLICKED_ON);
// ButtonList[ giIMPPersonalityQuizAnswerButton[ InputEvent.usParam - '1' ] ]->uiFlags |= (BUTTON_CLICKED_ON);
iCurrentAnswer = InputEvent.usParam - '1';
// iCurrentAnswer = InputEvent.usParam - '1';
PrintImpText( );
// PrintImpText( );
// the current and last question numbers
PrintQuizQuestionNumber( );
// PrintQuizQuestionNumber( );
fReDrawCharProfile = TRUE;
fSkipFrame = TRUE;
}
}
else if( ( iCurrentAnswer != -1 ) && ( InputEvent.usEvent == KEY_DOWN ) && ( InputEvent.usParam == ENTER ) )
{
// fReDrawCharProfile = TRUE;
// fSkipFrame = TRUE;
// }
// }
// else if( ( iCurrentAnswer != -1 ) && ( InputEvent.usEvent == KEY_DOWN ) && ( InputEvent.usParam == ENTER ) )
// {
// reset all the buttons
ResetQuizAnswerButtons( );
// ResetQuizAnswerButtons( );
// copy the answer into the list
iQuizAnswerList[ giCurrentPersonalityQuizQuestion ] = iCurrentAnswer;
// iQuizAnswerList[ giCurrentPersonalityQuizQuestion ] = iCurrentAnswer;
// reset answer for next question
iCurrentAnswer = -1;
// iCurrentAnswer = -1;
// next question, JOHNNY!
giCurrentPersonalityQuizQuestion++;
giMaxPersonalityQuizQuestion++;
// giCurrentPersonalityQuizQuestion++;
// giMaxPersonalityQuizQuestion++;
// OPPS!, done..time to finish up
if( giCurrentPersonalityQuizQuestion > 15)
{
iCurrentImpPage = IMP_PERSONALITY_FINISH;
// if( giCurrentPersonalityQuizQuestion > 15)
// {
// iCurrentImpPage = IMP_PERSONALITY_FINISH;
// process
CompileQuestionsInStatsAndWhatNot( );
}
// CompileQuestionsInStatsAndWhatNot( );
// }
fSkipFrame = TRUE;
}
else if( ( InputEvent.usEvent == KEY_DOWN ) && ( InputEvent.usParam == '=' ) )
{
MoveAheadAQuestion( );
fSkipFrame = TRUE;
}
else if( ( InputEvent.usEvent == KEY_DOWN ) && ( InputEvent.usParam == '-' ) )
{
MoveBackAQuestion( );
fSkipFrame = TRUE;
}
else
{
// fSkipFrame = TRUE;
// }
// else if( ( InputEvent.usEvent == KEY_DOWN ) && ( InputEvent.usParam == '=' ) )
// {
// MoveAheadAQuestion( );
// fSkipFrame = TRUE;
// }
// else if( ( InputEvent.usEvent == KEY_DOWN ) && ( InputEvent.usParam == '-' ) )
// {
// MoveBackAQuestion( );
// fSkipFrame = TRUE;
// }
// else
// {
*/ switch(InputEvent.usEvent)
switch(InputEvent.usEvent)
{
case LEFT_BUTTON_DOWN:
MouseSystemHook(LEFT_BUTTON_DOWN, (INT16)MousePos.x, (INT16)MousePos.y,_LeftButtonDown, _RightButtonDown);
@@ -1761,19 +1762,19 @@ void MoveAheadAQuestion( void )
CheckAndUpdateNextPreviousIMPQuestionButtonStates( );
/*
EnableButton( giPreviousQuestionButton );
if( giCurrentPersonalityQuizQuestion >= giMaxPersonalityQuizQuestion )
{
DisableButton( giNextQuestionButton );
iCurrentAnswer = -1;
}
else
{
EnableButton( giNextQuestionButton );
}
*/
// EnableButton( giPreviousQuestionButton );
// if( giCurrentPersonalityQuizQuestion >= giMaxPersonalityQuizQuestion )
// {
// DisableButton( giNextQuestionButton );
// iCurrentAnswer = -1;
// }
// else
// {
// EnableButton( giNextQuestionButton );
// }
return;
}
@@ -1792,16 +1793,16 @@ void MoveBackAQuestion( void )
EnableButton( giNextQuestionButton );
CheckAndUpdateNextPreviousIMPQuestionButtonStates( );
/*
if( giCurrentPersonalityQuizQuestion == 0 )
{
DisableButton( giPreviousQuestionButton );
}
else
{
EnableButton( giPreviousQuestionButton );
}
*/
// if( giCurrentPersonalityQuizQuestion == 0 )
// {
// DisableButton( giPreviousQuestionButton );
// }
// else
// {
// EnableButton( giPreviousQuestionButton );
// }
return;
}
+105 -17
View File
@@ -21,10 +21,15 @@
#include "IMP Compile Character.h"
#endif
#include "IMP Confirm.h"
//current and last pages
INT32 iCurrentPortrait = 0;
INT32 iLastPicture = 7;
INT32 iLastPictureF;
INT32 iLastPictureM;
// buttons needed for the IMP portrait screen
INT32 giIMPPortraitButton[ 3 ];
INT32 giIMPPortraitButtonImage[ 3 ];
@@ -52,6 +57,7 @@ void BtnIMPPortraitDoneCallback(GUI_BUTTON *btn,INT32 reason);
void EnterIMPPortraits( void )
{
iCurrentPortrait = 0;
// create buttons
CreateIMPPortraitButtons( );
@@ -121,7 +127,15 @@ BOOLEAN RenderPortrait( INT16 sX, INT16 sY )
// load it
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
FilenameForBPP( pPlayerSelectedBigFaceFileNames[ iCurrentPortrait ] , VObjectDesc.ImageFile);
if ( gIMPMaleValues[ iCurrentPortrait ].Enabled == 1 )
{
sprintf( VObjectDesc.ImageFile, "Faces\\BigFaces\\%02d.sti", gIMPMaleValues[ iCurrentPortrait ].PortraitId );
}
//FilenameForBPP( pPlayerSelectedBigFaceFileNames[ iCurrentPortrait ] , VObjectDesc.ImageFile);
CHECKF(AddVideoObject(&VObjectDesc, &uiGraphicHandle));
// show it
@@ -138,7 +152,15 @@ BOOLEAN RenderPortrait( INT16 sX, INT16 sY )
{
// load it
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
FilenameForBPP( pPlayerSelectedBigFaceFileNames[ iCurrentPortrait + 8 ] , VObjectDesc.ImageFile);
//FilenameForBPP( pPlayerSelectedBigFaceFileNames[ iCurrentPortrait + 8 ] , VObjectDesc.ImageFile);
if ( gIMPFemaleValues[ iCurrentPortrait ].Enabled == 1 )
{
sprintf( VObjectDesc.ImageFile, "Faces\\BigFaces\\%02d.sti", gIMPFemaleValues[ iCurrentPortrait ].PortraitId );
}
CHECKF(AddVideoObject(&VObjectDesc, &uiGraphicHandle));
// show it
@@ -154,12 +176,35 @@ BOOLEAN RenderPortrait( INT16 sX, INT16 sY )
return ( TRUE );
}
void IncrementPictureIndex( void )
{
// cycle to next picture
iCurrentPortrait++;
if( fCharacterIsMale )
{
if( gIMPMaleValues[iCurrentPortrait].uiIndex == iCurrentPortrait && gIMPMaleValues[iCurrentPortrait].PortraitId !=0 )
{
iCurrentPortrait = gIMPMaleValues[iCurrentPortrait].uiIndex;
}
else
{
iCurrentPortrait = 0;
}
}
else
{
if( gIMPFemaleValues[iCurrentPortrait].uiIndex == iCurrentPortrait && gIMPFemaleValues[iCurrentPortrait].PortraitId !=0 )
{
iCurrentPortrait = gIMPFemaleValues[iCurrentPortrait].uiIndex;
}
else
{
iCurrentPortrait = 0;
}
}
// cycle to next picture
/*
iCurrentPortrait++;
// gone too far?
@@ -168,23 +213,64 @@ void IncrementPictureIndex( void )
iCurrentPortrait = 0;
}
*/
return;
}
void DecrementPicture( void )
{
// cycle to previous picture
UINT32 cnt;
UINT32 idPort = 0;
iCurrentPortrait--;
if( fCharacterIsMale )
{
for ( cnt = 0; cnt < MAX_NEW_IMP_PORTRAITS; cnt++ )
{
if ( gIMPMaleValues[cnt].uiIndex == cnt && gIMPMaleValues[cnt].PortraitId !=0 )
{
iLastPictureM = gIMPMaleValues[cnt].uiIndex;
}
}
iLastPicture = iLastPictureM;
}
else
{
for ( cnt = 0; cnt < MAX_NEW_IMP_PORTRAITS; cnt++ )
{
if ( gIMPFemaleValues[cnt].uiIndex == cnt && gIMPFemaleValues[cnt].PortraitId !=0 )
{
iLastPictureF = gIMPFemaleValues[cnt].uiIndex;
}
}
iLastPicture = iLastPictureF;
}
iCurrentPortrait--;
if( fCharacterIsMale )
{
if( iCurrentPortrait < 0 )
{
iCurrentPortrait = iLastPicture;
}
}
else
{
if( iCurrentPortrait < 0 )
{
iCurrentPortrait = iLastPicture;
}
}
/*
// gone too far?
if( iCurrentPortrait < 0 )
{
iCurrentPortrait = iLastPicture;
iCurrentPortrait = iLastPicture;
}
*/
return;
}
@@ -364,18 +450,20 @@ void BtnIMPPortraitDoneCallback(GUI_BUTTON *btn,INT32 reason)
}*/
// grab picture number
if( fCharacterIsMale )
{
// male
iPortraitNumber = iCurrentPortrait;
// male
iPortraitNumber = gIMPMaleValues[ iCurrentPortrait ].uiIndex; //iCurrentPortrait
}
else
{
// female
iPortraitNumber = iCurrentPortrait + ( 8 );
// female
iPortraitNumber = gIMPFemaleValues[ iCurrentPortrait ].uiIndex; //iCurrentPortrait ;//+ ( 8 );
}
fButtonPendingFlag = TRUE;
}
}
+2040 -225
View File
File diff suppressed because it is too large Load Diff
+29 -2
View File
@@ -28,10 +28,37 @@ enum
IMP_SKILL_TRAITS__NUMBER_SKILLS,
};
// STR16 gzIMPSkillTraitsText[];
// other set for new traits - SANDRO
enum
{
// major traits
IMP_SKILL_TRAITS_NEW_AUTO_WEAPONS,
IMP_SKILL_TRAITS_NEW_HEAVY_WEAPONS,
IMP_SKILL_TRAITS_NEW_PROF_SNIPER,
IMP_SKILL_TRAITS_NEW_RANGER,
IMP_SKILL_TRAITS_NEW_GUNSLINGER,
IMP_SKILL_TRAITS_NEW_MARTIAL_ARTS,
IMP_SKILL_TRAITS_NEW_SQUADLEADER,
IMP_SKILL_TRAITS_NEW_TECHNICIAN,
IMP_SKILL_TRAITS_NEW_DOCTOR,
IMP_SKILL_TRAITS_NEW_MAJOR_NONE,
IMP_SKILL_TRAITS_NEW_NUMBER_MAJOR_SKILLS,
};
INT8 DoesPlayerHaveExtraAttibutePointsToDistributeBasedOnSkillSelection();
INT8 CountNumSkillTraitsSelected( BOOLEAN fIncludeNoneSkill );
INT32 DoesPlayerHaveExtraAttibutePointsToDistributeBasedOnSkillSelection();
void AddSelectedSkillsToSkillsList();
INT32 StrengthRequiredDueToMajorSkills( void );
INT32 AgilityRequiredDueToMajorSkills( void );
INT32 DexterityRequiredDueToMajorSkills( void );
INT32 HealthRequiredDueToMajorSkills( void );
INT32 LeadershipRequiredDueToMajorSkills( void );
INT32 WisdomRequiredDueToMajorSkills( void );
INT32 MarksmanshipRequiredDueToMajorSkills( void );
INT32 MechanicalRequiredDueToMajorSkills( void );
INT32 MedicalRequiredDueToMajorSkills( void );
INT32 ExplosivesRequiredDueToMajorSkills( void );
#endif
+38 -13
View File
@@ -12,6 +12,11 @@
#include "IMP Personality Finish.h"
#include "IMP Attribute Selection.h"
#include "IMP MainPage.h"
// added by SANDRO
#include "IMP Confirm.h"
#include "GameSettings.h"
#include "Text.h"
#include "_Ja25Englishtext.h"
#endif
#define IMP_SEEK_AMOUNT 5 * 80 * 2
@@ -180,14 +185,20 @@ void PrintImpText( void )
break;
case ( IMP_PERSONALITY ):
// SANDRO - I HAVE CHANGED THESE TO BE ABLE TO EDIT THE TEXTS BEFORE SKILL TRAITS (THE TEXTS ARE ABOVE HERE)
// EVEN IF IT IS A LITTLE STUPID WAY, I HAVEN'T FOUND A WAY HOW TO EDIT IMPtext.edt..
// THE TEXTS OF "pSkillTraitBeginIMPStrings" ARE IN "_EnglishText.cpp" at the end
// SANDRO - I HAVE CHANGED THESE TO BE ABLE TO EDIT THE TEXTS BEFORE SKILL TRAITS
// EVEN IF IT IS A LITTLE STUPID WAY, I HAVEN'T FOUND A DIFFERENT WAY
//LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 130, LAPTOP_SCREEN_WEB_UL_Y + 60, ( 456 - 200 ), IMP_PERS_1, FONT12ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
//LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 130, LAPTOP_SCREEN_WEB_UL_Y + 130, ( 456 - 200 ), IMP_PERS_2, FONT12ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
DisplayWrappedString( LAPTOP_SCREEN_UL_X + 130, LAPTOP_SCREEN_WEB_UL_Y + 57, ( 456 - 200 ), 2, FONT12ARIAL, FONT_WHITE, pSkillTraitBeginIMPStrings[ 0 ],FONT_BLACK,FALSE,CENTER_JUSTIFIED);
DisplayWrappedString( LAPTOP_SCREEN_UL_X + 130, LAPTOP_SCREEN_WEB_UL_Y + 140, ( 456 - 200 ), 2, FONT12ARIAL, FONT_WHITE, pSkillTraitBeginIMPStrings[ 1 ],FONT_BLACK,FALSE,CENTER_JUSTIFIED);
if ( gGameOptions.fNewTraitSystem )
{
DisplayWrappedString( LAPTOP_SCREEN_UL_X + 130, LAPTOP_SCREEN_WEB_UL_Y + 57, ( 456 - 200 ), 2, FONT12ARIAL, FONT_WHITE, pSkillTraitBeginIMPStrings[ 2 ],FONT_BLACK,FALSE,CENTER_JUSTIFIED);
DisplayWrappedString( LAPTOP_SCREEN_UL_X + 130, LAPTOP_SCREEN_WEB_UL_Y + 155, ( 456 - 200 ), 2, FONT12ARIAL, FONT_WHITE, pSkillTraitBeginIMPStrings[ 3 ],FONT_BLACK,FALSE,CENTER_JUSTIFIED);
}
else
{
DisplayWrappedString( LAPTOP_SCREEN_UL_X + 130, LAPTOP_SCREEN_WEB_UL_Y + 57, ( 456 - 200 ), 2, FONT12ARIAL, FONT_WHITE, pSkillTraitBeginIMPStrings[ 0 ],FONT_BLACK,FALSE,CENTER_JUSTIFIED);
DisplayWrappedString( LAPTOP_SCREEN_UL_X + 130, LAPTOP_SCREEN_WEB_UL_Y + 140, ( 456 - 200 ), 2, FONT12ARIAL, FONT_WHITE, pSkillTraitBeginIMPStrings[ 1 ],FONT_BLACK,FALSE,CENTER_JUSTIFIED);
}
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X - 111, LAPTOP_SCREEN_WEB_UL_Y + 7, sWidth, IMP_PERS_6, FONT14ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED );
@@ -217,11 +228,21 @@ void PrintImpText( void )
}
break;
case( IMP_ATTRIBUTE_ENTRANCE ):
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X - 111, LAPTOP_SCREEN_WEB_UL_Y + 7, sWidth, IMP_ATTRIB_1 - 1, FONT14ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 110, LAPTOP_SCREEN_WEB_UL_Y + 50, ( 300 ), IMP_ATTRIB_5, FONT12ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 110, LAPTOP_SCREEN_WEB_UL_Y + 130, ( 300 ), IMP_ATTRIB_6, FONT12ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 110, LAPTOP_SCREEN_WEB_UL_Y + 200, ( 300 ), IMP_ATTRIB_7, FONT12ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
if ( gGameOptions.fNewTraitSystem )
{
CHAR16 sMinAttr[400];
swprintf( sMinAttr, sgAttributeSelectionText[ 4 ], gGameExternalOptions.iMinAttribute );
DisplayWrappedString( LAPTOP_SCREEN_UL_X + 122, LAPTOP_SCREEN_WEB_UL_Y + 57, ( 466 - 190 ), 2, FONT12ARIAL, FONT_WHITE, sMinAttr,FONT_BLACK,FALSE,CENTER_JUSTIFIED);
DisplayWrappedString( LAPTOP_SCREEN_UL_X + 122, LAPTOP_SCREEN_WEB_UL_Y + 116, ( 466 - 190 ), 2, FONT12ARIAL, FONT_WHITE, sgAttributeSelectionText[ 5 ],FONT_BLACK,FALSE,CENTER_JUSTIFIED);
DisplayWrappedString( LAPTOP_SCREEN_UL_X + 122, LAPTOP_SCREEN_WEB_UL_Y + 163, ( 466 - 190 ), 2, FONT12ARIAL, FONT_WHITE, sgAttributeSelectionText[ 6 ],FONT_BLACK,FALSE,CENTER_JUSTIFIED);
}
else
{
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X - 111, LAPTOP_SCREEN_WEB_UL_Y + 7, sWidth, IMP_ATTRIB_1 - 1, FONT14ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 110, LAPTOP_SCREEN_WEB_UL_Y + 50, ( 300 ), IMP_ATTRIB_5, FONT12ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 110, LAPTOP_SCREEN_WEB_UL_Y + 130, ( 300 ), IMP_ATTRIB_6, FONT12ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 110, LAPTOP_SCREEN_WEB_UL_Y + 200, ( 300 ), IMP_ATTRIB_7, FONT12ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
}
break;
case( IMP_ATTRIBUTE_PAGE ):
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X - 111, LAPTOP_SCREEN_WEB_UL_Y + 7, sWidth, IMP_ATTRIB_1 - 1, FONT14ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
@@ -284,9 +305,13 @@ void PrintImpText( void )
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 150, LAPTOP_SCREEN_WEB_UL_Y + 55, ( 200 ), IMP_FIN_2 - 1, FONT12ARIAL, FONT_WHITE, TRUE, 0);
break;
case( IMP_CONFIRM ):
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X - 111, LAPTOP_SCREEN_WEB_UL_Y + 7, sWidth, IMP_CON_1 , FONT14ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X - 111, LAPTOP_SCREEN_WEB_UL_Y + 7, sWidth, IMP_CON_1 , FONT14ARIAL, FONT_WHITE, TRUE, CENTER_JUSTIFIED);
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 160, LAPTOP_SCREEN_WEB_UL_Y + 60, ( 200 ), IMP_CON_2 , FONT12ARIAL, FONT_WHITE, TRUE, 0);
LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 160, LAPTOP_SCREEN_WEB_UL_Y + 145, ( 200 ), IMP_CON_3 , FONT12ARIAL, FONT_WHITE, TRUE, 0);
//LoadAndDisplayIMPText( LAPTOP_SCREEN_UL_X + 160, LAPTOP_SCREEN_WEB_UL_Y + 145, ( 200 ), IMP_CON_3 , FONT12ARIAL, FONT_WHITE, TRUE, 0);
// SANDRO - changed to show exact cost of profile
CHAR16 chPayCost[1000];
swprintf( chPayCost, gzIMPProfileCostText[ 0 ], iGetProfileCost() );
DisplayWrappedString( LAPTOP_SCREEN_UL_X + 160, LAPTOP_SCREEN_WEB_UL_Y + 145, ( 200 ), 2, FONT12ARIAL, FONT_WHITE, chPayCost,FONT_BLACK,FALSE,LEFT_JUSTIFIED);
break;
}
-34
View File
@@ -381,41 +381,7 @@ void BtnIMPVoicesDoneCallback(GUI_BUTTON *btn,INT32 reason)
iCurrentImpPage = IMP_COLOR_CHOICE_PAGE;
// Following part removed
// go to main page
/*iCurrentImpPage = IMP_MAIN_PAGE;
// if we are already done, leave
if( iCurrentProfileMode == IMP__FINISH )
{
iCurrentImpPage = IMP_FINISH;
}
else
{
if( CameBackToVoicePageButNotFinished() )
{
iCurrentImpPage = IMP_MAIN_PAGE;
}
else
{
iCurrentProfileMode = IMP__PERSONALITY;
}
}*/
/*
// current mode now is voice
else if( iCurrentProfileMode < IMP__PORTRAIT )
{
iCurrentProfileMode = IMP__PORTRAIT;
}
else if( iCurrentProfileMode == IMP__PORTRAIT )
{
// all done profiling
iCurrentProfileMode = IMP__VOICE;
iCurrentImpPage = IMP_FINISH;
}
*/
// set voice id, to grab character slot
// WDS: Allow flexible numbers of IMPs of each sex
LaptopSaveInfo.iIMPIndex = gGameExternalOptions.iaIMPSlots[iCurrentVoice];
+895
View File
@@ -0,0 +1,895 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Name="Laptop"
ProjectGUID="{5234CD2E-97F1-42FF-828D-CE0A1B46805E}"
RootNamespace="Laptop"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="..\lib\VS2005\$(ConfigurationName)"
IntermediateDirectory="..\build\VS2005\$(ProjectName)_$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="..\ja2.vsprops;..\ja2_Debug.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
RuntimeTypeInfo="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
DisableSpecificWarnings="4100"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="..\lib\VS2005\$(ConfigurationName)"
IntermediateDirectory="..\build\VS2005\$(ProjectName)_$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="..\ja2.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
RuntimeLibrary="0"
RuntimeTypeInfo="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="MapEditor|Win32"
OutputDirectory="..\lib\VS2005\$(ConfigurationName)"
IntermediateDirectory="..\build\VS2005\$(ProjectName)_$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="..\ja2.vsprops;..\ja2_Editor.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
RuntimeLibrary="0"
RuntimeTypeInfo="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="MapEditorD|Win32"
OutputDirectory="..\lib\VS2005\$(ConfigurationName)"
IntermediateDirectory="..\build\VS2005\$(ProjectName)_$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="..\ja2.vsprops;..\ja2_Editor.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
RuntimeTypeInfo="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
DisableSpecificWarnings="4100"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release_WithDebugInfo|Win32"
OutputDirectory="..\lib\VS2005\$(ConfigurationName)"
IntermediateDirectory="..\build\VS2005\$(ProjectName)_$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="..\ja2.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
RuntimeLibrary="0"
RuntimeTypeInfo="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\aim.h"
>
</File>
<File
RelativePath=".\AimArchives.h"
>
</File>
<File
RelativePath=".\AimFacialIndex.h"
>
</File>
<File
RelativePath=".\AimHistory.h"
>
</File>
<File
RelativePath=".\AimLinks.h"
>
</File>
<File
RelativePath=".\AimMembers.h"
>
</File>
<File
RelativePath=".\AimPolicies.h"
>
</File>
<File
RelativePath=".\AimSort.h"
>
</File>
<File
RelativePath=".\BobbyR.h"
>
</File>
<File
RelativePath=".\BobbyRAmmo.h"
>
</File>
<File
RelativePath=".\BobbyRArmour.h"
>
</File>
<File
RelativePath=".\BobbyRGuns.h"
>
</File>
<File
RelativePath=".\BobbyRMailOrder.h"
>
</File>
<File
RelativePath=".\BobbyRMisc.h"
>
</File>
<File
RelativePath=".\BobbyRShipments.h"
>
</File>
<File
RelativePath=".\BobbyRUsed.h"
>
</File>
<File
RelativePath=".\BrokenLink.h"
>
</File>
<File
RelativePath=".\CharProfile.h"
>
</File>
<File
RelativePath=".\email.h"
>
</File>
<File
RelativePath=".\files.h"
>
</File>
<File
RelativePath=".\finances.h"
>
</File>
<File
RelativePath=".\florist Cards.h"
>
</File>
<File
RelativePath=".\florist Gallery.h"
>
</File>
<File
RelativePath=".\florist Order Form.h"
>
</File>
<File
RelativePath=".\florist.h"
>
</File>
<File
RelativePath=".\funeral.h"
>
</File>
<File
RelativePath=".\GunEmporium.h"
>
</File>
<File
RelativePath=".\history.h"
>
</File>
<File
RelativePath=".\IMP AboutUs.h"
>
</File>
<File
RelativePath=".\IMP Attribute Entrance.h"
>
</File>
<File
RelativePath=".\IMP Attribute Finish.h"
>
</File>
<File
RelativePath=".\IMP Attribute Selection.h"
>
</File>
<File
RelativePath=".\IMP Begin Screen.h"
>
</File>
<File
RelativePath=".\IMP Character and Disability Entrance.h"
>
</File>
<File
RelativePath=".\IMP Character Trait.h"
>
</File>
<File
RelativePath=".\IMP Color Choosing.h"
>
</File>
<File
RelativePath=".\IMP Compile Character.h"
>
</File>
<File
RelativePath=".\IMP Confirm.h"
>
</File>
<File
RelativePath=".\IMP Disability Trait.h"
>
</File>
<File
RelativePath=".\IMP Finish.h"
>
</File>
<File
RelativePath=".\IMP HomePage.h"
>
</File>
<File
RelativePath=".\IMP MainPage.h"
>
</File>
<File
RelativePath=".\IMP Minor Trait.h"
>
</File>
<File
RelativePath=".\IMP Personality Entrance.h"
>
</File>
<File
RelativePath=".\IMP Personality Finish.h"
>
</File>
<File
RelativePath=".\IMP Personality Quiz.h"
>
</File>
<File
RelativePath=".\IMP Portraits.h"
>
</File>
<File
RelativePath=".\IMP Skill Trait.h"
>
</File>
<File
RelativePath=".\IMP Text System.h"
>
</File>
<File
RelativePath=".\IMP Voices.h"
>
</File>
<File
RelativePath=".\IMPVideoObjects.h"
>
</File>
<File
RelativePath=".\insurance Comments.h"
>
</File>
<File
RelativePath=".\insurance Contract.h"
>
</File>
<File
RelativePath=".\insurance Info.h"
>
</File>
<File
RelativePath=".\Insurance Text.h"
>
</File>
<File
RelativePath=".\insurance.h"
>
</File>
<File
RelativePath=".\Laptop All.h"
>
</File>
<File
RelativePath=".\laptop.h"
>
</File>
<File
RelativePath=".\LaptopSave.h"
>
</File>
<File
RelativePath=".\mercs Account.h"
>
</File>
<File
RelativePath=".\mercs Files.h"
>
</File>
<File
RelativePath=".\mercs No Account.h"
>
</File>
<File
RelativePath=".\mercs.h"
>
</File>
<File
RelativePath=".\personnel.h"
>
</File>
<File
RelativePath=".\PostalService.h"
>
</File>
<File
RelativePath=".\sirtech.h"
>
</File>
<File
RelativePath=".\Speck Quotes.h"
>
</File>
<File
RelativePath=".\Store Inventory.h"
>
</File>
</Filter>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\aim.cpp"
>
</File>
<File
RelativePath=".\AimArchives.cpp"
>
</File>
<File
RelativePath=".\AimFacialIndex.cpp"
>
</File>
<File
RelativePath=".\AimHistory.cpp"
>
</File>
<File
RelativePath=".\AimLinks.cpp"
>
</File>
<File
RelativePath=".\AimMembers.cpp"
>
</File>
<File
RelativePath=".\AimPolicies.cpp"
>
</File>
<File
RelativePath=".\AimSort.cpp"
>
</File>
<File
RelativePath=".\BobbyR.cpp"
>
</File>
<File
RelativePath=".\BobbyRAmmo.cpp"
>
</File>
<File
RelativePath=".\BobbyRArmour.cpp"
>
</File>
<File
RelativePath=".\BobbyRGuns.cpp"
>
</File>
<File
RelativePath=".\BobbyRMailOrder.cpp"
>
</File>
<File
RelativePath=".\BobbyRMisc.cpp"
>
</File>
<File
RelativePath=".\BobbyRShipments.cpp"
>
</File>
<File
RelativePath=".\BobbyRUsed.cpp"
>
</File>
<File
RelativePath=".\BrokenLink.cpp"
>
</File>
<File
RelativePath=".\CharProfile.cpp"
>
</File>
<File
RelativePath=".\email.cpp"
>
</File>
<File
RelativePath=".\files.cpp"
>
</File>
<File
RelativePath=".\finances.cpp"
>
</File>
<File
RelativePath=".\florist Cards.cpp"
>
</File>
<File
RelativePath=".\florist Gallery.cpp"
>
</File>
<File
RelativePath=".\florist Order Form.cpp"
>
</File>
<File
RelativePath=".\florist.cpp"
>
</File>
<File
RelativePath=".\funeral.cpp"
>
</File>
<File
RelativePath=".\history.cpp"
>
</File>
<File
RelativePath=".\IMP AboutUs.cpp"
>
</File>
<File
RelativePath=".\IMP Attribute Entrance.cpp"
>
</File>
<File
RelativePath=".\IMP Attribute Finish.cpp"
>
</File>
<File
RelativePath=".\IMP Attribute Selection.cpp"
>
</File>
<File
RelativePath=".\IMP Begin Screen.cpp"
>
</File>
<File
RelativePath=".\IMP Character and Disability Entrance.cpp"
>
</File>
<File
RelativePath=".\IMP Character Trait.cpp"
>
</File>
<File
RelativePath=".\IMP Color Choosing.cpp"
>
</File>
<File
RelativePath=".\IMP Compile Character.cpp"
>
</File>
<File
RelativePath=".\IMP Confirm.cpp"
>
</File>
<File
RelativePath=".\IMP Disability Trait.cpp"
>
</File>
<File
RelativePath=".\IMP Finish.cpp"
>
</File>
<File
RelativePath=".\IMP HomePage.cpp"
>
</File>
<File
RelativePath=".\IMP MainPage.cpp"
>
</File>
<File
RelativePath=".\IMP Minor Trait.cpp"
>
</File>
<File
RelativePath=".\IMP Personality Entrance.cpp"
>
</File>
<File
RelativePath=".\IMP Personality Finish.cpp"
>
</File>
<File
RelativePath=".\IMP Personality Quiz.cpp"
>
</File>
<File
RelativePath=".\IMP Portraits.cpp"
>
</File>
<File
RelativePath=".\IMP Skill Trait.cpp"
>
</File>
<File
RelativePath=".\IMP Text System.cpp"
>
</File>
<File
RelativePath=".\IMP Voices.cpp"
>
</File>
<File
RelativePath=".\IMPVideoObjects.cpp"
>
</File>
<File
RelativePath=".\insurance Comments.cpp"
>
</File>
<File
RelativePath=".\insurance Contract.cpp"
>
</File>
<File
RelativePath=".\insurance Info.cpp"
>
</File>
<File
RelativePath=".\insurance.cpp"
>
</File>
<File
RelativePath=".\laptop.cpp"
>
</File>
<File
RelativePath=".\mercs Account.cpp"
>
</File>
<File
RelativePath=".\mercs Files.cpp"
>
</File>
<File
RelativePath=".\mercs No Account.cpp"
>
</File>
<File
RelativePath=".\mercs.cpp"
>
</File>
<File
RelativePath=".\personnel.cpp"
>
</File>
<File
RelativePath=".\PostalService.cpp"
>
</File>
<File
RelativePath=".\sirtech.cpp"
>
</File>
<File
RelativePath=".\Store Inventory.cpp"
>
</File>
<File
RelativePath=".\XML_AIMAvailability.cpp"
>
</File>
<File
RelativePath=".\XML_ConditionsForMercAvailability.cpp"
>
</File>
<File
RelativePath=".\XML_DeliveryMethods.cpp"
>
</File>
<File
RelativePath=".\XML_IMPPortraits.cpp"
>
</File>
<File
RelativePath=".\XML_ShippingDestinations.cpp"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
+25 -5
View File
@@ -21,7 +21,7 @@
OutputDirectory="..\lib\VS2008\$(ConfigurationName)"
IntermediateDirectory="..\build\VS2008\$(ProjectName)_$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="..\ja2_VS2008.vsprops;..\ja2_VS2008Debug.vsprops"
InheritedPropertySheets="..\ja2.vsprops;..\ja2_Debug.vsprops"
CharacterSet="0"
>
<Tool
@@ -83,7 +83,7 @@
OutputDirectory="..\lib\VS2008\$(ConfigurationName)"
IntermediateDirectory="..\build\VS2008\$(ProjectName)_$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="..\ja2_VS2008.vsprops"
InheritedPropertySheets="..\ja2.vsprops"
CharacterSet="0"
WholeProgramOptimization="0"
>
@@ -147,7 +147,7 @@
OutputDirectory="..\lib\VS2008\$(ConfigurationName)"
IntermediateDirectory="..\build\VS2008\$(ProjectName)_$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="..\ja2_VS2008.vsprops;..\ja2_VS2008Editor.vsprops"
InheritedPropertySheets="..\ja2.vsprops;..\ja2_Editor.vsprops"
CharacterSet="0"
WholeProgramOptimization="0"
>
@@ -211,7 +211,7 @@
OutputDirectory="..\lib\VS2008\$(ConfigurationName)"
IntermediateDirectory="..\build\VS2008\$(ProjectName)_$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="..\ja2_VS2008.vsprops;..\ja2_VS2008Editor.vsprops"
InheritedPropertySheets="..\ja2.vsprops;..\ja2_Editor.vsprops"
CharacterSet="0"
>
<Tool
@@ -273,7 +273,7 @@
OutputDirectory="..\lib\VS2008\$(ConfigurationName)"
IntermediateDirectory="..\build\VS2008\$(ProjectName)_$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="..\ja2_VS2008.vsprops"
InheritedPropertySheets="..\ja2.vsprops"
CharacterSet="0"
WholeProgramOptimization="0"
>
@@ -507,6 +507,10 @@
RelativePath="IMP MainPage.h"
>
</File>
<File
RelativePath=".\IMP Minor Trait.h"
>
</File>
<File
RelativePath="IMP Personality Entrance.h"
>
@@ -779,6 +783,10 @@
RelativePath="IMP MainPage.cpp"
>
</File>
<File
RelativePath=".\IMP Minor Trait.cpp"
>
</File>
<File
RelativePath="IMP Personality Entrance.cpp"
>
@@ -863,10 +871,22 @@
RelativePath="Store Inventory.cpp"
>
</File>
<File
RelativePath=".\XML_AIMAvailability.cpp"
>
</File>
<File
RelativePath=".\XML_ConditionsForMercAvailability.cpp"
>
</File>
<File
RelativePath=".\XML_DeliveryMethods.cpp"
>
</File>
<File
RelativePath=".\XML_IMPPortraits.cpp"
>
</File>
<File
RelativePath=".\XML_ShippingDestinations.cpp"
>
+350
View File
@@ -0,0 +1,350 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="MapEditorD|Win32">
<Configuration>MapEditorD</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="MapEditor|Win32">
<Configuration>MapEditor</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Relese_WithDebugInfo|Win32">
<Configuration>Relese_WithDebugInfo</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClInclude Include="aim.h" />
<ClInclude Include="AimArchives.h" />
<ClInclude Include="AimFacialIndex.h" />
<ClInclude Include="AimHistory.h" />
<ClInclude Include="AimLinks.h" />
<ClInclude Include="AimMembers.h" />
<ClInclude Include="AimPolicies.h" />
<ClInclude Include="AimSort.h" />
<ClInclude Include="BobbyR.h" />
<ClInclude Include="BobbyRAmmo.h" />
<ClInclude Include="BobbyRArmour.h" />
<ClInclude Include="BobbyRGuns.h" />
<ClInclude Include="BobbyRMailOrder.h" />
<ClInclude Include="BobbyRMisc.h" />
<ClInclude Include="BobbyRShipments.h" />
<ClInclude Include="BobbyRUsed.h" />
<ClInclude Include="BrokenLink.h" />
<ClInclude Include="CharProfile.h" />
<ClInclude Include="email.h" />
<ClInclude Include="files.h" />
<ClInclude Include="finances.h" />
<ClInclude Include="florist Cards.h" />
<ClInclude Include="florist Gallery.h" />
<ClInclude Include="florist Order Form.h" />
<ClInclude Include="florist.h" />
<ClInclude Include="funeral.h" />
<ClInclude Include="GunEmporium.h" />
<ClInclude Include="history.h" />
<ClInclude Include="IMP AboutUs.h" />
<ClInclude Include="IMP Attribute Entrance.h" />
<ClInclude Include="IMP Attribute Finish.h" />
<ClInclude Include="IMP Attribute Selection.h" />
<ClInclude Include="IMP Begin Screen.h" />
<ClInclude Include="IMP Character and Disability Entrance.h" />
<ClInclude Include="IMP Character Trait.h" />
<ClInclude Include="IMP Color Choosing.h" />
<ClInclude Include="IMP Compile Character.h" />
<ClInclude Include="IMP Confirm.h" />
<ClInclude Include="IMP Disability Trait.h" />
<ClInclude Include="IMP Finish.h" />
<ClInclude Include="IMP HomePage.h" />
<ClInclude Include="IMP MainPage.h" />
<ClInclude Include="IMP Minor Trait.h" />
<ClInclude Include="IMP Personality Entrance.h" />
<ClInclude Include="IMP Personality Finish.h" />
<ClInclude Include="IMP Personality Quiz.h" />
<ClInclude Include="IMP Portraits.h" />
<ClInclude Include="IMP Skill Trait.h" />
<ClInclude Include="IMP Text System.h" />
<ClInclude Include="IMP Voices.h" />
<ClInclude Include="IMPVideoObjects.h" />
<ClInclude Include="insurance Comments.h" />
<ClInclude Include="insurance Contract.h" />
<ClInclude Include="insurance Info.h" />
<ClInclude Include="Insurance Text.h" />
<ClInclude Include="insurance.h" />
<ClInclude Include="Laptop All.h" />
<ClInclude Include="laptop.h" />
<ClInclude Include="LaptopSave.h" />
<ClInclude Include="mercs Account.h" />
<ClInclude Include="mercs Files.h" />
<ClInclude Include="mercs No Account.h" />
<ClInclude Include="mercs.h" />
<ClInclude Include="personnel.h" />
<ClInclude Include="PostalService.h" />
<ClInclude Include="sirtech.h" />
<ClInclude Include="Speck Quotes.h" />
<ClInclude Include="Store Inventory.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="aim.cpp" />
<ClCompile Include="AimArchives.cpp" />
<ClCompile Include="AimFacialIndex.cpp" />
<ClCompile Include="AimHistory.cpp" />
<ClCompile Include="AimLinks.cpp" />
<ClCompile Include="AimMembers.cpp" />
<ClCompile Include="AimPolicies.cpp" />
<ClCompile Include="AimSort.cpp" />
<ClCompile Include="BobbyR.cpp" />
<ClCompile Include="BobbyRAmmo.cpp" />
<ClCompile Include="BobbyRArmour.cpp" />
<ClCompile Include="BobbyRGuns.cpp" />
<ClCompile Include="BobbyRMailOrder.cpp" />
<ClCompile Include="BobbyRMisc.cpp" />
<ClCompile Include="BobbyRShipments.cpp" />
<ClCompile Include="BobbyRUsed.cpp" />
<ClCompile Include="BrokenLink.cpp" />
<ClCompile Include="CharProfile.cpp" />
<ClCompile Include="email.cpp" />
<ClCompile Include="files.cpp" />
<ClCompile Include="finances.cpp" />
<ClCompile Include="florist Cards.cpp" />
<ClCompile Include="florist Gallery.cpp" />
<ClCompile Include="florist Order Form.cpp" />
<ClCompile Include="florist.cpp" />
<ClCompile Include="funeral.cpp" />
<ClCompile Include="GunEmporium.cpp" />
<ClCompile Include="history.cpp" />
<ClCompile Include="IMP AboutUs.cpp" />
<ClCompile Include="IMP Attribute Entrance.cpp" />
<ClCompile Include="IMP Attribute Finish.cpp" />
<ClCompile Include="IMP Attribute Selection.cpp" />
<ClCompile Include="IMP Begin Screen.cpp" />
<ClCompile Include="IMP Character and Disability Entrance.cpp" />
<ClCompile Include="IMP Character Trait.cpp" />
<ClCompile Include="IMP Color Choosing.cpp" />
<ClCompile Include="IMP Compile Character.cpp" />
<ClCompile Include="IMP Confirm.cpp" />
<ClCompile Include="IMP Disability Trait.cpp" />
<ClCompile Include="IMP Finish.cpp" />
<ClCompile Include="IMP HomePage.cpp" />
<ClCompile Include="IMP MainPage.cpp" />
<ClCompile Include="IMP Minor Trait.cpp" />
<ClCompile Include="IMP Personality Entrance.cpp" />
<ClCompile Include="IMP Personality Finish.cpp" />
<ClCompile Include="IMP Personality Quiz.cpp" />
<ClCompile Include="IMP Portraits.cpp" />
<ClCompile Include="IMP Skill Trait.cpp" />
<ClCompile Include="IMP Text System.cpp" />
<ClCompile Include="IMP Voices.cpp" />
<ClCompile Include="IMPVideoObjects.cpp" />
<ClCompile Include="insurance Comments.cpp" />
<ClCompile Include="insurance Contract.cpp" />
<ClCompile Include="insurance Info.cpp" />
<ClCompile Include="insurance.cpp" />
<ClCompile Include="laptop.cpp" />
<ClCompile Include="mercs Account.cpp" />
<ClCompile Include="mercs Files.cpp" />
<ClCompile Include="mercs No Account.cpp" />
<ClCompile Include="mercs.cpp" />
<ClCompile Include="personnel.cpp" />
<ClCompile Include="PostalService.cpp" />
<ClCompile Include="sirtech.cpp" />
<ClCompile Include="Store Inventory.cpp" />
<ClCompile Include="XML_AIMAvailability.cpp" />
<ClCompile Include="XML_ConditionsForMercAvailability.cpp" />
<ClCompile Include="XML_DeliveryMethods.cpp" />
<ClCompile Include="XML_IMPPortraits.cpp" />
<ClCompile Include="XML_ShippingDestinations.cpp" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{6CFD0AF4-6BB4-4A19-B72E-71768A8D029D}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>Laptop</RootNamespace>
<ProjectName>Laptop</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditorD|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditor|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Relese_WithDebugInfo|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\ja2.props" />
<Import Project="..\ja2_Debug.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='MapEditorD|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\ja2.props" />
<Import Project="..\ja2_Debug.props" />
<Import Project="..\ja2_Editor.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\ja2.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='MapEditor|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\ja2.props" />
<Import Project="..\ja2_Editor.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Relese_WithDebugInfo|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\ja2.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditorD|Win32'">
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditor|Win32'">
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Relese_WithDebugInfo|Win32'">
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MapEditorD|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MapEditor|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Relese_WithDebugInfo|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
+426
View File
@@ -0,0 +1,426 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Header Files">
<UniqueIdentifier>{84a4f64f-bc1b-4e0c-848c-2b7c145ae615}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files">
<UniqueIdentifier>{b159d1de-d6d6-4531-b86a-b991f7210268}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="aim.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="AimArchives.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="AimFacialIndex.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="AimHistory.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="AimLinks.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="AimMembers.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="AimPolicies.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="AimSort.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="BobbyR.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="BobbyRAmmo.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="BobbyRArmour.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="BobbyRGuns.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="BobbyRMailOrder.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="BobbyRMisc.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="BobbyRShipments.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="BobbyRUsed.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="BrokenLink.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="CharProfile.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="email.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="files.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="finances.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="florist Cards.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="florist Gallery.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="florist Order Form.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="florist.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="funeral.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="GunEmporium.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="history.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IMP AboutUs.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IMP Attribute Entrance.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IMP Attribute Finish.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IMP Attribute Selection.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IMP Begin Screen.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IMP Character and Disability Entrance.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IMP Character Trait.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IMP Color Choosing.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IMP Compile Character.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IMP Confirm.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IMP Disability Trait.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IMP Finish.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IMP HomePage.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IMP MainPage.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IMP Minor Trait.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IMP Personality Entrance.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IMP Personality Finish.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IMP Personality Quiz.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IMP Portraits.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IMP Skill Trait.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IMP Text System.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IMP Voices.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IMPVideoObjects.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="insurance Comments.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="insurance Contract.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="insurance Info.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Insurance Text.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="insurance.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Laptop All.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="laptop.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="LaptopSave.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="mercs Account.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="mercs Files.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="mercs No Account.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="mercs.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="personnel.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="PostalService.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="sirtech.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Speck Quotes.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Store Inventory.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="aim.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="AimArchives.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="AimFacialIndex.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="AimHistory.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="AimLinks.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="AimMembers.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="AimPolicies.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="AimSort.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="BobbyR.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="BobbyRAmmo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="BobbyRArmour.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="BobbyRGuns.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="BobbyRMailOrder.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="BobbyRMisc.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="BobbyRShipments.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="BobbyRUsed.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="BrokenLink.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="CharProfile.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="email.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="files.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="finances.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="florist Cards.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="florist Gallery.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="florist Order Form.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="florist.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="funeral.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="GunEmporium.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="history.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IMP AboutUs.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IMP Attribute Entrance.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IMP Attribute Finish.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IMP Attribute Selection.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IMP Begin Screen.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IMP Character and Disability Entrance.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IMP Character Trait.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IMP Color Choosing.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IMP Compile Character.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IMP Confirm.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IMP Disability Trait.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IMP Finish.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IMP HomePage.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IMP MainPage.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IMP Minor Trait.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IMP Personality Entrance.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IMP Personality Finish.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IMP Personality Quiz.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IMP Portraits.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IMP Skill Trait.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IMP Text System.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IMP Voices.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IMPVideoObjects.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="insurance Comments.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="insurance Contract.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="insurance Info.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="insurance.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="laptop.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mercs Account.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mercs Files.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mercs No Account.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mercs.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="personnel.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="PostalService.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sirtech.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Store Inventory.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="XML_DeliveryMethods.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="XML_ShippingDestinations.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="XML_IMPPortraits.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="XML_AIMAvailability.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="XML_ConditionsForMercAvailability.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
+5 -4
View File
@@ -313,8 +313,11 @@ BOOLEAN CPostalService::DeliverShipment(UINT16 usShipmentID)
if( (shs.pDestination->ubMapX > 0) &&
(shs.pDestination->ubMapX < MAP_WORLD_X - 1) &&
(shs.pDestination->ubMapY > 0) &&
(shs.pDestination->ubMapY < MAP_WORLD_Y - 1) &&
GridNoOnVisibleWorldTile(shs.pDestination->sGridNo) )
(shs.pDestination->ubMapY < MAP_WORLD_Y - 1) ) //&&
//GridNoOnVisibleWorldTile(shs.pDestination->sGridNo) )
// silversurfer: wtf? This test checked if the delivery tile was valid for the currently loaded sector
// which is not necessarily the delivery sector
// if we are currently below ground it will crash the game...
{
BOOLEAN fSectorLoaded = ( gWorldSectorX == shs.pDestination->ubMapX ) &&
( gWorldSectorY == shs.pDestination->ubMapY ) &&
@@ -417,8 +420,6 @@ BOOLEAN CPostalService::DeliverShipment(UINT16 usShipmentID)
tempObject[0]->data.gun.ubGunShotsLeft = 0;
}
// TODO.RW: Hier Pablo stealing code einfügen und ubItemsDelivered reduzieren!!!
UINT8 cnt = -1;
// Loop through the items of a package
while ( ubItemsDelivered )
+234
View File
@@ -0,0 +1,234 @@
#ifdef PRECOMPILEDHEADERS
#include "Tactical All.h"
#else
#include "sgp.h"
#include "Debug Control.h"
#include "expat.h"
#include "XML.h"
#include "Interface.h"
#include "aim.h"
#endif
struct
{
PARSE_STAGE curElement;
CHAR8 szCharData[MAX_CHAR_DATA_LENGTH+1];
AIM_AVAILABLE curAimAvailability;
AIM_AVAILABLE * curArray;
UINT32 maxArraySize;
UINT32 curIndex;
UINT32 currentDepth;
UINT32 maxReadDepth;
}
typedef aimAvailabilityParseData;
BOOLEAN AimAvailability_TextOnly;
static void XMLCALL
aimAvailabilityStartElementHandle(void *userData, const XML_Char *name, const XML_Char **atts)
{
aimAvailabilityParseData * pData = (aimAvailabilityParseData *)userData;
if(pData->currentDepth <= pData->maxReadDepth) //are we reading this element?
{
if(strcmp(name, "AIM_AVAILABLES") == 0 && pData->curElement == ELEMENT_NONE)
{
pData->curElement = ELEMENT_LIST;
pData->maxReadDepth++; //we are not skipping this element
}
else if(strcmp(name, "AIM") == 0 && pData->curElement == ELEMENT_LIST)
{
pData->curElement = ELEMENT;
pData->maxReadDepth++; //we are not skipping this element
}
else if(pData->curElement == ELEMENT &&
(strcmp(name, "uiIndex") == 0 ||
strcmp(name, "ProfilId") == 0 ||
strcmp(name, "AimBioID") == 0 ))
{
pData->curElement = ELEMENT_PROPERTY;
pData->maxReadDepth++; //we are not skipping this element
}
pData->szCharData[0] = '\0';
}
pData->currentDepth++;
}
static void XMLCALL
aimCharacterDataHandle(void *userData, const XML_Char *str, int len)
{
aimAvailabilityParseData * pData = (aimAvailabilityParseData *)userData;
if( (pData->currentDepth <= pData->maxReadDepth) &&
(strlen(pData->szCharData) < MAX_CHAR_DATA_LENGTH)
){
strncat(pData->szCharData,str,__min((unsigned int)len,MAX_CHAR_DATA_LENGTH-strlen(pData->szCharData)));
}
}
static void XMLCALL
aimAvailabilityEndElementHandle(void *userData, const XML_Char *name)
{
aimAvailabilityParseData * pData = (aimAvailabilityParseData *)userData;
if(pData->currentDepth <= pData->maxReadDepth)
{
if(strcmp(name, "AIM_AVAILABLES") == 0)
{
pData->curElement = ELEMENT_NONE;
}
else if(strcmp(name, "AIM") == 0)
{
pData->curElement = ELEMENT_LIST;
if (!AimAvailability_TextOnly)
{
gAimAvailability[pData->curAimAvailability.uiIndex].uiIndex = pData->curAimAvailability.uiIndex;
gAimAvailability[pData->curAimAvailability.uiIndex].ProfilId = pData->curAimAvailability.ProfilId;
gAimAvailability[pData->curAimAvailability.uiIndex].ubAimArrayID = pData->curAimAvailability.uiIndex;
gAimAvailability[pData->curAimAvailability.uiIndex].AimBio = pData->curAimAvailability.AimBio;
gAimAvailabilityTemp[pData->curAimAvailability.uiIndex].uiIndex = pData->curAimAvailability.uiIndex;
gAimAvailabilityTemp[pData->curAimAvailability.uiIndex].ProfilId = pData->curAimAvailability.ProfilId;
gAimAvailabilityTemp[pData->curAimAvailability.uiIndex].ubAimArrayID = pData->curAimAvailability.uiIndex;
gAimAvailabilityTemp[pData->curAimAvailability.uiIndex].AimBio = pData->curAimAvailability.AimBio;
}
else
{
gAimAvailability[pData->curAimAvailability.uiIndex].uiIndex = pData->curAimAvailability.uiIndex;
gAimAvailability[pData->curAimAvailability.uiIndex].ProfilId = pData->curAimAvailability.ProfilId;
gAimAvailability[pData->curAimAvailability.uiIndex].ubAimArrayID = pData->curAimAvailability.uiIndex;
gAimAvailability[pData->curAimAvailability.uiIndex].AimBio = pData->curAimAvailability.AimBio;
gAimAvailabilityTemp[pData->curAimAvailability.uiIndex].uiIndex = pData->curAimAvailability.uiIndex;
gAimAvailabilityTemp[pData->curAimAvailability.uiIndex].ProfilId = pData->curAimAvailability.ProfilId;
gAimAvailabilityTemp[pData->curAimAvailability.uiIndex].ubAimArrayID = pData->curAimAvailability.uiIndex;
gAimAvailabilityTemp[pData->curAimAvailability.uiIndex].AimBio = pData->curAimAvailability.AimBio;
}
}
else if(strcmp(name, "uiIndex") == 0)
{
pData->curElement = ELEMENT;
pData->curAimAvailability.uiIndex = (UINT8) atol(pData->szCharData);
}
else if(strcmp(name, "ProfilId") == 0)
{
pData->curElement = ELEMENT;
pData->curAimAvailability.ProfilId = (UINT8) atol(pData->szCharData);
}
else if(strcmp(name, "AimBioID") == 0)
{
pData->curElement = ELEMENT;
pData->curAimAvailability.AimBio = (UINT8) atol(pData->szCharData);
}
pData->maxReadDepth--;
}
pData->currentDepth--;
}
BOOLEAN ReadInAimAvailability(STR fileName, BOOLEAN localizedVersion)
{
HWFILE hFile;
UINT32 uiBytesRead;
UINT32 uiFSize;
CHAR8 * lpcBuffer;
XML_Parser parser = XML_ParserCreate(NULL);
aimAvailabilityParseData pData;
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, "Loading AimAvailability.xml" );
AimAvailability_TextOnly = localizedVersion;
// Open file
hFile = FileOpen( fileName, FILE_ACCESS_READ, FALSE );
if ( !hFile )
return( localizedVersion );
uiFSize = FileGetSize(hFile);
lpcBuffer = (CHAR8 *) MemAlloc(uiFSize+1);
//Read in block
if ( !FileRead( hFile, lpcBuffer, uiFSize, &uiBytesRead ) )
{
MemFree(lpcBuffer);
return( FALSE );
}
lpcBuffer[uiFSize] = 0; //add a null terminator
FileClose( hFile );
XML_SetElementHandler(parser, aimAvailabilityStartElementHandle, aimAvailabilityEndElementHandle);
XML_SetCharacterDataHandler(parser, aimCharacterDataHandle);
memset(&pData,0,sizeof(pData));
XML_SetUserData(parser, &pData);
if(!XML_Parse(parser, lpcBuffer, uiFSize, TRUE))
{
CHAR8 errorBuf[511];
sprintf(errorBuf, "XML Parser Error in AimAvailability.xml: %s at line %d", XML_ErrorString(XML_GetErrorCode(parser)), XML_GetCurrentLineNumber(parser));
LiveMessage(errorBuf);
MemFree(lpcBuffer);
return FALSE;
}
MemFree(lpcBuffer);
XML_ParserFree(parser);
return( TRUE );
}
BOOLEAN WriteAimAvailability(STR fileName)
{
HWFILE hFile;
//Debug code; make sure that what we got from the file is the same as what's there
// Open a new file
hFile = FileOpen( fileName, FILE_ACCESS_WRITE | FILE_CREATE_ALWAYS, FALSE );
if ( !hFile )
return( FALSE );
{
UINT32 cnt;
FilePrintf(hFile,"<AIM_AVAILABLES>\r\n");
for(cnt = 0;cnt < NUM_PROFILES;cnt++)
{
FilePrintf(hFile,"\t<AIM>\r\n");
FilePrintf(hFile,"\t\t<uiIndex>%d</uiIndex>\r\n", cnt);
// FilePrintf(hFile,"\t\t<ProfilId>-1</ProfilId>\r\n");
// FilePrintf(hFile,"\t\t<AIMBioID>0</AIMBioID>\r\n");
FilePrintf(hFile,"\t\t<ProfilId>%d</ProfilId>\r\n", gAimAvailability[cnt].ProfilId);
FilePrintf(hFile,"\t\t<AIMBioID>%d</AIMBioID>\r\n", gAimAvailability[cnt].AimBio);
FilePrintf(hFile,"\t</AIM>\r\n");
}
FilePrintf(hFile,"</AIM_AVAILABLES>\r\n");
}
FileClose( hFile );
return( TRUE );
}
@@ -0,0 +1,294 @@
#ifdef PRECOMPILEDHEADERS
#include "Tactical All.h"
#else
#include "sgp.h"
#include "Debug Control.h"
#include "expat.h"
#include "XML.h"
#include "Interface.h"
#include "mercs.h"
#endif
struct
{
PARSE_STAGE curElement;
CHAR8 szCharData[MAX_CHAR_DATA_LENGTH+1];
CONTITION_FOR_MERC_AVAILABLE curMercAvailability;
CONTITION_FOR_MERC_AVAILABLE * curArray;
UINT32 maxArraySize;
UINT32 curIndex;
UINT32 currentDepth;
UINT32 maxReadDepth;
}
typedef mercAvailabilityParseData;
BOOLEAN MercAvailability_TextOnly;
static void XMLCALL
mercAvailabilityStartElementHandle(void *userData, const XML_Char *name, const XML_Char **atts)
{
mercAvailabilityParseData * pData = (mercAvailabilityParseData *)userData;
if(pData->currentDepth <= pData->maxReadDepth) //are we reading this element?
{
if(strcmp(name, "MERC_AVAILABLES") == 0 && pData->curElement == ELEMENT_NONE)
{
pData->curElement = ELEMENT_LIST;
pData->maxReadDepth++; //we are not skipping this element
}
else if(strcmp(name, "MERC") == 0 && pData->curElement == ELEMENT_LIST)
{
pData->curElement = ELEMENT;
pData->maxReadDepth++; //we are not skipping this element
}
else if(pData->curElement == ELEMENT &&
(strcmp(name, "uiIndex") == 0 ||
strcmp(name, "ProfilId") == 0 ||
strcmp(name, "usMoneyPaid") == 0 ||
strcmp(name, "Available") == 0 ||
strcmp(name, "NewMercsAvailable") == 0 ||
strcmp(name, "StartMercsAvailable") == 0 ||
strcmp(name, "MercBioID") == 0 ||
strcmp(name, "Drunk") == 0 ||
strcmp(name, "uiAlternateIndex") == 0 ||
strcmp(name, "usDay") == 0 ))
{
pData->curElement = ELEMENT_PROPERTY;
pData->maxReadDepth++; //we are not skipping this element
}
pData->szCharData[0] = '\0';
}
pData->currentDepth++;
}
static void XMLCALL
mercCharacterDataHandle(void *userData, const XML_Char *str, int len)
{
mercAvailabilityParseData * pData = (mercAvailabilityParseData *)userData;
if( (pData->currentDepth <= pData->maxReadDepth) &&
(strlen(pData->szCharData) < MAX_CHAR_DATA_LENGTH)
){
strncat(pData->szCharData,str,__min((unsigned int)len,MAX_CHAR_DATA_LENGTH-strlen(pData->szCharData)));
}
}
static void XMLCALL
mercAvailabilityEndElementHandle(void *userData, const XML_Char *name)
{
mercAvailabilityParseData * pData = (mercAvailabilityParseData *)userData;
if(pData->currentDepth <= pData->maxReadDepth)
{
if(strcmp(name, "MERC_AVAILABLES") == 0)
{
pData->curElement = ELEMENT_NONE;
}
else if(strcmp(name, "MERC") == 0)
{
pData->curElement = ELEMENT_LIST;
if (!MercAvailability_TextOnly)
{
gConditionsForMercAvailability[pData->curMercAvailability.uiIndex].uiIndex = pData->curMercAvailability.uiIndex;
gConditionsForMercAvailability[pData->curMercAvailability.uiIndex].ProfilId = pData->curMercAvailability.ProfilId;
gConditionsForMercAvailability[pData->curMercAvailability.uiIndex].usMoneyPaid = pData->curMercAvailability.usMoneyPaid;
gConditionsForMercAvailability[pData->curMercAvailability.uiIndex].usDay = pData->curMercAvailability.usDay;
gConditionsForMercAvailability[pData->curMercAvailability.uiIndex].ubMercArrayID = pData->curMercAvailability.uiIndex;
gConditionsForMercAvailability[pData->curMercAvailability.uiIndex].NewMercsAvailable = pData->curMercAvailability.NewMercsAvailable;
gConditionsForMercAvailability[pData->curMercAvailability.uiIndex].StartMercsAvailable = pData->curMercAvailability.StartMercsAvailable;
gConditionsForMercAvailability[pData->curMercAvailability.uiIndex].MercBio = pData->curMercAvailability.MercBio;
gConditionsForMercAvailability[pData->curMercAvailability.uiIndex].Drunk = pData->curMercAvailability.Drunk;
gConditionsForMercAvailability[pData->curMercAvailability.uiIndex].uiAlternateIndex = pData->curMercAvailability.uiAlternateIndex;
gConditionsForMercAvailabilityTemp[pData->curMercAvailability.uiIndex].uiIndex = pData->curMercAvailability.uiIndex;
gConditionsForMercAvailabilityTemp[pData->curMercAvailability.uiIndex].ProfilId = pData->curMercAvailability.ProfilId;
gConditionsForMercAvailabilityTemp[pData->curMercAvailability.uiIndex].usMoneyPaid = pData->curMercAvailability.usMoneyPaid;
gConditionsForMercAvailabilityTemp[pData->curMercAvailability.uiIndex].usDay = pData->curMercAvailability.usDay;
gConditionsForMercAvailabilityTemp[pData->curMercAvailability.uiIndex].ubMercArrayID = pData->curMercAvailability.uiIndex;
gConditionsForMercAvailabilityTemp[pData->curMercAvailability.uiIndex].NewMercsAvailable = pData->curMercAvailability.NewMercsAvailable;
gConditionsForMercAvailabilityTemp[pData->curMercAvailability.uiIndex].StartMercsAvailable = pData->curMercAvailability.StartMercsAvailable;
gConditionsForMercAvailabilityTemp[pData->curMercAvailability.uiIndex].MercBio = pData->curMercAvailability.MercBio;
gConditionsForMercAvailabilityTemp[pData->curMercAvailability.uiIndex].Drunk = pData->curMercAvailability.Drunk;
gConditionsForMercAvailabilityTemp[pData->curMercAvailability.uiIndex].uiAlternateIndex = pData->curMercAvailability.uiAlternateIndex;
}
else
{
gConditionsForMercAvailability[pData->curMercAvailability.uiIndex].uiIndex = pData->curMercAvailability.uiIndex;
gConditionsForMercAvailability[pData->curMercAvailability.uiIndex].ProfilId = pData->curMercAvailability.ProfilId;
gConditionsForMercAvailability[pData->curMercAvailability.uiIndex].usMoneyPaid = pData->curMercAvailability.usMoneyPaid;
gConditionsForMercAvailability[pData->curMercAvailability.uiIndex].usDay = pData->curMercAvailability.usDay;
gConditionsForMercAvailability[pData->curMercAvailability.uiIndex].ubMercArrayID = pData->curMercAvailability.uiIndex;
gConditionsForMercAvailability[pData->curMercAvailability.uiIndex].NewMercsAvailable = pData->curMercAvailability.NewMercsAvailable;
gConditionsForMercAvailability[pData->curMercAvailability.uiIndex].StartMercsAvailable = pData->curMercAvailability.StartMercsAvailable;
gConditionsForMercAvailability[pData->curMercAvailability.uiIndex].MercBio = pData->curMercAvailability.MercBio;
gConditionsForMercAvailability[pData->curMercAvailability.uiIndex].Drunk = pData->curMercAvailability.Drunk;
gConditionsForMercAvailability[pData->curMercAvailability.uiIndex].uiAlternateIndex = pData->curMercAvailability.uiAlternateIndex;
gConditionsForMercAvailabilityTemp[pData->curMercAvailability.uiIndex].uiIndex = pData->curMercAvailability.uiIndex;
gConditionsForMercAvailabilityTemp[pData->curMercAvailability.uiIndex].ProfilId = pData->curMercAvailability.ProfilId;
gConditionsForMercAvailabilityTemp[pData->curMercAvailability.uiIndex].usMoneyPaid = pData->curMercAvailability.usMoneyPaid;
gConditionsForMercAvailabilityTemp[pData->curMercAvailability.uiIndex].usDay = pData->curMercAvailability.usDay;
gConditionsForMercAvailabilityTemp[pData->curMercAvailability.uiIndex].ubMercArrayID = pData->curMercAvailability.uiIndex;
gConditionsForMercAvailabilityTemp[pData->curMercAvailability.uiIndex].NewMercsAvailable = pData->curMercAvailability.NewMercsAvailable;
gConditionsForMercAvailabilityTemp[pData->curMercAvailability.uiIndex].StartMercsAvailable = pData->curMercAvailability.StartMercsAvailable;
gConditionsForMercAvailabilityTemp[pData->curMercAvailability.uiIndex].MercBio = pData->curMercAvailability.MercBio;
gConditionsForMercAvailabilityTemp[pData->curMercAvailability.uiIndex].Drunk = pData->curMercAvailability.Drunk;
gConditionsForMercAvailabilityTemp[pData->curMercAvailability.uiIndex].uiAlternateIndex = pData->curMercAvailability.uiAlternateIndex;
}
}
else if(strcmp(name, "uiIndex") == 0)
{
pData->curElement = ELEMENT;
pData->curMercAvailability.uiIndex = (UINT8) atol(pData->szCharData);
}
else if(strcmp(name, "usMoneyPaid") == 0)
{
pData->curElement = ELEMENT;
pData->curMercAvailability.usMoneyPaid = (UINT16) atol(pData->szCharData);
}
else if(strcmp(name, "usDay") == 0)
{
pData->curElement = ELEMENT;
pData->curMercAvailability.usDay = (UINT16) atol(pData->szCharData);
}
else if(strcmp(name, "ProfilId") == 0)
{
pData->curElement = ELEMENT;
pData->curMercAvailability.ProfilId = (UINT8) atol(pData->szCharData);
}
else if(strcmp(name, "NewMercsAvailable") == 0)
{
pData->curElement = ELEMENT;
pData->curMercAvailability.NewMercsAvailable = (BOOLEAN) atol(pData->szCharData);
}
else if(strcmp(name, "StartMercsAvailable") == 0)
{
pData->curElement = ELEMENT;
pData->curMercAvailability.StartMercsAvailable = (BOOLEAN) atol(pData->szCharData);
}
else if(strcmp(name, "MercBioID") == 0)
{
pData->curElement = ELEMENT;
pData->curMercAvailability.MercBio = (UINT8) atol(pData->szCharData);
}
else if(strcmp(name, "Drunk") == 0)
{
pData->curElement = ELEMENT;
pData->curMercAvailability.Drunk = (BOOLEAN) atol(pData->szCharData);
}
else if(strcmp(name, "uiAlternateIndex") == 0)
{
pData->curElement = ELEMENT;
pData->curMercAvailability.uiAlternateIndex = (UINT8) atol(pData->szCharData);
}
pData->maxReadDepth--;
}
pData->currentDepth--;
}
BOOLEAN ReadInMercAvailability(STR fileName, BOOLEAN localizedVersion)
{
HWFILE hFile;
UINT32 uiBytesRead;
UINT32 uiFSize;
CHAR8 * lpcBuffer;
XML_Parser parser = XML_ParserCreate(NULL);
mercAvailabilityParseData pData;
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, "Loading MercAvailability.xml" );
MercAvailability_TextOnly = localizedVersion;
// Open file
hFile = FileOpen( fileName, FILE_ACCESS_READ, FALSE );
if ( !hFile )
return( localizedVersion );
uiFSize = FileGetSize(hFile);
lpcBuffer = (CHAR8 *) MemAlloc(uiFSize+1);
//Read in block
if ( !FileRead( hFile, lpcBuffer, uiFSize, &uiBytesRead ) )
{
MemFree(lpcBuffer);
return( FALSE );
}
lpcBuffer[uiFSize] = 0; //add a null terminator
FileClose( hFile );
XML_SetElementHandler(parser, mercAvailabilityStartElementHandle, mercAvailabilityEndElementHandle);
XML_SetCharacterDataHandler(parser, mercCharacterDataHandle);
memset(&pData,0,sizeof(pData));
XML_SetUserData(parser, &pData);
if(!XML_Parse(parser, lpcBuffer, uiFSize, TRUE))
{
CHAR8 errorBuf[511];
sprintf(errorBuf, "XML Parser Error in MercAvailability.xml: %s at line %d", XML_ErrorString(XML_GetErrorCode(parser)), XML_GetCurrentLineNumber(parser));
LiveMessage(errorBuf);
MemFree(lpcBuffer);
return FALSE;
}
MemFree(lpcBuffer);
XML_ParserFree(parser);
return( TRUE );
}
BOOLEAN WriteMercAvailability(STR fileName)
{
HWFILE hFile;
//Debug code; make sure that what we got from the file is the same as what's there
// Open a new file
hFile = FileOpen( fileName, FILE_ACCESS_WRITE | FILE_CREATE_ALWAYS, FALSE );
if ( !hFile )
return( FALSE );
{
UINT32 cnt;
FilePrintf(hFile,"<MERC_AVAILABLES>\r\n");
for(cnt = 0;cnt < NUM_PROFILES;cnt++)
{
FilePrintf(hFile,"\t<MERC>\r\n");
FilePrintf(hFile,"\t\t<uiIndex>%d</uiIndex>\r\n", cnt);
FilePrintf(hFile,"\t\t<usMoneyPaid>%d</usMoneyPaid>\r\n", gConditionsForMercAvailability[cnt].usMoneyPaid);
FilePrintf(hFile,"\t\t<usDay>%d</usDay>\r\n", gConditionsForMercAvailability[cnt].usDay);
FilePrintf(hFile,"\t\t<ProfilId>%d</ProfilId>\r\n", gConditionsForMercAvailability[cnt].ProfilId);
FilePrintf(hFile,"\t</MERC>\r\n");
}
FilePrintf(hFile,"</MERC_AVAILABLES>\r\n");
}
FileClose( hFile );
return( TRUE );
}
+315
View File
@@ -0,0 +1,315 @@
#ifdef PRECOMPILEDHEADERS
#include "Tactical All.h"
#else
#include "sgp.h"
#include "Debug Control.h"
#include "expat.h"
#include "XML.h"
#include "Interface.h"
#include "IMP Confirm.h"
#include "IMP Portraits.h"
#endif
struct
{
PARSE_STAGE curElement;
CHAR8 szCharData[MAX_CHAR_DATA_LENGTH+1];
IMP_FACE_VALUES curIMPPortraits;
IMP_FACE_VALUES * curArray;
UINT32 maxArraySize;
UINT32 curIndex;
UINT32 currentDepth;
UINT32 maxReadDepth;
//CHAR16 gzIMPPortraits[MAX_IMP_NAMES_CHARS];
}
typedef impPortraitsParseData;
BOOLEAN IMPPortraits_TextOnly;
static void XMLCALL
impPortraitsStartElementHandle(void *userData, const XML_Char *name, const XML_Char **atts)
{
impPortraitsParseData * pData = (impPortraitsParseData *)userData;
if(pData->currentDepth <= pData->maxReadDepth) //are we reading this element?
{
if(strcmp(name, "IMPPORTRAITSLIST") == 0 && pData->curElement == ELEMENT_NONE)
{
pData->curElement = ELEMENT_LIST;
pData->maxReadDepth++; //we are not skipping this element
}
else if(strcmp(name, "IMP") == 0 && pData->curElement == ELEMENT_LIST)
{
pData->curElement = ELEMENT;
pData->maxReadDepth++; //we are not skipping this element
}
else if(pData->curElement == ELEMENT &&
(strcmp(name, "uiIndex") == 0 ||
strcmp(name, "PortraitId") == 0 ||
strcmp(name, "bSex") == 0 ||
strcmp(name, "usEyesX") == 0 ||
strcmp(name, "usEyesY") == 0 ||
strcmp(name, "usMouthY") == 0 ||
strcmp(name, "usMouthX") == 0 ||
strcmp(name, "DefaultSkin") == 0 ||
strcmp(name, "DefaultHair") == 0 ||
strcmp(name, "DefaultShirt") == 0 ||
strcmp(name, "DefaultPants") == 0 ||
strcmp(name, "DefaultBigBody") == 0 ))
{
pData->curElement = ELEMENT_PROPERTY;
pData->maxReadDepth++; //we are not skipping this element
}
pData->szCharData[0] = '\0';
}
pData->currentDepth++;
}
static void XMLCALL
impPortraitsCharacterDataHandle(void *userData, const XML_Char *str, int len)
{
impPortraitsParseData * pData = (impPortraitsParseData *)userData;
if( (pData->currentDepth <= pData->maxReadDepth) &&
(strlen(pData->szCharData) < MAX_CHAR_DATA_LENGTH)
){
strncat(pData->szCharData,str,__min((unsigned int)len,MAX_CHAR_DATA_LENGTH-strlen(pData->szCharData)));
}
}
static void XMLCALL
impPortraitsEndElementHandle(void *userData, const XML_Char *name)
{
impPortraitsParseData * pData = (impPortraitsParseData *)userData;
if(pData->currentDepth <= pData->maxReadDepth)
{
if(strcmp(name, "IMPPORTRAITSLIST") == 0)
{
pData->curElement = ELEMENT_NONE;
}
else if(strcmp(name, "IMP") == 0)
{
pData->curElement = ELEMENT_LIST;
if (!IMPPortraits_TextOnly)
{
gIMPFaceValues[pData->curIMPPortraits.uiIndex].uiEyeXPositions = pData->curIMPPortraits.uiEyeXPositions;
gIMPFaceValues[pData->curIMPPortraits.uiIndex].uiEyeYPositions = pData->curIMPPortraits.uiEyeYPositions;
gIMPFaceValues[pData->curIMPPortraits.uiIndex].uiMouthXPositions = pData->curIMPPortraits.uiMouthXPositions;
gIMPFaceValues[pData->curIMPPortraits.uiIndex].uiMouthYPositions = pData->curIMPPortraits.uiMouthYPositions;
gIMPFaceValues[pData->curIMPPortraits.uiIndex].PortraitId = pData->curIMPPortraits.PortraitId;
gIMPFaceValues[pData->curIMPPortraits.uiIndex].bSex = pData->curIMPPortraits.bSex;
gIMPFaceValues[pData->curIMPPortraits.uiIndex].iCurrentSkin = pData->curIMPPortraits.iCurrentSkin;
gIMPFaceValues[pData->curIMPPortraits.uiIndex].iCurrentShirt = pData->curIMPPortraits.iCurrentShirt;
gIMPFaceValues[pData->curIMPPortraits.uiIndex].iCurrentHair = pData->curIMPPortraits.iCurrentHair;
gIMPFaceValues[pData->curIMPPortraits.uiIndex].iCurrentPants = pData->curIMPPortraits.iCurrentPants;
gIMPFaceValues[pData->curIMPPortraits.uiIndex].bBigBody = pData->curIMPPortraits.bBigBody;
}
else
{
gIMPFaceValues[pData->curIMPPortraits.uiIndex].uiEyeXPositions = pData->curIMPPortraits.uiEyeXPositions;
gIMPFaceValues[pData->curIMPPortraits.uiIndex].uiEyeYPositions = pData->curIMPPortraits.uiEyeYPositions;
gIMPFaceValues[pData->curIMPPortraits.uiIndex].uiMouthXPositions = pData->curIMPPortraits.uiMouthXPositions;
gIMPFaceValues[pData->curIMPPortraits.uiIndex].uiMouthYPositions = pData->curIMPPortraits.uiMouthYPositions;
gIMPFaceValues[pData->curIMPPortraits.uiIndex].PortraitId = pData->curIMPPortraits.PortraitId;
gIMPFaceValues[pData->curIMPPortraits.uiIndex].bSex = pData->curIMPPortraits.bSex;
gIMPFaceValues[pData->curIMPPortraits.uiIndex].iCurrentSkin = pData->curIMPPortraits.iCurrentSkin;
gIMPFaceValues[pData->curIMPPortraits.uiIndex].iCurrentShirt = pData->curIMPPortraits.iCurrentShirt;
gIMPFaceValues[pData->curIMPPortraits.uiIndex].iCurrentHair = pData->curIMPPortraits.iCurrentHair;
gIMPFaceValues[pData->curIMPPortraits.uiIndex].iCurrentPants = pData->curIMPPortraits.iCurrentPants;
gIMPFaceValues[pData->curIMPPortraits.uiIndex].bBigBody = pData->curIMPPortraits.bBigBody;
}
}
else if(strcmp(name, "uiIndex") == 0)
{
pData->curElement = ELEMENT;
pData->curIMPPortraits.uiIndex = (UINT16) atol(pData->szCharData);
}
else if(strcmp(name, "PortraitId") == 0)
{
pData->curElement = ELEMENT;
pData->curIMPPortraits.PortraitId = (INT32) atol(pData->szCharData);
}
else if(strcmp(name, "bSex") == 0)
{
pData->curElement = ELEMENT;
pData->curIMPPortraits.bSex = (BOOLEAN) atol(pData->szCharData);
}
else if(strcmp(name, "usEyesX") == 0)
{
pData->curElement = ELEMENT;
pData->curIMPPortraits.uiEyeXPositions = (INT8) atol(pData->szCharData);
}
else if(strcmp(name, "usEyesY") == 0)
{
pData->curElement = ELEMENT;
pData->curIMPPortraits.uiEyeYPositions = (INT8) atol(pData->szCharData);
}
else if(strcmp(name, "usMouthX") == 0)
{
pData->curElement = ELEMENT;
pData->curIMPPortraits.uiMouthXPositions = (INT8) atol(pData->szCharData);
}
else if(strcmp(name, "usMouthY") == 0)
{
pData->curElement = ELEMENT;
pData->curIMPPortraits.uiMouthYPositions = (INT8) atol(pData->szCharData);
}
else if(strcmp(name, "DefaultSkin") == 0)
{
pData->curElement = ELEMENT;
pData->curIMPPortraits.iCurrentSkin = (INT32) atol(pData->szCharData);
}
else if(strcmp(name, "DefaultHair") == 0)
{
pData->curElement = ELEMENT;
pData->curIMPPortraits.iCurrentHair = (INT32) atol(pData->szCharData);
}
else if(strcmp(name, "DefaultShirt") == 0)
{
pData->curElement = ELEMENT;
pData->curIMPPortraits.iCurrentShirt = (INT32) atol(pData->szCharData);
}
else if(strcmp(name, "DefaultPants") == 0)
{
pData->curElement = ELEMENT;
pData->curIMPPortraits.iCurrentPants = (INT32) atol(pData->szCharData);
}
else if(strcmp(name, "DefaultBigBody") == 0)
{
pData->curElement = ELEMENT;
pData->curIMPPortraits.bBigBody = (INT32) atol(pData->szCharData);
}
pData->maxReadDepth--;
}
pData->currentDepth--;
}
BOOLEAN ReadInIMPPortraits(STR fileName, BOOLEAN localizedVersion)
{
HWFILE hFile;
UINT32 uiBytesRead;
UINT32 uiFSize;
CHAR8 * lpcBuffer;
XML_Parser parser = XML_ParserCreate(NULL);
impPortraitsParseData pData;
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, "Loading IMPPortraits.xml" );
IMPPortraits_TextOnly = localizedVersion;
// Open file
hFile = FileOpen( fileName, FILE_ACCESS_READ, FALSE );
if ( !hFile )
return( localizedVersion );
uiFSize = FileGetSize(hFile);
lpcBuffer = (CHAR8 *) MemAlloc(uiFSize+1);
//Read in block
if ( !FileRead( hFile, lpcBuffer, uiFSize, &uiBytesRead ) )
{
MemFree(lpcBuffer);
return( FALSE );
}
lpcBuffer[uiFSize] = 0; //add a null terminator
FileClose( hFile );
XML_SetElementHandler(parser, impPortraitsStartElementHandle, impPortraitsEndElementHandle);
XML_SetCharacterDataHandler(parser, impPortraitsCharacterDataHandle);
memset(&pData,0,sizeof(pData));
XML_SetUserData(parser, &pData);
if(!XML_Parse(parser, lpcBuffer, uiFSize, TRUE))
{
CHAR8 errorBuf[511];
sprintf(errorBuf, "XML Parser Error in IMPPortraits.xml: %s at line %d", XML_ErrorString(XML_GetErrorCode(parser)), XML_GetCurrentLineNumber(parser));
LiveMessage(errorBuf);
MemFree(lpcBuffer);
return FALSE;
}
MemFree(lpcBuffer);
XML_ParserFree(parser);
return( TRUE );
}
void LoadIMPPortraitsTEMP()
{
UINT32 cnt;
UINT32 cnt2 = 0;
UINT32 cnt3 = 0;
for ( cnt = 0; cnt < 200; cnt++ )
{
if (gIMPFaceValues[cnt].bSex == 1 && gIMPFaceValues[cnt].PortraitId !=0)
{
gIMPFemaleValues[cnt2].uiIndex = cnt2;
gIMPFemaleValues[cnt2].Enabled = 1;
gIMPFemaleValues[cnt2].uiEyeXPositions = gIMPFaceValues[cnt].uiEyeXPositions;
gIMPFemaleValues[cnt2].uiEyeYPositions = gIMPFaceValues[cnt].uiEyeYPositions;
gIMPFemaleValues[cnt2].uiMouthXPositions = gIMPFaceValues[cnt].uiMouthXPositions;
gIMPFemaleValues[cnt2].uiMouthYPositions = gIMPFaceValues[cnt].uiMouthYPositions;
gIMPFemaleValues[cnt2].PortraitId = gIMPFaceValues[cnt].PortraitId;
gIMPFemaleValues[cnt2].bSex = gIMPFaceValues[cnt].bSex;
gIMPFemaleValues[cnt2].iCurrentSkin = gIMPFaceValues[cnt].iCurrentSkin;
gIMPFemaleValues[cnt2].iCurrentShirt = gIMPFaceValues[cnt].iCurrentShirt;
gIMPFemaleValues[cnt2].iCurrentHair = gIMPFaceValues[cnt].iCurrentHair;
gIMPFemaleValues[cnt2].iCurrentPants = gIMPFaceValues[cnt].iCurrentPants;
gIMPFemaleValues[cnt2].bBigBody = gIMPFaceValues[cnt].bBigBody;
cnt2++;
}
}
for ( cnt = 0; cnt < 200; cnt++ )
{
if (gIMPFaceValues[cnt].bSex == 0 && gIMPFaceValues[cnt].PortraitId !=0)
{
gIMPMaleValues[cnt3].uiIndex = cnt3;
gIMPMaleValues[cnt3].Enabled = 1;
gIMPMaleValues[cnt3].uiEyeXPositions = gIMPFaceValues[cnt].uiEyeXPositions;
gIMPMaleValues[cnt3].uiEyeYPositions = gIMPFaceValues[cnt].uiEyeYPositions;
gIMPMaleValues[cnt3].uiMouthXPositions = gIMPFaceValues[cnt].uiMouthXPositions;
gIMPMaleValues[cnt3].uiMouthYPositions = gIMPFaceValues[cnt].uiMouthYPositions;
gIMPMaleValues[cnt3].PortraitId = gIMPFaceValues[cnt].PortraitId;
gIMPMaleValues[cnt3].bSex = gIMPFaceValues[cnt].bSex;
gIMPMaleValues[cnt3].iCurrentSkin = gIMPFaceValues[cnt].iCurrentSkin;
gIMPMaleValues[cnt3].iCurrentShirt = gIMPFaceValues[cnt].iCurrentShirt;
gIMPMaleValues[cnt3].iCurrentHair = gIMPFaceValues[cnt].iCurrentHair;
gIMPMaleValues[cnt3].iCurrentPants = gIMPFaceValues[cnt].iCurrentPants;
gIMPMaleValues[cnt3].bBigBody = gIMPFaceValues[cnt].bBigBody;
cnt3++;
}
}
}
+82 -33
View File
@@ -14,11 +14,18 @@
#include "Text.h"
#include "LaptopSave.h"
#include "Multi Language Graphic Utils.h"
#include "GameSettings.h"
#endif
#include "LocalizedStrings.h"
#include "Soldier Profile.h"
UINT8 MAX_NUMBER_MERCS = 0;
UINT8 AimMercArray[ MAX_NUMBER_MERCS ];
UINT8 AimMercArray[ NUM_PROFILES ]; //MAX_NUMBER_MERCS ];
AIM_AVAILABLE_TEMP gAimAvailabilityTemp[ NUM_PROFILES ];
AIM_AVAILABLE gAimAvailability[ NUM_PROFILES ];
UINT8 gCurrentAimPage[ NUM_AIM_SCREENS ] =
{
@@ -470,14 +477,27 @@ BOOLEAN InitAimDefaults()
CHECKF(AddVideoObject(&VObjectDesc, &guiRustBackGround));
// load the Aim Symbol graphic and add it
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
GetMLGFilename( VObjectDesc.ImageFile, MLG_AIMSYMBOL );
CHECKF(AddVideoObject(&VObjectDesc, &guiAimSymbol));
if(gGameExternalOptions.gfUseNewStartingGearInterface)
{
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
GetMLGFilename( VObjectDesc.ImageFile, MLG_AIMSYMBOL_SMALL );
CHECKF(AddVideoObject(&VObjectDesc, &guiAimSymbol));
//Mouse region for the Links
MSYS_DefineRegion( &gSelectedAimLogo, AIM_SYMBOL_SMALL_X, AIM_SYMBOL_SMALL_Y, AIM_SYMBOL_SMALL_X+AIM_SYMBOL_SMALL_WIDTH, AIM_SYMBOL_SMALL_Y+AIM_SYMBOL_SMALL_HEIGHT, MSYS_PRIORITY_HIGH,
CURSOR_WWW, MSYS_NO_CALLBACK, SelectAimLogoRegionCallBack);
MSYS_AddRegion(&gSelectedAimLogo);
}
else
{
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
GetMLGFilename( VObjectDesc.ImageFile, MLG_AIMSYMBOL );
CHECKF(AddVideoObject(&VObjectDesc, &guiAimSymbol));
//Mouse region for the Links
MSYS_DefineRegion( &gSelectedAimLogo, AIM_SYMBOL_X, AIM_SYMBOL_Y, AIM_SYMBOL_X+AIM_SYMBOL_WIDTH, AIM_SYMBOL_Y+AIM_SYMBOL_HEIGHT, MSYS_PRIORITY_HIGH,
CURSOR_WWW, MSYS_NO_CALLBACK, SelectAimLogoRegionCallBack);
MSYS_AddRegion(&gSelectedAimLogo);
}
//Mouse region for the Links
MSYS_DefineRegion( &gSelectedAimLogo, AIM_SYMBOL_X, AIM_SYMBOL_Y, AIM_SYMBOL_X+AIM_SYMBOL_WIDTH, AIM_SYMBOL_Y+AIM_SYMBOL_HEIGHT, MSYS_PRIORITY_HIGH,
CURSOR_WWW, MSYS_NO_CALLBACK, SelectAimLogoRegionCallBack);
MSYS_AddRegion(&gSelectedAimLogo);
return(TRUE);
@@ -514,8 +534,16 @@ BOOLEAN DrawAimDefaults()
}
// Aim Symbol
GetVideoObject(&hAimSymbolHandle, guiAimSymbol);
BltVideoObject(FRAME_BUFFER, hAimSymbolHandle, 0,AIM_SYMBOL_X, AIM_SYMBOL_Y, VO_BLT_SRCTRANSPARENCY,NULL);
if(gGameExternalOptions.gfUseNewStartingGearInterface)
{
GetVideoObject(&hAimSymbolHandle, guiAimSymbol);
BltVideoObject(FRAME_BUFFER, hAimSymbolHandle, 0,AIM_SYMBOL_SMALL_X, AIM_SYMBOL_SMALL_Y, VO_BLT_SRCTRANSPARENCY,NULL);
}
else
{
GetVideoObject(&hAimSymbolHandle, guiAimSymbol);
BltVideoObject(FRAME_BUFFER, hAimSymbolHandle, 0,AIM_SYMBOL_X, AIM_SYMBOL_Y, VO_BLT_SRCTRANSPARENCY,NULL);
}
return(TRUE);
}
@@ -541,8 +569,14 @@ void SelectAimLogoRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
BOOLEAN DisplayAimSlogan()
{
CHAR16 sSlogan[400];
LoadEncryptedDataFromFile(AIMHISTORYFILE, sSlogan, 0, AIM_HISTORY_LINE_SIZE);
if(!g_bUseXML_Strings)
{
LoadEncryptedDataFromFile(AIMHISTORYFILE, sSlogan, 0, AIM_HISTORY_LINE_SIZE);
}
else
{
Loc::GetString(Loc::AIM_HISTORY, L"Line", 0, sSlogan, 400);
}
//Display Aim Text under the logo
DisplayWrappedString(AIM_LOGO_TEXT_X, AIM_LOGO_TEXT_Y, AIM_LOGO_TEXT_WIDTH, 2, AIM_LOGO_FONT, AIM_FONT_MCOLOR_WHITE, sSlogan, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
@@ -550,27 +584,37 @@ BOOLEAN DisplayAimSlogan()
}
BOOLEAN DisplayAimCopyright()
{
CHAR16 sSlogan[400];
UINT32 uiStartLoc=0;
//Load and Display the copyright notice
if(!g_bUseXML_Strings)
{
UINT32 uiStartLoc=0;
uiStartLoc = AIM_HISTORY_LINE_SIZE * AIM_COPYRIGHT_1;
LoadEncryptedDataFromFile(AIMHISTORYFILE, sSlogan, uiStartLoc, AIM_HISTORY_LINE_SIZE);
DrawTextToScreen(sSlogan, AIM_COPYRIGHT_X, AIM_COPYRIGHT_Y, AIM_COPYRIGHT_WIDTH, AIM_COPYRIGHT_FONT, FONT_MCOLOR_DKWHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
uiStartLoc = AIM_HISTORY_LINE_SIZE * AIM_COPYRIGHT_1;
LoadEncryptedDataFromFile(AIMHISTORYFILE, sSlogan, uiStartLoc, AIM_HISTORY_LINE_SIZE);
DrawTextToScreen(sSlogan, AIM_COPYRIGHT_X, AIM_COPYRIGHT_Y, AIM_COPYRIGHT_WIDTH, AIM_COPYRIGHT_FONT, FONT_MCOLOR_DKWHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
uiStartLoc = AIM_HISTORY_LINE_SIZE * AIM_COPYRIGHT_2;
LoadEncryptedDataFromFile(AIMHISTORYFILE, sSlogan, uiStartLoc, AIM_HISTORY_LINE_SIZE);
DrawTextToScreen(sSlogan, AIM_COPYRIGHT_X, AIM_COPYRIGHT_Y + AIM_COPYRIGHT_GAP, AIM_COPYRIGHT_WIDTH, AIM_COPYRIGHT_FONT, FONT_MCOLOR_DKWHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
uiStartLoc = AIM_HISTORY_LINE_SIZE * AIM_COPYRIGHT_2;
LoadEncryptedDataFromFile(AIMHISTORYFILE, sSlogan, uiStartLoc, AIM_HISTORY_LINE_SIZE);
DrawTextToScreen(sSlogan, AIM_COPYRIGHT_X, AIM_COPYRIGHT_Y + AIM_COPYRIGHT_GAP, AIM_COPYRIGHT_WIDTH, AIM_COPYRIGHT_FONT, FONT_MCOLOR_DKWHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
uiStartLoc = AIM_HISTORY_LINE_SIZE * AIM_COPYRIGHT_3;
LoadEncryptedDataFromFile(AIMHISTORYFILE, sSlogan, uiStartLoc, AIM_HISTORY_LINE_SIZE);
DrawTextToScreen(sSlogan, AIM_COPYRIGHT_X, AIM_COPYRIGHT_Y + AIM_COPYRIGHT_GAP*2, AIM_COPYRIGHT_WIDTH, AIM_COPYRIGHT_FONT, FONT_MCOLOR_DKWHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
uiStartLoc = AIM_HISTORY_LINE_SIZE * AIM_COPYRIGHT_3;
LoadEncryptedDataFromFile(AIMHISTORYFILE, sSlogan, uiStartLoc, AIM_HISTORY_LINE_SIZE);
DrawTextToScreen(sSlogan, AIM_COPYRIGHT_X, AIM_COPYRIGHT_Y + AIM_COPYRIGHT_GAP*2, AIM_COPYRIGHT_WIDTH, AIM_COPYRIGHT_FONT, FONT_MCOLOR_DKWHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
}
else
{
Loc::GetString(Loc::AIM_HISTORY, L"Line", AIM_COPYRIGHT_1, sSlogan, 400);
DrawTextToScreen(sSlogan, AIM_COPYRIGHT_X, AIM_COPYRIGHT_Y, AIM_COPYRIGHT_WIDTH, AIM_COPYRIGHT_FONT, FONT_MCOLOR_DKWHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
Loc::GetString(Loc::AIM_HISTORY, L"Line", AIM_COPYRIGHT_2, sSlogan, 400);
DrawTextToScreen(sSlogan, AIM_COPYRIGHT_X, AIM_COPYRIGHT_Y + AIM_COPYRIGHT_GAP, AIM_COPYRIGHT_WIDTH, AIM_COPYRIGHT_FONT, FONT_MCOLOR_DKWHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
Loc::GetString(Loc::AIM_HISTORY, L"Line", AIM_COPYRIGHT_3, sSlogan, 400);
DrawTextToScreen(sSlogan, AIM_COPYRIGHT_X, AIM_COPYRIGHT_Y + AIM_COPYRIGHT_GAP*2, AIM_COPYRIGHT_WIDTH, AIM_COPYRIGHT_FONT, FONT_MCOLOR_DKWHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
}
return(TRUE);
}
@@ -847,25 +891,30 @@ BOOLEAN DisplayFlowerAd( BOOLEAN fInit, BOOLEAN fRedraw )
BOOLEAN DrawWarningBox( BOOLEAN fInit, BOOLEAN fRedraw )
{
static UINT32 uiLastTime;
static UINT8 ubSubImage=0;
UINT32 uiCurTime = GetJA2Clock();
static UINT32 uiLastTime;
static UINT8 ubSubImage = 0;
UINT32 uiCurTime = GetJA2Clock();
if( fInit || fRedraw)
{
CHAR16 sText[400];
UINT32 uiStartLoc=0;
CHAR16 sText[400];
//UINT16 usLocY = AIM_WARNING_TEXT_Y + (GetFontHeight(AIM_WARNING_FONT) + 2) * 2;
HVOBJECT hWarningHandle;
HVOBJECT hWarningHandle;
//Warning
GetVideoObject(&hWarningHandle, guiWarning);
BltVideoObject(FRAME_BUFFER, hWarningHandle, 0,WARNING_X, WARNING_Y, VO_BLT_SRCTRANSPARENCY,NULL);
uiStartLoc = AIM_HISTORY_LINE_SIZE * AIM_WARNING_1;
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
if(!g_bUseXML_Strings)
{
UINT32 uiStartLoc = AIM_HISTORY_LINE_SIZE * AIM_WARNING_1;
LoadEncryptedDataFromFile(AIMHISTORYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
}
else
{
Loc::GetString(Loc::AIM_HISTORY, L"Line", AIM_WARNING_1, sText, 400);
}
//Display Aim Warning Text
DisplayWrappedString(AIM_WARNING_TEXT_X, AIM_WARNING_TEXT_Y, AIM_WARNING_TEXT_WIDTH, 2, AIM_WARNING_FONT, FONT_RED, sText, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
+34 -3
View File
@@ -2,7 +2,7 @@
#define __AIM_H
#include "Cursors.h"
#include "Soldier Profile.h"
//
// AIM defines
@@ -12,8 +12,32 @@
#define AIMHISTORYFILE "BINARYDATA\\AimHist.edt"
#define AIM_HISTORY_LINE_SIZE 400 * 2
#define MAX_NUMBER_MERCS 40
extern UINT8 AimMercArray[ MAX_NUMBER_MERCS ];
//#define MAX_NUMBER_MERCS 40
extern UINT8 MAX_NUMBER_MERCS;
extern UINT8 AimMercArray[ NUM_PROFILES ];//MAX_NUMBER_MERCS ];
typedef struct
{
UINT8 ubAimArrayID;
UINT8 uiIndex;
UINT8 ProfilId;
UINT8 AimBio;
} AIM_AVAILABLE;
typedef struct
{
UINT8 ubAimArrayID;
UINT8 uiIndex;
UINT8 ProfilId;
UINT8 AimBio;
} AIM_AVAILABLE_TEMP;
extern AIM_AVAILABLE_TEMP gAimAvailabilityTemp[ NUM_PROFILES ];
extern AIM_AVAILABLE gAimAvailability[ NUM_PROFILES ];
#define NUM_AIM_SCREENS 6
@@ -34,6 +58,13 @@ extern UINT8 AimMercArray[ MAX_NUMBER_MERCS ];
#define AIM_SYMBOL_WIDTH 203
#define AIM_SYMBOL_HEIGHT 51
//tais: small logo for nsgi
#define AIM_SYMBOL_SMALL_X IMAGE_OFFSET_X + 3
#define AIM_SYMBOL_SMALL_Y IMAGE_OFFSET_Y + 3
#define AIM_SYMBOL_SMALL_WIDTH 102
#define AIM_SYMBOL_SMALL_HEIGHT 26
// RustBackGround
#define RUSTBACKGROUND_SIZE_X 125
#define RUSTBACKGROUND_SIZE_Y 100
+342 -174
View File
@@ -22,6 +22,8 @@
#include "LaptopSave.h"
#include "finances.h"
#include "PostalService.h"
#include "faces.h"
#include "GameSettings.h"
#include <string>
#endif
using namespace std;
@@ -693,6 +695,26 @@ void AddEmailWithSpecialData(INT32 iMessageOffset, INT32 iMessageLength, UINT8 u
return;
}
void AddEmailWFMercLevelUp(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iCurrentIMPPosition)
{
CHAR16 pSubject[320];
UINT8 subjectLine = (170 - iMessageLength) * 2;
wcscpy( pSubject, New113AIMMercMailTexts[subjectLine] );
AddEmailMessage(iMessageOffset,iMessageLength, pSubject, iDate, ubSender, FALSE, 0, 0, iCurrentIMPPosition );
// if we are in fact int he laptop, redraw icons, might be change in mail status
if( fCurrentlyInLaptop == TRUE )
{
// redraw icons, might be new mail
DrawLapTopIcons();
}
return;
}
void AddEmail(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iCurrentIMPPosition)
{
CHAR16 pSubject[320];
@@ -700,7 +722,6 @@ void AddEmail(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32
//MessagePtr pMessage;
//CHAR16 pMessageString[320];
// WANNE: Short work in both ways
LoadEncryptedDataFromFile("BINARYDATA\\Email.edt", pSubject, 640*(iMessageOffset), 640);
@@ -711,8 +732,8 @@ void AddEmail(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32
if( fCurrentlyInLaptop == TRUE )
{
// redraw icons, might be new mail
DrawLapTopIcons();
// redraw icons, might be new mail
DrawLapTopIcons();
}
return;
@@ -784,10 +805,23 @@ void AddEmailMessage(INT32 iMessageOffset, INT32 iMessageLength,STR16 pSubject,
//}
//pTempEmail->pText[iCounter]=NULL;
/*
// WANNE: Not needed anymore, bug is fixed!!
// WANNE: Fix the memory heap problem -> CTD (fix by BirdFlu)
// The text for the wildfire merc is too long (> 128 characters)!!
// copy subject
int _len = wcslen(pSubject);
pTempEmail->pSubject = (STR16) MemAlloc( (_len + 1) * sizeof(CHAR16) );
memset( pTempEmail->pSubject, 0, sizeof( CHAR16 ) * (_len + 1) );
wcsncpy(pTempEmail->pSubject,pSubject,_len);
pTempEmail->pSubject[_len] = 0;
*/
// copy subject
pTempEmail->pSubject = (STR16) MemAlloc( 128 * sizeof(CHAR16) );
memset( pTempEmail->pSubject, 0, sizeof( CHAR16 ) * 128 );
wcscpy(pTempEmail->pSubject,pSubject);
// copy offset and length of the actual message in email.edt
pTempEmail->usOffset =(UINT16)iMessageOffset;
@@ -3414,10 +3448,10 @@ void HandleIMPCharProfileResultsMessage( void)
}
// personality itself
switch( gMercProfiles[ iCurrentIMPSlot ].bPersonalityTrait)
switch( gMercProfiles[ iCurrentIMPSlot ].bDisability)
{
// normal as can be
case( NO_PERSONALITYTRAIT ):
case( NO_DISABILITY ):
iOffSet = IMP_PERSONALITY_NORMAL;
break;
case( HEAT_INTOLERANT ):
@@ -3456,7 +3490,7 @@ void HandleIMPCharProfileResultsMessage( void)
AddEmailRecordToList( pString );
// extra paragraph for bugs
if( gMercProfiles[ iCurrentIMPSlot ].bPersonalityTrait == FEAR_OF_INSECTS )
if( gMercProfiles[ iCurrentIMPSlot ].bDisability == FEAR_OF_INSECTS )
{
// persoanlity paragraph
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( iOffSet + IMP_PERSONALITY_LENGTH + 1 ), MAIL_STRING_SIZE );
@@ -3830,163 +3864,235 @@ void HandleIMPCharProfileResultsMessage( void)
iCounter++;
}
if( ( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait == KNIFING )||( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait2 == KNIFING ) )
{
// read one record from email file
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_KNIFE ), MAIL_STRING_SIZE );
// add to list
AddEmailRecordToList( pString );
}
// lockpick
if( ( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait == LOCKPICKING)||( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait2 == LOCKPICKING) )
{
// read one record from email file
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_LOCK ), MAIL_STRING_SIZE );
// add to list
AddEmailRecordToList( pString );
}
// hand to hand
if( ( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait == HANDTOHAND )||( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait2 == HANDTOHAND ) )
{
// read one record from email file
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_HAND ), MAIL_STRING_SIZE );
// add to list
AddEmailRecordToList( pString );
}
// electronics
if( ( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait == ELECTRONICS )||( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait2 == ELECTRONICS ) )
{
// read one record from email file
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_ELEC ), MAIL_STRING_SIZE );
// add to list
AddEmailRecordToList( pString );
}
if( ( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait == NIGHTOPS )||( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait2 == NIGHTOPS ) )
{
// read one record from email file
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_NIGHT ), MAIL_STRING_SIZE );
// add to list
AddEmailRecordToList( pString );
}
if( ( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait == THROWING)||( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait2 == THROWING) )
{
// read one record from email file
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_THROW ), MAIL_STRING_SIZE );
// add to list
AddEmailRecordToList( pString );
}
if( ( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait == TEACHING )||( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait2 == TEACHING ) )
{
// read one record from email file
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_TEACH ), MAIL_STRING_SIZE );
// add to list
AddEmailRecordToList( pString );
}
if( ( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait == HEAVY_WEAPS )||( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait2 == HEAVY_WEAPS ) )
{
// read one record from email file
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_HEAVY ), MAIL_STRING_SIZE );
// add to list
AddEmailRecordToList( pString );
}
if( ( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait == AUTO_WEAPS )||( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait2 == AUTO_WEAPS ) )
{
// read one record from email file
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_AUTO ), MAIL_STRING_SIZE );
// add to list
AddEmailRecordToList( pString );
}
if( ( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait == STEALTHY )||( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait2 == STEALTHY ) )
{
// read one record from email file
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_STEALTH ), MAIL_STRING_SIZE );
// add to list
AddEmailRecordToList( pString );
}
if( ( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait == AMBIDEXT)||( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait2 == AMBIDEXT) )
{
// read one record from email file
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_AMBI ), MAIL_STRING_SIZE );
// add to list
AddEmailRecordToList( pString );
}
if( ( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait == THIEF )||( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait2 == THIEF ) )
{
// read one record from email file
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_THIEF ), MAIL_STRING_SIZE );
// add to list
AddEmailRecordToList( pString );
}
if( ( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait == MARTIALARTS )||( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait2 == MARTIALARTS ) )
///////////////////////////////////////////////////////////////////////////////
// SANDRO - switch for old/new traits
if ( gGameOptions.fNewTraitSystem )
{
// read one record from email file
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_MARTIAL ), MAIL_STRING_SIZE );
// add to list
AddEmailRecordToList( pString );
// Auto Weapons
if ( ProfileHasSkillTrait( iCurrentIMPSlot, AUTO_WEAPONS_NT ) > 0 )
{
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_AUTO ), MAIL_STRING_SIZE );
AddEmailRecordToList( pString );
}
// Heavy Weapons
if ( ProfileHasSkillTrait( iCurrentIMPSlot, HEAVY_WEAPONS_NT ) > 0 )
{
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_HEAVY ), MAIL_STRING_SIZE );
AddEmailRecordToList( pString );
}
// Sniper
if ( ProfileHasSkillTrait( iCurrentIMPSlot, SNIPER_NT ) > 0 )
{
wcscpy(pString, MissingIMPSkillsDescriptions[0]);
AddEmailRecordToList( pString );
}
// Ranger
if ( ProfileHasSkillTrait( iCurrentIMPSlot, RANGER_NT ) > 0 )
{
if ( gGameExternalOptions.fShowCamouflageFaces == TRUE )
{
gCamoFace[iCurrentIMPSlot].gCamoface = TRUE;
gCamoFace[iCurrentIMPSlot].gUrbanCamoface = FALSE;
gCamoFace[iCurrentIMPSlot].gDesertCamoface = FALSE;
gCamoFace[iCurrentIMPSlot].gSnowCamoface = FALSE;
}
wcscpy(pString, MissingIMPSkillsDescriptions[2]);
AddEmailRecordToList( pString );
}
// Gunslinger
if ( ProfileHasSkillTrait( iCurrentIMPSlot, GUNSLINGER_NT ) > 0 )
{
wcscpy(pString, MissingIMPSkillsDescriptions[3]);
AddEmailRecordToList( pString );
}
// Martial Artist
if ( ProfileHasSkillTrait( iCurrentIMPSlot, MARTIAL_ARTS_NT ) > 0 )
{
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_MARTIAL ), MAIL_STRING_SIZE );
AddEmailRecordToList( pString );
}
// Squadleader
if ( ProfileHasSkillTrait( iCurrentIMPSlot, SQUADLEADER_NT ) > 0 )
{
wcscpy(pString, MissingIMPSkillsDescriptions[4]);
AddEmailRecordToList( pString );
}
// Technician
if ( ProfileHasSkillTrait( iCurrentIMPSlot, TECHNICIAN_NT ) > 0 )
{
wcscpy(pString, MissingIMPSkillsDescriptions[5]);
AddEmailRecordToList( pString );
}
// Doctor
if ( ProfileHasSkillTrait( iCurrentIMPSlot, DOCTOR_NT ) > 0 )
{
wcscpy(pString, MissingIMPSkillsDescriptions[6]);
AddEmailRecordToList( pString );
}
// Ambidextrous
if ( ProfileHasSkillTrait( iCurrentIMPSlot, AMBIDEXTROUS_NT ) > 0 )
{
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_AMBI ), MAIL_STRING_SIZE );
AddEmailRecordToList( pString );
}
// Melee
if ( ProfileHasSkillTrait( iCurrentIMPSlot, MELEE_NT ) > 0 )
{
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_KNIFE ), MAIL_STRING_SIZE );
AddEmailRecordToList( pString );
}
// Throwing
if ( ProfileHasSkillTrait( iCurrentIMPSlot, THROWING_NT ) > 0 )
{
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_THROW ), MAIL_STRING_SIZE );
AddEmailRecordToList( pString );
}
// Night Ops
if ( ProfileHasSkillTrait( iCurrentIMPSlot, NIGHT_OPS_NT ) > 0 )
{
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_NIGHT ), MAIL_STRING_SIZE );
AddEmailRecordToList( pString );
}
// Stealthy
if ( ProfileHasSkillTrait( iCurrentIMPSlot, STEALTHY_NT ) > 0 )
{
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_STEALTH ), MAIL_STRING_SIZE );
AddEmailRecordToList( pString );
}
// Athletics
if ( ProfileHasSkillTrait( iCurrentIMPSlot, ATHLETICS_NT ) > 0 )
{
wcscpy(pString, MissingIMPSkillsDescriptions[7]);
AddEmailRecordToList( pString );
}
// Bodybuilding
if ( ProfileHasSkillTrait( iCurrentIMPSlot, BODYBUILDING_NT ) > 0 )
{
wcscpy(pString, MissingIMPSkillsDescriptions[8]);
AddEmailRecordToList( pString );
}
// Demolitions
if ( ProfileHasSkillTrait( iCurrentIMPSlot, DEMOLITIONS_NT ) > 0 )
{
wcscpy(pString, MissingIMPSkillsDescriptions[9]);
AddEmailRecordToList( pString );
}
// Teaching
if ( ProfileHasSkillTrait( iCurrentIMPSlot, TEACHING_NT ) > 0 )
{
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_TEACH ), MAIL_STRING_SIZE );
AddEmailRecordToList( pString );
}
// Scouting
if ( ProfileHasSkillTrait( iCurrentIMPSlot, SCOUTING_NT ) > 0 )
{
wcscpy(pString, MissingIMPSkillsDescriptions[10]);
AddEmailRecordToList( pString );
}
}
else
{
// Lockpick
if ( ProfileHasSkillTrait( iCurrentIMPSlot, LOCKPICKING_OT ) > 0 )
{
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_LOCK ), MAIL_STRING_SIZE );
AddEmailRecordToList( pString );
}
// Hand to Hand
if ( ProfileHasSkillTrait( iCurrentIMPSlot, HANDTOHAND_OT ) > 0 )
{
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_HAND ), MAIL_STRING_SIZE );
AddEmailRecordToList( pString );
}
// Electronics
if ( ProfileHasSkillTrait( iCurrentIMPSlot, ELECTRONICS_OT ) > 0 )
{
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_ELEC ), MAIL_STRING_SIZE );
AddEmailRecordToList( pString );
}
// Night Ops
if ( ProfileHasSkillTrait( iCurrentIMPSlot, NIGHTOPS_OT ) > 0 )
{
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_NIGHT ), MAIL_STRING_SIZE );
AddEmailRecordToList( pString );
}
// Throwing
if ( ProfileHasSkillTrait( iCurrentIMPSlot, THROWING_OT ) > 0 )
{
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_THROW ), MAIL_STRING_SIZE );
AddEmailRecordToList( pString );
}
// Teaching
if ( ProfileHasSkillTrait( iCurrentIMPSlot, TEACHING_OT ) > 0 )
{
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_TEACH ), MAIL_STRING_SIZE );
AddEmailRecordToList( pString );
}
// Heavy Weapons
if ( ProfileHasSkillTrait( iCurrentIMPSlot, HEAVY_WEAPS_OT ) > 0 )
{
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_HEAVY ), MAIL_STRING_SIZE );
AddEmailRecordToList( pString );
}
// Auto Weapons
if ( ProfileHasSkillTrait( iCurrentIMPSlot, AUTO_WEAPS_OT ) > 0 )
{
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_AUTO ), MAIL_STRING_SIZE );
AddEmailRecordToList( pString );
}
// Stealthy
if ( ProfileHasSkillTrait( iCurrentIMPSlot, STEALTHY_OT ) > 0 )
{
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_STEALTH ), MAIL_STRING_SIZE );
AddEmailRecordToList( pString );
}
// Ambidextrous
if ( ProfileHasSkillTrait( iCurrentIMPSlot, AMBIDEXT_OT ) > 0 )
{
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_AMBI ), MAIL_STRING_SIZE );
AddEmailRecordToList( pString );
}
// Thief
/*if( ( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait == THIEF_OT )||( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait2 == THIEF_OT ) )
{
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_THIEF ), MAIL_STRING_SIZE );
AddEmailRecordToList( pString );
}*/
// Martial Arts
if ( ProfileHasSkillTrait( iCurrentIMPSlot, MARTIALARTS_OT ) > 0 )
{
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_MARTIAL ), MAIL_STRING_SIZE );
AddEmailRecordToList( pString );
}
// Knifing
if ( ProfileHasSkillTrait( iCurrentIMPSlot, KNIFING_OT ) > 0 )
{
LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_KNIFE ), MAIL_STRING_SIZE );
AddEmailRecordToList( pString );
}
// Sniper
if ( ProfileHasSkillTrait( iCurrentIMPSlot, PROF_SNIPER_OT ) > 0 )
{
wcscpy(pString, MissingIMPSkillsDescriptions[0]);
// add to list
AddEmailRecordToList( pString );
}
// Camouflage
if ( ProfileHasSkillTrait( iCurrentIMPSlot, CAMOUFLAGED_OT ) > 0 )
{
if ( gGameExternalOptions.fShowCamouflageFaces == TRUE )
{
gCamoFace[iCurrentIMPSlot].gCamoface = TRUE;
gCamoFace[iCurrentIMPSlot].gUrbanCamoface = FALSE;
gCamoFace[iCurrentIMPSlot].gDesertCamoface = FALSE;
gCamoFace[iCurrentIMPSlot].gSnowCamoface = FALSE;
}
wcscpy(pString, MissingIMPSkillsDescriptions[1]);
AddEmailRecordToList( pString );
}
}
// rooftop
if( ( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait == PROF_SNIPER )||( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait2 == PROF_SNIPER ) )
{
// WANNE: No entry in the Impass.edt for rooftop, so add any static text here
// read one record from email file
//LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_ONROOF ), MAIL_STRING_SIZE );
wcscpy(pString, MissingIMPSkillsDescriptions[0]);
//#ifdef GERMAN
// wcscpy(pString, L"Dach-Treffer Bonus: <Noch keine Beschreibung vorhanden>");
//#else
//wcscpy(pString, L"Sniper: <No description yet>");
//#endif
// add to list
AddEmailRecordToList( pString );
}
// camouflage
if( ( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait == CAMOUFLAGED )||( gMercProfiles[ iCurrentIMPSlot ].bSkillTrait2 == CAMOUFLAGED ) )
{
// WANNE: No entry in the Impass.edt for camouflage, so add any static text here
// read one record from email file
//LoadEncryptedDataFromFile( "BINARYDATA\\Impass.edt", pString, MAIL_STRING_SIZE * ( IMP_SKILLS_SPECIAL_CAMOUFLAGED ), MAIL_STRING_SIZE );
wcscpy(pString, MissingIMPSkillsDescriptions[1]);
/*#ifdef GERMAN
wcscpy(pString, L"Getarnt: <Noch keine Beschreibung vorhanden>");
#else
wcscpy(pString, L"Camouflage: <No description yet>");
#endif*/
// add to list
AddEmailRecordToList( pString );
}
///////////////////////////////////////////////////////////////////////////////
// now the physical
// imperial physical
@@ -4770,6 +4876,7 @@ void ShutDownEmailList()
ClearPages();
}
// Pre Process the mail, when clicking on a mail in the mail list
void PreProcessEmail( EmailPtr pMail )
{
RecordPtr pTempRecord, pCurrentRecord, pLastRecord , pTempList;
@@ -4791,21 +4898,31 @@ void PreProcessEmail( EmailPtr pMail )
// WANNE: Get the text and replace name!
int iNew113MERCMerc = 0;
int iNew113AIMMerc = 0;
if (pMail->usLength == MERC_UP_LEVEL_GASTON || pMail->usLength == MERC_UP_LEVEL_STOGIE ||
pMail->usLength == MERC_UP_LEVEL_TEX || pMail->usLength == MERC_UP_LEVEL_BIGGENS)
{
iNew113MERCMerc = pMail->usLength;
pMail->usLength = 2;
}
else if (pMail->usLength >= 170 && pMail->usLength <= 177)
{
iNew113AIMMerc = pMail->usLength;
pMail->usLength = 2;
}
// list doesn't exist, reload
if( !pTempRecord )
{
while(pMail->usLength > iCounter)
while(pMail->usLength > iCounter)
{
// read one record from email file
LoadEncryptedDataFromFile( "BINARYDATA\\Email.edt", pString, MAIL_STRING_SIZE * ( iOffSet + iCounter ), MAIL_STRING_SIZE );
// read one record from email file
LoadEncryptedDataFromFile( "BINARYDATA\\Email.edt", pString, MAIL_STRING_SIZE * ( iOffSet + iCounter ), MAIL_STRING_SIZE );
// ----------------
// New MERC Merc
// ----------------
// WANNE: We have a new 1.13 MERC merc (Text, Gaston, Stogie or Biggens)
if (iNew113MERCMerc != 0)
{
@@ -4815,8 +4932,7 @@ void PreProcessEmail( EmailPtr pMail )
wcscpy(pString, L"\0");
if (iNew113MERCMerc == MERC_UP_LEVEL_GASTON)
{
wcscpy( pString, New113MERCMercMailTexts[0] );
wcscpy( pString, New113MERCMercMailTexts[0] );
}
else if (iNew113MERCMerc == MERC_UP_LEVEL_STOGIE)
{
@@ -4832,21 +4948,73 @@ void PreProcessEmail( EmailPtr pMail )
}
}
}
// ----------------
// New AIM Merc
// ----------------
// WANNE: We have a new 1.13 MERC merc (Text, Gaston, Stogie or Biggens)
if (iNew113AIMMerc != 0)
{
wcscpy(pString, L"\0");
// Only output the mail text, not the subject, cause we already have the subject as text
if (iCounter == 1)
{
if (iNew113AIMMerc == 170)
{
wcscpy( pString, New113AIMMercMailTexts[1] );
}
else if (iNew113MERCMerc == 171)
{
wcscpy( pString, New113AIMMercMailTexts[3] );
}
else if (iNew113MERCMerc == 172)
{
wcscpy( pString, New113AIMMercMailTexts[5] );
}
else if (iNew113MERCMerc == 173)
{
wcscpy( pString, New113AIMMercMailTexts[7] );
}
else if (iNew113MERCMerc == 174)
{
wcscpy( pString, New113AIMMercMailTexts[9] );
}
else if (iNew113MERCMerc == 175)
{
wcscpy( pString, New113AIMMercMailTexts[11] );
}
else if (iNew113MERCMerc == 176)
{
wcscpy( pString, New113AIMMercMailTexts[13] );
}
else if (iNew113MERCMerc == 177)
{
wcscpy( pString, New113AIMMercMailTexts[15] );
}
}
}
// add to list
AddEmailRecordToList( pString );
// increment email record counter
iCounter++;
}
// increment email record counter
iCounter++;
}
// WANNE: Set the value back
if (iNew113MERCMerc != 0)
{
pMail->usLength = iNew113MERCMerc;
}
// WANNE: Set the value back
if (iNew113MERCMerc != 0)
{
pMail->usLength = iNew113MERCMerc;
}
giPrevMessageId = giMessageId;
// WANNE: Set the value back
if (iNew113AIMMerc != 0)
{
pMail->usLength = iNew113AIMMerc;
}
giPrevMessageId = giMessageId;
}
+5 -1
View File
@@ -144,12 +144,12 @@
//#define MERC_UP_LEVEL_BIGGENS (MERC_UP_LEVEL_TEX + MERC_UP_LEVEL_TEX_LENGTH)
//#define MERC_UP_LEVEL_BIGGENS_LENGTH 2
#define MERC_UP_LEVEL_GASTON 165
#define MERC_UP_LEVEL_STOGIE 166
#define MERC_UP_LEVEL_TEX 167
#define MERC_UP_LEVEL_BIGGENS 168
struct message{
STR16 pString;
struct message *Next;
@@ -299,6 +299,10 @@ void RemoveEmailMessage(INT32 iId);
EmailPtr GetEmailMessage(INT32 iId);
void LookForUnread();
void AddEmail(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iCurrentIMPPosition);
// WANNE: For the new WF merc
void AddEmailWFMercLevelUp(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate, INT32 iCurrentIMPPosition);
void AddPreReadEmail(INT32 iMessageOffset, INT32 iMessageLength, UINT8 ubSender, INT32 iDate);
BOOLEAN DisplayNewMailBox();
void CreateDestroyNewMailButton();
+57 -28
View File
@@ -409,7 +409,7 @@ INT32 GetProjectedTotalDailyIncome( void )
// HEADROCK HAM 3.6: Facilities can make you money, and this is figured into your daily income.
INT32 iRate = 0;
iRate = PredictIncomeFromPlayerMines() + (15 * GetTotalFacilityHourlyCosts( TRUE )); // 15 hours is the average time a merc can work per day
iRate = PredictIncomeFromPlayerMines(TRUE) + (15 * GetTotalFacilityHourlyCosts( TRUE )); // 15 hours is the average time a merc can work per day
return( iRate );
}
@@ -1167,21 +1167,23 @@ void OpenAndReadFinancesFile( void )
// file exists, read in data, continue until file end
while( FileGetSize( hFileHandle ) > uiByteCount)
{
// read in other data
FileRead( hFileHandle, &ubCode, sizeof(UINT8), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &ubCode, sizeof(UINT8), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &ubSecondCode, sizeof(UINT8), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &uiDate, sizeof(UINT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iAmount, sizeof(INT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iBalanceToDate, sizeof(INT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iAmount, sizeof(INT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iBalanceToDate, sizeof(INT32), (UINT32 *)&iBytesRead );
AssertMsg( iBytesRead, "Failed To Read Data Entry");
// WANNE: Fix uiDate (add 1 day!)!
uiDate += 1500;
// add transaction
ProcessAndEnterAFinacialRecord(ubCode, uiDate, iAmount, ubSecondCode, iBalanceToDate);
ProcessAndEnterAFinacialRecord(ubCode, uiDate, iAmount, ubSecondCode, iBalanceToDate);
// increment byte counter
uiByteCount += sizeof( INT32 ) + sizeof( UINT32 ) + sizeof( UINT8 )+ sizeof(UINT8) + sizeof( INT32 );
uiByteCount += sizeof( INT32 ) + sizeof( UINT32 ) + sizeof( UINT8 )+ sizeof(UINT8) + sizeof( INT32 );
}
// close file
@@ -1906,19 +1908,23 @@ BOOLEAN LoadInRecords( UINT32 uiPage )
{
// read in data
FileRead( hFileHandle, &ubCode, sizeof(UINT8), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &ubCode, sizeof(UINT8), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &ubSecondCode, sizeof(UINT8), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &uiDate, sizeof(UINT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iAmount, sizeof(INT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iBalanceToDate, sizeof(INT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iAmount, sizeof(INT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iBalanceToDate, sizeof(INT32), (UINT32 *)&iBytesRead );
AssertMsg( iBytesRead, "Failed To Read Data Entry");
// WANNE: Do not add the fix + 1 day here, because otherwise we have a day + 1 offset
// WANNE: Fix uiDate (add 1 day!)!
//uiDate += 1500;
// add transaction
ProcessAndEnterAFinacialRecord(ubCode, uiDate, iAmount, ubSecondCode, iBalanceToDate);
ProcessAndEnterAFinacialRecord(ubCode, uiDate, iAmount, ubSecondCode, iBalanceToDate);
// increment byte counter
uiByteCount += sizeof( INT32 ) + sizeof( UINT32 ) + sizeof( UINT8 )+ sizeof(UINT8) + sizeof( INT32 );
uiByteCount += sizeof( INT32 ) + sizeof( UINT32 ) + sizeof( UINT8 )+ sizeof(UINT8) + sizeof( INT32 );
// we've overextended our welcome, and bypassed end of file, get out
if( uiByteCount >= FileGetSize( hFileHandle ) )
@@ -2127,8 +2133,11 @@ INT32 GetPreviousDaysBalance( void )
FileRead( hFileHandle, &ubCode, sizeof(UINT8), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &ubSecondCode, sizeof(UINT8), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &uiDate, sizeof(UINT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iAmount, sizeof(INT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iBalanceToDate, sizeof(INT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iAmount, sizeof(INT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iBalanceToDate, sizeof(INT32), (UINT32 *)&iBytesRead );
// WANNE: Fix uiDate (add 1 day!)!
uiDate += 1500;
// check to see if we are far enough
if( ( uiDate / ( 24 * 60 ) ) == ( iDateInMinutes / ( 24 * 60 ) ) - 2 )
@@ -2221,10 +2230,14 @@ INT32 GetTodaysBalance( void )
FileRead( hFileHandle, &ubCode, sizeof(UINT8), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &ubSecondCode, sizeof(UINT8), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &uiDate, sizeof(UINT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iAmount, sizeof(INT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iBalanceToDate, sizeof(INT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iAmount, sizeof(INT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iBalanceToDate, sizeof(INT32), (UINT32 *)&iBytesRead );
AssertMsg( iBytesRead, "Failed To Read Data Entry");
// WANNE: Fix uiDate (add 1 day!)!
uiDate += 1500;
// check to see if we are far enough
if( ( uiDate / ( 24 * 60 ) ) == ( iDateInMinutes / ( 24 * 60 ) ) - 1 )
{
@@ -2301,15 +2314,19 @@ INT32 GetPreviousDaysIncome( void )
// incrment byte count
iByteCount += RECORD_SIZE;
FileGetPos( hFileHandle );
FileGetPos( hFileHandle );
FileRead( hFileHandle, &ubCode, sizeof(UINT8), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &ubSecondCode, sizeof(UINT8), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &uiDate, sizeof(UINT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iAmount, sizeof(INT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iBalanceToDate, sizeof(INT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iAmount, sizeof(INT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iBalanceToDate, sizeof(INT32), (UINT32 *)&iBytesRead );
AssertMsg( iBytesRead, "Failed To Read Data Entry");
// WANNE: Fix uiDate (add 1 day!)!
uiDate += 1500;
// check to see if we are far enough
if( ( uiDate / ( 24 * 60 ) )== ( iDateInMinutes / ( 24 * 60 ) ) - 2 )
{
@@ -2318,7 +2335,7 @@ INT32 GetPreviousDaysIncome( void )
// there are no entries for the previous day
if( ( uiDate / ( 24 * 60 ) ) < ( iDateInMinutes / ( 24 * 60 ) ) - 2 )
{
{
fGoneTooFar = TRUE;
}
@@ -2402,10 +2419,14 @@ INT32 GetTodaysDaysIncome( void )
FileRead( hFileHandle, &ubCode, sizeof(UINT8), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &ubSecondCode, sizeof(UINT8), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &uiDate, sizeof(UINT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iAmount, sizeof(INT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iBalanceToDate, sizeof(INT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iAmount, sizeof(INT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iBalanceToDate, sizeof(INT32), (UINT32 *)&iBytesRead );
AssertMsg( iBytesRead, "Failed To Read Data Entry");
// WANNE: Fix uiDate (add 1 day!)!
uiDate += 1500;
// check to see if we are far enough
if( ( uiDate / ( 24 * 60 ) ) == ( iDateInMinutes / ( 24 * 60 ) ) - 1 )
{
@@ -2527,16 +2548,20 @@ INT32 GetTodaysOtherDeposits( void )
{
FileSeek( hFileHandle, RECORD_SIZE * iCounter , FILE_SEEK_FROM_END );
// incrment byte count
iByteCount += RECORD_SIZE;
// incrment byte count
iByteCount += RECORD_SIZE;
FileRead( hFileHandle, &ubCode, sizeof(UINT8), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &ubSecondCode, sizeof(UINT8), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &uiDate, sizeof(UINT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iAmount, sizeof(INT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iBalanceToDate, sizeof(INT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iAmount, sizeof(INT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iBalanceToDate, sizeof(INT32), (UINT32 *)&iBytesRead );
AssertMsg( iBytesRead, "Failed To Read Data Entry");
// WANNE: Fix uiDate (add 1 day!)!
uiDate += 1500;
// check to see if we are far enough
if( ( uiDate / ( 24 * 60 ) ) == ( iDateInMinutes / ( 24 * 60 ) ) - 1 )
{
@@ -2629,10 +2654,14 @@ INT32 GetYesterdaysOtherDeposits( void )
FileRead( hFileHandle, &ubCode, sizeof(UINT8), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &ubSecondCode, sizeof(UINT8), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &uiDate, sizeof(UINT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iAmount, sizeof(INT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iBalanceToDate, sizeof(INT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iAmount, sizeof(INT32), (UINT32 *)&iBytesRead );
FileRead( hFileHandle, &iBalanceToDate, sizeof(INT32), (UINT32 *)&iBytesRead );
AssertMsg( iBytesRead, "Failed To Read Data Entry");
// WANNE: Fix uiDate (add 1 day!)!
uiDate += 1500;
// check to see if we are far enough
if( ( uiDate / ( 24 * 60 ) )== ( iDateInMinutes / ( 24 * 60 ) ) - 2 )
{
+1
View File
@@ -53,6 +53,7 @@ enum
SOLD_ITEMS,
FACILITY_OPERATIONS, // HEADROCK HAM 3.6: Facility costs (daily payment)
MILITIA_UPKEEP, // HEADROCK HAM 3.6: Militia Upkeep Costs (daily payment)
TEXT_NUM_FINCANCES
};
+1
View File
@@ -103,6 +103,7 @@ enum{
HISTORY_GAVE_CARMEN_HEAD,
HISTORY_SLAY_MYSTERIOUSLY_LEFT,
HISTORY_MERC_KILLED_CHARACTER,
TEXT_NUM_HISTORY
};
typedef struct history HistoryUnit;
+1
View File
@@ -194,6 +194,7 @@ enum{
FLORIST_BOOKMARK,
INSURANCE_BOOKMARK,
CANCEL_STRING,
TEXT_NUM_LAPTOP_BOOKMARKS
};
+21 -5
View File
@@ -189,9 +189,14 @@ INT32 GetNumberOfHiredMercs()
for (i = 0; i<=(NUMBER_OF_MERCS - 1); i++)
{
if( i == MERC_LARRY_ROACHBURN )
// WANNE: If we have drunken merc, then skip otherwise is will exist 2 times!
if (gConditionsForMercAvailability[ i ].Drunk)
continue;
// WANNE.LARRY
/*if( i == MERC_LARRY_ROACHBURN )
continue;*/
usMercID = GetMercIDFromMERCArray( i );
// Is the merc hired?
@@ -489,6 +494,7 @@ void DisplayHiredMercs()
usMercIDEnd = usMercIDStart + MAX_NUMBER_MERCS_ON_PAGE;
}
// WANNE.LARRY: I don't understand why this is needed??? I did not change anything on this yet.
// At least second page
// This approach is needed, because auf LARRY_ROACHBURN
if (usMercIDStart > 0)
@@ -503,10 +509,15 @@ void DisplayHiredMercs()
if (usCurrentRow == usMercIDEnd - 1)
break;
//if it larry Roach burn advance. ( cause larry is in twice, a sober larry and a stoned larry )
if( i == MERC_LARRY_ROACHBURN )
// WANNE: If we have drunken merc, then skip otherwise is will exist 2 times!
if (gConditionsForMercAvailability[ i ].Drunk)
continue;
// WANNE.LARRY
//if it larry Roach burn advance. ( cause larry is in twice, a sober larry and a stoned larry )
/*if( i == MERC_LARRY_ROACHBURN )
continue;*/
usMercID = GetMercIDFromMERCArray( i );
//is the merc on the team, or is owed money
@@ -741,9 +752,14 @@ UINT32 CalculateHowMuchPlayerOwesSpeck()
for(i=0; i<(NUMBER_OF_MERCS - 1); i++)
{
//if it larry Roach burn advance. ( cause larry is in twice, a sober larry and a stoned larry )
if( i == MERC_LARRY_ROACHBURN )
// WANNE: If we have drunken merc, then skip otherwise is will exist 2 times!
if (gConditionsForMercAvailability[ i ].Drunk)
continue;
// WANNE.LARRY
//if it larry Roach burn advance. ( cause larry is in twice, a sober larry and a stoned larry )
//if( i == MERC_LARRY_ROACHBURN )
// continue;
usMercID = GetMercIDFromMERCArray( i );
//if( IsMercOnTeam( (UINT8)usMercID ) )
Binary file not shown.
+156 -92
View File
@@ -29,8 +29,9 @@
#include "connect.h"
UINT8 NUMBER_OF_MERCS;
UINT8 LAST_MERC_ID;
UINT8 NUMBER_OF_MERCS = 0;
UINT8 LAST_MERC_ID = -1;
UINT8 NUMBER_OF_BAD_MERCS = -1;
#define MERC_TEXT_FONT FONT12ARIAL
#define MERC_TEXT_COLOR FONT_MCOLOR_WHITE
@@ -117,30 +118,9 @@ UINT8 LAST_MERC_ID;
#define MERC__AMOUNT_OF_MONEY_FOR_BUBBA 6000
#define MERC__DAY_WHEN_BUBBA_CAN_BECOME_AVAILABLE 10
enum
{
MERC_ARRIVES_BUBBA,
MERC_ARRIVES_LARRY,
MERC_ARRIVES_NUMB,
MERC_ARRIVES_TEX,
MERC_ARRIVES_BIGGENS,
MERC_ARRIVES_COUGAR,
MERC_ARRIVES_GASTON,
MERC_ARRIVES_STOGIE,
NUM_MERC_ARRIVALS,
};
typedef struct
{
UINT16 usMoneyPaid;
UINT16 usDay;
UINT8 ubMercArrayID;
} CONTITION_FOR_MERC_AVAILABLE;
CONTITION_FOR_MERC_AVAILABLE gConditionsForMercAvailability[ NUM_MERC_ARRIVALS ] =
CONTITION_FOR_MERC_AVAILABLE_TEMP gConditionsForMercAvailabilityTemp[ NUM_PROFILES ];
CONTITION_FOR_MERC_AVAILABLE gConditionsForMercAvailability[ NUM_PROFILES ]; //NUM_MERC_ARRIVALS ]; //=
/*
{
5000, 8, 6, //BUBBA
10000, 15, 7, //Larry
@@ -152,7 +132,7 @@ CONTITION_FOR_MERC_AVAILABLE gConditionsForMercAvailability[ NUM_MERC_ARRIVALS ]
26000, 31, 14, //Stogie
};
*/
enum
{
@@ -183,7 +163,7 @@ UINT32 guiMercBackGround;
UINT32 guiMercVideoFaceBackground;
UINT32 guiMercVideoPopupBackground;
UINT8 gubMercArray[ MAX_NUMBER_OF_MERCS ];
UINT8 gubMercArray[ NUM_PROFILES ]; //MAX_NUMBER_OF_MERCS
UINT8 gubCurMercIndex;
INT32 iMercPopUpBox = -1;
@@ -281,6 +261,8 @@ MOUSE_REGION gMercSiteSubTitleMouseRegion;
void MercSiteSubTitleRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
BOOLEAN LoadNewMercsFromLoadGameFile( HWFILE hFile );
BOOLEAN SaveNewMercsToSaveGameFile( HWFILE hFile );
//*******************************
@@ -324,47 +306,57 @@ BOOLEAN CanMercBeAvailableYet( UINT8 ubMercToCheck );
UINT32 CalcMercDaysServed();
//ppp
BOOLEAN SaveNewMercsToSaveGameFile( HWFILE hFile )
{
UINT32 uiNumBytesWritten;
FileWrite( hFile, &gConditionsForMercAvailability, sizeof( gConditionsForMercAvailability), &uiNumBytesWritten );
if( uiNumBytesWritten != sizeof( gConditionsForMercAvailability ) )
{
return( FALSE );
}
return( TRUE );
}
BOOLEAN LoadNewMercsFromLoadGameFile( HWFILE hFile )
{
UINT32 uiNumBytesRead;
FileRead( hFile, &gConditionsForMercAvailability, sizeof( gConditionsForMercAvailability ), &uiNumBytesRead );
if( uiNumBytesRead != sizeof( gConditionsForMercAvailability ) )
{
return( FALSE );
}
return( TRUE );
}
void GameInitMercs()
{
// for(i=0; i<NUMBER_OF_MERCS; i++)
// gubMercArray[ i ] = i+BIFF;
// WANNE - MP: Initialize the the variables for single player
NUMBER_OF_MERCS = 15;
LAST_MERC_ID = 14;
//can now be out of order
gubMercArray[ 0 ] = BIFF;
gubMercArray[ 1 ] = HAYWIRE;
gubMercArray[ 2 ] = GASKET;
gubMercArray[ 3 ] = RAZOR;
gubMercArray[ 4 ] = FLO;
gubMercArray[ 5 ] = GUMPY;
gubMercArray[ 6 ] = BUBBA;
gubMercArray[ 7 ] = LARRY_NORMAL; //if changing this values, change in GetMercIDFromMERCArray()
gubMercArray[ 8 ] = LARRY_DRUNK; //if changing this values, change in GetMercIDFromMERCArray()
gubMercArray[ 9 ] = NUMB;
gubMercArray[ 10 ] = TEX;
gubMercArray[ 11 ] = BIGGENS;
gubMercArray[ 12 ] = COUGAR;
gubMercArray[ 13 ] = GASTON;
gubMercArray[ 14 ] = STOGIE;
gubMercArray[ 15 ] = 57;//hayden
gubMercArray[ 16 ] = 58;
gubMercArray[ 17 ] = 59;
gubMercArray[ 18 ] = 60;
gubMercArray[ 19 ] = 61;
gubMercArray[ 20 ] = 63;
gubMercArray[ 21 ] = 66;
gubMercArray[ 22 ] = 67;
gubMercArray[ 23 ] = 68;
gubMercArray[ 24 ] = 69;
gubMercArray[ 25 ] = 70;
gubMercArray[ 26 ] = 72;
gubMercArray[ 27 ] = 64;
UINT8 i;
NUMBER_OF_MERCS = 0;
LAST_MERC_ID = -1;
NUMBER_OF_BAD_MERCS = -1;
for(i=0; i<NUM_PROFILES; i++)
{
if ( gConditionsForMercAvailability[i].ProfilId != 0 )
{
NUMBER_OF_MERCS = NUMBER_OF_MERCS + 1;
LAST_MERC_ID = LAST_MERC_ID + 1;
gubMercArray[ i ] = gConditionsForMercAvailability[i].ProfilId;
}
}
for(i=0; i<NUM_PROFILES; i++)
{
if ( gConditionsForMercAvailability[i].StartMercsAvailable == TRUE && gConditionsForMercAvailability[i].NewMercsAvailable == FALSE )
NUMBER_OF_BAD_MERCS = NUMBER_OF_BAD_MERCS + 1;
}
LaptopSaveInfo.gubPlayersMercAccountStatus = MERC_NO_ACCOUNT;
gubCurMercIndex = 0;
@@ -782,10 +774,15 @@ void DailyUpdateOfMercSite( UINT16 usDate)
ubMercID = GetMercIDFromMERCArray( (UINT8) i );
if( IsMercOnTeam( ubMercID ) )
{
//if it larry Roach burn advance. ( cause larry is in twice, a sober larry and a stoned larry )
if( i == MERC_LARRY_ROACHBURN )
// WANNE: If we have drunken merc, then skip otherwise is will exist 2 times!
if (gConditionsForMercAvailability[ i ].Drunk)
continue;
//// WANNE.LARRY
////if it larry Roach burn advance. ( cause larry is in twice, a sober larry and a stoned larry )
//if( i == MERC_LARRY_ROACHBURN )
// continue;
sSoldierID = GetSoldierIDFromMercID( ubMercID );
pSoldier = MercPtrs[ sSoldierID ];
@@ -988,31 +985,33 @@ void DailyUpdateOfMercSite( UINT16 usDate)
//Gets the actual merc id from the array
UINT8 GetMercIDFromMERCArray(UINT8 ubMercID)
{
//if it is one of the regular MERCS
if( ubMercID <= 6 )
{
return( gubMercArray[ ubMercID ] );
}
//if it is Larry, determine if it Stoned larry or straight larry
else if( ( ubMercID == 7 ) || ( ubMercID == 8 ) )
// Is this a drunken merc (e.g Larry) and has an additional drunken profile
if( gConditionsForMercAvailability[ ubMercID ].Drunk == TRUE && gConditionsForMercAvailability[ ubMercID ].uiAlternateIndex != 255)
{
if ( HasLarryRelapsed() )
{
return( gubMercArray[ 8 ] );
// Drunken Larry
if (gConditionsForMercAvailability[ ubMercID ].uiIndex <= NUM_PROFILES)
{
return( gubMercArray[ gConditionsForMercAvailability[ ubMercID ].uiIndex ] );
}
else
{
Assert(0);
return( TRUE );
}
}
else
{
return( gubMercArray[ 7 ] );
// Normal Larry (Normal Profile is one
return( gubMercArray[ gConditionsForMercAvailability[ ubMercID ].uiAlternateIndex ] );
}
}
//if it is one of the newer mercs
else if( ubMercID <= LAST_MERC_ID )
// Merc is not drunken
else if( ubMercID <= NUM_PROFILES )
{
return( gubMercArray[ ubMercID ] );
}
//else its an error
else
{
@@ -1071,7 +1070,9 @@ void InitMercVideoFace()
BOOLEAN StartSpeckTalking(UINT16 usQuoteNum)
{
if(is_networked)return( FALSE );
if(is_networked)
return( FALSE );
if( usQuoteNum == MERC_VIDEO_SPECK_SPEECH_NOT_TALKING || usQuoteNum == MERC_VIDEO_SPECK_HAS_TO_TALK_BUT_QUOTE_NOT_CHOSEN_YET )
return( FALSE );
@@ -2122,7 +2123,7 @@ BOOLEAN IsMercMercAvailable( UINT8 ubMercID )
UINT8 cnt;
//loop through the array of mercs
for( cnt=0; cnt<LaptopSaveInfo.gubLastMercIndex; cnt++ )
for( cnt=0; cnt<NUM_PROFILES; cnt++ ) //LaptopSaveInfo.gubLastMercIndex; cnt++ )
{
//if this is the merc
if( GetMercIDFromMERCArray( cnt ) == ubMercID )
@@ -2475,12 +2476,15 @@ BOOLEAN AreAnyOfTheNewMercsAvailable()
if( LaptopSaveInfo.fNewMercsAvailableAtMercSite )
return( FALSE );
for(i=(LARRY_NORMAL-BIFF); i<=LaptopSaveInfo.gubLastMercIndex; i++)
//for(i=(LARRY_NORMAL-BIFF); i<=LaptopSaveInfo.gubLastMercIndex; i++)
for(i=0; i<=NUM_PROFILES; i++)
{
ubMercID = GetMercIDFromMERCArray( i );
if( IsMercMercAvailable( ubMercID ) )
return( TRUE );
if ( gConditionsForMercAvailability[i].NewMercsAvailable == FALSE && gProfilesMERC[i].ProfilId != 0 )
{
ubMercID = GetMercIDFromMERCArray( i );
if( IsMercMercAvailable( ubMercID ) )
return( TRUE );
}
}
return( FALSE );
@@ -2490,10 +2494,33 @@ void ShouldAnyNewMercMercBecomeAvailable()
{
BOOLEAN fNewMercAreAvailable = FALSE;
UINT8 i;
BOOLEAN Stop = FALSE;
//Kaiden: Added this if test to make sure that the "New Mercs Available"
// e-mail doesn't show up and no unneccessary checks are made when you
// have the ALL_MERCS_AT_MERC set to TRUE in the INI file.
if(!gGameExternalOptions.fAllMercsAvailable)
{
for(i=0; i<NUM_PROFILES; i++)
{
if ( Stop == FALSE )
{
if ( gConditionsForMercAvailability[i].ProfilId != 0 && gConditionsForMercAvailability[i].NewMercsAvailable == FALSE && gConditionsForMercAvailability[i].StartMercsAvailable == FALSE )
{
if( CanMercBeAvailableYet( gConditionsForMercAvailability[i].uiIndex ) )
{
fNewMercAreAvailable = TRUE;
Stop = TRUE;
}
}
}
}
}
/* if(!gGameExternalOptions.fAllMercsAvailable)
{
//for bubba
// if( GetMercIDFromMERCArray( LaptopSaveInfo.gubLastMercIndex ) == GUMPY )
@@ -2551,20 +2578,20 @@ void ShouldAnyNewMercMercBecomeAvailable()
{
fNewMercAreAvailable = TRUE;
}
*/
//if there is a new merc available
if( fNewMercAreAvailable )
{
//Set up an event to add the merc in x days
AddStrategicEvent( EVENT_MERC_SITE_NEW_MERC_AVAILABLE, GetMidnightOfFutureDayInMinutes( 1 ) + 420 + Random( 3 * 60 ), 0 );
}
}
// }
}
BOOLEAN CanMercBeAvailableYet( UINT8 ubMercToCheck )
{
//if the merc is already available
if( gConditionsForMercAvailability[ ubMercToCheck ].ubMercArrayID <= LaptopSaveInfo.gubLastMercIndex )
if( gConditionsForMercAvailability[ ubMercToCheck ].ubMercArrayID ) //<= LaptopSaveInfo.gubLastMercIndex )
return( FALSE );
//if the merc is already hired
@@ -2584,8 +2611,45 @@ BOOLEAN CanMercBeAvailableYet( UINT8 ubMercToCheck )
void NewMercsAvailableAtMercSiteCallBack( )
{
BOOLEAN fSendEmail=FALSE;
BOOLEAN Stop = FALSE;
UINT8 i;
for(i=0; i<NUM_PROFILES; i++)
{
if ( Stop == FALSE )
{
if ( gConditionsForMercAvailability[i].ProfilId != 0 && gConditionsForMercAvailability[i].NewMercsAvailable == FALSE && gConditionsForMercAvailability[i].StartMercsAvailable == FALSE )
{
gConditionsForMercAvailability[i].NewMercsAvailable = TRUE;
if( CanMercBeAvailableYet( gConditionsForMercAvailability[i].uiIndex ) )
{
if ( gConditionsForMercAvailability[ gConditionsForMercAvailability[i].uiIndex ].Drunk == TRUE )
{
LaptopSaveInfo.gubLastMercIndex = gConditionsForMercAvailability[gConditionsForMercAvailability[i].uiAlternateIndex].uiIndex;
}
else
{
LaptopSaveInfo.gubLastMercIndex++;
}
// LaptopSaveInfo.gubLastMercIndex++;
gConditionsForMercAvailability[gConditionsForMercAvailability[i].uiIndex].NewMercsAvailable = TRUE;
LaptopSaveInfo.ubLastMercAvailableId = gConditionsForMercAvailability[i].uiIndex;
gConditionsForMercAvailability[i].StartMercsAvailable = TRUE;
fSendEmail = TRUE;
Stop = TRUE;
}
}
}
}
// if( GetMercIDFromMERCArray( LaptopSaveInfo.gubLastMercIndex ) == BUBBA )
{
/* {
if( CanMercBeAvailableYet( MERC_ARRIVES_BUBBA ) )
{
LaptopSaveInfo.gubLastMercIndex++;
@@ -2655,7 +2719,7 @@ void NewMercsAvailableAtMercSiteCallBack( )
LaptopSaveInfo.ubLastMercAvailableId = MERC_ARRIVES_STOGIE;
fSendEmail = TRUE;
}
*/
if( fSendEmail )
AddEmail( NEW_MERCS_AT_MERC, NEW_MERCS_AT_MERC_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1);
+59 -3
View File
@@ -1,6 +1,7 @@
#ifndef __MERCS_H
#define __MERCS_H
#include "soldier profile type.h"
#define MERC_BUTTON_UP_COLOR FONT_MCOLOR_WHITE
#define MERC_BUTTON_DOWN_COLOR FONT_MCOLOR_DKWHITE
@@ -10,7 +11,10 @@ extern UINT8 LAST_MERC_ID;
#define MAX_NUMBER_OF_MERCS 28
#define NUMBER_OF_BAD_MERCS 5
//#define NUMBER_OF_BAD_MERCS 5
extern UINT8 NUMBER_OF_BAD_MERCS;
#define NUMBER_MERCS_AFTER_FIRST_MERC_ARRIVES 6
#define NUMBER_MERCS_AFTER_SECOND_MERC_ARRIVES 8
#define NUMBER_MERCS_AFTER_THIRD_MERC_ARRIVES 9
@@ -21,11 +25,63 @@ extern UINT8 LAST_MERC_ID;
#define MERC_NUM_DAYS_TILL_ACCOUNT_INVALID 12
#define MERC_LARRY_ROACHBURN 7
// WANNE.LARRY
//#define MERC_LARRY_ROACHBURN 7
#define DAYS_TIL_M_E_R_C_AVAIL 3
enum
{
MERC_ARRIVES_BUBBA,
MERC_ARRIVES_LARRY,
MERC_ARRIVES_NUMB,
MERC_ARRIVES_TEX,
MERC_ARRIVES_BIGGENS,
MERC_ARRIVES_COUGAR,
MERC_ARRIVES_GASTON,
MERC_ARRIVES_STOGIE,
MERC_ARRIVES_NEW = MERC_ARRIVES_STOGIE + 240,
NUM_MERC_ARRIVALS,
};
typedef struct
{
UINT16 usMoneyPaid;
UINT16 usDay;
UINT8 ubMercArrayID;
UINT8 uiIndex;
UINT8 ProfilId;
BOOLEAN NewMercsAvailable;
BOOLEAN StartMercsAvailable;
UINT8 MercBio;
BOOLEAN Drunk;
UINT8 uiAlternateIndex;
} CONTITION_FOR_MERC_AVAILABLE;
typedef struct
{
UINT16 usMoneyPaid;
UINT16 usDay;
UINT8 ubMercArrayID;
UINT8 uiIndex;
UINT8 ProfilId;
BOOLEAN NewMercsAvailable;
BOOLEAN StartMercsAvailable;
UINT8 MercBio;
BOOLEAN Drunk;
UINT8 uiAlternateIndex;
} CONTITION_FOR_MERC_AVAILABLE_TEMP;
extern CONTITION_FOR_MERC_AVAILABLE gConditionsForMercAvailability[ NUM_PROFILES ]; //NUM_MERC_ARRIVALS ];
extern CONTITION_FOR_MERC_AVAILABLE_TEMP gConditionsForMercAvailabilityTemp[ NUM_PROFILES ];
extern BOOLEAN LoadNewMercsFromLoadGameFile( HWFILE hFile );
extern BOOLEAN SaveNewMercsToSaveGameFile( HWFILE hFile );
//The players account information for the MERC site
enum
{
@@ -82,7 +138,7 @@ extern UINT16 gusMercVideoSpeckSpeech;
extern UINT8 gubArrivedFromMercSubSite;
extern UINT8 gubMercArray[ MAX_NUMBER_OF_MERCS ];
extern UINT8 gubMercArray[ NUM_PROFILES ]; //MAX_NUMBER_OF_MERCS
extern UINT8 gubCurMercIndex;
//extern UINT8 gubLastMercIndex;
+2359 -281
View File
File diff suppressed because it is too large Load Diff
+43
View File
@@ -9,6 +9,49 @@
// delay for change in ATM mode
#define DELAY_PER_MODE_CHANGE_IN_ATM 2000
//enums for the pPersonnelScreenStrings[]
enum
{
PRSNL_TXT_HEALTH, // 0 HEALTH OF MERC
PRSNL_TXT_AGILITY,
PRSNL_TXT_DEXTERITY,
PRSNL_TXT_STRENGTH,
PRSNL_TXT_LEADERSHIP,
PRSNL_TXT_WISDOM, // 5
PRSNL_TXT_EXP_LVL, // EXPERIENCE LEVEL
PRSNL_TXT_MARKSMANSHIP,
PRSNL_TXT_MECHANICAL,
PRSNL_TXT_EXPLOSIVES,
PRSNL_TXT_MEDICAL, // 10
PRSNL_TXT_MED_DEPOSIT, // AMOUNT OF MEDICAL DEPOSIT PUT DOWN ON THE MERC
PRSNL_TXT_CURRENT_CONTRACT, // COST OF CURRENT CONTRACT
PRSNL_TXT_KILLS, // NUMBER OF KILLS BY MERC
PRSNL_TXT_ASSISTS, // NUMBER OF ASSISTS ON KILLS BY MERC
PRSNL_TXT_DAILY_COST, // 15 DAILY COST OF MERC
PRSNL_TXT_TOTAL_COST, // TOTAL COST OF MERC
PRSNL_TXT_CONTRACT, // COST OF CURRENT CONTRACT
PRSNL_TXT_TOTAL_SERVICE, // TOTAL SERVICE RENDERED BY MERC
PRSNL_TXT_UNPAID_AMOUNT, // AMOUNT LEFT ON MERC MERC TO BE PAID
PRSNL_TXT_HIT_PERCENTAGE, // 20 PERCENTAGE OF SHOTS THAT HIT TARGET
PRSNL_TXT_BATTLES, // NUMBER OF BATTLES FOUGHT
PRSNL_TXT_TIMES_WOUNDED, // NUMBER OF TIMES MERC HAS BEEN WOUNDED
PRSNL_TXT_SKILLS,
PRSNL_TXT_NOSKILLS,
PRSNL_TXT_ACHIEVEMNTS,
TEXT_NUM_PRSNL,
};
// departed states
enum
{
DEPARTED_DEAD = 0,
DEPARTED_FIRED,
DEPARTED_OTHER,
DEPARTED_MARRIED,
DEPARTED_CONTRACT_EXPIRED,
DEPARTED_QUIT,
TEXT_NUM_DEPARTED
};
void GameInitPersonnel();
void EnterPersonnel();