Commit graph

258 commits

Author SHA1 Message Date
Martin Hrubý
96bbebb514 Fix building with Xcode 10 (#3460)
Resolves #3458.

(cherry-picked from commit 50301f84e3)
2018-10-07 03:24:17 +00:00
Martin Hrubý (hrubymar10)
674fda85b7 Migrate links to https if available - Fwd c18537edc0
(cherry-picked from commit bc4d22dc72)
2018-10-07 03:23:36 +00:00
Charles Dang
a7f6862210 More include cleanups
Cleaned up unnecessary inclusions of:
* event.hpp
* exceptions.hpp
* formatter.hpp
* hash.hpp
* image.hpp
* sound.hpp
* team.hpp
* tstring.hpp
* wml_exception.hpp
2018-03-11 23:22:02 +11:00
Celtic Minstrel
b0559eb0bf Use an enum for deprecation levels (C++ only)
This is not done for Lua and WML due to some complications.
It could still be done for them later, if desired.
2018-03-04 21:21:33 -05:00
Celtic Minstrel
5fc9d8d173 Use new deprecated_message() function wherever possible (C++)
This also covers handling of legacy DescriptionWML for [set_menu_item],
and tweaks its handling in the other cases (mainly [multiplayer_side]).

I added the next_dev_version constant intending to use it, but then
decided not to do so; however I left it in in case someone finds it useful.
2018-03-04 21:21:33 -05:00
Iris Morelle
c9eee2d351 Copyright/attribution update
[ci skip]
2018-02-16 20:03:24 -03:00
Gregory A Lundberg
b5f76eff79
Bump copyright to 2018 2018-01-19 00:02:20 -06:00
Celtic Minstrel
a141de5e53 Address potential crash if a storyscreen has no showable parts 2017-05-22 00:34:05 -04:00
Charles Dang
79ffbbe9b4 Game Events: include manager in pump header to avoid having its include in so many places 2017-05-21 07:52:42 +11:00
Celtic Minstrel
bea0e92c6c Add voice= key to [message] and [story][part]
Resolves #1621
2017-05-11 18:59:15 -04:00
Charles Dang
2101353d36 Convert include guards to the shorter #pragma once
Turns out I mistook @celticminstrel's opinion that we should use include guards over pragma (737916e).
Since all major compilers support `#pragma once`, there's no reason not to use it.

For future mergability reasons, this excludes src/spirit_po and src/xBRZ. It also excludes src/boost-patched.
2017-05-09 19:41:37 +11:00
Charles Dang
ae85e4ca02 Seems this should have a virtual dtor 2017-05-04 15:46:18 +11:00
Charles Dang
c9d484e2c4 Storyscreen/Parser: don't keep parsing if special action was already executed
Just realized this was a small regresison in e97b992 , since the entire function wasn't handled by one
large if/else if/else block anymore.
2017-05-04 01:25:05 +11:00
loonycyborg
c8a7dd7b37 Add return value to operator= to fix gcc compiler error 2017-05-03 14:39:40 +03:00
Charles Dang
85b2aad5ba Storyscreen: store the text/title alignment as strings
This removes the need for a dedicated function in the viewer dialog to convert the enum to pango
alignments. Now the GUI2 helper function can be used directly instead.
2017-05-03 21:54:08 +11:00
Charles Dang
478fea46b6 Storyscreen/Parser: range-for
Seems the other loops here cannot utilize range-for.
2017-05-03 20:10:35 +11:00
Charles Dang
e97b992393 Storyscreen: split common WML parsing code into a helper class 2017-05-03 20:07:03 +11:00
Charles Dang
3ff2816fee Reformatted and cleaned up includes for the storyscreen internals 2017-05-03 19:36:26 +11:00
Charles Dang
71740c8216 Removed render_input code from storyscreen parts
This isn't needed anymore. The calculating of the actual loc to draw the floating images is now handled by
the Store Viewer dialog itself.
2017-05-03 19:25:49 +11:00
Charles Dang
43b8023506 Attempt to fix Mac build 2017-04-30 20:52:22 +11:00
Charles Dang
47177dfd62 Fixup 47d77c7 2017-04-30 17:34:25 +11:00
Charles Dang
47d77c79d4 Story Viewer: delegate storyscreen controller creation to dialog
I left the controller passed in an argument for compatibility with the GUI1 dialog, but since that's removed
it makes sense that the dialog handle the creation of the controller, especially since due to an oversight
it made a copy instead of holding a reference.

This also allows storyscreen/interface.*pp to be removed. The START_POSITION was part of the GUI1 implementation
and isn't needed anymore.
2017-04-30 16:46:53 +11:00
Charles Dang
2e4e84d270 Removed unused class member from storyscreen controller
No longer used with the transition to GUI2 (337ef03120)
2017-04-21 04:09:07 +11:00
Charles Dang
96ee2e166e Include cleanups 2017-04-19 15:24:54 +11:00
Charles Dang
2a68ae90e1 Actually removed the GUI1 Storyscreen 2017-04-19 15:24:43 +11:00
Charles Dang
337ef03120 Removed GUI1 Storyscreen 2017-04-19 15:21:06 +11:00
Charles Dang
61992429d0 Avoid copy initialization of colors when possible 2017-04-15 21:10:42 +11:00
Charles Dang
f9004970c4 Story Viewer: don't only validate presence of [part] tags under [story]
I forgot control tags like [switch] are allowed under [story]. This should hopefully fix bug #25655
2017-04-14 13:47:12 +11:00
Charles Dang
dec0fd6dfd Convert outro screen to GUI2
It's the screen that shows 'The End' at the end of an SP campaign.
2017-04-09 21:37:16 +11:00
Charles Dang
76f92a205f Enable new storyscreen by default (but not remove the old one yet)
Also removes an unnecessary trigger_full_redraw call from the new codepath.
2017-04-09 15:13:00 +11:00
Charles Dang
bf8398692f Storyscreen: added getter for floating image filename 2017-03-28 13:23:40 +11:00
Charles Dang
aba06146be Story Viewer: progress on key nav and background image rendering 2017-03-24 17:48:40 +11:00
Charles Dang
d22a4ca696 Removed event context from storyscreen controller
This fixes an issue where no click would register if using the GUI2 storyscreen dialog. Its removal doesn't seem
to have any effect on the GUI1 one either.
2017-03-24 12:24:28 +11:00
Charles Dang
b917e16e6a Fixup 1cf90d02d6 (accidentally removed a piece of code in the old codepath) 2017-03-24 11:58:52 +11:00
Charles Dang
1cf90d02d6 Initial implementation of GUI2 story viewer 2017-03-24 11:42:13 +11:00
Celtic Minstrel
b4dc11ce36 Belated 2017 copyright update 2017-03-19 10:05:38 -04:00
Jyrki Vesterinen
09d9054e4a Stop calling adjust_surface_alpha() with SDL_ALPHA_OPAQUE
The function doesn't do anything if that value is passed, except if
adjust_surface_alpha() has been called for the same surface before with a
different value.

The only case that remains is floating_label.cpp line 123, since in that
case the alpha *is* changed few lines earlier.
2017-02-28 23:29:40 +02:00
Charles Dang
e22c8967ee Cleaned up global.hpp includes 2016-12-17 15:21:04 +11:00
Charles Dang
b97a20b059 Split SDL_Surface wrapper class and related helper struts into their own file
This (should) allow sdl/utils.hpp to be modified without a huge rebuild, since a number
of widely used headers included that file simply for the surface class type.
2016-12-10 22:36:31 +11:00
Charles Dang
4d48ed1319 Cleaned up util.hpp includes 2016-12-08 14:21:18 +11:00
Charles Dang
cbcb355ee9 Cleaned up a few video.hpp includes 2016-12-07 01:08:06 +11:00
Charles Dang
bf86912371 CVideo: removed update_rect functions
These have been functionally useless, since none of their code was ever executed. Since this hasn't caused
any problems this far, I'm removing them.
2016-12-07 00:41:11 +11:00
Charles Dang
a97c5edccd Storyscreen: convert two color constants to color_t 2016-12-01 22:14:49 +11:00
Charles Dang
a8517a234d Made pango font rendering use color_t 2016-11-30 16:58:34 +11:00
Gregory A Lundberg
f23127e65a Remove LOW_MEM compile-time option
Per @Vultraz
2016-11-11 09:20:56 -06:00
Celtic Minstrel
77cace19db Rename ttext class to avoid t- prefix 2016-11-09 01:17:14 -05:00
Charles Dang
dc477afb7a Removed empty sdl/image.*pp files
These used to contain code related to SDL_GPU, but were emptied in e497761d4e when that library was removed.
2016-11-07 13:05:03 +11:00
Charles Dang
8c92a9ee8e Formatting cleanup: moved const qualifiers before type names 2016-10-31 01:04:18 +11:00
Daniel Foerster
c1b34ca22d Add ability to horizontally align story text 2016-10-17 00:57:54 -05:00
Chris Beck
1336306884 move font_options, text.?pp to font folder
also fix indentation in previous commit
2016-10-15 06:32:37 -04:00