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

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

?? sdl_epocvideo.cpp

?? Simple DirectMedia Layer - Simple DirectMedia Layer 是一個跨平臺的多媒體庫設計用來提供快速圖形framebuffer和音頻驅動。應用MPEG為軟件
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/*    SDL - Simple DirectMedia Layer    Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002  Sam Lantinga    This library is free software; you can redistribute it and/or    modify it under the terms of the GNU Library General Public    License as published by the Free Software Foundation; either    version 2 of the License, or (at your option) any later version.    This library 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    Library General Public License for more details.    You should have received a copy of the GNU Library General Public    License along with this library; if not, write to the Free    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA    Sam Lantinga    slouken@libsdl.org*//*    SDL_epocvideo.cpp    Epoc based SDL video driver implementation    Epoc version by Hannu Viitala (hannu.j.viitala@mbnet.fi)*/#include <stdlib.h>#include <stdio.h>#include <string.h>extern "C" {#include "SDL_error.h"#include "SDL_timer.h"#include "SDL_video.h"#undef NULL#include "SDL_pixels_c.h"};#include "SDL_epocvideo.h"#include "SDL_epocevents_c.h"#include <hal.h>#include <coedef.h>/* For debugging */void RDebug_Print_b(char* error_str, void* param)    {    TBuf8<128> error8((TUint8*)error_str);    TBuf<128> error;    error.Copy(error8);    if (param) //!! Do not work if the parameter is really 0!!        RDebug::Print(error, param);    else         RDebug::Print(error);    }extern "C" void RDebug_Print(char* error_str, void* param)    {    RDebug_Print_b(error_str, param);    }int Debug_AvailMem2()    {    //User::CompressAllHeaps();    TMemoryInfoV1Buf membuf;     User::LeaveIfError(UserHal::MemoryInfo(membuf));    TMemoryInfoV1 minfo = membuf();	return(minfo.iFreeRamInBytes);    }extern "C" int Debug_AvailMem()    {    return(Debug_AvailMem2());    }extern "C" {/* Initialization/Query functions */static int EPOC_VideoInit(_THIS, SDL_PixelFormat *vformat);static SDL_Rect **EPOC_ListModes(_THIS, SDL_PixelFormat *format, Uint32 flags);static SDL_Surface *EPOC_SetVideoMode(_THIS, SDL_Surface *current, int width, int height, int bpp, Uint32 flags);static int EPOC_SetColors(_THIS, int firstcolor, int ncolors,			  SDL_Color *colors);static void EPOC_VideoQuit(_THIS);/* Hardware surface functions */static int EPOC_AllocHWSurface(_THIS, SDL_Surface *surface);static int EPOC_LockHWSurface(_THIS, SDL_Surface *surface);static int EPOC_FlipHWSurface(_THIS, SDL_Surface *surface);static void EPOC_UnlockHWSurface(_THIS, SDL_Surface *surface);static void EPOC_FreeHWSurface(_THIS, SDL_Surface *surface);static void EPOC_DirectUpdate(_THIS, int numrects, SDL_Rect *rects);static int EPOC_Available(void);static SDL_VideoDevice *EPOC_CreateDevice(int devindex);/* Mouse functions */static WMcursor *EPOC_CreateWMCursor(_THIS, Uint8 *data, Uint8 *mask, int w, int h, int hot_x, int hot_y);static void EPOC_FreeWMCursor(_THIS, WMcursor *cursor);static int EPOC_ShowWMCursor(_THIS, WMcursor *cursor);/* !! Table for fast conversion from 8 bit to 12 bit */static TUint16 EPOC_HWPalette_256_to_4k[256];VideoBootStrap EPOC_bootstrap = {	"epoc", "EPOC system",    EPOC_Available, EPOC_CreateDevice};const TUint32 WindowClientHandle = 9210; //!!/* Epoc video driver bootstrap functions */static int EPOC_Available(void){    return 1; /* Always available */}static void EPOC_DeleteDevice(SDL_VideoDevice *device){	free(device->hidden);	free(device);}static SDL_VideoDevice *EPOC_CreateDevice(int devindex){	SDL_VideoDevice *device;	/* Allocate all variables that we free on delete */	device = (SDL_VideoDevice *)malloc(sizeof(SDL_VideoDevice));	if ( device ) {		memset(device, 0, (sizeof *device));		device->hidden = (struct SDL_PrivateVideoData *)				malloc((sizeof *device->hidden));	}	if ( (device == NULL) || (device->hidden == NULL) ) {		SDL_OutOfMemory();		if ( device ) {			free(device);		}		return(0);	}	memset(device->hidden, 0, (sizeof *device->hidden));	/* Set the function pointers */	device->VideoInit = EPOC_VideoInit;	device->ListModes = EPOC_ListModes;	device->SetVideoMode = EPOC_SetVideoMode;	device->SetColors = EPOC_SetColors;	device->UpdateRects = NULL;	device->VideoQuit = EPOC_VideoQuit;	device->AllocHWSurface = EPOC_AllocHWSurface;	device->CheckHWBlit = NULL;	device->FillHWRect = NULL;	device->SetHWColorKey = NULL;	device->SetHWAlpha = NULL;	device->LockHWSurface = EPOC_LockHWSurface;	device->UnlockHWSurface = EPOC_UnlockHWSurface;	device->FlipHWSurface = EPOC_FlipHWSurface;	device->FreeHWSurface = EPOC_FreeHWSurface;	device->SetIcon = NULL;	device->SetCaption = NULL;	device->GetWMInfo = NULL;	device->FreeWMCursor = EPOC_FreeWMCursor;	device->CreateWMCursor = EPOC_CreateWMCursor;	device->ShowWMCursor = EPOC_ShowWMCursor;	device->WarpWMCursor = NULL;	device->InitOSKeymap = EPOC_InitOSKeymap;	device->PumpEvents = EPOC_PumpEvents;	device->free = EPOC_DeleteDevice;	return device;}int GetBpp(TDisplayMode displaymode){    TInt numColors = TDisplayModeUtils::NumDisplayModeColors(displaymode);    TInt bitsPerPixel = 1;    for (TInt32 i = 2; i < numColors; i <<= 1, bitsPerPixel++);    return bitsPerPixel;    }void ConstructWindowL(_THIS){	TInt	error;	error = Private->EPOC_WsSession.Connect();	User::LeaveIfError(error);	Private->EPOC_WsScreen=new(ELeave) CWsScreenDevice(Private->EPOC_WsSession);	User::LeaveIfError(Private->EPOC_WsScreen->Construct());	User::LeaveIfError(Private->EPOC_WsScreen->CreateContext(Private->EPOC_WindowGc));	Private->EPOC_WsWindowGroup=RWindowGroup(Private->EPOC_WsSession);	User::LeaveIfError(Private->EPOC_WsWindowGroup.Construct(WindowClientHandle));	Private->EPOC_WsWindowGroup.SetOrdinalPosition(0);    //!!    TBuf<32> winGroupName;    winGroupName.Append(0);    winGroupName.Append(0);    winGroupName.Append(0);// uid    winGroupName.Append(0);    winGroupName.Append(_L("SDL")); // caption    winGroupName.Append(0);    winGroupName.Append(0); //doc name	Private->EPOC_WsWindowGroup.SetName(winGroupName); //!!	Private->EPOC_WsWindow=RWindow(Private->EPOC_WsSession);	User::LeaveIfError(Private->EPOC_WsWindow.Construct(Private->EPOC_WsWindowGroup,WindowClientHandle));	Private->EPOC_WsWindow.SetBackgroundColor(KRgbWhite);    Private->EPOC_WsWindow.Activate();	Private->EPOC_WsWindow.SetSize(Private->EPOC_WsScreen->SizeInPixels()); 	Private->EPOC_WsWindow.SetVisible(ETrue);    Private->EPOC_WsWindowGroupID = Private->EPOC_WsWindowGroup.Identifier();    Private->EPOC_IsWindowFocused = EFalse;}int EPOC_VideoInit(_THIS, SDL_PixelFormat *vformat){    // !!TODO:handle leave functions!    int i;	/* Initialize all variables that we clean on shutdown */   	for ( i=0; i<SDL_NUMMODES; ++i ) {		Private->SDL_modelist[i] = (SDL_Rect *)malloc(sizeof(SDL_Rect));		Private->SDL_modelist[i]->x = Private->SDL_modelist[i]->y = 0;	}	/* Modes sorted largest to smallest !!TODO:sorting order??*/	Private->SDL_modelist[0]->w = 640; Private->SDL_modelist[0]->h = 200; 	Private->SDL_modelist[1]->w = 320; Private->SDL_modelist[1]->h = 200;	Private->SDL_modelist[2]->w = 640; Private->SDL_modelist[2]->h = 400; 	Private->SDL_modelist[3]->w = 640; Private->SDL_modelist[3]->h = 480;	Private->SDL_modelist[4] = NULL;    /* Construct Epoc window */    ConstructWindowL(_this);    /* Initialise Epoc frame buffer */    TDisplayMode displayMode = Private->EPOC_WsScreen->DisplayMode();    #ifndef __WINS__    TScreenInfoV01 screenInfo;	TPckg<TScreenInfoV01> sInfo(screenInfo);	UserSvr::ScreenInfo(sInfo);	Private->EPOC_ScreenSize		= screenInfo.iScreenSize; 	Private->EPOC_DisplayMode		= displayMode;    Private->EPOC_HasFrameBuffer	= screenInfo.iScreenAddressValid;	Private->EPOC_FrameBuffer		= Private->EPOC_HasFrameBuffer ? (TUint8*) screenInfo.iScreenAddress : NULL;	Private->EPOC_BytesPerPixel	    = ((GetBpp(displayMode)-1) / 8) + 1;	Private->EPOC_BytesPerScanLine	= screenInfo.iScreenSize.iWidth * Private->EPOC_BytesPerPixel;    /* It seems that in SA1100 machines for 8bpp displays there is a 512 palette table at the      * beginning of the frame buffer. E.g. Series 7 and Netbook.     * In 12 bpp machines the table has 16 entries.	 */	if (Private->EPOC_HasFrameBuffer && GetBpp(displayMode) == 8)		Private->EPOC_FrameBuffer += 512;	if (Private->EPOC_HasFrameBuffer && GetBpp(displayMode) == 12)		Private->EPOC_FrameBuffer += 16 * 2;    #else /* defined __WINS__ */        /* Create bitmap, device and context for screen drawing */    Private->EPOC_ScreenSize        = Private->EPOC_WsScreen->SizeInPixels();	Private->EPOC_Bitmap = new (ELeave) CWsBitmap(Private->EPOC_WsSession);	Private->EPOC_Bitmap->Create(Private->EPOC_ScreenSize, displayMode);	Private->EPOC_DisplayMode	    = displayMode;    Private->EPOC_HasFrameBuffer    = ETrue;    Private->EPOC_FrameBuffer       = NULL; /* Private->EPOC_Bitmap->DataAddress() can change any time */	Private->EPOC_BytesPerPixel	    = ((GetBpp(displayMode)-1) / 8) + 1;	Private->EPOC_BytesPerScanLine  = Private->EPOC_WsScreen->SizeInPixels().iWidth * Private->EPOC_BytesPerPixel;    #endif /* __WINS__ */    /* The "best" video format should be returned to caller. */    vformat->BitsPerPixel       = /*!!GetBpp(displayMode) */ 8;    vformat->BytesPerPixel      = /*!!Private->EPOC_BytesPerPixel*/ 1;    /* Activate events for me */	Private->EPOC_WsEventStatus = KRequestPending;	Private->EPOC_WsSession.EventReady(&Private->EPOC_WsEventStatus);	Private->EPOC_RedrawEventStatus = KRequestPending;	Private->EPOC_WsSession.RedrawReady(&Private->EPOC_RedrawEventStatus);    Private->EPOC_WsWindow.PointerFilter(EPointerFilterDrag, 0);     Private->EPOC_ScreenOffset = 0;    //!! TODO: error handling    //if (ret != KErrNone)    //    return(-1);    //else	    return(0);}SDL_Rect **EPOC_ListModes(_THIS, SDL_PixelFormat *format, Uint32 flags){    if (format->BitsPerPixel == 12 || format->BitsPerPixel == 8)        return Private->SDL_modelist;    return NULL;}int EPOC_SetColors(_THIS, int firstcolor, int ncolors, SDL_Color *colors){    for(int i = firstcolor; i < ncolors; i++) {	    // 4k value: 000rgb	    TUint16 color4K = 0;        color4K |= (colors[i].r & 0x0000f0) << 4; 	    color4K |= (colors[i].g & 0x0000f0);      	    color4K |= (colors[i].b & 0x0000f0) >> 4;        EPOC_HWPalette_256_to_4k[i] = color4K;    }	return(0);}SDL_Surface *EPOC_SetVideoMode(_THIS, SDL_Surface *current,				int width, int height, int bpp, Uint32 flags){    /* Check parameters */    if (!((width == 640 && height == 200 && bpp == 12) ||          (width == 640 && height == 400 && bpp == 12) ||           (width == 640 && height == 480 && bpp == 12) ||           (width == 320 && height == 200 && bpp == 12) ||           (width == 640 && height == 200 && bpp == 8) ||

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕一区二区三区精华液| 精品国产乱码久久久久久图片| 成人在线一区二区三区| 久久成人综合网| 久久99精品久久久久久国产越南| 视频一区二区中文字幕| 青青草原综合久久大伊人精品| 五月激情丁香一区二区三区| 日韩精品一二区| 麻豆成人91精品二区三区| 九色综合狠狠综合久久| 精品在线亚洲视频| 国产精品一区二区久激情瑜伽 | 日本久久精品电影| 色综合天天性综合| 欧美日韩久久久一区| 91精品国产欧美一区二区成人| 欧美日韩夫妻久久| wwww国产精品欧美| 国产精品久久久久久亚洲伦 | 免费在线观看视频一区| 韩国中文字幕2020精品| 福利一区福利二区| 欧美在线不卡视频| 精品国产百合女同互慰| 国产欧美日韩在线| 亚洲综合在线观看视频| 久久国产乱子精品免费女| 精品综合免费视频观看| 色综合 综合色| 91精品国产麻豆| 国产精品美日韩| 日韩精品乱码免费| 国产91丝袜在线播放0| 在线免费一区三区| 久久亚洲春色中文字幕久久久| 国产精品初高中害羞小美女文| 视频一区二区不卡| 成人激情免费电影网址| 日韩一区二区视频在线观看| 中文字幕一区三区| 欧美aaaaa成人免费观看视频| av电影一区二区| 日韩午夜三级在线| 亚洲欧美成人一区二区三区| 六月丁香综合在线视频| 在线观看欧美精品| 欧美国产一区二区在线观看| 日本不卡视频一二三区| 成人网在线免费视频| 欧美一级二级在线观看| 亚洲精品视频在线| 懂色av中文字幕一区二区三区| 欧美高清视频一二三区| 亚洲欧洲av在线| 国产麻豆精品一区二区| 91精品国模一区二区三区| 亚洲三级在线免费| 粗大黑人巨茎大战欧美成人| 欧美变态tickling挠脚心| 亚洲r级在线视频| 一本一道波多野结衣一区二区| 国产欧美日韩久久| 国产乱码字幕精品高清av | 欧美精品v日韩精品v韩国精品v| 中文字幕免费观看一区| 风流少妇一区二区| 久久精品无码一区二区三区| 精品一区二区三区免费观看| 91精品在线免费观看| 亚洲大片免费看| 欧美婷婷六月丁香综合色| 亚洲美女偷拍久久| 91免费视频观看| 亚洲自拍偷拍九九九| 欧美在线观看你懂的| 亚洲国产cao| 欧美福利视频导航| 日韩影院免费视频| 日韩精品资源二区在线| 久久草av在线| 欧美成人艳星乳罩| 国产成人免费视频网站高清观看视频 | 一区二区三区中文字幕精品精品| 成人av在线播放网站| 亚洲人成小说网站色在线 | 日韩午夜在线影院| 激情综合色综合久久| 精品少妇一区二区三区日产乱码| 国产米奇在线777精品观看| 国产欧美综合在线| 91麻豆高清视频| 亚洲国产中文字幕在线视频综合| 欧美影院一区二区三区| 免费在线欧美视频| 国产欧美一区二区精品忘忧草| 国产一区二区三区国产| 国产精品福利一区二区三区| 欧美性大战久久久| 麻豆国产精品一区二区三区 | 成人综合在线观看| 中文字幕在线一区免费| 欧美精品亚洲二区| 黄色日韩三级电影| 亚洲婷婷综合色高清在线| 欧美二区三区91| 国产aⅴ综合色| 亚洲妇熟xx妇色黄| 久久久美女毛片| 欧美中文字幕不卡| 国产成人自拍在线| 亚洲第一电影网| 国产精品三级久久久久三级| 欧美日韩一二区| 成人免费av在线| 免费在线视频一区| 一区二区三区在线高清| 欧美一二三区在线| 色婷婷一区二区| 国产一二精品视频| 日本人妖一区二区| |精品福利一区二区三区| 精品剧情v国产在线观看在线| 色综合久久综合网97色综合 | 亚洲国产一二三| 亚洲国产激情av| 日韩丝袜情趣美女图片| 99vv1com这只有精品| 国模无码大尺度一区二区三区| 一区二区三区国产豹纹内裤在线| 国产亚洲精品7777| 日韩欧美激情一区| 91精品国产综合久久久久久久久久| 成人综合婷婷国产精品久久免费| 麻豆一区二区三| 亚洲va中文字幕| 亚洲激情网站免费观看| 国产精品色一区二区三区| 久久精品综合网| 欧美大片一区二区三区| 日韩一区二区三区视频| 欧美日韩中文精品| 91官网在线免费观看| 99国产精品99久久久久久| 成人一区二区三区在线观看| 国产一区二区精品久久99| 老司机精品视频在线| 天堂久久久久va久久久久| 亚洲国产视频一区二区| 亚洲综合清纯丝袜自拍| 亚洲国产精品久久久久秋霞影院| 亚洲欧美激情在线| 一区二区三区不卡视频| 一区二区三区 在线观看视频| 亚洲视频在线观看一区| 亚洲欧美日韩精品久久久久| 国产精品免费av| 亚洲欧美日韩国产成人精品影院| 成人免费一区二区三区视频| 国产精品久久久久婷婷| 一区二区三区**美女毛片| 亚洲主播在线播放| 日产国产高清一区二区三区| 午夜欧美电影在线观看| 蜜臀91精品一区二区三区| 美国一区二区三区在线播放| 国内外成人在线视频| 国产91丝袜在线18| 91久久精品网| 欧美军同video69gay| 欧美一区二区在线看| 欧美xxxxx裸体时装秀| 中文字幕二三区不卡| 亚洲女人小视频在线观看| 亚洲高清视频中文字幕| 奇米色777欧美一区二区| 国产伦精品一区二区三区免费| 国产激情视频一区二区在线观看| 成人avav影音| 91精品国产综合久久福利| 欧美成人a∨高清免费观看| 国产精品午夜电影| 五月天激情综合网| 国产成人精品亚洲777人妖 | 国产精品天美传媒沈樵| 亚洲精品综合在线| 日本亚洲电影天堂| av在线不卡观看免费观看| 欧美日韩夫妻久久| 中文字幕高清不卡| 日韩av电影一区| 成人av午夜电影| 日韩小视频在线观看专区| 亚洲欧洲精品一区二区三区| 日本女优在线视频一区二区| 岛国av在线一区| 日韩精品中文字幕一区二区三区| 亚洲欧美综合另类在线卡通| 蜜臀久久99精品久久久久久9| 97国产一区二区|