mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-09 15:39:55 +00:00
rogueviz:: fixed dhrg-pres
This commit is contained in:
parent
38e07081ad
commit
bb96612fc6
@ -3,7 +3,7 @@
|
||||
#include "rogueviz.h"
|
||||
|
||||
#define RVPATH HYPERPATH "rogueviz/"
|
||||
#if CAP_RVPRES
|
||||
#if CAP_RVSLIDES
|
||||
namespace dhrg {
|
||||
void graphv(std::string s);
|
||||
extern double graph_R;
|
||||
@ -69,7 +69,7 @@ void greedy_test() {
|
||||
}
|
||||
|
||||
void launch_sea() {
|
||||
enable_canvas_backup('0');
|
||||
enable_canvas_backup(&ccolor::plain);
|
||||
start_game();
|
||||
dhrg::graphv("rogueviz/dhrg-data/sea-ppl");
|
||||
resetview();
|
||||
@ -150,7 +150,7 @@ color_t dhrg_grid = 0x00FF00A0;
|
||||
|
||||
void graph_visuals(presmode mode) {
|
||||
if(mode == pmStart) {
|
||||
slide_backup(patterns::canvasback, 0xFF00);
|
||||
slide_backup(ccolor::plain.ctab, colortable{{0xFF00}});
|
||||
slide_backup(canvas_default_wall, waInvisibleFloor);
|
||||
slide_backup(rogueviz::showlabels, true);
|
||||
slide_backup(rogueviz::ggamma, 2);
|
||||
@ -296,21 +296,16 @@ slide dhrg_slides[] = {
|
||||
|
||||
{"Animated Hyperbolic Plane", 10, LEGAL::ANY | QUICKGEO | NOTITLE, "Scroll the map to learn how hyperbolic geometry works.",
|
||||
[] (presmode mode) {
|
||||
setCanvas(mode, 'F');
|
||||
if(mode == pmStart) {
|
||||
stop_game();
|
||||
setCanvas(mode, &ccolor::football, [] {
|
||||
tour::slide_backup(ccolor::which->ctab, colortable{0x10F010, 0x104010});
|
||||
tour::slide_backup(smooth_scrolling, true);
|
||||
tour::slide_backup(colortables['F'][0], 0x10F010);
|
||||
tour::slide_backup(colortables['F'][1], 0x104010);
|
||||
tour::slide_backup(patterns::canvasback, 0x10F010);
|
||||
tour::slide_backup(vid.use_smart_range, 2);
|
||||
tour::slide_backup(vid.smart_range_detail, 5);
|
||||
tour::slide_backup(mapeditor::drawplayer, false);
|
||||
tour::slide_backup(no_find_player, true);
|
||||
tour::slide_backup(draw_centerover, false);
|
||||
tour::slide_backup(vid.axes, 0);
|
||||
start_game();
|
||||
}
|
||||
});
|
||||
// mine_slide(mode, geom_pentagos, cl_pentagons, chessboard_assigner);
|
||||
no_other_hud(mode);
|
||||
}
|
||||
@ -320,7 +315,7 @@ slide dhrg_slides[] = {
|
||||
"Hyperbolic geometry has a tree-like structure, and expands exponentially.\n\nThis tree-like structure has been used in applications, for visualizing and modeling tree-like hierarchical structures.\n\nPress '5' to show the expansion.\n\n"
|
||||
,
|
||||
[] (presmode mode) {
|
||||
setCanvas(mode, '0');
|
||||
setWhiteCanvas(mode, []{});
|
||||
view_treelike(mode);
|
||||
// mine_slide(mode, geom_pentagos, cl_pentagons, chessboard_assigner);
|
||||
if(mode == pmFrame) clearMessages();
|
||||
@ -335,9 +330,12 @@ slide dhrg_slides[] = {
|
||||
if((cmode && sm::EXPANSION) && show_distance_lists) {
|
||||
vector<dialog::item> it = std::move(dialog::items);
|
||||
dialog::items.clear();
|
||||
dialog::start_list(1600, 1600, 'a');
|
||||
bool to_end = true;
|
||||
for(auto& d: it) {
|
||||
if(d.key == 'S' || d.key == 'C') continue;
|
||||
if(d.key == 'S' || d.key == 'C' || d.key == 'D') continue;
|
||||
if(d.body == "" && d.value == "") continue;
|
||||
if(to_end && d.body.find("(") != string::npos) { println(hlog, "END"); dialog::end_list(); to_end = false; }
|
||||
string latexbody = d.body + d.value;
|
||||
auto rep = [&] (string s, string t) {
|
||||
while(latexbody.find(s) != string::npos)
|
||||
@ -485,13 +483,14 @@ slide dhrg_slides[] = {
|
||||
|
||||
{"Basic Algorithmic Properties", 999, LEGAL::NONE | QUICKGEO | NOTITLE, "Basic algorithmic properties of hyperbolic tessellations... press '5' to show some shortest distances.",
|
||||
[] (presmode mode) {
|
||||
setCanvas(mode, '0');
|
||||
setWhiteCanvas(mode, [] {});
|
||||
view_treelike(mode);
|
||||
if(mode == pmStart) tour::slide_backup(number_coding, ncNone);
|
||||
if(mode == pmStart) tour::slide_backup(vid.creature_scale, 1);
|
||||
if(mode == pmStart) cpath.clear();
|
||||
if(mode == pmKey) prepare_cpath();
|
||||
rogueviz::rv_hook(hooks_frame, 100, [] {
|
||||
if(nomap) return;
|
||||
if(cpath.size()) {
|
||||
static bool drawn = true;
|
||||
if(drawn) println(hlog, "drawn"), drawn = false;
|
||||
|
Loading…
Reference in New Issue
Block a user