Browse Source

NUM_CLASSES

pull/872/head
pionere 6 years ago committed by Anders Jenbo
parent
commit
ba1f473e34
  1. 24
      Source/player.cpp
  2. 20
      Source/player.h

24
Source/player.cpp

@ -45,38 +45,38 @@ int plrxoff2[9] = { 0, 1, 0, 1, 2, 0, 1, 2, 2 };
/** Specifies the Y-coordinate delta from a player, used for instanced when casting resurrect. */ /** Specifies the Y-coordinate delta from a player, used for instanced when casting resurrect. */
int plryoff2[9] = { 0, 0, 1, 1, 0, 2, 2, 1, 2 }; int plryoff2[9] = { 0, 0, 1, 1, 0, 2, 2, 1, 2 };
/** Specifies the frame of each animation for which an action is triggered, for each player class. */ /** Specifies the frame of each animation for which an action is triggered, for each player class. */
char PlrGFXAnimLens[][11] = { char PlrGFXAnimLens[NUM_CLASSES][11] = {
{ 10, 16, 8, 2, 20, 20, 6, 20, 8, 9, 14 }, { 10, 16, 8, 2, 20, 20, 6, 20, 8, 9, 14 },
{ 8, 18, 8, 4, 20, 16, 7, 20, 8, 10, 12 }, { 8, 18, 8, 4, 20, 16, 7, 20, 8, 10, 12 },
{ 8, 16, 8, 6, 20, 12, 8, 20, 8, 12, 8 }, { 8, 16, 8, 6, 20, 12, 8, 20, 8, 12, 8 },
}; };
/** Maps from player class to player velocity. */ /** Maps from player class to player velocity. */
int PWVel[3][3] = { int PWVel[NUM_CLASSES][3] = {
{ 2048, 1024, 512 }, { 2048, 1024, 512 },
{ 2048, 1024, 512 }, { 2048, 1024, 512 },
{ 2048, 1024, 512 } { 2048, 1024, 512 }
}; };
/** Total number of frames in walk animation. */ /** Total number of frames in walk animation. */
int AnimLenFromClass[3] = { int AnimLenFromClass[NUM_CLASSES] = {
8, 8, 8 8, 8, 8
}; };
/** Maps from player_class to starting stat in strength. */ /** Maps from player_class to starting stat in strength. */
int StrengthTbl[3] = { 30, 20, 15 }; int StrengthTbl[NUM_CLASSES] = { 30, 20, 15 };
/** Maps from player_class to starting stat in magic. */ /** Maps from player_class to starting stat in magic. */
int MagicTbl[3] = { 10, 15, 35 }; int MagicTbl[NUM_CLASSES] = { 10, 15, 35 };
/** Maps from player_class to starting stat in dexterity. */ /** Maps from player_class to starting stat in dexterity. */
int DexterityTbl[3] = { 20, 30, 15 }; int DexterityTbl[NUM_CLASSES] = { 20, 30, 15 };
/** Maps from player_class to starting stat in vitality. */ /** Maps from player_class to starting stat in vitality. */
int VitalityTbl[3] = { 25, 20, 20 }; int VitalityTbl[NUM_CLASSES] = { 25, 20, 20 };
/** Specifies the chance to block bonus of each player class.*/ /** Specifies the chance to block bonus of each player class.*/
int ToBlkTbl[3] = { 30, 20, 10 }; int ToBlkTbl[NUM_CLASSES] = { 30, 20, 10 };
char *ClassStrTblOld[] = { char *ClassStrTblOld[] = {
"Warrior", "Warrior",
"Rogue", "Rogue",
"Sorceror", "Sorceror",
}; };
/** Maps from player_class to maximum stats. */ /** Maps from player_class to maximum stats. */
int MaxStats[3][4] = { int MaxStats[NUM_CLASSES][4] = {
{ 250, 50, 60, 100 }, { 250, 50, 60, 100 },
{ 55, 70, 250, 80 }, { 55, 70, 250, 80 },
{ 45, 250, 85, 80 } { 45, 250, 85, 80 }
@ -135,7 +135,7 @@ int ExpLvlsTbl[MAXCHARLEVEL] = {
1310707109, 1310707109,
1583495809 1583495809
}; };
char *ClassStrTbl[] = { char *ClassStrTbl[NUM_CLASSES] = {
"Warrior", "Warrior",
"Rogue", "Rogue",
"Sorceror", "Sorceror",
@ -351,7 +351,7 @@ void InitPlrGFXMem(int pnum)
DWORD GetPlrGFXSize(char *szCel) DWORD GetPlrGFXSize(char *szCel)
{ {
int c; DWORD c;
const char *a, *w; const char *a, *w;
DWORD dwSize, dwMaxSize; DWORD dwSize, dwMaxSize;
HANDLE hsFile; HANDLE hsFile;
@ -360,7 +360,7 @@ DWORD GetPlrGFXSize(char *szCel)
dwMaxSize = 0; dwMaxSize = 0;
for (c = 0; c < sizeof(ClassStrTbl) / sizeof(*ClassStrTbl); c++) { for (c = 0; c < NUM_CLASSES; c++) {
#ifdef SPAWN #ifdef SPAWN
if (c != 0) if (c != 0)
continue; continue;

20
Source/player.h

@ -125,18 +125,18 @@ extern int plrxoff[9];
extern int plryoff[9]; extern int plryoff[9];
extern int plrxoff2[9]; extern int plrxoff2[9];
extern int plryoff2[9]; extern int plryoff2[9];
extern char PlrGFXAnimLens[][11]; extern char PlrGFXAnimLens[NUM_CLASSES][11];
extern int PWVel[3][3]; extern int PWVel[NUM_CLASSES][3];
extern int AnimLenFromClass[3]; extern int AnimLenFromClass[NUM_CLASSES];
extern int StrengthTbl[3]; extern int StrengthTbl[NUM_CLASSES];
extern int MagicTbl[3]; extern int MagicTbl[NUM_CLASSES];
extern int DexterityTbl[3]; extern int DexterityTbl[NUM_CLASSES];
extern int VitalityTbl[3]; extern int VitalityTbl[NUM_CLASSES];
extern int ToBlkTbl[3]; extern int ToBlkTbl[NUM_CLASSES];
extern char *ClassStrTblOld[]; extern char *ClassStrTblOld[];
extern int MaxStats[3][4]; extern int MaxStats[NUM_CLASSES][4];
extern int ExpLvlsTbl[MAXCHARLEVEL]; extern int ExpLvlsTbl[MAXCHARLEVEL];
extern char *ClassStrTbl[]; extern char *ClassStrTbl[NUM_CLASSES];
extern BYTE fix[9]; extern BYTE fix[9];
#endif /* __PLAYER_H__ */ #endif /* __PLAYER_H__ */

Loading…
Cancel
Save