void ParticleSystem::setTexture(Texture *tex) { texture.set(tex); if (defaultOffset) resetOffset(); }
void WaveGenerator::writeWaveU16_257( int16_t * waveToWritePtr ) { resetOffset(); for(int i = 0; i < 256; i++) { waveToWritePtr[i] = getSample(); } waveToWritePtr[256] = waveToWritePtr[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(); }
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(); }