Skip to content

Commit

Permalink
Cleanup code and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Nishimura-Katsuo committed Aug 24, 2021
1 parent a040069 commit 754748d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
16 changes: 0 additions & 16 deletions features/Misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,6 @@ DWORD __stdcall OverrideWaypoints(DWORD a, DWORD b) {

ASMPTR SocketNotGrey_Patches[] = { 0x452857, 0x48E878, 0x48E897 };

DWORD gamestart = 0;

double flashy = 0, speed = 0.03;

ASMPTR GetGlobalLight_Rejoin = 0x61C0B6;

__declspec(naked) void __stdcall GetGlobalLight_Original(void* pAct, BYTE* red, BYTE* green, BYTE* blue) {
Expand Down Expand Up @@ -414,19 +410,9 @@ class : public Feature {
AutomapInfoHooks.push_back([]() -> std::wstring {
return version;
});
//
// AutomapInfoHooks.push_back([]() -> std::wstring {
// DWORD elapsed = GetTickCount() - gamestart, seconds = (elapsed / 1000) % 60, minutes = (elapsed / 60000) % 60;
// wchar_t msg[16];
// swprintf_s(msg, L"%d:%02d", minutes, seconds);
// return msg;
// });
}

void gameLoop() {
gamestart = gamestart ? gamestart : GetTickCount();
flashy += speed;

if (Settings["disableShake"] != disableShake) {
if (Settings["disableShake"]) {
MemoryPatch(0x476D40) << ASM::RET; // Ignore shaking requests
Expand All @@ -440,8 +426,6 @@ class : public Feature {
}

void oogLoop() {
gamestart = 0;

if (Settings["regenMap"] && !State["regenMap"]) {
MemoryPatch(0x56A200) << BYTE(0xEB);
State["regenMap"] = true;
Expand Down
4 changes: 3 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ This is an experiment and utility for Diablo 2. It is intended for single player
Experience Bonuses and Scaling
Repeatable Socket, Respec, and Imbue Quests
Repeatable Cow Portal (even if you killed the Cow King)
Disabled Weather
Disabled Weather and Screen Shaking
Regenerate Single Player Maps (always a new map!)
All Items Drop Pre-Identified
Single Player FPS Uncap (40 FPS is a good spot)
Multiple Simultaneous Windows
Fixed Unique Monster Color Bug
Loading additional mpq via command line parameter: -mpq "filename.mpq"

Almost all features are optional now! Press F11 while Diablo 2 is running to enable/disable these options!
Expand Down

0 comments on commit 754748d

Please sign in to comment.