OSDN Git Service

hengbandforosx/hengbandosx.git
16 months ago[Fix] std::ranges::transform -> std::transform
Habu [Sat, 24 Dec 2022 02:40:46 +0000 (11:40 +0900)]
[Fix] std::ranges::transform -> std::transform

Apple Clang 14 ではまだ The One Ranges Proposal がサポートされていないので、
C++20 で追加された std::ranges::* のSTLアルゴリズムが使用できない。
したがって従来の通りイテレータペアを受け取る std::transform を使用する。

16 months agoMerge pull request #2979 from habu1010/feature/refactor-shape-buffer
Habu [Fri, 23 Dec 2022 13:37:13 +0000 (22:37 +0900)]
Merge pull request #2979 from habu1010/feature/refactor-shape-buffer

[Refactor] shape_buffer のシグネチャ変更に伴うリファクタリング

16 months ago[Refactor] shape_buffer のシグネチャ変更に伴うリファクタリング
Habu [Fri, 23 Dec 2022 10:39:06 +0000 (19:39 +0900)]
[Refactor] shape_buffer のシグネチャ変更に伴うリファクタリング

shape_buffer のシグネチャを結果を格納するバッファ領域を指すポインタを受け取る方式から
std::string 型文字列の配列を返す方式に変更する。

17 months agoMerge pull request #2975 from backwardsEric/sprintf-refactor-cnv_stat
Hourier [Fri, 23 Dec 2022 10:16:21 +0000 (19:16 +0900)]
Merge pull request #2975 from backwardsEric/sprintf-refactor-cnv_stat

Refactor cnv_stat() to avoid sprintf().  Does part of the work of …

17 months agoMerge pull request #2973 from backwardsEric/sprintf-refactor_get_element_effect_info
Hourier [Fri, 23 Dec 2022 10:12:38 +0000 (19:12 +0900)]
Merge pull request #2973 from backwardsEric/sprintf-refactor_get_element_effect_info

Refactor get_element_effect_info() to avoid sprintf().  Does part of …

17 months agoMerge pull request #2972 from backwardsEric/sprintf-refactor-mindcraft_info
Hourier [Fri, 23 Dec 2022 10:06:49 +0000 (19:06 +0900)]
Merge pull request #2972 from backwardsEric/sprintf-refactor-mindcraft_info

Refactor mindcraft_info() to avoid sprintf().  Does part of the work …

17 months agoMerge pull request #2971 from backwardsEric/sprintf-refactor-mane_info
Hourier [Fri, 23 Dec 2022 10:03:32 +0000 (19:03 +0900)]
Merge pull request #2971 from backwardsEric/sprintf-refactor-mane_info

Refactor mane_info() to avoid sprintf().  Does part of the work of …

17 months agoMerge pull request #2978 from habu1010/feature/language-standard-version-to-c++20
Habu [Fri, 23 Dec 2022 10:02:56 +0000 (19:02 +0900)]
Merge pull request #2978 from habu1010/feature/language-standard-version-to-c++20

[Feature] C++ 言語の標準バージョンを C++20 にする

17 months agoRefactor get_element_effect_info() to avoid sprintf(). Does part of the work of...
Eric Branlund [Thu, 22 Dec 2022 19:17:06 +0000 (12:17 -0700)]
Refactor get_element_effect_info() to avoid sprintf().  Does part of the work of resolving https://github.com/hengband/hengband/issues/2858 and https://github.com/hengband/hengband/issues/2859 .

17 months agoRefactor mane_info() to avoid sprintf(). Does part of the work of resolving https...
Eric Branlund [Thu, 22 Dec 2022 19:09:25 +0000 (12:09 -0700)]
Refactor mane_info() to avoid sprintf().  Does part of the work of resolving https://github.com/hengband/hengband/issues/2858 and github.com/hengband/hengband/issues/2859 .

17 months agoRefactor mindcraft_info() to avoid sprintf(). Does part of the work of resolving...
Eric Branlund [Thu, 22 Dec 2022 19:03:08 +0000 (12:03 -0700)]
Refactor mindcraft_info() to avoid sprintf().  Does part of the work of resolving https://github.com/hengband/hengband/issues/2858 and https://github.com/hengband/hengband/issues/2859 .

17 months agoRefactor cnv_stat() to avoid sprintf(). Does part of the work of resolving https...
Eric Branlund [Thu, 22 Dec 2022 18:47:40 +0000 (11:47 -0700)]
Refactor cnv_stat() to avoid sprintf().  Does part of the work of resolving https://github.com/hengband/hengband/issues/2858 and https://github.com/hengband/hengband/issues/2859 .

