Gleb Mazovetskiy
e2a1c90979
storm.cpp: simplify getIniPath
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
bd2c08183c
Fall back to relative path when unable to use SDL
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
18532e7c9b
Format SourceX and SourceS
...
Fixes #262
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
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
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
Gleb Mazovetskiy
5359149a38
SDL1: Audio and video support
...
1. Implements audio support for SDL1
2. Implements blit scaling and correct video rendering for SDL1
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
5cadee74c2
Fix a few compiler warnings
7 years ago
Anders Jenbo
6a73d98e25
Remove reamaning dummy methodes only used in sound.cpp and dx.cpp
7 years ago
Anders Jenbo
288f31a1f1
Clean up unused code
7 years ago
Anders Jenbo
1ebf8fe27d
Remove unused fallbacks
7 years ago
Anders Jenbo
6207832d6e
Update to latest upstream headers
7 years ago
Anders Jenbo
b919548f55
Avoid audio system conflicts during video playback
7 years ago
Anders Jenbo
6cd0a55089
Scale video in software when upscale is disabled.
...
Also fix some warnings when upscaling is disabled
7 years ago
Anders Jenbo
79711f4dcd
Avoid double copying on video playback
7 years ago
Anders Jenbo
246c396bca
Fix error message for failing to init video pallet
7 years ago
Anders Jenbo
0f8545d3c4
Clean up SDL error logging
7 years ago
Anders Jenbo
2df39ecac2
Always initialize results
7 years ago
Anders Jenbo
1e43fe9606
Fix game running in slow motion
7 years ago
Anders Jenbo
1066c49281
Implement SFileEnableDirectAccess
...
Fixes #46
7 years ago
Anders Jenbo
189a49b691
Correctly load the art pallets on Big Endian systems
7 years ago
Anders Jenbo
fead2da8af
Make UI image loading endian agnostic
7 years ago
Anders Jenbo
28dca419c5
Workaround for flickering mouse in caves
...
Fixes #7
7 years ago
Anders Jenbo
b791b1093c
Clean up DDraw implementation
7 years ago
Anders Jenbo
3f9691bf2c
Enable building with MSVC 2017 ( #75 )
7 years ago
Xadhoom
8e31aedc1b
Make storm.cpp portable
7 years ago
Xadhoom
3feccdc989
Fixes, fix some warnings
7 years ago
Anders Jenbo
951c1b9ca5
Correct pBuffer handeling in SBmpLoadImage
7 years ago
Anders Jenbo
bf28532dcc
Apply volume to dialogs
...
Fixes #40
7 years ago
Xadhoom
456aa70f16
More cleanup
7 years ago