Misc class renaming to remove t- prefix

This commit is contained in:
Celtic Minstrel 2016-11-03 16:57:41 -04:00
parent 39e01dda3f
commit b6d862713f
11 changed files with 35 additions and 35 deletions

View file

@ -88,7 +88,7 @@ protected:
*/
virtual void update_symbols();
display::tdrawing_layer layer_;
display::drawing_layer layer_;
std::string color_;
/// represents the subdirectory that holds images for this arrow style

View file

@ -59,7 +59,7 @@ struct config_simple_key
};
#endif
struct tconfig_implementation
struct config_implementation
{
/**
* Implementation for the wrappers for
@ -710,14 +710,14 @@ config &config::child_impl(const char* key, int len, int n)
config& config::child(const std::string& key, const std::string& parent)
{
return tconfig_implementation::child(this, key, parent);
return config_implementation::child(this, key, parent);
}
const config& config::child(
const std::string& key
, const std::string& parent) const
{
return tconfig_implementation::child(this, key, parent);
return config_implementation::child(this, key, parent);
}
const config & config::child_or_empty(const std::string& key) const

View file

@ -80,7 +80,7 @@ std::ostream &operator << (std::ostream &, const config &);
class config
{
friend bool operator==(const config& a, const config& b);
friend struct tconfig_implementation;
friend struct config_implementation;
static config invalid;

View file

@ -1156,14 +1156,14 @@ std::vector<surface> display::get_terrain_images(const map_location &loc,
return res;
}
void display::drawing_buffer_add(const tdrawing_layer layer,
void display::drawing_buffer_add(const drawing_layer layer,
const map_location& loc, int x, int y, const surface& surf,
const SDL_Rect &clip)
{
drawing_buffer_.push_back(tblit(layer, loc, x, y, surf, clip));
}
void display::drawing_buffer_add(const tdrawing_layer layer,
void display::drawing_buffer_add(const drawing_layer layer,
const map_location& loc, int x, int y,
const std::vector<surface> &surf,
const SDL_Rect &clip)
@ -1172,10 +1172,10 @@ void display::drawing_buffer_add(const tdrawing_layer layer,
}
// FIXME: temporary method. Group splitting should be made
// public into the definition of tdrawing_layer
// public into the definition of drawing_layer
//
// The drawing is done per layer_group, the range per group is [low, high).
const display::tdrawing_layer display::drawing_buffer_key::layer_groups[] = {
const display::drawing_layer display::drawing_buffer_key::layer_groups[] = {
LAYER_TERRAIN_BG,
LAYER_UNIT_FIRST,
LAYER_UNIT_MOVE_DEFAULT,
@ -1185,7 +1185,7 @@ const display::tdrawing_layer display::drawing_buffer_key::layer_groups[] = {
};
// no need to change this if layer_groups above is changed
const unsigned int display::drawing_buffer_key::max_layer_group = sizeof(display::drawing_buffer_key::layer_groups) / sizeof(display::tdrawing_layer) - 2;
const unsigned int display::drawing_buffer_key::max_layer_group = sizeof(display::drawing_buffer_key::layer_groups) / sizeof(display::drawing_layer) - 2;
enum {
// you may adjust the following when needed:
@ -1210,7 +1210,7 @@ enum {
BITS_FOR_X_OVER_2 = 9
};
inline display::drawing_buffer_key::drawing_buffer_key(const map_location &loc, tdrawing_layer layer)
inline display::drawing_buffer_key::drawing_buffer_key(const map_location &loc, drawing_layer layer)
: key_(0)
{
// max_layer_group + 1 is the last valid entry in layer_groups, but it is always > layer
@ -1483,7 +1483,7 @@ static void draw_background(surface screen, const SDL_Rect& area, const std::str
}
void display::draw_text_in_hex(const map_location& loc,
const tdrawing_layer layer, const std::string& text,
const drawing_layer layer, const std::string& text,
size_t font_size, SDL_Color color, double x_in_hex, double y_in_hex)
{
if (text.empty()) return;
@ -1507,7 +1507,7 @@ void display::draw_text_in_hex(const map_location& loc,
}
//TODO: convert this to use sdl::ttexture
void display::render_image(int x, int y, const display::tdrawing_layer drawing_layer,
void display::render_image(int x, int y, const display::drawing_layer drawing_layer,
const map_location& loc, surface image,
bool hreverse, bool greyscale, fixed_t alpha,
Uint32 blendto, double blend_ratio, double submerged, bool vreverse)

View file

@ -825,7 +825,7 @@ public:
* the layers should be safe.
* If needed in WML use the name and map that to the enum value.
*/
enum tdrawing_layer{
enum drawing_layer{
LAYER_TERRAIN_BG, /**<
* Layer for the terrain drawn behind the
* unit.
@ -884,7 +884,7 @@ public:
* submerged: the amount of the unit out of 1.0 that is submerged
* (presumably under water) and thus shouldn't be drawn
*/
void render_image(int x, int y, const display::tdrawing_layer drawing_layer,
void render_image(int x, int y, const display::drawing_layer drawing_layer,
const map_location& loc, surface image,
bool hreverse=false, bool greyscale=false,
fixed_t alpha=ftofxp(1.0), Uint32 blendto=0,
@ -895,7 +895,7 @@ public:
* The font size is adjusted to the zoom factor.
*/
void draw_text_in_hex(const map_location& loc,
const tdrawing_layer layer, const std::string& text, size_t font_size,
const drawing_layer layer, const std::string& text, size_t font_size,
SDL_Color color, double x_in_hex=0.5, double y_in_hex=0.5);
protected:
@ -935,11 +935,11 @@ protected:
private:
unsigned int key_;
static const tdrawing_layer layer_groups[];
static const drawing_layer layer_groups[];
static const unsigned int max_layer_group;
public:
drawing_buffer_key(const map_location &loc, tdrawing_layer layer);
drawing_buffer_key(const map_location &loc, drawing_layer layer);
bool operator<(const drawing_buffer_key &rhs) const { return key_ < rhs.key_; }
};
@ -948,14 +948,14 @@ protected:
class tblit
{
public:
tblit(const tdrawing_layer layer, const map_location& loc,
tblit(const drawing_layer layer, const map_location& loc,
const int x, const int y, const surface& surf,
const SDL_Rect& clip)
: x_(x), y_(y), surf_(1, surf), clip_(clip),
key_(loc, layer)
{}
tblit(const tdrawing_layer layer, const map_location& loc,
tblit(const drawing_layer layer, const map_location& loc,
const int x, const int y, const std::vector<surface>& surf,
const SDL_Rect& clip)
: x_(x), y_(y), surf_(surf), clip_(clip),
@ -991,11 +991,11 @@ public:
* @param loc The hex the image belongs to, needed for the
* drawing order.
*/
void drawing_buffer_add(const tdrawing_layer layer,
void drawing_buffer_add(const drawing_layer layer,
const map_location& loc, int x, int y, const surface& surf,
const SDL_Rect &clip = SDL_Rect());
void drawing_buffer_add(const tdrawing_layer layer,
void drawing_buffer_add(const drawing_layer layer,
const map_location& loc, int x, int y,
const std::vector<surface> &surf,
const SDL_Rect &clip = SDL_Rect());

View file

@ -80,7 +80,7 @@ game_display::game_display(game_board& board, CVideo& video, std::weak_ptr<wb::m
first_turn_(true),
in_game_(false),
chat_man_(new display_chat_manager(*this)),
game_mode_(RUNNING),
mode_(RUNNING),
needs_rebuild_(false)
{
replace_overlay_map(&overlay_map_);
@ -287,7 +287,7 @@ void game_display::draw_hex(const map_location& loc)
}
if(on_map && loc == mouseoverHex_) {
tdrawing_layer hex_top_layer = LAYER_MOUSEOVER_BOTTOM;
drawing_layer hex_top_layer = LAYER_MOUSEOVER_BOTTOM;
const unit *u = resources::gameboard->get_visible_unit(loc, dc_->teams()[viewing_team()] );
if( u != nullptr ) {
hex_top_layer = LAYER_MOUSEOVER_TOP;
@ -349,7 +349,7 @@ void game_display::draw_hex(const map_location& loc)
// Linger overlay unconditionally otherwise it might give glitches
// so it's drawn over the shroud and fog.
if(game_mode_ != RUNNING) {
if(mode_ != RUNNING) {
static const image::locator linger(game_config::images::linger);
drawing_buffer_add(LAYER_LINGER_OVERLAY, loc, xpos, ypos,
image::get_image(linger, image::TOD_COLORED));
@ -408,10 +408,10 @@ void game_display::draw_sidebar()
}
void game_display::set_game_mode(const tgame_mode game_mode)
void game_display::set_game_mode(const game_mode mode)
{
if(game_mode != game_mode_) {
game_mode_ = game_mode;
if(mode != mode_) {
mode_ = mode;
invalidate_all();
}
}

View file

@ -212,11 +212,11 @@ public:
* @todo if the current implementation is wanted we can change
* the stuff back to a boolean
*/
enum tgame_mode {
enum game_mode {
RUNNING, /**< no linger overlay, show fog and shroud. */
LINGER }; /**< linger overlay, show fog and shroud. */
void set_game_mode(const tgame_mode game_mode);
void set_game_mode(const game_mode mode);
/// Sets whether the screen (map visuals) needs to be rebuilt. This is typically after the map has been changed by wml.
void needs_rebuild(bool b);
@ -255,7 +255,7 @@ private:
const std::unique_ptr<display_chat_manager> chat_man_;
tgame_mode game_mode_;
game_mode mode_;
// For debug mode
static std::map<map_location, int> debugHighlights_;

View file

@ -597,7 +597,7 @@ void unit_animation::fill_initial_animations( std::vector<unit_animation> & anim
static void add_simple_anim(std::vector<unit_animation> &animations,
const config &cfg, char const *tag_name, char const *apply_to,
display::tdrawing_layer layer = display::LAYER_UNIT_DEFAULT,
display::drawing_layer layer = display::LAYER_UNIT_DEFAULT,
bool offscreen = true)
{
for (const animation_branch &ab : prepare_animation(cfg, tag_name))

View file

@ -720,7 +720,7 @@ void unit_frame::redraw(const int frame_time,bool on_start_time,bool in_scope_of
}
game_display::get_singleton()->render_image( my_x,my_y,
static_cast<display::tdrawing_layer>(display::LAYER_UNIT_FIRST+current_data.drawing_layer),
static_cast<display::drawing_layer>(display::LAYER_UNIT_FIRST+current_data.drawing_layer),
src, image, facing_west, false,
ftofxp(current_data.highlight_ratio), current_data.blend_with,
current_data.blend_ratio,current_data.submerge,!facing_north);

View file

@ -192,7 +192,7 @@ void attack::draw_hex(const map_location& hex)
{
//@todo: replace this by either the use of transparency + LAYER_ATTACK_INDICATOR,
//or a dedicated layer
const display::tdrawing_layer layer = display::LAYER_FOOTSTEPS;
const display::drawing_layer layer = display::LAYER_FOOTSTEPS;
//calculate direction (valid for both hexes)
std::string direction_text = map_location::write_direction(

View file

@ -138,7 +138,7 @@ void suppose_dead::draw_hex(const map_location& hex)
if(hex == loc_) //add symbol to hex
{
//@todo: Possibly use a different layer
const display::tdrawing_layer layer = display::LAYER_ARROWS;
const display::drawing_layer layer = display::LAYER_ARROWS;
int xpos = resources::screen->get_location_x(loc_);
int ypos = resources::screen->get_location_y(loc_);