Commit graph

96 commits

Author SHA1 Message Date
Charles Dang
4b3862493f Convert all usecases of SDL_Color to color_t 2016-11-30 17:59:30 +11:00
Charles Dang
9baabccf91 Use standard library includes instead of C includes when possible 2016-11-30 11:48:10 +11:00
Charles Dang
eb3effad21 Replace int_to_color and string_to_color with their appropriate color_t counterparts 2016-11-28 12:17:49 +11:00
Gregory A Lundberg
d31555f8cf Pedantic includes
Change all includes to start at the base instead of assuming the directory where included from.

This makes it more apparent exactly which header has been included, since many have the same name.

This also allows moving all header files out of the src directory.
2016-11-11 11:00:22 -06:00
Celtic Minstrel
08852f6131 Rename most remaining non-GUI2 types to avoid t- prefix 2016-11-09 01:17:14 -05:00
Celtic Minstrel
b74afeff73 Rename terrain classes to avoid t_ prefix 2016-11-09 01:13:17 -05:00
Charles Dang
8c92a9ee8e Formatting cleanup: moved const qualifiers before type names 2016-10-31 01:04:18 +11:00
Charles Dang
4b66735293 Help: flipped a conditional to prevent crashes when parsing invalid vectors 2016-10-17 11:45:16 +11:00
Jyrki Vesterinen
5e2af01fba Fix build
This involves splitting standard colors out of font/constants.cpp.
Serialization/string_utils.cpp, that is part of wesnothlib
(compiled into both client and server) uses ellipsis and Unicode minus sign
from font constants, which means that font/constants.cpp must be part of
wesnothlib as well. However, one of standard colors is evaluated by calling
inverse(const SDL_Color&) declared in sdl/utils.hpp. Sdl/utils.cpp has way
too many dependencies to live in wesnothlib.

Hence, standard colors are now in a file of their own:
font/standard_colors.cpp. That file is part of wesnoth (not wesnothlib) and
only available for the client.
2016-10-16 18:34:22 +03:00
Charles Dang
b6ea5106ca Moved marked-up_text.*pp to font/ 2016-10-16 22:54:07 +11:00
Jyrki Vesterinen
af733360a8 Fix a bunch of MSVC2015 compiler warnings about hiding declarations
This commit still doesn't fix all of them. I decided to leave alone
cases where variables with the same name are assigned in multiple
conditions of the same if...else if...else statement, and cases where a
scope logging macro is used multiple times in the same scope. In any
case, this commit greatly reduces the warning count on MSVC2015 and makes
new warnings much easier to spot.
2016-10-06 00:11:56 +03:00
Charles Dang
476027f239 Completely refactored internal handling of credits and enabled new dialog
This removes the ugly string markup and makes the dialog parse the config directly.

This also temporarily disables the display of credits in the help browser.
2016-09-15 03:09:14 +11:00
Celtic Minstrel
b143ea4397 Use intrusive pointers for unit attacks
This is primarily for the purpose of the Lua API, to enable attack data to persist
even if a unit no longer owns the attack.
2016-08-28 00:24:23 -04:00
Celtic Minstrel
16786f9905 Generate help topics for weapon specials obtained through AMLAs 2016-08-13 17:08:50 -04:00
gfgtdf
4d84d42c47 iterator_range instead of pair for config::child_itors
with this wwe can use .size(), .empty(), .front(), operator bool, etc.
on config::child_itors objects.
2016-08-13 16:59:34 +02:00
Bär Halberkamp
7dbf17f3fe Fix traits in help 2016-07-31 15:46:55 -04:00
Charles Dang
24577e117d Merge pull request #716 from wesnoth/boost_trimming
Boost-related cleanups
2016-07-30 15:51:30 +11:00
Bär Halberkamp
4e71bbe448 Generate trait help instead of hardcoding
Introduces a new key "help_text=" in [trait]
2016-07-29 18:44:10 -04:00
Charles Dang
05092ba2f6 Refactor most boost pointer related stuff to use their stdlib counterparts
This constitutes drop-in replacements for:

* boost::shared_ptr
* boost::scoped_ptr
* boost::weak_ptr
* boost::enable_shared_from_this
* boost::static_pointer_cast
* boost::dynamic_pointer_cast

