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

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

?? uifltk-ui.cpp

?? 一個任天堂掌上游戲機(jī)NDS的源代碼
?? CPP
字號:
/*************************************************************************** DSemu - The Next Generation                                             ** Fltk user interface: Interface handlers [uifltk-ui.cpp]                 ** Copyright Imran Nazar, 2005; released under the BSD public licence.     ** Fltk used under the terms of the LGPL.                                  ***************************************************************************/#include <map>#include <FL/Fl.h>#include <FL/fl_draw.H>#include "uifltk.h"#include "plugin.h"#include "log.h"#include "w32compile.h"//---Static private class members, and a fair few of them------------------u8 *UIFltk::UI::outbuf;UIFltk::UI *UIFltk::ui=NULL;Fl_Menu_Bar *UIFltk::UI::mbar;Fl_Box *UIFltk::UI::sbarl, *UIFltk::UI::sbarr;Fl_Box *UIFltk::UI::display;Fl_Group *UIFltk::UI::mbarcon;std::map<int, UIFltk::UI::SubWindow*> UIFltk::UI::subwindows;std::deque<EventMsg> UIFltk::UI::events;MMU32Plugin *UIFltk::UI::mmu, *UIFltk::UI::mmuSub;CPUPlugin *UIFltk::UI::cpu, *UIFltk::UI::cpuSub;GPUPlugin *UIFltk::UI::gpu;APUPlugin *UIFltk::UI::apu;Plugin *UIFltk::UI::timer;std::string UIFltk::UI::ROMpath;int UIFltk::UI::loaded=0;int UIFltk::UI::running=0;int UIFltk::UI::stepping=0;int UIFltk::UI::frames=0;int UIFltk::UI::DSmode=0;uint64_t UIFltk::UI::timestamp=0;int UIFltk::UI::cpuStatMode=3;int UIFltk::UI::mmuDumpAddr=0x04000000;int UIFltk::UI::mmuDumpMode=1;u16 UIFltk::UI::keys=0xFFFF;REQPTR UIFltk::pRequest;UNREQPTR UIFltk::pUnrequest;UIFltk::UI::BkptWindow *UIFltk::UI::bkptWnd;int UIFltk::UI::bkptVisible=0;UIFltk::UI::LogWindow *UIFltk::UI::logWnd;int UIFltk::UI::logVisible=0;UIFltk::UI::AboutWindow *UIFltk::UI::aboutWnd;int UIFltk::UI::aboutVisible=0;// Used by the Events map to work out sorting order (sort on timestamp)bool operator<(const EventMsg &a, const EventMsg &b) { return a.getTime()<b.getTime(); }		  //---Handlers--------------------------------------------------------------// Initialise the windowUIFltk::UI::UI(int x, int y, int w, int h, const char *title) : Fl_Double_Window(x,y,w,h,title){    // We couldn't set these callbacks statically, so do it now.    menu[MENU_FILE_OPENGBA].callback(cbOpenGBA, this);    menu[MENU_FILE_OPENDS].callback(cbOpenDS, this);    menu[MENU_FILE_CLOSE].callback(cbClose, this);    menu[MENU_FILE_EXIT].callback(cbExit, this);    menu[MENU_DEBUG_RUN].callback(cbRun, this);    menu[MENU_DEBUG_RESET].callback(cbReset, this);    menu[MENU_DEBUG_BKPT].callback(cbBkpt, this);    menu[MENU_DEBUG_STEP].callback(cbStep, this);    menu[MENU_DEBUG_ASTEP].callback(cbAStep, this);    menu[MENU_VIEW_LOG].callback(cbLog, this);    menu[MENU_HELP_ABOUT].callback(cbAbout, this);        // Define the window controls    begin();    	display = new Fl_Box(0, 18, 240, 1);	display->box(FL_NO_BOX);	        mbarcon = new Fl_Group(0, 0, 240, 18);	mbarcon->box(FL_NO_BOX);	mbarcon->begin();	            mbar = new Fl_Menu_Bar(0, 0, 240, 18);            mbar->copy(&menu[0]);            mbar->box(FL_FLAT_BOX);            mbar->align(FL_ALIGN_INSIDE|FL_ALIGN_TOP|FL_ALIGN_LEFT);	mbarcon->end();	sbarl = new Fl_Box(0, 19, 56, 18);	sbarl->box(FL_THIN_DOWN_BOX);	sbarl->labelsize(11);	sbarl->align(FL_ALIGN_INSIDE|FL_ALIGN_TOP|FL_ALIGN_LEFT);		sbarr = new Fl_Box(56, 19, 184, 18, "Application loaded.");	sbarr->box(FL_THIN_DOWN_BOX);	sbarr->labelsize(11);	sbarr->align(FL_ALIGN_INSIDE|FL_ALIGN_TOP|FL_ALIGN_LEFT);	    end();    Fl::visual(FL_RGB);    resizable(display);    // Set the minimal size of the window (at least menu and statusbar)    size_range(240,37, 240,37);    color(FL_BLACK);    show();    logVisible=0;      Logger::log(pluginName) << "Interface brought up.";}// Shut down interface: free up the log windowUIFltk::UI::~UI(){    if(logWnd) { logWnd->hide(); delete logWnd; logWnd=NULL; }}// Redraw window: fill the framebuffervoid UIFltk::UI::draw(){    Fl_Double_Window::draw();    if(loaded && outbuf)        fl_draw_image(outbuf, 0,18, 240,160, 4);}// Make a subwindowint UIFltk::UI::subwinCreate(int xd, int yd, const char *title, u32 *buf){    int id;        // Generate a random ID; if it's already in the map, make another.    do id=(0xCAFE0003+(rand()&32767)); while(subwindows.find(id) != subwindows.end());    // Create a new entry in the subwindow map.    subwindows[id] = new SubWindow(xd, yd, this);    subwindows[id]->winID = id;    subwindows[id]->buffer = buf;    subwindows[id]->visible = 0;    subwindows[id]->title = title;    subwindows[id]->label(title);    // Add the title to the View menu as a checkbox option.    Fl_Menu_Item item={title,0,cbSub,0,0,0,0,11};    item.callback(cbSub,this);    item.flags=FL_MENU_TOGGLE;    menu.insert(menu.begin()+MENU_OPT-2, item);    mbar->copy(&menu[0]);        char str[64];    sprintf(str, "Subwindow %08X created.", id);    Logger::log(pluginName) << str;        return id;}// Refresh a subwindow; tell it to redraw itself.void UIFltk::UI::subwinRefresh(int id){    subwindows[id]->redraw();}// Run the emulation for a framevoid UIFltk::UI::execFrame(){    if(loaded && running)    {	int t, clk, frameclk=0, cyc;	EventMsg ev;	// Pop an event from the events queue, run until the time it says,	// then do the action it says. Keep doing this until we run out of	// time for this frame.	do {	    if(!events.empty())	    {                ev = events.front();		events.pop_front();                t=ev.getTime()-timestamp;//                printf("Time %lld: Executing %d cycles to %lld. Queue is %d entries.\n", timestamp, t, ev.getTime(), events.size());	        clk=0;                if(t)                {                    do                    {			if(DSmode)			{			    cyc = cpu->exec(1);			    if(cyc>=0) clk+=cyc;			    else { timestamp -= cyc; events.push_front(EventMsg(ev)); cbRunI(); return; }			    cyc = cpu->exec(1);			    if(cyc>=0) clk+=cyc;			    else { timestamp -= cyc; events.push_front(EventMsg(ev)); cbRunI(); return; }			    cyc = cpuSub->exec(1);			    if(cyc<0) { events.push_front(EventMsg(ev)); cbRunI(); return; }			} else {                            cyc = cpu->exec(t-clk);                            if(cyc >= 0) clk += cyc;                            else	                    {                                // If we hit a breakpoint, the return will be negative.                                // Put the event back, because we didn't finish it yet.                                timestamp -= cyc;//                                printf("Breakpoint reached at %lld.\n", timestamp);                                events.push_front(EventMsg(ev));                                cbRunI(); return;                            }			}                    } while(clk<t);                }                timestamp = ev.getTime(); frameclk+=t;                ev.callFunc();	    }	} while(frameclk < 228*1232);	frames++;	redraw();    }}// Run the emulation for at most one instructionvoid UIFltk::UI::execStep(){    static EventMsg ev; static int t=-8388608, subflag=0; int clk=0;    // If there's no event to head towards, don't bother.    if(!events.empty())    {        ev = events.front(); t=ev.getTime()-timestamp;//        printf("Time %lld: %d left to next event. Queue is %d entries.\n", timestamp, t, events.size());        // If this event is now, run the callback.	if(t<=0)	{//	    printf("Time reached. Popping event.\n");	    events.pop_front();	    ev.callFunc();	}	// Execute "one clock"; will always run at least one instruction.	if(DSmode && subflag)	{	    clk = cpu->exec(1);	    cpuSub->exec(1);	}	else clk = cpu->exec(1);	subflag=!subflag;        t-=clk; timestamp+=clk;//	eventPush(ev.getTime(), ev.getType(), ev.getFunc(), ev.getData());    }    frames=0; redraw();}// If a plugin wants to know where the UI is, tell it.uint64_t UIFltk::UI::getTimestamp(){    return timestamp;}// Push an event into the queue at the back, and sort by timestamp.void UIFltk::UI::eventPush(u32 etime, int type, vfptr func, void *data){    events.push_back(EventMsg(timestamp+etime, type, func, data, 0));    std::sort(events.begin(), events.end());//    printf("Pushed at %lld: In %d cycles, call %08X(%08X). %d in queue.\n", timestamp, etime, func, data, events.size());}// Window event handlerint UIFltk::UI::handle(int e){    int ret = Fl_Window::handle(e);    // If there are any subwindows with the event ID, something made that    // subwindow hidden. Update the status for that subwindow.    if(subwindows.find(e) != subwindows.end())    {	if(subwindows[e]->visible) cbSubI(subwindows[e]->title);    }        switch(e)    {        case FL_HIDE:	    if(loaded) cbCloseI();	    break;	case 0xBEEF0001:	    logVisible=1; cbLogI(); break;	case 0xBEEF0002:	    aboutVisible=1; cbAboutI(); break;	case 0xBEEF0003:	    bkptVisible=1; cbBkptI(); break;	// If a key was hit, update REGKEYS.	// TODO: Configurable keys	case FL_KEYDOWN:	    if(loaded)	    {		switch(Fl::event_key())		{                    case 'z': keys &= ~0x0001; break;                    case 'x': keys &= ~0x0002; break;                    case FL_BackSpace: keys &= ~0x0004; break;                    case FL_Enter: keys &= ~0x0008; break;                    case FL_Right: keys &= ~0x0010; break;                    case FL_Left: keys &= ~0x0020; break;                    case FL_Up: keys &= ~0x0040; break;                    case FL_Down: keys &= ~0x0080; break;                    case 's': keys &= ~0x0100; break;                    case 'a': keys &= ~0x0200; break;		}	    }	    break;	case FL_KEYUP:	    if(loaded)	    {		switch(Fl::event_key())		{                    case 'z': keys |= 0x0001; break;                    case 'x': keys |= 0x0002; break;                    case FL_BackSpace: keys |= 0x0004; break;                    case FL_Enter: keys |= 0x0008; break;                    case FL_Right: keys |= 0x0010; break;                    case FL_Left: keys |= 0x0020; break;                    case FL_Up: keys |= 0x0040; break;                    case FL_Down: keys |= 0x0080; break;                    case 's': keys |= 0x0100; break;                    case 'a': keys |= 0x0200; break;		}	    }	    break;    }    return ret;}// Update the status bar with the current FPSvoid UIFltk::UI::cbFPScount(void *in){    static char str[64];    if(((UIFltk::UI*)in)->frames)    {        sprintf(str, "%d fps", ((UIFltk::UI*)in)->frames);        ((UIFltk::UI*)in)->sbarr->label(str);        ((UIFltk::UI*)in)->frames=0;    }    Fl::repeat_timeout(1.0, cbFPScount);}// Key I/O accessorsu8 UIFltk::UI::keyRdB(u32 a){    switch(a&0xF)    {	case 0: return keys&0xFF;        case 1: return keys>>8;	default: return 0xFF;    }}u16 UIFltk::UI::keyRdH(u32 a){    switch(a&0xE)    {	case 0: return keys;	default: return 0xFFFF;    }}u32 UIFltk::UI::keyRdW(u32 a){    switch(a&0xC)    {	case 0: return keys;	default: return 0xFFFFFFFF;    }}// TODO: Key input handlers are pending interruptsvoid UIFltk::UI::keyWrB(u32 a, u8 d){}void UIFltk::UI::keyWrH(u32 a, u16 d){}void UIFltk::UI::keyWrW(u32 a, u32 d){}/*** EOF: uifltk-ui.cpp **************************************************/

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成a人在线观看| 在线免费观看不卡av| 精品一区二区综合| 狠狠v欧美v日韩v亚洲ⅴ| 国产成人一级电影| 91在线你懂得| 在线播放中文一区| 精品噜噜噜噜久久久久久久久试看| 久久免费偷拍视频| 国产三级久久久| 亚洲精品欧美激情| 日韩精品免费视频人成| 久草在线在线精品观看| 国产成人免费高清| 免费日韩伦理电影| 色天使久久综合网天天| 日本国产一区二区| 欧美人与禽zozo性伦| 欧美精品乱码久久久久久按摩 | 欧美日韩精品欧美日韩精品一综合| 日韩精品一级二级 | 国产超碰在线一区| 亚洲欧美国产77777| 欧美岛国在线观看| 国产成人综合在线播放| 久久久久免费观看| 在线观看av一区二区| 欧美亚洲国产bt| 欧美猛男gaygay网站| 精品国产一区a| 国产精品国产三级国产三级人妇| 成人免费一区二区三区视频 | 色综合久久久久久久久久久| 91在线观看高清| 久久免费午夜影院| 91精品免费在线| 久久精品在这里| 日韩二区三区四区| 成人动漫视频在线| 欧美亚男人的天堂| 综合分类小说区另类春色亚洲小说欧美| 亚洲午夜激情网页| 白白色亚洲国产精品| 91精品国产综合久久精品| 中文字幕第一区第二区| 另类的小说在线视频另类成人小视频在线| av在线不卡网| 国产喷白浆一区二区三区| 蜜桃视频一区二区| 色婷婷综合中文久久一本| 中文字幕第一页久久| 美国毛片一区二区| 91精品久久久久久蜜臀| 亚洲免费观看高清| 久久99久国产精品黄毛片色诱| 欧美性猛交xxxx乱大交退制版 | 久久众筹精品私拍模特| 18欧美亚洲精品| 国产又黄又大久久| 欧美一区二区三区精品| 亚洲高清免费观看高清完整版在线观看 | 国产精品1区2区| 日韩精品一区二区三区视频在线观看| 亚洲夂夂婷婷色拍ww47| av电影在线观看完整版一区二区| 欧美一区二区三区视频免费| 午夜精品影院在线观看| 欧亚洲嫩模精品一区三区| 一区二区三区四区精品在线视频 | 91浏览器在线视频| 国产精品久久777777| 亚洲风情在线资源站| 欧美视频中文一区二区三区在线观看 | 一区二区三区久久久| 色哟哟国产精品| 亚洲视频在线一区| 在线国产亚洲欧美| 亚洲精品ww久久久久久p站| 成人黄色软件下载| 亚洲色图视频网| 91亚洲精品一区二区乱码| 亚洲男人都懂的| 91欧美一区二区| 亚洲情趣在线观看| 欧美在线免费播放| 一区二区日韩电影| 欧美日韩激情在线| 日韩主播视频在线| 欧洲另类一二三四区| 亚洲v中文字幕| 91精品在线麻豆| 激情图片小说一区| 日韩免费视频线观看| 免费在线视频一区| 欧美电视剧在线观看完整版| 捆绑调教一区二区三区| 久久久久国产精品人| 成人免费高清视频在线观看| 国产午夜精品福利| av网站免费线看精品| 亚洲精品中文字幕在线观看| 欧美日本免费一区二区三区| 丝袜诱惑亚洲看片| 久久久久久久久岛国免费| 久久99在线观看| 国产视频一区在线播放| www.日韩大片| 中文字幕一区视频| 欧美中文字幕久久| 日韩国产欧美视频| 欧美成人福利视频| 成人一区二区在线观看| 最近中文字幕一区二区三区| 欧美视频中文一区二区三区在线观看| 欧美aaaaa成人免费观看视频| 精品福利在线导航| 国产高清久久久久| 亚洲激情图片qvod| 日韩一区和二区| 成人午夜碰碰视频| 亚洲国产你懂的| 久久久久高清精品| 91浏览器打开| 久热成人在线视频| 国产精品热久久久久夜色精品三区| 国产91精品一区二区| 视频一区欧美日韩| 国产亚洲精品中文字幕| 在线观看一区不卡| 美女国产一区二区| 一区二区三区在线视频免费观看| 欧美一区二区精品| 午夜影院久久久| 中文字幕欧美三区| 欧美美女网站色| 99精品视频一区| 狂野欧美性猛交blacked| 一区二区三区四区不卡在线| 日韩视频国产视频| 91免费看片在线观看| 麻豆一区二区在线| 亚洲视频一区在线| 久久九九全国免费| 欧美日韩视频在线观看一区二区三区 | 中文字幕 久热精品 视频在线 | 国产精品免费久久| 欧美日韩精品欧美日韩精品一综合| 国产99久久久国产精品潘金网站| 亚洲地区一二三色| 一色桃子久久精品亚洲| 宅男噜噜噜66一区二区66| 激情综合色播五月| 亚洲国产婷婷综合在线精品| 久久久99精品久久| 欧美第一区第二区| 欧美三级在线播放| 色综合久久综合中文综合网| 黄页视频在线91| 日韩国产精品久久久久久亚洲| 国产精品福利一区| 欧美一区二区久久| 欧美日韩激情一区二区三区| av欧美精品.com| 成人性视频免费网站| 久99久精品视频免费观看| 日日嗨av一区二区三区四区| 亚洲人成网站影音先锋播放| 精品国产91乱码一区二区三区| 欧美日韩一区二区欧美激情| 91蜜桃在线免费视频| 成人不卡免费av| 国产精品一区一区| 九色porny丨国产精品| 午夜电影网亚洲视频| 国产精品久久久一本精品| 欧美一区二区三区成人| 欧美午夜寂寞影院| 欧美视频一区二区三区四区| jizzjizzjizz欧美| 成人午夜私人影院| 国产精品亚洲а∨天堂免在线| 精品在线一区二区| 日韩 欧美一区二区三区| 午夜视黄欧洲亚洲| 亚洲va天堂va国产va久| 国产精品久久福利| 精品久久一区二区| 欧美mv和日韩mv的网站| 日韩视频免费观看高清在线视频| 3d动漫精品啪啪1区2区免费| 欧美丰满少妇xxxxx高潮对白| 欧美日韩视频在线观看一区二区三区| 欧美日韩aaa| 欧美亚洲一区二区三区四区| 欧美日韩aaaaaa| 69堂国产成人免费视频| 日韩欧美中文字幕公布| 日韩欧美资源站| 91精品国产色综合久久| 亚洲精品一线二线三线|