forked from hengband/hengband
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into macos-develop
- Loading branch information
Showing
14 changed files
with
108 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,37 @@ | ||
#pragma once | ||
|
||
#include "system/angband.h" | ||
|
||
#include "object/tval-types.h" | ||
#include <cstdint> | ||
#include <optional> | ||
#include <vector> | ||
|
||
inline constexpr int EATER_ITEM_GROUP_SIZE = 256; //!< 魔道具1種あたりの最大数 | ||
inline constexpr int EATER_STAFF_BASE = 0; //!< 杖の開始番号(繰り返しコマンド用) | ||
inline constexpr int EATER_WAND_BASE = EATER_STAFF_BASE + EATER_ITEM_GROUP_SIZE; //!< 魔法棒の開始番号(繰り返しコマンド用) | ||
inline constexpr int EATER_ROD_BASE = EATER_WAND_BASE + EATER_ITEM_GROUP_SIZE; //!< ロッドの開始番号(繰り返しコマンド用) | ||
inline constexpr int32_t EATER_CHARGE = 0x10000L; | ||
inline constexpr int32_t EATER_ROD_CHARGE = 0x10L; | ||
inline constexpr int EATER_CHARGE = 0x10000L; | ||
inline constexpr int EATER_ROD_CHARGE = 0x10L; | ||
|
||
struct magic_eater_data_type { | ||
struct magic_type { | ||
int32_t charge{}; //!< 充填量 (杖/魔法棒とロッドで仕様が異なる) | ||
byte count{}; //!< 取り込んだ回数(杖/魔法棒)もしくは本数(ロッド) | ||
enum class ItemKindType : short; | ||
class BaseitemKey; | ||
class MagicEaterDataList { | ||
public: | ||
class MagicEaterDatum { | ||
public: | ||
MagicEaterDatum() = default; | ||
int charge{}; //!< 充填量 (杖/魔法棒とロッドで仕様が異なる) | ||
uint8_t count{}; //!< 取り込んだ回数(杖/魔法棒)もしくは本数(ロッド) | ||
}; | ||
|
||
magic_eater_data_type(); | ||
MagicEaterDataList(); | ||
|
||
std::vector<MagicEaterDatum> staves{}; //!< 杖のデータ | ||
std::vector<MagicEaterDatum> wands{}; //!< 魔法棒のデータ | ||
std::vector<MagicEaterDatum> rods{}; //!< ロッドのデータ | ||
inline static std::vector<MagicEaterDataList::MagicEaterDatum> none{}; //!< いずれの魔道具でもないダミー | ||
|
||
std::vector<magic_type> staves{}; //!< 杖のデータ | ||
std::vector<magic_type> wands{}; //!< 魔法棒のデータ | ||
std::vector<magic_type> rods{}; //!< ロッドのデータ | ||
inline static std::vector<magic_type> none{}; //!< いずれの魔道具でもないダミー | ||
std::optional<BaseitemKey> check_magic_eater_spell_repeat() const; | ||
std::vector<MagicEaterDatum> &get_item_group(ItemKindType tval); | ||
|
||
std::vector<magic_type> &get_item_group(ItemKindType tval); | ||
private: | ||
const std::vector<MagicEaterDatum> &get_item_group(ItemKindType tval) const; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters