void draw(World * w) { memset(screen_buffer, 0, sizeof(CHAR_INFO) * BUFFER_CX * BUFFER_CY); draw_map(w); draw_system(w); draw_fps(); write_scr((CHAR_INFO *) screen_buffer, BUFFER_CX, BUFFER_CY); }
/** * \brief Render the bounding box of the items. * \param e (out) The scene elements. * \param delta The delta to apply to the position of the items. */ void bear::wireframe_layer::render ( scene_element_list& e, const visual::position_type& delta ) const { item_list::const_iterator it; visual::color_type color; color.components.alpha = 255; for (it=m_items.begin(); it!=m_items.end(); ++it) { if ( *it != NULL ) { uintptr_t addr = reinterpret_cast<uintptr_t>(*it); color.components.red = (~addr & 0xFF); color.components.green = (~addr & 0xFF00) >> 8; color.components.blue = (~addr & 0xFF0000) >> 16; draw_box(e, delta, **it, color); draw_internal_forces( e, delta, **it, color ); draw_system(e, delta, **it, color); draw_slope(e, delta, **it, color); } }