Commit graph

47 commits

Author SHA1 Message Date
Dmitry Grigoryev fbd05a1592 optimize include files (include what you use) 2021-02-06 21:38:50 +01:00
Kp 81a2d92ee9 Move ResolutionX, ResolutionY to CCfg 2021-01-25 00:45:07 +00:00
Kp 4a8d7c7574 Default to 1024x768 for new users, not 640x480
640x480 is too small to render some dialogs correctly, and is much
smaller than even a small laptop screen.  Smaller resolutions are still
supported, if the user chooses to switch.
2021-01-25 00:45:07 +00:00
Kp b70f569178 Use enum class for OGL_TEXFILT_* constants 2021-01-17 22:23:23 +00:00
Kp c0601edde3 Move GammaLevel to CCfg 2020-12-27 22:03:09 +00:00
Kp 81119f0445 Use enum class for LevelMusicPlayOrder 2020-05-31 23:04:25 +00:00
Kp db7b4b3f88 Refer to <memory> directly, not through "compiler-make_unique.h" 2020-05-02 21:18:43 +00:00
ziplantil 2c5ab8e739 initial version of this, trying to catch MCI events 2019-10-27 02:47:45 +03:00
Kp 0c7de10512 Track chosen pilot name outside Players[]
Players need not be defined outside a game, but the pilot's name needs
to be available outside a game.  Therefore, track it outside Players[].
2019-07-07 22:00:02 +00:00
Kp a76487405c Make ADL MIDI runtime configurable
Add configuration file entries for number of chips, bank index, and
whether to use ADL MIDI.  Currently, there is no GUI for this.
Interested users must enable it via direct configuration file editing.
A menu interface will come later.
2018-10-18 02:18:56 +00:00
Kp f491059ed7 Enable building with SDL2
This commit enables Rebirth to build with SDL2, but the result is not
perfect.

- SDL2 removed some sticky key support.  Rebirth may behave differently
  now in this area.
- SDL2 removed some key-repeat related support.  Rebirth may behave
  differently now in this area.
- SDL2 gained the ability to make a window fullscreen by sizing it to
  the desktop instead of by changing the desktop resolution.  Rebirth
  uses this, and it mostly works.
  - Resizing while in the automap does not notify the automap code, so
    the view is wrong until the player switches out of automap mode and
    back in.
- SDL2 changed how to enumerate available resolutions.  Since
  fitting the window to the desktop is generally more useful than
  fitting the desktop to the window, I chose to drop support for
  enumerating resolutions instead of porting to the new API.  Users can
  now enter an arbitrary window dimension and Rebirth will make an
  attempt to use it.
  - It might be useful to cap the window dimension at the desktop
    dimension, but that is not done yet.
  - Entering fullscreen mode through the Controls->Graphics submenu
    failed to notify the relevant subsystems, causing the rendered
    content not to rescale.  For now, compile out the option to toggle
    full screen through that menu.  Toggling through Alt+Enter works
    properly.

Despite these quirks, this is a substantial improvement over the prior
commit, where SDL2 cannot be used at all.  The remaining issues can be
resolved in future work.

