70596 Commits

Author SHA1 Message Date
Charles Dang
983c5de05a Main: range-for 2017-12-07 12:26:30 +11:00
Charles Dang
1a03d3ac63 Main: formatting cleanup 2017-12-06 21:15:23 +11:00
Jyrki Vesterinen
aa94db4d0f Fix: with many add-ons installed, viewing credits reduces line spacing
It occurred if so many add-ons were installed that the credits text surface
needed to be split to two, and it affected all text until restarting
Wesnoth.
2017-12-06 11:34:00 +02:00
Charles Dang
e08350cd17 Revert "rebase commit: implemented a surrender dialog that records a surrender command in replays and quits the game"
This reverts commit 4dda0ad9b2dc74f0d2251f6778339f4199bec4e9. This feature needs to be
considered further. Right now the design doesn't make sense.
2017-12-06 13:35:28 +11:00
Charles Dang
3f6738ecc8 Fixup de1a9724ebe89c8da9 (fixes #2276)
I literally do not remember writing this with the false argument. Anyway, it meant the
screen area was saved in screen coordinates and not pixels, which caused crashes on certain
systems.
2017-12-06 11:43:46 +11:00
Charles Dang
003d964c4b Updated VC projectfile for 4dda0ad9b2dc74f
[ci skip]
2017-12-06 10:49:04 +11:00
Charles Dang
4d3fa03ba8 Removed now-useless static_assert
Unneeded as of d09ad24037e3151035b2cbb1e5c1dc886ea0684c. The standard typedef will always
be the correct size.
2017-12-06 10:14:28 +11:00
kallaballa
4dda0ad9b2
rebase commit: implemented a surrender dialog that records a surrender command in replays and quits the game 2017-12-05 17:01:06 -06:00
Jyrki Vesterinen
efa91bd9e8 Fix #2275: Unit halo flickers when unit moves
The loss of new_haloes in commit 80d42597b8eb701e3cef40c7890fcb0bc402450e also meant that a halo
was scheduled for the next halo_impl::render() run only when the previous
halo was unrendered, i.e. in the next frame. Thus, when the unit halo was
recreated when the unit was moving (a temporary fake unit, and together
with it, the corresponding halo, is created every time the unit steps into
a new hex), the new halo didn't show up for one frame.

Fixed by adding every new halo into invalidated_haloes immediately.
2017-12-05 20:29:42 +02:00
Charles Dang
c2fbfbf8ac Removed abandoned CodeLite projectfiles
[ci skip]

No updates have been made since 2015, and it was last used seriously in 2014 by @cbeck88.
2017-12-06 01:37:01 +11:00
Charles Dang
d09ad24037 Used standard C++ fixed-width integer types instead of SDL-provided ones
More consistent this way. It's very unlikely the SDL defines would clash with the standard
C++ ones, even in SDL-related code.
2017-12-06 01:31:59 +11:00
Charles Dang
52421672e1 Removed two unused function declarations 2017-12-05 12:30:32 +11:00
Gregory A Lundberg
ac77c3226e
Fix warning unused lambda binding 2017-12-04 18:54:36 -06:00
sigurdfdragon
07707dd627 Update changelogs 2017-12-04 19:51:21 -05:00
sigurdfdragon
6cebe328b7 DiD S12: Consolidate and adjust difficulty settings 2017-12-05 02:36:12 +02:00
sigurdfdragon
a384f9dcc9 DiD S12: Remove illuminated from hexes for a darker mood on the map 2017-12-05 02:36:12 +02:00
sigurdfdragon
205f000529 DiD S12: Add proper time area for outside of cave 2017-12-05 02:36:12 +02:00
sigurdfdragon
821f68a3a1 DiD S12: Add race-specific ending dialog 2017-12-05 02:36:12 +02:00
sigurdfdragon
b477729a2f DiD S12: Add status table names & flags for side 2 2017-12-05 02:36:12 +02:00
sigurdfdragon
6139e22b25 DiD S12: Change and improve objectives
1. Makes it clear to the player that the loop is not a bug by adjusting
   and clarifying objectives & adding a scenario repetition counter.
2. Allow campaign to end by leader death on fourth repetition instead
   of second to better convey endlessness/hopelessness feeling, with
   music & dialog to match.
2017-12-05 02:36:12 +02:00
sigurdfdragon
a9d016f84a DiD S12: Move and adjust scenario repetition variable
1. So forthcoming objective changes work correcly in linger mode.
2. So forthcoming objective code is simpler.
3. Allows jumping directly to scenario in debug to work correctly.
2017-12-05 02:36:12 +02:00
sigurdfdragon
4f899d44c5 DiD S12: Use macros 2017-12-05 02:36:12 +02:00
Charles Dang
29ff4bd644 Removed CVideo argument from help functions
Just used the singleton in the main show_help function.
2017-12-05 10:50:11 +11:00
Charles Dang
de1a9724eb Refactored handling of window/renderer size getters
* Removed display::screen_area(), display::w(), and display::h().
* Moved the global screen_area() function into the CVideo class.
* Renamed CVideo::getx() and gety() to get_width() and get_height()
* Made those two functions return the result of screen_area() instead of the other way around.
* Added preliminary support for high-DPI rendering to screen_area()

Note on the last point: When I fixed bug #1772 (aa8f6c7e7 right now but will probably change with rebasing)
I noted that SDL_GetWindowSize and SDL_GetRendererOutputSize returned the same results for me (even with
Window's automatic scaling for non-high-DPI-enabled apps disabled) but that the SDL documentation stated the
former returned screen coordinates and the latter pixels. In that same commit I changed the dimension functions
to use SDL_GetWindowSize. I've now reversed that decision and gone back to using SDL_GetRendererOutputSize so
I can guarantee output in pixels. If use_pixels is false, the code will return coordinates in 96 DPI, so I need
to have pixel measurements for the calculations.

Again, though, I do not know if SDL_GetWindowSize returns a different value that pixel size (which it's said
to do) on macOS or iOS. I'll need to do some testing. It's possible on those platforms I won't need the 96 DPI
measurements, but it's also possible it will be needed on on platforms, since all of our code relies on pixel
measurements.
2017-12-05 10:50:10 +11:00
Charles Dang
ade69102bc Floating Label: formatting update
# Conflicts:
#	src/floating_label.cpp
2017-12-05 10:50:09 +11:00
Charles Dang
089fc02c29 Refactored the implementation of display::scroll()
Based on some work in accelerated_rendering. No functionality change, but makes it much easier to read.
2017-12-05 10:50:08 +11:00
Jyrki Vesterinen
d00ed24d14 Fix #2067: Scrolling position in Lua console is reset constantly
The problem is that a line that's too wide to fit into the window
invalidates the layout of the entire window, and the window will lay itself
out the next time it will be drawn, after the Lua console code has scrolled
it to bottom.

The easiest fix is to simply defer scrolling to bottom until the window has
been drawn (and thus laid out) next time.
2017-12-04 20:53:12 +02:00
pentarctagon
73a3e3cc63 Adds cmake's pedantic option to scons. 2017-12-04 09:23:33 -06:00
pentarctagon
183c3ed2b9 Remove logic from cmake forcing lua to be compiled as c++ for clang. 2017-12-03 20:06:36 -06:00
Alexander van Gessel
c25bc555c4 Remove appveyor custom IRC notify script 2017-12-04 13:04:32 +11:00
Alexander van Gessel
b28d8d469a Switch AppVeyor notifications to webhook w/ irker-appveryor-collector 2017-12-04 13:04:32 +11:00
Gregory A Lundberg
bb7cf37e04
Fix fix in dcfdcfd 2017-12-03 16:49:54 -06:00
pentarctagon
817e9dbb33 Remove the scons workaround for Travis only having SDL 2.0.2 2017-12-04 09:35:58 +11:00
Gregory A Lundberg
dcfdcfd986
Remove unneeded casts 2017-12-03 16:22:41 -06:00
pentarctagon
49b6ede463 Move most strict warning flags to the default build flags.
This moves all the warnings flags from the strict build to the regular build, except for -Werror. This means that the only difference between strict builds and non-strict builds will be if warnings are turned into errors.
2017-12-03 15:30:52 -06:00
soliton-
c3e9e816e9 Fix shell injection
Also quote some variable expansions that weren't and fix some unnecessary bashism.
2017-12-03 14:30:24 -06:00
Charles Dang
bc414b7264 Cleaned up a couple dozen unnecessary forward declarations 2017-12-03 09:05:39 +11:00
Charles Dang
eab8380fc4 Avoid copying temp configs when adding config children (where possible)
A few of them are quite small, so this has no performance effect on those, but a few others
are potentially quite large, such as the one in campaign_server.cpp.
2017-12-03 07:37:12 +11:00
Charles Dang
583670ac2b Savegame: removed unused game_display references from various classes
No idea when these became unused, though. Doesn't seem to be by CVideo argument cleanup.
2017-12-03 07:18:23 +11:00
Charles Dang
bf9cac173d Save Index: formatting cleanup 2017-12-03 07:04:33 +11:00
Charles Dang
cc62dcf9c4 Game Load: append leader TC if image path resolves at runtime (change by @newfrenchy83)
Closes #2257. This fixes instances where save_index entries created *before* the relevant
binary paths were loaded resulted in leader images without TC when viewed in Game Load
even once the relevant paths were loaded.

Do note as of 3b0eb6b986f722d this likely isn't a problem unless the save_index file is
deleted, since otherwise all relevant save data (including independent image paths) will
be created in-game when they're saved.

One thing to note, though, is @newfrenchy83 mentioned that the final autosaves of games
were lacking TC in the Load Game dialog. *This* change should fixe that, but I don't know
if the above change affects that too.
2017-12-03 06:51:20 +11:00
Charles Dang
3b0eb6b986 Create a save_index entry when saving games
Prior to this, if you saved a game with a campaign-specific leader sprite and exited the game
or reloaded the cache *without* opening the Load Game dialog, the leader image would appear as
Unknown. This is because the save_index entry (and the accompanying path expansion) only occurred
when the save was selected in the dialog.

This change ensures all saves' leaders' images from here on out will always appear in the Load Game
dialog (unless, of course, the save_index file is deleted).
2017-12-03 06:36:02 +11:00
Charles Dang
87ea7c14b0 Point: marked operator SDL_Point const 2017-12-03 06:26:07 +11:00
gfgtdf
652270e045 fix options not working if a scenairo uses [variables] in [scenario] 2017-12-02 19:18:32 +01:00
Charles Dang
14dc762f31 Removed some pre-SDL 2.0.4 fallbacks
As of 10ca22e863e0 we use an Ubuntu 16.04 Docker image for Travis, which has 2.0.4.
2017-12-02 14:43:48 +11:00
josteph
9b8e235d17
Make the "Delay Shroud Updates" option apply to recalls.
Fixes #2196 (in addition to ca0b5033f06ad83868dc569e973897083042f90b
which was HttT-specific).
2017-12-01 21:26:39 -06:00
pentarctagon
10ca22e863 Use Docker Hub to get an image with pre-installed dependencies. 2017-12-01 21:04:05 -06:00
pentarctagon
9dcf25452b Re-add unit tests to docker runs. 2017-12-01 21:04:05 -06:00
pentarctagon
489eed7760 Fix travis osx build. 2017-12-01 21:04:05 -06:00
pentarctagon
376fc8961b Have travis used a ubuntu 16.04 docker image. 2017-12-01 21:04:05 -06:00