Refactor OpenGL classes into lime.graphics.opengl, OpenAL into lime.media.openal, move image and sound into media

This commit is contained in:
Joshua Granick
2014-07-29 21:24:21 -07:00
parent da1bf26501
commit 4153d70187
56 changed files with 285 additions and 411 deletions

View File

@@ -1,26 +0,0 @@
#ifndef LIME_FORMAT_OGG_H
#define LIME_FORMAT_OGG_H
#include <audio/Sound.h>
#include <utils/Resource.h>
namespace lime {
class OGG {
public:
static bool Decode (Resource *resource, Sound *sound);
};
}
#endif

View File

@@ -4,7 +4,7 @@
#include <hx/CFFI.h>
#include <list>
#include <graphics/Image.h>
#include <media/Image.h>
#include <ft2build.h>
#include FT_FREETYPE_H

View File

@@ -1,5 +1,5 @@
#ifndef LIME_AUDIO_SOUND_H
#define LIME_AUDIO_SOUND_H
#ifndef LIME_MEDIA_AUDIO_BUFFER_H
#define LIME_MEDIA_AUDIO_BUFFER_H
#include <hx/CFFI.h>
@@ -29,13 +29,13 @@
namespace lime {
class Sound {
class AudioBuffer {
public:
Sound ();
~Sound ();
AudioBuffer ();
~AudioBuffer ();
value Value ();

View File

@@ -1,5 +1,5 @@
#ifndef LIME_GRAPHICS_IMAGE_H
#define LIME_GRAPHICS_IMAGE_H
#ifndef LIME_MEDIA_IMAGE_H
#define LIME_MEDIA_IMAGE_H
#include <hx/CFFI.h>

View File

@@ -1,8 +1,8 @@
#ifndef LIME_FORMAT_JPEG_H
#define LIME_FORMAT_JPEG_H
#ifndef LIME_MEDIA_FORMAT_JPEG_H
#define LIME_MEDIA_FORMAT_JPEG_H
#include <graphics/Image.h>
#include <media/Image.h>
#include <utils/Resource.h>

View File

@@ -0,0 +1,26 @@
#ifndef LIME_MEDIA_FORMAT_OGG_H
#define LIME_MEDIA_FORMAT_OGG_H
#include <media/AudioBuffer.h>
#include <utils/Resource.h>
namespace lime {
class OGG {
public:
static bool Decode (Resource *resource, AudioBuffer *audioBuffer);
};
}
#endif

View File

@@ -1,8 +1,8 @@
#ifndef LIME_FORMAT_PNG_H
#define LIME_FORMAT_PNG_H
#ifndef LIME_MEDIA_FORMAT_PNG_H
#define LIME_MEDIA_FORMAT_PNG_H
#include <graphics/Image.h>
#include <media/Image.h>
#include <utils/Resource.h>

View File

@@ -1,8 +1,8 @@
#ifndef LIME_FORMAT_WAV_H
#define LIME_FORMAT_WAV_H
#ifndef LIME_MEDIA_FORMAT_WAV_H
#define LIME_MEDIA_FORMAT_WAV_H
#include <audio/Sound.h>
#include <media/AudioBuffer.h>
#include <utils/Resource.h>
@@ -45,7 +45,7 @@ namespace lime {
public:
static bool Decode (Resource *resource, Sound *sound);
static bool Decode (Resource *resource, AudioBuffer *audioBuffer);
};

View File

@@ -11,6 +11,7 @@ namespace lime {
struct Resource {
Resource () : data (NULL), path (NULL) {}
Resource (const char* path) : data (NULL), path (path) {}
Resource (ByteArray *data) : data (data), path (NULL) {}