diff --git a/src/3d/model.c b/src/3d/model.c index cb105fb..30bb1c2 100644 --- a/src/3d/model.c +++ b/src/3d/model.c @@ -518,7 +518,7 @@ struct model *model_load(struct archive *aar, const char *path) model->bone_map = ht_create(pol->nr_bones * 3 / 2); model->bone_name_map = ht_create(pol->nr_bones * 3 / 2); model->mot_cache = ht_create(16); - model->bones = xcalloc(pol->nr_bones, sizeof(struct bone)); + model->bones = xcalloc_aligned(pol->nr_bones, struct bone); for (uint32_t i = 0; i < pol->nr_bones; i++) { add_bone(model, pol, &pol->bones[i]); } diff --git a/src/3d/reign.c b/src/3d/reign.c index 472ba71..b26e9c9 100644 --- a/src/3d/reign.c +++ b/src/3d/reign.c @@ -38,7 +38,7 @@ enum RE_plugin_version re_plugin_version; static struct RE_instance *create_instance(struct RE_plugin *plugin) { - struct RE_instance *instance = xcalloc(1, sizeof(struct RE_instance)); + struct RE_instance *instance = xcalloc_aligned(1, struct RE_instance); instance->plugin = plugin; for (int i = 0; i < RE_NR_INSTANCE_TARGETS; i++) instance->target[i] = -1; @@ -229,7 +229,7 @@ struct RE_plugin *RE_plugin_new(enum RE_plugin_version version) if (!aar) return NULL; - struct RE_plugin *plugin = xcalloc(1, sizeof(struct RE_plugin)); + struct RE_plugin *plugin = xcalloc_aligned(1, struct RE_plugin); plugin->plugin.name = "ReignEngine"; plugin->plugin.update = RE_render; plugin->plugin.to_json = RE_to_json; diff --git a/src/dungeon/dungeon.c b/src/dungeon/dungeon.c index e666248..71d0033 100644 --- a/src/dungeon/dungeon.c +++ b/src/dungeon/dungeon.c @@ -60,7 +60,7 @@ struct dungeon_context *dungeon_get_context(int surface) struct dungeon_context *dungeon_context_create(enum draw_dungeon_version version, int width, int height) { - struct dungeon_context *ctx = xcalloc(1, sizeof(struct dungeon_context)); + struct dungeon_context *ctx = xcalloc_aligned(1, struct dungeon_context); ctx->plugin.name = plugin_name; ctx->plugin.free = dungeon_context_free; ctx->plugin.update = dungeon_render; diff --git a/src/parts/flash.c b/src/parts/flash.c index 17d3e70..3149fc8 100644 --- a/src/parts/flash.c +++ b/src/parts/flash.c @@ -153,7 +153,7 @@ static struct parts_flash_object *update_object(struct parts_flash_object *obj, { if (!obj) { if (tag->flags & PLACE_FLAG_HAS_CHARACTER) { - obj = xcalloc(1, sizeof(struct parts_flash_object)); + obj = xcalloc_aligned(1, struct parts_flash_object); obj->depth = tag->depth; } else { ERROR("no object to update (depth=%d)", tag->depth); diff --git a/src/system4.c b/src/system4.c index 40da671..9d90072 100644 --- a/src/system4.c +++ b/src/system4.c @@ -419,7 +419,6 @@ int main(int argc, char *argv[]) { sys_error_handler = error_handler; - initialize_instructions(); char *ainfile; int err = AIN_SUCCESS; bool audit = false; diff --git a/subprojects/libsys4 b/subprojects/libsys4 index 4da6bf6..920dd01 160000 --- a/subprojects/libsys4 +++ b/subprojects/libsys4 @@ -1 +1 @@ -Subproject commit 4da6bf68d4ae76fb5b612d5ed621e928996d0b67 +Subproject commit 920dd0185a5042b2034ba0c37278eb7705f1434d