First cut at a replica of the python raycaster. Left side almost works the same but have to sort out math differences.
This commit is contained in:
parent
6b181382bd
commit
ca80736d7c
21 changed files with 2165 additions and 90 deletions
29
dbc.hpp
Normal file
29
dbc.hpp
Normal file
|
@ -0,0 +1,29 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <fmt/core.h>
|
||||
#include <functional>
|
||||
|
||||
using std::string;
|
||||
|
||||
namespace dbc {
|
||||
class Error {
|
||||
public:
|
||||
const string message;
|
||||
Error(string m) : message{m} {}
|
||||
Error(const char *m) : message{m} {}
|
||||
};
|
||||
|
||||
class CheckError : public Error {};
|
||||
class SentinelError : public Error {};
|
||||
class PreCondError : public Error {};
|
||||
class PostCondError : public Error {};
|
||||
|
||||
void log(const string &message);
|
||||
void sentinel(const string &message);
|
||||
void pre(const string &message, bool test);
|
||||
void pre(const string &message, std::function<bool()> tester);
|
||||
void post(const string &message, bool test);
|
||||
void post(const string &message, std::function<bool()> tester);
|
||||
void check(bool test, const string &message);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue