X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Frenders%2Fopengl%2Fr_map.pas;h=812fd85cd59c5c7f114309e002d690208f5daf77;hb=6148346280a8004f75dfb87fb4f77f0753365e69;hp=f010f29fff452175c44c0c14922ad7c9de88f642;hpb=b874151ca697386d74cfbd29e1c21bca1b4825e2;p=d2df-sdl.git diff --git a/src/game/renders/opengl/r_map.pas b/src/game/renders/opengl/r_map.pas index f010f29..812fd85 100644 --- a/src/game/renders/opengl/r_map.pas +++ b/src/game/renders/opengl/r_map.pas @@ -1177,20 +1177,6 @@ implementation end; {$ENDIF} - procedure r_Map_CalcAspect (ow, oh, nw, nh: LongInt; horizontal: Boolean; out ww, hh: LongInt); - begin - if horizontal then - begin - ww := nw; - hh := nw * oh div ow; - end - else - begin - ww := nh * ow div oh; - hh := nh; - end; - end; - procedure r_Map_CalcSkyParallax (cx, cy, vw, vh, sw, sh, mw, mh: LongInt; out x, y, w, h: LongInt); const factor = 120; (* size ratio between view and sky (120%) *) @@ -1200,7 +1186,7 @@ implementation begin msw := vw * factor div 100; msh := vh * factor div 100; - r_Map_CalcAspect(sw, sh, msw, msh, (sw / sh) <= (msw / msh), w, h); + r_Common_CalcAspect(sw, sh, msw, msh, (sw / sh) <= (msw / msh), w, h); (* calc x parallax or sky center on speed limit *) mvw := MAX(1, mw - vw);