古いソリューションファイルを削除 / Delete old solution files.
コメントアウトで一時的に実行可能まで通す。 / Temporary executable by comment out.
@@ -4032,6 +4032,12 @@ | ||
4032 | 4032 | char buf[100]; |
4033 | 4033 | int err; |
4034 | 4034 | |
4035 | + version_major = 0; | |
4036 | + version_minor = 0; | |
4037 | + version_patch = 1; | |
4038 | + version_extra = 1; | |
4039 | + | |
4040 | + /* | |
4035 | 4041 | lua_State * L = luaL_newstate(); |
4036 | 4042 | luaL_openlibs(L); |
4037 | 4043 | path_build(buf, sizeof(buf), ANGBAND_DIR_EDIT, "global.lua"); |
@@ -4061,6 +4067,7 @@ | ||
4061 | 4067 | } |
4062 | 4068 | } |
4063 | 4069 | lua_close(L); |
4070 | + */ | |
4064 | 4071 | return 0; |
4065 | 4072 | } |
4066 | 4073 |
@@ -103,6 +103,8 @@ | ||
103 | 103 | #include "diary.h" |
104 | 104 | #include "generate.h" |
105 | 105 | #include "grid.h" |
106 | +#include "init.h" | |
107 | +#include "object.h" | |
106 | 108 | #include "rooms.h" |
107 | 109 | #include "floors.h" |
108 | 110 | #include "streams.h" |
@@ -355,7 +357,7 @@ | ||
355 | 357 | |
356 | 358 | case ALLOC_TYP_OBJECT: |
357 | 359 | { |
358 | - place_object(floor_ptr, y, x, 0L, NULL); | |
360 | + place_object(floor_ptr, y, x, 0L); | |
359 | 361 | break; |
360 | 362 | } |
361 | 363 | } |
@@ -454,86 +456,6 @@ | ||
454 | 456 | place_random_door(floor_ptr, y, x, FALSE); |
455 | 457 | } |
456 | 458 | |
457 | - | |
458 | -// Place quest creatures | |
459 | -bool place_quest_creatures(floor_type *floor_ptr, creature_type *player_ptr) | |
460 | -{ | |
461 | - int i; | |
462 | - | |
463 | - /* Handle the quest creature placements */ | |
464 | - for (i = 0; i < max_quests; i++) | |
465 | - { | |
466 | - species_type *species_ptr; | |
467 | - u32b mode; | |
468 | - int j; | |
469 | - | |
470 | - if(quest[i].status != QUEST_STATUS_TAKEN || | |
471 | - (quest[i].type != QUEST_TYPE_KILL_LEVEL && | |
472 | - quest[i].type != QUEST_TYPE_RANDOM) || | |
473 | - quest[i].level != floor_ptr->depth || | |
474 | - floor_ptr->dun_type != quest[i].dungeon || | |
475 | - (quest[i].flags & QUEST_FLAG_PRESET)) | |
476 | - { | |
477 | - /* Ignore it */ | |
478 | - continue; | |
479 | - } | |
480 | - | |
481 | - species_ptr = &species_info[quest[i].species_idx]; | |
482 | - | |
483 | - /* Hack -- "unique" creatures must be "unique" */ | |
484 | - if((has_trait_species(species_ptr, TRAIT_UNIQUE)) && | |
485 | - (species_ptr->cur_num >= species_ptr->max_num)) continue; | |
486 | - | |
487 | - mode = (PC_NO_KAGE | PC_NO_PET); | |
488 | - | |
489 | - if(!has_trait_species(species_ptr, TRAIT_FRIENDLY)) | |
490 | - mode |= PC_ALLOW_GROUP; | |
491 | - | |
492 | - for (j = 0; j < (quest[i].max_num - quest[i].cur_num); j++) | |
493 | - { | |
494 | - int k; | |
495 | - | |
496 | - for (k = 0; k < SAFE_MAX_ATTEMPTS; k++) | |
497 | - { | |
498 | - int x, y; | |
499 | - int l; | |
500 | - | |
501 | - /* Find an empty grid */ | |
502 | - for (l = SAFE_MAX_ATTEMPTS; l > 0; l--) | |
503 | - { | |
504 | - cave_type *c_ptr; | |
505 | - feature_type *f_ptr; | |
506 | - | |
507 | - y = randint0(floor_ptr->height); | |
508 | - x = randint0(floor_ptr->width); | |
509 | - | |
510 | - c_ptr = &floor_ptr->cave[y][x]; | |
511 | - f_ptr = &feature_info[c_ptr->feat]; | |
512 | - | |
513 | - if(!have_flag(f_ptr->flags, FF_MOVE) && !have_flag(f_ptr->flags, FF_CAN_FLY)) continue; | |
514 | - if(!species_can_enter(floor_ptr, y, x, species_ptr, 0)) continue; | |
515 | - if(distance(y, x, player_ptr->fy, player_ptr->fx) < 10) continue; | |
516 | - if(c_ptr->info & CAVE_ICKY) continue; | |
517 | - else break; | |
518 | - } | |
519 | - | |
520 | - /* Failed to place */ | |
521 | - if(!l) return FALSE; | |
522 | - | |
523 | - // Try to place the creature | |
524 | - if(place_creature_species(player_ptr, floor_ptr, y, x, quest[i].species_idx, mode)) break; | |
525 | - else continue; //Try again | |
526 | - } | |
527 | - | |
528 | - /* Failed to place */ | |
529 | - if(k == SAFE_MAX_ATTEMPTS) return FALSE; | |
530 | - } | |
531 | - } | |
532 | - | |
533 | - return TRUE; | |
534 | -} | |
535 | - | |
536 | - | |
537 | 459 | /* |
538 | 460 | * Set boundary mimic and add "solid" perma-wall |
539 | 461 | */ |
@@ -1093,7 +1015,7 @@ | ||
1093 | 1015 | j = xval; |
1094 | 1016 | floor_ptr->cave[i][j].feat = feature_tag_to_index("ARENA_GATE"); |
1095 | 1017 | floor_ptr->cave[i][j].info |= (CAVE_GLOW | CAVE_MARK); |
1096 | - creature_place(floor_ptr, player_ptr, i, j); | |
1018 | + //creature_place(floor_ptr, player_ptr, i, j); | |
1097 | 1019 | } |
1098 | 1020 | |
1099 | 1021 |
@@ -1191,7 +1113,7 @@ | ||
1191 | 1113 | j = xval; |
1192 | 1114 | floor_ptr->cave[i][j].feat = feature_tag_to_index("BUILDING_3"); |
1193 | 1115 | floor_ptr->cave[i][j].info |= (CAVE_GLOW | CAVE_MARK); |
1194 | - creature_place(floor_ptr, player_ptr, i, j); | |
1116 | + //creature_place(floor_ptr, player_ptr, i, j); | |
1195 | 1117 | } |
1196 | 1118 | |
1197 | 1119 |
@@ -1223,7 +1145,7 @@ | ||
1223 | 1145 | |
1224 | 1146 | for(i = 0; i < 4;i ++) |
1225 | 1147 | { |
1226 | - place_creature_species(player_ptr, floor_ptr, player_ptr->fy + 8 + (i / 2) * 4, player_ptr->fx - 2 + (i % 2) * 4, battle_creature[i], (PC_NO_KAGE | PC_NO_PET)); | |
1148 | + //place_creature_species(player_ptr, floor_ptr, player_ptr->fy + 8 + (i / 2) * 4, player_ptr->fx - 2 + (i % 2) * 4, battle_creature[i], (PC_NO_KAGE | PC_NO_PET)); | |
1227 | 1149 | //TODO set_camp(&creature_list[floor_ptr->cave[player_ptr->fy + 8 + (i / 2) * 4][player_ptr->fx - 2 + (i % 2) * 4].creature_idx]); |
1228 | 1150 | } |
1229 | 1151 |
@@ -1,6 +1,4 @@ | ||
1 | 1 | |
2 | -bool place_quest_creatures(floor_type *floor_ptr, creature_type *player_ptr); | |
3 | - | |
4 | 2 | /* |
5 | 3 | * Dungeon generation values |
6 | 4 | */ |
@@ -4097,7 +4097,7 @@ | ||
4097 | 4097 | |
4098 | 4098 | case TRAIT_INFO_PRE_ID: |
4099 | 4099 | if(sscanf(tmp, "%d", &b) != 1) return PARSE_ERROR_GENERIC; |
4100 | - trait_ptr->pre_id = (s16b)b; | |
4100 | + trait_ptr->pre_id - (s16b)b; | |
4101 | 4101 | break; |
4102 | 4102 | |
4103 | 4103 | case TRAIT_INFO_ANTI_ID: |
@@ -7194,6 +7194,7 @@ | ||
7194 | 7194 | |
7195 | 7195 | errr load_lua(lua_State **L, cptr directory, cptr filename) |
7196 | 7196 | { |
7197 | + /* | |
7197 | 7198 | char buf[100]; |
7198 | 7199 | int err; |
7199 | 7200 |
@@ -7207,6 +7208,7 @@ | ||
7207 | 7208 | msg_warning("File not found: CODE[%d]", err); |
7208 | 7209 | return FAILURE; |
7209 | 7210 | } |
7211 | + */ | |
7210 | 7212 | |
7211 | 7213 | return SUCCESS; |
7212 | 7214 | } |
@@ -7246,12 +7248,16 @@ | ||
7246 | 7248 | |
7247 | 7249 | cptr get_keyword(cptr keywords) |
7248 | 7250 | { |
7251 | +/* | |
7249 | 7252 | lua_getglobal(KEYWORDS, keywords); |
7250 | 7253 | return lua_tostring(KEYWORDS, -1); |
7254 | + */ | |
7255 | + return NULL; | |
7251 | 7256 | } |
7252 | 7257 | |
7253 | 7258 | errr load_keyword(void) |
7254 | 7259 | { |
7260 | + /* | |
7255 | 7261 | char *test[100]; |
7256 | 7262 | char buf[100]; |
7257 | 7263 | int code[100]; |
@@ -7284,5 +7290,6 @@ | ||
7284 | 7290 | } |
7285 | 7291 | } |
7286 | 7292 | lua_close(L); |
7293 | + */ | |
7287 | 7294 | return SUCCESS; |
7288 | 7295 | } |