OSDN Git Service

hengbandforosx/hengbandosx.git
3 years agoMerge pull request #246 from sikabane-works/release/3.0.0Alpha8 3.0.0Alpha8
Deskull [Sun, 21 Feb 2021 15:38:31 +0000 (00:38 +0900)]
Merge pull request #246 from sikabane-works/release/3.0.0Alpha8

Release/3.0.0 alpha8

3 years ago[Version] 3.0.0Alpha8
deskull [Sun, 21 Feb 2021 15:28:48 +0000 (00:28 +0900)]
[Version] 3.0.0Alpha8

3 years agoMerge pull request #244 from Hourier/hotfix/Fix-Blood-Sucking-Flag
Deskull [Sun, 21 Feb 2021 15:00:57 +0000 (00:00 +0900)]
Merge pull request #244 from Hourier/hotfix/Fix-Blood-Sucking-Flag

[Fix] #241 吸血の対象判定が逆になっていたのを修正した / Resolved the issue that the target…
マージします。

3 years agoMerge pull request #243 from Hourier/hotfix/Fix-Blood-Sucking-Flag
Hourier [Sun, 21 Feb 2021 14:32:57 +0000 (23:32 +0900)]
Merge pull request #243 from Hourier/hotfix/Fix-Blood-Sucking-Flag

Hotfix/fix blood sucking flag

3 years ago[Fix] #241 吸血の対象判定が逆になっていたのを修正した / Resolved the issue that the target of races for...
Hourier [Sun, 21 Feb 2021 14:23:13 +0000 (23:23 +0900)]
[Fix] #241 吸血の対象判定が逆になっていたのを修正した / Resolved the issue that the target of races for blood sucking was reversed

3 years agoMerge pull request #238 from dis-/feature/Fix-has_icky_wield_weapon
dis- [Sun, 21 Feb 2021 12:02:43 +0000 (21:02 +0900)]
Merge pull request #238 from dis-/feature/Fix-has_icky_wield_weapon

[Fix] スペルマスター、プリーストが盾装備時ふさわしくない武器判定される

3 years ago[Fix] スペルマスター、プリーストが盾装備時ふさわしくない武器判定される
dis- [Sun, 21 Feb 2021 11:55:19 +0000 (20:55 +0900)]
[Fix] スペルマスター、プリーストが盾装備時ふさわしくない武器判定される

has_icky_wield_weapon()内の判定にて、盾装備が許可されていなかった。
従来の仕様に合わせて修正する。

3 years agoMerge pull request #227 from iks3/artifact-from-xangband
iks [Sun, 21 Feb 2021 11:01:15 +0000 (20:01 +0900)]
Merge pull request #227 from iks3/artifact-from-xangband

Add: 3 artifacts from XAngband. #225

3 years agoMerge pull request #236 from dis-/feature/Fix-Fresh-Once-Save
dis- [Sun, 21 Feb 2021 06:53:41 +0000 (15:53 +0900)]
Merge pull request #236 from dis-/feature/Fix-Fresh-Once-Save

[Fix] fresh_onceオプションをセーブできない

3 years ago[Fix] fresh_onceオプションをセーブできない
dis- [Sun, 21 Feb 2021 05:43:38 +0000 (14:43 +0900)]
[Fix] fresh_onceオプションをセーブできない

option_typeのo_bitを保存している領域の都合上、o_bitは0~31しか記録できないようである。
そのため、fresh_onceをTRUEでセーブしても次回起動時デフォルトのFALSEになっていた。
今回は空き番号を使用して回避する。

3 years agoMerge pull request #222 from dis-/feature/Fix-get_artifact_index 3.0.0Alpha7
dis- [Sun, 21 Feb 2021 02:16:39 +0000 (11:16 +0900)]
Merge pull request #222 from dis-/feature/Fix-get_artifact_index

Feature/fix get artifact index

3 years ago[Fix] サウロンが確率ドロップを両方落とす #212
dis- [Sat, 20 Feb 2021 13:24:52 +0000 (22:24 +0900)]
[Fix] サウロンが確率ドロップを両方落とす #212

モンスター固有のアーティファクトをドロップする処理 get_artifact_index()内にて、複数のドロップ候補がある場合の処理に問題があった。
一つ目の候補がドロップした時点で処理を打ち切っていないため、二つ以上の候補が同時にドロップする場合があった。
フレーバー等を考慮し、ドロップが一つ確定した時点で以降の処理を打ち切る。

サウロンのドロップテーブルの数値がおかしくく、金無垢の指輪を100%ドロップしていたので、これを修正し正しい数値の10%とする。

