MCPcopy Create free account
hub / github.com/demoth/jake2 / CMod_LoadBrushes

Method CMod_LoadBrushes

qcommon/src/main/java/jake2/qcommon/CM.java:405–438  ·  view source on GitHub ↗

Loads brushes.

(lump_t l)

Source from the content-addressed store, hash-verified

403
404 /** Loads brushes.*/
405 public void CMod_LoadBrushes(lump_t l) {
406 Com.DPrintf("CMod_LoadBrushes()\n");
407 qfiles.dbrush_t in;
408 cbrush_t out;
409 int i, count;
410
411 if ((l.filelen % qfiles.dbrush_t.SIZE) != 0)
412 Com.Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size");
413
414 count = l.filelen / qfiles.dbrush_t.SIZE;
415
416 if (count > Defines.MAX_MAP_BRUSHES)
417 Com.Error(Defines.ERR_DROP, "Map has too many brushes");
418
419 numbrushes = count;
420 Com.DPrintf(" numbrushes=" + count + "\n");
421 if (debugloadmap) {
422 Com.DPrintf("brushes:(firstbrushside, numsides, contents)\n");
423 }
424 for (i = 0; i < count; i++) {
425 in = new qfiles.dbrush_t(ByteBuffer.wrap(cmod_base, i
426 * qfiles.dbrush_t.SIZE + l.fileofs, qfiles.dbrush_t.SIZE));
427 out = map_brushes[i];
428 out.firstbrushside = in.firstside;
429 out.numsides = in.numsides;
430 out.contents = in.contents;
431
432 if (debugloadmap) {
433 Com.DPrintf("| %6i| %6i| %8X|\n", new Vargs().add(
434 out.firstbrushside).add(out.numsides).add(
435 out.contents));
436 }
437 }
438 }
439
440 /** Loads leafs. */
441 public void CMod_LoadLeafs(lump_t l) {

Callers 1

CM_LoadMapMethod · 0.95

Calls 3

DPrintfMethod · 0.95
ErrorMethod · 0.95
addMethod · 0.45

Tested by

no test coverage detected