Jump to content

OTF File Fails To Load From Data.zip


Recommended Posts

I wasn't sure it would but yeah, seems to work fine outside of the data file.  Not the end of the world for me.  I can switch to a different font or just leave the font unpackaged (it's free even for commercial).  Just bringing it to your attention.  (Again, I hesitate bringing things like this up because I don't want to take your time away from what I consider more important, like the character controller slope jump issue.)

But it's funny that Leadwerks does things you don't even know about.  :lol:

Link to comment
Share on other sites

It seems like loading from data.zip doesn't work any more but I could also be doing something wrong.

Project file: https://www.mediafire.com/?b2at84k3380jqc9

I started a new project, added a new Menu folder under Material and put a tex file there.  Everything runs fine from Visual Studio and the exe.  But if you Publish it as standalone, the load fails.  Here's the test code.

#include "Leadwerks.h"

using namespace Leadwerks;

int main(int argc, const char *argv[])
{
	Leadwerks::Window* window = Leadwerks::Window::Create();
	Context* context = Context::Create(window);
	World* world = NULL;

	//Load a texture
	Texture* texture = NULL;
	texture = Texture::Load("Materials/Menu/arrowright.tex");
	if(texture==NULL)
	{
		MessageBoxA(0, "Texture load failed.", "Error", 0);
		exit(1);
	}

	while(true)
	{
		if(window->Closed() || window->KeyDown(Key::Escape)) return false;

		context->SetBlendMode(Blend::Alpha);
		context->SetColor(0,0,0,0);
		context->Clear();

		//Display the texture on screen
		context->SetColor(1,1,1,0);
		context->DrawImage(texture,0,0);

		context->Sync();  
	}
	return 0;
}

Why would loading it from data.zip fail?  (I tried both include and not include unused files.)

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...