Can't display TiledLayer...

Post Reply
Jeireff
Posts: 7
Joined: Tue Sep 02, 2008 12:36 am

Can't display TiledLayer...

Post by Jeireff » Thu Sep 04, 2008 11:42 pm

Can some one please explain me to use TiledLayer from Libwiisprite?
I've tested and tested and can't display the TiledLayer.

I have a Image with a height of 48 an width of 96
I just want to split it up into two images a 48x48
and diplay just the fist of the both.

Later, if a special WPAD Event is fired, i want to change
the images.

Here is what I have now. But it doesn't work...

Code: Select all

  Image      test;
  if(test.LoadImage(DATAPATH "gewehr_zielen.png") != IMG_LOAD_ERROR_NONE)exit(0);

  TiledLayer ourTileObject(2, 1, 2);
  ourTileObject.SetStaticTileset(&test, 48, 48);
  ourTileObject.SetCell(1,1,1);
  ourTileObject.FillCells(1,1,1,1,1);
  ourTileObject.SetPosition(100,100);
  ourTileObject.Draw(0,0);
Can anybody help me?
THX :D

Jeireff
Posts: 7
Joined: Tue Sep 02, 2008 12:36 am

Re: Can't display TiledLayer...

Post by Jeireff » Mon Sep 08, 2008 12:16 am

Okay Okay....
I' just a stupid idiot. :D
It's so simple... ^^

In this way it have to work ^^

Code: Select all

  Image      test;
  if(test.LoadImage(DATAPATH "gewehr_zielen.png") != IMG_LOAD_ERROR_NONE)exit(0);

  TiledLayer ourTileObject(1, 1, 2);
  ourTileObject.SetStaticTileset(&test, 48, 48);
  ourTileObject.SetCell(0,0,1);
  ourTileObject.SetPosition(100,100);
  ourTileObject.Draw(0,0);
So i would say:
/closed

Greetz

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest