OSDN Git Service

hengbandforosx/hengbandosx.git
2 years ago[Refactor] 青魔道士の固有データを magic_num から分離
Habu [Fri, 24 Sep 2021 10:45:37 +0000 (19:45 +0900)]
[Refactor] 青魔道士の固有データを magic_num から分離

2 years agoMerge pull request #1625 from Hourier/Define-Mod-Methods-In-BadStatusSetter
Hourier [Fri, 24 Sep 2021 09:14:48 +0000 (18:14 +0900)]
Merge pull request #1625 from Hourier/Define-Mod-Methods-In-BadStatusSetter

BadStatusSetterクラスに mod_hoge() メソッドを定義した

2 years ago[Refactor] #1599 不必要なキャストを外した / Removed unnecessary cast
Hourier [Fri, 24 Sep 2021 09:02:03 +0000 (18:02 +0900)]
[Refactor] #1599 不必要なキャストを外した / Removed unnecessary cast

2 years ago[Refactor] #1599 Defined mod_cut() and replaced the calls
Hourier [Fri, 24 Sep 2021 02:07:52 +0000 (11:07 +0900)]
[Refactor] #1599 Defined mod_cut() and replaced the calls

2 years ago[Refactor] #1599 Defined mod_stun() and replaced the calls
Hourier [Fri, 24 Sep 2021 01:46:22 +0000 (10:46 +0900)]
[Refactor] #1599 Defined mod_stun() and replaced the calls

2 years ago[Refactor] #1599 Defined mod_slowness() and replaced the calls
Hourier [Fri, 24 Sep 2021 01:34:33 +0000 (10:34 +0900)]
[Refactor] #1599 Defined mod_slowness() and replaced the calls

2 years ago[Refactor] #1599 Defined mod_hallucination() and replaced the calls
Hourier [Fri, 24 Sep 2021 01:28:32 +0000 (10:28 +0900)]
[Refactor] #1599 Defined mod_hallucination() and replaced the calls

2 years ago[Refactor] #1599 Defined mod_paralysis() and replaced the calls
Hourier [Fri, 24 Sep 2021 01:24:21 +0000 (10:24 +0900)]
[Refactor] #1599 Defined mod_paralysis() and replaced the calls

2 years ago[Refactor] #1599 Defined mod_afraidness() and replaced the calls
Hourier [Fri, 24 Sep 2021 01:20:07 +0000 (10:20 +0900)]
[Refactor] #1599 Defined mod_afraidness() and replaced the calls

2 years ago[Refactor] #1599 Defined mod_poison() and replaced the calls
Hourier [Fri, 24 Sep 2021 01:17:01 +0000 (10:17 +0900)]
[Refactor] #1599 Defined mod_poison() and replaced the calls

2 years ago[Refactor] #1599 Defined mod_confusion() and replaced the calls
Hourier [Fri, 24 Sep 2021 01:10:47 +0000 (10:10 +0900)]
[Refactor] #1599 Defined mod_confusion() and replaced the calls

2 years ago[Refactor] #1599 Defined mod_blindness() and replaced the calls
Hourier [Fri, 24 Sep 2021 01:02:48 +0000 (10:02 +0900)]
[Refactor] #1599 Defined mod_blindness() and replaced the calls

2 years agoMerge pull request #1617 from habu1010/feature/class-specific-data-system
Habu [Thu, 23 Sep 2021 23:53:58 +0000 (08:53 +0900)]
Merge pull request #1617 from habu1010/feature/class-specific-data-system

[Feature] 職業固有のデータを持てるようにするシステムの導入

2 years ago[Refactor] 鍛冶師のエッセンスのデータサイズを2バイトにする
Habu [Thu, 23 Sep 2021 13:05:25 +0000 (22:05 +0900)]
[Refactor] 鍛冶師のエッセンスのデータサイズを2バイトにする

セーブデータに合わせて、鍛冶師のエッセンスの種類および所持量を
2バイト(int16_t)で持つようにする。

2 years ago[Refactor] 練気術師の固有データを magic_num から分離
Habu [Thu, 23 Sep 2021 12:02:52 +0000 (21:02 +0900)]
[Refactor] 練気術師の固有データを magic_num から分離

