Large diffs are not rendered by default.

@@ -0,0 +1,64 @@
#pragma once
//
// Bachelor of Software Engineering
// Media Design School
// Auckland
// New Zealand
//
// (c) 2018 Media Design School
//
// File Name : "PowerUp.h"
// Description : PowerUp declaration file
// Author : Vivian Ngo & Melanie Jacobson
// Mail : vivian.ngo7572@mediadesign.school.nz
//


#include "Player.h"
#include "Enemy.h"

//
//struct location
//{
// float x;
// float y;
//};

class CAIManager
{
public:
static CAIManager* GetInstance();
static void DestroyInstance();
~CAIManager() {};

void BouncyBall(std::shared_ptr<CEnemy> _enemy);
void Seek(glm::vec3 _target, std::shared_ptr<CEnemy> _enemy);
void Flee(glm::vec3 _target, std::shared_ptr<CEnemy> _enemy);
void Arrival(glm::vec3 _target, std::shared_ptr<CEnemy> _enemy);
void PathFollowing(std::vector<glm::vec3> _obstList, std::shared_ptr<CEnemy> _enemy);
void Wander(std::shared_ptr<CEnemy> _enemy);
void Pursuit(std::shared_ptr<CPlayer> _target, std::shared_ptr<CEnemy> _enemy);
void Evade(std::shared_ptr<CPlayer> _target, std::shared_ptr<CEnemy> _enemy);
void WallFollowing(std::vector<glm::vec3> points, std::shared_ptr<CEnemy> _enemy);

void CheckBoundaries(std::shared_ptr<CEnemy> _enemy);
int FindClosestPoint(std::vector<glm::vec3> _obstList, glm::vec3 _AI);
float Distance(glm::vec3 _i, glm::vec3 _j);
glm::vec3 randWander;

private:
static CAIManager* s_pAIInstance;
CAIManager() {};

float m_maxVelocity = 0.6f;
float m_maxforce = 1.0f;
float m_mass = 100.0f;
float m_radius = 50.0f;
float m_pathRadius = 10.0f;
float m_maxSeeAhead = 20.0f;
float m_avoidanceForce = 1.0f;
float m_maxAvoidanceForce = 5.0f;
float m_wanderStart = 0.0f;
float m_wanderEnd = 0.0f;
};

@@ -0,0 +1,105 @@
//
// Bachelor of Software Engineering
// Media Design School
// Auckland
// New Zealand
//
// (c) 2018 Media Design School
//
// File Name : "Bullet.cpp"
// Description : Bullet declaration file
// Author : Vivian Ngo & Melanie Jacobson
// Mail : vivian.ngo7572@mediadesign.school.nz
//

#include "Bullet.h"

/***********************
* CBullet constructor
* @author: Vivian Ngo & Melanie Jacobson
* @date: 9/04/18
* @parameter: bulletSprite - sprite of bullet
* @parameter: damage - damage of bullet
* @parameter: _bltType - bullet type
***********************/
CBullet::CBullet(std::shared_ptr<CSprite> _bulletSprite, int _damage, EBullets _bltType) :
m_pBulletSprite(_bulletSprite), m_numDamage(_damage), m_bltType(_bltType)
{
}

/***********************
* CBullet destructor
* @author: Vivian Ngo & Melanie Jacobson
* @date: 9/04/18
***********************/
CBullet::~CBullet() {}

/***********************
* Update: Update the bullet
* @author: Vivian Ngo & Melanie Jacobson
* @date: 08/05/18
***********************/
void CBullet::Update()
{
if (GetSprite()->GetRot().z == 0.0f) //up
{
GetSprite()->Translate(glm::vec3(
GetSprite()->GetPos().x,
GetSprite()->GetPos().y,
GetSprite()->GetPos().z - 0.8f));
}
else if (GetSprite()->GetRot().z == 180.0f) //down
{
GetSprite()->Translate(glm::vec3(
GetSprite()->GetPos().x,
GetSprite()->GetPos().y,
GetSprite()->GetPos().z + 0.8f));
}
else if (GetSprite()->GetRot().z == 90.0f) //left
{
GetSprite()->Translate(glm::vec3(
GetSprite()->GetPos().x - 0.8f,
GetSprite()->GetPos().y,
GetSprite()->GetPos().z));
}
else if (GetSprite()->GetRot().z == -90.0f) //left
{
GetSprite()->Translate(glm::vec3(
GetSprite()->GetPos().x + 0.8f,
GetSprite()->GetPos().y,
GetSprite()->GetPos().z));
}
}

/***********************
* SetDamagePoint: Sets the bullet damage to a new one
* @author: Vivian Ngo & Melanie Jacobson
* @date: 9/04/18
* @parameter: damage - damage of bullet to set
***********************/
void CBullet::SetDamagePoint(int damage)
{
m_numDamage = damage;
}

/***********************
* GetDamagePoint: Gets the bullet damage
* @author: Vivian Ngo & Melanie Jacobson
* @date: 9/04/18
* @return: numDamage - damage of bullet
***********************/
int CBullet::GetDamagePoint()
{
return m_numDamage;
}

/***********************
* GetSprite: Gets the bullet's sprite
* @author: Vivian Ngo & Melanie Jacobson
* @date: 08/05/18
* @return: m_pBulletSprite - returns the bullet's sprite
***********************/
std::shared_ptr<CSprite> CBullet::GetSprite()
{
return m_pBulletSprite;
}
@@ -0,0 +1,36 @@
#pragma once
//
// Bachelor of Software Engineering
// Media Design School
// Auckland
// New Zealand
//
// (c) 2018 Media Design School
//
// File Name : "Bullet.cpp"
// Description : Bullet declaration file
// Author : Vivian Ngo & Melanie Jacobson
// Mail : vivian.ngo7572@mediadesign.school.nz
//

#include "stdafx.h"
#include "Sprite.h"

class CBullet : public CSprite
{
public:
CBullet() {};
CBullet(std::shared_ptr<CSprite> _bulletSprite, int _damage, EBullets _bltType);
~CBullet();

virtual void Update();
void SetDamagePoint(int damage);
int GetDamagePoint();
std::shared_ptr<CSprite> GetSprite();

private:
int m_numDamage;
EBullets m_bltType;
std::shared_ptr<CSprite> m_pBulletSprite;
};

@@ -0,0 +1,226 @@
//
// Bachelor of Software Engineering
// Media Design School
// Auckland
// New Zealand
//
// (c) 2018 Media Design School
//
// File Name : "Camera.cpp"
// Description : Camera implementation file
// Author : Vivian Ngo & Melanie Jacobson
// Mail : vivian.ngo7572@mediadesign.school.nz
//

#include "Camera.h"
#include "Time.h"
#include "Input.h"
#include "SceneManager.h"

CCamera* CCamera::s_pCameraInstance = 0;
glm::vec3 CCamera::cameraFront = glm::vec3(0.0f, 0.0f, -1.0f);
float CCamera::m_fov = 45.0f; // field of view
glm::mat4 CCamera::MVP = glm::mat4(); // field of view

/***********************
* CCamera: Camera constructor
* @author: Vivian Ngo & Melanie Jacobson
* @date: 08/05/18
***********************/
CCamera::CCamera(){}

/***********************
* GetInstance: Gets the instance of the camera singleton class
* @author: Vivian Ngo & Melanie Jacobson
* @date: 08/05/18
* @return: s_pCameraInstance - Instance of the Camera singleton class
***********************/
CCamera* CCamera::GetInstance()
{
if (s_pCameraInstance == 0)
{
s_pCameraInstance = new CCamera();
}
return s_pCameraInstance;
}

/***********************
* DestroyInstance: Destroys the instance of the camera singleton class if there is one
* @author: Vivian Ngo & Melanie Jacobson
* @date: 08/05/18
***********************/
void CCamera::DestroyInstance()
{
if (s_pCameraInstance != 0) // If there is an instance of this class
{
//Delete the instance
delete s_pCameraInstance;
s_pCameraInstance = nullptr;
}
}

/***********************
* SetMVP: Destroys the instance of the camera singleton class if there is one
* @author: Vivian Ngo & Melanie Jacobson
* @date: 08/05/18
* @parameter: _trans - Translation
* @parameter: _scale - Scale
* @parameter: _rot - Rotation
***********************/
void CCamera::SetMVP(glm::vec3 _trans, glm::vec3 _scale, glm::vec3 _rot)
{
//Calculate the model to be displayed onto the screen
glm::mat4 translate = glm::translate(glm::mat4(), _trans);
glm::mat4 rotation = glm::rotate(glm::mat4(), glm::radians(_rot.x), glm::vec3(1, 0, 0));
rotation = glm::rotate(rotation, glm::radians(_rot.z), glm::vec3(0, 1, 0));
rotation = glm::rotate(rotation, glm::radians(_rot.y), glm::vec3(0, 0, 1));
glm::mat4 scale = glm::scale(glm::mat4(), _scale);

glm::mat4 Model = translate * rotation * scale;

//Moves the camera when WASD input is pressed
float cameraSpeed = 0.01f * CTime::GetInstance()->GetCurTimeSecs();

cameraPos = glm::vec3(CSceneManager::GetInstance()->GetPlayerPosition().x, -CSceneManager::GetInstance()->GetPlayerPosition().y, CSceneManager::GetInstance()->GetPlayerPosition().z);
cameraPos.z += 50;
cameraPos.y += 50;


translate = glm::translate(glm::mat4(), glm::vec3());

CameraMovement(cameraSpeed);

//ROTATE CAMERA TO VIEW AS EAGLE EYE
/*ROT = glm::rotate(glm::mat4(), glm::radians(80.0f), glm::vec3(1.0f, 0.0f, 0.0f));*/
view = glm::lookAt(cameraPos, cameraPos + cameraFront, cameraUp);
projection = glm::perspective(m_fov, (GLfloat)SCR_WIDTH / (GLfloat)SCR_HEIGHT, 0.1f, 10000.0f);

MVP = (projection * ROT) * view * Model;
glUseProgram(Utils::programTextured);
GLint MVPLoc = glGetUniformLocation(Utils::programTextured, "MVP");
glUniformMatrix4fv(MVPLoc, 1, GL_FALSE, glm::value_ptr(MVP));
}

/***********************
* SetFOV: Sets the field of view
* @author: Vivian Ngo & Melanie Jacobson
* @date: 08/05/18
* @parameter: _fov to change
***********************/
void CCamera::SetFOV(float _fov)
{
m_fov = _fov;
}

