Exemple #1
0
static void
NextEvent(void* ptr, int event)
{
	int	currentSet, levelSet, level, currentLevel;
	const char *arenaInfo;

	if(event != QM_ACTIVATED)
		return;
	UI_PopMenu();

	/* handle specially if we just won the training map */
	if(postgame.won == 0)
		level = 0;
	else
		level = postgame.level + 1;
	levelSet = level / ARENAS_PER_TIER;

	currentLevel = UI_GetCurrentGame();
	if(currentLevel == -1)
		currentLevel = postgame.level;
	currentSet = currentLevel / ARENAS_PER_TIER;

	if(levelSet > currentSet || levelSet == UI_GetNumSPTiers())
		level = currentLevel;

	arenaInfo = UI_GetArenaInfoByNumber(level);
	if(!arenaInfo)
		return;

	UI_SPArena_Start(arenaInfo);
}
Exemple #2
0
/*
=================
UI_SPSkillMenu_FightEvent
=================
*/
static void UI_SPSkillMenu_FightEvent(void *ptr, int notification)
{
	if (notification != QM_ACTIVATED)
		return;

	UI_SPArena_Start(skillMenuInfo.arenaInfo);
}
/*
=================
UI_SPSkillMenu_FightEvent
=================
*/
static void UI_SPSkillMenu_FightEvent( void *ptr, int notification ) {
	if (notification != QM_ACTIVATED)
		return;

#ifdef TA_SP // SPMODEL
	UI_SPPlayerMenu( skillMenuInfo.arenaInfo );
#else
	UI_SPArena_Start( skillMenuInfo.arenaInfo );
#endif
}
Exemple #4
0
/*
=================
UI_SPPostgameMenu_NextEvent
=================
*/
static void UI_SPPostgameMenu_NextEvent( void* ptr, int event )
{
    int			currentSet;
    int			levelSet;
    int			level;
    int			currentLevel;
    const char	*arenaInfo;

    if (event != QM_ACTIVATED)
    {
        return;
    }
    UI_PopMenu();

    // handle specially if we just won the training map
    if( postgameMenuInfo.won == 0 )
    {
        level = 0;
    }
    else
    {
        level = postgameMenuInfo.level + 1;
    }
    levelSet = level / ARENAS_PER_TIER;

    currentLevel = UI_GetCurrentGame();
    if( currentLevel == -1 )
    {
        currentLevel = postgameMenuInfo.level;
    }
    currentSet = currentLevel / ARENAS_PER_TIER;

    if( levelSet > currentSet || levelSet == UI_GetNumSPTiers() )
    {
        level = currentLevel;
    }

    arenaInfo = UI_GetArenaInfoByNumber( level );
    if ( !arenaInfo )
    {
        return;
    }

    UI_SPArena_Start( arenaInfo );
}