17 months ago[Fix] maid-x11.cpp に残っていた volatile 修飾子を削除
Habu [Thu, 22 Dec 2022 14:33:32 +0000 (23:33 +0900)]
[Fix] maid-x11.cpp に残っていた volatile 修飾子を削除

C++20 では volatile は deprecated なので削除する。

17 months ago[Fix] 言語標準バージョンをチェックする autoconf 用マクロから volatile 削除
Habu [Thu, 22 Dec 2022 14:19:11 +0000 (23:19 +0900)]
[Fix] 言語標準バージョンをチェックする autoconf 用マクロから volatile 削除

C++20 では volatile は deplecated 扱いであり、configure の実行中に volatile
を含むコードで警告が発生する。CI のコンパイルテストで -Werror を指定しているため、
警告がエラー扱いとなり configure がエラー終了してしまい、その結果テストが通らなくなる。
対策として autoconf 用マクロのコードから volatile を削除する。

17 months ago[Feature] C++ 言語の標準バージョンを C++20 にする
Habu [Thu, 22 Dec 2022 13:58:34 +0000 (22:58 +0900)]
[Feature] C++ 言語の標準バージョンを C++20 にする

各プラットフォームで対応の準備が整ったので、C++ 言語の標準バージョンを C++20 にする。
なお、Visual Studio 用プロジェクトの設定は latest (C++23 の機能を含むプレビュー
バージョン)が指定されていたが、こちらも C++20 を指定することとする。

17 months agoMerge pull request #2969 from habu1010/feature/upgrade-workflow-gcc-clang-for-c++20
Habu [Thu, 22 Dec 2022 11:11:44 +0000 (20:11 +0900)]
Merge pull request #2969 from habu1010/feature/upgrade-workflow-gcc-clang-for-c++20

[Fix] CIで使用するコンパイラのバージョンをアップデート

17 months agoMerge pull request #2977 from backwardsEric/character-sheet-Actual-Current-alignment
Habu [Thu, 22 Dec 2022 09:37:40 +0000 (18:37 +0900)]
Merge pull request #2977 from backwardsEric/character-sheet-Actual-Current-alignment

English:  shift "Actual" and "Current" labels two characters to the …

17 months agoEnglish: shift "Actual" and "Current" labels two characters to the right on the...
Eric Branlund [Wed, 21 Dec 2022 21:09:06 +0000 (14:09 -0700)]
English:  shift "Actual" and "Current" labels two characters to the right on the third page of the character sheet; resolves https://github.com/hengband/hengband/issues/2976 .

17 months ago[Fix] CIで使用するコンパイラのバージョンをアップデート
Habu [Wed, 21 Dec 2022 14:34:50 +0000 (23:34 +0900)]
[Fix] CIで使用するコンパイラのバージョンをアップデート

C++20に備えるため、gccのバージョンを11、clangのバージョンを14にする。
また runner をこれらのコンパイラ・ツールチェインがデフォルトでインストールされている
Ubuntu-22.04 にする。
さらに Node.js 12 のサポート終了にともない、 ccache-action のバージョンを 1 から
1.2 にする。

17 months agoMerge pull request #2968 from habu1010/feature/fix-for-github-actions-nodejs-12-deple...
Habu [Wed, 21 Dec 2022 14:33:30 +0000 (23:33 +0900)]
Merge pull request #2968 from habu1010/feature/fix-for-github-actions-nodejs-12-deplecated

[Fix] Workflow ファイルの actions/checkout のバージョン更新

17 months agoMerge pull request #2966 from Hourier/Change-GetRandomLine-Signature
Hourier [Wed, 21 Dec 2022 14:32:52 +0000 (23:32 +0900)]
Merge pull request #2966 from Hourier/Change-GetRandomLine-Signature

get_random_name() の戻り値をvoidからstd::string に変え、char * の引数を削除した

17 months ago[Fix] Workflow ファイルの actions/checkout のバージョン更新
Habu [Wed, 21 Dec 2022 14:25:35 +0000 (23:25 +0900)]
[Fix] Workflow ファイルの actions/checkout のバージョン更新

GitHub Actions の Node.js 12 のサポート終了に伴い、 actions/checkout@v2 が
使用できなくなるので、actions/checkout@v3 に更新する。

17 months ago[Refactor] #2749 get_random_name() の戻り値をvoidからstd::string に変え、char * の引数を削除した
Hourier [Wed, 21 Dec 2022 14:06:24 +0000 (23:06 +0900)]
[Refactor] #2749 get_random_name() の戻り値をvoidからstd::string に変え、char * の引数を削除した

17 months agoMerge pull request #2962 from habu1010/feature/refactor-format-retval-to-string
Habu [Wed, 21 Dec 2022 12:59:34 +0000 (21:59 +0900)]
Merge pull request #2962 from habu1010/feature/refactor-format-retval-to-string