float CCamera::GetFOV()
{
return m_fov;
}

/***********************
* SetCamFront: Sets the camera front
* @author: Vivian Ngo & Melanie Jacobson
* @date: 08/05/18
* @parameter: _cFront - the coordinates of the camera front to change to
***********************/
void CCamera::SetCamFront(glm::vec3 _cFront)
{
cameraFront = _cFront;
}

/***********************
* SetCamPos: Sets the camera position
* @author: Vivian Ngo & Melanie Jacobson
* @date: 08/05/18
* @parameter: _cPos - the coordinates of the camera position to change to
***********************/
void CCamera::SetCamPos(glm::vec3 _cPos)
{
cameraPos = _cPos;
}

/***********************
* SetCamUp: Sets camera up
* @author: Vivian Ngo & Melanie Jacobson
* @date: 08/05/18
* @parameter: _cUp - the coordinates of camera up to change to
***********************/
void CCamera::SetCamUp(glm::vec3 _cUp)
{
cameraUp = _cUp;
}

/***********************
* SetCamSpeed: Sets the speed of the camera
* @author: Vivian Ngo & Melanie Jacobson
* @date: 08/05/18
* @parameter: _cSpeed - the camera speed to change to
***********************/
void CCamera::SetCamSpeed(float _cSpeed)
{
cameraSpeed = _cSpeed;
}

void CCamera::CameraMovement(float _camSpeed)
{
if (Utils::SpecKeyState[0] == INPUT_HOLD || Utils::SpecKeyState[0] == INPUT_HOLD)
{
cameraPos.z += cameraSpeed; //+= cameraSpeed * cameraUp;
}
else if (Utils::SpecKeyState[1] == INPUT_HOLD || Utils::SpecKeyState[1] == INPUT_HOLD)
{
cameraPos.z -= +cameraSpeed; //-= cameraSpeed * cameraUp;
}
else if (Utils::SpecKeyState[2] == INPUT_HOLD || Utils::SpecKeyState[2] == INPUT_HOLD)
{
cameraPos.y -= cameraSpeed; //-= glm::normalize(glm::cross(cameraFront, cameraUp)) * cameraSpeed;
}
else if (Utils::SpecKeyState[3] == INPUT_HOLD || Utils::SpecKeyState[3] == INPUT_HOLD)
{
cameraPos.y += cameraSpeed; //glm::normalize(glm::cross(cameraFront, cameraUp)) * cameraSpeed;
}
}

/***********************
* GetCamFront: Gets the camera front
* @author: Vivian Ngo & Melanie Jacobson
* @date: 08/05/18
* @return: cameraFront - the camera front
***********************/
glm::vec3 CCamera::GetCamFront()
{
return cameraFront;
}

/***********************
* GetCamPos: Gets the camera's position
* @author: Vivian Ngo & Melanie Jacobson
* @date: 08/05/18
* @return: cameraPos - the camera's position
***********************/
glm::vec3 CCamera::GetCamPos()
{
return cameraPos;
}

/***********************
* GetCamUp: Gets the camera up coordinates
* @author: Vivian Ngo & Melanie Jacobson
* @date: 08/05/18
* @return: cameraUp - the camera up coordinate
***********************/
glm::vec3 CCamera::GetCamUp()
{
return cameraUp;
}

/***********************
* GetCamSpeed: Gets the camera speed
* @author: Vivian Ngo & Melanie Jacobson
* @date: 08/05/18
* @return: cameraSpeed - the camera speed
***********************/
float CCamera::GetCamSpeed()
{
return cameraSpeed;
}
@@ -0,0 +1,68 @@
#pragma once
//
// Bachelor of Software Engineering
// Media Design School
// Auckland
// New Zealand
//
// (c) 2018 Media Design School
//
// File Name : "Camera.h"
// Description : Camera declaration file
// Author : Vivian Ngo & Melanie Jacobson
// Mail : vivian.ngo7572@mediadesign.school.nz
//

#include "stdafx.h"
#include <memory>

class CCamera
{
public:
static CCamera* GetInstance();
static void DestroyInstance();

void SetMVP(glm::vec3 _trans, glm::vec3 _scale, glm::vec3 _rot);

static void SetFOV(float _fov);
static float GetFOV();
static void SetCamFront(glm::vec3 _cFront);
void SetCamPos(glm::vec3 _cPos);
void SetCamUp(glm::vec3 _cUp);
void SetCamSpeed(float _cSpeed);
void CameraMovement(float _camSpeed);

glm::vec3 GetCamFront();
glm::vec3 GetCamPos();
glm::vec3 GetCamUp();
float GetCamSpeed();
glm::mat4 GetMVP() { return MVP; }
glm::mat4 GetProjection() { return projection; }
glm::mat4 GetView() { return view; }
void SetRotation(glm::mat4 rot) {ROT = rot; }

private:
static CCamera* s_pCameraInstance;
CCamera();

static glm::vec3 cameraFront;
static float m_fov;

glm::mat4 view;
glm::mat4 projection;

glm::vec3 cameraPos = glm::vec3(0.0f, -10.0f, 90.0f);
glm::vec3 cameraUp = glm::vec3(0.0f, 1.0f, 0.0f);
glm::vec3 cameraTarget = glm::vec3(0.0f, 0.0f, 0.0f);

glm::vec3 cameraDirection = glm::normalize(cameraPos - cameraTarget); //pointing in reverse of where it is pointing
glm::vec3 cameraRight = glm::normalize(glm::cross(cameraUp, cameraDirection));

float cameraSpeed = 0.05f;

GLfloat currentTime;
static glm::mat4 MVP;
glm::mat4 ROT = glm::rotate(glm::mat4(), glm::radians(40.0f), glm::vec3(1.0f, 0.0f, 0.0f));

};

@@ -0,0 +1,30 @@
#include "CubeMap.h"
#include "Texture.h"

/***********************
* CCubeMap: CCubeMap constructor - initialises the cubemap
* @author: Vivian Ngo & Melanie Jacobson
* @date: 08/05/18
***********************/
CCubeMap::CCubeMap()
{
Texture::BindTexture("", 0.0f, 0.0f, glm::vec4(1.0f, 1.0f, 1.0f, 1.0f), m_vao, m_texture, CUBEMAP);
}

/***********************
* CCubeMap: CCubeMap destructor
* @author: Vivian Ngo & Melanie Jacobson
* @date: 08/05/18
***********************/
CCubeMap::~CCubeMap(){}

/***********************
* Render: CCubeMap Render - Renders cubemap onto screen
* @author: Vivian Ngo & Melanie Jacobson
* @date: 08/05/18
***********************/
void CCubeMap::Render()
{
CCamera::GetInstance()->SetMVP(glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(1.0f, 1.0f, 1.0f), glm::vec3(0.0f, 0.0f, 0.0F));
Texture::Render(m_vao, m_texture, CUBEMAP);
}
@@ -0,0 +1,31 @@
#pragma once
//
// Bachelor of Software Engineering
// Media Design School
// Auckland
// New Zealand
//
// (c) 2018 Media Design School
//
// File Name : "CubeMap.h"
// Description : CubeMap declaration file
// Author : Vivian Ngo & Melanie Jacobson
// Mail : vivian.ngo7572@mediadesign.school.nz
//
#include "stdafx.h"
#include "Camera.h"

class CCubeMap
{
public:
CCubeMap();
~CCubeMap();

void Render();

private:
GLuint m_vao;
GLuint m_texture;

};

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,178 @@
/* ======================================================================================================== */
/* FMOD Studio - codec development header file. Copyright (c), Firelight Technologies Pty, Ltd. 2004-2016. */
/* */
/* Use this header if you are wanting to develop your own file format plugin to use with */
/* FMOD's codec system. With this header you can make your own fileformat plugin that FMOD */
/* can register and use. See the documentation and examples on how to make a working plugin. */
/* */
/* ======================================================================================================== */

#ifndef _FMOD_CODEC_H
#define _FMOD_CODEC_H

typedef struct FMOD_CODEC_STATE FMOD_CODEC_STATE;
typedef struct FMOD_CODEC_WAVEFORMAT FMOD_CODEC_WAVEFORMAT;

/*
Codec callbacks
*/
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_OPEN_CALLBACK) (FMOD_CODEC_STATE *codec_state, FMOD_MODE usermode, FMOD_CREATESOUNDEXINFO *userexinfo);
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_CLOSE_CALLBACK) (FMOD_CODEC_STATE *codec_state);
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_READ_CALLBACK) (FMOD_CODEC_STATE *codec_state, void *buffer, unsigned int samples_in, unsigned int *samples_out);
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_GETLENGTH_CALLBACK) (FMOD_CODEC_STATE *codec_state, unsigned int *length, FMOD_TIMEUNIT lengthtype);
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_SETPOSITION_CALLBACK) (FMOD_CODEC_STATE *codec_state, int subsound, unsigned int position, FMOD_TIMEUNIT postype);
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_GETPOSITION_CALLBACK) (FMOD_CODEC_STATE *codec_state, unsigned int *position, FMOD_TIMEUNIT postype);
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_SOUNDCREATE_CALLBACK) (FMOD_CODEC_STATE *codec_state, int subsound, FMOD_SOUND *sound);
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_METADATA_CALLBACK) (FMOD_CODEC_STATE *codec_state, FMOD_TAGTYPE tagtype, char *name, void *data, unsigned int datalen, FMOD_TAGDATATYPE datatype, int unique);
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_GETWAVEFORMAT_CALLBACK)(FMOD_CODEC_STATE *codec_state, int index, FMOD_CODEC_WAVEFORMAT *waveformat);


