28 lines
1.1 KiB
C++
28 lines
1.1 KiB
C++
#pragma once
|
|
#include <stdio.h>
|
|
|
|
#define SOURCE_FILE 0
|
|
#define SOURCE_FOLDER 1
|
|
|
|
namespace file
|
|
{
|
|
void setConfigFolder(const char *foldername);
|
|
const char *getConfigFolder();
|
|
|
|
void setResourceFilename(const char *str);
|
|
void setResourceFolder(const char *str);
|
|
void setSource(const int src);
|
|
|
|
FILE *getFilePointer(const char *resourcename, int& filesize, const bool binary=false);
|
|
char *getFileBuffer(const char *resourcename, int& filesize, const bool zero_terminate=false);
|
|
|
|
const char* getConfigValueString(const char *key);
|
|
const int getConfigValueInteger(const char *key, const int default_value=0);
|
|
const float getConfigValueFloat(const char *key, const float default_value=0.0f);
|
|
const bool getConfigValueBool(const char *key, const bool default_value=false);
|
|
void setConfigValueString(const char* key, const char* value);
|
|
void setConfigValueInteger(const char* key, const int value);
|
|
void setConfigValueFloat(const char* key, const float value);
|
|
void setConfigValueBool(const char* key, const bool value);
|
|
}
|