mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-25 16:37:00 +00:00
hooks_preoptimize and hooks_postoptimize
This commit is contained in:
parent
41779cd92c
commit
2463e0e163
@ -1965,6 +1965,8 @@ EX void centerpc(ld aspd) {
|
|||||||
|
|
||||||
EX transmatrix oView;
|
EX transmatrix oView;
|
||||||
|
|
||||||
|
EX purehookset hooks_preoptimize, hooks_postoptimize;
|
||||||
|
|
||||||
EX void optimizeview() {
|
EX void optimizeview() {
|
||||||
|
|
||||||
if(subscreens::split(optimizeview)) return;
|
if(subscreens::split(optimizeview)) return;
|
||||||
@ -1972,6 +1974,7 @@ EX void optimizeview() {
|
|||||||
|
|
||||||
cell *c = centerover;
|
cell *c = centerover;
|
||||||
transmatrix iView = view_inverse(View);
|
transmatrix iView = view_inverse(View);
|
||||||
|
callhooks(hooks_preoptimize);
|
||||||
virtualRebase(centerover, iView);
|
virtualRebase(centerover, iView);
|
||||||
if(c != centerover && (sphere || sl2)) {
|
if(c != centerover && (sphere || sl2)) {
|
||||||
transmatrix T = currentmap->relative_matrix(centerover, c, C0);
|
transmatrix T = currentmap->relative_matrix(centerover, c, C0);
|
||||||
@ -1981,6 +1984,7 @@ EX void optimizeview() {
|
|||||||
|
|
||||||
View = iview_inverse(iView);
|
View = iview_inverse(iView);
|
||||||
fixmatrix(View);
|
fixmatrix(View);
|
||||||
|
callhooks(hooks_postoptimize);
|
||||||
|
|
||||||
if(is_boundary(centerover))
|
if(is_boundary(centerover))
|
||||||
centerover = c, View = oView;
|
centerover = c, View = oView;
|
||||||
|
Loading…
Reference in New Issue
Block a user