Some warning cleanup involving (seemlingly unintended) bool to int conversions. It seems that the original design intent was to pass down IDs to the base class JGuiObject, but certain classes broke the pattern with their constructors.
(One could argue that this ID is completely meaningless and could be entirely ripped out, as the IDs obviously never made it to their intended target...)
This commit is contained in:
@@ -28,6 +28,61 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
class JFile
|
||||
{
|
||||
public:
|
||||
|
||||
JFile();
|
||||
virtual ~JFile();
|
||||
|
||||
|
||||
virtual bool OpenFile(const string &filename);
|
||||
|
||||
virtual int ReadFile(void *buffer, int size);
|
||||
|
||||
virtual int GetFileSize();
|
||||
|
||||
virtual void CloseFile();
|
||||
|
||||
protected:
|
||||
|
||||
std::string mFilename;
|
||||
|
||||
#if defined (PSP)
|
||||
SceUID mFile;
|
||||
#else
|
||||
FILE *mFile;
|
||||
#endif
|
||||
int mFileSize;
|
||||
};
|
||||
|
||||
class JZipFile : public JFile
|
||||
{
|
||||
public:
|
||||
|
||||
JZipFile(const std::string& inZipFilename);
|
||||
virtual ~JZipFile();
|
||||
|
||||
|
||||
/*
|
||||
** Access filename within the zip.
|
||||
*/
|
||||
virtual bool OpenFile(const string &filename);
|
||||
|
||||
virtual int ReadFile(void *buffer, int size);
|
||||
|
||||
virtual int GetFileSize();
|
||||
|
||||
virtual void CloseFile();
|
||||
|
||||
private:
|
||||
|
||||
std::string mZipFilename;
|
||||
unzFile mZipFile;
|
||||
};
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
/// Interface for low level file access with ZIP archive support. All
|
||||
/// file operations in JGE are handled through this class so if a ZIP
|
||||
|
||||
Reference in New Issue
Block a user