Browse Source

Display cursors pixel-by-pixel rather than scaling them to 34.56x34.56 pixels.

This fixes the blurring caused by scaling up the 32x32 px cursor bitmaps.
cursors
Christian Walther 13 years ago
parent
commit
ff435650b8
  1. 7
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.cpp
  2. 1
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plPipeline/plPlates.h

7
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.cpp

@ -39,14 +39,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "../plPipeline/plPlates.h"
#include "../plPipeline/plDebugText.h"
#include "../plGImage/plMipmap.h"
#include "hsWindows.h"
#include "../NucleusLib/inc/plPipeline.h"
// base size of the cursor
#define CURSOR_SIZE_X 0.0675f
#define CURSOR_SIZE_Y 0.09f
// The resolution that uses the base size of the cursor.
// All other resolutions will scale the cursor size to keep the same physical size.
#define BASE_WIDTH 1024
@ -454,7 +451,7 @@ void plMouseDevice::IUpdateCursorSize()
if(fCursor)
{
// set the size of the cursor based on resolution.
fCursor->SetSize( CURSOR_SIZE_X * BASE_WIDTH / fWidth, CURSOR_SIZE_Y * BASE_HEIGHT / fHeight );
fCursor->SetSize( 2*fCursor->GetMipmap()->GetWidth()/fWidth, 2*fCursor->GetMipmap()->GetHeight()/fHeight );
}
}

1
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plPipeline/plPlates.h

@ -110,6 +110,7 @@ class plPlate
hsMatrix44 &GetTransform( void ) { return fXformMatrix; }
const char *GetTitle( void ) { return fTitle; }
UInt32 GetFlags( void ) { return fFlags; }
const plMipmap *GetMipmap( void ) { return fMipmap; }
void SetVisible( hsBool vis ) { if( vis ) fFlags |= kFlagVisible; else fFlags &= ~kFlagVisible; }
hsBool IsVisible( void );

Loading…
Cancel
Save