Gleb Mazovetskiy
55b0fc5c26
Text inputs: Selection, copy, cut
...
Adds shift selection, Ctrl+C, and Ctrl+X handling.
Also fixes left-right movement for non-ASCII characters.
2023-10-30 20:34:12 +00:00
Gleb Mazovetskiy
9e2608bd98
Fix DiabloMsg rendering for CJK
...
Fixes #6675
2023-10-14 00:14:42 +02:00
Eric Robinson
4c7e2edd06
Automap: Transparency ( #6607 )
2023-09-24 21:30:44 +00:00
Gleb Mazovetskiy
fa155d4ffd
Dungeon tiles: Port over some cleanups from #6636
2023-09-23 18:02:43 +01:00
Gleb Mazovetskiy
cf925d1edc
Replace tuples with structs
...
Structs are more readable because the fields have names.
2023-09-13 13:47:47 +01:00
Gleb Mazovetskiy
0f77cc3797
Force-inline methods to improve debug build perf
...
This has little or no effect on the optimized build
but significantly improves performance of the headless debug build
`timedemo_test` on my machine goes from 3s to 2s.
2023-09-10 02:14:01 +01:00
Gleb Mazovetskiy
74755c8be7
Remove utils/stdcompat/cstddef.hpp
2023-08-14 01:54:29 +01:00
Gleb Mazovetskiy
2f1290c5d2
Remove C++11 compatibility code
2023-08-12 18:23:52 +02:00
Gleb Mazovetskiy
4b5c853896
Use fold expressions for IsAny/NoneOf on C++17
...
This is much faster in debug mode than the non-C++17 version.
For example, with timedemo_test in debug mode, `M_Talker` goes from 11%
of the total time to just 3.5%.
2022-12-16 10:22:19 +01:00
Gleb Mazovetskiy
46e755f680
Simplify spell icon handling
...
Hide the internals of spell icon rendering behind simple functions.
2022-11-22 02:37:19 +01:00
Gleb Mazovetskiy
9b65eca49b
Remove Art and related functions
2022-08-08 14:29:45 +01:00
Anders Jenbo
0312bae93f
Remove more miniwin code
2022-07-10 21:13:39 +02:00
Andrew James
021c7a652f
Add helpers for checking object type ( #3357 )
...
* Add helper to test if an object is a trap source
* Add helper to test if an object is a barrel
* Add helper to test if an object is a crucifix
* Add helpers to check if an object is a chest (and statuses)
* Add helpers to check if an object is a (basic) shrine
2021-11-06 18:32:52 +01:00
Anders Jenbo
74b57558c9
🚚 Move local code to anonymous namespace
2021-07-10 17:30:15 -07:00
Gleb Mazovetskiy
cb0dae8590
🚚 Rename CelOutputBuf to Surface and extract
2021-07-03 05:33:32 -07:00
qndel
373f1db22e
If cleanup + bugfixes ( #2273 )
2021-07-01 18:32:25 +02:00
ephphatha
357f6f1dc3
Move RNG functions to their own header/source files
2021-06-27 03:09:41 -07:00
Andrew James
20190ee687
Update random number functions to avoid IB ( #2226 )
...
* Update random number functions to avoid IB
Most calls to set seed were using uint32_t already, there were a few variables which were better served by having their type changed from signed to unsigned. The one exception is ItemStruct::_iSeed. This is an identifier that also happens to be used as a seed occasionally so a comment was added documenting this exception.
Includes suggested style changes for Source/towners.h; Source/towners.cpp; Source/msg.h; Source/multi.h
2021-06-27 10:37:09 +02:00
Anders Jenbo
af254601d6
♻️ Apply clang-tidy to engine
2021-06-25 13:22:08 +02:00
Gleb Mazovetskiy
14218080b6
🚚 engine.h: Extract CelGetFrame and friends
2021-06-21 02:34:28 -07:00
Gleb Mazovetskiy
4ea7ba0f5f
🚚 engine.h: Extract LoadLE32 and LoadBE32
2021-06-21 02:34:28 -07:00
Gleb Mazovetskiy
1bc9c3973f
🚚 engine.h: Extract Rectangle
2021-06-21 02:34:28 -07:00
Gleb Mazovetskiy
e40b1963f9
🚚 engine.h: Extract CelSprite and file loading
2021-06-21 01:36:20 -07:00
Gleb Mazovetskiy
aa54675d83
🚚 engine.h: Extract Size
2021-06-21 01:36:20 -07:00
Gleb Mazovetskiy
dcf3397139
🚚 engine.h: Extract ActorPosition
2021-06-21 01:36:20 -07:00
Gleb Mazovetskiy
f9f301b054
🚚 engine.h: Extract Point, Direction, clamp
...
`engine.h` is getting quite bloated. Moves this code to their own files.
2021-06-21 01:36:20 -07:00
Juliano Leal Goncalves
25eaac78c1
♻️ Leverage 'Size' to represent a 'Rectangle's width/height
2021-06-20 18:27:45 -07:00
Juliano Leal Goncalves
e3ea6a9042
♻️ Leverage 'Point' to represent a 'Rectangle's position
2021-06-20 18:27:45 -07:00
Juliano Leal Goncalves
ff147f9280
🚚 Rename 'RECT32' to 'Rectangle' to match naming style of other core structs
2021-06-20 18:27:45 -07:00
Juliano Leal Goncalves
4490340a47
🚚 Move 'RECT32' type to 'engine.h' alongside other core types
2021-06-20 18:27:45 -07:00
ephphatha
8d5b5e833b
Add tests for LCG random engine
...
This documents the chosen LCG parameters and the default mapping function used in random number generation.
GetLCGEngineState() is a helper needed for testing because AdvanceRndSeed combines a distribution with a call to progress the engine. I'll split those eventually but this at least shows the current behaviour and should flag any bugs introduced by future changes.
2021-06-20 16:27:06 -07:00
Gleb Mazovetskiy
982260d94e
Clip control.cpp draw calls
...
No longer crashes there when running at a resolution smaller than
640x480
2021-06-16 03:12:54 +02:00
Juliano Leal Goncalves
1328c9ea93
🎨 Make 'Size' fields camelCase
2021-06-12 19:47:52 +02:00
qndel
4ba2c755c3
attempt to fix CI ( #2113 )
...
fix CI build
2021-06-03 01:23:48 +02:00
Vladimir Olteanu
02ffada9b8
constexpr version of abs
2021-06-02 13:36:17 +02:00
Vladimir Olteanu
fce8f7a503
Make Point stuff constexpr
2021-06-02 13:36:17 +02:00
Vladimir Olteanu
e37e7e408c
Introduce Point::WalkingDistance
2021-06-02 13:36:17 +02:00
Vladimir Olteanu
690211a699
replace Point::Absolute with abs
2021-06-02 13:36:17 +02:00
Vladimir Olteanu
ba3f0aef8b
Introduce Point::Absolute and Point::ManhattanDistance
2021-06-02 13:36:17 +02:00
Juliano Leal Goncalves
8622130966
♻️ Add '==' and '!=' operators to 'Size' struct
2021-05-31 06:13:24 +02:00
Juliano Leal Goncalves
58501cab26
🚚 Move 'Size' struct to engine.h
2021-05-31 06:05:13 +02:00
Kalebe Alves
0461529176
Move byte from engine.h
2021-05-27 16:04:27 +02:00
Juliano Leal Goncalves
94164812f4
🏷️ Add integer overload for Point multiplication operator
2021-05-25 04:09:02 +02:00
Anders Jenbo
43f26084d0
Fix warnigns
2021-05-24 05:27:06 +02:00
Juliano Leal Goncalves
21fdb0dcd9
♻️ Replace manual direction displacement logic with 'Point' add operator
2021-05-24 04:46:08 +02:00
Juliano Leal Goncalves
d55cd99dd5
🚚 Rename 'direction' enum to 'Direction'
2021-05-24 04:46:08 +02:00
Gleb Mazovetskiy
2f3fa76320
Fix gkd350h build
...
Works around a GCC bug on some platforms:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97044
2021-05-18 18:22:48 +02:00
obligaron
be13a0f727
Point: Add operator* float and operator-
2021-05-16 21:24:36 +02:00
Gleb Mazovetskiy
1181cc68ac
🎉 Remove buffer padding
...
The padding is no longer needed
2021-05-11 07:57:08 +02:00
Vladimir Olteanu
4ff0221a8d
Fix https://github.com/diasurgical/devilutionX/issues/1928
2021-05-11 02:49:17 +01:00