Exemplo n.º 1
0
//
// P_ArchiveThinkers
//
// [STRIFE] Verified unmodified.
//
void P_ArchiveThinkers (void)
{
    thinker_t*          th;

    // save off the current thinkers
    for (th = thinkercap.next ; th != &thinkercap ; th=th->next)
    {
        if (th->function.acp1 == (actionf_p1)P_MobjThinker)
        {
            saveg_write8(tc_mobj);
            saveg_write_pad();
            saveg_write_mobj_t((mobj_t *) th);

            continue;
        }

        // haleyjd: This may seem mysterious but in the DOOM prebeta, 
        // different types of things used different thinker functions. 
        // Those would have all been handled here and this message is 
        // probably a relic of that old system, not to mention the odd
        // name of this function, and use of an enumeration with only
        // two values in it.

        // I_Error ("P_ArchiveThinkers: Unknown thinker function");
    }

    // add a terminating marker
    saveg_write8(tc_end);
}
Exemplo n.º 2
0
void P_ArchiveThinkers(void)
{
    thinker_t *th;

    for (th = thinkercap.next; th != &thinkercap; th = th->next)
    {
        if (th->function == P_MobjThinker)
        {
            SV_WriteByte(tc_mobj);
            saveg_write_mobj_t((mobj_t *) th);
        }
        //I_Error("P_ArchiveThinkers: Unknown thinker function");
    }

    // Add a terminating marker
    SV_WriteByte(tc_end);
}
Exemplo n.º 3
0
void P_ArchiveMobjs(void) {
    mobj_t*    mobj;

    saveg_setup_mobjwrite();
    saveg_write32(savegmobjnum);

    // save off the current mobjs
    for(mobj = mobjhead.next; mobj != &mobjhead; mobj = mobj->next) {
        // don't save if mobj is expected to be removed
        if(mobj->mobjfunc == P_SafeRemoveMobj) {
            continue;
        }

        saveg_write_pad();
        saveg_write_mobj_t(mobj);
        saveg_write_marker(SAVEGAME_MOBJ);
    }

    saveg_write_pad();
}
Exemplo n.º 4
0
//
// P_ArchiveThinkers
//
void P_ArchiveThinkers (void)
{
    thinker_t*		th;

    // save off the current thinkers
    for (th = thinkercap.next ; th != &thinkercap ; th=th->next)
    {
	if (th->function.acp1 == (actionf_p1)P_MobjThinker)
	{
            saveg_write8(tc_mobj);
	    saveg_write_pad();
            saveg_write_mobj_t((mobj_t *) th);

	    continue;
	}
		
	// I_Error ("P_ArchiveThinkers: Unknown thinker function");
    }

    // add a terminating marker
    saveg_write8(tc_end);
}
Exemplo n.º 5
0
//
// P_ArchiveThinkers
//
void P_ArchiveThinkers(void)
{
    // save off the current thinkers
    for (thinker_t *th = thinkers[th_mobj].cnext; th != &thinkers[th_mobj]; th = th->cnext)
    {
        saveg_write8(tc_mobj);
        saveg_write_pad();
        saveg_write_mobj_t((mobj_t *)th);
    }

    // save off the bloodsplats
    for (int i = 0; i < numsectors; i++)
        for (bloodsplat_t *splat = sectors[i].splatlist; splat; splat = splat->snext)
        {
            saveg_write8(tc_bloodsplat);
            saveg_write_pad();
            saveg_write_bloodsplat_t(splat);
        }

    // add a terminating marker
    saveg_write8(tc_end);
}