Esempio n. 1
0
void ParticleSystem::setTexture(Texture *tex)
{
	texture.set(tex);

	if (defaultOffset)
		resetOffset();
}
Esempio n. 2
0
void WaveGenerator::writeWaveU16_257( int16_t * waveToWritePtr )
{
    resetOffset();
    for(int i = 0; i < 256; i++)
    {
		waveToWritePtr[i] = getSample();
	}
	waveToWritePtr[256] = waveToWritePtr[0];
}
Esempio n. 3
0
OutPacketBuffer::OutPacketBuffer(unsigned preferredPacketSize,
				 unsigned maxPacketSize)
  : fPreferred(preferredPacketSize), fMax(maxPacketSize),
    fOverflowDataSize(0) {
  unsigned maxNumPackets = (maxSize + (maxPacketSize-1))/maxPacketSize;
  fLimit = maxNumPackets*maxPacketSize;
  fBuf = new unsigned char[fLimit];
  resetPacketStart();
  resetOffset();
  resetOverflowData();
}
Esempio n. 4
0
void ParticleSystem::setQuads(const std::vector<Quad *> &newQuads)
{
	std::vector<StrongRef<Quad>> quadlist;
	quadlist.reserve(newQuads.size());

	for (Quad *q : newQuads)
		quadlist.push_back(q);

	quads = quadlist;

	if (defaultOffset)
		resetOffset();
}