mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
*** empty log message ***
This commit is contained in:
parent
fc195e2da5
commit
0eb216f274
15
panda/src/downloader/decompressor.I
Normal file
15
panda/src/downloader/decompressor.I
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
// Filename: decompressor.I
|
||||||
|
// Created by: mike (09Jan97)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: Decompressor::get_progress
|
||||||
|
// Access: Public
|
||||||
|
// Description:
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
INLINE float Decompressor::
|
||||||
|
get_progress(void) const {
|
||||||
|
nassertr(_source_file_length > 0, 0.0);
|
||||||
|
return ((float)_total_bytes_read / (float)_source_file_length);
|
||||||
|
}
|
@ -39,6 +39,8 @@ PUBLISHED:
|
|||||||
|
|
||||||
bool decompress(Filename &source_file);
|
bool decompress(Filename &source_file);
|
||||||
|
|
||||||
|
INLINE float get_progress(void) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void init(PT(Buffer) buffer);
|
void init(PT(Buffer) buffer);
|
||||||
|
|
||||||
@ -57,4 +59,6 @@ private:
|
|||||||
ZDecompressor *_decompressor;
|
ZDecompressor *_decompressor;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#include "decompressor.I"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
15
panda/src/downloader/extractor.I
Normal file
15
panda/src/downloader/extractor.I
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
// Filename: extractor.I
|
||||||
|
// Created by: mike (09Jan97)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: Extractor::get_progress
|
||||||
|
// Access: Public
|
||||||
|
// Description:
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
INLINE float Extractor::
|
||||||
|
get_progress(void) const {
|
||||||
|
nassertr(_source_file_length > 0, 0.0);
|
||||||
|
return ((float)_total_bytes_read / (float)_source_file_length);
|
||||||
|
}
|
@ -37,6 +37,8 @@ PUBLISHED:
|
|||||||
|
|
||||||
bool extract(Filename &source_file, const Filename &rel_path = "");
|
bool extract(Filename &source_file, const Filename &rel_path = "");
|
||||||
|
|
||||||
|
INLINE float get_progress(void) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void init(PT(Buffer) buffer);
|
void init(PT(Buffer) buffer);
|
||||||
|
|
||||||
@ -53,4 +55,6 @@ private:
|
|||||||
Filename _rel_path;
|
Filename _rel_path;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#include "extractor.I"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user