/*
[STRUCTURE]
[
[DESCRIPTION]
When creating a codec, declare one of these and provide the relevant callbacks and name for FMOD to use when it opens and reads a file.
[REMARKS]
Members marked with [r] mean the variable is modified by FMOD and is for reading purposes only. Do not change this value.<br>
Members marked with [w] mean the variable can be written to. The user can set the value.<br>
[SEE_ALSO]
FMOD_CODEC_STATE
FMOD_CODEC_WAVEFORMAT
]
*/
typedef struct FMOD_CODEC_DESCRIPTION
{
const char *name; /* [w] Name of the codec. */
unsigned int version; /* [w] Plugin writer's version number. */
int defaultasstream; /* [w] Tells FMOD to open the file as a stream when calling System::createSound, and not a static sample. Should normally be 0 (FALSE), because generally the user wants to decode the file into memory when using System::createSound. Mainly used for formats that decode for a very long time, or could use large amounts of memory when decoded. Usually sequenced formats such as mod/s3m/xm/it/midi fall into this category. It is mainly to stop users that don't know what they're doing from getting FMOD_ERR_MEMORY returned from createSound when they should have in fact called System::createStream or used FMOD_CREATESTREAM in System::createSound. */
FMOD_TIMEUNIT timeunits; /* [w] When setposition codec is called, only these time formats will be passed to the codec. Use bitwise OR to accumulate different types. */
FMOD_CODEC_OPEN_CALLBACK open; /* [w] Open callback for the codec for when FMOD tries to open a sound using this codec. */
FMOD_CODEC_CLOSE_CALLBACK close; /* [w] Close callback for the codec for when FMOD tries to close a sound using this codec. */
FMOD_CODEC_READ_CALLBACK read; /* [w] Read callback for the codec for when FMOD tries to read some data from the file to the destination format (specified in the open callback). */
FMOD_CODEC_GETLENGTH_CALLBACK getlength; /* [w] Callback to return the length of the song in whatever format required when Sound::getLength is called. */
FMOD_CODEC_SETPOSITION_CALLBACK setposition; /* [w] Seek callback for the codec for when FMOD tries to seek within the file with Channel::setPosition. */
FMOD_CODEC_GETPOSITION_CALLBACK getposition; /* [w] Tell callback for the codec for when FMOD tries to get the current position within the with Channel::getPosition. */
FMOD_CODEC_SOUNDCREATE_CALLBACK soundcreate; /* [w] Sound creation callback for the codec when FMOD finishes creating the sound. (So the codec can set more parameters for the related created sound, ie loop points/mode or 3D attributes etc). */
FMOD_CODEC_GETWAVEFORMAT_CALLBACK getwaveformat; /* [w] Callback to tell FMOD about the waveformat of a particular subsound. This is to save memory, rather than saving 1000 FMOD_CODEC_WAVEFORMAT structures in the codec, the codec might have a more optimal way of storing this information. */
} FMOD_CODEC_DESCRIPTION;


/*
[STRUCTURE]
[
[DESCRIPTION]
Set these values marked to tell fmod what sort of sound to create when the codec open callback is called.<br>
The format, channels, frequency and lengthpcm tell FMOD what sort of sound buffer to create when you initialize your code. <br>
If you wrote an MP3 codec that decoded to stereo 16bit integer PCM for a 44khz sound, you would specify FMOD_SOUND_FORMAT_PCM16, and channels would be equal to 2, and frequency would be 44100.<br>
[REMARKS]
Members marked with [r] mean the variable is modified by FMOD and is for reading purposes only. Do not change this value.<br>
Members marked with [w] mean the variable can be written to. The user can set the value.<br>
<br>
1.07 Note. 'blockalign' member which was in bytes has been removed. 'pcmblocksize' is now the replacement, and is measured in PCM samples only, not bytes. This is purely to support buffering
internal to FMOD for codecs that are not sample accurate.
<br>
Note: When registering a codec, format, channels, frequency and lengthpcm must be supplied, otherwise there will be an error.<br>
This structure is optional if FMOD_CODEC_GETWAVEFORMAT_CALLBACK is specified.<br>
An array of these structures may be needed if FMOD_CODEC_STATE::numsubsounds is larger than 1.
[SEE_ALSO]
FMOD_CODEC_STATE
FMOD_SOUND_FORMAT
FMOD_MODE
FMOD_CHANNELMASK
FMOD_CHANNELORDER
FMOD_CODEC_WAVEFORMAT_VERSION
]
*/
struct FMOD_CODEC_WAVEFORMAT
{
char name[256]; /* [w] Name of sound. Optional. */
FMOD_SOUND_FORMAT format; /* [w] Format for (decompressed) codec output, ie FMOD_SOUND_FORMAT_PCM8, FMOD_SOUND_FORMAT_PCM16. Mandantory - Must be supplied. */
int channels; /* [w] Number of channels used by codec, ie mono = 1, stereo = 2. Mandantory - Must be supplied. */
int frequency; /* [w] Default frequency in hz of the codec, ie 44100. Mandantory - Must be supplied. */
unsigned int lengthbytes; /* [w] Length in bytes of the source data. Used for FMOD_TIMEUNIT_RAWBYTES. Optional. Default = 0. */
unsigned int lengthpcm; /* [w] Length in decompressed, PCM samples of the file, ie length in seconds * frequency. Used for Sound::getLength and for memory allocation of static decompressed sample data. Mandantory - Must be supplied. */
unsigned int pcmblocksize; /* [w] Minimum, optimal number of decompressed PCM samples codec can handle. 0 or 1 = no buffering. Anything higher means FMOD will allocate a PCM buffer of this size to read in chunks. The codec read callback will be called in multiples of this value. Optional. */
int loopstart; /* [w] Loopstart in decompressed, PCM samples of file. Optional. Default = 0. */
int loopend; /* [w] Loopend in decompressed, PCM samples of file. Optional. Default = 0. */
FMOD_MODE mode; /* [w] Mode to determine whether the sound should by default load as looping, non looping, 2d or 3d. Optional. Default = FMOD_DEFAULT. */
FMOD_CHANNELMASK channelmask; /* [w] Defined channel bitmask to describe which speakers the channels in the codec map to, in order of channel count. See fmod_common.h. Optional. Leave at 0 to map to the speaker layout defined in FMOD_SPEAKER. */
FMOD_CHANNELORDER channelorder; /* [w] Defined channel order type, to describe where each sound channel should pan for the number of channels specified. See fmod_common.h. Optional. Leave at 0 to play in default speaker order. */
float peakvolume; /* [w] Peak volume of sound. Optional. Default = 0 if not used. */
};


/*
[DEFINE]
[
[NAME]
FMOD_CODEC_WAVEFORMAT_VERSION
[DESCRIPTION]
Version number of FMOD_CODEC_WAVEFORMAT structure. Should be set into FMOD_CODEC_STATE in the FMOD_CODEC_OPEN_CALLBACK.
[REMARKS]
Use this for binary compatibility and for future expansion.
[SEE_ALSO]
FMOD_CODEC_STATE
FMOD_CODEC_DESCRIPTION
FMOD_CODEC_OPEN_CALLBACK
]
*/
#define FMOD_CODEC_WAVEFORMAT_VERSION 2
/* [DEFINE_END] */


/*
[STRUCTURE]
[
[DESCRIPTION]
Codec plugin structure that is passed into each callback.<br>
<br>
Optionally set the numsubsounds and waveformat members when called in FMOD_CODEC_OPEN_CALLBACK to tell fmod what sort of sound to create.<br>
[REMARKS]
Members marked with [r] mean the variable is modified by FMOD and is for reading purposes only. Do not change this value.<br>
Members marked with [w] mean the variable can be written to. The user can set the value.<br>
<br>
'numsubsounds' should be 0 if the file is a normal single sound stream or sound. Examples of this would be .WAV, .WMA, .MP3, .AIFF.<br>
'numsubsounds' should be 1+ if the file is a container format, and does not contain wav data itself. Examples of these types would be FSB (contains multiple sounds), DLS (contain instruments).<br>
The waveformat value should point to an arrays of information based on how many subsounds are in the format. If the number of subsounds is 0 then it should point to 1 waveformat, the same as if the number of subsounds was 1. If subsounds was 100 for example, there should be a pointer to an array of 100 waveformat structures.<br>
<br>
The waveformat pointer is optional and could be 0, if using FMOD_CODEC_GETWAVEFORMAT_CALLBACK is preferred.<br>
<br>
When a sound has 1 or more subsounds, the caller must play the individual sounds specified by first obtaining the subsound with Sound::getSubSound.
[SEE_ALSO]
FMOD_CODEC_WAVEFORMAT
FMOD_FILE_READ_CALLBACK
FMOD_FILE_SEEK_CALLBACK
FMOD_CODEC_METADATA_CALLBACK
Sound::getSubSound
Sound::getNumSubSounds
FMOD_CODEC_WAVEFORMAT_VERSION
]
*/
struct FMOD_CODEC_STATE
{
int numsubsounds; /* [w] Number of 'subsounds' in this sound. Anything other than 0 makes it a 'container' format (ie DLS/FSB etc which contain 1 or more subsounds). For most normal, single sound codec such as WAV/AIFF/MP3, this should be 0 as they are not a container for subsounds, they are the sound by itself. */
FMOD_CODEC_WAVEFORMAT *waveformat; /* [w] Pointer to an array of format structures containing information about each sample. Can be 0 or NULL if FMOD_CODEC_GETWAVEFORMAT_CALLBACK callback is preferred. The number of entries here must equal the number of subsounds defined in the subsound parameter. If numsubsounds = 0 then there should be 1 instance of this structure. */
void *plugindata; /* [w] Plugin writer created data the codec author wants to attach to this object. */

void *filehandle; /* [r] This will return an internal FMOD file handle to use with the callbacks provided. */
unsigned int filesize; /* [r] This will contain the size of the file in bytes. */
FMOD_FILE_READ_CALLBACK fileread; /* [r] This will return a callable FMOD file function to use from codec. */
FMOD_FILE_SEEK_CALLBACK fileseek; /* [r] This will return a callable FMOD file function to use from codec. */
FMOD_CODEC_METADATA_CALLBACK metadata; /* [r] This will return a callable FMOD metadata function to use from codec. */

int waveformatversion; /* [w] Must be set to FMOD_CODEC_WAVEFORMAT_VERSION in the FMOD_CODEC_OPEN_CALLBACK. */
};

#endif


Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -0,0 +1,103 @@
/* =================================================================================================== */
/* FMOD Studio - Error string header file. Copyright (c), Firelight Technologies Pty, Ltd. 2004-2016. */
/* */
/* Use this header if you want to store or display a string version / english explanation of */
/* the FMOD error codes. */
/* */
/* =================================================================================================== */

