Gleb Mazovetskiy
4e74717fc2
[1.5] Backport text rendering
...
Backports the text rendering code from 1.6 to 1.5.
Done by starting with the current master's engine/render/text_render
and backporting things as-needed until it worked.
CLX rendering and text input handling are also backported as part of
this change.
5 months ago
Gleb Mazovetskiy
4fa3732526
Add missing <cstdint> includes
...
Done with the following script:
```ruby
Dir["Source/**/*.{h,c,cc,cpp,hpp}"].each do |path|
v = File.read(path)
next if !v.include?("uint32_t") || v.include?("cstdint")
lines = v.lines
line_num = if lines[2].start_with?(" *")
lines.index { |l| l.start_with?(" */") } + 3
else
3
end
lines.insert(line_num, "#include <cstdint>\n")
File.write(path, lines.join(""))
end
```
then fixed-up manually
3 years ago
Gleb Mazovetskiy
1fc8ecb6f6
Add fmt::runtime annotations for C++20 support
...
`fmt` requires non-contexpr format string arguments to be wrapped in
`fmt::runtime` in C++20.
4 years ago
Gleb Mazovetskiy
779ccaca17
Overhaul translation fetching
...
1. Do not modify the map after loading. Instead, return string views
(guaranteed to be null-terminated) from look up functions and return
the key directly if not found.
2. Use an `unorded_map` instead of `map` where available (C++20).
Saves a bit of RAM (~50 KiB) and improves lookup performance.
4 years ago
obligaron
bc15bdf3a9
Remove PANEL_ defines and replace them with GetMainPanel()
4 years ago
obligaron
70c5cf6cad
Fix item label text with open stash ( #4595 )
...
* Item labels: check if stash is open in IsMouseOverGameArea
* Add IsLeft/RightPanelOpen
4 years ago
Anders Jenbo
a48f89007d
Implement stash
4 years ago
qndel
48f102eff1
Chat log
4 years ago
KPhoenix
1c25cb4bf0
Fixed Event Messages color
4 years ago
KPhoenix
a08026097a
Chat Interface Revision ( #3840 )
...
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
4 years ago
Gleb Mazovetskiy
e07c9eee03
Fix chat message overlap in CJK
4 years ago
Gleb Mazovetskiy
1b8939d70c
Safer chat message handling
4 years ago
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
799f1763af
Performce UTF8 aware limited string copies
4 years ago
obligaron
677303cba9
Reduce use of view globals in game menu
4 years ago
Anders Jenbo
f09a065da5
Fix chat position in relation to dynamic panels
4 years ago
Anders Jenbo
573d24e1c0
Remove wrong translation comment
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
7771a08d03
Translatable mainpanel
5 years ago
Anders Jenbo
7169882b1f
✨ Implement new font rendering
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
9c4e34f988
Player by reference
5 years ago
Anders Jenbo
f0a7a5c989
🎨 Apply code style
5 years ago
Anders Jenbo
069249f318
🚚 Move local function to anonymous namespace i-p
5 years ago
Anders Jenbo
0889780923
Remove more usage of miniwin types
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
Anders Jenbo
9b8bf92575
Rename quest globals
5 years ago
Anders Jenbo
96bf75b502
Rename player globals
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
Anders Jenbo
a7c7fa0030
Fully apply clang-tidy/format to all files
5 years ago
Gleb Mazovetskiy
cb0dae8590
🚚 Rename `CelOutputBuf` to `Surface` and extract
5 years ago
Anders Jenbo
129342d07a
Clang-tidy: GlobalConstantCase
5 years ago
Anders Jenbo
d8fa29c972
Clean up more implicit bool conversion
5 years ago
Jmgr
bbd39aa513
Replace sprintfs with strcpy for translatable strings
5 years ago
Jmgr
6e85cde978
Update format strings
5 years ago
Jmgr
0c27e756f7
Add fmt::format
5 years ago
Anders Jenbo
fd96bb9ab5
Render chat messages using common text rendering
5 years ago
Anders Jenbo
34744c068f
♻️ Consitantly use %i and not %d
5 years ago
arcas
6502a3ca4d
Adding resources for translation ( #1973 )
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
Anders Jenbo
b69d18f12d
🌐 Enable translation of all remaning strings
5 years ago
Anders Jenbo
d024f79b0e
🧹 performance-unnecessary-value-param
5 years ago
Anders Jenbo
373f28736f
🎨 Acceptable parts of modernize-*
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
93d42b62b8
♻️ Change BOOL to bool
5 years ago
Anders Jenbo
bfb3c11c2b
🎨 Change namespace to devilution
5 years ago
Anders Jenbo
630e507f63
🚚 Apply namespace
5 years ago
Anders Jenbo
2362ff82f7
✨ Add black text color
5 years ago