- npixels = tex_crate.width * tex_crate.height;
- src = (unsigned char*)tex_crate.pixels;
- dst = tex_crate.pixels;
- for(i=0; i<npixels; i++) {
- int r = *src++;
- int g = *src++;
- int b = *src++;
- *dst++ = PACK_RGB16(r, g, b);
+ if(!(tex_outer.pixels = img_load_pixels("data/steelfrm.jpg", &tex_outer.width,
+ &tex_outer.height, IMG_FMT_RGB24))) {
+ fprintf(stderr, "infcubes: failed to load ornamental texture\n");
+ return -1;