2 years ago[Feature] 職業固有のデータを持てるようにするシステムの導入
Habu [Thu, 23 Sep 2021 12:02:52 +0000 (21:02 +0900)]
[Feature] 職業固有のデータを持てるようにするシステムの導入

現在職業固有のデータを持たせる時、 magic_num1, magic_num2 という
共通の配列を好き勝手に使用していてコードの可読性が大きく損なわれている。
これを職業ごとにデータを持てるようにしてコードの可読性を向上させ、
またフレキシブルなデータ構造を使えるようにする。

まず手始めとして職業固有データを持たせるシステム導入と同時に、鍛冶師と
呪術ハイメイジにおける固有データの分離を行った。

2 years agoMerge pull request #1615 from sikabane-works/fix/wizard-summon-monster-command
Deskull [Thu, 23 Sep 2021 08:13:30 +0000 (17:13 +0900)]
Merge pull request #1615 from sikabane-works/fix/wizard-summon-monster-command

[Fix] ウィザードモードのID指定モンスター生成(N/n)が回数指定の事前入力のみを想定した仕様で手動指定が足りなかった

2 years agoMerge pull request #1609 from Hourier/Make-Player-Cut-Class
Hourier [Thu, 23 Sep 2021 08:04:51 +0000 (17:04 +0900)]
Merge pull request #1609 from Hourier/Make-Player-Cut-Class

PlayerCutクラスを作成して切り傷処理を移管した

2 years agoMerge branch 'develop' into fix/wizard-summon-monster-command
Deskull [Thu, 23 Sep 2021 07:41:34 +0000 (16:41 +0900)]
Merge branch 'develop' into fix/wizard-summon-monster-command

2 years ago[Implement] get_value() 関数を実装して、ウィザードモードの一部数値入力のみ汎化。
Deskull [Thu, 23 Sep 2021 07:06:11 +0000 (16:06 +0900)]
[Implement] get_value() 関数を実装して、ウィザードモードの一部数値入力のみ汎化。

2 years ago[Fix] #1578 Resolved the issue that saved cut/stun data can't be read correctly
Hourier [Thu, 23 Sep 2021 06:18:26 +0000 (15:18 +0900)]
[Fix] #1578 Resolved the issue that saved cut/stun data can't be read correctly

2 years ago[Refactor] #1578 Replaced all of player_cut to is_cut() or current()
Hourier [Wed, 22 Sep 2021 15:16:18 +0000 (00:16 +0900)]
[Refactor] #1578 Replaced all of player_cut to is_cut() or current()

2 years ago[Refactor] #1578 Replaced the expressions of print_cut() to get_expr()
Hourier [Wed, 22 Sep 2021 15:13:41 +0000 (00:13 +0900)]
[Refactor] #1578 Replaced the expressions of print_cut() to get_expr()

2 years ago[Refactor] #1578 Defined get_damage() in PlayerCut and replaced it in process_player_...
Hourier [Wed, 22 Sep 2021 14:29:13 +0000 (23:29 +0900)]
[Refactor] #1578 Defined get_damage() in PlayerCut and replaced it in process_player_hp_mp()

2 years ago[Refactor] #1578 Renamed old/new_aux to old/new_rank in bad-status-setter.cpp/h
Hourier [Wed, 22 Sep 2021 13:11:58 +0000 (22:11 +0900)]
[Refactor] #1578 Renamed old/new_aux to old/new_rank in bad-status-setter.cpp/h

2 years ago[Refactor] #1578 Separated process_stun_effect() from stun()
Hourier [Wed, 22 Sep 2021 13:07:09 +0000 (22:07 +0900)]
[Refactor] #1578 Separated process_stun_effect() from stun()

2 years ago[Refactor] #1578 Separated clear_head() from stun()
Hourier [Wed, 22 Sep 2021 13:02:58 +0000 (22:02 +0900)]
[Refactor] #1578 Separated clear_head() from stun()

2 years ago[Refactor] #1578 Separated process_stun_status() from stun()
Hourier [Wed, 22 Sep 2021 13:01:34 +0000 (22:01 +0900)]
[Refactor] #1578 Separated process_stun_status() from stun()

