Skip to content

Commit 30be602

Browse files
ZIP Loader rewrite is painful, but figured out what CFileArchive::file_buffer_t CArchiveLoaderZip::CArchive::getFileBuffer(const IFileArchive::SListEntry* item) should look like
1 parent 69e5092 commit 30be602

File tree

8 files changed

+333
-545
lines changed

8 files changed

+333
-545
lines changed

include/nbl/system/IFile.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class IFile : public IFileBase, private ISystem::IFutureManipulator
4646
public:
4747
success_t() = default;
4848
~success_t() = default;
49+
4950
inline explicit operator bool()
5051
{
5152
return m_internalFuture.get()==sizeToProcess;
@@ -54,6 +55,9 @@ class IFile : public IFileBase, private ISystem::IFutureManipulator
5455
{
5556
return m_internalFuture.get()!=sizeToProcess;
5657
}
58+
59+
inline size_t getSizeToProcess() const {return sizeToProcess;}
60+
5761
private:
5862
friend IFile;
5963
ISystem::future_t<size_t> m_internalFuture;

include/nbl/system/ISystem.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ class ISystemFile;
2121

2222
class ISystem : public core::IReferenceCounted
2323
{
24+
public:
25+
inline static constexpr uint32_t MAX_FILENAME_LENGTH = 4096;
2426
protected:
2527
class ICaller;
2628
private:
@@ -38,8 +40,6 @@ class ISystem : public core::IReferenceCounted
3840
};
3941
struct SRequestParams_CREATE_FILE : SRequestParamsBase<ERT_CREATE_FILE>
4042
{
41-
inline static constexpr uint32_t MAX_FILENAME_LENGTH = 4096;
42-
4343
char filename[MAX_FILENAME_LENGTH] {};
4444
IFileBase::E_CREATE_FLAGS flags;
4545
};

source/Nabla/CZipReader.cpp

Lines changed: 0 additions & 104 deletions
This file was deleted.

src/nbl/system/CAPKResourcesArchive.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ using namespace nbl::system;
55

66
#ifdef _NBL_PLATFORM_ANDROID_
77
#include <jni.h>
8-
#include <asset_manager.h>
8+
#include <android/asset_manager.h>
99

1010
CAPKResourcesArchive::CAPKResourcesArchive(const path& _path, system::logger_opt_smart_ptr&& logger, ANativeActivity* act, JNIEnv* jni)
1111
: CFileArchive(path(_path),std::move(logger),computeItems(_path.string())), m_mgr(act->assetManager), m_activity(act), m_jniEnv(jni)

0 commit comments

Comments
 (0)