flibitijibibo / FNA-MGHistory

FNA - Accuracy-focused XNA4 reimplementation for open platforms
http://fna-xna.github.io/
246 stars 37 forks source link

No way to mark PNGs as Content (avoiding xnb). #295

Closed phrohdoh closed 9 years ago

phrohdoh commented 9 years ago

When loading PNG files (to avoid the MGCP for reasons) I am given the exception message:

Could not load Content/Sprites/hero.png asset as a non-content file!

IIRC the Content tag was used to tell XNA to convert png to xnb then copy the resulting file to the output directory for usage by the final assembly.

If I am missing something obvious here please feel free to let me know and close this immediately.

flibitijibibo commented 9 years ago

Going to go out on a limb: Is SDL2_image, libpng and zlib in your game's directory? For Linux only SDL2_image/libpng are required, and for OSX SDL2_image is self-contained.

phrohdoh commented 9 years ago

The given (archived -- OS X) libSDL2_image requires a system install of libSDL2_image, so I've done that. I wasn't aware of needing zlib, I'll take a look into that.

flibitijibibo commented 9 years ago

Run the debugger through here: https://github.com/flibitijibibo/FNA/blob/master/src/Content/ContentManager.cs#L501

phrohdoh commented 9 years ago

To be frank I'm not sure how one would do that but I have installed zlib via homebrew and have a libz.1.2.8.dylib which I imagine I can include and reference in the FNA.dll.config for OS X's zlib.dll.

Trying this now.

Vodacek commented 9 years ago

Error is hidden in your loading code:   Could not load Content/Sprites/hero.png asset as a non-content file!   Right way to do it is without file extension. :-)  


Od: Taryn Hill notifications@github.com Komu: "flibitijibibo/FNA" FNA@noreply.github.com Datum: 25.02.2015 20:26 Předmět: Re: [FNA] No way to mark PNGs as Content (avoiding xnb). (#295)

To be frank I'm not sure how one would do that but I have installed zlib via homebrew and have a libz.1.2.8.dylib which I imagine I can include and reference in the FNA.dll.config for OS X's zlib.dll. Trying this now. — Reply to this email directly or view it on GitHub https://github.com/flibitijibibo/FNA/issues/295#issuecomment-76035890.

phrohdoh commented 9 years ago

Ah @Vodacek thank you sir! I did solve that problem but I have yet to get an image on screen (though this is my fault and not FNA's).

Closing this, thanks guys!