summaryrefslogtreecommitdiffhomepage
path: root/src/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.h')
-rw-r--r--src/utils.h24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/utils.h b/src/utils.h
index 045b0692..3ffd025c 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -31,6 +31,8 @@
#include <android/asset_manager.h> // Required for: AAssetManager
#endif
+#include "rres.h"
+
//----------------------------------------------------------------------------------
// Some basic Defines
//----------------------------------------------------------------------------------
@@ -41,19 +43,8 @@
//----------------------------------------------------------------------------------
// Types and Structures Definition
//----------------------------------------------------------------------------------
-typedef enum { IMAGE = 0, SOUND, MODEL, TEXT, RAW } DataType;
-
typedef enum { INFO = 0, ERROR, WARNING, DEBUG, OTHER } TraceLogType;
-// One resource info header, every resource includes this header (8 byte)
-typedef struct {
- unsigned short id; // Resource unique identifier (2 byte)
- unsigned char type; // Resource type (1 byte)
- unsigned char comp; // Data Compression and Coding (1 byte)
- unsigned int size; // Data size in .rres file (compressed or not, only DATA) (4 byte)
- unsigned int srcSize; // Source data size (uncompressed, only DATA)
-} ResInfoHeader;
-
#ifdef __cplusplus
extern "C" { // Prevents name mangling of functions
#endif
@@ -66,17 +57,14 @@ extern "C" { // Prevents name mangling of functions
//----------------------------------------------------------------------------------
// Module Functions Declaration
//----------------------------------------------------------------------------------
-unsigned char *DecompressData(const unsigned char *data, unsigned long compSize, int uncompSize);
+void TraceLog(int msgType, const char *text, ...); // Outputs a trace log message
+const char *GetExtension(const char *fileName); // Returns extension of a filename
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI)
-void WriteBitmap(const char *fileName, unsigned char *imgData, int width, int height);
-void WritePNG(const char *fileName, unsigned char *imgData, int width, int height, int compSize);
+void SaveBMP(const char *fileName, unsigned char *imgData, int width, int height, int compSize);
+void SavePNG(const char *fileName, unsigned char *imgData, int width, int height, int compSize);
#endif
-void TraceLog(int msgType, const char *text, ...); // Outputs a trace log message
-const char *GetExtension(const char *fileName); // Returns extension of a filename
-int GetNextPOT(int num); // Calculate next power-of-two value for a given num
-
#if defined(PLATFORM_ANDROID)
void InitAssetManager(AAssetManager *manager); // Initialize asset manager from android app
FILE *android_fopen(const char *fileName, const char *mode); // Replacement for fopen()