Files
KataMario/src/s2d_engine/s2d_error.c
T
someone2639 8240262c07 Update S2DEX Text Engine to latest version; fix build issues (#532)
Now its just part of HackerSM64 entirely, and HackerSM64 will be the source of all changes (as long as said changes can reasonably apply to homebrew games)
2023-06-17 16:51:03 -04:00

24 lines
574 B
C

#include "s2d_config.h"
#include "s2d_print.h"
#include "s2d_error.h"
int s2d_error_y = TEX_HEIGHT;
int s2d_check_align(int align) {
if (align < ALIGN_LEFT || align > ALIGN_RIGHT) {
s2d_print_alloc(TEX_WIDTH, s2d_error_y, ALIGN_LEFT, "ERROR: invalid alignment");
s2d_error_y += TEX_HEIGHT;
return -1;
}
return 0;
}
int s2d_check_str(const char *str) {
if (str == NULL || ((u32)str & 0x80000000) == 0) {
s2d_print_alloc(TEX_WIDTH, s2d_error_y, ALIGN_LEFT, "ERROR: bad string, or no string specified");
s2d_error_y += TEX_HEIGHT;
return -1;
}
return 0;
}