仕様変更によりスルトがオーブしか落とさなくなるので、オーブ50%ドロップ、オーブを落とさなかったとき神々の黄昏ドロップに仕様変更とする。

get_artifact_index()内にartifact生成の処理があることから、関数名をdrop_artifact_index()に変更する。

3 years agoMerge pull request #230 from sikabane-works/release/3.0.0Alpha7
Habu [Sun, 21 Feb 2021 01:28:56 +0000 (10:28 +0900)]
Merge pull request #230 from sikabane-works/release/3.0.0Alpha7

[Version] 3.0.0Alpha7

3 years agoMerge pull request #233 from sikabane-works/release/3.0.0Alpha7
Deskull [Sun, 21 Feb 2021 01:24:36 +0000 (10:24 +0900)]
Merge pull request #233 from sikabane-works/release/3.0.0Alpha7

Release/3.0.0 alpha7

3 years ago[Version] 3.0.0Alpha7
deskull [Sat, 20 Feb 2021 16:28:16 +0000 (01:28 +0900)]
[Version] 3.0.0Alpha7

3 years agoMerge pull request #232 from iks3/avoid-auto-debug-save-erasing-inkey-queue
Deskull [Sun, 21 Feb 2021 00:42:55 +0000 (09:42 +0900)]
Merge pull request #232 from iks3/avoid-auto-debug-save-erasing-inkey-queue

セーブ直後にキャラクターが移動できない #231

3 years agoFix: avoid auto debug saving erasing inkey queue #231
iks [Sat, 20 Feb 2021 17:41:28 +0000 (02:41 +0900)]
Fix: avoid auto debug saving erasing inkey queue #231

non-macro commands do not occuring auto debug saving while they are running, because save_player() function erases inkey queue after saving and result of it inkey() function waits next key input unexpectedly.

3 years agoMerge pull request #224 from habu1010/feature/workflow-publishing-spoiler-page
Deskull [Sat, 20 Feb 2021 16:11:51 +0000 (01:11 +0900)]
Merge pull request #224 from habu1010/feature/workflow-publishing-spoiler-page

[feature] 自動生成スポイラーのサイトをpublishするWorkflow

3 years agoAdd: 3 artifacts from XAngband. #225
iks [Sat, 20 Feb 2021 14:36:25 +0000 (23:36 +0900)]
Add: 3 artifacts from XAngband. #225

3 years ago[feature] 自動生成スポイラーのサイトをpublishするWorkflow
Habu [Sat, 20 Feb 2021 13:08:02 +0000 (22:08 +0900)]
[feature] 自動生成スポイラーのサイトをpublishするWorkflow

https://hengband.github.io/spoiler/ に
自動生成スポイラーを自動的に生成してアップロードする
GitHub Actions workflow

3 years agoMerge pull request #223 from Hourier/feature/Refactor-Monsters-Alpha7
Deskull [Sat, 20 Feb 2021 14:05:05 +0000 (23:05 +0900)]
Merge pull request #223 from Hourier/feature/Refactor-Monsters-Alpha7

Feature/refactor monsters alpha7

3 years ago[Refactor] #41042 Fixed the flavor texts of aqua illusions
Hourier [Sat, 20 Feb 2021 05:56:27 +0000 (14:56 +0900)]
[Refactor] #41042 Fixed the flavor texts of aqua illusions

3 years ago[Refactor] #41042 『ソラリス』のパラメータを調整した / Adjusted the parameters of Solaris
Hourier [Thu, 18 Feb 2021 09:23:30 +0000 (18:23 +0900)]
[Refactor] #41042 『ソラリス』のパラメータを調整した / Adjusted the parameters of Solaris

3 years ago[Refactor] #41042 『ビッグキューちゃん』の打撃を少し弱めた / Decreased the attack dices of Raphael (big...
Hourier [Tue, 16 Feb 2021 11:21:03 +0000 (20:21 +0900)]
[Refactor] #41042 『ビッグキューちゃん』の打撃を少し弱めた / Decreased the attack dices of Raphael (big raven)

3 years ago[Refactor] #41042 ドラウグル・デスロードのレアリティを1から2に下げた / Decreased the rarity of draugr deathlo...
Hourier [Sun, 14 Feb 2021 15:35:59 +0000 (00:35 +0900)]
[Refactor] #41042 ドラウグル・デスロードのレアリティを1から2に下げた / Decreased the rarity of draugr deathlord from 1 to 2

3 years ago[Refactor] #41042 『アルドゥイン』の打撃属性を変更した / Changed the effect of Alduin's blow
Hourier [Sun, 14 Feb 2021 15:34:48 +0000 (00:34 +0900)]
[Refactor] #41042 『アルドゥイン』の打撃属性を変更した / Changed the effect of Alduin's blow

