ff7tk 0.80.25
Work with Final Fantasy 7 game data
Classes | Public Types | Static Public Member Functions | List of all members
FF7SaveInfo Class Reference

#include <FF7SaveInfo.h>

Inheritance diagram for FF7SaveInfo:
Inheritance graph
[legend]
Collaboration diagram for FF7SaveInfo:
Collaboration graph
[legend]

Public Types

enum class  FORMAT {
  UNKNOWN = -1 , PSX = 0 , PC , VMC ,
  PSP , PS3 , DEX , VGS ,
  SWITCH , PGE , PDA
}
 Supported Data Types. More...
 
enum class  PSXBLOCKTYPE : char {
  BLOCK_EMPTY = '\xA0' , BLOCK_INUSE = '\x51' , BLOCK_DELETED = '\xA1' , BLOCK_MIDLINK = '\x52' ,
  BLOCK_DELETED_MIDLINK = '\xA2' , BLOCK_ENDLINK = '\x53' , BLOCK_DELETED_ENDLINK = '\xA3'
}
 Used to set the type of block on a PSX memory card (image) when creating the index. More...
 
enum class  PSVINFO { SAVETYPE , SIZEDISPLAY , SAVESIZE }
 Extra Header Info used for PSV format. More...
 

Static Public Member Functions

static FF7SaveInfoinstance ()
 Get the FF7SaveInfo Instance. More...
 
static QObject * qmlSingletonRegister (QQmlEngine *engine, QJSEngine *scriptEngine)
 Register The FF7SaveInfo Singleton for QML. More...
 
static Q_INVOKABLE int fileSize (FF7SaveInfo::FORMAT format)
 The Size of a Final Fantasy VII Save file. More...
 
static Q_INVOKABLE int fileHeaderSize (FF7SaveInfo::FORMAT format)
 Size of the format's file header. More...
 
static Q_INVOKABLE int slotHeaderSize (FF7SaveInfo::FORMAT format)
 Size of the format's slot header. More...
 
static Q_INVOKABLE int slotFooterSize (FF7SaveInfo::FORMAT format)
 Size of the format's slot footer. More...
 
static Q_INVOKABLE int slotCount (FF7SaveInfo::FORMAT format)
 Number of save slots in format. More...
 
static Q_INVOKABLE QByteArray fileIdentifier (FF7SaveInfo::FORMAT format)
 Magic Numbers for Final Fantasy VII Save Files. More...
 
static Q_INVOKABLE QByteArray fileHeader (FF7SaveInfo::FORMAT format)
 Standard File Header for Format. More...
 
static Q_INVOKABLE QByteArray slotHeader (FF7SaveInfo::FORMAT format, int slot=0)
 Standard Slot Header for Format. More...
 
static Q_INVOKABLE QByteArray slotFooter (FF7SaveInfo::FORMAT format)
 Standard Slot Footer for Format. More...
 
static Q_INVOKABLE QByteArray signingKey (FF7SaveInfo::FORMAT format)
 Key Used to Sign The Format. More...
 
static Q_INVOKABLE int extraPSVOffsets (FF7SaveInfo::PSVINFO info)
 Extra off set data for psv format. More...
 
static Q_INVOKABLE QByteArray signingIV (FF7SaveInfo::FORMAT format)
 IV Used to Sign The Format. More...
 
static Q_INVOKABLE int fileSeedOffset (FF7SaveInfo::FORMAT format)
 The offset for the seed for signed saves. More...
 
static Q_INVOKABLE int fileSignatureOffset (FF7SaveInfo::FORMAT format)
 The offset for the signature for signed saves. More...
 
static Q_INVOKABLE int fileSignatureSize (FF7SaveInfo::FORMAT format)
 The size for the signature for signed saves. More...
 
static Q_INVOKABLE QString typeDescription (FF7SaveInfo::FORMAT format)
 Description of the File type. More...
 
static Q_INVOKABLE int slotSize ()
 Size of an FF7Slot. More...
 
static Q_INVOKABLE QRegularExpression validNames (FF7SaveInfo::FORMAT format)
 Get a constructed RegularExpression to check for valid save name. More...
 
static Q_INVOKABLE QStringList typeExtension (FF7SaveInfo::FORMAT format)
 Valid Extensions for the File type. More...
 
static Q_INVOKABLE QString typeFilter (FF7SaveInfo::FORMAT format)
 Get a constructed filter string for use in save/ load dialogs. More...
 
static Q_INVOKABLE QString knownTypesFilter ()
 Get a constructed filter string for use in save/load Dialogs. More...
 