namespace FMOD
{
public class Error
{
public static string String(FMOD.RESULT errcode)
{
switch (errcode)
{
case FMOD.RESULT.OK: return "No errors.";
case FMOD.RESULT.ERR_BADCOMMAND: return "Tried to call a function on a data type that does not allow this type of functionality (ie calling Sound::lock on a streaming sound).";
case FMOD.RESULT.ERR_CHANNEL_ALLOC: return "Error trying to allocate a channel.";
case FMOD.RESULT.ERR_CHANNEL_STOLEN: return "The specified channel has been reused to play another sound.";
case FMOD.RESULT.ERR_DMA: return "DMA Failure. See debug output for more information.";
case FMOD.RESULT.ERR_DSP_CONNECTION: return "DSP connection error. Connection possibly caused a cyclic dependency or connected dsps with incompatible buffer counts.";
case FMOD.RESULT.ERR_DSP_DONTPROCESS: return "DSP return code from a DSP process query callback. Tells mixer not to call the process callback and therefore not consume CPU. Use this to optimize the DSP graph.";
case FMOD.RESULT.ERR_DSP_FORMAT: return "DSP Format error. A DSP unit may have attempted to connect to this network with the wrong format, or a matrix may have been set with the wrong size if the target unit has a specified channel map.";
case FMOD.RESULT.ERR_DSP_INUSE: return "DSP is already in the mixer's DSP network. It must be removed before being reinserted or released.";
case FMOD.RESULT.ERR_DSP_NOTFOUND: return "DSP connection error. Couldn't find the DSP unit specified.";
case FMOD.RESULT.ERR_DSP_RESERVED: return "DSP operation error. Cannot perform operation on this DSP as it is reserved by the system.";
case FMOD.RESULT.ERR_DSP_SILENCE: return "DSP return code from a DSP process query callback. Tells mixer silence would be produced from read, so go idle and not consume CPU. Use this to optimize the DSP graph.";
case FMOD.RESULT.ERR_DSP_TYPE: return "DSP operation cannot be performed on a DSP of this type.";
case FMOD.RESULT.ERR_FILE_BAD: return "Error loading file.";
case FMOD.RESULT.ERR_FILE_COULDNOTSEEK: return "Couldn't perform seek operation. This is a limitation of the medium (ie netstreams) or the file format.";
case FMOD.RESULT.ERR_FILE_DISKEJECTED: return "Media was ejected while reading.";
case FMOD.RESULT.ERR_FILE_EOF: return "End of file unexpectedly reached while trying to read essential data (truncated?).";
case FMOD.RESULT.ERR_FILE_ENDOFDATA: return "End of current chunk reached while trying to read data.";
case FMOD.RESULT.ERR_FILE_NOTFOUND: return "File not found.";
case FMOD.RESULT.ERR_FORMAT: return "Unsupported file or audio format.";
case FMOD.RESULT.ERR_HEADER_MISMATCH: return "There is a version mismatch between the FMOD header and either the FMOD Studio library or the FMOD Low Level library.";
case FMOD.RESULT.ERR_HTTP: return "A HTTP error occurred. This is a catch-all for HTTP errors not listed elsewhere.";
case FMOD.RESULT.ERR_HTTP_ACCESS: return "The specified resource requires authentication or is forbidden.";
case FMOD.RESULT.ERR_HTTP_PROXY_AUTH: return "Proxy authentication is required to access the specified resource.";
case FMOD.RESULT.ERR_HTTP_SERVER_ERROR: return "A HTTP server error occurred.";
case FMOD.RESULT.ERR_HTTP_TIMEOUT: return "The HTTP request timed out.";
case FMOD.RESULT.ERR_INITIALIZATION: return "FMOD was not initialized correctly to support this function.";
case FMOD.RESULT.ERR_INITIALIZED: return "Cannot call this command after System::init.";
case FMOD.RESULT.ERR_INTERNAL: return "An error occurred that wasn't supposed to. Contact support.";
case FMOD.RESULT.ERR_INVALID_FLOAT: return "Value passed in was a NaN, Inf or denormalized float.";
case FMOD.RESULT.ERR_INVALID_HANDLE: return "An invalid object handle was used.";
case FMOD.RESULT.ERR_INVALID_PARAM: return "An invalid parameter was passed to this function.";
case FMOD.RESULT.ERR_INVALID_POSITION: return "An invalid seek position was passed to this function.";
case FMOD.RESULT.ERR_INVALID_SPEAKER: return "An invalid speaker was passed to this function based on the current speaker mode.";
case FMOD.RESULT.ERR_INVALID_SYNCPOINT: return "The syncpoint did not come from this sound handle.";
case FMOD.RESULT.ERR_INVALID_THREAD: return "Tried to call a function on a thread that is not supported.";
case FMOD.RESULT.ERR_INVALID_VECTOR: return "The vectors passed in are not unit length, or perpendicular.";
case FMOD.RESULT.ERR_MAXAUDIBLE: return "Reached maximum audible playback count for this sound's soundgroup.";
case FMOD.RESULT.ERR_MEMORY: return "Not enough memory or resources.";
case FMOD.RESULT.ERR_MEMORY_CANTPOINT: return "Can't use FMOD_OPENMEMORY_POINT on non PCM source data, or non mp3/xma/adpcm data if FMOD_CREATECOMPRESSEDSAMPLE was used.";
case FMOD.RESULT.ERR_NEEDS3D: return "Tried to call a command on a 2d sound when the command was meant for 3d sound.";
case FMOD.RESULT.ERR_NEEDSHARDWARE: return "Tried to use a feature that requires hardware support.";
case FMOD.RESULT.ERR_NET_CONNECT: return "Couldn't connect to the specified host.";
case FMOD.RESULT.ERR_NET_SOCKET_ERROR: return "A socket error occurred. This is a catch-all for socket-related errors not listed elsewhere.";
case FMOD.RESULT.ERR_NET_URL: return "The specified URL couldn't be resolved.";
case FMOD.RESULT.ERR_NET_WOULD_BLOCK: return "Operation on a non-blocking socket could not complete immediately.";
case FMOD.RESULT.ERR_NOTREADY: return "Operation could not be performed because specified sound/DSP connection is not ready.";
case FMOD.RESULT.ERR_OUTPUT_ALLOCATED: return "Error initializing output device, but more specifically, the output device is already in use and cannot be reused.";
case FMOD.RESULT.ERR_OUTPUT_CREATEBUFFER: return "Error creating hardware sound buffer.";
case FMOD.RESULT.ERR_OUTPUT_DRIVERCALL: return "A call to a standard soundcard driver failed, which could possibly mean a bug in the driver or resources were missing or exhausted.";
case FMOD.RESULT.ERR_OUTPUT_FORMAT: return "Soundcard does not support the specified format.";
case FMOD.RESULT.ERR_OUTPUT_INIT: return "Error initializing output device.";
case FMOD.RESULT.ERR_OUTPUT_NODRIVERS: return "The output device has no drivers installed. If pre-init, FMOD_OUTPUT_NOSOUND is selected as the output mode. If post-init, the function just fails.";
case FMOD.RESULT.ERR_PLUGIN: return "An unspecified error has been returned from a plugin.";
case FMOD.RESULT.ERR_PLUGIN_MISSING: return "A requested output, dsp unit type or codec was not available.";
case FMOD.RESULT.ERR_PLUGIN_RESOURCE: return "A resource that the plugin requires cannot be found. (ie the DLS file for MIDI playback)";
case FMOD.RESULT.ERR_PLUGIN_VERSION: return "A plugin was built with an unsupported SDK version.";
case FMOD.RESULT.ERR_RECORD: return "An error occurred trying to initialize the recording device.";
case FMOD.RESULT.ERR_REVERB_CHANNELGROUP: return "Reverb properties cannot be set on this channel because a parent channelgroup owns the reverb connection.";
case FMOD.RESULT.ERR_REVERB_INSTANCE: return "Specified instance in FMOD_REVERB_PROPERTIES couldn't be set. Most likely because it is an invalid instance number or the reverb doesn't exist.";
case FMOD.RESULT.ERR_SUBSOUNDS: return "The error occurred because the sound referenced contains subsounds when it shouldn't have, or it doesn't contain subsounds when it should have. The operation may also not be able to be performed on a parent sound.";
case FMOD.RESULT.ERR_SUBSOUND_ALLOCATED: return "This subsound is already being used by another sound, you cannot have more than one parent to a sound. Null out the other parent's entry first.";
case FMOD.RESULT.ERR_SUBSOUND_CANTMOVE: return "Shared subsounds cannot be replaced or moved from their parent stream, such as when the parent stream is an FSB file.";
case FMOD.RESULT.ERR_TAGNOTFOUND: return "The specified tag could not be found or there are no tags.";
case FMOD.RESULT.ERR_TOOMANYCHANNELS: return "The sound created exceeds the allowable input channel count. This can be increased using the 'maxinputchannels' parameter in System::setSoftwareFormat.";
case FMOD.RESULT.ERR_TRUNCATED: return "The retrieved string is too long to fit in the supplied buffer and has been truncated.";
case FMOD.RESULT.ERR_UNIMPLEMENTED: return "Something in FMOD hasn't been implemented when it should be! contact support!";
case FMOD.RESULT.ERR_UNINITIALIZED: return "This command failed because System::init or System::setDriver was not called.";
case FMOD.RESULT.ERR_UNSUPPORTED: return "A command issued was not supported by this object. Possibly a plugin without certain callbacks specified.";
case FMOD.RESULT.ERR_VERSION: return "The version number of this file format is not supported.";
case FMOD.RESULT.ERR_EVENT_ALREADY_LOADED: return "The specified bank has already been loaded.";
case FMOD.RESULT.ERR_EVENT_LIVEUPDATE_BUSY: return "The live update connection failed due to the game already being connected.";
case FMOD.RESULT.ERR_EVENT_LIVEUPDATE_MISMATCH: return "The live update connection failed due to the game data being out of sync with the tool.";
case FMOD.RESULT.ERR_EVENT_LIVEUPDATE_TIMEOUT: return "The live update connection timed out.";
case FMOD.RESULT.ERR_EVENT_NOTFOUND: return "The requested event, bus or vca could not be found.";
case FMOD.RESULT.ERR_STUDIO_UNINITIALIZED: return "The Studio::System object is not yet initialized.";
case FMOD.RESULT.ERR_STUDIO_NOT_LOADED: return "The specified resource is not loaded, so it can't be unloaded.";
case FMOD.RESULT.ERR_INVALID_STRING: return "An invalid string was passed to this function.";
case FMOD.RESULT.ERR_ALREADY_LOCKED: return "The specified resource is already locked.";
case FMOD.RESULT.ERR_NOT_LOCKED: return "The specified resource is not locked, so it can't be unlocked.";
case FMOD.RESULT.ERR_RECORD_DISCONNECTED: return "The specified recording driver has been disconnected.";
case FMOD.RESULT.ERR_TOOMANYSAMPLES: return "The length provided exceed the allowable limit.";
default: return "Unknown error.";
}
}
}
}
@@ -0,0 +1,113 @@
/*$ preserve start $*/

