本文整理汇总了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"));
}
示例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 );
}
示例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 );
}
示例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;
}
示例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;
}
示例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;
}
示例7: MINTSTFA_LockDevice
static void
MINTSTFA_LockDevice(_THIS)
{
/* Stop replay */
void *oldpile = (void *) Super(0);
cookie_stfa->sound_enable = STFA_PLAY_DISABLE;
Super(oldpile);
}
示例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);
}
示例9: get_time
long get_time( )
{
int old_ssp = Super( 0 );
long lClockTick = *cc_ClockPtr;
Super( old_ssp );
return lClockTick;
}
示例10: Mint_LockAudio
static void Mint_LockAudio(_THIS)
{
void *oldpile;
/* Stop replay */
oldpile=(void *)Super(0);
DMAAUDIO_IO.control=0;
Super(oldpile);
}
示例11: timer
long timer( void )
{
void * ssp;
long ret;
ssp = (void *)Super( NULL );
ret = *((long *)0x4BA);
Super( ssp );
return ret;
}
示例12: Mint_UnlockAudio
static void Mint_UnlockAudio(_THIS)
{
void *oldpile;
/* Restart replay */
oldpile=(void *)Super(0);
DMAAUDIO_IO.control=3;
Super(oldpile);
}
示例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);
}
示例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);
}
示例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;
}