亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? lcdwin.c

?? 這是我移植到GBA游戲機上的uCGUI3.24 可以通過模擬器仿真
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*
*********************************************************************************************************
*                                                uC/GUI
*                        Universal graphic software for embedded applications
*
*                       (c) Copyright 2002, Micrium Inc., Weston, FL
*                       (c) Copyright 2002, SEGGER Microcontroller Systeme GmbH
*
*              礐/GUI is protected by international copyright laws. Knowledge of the
*              source code may not be used to write a similar product. This file may
*              only be used in accordance with a license and should not be redistributed
*              in any way. We appreciate your understanding and fairness.
*
----------------------------------------------------------------------
File        : LCDWin.C
Purpose     : Driver for Simulator under Windows
----------------------------------------------------------------------
Version-Date---Author-Explanation
----------------------------------------------------------------------
2.00    010402 RS     a) LCD_GetDevCaps removed from driver
                         (now LCD.c)
1.30c   000529 JE     a) Interface changed
1.30b   000428 RS     a) DIB class eliminated
                      b) Internal cleanups, support for high color
1.30a   000417 RS     a) Major cleanup in DIB class
1.30    000309 RS     a) Interface change for emWIn V1.30
                         (LCD_L0_SetLUTEntry, LCD_GetDevCap)
1.10a   000121 RS     a) RECTHEIGHT, RECTWIDTH modified in order to
                         fix bug which would at some time prevent
												 displaying the first line of the display.
1.10.00 000110 RS     a) Modifications in order to make it easy to
                         implement driver in any windows program
1.04.02 991118 RS     a) additional assertion added
                         LCD_MAX_LOG_COLORS
1.04.01 991018 RS     a) Support for LCD_FIXEDPALETTE added
                         with Anitaliasing enabled
1.04.00 991013 JE/RS  a) Support for LCD_FIXEDPALETTE added
                      b) Driver now accepts the same LCDConf.h as
											   the embedded system
											c) Bugfix for ..
1.02.02 990831 RS     a) Small optimization added for 16-color bitmaps
1.02.01 990726 RS     a) Transparency support for 16-color bitmpas
                         added
1.02.00 990212 RS     a) New interface version 1.02 supported
1.00    990118 RS     First release
----------------------------------------------------------------------
Known problems or limitations with current version
----------------------------------------------------------------------
---------------------------END-OF-HEADER------------------------------
*/


#if defined(WIN32) && !defined(LCD_SIMCONTROLLER)

#include <windows.h>
#include "LCD.h"
#include "LCD_Private.h"              /* include LCDConf.h */
#include "LCDSim.h"
#include "GUI_Private.h"

#include "memory.h"

#if LCD_BITSPERPIXEL <= 8
  #define PIXELINDEX U8
#else
  #define PIXELINDEX WORD
#endif

#ifdef WIN32
  #ifndef ASSERT
    #define ASSERT(Val) \
    if (!(Val)) \
      MessageBox(NULL,"...in file "__FILE__,"Assertion failed...",MB_OK);
  #endif
#endif

#ifdef LCD_ASSERT
  #undef LCD_ASSERT
#endif
#define LCD_ASSERT(v) ASSERT(v)

#ifndef LCD_DISPLAY_INDEX
  #define LCD_DISPLAY_INDEX 0
#endif


/*
        *********************************************************
        *                                                       *
        *       Macros for internal use                         *
        *                                                       *
        *********************************************************
*/

#define SETPIXEL(x, y, c) LCDSIM_SetPixelIndex(x, y, c)
#define GETPIXEL(x, y)    LCD_GetPixel(x,y)
#define XORPIXEL(x, y)    XorPixel(x,y)

#if LCD_DISPLAY_INDEX == 1     /* Second display in a multi-display configuration */
  #define LCDSIM_SetPixelIndex  LCDSIM_1_SetPixelIndex
  #define LCDSIM_SetLUTEntry    LCDSIM_1_SetLUTEntry
#endif

/*
        *********************************************************
        *                                                       *
        *       ID translation table                            *
        *                                                       *
        *********************************************************

This table contains 0, 1, 2, ... and serves as translation table for DDBs

*/

#define INTS(Base)  Base+0,Base+1,Base+2,Base+3,Base+4,Base+5,   \
                    Base+6,Base+7,Base+8,Base+9,Base+10,Base+11, \
                    Base+12,Base+13,Base+14,Base+15

