Skip to content

Commit

Permalink
Idtech5 Widescreen system
Browse files Browse the repository at this point in the history
Some bits are from RBDOOM3BFG
  • Loading branch information
FriskTheFallenHuman committed Aug 7, 2024
1 parent ef01358 commit ad463f9
Show file tree
Hide file tree
Showing 16 changed files with 112 additions and 67 deletions.
20 changes: 8 additions & 12 deletions neo/Prey/game_playerview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const int IMPULSE_DELAY = 150;
hhPlayerView::hhPlayerView() {
// HUMANHEAD pdm: we don't use the tunnel vision or armor
bLetterBox = false;
letterboxMaterial = declManager->FindMaterial( "_black" );
dirDmgLeftMaterial = declManager->FindMaterial( "textures/interface/directionalDamageLeft" );
dirDmgFrontMaterial = declManager->FindMaterial( "textures/interface/directionalDamageFront" );
spiritMaterial = NULL;
Expand Down Expand Up @@ -66,7 +65,6 @@ void hhPlayerView::Save(idSaveGame *savefile) const {
savefile->WriteInt( voFinishTime );
savefile->WriteInt( voTotalTime );
savefile->WriteInt( voRequiresScratchBuffer );
savefile->WriteMaterial( letterboxMaterial );
savefile->WriteMaterial( dirDmgLeftMaterial );
savefile->WriteMaterial( dirDmgFrontMaterial );
savefile->WriteMaterial( spiritMaterial );
Expand All @@ -90,7 +88,6 @@ void hhPlayerView::Restore( idRestoreGame *savefile ) {
savefile->ReadInt( voFinishTime );
savefile->ReadInt( voTotalTime );
savefile->ReadInt( voRequiresScratchBuffer );
savefile->ReadMaterial( letterboxMaterial );
savefile->ReadMaterial( dirDmgLeftMaterial );
savefile->ReadMaterial( dirDmgFrontMaterial );
savefile->ReadMaterial( spiritMaterial );
Expand Down Expand Up @@ -561,7 +558,7 @@ void hhPlayerView::SingleView( idUserInterface *hud, const renderView_t *view )
//HUMANHEAD: aob
if( viewOverlayMaterial ) {
renderSystem->SetColor4( viewOverlayColor[0], viewOverlayColor[1], viewOverlayColor[2], viewOverlayColor[3] );
renderSystem->DrawStretchPic(0, 0, 640, 480, 0, 1, 1, 0, viewOverlayMaterial);
renderSystem->DrawStretchPic(0, 0, renderSystem->GetVirtualWidth(), renderSystem->GetVirtualHeight(), 0, 1, 1, 0, viewOverlayMaterial);
}
//HUMANHEAD END

Expand All @@ -571,7 +568,7 @@ void hhPlayerView::SingleView( idUserInterface *hud, const renderView_t *view )
hurtValue = player->health;

renderSystem->SetColor4( hurtValue/25.0f, 1, 1, 1 );
renderSystem->DrawStretchPic(0, 0, 640, 480, 0, 1, 1, 0, hurtMaterial);
renderSystem->DrawStretchPic(0, 0, renderSystem->GetVirtualWidth(), renderSystem->GetVirtualHeight(), 0, 1, 1, 0, hurtMaterial);
}
}

Expand All @@ -588,7 +585,7 @@ void hhPlayerView::SingleView( idUserInterface *hud, const renderView_t *view )
g_testPostProcess.SetString( "" );
} else {
renderSystem->SetColor4( 1.0f, 1.0f, 1.0f, 1.0f );
renderSystem->DrawStretchPic( 0.0f, 0.0f, 640.0f, 480.0f, 0.0f, 0.0f, 1.0f, 1.0f, mtr );
renderSystem->DrawStretchPic( 0.0f, 0.0f, (float)renderSystem->GetVirtualWidth(), (float)renderSystem->GetVirtualHeight(), 0.0f, 0.0f, 1.0f, 1.0f, mtr );
}
}
}
Expand Down Expand Up @@ -651,7 +648,7 @@ void hhPlayerView::MotionBlurVision(idUserInterface *hud, const renderView_t *vi

#define CLIP(a) ((a)<0?0:(a)>1?1:(a))
renderSystem->SetColor4( 1,1,1, index==0 ? 1.0f : 0.2f );
renderSystem->DrawStretchPic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT,
renderSystem->DrawStretchPic( 0, 0, renderSystem->GetVirtualWidth(), renderSystem->GetVirtualHeight(),
CLIP(xshift), CLIP(1+yshift), CLIP(1+xshift), CLIP(yshift), scratchMaterial ); // clipped
}
}
Expand All @@ -676,7 +673,7 @@ void hhPlayerView::SpiritVision( idUserInterface *hud, const renderView_t *view
}

renderSystem->SetColor4( 1, 1, 1, 1 );
renderSystem->DrawStretchPic(0, 0, 640, 480, 0, 1, 1, 0, spiritMaterial );
renderSystem->DrawStretchPic(0, 0, renderSystem->GetVirtualWidth(), renderSystem->GetVirtualHeight(), 0, 1, 1, 0, spiritMaterial );

voTotalTime = oldTime;
viewOverlayMaterial = oldMaterial;
Expand All @@ -688,9 +685,8 @@ void hhPlayerView::SpiritVision( idUserInterface *hud, const renderView_t *view
//------------------------------------------------------
void hhPlayerView::ApplyLetterBox(const renderView_t *view) {
if (bLetterBox) {
renderSystem->SetColor4( 1.0f, 1.0f, 1.0f, 1.0f );
renderSystem->DrawStretchPic(0, 0, 640, LETTERBOX_HEIGHT_TOP, 0, 0, 1, 1, letterboxMaterial);
renderSystem->DrawStretchPic(0, 480-LETTERBOX_HEIGHT_BOTTOM, 640, LETTERBOX_HEIGHT_BOTTOM, 0, 0, 1, 1, letterboxMaterial);
renderSystem->DrawFilled( idVec4( 0.0f, 0.0f, 0.0f, 1.0f ), 0, 0, renderSystem->GetVirtualWidth(), LETTERBOX_HEIGHT_TOP + 25 );
renderSystem->DrawFilled( idVec4(0.0f, 0.0f, 0.0f, 1.0f), 0, ( renderSystem->GetVirtualHeight() - LETTERBOX_HEIGHT_BOTTOM ) - 25, renderSystem->GetVirtualWidth(), LETTERBOX_HEIGHT_BOTTOM + 25 );
}
}

Expand Down Expand Up @@ -745,4 +741,4 @@ void hhPlayerView::RenderPlayerView( idUserInterface *hud ) {
renderSystem->SetColor4( 1.0f, 1.0f, 1.0f, 1.0f );
renderSystem->DrawStretchPic( 10.0f, 380.0f, 64.0f, 64.0f, 0.0f, 0.0f, 1.0f, 1.0f, lagoMaterial );
}
}
}
1 change: 0 additions & 1 deletion neo/Prey/game_playerview.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class hhPlayerView : public idPlayerView {
int voFinishTime; // HUMANHEAD cjr: Used to set the time that the view overlay stays on
int voTotalTime; // HUMANHEAD cjr: Used to set the time that the view overlay stays on
int voRequiresScratchBuffer;// HUMANHEAD cjr: requires the screen rendered to the scratch buffer
const idMaterial *letterboxMaterial; // HUMANHEAD pdm
const idMaterial *dirDmgLeftMaterial; // HUMANHEAD pdm
const idMaterial *dirDmgFrontMaterial; // HUMANHEAD pdm
const idMaterial *spiritMaterial; // HUMANHEAD cjr
Expand Down
4 changes: 2 additions & 2 deletions neo/framework/Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1089,9 +1089,9 @@ void idCommonLocal::PrintLoadingMessage( const char *msg ) {
return;
}
renderSystem->BeginFrame( renderSystem->GetScreenWidth(), renderSystem->GetScreenHeight() );
renderSystem->DrawStretchPic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0, 1, 1, declManager->FindMaterial( "splashScreen" ) );
renderSystem->DrawStretchPic( 0, 0, renderSystem->GetVirtualWidth(), renderSystem->GetVirtualHeight(), 0, 0, 1, 1, declManager->FindMaterial( "splashScreen" ) );
int len = strlen( msg );
renderSystem->DrawSmallStringExt( ( 640 - len * SMALLCHAR_WIDTH ) / 2, 410, msg, idVec4( 0.0f, 0.81f, 0.94f, 1.0f ), true );
renderSystem->DrawBigStringExt( ( renderSystem->GetVirtualWidth() - len * BIGCHAR_WIDTH ) / 2, renderSystem->GetVirtualHeight() - 80, msg, idVec4( 0.0f, 0.81f, 0.94f, 1.0f ), true );
renderSystem->EndFrame( NULL, NULL );
}

