Disband lime.media, create lime.audio and lime.math
This commit is contained in:
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
26
project/include/graphics/format/JPEG.h
Normal file
26
project/include/graphics/format/JPEG.h
Normal 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
|
||||
26
project/include/graphics/format/PNG.h
Normal file
26
project/include/graphics/format/PNG.h
Normal 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
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user