3 years ago[Refactor] #41042 『ケルベロス』のパラメータを最深層ユニークに相応しく調整した / Adjusted the parameters of Cerberu...
Hourier [Sun, 14 Feb 2021 13:15:20 +0000 (22:15 +0900)]
[Refactor] #41042 『ケルベロス』のパラメータを最深層ユニークに相応しく調整した / Adjusted the parameters of Cerberus in order to become a suitable monster in 90F or deeper

3 years ago[Refactor] #41042 泡の経験値を調整した / Adjusted EXP of aqua illusions
Hourier [Sun, 14 Feb 2021 09:50:56 +0000 (18:50 +0900)]
[Refactor] #41042 泡の経験値を調整した / Adjusted EXP of aqua illusions

3 years agoMerge pull request #213 from dis-/feature/Implement-Shoot-Slaying
dis- [Sat, 20 Feb 2021 12:58:31 +0000 (21:58 +0900)]
Merge pull request #213 from dis-/feature/Implement-Shoot-Slaying

Feature/implement shoot slaying

3 years agoMerge pull request #199 from dis-/feature/Fix-Option
dis- [Sat, 20 Feb 2021 12:51:07 +0000 (21:51 +0900)]
Merge pull request #199 from dis-/feature/Fix-Option

[Feature] fresh_afterコマンドの分割

3 years agoMerge pull request #209 from dis-/feature/Spoiler-Wild
dis- [Sat, 20 Feb 2021 12:49:17 +0000 (21:49 +0900)]
Merge pull request #209 from dis-/feature/Spoiler-Wild

[Implement] 荒野に出現するモンスター一覧のスポイラー出力

3 years agoMerge pull request #125 from taotao54321/fix-ensure-connected-floor
taotao54321 [Sat, 20 Feb 2021 12:46:40 +0000 (21:46 +0900)]
Merge pull request #125 from taotao54321/fix-ensure-connected-floor

[Feature] ダンジョンフロアが連結でないとき再生成を試みる

3 years agoMerge pull request #205 from sikabane-works/feature/fix-do_get_mon_num_prep
Deskull [Sat, 20 Feb 2021 12:22:22 +0000 (21:22 +0900)]
Merge pull request #205 from sikabane-works/feature/fix-do_get_mon_num_prep

Feature/fix do get mon num prep

3 years ago[Fix] ★スリング『ジャイアント・キリング』のスレイングが効いていない #135
dis- [Sat, 20 Feb 2021 12:10:27 +0000 (21:10 +0900)]
[Fix] ★スリング『ジャイアント・キリング』のスレイングが効いていない #135

射撃武器側のスレイングが未実装であった件を解決した。
暫定の仕様として、弓と矢のスレイングのうち一番高いものだけが採用される。
弓のスレイングは非常に強力なので、今後の取扱には注意を要する。

3 years ago[Refactor] shoot.cのBIT_FLAGS演算をマクロを用いて整理
dis- [Sat, 20 Feb 2021 11:29:06 +0000 (20:29 +0900)]
[Refactor] shoot.cのBIT_FLAGS演算をマクロを用いて整理

可読性確保のため。このコミットでは動作をほぼ変更しない。
ただし826行はフラグ反転していたので、この機会に修正する。

3 years agoMerge pull request #206 from dis-/feature/Refactor-player-status
dis- [Sat, 20 Feb 2021 09:47:20 +0000 (18:47 +0900)]
Merge pull request #206 from dis-/feature/Refactor-player-status

[Refactor] player-statusのBIT_FLAGS処理をマクロを用いて表記

3 years agoMerge pull request #189 from habu1010/feature/output-spoiler-optoins-for-unix
Deskull [Sat, 20 Feb 2021 07:37:08 +0000 (16:37 +0900)]
Merge pull request #189 from habu1010/feature/output-spoiler-optoins-for-unix

[feature] UNIX系環境用のスポイラーを出力するオプション

3 years ago[Implement] 荒野に出現するモンスター一覧のスポイラー出力
dis- [Sat, 20 Feb 2021 06:46:03 +0000 (15:46 +0900)]
[Implement] 荒野に出現するモンスター一覧のスポイラー出力

スポイラー一覧出力を拡張し、WILD_*フラグを保持するモンスターの一覧を出力するように変更した。

3 years ago[Feature] fresh_before/after/messageとfresh_onceの競合時の処理
dis- [Sat, 20 Feb 2021 05:01:42 +0000 (14:01 +0900)]
[Feature] fresh_before/after/messageとfresh_onceの競合時の処理