2 years ago[Refactor] #1578 Separated PlayerClass::lose_balance() from stun()
Hourier [Wed, 22 Sep 2021 12:55:18 +0000 (21:55 +0900)]
[Refactor] #1578 Separated PlayerClass::lose_balance() from stun()

2 years ago[Refactor] #1578 Separated decrease_int_wis() from stun()
Hourier [Wed, 22 Sep 2021 12:46:41 +0000 (21:46 +0900)]
[Refactor] #1578 Separated decrease_int_wis() from stun()

2 years ago[Refactor] #1578 Separated process_cut_effect() from cut()
Hourier [Wed, 22 Sep 2021 12:42:22 +0000 (21:42 +0900)]
[Refactor] #1578 Separated process_cut_effect() from cut()

2 years ago[Refactor] #1578 Seaparated stop_blooding() from cut()
Hourier [Wed, 22 Sep 2021 12:37:22 +0000 (21:37 +0900)]
[Refactor] #1578 Seaparated stop_blooding() from cut()

2 years ago[Refactor] #1578 Separated decrease_charisma() from cut()
Hourier [Wed, 22 Sep 2021 12:34:49 +0000 (21:34 +0900)]
[Refactor] #1578 Separated decrease_charisma() from cut()

2 years ago[Refactor] #1578 Simplified BadStatusSetter::cut() by PlayerRace::can_resist_cut()
Hourier [Wed, 22 Sep 2021 12:27:58 +0000 (21:27 +0900)]
[Refactor] #1578 Simplified BadStatusSetter::cut() by PlayerRace::can_resist_cut()

2 years ago[Refactor] #1578 Replaced the content of BadStatusSetter::cut() from raw descriptions...
Hourier [Wed, 22 Sep 2021 12:10:55 +0000 (21:10 +0900)]
[Refactor] #1578 Replaced the content of BadStatusSetter::cut() from raw descriptions to the calls of PlayerCut

2 years ago[Refactor] #1578 Made a class 'PlayerCut'
Hourier [Mon, 20 Sep 2021 23:08:02 +0000 (08:08 +0900)]
[Refactor] #1578 Made a class 'PlayerCut'

2 years agoMerge pull request #1619 from habu1010/feature/delete-max-idx
Habu [Thu, 23 Sep 2021 07:22:07 +0000 (16:22 +0900)]
Merge pull request #1619 from habu1010/feature/delete-max-idx

[Refactor] max_*_idx を廃止する

2 years ago[Refactor] 不要になった max_*_idx を削除
Habu [Thu, 23 Sep 2021 06:51:59 +0000 (15:51 +0900)]
[Refactor] 不要になった max_*_idx を削除

*_info.size() を使用することにより不要になった max_*_idx を削除する。
また、misc.txt から *_info のサイズの定義も削除し、*_info をパース
しながら動的に必要なだけサイズを拡張していくようにする。

2 years ago[Refactor] max_*_idx の代わりに *_info.size() を使用する
Habu [Thu, 23 Sep 2021 06:51:59 +0000 (15:51 +0900)]
[Refactor] max_*_idx の代わりに *_info.size() を使用する

*_info を std::vector にした事でサイズを別管理する必要がなくなった。
二重管理は混乱の元なので *_info.size() を使用するようにする。

2 years agoMerge pull request #1620 from habu1010/feature/fix-windows-term-init
Habu [Thu, 23 Sep 2021 05:51:05 +0000 (14:51 +0900)]
Merge pull request #1620 from habu1010/feature/fix-windows-term-init

[Fix] 誤ってterm_dataへのポインタを初期化している

2 years ago[Fix] 誤ってterm_dataへのポインタを初期化している
Habu [Thu, 23 Sep 2021 05:41:11 +0000 (14:41 +0900)]
[Fix] 誤ってterm_dataへのポインタを初期化している

Fix #1618.
WIPE マクロを排除した時に term_data 本体でなくポインタの方を初期化
するようにしてしまっていた。

2 years agoMerge pull request #1604 from habu1010/feature/defeat-wipe-copy-macro
Habu [Thu, 23 Sep 2021 02:17:26 +0000 (11:17 +0900)]
Merge pull request #1604 from habu1010/feature/defeat-wipe-copy-macro

WIPE/C_WIPE/COPY マクロを削除する

