J :
* Update for linux support.
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
// JGE++ is a hardware accelerated 2D game SDK for PSP/Windows.
|
||||
//
|
||||
// Licensed under the BSD license, see LICENSE in JGE root for details.
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2007 James Hui (a.k.a. Dr.Watson) <jhkhui@gmail.com>
|
||||
//
|
||||
//
|
||||
//-------------------------------------------------------------------------------------
|
||||
|
||||
#ifndef _FILE_SYSTEM_H_
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#ifdef WIN32
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
|
||||
#else
|
||||
#include <pspiofilemgr.h>
|
||||
@@ -47,58 +47,58 @@ public:
|
||||
|
||||
static void Destroy();
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
/// Attach ZIP archive to the file system.
|
||||
///
|
||||
/// @param zipfile - Name of ZIP archive.
|
||||
/// @param password - Password for the ZIP archive. Default is NULL.
|
||||
///
|
||||
///
|
||||
/// @return Status of the attach operation.
|
||||
///
|
||||
///
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool AttachZipFile(const string &zipfile, char *password = NULL);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
/// Release the attached ZIP archive.
|
||||
///
|
||||
///
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void DetachZipFile();
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
/// Open file for reading.
|
||||
///
|
||||
///
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool OpenFile(const string &filename);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
/// Read data from file.
|
||||
///
|
||||
///
|
||||
/// @param buffer - Buffer for reading.
|
||||
/// @param size - Number of bytes to read.
|
||||
///
|
||||
///
|
||||
/// @return Number of bytes read.
|
||||
///
|
||||
///
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
int ReadFile(void *buffer, int size);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
/// Get size of file.
|
||||
///
|
||||
///
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
int GetFileSize();
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
/// Close file.
|
||||
///
|
||||
///
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CloseFile();
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
/// Set root for all the following file operations
|
||||
///
|
||||
///
|
||||
/// @resourceRoot - New root.
|
||||
///
|
||||
///
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void SetResourceRoot(const string& resourceRoot);
|
||||
|
||||
@@ -113,7 +113,7 @@ private:
|
||||
string mZipFileName;
|
||||
char *mPassword;
|
||||
bool mZipAvailable;
|
||||
#ifdef WIN32
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
FILE *mFile;
|
||||
#else
|
||||
SceUID mFile;
|
||||
|
||||
Reference in New Issue
Block a user