Skip to content

Commit

Permalink
Change the error enum's names.
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenSYS committed Jan 27, 2025
1 parent 171d8f3 commit c593fba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions auriText.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ enum auriText_errors auriText_loadFont(
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "ERROR: libAuriText - Font Sheet Missing", errorMessage, NULL);
#endif
#endif
return FONT_MISSING;
return AURITEXT_FONT_MISSING;
}

font->size[0] = width;
font->size[1] = height;

font->fontSheet = IMG_LoadTexture(renderer, fontSheet);
SDL_SetTextureScaleMode(font->fontSheet, SDL_SCALEMODE_NEAREST);
return NO_ERROR;
return AURITEXT_NOERROR;
}

enum auriText_errors auriText_render(
Expand Down Expand Up @@ -105,9 +105,9 @@ enum auriText_errors auriText_render(
}
}
} else if (strlen(text) <= 0) {
return STRING_EMPTY;
return AURITEXT_STRING_EMPTY;
} else if (strlen(text) > MAX_TEXTLENGTH) {
return STRING_TOO_LONG;
return AURITEXT_STRING_TOOLONG;
}
return NO_ERROR;
return AURITEXT_NOERROR;
}
8 changes: 4 additions & 4 deletions auriText.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ enum auriText_align {
};

enum auriText_errors {
NO_ERROR,
FONT_MISSING,
STRING_EMPTY,
STRING_TOO_LONG
AURITEXT_NOERROR,
AURITEXT_FONT_MISSING,
AURITEXT_STRING_EMPTY,
AURITEXT_STRING_TOOLONG
};

typedef struct {
Expand Down

0 comments on commit c593fba

Please # to comment.