mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-30 05:23:00 +00:00 
			
		
		
		
	refactored mode_description to a separate function
This commit is contained in:
		
							
								
								
									
										51
									
								
								hud.cpp
									
									
									
									
									
								
							
							
						
						
									
										51
									
								
								hud.cpp
									
									
									
									
									
								
							| @@ -447,6 +447,34 @@ EX void draw_crosshair() { | |||||||
|   } |   } | ||||||
|  |  | ||||||
| EX bool less_in_portrait, less_in_landscape; | EX bool less_in_portrait, less_in_landscape; | ||||||
|  |  | ||||||
|  | EX string mode_description() { | ||||||
|  |   string md; | ||||||
|  |   if(autocheat) md += " god"; | ||||||
|  |   if(casual) md += " casual"; | ||||||
|  |   else if(cheater) md += " cheat"; | ||||||
|  |   if(inv::on) md += " inv"; | ||||||
|  |   if(tour::on) md += " tour"; | ||||||
|  |   if(shmup::on) md += " shmup"; | ||||||
|  |   if(multi::players > 1) md += " P" + its(multi::players); | ||||||
|  |   if(pureHardcore()) md += " hardcore"; | ||||||
|  |   else if(hardcore) md += " partial hardcore"; | ||||||
|  |   if(daily::on) md += " strange"; | ||||||
|  |   if(bow::crossbow_mode()) md += " b/" + bow::bowName[bow::style]; | ||||||
|  |   if(land_structure != default_land_structure()) | ||||||
|  |     md += " " + land_structure_name(true); | ||||||
|  |   if(randomPatternsMode) md += " RPM"; | ||||||
|  |   if(use_custom_land_list) md += " custom"; | ||||||
|  |   if(geometry != gNormal || !BITRUNCATED) | ||||||
|  |     md = md + " " + full_geometry_name(); | ||||||
|  |   return md; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  | EX string mode_description1() { | ||||||
|  |   string md = mode_description(); | ||||||
|  |   if(md == "") return "standard"; | ||||||
|  |   return md.substr(1); | ||||||
|  |   } | ||||||
|    |    | ||||||
| EX void drawStats() { | EX void drawStats() { | ||||||
|   if(vid.stereo_mode == sLR) return; |   if(vid.stereo_mode == sLR) return; | ||||||
| @@ -691,29 +719,12 @@ EX void drawStats() { | |||||||
|     } |     } | ||||||
|   string vers = VER; |   string vers = VER; | ||||||
|   if(true) { |   if(true) { | ||||||
|     if(casual) vers += " casual"; |     vers += mode_description(); | ||||||
|     if(autocheat) vers += " god"; |  | ||||||
|     else if(cheater) vers += " cheat"; |  | ||||||
|     if(yendor::on) vers += " Yendor"; |  | ||||||
|     if(tactic::on) vers += " PTM"; |  | ||||||
|     if(inv::on) vers += " inv"; |  | ||||||
|     if(tour::on) vers += " tour"; |  | ||||||
|     if(shmup::on) vers += " shmup"; |  | ||||||
|     if(multi::players > 1) vers += " P" + its(multi::players); |  | ||||||
|     if(pureHardcore()) vers += " hardcore"; |  | ||||||
|     else if(hardcore) vers += " partial hardcore"; |  | ||||||
|     if(peace::on) vers += " peace"; |     if(peace::on) vers += " peace"; | ||||||
|     if(racing::on) vers += " racing"; |     if(racing::on) vers += " racing"; | ||||||
|     if(daily::on) vers += " strange"; |  | ||||||
|     if(bow::crossbow_mode()) vers += " b/" + bow::bowName[bow::style]; |  | ||||||
|     if(land_structure != default_land_structure()) |  | ||||||
|       vers += " " + land_structure_name(true); |  | ||||||
|     if(princess::challenge) vers += " Princess"; |     if(princess::challenge) vers += " Princess"; | ||||||
|     if(randomPatternsMode) vers += " RPM"; |     if(yendor::on) vers += " Yendor"; | ||||||
|     if(use_custom_land_list) vers += " custom"; |     if(tactic::on) vers += " PTM"; | ||||||
|      |  | ||||||
|     if(geometry != gNormal || !BITRUNCATED)  |  | ||||||
|       vers = vers + " " + full_geometry_name(); |  | ||||||
|     } |     } | ||||||
|   if(!nofps) vers += XLAT(" fps: ") + its(calcfps()); |   if(!nofps) vers += XLAT(" fps: ") + its(calcfps()); | ||||||
|    |    | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue