Csplat::Csplat() { SetName("splat"); //set romset name SetScreen(304,256); SetHighScoreInfo(highscore); SetPort(0,&Port1); SetPort(1,&Port2); SetPort(2,&defenderPort3); SetPort(3,&Port4); SetPort(4,&Port5); AddROM("splat.10", 0xD000,0x1000,0xd1a1f632,ROM_CPU1); AddROM("splat.11", 0xE000,0x1000,0xca8cde95,ROM_CPU1); AddROM("splat.12", 0xF000,0x1000,0x5bee3e60,ROM_CPU1); AddROM("splat.01", 0x10000,0x1000,0x1cf26e48,ROM_CPU1); AddROM("splat.02", 0x11000,0x1000,0xac0d4276,ROM_CPU1); AddROM("splat.03", 0x12000,0x1000,0x74873e59,ROM_CPU1); AddROM("splat.04", 0x13000,0x1000,0x70a7064e,ROM_CPU1); AddROM("splat.05", 0x14000,0x1000,0xc6895221,ROM_CPU1); AddROM("splat.06", 0x15000,0x1000,0xea4ab7fd,ROM_CPU1); AddROM("splat.07", 0x16000,0x1000,0x82fd8713,ROM_CPU1); AddROM("splat.08", 0x17000,0x1000,0x7dded1b4,ROM_CPU1); AddROM("splat.09", 0x18000,0x1000,0x71cbfe5a,ROM_CPU1); AddROM("splat.snd", 0xF000,0x1000,0xa878d5f3,ROM_CPU2); AddROM("decoder.4", 0x0000,0x0200,0xe6631c23,ROM_PROM); AddROM("decoder.6", 0x0200,0x0200,0x83faf25e,ROM_PROM); }
void DrawMenu(char items[][30], int maxitems, int select) { int i,w,p,h; ClearScreen(); /*** Draw Title Centred ***/ p = (480 - (maxitems * font_height)) / 2 + 10; for( i = 0; i < maxitems; i++ ) { w = CentreTextPosition(items[i]); h = GetTextWidth(items[i]); /* if ( i == select ) writex( w, p, h, font_height, items[i], blit_lookup_inv ); else writex( w, p, h, font_height, items[i], blit_lookup );*/ writex( w, p, h, font_height, items[i], i == select ); p += font_height; } SetScreen(); }
Cshadowld::Cshadowld() { SetName("shadowld"); //set romset name SetScreen(288,244); SetHighScoreInfo(highscore); AddROMS1("yd1_p0.bin", 0x000000,0x10000,0x07e49883); AddROMS1("yd1_p1.bin", 0x080000,0x10000,0xa8ea6bd3); AddROMS1("yd1_p2.bin", 0x100000,0x10000,0x62e5bbec); AddROMS1("yd1_p3.bin", 0x180000,0x10000,0xa4f27c24); AddROMS1("yd1_p5.bin", 0x280000,0x10000,0x29a78bd6); AddROMS1("yd3_p6.bin", 0x300000,0x10000,0x93d6811c); AddROMS1("yd3_p7.bin", 0x380000,0x10000,0xf1c271a0); AddROM("yd1_s0.bin", 0x0C000,0x10000,0xa9cb51fb,ROM_CPU3); AddROM("yd1_s1.bin", 0x1C000,0x10000,0x65d1dc0d,ROM_CPU3); AddROM("cus64-64a1.mcu",0x0F000,0x01000,0xffb5c0bd,ROM_CPU4); AddROM("yd_voi-0.bin", 0x10000,0x20000,0x448bc6a1,ROM_CPU4); AddROM("yd_voi-1.bin", 0x30000,0x20000,0x7809035c,ROM_CPU4); AddROM("yd_voi-2.bin", 0x50000,0x20000,0x73bffc16,ROM_CPU4); AddROM("yd_chr-8.bin", 0x00000,0x20000,0x0c8e69d0,ROM_VROM1); AddROM("yd_chr-0.bin", 0x00000,0x20000,0x717441dd,ROM_VROM2); AddROM("yd_chr-1.bin", 0x20000,0x20000,0xc1be6e35,ROM_VROM2); AddROM("yd_chr-2.bin", 0x40000,0x20000,0x2df8d8cc,ROM_VROM2); AddROM("yd_chr-3.bin", 0x60000,0x20000,0xd4e15c9e,ROM_VROM2); AddROM("yd_chr-4.bin", 0x80000,0x20000,0xc0041e0d,ROM_VROM2); AddROM("yd_chr-5.bin", 0xA0000,0x20000,0x7b368461,ROM_VROM2); AddROM("yd_chr-6.bin", 0xC0000,0x20000,0x3ac6a90e,ROM_VROM2); AddROM("yd_chr-7.bin", 0xE0000,0x20000,0x8d2cffa5,ROM_VROM2); AddROM("yd_obj-0.bin", 0x00000,0x20000,0xefb8efe3,ROM_VROM3); AddROM("yd_obj-1.bin", 0x20000,0x20000,0xbf4ee682,ROM_VROM3); AddROM("yd_obj-2.bin", 0x40000,0x20000,0xcb721682,ROM_VROM3); AddROM("yd_obj-3.bin", 0x60000,0x20000,0x8a6c3d1c,ROM_VROM3); AddROM("yd_obj-4.bin", 0x80000,0x20000,0xef97bffb,ROM_VROM3); AddROM("yd3_obj5.bin", 0xA0000,0x10000,0x1e4aa460,ROM_VROM3); DupROM(0xB0000); }
Cmysticm::Cmysticm() { SetName("mysticm"); //set romset name SetFlags(F_BONUSRAM); SetScreen(304,256); SetHighScoreInfo(highscore); AddROM("mm02_2.a09",0x0E000,0x1000,0x3a776ea8,ROM_CPU1); AddROM("mm03_2.a10",0x0F000,0x1000,0x6e247c75,ROM_CPU1); AddROM("mm11_1.a18",0x10000,0x2000,0xf537968e,ROM_CPU1); AddROM("mm09_1.a16",0x12000,0x2000,0x3bd12f6c,ROM_CPU1); AddROM("mm07_1.a14",0x14000,0x2000,0xea2a2a68,ROM_CPU1); AddROM("mm05_1.a12",0x16000,0x2000,0xb514eef3,ROM_CPU1); AddROM("mm18_1.a26",0x20000,0x2000,0x9b391a81,ROM_CPU1); AddROM("mm16_1.a24",0x22000,0x2000,0x399e175d,ROM_CPU1); AddROM("mm14_1.a22",0x24000,0x2000,0x191153b1,ROM_CPU1); AddROM("mm10_1.a17",0x30000,0x2000,0xd6a37509,ROM_CPU1); AddROM("mm08_1.a15",0x32000,0x2000,0x6f1a64f2,ROM_CPU1); AddROM("mm06_1.a13",0x34000,0x2000,0x2e6795d4,ROM_CPU1); AddROM("mm04_1.a11",0x36000,0x2000,0xc222fb64,ROM_CPU1); AddROM("mm17_1.a25",0x40000,0x2000,0xd36f0a96,ROM_CPU1); AddROM("mm15_1.a23",0x42000,0x2000,0xcd5d99da,ROM_CPU1); AddROM("mm13_1.a21",0x44000,0x2000,0xef4b79db,ROM_CPU1); AddROM("mm12_1.a19",0x46000,0x2000,0xa1f04bf0,ROM_CPU1); AddROM("mm01_1.a08",0x0E000,0x2000,0x65339512,ROM_CPU2); AddROM("mm20_1.b57",0x00000,0x2000,0x5c0f4f46,ROM_VROM1); AddROM("mm21_1.b58",0x02000,0x2000,0xcb90b3c5,ROM_VROM1); AddROM("mm19_1.b41",0x04000,0x2000,0xe274df86,ROM_VROM1); }
void RiskGameView::Run() { sf::RenderWindow renderer(sf::VideoMode((unsigned int)SCREEN_WIDTH, (unsigned int)SCREEN_HEIGHT), WINDOW_TITLE); renderer.resetGLStates(); renderer_ = &renderer; AddScreen("statistics", new GameDisplay()); SetScreen("statistics"); sf::Event event; sf::Clock clock; while (renderer.isOpen() && RiskGame::Instance().IsRunning()) { while (renderer.pollEvent(event)) { desktop_.HandleEvent(event); if (event.type == sf::Event::Closed) { renderer.close(); } } desktop_.Update(clock.restart().asSeconds()); renderer.clear(); currentScreen_->Draw(renderer); currentScreen_->Update(); sfgui_.Display(renderer); renderer.display(); } }
static void wpad_config(u8 num) { int i,j; int max = MAX_KEYS; u8 quit; char msg[30]; u32 current = 255; /* check wiimote status */ if (WPAD_Probe(num, ¤t) != WPAD_ERR_NONE) { WaitPrompt("Wiimote is not connected !"); return; } /* index for wpad_keymap */ u8 index = current + (num * 3); /* loop on each mapped keys */ for (i=0; i<max; i++) { /* remove any pending buttons */ while (WPAD_ButtonsHeld(num)) { WPAD_ScanPads(); VIDEO_WaitVSync(); } /* user information */ ClearScreen(); sprintf(msg,"Press key for %s",keys_name[i]); WriteCentre(254, msg); SetScreen(); /* wait for input */ quit = 0; while (quit == 0) { WPAD_ScanPads(); /* get buttons */ for (j=0; j<20; j++) { if (WPAD_ButtonsDown(num) & wpad_keys[j]) { wpad_keymap[index][i] = wpad_keys[j]; quit = 1; j = 20; /* leave loop */ } } } /* wait for input */ } /* loop for all keys */ /* removed any pending buttons */ while (WPAD_ButtonsHeld(num)) { WPAD_ScanPads(); VIDEO_WaitVSync(); } }
bool GERBVIEW_FRAME::Clear_Pcb( bool query ) { int layer; if( GetLayout() == NULL ) return false; if( query && GetScreen()->IsModify() ) { if( !IsOK( this, _( "Current data will be lost?" ) ) ) return false; } GetLayout()->m_Drawings.DeleteAll(); for( layer = 0; layer < GERBVIEW_LAYER_COUNT; layer++ ) { if( g_GERBER_List[layer] ) { g_GERBER_List[layer]->InitToolTable(); g_GERBER_List[layer]->ResetDefaultValues(); } } GetLayout()->SetBoundingBox( EDA_RECT() ); SetScreen( new GBR_SCREEN( GetPageSettings().GetSizeIU() ) ); setActiveLayer(0); m_LayersManager->UpdateLayerIcons(); syncLayerBox(); return true; }
Cbtime::Cbtime() { SetName("btime"); //set romset name SetScreen(256,256,ROTATE_270); SetHighScoreInfo(highscore); SetDip(0,dip1); SetDip(1,dip2); SetPort(0,&btimePort1); SetPort(1,&btimePort2); SetPort(2,&btimePort3); AddROM("aa04.9b", 0xC000,0x1000,0x368a25b5,ROM_CPU1); AddROM("aa06.13b",0xD000,0x1000,0xb4ba400d,ROM_CPU1); AddROM("aa05.10b",0xE000,0x1000,0x8005bffa,ROM_CPU1); AddROM("aa07.15b",0xF000,0x1000,0x086440ad,ROM_CPU1); AddROM("ab14.12h",0xF000,0x1000,0xf55e5211,ROM_CPU2); AddROM("aa12.7k", 0x0000,0x1000,0xc4617243,ROM_VROM1); AddROM("ab13.9k", 0x1000,0x1000,0xac01042f,ROM_VROM1); AddROM("ab10.10k",0x2000,0x1000,0x854a872a,ROM_VROM1); AddROM("ab11.12k",0x3000,0x1000,0xd4848014,ROM_VROM1); AddROM("aa8.13k", 0x4000,0x1000,0x8650c788,ROM_VROM1); AddROM("ab9.15k", 0x5000,0x1000,0x8dec15e6,ROM_VROM1); AddROM("ab00.1b", 0x0000,0x0800,0xc7a14485,ROM_VROM2); AddROM("ab01.3b", 0x0800,0x0800,0x25b49078,ROM_VROM2); AddROM("ab02.4b", 0x1000,0x0800,0xb8ef56c3,ROM_VROM2); AddROM("ab03.6b", 0x0000,0x0800,0xd26bc1f3,ROM_VROM3); }
int ScreenSaver(int EnableExit) { INPUT_RECORD rec; clock_t WaitTime; if (ScreenSaverActive) return 1; ChangePriority ChPriority(ChangePriority::IDLE); for (WaitTime=GetProcessUptimeMSec(); GetProcessUptimeMSec()-WaitTime<500;) { if (PeekInputRecord(&rec)) return 1; WINPORT(Sleep)(100); } ScreenSaverActive=TRUE; CONSOLE_CURSOR_INFO CursorInfo; Console.GetCursorInfo(CursorInfo); { SaveScreen SaveScr; SetCursorType(0,10); randomize(); SetScreen(0,0,ScrX,ScrY,L' ',F_LIGHTGRAY|B_BLACK); for (size_t I=0; I<ARRAYSIZE(Star); I++) { Star[I].Type=STAR_NONE; Star[I].Color=0; } int Step=0; while (!PeekInputRecord(&rec)) { clock_t CurTime=GetProcessUptimeMSec(); if (EnableExit && Opt.InactivityExit && Opt.InactivityExitTime>0 && CurTime-StartIdleTime>Opt.InactivityExitTime*60000 && FrameManager->GetFrameCount()==1) { FrameManager->ExitMainLoop(FALSE); return 0; } WINPORT(Sleep)(50); ShowSaver(Step++); } } SetCursorType(CursorInfo.bVisible!=FALSE, CursorInfo.dwSize); ScreenSaverActive=FALSE; FlushInputBuffer(); StartIdleTime=GetProcessUptimeMSec(); return 1; }
void LIB_EDIT_FRAME::emptyScreen() { SetCurLib( wxEmptyString ); SetCurPart( nullptr ); SetScreen( m_dummyScreen ); m_dummyScreen->ClearUndoRedoList(); m_toolManager->RunAction( "common.Control.zoomFitScreen", true ); Refresh(); }
LIB_EDIT_FRAME::~LIB_EDIT_FRAME() { Unbind( wxEVT_COMMAND_MENU_SELECTED, &LIB_EDIT_FRAME::OnEditSymbolLibTable, this, ID_EDIT_SYM_LIB_TABLE ); // current screen is destroyed in EDA_DRAW_FRAME SetScreen( m_dummyScreen ); delete m_libMgr; delete m_my_part; }
FOOTPRINT_EDIT_FRAME::~FOOTPRINT_EDIT_FRAME() { // When user reopens the Footprint editor, user would like to find the last edited item. // Do not delete PCB_SCREEN (by the destructor of EDA_DRAW_FRAME) SetScreen( NULL ); // Do not allow PCB_BASE_FRAME::~PCB_BASE_FRAME() // to delete our precious BOARD, which is also in static FOOTPRINT_EDIT_FRAME::s_Pcb. // That function, PCB_BASE_FRAME::~PCB_BASE_FRAME(), runs immediately next // as we return from here. m_Pcb = 0; }
HelpMenuView::HelpMenuView(bool showCredits) { exitButton = new Input_Button(); exitButton->OnClicked += Delegate(this, &HelpMenuView::OnExitButtonClicked); exitButton->SetSound(CR::AssetList::sounds::shopopen::ID); input_objects.push_back(exitButton); howToPlayButton = new Input_Button(); howToPlayButton->OnClicked += Delegate(this, &HelpMenuView::OnHowToPlayClicked); howToPlayButton->SetSpriteAndBounds(161, 432, CR::AssetList::InfoHelp_How_to_Play_Button, 400); howToPlayButton->DesignSize(157, 52); howToPlayButton->SetSound(CR::AssetList::sounds::shopopen::ID); input_objects.push_back(howToPlayButton); leftButton = new Input_Button(); leftButton->OnClicked += Delegate(this, &HelpMenuView::OnLeftClicked); leftButton->SetSpriteAndBounds(2, 432, CR::AssetList::Scrapbook_LArrow_Button, 400); leftButton->DesignSize(97, 49); leftButton->SetSound(CR::AssetList::sounds::shopopen::ID); input_objects.push_back(leftButton); rightButton = new Input_Button(); rightButton->OnClicked += Delegate(this, &HelpMenuView::OnRightClicked); rightButton->SetSpriteAndBounds(221, 432, CR::AssetList::Scrapbook_RArrow_Button, 400); rightButton->DesignSize(97, 49); rightButton->SetSound(CR::AssetList::sounds::shopopen::ID); input_objects.push_back(rightButton); menuBackground = graphics_engine->CreateSprite1(false,500); menuBackground->SetImage(CR::AssetList::InfoHelp_Background); menuBackground->SetDesignSize(320, 480); menuBackground->SetPositionAbsolute(160, 240); m_currScreenSprite = graphics_engine->CreateSprite1(false,400); if (showCredits) SetScreen(InfoHelpCredits); else SetScreen(InfoHelp1); }
/******************************* gamepad support *******************************/ static void pad_config(int num, int padtype) { int i,j,max; u16 p; u8 quit; char msg[30]; u32 pad = PAD_ScanPads() & (1<<num); if (!pad) { sprintf(msg, "PAD #%d is not connected !", num+1); WaitPrompt(msg); return; } /* configure keys */ max = (padtype == DEVICE_6BUTTON) ? MAX_KEYS : (MAX_KEYS - 3); for (i=0; i<max; i++) { /* remove any pending keys */ while (PAD_ButtonsHeld(num)) { VIDEO_WaitVSync(); PAD_ScanPads(); } ClearScreen(); sprintf(msg,"Press key for %s",keys_name[i]); WriteCentre(254, msg); SetScreen(); /* check buttons state */ quit = 0; while (quit == 0) { VIDEO_WaitVSync(); PAD_ScanPads(); p = PAD_ButtonsDown(num); for (j=0; j<8; j++) { if (p & pad_keys[j]) { config.pad_keymap[num][i] = pad_keys[j]; quit = 1; j = 9; /* exit loop */ } } } } }
/** *** Make new menu object **/ LaosMenu::LaosMenu(LaosDisplay *display) { waitup=timeout=iofield=ipfield=0; sarg = NULL; x=y=z=0; xoff=yoff=zoff=0; screen=prevscreen=lastscreen=speed=0; menu=1; strcpy(jobname, ""); dsp = display; if ( dsp == NULL ) dsp = new LaosDisplay(); dsp->cls(); SetScreen(NULL); runfile = NULL; }
/** *** Make new menu object **/ LaosMenu::LaosMenu(LaosDisplay *display) { waitup=timeout=iofield=ipfield=0; sarg = NULL; screen=prevscreen=lastscreen=speed=0; menu=1; strcpy(jobname, ""); dsp = display; if ( dsp == NULL ) dsp = new LaosDisplay(); dsp->cls(); SetScreen(""); runfile = NULL; m_LaserTestPower=0; m_LaserTestTime=0; }
void SCH_EDIT_FRAME::CreateScreens() { if( g_RootSheet == NULL ) { g_RootSheet = new SCH_SHEET(); } if( g_RootSheet->GetScreen() == NULL ) { g_RootSheet->SetScreen( new SCH_SCREEN() ); SetScreen( g_RootSheet->GetScreen() ); } g_RootSheet->GetScreen()->SetFileName( m_DefaultSchematicFileName ); m_CurrentSheet->Clear(); m_CurrentSheet->Push( g_RootSheet ); if( GetScreen() == NULL ) SetScreen( new SCH_SCREEN() ); GetScreen()->SetZoom( 32.0 ); GetScreen()->m_UndoRedoCountMax = 10; }
SCH_EDIT_FRAME::~SCH_EDIT_FRAME() { delete m_item_to_repeat; // we own the cloned object, see this->SetRepeatItem() SetScreen( NULL ); delete m_CurrentSheet; // a SCH_SHEET_PATH, on the heap. delete m_undoItem; delete g_RootSheet; delete m_findReplaceData; m_CurrentSheet = NULL; m_undoItem = NULL; g_RootSheet = NULL; m_findReplaceData = NULL; CMP_LIBRARY::RemoveAllLibraries(); }
void SCH_EDIT_FRAME::DisplayCurrentSheet() { SetRepeatItem( NULL ); ClearMsgPanel(); SCH_SCREEN* screen = m_CurrentSheet->LastScreen(); // Switch to current sheet, // and update the grid size, because it can be modified in latest screen SetScreen( screen ); GetScreen()->SetGrid( m_LastGridSizeId + ID_POPUP_GRID_LEVEL_1000 ); // update the References m_CurrentSheet->UpdateAllScreenReferences(); SetSheetNumberAndCount(); m_canvas->SetCanStartBlock( -1 ); if( screen->m_FirstRedraw ) { Zoom_Automatique( false ); screen->m_FirstRedraw = false; SetCrossHairPosition( GetScrollCenterPosition() ); m_canvas->MoveCursorToCrossHair(); // Ensure the schematic is fully segmented on first display BreakSegmentsOnJunctions(); SchematicCleanUp( true ); screen->ClearUndoORRedoList( screen->m_UndoList, 1 ); screen->TestDanglingEnds(); } else { RedrawScreen( GetScrollCenterPosition(), true ); } // Some items (wires, labels) can be highlighted. So prepare the highlight flag: SetCurrentSheetHighlightFlags(); // Now refresh m_canvas. Should be not necessary, but because screen has changed // the previous refresh has set all new draw parameters (scroll position ..) // but most of time there were some inconsitencies about cursor parameters // ( previous position of cursor ...) and artefacts can happen // mainly when sheet size has changed // This second refresh clears artefacts because at this point, // all parameters are now updated m_canvas->Refresh(); }
bool LIB_EDIT_FRAME::LoadOneLibraryPartAux( LIB_ALIAS* aEntry, const wxString& aLibrary, int aUnit, int aConvert ) { wxString msg, rootName; if( !aEntry || aLibrary.empty() ) return false; if( aEntry->GetName().IsEmpty() ) { wxLogWarning( "Symbol in library \"%s\" has empty name field.", aLibrary ); return false; } LIB_PART* lib_part = m_libMgr->GetBufferedPart( aEntry->GetName(), aLibrary ); wxASSERT( lib_part ); m_unit = aUnit > 0 ? aUnit : 1; m_convert = aConvert > 0 ? aConvert : 1; // The buffered screen for the part SCH_SCREEN* part_screen = m_libMgr->GetScreen( lib_part->GetName(), aLibrary ); const SCH_SCREEN* curr_screen = GetScreen(); // Before we set the frame screen, transfer any settings from the current // screen that we want to keep to the incoming (buffered) part's screen // which could be out of date relative to the current screen. if( curr_screen ) synchronizeLibEditScreenSettings( *curr_screen, *part_screen ); SetScreen( part_screen ); SetCurPart( new LIB_PART( *lib_part ) ); SetCurLib( aLibrary ); Zoom_Automatique( false ); updateTitle(); UpdatePartSelectList(); // Display the document information based on the entry selected just in // case the entry is an alias. DisplayCmpDoc(); Refresh(); return true; }
void BaseScene::HandleEvents() { SDL_Event event; while(SDL_PollEvent(&event)) { switch(event.type) { case SDL_QUIT: QuitEvent(); break; case SDL_VIDEORESIZE: SetScreen(event.resize.w, event.resize.h, 0, screen->flags); break; case SDL_MOUSEMOTION: MouseMotion(event.motion); break; case SDL_MOUSEBUTTONDOWN: MouseButtonDown(event.button); break; case SDL_MOUSEBUTTONUP: MouseButtonUp(event.button); break; case SDL_KEYDOWN: KeyDown(event.key); break; case SDL_KEYUP: KeyUp(event.key); break; #ifdef USE_EVENT_JOYSTICK //TODO: joystick/gamepad support #endif #ifdef USE_EVENT_UNKNOWN default: UnknownEvent(event); break; #endif }//switch }//while }
void DrawMenu (char items[][20], int maxitems, int selected) { int i; int ypos; ypos = (330 - (maxitems * fheight)) >> 1; ypos += 90; ClearScreen (); WriteCentre (134, menutitle); for (i = 0; i < maxitems; i++) { if (i == selected) WriteCentre_HL (i * fheight + ypos, (char *) items[i]); else WriteCentre (i * fheight + ypos, (char *) items[i]); } SetScreen (); }
Cdefcmnd::Cdefcmnd() { SetName("defcmnd"); //set romset name SetScreen(304,256); SetHighScoreInfo(highscore); SetPort(0,&defenderPort1); SetPort(1,&defenderPort2); SetPort(2,&defenderPort3); AddROM("defcmnda.1", 0x0D000,0x1000,0x68effc1d,ROM_CPU1); AddROM("defcmnda.2", 0x0E000,0x1000,0x1126adc9,ROM_CPU1); AddROM("defcmnda.3", 0x0F000,0x1000,0x7340209d,ROM_CPU1); AddROM("defcmnda.10", 0x10000,0x0800,0x3dddae75,ROM_CPU1); AddROM("defcmnda.7", 0x10800,0x0800,0x3f1e7cf8,ROM_CPU1); AddROM("defcmnda.9", 0x11000,0x0800,0x8882e1ff,ROM_CPU1); AddROM("defcmnda.6", 0x11800,0x0800,0xd068f0c5,ROM_CPU1); AddROM("defcmnda.8", 0x12000,0x0800,0xfef4cb77,ROM_CPU1); AddROM("defcmnda.5", 0x12800,0x0800,0x49b50b40,ROM_CPU1); AddROM("defcmnda.4", 0x16000,0x0800,0x43d42a1b,ROM_CPU1); AddROM("defcmnda.snd", 0x0F800,0x0800,0xf122d9c9,ROM_CPU2); }
Cbubbles::Cbubbles() { SetName("bubbles"); //set romset name SetFlags(F_NVRAM8BIT); SetScreen(304,256); SetHighScoreInfo(highscore); AddROM("bubbles.10b",0xD000,0x1000,0x26e7869b,ROM_CPU1); AddROM("bubbles.11b",0xE000,0x1000,0x5a5b572f,ROM_CPU1); AddROM("bubbles.12b",0xF000,0x1000,0xce22d2e2,ROM_CPU1); AddROM("bubbles.1b", 0x10000,0x1000,0x8234f55c,ROM_CPU1); AddROM("bubbles.2b", 0x11000,0x1000,0x4a188d6a,ROM_CPU1); AddROM("bubbles.3b", 0x12000,0x1000,0x7728f07f,ROM_CPU1); AddROM("bubbles.4b", 0x13000,0x1000,0x040be7f9,ROM_CPU1); AddROM("bubbles.5b", 0x14000,0x1000,0x0b5f29e0,ROM_CPU1); AddROM("bubbles.6b", 0x15000,0x1000,0x4dd0450d,ROM_CPU1); AddROM("bubbles.7b", 0x16000,0x1000,0xe0a26ec0,ROM_CPU1); AddROM("bubbles.8b", 0x17000,0x1000,0x4fd23d8d,ROM_CPU1); AddROM("bubbles.9b", 0x18000,0x1000,0xb48559fb,ROM_CPU1); AddROM("bubbles.snd",0xF000,0x1000,0x689ce2aa,ROM_CPU2); }
Clottofun::Clottofun() { SetName("lottofun"); //set romset name SetScreen(304,256); SetHighScoreInfo(highscore); SetPort(0,&Port1); SetPort(1,&Port2); SetPort(2,&defenderPort3); AddROM("vl7a.dat", 0x0D000,0x1000,0xfb2aec2c,ROM_CPU1); AddROM("vl7c.dat", 0x0E000,0x1000,0x9a496519,ROM_CPU1); AddROM("vl7e.dat", 0x0F000,0x1000,0x032cab4b,ROM_CPU1); AddROM("vl4e.dat", 0x10000,0x1000,0x5e9af236,ROM_CPU1); AddROM("vl4c.dat", 0x11000,0x1000,0x4b134ae2,ROM_CPU1); AddROM("vl4a.dat", 0x12000,0x1000,0xb2f1f95a,ROM_CPU1); AddROM("vl5e.dat", 0x13000,0x1000,0xc8681c55,ROM_CPU1); AddROM("vl5c.dat", 0x14000,0x1000,0xeb9351e0,ROM_CPU1); AddROM("vl5a.dat", 0x15000,0x1000,0x534f2fa1,ROM_CPU1); AddROM("vl6e.dat", 0x16000,0x1000,0xbefac592,ROM_CPU1); AddROM("vl6c.dat", 0x17000,0x1000,0xa73d7f13,ROM_CPU1); AddROM("vl6a.dat", 0x18000,0x1000,0x5730a43d,ROM_CPU1); AddROM("vl2532.snd", 0x0F000,0x1000,0x214b8a04,ROM_CPU2); }
Calienar::Calienar() { SetName("alienar"); //set romset name SetFlags(F_NOWATCHDOG | F_MUXINPUT); SetScreen(304,256); SetHighScoreInfo(highscore); SetPort(0,&Port1); SetPort(1,0); SetPort(2,&defenderPort3); SetPort(3,&Port4); AddROM("aarom10", 0xD000,0x1000,0x6feb0314,ROM_CPU1); AddROM("aarom11", 0xE000,0x1000,0xae3a270e,ROM_CPU1); AddROM("aarom12", 0xF000,0x1000,0x6be9f09e,ROM_CPU1); AddROM("aarom01", 0x10000,0x1000,0xbb0c21be,ROM_CPU1); AddROM("aarom02", 0x11000,0x1000,0x165acd37,ROM_CPU1); AddROM("aarom03", 0x12000,0x1000,0xe5d51d92,ROM_CPU1); AddROM("aarom04", 0x13000,0x1000,0x24f6feb8,ROM_CPU1); AddROM("aarom05", 0x14000,0x1000,0x5b1ac59b,ROM_CPU1); AddROM("aarom06", 0x15000,0x1000,0xda7195a2,ROM_CPU1); AddROM("aarom07", 0x16000,0x1000,0xf9812be4,ROM_CPU1); AddROM("aarom08", 0x17000,0x1000,0xcd7f3a87,ROM_CPU1); AddROM("aarom09", 0x18000,0x1000,0xe6ce77b4,ROM_CPU1); }
Crobotron::Crobotron() { SetName("robotron"); //set romset name SetScreen(304,256); SetHighScoreInfo(highscore); SetPort(0,&Port1); SetPort(1,&Port2); SetPort(2,&defenderPort3); AddROM("robotron.sba", 0xD000,0x1000,0x13797024,ROM_CPU1); AddROM("robotron.sbb", 0xE000,0x1000,0x7e3c1b87,ROM_CPU1); AddROM("robotron.sbc", 0xF000,0x1000,0x645d543e,ROM_CPU1); AddROM("robotron.sb1", 0x10000,0x1000,0x66c7d3ef,ROM_CPU1); AddROM("robotron.sb2", 0x11000,0x1000,0x5bc6c614,ROM_CPU1); AddROM("robotron.sb3", 0x12000,0x1000,0xe99a82be,ROM_CPU1); AddROM("robotron.sb4", 0x13000,0x1000,0xafb1c561,ROM_CPU1); AddROM("robotron.sb5", 0x14000,0x1000,0x62691e77,ROM_CPU1); AddROM("robotron.sb6", 0x15000,0x1000,0xbd2c853d,ROM_CPU1); AddROM("robotron.sb7", 0x16000,0x1000,0x49ac400c,ROM_CPU1); AddROM("robotron.sb8", 0x17000,0x1000,0x3a96e88c,ROM_CPU1); AddROM("robotron.sb9", 0x18000,0x1000,0xb124367b,ROM_CPU1); AddROM("robotron.snd", 0xF000,0x1000,0xc56c1d28,ROM_CPU2); AddROM("decoder.4", 0x0000,0x0200,0xe6631c23,ROM_PROM); AddROM("decoder.6", 0x0200,0x0200,0x83faf25e,ROM_PROM); }
Cddragon2::Cddragon2() { SetName("ddragon2"); //set romset name SetScreen(256,256); SetHighScoreInfo(highscore); AddROM("26a9-04.bin",0x08000,0x08000,0xf2cfc649,ROM_CPU1); AddROM("26aa-03.bin",0x10000,0x08000,0x44dd5d4b,ROM_CPU1); AddROM("26ab-0.bin", 0x18000,0x08000,0x49ddddcd,ROM_CPU1); AddROM("26ac-0e.63", 0x20000,0x08000,0x57acad2c,ROM_CPU1); AddROM("26ae-0.bin", 0x00000,0x10000,0xea437867,ROM_CPU2); AddROM("26ad-0.bin", 0x00000,0x08000,0x75e36cd6,ROM_CPU3); AddROM("26a8-0e.19", 0x00000,0x10000,0x4e80cd36,ROM_VROM1); AddROM("26j0-0.bin", 0x00000,0x20000,0xdb309c84,ROM_VROM2); AddROM("26j1-0.bin", 0x20000,0x20000,0xc3081e0c,ROM_VROM2); AddROM("26af-0.bin", 0x40000,0x20000,0x3a615aad,ROM_VROM2); AddROM("26j2-0.bin", 0x60000,0x20000,0x589564ae,ROM_VROM2); AddROM("26j3-0.bin", 0x80000,0x20000,0xdaf040d6,ROM_VROM2); AddROM("26a10-0.bin",0xA0000,0x20000,0x6d16d889,ROM_VROM2); AddROM("26j4-0.bin", 0x00000,0x20000,0xa8c93e76,ROM_VROM3); AddROM("26j5-0.bin", 0x20000,0x20000,0xee555237,ROM_VROM3); AddROM("26j6-0.bin", 0x00000,0x20000,0xa84b2a29,ROM_SND1); AddROM("26j7-0.bin", 0x20000,0x20000,0xbc6a48d5,ROM_SND1); AddROM("prom.16", 0x00000,0x00200,0x46339529,ROM_PROM); }
LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : SCH_BASE_FRAME( aKiway, aParent, FRAME_SCH_LIB_EDITOR, _( "Library Editor" ), wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, LIB_EDIT_FRAME_NAME ) { m_showAxis = true; // true to draw axis SetShowDeMorgan( false ); m_DrawSpecificConvert = true; m_DrawSpecificUnit = false; m_hotkeysDescrList = g_Libedit_Hotkeys_Descr; m_SyncPinEdit = false; m_repeatPinStep = DEFAULT_REPEAT_OFFSET_PIN; SetShowElectricalType( true ); m_FrameSize = ConvertDialogToPixels( wxSize( 500, 350 ) ); // default in case of no prefs m_my_part = NULL; m_treePane = nullptr; m_libMgr = nullptr; m_unit = 1; m_convert = 1; m_AboutTitle = "LibEdit"; // Delayed initialization if( g_LastTextSize == -1 ) g_LastTextSize = GetDefaultTextSize(); // Initialize grid id to the default value 50 mils: m_LastGridSizeId = ID_POPUP_GRID_LEVEL_50 - ID_POPUP_GRID_LEVEL_1000; wxIcon icon; icon.CopyFromBitmap( KiBitmap( icon_libedit_xpm ) ); SetIcon( icon ); LoadSettings( config() ); // Ensure axis are always drawn KIGFX::GAL_DISPLAY_OPTIONS& gal_opts = GetGalDisplayOptions(); gal_opts.m_axesEnabled = true; m_dummyScreen = new SCH_SCREEN( aKiway ); SetScreen( m_dummyScreen ); GetScreen()->m_Center = true; GetScreen()->SetMaxUndoItems( m_UndoRedoCountMax ); SetCrossHairPosition( wxPoint( 0, 0 ) ); SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); m_libMgr = new LIB_MANAGER( *this ); SyncLibraries( true ); m_treePane = new SYMBOL_TREE_PANE( this, m_libMgr ); setupTools(); ReCreateMenuBar(); ReCreateHToolbar(); ReCreateVToolbar(); ReCreateOptToolbar(); updateTitle(); DisplayCmpDoc(); RebuildSymbolUnitsList(); m_auimgr.SetManagedWindow( this ); m_auimgr.SetArtProvider( new EDA_DOCKART( this ) ); m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" ).Top().Layer(6) ); m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" ).Bottom().Layer(6) ); m_auimgr.AddPane( m_optionsToolBar, EDA_PANE().VToolbar().Name( "OptToolbar" ).Left().Layer(3) ); m_auimgr.AddPane( m_treePane, EDA_PANE().Palette().Name( "ComponentTree" ).Left().Layer(1) .Caption( _( "Libraries" ) ).MinSize( 250, -1 ) .BestSize( m_defaultLibWidth, -1 ).Resizable() ); m_auimgr.AddPane( m_drawToolBar, EDA_PANE().VToolbar().Name( "ToolsToolbar" ).Right().Layer(1) ); m_auimgr.AddPane( m_canvas->GetWindow(), wxAuiPaneInfo().Name( "DrawFrame" ).CentrePane() ); m_auimgr.Update(); GetToolManager()->RunAction( "common.Control.gridPreset", true, m_LastGridSizeId ); Raise(); Show( true ); Bind( wxEVT_COMMAND_MENU_SELECTED, &LIB_EDIT_FRAME::OnConfigurePaths, this, ID_PREFERENCES_CONFIGURE_PATHS ); Bind( wxEVT_COMMAND_MENU_SELECTED, &LIB_EDIT_FRAME::OnEditSymbolLibTable, this, ID_EDIT_SYM_LIB_TABLE ); m_toolManager->RunAction( ACTIONS::zoomFitScreen, true ); SyncView(); GetGalCanvas()->GetViewControls()->SetSnapping( true ); GetGalCanvas()->GetView()->UseDrawPriority( true ); GetGalCanvas()->GetGAL()->SetGridVisibility( IsGridVisible() ); GetGalCanvas()->GetGAL()->SetAxesEnabled( true ); // Set the working/draw area size to display a symbol to a reasonable value: // A 600mm x 600mm with a origin at the area center looks like a large working area double max_size_x = Millimeter2iu( 600 ); double max_size_y = Millimeter2iu( 600 ); BOX2D bbox; bbox.SetOrigin( -max_size_x /2, -max_size_y/2 ); bbox.SetSize( max_size_x, max_size_y ); GetCanvas()->GetView()->SetBoundary( bbox ); }
FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : PCB_BASE_EDIT_FRAME( aKiway, aParent, FRAME_PCB_MODULE_EDITOR, wxEmptyString, wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, GetFootprintEditorFrameName() ) { m_showBorderAndTitleBlock = false; // true to show the frame references m_showAxis = true; // true to show X and Y axis on screen m_showGridAxis = true; // show the grid origin axis m_hotkeysDescrList = g_Module_Editor_Hokeys_Descr; // Give an icon wxIcon icon; icon.CopyFromBitmap( KiBitmap( icon_modedit_xpm ) ); SetIcon( icon ); // Show a title (frame title + footprint name): updateTitle(); // Create GAL canvas PCB_BASE_FRAME* parentFrame = static_cast<PCB_BASE_FRAME*>( Kiway().Player( FRAME_PCB, true ) ); PCB_DRAW_PANEL_GAL* drawPanel = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize, parentFrame->GetGalCanvas()->GetBackend() ); SetGalCanvas( drawPanel ); SetBoard( new BOARD() ); // In modedit, the default net clearance is not known. // (it depends on the actual board) // So we do not show the default clearance, by setting it to 0 // The footprint or pad specific clearance will be shown GetBoard()->GetDesignSettings().GetDefault()->SetClearance(0); // restore the last footprint from the project, if any restoreLastFootprint(); // Ensure all layers and items are visible: // In footprint editor, some layers have no meaning or // cannot be used, but we show all of them, at least to be able // to edit a bad layer GetBoard()->SetVisibleAlls(); wxFont font = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ); m_Layers = new PCB_LAYER_WIDGET( this, GetCanvas(), font.GetPointSize(), true ); LoadSettings( config() ); SetScreen( new PCB_SCREEN( GetPageSettings().GetSizeIU() ) ); GetScreen()->SetMaxUndoItems( m_UndoRedoCountMax ); GetScreen()->SetCurItem( NULL ); GetScreen()->AddGrid( m_UserGridSize, m_UserGridUnit, ID_POPUP_GRID_USER ); GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId ); // In modedit, set the default paper size to A4: // this should be OK for all footprint to plot/print SetPageSettings( PAGE_INFO( PAGE_INFO::A4 ) ); SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); ReCreateMenuBar(); ReCreateHToolbar(); ReCreateAuxiliaryToolbar(); ReCreateVToolbar(); ReCreateOptToolbar(); if( m_canvas ) m_canvas->SetEnableBlockCommands( true ); m_auimgr.SetManagedWindow( this ); EDA_PANEINFO horiz; horiz.HorizontalToolbarPane(); EDA_PANEINFO vert; vert.VerticalToolbarPane(); EDA_PANEINFO mesg_pane; mesg_pane.MessageToolbarPane(); // Create a wxAuiPaneInfo for the Layers Manager, not derived from the template. // LAYER_WIDGET is floatable, but initially docked at far right EDA_PANEINFO lyrs; lyrs.LayersToolbarPane(); lyrs.MinSize( m_Layers->GetBestSize() ); // updated in ReFillLayerWidget lyrs.BestSize( m_Layers->GetBestSize() ); lyrs.Caption( _( "Visibles" ) ); m_auimgr.AddPane( m_mainToolBar, wxAuiPaneInfo( horiz ).Name( wxT( "m_mainToolBar" ) ).Top(). Row( 0 ) ); m_auimgr.AddPane( m_auxiliaryToolBar, wxAuiPaneInfo( horiz ).Name( wxT( "m_auxiliaryToolBar" ) ).Top().Row( 1 ) ); // The main right vertical toolbar m_auimgr.AddPane( m_drawToolBar, wxAuiPaneInfo( vert ).Name( wxT( "m_VToolBar" ) ).Right().Layer(1) ); // Add the layer manager ( most right side of pcbframe ) m_auimgr.AddPane( m_Layers, lyrs.Name( wxT( "m_LayersManagerToolBar" ) ).Right().Layer( 2 ) ); // Layers manager is visible m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( true ); // The left vertical toolbar (fast acces to display options) m_auimgr.AddPane( m_optionsToolBar, wxAuiPaneInfo( vert ).Name( wxT( "m_optionsToolBar" ) ). Left().Layer(1) ); m_auimgr.AddPane( m_canvas, wxAuiPaneInfo().Name( wxT( "DrawFrame" ) ).CentrePane() ); m_auimgr.AddPane( (wxWindow*) GetGalCanvas(), wxAuiPaneInfo().Name( wxT( "DrawFrameGal" ) ).CentrePane().Hide() ); m_auimgr.AddPane( m_messagePanel, wxAuiPaneInfo( mesg_pane ).Name( wxT( "MsgPanel" ) ).Bottom().Layer(10) ); // Create the manager and dispatcher & route draw panel events to the dispatcher setupTools(); UseGalCanvas( parentFrame->IsGalCanvasActive() ); if( m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).IsShown() ) { m_Layers->ReFill(); m_Layers->ReFillRender(); GetScreen()->m_Active_Layer = F_SilkS; m_Layers->SelectLayer( F_SilkS ); m_Layers->OnLayerSelected(); } m_auimgr.Update(); Raise(); // On some window managers, this is needed Show( true ); Zoom_Automatique( false ); }