Commenting

This commit is contained in:
2021-04-19 15:56:16 +10:00
parent e0b7313228
commit 786cff50f1
12 changed files with 165 additions and 55 deletions

View File

@ -15,13 +15,13 @@ tileset_t * tilesetCreate(
) {
tileset_t *tileset;
float divX, divY, tdivX;
int32_t x, y, i, count;
int32_t x, y, i;
tileset = malloc(sizeof(tileset_t));
if(tileset == NULL) return NULL;
count = rows * columns;
tileset->divisions = malloc(sizeof(tilesetdiv_t) * count);
tileset->count = rows * columns;
tileset->divisions = malloc(sizeof(tilesetdiv_t) * tileset->count);
if(tileset->divisions == NULL) {
free(tileset);
return NULL;

View File

@ -17,6 +17,9 @@ typedef struct {
/** Count of X/Y divisions */
int32_t columns, rows;
/** Count of divisions (unused) */
int32_t count;
/** Division information */
tilesetdiv_t *divisions;
} tileset_t;