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
c380c7fa61
PCX: Add transparency support
4 years ago
Gleb Mazovetskiy
5df03f56e3
DiabloUI: Render scrollbar 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
staphen
56e8dbfec5
Apply CopyUtf8() to SelheroCatToName()
4 years ago
staphen
9c0ec048b4
Improve refresh behavior in selgame
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
staphen
2ebd80c8e8
Use ifdef when checking for _DEBUG
4 years ago
Gleb Mazovetskiy
c2917b1dc8
DiabloUi: Load animated PCX sprites as CEL
...
Reduces memory usage in menu (and thus the overall allocator pressure)
4 years ago
Gleb Mazovetskiy
7b98735878
Revert "An option to RLE-compress masked art"
...
This reverts commit c884f1a354 .
Superceded by `DEVILUTIONX_CONVERT_FONTS_TO_CEL`, which offers the same
RAM reduction but without slowdown.
4 years ago
Gleb Mazovetskiy
52e0511479
DiabloUI: Always blit to `PalSurface`
...
Previously we were blitting to the output surface directly.
Blitting to `PalSurface` allows us to support CEL/CL2 rendering in the
main menu.
4 years ago
Gleb Mazovetskiy
5eeaa76a75
Move PCX code to utils/pcx.cpp
4 years ago
staphen
90132b23cc
Fix viewport size of UiList in constructor
4 years ago
ephphatha
9ac6549da6
Address type conversion/truncation warnings in LoadPcxPixelsAndPalette
...
SDL_RWsize is documented as returning any negative value on error (even though in practice errors are always indicated by a value of -1) so allow for that instead of only checking for unknown size.
There were also a few unnecessary arithmetic operations being done to calculate the size to read, straightforward to simplify.
SDL_CreateRGBSurfaceWithFormat expects width and height to be positive values < 2^16. Could get away with using unsigned if the SDL API did but it doesn't so stick with signed types even when it doesn't really fit the use.
bufferPitch is an oddity, ultimately it's only used to determine a pointer offset so making the param ptrdiff_t as it's more appropriate than size_t.
4 years ago
staphen
b1fde684fc
Fix viewport size of UiList on hero selection
4 years ago
staphen
0193ac06fc
Fix player level validation when joining ZT public games
4 years ago
Gleb Mazovetskiy
ade8aba822
Fix some more warnings
4 years ago
Gleb Mazovetskiy
21c64fd0af
Hardware cursor: Simplify initialization
...
Set the palette at load time.
Since we only support hardware cursors in SDL2, we can take advantage of
its reference-counted palettes.
4 years ago
Anders Jenbo
42e499f64c
Use New Athena Unicode to generate proper Greek symbols
4 years ago
Bubio
9574fb30fe
FIX: Selecting Quit Game opens into the Support menu #4334
4 years ago
Anders Jenbo
73194b58a9
Correct spacing for font 22-*
...
Fixes #3523
4 years ago
Gleb Mazovetskiy
79c7eee10a
Mouse/Gamepad fixes
...
Introduces a `ControlDevice` global which is distinct from `ControlMode`
in that it is set to `Gamepad` even when simulating a mouse.
This allows us to avoid a number of edge cases related to mode changes.
Fixes #4242
4 years ago
Anders Jenbo
0fb430ebd5
Update translations
4 years ago
Anders Jenbo
1d04ac574a
Make game screen ZeroTier aware
4 years ago
Gleb Mazovetskiy
543f988cc3
Fix hardware cursor initialization
...
Hardware cursor should get initialized even for non mouse control types
(e.g. `ControlTypes::None`), because by the time the control type gets
initialized or changes the cursor is already set up and won't change.
Fixes #4233
4 years ago
Gleb Mazovetskiy
c884f1a354
An option to RLE-compress masked art
...
Saves about 200 KiB RAM in dungeon at a large performance cost.
Almost never a good idea, except for severely RAM-constrained devices (e.g. RG99).
4 years ago
Anders Jenbo
3060a6ee4b
Remove unessesery .c_str() from UiEdit
4 years ago
ephphatha
5d3f161e7b
Use string_view for UiEdit hint
...
Now that platforms with C APIs have been updated to take string_views in the C++ wrappers
4 years ago
ephphatha
f9ce2108f6
Use string_view for switch keyboard input
4 years ago
Anders Jenbo
1409e604f5
Reduce string conversions
4 years ago
ephphatha
88d9d0ffab
Use string_view for UiArtTextButton, UiButton
4 years ago
ephphatha
a2f85ab894
Use a viewport size of 1 when displaying a list of actions for the ok dialog
...
Having a size 0 viewport made the action invisible, forcing the player to use the Esc action.
4 years ago
Anders Jenbo
422f2bae9d
Fix build warnings
4 years ago
obligaron
1f7b0607a6
public game browsing: show difficulty, speed, players and possible incompatibility
4 years ago
obligaron
2d6c602ef5
Show public games only on zero tier
4 years ago
staphen
3546b41be0
Introduce NOEXIT build option to disable Quit Game options in menus
4 years ago
staphen
df830f6495
Save settings before leaving the settings menu
4 years ago
staphen
e0a3c553b4
Add window focus logic for SDL1
4 years ago
staphen
470c8c47f4
Force unpause when window focus gained in UI menus
4 years ago
obligaron
b3a9760bda
Keymapper: Add mouse support
4 years ago
staphen
aeddbb7f98
Reset game info after failing to join game
4 years ago
obligaron
150a4edfdb
Settingsmenu: Use two lines if text doesn't fix in one line
4 years ago
obligaron
1fc40aa211
DiabloUI: Fix Handling of UiFlags::NeedsNextElement
4 years ago
obligaron
5861340925
ZeroTier Submenu: Show "Loading..." info for public games and display if none are found
4 years ago
obligaron
0888546d62
Make DvlNet_SendInfoRequest non blocking
4 years ago
Anders Jenbo
b0252b3339
Make Gamepad cursor independant of hardware mouse
...
The gamepad cursor (inventory, spells etc) no longer relies on warping a
real mouse cursor. This should make things work better on platforms that
do not support this, like Wayland.
4 years ago
Anders Jenbo
6b2481a76c
Touch support on all SDL2 platforms
4 years ago
ephphatha
1abc617e1a
Consistently trigger menu/movie transitions on mouse up instead of down
...
Keypresses still occur on keydown to allow for repetition (e.g. when scrolling)
4 years ago
Bubio
d1315e934a
Fixed issue #3788
4 years ago