Author SHA1 Message Date
Asdow ba270534c6 Revert "Add if conditional for !(uiFlags & TILES_DIRTY)"
This reverts commit b49c37e0a9.
2023-09-27 23:40:46 +03:00
Asdow 0cf0e054ab Remove useless code
Mouse XY position is fetched, but never used
2023-09-27 23:24:20 +03:00
Asdow fc6bdad94b add static keyword 2023-09-27 23:23:37 +03:00
Asdow b49c37e0a9 Add if conditional for !(uiFlags & TILES_DIRTY)
One extra level of nesting, but clears up the scoping for which situations are done if TILES_DIRTY flag is not set
2023-09-27 23:07:55 +03:00
Asdow bbbfdb8bd5 Simplify item blitting
fZBlit was always set to true
bItemOutline was either always true or false depending on the branch
2023-09-27 22:48:40 +03:00
Asdow 195dc57e96 Remove commented out code 2023-09-27 22:46:08 +03:00
Asdow 52f46c60c7 Replace StructZLevel & SoldierZLevel defines with functions 2023-09-27 22:28:28 +03:00
Asdow c1f6000980 Rename original function 2023-09-27 22:27:14 +03:00
Asdow 05582b960d Check for nullptr 2023-09-27 22:26:46 +03:00
Xiaoxun92andGitHub 4ebae982dd Downgrade startup ini errors to warnings (#229) 2023-09-22 18:10:08 -07:00
sun-alfandGitHub 8a241d277d Merge pull request #228 from 1dot13/master_1dot13
[Fix] One of optimizations in (2482234e) commit is not suitable for M…
2023-09-14 00:37:04 +02:00
sun-alf 5bfd19e5a8 [Fix] One of optimizations in (2482234e) commit is not suitable for MOLLE stuff in 1.13
It is revealed, MOLLE things in 1.13 are configured in XMLs using both NAS and OAS (old attachment system) methods even if NAS is enabled in New Game Options. Given this, logic of SetAttachmentSlotsFlag() cannot be splitted onto NAS and OAS parts, and both Attachment[] and AttachmentPoints must be checked disregarding the NAS option.
2023-09-14 01:04:55 +03:00
KittyandGitHub 07591e50f5 Merge pull request #225 from zwwooooo/master
Chinese translation update(by TBS)
2023-09-11 17:07:21 +02:00
zwwooooo 556641377c Chinese translation update(by TBS) 2023-09-10 22:31:47 +08:00
zwwooooo 985dace82e Merge branch 'master' of github.com:1dot13/source 2023-09-10 22:03:41 +08:00
sun-alfandGitHub bb73a458ee Merge pull request #224 from 1dot13/master_1dot13
Master 1dot13
2023-09-10 10:21:03 +02:00
sun-alf f8637e5972 [~] Performance optimizations around Attachment[] and Launchable[] arrays
AIMNAS with its ~50K elements in Attachment[] suffered of performance drop when MOLLE stuff is in the visible inventory. To resolve it the following is done:
* Introduce gMAXATTACHMENTS_READ with actual number of elements in Attachment[]; according refactoring.
* Introduce gMAXLAUNCHABLES_READ with actual number of elements in Launchable[]; according refactoring.
* Introduce std::multimap AttachmentBackmap for quick access to attachments using itemId as a key.
* Sort Attachment[] by attachmentIndex right after loading from XML. According order in XML is not needed anymore.
* Introduce FindAttachmentRange() for quick access to attachments using attachmentId as a key (binary search in Attachment[]).
In a few words, GetHelpTextForItemInLaptop(), ValidAttachment(), SetAttachmentSlotsFlag() were heavily optimized.
2023-09-08 21:58:14 +03:00
sun-alf 4c861e441a [Fix] Revive FPS drawing overlay
To enable built-in FPS, change gbFPSDisplay to SHOW_FULL_FPS (1) in debugger (or change it in src code and rebuild).
2023-09-08 21:58:13 +03:00
AsdowandGitHub fc5573f73d Correct check for stance (#222)
Same issue as in commit 23ceb0f
2023-09-05 18:57:40 +03:00
AsdowandGitHub 23ceb0fa4c Fix bug in OCTH prone CTH calculation (by Seven) (#221)
GetToHitBonus() expects BOOLEAN for fProneStance argument, with no comparison to ANIM_PRONE, the ubEndHeight ends up adding bipod bonuses to *all* stances
2023-09-05 17:33:42 +03:00
rftrdevandGitHub 28aa73a859 Clamp coolness to valid values when generating ARC ammo cache (#220)
Fixes #217
2023-09-02 23:01:17 -07:00
KittyandGitHub cd186a2b1c Merge pull request #218 from andrzejfalkowski/loading-screens-multi-res
Loadscreen - Multiple resolutions and stretch modes
2023-09-02 16:13:52 +02:00
Andrzej Fałkowski 019b9c4907 Merge branch 'master' into loading-screens-multi-res 2023-08-31 23:29:21 +02:00
KittyandGitHub 5740a0af08 Merge pull request #214 from andrzejfalkowski/face-gear-offset-fix
Face gear offset fix
2023-08-30 19:42:55 +02:00
KittyandGitHub 9a46abe394 Merge pull request #215 from kitty624/Backgrounds
Fix character check for backgrounds during IMP creation
2023-08-30 19:40:31 +02:00
kitty624 7910be0ab7 Fix personality check for backgrounds during IMP creation 2023-08-30 19:34:30 +02:00
Andrzej Fałkowski ee3d2472e7 Removed unnecessary offset for face gear 2023-08-29 21:25:14 +02:00
Andrzej FałkowskiandGitHub 7edecd6849 Fixed vehicle body not properly removed when destroyed during ramming (#210) 2023-08-28 16:26:46 +03:00
Andrzej FałkowskiandGitHub d56288e313 Fixed incorrect vehicle group id after reloading the game and vehicle movement plot issues. (#207) 2023-08-28 16:26:34 +03:00
Andrzej FałkowskiandGitHub 3ddacf1a44 Fix vehicles consuming fuel after instant movement cancel (#213) 2023-08-28 16:26:02 +03:00
rftrdevandGitHub 8ec02b2d40 Add version info to main menu (#209) 2023-08-23 01:21:22 -07:00
rftrdevandGitHub 6bae48658e Fix personality check for backgrounds during IMP creation (#208) 2023-08-23 00:34:54 -07:00
KittyandGitHub 28a5c76775 Merge pull request #206 from kitty624/ExtraItems
Update XML.h

- added path to sub-directory for Extra Items
- to avoid cluttering up the parent directory when using this feature
- it allows to place extra items in sector via xml and based on difficulty level
- the new directory "ExtraItems" will contain more details on how-to-use
2023-08-22 00:36:01 +02:00
kitty624 1289c399ce Update XML.h
- added path to sub-directory for Extra Items
- to avoid cluttering up the parent directory when using this feature
- it allows to place extra items in sector via xml and based on difficulty level
- the new directory "ExtraItems" will contain more details on how-to-use
2023-08-22 00:22:20 +02:00
Andrzej FałkowskiandGitHub 1e1d456fd2 Prevent deadlocks due to self-healing interactive spots and self-attacking (#205) 2023-08-21 19:44:02 +03:00
Andrzej FałkowskiandGitHub 2060022e94 Battle Panel Multi Resolution (#203)
* Battle panel interface with support for multiple resolutions and scrollable list

* Support for localized versions of battle panel

* Removed commented out code

* Fixed wrong copypasta in German version
2023-08-20 20:52:34 +03:00
Andrzej Fałkowski 8f08eb15d2 Merge branch 'master' into loading-screens-multi-res 2023-08-19 23:02:54 +02:00
Andrzej Fałkowski 5400fb019d Loading screen multiple resolutions support and stretch modes, loading bar fixes 2023-08-19 22:30:57 +02:00
rftrdevandGitHub b91871b518 Move grenade bonuses from Demolitions to Throwing (#202)
* Copy grenade settings from demolitions to throwing

* Fix setting strings

* Add throwing bonuses to the same spots as demolitions

* Delete grenade bonuses from Demolitions

* Update text

* Reapply throwing check
2023-08-11 11:27:29 -07:00
rftrdevandGitHub aaeea9aac8 Replace evolution with growth rates (#201) 2023-08-09 18:36:44 -07:00
AsdowandGitHub 43c6943399 Don't modify gMAXITEM_READ when reading localized file (#198) 2023-08-04 14:25:35 +03:00
AsdowandGitHub 52ccc7cc3c Fix widescreen UI militia popup box y-coordinate (#196) 2023-08-04 13:45:54 +03:00
CptMooreandGitHub 200ac73f7a Merge pull request #195 from 1dot13/another-try-to-fix-latest-1
Update build.yml
2023-07-31 00:28:50 +02:00
CptMooreandGitHub 1bb8a214c9 Update build.yml 2023-07-31 00:28:42 +02:00
CptMooreandGitHub f78d91f3a3 Merge pull request #194 from 1dot13/another-try-to-fix-latest
Update build.yml
2023-07-30 23:34:09 +02:00
CptMooreandGitHub 32e49784a0 Update build.yml 2023-07-30 23:33:28 +02:00
CptMooreandGitHub 8824d32da9 Merge pull request #193 from 1dot13/correct-working-dir
Update build.yml
2023-07-30 19:23:13 +02:00
CptMooreandGitHub 2345dd0ae6 Update build.yml 2023-07-30 19:22:23 +02:00
CptMooreandGitHub cc6adb70f6 Merge pull request #191 from 1dot13/create-latest-tag-explicitly
Create latest tag explicitly
2023-07-30 09:53:06 +02:00
CptMooreandGitHub f16f137f2b Create latest tag explicitly
Apparently the github API does too much magic, lets hope removing a step will make it behave
2023-07-30 09:48:11 +02:00
zwwooooo 7383d6b3f6 Merge branch 'master' of github.com:1dot13/source 2023-05-26 15:35:00 +08:00
zwwooooo 2e5aabe615 Merge branch 'master' of github.com:1dot13/source 2023-04-12 16:44:15 +08:00
zwwooooo 0ac6c3eb2d Chinese translation update(by TBS) 2023-04-12 13:54:16 +08:00
zwwooooo 700734db10 Merge branch 'master' of github.com:1dot13/source 2023-04-12 13:49:10 +08:00
zwwooooo 7a198acdec Merge branch 'master' of github.com:1dot13/source 2023-01-11 15:24:44 +08:00
zwwooooo 62029a8ea9 Chinese translation update(by TBS) 2023-01-11 14:31:08 +08:00
69 changed files with 3649 additions and 699 deletions
+18 -5
View File
@@ -190,22 +190,35 @@ jobs:
mkdir dist/
mv artifacts/*_release/* dist/
- name: Delete Latest
if: startsWith(github.ref, 'refs/tags/v') == false
- name: Delete Latest Release and Tag
if: github.ref == 'refs/heads/master'
uses: dev-drprasad/delete-tag-and-release@v1.0
with:
delete_release: true
tag_name: "latest"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout Repo
if: github.ref == 'refs/heads/master'
uses: actions/checkout@v3
with:
path: source
fetch-depth: 1
sparse-checkout: 'README.md'
- name: Create Latest Tag
if: github.ref == 'refs/heads/master'
working-directory: source
run: |
git tag -d latest || true
git tag latest
git push origin latest
- id: release_latest
name: Release Latest
if: startsWith(github.ref, 'refs/tags/v') == false
if: github.ref == 'refs/heads/master'
uses: ncipollo/release-action@v1
with:
allowUpdates: false
artifactErrorsFailBuild: true
artifacts: dist/*
draft: false
generateReleaseNotes: true
makeLatest: true
name: "Latest (unstable)"
+9 -6
View File
@@ -1079,6 +1079,9 @@ void LoadGameExternalOptions()
gGameExternalOptions.ubMercRandomExpRange = iniReader.ReadInteger("Recruitment Settings", "MERCS_RANDOM_EXP_RANGE", 1, 0, 4);
gGameExternalOptions.fMercRandomStartSalary = iniReader.ReadBoolean("Recruitment Settings", "MERCS_RANDOM_START_SALARY", FALSE);
gGameExternalOptions.ubMercRandomStartSalaryPercentMod = iniReader.ReadInteger("Recruitment Settings", "MERCS_RANDOM_START_SALARY_PERCENTAGE_MAX_MODIFIER", 30, 0, 100);
gGameExternalOptions.fMercGrowthModifiersEnabled = iniReader.ReadBoolean("Recruitment Settings", "MERCS_GROWTH_MODIFIERS_ENABLED", FALSE);
gGameExternalOptions.fMercRandomGrowthModifiers = iniReader.ReadBoolean("Recruitment Settings", "MERCS_RANDOM_GROWTH_MODIFIERS", FALSE);
gGameExternalOptions.iMercRandomGrowthModifiersRange = iniReader.ReadInteger("Recruitment Settings", "MERCS_RANDOM_GROWTH_MODIFIERS_RANGE", 5, -50, 50);
//################# Financial Settings #################
@@ -1147,7 +1150,9 @@ void LoadGameExternalOptions()
giTimerIntervals[ NEXTSCROLL ] = (INT16)(giTimerIntervals[ NEXTSCROLL ] / gGameExternalOptions.fScrollSpeedFactor);
gGameExternalOptions.gfUseExternalLoadscreens = iniReader.ReadBoolean("Graphics Settings","USE_EXTERNALIZED_LOADSCREENS", FALSE);
gGameExternalOptions.ubLoadscreenStretchMode = iniReader.ReadInteger("Graphics Settings", "LOADSCREEN_STRETCH_MODE", 0, 0, 2);
if (!is_networked)
gGameExternalOptions.gfUseLoadScreenHints = iniReader.ReadBoolean("Graphics Settings","USE_LOADSCREENHINTS", TRUE);
else
@@ -2480,8 +2485,6 @@ void LoadGameExternalOptions()
gGameExternalOptions.ubTeachBonusToTrain = iniReader.ReadInteger("Strategic Assignment Settings","TEACHER_TRAIT_BONUS_TO_TRAINING_EFFICIENCY",30, 0, 100);
gGameExternalOptions.ubMinSkillToTeach = iniReader.ReadInteger("Strategic Assignment Settings","MIN_SKILL_REQUIRED_TO_TEACH_OTHER",25, 0, 100);
gGameExternalOptions.bDisableEvolution = iniReader.ReadBoolean("Strategic Assignment Settings", "DISABLE_EVOLUTION", TRUE );
// HEADROCK HAM B2.8: New Trainer Relations: 2 = Trainees will go to sleep when their trainer goes to sleep. 3 = Trainer will go to sleep if all trainees are asleep. 1 = Both. 0 = Neither.
gGameExternalOptions.ubSmartTrainingSleep = iniReader.ReadInteger("Strategic Assignment Settings","SYNCHRONIZED_SLEEPING_HOURS_WHEN_TRAINING_TOGETHER", 0, 0, 3);
@@ -2784,6 +2787,9 @@ void LoadSkillTraitsExternalSettings()
gSkillTraitValues.ubTHBladesSilentCriticalHitChance = iniReader.ReadInteger("Throwing","TH_BLADES_SILENT_CRITICAL_HIT_CHANCE", 20, 0, 100);
gSkillTraitValues.ubTHBladesCriticalHitMultiplierBonus = iniReader.ReadInteger("Throwing","SILENT_CRITICAL_HIT_MULTIPLIER_BONUS", 1, 0, 50);
gSkillTraitValues.ubTHBladesAimClicksAdded = iniReader.ReadInteger("Throwing","POSSIBLE_AIM_CLICK_ADDED_TH_KNIVES", 1, 0, 5);
gSkillTraitValues.ubTHAPsNeededToThrowGrenadesReduction = iniReader.ReadInteger("Throwing","APS_NEEDED_TO_THROW_GRENADES_REDUCTION", 25, 0, 90);
gSkillTraitValues.ubTHMaxRangeToThrowGrenades = iniReader.ReadInteger("Throwing","MAX_RANGE_TO_THROW_GRENADES", 20, 0, 250);
gSkillTraitValues.ubTHCtHWhenThrowingGrenades = iniReader.ReadInteger("Throwing","CTH_WHEN_THROWING_GRENADES", 30, 0, 100);
// NIGHT OPS
gSkillTraitValues.ubNOeSightRangeBonusInDark = iniReader.ReadInteger("Night Ops","SIGHT_RANGE_BONUS_IN_DARK", 1, 0, 100);
@@ -2810,9 +2816,6 @@ void LoadSkillTraitsExternalSettings()
gSkillTraitValues.usBBIncreasedNeededDamageToFallDown = iniReader.ReadInteger("Bodybuilding","INCREASE_DAMAGE_NEEDED_TO_FALL_DOWN_IF_HIT_TO_LEGS", 100, 0, 500);
// DEMOLITIONS
gSkillTraitValues.ubDEAPsNeededToThrowGrenadesReduction = iniReader.ReadInteger("Demolitions","APS_NEEDED_TO_THROW_GRENADES_REDUCTION", 25, 0, 90);
gSkillTraitValues.ubDEMaxRangeToThrowGrenades = iniReader.ReadInteger("Demolitions","MAX_RANGE_TO_THROW_GRENADES", 20, 0, 250);
gSkillTraitValues.ubDECtHWhenThrowingGrenades = iniReader.ReadInteger("Demolitions","CTH_WHEN_THROWING_GRENADES", 30, 0, 100);
gSkillTraitValues.ubDEDamageOfBombsAndMines = iniReader.ReadInteger("Demolitions","DAMAGE_OF_PLACED_BOMBS_AND_MINES", 25, 0, 250);
gSkillTraitValues.ubDEAttachDetonatorCheckBonus = iniReader.ReadInteger("Demolitions","ATTACH_DETONATOR_CHECK_BONUS", 50, 0, 250);
gSkillTraitValues.ubDEPlantAndRemoveBombCheckBonus = iniReader.ReadInteger("Demolitions","PLANT_AND_REMOVE_BOMBS_AND_MINES_BONUS", 50, 0, 250);
+8 -6
View File
@@ -781,6 +781,7 @@ typedef struct
INT32 ubEnemiesItemDrop;
BOOLEAN gfUseExternalLoadscreens;
UINT32 ubLoadscreenStretchMode; // added by anv
BOOLEAN gfUseLoadScreenHints; // added by Flugente
UINT32 ubAdditionalDelayUntilLoadScreenDisposal; // added by WANNE to have time to read the load screen hints
@@ -816,9 +817,6 @@ typedef struct
INT32 ubRpcBonusToTrainMilitia;
INT32 ubMinSkillToTeach;
// Flugente: disable evolution setting in MercProfiles.xml
BOOLEAN bDisableEvolution;
INT32 ubLowActivityLevel;
INT32 ubMediumActivityLevel;
INT32 ubHighActivityLevel;
@@ -1440,6 +1438,10 @@ typedef struct
UINT8 ubMercRandomStartSalaryPercentMod;
BOOLEAN fMercGrowthModifiersEnabled;
BOOLEAN fMercRandomGrowthModifiers;
INT16 iMercRandomGrowthModifiersRange;
BOOLEAN fBobbyRayFastShipments;
BOOLEAN fGridExitInTurnBased;
@@ -2176,6 +2178,9 @@ typedef struct
UINT8 ubTHBladesSilentCriticalHitChance;
UINT8 ubTHBladesCriticalHitMultiplierBonus;
UINT8 ubTHBladesAimClicksAdded;
UINT8 ubTHAPsNeededToThrowGrenadesReduction;
UINT8 ubTHMaxRangeToThrowGrenades;
UINT8 ubTHCtHWhenThrowingGrenades;
// NIGHT OPS
UINT8 ubNOeSightRangeBonusInDark;
@@ -2202,9 +2207,6 @@ typedef struct
UINT16 usBBIncreasedNeededDamageToFallDown;
// DEMOLITIONS
UINT8 ubDEAPsNeededToThrowGrenadesReduction;
UINT8 ubDEMaxRangeToThrowGrenades;
UINT8 ubDECtHWhenThrowingGrenades;
UINT8 ubDEDamageOfBombsAndMines;
UINT8 ubDEAttachDetonatorCheckBonus;
UINT8 ubDEPlantAndRemoveBombCheckBonus;
+2 -1
View File
@@ -23,6 +23,7 @@ extern CHAR16 zBuildInformation[256];
// Keeps track of the saved game version. Increment the saved game version whenever
// you will invalidate the saved game file
#define GROWTH_MODIFIERS 184
#define REBELCOMMAND 183
#define DRAGSTRUCTURE 182 // Flugente: we can drag structures behind us
#define DISABILITYFLAGMASK 181 // Flugente: disabilities get a flagmask
@@ -104,7 +105,7 @@ extern CHAR16 zBuildInformation[256];
#define AP100_SAVEGAME_DATATYPE_CHANGE 105 // Before this, we didn't have the 100AP structure changes
#define NIV_SAVEGAME_DATATYPE_CHANGE 102 // Before this, we used the old structure system
#define SAVE_GAME_VERSION REBELCOMMAND
#define SAVE_GAME_VERSION GROWTH_MODIFIERS
//#define RUSSIANGOLD
#ifdef __cplusplus
+68 -87
View File
@@ -362,6 +362,29 @@ void GetHelpTextForItemInLaptop( STR16 pzStr, UINT16 usItemNumber );
void HandleBobbyRGunsKeyBoardInput();
void HandleBobbyRayMouseWheel(void);
// Appends source STR16 to target STR16 using decorators ("\n" and "...").
// Returns TRUE if everything fits target, FALSE otherwise.
static BOOLEAN DecorateAppendString(STR16 target, size_t targetCapacity, STR16 source, UINT32 frontDecoratorsCnt = 1)
{
const CHAR16 DECORATOR0[] = L"\n";
const CHAR16 DECORATOR1[] = L"\n...";
BOOLEAN result = FALSE;
size_t decoratorLen = wcslen(DECORATOR0) * frontDecoratorsCnt;
if (wcslen(target) + decoratorLen + wcslen(source) + 1 < targetCapacity)
{
for (UINT32 i = 0; i < frontDecoratorsCnt; i++)
wcscat(target, DECORATOR0);
wcscat(target, source);
result = TRUE;
}
else if (wcslen(target) + wcslen(DECORATOR1) + 1 < targetCapacity)
{
wcscat(target, DECORATOR1);
} // otherwise don't even touch the target
return result;
}
void GameInitBobbyRGuns()
{
guiTempCurrentMode=0;
@@ -4088,7 +4111,8 @@ void HandleBobbyRayMouseWheel(void)
}
void GetHelpTextForItemInLaptop( STR16 pzStr, UINT16 usItemNumber )
{
{
const size_t ATTACHMENTS_STRBUF_SIZE = 3800;
CHAR16 zItemName[ SIZE_ITEM_NAME ];
UINT8 ubItemCount=0;
@@ -4115,12 +4139,9 @@ void GetHelpTextForItemInLaptop( STR16 pzStr, UINT16 usItemNumber )
// HEADROCK HAM 3: Variables for "Possible Attachment List"
BOOLEAN fAttachmentsFound = FALSE;
// Contains entire string of attachment names
CHAR16 attachStr[3900];
// Contains current attachment string
CHAR16 attachStr2[100];
CHAR16 attachStr[ATTACHMENTS_STRBUF_SIZE];
// Contains temporary attachment list before added to string constant from text.h
CHAR16 attachStr3[3900];
UINT16 usAttachment;
CHAR16 attachStr3[ATTACHMENTS_STRBUF_SIZE];
CreateItem(usItemNumber, 100, &pObject);
INT16 ubAttackAPs = BaseAPsToShootOrStab( APBPConstants[DEFAULT_APS], APBPConstants[DEFAULT_AIMSKILL], &pObject, NULL );
@@ -4146,109 +4167,69 @@ void GetHelpTextForItemInLaptop( STR16 pzStr, UINT16 usItemNumber )
else
wcscat( apStr, L" / -" );
// HEADROCK HAM 3: Empty these strings first, to avoid crashes. Please keep this here.
swprintf( attachStr, L"" );
swprintf( attachStr2, L"" );
swprintf( attachStr3, L"" );
attachStr[0] = 0;
attachStr3[0] = 0;
// HEADROCK HAM 3: Generate list of possible attachments to a gun (Guns only!)
if (gGameExternalOptions.fBobbyRayTooltipsShowAttachments)
{
UINT16 iLoop = 0;
// Check entire attachment list
while( 1 )
if (UsingNewAttachmentSystem())
{
//Madd: Common Attachment Framework
//TODO: Note that the items in this list will be duplicated if they are present in both the CAF and the old attachment method
//need to refactor this to work more like the NAS attachment slots method
usAttachment = 0;
if ( IsAttachmentPointAvailable(Item[usItemNumber].uiIndex, iLoop) )
{
usAttachment = iLoop;
// If the attachment is not hidden
if (usAttachment > 0 && !Item[ usAttachment ].hiddenaddon && !Item[ usAttachment ].hiddenattachment)
{
if (wcslen( attachStr3 ) + wcslen(Item[usAttachment].szItemName) > 3800)
{
// End list early to avoid stack overflow
wcscat( attachStr3, L"\n..." );
break;
}
else
{// Add the attachment's name to the list.
fAttachmentsFound = TRUE;
swprintf( attachStr2, L"\n%s", Item[ usAttachment ].szItemName );
wcscat( attachStr3, attachStr2);
}
}
}
// Is the weapon we're checking the same as the one we're tooltipping?
usAttachment = 0;
if (Attachment[iLoop][1] == Item[usItemNumber].uiIndex)
std::pair<std::multimap<UINT16, AttachmentStruct>::iterator, std::multimap<UINT16, AttachmentStruct>::iterator> range;
std::multimap<UINT16, AttachmentStruct>::iterator it;
range = AttachmentBackmap.equal_range(Item[usItemNumber].uiIndex);
for (it = range.first; it != range.second; it++)
{
usAttachment = Attachment[iLoop][0];
}
// If the attachment is not hidden
if (usAttachment > 0 && !Item[ usAttachment ].hiddenaddon && !Item[ usAttachment ].hiddenattachment)
{
if (wcslen( attachStr3 ) + wcslen(Item[usAttachment].szItemName) > 3800)
UINT16 attachmentId = it->second.attachmentIndex;
if (!Item[attachmentId].hiddenaddon && !Item[attachmentId].hiddenattachment && ItemIsLegal(attachmentId, TRUE))
{
// End list early to avoid stack overflow
wcscat( attachStr3, L"\n..." );
break;
}
else
{// Add the attachment's name to the list.
fAttachmentsFound = TRUE;
swprintf( attachStr2, L"\n%s", Item[ usAttachment ].szItemName );
wcscat( attachStr3, attachStr2);
if (DecorateAppendString(attachStr3, ATTACHMENTS_STRBUF_SIZE, Item[attachmentId].szItemName) == FALSE)
break;
}
}
iLoop++;
if (Attachment[iLoop][0] == 0 && Item[iLoop].usItemClass == 0)
{
// Reached end of list
break;
}
}
else // old attachment system
{
for (UINT32 itemId = 1; itemId < gMAXITEMS_READ; itemId++)
{
// If the attachment is not hidden and attachable to the gun (usItemNumber)
if (!Item[itemId].hiddenaddon && !Item[itemId].hiddenattachment &&
ItemIsLegal(itemId, TRUE) && IsAttachmentPointAvailable(Item[usItemNumber].uiIndex, itemId))
{
fAttachmentsFound = TRUE;
if (DecorateAppendString(attachStr3, ATTACHMENTS_STRBUF_SIZE, Item[itemId].szItemName) == FALSE)
break;
}
}
}
if (fAttachmentsFound)
{
// Add extra empty line and attachment list title
swprintf( attachStr, L"\n \n%s", gWeaponStatsDesc[ 14 ] );
wcscat( attachStr, attachStr3 );
DecorateAppendString(attachStr, ATTACHMENTS_STRBUF_SIZE, gWeaponStatsDesc[14], 2); // 2 new lines and "Attachments:" title
DecorateAppendString(attachStr, ATTACHMENTS_STRBUF_SIZE, attachStr3, 0); // no new line, list of attachments (starts with new line)
}
}
//Sum up default attachments.
BOOLEAN fFoundDefault = FALSE;
swprintf( attachStr2, L"" );
swprintf( attachStr3, L"" );
for(UINT8 cnt = 0; cnt < MAX_DEFAULT_ATTACHMENTS; cnt++){
if(Item[usItemNumber].defaultattachments[cnt] != 0){
if (wcslen( attachStr ) + wcslen(attachStr3) + wcslen(Item[ Item[usItemNumber].defaultattachments[cnt] ].szItemName) > 3800)
{
// End list early to avoid stack overflow
wcscat( attachStr3, L"\n..." );
attachStr3[0] = 0;
for (UINT8 cnt = 0; cnt < MAX_DEFAULT_ATTACHMENTS; cnt++)
{
if (Item[usItemNumber].defaultattachments[cnt] != 0)
{
if (DecorateAppendString(attachStr3, ATTACHMENTS_STRBUF_SIZE, Item[Item[usItemNumber].defaultattachments[cnt]].szItemName) == FALSE)
break;
}
fFoundDefault = TRUE;
swprintf( attachStr2, L"\n%s", Item[ Item[usItemNumber].defaultattachments[cnt] ].szItemName );
wcscat( attachStr3, attachStr2 );
} else {
//If we found an empty entry, we can assume the rest will be empty too.
break;
}
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 );
if (fFoundDefault)
{
DecorateAppendString(attachStr, ATTACHMENTS_STRBUF_SIZE, gWeaponStatsDesc[17], 2); // 2 new lines and "Default:" title
DecorateAppendString(attachStr, ATTACHMENTS_STRBUF_SIZE, attachStr3, 0); // no new line, list of attachments (starts with new line)
}
// HEADROCK HAM 3: Added last string (attachStr), for display of the possible attachment list.
+5 -3
View File
@@ -15,6 +15,8 @@
#include "CharProfile.h"
#include "soldier profile type.h"
#include "IMP Compile Character.h"
#include "IMP Disability Trait.h"
#include "IMP Character Trait.h"
#include "GameSettings.h"
#include "Interface.h"
@@ -671,7 +673,7 @@ BOOLEAN IsBackGroundAllowed( UINT16 ubNumber )
return FALSE;
}
switch ( iPersonality )
switch ( iChosenDisabilityTrait() )
{
case HEAT_INTOLERANT:
if ( zBackground[ ubNumber ].value[BG_DESERT] > 0 )
@@ -707,7 +709,7 @@ BOOLEAN IsBackGroundAllowed( UINT16 ubNumber )
break;
}
switch ( iAttitude )
switch ( iChosenCharacterTrait() )
{
case CHAR_TRAIT_SOCIABLE:
if ( zBackground[ ubNumber ].uiFlags & BACKGROUND_XENOPHOBIC )
@@ -807,4 +809,4 @@ void BtnIMPBackgroundPreviousCallback(GUI_BUTTON *btn,INT32 reason)
usBackground = 0;
}
}
}
}
+204 -30
View File
@@ -2170,7 +2170,7 @@ void DisplayCharPersonality(INT32 iId, INT32 iSlot)
for ( int i = APPROACH_FRIENDLY; i <= APPROACH_RECRUIT; ++i )
{
mprintf( (INT16)(pPersonnelScreenPoints[loc].x + (iSlot*TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + 15), szLaptopStatText[7 + i] );
mprintf( (INT16)(pPersonnelScreenPoints[loc].x + (iSlot*TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + 15), szLaptopStatText[LAPTOP_STAT_TEXT_FRIENDLY_APPROACH-1 + i] ); // APPROACH_FRIENDLY is 1 so fix the offset
CHAR16 sStr[200];
swprintf( sStr, L"" );
@@ -2180,7 +2180,7 @@ void DisplayCharPersonality(INT32 iId, INT32 iSlot)
swprintf( sStr, L"%d", val );
FindFontRightCoordinates( (INT16)(pPersonnelScreenPoints[loc].x + (iSlot*TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH - 20, 0, sStr, PERS_FONT, &sX, &sY );
FindFontRightCoordinates( (INT16)(pPersonnelScreenPoints[loc].x + (iSlot*TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH, 0, sStr, PERS_FONT, &sX, &sY );
mprintf( sX, (pPersonnelScreenPoints[loc].y + 15), sStr );
// Add specific region for fast help window
@@ -2205,10 +2205,10 @@ void DisplayCharPersonality(INT32 iId, INT32 iSlot)
if ( (gMercProfiles[pSoldier->ubProfile].ubMiscFlags3 & PROFILE_MISC_FLAG3_GOODGUY) )
{
CHAR16 sStr1[200];
swprintf( sStr1, szLaptopStatText[6] );
swprintf( sStr1, szLaptopStatText[LAPTOP_STAT_TEXT_GOOD_GUY] );
CHAR16 sStr2[200];
swprintf( sStr2, szLaptopStatText[7], pSoldier->GetName( ) );
swprintf( sStr2, szLaptopStatText[LAPTOP_STAT_TEXT_REFUSES_TO_ATTACK_NON_HOSTILES], pSoldier->GetName( ) );
sX = pPersonnelScreenPoints[loc].x + (iSlot*TEXT_BOX_WIDTH);
@@ -2233,15 +2233,189 @@ void DisplayCharPersonality(INT32 iId, INT32 iSlot)
++region;
}
if ( !gGameExternalOptions.bDisableEvolution )
if (gGameExternalOptions.fMercGrowthModifiersEnabled)
{
CHAR16 sStr2[200];
swprintf( sStr2, szLaptopStatText[12 + gMercProfiles[pSoldier->ubProfile].bEvolution], pSoldier->GetName() );
if (gMercProfiles[pSoldier->ubProfile].fRegresses)
{
CHAR16 sStr2[200];
swprintf(sStr2, szLaptopStatText[LAPTOP_STAT_TEXT_MERC_REGRESSES]);
mprintf( (INT16)( pPersonnelScreenPoints[loc].x + ( iSlot*TEXT_BOX_WIDTH ) ), ( pPersonnelScreenPoints[loc].y + 15 ), sStr2 );
mprintf((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + 15), sStr2);
++loc;
++region;
++loc;
++region;
}
else
{
const int THRESHOLD_FAST = -3; // this value and below: "fast"
const int THRESHOLD_SLOW = 3; // this value and above: "slow"
int yOffset = 15;
CHAR16 statTxt[200];
// health
{
swprintf(statTxt, szLaptopStatText[LAPTOP_STAT_TEXT_HEALTH_SPEED]);
mprintf((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierLife <= THRESHOLD_FAST)
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_FAST]);
else if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierLife >= THRESHOLD_SLOW)
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_SLOW]);
else
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_AVERAGE]);
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH, 0, statTxt, PERS_FONT, &sX, &sY);
mprintf(sX, (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
yOffset += 10;
}
// strength
{
swprintf(statTxt, szLaptopStatText[LAPTOP_STAT_TEXT_STRENGTH_SPEED]);
mprintf((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierStrength <= THRESHOLD_FAST)
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_FAST]);
else if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierStrength >= THRESHOLD_SLOW)
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_SLOW]);
else
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_AVERAGE]);
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH, 0, statTxt, PERS_FONT, &sX, &sY);
mprintf(sX, (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
yOffset += 10;
}
// agility
{
swprintf(statTxt, szLaptopStatText[LAPTOP_STAT_TEXT_AGILITY_SPEED]);
mprintf((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierAgility <= THRESHOLD_FAST)
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_FAST]);
else if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierAgility >= THRESHOLD_SLOW)
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_SLOW]);
else
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_AVERAGE]);
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH, 0, statTxt, PERS_FONT, &sX, &sY);
mprintf(sX, (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
yOffset += 10;
}
// dexterity
{
swprintf(statTxt, szLaptopStatText[LAPTOP_STAT_TEXT_DEXTERITY_SPEED]);
mprintf((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierDexterity <= THRESHOLD_FAST)
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_FAST]);
else if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierDexterity >= THRESHOLD_SLOW)
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_SLOW]);
else
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_AVERAGE]);
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH, 0, statTxt, PERS_FONT, &sX, &sY);
mprintf(sX, (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
yOffset += 10;
}
// wisdom
{
swprintf(statTxt, szLaptopStatText[LAPTOP_STAT_TEXT_WISDOM_SPEED]);
mprintf((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierWisdom <= THRESHOLD_FAST)
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_FAST]);
else if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierWisdom >= THRESHOLD_SLOW)
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_SLOW]);
else
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_AVERAGE]);
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH, 0, statTxt, PERS_FONT, &sX, &sY);
mprintf(sX, (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
yOffset += 10;
}
// marksmanship
{
swprintf(statTxt, szLaptopStatText[LAPTOP_STAT_TEXT_MARKSMANSHIP_SPEED]);
mprintf((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierMarksmanship <= THRESHOLD_FAST)
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_FAST]);
else if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierMarksmanship >= THRESHOLD_SLOW)
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_SLOW]);
else
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_AVERAGE]);
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH, 0, statTxt, PERS_FONT, &sX, &sY);
mprintf(sX, (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
yOffset += 10;
}
// explosives
{
swprintf(statTxt, szLaptopStatText[LAPTOP_STAT_TEXT_EXPLOSIVES_SPEED]);
mprintf((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierExplosive <= THRESHOLD_FAST)
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_FAST]);
else if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierExplosive >= THRESHOLD_SLOW)
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_SLOW]);
else
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_AVERAGE]);
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH, 0, statTxt, PERS_FONT, &sX, &sY);
mprintf(sX, (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
yOffset += 10;
}
// leadership
{
swprintf(statTxt, szLaptopStatText[LAPTOP_STAT_TEXT_LEADERSHIP_SPEED]);
mprintf((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierLeadership <= THRESHOLD_FAST)
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_FAST]);
else if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierLeadership >= THRESHOLD_SLOW)
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_SLOW]);
else
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_AVERAGE]);
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH, 0, statTxt, PERS_FONT, &sX, &sY);
mprintf(sX, (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
yOffset += 10;
}
// medical
{
swprintf(statTxt, szLaptopStatText[LAPTOP_STAT_TEXT_MEDICAL_SPEED]);
mprintf((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierMedical <= THRESHOLD_FAST)
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_FAST]);
else if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierMedical >= THRESHOLD_SLOW)
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_SLOW]);
else
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_AVERAGE]);
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH, 0, statTxt, PERS_FONT, &sX, &sY);
mprintf(sX, (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
yOffset += 10;
}
// mechanical
{
swprintf(statTxt, szLaptopStatText[LAPTOP_STAT_TEXT_MECHANICAL_SPEED]);
mprintf((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierMechanical <= THRESHOLD_FAST)
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_FAST]);
else if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierMechanical >= THRESHOLD_SLOW)
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_SLOW]);
else
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_AVERAGE]);
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH, 0, statTxt, PERS_FONT, &sX, &sY);
mprintf(sX, (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
yOffset += 10;
}
// exp level
{
swprintf(statTxt, szLaptopStatText[LAPTOP_STAT_TEXT_EXPERIENCE_SPEED]);
mprintf((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierExpLevel <= THRESHOLD_FAST)
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_FAST]);
else if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierExpLevel >= THRESHOLD_SLOW)
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_SLOW]);
else
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_AVERAGE]);
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH, 0, statTxt, PERS_FONT, &sX, &sY);
mprintf(sX, (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
}
}
}
}
@@ -7991,6 +8165,21 @@ void AssignPersonnelSkillTraitHelpText( UINT8 ubTraitNumber, BOOLEAN fExpertLeve
wcscat( apStr, atStr );
}
if( gSkillTraitValues.ubTHAPsNeededToThrowGrenadesReduction != 0 )
{
swprintf( atStr, gzIMPMinorTraitsHelpTextsThrowing[10], gSkillTraitValues.ubTHAPsNeededToThrowGrenadesReduction, sSpecialCharacters[0]);
wcscat( apStr, atStr );
}
if( gSkillTraitValues.ubTHMaxRangeToThrowGrenades != 0 )
{
swprintf( atStr, gzIMPMinorTraitsHelpTextsThrowing[11], gSkillTraitValues.ubTHMaxRangeToThrowGrenades, sSpecialCharacters[0]);
wcscat( apStr, atStr );
}
if( gSkillTraitValues.ubTHCtHWhenThrowingGrenades != 0 )
{
swprintf( atStr, gzIMPMinorTraitsHelpTextsThrowing[12], gSkillTraitValues.ubTHCtHWhenThrowingGrenades, sSpecialCharacters[0]);
wcscat( apStr, atStr );
}
break;
}
case NIGHT_OPS_NT:
@@ -8096,44 +8285,29 @@ void AssignPersonnelSkillTraitHelpText( UINT8 ubTraitNumber, BOOLEAN fExpertLeve
case DEMOLITIONS_NT:
{
swprintf( apStr, L"" );
if( gSkillTraitValues.ubDEAPsNeededToThrowGrenadesReduction != 0 )
{
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[0], gSkillTraitValues.ubDEAPsNeededToThrowGrenadesReduction, sSpecialCharacters[0]);
wcscat( apStr, atStr );
}
if( gSkillTraitValues.ubDEMaxRangeToThrowGrenades != 0 )
{
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[1], gSkillTraitValues.ubDEMaxRangeToThrowGrenades, sSpecialCharacters[0]);
wcscat( apStr, atStr );
}
if( gSkillTraitValues.ubDECtHWhenThrowingGrenades != 0 )
{
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[2], gSkillTraitValues.ubDECtHWhenThrowingGrenades, sSpecialCharacters[0]);
wcscat( apStr, atStr );
}
if( gSkillTraitValues.ubDEDamageOfBombsAndMines != 0 )
{
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[3], gSkillTraitValues.ubDEDamageOfBombsAndMines, sSpecialCharacters[0]);
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[0], gSkillTraitValues.ubDEDamageOfBombsAndMines, sSpecialCharacters[0]);
wcscat( apStr, atStr );
}
if( gSkillTraitValues.ubDEAttachDetonatorCheckBonus != 0 )
{
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[4], gSkillTraitValues.ubDEAttachDetonatorCheckBonus, sSpecialCharacters[0]);
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[1], gSkillTraitValues.ubDEAttachDetonatorCheckBonus, sSpecialCharacters[0]);
wcscat( apStr, atStr );
}
if( gSkillTraitValues.ubDEPlantAndRemoveBombCheckBonus != 0 )
{
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[5], gSkillTraitValues.ubDEPlantAndRemoveBombCheckBonus, sSpecialCharacters[0]);
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[2], gSkillTraitValues.ubDEPlantAndRemoveBombCheckBonus, sSpecialCharacters[0]);
wcscat( apStr, atStr );
}
if( gSkillTraitValues.ubDEPlacedBombLevelBonus != 0 )
{
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[6], gSkillTraitValues.ubDEPlacedBombLevelBonus);
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[3], gSkillTraitValues.ubDEPlacedBombLevelBonus);
wcscat( apStr, atStr );
}
if( gSkillTraitValues.ubDEShapedChargeDamageMultiplier != 0 )
{
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[7], gSkillTraitValues.ubDEShapedChargeDamageMultiplier);
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[4], gSkillTraitValues.ubDEShapedChargeDamageMultiplier);
wcscat( apStr, atStr );
}
break;
+94 -33
View File
@@ -23,6 +23,7 @@ extern BOOLEAN gfSchedulesHosed;
#include "Ja25 Strategic Ai.h"
#endif
UINT8 gubLastLoadingScreenID = LOADINGSCREEN_NOTHING;
FLOAT fLoadingScreenAspectRatio;
//BOOLEAN bShowSmallImage = FALSE;
SECTOR_LOADSCREENS gSectorLoadscreens[MAX_SECTOR_LOADSCREENS];
@@ -343,6 +344,62 @@ static void BuildLoadscreenFilename(std::string& dst, const char* path, int reso
dst.append(".sti");
}
std::string GetResolutionSuffix(SCREEN_RESOLUTION resolution)
{
switch (resolution)
{
case _960x540: return "_960x540";
case _800x600: return "_800x600";
case _1024x600: return "_1024x600";
case _1280x720: return "_1280x720";
case _1024x768: return "_1024x768";
case _1280x768: return "_1280x768";
case _1360x768: return "_1360x768";
case _1366x768: return "_1366x768";
case _1280x800: return "_1280x800";
case _1440x900: return "_1440x900";
case _1600x900: return "_1600x900";
case _1280x960: return "_1280x960";
case _1440x960: return "_1440x960";
case _1770x1000: return "_1770x1000";
case _1280x1024: return "_1280x1024";
case _1360x1024: return "_1360x1024";
case _1600x1024: return "_1600x1024";
case _1440x1050: return "_1440x1050";
case _1680x1050: return "_1680x1050";
case _1920x1080: return "_1920x1080";
case _1600x1200: return "_1600x1200";
case _1920x1200: return "_1920x1200";
case _2560x1440: return "_2560x1440";
case _2560x1600: return "_2560x1600";
default: return "";
}
}
std::string FindBestFittingLoadscreenFilename(const std::string& baseName, SCREEN_RESOLUTION resolution)
{
for (SCREEN_RESOLUTION res = resolution; res <= _2560x1600; res = (SCREEN_RESOLUTION)(res + 1))
{
std::string fileName = baseName + GetResolutionSuffix(res);
if (FileExists((CHAR8*)((fileName + ".png").c_str())))
{
return fileName + ".png";
}
if (FileExists((CHAR8*)((fileName + ".sti").c_str())))
{
return fileName + ".sti";
}
}
if (FileExists((CHAR8*)((baseName + ".png").c_str())))
{
return baseName + ".png";
}
return baseName + ".sti";
}
//sets up the loadscreen with specified ID, and draws it to the FRAME_BUFFER,
//and refreshing the screen with it.
void DisplayLoadScreenWithID( UINT8 ubLoadScreenID )
@@ -420,27 +477,8 @@ void DisplayLoadScreenWithID( UINT8 ubLoadScreenID )
}
}
std::string strImage;
BuildLoadscreenFilename(strImage, imagePath.c_str(), 0, imageFormat.c_str());
strImage.copy(vs_desc.ImageFile, sizeof(vs_desc.ImageFile)-1);
if ( !FileExists(vs_desc.ImageFile) )
{
std::string strImage;
BuildLoadscreenFilename(strImage, imagePath.c_str(), 0, "png");
strImage.copy(vs_desc.ImageFile, sizeof(vs_desc.ImageFile) - 1);
if (!FileExists(vs_desc.ImageFile))
{
std::string strImage("LOADSCREENS\\");
BuildLoadscreenFilename(strImage, LoadScreenNames[1], 0, imageFormat.c_str());
strImage.copy(vs_desc.ImageFile, sizeof(vs_desc.ImageFile) - 1);
}
}
std::string strImage = FindBestFittingLoadscreenFilename(imagePath, (SCREEN_RESOLUTION)iResolution);
strImage.copy(vs_desc.ImageFile, sizeof(vs_desc.ImageFile) - 1);
}
else
{
@@ -475,18 +513,41 @@ void DisplayLoadScreenWithID( UINT8 ubLoadScreenID )
//Blit the background image
GetVideoSurface(&hVSurface, uiLoadScreen);
// Stretch the background image
SrcRect.iLeft = 0;
SrcRect.iTop = 0;
SrcRect.iRight = hVSurface->usWidth;
SrcRect.iBottom = hVSurface->usHeight;
DstRect.iLeft = 0;
DstRect.iTop = 0;
DstRect.iRight = SCREEN_WIDTH;
DstRect.iBottom = SCREEN_HEIGHT;
fLoadingScreenAspectRatio = (FLOAT)hVSurface->usWidth / (FLOAT)hVSurface->usHeight;
FLOAT fScreenAspectRatio = (FLOAT)SCREEN_WIDTH / (FLOAT)SCREEN_HEIGHT;
if (gGameExternalOptions.ubLoadscreenStretchMode == 1 ||
(gGameExternalOptions.ubLoadscreenStretchMode == 2 && fLoadingScreenAspectRatio > fScreenAspectRatio))
{
// match height, preserve aspect ratio
INT32 iCalculatedWidth = (INT32)(SCREEN_HEIGHT * fLoadingScreenAspectRatio + 0.5f);
SrcRect.iLeft = 0;
SrcRect.iTop = 0;
SrcRect.iRight = hVSurface->usWidth;
SrcRect.iBottom = hVSurface->usHeight;
DstRect.iLeft = (SCREEN_WIDTH - iCalculatedWidth) / 2;
DstRect.iTop = 0;
DstRect.iRight = SCREEN_WIDTH - ((SCREEN_WIDTH - iCalculatedWidth) / 2);
DstRect.iBottom = SCREEN_HEIGHT;
}
else
{
// vanilla (stretch to fit)
// Stretch the background image
SrcRect.iLeft = 0;
SrcRect.iTop = 0;
SrcRect.iRight = hVSurface->usWidth;
SrcRect.iBottom = hVSurface->usHeight;
DstRect.iLeft = 0;
DstRect.iTop = 0;
DstRect.iRight = SCREEN_WIDTH;
DstRect.iBottom = SCREEN_HEIGHT;
}
BltStretchVideoSurface( FRAME_BUFFER, uiLoadScreen, 0, 0, 0, &SrcRect, &DstRect );
DeleteVideoSurfaceFromIndex( uiLoadScreen );
+2
View File
@@ -84,6 +84,8 @@ enum
//For use by the game loader, before it can possibly know the situation.
extern UINT8 gubLastLoadingScreenID;
extern FLOAT fLoadingScreenAspectRatio;
//returns the UINT8 ID for the specified sector.
UINT8 GetLoadScreenID( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ );
+3
View File
@@ -855,6 +855,9 @@ void RenderMainMenu()
DrawTextToScreen( L"BLOCKFONTNARROW: ÄÀÁÂÇËÈÉÊÏÖÒÓÔÜÙÚÛäàáâçëèéêïöòóôüùúûÌÎìî"/*gzCopyrightText[ 0 ]*/, 0, 445, 640, BLOCKFONTNARROW, FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen( L"FONT14HUMANIST: ÄÀÁÂÇËÈÉÊÏÖÒÓÔÜÙÚÛäàáâçëèéêïöòóôüùúûÌÎìî"/*gzCopyrightText[ 0 ]*/, 0, 465, 640, FONT14HUMANIST, FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
#else
CHAR16 text[128];
swprintf(text, L"%s: %s %S %s", pMessageStrings[ MSG_VERSION ], zProductLabel, czVersionString, zBuildInformation );
DrawTextToScreen( text, 10, 10, SCREEN_WIDTH, TINYFONT1, FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen( gzCopyrightText[ 0 ], 0, SCREEN_HEIGHT - 20, SCREEN_WIDTH, FONT10ARIAL, FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
#endif
+129 -10
View File
@@ -1294,7 +1294,16 @@ BOOLEAN MERCPROFILESTRUCT::Load(HWFILE hFile, bool forceLoadOldVersion, bool for
numBytesRead = ReadFieldByField( hFile, &this->bSex, sizeof(this->bSex), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField( hFile, &this->bArmourAttractiveness, sizeof(this->bArmourAttractiveness), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField( hFile, &this->ubMiscFlags2, sizeof(this->ubMiscFlags2), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField( hFile, &this->bEvolution, sizeof(this->bEvolution), sizeof(INT8), numBytesRead);
if (guiCurrentSaveGameVersion < GROWTH_MODIFIERS)
{
numBytesRead = ReadFieldByField( hFile, &this->fRegresses, sizeof(this->fRegresses), sizeof(INT8), numBytesRead);
// convert old evolution to regresses boolean
this->fRegresses = this->fRegresses == 2 ? TRUE : FALSE; // 2 == CharacterEvolution::DEVOLVES
}
else
{
numBytesRead = ReadFieldByField( hFile, &this->fRegresses, sizeof(this->fRegresses), sizeof(INT8), numBytesRead);
}
numBytesRead = ReadFieldByField( hFile, &this->ubMiscFlags, sizeof(this->ubMiscFlags), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField( hFile, &this->bSexist, sizeof(this->bSexist), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField( hFile, &this->bLearnToHate, sizeof(this->bLearnToHate), sizeof(UINT8), numBytesRead);
@@ -1637,6 +1646,70 @@ BOOLEAN MERCPROFILESTRUCT::Load(HWFILE hFile, bool forceLoadOldVersion, bool for
return( FALSE );
}
}
// rftr: growth modifiers
if (guiCurrentSaveGameVersion >= GROWTH_MODIFIERS)
{
if (!FileRead(hFile, &this->bGrowthModifierLife, sizeof(INT8), &uiNumBytesRead))
{
return(FALSE);
}
if ( !FileRead( hFile, &this->bGrowthModifierStrength, sizeof(INT8), &uiNumBytesRead) )
{
return( FALSE );
}
if ( !FileRead( hFile, &this->bGrowthModifierAgility, sizeof(INT8), &uiNumBytesRead) )
{
return( FALSE );
}
if ( !FileRead( hFile, &this->bGrowthModifierDexterity, sizeof(INT8), &uiNumBytesRead) )
{
return( FALSE );
}
if ( !FileRead( hFile, &this->bGrowthModifierWisdom, sizeof(INT8), &uiNumBytesRead) )
{
return( FALSE );
}
if ( !FileRead( hFile, &this->bGrowthModifierMarksmanship, sizeof(INT8), &uiNumBytesRead) )
{
return( FALSE );
}
if ( !FileRead( hFile, &this->bGrowthModifierExplosive, sizeof(INT8), &uiNumBytesRead) )
{
return( FALSE );
}
if ( !FileRead( hFile, &this->bGrowthModifierLeadership, sizeof(INT8), &uiNumBytesRead) )
{
return( FALSE );
}
if ( !FileRead( hFile, &this->bGrowthModifierMedical, sizeof(INT8), &uiNumBytesRead) )
{
return( FALSE );
}
if ( !FileRead( hFile, &this->bGrowthModifierMechanical, sizeof(INT8), &uiNumBytesRead) )
{
return( FALSE );
}
if ( !FileRead( hFile, &this->bGrowthModifierExpLevel, sizeof(INT8), &uiNumBytesRead) )
{
return( FALSE );
}
}
else
{
// zero out growth modifiers for upgrading savegames
this->bGrowthModifierLife = 0;
this->bGrowthModifierStrength = 0;
this->bGrowthModifierAgility = 0;
this->bGrowthModifierDexterity = 0;
this->bGrowthModifierWisdom = 0;
this->bGrowthModifierMarksmanship = 0;
this->bGrowthModifierExplosive = 0;
this->bGrowthModifierLeadership = 0;
this->bGrowthModifierMedical = 0;
this->bGrowthModifierMechanical = 0;
this->bGrowthModifierExpLevel = 0;
}
}
if ( this->uiProfileChecksum != this->GetChecksum() )
@@ -1753,6 +1826,52 @@ BOOLEAN MERCPROFILESTRUCT::Save(HWFILE hFile)
{
return( FALSE );
}
// rftr: growth modifiers
if (!FileWrite(hFile, &this->bGrowthModifierLife, sizeof(INT8), &uiNumBytesWritten))
{
return(FALSE);
}
if ( !FileWrite( hFile, &this->bGrowthModifierStrength, sizeof(INT8), &uiNumBytesWritten) )
{
return( FALSE );
}
if ( !FileWrite( hFile, &this->bGrowthModifierAgility, sizeof(INT8), &uiNumBytesWritten) )
{
return( FALSE );
}
if ( !FileWrite( hFile, &this->bGrowthModifierDexterity, sizeof(INT8), &uiNumBytesWritten) )
{
return( FALSE );
}
if ( !FileWrite( hFile, &this->bGrowthModifierWisdom, sizeof(INT8), &uiNumBytesWritten) )
{
return( FALSE );
}
if ( !FileWrite( hFile, &this->bGrowthModifierMarksmanship, sizeof(INT8), &uiNumBytesWritten) )
{
return( FALSE );
}
if ( !FileWrite( hFile, &this->bGrowthModifierExplosive, sizeof(INT8), &uiNumBytesWritten) )
{
return( FALSE );
}
if ( !FileWrite( hFile, &this->bGrowthModifierLeadership, sizeof(INT8), &uiNumBytesWritten) )
{
return( FALSE );
}
if ( !FileWrite( hFile, &this->bGrowthModifierMedical, sizeof(INT8), &uiNumBytesWritten) )
{
return( FALSE );
}
if ( !FileWrite( hFile, &this->bGrowthModifierMechanical, sizeof(INT8), &uiNumBytesWritten) )
{
return( FALSE );
}
if ( !FileWrite( hFile, &this->bGrowthModifierExpLevel, sizeof(INT8), &uiNumBytesWritten) )
{
return( FALSE );
}
return TRUE;
}
@@ -6694,15 +6813,6 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
//Reset the Ai Timer clock
giRTAILastUpdateTime = 0;
//if we are in tactical
if( guiScreenToGotoAfterLoadingSavedGame == GAME_SCREEN )
{
//Initialize the current panel
InitializeCurrentPanel( );
SelectSoldier( gusSelectedSoldier, FALSE, TRUE );
}
uiRelEndPerc += 1;
SetRelativeStartAndEndPercentage( 0, uiRelStartPerc, uiRelEndPerc, L"Final Checks..." );
RenderProgressBar( 0, 100 );
@@ -6831,6 +6941,15 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
RemoveLoadingScreenProgressBar();
//if we are in tactical
if (guiScreenToGotoAfterLoadingSavedGame == GAME_SCREEN)
{
//Initialize the current panel
InitializeCurrentPanel();
SelectSoldier(gusSelectedSoldier, FALSE, TRUE);
}
// sevenfm: reset sound map
ResetSoundMap();
+2 -2
View File
@@ -681,7 +681,7 @@ UINT32 AutoResolveScreenHandle()
SGPRect ClipRect;
gpAR->fEnteringAutoResolve = FALSE;
//Take the framebuffer, shade it, and save it to the SAVEBUFFER.
ClipRect.iLeft = 0 + xResOffset;
ClipRect.iLeft = 0;
ClipRect.iTop = 0;
/*ClipRect.iRight = 640;
ClipRect.iBottom = 480;*/
@@ -692,7 +692,7 @@ UINT32 AutoResolveScreenHandle()
Blt16BPPBufferShadowRect( (UINT16*)pDestBuf, uiDestPitchBYTES, &ClipRect );
UnLockVideoSurface( FRAME_BUFFER );
//BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, 640, 480 );
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0 + xResOffset, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
KillPreBattleInterface();
CalculateAutoResolveInfo();
CalculateSoldierCells( FALSE );
+1 -1
View File
@@ -1936,7 +1936,7 @@ BOOLEAN AllowedToExitFromMapscreenTo( INT8 bExitToWhere )
}
// battle about to occur?
if( ( fDisableDueToBattleRoster ) || ( fDisableMapInterfaceDueToBattle ) )
if( ( fDisableDueToBattleRoster ) || ( fDisableMapInterfaceDueToBattle ) || ( gfPreBattleInterfaceActive ))
{
return( FALSE );
}
+6 -1
View File
@@ -1792,11 +1792,16 @@ void InitializeMilitiaPopup(void)
const UINT16 xVal = 330 + xResOffset;
const UINT16 yVal = 25 + yResOffset;
if (isWidescreenUI() || iResolution >= _1024x768)
if (iResolution >= _1024x768)
{
MAP_MILITIA_BOX_POS_X = xVal + 190;
MAP_MILITIA_BOX_POS_Y = yVal + 285;
}
else if (isWidescreenUI())
{
MAP_MILITIA_BOX_POS_X = xVal + 190;
MAP_MILITIA_BOX_POS_Y = yVal + 116;
}
else if (iResolution >= _800x600)
{
MAP_MILITIA_BOX_POS_X = xVal + 77;
+34 -8
View File
@@ -4582,6 +4582,28 @@ void HandleSettingTheSelectedListOfMercs( void )
INT8 pbErrorNumber = -1;
pSoldier = MercPtrs[gCharactersList[GetSelectedDestChar()].usSolID];
INT8 bSquadValue = pSoldier->bAssignment;
if (bSquadValue == VEHICLE)
{
for (INT8 bCounter = 0; bCounter < NUMBER_OF_SQUADS; ++bCounter)
{
if (Squad[bCounter][0] != NULL && IsVehicle(Squad[bCounter][0]) &&
Squad[bCounter][0]->bVehicleID == pSoldier->iVehicleId)
{
bSquadValue = bCounter;
break;
}
}
}
if (bSquadValue >= NUMBER_OF_SQUADS)
{
if (pbErrorNumber != -1)
{
ReportMapScreenMovementError(pbErrorNumber);
}
SetSelectedDestChar(-1);
giDestHighLine = -1;
return;
}
// find number of characters in particular squad.
for (INT8 bCounter = 0; bCounter < NUMBER_OF_SOLDIERS_PER_SQUAD; ++bCounter)
@@ -4693,17 +4715,21 @@ INT8 FindSquadThatSoldierCanJoin( SOLDIERTYPE *pSoldier )
// run through the list of squads
for( bCounter = 0; bCounter < NUMBER_OF_SQUADS; bCounter++ )
{
// is this squad in this sector
if( IsThisSquadInThisSector( pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ, bCounter ) )
// anv: don't automatically put people in vehicle squads
if (Squad[bCounter][0] == NULL || !IsVehicle(Squad[bCounter][0]))
{
// does it have room?
if( IsThisSquadFull( bCounter ) == FALSE )
// is this squad in this sector
if (IsThisSquadInThisSector(pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ, bCounter))
{
// is it doing the same thing as the soldier is (staying or going) ?
if( IsSquadSelectedForMovement( bCounter ) == IsSoldierSelectedForMovement( pSoldier ) )
// does it have room?
if (IsThisSquadFull(bCounter) == FALSE)
{
// go ourselves a match, then
return( bCounter );
// is it doing the same thing as the soldier is (staying or going) ?
if (IsSquadSelectedForMovement(bCounter) == IsSoldierSelectedForMovement(pSoldier))
{
// go ourselves a match, then
return(bCounter);
}
}
}
}
+197 -127
View File
@@ -48,6 +48,7 @@
#include "militiasquads.h" // added by Flugente
#include "SkillCheck.h" // added by Flugente
#include "Strategic Transport Groups.h"
#include "Utilities.h"
#ifdef JA2UB
#include "ub_config.h"
@@ -99,13 +100,23 @@ enum //GraphicIDs for the panel
#define ROW_HEIGHT 10
//The start of the black space
#define TOP_Y 113
#define TOP_Y_TEXT_BUFFER 1
//The end of the black space
//#define BOTTOM_Y (349+(OUR_TEAM_SIZE_NO_VEHICLE-18)*ROW_HEIGHT)
#define BOTTOM_Y 349
#define BOTTOM_HEIGHT 8
//The internal height of the uninvolved panel
#define INTERNAL_HEIGHT 27
//The actual height of the uninvolved panel
#define ACTUAL_HEIGHT 24
#define UNINVOLVED_RELEVANT_HEIGHT 28
#define UNINVOLVED_OFFSET_HEIGHT 7
#define PREBATTLE_INTERFACE_WIDTH 261
INT32 iPrebattleInterfaceHeight = 360;
UINT16 xOffset;
UINT16 yOffset;
UINT16 blanketStartX;
UINT16 blanketStartY;
INT16 bListOffset = 0;
UINT16 ubDesiredListHeight = 0;
UINT16 ubAllowedListHeight = 0;
BOOLEAN gfDisplayPotentialRetreatPaths = FALSE;
UINT16 gusRetreatButtonLeft, gusRetreatButtonTop, gusRetreatButtonRight, gusRetreatButtonBottom;
@@ -300,6 +311,8 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI )
gAmbushRadiusModifier = 0.0f;
bListOffset = 0;
// ARM: Feb01/98 - Cancel out of mapscreen movement plotting if PBI subscreen is coming up
if ( ( GetSelectedDestChar() != -1) || fPlotForHelicopter || fPlotForMilitia )
{
@@ -481,32 +494,69 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI )
fMapScreenBottomDirty = TRUE;
ChangeSelectedMapSector( gubPBSectorX, gubPBSectorY, gubPBSectorZ );
// Headrock: Added FALSE argument, We might need TRUE but not sure. Will need to initiate battle :)
RenderMapScreenInterfaceBottom( FALSE );
if( !fShowTeamFlag )
{
ToggleShowTeamsMode();
}
//Define the blanket region to cover all of the other regions used underneath the panel.
MSYS_DefineRegion( &PBInterfaceBlanket, 0 + xResOffset, 0 + yResOffset, 261 + xResOffset, 359 + yResOffset, MSYS_PRIORITY_HIGHEST - 5, 0, 0, 0 );
//Create the panel
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
GetMLGFilename( VObjectDesc.ImageFile, MLG_PREBATTLEPANEL );
// anv: prebattle interface per vertical resolution
if (isWidescreenUI())
{
GetMLGFilename(VObjectDesc.ImageFile, MLG_PREBATTLEPANEL_1280x720);
iPrebattleInterfaceHeight = 600;
xOffset = xResOffset + 15;
yOffset = 0;
blanketStartX = 0;
blanketStartY = 0;
}
else if (iResolution >= _640x480 && iResolution < _800x600)
{
GetMLGFilename(VObjectDesc.ImageFile, MLG_PREBATTLEPANEL);
iPrebattleInterfaceHeight = 360;
xOffset = xResOffset;
yOffset = yResOffset;
blanketStartX = yOffset;
blanketStartY = yOffset;
}
else if (iResolution < _1024x768)
{
GetMLGFilename(VObjectDesc.ImageFile, MLG_PREBATTLEPANEL_800x600);
iPrebattleInterfaceHeight = 478;
xOffset = xResOffset;
yOffset = yResOffset;
blanketStartX = yOffset;
blanketStartY = yOffset;
}
else
{
GetMLGFilename(VObjectDesc.ImageFile, MLG_PREBATTLEPANEL_1024x768);
iPrebattleInterfaceHeight = 647;
xOffset = xResOffset;
yOffset = yResOffset;
blanketStartX = yOffset;
blanketStartY = yOffset;
}
ubAllowedListHeight = iPrebattleInterfaceHeight - TOP_Y - BOTTOM_HEIGHT;
if( !AddVideoObject( &VObjectDesc, &uiInterfaceImages ) )
AssertMsg( 0, "Failed to load interface\\PreBattlePanel.sti" );
//Define the blanket region to cover all of the other regions used underneath the panel.
MSYS_DefineRegion( &PBInterfaceBlanket, blanketStartX, blanketStartY, PREBATTLE_INTERFACE_WIDTH + xOffset, iPrebattleInterfaceHeight + yOffset, MSYS_PRIORITY_HIGHEST, 0, 0, 0 );
//Create the 3 buttons
iPBButtonImage[0] = LoadButtonImage( "INTERFACE\\PreBattleButton.sti", -1, 0, -1, 1, -1 );
if( iPBButtonImage[ 0 ] == -1 )
AssertMsg( 0, "Failed to load interface\\PreBattleButton.sti" );
iPBButtonImage[1] = UseLoadedButtonImage( iPBButtonImage[ 0 ], -1, 0, -1, 1, -1 );
iPBButtonImage[2] = UseLoadedButtonImage( iPBButtonImage[ 0 ], -1, 0, -1, 1, -1 );
iPBButton[0] = QuickCreateButton( iPBButtonImage[0], 27 + xResOffset, 54 + yResOffset, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGHEST - 2, DEFAULT_MOVE_CALLBACK, AutoResolveBattleCallback );
iPBButton[1] = QuickCreateButton( iPBButtonImage[1], 98 + xResOffset, 54 + yResOffset, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGHEST - 2, DEFAULT_MOVE_CALLBACK, GoToSectorCallback );
iPBButton[2] = QuickCreateButton( iPBButtonImage[2], 169 + xResOffset, 54 + yResOffset, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGHEST - 2, DEFAULT_MOVE_CALLBACK, RetreatMercsCallback );
iPBButton[0] = QuickCreateButton( iPBButtonImage[0], 27 + xOffset, 54 + yOffset, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGHEST, DEFAULT_MOVE_CALLBACK, AutoResolveBattleCallback );
iPBButton[1] = QuickCreateButton( iPBButtonImage[1], 98 + xOffset, 54 + yOffset, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGHEST, DEFAULT_MOVE_CALLBACK, GoToSectorCallback );
iPBButton[2] = QuickCreateButton( iPBButtonImage[2], 169 + xOffset, 54 + yOffset, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGHEST, DEFAULT_MOVE_CALLBACK, RetreatMercsCallback );
SpecifyGeneralButtonTextAttributes( iPBButton[0], gpStrategicString[ STR_PB_AUTORESOLVE_BTN ], BLOCKFONT, FONT_BEIGE, 141 );
SpecifyGeneralButtonTextAttributes( iPBButton[1], gpStrategicString[ STR_PB_GOTOSECTOR_BTN ], BLOCKFONT, FONT_BEIGE, 141 );
@@ -1050,7 +1100,7 @@ void DoTransitionFromMapscreenToPreBattleInterface()
INT32 iPercentage, iFactor;
UINT32 uiTimeRange;
INT16 sStartLeft, sEndLeft, sStartTop, sEndTop;
INT32 iLeft, iTop, iWidth, iHeight;
INT32 iLeft, iTop, iWidth;
BOOLEAN fEnterAutoResolveMode = FALSE;
if( !gfExtraBuffer )
@@ -1058,12 +1108,11 @@ void DoTransitionFromMapscreenToPreBattleInterface()
PauseTime( FALSE );
PBIRect.iLeft = 0 + xResOffset;
PBIRect.iTop = 0 + yResOffset;
PBIRect.iRight = 261 + xResOffset;
PBIRect.iBottom = 359 + yResOffset;
iWidth = 261;
iHeight = 359;
PBIRect.iLeft = 0 + xOffset;
PBIRect.iTop = 0 + yOffset;
PBIRect.iRight = PREBATTLE_INTERFACE_WIDTH + xOffset;
PBIRect.iBottom = iPrebattleInterfaceHeight + yOffset;
iWidth = PREBATTLE_INTERFACE_WIDTH;
uiTimeRange = 1000;
iPercentage = 0;
@@ -1072,8 +1121,8 @@ void DoTransitionFromMapscreenToPreBattleInterface()
GetScreenXYFromMapXY( gubPBSectorX, gubPBSectorY, &sStartLeft, &sStartTop );
sStartLeft += UI_MAP.GridSize.iX / 2;
sStartTop += UI_MAP.GridSize.iY / 2;
sEndLeft = 131 + xResOffset;
sEndTop = 180 + yResOffset;
sEndLeft = PBIRect.iLeft;
sEndTop = PBIRect.iTop;
//save the mapscreen buffer
BlitBufferToBuffer( FRAME_BUFFER, guiEXTRABUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
@@ -1095,17 +1144,23 @@ void DoTransitionFromMapscreenToPreBattleInterface()
gfEnterAutoResolveMode = TRUE;
}
BlitBufferToBuffer( guiSAVEBUFFER, FRAME_BUFFER, 27 + xResOffset, 54 + yResOffset, 209, 32 );
BlitBufferToBuffer( guiSAVEBUFFER, FRAME_BUFFER, 27 + xOffset, 54 + yOffset, 209, 32 );
RenderButtons();
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 27 + xResOffset, 54 + yResOffset, 209, 32 );
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 27 + xOffset, 54 + yOffset, 209, 32 );
gfRenderPBInterface = TRUE;
//hide the prebattle interface
BlitBufferToBuffer( guiEXTRABUFFER, FRAME_BUFFER, 0 + xResOffset, 0 + yResOffset, 261 + xResOffset, 359 + yResOffset );
BlitBufferToBuffer( guiEXTRABUFFER, FRAME_BUFFER, 0 + xOffset, 0 + yOffset, PREBATTLE_INTERFACE_WIDTH + xOffset, iPrebattleInterfaceHeight + yOffset );
PlayJA2SampleFromFile( "SOUNDS\\Laptop power up (8-11).wav", RATE_11025, HIGHVOLUME, 1, MIDDLEPAN );
InvalidateScreen();
RefreshScreen( NULL );
SGPRect PrevRect;
PrevRect.iLeft = sStartLeft;
PrevRect.iRight = sStartLeft + 1;
PrevRect.iTop = sStartTop;
PrevRect.iBottom = sStartTop + 1;
while( iPercentage < 100 )
{
uiCurrTime = GetJA2Clock();
@@ -1117,19 +1172,12 @@ void DoTransitionFromMapscreenToPreBattleInterface()
if( iPercentage < 50 )
iPercentage = (UINT32)(iPercentage + iPercentage * iFactor * 0.01 + 0.5);
else
iPercentage = (UINT32)(iPercentage + (100-iPercentage) * iFactor * 0.01 + 0.05);
iPercentage = (UINT32)(iPercentage + (100 - iPercentage) * iFactor * 0.01 + 0.05);
//Calculate the center point.
iLeft = sStartLeft - (sStartLeft-sEndLeft+1) * iPercentage / 100;
if( sStartTop > sEndTop )
iTop = sStartTop - (sStartTop-sEndTop+1) * iPercentage / 100;
else
iTop = sStartTop + (sEndTop-sStartTop+1) * iPercentage / 100;
DstRect.iLeft = iLeft - iWidth * iPercentage / 200;
DstRect.iLeft = sStartLeft + (sEndLeft - sStartLeft) * iPercentage / 100;
DstRect.iRight = DstRect.iLeft + max( iWidth * iPercentage / 100, 1 );
DstRect.iTop = iTop - iHeight * iPercentage / 200;
DstRect.iBottom = DstRect.iTop + max( iHeight * iPercentage / 100, 1 );
DstRect.iTop = sStartTop + (sEndTop - sStartTop) * iPercentage / 100;
DstRect.iBottom = DstRect.iTop + max(iPrebattleInterfaceHeight * iPercentage / 100, 1);
BltStretchVideoSurface( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, 0, &PBIRect, &DstRect );
@@ -1137,14 +1185,35 @@ void DoTransitionFromMapscreenToPreBattleInterface()
RefreshScreen( NULL );
//Restore the previous rect.
BlitBufferToBuffer( guiEXTRABUFFER, FRAME_BUFFER, (UINT16)DstRect.iLeft, (UINT16)DstRect.iTop,
(UINT16)(DstRect.iRight-DstRect.iLeft+1), (UINT16)(DstRect.iBottom-DstRect.iTop+1) );
BlitBufferToBuffer(guiEXTRABUFFER, FRAME_BUFFER, (UINT16)PrevRect.iLeft, (UINT16)PrevRect.iTop,
(UINT16)PrevRect.iRight, (UINT16)PrevRect.iBottom);
PrevRect.iLeft = DstRect.iLeft;
PrevRect.iRight = DstRect.iRight;
PrevRect.iTop = DstRect.iTop;
PrevRect.iBottom = DstRect.iBottom;
}
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
gfZoomDone = TRUE;
}
void ScrollPreBattleInterface( BOOLEAN fUp )
{
if ( ubDesiredListHeight <= ubAllowedListHeight )
return;
if ( fUp )
{
bListOffset = max( 0, bListOffset - ubAllowedListHeight );
}
else
{
bListOffset = min( bListOffset + ubAllowedListHeight, ubDesiredListHeight - ubAllowedListHeight );
}
gfRenderPBInterface = TRUE;
}
void KillPreBattleInterface()
{
if( !gfPreBattleInterfaceActive )
@@ -1184,7 +1253,7 @@ void KillPreBattleInterface()
//Enable the options button when the auto resolve screen comes up
EnableDisAbleMapScreenOptionsButton( TRUE );
ColorFillVideoSurfaceArea( guiSAVEBUFFER, 0, 0, 261 + xResOffset, 359 + yResOffset, 0 );
ColorFillVideoSurfaceArea( guiSAVEBUFFER, 0, 0, PREBATTLE_INTERFACE_WIDTH + xOffset, iPrebattleInterfaceHeight + yOffset, 0 );
EnableTeamInfoPanels();
if( ButtonList[ giMapContractButton ] )
@@ -1277,8 +1346,8 @@ void RenderPBHeader( INT32 *piX, INT32 *piWidth)
}
width = StringPixLength( str, FONT10ARIALBOLD );
x = 130 - width / 2;
mprintf( x + xResOffset, 4 + yResOffset, str );
InvalidateRegion( 0, 0, 231 + xResOffset, 12 + yResOffset );
mprintf( x + xOffset, 4 + yOffset, str );
InvalidateRegion( 0, 0, 231 + xOffset, 12 + yOffset );
*piX = x;
*piWidth = width;
}
@@ -1293,10 +1362,15 @@ void RenderPreBattleInterface()
UINT8 ubHPPercent, ubBPPercent;
BOOLEAN fMouseInRetreatButtonArea;
UINT8 ubJunk;
SGPRect ClipRect;
UINT16 ubDesiredParticipantsListHeight = 0;
UINT16 ubDesiredUninvolvedListHeight = 0;
UINT16 ubUninvolvedStartY = 0;
//PLAYERGROUP *pPlayer;
// Make the background black!
//ColorFillVideoSurfaceArea( guiSAVEBUFFER, 0, 0, 261 + xResOffset, SCREEN_HEIGHT - 120, 0 );
//ColorFillVideoSurfaceArea( guiSAVEBUFFER, 0, 0, 261 + xOffset, SCREEN_HEIGHT - 120, 0 );
//This code determines if the cursor is inside the rectangle consisting of the
//retreat button. If it is inside, then we set up the variables so that the retreat
@@ -1337,33 +1411,21 @@ void RenderPreBattleInterface()
gfRenderPBInterface = FALSE;
GetVideoObject( &hVObject, uiInterfaceImages );
//main panel
BltVideoObject( guiSAVEBUFFER, hVObject, MAINPANEL, xResOffset, yResOffset, VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObject( guiSAVEBUFFER, hVObject, MAINPANEL, xOffset, yOffset, VO_BLT_SRCTRANSPARENCY, NULL );
//main title
RenderPBHeader( &x, &width );
//now draw the title bars up to the text.
for( i = x - 12; i > 20; i -= 10 )
{
BltVideoObject( guiSAVEBUFFER, hVObject, TITLE_BAR_PIECE, i + xResOffset, 6 + yResOffset, VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObject( guiSAVEBUFFER, hVObject, TITLE_BAR_PIECE, i + xOffset, 6 + yOffset, VO_BLT_SRCTRANSPARENCY, NULL );
}
for( i = x + width + 2; i < 231; i += 10 )
{
BltVideoObject( guiSAVEBUFFER, hVObject, TITLE_BAR_PIECE, i + xResOffset, 6 + yResOffset, VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObject( guiSAVEBUFFER, hVObject, TITLE_BAR_PIECE, i + xOffset, 6 + yOffset, VO_BLT_SRCTRANSPARENCY, NULL );
}
BltVideoObject(guiSAVEBUFFER, hVObject, BOTTOM_LINE, 0 + xResOffset, BOTTOM_Y + yResOffset, VO_BLT_SRCTRANSPARENCY, NULL);
BltVideoObject(guiSAVEBUFFER, hVObject, BOTTOM_LINE, 0 + xResOffset, BOTTOM_Y + yResOffset + 10, VO_BLT_SRCTRANSPARENCY, NULL);
BltVideoObject(guiSAVEBUFFER, hVObject, BOTTOM_LINE, 0 + xResOffset, BOTTOM_Y + yResOffset + 20, VO_BLT_SRCTRANSPARENCY, NULL);
BltVideoObject(guiSAVEBUFFER, hVObject, BOTTOM_LINE, 0 + xResOffset, BOTTOM_Y + yResOffset + 30, VO_BLT_SRCTRANSPARENCY, NULL);
//Draw the bottom edges
for (i = 0; i < max(guiNumUninvolved, 1); i++)
{
y = BOTTOM_Y + ROW_HEIGHT * (i + 1) + 30;
BltVideoObject(guiSAVEBUFFER, hVObject, BOTTOM_LINE, 0 + xResOffset, y + yResOffset, VO_BLT_SRCTRANSPARENCY, NULL);
}
BltVideoObject(guiSAVEBUFFER, hVObject, UNINVOLVED_HEADER, 8 + xResOffset, BOTTOM_Y + yResOffset, VO_BLT_SRCTRANSPARENCY, NULL);
BltVideoObject(guiSAVEBUFFER, hVObject, BOTTOM_END, 0 + xResOffset, BOTTOM_Y + yResOffset + 35 + ROW_HEIGHT * max(guiNumUninvolved, 1), VO_BLT_SRCTRANSPARENCY, NULL);
// header
SetFont( BLOCKFONT );
SetFontForeground( FONT_BEIGE );
swprintf( str, gpStrategicString[ STR_PB_LOCATION ] );
@@ -1373,7 +1435,7 @@ void RenderPreBattleInterface()
SetFont( BLOCKFONTNARROW );
width = StringPixLength( str, BLOCKFONTNARROW );
}
mprintf( 65 - width + xResOffset , 17 + yResOffset, str );
mprintf( 65 - width + xOffset , 17 + yOffset, str );
SetFont( BLOCKFONT );
if( GetEnemyEncounterCode() == CREATURE_ATTACK_CODE )
@@ -1405,7 +1467,7 @@ void RenderPreBattleInterface()
SetFont( BLOCKFONTNARROW );
width = StringPixLength( str, BLOCKFONTNARROW );
}
mprintf( 54 + xResOffset - width , 38 + yResOffset, str );
mprintf( 54 + xOffset - width , 38 + yOffset, str );
SetFont( BLOCKFONT );
swprintf( str, gpStrategicString[ STR_PB_MERCS ] );
@@ -1415,7 +1477,7 @@ void RenderPreBattleInterface()
SetFont( BLOCKFONTNARROW );
width = StringPixLength( str, BLOCKFONTNARROW );
}
mprintf( 139 + xResOffset - width , 38 + yResOffset, str );
mprintf( 139 + xOffset - width , 38 + yOffset, str );
SetFont( BLOCKFONT );
swprintf( str, gpStrategicString[ STR_PB_MILITIA ] );
@@ -1425,29 +1487,53 @@ void RenderPreBattleInterface()
SetFont( BLOCKFONTNARROW );
width = StringPixLength( str, BLOCKFONTNARROW );
}
mprintf( 224 + xResOffset - width , 38 + yResOffset, str );
mprintf( 224 + xOffset - width , 38 + yOffset, str );
//Draw the bottom columns
for( i = 0; i < (INT32)max( guiNumUninvolved, 1 ); i++ )
ubDesiredParticipantsListHeight = guiNumInvolved * ROW_HEIGHT;
ubDesiredUninvolvedListHeight = UNINVOLVED_RELEVANT_HEIGHT + max(guiNumUninvolved, 1) * ROW_HEIGHT;
ubDesiredListHeight = ubDesiredParticipantsListHeight + ubDesiredUninvolvedListHeight;
if (ubDesiredListHeight >= ubAllowedListHeight)
{
y = BOTTOM_Y + ROW_HEIGHT * (i+1) + 1 + ACTUAL_HEIGHT;
BltVideoObject( guiSAVEBUFFER, hVObject, BOTTOM_COLUMN, 161 + xResOffset, y + yResOffset, VO_BLT_SRCTRANSPARENCY, NULL );
ubUninvolvedStartY = ubDesiredParticipantsListHeight;
}
else
{
ubUninvolvedStartY = ubAllowedListHeight - ubDesiredUninvolvedListHeight;
}
// WDS - make number of mercenaries, etc. be configurable
for( i = 0; i < (INT32)(25/*3+ OUR_TEAM_SIZE_NO_VEHICLE - max( guiNumUninvolved, 1 )*/); i++ )
ClipRect.iLeft = xOffset;
ClipRect.iTop = yOffset + TOP_Y;
ClipRect.iRight = xOffset + PREBATTLE_INTERFACE_WIDTH;
ClipRect.iBottom = yOffset + TOP_Y + ubAllowedListHeight;// + TOP_Y_BUFFER;
SetClippingRect(&ClipRect);
// Draw the top columns
// Draw from the top to uninvolved header
for ( y = TOP_Y - bListOffset; y < TOP_Y - bListOffset + ubUninvolvedStartY; y += ROW_HEIGHT )
{
y = TOP_Y + ROW_HEIGHT * i;
BltVideoObject( guiSAVEBUFFER, hVObject, TOP_COLUMN, 186 + xResOffset, y + yResOffset, VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObject(guiSAVEBUFFER, hVObject, TOP_COLUMN, 186 + xOffset, y + yOffset, VO_BLT_CLIP | VO_BLT_SRCTRANSPARENCY, NULL);
}
// Draw extra empty participants rows to close off bottom of the content area
for ( y = TOP_Y - bListOffset + ubUninvolvedStartY + ROW_HEIGHT; y < TOP_Y - bListOffset + ubUninvolvedStartY + ubDesiredUninvolvedListHeight; y += ROW_HEIGHT )
{
BltVideoObject(guiSAVEBUFFER, hVObject, BOTTOM_COLUMN, 161 + xOffset, y + yOffset, VO_BLT_CLIP | VO_BLT_SRCTRANSPARENCY, NULL);
}
// Draw uninvolved header
BltVideoObject( guiSAVEBUFFER, hVObject, UNINVOLVED_HEADER, 8 + xOffset, yOffset + TOP_Y + ubUninvolvedStartY - UNINVOLVED_OFFSET_HEIGHT - bListOffset, VO_BLT_CLIP | VO_BLT_SRCTRANSPARENCY, NULL );
RestoreClipRegionToFullScreen();
//location
SetFont( FONT10ARIAL );
SetFontForeground( FONT_YELLOW );
SetFontShadow( FONT_NEARBLACK );
GetSectorIDString( gubPBSectorX, gubPBSectorY, gubPBSectorZ, pSectorName, TRUE );
mprintf( 70 + xResOffset, 17 + yResOffset, L"%s %s", gpStrategicString[ STR_PB_SECTOR ], pSectorName );
mprintf( 70 + xOffset, 17 + yOffset, L"%s %s", gpStrategicString[STR_PB_SECTOR], pSectorName );
//enemy
SetFont( FONT14ARIAL );
@@ -1472,58 +1558,55 @@ void RenderPreBattleInterface()
}
x = 57 + (27 - StringPixLength( str, FONT14ARIAL )) / 2;
y = 36;
mprintf( x + xResOffset, y + yResOffset, str );
mprintf( x + xOffset, y + yOffset, str );
//player
swprintf( str, L"%d", guiNumInvolved );
x = 142 + (27 - StringPixLength( str, FONT14ARIAL )) / 2;
mprintf( x + xResOffset, y + yResOffset, str );
mprintf( x + xOffset, y + yOffset, str );
//militia
swprintf( str, L"%d", NumNonPlayerTeamMembersInSector( gubPBSectorX, gubPBSectorY, MILITIA_TEAM ) );
x = 227 + (27 - StringPixLength( str, FONT14ARIAL )) / 2;
mprintf( x + xResOffset, y + yResOffset, str );
mprintf( x + xOffset, y + yOffset, str );
SetFontShadow( FONT_NEARBLACK );
SetFont( BLOCKFONT2 );
SetFontForeground( FONT_YELLOW );
SetFontDestBuffer( guiSAVEBUFFER, xOffset, yOffset + TOP_Y,
xOffset + PREBATTLE_INTERFACE_WIDTH, yOffset + TOP_Y + ubAllowedListHeight, FALSE );
//print out the participants of the battle.
// | NAME | ASSIGN | COND | HP | BP |
line = 0;
y = TOP_Y + 1;
for( i = gTacticalStatus.Team[ OUR_TEAM ].bFirstID; i <= gTacticalStatus.Team[ OUR_TEAM ].bLastID; i++ )
y = TOP_Y + TOP_Y_TEXT_BUFFER - bListOffset;
for( i = gTacticalStatus.Team[OUR_TEAM].bFirstID; i <= gTacticalStatus.Team[OUR_TEAM].bLastID; i++)
{
if( MercPtrs[ i ]->bActive && MercPtrs[ i ]->stats.bLife && !(MercPtrs[ i ]->flags.uiStatusFlags & SOLDIER_VEHICLE) )
if( MercPtrs[i]->bActive && MercPtrs[i]->stats.bLife && !(MercPtrs[i]->flags.uiStatusFlags & SOLDIER_VEHICLE) )
{
if ( PlayerMercInvolvedInThisCombat( MercPtrs[ i ] ) )
{ //involved
if( line == giHilitedInvolved )
SetFontForeground( FONT_WHITE );
else
SetFontForeground( FONT_YELLOW );
if( PlayerMercInvolvedInThisCombat( MercPtrs[ i ] ) )
{
//NAME
wcscpy( str, MercPtrs[ i ]->name );
x = 17 + (52-StringPixLength( str, BLOCKFONT2)) / 2;
mprintf( x + xResOffset , y + yResOffset, str );
x = 17 + (52 - StringPixLength(str, BLOCKFONT2)) / 2;
mprintf( x + xOffset, y + yOffset, str );
//ASSIGN
GetMapscreenMercAssignmentString( MercPtrs[ i ], str );
x = 72 + (54-StringPixLength( str, BLOCKFONT2)) / 2;
mprintf( x + xResOffset, y + yResOffset, str );
x = 72 + (54 - StringPixLength(str, BLOCKFONT2)) / 2;
mprintf( x + xOffset, y + yOffset, str );
//COND
GetSoldierConditionInfo( MercPtrs[ i ], str, &ubHPPercent, &ubBPPercent );
x = 129 + (58-StringPixLength( str, BLOCKFONT2)) / 2;
mprintf( x + xResOffset, y + yResOffset, str );
x = 129 + (58 - StringPixLength(str, BLOCKFONT2)) / 2;
mprintf( x + xOffset, y + yOffset, str );
//HP
swprintf( str, L"%d%%", ubHPPercent );
x = 189 + (25-StringPixLength( str, BLOCKFONT2)) / 2;
x = 189 + (25 - StringPixLength(str, BLOCKFONT2)) / 2;
wcscat( str, sSpecialCharacters[0] );
mprintf( x + xResOffset, y + yResOffset, str );
mprintf( x + xOffset, y + yOffset, str );
//BP
swprintf( str, L"%d%%", ubBPPercent );
x = 217 + (25-StringPixLength( str, BLOCKFONT2)) / 2;
wcscat( str, sSpecialCharacters[0] );
mprintf( x + xResOffset, y + yResOffset, str );
line++;
mprintf( x + xOffset, y + yOffset, str );
y += ROW_HEIGHT;
}
}
@@ -1533,51 +1616,44 @@ void RenderPreBattleInterface()
// | NAME | ASSIGN | LOC | DEST | DEP |
if( !guiNumUninvolved )
{
SetFontForeground( FONT_YELLOW );
wcscpy( str, gpStrategicString[ STR_PB_NONE ] );
x = 17 + (52-StringPixLength( str, BLOCKFONT2)) / 2;
y = BOTTOM_Y + ROW_HEIGHT + 2 + ACTUAL_HEIGHT;
mprintf( x + xResOffset, y + yResOffset, str );
x = 17 + (52 - StringPixLength( str, BLOCKFONT2)) / 2;
mprintf( x + xOffset, yOffset + TOP_Y + TOP_Y_TEXT_BUFFER + ubUninvolvedStartY + UNINVOLVED_RELEVANT_HEIGHT - bListOffset, str );
}
else
{
pGroup = gpGroupList;
y = BOTTOM_Y + ROW_HEIGHT + 2 + ACTUAL_HEIGHT;
for( i = gTacticalStatus.Team[ OUR_TEAM ].bFirstID; i <= gTacticalStatus.Team[ OUR_TEAM ].bLastID; i++ )
y = TOP_Y + TOP_Y_TEXT_BUFFER + ubUninvolvedStartY + UNINVOLVED_RELEVANT_HEIGHT - bListOffset;
for( i = gTacticalStatus.Team[OUR_TEAM].bFirstID; i <= gTacticalStatus.Team[OUR_TEAM].bLastID; i++ )
{
if( MercPtrs[ i ]->bActive && MercPtrs[ i ]->stats.bLife && !(MercPtrs[ i ]->flags.uiStatusFlags & SOLDIER_VEHICLE) )
{
if ( !PlayerMercInvolvedInThisCombat( MercPtrs[ i ] ) )
if( !PlayerMercInvolvedInThisCombat(MercPtrs[ i ]) )
{
// uninvolved
if( line == giHilitedUninvolved )
SetFontForeground( FONT_WHITE );
else
SetFontForeground( FONT_YELLOW );
//NAME
wcscpy( str, MercPtrs[ i ]->name );
x = 17 + (52-StringPixLength( str, BLOCKFONT2)) / 2;
mprintf( x + xResOffset, y + yResOffset, str );
x = 17 + (52 - StringPixLength(str, BLOCKFONT2)) / 2;
mprintf( x + xOffset, y + yOffset, str );
//ASSIGN
GetMapscreenMercAssignmentString( MercPtrs[ i ], str );
x = 72 + (54-StringPixLength( str, BLOCKFONT2)) / 2;
mprintf( x + xResOffset, y + yResOffset, str );
x = 72 + (54 - StringPixLength(str, BLOCKFONT2)) / 2;
mprintf( x + xOffset, y + yOffset, str );
//LOC
GetMapscreenMercLocationString( MercPtrs[ i ], str );
x = 128 + (33-StringPixLength( str, BLOCKFONT2)) / 2;
mprintf( x + xResOffset, y + yResOffset, str );
x = 128 + (33 - StringPixLength(str, BLOCKFONT2)) / 2;
mprintf( x + xOffset, y + yOffset, str );
//DEST
GetMapscreenMercDestinationString( MercPtrs[ i ], str );
if( wcslen( str ) > 0 )
if (wcslen(str) > 0)
{
x = 164 + (41-StringPixLength( str, BLOCKFONT2)) / 2;
mprintf( x + xResOffset, y + yResOffset, str );
x = 164 + (41 - StringPixLength(str, BLOCKFONT2)) / 2;
mprintf( x + xOffset, y + yOffset, str );
}
//DEP
GetMapscreenMercDepartureString( MercPtrs[ i ], str, &ubJunk );
x = 208 + (34-StringPixLength( str, BLOCKFONT2)) / 2;
mprintf( x + xResOffset, y + yResOffset, str );
line++;
x = 208 + (34 - StringPixLength(str, BLOCKFONT2)) / 2;
mprintf(x + xOffset, y + yOffset, str);
y += ROW_HEIGHT;
}
}
@@ -1587,12 +1663,7 @@ void RenderPreBattleInterface()
// mark any and ALL pop up boxes as altered
MarkAllBoxesAsAltered( );
if(!gfZoomDone)
RestoreExternBackgroundRect( 0 + xResOffset, 0 + yResOffset, 261 + xResOffset, 359 + yResOffset );
else if(!guiNumUninvolved)
RestoreExternBackgroundRect( 0 + xResOffset, 0 + yResOffset, 261 + xResOffset, 389 + yResOffset );
else
RestoreExternBackgroundRect( 0 + xResOffset, 0 + yResOffset, 261 + xResOffset, y + yResOffset );
RestoreExternBackgroundRect( 0 + xOffset, 0 + yOffset, PREBATTLE_INTERFACE_WIDTH, iPrebattleInterfaceHeight );
// restore font destinanation buffer to the frame buffer
SetFontDestBuffer( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
@@ -1602,7 +1673,7 @@ void RenderPreBattleInterface()
RenderPBHeader( &x, &width ); //the text is important enough to blink.
}
//InvalidateRegion( 0, 0, 261, 359 );
InvalidateRegion( 0, 0, PREBATTLE_INTERFACE_WIDTH, iPrebattleInterfaceHeight );
if( gfEnterAutoResolveMode )
{
gfEnterAutoResolveMode = FALSE;
@@ -1611,7 +1682,6 @@ void RenderPreBattleInterface()
}
gfIgnoreAllInput = FALSE;
}
void AutoResolveBattleCallback( GUI_BUTTON *btn, INT32 reason )
+1
View File
@@ -7,6 +7,7 @@
void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI );
void KillPreBattleInterface();
void RenderPreBattleInterface();
void ScrollPreBattleInterface( BOOLEAN fUp );
extern BOOLEAN gfPreBattleInterfaceActive;
extern BOOLEAN gfDisplayPotentialRetreatPaths;
+2 -1
View File
@@ -4429,7 +4429,8 @@ void SetupInfo()
&& (gGameOptions.ubGameStyle == STYLE_SCIFI || !Item[i].scifi))
{
// coolness runs from 1-10, so apply offset
ItemIdCache::ammo[Item[i].ubCoolness-1].push_back(i);
const UINT8 coolness = min(max(1, Item[i].ubCoolness), 10);
ItemIdCache::ammo[coolness-1].push_back(i);
}
}
}
+22 -22
View File
@@ -1951,33 +1951,33 @@ void GroupArrivedAtSector( UINT8 ubGroupID, BOOLEAN fCheckForBattle, BOOLEAN fNe
SectorInfo[SECTOR( pGroup->ubSectorX, pGroup->ubSectorY )].bLastKnownEnemies = NumNonPlayerTeamMembersInSector( pGroup->ubSectorX, pGroup->ubSectorY, ENEMY_TEAM );
}
// award life 'experience' for travelling, based on travel time!
if ( !pGroup->fVehicle )
// Flugente: do not award experience gain if we never left
if (!fNeverLeft)
{
// Flugente: do not award experience gain if we never left
if ( !fNeverLeft )
// award life 'experience' for travelling, based on travel time!
if (!pGroup->fVehicle)
{
// gotta be walking to get tougher
AwardExperienceForTravelling( pGroup );
AwardExperienceForTravelling(pGroup);
}
}
else if( !IsGroupTheHelicopterGroup( pGroup ) )
{
SOLDIERTYPE *pSoldier;
INT32 iVehicleID;
iVehicleID = GivenMvtGroupIdFindVehicleId( pGroup->ubGroupID );
AssertMsg( iVehicleID != -1, "GroupArrival for vehicle group. Invalid iVehicleID. " );
pSoldier = GetSoldierStructureForVehicle( iVehicleID );
AssertMsg( pSoldier, "GroupArrival for vehicle group. Invalid soldier pointer." );
SpendVehicleFuel( pSoldier, (INT16)(pGroup->uiTraverseTime*6) );
if( !VehicleFuelRemaining( pSoldier ) )
else if (!IsGroupTheHelicopterGroup(pGroup))
{
ReportVehicleOutOfGas( iVehicleID, pGroup->ubSectorX, pGroup->ubSectorY );
//Nuke the group's path, so they don't continue moving.
ClearMercPathsAndWaypointsForAllInGroup( pGroup );
SOLDIERTYPE* pSoldier;
INT32 iVehicleID;
iVehicleID = GivenMvtGroupIdFindVehicleId(pGroup->ubGroupID);
AssertMsg(iVehicleID != -1, "GroupArrival for vehicle group. Invalid iVehicleID. ");
pSoldier = GetSoldierStructureForVehicle(iVehicleID);
AssertMsg(pSoldier, "GroupArrival for vehicle group. Invalid soldier pointer.");
SpendVehicleFuel(pSoldier, (INT16)(pGroup->uiTraverseTime * 6));
if (!VehicleFuelRemaining(pSoldier))
{
ReportVehicleOutOfGas(iVehicleID, pGroup->ubSectorX, pGroup->ubSectorY);
//Nuke the group's path, so they don't continue moving.
ClearMercPathsAndWaypointsForAllInGroup(pGroup);
}
}
}
}
+38 -20
View File
@@ -3372,7 +3372,7 @@ void DisplayCharacterInfo( void )
const auto x = UI_CHARPANEL.Attr.AGL.iX;
const auto y = UI_CHARPANEL.Attr.AGL.iY;
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sAgilityGain+1)) / SubpointsPerPoint(AGILAMT,0);
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sAgilityGain+1)) / SubpointsPerPoint(AGILAMT, &gMercProfiles[pSoldier->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, STAT_WIDTH));
ClipRect.iTop = (y-1);
ClipRect.iBottom = (y-1) + STAT_HEIGHT;
@@ -3387,7 +3387,7 @@ void DisplayCharacterInfo( void )
const auto x = UI_CHARPANEL.Attr.DEX.iX;
const auto y = UI_CHARPANEL.Attr.DEX.iY;
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sDexterityGain+1)) / SubpointsPerPoint(DEXTAMT,0);
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sDexterityGain+1)) / SubpointsPerPoint(DEXTAMT, &gMercProfiles[pSoldier->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, STAT_WIDTH));
ClipRect.iTop = (y-1);
ClipRect.iBottom = (y-1) + STAT_HEIGHT;
@@ -3402,7 +3402,7 @@ void DisplayCharacterInfo( void )
const auto x = UI_CHARPANEL.Attr.STR.iX;
const auto y = UI_CHARPANEL.Attr.STR.iY;
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sStrengthGain+1)) / SubpointsPerPoint(STRAMT,0);
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sStrengthGain+1)) / SubpointsPerPoint(STRAMT, &gMercProfiles[pSoldier->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, STAT_WIDTH));
ClipRect.iTop = (y-1);
ClipRect.iBottom = (y-1) + STAT_HEIGHT;
@@ -3417,7 +3417,7 @@ void DisplayCharacterInfo( void )
const auto x = UI_CHARPANEL.Attr.WIS.iX;
const auto y = UI_CHARPANEL.Attr.WIS.iY;
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sWisdomGain+1)) / SubpointsPerPoint(WISDOMAMT,0);
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sWisdomGain+1)) / SubpointsPerPoint(WISDOMAMT, &gMercProfiles[pSoldier->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, STAT_WIDTH));
ClipRect.iTop = (y-1);
ClipRect.iBottom = (y-1) + STAT_HEIGHT;
@@ -3432,7 +3432,7 @@ void DisplayCharacterInfo( void )
const auto x = UI_CHARPANEL.Attr.MRK.iX;
const auto y = UI_CHARPANEL.Attr.MRK.iY;
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sMarksmanshipGain+1)) / SubpointsPerPoint(MARKAMT,0);
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sMarksmanshipGain+1)) / SubpointsPerPoint(MARKAMT, &gMercProfiles[pSoldier->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, STAT_WIDTH));
ClipRect.iTop = (y-1);
ClipRect.iBottom = (y-1) + STAT_HEIGHT;
@@ -3447,7 +3447,7 @@ void DisplayCharacterInfo( void )
const auto x = UI_CHARPANEL.Attr.LDR.iX;
const auto y = UI_CHARPANEL.Attr.LDR.iY;
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sLeadershipGain+1)) / SubpointsPerPoint(LDRAMT,0);
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sLeadershipGain+1)) / SubpointsPerPoint(LDRAMT, &gMercProfiles[pSoldier->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, STAT_WIDTH));
ClipRect.iTop = (y-1);
ClipRect.iBottom = (y-1) + STAT_HEIGHT;
@@ -3462,7 +3462,7 @@ void DisplayCharacterInfo( void )
const auto x = UI_CHARPANEL.Attr.MEC.iX;
const auto y = UI_CHARPANEL.Attr.MEC.iY;
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sMechanicGain+1)) / SubpointsPerPoint(MECHANAMT,0);
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sMechanicGain+1)) / SubpointsPerPoint(MECHANAMT, &gMercProfiles[pSoldier->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, STAT_WIDTH));
ClipRect.iTop = (y-1);
ClipRect.iBottom = (y-1) + STAT_HEIGHT;
@@ -3477,7 +3477,7 @@ void DisplayCharacterInfo( void )
const auto x = UI_CHARPANEL.Attr.EXP.iX;
const auto y = UI_CHARPANEL.Attr.EXP.iY;
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sExplosivesGain+1)) / SubpointsPerPoint(EXPLODEAMT,0);
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sExplosivesGain+1)) / SubpointsPerPoint(EXPLODEAMT, &gMercProfiles[pSoldier->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, STAT_WIDTH));
ClipRect.iTop = (y-1);
ClipRect.iBottom = (y-1) + STAT_HEIGHT;
@@ -3492,7 +3492,7 @@ void DisplayCharacterInfo( void )
const auto x = UI_CHARPANEL.Attr.MED.iX;
const auto y = UI_CHARPANEL.Attr.MED.iY;
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sMedicalGain+1)) / SubpointsPerPoint(MEDICALAMT,0);
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sMedicalGain+1)) / SubpointsPerPoint(MEDICALAMT, &gMercProfiles[pSoldier->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, STAT_WIDTH));
ClipRect.iTop = (y-1);
ClipRect.iBottom = (y-1) + STAT_HEIGHT;
@@ -3507,7 +3507,7 @@ void DisplayCharacterInfo( void )
const auto x = UI_CHARPANEL.Attr.LVL.iX;
const auto y = UI_CHARPANEL.Attr.LVL.iY;
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sExpLevelGain+1)) / SubpointsPerPoint(EXPERAMT, pSoldier->stats.bExpLevel);
ubBarWidth = (STAT_WIDTH * (gMercProfiles[ pSoldier->ubProfile ].sExpLevelGain+1)) / SubpointsPerPoint(EXPERAMT, &gMercProfiles[pSoldier->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, STAT_WIDTH));
ClipRect.iTop = (y-1);
ClipRect.iBottom = (y-1) + STAT_HEIGHT;
@@ -5708,7 +5708,7 @@ UINT32 MapScreenHandle(void)
HandleCharBarRender( );
}
if( (fShowInventoryFlag && !isWidescreenUI()) || fDisableDueToBattleRoster )
if( ( fShowInventoryFlag || fDisableDueToBattleRoster ) && !isWidescreenUI() )
{
for( iCounter = 0; iCounter < MAX_SORT_METHODS; iCounter++ )
{
@@ -5824,9 +5824,6 @@ UINT32 MapScreenHandle(void)
HandleContractRenewalSequence( );
// handle dialog
HandleDialogue( );
// handle display of inventory pop up
// HEADROCK HAM 3.5: Externalize!
HandleDisplayOfItemPopUpForSector( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY, startingZ );
@@ -6065,6 +6062,8 @@ UINT32 MapScreenHandle(void)
//InvalidateRegion( 0,0, 640, 480);
EndFrameBufferRender( );
// handle dialog
HandleDialogue();
// if not going anywhere else
if ( guiPendingScreen == NO_PENDING_SCREEN )
@@ -7225,14 +7224,29 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
break;
case PGUP:
// WANNE: Jump to first merc in list
fResetMapCoords = TRUE;
GoToFirstCharacterInList( );
if (gfPreBattleInterfaceActive)
{
ScrollPreBattleInterface(TRUE);
}
else
{
// WANNE: Jump to first merc in list
fResetMapCoords = TRUE;
GoToFirstCharacterInList();
}
break;
case PGDN:
// WANNE: Jump to last merc in list
fResetMapCoords = TRUE;
GoToLastCharacterInList( );
if (gfPreBattleInterfaceActive)
{
ScrollPreBattleInterface(FALSE);
}
else
{
// WANNE: Jump to last merc in list
fResetMapCoords = TRUE;
GoToLastCharacterInList();
}
break;
case SHIFT_PGUP:
@@ -10927,6 +10941,10 @@ void BlitBackgroundToSaveBuffer( void )
ForceButtonUnDirty( giMapContractButton );
ForceButtonUnDirty( giCharInfoButton[ 0 ] );
ForceButtonUnDirty( giCharInfoButton[ 1 ] );
if (isWidescreenUI())
{
ForceButtonUnDirty(giMapInvDoneButton);
}
RenderPreBattleInterface();
}
+32 -38
View File
@@ -167,25 +167,14 @@ void ProcessStatChange(MERCPROFILESTRUCT *pProfile, UINT8 ubStat, UINT16 usNumCh
INT8 bCurrentRating;
UINT16 *psStatGainPtr;
BOOLEAN fAffectedByWisdom = TRUE;
INT8 evolution = NORMAL_EVOLUTION;
Assert(pProfile != NULL);
if ( !gGameExternalOptions.bDisableEvolution )
evolution = pProfile->bEvolution;
if ( evolution == NO_EVOLUTION )
return; // No change possible, quit right away
// if this is a Reverse-Evolving merc who attempting to train
if ( ( ubReason == FROM_TRAINING ) && ( evolution == DEVOLVE ) )
return; // he doesn't get any benefit, but isn't penalized either
if (usNumChances == 0)
return;
usSubpointsPerPoint = SubpointsPerPoint(ubStat, pProfile->bExpLevel);
usSubpointsPerLevel = SubpointsPerPoint(EXPERAMT, pProfile->bExpLevel);
usSubpointsPerPoint = SubpointsPerPoint(ubStat, pProfile);
usSubpointsPerLevel = SubpointsPerPoint(EXPERAMT, pProfile);
switch (ubStat)
{
@@ -255,7 +244,6 @@ void ProcessStatChange(MERCPROFILESTRUCT *pProfile, UINT8 ubStat, UINT16 usNumCh
return;
}
if (ubReason == FROM_TRAINING)
{
// training always affected by wisdom
@@ -271,7 +259,7 @@ void ProcessStatChange(MERCPROFILESTRUCT *pProfile, UINT8 ubStat, UINT16 usNumCh
// loop once for each chance to improve
for (uiCnt = 0; uiCnt < usNumChances; ++uiCnt)
{
if ( evolution != DEVOLVE) // Evolves!
if (pProfile->fRegresses == FALSE) // Evolves!
{
// if this is improving from a failure, and a successful roll would give us enough to go up a point
if ((ubReason == FROM_FAILURE) && ((*psStatGainPtr + 1) >= usSubpointsPerPoint))
@@ -302,7 +290,7 @@ void ProcessStatChange(MERCPROFILESTRUCT *pProfile, UINT8 ubStat, UINT16 usNumCh
// if there IS a usChance, adjust it for high or low wisdom (50 is avg)
if (usChance > 0 && fAffectedByWisdom)
{
usChance += (usChance * (pProfile->bWisdom + (pProfile->sWisdomGain / SubpointsPerPoint(WISDOMAMT, pProfile->bExpLevel)) - 50)) / 100;
usChance += (usChance * (pProfile->bWisdom + (pProfile->sWisdomGain / SubpointsPerPoint(WISDOMAMT, pProfile)) - 50)) / 100;
}
// rftr: reduced growth rates at 80+ and 90+ (to make mercs with higher base stats more valuable)
@@ -315,14 +303,6 @@ void ProcessStatChange(MERCPROFILESTRUCT *pProfile, UINT8 ubStat, UINT16 usNumCh
usChance = min(gGameExternalOptions.ubMaxGrowthChanceAt80, usChance);
}
/*
// if the stat is Marksmanship, and the guy is a hopeless shot
if ((ubStat == MARKAMT) && (pProfile->bSpecialTrait == HOPELESS_SHOT))
{
usChance /= 5; // MUCH slower to improve, divide usChance by 5
}
*/
// SANDRO - penalty for primitive people, they get lesser chance to gain point for certain skills
if ( gGameOptions.fNewTraitSystem && (usChance > 10) && (ubStat != EXPERAMT) && (pProfile->bCharacterTrait == CHAR_TRAIT_PRIMITIVE) )
{
@@ -338,14 +318,6 @@ void ProcessStatChange(MERCPROFILESTRUCT *pProfile, UINT8 ubStat, UINT16 usNumCh
}
}
// Buggler: more evolution rate choices
if ( evolution == THREEQUARTER_EVOLUTION)
usChance = max(1, usChance * 0.75);
else if ( evolution == HALF_EVOLUTION)
usChance = max(1, usChance * 0.5);
else if ( evolution == ONEQUARTER_EVOLUTION)
usChance = max(1, usChance * 0.25);
// maximum possible usChance is 99%
if (usChance > 99)
{
@@ -413,7 +385,7 @@ void ProcessStatChange(MERCPROFILESTRUCT *pProfile, UINT8 ubStat, UINT16 usNumCh
// if there IS a usChance, adjust it for high or low wisdom (50 is avg)
if (usChance > 0 && fAffectedByWisdom)
{
usChance -= (usChance * (pProfile->bWisdom + (pProfile->sWisdomGain / SubpointsPerPoint(WISDOMAMT, pProfile->bExpLevel)) - 50)) / 100;
usChance -= (usChance * (pProfile->bWisdom + (pProfile->sWisdomGain / SubpointsPerPoint(WISDOMAMT, pProfile)) - 50)) / 100;
}
// if there's ANY usChance, minimum usChance is 1% regardless of wisdom
@@ -497,7 +469,7 @@ void ChangeStat( MERCPROFILESTRUCT *pProfile, SOLDIERTYPE *pSoldier, UINT8 ubSta
UINT16 usSubpointsPerPoint;
INT8 bDamagedStatToRaise = -1; // added by SANDRO
usSubpointsPerPoint = SubpointsPerPoint(ubStat, pProfile->bExpLevel );
usSubpointsPerPoint = SubpointsPerPoint(ubStat, pProfile );
// build ptrs to appropriate profiletype stat fields
switch( ubStat )
@@ -923,7 +895,7 @@ void ProcessUpdateStats( MERCPROFILESTRUCT *pProfile, SOLDIERTYPE *pSoldier, UIN
// set default min & max, subpoints/pt.
bMinStatValue = 1;
bMaxStatValue = MAX_STAT_VALUE;
usSubpointsPerPoint = SubpointsPerPoint(ubStat, pProfile->bExpLevel);
usSubpointsPerPoint = SubpointsPerPoint(ubStat, pProfile);
// build ptrs to appropriate profiletype stat fields
switch( ubStat )
@@ -1166,7 +1138,7 @@ UINT32 RoundOffSalary(UINT32 uiSalary)
}
UINT16 SubpointsPerPoint(UINT8 ubStat, INT8 bExpLevel)
UINT16 SubpointsPerPoint(UINT8 ubStat, MERCPROFILESTRUCT* pProfile)
{
UINT16 usSubpointsPerPoint;
@@ -1187,40 +1159,62 @@ UINT16 SubpointsPerPoint(UINT8 ubStat, INT8 bExpLevel)
// Attributes
case HEALTHAMT:
usSubpointsPerPoint = HEALTH_SUBPOINTS_TO_IMPROVE;
if (gGameExternalOptions.fMercGrowthModifiersEnabled) usSubpointsPerPoint += pProfile->bGrowthModifierLife;
usSubpointsPerPoint = max(usSubpointsPerPoint, HEALTH_SUBPOINTS_TO_IMPROVE/2);
break;
case AGILAMT:
usSubpointsPerPoint = AGILITY_SUBPOINTS_TO_IMPROVE;
if (gGameExternalOptions.fMercGrowthModifiersEnabled) usSubpointsPerPoint += pProfile->bGrowthModifierAgility;
usSubpointsPerPoint = max(usSubpointsPerPoint, AGILITY_SUBPOINTS_TO_IMPROVE/2);
break;
case DEXTAMT:
usSubpointsPerPoint = DEXTERITY_SUBPOINTS_TO_IMPROVE;
if (gGameExternalOptions.fMercGrowthModifiersEnabled) usSubpointsPerPoint += pProfile->bGrowthModifierDexterity;
usSubpointsPerPoint = max(usSubpointsPerPoint, DEXTERITY_SUBPOINTS_TO_IMPROVE/2);
break;
case WISDOMAMT:
usSubpointsPerPoint = WISDOM_SUBPOINTS_TO_IMPROVE;
if (gGameExternalOptions.fMercGrowthModifiersEnabled) usSubpointsPerPoint += pProfile->bGrowthModifierWisdom;
usSubpointsPerPoint = max(usSubpointsPerPoint, WISDOM_SUBPOINTS_TO_IMPROVE/2);
break;
case STRAMT:
usSubpointsPerPoint = STRENGTH_SUBPOINTS_TO_IMPROVE;
if (gGameExternalOptions.fMercGrowthModifiersEnabled) usSubpointsPerPoint += pProfile->bGrowthModifierStrength;
usSubpointsPerPoint = max(usSubpointsPerPoint, STRENGTH_SUBPOINTS_TO_IMPROVE/2);
break;
// Skills
case MEDICALAMT:
usSubpointsPerPoint = MEDICAL_SUBPOINTS_TO_IMPROVE;
if (gGameExternalOptions.fMercGrowthModifiersEnabled) usSubpointsPerPoint += pProfile->bGrowthModifierMedical;
usSubpointsPerPoint = max(usSubpointsPerPoint, MEDICAL_SUBPOINTS_TO_IMPROVE/2);
break;
case EXPLODEAMT:
usSubpointsPerPoint = EXPLOSIVES_SUBPOINTS_TO_IMPROVE;
if (gGameExternalOptions.fMercGrowthModifiersEnabled) usSubpointsPerPoint += pProfile->bGrowthModifierExplosive;
usSubpointsPerPoint = max(usSubpointsPerPoint, EXPLOSIVES_SUBPOINTS_TO_IMPROVE/2);
break;
case MECHANAMT:
usSubpointsPerPoint = MECHANICAL_SUBPOINTS_TO_IMPROVE;
if (gGameExternalOptions.fMercGrowthModifiersEnabled) usSubpointsPerPoint += pProfile->bGrowthModifierMechanical;
usSubpointsPerPoint = max(usSubpointsPerPoint, MECHANICAL_SUBPOINTS_TO_IMPROVE/2);
break;
case MARKAMT:
usSubpointsPerPoint = MARKSMANSHIP_SUBPOINTS_TO_IMPROVE;
if (gGameExternalOptions.fMercGrowthModifiersEnabled) usSubpointsPerPoint += pProfile->bGrowthModifierMarksmanship;
usSubpointsPerPoint = max(usSubpointsPerPoint, MARKSMANSHIP_SUBPOINTS_TO_IMPROVE/2);
break;
case LDRAMT:
usSubpointsPerPoint = LEADERSHIP_SUBPOINTS_TO_IMPROVE;
if (gGameExternalOptions.fMercGrowthModifiersEnabled) usSubpointsPerPoint += pProfile->bGrowthModifierLeadership;
usSubpointsPerPoint = max(usSubpointsPerPoint, LEADERSHIP_SUBPOINTS_TO_IMPROVE/2);
break;
// Experience
case EXPERAMT:
usSubpointsPerPoint = LEVEL_SUBPOINTS_TO_IMPROVE * bExpLevel;
usSubpointsPerPoint = LEVEL_SUBPOINTS_TO_IMPROVE * pProfile->bExpLevel;
if (gGameExternalOptions.fMercGrowthModifiersEnabled) usSubpointsPerPoint += pProfile->bGrowthModifierExpLevel;
usSubpointsPerPoint = max(usSubpointsPerPoint, LEVEL_SUBPOINTS_TO_IMPROVE * pProfile->bExpLevel / 2);
break;
default:
@@ -1797,7 +1791,7 @@ void TestDumpStatChanges(void)
// print days served
fprintf(FDump, "%3d ", pProfile->usTotalDaysServed);
// print evolution type
fprintf(FDump, "%c ", cEvolutionChars[ pProfile->bEvolution ]);
fprintf(FDump, "%c ", cEvolutionChars[ pProfile->fRegresses ]);
// now print all non-zero stats
for( ubStat = FIRST_CHANGEABLE_STAT; ubStat <= LAST_CHANGEABLE_STAT; ubStat++ )
+2 -2
View File
@@ -73,7 +73,7 @@ void ProcessUpdateStats( MERCPROFILESTRUCT *pProfile, SOLDIERTYPE *pSoldier, UIN
UINT32 CalcNewSalary(UINT32 uiOldSalary, BOOLEAN fIncrease, UINT32 uiMaxLimit, UINT32 uiIncreaseCap);
UINT32 RoundOffSalary(UINT32 uiSalary);
UINT16 SubpointsPerPoint(UINT8 ubStat, INT8 bExpLevel);
UINT16 SubpointsPerPoint(UINT8 ubStat, MERCPROFILESTRUCT* pProfile);
void HandleUnhiredMercImprovement( MERCPROFILESTRUCT *pProfile );
void HandleUnhiredMercDeaths( INT32 iProfileID );
@@ -92,4 +92,4 @@ void BuildStatChangeString( STR16 wString, STR16 wName, BOOLEAN fIncrease, INT16
void MERCMercWentUpALevelSendEmail( UINT8 ubMercMercIdValue );
#endif
#endif
+2 -2
View File
@@ -1467,8 +1467,8 @@ void GetXYForRightIconPlacement_FaceGera( FACETYPE *pFace, UINT16 ubIndex, INT16
usHeight = pTrav->usHeight;
usWidth = pTrav->usWidth;
sX = sFaceX + ( usWidth * bNumIcons ) + 1;
sY = sFaceY + pFace->usFaceHeight - usHeight - 1;
sX = sFaceX + ( usWidth * bNumIcons );
sY = sFaceY + pFace->usFaceHeight - usHeight;
*psX = sX;
*psY = sY;
+9 -1
View File
@@ -279,7 +279,8 @@ INT32 HandleItem( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel, UINT16 usHa
{
pTargetSoldier = MercPtrs[ usSoldierIndex ];
if ( fFromUI )
// anv: don't try to heal interactive spots
if (fFromUI && Item[usHandItem].usItemClass != IC_MEDKIT)
{
INT32 sInteractiveGridNo;
@@ -325,6 +326,13 @@ INT32 HandleItem( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel, UINT16 usHa
{
if (pTargetSoldier->bTeam == gbPlayerNum || pTargetSoldier->aiData.bNeutral)
{
// anv: don't try to attack yourself, it will only cause deadlock
if (pSoldier == pTargetSoldier)
{
TacticalCharacterDialogue(pSoldier, QUOTE_REFUSING_ORDER);
return(ITEM_HANDLE_REFUSAL);
}
// nice mercs won't shoot other nice guys or neutral civilians
if ((gMercProfiles[pSoldier->ubProfile].ubMiscFlags3 & PROFILE_MISC_FLAG3_GOODGUY) &&
((pTargetSoldier->ubProfile == NO_PROFILE && pTargetSoldier->aiData.bNeutral && pTargetSoldier->ubBodyType != CROW) ||
+13 -21
View File
@@ -2913,20 +2913,16 @@ void HandleAnyMercInSquadHasCompatibleStuff( UINT8 ubSquad, OBJECTTYPE *pObject,
BOOLEAN IsMutuallyValidAttachmentOrLaunchable(UINT16 usAttItem, UINT16 usItem)//dnl ch76 091113
{
UINT32 uiLoop = 0;
while ( Attachment[uiLoop][0] )
for (UINT32 uiLoop = 0; uiLoop < gMAXATTACHMENTS_READ; uiLoop++)
{
if(Attachment[uiLoop][0] == usAttItem && Attachment[uiLoop][1] == usItem || Attachment[uiLoop][0] == usItem && Attachment[uiLoop][1] == usAttItem )
if (Attachment[uiLoop].attachmentIndex == usAttItem && Attachment[uiLoop].itemIndex == usItem || Attachment[uiLoop].attachmentIndex == usItem && Attachment[uiLoop].itemIndex == usAttItem)
return(TRUE);
++uiLoop;
}
uiLoop = 0;
while ( Launchable[uiLoop][0] )
for (UINT32 uiLoop = 0; uiLoop < gMAXLAUNCHABLES_READ; uiLoop++)
{
if ( Launchable[uiLoop][0] == usAttItem && Launchable[uiLoop][1] == usItem || Launchable[uiLoop][0] == usItem && Launchable[uiLoop][1] == usAttItem )
return(TRUE);
++uiLoop;
}
return(FALSE);
@@ -5765,12 +5761,8 @@ void UpdateAttachmentTooltips(OBJECTTYPE *pObject, UINT8 ubStatusIndex)
}
// sevenfm: check launchables
for (UINT16 usLoop = 0; usLoop < MAXITEMS + 1; usLoop++)
for (UINT16 usLoop = 0; usLoop < gMAXLAUNCHABLES_READ; usLoop++)
{
// check that reached end of valid launchables
if (Launchable[usLoop][0] == 0)
break;
usAttachment = 0;
if (Launchable[usLoop][1] == pObject->usItem && AttachmentSlots[usLoopSlotID].nasAttachmentClass & Item[Launchable[usLoop][0]].nasAttachmentClass)
{
@@ -5801,17 +5793,14 @@ void UpdateAttachmentTooltips(OBJECTTYPE *pObject, UINT8 ubStatusIndex)
}
// check all attachments
for (UINT16 usLoop = 0; usLoop < MAXATTACHMENTS; usLoop++)
//TODO: should be optimized using AttachmentBackmap and/or possibly FindAttachmentRange()
for (UINT32 uiLoop = 0; uiLoop < gMAXATTACHMENTS_READ; uiLoop++)
{
// check that reached end of valid attachments
if (Attachment[usLoop][0] == 0)
break;
usAttachment = 0;
if (Attachment[usLoop][1] == pObject->usItem && AttachmentSlots[usLoopSlotID].nasAttachmentClass & Item[Attachment[usLoop][0]].nasAttachmentClass)
if (Attachment[uiLoop].itemIndex == pObject->usItem && AttachmentSlots[usLoopSlotID].nasAttachmentClass & Item[Attachment[uiLoop].attachmentIndex].nasAttachmentClass)
{
//search primary item attachments.xml
usAttachment = Attachment[usLoop][0];
usAttachment = Attachment[uiLoop].attachmentIndex;
}
else
{
@@ -5820,8 +5809,11 @@ void UpdateAttachmentTooltips(OBJECTTYPE *pObject, UINT8 ubStatusIndex)
UINT16* p = cnt ? &attachedList.front() : NULL;
while (cnt)
{
if (Attachment[usLoop][1] == *p && AttachmentSlots[usLoopSlotID].nasAttachmentClass & Item[Attachment[usLoop][0]].nasAttachmentClass)
usAttachment = Attachment[usLoop][0];
if (Attachment[uiLoop].itemIndex == *p && AttachmentSlots[usLoopSlotID].nasAttachmentClass & Item[Attachment[uiLoop].attachmentIndex].nasAttachmentClass)
{
usAttachment = Attachment[uiLoop].attachmentIndex;
break;
}
cnt--, p++;
}
+10 -10
View File
@@ -2598,7 +2598,7 @@ void RenderSMPanel( BOOLEAN *pfDirty )
// AGI
if (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sAgilityGain)
{
ubBarWidth = (SM_STATS_WIDTH * (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sAgilityGain+1)) / SubpointsPerPoint(AGILAMT,0);
ubBarWidth = (SM_STATS_WIDTH * (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sAgilityGain+1)) / SubpointsPerPoint(AGILAMT, &gMercProfiles[gpSMCurrentMerc->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, SM_STATS_WIDTH));
ClipRect.iTop = (SM_AGI_Y-1);
ClipRect.iBottom = (SM_AGI_Y-1) + SM_STATS_HEIGHT;
@@ -2610,7 +2610,7 @@ void RenderSMPanel( BOOLEAN *pfDirty )
// DEX
if (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sDexterityGain)
{
ubBarWidth = (SM_STATS_WIDTH * (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sDexterityGain+1)) / SubpointsPerPoint(DEXTAMT,0);
ubBarWidth = (SM_STATS_WIDTH * (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sDexterityGain+1)) / SubpointsPerPoint(DEXTAMT, &gMercProfiles[gpSMCurrentMerc->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, SM_STATS_WIDTH));
ClipRect.iTop = (SM_DEX_Y-1);
ClipRect.iBottom = (SM_DEX_Y-1) + SM_STATS_HEIGHT;
@@ -2622,7 +2622,7 @@ void RenderSMPanel( BOOLEAN *pfDirty )
// STR
if (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sStrengthGain)
{
ubBarWidth = (SM_STATS_WIDTH * (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sStrengthGain+1)) / SubpointsPerPoint(STRAMT,0);
ubBarWidth = (SM_STATS_WIDTH * (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sStrengthGain+1)) / SubpointsPerPoint(STRAMT, &gMercProfiles[gpSMCurrentMerc->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, SM_STATS_WIDTH));
ClipRect.iTop = (SM_STR_Y-1);
ClipRect.iBottom = (SM_STR_Y-1) + SM_STATS_HEIGHT;
@@ -2634,7 +2634,7 @@ void RenderSMPanel( BOOLEAN *pfDirty )
// WIS
if (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sWisdomGain)
{
ubBarWidth = (SM_STATS_WIDTH * (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sWisdomGain+1)) / SubpointsPerPoint(WISDOMAMT,0);
ubBarWidth = (SM_STATS_WIDTH * (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sWisdomGain+1)) / SubpointsPerPoint(WISDOMAMT, &gMercProfiles[gpSMCurrentMerc->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, SM_STATS_WIDTH));
ClipRect.iTop = (SM_WIS_Y-1);
ClipRect.iBottom = (SM_WIS_Y-1) + SM_STATS_HEIGHT;
@@ -2646,7 +2646,7 @@ void RenderSMPanel( BOOLEAN *pfDirty )
// MRK
if (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sMarksmanshipGain)
{
ubBarWidth = (SM_STATS_WIDTH * (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sMarksmanshipGain+1)) / SubpointsPerPoint(MARKAMT,0);
ubBarWidth = (SM_STATS_WIDTH * (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sMarksmanshipGain+1)) / SubpointsPerPoint(MARKAMT, &gMercProfiles[gpSMCurrentMerc->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, SM_STATS_WIDTH));
ClipRect.iTop = (SM_MRKM_Y-1);
ClipRect.iBottom = (SM_MRKM_Y-1) + SM_STATS_HEIGHT;
@@ -2658,7 +2658,7 @@ void RenderSMPanel( BOOLEAN *pfDirty )
// LDR
if (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sLeadershipGain)
{
ubBarWidth = (SM_STATS_WIDTH * (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sLeadershipGain+1)) / SubpointsPerPoint(LDRAMT,0);
ubBarWidth = (SM_STATS_WIDTH * (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sLeadershipGain+1)) / SubpointsPerPoint(LDRAMT, &gMercProfiles[gpSMCurrentMerc->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, SM_STATS_WIDTH));
ClipRect.iTop = (SM_CHAR_Y-1);
ClipRect.iBottom = (SM_CHAR_Y-1) + SM_STATS_HEIGHT;
@@ -2670,7 +2670,7 @@ void RenderSMPanel( BOOLEAN *pfDirty )
// MECH
if (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sMechanicGain)
{
ubBarWidth = (SM_STATS_WIDTH * (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sMechanicGain+1)) / SubpointsPerPoint(MECHANAMT,0);
ubBarWidth = (SM_STATS_WIDTH * (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sMechanicGain+1)) / SubpointsPerPoint(MECHANAMT, &gMercProfiles[gpSMCurrentMerc->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, SM_STATS_WIDTH));
ClipRect.iTop = (SM_MECH_Y-1);
ClipRect.iBottom = (SM_MECH_Y-1) + SM_STATS_HEIGHT;
@@ -2682,7 +2682,7 @@ void RenderSMPanel( BOOLEAN *pfDirty )
// EXPLO
if (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sExplosivesGain)
{
ubBarWidth = (SM_STATS_WIDTH * (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sExplosivesGain+1)) / SubpointsPerPoint(EXPLODEAMT,0);
ubBarWidth = (SM_STATS_WIDTH * (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sExplosivesGain+1)) / SubpointsPerPoint(EXPLODEAMT, &gMercProfiles[gpSMCurrentMerc->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, SM_STATS_WIDTH));
ClipRect.iTop = (SM_EXPL_Y-1);
ClipRect.iBottom = (SM_EXPL_Y-1) + SM_STATS_HEIGHT;
@@ -2694,7 +2694,7 @@ void RenderSMPanel( BOOLEAN *pfDirty )
// MED
if (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sMedicalGain)
{
ubBarWidth = (SM_STATS_WIDTH * (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sMedicalGain+1)) / SubpointsPerPoint(MEDICALAMT,0);
ubBarWidth = (SM_STATS_WIDTH * (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sMedicalGain+1)) / SubpointsPerPoint(MEDICALAMT, &gMercProfiles[gpSMCurrentMerc->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, SM_STATS_WIDTH));
ClipRect.iTop = (SM_MED_Y-1);
ClipRect.iBottom = (SM_MED_Y-1) + SM_STATS_HEIGHT;
@@ -2706,7 +2706,7 @@ void RenderSMPanel( BOOLEAN *pfDirty )
// EXPLEVEL
if (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sExpLevelGain)
{
ubBarWidth = (SM_STATS_WIDTH * (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sExpLevelGain+1)) / SubpointsPerPoint(EXPERAMT, gpSMCurrentMerc->stats.bExpLevel);
ubBarWidth = (SM_STATS_WIDTH * (gMercProfiles[ gpSMCurrentMerc->ubProfile ].sExpLevelGain+1)) / SubpointsPerPoint(EXPERAMT, &gMercProfiles[gpSMCurrentMerc->ubProfile]);
ubBarWidth = __max(0, __min(ubBarWidth, SM_STATS_WIDTH));
ClipRect.iTop = (SM_EXPLVL_Y-1);
ClipRect.iBottom = (SM_EXPLVL_Y-1) + SM_STATS_HEIGHT;
+23 -1
View File
@@ -1724,9 +1724,30 @@ typedef enum
MAXITEMS = 16001
} ITEMDEFINE;
struct AttachmentStruct
{
UINT16 attachmentIndex;
UINT16 itemIndex;
UINT16 APCost;
UINT16 NASOnly;
bool operator<(const AttachmentStruct& a) const
{
bool result = false;
if (attachmentIndex < a.attachmentIndex)
result = true;
else if (attachmentIndex == a.attachmentIndex)
result = itemIndex < a.itemIndex;
return result;
}
};
// Flugente: in order not to loop over MAXITEMS items if we only have a few thousand, remember the actual number of items in the xml
extern UINT32 gMAXITEMS_READ;
extern UINT32 gMAXAMMOTYPES_READ;
extern UINT32 gMAXATTACHMENTS_READ;
extern UINT32 gMAXLAUNCHABLES_READ;
/* CHRISL: Arrays to track ic group information. These allow us to determine which LBE slots control which pockets and
what LBE class the pockets are.*/
@@ -1781,7 +1802,8 @@ const INT16 icDefault[NUM_INV_SLOTS] = {
#define MAXATTACHMENTS 60000
extern INVTYPE Item[MAXITEMS];
extern UINT16 Attachment[MAXATTACHMENTS][4];
extern AttachmentStruct Attachment[MAXATTACHMENTS];
extern std::multimap<UINT16, AttachmentStruct> AttachmentBackmap;
//WarmSteel - Here we have some definitions for NAS
typedef struct
+82 -52
View File
@@ -566,7 +566,8 @@ AttachmentInfoStruct AttachmentInfo[MAXITEMS+1];// =
AttachmentSlotStruct AttachmentSlots[MAXITEMS+1];
ItemReplacementStruct ItemReplacement[MAXATTACHMENTS];
UINT16 Attachment[MAXATTACHMENTS][4];// =
AttachmentStruct Attachment[MAXATTACHMENTS];// =
std::multimap<UINT16, AttachmentStruct> AttachmentBackmap; // key is itemId
//{
// {SILENCER, GLOCK_17},
// {SILENCER, GLOCK_18},
@@ -2253,7 +2254,6 @@ INT32 GetAttachmentInfoIndex( UINT16 usItem )
//Determine if it is possible to add this attachment to the item.
BOOLEAN ValidAttachment( UINT16 usAttachment, UINT16 usItem, UINT8 * pubAPCost )
{
INT32 iLoop = 0;
if (pubAPCost) {
*pubAPCost = (UINT8)APBPConstants[AP_RELOAD_GUN]; //default value
}
@@ -2269,40 +2269,26 @@ BOOLEAN ValidAttachment( UINT16 usAttachment, UINT16 usItem, UINT8 * pubAPCost )
*pubAPCost = Item[usAttachment].ubAttachToPointAPCost;
return TRUE;
}
// look for the section of the array pertaining to this attachment...
while( 1 )
{
if (Attachment[iLoop][0] == usAttachment)
{
break;
}
++iLoop;
if (Attachment[iLoop][0] == 0)
{
// the proposed item cannot be attached to anything!
return( FALSE );
}
}
UINT32 startIndex = 0, endIndex = 0;
if (FindAttachmentRange(usAttachment, &startIndex, &endIndex) == FALSE)
return FALSE;
// now look through this section for the item in question
while( 1 )
for (UINT32 iLoop = startIndex; iLoop <= endIndex; iLoop++)
{
if (Attachment[iLoop][1] == usItem)
if (Attachment[iLoop].itemIndex == usItem)
{
if ( UsingNewAttachmentSystem( ) || Attachment[iLoop][3] != 1 )
if ( UsingNewAttachmentSystem( ) || Attachment[iLoop].NASOnly != 1 )
{
if (pubAPCost)
*pubAPCost = (UINT8)Attachment[iLoop][2]; //Madd: get ap cost of attaching items :)
break;
*pubAPCost = (UINT8)Attachment[iLoop].APCost; //Madd: get ap cost of attaching items :)
}
}
++iLoop;
if (Attachment[iLoop][0] != usAttachment)
{
// the proposed item cannot be attached to the item in question
return( FALSE );
return TRUE;
}
}
return( TRUE );
return FALSE;
}
BOOLEAN ValidAttachment( UINT16 usAttachment, OBJECTTYPE * pObj, UINT8 * pubAPCost, UINT8 subObject, std::vector<UINT16> usAttachmentSlotIndexVector)
@@ -5677,40 +5663,35 @@ BOOLEAN OBJECTTYPE::AttachObjectNAS( SOLDIERTYPE * pSoldier, OBJECTTYPE * pAttac
UINT64 SetAttachmentSlotsFlag(OBJECTTYPE* pObj)
{
UINT64 uiSlotFlag = 0;
UINT32 uiLoop = 0;
UINT32 fItem;
if (pObj->exists() == false)
return 0;
UINT64 point = GetAvailableAttachmentPoint(pObj, 0);
while (uiLoop < gMAXITEMS_READ && Item[uiLoop].usItemClass != 0 ||
uiLoop < MAXATTACHMENTS && Attachment[uiLoop][0] != 0 ||
uiLoop < MAXITEMS + 1 && Launchable[uiLoop][0] != 0)
std::pair<std::multimap<UINT16, AttachmentStruct>::iterator, std::multimap<UINT16, AttachmentStruct>::iterator> range;
std::multimap<UINT16, AttachmentStruct>::iterator it;
range = AttachmentBackmap.equal_range(pObj->usItem);
for (it = range.first; it != range.second; it++)
{
if (uiLoop > 0 && uiLoop < gMAXITEMS_READ && IsAttachmentPointAvailable(point, uiLoop, TRUE))
{
fItem = uiLoop;
if (fItem && ItemIsLegal(fItem, TRUE))
uiSlotFlag |= Item[fItem].nasAttachmentClass;
}
UINT16 attachmentId = it->second.attachmentIndex;
if (ItemIsLegal(attachmentId, TRUE))
uiSlotFlag |= Item[attachmentId].nasAttachmentClass;
}
if (uiLoop < MAXATTACHMENTS && Attachment[uiLoop][1] == pObj->usItem)
for (UINT32 i = 0; i < gMAXLAUNCHABLES_READ; i++)
{
if (Launchable[i][1] == pObj->usItem)
{
fItem = Attachment[uiLoop][0];
if (fItem && ItemIsLegal(fItem, TRUE))
uiSlotFlag |= Item[fItem].nasAttachmentClass;
UINT16 attachmentId = Launchable[i][0];
if (ItemIsLegal(attachmentId, TRUE))
uiSlotFlag |= Item[attachmentId].nasAttachmentClass;
}
}
if (uiLoop < MAXITEMS + 1 && Launchable[uiLoop][1] == pObj->usItem)
{
fItem = Launchable[uiLoop][0];
if (fItem && ItemIsLegal(fItem, TRUE))
uiSlotFlag |= Item[fItem].nasAttachmentClass;
}
uiLoop++;
UINT64 point = GetAvailableAttachmentPoint(pObj, 0);
for (UINT32 itemId = 1; itemId < gMAXITEMS_READ; itemId++)
{
if (IsAttachmentPointAvailable(point, itemId, TRUE))
uiSlotFlag |= Item[itemId].nasAttachmentClass;
}
return uiSlotFlag;
@@ -16028,3 +16009,52 @@ UINT16 GetLaunchableOfExplosionType(UINT16 launcher, UINT8 explosionType)
}
return NOTHING;
}
BOOLEAN FindAttachmentRange(UINT16 usAttachment, UINT32* pStartIndex, UINT32* pEndIndex)
{
BOOLEAN result = FALSE;
INT32 leftMargin = 0;
INT32 rightMargin = (INT32)gMAXATTACHMENTS_READ - 1;
INT32 middle = 0;
// use binary search to locate the group of elements for given attachment item Id (usAttachment)
while (leftMargin <= rightMargin)
{
middle = leftMargin + (rightMargin - leftMargin) / 2;
if (Attachment[middle].attachmentIndex == usAttachment)
{
result = TRUE;
break;
}
else if (Attachment[middle].attachmentIndex < usAttachment)
leftMargin = middle + 1;
else
rightMargin = middle - 1;
}
if (result)
{
// now middle is an index somewhere within the group, seek for beginning and ending of the group
if (pStartIndex)
{
*pStartIndex = (UINT32)middle;
for (INT32 i = middle - 1; i >= leftMargin; i--)
if (Attachment[i].attachmentIndex == usAttachment)
*pStartIndex = (UINT32)i;
else
break;
}
if (pEndIndex)
{
*pEndIndex = (UINT32)middle;
for (INT32 i = middle + 1; i <= rightMargin; i++)
if (Attachment[i].attachmentIndex == usAttachment)
*pEndIndex = (UINT32)i;
else
break;
}
}
return result;
}
+1
View File
@@ -568,6 +568,7 @@ INT32 GetPercentRangeBonus( OBJECTTYPE * pObj );
UINT8 GetInventorySleepModifier( SOLDIERTYPE *pSoldier );
void AttachDefaultAttachments(OBJECTTYPE *pObj, BOOLEAN fAllDefaultAttachments=TRUE);//dnl ch75 261013
BOOLEAN FindAttachmentRange(UINT16 usAttachment, UINT32* pStartIndex, UINT32* pEndIndex);
// Flugente: is this object useable by militia?
BOOLEAN ObjectIsMilitiaRelevant( OBJECTTYPE *pObj );
+2 -2
View File
@@ -3640,11 +3640,11 @@ INT16 MinAPsToThrow( SOLDIERTYPE *pSoldier, INT32 sGridNo, UINT8 ubAddTurningCos
iAPCost += ( ( ( 100 * iTop ) / iBottom) + 1) / 2;
// SANDRO - STOMP traits - reduce APs needed to throw grenades if having Demolitions skill
if( HAS_SKILL_TRAIT( pSoldier, DEMOLITIONS_NT ) && gGameOptions.fNewTraitSystem )
if( HAS_SKILL_TRAIT( pSoldier, THROWING_NT ) && gGameOptions.fNewTraitSystem )
{
if ( grenadAPreductionpossible )
{
iAPCost = max( 1, (INT32)(iAPCost * (100 - gSkillTraitValues.ubDEAPsNeededToThrowGrenadesReduction) / 100));
iAPCost = max( 1, (INT32)(iAPCost * (100 - gSkillTraitValues.ubTHAPsNeededToThrowGrenadesReduction) / 100));
}
}
+21 -1
View File
@@ -1339,7 +1339,7 @@ MERCPROFILESTRUCT& MERCPROFILESTRUCT::operator=(const OLD_MERCPROFILESTRUCT_101&
this->bSex = src.bSex;
this->bArmourAttractiveness = src.bArmourAttractiveness;
this->ubMiscFlags2 = src.ubMiscFlags2;
this->bEvolution = src.bEvolution;
this->fRegresses = src.bEvolution == 2; // formerly, 2 == CharacterEvolution::DEVOLVES
this->ubMiscFlags = src.ubMiscFlags;
this->bSexist = src.bSexist;
this->bLearnToHate = src.bLearnToHate;
@@ -10700,6 +10700,22 @@ UINT8 SOLDIERTYPE::SoldierTakeDamage( INT8 bHeight, INT16 sLifeDeduct, INT16 sBr
return(ubCombinedLoss);
}
void SOLDIERTYPE::SoldierTakeDelayedDamage(INT8 bHeight, INT16 sLifeDeduct, INT16 sBreathLoss, UINT8 ubReason, UINT8 ubAttacker, INT32 sSourceGrid, INT16 sSubsequent, BOOLEAN fShowDamage)
{
delayedDamageFunction = [this, bHeight, sLifeDeduct, sBreathLoss, ubReason, ubAttacker, sSourceGrid, sSubsequent, fShowDamage]()
{
this->SoldierTakeDamage(bHeight, sLifeDeduct, sBreathLoss, ubReason, ubAttacker, sSourceGrid, sSubsequent, fShowDamage);
};
}
void SOLDIERTYPE::ResolveDelayedDamage()
{
if (delayedDamageFunction)
{
delayedDamageFunction();
delayedDamageFunction = nullptr;
}
}
extern BOOLEAN IsMercSayingDialogue( UINT8 ubProfileID );
@@ -11499,6 +11515,8 @@ void SOLDIERTYPE::MoveMerc( FLOAT dMovementChange, FLOAT dAngle, BOOLEAN fCheckR
// OK, set new position
this->EVENT_InternalSetSoldierPosition( dXPos, dYPos, FALSE, FALSE, FALSE );
this->ResolveDelayedDamage();
// Flugente: drag people
if ( currentlydragging )
{
@@ -26234,4 +26252,6 @@ void SOLDIERTYPE::InitializeExtraData(void)
this->ubQuickItemSlot = 0;
this->usGrenadeItem = 0;
this->delayedDamageFunction = nullptr;
}
+8
View File
@@ -20,6 +20,7 @@
#include <iterator>
#include "GameSettings.h" // added by Flugente
#include "Disease.h" // added by Flugente
#include <functional>
#define PTR_CIVILIAN (pSoldier->bTeam == CIV_TEAM)
#define PTR_CROUCHED (gAnimControl[ pSoldier->usAnimState ].ubHeight == ANIM_CROUCH)
@@ -1656,6 +1657,10 @@ public:
UINT8 ubQuickItemSlot;
UINT16 usGrenadeItem;
// anv: resolve damage with delay, e.g. damage applied mid movement that would cause issues with world data if applied immediately
std::function<void()> delayedDamageFunction;
public:
// CREATION FUNCTIONS
BOOLEAN DeleteSoldier( void );
@@ -1719,6 +1724,9 @@ public:
void ReviveSoldier( void );
UINT8 SoldierTakeDamage( INT8 bHeight, INT16 sLifeDeduct, INT16 sBreathDeduct, UINT8 ubReason, UINT8 ubAttacker, INT32 sSourceGrid, INT16 sSubsequent, BOOLEAN fShowDamage );
// anv: resolve damage with delay, e.g. damage applied mid movement that would cause issues with world data if applied immediately
void SoldierTakeDelayedDamage(INT8 bHeight, INT16 sLifeDeduct, INT16 sBreathDeduct, UINT8 ubReason, UINT8 ubAttacker, INT32 sSourceGrid, INT16 sSubsequent, BOOLEAN fShowDamage);
void ResolveDelayedDamage();
// Palette functions for soldiers
BOOLEAN CreateSoldierPalettes( void );
+46 -1
View File
@@ -98,6 +98,7 @@ extern UINT8 gubItemDroppableFlag[NUM_INV_SLOTS];
//Random Stats
RANDOM_STATS_VALUES gRandomStatsValue[NUM_PROFILES];
void RandomStats();
void RandomGrowthModifiers();
void RandomStartSalary();
//Jenilee
@@ -459,6 +460,35 @@ void RandomStats()
ExitRandomMercs(); }
}
void RandomGrowthModifiers()
{
UINT32 cnt;
MERCPROFILESTRUCT * pProfile;
BOOLEAN useBellCurve = TRUE;
if (gGameExternalOptions.fMercRandomGrowthModifiers == TRUE)
{
for (cnt = 0; cnt < NUM_PROFILES; cnt++)
{
pProfile = &(gMercProfiles[cnt]);
// cap minimum growth modifier to negative half subpoints. this is effectively double speed using default values (subpoints = 50)
// cap maximum growth modifier to 30000. this would make a merc take 600x as long to level up a stat using default values
pProfile->bGrowthModifierExpLevel = RandomAbsoluteRange( pProfile->bGrowthModifierExpLevel, -gGameExternalOptions.usLevelSubpointsToImprove/2, 30000, gGameExternalOptions.iMercRandomGrowthModifiersRange, useBellCurve );
pProfile->bGrowthModifierLife = RandomAbsoluteRange( pProfile->bGrowthModifierLife, -gGameExternalOptions.usHealthSubpointsToImprove/2, 30000, gGameExternalOptions.iMercRandomGrowthModifiersRange, useBellCurve );
pProfile->bGrowthModifierAgility = RandomAbsoluteRange( pProfile->bGrowthModifierAgility, -gGameExternalOptions.usAgilitySubpointsToImprove/2, 30000, gGameExternalOptions.iMercRandomGrowthModifiersRange, useBellCurve );
pProfile->bGrowthModifierDexterity = RandomAbsoluteRange( pProfile->bGrowthModifierDexterity, -gGameExternalOptions.usDexteritySubpointsToImprove/2, 30000, gGameExternalOptions.iMercRandomGrowthModifiersRange, useBellCurve );
pProfile->bGrowthModifierStrength = RandomAbsoluteRange( pProfile->bGrowthModifierStrength, -gGameExternalOptions.usStrengthSubpointsToImprove/2, 30000, gGameExternalOptions.iMercRandomGrowthModifiersRange, useBellCurve );
pProfile->bGrowthModifierLeadership = RandomAbsoluteRange( pProfile->bGrowthModifierLeadership, -gGameExternalOptions.usLeadershipSubpointsToImprove/2, 30000, gGameExternalOptions.iMercRandomGrowthModifiersRange, useBellCurve );
pProfile->bGrowthModifierWisdom = RandomAbsoluteRange( pProfile->bGrowthModifierWisdom, -gGameExternalOptions.usWisdomSubpointsToImprove/2, 30000, gGameExternalOptions.iMercRandomGrowthModifiersRange, useBellCurve );
pProfile->bGrowthModifierMarksmanship = RandomAbsoluteRange( pProfile->bGrowthModifierMarksmanship, -gGameExternalOptions.usMarksmanshipSubpointsToImprove/2, 30000, gGameExternalOptions.iMercRandomGrowthModifiersRange, useBellCurve );
pProfile->bGrowthModifierMechanical = RandomAbsoluteRange( pProfile->bGrowthModifierMechanical, -gGameExternalOptions.usMechanicalSubpointsToImprove/2, 30000, gGameExternalOptions.iMercRandomGrowthModifiersRange, useBellCurve );
pProfile->bGrowthModifierExplosive = RandomAbsoluteRange( pProfile->bGrowthModifierExplosive, -gGameExternalOptions.usExplosivesSubpointsToImprove/2, 30000, gGameExternalOptions.iMercRandomGrowthModifiersRange, useBellCurve );
pProfile->bGrowthModifierMedical = RandomAbsoluteRange( pProfile->bGrowthModifierMedical, -gGameExternalOptions.usMedicalSubpointsToImprove/2, 30000, gGameExternalOptions.iMercRandomGrowthModifiersRange, useBellCurve );
}
}
}
void RandomStartSalary()
{
UINT32 cnt;
@@ -996,6 +1026,8 @@ for( int i = 0; i < NUM_PROFILES; i++ )
// ---------------
RandomStats (); //random stats by Jazz
RandomGrowthModifiers();
// Buggler: random starting salary
RandomStartSalary ();
@@ -2522,7 +2554,7 @@ void OverwriteMercProfileWithXMLData( UINT32 uiLoop )
gMercProfiles[ uiLoop ].bMechanical = tempProfiles[ uiLoop ].bMechanical ;
gMercProfiles[ uiLoop ].bExpLevel = tempProfiles[ uiLoop ].bExpLevel ;
gMercProfiles[ uiLoop ].bEvolution = tempProfiles[ uiLoop ].bEvolution ;
gMercProfiles[uiLoop].fRegresses = tempProfiles[ uiLoop ].fRegresses;
//////////////////////////////////////////////////////////////////////////////////////
// SANDRO - Check old/new traits and repair possible errors
if (gGameOptions.fNewTraitSystem)
@@ -2637,6 +2669,19 @@ void OverwriteMercProfileWithXMLData( UINT32 uiLoop )
gMercProfiles[ uiLoop ].usVoiceIndex = tempProfiles[uiLoop].usVoiceIndex;
gMercProfiles[ uiLoop ].Type = tempProfiles[uiLoop].Type;
gMercProfiles[uiLoop].fRegresses = tempProfiles[uiLoop].fRegresses;
gMercProfiles[uiLoop].bGrowthModifierLife = tempProfiles[uiLoop].bGrowthModifierLife;
gMercProfiles[uiLoop].bGrowthModifierStrength = tempProfiles[uiLoop].bGrowthModifierStrength;
gMercProfiles[uiLoop].bGrowthModifierAgility = tempProfiles[uiLoop].bGrowthModifierAgility;
gMercProfiles[uiLoop].bGrowthModifierDexterity = tempProfiles[uiLoop].bGrowthModifierDexterity;
gMercProfiles[uiLoop].bGrowthModifierWisdom = tempProfiles[uiLoop].bGrowthModifierWisdom;
gMercProfiles[uiLoop].bGrowthModifierMarksmanship = tempProfiles[uiLoop].bGrowthModifierMarksmanship;
gMercProfiles[uiLoop].bGrowthModifierExplosive = tempProfiles[uiLoop].bGrowthModifierExplosive;
gMercProfiles[uiLoop].bGrowthModifierLeadership = tempProfiles[uiLoop].bGrowthModifierLeadership;
gMercProfiles[uiLoop].bGrowthModifierMedical = tempProfiles[uiLoop].bGrowthModifierMedical;
gMercProfiles[uiLoop].bGrowthModifierMechanical = tempProfiles[uiLoop].bGrowthModifierMechanical;
gMercProfiles[uiLoop].bGrowthModifierExpLevel = tempProfiles[uiLoop].bGrowthModifierExpLevel;
gProfileType[uiLoop] = gMercProfiles[uiLoop].Type;
switch ( tempProfiles[uiLoop].Type )
+12 -1
View File
@@ -314,7 +314,18 @@ typedef struct
INT8 bExpLevel;
INT8 bEvolution;
BOOLEAN fRegresses;
INT16 bGrowthModifierLife;
INT16 bGrowthModifierStrength;
INT16 bGrowthModifierAgility;
INT16 bGrowthModifierDexterity;
INT16 bGrowthModifierWisdom;
INT16 bGrowthModifierMarksmanship;
INT16 bGrowthModifierExplosive;
INT16 bGrowthModifierLeadership;
INT16 bGrowthModifierMedical;
INT16 bGrowthModifierMechanical;
INT16 bGrowthModifierExpLevel;
// changed by SANDRO
INT8 bOldSkillTrait;
INT8 bOldSkillTrait2;
+14 -1
View File
@@ -1700,7 +1700,20 @@ void CheckSquadMovementGroups( void )
for (INT8 iSoldier = 0; iSoldier < NUMBER_OF_SOLDIERS_PER_SQUAD; iSoldier++) {
if (Squad[iSquad][iSoldier] != NULL)
{
Squad[iSquad][iSoldier]->ubGroupID = pGroup->ubGroupID;
if (IsVehicle(Squad[iSquad][iSoldier]))
{
INT32 iCounter = 0;
for (iCounter = 0; iCounter < ubNumberOfVehicles; iCounter++)
{
if (pVehicleList[iCounter].ubProfileID == Squad[iSquad][iSoldier]->ubProfile)
break;
}
Squad[iSquad][iSoldier]->ubGroupID = pVehicleList[iCounter].ubMovementGroup;
}
else
{
Squad[iSquad][iSoldier]->ubGroupID = pGroup->ubGroupID;
}
}
}
}
+7 -8
View File
@@ -7479,8 +7479,8 @@ UINT32 CalcChanceToHitGun(SOLDIERTYPE *pSoldier, INT32 sGridNo, INT16 ubAimTime,
}
else
{
INT16 moda = GetToHitBonus(pInHand, iRange, bLightLevel, stance && iRange > MIN_PRONE_RANGE);
INT16 modb = GetToHitBonus(pInHand, iRange, bLightLevel, gAnimControl[pSoldier->usAnimState].ubEndHeight && iRange > MIN_PRONE_RANGE);
INT16 moda = GetToHitBonus(pInHand, iRange, bLightLevel, stance == ANIM_PRONE && iRange > MIN_PRONE_RANGE);
INT16 modb = GetToHitBonus(pInHand, iRange, bLightLevel, gAnimControl[pSoldier->usAnimState].ubEndHeight == ANIM_PRONE && iRange > MIN_PRONE_RANGE);
iChance += (INT32)((gGameExternalOptions.ubProneModifierPercentage * moda + (100 - gGameExternalOptions.ubProneModifierPercentage) * modb) / 100);
}
@@ -10175,10 +10175,10 @@ INT32 CalcMaxTossRange( SOLDIERTYPE * pSoldier, UINT16 usItem, BOOLEAN fArmed, O
iRange += ((iRange * gSkillTraitValues.ubTHBladesMaxRange ) / 100);
}
// sevenfm: add range only for hand grenades and not launched grenades
else if ( (Item[ usItem ].usItemClass == IC_GRENADE) && Item[usItem].ubCursor == TOSSCURS && (HAS_SKILL_TRAIT( pSoldier, DEMOLITIONS_NT )) )
else if ( (Item[ usItem ].usItemClass == IC_GRENADE) && Item[usItem].ubCursor == TOSSCURS && HAS_SKILL_TRAIT( pSoldier, THROWING_NT ) )
{
// better max range due to expertise
iRange += ((iRange * gSkillTraitValues.ubDEMaxRangeToThrowGrenades) / 100);
iRange += ((iRange * gSkillTraitValues.ubTHMaxRangeToThrowGrenades) / 100);
}
}
else
@@ -10260,9 +10260,8 @@ UINT32 CalcThrownChanceToHit(SOLDIERTYPE *pSoldier, INT32 sGridNo, INT16 ubAimTi
else
{
iChance += gSkillTraitValues.bCtHModifierThrowingGrenades; // -10% for untrained mercs
if ( HAS_SKILL_TRAIT( pSoldier, DEMOLITIONS_NT ) )
iChance += gSkillTraitValues.ubDECtHWhenThrowingGrenades; // +30% chance
if ( HAS_SKILL_TRAIT( pSoldier, THROWING_NT ) )
iChance += gSkillTraitValues.ubTHCtHWhenThrowingGrenades;
}
}
else
@@ -12196,4 +12195,4 @@ BOOLEAN ArtilleryStrike( UINT16 usItem, UINT8 ubOwnerID, UINT32 usStartingGridNo
//REAL_OBJECT* pObject = &( ObjectSlots[ iID ] );
return TRUE;
}
}
+2 -2
View File
@@ -157,8 +157,8 @@ typedef PARSE_STAGE;
#define ALTSECTORSFILENAME "Map\\AltSectors.xml"
#define SAMSITESFILENAME "Map\\SamSites.xml"
#define HELISITESFILENAME "Map\\HeliSites.xml"
#define EXTRAITEMSFILENAME "Map\\A9_0_ExtraItems" // ".xml" will be added @runtime
#define EXTRAITEMSFILENAME2 "Map\\A11_0_ExtraItems" // ".xml" will be added @runtime
#define EXTRAITEMSFILENAME "Map\\ExtraItems\\A9_0_ExtraItems" // ".xml" will be added @runtime
#define EXTRAITEMSFILENAME2 "Map\\ExtraItems\\A11_0_ExtraItems" // ".xml" will be added @runtime
#define SHIPPINGDESTINATIONSFILENAME "Map\\ShippingDestinations.xml"
#define DELIVERYMETHODSFILENAME "Map\\DeliveryMethods.xml"
#define DELIVERYMETHODSFILENAME "Map\\DeliveryMethods.xml"
+31 -10
View File
@@ -20,6 +20,8 @@ struct
}
typedef attachmentParseData;
UINT32 gMAXATTACHMENTS_READ = 0;
static void XMLCALL
attachmentStartElementHandle(void *userData, const XML_Char *name, const XML_Char **atts)
{
@@ -93,9 +95,9 @@ attachmentEndElementHandle(void *userData, const XML_Char *name)
if(pData->curIndex < pData->maxArraySize)
{
//DebugMsg(TOPIC_JA2, DBG_LEVEL_3,"AttachmentStartElementHandle: writing attachment to array");
Attachment[pData->curIndex][0] = pData->curAttachment[0]; //write the attachment into the table
Attachment[pData->curIndex][1] = pData->curAttachment[1];
Attachment[pData->curIndex][2] = pData->curAttachment[2];
Attachment[pData->curIndex].attachmentIndex = pData->curAttachment[0]; //write the attachment into the table
Attachment[pData->curIndex].itemIndex = pData->curAttachment[1];
Attachment[pData->curIndex].APCost = pData->curAttachment[2];
}
}
else if(strcmp(name, "attachmentIndex") == 0)
@@ -127,7 +129,25 @@ attachmentEndElementHandle(void *userData, const XML_Char *name)
}
static void MapAttachments()
{
std::list<AttachmentStruct> stdList;
std::list<AttachmentStruct>::iterator it;
UINT32 i = 0;
for (i = 0; i < gMAXATTACHMENTS_READ; i++)
{
stdList.push_back(Attachment[i]);
AttachmentBackmap.insert(std::make_pair(Attachment[i].itemIndex, Attachment[i]));
}
stdList.sort();
for (it = stdList.begin(), i = 0; it != stdList.end(); it++, i++)
{
Attachment[i] = *it;
}
}
BOOLEAN ReadInAttachmentStats(STR fileName)
{
@@ -171,7 +191,6 @@ BOOLEAN ReadInAttachmentStats(STR fileName)
XML_SetUserData(parser, &pData);
if(!XML_Parse(parser, lpcBuffer, uiFSize, TRUE))
{
CHAR8 errorBuf[511];
@@ -183,13 +202,15 @@ BOOLEAN ReadInAttachmentStats(STR fileName)
return FALSE;
}
gMAXATTACHMENTS_READ = pData.curIndex + 1;
MapAttachments();
MemFree(lpcBuffer);
XML_ParserFree(parser);
return( TRUE );
}
BOOLEAN WriteAttachmentStats()
{
HWFILE hFile;
@@ -208,10 +229,10 @@ BOOLEAN WriteAttachmentStats()
{
FilePrintf(hFile,"\t<ATTACHMENT>\r\n");
FilePrintf(hFile,"\t\t<attachmentIndex>%d</attachmentIndex>\r\n", Attachment[cnt][0]);
FilePrintf(hFile,"\t\t<itemIndex>%d</itemIndex>\r\n", Attachment[cnt][1]);
FilePrintf(hFile,"\t\t<APCost>%d</APCost>\r\n", Attachment[cnt][2]);
FilePrintf(hFile,"\t\t<NASOnly>%d</NASOnly>\r\n", Attachment[cnt][3]);
FilePrintf(hFile,"\t\t<attachmentIndex>%d</attachmentIndex>\r\n", Attachment[cnt].attachmentIndex);
FilePrintf(hFile,"\t\t<itemIndex>%d</itemIndex>\r\n", Attachment[cnt].itemIndex);
FilePrintf(hFile,"\t\t<APCost>%d</APCost>\r\n", Attachment[cnt].APCost);
FilePrintf(hFile,"\t\t<NASOnly>%d</NASOnly>\r\n", Attachment[cnt].NASOnly);
FilePrintf(hFile,"\t</ATTACHMENT>\r\n");
}
+4 -2
View File
@@ -19,6 +19,8 @@ struct
}
typedef launchableParseData;
UINT32 gMAXLAUNCHABLES_READ = 0;
static void XMLCALL
launchableStartElementHandle(void *userData, const XML_Char *name, const XML_Char **atts)
{
@@ -168,9 +170,9 @@ BOOLEAN ReadInLaunchableStats(STR fileName)
return FALSE;
}
gMAXLAUNCHABLES_READ = pData.curIndex + 1;
MemFree(lpcBuffer);
XML_ParserFree(parser);
return( TRUE );
+88 -6
View File
@@ -101,7 +101,19 @@ profileStartElementHandle(void *userData, const XML_Char *name, const XML_Char *
strcmp(name, "bMedical") == 0 ||
strcmp(name, "bMechanical") == 0 ||
strcmp(name, "bExpLevel") == 0 ||
strcmp(name, "bEvolution") == 0 ||
strcmp(name, "fRegresses") == 0 ||
// rftr: growth rates are intended to replace the <bEvolution> tag, letting each stat have its own growth modifier
strcmp(name, "bGrowthModifierLife") == 0 ||
strcmp(name, "bGrowthModifierStrength") == 0 ||
strcmp(name, "bGrowthModifierAgility") == 0 ||
strcmp(name, "bGrowthModifierDexterity") == 0 ||
strcmp(name, "bGrowthModifierWisdom") == 0 ||
strcmp(name, "bGrowthModifierMarksmanship") == 0 ||
strcmp(name, "bGrowthModifierExplosive") == 0 ||
strcmp(name, "bGrowthModifierLeadership") == 0 ||
strcmp(name, "bGrowthModifierMedical") == 0 ||
strcmp(name, "bGrowthModifierMechanical") == 0 ||
strcmp(name, "bGrowthModifierExpLevel") == 0 ||
// added by SANDRO
strcmp(name, "bOldSkillTrait") == 0 ||
strcmp(name, "bOldSkillTrait2") == 0 ||
@@ -280,7 +292,18 @@ profileEndElementHandle(void *userData, const XML_Char *name)
tempProfiles[pData->curIndex].bMechanical = pData->curProfile.bMechanical;
tempProfiles[pData->curIndex].bExpLevel = pData->curProfile.bExpLevel;
tempProfiles[pData->curIndex].bEvolution = pData->curProfile.bEvolution;
tempProfiles[pData->curIndex].fRegresses = pData->curProfile.fRegresses;
tempProfiles[pData->curIndex].bGrowthModifierLife = pData->curProfile.bGrowthModifierLife;
tempProfiles[pData->curIndex].bGrowthModifierStrength = pData->curProfile.bGrowthModifierStrength;
tempProfiles[pData->curIndex].bGrowthModifierAgility = pData->curProfile.bGrowthModifierAgility;
tempProfiles[pData->curIndex].bGrowthModifierDexterity = pData->curProfile.bGrowthModifierDexterity;
tempProfiles[pData->curIndex].bGrowthModifierWisdom = pData->curProfile.bGrowthModifierWisdom;
tempProfiles[pData->curIndex].bGrowthModifierMarksmanship = pData->curProfile.bGrowthModifierMarksmanship;
tempProfiles[pData->curIndex].bGrowthModifierExplosive = pData->curProfile.bGrowthModifierExplosive;
tempProfiles[pData->curIndex].bGrowthModifierLeadership = pData->curProfile.bGrowthModifierLeadership;
tempProfiles[pData->curIndex].bGrowthModifierMedical = pData->curProfile.bGrowthModifierMedical;
tempProfiles[pData->curIndex].bGrowthModifierMechanical = pData->curProfile.bGrowthModifierMechanical;
tempProfiles[pData->curIndex].bGrowthModifierExpLevel = pData->curProfile.bGrowthModifierExpLevel;
// added by SANDRO
tempProfiles[pData->curIndex].bOldSkillTrait = pData->curProfile.bOldSkillTrait;
tempProfiles[pData->curIndex].bOldSkillTrait2 = pData->curProfile.bOldSkillTrait2;
@@ -586,11 +609,70 @@ profileEndElementHandle(void *userData, const XML_Char *name)
pData->curElement = ELEMENT;
pData->curProfile.bExpLevel = (UINT32) strtoul(pData->szCharData, NULL, 0);
}
else if(strcmp(name, "bEvolution") == 0)
else if(strcmp(name, "fRegresses") == 0)
{
pData->curElement = ELEMENT;
pData->curProfile.bEvolution = (UINT32) strtoul(pData->szCharData, NULL, 0);
pData->curProfile.fRegresses = (BOOLEAN) strtoul(pData->szCharData, NULL, 0);
}
else if (strncmp(name, "bGrowthModifier", 11) == 0) // doing this to avoid C1061
{
if (strcmp(name, "bGrowthModifierLife") == 0)
{
pData->curElement = ELEMENT;
pData->curProfile.bGrowthModifierLife = (UINT32)strtoul(pData->szCharData, NULL, 0);
}
else if(strcmp(name, "bGrowthModifierStrength") == 0)
{
pData->curElement = ELEMENT;
pData->curProfile.bGrowthModifierStrength = (UINT32)strtoul(pData->szCharData, NULL, 0);
}
else if(strcmp(name, "bGrowthModifierAgility") == 0)
{
pData->curElement = ELEMENT;
pData->curProfile.bGrowthModifierAgility = (UINT32)strtoul(pData->szCharData, NULL, 0);
}
else if(strcmp(name, "bGrowthModifierDexterity") == 0)
{
pData->curElement = ELEMENT;
pData->curProfile.bGrowthModifierDexterity = (UINT32)strtoul(pData->szCharData, NULL, 0);
}
else if(strcmp(name, "bGrowthModifierWisdom") == 0)
{
pData->curElement = ELEMENT;
pData->curProfile.bGrowthModifierWisdom = (UINT32)strtoul(pData->szCharData, NULL, 0);
}
else if(strcmp(name, "bGrowthModifierMarksmanship") == 0)
{
pData->curElement = ELEMENT;
pData->curProfile.bGrowthModifierMarksmanship = (UINT32)strtoul(pData->szCharData, NULL, 0);
}
else if(strcmp(name, "bGrowthModifierExplosive") == 0)
{
pData->curElement = ELEMENT;
pData->curProfile.bGrowthModifierExplosive = (UINT32)strtoul(pData->szCharData, NULL, 0);
}
else if(strcmp(name, "bGrowthModifierLeadership") == 0)
{
pData->curElement = ELEMENT;
pData->curProfile.bGrowthModifierLeadership = (UINT32)strtoul(pData->szCharData, NULL, 0);
}
else if(strcmp(name, "bGrowthModifierMedical") == 0)
{
pData->curElement = ELEMENT;
pData->curProfile.bGrowthModifierMedical = (UINT32)strtoul(pData->szCharData, NULL, 0);
}
else if(strcmp(name, "bGrowthModifierMechanical") == 0)
{
pData->curElement = ELEMENT;
pData->curProfile.bGrowthModifierMechanical = (UINT32)strtoul(pData->szCharData, NULL, 0);
}
else if(strcmp(name, "bGrowthModifierExpLevel") == 0)
{
pData->curElement = ELEMENT;
pData->curProfile.bGrowthModifierExpLevel = (UINT32)strtoul(pData->szCharData, NULL, 0);
}
}
////////////////////////////////////////////////////////////////////////////
// SANDRO was here - messed this a bit
@@ -1600,7 +1682,7 @@ BOOLEAN WriteMercProfiles()
FilePrintf(hFile,"\t\t<bMedical>%d</bMedical>\r\n", gMercProfiles[ cnt ].bMedical);
FilePrintf(hFile,"\t\t<bMechanical>%d</bMechanical>\r\n", gMercProfiles[ cnt ].bMechanical);
FilePrintf(hFile,"\t\t<bExpLevel>%d</bExpLevel>\r\n", gMercProfiles[ cnt ].bExpLevel);
FilePrintf(hFile,"\t\t<bEvolution>%d</bEvolution>\r\n", gMercProfiles[ cnt ].bEvolution);
FilePrintf(hFile,"\t\t<fRegresses>%d</fRegresses>\r\n", gMercProfiles[ cnt ].fRegresses);
////////////////////////////////////////////////////////////////////////////////////////////
// SANDRO - old/new traits
if (gGameOptions.fNewTraitSystem)
+15 -13
View File
@@ -402,18 +402,7 @@ typedef enum
NUM_SEXIST
} SexistLevels;
// training defines for evolution, no stat increase, stat decrease( de-evolve )
typedef enum
{
NORMAL_EVOLUTION =0,
NO_EVOLUTION,
DEVOLVE,
THREEQUARTER_EVOLUTION,
HALF_EVOLUTION,
ONEQUARTER_EVOLUTION,
} CharacterEvolution;
// rftr: removed the CharacterEvolution enum as it was replaced by growth modifiers
#define BUDDY_MERC( prof, bud ) ((prof)->bBuddy[0] == (bud) || (prof)->bBuddy[1] == (bud) || (prof)->bBuddy[2] == (bud) || (prof)->bBuddy[3] == (bud) || (prof)->bBuddy[4] == (bud) || ( (prof)->bLearnToLike == (bud) && (prof)->bLearnToLikeCount == 0 ) )
#define HATED_MERC( prof, hat ) ((prof)->bHated[0] == (hat) || (prof)->bHated[1] == (hat) || (prof)->bHated[2] == (hat) || (prof)->bHated[3] == (hat) || (prof)->bHated[4] == (hat) || ( (prof)->bLearnToHate == (hat) && (prof)->bLearnToHateCount == 0 ) )
@@ -789,7 +778,7 @@ public:
INT8 bSex;
INT8 bArmourAttractiveness;
UINT8 ubMiscFlags2;
INT8 bEvolution;
BOOLEAN fRegresses;
UINT8 ubMiscFlags;
UINT8 bSexist;
UINT8 bLearnToHate;
@@ -1009,6 +998,19 @@ public:
// Flugente: type of profile
UINT32 Type;
// rftr: growth modifiers - ignored if fRegresses is TRUE
INT16 bGrowthModifierLife;
INT16 bGrowthModifierStrength;
INT16 bGrowthModifierAgility;
INT16 bGrowthModifierDexterity;
INT16 bGrowthModifierWisdom;
INT16 bGrowthModifierMarksmanship;
INT16 bGrowthModifierExplosive;
INT16 bGrowthModifierLeadership;
INT16 bGrowthModifierMedical;
INT16 bGrowthModifierMechanical;
INT16 bGrowthModifierExpLevel;
}; // MERCPROFILESTRUCT;
// WANNE - BMP: DONE!
+6 -6
View File
@@ -808,7 +808,7 @@ INT32 GetEffectiveApproachValue( UINT8 usProfile, UINT8 usApproach, CHAR16* apSt
if ( apStr )
{
swprintf( atStr, szLaptopStatText[0], threateneffectiveness );
swprintf( atStr, szLaptopStatText[LAPTOP_STAT_TEXT_THREATEN_EFFECTIVENESS], threateneffectiveness );
wcscat( apStr, atStr );
}
@@ -818,7 +818,7 @@ INT32 GetEffectiveApproachValue( UINT8 usProfile, UINT8 usApproach, CHAR16* apSt
{
if ( apStr )
{
swprintf( atStr, szLaptopStatText[1], gMercProfiles[usProfile].bLeadership );
swprintf( atStr, szLaptopStatText[LAPTOP_STAT_TEXT_LEADERSHIP], gMercProfiles[usProfile].bLeadership );
wcscat( apStr, atStr );
}
@@ -829,7 +829,7 @@ INT32 GetEffectiveApproachValue( UINT8 usProfile, UINT8 usApproach, CHAR16* apSt
if ( apStr )
{
swprintf( atStr, szLaptopStatText[2], approachfactor );
swprintf( atStr, szLaptopStatText[LAPTOP_STAT_TEXT_APPROACH_MODIFIER], approachfactor );
wcscat( apStr, atStr );
}
@@ -855,7 +855,7 @@ INT32 GetEffectiveApproachValue( UINT8 usProfile, UINT8 usApproach, CHAR16* apSt
if ( apStr )
{
swprintf( atStr, szLaptopStatText[3], bgmodifier );
swprintf( atStr, szLaptopStatText[LAPTOP_STAT_TEXT_BACKGROUND_MODIFIER], bgmodifier );
wcscat( apStr, atStr );
}
@@ -868,7 +868,7 @@ INT32 GetEffectiveApproachValue( UINT8 usProfile, UINT8 usApproach, CHAR16* apSt
swprintf( atStr, L" \n" );
wcscat( apStr, atStr );
swprintf( atStr, szLaptopStatText[4] );
swprintf( atStr, szLaptopStatText[LAPTOP_STAT_TEXT_ASSERTIVE] );
wcscat( apStr, atStr );
}
else if ( DoesMercHavePersonality( pSoldier, CHAR_TRAIT_MALICIOUS ) )
@@ -876,7 +876,7 @@ INT32 GetEffectiveApproachValue( UINT8 usProfile, UINT8 usApproach, CHAR16* apSt
swprintf( atStr, L" \n" );
wcscat( apStr, atStr );
swprintf( atStr, szLaptopStatText[5] );
swprintf( atStr, szLaptopStatText[LAPTOP_STAT_TEXT_MALICIOUS] );
wcscat( apStr, atStr );
}
}
+6
View File
@@ -1009,6 +1009,12 @@ BOOLEAN UpdateVideoOverlay( VIDEO_OVERLAY_DESC *pTopmostDesc, UINT32 iBlitterInd
}
}
if ( uiFlags & VOVERLAY_DESC_FONT )
{
gVideoOverlays[iBlitterIndex].uiFontID = pTopmostDesc->uiFontID;
gVideoOverlays[iBlitterIndex].ubFontBack = pTopmostDesc->ubFontBack;
gVideoOverlays[iBlitterIndex].ubFontFore = pTopmostDesc->ubFontFore;
}
if ( uiFlags & VOVERLAY_DESC_DISABLED )
{
+2 -1
View File
@@ -15,9 +15,10 @@
#define VOVERLAY_STARTDISABLED 0x00000002
#define VOVERLAY_DESC_TEXT 0x00001000
#define VOVERLAY_DESC_TEXT 0x00001000
#define VOVERLAY_DESC_DISABLED 0x00002000
#define VOVERLAY_DESC_POSITION 0x00004000
#define VOVERLAY_DESC_FONT 0x00008000
// STRUCTURES
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1914,10 +1914,10 @@ INT8 DamageStructure( STRUCTURE * pStructure, UINT8 ubDamage, UINT8 ubReason, IN
//Since the structure is being damaged, set the map element that a structure is damaged
gpWorldLevelData[ tmpgridno ].uiFlags |= MAPELEMENT_STRUCTURE_DAMAGED;
// handle structure revenge - damage to vehicle
// handle structure revenge - damage to vehicle - to be resolved after movement
if ( ubOwner != NOBODY && MercPtrs[ubOwner] && !ARMED_VEHICLE( MercPtrs[ubOwner] ) )
{
MercPtrs[ ubOwner ]->SoldierTakeDamage( 0, Random(max(0,(ubBaseArmour-10)/5))+max(0,(ubBaseArmour-10)/5), 0, TAKE_DAMAGE_STRUCTURE_EXPLOSION, NOBODY, MercPtrs[ ubOwner ]->sGridNo, 0, TRUE );
MercPtrs[ubOwner]->SoldierTakeDelayedDamage(0, Random(max(0,(ubBaseArmour-10)/5)) + max(0,(ubBaseArmour-10)/5), 0, TAKE_DAMAGE_STRUCTURE_EXPLOSION, NOBODY, MercPtrs[ ubOwner ]->sGridNo, 0, TRUE);
}
// recompile = TRUE means that we destroyed something
+40 -17
View File
@@ -14,6 +14,7 @@
#include "WordWrap.h"
#include "Message.h"
#include "Text.h"
#include "Loading Screen.h"
double rStart, rEnd;
double rActual;
@@ -63,10 +64,31 @@ void CreateLoadingScreenProgressBar(BOOLEAN resetLoadScreenHint)
// CreateProgressBar(0, 259 + ((SCREEN_WIDTH - 1024) / 2), 683 + ((SCREEN_HEIGHT - 768) / 2), 767 + ((SCREEN_WIDTH - 1024) / 2), 708 + ((SCREEN_HEIGHT - 768) / 2));
// }
//}
CreateProgressBar(0, SCREEN_WIDTH*162/640, SCREEN_HEIGHT*427/480, SCREEN_WIDTH*480/640, SCREEN_HEIGHT*443/480);
FLOAT fScreenAspectRatio = (FLOAT)SCREEN_WIDTH / (FLOAT)SCREEN_HEIGHT;
if (gGameExternalOptions.ubLoadscreenStretchMode == 1 ||
(gGameExternalOptions.ubLoadscreenStretchMode == 2 && fLoadingScreenAspectRatio > fScreenAspectRatio))
{
// match height, preserve aspect ratioernalOptions.ubLoadscreenStretchMode == 2 && fLoadingScreenAspectRatio > fScreenAspectRatio))
INT32 iCalculatedWidth = (INT32)(SCREEN_HEIGHT * fLoadingScreenAspectRatio + 0.5f);
UINT16 usLeft = (UINT16)((SCREEN_WIDTH - iCalculatedWidth) / 2 + (iCalculatedWidth * 162.0f / 640.0f) + 0.5f);
UINT16 usTop = (UINT16)((SCREEN_HEIGHT * 427.0f / 480.0f) + 0.5f);
UINT16 usRight = (UINT16)((SCREEN_WIDTH - iCalculatedWidth) / 2 + (iCalculatedWidth * 478.0f / 640.0f) + 0.5f);
UINT16 usBottom = (UINT16)((SCREEN_HEIGHT * 443.0f / 480.0f) + 0.5f);
CreateProgressBar(0, usLeft, usTop, usRight, usBottom);
}
else
{
UINT16 usLeft = (UINT16)((SCREEN_WIDTH * 162.0f / 640.0f) + 0.5f);
UINT16 usTop = (UINT16)((SCREEN_HEIGHT * 427.0f / 480.0f) + 0.5f);
UINT16 usRight = (UINT16)((SCREEN_WIDTH * 478.0f / 640.0f) + 0.5f);
UINT16 usBottom = (UINT16)((SCREEN_HEIGHT * 443.0f / 480.0f) + 0.5f);
CreateProgressBar(0, usLeft, usTop, usRight, usBottom);
}
SetProgressBarUseBorder(0, FALSE );
}
@@ -334,6 +356,8 @@ void SetRelativeStartAndEndPercentage( UINT8 ubID, UINT16 uiRelStartPerc, UINT16
pCurr->rStart = (double)uiRelStartPerc*0.01f;
pCurr->rEnd = (double)uiRelEndPerc*0.01f;
UINT8 yTextOffset = (UINT8)(3.0f * SCREEN_HEIGHT / 480.0f + 0.5f);
//Render the entire panel now, as it doesn't need update during the normal rendering
if( pCurr->fPanel )
{
@@ -352,7 +376,7 @@ void SetRelativeStartAndEndPercentage( UINT8 ubID, UINT16 uiRelStartPerc, UINT16
usStartX = pCurr->usPanelLeft + // left position
(pCurr->usPanelRight - pCurr->usPanelLeft)/2 - // + half width
StringPixLength( pCurr->swzTitle, pCurr->usTitleFont ) / 2; // - half string width
usStartY = pCurr->usPanelTop + 3;
usStartY = pCurr->usPanelTop + yTextOffset;
SetFont( pCurr->usTitleFont );
SetFontForeground( pCurr->ubTitleFontForeColor );
SetFontShadow( pCurr->ubTitleFontShadowColor );
@@ -370,21 +394,21 @@ void SetRelativeStartAndEndPercentage( UINT8 ubID, UINT16 uiRelStartPerc, UINT16
{
UINT16 usFontHeight = GetFontHeight( pCurr->usMsgFont );
RestoreExternBackgroundRect( pCurr->usBarLeft, pCurr->usBarBottom, (INT16)(pCurr->usBarRight-pCurr->usBarLeft), (INT16)(usFontHeight + 3) );
RestoreExternBackgroundRect( pCurr->usBarLeft, pCurr->usBarBottom, (INT16)(pCurr->usBarRight-pCurr->usBarLeft), (INT16)(usFontHeight + yTextOffset) );
}
SetFont( pCurr->usMsgFont );
SetFontForeground( pCurr->ubMsgFontForeColor );
SetFontShadow( pCurr->ubMsgFontShadowColor );
SetFontBackground( 0 );
mprintf( pCurr->usBarLeft, pCurr->usBarBottom + 3, str );
mprintf( pCurr->usBarLeft, pCurr->usBarBottom + yTextOffset, str );
}
}
// Flugente: loadscreen hints
if (gGameExternalOptions.gfUseLoadScreenHints && usCurrentLoadScreenHint )
{
ShowLoadScreenHintInLoadScreen(pCurr->usBarBottom + 3 - 100);
ShowLoadScreenHintInLoadScreen(pCurr->usBarBottom + yTextOffset - 100);
}
}
@@ -408,25 +432,24 @@ void RenderProgressBar( UINT8 ubID, UINT32 uiPercentage )
if( pCurr )
{
rActual = pCurr->rStart+(pCurr->rEnd-pCurr->rStart)*uiPercentage*0.01;
rActual = pCurr->rStart + (pCurr->rEnd - pCurr->rStart) * uiPercentage * 0.01;
if( fabs(rActual - pCurr->rLastActual) < 0.01 )
pCurr->rLastActual = (DOUBLE)((INT32)(std::round(rActual * 100)) * 0.01);
end = (INT32)(pCurr->usBarLeft + std::round(rActual * (pCurr->usBarRight - pCurr->usBarLeft)));
if (end < pCurr->usBarLeft)
{
return;
end = pCurr->usBarLeft;
}
pCurr->rLastActual = ( DOUBLE )( ( INT32)( rActual * 100 ) * 0.01 );
end = (INT32)(pCurr->usBarLeft+2.0+rActual*(pCurr->usBarRight-pCurr->usBarLeft-4));
if( end < pCurr->usBarLeft+2 || end > pCurr->usBarRight-2 )
else if (end > pCurr->usBarRight)
{
return;
end = pCurr->usBarRight;
}
if( !pCurr->fDrawBorder )
{
ColorFillVideoSurfaceArea( pCurr->uiFrameBuffer, //FRAME_BUFFER,
pCurr->usBarLeft, pCurr->usBarTop, end, pCurr->usBarBottom,
Get16BPPColor(FROMRGB( pCurr->ubColorFillRed, pCurr->ubColorFillGreen, pCurr->ubColorFillBlue )) );
Get16BPPColor(FROMRGB(pCurr->ubColorFillRed, pCurr->ubColorFillGreen, pCurr->ubColorFillBlue)));
//if( pCurr->usBarRight > gusLeftmostShaded )
//{
// ShadowVideoSurfaceRect( FRAME_BUFFER, gusLeftmostShaded+1, pCurr->usBarTop, end, pCurr->usBarBottom );
@@ -493,7 +516,7 @@ void SetProgressBarTextDisplayFlag( UINT8 ubID, BOOLEAN fDisplayText, BOOLEAN fU
//if we are to use the save buffer, blit the portion of the screen to the save buffer
if( fSaveScreenToFrameBuffer )
{
UINT16 usFontHeight = GetFontHeight( pCurr->usMsgFont )+3;
UINT16 usFontHeight = GetFontHeight(pCurr->usMsgFont) + (UINT8)(3.0f * SCREEN_HEIGHT / 480.f + 0.5f);
//blit everything to the save buffer ( cause the save buffer can bleed through )
BlitBufferToBuffer(guiRENDERBUFFER, guiSAVEBUFFER, pCurr->usBarLeft, pCurr->usBarBottom, (UINT16)(pCurr->usBarRight-pCurr->usBarLeft), usFontHeight );
+36
View File
@@ -76,6 +76,15 @@ BOOLEAN GetMLGFilename( SGPFILENAME filename, UINT16 usMLGGraphicID )
case MLG_PREBATTLEPANEL:
sprintf( filename, "INTERFACE\\PreBattlePanel.sti" );
return TRUE;
case MLG_PREBATTLEPANEL_800x600:
sprintf(filename, "INTERFACE\\PreBattlePanel_800x600.sti");
return TRUE;
case MLG_PREBATTLEPANEL_1024x768:
sprintf(filename, "INTERFACE\\PreBattlePanel_1024x768.sti");
return TRUE;
case MLG_PREBATTLEPANEL_1280x720:
sprintf(filename, "INTERFACE\\PreBattlePanel_1280x720.sti");
return TRUE;
case MLG_SMALLTITLE:
sprintf( filename, "LAPTOP\\SmallTitle.sti" );
return TRUE;
@@ -203,6 +212,15 @@ BOOLEAN GetMLGFilename( SGPFILENAME filename, UINT16 usMLGGraphicID )
case MLG_PREBATTLEPANEL:
sprintf( filename, "GERMAN\\PreBattlePanel_german.sti" );
return TRUE;
case MLG_PREBATTLEPANEL_800x600:
sprintf(filename, "GERMAN\\PreBattlePanel_800x600_german.sti");
return TRUE;
case MLG_PREBATTLEPANEL_1024x768:
sprintf(filename, "GERMAN\\PreBattlePanel_1024x768_german.sti");
return TRUE;
case MLG_PREBATTLEPANEL_1280x720:
sprintf(filename, "GERMAN\\PreBattlePanel_1280x720_german.sti");
return TRUE;
case MLG_SMALLTITLE:
sprintf( filename, "GERMAN\\SmallTitle_german.sti" );
return TRUE;
@@ -368,6 +386,15 @@ BOOLEAN GetMLGFilename( SGPFILENAME filename, UINT16 usMLGGraphicID )
case MLG_PREBATTLEPANEL:
sprintf( filename, "%s\\PreBattlePanel_%s.sti", zLanguage, zLanguage );
break;
case MLG_PREBATTLEPANEL_800x600:
sprintf(filename, "%s\\PreBattlePanel_800x600_%s.sti", zLanguage, zLanguage);
break;
case MLG_PREBATTLEPANEL_1024x768:
sprintf(filename, "%s\\PreBattlePanel_1024x768_%s.sti", zLanguage, zLanguage);
break;
case MLG_PREBATTLEPANEL_1280x720:
sprintf(filename, "%s\\PreBattlePanel_1280x720_%s.sti", zLanguage, zLanguage);
break;
case MLG_SMALLTITLE:
sprintf( filename, "%s\\SmallTitle_%s.sti", zLanguage, zLanguage );
break;
@@ -492,6 +519,15 @@ BOOLEAN GetMLGFilename( SGPFILENAME filename, UINT16 usMLGGraphicID )
case MLG_PREBATTLEPANEL:
sprintf( filename, "INTERFACE\\PreBattlePanel.sti" );
return TRUE;
case MLG_PREBATTLEPANEL_800x600:
sprintf(filename, "INTERFACE\\PreBattlePanel_800x600.sti");
return TRUE;
case MLG_PREBATTLEPANEL_1024x768:
sprintf(filename, "INTERFACE\\PreBattlePanel_1024x768.sti");
return TRUE;
case MLG_PREBATTLEPANEL_1280x720:
sprintf(filename, "INTERFACE\\PreBattlePanel_1280x720.sti");
return TRUE;
case MLG_SMALLTITLE:
sprintf( filename, "LAPTOP\\SmallTitle.sti" );
return TRUE;
+3
View File
@@ -26,6 +26,9 @@ enum
MLG_OPTIONHEADER, //OptionScreenAddOns
MLG_ORDERGRID,
MLG_PREBATTLEPANEL,
MLG_PREBATTLEPANEL_800x600,
MLG_PREBATTLEPANEL_1024x768,
MLG_PREBATTLEPANEL_1280x720,
MLG_SECTORINVENTORY,
MLG_SMALLFLORISTSYMBOL, //SmallSymbol
MLG_SMALLTITLE,
+30
View File
@@ -3084,6 +3084,36 @@ extern STR16 szSMilitiaResourceText[];
extern STR16 szInteractiveActionText[];
extern STR16 szLaptopStatText[];
enum
{
LAPTOP_STAT_TEXT_THREATEN_EFFECTIVENESS,
LAPTOP_STAT_TEXT_LEADERSHIP,
LAPTOP_STAT_TEXT_APPROACH_MODIFIER,
LAPTOP_STAT_TEXT_BACKGROUND_MODIFIER,
LAPTOP_STAT_TEXT_ASSERTIVE,
LAPTOP_STAT_TEXT_MALICIOUS,
LAPTOP_STAT_TEXT_GOOD_GUY,
LAPTOP_STAT_TEXT_REFUSES_TO_ATTACK_NON_HOSTILES,
LAPTOP_STAT_TEXT_FRIENDLY_APPROACH,
LAPTOP_STAT_TEXT_DIRECT_APPROACH,
LAPTOP_STAT_TEXT_THREATEN_APPROACH,
LAPTOP_STAT_TEXT_RECRUIT_APPROACH,
LAPTOP_STAT_TEXT_MERC_REGRESSES,
LAPTOP_STAT_TEXT_FAST,
LAPTOP_STAT_TEXT_AVERAGE,
LAPTOP_STAT_TEXT_SLOW,
LAPTOP_STAT_TEXT_HEALTH_SPEED,
LAPTOP_STAT_TEXT_STRENGTH_SPEED,
LAPTOP_STAT_TEXT_AGILITY_SPEED,
LAPTOP_STAT_TEXT_DEXTERITY_SPEED,
LAPTOP_STAT_TEXT_WISDOM_SPEED,
LAPTOP_STAT_TEXT_MARKSMANSHIP_SPEED,
LAPTOP_STAT_TEXT_EXPLOSIVES_SPEED,
LAPTOP_STAT_TEXT_LEADERSHIP_SPEED,
LAPTOP_STAT_TEXT_MEDICAL_SPEED,
LAPTOP_STAT_TEXT_MECHANICAL_SPEED,
LAPTOP_STAT_TEXT_EXPERIENCE_SPEED,
};
// Flugente: gear templates
extern STR16 szGearTemplateText[];
+6 -3
View File
@@ -1600,9 +1600,12 @@ BOOLEAN ReadInItemStats(STR fileName, BOOLEAN localizedVersion )
MemFree(lpcBuffer);
return FALSE;
}
// item read was x -> x+1 items
++gMAXITEMS_READ;
if (localizedTextOnly == false)
{
// item read was x -> x+1 items
++gMAXITEMS_READ;
}
MemFree(lpcBuffer);
+26 -18
View File
@@ -3568,8 +3568,8 @@ STR16 gpStrategicString[] =
L"僵尸", //L"Zombie",
L"土匪", //L"Bandit",
L"土匪杀死了%d名平民,在%s分区。", //注:这里的%d和%s不可以随意放前面或后面,一定要按英文顺序,不然会出错。(%d和%s 在中文中不能反过来。) L"Bandits attack and kill %d civilians in sector %s.",
L"Transport group",
L"Transport group en route",
L"运输队", //L"Transport group",
L"运输队已出发", //L"Transport group en route",
};
STR16 gpGameClockString[] =
@@ -6264,7 +6264,7 @@ STR16 z113FeaturesToggleText[] =
L"天气功能:暴风雪", //L"Weather: Snow",
L"随机事件功能", //L"Mini Events",
L"反抗军司令部功能", //L"Arulco Rebel Command",
L"Strategic Transport Groups",
L"战略运输队", //L"Strategic Transport Groups",
};
STR16 z113FeaturesHelpText[] =
@@ -6312,7 +6312,7 @@ STR16 z113FeaturesHelpText[] =
L"|天|气|功|能||暴|风|雪\n \n覆盖 [Tactical Weather Settings] ALLOW_SNOW\n \n暴风雪降低了能见度。\n \n配置选项:\nSNOW_EVENTS_PER_DAY\nSNOW_CHANCE_PER_DAY\nSNOW_MIN_LENGTH_IN_MINUTES\nSNOW_MAX_LENGTH_IN_MINUTES\nWEAPON_RELIABILITY_REDUCTION_SNOW\nBREATH_GAIN_REDUCTION_SNOW\nVISUAL_DISTANCE_DECREASE_SNOW\nHEARING_REDUCTION_SNOW\n \n", //L"|W|e|a|t|h|e|r|: |S|n|o|w\nOverrides [Tactical Weather Settings] ALLOW_SNOW\n \nSnowstorms decrease visibility.\n \nConfigurable Options:\nSNOW_EVENTS_PER_DAY\nSNOW_CHANCE_PER_DAY\nSNOW_MIN_LENGTH_IN_MINUTES\nSNOW_MAX_LENGTH_IN_MINUTES\nWEAPON_RELIABILITY_REDUCTION_SNOW\nBREATH_GAIN_REDUCTION_SNOW\nVISUAL_DISTANCE_DECREASE_SNOW\nHEARING_REDUCTION_SNOW",
L"|随|机|事|件|功|能\n \n覆盖 [Mini Events Settings] MINI_EVENTS_ENABLED\n \n可能发生一些随机互动事件。\n \n配置选项:\nMINI_EVENTS_MIN_HOURS_BETWEEN_EVENTS\nMINI_EVENTS_MAX_HOURS_BETWEEN_EVENTS\n \n详细信息请查看MiniEvents.lua。\n \n", //L"|M|i|n|i |E|v|e|n|t|s\nOverrides [Mini Events Settings] MINI_EVENTS_ENABLED\n \nRandom events can occur.\n \nConfigurable Options:\nMINI_EVENTS_MIN_HOURS_BETWEEN_EVENTS\nMINI_EVENTS_MAX_HOURS_BETWEEN_EVENTS\n \nSee MiniEvents.lua for more details.",
L"|反|抗|军|司|令|部|功|能\n \n覆盖 [Rebel Command Settings] REBEL_COMMAND_ENABLED\n \n允许你升级占领的城镇,控制反抗军在战略层面上运作。\n \n详细的内容设定请查看RebelCommand_Settings.ini。\n \n", //L"|A|R|C\nOverrides [Rebel Command Settings] REBEL_COMMAND_ENABLED\n \nCommand the rebel movement at the strategic level, and upgrade captured towns.\n \nFor tweakable values, see RebelCommand_Settings.ini.",
L"|S|t|r|a|t|e|g|i|c |T|r|a|n|s|p|o|r|t |G|r|o|u|p|s\nOverrides [Strategic Gameplay Settings] STRATEGIC_TRANSPORT_GROUPS_ENABLED\n \nTransport groups carry valuable equipment across the map.\n \nConfigurable Options:\nMAX_SIMULTANEOUS_STRATEGIC_TRANSPORT_GROUPS",
L"|战|略|运|输|队\n \n覆盖 [Strategic Gameplay Settings] STRATEGIC_TRANSPORT_GROUPS_ENABLED\n \n运输队在地图上运送有价值的装备。\n \n配置选项: \nMAX_SIMULTANEOUS_STRATEGIC_TRANSPORT_GROUPS", //L"|S|t|r|a|t|e|g|i|c |T|r|a|n|s|p|o|r|t |G|r|o|u|p|s\nOverrides [Strategic Gameplay Settings] STRATEGIC_TRANSPORT_GROUPS_ENABLED\n \nTransport groups carry valuable equipment across the map.\n \nConfigurable Options:\nMAX_SIMULTANEOUS_STRATEGIC_TRANSPORT_GROUPS",
};
STR16 z113FeaturesPanelText[] =
@@ -6360,7 +6360,7 @@ STR16 z113FeaturesPanelText[] =
L"启用暴风雪功能。在暴风雪中,更难被看到,武器退化更快,呼吸也更困难。", //L"Toggle snow. In a snowstorm, it is harder to see, weapons degrade faster, and it is a little harder to regain breath.",
L"在游戏过程中,可能会弹出简短的事件。您可以从两个选项中选择一个,这可能会产生积极或消极的影响。事件可以影响各种各样的事情,但主要是你的佣兵。", //L"During the course of a campaign, brief events can pop up. You can select one of two responses, which may have positive and/or negative effects. Events can affect a wide variety of things, but mostly your mercs.",
L"在完成反抗军食物运送任务后,你可以访问他们的(A.R.C)指挥部网站。在这里你可以设定反抗军的政策,也可以为占领区单独设置地方政策。这将带来丰厚的奖励。作为代价,城镇的民忠会上升得更慢,所以你需要更加努力地让当地人信任你。", //L"After completing the food delivery quest for the rebels, they will grant you access to their command website (A.R.C.). You can set the rebels' country-wide directive there, and capturing towns allows you to enact policies in that region that provide powerful bonuses. This comes at a price - town loyalty will rise slower, so you will need to work harder to have the locals trust you.",
L"The enemy sends groups across the map. If you can find and intercept them, they will probably have valuable gear. However, depending on your difficulty, each group that completes its transport mission provides the AI with strategic resources. Best experienced with Arulco Strategic Division enabled.",
L"敌人会在地图上派遣战略运输队,如果你能找到并截获它们就可能获取有价值的装备。但是,如果让敌人的运输队完成运输任务,那么就会给敌人提供战略资源(具体视难度而定)。要想获得最好体验,建议开启\"敌军战略司令部功能\"", //L"The enemy sends groups across the map. If you can find and intercept them, they will probably have valuable gear. However, depending on your difficulty, each group that completes its transport mission provides the AI with strategic resources. Best experienced with Arulco Strategic Division enabled.",
};
@@ -7672,7 +7672,7 @@ STR16 New113Message[] =
L"无线电操作失败!",
L"迫击炮弹不足,无法在分区发动密集轰炸!",
L"Items.xml里没有定义信号弹物品!",
L"No High-Explosive shell item found in Items.xml!",
L"Items.xml里没有定义高爆弹物品!", //L"No High-Explosive shell item found in Items.xml!",
L"未发现迫击炮,无法执行密集轰炸!",
L"干扰信号成功,不需要重复操作!",
L"正在监听周围声音,无需重复操作!",
@@ -8693,7 +8693,7 @@ STR16 szUDBGenSecondaryStatsTooltipText[]=
L"|医|用|夹|板", //L"|M|e|d|i|c|a|l |S|p|l|i|n|t",
L"|阻|燃|弹|药", //L"|F|i|r|e |R|e|t|a|r|d|a|n|t |A|m|m|o",
L"|燃|烧|弹|药", //L"|I|n|c|e|n|d|i|a|r|y |A|m|m|o",
L"|B|e|l|t| |F|e|d",
L"|弹|链|供|弹", //L"|B|e|l|t| |F|e|d",
};
STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]=
@@ -8749,7 +8749,7 @@ STR16 szUDBGenSecondaryStatsExplanationsTooltipText[]=
L"\n \n一旦应用, 这个物品可以提高对你的手臂\n或者腿部重伤的治疗速率。", //L"\n \nOnce applied, this item increases the healing\nspeed of severe wounds to either your arms or legs.",
L"\n \n这种弹药可以灭火。", //L"\n \nThis ammo can extinguish fire.",
L"\n \n这种弹药会引起燃烧(火灾)。", //L"\n \nThis ammo can cause fire.",
L"\n \nThis gun can be belt fed\nfrom a compatible LBE\nor by another merc.",
L"\n \n这种枪可以使用弹链供弹\n或者由LBE弹链供弹\n又或者由另一位佣兵供弹。", //L"\n \nThis gun can be belt fed\nfrom a compatible LBE\nor by another merc.",
};
STR16 szUDBAdvStatsTooltipText[]=
@@ -9330,7 +9330,7 @@ STR16 szBackgroundText_Value[]=
L" 对某些其他背景的厌恶 \n", //L" dislikes some other backgrounds\n",
L" 吸烟者", //L"Smoker",
L" 非吸烟者", //L"Nonsmoker",
L" %s%d% 蹲伏在可靠掩体后面对敌人的命中率 \n", //L" %s%d%% enemy CTH if crouched against thick cover in their direction\n",
L" %s%d% 敌军对蹲伏在掩体后佣兵的命中率 \n", //L" %s%d%% enemy CTH if crouched against thick cover in their direction\n",
L" %s%d% 建设速度 \n",//L" %s%d%% building speed\n",
L" 黑客技能:%s%d ",//L" hacking skill: %s%d ",
L" %s%d%% 掩埋尸体速度 \n", //L" %s%d%% burial speed\n",
@@ -11655,13 +11655,21 @@ STR16 szLaptopStatText[] =
L"威胁对话", //L"Threaten approach",
L"招募对话", //L"Recruit approach",
L"%s正以正常速度学习", //L"%s learns with normal speed.",
L"%s根本没有在学习。", //L"%s does not learn at all.",
L"%s遗忘了技能。", //L"%s unlearns his skills.",
L"%s正以3/4的速度学习。", //L"%s learns with 3/4 speed.",
L"%s正以1/2的速度学习。", //L"%s learns with 1/2 speed.",
L"%s正以1/4的速度学习。", //L"%s learns with 1/4 speed.",
L"统计倒退数据", //L"Stats will regress.",
L"快速", //L"Fast",
L"平均", //L"Average",
L"慢速", //L"Slow",
L"生命成长", //L"Health growth",
L"力量成长", //L"Strength growth",
L"敏捷成长", //L"Agility growth",
L"灵巧成长", //L"Dexterity growth",
L"智慧成长", //L"Wisdom growth",
L"枪法成长", //L"Marksmanship growth",
L"爆破成长", //L"Explosives growth",
L"领导成长", //L"Leadership growth",
L"医疗成长", //L"Medical growth",
L"机械成长", //L"Mechanical growth",
L"等级成长", //L"Experience growth",
};
STR16 szGearTemplateText[] =
@@ -12103,8 +12111,8 @@ STR16 szRebelCommandAgentMissionsText[] =
L"协同行动,悄悄地抵进敌军,但是要小心:这可能会让你部署在劣势区域。当进攻敌军部队时,部署区会更大。", //L"Coordinate efforts to find ways to sneak up on the enemy, but be careful: it's equally possible to put yourself in a disadvantaged deployment area. When attacking enemy forces, the deployment area is much larger.",
L"扰乱ASD", //L"Disrupt ASD",
L"破坏Arulco特种部门(ASD)的日常行动。临时阻止ASD部署更多的机械化单位,并且大幅度降低他们的每日收入。", //L"Wreak havoc on the day-to-day operations of the Arulco Special Division. Temporarily prevent the ASD from deploying additional mechanised units, and drastically reduce their daily income.",
L"Forge Transport Orders",
L"Create a bogus supply request. An enemy transport group will be ordered to rendezvous at this agent's location.",
L"伪造运输订单", //L"Forge Transport Orders",
L"创建一个虚假的运输请求,敌方的运输队就会在这个地点位置集合。", //L"Create a bogus supply request. An enemy transport group will be ordered to rendezvous at this agent's location.",
L"战略情报", //L"Strategic Intel",
L"侦听敌人,发现敌军的攻击目标。当在战略地图上观察队伍时,敌军优先进攻的目标区域会被标红。", //L"Intercept plans and discover where enemies intend to strike. When viewing teams on the strategic map, sectors prioritised by the enemy will be marked in red.",
L"强化本地商店", //L"Improve Local Shops",
+15 -7
View File
@@ -11664,13 +11664,21 @@ STR16 szLaptopStatText[] = // TODO.Translate
L"Threaten approach",
L"Recruit approach",
L"%s learns with normal speed.", // TODO.Translate
L"%s does not learn at all.",
L"%s unlearns his skills.",
L"%s learns with 3/4 speed.",
L"%s learns with 1/2 speed.",
L"%s learns with 1/4 speed.",
L"Stats will regress.",
L"Fast",
L"Average",
L"Slow",
L"Health growth",
L"Strength growth",
L"Agility growth",
L"Dexterity growth",
L"Wisdom growth",
L"Marksmanship growth",
L"Explosives growth",
L"Leadership growth",
L"Medical growth",
L"Mechanical growth",
L"Experience growth",
};
STR16 szGearTemplateText[] = // TODO.Translate
+15 -7
View File
@@ -11655,13 +11655,21 @@ STR16 szLaptopStatText[] =
L"Threaten approach",
L"Recruit approach",
L"%s learns with normal speed.",
L"%s does not learn at all.",
L"%s unlearns his skills.",
L"%s learns with 3/4 speed.",
L"%s learns with 1/2 speed.",
L"%s learns with 1/4 speed.",
L"Stats will regress.",
L"Fast",
L"Average",
L"Slow",
L"Health growth",
L"Strength growth",
L"Agility growth",
L"Dexterity growth",
L"Wisdom growth",
L"Marksmanship growth",
L"Explosives growth",
L"Leadership growth",
L"Medical growth",
L"Mechanical growth",
L"Experience growth",
};
STR16 szGearTemplateText[] =
+15 -7
View File
@@ -11646,13 +11646,21 @@ STR16 szLaptopStatText[] = // TODO.Translate
L"Threaten approach",
L"Recruit approach",
L"%s learns with normal speed.", // TODO.Translate
L"%s does not learn at all.",
L"%s unlearns his skills.",
L"%s learns with 3/4 speed.",
L"%s learns with 1/2 speed.",
L"%s learns with 1/4 speed.",
L"Stats will regress.",
L"Fast",
L"Average",
L"Slow",
L"Health growth",
L"Strength growth",
L"Agility growth",
L"Dexterity growth",
L"Wisdom growth",
L"Marksmanship growth",
L"Explosives growth",
L"Leadership growth",
L"Medical growth",
L"Mechanical growth",
L"Experience growth",
};
STR16 szGearTemplateText[] = // TODO.Translate
+15 -7
View File
@@ -11560,13 +11560,21 @@ STR16 szLaptopStatText[] =
L"Threaten approach",
L"Recruit approach",
L"%s learns with normal speed.", // TODO.Translate
L"%s does not learn at all.",
L"%s unlearns his skills.",
L"%s learns with 3/4 speed.",
L"%s learns with 1/2 speed.",
L"%s learns with 1/4 speed.",
L"Stats will regress.",
L"Fast",
L"Average",
L"Slow",
L"Health growth",
L"Strength growth",
L"Agility growth",
L"Dexterity growth",
L"Wisdom growth",
L"Marksmanship growth",
L"Explosives growth",
L"Leadership growth",
L"Medical growth",
L"Mechanical growth",
L"Experience growth",
};
// TODO.Translate
+15 -7
View File
@@ -11655,13 +11655,21 @@ STR16 szLaptopStatText[] = // TODO.Translate
L"Threaten approach",
L"Recruit approach",
L"%s learns with normal speed.", // TODO.Translate
L"%s does not learn at all.",
L"%s unlearns his skills.",
L"%s learns with 3/4 speed.",
L"%s learns with 1/2 speed.",
L"%s learns with 1/4 speed.",
L"Stats will regress.",
L"Fast",
L"Average",
L"Slow",
L"Health growth",
L"Strength growth",
L"Agility growth",
L"Dexterity growth",
L"Wisdom growth",
L"Marksmanship growth",
L"Explosives growth",
L"Leadership growth",
L"Medical growth",
L"Mechanical growth",
L"Experience growth",
};
STR16 szGearTemplateText[] = // TODO.Translate
+3 -3
View File
@@ -310,6 +310,9 @@ STR16 gzIMPMinorTraitsHelpTextsThrowing[]=
L"飞刀致命一击的额外伤害倍率 +%d\n",// L"+%d critical hit by throwing blade multiplier\n",
L"飞刀的最大精瞄次数 +%d\n",// L"Adds %d more aim click for throwing blades\n",
L"飞刀的最大精瞄次数 +%d\n",// L"Adds %d more aim clicks for throwing blades\n",
L"投掷手榴弹所需行动点 -%d%s\n",// L"-%d%s APs needed to throw grenades\n",
L"手榴弹最远投掷距离 +%d%s\n",// L"+%d%s max range when throwing grenades\n",
L"手榴弹的命中率 +%d%s\n",// L"+%d%s chance to hit when throwing grenades\n",
};
STR16 gzIMPMinorTraitsHelpTextsNightOps[]=
@@ -346,9 +349,6 @@ STR16 gzIMPMinorTraitsHelpTextsBodybuilding[]=
STR16 gzIMPMinorTraitsHelpTextsDemolitions[]=
{
L"投掷手榴弹所需行动点 -%d%s\n",// L"-%d%s APs needed to throw grenades\n",
L"手榴弹最远投掷距离 +%d%s\n",// L"+%d%s max range when throwing grenades\n",
L"手榴弹的命中率 +%d%s\n",// L"+%d%s chance to hit when throwing grenades\n",
L"安置的炸弹和地雷的伤害 +%d%s\n",// L"+%d%s damage of set bombs and mines\n",
L"组合炸弹的成功率 +%d%s\n",// L"+%d%s to attaching detonators check\n",
L"安置/拆除炸弹成功率 +%d%s\n",// L"+%d%s to planting/removing bombs check\n",
+3 -3
View File
@@ -310,6 +310,9 @@ STR16 gzIMPMinorTraitsHelpTextsThrowing[]=
L"+%d critical hit with throwing blade multiplier\n",
L"Adds %d more aim click for throwing blades\n",
L"Adds %d more aim clicks for throwing blades\n",
L"-%d%s APs to throw grenades\n",
L"+%d%s max range when throwing grenades\n",
L"+%d%s CtH when throwing grenades\n",
};
STR16 gzIMPMinorTraitsHelpTextsNightOps[]=
@@ -346,9 +349,6 @@ STR16 gzIMPMinorTraitsHelpTextsBodybuilding[]=
STR16 gzIMPMinorTraitsHelpTextsDemolitions[]=
{
L"-%d%s APs to throw grenades\n",
L"+%d%s max range when throwing grenades\n",
L"+%d%s CtH when throwing grenades\n",
L"+%d%s damage for set bombs and mines\n",
L"+%d%s to attaching detonators check\n",
L"+%d%s to planting/removing bombs check\n",
+3 -3
View File
@@ -310,6 +310,9 @@ STR16 gzIMPMinorTraitsHelpTextsThrowing[]=
L"+%d critical hit with throwing blade multiplier\n",
L"Adds %d more aim click for throwing blades\n",
L"Adds %d more aim clicks for throwing blades\n",
L"-%d%s APs to throw grenades\n",
L"+%d%s max range when throwing grenades\n",
L"+%d%s CtH when throwing grenades\n",
};
STR16 gzIMPMinorTraitsHelpTextsNightOps[]=
@@ -346,9 +349,6 @@ STR16 gzIMPMinorTraitsHelpTextsBodybuilding[]=
STR16 gzIMPMinorTraitsHelpTextsDemolitions[]=
{
L"-%d%s APs to throw grenades\n",
L"+%d%s max range when throwing grenades\n",
L"+%d%s CtH when throwing grenades\n",
L"+%d%s damage for set bombs and mines\n",
L"+%d%s to attaching detonators check\n",
L"+%d%s to planting/removing bombs check\n",
+3 -3
View File
@@ -309,6 +309,9 @@ STR16 gzIMPMinorTraitsHelpTextsThrowing[]=
L"+%d de dégâts critiques, si vous lancez plusieurs couteaux\n",
L"Ajoute %d niveau(x) de visée pour lancer un couteau\n",
L"Ajoute %d niveau(x) de visée pour lancer un couteau\n",
L"-%d%s du nombre de PA nécessaire pour lancer une grenade\n",
L"+%d%s de la portée maximale d'une grenade\n",
L"+%d%s de chance de toucher votre cible avec une grenade\n",
};
STR16 gzIMPMinorTraitsHelpTextsNightOps[]=
@@ -344,9 +347,6 @@ STR16 gzIMPMinorTraitsHelpTextsBodybuilding[]=
};
STR16 gzIMPMinorTraitsHelpTextsDemolitions[]=
{
L"-%d%s du nombre de PA nécessaire pour lancer une grenade\n",
L"+%d%s de la portée maximale d'une grenade\n",
L"+%d%s de chance de toucher votre cible avec une grenade\n",
L"+%d%s de dégâts causés par un explosif ou une mine\n",
L"+%d%s pour contrôler un détonateur\n",
L"+%d%s pour placer/retirer un contrôleur d'explosif\n",
+3 -3
View File
@@ -310,6 +310,9 @@ STR16 gzIMPMinorTraitsHelpTextsThrowing[]=
L"+%d Multiplikator für kritische Treffer durch Wurfwaffen\n",
L"Gibt einen weiteren Zielklick beim Einsatz von Wurfwaffen\n",
L"Gibt %d weitere Zielklicks beim Einsatz von Wurfwaffen\n",
L"-%d%s APs benötigt um Handgranaten (und ähnliche Objekte) zu werfen\n",
L"+%d%s höhere Reichweite beim Werfen von Handgranaten (und ähnliche Objekten)\n",
L"+%d%s höhere Trefferwahrscheinlichkeit beim Werfen von Handgranaten (und ähnlichen Objekten)\n",
};
STR16 gzIMPMinorTraitsHelpTextsNightOps[]=
@@ -346,9 +349,6 @@ STR16 gzIMPMinorTraitsHelpTextsBodybuilding[]=
STR16 gzIMPMinorTraitsHelpTextsDemolitions[]=
{
L"-%d%s APs benötigt um Handgranaten (und ähnliche Objekte) zu werfen\n",
L"+%d%s höhere Reichweite beim Werfen von Handgranaten (und ähnliche Objekten)\n",
L"+%d%s höhere Trefferwahrscheinlichkeit beim Werfen von Handgranaten (und ähnlichen Objekten)\n",
L"+%d%s höherer Schaden für gelegte Bomben und Minen\n",
L"+%d%s mehr Erfolg beim Anbringen von Zündern\n",
L"+%d%s mehr Erfolg beim Legen und Entschärfen von Bomben\n",
+3 -3
View File
@@ -308,6 +308,9 @@ STR16 gzIMPMinorTraitsHelpTextsThrowing[]=
L"+%d critical hit with throwing blade multiplier\n",
L"Adds %d more aim click for throwing blades\n",
L"Adds %d more aim clicks for throwing blades\n",
L"-%d%s APs to throw grenades\n",
L"+%d%s max range when throwing grenades\n",
L"+%d%s CtH when throwing grenades\n",
};
STR16 gzIMPMinorTraitsHelpTextsNightOps[]=
@@ -344,9 +347,6 @@ STR16 gzIMPMinorTraitsHelpTextsBodybuilding[]=
STR16 gzIMPMinorTraitsHelpTextsDemolitions[]=
{
L"-%d%s APs to throw grenades\n",
L"+%d%s max range when throwing grenades\n",
L"+%d%s CtH when throwing grenades\n",
L"+%d%s damage for set bombs and mines\n",
L"+%d%s to attaching detonators check\n",
L"+%d%s to planting/removing bombs check\n",
+3 -3
View File
@@ -310,6 +310,9 @@ STR16 gzIMPMinorTraitsHelpTextsThrowing[]=
L"+%d critical hit with throwing blade multiplier\n",
L"Adds %d more aim click for throwing blades\n",
L"Adds %d more aim clicks for throwing blades\n",
L"-%d%s APs to throw grenades\n",
L"+%d%s max range when throwing grenades\n",
L"+%d%s CtH when throwing grenades\n",
};
STR16 gzIMPMinorTraitsHelpTextsNightOps[]=
@@ -346,9 +349,6 @@ STR16 gzIMPMinorTraitsHelpTextsBodybuilding[]=
STR16 gzIMPMinorTraitsHelpTextsDemolitions[]=
{
L"-%d%s APs to throw grenades\n",
L"+%d%s max range when throwing grenades\n",
L"+%d%s CtH when throwing grenades\n",
L"+%d%s damage for set bombs and mines\n",
L"+%d%s to attaching detonators check\n",
L"+%d%s to planting/removing bombs check\n",
+3 -3
View File
@@ -310,6 +310,9 @@ STR16 gzIMPMinorTraitsHelpTextsThrowing[]=
L"+%d к множителю критического урона при броске ножа\n",
L"+%d клик прицеливания для метательных ножей\n",
L"+%d кликов прицеливания для метательных ножей\n",
L"-%d%s ОД для броска гранаты\n",
L"+%d%s к максимальной дальности броска гранаты\n",
L"+%d%s к точности броска гранаты\n",
};
STR16 gzIMPMinorTraitsHelpTextsNightOps[]=
@@ -346,9 +349,6 @@ STR16 gzIMPMinorTraitsHelpTextsBodybuilding[]=
STR16 gzIMPMinorTraitsHelpTextsDemolitions[]=
{
L"-%d%s ОД для броска гранаты\n",
L"+%d%s к максимальной дальности броска гранаты\n",
L"+%d%s к точности броска гранаты\n",
L"+%d%s к урону для установленных бомб и мин\n",
L"+%d%s к умению устанавливать детонатор\n",
L"+%d%s к установке/разминированию бомб\n",
+15 -7
View File
@@ -11668,13 +11668,21 @@ STR16 szLaptopStatText[] = // TODO.Translate
L"Threaten approach",
L"Recruit approach",
L"%s learns with normal speed.", // TODO.Translate
L"%s does not learn at all.",
L"%s unlearns his skills.",
L"%s learns with 3/4 speed.",
L"%s learns with 1/2 speed.",
L"%s learns with 1/4 speed.",
L"Stats will regress.",
L"Fast",
L"Average",
L"Slow",
L"Health growth",
L"Strength growth",
L"Agility growth",
L"Dexterity growth",
L"Wisdom growth",
L"Marksmanship growth",
L"Explosives growth",
L"Leadership growth",
L"Medical growth",
L"Mechanical growth",
L"Experience growth",
};
STR16 szGearTemplateText[] = // TODO.Translate
+15 -7
View File
@@ -11650,13 +11650,21 @@ STR16 szLaptopStatText[] = // TODO.Translate
L"Threaten approach",
L"Recruit approach",
L"%s learns with normal speed.", // TODO.Translate
L"%s does not learn at all.",
L"%s unlearns his skills.",
L"%s learns with 3/4 speed.",
L"%s learns with 1/2 speed.",
L"%s learns with 1/4 speed.",
L"Stats will regress.",
L"Fast",
L"Average",
L"Slow",
L"Health growth",
L"Strength growth",
L"Agility growth",
L"Dexterity growth",
L"Wisdom growth",
L"Marksmanship growth",
L"Explosives growth",
L"Leadership growth",
L"Medical growth",
L"Mechanical growth",
L"Experience growth",
};
STR16 szGearTemplateText[] = // TODO.Translate
+3 -2
View File
@@ -166,6 +166,7 @@ UINT32 MainGameScreenInit(void)
UnLockVideoSurface( FRAME_BUFFER);
InitializeBackgroundRects();
InitializeBaseDirtyRectQueue();
//EnvSetTimeInHours(ENV_TIME_12);
@@ -188,8 +189,8 @@ UINT32 MainGameScreenInit(void)
giFPSOverlay = RegisterVideoOverlay( ( VOVERLAY_STARTDISABLED | VOVERLAY_DIRTYBYTEXT ), &VideoOverlayDesc );
// SECOND, PERIOD COUNTER
VideoOverlayDesc.sLeft = 30;
VideoOverlayDesc.sTop = 0;
VideoOverlayDesc.sLeft = 0;
VideoOverlayDesc.sTop = 12;
VideoOverlayDesc.sX = VideoOverlayDesc.sLeft;
VideoOverlayDesc.sY = VideoOverlayDesc.sTop;
swprintf( VideoOverlayDesc.pzText, L"Levelnodes: 100000" );
+22 -36
View File
@@ -122,46 +122,33 @@ void DisplayFrameRate( )
uiFrameCount = 0;
}
// Create string
SetFont( SMALLFONT1 );
//DebugMsg(TOPIC_JA2, DBG_LEVEL_0, String( "FPS: %d ", __min( uiFPS, 1000 ) ) );
if ( uiFPS < 20 )
{
SetFontBackground( FONT_MCOLOR_BLACK );
SetFontForeground( FONT_MCOLOR_LTRED );
}
else
{
SetFontBackground( FONT_MCOLOR_BLACK );
SetFontForeground( FONT_MCOLOR_DKGRAY );
}
if ( gbFPSDisplay == SHOW_FULL_FPS )
{
memset(&VideoOverlayDesc, 0, sizeof(VideoOverlayDesc));
// FRAME RATE
memset( &VideoOverlayDesc, 0, sizeof( VideoOverlayDesc ) );
swprintf( VideoOverlayDesc.pzText, L"%ld", __min( uiFPS, 1000 ) );
VideoOverlayDesc.uiFlags = VOVERLAY_DESC_TEXT;
VideoOverlayDesc.uiFontID = SMALLFONT1;
VideoOverlayDesc.ubFontBack = FONT_MCOLOR_BLACK;
VideoOverlayDesc.ubFontFore = uiFPS < 20 ? FONT_MCOLOR_LTRED : FONT_MCOLOR_DKGRAY;
swprintf( VideoOverlayDesc.pzText, L"FPS: %ld", __min( uiFPS, 1000 ) );
VideoOverlayDesc.uiFlags = VOVERLAY_DESC_TEXT | VOVERLAY_DESC_FONT | VOVERLAY_DESC_DISABLED;
UpdateVideoOverlay( &VideoOverlayDesc, giFPSOverlay, FALSE );
// TIMER COUNTER
swprintf( VideoOverlayDesc.pzText, L"%ld", __min( giTimerDiag, 1000 ) );
VideoOverlayDesc.uiFlags = VOVERLAY_DESC_TEXT;
swprintf( VideoOverlayDesc.pzText, L"Frame: %04ld ms", __min( giTimerDiag, 10000 ) );
VideoOverlayDesc.uiFlags = VOVERLAY_DESC_TEXT | VOVERLAY_DESC_DISABLED;
UpdateVideoOverlay( &VideoOverlayDesc, giCounterPeriodOverlay, FALSE );
if( GetMouseMapPos( &usMapPos) )
{
//if( GetMouseMapPos( &usMapPos) )
//{
//gprintfdirty( 0, 315, L"(%d)",sMapPos);
//mprintf( 0,315,L"(%d)",sMapPos);
}
else
{
//}
//else
//{
//gprintfdirty( 0, 315, L"(%d %d)",gusMouseXPos, gusMouseYPos - INTERFACE_START_Y );
//mprintf( 0,315,L"(%d %d)",gusMouseXPos, gusMouseYPos - INTERFACE_START_Y );
}
//}
}
if ( ( gTacticalStatus.uiFlags & GODMODE ) )
@@ -411,7 +398,7 @@ UINT32 InitScreenHandle(void)
int y = 40;
#ifdef USE_VFS
sgp::Logger_ID ini_id = sgp::Logger::instance().createLogger();
sgp::Logger::instance().connectFile(ini_id, L"ERROR_REPORT.iniErrorMessages.txt", false, sgp::Logger::FLUSH_ON_DELETE);
sgp::Logger::instance().connectFile(ini_id, L"iniErrorReport.txt", false, sgp::Logger::FLUSH_ON_DELETE);
sgp::Logger::LogInstance logger = sgp::Logger::instance().logger(ini_id);
#endif
while (! iniErrorMessages.empty()) {
@@ -425,17 +412,17 @@ UINT32 InitScreenHandle(void)
if (iniErrorMessage_create_out_file)
{
#ifndef USE_VFS
fopen_s( &file_pointer, "..\\ERROR_REPORT.iniErrorMessages.txt", "w" );
fopen_s( &file_pointer, "..\\iniErrorReport.txt", "w" );
#endif
y += 25;
swprintf( str, L"%S", "ERROR_REPORT.iniErrorMessages.txt has been created. Please review its content." );
DisplayWrappedString( 10, y, 560, 2, FONT12ARIAL, FONT_RED, str, FONT_BLACK, TRUE, LEFT_JUSTIFIED );
swprintf( str, L"%S", "Warning: found the following ini errors. iniErrorReport.txt has been created." );
DisplayWrappedString( 10, y, 560, 2, FONT12ARIAL, FONT_ORANGE, str, FONT_BLACK, TRUE, LEFT_JUSTIFIED );
iniErrorMessage_create_out_file = FALSE;
}
else
{
#ifndef USE_VFS
fopen_s( &file_pointer, "..\\ERROR_REPORT.iniErrorMessages.txt", "a+" );
fopen_s( &file_pointer, "..\\iniErrorReport.txt", "a+" );
#endif
}
@@ -447,10 +434,9 @@ UINT32 InitScreenHandle(void)
#else
logger << iniErrorMessage << sgp::endl;
#endif
DisplayWrappedString( 10, y, 560, 2, FONT12ARIAL, FONT_RED, str, FONT_BLACK, TRUE, LEFT_JUSTIFIED );
iniErrorMessages.pop();
DisplayWrappedString( 10, y, 560, 2, FONT12ARIAL, FONT_ORANGE, str, FONT_BLACK, TRUE, LEFT_JUSTIFIED );
if (iniErrorMessages.empty()) {for(int x=0 ; x <= 65535*2 ; x++);}
iniErrorMessages.pop();
}
InvalidateScreen( );