Platform_Win32_Screen_Technology.h
Go to the documentation of this file.00001 00011 #ifndef __Platform_Win32_Screen_Technology_H__ 00012 #define __Platform_Win32_Screen_Technology_H__ 00013 00014 // Includes 00015 00016 // Forward declares 00017 00018 // Platform_Win32_Screen_Technology 00019 class Platform_Win32_Screen_Technology 00020 { 00021 00022 public: 00023 virtual ~Platform_Win32_Screen_Technology() { }; 00024 00025 virtual bool Setup() = 0; 00026 00027 virtual bool Present( 00028 unsigned short* bitmapData, 00029 int bitmapWidth, 00030 int bitmapHeight, 00031 unsigned short modulate, 00032 unsigned short backgroundColor 00033 ) = 0; 00034 00035 virtual void SetInterpolationMode(bool enabled) = 0; 00036 00037 00038 virtual void TransformCursorCoordinates(float& x, float& y) = 0; 00039 00040 00041 inline unsigned short RGBModulate16( 00042 unsigned short color1, 00043 unsigned short color2 00044 ) 00045 { 00046 return 00047 ((unsigned short)( 00048 ((((((unsigned int)color1 & 0xf800)>>11)*(((unsigned int)color2 & 0xf800)>>11)))>>5) <<11 | 00049 ((((((unsigned int)color1 & 0x07e0)>>5 )*(((unsigned int)color2 & 0x07e0)>>5 )))>>6) <<5 | 00050 ((((((unsigned int)color1 & 0x001f) )*(((unsigned int)color2 & 0x001f) )))>>5) 00051 )); 00052 } 00053 00054 00055 inline unsigned int RGB16TO32( 00056 unsigned short color 00057 ) 00058 { 00059 return 00060 (((unsigned int)color & 0xf800)<<8) | 00061 (((unsigned int)color & 0x07e0)<<5) | 00062 (((unsigned int)color & 0x001f)<<3) | 00063 (0xff000000); 00064 } 00065 private: 00066 }; 00067 00068 00069 #endif /* __Platform_Win32_Screen_Technology_H__ */
Reproduction/republishing of any material on this site without permission is strictly prohibited.
