~mil/mepo

458b33744c9ef68fe5d04bbddb35c6c14ffe42f4 — Miles Alan 2 years ago ad13395 renderer-rework
Dead code deletion & fix pin color
1 files changed, 1 insertions(+), 12 deletions(-)

M src/Mepo.zig
M src/Mepo.zig => src/Mepo.zig +1 -12
@@ 119,17 119,6 @@ pub fn blit_tile_surface(mepo: *@This(), tile_x: u32, tile_y: u32, zoom: u8, x_o
            // TODO
        },
    }

    //if (tile_data.surface) |surf| {
    //} else {
    //    // Blit background color tile?

    //    //var surf = sdl.SDL_CreateRGBSurfaceWithFormat(config.Tsize, config.Tsize, config.Tsize, 32, pixel_format.format);
    //    //if (sdl.SDL_FillRect(surf, null, sdl.SDL_MapRGB(pixel_format, 255, 0, 255)) != 0) {
    //    //    std.debug.warn("Fill fail {s}", .{sdl.SDL_GetError()});
    //    //    return errors.SDLError.FillFail;
    //    //}
    //}
}

fn blit_global_text(mepo: *@This()) !void {


@@ 152,7 141,7 @@ fn blit_pins(mepo: *@This()) errors.SDLError!void {
        var y = -1 * (mepo.get_y() - @divTrunc(@intCast(i32, mepo.h), 2) - conversionutil.lat_to_px_y(item.value_ptr.lat, mepo.zoom));

        var size: i32 = 10;
        _ = sdl.SDL_SetRenderDrawColor(mepo.renderer, if (mepo.pin_active != null and std.mem.eql(u8, item.key_ptr.*, mepo.pin_active.?)) 255 else 0, 255, 255, sdl.SDL_ALPHA_OPAQUE);
        _ = sdl.SDL_SetRenderDrawColor(mepo.renderer, if (mepo.pin_active != null and std.mem.eql(u8, item.key_ptr.*, mepo.pin_active.?)) 255 else 0, 0, 0, sdl.SDL_ALPHA_OPAQUE);
        _ = sdl.SDL_RenderFillRect(mepo.renderer, &sdl.SDL_Rect{
            .x = x - @divTrunc(size, 2),
            .y = y - @divTrunc(size, 2),