Anders Jenbo
c3f283429b
Fix high CPU load when game is minimized
6 years ago
Anders Jenbo
e577f9bdc7
Remove more old save game format code
...
Multiplayer save games from before 1.08 where using the system name as
the password, so they would need to be converted on the original machine
by 1.08-1.09b before they can be transfered to another system.
6 years ago
Anders Jenbo
a261e8ad65
Better frame delay pressision
...
- Most refresh rates aliging poorly with integer ms
- Adaptive frame limit for low spec devices
6 years ago
Anders Jenbo
0127478673
Improve frame delay for non-v-synced rendering
...
Thanks to @glebm for pointing out the issue, hopfuly this is a better
solution :)
6 years ago
Anders Jenbo
dffc89e41c
Limit FPS when upscaling is disabled
6 years ago
Gleb Mazovetskiy
ddce870dda
Handle scaling for SDL1 ( #370 )
...
Only some handheld devices support auto-scaling.
On desktop and some handhelds we need to downscale manually.
Hardware auto-scaler check for jz4760 provided by @jbanes and @scooterpsu
6 years ago
Gleb Mazovetskiy
afaa25193a
Set surface size to be the logical size
7 years ago
Gleb Mazovetskiy
dd5bc39816
Get a fresh window surface before rendering to it ( #358 )
...
* Get a fresh window surface before rendering to it
It is possible that a window surface gets invalidated since we initially
obtained it. We need to call GetWindowSurface every time we want one,
instead of keeping a pointer to a possibly stale one.
See https://hg.libsdl.org/SDL/file/369b01006eb2/src/video/SDL_video.c#l2312
Fixes #351
7 years ago
Anders Jenbo
810b12a37d
Drop unused code
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
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
2fb84d5f60
Renderer texture: use RGB888 instead of RGBA8888
...
Massively improves renderer performance.
7 years ago
Anders Jenbo
ba9288c6cf
Unify error dialogs, for looks and portability
...
- Use UiOkDialog() to display all error messages
- Add SDL simple message, and console fallbacks to UiOkDialog()
- Boot graphics early on to facilitate most error messages with build in
gui
- Some more miniwin clean ups
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
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
1d03064fee
Clean up sound code
7 years ago
Anders Jenbo
88813c4042
Strip some now unused parts of miniwin and windows api
7 years ago
Gleb Mazovetskiy
85295838a4
An option to use SDL1 instead of SDL2
...
Adds a USE_SDL1 build option to use SDL v1 instead of v2.
This is useful for porting Diablo on devices that don't support SDL2,
such as the RetroFW / OpenDingux devices (e.g. RG300 Retro Gaming Handheld)
Not yet supported:
* Fullscreen
* Upscaling
* Audio
7 years ago
Anders Jenbo
6a73d98e25
Remove reamaning dummy methodes only used in sound.cpp and dx.cpp
7 years ago
Anders Jenbo
7479f3a4ff
Strip more dummy code
7 years ago
Anders Jenbo
288f31a1f1
Clean up unused code
7 years ago
Anders Jenbo
9925b2d7b8
Remove uninitialized parameteres
7 years ago
Anders Jenbo
1ebf8fe27d
Remove unused fallbacks
7 years ago
Alex Yatskov
f1da6e6a38
Fix invalid file and line constants ( #222 )
...
* Fix invalid file and line constants
* add macros
* remove ASSERT_FAIL macro
7 years ago
Anders Jenbo
a2211ea1a4
update dx.cpp
7 years ago
Anders Jenbo
b81ca8502d
Fix some memory leaks
7 years ago
Anders Jenbo
897c090338
Merge dx.cpp
7 years ago
Anders Jenbo
b791b1093c
Clean up DDraw implementation
7 years ago
Anders Jenbo
631305035a
Brute fix compile errors
7 years ago
Anders Jenbo
a77c75a097
Make graphics modes configurable ( #44 )
...
* Make graphics modes configurable
[devilutionx]
scale quality=2
fullscreen=1
grab input=1
* Update dx.cpp
7 years ago
Anders Jenbo
cc3abbe92c
Implement screen shots
7 years ago
Xadhoom
3feccdc989
Fixes, fix some warnings
7 years ago
Xadhoom
456aa70f16
More cleanup
7 years ago
Xadhoom
f00e427ed2
Remove pch.h
7 years ago
Xadhoom
545009f729
Fix merge
7 years ago
Anders Jenbo
0bd6375969
Implementing dsound wrapper
7 years ago
Xadhoom
c1ba436e69
miniwin_misc.h macro-clean
7 years ago
Xadhoom
30fbfa36a1
Progress with miniwin macros
7 years ago
Xadhoom
8b7f30b669
Continue refactoring macros from miniwin
7 years ago
Xadhoom
5283a9ffd1
Put everything into namespace dvl
7 years ago
Anders Jenbo
4223512c72
Implement most of sound.cpp ( #34 )
...
* Implement most of sound.cpp
This fixes
- Menu sounds being cut short
- Spartial sound in game
- Memory leaks
- Sound volume
* Some minor bugfixes
7 years ago
Anders Jenbo
9611057b08
Some simple fixes and clean ups to better support macOS
7 years ago
Anders Jenbo
c77c97de9a
Fix some minor LLVM compatability issues
7 years ago
Anders Jenbo
2a5a4859f3
Fix release builds
7 years ago
Xadhoom
4d557709e0
Clean headers for network code
7 years ago
Xadhoom
af47577446
Begin restructuring headers
7 years ago
Anders Jenbo
a050754339
Implement register and ini via Radon
7 years ago
Anders Jenbo
d86ceb14cb
Refactor ui code
7 years ago
Anders Jenbo
dd023c1072
Implement progressbar
7 years ago
Anders Jenbo
9e57e5de7e
Implement error handeling and propepr user data path
7 years ago