ODIN_ENDIAN changed to an enum constant; ODIN_ENUM_STRING is the new string version of the old constant

This commit is contained in:
gingerBill
2022-01-15 17:53:18 +00:00
parent 3f59c45740
commit f0529535e0
14 changed files with 64 additions and 45 deletions
+1 -1
View File
@@ -189,7 +189,7 @@ write_image_as_ppm :: proc(filename: string, image: ^image.Image) -> (success: b
img := image
// PBM 16-bit images are big endian
when ODIN_ENDIAN == "little" {
when ODIN_ENDIAN == .Little {
if img.depth == 16 {
// The pixel components are in Big Endian. Let's byteswap back.
input := mem.slice_data_cast([]u16, img.pixels.buf[:])
+1 -1
View File
@@ -1611,7 +1611,7 @@ defilter :: proc(img: ^Image, filter_bytes: ^bytes.Buffer, header: ^image.PNG_IH
}
}
}
when ODIN_ENDIAN == "little" {
when ODIN_ENDIAN == .Little {
if img.depth == 16 {
// The pixel components are in Big Endian. Let's byteswap.
input := mem.slice_data_cast([]u16be, img.pixels.buf[:])