Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Test Sample shows blanks screen
#1
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 ();
}
Reply
#2
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
Reply
#3
Oh crap.  I probably would've caught that myself if I'd been paying more attention.  Thanks though.   Smile
Reply
#4
(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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)