2 years ago[Fix] ウィザードモードのID指定モンスター生成(N/n)が回数指定の事前入力のみを想定した仕様で手動指定が足りなかった、アーティファクト生成(C)同様の仕様を追加。
Deskull [Thu, 23 Sep 2021 00:03:17 +0000 (09:03 +0900)]
[Fix] ウィザードモードのID指定モンスター生成(N/n)が回数指定の事前入力のみを想定した仕様で手動指定が足りなかった、アーティファクト生成(C)同様の仕様を追加。

2 years agoMerge pull request #1612 from shimitei/feature/sound_level
shimitei [Wed, 22 Sep 2021 23:50:55 +0000 (08:50 +0900)]
Merge pull request #1612 from shimitei/feature/sound_level

[Implement] 階段の昇降時効果音を追加

2 years agoMerge pull request #1611 from backwardsEric/wizard-modifier-pch-fix
Hourier [Wed, 22 Sep 2021 23:43:10 +0000 (08:43 +0900)]
Merge pull request #1611 from backwardsEric/wizard-modifier-pch-fix

Include <array> so template deduction works for the modifier tables …

2 years ago[Implement] 階段の昇降時効果音を追加
shimitei [Mon, 20 Sep 2021 08:01:47 +0000 (17:01 +0900)]
[Implement] 階段の昇降時効果音を追加

- stairway 階段の昇降時

2 years agoInclude <array> so template deduction works for the modifier tables when precompiled...
Eric Branlund [Wed, 22 Sep 2021 20:58:29 +0000 (13:58 -0700)]
Include <array> so template deduction works for the modifier tables when precompiled headers are not used.  Resolves https://github.com/hengband/hengband/issues/1610 .

2 years agoMerge pull request #1608 from habu1010/feature/smith-activation-detect-unique
Habu [Wed, 22 Sep 2021 15:56:26 +0000 (00:56 +0900)]
Merge pull request #1608 from habu1010/feature/smith-activation-detect-unique

[Feature] 鍛冶:階のユニークモンスターを表示する発動

2 years agoMerge pull request #1606 from habu1010/feature/refactor-debug-cmd-menu-table
Habu [Wed, 22 Sep 2021 15:06:31 +0000 (00:06 +0900)]
Merge pull request #1606 from habu1010/feature/refactor-debug-cmd-menu-table

[Refactor] デバッグコマンドのメニューテーブルの型

2 years ago[Feature] 鍛冶:階のユニークモンスターを表示する発動
Habu [Wed, 22 Sep 2021 15:02:06 +0000 (00:02 +0900)]
[Feature] 鍛冶:階のユニークモンスターを表示する発動

2 years ago[Refactor] デバッグコマンドのメニューテーブルの型
Habu [Wed, 22 Sep 2021 14:23:57 +0000 (23:23 +0900)]
[Refactor] デバッグコマンドのメニューテーブルの型

std::vector<std::vector<std::string>> である必要はないので、
std::array<std::tuple<char, concptr>> にする。(std::array の推論補助を使用)
また、 constexpr 定数とする。

2 years ago[Delete] 不要になった COPY/WIPE/C_WIPE マクロを削除する
Habu [Wed, 22 Sep 2021 13:23:11 +0000 (22:23 +0900)]
[Delete] 不要になった COPY/WIPE/C_WIPE マクロを削除する

これらのマクロはもはやC++17においては無用の長物なので削除する。

2 years agoMerge pull request #1605 from Hourier/Fix-Compilation-Warning
Hourier [Wed, 22 Sep 2021 14:23:07 +0000 (23:23 +0900)]
Merge pull request #1605 from Hourier/Fix-Compilation-Warning

quark_add() においてコンパイル警告が出るのを修正した

2 years ago[Refactor] quark_add() においてコンパイル警告が出るのを修正した
Hourier [Wed, 22 Sep 2021 14:11:46 +0000 (23:11 +0900)]
[Refactor] quark_add() においてコンパイル警告が出るのを修正した

2 years ago[Refactor] WIPE マクロの使用をやめる
Habu [Wed, 22 Sep 2021 13:19:49 +0000 (22:19 +0900)]
[Refactor] WIPE マクロの使用をやめる

