ff7tk  0.02
Toolkit for making FF7 Tools
FF7Char Class Reference

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

#include <FF7Char.h>

Public Types

enum  FF7CharId {
  Cloud, Barret, Tifa, Aerith,
  Red, Yuffie, CaitSith, Vincent,
  Cid, YoungCloud, Sephiroth, Empty =0xFF
}
 
enum  FF7CharStatus { Sadness =0x10, Fury = 0x20, BackRow = 0xFE, FrontRow =0xFF }
 
enum  CharSpecial { EmptyArmor =0xFF, EmptyAccessory =0xFF }
 

Public Member Functions

 FF7Char ()
 
quint8 id (int who)
 get id value for Character More...
 
int numberOfWeapons (int who)
 number of weapons for a Character More...
 
int weaponStartingId (int who)
 find what item id is the first weapon for a Character More...
 
int weaponOffset (int who)
 find what weapon number is the first weapon for a Character More...
 
QString defaultName (int who)
 default name for a character More...
 
QImage image (int who)
 Menu icon for a character. More...
 
QIcon icon (int who)
 Menu icon for a character. More...
 
QPixmap pixmap (int who)
 Menu icon for a character. More...
 
QStringList limits (int who)
 Limit list for a character. More...
 
quint32 totalExpForLevel (int who, int level)
 Exp needed to reach a level. More...
 
quint32 tnlForLevel (int who, int level)
 experance needed to level up More...
 
int statGain (int who, int stat, int stat_amount, int current_lvl, int next_lvl)
 how much to increase stat on level up More...
 

Private Member Functions

quint8 stat_grade (int who, int stat)
 characters grade in a stat More...
 
int mp_base (int who, int lvl_bracket)
 characters base mp for set of levels More...
 
quint8 mp_gradent (int who, int lvl_bracket)
 characters mp gradent for set of levels More...
 
int hp_base (int who, int lvl_bracket)
 characters base hp for set of levels More...
 
quint8 hp_gradent (int who, int lvl_bracket)
 characters mp gradent for set of levels More...
 
int luck_base (int who, int lvl_bracket)
 characters base luck for set of levels More...
 
quint8 luck_gradent (int who, int lvl_bracket)
 characters luck gradent for set of levels More...
 
quint8 stat_base (int rank, int lvl_bracket)
 base stat for rank in a set of levels More...
 
quint8 stat_gradent (int rank, int lvl_bracket)
 characters mp gradent for set of levels More...
 

Detailed Description

Data and Enums for Characters in Final Fantasy 7.

Definition at line 28 of file FF7Char.h.

Member Enumeration Documentation

Enumerator
EmptyArmor 

0xFF

EmptyAccessory 

0xFF

Definition at line 40 of file FF7Char.h.

Enumerator
Cloud 

0

Barret 

1

Tifa 

2

Aerith 

3

Red 

4

Yuffie 

5

CaitSith 

6

Vincent 

7

Cid 

8

YoungCloud 

9

Sephiroth 

10

Empty 

0xFF

Definition at line 32 of file FF7Char.h.

Enumerator
Sadness 

0x10

Fury 

0x20

BackRow 

0xFE

FrontRow 

0xFF

Definition at line 33 of file FF7Char.h.

Constructor & Destructor Documentation

FF7Char::FF7Char ( )
explicit

Definition at line 20 of file FF7Char.cpp.

Member Function Documentation

QString FF7Char::defaultName ( int  who)

default name for a character

Parameters
whoCharacters id number
Returns
Translated default name for character

Definition at line 40 of file FF7Char.cpp.

References Chars.

Referenced by CharEditor::init_display(), and CharManager::initDisplay().

int FF7Char::hp_base ( int  who,
int  lvl_bracket 
)
private

characters base hp for set of levels

Parameters
whoCharacters id number
lvl_bracketbracket the level falls in (0: lvl 0-9 . 1: 10-19. etc..)
Returns
characters base hp for that bracket

Definition at line 33 of file FF7Char.cpp.

References Character::_hp_base, and Chars.

Referenced by statGain().

quint8 FF7Char::hp_gradent ( int  who,
int  lvl_bracket 
)
private

characters mp gradent for set of levels

Parameters
whoCharacters id number
lvl_bracketbracket the level falls in (0: lvl 0-9 . 1: 10-19. etc..)
Returns
characters mp gradent for bracket

Definition at line 34 of file FF7Char.cpp.

References Character::_hp_gradent, and Chars.

Referenced by statGain().

QIcon FF7Char::icon ( int  who)

Menu icon for a character.

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

Definition at line 27 of file FF7Char.cpp.

References pixmap().

Referenced by CharEditor::init_display(), and CharManager::initDisplay().

quint8 FF7Char::id ( int  who)

get id value for Character

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

Definition at line 21 of file FF7Char.cpp.

References Character::_id, and Chars.

QImage FF7Char::image ( int  who)

Menu icon for a character.

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

Definition at line 26 of file FF7Char.cpp.

References Chars.