[Refactor] format 関数の戻り値を std::string にする

17 months ago[Refactor] format 関数の戻り値を std::string にする
Habu [Wed, 21 Dec 2022 10:17:04 +0000 (19:17 +0900)]
[Refactor] format 関数の戻り値を std::string にする

既存の format 関数は、結果文字列を関数内部で保持している静的バッファ領域に格納しそれ
に対するポインタを返すという仕様のため、非常に注意深く使用する必要がある。
使いにくくて仕方がないので std::string オブジェクトを返すようにし、format 関数を
呼んだ側が確実に自由に結果文字列を扱えるようにする。

17 months agoMerge pull request #2940 from backwardsEric/sprintf-string-format
Habu [Wed, 21 Dec 2022 10:08:34 +0000 (19:08 +0900)]
Merge pull request #2940 from backwardsEric/sprintf-string-format

Replace sprintf() with std::string and/or format().  Does part of the…

17 months agoReplace sprintf() with std::string and/or format(). Does part of the work of resolvi...
Eric Branlund [Tue, 20 Dec 2022 18:48:50 +0000 (11:48 -0700)]
Replace sprintf() with std::string and/or format().  Does part of the work of resolving https://github.com/hengband/hengband/issues/2858 and https://github.com/hengband/hengband/issues/2859 .

17 months agoMerge pull request #2946 from backwardsEric/sprintf-refactor-tombstone-generation
Habu [Tue, 20 Dec 2022 14:15:11 +0000 (23:15 +0900)]
Merge pull request #2946 from backwardsEric/sprintf-refactor-tombstone-generation

Refactor tombstone generation to avoid sprintf().  Does part of the …

17 months agoMerge pull request #2943 from backwardsEric/sprintf-refactor-birth-selections
Habu [Tue, 20 Dec 2022 14:01:40 +0000 (23:01 +0900)]
Merge pull request #2943 from backwardsEric/sprintf-refactor-birth-selections

Refactor birth class/personality/race/sex selection to avoid sprintf()…

17 months agoRefactor tombstone generation to avoid sprintf(). Does part of the work of resolving...
Eric Branlund [Tue, 20 Dec 2022 13:45:38 +0000 (06:45 -0700)]
Refactor tombstone generation to avoid sprintf().  Does part of the work of resolving https://github.com/hengband/hengband/issues/2858 and https://github.com/hengband/hengband/issues/2859 .

17 months agoRefactor birth class/personality/race/sex selection to avoid sprintf(). Does part...
Eric Branlund [Tue, 20 Dec 2022 13:40:04 +0000 (06:40 -0700)]
Refactor birth class/personality/race/sex selection to avoid sprintf().  Does part of the work of resolving https://github.com/hengband/hengband/issues/2858 and https://github.com/hengband/hengband/issues/2859 .

17 months agoMerge pull request #2948 from backwardsEric/sprintf-refactor-item_activation_aux
Habu [Tue, 20 Dec 2022 13:17:15 +0000 (22:17 +0900)]
Merge pull request #2948 from backwardsEric/sprintf-refactor-item_activation_aux

Refactor item_activation_aux() to avoid sprintf().  Does part of the …

17 months agoMerge pull request #2964 from backwardsEric/view-display-util-no-pch
Hourier [Mon, 19 Dec 2022 23:24:18 +0000 (08:24 +0900)]
Merge pull request #2964 from backwardsEric/view-display-util-no-pch

Include <string> to avoid compiler error on MacOS/clang when not …

17 months agoInclude <string> to avoid compiler error on MacOS/clang when not using precompiled...
Eric Branlund [Mon, 19 Dec 2022 19:35:48 +0000 (12:35 -0700)]
Include <string> to avoid compiler error on MacOS/clang when not using precompiled headers.  Resolves https://github.com/hengband/hengband/issues/2963 .

17 months agoMerge pull request #2961 from habu1010/feature/refactor-get_quantity-signature
Habu [Mon, 19 Dec 2022 13:11:56 +0000 (22:11 +0900)]
Merge pull request #2961 from habu1010/feature/refactor-get_quantity-signature

[Refactor] get_quantity 関数のシグネチャ変更

17 months ago[Refactor] get_quantity 関数のシグネチャ変更
Habu [Mon, 19 Dec 2022 12:22:41 +0000 (21:22 +0900)]
[Refactor] get_quantity 関数のシグネチャ変更

他の get_* シリーズと違い、既存の仕様で nullptr が渡された時にデフォルトメッセージを
表示するという仕様があるので単純に std::string_view にできない。
したがって std::optional<std::string_view> にし、std::nullopt で対応する。