C++11以降においては WIPE マクロは不要。
構造体のゼロクリアは {} を代入すればよい。
クラスオブジェクトの場合も {} を代入するとデフォルトコンストラクタで
構築したオブジェクトが代入される。

2 years ago[Refactor] COPY マクロの使用をやめる
Habu [Wed, 22 Sep 2021 13:05:49 +0000 (22:05 +0900)]
[Refactor] COPY マクロの使用をやめる

仮にC言語だったとしても、構造体のコピー代入はC言語にもある。
わざわざマクロを作った理由がわからない。

2 years agoMerge pull request #1603 from habu1010/feature/fix-no-sust-status-color
Habu [Wed, 22 Sep 2021 13:06:01 +0000 (22:06 +0900)]
Merge pull request #1603 from habu1010/feature/fix-no-sust-status-color

[Fix] 維持のない能力値アップが明るい緑でなく深い緑で表示される

2 years ago[Refactor] C_WIPE マクロの使用をやめる
Habu [Wed, 22 Sep 2021 12:57:45 +0000 (21:57 +0900)]
[Refactor] C_WIPE マクロの使用をやめる

きちんと std::fill を書いたほうがやっていることが明らかになる。
配列のゼロ初期化はそもそも {} を代入すれば済む。

2 years ago[Fix] 維持のない能力値アップが明るい緑でなく深い緑で表示される
Habu [Wed, 22 Sep 2021 12:31:04 +0000 (21:31 +0900)]
[Fix] 維持のない能力値アップが明るい緑でなく深い緑で表示される

Fix #1602.
特性フラグを FlagGroup 化した時にロジックを読み間違えて能力値維持フラグを
渡すべきところを能力値アップフラグを渡すようにしてしまっていた。
正しく能力値維持を渡すように修正する。

2 years agoMerge pull request #1576 from Hourier/Make-Bad-Status-Setter-Class
Hourier [Wed, 22 Sep 2021 11:51:34 +0000 (20:51 +0900)]
Merge pull request #1576 from Hourier/Make-Bad-Status-Setter-Class

bad-status-setter.cpp/h のクラス化

2 years ago[Refactor] #1576 Habu氏の指摘に則ってコードを修正した (エルドリッチホラー)
Hourier [Wed, 22 Sep 2021 10:33:18 +0000 (19:33 +0900)]
[Refactor] #1576 Habu氏の指摘に則ってコードを修正した (エルドリッチホラー)

2 years ago[Refactor] #1576 Habu氏の指摘に則ってコードを修正した (std::clamp)
Hourier [Wed, 22 Sep 2021 10:14:12 +0000 (19:14 +0900)]
[Refactor] #1576 Habu氏の指摘に則ってコードを修正した (std::clamp)

2 years ago[Refactor] #1558 Replaced set_cut() to cut() and transferred it into the class 'BadSt...
Hourier [Mon, 20 Sep 2021 08:06:58 +0000 (17:06 +0900)]
[Refactor] #1558 Replaced set_cut() to cut() and transferred it into the class 'BadStatusSetter'

2 years ago[Refactor] #1558 Replaced set_stun() to stun() and transferred it into the class...
Hourier [Mon, 20 Sep 2021 07:39:49 +0000 (16:39 +0900)]
[Refactor] #1558 Replaced set_stun() to stun() and transferred it into the class 'BadStatusSetter'

2 years ago[Refactor] #1558 Replaced set_slow() to slowness() and transferred it into the class...
Hourier [Mon, 20 Sep 2021 07:21:46 +0000 (16:21 +0900)]
[Refactor] #1558 Replaced set_slow() to slowness() and transferred it into the class 'BadStatusSetter'

2 years ago[Refactor] #1558 Replaced set_image() to hallucination() and transferred it into...
Hourier [Mon, 20 Sep 2021 06:52:19 +0000 (15:52 +0900)]
[Refactor] #1558 Replaced set_image() to hallucination() and transferred it into the class 'BadStatusSetter'

2 years ago[Refactor] #1558 Renamed player_type::image to player_type::hallucinated
Hourier [Mon, 20 Sep 2021 06:45:00 +0000 (15:45 +0900)]
[Refactor] #1558 Renamed player_type::image to player_type::hallucinated