static void XorPixel   (int x, int y) {
  unsigned int Index = LCD_L0_GetPixelIndex(x,y);
  LCDSIM_SetPixelIndex(x, y, LCD_NUM_COLORS-1-Index);
}


/*
        *********************************************************
        *                                                       *
        *       LCD_L0_SetColorIndex                            *
        *       LCD_L0_SetBkColorIndex                          *
        *                                                       *
        *********************************************************
*/


#define   COLORINDEX LCD_COLORINDEX
#define BKCOLORINDEX LCD_BKCOLORINDEX

/*
        *********************************************************
        *                                                       *
        *       LCD_L0_DrawPixel                                   *
        *                                                       *
        *********************************************************

Purpose:  This routine is called by emWin. It writes 1 pixel into the
          display.

*/


void LCD_L0_DrawPixel(int x, int y) {
  if (GUI_Context.DrawMode & LCD_DRAWMODE_XOR) {
    XORPIXEL(x, y);
  } else {
    SETPIXEL(x, y, COLORINDEX);
  }
}

/*
        *********************************************************
        *                                                       *
        *          LCD_DrawLine  vertical/horizontal            *
        *          LCD_DrawRect                                 *
        *                                                       *
        *********************************************************
*/

void LCD_L0_DrawHLine  (int x0, int y,  int x1) {
  if (GUI_Context.DrawMode & LCD_DRAWMODE_XOR) {
    for (;x0 <= x1; x0++) {
      XORPIXEL(x0, y);
    }
  } else {
//    LCDSIM_FillLine(x0,y,x1,COLORINDEX);
    for (;x0 <= x1; x0++) {
      SETPIXEL(x0, y, COLORINDEX);
    }
  }
}

void LCD_L0_DrawVLine  (int x, int y0,  int y1) {
  if (GUI_Context.DrawMode & LCD_DRAWMODE_XOR) {
    while (y0 <= y1) {
      XORPIXEL(x, y0);
      y0++;
    }
  } else {
    while (y0 <= y1) {
      SETPIXEL(x, y0, COLORINDEX);
      y0++;
    }
  }
}

void LCD_L0_FillRect(int x0, int y0, int x1, int y1) {
  for (; y0 <= y1; y0++) {
    LCD_L0_DrawHLine(x0,y0, x1);
  }
}



/*
  ***************************************************************
  *                                                             *
  *            Internal bitmap routines                         *
  *                                                             *
  ***************************************************************

*/


/*
    *********************************************
    *                                           *
    *      Draw Bitmap 1 BPP                    *
    *                                           *
    *********************************************
*/

static void  DrawBitLine1BPP(int x, int y, U8 const*p, int Diff, int xsize, const LCD_PIXELINDEX*pTrans) {
  LCD_PIXELINDEX Index0 = *(pTrans+0);
  LCD_PIXELINDEX Index1 = *(pTrans+1);
  x+=Diff;
/*
// Jump to right entry point
*/
  switch (GUI_Context.DrawMode & (LCD_DRAWMODE_TRANS|LCD_DRAWMODE_XOR)) {
  case 0:    /* Write mode */
    do {
      LCDSIM_SetPixelIndex(x++,y, (*p & (0x80>>Diff)) ? Index1 : Index0);
			if (++Diff==8) {
        Diff=0;
				p++;
			}
		} while (--xsize);
    break;
  case LCD_DRAWMODE_TRANS:
    do {
  		if (*p & (0x80>>Diff))
        LCDSIM_SetPixelIndex(x,y, Index1);
      x++;
			if (++Diff==8) {
        Diff=0;
				p++;
			}
		} while (--xsize);
    break;
  case LCD_DRAWMODE_XOR:;
    do {
  		if (*p & (0x80>>Diff)) {
        int Pixel = LCDSIM_GetPixelIndex(x,y);
        LCDSIM_SetPixelIndex(x,y, LCD_NUM_COLORS-1-Pixel);
      }
      x++;
			if (++Diff==8) {
        Diff=0;
				p++;
			}
		} while (--xsize);
    break;
	}
}

/*
    *********************************************
    *                                           *
    *      Draw Bitmap 2 BPP                    *
    *                                           *
    *********************************************
*/

