#include "angband.h"
#include "util.h"
#include "bldg.h"
+#include "core.h"
+#include "term.h"
+#include "object-ego.h"
#include "artifact.h"
#include "avatar.h"
#include "cmd-dump.h"
+#include "dungeon.h"
#include "history.h"
#include "monsterrace-hook.h"
#include "store.h"
#include "objectkind.h"
#include "monsterrace.h"
#include "autopick.h"
+#include "save.h"
+#include "realm.h"
+#include "japanese.h"
+#include "view-mainwindow.h"
/*
* The last character rolled,
"Gnomes are smaller than dwarves but larger than Halflings. They, like the hobbits, live in the earth in burrow-like homes. Gnomes make excellent mages, and have very good saving throws. They are good at searching, disarming, perception, and stealth. They have lower strength than humans so they are not very good at fighting with hand weapons. Gnomes have fair infra-vision, so they can detect warm-blooded creatures at a distance. Gnomes are intrinsically protected against paralysis.",
-"Dwarves are the headstrong miners and fighters of legend. Dwarves tend to be stronger and tougher but slower and less intelligent than humans. Because they are so headstrong and are somewhat wise, they resist spells which are cast on them. They are very good at searching, perception, fighting, and bows. Dwarves have a miserable stealth. They can never be blinded.",
+"Dwarves are the headstrong miners and fighters of legend. Dwarves tend to be stronger and tougher but slower and less intelligent than humans. Because they are so headstrong and are somewhat wise, they resist spells which are cast on them. They are very good at searching, perception, fighting, and bows. Dwarves have a miserable stealth. They can never be blinded.",
"Half-orcs make excellent warriors, but are terrible at magic. They are as bad as dwarves at stealth, and horrible at searching, disarming, and perception. Half-orcs are quite ugly, and tend to pay more for goods in town. Because of their preference to living underground to on the surface, half-orcs resist darkness attacks.",
-"Half-Trolls are incredibly strong, and have more hit points than most other races. They are also very stupid and slow. They are bad at searching, disarming, perception, and stealth. They are so ugly that a Half-Orc grimaces in their presence. They also happen to be fun to run... Half-trolls always have their strength sustained. At higher levels, Half-Trolls regenerate wounds automatically, and if he or her is warrior slowly.",
+"Half-Trolls are incredibly strong, and have more hit points than most other races. They are also very stupid and slow. They are bad at searching, disarming, perception, and stealth. They are so ugly that a Half-Orc grimaces in their presence. They also happen to be fun to run... Half-trolls always have their strength sustained. At higher levels, Half-Trolls regenerate wounds automatically and, if he or she is a warrior, require food less often.",
"The Amberites are a reputedly immortal race, who are endowed with numerous advantages in addition to their longevity. They are very tough and their constitution cannot be reduced, and their ability to heal wounds far surpasses that of any other race. Having seen virtually everything, very little is new to them, and they gain levels much slower than the other races.",
"Half-Ogres are like Half-Orcs, only more so. They are big, bad, and stupid. For warriors, they have all the necessary attributes, and they can even become wizards: after all, they are related to Ogre Magi, from whom they have learned the skill of setting trapped runes once their level is high enough. Like Half-Orcs, they resist darkness, and like Half-Trolls, they have their strength sustained.",
-"Half-Giants limited intelligence makes it difficult for them to become full spellcasters, but with their huge strength they make excellent warriors. Their thick skin makes them resistant to shards, and like Half-Ogres and Half-Trolls, they have their strength sustained.",
+"Half-Giants' limited intelligence makes it difficult for them to become full spellcasters, but with their great strength they make excellent warriors. Their thick skin makes them resistant to shards, and like Half-Ogres and Half-Trolls, they have their strength sustained.",
"Half-mortal descendants of the mighty titans, these immensely powerful creatures put almost any other race to shame. They may lack the fascinating special powers of certain other races, but their enhanced attributes more than make up for that. They learn to estimate the strengths of their foes, and their love for law and order makes them resistant to the effects of Chaos.",
"A Kutar is an expressionless animal-like living creature. The word 'kuta' means 'absentmindedly' or 'vacantly'. Their absentmindedness hurts their searching and perception skills, but renders them incapable of being confused. Their unearthly calmness and serenity make them among the most stealthy of any race. Kutars, although expressionless, are beautiful and so have a high charisma. Members of this race can learn to expand their body horizontally. This increases armour class, but renders them vulnerable to magical attacks.",
-"An android is a artificial creation with a body of machinery. They are poor at spell casting, but they make excellent warriors. They don't acquire experience like other races, but rather gain in power as they attach new equipment to their frame. Rings, amulets, and lights do not influence growth. Androids are resistant to poison, can move freely, and are immune to exp-draining attacks. Moreover, because of their hard metallic bodies, they get a bonus to AC. Androids have electronic circuits throughout their body and must beware of electric shocks. They gain very little nutrition from the food of mortals, but they can use flasks of oil as their energy source."
+"An android is a artificial creation with a body of machinery. They are poor at spell casting, but they make excellent warriors. They don't acquire experience like other races, but rather gain in power as they attach new equipment to their frame. Rings, amulets, and lights do not influence growth. Androids are resistant to poison, can move freely, and are immune to exp-draining attacks. Moreover, because of their hard metallic bodies, they get a bonus to AC. Androids have electronic circuits throughout their body and must beware of electric shocks. They gain very little nutrition from the food of mortals, but they can use flasks of oil as their energy source.",
"Merfolk implementing.",
"A Rogue is a character that prefers to live by his cunning, but is capable of fighting his way out of a tight spot. Rogues are good at locating hidden traps and doors and are the masters of disarming traps and picking locks. A rogue has a high stealth allowing him to sneak around many creatures without having to fight, or to get in a telling first blow. A rogue may also backstab a fleeing monster. Intelligence determines a Rogue's spell casting ability.",
-"A Ranger is a combination of a warrior and a mage who has developed a special affinity for the natural world around him. He is a good fighter and also good about a missile weapon such as a bow. A ranger has a good stealth, good perception, good searching, a good saving throw and is good with magical devices. Intelligence determines a Ranger's spell casting ability.",
+"A Ranger is a combination of a warrior and a mage who has developed a special affinity for the natural world around him. He is a good fighter and also good with missile weapons such as bows. A ranger has a good stealth, good perception, good searching, a good saving throw and is good with magical devices. Intelligence determines a Ranger's spell casting ability.",
"A Paladin is a combination of a warrior and a priest. Paladins are very good fighters, but not very good at missile weapons. A paladin lacks much in the way of abilities. He is poor at stealth, perception, searching, and magical devices but has a decent saving throw due to his divine alliance. Wisdom determines a Paladin's success at praying to his deity.",
"High-mages are mages who specialize in one particular field of magic and learn it very well - much better than the ordinary mage. For the price of giving up a second realm of magic, they gain substantial benefits in the mana costs, minimum levels, and failure rates in the spells of the realm of their specialty. A high mage's prime statistic is intelligence as this determines his spell casting ability. ",
-"Tourists have visited this world for the purpose of sightseeing. Their fighting skills is bad, and they cannot cast powerful spells. They are the most difficult class to win the game with. Intelligence determines a tourist's spell casting ability.",
+"Tourists have visited this world for the purpose of sightseeing. Their fighting skills are bad, and they cannot cast powerful spells. They are the most difficult class to win the game with. Intelligence determines a tourist's spell casting ability.",
"Imitators have enough fighting skills to survive, but rely on their ability to imitate monster spells. When monsters in line of sight use spells, they are added to a temporary spell list which the imitator can choose among. Spells should be imitated quickly, because timing and situation are everything. An imitator can only repeat a spell once each time he observes it. Dexterity determines general imitation ability, but a stat related to the specific action is often also taken into account.",
"Bards are something like traditional musicians. Their magical attacks are sound-based, and last as long as the Bard has mana. Although a bard cannot sing two or more songs at the same time, he or she does have the advantage that many songs affect all areas in sight. A bard's prime statistic is charisma.",
-"Red-Mages can use almost all spells from lower rank spellbooks of most realms without having to learn it. At higher level, they develop the powerful ability \"Double Magic\". However, they have large penalties in the mana costs, minimum levels, and failure rates of spells, and they cannot use any spells from higher rank spellbooks. They are not bad at using magical devices and magic resistance, and are decent fighter, but are bad at other skills. A red-mage's prime statistic is intelligence.",
+"Red-Mages can use almost all spells from lower rank spellbooks of most realms without having to learn it. At higher level, they develop the powerful ability \"Double Magic\". However, they have large penalties in the mana costs, minimum levels, and failure rates of spells, and they cannot use any spells from higher rank spellbooks. They are not bad at using magical devices and magic resistance, and are decent fighters, but are bad at other skills. A red-mage's prime statistic is intelligence.",
"Samurai, masters of the art of the blade, are the next strongest fighters after Warriors. Their spellpoints do not depend on level, but depend solely on wisdom, and they can use the technique Concentration to temporarily increase SP beyond its usual maximum value. Samurai are not good at most other skills, and many magical devices may be too difficult for them to use. Wisdom determines a Samurai's ability to use the special combat techniques available to him.",
-"A ForceTrainer is a master of the spiritual Force. They prefer fighting with neither weapon nor armor. They are not as good fighters as are Monks, but they can use both magic and the spiritual Force. Wielding weapons or wearing heavy armor disturbs use of the Force. Wisdom is a ForceTrainer's primary stat.",
+"A ForceTrainer is a master of the spiritual Force. They prefer fighting with neither weapons nor armor. They are not as good fighters as are Monks, but they can use both magic and the spiritual Force. Wielding weapons or wearing heavy armor disturbs use of the Force. Wisdom is a ForceTrainer's primary stat.",
"A Blue-Mage is a spell caster that must live by his wits, as he cannot hope to simply hack his way through the dungeon like a warrior. A major difference between the Mage and the Blue-Mage is the method of learning spells: Blue-Mages may learn spells from monsters by activating his Learning ability. A Blue-Mage's prime statistic is Intelligence as this determines his spell casting ability. ",
"A Berserker is a fearful fighter indeed, immune to fear and paralysis. At high levels, Berserkers can reflect bolt spells with their tough flesh. Furthermore, they can fight without weapons, can remove cursed equipment by force, and can even use their special combat techniques when surrounded by an anti-magic barrier. Berserkers, however, cannot use any magical devices or read any scrolls, and are hopeless at all non-combat skills. Since Berserker Spectres are quite easy to *win* with, their scores are lowered.",
-"A Weaponsmith can improve weapons and armors for him or herself. They can extract the essences of special effects from weapons or armors which have various special abilities, and can add these essences to another weapon or armor. They are good at fighting, but cannot cast spells, and are poor at skills such as stealth or magic defense.",
+"A Weaponsmith can improve weapons and armor for him or herself. They can extract the essences of special effects from weapons or armor which have various special abilities, and can add these essences to another weapon or armor. They are good at fighting, but cannot cast spells, and are poor at skills such as stealth or magic defense.",
"Mirror-Masters are spell casters; like other mages, they must live by their wits. They can create magical mirrors, and employ them in the casting of Mirror-Magic spells. A Mirror-Master standing on a mirror has greater ability and, for example, can perform quick teleports. The maximum number of Magical Mirrors which can be controlled simultaneously depends on the level. Intelligence determines a Mirror-Master's spell casting ability.",
-"A Ninja is a fearful assassin lurking in darkness. He or she can navigate effectively with no light source, catch enemies unawares, and kill with a single blow. Ninjas can use Ninjutsu, and are good at locating hidden traps and doors, disarming traps and picking locks. Since heavy armors, heavy weapons, or shields will restrict their motion greatly, they prefer light clothes, and become faster and more stealthy as they gain levels. A Ninja knows no fear and, at high level, becomes almost immune to poison and able to see invisible things. Dexterity determines a Ninja's ability to use Ninjutsu.",
+"A Ninja is a fearful assassin lurking in darkness. He or she can navigate effectively with no light source, catch enemies unawares, and kill with a single blow. Ninjas can use Ninjutsu, and are good at locating hidden traps and doors, disarming traps and picking locks. Since heavy armor, heavy weapons, or shields will restrict their motion greatly, they prefer light clothes, and become faster and more stealthy as they gain levels. A Ninja knows no fear and, at high level, becomes almost immune to poison and able to see invisible things. Dexterity determines a Ninja's ability to use Ninjutsu.",
"Snipers are good at shooting, and they can kill targets by a few shots. After they concentrate deeply, they can demonstrate their shooting talents. You can see incredibly firepower of their shots."
#endif
"\"munchkin\" is a personality for beginners. It raises all your stats and skills. With this personality, you can win the game easily, but gain little honor in doing so.",
-"\ChargeMan\" is crazy killer. It render you powerfull strength and constitution, but poor intelligence.you are not confused and seen the illusion because this you go mad from the beginning.",
+"\"ChargeMan\" is crazy killer. It render you powerfull strength and constitution, but poor intelligence.you are not confused and seen the illusion because this you go mad from the beginning.",
#endif
};
/*!
* @brief 指定されたヘルプファイルを表示する / Show specific help file
+ * @param creature_ptr プレーヤーへの参照ポインタ
* @param helpfile ファイル名
* @return なし
*/
-static void show_help(concptr helpfile)
+static void show_help(player_type *creature_ptr, concptr helpfile)
{
screen_save();
- (void)show_file(TRUE, helpfile, NULL, 0, 0);
+ (void)show_file(creature_ptr, TRUE, helpfile, NULL, 0, 0);
screen_load();
}
* @param count 選択可能な魔法領域を返すポインタ群。
* @return 選択した魔法領域のID
*/
-static byte choose_realm(s32b choices, int *count)
+static byte choose_realm(player_type *creature_ptr, s32b choices, int *count)
{
int picks[VALID_REALM] = {0};
int k, i, cs, os;
if ((*count) < 2) return auto_select;
/* Constraint to the 1st realm */
- if (p_ptr->realm2 != 255)
+ if (creature_ptr->realm2 != 255)
{
- if (p_ptr->pclass == CLASS_PRIEST)
+ if (creature_ptr->pclass == CLASS_PRIEST)
{
- if (is_good_realm(p_ptr->realm1))
+ if (is_good_realm(creature_ptr->realm1))
{
choices &= ~(CH_DEATH | CH_DAEMON);
}
/* Analize realms */
if (choices & (1L << i))
{
- if (p_ptr->realm1 == i+1)
+ if (creature_ptr->realm1 == i+1)
{
- if (p_ptr->realm2 == 255)
+ if (creature_ptr->realm2 == 255)
cs = n;
else
continue;
}
- if (p_ptr->realm2 == i+1)
+ if (creature_ptr->realm2 == i+1)
cs = n;
sym[n] = I2A(n);
/* Get a realm */
k = -1;
os = n;
- while (1) {
+ while (TRUE) {
/* Move Cursol */
if (cs != os)
{
else k = -1;
if (c == '?')
{
- show_help(_("jmagic.txt#MagicRealms", "magic.txt#MagicRealms"));
+ show_help(creature_ptr, _("jmagic.txt#MagicRealms", "magic.txt#MagicRealms"));
}
else if (c == '=')
{
* @brief 選択した魔法領域の解説を表示する / Choose the magical realms
* @return ユーザが魔法領域の確定を選んだらTRUEを返す。
*/
-static bool get_player_realms(void)
+static bool get_player_realms(player_type *creature_ptr)
{
int i, count;
put_str(" ", 5, 40);
/* Select the first realm */
- p_ptr->realm1 = REALM_NONE;
- p_ptr->realm2 = 255;
- while (1)
+ creature_ptr->realm1 = REALM_NONE;
+ creature_ptr->realm2 = 255;
+ while (TRUE)
{
char temp[80*10];
concptr t;
count = 0;
- p_ptr->realm1 = choose_realm(realm_choices1[p_ptr->pclass], &count);
+ creature_ptr->realm1 = choose_realm(creature_ptr, realm_choices1[creature_ptr->pclass], &count);
- if (255 == p_ptr->realm1) return FALSE;
- if (!p_ptr->realm1) break;
+ if (255 == creature_ptr->realm1) return FALSE;
+ if (!creature_ptr->realm1) break;
/* Clean up*/
clear_from(10);
put_str(" ", 4, 40);
put_str(" ", 5, 40);
- roff_to_buf(realm_jouhou[technic2magic(p_ptr->realm1)-1], 74, temp, sizeof(temp));
+ roff_to_buf(realm_jouhou[technic2magic(creature_ptr->realm1)-1], 74, temp, sizeof(temp));
t = temp;
for (i = 0; i < 10; i++)
{
}
/* Select the second realm */
- p_ptr->realm2 = REALM_NONE;
- if (p_ptr->realm1)
+ creature_ptr->realm2 = REALM_NONE;
+ if (creature_ptr->realm1)
{
/* Print the realm */
put_str(_("魔法 :", "Magic :"), 6, 1);
- c_put_str(TERM_L_BLUE, realm_names[p_ptr->realm1], 6, 15);
+ c_put_str(TERM_L_BLUE, realm_names[creature_ptr->realm1], 6, 15);
/* Select the second realm */
- while (1)
+ while (TRUE)
{
char temp[80*8];
concptr t;
count = 0;
- p_ptr->realm2 = choose_realm(realm_choices2[p_ptr->pclass], &count);
+ creature_ptr->realm2 = choose_realm(creature_ptr, realm_choices2[creature_ptr->pclass], &count);
- if (255 == p_ptr->realm2) return FALSE;
- if (!p_ptr->realm2) break;
+ if (255 == creature_ptr->realm2) return FALSE;
+ if (!creature_ptr->realm2) break;
/* Clean up*/
clear_from(10);
put_str(" ", 4, 40);
put_str(" ", 5, 40);
- roff_to_buf(realm_jouhou[technic2magic(p_ptr->realm2)-1], 74, temp, sizeof(temp));
+ roff_to_buf(realm_jouhou[technic2magic(creature_ptr->realm2)-1], 74, temp, sizeof(temp));
t = temp;
for (i = 0; i < A_MAX; i++)
{
}
else if (get_check_strict(_("よろしいですか?", "Are you sure? "), CHECK_DEFAULT_Y)) break;
}
- if (p_ptr->realm2)
+ if (creature_ptr->realm2)
{
/* Print the realm */
- c_put_str(TERM_L_BLUE, format("%s, %s", realm_names[p_ptr->realm1], realm_names[p_ptr->realm2]), 6, 15);
+ c_put_str(TERM_L_BLUE, format("%s, %s", realm_names[creature_ptr->realm1], realm_names[creature_ptr->realm2]), 6, 15);
}
}
- return (TRUE);
+ return TRUE;
}
* @param birther_ptr クイックスタート構造体の参照ポインタ
* @return なし。
*/
-static void save_prev_data(birther *birther_ptr)
+static void save_prev_data(player_type *creature_ptr, birther *birther_ptr)
{
int i;
/* Save the data */
- birther_ptr->psex = p_ptr->psex;
- birther_ptr->prace = p_ptr->prace;
- birther_ptr->pclass = p_ptr->pclass;
- birther_ptr->pseikaku = p_ptr->pseikaku;
- birther_ptr->realm1 = p_ptr->realm1;
- birther_ptr->realm2 = p_ptr->realm2;
- birther_ptr->age = p_ptr->age;
- birther_ptr->ht = p_ptr->ht;
- birther_ptr->wt = p_ptr->wt;
- birther_ptr->sc = p_ptr->sc;
- birther_ptr->au = p_ptr->au;
+ birther_ptr->psex = creature_ptr->psex;
+ birther_ptr->prace = creature_ptr->prace;
+ birther_ptr->pclass = creature_ptr->pclass;
+ birther_ptr->pseikaku = creature_ptr->pseikaku;
+ birther_ptr->realm1 = creature_ptr->realm1;
+ birther_ptr->realm2 = creature_ptr->realm2;
+ birther_ptr->age = creature_ptr->age;
+ birther_ptr->ht = creature_ptr->ht;
+ birther_ptr->wt = creature_ptr->wt;
+ birther_ptr->sc = creature_ptr->sc;
+ birther_ptr->au = creature_ptr->au;
/* Save the stats */
for (i = 0; i < A_MAX; i++)
{
- birther_ptr->stat_max[i] = p_ptr->stat_max[i];
- birther_ptr->stat_max_max[i] = p_ptr->stat_max_max[i];
+ birther_ptr->stat_max[i] = creature_ptr->stat_max[i];
+ birther_ptr->stat_max_max[i] = creature_ptr->stat_max_max[i];
}
/* Save the hp */
for (i = 0; i < PY_MAX_LEVEL; i++)
{
- birther_ptr->player_hp[i] = p_ptr->player_hp[i];
+ birther_ptr->player_hp[i] = creature_ptr->player_hp[i];
}
- birther_ptr->chaos_patron = p_ptr->chaos_patron;
+ birther_ptr->chaos_patron = creature_ptr->chaos_patron;
/* Save the virtues */
for (i = 0; i < 8; i++)
{
- birther_ptr->vir_types[i] = p_ptr->vir_types[i];
+ birther_ptr->vir_types[i] = creature_ptr->vir_types[i];
}
/* Save the history */
for (i = 0; i < 4; i++)
{
- strcpy(birther_ptr->history[i], p_ptr->history[i]);
+ strcpy(birther_ptr->history[i], creature_ptr->history[i]);
}
}
* @param swap TRUEならば現在のプレイヤー構造体上との内容をスワップする形で読み込む。
* @return なし。
*/
-static void load_prev_data(bool swap)
+static void load_prev_data(player_type *creature_ptr, bool swap)
{
int i;
birther temp;
/*** Save the current data ***/
- if (swap) save_prev_data(&temp);
+ if (swap) save_prev_data(creature_ptr, &temp);
/*** Load the previous data ***/
/* Load the data */
- p_ptr->psex = previous_char.psex;
- p_ptr->prace = previous_char.prace;
- p_ptr->pclass = previous_char.pclass;
- p_ptr->pseikaku = previous_char.pseikaku;
- p_ptr->realm1 = previous_char.realm1;
- p_ptr->realm2 = previous_char.realm2;
- p_ptr->age = previous_char.age;
- p_ptr->ht = previous_char.ht;
- p_ptr->wt = previous_char.wt;
- p_ptr->sc = previous_char.sc;
- p_ptr->au = previous_char.au;
+ creature_ptr->psex = previous_char.psex;
+ creature_ptr->prace = previous_char.prace;
+ creature_ptr->pclass = previous_char.pclass;
+ creature_ptr->pseikaku = previous_char.pseikaku;
+ creature_ptr->realm1 = previous_char.realm1;
+ creature_ptr->realm2 = previous_char.realm2;
+ creature_ptr->age = previous_char.age;
+ creature_ptr->ht = previous_char.ht;
+ creature_ptr->wt = previous_char.wt;
+ creature_ptr->sc = previous_char.sc;
+ creature_ptr->au = previous_char.au;
/* Load the stats */
for (i = 0; i < A_MAX; i++)
{
- p_ptr->stat_cur[i] = p_ptr->stat_max[i] = previous_char.stat_max[i];
- p_ptr->stat_max_max[i] = previous_char.stat_max_max[i];
+ creature_ptr->stat_cur[i] = creature_ptr->stat_max[i] = previous_char.stat_max[i];
+ creature_ptr->stat_max_max[i] = previous_char.stat_max_max[i];
}
/* Load the hp */
for (i = 0; i < PY_MAX_LEVEL; i++)
{
- p_ptr->player_hp[i] = previous_char.player_hp[i];
+ creature_ptr->player_hp[i] = previous_char.player_hp[i];
}
- p_ptr->mhp = p_ptr->player_hp[0];
- p_ptr->chp = p_ptr->player_hp[0];
+ creature_ptr->mhp = creature_ptr->player_hp[0];
+ creature_ptr->chp = creature_ptr->player_hp[0];
- p_ptr->chaos_patron = previous_char.chaos_patron;
+ creature_ptr->chaos_patron = previous_char.chaos_patron;
for (i = 0; i < 8; i++)
{
- p_ptr->vir_types[i] = previous_char.vir_types[i];
+ creature_ptr->vir_types[i] = previous_char.vir_types[i];
}
/* Load the history */
for (i = 0; i < 4; i++)
{
- strcpy(p_ptr->history[i], previous_char.history[i]);
+ strcpy(creature_ptr->history[i], previous_char.history[i]);
}
/*** Save the previous data ***/
* For efficiency, we include a chunk of "calc_bonuses()".\n
* @return なし
*/
-static void get_stats(void)
+static void get_stats(player_type *creature_ptr)
{
/* Roll and verify some stats */
while (TRUE)
/* Save that value */
sum += val;
- p_ptr->stat_cur[3*i] = p_ptr->stat_max[3*i] = val;
+ creature_ptr->stat_cur[3*i] = creature_ptr->stat_max[3*i] = val;
/* Extract 5 + 1d3 + 1d4 + 1d5 */
val = 5 + 3;
/* Save that value */
sum += val;
- p_ptr->stat_cur[3*i+1] = p_ptr->stat_max[3*i+1] = val;
+ creature_ptr->stat_cur[3*i+1] = creature_ptr->stat_max[3*i+1] = val;
/* Extract 5 + 1d3 + 1d4 + 1d5 */
val = 5 + 3;
/* Save that value */
sum += val;
- p_ptr->stat_cur[3*i+2] = p_ptr->stat_max[3*i+2] = val;
+ creature_ptr->stat_cur[3*i+2] = creature_ptr->stat_max[3*i+2] = val;
}
/* Verify totals */
* @brief プレイヤーの限界ステータスを決める。
* @return なし
*/
-void get_max_stats(void)
+void get_max_stats(player_type *creature_ptr)
{
int i, j;
int dice[6];
BASE_STATUS max_max = 18 + 60 + dice[i]*10;
/* Save that value */
- p_ptr->stat_max_max[i] = max_max;
- if (p_ptr->stat_max[i] > max_max)
- p_ptr->stat_max[i] = max_max;
- if (p_ptr->stat_cur[i] > max_max)
- p_ptr->stat_cur[i] = max_max;
+ creature_ptr->stat_max_max[i] = max_max;
+ if (creature_ptr->stat_max[i] > max_max)
+ creature_ptr->stat_max[i] = max_max;
+ if (creature_ptr->stat_cur[i] > max_max)
+ creature_ptr->stat_cur[i] = max_max;
}
- p_ptr->knowledge &= ~(KNOW_STAT);
- p_ptr->redraw |= (PR_STATS);
+ creature_ptr->knowledge &= ~(KNOW_STAT);
+ creature_ptr->redraw |= (PR_STATS);
}
* @brief その他「オートローラ中は算出の対象にしない」副次ステータスを処理する / Roll for some info that the auto-roller ignores
* @return なし
*/
-static void get_extra(bool roll_hitdie)
+static void get_extra(player_type *creature_ptr, bool roll_hitdie)
{
int i, j;
/* Experience factor */
- if (p_ptr->prace == RACE_ANDROID) p_ptr->expfact = rp_ptr->r_exp;
- else p_ptr->expfact = rp_ptr->r_exp + cp_ptr->c_exp;
+ if (creature_ptr->prace == RACE_ANDROID) creature_ptr->expfact = rp_ptr->r_exp;
+ else creature_ptr->expfact = rp_ptr->r_exp + cp_ptr->c_exp;
- if (((p_ptr->pclass == CLASS_MONK) || (p_ptr->pclass == CLASS_FORCETRAINER) || (p_ptr->pclass == CLASS_NINJA)) && ((p_ptr->prace == RACE_KLACKON) || (p_ptr->prace == RACE_SPRITE)))
- p_ptr->expfact -= 15;
+ if (((creature_ptr->pclass == CLASS_MONK) || (creature_ptr->pclass == CLASS_FORCETRAINER) || (creature_ptr->pclass == CLASS_NINJA)) && ((creature_ptr->prace == RACE_KLACKON) || (creature_ptr->prace == RACE_SPRITE)))
+ creature_ptr->expfact -= 15;
/* Reset record of race/realm changes */
- p_ptr->start_race = p_ptr->prace;
- p_ptr->old_race1 = 0L;
- p_ptr->old_race2 = 0L;
- p_ptr->old_realm = 0;
+ creature_ptr->start_race = creature_ptr->prace;
+ creature_ptr->old_race1 = 0L;
+ creature_ptr->old_race2 = 0L;
+ creature_ptr->old_realm = 0;
for (i = 0; i < 64; i++)
{
- if (p_ptr->pclass == CLASS_SORCERER) p_ptr->spell_exp[i] = SPELL_EXP_MASTER;
- else if (p_ptr->pclass == CLASS_RED_MAGE) p_ptr->spell_exp[i] = SPELL_EXP_SKILLED;
- else p_ptr->spell_exp[i] = SPELL_EXP_UNSKILLED;
+ if (creature_ptr->pclass == CLASS_SORCERER) creature_ptr->spell_exp[i] = SPELL_EXP_MASTER;
+ else if (creature_ptr->pclass == CLASS_RED_MAGE) creature_ptr->spell_exp[i] = SPELL_EXP_SKILLED;
+ else creature_ptr->spell_exp[i] = SPELL_EXP_UNSKILLED;
}
for (i = 0; i < 5; i++)
for (j = 0; j < 64; j++)
- p_ptr->weapon_exp[i][j] = s_info[p_ptr->pclass].w_start[i][j];
- if ((p_ptr->pseikaku == SEIKAKU_SEXY) && (p_ptr->weapon_exp[TV_HAFTED-TV_WEAPON_BEGIN][SV_WHIP] < WEAPON_EXP_BEGINNER))
+ creature_ptr->weapon_exp[i][j] = s_info[creature_ptr->pclass].w_start[i][j];
+ if ((creature_ptr->pseikaku == SEIKAKU_SEXY) && (creature_ptr->weapon_exp[TV_HAFTED-TV_WEAPON_BEGIN][SV_WHIP] < WEAPON_EXP_BEGINNER))
{
- p_ptr->weapon_exp[TV_HAFTED-TV_WEAPON_BEGIN][SV_WHIP] = WEAPON_EXP_BEGINNER;
+ creature_ptr->weapon_exp[TV_HAFTED-TV_WEAPON_BEGIN][SV_WHIP] = WEAPON_EXP_BEGINNER;
}
for (i = 0; i < GINOU_MAX; i++)
- p_ptr->skill_exp[i] = s_info[p_ptr->pclass].s_start[i];
+ creature_ptr->skill_exp[i] = s_info[creature_ptr->pclass].s_start[i];
/* Hitdice */
- if (p_ptr->pclass == CLASS_SORCERER)
- p_ptr->hitdie = rp_ptr->r_mhp/2 + cp_ptr->c_mhp + ap_ptr->a_mhp;
+ if (creature_ptr->pclass == CLASS_SORCERER)
+ creature_ptr->hitdie = rp_ptr->r_mhp/2 + cp_ptr->c_mhp + ap_ptr->a_mhp;
else
- p_ptr->hitdie = rp_ptr->r_mhp + cp_ptr->c_mhp + ap_ptr->a_mhp;
+ creature_ptr->hitdie = rp_ptr->r_mhp + cp_ptr->c_mhp + ap_ptr->a_mhp;
/* Roll for hit point unless quick-start */
- if (roll_hitdie) roll_hitdice(p_ptr, SPOP_NO_UPDATE);
+ if (roll_hitdie) roll_hitdice(creature_ptr, SPOP_NO_UPDATE);
/* Initial hitpoints */
- p_ptr->mhp = p_ptr->player_hp[0];
+ creature_ptr->mhp = creature_ptr->player_hp[0];
}
* @brief プレイヤーの生い立ちの自動生成を行う。 / Get the racial history, and social class, using the "history charts".
* @return なし
*/
-static void get_history(void)
+static void get_history(player_type *creature_ptr)
{
int i, n, chart, roll, social_class;
char buf[240];
/* Clear the previous history strings */
- for (i = 0; i < 4; i++) p_ptr->history[i][0] = '\0';
+ for (i = 0; i < 4; i++) creature_ptr->history[i][0] = '\0';
/* Clear the history text */
buf[0] = '\0';
social_class = randint1(4);
/* Starting place */
- switch (p_ptr->prace)
+ switch (creature_ptr->prace)
{
case RACE_AMBERITE:
{
else if (social_class < 1) social_class = 1;
/* Save the social class */
- p_ptr->sc = (s16b)social_class;
+ creature_ptr->sc = (s16b)social_class;
/* Skip leading spaces */
t = temp;
for(i=0 ; i<4 ; i++){
if(t[0]==0)break;
- else {strcpy(p_ptr->history[i], t);t += strlen(t)+1;}
+ else {strcpy(creature_ptr->history[i], t);t += strlen(t)+1;}
}
}
}
* @brief プレイヤーの身長体重を決める / Get character's height and weight
* @return なし
*/
-void get_height_weight(void)
+void get_height_weight(player_type *creature_ptr)
{
int h_percent; /* 身長が平均にくらべてどのくらい違うか. */
/* Calculate the height/weight for males */
- if (p_ptr->psex == SEX_MALE)
+ if (creature_ptr->psex == SEX_MALE)
{
- p_ptr->ht = randnor(rp_ptr->m_b_ht, rp_ptr->m_m_ht);
- h_percent = (int)(p_ptr->ht) * 100 / (int)(rp_ptr->m_b_ht);
- p_ptr->wt = randnor((int)(rp_ptr->m_b_wt) * h_percent /100
+ creature_ptr->ht = randnor(rp_ptr->m_b_ht, rp_ptr->m_m_ht);
+ h_percent = (int)(creature_ptr->ht) * 100 / (int)(rp_ptr->m_b_ht);
+ creature_ptr->wt = randnor((int)(rp_ptr->m_b_wt) * h_percent /100
, (int)(rp_ptr->m_m_wt) * h_percent / 300 );
}
/* Calculate the height/weight for females */
- else if (p_ptr->psex == SEX_FEMALE)
+ else if (creature_ptr->psex == SEX_FEMALE)
{
- p_ptr->ht = randnor(rp_ptr->f_b_ht, rp_ptr->f_m_ht);
- h_percent = (int)(p_ptr->ht) * 100 / (int)(rp_ptr->f_b_ht);
- p_ptr->wt = randnor((int)(rp_ptr->f_b_wt) * h_percent /100
+ creature_ptr->ht = randnor(rp_ptr->f_b_ht, rp_ptr->f_m_ht);
+ h_percent = (int)(creature_ptr->ht) * 100 / (int)(rp_ptr->f_b_ht);
+ creature_ptr->wt = randnor((int)(rp_ptr->f_b_wt) * h_percent /100
, (int)(rp_ptr->f_m_wt) * h_percent / 300 );
}
}
* @details 内部でget_height_weight()も呼び出している。
* @return なし
*/
-static void get_ahw(void)
+static void get_ahw(player_type *creature_ptr)
{
/* Get character's age */
- p_ptr->age = rp_ptr->b_age + randint1(rp_ptr->m_age);
+ creature_ptr->age = rp_ptr->b_age + randint1(rp_ptr->m_age);
/* Get character's height and weight */
- get_height_weight();
+ get_height_weight(creature_ptr);
}
/*!
* @brief プレイヤーの初期所持金を決める。 / Get the player's starting money
* @return なし
*/
-static void get_money(void)
+static void get_money(player_type *creature_ptr)
{
int i, gold;
/* Social Class determines starting gold */
- gold = (p_ptr->sc * 6) + randint1(100) + 300;
- if (p_ptr->pclass == CLASS_TOURIST)
+ gold = (creature_ptr->sc * 6) + randint1(100) + 300;
+ if (creature_ptr->pclass == CLASS_TOURIST)
gold += 2000;
/* Process the stats */
for (i = 0; i < A_MAX; i++)
{
/* Mega-Hack -- reduce gold for high stats */
- if (p_ptr->stat_max[i] >= 18 + 50) gold -= 300;
- else if (p_ptr->stat_max[i] >= 18 + 20) gold -= 200;
- else if (p_ptr->stat_max[i] > 18) gold -= 150;
- else gold -= (p_ptr->stat_max[i] - 8) * 10;
+ if (creature_ptr->stat_max[i] >= 18 + 50) gold -= 300;
+ else if (creature_ptr->stat_max[i] >= 18 + 20) gold -= 200;
+ else if (creature_ptr->stat_max[i] > 18) gold -= 150;
+ else gold -= (creature_ptr->stat_max[i] - 8) * 10;
}
/* Minimum 100 gold */
if (gold < 100) gold = 100;
- if (p_ptr->pseikaku == SEIKAKU_NAMAKE)
+ if (creature_ptr->pseikaku == SEIKAKU_NAMAKE)
gold /= 2;
- else if (p_ptr->pseikaku == SEIKAKU_MUNCHKIN)
+ else if (creature_ptr->pseikaku == SEIKAKU_MUNCHKIN)
gold = 10000000;
- if (p_ptr->prace == RACE_ANDROID) gold /= 5;
+ if (creature_ptr->prace == RACE_ANDROID) gold /= 5;
/* Save the gold */
- p_ptr->au = gold;
+ creature_ptr->au = gold;
}
/*!
* @brief put_stats()のサブルーチンとして、オートロール中のステータスを表示する / Display stat values, subset of "put_stats()"
- * @details See 'display_player()' for screen layout constraints.
+ * @details See 'display_player(p_ptr, )' for screen layout constraints.
* @return なし
*/
-static void birth_put_stats(void)
+static void birth_put_stats(player_type *creature_ptr)
{
int i, j, m, p;
int col;
j = rp_ptr->r_adj[i] + cp_ptr->c_adj[i] + ap_ptr->a_adj[i];
/* Obtain the current stat */
- m = adjust_stat(p_ptr->stat_max[i], j);
+ m = adjust_stat(creature_ptr->stat_max[i], j);
/* Put the stat */
cnv_stat(m, buf);
* @brief プレイヤー構造体の内容を初期値で消去する(名前を除く) / Clear all the global "character" data (without name)
* @return なし
*/
-static void player_wipe_without_name(void)
+static void player_wipe_without_name(player_type *creature_ptr)
{
int i;
player_type tmp;
/* Temporary copy for migration - written back later */
- COPY(&tmp, p_ptr, player_type);
+ COPY(&tmp, creature_ptr, player_type);
/* Hack -- free the "last message" string */
- if (p_ptr->last_message) string_free(p_ptr->last_message);
+ if (creature_ptr->last_message) string_free(creature_ptr->last_message);
+
+ if (creature_ptr->inventory_list != NULL) C_WIPE(creature_ptr->inventory_list, INVEN_TOTAL, object_type);
/* Hack -- zero the struct */
- (void)WIPE(p_ptr, player_type);
+ (void)WIPE(creature_ptr, player_type);
+
+ //TODO: キャラ作成からゲーム開始までに current_floor_ptr を参照しなければならない処理は今後整理して外す。
+ creature_ptr->current_floor_ptr = &floor_info;
+
+ C_MAKE(creature_ptr->inventory_list, INVEN_TOTAL, object_type);
/* Wipe the history */
for (i = 0; i < 4; i++)
{
- strcpy(p_ptr->history[i], "");
+ strcpy(creature_ptr->history[i], "");
}
/* Wipe the quests */
}
/* No weight */
- p_ptr->total_weight = 0;
+ creature_ptr->total_weight = 0;
/* No items */
- p_ptr->inven_cnt = 0;
- p_ptr->equip_cnt = 0;
+ creature_ptr->inven_cnt = 0;
+ creature_ptr->equip_cnt = 0;
- /* Clear the p_ptr->inventory_list */
+ /* Clear the inventory */
for (i = 0; i < INVEN_TOTAL; i++)
{
- object_wipe(&p_ptr->inventory_list[i]);
+ object_wipe(&creature_ptr->inventory_list[i]);
}
-
/* Start with no artifacts made yet */
for (i = 0; i < max_a_idx; i++)
{
/* Hack -- Well fed player */
- p_ptr->food = PY_FOOD_FULL - 1;
+ creature_ptr->food = PY_FOOD_FULL - 1;
/* Wipe the spells */
- if (p_ptr->pclass == CLASS_SORCERER)
+ if (creature_ptr->pclass == CLASS_SORCERER)
{
- p_ptr->spell_learned1 = p_ptr->spell_learned2 = 0xffffffffL;
- p_ptr->spell_worked1 = p_ptr->spell_worked2 = 0xffffffffL;
+ creature_ptr->spell_learned1 = creature_ptr->spell_learned2 = 0xffffffffL;
+ creature_ptr->spell_worked1 = creature_ptr->spell_worked2 = 0xffffffffL;
}
else
{
- p_ptr->spell_learned1 = p_ptr->spell_learned2 = 0L;
- p_ptr->spell_worked1 = p_ptr->spell_worked2 = 0L;
+ creature_ptr->spell_learned1 = creature_ptr->spell_learned2 = 0L;
+ creature_ptr->spell_worked1 = creature_ptr->spell_worked2 = 0L;
}
- p_ptr->spell_forgotten1 = p_ptr->spell_forgotten2 = 0L;
- for (i = 0; i < 64; i++) p_ptr->spell_order[i] = 99;
- p_ptr->learned_spells = 0;
- p_ptr->add_spells = 0;
- p_ptr->knowledge = 0;
+ creature_ptr->spell_forgotten1 = creature_ptr->spell_forgotten2 = 0L;
+ for (i = 0; i < 64; i++) creature_ptr->spell_order[i] = 99;
+ creature_ptr->learned_spells = 0;
+ creature_ptr->add_spells = 0;
+ creature_ptr->knowledge = 0;
/* Clean the mutation count */
- p_ptr->mutant_regenerate_mod = 100;
+ creature_ptr->mutant_regenerate_mod = 100;
/* Clear "cheat" options */
cheat_peek = FALSE;
cheat_turn = FALSE;
/* Assume no winning game */
- p_ptr->total_winner = FALSE;
+ current_world_ptr->total_winner = FALSE;
- p_ptr->timewalk = FALSE;
+ creature_ptr->timewalk = FALSE;
/* Assume no panic save */
- p_ptr->panic_save = 0;
+ creature_ptr->panic_save = 0;
/* Assume no cheating */
- p_ptr->noscore = 0;
- p_ptr->wizard = FALSE;
+ current_world_ptr->noscore = 0;
+ current_world_ptr->wizard = FALSE;
/* Not waiting to report score */
- p_ptr->wait_report_score = FALSE;
+ creature_ptr->wait_report_score = FALSE;
/* Default pet command settings */
- p_ptr->pet_follow_distance = PET_FOLLOW_DIST;
- p_ptr->pet_extra_flags = (PF_TELEPORT | PF_ATTACK_SPELL | PF_SUMMON_SPELL);
+ creature_ptr->pet_follow_distance = PET_FOLLOW_DIST;
+ creature_ptr->pet_extra_flags = (PF_TELEPORT | PF_ATTACK_SPELL | PF_SUMMON_SPELL);
/* Wipe the recall depths */
- for (i = 0; i < max_d_idx; i++)
+ for (i = 0; i < current_world_ptr->max_d_idx; i++)
{
max_dlv[i] = 0;
}
- p_ptr->visit = 1;
+ creature_ptr->visit = 1;
/* Reset wild_mode to FALSE */
- p_ptr->wild_mode = FALSE;
+ creature_ptr->wild_mode = FALSE;
for (i = 0; i < 108; i++)
{
- p_ptr->magic_num1[i] = 0;
- p_ptr->magic_num2[i] = 0;
+ creature_ptr->magic_num1[i] = 0;
+ creature_ptr->magic_num2[i] = 0;
}
/* Level one */
- p_ptr->max_plv = p_ptr->lev = 1;
+ creature_ptr->max_plv = creature_ptr->lev = 1;
/* Initialize arena and rewards information -KMW- */
- p_ptr->arena_number = 0;
- p_ptr->inside_arena = FALSE;
- p_ptr->inside_quest = 0;
+ creature_ptr->arena_number = 0;
+ creature_ptr->current_floor_ptr->inside_arena = FALSE;
+ creature_ptr->current_floor_ptr->inside_quest = 0;
for (i = 0; i < MAX_MANE; i++)
{
- p_ptr->mane_spell[i] = -1;
- p_ptr->mane_dam[i] = 0;
+ creature_ptr->mane_spell[i] = -1;
+ creature_ptr->mane_dam[i] = 0;
}
- p_ptr->mane_num = 0;
- p_ptr->exit_bldg = TRUE; /* only used for arena now -KMW- */
+
+ creature_ptr->mane_num = 0;
+ creature_ptr->exit_bldg = TRUE; /* only used for arena now -KMW- */
/* Bounty */
- p_ptr->today_mon = 0;
+ creature_ptr->today_mon = 0;
/* Reset monster arena */
- update_gambling_monsters();
+ update_gambling_monsters(creature_ptr);
/* Reset mutations */
- p_ptr->muta1 = 0;
- p_ptr->muta2 = 0;
- p_ptr->muta3 = 0;
+ creature_ptr->muta1 = 0;
+ creature_ptr->muta2 = 0;
+ creature_ptr->muta3 = 0;
/* Reset virtues */
- for (i = 0; i < 8; i++) p_ptr->virtues[i]=0;
+ for (i = 0; i < 8; i++) creature_ptr->virtues[i]=0;
- p_ptr->dungeon_idx = 0;
+ creature_ptr->dungeon_idx = 0;
/* Set the recall dungeon accordingly */
if (vanilla_town || ironman_downward)
{
- p_ptr->recall_dungeon = DUNGEON_ANGBAND;
+ creature_ptr->recall_dungeon = DUNGEON_ANGBAND;
}
else
{
- p_ptr->recall_dungeon = DUNGEON_GALGALS;
+ creature_ptr->recall_dungeon = DUNGEON_GALGALS;
}
/* Data migration */
- memcpy(p_ptr->name, tmp.name, sizeof(tmp.name));
+ memcpy(creature_ptr->name, tmp.name, sizeof(tmp.name));
}
/*!
* @brief ダンジョン内部のクエストを初期化する / Initialize random quests and final quests
+ * @param creature_ptr プレーヤーへの参照ポインタ
* @return なし
*/
-static void init_dungeon_quests(void)
+static void init_dungeon_quests(player_type *creature_ptr)
{
int number_of_quests = MAX_RANDOM_QUEST - MIN_RANDOM_QUEST + 1;
int i;
/* Init the random quests */
init_flags = INIT_ASSIGN;
- p_ptr->inside_quest = MIN_RANDOM_QUEST;
+ creature_ptr->current_floor_ptr->inside_quest = MIN_RANDOM_QUEST;
- process_dungeon_file("q_info.txt", 0, 0, 0, 0);
+ process_dungeon_file(creature_ptr, "q_info.txt", 0, 0, 0, 0);
- p_ptr->inside_quest = 0;
+ creature_ptr->current_floor_ptr->inside_quest = 0;
/* Generate quests */
for (i = MIN_RANDOM_QUEST + number_of_quests - 1; i >= MIN_RANDOM_QUEST; i--)
/* Init the two main quests (Oberon + Serpent) */
init_flags = INIT_ASSIGN;
- p_ptr->inside_quest = QUEST_OBERON;
+ creature_ptr->current_floor_ptr->inside_quest = QUEST_OBERON;
- process_dungeon_file("q_info.txt", 0, 0, 0, 0);
+ process_dungeon_file(creature_ptr, "q_info.txt", 0, 0, 0, 0);
quest[QUEST_OBERON].status = QUEST_STATUS_TAKEN;
- p_ptr->inside_quest = QUEST_SERPENT;
+ creature_ptr->current_floor_ptr->inside_quest = QUEST_SERPENT;
- process_dungeon_file("q_info.txt", 0, 0, 0, 0);
+ process_dungeon_file(creature_ptr, "q_info.txt", 0, 0, 0, 0);
quest[QUEST_SERPENT].status = QUEST_STATUS_TAKEN;
- p_ptr->inside_quest = 0;
+ creature_ptr->current_floor_ptr->inside_quest = 0;
}
/*!
- * @brief ゲームターンを初期化する / Reset current_world_ptr->game_turn
+ * @brief ゲームターンを初期化する / Reset turn
* @details アンデッド系種族は開始時刻を夜からにする。
* @return なし
*/
-static void init_turn(void)
+static void init_turn(player_type *creature_ptr)
{
- if ((p_ptr->prace == RACE_VAMPIRE) ||
- (p_ptr->prace == RACE_SKELETON) ||
- (p_ptr->prace == RACE_ZOMBIE) ||
- (p_ptr->prace == RACE_SPECTRE))
+ if ((creature_ptr->prace == RACE_VAMPIRE) ||
+ (creature_ptr->prace == RACE_SKELETON) ||
+ (creature_ptr->prace == RACE_ZOMBIE) ||
+ (creature_ptr->prace == RACE_SPECTRE))
{
/* Undead start just after midnight */
current_world_ptr->game_turn = (TURNS_PER_TICK*3 * TOWN_DAWN) / 4 + 1;
/*!
* @brief 所持状態にあるアイテムの中から一部枠の装備可能なものを装備させる。
- * @details アンデッド系種族は開始時刻を夜からにする。
* @return なし
*/
-static void wield_all(void)
+static void wield_all(player_type *creature_ptr)
{
object_type *o_ptr;
object_type *i_ptr;
/* Scan through the slots backwards */
for (item = INVEN_PACK - 1; item >= 0; item--)
{
- o_ptr = &p_ptr->inventory_list[item];
+ o_ptr = &creature_ptr->inventory_list[item];
/* Skip non-objects */
if (!o_ptr->k_idx) continue;
/* Make sure we can wield it and that there's nothing else in that slot */
- slot = wield_slot(o_ptr);
+ slot = wield_slot(creature_ptr, o_ptr);
if (slot < INVEN_RARM) continue;
if (slot == INVEN_LITE) continue; /* Does not wield toaches because buys a lantern soon */
- if (p_ptr->inventory_list[slot].k_idx) continue;
+ if (creature_ptr->inventory_list[slot].k_idx) continue;
i_ptr = &object_type_body;
object_copy(i_ptr, o_ptr);
/* Decrease the item (from the pack) */
if (item >= 0)
{
- inven_item_increase(item, -1);
- inven_item_optimize(item);
+ inven_item_increase(creature_ptr, item, -1);
+ inven_item_optimize(creature_ptr, item);
}
/* Decrease the item (from the floor) */
else
{
- floor_item_increase(0 - item, -1);
- floor_item_optimize(0 - item);
+ floor_item_increase(creature_ptr->current_floor_ptr, 0 - item, -1);
+ floor_item_optimize(creature_ptr->current_floor_ptr, 0 - item);
}
- o_ptr = &p_ptr->inventory_list[slot];
+ o_ptr = &creature_ptr->inventory_list[slot];
object_copy(o_ptr, i_ptr);
- p_ptr->total_weight += i_ptr->weight;
+ creature_ptr->total_weight += i_ptr->weight;
/* Increment the equip counter by hand */
- p_ptr->equip_cnt++;
+ creature_ptr->equip_cnt++;
}
return;
* @param o_ptr 処理したいオブジェクト構造体の参照ポインタ
* @return なし
*/
-static void add_outfit(object_type *o_ptr)
+static void add_outfit(player_type *creature_ptr, object_type *o_ptr)
{
s16b slot;
- object_aware(o_ptr);
+ object_aware(creature_ptr, o_ptr);
object_known(o_ptr);
- slot = inven_carry(o_ptr);
+ slot = inven_carry(creature_ptr, o_ptr);
/* Auto-inscription */
- autopick_alter_item(slot, FALSE);
+ autopick_alter_item(creature_ptr, slot, FALSE);
/* Now try wielding everything */
- wield_all();
+ wield_all(creature_ptr);
}
* @details Having an item makes the player "aware" of its purpose.
* @return なし
*/
-void player_outfit(void)
+void player_outfit(player_type *creature_ptr)
{
int i;
OBJECT_TYPE_VALUE tv;
q_ptr = &forge;
/* Give the player some food */
- switch (p_ptr->prace)
+ switch (creature_ptr->prace)
{
case RACE_VAMPIRE:
/* Nothing! */
if(q_ptr->pval)
{
q_ptr->number = 1;
- add_outfit(q_ptr);
+ add_outfit(creature_ptr, q_ptr);
}
}
break;
object_prep(q_ptr, lookup_kind(TV_STAFF, SV_STAFF_NOTHING));
q_ptr->number = 1;
- add_outfit(q_ptr);
+ add_outfit(creature_ptr, q_ptr);
break;
case RACE_ENT:
/* Potions of Water */
object_prep(q_ptr, lookup_kind(TV_POTION, SV_POTION_WATER));
q_ptr->number = (ITEM_NUMBER)rand_range(15, 23);
- add_outfit(q_ptr);
+ add_outfit(creature_ptr, q_ptr);
break;
object_prep(q_ptr, lookup_kind(TV_FLASK, SV_ANY));
/* Fuel with oil (move pval to xtra4) */
- apply_magic(q_ptr, 1, AM_NO_FIXED_ART);
+ apply_magic(creature_ptr, q_ptr, 1, AM_NO_FIXED_ART);
q_ptr->number = (ITEM_NUMBER)rand_range(7, 12);
- add_outfit(q_ptr);
+ add_outfit(creature_ptr, q_ptr);
break;
object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_RATION));
q_ptr->number = (ITEM_NUMBER)rand_range(3, 7);
- add_outfit(q_ptr);
+ add_outfit(creature_ptr, q_ptr);
}
q_ptr = &forge;
- if ((p_ptr->prace == RACE_VAMPIRE) && (p_ptr->pclass != CLASS_NINJA))
+ if ((creature_ptr->prace == RACE_VAMPIRE) && (creature_ptr->pclass != CLASS_NINJA))
{
/* Hack -- Give the player scrolls of DARKNESS! */
object_prep(q_ptr, lookup_kind(TV_SCROLL, SV_SCROLL_DARKNESS));
q_ptr->number = (ITEM_NUMBER)rand_range(2, 5);
- add_outfit(q_ptr);
+ add_outfit(creature_ptr, q_ptr);
}
- else if (p_ptr->pclass != CLASS_NINJA)
+ else if (creature_ptr->pclass != CLASS_NINJA)
{
/* Hack -- Give the player some torches */
object_prep(q_ptr, lookup_kind(TV_LITE, SV_LITE_TORCH));
q_ptr->number = (ITEM_NUMBER)rand_range(3, 7);
q_ptr->xtra4 = rand_range(3, 7) * 500;
- add_outfit(q_ptr);
+ add_outfit(creature_ptr, q_ptr);
}
q_ptr = &forge;
- if (p_ptr->prace == RACE_MERFOLK)
+ if (creature_ptr->prace == RACE_MERFOLK)
{
object_prep(q_ptr, lookup_kind(TV_RING, SV_RING_LEVITATION_FALL));
q_ptr->number = 1;
- add_outfit(q_ptr);
+ add_outfit(creature_ptr, q_ptr);
}
- if ((p_ptr->pclass == CLASS_RANGER) || (p_ptr->pclass == CLASS_CAVALRY))
+ if ((creature_ptr->pclass == CLASS_RANGER) || (creature_ptr->pclass == CLASS_CAVALRY))
{
/* Hack -- Give the player some arrows */
object_prep(q_ptr, lookup_kind(TV_ARROW, SV_AMMO_NORMAL));
q_ptr->number = (byte)rand_range(15, 20);
- add_outfit(q_ptr);
+ add_outfit(creature_ptr, q_ptr);
}
- if (p_ptr->pclass == CLASS_RANGER)
+ if (creature_ptr->pclass == CLASS_RANGER)
{
/* Hack -- Give the player some arrows */
object_prep(q_ptr, lookup_kind(TV_BOW, SV_SHORT_BOW));
- add_outfit(q_ptr);
+ add_outfit(creature_ptr, q_ptr);
}
- else if (p_ptr->pclass == CLASS_ARCHER)
+ else if (creature_ptr->pclass == CLASS_ARCHER)
{
/* Hack -- Give the player some arrows */
object_prep(q_ptr, lookup_kind(TV_ARROW, SV_AMMO_NORMAL));
q_ptr->number = (ITEM_NUMBER)rand_range(15, 20);
- add_outfit(q_ptr);
+ add_outfit(creature_ptr, q_ptr);
}
- else if (p_ptr->pclass == CLASS_HIGH_MAGE)
+ else if (creature_ptr->pclass == CLASS_HIGH_MAGE)
{
/* Hack -- Give the player some arrows */
object_prep(q_ptr, lookup_kind(TV_WAND, SV_WAND_MAGIC_MISSILE));
q_ptr->number = 1;
q_ptr->pval = (PARAMETER_VALUE)rand_range(25, 30);
- add_outfit(q_ptr);
+ add_outfit(creature_ptr, q_ptr);
}
- else if (p_ptr->pclass == CLASS_SORCERER)
+ else if (creature_ptr->pclass == CLASS_SORCERER)
{
OBJECT_TYPE_VALUE book_tval;
for (book_tval = TV_LIFE_BOOK; book_tval <= TV_LIFE_BOOK+MAX_MAGIC-1; book_tval++)
object_prep(q_ptr, lookup_kind(book_tval, 0));
q_ptr->number = 1;
- add_outfit(q_ptr);
+ add_outfit(creature_ptr, q_ptr);
}
}
- else if (p_ptr->pclass == CLASS_TOURIST)
+ else if (creature_ptr->pclass == CLASS_TOURIST)
{
- if (p_ptr->pseikaku != SEIKAKU_SEXY)
+ if (creature_ptr->pseikaku != SEIKAKU_SEXY)
{
/* Hack -- Give the player some arrows */
object_prep(q_ptr, lookup_kind(TV_SHOT, SV_AMMO_LIGHT));
q_ptr->number = rand_range(15, 20);
- add_outfit(q_ptr);
+ add_outfit(creature_ptr, q_ptr);
}
object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_BISCUIT));
q_ptr->number = rand_range(2, 4);
- add_outfit(q_ptr);
+ add_outfit(creature_ptr, q_ptr);
object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_WAYBREAD));
q_ptr->number = rand_range(2, 4);
- add_outfit(q_ptr);
+ add_outfit(creature_ptr, q_ptr);
object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_JERKY));
q_ptr->number = rand_range(1, 3);
- add_outfit(q_ptr);
+ add_outfit(creature_ptr, q_ptr);
object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_PINT_OF_ALE));
q_ptr->number = rand_range(2, 4);
- add_outfit(q_ptr);
+ add_outfit(creature_ptr, q_ptr);
object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_PINT_OF_WINE));
q_ptr->number = rand_range(2, 4);
- add_outfit(q_ptr);
+ add_outfit(creature_ptr, q_ptr);
}
- else if (p_ptr->pclass == CLASS_NINJA)
+ else if (creature_ptr->pclass == CLASS_NINJA)
{
/* Hack -- Give the player some arrows */
object_prep(q_ptr, lookup_kind(TV_SPIKE, 0));
q_ptr->number = rand_range(15, 20);
- add_outfit(q_ptr);
+ add_outfit(creature_ptr, q_ptr);
}
- else if (p_ptr->pclass == CLASS_SNIPER)
+ else if (creature_ptr->pclass == CLASS_SNIPER)
{
/* Hack -- Give the player some bolts */
object_prep(q_ptr, lookup_kind(TV_BOLT, SV_AMMO_NORMAL));
q_ptr->number = rand_range(15, 20);
- add_outfit(q_ptr);
+ add_outfit(creature_ptr, q_ptr);
}
- if(p_ptr->pseikaku == SEIKAKU_SEXY)
+ if(creature_ptr->pseikaku == SEIKAKU_SEXY)
{
- player_init[p_ptr->pclass][2][0] = TV_HAFTED;
- player_init[p_ptr->pclass][2][1] = SV_WHIP;
+ player_init[creature_ptr->pclass][2][0] = TV_HAFTED;
+ player_init[creature_ptr->pclass][2][1] = SV_WHIP;
}
/* Hack -- Give the player three useful objects */
for (i = 0; i < 3; i++)
{
/* Look up standard equipment */
- tv = player_init[p_ptr->pclass][i][0];
- sv = player_init[p_ptr->pclass][i][1];
+ tv = player_init[creature_ptr->pclass][i][0];
+ sv = player_init[creature_ptr->pclass][i][1];
- if ((p_ptr->prace == RACE_ANDROID) && ((tv == TV_SOFT_ARMOR) || (tv == TV_HARD_ARMOR))) continue;
+ if ((creature_ptr->prace == RACE_ANDROID) && ((tv == TV_SOFT_ARMOR) || (tv == TV_HARD_ARMOR))) continue;
/* Hack to initialize spellbooks */
- if (tv == TV_SORCERY_BOOK) tv = TV_LIFE_BOOK + p_ptr->realm1 - 1;
- else if (tv == TV_DEATH_BOOK) tv = TV_LIFE_BOOK + p_ptr->realm2 - 1;
+ if (tv == TV_SORCERY_BOOK) tv = TV_LIFE_BOOK + creature_ptr->realm1 - 1;
+ else if (tv == TV_DEATH_BOOK) tv = TV_LIFE_BOOK + creature_ptr->realm2 - 1;
else if (tv == TV_RING && sv == SV_RING_RES_FEAR &&
- p_ptr->prace == RACE_BARBARIAN)
+ creature_ptr->prace == RACE_BARBARIAN)
/* Barbarians do not need a ring of resist fear */
sv = SV_RING_SUSTAIN_STR;
- else if (tv == TV_RING && sv == SV_RING_SUSTAIN_INT && p_ptr->prace == RACE_MIND_FLAYER)
+ else if (tv == TV_RING && sv == SV_RING_SUSTAIN_INT && creature_ptr->prace == RACE_MIND_FLAYER)
{
tv = TV_POTION;
sv = SV_POTION_RESTORE_MANA;
object_prep(q_ptr, lookup_kind(tv, sv));
/* Assassins begin the game with a poisoned dagger */
- if ((tv == TV_SWORD || tv == TV_HAFTED) && (p_ptr->pclass == CLASS_ROGUE &&
- p_ptr->realm1 == REALM_DEATH)) /* Only assassins get a poisoned weapon */
+ if ((tv == TV_SWORD || tv == TV_HAFTED) && (creature_ptr->pclass == CLASS_ROGUE &&
+ creature_ptr->realm1 == REALM_DEATH)) /* Only assassins get a poisoned weapon */
{
q_ptr->name2 = EGO_BRAND_POIS;
}
- add_outfit(q_ptr);
+ add_outfit(creature_ptr, q_ptr);
}
/* Hack -- make aware of the water */
* @brief プレイヤーの種族選択を行う / Player race
* @return なし
*/
-static bool get_player_race(void)
+static bool get_player_race(player_type *creature_ptr)
{
int k, n, cs, os;
concptr str;
/* Choose */
k = -1;
- cs = p_ptr->prace;
+ cs = creature_ptr->prace;
os = MAX_RACES;
- while (1)
+ while (TRUE)
{
/* Move Cursol */
if (cs != os)
put_str(buf, 10, 10);
c = inkey();
if (c == 'Q') birth_quit();
- if (c == 'S') return (FALSE);
+ if (c == 'S') return FALSE;
if (c == ' ' || c == '\r' || c == '\n')
{
if(cs == MAX_RACES)
if (c == '?')
{
#ifdef JP
- show_help("jraceclas.txt#TheRaces");
+ show_help(creature_ptr, "jraceclas.txt#TheRaces");
#else
- show_help("raceclas.txt#TheRaces");
+ show_help(creature_ptr, "raceclas.txt#TheRaces");
#endif
}
else if (c == '=')
}
/* Set race */
- p_ptr->prace = (byte_hack)k;
+ creature_ptr->prace = (byte_hack)k;
- rp_ptr = &race_info[p_ptr->prace];
+ rp_ptr = &race_info[creature_ptr->prace];
/* Display */
c_put_str(TERM_L_BLUE, rp_ptr->title, 4, 15);
* @brief プレイヤーの職業選択を行う / Player class
* @return なし
*/
-static bool get_player_class(void)
+static bool get_player_class(player_type *creature_ptr)
{
int k, n, cs, os;
char c;
/* Get a class */
k = -1;
- cs = p_ptr->pclass;
+ cs = creature_ptr->pclass;
os = MAX_CLASS_CHOICE;
- while (1)
+ while (TRUE)
{
/* Move Cursol */
if (cs != os)
put_str(buf, 10, 10);
c = inkey();
if (c == 'Q') birth_quit();
- if (c == 'S') return (FALSE);
+ if (c == 'S') return FALSE;
if (c == ' ' || c == '\r' || c == '\n')
{
if(cs == MAX_CLASS_CHOICE)
if (c == '?')
{
#ifdef JP
- show_help("jraceclas.txt#TheClasses");
+ show_help(creature_ptr, "jraceclas.txt#TheClasses");
#else
- show_help("raceclas.txt#TheClasses");
+ show_help(creature_ptr, "raceclas.txt#TheClasses");
#endif
}
else if (c == '=')
}
/* Set class */
- p_ptr->pclass = (byte_hack)k;
- cp_ptr = &class_info[p_ptr->pclass];
- mp_ptr = &m_info[p_ptr->pclass];
+ creature_ptr->pclass = (byte_hack)k;
+ cp_ptr = &class_info[creature_ptr->pclass];
+ mp_ptr = &m_info[creature_ptr->pclass];
/* Display */
c_put_str(TERM_L_BLUE, cp_ptr->title, 5, 15);
* @brief プレイヤーの性格選択を行う / Player Player seikaku
* @return なし
*/
-static bool get_player_seikaku(void)
+static bool get_player_seikaku(player_type *creature_ptr)
{
int k;
int n, os, cs;
/* Dump seikakus */
for (n = 0; n < MAX_SEIKAKU; n++)
{
- if(seikaku_info[n].sex && (seikaku_info[n].sex != (p_ptr->psex+1))) continue;
+ if(seikaku_info[n].sex && (seikaku_info[n].sex != (creature_ptr->psex+1))) continue;
/* Analyze */
ap_ptr = &seikaku_info[n];
/* Get a seikaku */
k = -1;
- cs = p_ptr->pseikaku;
+ cs = creature_ptr->pseikaku;
os = MAX_SEIKAKU;
- while (1)
+ while (TRUE)
{
/* Move Cursol */
if (cs != os)
put_str(buf, 10, 10);
c = inkey();
if (c == 'Q') birth_quit();
- if (c == 'S') return (FALSE);
+ if (c == 'S') return FALSE;
if (c == ' ' || c == '\r' || c == '\n')
{
if(cs == MAX_SEIKAKU)
{
k = randint0(MAX_SEIKAKU);
}
- while(seikaku_info[k].sex && (seikaku_info[k].sex != (p_ptr->psex+1)));
+ while(seikaku_info[k].sex && (seikaku_info[k].sex != (creature_ptr->psex+1)));
cs = k;
continue;
}
{
k = randint0(n);
}
- while(seikaku_info[k].sex && (seikaku_info[k].sex != (p_ptr->psex+1)));
+ while(seikaku_info[k].sex && (seikaku_info[k].sex != (creature_ptr->psex+1)));
cs = k;
continue;
}
if (c == '8')
{
if (cs >= 4) cs -= 4;
- if (cs != MAX_SEIKAKU && seikaku_info[cs].sex && (seikaku_info[cs].sex != (p_ptr->psex+1)))
+ if (cs != MAX_SEIKAKU && seikaku_info[cs].sex && (seikaku_info[cs].sex != (creature_ptr->psex+1)))
{
if((cs - 4) > 0)
cs -= 4;
if (c == '4')
{
if (cs > 0) cs--;
- if (cs != MAX_SEIKAKU && seikaku_info[cs].sex && (seikaku_info[cs].sex != (p_ptr->psex+1)))
+ if (cs != MAX_SEIKAKU && seikaku_info[cs].sex && (seikaku_info[cs].sex != (creature_ptr->psex+1)))
{
if((cs - 1) > 0)
cs--;
if (c == '6')
{
if (cs < MAX_SEIKAKU) cs++;
- if (cs != MAX_SEIKAKU && seikaku_info[cs].sex && (seikaku_info[cs].sex != (p_ptr->psex+1)))
+ if (cs != MAX_SEIKAKU && seikaku_info[cs].sex && (seikaku_info[cs].sex != (creature_ptr->psex+1)))
{
if((cs + 1) <= MAX_SEIKAKU)
cs++;
if (c == '2')
{
if ((cs + 4) <= MAX_SEIKAKU) cs += 4;
- if (cs != MAX_SEIKAKU && seikaku_info[cs].sex && (seikaku_info[cs].sex != (p_ptr->psex+1)))
+ if (cs != MAX_SEIKAKU && seikaku_info[cs].sex && (seikaku_info[cs].sex != (creature_ptr->psex+1)))
{
if((cs + 4) <= MAX_SEIKAKU)
cs += 4;
k = (islower(c) ? A2I(c) : -1);
if ((k >= 0) && (k < MAX_SEIKAKU))
{
- if((seikaku_info[k].sex == 0) || (seikaku_info[k].sex == (p_ptr->psex+1)))
+ if((seikaku_info[k].sex == 0) || (seikaku_info[k].sex == (creature_ptr->psex+1)))
{
cs = k;
continue;
k = (isupper(c) ? (26 + c - 'A') : -1);
if ((k >= 26) && (k < MAX_SEIKAKU))
{
- if((seikaku_info[k].sex == 0) || (seikaku_info[k].sex == (p_ptr->psex+1)))
+ if((seikaku_info[k].sex == 0) || (seikaku_info[k].sex == (creature_ptr->psex+1)))
{
cs = k;
continue;
if (c == '?')
{
#ifdef JP
- show_help("jraceclas.txt#ThePersonalities");
+ show_help(creature_ptr, "jraceclas.txt#ThePersonalities");
#else
- show_help("raceclas.txt#ThePersonalities");
+ show_help(creature_ptr, "raceclas.txt#ThePersonalities");
#endif
}
else if (c == '=')
}
/* Set seikaku */
- p_ptr->pseikaku = (CHARACTER_IDX)k;
- ap_ptr = &seikaku_info[p_ptr->pseikaku];
+ creature_ptr->pseikaku = (CHARACTER_IDX)k;
+ ap_ptr = &seikaku_info[creature_ptr->pseikaku];
#ifdef JP
strcpy(tmp, ap_ptr->title);
if(ap_ptr->no == 1)
strcpy(tmp, ap_ptr->title);
strcat(tmp," ");
#endif
- strcat(tmp,p_ptr->name);
+ strcat(tmp,creature_ptr->name);
c_put_str(TERM_L_BLUE, tmp, 1, 34);
#ifdef ALLOW_AUTOROLLER
/*!
* @brief オートローラで得たい能力値の基準を決める。
+ * @param creature_ptr プレーヤーへの参照ポインタ
* @return なし
*/
-static bool get_stat_limits(void)
+static bool get_stat_limits(player_type *creature_ptr)
{
int i, j, m, cs, os;
int cval[6];
break;
case '?':
#ifdef JP
- show_help("jbirth.txt#AutoRoller");
+ show_help(creature_ptr, "jbirth.txt#AutoRoller");
#else
- show_help("birth.txt#AutoRoller");
+ show_help(creature_ptr, "birth.txt#AutoRoller");
#endif
break;
case '=':
* @brief オートローラで得たい年齢、身長、体重、社会的地位の基準を決める。
* @return なし
*/
-static bool get_chara_limits(void)
+static bool get_chara_limits(player_type *creature_ptr)
{
#define MAXITEMS 8
put_str(_("2/4/6/8で項目選択、+/-で値の増減、Enterで次へ", "2/4/6/8 for Select, +/- for Change value, Enter for Goto next"), 11, 10);
put_str(_("注意:身長と体重の最大値/最小値ぎりぎりの値は非常に出現確率が低くなります。", "Caution: Values near minimum or maximum is extremery rare."), 23, 2);
- if (p_ptr->psex == SEX_MALE)
+ if (creature_ptr->psex == SEX_MALE)
{
max_percent = (int)(rp_ptr->m_b_ht+rp_ptr->m_m_ht*4-1) * 100 / (int)(rp_ptr->m_b_ht);
min_percent = (int)(rp_ptr->m_b_ht-rp_ptr->m_m_ht*4+1) * 100 / (int)(rp_ptr->m_b_ht);
break;
case 2: /* Minimum height */
- if (p_ptr->psex == SEX_MALE) m = rp_ptr->m_b_ht-rp_ptr->m_m_ht*4+1;
+ if (creature_ptr->psex == SEX_MALE) m = rp_ptr->m_b_ht-rp_ptr->m_m_ht*4+1;
else m = rp_ptr->f_b_ht-rp_ptr->f_m_ht*4+1;
break;
case 3: /* Maximum height */
- if (p_ptr->psex == SEX_MALE) m = rp_ptr->m_b_ht+rp_ptr->m_m_ht*4-1;
+ if (creature_ptr->psex == SEX_MALE) m = rp_ptr->m_b_ht+rp_ptr->m_m_ht*4-1;
else m = rp_ptr->f_b_ht+rp_ptr->f_m_ht*4-1;
break;
case 4: /* Minimum weight */
- if (p_ptr->psex == SEX_MALE) m = (rp_ptr->m_b_wt * min_percent / 100) - (rp_ptr->m_m_wt * min_percent / 75) +1;
+ if (creature_ptr->psex == SEX_MALE) m = (rp_ptr->m_b_wt * min_percent / 100) - (rp_ptr->m_m_wt * min_percent / 75) +1;
else m = (rp_ptr->f_b_wt * min_percent / 100) - (rp_ptr->f_m_wt * min_percent / 75) +1;
break;
case 5: /* Maximum weight */
- if (p_ptr->psex == SEX_MALE) m = (rp_ptr->m_b_wt * max_percent / 100) + (rp_ptr->m_m_wt * max_percent / 75) -1;
+ if (creature_ptr->psex == SEX_MALE) m = (rp_ptr->m_b_wt * max_percent / 100) + (rp_ptr->m_m_wt * max_percent / 75) -1;
else m = (rp_ptr->f_b_wt * max_percent / 100) + (rp_ptr->f_m_wt * max_percent / 75) -1;
break;
case 6: /* Minimum social class */
case 'Q':
birth_quit();
case 'S':
- return (FALSE);
+ return FALSE;
case ESCAPE:
break; /*後でもう一回breakせんと*/
case ' ':
break;
case '?':
#ifdef JP
- show_help("jbirth.txt#AutoRoller");
+ show_help(creature_ptr, "jbirth.txt#AutoRoller");
#else
- show_help("birth.txt#AutoRoller");
+ show_help(creature_ptr, "birth.txt#AutoRoller");
#endif
break;
case '=':
* @brief 生い立ちメッセージをファイルからロードする。
* @return なし
*/
-static bool do_cmd_histpref(void)
+static bool do_cmd_histpref(player_type *creature_ptr)
{
char buf[80];
errr err;
histpref_buf = histbuf;
#ifdef JP
- sprintf(buf, "histedit-%s.prf", player_base);
+ sprintf(buf, "histedit-%s.prf", creature_ptr->base_name);
#else
- sprintf(buf, "histpref-%s.prf", player_base);
+ sprintf(buf, "histpref-%s.prf", creature_ptr->base_name);
#endif
- err = process_histpref_file(buf);
+ err = process_histpref_file(creature_ptr, buf);
/* Process 'hist????.prf' if 'hist????-<name>.prf' doesn't exist */
if (0 > err)
#else
strcpy(buf, "histpref.prf");
#endif
- err = process_histpref_file(buf);
+ err = process_histpref_file(creature_ptr, buf);
}
if (err)
}
/* Clear the previous history strings */
- for (i = 0; i < 4; i++) p_ptr->history[i][0] = '\0';
+ for (i = 0; i < 4; i++) creature_ptr->history[i][0] = '\0';
/* Skip leading spaces */
for (s = histpref_buf; *s == ' '; s++) /* loop */;
if (t[0] == 0) break;
else
{
- strcpy(p_ptr->history[i], t);
+ strcpy(creature_ptr->history[i], t);
t += strlen(t) + 1;
}
}
/* Fill the remaining spaces */
for (i = 0; i < 4; i++)
{
- for (j = 0; p_ptr->history[i][j]; j++) /* loop */;
+ for (j = 0; creature_ptr->history[i][j]; j++) /* loop */;
- for (; j < 59; j++) p_ptr->history[i][j] = ' ';
- p_ptr->history[i][59] = '\0';
+ for (; j < 59; j++) creature_ptr->history[i][j] = ' ';
+ creature_ptr->history[i][59] = '\0';
}
/* Kill the buffer */
* @brief 生い立ちメッセージを編集する。/Character background edit-mode
* @return なし
*/
-static void edit_history(void)
+static void edit_history(player_type *creature_ptr)
{
char old_history[4][60];
TERM_LEN y = 0, x = 0;
/* Edit character background */
for (i = 0; i < 4; i++)
{
- sprintf(old_history[i], "%s", p_ptr->history[i]);
+ sprintf(old_history[i], "%s", creature_ptr->history[i]);
}
/* Turn 0 to space */
for (i = 0; i < 4; i++)
{
- for (j = 0; p_ptr->history[i][j]; j++) /* loop */;
+ for (j = 0; creature_ptr->history[i][j]; j++) /* loop */;
- for (; j < 59; j++) p_ptr->history[i][j] = ' ';
- p_ptr->history[i][59] = '\0';
+ for (; j < 59; j++) creature_ptr->history[i][j] = ' ';
+ creature_ptr->history[i][59] = '\0';
}
- display_player(1);
+
+ display_player(creature_ptr, 1);
#ifdef JP
c_put_str(TERM_L_GREEN, "(キャラクターの生い立ち - 編集モード)", 11, 20);
put_str("[ カーソルキーで移動、Enterで終了、Ctrl-Aでファイル読み込み ]", 17, 10);
for (i = 0; i < 4; i++)
{
- put_str(p_ptr->history[i], i + 12, 10);
+ put_str(creature_ptr->history[i], i + 12, 10);
}
#ifdef JP
- if (iskanji2(p_ptr->history[y], x))
- c_put_str(TERM_L_BLUE, format("%c%c", p_ptr->history[y][x],p_ptr->history[y][x+1]), y + 12, x + 10);
+ if (iskanji2(creature_ptr->history[y], x))
+ c_put_str(TERM_L_BLUE, format("%c%c", creature_ptr->history[y][x],creature_ptr->history[y][x+1]), y + 12, x + 10);
else
#endif
- c_put_str(TERM_L_BLUE, format("%c", p_ptr->history[y][x]), y + 12, x + 10);
+ c_put_str(TERM_L_BLUE, format("%c", creature_ptr->history[y][x]), y + 12, x + 10);
/* Place cursor just after cost of current stat */
Term_gotoxy(x + 10, y + 12);
y--;
if (y < 0) y = 3;
#ifdef JP
- if ((x > 0) && (iskanji2(p_ptr->history[y], x-1))) x--;
+ if ((x > 0) && (iskanji2(creature_ptr->history[y], x-1))) x--;
#endif
}
else if (skey == SKEY_DOWN || c == KTRL('n'))
y++;
if (y > 3) y = 0;
#ifdef JP
- if ((x > 0) && (iskanji2(p_ptr->history[y], x-1))) x--;
+ if ((x > 0) && (iskanji2(creature_ptr->history[y], x-1))) x--;
#endif
}
else if (skey == SKEY_RIGHT || c == KTRL('f'))
{
#ifdef JP
- if (iskanji2(p_ptr->history[y], x)) x++;
+ if (iskanji2(creature_ptr->history[y], x)) x++;
#endif
x++;
if (x > 58)
}
#ifdef JP
- if ((x > 0) && (iskanji2(p_ptr->history[y], x-1))) x--;
+ if ((x > 0) && (iskanji2(creature_ptr->history[y], x-1))) x--;
#endif
}
else if (c == '\r' || c == '\n')
for (i = 0; i < 4; i++)
{
- sprintf(p_ptr->history[i], "%s", old_history[i]);
- put_str(p_ptr->history[i], i + 12, 10);
+ sprintf(creature_ptr->history[i], "%s", old_history[i]);
+ put_str(creature_ptr->history[i], i + 12, 10);
}
break;
}
else if (c == KTRL('A'))
{
- if (do_cmd_histpref())
+ if (do_cmd_histpref(creature_ptr))
{
#ifdef JP
- if ((x > 0) && (iskanji2(p_ptr->history[y], x - 1))) x--;
+ if ((x > 0) && (iskanji2(creature_ptr->history[y], x - 1))) x--;
#endif
}
}
else x = 0;
}
- p_ptr->history[y][x] = ' ';
+ creature_ptr->history[y][x] = ' ';
#ifdef JP
- if ((x > 0) && (iskanji2(p_ptr->history[y], x - 1)))
+ if ((x > 0) && (iskanji2(creature_ptr->history[y], x - 1)))
{
x--;
- p_ptr->history[y][x] = ' ';
+ creature_ptr->history[y][x] = ' ';
}
#endif
}
#endif
{
#ifdef JP
- if (iskanji2(p_ptr->history[y], x))
+ if (iskanji2(creature_ptr->history[y], x))
{
- p_ptr->history[y][x+1] = ' ';
+ creature_ptr->history[y][x+1] = ' ';
}
if (iskanji(c))
if (y > 3) y = 0;
}
- if (iskanji2(p_ptr->history[y], x+1))
+ if (iskanji2(creature_ptr->history[y], x+1))
{
- p_ptr->history[y][x+2] = ' ';
+ creature_ptr->history[y][x+2] = ' ';
}
- p_ptr->history[y][x++] = c;
+ creature_ptr->history[y][x++] = c;
c = inkey();
}
#endif
- p_ptr->history[y][x++] = c;
+ creature_ptr->history[y][x++] = c;
if (x > 58)
{
x = 0;
* expensive CPU wise. And it cuts down on player stupidity.
* @return なし
*/
-static bool player_birth_aux(void)
+static bool player_birth_aux(player_type *creature_ptr)
{
int i, k, n, cs, os;
put_str(_("職業 :", "Class :"), 5, 1);
/* Dump the default name */
- c_put_str(TERM_L_BLUE, p_ptr->name, 1, 34);
+ c_put_str(TERM_L_BLUE, creature_ptr->name, 1, 34);
/*** Instructions ***/
k = -1;
cs = 0;
os = MAX_SEXES;
- while (1)
+ while (TRUE)
{
if (cs != os)
{
put_str(buf, 10, 10);
c = inkey();
if (c == 'Q') birth_quit();
- if (c == 'S') return (FALSE);
+ if (c == 'S') return FALSE;
if (c == ' ' || c == '\r' || c == '\n')
{
if(cs == MAX_SEXES)
continue;
}
else k = -1;
- if (c == '?') do_cmd_help();
+ if (c == '?') do_cmd_help(creature_ptr);
else if (c == '=')
{
screen_save();
}
/* Set sex */
- p_ptr->psex = (byte_hack)k;
- sp_ptr = &sex_info[p_ptr->psex];
+ creature_ptr->psex = (byte_hack)k;
+ sp_ptr = &sex_info[creature_ptr->psex];
/* Display */
c_put_str(TERM_L_BLUE, sp_ptr->title, 3, 15);
clear_from(10);
/* Choose the players race */
- p_ptr->prace = 0;
+ creature_ptr->prace = 0;
while(1)
{
char temp[80*10];
concptr t;
- if (!get_player_race()) return FALSE;
+ if (!get_player_race(creature_ptr)) return FALSE;
clear_from(10);
- roff_to_buf(race_jouhou[p_ptr->prace], 74, temp, sizeof(temp));
+ roff_to_buf(race_jouhou[creature_ptr->prace], 74, temp, sizeof(temp));
t = temp;
for (i = 0; i< 10; i++)
clear_from(10);
/* Choose the players class */
- p_ptr->pclass = 0;
+ creature_ptr->pclass = 0;
while(1)
{
char temp[80*9];
concptr t;
- if (!get_player_class()) return FALSE;
+ if (!get_player_class(creature_ptr)) return FALSE;
clear_from(10);
- roff_to_buf(class_jouhou[p_ptr->pclass], 74, temp, sizeof(temp));
+ roff_to_buf(class_jouhou[creature_ptr->pclass], 74, temp, sizeof(temp));
t = temp;
for (i = 0; i< 9; i++)
}
/* Choose the magic realms */
- if (!get_player_realms()) return FALSE;
+ if (!get_player_realms(creature_ptr)) return FALSE;
/* Choose the players seikaku */
- p_ptr->pseikaku = 0;
+ creature_ptr->pseikaku = 0;
while(1)
{
char temp[80*8];
concptr t;
- if (!get_player_seikaku()) return FALSE;
+ if (!get_player_seikaku(creature_ptr)) return FALSE;
clear_from(10);
- roff_to_buf(seikaku_jouhou[p_ptr->pseikaku], 74, temp, sizeof(temp));
+ roff_to_buf(seikaku_jouhou[creature_ptr->pseikaku], 74, temp, sizeof(temp));
t = temp;
for (i = 0; i< A_MAX; i++)
#else
if (get_check_strict("Are you sure? ", CHECK_DEFAULT_Y)) break;
#endif
- c_put_str(TERM_L_BLUE, p_ptr->name, 1, 34);
- prt("", 1, 34+strlen(p_ptr->name));
+ c_put_str(TERM_L_BLUE, creature_ptr->name, 1, 34);
+ prt("", 1, 34+strlen(creature_ptr->name));
}
/* Clean up */
if (autoroller)
{
- if (!get_stat_limits()) return FALSE;
+ if (!get_stat_limits(creature_ptr)) return FALSE;
}
if (autochara)
{
- if (!get_chara_limits()) return FALSE;
+ if (!get_chara_limits(creature_ptr)) return FALSE;
}
#endif /* ALLOW_AUTOROLLER */
-
- /* Clear */
clear_from(10);
- /* Reset current_world_ptr->game_turn; before auto-roll and after choosing race */
- init_turn();
+ /* Reset turn; before auto-roll and after choosing race */
+ init_turn(creature_ptr);
/*** Generate ***/
/* Otherwise just get a character */
else
{
- /* Get a new character */
- get_stats();
-
- /* Roll for age/height/weight */
- get_ahw();
-
- /* Roll for social class */
- get_history();
+ get_stats(creature_ptr);
+ get_ahw(creature_ptr);
+ get_history(creature_ptr);
}
/* Feedback */
bool accept = TRUE;
/* Get a new character */
- get_stats();
+ get_stats(creature_ptr);
/* Advance the round */
auto_round++;
for (i = 0; i < A_MAX; i++)
{
/* This stat is okay */
- if (p_ptr->stat_max[i] >= stat_limit[i])
+ if (creature_ptr->stat_max[i] >= stat_limit[i])
{
stat_match[i]++;
}
/* Break if "happy" */
if (accept)
{
- /* Roll for age/height/weight */
- get_ahw();
-
- /* Roll for social class */
- get_history();
+ get_ahw(creature_ptr);
+ get_history(creature_ptr);
if (autochara)
{
- if ((p_ptr->age < chara_limit.agemin) || (p_ptr->age > chara_limit.agemax)) accept = FALSE;
- if ((p_ptr->ht < chara_limit.htmin) || (p_ptr->ht > chara_limit.htmax)) accept = FALSE;
- if ((p_ptr->wt < chara_limit.wtmin) || (p_ptr->wt > chara_limit.wtmax)) accept = FALSE;
- if ((p_ptr->sc < chara_limit.scmin) || (p_ptr->sc > chara_limit.scmax)) accept = FALSE;
+ if ((creature_ptr->age < chara_limit.agemin) || (creature_ptr->age > chara_limit.agemax)) accept = FALSE;
+ if ((creature_ptr->ht < chara_limit.htmin) || (creature_ptr->ht > chara_limit.htmax)) accept = FALSE;
+ if ((creature_ptr->wt < chara_limit.wtmin) || (creature_ptr->wt > chara_limit.wtmax)) accept = FALSE;
+ if ((creature_ptr->sc < chara_limit.scmin) || (creature_ptr->sc > chara_limit.scmax)) accept = FALSE;
}
if (accept) break;
}
if (flag)
{
/* Dump data */
- birth_put_stats();
+ birth_put_stats(creature_ptr);
/* Dump round */
put_str(format("%10ld", auto_round), 10, col+20);
/* Check for a keypress */
if (inkey())
{
- /* Roll for age/height/weight */
- get_ahw();
-
- /* Roll for social class */
- get_history();
-
+ get_ahw(creature_ptr);
+ get_history(creature_ptr);
break;
}
}
if (autoroller || autochara) sound(SOUND_LEVEL);
- /* Flush input */
flush();
/*** Display ***/
- /* Mode */
mode = 0;
/* Roll for base hitpoints */
- get_extra(TRUE);
+ get_extra(creature_ptr, TRUE);
/* Roll for gold */
- get_money();
+ get_money(creature_ptr);
/* Hack -- get a chaos patron even if you are not a chaos warrior */
- p_ptr->chaos_patron = (s16b)randint0(MAX_PATRON);
+ creature_ptr->chaos_patron = (s16b)randint0(MAX_PATRON);
/* Input loop */
while (TRUE)
{
/* Calculate the bonuses and hitpoints */
- p_ptr->update |= (PU_BONUS | PU_HP);
- update_creature(p_ptr);
+ creature_ptr->update |= (PU_BONUS | PU_HP);
+ update_creature(creature_ptr);
- p_ptr->chp = p_ptr->mhp;
- p_ptr->csp = p_ptr->msp;
+ creature_ptr->chp = creature_ptr->mhp;
+ creature_ptr->csp = creature_ptr->msp;
- /* Display the player */
- display_player(mode);
+ display_player(creature_ptr, mode);
/* Prepare a prompt (must squeeze everything in) */
Term_gotoxy(2, 23);
Term_addstr(-1, TERM_WHITE, _(", Enter この数値に決定", ", or Enter to accept"));
Term_addch(TERM_WHITE, b2);
- /* Prompt and get a command */
c = inkey();
/* Quit */
if (c == 'Q') birth_quit();
/* Start over */
- if (c == 'S') return (FALSE);
+ if (c == 'S') return FALSE;
/* Escape accepts the roll */
if (c == '\r' || c == '\n' || c == ESCAPE) break;
/* Previous character */
if (prev && (c == 'p'))
{
- load_prev_data(TRUE);
+ load_prev_data(creature_ptr, TRUE);
continue;
}
- /* Toggle the display */
if ((c == 'H') || (c == 'h'))
{
mode = ((mode != 0) ? 0 : 1);
if (c == '?')
{
#ifdef JP
- show_help("jbirth.txt#AutoRoller");
+ show_help(creature_ptr, "jbirth.txt#AutoRoller");
#else
- show_help("birth.txt#AutoRoller");
+ show_help(creature_ptr, "birth.txt#AutoRoller");
#endif
continue;
}
if (c == '\r' || c == '\n' || c == ESCAPE) break;
/* Save this for the "previous" character */
- save_prev_data(&previous_char);
+ save_prev_data(creature_ptr, &previous_char);
previous_char.quick_ok = FALSE;
/* Note that a previous roll exists */
clear_from(23);
/* Get a name, recolor it, prepare savefile */
- get_name();
+ get_name(creature_ptr);
/* Process the player name */
- process_player_name(creating_savefile);
+ process_player_name(creature_ptr, current_world_ptr->creating_savefile);
/*** Edit character background ***/
- edit_history();
+ edit_history(creature_ptr);
/*** Finish up ***/
- get_max_stats();
+ get_max_stats(creature_ptr);
- get_virtues();
+ get_virtues(creature_ptr);
/* Prompt for it */
#ifdef JP
if (c == 'Q') birth_quit();
/* Start over */
- if (c == 'S') return (FALSE);
+ if (c == 'S') return FALSE;
/* Initialize random quests */
- init_dungeon_quests();
+ init_dungeon_quests(creature_ptr);
/* Save character data for quick start */
- save_prev_data(&previous_char);
+ save_prev_data(creature_ptr, &previous_char);
previous_char.quick_ok = TRUE;
/* Accept */
- return (TRUE);
+ return TRUE;
}
/*!
* @brief クイックスタート処理の問い合わせと実行を行う。/Ask whether the player use Quick Start or not.
* @return なし
*/
-static bool ask_quick_start(void)
+static bool ask_quick_start(player_type *creature_ptr)
{
/* Doesn't have previous data */
if (!previous_char.quick_ok) return FALSE;
put_str(_("クイック・スタートを使うと以前と全く同じキャラクターで始められます。", "Do you want to use the quick start function(same character as your last one)."), 11, 2);
/* Choose */
- while (1)
+ while (TRUE)
{
char c;
c = inkey();
if (c == 'Q') quit(NULL);
- else if (c == 'S') return (FALSE);
+ else if (c == 'S') return FALSE;
else if (c == '?')
{
#ifdef JP
- show_help("jbirth.txt#QuickStart");
+ show_help(creature_ptr, "jbirth.txt#QuickStart");
#else
- show_help("birth.txt#QuickStart");
+ show_help(creature_ptr, "birth.txt#QuickStart");
#endif
}
else if ((c == 'y') || (c == 'Y'))
}
}
- load_prev_data(FALSE);
- init_turn();
- init_dungeon_quests();
+ load_prev_data(creature_ptr, FALSE);
+ init_turn(creature_ptr);
+ init_dungeon_quests(creature_ptr);
- sp_ptr = &sex_info[p_ptr->psex];
- rp_ptr = &race_info[p_ptr->prace];
- cp_ptr = &class_info[p_ptr->pclass];
- mp_ptr = &m_info[p_ptr->pclass];
- ap_ptr = &seikaku_info[p_ptr->pseikaku];
+ sp_ptr = &sex_info[creature_ptr->psex];
+ rp_ptr = &race_info[creature_ptr->prace];
+ cp_ptr = &class_info[creature_ptr->pclass];
+ mp_ptr = &m_info[creature_ptr->pclass];
+ ap_ptr = &seikaku_info[creature_ptr->pseikaku];
/* Calc hitdie, but don't roll */
- get_extra(FALSE);
+ get_extra(creature_ptr, FALSE);
- p_ptr->update |= (PU_BONUS | PU_HP);
- update_creature(p_ptr);
- p_ptr->chp = p_ptr->mhp;
- p_ptr->csp = p_ptr->msp;
+ creature_ptr->update |= (PU_BONUS | PU_HP);
+ update_creature(creature_ptr);
+ creature_ptr->chp = creature_ptr->mhp;
+ creature_ptr->csp = creature_ptr->msp;
/* Process the player name */
- process_player_name(FALSE);
+ process_player_name(creature_ptr, FALSE);
return TRUE;
}
* fields, so we must be sure to clear them first.
* @return なし
*/
-void player_birth(void)
+void player_birth(player_type *creature_ptr)
{
int i, j;
char buf[80];
/*
* Wipe monsters in old dungeon
- * This wipe destroys value of current_floor_ptr->m_list[].cur_num .
+ * This wipe destroys value of m_list[].cur_num .
*/
wipe_m_list();
/* Wipe the player */
- player_wipe_without_name();
+ player_wipe_without_name(creature_ptr);
/* Create a new character */
/* Quick start? */
- if (!ask_quick_start())
+ if (!ask_quick_start(creature_ptr))
{
play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_DEFAULT);
/* No, normal start */
- while (1)
+ while (TRUE)
{
/* Roll up a new character */
- if (player_birth_aux()) break;
+ if (player_birth_aux(creature_ptr)) break;
/* Wipe the player */
- player_wipe_without_name();
+ player_wipe_without_name(creature_ptr);
}
}
message_add(" ");
message_add(" ");
- do_cmd_write_nikki(NIKKI_GAMESTART, 1, _("-------- 新規ゲーム開始 --------", "-------- Start New Game --------"));
- do_cmd_write_nikki(NIKKI_HIGAWARI, 0, NULL);
+ exe_write_diary(creature_ptr, NIKKI_GAMESTART, 1, _("-------- 新規ゲーム開始 --------", "-------- Start New Game --------"));
+ exe_write_diary(creature_ptr, NIKKI_HIGAWARI, 0, NULL);
- sprintf(buf,_(" 性別に%sを選択した。", " choose %s personality."), sex_info[p_ptr->psex].title);
- do_cmd_write_nikki(NIKKI_BUNSHOU, 1, buf);
+ sprintf(buf,_(" 性別に%sを選択した。", " choose %s personality."), sex_info[creature_ptr->psex].title);
+ exe_write_diary(creature_ptr, NIKKI_BUNSHOU, 1, buf);
- sprintf(buf,_(" 種族に%sを選択した。", " choose %s race."), race_info[p_ptr->prace].title);
- do_cmd_write_nikki(NIKKI_BUNSHOU, 1, buf);
+ sprintf(buf,_(" 種族に%sを選択した。", " choose %s race."), race_info[creature_ptr->prace].title);
+ exe_write_diary(creature_ptr, NIKKI_BUNSHOU, 1, buf);
- sprintf(buf,_(" 職業に%sを選択した。", " choose %s class."), class_info[p_ptr->pclass].title);
- do_cmd_write_nikki(NIKKI_BUNSHOU, 1, buf);
+ sprintf(buf,_(" 職業に%sを選択した。", " choose %s class."), class_info[creature_ptr->pclass].title);
+ exe_write_diary(creature_ptr, NIKKI_BUNSHOU, 1, buf);
- if (p_ptr->realm1)
+ if (creature_ptr->realm1)
{
- sprintf(buf,_(" 魔法の領域に%s%sを選択した。", " choose %s%s realm."),realm_names[p_ptr->realm1], p_ptr->realm2 ? format("と%s",realm_names[p_ptr->realm2]) : "");
- do_cmd_write_nikki(NIKKI_BUNSHOU, 1, buf);
+ sprintf(buf,_(" 魔法の領域に%s%sを選択した。", " choose %s%s realm."),realm_names[creature_ptr->realm1], creature_ptr->realm2 ? format("と%s",realm_names[creature_ptr->realm2]) : "");
+ exe_write_diary(creature_ptr, NIKKI_BUNSHOU, 1, buf);
}
- sprintf(buf,_(" 性格に%sを選択した。", " choose %s."), seikaku_info[p_ptr->pseikaku].title);
- do_cmd_write_nikki(NIKKI_BUNSHOU, 1, buf);
+ sprintf(buf,_(" 性格に%sを選択した。", " choose %s."), seikaku_info[creature_ptr->pseikaku].title);
+ exe_write_diary(creature_ptr, NIKKI_BUNSHOU, 1, buf);
/* Init the shops */
for (i = 1; i < max_towns; i++)
seed_wilderness();
/* Give beastman a mutation at character birth */
- if (p_ptr->prace == RACE_BEASTMAN) p_ptr->hack_mutation = TRUE;
- else p_ptr->hack_mutation = FALSE;
+ if (creature_ptr->prace == RACE_BEASTMAN) creature_ptr->hack_mutation = TRUE;
+ else creature_ptr->hack_mutation = FALSE;
/* Set the message window flag as default */
if (!window_flag[1])
* @param fff ファイルポインタ
* @return なし
*/
-void dump_yourself(FILE *fff)
+void dump_yourself(player_type *creature_ptr, FILE *fff)
{
char temp[80*10];
int i;
if (!fff) return;
- roff_to_buf(race_jouhou[p_ptr->prace], 78, temp, sizeof(temp));
+ roff_to_buf(race_jouhou[creature_ptr->prace], 78, temp, sizeof(temp));
fprintf(fff, "\n\n");
- fprintf(fff, _("種族: %s\n", "Race: %s\n"), race_info[p_ptr->prace].title);
+ fprintf(fff, _("種族: %s\n", "Race: %s\n"), race_info[creature_ptr->prace].title);
t = temp;
for (i = 0; i < 10; i++)
fprintf(fff, "%s\n",t);
t += strlen(t) + 1;
}
- roff_to_buf(class_jouhou[p_ptr->pclass], 78, temp, sizeof(temp));
+ roff_to_buf(class_jouhou[creature_ptr->pclass], 78, temp, sizeof(temp));
fprintf(fff, "\n");
- fprintf(fff, _("職業: %s\n", "Class: %s\n"), class_info[p_ptr->pclass].title);
+ fprintf(fff, _("職業: %s\n", "Class: %s\n"), class_info[creature_ptr->pclass].title);
t = temp;
for (i = 0; i < 10; i++)
fprintf(fff, "%s\n",t);
t += strlen(t) + 1;
}
- roff_to_buf(seikaku_jouhou[p_ptr->pseikaku], 78, temp, sizeof(temp));
+ roff_to_buf(seikaku_jouhou[creature_ptr->pseikaku], 78, temp, sizeof(temp));
fprintf(fff, "\n");
- fprintf(fff, _("性格: %s\n", "Pesonality: %s\n"), seikaku_info[p_ptr->pseikaku].title);
+ fprintf(fff, _("性格: %s\n", "Pesonality: %s\n"), seikaku_info[creature_ptr->pseikaku].title);
t = temp;
for (i = 0; i < A_MAX; i++)
t += strlen(t) + 1;
}
fprintf(fff, "\n");
- if (p_ptr->realm1)
+ if (creature_ptr->realm1)
{
- roff_to_buf(realm_jouhou[technic2magic(p_ptr->realm1)-1], 78, temp, sizeof(temp));
- fprintf(fff, _("魔法: %s\n", "Realm: %s\n"), realm_names[p_ptr->realm1]);
+ roff_to_buf(realm_jouhou[technic2magic(creature_ptr->realm1)-1], 78, temp, sizeof(temp));
+ fprintf(fff, _("魔法: %s\n", "Realm: %s\n"), realm_names[creature_ptr->realm1]);
t = temp;
for (i = 0; i < A_MAX; i++)
}
}
fprintf(fff, "\n");
- if (p_ptr->realm2)
+ if (creature_ptr->realm2)
{
- roff_to_buf(realm_jouhou[technic2magic(p_ptr->realm2)-1], 78, temp, sizeof(temp));
- fprintf(fff, _("魔法: %s\n", "Realm: %s\n"), realm_names[p_ptr->realm2]);
+ roff_to_buf(realm_jouhou[technic2magic(creature_ptr->realm2)-1], 78, temp, sizeof(temp));
+ fprintf(fff, _("魔法: %s\n", "Realm: %s\n"), realm_names[creature_ptr->realm2]);
t = temp;
for (i = 0; i < A_MAX; i++)