#include "io/interpret-pref-file.h"
#include "birth/character-builder.h"
#include "cmd-io/macro-util.h"
+#include "game-option/game-play-options.h"
#include "game-option/option-flags.h"
#include "game-option/option-types-table.h"
#include "grid/feature.h"
int i = (int)strtol(zz[0], nullptr, 0);
TERM_COLOR n1 = (TERM_COLOR)strtol(zz[1], nullptr, 0);
SYMBOL_CODE n2 = (SYMBOL_CODE)strtol(zz[2], nullptr, 0);
- if (i >= max_r_idx)
+ if (i >= static_cast<int>(r_info.size()))
return 1;
r_ptr = &r_info[i];
int i = (int)strtol(zz[0], nullptr, 0);
TERM_COLOR n1 = (TERM_COLOR)strtol(zz[1], nullptr, 0);
SYMBOL_CODE n2 = (SYMBOL_CODE)strtol(zz[2], nullptr, 0);
- if (i >= max_k_idx)
+ if (i >= static_cast<int>(k_info.size()))
return 1;
k_ptr = &k_info[i];
return 1;
int i = (int)strtol(zz[0], nullptr, 0);
- if (i >= max_f_idx)
+ if (i >= static_cast<int>(f_info.size()))
return 1;
return decide_feature_type(i, num, zz);
TERM_COLOR n1 = (TERM_COLOR)strtol(zz[1], nullptr, 0);
SYMBOL_CODE n2 = (SYMBOL_CODE)strtol(zz[2], nullptr, 0);
for (auto &k_ref : k_info) {
- if (k_ref.idx > 0 && k_ref.tval == j) {
+ if ((k_ref.idx > 0) && (enum2i(k_ref.tval) == j)) {
if (n1)
k_ref.d_attr = n1;
if (n2)
{
char tmp[1024];
text_to_ascii(tmp, buf + 2);
- return macro_add(tmp, macro__buf);
+ return macro_add(tmp, macro__buf.data());
}
/*!
int i = (byte)(tmp[0]);
string_free(keymap_act[mode][i]);
- keymap_act[mode][i] = string_make(macro__buf);
+ keymap_act[mode][i] = string_make(macro__buf.data());
return 0;
}
int os = option_info[i].o_set;
int ob = option_info[i].o_bit;
- if ((player_ptr->playing || w_ptr->character_xtra) && (OPT_PAGE_BIRTH == option_info[i].o_page) && !w_ptr->wizard) {
+ if ((player_ptr->playing || w_ptr->character_xtra) && (OPT_PAGE_BIRTH == option_info[i].o_page) && !allow_debug_options) {
msg_format(_("初期オプションは変更できません! '%s'", "Birth options can not changed! '%s'"), buf);
msg_print(nullptr);
return 0;
if (!streq(gf_desc[i].name, buf + 2))
continue;
- gf_color[gf_desc[i].num] = (TERM_COLOR)quark_add(t);
+ gf_color[(int)gf_desc[i].num] = (TERM_COLOR)quark_add(t);
return 0;
}
return 0;
int zz_length = strlen(zz[1]);
- zz_length = MIN(MAX_MACRO_MOD, zz_length);
+ zz_length = std::min(MAX_MACRO_MOD, zz_length);
if (2 + zz_length != tok)
return 1;
return interpret_e_token(buf);
case 'A': {
/* Process "A:<str>" -- save an "action" for later */
- text_to_ascii(macro__buf, buf + 2);
+ text_to_ascii(macro__buf.data(), buf + 2);
return 0;
}
case 'P':