mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-13 05:37:38 +00:00
added the Banach-Tarski vis to the RogueViz presentation
This commit is contained in:
@@ -2468,3 +2468,20 @@ non-game:
|
|||||||
2018.05.27 01:21 Update 10.4a:
|
2018.05.27 01:21 Update 10.4a:
|
||||||
- Strange Challenge should exit correctly.
|
- Strange Challenge should exit correctly.
|
||||||
- rules are described better in other geometries
|
- rules are described better in other geometries
|
||||||
|
|
||||||
|
2018.06.12 XX:XX Update 10.4b:
|
||||||
|
- Orb of Love does not give the 30$$$ bonus in the Strange Challenge -- this is now made clearer (the displayed score no longer includes this 30$$$, and a help text for Orb of Love is added).
|
||||||
|
- a flat torus can be embedded in S^3 -- HyperRogue now knows about this when rendering torus in the Hypersian Rug mode in the spherical native geometry
|
||||||
|
- it was possible to get another chance in the Strange Challenge by pressing ESC in specific circumstances -- this should be fixed.
|
||||||
|
- fixed some issues with adjacency taken into account incorrectly with Hedgehogs/Flailguards/Pikemen and Warp/halfvines
|
||||||
|
- orb of Horns, and other cases caring about opposite cells, should now work correctly in nonstandard geometries
|
||||||
|
- marked Orb of Lava as useless in the Haunted Woods
|
||||||
|
- fixed the Earth Elementals falling/dying in Red Rock Valley
|
||||||
|
- Orb of Recall no longer creates holes in the Yendorian Forest
|
||||||
|
- fixed a bug which caused forgetting the PTM game when 'reseting special modes'
|
||||||
|
- added the 'Banach-Tarski-like' visualization to RogueViz
|
||||||
|
- faster drawing of convex shapes in the online version
|
||||||
|
- translation updated, fixed some player gender directives in Russian
|
||||||
|
- torus rendering no longer creates darker areas because of the side difference
|
||||||
|
- fixed the non-3D display of rock formations in Goldberg geometries
|
||||||
|
- Hunter dogs (guarding/regrouping) and sometimes Ice Wolves no longer count as a different kill type (not counted in total kills)
|
||||||
|
@@ -314,6 +314,8 @@ void bantar_frame() {
|
|||||||
|
|
||||||
vector<polytodraw> subscr[4];
|
vector<polytodraw> subscr[4];
|
||||||
|
|
||||||
|
compute_graphical_distance();
|
||||||
|
|
||||||
const int tmax = 2000;
|
const int tmax = 2000;
|
||||||
int t = ticks % (5*tmax);
|
int t = ticks % (5*tmax);
|
||||||
int tphase = t / tmax, tsub = t % tmax;
|
int tphase = t / tmax, tsub = t % tmax;
|
||||||
@@ -396,7 +398,7 @@ void bantar_frame() {
|
|||||||
drawrec(viewctr, hsOrigin, cview());
|
drawrec(viewctr, hsOrigin, cview());
|
||||||
if(0) for(auto p: parent) if(gmatrix.count(p.first) && gmatrix.count(p.second) && infos[p.first].gid == i && infos[p.second].gid == i)
|
if(0) for(auto p: parent) if(gmatrix.count(p.first) && gmatrix.count(p.second) && infos[p.first].gid == i && infos[p.second].gid == i)
|
||||||
queueline(tC0(gmatrix[p.first]), tC0(gmatrix[p.second]), 0xFFFFFFFF, 2);
|
queueline(tC0(gmatrix[p.first]), tC0(gmatrix[p.second]), 0xFFFFFFFF, 2);
|
||||||
subscr[i] = ptds;
|
subscr[i] = move(ptds);
|
||||||
}
|
}
|
||||||
|
|
||||||
map<int, map<int, vector<polytodraw>>> xptds;
|
map<int, map<int, vector<polytodraw>>> xptds;
|
||||||
@@ -426,15 +428,23 @@ void bantar_frame() {
|
|||||||
void bantar_anim() {
|
void bantar_anim() {
|
||||||
|
|
||||||
vid.aurastr = 0;
|
vid.aurastr = 0;
|
||||||
while(!quitmainloop) {
|
bool breakanim = false;
|
||||||
ticks = SDL_GetTicks();
|
int t = SDL_GetTicks();
|
||||||
|
drawthemap();
|
||||||
|
while(!breakanim) {
|
||||||
|
ticks = SDL_GetTicks() - t;
|
||||||
|
|
||||||
bantar_frame();
|
bantar_frame();
|
||||||
|
|
||||||
SDL_GL_SwapBuffers();
|
SDL_GL_SwapBuffers();
|
||||||
SDL_Event ev;
|
SDL_Event ev;
|
||||||
while(SDL_PollEvent(&ev)) handle_event(ev);
|
while(SDL_PollEvent(&ev))
|
||||||
|
if(ev.type == SDL_KEYDOWN || ev.type == SDL_MOUSEBUTTONDOWN)
|
||||||
|
breakanim = true;
|
||||||
}
|
}
|
||||||
|
mapeditor::drawplayer = true;
|
||||||
|
vid.xposition = vid.yposition = 0;
|
||||||
|
vid.scale = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool bmap;
|
bool bmap;
|
||||||
@@ -466,6 +476,19 @@ void init_bantar() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void init_bantar_map() {
|
||||||
|
bmap = true;
|
||||||
|
ForInfos {
|
||||||
|
int hsh = 0x202047;
|
||||||
|
for(int w: cci.second.way) hsh = (11301 * hsh + w * 37121) & 0x7F7F7F;
|
||||||
|
cci.second.c->landparam = hsh;
|
||||||
|
cci.second.c->land = laCanvas;
|
||||||
|
cci.second.c->wall = waNone;
|
||||||
|
cci.second.c->item = itNone;
|
||||||
|
cci.second.c->monst = moNone;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int readArgs() {
|
int readArgs() {
|
||||||
using namespace arg;
|
using namespace arg;
|
||||||
|
|
||||||
@@ -496,16 +519,7 @@ int readArgs() {
|
|||||||
}
|
}
|
||||||
else if(argis("-bantar_map")) {
|
else if(argis("-bantar_map")) {
|
||||||
init_bantar();
|
init_bantar();
|
||||||
bmap = true;
|
init_bantar_map();
|
||||||
ForInfos {
|
|
||||||
int hsh = 0x202047;
|
|
||||||
for(int w: cci.second.way) hsh = (11301 * hsh + w * 37121) & 0x7F7F7F;
|
|
||||||
cci.second.c->landparam = hsh;
|
|
||||||
cci.second.c->land = laCanvas;
|
|
||||||
cci.second.c->wall = waNone;
|
|
||||||
cci.second.c->item = itNone;
|
|
||||||
cci.second.c->monst = moNone;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if(argis("-btry")) {
|
else if(argis("-btry")) {
|
||||||
shift(); notry = argi();
|
shift(); notry = argi();
|
||||||
|
@@ -1123,12 +1123,14 @@ auto hooks = addHook(hooks_args, 100, readArgs);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
auto hooks2 = addHook(hooks_frame, 50, levelline::draw);
|
auto hooks2 = addHook(hooks_frame, 50, levelline::draw);
|
||||||
}
|
}}
|
||||||
|
|
||||||
|
namespace rogueviz {
|
||||||
|
void mark(cell *c) {
|
||||||
|
using namespace kohonen;
|
||||||
|
if(kind == kKohonen && inited >= 1) {
|
||||||
|
distfrom = getNeuronSlow(c);
|
||||||
|
coloring();
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
void rogueviz::mark(cell *c) {
|
|
||||||
using namespace kohonen;
|
|
||||||
if(kind == kKohonen && inited >= 1) {
|
|
||||||
distfrom = getNeuronSlow(c);
|
|
||||||
coloring();
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
|
34
rogueviz.cpp
34
rogueviz.cpp
@@ -1802,6 +1802,40 @@ slide rvslides[] = {
|
|||||||
slidecommand = "staircase menu";
|
slidecommand = "staircase menu";
|
||||||
if(mode == 4) pushScreen(staircase::showMenu);
|
if(mode == 4) pushScreen(staircase::showMenu);
|
||||||
}},
|
}},
|
||||||
|
{"Banach-Tarski-like", 62, LEGAL_NONE,
|
||||||
|
"Banach-Tarski-like decomposition. Break a hyperbolic plane into two hyperbolic planes.\n\n"
|
||||||
|
"Press '5' to show the decomposition. Press any key to stop.\n\n"
|
||||||
|
"You will see a map of the decomposition. Press '5' again to return.",
|
||||||
|
|
||||||
|
[] (presmode mode) {
|
||||||
|
slidecommand = "staircase menu";
|
||||||
|
if(mode == 3) {
|
||||||
|
while(gamestack::pushed()) pop_game();
|
||||||
|
banachtarski::bmap = false;
|
||||||
|
banachtarski::on = false;
|
||||||
|
}
|
||||||
|
if(mode == 4) {
|
||||||
|
if(!banachtarski::on) {
|
||||||
|
bool b = mapeditor::drawplayer;
|
||||||
|
specialland = cwt.c->land;
|
||||||
|
push_game();
|
||||||
|
banachtarski::init_bantar();
|
||||||
|
airmap.clear();
|
||||||
|
dynamicval<int> vs(sightrange_bonus, 3);
|
||||||
|
dynamicval<int> vg(genrange_bonus, 3);
|
||||||
|
doOvergenerate();
|
||||||
|
banachtarski::bantar_anim();
|
||||||
|
quitmainloop = false;
|
||||||
|
mapeditor::drawplayer = b;
|
||||||
|
banachtarski::init_bantar_map();
|
||||||
|
}
|
||||||
|
else if(banachtarski::on && banachtarski::bmap) {
|
||||||
|
banachtarski::bmap = false;
|
||||||
|
banachtarski::on = false;
|
||||||
|
pop_game();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}},
|
||||||
{"THE END", 99, LEGAL_ANY | FINALSLIDE,
|
{"THE END", 99, LEGAL_ANY | FINALSLIDE,
|
||||||
"Press '5' to leave the presentation.",
|
"Press '5' to leave the presentation.",
|
||||||
[] (presmode mode) {
|
[] (presmode mode) {
|
||||||
|
@@ -87,5 +87,13 @@ namespace rogueviz {
|
|||||||
void showMenu();
|
void showMenu();
|
||||||
void make_staircase();
|
void make_staircase();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace banachtarski {
|
||||||
|
extern bool on;
|
||||||
|
void init_bantar();
|
||||||
|
void bantar_anim();
|
||||||
|
extern bool bmap;
|
||||||
|
extern void init_bantar_map();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user