Commit Graph
90 Commits
Author SHA1 Message Date
pionere 97d53ced7e get rid of a few warnings (strncpy) 2021-02-19 22:04:11 +01:00
pionere 1f340212e1 do not call SFileOpenFileEx if the given handle is NULL
+ add defines for dwSearchScope
2021-02-19 22:04:11 +01:00
Anders Jenbo 0c8664b016 Implement Cornerstone of the World functionality 2021-01-25 04:02:12 +01:00
Anders Jenbo 88a715cdcc Clean up narator sound logic
Also this provides a helper function for calculating the length of a
sound
2021-01-24 07:08:11 +01:00
Anders Jenbo 374e8177ef Remove wave.cpp 2021-01-23 21:24:25 +01:00
Anders Jenbo 47004ddd35 Add widescreen menus 2021-01-18 20:56:08 +01:00
Anders Jenbo 9b1568cc08 Startup issues with shareware version 2021-01-17 16:04:13 +01:00
Anders Jenbo c802cbdc4d Merge more Hellfire code paths 2021-01-05 23:14:35 +01:00
Anders Jenbo a2a3729491 Enable loading hellfire games form main menu 2021-01-02 07:40:05 +01:00
Anders Jenbo d20eddf48e Unifcy a chunk of Hellfire's code pathts 2020-12-28 01:11:25 +01:00
qndel 9c7d6c96ea specify path to diablo.ini (#928) 2020-11-24 02:17:33 +01:00
qndel a61f969d26 fix typos (#914) 2020-11-12 13:09:13 +01:00
Gleb Mazovetskiy a091a56e8e Remove MAX_PATH restriction (#898)
Do not limit filesystem paths to 259 chars for MPQs, save files, and diablo.ini.

The MAX_PATH constant remains but now only limits path lengths within the MPQs.
2020-10-26 13:39:27 +01:00
Anders Jenbo 72e2637061 Merge branch 'master' of github.com:diasurgical/devilution 2020-10-25 17:38:06 +01:00
Anders Jenbo 2d6c1efeab Merge branch 'master' of github.com:diasurgical/devilution 2020-10-12 10:46:28 +02:00
Anders Jenbo 8fcdf69a56 [SDL1.2] Check if an appropriate video mode exists for the given movie
This lets us fall back to software scaling for devices that do not
support a video mode that matches the given video.
2020-10-03 20:02:53 +02:00
Anders Jenbo c53ca1a62a Adjust resolution to monitor default on startup 2020-09-28 07:03:22 +02:00
Marcin Konicki e4cbde0236 Prevent double free of sound chunk in storm (#744) 2020-05-28 01:17:00 +02:00
Marcin Konicki 515ac145c5 Implement --save-dir CLI option
* Lazy load ini, this also fixes launching the game on Android
2020-05-21 16:54:18 +02:00
Anders Jenbo c32f33f19f Use safe ranges instead of decltype() for C++03 compatability
SDL2 uses int, but SDL1.2 uses Uint16 and Sint16.
2020-05-20 01:21:36 +02:00
Anders Jenbo dc8be6c0ab C++03 compatibility (#736)
* Use C++03 compatible constructors
* Remove conflicting definitions
2020-05-17 01:37:19 +02:00
Anders Jenbo 43586c4b0d Correct inclusion of Radon.hpp 2020-05-14 11:44:15 +02:00
Anders Jenbo 0da3461d35 Use explicit types instead of auto 2020-05-14 11:44:15 +02:00
Anders Jenbo 69ad34f58f Consistently use NULL instead of nullptr
While nullptr does have extra checking, most of the code uses NULL and
nullptr makes it harder to port the code to some targets like the
original XBox
2020-05-14 11:44:15 +02:00
BDC 74938fdacd Fix memory leak with audio stream not been released
SFileChunk was not been release.
2020-04-17 09:36:55 +02:00
Anders Jenbo 3c5982083f Merge branch 'master' of github.com:diasurgical/devilution 2020-04-06 12:05:13 +02:00
Anders Jenbo 6d9089ec87 Fix compiler warning 2020-03-09 00:31:17 +01:00
Anders Jenbo bd6eebedb1 Drop storm_dx.cpp 2020-02-15 00:39:51 +01:00
Anders Jenbo 25993b4043 Merge branch 'master' of github.com:diasurgical/devilution 2020-02-14 23:03:31 +01:00
Gleb Mazovetskiy 658b44f613 SVid: Only switch video mode if full-screen
borderless counts as full-screen here (this is what RetroFW reports when
fullscreen=0)
2020-02-09 02:03:37 +00:00
Gleb Mazovetskiy ea32475ce9 SDL1: Avoid software-scaling SVid when possible
Set the video mode close to the SVid resolution while preserving aspect ratio.
Restore the video mode once the video has finished playing.

Also avoids allocating a tmp surface unless scaling.
2020-02-09 01:55:11 +00:00
Anders Jenbo 08aa6a860a Move generic helpers out of miniwin 2020-02-01 13:56:08 +01:00
Anders Jenbo cc4d6b57d8 Remove unused miniwin IO 2020-01-31 22:30:13 +01:00
Anders Jenbo 913de17a56 Use SDL_Color nativly instead of converting betwen it and PALETTEENTRY 2020-01-31 01:20:10 +01:00
Anders Jenbo c3f283429b Fix high CPU load when game is minimized 2019-12-31 04:15:38 +01:00
Anders Jenbo e5d4e99a69 Fix end movie not looping 2019-12-31 03:05:10 +01:00
Anders Jenbo 50661842b0 Implement SFileSetBasePath 2019-12-30 23:20:22 +01:00
Anders Jenbo 40d272241b Implement --data-dir for setting mpq path
This also implements a much cleaner version of diablo_parse_flags
Fixes #219
2019-12-27 02:05:16 +01:00
Anders Jenbo adad63cc72 Revert "Lazy load ini"
This reverts commit e316bce4d0.
2019-11-28 02:54:48 +01:00
Anders Jenbo e316bce4d0 Lazy load ini
This will hopfully solve the crash issues on Android
2019-11-23 20:42:10 +01:00
Anders Jenbo a4d612d509 Clear video buffer
This avoids garbage appearing in the video boarder when not using a render
2019-11-17 16:12:15 +01:00
Anders Jenbo 4532f009ff Remove old anti-cheat code from save function
Tthis code simply logs the save time of a multiplayer game in the
register database, this was likly done as part of an anti cheat scheme
(the key was "Video Player"), but appears to have since been disabled.
Probably to allow moving save games between PC's which was supported
when better Windows 2000 support was added.
2019-11-09 20:00:53 +01:00
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
2019-11-07 00:54:55 +01:00
Gleb Mazovetskiy f0eab35672 SDL 2.0.3 SVid: Use non-device Audio API
Fixes audio in movies on RG350!

From SDL docs: The legacy calls are good both for backwards compatibility and when you don't care about multiple, specific, or capture devices.
2019-10-19 06:01:01 +02:00
Gleb Mazovetskiy f13d2d193a SDL 2.0.3 SVid: Zero audio buffer before MixAudio 2019-10-19 06:01:01 +02:00
Gleb Mazovetskiy df8d7a1f46 Compatibility with SDL v2.0.3
RG350 and GCW0 devices have an ancient version of SDL2.
2019-10-15 01:56:09 +02:00
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
2019-10-13 13:50:16 +02:00
Anders Jenbo 810b12a37d Drop unused code 2019-10-13 00:08:24 +02:00
Anders Jenbo a8e4db538f Display SDL error messages in UI dialog
This will also end the application in most cases
2019-10-12 23:02:04 +02:00
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.
2019-10-12 20:54:10 +02:00