1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-07 02:42:23 +00:00

Refactoring: moved all the remaining pattern code from mapeditor to pattern2

This commit is contained in:
Zeno Rogue
2017-12-09 03:48:30 +01:00
parent 4ce1c45e4e
commit 635d1f911c
13 changed files with 734 additions and 717 deletions

View File

@@ -118,7 +118,7 @@ void mapTextureTriangle(textureinfo &mi, array<hyperpoint, 3> v) {
map<int, textureinfo> texture_map;
bool applyTextureMap(cell *c, const transmatrix &V, int col) {
using namespace mapeditor;
using namespace patterns;
int t = subpattern(c, whichPattern);
try {
auto& mi = texture_map.at(t);
@@ -154,7 +154,7 @@ bool applyTextureMap(cell *c, const transmatrix &V, int col) {
}
void perform_mapping() {
using namespace mapeditor;
using namespace patterns;
if(!texture_read) readtexture();
texture_map.clear();
glfont_t& f(textures); int tabid = 1;
@@ -251,7 +251,7 @@ void showTextureMenu() {
keyhandler = [] (int sym, int uni) {
dialog::handleNavigation(sym, uni);
if(uni == 'r')
pushScreen(mapeditor::showPattern);
pushScreen(patterns::showPattern);
else if(uni == 'f') {
mapeditor::cfileptr = &texturename;
mapeditor::filecaption = XLAT("texture to load:");