Commit graph

2284 commits

Author SHA1 Message Date
Carlo Bramini
ffb9e8b51e
context: migrate from wgl_ext to SDL_GL (#680)
Migrate to SDL_GL functions made available in SDL2. Remove wgl_ext.c and wgl_ext.h.

Add additional information to the log file to help debug issues like #582.
2023-01-15 11:14:07 -05:00
Carlo Bramini
7afb2b9db0
music: remove unused check in Music_Play (#684)
Also replace hard coded track numbers with MUSIC_TRACK_ID constants.
2023-01-15 11:11:10 -05:00
Carlo Bramini
7d5e22487c
s/shell: Add support for older FFmpeg for Windows XP support (#695) 2023-01-11 18:20:00 -05:00
walkawayy
59aafc0542
save_crystal: fix collision pushing Lara through walls (#691)
Resolves #682.
2023-01-07 16:37:08 -05:00
Carlo Bramini
a589a628ec s/audio: Get rid of lock/unlock after opening audio device
According to:

https://wiki.libsdl.org/SDL2/SDL_OpenAudioDevice

a device is always in paused state after SDL_OpenAudioDevice(), so in my opinion it is safe to initialize m_WorkingBuffer[] and then start the playback. This will avoid the need to use lock/unlock stuff.
2023-01-07 10:56:32 +01:00
Carlo Bramini
343a105516 music: add support for multiple file formats.
This patch adds support for more audio formats when playing audio tracks.
2023-01-06 12:59:59 +01:00
Carlo Bramini
9f0675f53a
misc: remove some unused symbols 2023-01-05 22:19:22 +01:00
Carlo Bramini
d2acd2bb8c
misc: add stddef.h to global/types.h (#683)
While compiling my UNIX port of Tomb1Main, I got some error messages like this one:

In file included from src/game/camera.c:7:
src/game/sound.h:19:5: error: unknown type name ‘size_t’
   19 |     size_t num_samples, const char **sample_pointers, size_t *sizes);
      |     ^~~~~~
src/game/sound.h:1:1: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to '#include <stddef.h>’?
  +++ |+#include <stddef.h>

I would like to suggest to add an #include <stddef.h> into global/types.h.
This fix required some adjustments to satisfy the linters.
2023-01-01 23:06:32 +01:00
Marcin Kurczewski
fcdf33adf0
docs: release 2.12 2022-12-23 09:11:09 +01:00
Carlo Bramini
43e096e68a
log: fix varargs for Log_Message()
On Linux, the engine crashes when printing the log messages. This
happens because the current code re-uses the same va_list variable on
two calls to vprintf() and vfprintf(). Actually, this is not allowed.
For using the same information on multiple formatting functions, it is
needed to create a copy of the primary va_list to a second one, by using
va_copy(). After rewriting properly the Log_Message() function, the
segmentation fault is gone. Tested on both Linux and Windows builds.
2022-12-23 09:08:33 +01:00
Carlo Bramini
9a9d54d79e
gameflow: fix a typing error on KEYMAP_BILINEAR 2022-12-22 14:15:03 +01:00
Carlo Bramini
ac31dae01b
misc: fix path names to UNIX
This patch fixes some paths using MSDOS directory separator '\\' to UNIX separator '/'.
Tested also on Windows and it worked fine.
2022-12-22 10:17:53 +01:00
walkawayy
e7b41455c6
option_control: add customizable controller support (#674)
* option_control: add customizable controller support

Resolves #659.
2022-12-21 12:26:27 -05:00
Carlo Bramini
55aecc07aa
game: fix support for 64-bit (#676)
When running Tomb1Main compiled as a 64-bit application, I got an error.
This happens because ANIM_STRUCT has a frame_ptr item which is a pointer
and so it varies its size if it's compiled for an addressing depth
larger than 32-bit. I fixed the issue by adding a frame_ofs item, used
for indexing g_AnimFrames[], and by filling all the items of ANIM_STRUCT
by reading them one by one, in the same manner it has been done into
function Level_LoadRooms().

I tested Tomb1Main with the demo levels (see issue #667) and under
Windows, compiled as i686 (32-bit) and x64 (64-bit) and the engine
worked fine on both.
2022-12-21 09:03:04 +01:00
Marcin Kurczewski
9c0dc27fa0 build: fix SDL building
Their new `main` branch now serves as a stepping stone for the upcoming
3.x release, and they switched away from autotools to CMake in
7b21eaddce4fb80f94e7ac54744edc9cdb733c36.
2022-12-16 10:35:24 +01:00
Marcin Kurczewski
309653864b build: remove unnecessary apt update 2022-12-16 10:35:24 +01:00
oziphantom
5159e9e18a
s/audio: miscellaneous fixes 2022-12-16 10:35:06 +01:00
Carlo Bramini
febce69199
gfx: fix a copy-paste error
MSVC complains the use of macro GFX_GL_CheckError(), saying that it
needs a parameter. By looking its declaration into src\gfx\gl\utils.h,
I have seen that it is declared with a "void" inside. Probably, in the
past GFX_GL_CheckError() was a function and the "void" was forgotten
when it had been converted into a macro. GCC doesn't suffer much, but CL
thinks instead that "void" is a required parameter. Hopefully, removing
that thing made all compilers happy.
2022-12-16 10:32:36 +01:00
Carlo Bramini
8a87850f5d
shell: fix a copy-paste error 2022-12-15 12:02:31 +01:00
walkawayy
bc2bd9cb86
input: stop the default controls from functioning when unbound (#662)
input: stop the default controls from functioning when unbound

Resolves #564.
2022-12-12 09:47:49 -05:00
lahm86
eb0f79dd29 config: French localization 2022-12-12 09:17:59 +01:00
walkawayy
a9e414fd77
game_demo: fix demo mode if do not heal on level finish is used (#661)
Resolves #660.
2022-12-09 13:05:58 -05:00
walkawayy
0c8c8e7cc2
Add reset and unbind options to the controls menu (#658)
* option_control: add reset and unbind options to the controls menu

Resolves #657.
2022-12-09 09:40:19 -05:00
walkawayy
27d497029e
save_crystal: fix to be single use and added collision (#655)
* save_crystal: fix to be single use, added collision, removed puzzle key sound

Resolves #654.
2022-12-06 17:56:44 -05:00
walkawayy
f098e4db8f
option: fix the compass, new game, and save menus at all text scalings (#650)
* option: fix the compass, new game, and save menus at all text scalings

Resolves #648.
2022-11-30 13:56:09 -05:00
walkawayy
1782da882c
shell: fix a game crash if the action button is held down (#651)
Resolves #646.
2022-11-21 16:04:56 -05:00
walkawayy
a3de4fd03b
Add additional control schemes, keybinds, and refactor (#642)
option_control: add control schemes, keybinds, and refactor

Resolves #636.
2022-11-10 18:32:45 -05:00
walkawayy
444987c530
room: fix Lara loading inside movable block if stacked near portal (#624)
Resolves #619.
2022-11-01 10:22:00 -04:00
oziphantom
871f5887dd
game/text: fix small cracks in PS1 mode
Resolves #643
2022-11-01 00:00:13 +01:00
lahm86
0729c760bd docs: add config tool details to readme 2022-10-19 22:29:50 +02:00
Marcin Kurczewski
cd9e75c11f
docs: release 2.11 2022-10-19 14:15:02 +02:00
Marcin Kurczewski
027dcba0ea
build: include config tool in the release 2022-10-19 13:10:52 +02:00
lahm86
11e28c2df8 config: improve config tool spec loading 2022-10-19 10:02:52 +02:00
lahm86
90984cf690 config: remove default config file 2022-10-19 10:02:52 +02:00
lahm86
4ba1c92388 config: remove default config file 2022-10-19 10:02:52 +02:00
lahm86
889065e4c8 config: remove default config file
config: default configuration file is no longer required; config will load defaults automatically.
2022-10-19 10:02:52 +02:00
lahm86
c746b8afa3 config: add a .NET config tool
Part of #633.
2022-10-19 10:02:52 +02:00
lahm86
2ae01d3ad5 config: merge settings into main config
config:
 - settings.c functionality moved to config.c;
 - some bool settings inverted in line with config tool;
 - default config file comments updated in line with config tool.

Part of #633.
2022-10-19 10:02:52 +02:00
walkawayy
4432f86bdb
sound: added an option to turn off sound effect pitching (#632)
* sound: added an option to turn off sound effect pitching

Resolves #625.
2022-09-30 21:51:14 -04:00
lahm86
183bc7b68a
gun: fix firing blanks indefinitely 2022-09-26 18:35:45 +02:00
lahm86
376a3b6c5c bridge: avoid moving bridges sitting on vertical portals
Resolves #627.
2022-09-24 12:07:48 +02:00
walkawayy
e6ada212b0
savegame: highlight latest save at game start (#622)
savegame: set passport requested to latest save on game start

Resolves #618.
2022-09-17 13:14:04 -04:00
walkawayy
9610f22d59
savegame: fix incorrect number of FX check during loading. (#621)
savegame: fix incorrect number of FX check during loading.

Resolves #620.
Warn for loading FX over the limit since they aren't spawned.
2022-09-17 13:12:48 -04:00
Marcin Kurczewski
9a8157fff6
Merge branch 'stable' into develop 2022-09-15 16:38:02 +02:00
Marcin Kurczewski
122597a1a2
docs: release 2.10.3 2022-09-15 16:36:41 +02:00
walkawayy
9852dce76c
option_passport: fix save crystal mode saving in the first slot (#613)
Resolves #607.
2022-09-15 16:36:25 +02:00
walkawayy
8a030d03c9
savegame: fix flame emitters in enhanced saves
Resolves #616
2022-09-03 22:06:40 +02:00
oziphantom
1af0e38b56
output: improve border scaling 2022-09-03 16:53:24 +02:00
lahm86
eeb3f4d1b2
gameflow: add remove_ammo and remove_medipacks options (#614) 2022-08-23 16:53:28 -04:00
walkawayy
529ef04652
option_passport: fix save crystal mode saving in the first slot (#613)
Resolves #607.
2022-08-23 12:25:53 -04:00