MCPcopy Index your code
hub / github.com/NetHack/NetHack / sp_level_coder_init

Function sp_level_coder_init

src/sp_lev.c:6335–6376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6333}
6334
6335staticfn struct sp_coder *
6336sp_level_coder_init(void)
6337{
6338 int tmpi;
6339 struct sp_coder *coder = (struct sp_coder *) alloc(sizeof *coder);
6340
6341 coder->premapped = FALSE;
6342 coder->solidify = FALSE;
6343 coder->check_inaccessibles = FALSE;
6344 coder->allow_flips = 3; /* allow flipping level horiz/vert */
6345 coder->croom = NULL;
6346 coder->n_subroom = 1;
6347 coder->lvl_is_joined = FALSE;
6348 coder->room_stack = 0;
6349
6350 splev_init_present = FALSE;
6351 icedpools = FALSE;
6352
6353 for (tmpi = 0; tmpi <= MAX_NESTED_ROOMS; tmpi++) {
6354 coder->tmproomlist[tmpi] = (struct mkroom *) 0;
6355 coder->failed_room[tmpi] = FALSE;
6356 }
6357
6358 update_croom();
6359
6360 for (tmpi = 0; tmpi < MAX_CONTAINMENT; tmpi++)
6361 container_obj[tmpi] = NULL;
6362 container_idx = 0;
6363
6364 invent_carrying_monster = NULL;
6365
6366 (void) memset((genericptr_t) SpLev_Map, 0, sizeof SpLev_Map);
6367
6368 svl.level.flags.is_maze_lev = 0;
6369 svl.level.flags.temperature = In_hell(&u.uz) ? 1 : 0;
6370 svl.level.flags.rndmongen = 1;
6371 svl.level.flags.deathdrops = 1;
6372
6373 reset_xystart_size();
6374
6375 return coder;
6376}
6377
6378
6379static const struct luaL_Reg nhl_functions[] = {

Callers 1

create_des_coderFunction · 0.85

Calls 4

update_croomFunction · 0.85
In_hellFunction · 0.85
reset_xystart_sizeFunction · 0.85
allocFunction · 0.70

Tested by

no test coverage detected