Tilengine - The 2D retro graphics engine forum
Test Sample shows blanks screen - Printable Version

+- Tilengine - The 2D retro graphics engine forum (http://tilengine.org/forum)
+-- Forum: English forums (http://tilengine.org/forum/forumdisplay.php?fid=3)
+--- Forum: Support (http://tilengine.org/forum/forumdisplay.php?fid=7)
+--- Thread: Test Sample shows blanks screen (/showthread.php?tid=1071)



Test Sample shows blanks screen - Kr3m77 - 03-19-2021

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 ();
}



RE: Test Sample shows blanks screen - megamarc - 03-19-2021

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


RE: Test Sample shows blanks screen - Kr3m77 - 03-20-2021

Oh crap.  I probably would've caught that myself if I'd been paying more attention.  Thanks though.   Smile


RE: Test Sample shows blanks screen - megamarc - 03-20-2021

(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