Camera controls, fix some math; lighting probably broken
This commit is contained in:
@@ -17,7 +17,7 @@ pub const Texture = struct {
|
||||
|
||||
pub const AssetMap = std.hash_map.StringHashMapUnmanaged;
|
||||
|
||||
pub fn visitTextures(allocator: std.mem.Allocator) std.hash_map.StringHashMapUnmanaged(Texture) {
|
||||
pub fn visitTextures(allocator: std.mem.Allocator) AssetMap(Texture) {
|
||||
zstbi.init(allocator);
|
||||
defer zstbi.deinit();
|
||||
|
||||
@@ -153,7 +153,7 @@ fn rearrange(grid_w: u32, grid_h: u32, tile_w: u32, tile_h: u32, inbuf: []const
|
||||
}
|
||||
}
|
||||
|
||||
pub fn deinitTextures(allocator: std.mem.Allocator, map: AssetMap(Texture)) void {
|
||||
pub fn deinitTextures(allocator: std.mem.Allocator, map: *AssetMap(Texture)) void {
|
||||
var it = map.iterator();
|
||||
while (it.next()) |entry| {
|
||||
allocator.free(entry.key_ptr.*);
|
||||
|
||||
Reference in New Issue
Block a user