Cleanup trait.h

See #42
This commit is contained in:
Alexander Batalov 2022-06-18 19:06:37 +03:00
parent 8515791ab0
commit 38c59e416c
2 changed files with 19 additions and 23 deletions

View File

@ -1,6 +1,7 @@
#include "trait.h" #include "trait.h"
#include "game.h" #include "game.h"
#include "message.h"
#include "object.h" #include "object.h"
#include "platform_compat.h" #include "platform_compat.h"
#include "skill.h" #include "skill.h"
@ -8,16 +9,31 @@
#include <stdio.h> #include <stdio.h>
// Provides metadata about traits.
typedef struct TraitDescription {
// The name of trait.
char* name;
// The description of trait.
//
// The description is only used in character editor to inform player about
// effects of this trait.
char* description;
// Identifier of art in [intrface.lst].
int frmId;
} TraitDescription;
// 0x66BE38 // 0x66BE38
MessageList gTraitsMessageList; static MessageList gTraitsMessageList;
// List of selected traits. // List of selected traits.
// //
// 0x66BE40 // 0x66BE40
int gSelectedTraits[TRAITS_MAX_SELECTED_COUNT]; static int gSelectedTraits[TRAITS_MAX_SELECTED_COUNT];
// 0x51DB84 // 0x51DB84
TraitDescription gTraitDescriptions[TRAIT_COUNT] = { static TraitDescription gTraitDescriptions[TRAIT_COUNT] = {
{ NULL, NULL, 55 }, { NULL, NULL, 55 },
{ NULL, NULL, 56 }, { NULL, NULL, 56 },
{ NULL, NULL, 57 }, { NULL, NULL, 57 },

View File

@ -2,28 +2,8 @@
#define TRAIT_H #define TRAIT_H
#include "db.h" #include "db.h"
#include "message.h"
#include "trait_defs.h" #include "trait_defs.h"
// Provides metadata about traits.
typedef struct TraitDescription {
// The name of trait.
char* name;
// The description of trait.
//
// The description is only used in character editor to inform player about
// effects of this trait.
char* description;
// Identifier of art in [intrface.lst].
int frmId;
} TraitDescription;
extern MessageList gTraitsMessageList;
extern int gSelectedTraits[TRAITS_MAX_SELECTED_COUNT];
extern TraitDescription gTraitDescriptions[TRAIT_COUNT];
int traitsInit(); int traitsInit();
void traitsReset(); void traitsReset();
void traitsExit(); void traitsExit();