/* ================================================================================================== */
/* FMOD Studio - Error string header file. Copyright (c), Firelight Technologies Pty, Ltd. 2004-2016. */
/* */
/* Use this header if you want to store or display a string version / english explanation of */
/* the FMOD error codes. */
/* */
/* ================================================================================================== */

#ifndef _FMOD_ERRORS_H
#define _FMOD_ERRORS_H

#include "fmod.h"

#ifdef __GNUC__
static const char *FMOD_ErrorString(FMOD_RESULT errcode) __attribute__((unused));
#endif

static const char *FMOD_ErrorString(FMOD_RESULT errcode)
{
switch (errcode)
{
/*$ preserve end $*/
case FMOD_OK: return "No errors.";
case FMOD_ERR_BADCOMMAND: return "Tried to call a function on a data type that does not allow this type of functionality (ie calling Sound::lock on a streaming sound).";
case FMOD_ERR_CHANNEL_ALLOC: return "Error trying to allocate a channel.";
case FMOD_ERR_CHANNEL_STOLEN: return "The specified channel has been reused to play another sound.";
case FMOD_ERR_DMA: return "DMA Failure. See debug output for more information.";
case FMOD_ERR_DSP_CONNECTION: return "DSP connection error. Connection possibly caused a cyclic dependency or connected dsps with incompatible buffer counts.";
case FMOD_ERR_DSP_DONTPROCESS: return "DSP return code from a DSP process query callback. Tells mixer not to call the process callback and therefore not consume CPU. Use this to optimize the DSP graph.";
case FMOD_ERR_DSP_FORMAT: return "DSP Format error. A DSP unit may have attempted to connect to this network with the wrong format, or a matrix may have been set with the wrong size if the target unit has a specified channel map.";
case FMOD_ERR_DSP_INUSE: return "DSP is already in the mixer's DSP network. It must be removed before being reinserted or released.";
case FMOD_ERR_DSP_NOTFOUND: return "DSP connection error. Couldn't find the DSP unit specified.";
case FMOD_ERR_DSP_RESERVED: return "DSP operation error. Cannot perform operation on this DSP as it is reserved by the system.";
case FMOD_ERR_DSP_SILENCE: return "DSP return code from a DSP process query callback. Tells mixer silence would be produced from read, so go idle and not consume CPU. Use this to optimize the DSP graph.";
case FMOD_ERR_DSP_TYPE: return "DSP operation cannot be performed on a DSP of this type.";
case FMOD_ERR_FILE_BAD: return "Error loading file.";
case FMOD_ERR_FILE_COULDNOTSEEK: return "Couldn't perform seek operation. This is a limitation of the medium (ie netstreams) or the file format.";
case FMOD_ERR_FILE_DISKEJECTED: return "Media was ejected while reading.";
case FMOD_ERR_FILE_EOF: return "End of file unexpectedly reached while trying to read essential data (truncated?).";
case FMOD_ERR_FILE_ENDOFDATA: return "End of current chunk reached while trying to read data.";
case FMOD_ERR_FILE_NOTFOUND: return "File not found.";
case FMOD_ERR_FORMAT: return "Unsupported file or audio format.";
case FMOD_ERR_HEADER_MISMATCH: return "There is a version mismatch between the FMOD header and either the FMOD Studio library or the FMOD Low Level library.";
case FMOD_ERR_HTTP: return "A HTTP error occurred. This is a catch-all for HTTP errors not listed elsewhere.";
case FMOD_ERR_HTTP_ACCESS: return "The specified resource requires authentication or is forbidden.";
case FMOD_ERR_HTTP_PROXY_AUTH: return "Proxy authentication is required to access the specified resource.";
case FMOD_ERR_HTTP_SERVER_ERROR: return "A HTTP server error occurred.";
case FMOD_ERR_HTTP_TIMEOUT: return "The HTTP request timed out.";
case FMOD_ERR_INITIALIZATION: return "FMOD was not initialized correctly to support this function.";
case FMOD_ERR_INITIALIZED: return "Cannot call this command after System::init.";
case FMOD_ERR_INTERNAL: return "An error occurred that wasn't supposed to. Contact support.";
case FMOD_ERR_INVALID_FLOAT: return "Value passed in was a NaN, Inf or denormalized float.";
case FMOD_ERR_INVALID_HANDLE: return "An invalid object handle was used.";
case FMOD_ERR_INVALID_PARAM: return "An invalid parameter was passed to this function.";
case FMOD_ERR_INVALID_POSITION: return "An invalid seek position was passed to this function.";
case FMOD_ERR_INVALID_SPEAKER: return "An invalid speaker was passed to this function based on the current speaker mode.";
case FMOD_ERR_INVALID_SYNCPOINT: return "The syncpoint did not come from this sound handle.";
case FMOD_ERR_INVALID_THREAD: return "Tried to call a function on a thread that is not supported.";
case FMOD_ERR_INVALID_VECTOR: return "The vectors passed in are not unit length, or perpendicular.";
case FMOD_ERR_MAXAUDIBLE: return "Reached maximum audible playback count for this sound's soundgroup.";
case FMOD_ERR_MEMORY: return "Not enough memory or resources.";
case FMOD_ERR_MEMORY_CANTPOINT: return "Can't use FMOD_OPENMEMORY_POINT on non PCM source data, or non mp3/xma/adpcm data if FMOD_CREATECOMPRESSEDSAMPLE was used.";
case FMOD_ERR_NEEDS3D: return "Tried to call a command on a 2d sound when the command was meant for 3d sound.";
case FMOD_ERR_NEEDSHARDWARE: return "Tried to use a feature that requires hardware support.";
case FMOD_ERR_NET_CONNECT: return "Couldn't connect to the specified host.";
case FMOD_ERR_NET_SOCKET_ERROR: return "A socket error occurred. This is a catch-all for socket-related errors not listed elsewhere.";
case FMOD_ERR_NET_URL: return "The specified URL couldn't be resolved.";
case FMOD_ERR_NET_WOULD_BLOCK: return "Operation on a non-blocking socket could not complete immediately.";
case FMOD_ERR_NOTREADY: return "Operation could not be performed because specified sound/DSP connection is not ready.";
case FMOD_ERR_OUTPUT_ALLOCATED: return "Error initializing output device, but more specifically, the output device is already in use and cannot be reused.";
case FMOD_ERR_OUTPUT_CREATEBUFFER: return "Error creating hardware sound buffer.";
case FMOD_ERR_OUTPUT_DRIVERCALL: return "A call to a standard soundcard driver failed, which could possibly mean a bug in the driver or resources were missing or exhausted.";
case FMOD_ERR_OUTPUT_FORMAT: return "Soundcard does not support the specified format.";
case FMOD_ERR_OUTPUT_INIT: return "Error initializing output device.";
case FMOD_ERR_OUTPUT_NODRIVERS: return "The output device has no drivers installed. If pre-init, FMOD_OUTPUT_NOSOUND is selected as the output mode. If post-init, the function just fails.";
case FMOD_ERR_PLUGIN: return "An unspecified error has been returned from a plugin.";
case FMOD_ERR_PLUGIN_MISSING: return "A requested output, dsp unit type or codec was not available.";
case FMOD_ERR_PLUGIN_RESOURCE: return "A resource that the plugin requires cannot be found. (ie the DLS file for MIDI playback)";
case FMOD_ERR_PLUGIN_VERSION: return "A plugin was built with an unsupported SDK version.";
case FMOD_ERR_RECORD: return "An error occurred trying to initialize the recording device.";
case FMOD_ERR_REVERB_CHANNELGROUP: return "Reverb properties cannot be set on this channel because a parent channelgroup owns the reverb connection.";
case FMOD_ERR_REVERB_INSTANCE: return "Specified instance in FMOD_REVERB_PROPERTIES couldn't be set. Most likely because it is an invalid instance number or the reverb doesn't exist.";
case FMOD_ERR_SUBSOUNDS: return "The error occurred because the sound referenced contains subsounds when it shouldn't have, or it doesn't contain subsounds when it should have. The operation may also not be able to be performed on a parent sound.";
case FMOD_ERR_SUBSOUND_ALLOCATED: return "This subsound is already being used by another sound, you cannot have more than one parent to a sound. Null out the other parent's entry first.";
case FMOD_ERR_SUBSOUND_CANTMOVE: return "Shared subsounds cannot be replaced or moved from their parent stream, such as when the parent stream is an FSB file.";
case FMOD_ERR_TAGNOTFOUND: return "The specified tag could not be found or there are no tags.";
case FMOD_ERR_TOOMANYCHANNELS: return "The sound created exceeds the allowable input channel count. This can be increased using the 'maxinputchannels' parameter in System::setSoftwareFormat.";
case FMOD_ERR_TRUNCATED: return "The retrieved string is too long to fit in the supplied buffer and has been truncated.";
case FMOD_ERR_UNIMPLEMENTED: return "Something in FMOD hasn't been implemented when it should be! contact support!";
case FMOD_ERR_UNINITIALIZED: return "This command failed because System::init or System::setDriver was not called.";
case FMOD_ERR_UNSUPPORTED: return "A command issued was not supported by this object. Possibly a plugin without certain callbacks specified.";
case FMOD_ERR_VERSION: return "The version number of this file format is not supported.";
case FMOD_ERR_EVENT_ALREADY_LOADED: return "The specified bank has already been loaded.";
case FMOD_ERR_EVENT_LIVEUPDATE_BUSY: return "The live update connection failed due to the game already being connected.";
case FMOD_ERR_EVENT_LIVEUPDATE_MISMATCH: return "The live update connection failed due to the game data being out of sync with the tool.";
case FMOD_ERR_EVENT_LIVEUPDATE_TIMEOUT: return "The live update connection timed out.";
case FMOD_ERR_EVENT_NOTFOUND: return "The requested event, bus or vca could not be found.";
case FMOD_ERR_STUDIO_UNINITIALIZED: return "The Studio::System object is not yet initialized.";
case FMOD_ERR_STUDIO_NOT_LOADED: return "The specified resource is not loaded, so it can't be unloaded.";
case FMOD_ERR_INVALID_STRING: return "An invalid string was passed to this function.";
case FMOD_ERR_ALREADY_LOCKED: return "The specified resource is already locked.";
case FMOD_ERR_NOT_LOCKED: return "The specified resource is not locked, so it can't be unlocked.";
case FMOD_ERR_RECORD_DISCONNECTED: return "The specified recording driver has been disconnected.";
case FMOD_ERR_TOOMANYSAMPLES: return "The length provided exceeds the allowable limit.";
default : return "Unknown error.";
/*$ preserve start $*/
};
}

