您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ videoSetMode函数代码示例

51自学网 2021-06-03 09:39:37
  C++
这篇教程C++ videoSetMode函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中videoSetMode函数的典型用法代码示例。如果您正苦于以下问题:C++ videoSetMode函数的具体用法?C++ videoSetMode怎么用?C++ videoSetMode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了videoSetMode函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: NDS_SetDisplayMode

static int NDS_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode){	display->driverdata = mode->driverdata;#ifdef USE_HW_RENDERER	videoSetMode(MODE_5_3D);	videoSetModeSub(MODE_5_2D);	/* initialize gl2d */	glScreen2D();	    vramSetBankA(VRAM_A_TEXTURE);	vramSetBankB(VRAM_B_TEXTURE );    vramSetBankC(VRAM_C_SUB_BG_0x06200000);	vramSetBankE(VRAM_E_TEX_PALETTE);    powerOn(POWER_ALL_2D);    irqInit();    irqEnable(IRQ_VBLANK);    // sub sprites hold the bottom image when 3D directed to top    initSubSprites();     // sub background holds the top image when 3D directed to bottom    bgInitSub(3, BgType_Bmp16, BgSize_B16_256x256, 0, 0);#else	/* Select mode 5 for both screens. Can do Extended Rotation	 * Background on both (BG 2 and 3). */	videoSetMode(MODE_5_2D);	videoSetModeSub(MODE_5_2D);    vramSetBankA(VRAM_A_MAIN_BG_0x06000000);	vramSetBankB(VRAM_B_TEXTURE );    vramSetBankC(VRAM_C_SUB_BG_0x06200000);	vramSetBankE(VRAM_E_TEX_PALETTE);    powerOn(POWER_ALL_2D);    irqInit();    irqEnable(IRQ_VBLANK);#endif    return 0;}
开发者ID:0xD34D,项目名称:supermariowar-android,代码行数:48,


示例2: __attribute__

void __attribute__((noreturn)) __sassert(const char* file, int line, const char* cond, const char* msg){	if (isUserMode()) FeOS_swi_assertfail(file, line, cond, msg);	videoReset();	videoSetMode(MODE_0_2D);	videoSetModeSub(MODE_0_2D);	PrintConsole* conmain = consoleInit(NULL, 0, BgType_Text4bpp, BgSize_T_256x256, 0, 1, true, true);	memcpy(&oConSub, consoleGetDefault(), sizeof(PrintConsole));	PrintConsole* consub = consoleInit(&oConSub, 0, BgType_Text4bpp, BgSize_T_256x256, 0, 1, false, true);	InstallConThunks();	consoleSelect(conmain);	BG_PALETTE[0] = RGB15(31,0,31);	BG_PALETTE[255] = RGB15(31,31,31);	BG_PALETTE_SUB[0] = RGB15(31,0,31);	BG_PALETTE_SUB[255] = RGB15(31,31,31);	iprintf("/x1b[5CKernel assertion failure!/n/nCondition: %s/n/n%s:%d/n/nMessage: %s/n", cond, file, line, msg);	consoleSelect(consub);	iprintf("/x1b[5CStacktrace coming soon/n/nInstead, here's a kitten:/n/n");	const char** i;	for (i = meow; *i; i ++)		iprintf("%s/n", *i);	for (;;)		swiWaitForVBlank();}
开发者ID:steveschnepp,项目名称:FeOS,代码行数:32,


示例3: setColor

Graphics::Graphics(void) {	//irqInit(); 	//irqSet(IRQ_VBLANK, 0); 	setColor(RGB15(20,31,10) | (1<<15));			 	videoSetMode(MODE_5_2D | DISPLAY_BG3_ACTIVE);	//videoSetModeSub(MODE_2_2D | DISPLAY_BG3_ACTIVE);				vramSetBankA(VRAM_A_MAIN_BG);	vramSetBankB(VRAM_B_MAIN_BG);	//vramSetBankC(VRAM_C_SUB_BG);							REG_BG3CNT = BG_BMP16_256x256 | BG_BMP_BASE(0);	REG_BG3PA  = 1 << 8;	REG_BG3PB  = 0;	REG_BG3PC  = 0;	REG_BG3PD  = 1 << 8;	videoRam   = BG_BMP_RAM(0);							//REG_BG3CNT_SUB = BG_BMP16_256x256 | BG_BMP_BASE(0);	//REG_BG3PA_SUB = 1<< 8;	//REG_BG3PB_SUB = 0;	//REG_BG3PC_SUB = 0;	//REG_BG3PD_SUB = 1 << 8;	//memClone   = BG_BMP_RAM_SUB(2);}
开发者ID:Gerjo,项目名称:NintendoDS-Flocking,代码行数:28,


示例4: main

intmain(void){					// Initialize Bottom Screen for printf()	PrintConsole topScreen;        videoSetMode(MODE_0_2D);        vramSetBankA(VRAM_A_MAIN_BG);        consoleInit(&topScreen, 3,BgType_Text4bpp, BgSize_T_256x256, 31, 0, true, true);        consoleSelect(&topScreen);        videoSetModeSub(MODE_5_2D);    	vramSetBankC(VRAM_C_SUB_BG);        bgInitSub(3, BgType_Bmp16, BgSize_B16_256x256, 0,0);    decompress(drunkenlogoBitmap, BG_GFX_SUB,  LZ77Vram);			xTaskCreate(Key_Press,					     (const signed char * const)"Key_Press",					     2048,					     (void *)NULL,					     tskIDLE_PRIORITY + 2,					     NULL);		xTaskCreate(Touch_Press,					     (const signed char * const)"Touch_Press",					     2048,					     (void *)NULL,					     tskIDLE_PRIORITY + 1,					     NULL);	vTaskStartScheduler();		// Never returns	while(1)		;	return 0;}
开发者ID:elzk,项目名称:nds-ide,代码行数:34,


示例5: main

int main(void) {    // set the mode for 2 text layers and two extended background layers	videoSetMode(MODE_5_2D);	// set the sub background up for text display (we could just print to one	// of the main display text backgrounds just as easily	videoSetModeSub(MODE_0_2D); //sub bg 0 will be used to print text	vramSetBankA(VRAM_A_MAIN_BG);	consoleDemoInit();	iprintf("/n/n/tHello DS devers/n");	iprintf("/twww.drunkencoders.com/n");	iprintf("/t16 bit bitmap demo");	// set up our bitmap background	bgInit(3, BgType_Bmp16, BgSize_B16_256x256, 0,0);		decompress(drunkenlogoBitmap, BG_GFX,  LZ77Vram);		while(1) {		swiWaitForVBlank();	}	return 0;}
开发者ID:scallopedllama,项目名称:zoidbergengine,代码行数:27,


示例6: init_consoles

void init_consoles(void){	/* debug console on top */	mainConsole = consoleDemoInit();	debugConsole = (PrintConsole *) malloc(sizeof(PrintConsole));	if (!debugConsole)		exit(1);	memcpy(debugConsole, consoleGetDefault(), sizeof(PrintConsole));	videoSetMode(MODE_0_2D);	vramSetBankA(VRAM_A_MAIN_BG);	consoleInit(debugConsole, debugConsole->bgLayer, BgType_Text4bpp,		    BgSize_T_256x256, debugConsole->mapBase,		    debugConsole->gfxBase, true, true);#ifdef DEBUG	printf("Test debug console/n");#endif	consoleSelect(mainConsole);#ifdef DEBUG	printf("Test main console/n");#endif	return;}
开发者ID:Lexus89,项目名称:wifi-arsenal,代码行数:25,


示例7: initEditor

void initEditor(void){	lcdMainOnBottom();	videoSetMode(MODE_5_3D);	videoSetModeSub(MODE_5_2D | DISPLAY_BG3_ACTIVE);		vramSetPrimaryBanks(VRAM_A_TEXTURE,VRAM_B_TEXTURE,VRAM_C_SUB_BG,VRAM_D_TEXTURE);			glInit();		glEnable(GL_TEXTURE_2D);	// glEnable(GL_ANTIALIAS);	glEnable(GL_BLEND);	glEnable(GL_OUTLINE);		glClearPolyID(63);	glClearDepth(0x7FFF);	glViewport(0,0,255,191);		initVramBanks(1);	initTextures();		initRoomEdition();	NOGBA("START mem free : %dko (%do)",getMemFree()/1024,getMemFree());	fadeIn();}
开发者ID:Almamu,项目名称:portalDS,代码行数:27,


示例8: Outro_ConfigureHardware

void Outro_ConfigureHardware(){	/* Configure video hardware */	videoSetMode(MODE_3_2D);	vramSetBankF(VRAM_F_MAIN_BG_0x06000000);}
开发者ID:protosphere,项目名称:proto_nds,代码行数:7,


示例9: main

int main(void){	videoSetMode(MODE_5_2D);		consoleDemoInit();	scanKeys();	int c = keysHeld();	Sfondo();	CreaPG();	while(true) 	{		swiWaitForVBlank();					if(c!=0)		{			KeysPress(c);			//iprintf("-key:%i/n",c);			c = 0;		}		else 		{//Nessun tasto premuto			scanKeys();			c = keysHeld();		}	}	return 0;	}
开发者ID:GiocoNDS,项目名称:Gioco-per-DS,代码行数:25,


示例10: videoSetMode

//This function initializes the device to a "default" setting. //You may begin sending GL commands to the DS after this function executesvoid blu_impl::GFX_Init3DDevice(){videoSetMode(MODE_0_3D);// initialize the geometry engineglInit();// enable antialiasingglEnable(GL_ANTIALIAS);// setup the rear planeglClearColor(0,0,0,31); // BG must be opaque for AA to workglClearPolyID(63); // BG must have a unique polygon ID for AA to workglClearDepth(0x7FFF);// Set our viewport to be the same size as the screenglViewport(0,0,255,191);// this controls your camera glMatrixMode(GL_PROJECTION);glLoadIdentity();gluPerspective(70, 256.0 / 192.0, 0.1, 100);//ds specific, several attributes can be set here       glPolyFmt(POLY_ALPHA(31) | POLY_CULL_NONE);// Set the current matrix to be the model matrixglMatrixMode(GL_MODELVIEW);}
开发者ID:patrickjennings,项目名称:babycthulu,代码行数:29,


示例11: bsp_start

void bsp_start (void){  /* initialize irq management */  BSP_rtems_irq_mngt_init ();  /* setup console mode for lower screen */  irqEnable (IRQ_VBLANK);  videoSetMode (0);  videoSetModeSub (MODE_0_2D | DISPLAY_BG0_ACTIVE);  vramSetBankC (VRAM_C_SUB_BG);  SUB_BG0_CR = BG_MAP_BASE (31);  BG_PALETTE_SUB[255] = RGB15 (31, 31, 31);  consoleInitDefault ((u16 *) SCREEN_BASE_BLOCK_SUB (31),                      (u16 *) CHAR_BASE_BLOCK_SUB (0), 16);  /* print status message */  printk ("[+] kernel console started/n");  /* set the cpu mode to system user */  arm_cpu_mode = 0x1f;  /* configure clock period */  Configuration.microseconds_per_tick = 10000;  /* us */  defaultExceptionHandler ();}
开发者ID:rtemss,项目名称:rtems,代码行数:27,


示例12: videoSetMode

void CGbaLoader::LoadBorder(void){  videoSetMode(MODE_5_2D | DISPLAY_BG3_ACTIVE);  videoSetModeSub(MODE_5_2D | DISPLAY_BG3_ACTIVE);  vramSetMainBanks(VRAM_A_MAIN_BG_0x06000000, VRAM_B_MAIN_BG_0x06020000, VRAM_C_SUB_BG_0x06200000, VRAM_D_LCD);  // for the main screen  REG_BG3CNT = BG_BMP16_256x256 | BG_BMP_BASE(0) | BG_WRAP_OFF;  REG_BG3PA = 1 << 8; //scale x  REG_BG3PB = 0; //rotation x  REG_BG3PC = 0; //rotation y  REG_BG3PD = 1 << 8; //scale y  REG_BG3X = 0; //translation x  REG_BG3Y = 0; //translation y  memset((void*)BG_BMP_RAM(0),0,0x18000);  memset((void*)BG_BMP_RAM(8),0,0x18000);  cBMP15 frameBMP=createBMP15FromFile(SFN_GBAFRAME);  if(frameBMP.valid()&&frameBMP.width()==SCREEN_WIDTH&&frameBMP.height()==SCREEN_HEIGHT)  {    DC_FlushRange(frameBMP.buffer(),SCREEN_WIDTH*SCREEN_HEIGHT*2);    dmaCopy(frameBMP.buffer(),(void*)BG_BMP_RAM(0),SCREEN_WIDTH*SCREEN_HEIGHT*2);    dmaCopy(frameBMP.buffer(),(void*)BG_BMP_RAM(8),SCREEN_WIDTH*SCREEN_HEIGHT*2);  }}
开发者ID:ahezard,项目名称:woodrpg_forwarder,代码行数:26,


示例13: onInit

    void onInit()    {        setBrightness(3, -16);        videoSetMode(MODE_5_2D);        videoSetModeSub(MODE_0_2D);        vramSetBankA(VRAM_A_MAIN_BG);        vramSetBankC(VRAM_C_SUB_BG);        int bg3 = bgInit(3, BgType_Bmp8, BgSize_B8_256x256, 0, 0);        dmaCopy(splashBitmap, bgGetGfxPtr(bg3), 256*256);        dmaCopy(splashPal, BG_PALETTE, 256*2);        for(int i = 0; i < 128; i++)        {            setBrightness(3, -16+(i/8));            swiWaitForVBlank();        }        for(int i = 0; i < 128; i++)        {            setBrightness(3, -(i/8));            swiWaitForVBlank();        }    }
开发者ID:Yoshiyuka,项目名称:Potion-Shop,代码行数:25,


示例14: main

int main(int argc, char** argv){	irqSet(IRQ_VBLANK, &vblank);	#ifdef TEXTMODE		videoSetMode(MODE_0_2D);		videoSetModeSub(MODE_0_2D);		vramSetBankA(VRAM_A_MAIN_BG);		vramSetBankC(VRAM_C_SUB_BG);	#endif//TEXTMODE	Display::init();	keysSetRepeat(30, 12);	srand(time(NULL));	Player P1(FGrave);	Player P2(FMidori);	ControlLocal	C1(P1);	ControlAI		C2(P2);	//DisplayPlayerOverview a(0, 0, 0, 32, 1, P1);	//DisplayContainer b(0, 0, 1, 32, 21, P1.hand());	//DisplayCard c(1, 0, 0, 32, 24, P1.hand().at(0), false);	Game(&C1, &C2);	while(1){		update();	}	return 0;}
开发者ID:nevilc,项目名称:YomiDS,代码行数:35,


示例15: iprintf

void Menu::Init(){			    iprintf("Menu.Init/n");				KSIN1 = u8(K1 *(360/57.3f));	KSIN2 = u8(K2 *(360/57.3f));	KSIN3 = u8(K3 *(360/57.3f));			for (int i = 0; i< ((2048) - 1); i++)	{        lsin1[i] = sin(i/(float)K1) * 32+32;        lsin2[i] = sin(i/(float)K2) * 16+16;        lsin3[i] = sin(i/(float)K3) * 20+20;    }    		for (int i=0; i<256; i++)	{	    u8 r = (u8)(abs(int(16 - 15 * sin(i * M_PI / 16.0f))));		u8 g = (u8)(abs(int(16 - 15 * sin(i * M_PI / 12.0f))));		u8 b = (u8)(abs(int(16 - 15 * sin(i * M_PI / 18.0f))));		pal[i] = RGB15(r,g,b);	}	irqInit();	irqEnable(IRQ_VBLANK);		videoSetMode(MODE_FB0);	vramSetBankA(VRAM_A_LCD);}
开发者ID:nathanchere,项目名称:FlappyNyan,代码行数:29,


示例16: gbaFrame

void gbaFrame(void){  u16* frame=NULL;  cBMP15 frameBMP=createBMP15FromFile("/GBA/gbaframe.bmp");  if(frameBMP.valid()&&frameBMP.width()==SCREEN_WIDTH&&frameBMP.height()==SCREEN_HEIGHT)  {    frame=(u16*)malloc(SCREEN_WIDTH*SCREEN_HEIGHT*2);    memcpy(frame,frameBMP.buffer(),SCREEN_WIDTH*SCREEN_HEIGHT*2); //tricky thing  }  videoSetMode(MODE_5_2D | DISPLAY_BG3_ACTIVE);  videoSetModeSub(MODE_5_2D | DISPLAY_BG3_ACTIVE);  vramSetMainBanks(VRAM_A_MAIN_BG_0x06000000, VRAM_B_MAIN_BG_0x06020000, VRAM_C_SUB_BG_0x06200000, VRAM_D_LCD);  // for the main screen  BG3_CR = BG_BMP16_256x256 | BG_BMP_BASE(0) | BG_WRAP_OFF;  BG3_XDX = 1 << 8; //scale x  BG3_XDY = 0; //rotation x  BG3_YDX = 0; //rotation y  BG3_YDY = 1 << 8; //scale y  BG3_CX = 0; //translation x  BG3_CY = 0; //translation y  if(frame)  {    dmaCopy(frame,(void*)BG_BMP_RAM(0),SCREEN_WIDTH*SCREEN_HEIGHT*2);    dmaCopy(frame,(void*)BG_BMP_RAM(8),SCREEN_WIDTH*SCREEN_HEIGHT*2);    free(frame);  }  else  {    memset((void*)BG_BMP_RAM(0),0,0x18000);    memset((void*)BG_BMP_RAM(8),0,0x18000);  }}
开发者ID:suloku,项目名称:fas1,代码行数:35,


示例17: resetMemory2_ARM9

void resetMemory2_ARM9() { 	register int i; 	//clear out ARM9 DMA channels	for (i=0; i<4; i++) {		DMA_CR(i) = 0;		DMA_SRC(i) = 0;		DMA_DEST(i) = 0;		TIMER_CR(i) = 0;		TIMER_DATA(i) = 0;	} 	VRAM_CR = 0x80808080;	VRAM_E_CR = 0x80;	VRAM_F_CR = 0x80;	VRAM_G_CR = 0x80;	VRAM_H_CR = 0x80;	VRAM_I_CR = 0x80;		// clear vram	u16 * vram = 0x6800000;	zeroMemory(vram, 656 * 1024 );	// clear video palette	zeroMemory( BG_PALETTE, 2048 );//BG_PALETTE[0] = RGB15(1,1,1);	zeroMemory( BG_PALETTE_SUB, 2048 );	// clear video object attribution memory	zeroMemory( OAM, 2048 );	zeroMemory( OAM_SUB, 2048 );	// clear video object data memory	zeroMemory( SPRITE_GFX, 128 * 1024 );	zeroMemory( SPRITE_GFX_SUB, 128 * 1024 );	// clear main display registers	zeroMemory( (void*)0x04000000, 0x6c );	// clear sub display registers	zeroMemory( (void*)0x04001000, 0x6c );		// clear maths registers	zeroMemory( (void*)0x04000280, 0x40 ); 	REG_DISPSTAT = 0;	videoSetMode(0);	videoSetModeSub(0);	VRAM_A_CR = 0;	VRAM_B_CR = 0;	VRAM_C_CR = 0;	VRAM_D_CR = 0;	VRAM_E_CR = 0;	VRAM_F_CR = 0;	VRAM_G_CR = 0;	VRAM_H_CR = 0;	VRAM_I_CR = 0;	VRAM_CR   = 0x03000000;	REG_POWERCNT  = 0x820F; 	//set shared ram to ARM7	WRAM_CR = 0x03; }
开发者ID:cotodevel,项目名称:SnemulDS,代码行数:59,


示例18: main

int main() {			// Setup the Main screen for 3D 	videoSetMode(MODE_0_3D);			// initialize the geometry engine	glInit();		// enable antialiasing	glEnable(GL_ANTIALIAS);		// setup the rear plane	glClearColor(0,0,0,31); // BG must be opaque for AA to work	glClearPolyID(63); // BG must have a unique polygon ID for AA to work	glClearDepth(0x7FFF);		// Set our viewport to be the same size as the screen	glViewport(0,0,255,191);		// setup the view	glMatrixMode(GL_PROJECTION);	glLoadIdentity();	gluPerspective(70, 256.0 / 192.0, 0.1, 100);			//ds specific, several attributes can be set here		glPolyFmt(POLY_ALPHA(31) | POLY_CULL_NONE);		while (1) 	{		// Set the current matrix to be the model matrix		glMatrixMode(GL_MODELVIEW);				glColor3f(1, 1, 1);									// Set the color..not in nehe source...ds gl default will be black				//Push our original Matrix onto the stack (save state)		glPushMatrix();			DrawGLScene();				// Pop our Matrix from the stack (restore state)		glPopMatrix(1);		//a handy little built in function to wait for a screen refresh		swiWaitForVBlank();		// flush to screen			glFlush(0);		scanKeys();		int pressed = keysDown();		if(pressed & KEY_START) break;		}		return 0;}
开发者ID:devkitPro,项目名称:nds-examples,代码行数:58,


示例19: video_init

void video_init(){    powerSET(POWER_LCD | POWER_2D_B);    lcdMainOnBottom();    videoSetMode(0);    consoleDemoInit();    iprintf("Wifi EEPROM Dumper/nMicah Dowty <[email
C++ video_devdata函数代码示例
C++ video函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。