Jump to content

Can't load a file from a package


Go to solution Solved by Josh,

Recommended Posts

Posted

Can't get this to work.  Am I doing something wrong or is it a bug?  I'm sure it worked like this in the past.  The font can't be found in the package.

#include "Engine.h"
using namespace UltraEngine;


int main(int argc, const char* argv[])
{
    auto package = LoadPackage("Data.zip");
    if (package == nullptr) { Notify("No Package Found"); }

    auto font = LoadFont("Fonts\\ZippedArial.ttf");
    Notify("No Font Found");

    return 0;
}

Data.zip

  • Solution
Posted

I replaced ziplib with libzip :lol: in the next build.

  • Packages are now read-only.
  • Package file names are now case-insensitive.
  • >4 gb files should be supported.
  • AES encryption should be supported, although I have not tried it yet.
  • Thanks 1

Let's build cool stuff and have fun. :)

Posted

Ah, I see. Right now you can just add a call to FileType() and it will trigger a rebuild of the archive directory structure. I will have a build up this morning that doesn't require this:

#include "UltraEngine.h"

using namespace UltraEngine;

int main(int argc, const char* argv[])
{
    auto package = LoadPackage("Data.zip");
    if (package == nullptr) { Notify("No Package Found"); }

    package->FileType("");
    auto font = LoadFont("Fonts\\ZippedArial.ttf");
    if (not font) Notify("No Font Found");

    return 0;
}

 

  • Like 1

Let's build cool stuff and have fun. :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...