1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-09 15:39:55 +00:00
Commit Graph

134 Commits

Author SHA1 Message Date
Arthur O'Dwyer
62629f3e70 Change static const to static constexpr wherever possible
Since we require C++11, most of these consts can be constexpr.

Two `static const ld` remain non-compile-time-evaluable because
they depend on the runtime `log` function. One `static const cld`
remains non-compile-time because `std::complex<T>` doesn't become
constexpr until C++14.
2023-08-23 09:47:28 -08:00
Arthur O'Dwyer
10d0ed8900 Eliminate calls to sprintf
Apple Xcode has started giving `-Wdeprecated-declarations` warnings
for `sprintf`, and suggesting that people migrate to `snprintf` instead.
This is silly, but the warnings are spam and need to be silenced
somehow. Migrating to `snprintf` and/or `hr::format` is the path of
least resistance.
2023-08-21 10:18:44 -07:00
Arthur O'Dwyer
ced3bbcad4 Qualify calls to format
C++20 introduces `std::format` and we `using namespace std`,
so some of these would be ambiguous in C++20.
2023-08-21 10:18:44 -07:00
Zeno Rogue
b6f13b953b more OOP-style standard dialogs 2023-08-09 14:01:24 +02:00
Zeno Rogue
804c3897b8 number of step reported in crystal::build_shortest_path 2023-04-15 01:29:59 +02:00
Zeno Rogue
06523e063e used cyclefix and raddif in more places; (c)spin90, (c)spin180 and spin180 functions; rephrased M_PI in terms of TAU and x._deg when applicable 2022-11-13 16:22:55 +01:00
Zeno Rogue
48c99f296a crystal view_coordinates in tour 2022-08-13 22:43:31 +02:00
Zeno Rogue
a6116d678e reg3:: factored gen_quotient_map 2022-07-12 14:46:30 +02:00
Arthur O'Dwyer
0ae74aad62 Fix more instances of Clang's -Wunqualified-std-cast-call 2022-07-05 13:28:00 -04:00
Zeno Rogue
75f58766a2 made background screen darkening consistent and optional 2022-07-05 11:51:06 +02:00
Zeno Rogue
793148729b An option to play on a disk (and use bounded space rules). Also renamed 'bounded' flag to 'closed' or similar, and improved Halloween 2022-05-21 13:08:42 +02:00
Zeno Rogue
f855106613 fixed Crystal 2022-02-02 11:54:53 +01:00
Zeno Rogue
b87a47eaaa fixed relative_matrix in crystal 2022-01-08 18:52:02 +01:00
Zeno Rogue
839ca440ea refer to color by HTML name in commandline arguments 2021-10-17 09:18:31 +02:00
Zeno Rogue
9a32a462cc crystal:: fixed a crash bug 2021-09-30 11:14:31 +02:00
Arthur O'Dwyer
0ee6ce8c83 Eliminate -Woverloaded-virtual warnings from Clang. NFCI. 2021-07-12 17:51:39 -04:00
Zeno Rogue
6e6d0a7839 the main (heptagon) cellshape now also uses subcellshape; removed dirdist and get_vertices and introduced get_cellshape instead 2021-07-12 11:07:22 +02:00
Zeno Rogue
74486309a6 created a function init_heptagon which does tailored_alloc and clears the data 2021-07-04 10:36:16 +02:00
Zeno Rogue
21639feb91 fixed GP on Crystal 2021-06-01 13:07:55 +02:00
Zeno Rogue
f015023421 more text fixes found while translating 2021-05-24 11:42:46 +02:00
Zeno Rogue
5a73510c4f added some guards for MAXMDIM >= 4 and CAP_SOLV 2021-03-30 11:27:48 +02:00
Zeno Rogue
c57566f9da highlights in special modes 2021-02-07 22:55:11 +01:00
Arthur O'Dwyer
d163a01b8a Remove USE_UNORDERED_MAP because it has bit-rotted.
Trying to compile with `-DUSE_UNORDERED_MAP` produces lots of compiler errors
like these, because of missing `std::hash` specializations.
Also, `#define unordered_map map` is just evil!

