working build & fixed the double padding

This commit is contained in:
Stefan Stefanov 2024-04-22 20:09:42 +03:00
parent 6863124384
commit 1f1a0ee48d
3 changed files with 4 additions and 4 deletions

View file

@ -1,2 +1,2 @@
@echo off
odin build src/main_release -define:RAYLIB_SHARED=false -out:build/game_release.exe -no-bounds-check -o:speed -strict-style -vet-unused -vet-using-stmt -vet-using-param -vet-style -vet-semicolon -subsystem:windows
odin build src/main_release -define:RAYLIB_SHARED=true -out:build/game_release.exe -no-bounds-check -o:speed -strict-style -vet-unused -vet-using-stmt -vet-using-param -vet-style -vet-semicolon -subsystem:windows

View file

@ -202,7 +202,7 @@ draw_atlas_settings_and_preview :: proc() {
height = small_offset,
},
" Enable padding",
&g_mem.packer_settings.fix_pixel_bleeding,
&g_mem.packer_settings.padding_enabled,
)
elements_height += small_offset * 2

View file

@ -114,8 +114,8 @@ pack_atlas_entries :: proc(entries: []AtlasEntry, atlas: ^rl.Image, offset_x: i3
for entry, entryIdx in all_entries {
entry_stb_rect := &rects[entryIdx]
entry_stb_rect.w = stbrp.Coord(entry.width + offset_x * 2)
entry_stb_rect.h = stbrp.Coord(entry.height + offset_y * 2)
entry_stb_rect.w = stbrp.Coord(entry.width + offset_x)
entry_stb_rect.h = stbrp.Coord(entry.height + offset_y)
}
ctx: stbrp.Context