Exemplo n.º 1
0
void aivarLoad(void)
{
    sdword i;

    varsAllocated = LoadInfoNumber();
    varsUsed = LoadInfoNumber();
    uniqueNum = LoadInfoNumber();

    if (varsAllocated > 0)
    {
        vars = memAlloc(sizeof(AIVar*)*varsAllocated, "aivarlist", 0);
    }
    else
    {
        vars = NULL;
    }

    for (i=0;i<varsUsed;i++)
    {
        vars[i] = LoadThisAIVar();
    }

    aivRenderMainScreen = aivarFind("RenderMainScreen");
    if (!aivRenderMainScreen)
        aivRenderMainScreen = aivarCreate("RenderMainScreen");
}
Exemplo n.º 2
0
/*-----------------------------------------------------------------------------
    Name        : tmLoad
    Description : Loads TradeMgr stuff
    Inputs      :
    Outputs     :
    Return      :
----------------------------------------------------------------------------*/
void tmLoad(void)
{
    sdword i;

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

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

    tmTradeDisabled = LoadInfoNumber();
}
Exemplo n.º 3
0
void pingLoad(void)
{
    sdword i;
    sdword num;
    ping *tping;

    num = LoadInfoNumber();

    dbgAssert(pingList.num == 0);

    for (i=0;i<num;i++)
    {
        tping = LoadAndFixAnomalyPing();
        listAddNode(&pingList, &tping->link, tping);
    }
}
void DefenseFighter_Load(Ship *ship)
{
    DefenseFighterSpec *spec = (DefenseFighterSpec *)ship->ShipSpecifics;
    sdword num;
    sdword i;
    DefenseStruct *defenseStruct;

    num = LoadInfoNumber();

    listInit(&spec->DefenseList);

    for (i=0;i<num;i++)
    {
        defenseStruct = LoadDefenseStruct();
        listAddNode(&spec->DefenseList,&defenseStruct->bulletnode,defenseStruct);
    }
}
Exemplo n.º 5
0
void CloakGenerator_Load(Ship *ship)
{
    CloakGeneratorSpec *spec = (CloakGeneratorSpec *)ship->ShipSpecifics;
    sdword num;
    sdword i;
    CloakStruct *cloakStruct;

    num = LoadInfoNumber();

    listInit(&spec->CloakList);

    for (i=0;i<num;i++)
    {
        cloakStruct = LoadCloakStruct();
        listAddNode(&spec->CloakList,&cloakStruct->cloaknode,cloakStruct);
    }
}