Gleb Mazovetskiy
bd5647fb06
Fix premium items reroll on level change
...
Bug introduced a few commits ago in 1519e995cf
Fixes #4036
2022-02-06 18:45:07 +01:00
Gleb Mazovetskiy
1519e995cf
Move store graphics out of stores.cpp
...
These graphics are used in various places outside of `stores.cpp`.
2022-01-30 14:56:04 +01:00
Gleb Mazovetskiy
076b0c0c05
Overhaul tests
...
1. Adds a `libdevilution_so` target when tests are enabled.
2. Each test file is now a separate binary target linked against `libdevilutionx_so` (can now run tests in parallel).
3. Tests are now defined in a separate `test/CMakeLists.txt` file.
4. Building the tests is now controlled by the standard `BUILD_TESTING` option (defined by CTest).
5. Tests are now built by default.
6. On CI, test errors are now reported.
Also:
* `.clang-format`: Enable SortIncludes in tests
* `path_test.cpp`: Fix -Wsign-compare
2021-12-16 20:26:51 +00:00
Gleb Mazovetskiy
c57644970f
Move UiFlags and UiPanels into their own files
...
The first breaks circular dependency between `DiabloUI` and `text_render`.
The latter one moves `UiPanels` to a more appropriate place.
2021-11-25 12:22:27 +01:00
Gleb Mazovetskiy
e29c1d05a2
Improve Help screen layout + fix CJ
2021-11-20 02:31:21 +00:00
Gleb Mazovetskiy
4f64b87330
Fix talk/store text overlap for Chinese and Japanese
...
We ensure that selectable lines are placed at the same vertical
coordinates but space out unselectable text lines at the cost
of reduced heigh of empty space between the store items.
We also have to move the back button in scrollable lists to the
lower right.
This can definitely be improved further but at least it solves
the problem for now.
Refs #3162
2021-11-20 02:31:21 +00:00
Juliano Leal Goncalves
bb2dfdfb73
🚚 Rename 'ItemStruct' to 'Item'
2021-08-30 13:40:08 +02:00
ephphatha
4ad53232a0
Convert the UiFlags enum to a scoped enum type
...
Replace operator&& with named function
2021-07-31 20:22:40 +02:00
Anders Jenbo
9ebdb6db69
General clean up
2021-07-08 03:30:25 -07:00
Anders Jenbo
fc353fc799
Clang-tidy: FunctionCase
2021-07-03 15:46:39 -07:00
Gleb Mazovetskiy
cb0dae8590
🚚 Rename CelOutputBuf to Surface and extract
2021-07-03 05:33:32 -07:00
Gleb Mazovetskiy
e40b1963f9
🚚 engine.h: Extract CelSprite and file loading
2021-06-21 01:36:20 -07:00
Anders Jenbo
8a7ec56d3a
Player by reference part 2
...
This mostly change player to be by reference instead of by index.
But additionally it does stript checks for gold in the belt, move some
value types to the initialization and short circute a few functiongs.
2021-05-24 21:00:32 +02:00
Anders Jenbo
18aa04fa4f
♻️ Use common text rendering for store menus
2021-05-14 19:11:43 +02:00
Anders Jenbo
68923c6c33
✨ Generic game text render function
...
This should gradually replace all the direct rendering of game texts
throughout the code. The interface is made to closly mirror that of the
art fonts as that is what will eventually be used for rendering Unicode
fonts both in the menus and ingame.
fixup! ✨ Generic game text render function
2021-05-08 18:48:19 +02:00
Gleb Mazovetskiy
1b8b62a8c2
♻️ Store CEL width with the sprite itself
...
Instead of passing the CEL sprite width when drawing, store the CEL
width at load time in the new `CelSprite` struct.
Implemented for most sprites except towners, missiles, or monsters.
2021-05-01 20:51:55 +02:00
thebigMuh
ad8f342db0
Adding constness
2021-04-26 23:30:02 +02:00
Anders Jenbo
d024f79b0e
🧹 performance-unnecessary-value-param
2021-04-22 00:08:19 +02:00
Anders Jenbo
373f28736f
🎨 Acceptable parts of modernize-*
2021-04-19 22:42:19 +02:00
Anders Jenbo
5fdb9ce459
🎨 Format code
2021-04-19 00:37:33 +02:00
Anders Jenbo
997c1dba55
🚚 Split up all.h in to proper header relations
2021-04-16 01:04:54 +02:00
Anders Jenbo
f450d6a125
🚚 Move defines to there proper files
2021-04-16 01:04:54 +02:00
Anders Jenbo
e7ae8ddd04
🚚 Move all enums to there respective headers
2021-04-10 16:30:00 +02:00
Anders Jenbo
433edc63ea
♻️ Consistently use pragma once to guard the headers
2021-04-06 15:21:25 +02:00
Anders Jenbo
bfb3c11c2b
🎨 Change namespace to devilution
2021-04-06 15:21:25 +02:00
Anders Jenbo
630e507f63
🚚 Apply namespace
2021-04-06 15:21:25 +02:00
Anders Jenbo
2362ff82f7
✨ Add black text color
2021-03-27 23:04:19 +01:00
Gleb Mazovetskiy
fd70879577
Migrate DrawSLine away from gpBuffer
...
Also applies bugfix
2021-03-13 02:26:11 +01:00
Anders Jenbo
e7ec90932a
💚 Expose AddStoreHoldRepair to the tests
2021-03-12 09:10:41 +01:00
Anders Jenbo
ede55e0914
♻️ Document variables in stores.cpp
...
This also fixes OOB when buying all items in a list
2021-03-12 07:14:44 +01:00
Gleb Mazovetskiy
d55a1c8a7d
Pass CelOutputBuffer to game text printing ( #1095 )
...
* Pass CelOutputBuffer to game text printing
* DrawHalfTransparentRectTo: minor cleanup
2021-03-03 18:20:24 +01:00
Gleb Mazovetskiy
83ce7c27af
Enginify trans_rect
...
Moves `trans_rect` to `engine` as `DrawHalfTransparentRectTo` and makes
it operate on `CelOutputBuf`.
2021-03-03 12:07:07 +01:00
pionere
f5c1079d6f
eliminate unused code
2021-02-19 22:04:11 +01:00
Anders Jenbo
06b7c78406
Notes of untimly header cleanups
2021-01-26 03:12:58 +01:00
Anders Jenbo
5bdbf18902
Merge branch 'master' of github.com:diasurgical/devilution
2021-01-05 22:44:11 +01:00
Anders Jenbo
7aa7ee738d
Clean up witchitem init
2021-01-02 23:05:11 +01:00
Anders Jenbo
d4976f70ac
Merge branch 'master' of github.com:diasurgical/devilution
2020-11-09 06:36:10 +01:00
Anders Jenbo
e3ef222c4a
Reorder stores.cpp
2020-11-09 04:36:59 +01:00
Anders Jenbo
330074e840
Clean up menu animation code
2020-10-31 21:41:06 +01:00
Anders Jenbo
72e2637061
Merge branch 'master' of github.com:diasurgical/devilution
2020-10-25 17:38:06 +01:00
Gleb Mazovetskiy
ec329e645c
Fix all "no-write-strings" warnings
2020-10-25 15:37:51 +01:00
Anders Jenbo
57326c6c7f
Merge branch 'master' of github.com:diasurgical/devilution
2020-10-14 11:02:48 +02:00
Anders Jenbo
34e526d4a9
Fix OOB in stores ( #2123 )
2020-10-14 08:56:21 +02:00
Anders Jenbo
2d6c1efeab
Merge branch 'master' of github.com:diasurgical/devilution
2020-10-12 10:46:28 +02:00
Anders Jenbo
7e04c63977
Merge branch 'hellfire' of github.com:diasurgical/devilution
2020-10-11 23:53:07 +02:00
Anders Jenbo
893efd51ea
Merge branch 'master' of github.com:diasurgical/devilution
2020-09-27 03:34:42 +02:00
Anders Jenbo
1ba96a6777
Add doxygen description to remaining engine files
2020-07-06 05:43:25 +02:00
Joel Falcou
c4223d4c29
Per file basis use of extern C
2020-04-22 13:15:29 +02:00
Joel Falcou
64d26a7934
Sanitize use of namespace
...
Wrap individual headers in dvl namespace to prevent
including standard header in another namespace.
2020-04-22 13:15:29 +02:00
Anders Jenbo
3c5982083f
Merge branch 'master' of github.com:diasurgical/devilution
2020-04-06 12:05:13 +02:00