Renamed ShowMapGridKey to MapGridToggleKey

This commit is contained in:
NovaRain
2021-12-21 09:47:59 +08:00
parent 680284d785
commit df15a147d9
5 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -878,9 +878,9 @@ DebugMode=0
;Set to 1 to hide error messages in debug output when a null value is passed to the function as an object
HideObjIsNullMsg=0
;A key to press to toggle the display of the hex grid in the game on or off
;A key to press to toggle the display of the hex grid on the map on or off
;Set to 0 to disable, or a DX scancode otherwise
ShowMapGridKey=0
MapGridToggleKey=0
;Set to 1 to stop Fallout from deleting non read-only protos at startup
;Has pretty nasty side effects when saving/reloading, so don't use for regular gameplay
+1 -1
View File
@@ -197,9 +197,9 @@ static fo::DbFile* LoadMapEdgeFileSub(char* mapName) {
if (getValue != mapLevel) break; // next level
EdgeBorder::Edge *edge = new EdgeBorder::Edge;
edge->clipData = 0;
edge->prevEdgeData = edgeData;
edge->nextEdgeData = nullptr;
edge->clipData = 0;
edge->squareRect = edgeData->squareRect; // rect copy
edgeData->nextEdgeData = edge;
edgeData = edge;
+1 -1
View File
@@ -28,8 +28,8 @@ public:
Edge* edgeNext = edge->nextEdgeData;
delete edge;
edge = edgeNext;
nextEdgeData = nullptr;
};
nextEdgeData = nullptr;
}
~Edge() {
+6 -6
View File
@@ -51,8 +51,8 @@ enum DECode {
static const char* debugLog = "LOG";
static const char* debugGnw = "GNW";
static DWORD debugEditorKey = 0;
static DWORD showMapGridKey = 0;
static DWORD debugEditorKey;
static DWORD mapGridToggleKey;
struct sArray {
DWORD id;
@@ -531,7 +531,7 @@ void DebugEditor::init() {
if (!isDebug) return;
DontDeleteProtosPatch();
debugEditorKey = IniReader::GetConfigInt("Input", "DebugEditorKey", 0) & 0xFF;
debugEditorKey = IniReader::GetConfigInt("Input", "DebugEditorKey", 0);
if (debugEditorKey) {
OnKeyPressed() += [](DWORD scanCode, bool pressed) {
if (scanCode == debugEditorKey && pressed && IsGameLoaded()) {
@@ -540,10 +540,10 @@ void DebugEditor::init() {
};
}
showMapGridKey = IniReader::GetIntDefaultConfig("Debugging", "ShowMapGridKey", 0) & 0xFF;
if (showMapGridKey) {
mapGridToggleKey = IniReader::GetIntDefaultConfig("Debugging", "MapGridToggleKey", 0);
if (mapGridToggleKey) {
OnKeyPressed() += [](DWORD scanCode, bool pressed) {
if (scanCode == showMapGridKey && pressed && IsGameLoaded()) {
if (scanCode == mapGridToggleKey && pressed && IsGameLoaded()) {
__asm call fo::funcoffs::grid_toggle_;
fo::func::tile_refresh_display();
}
+2 -2
View File
@@ -36,8 +36,8 @@ static Delegate<DWORD> onAdjustFid;
static DWORD sizeLimitMode;
static DWORD invSizeMaxLimit;
static DWORD reloadWeaponKey = 0;
static DWORD itemFastMoveKey = 0;
static DWORD reloadWeaponKey;
static DWORD itemFastMoveKey;
static DWORD skipFromContainer = 0;
void InventoryKeyPressedHook(DWORD dxKey, bool pressed) {