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.
4 years ago
Anders Jenbo
95fef934c1
Correctly cut up lines
...
Fixes #3558
4 years ago
Gleb Mazovetskiy
0c694edaba
WordWrapString: Wrap on punctuation
...
Useful for Chinese and Japanese, which do not have spaces between words,
nor whitespace after punctuation.
5 years ago
Anders Jenbo
7169882b1f
✨ Implement new font rendering
5 years ago
obligaron
a27ab517dc
Enable multiline DiabloMsg and use it in debug.cpp
5 years ago
obligaron
19652a84c9
Replace msgtable, msgcnt and msgflag with std::deque
5 years ago
obligaron
6325d87e04
Introduce CancelCurrentDiabloMsg and hide msgdelay
5 years ago
obligaron
3c45149cef
Introduce IsDiabloMsgAvailable and hide msgflag
5 years ago
Anders Jenbo
dc059dadb8
Restrict access to Hive and Crypt in multiplayer
5 years ago
ephphatha
0575716eac
Rename UiFlags members to group related options
5 years ago
ephphatha
4ad53232a0
Convert the UiFlags enum to a scoped enum type
...
Replace operator&& with named function
5 years ago
Anders Jenbo
a19e7b2a3b
Remove some more use of miniwin
5 years ago
Anders Jenbo
74b57558c9
🚚 Move local code to anonymous namespace
5 years ago
Anders Jenbo
903d4bd2e1
Scope all for loops
...
This caused 7 of the loops to be rewriteen using range by clang-tidy
5 years ago
Gleb Mazovetskiy
55464eec78
Fix `-Wmissing-braces`
...
Fixes warnings such as this one:
```
../../../../../../Source/engine/render/text_render.hpp:83:33: warning: suggest braces around initialization of subobject [-Wmissing-braces]
return DrawString(out, text, { position.x, position.y, out.w() - position.x, 0 }, flags, spacing, lineHeight, drawTextCursor);
^~~~~~~~~~~~~~~~~~~~~~
```
5 years ago
Gleb Mazovetskiy
cb0dae8590
🚚 Rename `CelOutputBuf` to `Surface` and extract
5 years ago
Kalebe Alves
118efe8e6d
Use Point/SDL_Rect for control functions coordinate system
5 years ago
Anders Jenbo
9e2206a673
Format code
5 years ago
arcas
6502a3ca4d
Adding resources for translation ( #1973 )
5 years ago
Anders Jenbo
8361e70087
♻️ Use DrawString in error.cpp
5 years ago
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
5 years ago
Gleb Mazovetskiy
0edfa3de66
🚚 Move CEL rendering to engine/render/cel_render.cpp
5 years ago
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.
5 years ago
Mathieu Maret
8d8711a966
Apply static menu translations ( #1728 )
5 years ago
John Törnblom
e0dddf508a
Add automatically translated string literals ( #1694 )
5 years ago
Anders Jenbo
d024f79b0e
🧹 performance-unnecessary-value-param
5 years ago
Jmgr
1d84156509
Simplify bitshift divisions/multiplications
5 years ago
Anders Jenbo
373f28736f
🎨 Acceptable parts of modernize-*
5 years ago
Anders Jenbo
c89bd9c001
🚨 Fix remaning warnings for clang and gcc
5 years ago
qndel
449cea2b47
fix typo in spiritual shrine ( #1569 )
5 years ago
Anders Jenbo
997c1dba55
🚚 Split up all.h in to proper header relations
5 years ago
Anders Jenbo
f450d6a125
🚚 Move defines to there proper files
5 years ago
Anders Jenbo
b1ffdca0a3
♻️ make better use of enums
5 years ago
Anders Jenbo
bfb3c11c2b
🎨 Change namespace to devilution
5 years ago
Anders Jenbo
630e507f63
🚚 Apply namespace
5 years ago
Gleb Mazovetskiy
cd59a1c323
Completely replace gpBuffer with CelOutputBuffer
...
`CelOutputBuffer` now contains an `SDL_Surface` and an `SDL_Rect`.
We now have access to SDL surface manipulation functions.
`gpBuffer` and `gpBufEnd` are completely gone 🧹
This results in some FPS loss (250 -> 195) recovered in a subsequent
commit.
5 years ago
Gleb Mazovetskiy
a0af2a8ebe
Migrate gmenu_clear_buffer away from gpBuffer
5 years ago
Anders Jenbo
037ef082b4
🐛 Correct position of dialog backgrounds
...
Fixes #1098
5 years ago
Gleb Mazovetskiy
d55a1c8a7d
Pass CelOutputBuffer to game text printing ( #1095 )
...
* Pass CelOutputBuffer to game text printing
* DrawHalfTransparentRectTo: minor cleanup
5 years ago
Gleb Mazovetskiy
83ce7c27af
Enginify `trans_rect`
...
Moves `trans_rect` to `engine` as `DrawHalfTransparentRectTo` and makes
it operate on `CelOutputBuf`.
5 years ago
Anders Jenbo
bdebd5f1f5
OOB in error.cpp ( #1847 )
5 years ago
Anders Jenbo
d20eddf48e
Unifcy a chunk of Hellfire's code pathts
5 years ago
Gleb Mazovetskiy
ec329e645c
Fix all "no-write-strings" warnings
5 years ago
Anders Jenbo
cc280eeba3
Enable asserts in files that where cleaned
6 years ago
Anders Jenbo
c384711a5f
Backport cleanups from hellfire branch
6 years ago
Anders Jenbo
3c276a3cd3
Add documentation
...
- Add file documentation to about 1/4 of the files in Source
- Copy over a lot of the documentation from the sanctuary/notes repo
- Standardise all the existing documentation
- Create a configuration for Doxygen
- Add more documentation (engine.cpp is now fully documented)
6 years ago
galaxyhaxz
81ff8e6287
Metallic hydrogen neural array
6 years ago
Anders Jenbo
20621a0642
add all.h and use in place of diablo.h ( #2005 )
...
Now diablo.h is treated in the same way as all other header files of
Source, as it only contains the declarations of global variables and
functions of diablo.cpp.
Besides consistency, this also enables mods to include diablo.h just
like any other header file without having to include every header file
(and without having to include C++ specific aspects of the now all.h).
6 years ago
Anders Jenbo
08aa6a860a
Move generic helpers out of miniwin
6 years ago
Anders Jenbo
1a65a029df
[hellfire] errors
6 years ago