- Backend update from GZDoom

* IQM enhancements
* config storage in Users
* moving of savegame filename generation to the backend
This commit is contained in:
Christoph Oelckers 2022-11-06 11:46:26 +01:00
parent b4a49ea228
commit 41fc5660e5
25 changed files with 454 additions and 315 deletions

View file

@ -170,6 +170,8 @@ void DFrameBuffer::SetViewportRects(IntRect *bounds)
mSceneViewport = *bounds;
mScreenViewport = *bounds;
mOutputLetterbox = *bounds;
mGameScreenWidth = mScreenViewport.width;
mGameScreenHeight = mScreenViewport.height;
return;
}
@ -216,6 +218,9 @@ void DFrameBuffer::SetViewportRects(IntRect *bounds)
mSceneViewport.width = (int)round(mSceneViewport.width * scaleX);
mSceneViewport.height = (int)round(mSceneViewport.height * scaleY);
}
mGameScreenWidth = GetWidth();
mGameScreenHeight = GetHeight();
}
//===========================================================================
@ -226,12 +231,12 @@ void DFrameBuffer::SetViewportRects(IntRect *bounds)
int DFrameBuffer::ScreenToWindowX(int x)
{
return mScreenViewport.left + (int)round(x * mScreenViewport.width / (float)GetWidth());
return mScreenViewport.left + (int)round(x * mScreenViewport.width / (float)mGameScreenWidth);
}
int DFrameBuffer::ScreenToWindowY(int y)
{
return mScreenViewport.top + mScreenViewport.height - (int)round(y * mScreenViewport.height / (float)GetHeight());
return mScreenViewport.top + mScreenViewport.height - (int)round(y * mScreenViewport.height / (float)mGameScreenHeight);
}
void DFrameBuffer::ScaleCoordsFromWindow(int16_t &x, int16_t &y)