Small changes, removed useless files too.
This commit is contained in:
@@ -22,7 +22,6 @@
|
||||
|
||||
namespace CaveGame::Client
|
||||
{
|
||||
using Core::ConcurrentQueue;
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
class AsyncChunkRenderer : public ThreadPool
|
||||
|
@@ -22,6 +22,7 @@ JUI::Window *CaveGame::Client::CreateCreditsWindowWidget(JUI::Widget *parent) {
|
||||
credits_window->MinSize({50, 50});
|
||||
credits_window->Size({300, 400, 0, 0});
|
||||
credits_window->Visible(false);
|
||||
credits_window->BGColor(Colors::Gray);
|
||||
|
||||
auto* listing = new JUI::VerticalListLayout(credits_window->ViewportInstance());
|
||||
listing->Margin(4_px);
|
||||
|
@@ -1,28 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <Core/Macros.hpp>
|
||||
|
||||
class ArgsParser
|
||||
{
|
||||
public:
|
||||
ArgsParser(int argc, char** argv);
|
||||
explicit ArgsParser(std::vector<std::string> argv);
|
||||
|
||||
explicit ArgsParser(const std::string& args_str);
|
||||
|
||||
explicit ArgsParser(const std::string& exec, const std::vector<std::string>& tok);
|
||||
|
||||
bool FlagPresent(const std::string& flag) const;
|
||||
|
||||
std::vector<std::string> GetFlags() const {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
std::string executable;
|
||||
std::string full_args;
|
||||
std::vector<std::string> tokens;
|
||||
};
|
@@ -20,9 +20,6 @@
|
||||
#include <type_traits>
|
||||
//#include <wait.h>
|
||||
|
||||
namespace CaveGame::Core
|
||||
{
|
||||
|
||||
/// A simple C++11 Concurrent Queue based on std::queue.
|
||||
/// Supports waiting operations for retrieving an element when it's empty.
|
||||
/// It's interrupted by calling interrupt.
|
||||
@@ -139,7 +136,4 @@ namespace CaveGame::Core
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
};
|
@@ -1,8 +0,0 @@
|
||||
//
|
||||
// Created by dawsh on 11/10/24.
|
||||
//
|
||||
|
||||
#ifndef RECAVEGAME_GAMEPROTOCOL_HPP
|
||||
#define RECAVEGAME_GAMEPROTOCOL_HPP
|
||||
|
||||
#endif //RECAVEGAME_GAMEPROTOCOL_HPP
|
@@ -1 +0,0 @@
|
||||
#pragma once
|
@@ -1,31 +0,0 @@
|
||||
#include <Core/ArgsParser.hpp>
|
||||
|
||||
ArgsParser::ArgsParser(int argc, char **argv) {
|
||||
executable = std::string(argv[0]);
|
||||
tokens = std::vector<std::string>(argv + 1, argv + argc);
|
||||
for (auto& token : tokens)
|
||||
full_args.append(std::string(token).append(" "));
|
||||
}
|
||||
|
||||
ArgsParser::ArgsParser(std::vector<std::string> argv) {
|
||||
executable = argv[0];
|
||||
full_args = string_build(argv);
|
||||
tokens = {argv.begin() + 1, argv.end()};
|
||||
}
|
||||
|
||||
ArgsParser::ArgsParser(const std::string &args_str) {
|
||||
full_args = args_str;
|
||||
std::vector<std::string> temp_tokens = string_split(full_args, ' ');
|
||||
tokens = {temp_tokens.begin() + 1, temp_tokens.end()};
|
||||
}
|
||||
|
||||
ArgsParser::ArgsParser(const std::string &exec, const std::vector<std::string> &tok) {
|
||||
executable = exec;
|
||||
tokens = tok;
|
||||
for (auto& token : tokens)
|
||||
full_args.append(std::string(token).append(" "));
|
||||
}
|
||||
|
||||
bool ArgsParser::FlagPresent(const std::string &flag) const {
|
||||
return std::ranges::find(tokens, flag) != tokens.end();
|
||||
}
|
@@ -268,6 +268,7 @@ namespace CaveGame::Core
|
||||
// Will cut down on needless busywaiting - Redacted.
|
||||
while (!RequestedChunks.empty())
|
||||
{
|
||||
//std::future f = std::async(std::launch::async, [this]() {
|
||||
Vector2i cell;
|
||||
RequestedChunks.front_pop(cell);
|
||||
|
||||
@@ -278,6 +279,7 @@ namespace CaveGame::Core
|
||||
auto* chunk = new Chunk(cell);
|
||||
generator.FirstPass(chunk);
|
||||
ServedChunks.push(chunk);
|
||||
//});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user