void GraphicsSystem::update( Engine& engine, World& world, SaveManager& saveManager, const sf::Time& frameTime ) { r_renderWindow->setActive( true ); engine.renderWindow.setTitle( m_configValues.window_name + " " + to_string( frameTime.asMilliseconds() ) + " | EntityCount: " + to_string( world.getEntityCount() ) ); drawFunction(); return; }
void drawBehaviorPool(Game* game, BehaviorPool* pool) { void (*drawFunction)(Game* game, Behavior*) = pool->draw; if(drawFunction != null) { int count = 0; for(int i = 0; i < BEHAVIOR_POOL_SIZE; i += pool->behaviorSize) { if(count++ > pool->itemCount) break; Behavior* behavior = (Behavior*)(&pool->data[i]); if(behavior->active) drawFunction(game, behavior); } } }
void PixelMappingCircle::update() { fbo.begin(); if(active) drawFunction(); ofPushStyle(); ofSetColor(0,fadeOutSpeed); ofRect(0,0,totPixel*30, 1); ofPopStyle(); fbo.end(); ofPixels pixels; fbo.readToPixels(pixels); for(int a = 0; a < totPixel; a++) { values[order[a]] = pixels.getColor(15+(a*30), 0).r; } }