/* This file is part of Minitrem. Minitrem is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. Minitrem is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Minitrem. If not, see . */ #include "game.hpp" namespace game { pseudostate_t::pseudostate_t(sf::RenderWindow *window_) { pimpl = new state_t(); pimpl->interface.window = window_; pimpl->interface.game = pimpl; } pseudostate_t::~pseudostate_t(void) { delete pimpl; } void pseudostate_t::start(void) { pimpl->start(); } void pseudostate_t::stop(void) { pimpl->stop(); } void pseudostate_t::tick(ntime_t time, double dt) { pimpl->tick(time); pimpl->interface.tick(dt); } world::world_t *pseudostate_t::get_world(void) { return &pimpl->world; } double pseudostate_t::get_render_time(void) { return pimpl->now; } void pseudostate_t::render_interface_to(render::state_t *render) { pimpl->interface.render_to(render); pimpl->compute_ambience(); audio::update(pimpl->interface.camera_3d, pimpl->paused); } }