Home >> PSP Tutorials >> Tutorial m6: PSP types (datastructures)

This is the sixth miscellaneous PSP tutorial

M6: PSP types (datastructures)

Hi everybody,

This tutorial is all about the psp types. For this and all tutorials I assume that you have some C++ experience and that the basics are clear to you. This tutorial will list the psp types we use in the main tutorials. It will also give some extra function and/or variants. In addition I will also give some links to more information about certain subjects for those interested to really understand some of the parts of game programming.


With the SDK a lot of structs are available. In this tutorial (or just an overview) I will discuss the used structs in the tutorials. The list:

ScePspFVector3This struct is used to store 3D vectors. The F in the name suggests that it is a float 3d vector.
Here are the member values:
  • float x, the x value of the 3d vector
  • float y, the y value of the 3d vector
  • float z, the z value of the 3d vector
If you do not know what vectors are you should study the subject. (Study Vectors)

Some might not need floats but need other variable types. For this there are other types:
  • ScePspIVector3, Integers
  • ScePspSVector3, short integers
  • ScePspL64Vector3, SceLong64

ScePspFMatrix4 This struct is a 4x4 matrix. We use this type for almost all matrix functions. See also Tutorial 3 about matrices. Here are the 4 member values:
  • ScePspFVector4 x, The first row of the matrix in the vector4 form.
  • ScePspFVector4 y, The second row of the matrix in the vector4 form.
  • ScePspFVector4 z, The third row of the matrix in the vector4 form.
  • ScePspFVector4 w, The fourth row of the matrix in the vector4 form.
So with 4 4D vectors we have a 4x4 matrix. This type is aligned. Here are the other types of matrices:
  • ScePspFMatrix4Unaligned, the unaligned version.
  • ScePspIMatrix4, the integer variant
  • ScePspIMatrix4Unaligned, the unaligned integer variant
  • ScePspFMatrix3, a 3x3 matrix of floats. Why do we use a matrix of 4x4 instead of 3x3 when we are in 3D? read (homogeneous coordinates)
  • ScePspIMatrix3, the integer variant of the 3x3 matrix.
  • ScePspFMatrix2, the 2x2 float variant.
  • ScePspIMatrix2, the 2x2 integer variant.

Questions and comments

If you have question or have some comments on this tutorial please let me know using this form.
Question or comment:

Page rank:Search Engine Optimization