Removed ArraysBehavior and RemoveWindowRounding from ddraw.ini

* both are now always enabled
This commit is contained in:
NovaRain
2022-01-07 06:46:28 +08:00
parent adadf608e7
commit 16ad57806f
5 changed files with 7 additions and 24 deletions
-7
View File
@@ -465,9 +465,6 @@ Doctor=293
Science=293
Repair=293
;Set to 1 to remove window position rounding for script-created windows
RemoveWindowRounding=1
;Set to 1 to add scroll buttons to the pipboy quest list, and remove the quests per area limit
;Set to 2 to use a different set of scroll buttons
UseScrollingQuestsList=1
@@ -621,10 +618,6 @@ ExplosionsEmitLight=0
;MovieTimer_artimer3=270
;MovieTimer_artimer4=360
;Set to 1 to enable the new arrays behavior (default behavior)
;Set to 0 for backward compatibility with pre-3.4 scripts
ArraysBehavior=1
;Set to 1 to add proper check for ammo before attacking and proper calculation of the number of burst rounds
;By default, weapons can make attacks when at least one ammo is left, regardless of ammo cost calculations
;Note that enabling this option will prevent super cattle prods and mega power fists from attacking with only one ammo left
+2 -2
View File
@@ -1044,9 +1044,9 @@ void Interface::init() {
InventoryCharacterRotationSpeedPatch();
UIAnimationSpeedPatch();
if (IniReader::GetConfigInt("Misc", "RemoveWindowRounding", 1)) {
//if (IniReader::GetConfigInt("Misc", "RemoveWindowRounding", 1)) {
SafeWriteBatch<BYTE>(CodeType::JumpShort, {0x4D6EDD, 0x4D6F12});
}
//}
if (IniReader::GetConfigInt("Interface", "ActionPointsBar", 0)) {
ActionPointsBarPatch();
-8
View File
@@ -944,14 +944,6 @@ void ScriptExtender::init() {
idle = IniReader::GetConfigInt("Misc", "ProcessorIdle", -1);
if (idle > -1 && idle > 30) idle = 30;
arraysBehavior = IniReader::GetConfigInt("Misc", "ArraysBehavior", 1);
if (arraysBehavior > 0) {
arraysBehavior = 1; // only 1 and 0 allowed at this time
dlogr("New arrays behavior enabled.", DL_SCRIPT);
} else {
dlogr("Arrays in backward-compatiblity mode.", DL_SCRIPT);
}
iniConfigFolder = IniReader::GetConfigString("Scripts", "IniConfigFolder", "", 64);
size_t len = iniConfigFolder.length();
if (len) {
+5 -5
View File
@@ -15,7 +15,7 @@ namespace script
/*
GLOBAL variable for arrays
*/
DWORD arraysBehavior = 1; // 0 - backward compatible with pre-3.4, 1 - permanent arrays don't get stored in savegames by default
//DWORD arraysBehavior = 1; // 0 - backward compatible with pre-3.4, 1 - permanent arrays don't get stored in savegames by default
// arrays map: arrayId => arrayVar
ArraysMap arrays;
@@ -400,10 +400,10 @@ DWORD CreateArray(int len, DWORD flags) {
while (ArrayExists(nextArrayID)) nextArrayID++;
if (nextArrayID == 0) nextArrayID++;
if (arraysBehavior == 0) {
var.key = sArrayElement(nextArrayID, DataType::INT);
savedArrays[var.key] = nextArrayID;
}
//if (arraysBehavior == 0) {
// var.key = sArrayElement(nextArrayID, DataType::INT);
// savedArrays[var.key] = nextArrayID;
//}
stackArrayId = nextArrayID;
arrays[nextArrayID] = var;
return nextArrayID++;
-2
View File
@@ -152,8 +152,6 @@ typedef std::pair<DWORD, sArrayVar> array_pair;
// auto-incremented ID
extern DWORD nextArrayID;
extern DWORD arraysBehavior;
// saved arrays: arrayKey => arrayId
extern ArrayKeysMap savedArrays;