#endif
/*$ preserve end $*/
@@ -0,0 +1,140 @@
/* ======================================================================================================== */
/* FMOD Studio - output development header file. Copyright (c), Firelight Technologies Pty, Ltd. 2004-2016. */
/* */
/* Use this header if you are wanting to develop your own output plugin to use with */
/* FMOD's output system. With this header you can make your own output plugin that FMOD */
/* can register and use. See the documentation and examples on how to make a working plugin. */
/* */
/* ======================================================================================================== */

#ifndef _FMOD_OUTPUT_H
#define _FMOD_OUTPUT_H

#define FMOD_OUTPUT_PLUGIN_VERSION 1

typedef struct FMOD_OUTPUT_STATE FMOD_OUTPUT_STATE;
typedef struct FMOD_OUTPUT_OBJECT3DINFO FMOD_OUTPUT_OBJECT3DINFO;

/*
FMOD_OUTPUT_DESCRIPTION callbacks
*/
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_GETNUMDRIVERS_CALLBACK) (FMOD_OUTPUT_STATE *output_state, int *numdrivers);
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_GETDRIVERINFO_CALLBACK) (FMOD_OUTPUT_STATE *output_state, int id, char *name, int namelen, FMOD_GUID *guid, int *systemrate, FMOD_SPEAKERMODE *speakermode, int *speakermodechannels);
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_INIT_CALLBACK) (FMOD_OUTPUT_STATE *output_state, int selecteddriver, FMOD_INITFLAGS flags, int *outputrate, FMOD_SPEAKERMODE *speakermode, int *speakermodechannels, FMOD_SOUND_FORMAT *outputformat, int dspbufferlength, int dspnumbuffers, void *extradriverdata);
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_START_CALLBACK) (FMOD_OUTPUT_STATE *output_state);
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_STOP_CALLBACK) (FMOD_OUTPUT_STATE *output_state);
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_CLOSE_CALLBACK) (FMOD_OUTPUT_STATE *output_state);
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_UPDATE_CALLBACK) (FMOD_OUTPUT_STATE *output_state);
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_GETHANDLE_CALLBACK) (FMOD_OUTPUT_STATE *output_state, void **handle);
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_GETPOSITION_CALLBACK) (FMOD_OUTPUT_STATE *output_state, unsigned int *pcm);
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_LOCK_CALLBACK) (FMOD_OUTPUT_STATE *output_state, unsigned int offset, unsigned int length, void **ptr1, void **ptr2, unsigned int *len1, unsigned int *len2);
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_UNLOCK_CALLBACK) (FMOD_OUTPUT_STATE *output_state, void *ptr1, void *ptr2, unsigned int len1, unsigned int len2);
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_MIXER_CALLBACK) (FMOD_OUTPUT_STATE *output_state);

typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_OBJECT3DGETINFO_CALLBACK) (FMOD_OUTPUT_STATE *output_state, int *maxhardwareobjects);
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_OBJECT3DALLOC_CALLBACK) (FMOD_OUTPUT_STATE *output_state, void **object3d);
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_OBJECT3DFREE_CALLBACK) (FMOD_OUTPUT_STATE *output_state, void *object3d);
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_OBJECT3DUPDATE_CALLBACK) (FMOD_OUTPUT_STATE *output_state, void *object3d, const FMOD_OUTPUT_OBJECT3DINFO *info);

/*
FMOD_OUTPUT_STATE functions
*/
typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_READFROMMIXER) (FMOD_OUTPUT_STATE *output_state, void *buffer, unsigned int length);
typedef void * (F_CALLBACK *FMOD_OUTPUT_ALLOC) (unsigned int size, unsigned int align, const char *file, int line);
typedef void (F_CALLBACK *FMOD_OUTPUT_FREE) (void *ptr, const char *file, int line);
typedef void (F_CALLBACK *FMOD_OUTPUT_LOG) (FMOD_DEBUG_FLAGS level, const char *file, int line, const char *function, const char *string, ...);


/*
[STRUCTURE]
[
[DESCRIPTION]
When creating an output, declare one of these and provide the relevant callbacks and name for FMOD to use when it creates and uses an output of this type.
[REMARKS]
Members marked with [r] mean read only for the developer, read/write for the FMOD system.
Members marked with [w] mean read/write for the developer, read only for the FMOD system.
[SEE_ALSO]
FMOD_OUTPUT_STATE
]
*/
typedef struct FMOD_OUTPUT_DESCRIPTION
{
unsigned int apiversion; /* [w] The output plugin API version this plugin is built for. Set to this to FMOD_OUTPUT_PLUGIN_VERSION defined above. */
const char *name; /* [w] Name of the output plugin. */
unsigned int version; /* [w] Version of the output plugin. */
int polling; /* [w] If FMOD should regularly call 'getposition' to determine when to automatically buffer and mix ('lock' and 'unlock') set to TRUE (non zero), for manual control call FMOD_OUTPUT_READFROMMIXER yourself. */
FMOD_OUTPUT_GETNUMDRIVERS_CALLBACK getnumdrivers; /* [w] Number of attached sound devices. Called from System::getNumDrivers. */
FMOD_OUTPUT_GETDRIVERINFO_CALLBACK getdriverinfo; /* [w] Information about a particular sound device. Called from System::getDriverInfo. */
FMOD_OUTPUT_INIT_CALLBACK init; /* [w] Allocate resources and provide information about hardware capabilities. Called from System::init. */
FMOD_OUTPUT_START_CALLBACK start; /* [w] Initialization is complete, mixing is about to begin. Called from System::init. */
FMOD_OUTPUT_STOP_CALLBACK stop; /* [w] Mixing has finished, stop accepting audio data. Called from System::close. */
FMOD_OUTPUT_CLOSE_CALLBACK close; /* [w] Clean up resources allocated during 'init'. Called from System::init and System::close. */
FMOD_OUTPUT_UPDATE_CALLBACK update; /* [w] Update function that is called once a frame by the user. Called from System::update. */
FMOD_OUTPUT_GETHANDLE_CALLBACK gethandle; /* [w] Return a pointer to the internal device object used to share with other audio systems. Called from System::getOutputHandle. */
FMOD_OUTPUT_GETPOSITION_CALLBACK getposition; /* [w] ('polling' == TRUE) Provide the hardware playback position in the output ring buffer. Called before a mix. */
FMOD_OUTPUT_LOCK_CALLBACK lock; /* [w] ('polling' == TRUE) Provide a pointer that FMOD can write to for the next block of audio data. Called before a mix. */
FMOD_OUTPUT_UNLOCK_CALLBACK unlock; /* [w] ('polling' == TRUE) Optional callback to signify 'lock' has finished writing to the provided pointer. Called after a mix. */
FMOD_OUTPUT_MIXER_CALLBACK mixer; /* [w] ('polling' == FALSE) Mixer thread that will continually retrigger. Wait on a synchronization primitive until ready, then call FMOD_OUTPUT_READFROMMIXER, then leave the callback (will retrigger immediately if mixer is still running). Called continually after FMOD_OUTPUT_START_CALLBACK and before FMOD_OUTPUT_STOP_CALLBACK. */
FMOD_OUTPUT_OBJECT3DGETINFO_CALLBACK object3dgetinfo; /* [w] Provide information about the capabilities of the 3D object hardware. Called during a mix. */
FMOD_OUTPUT_OBJECT3DALLOC_CALLBACK object3dalloc; /* [w] Reserve a hardware resources for a single 3D object. Called during a mix. */
FMOD_OUTPUT_OBJECT3DFREE_CALLBACK object3dfree; /* [w] Release a hardware resource previously acquired with FMOD_OUTPUT_OBJECT3DALLOC_CALLBACK. Called during a mix. */
FMOD_OUTPUT_OBJECT3DUPDATE_CALLBACK object3dupdate; /* [w] Called once for every acquired 3D object every mix to provide 3D information and buffered audio. Called during a mix. */
} FMOD_OUTPUT_DESCRIPTION;


/*
[STRUCTURE]
[
[DESCRIPTION]
Output object state passed into every callback provides access to plugin developers data and system functionality.
[REMARKS]
Members marked with [r] mean read only for the developer, read/write for the FMOD system.
Members marked with [w] mean read/write for the developer, read only for the FMOD system.
[SEE_ALSO]
FMOD_OUTPUT_DESCRIPTION
]
*/
struct FMOD_OUTPUT_STATE
{
void *plugindata; /* [w] Pointer used to store any plugin specific state so it's available in all callbacks. */
FMOD_OUTPUT_READFROMMIXER readfrommixer; /* [r] Function to execute the mixer producing a buffer of audio. Used to control when the mix occurs manually as an alternative to FMOD_OUTPUT_DESCRIPTION::polling == TRUE. */
FMOD_OUTPUT_ALLOC alloc; /* [r] Function to allocate memory using the FMOD memory system. */
FMOD_OUTPUT_FREE free; /* [r] Function to free memory allocated with FMOD_OUTPUT_ALLOC. */
FMOD_OUTPUT_LOG log; /* [r] Function to write to the FMOD logging system. */
};


/*
[STRUCTURE]
[
[DESCRIPTION]
This structure is passed to the plugin via FMOD_OUTPUT_OBJECT3DUPDATE_CALLBACK, so that whatever object based panning solution available can position it in the speakers correctly.
Object based panning is a 3D panning solution that sends a mono only signal to a hardware device, such as Dolby Atmos or other similar panning solutions.
[REMARKS]
FMOD does not attenuate the buffer, but provides a 'gain' parameter that the user must use to scale the buffer by. Rather than pre-attenuating the buffer, the plugin developer
can access untouched data for other purposes, like reverb sending for example.
The 'gain' parameter is based on the user's 3D custom rolloff model.
Members marked with [r] mean read only for the developer, read/write for the FMOD system.
Members marked with [w] mean read/write for the developer, read only for the FMOD system.
[SEE_ALSO]
FMOD_OUTPUT_OBJECT3DUPDATE_CALLBACK
]
*/
struct FMOD_OUTPUT_OBJECT3DINFO
{
float *buffer; /* [r] Mono PCM floating point buffer. This buffer needs to be scaled by the gain value to get distance attenuation. */
unsigned int bufferlength; /* [r] Length in PCM samples of buffer. */
FMOD_VECTOR position; /* [r] Vector relative between object and listener. */
float gain; /* [r] 0.0 to 1.0 - 1 = 'buffer' is not attenuated, 0 = 'buffer' is fully attenuated. */
float spread; /* [r] 0 - 360 degrees. 0 = point source, 360 = sound is spread around all speakers */
float priority; /* [r] 0.0 to 1.0 - 0 = most important, 1 = least important. Based on height and distance (height is more important). */
};

