mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-10-18 15:12:29 +00:00
some more hooks, to add extra models
This commit is contained in:
+11
@@ -310,12 +310,15 @@ bool knowgood;
|
||||
hyperpoint goodpoint;
|
||||
vector<pair<int, hyperpoint>> tofix;
|
||||
|
||||
EX hookset<int()> hooks_two_sided_model;
|
||||
|
||||
EX bool two_sided_model() {
|
||||
#if CAP_VR
|
||||
bool in_vr = vrhr::rendering();
|
||||
#else
|
||||
constexpr bool in_vr = false;
|
||||
#endif
|
||||
auto i = callhandlers(0, hooks_two_sided_model); if(i) return i > 0;
|
||||
if(GDIM == 3) return false;
|
||||
if(in_vr_sphere) return true;
|
||||
if(pmodel == mdHemisphere || pmodel == mdHyperboloid) return !in_vr;
|
||||
@@ -328,7 +331,11 @@ EX bool two_sided_model() {
|
||||
return false;
|
||||
}
|
||||
|
||||
EX hookset<int(const hyperpoint& H)> hooks_get_side;
|
||||
|
||||
EX int get_side(const hyperpoint& H) {
|
||||
int i = callhandlers(0, hooks_get_side, H);
|
||||
if(i) return i;
|
||||
#if CAP_VR
|
||||
if(in_vr_sphere) {
|
||||
hyperpoint Hscr;
|
||||
@@ -2462,8 +2469,12 @@ EX void set_vr_sphere() {
|
||||
|
||||
EX int hemi_side = 0;
|
||||
|
||||
EX hookset<bool()> hooks_draw_main;
|
||||
|
||||
EX void draw_main() {
|
||||
DEBBI(debug_graph, ("draw_main"));
|
||||
|
||||
if(callhandlers(false, hooks_draw_main)) return;
|
||||
|
||||
if(pconf.back_and_front == 1 && vid.consider_shader_projection) {
|
||||
dynamicval<int> pa(pconf.back_and_front);
|
||||
|
||||
Reference in New Issue
Block a user