コード例 #1
0
ファイル: mask.c プロジェクト: tinyserver/siege
SGMask* SG_EXPORT sgMaskCreateFile2i(const char* fname, SGint xoffset, SGint yoffset)
{
	SGTexture* texture = sgTextureCreateFile(fname);
	if(texture == NULL)
		return NULL;

	SGMask* mask = sgMaskCreateTexture2i(texture, xoffset, yoffset);
	sgTextureDestroy(texture);
	
	return mask;
}
コード例 #2
0
ファイル: atlas.c プロジェクト: SIEGE/siege
void SG_CALL sgAtlasDestroy(SGAtlas* atlas)
{
    if(!atlas)
        return;

    size_t i;
    for(i = 0; i < atlas->numtextures; i++)
    {
        if(atlas->textures[i].owner)
            sgTextureDestroy(atlas->textures[i].texture);
        _sgAtlasNodeDestroy(atlas->textures[i].root);
    }
    free(atlas->textures);
    free(atlas);
}