Add 'src/s2d_engine/' from commit 'c27118308f2c910289943e564d47cd8378d224e8'

git-subtree-dir: src/s2d_engine
git-subtree-mainline: 932a4ddb6f
git-subtree-split: c27118308f
This commit is contained in:
farisawan-2000 committed 2021-06-02 07:20:11 -04:00
commit 9f739e45c0
36 files changed
+12933

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
#include "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;
}