Skip to content

Commit

Permalink
Display: removed drawing_queue_ member
Browse files Browse the repository at this point in the history
This was the core of the surface-based drawing engine. Unused now. The drawing_queue_add()
calls throughout the code have been left, but commented out, for reference while reimplementing
things. The actual drawing_queue code has been left to, since its layers are referenced in
places. Need to remove them.
  • Loading branch information
Vultraz committed Mar 19, 2018
1 parent bb3d5b9 commit 9063736
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 38 deletions.
1 change: 0 additions & 1 deletion src/display.cpp
Expand Up @@ -188,7 +188,6 @@ display::display(const display_context * dc, std::weak_ptr<wb::manager> wb, repo
, animate_water_(true)
, flags_()
, activeTeam_(0)
, drawing_queue_()
, map_screenshot_(false)
, reach_map_()
, overlays_(nullptr)
Expand Down
35 changes: 0 additions & 35 deletions src/display.hpp
Expand Up @@ -1059,41 +1059,6 @@ class display : public video2::draw_layering
// TODO sort
std::size_t activeTeam_;

drawing_queue drawing_queue_;

public:
drawing_queue& get_drawing_queue()
{
return drawing_queue_;
}

/**
* Add an item to the drawing buffer. You need to update screen on affected area
*
*/

void drawing_queue_add(const drawing_queue::layer,
const map_location&,
int,
int,
const surface&,
const SDL_Rect& clip = SDL_Rect())
{
UNUSED(clip);
}

void drawing_queue_add(const drawing_queue::layer,
const map_location&,
int,
int,
const std::vector<surface>&,
const SDL_Rect& clip = SDL_Rect())
{
UNUSED(clip);
}

protected:

/** Used to indicate to drawing functions that we are doing a map screenshot */
bool map_screenshot_;

Expand Down
4 changes: 2 additions & 2 deletions src/whiteboard/attack.cpp
Expand Up @@ -183,8 +183,8 @@ void attack::draw_hex(const map_location& hex)
int xpos = display::get_singleton()->get_location_x(get_dest_hex());
int ypos = display::get_singleton()->get_location_y(get_dest_hex());

display::get_singleton()->drawing_queue_add(layer, get_dest_hex(), xpos, ypos,
image::get_image("whiteboard/attack-indicator-src-" + direction_text + ".png"));
//display::get_singleton()->drawing_queue_add(layer, get_dest_hex(), xpos, ypos,
// image::get_image("whiteboard/attack-indicator-src-" + direction_text + ".png"));
}
else if (hex == target_hex_) //add symbol to defender hex
{
Expand Down

0 comments on commit 9063736

Please sign in to comment.