17 months agoMerge pull request #2957 from habu1010/feature/refactor-exe_spell-return-value
Habu [Mon, 19 Dec 2022 12:16:02 +0000 (21:16 +0900)]
Merge pull request #2957 from habu1010/feature/refactor-exe_spell-return-value

[Refactor] exe_spell 関数の戻り値の型を変更

17 months agoMerge pull request #2960 from Hourier/Fix-Compilation-Warning-LevelDesc
Hourier [Mon, 19 Dec 2022 12:07:34 +0000 (21:07 +0900)]
Merge pull request #2960 from Hourier/Fix-Compilation-Warning-LevelDesc

引数とローカル変数名の重複を解消した

17 months ago[Fix] 引数とローカル変数名の重複を解消した
Hourier [Mon, 19 Dec 2022 12:01:43 +0000 (21:01 +0900)]
[Fix] 引数とローカル変数名の重複を解消した

17 months agoMerge pull request #2936 from habu1010/feature/refactor-asking-player-function-signature
Habu [Mon, 19 Dec 2022 11:54:10 +0000 (20:54 +0900)]
Merge pull request #2936 from habu1010/feature/refactor-asking-player-function-signature

[Refactor] asking-player.cpp の関数群のシグネチャを変更

17 months agoMerge pull request #2937 from habu1010/feature/refactor-get_ability_abbreviation
Habu [Mon, 19 Dec 2022 11:53:11 +0000 (20:53 +0900)]
Merge pull request #2937 from habu1010/feature/refactor-get_ability_abbreviation

[Refactor] get_inscription 関数のシグネチャを変更

17 months agoMerge pull request #2954 from backwardsEric/sprintf-refactor-dice_to_string
Habu [Mon, 19 Dec 2022 11:48:16 +0000 (20:48 +0900)]
Merge pull request #2954 from backwardsEric/sprintf-refactor-dice_to_string

Refactor dice_to_string() to avoid sprintf().  Does part of the work …

17 months agoMerge pull request #2958 from habu1010/feature/refactor-display_player_one_line-signature
Habu [Mon, 19 Dec 2022 11:42:22 +0000 (20:42 +0900)]
Merge pull request #2958 from habu1010/feature/refactor-display_player_one_line-signature

[Refactor] display_player_one_line 関数のシグネチャ変更

17 months agoMerge pull request #2959 from habu1010/feature/refactor-concptr-to-string_view
Habu [Mon, 19 Dec 2022 11:41:49 +0000 (20:41 +0900)]
Merge pull request #2959 from habu1010/feature/refactor-concptr-to-string_view

[Refactor] いくつかの関数の文字列引数の型を std::string_view に変更

17 months ago[Refactor] get_inscription 関数のシグネチャを変更
Habu [Mon, 19 Dec 2022 11:39:28 +0000 (20:39 +0900)]
[Refactor] get_inscription 関数のシグネチャを変更

get_inscription 関数のシグネチャを、文字列を格納するバッファを指すポインタ引数を受け
取る方式から std::string 型の戻り値で文字列を返す方式に変更する。

17 months ago[Refactor] いくつかの関数の文字列引数の型を std::string_view に変更
Habu [Mon, 19 Dec 2022 11:16:36 +0000 (20:16 +0900)]
[Refactor] いくつかの関数の文字列引数の型を std::string_view に変更

format 関数の戻り値を std::string にするにあたり、事前のリサーチで format の戻り
値を直接渡している関数のうち使用箇所が多く std::string_view に変更しておいたほうが
良いと思われる以下のものを先に変更しておく。

- load_note
- roff 系関数

17 months ago[Refactor] exe_spell 関数の戻り値の型を変更
Habu [Mon, 19 Dec 2022 10:07:56 +0000 (19:07 +0900)]
[Refactor] exe_spell 関数の戻り値の型を変更

現在 exe_spell 関数の戻り値の型は concptr であり、SpellProcessType 型の引数の値
により関数の処理内容が切り替わるとともに戻り値の意味も変化する。
大雑把には魔法の名称や情報を得る時はその文字列(静的リテラルや format 関数の静的バッ
ファ)を指すポインタが返り、魔法を実行するときは実行したなら空文字列リテラルへのポイン
タ、キャンセルしたなら nullptr が返る。
format 関数の戻り値を std::string にすると exe_spell の戻り値も std::string に
する必要があるが、std::string に nullptr を入れることはできない。そこで戻り値を
std::optional<std::string> に変更してキャンセル時には std::nullopt を返すように
変更する。

17 months ago[Refactor] display_player_one_line 関数のシグネチャ変更
Habu [Mon, 19 Dec 2022 09:07:24 +0000 (18:07 +0900)]
[Refactor] display_player_one_line 関数のシグネチャ変更

