Skip to content

Commit

Permalink
Missing error message for "too big for selected machine" added
Browse files Browse the repository at this point in the history
  • Loading branch information
stg committed Jul 11, 2012
1 parent 45a8204 commit 27c7b2a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
Binary file modified bin-win/gui.exe
Binary file not shown.
28 changes: 16 additions & 12 deletions gui/main.c
Expand Up @@ -164,18 +164,22 @@ static bool top_event(SDL_Event *event) {
}
} else {
if((stat_add+stat_size+stat_format)==1) {
if(picture_error()==PIC_OK) {
sprintf(text,"IMPORT SUCCESSFUL\nSIZE: %i X %i\nMODE: %s-COLOR",picture_width(),picture_height(),(picture_mode()==PIC_SINGLE)?"SINGLE":(picture_mode()==PIC_MULTI)?"MULTI":"FULL");
} else {
switch(picture_error()) {
case PIC_FORMAT: sprintf(text, "ERROR\nUNRECOGNIZED FILE FORMAT\nIMPORT FAILED"); break;
case PIC_LOADING: sprintf(text, "ERROR\nUNABLE TO DECODE FILE\nIMPORT FAILED"); break;
case PIC_CONVERT: sprintf(text, "ERROR\nPICTURE CONVERSION FAILED\nIMPORT FAILED"); break;
case PIC_OVERFLOW: sprintf(text, "ERROR\nPICTURE HAS TOO MANY COLORS\nIMPORT FAILED"); break;
case PIC_UNDERFLOW: sprintf(text, "ERROR\nPICTURE HAS ONLY ONE COLOR\nIMPORT FAILED"); break;
case PIC_FULLHEIGHT: sprintf(text, "ERROR\nFULL-COLOR MUST BE MULTIPLE OF 2 HIGH\nIMPORT FAILED"); break;
case PIC_SIZE: sprintf(text, "ERROR\nPICTURE IS WAY TOO BIG\nIMPORT FAILED"); break;
default: sprintf(text, "ERROR\nUNKNOWN ERROR %i\nIMPORT FAILED", picture_error()); break;
if(stat_size) {
sprintf(text, "ERROR\nPATTERN IS TOO BIG FOR\nTHE SELECTED MACHINE");
} else {
if(picture_error()==PIC_OK) {
sprintf(text,"IMPORT SUCCESSFUL\nSIZE: %i X %i\nMODE: %s-COLOR",picture_width(),picture_height(),(picture_mode()==PIC_SINGLE)?"SINGLE":(picture_mode()==PIC_MULTI)?"MULTI":"FULL");
} else {
switch(picture_error()) {
case PIC_FORMAT: sprintf(text, "ERROR\nUNRECOGNIZED FILE FORMAT\nIMPORT FAILED"); break;
case PIC_LOADING: sprintf(text, "ERROR\nUNABLE TO DECODE FILE\nIMPORT FAILED"); break;
case PIC_CONVERT: sprintf(text, "ERROR\nPICTURE CONVERSION FAILED\nIMPORT FAILED"); break;
case PIC_OVERFLOW: sprintf(text, "ERROR\nPICTURE HAS TOO MANY COLORS\nIMPORT FAILED"); break;
case PIC_UNDERFLOW: sprintf(text, "ERROR\nPICTURE HAS ONLY ONE COLOR\nIMPORT FAILED"); break;
case PIC_FULLHEIGHT: sprintf(text, "ERROR\nFULL-COLOR MUST BE\nMULTIPLE OF 2 HIGH"); break;
case PIC_SIZE: sprintf(text, "ERROR\nPICTURE IS WAY TOO BIG\nIMPORT FAILED"); break;
default: sprintf(text, "ERROR\nUNKNOWN ERROR %i\nIMPORT FAILED", picture_error()); break;
}
}
}
} else {
Expand Down

0 comments on commit 27c7b2a

Please sign in to comment.