mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 22:13:51 +00:00
Move rpng to libretro SDK
This commit is contained in:
parent
378bd85610
commit
3a062538dd
@ -534,7 +534,7 @@ endif
|
|||||||
#LIBS += $(LIBXML2_LIBS)
|
#LIBS += $(LIBXML2_LIBS)
|
||||||
#DEFINES += $(LIBXML2_CFLAGS)
|
#DEFINES += $(LIBXML2_CFLAGS)
|
||||||
#else
|
#else
|
||||||
#OBJ += compat/rxml/rxml.o
|
#OBJ += libretro-sdk/formats/xml/rxml.o
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# Compression/Archive
|
# Compression/Archive
|
||||||
@ -564,7 +564,7 @@ endif
|
|||||||
|
|
||||||
ifeq ($(HAVE_ZLIB), 1)
|
ifeq ($(HAVE_ZLIB), 1)
|
||||||
ZLIB_OBJS = decompress/zip_support.o
|
ZLIB_OBJS = decompress/zip_support.o
|
||||||
OBJ += gfx/rpng/rpng.o file_extract.o
|
OBJ += libretro-sdk/formats/png/rpng.o file_extract.o
|
||||||
OBJ += $(ZLIB_OBJS)
|
OBJ += $(ZLIB_OBJS)
|
||||||
DEFINES += -DHAVE_ZLIB
|
DEFINES += -DHAVE_ZLIB
|
||||||
HAVE_COMPRESSION = 1
|
HAVE_COMPRESSION = 1
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include "../../general.h"
|
#include "../../general.h"
|
||||||
#include "../rpng/rpng.h"
|
#include <formats/rpng.h>
|
||||||
|
|
||||||
static bool rpng_image_load_tga_shift(const char *path,
|
static bool rpng_image_load_tga_shift(const char *path,
|
||||||
struct texture_image *out_img,
|
struct texture_image *out_img,
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
/* RetroArch - A frontend for libretro.
|
|
||||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
|
||||||
*
|
|
||||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
|
||||||
* of the GNU General Public License as published by the Free Software Found-
|
|
||||||
* ation, either version 3 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
||||||
* PURPOSE. See the GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
|
||||||
* If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef RPNG_H__
|
|
||||||
#define RPNG_H__
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#include <boolean.h>
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
#include "../../config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool rpng_load_image_argb(const char *path, uint32_t **data,
|
|
||||||
unsigned *width, unsigned *height);
|
|
||||||
|
|
||||||
#ifdef HAVE_ZLIB_DEFLATE
|
|
||||||
bool rpng_save_image_argb(const char *path, const uint32_t *data,
|
|
||||||
unsigned width, unsigned height, unsigned pitch);
|
|
||||||
bool rpng_save_image_bgr24(const char *path, const uint8_t *data,
|
|
||||||
unsigned width, unsigned height, unsigned pitch);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -180,7 +180,7 @@ VIDEO IMAGE
|
|||||||
#include "../gfx/image/image_rpng.c"
|
#include "../gfx/image/image_rpng.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../gfx/rpng/rpng.c"
|
#include "../libretro-sdk/formats/png/rpng.c"
|
||||||
|
|
||||||
/*============================================================
|
/*============================================================
|
||||||
VIDEO DRIVER
|
VIDEO DRIVER
|
||||||
|
@ -1,19 +1,26 @@
|
|||||||
/* RetroArch - A frontend for libretro.
|
/* Copyright (C) 2010-2015 The RetroArch team
|
||||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
|
||||||
*
|
|
||||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
|
||||||
* of the GNU General Public License as published by the Free Software Found-
|
|
||||||
* ation, either version 3 of the License, or (at your option) any later version.
|
|
||||||
*
|
*
|
||||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
* ---------------------------------------------------------------------------------------
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
* The following license statement only applies to this file (rpng.c).
|
||||||
* PURPOSE. See the GNU General Public License for more details.
|
* ---------------------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
* Permission is hereby granted, free of charge,
|
||||||
* If not, see <http://www.gnu.org/licenses/>.
|
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||||
|
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||||
|
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "rpng.h"
|
#include <formats/rpng.h>
|
||||||
|
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
|
|
||||||
@ -26,8 +33,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef RARCH_INTERNAL
|
#ifdef RARCH_INTERNAL
|
||||||
#include "../../hash.h"
|
#include "../../../hash.h"
|
||||||
#else
|
#else
|
||||||
|
|
||||||
static inline uint32_t crc32_calculate(const uint8_t *data, size_t length)
|
static inline uint32_t crc32_calculate(const uint8_t *data, size_t length)
|
||||||
{
|
{
|
||||||
return crc32(0, data, length);
|
return crc32(0, data, length);
|
@ -1,19 +1,26 @@
|
|||||||
/* RetroArch - A frontend for libretro.
|
/* Copyright (C) 2010-2015 The RetroArch team
|
||||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
|
||||||
*
|
|
||||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
|
||||||
* of the GNU General Public License as published by the Free Software Found-
|
|
||||||
* ation, either version 3 of the License, or (at your option) any later version.
|
|
||||||
*
|
*
|
||||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
* ---------------------------------------------------------------------------------------
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
* The following license statement only applies to this file (rpng_test.c).
|
||||||
* PURPOSE. See the GNU General Public License for more details.
|
* ---------------------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
* Permission is hereby granted, free of charge,
|
||||||
* If not, see <http://www.gnu.org/licenses/>.
|
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||||
|
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||||
|
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "rpng.h"
|
#include <formats/rpng.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
53
libretro-sdk/include/formats/rpng.h
Normal file
53
libretro-sdk/include/formats/rpng.h
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
/* Copyright (C) 2010-2015 The RetroArch team
|
||||||
|
*
|
||||||
|
* ---------------------------------------------------------------------------------------
|
||||||
|
* The following license statement only applies to this file (rpng.h).
|
||||||
|
* ---------------------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge,
|
||||||
|
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||||
|
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||||
|
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __LIBRETRO_SDK_FORMAT_RPNG_H__
|
||||||
|
#define __LIBRETRO_SDK_FORMAT_RPNG_H__
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include <boolean.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "../../config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
bool rpng_load_image_argb(const char *path, uint32_t **data,
|
||||||
|
unsigned *width, unsigned *height);
|
||||||
|
|
||||||
|
#ifdef HAVE_ZLIB_DEFLATE
|
||||||
|
bool rpng_save_image_argb(const char *path, const uint32_t *data,
|
||||||
|
unsigned width, unsigned height, unsigned pitch);
|
||||||
|
bool rpng_save_image_bgr24(const char *path, const uint8_t *data,
|
||||||
|
unsigned width, unsigned height, unsigned pitch);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
#ifdef HAVE_ZLIB_DEFLATE
|
#ifdef HAVE_ZLIB_DEFLATE
|
||||||
|
|
||||||
#include "gfx/rpng/rpng.h"
|
#include <formats/rpng.h>
|
||||||
#define IMG_EXT "png"
|
#define IMG_EXT "png"
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user