#if (LCD_MAX_LOG_COLORS > 2)
static void  DrawBitLine2BPP(int x, int y, U8 const*p, int Diff, int xsize, const LCD_PIXELINDEX*pTrans) {
  PIXELINDEX pixels;
/*
// Jump to right entry point
*/
  pixels = *p;
  if (GUI_Context.DrawMode & LCD_DRAWMODE_TRANS) switch (Diff&3) {
  case 0:
    goto WriteTBit0;
  case 1:
    goto WriteTBit1;
  case 2:
    goto WriteTBit2;
  default:
    goto WriteTBit3;
  } else switch (Diff&3) {
  case 0:
    goto WriteBit0;
  case 1:
    goto WriteBit1;
  case 2:
    goto WriteBit2;
  default:
    goto WriteBit3;
  }
/*
        Write without transparency
*/
WriteBit0:
  SETPIXEL(x+0, y, *(pTrans+(pixels>>6)));
  if (!--xsize)
    return;
WriteBit1:
  SETPIXEL(x+1, y, *(pTrans+(3&(pixels>>4))));
  if (!--xsize)
    return;
WriteBit2:
  SETPIXEL(x+2, y, *(pTrans+(3&(pixels>>2))));
  if (!--xsize)
    return;
WriteBit3:
  SETPIXEL(x+3, y, *(pTrans+(3&(pixels))));
  if (!--xsize)
    return;
  pixels = *(++p);
  x+=4;
  goto WriteBit0;
/*
        Write with transparency
*/
WriteTBit0:
  if (pixels&(3<<6))
    SETPIXEL(x+0, y, *(pTrans+(pixels>>6)));
  if (!--xsize)
    return;
WriteTBit1:
  if (pixels&(3<<4))
    SETPIXEL(x+1, y, *(pTrans+(3&(pixels>>4))));
  if (!--xsize)
    return;
WriteTBit2:
  if (pixels&(3<<2))
    SETPIXEL(x+2, y, *(pTrans+(3&(pixels>>2))));
  if (!--xsize)
    return;
WriteTBit3:
  if (pixels&(3<<0))
    SETPIXEL(x+3, y, *(pTrans+(3&(pixels))));
  if (!--xsize)
    return;
  pixels = *(++p);
  x+=4;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
caoporn国产一区二区| 国产亚洲欧美日韩俺去了| 欧美一级一级性生活免费录像| 26uuu国产在线精品一区二区| 亚洲激情图片一区| 国产成人免费视频精品含羞草妖精 | 精品va天堂亚洲国产| 亚洲欧美日韩中文播放 | 国产女主播在线一区二区| 丝袜诱惑制服诱惑色一区在线观看 | 欧美日韩国产乱码电影| 亚洲视频在线一区二区| 国产91露脸合集magnet| 91精品国产入口| 亚洲一区二区视频在线| 91麻豆视频网站| 亚洲天堂免费在线观看视频| 国产成人综合在线| 久久综合丝袜日本网| 男女男精品网站| 91精品国产综合久久精品性色| 亚洲精品福利视频网站| 91丨porny丨最新| 亚洲视频在线观看三级| 成人黄色小视频在线观看| 国产欧美一区二区精品忘忧草 | 精品国产一区a| 久久99在线观看| 亚洲精品在线免费观看视频| 九九在线精品视频| 欧美xxxxxxxxx| 精品一区二区三区在线观看| 精品欧美黑人一区二区三区| 久久99精品国产麻豆婷婷洗澡| 91精品国产品国语在线不卡| 人人精品人人爱| 日韩亚洲欧美成人一区| 秋霞电影网一区二区| 日韩视频一区二区在线观看| 麻豆极品一区二区三区| 欧美大胆人体bbbb| 激情五月婷婷综合| 国产欧美精品在线观看| www.成人网.com| 亚洲综合男人的天堂| 精品视频999| 久久99精品视频| 国产欧美一区二区精品秋霞影院| 成人avav在线| 亚洲一二三四在线观看| 欧美一区二区女人| 国产一区啦啦啦在线观看| 中文字幕第一区综合| 91美女片黄在线观看91美女| 午夜欧美在线一二页| 精品国产一区二区三区av性色 | 国产一区二区三区四| 国产精品久久久久影院亚瑟| 欧洲精品在线观看| 六月婷婷色综合| 亚洲日本va午夜在线影院| 欧美精品欧美精品系列| 国产精品资源网| 一二三四社区欧美黄| 日韩片之四级片| 91视频观看免费| 美女脱光内衣内裤视频久久网站 | 26uuu久久综合| 91香蕉视频污| 国产综合色视频| 亚洲精品伦理在线| 久久美女艺术照精彩视频福利播放 | 国产91色综合久久免费分享| 亚洲自拍偷拍网站| 国产亚洲综合在线| 欧美日本高清视频在线观看| 精品无码三级在线观看视频 | 国产欧美精品区一区二区三区 | 97精品久久久久中文字幕| 日韩经典一区二区| 中文字幕制服丝袜成人av| 欧美tk—视频vk| 欧美色中文字幕| 99久久精品免费观看| 国产一区二区久久| 蜜臀国产一区二区三区在线播放| 中文字幕人成不卡一区| 久久久夜色精品亚洲| 欧美电影一区二区| 欧美三级韩国三级日本三斤 | 欧美日韩精品是欧美日韩精品| 国产乱子伦视频一区二区三区| 亚洲国产日韩一级| 亚洲精品免费电影| 中文字幕一区二区三区在线观看 | 国产精品一二三区| 青青草精品视频| 午夜不卡在线视频| 亚洲一区二区av电影| 亚洲男人天堂一区| 亚洲欧美韩国综合色| 国产精品福利在线播放| 国产蜜臀97一区二区三区| wwwwww.欧美系列| 日韩欧美的一区| 日韩精品一区二区三区中文不卡| 欧美日韩一二三区| 99精品视频一区二区| 国产高清精品久久久久| 国产suv精品一区二区三区| 精品在线视频一区| 国产在线精品国自产拍免费| 久久成人免费网| 国产在线国偷精品产拍免费yy| 琪琪久久久久日韩精品| 蜜桃久久av一区| 国产一区福利在线| 国产成人免费视频网站高清观看视频| 国产乱码字幕精品高清av| 老司机午夜精品| 国内精品嫩模私拍在线| 国内精品国产成人| 粉嫩aⅴ一区二区三区四区 | 91精品中文字幕一区二区三区| 欧美久久久久免费| 日韩午夜av一区| 国产日产欧美一区二区视频| 欧美国产欧美亚州国产日韩mv天天看完整| 日本一区二区在线不卡| 成人欧美一区二区三区白人| 亚洲男人的天堂在线aⅴ视频 | 国产精品视频看| 亚洲免费电影在线| 日韩和欧美的一区| 韩国欧美一区二区| eeuss影院一区二区三区| 色婷婷国产精品综合在线观看| 色欧美片视频在线观看在线视频| 欧美日韩亚洲国产综合| 777欧美精品| 国产欧美精品一区aⅴ影院| 亚洲精品久久嫩草网站秘色| 日本网站在线观看一区二区三区| 国产一区二区视频在线| 91在线观看视频| 91精品蜜臀在线一区尤物| 欧美精品一区二区三区一线天视频| 久久精品人人做人人爽97| 综合久久综合久久| 美日韩黄色大片| 99精品久久99久久久久| 欧美一区二区三区啪啪| 国产精品久久久久久久裸模| 图片区日韩欧美亚洲| 国产不卡免费视频| 7777精品久久久大香线蕉| 久久久久久免费网| 亚洲成人手机在线| 成人午夜精品在线| 日韩一区二区三区电影在线观看 | 国产精品久久久久7777按摩| 午夜欧美大尺度福利影院在线看| 国产乱子伦视频一区二区三区| 色婷婷国产精品久久包臀| 久久久777精品电影网影网 | 欧美美女视频在线观看| 国产婷婷精品av在线| 日本sm残虐另类| 色综合久久88色综合天天免费| 欧美一级黄色片| 亚洲激情图片一区| 大胆亚洲人体视频| 欧美成人艳星乳罩| 日韩影院精彩在线| 欧美性xxxxx极品少妇| 国产精品丝袜在线| 狠狠色丁香婷综合久久| 538在线一区二区精品国产| 亚洲免费观看高清| 成人午夜短视频| 2020国产精品| 久久成人18免费观看| 欧美一区在线视频| 亚洲一区免费观看| 91黄色激情网站| 亚洲精品中文字幕乱码三区| 国产91精品精华液一区二区三区| 精品区一区二区| 久久99精品国产麻豆婷婷洗澡| 欧美日本在线视频| 午夜激情一区二区三区| 欧美日韩国产综合一区二区三区| 中文字幕在线一区| 99久久精品情趣| 最好看的中文字幕久久| 99re66热这里只有精品3直播 | 国产日韩成人精品| 国v精品久久久网| 中文字幕第一区综合| 国产成人h网站|