これまでfresh_*のオプションの描写タイミングが競合することはなかったが、fresh_onceは描写を制限するため競合することがある。
オプションの選択肢を最大化するため、fresh_onceで描写を制限していてもその他オプションの描画タイミングは強制的に描写を行うよう変更する。
描写回数を最低にしたいプレイヤーはfresh_onceをON、他をOFFにすれば良い。

3 years ago[Refactor] player-statusのBIT_FLAGS処理をマクロを用いて表記
dis- [Sat, 20 Feb 2021 04:31:58 +0000 (13:31 +0900)]
[Refactor] player-statusのBIT_FLAGS処理をマクロを用いて表記

可読性向上のため、動作変更を伴わない整理を行う。
ついでに、初回定義時に誤っていたreset_bit()マクロの定義を修正。

3 years agoMerge pull request #201 from backwardsEric/english-elder-elemental
Deskull [Sat, 20 Feb 2021 03:34:07 +0000 (12:34 +0900)]
Merge pull request #201 from backwardsEric/english-elder-elemental

English: try to improve the descriptions of the elder elementals

3 years ago[Fix] do_get_mon_num_prep() 英語デバッグメッセージ修正. / Fix English debug message in do_get_mon_...
deskull [Sat, 20 Feb 2021 03:28:45 +0000 (12:28 +0900)]
[Fix] do_get_mon_num_prep() 英語デバッグメッセージ修正. / Fix English debug message in do_get_mon_num_prep().

3 years ago[Fix] do_get_mon_num_prep() のマジックナンバー除去. / Fix magic number in do_get_mon_num_prep().
deskull [Sat, 20 Feb 2021 03:25:18 +0000 (12:25 +0900)]
[Fix] do_get_mon_num_prep() のマジックナンバー除去. / Fix magic number in do_get_mon_num_prep().

3 years agoMerge pull request #204 from dis-/feature/Fix-mon_hook_shallow_water
dis- [Sat, 20 Feb 2021 03:20:57 +0000 (12:20 +0900)]
Merge pull request #204 from dis-/feature/Fix-mon_hook_shallow_water

[Fix] 水辺に出てくる敵の出現率が低下 #197

3 years ago[Fix] 水辺に出てくる敵の出現率が低下 #197
dis- [Sat, 20 Feb 2021 03:05:06 +0000 (12:05 +0900)]
[Fix] 水辺に出てくる敵の出現率が低下 #197

mon_hook_shallow_water()で浅い水地形に出現するモンスターの判定結果が反転していた。
フラグ判定の可読性のなさはは随所で問題になっているので、マクロtest_bitを定義してこれを使用する。
monster-race-hook.c全体にこれを適用した。

3 years agoMerge pull request #203 from habu1010/feature/prohibit-friendly-monster-in-arena
Habu [Sat, 20 Feb 2021 00:22:03 +0000 (09:22 +0900)]
Merge pull request #203 from habu1010/feature/prohibit-friendly-monster-in-arena

[fix] アリーナで友好的な敵が出現 #202

3 years ago[fix] アリーナで友好的な敵が出現 #202
Habu [Fri, 19 Feb 2021 23:17:39 +0000 (08:17 +0900)]
[fix] アリーナで友好的な敵が出現 #202

FRIENDLYフラグ持ちのエルフ・ロードがアリーナでも
友好的な状態で出現する。
アリーナで友好的というのはやはりおかしい気が
するのでアリーナではFRIENDLYフラグ持ちでも
友好的な状態で生成しないようにする。

3 years agoFor the English descriptions of the elder elementals, use singular nouns for the...
Eric Branlund [Fri, 19 Feb 2021 18:25:29 +0000 (10:25 -0800)]
For the English descriptions of the elder elementals, use singular nouns for the forms compared to the shape of the elemental.  Rephrase the second sentences for the air, magma, and fire elder elementals - taking some liberties with the translation in the case of the air and fire elder elementals.

3 years agoMerge pull request #191 from taotao54321/fix-blue-mage-learn-timing
taotao54321 [Fri, 19 Feb 2021 15:33:48 +0000 (00:33 +0900)]
Merge pull request #191 from taotao54321/fix-blue-mage-learn-timing

[Fix] 青魔道師の一貫性のないラーニング判定を修正

3 years ago[Fix] 青魔道師の一貫性のないラーニング判定を修正
taotao54321 [Thu, 18 Feb 2021 16:21:00 +0000 (01:21 +0900)]
[Fix] 青魔道師の一貫性のないラーニング判定を修正

例えばプラズマボルトで朦朧としたのにラーニングが成功したりしていた。
`learn_spell()` があちこちで呼ばれており、判定に一貫性がなくなっていた。

