k_material_flag_ghosts =
k_material_flag_boundary|
k_material_flag_invisible|
- k_material_flag_walking
+ k_material_flag_walking,
+
+ k_material_flag_spritesheet = 0x1000
};
#pragma pack(push,1)
pixels[ ((row*desc->width) + x)*desc->channels + i ] = px.rgba[i];
}
}
-
- if( desc->channels == 4 )
- {
- for( i32 y=0; y<desc->height; y ++ )
- {
- for( i32 x=0; x<desc->width; x ++ )
- {
- u32 ia = ((y*desc->width)+x)*4;
- if( pixels[ ia+3 ] == 0 )
- {
- for( i32 yy=-1; yy<=1; yy++ )
- {
- for( i32 xx=-1; xx<=1; xx++ )
- {
- i32 sx = x+xx,
- sy = y+yy;
- if( sx < 0 ) sx = desc->width-1;
- if( sy < 0 ) sy = desc->height-1;
- if( sx >= desc->width ) sx = 0;
- if( sy >= desc->height ) sy = 0;
- u32 ib = ((sy*desc->width)+sx)*4;
- if( pixels[ ib + 3 ] > 1 && pixels[ib+3]!=254 )
- {
- pixels[ ia+0 ] = pixels[ ib+0 ];
- pixels[ ia+1 ] = pixels[ ib+1 ];
- pixels[ ia+2 ] = pixels[ ib+2 ];
- pixels[ ia+3 ] = 1;
- }
- }
- }
- }
- }
- }
- }
}
u32 vg_query_qoi_max_compressed_size( const struct qoi_desc *desc )