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

Data and Enums for Characters in Final Fantasy 7. More...

#include <FF7Char.h>

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

Public Types

enum  CharacterId {
  Cloud, Barret, Tifa, Aerith,
  Red, Yuffie, CaitSith, Vincent,
  Cid, YoungCloud, Sephiroth, Chocobo,
  Empty = 0xFF
}
 
enum  CharacterStatus { Normal = 0, Sadness = 0x10, Fury = 0x20 }
 
enum  CharacterRow { BackRow = 0xFE, FrontRow = 0xFF }
 
enum  CharacterSpecial { EmptyArmor = 0xFF, EmptyAccessory = 0xFF }
 

Static Public Member Functions

static FF7Charget ()
 Get the FF7Char Instance. More...
 
static Q_INVOKABLE quint8 id (int who)
 get id value for Character More...
 
static int totalCharacters ()
 
static Q_INVOKABLE bool validID (int id)
 validID More...
 
static Q_INVOKABLE int numberOfWeapons (int who)
 number of weapons for a Character More...
 
static Q_INVOKABLE int weaponStartingId (int who)
 find what item id is the first weapon for a Character More...
 
static Q_INVOKABLE int weaponOffset (int who)
 find what weapon number is the first weapon for a Character More...
 
static Q_INVOKABLE QString defaultName (int who)
 default name for a character More...
 
static QImage image (int who)
 Menu icon for a character. More...
 
static QIcon icon (int who)
 Menu icon for a character. More...
 
static QPixmap pixmap (int who)
 Menu icon for a character. More...
 
static Q_INVOKABLE QStringList limits (int who)
 Limit list for a character. More...
 
static Q_INVOKABLE quint32 totalExpForLevel (int who, int level)
 Exp needed to reach a level. More...
 
static Q_INVOKABLE quint32 tnlForLevel (int who, int level)
 experance needed to level up More...
 
static Q_INVOKABLE int statGain (int who, int stat, int stat_amount, int current_lvl, int next_lvl)
 how much to increase stat on level up More...
 
static Q_INVOKABLE int limitBitConvert (int bit)
 convert bit to limit offset More...
 
static Q_INVOKABLE QByteArray toByteArray (FF7CHAR ff7char)
 Convert a FF7CHAR to QByteArray. More...
 
static Q_INVOKABLE FF7CHAR fromByteArray (const QByteArray &ba)
 Convert a QByteArray to FF7CHAR. More...
 

Detailed Description

Data and Enums for Characters in Final Fantasy 7.

Member Enumeration Documentation

◆ CharacterId

Enumerator
Cloud 

0

Barret 

1

Tifa 

2

Aerith 

3

Red 

4

Yuffie 

5

CaitSith 

6

Vincent 

7

Cid 

8

YoungCloud 

9

Sephiroth 

10

Chocobo 

11

Empty 

0xFF

◆ CharacterRow

Enumerator
BackRow 

0xFE

FrontRow 

0xFF

◆ CharacterSpecial

Enumerator
EmptyArmor 

0xFF

EmptyAccessory 

0xFF

◆ CharacterStatus

Enumerator
Normal 

0x00

Sadness 

0x10

Fury 

0x20

Member Function Documentation

◆ defaultName()

QString FF7Char::defaultName ( int  who)
static

default name for a character

Parameters
whoCharacters id number
Returns
Translated default name for character

◆ fromByteArray()

FF7CHAR FF7Char::fromByteArray ( const QByteArray &  ba)
static

Convert a QByteArray to FF7CHAR.

Parameters
bathe QByteArray to convet
Returns
FF7Char
See also
toByteArray()

◆ get()

FF7Char * FF7Char::get ( )
static

Get the FF7Char Instance.

◆ icon()

QIcon FF7Char::icon ( int  who)
static

Menu icon for a character.

Parameters
whoCharacters id number
Returns
QIcon of a characters menu icon
See also
image(),pixmap()

◆ id()

quint8 FF7Char::id ( int  who)
static

get id value for Character

Parameters
whopersons id (they are almost always the same in stock game)
Returns
Chars[who].id

◆ image()

QImage FF7Char::image ( int  who)
static

Menu icon for a character.

Parameters
whoCharacters id number
Returns
QImage of a characters menu icon
See also
icon(),pixmap()

◆ limitBitConvert()

int FF7Char::limitBitConvert ( int  bit)
static

convert bit to limit offset

Parameters
bitto convert
Returns
limit offset to change

◆ limits()

QStringList FF7Char::limits ( int  who)
static

Limit list for a character.

Parameters
whoCharacters id number
Returns
QStringList of Translated names for each limit break

◆ numberOfWeapons()

int FF7Char::numberOfWeapons ( int  who)
static

number of weapons for a Character

Parameters
whoCharacters id number
Returns
Number of Weapons for the given character

◆ pixmap()

QPixmap FF7Char::pixmap ( int  who)
static

Menu icon for a character.

Parameters
whoCharacters id number
Returns
QPixmap of a characters menu icon
See also
icon(),image()

◆ statGain()

int FF7Char::statGain ( int  who,
int  stat,
int  stat_amount,
int  current_lvl,
int  next_lvl 
)
static

how much to increase stat on level up

Parameters
whoCharacters id number
statStat you want to gain a point in (stat: 0 str, 1 vit, 2 mag, 3 spi, 4 dex, 5 luck,6 hp,7mp)
stat_amountcurrent value for that stat
current_lvlcharacters current level
next_lvllevel the character is becoming
Returns
how many points to be put in stat.

◆ tnlForLevel()

quint32 FF7Char::tnlForLevel ( int  who,
int  level 
)
static

experance needed to level up

Parameters
whoCharacters id number
levelLevel you are trying to reach
Returns
Exp needed to reach the next level. (i.e from 9 to 10 you need 50 exp)

◆ toByteArray()

QByteArray FF7Char::toByteArray ( FF7CHAR  ff7char)
static

Convert a FF7CHAR to QByteArray.

Parameters
ff7charthe FF7CHAR to convet
Returns
QByteArray
See also
fromByteArray()

◆ totalCharacters()

static int FF7Char::totalCharacters ( )
inlinestatic

◆ totalExpForLevel()

quint32 FF7Char::totalExpForLevel ( int  who,
int  level 
)
static

Exp needed to reach a level.

Parameters
whoCharacters id number
levelLevel you want to reach
Returns
Total amount of Exp needed to reach level (ex. to reach level 99 you need 20000000 xp)

◆ validID()

bool FF7Char::validID ( int  id)
static

validID

Parameters
id-ID to check
Returns
True if ID is valid

◆ weaponOffset()

int FF7Char::weaponOffset ( int  who)
static

find what weapon number is the first weapon for a Character

Parameters
whoCharacters id number
Returns
Weapon number of characters first weapon

◆ weaponStartingId()

int FF7Char::weaponStartingId ( int  who)
static

find what item id is the first weapon for a Character

Parameters
whoCharacters id number
Returns
Item Id of characters first weapon

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