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

Method GL_LoadWal

client/src/main/java/jake2/client/render/fast/Image.java:1425–1443  ·  view source on GitHub ↗
(String name)

Source from the content-addressed store, hash-verified

1423 ================
1424 */
1425 image_t GL_LoadWal(String name) {
1426
1427 image_t image = null;
1428
1429 byte[] raw = FS.LoadFile(name);
1430 if (raw == null) {
1431 Com.Printf(Defines.PRINT_ALL, "GL_FindImage: can't load " + name + '\n');
1432 return r_notexture;
1433 }
1434
1435 qfiles.miptex_t mt = new qfiles.miptex_t(raw);
1436
1437 byte[] pix = new byte[mt.width * mt.height];
1438 System.arraycopy(raw, mt.offsets[0], pix, 0, pix.length);
1439
1440 image = GL_LoadPic(name, pix, mt.width, mt.height, it_wall, 8);
1441
1442 return image;
1443 }
1444
1445 Map<String, image_t> imageCache = new HashMap<>(MAX_GLTEXTURES);
1446

Callers 1

GL_FindImageMethod · 0.95

Calls 3

LoadFileMethod · 0.95
PrintfMethod · 0.95
GL_LoadPicMethod · 0.95

Tested by

no test coverage detected