54 lines
2 KiB
C++
54 lines
2 KiB
C++
/* Copyright 2015, Michele Santullo
|
|
* This file is part of DoorKeeper.
|
|
*
|
|
* DoorKeeper is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* DoorKeeper is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with DoorKeeper. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
namespace dk {
|
|
///--------------------------------------------------------------------------
|
|
///--------------------------------------------------------------------------
|
|
template <uint32_t D>
|
|
Tyler<D>::Tyler() {
|
|
}
|
|
|
|
///--------------------------------------------------------------------------
|
|
///--------------------------------------------------------------------------
|
|
template <uint32_t D>
|
|
template <typename T>
|
|
Layer<T, D>& Tyler<D>::push_layer (BaseMapSource<D>* parTilemap, int parIndex) {
|
|
//TODO: store the index
|
|
(void)parIndex;
|
|
|
|
auto newLayer = new Layer<T, D>(parTilemap);
|
|
m_layers.push_back(LayerPtr(newLayer));
|
|
return *newLayer;
|
|
}
|
|
|
|
///--------------------------------------------------------------------------
|
|
///--------------------------------------------------------------------------
|
|
template <uint32_t D>
|
|
template <typename T>
|
|
void Tyler<D>::push_layer_void (BaseMapSource<D>* parTilemap, int parIndex) {
|
|
push_layer<T>(parTilemap, parIndex);
|
|
}
|
|
|
|
///--------------------------------------------------------------------------
|
|
///--------------------------------------------------------------------------
|
|
template <uint32_t D>
|
|
void Tyler<D>::preload (const coords& parFrom, const coords& parTo) {
|
|
for (auto& layer : m_layers) {
|
|
layer->preload(parFrom, parTo);
|
|
}
|
|
}
|
|
} //namespace dk
|