Fosfat 0.4.0
fosgra.h
Go to the documentation of this file.
1/*
2 * FOS libfosgra: Smaky [.IMAGE|.COLOR] decoder
3 * Copyright (C) 2009-2010 Mathieu Schroeter <mathieu.schroeter@gamesover.ch>
4 *
5 * Thanks to Pierre Arnaud for his help and the documentation
6 * And to Epsitec SA for the Smaky computers
7 *
8 * This file is part of Fosfat.
9 *
10 * This library is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 *
23 */
24
25#ifndef FOSGRA_H
26#define FOSGRA_H
27
34#ifdef __cplusplus
35extern "C" {
36#endif /* __cplusplus */
37
38#include <inttypes.h>
39#include <fosfat.h>
40
49uint32_t fosgra_color_get (fosfat_t *fosfat, const char *path, uint8_t idx);
50
60uint8_t *fosgra_get_buffer (fosfat_t *fosfat,
61 const char *path, int offset, int size);
62
73 const char *path, uint16_t *x, uint16_t *y, uint8_t *bpp);
74
81int fosgra_is_image (fosfat_t *fosfat, const char *path);
82
83#ifdef __cplusplus
84}
85#endif /* __cplusplus */
86
87#endif /* FOSGRA_H */
struct fosfat_s fosfat_t
Definition fosfat.h:104
int fosgra_is_image(fosfat_t *fosfat, const char *path)
Test if the file is a .IMAGE.
uint8_t * fosgra_get_buffer(fosfat_t *fosfat, const char *path, int offset, int size)
Get decoded .IMAGE buffer.
void fosgra_get_info(fosfat_t *fosfat, const char *path, uint16_t *x, uint16_t *y, uint8_t *bpp)
Get informations on the .IMAGE.
uint32_t fosgra_color_get(fosfat_t *fosfat, const char *path, uint8_t idx)
Get the color RGB24 from a .COLOR index.