1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-21 00:47:40 +00:00

drawing tool and shape editor can now be used with texture mode enabled

This commit is contained in:
Zeno Rogue
2021-02-01 11:45:52 +01:00
parent 9065011437
commit b921a5a81b
4 changed files with 17 additions and 13 deletions

View File

@@ -11,6 +11,7 @@ namespace hr {
EX namespace mapeditor {
EX bool drawing_tool;
EX bool intexture;
#if HDR
enum eShapegroup { sgPlayer, sgMonster, sgItem, sgFloor, sgWall };
@@ -1754,19 +1755,21 @@ EX namespace mapeditor {
string line1, line2;
usershape *us = NULL;
#if CAP_TEXTURE
if(texture::config.tstate != texture::tsActive && intexture) {
intexture = false; drawing_tool = true;
}
#endif
bool intexture = false;
(void) intexture;
bool freedraw = drawing_tool;
bool freedraw = drawing_tool || intexture;
#if CAP_TEXTURE
if(texture::config.tstate == texture::tsActive) {
if(intexture) {
sg = 16;
line1 = "texture";
line2 = "";
texture::config.data.update();
intexture = true;
freedraw = true;
drawing_tool = false;
}
@@ -2430,11 +2433,7 @@ EX namespace mapeditor {
(void)clickused;
bool freedraw = drawing_tool;
#if CAP_TEXTURE
bool intexture = texture::config.tstate == texture::tsActive;
freedraw |= intexture;
#endif
bool freedraw = drawing_tool || intexture;
if(freedraw) {
if(lstartcell) lstart = ggmatrix(lstartcell) * lstart_rel;