Esempio n. 1
0
void aivarSave(void)
{
    sdword i;

    SaveInfoNumber(varsAllocated);
    SaveInfoNumber(varsUsed);
    SaveInfoNumber(uniqueNum);

    for (i=0;i<varsUsed;i++)
    {
        SaveThisAIVar(vars[i]);
    }
}
Esempio n. 2
0
void pingSave(void)
{
    Node *node;
    ping *tping;
    sdword num = 0;

    for (node = pingList.head; node != NULL; node = node->next)
    {
        tping = listGetStructOfNode(node);
        if (tping->evaluate == pingAnomalyPingTimeout)
        {
            num++;
        }
    }

    SaveInfoNumber(num);

    for (node = pingList.head; node != NULL; node = node->next)
    {
        tping = listGetStructOfNode(node);
        if (tping->evaluate == pingAnomalyPingTimeout)
        {
            SaveAnomalyPing(tping);
        }
    }
}
Esempio n. 3
0
/*-----------------------------------------------------------------------------
    Name        : tmSave
    Description : Saves TradeMgr stuff
    Inputs      :
    Outputs     :
    Return      :
----------------------------------------------------------------------------*/
void tmSave(void)
{
    sdword i;

    SaveStructureOfSize(tmTechResearchable,sizeof(tmTechResearchable[0])*TM_NUM_TECHS);
    SaveStructureOfSize(tmTechForSale, sizeof(tmTechForSale[0])*TM_NUM_TECHS);
    SaveStructureOfSize(tmTechPrice, sizeof(tmTechPrice[0])*TM_NUM_TECHS);

    for (i=0;i<NUM_KAS_DIALOGS;i++)
    {
        Save_String(tmKASDialog[i]);
    }

    SaveInfoNumber(tmTradeDisabled);
}
void DefenseFighter_Save(Ship *ship)
{
    DefenseFighterSpec *spec = (DefenseFighterSpec *)ship->ShipSpecifics;
    Node *node = spec->DefenseList.head;
    sdword cur = 0;

    SaveInfoNumber(spec->DefenseList.num);

    while (node != NULL)
    {
        cur++;
        SaveDefenseStruct((DefenseStruct *)listGetStructOfNode(node));
        node = node->next;
    }

    dbgAssertOrIgnore(cur == spec->DefenseList.num);
}
Esempio n. 5
0
void CloakGenerator_Save(Ship *ship)
{
    CloakGeneratorSpec *spec = (CloakGeneratorSpec *)ship->ShipSpecifics;
    Node *node = spec->CloakList.head;
    sdword cur = 0;

    SaveInfoNumber(spec->CloakList.num);

    while (node != NULL)
    {
        cur++;
        SaveCloakStruct((CloakStruct *)listGetStructOfNode(node));
        node = node->next;
    }

    dbgAssert(cur == spec->CloakList.num);
}