2 years ago[Refactor] #1558 Replaced set_paralyzed() to paralysis() and transferred it into...
Hourier [Mon, 20 Sep 2021 06:14:47 +0000 (15:14 +0900)]
[Refactor] #1558 Replaced set_paralyzed() to paralysis() and transferred it into the class 'BadStatusSetter'

2 years ago[Refactor] #1558 Replaced set_afraid() to afraidness() and transferred it into the...
Hourier [Mon, 20 Sep 2021 05:35:53 +0000 (14:35 +0900)]
[Refactor] #1558 Replaced set_afraid() to afraidness() and transferred it into the class 'BadStatusSetter'

2 years ago[Refactor] #1558 Reshaped exe_eat_food_type_object()
Hourier [Mon, 20 Sep 2021 04:43:13 +0000 (13:43 +0900)]
[Refactor] #1558 Reshaped exe_eat_food_type_object()

2 years ago[Implement] #1558 (作業のついでに)食べ物の味について英語表記を追加した
Hourier [Mon, 20 Sep 2021 04:34:45 +0000 (13:34 +0900)]
[Implement] #1558 (作業のついでに)食べ物の味について英語表記を追加した

2 years ago[Refactor] #1558 Replaced set_poisoned() to poison() and transferred it into the...
Hourier [Mon, 20 Sep 2021 03:47:20 +0000 (12:47 +0900)]
[Refactor] #1558 Replaced set_poisoned() to poison() and transferred it into the class 'BadStatusSetter'

2 years ago[Refactor] #1558 Replaced set_confused() to confusion() and transferred it into the...
Hourier [Mon, 20 Sep 2021 02:43:41 +0000 (11:43 +0900)]
[Refactor] #1558 Replaced set_confused() to confusion() and transferred it into the class 'BadStatusSetter'

2 years ago[Refactor] #1558 Replaced set_blind() to blindness() and transferred it into the...
Hourier [Mon, 20 Sep 2021 01:23:30 +0000 (10:23 +0900)]
[Refactor] #1558 Replaced set_blind() to blindness() and transferred it into the class 'BadStatusSetter'

2 years ago[Refactor] #1558 Defined the class 'BadStatusSetter'
Hourier [Sun, 19 Sep 2021 22:36:02 +0000 (07:36 +0900)]
[Refactor] #1558 Defined the class 'BadStatusSetter'

2 years agoMerge pull request #1601 from habu1010/feature/defeat-make-free-macro
Habu [Wed, 22 Sep 2021 11:11:18 +0000 (20:11 +0900)]
Merge pull request #1601 from habu1010/feature/defeat-make-free-macro

[Delete] メモリ確保/解放関連のマクロを削除

2 years ago[Delete] 未使用の SIZE/C_SIZE/C_COPY マクロを削除
Habu [Wed, 22 Sep 2021 11:02:32 +0000 (20:02 +0900)]
[Delete] 未使用の SIZE/C_SIZE/C_COPY マクロを削除

2 years ago[Delete] メモリ確保/解放関連のマクロを削除
Habu [Wed, 22 Sep 2021 10:44:33 +0000 (19:44 +0900)]
[Delete] メモリ確保/解放関連のマクロを削除

すべてのメモリ確保/解放マクロの使用を排除できたので、またこれを
使用しようというバカな気を起こさないようにマクロを完全に削除する。
STLのコンテナやスマートポインタがあるいまとなっては、これらを使用
する必要は一切無い。

2 years agoMerge pull request #1597 from habu1010/feature/c-make-defeat-x11
Habu [Wed, 22 Sep 2021 10:22:38 +0000 (19:22 +0900)]
Merge pull request #1597 from habu1010/feature/c-make-defeat-x11

[Refactor] X11版のメモリ領域確保の方法を変更

2 years agoMerge pull request #1596 from habu1010/feature/fix-wrong-c-kill
Habu [Wed, 22 Sep 2021 10:21:43 +0000 (19:21 +0900)]
Merge pull request #1596 from habu1010/feature/fix-wrong-c-kill

[Fix] string_make で確保した領域に C_KILL している

2 years ago[Refactor] X11版のメモリ領域確保の方法を変更
Habu [Tue, 21 Sep 2021 15:27:04 +0000 (00:27 +0900)]
[Refactor] X11版のメモリ領域確保の方法を変更