#endif /* _FMOD_OUTPUT_H */
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,22 @@
#ifndef __FREEGLUT_H__
#define __FREEGLUT_H__

/*
* freeglut.h
*
* The freeglut library include file
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

#include "freeglut_std.h"
#include "freeglut_ext.h"

/*** END OF FILE ***/

#endif /* __FREEGLUT_H__ */
Binary file not shown.
@@ -0,0 +1,271 @@
#ifndef __FREEGLUT_EXT_H__
#define __FREEGLUT_EXT_H__

/*
* freeglut_ext.h
*
* The non-GLUT-compatible extensions to the freeglut library include file
*
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
* Written by Pawel W. Olszta, <olszta@sourceforge.net>
* Creation date: Thu Dec 2 1999
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

#ifdef __cplusplus
extern "C" {
#endif

/*
* Additional GLUT Key definitions for the Special key function
*/
#define GLUT_KEY_NUM_LOCK 0x006D
#define GLUT_KEY_BEGIN 0x006E
#define GLUT_KEY_DELETE 0x006F
#define GLUT_KEY_SHIFT_L 0x0070
#define GLUT_KEY_SHIFT_R 0x0071
#define GLUT_KEY_CTRL_L 0x0072
#define GLUT_KEY_CTRL_R 0x0073
#define GLUT_KEY_ALT_L 0x0074
#define GLUT_KEY_ALT_R 0x0075

/*
* GLUT API Extension macro definitions -- behaviour when the user clicks on an "x" to close a window
*/
#define GLUT_ACTION_EXIT 0
#define GLUT_ACTION_GLUTMAINLOOP_RETURNS 1
#define GLUT_ACTION_CONTINUE_EXECUTION 2

/*
* Create a new rendering context when the user opens a new window?
*/
#define GLUT_CREATE_NEW_CONTEXT 0
#define GLUT_USE_CURRENT_CONTEXT 1

/*
* Direct/Indirect rendering context options (has meaning only in Unix/X11)
*/
#define GLUT_FORCE_INDIRECT_CONTEXT 0
#define GLUT_ALLOW_DIRECT_CONTEXT 1
#define GLUT_TRY_DIRECT_CONTEXT 2
#define GLUT_FORCE_DIRECT_CONTEXT 3

/*
* GLUT API Extension macro definitions -- the glutGet parameters
*/
#define GLUT_INIT_STATE 0x007C

#define GLUT_ACTION_ON_WINDOW_CLOSE 0x01F9

#define GLUT_WINDOW_BORDER_WIDTH 0x01FA
#define GLUT_WINDOW_BORDER_HEIGHT 0x01FB
#define GLUT_WINDOW_HEADER_HEIGHT 0x01FB /* Docs say it should always have been GLUT_WINDOW_BORDER_HEIGHT, keep this for backward compatibility */

#define GLUT_VERSION 0x01FC

#define GLUT_RENDERING_CONTEXT 0x01FD
#define GLUT_DIRECT_RENDERING 0x01FE

#define GLUT_FULL_SCREEN 0x01FF

#define GLUT_SKIP_STALE_MOTION_EVENTS 0x0204

#define GLUT_GEOMETRY_VISUALIZE_NORMALS 0x0205

#define GLUT_STROKE_FONT_DRAW_JOIN_DOTS 0x0206 /* Draw dots between line segments of stroke fonts? */

/*
* New tokens for glutInitDisplayMode.
* Only one GLUT_AUXn bit may be used at a time.
* Value 0x0400 is defined in OpenGLUT.
*/
#define GLUT_AUX 0x1000

#define GLUT_AUX1 0x1000
#define GLUT_AUX2 0x2000
#define GLUT_AUX3 0x4000
#define GLUT_AUX4 0x8000

/*
* Context-related flags, see fg_state.c
* Set the requested OpenGL version
*/
#define GLUT_INIT_MAJOR_VERSION 0x0200
#define GLUT_INIT_MINOR_VERSION 0x0201
#define GLUT_INIT_FLAGS 0x0202
#define GLUT_INIT_PROFILE 0x0203

/*
* Flags for glutInitContextFlags, see fg_init.c
*/
#define GLUT_DEBUG 0x0001
#define GLUT_FORWARD_COMPATIBLE 0x0002


/*
* Flags for glutInitContextProfile, see fg_init.c
*/
#define GLUT_CORE_PROFILE 0x0001
#define GLUT_COMPATIBILITY_PROFILE 0x0002

/*
* Process loop function, see fg_main.c
*/
FGAPI void FGAPIENTRY glutMainLoopEvent( void );
FGAPI void FGAPIENTRY glutLeaveMainLoop( void );
FGAPI void FGAPIENTRY glutExit ( void );

/*
* Window management functions, see fg_window.c
*/
FGAPI void FGAPIENTRY glutFullScreenToggle( void );
FGAPI void FGAPIENTRY glutLeaveFullScreen( void );

/*
* Menu functions
*/
FGAPI void FGAPIENTRY glutSetMenuFont( int menuID, void* font );

/*
* Window-specific callback functions, see fg_callbacks.c
*/
FGAPI void FGAPIENTRY glutMouseWheelFunc( void (* callback)( int, int, int, int ) );
FGAPI void FGAPIENTRY glutPositionFunc( void (* callback)( int, int ) );
FGAPI void FGAPIENTRY glutCloseFunc( void (* callback)( void ) );
FGAPI void FGAPIENTRY glutWMCloseFunc( void (* callback)( void ) );
/* And also a destruction callback for menus */
FGAPI void FGAPIENTRY glutMenuDestroyFunc( void (* callback)( void ) );

/*
* State setting and retrieval functions, see fg_state.c
*/
FGAPI void FGAPIENTRY glutSetOption ( GLenum option_flag, int value );
FGAPI int * FGAPIENTRY glutGetModeValues(GLenum mode, int * size);
/* A.Donev: User-data manipulation */
FGAPI void* FGAPIENTRY glutGetWindowData( void );
FGAPI void FGAPIENTRY glutSetWindowData(void* data);
FGAPI void* FGAPIENTRY glutGetMenuData( void );
FGAPI void FGAPIENTRY glutSetMenuData(void* data);

/*
* Font stuff, see fg_font.c
*/
FGAPI int FGAPIENTRY glutBitmapHeight( void* font );
FGAPI GLfloat FGAPIENTRY glutStrokeHeight( void* font );
FGAPI void FGAPIENTRY glutBitmapString( void* font, const unsigned char *string );
FGAPI void FGAPIENTRY glutStrokeString( void* font, const unsigned char *string );

/*
* Geometry functions, see fg_geometry.c
*/
FGAPI void FGAPIENTRY glutWireRhombicDodecahedron( void );
FGAPI void FGAPIENTRY glutSolidRhombicDodecahedron( void );
FGAPI void FGAPIENTRY glutWireSierpinskiSponge ( int num_levels, double offset[3], double scale );
FGAPI void FGAPIENTRY glutSolidSierpinskiSponge ( int num_levels, double offset[3], double scale );
FGAPI void FGAPIENTRY glutWireCylinder( double radius, double height, GLint slices, GLint stacks);
FGAPI void FGAPIENTRY glutSolidCylinder( double radius, double height, GLint slices, GLint stacks);

/*
* Rest of functions for rendering Newell's teaset, found in fg_teapot.c
* NB: front facing polygons have clockwise winding, not counter clockwise
*/
FGAPI void FGAPIENTRY glutWireTeacup( double size );
FGAPI void FGAPIENTRY glutSolidTeacup( double size );
FGAPI void FGAPIENTRY glutWireTeaspoon( double size );
FGAPI void FGAPIENTRY glutSolidTeaspoon( double size );

/*
* Extension functions, see fg_ext.c
*/
typedef void (*GLUTproc)();
FGAPI GLUTproc FGAPIENTRY glutGetProcAddress( const char *procName );

/*
* Multi-touch/multi-pointer extensions
*/

#define GLUT_HAS_MULTI 1

/* TODO: add device_id parameter,
cf. http://sourceforge.net/mailarchive/forum.php?thread_name=20120518071314.GA28061%40perso.beuc.net&forum_name=freeglut-developer */
FGAPI void FGAPIENTRY glutMultiEntryFunc( void (* callback)( int, int ) );
FGAPI void FGAPIENTRY glutMultiButtonFunc( void (* callback)( int, int, int, int, int ) );
FGAPI void FGAPIENTRY glutMultiMotionFunc( void (* callback)( int, int, int ) );
FGAPI void FGAPIENTRY glutMultiPassiveFunc( void (* callback)( int, int, int ) );

/*
* Joystick functions, see fg_joystick.c
*/
/* USE OF THESE FUNCTIONS IS DEPRECATED !!!!! */
/* If you have a serious need for these functions in your application, please either
* contact the "freeglut" developer community at freeglut-developer@lists.sourceforge.net,
* switch to the OpenGLUT library, or else port your joystick functionality over to PLIB's
* "js" library.
*/
int glutJoystickGetNumAxes( int ident );
int glutJoystickGetNumButtons( int ident );
int glutJoystickNotWorking( int ident );
float glutJoystickGetDeadBand( int ident, int axis );
void glutJoystickSetDeadBand( int ident, int axis, float db );
float glutJoystickGetSaturation( int ident, int axis );
void glutJoystickSetSaturation( int ident, int axis, float st );
void glutJoystickSetMinRange( int ident, float *axes );
void glutJoystickSetMaxRange( int ident, float *axes );
void glutJoystickSetCenter( int ident, float *axes );
void glutJoystickGetMinRange( int ident, float *axes );
void glutJoystickGetMaxRange( int ident, float *axes );
void glutJoystickGetCenter( int ident, float *axes );

