// The MIT License (MIT)
//
// Copyright (C) 2026 Scott Duensing
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.

// dvxImage.c  -- stb_image implementation for DVX GUI
//
// This file exists solely to instantiate the stb_image implementation.
// stb_image is a single-header library: you #define STB_IMAGE_IMPLEMENTATION
// in exactly one .c file to generate the actual function bodies. Putting
// this in its own translation unit keeps the stb code isolated so it:
//   1. Compiles once, not in every file that #includes stb_image.h
//   2. Can have its own warning suppressions without affecting project code
//   3. Doesn't slow down incremental rebuilds (only recompiles if stb changes)
//
// stb_image was chosen over libpng/libjpeg because:
//   - Single header, no external dependencies  -- critical for DJGPP cross-compile
//   - Supports BMP, PNG, JPEG, GIF with one include
//   - Public domain license, no linking restrictions
//   - Small code footprint suitable for DOS targets
//
// STBI_ONLY_* defines strip out support for unused formats (TGA, PSD, HDR,
// PIC, PNM) to reduce binary size. STBI_NO_SIMD is required because DJGPP
// targets 486/Pentium which lack SSE; on the Linux/SDL build it's harmless.

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function"

#define STBI_ONLY_BMP
#define STBI_ONLY_PNG
#define STBI_ONLY_JPEG
#define STBI_ONLY_GIF
#define STBI_NO_SIMD
#define STB_IMAGE_IMPLEMENTATION
#include "thirdparty/stb_image_wrap.h"

#pragma GCC diagnostic pop
