staphen
88b39dc97d
Make use of SDL_UserEvent::code instead of SDL_Event::type
10 months ago
Gleb Mazovetskiy
af5431875f
MpqArchives: Order by decreasing priority
10 months ago
Gleb Mazovetskiy
58fe44f836
init.h -> init.hpp
10 months ago
Gleb Mazovetskiy
b890edfd56
Support mods with UNPACKED_MPQS
10 months ago
staphen
bea626730f
Redraw everything when floating numbers is enabled
10 months ago
staphen
f1c1e530f5
Draw the filled part of the lower flask
10 months ago
staphen
d024381e52
Use paths::GetBasePath() so it can be freed
10 months ago
Anders Jenbo
3b18dd35d9
Move some Hellfire differences to data files ( #7943 )
...
Co-authored-by: Gleb Mazovetskiy <glex.spb@gmail.com>
11 months ago
Anders Jenbo
3fb8be385b
Add support for MPQ packed mods and turn Hellfire into one
11 months ago
Anders Jenbo
96112e675b
Handle loaded MPQ files in a map instead of bespoke globals ( #7887 )
12 months ago
Eric Robinson
8eddf55c3f
Stores - IsPlayerInStore() ( #7843 )
1 year ago
Eric Robinson
aca06e898a
Menu text revision ( #3902 )
1 year ago
staphen
f68a00d347
Extend edge lights to infinity when rendering per-pixel light buffer
1 year ago
staphen
e602321d5f
Don't assume output surface pitch is the same as width
1 year ago
staphen
7a9c822326
Fix light rendering issue in case 13 of marching squares
1 year ago
staphen
b83f006671
Bleed per-pixel light up when rendering walls
1 year ago
staphen
e06d88aaca
Use signed integers for interpolation in marching squares algorithm
1 year ago
Stephen C. Wills
0b4f3b4732
Introduce subtile lighting into the software renderer ( #7807 )
1 year ago
Gleb Mazovetskiy
b4fbaf1419
text_renderer: Simplify GetLineHeight
1 year ago
Gleb Mazovetskiy
5a14cc57f3
text renderer: colors layout fix + improved tests
...
1. Fixes DrawStringwithColors kerning fit handling and newline handling.
2. Splits tests into one file per function call, making it easier to compare diffs and add new tests.
Also adds `--update_expected` argument to update the expected files with actual results.
1 year ago
Eric Robinson
76407ff41f
Adjust x-start with UiFlags::KerningFitSpacing
...
When using KerningFitSpacing with centered or right-aligned text,
adjust the horizontal start position after changing the spacing.
Co-authored-by: Gleb Mazovetskiy <glex.spb@gmail.com>
1 year ago
Eric Robinson
13a5ae4b0b
Replace Gamma Adjustment with Brightness Adjustment
1 year ago
obligaron
4f9e063197
Change GetDebugGridText text from char to string
1 year ago
staphen
ba773259cd
Fix gcc/MSVC compiler warnings
1 year ago
Gleb Mazovetskiy
04896c1687
text_render: Readjust kerning on each new line
...
Fixes InfoString rendering
1 year ago
Gleb Mazovetskiy
aa47c40553
text_render: Fix `GetLineStartX` for `AlignCenter`
...
Previously, `GetLineStartX` assumed that the text fit into
a single line.
1 year ago
staphen
a21a04d451
Fix off-by-one in path finding logic
1 year ago
Gleb Mazovetskiy
3e6b501d82
Fix pathfinding and increase player path limit
...
The previous implementation didn't behave quite like A-* is supposed to.
After trying to figure out what's causing it and giving up,
I've reimplemented it in a straightforward manner.
Now it seems to work a lot better.
Also increases maximum player path length to 100 steps.
We still only store the first 25 steps in the save file for vanilla
compatibility.
1 year ago
Gleb Mazovetskiy
ee16071761
Untangle pathfinding dependencies
...
1. Makes `path.cpp` concerned solely with the pathfinding algorithm.
2. Turns `path_test` into a standalone test.
1 year ago
Gleb Mazovetskiy
3bb1d685af
Extract current input mode into its own library
...
Removes a transitive dependency on the entire plrctrl from options.
1 year ago
Gleb Mazovetskiy
7afdbe8fdc
Options: Extract padmapper handling from options
...
Options now only contain the padmapper settings, not the padmapping
handling code.
1 year ago
Gleb Mazovetskiy
88a9a0656d
Move option change handlers out of `options.cpp`
...
Fixes #7638
1 year ago
Gleb Mazovetskiy
d94bc424df
`sgOptions` -> `GetOptions()`
...
In C++, globals initialization order accross translation units is not
defined. Accessing a global via a function ensures that it is initialized.
This will be needed for #7638 , which will statically initialize change
handlers after the Options object has been initialized.
1 year ago
Anders Jenbo
908fb47073
Merge limitFPS and vSync options ( #7646 )
1 year ago
Gleb Mazovetskiy
d7647d6c63
More dependency untangling
...
1. Moves more assets-related stuff from `init` to `engine/assets`.
2. Removes `SDL_audiolib` dependency from `soundsample.h`.
3. Cleans up some unused/missing includes.
1 year ago
Gleb Mazovetskiy
a7651f15d9
Extract `HeadlessMode` from `diablo.h`
...
Untangles some dependencies.
Many places that use `HeadlessMode` do not need all of `diablo.h`.
1 year ago
Gleb Mazovetskiy
b76feb2be3
Extract game mode out of init.cpp
...
Untangles some dependencies
1 year ago
Gleb Mazovetskiy
c31836eab8
Split up `engine.{h,cpp}`
...
Untangles dependencies by splitting up `engine.{h,cpp}` into 3 files:
1. `primitive_render`
2. `ticks` -- only contains `GetAnimationFrame` for now.
3. `GetWidth2` renamed to `CalculateSpriteTileCenterX` and moved to `levels/dun_tile.hpp`.
1 year ago
Gleb Mazovetskiy
dd76f17e4b
Rename endian.hpp to endian_read.hpp
...
Following #7620 , which split the write functions into a separate header.
1 year ago
Gleb Mazovetskiy
a49b1f2d58
Extract Is{Any,None}Of out of engine.hpp
...
Untangles some of the dependencies
1 year ago
Gleb Mazovetskiy
19ccf7ce88
Split endian_write from endian
...
Only `endian_write` functions require SDL, splitting them out
will allow us to clean up the dependencies a bit.
1 year ago
Gleb Mazovetskiy
affd7e86e6
Move MPQs from init to engine/assets
...
Untangles some of the dependencies.
1 year ago
Eric Robinson
1b522fe260
Fix divide-by-zero crash in `getAnimationProgress()` ( #7532 )
1 year ago
staphen
09ba7532ea
At shutdown, free surfaces and textures allocated for virtual gamepad graphics
1 year ago
Gleb Mazovetskiy
66b0f43731
Add a threshold for skipping the loading screen
1 year ago
Gleb Mazovetskiy
7b0558146e
Async load: Handle errors
1 year ago
Gleb Mazovetskiy
f7a93f4cd3
Improve `dev.display.path()`
...
1. Do not draw foliage with the pause trn.
2. Display the number of steps.
3. If the tile is not walkable (allowed for destination tile), display
the number of steps in yellow.
1 year ago
Gleb Mazovetskiy
e692acb049
Pathfinding: Rename functions
...
Rename functions to better reflect what they do.
1 year ago
Andrew James
c7abf2f778
Extract logic from CheckInvCut/AutoPlaceItemInInventory ( #7494 )
...
* Remove unnecessary namespace
* Extract FindSlotUnderCursor
* Split logic for finding a space in the inventory to dedicated functions
1 year ago
Gleb Mazovetskiy
aa751ff538
Reduce CLX header size from 10 to 6
...
We remain compatible with the 10-byte header size,
and actually now support any header size.
1 year ago