MAKE マクロの使用を避けるため、MAKE マクロで領域を確保しているポインタ変数を
std::unique_ptr に変更し、std::make_unique により領域を確保する。
XCreateImage に渡すデータ領域は、APIの使い方に従って malloc で確保するようにする。
(XDestroyImageがデータ領域まで解放するらしいので、newで確保した領域を渡すと
どうなるのか確信が持てないため。)

2 years agoMerge pull request #1595 from habu1010/feature/fix-win-mouse-drag-memory-leak
Habu [Tue, 21 Sep 2021 15:11:04 +0000 (00:11 +0900)]
Merge pull request #1595 from habu1010/feature/fix-win-mouse-drag-memory-leak

[Fix] Windows版でマウスドラッグ時にメモリリーク

2 years ago[Fix] string_make で確保した領域に C_KILL している
Habu [Tue, 21 Sep 2021 15:07:35 +0000 (00:07 +0900)]
[Fix] string_make で確保した領域に C_KILL している

string_make で確保した文字列領域に対して C_KILL を呼んで解放している。
結果的には同じことになっているが、string_make に対しては string_free を
呼ぶべきなのでそのようにする。
また断りなく const 修飾子を外しているので、理由をコメントに記載し
const_cast を使用するようにする。

2 years ago[Fix] Windows版でマウスドラッグ時にメモリリーク
Habu [Tue, 21 Sep 2021 14:42:23 +0000 (23:42 +0900)]
[Fix] Windows版でマウスドラッグ時にメモリリーク

C_MAKE で確保した領域を解放していないためメモリリークしている。
std::vector にすることで修正する。

2 years agoMerge pull request #1593 from habu1010/feature/c-make-defeat-to-wchar-to-multibyte
Habu [Tue, 21 Sep 2021 13:46:24 +0000 (22:46 +0900)]
Merge pull request #1593 from habu1010/feature/c-make-defeat-to-wchar-to-multibyte

[Refactor] to_wchar と to_multibyte の内部バッファを std::vector にする

2 years agoMerge pull request #1592 from habu1010/feature/c-make-defeat-autopick
Habu [Tue, 21 Sep 2021 13:46:06 +0000 (22:46 +0900)]
Merge pull request #1592 from habu1010/feature/c-make-defeat-autopick

[Refactor] 自動拾い関連の配列変数を std::vector にする

2 years ago[Refactor] to_wchar と to_multibyte の内部バッファを std::vector にする
Habu [Tue, 21 Sep 2021 13:03:08 +0000 (22:03 +0900)]
[Refactor] to_wchar と to_multibyte の内部バッファを std::vector にする

C_MAKE の使用を避けるため、 to_wchar と to_multibyte クラスで使用されて
いる内部バッファ用のメンバ変数を std::vector にする。
実際その使い方がされているかわからないがNULLポインタを返す仕様を維持する
ために std::optional で NULL ポインタかどうかをエミュレートする。

2 years ago[Refactor] 自動拾い関連の配列変数を std::vector にする
Habu [Tue, 21 Sep 2021 12:45:22 +0000 (21:45 +0900)]
[Refactor] 自動拾い関連の配列変数を std::vector にする

C_MAKE の使用を避けるため、自動拾い設定リスト autopick_list と、
自動拾いエディタのテキスト領域 text_body_type::lines_list を
std::vector にする。
また、string_make によるメモリリークを避けるため autopick_type の
メンバ name と insc を std::string に変更する。
これにより autopick_free_entry 関数は不要となるので削除する。

2 years ago[Style] clang-formatによる整形
Habu [Tue, 21 Sep 2021 12:45:22 +0000 (21:45 +0900)]
[Style] clang-formatによる整形

2 years agoMerge pull request #1591 from habu1010/feature/c-make-defeat-alloc-table
Habu [Tue, 21 Sep 2021 12:27:25 +0000 (21:27 +0900)]
Merge pull request #1591 from habu1010/feature/c-make-defeat-alloc-table

[Refactor] alloc_*_table に std::vector を使用する

2 years agoMerge pull request #1590 from habu1010/feature/c-make-defeat-quark
Habu [Tue, 21 Sep 2021 12:14:05 +0000 (21:14 +0900)]
Merge pull request #1590 from habu1010/feature/c-make-defeat-quark

