Skip to content

Commit

Permalink
Merge branch 'develop' into macos-develop
Browse files Browse the repository at this point in the history
  • Loading branch information
backwardsEric committed Nov 25, 2024
2 parents 57bef38 + 8b68ebf commit 30332f5
Show file tree
Hide file tree
Showing 110 changed files with 1,746 additions and 1,615 deletions.
8 changes: 6 additions & 2 deletions VisualStudio/Hengband/Hengband.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,8 @@
<ClCompile Include="..\..\src\spell-class\spells-mirror-master.cpp" />
<ClCompile Include="..\..\src\system\angband-system.cpp" />
<ClCompile Include="..\..\src\system\dungeon-data-definition.cpp" />
<ClCompile Include="..\..\src\system\baseitem\baseitem-key.cpp" />
<ClCompile Include="..\..\src\system\baseitem\baseitem-list.cpp" />
<ClCompile Include="..\..\src\system\inner-game-data.cpp" />
<ClCompile Include="..\..\src\system\redrawing-flags-updater.cpp" />
<ClCompile Include="..\..\src\system\floor-type-definition.cpp" />
Expand Down Expand Up @@ -929,7 +931,7 @@
<ClCompile Include="..\..\src\object-enchant\object-ego.cpp" />
<ClCompile Include="..\..\src\flavor\object-flavor.cpp" />
<ClCompile Include="..\..\src\object\item-tester-hooker.cpp" />
<ClCompile Include="..\..\src\system\baseitem-info.cpp" />
<ClCompile Include="..\..\src\system\baseitem\baseitem-definition.cpp" />
<ClCompile Include="..\..\src\system\spell-info-list.cpp" />
<ClCompile Include="..\..\src\object\object-kind-hook.cpp" />
<ClCompile Include="..\..\src\object\object-broken.cpp" />
Expand Down Expand Up @@ -1429,6 +1431,8 @@
<ClInclude Include="..\..\src\system\alloc-entries.h" />
<ClInclude Include="..\..\src\system\angband-exceptions.h" />
<ClInclude Include="..\..\src\system\angband-system.h" />
<ClInclude Include="..\..\src\system\baseitem\baseitem-key.h" />
<ClInclude Include="..\..\src\system\baseitem\baseitem-list.h" />
<ClInclude Include="..\..\src\system\enums\grid-count-kind.h" />
<ClInclude Include="..\..\src\system\enums\grid-flow.h" />
<ClInclude Include="..\..\src\system\inner-game-data.h" />
Expand Down Expand Up @@ -1993,7 +1997,7 @@
<ClInclude Include="..\..\src\object\object-broken.h" />
<ClInclude Include="..\..\src\object\object-info.h" />
<ClInclude Include="..\..\src\object\object-kind-hook.h" />
<ClInclude Include="..\..\src\system\baseitem-info.h" />
<ClInclude Include="..\..\src\system\baseitem\baseitem-definition.h" />
<ClInclude Include="..\..\src\system\spell-info-list.h" />
<ClInclude Include="..\..\src\player\patron.h" />
<ClInclude Include="..\..\src\player-info\class-info.h" />
Expand Down
27 changes: 21 additions & 6 deletions VisualStudio/Hengband/Hengband.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -2436,9 +2436,6 @@
<ClCompile Include="..\..\src\system\monster-entity.cpp">
<Filter>system</Filter>
</ClCompile>
<ClCompile Include="..\..\src\system\baseitem-info.cpp">
<Filter>system</Filter>
</ClCompile>
<ClCompile Include="..\..\src\system\spell-info-list.cpp">
<Filter>system</Filter>
</ClCompile>
Expand Down Expand Up @@ -2529,6 +2526,15 @@
<ClCompile Include="..\..\src\system\dungeon-data-definition.cpp">
<Filter>system</Filter>
</ClCompile>
<ClCompile Include="..\..\src\system\baseitem\baseitem-definition.cpp">
<Filter>system\baseitem</Filter>
</ClCompile>
<ClCompile Include="..\..\src\system\baseitem\baseitem-key.cpp">
<Filter>system\baseitem</Filter>
</ClCompile>
<ClCompile Include="..\..\src\system\baseitem\baseitem-list.cpp">
<Filter>system\baseitem</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\combat\shoot.h">
Expand Down Expand Up @@ -5361,9 +5367,6 @@
<ClInclude Include="..\..\src\timed-effect\player-blindness.h">
<Filter>timed-effect</Filter>
</ClInclude>
<ClInclude Include="..\..\src\system\baseitem-info.h">
<Filter>system</Filter>
</ClInclude>
<ClInclude Include="..\..\src\system\spell-info-list.h">
<Filter>system</Filter>
</ClInclude>
Expand Down Expand Up @@ -5478,6 +5481,15 @@
<ClInclude Include="..\..\src\system\enums\grid-count-kind.h">
<Filter>system\enums</Filter>
</ClInclude>
<ClInclude Include="..\..\src\system\baseitem\baseitem-definition.h">
<Filter>system\baseitem</Filter>
</ClInclude>
<ClInclude Include="..\..\src\system\baseitem\baseitem-key.h">
<Filter>system\baseitem</Filter>
</ClInclude>
<ClInclude Include="..\..\src\system\baseitem\baseitem-list.h">
<Filter>system\baseitem</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\wall.bmp" />
Expand Down Expand Up @@ -5751,6 +5763,9 @@
<Filter Include="system\enums\monrace">
<UniqueIdentifier>{123780c8-0bf5-47ac-aabd-c9f3dbe74855}</UniqueIdentifier>
</Filter>
<Filter Include="system\baseitem">
<UniqueIdentifier>{b1f45c00-0add-4e05-8c05-bac1f29550c6}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\src\angband.rc" />
Expand Down
5 changes: 4 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,6 @@ hengband_SOURCES = \
system/angband-system.h system/angband-system.cpp \
system/angband-version.cpp system/angband-version.h \
system/artifact-type-definition.cpp system/artifact-type-definition.h \
system/baseitem-info.cpp system/baseitem-info.h \
system/building-type-definition.cpp system/building-type-definition.h \
system/dungeon-data-definition.cpp system/dungeon-data-definition.h \
system/dungeon-info.cpp system/dungeon-info.h \
Expand All @@ -941,6 +940,10 @@ hengband_SOURCES = \
system/terrain-type-definition.cpp system/terrain-type-definition.h \
system/gamevalue.h \
\
system/baseitem/baseitem-definition.cpp system/baseitem/baseitem-definition.h \
system/baseitem/baseitem-key.cpp system/baseitem/baseitem-key.h \
system/baseitem/baseitem-list.cpp system/baseitem/baseitem-list.h \
\
system/enums/game-option-page.h \
system/enums/grid-flow.h \
system/enums/monrace/monrace-id.h \
Expand Down
2 changes: 1 addition & 1 deletion src/action/activation-execution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include "sv-definition/sv-lite-types.h"
#include "sv-definition/sv-ring-types.h"
#include "system/artifact-type-definition.h"
#include "system/baseitem-info.h"
#include "system/baseitem/baseitem-key.h"
#include "system/floor-type-definition.h"
#include "system/item-entity.h"
#include "system/monster-entity.h"
Expand Down
2 changes: 1 addition & 1 deletion src/action/tunnel-execution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ bool exe_tunnel(PlayerType *player_ptr, POSITION y, POSITION x)
}
}

