当前位置: 首页>>代码示例>>C++>>正文


C++ Super函数代码示例

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


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

示例1: Mint_CloseAudio

static void Mint_CloseAudio(_THIS)
{
	void *oldpile;

	/* Stop replay */
	oldpile=(void *)Super(0);
	DMAAUDIO_IO.control=0;
	Super(oldpile);

	DEBUG_PRINT((DEBUG_NAME "closeaudio: replay stopped\n"));

	/* Disable interrupt */
	Jdisint(MFP_DMASOUND);

	DEBUG_PRINT((DEBUG_NAME "closeaudio: interrupt disabled\n"));

	/* Wait if currently playing sound */
	while (SDL_MintAudio_mutex != 0) {
	}

	DEBUG_PRINT((DEBUG_NAME "closeaudio: no more interrupt running\n"));

	/* Clear buffers */
	if (SDL_MintAudio_audiobuf[0]) {
		Mfree(SDL_MintAudio_audiobuf[0]);
		SDL_MintAudio_audiobuf[0] = SDL_MintAudio_audiobuf[1] = NULL;
	}

	DEBUG_PRINT((DEBUG_NAME "closeaudio: buffers freed\n"));
}
开发者ID:cuttl,项目名称:wii2600,代码行数:30,代码来源:SDL_mintaudio_dma8.c

示例2: add_key

/* 
	Adds a key to the buffer based on the passed in scancode.
*/
void add_key( SCANCODE bCode )
{
	int old_ssp = Super( 1 );
	int old_ipl;
	
	if( USER_MODE == old_ssp )
		old_ssp = Super( 0 );
	
	old_ipl = set_ipl( KEYBOARD_INTERRUPT_MASK );
	
	if( cFill < MAX_BUFFER_SIZE )
	{
		cKYBDBuffer[ cBffrTail ].bScanCode 		= bCode;
		cKYBDBuffer[ cBffrTail ].bValid  		= true;
		cFill++;
		cBffrTail++;
		
		cMakeTable[ bCode ].bMakeReceived 	= true;
		cMakeTable[ bCode ].wDuration 		= STARTING_DURATION;
	}
	
	set_ipl( old_ipl );
	
	if( SUPER_MODE != old_ssp )
		Super( old_ssp );
}
开发者ID:jamescote,项目名称:Comp2659Asst,代码行数:29,代码来源:input.c

示例3: update_input_buffer

/*
	Function for updating the keyboard buffer and pushing back codes that haven't
	received a break code yet.
*/
void update_input_buffer( UINT8 bTimeElapsed )
{
	UINT8 bIndex = 0;
	int old_ssp = Super( 1 );
	int old_ipl;
	
	if( USER_MODE == old_ssp )
		old_ssp = Super( 0 );
	
	old_ipl = set_ipl( KEYBOARD_INTERRUPT_MASK );
	
	for( bIndex; bIndex < cHotKeyCount; bIndex++ )
	{
		if( cMakeTable[ bHotKeys[ bIndex ] ].bMakeReceived )
		{
			cMakeTable[ bHotKeys[ bIndex ] ].wDuration -= bTimeElapsed;
			
			if( cMakeTable[ bHotKeys[ bIndex ] ].wDuration == 0 || 
				cMakeTable[ bHotKeys[ bIndex ] ].wDuration > STARTING_DURATION )
			{
				add_key( bHotKeys[ bIndex ] );
				cMakeTable[ bHotKeys[ bIndex ] ].wDuration = SUBSEQUENT_DURATION;
			}
		}
	}
	
	set_ipl( old_ipl );
	
	if( SUPER_MODE != old_ssp )
		Super( old_ssp );
}
开发者ID:jamescote,项目名称:Comp2659Asst,代码行数:35,代码来源:input.c

示例4: get_tabele

/*---------------------------------------------------*/
void* get_tabele()
{
long old_stack;
cookie *keks;

old_stack=Super(0L);	/* Cookie holen im Supervisormode */
keks =(cookie*)(*(long*)0x5a0);
while ((keks->value!='BLOW') && (keks->value!=0))
{
/*	char str[6];
	
	memcpy(str,&(keks->value),4);
	str[4]=0;
	printf("%s \n",str);*/ 
	keks++;
}
if (keks->value=='BLOW')
{
	char *adr;
	
/*	puts("BlowBoot found!");*/
	adr = (char*)keks->param;
	Super((void *) old_stack); 
	return adr;
}
Super((void *) old_stack); 
return 0L;
}
开发者ID:daemqn,项目名称:Atari_ST_Sources,代码行数:29,代码来源:blowconx.c

示例5: get_cookie

/* --------------------
	 | Get cookie value |
	 -------------------- */
int get_cookie(unsigned long cookie, unsigned long *value)
{
long old_stack;
long *jar;

old_stack=Super(0L);
jar = *((long **)0x5a0L);
Super((void *)old_stack);

if (!jar)
	return 0;

do
	{
	if (*jar == cookie)
		{
		if (value)
			*value=jar[1];

		return 1;
		}
	else
		jar= &(jar[2]);

	}while(*jar);

return 0;
}
开发者ID:daemqn,项目名称:Atari_ST_Sources,代码行数:31,代码来源:COOKIE.C

