Disband lime.media, create lime.audio and lime.math

This commit is contained in:
Joshua Granick
2014-08-02 10:33:32 -07:00
parent d66f48a482
commit 51017010a8
46 changed files with 899 additions and 285 deletions

View File

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

View File

@@ -1,8 +1,8 @@
#ifndef LIME_MEDIA_FORMAT_OGG_H
#define LIME_MEDIA_FORMAT_OGG_H
#ifndef LIME_AUDIO_FORMAT_OGG_H
#define LIME_AUDIO_FORMAT_OGG_H
#include <media/AudioBuffer.h>
#include <audio/AudioBuffer.h>
#include <utils/Resource.h>

View File

@@ -1,8 +1,8 @@
#ifndef LIME_MEDIA_FORMAT_WAV_H
#define LIME_MEDIA_FORMAT_WAV_H
#ifndef LIME_AUDIO_FORMAT_WAV_H
#define LIME_AUDIO_FORMAT_WAV_H
#include <media/AudioBuffer.h>
#include <audio/AudioBuffer.h>
#include <utils/Resource.h>

View File

@@ -2,29 +2,34 @@
#define LIME_GRAPHICS_FONT_H
#include <hx/CFFI.h>
#include <list>
#include <media/Image.h>
#include <graphics/ImageBuffer.h>
#ifdef LIME_FREETYPE
#include <ft2build.h>
#include FT_FREETYPE_H
#endif
namespace lime {
class Font {
public:
Font (const char *fontFace);
value LoadGlyphs (int size, const char *glyphs, Image *image);
value LoadGlyphs (int size, const char *glyphs, ImageBuffer *imageBuffer);
private:
#ifdef LIME_FREETYPE
FT_Face face;
#else
void* face;
#endif
};

View File

@@ -1,5 +1,5 @@
#ifndef LIME_MEDIA_IMAGE_H
#define LIME_MEDIA_IMAGE_H
#ifndef LIME_GRAPHICS_IMAGE_BUFFER_H
#define LIME_GRAPHICS_IMAGE_BUFFER_H
#include <hx/CFFI.h>
@@ -9,13 +9,13 @@
namespace lime {
class Image {
class ImageBuffer {
public:
Image ();
~Image ();
ImageBuffer ();
~ImageBuffer ();
void Blit (const unsigned char *data, int x, int y, int width, int height);
void Resize (int width, int height, int bpp = 4);

View File

@@ -0,0 +1,26 @@
#ifndef LIME_GRAPHICS_FORMAT_JPEG_H
#define LIME_GRAPHICS_FORMAT_JPEG_H
#include <graphics/ImageBuffer.h>
#include <utils/Resource.h>
namespace lime {
class JPEG {
public:
static bool Decode (Resource *resource, ImageBuffer *imageBuffer);
};
}
#endif

View File

@@ -0,0 +1,26 @@
#ifndef LIME_GRAPHICS_FORMAT_PNG_H
#define LIME_GRAPHICS_FORMAT_PNG_H
#include <graphics/ImageBuffer.h>
#include <utils/Resource.h>
namespace lime {
class PNG {
public:
static bool Decode (Resource *resource, ImageBuffer *imageBuffer);
};
}
#endif

View File

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

View File

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