display_player_one_line 関数は format 関数の戻り値をダイレクトに渡している箇所が
多いので、format 関数の戻り値が std::string になっても変更しなくてすむように引数を
concptr から std::string_view に変更する。
また、現在 std::string::data() メソッドを呼び出して渡している箇所は、data() の呼
び出しが不要になるので std::string オブジェクトをそのまま渡すようにする。

17 months ago[Refactor] asking-player.cpp の関数群のシグネチャを変更
Habu [Mon, 19 Dec 2022 06:58:21 +0000 (15:58 +0900)]
[Refactor] asking-player.cpp の関数群のシグネチャを変更

asking-player.cpp で定義されている、ユーザに入力を促す get_* の関数群に与えるの
メッセージの引数の型を concptr から std::string_view に変更する。
但し、get_quantity は nullptr の時にデフォルトメッセージを表示するという例外がある
ので別途対応する。

17 months agoRefactor dice_to_string() to avoid sprintf(). Does part of the work of resolving...
Eric Branlund [Mon, 19 Dec 2022 05:45:14 +0000 (22:45 -0700)]
Refactor dice_to_string() to avoid sprintf().  Does part of the work of resolving https://github.com/hengband/hengband/issues/2858 and https://github.com/hengband/hengband/issues/2859 .

17 months agoRefactor item_activation_aux() to avoid sprintf(). Does part of the work of resolvin...
Eric Branlund [Mon, 19 Dec 2022 03:45:06 +0000 (20:45 -0700)]
Refactor item_activation_aux() to avoid sprintf().  Does part of the work of resolving https://github.com/hengband/hengband/issues/2858 and https://github.com/hengband/hengband/issues/2859 .

17 months agoMerge pull request #2951 from backwardsEric/sprintf-refactor-write-diary
Habu [Mon, 19 Dec 2022 03:24:26 +0000 (12:24 +0900)]
Merge pull request #2951 from backwardsEric/sprintf-refactor-write-diary

Refactor write-diary.cpp to avoid sprintf().  Does part of the work of…

17 months agoMerge pull request #2947 from backwardsEric/sprintf-refactor-likert
Habu [Mon, 19 Dec 2022 03:16:10 +0000 (12:16 +0900)]
Merge pull request #2947 from backwardsEric/sprintf-refactor-likert

Refactor likert() to avoid sprintf().  Does part of the work of …

17 months agoRefactor likert() to avoid sprintf(). Does part of the work of resolving https:...
Eric Branlund [Sun, 18 Dec 2022 15:12:40 +0000 (08:12 -0700)]
Refactor likert() to avoid sprintf().  Does part of the work of resolving https://github.com/hengband/hengband/issues/2858 and https://github.com/hengband/hengband/issues/2859 .

17 months agoRefactor write-diary.cpp to avoid sprintf(). Does part of the work of resolving...
Eric Branlund [Sun, 18 Dec 2022 14:39:58 +0000 (07:39 -0700)]
Refactor write-diary.cpp to avoid sprintf().  Does part of the work of resolving https://github.com/hengband/hengband/issues/2858 and https://github.com/hengband/hengband/issues/2859 .

17 months agoMerge pull request #2941 from backwardsEric/sprintf-refactor-name_unnatural_random_ar...
Habu [Sun, 18 Dec 2022 06:58:57 +0000 (15:58 +0900)]
Merge pull request #2941 from backwardsEric/sprintf-refactor-name_unnatural_random_artifact

Refactor name_unnatural_random_artifact() to avoid sprintf().  Does …

17 months agoMerge pull request #2942 from backwardsEric/sprintf-refactor-floor-save
Habu [Sun, 18 Dec 2022 06:54:21 +0000 (15:54 +0900)]
Merge pull request #2942 from backwardsEric/sprintf-refactor-floor-save

Refactor floor/floor-save.cpp to avoid sprintf().  Does part of the …

17 months agoMerge pull request #2944 from backwardsEric/sprintf-refactor-init_angband
Habu [Sun, 18 Dec 2022 06:49:15 +0000 (15:49 +0900)]
Merge pull request #2944 from backwardsEric/sprintf-refactor-init_angband

Refactor init_angband() to avoid sprintf().  Does part of the work of…

17 months agoMerge pull request #2945 from backwardsEric/sprintf-refactor-pit_subtype_string
Habu [Sun, 18 Dec 2022 06:43:17 +0000 (15:43 +0900)]
Merge pull request #2945 from backwardsEric/sprintf-refactor-pit_subtype_string

Refactor pit_subtype_string() to avoid sprintf().  Does part of the …

17 months agoMerge pull request #2949 from backwardsEric:sprintf-refactor-describe_baseitem_info
Habu [Sun, 18 Dec 2022 04:58:06 +0000 (13:58 +0900)]
Merge pull request #2949 from backwardsEric:sprintf-refactor-describe_baseitem_info

