Exemplo n.º 1
0
void        CweaponIGC::Terminate(void)
{
	AddRef();

	if (m_pshipGunner)
	{
		SetGunner(NULL);
	}

	SetShip(NULL, NA);

	if (m_partType)
	{
		m_partType->Release();
		m_partType = NULL;
	}

	if (m_projectileType)
	{
		m_projectileType->Release();
		m_projectileType = NULL;
	}

	Release();
}
Exemplo n.º 2
0
void        CafterburnerIGC::Terminate(void)
{
    AddRef();

    SetShip(NULL, NA);

    if (m_partType)
    {
        m_partType->Release();
        m_partType = NULL;
    }

    Release();
}
Exemplo n.º 3
0
Board NewBoard()	//See Game.c -> NewGame()
{
	Board init;

	for (int i = 0; i < 5; i++)
	{
		init.Pieces[i] = NewShip();
	}

	init.Pieces[0] = SetShip(&init.Pieces[0], "Carrier", 5);
	init.Pieces[1] = SetShip(&init.Pieces[1], "Battleship", 4);
	init.Pieces[2] = SetShip(&init.Pieces[2], "Cruiser", 3);
	init.Pieces[3] = SetShip(&init.Pieces[3], "Submarine", 3);
	init.Pieces[4] = SetShip(&init.Pieces[4], "Destroyer", 2);

	for (int i = 0; i < 10; i++)
		for (int j = 0; j < 10; j++)
		{
			init.Player[i][j] = NewHole();
			init.Enemy[i][j] = NewHole();
		}

	return init;
}
Exemplo n.º 4
0
void        CdispenserIGC::Terminate(void)
{
    AddRef();

    SetShip(NULL, NA);

    if (m_partType)
    {
        m_partType->Release();
        m_partType = NULL;
    }

    if (m_expendableType)
    {
        m_expendableType->Release();
        m_expendableType = NULL;
    }

    Release();
}