/*
* Initialization functions, see fg_init.c
*/
/* to get the typedef for va_list */
#include <stdarg.h>
FGAPI void FGAPIENTRY glutInitContextVersion( int majorVersion, int minorVersion );
FGAPI void FGAPIENTRY glutInitContextFlags( int flags );
FGAPI void FGAPIENTRY glutInitContextProfile( int profile );
FGAPI void FGAPIENTRY glutInitErrorFunc( void (* callback)( const char *fmt, va_list ap ) );
FGAPI void FGAPIENTRY glutInitWarningFunc( void (* callback)( const char *fmt, va_list ap ) );

/* OpenGL >= 2.0 support */
FGAPI void FGAPIENTRY glutSetVertexAttribCoord3(GLint attrib);
FGAPI void FGAPIENTRY glutSetVertexAttribNormal(GLint attrib);
FGAPI void FGAPIENTRY glutSetVertexAttribTexCoord2(GLint attrib);

/* Mobile platforms lifecycle */
FGAPI void FGAPIENTRY glutInitContextFunc(void (* callback)());
FGAPI void FGAPIENTRY glutAppStatusFunc(void (* callback)(int));
/* state flags that can be passed to callback set by glutAppStatusFunc */
#define GLUT_APPSTATUS_PAUSE 0x0001
#define GLUT_APPSTATUS_RESUME 0x0002

/*
* GLUT API macro definitions -- the display mode definitions
*/
#define GLUT_CAPTIONLESS 0x0400
#define GLUT_BORDERLESS 0x0800
#define GLUT_SRGB 0x1000

#ifdef __cplusplus
}
#endif

/*** END OF FILE ***/

#endif /* __FREEGLUT_EXT_H__ */

Large diffs are not rendered by default.

Binary file not shown.
@@ -0,0 +1,21 @@
#ifndef __GLUT_H__
#define __GLUT_H__

/*
* glut.h
*
* The freeglut library include file
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

#include "freeglut_std.h"

/*** END OF FILE ***/

#endif /* __GLUT_H__ */
Binary file not shown.
@@ -0,0 +1,350 @@
/* ftconfig.h. Generated from ftconfig.in by configure. */
/***************************************************************************/
/* */
/* ftconfig.in */
/* */
/* UNIX-specific configuration file (specification only). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
/* */
/***************************************************************************/


/*************************************************************************/
/* */
/* This header file contains a number of macro definitions that are used */
/* by the rest of the engine. Most of the macros here are automatically */
/* determined at compile time, and you should not need to change it to */
/* port FreeType, except to compile the library with a non-ANSI */
/* compiler. */
/* */
/* Note however that if some specific modifications are needed, we */
/* advise you to place a modified copy in your build directory. */
/* */
/* The build directory is usually `freetype/builds/<system>', and */
/* contains system-specific files that are always included first when */
/* building the library. */
/* */
/*************************************************************************/


#ifndef __FTCONFIG_H__
#define __FTCONFIG_H__

#include <ft2build.h>
#include FT_CONFIG_OPTIONS_H
#include FT_CONFIG_STANDARD_LIBRARY_H


FT_BEGIN_HEADER


/*************************************************************************/
/* */
/* PLATFORM-SPECIFIC CONFIGURATION MACROS */
/* */
/* These macros can be toggled to suit a specific system. The current */
/* ones are defaults used to compile FreeType in an ANSI C environment */
/* (16bit compilers are also supported). Copy this file to your own */
/* `freetype/builds/<system>' directory, and edit it to port the engine. */
/* */
/*************************************************************************/


#define HAVE_UNISTD_H 1
#define HAVE_FCNTL_H 1

#define SIZEOF_INT 4
#define SIZEOF_LONG 4


#define FT_SIZEOF_INT SIZEOF_INT
#define FT_SIZEOF_LONG SIZEOF_LONG

#define FT_CHAR_BIT CHAR_BIT

/* Preferred alignment of data */
#define FT_ALIGNMENT 8


/* FT_UNUSED is a macro used to indicate that a given parameter is not */
/* used -- this is only used to get rid of unpleasant compiler warnings */
#ifndef FT_UNUSED
#define FT_UNUSED( arg ) ( (arg) = (arg) )
#endif


/*************************************************************************/
/* */
/* AUTOMATIC CONFIGURATION MACROS */
/* */
/* These macros are computed from the ones defined above. Don't touch */
/* their definition, unless you know precisely what you are doing. No */
/* porter should need to mess with them. */
/* */
/*************************************************************************/


/*************************************************************************/
/* */
/* Mac support */
/* */
/* This is the only necessary change, so it is defined here instead */
/* providing a new configuration file. */
/* */
#if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \
( defined( __MWERKS__ ) && defined( macintosh ) )
/* no Carbon frameworks for 64bit 10.4.x */
#include "AvailabilityMacros.h"
#if defined( __LP64__ ) && \
( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
#define DARWIN_NO_CARBON 1
#else
#define FT_MACINTOSH 1
#endif
#endif


/* Fix compiler warning with sgi compiler */
#if defined( __sgi ) && !defined( __GNUC__ )
#if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION >= 730 )
#pragma set woff 3505
#endif
#endif


/*************************************************************************/
/* */
/* IntN types */
/* */
/* Used to guarantee the size of some specific integers. */
/* */
typedef signed short FT_Int16;
typedef unsigned short FT_UInt16;

#if FT_SIZEOF_INT == 4

typedef signed int FT_Int32;
typedef unsigned int FT_UInt32;

#elif FT_SIZEOF_LONG == 4

typedef signed long FT_Int32;
typedef unsigned long FT_UInt32;

#else
#error "no 32bit type found -- please check your configuration files"
#endif


/* look up an integer type that is at least 32 bits */
#if FT_SIZEOF_INT >= 4

typedef int FT_Fast;
typedef unsigned int FT_UFast;

#elif FT_SIZEOF_LONG >= 4

typedef long FT_Fast;
typedef unsigned long FT_UFast;

#endif


/* determine whether we have a 64-bit int type for platforms without */
/* Autoconf */
#if FT_SIZEOF_LONG == 8

/* FT_LONG64 must be defined if a 64-bit type is available */
#define FT_LONG64
#define FT_INT64 long

#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */

/* this compiler provides the __int64 type */
#define FT_LONG64
#define FT_INT64 __int64

#elif defined( __BORLANDC__ ) /* Borland C++ */

/* XXXX: We should probably check the value of __BORLANDC__ in order */
/* to test the compiler version. */

/* this compiler provides the __int64 type */
#define FT_LONG64
#define FT_INT64 __int64

#elif defined( __WATCOMC__ ) /* Watcom C++ */

/* Watcom doesn't provide 64-bit data types */

#elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */

#define FT_LONG64
#define FT_INT64 long long int

#elif defined( __GNUC__ )

/* GCC provides the `long long' type */
#define FT_LONG64
#define FT_INT64 long long int

#endif /* FT_SIZEOF_LONG == 8 */


#define FT_BEGIN_STMNT do {
#define FT_END_STMNT } while ( 0 )
#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT


/*************************************************************************/
/* */
/* A 64-bit data type will create compilation problems if you compile */
/* in strict ANSI mode. To avoid them, we disable their use if */
/* __STDC__ is defined. You can however ignore this rule by */
/* defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */
/* */
#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 )

#ifdef __STDC__

/* Undefine the 64-bit macros in strict ANSI compilation mode. */
/* Since `#undef' doesn't survive in configuration header files */
/* we use the postprocessing facility of AC_CONFIG_HEADERS to */
/* replace the leading `/' with `#'. */
#undef FT_LONG64
#undef FT_INT64

#endif /* __STDC__ */

#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */


#ifdef FT_MAKE_OPTION_SINGLE_OBJECT

#define FT_LOCAL( x ) static x
#define FT_LOCAL_DEF( x ) static x

#else

#ifdef __cplusplus
#define FT_LOCAL( x ) extern "C" x
#define FT_LOCAL_DEF( x ) extern "C" x
#else
#define FT_LOCAL( x ) extern x
#define FT_LOCAL_DEF( x ) x
#endif

#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */


#ifndef FT_BASE

#ifdef __cplusplus
#define FT_BASE( x ) extern "C" x
#else
#define FT_BASE( x ) extern x
#endif

#endif /* !FT_BASE */


#ifndef FT_BASE_DEF

#ifdef __cplusplus
#define FT_BASE_DEF( x ) x
#else
#define FT_BASE_DEF( x ) x
#endif

#endif /* !FT_BASE_DEF */


#ifndef FT_EXPORT

#ifdef __cplusplus
#define FT_EXPORT( x ) extern "C" x
#else
#define FT_EXPORT( x ) extern x
#endif

#endif /* !FT_EXPORT */


#ifndef FT_EXPORT_DEF

#ifdef __cplusplus
#define FT_EXPORT_DEF( x ) extern "C" x
#else
#define FT_EXPORT_DEF( x ) extern x
#endif

#endif /* !FT_EXPORT_DEF */


#ifndef FT_EXPORT_VAR

#ifdef __cplusplus
#define FT_EXPORT_VAR( x ) extern "C" x
#else
#define FT_EXPORT_VAR( x ) extern x
#endif

#endif /* !FT_EXPORT_VAR */

/* The following macros are needed to compile the library with a */
/* C++ compiler and with 16bit compilers. */
/* */

/* This is special. Within C++, you must specify `extern "C"' for */
/* functions which are used via function pointers, and you also */
/* must do that for structures which contain function pointers to */
/* assure C linkage -- it's not possible to have (local) anonymous */
/* functions which are accessed by (global) function pointers. */
/* */
/* */
/* FT_CALLBACK_DEF is used to _define_ a callback function. */
/* */
/* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
/* contains pointers to callback functions. */
/* */
/* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */
/* that contains pointers to callback functions. */
/* */
/* */
/* Some 16bit compilers have to redefine these macros to insert */
/* the infamous `_cdecl' or `__fastcall' declarations. */
/* */
#ifndef FT_CALLBACK_DEF
#ifdef __cplusplus
#define FT_CALLBACK_DEF( x ) extern "C" x
#else
#define FT_CALLBACK_DEF( x ) static x
#endif
#endif /* FT_CALLBACK_DEF */

#ifndef FT_CALLBACK_TABLE
#ifdef __cplusplus
#define FT_CALLBACK_TABLE extern "C"
#define FT_CALLBACK_TABLE_DEF extern "C"
#else
#define FT_CALLBACK_TABLE extern
#define FT_CALLBACK_TABLE_DEF /* nothing */
#endif
#endif /* FT_CALLBACK_TABLE */


FT_END_HEADER


#endif /* __FTCONFIG_H__ */


/* END */