Refactor describe_baseitem_info() to avoid sprintf().  Does part of …

17 months agoMerge pull request #2950 from backwardsEric/sprintf-refactor-target-describer
Habu [Sun, 18 Dec 2022 04:50:59 +0000 (13:50 +0900)]
Merge pull request #2950 from backwardsEric/sprintf-refactor-target-describer

Refactor target-describer.cpp to avoid sprintf().  Does part of the …

17 months agoMerge pull request #2952 from backwardsEric/sprintf-refactor-auto-roller
Habu [Sun, 18 Dec 2022 04:36:27 +0000 (13:36 +0900)]
Merge pull request #2952 from backwardsEric/sprintf-refactor-auto-roller

Refactor auto-roller.cpp to avoid sprintf().  Does part of the work …

17 months agoRefactor auto-roller.cpp to avoid sprintf(). Does part of the work of resolving...
Eric Branlund [Sat, 17 Dec 2022 21:33:39 +0000 (14:33 -0700)]
Refactor auto-roller.cpp to avoid sprintf().  Does part of the work of resolving https://github.com/hengband/hengband/issues/2858 and https://github.com/hengband/hengband/issues/2859 .

17 months agoRefactor target-describer.cpp to avoid sprintf(). Does part of the work of resolving...
Eric Branlund [Sat, 17 Dec 2022 21:17:01 +0000 (14:17 -0700)]
Refactor target-describer.cpp to avoid sprintf().  Does part of the work of resolving https://github.com/hengband/hengband/issues/2858 and https://github.com/hengband/hengband/issues/2859 .

17 months agoRefactor describe_baseitem_info() to avoid sprintf(). Does part of the work of resol...
Eric Branlund [Sat, 17 Dec 2022 21:08:59 +0000 (14:08 -0700)]
Refactor describe_baseitem_info() to avoid sprintf().  Does part of the work of resolving https://github.com/hengband/hengband/issues/2858 and https://github.com/hengband/hengband/issues/2859 .

17 months agoRefactor pit_subtype_string() to avoid sprintf(). Does part of the work of resolving...
Eric Branlund [Sat, 17 Dec 2022 19:45:46 +0000 (12:45 -0700)]
Refactor pit_subtype_string() to avoid sprintf().  Does part of the work of resolving https://github.com/hengband/hengband/issues/2858 and https://github.com/hengband/hengband/issues/2859 .

17 months agoRefactor init_angband() to avoid sprintf(). Does part of the work of resolving https...
Eric Branlund [Sat, 17 Dec 2022 19:41:46 +0000 (12:41 -0700)]
Refactor init_angband() to avoid sprintf().  Does part of the work of resolving https://github.com/hengband/hengband/issues/2858 and https://github.com/hengband/hengband/issues/2859 .

17 months agoRefactor floor/floor-save.cpp to avoid sprintf(). Does part of the work of resolving...
Eric Branlund [Sat, 17 Dec 2022 19:06:19 +0000 (12:06 -0700)]
Refactor floor/floor-save.cpp to avoid sprintf().  Does part of the work of resolving https://github.com/hengband/hengband/issues/2858 and https://github.com/hengband/hengband/issues/2859 .

17 months agoRefactor name_unnatural_random_artifact() to avoid sprintf(). Does part of the work...
Eric Branlund [Sat, 17 Dec 2022 18:58:53 +0000 (11:58 -0700)]
Refactor name_unnatural_random_artifact() to avoid sprintf().  Does part of the work of resolving https://github.com/hengband/hengband/issues/2858 and https://github.com/hengband/hengband/issues/2859 .

17 months agoMerge pull request #2939 from backwardsEric/sprintf-simple-replacements
Habu [Sat, 17 Dec 2022 15:06:19 +0000 (00:06 +0900)]
Merge pull request #2939 from backwardsEric/sprintf-simple-replacements

Replace sprintf() simply.  Does part of the work to resolve …

17 months agoReplace sprintf() simply. Does part of the work to resolve https://github.com/hengba...
Eric Branlund [Sat, 17 Dec 2022 14:33:07 +0000 (07:33 -0700)]
Replace sprintf() simply.  Does part of the work to resolve https://github.com/hengband/hengband/issues/2858 and https://github.com/hengband/hengband/issues/2859 .

17 months agoMerge pull request #2852 from arumons/feature/add-info-to-monster-health
Habu [Sat, 17 Dec 2022 13:37:08 +0000 (22:37 +0900)]
Merge pull request #2852 from arumons/feature/add-info-to-monster-health

[Feature] モンスターのHP表示部に出す情報追加

