diff --git a/NFSMWExtraOptions/NFSMWExtraOptions.rc b/NFSMWExtraOptions/NFSMWExtraOptions.rc index 9eacce8..0247804 100644 Binary files a/NFSMWExtraOptions/NFSMWExtraOptions.rc and b/NFSMWExtraOptions/NFSMWExtraOptions.rc differ diff --git a/NFSMWExtraOptions/dllmain.cpp b/NFSMWExtraOptions/dllmain.cpp index cec274a..394ac6f 100644 --- a/NFSMWExtraOptions/dllmain.cpp +++ b/NFSMWExtraOptions/dllmain.cpp @@ -8,9 +8,9 @@ #include float heatLevel, gameSpeed, FallingRainSize, RainAmount, RoadReflection, RainIntensity, RainXing, RainFallSpeed, RainGravity, SplashScreenTimeLimit, LowBeamAmount, HighBeamAmount, MaxHeatLevel, MinHeatLevel, copLightsAmount, WorldAnimationSpeed, CarScale, VTRed, VTBlue, VTGreen, VTBlackBloom, VTColorBloom, VTSaturation, DebugCameraTurboSpeed, DebugCameraSuperTurboSpeed, SBRechargeTime, SBRechargeSpeedLimit, SBMassMultiplier, SpeedingLimit, ExcessiveSpeedingLimit, RecklessDrivingLimit; -int hotkeyToggleForceHeat, hotkeyForceHeatLevel, hotkeyToggleCopLights, hotkeyToggleHeadLights, hotkeyCarHack, hotkeyUnlockAllThings, hotkeyDrunkDriver, randomizeCount; -unsigned char raceType, raceMode, minLaps, maxLaps, minOpponents, maxOpponents, maxLapsRandomQR, maxOpponentsRandomQR, maxBlacklist, csBlacklist, headLightsMode, lowTraffic, medTraffic, highTraffic, ShowHiddenTracks, MaxUniqueOpponentCars, ShowAllCarsInFE, WindowedMode, SelectableMarkerCount; -bool copLightsEnabled, ShowTollbooth, ShowMoreRaceOptions, HideOnline, ShowOnlineOpts, removeSceneryGroupDoor, removePlayerBarriers, unfreezeKO, EnablePresetAndDebugCars, AlwaysRain, SkipMovies, EnableSound, EnableMusic, EnableCameras, ExOptsTeamTakeOver, ShowSubs, EnableHeatLevelOverride, CarbonStyleRaceProgress, moreVinyls, eatSomeBurgers, UnlockAllThings, ShowChallenge, GarageRotate, GarageZoom, GarageShowcase, EnableSaveLoadHotPos, EnableMaxPerfOnShop, EnableVTOverride, EnableDebugWorldCamera, DebugWorldCamera, DebugWatchCarCamera, ForceBlackEdition, HelicopterFix, X10Fix, WheelFix, ExperimentalSplitScreenFix, ShowDebugCarCustomize, CarbonStyleBustedScreen, ShowMessage, ReplayBlacklistRaces, PursuitActionMode, MoreCarsForOpponents, VisualFixesAndTweaks, UncensoredBustedScreen, ShowNonPursuitCops, ShowDebugEventID, CarbonStyleRandomCars, ShowMoreCustomizationOptions, SkipCareerIntro, ShowTimeOfDay, BetterRandomRaces, AllowMultipleInstances, TimeBugFix, NoCatchUp, CarSkinFix, ImmobileColFix, NFSU2StyleLookBackCamera, NoRevLimiter; +int hotkeyToggleForceHeat, hotkeyForceHeatLevel, hotkeyToggleCopLights, hotkeyToggleHeadlights, hotkeyCarHack, hotkeyUnlockAllThings, hotkeyDrunkDriver, randomizeCount; +unsigned char raceType, raceMode, minLaps, maxLaps, minOpponents, maxOpponents, maxLapsRandomQR, maxOpponentsRandomQR, maxBlacklist, csBlacklist, headlightsMode, lowTraffic, medTraffic, highTraffic, ShowHiddenTracks, MaxUniqueOpponentCars, ShowAllCarsInFE, WindowedMode, SelectableMarkerCount; +bool copLightsEnabled, ShowTollbooth, ShowMoreRaceOptions, HideOnline, ShowOnlineOpts, removeSceneryGroupDoor, removePlayerBarriers, unfreezeKO, EnablePresetAndDebugCars, AlwaysRain, SkipMovies, EnableSound, EnableMusic, EnableCameras, ExOptsTeamTakeOver, ShowSubs, EnableHeatLevelOverride, CarbonStyleRaceProgress, moreVinyls, eatSomeBurgers, UnlockAllThings, ShowChallenge, GarageRotate, GarageZoom, GarageShowcase, EnableSaveLoadHotPos, EnableMaxPerfOnShop, EnableVTOverride, EnableDebugWorldCamera, DebugWorldCamera, DebugWatchCarCamera, ForceBlackEdition, HelicopterFix, X10Fix, WheelFix, ExperimentalSplitScreenFix, ShowDebugCarCustomize, CarbonStyleBustedScreen, ShowMessage, ReplayBlacklistRaces, PursuitActionMode, MoreCarsForOpponents, VisualFixesAndTweaks, UncensoredBustedScreen, ShowNonPursuitCops, ShowDebugEventID, CarbonStyleRandomCars, ShowMoreCustomizationOptions, SkipCareerIntro, ShowTimeOfDay, BetterRandomRaces, AllowMultipleInstances, TimeBugFix, NoCatchUp, CarSkinFix, ImmobileColFix, NFSU2StyleLookBackCamera, NoRevLimiter, SkipNISs; DWORD selectedCar, careerCar, raceOptions, Strings, HeatLevelAddr, VTecx, StartingCashDWORD, GameState, ThreadDelay; HWND windowHandle; @@ -922,7 +922,7 @@ void Init() hotkeyToggleForceHeat = iniReader.ReadInteger("Hotkeys", "HeatLevelHack", 118); //F7 hotkeyForceHeatLevel = iniReader.ReadInteger("Hotkeys", "ChangeHeatLevel", 33); //PageUp hotkeyToggleCopLights = iniReader.ReadInteger("Hotkeys", "CopLights", 79); // O - hotkeyToggleHeadLights = iniReader.ReadInteger("Hotkeys", "HeadLights", 72); // H + hotkeyToggleHeadlights = iniReader.ReadInteger("Hotkeys", "Headlights", 72); // H hotkeyCarHack = iniReader.ReadInteger("Hotkeys", "FreezeCar", 115); //F4 hotkeyUnlockAllThings = iniReader.ReadInteger("Hotkeys", "UnlockAllThings", 116); //F5 hotkeyDrunkDriver = iniReader.ReadInteger("Hotkeys", "AutoDrive", 117); //F6 @@ -983,7 +983,7 @@ void Init() CarScale = iniReader.ReadFloat("Gameplay", "CarScale", 1.0f); copLightsEnabled = iniReader.ReadInteger("Gameplay", "CopLightsMode", 0) == 1; copLightsAmount = iniReader.ReadFloat("Gameplay", "CopLightsBrightness", 1.00f); - headLightsMode = iniReader.ReadInteger("Gameplay", "HeadLightsMode", 2); + headlightsMode = iniReader.ReadInteger("Gameplay", "HeadlightsMode", 2); LowBeamAmount = iniReader.ReadFloat("Gameplay", "LowBeamBrightness", 0.75f); HighBeamAmount = iniReader.ReadFloat("Gameplay", "HighBeamBrightness", 1.00f); removeSceneryGroupDoor = iniReader.ReadInteger("Gameplay", "RemoveOldBridgeBarrier", 0) == 1; @@ -1045,6 +1045,7 @@ void Init() // Misc WindowedMode = iniReader.ReadInteger("Misc", "WindowedMode", 0); SkipMovies = iniReader.ReadInteger("Misc", "SkipMovies", 0) == 1; + SkipNISs = iniReader.ReadInteger("Misc", "SkipNISs", 0) == 1; EnableSound = iniReader.ReadInteger("Misc", "EnableSound", 1) == 1; EnableMusic = iniReader.ReadInteger("Misc", "EnableMusic", 1) == 1; ShowMessage = iniReader.ReadInteger("Misc", "ShowMessage", 1) == 1; @@ -1063,7 +1064,7 @@ void Init() maxOpponents %= 16; maxOpponentsRandomQR %= 16; - headLightsMode %= 3; + headlightsMode %= 3; randomizeCount %= 501; @@ -1306,21 +1307,21 @@ void Init() if (ShowOnlineOpts) injector::MakeNOP(0x5290B2, 2, true); // Show Online Options menu // Load headlights preferences - switch (headLightsMode) + switch (headlightsMode) { case 0: - injector::WriteMemory(0x742b94, 0, true); // Left HeadLight - injector::WriteMemory(0x742bb3, 0, true); // Right HeadLight + injector::WriteMemory(0x742b94, 0, true); // Left Headlight + injector::WriteMemory(0x742bb3, 0, true); // Right Headlight injector::WriteMemory(0x8AF2AC, 0x00, true); //Remove flare break; case 1: - injector::WriteMemory(0x742b94, LowBeamAmount, true); // Left HeadLight - injector::WriteMemory(0x742bb3, LowBeamAmount, true); // Right HeadLight + injector::WriteMemory(0x742b94, LowBeamAmount, true); // Left Headlight + injector::WriteMemory(0x742bb3, LowBeamAmount, true); // Right Headlight injector::WriteMemory(0x8AF2AC, 'H', true); break; case 2: default: - injector::WriteMemory(0x742b94, HighBeamAmount, true); // Left HeadLight - injector::WriteMemory(0x742bb3, HighBeamAmount, true); // Right HeadLight + injector::WriteMemory(0x742b94, HighBeamAmount, true); // Left Headlight + injector::WriteMemory(0x742bb3, HighBeamAmount, true); // Right Headlight injector::WriteMemory(0x8AF2AC, 'H', true); break; } @@ -1371,6 +1372,11 @@ void Init() injector::WriteMemory(0x926144, SkipMovies, true); } + if (SkipNISs) + { + injector::WriteMemory(0x9260A4, SkipNISs, true); + } + if (!EnableSound) { injector::WriteMemory(0x8F86F8, EnableSound, true); @@ -1946,32 +1952,32 @@ DWORD WINAPI Thing(LPVOID) } // Headlights - if ((GetAsyncKeyState(hotkeyToggleHeadLights) & 1) && (GameState == 6) && IsOnFocus) // When pressed "Toggle Head Lights" key + if ((GetAsyncKeyState(hotkeyToggleHeadlights) & 1) && (GameState == 6) && IsOnFocus) // When pressed "Toggle Head Lights" key { - headLightsMode = (headLightsMode + 1) % 3; // 0, 1 or 2 + headlightsMode = (headlightsMode + 1) % 3; // 0, 1 or 2 CIniReader iniReader("NFSMWExtraOptionsSettings.ini"); - iniReader.WriteInteger("Gameplay", "HeadLightsMode", headLightsMode); + iniReader.WriteInteger("Gameplay", "HeadlightsMode", headlightsMode); - switch (headLightsMode) + switch (headlightsMode) { case 0: - injector::WriteMemory(0x742b94, 0, true); // Left HeadLight - injector::WriteMemory(0x742bb3, 0, true); // Right HeadLight + injector::WriteMemory(0x742b94, 0, true); // Left Headlight + injector::WriteMemory(0x742bb3, 0, true); // Right Headlight injector::WriteMemory(0x8AF2AC, 0x00, true); break; case 1: - injector::WriteMemory(0x742b94, LowBeamAmount, true); // Left HeadLight - injector::WriteMemory(0x742bb3, LowBeamAmount, true); // Right HeadLight + injector::WriteMemory(0x742b94, LowBeamAmount, true); // Left Headlight + injector::WriteMemory(0x742bb3, LowBeamAmount, true); // Right Headlight injector::WriteMemory(0x8AF2AC, 'H', true); break; default: - injector::WriteMemory(0x742b94, HighBeamAmount, true); // Left HeadLight - injector::WriteMemory(0x742bb3, HighBeamAmount, true); // Right HeadLight + injector::WriteMemory(0x742b94, HighBeamAmount, true); // Left Headlight + injector::WriteMemory(0x742bb3, HighBeamAmount, true); // Right Headlight injector::WriteMemory(0x8AF2AC, 'H', true); break; } - while ((GetAsyncKeyState(hotkeyToggleHeadLights) & 0x8000) > 0) { Sleep(ThreadDelay); } + while ((GetAsyncKeyState(hotkeyToggleHeadlights) & 0x8000) > 0) { Sleep(ThreadDelay); } } diff --git a/NFSMWExtraOptionsSettings.ini b/NFSMWExtraOptionsSettings.ini index 77225b3..ce08627 100644 --- a/NFSMWExtraOptionsSettings.ini +++ b/NFSMWExtraOptionsSettings.ini @@ -1,11 +1,11 @@ [Hotkeys] // Look at http://cherrytree.at/misc/vk.htm for key values (decimal) HeatLevelHack = 118 // Force-enables Heat Level Override and lets you select a heat level with the key below. (Default = 118 = F7 key) ChangeHeatLevel = 33 // Changes heat levels when the upper option is enabled. (Default = 33 = PageUp key) -CopLights = 79 // Enables "Cop Lights". Use a cop car for best results. (Default = 79 = O key) -Headlights = 72 // Changes "Head Lights" between closed (0), short (1) and long (2). (Default = 72 = H key) -FreezeCar = 115 // Enables "Freeze Car" hack. (Default = 115 = F4 key) +CopLights = 79 // Enables Cop Lights. Use a cop car for best results. (Default = 79 = O key) +Headlights = 72 // Changes Headlights between closed (0), short (1) and long (2). (Default = 72 = H key) +FreezeCar = 115 // Enables Freeze Car hack. (Default = 115 = F4 key) UnlockAllThings = 116 // Unlocks everything in game and lets you play hidden tracks. (Default = 116 = F5 key) -AutoDrive = 117 // Enables "Auto Drive" (Drunk Driver) hack. (Default = 117 = F6 key) +AutoDrive = 117 // Enables Auto Drive (Drunk Driver) hack. (Default = 117 = F6 key) EnableSaveLoadHotPos = 0 // Lets you save (LShift + 1/5) or load (LCtrl + 1/5) your position on the world. (0 = False (Default), 1 = True) [LapControllers] @@ -63,7 +63,7 @@ DebugCamSuperTurboSpeed = 7.16 // Speed modifier for Debug World Camera Sup CarScale = 1 // Resizes car model (FOR FUN) (Default = 1.0) CopLightsMode = 0 // Current mode for Cop Lights. (0 = Off (Default), 1 = On) CopLightsBrightness = 1 // Brightness of Cop Lights. (Default = 1) -HeadLightsMode = 2 // Current mode for Headlights. (0 = Off, 1 = Low Beam, 2 = High Beam (Default)) +HeadlightsMode = 2 // Current mode for Headlights. (0 = Off, 1 = Low Beam, 2 = High Beam (Default)) LowBeamBrightness = 0.75 // Headlight brightness for Low Beam setting. (Default = 0.75) HighBeamBrightness = 1 // Headlight brightness for High Beam setting. (Default = 1) RemoveOldBridgeBarrier = 0 // Removes the barrier which closes the road to the Old Bridge. (0 = False (Default), 1 = True) @@ -125,6 +125,7 @@ ImmobileColFix = 1 // (EXPERIMENTAL) Fixes infinite mass of som [Misc] WindowedMode = 0 // Runs the game in a window instead of full screen. (0 = False (Default), 1 = True, 2 = Bordered) SkipMovies = 0 // Skips cutscenes. (0 = False (Default), 1 = True) +SkipNISs = 0 // Skips some NISs (non-interactive scenes). (0 = False (Default), 1 = True) EnableSound = 1 // Enables in-game sounds. (0 = False, 1 = True (Default)) EnableMusic = 1 // Enables in-game music. (0 = False, 1 = True (Default)) ShowMessage = 1 // Shows in-game messages when you use some features. (0 = False, 1 = True (Default))