#include "../world/ChunkRenderer.hpp"
#include <SDL.h>
+#include <iostream>
namespace blank {
namespace standalone {
DirectCLIFeedback::DirectCLIFeedback(Player &p, HUD &h)
-: CLIContext(p)
+: CLIContext(&p)
, hud(h) {
}
, generator(gc)
, chunk_loader(world.Chunks(), generator, save)
, chunk_renderer(player.GetChunks())
-, spawner(world, res.models, env.rng)
+, spawner(world, res.models)
, sky(env.loader.LoadCubeMap("skybox"))
, cli(world)
, cli_ctx(player, hud)
env.state.Push(&preload);
return;
}
+ std::cout << "chunk preloading complete" << std::endl;
if (spawn_player) {
// TODO: spawn
spawn_player = false;
}
-void PreloadState::Update(int dt) {
+void PreloadState::Update(int) {
loader.LoadN(per_update);
if (loader.ToLoad() <= 0) {
env.state.Pop();
// ignore everything
}
-void UnloadState::Update(int dt) {
+void UnloadState::Update(int) {
for (std::size_t i = 0; i < per_update && cur != end; ++i, ++cur, ++done) {
if (cur->ShouldUpdateSave()) {
save.Write(*cur);