wololo
- Adding DJardin's port to N900
This commit is contained in:
@@ -53,6 +53,12 @@
|
||||
#define COSF(x) cosf(x*DEG2RAD)
|
||||
#endif
|
||||
|
||||
#if (defined GL_ES_VERSION_2_0) || (defined GL_VERSION_2_0) || (defined WIN32)
|
||||
typedef struct
|
||||
{
|
||||
GLfloat m[4][4];
|
||||
} ESMatrix;
|
||||
#endif // (defined GL_ES_VERSION_2_0) || (defined GL_VERSION_2_0)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
/// A collection of core rendering functions.
|
||||
@@ -541,8 +547,32 @@ private:
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
|
||||
GLuint mCurrentTex;
|
||||
#if (defined GL_ES_VERSION_2_0) || (defined GL_VERSION_2_0) || (defined WIN32)
|
||||
// MVP matrix
|
||||
ESMatrix theMvpMatrix;
|
||||
|
||||
// Handle to a program object
|
||||
GLuint prog1;
|
||||
// Attribute locations
|
||||
GLint prog1_positionLoc;
|
||||
GLint prog1_colorLoc;
|
||||
// Uniform locations
|
||||
GLint prog1_mvpLoc;
|
||||
|
||||
// Handle to a program object
|
||||
GLuint prog2;
|
||||
// Sampler location
|
||||
GLint prog2_samplerLoc;
|
||||
// Attribute locations
|
||||
GLint prog2_positionLoc;
|
||||
GLint prog2_texCoordLoc;
|
||||
GLint prog2_colorLoc;
|
||||
// MVP matrix
|
||||
ESMatrix prog2_mvpMatrix;
|
||||
// Uniform locations
|
||||
GLint prog2_mvpLoc;
|
||||
|
||||
#endif // (defined GL_ES_VERSION_2_0) || (defined GL_VERSION_2_0)
|
||||
#else
|
||||
void *fbp0, *fbp1, *zbp;
|
||||
PIXEL_TYPE* mVRAM;
|
||||
|
||||
@@ -19,6 +19,10 @@
|
||||
#include "JTypes.h"
|
||||
|
||||
|
||||
#ifdef USE_PHONON
|
||||
#include <phonon/AudioOutput>
|
||||
#include <phonon/MediaObject>
|
||||
#else
|
||||
#ifdef WIN32
|
||||
|
||||
#include <windows.h>
|
||||
@@ -43,16 +47,31 @@
|
||||
#ifdef WITH_FMOD
|
||||
#include "../Dependencies/include/fmod.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
#ifdef USE_PHONON
|
||||
class JMusic : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
#else
|
||||
class JMusic
|
||||
{
|
||||
#endif
|
||||
public:
|
||||
JMusic();
|
||||
~JMusic();
|
||||
~JMusic();
|
||||
void Update();
|
||||
int getPlayTime();
|
||||
|
||||
#ifdef USE_PHONON
|
||||
Phonon::AudioOutput* mOutput;
|
||||
Phonon::MediaObject* mMediaObject;
|
||||
public slots:
|
||||
void seekAtTheBegining();
|
||||
|
||||
#else
|
||||
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
#ifdef WITH_FMOD
|
||||
FSOUND_SAMPLE* mTrack; // MP3 needed to be of "sample" type for FMOD, FMUSIC_MODULE is for MODs
|
||||
@@ -62,6 +81,7 @@ public:
|
||||
#else
|
||||
JMP3* mTrack;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
@@ -80,6 +100,10 @@ class JSample
|
||||
#ifdef WITH_FMOD
|
||||
FSOUND_SAMPLE *mSample;
|
||||
#else
|
||||
#ifdef USE_PHONON
|
||||
Phonon::AudioOutput* mOutput;
|
||||
Phonon::MediaObject* mMediaObject;
|
||||
#endif
|
||||
void* mSample;
|
||||
#endif
|
||||
#else
|
||||
|
||||
@@ -39,11 +39,11 @@
|
||||
|
||||
#define MAX_CHANNEL 128
|
||||
|
||||
enum {
|
||||
JGE_ERR_CANT_OPEN_FILE = -1,
|
||||
JGE_ERR_PNG = -2,
|
||||
JGE_ERR_MALLOC_FAILED = -4,
|
||||
JGE_ERR_GENERIC = -5,
|
||||
enum {
|
||||
JGE_ERR_CANT_OPEN_FILE = -1,
|
||||
JGE_ERR_PNG = -2,
|
||||
JGE_ERR_MALLOC_FAILED = -4,
|
||||
JGE_ERR_GENERIC = -5,
|
||||
};
|
||||
|
||||
|
||||
@@ -88,10 +88,14 @@ enum {
|
||||
typedef bool BOOL;
|
||||
#endif
|
||||
|
||||
#ifndef QT_CONFIG
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#endif
|
||||
#else
|
||||
# include <QtOpenGL>
|
||||
#endif
|
||||
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user