Fix system namespace

v1
Brett 2023-02-11 12:53:32 -05:00
parent f64535671d
commit 128fc2f9dc
6 changed files with 14 additions and 17 deletions

View File

@ -120,7 +120,7 @@ standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
The "system Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
@ -135,7 +135,7 @@ produce the work, or an object code interpreter used to run it.
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
system Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
@ -291,7 +291,7 @@ in one of these ways:
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
from the Corresponding Source as a system Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any

View File

@ -516,12 +516,9 @@ namespace blt {
float oneOverNearMFar = 1.0f / (near - far);
float halfTan = tanf(fov * 0.5f * (float)M_PI / 180.0f);
// perspectiveMat4x4.m00(1.0f/(aspect_ratio*halfTan));
// perspectiveMat4x4.m11(1.0f/halfTan);
// perspectiveMat4x4.m22((far + near) * oneOverNearMFar);
// perspectiveMat4x4.m32(2 * far * near * oneOverNearMFar);
// perspectiveMat4x4.m23(-1);
// perspectiveMat4x4.m33(0);
// this should be all it takes to create a mostly correct projection matrix
// the values are transposed because my matrix implementation is terrible.
// TODO: redo matrix implementation
perspectiveMat4x4.m00(float(1.0 / (aspect_ratio * halfTan)));
perspectiveMat4x4.m11(float(1.0 / halfTan));
perspectiveMat4x4.m22(float(-((far + near) / (far - near))));

View File

@ -7,7 +7,7 @@
#ifndef BLT_SYSTEM_H
#define BLT_SYSTEM_H
namespace blt::System {
namespace blt::system {
// TODO: system memory and current CPU usage. (Linux Only currently)
}

View File

@ -11,7 +11,7 @@
#ifndef BLT_TIME_H
#define BLT_TIME_H
namespace blt::System {
namespace blt::system {
static inline std::string ensureHasDigits(int current, int digits) {
std::string asString = std::to_string(current);
auto length = digits - asString.length();

View File

@ -21,19 +21,19 @@ namespace blt::profiling {
void startInterval(const std::string& profileName, const std::string& intervalName) {
std::scoped_lock lock(profileLock);
CaptureInterval interval{};
interval.start = System::getCurrentTimeNanoseconds();
interval.start = system::getCurrentTimeNanoseconds();
profiles[profileName].intervals[intervalName] = interval;
}
void endInterval(const std::string& profileName, const std::string& intervalName) {
std::scoped_lock lock(profileLock);
profiles[profileName].intervals[intervalName].end = System::getCurrentTimeNanoseconds();
profiles[profileName].intervals[intervalName].end = system::getCurrentTimeNanoseconds();
}
void point(const std::string& profileName, const std::string& pointName) {
std::scoped_lock lock(profileLock);
CapturePoint point{};
point.point = System::getCurrentTimeNanoseconds();
point.point = system::getCurrentTimeNanoseconds();
point.name = pointName;
profiles[profileName].points.push(point);
}

View File

@ -33,7 +33,7 @@ namespace blt::logging {
static constexpr int MAX_LINES = 100000;
public:
explicit LogFileWriter(const std::string& path): m_path(path){
auto currentTime = System::getTimeStringFS();
auto currentTime = system::getTimeStringFS();
output = new std::fstream(path + currentTime + ".log", std::ios::out | std::ios::app);
if (!output->good()){
throw std::runtime_error("Unable to open console filestream!\n");
@ -52,7 +52,7 @@ namespace blt::logging {
output->close();
delete(output);
currentLines = 0;
auto currentTime = System::getTimeStringFS();
auto currentTime = system::getTimeStringFS();
output = new std::fstream(m_path + currentTime + ".log");
}
}
@ -121,7 +121,7 @@ namespace blt::logging {
inline void log(const std::string& str, bool hasEndingLinefeed, LOG_LEVEL level, const char* file, int currentLine, int auto_line){
if (level < BLT_LOGGING_PROPERTIES.minLevel)
return;
std::string outputString = System::getTimeStringLog();
std::string outputString = system::getTimeStringLog();
if (BLT_LOGGING_PROPERTIES.m_logWithData && currentLine >= 0) {
outputString += '[';