const uint8_t SNII_nextByte() { uint8_t c; switch (state) { case STATE_CONST: c = getRead(ptr++, 0xFC); if (ptr >= const_count) state = STATE_FLAG; return c; case STATE_FLAG: state = STATE_NAME; ptr = 0; return 1; case STATE_NAME: c = getRead(ptr++, 0xFB); if (c==0) { state = STATE_COMMENT; ptr = var_offset; } return c; case STATE_COMMENT: c = getRead(ptr++, 0xFB); if (c==0) state = STATE_DONE; return c; default: return 0; } }
void PostProc::Draw(bool bindFB) { // assume write was just written const ShaderBlur *blurShader = m_blur ? &ShaderBlur::instance(m_blur) : NULL; if (m_blur) { glDisable(GL_BLEND); swapRW(); BindWriteFramebuffer(); blurShader->setDimension(1); getRead().DrawFullscreen(*blurShader); UnbindWriteFramebuffer(); swapRW(); BindWriteFramebuffer(); blurShader->setDimension(0); getRead().DrawFullscreen(*blurShader); UnbindWriteFramebuffer(); glEnable(GL_BLEND); } if (!bindFB) { getWrite().DrawFullscreen<ShaderTexture>(); } // nothing to do if bindFB and no blur }
bool ViewFileManager::setRead(const TTHValue& aTTH) noexcept { auto file = getFile(aTTH); if (!file) { return false; } if (!file->getRead()) { file->setRead(true); fire(ViewFileManagerListener::FileRead(), file); } return true; }
// length is the datagram data length void Configuration::processRead(uint8_t* data, int length) { // see if we can get datagram buffer to reply uint8_t* d = dg->getTransmitBuffer(); if (d == 0) return; // skip and return again later // will reply, mark as done. request = false; // copy front matter for (int i=0; i<6; i++) d[i]=data[i]; d[1] = CFG_CMD_READ_REPLY | (d[1]&0x0F); // get length, space int len = decodeLen(data); uint32_t address = getAddress(data); int space = decodeSpace(data); for (int i=0; i<len; i++) d[i+6] = getRead(address+i, space); // send dg->sendTransmitBuffer(6+len, from); }
const string DefaultPseudoGenome<uint_read_len, uint_reads_cnt, uint_pg_len, ReadsListClass>::getReadVirtual(uint_reads_cnt i) { return getRead(i); }
int hashCode() { return hash(getRead(), BEGIN); }