diff --git a/AGENTS.md b/AGENTS.md index 51b8e34..854d9fd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -90,13 +90,13 @@ Also supported/detected: Project Diablo 2 (logged in `GameHelper`); its suggeste Releases are automated by release-please (`release-please-config.json`, `.release-please-manifest.json`, `.github/workflows/release.yml`), the same pattern as `jackrayner/ha-pypowerwall`. Tags have no `v` and start at `0.0.1`. - On every push to `main`, release-please opens or updates a release PR from the conventional commits since the last release. Review its changelog and edit the notes there (the first release's notes should say what it is based on and that it was only unit-tested, not played). -- Merging that PR tags and creates the GitHub release (flagged prerelease until someone has run the DLL in-game), then the same workflow builds the tagged commit, runs the checks and unit tests (`tests.yml`, called with `force`), and attaches `d2dx.zip`. The zip has the same layout as upstream's: `glide3x.dll` at the top level, `README.md`, `d2dx-defaults.cfg`, `licenses/`, plus `SOURCE.txt`. The notes get the zip's SHA-256 appended. +- Merging that PR tags and creates the GitHub release, then the same workflow builds the tagged commit, runs the checks and unit tests (`tests.yml`, called with `force`), and attaches `d2dx.zip`. The zip has the same layout as upstream's: `glide3x.dll` at the top level, `README.md`, `d2dx-defaults.cfg`, `licenses/`, plus `SOURCE.txt`. The notes get the zip's SHA-256 appended. - **Never replace a published asset.** Downstream installers pin the checksum. A fix means a new release and tag. - To force a version or release with no `feat`/`fix` commits, push a commit to `main` with a `Release-As: X.Y.Z` footer. - **The version lives in `src/d2dx/version.h`**, which release-please rewrites (do not edit by hand; keep the `x-release-please-*` markers). `d2dx.rc` and the README version line derive from it. Visual Studio can rewrite `d2dx.rc`; keep the `#include "version.h"` in its `TEXTINCLUDE 2` block. - **CI is skipped on the release PR** (branch `release-please--branches--main`, opened by the bot from this repo): `tests.yml`'s `changes` job reports nothing to build and CodeQL is skipped, so the required `build-and-test` check still passes. The release workflow builds and tests the tagged commit after merge (including a check that the DLL's file version matches `version.h`), so a bad bump would show up there, after the tag exists. If you want a pre-merge check, run `tests.yml` on the release branch by hand. - CI also fails if the DLL starts importing the Visual C++/UCRT runtime (the README promises no redistributable install), and uploads the built DLL as the `glide3x-dll` artifact on each run for manual in-game testing. -- What CI can't tell you: whether the DLL works in the game. Run it in a Diablo II folder (`-3dfx`) before removing the prerelease flag. +- Releases are published as normal releases. CI can't tell you whether the DLL works in the game, so say in the release notes what was and wasn't played (the first one was played on 1.14d under Wine only), and mark a release as a prerelease by hand if nobody has run it. ## Open questions / not yet verified diff --git a/README.md b/README.md index 7da4d81..2a9abfd 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,16 @@ # D2DX +[![Latest release](https://img.shields.io/github/v/release/jackrayner/d2dx)](https://github.com/jackrayner/d2dx/releases/latest) +[![Tests](https://github.com/jackrayner/d2dx/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/jackrayner/d2dx/actions/workflows/tests.yml) +[![CodeQL](https://github.com/jackrayner/d2dx/actions/workflows/codeql-analysis.yml/badge.svg?branch=main)](https://github.com/jackrayner/d2dx/actions/workflows/codeql-analysis.yml) +[![License: GPL v3](https://img.shields.io/github/license/jackrayner/d2dx)](https://github.com/jackrayner/d2dx/blob/main/LICENSE.txt) + D2DX is a Glide-wrapper and mod that makes the classic Diablo II/LoD run well on modern PCs, while honoring the original look and feel of the game. Play in a window or in fullscreen, glitch-free, with or without enhancements like widescreen, true high framerate and anti-aliasing. Version 0.0.1 -**WANT TO HELP OUT?** Take the one-question game version poll: https://strawpoll.com/w4y72p4f6 - -Update July 2021: I have been too busy to work on D2DX for a while, but hope to resume shortly. +This is a maintained fork of [bolrog/d2dx](https://github.com/bolrog/d2dx), which has not been updated since July 2021. It is not intended to be merged back upstream. Planned and declined work is tracked in [DEVELOPMENT.md](https://github.com/jackrayner/d2dx/blob/main/DEVELOPMENT.md). ## Features - Turns the game into a well behaved DirectX 11 title on Windows 10 (also 7, 8 and 8.1). @@ -23,12 +26,9 @@ Update July 2021: I have been too busy to work on D2DX for a while, but hope to ### Video Showcasing Motion Prediction [FPS increase in menus, FPS increase for projectiles, monsters, +more](https://imgur.com/a/J1F8Ctb) -## Upcoming - - Suggestions welcome! - ## Requirements - Diablo 2: LoD (see Compatibility section below). - - Windows 7 SP1 and above (10 recommended for latency improvements). + - Windows 10 recommended (for latency improvements). Upstream supported Windows 7 SP1 and above, but this fork's builds have not been tried on Windows 7 or 8.1. - A CPU with SSE2 support. - Integrated graphics or discrete GPU with DirectX 10.1 support. @@ -41,12 +41,12 @@ Game versions supported: For compatibility with mods, see the [wiki](https://github.com/bolrog/d2dx/wiki/Compatibility-with-other-mods). ## Documentation - This readme contains basic information to get you started. See the [D2DX wiki](https://github.com/bolrog/d2dx/wiki/) for more documentation. + This readme contains basic information to get you started. [`d2dx-defaults.cfg`](https://github.com/jackrayner/d2dx/blob/main/d2dx-defaults.cfg) documents the settings. More is on the original project's [wiki](https://github.com/bolrog/d2dx/wiki/), which describes upstream and may be out of date for this fork. ## Installation - Copy the included "glide3x.dll" into your Diablo II folder. - - Note that in some cases you may have to also download and install the Visual C++ runtime library from Microsoft: https://aka.ms/vs/16/release/vc_redist.x86.exe + Download `d2dx.zip` from the [latest release](https://github.com/jackrayner/d2dx/releases/latest) and copy `glide3x.dll` into your Diablo II folder. + + No Visual C++ runtime install should be needed: the DLL is statically linked and only uses Windows system DLLs. ## Usage To start the game with D2DX enabled, just provide -3dfx, e.g. @@ -55,19 +55,20 @@ To start the game with D2DX enabled, just provide -3dfx, e.g. ``` Windowed/fullscreen mode can be switched at any time by pressing ALT-Enter. The normal -w command-line option works too. -Many of the default settings of D2DX can be changed. For a full list of command-line options and how to use a configuration file, see the [wiki](https://github.com/bolrog/d2dx/wiki/). +Many of the default settings of D2DX can be changed. To use a configuration file, rename `d2dx-defaults.cfg` to `d2dx.cfg` and edit it. A list of command-line options is on the original project's [wiki](https://github.com/bolrog/d2dx/wiki/). ## Troubleshooting ### I get a message box saying "Diablo II is unable to proceed. Unsupported graphics mode." - You are running the download version of Diablo II from blizzard.com. This can be modified to work with D2DX (Wiki page about this to come). + You are running the download version of Diablo II from blizzard.com. It can be modified to work with D2DX, but this fork does not document how yet. ### It's ugly/slow/buggy. - Let me know by filing an issue! I'd like to keep improving D2DX (within the scope of the project). + Check [DEVELOPMENT.md](https://github.com/jackrayner/d2dx/blob/main/DEVELOPMENT.md) to see whether it is a known or planned item, and include `d2dx_log.txt` from your Diablo II folder when reporting a problem. ## Credits -Main development/maintenance: bolrog +Original author: bolrog Patch contributions: Xenthalon +Fork maintenance: Jack Rayner The research of many people in the Diablo II community over twenty years made this project possible. @@ -81,156 +82,8 @@ D2DX uses the following third party libraries: - FXAA implementation by Timothy Lottes. (This software contains source code provided by NVIDIA Corporation.) - stb_image by Sean Barrett - pocketlzma by Robin Berg Pettersen +- tomlc99 by CK Tan, MIT licensed. - 9-tap Catmull-Rom texture filtering by TheRealMJP. -## Donations - -D2DX is free software, but if you enjoy the project and want to buy me a coffee, [click here](https://commerce.coinbase.com/checkout/13ed8fc7-d7f3-428c-b834-ab7bd6501db7). - -## Recent release history - -### 0.99.529 - - Add motion prediction for 1.09d, complete except for hovering text (it's coming). - - Fix low fps in the menus for 1.09d. - -### 0.99.527b - - Add 'filtering' option in cfg file, which allows using bilinear filtering or Catmull-Rom for scaling the game, - for those who prefer the softer look over the default integer-scale/sharp-bilinear. - - Fix artifacts when vsync is off. - -### 0.99.526b - - Fix motion-predicted texts looking corrupted/being positioned wrong. - -### 0.99.525 - - Fix motion prediction of shadows not working for some units. - - Fix window size when window is scaled beyond the desktop dimensions. - - Fix some black text in old versions of MedianXL. - - Remove -dxtestsleepfix, this is now enabled by default (along with the fps fix). - -### 0.99.521 - - Fix low fps in menu for 1.13d with basemod. - - Fix low fps for 1.13c and 1.14 with basemod. - - Fix basemod compatibility so that "BypassFPS" can be enabled without ill effects. - -### 0.99.519 - - Unlock FPS in menus. (Known issue: char select screen animates too fast) - - Add experimental "sleep fix" to reduce microstutter in-game. Can be enabled with -dxtestsleepfix. - Let me know if you notice any improvements to overall smoothness in-game, or any problems! - -### 0.99.518b - - Fix size of window being larger than desktop area with -dxscaleN. - -### 0.99.517 - - Fix in-game state detection, causing DX logo to show in-game and other issues. - -### 0.99.516 - - High FPS (motion prediction) is now default enabled on supported game versions (1.12, 1.13c, 1.13d and 1.14d). - - Fix crash when trying to host TCP/IP game. - -### 0.99.512c - - Add "frameless" window option in cfg file, for hiding the window frame. - - Fix corrupt graphics in low lighting detail mode. - - Fix corrupt graphics in perspective mode. - - Fix distorted automap cross. - - Fix mouse sometimes getting stuck on the edge of the screen when setting a custom resolution in the cfg file. - -### 0.99.511 - - Change resolution mod from D2HD to the newer SGD2FreeRes (both by Mir Drualga). - Custom resolutions now work in 1.09 and 1.14d, but (at this time) there is no support for 1.12. Let me know if this is a problem! - - Some performance optimizations. - - Remove sizing handles on the window (this was never intended). - -### 0.99.510 - - Add the possibility to set a custom in-game resolution in d2dx.cfg. See the wiki for details. - - Remove special case for MedianXL Sigma (don't limit to 1024x768). - -### 0.99.508 - - Fix motion prediction of water splashes e.g. in Kurast Docks. - -### 0.99.507 - - Add motion prediction to weather. - - Improve visual quality of weather a bit (currently only with -dxtestmop). - - Don't block Project Diablo 2 when detected. - -### 0.99.506 - - Fix crash sometimes happening when using a town portal. - - Add motion prediction to missiles. - -### 0.99.505b - - Fix bug causing crash when using config file. - - Add option to set window position in config file. (default is to center) - - Update: Fix tracking of belt items and auras. - - Update: Fix teleportation causing "drift" in motion prediction. - -### 0.99.504 - - Revamp configuration file support. NOTE that the old d2dx.cfg format has changed! See d2dx-defaults.cfg for instructions. - -### 0.99.503 - - Add -dxnotitlechange option to leave window title alone. [patch by Xenthalon] - - Fix -dxscale2/3 not being applied correctly. [patch by Xenthalon] - - Improve the WIP -dxtestmop mode. Now handles movement of all units, not just the player. - -### 0.99.430b - - Add experimental motion prediction ("smooth movement") feature. This gives actual in-game fps above 25. It is a work in progress, see - the Wiki page (https://github.com/bolrog/d2dx/wiki/Motion-Prediction) for info on how to enable it. - - Updated: fix some glitches. - -### 0.99.429 - - Fix AA being applied on merc portraits, and on text (again). - -### 0.99.428 - - Fix AA sometimes being applied to the interior of text. - -### 0.99.423b - - Fix high CPU usage. - - Improve caching. - - Remove registry fix (no longer needed). - - Updated: Fix AA being applied to some UI elements (it should not). - - Updated: Fix d2dx logo. - -### 0.99.422 - - Fix missing stars in Arcane Sanctuary. - - Fix AA behind some transparent effects, e.g. character behind aura fx. - - Add -dxnocompatmodefix command line option (can be used in cases where other mods require XP compat mode). - -### 0.99.419 - - Fix issue where "tooltip" didn't pop up immediately after placing an item in the inventory. - - Add support for cfg file (named d2dx.cfg, should contain cmdline args including '-'). - - Further limit where AA can possibly be applied (only on relevant edges in-game and exclude UI surfaces). - - Performance optimizations. - -### 0.99.415 - - Add fps fix that greatly smoothes out frame pacing and mouse cursor movement. Can be disabled with -dxnofpsfix. - - Improve color precision a bit on devices that support 10 bits per channel (this is not HDR, just reduces precision loss from in-game lighting/gamma). - - To improve bug reports, a log file (d2dx_log.txt) will be written to the Diablo II folder. - -### 0.99.414 - - The mouse cursor is now confined to the game window by default. Disable with -dxnoclipcursor. - - Finish AA implementation, giving improved quality. - - Reverted behavior: the mouse cursor will now "jump" when opening inventory like in the unmodded game. This avoids the character suddenly changing movement direction if holding LMB while opening the inventory. - - Fix issue where D2DX was not able to turn off XP (etc) compatibility mode. - - Fix issue where D2DX used the DX 10.1 feature level by default even on better GPUs. - - Fix misc bugs. - -### 0.99.413 - - Turn off XP compatibility mode for the game executables. It is not necessary with D2DX and causes issues like graphics corruption. - - Fix initial window size erroneously being 640x480 during intro FMVs. - -### 0.99.412 - - Added (tasteful) FXAA, which is enabled by default since it looked so nice. (It doesn't destroy any detail.) - -### 0.99.411 - - D2DX should now work on DirectX 10/10.1 graphics cards. - -### 0.99.410 - - Improved non-integer scaling quality, using "anti-aliased nearest" sampling (similar to sharp-bilinear). - - Specifying -dxnowide will now select a custom screen mode that gives integer scaling, but with ~4:3 aspect ratio. - - Added -dxnoresmod option, which turns off the built-in SlashDiablo-HD (no custom resolutions). - - (For res mod authors) Tuned configurator API to disable the built-in SlashDiablo-HD automatically when used. - - Other internal improvements. - -### 0.99.408 - - Fix window size being squashed vertically after alt-entering from fullscreen mode. - - Fix crash when running on Windows 7. - -A full release history can be found on the Wiki. +## Release history +This fork's releases are in [CHANGELOG.md](https://github.com/jackrayner/d2dx/blob/main/CHANGELOG.md). The original project's history up to 0.99.529 is in [docs/upstream-changelog.md](https://github.com/jackrayner/d2dx/blob/main/docs/upstream-changelog.md). diff --git a/docs/upstream-changelog.md b/docs/upstream-changelog.md new file mode 100644 index 0000000..df73a49 --- /dev/null +++ b/docs/upstream-changelog.md @@ -0,0 +1,149 @@ +# Upstream release history (bolrog/d2dx 0.99.x) + +This is the release history from the README of the original project, D2DX by bolrog (GPLv3). It ends at 0.99.529 (May 2021); later upstream commits were never released. This fork's own releases are in [CHANGELOG.md](https://github.com/jackrayner/d2dx/blob/main/CHANGELOG.md). + +## 0.99.529 + - Add motion prediction for 1.09d, complete except for hovering text (it's coming). + - Fix low fps in the menus for 1.09d. + +## 0.99.527b + - Add 'filtering' option in cfg file, which allows using bilinear filtering or Catmull-Rom for scaling the game, + for those who prefer the softer look over the default integer-scale/sharp-bilinear. + - Fix artifacts when vsync is off. + +## 0.99.526b + - Fix motion-predicted texts looking corrupted/being positioned wrong. + +## 0.99.525 + - Fix motion prediction of shadows not working for some units. + - Fix window size when window is scaled beyond the desktop dimensions. + - Fix some black text in old versions of MedianXL. + - Remove -dxtestsleepfix, this is now enabled by default (along with the fps fix). + +## 0.99.521 + - Fix low fps in menu for 1.13d with basemod. + - Fix low fps for 1.13c and 1.14 with basemod. + - Fix basemod compatibility so that "BypassFPS" can be enabled without ill effects. + +## 0.99.519 + - Unlock FPS in menus. (Known issue: char select screen animates too fast) + - Add experimental "sleep fix" to reduce microstutter in-game. Can be enabled with -dxtestsleepfix. + Let me know if you notice any improvements to overall smoothness in-game, or any problems! + +## 0.99.518b + - Fix size of window being larger than desktop area with -dxscaleN. + +## 0.99.517 + - Fix in-game state detection, causing DX logo to show in-game and other issues. + +## 0.99.516 + - High FPS (motion prediction) is now default enabled on supported game versions (1.12, 1.13c, 1.13d and 1.14d). + - Fix crash when trying to host TCP/IP game. + +## 0.99.512c + - Add "frameless" window option in cfg file, for hiding the window frame. + - Fix corrupt graphics in low lighting detail mode. + - Fix corrupt graphics in perspective mode. + - Fix distorted automap cross. + - Fix mouse sometimes getting stuck on the edge of the screen when setting a custom resolution in the cfg file. + +## 0.99.511 + - Change resolution mod from D2HD to the newer SGD2FreeRes (both by Mir Drualga). + Custom resolutions now work in 1.09 and 1.14d, but (at this time) there is no support for 1.12. Let me know if this is a problem! + - Some performance optimizations. + - Remove sizing handles on the window (this was never intended). + +## 0.99.510 + - Add the possibility to set a custom in-game resolution in d2dx.cfg. See the wiki for details. + - Remove special case for MedianXL Sigma (don't limit to 1024x768). + +## 0.99.508 + - Fix motion prediction of water splashes e.g. in Kurast Docks. + +## 0.99.507 + - Add motion prediction to weather. + - Improve visual quality of weather a bit (currently only with -dxtestmop). + - Don't block Project Diablo 2 when detected. + +## 0.99.506 + - Fix crash sometimes happening when using a town portal. + - Add motion prediction to missiles. + +## 0.99.505b + - Fix bug causing crash when using config file. + - Add option to set window position in config file. (default is to center) + - Update: Fix tracking of belt items and auras. + - Update: Fix teleportation causing "drift" in motion prediction. + +## 0.99.504 + - Revamp configuration file support. NOTE that the old d2dx.cfg format has changed! See d2dx-defaults.cfg for instructions. + +## 0.99.503 + - Add -dxnotitlechange option to leave window title alone. [patch by Xenthalon] + - Fix -dxscale2/3 not being applied correctly. [patch by Xenthalon] + - Improve the WIP -dxtestmop mode. Now handles movement of all units, not just the player. + +## 0.99.430b + - Add experimental motion prediction ("smooth movement") feature. This gives actual in-game fps above 25. It is a work in progress, see + the Wiki page (https://github.com/bolrog/d2dx/wiki/Motion-Prediction) for info on how to enable it. + - Updated: fix some glitches. + +## 0.99.429 + - Fix AA being applied on merc portraits, and on text (again). + +## 0.99.428 + - Fix AA sometimes being applied to the interior of text. + +## 0.99.423b + - Fix high CPU usage. + - Improve caching. + - Remove registry fix (no longer needed). + - Updated: Fix AA being applied to some UI elements (it should not). + - Updated: Fix d2dx logo. + +## 0.99.422 + - Fix missing stars in Arcane Sanctuary. + - Fix AA behind some transparent effects, e.g. character behind aura fx. + - Add -dxnocompatmodefix command line option (can be used in cases where other mods require XP compat mode). + +## 0.99.419 + - Fix issue where "tooltip" didn't pop up immediately after placing an item in the inventory. + - Add support for cfg file (named d2dx.cfg, should contain cmdline args including '-'). + - Further limit where AA can possibly be applied (only on relevant edges in-game and exclude UI surfaces). + - Performance optimizations. + +## 0.99.415 + - Add fps fix that greatly smoothes out frame pacing and mouse cursor movement. Can be disabled with -dxnofpsfix. + - Improve color precision a bit on devices that support 10 bits per channel (this is not HDR, just reduces precision loss from in-game lighting/gamma). + - To improve bug reports, a log file (d2dx_log.txt) will be written to the Diablo II folder. + +## 0.99.414 + - The mouse cursor is now confined to the game window by default. Disable with -dxnoclipcursor. + - Finish AA implementation, giving improved quality. + - Reverted behavior: the mouse cursor will now "jump" when opening inventory like in the unmodded game. This avoids the character suddenly changing movement direction if holding LMB while opening the inventory. + - Fix issue where D2DX was not able to turn off XP (etc) compatibility mode. + - Fix issue where D2DX used the DX 10.1 feature level by default even on better GPUs. + - Fix misc bugs. + +## 0.99.413 + - Turn off XP compatibility mode for the game executables. It is not necessary with D2DX and causes issues like graphics corruption. + - Fix initial window size erroneously being 640x480 during intro FMVs. + +## 0.99.412 + - Added (tasteful) FXAA, which is enabled by default since it looked so nice. (It doesn't destroy any detail.) + +## 0.99.411 + - D2DX should now work on DirectX 10/10.1 graphics cards. + +## 0.99.410 + - Improved non-integer scaling quality, using "anti-aliased nearest" sampling (similar to sharp-bilinear). + - Specifying -dxnowide will now select a custom screen mode that gives integer scaling, but with ~4:3 aspect ratio. + - Added -dxnoresmod option, which turns off the built-in SlashDiablo-HD (no custom resolutions). + - (For res mod authors) Tuned configurator API to disable the built-in SlashDiablo-HD automatically when used. + - Other internal improvements. + +## 0.99.408 + - Fix window size being squashed vertically after alt-entering from fullscreen mode. + - Fix crash when running on Windows 7. + +A full release history can be found on the Wiki. diff --git a/release-please-config.json b/release-please-config.json index 9545ba1..7330f55 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -4,7 +4,6 @@ "include-v-in-tag": false, "bump-minor-pre-major": true, "bump-patch-for-minor-pre-major": true, - "prerelease": true, "bootstrap-sha": "a462e08efe039306d19115ba1f36ad287d76f679", "packages": { ".": {