if (is_hidden_door(player_ptr, grid) && one_in_(4)) {
if (grid.is_hidden_door() && one_in_(4)) {
search(player_ptr);
}

Expand Down
2 changes: 1 addition & 1 deletion src/artifact/random-art-generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "perception/identification.h"
#include "perception/object-perception.h"
#include "sv-definition/sv-weapon-types.h"
#include "system/baseitem-info.h"
#include "system/baseitem/baseitem-definition.h"
#include "system/item-entity.h"
#include "system/player-type-definition.h"
#include "system/redrawing-flags-updater.h"
Expand Down
2 changes: 1 addition & 1 deletion src/autopick/autopick-entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "perception/object-perception.h"
#include "player-base/player-class.h"
#include "player/player-realm.h"
#include "system/baseitem-info.h"
#include "system/baseitem/baseitem-definition.h"
#include "system/item-entity.h"
#include "system/monster-race-info.h"
#include "system/player-type-definition.h"
Expand Down
2 changes: 1 addition & 1 deletion src/autopick/autopick-matcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "perception/object-perception.h"
#include "player-base/player-class.h"
#include "player/player-realm.h"
#include "system/baseitem-info.h"
#include "system/baseitem/baseitem-definition.h"
#include "system/floor-type-definition.h"
#include "system/item-entity.h"
#include "system/monster-race-info.h"
Expand Down
3 changes: 2 additions & 1 deletion src/birth/game-play-initializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
#include "player/digestion-processor.h"
#include "player/player-spell-status.h"
#include "system/artifact-type-definition.h"
#include "system/baseitem-info.h"
#include "system/baseitem/baseitem-definition.h"
#include "system/baseitem/baseitem-list.h"
#include "system/building-type-definition.h"
#include "system/dungeon-info.h"
#include "system/floor-type-definition.h"
Expand Down
2 changes: 2 additions & 0 deletions src/birth/inventory-initializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#include "sv-definition/sv-staff-types.h"
#include "sv-definition/sv-wand-types.h"
#include "sv-definition/sv-weapon-types.h"
#include "system/baseitem/baseitem-definition.h"
#include "system/baseitem/baseitem-list.h"
#include "system/item-entity.h"
#include "system/player-type-definition.h"
#include "util/enum-converter.h"
Expand Down
2 changes: 1 addition & 1 deletion src/cmd-action/cmd-spell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
#include "status/bad-status-setter.h"
#include "status/base-status.h"
#include "status/experience.h"
#include "system/baseitem-info.h"
#include "system/baseitem/baseitem-key.h"
#include "system/floor-type-definition.h"
#include "system/item-entity.h"
#include "system/player-type-definition.h"
Expand Down
2 changes: 1 addition & 1 deletion src/cmd-item/cmd-destroy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "racial/racial-android.h"
#include "status/action-setter.h"
#include "status/experience.h"
#include "system/baseitem-info.h"
#include "system/baseitem/baseitem-key.h"
#include "system/item-entity.h"
#include "system/player-type-definition.h"
#include "system/redrawing-flags-updater.h"
Expand Down
4 changes: 2 additions & 2 deletions src/cmd-item/cmd-eat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ void exe_eat_food(PlayerType *player_ptr, INVENTORY_IDX i_idx)
sound(SOUND_EAT);

PlayerEnergy(player_ptr).set_player_turn_energy(100);
const auto lev = o_ptr->get_baseitem().level;
const auto level = o_ptr->get_baseitem_level();

/* Identity not known yet */
const auto &bi_key = o_ptr->bi_key;
Expand Down Expand Up @@ -263,7 +263,7 @@ void exe_eat_food(PlayerType *player_ptr, INVENTORY_IDX i_idx)
/* The player is now aware of the object */
if (ident && !o_ptr->is_aware()) {
object_aware(player_ptr, o_ptr);
gain_exp(player_ptr, (lev + (player_ptr->lev >> 1)) / player_ptr->lev);
gain_exp(player_ptr, (level + (player_ptr->lev >> 1)) / player_ptr->lev);
}

static constexpr auto flags_swrf = {
Expand Down
3 changes: 2 additions & 1 deletion src/cmd-item/cmd-magiceat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
#include "player-status/player-energy.h"
#include "player/player-status-table.h"
#include "spell/spell-info.h"
#include "system/baseitem-info.h"
#include "system/baseitem/baseitem-definition.h"
#include "system/baseitem/baseitem-list.h"
#include "system/player-type-definition.h"
#include "target/target-getter.h"
#include "term/screen-processor.h"
Expand Down
2 changes: 1 addition & 1 deletion src/cmd-item/cmd-zapwand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "status/action-setter.h"
#include "status/experience.h"
#include "sv-definition/sv-wand-types.h"
#include "system/baseitem-info.h"
#include "system/baseitem/baseitem-key.h"
#include "system/item-entity.h"
#include "system/player-type-definition.h"
#include "target/target-getter.h"
Expand Down
2 changes: 2 additions & 0 deletions src/cmd-visual/cmd-visuals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#include "knowledge/knowledge-monsters.h"
#include "knowledge/lighting-level-table.h"
#include "main/sound-of-music.h"
#include "system/baseitem/baseitem-definition.h"
#include "system/baseitem/baseitem-list.h"
#include "system/item-entity.h"
#include "system/monster-race-info.h"
#include "system/player-type-definition.h"
Expand Down
2 changes: 1 addition & 1 deletion src/combat/shoot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#include "player/player-status-table.h"
#include "sv-definition/sv-bow-types.h"
#include "system/artifact-type-definition.h"
#include "system/baseitem-info.h"
#include "system/baseitem/baseitem-key.h"
#include "system/enums/monrace/monrace-id.h"
#include "system/floor-type-definition.h"
#include "system/grid-type-definition.h"
Expand Down
3 changes: 1 addition & 2 deletions src/core/object-compressor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "floor/floor-object.h"
#include "floor/geometry.h"
#include "grid/grid.h"
#include "system/baseitem-info.h"
#include "system/floor-type-definition.h"
#include "system/item-entity.h"
#include "system/monster-entity.h"
Expand Down Expand Up @@ -72,7 +71,7 @@ void compact_objects(PlayerType *player_ptr, int size)
for (OBJECT_IDX i = 1; i < floor_ptr->o_max; i++) {
o_ptr = &floor_ptr->o_list[i];

if (!o_ptr->is_valid() || (o_ptr->get_baseitem().level > cur_lev)) {
if (!o_ptr->is_valid() || (o_ptr->get_baseitem_level() > cur_lev)) {
continue;
}

Expand Down
3 changes: 2 additions & 1 deletion src/core/visuals-reseter.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#include "core/visuals-reseter.h"
#include "game-option/special-options.h"
#include "io/read-pref-file.h"
#include "system/baseitem-info.h"
#include "system/baseitem/baseitem-definition.h"
#include "system/baseitem/baseitem-list.h"
#include "system/monster-race-info.h"
#include "system/player-type-definition.h"
#include "system/terrain-type-definition.h"
Expand Down
2 changes: 1 addition & 1 deletion src/effect/effect-feature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ bool affect_feature(PlayerType *player_ptr, MONSTER_IDX src_idx, POSITION r, POS
break;
}
case AttributeType::KILL_TRAP: {
if (is_hidden_door(player_ptr, grid)) {
if (grid.is_hidden_door()) {
disclose_grid(player_ptr, y, x);
if (known) {
obvious = true;
Expand Down
4 changes: 2 additions & 2 deletions src/flavor/flavor-describer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "sv-definition/sv-lite-types.h"
#include "sv-definition/sv-ring-types.h"
#include "sv-definition/sv-weapon-types.h"
#include "system/baseitem-info.h"
#include "system/baseitem/baseitem-definition.h"
#include "system/floor-type-definition.h"
#include "system/item-entity.h"
#include "system/player-type-definition.h"
Expand Down Expand Up @@ -345,7 +345,7 @@ static std::string describe_charges_rod(const ItemEntity &item)
return _("(充填中)", " (charging)");
}

const auto timeout_per_one = item.get_baseitem().pval;
const auto timeout_per_one = item.get_baseitem_pval();
auto num_of_charging = (item.timeout + (timeout_per_one - 1)) / timeout_per_one;
if (num_of_charging > item.number) {
num_of_charging = item.number;
Expand Down
1 change: 1 addition & 0 deletions src/flavor/flavor-util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "object/tval-types.h"
#include "sv-definition/sv-food-types.h"
#include "system/artifact-type-definition.h"
#include "system/baseitem/baseitem-definition.h"
#include "system/item-entity.h"
#include "util/string-processor.h"
#include <sstream>
Expand Down
1 change: 1 addition & 0 deletions src/flavor/named-item-describer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "object-enchant/tr-types.h"
#include "perception/object-perception.h"
#include "system/artifact-type-definition.h"
#include "system/baseitem/baseitem-definition.h"
#include "system/item-entity.h"
#include "system/player-type-definition.h"
#include "util/bit-flags-calculator.h"
Expand Down
2 changes: 1 addition & 1 deletion src/flavor/object-flavor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "player/player-status.h"
#include "sv-definition/sv-food-types.h"
#include "sv-definition/sv-lite-types.h"
#include "system/baseitem-info.h"
#include "system/baseitem/baseitem-key.h"
#include "util/bit-flags-calculator.h"
#include <functional>
#include <sstream>
Expand Down
3 changes: 2 additions & 1 deletion src/flavor/tval-description-switcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
#include "locale/english.h"
#include "object-enchant/trg-types.h"
#include "object/tval-types.h"
#include "system/baseitem-info.h"
#include "system/baseitem/baseitem-definition.h"
#include "system/baseitem/baseitem-list.h"
#include "system/item-entity.h"
#include "system/monster-race-info.h"
#include "util/bit-flags-calculator.h"
Expand Down
2 changes: 2 additions & 0 deletions src/floor/fixed-map-generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include "room/rooms-vault.h"
#include "sv-definition/sv-scroll-types.h"
#include "system/artifact-type-definition.h"
#include "system/baseitem/baseitem-definition.h"
#include "system/baseitem/baseitem-list.h"
#include "system/dungeon-info.h"
#include "system/floor-type-definition.h"
#include "system/grid-type-definition.h"
Expand Down
7 changes: 3 additions & 4 deletions src/floor/floor-events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "sv-definition/sv-protector-types.h"
#include "sv-definition/sv-ring-types.h"
#include "system/angband-system.h"
#include "system/baseitem-info.h"
#include "system/dungeon-info.h"
#include "system/floor-type-definition.h"
#include "system/grid-type-definition.h"
Expand Down Expand Up @@ -231,9 +230,9 @@ static byte get_dungeon_feeling(PlayerType *player_ptr)
delta += 15 * base;
}

const auto &baseitem = o_ptr->get_baseitem();
if (!o_ptr->is_cursed() && !o_ptr->is_broken() && baseitem.level > floor_ptr->dun_level) {
delta += (baseitem.level - floor_ptr->dun_level) * base;
const auto item_level = o_ptr->get_baseitem_level();
if (!o_ptr->is_cursed() && !o_ptr->is_broken() && item_level > floor_ptr->dun_level) {
delta += (item_level - floor_ptr->dun_level) * base;
}

rating += rating_boost(delta);
Expand Down
12 changes: 0 additions & 12 deletions src/grid/grid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,18 +145,6 @@ bool new_player_spot(PlayerType *player_ptr)
return true;
}

/*!
* @brief マスに隠されたドアがあるかの判定を行う。 / Return TRUE if the given grid is a hidden closed door
* @param player_ptr プレイヤーへの参照ポインタ
* @param grid マス構造体の参照ポインタ
* @return 隠されたドアがあるならTRUEを返す。
*/
bool is_hidden_door(PlayerType *player_ptr, const Grid &grid)
{
(void)player_ptr; // 後でリファクタリングする.
return (grid.mimic || grid.cave_has_flag(TerrainCharacteristics::SECRET)) && grid.get_terrain().is_closed_door();
}

/*!
* @brief 指定された座標のマスが現在照らされているかを返す。 / Check for "local" illumination
* @param y y座標
Expand Down
1 change: 0 additions & 1 deletion src/grid/grid.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ class MonraceDefinition;
enum class GridCountKind;
enum class TerrainCharacteristics;
bool new_player_spot(PlayerType *player_ptr);
bool is_hidden_door(PlayerType *player_ptr, const Grid &grid);
bool player_can_enter(PlayerType *player_ptr, FEAT_IDX feature, BIT_FLAGS16 mode);
bool feat_uses_special(FEAT_IDX f_idx);
void update_local_illumination(PlayerType *player_ptr, POSITION y, POSITION x);
Expand Down
Loading

0 comments on commit 30332f5

Please sign in to comment.