OSDN Git Service

[fix] MPの無い職業に設定される定数を定義
[hengband/hengband.git] / src / player / player-class.h
index 98cf290..f2900df 100644 (file)
@@ -1,64 +1,14 @@
 #pragma once
-#include "spell/spells1.h"
+
+/* 人畜無害なenumヘッダを先に読み込む */
+#include "player/player-classes-types.h"
+#include "object/tval-types.h"
+#include "realm/realm-types.h"
+#include "system/angband.h"
 #include "spell/technic-info-table.h"
-#include "player/player-status.h"
 
-/*
- * 職業ごとの選択可能な魔法領域現在の所 bitrh.c でのみ使用。
- * Possible realms that can be chosen currently used only by birth.c.
- */
-#define CH_NONE         0x00
-#define CH_LIFE         0x01
-#define CH_SORCERY      0x02
-#define CH_NATURE       0x04
-#define CH_CHAOS        0x08
-#define CH_DEATH        0x10
-#define CH_TRUMP        0x20
-#define CH_ARCANE       0x40
-#define CH_ENCHANT      0x80
-#define CH_DAEMON       0x100
-#define CH_CRUSADE      0x200
-
-#define CH_MUSIC        0x08000        /* This is 16th bit */
-#define CH_HISSATSU     0x10000
-#define CH_HEX          0x20000
-
- /*
-  * Player class constants (hard-coded by save-files, arrays, etc)
-  */
-#define CLASS_WARRIOR            0
-#define CLASS_MAGE               1
-#define CLASS_PRIEST             2
-#define CLASS_ROGUE              3
-#define CLASS_RANGER             4
-#define CLASS_PALADIN            5
-#define CLASS_WARRIOR_MAGE       6
-#define CLASS_CHAOS_WARRIOR      7
-#define CLASS_MONK               8
-#define CLASS_MINDCRAFTER        9
-#define CLASS_HIGH_MAGE         10
-#define CLASS_TOURIST           11
-#define CLASS_IMITATOR          12
-#define CLASS_BEASTMASTER       13
-#define CLASS_SORCERER          14
-#define CLASS_ARCHER            15
-#define CLASS_MAGIC_EATER       16
-#define CLASS_BARD              17
-#define CLASS_RED_MAGE          18
-#define CLASS_SAMURAI           19
-#define CLASS_FORCETRAINER      20
-#define CLASS_BLUE_MAGE         21
-#define CLASS_CAVALRY           22
-#define CLASS_BERSERKER         23
-#define CLASS_SMITH             24
-#define CLASS_MIRROR_MASTER     25
-#define CLASS_NINJA             26
-#define CLASS_SNIPER            27
-#define MAX_CLASS       28 /*!< 職業の最大定義数 Maximum number of player "class" types (see "table.c", etc) */
-
-#define IS_WIZARD_CLASS(C) \
-       ((C)->pclass == CLASS_MAGE || (C)->pclass == CLASS_HIGH_MAGE || (C)->pclass == CLASS_SORCERER || \
-       (C)->pclass == CLASS_MAGIC_EATER || (C)->pclass == CLASS_BLUE_MAGE)
+/** m_info.txtでMPの無い職業に設定される */
+#define SPELL_FIRST_NO_SPELL 99
 
 /*
  * Information about the player's "magic"
  * Note that a player with a "spell_book" of "zero" is illiterate.
  */
 
-typedef struct player_magic player_magic;
-
-struct player_magic
-{
-       OBJECT_TYPE_VALUE spell_book; /* Tval of spell books (if any) */
+typedef struct player_magic {
+       tval_type spell_book; /* Tval of spell books (if any) */
        int spell_xtra;         /* Something for later */
 
        int spell_stat;         /* Stat for spells (if any)  */
@@ -80,7 +27,7 @@ struct player_magic
        int spell_weight;               /* Weight that hurts spells */
 
        magic_type info[MAX_MAGIC][32];    /* The available spells */
-};
+} player_magic;
 
 extern player_magic *m_info;
 extern const player_magic *mp_ptr;
@@ -122,11 +69,13 @@ struct player_class
        s16b c_exp;                     /* Class experience factor */
 
        byte pet_upkeep_div; /* Pet upkeep divider */
+
+    int num;
+    int wgt;
+    int mul;
 };
 
 extern const player_class *cp_ptr;
 extern const player_class class_info[MAX_CLASS];
 
-extern const s32b realm_choices1[];
-extern const s32b realm_choices2[];
 extern const concptr player_title[MAX_CLASS][10];