Camera controls, fix some math; lighting probably broken

This commit is contained in:
2025-11-13 17:01:10 +01:00
parent 4cbf151fd9
commit a011603195
10 changed files with 394 additions and 169 deletions

View File

@@ -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.*);