`learn_spell()` の呼び出しを `make_attack_spell()` 内に一本化して修正。
ただし、モンスター特技「暗闇」は特定条件下でライトエリアになる関係上、やむを得
ず特技処理内にラーニングも含めることとした。

また、従来のコードで曖昧だった仕様について以下のように定めた:

* ラーニングを行うためには、モンスターが特技を使う前の時点でプレイヤーがモンス
  ターを視認できていなければならない。
* 分身による回避はラーニングの可否に影響しない。

3 years ago[Feature] fresh_afterコマンドの分割
dis- [Fri, 19 Feb 2021 12:37:32 +0000 (21:37 +0900)]
[Feature] fresh_afterコマンドの分割

描画過多を解消するためfresh_afterコマンドに手を入れていった結果、旧来のfresh_afterコマンドとはかなり挙動が異なるものに変化していた。
旧来のfresh_afterコマンドとの差分を分離し、新たにfresh_onceコマンドとして独立させる。
このコマンドがONのとき、一度のキー入力に対し描写を一度に制限する。

3 years agoMerge pull request #195 from backwardsEric/english-yuuichi-arsonist
Hourier [Fri, 19 Feb 2021 08:48:16 +0000 (17:48 +0900)]
Merge pull request #195 from backwardsEric/english-yuuichi-arsonist

English: description for Yu'uichi the Arsonist

3 years agoReword the first sentence of the English description for Yu'uichi. It is an interpol...
Eric Branlund [Thu, 18 Feb 2021 23:41:44 +0000 (15:41 -0800)]
Reword the first sentence of the English description for Yu'uichi.  It is an interpolation between the current translation and the content at https://chargeman-ken.fandom.com/wiki/Yuichi .

3 years agoMerge pull request #194 from backwardsEric/english-aqua-illusion-edits
Deskull [Thu, 18 Feb 2021 22:09:42 +0000 (07:09 +0900)]
Merge pull request #194 from backwardsEric/english-aqua-illusion-edits

English: aqua illusion edits

3 years agoMerge pull request #193 from backwardsEric/english-falmer-edits
Deskull [Thu, 18 Feb 2021 22:07:52 +0000 (07:07 +0900)]
Merge pull request #193 from backwardsEric/english-falmer-edits

English: falmer and chaurus descriptions

3 years agoFor clarity, rephrase the description of the small aqua illusion from the 2nd lap.
Eric Branlund [Thu, 18 Feb 2021 19:29:03 +0000 (11:29 -0800)]
For clarity, rephrase the description of the small aqua illusion from the 2nd lap.

3 years agoFor the English names and descriptions for the aqua illusions, use "medium" rather...
Eric Branlund [Thu, 18 Feb 2021 19:24:41 +0000 (11:24 -0800)]
For the English names and descriptions for the aqua illusions, use "medium" rather than "middle" to be a bit more idiomatic.  For the descriptions of the extra large forms, use infinitives rather than gerunds for a similar reason.  Fix usage of "a" and "an" to match the word that immediately follows the article.

3 years agoRework the English description of the chaurus hunter to make it clearer that it's...
Eric Branlund [Thu, 18 Feb 2021 18:50:41 +0000 (10:50 -0800)]
Rework the English description of the chaurus hunter to make it clearer that it's posture is similar to that of a praying mantis.  Simplify the sentence describing the relation ot the falmer, at the expense of dropping the sense of domestication.

3 years agoReword fist part of the English description for the chaurus hunter fledgling.
Eric Branlund [Thu, 18 Feb 2021 18:38:06 +0000 (10:38 -0800)]
Reword fist part of the English description for the chaurus hunter fledgling.

3 years agoTweak the English description of the falmer warmonger so that "strongest" is more...
Eric Branlund [Thu, 18 Feb 2021 18:30:41 +0000 (10:30 -0800)]
Tweak the English description of the falmer warmonger so that "strongest" is more clearly relative to the soldiers among the falmer.

3 years agoReword the English descriptions for the chaurus and chaurus reaper to change how...
Eric Branlund [Thu, 18 Feb 2021 18:23:02 +0000 (10:23 -0800)]
Reword the English descriptions for the chaurus and chaurus reaper to change how the shell is described (since crustaceans are largely aquatic, dropped that reference).  Also changed the wording of the size comparison for the chaurus reaper.

3 years agoTweak the phrasing in the Engish description for the falmer skulker.
Eric Branlund [Thu, 18 Feb 2021 18:10:03 +0000 (10:10 -0800)]
Tweak the phrasing in the Engish description for the falmer skulker.

3 years ago[Refactor] make_attack_spell() の整理、コメント
taotao54321 [Thu, 18 Feb 2021 14:27:25 +0000 (23:27 +0900)]
[Refactor] make_attack_spell() の整理、コメント