This excludes boost::intrusive_ptr, except for stray includes. Refactoring that is more complicated.
2016-07-25 09:28:42 +11:00
Charles Dang
52cba5fc63 Enabled Lato for GUI1 and adjusted assigned sizes accordingly
Since GUI1 widgets seem to rely on the given font size values in font.hpp
for their dimensions, those are unchanged. ThemeWML-provided sizes were adjusted,
and larger sizes assigned to elements that were too small with the new font.

Theme element rects were also adjusted as necessary.
2016-05-18 08:05:02 +11:00
Celtic Minstrel
1649930113 Lua API for the name generators 2016-04-15 15:51:23 -04:00
Celtic Minstrel
ca382018b7 BOOST_FOREACH -> range for 2016-04-02 09:38:29 -04:00
Celtic Minstrel
3ac7f8d970 NULL -> nullptr
A few cases of NULL were missed, since changing them led to errors
(Mainly instances where it was passed to a boost::function)
2016-03-31 00:42:38 -04:00
Celtic Minstrel
bc711f5f43 Consolidate related files into subdirectories 2016-03-20 16:20:09 -04:00
Celtic Minstrel
fe0df45947 Consolidate formula and hotkey files in corresponding dirs 2016-03-20 16:15:50 -04:00
gfgtdf
969157d79e fix color in help unit resitances
https://gna.org/bugs/?24381
2016-02-08 21:10:28 +01:00
Chris Beck
ba51524f6e update copyright to year 2016
using this shell script:

find src -type f -print0 | xargs -0 sed -i "s|Copyright (C) \([[:digit:]]*\)\([ ]*\)-\([ ]*\)2015|Copyright (C) \1\2-\32016|g"
2016-01-02 23:59:31 -05:00
Charles Dang
50aeac6e30 Prefix help topic sections with bullets as well 2015-08-31 23:51:00 +11:00
Ignacio R. Morelle
413d3528bd Use empty() method instead of size() for emptiness checks
Found by cppcheck.
2015-07-06 23:40:30 -03:00
Charles Dang
534a0f7ffb Use 4 spaces instead of an image hack to indent topic lists 2015-03-22 23:30:51 +11:00
Charles Dang
1569c8ce8b Rewrote and reordered a bunch of help stuff related to the Gameplay and Introduction sections 2015-03-16 03:50:58 +11:00
Charles Dang
927ec38fbe Preface topic lists with bullets. Certain sections still lack 2015-03-15 18:33:03 +11:00
Charles Dang
671830df13 Allow hiding eras in help, and hide the blank era 2015-01-13 21:12:51 +11:00
Charles Dang
7f6bfd6e6e 'Units having this special attack' -> 'Units with this special attack' 2015-01-13 18:46:07 +11:00
Ignacio R. Morelle
57ae45387a New Year copyright update 2015-01-01 19:07:35 -03:00
Charles Dang
c20ef0fa0d Don't allocate space for nonexistent race deceptions 2014-12-25 22:59:32 +11:00
Charles Dang
7ae2a72ada 'Units having this ability' -> 'Units with this ability' 2014-12-25 01:41:40 +11:00
Ignacio R. Morelle
6fe72e893f Skip generating help sections for units without hide_help=no variations
This fixes many instances of unit types with "technical" variations in
my campaign After the Storm being assigned help sections of their own.

Required adding a new method to unit_type that's actually cheaper than
checking for variations().empty(), as it doesn't involve allocating new
objects.
2014-12-22 20:15:17 -03:00
Chris Beck
e09a516935 replace resources::config_manager with game_config_manager::get()
This makes more sense, the main reason for resources was to hold
pointers to children of play_controller. For classes that are
legitimately singletons are essentially never destroyed or
reconstructed there's very little reason to put it in resources.
2014-11-24 19:49:54 -05:00
Chris Beck
f969e60ca5 split off help topic generators into their own file 2014-11-11 11:55:06 -05:00
Chris Beck
f1ce9a34bf move impl details into compilation unit 2014-11-11 11:17:40 -05:00
Chris Beck
8d63f15c4d split off help_menu from help_impl 2014-11-11 01:24:59 -05:00
Chris Beck
b92ac18c6b fixup headers of new files using iwyu 2014-11-11 01:24:58 -05:00
Chris Beck
5b1e0611ca split off help_text_area from help_impl 2014-11-11 01:24:58 -05:00
Chris Beck
a046653cf0 split off help_browser from help_impl 2014-11-11 01:24:58 -05:00
Chris Beck
67cd15f5a0 add help_impl.?pp files (guts of help.cpp) 2014-11-11 01:24:57 -05:00