Anders Jenbo
72656b3011
Move path and palette to the engine folder
4 years ago
Anders Jenbo
99181fd709
Move more files to the engine folder
4 years ago
Gleb Mazovetskiy
73f9dd45ab
Move embedded dialog assets to the MPQ
...
If we can't find `devilutionx.mpq`, we can't render a dialog either,
because the MPQ contains the fonts.
4 years ago
Gleb Mazovetskiy
9d2948c782
Loading screen: Free the background early
...
Frees the background after blitting it once in the loading screen.
This gives the game more RAM for the actual loading.
4 years ago
Gleb Mazovetskiy
8514cc80a9
Migrate embedded button data to PCX
...
It is a bit smaller that way.
Also renders the non-embedded dialogs as PCX.
The embedded dialog is still raw pixel data because it is larger as PCX.
4 years ago
Gleb Mazovetskiy
9e9b656b88
DiabloUI: Render backgrounds as PCX
...
The backgrounds can be quite large, for example
the Hellfire title background is a 2.4 MiB PCX file.
Previously, we converted all background to SDL surfaces.
This required extra memory, e.g. the 2.4 MiB Hellfire
title background uses 4.6 MiB as an SDL surface.
Changes the background to render directly from PCX instead
to reduce the allocator pressure.
4 years ago
obligaron
d86c4e5d84
Introduce GetUIRectangle() to distinguish between UI and main panel
4 years ago
staphen
7b0ae932b0
Blit UI surface to game surface when waiting for game data
4 years ago
Anders Jenbo
1409e604f5
Reduce string conversions
4 years ago
staphen
74a77666b9
Improve behavior of ToControllerButtonEvent()
4 years ago
Anders Jenbo
4dd8b121ec
Replace TTF with PCX font
5 years ago
Anders Jenbo
958087ab86
Switch TTF render to UTF-8
5 years ago
Juliano Leal Goncalves
20d356a6eb
♻️ Leverage 'Point' in art_draw functions
5 years ago
Vladimir Olteanu
56946fc5d7
progress.cpp: use TTFWrap::RenderText_Solid
5 years ago
ephphatha
4ad53232a0
Convert the UiFlags enum to a scoped enum type
...
Replace operator&& with named function
5 years ago
Vladimir Olteanu
c57560674e
Use smart pointers for UI items
...
vector::push_back(new Foo(...)) leaks if resizing fails
5 years ago
Gleb Mazovetskiy
f9d20b44d6
🎉 Hardware cursor (SDL2-only)
...
Disabled by default because of these known issues:
1. When clicking on inventory item, it briefly appears a bit shifted (in the wrong coordinates).
This issue can happen with software cursor as well, but is a lot more
obvious with the hardware cursor.
2. Cursor is scaled with nearest-neighbour scaling, which may look a bit different from
how the rest of the graphics are scaled.
See also previous attempt: https://github.com/diasurgical/devilutionX/pull/955 by @viciious
Co-authored-by: Victor Luchits <vluchits@gmail.com>
5 years ago
Anders Jenbo
c66604c7ad
🐛 Do not render text as UTF8 for now
5 years ago
Anders Jenbo
dbfa9c27a5
✨ Enable translation for all menus
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
f004c78824
🧹 performance-unnecessary-value-param
5 years ago
Anders Jenbo
b978d80119
🎨 llvm-include-order
5 years ago
Anders Jenbo
bb4e1960e7
🎨 modernize-use-nullptr
5 years ago
Gleb Mazovetskiy
ff798a5e43
🧹 DiabloUI/progress.cpp: Move to anonymous namespace
...
Also removes the unused `char dialogText[256];`
5 years ago
Anders Jenbo
8c821e98d3
🚚 Restructure files
5 years ago
Anders Jenbo
997c1dba55
🚚 Split up all.h in to proper header relations
5 years ago
Anders Jenbo
67a7ff98c5
🚨 Clean up compiler warnings
5 years ago
Anders Jenbo
93d42b62b8
♻️ Change BOOL to bool
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
Anders Jenbo
6e3908aa58
🚨 Fix a few warnings from various builds
5 years ago
Anders Jenbo
32b663ad3d
🐛 Correct rendering and functionality of the progressbar
...
This fixes the following issues:
- Missing text shadows
- Missing button graphics
- White boarder
- Not responding to controller input
- Button not giving visual feedback
- Clicking anywhere cancles
5 years ago
Anders Jenbo
e280432b92
🚨 Fix all SDL1 warnings
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
c32f33f19f
Use safe ranges instead of decltype() for C++03 compatability
...
SDL2 uses int, but SDL1.2 uses Uint16 and Sint16.
6 years ago
Anders Jenbo
7a90b9102a
When needed, clear buffer before rendering menu
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
3ad7e21e71
Fix flashing menu transitions
...
Fixes #591
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
Anders Jenbo
08aa6a860a
Move generic helpers out of miniwin
6 years ago
Anders Jenbo
961e7f58c4
Implement UI errors
6 years ago
Anders Jenbo
e847108b78
Clean up event handeling
6 years ago
Anders Jenbo
f9d4073620
Detect when gamepads are added or removed
6 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
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
Gleb Mazovetskiy
5f21aba186
progress.cpp: fix SDL1 narrow conv warn
7 years ago
Anders Jenbo
18532e7c9b
Format SourceX and SourceS
...
Fixes #262
7 years ago
Gleb Mazovetskiy
cf0f867ca0
DrawArt via SDL
7 years ago