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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? fblin-2.c

?? mini gui 1.6.8 lib and source
?? C
字號:
/*** $Id: fblin-2.c,v 1.8 2003/11/22 11:49:29 weiym Exp $** ** fblin-2.c: Frame buffer 2 bpp Linear Video Driver for MiniGUI**  This driver is suitable for the most significant bit being left.** ** Copyright (C) 2003 Feynman Software.** Copyright (C) 2001, 2002 Wei Yongming**** 2001/02/08 created by Wei Yongming*//*** This program is free software; you can redistribute it and/or modify** it under the terms of the GNU General Public License as published by** the Free Software Foundation; either version 2 of the License, or** (at your option) any later version.**** This program is distributed in the hope that it will be useful,** but WITHOUT ANY WARRANTY; without even the implied warranty of** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the** GNU General Public License for more details.**** You should have received a copy of the GNU General Public License** along with this program; if not, write to the Free Software** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*/#include <stdlib.h>#include <string.h>#include "native.h"#include "fb.h"#ifdef _FBLIN2L_SUPPORT#define SHIFT(x) (6 - ((x & 3) << 1))static unsigned char pixmask [] = {0xc0, 0x30, 0x0c, 0x03};static unsigned char pixnotmask [] = {0x3f, 0xcf, 0xf3, 0xfc};#define normalize_pixel(c) (c & 0x03)static inline gal_uint8* get_pixel_address(PSD psd, int x, int y){    return (gal_uint8 *) psd->addr + y*psd->linelen + (x >> 2);}static inline void xsetpixel_in_byte(int x, gal_pixel c, gal_uint8 *byte){    *byte = (*byte & (pixnotmask [x&3])) | ((c << SHIFT(x)) ^ (*byte & pixmask[x&3]) );}static inline void setpixel_in_byte(int x, gal_pixel c, gal_uint8 *byte){    *byte = (*byte & (pixnotmask [x&3])) | (c << SHIFT(x));}static inline gal_pixel getpixel_in_byte(int x, const gal_uint8 *byte){    gal_uint8 tmp = *byte;    tmp = tmp & pixmask[x&3];    return (tmp >> SHIFT(x));}static int fblin2_init (PSD psd){    if (!psd->size) {        psd->size = psd->yres * psd->linelen;        return 1;    }    return 1;}/* Set pixel at x, y, to gal_pixel c */static void fblin2_drawpixel (PSD psd, int x, int y, gal_pixel c){    c = normalize_pixel (c);    if (psd->gr_mode == MODE_XOR)        xsetpixel_in_byte (x, c, get_pixel_address (psd, x, y));    else        setpixel_in_byte (x, c, get_pixel_address (psd, x, y));}/* Read pixel at x, y */static gal_pixel fblin2_readpixel (PSD psd, int x, int y){    return getpixel_in_byte (x, get_pixel_address (psd, x, y));}/* Draw horizontal line from x1,y to x2,y including final point*/static void fblin2_drawhline (PSD psd, int x, int y, int w, gal_pixel c){    gal_uint8 *addr;    int cc, i;    c = normalize_pixel (c);    cc = c | (c << 2);    cc = cc | (cc << 4);        addr = get_pixel_address (psd, x, y);    if (psd->gr_mode == MODE_XOR) {        if (x & 3) {            for(i = x&3; i&3 && w > 0; i++) {                xsetpixel_in_byte (i, c, addr);                w--;            }            addr++;        }                while (w > 3) {            *addr++ ^= cc ;            w -= 4;        }                if (w > 0) {            for (i = 0; i < w; i++)                xsetpixel_in_byte (i, c, addr);        }            } else {        if (x & 3) {            for (i= x & 3; i & 3 && w > 0; i++) {                setpixel_in_byte (i, c, addr);                w--;            }            addr++;        }                while (w > 3) {            *addr++ = cc ;            w -= 4;        }                if (w > 0) {            for (i = 0; i < w; i++)                setpixel_in_byte (i, c, addr);        }    }}static void fblin2_drawvline (PSD psd, int x, int y, int h, gal_pixel c){    gal_uint8* addr;    c = normalize_pixel (c);    addr = get_pixel_address (psd, x, y);        if (psd->gr_mode == MODE_XOR) {        while (h--) {            xsetpixel_in_byte (x, c, addr);            addr += psd->linelen;        }    }    else {        while (h--) {            setpixel_in_byte (x, c, addr);            addr += psd->linelen;        }    }}/*clip to screen*/static void fblin2_getbox (PSD psd, int x, int y, int w, int h, void* buf){    int i;    gal_uint8 *dst = (gal_uint8*) buf;    const gal_uint8 *src;    int d_pitch = w;    if (y < 0) {        h += y;        dst -= y * d_pitch;        y = 0;    }    if (x < 0) {        w += x;        dst -= x;        x = 0;    }    if (y + h - 1 >= psd->yres)         h = psd->yres - y ;    if (x + w - 1 >= psd->xres)         w = psd->xres - x ;        if (w <= 0 || h <= 0) return;    w += x;    src = get_pixel_address (psd, x, y);    while (h--) {        const gal_uint8 *s_line = src;        gal_uint8 *d_line = dst;        i = x;        while (i < w) {            *d_line = getpixel_in_byte (i, s_line);            d_line++; i++;            if (!(i&3)) s_line++;        }        src += psd->linelen;        dst += d_pitch;    }}/*do clip*/static void fblin2_putbox (PSD psd, int x, int y, int w, int h, void *buf){    int i;    const gal_uint8 *src = (gal_uint8*) buf;    gal_uint8 *dst;    int s_pitch = w;    if (psd->doclip) {        if (y < psd->clipminy) {            h -= psd->clipminy - y;            src += (psd->clipminy - y) * s_pitch;            y = psd->clipminy;        }        if (x < psd->clipminx) {            w -= psd->clipminx - x;            src += psd->clipminx - x;            x = psd->clipminx;        }        if (y + h - 1 >= psd->clipmaxy)            h = psd->clipmaxy- y;        if (x + w - 1 >= psd->clipmaxx)            w = psd->clipmaxx- x;    }    else {        if ( y < 0 ) {            h += y;            src += -y * s_pitch;            y = 0;        }        if ( x < 0 ) {            w += x;            src += -x;            x = 0;        }        if ( y + h  -1 >= psd->yres)            h = psd->yres - y;        if ( x + w  -1 >= psd->xres)            w = psd->xres - x;    }    if (w <= 0 || h <= 0) return;    w += x;    dst = get_pixel_address (psd, x, y);    while (h--) {        const gal_uint8 *s_line = src;        gal_uint8 *d_line = dst;        i = x;        while (i < w) {            setpixel_in_byte (i, normalize_pixel (*s_line), d_line);            s_line ++; i ++;            if (!(i&3)) d_line++;        }        dst += psd->linelen;        src += s_pitch;    }}static void fblin2_putboxmask (PSD psd, int x, int y, int w, int h, void *buf, gal_pixel cxx){    int i;    gal_uint8 *src = (gal_uint8*) buf;    gal_uint8 *dst;    int s_pitch =  w ;    if (psd->doclip) {            if (y < psd->clipminy) {            h -= psd->clipminy - y;            src += (psd->clipminy - y) * s_pitch;            y = psd->clipminy;        }        if (x < psd->clipminx) {            w -= psd->clipminx - x;            src += psd->clipminx - x;            x = psd->clipminx;        }                if (y + h - 1 >= psd->clipmaxy)             h =  psd->clipmaxy- y;        if (x + w - 1 >= psd->clipmaxx)             w =  psd->clipmaxx- x;    }    else {        if ( y < 0 ) {            h += y;            src += -y * s_pitch;            y = 0;        }        if ( x < 0 ) {            w += x;            src += -x;            x = 0;        }                if ( y + h  -1 >= psd->yres)             h = psd->yres - y ;        if ( x + w  -1 >= psd->xres)             w = psd->xres - x ;    }    if (w <= 0 || h <= 0) return;    cxx = normalize_pixel (cxx);    w += x;    dst = get_pixel_address (psd, x, y);    while (h--) {        gal_uint8 *s_line = src;        gal_uint8 *d_line = dst;        i = x;        while (i < w) {            gal_uint8 spix = normalize_pixel (*s_line);            if (spix != cxx)                setpixel_in_byte (i, spix, d_line);            s_line++; i++;            if (!(i&3)) d_line ++;        }        dst += psd->linelen;        src += s_pitch;    }}static unsigned char right_side_mask [] = {0xff,0x3f,0x0f,0x03};static unsigned char left_side_mask [] = {0x00,0xc0,0xf0,0xfc};static unsigned char right_ban_mask [] = {0x00,0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f,0xff};static unsigned char left_ban_mask [] = {0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff};/* copyline - left to right */static void fblin2_copyline_lr (gal_uint8 *src, int x1, gal_uint8 *dst, int x2, int w){    int s_head = x1 & 3;    int d_head = x2 & 3;    if (s_head == d_head) {        if (d_head) {            if (d_head + w > 4) {                *dst = (*src & right_side_mask [d_head]) | (*dst & left_side_mask [d_head]);                src ++; dst ++;                w -= 4 - d_head;            }            else {                gal_uint8 mask = left_ban_mask [w] >> d_head;                *dst = (*src & mask) | (*dst & ~mask);                return;            }        }        while (w > 3) {            *dst++ = *src++;            w -= 4;        }        if (w) {            *dst = (*src & left_side_mask [w]) | (*dst & (right_side_mask [w]));        }    }    else if (d_head > s_head) {        int shift = (d_head - s_head) << 1;        gal_uint8 sl_half = *src >> shift;        gal_uint8 sr_half;        gal_uint8 sb_new;        if (d_head + w > 4) {            *dst = (sl_half & right_side_mask [d_head]) | (*dst & left_side_mask [d_head]);            dst++;            w -= 4 - d_head;        }        else {            gal_uint8 mask = left_ban_mask [w] >> d_head;            *dst = (sl_half & mask) | (*dst & ~mask);            return;        }        sr_half = *src & right_ban_mask [shift];        while (w > 3) {            src++;            sl_half = *src >> shift;            sb_new = sl_half | (sr_half << (8 - shift));            sr_half = *src & right_ban_mask [shift];            *dst = sb_new;            dst++;             w -= 4;        }        if (w) {            sr_half = *src & right_ban_mask [shift];            if (w > shift) {                src++;                sl_half = *src >> shift;                sb_new = sl_half | (sr_half << (8 - shift));            }            else                sb_new = (sr_half << (8 - shift));            *dst = (sb_new & left_side_mask [w]) | (*dst & right_side_mask[w]);        }    }    else /* s_head > d_head */    {        int shift = (s_head - d_head) << 1;        gal_uint8 sl_half = *src << shift;        gal_uint8 sr_half;        gal_uint8 sb_new;        if (s_head + w > 4) {            sr_half = *(src + 1) & (left_ban_mask [shift]);            sb_new = sl_half | (sr_half >> (8 - shift));        }        else            sb_new = sl_half;        if (d_head) {            if (d_head + w > 4) {                *dst = (sb_new & right_side_mask [d_head]) | (*dst & left_side_mask [d_head]);                dst++; src++;                w -= 4 - d_head;            }            else {                gal_uint8 mask = left_ban_mask [w] >> d_head;                *dst = (sb_new & mask) | (*dst & ~mask);                return;            }        }        while (w > 3) {            sl_half = *src << shift;            sr_half = *(++src) & (left_ban_mask [shift]);            sb_new = sl_half | (sr_half >> (8 - shift));            *dst = sb_new;            dst++;             w -= 4;        }        if (w) {            sl_half = *src << shift;            if (w > ((8 - shift) >> 1)) {                sr_half = *(++src) & (left_ban_mask [shift]);                sb_new = sl_half | (sr_half >> (8 - shift));            }            else                sb_new = sl_half;            *dst = (sb_new & left_side_mask [w]) | (*dst & right_side_mask[w]);        }    }}static void fblin2_copybox (PSD psd,int x1, int y1, int w, int h, int x2, int y2){    register gal_uint8 *src, *dst;    register int linelen = psd->linelen;    if (y1 == y2) {        if (x1 < x2 && x1 + w > x2) {            //gal_uint8 *tmp = alloca (w >> 2);            gal_uint8 *tmp = malloc (w >> 2);            src= psd->addr + y1 * linelen + (x1 >> 3);            dst= psd->addr + y2 * linelen + (x2 >> 3);            while (h) {                fblin2_copyline_lr (src, x1, tmp, 0, w);                fblin2_copyline_lr (tmp, 0, dst, x2, w);                src += linelen;                dst += linelen;                h--;            }            free (tmp);        }        else {            src= psd->addr + y1 * linelen + (x1 >> 3);            dst= psd->addr + y2 * linelen + (x2 >> 3);            while (h) {                fblin2_copyline_lr (src, x1, dst, x2, w);                src += linelen;                dst += linelen;                h--;            }        }    }    else if (y1 < y2 && y1 + h >= y2) {        y1 += (h-1);        y2 += (h-1);        src= psd->addr + y1 * linelen + (x1 >> 3);        dst= psd->addr + y2 * linelen + (x2 >> 3);        while (h) {            fblin2_copyline_lr (src, x1, dst, x2, w);            src -= linelen;            dst -= linelen;            h--;        }    }    else {        src= psd->addr + y1 * linelen + (x1 >> 3);        dst= psd->addr + y2 * linelen + (x2 >> 3);        while (h) {            fblin2_copyline_lr (src, x1, dst, x2, w);            src += linelen;            dst += linelen;            h--;        }    }}/* Bitblt, not do clip */static void fblin2_blit (PSD dstpsd, int dstx, int dsty, int w, int h,    PSD srcpsd, int srcx, int srcy){    gal_uint8* dst;    gal_uint8* src;    dst = get_pixel_address (dstpsd, dstx, dsty);    src = get_pixel_address (srcpsd, srcx, srcy);    while (h) {        fblin2_copyline_lr (src, srcx, dst, dstx, w);        src += srcpsd->linelen;        dst += dstpsd->linelen;        h--;    }}SUBDRIVER fblinear_2 = {    fblin2_init,    fblin2_drawpixel,    fblin2_readpixel,    fblin2_drawhline,    fblin2_drawvline,    fblin2_blit,    fblin2_putbox,    fblin2_getbox,    fblin2_putboxmask,    fblin2_copybox};#endif /* _FBLIN2L_SUPPORT */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人午夜99999| 日韩欧美高清一区| 亚洲男女毛片无遮挡| 久久精品男人天堂av| 成人在线综合网站| 国产精品伦一区| 紧缚奴在线一区二区三区| 欧美精品日韩一本| 国产精品一区免费在线观看| 亚洲精品免费在线播放| 久久亚洲综合av| 欧美剧情电影在线观看完整版免费励志电影| 国内精品久久久久影院色| 亚洲女同一区二区| 亚洲男同性恋视频| 欧美性受xxxx黑人xyx| 狠狠色丁香九九婷婷综合五月| 亚洲国产精华液网站w| 国产精品高潮呻吟| 国产精品区一区二区三区| 欧美夫妻性生活| 蜜臀av一级做a爰片久久| 亚洲一区二区成人在线观看| 午夜视频在线观看一区| 成人黄色免费短视频| 亚洲国产美国国产综合一区二区| 日韩理论电影院| 最新国产精品久久精品| 欧美成人一区二区三区片免费| 久久久久久免费网| 亚洲欧美怡红院| 中日韩av电影| 国产欧美一区二区三区沐欲| 欧美tickling挠脚心丨vk| 欧美日韩卡一卡二| 色综合天天在线| 成人在线视频一区| 成人高清av在线| 亚洲国产精品一区二区尤物区| 国产精品久久久久一区二区三区| 久久精品无码一区二区三区| 日韩欧美在线影院| 激情综合五月婷婷| 色哟哟亚洲精品| 欧美高清激情brazzers| 色欧美乱欧美15图片| 99精品视频一区二区三区| 老司机免费视频一区二区| 日韩欧美一区二区久久婷婷| 91精品欧美福利在线观看| 日韩成人av影视| 国产三级欧美三级| 欧美在线一二三四区| 在线观看视频91| 亚洲精品一区二区三区精华液| 欧美亚洲综合久久| 在线观看国产精品网站| 欧美裸体bbwbbwbbw| 欧美日韩一区二区不卡| 国产高清无密码一区二区三区| 国产99精品在线观看| 91成人看片片| 91视频在线观看| www日韩大片| 亚洲男同1069视频| 欧美激情一区二区三区蜜桃视频| 国产精品丝袜久久久久久app| 中文字幕在线一区| 亚洲精品中文字幕乱码三区| 日韩免费在线观看| 欧美国产97人人爽人人喊| 国产精品入口麻豆九色| 自拍偷在线精品自拍偷无码专区| 国内一区二区视频| 99久久免费视频.com| 欧美日韩aaaaaa| av成人免费在线观看| 欧美女孩性生活视频| 国产精品传媒视频| 美女诱惑一区二区| 波多野结衣视频一区| 精品久久久三级丝袜| 一区二区三区日本| 天天综合日日夜夜精品| 色悠悠久久综合| 久久精品视频在线看| 亚洲女性喷水在线观看一区| 欧美丰满嫩嫩电影| 国产色产综合色产在线视频| 久久成人免费网站| 欧美性一级生活| 在线观看欧美日本| 亚洲精品高清在线| 韩国精品主播一区二区在线观看| 成人av资源在线| 日韩三级精品电影久久久| 久久久精品国产99久久精品芒果| 视频一区二区三区在线| 欧美四级电影在线观看| 中文字幕一区二区三区不卡在线| 国产日韩欧美精品综合| 国产成人av一区二区三区在线观看| 精品免费国产二区三区 | 91免费版在线| 欧美一区二区三区视频| 一区二区在线观看视频| 成人性生交大合| 中文字幕一区二区三区不卡| jlzzjlzz亚洲日本少妇| 欧美tickle裸体挠脚心vk| 专区另类欧美日韩| 激情图片小说一区| 日本道色综合久久| 久久久精品2019中文字幕之3| 91精品久久久久久久91蜜桃| 欧美aaaaaa午夜精品| 欧美成人video| 国产一区二区精品久久| 中文字幕不卡的av| 91丨九色丨蝌蚪丨老版| 亚洲午夜在线电影| 91麻豆精品91久久久久同性| 免费成人在线播放| 久久噜噜亚洲综合| 成人免费黄色在线| 一区二区三区在线视频观看58| 欧美日韩国产综合一区二区三区| 丝袜美腿亚洲色图| 久久色在线观看| av午夜一区麻豆| 一区二区三区免费看视频| 99国产精品一区| 99国产精品视频免费观看| 成人性生交大片免费看中文 | 亚洲美腿欧美偷拍| 欧美最猛黑人xxxxx猛交| 五月婷婷综合激情| 久久人人97超碰com| 成人白浆超碰人人人人| 一区在线播放视频| 欧美精品日日鲁夜夜添| 国产一区二区电影| 樱桃视频在线观看一区| 日韩精品资源二区在线| av电影天堂一区二区在线| 五月婷婷综合激情| 国产精品美女久久久久aⅴ| 欧洲视频一区二区| 国产一区二区三区综合| 亚洲免费在线视频一区 二区| 欧美一区二区免费观在线| 国产ts人妖一区二区| 视频在线观看91| 国产精品视频yy9299一区| 欧美理论片在线| 懂色av一区二区三区免费观看| 亚洲成人你懂的| 欧美国产成人精品| 欧美一级欧美一级在线播放| aaa欧美大片| 久久精品999| 亚洲综合视频在线观看| 久久蜜臀中文字幕| 国内久久精品视频| 久久久久久黄色| 午夜欧美视频在线观看 | 老司机精品视频一区二区三区| 亚洲国产精华液网站w| 日韩一区二区三区免费看| 972aa.com艺术欧美| 精品中文字幕一区二区小辣椒| 一区二区三区在线免费| wwwwxxxxx欧美| 欧美二区三区的天堂| 成人国产精品免费| 91国偷自产一区二区三区成为亚洲经典| 天天av天天翘天天综合网 | 国产一区在线观看麻豆| 亚洲一区二区三区精品在线| 国产精品久久午夜夜伦鲁鲁| 日韩欧美成人一区二区| 欧美影视一区在线| 成人av资源网站| 国产露脸91国语对白| 日韩电影免费一区| 亚洲国产裸拍裸体视频在线观看乱了 | 午夜av一区二区三区| 中文字幕亚洲一区二区va在线| 精品成人在线观看| 日韩欧美国产一二三区| 欧美日韩亚洲综合一区二区三区| 国内精品久久久久影院色| 精品精品欲导航| 粉嫩aⅴ一区二区三区四区 | 国产综合久久久久影院| 亚洲成人综合网站| 亚洲影院在线观看| 亚洲日本中文字幕区| 自拍偷拍亚洲欧美日韩| 国产精品国产自产拍高清av王其|