lsnes/include/lua/bitmap.hpp
2013-09-27 10:36:19 +03:00

52 lines
962 B
C++

#ifndef _lua__bitmap__hpp__included__
#define _lua__bitmap__hpp__included__
#include <vector>
#include <string>
#include <cstdint>
#include "core/window.hpp"
#include "library/framebuffer.hpp"
#include "library/string.hpp"
struct lua_bitmap
{
lua_bitmap(uint32_t w, uint32_t h);
~lua_bitmap();
size_t width;
size_t height;
std::vector<uint16_t> pixels;
std::string print();
};
struct lua_dbitmap
{
lua_dbitmap(uint32_t w, uint32_t h);
~lua_dbitmap();
size_t width;
size_t height;
std::vector<premultiplied_color> pixels;
std::string print();
};
struct lua_palette
{
std::vector<premultiplied_color> colors;
lua_palette();
~lua_palette();
mutex* palette_mutex;
std::string print();
};
struct lua_loaded_bitmap
{
size_t w;
size_t h;
bool d;
std::vector<int64_t> bitmap;
std::vector<int64_t> palette;
static struct lua_loaded_bitmap load(std::istream& stream);
static struct lua_loaded_bitmap load(const std::string& name);
};
#endif