comparison Engine/Graphics/Render.cpp @ 2523:c532d5242055

Hello from Direct3D 11 :)
author a.parshin
date Thu, 09 Oct 2014 23:33:36 +0300
parents 3a1b56ab8749
children c7264ab7132f
comparison
equal deleted inserted replaced
2522:b71d0e7837ac 2523:c532d5242055
6392 unsigned __int32 c = color16; 6392 unsigned __int32 c = color16;
6393 unsigned int b = (c & 31) * 8; 6393 unsigned int b = (c & 31) * 8;
6394 unsigned int g = ((c >> 5) & 63) * 4; 6394 unsigned int g = ((c >> 5) & 63) * 4;
6395 unsigned int r = ((c >> 11) & 31) * 8; 6395 unsigned int r = ((c >> 11) & 31) * 8;
6396 6396
6397 return (r << 16) | (g << 8) | b;// 6397 return (r << 16) | (g << 8) | b;
6398 }
6399
6400 unsigned __int32 Color32_SwapRedBlue(unsigned __int16 color16)
6401 {
6402 unsigned __int32 c = color16;
6403 unsigned int b = (c & 31) * 8;
6404 unsigned int g = ((c >> 5) & 63) * 4;
6405 unsigned int r = ((c >> 11) & 31) * 8;
6406
6407 return (b << 16) | (g << 8) | r;
6398 } 6408 }
6399 6409
6400 //----- (0040DEF3) -------------------------------------------------------- 6410 //----- (0040DEF3) --------------------------------------------------------
6401 unsigned __int16 Color16(unsigned __int32 r, unsigned __int32 g, unsigned __int32 b) 6411 unsigned __int16 Color16(unsigned __int32 r, unsigned __int32 g, unsigned __int32 b)
6402 { 6412 {