mirror of
https://github.com/ZDoom/Raze.git
synced 2025-06-02 02:01:31 +00:00
- Backend update from GZDoom
* IQM enhancements * config storage in Users * moving of savegame filename generation to the backend
This commit is contained in:
parent
b4a49ea228
commit
41fc5660e5
25 changed files with 454 additions and 315 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue