X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_game.pas;h=e3d9b7bb2bed0c13288230a0e9be989c17656068;hb=c7a5223f1e2520ab13b480b937af1e208201de15;hp=b0e9e01feb36fd0bf5cbfb7e46c6c67b5134d917;hpb=dffafd305d0df029f317cc92c1968ba0065c0cd8;p=d2df-sdl.git diff --git a/src/game/g_game.pas b/src/game/g_game.pas index b0e9e01..e3d9b7b 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -3649,7 +3649,7 @@ begin p.Obj.lerp(gLerpFactor, fX, fY); px := fX + PLAYER_RECT_CX; - py := fY + PLAYER_RECT_CY+p.Obj.slopeUpLeft; + py := fY + PLAYER_RECT_CY+nlerp(p.SlopeOld, p.Obj.slopeUpLeft, gLerpFactor); if (g_dbg_scale = 1.0) and (not g_dbg_ignore_bounds) then begin @@ -3838,6 +3838,9 @@ begin FPSTime := Time; end; + e_SetRendertarget(True); + e_SetViewPort(0, 0, gScreenWidth, gScreenHeight); + if gGameOn or (gState = STATE_FOLD) then begin if (gPlayer1 <> nil) and (gPlayer2 <> nil) then @@ -4168,10 +4171,20 @@ begin if gGameOn then drawProfilers(); + // TODO: draw this after the FBO and remap mouse click coordinates + {$IFDEF ENABLE_HOLMES} g_Holmes_DrawUI(); {$ENDIF} + // blit framebuffer to screen + + e_SetRendertarget(False); + e_SetViewPort(0, 0, gWinSizeX, gWinSizeY); + e_BlitFramebuffer(gWinSizeX, gWinSizeY); + + // draw the overlay stuff on top of it + g_Touch_Draw; end; @@ -7243,6 +7256,18 @@ begin e_LogWriteln('resolution not changed'); sys_EnableVSync(gVSync); end; + 'r_maxfps': + begin + if Length(p) = 2 then + begin + gMaxFPS := StrToIntDef(p[1], gMaxFPS); + if gMaxFPS > 0 then + gFrameTime := 1000 div gMaxFPS + else + gFrameTime := 0; + end; + e_LogWritefln('r_maxfps %d', [gMaxFPS]); + end; 'g_language': begin if Length(p) = 2 then