17 months ago[Refactor] #2852 システムファイルではないインクルードファイルは<>でなく””で囲むようにした
arumons [Sat, 17 Dec 2022 13:29:27 +0000 (22:29 +0900)]
[Refactor] #2852 システムファイルではないインクルードファイルは<>でなく””で囲むようにした

17 months ago[Refactor] hengband#2852 コード規約に合わせてローカル変数、定数を小文字スネークケースにした
arumons [Sun, 11 Dec 2022 08:51:12 +0000 (17:51 +0900)]
[Refactor] hengband#2852 コード規約に合わせてローカル変数、定数を小文字スネークケースにした

17 months ago [Fix] hengband#2852 追加したmain-window-row-column.cppをvcxprroj.filtersに追加した
arumons [Sun, 11 Dec 2022 08:40:10 +0000 (17:40 +0900)]
 [Fix] hengband#2852 追加したmain-window-row-column.cppをvcxprroj.filtersに追加した

17 months ago[Refactor] hengband#2852 レビュー指摘に合わせてコメントの追加やコードの細かい修正をした
arumons [Sat, 10 Dec 2022 17:40:16 +0000 (02:40 +0900)]
[Refactor] hengband#2852 レビュー指摘に合わせてコメントの追加やコードの細かい修正をした

17 months ago[Refactor] hengband#2852 MonsterEntityに生存状態を返すis_deadメソッドを追加
arumons [Sat, 10 Dec 2022 16:28:55 +0000 (01:28 +0900)]
[Refactor] hengband#2852 MonsterEntityに生存状態を返すis_deadメソッドを追加

17 months ago[Refactor] hengband#2852 HPバーの色を決定する処理を別関数に切り出した
arumons [Sat, 10 Dec 2022 15:43:57 +0000 (00:43 +0900)]
[Refactor] hengband#2852 HPバーの色を決定する処理を別関数に切り出した

17 months ago[Feature] モンスターのHP表示部に出す情報追加
arumons [Sat, 26 Nov 2022 14:38:02 +0000 (23:38 +0900)]
[Feature] モンスターのHP表示部に出す情報追加

17 months agoMerge pull request #2930 from habu1010/feature/refactor-get_ability_abbreviation
Habu [Fri, 16 Dec 2022 13:14:35 +0000 (22:14 +0900)]
Merge pull request #2930 from habu1010/feature/refactor-get_ability_abbreviation

[Refactor] get_ability_abbreviation 関数のインターフェース

17 months agoMerge pull request #2935 from habu1010/feature/change-term_addstr_putstr-signature
Habu [Fri, 16 Dec 2022 13:03:47 +0000 (22:03 +0900)]
Merge pull request #2935 from habu1010/feature/change-term_addstr_putstr-signature

[Refactor] 画面に文字列を出力する関数のシグネチャ変更

17 months ago[Refactor] 画面に文字列を出力する関数のシグネチャ変更
Habu [Fri, 16 Dec 2022 09:46:04 +0000 (18:46 +0900)]
[Refactor] 画面に文字列を出力する関数のシグネチャ変更

Cスタイルの文字列(concptr)、std::string、std::string_view のいずれもシームレスに
受け取れるように、以下の関数の文字列を指定する引数を concptr から std::string_view
に変更する:

- term_addstr
- term_putstr
- c_put_str/put_str
- c_prt/prt

17 months ago[Refactor] 特性フラグ表記の日英切り替えの真偽値フラグを kanji から is_kanji に改名
Habu [Wed, 14 Dec 2022 10:21:53 +0000 (19:21 +0900)]
[Refactor] 特性フラグ表記の日英切り替えの真偽値フラグを kanji から is_kanji に改名

kanji だと曖昧なので明白に真偽値を表す is_kanji とする。

17 months ago[Refactor] get_ability_abbreviation 関数のインターフェース
Habu [Tue, 13 Dec 2022 13:33:28 +0000 (22:33 +0900)]
[Refactor] get_ability_abbreviation 関数のインターフェース

get_ability_abbreviation 関数のインターフェースを、引数が指すバッファ領域に文字列
を書き込む方式から std::string 型文字列を返す方式に変更する。

17 months agoMerge pull request #2921 from Hourier/Change-BaseitemInfo-RawArray-To-StdArray
Hourier [Tue, 13 Dec 2022 13:27:10 +0000 (22:27 +0900)]
Merge pull request #2921 from Hourier/Change-BaseitemInfo-RawArray-To-StdArray

BasitemInfo::locale/chance の取り扱いを改善した

17 months agoMerge pull request #2927 from habu1010/feature/fix-out-of-array-reference-angband...
Habu [Tue, 13 Dec 2022 13:26:55 +0000 (22:26 +0900)]
Merge pull request #2927 from habu1010/feature/fix-out-of-array-reference-angband-terms