[Refactor] quark関連のコード

2 years ago[Refactor] alloc_*_table に std::vector を使用する
Habu [Tue, 21 Sep 2021 11:28:12 +0000 (20:28 +0900)]
[Refactor] alloc_*_table に std::vector を使用する

C_MAKE の使用を避けるため、alloc_race_table, alloc_kind_table に
std::vector を使用する。
グローバルな alloc_race_size, alloc_kind_size 変数は不要となるため
削除する。

2 years ago[Refactor] quark関連のコード
Habu [Tue, 21 Sep 2021 08:38:38 +0000 (17:38 +0900)]
[Refactor] quark関連のコード

C_MAKE を避けるため、アイテムに刻んだ銘を扱う配列変数を
std::vector<std::string> にする。
quark関連の変数や定数はグローバルで見える必要が無いので、cppファイルに
移動する。

2 years agoMerge pull request #1588 from habu1010/feature/c-make-defeat-file-rw-buffer
Habu [Tue, 21 Sep 2021 10:36:58 +0000 (19:36 +0900)]
Merge pull request #1588 from habu1010/feature/c-make-defeat-file-rw-buffer

[Refactor] ファイル読み書き用のバッファを std::vector にする

2 years agoMerge pull request #1589 from habu1010/feature/c-make-defeat-macro
Habu [Tue, 21 Sep 2021 10:36:41 +0000 (19:36 +0900)]
Merge pull request #1589 from habu1010/feature/c-make-defeat-macro

[Refactor] マクロ関連の配列変数をstd::vectorにする

2 years agoMerge pull request #1587 from habu1010/feature/c-make-defeat-town-store-stock
Habu [Tue, 21 Sep 2021 10:36:19 +0000 (19:36 +0900)]
Merge pull request #1587 from habu1010/feature/c-make-defeat-town-store-stock

[Refactor] 街・店舗・店舗のアイテム情報を std::vector もしくは std::unique_ptr にする

2 years ago[Refactor] 街・店舗・店舗のアイテム情報を std::vector もしくは std::unique_ptr にする
Habu [Tue, 21 Sep 2021 05:50:11 +0000 (14:50 +0900)]
[Refactor] 街・店舗・店舗のアイテム情報を std::vector もしくは std::unique_ptr にする

C_MAKE マクロの使用を避けるため、街・店舗の情報を std::vector で
保持する。店舗のアイテム情報は std::vector にすると town_type や
store_type を使用するすべてのファイルで object_type を定義する
ヘッダのインクルードが必要になり煩わしいので
std::unique_ptr<object_type[]> にする。

2 years ago[Refactor] マクロ制御用配列変数の型の変更
Habu [Tue, 21 Sep 2021 08:33:37 +0000 (17:33 +0900)]
[Refactor] マクロ制御用配列変数の型の変更

C_MAKE の使用を避けるため、マクロ制御用配列変数 macro__pat,
macro__act, macro__buf を std::vector にする。
stirng_make で作成した領域の文字列を concptr で扱っていたのを
std::string に変更する。
macro__cmd は使用されていないので削除する。

2 years ago[Refactor] マクロ設定画面用のマクロ編集用バッファを用意する
Habu [Tue, 21 Sep 2021 08:24:16 +0000 (17:24 +0900)]
[Refactor] マクロ設定画面用のマクロ編集用バッファを用意する

マクロ設定画面ではマクロ編集用バッファをグローバルのバッファ
(ファイルからのマクロ読み込み時に使用される)と共用する必要はない。
むしろ共有していることでファイルから最後に読み込んだマクロが
マクロ作成時に表示されるなどおかしな挙動を示している。

2 years ago[Feature] いくつかの関数の引数を concptr から std::string_view に変更
Habu [Tue, 21 Sep 2021 08:18:11 +0000 (17:18 +0900)]
[Feature] いくつかの関数の引数を concptr から std::string_view に変更

今後の修正で string_make により作成している文字列変数を std::string に
変更していくにあたり、以下の関数を呼ぶ時にいちいち c_str() メンバ
関数を呼ばなくてよいようにするため、引数の型を concptr から
std::string_view に変更しておく。

- streq
- suffix
- prefix
- text_to_ascii
- ascii_to_text