変愚蛮怒のメインリポジトリです
Revisão | b2b74aecc457102d34c62088d1a5e32a1d0b098d (tree) |
---|---|
Hora | 2020-03-22 16:12:03 |
Autor | Hourier <hourier@user...> |
Commiter | Hourier |
[Refactor] #40236 Changed return type of init_*() from bool to void because they return true always
@@ -32,10 +32,6 @@ | ||
32 | 32 | * </p> |
33 | 33 | * |
34 | 34 | * <p> |
35 | -* <del>See also "main-dos.c" and "main-ibm.c".</del> | |
36 | -* </p> | |
37 | -* | |
38 | -* <p> | |
39 | 35 | * The "lib/user/pref-win.prf" file contains keymaps, macro definitions, |
40 | 36 | * and/or color redefinitions. |
41 | 37 | * </p> |
@@ -1351,18 +1347,15 @@ static bool init_graphics(void) | ||
1351 | 1347 | |
1352 | 1348 | |
1353 | 1349 | /* |
1354 | - * todo 戻り値は常にtrueなのでvoidに変更する | |
1355 | 1350 | * Initialize music |
1356 | 1351 | */ |
1357 | -static bool init_music(void) | |
1352 | +static void init_music(void) | |
1358 | 1353 | { |
1359 | 1354 | if (!can_use_music) |
1360 | 1355 | { |
1361 | 1356 | load_music_prefs(); |
1362 | 1357 | can_use_music = TRUE; |
1363 | 1358 | } |
1364 | - | |
1365 | - return (can_use_music); | |
1366 | 1359 | } |
1367 | 1360 | |
1368 | 1361 | /* |
@@ -1376,18 +1369,15 @@ static void stop_music(void) | ||
1376 | 1369 | |
1377 | 1370 | |
1378 | 1371 | /* |
1379 | - * todo 戻り値は常にtrueなのでvoidに変更する | |
1380 | 1372 | * Initialize sound |
1381 | 1373 | */ |
1382 | -static bool init_sound(void) | |
1374 | +static void init_sound(void) | |
1383 | 1375 | { |
1384 | 1376 | if (!can_use_sound) |
1385 | 1377 | { |
1386 | 1378 | load_sound_prefs(); |
1387 | 1379 | can_use_sound = TRUE; |
1388 | 1380 | } |
1389 | - | |
1390 | - return (can_use_sound); | |
1391 | 1381 | } |
1392 | 1382 | |
1393 | 1383 |
@@ -1561,27 +1551,16 @@ static errr term_xtra_win_react(player_type *player_ptr) | ||
1561 | 1551 | |
1562 | 1552 | if (use_sound != arg_sound) |
1563 | 1553 | { |
1564 | - if (arg_sound && !init_sound()) | |
1565 | - { | |
1566 | - plog(_("サウンドを初期化できません!", "Cannot initialize sound!")); | |
1567 | - arg_sound = FALSE; | |
1568 | - } | |
1569 | - | |
1554 | + init_sound(); | |
1570 | 1555 | use_sound = arg_sound; |
1571 | 1556 | } |
1572 | 1557 | |
1573 | 1558 | if (use_music != arg_music) |
1574 | 1559 | { |
1575 | - if (arg_music && !init_music()) | |
1576 | - { | |
1577 | - plog(_("BGMを初期化できません!", "Cannot initialize BGM!")); | |
1578 | - arg_music = FALSE; | |
1579 | - } | |
1580 | - | |
1560 | + init_music(); | |
1581 | 1561 | use_music = arg_music; |
1582 | 1562 | if (!arg_music) stop_music(); |
1583 | 1563 | else select_floor_music(player_ptr); |
1584 | - | |
1585 | 1564 | } |
1586 | 1565 | |
1587 | 1566 | if (use_graphics != arg_graphics) |