summary refs log tree commit diff
path: root/src/main.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main.zig b/src/main.zig
index d40f012..11775ec 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -16,17 +16,20 @@
 // You should have received a copy of the GNU General Public License
 // along with Black Shades.  If not, see <https://www.gnu.org/licenses/>.
 
-const Loca = @import("loca").Loca;
-const al = @import("zeal");
-const allocator = @import("std").heap.c_allocator;
-const c = @cImport({
+pub const c = @cImport({
     @cInclude("Game.h");
     @cInclude("Constants.h");
 });
+
+const Loca = @import("loca").Loca;
+const al = @import("zeal");
+const allocator = std.heap.c_allocator;
 const configuration = @import("config.zig");
+const free = std.c.free;
 const gf = @import("gfz");
 const gl = @import("zgl");
 const misc = @import("misc.zig");
+const std = @import("std");
 
 var game: *c.Game = undefined;
 
@@ -53,6 +56,7 @@ pub fn main() !void {
     const loca = try Loca.init(allocator, .{});
     defer loca.deinit();
     const config = try configuration.parse(loca.user_config);
+    defer free(config.levels.ptr);
 
     try gf.init();
     defer gf.deinit() catch unreachable;