- Increase MAXWIDTH and MAXHEIGHT defines to support supersampled 5K monitors

This commit is contained in:
Magnus Norddahl 2017-07-23 22:04:00 +02:00
parent 1a4cf16168
commit bf4d7234e1
4 changed files with 7 additions and 7 deletions

View File

@ -145,7 +145,7 @@ int ViewportScaledWidth(int width)
case 1: return 320;
case 2: return 640;
case 3: return (int)roundf(width * 0.5f);
case 4: return (int)(width * 2.0f);
case 4: return width * 2;
}
}
@ -158,7 +158,7 @@ int ViewportScaledHeight(int height)
case 1: return 200;
case 2: return 400;
case 3: return (int)roundf(height * 0.5f);
case 4: return (int)(height * 2.0f);
case 4: return height * 2;
}
}

View File

@ -52,8 +52,8 @@ struct seg_t;
struct sector_t;
class AActor;
#define MAXWIDTH 5760
#define MAXHEIGHT 3600
#define MAXWIDTH 12000
#define MAXHEIGHT 5000
const uint16_t NO_INDEX = 0xffffu;
const uint32_t NO_SIDE = 0xffffffffu;

View File

@ -113,7 +113,7 @@ namespace swrenderer
//walltop.Project(Thread->Viewport.get(), mFrontSector->ceilingplane, &WallC, mLineSegment, Thread->Portal->MirrorFlags & RF_XFLIP);
wallbottom.Project(Thread->Viewport.get(), mFrontSector->floorplane, &WallC, mLineSegment, Thread->Portal->MirrorFlags & RF_XFLIP);
memcpy(walltop.ScreenY, wallbottom.ScreenY, sizeof(short) * MAXWIDTH);
memcpy(walltop.ScreenY, wallbottom.ScreenY, sizeof(short) * Thread->Viewport->RenderTarget->GetWidth());
}
ClipSegmentTopBottom(x1, x2);

View File

@ -142,8 +142,8 @@ namespace swrenderer
curr = (ClipStack*)M_Malloc(sizeof(ClipStack));
curr->next = 0;
memcpy(curr->floorclip, Thread->OpaquePass->floorclip, sizeof(short) * MAXWIDTH);
memcpy(curr->ceilingclip, Thread->OpaquePass->ceilingclip, sizeof(short) * MAXWIDTH);
memcpy(curr->floorclip, Thread->OpaquePass->floorclip, sizeof(short) * Thread->Viewport->RenderTarget->GetWidth());
memcpy(curr->ceilingclip, Thread->OpaquePass->ceilingclip, sizeof(short) * Thread->Viewport->RenderTarget->GetWidth());
curr->ffloor = fakeFloor;
assert(fakeFloor->floorclip == nullptr);
assert(fakeFloor->ceilingclip == nullptr);