diff --git a/rogueviz/platformer.cpp b/rogueviz/platformer.cpp index 562b1585..ccd54021 100644 --- a/rogueviz/platformer.cpp +++ b/rogueviz/platformer.cpp @@ -151,7 +151,6 @@ struct room { void initial() { int ylev = where->master->distance; - println(hlog, "ylev = ", ylev); if(ylev <= 0) for(int y=room_y-6; ytextureid; - println(hlog, "offset = ", p.offset, " texture_offset = ", p.offset_texture); + // println(hlog, "offset = ", p.offset, " texture_offset = ", p.offset_texture); auto render_at = [&] (GLuint texid, double px0, double py0, double px1, double py1, double tx0, double ty0, double tx1, double ty1) { @@ -711,8 +710,20 @@ void run() { dialog::add_key_action('z', [] { pushScreen(shot::menu); }); - dialog::add_key_action('q', [] { exit(0); }); - dialog::add_key_action('s', [] { + dialog::add_key_action('q', [] { + if(tour::on) tour::next_slide(); + else exit(0); + }); + dialog::add_key_action('o', [] { + if(tour::on) tour::next_slide(); + }); + dialog::add_key_action(SDLK_ESCAPE, [] { + if(tour::on) tour::next_slide(); + }); + dialog::add_key_action(SDLK_F10, [] { + if(tour::on) tour::next_slide(); + }); + dialog::add_key_action('s', [] { mapstream::saveMap("platformer.lev"); }); @@ -802,6 +813,24 @@ void add_platf_hooks() { } auto chk = arg::add3("-platformer", enable) + + addHook_rvslides(195, [] (string s, vector& v) { + if(s != "mixed") return; + v.push_back(tour::slide{ + "platformer", 10, tour::LEGAL::NONE | tour::QUICKSKIP | tour::QUICKGEO, + "A non-Euclidean platformer. Press up/left/right to move the guy.\n" + , + [] (tour::presmode mode) { + slide_url(mode, 'y', "non-Euclidean platformer (YouTube)", "https://www.youtube.com/watch?v=eb2DhCcGH7U"); + slide_url(mode, 't', "non-Euclidean platformer (Twitter)", "https://twitter.com/ZenoRogue/status/1467233150380089345"); + slide_url(mode, 'g', "how to edit this", "https://github.com/zenorogue/hyperrogue/blob/master/rogueviz/platformer.cpp"); + setCanvas(mode, '0'); + using namespace tour; + if(mode == pmStart) { + mapstream::loadMap("platformer.lev"); + } + } + }); + }) + addHook(mapstream::hooks_loadmap, 100, [] (fhstream& f, int id) { if(id == 66) { println(hlog, "loading platformer");