22 Commits

Author SHA1 Message Date
Charles Dang
dba77791cc Removed loading screen animation preference
This was added several years ago as a workaround to crashes when the loading screen implementation was less stable.
2020-10-07 17:53:35 +11:00
Steve Cotton
ef888206da Clean-up leftovers of the SCALING_ALGORITHM preference
The preference was removed in 15bf3bb25691c6ce71ac2a45bb4e5c06ea9239e6.
2020-09-25 23:56:59 +02:00
gfgtdf
93aa2ca409 deploy new game_config_view object
the game_config_view object offers const
access to the game_config object, furthermore
it allows the game_config config object to be
replaced by a vector of config objects which
is what we will do later.
2020-06-29 15:16:05 +02:00
Charles Dang
e643d2dce7 Removed joystick code
This was never fully implemented and has been essentially abandoned. If we want to
add this again, we should look to adding full game controller support (Steam controller,
for example), though I don't know how suited this game is for controller support. As for
as I can tell, the only working part was ever map scrolling.

Includes a sqrt -> std::sqrt conversion I forgot in this file awhile back.
2019-10-19 18:21:14 +11:00
Wedge009
cbf3d4f866 Use zoom_index_ as the basis of zoom operations instead of zoom_. 2019-10-16 15:27:49 +11:00
Wedge009
9bb7670b6e Remember tile_size/zoom factor between play sessions.
Resolves #1518.
2019-10-16 15:27:49 +11:00
Jyrki Vesterinen
cca79afe4b Add an option to disable FPS limiter
Cherry-pick of commit d7921f31b061ed997099f600f3e6771dee960ea6.
2018-10-22 19:34:51 +03:00
Martin Hrubý (hrubymar10)
674fda85b7 Migrate links to https if available - Fwd c18537edc0678f40a209797d72dfaba3e5e88545
(cherry-picked from commit bc4d22dc72e79c3d6a3364ac896e473afd298246)
2018-10-07 03:23:36 +00:00
Charles Dang
19e3afb463 Convert C-style casts to static_cast
(cherry-picked from commit 0dc5656c328cdd02eebb4dbd10dbab3eb4553b57)
2018-10-07 03:21:02 +00:00
Charles Dang
d9fb6c0bf5 Catch all exceptions (where possible) as const references
A few catch blocks modify something in their exceptions, so those are kept non-const.

(cherry-picked from commit 2bf4d68c87b69256266b7745a9e3453693794e35)
2018-10-07 03:20:58 +00:00
Charles Dang
45f871067f Use std::size_t everywhere instead of plain size_t
Excludes:
* spirit_po/
* xBRZ/

(cherry-picked from commit fc2a58f6935176b70a035d3e1c03080f79687f94)
2018-10-07 03:17:59 +00:00
Charles Dang
5c9380e58a Default to fullscreen on, tweak default window res
It makes more sense as a game to start with fullscreen enabled. As for the default res,
it's unlikely to be used (only crops up if the saved resolution value is invalid), but
it makes sense to use a more modern widescreen resolution.
2018-02-16 21:11:44 +11:00
Charles Dang
f773996a93 Minor cleanups to some resolution/window size code
* Cleaned up preferences::resolution() implementation.
* Don't call the above twice on SDL window init.
* Made a variable name clearer.
2018-02-16 21:05:47 +11:00
Charles Dang
1855266104 Fixed standing animation toggle not taking immediate effect (fixes #1653) 2018-02-14 10:46:51 +11:00
Matthias Krüger
a2168d2e24 codespell fixes to /src 2018-02-08 21:54:09 +11:00
Gregory A Lundberg
b5f76eff79
Bump copyright to 2018 2018-01-19 00:02:20 -06:00
Jyrki Vesterinen
b710af1716 Fix #2285: GCC-dev compiler warnings 2017-12-09 18:30:49 +02:00
Charles Dang
a21697fef3 Cleaned up various areas of code related to setting window resolution
* Added a point ctor that takes an SDL_Point.
* Added a toggle_fullscreen function to CVideo.
* Change all management of resolution data to use point instead of std::pair<int, int>. This
  shortens the code considerably.
* Cleaned up preferences_dialog::set_resolution_list
* Made CVideo::set_resolution return a bool indicating whether resolution was changed.
* Swapped which of the two set_resolution overloads contains the main implementation.
* Moved the events::raise_resize_event() call when setting resolution to the CVideo function
  where it should have always been (instead of the prefs dialog callback). This is a pretty
  essential component and having it localized in one place meant any other area of the code
  that might have called set_resolution wouldn't have it.
2017-11-27 05:53:23 +11:00
Jyrki Vesterinen
dc5e8b36ea Restore --max-fps
@gfgtdf explained in IRC that it's often used to slow Wesnoth down (instead
of speeding it up, as I had assumed).

This should also allow unit tests to compile again.
2017-07-22 23:35:53 +03:00
Jyrki Vesterinen
4e4d7b5277 Rewrite the FPS cap implementation
The FPS cap, originally implemented in 2007, is very poorly done. It
doesn't take frame time variance into account, and is therefore almost
guaranteed to cause missed frames all the time. It doesn't increase timer
granularity on Windows, which causes SDL_Delay() to often take much longer
than intended. And it's hardcoded for 50 FPS, which fits poorly with 60 Hz
displays.

This new implementation fixes all those issues.

My experience is that the game feels much, much smoother with the new
implementation, perfectly competitive with 1.12. In my opinion, performance
is now at an acceptable level for a stable release.
2017-07-22 15:48:46 +03:00
Celtic Minstrel
9365538b3b Don't store the user's password in plaintext in the prefs file
The game now supports @ or = in usernames for the purpose of saving them to a file.

Though I don't think these are allowed currently, it's probably better to
support it from the start rather than having things break if they later
become allowed.
2017-05-12 15:56:41 -04:00
Charles Dang
e4f03fe459 Moved all preferences source files into a single folder 2017-05-04 11:04:19 +11:00