Chance4us
efd3625e65
experimental xbrz filtering ( #714 )
6 years ago
Gleb Mazovetskiy
1f129de0c3
DiabloUI: Scale surfaces at load/creation time
6 years ago
Gleb Mazovetskiy
bbe22b3be7
Fix credits when using software scaling
6 years ago
Anders Jenbo
3ad7e21e71
Fix flashing menu transitions
...
Fixes #591
6 years ago
Gleb Mazovetskiy
041d540c6f
Fix credit lines pop-in
...
+1 should +2 (+1 for rounding-up and +1 for an extra line)
Fixes #585
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
f9d4073620
Detect when gamepads are added or removed
6 years ago
Gleb Mazovetskiy
a2e821d241
Game controller support
...
Initial game controller support.
Actions are based on the Switch branch but the controller code itself is
implemented differently, allowing for easy remapping and minimizing
changes to the Source/ directory.
Many subtle and not so subtle controller bugs have been fixed
in this implementation, including:
1. Smoother & more responsive movement with the joysticks.
2. Consistent controls for all the menus in the game (stores, quest log,
etc).
3. Cursor appearance / disappearance at appropriate times.
Low-level controls are abstracted and 3 SDL interfaces are supported:
game controller, joystick, and keyboard. See SourceX/controls/ for more
details on this.
Wishlist for the future:
1. Primary button and use button should attack continously.
This is hard as it requires checking the cooldowns / attack speed.
2. Quick spell menu navigation is very buggy. It is also buggy in the
switch branch. I haven't had a change to investigate.
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
426c246535
Simplify SDL1/2 palette handling
...
SDL 1 and 2 handle surface palettes very differently.
This adds a few compatibility functions that do the right thing
depending on the SDL version.
7 years ago
Gleb Mazovetskiy
356e276b0a
credits.cpp: Hard-code a safe mask color
...
palette->colors[50] was the same as palette->colors[224] for a few frames.
7 years ago
Gleb Mazovetskiy
e7d7cbe098
DiabloUI/credits: Use SDL_SetPaletteColors in SDL2
...
Internally, this increments the palette version, which we previously
didn't do.
7 years ago
Gleb Mazovetskiy
b80963f057
DiabloUI/credits: Remove BlitToViewport helper
7 years ago
Gleb Mazovetskiy
d76e577ee4
DiabloUI/credits: Render TTF only once
...
Re-use the same TTF surface for text and shadow.
This is significantly faster.
7 years ago
Gleb Mazovetskiy
89ff46a371
Remove SDL_Delay(1)
7 years ago
Gleb Mazovetskiy
f0a90f4717
DiabloUI: Credits improvements
...
1. Fix lines moving up and down on slower devices.
2. Cache rendered text surfaces (in a ring buffer).
3. SDL_Delay(1) between event polls to reduce CPU usage.
4. Move data to a separate compilation unit.
Refs #231
7 years ago
Gleb Mazovetskiy
17b5011916
DiabloUI: Move art and text code out of diablo.cpp
7 years ago
Gleb Mazovetskiy
7f61128d32
Fix more compilation warnings
...
```
SourceX/storm/storm.cpp:27:10: note: ‘snprintf’ output between 11 and 270 bytes into a destination of size 260
snprintf(file_path, DVL_MAX_PATH, "%sdiablo.ini", path);
```
SDL1 warnings:
```
devilutionX/SourceX/dx.cpp:199:24: warning: narrowing conversion of ‘(int)dwX’ from ‘int’ to ‘Sint16’ {aka ‘short int’} inside { } [-Wnarrowing]
SDL_Rect dst_rect = { (int)dwX, (int)dwY, w, h };
SourceS/sdl2_to_1_2_backports.h:616:18: warning: comparison is always false due to limited range of data type [-Wtype-limits]
if (final_dst.w < 0)
SourceS/sdl2_to_1_2_backports.h:777:24: warning: comparison of integer expressions of different signedness: ‘const int’ and ‘long unsigned int’ [-Wsign-compare]
if ((rc > 0) && (rc < sizeof(path))) {
~~~^~~~~~~~~~~~~~
SourceX/storm/storm.cpp:479:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
if (out_len <= item->len) {
SourceX/storm/storm.cpp:716:60: warning: narrowing conversion of ‘((640 - scaledW) / 2)’ from ‘int’ to ‘Sint16’ {aka ‘short int’} inside { } [-Wnarrowing]
SDL_Rect pal_surface_offset = { (SCREEN_WIDTH - scaledW) / 2, (SCREEN_HEIGHT - scaledH) / 2, scaledW, scaledH };
DiabloUI/credits.cpp:525:30: warning: narrowing conversion of ‘- y’ from ‘int’ to ‘Sint16’ {aka ‘short int’} inside { } [-Wnarrowing]
SDL_Rect src_rect = { 0, -y, text_surface->w, 251 };
```
7 years ago
Anders Jenbo
18532e7c9b
Format SourceX and SourceS
...
Fixes #262
7 years ago
Gleb Mazovetskiy
cf0f867ca0
DrawArt via SDL
7 years ago
Anders Jenbo
5cadee74c2
Fix a few compiler warnings
7 years ago
Bao Chi Tran Nguyen
c6d5dc48ff
Implemented text shadow at the credits.
7 years ago
Manuel K
32b0e99e90
Use SCREEN_Y (dX part)
7 years ago
Anders Jenbo
0f8545d3c4
Clean up SDL error logging
7 years ago
Anders Jenbo
b791b1093c
Clean up DDraw implementation
7 years ago
Anders Jenbo
aa017838e0
Fix some warning in the UI
7 years ago
Xadhoom
f00e427ed2
Remove pch.h
7 years ago
Xadhoom
c1ba436e69
miniwin_misc.h macro-clean
7 years ago
Xadhoom
30fbfa36a1
Progress with miniwin macros
7 years ago
Xadhoom
5283a9ffd1
Put everything into namespace dvl
7 years ago
Xadhoom
4d557709e0
Clean headers for network code
7 years ago
Xadhoom
af47577446
Begin restructuring headers
7 years ago
Anders Jenbo
89c2b533cb
Implement ui layout framework
7 years ago
Anders Jenbo
a58e3af89a
Refactor menu navigation
...
This also implements fully accurate list navigation
7 years ago
Anders Jenbo
d86ceb14cb
Refactor ui code
7 years ago
Anders Jenbo
dd023c1072
Implement progressbar
7 years ago
Anders Jenbo
199fd17e2e
Remove mouse from credit page
7 years ago
Anders Jenbo
755612fc13
Fix unresponsive menu and match transitions to the original
7 years ago
Anders Jenbo
c75d50a82c
Split up menu code
7 years ago
Anders Jenbo
cead5831fd
Implement remaning keys
7 years ago
Anders Jenbo
bd1949a8e6
Remove redundant code
7 years ago
Anders Jenbo
6ffdbe66ed
Fix DrawMouse on scaled view and enabled resizing
7 years ago
Anders Jenbo
12d35a3dea
Enable v-sync
7 years ago
Anders Jenbo
e45df94905
Only init once
...
This fixes music playing to early
7 years ago
Anders Jenbo
7f9b67c210
Remove redundant code
7 years ago
Anders Jenbo
c643d65177
Font is nearly perfect now
7 years ago
Anders Jenbo
ed24d7bbf5
Adjust font hinting
7 years ago
Anders Jenbo
5fed0b1316
Match the credit menu look
...
This also adds transitions to menus
7 years ago
Anders Jenbo
490b5d8ab4
Simplify FPS calculation
7 years ago