crystal:: more settings in config/params/CLI

This commit is contained in:
Zeno Rogue 2018-12-04 02:36:08 +01:00
parent 6594908c5a
commit 18d5f8299b
3 changed files with 19 additions and 2 deletions

View File

@ -314,6 +314,9 @@ void initConfig() {
addsaver(anims::rug_angle, "animation rug angle");
addsaver(anims::circle_radius, "animation circle radius");
addsaver(anims::circle_spins, "animation circle spins");
addsaver(crystal::compass_probability, "compass-probability");
addsaver(crystal::view_coordinates, "crystal-coordinates");
#if CAP_TEXTURE
addsaver(texture::texture_aura, "texture-aura", false);
@ -1522,6 +1525,11 @@ void show_color_dialog() {
dialog::addItem(XLAT("distance colors"), 'd');
dialog::add_action([] () { pushScreen([] () { edit_color_table(distcolors); });});
}
if(geometry == gCrystal && cheater) {
dialog::addItem(XLAT("crystal coordinate colors"), 'C');
dialog::add_action([] () { crystal::view_coordinates = true; pushScreen([] () { edit_color_table(crystal::coordcolors); });});
}
dialog::addInfo(XLAT("colors of some game objects can be edited by clicking them."));
@ -1846,6 +1854,7 @@ unordered_map<string, ld&> params = {
{"sang", conformal::spiral_angle},
{"spiralx", conformal::spiral_x},
{"spiraly", conformal::spiral_y},
{"cprob", crystal::compass_probability}
};
}

View File

@ -457,7 +457,7 @@ color_t colorize(cell *c) {
return res;
}
colortable coordcolors = {0xD04040, 0x4040D0, 0x40D040, 0xFFD500, 0xF000F0, 0x00F0F0, 0xF0F0F0 };
colortable coordcolors = {0xD04040, 0x40D040, 0x4040D0, 0xFFD500, 0xF000F0, 0x00F0F0, 0xF0F0F0 };
ld compass_angle() {
bool bitr = ginf[gCrystal].vertex == 3;
@ -904,6 +904,12 @@ int readArgs() {
else if(argis("-test:crt")) {
test_crt();
}
else if(argis("-d:crystal"))
launch_dialog(show);
else if(argis("-cvcol")) {
shift(); int d = argi();
shift(); coordcolors[d] = arghex();
}
else return 1;
return 0;
}

View File

@ -4142,7 +4142,9 @@ namespace arcm {
}
namespace crystal {
extern bool add_bitruncation;
extern colortable coordcolors;
extern ld compass_probability;
extern bool view_coordinates;
color_t colorize(cell *c);
int precise_distance(cell *c1, cell *c2);
hrmap *new_map();