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
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
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
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
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
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
Xadhoom
f00e427ed2
Remove pch.h
7 years ago
Anders Jenbo
8e6276da58
Update documentation and build script
7 years ago
Xadhoom
e234125e06
Fix merge
7 years ago
Anders Jenbo
7ba8351bc3
Fully implement SFileDda*
...
fixes #24
fixes #22
7 years ago
Xadhoom
c1ba436e69
miniwin_misc.h macro-clean
7 years ago
Xadhoom
1fede67d48
Windows build now compiles (but still has major problems)
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
Max Desiatov
e748b7754f
Fix macOS compilation errors ( #28 )
...
* Fix macOS compilation errors
7 years ago
Anders Jenbo
16ba51c20c
Clean up after audio and video
7 years ago
Anders Jenbo
ad6d83d8b2
Implement music volumne
7 years ago
Anders Jenbo
9611057b08
Some simple fixes and clean ups to better support macOS
7 years ago
Anders Jenbo
22a3657ee4
Implement video playback in storm
...
Clean up after video should also be better now
7 years ago
Anders Jenbo
2b2e014ee9
Fix quests getting stuck because of audio never finishing
...
This make the game instead think that the audio finished instantly, but
rather that then getting stuck in the Lazurus quest.
7 years ago