Initial commit of Dink Smallwood HD source. See the "Programmer readme.txt" for information on how to set it up.
git-svn-id: svn://rtsoft.com/rtsvn/projects/RTDink@1469 353e56fe-9613-0410-8469-b96ad8e6f29c
This commit is contained in:
parent
dfbc2348a5
commit
d4f66a5d2e
115 changed files with 37737 additions and 0 deletions
60
source/dink/FFReader.h
Normal file
60
source/dink/FFReader.h
Normal file
|
@ -0,0 +1,60 @@
|
|||
// ***************************************************************
|
||||
// FFReader - Creation date: 12/31/2009
|
||||
// -------------------------------------------------------------
|
||||
// Robinson Technologies Copyright (C) 2009 - All Rights Reserved
|
||||
//
|
||||
// ***************************************************************
|
||||
// Programmer(s): Seth A. Robinson (seth@rtsoft.com)
|
||||
// ***************************************************************
|
||||
|
||||
#ifndef FFReader_h__
|
||||
#define FFReader_h__
|
||||
|
||||
#include "BaseApp.h"
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct FFFileInfo
|
||||
{
|
||||
int offset;
|
||||
char name[13];
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
class FFReader
|
||||
{
|
||||
public:
|
||||
enum eErrorType
|
||||
{
|
||||
ERROR_NONE,
|
||||
ERROR_LOW_MEM
|
||||
};
|
||||
|
||||
|
||||
FFReader();
|
||||
virtual ~FFReader();
|
||||
|
||||
bool DoesFileExist(const string &fName);
|
||||
void Init( const string &gamePath, const string &dmodGamePath, const string &baseDir, bool bUsingDinkPak);
|
||||
byte * LoadFileIntoMemory(string const &fName, int *pSizeout); //you need to delete [] what this gives you on your own
|
||||
eErrorType GetLastError() {return m_error;}
|
||||
|
||||
private:
|
||||
|
||||
void Kill();
|
||||
int GetFFRecordIndexFromFileName(const string &fName);
|
||||
byte * LoadFFIntoMemory(int index, int *pSizeOut);
|
||||
int GetNextFFIndex(int index);
|
||||
void SetError(eErrorType error);
|
||||
string m_gamePath;
|
||||
string m_dmodGamePath;
|
||||
string m_basePath;
|
||||
FILE *m_fp;
|
||||
bool m_bUsingBaseDinkFF;
|
||||
eErrorType m_error;
|
||||
string m_dmodBasePath;
|
||||
|
||||
vector<FFFileInfo> m_fileHeader;
|
||||
|
||||
};
|
||||
|
||||
#endif // FFReader_h__
|
Loading…
Add table
Add a link
Reference in a new issue