References: <https://github.com/dxx-rebirth/dxx-rebirth/issues/82>
2018-07-28 23:22:58 +00:00
Kp 0abb7278da Move FPSIndicator to CCfg 2016-10-02 19:35:33 +00:00
Kp 797554f80a Move Multisample to CCfg 2016-10-02 19:35:33 +00:00
zico b2cad09c26 Added new texture filtering options based on patch of user 'beware' 2016-08-29 20:53:10 +02:00
Kp a98510b17e Move CMLevelMusicTrack to CCfg 2016-08-06 19:55:25 +00:00
Kp 771665835d Move LastMission to CCfg 2016-08-06 19:55:25 +00:00
Kp ac8232caca Move CMMiscMusic to CCfg 2016-08-06 19:55:25 +00:00
Kp 50599c0dad Move CMLevelMusicPath to CCfg 2016-08-06 19:55:25 +00:00
Kp 1eb54bcf4f Fix clang build of CGameCfg
clang is confused by the use of a class named dcx.  Move the declaration
into a namespace{} block to avoid this.
2016-01-29 04:05:47 +00:00
Kp e0a88f4b7b Move TexFilt to CCfg 2015-12-18 04:08:23 +00:00
Kp 22901a6636 Move WindowMode to CCfg 2015-12-18 04:08:23 +00:00
Kp 26e948d5f1 Uninline namespace dsx 2015-12-13 18:00:49 +00:00
Kp 8109379fdd Use inline namespace dsx for similar/misc/ 2015-12-13 18:00:48 +00:00
Kp 927618e650 Remove useless PHYSFS_eof tests
Each test triggers a system seek call.  EOF will be signalled by
PHYSFSX_fgets returning nullptr.
2015-10-09 02:46:11 +00:00
Kp 71ffbdf719 Replace fill(0) with ={} 2015-09-29 02:41:22 +00:00
Kp bda7fef3a0 Use get_local_player to compute reference to local player 2015-07-25 23:10:46 +00:00
Kp 70c4cc87ab Use forward-declaration header for weapon.h 2015-07-25 23:10:45 +00:00
Kp d8f28a8767 Move Cfg::Grabinput to CCfg to improve code sharing 2015-07-18 21:01:56 +00:00
Kp bbcdf9f7d2 Fix LTO -Wodr for GameCfg 2015-07-18 03:49:47 +00:00
Kp 0ece005dfa Use screen_mode for screen resolution 2015-05-14 02:23:13 +00:00
Kp 65ff319ebb Use ntstring for LastMission 2015-03-22 18:49:20 +00:00
Kp f7815810e8 Use RAIIPHYSFS_File to manage PHYSFS_File
Fixes a few leaks on error paths.
2015-01-17 18:31:42 +00:00
Kp 68d705a85a Use bool conversion to test PHYSFS_File pointer 2015-01-17 18:31:42 +00:00
Kp 628156dbf7 Use array<ntstring> for CMMiscMusic 2014-12-22 04:35:48 +00:00
Kp c7ae54c62a Use ntstring for CMLevelMusicPath 2014-12-22 04:35:47 +00:00
Kp 681a6b3a9d Fix crash loading descent.cfg with bare equal
Remove obsolete check for trailing newlines in strings.  Fix failure to
null terminate strings.  Refuse overlong strings.  Refuse integers with
trailing garbage.  Refuse integers out of range.
2014-12-22 04:35:47 +00:00
Kp aef7dbad33 Move config.cpp strings to preprocessor constants
Some compilers only use string pooling for anonymous constants.  Make
these anonymous.
2014-12-20 04:36:11 +00:00
Kp e8f4b20d1d Use special type for PHYSFSX_fgets 2014-09-07 20:07:20 +00:00
Kp 94550355a8 Use make_unique instead of bare new 2014-08-24 18:28:09 +00:00
Kp 6629a928bc Fix end-of-record check in config LastPlayer 2014-08-19 02:47:26 +00:00
Kp 44d1924e96 Use special type for player callsign 2014-07-05 19:20:56 +00:00
Kp cb1ca2da72 Reduce reallocations reading configuration 2014-07-05 17:37:09 +00:00
zico ad7cb106bc Changed custom D1X license to GPLv3 2014-06-01 19:55:23 +02:00
Kp 094dfbf3d4 Reduce header inclusions 2013-12-31 03:22:03 +00:00
Kp 3bf16e57dc Remove PHYSFSX_gets, PHYSFSX_readString
They do not check for a buffer overflow.
2013-12-20 03:16:46 +00:00
Kp 3b9b5ebfb0 Use RAII to manage function-local heap objects 2013-12-08 19:04:52 +00:00
Kp b1dbeb6199 Move similar/main/config.c -> similar/main/config.cpp 2013-10-05 21:35:58 +00:00
Renamed from similar/main/config.c (Browse further)