QStringList FF7Char::limits ( int  who)

Limit list for a character.

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

Definition at line 42 of file FF7Char.cpp.

References Character::_limits, and Chars.

Referenced by CharEditor::setChar().

int FF7Char::luck_base ( int  who,
int  lvl_bracket 
)
private

characters base luck for set of levels

Parameters
whoCharacters id number
lvl_bracketbracket the level falls in (0: lvl 0-9 . 1: 10-19. etc..)
Returns
characters base luck for that bracket

Definition at line 35 of file FF7Char.cpp.

References Character::_luck_base, and Chars.

Referenced by statGain().

quint8 FF7Char::luck_gradent ( int  who,
int  lvl_bracket 
)
private

characters luck gradent for set of levels

Parameters
whoCharacters id number
lvl_bracketbracket the level falls in (0: lvl 0-9 . 1: 10-19. etc..)
Returns
characters luck gradent for bracket

Definition at line 36 of file FF7Char.cpp.

References Character::_luck_gradent, and Chars.

Referenced by statGain().

int FF7Char::mp_base ( int  who,
int  lvl_bracket 
)
private

characters base mp for set of levels

Parameters
whoCharacters id number
lvl_bracketbracket the level falls in (0: lvl 0-9 . 1: 10-19. etc..)
Returns
characters base mp for that bracket

Definition at line 31 of file FF7Char.cpp.

References Character::_mp_base, and Chars.

Referenced by statGain().

quint8 FF7Char::mp_gradent ( int  who,
int  lvl_bracket 
)
private

characters mp gradent for set of levels

Parameters
whoCharacters id number
lvl_bracketbracket the level falls in (0: lvl 0-9 . 1: 10-19. etc..)
Returns
characters mp gradent for bracket

Definition at line 32 of file FF7Char.cpp.

References Character::_mp_gradent, and Chars.

Referenced by statGain().

int FF7Char::numberOfWeapons ( int  who)

number of weapons for a Character

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

Definition at line 24 of file FF7Char.cpp.

References Character::_num_weapons, and Chars.

Referenced by CharEditor::MaxEquip(), CharEditor::setChar(), and CharEditor::setWeapon().

QPixmap FF7Char::pixmap ( int  who)

Menu icon for a character.

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

Definition at line 25 of file FF7Char.cpp.

References Chars.

Referenced by icon(), CharEditor::setChar(), and SlotSelect::setSlotPreview().

quint8 FF7Char::stat_base ( int  rank,
int  lvl_bracket 
)
private

base stat for rank in a set of levels

Parameters
rankRank character is at start (grade)
lvl_bracketbracket the level falls in (0: lvl 0-9 . 1: 10-19. etc..)
Returns
base stat for that bracket

Definition at line 37 of file FF7Char.cpp.

References _stat_base.

Referenced by statGain().

quint8 FF7Char::stat_grade ( int  who,
int  stat 
)
private

characters grade in a stat

Parameters
whoCharacters id number
statStat you want to get grade for (stat: 0 str, 1 vit, 2 mag, 3 spi, 4 dex, 5 luck,6 hp,7mp)
Returns
characters grade in a stat

Definition at line 30 of file FF7Char.cpp.

References Character::_stat_grade, and Chars.

Referenced by statGain().

quint8 FF7Char::stat_gradent ( int  rank,
int  lvl_bracket 
)
private

characters mp gradent for set of levels

Parameters
rankRank character is at start (grade)
lvl_bracketbracket the level falls in (0: lvl 0-9 . 1: 10-19. etc..)
Returns
stat gradent for bracket

Definition at line 38 of file FF7Char.cpp.

References _stat_gradent.

Referenced by statGain().

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

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.

Definition at line 52 of file FF7Char.cpp.

References hp_base(), hp_gradent(), luck_base(), luck_gradent(), mp_base(), mp_gradent(), stat_base(), stat_grade(), and stat_gradent().

Referenced by CharEditor::level_up().

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

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)

Definition at line 29 of file FF7Char.cpp.

References Character::_chartnls, and Chars.

Referenced by CharEditor::update_tnl_bar().

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

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)

Definition at line 28 of file FF7Char.cpp.

References Character::_charlvls, and Chars.

Referenced by CharEditor::Exp_Changed(), CharEditor::Level_Changed(), and CharEditor::update_tnl_bar().

int FF7Char::weaponOffset ( int  who)

find what weapon number is the first weapon for a Character

Parameters
whoCharacters id number
Returns
Weapon number of characters first weapon

Definition at line 23 of file FF7Char.cpp.

References Character::_weapon_offset, and Chars.

Referenced by CharEditor::setChar(), and CharEditor::setWeapon().

int FF7Char::weaponStartingId ( int  who)

find what item id is the first weapon for a Character

Parameters
whoCharacters id number
Returns
Item Id of characters first weapon

Definition at line 22 of file FF7Char.cpp.

References Character::_starting_weapon_id, and Chars.

Referenced by CharEditor::setChar().


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