Expand Down
8 changes: 4 additions & 4 deletions neo/framework/Common_frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void idSessionLocal::DrawWipeModel() {

float fade = ( float )( latchedTic - wipeStartTic ) / ( wipeStopTic - wipeStartTic );
renderSystem->SetColor4( 1, 1, 1, fade );
renderSystem->DrawStretchPic( 0, 0, 640, 480, 0, 0, 1, 1, wipeMaterial );
renderSystem->DrawStretchPic( 0, 0, renderSystem->GetVirtualWidth(), renderSystem->GetVirtualHeight(), 0, 0, 1, 1, wipeMaterial );
}

/*
Expand Down Expand Up @@ -144,7 +144,7 @@ void idSessionLocal::Draw() {
// clear the background, in case the tested gui is transparent
// NOTE that you can't use this for aviGame recording, it will tick at real com_frameTime between screenshots..
renderSystem->SetColor( colorBlack );
renderSystem->DrawStretchPic( 0, 0, 640, 480, 0, 0, 1, 1, declManager->FindMaterial( "_white" ) );
renderSystem->DrawStretchPic( 0, 0, renderSystem->GetVirtualWidth(), renderSystem->GetVirtualHeight(), 0, 0, 1, 1, declManager->FindMaterial( "_white" ) );
guiTest->Redraw( com_frameTime );
} else if ( guiActive && !guiActive->State().GetBool( "gameDraw" ) ) {

Expand Down Expand Up @@ -180,7 +180,7 @@ void idSessionLocal::Draw() {
}
if ( !gameDraw ) {
renderSystem->SetColor( colorBlack );
renderSystem->DrawStretchPic( 0, 0, 640, 480, 0, 0, 1, 1, declManager->FindMaterial( "_white" ) );
renderSystem->DrawStretchPic( 0, 0, renderSystem->GetVirtualWidth(), renderSystem->GetVirtualHeight(), 0, 0, 1, 1, declManager->FindMaterial( "_white" ) );
}

// save off the 2D drawing from the game
Expand All @@ -201,7 +201,7 @@ void idSessionLocal::Draw() {
StartMenu();
}
renderSystem->SetColor4( 0, 0, 0, 1 );
renderSystem->DrawStretchPic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0, 1, 1, declManager->FindMaterial( "_white" ) );
renderSystem->DrawStretchPic( 0, 0, renderSystem->GetVirtualWidth(), renderSystem->GetVirtualHeight(), 0, 0, 1, 1, declManager->FindMaterial( "_white" ) );
}
#else
// draw the console full screen - this should only ever happen in developer builds
Expand Down
2 changes: 1 addition & 1 deletion neo/framework/Common_load.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void idSessionLocal::StartWipe( const char *_wipeMaterial, bool hold ) {
console->Close();

// render the current screen into a texture for the wipe model
renderSystem->CropRenderSize( 640, 480, true );
renderSystem->CropRenderSize( renderSystem->GetVirtualWidth(), renderSystem->GetVirtualHeight(), true );

Draw();

Expand Down
44 changes: 35 additions & 9 deletions neo/framework/Console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ class idConsoleLocal : public idConsole {
void Clear();

private:
void Resize( void );

void KeyDownEvent( int key );

void Linefeed();
Expand Down Expand Up @@ -137,6 +139,9 @@ class idConsoleLocal : public idConsole {
idList< overlayText_t > overlayText;
idList< idDebugGraph *> debugGraphs;

int lastVirtualScreenWidth;
int lastVirtualScreenHeight;

static idCVar con_speed;
static idCVar con_notifyTime;
static idCVar con_noPrint;
Expand Down Expand Up @@ -281,9 +286,9 @@ void idConsoleLocal::Init() {
keyCatching = false;

LOCALSAFE_LEFT = 32;
LOCALSAFE_RIGHT = 608;
LOCALSAFE_RIGHT = SCREEN_WIDTH - LOCALSAFE_LEFT;
LOCALSAFE_TOP = 24;
LOCALSAFE_BOTTOM = 456;
LOCALSAFE_BOTTOM = SCREEN_HEIGHT - LOCALSAFE_TOP;
LOCALSAFE_WIDTH = LOCALSAFE_RIGHT - LOCALSAFE_LEFT;
LOCALSAFE_HEIGHT = LOCALSAFE_BOTTOM - LOCALSAFE_TOP;

Expand Down Expand Up @@ -423,6 +428,25 @@ void idConsoleLocal::Dump( const char *fileName ) {
fileSystem->CloseFile( f );
}

/*
==============
idConsoleLocal::Resize
==============
*/
void idConsoleLocal::Resize()
{
if ( renderSystem->GetVirtualWidth() == lastVirtualScreenWidth && renderSystem->GetVirtualHeight() == lastVirtualScreenHeight ) {
return;
}

lastVirtualScreenWidth = renderSystem->GetVirtualWidth();
lastVirtualScreenHeight = renderSystem->GetVirtualHeight();
LOCALSAFE_RIGHT = renderSystem->GetVirtualWidth() - LOCALSAFE_LEFT;
LOCALSAFE_BOTTOM = renderSystem->GetVirtualHeight() - LOCALSAFE_TOP;
LOCALSAFE_WIDTH = LOCALSAFE_RIGHT - LOCALSAFE_LEFT;
LOCALSAFE_HEIGHT = LOCALSAFE_BOTTOM - LOCALSAFE_TOP;
}

/*
================
idConsoleLocal::PageUp
Expand Down Expand Up @@ -896,7 +920,7 @@ void idConsoleLocal::DrawInput() {

renderSystem->DrawSmallChar( LOCALSAFE_LEFT + 1 * SMALLCHAR_WIDTH, y, ']' );

consoleField.Draw( LOCALSAFE_LEFT + 2 * SMALLCHAR_WIDTH, y, SCREEN_WIDTH - 3 * SMALLCHAR_WIDTH, true );
consoleField.Draw( LOCALSAFE_LEFT + 2 * SMALLCHAR_WIDTH, y, renderSystem->GetVirtualWidth() - 3 * SMALLCHAR_WIDTH, true );
}


Expand Down Expand Up @@ -969,24 +993,24 @@ void idConsoleLocal::DrawSolidConsole( float frac ) {
int lines;
int currentColor;

lines = idMath::Ftoi( SCREEN_HEIGHT * frac );
lines = idMath::Ftoi( renderSystem->GetVirtualHeight() * frac );
if ( lines <= 0 ) {
return;
}

if ( lines > SCREEN_HEIGHT ) {
lines = SCREEN_HEIGHT;
if ( lines > renderSystem->GetVirtualHeight() ) {
lines = renderSystem->GetVirtualHeight();
}

// draw the background
y = frac * SCREEN_HEIGHT - 2;
y = frac * renderSystem->GetVirtualHeight() - 2;
if ( y < 1.0f ) {
y = 0.0f;
} else {
renderSystem->DrawFilled( idVec4( 0.0f, 0.0f, 0.0f, 0.75f ), 0, 0, SCREEN_WIDTH, y );
renderSystem->DrawFilled( idVec4( 0.0f, 0.0f, 0.0f, 0.75f ), 0, 0, renderSystem->GetVirtualWidth(), y );
}

renderSystem->DrawFilled( colorCyan, 0, y, SCREEN_WIDTH, 2 );
renderSystem->DrawFilled( colorCyan, 0, y, renderSystem->GetVirtualWidth(), 2 );

// draw the version number

Expand Down Expand Up @@ -1067,6 +1091,8 @@ ForceFullScreen is used by the editor
==============
*/
void idConsoleLocal::Draw( bool forceFullScreen ) {
Resize();

if ( forceFullScreen ) {
// if we are forced full screen because of a disconnect,
// we want the console closed when we go back to a session state
Expand Down
20 changes: 10 additions & 10 deletions neo/game/PlayerView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ void idPlayerView::SingleView( idUserInterface *hud, const renderView_t *view )
if ( armorPulse > 0.0f && armorPulse < 1.0f ) {
renderSystem->SetColor4( 1, 1, 1, 1.0 - armorPulse );
renderSystem->DrawStretchPic( 0, 0, 640, 480, 0, 0, 1, 1, armorMaterial );
renderSystem->DrawStretchPic( 0, 0, renderSystem->GetVirtualWidth(), renderSystem->GetVirtualHeight(), 0, 0, 1, 1, armorMaterial );
}
Expand All @@ -505,7 +505,7 @@ void idPlayerView::SingleView( idUserInterface *hud, const renderView_t *view )
if ( alpha < 1.0f ) {
renderSystem->SetColor4( ( player->health <= 0.0f ) ? MS2SEC( gameLocal.time ) : lastDamageTime, 1.0f, 1.0f, ( player->health <= 0.0f ) ? 0.0f : alpha );
renderSystem->DrawStretchPic( 0.0f, 0.0f, 640.0f, 480.0f, 0.0f, 0.0f, 1.0f, 1.0f, tunnelMaterial );
renderSystem->DrawStretchPic( 0.0f, 0.0f, (float)renderSystem->GetVirtualWidth(), (float)renderSystem->GetVirtualHeight(), 0.0f, 0.0f, 1.0f, 1.0f, tunnelMaterial );
}
if ( player->PowerUpActive(BERSERK) ) {
Expand All @@ -514,13 +514,13 @@ void idPlayerView::SingleView( idUserInterface *hud, const renderView_t *view )
// start fading if within 10 seconds of going away
alpha = (berserkTime < 10000) ? (float)berserkTime / 10000 : 1.0f;
renderSystem->SetColor4( 1.0f, 1.0f, 1.0f, alpha );
renderSystem->DrawStretchPic( 0.0f, 0.0f, 640.0f, 480.0f, 0.0f, 0.0f, 1.0f, 1.0f, berserkMaterial );
renderSystem->DrawStretchPic( 0.0f, 0.0f, (float)renderSystem->GetVirtualWidth(), (float)renderSystem->GetVirtualHeight(), 0.0f, 0.0f, 1.0f, 1.0f, berserkMaterial );
}
}
if ( bfgVision ) {
renderSystem->SetColor4( 1.0f, 1.0f, 1.0f, 1.0f );
renderSystem->DrawStretchPic( 0.0f, 0.0f, 640.0f, 480.0f, 0.0f, 0.0f, 1.0f, 1.0f, bfgMaterial );
renderSystem->DrawStretchPic( 0.0f, 0.0f, (float)renderSystem->GetVirtualWidth(), (float)renderSystem->GetVirtualHeight(), 0.0f, 0.0f, 1.0f, 1.0f, bfgMaterial );
}
}
Expand All @@ -532,7 +532,7 @@ void idPlayerView::SingleView( idUserInterface *hud, const renderView_t *view )
g_testPostProcess.SetString( "" );
} else {
renderSystem->SetColor4( 1.0f, 1.0f, 1.0f, 1.0f );
renderSystem->DrawStretchPic( 0.0f, 0.0f, 640.0f, 480.0f, 0.0f, 0.0f, 1.0f, 1.0f, mtr );
renderSystem->DrawStretchPic( 0.0f, 0.0f, (float)renderSystem->GetVirtualWidth(), (float)renderSystem->GetVirtualHeight(), 0.0f, 0.0f, 1.0f, 1.0f, mtr );
}
}
*/
Expand Down Expand Up @@ -573,9 +573,9 @@ void idPlayerView::DoubleVision( idUserInterface *hud, const renderView_t *view,
}
renderSystem->SetColor4( color.x, color.y, color.z, 1.0f );
renderSystem->DrawStretchPic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, shift, 1, 1, 0, dvMaterial );
renderSystem->DrawStretchPic( 0, 0, (float)renderSystem->GetVirtualWidth(), (float)renderSystem->GetVirtualHeight(), shift, 1, 1, 0, dvMaterial );
renderSystem->SetColor4( color.x, color.y, color.z, 0.5f );
renderSystem->DrawStretchPic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 1, 1-shift, 0, dvMaterial );
renderSystem->DrawStretchPic( 0, 0, (float)renderSystem->GetVirtualWidth(), (float)renderSystem->GetVirtualHeight(), 0, 1, 1-shift, 0, dvMaterial );
}
*/

Expand All @@ -593,7 +593,7 @@ void idPlayerView::BerserkVision( idUserInterface *hud, const renderView_t *view
renderSystem->UnCrop();
RENDER_DEMO_VIEWRENDER_END(); //HUMANHEAD rww
renderSystem->SetColor4( 1.0f, 1.0f, 1.0f, 1.0f );
renderSystem->DrawStretchPic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 1, 1, 0, dvMaterial );
renderSystem->DrawStretchPic( 0, 0, (float)renderSystem->GetVirtualWidth(), (float)renderSystem->GetVirtualHeight(), 0, 1, 1, 0, dvMaterial );
}
*/

Expand Down Expand Up @@ -668,7 +668,7 @@ void idPlayerView::ScreenFade() {

if ( fadeColor[ 3 ] != 0.0f ) {
renderSystem->SetColor4( fadeColor[ 0 ], fadeColor[ 1 ], fadeColor[ 2 ], fadeColor[ 3 ] );
renderSystem->DrawStretchPic( 0, 0, 640, 480, 0, 0, 1, 1, declManager->FindMaterial( "_white" ) );
renderSystem->DrawStretchPic( 0, 0, renderSystem->GetVirtualWidth(), renderSystem->GetVirtualHeight(), 0, 0, 1, 1, declManager->FindMaterial( "_white" ) );
}
}

Expand All @@ -692,7 +692,7 @@ void idPlayerView::InfluenceVision( idUserInterface *hud, const renderView_t *vi
SingleView( hud, view );
renderSystem->CaptureRenderToImage( "_currentRender" );
renderSystem->SetColor4( 1.0f, 1.0f, 1.0f, pct );
renderSystem->DrawStretchPic( 0.0f, 0.0f, 640.0f, 480.0f, 0.0f, 0.0f, 1.0f, 1.0f, player->GetInfluenceMaterial() );
renderSystem->DrawStretchPic( 0.0f, 0.0f, (float)renderSystem->GetVirtualWidth(), (float)renderSystem->GetVirtualHeight(), 0.0f, 0.0f, 1.0f, 1.0f, player->GetInfluenceMaterial() );
} else if ( player->GetInfluenceEntity() == NULL ) {
SingleView( hud, view );
return;
Expand Down
6 changes: 3 additions & 3 deletions neo/renderer/DeviceContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ If you have questions concerning this license or the applicable additional terms
#include "precompiled.h"
#pragma hdrstop

#include "../renderer/GuiModel.h"
#include "GuiModel.h"

idVec4 idDeviceContext::colorPurple;
idVec4 idDeviceContext::colorOrange;
Expand Down Expand Up @@ -270,15 +270,15 @@ void idDeviceContext::DrawWinding( idWinding & w, const idMaterial * mat ) {
w.ClipInPlace( p );

p.Normal().Set( -1.0f, 0.0f, 0.0f );
p.SetDist( -SCREEN_WIDTH );
p.SetDist( -VIRTUAL_WIDTH );
w.ClipInPlace( p );

p.Normal().Set( 0.0f, 1.0f, 0.0f );
p.SetDist( 0.0f );
w.ClipInPlace( p );

p.Normal().Set( 0.0f, -1.0f, 0.0f );
p.SetDist( -SCREEN_HEIGHT );
p.SetDist( -VIRTUAL_HEIGHT );
w.ClipInPlace( p );

if ( w.GetNumPoints() < 3 ) {
Expand Down
4 changes: 2 additions & 2 deletions neo/renderer/DeviceContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ If you have questions concerning this license or the applicable additional terms
// device context support for gui stuff
//

const int VIRTUAL_WIDTH = 640;
const int VIRTUAL_HEIGHT = 480;
#define VIRTUAL_WIDTH renderSystem->GetVirtualWidth()
#define VIRTUAL_HEIGHT renderSystem->GetVirtualHeight()
const int BLINK_DIVISOR = 200;

class idDeviceContext {
Expand Down
Loading

0 comments on commit ad463f9

Please sign in to comment.