Anders Jenbo
7169882b1f
✨ Implement new font rendering
5 years ago
Juliano Leal Goncalves
20d356a6eb
♻️ Leverage 'Point' in art_draw functions
5 years ago
Vladimir Olteanu
252c5316d8
Have RenderUTF8_Solid_Wrapped return SDLSurfaceUniquePtr
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
0f2ad469ea
♻️ Clean up variable initialization
5 years ago
Anders Jenbo
48113d064a
Clang-tidy: readability-redundant-declaration
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
fa0b286693
♻️ Typed file loading
...
Tthis gives us the option to specify what type a file should be loaded
as, avoidng the need to case it and does some automatic checks on the
fitness of the data, while making the process simpler.
If no type is given then the type will be set to std::byte which limit
what operations can be performed on the data.
5 years ago
Anders Jenbo
cc164985a3
🎨 Correct type checks in src sub-folder
5 years ago
Anders Jenbo
191d98207b
🎨 readability-identifier-naming on DiabloUI
5 years ago
Anders Jenbo
bb4e1960e7
🎨 modernize-use-nullptr
5 years ago
Gleb Mazovetskiy
295b5bce81
🧹 DiabloUI: Clean up text render cache
...
Cleans up the handling of text render cache for `UiText` and `UiButton`.
This also happens to fix a memory leak (`FreeCache` was never called).
5 years ago
Anders Jenbo
8c821e98d3
🚚 Restructure files
5 years ago
Gleb Mazovetskiy
bb5cadf19d
Migrate text_draw to SDLSurfaceUniquePtr
5 years ago
Anders Jenbo
bfb3c11c2b
🎨 Change namespace to devilution
5 years ago
Gleb Mazovetskiy
a6019f4e55
DiabloUI: Render to DiabloUiSurface()
...
Use that instead of using `GetOutputSurface()` directly.
For the rg99 port, we'll want to render this to the `pal_surface`
instead of output surface directly.
Might also be useful for 3ds, perhaps to render to the bottom screen.
5 years ago
BDC
62de5f1600
Refactor DiabloUI to dynamic C++03 compatible code
...
This will help with porting the game to the original Xbox, and also make
it easier to implement dynamic resolutions and translations.
6 years ago
Anders Jenbo
1c824a253f
Make controller TextAlignment C++03 compatible
6 years ago
Anders Jenbo
ca82f81582
Move menu elements to the center of the screen
...
Previously the rendering was just shifted which gave the mouse an odd
position and made it impossible to place new elements in the left side.
6 years ago
Anders Jenbo
0da3461d35
Use explicit types instead of auto
6 years ago
Anders Jenbo
69ad34f58f
Consistently use NULL instead of nullptr
...
While nullptr does have extra checking, most of the code uses NULL and
nullptr makes it harder to port the code to some targets like the
original XBox
6 years ago
Gleb Mazovetskiy
3bb28a48c9
DiabloUI: Also pre-scale DrawTTF cache
6 years ago
Anders Jenbo
32d91cb446
Render menu directly to the output surface
...
Fixes fades not reset when switching to a new menu before fade had
ended.
Fixes incorrect start position for credits.
6 years ago
Mathieu Maret
90e60654fe
fix rest on the GUI
6 years ago
Gleb Mazovetskiy
4ac8472850
Add some checks to DrawTTF
7 years ago
Anders Jenbo
a8e4db538f
Display SDL error messages in UI dialog
...
This will also end the application in most cases
7 years ago
Gleb Mazovetskiy
850d09b0a5
Minor cleanup of internal error handling
...
1. TTF no longer crashes on exit.
2. Art failing to load simply isn't rendered instead of crashing in random places.
3. Fixes empty line rendering in ttf_render_wrapped.cpp
4. dx_cleanup is now idempotent.
7 years ago
Gleb Mazovetskiy
40651d8a19
Implement x-align for wrapped TTF text
7 years ago
Gleb Mazovetskiy
5d7f6db2fc
Wrapped text rendering for TTF
...
Does not do centering yet, but should be easy to add in the future
7 years ago
Gleb Mazovetskiy
aa3a8fecd5
DiabloUI: Dialog positioning and other tweaks
7 years ago
Gleb Mazovetskiy
458fbcef88
DiabloUI: Implement some dialogs
...
Partially addresses #303
7 years ago
Gleb Mazovetskiy
17b5011916
DiabloUI: Move art and text code out of diablo.cpp
7 years ago