In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

Changes

Jump to navigation Jump to search
no edit summary
Line 805: Line 805:     
- [[user:WiiPhlex|WiiPhlex]]
 
- [[user:WiiPhlex|WiiPhlex]]
 +
 +
== Lesson 6: Quad. ==
 +
 +
In case you live under a rock, quad means four, in graphics programming, a quad typically means a shape with four sides. It’s very handy having the ability to create a quad on the fly and fortunately, Libwiisprite gives us a class that handles GX to create and manipulate a quad. This class, is simply called, Quad. To include it in your programs you must include either libwiisprite.h or Quad.h. For the basics of Quad, I will again refer to spritetest.cpp in examples. The first line we will look at is line 25.
 +
 +
<source lang="cpp">Quad quad;</source>
 +
 +
Here we create an instance of Quad called quad that we can now use in our program, but there’s still some more work to do before we can print it to the screen! Move further down the code till you get to this section:
 +
 +
<source lang="cpp">quad.SetPosition(-40, -40);
 +
 +
quad.SetWidth(800);
 +
quad.SetHeight(600);</source>
48

edits

Navigation menu