partial revert of
d4fa608
see #54
"allocate bigger first" change was meant to save allocation time keeping same lightmap file size, actually wastes both time and size
/* get min number of surfaces */
min = ( alm->numLightSurfaces < blm->numLightSurfaces ? alm->numLightSurfaces : blm->numLightSurfaces );
- /* compare size, allocate bigger first */
- diff = ( blm->w * blm->h ) - ( alm->w * alm->h );
- if ( diff != 0 ) {
- return diff;
- }
-
/* iterate */
for ( i = 0; i < min; i++ )
{
return diff;
}
+ /* compare size */
+ diff = ( blm->w * blm->h ) - ( alm->w * alm->h );
+ if ( diff != 0 ) {
+ return diff;
+ }
+
/* must be equivalent */
return 0;
}