3 years ago[Refactor] check_thrown_spell() の整理、コメント
taotao54321 [Thu, 18 Feb 2021 12:17:34 +0000 (21:17 +0900)]
[Refactor] check_thrown_spell() の整理、コメント

3 years agocosmetics: mspell-attack.c の整形。
taotao54321 [Thu, 18 Feb 2021 12:03:43 +0000 (21:03 +0900)]
cosmetics: mspell-attack.c の整形。

3 years ago[update] Usage出力で実行プログラム名を表示する
Habu [Thu, 18 Feb 2021 15:47:34 +0000 (00:47 +0900)]
[update] Usage出力で実行プログラム名を表示する

既存のコードではUsageを表示した時に、実行プログラム名が
 "angband" 固定になっている。
argv[0] を表示することで、実際に実行したプログラム名を
表示するようにする。

3 years ago[feature] UNIX系環境用のスポイラーを出力するオプション
Habu [Thu, 18 Feb 2021 15:43:42 +0000 (00:43 +0900)]
[feature] UNIX系環境用のスポイラーを出力するオプション

先にWindowsで実装された、自動生成スポイラーを出力して終了する
コマンドラインオプションを、Linux/UNIX環境にも実装する。

3 years ago[cleanup] clang-formatによる整形
Habu [Thu, 18 Feb 2021 15:44:03 +0000 (00:44 +0900)]
[cleanup] clang-formatによる整形

3 years agoMerge pull request #176 from Hourier/feature/Fix-Priest-Suitable-Weapon
Hourier [Thu, 18 Feb 2021 14:36:52 +0000 (23:36 +0900)]
Merge pull request #176 from Hourier/feature/Fix-Priest-Suitable-Weapon

[Fix] #174 プリーストの相応しい武器の判定がおかしかったのを修正した / Resolved the issue that the…

3 years agoMerge pull request #175 from Hourier/feature/Fix-Priest-Realm
Hourier [Thu, 18 Feb 2021 14:22:25 +0000 (23:22 +0900)]
Merge pull request #175 from Hourier/feature/Fix-Priest-Realm

Feature/fix priest realm

3 years agoMerge pull request #179 from habu1010/feature/Fix-xft-display-corrupting
Habu [Thu, 18 Feb 2021 14:21:15 +0000 (23:21 +0900)]
Merge pull request #179 from habu1010/feature/Fix-xft-display-corrupting

[fix] X11版でXFTを有効にすると、フォントのサイズによって描画が崩れる #178

3 years ago[fix] Xft環境でのフォントの高さの計算
Habu [Thu, 18 Feb 2021 13:54:35 +0000 (22:54 +0900)]
[fix] Xft環境でのフォントの高さの計算

フォントの高さを XftFont 構造体の ascentとdescentの和で
計算しているが、XftFont 構造体には、ascent、descent、
heightメンバがあり、XftFontOpenNameで得られる情報が
height < ascent + descent の場合がある。
この場合、フォントの高さとして ascent + descent を
使用すると縦に間延びしているように見える。
height をそのまま使ったほうが自然に見えるので、
こちらを使うように変更する。

3 years ago[fix] X11版でXFTを有効にすると、フォントのサイズによって描画が崩れる #178
Habu [Thu, 18 Feb 2021 12:12:25 +0000 (21:12 +0900)]
[fix] X11版でXFTを有効にすると、フォントのサイズによって描画が崩れる #178

フォントサイズの指定によっては文字列描画のオフセットが
半角:全角 = 1:2 とならない事があり、その場合に全角を含む
文字列をXftDrawStringUtf8で描画すると、1:2 で想定している
座標からずれてしまう。
対策として、文字列から文字を1文字ずつ取り出し、1:2 で
想定される座標に描画するようにする。
文字幅に関しては、とりあえずASCII文字=半角、それ以外
全角として扱う。
厳密にやるのであれば XftTextExtentsUtf8 でオフセットを
調べて Infofnt->wid より大きければ全角として扱うなどの
方法はあるかと思われる。

3 years ago[feature] UTF-8 処理関数
Habu [Thu, 18 Feb 2021 11:52:16 +0000 (20:52 +0900)]
[feature] UTF-8 処理関数

後の使用のため、utf-8の文字列の先頭の文字のバイト長を調べる関数
utf8_next_char_byte_length() を追加する。
また、locale/utf-8.[ch] を新設し、上記関数と既存の is_utf8_str() を
このファイルに宣言/定義する。