```
./nonisotropic.cpp:875:36: note: in instantiation of template class 'std::__1::unordered_map<hr::nilv::mvec, hr::heptagon *,
      std::__1::hash<hr::nilv::mvec>, std::__1::equal_to<hr::nilv::mvec>, std::__1::allocator<std::__1::pair<const hr::nilv::mvec, hr::heptagon
      *> > >' requested here
    unordered_map<mvec, heptagon*> at;
                                   ^

./nonisotropic.cpp:239:58: note: in instantiation of template class 'std::__1::unordered_map<std::__1::pair<hr::heptagon *, hr::heptagon *>,
      hr::heptagon *, std::__1::hash<std::__1::pair<hr::heptagon *, hr::heptagon *> >, std::__1::equal_to<std::__1::pair<hr::heptagon *,
      hr::heptagon *> >, std::__1::allocator<std::__1::pair<const std::__1::pair<hr::heptagon *, hr::heptagon *>, hr::heptagon *> > >'
      requested here
    unordered_map<pair<heptagon*, heptagon*>, heptagon*> at;
                                                         ^

./nonisotropic.cpp:457:49: error: no matching member function for call to 'iadj'
      while(h1->distance < h2->distance) back = iadj(h2, down) * back, h2 = h2->cmove(down);
                                                ^~~~
cell.cpp:42:15: note: candidate function not viable: no known conversion from 'hr::sn::hrmap_solnih' to 'hr::hrmap' for object argument
  transmatrix iadj(heptagon *h, int d) {
              ^
cell.cpp:41:22: note: candidate function not viable: no known conversion from 'hr::sn::hrmap_solnih' to 'hr::hrmap' for object argument
  struct transmatrix iadj(cell *c, int i) { cell *c1 = c->cmove(i); return adj(c1, c->c.spin(i)); }
                     ^
```
2020-10-19 13:15:29 -04:00
Zeno Rogue
d64c5e338c extra guards 2020-10-15 16:33:52 +02:00
Zeno Rogue
67595a4ed3 redone hrmap::draw() function to keep DRY 2020-07-28 22:06:14 +02:00
Zeno Rogue
82f32607e6 MAJOR CHANGE: replaced (transmatrix,band_shift) pair with shiftmatrix 2020-07-28 22:06:14 +02:00
Zeno Rogue
8f2bde4434 crystal:: restricted view_coordinates 2020-07-08 16:00:33 +02:00
Zeno Rogue
89585f004b fixed some guards (in progress) 2020-07-03 14:42:33 +02:00
Zeno Rogue
aa2cf6dbf5 fixed a crash when 'drawing underlying tree' in crystal3 2020-05-29 01:58:15 +02:00
Zeno Rogue
0e8a5f6065 patterns in Crystal bitruncated {6,4}; also fixes graphics 2020-05-29 01:53:08 +02:00
Zeno Rogue
1b96658a05 fake curvature 2020-05-15 11:46:26 +02:00
Zeno Rogue
c9650cda2c crystal:: changed condition from cheater to allowIncreasedSight 2020-05-01 10:46:38 +02:00
Zeno Rogue
a024626593 export crystal_period 2020-05-01 10:42:28 +02:00
Zeno Rogue
7e58a718e2 fixup: flat to native in crystal 2020-04-15 01:42:46 +02:00
Zeno Rogue
233adddd36 moved reg3 values to cgi 2020-04-05 10:58:56 +02:00
Zeno Rogue
100b8f3534 cellrotations are now structs, and include inverses 2020-01-28 17:58:55 +01:00
Zeno Rogue
c5f1eb27c0 crystal:: in relative_matrix, h2==h1 handled 2020-01-18 17:15:29 +01:00
Zeno Rogue
2271a67506 removed the MAX_EDGE limit 2020-01-18 16:03:32 +01:00
Zeno Rogue
31c13bcb57 colorize for gSeifertCover 2020-01-16 17:13:47 +01:00
Zeno Rogue
8f1a65c9d7 operators - and * in crystal::coord 2020-01-06 20:36:42 +01:00
Zeno Rogue
6a1911ef01 crystal:: ctable is now C array 2020-01-03 02:37:10 +01:00
Zeno Rogue
17c4e82d55 Crystal torus 2020-01-02 17:15:38 +01:00
Zeno Rogue
f6d90db750 crystal::colorize: added '@', changed colors in '=' 2020-01-02 16:53:59 +01:00
Zeno Rogue
b4b325e009 6D Crystal, 535 and 536 2020-01-02 16:50:01 +01:00
Zeno Rogue
e92eda4bad crystal:: export told 2019-12-23 20:50:51 +01:00
Zeno Rogue
7dc57d587a ldcoord as friends 2019-12-23 20:50:42 +01:00
Zeno Rogue
7f09bb6259 replaced macro VALENCE with function valence() 2019-12-14 12:31:20 +01:00
Zeno Rogue
e8a39e6663 replaced euclid3:: with euc:: 2019-12-08 11:01:28 +01:00
Zeno Rogue
99ab57086b in_wallopt(): auto in racing 2019-12-06 11:45:19 +01:00
Zeno Rogue
56e575369b missing override markers 2019-11-30 18:48:44 +01:00