1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-06-25 22:52:49 +00:00

rogueviz::nilrider:: added missing updates to nilrider.h, using hr::lerp and BRICK guard

This commit is contained in:
Zeno Rogue 2025-05-19 14:13:10 +02:00
parent 1a79f58630
commit b001514ccc
3 changed files with 10 additions and 2 deletions

View File

@ -115,12 +115,15 @@ struct checkerparam {
using goalchecker = std::function<eGoalResult(checkerparam)>;
using star_awarder = std::function<ld(ld)>;
struct goal {
color_t color;
string desc;
goalchecker check;
string achievement_name;
string leaderboard_name;
star_awarder sa;
};
using surface_fun = std::function<ld(hyperpoint h)>;
@ -136,6 +139,7 @@ struct level {
char hotkey;
string longdesc;
flagtype flags;
int stars_needed;
ld minx, miny, maxx, maxy;
vector<string> map_tiles;
ld startx, starty;
@ -145,8 +149,8 @@ struct level {
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) :
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) {
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), 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;
unil_texture = nullptr;
unil_texture_stepped = nullptr;

View File

@ -6,6 +6,7 @@ namespace bricks {
extern void build(bool in_pair);
#if !NILRIDER
#ifndef BRICK
struct brick {
euc::coord co;
color_t col;
@ -14,6 +15,7 @@ namespace bricks {
hpcshape shRotWall[6];
};
#endif
#endif
extern vector<brick> bricks;
}

View File

@ -1,5 +1,7 @@
namespace nilrider {
using hr::lerp;
ld timestamp::energy_in_squares() { return vel * vel / (2 * gravity); }
/** convert rotationally symmetric to internal model */