| @@ -548,6 +548,9 @@ AC_CONFIG_FILES( | |||||
| AC_CONFIG_FILES( | AC_CONFIG_FILES( | ||||
| [tools/neercs/Makefile | [tools/neercs/Makefile | ||||
| ]) | ]) | ||||
| AC_CONFIG_FILES( | |||||
| [tools/pimp/Makefile | |||||
| ]) | |||||
| AC_CONFIG_FILES( | AC_CONFIG_FILES( | ||||
| [people/jnat/Makefile | [people/jnat/Makefile | ||||
| people/jnat/TestProject/Makefile | people/jnat/TestProject/Makefile | ||||
| @@ -39,6 +39,7 @@ DECLARE_IMAGE_LOADER(AndroidImageData, 100) | |||||
| { | { | ||||
| public: | public: | ||||
| virtual bool Open(char const *); | virtual bool Open(char const *); | ||||
| virtual bool Save(char const *); | |||||
| virtual bool Close(); | virtual bool Close(); | ||||
| virtual uint8_t *GetData() const; | virtual uint8_t *GetData() const; | ||||
| @@ -108,6 +109,13 @@ bool AndroidImageData::Open(char const *path) | |||||
| return true; | return true; | ||||
| } | } | ||||
| bool AndroidImageData::Save(char const *path) | |||||
| { | |||||
| UNUSED(path); | |||||
| /* TODO: unimplemented */ | |||||
| } | |||||
| bool AndroidImageData::Close() | bool AndroidImageData::Close() | ||||
| { | { | ||||
| JNIEnv *env; | JNIEnv *env; | ||||
| @@ -28,6 +28,7 @@ DECLARE_IMAGE_LOADER(DummyImageData, 0) | |||||
| { | { | ||||
| public: | public: | ||||
| virtual bool Open(char const *); | virtual bool Open(char const *); | ||||
| virtual bool Save(char const *); | |||||
| virtual bool Close(); | virtual bool Close(); | ||||
| virtual uint8_t *GetData() const; | virtual uint8_t *GetData() const; | ||||
| @@ -60,6 +61,13 @@ bool DummyImageData::Open(char const *path) | |||||
| return true; | return true; | ||||
| } | } | ||||
| bool DummyImageData::Save(char const *path) | |||||
| { | |||||
| UNUSED(path); | |||||
| return true; | |||||
| } | |||||
| bool DummyImageData::Close() | bool DummyImageData::Close() | ||||
| { | { | ||||
| delete[] pixels; | delete[] pixels; | ||||
| @@ -35,6 +35,7 @@ DECLARE_IMAGE_LOADER(GdiPlusImageData, 100) | |||||
| { | { | ||||
| public: | public: | ||||
| virtual bool Open(char const *); | virtual bool Open(char const *); | ||||
| virtual bool Save(char const *); | |||||
| virtual bool Close(); | virtual bool Close(); | ||||
| virtual uint8_t *GetData() const; | virtual uint8_t *GetData() const; | ||||
| @@ -139,6 +140,14 @@ bool GdiPlusImageData::Open(char const *path) | |||||
| return true; | return true; | ||||
| } | } | ||||
| bool GdiPlusImageData::Save(char const *path) | |||||
| { | |||||
| UNUSED(path); | |||||
| /* TODO: unimplemented */ | |||||
| return true; | |||||
| } | |||||
| bool GdiPlusImageData::Close() | bool GdiPlusImageData::Close() | ||||
| { | { | ||||
| m_bitmap->UnlockBits(&m_bdata); | m_bitmap->UnlockBits(&m_bdata); | ||||
| @@ -32,6 +32,7 @@ DECLARE_IMAGE_LOADER(IosImageData, 100) | |||||
| { | { | ||||
| public: | public: | ||||
| virtual bool Open(char const *); | virtual bool Open(char const *); | ||||
| virtual bool Save(char const *); | |||||
| virtual bool Close(); | virtual bool Close(); | ||||
| virtual uint8_t *GetData() const; | virtual uint8_t *GetData() const; | ||||
| @@ -83,6 +84,14 @@ bool IosImageData::Open(char const *path) | |||||
| return true; | return true; | ||||
| } | } | ||||
| bool IosImageData::Save(char const *path) | |||||
| { | |||||
| UNUSED(path); | |||||
| /* TODO: unimplemented */ | |||||
| return true; | |||||
| } | |||||
| bool IosImageData::Close() | bool IosImageData::Close() | ||||
| { | { | ||||
| free(pixels); | free(pixels); | ||||
| @@ -34,6 +34,7 @@ DECLARE_IMAGE_LOADER(Ps3ImageData, 100) | |||||
| { | { | ||||
| public: | public: | ||||
| virtual bool Open(char const *); | virtual bool Open(char const *); | ||||
| virtual bool Save(char const *); | |||||
| virtual bool Close(); | virtual bool Close(); | ||||
| virtual uint8_t *GetData() const; | virtual uint8_t *GetData() const; | ||||
| @@ -173,6 +174,14 @@ bool Ps3ImageData::Open(char const *path) | |||||
| return true; | return true; | ||||
| } | } | ||||
| bool Ps3ImageData::Open(char const *path) | |||||
| { | |||||
| UNUSED(path); | |||||
| /* TODO: unimplemented */ | |||||
| return true; | |||||
| } | |||||
| bool Ps3ImageData::Close() | bool Ps3ImageData::Close() | ||||
| { | { | ||||
| free(pixels); | free(pixels); | ||||
| @@ -41,6 +41,7 @@ DECLARE_IMAGE_LOADER(SdlImageData, 50) | |||||
| { | { | ||||
| public: | public: | ||||
| virtual bool Open(char const *); | virtual bool Open(char const *); | ||||
| virtual bool Save(char const *); | |||||
| virtual bool Close(); | virtual bool Close(); | ||||
| virtual uint8_t *GetData() const; | virtual uint8_t *GetData() const; | ||||
| @@ -89,6 +90,13 @@ bool SdlImageData::Open(char const *path) | |||||
| return true; | return true; | ||||
| } | } | ||||
| bool SdlImageData::Save(char const *path) | |||||
| { | |||||
| int ret = SDL_SaveBMP(m_img, path); | |||||
| return ret == 0; | |||||
| } | |||||
| bool SdlImageData::Close() | bool SdlImageData::Close() | ||||
| { | { | ||||
| SDL_FreeSurface(m_img); | SDL_FreeSurface(m_img); | ||||
| @@ -29,6 +29,7 @@ DECLARE_IMAGE_LOADER(ZedImageData, 0) | |||||
| { | { | ||||
| public: | public: | ||||
| virtual bool Open(char const *); | virtual bool Open(char const *); | ||||
| virtual bool Save(char const *); | |||||
| virtual bool Close(); | virtual bool Close(); | ||||
| virtual uint8_t *GetData() const; | virtual uint8_t *GetData() const; | ||||
| @@ -299,6 +300,13 @@ bool ZedImageData::Open(char const *path) | |||||
| return true; | return true; | ||||
| } | } | ||||
| bool ZedImageData::Save(char const *path) | |||||
| { | |||||
| UNUSED(path); | |||||
| /* FIXME: do we need to implement this? */ | |||||
| return true; | |||||
| } | |||||
| bool ZedImageData::Close() | bool ZedImageData::Close() | ||||
| { | { | ||||
| delete[] m_pixels; | delete[] m_pixels; | ||||
| @@ -28,6 +28,7 @@ DECLARE_IMAGE_LOADER(ZedPaletteImageData, 0) | |||||
| { | { | ||||
| public: | public: | ||||
| virtual bool Open(char const *); | virtual bool Open(char const *); | ||||
| virtual bool Save(char const *); | |||||
| virtual bool Close(); | virtual bool Close(); | ||||
| virtual uint8_t *GetData() const; | virtual uint8_t *GetData() const; | ||||
| @@ -83,6 +84,13 @@ bool ZedPaletteImageData::Open(char const *path) | |||||
| return true; | return true; | ||||
| } | } | ||||
| bool ZedPaletteImageData::Save(char const *path) | |||||
| { | |||||
| UNUSED(path); | |||||
| /* FIXME: do we need to implement this? */ | |||||
| return true; | |||||
| } | |||||
| bool ZedPaletteImageData::Close() | bool ZedPaletteImageData::Close() | ||||
| { | { | ||||
| delete[] m_pixels; | delete[] m_pixels; | ||||
| @@ -81,6 +81,7 @@ public: | |||||
| virtual ~ImageData() {} | virtual ~ImageData() {} | ||||
| virtual bool Open(char const *) = 0; | virtual bool Open(char const *) = 0; | ||||
| virtual bool Save(char const *) = 0; | |||||
| virtual bool Close() = 0; | virtual bool Close() = 0; | ||||
| virtual uint8_t *GetData() const = 0; | virtual uint8_t *GetData() const = 0; | ||||
| @@ -178,6 +178,11 @@ Image::Image() | |||||
| { | { | ||||
| } | } | ||||
| bool Image::Save(char const *path) | |||||
| { | |||||
| return m_data->Save(path); | |||||
| } | |||||
| ivec2 Image::GetSize() const | ivec2 Image::GetSize() const | ||||
| { | { | ||||
| return m_data->m_size; | return m_data->m_size; | ||||
| @@ -31,6 +31,7 @@ public: | |||||
| static Image *Load(char const *path); | static Image *Load(char const *path); | ||||
| static void Destroy(Image *img); | static void Destroy(Image *img); | ||||
| bool Save(char const *path); | |||||
| ivec2 GetSize() const; | ivec2 GetSize() const; | ||||
| PixelFormat GetFormat() const; | PixelFormat GetFormat() const; | ||||
| uint8_t *GetData() const; | uint8_t *GetData() const; | ||||
| @@ -4,6 +4,7 @@ include $(top_srcdir)/build/autotools/common.am | |||||
| SUBDIRS = | SUBDIRS = | ||||
| SUBDIRS += lolremez | SUBDIRS += lolremez | ||||
| SUBDIRS += neercs | SUBDIRS += neercs | ||||
| SUBDIRS += pimp | |||||
| SUBDIRS += vimlol | SUBDIRS += vimlol | ||||
| SUBDIRS += vslol | SUBDIRS += vslol | ||||