Fixed loading of tilesets and images from tilemaps to correctly use relative paths.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include <akerror.h>
|
||||
#include <akgl/staticstring.h>
|
||||
#include <errno.h>
|
||||
|
||||
akerr_ErrorContext *akgl_string_initialize(akgl_String *obj, char *init)
|
||||
{
|
||||
@@ -13,3 +14,17 @@ akerr_ErrorContext *akgl_string_initialize(akgl_String *obj, char *init)
|
||||
obj->refcount = 1;
|
||||
SUCCEED_RETURN(errctx);
|
||||
}
|
||||
|
||||
akerr_ErrorContext *akgl_string_copy(akgl_String *src, akgl_String *dst, int count)
|
||||
{
|
||||
PREPARE_ERROR(e);
|
||||
FAIL_ZERO_RETURN(e, src, AKERR_NULLPOINTER, "NULL argument");
|
||||
FAIL_ZERO_RETURN(e, dst, AKERR_NULLPOINTER, "NULL argument");
|
||||
if ( count == 0 ) {
|
||||
count = AKGL_MAX_STRING_LENGTH;
|
||||
}
|
||||
if ( (char *)dst->data != strncpy((char *)&src->data, (char *)&dst->data, count) ) {
|
||||
FAIL_RETURN(e, errno, "strncpy");
|
||||
}
|
||||
SUCCEED_RETURN(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user