Remove deprecated functions.
This also fixes the circular inclusion problem between TileIterator and PixelConv.
This commit is contained in:
parent
5a9d497183
commit
f073bb5793
5 changed files with 11 additions and 51 deletions
|
@ -18,15 +18,12 @@
|
|||
#ifndef id73F121AEE1EB4BA0980FAC025E5CDF05
|
||||
#define id73F121AEE1EB4BA0980FAC025E5CDF05
|
||||
|
||||
#include "doorkeeper/components/tileiterator.hpp"
|
||||
#include "doorkeeper/primitivetypes.hpp"
|
||||
#include "doorkeeper/implem/maptypes.hpp"
|
||||
#include <cstdint>
|
||||
#include <ciso646>
|
||||
|
||||
namespace dk {
|
||||
template <typename T, uint32_t D, typename T1>
|
||||
class TileIterator;
|
||||
|
||||
template <uint32_t D>
|
||||
class PixelConv {
|
||||
public:
|
||||
|
@ -90,18 +87,6 @@ namespace dk {
|
|||
private:
|
||||
const CoordinateScalarType m_first_reentr;
|
||||
};
|
||||
|
||||
template <typename T, typename T1>
|
||||
Vector<2> get_diamond_coordinates ( const TileIterator<T, 2, T1>& parIterator, const Vector<2>& parSize ) a_pure a_deprecated;
|
||||
|
||||
template <typename T, typename T1>
|
||||
Vector<2> get_half_diamond_coordinates ( const TileIterator<T, 2, T1>& parIterator, const Vector<2>& parSize ) a_pure a_deprecated;
|
||||
|
||||
template <uint32_t D, typename T, typename T1>
|
||||
Vector<D> get_square_coordinates ( const TileIterator<T, D, T1>& parIterator, const Vector<D>& parSize ) a_pure a_deprecated;
|
||||
|
||||
template <typename T, typename T1>
|
||||
Vector<2> get_hex_coordinates ( const TileIterator<T, 2, T1>& parIterator, const Vector<2>& parSize ) a_pure a_deprecated;
|
||||
} //namespace dk
|
||||
|
||||
#include "doorkeeper/implem/pixelconv.inl"
|
||||
|
|
|
@ -23,9 +23,6 @@
|
|||
#include <vector>
|
||||
|
||||
namespace dk {
|
||||
template <uint32_t D>
|
||||
class PixelConv;
|
||||
|
||||
template <typename T, uint32_t D>
|
||||
class Tile {
|
||||
public:
|
||||
|
|
|
@ -34,9 +34,6 @@ namespace dk {
|
|||
template <typename T, uint32_t D, typename T1>
|
||||
class TileIterator;
|
||||
|
||||
template <uint32_t D>
|
||||
class PixelConv;
|
||||
|
||||
namespace implem {
|
||||
template <typename I, typename O>
|
||||
struct TypeWithQualifiers {
|
||||
|
|
|
@ -16,34 +16,6 @@
|
|||
*/
|
||||
|
||||
namespace dk {
|
||||
template <typename T, typename T1>
|
||||
inline
|
||||
Vector<2> get_diamond_coordinates (const TileIterator<T, 2, T1>& parIterator, const Vector<2>& parSize) {
|
||||
PixelConvDiamond pconv(parSize, true, false);
|
||||
return pconv.to_pixel(parIterator->block_position());
|
||||
}
|
||||
|
||||
template <typename T, typename T1>
|
||||
inline
|
||||
Vector<2> get_half_diamond_coordinates (const TileIterator<T, 2, T1>& parIterator, const Vector<2>& parSize) {
|
||||
PixelConvDiamond pconv(parSize, true, false, PixelConvDiamond::coords(1, 2));
|
||||
return pconv.to_pixel(parIterator->block_position());
|
||||
}
|
||||
|
||||
template <uint32_t D, typename T, typename T1>
|
||||
inline
|
||||
Vector<D> get_square_coordinates (const TileIterator<T, D, T1>& parIterator, const Vector<D>& parSize) {
|
||||
PixelConvSquare<D> pconv((parSize));
|
||||
return pconv.to_pixel(parIterator->block_position());
|
||||
}
|
||||
|
||||
template <typename T, typename T1>
|
||||
inline
|
||||
Vector<2> get_hex_coordinates (const TileIterator<T, 2, T1>& parIterator, const Vector<2>& parSize) {
|
||||
PixelConvHex pconv(parSize, true);
|
||||
return pconv.to_pixel(parIterator->block_position());
|
||||
}
|
||||
|
||||
template <uint32_t D>
|
||||
PixelConv<D>::PixelConv (MapTypes parType, const coords& parTileSize) :
|
||||
m_tile_size(parTileSize),
|
||||
|
|
|
@ -33,6 +33,15 @@
|
|||
#include <SDL2/SDL.h>
|
||||
#include <SDL2/SDL_image.h>
|
||||
|
||||
namespace {
|
||||
template <typename T, typename T1>
|
||||
inline
|
||||
dk::Vector<2> get_diamond_coordinates (const dk::TileIterator<T, 2, T1>& parIterator, const dk::Vector<2>& parSize) {
|
||||
dk::PixelConvDiamond pconv(parSize, true, false);
|
||||
return pconv.to_pixel(parIterator->block_position());
|
||||
}
|
||||
} //unnamed namespace
|
||||
|
||||
template <typename Device, typename Tile>
|
||||
struct LayerWithData {
|
||||
std::unique_ptr<dkh::AsciiMapSource> device;
|
||||
|
@ -235,7 +244,7 @@ namespace {
|
|||
|
||||
for (auto itTile = parView.begin(parLayer), itTileEND = parView.end(parLayer); itTile != itTileEND; ++itTile) {
|
||||
SDL_Rect rect_dst;
|
||||
const auto pixel_pos = dk::get_diamond_coordinates(itTile, tilesize);
|
||||
const auto pixel_pos = get_diamond_coordinates(itTile, tilesize);
|
||||
rect_src.y = offsets[itTile->data()];
|
||||
rect_src.h = original_size.y() - offsets[itTile->data()];
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue