diff --git a/config.cpp b/config.cpp index 871820d7..638f0bdc 100644 --- a/config.cpp +++ b/config.cpp @@ -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 params = { {"sang", conformal::spiral_angle}, {"spiralx", conformal::spiral_x}, {"spiraly", conformal::spiral_y}, + {"cprob", crystal::compass_probability} }; } diff --git a/crystal.cpp b/crystal.cpp index 578d46f9..15e4e5a6 100644 --- a/crystal.cpp +++ b/crystal.cpp @@ -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; } diff --git a/hyper.h b/hyper.h index b94015f6..2d74be3a 100644 --- a/hyper.h +++ b/hyper.h @@ -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();