MCPcopy Create free account
hub / github.com/NetHack/NetHack / splev_initlev

Function splev_initlev

src/sp_lev.c:2981–3018  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2979}
2980
2981staticfn void
2982splev_initlev(lev_init *linit)
2983{
2984 switch (linit->init_style) {
2985 default:
2986 impossible("Unrecognized level init style.");
2987 break;
2988 case LVLINIT_NONE:
2989 break;
2990 case LVLINIT_SOLIDFILL:
2991 if (linit->lit == BOOL_RANDOM)
2992 linit->lit = rn2(2);
2993 lvlfill_solid(linit->filling, linit->lit);
2994 break;
2995 case LVLINIT_MAZEGRID:
2996 lvlfill_maze_grid(2, 0, gx.x_maze_max, gy.y_maze_max, linit->bg);
2997 break;
2998 case LVLINIT_MAZE:
2999 create_maze(linit->corrwid, linit->wallthick, linit->rm_deadends);
3000 break;
3001 case LVLINIT_ROGUE:
3002 makeroguerooms();
3003 break;
3004 case LVLINIT_MINES:
3005 if (linit->lit == BOOL_RANDOM)
3006 linit->lit = rn2(2);
3007 if (linit->filling > -1)
3008 lvlfill_solid(linit->filling, 0);
3009 linit->icedpools = icedpools;
3010 mkmap(linit);
3011 break;
3012 case LVLINIT_SWAMP:
3013 if (linit->lit == BOOL_RANDOM)
3014 linit->lit = rn2(2);
3015 lvlfill_swamp(linit->fg, linit->bg, linit->lit);
3016 break;
3017 }
3018}
3019
3020#if 0
3021staticfn long

Callers 1

lspo_level_initFunction · 0.85

Calls 8

rn2Function · 0.85
lvlfill_solidFunction · 0.85
lvlfill_maze_gridFunction · 0.85
create_mazeFunction · 0.85
makerogueroomsFunction · 0.85
mkmapFunction · 0.85
lvlfill_swampFunction · 0.85
impossibleFunction · 0.70

Tested by

no test coverage detected