Remove duplicate type CHARACTER_DATA (Same as PC)
This commit is contained in:
parent
e7ec8ea80c
commit
7aebf05fa7
|
@ -1,54 +0,0 @@
|
|||
#include "types.h"
|
||||
|
||||
typedef enum AILMENT
|
||||
{
|
||||
CONSCIOUS = 0,
|
||||
UNCONSCIOUS = 1,
|
||||
DIAMONDIZED = 2,
|
||||
PARALYZED = 3,
|
||||
NAUSEOUS = 4,
|
||||
POISONED = 5,
|
||||
SUNSTROKE = 6,
|
||||
SNIFFLING = 7,
|
||||
MASHROOMIZED = 8,
|
||||
POSSESSED = 9,
|
||||
HOMESICK = 0xA,
|
||||
} AILMENT;
|
||||
|
||||
typedef struct CHARACTER_DATA {
|
||||
// 0x00
|
||||
unsigned short inventory[14];
|
||||
//0x1C
|
||||
unsigned int experience;
|
||||
byte unknown[0xC];
|
||||
unsigned int level;
|
||||
unsigned short maxHp;
|
||||
unsigned short currentHp;
|
||||
unsigned short unknown2;
|
||||
unsigned short scrollingHp;
|
||||
unsigned short maxPp;
|
||||
unsigned short currentPp;
|
||||
unsigned short unknown3;
|
||||
unsigned short scrollingPp;
|
||||
AILMENT ailment;
|
||||
byte flag[5];
|
||||
byte unknown4[2];
|
||||
byte base_atk;
|
||||
byte base_def;
|
||||
byte base_speed;
|
||||
byte base_guts;
|
||||
byte base_luck;
|
||||
byte base_vitality;
|
||||
byte base_iq;
|
||||
byte atk;
|
||||
byte def;
|
||||
byte speed;
|
||||
byte guts;
|
||||
byte luck;
|
||||
byte vitality;
|
||||
byte iq;
|
||||
byte unknown5[0xB];
|
||||
byte equipment[4];
|
||||
byte unknown6[0x7];
|
||||
} CHARACTER_DATA;
|
||||
|
|
@ -556,13 +556,13 @@ void give_print(byte item, byte target, byte source, WINDOW *window, byte *str)
|
|||
{
|
||||
bool notFullInventory = false;
|
||||
int index;
|
||||
struct CHARACTER_DATA *user_data = (&m2_ness_data[source]);
|
||||
struct CHARACTER_DATA *target_data = (&m2_ness_data[target]);
|
||||
struct PC *user_data = (&m2_ness_data[source]);
|
||||
struct PC *target_data = (&m2_ness_data[target]);
|
||||
bool incapable_user = false;
|
||||
bool incapable_target = false;
|
||||
|
||||
for(index = 0; index < 0xE; index++)
|
||||
if(target_data->inventory[index] == 0)
|
||||
if(target_data->goods[index] == 0)
|
||||
{
|
||||
notFullInventory = true;
|
||||
break;
|
||||
|
@ -649,7 +649,7 @@ void setupSelf_Alive(byte *String, int *index, byte user, byte item)
|
|||
|
||||
void setupSelf_Dead(byte *String, int *index, byte user, byte item)
|
||||
{
|
||||
struct CHARACTER_DATA *tmp; //Get alive character
|
||||
struct PC *tmp; //Get alive character
|
||||
byte alive = 0;
|
||||
while((alive == user))
|
||||
alive++;
|
||||
|
@ -853,7 +853,7 @@ void setupFull_User_Dead(byte *String, int *index, byte user, byte target, byte
|
|||
|
||||
void setupFull_Both_Dead(byte *String, int *index, byte user, byte target, byte item)
|
||||
{
|
||||
struct CHARACTER_DATA *tmp; //Get alive character
|
||||
struct PC *tmp; //Get alive character
|
||||
byte alive = 0;
|
||||
while((alive == user) || (alive == target))
|
||||
alive++;
|
||||
|
@ -1015,7 +1015,7 @@ void setup_User_Dead(byte *String, int *index, byte user, byte target, byte item
|
|||
|
||||
void setup_Both_Dead(byte *String, int *index, byte user, byte target, byte item)
|
||||
{
|
||||
struct CHARACTER_DATA *tmp; //Get alive character
|
||||
struct PC *tmp; //Get alive character
|
||||
byte alive = 0;
|
||||
while((alive == user) || (alive == target))
|
||||
alive++;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define HEADER_GOODS_INCLUDED
|
||||
|
||||
#include "window.h"
|
||||
#include "character.h"
|
||||
#include "pc.h"
|
||||
#include "input.h"
|
||||
|
||||
typedef enum DIRECTION_MOVED
|
||||
|
@ -44,6 +44,6 @@ extern void m2_clearwindowtiles(WINDOW* window);
|
|||
extern int bin_to_bcd(int value, int* digit_count);
|
||||
|
||||
extern int m2_items;
|
||||
extern CHARACTER_DATA m2_ness_data[];
|
||||
extern PC m2_ness_data[];
|
||||
|
||||
#endif
|
||||
|
|
17
src/c/pc.h
17
src/c/pc.h
|
@ -3,6 +3,21 @@
|
|||
|
||||
#include "types.h"
|
||||
|
||||
typedef enum AILMENT
|
||||
{
|
||||
CONSCIOUS = 0,
|
||||
UNCONSCIOUS = 1,
|
||||
DIAMONDIZED = 2,
|
||||
PARALYZED = 3,
|
||||
NAUSEOUS = 4,
|
||||
POISONED = 5,
|
||||
SUNSTROKE = 6,
|
||||
SNIFFLING = 7,
|
||||
MASHROOMIZED = 8,
|
||||
POSSESSED = 9,
|
||||
HOMESICK = 0xA,
|
||||
} AILMENT;
|
||||
|
||||
typedef struct PC {
|
||||
unsigned short goods[14];
|
||||
int experience;
|
||||
|
@ -16,7 +31,7 @@ typedef struct PC {
|
|||
unsigned short pp_current;
|
||||
byte pp_unknown[2];
|
||||
unsigned short pp_rolling;
|
||||
byte ailment;
|
||||
AILMENT ailment;
|
||||
bool mashroomized;
|
||||
bool sleep;
|
||||
bool strange;
|
||||
|
|
Loading…
Reference in New Issue