mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-11 18:00:34 +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 purehookset hooks_preoptimize, hooks_postoptimize;
|
||||
|
||||
EX void optimizeview() {
|
||||
|
||||
if(subscreens::split(optimizeview)) return;
|
||||
@ -1972,6 +1974,7 @@ EX void optimizeview() {
|
||||
|
||||
cell *c = centerover;
|
||||
transmatrix iView = view_inverse(View);
|
||||
callhooks(hooks_preoptimize);
|
||||
virtualRebase(centerover, iView);
|
||||
if(c != centerover && (sphere || sl2)) {
|
||||
transmatrix T = currentmap->relative_matrix(centerover, c, C0);
|
||||
@ -1981,6 +1984,7 @@ EX void optimizeview() {
|
||||
|
||||
View = iview_inverse(iView);
|
||||
fixmatrix(View);
|
||||
callhooks(hooks_postoptimize);
|
||||
|
||||
if(is_boundary(centerover))
|
||||
centerover = c, View = oView;
|
||||
|
Loading…
Reference in New Issue
Block a user