mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 05:52:59 +00:00 
			
		
		
		
	rogueviz::nilrider:: added missing updates to nilrider.h, using hr::lerp and BRICK guard
This commit is contained in:
		| @@ -115,12 +115,15 @@ struct checkerparam { | |||||||
|  |  | ||||||
| using goalchecker = std::function<eGoalResult(checkerparam)>; | using goalchecker = std::function<eGoalResult(checkerparam)>; | ||||||
|  |  | ||||||
|  | using star_awarder = std::function<ld(ld)>; | ||||||
|  |  | ||||||
| struct goal { | struct goal { | ||||||
|   color_t color; |   color_t color; | ||||||
|   string desc; |   string desc; | ||||||
|   goalchecker check; |   goalchecker check; | ||||||
|   string achievement_name; |   string achievement_name; | ||||||
|   string leaderboard_name; |   string leaderboard_name; | ||||||
|  |   star_awarder sa; | ||||||
|   }; |   }; | ||||||
|  |  | ||||||
| using surface_fun = std::function<ld(hyperpoint h)>; | using surface_fun = std::function<ld(hyperpoint h)>; | ||||||
| @@ -136,6 +139,7 @@ struct level { | |||||||
|   char hotkey; |   char hotkey; | ||||||
|   string longdesc; |   string longdesc; | ||||||
|   flagtype flags; |   flagtype flags; | ||||||
|  |   int stars_needed; | ||||||
|   ld minx, miny, maxx, maxy; |   ld minx, miny, maxx, maxy; | ||||||
|   vector<string> map_tiles; |   vector<string> map_tiles; | ||||||
|   ld startx, starty; |   ld startx, starty; | ||||||
| @@ -145,8 +149,8 @@ struct level { | |||||||
|    |    | ||||||
|   bool initialized; |   bool initialized; | ||||||
|    |    | ||||||
|   level(string name, char hotkey, flagtype flags, string longdesc, ld minx, ld miny, ld maxx, ld maxy, const vector<string>& mt, ld sx, ld sy, const vector<level*> subs, const std::function<ld(hyperpoint h)>& surf, vector<goal> g) : |   level(string name, char hotkey, flagtype flags, int sneed, string longdesc, ld minx, ld miny, ld maxx, ld maxy, const vector<string>& mt, ld sx, ld sy, const vector<level*> subs, const std::function<ld(hyperpoint h)>& surf, vector<goal> g) : | ||||||
|     name(name), hotkey(hotkey), longdesc(longdesc), flags(flags), minx(minx), miny(miny), maxx(maxx), maxy(maxy), map_tiles(mt), startx(sx), starty(sy), sublevels(subs), surface(surf), goals(g) { |     name(name), hotkey(hotkey), longdesc(longdesc), flags(flags), stars_needed(sneed), minx(minx), miny(miny), maxx(maxx), maxy(maxy), map_tiles(mt), startx(sx), starty(sy), sublevels(subs), surface(surf), goals(g) { | ||||||
|     initialized = false; |     initialized = false; | ||||||
|     unil_texture = nullptr; |     unil_texture = nullptr; | ||||||
|     unil_texture_stepped = nullptr; |     unil_texture_stepped = nullptr; | ||||||
|   | |||||||
| @@ -6,6 +6,7 @@ namespace bricks { | |||||||
|   extern void build(bool in_pair); |   extern void build(bool in_pair); | ||||||
|  |  | ||||||
|   #if !NILRIDER |   #if !NILRIDER | ||||||
|  |   #ifndef BRICK | ||||||
|   struct brick { |   struct brick { | ||||||
|     euc::coord co; |     euc::coord co; | ||||||
|     color_t col; |     color_t col; | ||||||
| @@ -14,6 +15,7 @@ namespace bricks { | |||||||
|     hpcshape shRotWall[6]; |     hpcshape shRotWall[6]; | ||||||
|     }; |     }; | ||||||
|   #endif |   #endif | ||||||
|  |   #endif | ||||||
|    |    | ||||||
|   extern vector<brick> bricks; |   extern vector<brick> bricks; | ||||||
|   } |   } | ||||||
|   | |||||||
| @@ -1,5 +1,7 @@ | |||||||
| namespace nilrider { | namespace nilrider { | ||||||
|  |  | ||||||
|  | using hr::lerp; | ||||||
|  |  | ||||||
| ld timestamp::energy_in_squares() { return vel * vel / (2 * gravity); } | ld timestamp::energy_in_squares() { return vel * vel / (2 * gravity); } | ||||||
|  |  | ||||||
| /** convert rotationally symmetric to internal model */ | /** convert rotationally symmetric to internal model */ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue