mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 14:02:59 +00:00 
			
		
		
		
	rv::platformer:: slide
This commit is contained in:
		| @@ -151,7 +151,6 @@ struct room { | |||||||
|    |    | ||||||
|   void initial() { |   void initial() { | ||||||
|     int ylev = where->master->distance; |     int ylev = where->master->distance; | ||||||
|     println(hlog, "ylev = ", ylev); |  | ||||||
|     if(ylev <= 0) |     if(ylev <= 0) | ||||||
|       for(int y=room_y-6; y<room_y; y++) |       for(int y=room_y-6; y<room_y; y++) | ||||||
|       for(int x=0; x<room_x; x++) |       for(int x=0; x<room_x; x++) | ||||||
| @@ -550,7 +549,7 @@ bool draw_room_on_map(cell *c, const shiftmatrix& V) { | |||||||
|   p.tinf = &roomtinf; |   p.tinf = &roomtinf; | ||||||
|   p.offset_texture = 0; |   p.offset_texture = 0; | ||||||
|   p.texture_id = r.room_texture->textureid; |   p.texture_id = r.room_texture->textureid; | ||||||
|   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, |   auto render_at = [&] (GLuint texid, double px0, double py0, double px1, double py1, | ||||||
|     double tx0, double ty0, double tx1, double ty1) { |     double tx0, double ty0, double tx1, double ty1) { | ||||||
| @@ -711,8 +710,20 @@ void run() { | |||||||
|   dialog::add_key_action('z', [] {  |   dialog::add_key_action('z', [] {  | ||||||
|     pushScreen(shot::menu); |     pushScreen(shot::menu); | ||||||
|     }); |     }); | ||||||
|   dialog::add_key_action('q', [] {  exit(0); }); |   dialog::add_key_action('q', [] { | ||||||
|   dialog::add_key_action('s', [] {   |     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"); |     mapstream::saveMap("platformer.lev"); | ||||||
|     }); |     }); | ||||||
|    |    | ||||||
| @@ -802,6 +813,24 @@ void add_platf_hooks() { | |||||||
|   } |   } | ||||||
|  |  | ||||||
| auto chk = arg::add3("-platformer", enable) | auto chk = arg::add3("-platformer", enable) | ||||||
|  |   + addHook_rvslides(195, [] (string s, vector<tour::slide>& 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) { | + addHook(mapstream::hooks_loadmap, 100, [] (fhstream& f, int id) { | ||||||
|     if(id == 66) { |     if(id == 66) { | ||||||
|       println(hlog, "loading platformer"); |       println(hlog, "loading platformer"); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue