Can't Fix Problem with libwiisprite November 30, 2008 11:54PM | Registered: 15 years ago Posts: 70 |
Re: Can't Fix Problem with libwiisprite December 01, 2008 02:30AM | Registered: 15 years ago Posts: 73 |
main.cpp: In function 'int main(int, char**)': main.cpp:23: error: 'SetStaticTileset' was not declared in this scopeThe error message says it can't find the SetStaticTileset function, here's how you're calling it in main.cpp:
12 Image image; ... 17 u32 TileHeight = 14; 18 u32 TileWidth = 14; ... 22 TiledLayer(47, 57, 0); 23 SetStaticTileset(image, &TileWidth, &TileHeight); //<<= problem lineThe function SetStaticTileset() is a non-static member function of the class TiledLayer. In order to call it, you'll need to create an instance of the TiledLayer class. The prototype for this function looks like this:
void SetStaticTileset(Image* image, u32 tileWidth, u32 tileHeight);So you need to pass it a pointer to your image, and pass by value the width and height.
22 TiledLayer tiledlayer(47, 57, 0); 23 tiledlayer.SetStaticTileset(&image, TileWidth, TileHeight);I don't know enough about libwiisprite to tell you if this is going to produce what you want, but this should get rid of the build errors. Hope that helps.
Re: Can't Fix Problem with libwiisprite December 01, 2008 08:48PM | Registered: 15 years ago Posts: 70 |