Skip to content

Commit

Permalink
use jLog as a submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerboa-app committed Jan 1, 2024
1 parent 143c671 commit cec4af4
Show file tree
Hide file tree
Showing 18 changed files with 50 additions and 254 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "include/jLog"]
path = include/jLog
url = https://github.com/JerboaBurrow/jLog.git
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ target_link_libraries(Miniaudio vorbisfile ogg ${CMAKE_DL_LIBS})
include_directories(include include/vendored ${OPENGL_INCLUDE_DIRS} ${GLEW_INCLUDE} ${ZLIB_DEPS_DIR})

include_directories(src)
include_directories(include/jLog)

file(GLOB SRC
"src/*.cpp"
Expand Down
8 changes: 4 additions & 4 deletions demo/desktop/perlinWorld/sfml/sfmlPerlinWorld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ using namespace std::chrono;
#include <Console/console.h>

#include <Util/util.h>
#include <log.h>
#include <jLog/jLog.h>

#include <Debug/collisionMeshDebug.h>

Expand Down Expand Up @@ -83,8 +83,8 @@ using Hop::World::AbstractWorld;
using Hop::World::TileWorld;
using Hop::World::MarchingWorld;

using Hop::Logging::INFO;
using Hop::Logging::WARN;
using jLog::INFO;
using jLog::WARN;

using Hop::Util::fixedLengthNumber;

Expand Down Expand Up @@ -116,7 +116,7 @@ int main(int argc, char ** argv)

EntityComponentSystem manager;

Hop::Logging::Log log;
jLog::Log log;

Hop::Console console(log);

Expand Down
8 changes: 4 additions & 4 deletions demo/desktop/perlinWorld/standalone/perlinWorld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ using namespace std::chrono;
#include <Console/console.h>

#include <Util/util.h>
#include <log.h>
#include <jLog/jLog.h>

const int resX = 1000;
const int resY = 1000;
Expand Down Expand Up @@ -72,8 +72,8 @@ using Hop::World::AbstractWorld;
using Hop::World::TileWorld;
using Hop::World::MarchingWorld;

using Hop::Logging::INFO;
using Hop::Logging::WARN;
using jLog::INFO;
using jLog::WARN;

using Hop::Util::fixedLengthNumber;

Expand All @@ -88,7 +88,7 @@ int main(int argc, char ** argv)

EntityComponentSystem manager;

Hop::Logging::Log log;
jLog::Log log;

Hop::Console console(log);

Expand Down
2 changes: 1 addition & 1 deletion demo/desktop/softBodyTetris/sfml/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ int main(int argc, char ** argv)

EntityComponentSystem manager;

Hop::Logging::Log log;
jLog::Log log;

Hop::Console console(log);

Expand Down
6 changes: 3 additions & 3 deletions demo/desktop/softBodyTetris/sfml/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ using namespace std::chrono;
#include <Console/console.h>

#include <Util/util.h>
#include <log.h>
#include <jLog/jLog.h>

#include <Debug/collisionMeshDebug.h>

Expand Down Expand Up @@ -84,8 +84,8 @@ using Hop::World::Boundary;
using Hop::World::AbstractWorld;
using Hop::World::TileWorld;

using Hop::Logging::INFO;
using Hop::Logging::WARN;
using jLog::INFO;
using jLog::WARN;

using Hop::Util::fixedLengthNumber;

Expand Down
2 changes: 1 addition & 1 deletion demo/desktop/softBodyTetris/standalone/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ int main(int argc, char ** argv)

EntityComponentSystem manager;

Hop::Logging::Log log;
jLog::Log log;

Hop::Console console(log);

Expand Down
6 changes: 3 additions & 3 deletions demo/desktop/softBodyTetris/standalone/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ using namespace std::chrono;
#include <Debug/collisionMeshDebug.h>

#include <Util/util.h>
#include <log.h>
#include <jLog/jLog.h>

const int resX = 1000;
const int resY = 1000;
Expand Down Expand Up @@ -77,8 +77,8 @@ using Hop::World::MapSource;
using Hop::World::Boundary;
using Hop::World::AbstractWorld;
using Hop::World::TileWorld;
using Hop::Logging::INFO;
using Hop::Logging::WARN;
using jLog::INFO;
using jLog::WARN;

using Hop::Util::fixedLengthNumber;

Expand Down
12 changes: 6 additions & 6 deletions include/Console/console.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <Console/LuaTable.h>
#include <System/Physics/sPhysics.h>
#include <System/Physics/sCollision.h>
#include <log.h>
#include <jLog/jLog.h>
#include <Object/id.h>

#include <memory>
Expand All @@ -24,11 +24,11 @@ namespace Hop
using Hop::System::Physics::sPhysics;
using Hop::System::Physics::sCollision;

using Hop::Logging::INFO;
using Hop::Logging::WARN;
using Hop::Logging::ERROR;
using Hop::Logging::Log;
using Hop::Logging::ERRORCODE;
using jLog::INFO;
using jLog::WARN;
using jLog::ERROR;
using jLog::Log;
using jLog::ERRORCODE;

struct Routine
{
Expand Down
8 changes: 4 additions & 4 deletions include/Shader/shaders.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <fstream>
#include <exception>
#include <memory>
#include <log.h>
#include <jLog/jLog.h>

namespace Hop::System::Rendering
{
Expand Down Expand Up @@ -72,7 +72,7 @@ namespace Hop::System::Rendering
return this->vertex == s.vertex && this->fragment == s.fragment;
}

bool lint(Hop::Logging::Log & log);
bool lint(jLog::Log & log);

private:

Expand All @@ -91,13 +91,13 @@ namespace Hop::System::Rendering

Shaders(){}

void defaultShaders(Hop::Logging::Log & log);
void defaultShaders(jLog::Log & log);

void makeShader(
const char * v,
const char * f,
std::string n,
Hop::Logging::Log & log
jLog::Log & log
);

void remove(std::string n);
Expand Down
10 changes: 5 additions & 5 deletions include/System/Rendering/sRender.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#ifndef SRENDER
#define SRENDER
#ifndef SRENDER_H
#define SRENDER_H

#include <System/system.h>
#include <System/Rendering/sSpriteRender.h>
#include <Shader/shaders.h>
#include <Object/entityComponentSystem.h>
#include <World/world.h>
#include <log.h>
#include <jLog/jLog.h>

namespace Hop::Object
{
Expand All @@ -16,7 +16,7 @@ namespace Hop::Object
namespace Hop::System::Rendering
{
using Hop::Object::EntityComponentSystem;
using Hop::Logging::Log;
using jLog::Log;
using Hop::World::AbstractWorld;

class sRender : public System
Expand Down Expand Up @@ -55,4 +55,4 @@ namespace Hop::System::Rendering
};
}

#endif /* SRENDER */
#endif /* SRENDER_H */
6 changes: 3 additions & 3 deletions include/System/Sound/sSound.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <miniaudio/miniaudio.h>
#include <System/Sound/vorbis.h>

#include <log.h>
#include <jLog/jLog.h>
#include <sstream>

#include <Object/entityComponentSystem.h>
Expand Down Expand Up @@ -83,10 +83,10 @@ namespace Hop::System::Sound

if (result != MA_SUCCESS)
{
Hop::Logging::Log log;
jLog::Log log;
std::stringstream ss;
ss << "Could not decode audio file: " << filename << ", got error: " << to_string(result);
Hop::Logging::ERROR(ss.str()) >> log;
jLog::ERROR(ss.str()) >> log;
}

if (decoderInUse == DECODER::MA)
Expand Down
1 change: 1 addition & 0 deletions include/jLog
Submodule jLog added at 632081
Loading

0 comments on commit cec4af4

Please sign in to comment.