static Q_INVOKABLE bool isTypePC (FF7SaveInfo::FORMAT format)
 Check if a format is using the PC format internally. More...
 
static Q_INVOKABLE bool isTypeVMC (FF7SaveInfo::FORMAT format)
 Check if a format is a Virtual Memory card. More...
 
static Q_INVOKABLE bool isTypeSSS (FF7SaveInfo::FORMAT format)
 Check if a format is a SingleSlot Save. More...
 
static Q_INVOKABLE int vmcHeaderOffset (FF7SaveInfo::FORMAT format)
 mcHeaderOffset Retuns the offset of the vmc header. Valid only for VMC types saves. More...
 
static Q_INVOKABLE int psxSaveNameOffset (FF7SaveInfo::FORMAT format)
 psxSaveNameOffset Return the offset where the psxSaveName starts. Valid only for PS3, PGE and PDA save formats. More...
 

Member Enumeration Documentation

◆ FORMAT

enum class FF7SaveInfo::FORMAT
strong

Supported Data Types.

Enumerator
UNKNOWN 

UNKNOWN FORMAT.

PSX 

PSX Save Data.

PC 

PC Save Format.

VMC 

Virtual Memory Card.

PSP 

PSP Save Format.

PS3 

PS3 Save Format.

DEX 

Dex Format.

VGS 

VGS Format.

SWITCH 

Switch Format.

PGE 

Psx Game Edit Style Single Save.

PDA 

GS , Dantel Style Save.

◆ PSVINFO

enum class FF7SaveInfo::PSVINFO
strong

Extra Header Info used for PSV format.

Enumerator
SAVETYPE 

Type of Save in the file, 0x14 for ps1 0x2C for ps2

SIZEDISPLAY 

Size shown in XMB 4 bytes 00 20 00 00

SAVESIZE 

Size of save data 4 bytes match SIZEDISPLAY's value

◆ PSXBLOCKTYPE

enum class FF7SaveInfo::PSXBLOCKTYPE : char
strong

Used to set the type of block on a PSX memory card (image) when creating the index.

Enumerator
BLOCK_EMPTY 

0xA0

BLOCK_INUSE 

0x51

BLOCK_DELETED 

0xA1

BLOCK_MIDLINK 

0x52

BLOCK_DELETED_MIDLINK 

0xA2

BLOCK_ENDLINK 

0x53

BLOCK_DELETED_ENDLINK 

0xA3

Member Function Documentation

◆ extraPSVOffsets()

int FF7SaveInfo::extraPSVOffsets ( FF7SaveInfo::PSVINFO  info)
static

Extra off set data for psv format.

Parameters
infoFF7SaveInfo::PSVINFO that describes the info type to return.
Returns
offset for the type of info requested

◆ fileHeader()

QByteArray FF7SaveInfo::fileHeader ( FF7SaveInfo::FORMAT  format)
static

Standard File Header for Format.

Parameters
format
Returns
A Default File header

◆ fileHeaderSize()

int FF7SaveInfo::fileHeaderSize ( FF7SaveInfo::FORMAT  format)
static

Size of the format's file header.

Parameters
format: The Save Format you wish to know about
Returns
size of File Header

◆ fileIdentifier()

QByteArray FF7SaveInfo::fileIdentifier ( FF7SaveInfo::FORMAT  format)
static

Magic Numbers for Final Fantasy VII Save Files.

Parameters
format: The Save Format
Returns
Magic Numbers for this file type

◆ fileSeedOffset()

int FF7SaveInfo::fileSeedOffset ( FF7SaveInfo::FORMAT  format)
static

The offset for the seed for signed saves.

Parameters
format
Returns
offset of the seed or -1 if none

◆ fileSignatureOffset()

int FF7SaveInfo::fileSignatureOffset ( FF7SaveInfo::FORMAT  format)
static

The offset for the signature for signed saves.

Parameters
format
Returns
offset of the signature or -1 if none

◆ fileSignatureSize()

int FF7SaveInfo::fileSignatureSize ( FF7SaveInfo::FORMAT  format)
static

The size for the signature for signed saves.

Parameters
format
Returns
size of the signature

◆ fileSize()

int FF7SaveInfo::fileSize ( FF7SaveInfo::FORMAT  format)
static

The Size of a Final Fantasy VII Save file.

Parameters
format: The Save Format you wish to know about
Returns
size of Filetype

◆ instance()

FF7SaveInfo * FF7SaveInfo::instance ( )
static

Get the FF7SaveInfo Instance.

See also
qmlSingletonRegister()

◆ isTypePC()

bool FF7SaveInfo::isTypePC ( FF7SaveInfo::FORMAT  format)
static

Check if a format is using the PC format internally.

