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

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

?? fbvga16.c

?? mini gui 1.6.8 lib and source
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*** $Id: fbvga16.c,v 1.12 2003/11/22 11:49:29 weiym Exp $**** fbvga16.c: Frame buffer VGA16 video driver for MiniGUI**** Copyright (C) 2003 Feynman Software.** Copyright (C) 2000 Song Lixin and Wei Yongming**** 2000/11/11: Created by Song Lixin.**** 2000/11/15: Song Lixin: **      I have used packed memory mode. That means when use 4 bit color, **      two pixels use one byte, but now, we alien to byte. *//*** 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 <stdio.h>#include <stdlib.h>#include <string.h>#include "common.h"#ifdef _FBVGA16_SUPPORT#include "native.h"#include "fb.h"#include "fbvga16.h"#define SCREENBASE(psd)         ((char *)psd->addr)#define BYTESPERLINE(psd)        (psd->linelen)/* Values for the data rotate register to implement drawing modes. */static unsigned char mode_table[MODE_MAX + 1] = {    0x00, 0x18, 0x10, 0x08};/* precalculated mask bits*/static unsigned char mask[8] = {    0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01};static unsigned char notmask[2] = {0x0f, 0xf0};static void _mem16_putbox (PSD psd, int x, int y, int w, int h, gal_uint8 * src, int srcwidth){    gal_uint8* dst= (gal_uint8 *)psd->addr + y * psd->linelen + x;    while (h--) {        memcpy (dst,src,w);        dst += psd->linelen;        src += srcwidth;    }}static void _mem16_getbox (PSD psd, int x, int y, int w, int h, gal_uint8 * dst, int dstwidth){    gal_uint8* src= (gal_uint8 *)psd->addr + y * psd->linelen + x;    while (h--) {        memcpy (dst,src,w);        src += psd->linelen;        dst += dstwidth;    }}static void _vga16_putbox (PSD psd, int x, int y, int w, int h, gal_uint8    *src, int srcwidth){    gal_uint8* dst;    gal_uint8* dst1;    gal_uint8 *src1;    int c, lastc;    int  h1;    set_op(0);        /* mode_table[MODE_SET]*/    dst = (gal_uint8*)SCREENBASE(psd) + (x >> 3) + y * BYTESPERLINE(psd);    lastc = -1;    while (w--) {        src1 = src;        h1 = h;        dst1 = dst;        select_and_set_mask (mask[x & 7]);        while (h1--) {            c = *src1;            if (c != lastc)                set_color (lastc = c);            RMW (dst1);            src1 += srcwidth;            dst1 += BYTESPERLINE(psd);        }        if ((++x & 7) == 0) dst++;        src++;    }}static void _vga16_putboxmask (PSD psd, int x, int y, int w, int h, gal_uint8 * src, int srcwidth, gal_pixel cxx){    gal_uint8* dst;    gal_uint8* dst1;    gal_uint8 *src1;    int c,w1,x1,lastc;    lastc = -1;    set_op(0);        /* mode_table[MODE_SET]*/    dst = (gal_uint8*)SCREENBASE(psd) + (x >> 3) + y * BYTESPERLINE(psd);    while (h--) {        src1 = src;        w1 = w;        x1 = x;        dst1 = dst;                while (w1--) {            c = *src1++;            if (c != cxx) {                if (c != lastc)                    set_color (lastc = c);                select_and_set_mask (mask[x1 & 7]);                RMW (dst1);            }            if ((++x1 & 7) == 0) dst1++;        }        dst += BYTESPERLINE(psd);        src += srcwidth;    }}static void _vga16_getbox (PSD psd, int x, int y, int w, int h, gal_uint8 *dst, int dstwidth){    gal_uint8*        src;    gal_uint8*        src1;    gal_uint8 *dst1;    int        plane, c, w1, x1;    src = SCREENBASE(psd) + (x>>3) + y * BYTESPERLINE(psd);    while ( h--) {        dst1 = dst;        w1 = w;        x1 = x;        src1 = src;        while (w1--) {            c = 0;            for(plane=0; plane<4; ++plane) {                set_read_plane(plane);                if(GETBYTE(src1) & mask[x1&7])                    c |= 1 << plane;            }            if ((++x1 & 7) == 0) src1++;            *dst1++ = c;            }        src += BYTESPERLINE(psd);        dst += dstwidth;    }}/* copy from vga memory to vga memory, psd's ignored for speed*/static void _vga16_to_vga16_blit(PSD dstpsd, int dstx, int dsty, int w, int h, PSD srcpsd, int srcx, int srcy){    gal_uint8*    dst;    gal_uint8*    src;    int    i, plane;    int    x1, x2;    set_enable_sr(0);    dst = SCREENBASE(dstpsd) + (dstx>>3) + dsty * BYTESPERLINE(dstpsd);    src = SCREENBASE(srcpsd) + (srcx>>3) + srcy * BYTESPERLINE(srcpsd);    x1 = dstx>>3;    x2 = (dstx + w - 1) >> 3;    while(--h >= 0) {        for(plane=0; plane<4; ++plane) {            gal_uint8* d = dst;            gal_uint8* s = src;            set_read_plane(plane);            set_write_planes(1 << plane);            /* FIXME: only works if srcx and dstx are same modulo*/            if(x1 == x2) {                  select_and_set_mask((0xff >> (x1 & 7)) & (0xff << (7 - (x2 & 7))));                PUTBYTE(d, GETBYTE(s));            } else {                select_and_set_mask(0xff >> (x1 & 7));                PUTBYTE(d++, GETBYTE(s++));                set_mask(0xff);                  for(i=x1+1; i<x2; ++i)                    PUTBYTE(d++, GETBYTE(s++));                  set_mask(0xff << (7 - (x2 & 7)));                PUTBYTE(d, GETBYTE(s));            }        }        dst += BYTESPERLINE(dstpsd);        src += BYTESPERLINE(srcpsd);    }    set_write_planes(0x0f);    set_enable_sr(0x0f);}/* copy from linear 4 bit mem to vga memory*/static void _mem16_to_vga16_blit(PSD dstpsd, int dstx, int dsty, int w, int h, PSD srcpsd, int srcx, int srcy){    gal_uint8*    dst;    gal_uint8 *    src;    int    slinelen = srcpsd->linelen;    int    c, lastc = -1;    set_op(0);        /* mode_table[MODE_SET]*/    dst = SCREENBASE(dstpsd) + (dstx>>3) + dsty * BYTESPERLINE(dstpsd);    src = (gal_uint8 *)srcpsd->addr + srcx + srcy * slinelen;    while (w--) {        gal_uint8  *src1 = src;        gal_uint8* dst1 = dst;        int h1 = h;        select_and_set_mask (mask[dstx & 7]);        while (h1--) {            c = *src1;            if (c != lastc)                set_color (lastc = c);            RMW (dst1);            src1 += slinelen;            dst1 += BYTESPERLINE(dstpsd);        }        if ((++dstx & 7) == 0) dst++;        src++;    }}/* srccopy bitblt, opcode is currently ignored *//* copy from vga memory to memdc */static void _vga16_to_mem16_blit(PSD dstpsd, int dstx, int dsty, int w, int h, PSD srcpsd, int srcx, int srcy){    gal_uint8*        src, src1;    gal_uint8    *dst, *dst1;    int        plane, c, w1, x1;    src = SCREENBASE(srcpsd) + (srcx>>3) + srcy * BYTESPERLINE(srcpsd);    dst= (gal_uint8 *)dstpsd->addr + dsty * dstpsd->linelen + dstx;    while (h--) {        w1 = w;        x1 = srcx;        src1 = src;        dst1 = dst;        while (w1--) {            c = 0;            for(plane=0; plane<4; ++plane) {                set_read_plane(plane);                if(GETBYTE(src1) & mask[x1&7])                    c |= 1 << plane;            }            if ((++x1 & 7) == 0) src1++;            *dst1++ = c;            }        src += BYTESPERLINE(srcpsd);        dst += BYTESPERLINE(dstpsd);    }}static int fbvga16_init (PSD psd){    if (!psd->size) {        if (psd->flags & PSF_MEMORY) {             psd->size = psd->yres * psd->linelen;            return 1;        }        /* allow direct access to vga controller space*/        if(ioperm(0x3c0, 0x20, 1) == -1) {            fprintf(stderr,"GAL ENGINE: Can't set i/o permissions: %m\n");            return 0;        }        /* framebuffer mmap size*/        psd->size = 0x10000;        /* Set up some default values for the VGA Graphics Registers. */        set_enable_sr (0x0f);        set_op (0);        set_mode (0);    }    return 1;}/* Set pixel at x, y, to gal_pixel c*/static void fbvga16_drawpixel (PSD psd, int x, int y, gal_pixel c){    gal_uint8  * addr = (gal_uint8 *) psd->addr;    if (psd->flags & PSF_MEMORY) {        addr += (x >> 1) + y * psd->linelen;        if(psd->gr_mode == MODE_XOR)            *addr ^= c << ((1 - (x & 1)) << 2);        else            *addr = (*addr & notmask[x & 1]) | (c << ((1-(x & 1)) << 2));        return;    }     set_op(mode_table[psd->gr_mode]);    set_color (c);    select_and_set_mask (mask[x & 7]);    RMW ((gal_uint8*)SCREENBASE(psd) + (x >> 3) + y * BYTESPERLINE(psd));}/* Read pixel at x, y*/static gal_pixel fbvga16_readpixel (PSD psd, int x, int y){    gal_uint8  * addr = (gal_uint8 *) psd->addr;    gal_uint8*        src;    int        plane;    gal_pixel c = 0;    if (psd->flags & PSF_MEMORY) 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久夜色精品国产欧美乱极品| 亚洲高清一区二区三区| 激情久久五月天| 日韩欧美国产一区二区三区 | 中文字幕亚洲区| 不卡的av电影在线观看| 亚洲女爱视频在线| 欧美在线视频你懂得| 日韩福利电影在线| 久久伊99综合婷婷久久伊| 国产成人午夜片在线观看高清观看| 久久九九99视频| 91麻豆视频网站| 日韩主播视频在线| 久久午夜免费电影| 91丝袜美腿高跟国产极品老师 | 久久久99精品免费观看不卡| 成人丝袜18视频在线观看| 一区二区三区成人| 欧美一区二区三区婷婷月色| 国产精品99久久久| 亚洲黄色免费网站| 久久综合网色—综合色88| 成人免费av在线| 亚洲国产综合在线| 久久精品亚洲乱码伦伦中文 | 欧美精品黑人性xxxx| 国产一区二区剧情av在线| 国产精品理伦片| 欧美一区二区三区免费观看视频| 国产成人在线免费| 性做久久久久久久免费看| 亚洲国产精品精华液2区45| 欧美性大战久久久| 成人晚上爱看视频| 懂色一区二区三区免费观看| 欧美国产日本韩| 日韩一二在线观看| 91影院在线免费观看| 九九视频精品免费| 亚洲自拍偷拍综合| 中文字幕精品综合| 精品国产乱子伦一区| 欧美这里有精品| av高清久久久| 国产在线不卡一卡二卡三卡四卡| 亚洲一区二区精品视频| 国产精品成人一区二区三区夜夜夜| 欧美妇女性影城| 色欧美片视频在线观看| 成人网页在线观看| 国产成人一级电影| 久久99久久久欧美国产| 天天av天天翘天天综合网| 亚洲精品第1页| 亚洲国产激情av| 久久精品欧美日韩精品| 日韩一区和二区| 91精品欧美久久久久久动漫 | 国产精品资源在线看| 视频一区二区中文字幕| 一区二区三区国产精华| 国产精品日韩成人| 中文字幕精品一区二区精品绿巨人 | 一区二区三区四区不卡视频| 中文一区在线播放| 久久精品人人做| 久久新电视剧免费观看| 欧美成人高清电影在线| 日韩免费成人网| 在线电影一区二区三区| 欧美在线观看一二区| 91福利视频在线| 色999日韩国产欧美一区二区| 国产不卡视频一区二区三区| 国产福利精品一区二区| 国产精品77777竹菊影视小说| 狠狠色丁香九九婷婷综合五月| 精品一区二区三区免费毛片爱| 久久国产精品99久久久久久老狼| 亚洲成a人v欧美综合天堂| 亚洲一区二区三区四区五区中文| 亚洲最大成人综合| 亚洲国产日韩综合久久精品| 日韩国产精品久久久| 免费在线视频一区| 九九在线精品视频| 成人爱爱电影网址| 91老师国产黑色丝袜在线| 欧美在线看片a免费观看| 在线综合亚洲欧美在线视频| 日韩精品在线一区| 国产免费久久精品| 亚洲最大的成人av| 久久精品国产**网站演员| 国产美女精品人人做人人爽| 成人成人成人在线视频| 精品视频全国免费看| 日韩一级大片在线观看| 欧美国产日韩一二三区| 一区二区三区欧美久久| 精品综合久久久久久8888| 成人久久久精品乱码一区二区三区| 91麻豆视频网站| 日韩欧美成人一区二区| 欧美高清在线视频| 日韩成人精品在线观看| 国产91高潮流白浆在线麻豆| 色久优优欧美色久优优| 欧美tickling网站挠脚心| 亚洲欧美一区二区不卡| 秋霞国产午夜精品免费视频| 国产成人精品免费在线| 欧美日韩中文一区| 久久亚洲一级片| 欧美人伦禁忌dvd放荡欲情| 成人av在线播放网站| 欧美亚洲日本一区| 国产日韩欧美综合在线| 污片在线观看一区二区| av在线不卡网| 欧美一区二区三区四区在线观看| 国产精品免费视频观看| 美日韩一区二区三区| 91在线porny国产在线看| 精品欧美一区二区在线观看| 亚洲国产视频在线| aa级大片欧美| 久久久午夜电影| 日韩黄色在线观看| 91小视频免费看| 国产欧美一区二区三区在线老狼| 午夜免费欧美电影| 91农村精品一区二区在线| 久久色成人在线| 日韩成人av影视| 欧美天堂亚洲电影院在线播放| 国产欧美综合在线观看第十页| 奇米一区二区三区| 欧美少妇一区二区| 国产精品国产自产拍高清av王其| 另类小说综合欧美亚洲| 欧美美女黄视频| 亚洲午夜免费视频| 色婷婷综合久久久中文字幕| 国产欧美视频在线观看| 国产主播一区二区| 日韩亚洲欧美中文三级| 亚洲va韩国va欧美va| 91久久国产最好的精华液| 国产精品电影一区二区| 国产白丝网站精品污在线入口| 精品奇米国产一区二区三区| 丝袜诱惑亚洲看片| 欧美日韩国产一区| 亚洲午夜私人影院| 在线观看国产精品网站| 亚洲狼人国产精品| 色呦呦网站一区| 一区二区在线观看视频| 一本一本久久a久久精品综合麻豆| 日本一区二区高清| 成人97人人超碰人人99| 国产精品国产自产拍高清av王其| 成人一级黄色片| 中文字幕在线不卡视频| www.一区二区| 亚洲美腿欧美偷拍| 在线亚洲一区二区| 亚洲黄色av一区| 欧美视频在线观看一区二区| 夜夜嗨av一区二区三区四季av| 欧洲精品在线观看| 性做久久久久久久免费看| 欧美一区二区三区视频免费播放 | 91偷拍与自偷拍精品| 国产精品白丝jk黑袜喷水| 欧美丰满少妇xxxbbb| 久久精品国产亚洲高清剧情介绍 | 成人免费视频一区| 日韩一区日韩二区| 在线视频中文字幕一区二区| 亚洲成av人影院在线观看网| 91精品国产综合久久久久久漫画| 狠狠狠色丁香婷婷综合久久五月| 中文字幕欧美日本乱码一线二线| 成人国产精品免费观看动漫| 亚洲视频你懂的| 欧美日韩综合一区| 美腿丝袜亚洲综合| 国产精品卡一卡二| 欧美区一区二区三区| 久久99久久久欧美国产| 亚洲国产精品成人综合色在线婷婷| 91美女片黄在线观看| 日韩va欧美va亚洲va久久| 久久久久久久综合日本| 91久久线看在观草草青青| 免费成人在线观看| 综合亚洲深深色噜噜狠狠网站|