3 years ago[Fix] #174 プリーストの相応しい武器の判定がおかしかったのを修正した / Resolved the issue that the player as pries...
Hourier [Thu, 18 Feb 2021 10:28:29 +0000 (19:28 +0900)]
[Fix] #174 プリーストの相応しい武器の判定がおかしかったのを修正した / Resolved the issue that the player as priest can equip icky weapon without any penalty

3 years ago[Refactor] #173 Changed the type of realm_choice*[] from s32b to u32b
Hourier [Thu, 18 Feb 2021 10:04:18 +0000 (19:04 +0900)]
[Refactor] #173 Changed the type of realm_choice*[] from s32b to u32b

3 years ago[Refactor] #173 引数にconstを付けた / Added const to arguments
Hourier [Thu, 18 Feb 2021 09:51:11 +0000 (18:51 +0900)]
[Refactor] #173 引数にconstを付けた / Added const to arguments

3 years ago[Fix] #173 プリーストの第2領域が好きに選べた不具合を修正した / Resolved the issue that player as priest can...
Hourier [Thu, 18 Feb 2021 09:34:29 +0000 (18:34 +0900)]
[Fix] #173 プリーストの第2領域が好きに選べた不具合を修正した / Resolved the issue that player as priest can select any 2nd realm

3 years agoSwitch an article and add a missing verb in the English description for falmers.
Eric Branlund [Thu, 18 Feb 2021 03:49:57 +0000 (19:49 -0800)]
Switch an article and add a missing verb in the English description for falmers.

3 years agoMerge pull request #171 from backwardsEric/english-draugr-edits
Deskull [Wed, 17 Feb 2021 22:43:01 +0000 (07:43 +0900)]
Merge pull request #171 from backwardsEric/english-draugr-edits

Edit English descriptions for the draugr

3 years agoTweak the draugr death overlord description in English to hopefully be more idiomatic.
Eric Branlund [Wed, 17 Feb 2021 20:46:52 +0000 (12:46 -0800)]
Tweak the draugr death overlord description in English to hopefully be more idiomatic.

3 years agoTo be more general, replace definite articles with other words in the second part...
Eric Branlund [Wed, 17 Feb 2021 20:40:47 +0000 (12:40 -0800)]
To be more general, replace definite articles with other words in the second part of the English description for draugr deathlords.

3 years agoRephrase second part of the English description for the draugr scourge.
Eric Branlund [Wed, 17 Feb 2021 20:36:09 +0000 (12:36 -0800)]
Rephrase second part of the English description for the draugr scourge.

3 years agoFor the English description of draugr wight, use "its tomb" to be more specific and...
Eric Branlund [Wed, 17 Feb 2021 20:23:51 +0000 (12:23 -0800)]
For the English description of draugr wight, use "its tomb" to be more specific and redo the second sentence to be more explicit about what "be a dependent"  implies.

3 years agoSince it's a bit unclear whether "for treasure" in "forgive intruders for treasure...
Eric Branlund [Wed, 17 Feb 2021 20:08:11 +0000 (12:08 -0800)]
Since it's a bit unclear whether "for treasure" in "forgive intruders for treasure" is applied to "intruders" or to "forgive" (i.e. forgive in exchange for treasure), replace it with "forgive treasure-seeking intruders".

3 years agoMerge pull request #170 from taotao54321/fix-print-monster-list-off-by-one
taotao54321 [Wed, 17 Feb 2021 13:47:36 +0000 (22:47 +0900)]
Merge pull request #170 from taotao54321/fix-print-monster-list-off-by-one

[Fix] モンスターリストウィンドウが行数不足のとき最終行の表示がおかしいのを修正

3 years ago[Fix] モンスターリストウィンドウの行数不足判定の off-by-one エラー修正
taotao54321 [Wed, 17 Feb 2021 13:17:23 +0000 (22:17 +0900)]
[Fix] モンスターリストウィンドウの行数不足判定の off-by-one エラー修正

3 years agoMerge pull request #152 from dis-/feature/Implement-Windows-CommandLine-SpoilerCreate
dis- [Wed, 17 Feb 2021 12:24:32 +0000 (21:24 +0900)]
Merge pull request #152 from dis-/feature/Implement-Windows-CommandLine-SpoilerCreate

[Implement] Windows環境で--output-spoilersオプションの実装

3 years agoMerge pull request #166 from habu1010/feature/Target-prepare-for-monster-list
Habu [Wed, 17 Feb 2021 12:09:32 +0000 (21:09 +0900)]
Merge pull request #166 from habu1010/feature/Target-prepare-for-monster-list

[feature] モンスター一覧表示用のターゲット準備処理 #159

3 years agoMerge pull request #167 from taotao54321/fix-window-redraw-monster-list
taotao54321 [Wed, 17 Feb 2021 12:08:27 +0000 (21:08 +0900)]
Merge pull request #167 from taotao54321/fix-window-redraw-monster-list

