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:
wrenczes@gmail.com
2011-06-02 05:33:45 +00:00
parent dcfbff6216
commit a06558be55
6 changed files with 207 additions and 12 deletions

View File

@@ -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