[Fix] angband_terms の配列外参照

17 months ago[Fix] angband_terms の配列外参照
Habu [Tue, 13 Dec 2022 12:10:31 +0000 (21:10 +0900)]
[Fix] angband_terms の配列外参照

ゲーム終了時に angband_terms 配列が指している term_type 構造体を破棄する時逆順で
破棄しているが、最初の要素のインデクスが angband_terms.size() となっているため配列
外参照となっている。
単純に size() - 1 から始めるように修正してもいいが、逆順という意図を込めるため
リバースイテレータで処理するように変更する。

17 months agoMerge pull request #2922 from Slimebreath6078/feature/refactor_mflag_brightness
火炎の飛竜 [Mon, 12 Dec 2022 15:54:04 +0000 (00:54 +0900)]
Merge pull request #2922 from Slimebreath6078/feature/refactor_mflag_brightness

モンスターのフラグをまとめる(明かり・闇)

17 months ago[Refactor] ダンジョンのモンスター出現フィルターに明かり・闇フラグ適用
Slimebreath6078 [Sun, 11 Dec 2022 08:29:59 +0000 (17:29 +0900)]
[Refactor] ダンジョンのモンスター出現フィルターに明かり・闇フラグ適用

17 months ago[Refactor] トークン定義を明かり・闇フラグに合わせる
Slimebreath6078 [Sun, 11 Dec 2022 08:29:24 +0000 (17:29 +0900)]
[Refactor] トークン定義を明かり・闇フラグに合わせる

17 months ago[Refactor] 明かり・闇フラグの定義に合わせる
Slimebreath6078 [Sun, 11 Dec 2022 08:09:44 +0000 (17:09 +0900)]
[Refactor] 明かり・闇フラグの定義に合わせる

17 months ago[Refactor] モンスターの明かり・闇フラグをFlagGroup化
Slimebreath6078 [Sun, 11 Dec 2022 06:53:33 +0000 (15:53 +0900)]
[Refactor] モンスターの明かり・闇フラグをFlagGroup化

17 months ago[Refactor] #2925 kind_info() をdescribe_baseitem_info() に改名し、引数名を分かりやすくした
Hourier [Mon, 12 Dec 2022 13:29:40 +0000 (22:29 +0900)]
[Refactor] #2925 kind_info() をdescribe_baseitem_info() に改名し、引数名を分かりやすくした

17 months ago[Refactor] #2921 kind_info() において、level とchance をタプルに分解した
Hourier [Mon, 12 Dec 2022 13:22:41 +0000 (22:22 +0900)]
[Refactor] #2921 kind_info() において、level とchance をタプルに分解した

17 months ago[Refactor] #2925 横に長過ぎる関数呼び出しを短くし、不必要にvectorから生配列を取り出していた処理をvectorのまま扱うように整形した
Hourier [Sun, 11 Dec 2022 12:22:42 +0000 (21:22 +0900)]
[Refactor] #2925 横に長過ぎる関数呼び出しを短くし、不必要にvectorから生配列を取り出していた処理をvectorのまま扱うように整形した

17 months ago[Refactor] #2925 Separated check_baseitem_chance() from collect_objects()
Hourier [Sun, 11 Dec 2022 12:15:06 +0000 (21:15 +0900)]
[Refactor] #2925 Separated check_baseitem_chance() from collect_objects()

17 months ago[Refactor] #2925 alloc_table を作成し、そこにchance とlevel を移した
Hourier [Sun, 11 Dec 2022 10:27:09 +0000 (19:27 +0900)]
[Refactor] #2925 alloc_table を作成し、そこにchance とlevel を移した

17 months ago[Refactor] #2925 BaseitemInfo::chance をalloc_chances に、locale をalloc_levels に変えた
Hourier [Sat, 10 Dec 2022 14:37:58 +0000 (23:37 +0900)]
[Refactor] #2925 BaseitemInfo::chance をalloc_chances に、locale をalloc_levels に変えた

17 months ago[Refcator] #2925 BaseitenInfo::chance/locale を生配列からstd::array に変えた
Hourier [Sat, 10 Dec 2022 14:35:04 +0000 (23:35 +0900)]
[Refcator] #2925 BaseitenInfo::chance/locale を生配列からstd::array に変えた

17 months agoMerge pull request #2901 from arumons/refactor/use_const_to_gameterm_num
Habu [Sun, 11 Dec 2022 10:52:52 +0000 (19:52 +0900)]
Merge pull request #2901 from arumons/refactor/use_const_to_gameterm_num

[Refactor] termの配列に対してループ処理をする際にマジックナンバーを使っているのをやめる