Line 5:
Line 5:
== Foreword ==
== Foreword ==
−
[[Libwiisprite]]
+
Programming for the Nintendo Wii with [[Libwiisprite]], ''a tutorial by {{u|WiiPhlex}}.''
−
−
The following tutorial is by [[user:WiiPhlex|WiiPhlex]]
There are several things users should note before proceeding any further with the tutorial. This tutorial is released on the latest release of the Libwiisprite library, 0.3.0b which you can download here -> http://chaosteil.googlepages.com/libwiisprite-0.3.0b.tar.gz.
There are several things users should note before proceeding any further with the tutorial. This tutorial is released on the latest release of the Libwiisprite library, 0.3.0b which you can download here -> http://chaosteil.googlepages.com/libwiisprite-0.3.0b.tar.gz.
Line 856:
Line 854:
Now I’ll go through a series of Get/Set Functions that are in the Quad class, explaining what they are and how to use em.
Now I’ll go through a series of Get/Set Functions that are in the Quad class, explaining what they are and how to use em.
−
'''SetRotation and GetRotation'''
+
===SetRotation and GetRotation===
<source lang="cpp">void wsp::Quad::SetRotation ( f32 rotation )
<source lang="cpp">void wsp::Quad::SetRotation ( f32 rotation )
Line 893:
Line 891:
That’s about it for that function, now we are able to move on to the rest of the Get, Set functions.
That’s about it for that function, now we are able to move on to the rest of the Get, Set functions.
−
'''SetBorderWidth and GetBorderWidth'''
+
===SetBorderWidth and GetBorderWidth===
<source lang="cpp">void wsp::Quad::SetBorderWidth ( u16 width )
<source lang="cpp">void wsp::Quad::SetBorderWidth ( u16 width )
Line 1,463:
Line 1,461:
[[Image:Flexfig16.png]]
[[Image:Flexfig16.png]]
−
'''Rendering a TiledLayer'''
+
===Rendering a TiledLayer===
A TiledLayer can be rendered by manually calling its paint method; it can also be rendered automatically using a LayerManager object.
A TiledLayer can be rendered by manually calling its paint method; it can also be rendered automatically using a LayerManager object.
Line 1,584:
Line 1,582:
== EXAMPLE PROGRAMS ==
== EXAMPLE PROGRAMS ==
−
'''Lesson 1: Setting up Libwiisprite for use.'''
+
===Lesson 1: Setting up Libwiisprite for use.===
Description: This is the same code encountered in chapter 1, to build, make sure to have to include the correct lib’s (as shown in chapter 1) in your make file. For a template make file, refer to lesson 1.
Description: This is the same code encountered in chapter 1, to build, make sure to have to include the correct lib’s (as shown in chapter 1) in your make file. For a template make file, refer to lesson 1.
−
'''Lesson 2: Setting up the Video display. '''
+
===Lesson 2: Setting up the Video display. ===
Description: basic template for using Libwiisprite, in order to build make sure you have included the correct lib’s as stated above. The following program will set up the wii and render the background with the colour white.
Description: basic template for using Libwiisprite, in order to build make sure you have included the correct lib’s as stated above. The following program will set up the wii and render the background with the colour white.
Line 1,623:
Line 1,621:
</source>
</source>
−
'''Lesson 3: Loading and printing images.'''
+
===Lesson 3: Loading and printing images.===
Description: a simple program that loads an image from SD card and prints it to the screen, see Lesson3 for more information.
Description: a simple program that loads an image from SD card and prints it to the screen, see Lesson3 for more information.
Line 1,675:
Line 1,673:
</source>
</source>
−
'''Lesson 4: Basic Image Manipulation '''
+
===Lesson 4: Basic Image Manipulation ===
Description: Shows some examples of manipulation images with some of the basic public functions in Libwiisprite, this was taken from sprite.cpp in the Libwiisprite examples release. This assumes you have two images on the SD card called libwiisprite.png and libwiisprite2.png..
Description: Shows some examples of manipulation images with some of the basic public functions in Libwiisprite, this was taken from sprite.cpp in the Libwiisprite examples release. This assumes you have two images on the SD card called libwiisprite.png and libwiisprite2.png..
Line 1,794:
Line 1,792:
</source>
</source>
−
'''Lesson 5: Layer Management.'''
+
===Lesson 5: Layer Management.===
Description: A small program that shows how to use function in the LayerManager class. By then end of the series of calls, Quad is at location 0 and sprite is at 1.
Description: A small program that shows how to use function in the LayerManager class. By then end of the series of calls, Quad is at location 0 and sprite is at 1.
Line 1,861:
Line 1,859:
</source>
</source>
−
'''Lesson 6: Quad.'''
+
===Lesson 6: Quad.===
Description: Shows examples of how you might call functions in the quad class as well as how to create one.
Description: Shows examples of how you might call functions in the quad class as well as how to create one.
Line 1,921:
Line 1,919:
}</source>
}</source>
−
'''Lesson 7: Basic Animation'''
+
===Lesson 7: Basic Animation===
None Yet, if you have a sample to submit for this section email me at phlex.wii@gmail.com
None Yet, if you have a sample to submit for this section email me at phlex.wii@gmail.com
−
'''Lesson 8: Collision Detection'''
+
===Lesson 8: Collision Detection===
Description: Shows how to test for collision between various objects, does not contain an example for node based collision detection (yet).
Description: Shows how to test for collision between various objects, does not contain an example for node based collision detection (yet).
Line 2,033:
Line 2,031:
}</source>
}</source>
−
'''Lesson 9: Tiled Layers.'''
+
===Lesson 9: Tiled Layers.===
None Yet, if you have a sample to submit for this section email me at phlex.wii@gmail.com
None Yet, if you have a sample to submit for this section email me at phlex.wii@gmail.com
−
'''Lesson 10: Pixel Referencing and Offset.'''
+
===Lesson 10: Pixel Referencing and Offset.===
None Yet, if you have a sample to submit for this section email me at phlex.wii@gmail.com
None Yet, if you have a sample to submit for this section email me at phlex.wii@gmail.com