Intuitive C Library Reference

Constants
Data structures
Vector functions
Matrix functions
Rendering functions
Sound functions
Control functions
System functions


Constants

Control Devices:

enum CDevice {
  CKeyboard = 0,
  CMouse = 1,
  CPad0 = 2,
  CPad1 = 3
};

Controls:

enum CControl {
  CPadSelect = 0,
  CPadStart = 1,
  CPadUp = 2,
  CPadRight = 3,
  CPadDown = 4,
  CPadLeft = 5,
  CPadTriangle = 6,
  CPadCircle = 7,
  CPadX = 8,
  CPadSquare = 9,
  CPadL1 = 10,
  CPadR1 = 11,
  CPadL2 = 12,
  CPadR2 = 13
};

Data structures

Vector3

struct Vector3 {
  float x, y, z;
};

Matrix

struct Matrix {
  float a11, a12, a13, a14;
  float a21, a22, a23, a24;
  float a31, a32, a33, a34;
  float a41, a42, a43, a44;
};

Vector functions

Vector3Null

void Vector3Null (Vector3 v);

Vector3Set

void Vector3Set (Vector3 v, float x, float y, float z);

Vector3Add

void Vector3Add (Vector3 v, Vector3 a, Vector3 b);

Vector3Sub

void Vector3Sub (Vector3 v, Vector3 a, Vector3 b);

Vector3Scale

void Vector3Scale (Vector3 v, Vector3 a, float s);

Vector3Normalize

void Vector3Normalize (Vector3 v, Vector3 a);

Vector3Lerp

void Vector3Lerp (Vector3 v, Vector3 a, Vector3 b, float s);

Vector3Cross

void Vector3Cross (Vector3 v, Vector3 a, Vector3 b);

Vector3Dot

float Vector3Dot (Vector3 a, Vector3 b);

Vector3Length

float Vector3Length (Vector3 a);

Vector3LengthSq

float Vector3LengthSq (Vector3 a);

Matrix functions

MatrixIdentity

void MatrixIdentity (Matrix m);

MatrixScaling

void MatrixScaling (Matrix m, float x, float y, float z);

MatrixRotationX

void MatrixRotationX (Matrix m, float x);

MatrixRotationY

void MatrixRotationY (Matrix m, float y);

MatrixRotationZ

void MatrixRotationZ (Matrix m, float z);

MatrixTranslation

void MatrixTranslation (Matrix m, float x, float y, float z);

MatrixMultiply

void MatrixMultiply (Matrix m, Matrix a, Matrix b);

Rendering functions

FrameStart

int FrameStart ();

FrameEnd

int FrameEnd ();

FrameClear

int FrameClear ();

SpriteDraw

void SpriteDraw (int x, int y, int sprite);

Sound functions

SoundPlay

int SoundPlay (int sound);

Control functions

ControlValue

float ControlValue (CDevice device, CControl control);

System functions

System

int System ();



© 2008 Intuitive Computers. All rights reserved.