Gleb Mazovetskiy
6b9a9faebc
Fix hero dialog image
...
Regression introduced in b536d0efa2
Fixes #318
7 years ago
Anders Jenbo
97e09e3e25
Fix music in shareware
7 years ago
Gleb Mazovetskiy
ea4358fdc7
Avoid console warnings on dialog init w/o diabdat
7 years ago
Gleb Mazovetskiy
b536d0efa2
DiabloUI: Handle logo like all the other elements
...
Adds the `animated` flag to `UiImage`, allowing us to
remove special handling for the logo.
7 years ago
Pyr0Byt3
e7e1ba96dc
fix hero order
7 years ago
Gleb Mazovetskiy
4ea3a4e941
Make Source/ dialogs call DiabloUI/dialogs.cpp
...
The diabdat.mpq absence error is handled by stubbing the art with solid
colors.
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
fd0a23aac3
Improve RenderUTF8_Solid_Wrapped comment
7 years ago
Gleb Mazovetskiy
d7bec68fb2
Reduce TTF line spacing to roughly match Diablo
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
0710d1c425
DiabloUI: Rename UiButton to UiArtTextButton
7 years ago
Gleb Mazovetskiy
17b5011916
DiabloUI: Move art and text code out of diablo.cpp
7 years ago
Anders Jenbo
d2c4b461d4
Add option to compile shareware version
7 years ago
Gleb Mazovetskiy
e4ef58f73d
DiabloUI: Add a scroll bar to hero selection
...
Has the same weird behaviour as the actual Diablo scrollbar but without
the subtle mouse interaction bugs.
7 years ago
Gleb Mazovetskiy
78c9453e94
Make the Yes/No dialog list wrap
...
It wraps in Diablo
7 years ago
Gleb Mazovetskiy
8d18a9938b
DiabloUI selgame.cpp: Reduce duplication
7 years ago
Gleb Mazovetskiy
8e26a26b9c
DiabloUI: Fix label position in SELUDPGAME_DIALOG
7 years ago
Marlon Beijer
3a267aa7f7
Add option to disable network support for builds
7 years ago
Gleb Mazovetskiy
7573446763
Make hero selection list scrollable
...
No scrollbar yet, keyboard scrolling only
7 years ago
Gleb Mazovetskiy
2ba268e608
DiabloUI: Better char* handling
...
1. UI structs now use `const char*` because that's the type of C-string
literals.
2. Use `strcpy` instead of `sprintf` where possible.
7 years ago
Mathieu Maret
3ec16ee3c5
Correct memory leak
...
Correct memory leak after creating a network party
7 years ago
Gleb Mazovetskiy
37936c6d15
DiabloUI: Refactor UI_Item to tagged unions
...
Makes the code easier to understand.
Also makes building lists easier.
Also fixes focus indicator in SELLOAD_DIALOG (this type of bug is
impossible with the new structs).
7 years ago
Gleb Mazovetskiy
5f21aba186
progress.cpp: fix SDL1 narrow conv warn
7 years ago
Gleb Mazovetskiy
e2a1c90979
storm.cpp: simplify getIniPath
7 years ago
Gleb Mazovetskiy
dc937c8b96
diabloui.cpp: Fix value not handled warning
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
Gleb Mazovetskiy
e3cf8af94d
dvlnet: More C++11 compatibility
...
Fixes the following warnings:
SourceX/dvlnet/tcp_client.cpp:104:38: warning: lambda capture initializers only available with -std=c++14 or -std=gnu++14
SourceX/dvlnet/tcp_server.cpp:142:15: warning: lambda capture initializers only available with -std=c++14 or -std=gnu++14
7 years ago
Anders Jenbo
bd2c08183c
Fall back to relative path when unable to use SDL
7 years ago
Mathieu Maret
0ac4c1e419
tcp_client: close connections when leaving
...
So you can join another game latter
fix #251
7 years ago
Gleb Mazovetskiy
4f6c5791a7
Fix some compiler warnings
7 years ago
Anders Jenbo
890f414cb9
Small clean up of unused code
7 years ago
Mathieu Maret
a7d0e5e858
Fill GAMEINFO for name and password
...
Those information could be accessed by pressing tab key in multiplayer
Fix #260
7 years ago
Anders Jenbo
e88e574c5f
Drop unimplemented code
7 years ago
Anders Jenbo
06bcd3c3f9
Handle file paths in a clean way
...
Belated birthday present for @mewmew
Functions for gettings paths have sensible names
It's using snprintf for safe? string concat
Paths don't use \ as path reporator, or magic marker
Drop code for copying pre 1.09 save games from the windows folder
7 years ago
Anders Jenbo
606d5536f2
Set version and project name via CMake
7 years ago
Anders Jenbo
18532e7c9b
Format SourceX and SourceS
...
Fixes #262
7 years ago
Gleb Mazovetskiy
94f62177f1
Make SourceX/dvlnet C++11 compatible
...
std::make_unique is only available in C++17 and above
7 years ago
Anders Jenbo
3b2ba952b2
Fix video audio on Big Endian
7 years ago
Anders Jenbo
4ef30b9612
Fix menu on Big Endian systems
7 years ago
Gleb Mazovetskiy
2bfcbbfb2f
Fix memory leak in sound.cpp
...
Also link ASAN for devilutionx
7 years ago
Anders Jenbo
1d03064fee
Clean up sound code
7 years ago
Anders Jenbo
8ee689b803
Remove miniwin abstraction for disabeling the screensaver
7 years ago
Gleb Mazovetskiy
2cc0c2cfbb
Clang: Remove -fms-extensions -fms-compatibility
7 years ago
Anders Jenbo
88813c4042
Strip some now unused parts of miniwin and windows api
7 years ago
Gleb Mazovetskiy
46a11a8e92
LoadMaskArtFont: Do not pass SDL_RLEACCEL
...
Using SDL_RLEACCEL turned out to be much slower
7 years ago
Gleb Mazovetskiy
4b42117022
Set Art palette only if it changed
...
Improves performance a lot, but still slower than the previous version
7 years ago
Gleb Mazovetskiy
cf0f867ca0
DrawArt via SDL
7 years ago