mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-13 03:20:44 +00:00
Build tools: Fix build of generateicon.
git-svn-id: https://svn.eduke32.com/eduke32@6036 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
43c1363181
commit
5038fb3bc1
1 changed files with 1 additions and 8 deletions
|
@ -53,7 +53,6 @@ int writeicon(FILE *fp, struct icon *ico)
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
struct icon icon;
|
struct icon icon;
|
||||||
int32_t bpl = 0;
|
|
||||||
int i;
|
int i;
|
||||||
unsigned char *maskp, bm, *pp;
|
unsigned char *maskp, bm, *pp;
|
||||||
|
|
||||||
|
@ -64,18 +63,12 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
memset(&icon, 0, sizeof(icon));
|
memset(&icon, 0, sizeof(icon));
|
||||||
|
|
||||||
kpzload(argv[1], (intptr_t*)&icon.pixels, (int32_t*)&bpl, (int32_t*)&icon.width, (int32_t*)&icon.height);
|
kpzload(argv[1], (intptr_t*)&icon.pixels, &icon.width, &icon.height);
|
||||||
if (!icon.pixels) {
|
if (!icon.pixels) {
|
||||||
Bfprintf(stderr, "Failure loading %s\n", argv[1]);
|
Bfprintf(stderr, "Failure loading %s\n", argv[1]);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bpl != icon.width * 4) {
|
|
||||||
Bfprintf(stderr, "bpl != icon.width * 4\n");
|
|
||||||
Bfree(icon.pixels);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
icon.mask = (unsigned char *)Bcalloc(icon.height, (icon.width+7)/8);
|
icon.mask = (unsigned char *)Bcalloc(icon.height, (icon.width+7)/8);
|
||||||
if (!icon.mask) {
|
if (!icon.mask) {
|
||||||
Bfprintf(stderr, "Out of memory\n");
|
Bfprintf(stderr, "Out of memory\n");
|
||||||
|
|
Loading…
Reference in a new issue