[Fix] X11 ドライバで視界内モンスターリストウィンドウがリサイズ時に再描画されていなかった

3 years ago[fix] モンスター一覧表示用に位置リストを用意する
Habu [Wed, 17 Feb 2021 10:31:14 +0000 (19:31 +0900)]
[fix] モンスター一覧表示用に位置リストを用意する

グローバル変数のtmp_posを使い回すと、lookコマンドを
行っている途中でウィンドウのリサイズなどを行い
fix_monster_listが呼ばれるとtmp_posが書き換えられてしまい
動作異常が発生する。
これを避けるためモンスター一覧表示専用に位置情報リストを
用意する。pos_list構造体はサイズが大きいのでスタック領域に
定義する事を避けるが、毎回ヒープから領域の確保と開放を
行うのもどうかと思うので関数内でstatic変数として定義する
ようにする。

3 years ago[Refactor] 全ウィンドウフラグを表す定数 PW_ALL を新設
taotao54321 [Wed, 17 Feb 2021 10:28:53 +0000 (19:28 +0900)]
[Refactor] 全ウィンドウフラグを表す定数 PW_ALL を新設

redraw_window() のように全ウィンドウフラグを指定したい場合、個別の値の
OR をとる方式だと、ウィンドウフラグを新設したとき漏れが出るおそれがある。

全ウィンドウフラグを表す定数 PW_ALL を enum window_redraw_type 内に新設。

3 years ago[Fix] 視界内モンスターリストウィンドウをリサイズ時に再描画
taotao54321 [Wed, 17 Feb 2021 10:09:57 +0000 (19:09 +0900)]
[Fix] 視界内モンスターリストウィンドウをリサイズ時に再描画

リサイズ時の再描画が行われていなかったため、例えばサイズを1行まで縮めて
から再度拡大すると2行目以降が表示されなくなっていた。

redraw_window() で window_flags に PW_MONSTER_LIST を含めていなかったの
が原因なので修正した。

3 years agocosmetics: window-redrawer.c の整形。
taotao54321 [Wed, 17 Feb 2021 10:08:57 +0000 (19:08 +0900)]
cosmetics: window-redrawer.c の整形。

3 years ago[refactor] Rename ang_sort_swap_distance to ang_sort_swap_position
Habu [Wed, 17 Feb 2021 09:43:21 +0000 (18:43 +0900)]
[refactor] Rename ang_sort_swap_distance to ang_sort_swap_position

やっている処理は距離の入れ替えではなく、座標の入れ替えである。
処理内容と関数名が全く合っていないので、処理に即したものにする。

3 years ago[feature] モンスター一覧表示用のターゲット準備処理
Habu [Wed, 17 Feb 2021 09:43:21 +0000 (18:43 +0900)]
[feature] モンスター一覧表示用のターゲット準備処理

モンスター一覧をサブウィンドウに表示するためにlookコマンドで
行われるターゲット準備処理 target_set_prepare() を使用しているが、
モンスターの一覧を取得する以外の副作用があり好ましくない
動作を引き起こすことがある。
代わりに感知しているモンスター一覧を取得するターゲット準備処理を
実装して、サブウィンドウのモンスター一覧表示ではそれを使用する。
また、 target_set_prepare() を使用した事による副作用を
回避するために追加された target_clear() は不要になったので
削除する。

3 years ago[Implement] Windows環境で--output-spoilersオプションの実装
dis- [Tue, 16 Feb 2021 13:54:19 +0000 (22:54 +0900)]
[Implement] Windows環境で--output-spoilersオプションの実装

全スポイラーを出力するoutput_all_spoilers()を実装した。
コマンドラインオプションが--output-spoilersのとき、これをコールしてアプリケーションを終了する。

3 years agoMerge pull request #164 from backwardsEric/english-animate-these
Deskull [Tue, 16 Feb 2021 23:26:44 +0000 (08:26 +0900)]
Merge pull request #164 from backwardsEric/english-animate-these

English: replace "these" with "them" in description for "Animate Dead"

3 years agoMerge pull request #163 from backwardsEric/english-an-equipment
Deskull [Tue, 16 Feb 2021 23:25:09 +0000 (08:25 +0900)]
Merge pull request #163 from backwardsEric/english-an-equipment

English: reword phrases which had the awkward "an equipment".

3 years agoMerge pull request #162 from backwardsEric/english-nothing-happen
Deskull [Tue, 16 Feb 2021 23:23:49 +0000 (08:23 +0900)]
Merge pull request #162 from backwardsEric/english-nothing-happen

English: replace more instances of "Nothing happen." with "Nothing happens."