Example #1
0
	void Sprite::Close()
	{
		_Release(m_pVertexBuffer);
		_Release(m_pIndexBuffer);
		_Release(m_pConstantBuffer);
		_Close(m_pShader);
	}
/*
========================
idSnapShot::objectBuffer_t::operator=
========================
*/
void idSnapShot::objectBuffer_t::operator=( const idSnapShot::objectBuffer_t& other )
{
	//assert( mem.IsMapHeap() );
	if( this != &other )
	{
		_Release();
		data = other.data;
		size = other.size;
		_AddRef();
	}
}
/*
========================
idSnapShot::objectBuffer_t::Alloc
========================
*/
void idSnapShot::objectBuffer_t::Alloc( int s )
{
	//assert( mem.IsMapHeap() );
	if( !verify( s < SIZE_NOT_STALE ) )
	{
		idLib::FatalError( "s >= SIZE_NOT_STALE" );
	}
	_Release();
	data = ( byte* )Mem_Alloc( s + 1, TAG_NETWORKING );
	size = s;
	data[size] = 1;
}
Example #4
0
/**
 * @par Implementation notes:
 */
void
W1::WriteBit(bool bit)
{
    // These operations are time sensitive...
    if(bit) {
        ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
        {
            _DriveLow();
            DELAY(A);
            _Release();
        }
        DELAY(B);
    }else{
Example #5
0
/**
 * @par Implementation notes:
 */
bool
W1::Reset()
{
    bool presence = false;
    DELAY(G);
    _DriveLow();
    DELAY(H);       // Must delay *at least* this amount
    ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    {
        _Release();
        DELAY(I);
        presence = (_ReadState() == 0);
    }
    DELAY(J);
    return presence;
}
Example #6
0
/**
 * @par Implementation notes:
 */
uint8_t
W1::ReadBit()
{
    bool state;

    // These operations are time sensitive...
    ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
    {
        _DriveLow();
        DELAY(A);
        _Release();
        DELAY(E);
        state = _ReadState();
    }
    DELAY(F);
    return (uint8_t)state;
}
Example #7
0
 ~ SharedPtr()
 {
     _Release();
 }
Example #8
0
 ~ SharedArray()
 {
     _Release();
 }
Example #9
0
/**
 * @par Implementation notes:
 */
W1::~W1()
{
    _Release();
}
Example #10
0
CSciEdit::~CSciEdit()
{
	_Release();
}