Parameters
format- Format to check
Returns
True if format is uses PC format internally

◆ isTypeSSS()

bool FF7SaveInfo::isTypeSSS ( FF7SaveInfo::FORMAT  format)
static

Check if a format is a SingleSlot Save.

Parameters
format- Format to check
Returns
True if format is a a SingleSlot Save Type. (PSX, PDA, PGE + PSV)

◆ isTypeVMC()

bool FF7SaveInfo::isTypeVMC ( FF7SaveInfo::FORMAT  format)
static

Check if a format is a Virtual Memory card.

Parameters
format- Format to check
Returns
True if format is a Virtual Memory card type.

◆ knownTypesFilter()

QString FF7SaveInfo::knownTypesFilter ( )
static

Get a constructed filter string for use in save/load Dialogs.

Returns
Constructed Filter string

◆ psxSaveNameOffset()

int FF7SaveInfo::psxSaveNameOffset ( FF7SaveInfo::FORMAT  format)
static

psxSaveNameOffset Return the offset where the psxSaveName starts. Valid only for PS3, PGE and PDA save formats.

Parameters
format- Format to check
Returns
Offset where the psxSaveNameOffset is or -1 if invalid format provided.

◆ qmlSingletonRegister()

QObject * FF7SaveInfo::qmlSingletonRegister ( QQmlEngine *  engine,
QJSEngine *  scriptEngine 
)
static

Register The FF7SaveInfo Singleton for QML.

◆ signingIV()

QByteArray FF7SaveInfo::signingIV ( FF7SaveInfo::FORMAT  format)
static

IV Used to Sign The Format.

Parameters
format
Returns
The IV used to sign the format or an QByteArray() if none.

◆ signingKey()

QByteArray FF7SaveInfo::signingKey ( FF7SaveInfo::FORMAT  format)
static

Key Used to Sign The Format.

Parameters
format
Returns
The Key used to sign the format or an QByteArray() if none.

◆ slotCount()

int FF7SaveInfo::slotCount ( FF7SaveInfo::FORMAT  format)
static

Number of save slots in format.

Parameters
format: The Save Format you wish to know about
Returns
number of save slots in format.

◆ slotFooter()

QByteArray FF7SaveInfo::slotFooter ( FF7SaveInfo::FORMAT  format)
static

Standard Slot Footer for Format.

Parameters
format
Returns
A Default File footer

◆ slotFooterSize()

int FF7SaveInfo::slotFooterSize ( FF7SaveInfo::FORMAT  format)
static

Size of the format's slot footer.

Parameters
format: The Save Format you wish to know about
Returns
size of slotFooter

◆ slotHeader()

QByteArray FF7SaveInfo::slotHeader ( FF7SaveInfo::FORMAT  format,
int  slot = 0 
)
static

Standard Slot Header for Format.

Parameters
format
slotthe slot value to use (PSX ICON)
Returns
A Default File header

◆ slotHeaderSize()

int FF7SaveInfo::slotHeaderSize ( FF7SaveInfo::FORMAT  format)
static

Size of the format's slot header.

Parameters
format: The Save Format you wish to know about
Returns
size of slotHeader

◆ slotSize()

int FF7SaveInfo::slotSize ( )
static

Size of an FF7Slot.

Returns
size of 0X10F4

◆ typeDescription()

QString FF7SaveInfo::typeDescription ( FF7SaveInfo::FORMAT  format)
static

Description of the File type.

Parameters
format
Returns
Description of format

◆ typeExtension()

QStringList FF7SaveInfo::typeExtension ( FF7SaveInfo::FORMAT  format)
static

Valid Extensions for the File type.

Parameters
format
Returns
List of valid Extensions for the chosen format.

◆ typeFilter()

QString FF7SaveInfo::typeFilter ( FF7SaveInfo::FORMAT  format)
static

Get a constructed filter string for use in save/ load dialogs.

Parameters
formatthe format you want info about
Returns
Constructed Filter string for chosen format or All Files for UNKNOWN TYPE

◆ validNames()

QRegularExpression FF7SaveInfo::validNames ( FF7SaveInfo::FORMAT  format)
static

Get a constructed RegularExpression to check for valid save name.

Parameters
formatthe format you wish to check .
Returns
Constructed RegularExpression

◆ vmcHeaderOffset()

int FF7SaveInfo::vmcHeaderOffset ( FF7SaveInfo::FORMAT  format)
static

mcHeaderOffset Retuns the offset of the vmc header. Valid only for VMC types saves.

Parameters
format- Format to check
Returns
Offset where the Vmc header starts or -1 if invalid format provided.

The documentation for this class was generated from the following files: