This commit is contained in:
korenkonder
2024-02-03 15:01:09 +03:00
parent e4519afd7a
commit 54c61a89f6
3 changed files with 7 additions and 7 deletions
+4 -4
View File
@@ -10,15 +10,15 @@
#include "../object.hpp"
namespace Glitter {
FileReader::FileReader(GLT) : file_handler(), farc(), effect_group(),
load_count(), type(), path(), file(), state(), init_scene(), obj_db(), tex_db() {
FileReader::FileReader(GLT)
: file_handler(), farc(), effect_group(), load_count(), state(), init_scene(), obj_db(), tex_db() {
emission = -1.0f;
type = GLT_VAL;
hash = GLT_VAL != Glitter::FT ? hash_murmurhash_empty : hash_fnv1a64m_empty;
}
FileReader::FileReader(GLT, const char* path, const char* file, float_t emission)
: effect_group(), load_count(), obj_db(), tex_db() {
: file_handler(), farc(), effect_group(), load_count(), state(), init_scene(), obj_db(), tex_db() {
this->path = path ? path
: (GLT_VAL != Glitter::FT ? "root+/particle/" : "rom/particle/");
this->file = file;
@@ -30,7 +30,7 @@ namespace Glitter {
}
FileReader::FileReader(GLT, const wchar_t* path, const wchar_t* file, float_t emission)
: effect_group(), load_count(), obj_db(), tex_db() {
: file_handler(), farc(), effect_group(), load_count(), state(), init_scene(), obj_db(), tex_db() {
char* path_temp = utf16_to_utf8(path);
char* file_temp = utf16_to_utf8(file);
this->path = path_temp ? path_temp
+1 -1
View File
@@ -372,7 +372,7 @@ const void* p_file_handler::get_data() {
return ptr->data;
}
ssize_t p_file_handler::get_size() {
size_t p_file_handler::get_size() {
if (!ptr || ptr->not_ready || ptr->size < 0)
return 0;
return ptr->size;
+2 -2
View File
@@ -31,7 +31,7 @@ struct file_handler {
std::string file;
bool cache;
file_handler_callback_func callback[2];
ssize_t size;
size_t size;
void* data;
void* ds;
@@ -55,7 +55,7 @@ struct p_file_handler {
void call_free_callback();
bool check_not_ready();
const void* get_data();
ssize_t get_size();
size_t get_size();
bool read_file(void* data, const char* path);
bool read_file(void* data, const char* dir, const char* farc_file, const char* file, bool cache);
bool read_file(void* data, const char* dir, const char* file);