Exemplo n.º 1
0
// ====================================================================
// WI_initDeathmatchStats
// Purpose: Set up to display DM stats at end of level.  Calculate
//          frags for all players.
// Args:    none
// Returns: void
//
void WI_initDeathmatchStats(void)
{
    int   i; // looping variables

    // CPhipps - allocate data structures needed
    dm_frags  = calloc(MAXPLAYERS, sizeof(*dm_frags));
    dm_totals = calloc(MAXPLAYERS, sizeof(*dm_totals));

    state = StatCount;  // We're doing stats
    acceleratestage = 0;
    dm_state = 1;  // count how many times we've done a complete stat

    cnt_pause = TICRATE;

    for (i=0 ; i<MAXPLAYERS ; i++)
    {
        if (playeringame[i])
        {
            // CPhipps - allocate frags line
            dm_frags[i] = calloc(MAXPLAYERS, sizeof(**dm_frags)); // set all counts to zero

            dm_totals[i] = 0;
        }
    }
    WI_initAnimatedBack();
}
Exemplo n.º 2
0
// ====================================================================
// WI_initShowNextLoc
// Purpose: Prepare to show the next level's location
// Args:    none
// Returns: void
//
void WI_initShowNextLoc(void)
{
    if ((gamemode != commercial) && (gamemap == 8)) {
        G_WorldDone();
        return;
    }

    state = ShowNextLoc;
    acceleratestage = 0;

    // e6y: That was pretty easy - only a HEX editor and luck
    // There is no more desync on ddt-tas.zip\e4tux231.lmp
    // --------- tasdoom.idb ---------
    // .text:00031194 loc_31194:      ; CODE XREF: WI_updateStats+3A9j
    // .text:00031194                 mov     ds:state, 1
    // .text:0003119E                 mov     ds:acceleratestage, 0
    // .text:000311A8                 mov     ds:cnt, 3Ch
    // nowhere no hide
    if (compatibility_level == tasdoom_compatibility)
        cnt = 60;
    else
        cnt = SHOWNEXTLOCDELAY * TICRATE;

    WI_initAnimatedBack();
}
Exemplo n.º 3
0
void WI_initNetgameStats()
{
	state = StatCount;
	acceleratestage = 0;
	ng_state = 1;

	cnt_pause = TICRATE;

	cnt_kills_c.clear();
	cnt_items_c.clear();
	cnt_secret_c.clear();
	cnt_frags_c.clear();

	for (Players::iterator it = players.begin();it != players.end();++it)
	{
		if (!(it->ingame()))
			continue;

		cnt_kills_c.push_back(0);
		cnt_items_c.push_back(0);
		cnt_secret_c.push_back(0);
		cnt_frags_c.push_back(0);

		dofrags += WI_fragSum(*it);
	}

	dofrags = !!dofrags;

	WI_initAnimatedBack();
}
Exemplo n.º 4
0
void WI_initNetgameStats (void)
{

    unsigned int i;

    state = StatCount;
    acceleratestage = 0;
    ng_state = 1;

    cnt_pause = TICRATE;

    cnt_kills_c.clear();
    cnt_items_c.clear();
    cnt_secret_c.clear();
    cnt_frags_c.clear();

    for (i=0 ; i<players.size() ; i++)
    {
        if (!players[i].ingame())
            continue;

        cnt_kills_c.push_back(0);
        cnt_items_c.push_back(0);
        cnt_secret_c.push_back(0);
        cnt_frags_c.push_back(0);

        dofrags += WI_fragSum(players[i]);
    }

    dofrags = !!dofrags;

    WI_initAnimatedBack();
}
Exemplo n.º 5
0
void WI_initDeathmatchStats(void)
{

    int		i;
    int		j;

    state = StatCount;
    acceleratestage = 0;
    dm_state = 1;

    cnt_pause = TICRATE;

    for (i=0 ; i<MAXPLAYERS ; i++)
    {
	if (playeringame[i])
	{
	    for (j=0 ; j<MAXPLAYERS ; j++)
		if (playeringame[j])
		    dm_frags[i][j] = 0;

	    dm_totals[i] = 0;
	}
    }
    
    WI_initAnimatedBack();
}
Exemplo n.º 6
0
void WI_initNetgameStats(void)
{
	int     i;

	state = StatCount;
	acceleratestage = 0;
	ng_state = 1;
	cnt_pause = TICRATE;

	memset(cnt_kills, 0, sizeof(cnt_kills));
	memset(cnt_items, 0, sizeof(cnt_items));
	memset(cnt_secret, 0, sizeof(cnt_secret));
	memset(cnt_frags, 0, sizeof(cnt_frags));
	dofrags = 0;

	for(i = 0; i < NUM_TEAMS; i++)
	{
		/*if (!players[i].plr->ingame)
		   continue;

		   cnt_kills[i] = cnt_items[i] = cnt_secret[i] = cnt_frags[i] = 0; */
		dofrags += teaminfo[i].totalfrags;	//WI_fragSum(i);
	}
	dofrags = !!dofrags;

	WI_initAnimatedBack();
}
Exemplo n.º 7
0
void WI_initNetgameStats(void)
{

    int i;

    state = StatCount;
    acceleratestage = 0;
    ng_state = 1;

    cnt_pause = TICRATE;

    for (i=0 ; i<MAXPLAYERS ; i++)
    {
	if (!playeringame[i])
	    continue;

	cnt_kills[i] = cnt_items[i] = cnt_secret[i] = cnt_frags[i] = 0;

	dofrags += WI_fragSum(i);
    }

    dofrags = !!dofrags;

    WI_initAnimatedBack();
}
Exemplo n.º 8
0
void WI_initShowNextLoc(void)
{
    state = ShowNextLoc;
    acceleratestage = 0;
    cnt = SHOWNEXTLOCDELAY * TICRATE;

    WI_initAnimatedBack();
}
Exemplo n.º 9
0
void WI_initShowNextLoc(void)
{
    ::g->state = ShowNextLoc;
    ::g->acceleratestage = 0;
    ::g->cnt = SHOWNEXTLOCDELAY * TICRATE;

    WI_initAnimatedBack();

	DoomLib::ActivateGame();
}
Exemplo n.º 10
0
void WI_initShowNextLoc(void)
{
	state = ShowNextLoc;
	acceleratestage = 0;
	cnt = SHOWNEXTLOCDELAY * TICRATE;

	WI_initAnimatedBack();

	NetSv_Intermission(IMF_STATE, state, 0);
}
Exemplo n.º 11
0
void WI_initStats(void)
{
    state = StatCount;
    acceleratestage = 0;
    sp_state = 1;
    cnt_kills[0] = cnt_items[0] = cnt_secret[0] = -1;
    cnt_time = cnt_par = -1;
    cnt_pause = TICRATE;

    WI_initAnimatedBack();
}
Exemplo n.º 12
0
void WI_initStats(void)
{
	state = StatCount;
	acceleratestage = 0;
	sp_state = 1;
	cnt_kills[0] = cnt_items[0] = cnt_secret[0] = -1;
	cnt_time = cnt_par = -1;
	cnt_pause = TICRATE;
	WI_initAnimatedBack();

	//NetSv_Intermission(IMF_STATE, state, 0);
}
Exemplo n.º 13
0
void WI_initStats(void)
{
    ::g->state = StatCount;
    ::g->acceleratestage = 0;
    ::g->sp_state = 1;
    ::g->cnt_kills[0] = ::g->cnt_items[0] = ::g->cnt_secret[0] = -1;
    ::g->cnt_time = ::g->cnt_par = -1;
    ::g->cnt_pause = TICRATE;

    WI_initAnimatedBack();

	DoomLib::ShowXToContinue( true );
}
Exemplo n.º 14
0
static void WI_initStats(void)
{

    state = StatCount;
    acceleratestage = 0;
    sp_state = 1;

    *(cnt_kills = malloc(sizeof(*cnt_kills))) = *(cnt_items = malloc(sizeof(*cnt_items))) = *(cnt_secret = malloc(sizeof(*cnt_secret))) = -1;
    cnt_time = cnt_par = cnt_total_time = -1;
    cnt_pause = TICRATE;

    WI_initAnimatedBack();

}
Exemplo n.º 15
0
// ====================================================================
// WI_initStats
// Purpose: Get ready for single player stats
// Args:    none
// Returns: void
// Comment: Seems like we could do all these stats in a more generic
//          set of routines that weren't duplicated for dm, coop, sp
//
void WI_initStats(void)
{
    state = StatCount;
    acceleratestage = 0;
    sp_state = 1;

    // CPhipps - allocate (awful code, I know, but saves changing it all) and initialise
    *(cnt_kills = malloc(sizeof(*cnt_kills))) =
        *(cnt_items = malloc(sizeof(*cnt_items))) =
            *(cnt_secret= malloc(sizeof(*cnt_secret))) = -1;
    cnt_time = cnt_par = cnt_total_time = -1;
    cnt_pause = TICRATE;

    WI_initAnimatedBack();
}
Exemplo n.º 16
0
void WI_initShowNextLoc ()
{
	state = ShowNextLoc;
	acceleratestage = 0;
	cnt = SHOWNEXTLOCDELAY * TICRATE;

	if (epsd != wbs->next_ep && gameinfo.gametype == GAME_Doom)
	{
		WI_unloadData ();
		epsd = wbs->next_ep;
		WI_loadData ();
	}

	WI_initAnimatedBack();
}
Exemplo n.º 17
0
void WI_initDeathmatchStats(void)
{
	int     i;

	state = StatCount;
	acceleratestage = 0;
	dm_state = 1;

	cnt_pause = TICRATE;

	// Clear the on-screen counters.
	memset(dm_totals, 0, sizeof(dm_totals));
	for(i = 0; i < NUM_TEAMS; i++)
		memset(dm_frags[i], 0, sizeof(dm_frags[i]));

	WI_initAnimatedBack();
}
Exemplo n.º 18
0
void WI_initNetgameStats(void)
{

    int i;

    ::g->state = StatCount;
    ::g->acceleratestage = 0;
    ::g->ng_state = 1;

    ::g->cnt_pause = TICRATE;

    for (i=0 ; i<MAXPLAYERS ; i++)
    {
	if (!::g->playeringame[i])
	    continue;

	::g->cnt_kills[i] = ::g->cnt_items[i] = ::g->cnt_secret[i] = ::g->cnt_frags[i] = 0;

	::g->dofrags += WI_fragSum(i);
    }

    ::g->dofrags = !!::g->dofrags;

    WI_initAnimatedBack();

	// JAF PS3 
	/*
	if ( gameLocal->IsMultiplayer() ) {
		if(gameLocal->IsFullVersion() && gameLocal->liveSession.IsHost( ::g->consoleplayer )) {
			bool endOfMission = false;

			if ( ::g->gamemission == 0 && ::g->gamemap == 30 ) {
				endOfMission = true;
			}
			else if ( ::g->gamemission > 0 && ::g->gamemap == 8 ) {
				endOfMission = true;
			}

			gameLocal->liveSession.GetCoopSession().BeginEndLevel( endOfMission );
		}
	}
	*/

	DoomLib::ShowXToContinue( true );
	
}
Exemplo n.º 19
0
static void WI_initShowNextLoc(void)
{

    if ((gamemode != commercial) && (gamemap == 8))
    {

        G_WorldDone();

        return;

    }

    state = ShowNextLoc;
    acceleratestage = 0;
    cnt = SHOWNEXTLOCDELAY * TICRATE;

    WI_initAnimatedBack();

}
Exemplo n.º 20
0
void WI_initDeathmatchStats(void)
{

    int		i;
    int		j;

    ::g->state = StatCount;
    ::g->acceleratestage = 0;
    ::g->dm_state = 1;

    ::g->cnt_pause = TICRATE;

    for (i=0 ; i<MAXPLAYERS ; i++)
    {
	if (::g->playeringame[i])
	{
	    for (j=0 ; j<MAXPLAYERS ; j++)
		if (::g->playeringame[j])
		    ::g->dm_frags[i][j] = 0;

	    ::g->dm_totals[i] = 0;
	}
    }
    
    WI_initAnimatedBack();

	if ( common->IsMultiplayer() ) {
		localCalculateAchievements(false);

		/* JAF PS3 
		gameLocal->liveSession.GetDMSession().SetEndOfMatchStats();
		gameLocal->liveSession.GetDMSession().WriteTrueskill();

		// Write stats
		if ( gameLocal->liveSession.IsHost( ::g->consoleplayer ) ) {
			gameLocal->liveSession.GetDMSession().BeginEndLevel();
		}
		*/
	}

	DoomLib::ShowXToContinue( true );
}
Exemplo n.º 21
0
// ====================================================================
// WI_initNetgameStats
// Purpose: Prepare for coop game stats
// Args:    none
// Returns: void
//
void WI_initNetgameStats(void)
{
    int i;

    state = StatCount;
    acceleratestage = 0;
    ng_state = 1;

    cnt_pause = TICRATE;

    // CPhipps - allocate these dynamically, blank with calloc
    cnt_kills = calloc(MAXPLAYERS, sizeof(*cnt_kills));
    cnt_items = calloc(MAXPLAYERS, sizeof(*cnt_items));
    cnt_secret= calloc(MAXPLAYERS, sizeof(*cnt_secret));
    cnt_frags = calloc(MAXPLAYERS, sizeof(*cnt_frags));

    for (i=0 ; i<MAXPLAYERS ; i++)
        if (playeringame[i])
            dofrags += WI_fragSum(i);

    dofrags = !!dofrags; // set to true or false - did we have frags?

    WI_initAnimatedBack();
}