Added DL_FIX for logging

Edits to ddraw.ini and arrays.md.
This commit is contained in:
NovaRain
2021-04-02 01:19:29 +08:00
parent f90c613107
commit 69633e96d5
6 changed files with 166 additions and 151 deletions
+8 -7
View File
@@ -11,16 +11,15 @@ UseCommandLine=0
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[ExtraPatches]
;This section allows you to set multiple paths to folders containing mods or patches that will be loaded by the game
;The priority of read files will be higher than the files in patchXXX.dat
;If DataLoadOrderPatch is enabled, the data load order is:
;master_patches > critter_patches > PatchFileXX > patchXXX.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat
;Paths to folders and Fallout .dat files are supported. The available range for PatchFile option names is from 0 to 99
;Larger numbers take precedence over smaller numbers (same as patchXXX.dat)
;master_patches > critter_patches > PatchFile99..PatchFile0 > patchXXX.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat
;Paths to folders and Fallout .dat files are supported
;The PatchFile## options are available from 0 to 99. Larger numbers take precedence over smaller numbers (same as patchXXX.dat)
;PatchFile0=mods\RP_data
;Path to the folder in which the game will automatically search and load custom files (by *.dat mask, including folders)
;The data load order of the files in the folder will be in reverse alphabetical order of the filenames
;The files placed in this folder will have higher priority than the PatchFileXX options
;The files placed in this folder will have higher priority than the PatchFile## options
;This option has no effect in 4.2.6 or later. The path is fixed to <GameRoot>\mods\
;AutoSearchPath=mods
@@ -853,10 +852,12 @@ Test_ForceFloats=0
;These options control what output is saved in the debug log (sfall-log.txt)
;Prints messages duing sfall initialization
Init=0
Init=1
;Prints messages relating to hook scripts
Hook=0
;Prints messages relating to scripting
Script=0
;Prints messages relating to the critical table
Criticals=0
Criticals=1
;Prints messages relating to engine fixes
Fixes=1
+1 -1
View File
@@ -137,7 +137,7 @@ end
procedure start begin
if (game_loaded and sfall_ver_major >= 4) then begin
variable configSection := "CombatControl";
//variable configSection := "CombatControl";
set_perk_ranks(PERK_gecko_skinning_perk, 1);
set_perk_level(PERK_gecko_skinning_perk, 999); // prevent it from appearing in the perk selection window
+7
View File
@@ -9,6 +9,12 @@ Arrays can be extremely useful for some more advanced scripting, in conjunction
***
### ARRAYS CONCEPT
Arrays are created and manipulated with the array functions. An array must first be created with `create_array` or `temp_array`, specifying how many data elements the array can hold. You can store any of ints, floats and strings in an array, and can mix all 3 in a single array. The ID returned by `create/temp_array` can then be used with the other array functions. Arrays are shared between all scripts (i.e. you can call `create_array` from one script, and then use the returned ID from another script). They are also saved across savegames.
*You must remember to free any arrays you create with `create_array` when you are done with them, or you will leak memory.*
Arrays created with `temp_array` will be automatically freed at the end of the frame. These functions are safe, in that supplying a bad ID or trying to access out of range elements will not crash the script. `create_array` is the only function that returns a permanent array, all other functions which return arrays (`string_split`, `list_as_array`, etc,) all return temporary arrays. You can use `fix_array` to make a temporary array permanent.
Array elements are accessed by index or key. For example:
```js
// this code puts some string in array "list" at index 5:
@@ -16,6 +22,7 @@ list[5] := "Value";
```
There are 2 different types of arrays currently available:
* **Lists** - a set of values with specific size (number of elements), where all elements have numeric indexes starting from zero (0) up to array length minus one.
For example:
+3
View File
@@ -86,6 +86,9 @@ void LoggingInit() {
if (IniReader::GetIntDefaultConfig("Debugging", "Criticals", 0)) {
DebugTypes |= DL_CRITICALS;
}
if (IniReader::GetIntDefaultConfig("Debugging", "Fixes", 0)) {
DebugTypes |= DL_FIX;
}
}
}
+5 -4
View File
@@ -17,10 +17,11 @@
*/
#define DL_MAIN (0)
#define DL_INIT (1<<1)
#define DL_HOOK (1<<2)
#define DL_SCRIPT (1<<3)
#define DL_CRITICALS (1<<4)
#define DL_INIT (0x1)
#define DL_HOOK (0x2)
#define DL_SCRIPT (0x4)
#define DL_CRITICALS (0x8)
#define DL_FIX (0x10)
#ifndef NO_SFALL_DEBUG
#include <stdio.h>
+142 -139
View File
File diff suppressed because it is too large Load Diff