⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 specialcase16.c

📁 WinCE 3.0 BSP, 包含Inter SA1110, Intel_815E, Advantech_PCM9574 等
💻 C
字号:
//
// Windows CE Software Graphics Library
// specialcase16.c
//
// Copyright (c) 2000 Microsoft Corporation. All rights reserved.
//
// This file contains the implementations of the special case blitting routines
// that target 16Bpp surfaces. This routines may also be used for 15Bpp
// targets as well, as 15Bpp formats generally contain a "dead" bit to insure
// that all pixels are 16-bit aligned.
//
// Currently, this file contains:
//
// SrcCopy0116
// SrcCopy0416
// SrcCopy0816
// SrcCopy1616
// SolidFill16
// SrcAnd0116
// SrcAnd0816
// SrcAnd1616
// SrcInvert0116
// SrcInvert0816
// SrcInvert1616
// SrcPaint0116
// SrcPaint0816
// SrcPaint1616
// Text16 (!TODO!)
// AlphaText16 (!TODO!)
// ClearTypeText16_565 (!TODO!) (replace with ClearTypeText16 ?)

#include "pch.h"
#include "swg.h"

// Use the various templates to generate the blitting routines.

#define FUNCTION                     SrcCopy1616
#define BLOCK_OP(pD, pS, ByteCount)  (memcpy((pD), (pS), (ByteCount)))

#include ".\templates\SD1616.h"

#undef FUNCTION
#undef BLOCK_OP

#define FUNCTION                     SrcAnd1616
#define WORD_OP(D, S)                ((D) & (S))

#include ".\templates\SD1616.h"

#undef FUNCTION
#undef WORD_OP

#define FUNCTION                     SrcPaint1616
#define WORD_OP(D, S)                ((D) | (S))

#include ".\templates\SD1616.h"

#undef FUNCTION
#undef WORD_OP

#define FUNCTION                     SrcInvert1616
#define WORD_OP(D, S)                ((D) ^ (S))

#include ".\templates\SD1616.h"

#undef FUNCTION
#undef WORD_OP

// Use the SD 1Bpp -> 16Bpp template.

#define FUNCTION                     SrcCopy0116
#define WORD_OP(D, S)                (S)

#include ".\templates\SD0116.h"

#undef FUNCTION
#undef WORD_OP

#define FUNCTION                     SrcAnd0116
#define WORD_OP(D, S)                ((D) & (S))

#include ".\templates\SD0116.h"

#undef FUNCTION
#undef WORD_OP

#define FUNCTION                     SrcPaint0116
#define WORD_OP(D, S)                ((D) | (S))

#include ".\templates\SD0116.h"

#undef FUNCTION
#undef WORD_OP

#define FUNCTION                     SrcInvert0116
#define WORD_OP(D, S)                ((D) ^ (S))

#include ".\templates\SD0116.h"

#undef FUNCTION
#undef WORD_OP

// Use the SD 8Bpp -> 16Bpp template.

#define FUNCTION                     SrcCopy0816
#define WORD_OP(D, S)                (S)

#include ".\templates\SD0816.h"

#undef FUNCTION
#undef WORD_OP

#define FUNCTION                     SrcAnd0816
#define WORD_OP(D, S)                ((D) & (S))

#include ".\templates\SD0816.h"

#undef FUNCTION
#undef WORD_OP

#define FUNCTION                     SrcPaint0816
#define WORD_OP(D, S)                ((D) | (S))

#include ".\templates\SD0816.h"

#undef FUNCTION
#undef WORD_OP

#define FUNCTION                     SrcInvert0816
#define WORD_OP(D, S)                ((D) ^ (S))

#include ".\templates\SD0816.h"

#undef FUNCTION
#undef WORD_OP

// Yet another template: SD 4Bpp -> 16Bpp.

#define FUNCTION                     SrcCopy0416
#define WORD_OP(D, S)                (S)

#include ".\templates\SD0416.h"

#undef FUNCTION
#undef WORD_OP

// Likewise, the special case 16Bpp PD blit template for PATFILL.

#define FUNCTION                     SolidFill16
#define BLOCK_OP(pD, P, ByteCount)   (memset((pD), (P), (ByteCount)))

#include ".\templates\PDC16.h" 

#undef FUNCTION
#undef BLOCK_OP

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -