Tilengine - The 2D retro graphics engine forum

Full Version: Test Sample shows blanks screen
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm running Tilengine 2.9.0 on Windows 10 Pro x64.  I compiled the following code listed on the Github repo's README.MD file and am getting a blank screen when I run the app from the samples folder.

Code:
#include "Tilengine.h"

void main(void) {
   TLN_Tilemap foreground;

   TLN_Init (400, 240, 1, 0, 0);
   TLN_SetLoadPath ("assets/sonic");
   foreground = TLN_LoadTilemap ("assets/sonic/Sonic_md_fg1.tmx", NULL);
   TLN_SetLayerTilemap (0, foreground);

   TLN_CreateWindow (NULL, 0);
   while (TLN_ProcessWindow()) {
       TLN_DrawFrame (0);
   }

   TLN_DeleteTilemap (foreground);
   TLN_Deinit ();
}
Hi!

My fault, thanks for pointing me this out.

The following line must be deleted:

Code:
TLN_SetLoadPath ("assets/sonic");

Because the loading path of the tilemap already contains the full path.

Also make sure that the executable is located outside the "assets" folder, where all the other samples are located.

I'vre already fixed it on GitHub
Oh crap.  I probably would've caught that myself if I'd been paying more attention.  Thanks though.   Smile
(03-20-2021, 12:31 AM)Kr3m77 Wrote: [ -> ]Oh crap.  I probably would've caught that myself if I'd been paying more attention.  Thanks though.   Smile

Not your fault! Basic example is expected to work out of the box. Thanks for taking your time to evaluate this project Smile