Essentially, we had CVideo arguments being passed down this chain:
- game_launcher
- free-standing MP initialization functions
- campaign_controller
- playsingle_controller/playmp_controller
- play_controller
- game_display
- display
And likewise down through
- game_launcher
- editor_controller
- editor_display
- display
With only a minimal number of actual calls along the way. :| There were maybe... two remaining?
This removes the CVideo arguments and class members from both chains (except of course, game_launcher.
That's where the "real" CVideo object lives).
The display class now initializes its CVideo reference from the singleton, which is also used in the
very few other places it's needed. I also replaced a check for a null video ptr in show_tooltip()
with a faked() check (see src/tooltips.cpp). That seems to make more sense, since CVideo is never
null now.
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.
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.
* Wesnoth is distributed under the terms of the GPL version 2, made
that more explicit
* updated the copyright range to 2007
* updated Dave's email adress
* Refactoring of all animation code in unit_display and halo.
* Adding animated.hpp, and the animated<T> template.
* Partial rewrite of image.?pp for speed: looking up images was what
was slowing the game
* Replacing all SDL_Surface*, and scoped_sdl_surface, with
shared_sdl_surface, which was renamed surface.
* Optimizing halo movement when unit moves
* Inlining some stuff for performance reasons
* Optimizing invalide_all redraws
* Adding support for animated terrain images