some more hooks, to add extra models

This commit is contained in:
Zeno Rogue
2026-05-21 11:20:40 +02:00
parent 4596fc0e50
commit c42211215f
2 changed files with 18 additions and 1 deletions
+11
View File
@@ -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);