mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 05:52:59 +00:00 
			
		
		
		
	ads:: more solid lps use
This commit is contained in:
		| @@ -128,15 +128,26 @@ void run_ads_game() { | ||||
|   cwt.at = centerover = currentmap->gamestart(); | ||||
|  | ||||
|   restart(); | ||||
|  | ||||
|   rogueviz::on_cleanup_or_next([] { | ||||
|     switch_spacetime_to(true); | ||||
|     }); | ||||
|   } | ||||
|  | ||||
| local_parameter_set lps_relhell("relhell:"); | ||||
|  | ||||
| local_parameter_set lps_relhell_space("relhell:space:", &lps_relhell); | ||||
| local_parameter_set lps_relhell_ds_spacetime("relhell:ds:", &lps_relhell); | ||||
| local_parameter_set lps_relhell_ads_spacetime("relhell:ads:", &lps_relhell); | ||||
| local_parameter_set lps_relhell_ds_spacetime_klein("relhell:ads:klein:", &lps_relhell_ds_spacetime); | ||||
| local_parameter_set lps_relhell_ds_spacetime_pers("relhell:ads:pers:", &lps_relhell_ds_spacetime); | ||||
|  | ||||
| void default_settings() { | ||||
|   set_default_keys(); | ||||
|  | ||||
|   lps_add_enum(lps_relhell, nohelp, 1); | ||||
|   lps_add(lps_relhell, nohelp, 1); | ||||
|   lps_add(lps_relhell, nomenukey, true); | ||||
|   lps_add(lps_relhell, nomap, true); | ||||
|   lps_add(lps_relhell, no_find_player, true); | ||||
|   lps_add(lps_relhell, showstartmenu, false); | ||||
|   lps_add(lps_relhell, mapeditor::drawplayer, false); | ||||
| @@ -145,6 +156,24 @@ void default_settings() { | ||||
|   lps_add(lps_relhell, vid.axes3, false); | ||||
|   lps_add(lps_relhell, patterns::whichCanvas, 'r'); | ||||
|   lps_add(lps_relhell, patterns::rwalls, 0); | ||||
|   lps_add(lps_relhell, vid.fov, 150.); | ||||
|  | ||||
|   lps_add(lps_relhell_ds_spacetime_klein, pmodel, mdDisk); | ||||
|  | ||||
|   lps_add(lps_relhell_ds_spacetime_klein, pconf.alpha, 0.); | ||||
|   lps_add(lps_relhell_ds_spacetime_pers, pmodel, mdPerspective); | ||||
|   lps_add(lps_relhell_ds_spacetime, vid.grid, true); | ||||
|   lps_add(lps_relhell_ds_spacetime, stdgridcolor, 0xFFFFFFFF); | ||||
|   lps_add(lps_relhell_ds_spacetime, models::desitter_projections, true); | ||||
|  | ||||
|   lps_add(lps_relhell_space, pmodel, mdDisk); | ||||
|   lps_add(lps_relhell_space, pconf.scale, .95); | ||||
|  | ||||
|   lps_add(lps_relhell_ads_spacetime, pmodel, mdRelPerspective); | ||||
|   lps_add(lps_relhell_ads_spacetime, nonisotropic_weird_transforms, true); | ||||
|   lps_add(lps_relhell_ads_spacetime, vid.grid, false); | ||||
|   lps_add(lps_relhell_ads_spacetime, slr::range_xy, 2.); | ||||
|   lps_add(lps_relhell_ads_spacetime, slr::range_z, 2.); | ||||
|   } | ||||
|  | ||||
| void set_config() { | ||||
| @@ -156,6 +185,7 @@ void run_ads_game_std() { | ||||
|   set_config(); | ||||
|   set_geometry(gNormal); | ||||
|   set_variation(eVariation::pure); | ||||
|   lps_enable(&lps_relhell_space); | ||||
|   run_ads_game(); | ||||
|   showstartmenu = false; | ||||
|   } | ||||
|   | ||||
| @@ -735,10 +735,14 @@ void run_ds_game() { | ||||
|   rogueviz::rv_hook(hooks_prestats, 100, display_rsrc); | ||||
|   rogueviz::rv_hook(hooks_handleKey, 0, handleKey); | ||||
|   rogueviz::rv_hook(anims::hooks_anim, 100, replay_animation); | ||||
|  | ||||
|   rogueviz::on_cleanup_or_next([] { | ||||
|     main_rock = nullptr; | ||||
|     }); | ||||
|   } | ||||
|  | ||||
| void run_ds_game_std() { | ||||
|   lps_enable(&lps_relhell); | ||||
|   lps_enable(&lps_relhell_space); | ||||
|   enable_canvas(); | ||||
|   run_ds_game(); | ||||
|   } | ||||
|   | ||||
| @@ -113,7 +113,7 @@ ads_object *main_rock; | ||||
|  | ||||
| extern string copyright_shown; | ||||
|  | ||||
| extern local_parameter_set lps_relhell; | ||||
| extern local_parameter_set lps_relhell, lps_relhell_space, lps_relhell_ads_spacetime, lps_relhell_ds_spacetime_pers, lps_relhell_ds_spacetime_klein; | ||||
|  | ||||
| int XSCALE = 48; | ||||
| int YSCALE = 48; | ||||
|   | ||||
| @@ -45,27 +45,22 @@ void switch_spacetime() { | ||||
|       geometry = gSpace435; | ||||
|       variation = eVariation::pure; | ||||
|       swap(currentmap, map_hyp); | ||||
|       pmodel = hv_klein ? mdDisk : mdPerspective; | ||||
|       if(hv_klein) pconf.alpha = 0; | ||||
|       check_cgi(); | ||||
|       cgi.require_basics(); | ||||
|       cgi.use_count++; | ||||
|       vid.grid = true; | ||||
|       stdgridcolor = 0xFFFFFFFF; | ||||
|  | ||||
|       initcells(); | ||||
|       initgame(); | ||||
|       vid.fov = 150; | ||||
|       models::desitter_projections = true; | ||||
|       lps_enable(&(hv_klein ? lps_relhell_ds_spacetime_klein : lps_relhell_ds_spacetime_pers)); | ||||
|       } | ||||
|  | ||||
|     else if(hyperbolic) { | ||||
|       geometry = gSphere; | ||||
|       variation = eVariation::bitruncated; | ||||
|       swap(currentmap, map_hyp); | ||||
|       pmodel = mdDisk; | ||||
|       pconf.scale = .95; | ||||
|       check_cgi(); | ||||
|       lps_enable(&lps_relhell_space); | ||||
|       } | ||||
|  | ||||
|     } | ||||
| @@ -75,22 +70,16 @@ void switch_spacetime() { | ||||
|     cgi.use_count++; | ||||
|     if(hyperbolic) { | ||||
|       hybrid::switch_to_actual(); | ||||
|       pmodel = mdRelPerspective; | ||||
|       hyperpoint res; | ||||
|       nonisotropic_weird_transforms = true; | ||||
|       NLP = Id; | ||||
|       Duality = Id; | ||||
|       for(int a=0; a<4; a++) for(int b=0; b<4; b++) Duality[a][b] = (a^2) == b; | ||||
|       vid.fov = 150; | ||||
|       vid.grid = false; | ||||
|       slr::range_xy = 2; | ||||
|       slr::range_z = 2; | ||||
|       lps_enable(&lps_relhell_ads_spacetime); | ||||
|       } | ||||
|  | ||||
|     else if(mhybrid) { | ||||
|       hybrid::switch_to_underlying(); | ||||
|       pmodel = mdDisk; | ||||
|       pconf.scale = .95; | ||||
|       lps_enable(&lps_relhell_space); | ||||
|       } | ||||
|     cgi.use_count++; | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue