From 191596bce53042c26e9d9672ec276a38464847b3 Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Sun, 26 Nov 2023 03:09:50 -0500 Subject: [PATCH] Let's see if we can see an actual file --- source/Irrlicht/CB3DJSONMeshFileLoader.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/source/Irrlicht/CB3DJSONMeshFileLoader.cpp b/source/Irrlicht/CB3DJSONMeshFileLoader.cpp index f91e8647..eb1c1ae2 100644 --- a/source/Irrlicht/CB3DJSONMeshFileLoader.cpp +++ b/source/Irrlicht/CB3DJSONMeshFileLoader.cpp @@ -11,6 +11,12 @@ namespace irr namespace scene { +//! Remember to remove this function. It's very dumb. +void println(const char* data) { + printf(data, "\n"); +} + + // Class methods. CB3DJSONMeshFileLoader::CB3DJSONMeshFileLoader() { @@ -25,6 +31,15 @@ bool CB3DJSONMeshFileLoader::isALoadableFileExtension( } IAnimatedMesh* CB3DJSONMeshFileLoader::createMesh(io::IReadFile* file) { + println("I am loading your cool file, yay"); + + printf("the file is called: "); + println(file->getFileName().c_str()); + + // Less than zero? What is this file a black hole? + if (file->getSize() <= 0) { + return nullptr; + } //! I'm sure this isn't a horrible idea! return nullptr; }