示例6: SDL_AtariXbios_InstallVectors

void SDL_AtariXbios_InstallVectors(int vectors_mask)
{
	void *oldpile;

	/* Clear variables */
	SDL_AtariXbios_mouseb =
		SDL_AtariXbios_mousex =
		SDL_AtariXbios_mousey =
		SDL_AtariXbios_joystick =
		atari_prevmouseb = 0;

	if (vectors_mask==0) {
		SDL_AtariXbios_enabled=0;
		return;
	}

	/* Read IKBD vectors base */
	kbdvecs=Kbdvbase();

	/* Go to supervisor mode */
	oldpile=(void *)Super(0);

	/* Install our vectors */
	SDL_AtariXbios_Install(
		kbdvecs,
		(vectors_mask & ATARI_XBIOS_MOUSEEVENTS) ? SDL_AtariXbios_MouseVector : NULL,
		(vectors_mask & ATARI_XBIOS_JOYSTICKEVENTS) ? SDL_AtariXbios_JoystickVector : NULL
	);

	/* Back to user mode */
	Super(oldpile);

	SDL_AtariXbios_enabled=1;
}
开发者ID:BITINT,项目名称:DEFCON2,代码行数:34,代码来源:SDL_xbiosevents.c

示例7: MINTSTFA_LockDevice

static void
MINTSTFA_LockDevice(_THIS)
{
    /* Stop replay */
    void *oldpile = (void *) Super(0);
    cookie_stfa->sound_enable = STFA_PLAY_DISABLE;
    Super(oldpile);
}
开发者ID:Cpasjuste,项目名称:SDL-13,代码行数:8,代码来源:SDL_mintaudio_stfa.c

示例8: MINTSTFA_UnlockDevice

static void
MINTSTFA_UnlockDevice(_THIS)
{
    /* Restart replay */
    void *oldpile = (void *) Super(0);
    cookie_stfa->sound_enable = STFA_PLAY_ENABLE | STFA_PLAY_REPEAT;
    Super(oldpile);
}
开发者ID:Cpasjuste,项目名称:SDL-13,代码行数:8,代码来源:SDL_mintaudio_stfa.c

示例9: get_time

long get_time( )
{
    int old_ssp = Super( 0 );
    long lClockTick = *cc_ClockPtr;

    Super( old_ssp );

    return lClockTick;
}
开发者ID:jamescote,项目名称:Comp2659Asst,代码行数:9,代码来源:tst_inp.c

示例10: Mint_LockAudio

static void Mint_LockAudio(_THIS)
{
	void *oldpile;

	/* Stop replay */
	oldpile=(void *)Super(0);
	DMAAUDIO_IO.control=0;
	Super(oldpile);
}
开发者ID:ahpho,项目名称:wowmapviewer,代码行数:9,代码来源:SDL_mintaudio_dma8.c

示例11: timer

long timer( void )
{
  void * ssp;
  long ret;
  ssp = (void *)Super( NULL );
  ret = *((long *)0x4BA);
  Super( ssp );
  return ret;
}
开发者ID:daemqn,项目名称:Atari_ST_Sources,代码行数:9,代码来源:gem_misc.c

示例12: Mint_UnlockAudio

static void Mint_UnlockAudio(_THIS)
{
	void *oldpile;

	/* Restart replay */
	oldpile=(void *)Super(0);
	DMAAUDIO_IO.control=3;
	Super(oldpile);
}
开发者ID:ahpho,项目名称:wowmapviewer,代码行数:9,代码来源:SDL_mintaudio_dma8.c

示例13: register

/*
	Purpose: write a value to a register on the sound chip
	Input  : number of the register (0-15) and the value to write (maximum 12 bit)
	Returns: nothing
	Assume : nothing
*/
void write_psg(int reg, char val)
{
	long old_ssp = Super(0);
	if (reg < 16 && val < MAX_12_BIT)
	{
		*PSG_reg_select = reg;
		*PSG_reg_write = val;
	}
	Super(old_ssp);
}
开发者ID:Subatomicpig,项目名称:RandomStuff,代码行数:16,代码来源:sound.c

示例14: RestPalette

/* Restitution de l'ancienne palette
*/
void RestPalette(void)
{   int *Old=OldPalette,*Hard=(int *)(0xFFFF8240);
    int n=16;
    long OldSSP=Super(NULL);
    
    while (n--) *Hard++=*Old++;
    *(char *)(0xFFFF8260)=OldRes;
    
    Super((void *)OldSSP);
}
开发者ID:daemqn,项目名称:Atari_ST_Sources,代码行数:12,代码来源:biglow.c

示例15: get_protected_l

/*
 * Get a long value after switching to supervisor mode
 */
long get_protected_l(long addr)
{
   long oldstack, v;

   oldstack = (long)Super(0L);
   v = *(long *)addr;
   Super((void *)oldstack);

   return v;
}
开发者ID:bobek,项目名称:aranym-debian,代码行数:13,代码来源:utility.c


注:本文中的Super函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。