@patleeman/pi-boy 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +189 -0
- package/index.ts +1 -0
- package/mgba-bridge/build.sh +31 -0
- package/mgba-bridge/src/main.c +740 -0
- package/mgba-bridge/vendor/mgba/.clang-format +34 -0
- package/mgba-bridge/vendor/mgba/.gitlab-ci.yml +267 -0
- package/mgba-bridge/vendor/mgba/CHANGES +2094 -0
- package/mgba-bridge/vendor/mgba/CMakeLists.txt +1373 -0
- package/mgba-bridge/vendor/mgba/CMakePresets.json +21 -0
- package/mgba-bridge/vendor/mgba/CONTRIBUTING.md +196 -0
- package/mgba-bridge/vendor/mgba/LICENSE +373 -0
- package/mgba-bridge/vendor/mgba/Makefile +1 -0
- package/mgba-bridge/vendor/mgba/Makefile.libretro +490 -0
- package/mgba-bridge/vendor/mgba/PORTING.md +21 -0
- package/mgba-bridge/vendor/mgba/README.md +270 -0
- package/mgba-bridge/vendor/mgba/README_DE.md +255 -0
- package/mgba-bridge/vendor/mgba/README_ES.md +255 -0
- package/mgba-bridge/vendor/mgba/README_JP.md +268 -0
- package/mgba-bridge/vendor/mgba/README_ZH_CN.md +268 -0
- package/mgba-bridge/vendor/mgba/Tupfile +3 -0
- package/mgba-bridge/vendor/mgba/include/mgba/core/bitmap-cache.h +64 -0
- package/mgba-bridge/vendor/mgba/include/mgba/core/cache-set.h +38 -0
- package/mgba-bridge/vendor/mgba/include/mgba/core/cheats.h +130 -0
- package/mgba-bridge/vendor/mgba/include/mgba/core/config.h +118 -0
- package/mgba-bridge/vendor/mgba/include/mgba/core/core.h +232 -0
- package/mgba-bridge/vendor/mgba/include/mgba/core/cpu.h +40 -0
- package/mgba-bridge/vendor/mgba/include/mgba/core/directories.h +42 -0
- package/mgba-bridge/vendor/mgba/include/mgba/core/input.h +91 -0
- package/mgba-bridge/vendor/mgba/include/mgba/core/interface.h +199 -0
- package/mgba-bridge/vendor/mgba/include/mgba/core/library.h +62 -0
- package/mgba-bridge/vendor/mgba/include/mgba/core/lockstep.h +77 -0
- package/mgba-bridge/vendor/mgba/include/mgba/core/log.h +88 -0
- package/mgba-bridge/vendor/mgba/include/mgba/core/map-cache.h +82 -0
- package/mgba-bridge/vendor/mgba/include/mgba/core/mem-search.h +62 -0
- package/mgba-bridge/vendor/mgba/include/mgba/core/rewind.h +47 -0
- package/mgba-bridge/vendor/mgba/include/mgba/core/scripting.h +65 -0
- package/mgba-bridge/vendor/mgba/include/mgba/core/serialize.h +61 -0
- package/mgba-bridge/vendor/mgba/include/mgba/core/sync.h +44 -0
- package/mgba-bridge/vendor/mgba/include/mgba/core/thread.h +135 -0
- package/mgba-bridge/vendor/mgba/include/mgba/core/tile-cache.h +63 -0
- package/mgba-bridge/vendor/mgba/include/mgba/core/timing.h +55 -0
- package/mgba-bridge/vendor/mgba/include/mgba/core/version.h +27 -0
- package/mgba-bridge/vendor/mgba/include/mgba/debugger/debugger.h +267 -0
- package/mgba-bridge/vendor/mgba/include/mgba/feature/commandline.h +71 -0
- package/mgba-bridge/vendor/mgba/include/mgba/feature/proxy-backend.h +83 -0
- package/mgba-bridge/vendor/mgba/include/mgba/feature/thread-proxy.h +41 -0
- package/mgba-bridge/vendor/mgba/include/mgba/feature/updater.h +51 -0
- package/mgba-bridge/vendor/mgba/include/mgba/feature/video-backend.h +81 -0
- package/mgba-bridge/vendor/mgba/include/mgba/feature/video-logger.h +145 -0
- package/mgba-bridge/vendor/mgba/include/mgba/gb/core.h +21 -0
- package/mgba-bridge/vendor/mgba/include/mgba/gb/interface.h +112 -0
- package/mgba-bridge/vendor/mgba/include/mgba/gba/core.h +21 -0
- package/mgba-bridge/vendor/mgba/include/mgba/gba/interface.h +168 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/arm/arm.h +217 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/arm/debugger/cli-debugger.h +18 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/arm/debugger/debugger.h +52 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/arm/debugger/memory-debugger.h +20 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/arm/decoder-inlines.h +37 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/arm/decoder.h +231 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/arm/emitter-arm.h +336 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/arm/emitter-inlines.h +32 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/arm/emitter-thumb.h +113 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/arm/isa-arm.h +22 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/arm/isa-inlines.h +186 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/arm/isa-thumb.h +20 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/arm/macros.h +18 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/debugger/access-logger.h +57 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/debugger/cli-debugger.h +108 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/debugger/cli-el-backend.h +21 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/debugger/gdb-stub.h +62 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/debugger/parser.h +81 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/debugger/stack-trace.h +32 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/debugger/symbols.h +29 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/defines.h +31 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gb/audio.h +257 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gb/cheats.h +26 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gb/debugger/cli.h +28 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gb/debugger/debugger.h +20 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gb/debugger/symbols.h +19 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gb/gb.h +202 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gb/input.h +31 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gb/io.h +127 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gb/mbc.h +72 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gb/memory.h +385 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gb/overrides.h +21 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gb/renderers/cache-set.h +23 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gb/renderers/proxy.h +29 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gb/renderers/software.h +72 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gb/serialize.h +536 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gb/sio/lockstep.h +49 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gb/sio/printer.h +74 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gb/sio.h +52 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gb/timer.h +45 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gb/video.h +201 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/audio.h +291 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/bios.h +73 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/cart/ereader.h +127 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/cart/gpio.h +110 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/cart/matrix.h +35 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/cart/unlicensed.h +77 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/cheats.h +175 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/debugger/cli.h +30 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/dma.h +73 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/gba.h +194 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/input.h +34 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/io.h +190 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/memory.h +184 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/overrides.h +21 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/renderers/cache-set.h +22 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/renderers/common.h +27 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/renderers/gl.h +218 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/renderers/proxy.h +29 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/renderers/video-software.h +160 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/savedata.h +130 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/serialize.h +496 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/sharkport.h +27 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/sio/dolphin.h +41 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/sio/gbp.h +38 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/sio/lockstep.h +95 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/sio.h +98 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/timer.h +36 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/gba/video.h +251 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/script/lua.h +12 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/script/socket.h +31 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/script/types.h +20 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/sm83/debugger/cli-debugger.h +18 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/sm83/debugger/debugger.h +43 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/sm83/debugger/memory-debugger.h +20 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/sm83/decoder.h +113 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/sm83/emitter-sm83.h +528 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/sm83/isa-sm83.h +20 -0
- package/mgba-bridge/vendor/mgba/include/mgba/internal/sm83/sm83.h +174 -0
- package/mgba-bridge/vendor/mgba/include/mgba/script/base.h +28 -0
- package/mgba-bridge/vendor/mgba/include/mgba/script/canvas.h +24 -0
- package/mgba-bridge/vendor/mgba/include/mgba/script/console.h +51 -0
- package/mgba-bridge/vendor/mgba/include/mgba/script/context.h +126 -0
- package/mgba-bridge/vendor/mgba/include/mgba/script/input.h +272 -0
- package/mgba-bridge/vendor/mgba/include/mgba/script/macros.h +680 -0
- package/mgba-bridge/vendor/mgba/include/mgba/script/storage.h +28 -0
- package/mgba-bridge/vendor/mgba/include/mgba/script/types.h +400 -0
- package/mgba-bridge/vendor/mgba/include/mgba/script.h +18 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/audio-buffer.h +34 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/audio-resampler.h +42 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/circle-buffer.h +39 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/common.h +352 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/configuration.h +50 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/convolve.h +33 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/crc32.h +26 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/dllexports.h +19 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/elf-read.h +45 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/formatting.h +36 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/geometry.h +31 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/gui/file-select.h +21 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/gui/font-metrics.h +15 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/gui/font.h +149 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/gui/menu.h +126 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/gui.h +136 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/hash.h +17 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/image/export.h +20 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/image/png-io.h +54 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/image.h +442 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/interpolator.h +51 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/macros.h +92 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/math.h +145 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/md5.h +34 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/memory.h +18 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/patch/fast.h +38 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/patch/ips.h +19 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/patch/ups.h +19 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/patch.h +26 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/platform/3ds/3ds-vfs.h +17 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/platform/3ds/threading.h +88 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/platform/posix/threading.h +125 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/platform/psp2/sce-vfs.h +18 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/platform/psp2/threading.h +161 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/platform/switch/threading.h +88 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/platform/windows/getopt.h +609 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/platform/windows/threading.h +106 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/ring-fifo.h +30 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/sfo.h +30 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/sha1.h +33 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/socket.h +542 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/string.h +55 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/table.h +93 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/text-codec.h +36 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/threading.h +123 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/vector.h +128 -0
- package/mgba-bridge/vendor/mgba/include/mgba-util/vfs.h +125 -0
- package/mgba-bridge/vendor/mgba/intl/activate.py +70 -0
- package/mgba-bridge/vendor/mgba/intl/core_option_regex.py +95 -0
- package/mgba-bridge/vendor/mgba/intl/core_option_translation.py +633 -0
- package/mgba-bridge/vendor/mgba/intl/crowdin.yaml +13 -0
- package/mgba-bridge/vendor/mgba/intl/crowdin_prep.py +30 -0
- package/mgba-bridge/vendor/mgba/intl/crowdin_source_upload.py +93 -0
- package/mgba-bridge/vendor/mgba/intl/crowdin_translate.py +39 -0
- package/mgba-bridge/vendor/mgba/intl/crowdin_translation_download.py +93 -0
- package/mgba-bridge/vendor/mgba/intl/download_workflow.py +16 -0
- package/mgba-bridge/vendor/mgba/intl/initial_sync.py +125 -0
- package/mgba-bridge/vendor/mgba/intl/remove_initial_cycle.py +30 -0
- package/mgba-bridge/vendor/mgba/intl/upload_workflow.py +15 -0
- package/mgba-bridge/vendor/mgba/intl/v1_to_v2_converter.py +483 -0
- package/mgba-bridge/vendor/mgba/libretro-build/Makefile.android_arm64-v8a +96 -0
- package/mgba-bridge/vendor/mgba/libretro-build/Makefile.android_armeabi +96 -0
- package/mgba-bridge/vendor/mgba/libretro-build/Makefile.android_armeabi-v7a +96 -0
- package/mgba-bridge/vendor/mgba/libretro-build/Makefile.android_mips +96 -0
- package/mgba-bridge/vendor/mgba/libretro-build/Makefile.android_mips64 +96 -0
- package/mgba-bridge/vendor/mgba/libretro-build/Makefile.android_x86 +96 -0
- package/mgba-bridge/vendor/mgba/libretro-build/Makefile.android_x86_64 +96 -0
- package/mgba-bridge/vendor/mgba/libretro-build/Makefile.common +156 -0
- package/mgba-bridge/vendor/mgba/libretro-build/Makefile.linux-portable_x86 +96 -0
- package/mgba-bridge/vendor/mgba/libretro-build/Makefile.linux-portable_x86_64 +96 -0
- package/mgba-bridge/vendor/mgba/libretro-build/Makefile.linux_x86 +96 -0
- package/mgba-bridge/vendor/mgba/libretro-build/Makefile.linux_x86_64 +96 -0
- package/mgba-bridge/vendor/mgba/libretro-build/Makefile.mingw_x86 +96 -0
- package/mgba-bridge/vendor/mgba/libretro-build/Makefile.mingw_x86_64 +96 -0
- package/mgba-bridge/vendor/mgba/libretro-build/Makefile.osx_x86 +96 -0
- package/mgba-bridge/vendor/mgba/libretro-build/Makefile.osx_x86_64 +96 -0
- package/mgba-bridge/vendor/mgba/libretro-build/Makefile.rules +45 -0
- package/mgba-bridge/vendor/mgba/libretro-build/Makefile.vita_arm +96 -0
- package/mgba-bridge/vendor/mgba/libretro-build/Makefile.wii_ppc +96 -0
- package/mgba-bridge/vendor/mgba/libretro-build/Makefile.windows_x86 +96 -0
- package/mgba-bridge/vendor/mgba/libretro-build/Makefile.windows_x86_64 +96 -0
- package/mgba-bridge/vendor/mgba/libretro-build/include/libz/zconf.h +511 -0
- package/mgba-bridge/vendor/mgba/libretro-build/jni/Android.mk +23 -0
- package/mgba-bridge/vendor/mgba/libretro-build/jni/Application.mk +2 -0
- package/mgba-bridge/vendor/mgba/libretro-build/link.T +5 -0
- package/mgba-bridge/vendor/mgba/link.T +4 -0
- package/mgba-bridge/vendor/mgba/opt/libgba/mgba.c +94 -0
- package/mgba-bridge/vendor/mgba/opt/libgba/mgba.h +46 -0
- package/mgba-bridge/vendor/mgba/src/arm/CMakeLists.txt +19 -0
- package/mgba-bridge/vendor/mgba/src/arm/arm.c +264 -0
- package/mgba-bridge/vendor/mgba/src/arm/debugger/cli-debugger.c +187 -0
- package/mgba-bridge/vendor/mgba/src/arm/debugger/debugger.c +588 -0
- package/mgba-bridge/vendor/mgba/src/arm/debugger/memory-debugger.c +158 -0
- package/mgba-bridge/vendor/mgba/src/arm/decoder-arm.c +466 -0
- package/mgba-bridge/vendor/mgba/src/arm/decoder-thumb.c +344 -0
- package/mgba-bridge/vendor/mgba/src/arm/decoder.c +601 -0
- package/mgba-bridge/vendor/mgba/src/arm/isa-arm.c +784 -0
- package/mgba-bridge/vendor/mgba/src/arm/isa-thumb.c +417 -0
- package/mgba-bridge/vendor/mgba/src/core/CMakeLists.txt +47 -0
- package/mgba-bridge/vendor/mgba/src/core/bitmap-cache.c +187 -0
- package/mgba-bridge/vendor/mgba/src/core/cache-set.c +83 -0
- package/mgba-bridge/vendor/mgba/src/core/cheats.c +807 -0
- package/mgba-bridge/vendor/mgba/src/core/config.c +548 -0
- package/mgba-bridge/vendor/mgba/src/core/core-serialize.c +585 -0
- package/mgba-bridge/vendor/mgba/src/core/core.c +539 -0
- package/mgba-bridge/vendor/mgba/src/core/directories.c +196 -0
- package/mgba-bridge/vendor/mgba/src/core/flags.h.in +204 -0
- package/mgba-bridge/vendor/mgba/src/core/input.c +677 -0
- package/mgba-bridge/vendor/mgba/src/core/interface.c +154 -0
- package/mgba-bridge/vendor/mgba/src/core/library.c +584 -0
- package/mgba-bridge/vendor/mgba/src/core/lockstep.c +43 -0
- package/mgba-bridge/vendor/mgba/src/core/log.c +294 -0
- package/mgba-bridge/vendor/mgba/src/core/map-cache.c +219 -0
- package/mgba-bridge/vendor/mgba/src/core/mem-search.c +342 -0
- package/mgba-bridge/vendor/mgba/src/core/rewind.c +186 -0
- package/mgba-bridge/vendor/mgba/src/core/scripting.c +1481 -0
- package/mgba-bridge/vendor/mgba/src/core/sync.c +121 -0
- package/mgba-bridge/vendor/mgba/src/core/thread.c +726 -0
- package/mgba-bridge/vendor/mgba/src/core/tile-cache.c +283 -0
- package/mgba-bridge/vendor/mgba/src/core/timing.c +137 -0
- package/mgba-bridge/vendor/mgba/src/core/version.c.in +14 -0
- package/mgba-bridge/vendor/mgba/src/debugger/CMakeLists.txt +30 -0
- package/mgba-bridge/vendor/mgba/src/debugger/access-logger.c +592 -0
- package/mgba-bridge/vendor/mgba/src/debugger/cli-debugger-scripting.c +137 -0
- package/mgba-bridge/vendor/mgba/src/debugger/cli-debugger.c +1482 -0
- package/mgba-bridge/vendor/mgba/src/debugger/cli-el-backend.c +248 -0
- package/mgba-bridge/vendor/mgba/src/debugger/debugger.c +327 -0
- package/mgba-bridge/vendor/mgba/src/debugger/gdb-stub.c +918 -0
- package/mgba-bridge/vendor/mgba/src/debugger/parser.c +902 -0
- package/mgba-bridge/vendor/mgba/src/debugger/stack-trace.c +133 -0
- package/mgba-bridge/vendor/mgba/src/debugger/symbols.c +109 -0
- package/mgba-bridge/vendor/mgba/src/feature/CMakeLists.txt +24 -0
- package/mgba-bridge/vendor/mgba/src/feature/commandline.c +404 -0
- package/mgba-bridge/vendor/mgba/src/feature/ffmpeg/ffmpeg-common.h +95 -0
- package/mgba-bridge/vendor/mgba/src/feature/ffmpeg/ffmpeg-decoder.c +204 -0
- package/mgba-bridge/vendor/mgba/src/feature/ffmpeg/ffmpeg-decoder.h +45 -0
- package/mgba-bridge/vendor/mgba/src/feature/ffmpeg/ffmpeg-encoder.c +960 -0
- package/mgba-bridge/vendor/mgba/src/feature/ffmpeg/ffmpeg-encoder.h +91 -0
- package/mgba-bridge/vendor/mgba/src/feature/ffmpeg/ffmpeg-scale.c +36 -0
- package/mgba-bridge/vendor/mgba/src/feature/ffmpeg/ffmpeg-scale.h +21 -0
- package/mgba-bridge/vendor/mgba/src/feature/gui/cheats.c +195 -0
- package/mgba-bridge/vendor/mgba/src/feature/gui/cheats.h +18 -0
- package/mgba-bridge/vendor/mgba/src/feature/gui/gui-config.c +438 -0
- package/mgba-bridge/vendor/mgba/src/feature/gui/gui-config.h +19 -0
- package/mgba-bridge/vendor/mgba/src/feature/gui/gui-runner.c +853 -0
- package/mgba-bridge/vendor/mgba/src/feature/gui/gui-runner.h +114 -0
- package/mgba-bridge/vendor/mgba/src/feature/gui/remap.c +88 -0
- package/mgba-bridge/vendor/mgba/src/feature/gui/remap.h +27 -0
- package/mgba-bridge/vendor/mgba/src/feature/proxy-backend.c +286 -0
- package/mgba-bridge/vendor/mgba/src/feature/thread-proxy.c +213 -0
- package/mgba-bridge/vendor/mgba/src/feature/updater.c +227 -0
- package/mgba-bridge/vendor/mgba/src/feature/video-backend.c +45 -0
- package/mgba-bridge/vendor/mgba/src/feature/video-logger.c +1092 -0
- package/mgba-bridge/vendor/mgba/src/gb/CMakeLists.txt +53 -0
- package/mgba-bridge/vendor/mgba/src/gb/audio.c +1149 -0
- package/mgba-bridge/vendor/mgba/src/gb/cheats.c +190 -0
- package/mgba-bridge/vendor/mgba/src/gb/core.c +1539 -0
- package/mgba-bridge/vendor/mgba/src/gb/debugger/cli.c +115 -0
- package/mgba-bridge/vendor/mgba/src/gb/debugger/debugger.c +46 -0
- package/mgba-bridge/vendor/mgba/src/gb/debugger/symbols.c +61 -0
- package/mgba-bridge/vendor/mgba/src/gb/extra/proxy.c +328 -0
- package/mgba-bridge/vendor/mgba/src/gb/gb.c +1261 -0
- package/mgba-bridge/vendor/mgba/src/gb/input.c +29 -0
- package/mgba-bridge/vendor/mgba/src/gb/io.c +735 -0
- package/mgba-bridge/vendor/mgba/src/gb/mbc/huc-3.c +218 -0
- package/mgba-bridge/vendor/mgba/src/gb/mbc/licensed.c +84 -0
- package/mgba-bridge/vendor/mgba/src/gb/mbc/mbc-private.h +66 -0
- package/mgba-bridge/vendor/mgba/src/gb/mbc/mbc.c +583 -0
- package/mgba-bridge/vendor/mgba/src/gb/mbc/pocket-cam.c +142 -0
- package/mgba-bridge/vendor/mgba/src/gb/mbc/tama5.c +433 -0
- package/mgba-bridge/vendor/mgba/src/gb/mbc/unlicensed.c +601 -0
- package/mgba-bridge/vendor/mgba/src/gb/mbc.c +650 -0
- package/mgba-bridge/vendor/mgba/src/gb/memory.c +1079 -0
- package/mgba-bridge/vendor/mgba/src/gb/overrides.c +939 -0
- package/mgba-bridge/vendor/mgba/src/gb/renderers/cache-set.c +129 -0
- package/mgba-bridge/vendor/mgba/src/gb/renderers/software.c +1169 -0
- package/mgba-bridge/vendor/mgba/src/gb/serialize.c +310 -0
- package/mgba-bridge/vendor/mgba/src/gb/sio/lockstep.c +284 -0
- package/mgba-bridge/vendor/mgba/src/gb/sio/printer.c +237 -0
- package/mgba-bridge/vendor/mgba/src/gb/sio.c +106 -0
- package/mgba-bridge/vendor/mgba/src/gb/timer.c +150 -0
- package/mgba-bridge/vendor/mgba/src/gb/video.c +1216 -0
- package/mgba-bridge/vendor/mgba/src/gba/CMakeLists.txt +62 -0
- package/mgba-bridge/vendor/mgba/src/gba/audio.c +555 -0
- package/mgba-bridge/vendor/mgba/src/gba/bios.c +981 -0
- package/mgba-bridge/vendor/mgba/src/gba/cart/ereader.c +1639 -0
- package/mgba-bridge/vendor/mgba/src/gba/cart/gpio.c +584 -0
- package/mgba-bridge/vendor/mgba/src/gba/cart/matrix.c +134 -0
- package/mgba-bridge/vendor/mgba/src/gba/cart/unlicensed.c +255 -0
- package/mgba-bridge/vendor/mgba/src/gba/cart/vfame.c +320 -0
- package/mgba-bridge/vendor/mgba/src/gba/cheats/codebreaker.c +323 -0
- package/mgba-bridge/vendor/mgba/src/gba/cheats/gameshark.c +318 -0
- package/mgba-bridge/vendor/mgba/src/gba/cheats/gameshark.h +32 -0
- package/mgba-bridge/vendor/mgba/src/gba/cheats/parv3.c +442 -0
- package/mgba-bridge/vendor/mgba/src/gba/cheats/parv3.h +21 -0
- package/mgba-bridge/vendor/mgba/src/gba/cheats.c +386 -0
- package/mgba-bridge/vendor/mgba/src/gba/core.c +1822 -0
- package/mgba-bridge/vendor/mgba/src/gba/debugger/cli.c +116 -0
- package/mgba-bridge/vendor/mgba/src/gba/dma.c +363 -0
- package/mgba-bridge/vendor/mgba/src/gba/extra/battlechip.c +171 -0
- package/mgba-bridge/vendor/mgba/src/gba/extra/proxy.c +408 -0
- package/mgba-bridge/vendor/mgba/src/gba/gba.c +1095 -0
- package/mgba-bridge/vendor/mgba/src/gba/hle-bios-src.s +400 -0
- package/mgba-bridge/vendor/mgba/src/gba/hle-bios.c +103 -0
- package/mgba-bridge/vendor/mgba/src/gba/hle-bios.h +17 -0
- package/mgba-bridge/vendor/mgba/src/gba/hle-bios.make +18 -0
- package/mgba-bridge/vendor/mgba/src/gba/input.c +31 -0
- package/mgba-bridge/vendor/mgba/src/gba/io.c +1085 -0
- package/mgba-bridge/vendor/mgba/src/gba/memory.c +1974 -0
- package/mgba-bridge/vendor/mgba/src/gba/overrides.c +435 -0
- package/mgba-bridge/vendor/mgba/src/gba/renderers/cache-set.c +219 -0
- package/mgba-bridge/vendor/mgba/src/gba/renderers/common.c +59 -0
- package/mgba-bridge/vendor/mgba/src/gba/renderers/gl.c +2137 -0
- package/mgba-bridge/vendor/mgba/src/gba/renderers/software-bg.c +228 -0
- package/mgba-bridge/vendor/mgba/src/gba/renderers/software-mode0.c +576 -0
- package/mgba-bridge/vendor/mgba/src/gba/renderers/software-obj.c +431 -0
- package/mgba-bridge/vendor/mgba/src/gba/renderers/software-private.h +283 -0
- package/mgba-bridge/vendor/mgba/src/gba/renderers/video-software.c +1117 -0
- package/mgba-bridge/vendor/mgba/src/gba/savedata.c +792 -0
- package/mgba-bridge/vendor/mgba/src/gba/serialize.c +242 -0
- package/mgba-bridge/vendor/mgba/src/gba/sharkport.c +389 -0
- package/mgba-bridge/vendor/mgba/src/gba/sio/dolphin.c +217 -0
- package/mgba-bridge/vendor/mgba/src/gba/sio/gbp.c +150 -0
- package/mgba-bridge/vendor/mgba/src/gba/sio/lockstep.c +1063 -0
- package/mgba-bridge/vendor/mgba/src/gba/sio.c +493 -0
- package/mgba-bridge/vendor/mgba/src/gba/timer.c +153 -0
- package/mgba-bridge/vendor/mgba/src/gba/video.c +470 -0
- package/mgba-bridge/vendor/mgba/src/platform/cmake/DMGOverrides.cmake.in +6 -0
- package/mgba-bridge/vendor/mgba/src/platform/cmake/DebugStrip.cmake +12 -0
- package/mgba-bridge/vendor/mgba/src/platform/cmake/ExportDirectory.cmake +7 -0
- package/mgba-bridge/vendor/mgba/src/platform/cmake/FindFeature.cmake +88 -0
- package/mgba-bridge/vendor/mgba/src/platform/cmake/FindFunction.cmake +14 -0
- package/mgba-bridge/vendor/mgba/src/platform/cmake/FindSDL2.cmake +164 -0
- package/mgba-bridge/vendor/mgba/src/platform/cmake/Findepoxy.cmake +10 -0
- package/mgba-bridge/vendor/mgba/src/platform/cmake/devkitPro.cmake +44 -0
- package/mgba-bridge/vendor/mgba/src/platform/example/client-server/client.c +160 -0
- package/mgba-bridge/vendor/mgba/src/platform/example/client-server/server.c +168 -0
- package/mgba-bridge/vendor/mgba/src/platform/headless-main.c +379 -0
- package/mgba-bridge/vendor/mgba/src/platform/libretro/libretro.c +2611 -0
- package/mgba-bridge/vendor/mgba/src/platform/libretro/libretro.h +7846 -0
- package/mgba-bridge/vendor/mgba/src/platform/libretro/libretro_core_options.h +721 -0
- package/mgba-bridge/vendor/mgba/src/platform/libretro/libretro_core_options_intl.h +17798 -0
- package/mgba-bridge/vendor/mgba/src/platform/libretro/memory.c +22 -0
- package/mgba-bridge/vendor/mgba/src/platform/libretro/retro_inline.h +39 -0
- package/mgba-bridge/vendor/mgba/src/platform/opengl/gl.c +304 -0
- package/mgba-bridge/vendor/mgba/src/platform/opengl/gl.h +40 -0
- package/mgba-bridge/vendor/mgba/src/platform/opengl/gles2.c +1230 -0
- package/mgba-bridge/vendor/mgba/src/platform/opengl/gles2.h +117 -0
- package/mgba-bridge/vendor/mgba/src/platform/posix/memory.c +37 -0
- package/mgba-bridge/vendor/mgba/src/script/CMakeLists.txt +38 -0
- package/mgba-bridge/vendor/mgba/src/script/canvas.c +292 -0
- package/mgba-bridge/vendor/mgba/src/script/console.c +141 -0
- package/mgba-bridge/vendor/mgba/src/script/context.c +492 -0
- package/mgba-bridge/vendor/mgba/src/script/engines/lua.c +1617 -0
- package/mgba-bridge/vendor/mgba/src/script/image.c +338 -0
- package/mgba-bridge/vendor/mgba/src/script/input.c +612 -0
- package/mgba-bridge/vendor/mgba/src/script/socket.c +284 -0
- package/mgba-bridge/vendor/mgba/src/script/stdlib.c +306 -0
- package/mgba-bridge/vendor/mgba/src/script/storage.c +557 -0
- package/mgba-bridge/vendor/mgba/src/script/test.h +29 -0
- package/mgba-bridge/vendor/mgba/src/script/types.c +1886 -0
- package/mgba-bridge/vendor/mgba/src/sm83/CMakeLists.txt +16 -0
- package/mgba-bridge/vendor/mgba/src/sm83/debugger/cli-debugger.c +110 -0
- package/mgba-bridge/vendor/mgba/src/sm83/debugger/debugger.c +266 -0
- package/mgba-bridge/vendor/mgba/src/sm83/debugger/memory-debugger.c +84 -0
- package/mgba-bridge/vendor/mgba/src/sm83/decoder.c +608 -0
- package/mgba-bridge/vendor/mgba/src/sm83/isa-sm83.c +817 -0
- package/mgba-bridge/vendor/mgba/src/sm83/sm83.c +199 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/.clang-format +92 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/CMakeLists.txt +18 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/LICENSE +19 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/README.md +152 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/discord_register.h +26 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/discord_rpc.h +87 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/mingw-std-threads/LICENSE +24 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/mingw-std-threads/README.md +41 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/mingw-std-threads/condition_variable +549 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/mingw-std-threads/mutex +474 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/mingw-std-threads/shared_mutex +497 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/mingw-std-threads/thread +410 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/allocators.h +271 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/document.h +2573 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/encodedstream.h +299 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/encodings.h +716 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/error/en.h +74 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/error/error.h +155 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/filereadstream.h +99 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/filewritestream.h +104 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/fwd.h +151 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/internal/biginteger.h +290 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/internal/diyfp.h +258 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/internal/dtoa.h +245 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/internal/ieee754.h +78 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/internal/itoa.h +304 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/internal/meta.h +181 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/internal/pow10.h +55 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/internal/regex.h +701 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/internal/stack.h +230 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/internal/strfunc.h +55 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/internal/strtod.h +269 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/internal/swap.h +46 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/istreamwrapper.h +115 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/license.txt +57 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/memorybuffer.h +70 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/memorystream.h +71 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/msinttypes/inttypes.h +316 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/msinttypes/stdint.h +300 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/ostreamwrapper.h +81 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/pointer.h +1358 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/prettywriter.h +255 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/rapidjson.h +615 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/reader.h +1879 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/schema.h +2006 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/stream.h +179 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/stringbuffer.h +117 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/include/rapidjson/writer.h +610 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/src/CMakeLists.txt +90 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/src/backoff.h +40 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/src/connection.h +19 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/src/connection_unix.cpp +125 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/src/connection_win.cpp +128 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/src/discord_register_linux.cpp +102 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/src/discord_register_osx.m +80 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/src/discord_register_win.cpp +185 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/src/discord_rpc.cpp +504 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/src/dllmain.cpp +8 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/src/msg_queue.h +36 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/src/rpc_connection.cpp +137 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/src/rpc_connection.h +59 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/src/serialization.cpp +245 -0
- package/mgba-bridge/vendor/mgba/src/third-party/discord-rpc/src/serialization.h +215 -0
- package/mgba-bridge/vendor/mgba/src/third-party/inih/LICENSE.txt +27 -0
- package/mgba-bridge/vendor/mgba/src/third-party/inih/README.md +157 -0
- package/mgba-bridge/vendor/mgba/src/third-party/inih/ini.c +288 -0
- package/mgba-bridge/vendor/mgba/src/third-party/inih/ini.h +148 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/ANNOUNCE +47 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/AUTHORS +45 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/CHANGES +6109 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/CMakeLists.txt +931 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/INSTALL +465 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/LICENSE +134 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/Makefile.am +393 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/Makefile.in +2428 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/README +183 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/TODO +23 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/TRADEMARK +8 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/aclocal.m4 +1196 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/arm/arm_init.c +136 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/arm/filter_neon.S +253 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/arm/filter_neon_intrinsics.c +402 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/arm/palette_neon_intrinsics.c +149 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/autogen.sh +225 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/compile +348 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/config.guess +1476 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/config.h.in +126 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/config.sub +1801 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/configure +16116 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/configure.ac +532 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/README.txt +5 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/arm-neon/README +83 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/arm-neon/android-ndk.c +39 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/arm-neon/linux-auxv.c +120 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/arm-neon/linux.c +161 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/conftest/README +49 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/conftest/pngcp.dfa +57 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/conftest/read.dfa +58 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/conftest/s_read.dfa +35 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/conftest/s_write.dfa +33 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/conftest/simple.dfa +36 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/conftest/write.dfa +45 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/examples/README.txt +24 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/examples/iccfrompng.c +185 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/examples/pngpixel.c +371 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/examples/pngtopng.c +98 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/examples/simpleover.c +648 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/gregbook/COPYING +340 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/gregbook/LICENSE +50 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/gregbook/Makefile.mingw32 +131 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/gregbook/Makefile.sgi +105 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/gregbook/Makefile.unx +134 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/gregbook/Makefile.w32 +114 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/gregbook/README +186 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/gregbook/makevms.com +132 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/gregbook/readpng.c +323 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/gregbook/readpng.h +88 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/gregbook/readpng2.c +521 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/gregbook/readpng2.h +116 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/gregbook/readppm.c +188 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/gregbook/rpng-win.c +735 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/gregbook/rpng-x.c +911 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/gregbook/rpng2-win.c +1261 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/gregbook/rpng2-x.c +2143 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/gregbook/toucan.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/gregbook/wpng.c +865 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/gregbook/writepng.c +401 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/gregbook/writepng.h +133 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/libtests/fakepng.c +65 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/libtests/gentests.sh +102 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/libtests/makepng.c +1941 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/libtests/pngimage.c +1712 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/libtests/pngstest-errors.h +165 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/libtests/pngstest.c +3828 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/libtests/pngunknown.c +1294 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/libtests/pngvalid.c +12230 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/libtests/readpng.c +115 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/libtests/tarith.c +999 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/libtests/timepng.c +608 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/mips-msa/README +83 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/mips-msa/linux.c +64 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/oss-fuzz/Dockerfile +25 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/oss-fuzz/README.txt +37 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/oss-fuzz/build.sh +51 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/oss-fuzz/libpng_read_fuzzer.cc +190 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/oss-fuzz/libpng_read_fuzzer.options +2 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/oss-fuzz/png.dict +39 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminim/README +5 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminim/decoder/README +10 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminim/decoder/makefile +151 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminim/decoder/pngusr.dfa +40 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminim/decoder/pngusr.h +23 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminim/encoder/README +10 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminim/encoder/makefile +150 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminim/encoder/pngusr.dfa +39 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminim/encoder/pngusr.h +23 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminim/preader/README +15 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminim/preader/makefile +166 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminim/preader/pngusr.dfa +40 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminim/preader/pngusr.h +23 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminus/CHANGES.txt +13 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminus/CMakeLists.txt +24 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminus/LICENSE.txt +22 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminus/Makefile +62 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminus/README.txt +120 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminus/makevms.com +92 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminus/png2pnm.bat +41 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminus/png2pnm.c +427 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminus/png2pnm.sh +42 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminus/pngminus.bat +4 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminus/pngminus.sh +5 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminus/pnm2png.bat +41 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminus/pnm2png.c +620 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngminus/pnm2png.sh +42 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/README +107 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/bad_interlace_conversions.txt +9 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/basn0g01.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/basn0g02.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/basn0g04.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/basn0g08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/basn0g16.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/basn2c08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/basn2c16.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/basn3p01.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/basn3p02.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/basn3p04.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/basn3p08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/basn4a08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/basn4a16.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/basn6a08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/basn6a16.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/ftbbn0g01.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/ftbbn0g02.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/ftbbn0g04.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/ftbbn2c16.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/ftbbn3p08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/ftbgn2c16.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/ftbgn3p08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/ftbrn2c08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/ftbwn0g16.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/ftbwn3p08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/ftbyn3p08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/ftp0n0g08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/ftp0n2c08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/ftp0n3p08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/ftp1n3p08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/ibasn0g08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/ibasn0g16.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/ibasn2c08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/ibasn2c16.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/ibasn3p08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/ibasn4a08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/ibasn4a16.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/ibasn6a08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/ibasn6a16.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/iftbbn2c16.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/iftbbn3p08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/iftbgn2c16.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/iftbgn3p08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/iftbrn2c08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/iftbwn0g16.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/iftbwn3p08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/iftbyn3p08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/iftp0n0g08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/iftp0n2c08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/iftp0n3p08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/iftp1n3p08.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/interlaced/README +2 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/interlaced/ibasn0g01.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/interlaced/ibasn0g02.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/interlaced/ibasn0g04.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/interlaced/ibasn3p01.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/interlaced/ibasn3p02.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/interlaced/ibasn3p04.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/interlaced/iftbbn0g01.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/interlaced/iftbbn0g02.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/pngsuite/interlaced/iftbbn0g04.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/powerpc-vsx/README +81 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/powerpc-vsx/linux.c +57 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/powerpc-vsx/linux_aux.c +34 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/crashers/bad_iCCP.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/crashers/badadler.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/crashers/badcrc.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/crashers/empty_ancillary_chunks.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/crashers/huge_IDAT.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/crashers/huge_bKGD_chunk.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/crashers/huge_cHRM_chunk.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/crashers/huge_eXIf_chunk.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/crashers/huge_gAMA_chunk.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/crashers/huge_hIST_chunk.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/crashers/huge_iCCP_chunk.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/crashers/huge_iTXt_chunk.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/crashers/huge_juNK_unsafe_to_copy.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/crashers/huge_juNk_safe_to_copy.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/crashers/huge_pCAL_chunk.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/crashers/huge_pHYs_chunk.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/crashers/huge_sCAL_chunk.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/crashers/huge_sPLT_chunk.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/crashers/huge_sRGB_chunk.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/crashers/huge_sTER_chunk.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/crashers/huge_tEXt_chunk.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/crashers/huge_tIME_chunk.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/crashers/huge_zTXt_chunk.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-1-1.8-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-1-1.8.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-1-linear-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-1-linear.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-1-sRGB-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-1-sRGB.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-1-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-1.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-16-1.8-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-16-1.8.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-16-linear-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-16-linear.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-16-sRGB-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-16-sRGB.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-16-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-16.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-2-1.8-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-2-1.8.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-2-linear-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-2-linear.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-2-sRGB-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-2-sRGB.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-2-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-2.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-4-1.8-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-4-1.8.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-4-linear-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-4-linear.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-4-sRGB-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-4-sRGB.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-4-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-4.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-8-1.8-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-8-1.8.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-8-linear-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-8-linear.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-8-sRGB-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-8-sRGB.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-8-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-8.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-alpha-16-1.8.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-alpha-16-linear.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-alpha-16-sRGB.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-alpha-16.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-alpha-8-1.8.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-alpha-8-linear.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-alpha-8-sRGB.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/gray-alpha-8.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/makepngs.sh +94 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-1-1.8-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-1-1.8.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-1-linear-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-1-linear.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-1-sRGB-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-1-sRGB.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-1-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-1.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-2-1.8-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-2-1.8.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-2-linear-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-2-linear.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-2-sRGB-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-2-sRGB.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-2-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-2.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-4-1.8-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-4-1.8.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-4-linear-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-4-linear.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-4-sRGB-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-4-sRGB.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-4-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-4.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-8-1.8-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-8-1.8.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-8-linear-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-8-linear.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-8-sRGB-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-8-sRGB.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-8-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/palette-8.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/rgb-16-1.8-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/rgb-16-1.8.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/rgb-16-linear-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/rgb-16-linear.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/rgb-16-sRGB-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/rgb-16-sRGB.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/rgb-16-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/rgb-16.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/rgb-8-1.8-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/rgb-8-1.8.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/rgb-8-linear-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/rgb-8-linear.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/rgb-8-sRGB-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/rgb-8-sRGB.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/rgb-8-tRNS.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/rgb-8.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/rgb-alpha-16-1.8.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/rgb-alpha-16-linear.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/rgb-alpha-16-sRGB.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/rgb-alpha-16.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/rgb-alpha-8-1.8.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/rgb-alpha-8-linear.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/rgb-alpha-8-sRGB.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/testpngs/rgb-alpha-8.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/tools/README.txt +27 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/tools/checksum-icc.c +102 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/tools/chkfmt +144 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/tools/cvtcolor.c +188 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/tools/genpng.c +881 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/tools/intgamma.sh +110 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/tools/makesRGB.c +430 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/tools/png-fix-itxt.c +164 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/tools/pngcp.c +2453 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/tools/pngfix.c +4049 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/tools/reindent +25 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/tools/sRGB.h +48 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/visupng/PngFile.c +454 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/visupng/PngFile.h +30 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/visupng/README.txt +61 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/visupng/VisualPng.c +978 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/visupng/VisualPng.dsp +147 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/visupng/VisualPng.dsw +29 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/visupng/VisualPng.ico +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/visupng/VisualPng.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/visupng/VisualPng.rc +152 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/visupng/cexcept.h +248 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/contrib/visupng/resource.h +23 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/depcomp +791 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/example.c +1040 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/install-sh +518 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/intel/filter_sse2_intrinsics.c +391 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/intel/intel_init.c +52 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/libpng-config.in +127 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/libpng-manual.txt +5409 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/libpng.3 +6052 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/libpng.pc.in +12 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/libpngpf.3 +24 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/ltmain.sh +11147 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/mips/filter_msa_intrinsics.c +808 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/mips/mips_init.c +130 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/missing +215 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/png.5 +84 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/png.c +4607 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/png.h +3247 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/pngbar.jpg +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/pngbar.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/pngconf.h +623 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/pngdebug.h +153 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/pngerror.c +963 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/pngget.c +1249 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/pnginfo.h +267 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/pngmem.c +284 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/pngnow.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/pngpread.c +1096 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/pngpriv.h +2152 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/pngread.c +4225 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/pngrio.c +120 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/pngrtran.c +5044 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/pngrutil.c +4681 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/pngset.c +1802 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/pngstruct.h +489 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/pngtest.c +2158 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/pngtest.png +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/pngtrans.c +864 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/pngusr.dfa +14 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/pngwio.c +168 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/pngwrite.c +2395 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/pngwtran.c +575 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/pngwutil.c +2781 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/powerpc/filter_vsx_intrinsics.c +768 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/powerpc/powerpc_init.c +126 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/projects/owatcom/libpng.tgt +383 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/projects/owatcom/libpng.wpj +112 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/projects/owatcom/pngconfig.mak +160 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/projects/owatcom/pngstest.tgt +219 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/projects/owatcom/pngtest.tgt +179 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/projects/owatcom/pngvalid.tgt +210 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/projects/visualc71/PRJ0041.mak +21 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/projects/visualc71/README.txt +58 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/projects/visualc71/README_zlib.txt +44 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/projects/visualc71/libpng.sln +60 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/projects/visualc71/libpng.vcproj +419 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/projects/visualc71/pngtest.vcproj +267 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/projects/visualc71/zlib.vcproj +391 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/projects/vstudio/libpng/libpng.vcxproj +234 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/projects/vstudio/pnglibconf/pnglibconf.vcxproj +61 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/projects/vstudio/pngstest/pngstest.vcxproj +219 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/projects/vstudio/pngtest/pngtest.vcxproj +220 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/projects/vstudio/pngunknown/pngunknown.vcxproj +219 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/projects/vstudio/pngvalid/pngvalid.vcxproj +219 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/projects/vstudio/vstudio.sln +109 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/projects/vstudio/zlib/zlib.vcxproj +175 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/projects/vstudio/zlib.props +57 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/README.txt +79 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/SCOPTIONS.ppc +7 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/checksym.awk +173 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/descrip.mms +52 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/dfn.awk +203 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/genchk.cmake.in +37 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/genout.cmake.in +93 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/gensrc.cmake.in +138 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/intprefix.c +22 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/libpng-config-body.in +96 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/libpng-config-head.in +24 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/libpng.pc.in +10 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/libtool.m4 +8369 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/ltoptions.m4 +437 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/ltsugar.m4 +124 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/ltversion.m4 +23 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/lt~obsolete.m4 +99 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/macro.lst +3 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.32sunu +244 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.64sunu +244 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.acorn +57 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.aix +116 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.amiga +58 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.atari +71 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.bc32 +158 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.beos +222 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.cegcc +116 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.clang +87 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.clang-asan +87 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.darwin +225 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.dec +210 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.dj2 +72 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.freebsd +69 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.gcc +87 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.gcc-asan +87 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.hp64 +231 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.hpgcc +234 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.hpux +229 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.ibmc +90 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.intel +115 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.linux +246 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.linux-opt +265 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.mips +103 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.msys +202 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.netbsd +55 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.openbsd +86 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.sco +226 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.sggcc +236 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.sgi +237 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.so9 +247 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.solaris +243 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.std +134 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.sunos +115 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makefile.vcwin32 +113 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/makevms.com +142 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/options.awk +898 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/pnglibconf.dfa +920 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/pnglibconf.h.prebuilt +219 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/pnglibconf.mak +55 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/pngwin.rc +112 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/prefix.c +24 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/smakefile.ppc +34 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/sym.c +15 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/symbols.c +58 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/symbols.def +255 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/test.cmake.in +31 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/scripts/vers.c +19 -0
- package/mgba-bridge/vendor/mgba/src/third-party/libpng/test-driver +148 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/7z.h +202 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/7zAlloc.c +80 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/7zAlloc.h +19 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/7zArcIn.c +1771 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/7zBuf.c +36 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/7zBuf.h +35 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/7zBuf2.c +52 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/7zCrc.c +128 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/7zCrc.h +25 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/7zCrcOpt.c +115 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/7zDec.c +591 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/7zFile.c +286 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/7zFile.h +83 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/7zStream.c +176 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/7zTypes.h +375 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/7zVersion.h +27 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/7zVersion.rc +55 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Aes.c +306 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Aes.h +38 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/AesOpt.c +184 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Alloc.c +455 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Alloc.h +51 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Bcj2.c +257 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Bcj2.h +146 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Bcj2Enc.c +311 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Bra.c +230 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Bra.h +64 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Bra86.c +82 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/BraIA64.c +53 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Compiler.h +33 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/CpuArch.c +218 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/CpuArch.h +336 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Delta.c +64 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Delta.h +19 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/DllSecur.c +108 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/DllSecur.h +20 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/LzFind.c +1127 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/LzFind.h +121 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/LzFindMt.c +853 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/LzFindMt.h +101 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/LzHash.h +57 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Lzma2Dec.c +488 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Lzma2Dec.h +120 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Lzma2DecMt.c +1082 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Lzma2DecMt.h +79 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Lzma2Enc.c +803 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Lzma2Enc.h +55 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Lzma86.h +111 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Lzma86Dec.c +54 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Lzma86Enc.c +106 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/LzmaDec.c +1185 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/LzmaDec.h +234 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/LzmaEnc.c +2976 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/LzmaEnc.h +76 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/LzmaLib.c +40 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/LzmaLib.h +131 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/MtCoder.c +601 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/MtCoder.h +141 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/MtDec.c +1138 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/MtDec.h +201 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Ppmd.h +85 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Ppmd7.c +712 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Ppmd7.h +142 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Ppmd7Dec.c +191 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Ppmd7Enc.c +187 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Precomp.h +10 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/RotateDefs.h +30 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Sha256.c +248 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Sha256.h +26 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Sort.c +141 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Sort.h +18 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Threads.c +95 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Threads.h +68 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/7z/7z.dsp +241 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/7z/7z.dsw +29 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/7z/7zMain.c +686 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/7z/Precomp.c +4 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/7z/Precomp.h +10 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/7z/makefile +40 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/7z/makefile.gcc +75 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/Lzma/LzmaUtil.c +258 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/Lzma/LzmaUtil.dsp +168 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/Lzma/LzmaUtil.dsw +29 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/Lzma/makefile +28 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/Lzma/makefile.gcc +44 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/LzmaLib/LzmaLib.def +4 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/LzmaLib/LzmaLib.dsp +178 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/LzmaLib/LzmaLib.dsw +29 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/LzmaLib/LzmaLibExports.c +14 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/LzmaLib/makefile +34 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/LzmaLib/resource.rc +3 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/SfxSetup/Precomp.c +4 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/SfxSetup/Precomp.h +10 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/SfxSetup/SfxSetup.c +640 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/SfxSetup/SfxSetup.dsp +231 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/SfxSetup/SfxSetup.dsw +29 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/SfxSetup/makefile +37 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/SfxSetup/makefile_con +38 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/SfxSetup/resource.rc +5 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Util/SfxSetup/setup.ico +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Xz.c +90 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/Xz.h +460 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/XzCrc64.c +86 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/XzCrc64.h +26 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/XzCrc64Opt.c +69 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/XzDec.c +2766 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/XzEnc.c +1329 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/XzEnc.h +60 -0
- package/mgba-bridge/vendor/mgba/src/third-party/lzma/XzIn.c +319 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/CMakeLists.txt +249 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/ChangeLog +1578 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/FAQ +368 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/INDEX +68 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/Makefile +5 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/Makefile.in +408 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/README +118 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/adler32.c +186 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/amiga/Makefile.pup +69 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/amiga/Makefile.sas +68 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/compress.c +86 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/configure +927 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/README.contrib +57 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/ada/buffer_demo.adb +106 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/ada/mtest.adb +156 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/ada/read.adb +156 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/ada/readme.txt +65 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/ada/test.adb +463 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/ada/zlib-streams.adb +225 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/ada/zlib-streams.ads +114 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/ada/zlib-thin.adb +141 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/ada/zlib-thin.ads +450 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/ada/zlib.adb +701 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/ada/zlib.ads +328 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/ada/zlib.gpr +20 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/blast/Makefile +8 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/blast/README +4 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/blast/blast.c +466 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/blast/blast.h +83 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/blast/test.pk +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/blast/test.txt +1 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/delphi/ZLib.pas +557 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/delphi/ZLibConst.pas +11 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/delphi/readme.txt +76 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/delphi/zlibd32.mak +99 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs +58 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs +202 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs +83 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/dotzlib/DotZLib/CodecBase.cs +198 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/dotzlib/DotZLib/Deflater.cs +106 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/dotzlib/DotZLib/DotZLib.cs +288 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj +141 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/dotzlib/DotZLib/GZipStream.cs +301 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/dotzlib/DotZLib/Inflater.cs +105 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/dotzlib/DotZLib/UnitTests.cs +274 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/dotzlib/DotZLib.build +33 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/dotzlib/DotZLib.chm +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/dotzlib/DotZLib.sln +21 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/dotzlib/LICENSE_1_0.txt +23 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/dotzlib/readme.txt +58 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/gcc_gvmat64/gvmat64.S +574 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/infback9/README +1 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/infback9/infback9.c +615 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/infback9/infback9.h +37 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/infback9/inffix9.h +107 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/infback9/inflate9.h +47 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/infback9/inftree9.c +324 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/infback9/inftree9.h +61 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/iostream/test.cpp +24 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/iostream/zfstream.cpp +329 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/iostream/zfstream.h +128 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/iostream2/zstream.h +307 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/iostream2/zstream_test.cpp +25 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/iostream3/README +35 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/iostream3/TODO +17 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/iostream3/test.cc +50 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/iostream3/zfstream.cc +479 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/iostream3/zfstream.h +466 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/minizip/Makefile +29 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/minizip/Makefile.am +45 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/minizip/MiniZip64_Changes.txt +6 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/minizip/MiniZip64_info.txt +74 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/minizip/configure.ac +32 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/minizip/crypt.h +132 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/minizip/ioapi.c +257 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/minizip/ioapi.h +210 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/minizip/iowin32.c +462 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/minizip/iowin32.h +28 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/minizip/make_vms.com +25 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/minizip/miniunz.c +659 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/minizip/miniunzip.1 +63 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/minizip/minizip.1 +46 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/minizip/minizip.c +521 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/minizip/minizip.pc.in +12 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/minizip/mztools.c +291 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/minizip/mztools.h +37 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/minizip/unzip.c +2128 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/minizip/unzip.h +437 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/minizip/zip.c +2007 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/minizip/zip.h +367 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/pascal/example.pas +599 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/pascal/readme.txt +76 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/pascal/zlibd32.mak +99 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/pascal/zlibpas.pas +276 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/puff/Makefile +42 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/puff/README +63 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/puff/puff.c +840 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/puff/puff.h +35 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/puff/pufftest.c +165 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/puff/zeros.raw +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/testzlib/testzlib.c +275 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/testzlib/testzlib.txt +10 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/untgz/Makefile +14 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/untgz/Makefile.msc +17 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/untgz/untgz.c +674 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/readme.txt +78 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc10/miniunz.vcxproj +310 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters +22 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc10/minizip.vcxproj +307 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters +22 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc10/testzlib.vcxproj +420 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters +58 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj +310 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters +22 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc10/zlib.rc +32 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc10/zlibstat.vcxproj +473 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters +77 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc10/zlibvc.def +158 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc10/zlibvc.sln +135 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc10/zlibvc.vcxproj +657 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters +118 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc11/miniunz.vcxproj +314 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc11/minizip.vcxproj +311 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc11/testzlib.vcxproj +426 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc11/testzlibdll.vcxproj +314 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc11/zlib.rc +32 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc11/zlibstat.vcxproj +464 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc11/zlibvc.def +158 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc11/zlibvc.sln +117 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc11/zlibvc.vcxproj +688 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc12/miniunz.vcxproj +316 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc12/minizip.vcxproj +313 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc12/testzlib.vcxproj +430 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc12/testzlibdll.vcxproj +316 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc12/zlib.rc +32 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc12/zlibstat.vcxproj +467 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc12/zlibvc.def +158 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc12/zlibvc.sln +119 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc12/zlibvc.vcxproj +692 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc14/miniunz.vcxproj +316 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc14/minizip.vcxproj +313 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc14/testzlib.vcxproj +430 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc14/testzlibdll.vcxproj +316 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc14/zlib.rc +32 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc14/zlibstat.vcxproj +467 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc14/zlibvc.def +158 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc14/zlibvc.sln +119 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc14/zlibvc.vcxproj +692 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc9/miniunz.vcproj +565 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc9/minizip.vcproj +562 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc9/testzlib.vcproj +852 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc9/testzlibdll.vcproj +565 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc9/zlib.rc +32 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc9/zlibstat.vcproj +835 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc9/zlibvc.def +158 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc9/zlibvc.sln +144 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/contrib/vstudio/vc9/zlibvc.vcproj +1156 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/crc32.c +1116 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/crc32.h +9446 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/deflate.c +2211 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/deflate.h +346 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/doc/algorithm.txt +209 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/doc/crc-doc.1.0.pdf +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/doc/rfc1950.txt +619 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/doc/rfc1951.txt +955 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/doc/rfc1952.txt +675 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/doc/txtvsbin.txt +107 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/examples/README.examples +54 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/examples/enough.c +597 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/examples/fitblk.c +233 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/examples/gun.c +702 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/examples/gzappend.c +504 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/examples/gzjoin.c +449 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/examples/gzlog.c +1061 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/examples/gzlog.h +91 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/examples/gznorm.c +470 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/examples/zlib_how.html +545 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/examples/zpipe.c +205 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/examples/zran.c +479 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/examples/zran.h +40 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/gzclose.c +25 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/gzguts.h +219 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/gzlib.c +639 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/gzread.c +652 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/gzwrite.c +677 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/infback.c +641 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/inffast.c +323 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/inffast.h +11 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/inffixed.h +94 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/inflate.c +1592 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/inflate.h +126 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/inftrees.c +304 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/inftrees.h +62 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/make_vms.com +867 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/msdos/Makefile.bor +115 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/msdos/Makefile.dj2 +104 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/msdos/Makefile.emx +69 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/msdos/Makefile.msc +112 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/msdos/Makefile.tc +100 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/nintendods/Makefile +126 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/nintendods/README +5 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/old/Makefile.emx +69 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/old/Makefile.riscos +151 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/old/README +3 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/old/descrip.mms +48 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/old/os2/Makefile.os2 +136 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/old/os2/zlib.def +51 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/old/visual-basic.txt +160 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/os400/README400 +48 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/os400/bndsrc +119 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/os400/make.sh +366 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/os400/zlib.inc +527 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/qnx/package.qpg +141 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/treebuild.xml +116 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/trees.c +1182 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/trees.h +128 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/uncompr.c +93 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/watcom/watcom_f.mak +43 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/watcom/watcom_l.mak +43 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/win32/DLL_FAQ.txt +397 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/win32/Makefile.bor +109 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/win32/Makefile.gcc +177 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/win32/Makefile.msc +159 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/win32/README-WIN32.txt +103 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/win32/VisualC.txt +3 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/win32/zlib.def +97 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/win32/zlib1.rc +40 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/zconf.h +534 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/zconf.h.cmakein +536 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/zconf.h.in +534 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/zlib.3 +149 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/zlib.3.pdf +0 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/zlib.h +1935 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/zlib.map +100 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/zlib.pc.cmakein +13 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/zlib.pc.in +13 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/zlib2ansi +152 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/zutil.c +325 -0
- package/mgba-bridge/vendor/mgba/src/third-party/zlib/zutil.h +274 -0
- package/mgba-bridge/vendor/mgba/src/tools/docgen.c +541 -0
- package/mgba-bridge/vendor/mgba/src/tools/font-sdf.c +136 -0
- package/mgba-bridge/vendor/mgba/src/tools/updater-main.c +377 -0
- package/mgba-bridge/vendor/mgba/src/util/CMakeLists.txt +68 -0
- package/mgba-bridge/vendor/mgba/src/util/audio-buffer.c +62 -0
- package/mgba-bridge/vendor/mgba/src/util/audio-resampler.c +109 -0
- package/mgba-bridge/vendor/mgba/src/util/circle-buffer.c +274 -0
- package/mgba-bridge/vendor/mgba/src/util/configuration.c +233 -0
- package/mgba-bridge/vendor/mgba/src/util/convolve.c +182 -0
- package/mgba-bridge/vendor/mgba/src/util/crc32.c +138 -0
- package/mgba-bridge/vendor/mgba/src/util/elf-read.c +128 -0
- package/mgba-bridge/vendor/mgba/src/util/formatting.c +87 -0
- package/mgba-bridge/vendor/mgba/src/util/gbk-table.c +129 -0
- package/mgba-bridge/vendor/mgba/src/util/geometry.c +94 -0
- package/mgba-bridge/vendor/mgba/src/util/gui/file-select.c +236 -0
- package/mgba-bridge/vendor/mgba/src/util/gui/font-metrics.c +199 -0
- package/mgba-bridge/vendor/mgba/src/util/gui/font.c +169 -0
- package/mgba-bridge/vendor/mgba/src/util/gui/menu.c +412 -0
- package/mgba-bridge/vendor/mgba/src/util/gui.c +81 -0
- package/mgba-bridge/vendor/mgba/src/util/hash.c +108 -0
- package/mgba-bridge/vendor/mgba/src/util/image/export.c +81 -0
- package/mgba-bridge/vendor/mgba/src/util/image/font.c +274 -0
- package/mgba-bridge/vendor/mgba/src/util/image/png-io.c +730 -0
- package/mgba-bridge/vendor/mgba/src/util/image.c +1109 -0
- package/mgba-bridge/vendor/mgba/src/util/interpolator.c +116 -0
- package/mgba-bridge/vendor/mgba/src/util/md5.c +228 -0
- package/mgba-bridge/vendor/mgba/src/util/memory.c +15 -0
- package/mgba-bridge/vendor/mgba/src/util/patch-fast.c +130 -0
- package/mgba-bridge/vendor/mgba/src/util/patch-ips.c +93 -0
- package/mgba-bridge/vendor/mgba/src/util/patch-ups.c +254 -0
- package/mgba-bridge/vendor/mgba/src/util/patch.c +25 -0
- package/mgba-bridge/vendor/mgba/src/util/ring-fifo.c +104 -0
- package/mgba-bridge/vendor/mgba/src/util/sfo.c +229 -0
- package/mgba-bridge/vendor/mgba/src/util/sha1.c +258 -0
- package/mgba-bridge/vendor/mgba/src/util/string.c +652 -0
- package/mgba-bridge/vendor/mgba/src/util/table.c +682 -0
- package/mgba-bridge/vendor/mgba/src/util/text-codec.c +197 -0
- package/mgba-bridge/vendor/mgba/src/util/vector.c +18 -0
- package/mgba-bridge/vendor/mgba/src/util/vfs/vfs-devlist.c +104 -0
- package/mgba-bridge/vendor/mgba/src/util/vfs/vfs-dirent.c +173 -0
- package/mgba-bridge/vendor/mgba/src/util/vfs/vfs-fd.c +282 -0
- package/mgba-bridge/vendor/mgba/src/util/vfs/vfs-fifo.c +102 -0
- package/mgba-bridge/vendor/mgba/src/util/vfs/vfs-file.c +159 -0
- package/mgba-bridge/vendor/mgba/src/util/vfs/vfs-lzma.c +404 -0
- package/mgba-bridge/vendor/mgba/src/util/vfs/vfs-mem.c +331 -0
- package/mgba-bridge/vendor/mgba/src/util/vfs/vfs-zip.c +804 -0
- package/mgba-bridge/vendor/mgba/src/util/vfs.c +320 -0
- package/mgba-bridge/vendor/mgba/tools/deploy-mac.py +178 -0
- package/mgba-bridge/vendor/mgba/tools/deploy-win.sh +27 -0
- package/mgba-bridge/vendor/mgba/tools/dlls.gdb +3 -0
- package/mgba-bridge/vendor/mgba/tools/make-dotcode.py +154 -0
- package/mgba-bridge/vendor/mgba/tools/perf.py +230 -0
- package/mgba-bridge/vendor/mgba/tools/sanitize-deb.sh +74 -0
- package/mgba-bridge/vendor/mgba/tools/snes-tile.py +94 -0
- package/mgba-bridge/vendor/mgba/version.cmake +62 -0
- package/package.json +47 -0
- package/src/audio-output.ts +387 -0
- package/src/config.ts +114 -0
- package/src/constants.ts +37 -0
- package/src/extension.ts +570 -0
- package/src/gameboy-mgba.ts +133 -0
- package/src/gameboy-types.ts +24 -0
- package/src/gameboy.ts +33 -0
- package/src/index.ts +1 -0
- package/src/mgba/bridge-bin.ts +66 -0
- package/src/mgba/bridge.ts +145 -0
- package/src/mgba/protocol.ts +30 -0
- package/src/mgba/stdio.ts +74 -0
- package/src/notify.ts +12 -0
- package/src/pi-boy-component.ts +372 -0
- package/src/render/ansi.ts +239 -0
- package/src/render/kitty.ts +154 -0
- package/src/roms.ts +163 -0
- package/src/runtime.ts +36 -0
- package/src/save-state.ts +94 -0
- package/src/terminal.ts +18 -0
- package/tsconfig.json +11 -0
- package/types/shims.d.ts +121 -0
|
@@ -0,0 +1,1941 @@
|
|
|
1
|
+
/* makepng.c */
|
|
2
|
+
#define _ISOC99_SOURCE
|
|
3
|
+
/* Copyright: */
|
|
4
|
+
#define COPYRIGHT "\251 2013,2015 John Cunningham Bowler"
|
|
5
|
+
/*
|
|
6
|
+
* Last changed in libpng 1.6.20 [November 24, 2015]
|
|
7
|
+
*
|
|
8
|
+
* This code is released under the libpng license.
|
|
9
|
+
* For conditions of distribution and use, see the disclaimer
|
|
10
|
+
* and license in png.h
|
|
11
|
+
*
|
|
12
|
+
* Make a test PNG image. The arguments are as follows:
|
|
13
|
+
*
|
|
14
|
+
* makepng [--sRGB|--linear|--1.8] [--tRNS] [--nofilters] \
|
|
15
|
+
* color-type bit-depth [file-name]
|
|
16
|
+
*
|
|
17
|
+
* The color-type may be numeric (and must match the numbers used by the PNG
|
|
18
|
+
* specification) or one of the format names listed below. The bit-depth is the
|
|
19
|
+
* component bit depth, or the pixel bit-depth for a color-mapped image.
|
|
20
|
+
*
|
|
21
|
+
* Without any options no color-space information is written, with the options
|
|
22
|
+
* an sRGB or the appropriate gAMA chunk is written. "1.8" refers to the
|
|
23
|
+
* display system used on older Apple computers to correct for high ambient
|
|
24
|
+
* light levels in the viewing environment; it applies a transform of
|
|
25
|
+
* approximately value^(1/1.45) to the color values and so a gAMA chunk of 65909
|
|
26
|
+
* is written (1.45/2.2).
|
|
27
|
+
*
|
|
28
|
+
* The image data is generated internally. Unless --color is given the images
|
|
29
|
+
* used are as follows:
|
|
30
|
+
*
|
|
31
|
+
* 1 channel: a square image with a diamond, the least luminous colors are on
|
|
32
|
+
* the edge of the image, the most luminous in the center.
|
|
33
|
+
*
|
|
34
|
+
* 2 channels: the color channel increases in luminosity from top to bottom, the
|
|
35
|
+
* alpha channel increases in opacity from left to right.
|
|
36
|
+
*
|
|
37
|
+
* 3 channels: linear combinations of, from the top-left corner clockwise,
|
|
38
|
+
* black, green, white, red.
|
|
39
|
+
*
|
|
40
|
+
* 4 channels: linear combinations of, from the top-left corner clockwise,
|
|
41
|
+
* transparent, red, green, blue.
|
|
42
|
+
*
|
|
43
|
+
* For color-mapped images a four channel color-map is used and if --tRNS is
|
|
44
|
+
* given the PNG file has a tRNS chunk, as follows:
|
|
45
|
+
*
|
|
46
|
+
* 1-bit: entry 0 is transparent-red, entry 1 is opaque-white
|
|
47
|
+
* 2-bit: entry 0: transparent-green
|
|
48
|
+
* entry 1: 40%-red
|
|
49
|
+
* entry 2: 80%-blue
|
|
50
|
+
* entry 3: opaque-white
|
|
51
|
+
* 4-bit: the 16 combinations of the 2-bit case
|
|
52
|
+
* 8-bit: the 256 combinations of the 4-bit case
|
|
53
|
+
*
|
|
54
|
+
* The palette always has 2^bit-depth entries and the tRNS chunk one fewer. The
|
|
55
|
+
* image is the 1-channel diamond, but using palette index, not luminosity.
|
|
56
|
+
*
|
|
57
|
+
* For formats other than color-mapped ones if --tRNS is specified a tRNS chunk
|
|
58
|
+
* is generated with all channels equal to the low bits of 0x0101.
|
|
59
|
+
*
|
|
60
|
+
* Image size is determined by the final pixel depth in bits, i.e. channels x
|
|
61
|
+
* bit-depth, as follows:
|
|
62
|
+
*
|
|
63
|
+
* 8 bits or less: 64x64
|
|
64
|
+
* 16 bits: 256x256
|
|
65
|
+
* More than 16 bits: 1024x1024
|
|
66
|
+
*
|
|
67
|
+
* Row filtering is the libpng default but may be turned off (the 'none' filter
|
|
68
|
+
* is used on every row) with the --nofilters option.
|
|
69
|
+
*
|
|
70
|
+
* The images are not interlaced.
|
|
71
|
+
*
|
|
72
|
+
* If file-name is given then the PNG is written to that file, else it is
|
|
73
|
+
* written to stdout. Notice that stdout is not supported on systems where, by
|
|
74
|
+
* default, it assumes text output; this program makes no attempt to change the
|
|
75
|
+
* text mode of stdout!
|
|
76
|
+
*
|
|
77
|
+
* makepng --color=<color> ...
|
|
78
|
+
*
|
|
79
|
+
* If --color is given then the whole image has that color, color-mapped images
|
|
80
|
+
* will have exactly one palette entry and all image files with be 16x16 in
|
|
81
|
+
* size. The color value is 1 to 4 decimal numbers as appropriate for the color
|
|
82
|
+
* type.
|
|
83
|
+
*
|
|
84
|
+
* makepng --small ...
|
|
85
|
+
*
|
|
86
|
+
* If --small is given the images are no larger than required to include every
|
|
87
|
+
* possible pixel value for the format.
|
|
88
|
+
*
|
|
89
|
+
* For formats with pixels 8 bits or fewer in size the images consist of a
|
|
90
|
+
* single row with 2^pixel-depth pixels, one of every possible value.
|
|
91
|
+
*
|
|
92
|
+
* For formats with 16-bit pixels a 256x256 image is generated containing every
|
|
93
|
+
* possible pixel value.
|
|
94
|
+
*
|
|
95
|
+
* For larger pixel sizes a 256x256 image is generated where the first row
|
|
96
|
+
* consists of each pixel that has identical byte values throughout the pixel
|
|
97
|
+
* followed by rows where the byte values differ within the pixel.
|
|
98
|
+
*
|
|
99
|
+
* In all cases the pixel values are arranged in such a way that the SUB and UP
|
|
100
|
+
* filters give byte sequences for maximal zlib compression. By default (if
|
|
101
|
+
* --nofilters is not given) the SUB filter is used on the first row and the UP
|
|
102
|
+
* filter on all following rows.
|
|
103
|
+
*
|
|
104
|
+
* The --small option is meant to provide good test-case coverage, however the
|
|
105
|
+
* images are not easy to examine visually. Without the --small option the
|
|
106
|
+
* images contain identical color values; the pixel values are adjusted
|
|
107
|
+
* according to the gamma encoding with no gamma encoding being interpreted as
|
|
108
|
+
* sRGB.
|
|
109
|
+
*
|
|
110
|
+
* LICENSING
|
|
111
|
+
* =========
|
|
112
|
+
*
|
|
113
|
+
* This code is copyright of the authors, see the COPYRIGHT define above. The
|
|
114
|
+
* code is licensed as above, using the libpng license. The code generates
|
|
115
|
+
* images which are solely the product of the code; the options choose which of
|
|
116
|
+
* the many possibilities to generate. The images that result (but not the code
|
|
117
|
+
* which generates them) are licensed as defined here:
|
|
118
|
+
*
|
|
119
|
+
* IMPORTANT: the COPYRIGHT #define must contain ISO-Latin-1 characters, the
|
|
120
|
+
* IMAGE_LICENSING #define must contain UTF-8 characters. The 'copyright'
|
|
121
|
+
* symbol 0xA9U (\251) in ISO-Latin-1 encoding and 0xC20xA9 (\302\251) in UTF-8.
|
|
122
|
+
*/
|
|
123
|
+
#define IMAGE_LICENSING "Dedicated to the public domain per Creative Commons "\
|
|
124
|
+
"license \"CC0 1.0\"; https://creativecommons.org/publicdomain/zero/1.0/"
|
|
125
|
+
|
|
126
|
+
#include <stddef.h> /* for offsetof */
|
|
127
|
+
#include <stdlib.h>
|
|
128
|
+
#include <stdio.h>
|
|
129
|
+
#include <string.h>
|
|
130
|
+
#include <ctype.h>
|
|
131
|
+
#include <math.h>
|
|
132
|
+
#include <errno.h>
|
|
133
|
+
#include <assert.h>
|
|
134
|
+
#include <stdint.h>
|
|
135
|
+
|
|
136
|
+
#if defined(HAVE_CONFIG_H) && !defined(PNG_NO_CONFIG_H)
|
|
137
|
+
# include <config.h>
|
|
138
|
+
#endif
|
|
139
|
+
|
|
140
|
+
/* Define the following to use this test against your installed libpng, rather
|
|
141
|
+
* than the one being built here:
|
|
142
|
+
*/
|
|
143
|
+
#ifdef PNG_FREESTANDING_TESTS
|
|
144
|
+
# include <png.h>
|
|
145
|
+
#else
|
|
146
|
+
# include "../../png.h"
|
|
147
|
+
#endif
|
|
148
|
+
|
|
149
|
+
#include <zlib.h>
|
|
150
|
+
|
|
151
|
+
/* Work round for GCC complaints about casting a (double) function result to
|
|
152
|
+
* an unsigned:
|
|
153
|
+
*/
|
|
154
|
+
static unsigned int
|
|
155
|
+
flooru(double d)
|
|
156
|
+
{
|
|
157
|
+
d = floor(d);
|
|
158
|
+
return (unsigned int)d;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
static png_byte
|
|
162
|
+
floorb(double d)
|
|
163
|
+
{
|
|
164
|
+
d = floor(d);
|
|
165
|
+
return (png_byte)d;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* This structure is used for inserting extra chunks (the --insert argument, not
|
|
169
|
+
* documented above.)
|
|
170
|
+
*/
|
|
171
|
+
typedef struct chunk_insert
|
|
172
|
+
{
|
|
173
|
+
struct chunk_insert *next;
|
|
174
|
+
void (*insert)(png_structp, png_infop, int, png_charpp);
|
|
175
|
+
int nparams;
|
|
176
|
+
png_charp parameters[1];
|
|
177
|
+
} chunk_insert;
|
|
178
|
+
|
|
179
|
+
static unsigned int
|
|
180
|
+
channels_of_type(int color_type)
|
|
181
|
+
{
|
|
182
|
+
if (color_type & PNG_COLOR_MASK_PALETTE)
|
|
183
|
+
return 1;
|
|
184
|
+
|
|
185
|
+
else
|
|
186
|
+
{
|
|
187
|
+
int channels = 1;
|
|
188
|
+
|
|
189
|
+
if (color_type & PNG_COLOR_MASK_COLOR)
|
|
190
|
+
channels = 3;
|
|
191
|
+
|
|
192
|
+
if (color_type & PNG_COLOR_MASK_ALPHA)
|
|
193
|
+
return channels + 1;
|
|
194
|
+
|
|
195
|
+
else
|
|
196
|
+
return channels;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
static unsigned int
|
|
201
|
+
pixel_depth_of_type(int color_type, int bit_depth)
|
|
202
|
+
{
|
|
203
|
+
return channels_of_type(color_type) * bit_depth;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
static unsigned int
|
|
207
|
+
image_size_of_type(int color_type, int bit_depth, unsigned int *colors,
|
|
208
|
+
int small)
|
|
209
|
+
{
|
|
210
|
+
if (*colors)
|
|
211
|
+
return 16;
|
|
212
|
+
|
|
213
|
+
else
|
|
214
|
+
{
|
|
215
|
+
int pixel_depth = pixel_depth_of_type(color_type, bit_depth);
|
|
216
|
+
|
|
217
|
+
if (small)
|
|
218
|
+
{
|
|
219
|
+
if (pixel_depth <= 8) /* there will be one row */
|
|
220
|
+
return 1 << pixel_depth;
|
|
221
|
+
|
|
222
|
+
else
|
|
223
|
+
return 256;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
else if (pixel_depth < 8)
|
|
227
|
+
return 64;
|
|
228
|
+
|
|
229
|
+
else if (pixel_depth > 16)
|
|
230
|
+
return 1024;
|
|
231
|
+
|
|
232
|
+
else
|
|
233
|
+
return 256;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
static void
|
|
238
|
+
set_color(png_colorp color, png_bytep trans, unsigned int red,
|
|
239
|
+
unsigned int green, unsigned int blue, unsigned int alpha,
|
|
240
|
+
png_const_bytep gamma_table)
|
|
241
|
+
{
|
|
242
|
+
color->red = gamma_table[red];
|
|
243
|
+
color->green = gamma_table[green];
|
|
244
|
+
color->blue = gamma_table[blue];
|
|
245
|
+
*trans = (png_byte)alpha;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
static int
|
|
249
|
+
generate_palette(png_colorp palette, png_bytep trans, int bit_depth,
|
|
250
|
+
png_const_bytep gamma_table, unsigned int *colors)
|
|
251
|
+
{
|
|
252
|
+
/*
|
|
253
|
+
* 1-bit: entry 0 is transparent-red, entry 1 is opaque-white
|
|
254
|
+
* 2-bit: entry 0: transparent-green
|
|
255
|
+
* entry 1: 40%-red
|
|
256
|
+
* entry 2: 80%-blue
|
|
257
|
+
* entry 3: opaque-white
|
|
258
|
+
* 4-bit: the 16 combinations of the 2-bit case
|
|
259
|
+
* 8-bit: the 256 combinations of the 4-bit case
|
|
260
|
+
*/
|
|
261
|
+
switch (colors[0])
|
|
262
|
+
{
|
|
263
|
+
default:
|
|
264
|
+
fprintf(stderr, "makepng: --colors=...: invalid count %u\n",
|
|
265
|
+
colors[0]);
|
|
266
|
+
exit(1);
|
|
267
|
+
|
|
268
|
+
case 1:
|
|
269
|
+
set_color(palette+0, trans+0, colors[1], colors[1], colors[1], 255,
|
|
270
|
+
gamma_table);
|
|
271
|
+
return 1;
|
|
272
|
+
|
|
273
|
+
case 2:
|
|
274
|
+
set_color(palette+0, trans+0, colors[1], colors[1], colors[1],
|
|
275
|
+
colors[2], gamma_table);
|
|
276
|
+
return 1;
|
|
277
|
+
|
|
278
|
+
case 3:
|
|
279
|
+
set_color(palette+0, trans+0, colors[1], colors[2], colors[3], 255,
|
|
280
|
+
gamma_table);
|
|
281
|
+
return 1;
|
|
282
|
+
|
|
283
|
+
case 4:
|
|
284
|
+
set_color(palette+0, trans+0, colors[1], colors[2], colors[3],
|
|
285
|
+
colors[4], gamma_table);
|
|
286
|
+
return 1;
|
|
287
|
+
|
|
288
|
+
case 0:
|
|
289
|
+
if (bit_depth == 1)
|
|
290
|
+
{
|
|
291
|
+
set_color(palette+0, trans+0, 255, 0, 0, 0, gamma_table);
|
|
292
|
+
set_color(palette+1, trans+1, 255, 255, 255, 255, gamma_table);
|
|
293
|
+
return 2;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
else
|
|
297
|
+
{
|
|
298
|
+
unsigned int size = 1U << (bit_depth/2); /* 2, 4 or 16 */
|
|
299
|
+
unsigned int x, y;
|
|
300
|
+
volatile unsigned int ip = 0;
|
|
301
|
+
|
|
302
|
+
for (x=0; x<size; ++x) for (y=0; y<size; ++y)
|
|
303
|
+
{
|
|
304
|
+
ip = x + (size * y);
|
|
305
|
+
|
|
306
|
+
/* size is at most 16, so the scaled value below fits in 16 bits
|
|
307
|
+
*/
|
|
308
|
+
# define interp(pos, c1, c2) ((pos * c1) + ((size-pos) * c2))
|
|
309
|
+
# define xyinterp(x, y, c1, c2, c3, c4) (((size * size / 2) +\
|
|
310
|
+
(interp(x, c1, c2) * y + (size-y) * interp(x, c3, c4))) /\
|
|
311
|
+
(size*size))
|
|
312
|
+
|
|
313
|
+
set_color(palette+ip, trans+ip,
|
|
314
|
+
/* color: green, red,blue,white */
|
|
315
|
+
xyinterp(x, y, 0, 255, 0, 255),
|
|
316
|
+
xyinterp(x, y, 255, 0, 0, 255),
|
|
317
|
+
xyinterp(x, y, 0, 0, 255, 255),
|
|
318
|
+
/* alpha: 0, 102, 204, 255) */
|
|
319
|
+
xyinterp(x, y, 0, 102, 204, 255),
|
|
320
|
+
gamma_table);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
return ip+1;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
static void
|
|
329
|
+
set_value(png_bytep row, size_t rowbytes, png_uint_32 x, unsigned int bit_depth,
|
|
330
|
+
png_uint_32 value, png_const_bytep gamma_table, double conv)
|
|
331
|
+
{
|
|
332
|
+
unsigned int mask = (1U << bit_depth)-1;
|
|
333
|
+
|
|
334
|
+
x *= bit_depth; /* Maximum x is 4*1024, maximum bit_depth is 16 */
|
|
335
|
+
|
|
336
|
+
if (value <= mask)
|
|
337
|
+
{
|
|
338
|
+
png_uint_32 offset = x >> 3;
|
|
339
|
+
|
|
340
|
+
if (offset < rowbytes && (bit_depth < 16 || offset+1 < rowbytes))
|
|
341
|
+
{
|
|
342
|
+
row += offset;
|
|
343
|
+
|
|
344
|
+
switch (bit_depth)
|
|
345
|
+
{
|
|
346
|
+
case 1:
|
|
347
|
+
case 2:
|
|
348
|
+
case 4:
|
|
349
|
+
/* Don't gamma correct - values get smashed */
|
|
350
|
+
{
|
|
351
|
+
unsigned int shift = (8 - bit_depth) - (x & 0x7U);
|
|
352
|
+
|
|
353
|
+
mask <<= shift;
|
|
354
|
+
value = (value << shift) & mask;
|
|
355
|
+
*row = (png_byte)((*row & ~mask) | value);
|
|
356
|
+
}
|
|
357
|
+
return;
|
|
358
|
+
|
|
359
|
+
default:
|
|
360
|
+
fprintf(stderr, "makepng: bad bit depth (internal error)\n");
|
|
361
|
+
exit(1);
|
|
362
|
+
|
|
363
|
+
case 16:
|
|
364
|
+
value = flooru(65535*pow(value/65535.,conv)+.5);
|
|
365
|
+
*row++ = (png_byte)(value >> 8);
|
|
366
|
+
*row = (png_byte)value;
|
|
367
|
+
return;
|
|
368
|
+
|
|
369
|
+
case 8:
|
|
370
|
+
*row = gamma_table[value];
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
else
|
|
376
|
+
{
|
|
377
|
+
fprintf(stderr, "makepng: row buffer overflow (internal error)\n");
|
|
378
|
+
exit(1);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
else
|
|
383
|
+
{
|
|
384
|
+
fprintf(stderr, "makepng: component overflow (internal error)\n");
|
|
385
|
+
exit(1);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
static int /* filter mask for row */
|
|
390
|
+
generate_row(png_bytep row, size_t rowbytes, unsigned int y, int color_type,
|
|
391
|
+
int bit_depth, png_const_bytep gamma_table, double conv,
|
|
392
|
+
unsigned int *colors, int small)
|
|
393
|
+
{
|
|
394
|
+
int filters = 0; /* file *MASK*, 0 means the default, not NONE */
|
|
395
|
+
png_uint_32 size_max =
|
|
396
|
+
image_size_of_type(color_type, bit_depth, colors, small)-1;
|
|
397
|
+
png_uint_32 depth_max = (1U << bit_depth)-1; /* up to 65536 */
|
|
398
|
+
|
|
399
|
+
if (colors[0] == 0) if (small)
|
|
400
|
+
{
|
|
401
|
+
unsigned int pixel_depth = pixel_depth_of_type(color_type, bit_depth);
|
|
402
|
+
|
|
403
|
+
/* For pixel depths less than 16 generate a single row containing all the
|
|
404
|
+
* possible pixel values. For 16 generate all 65536 byte pair
|
|
405
|
+
* combinations in a 256x256 pixel array.
|
|
406
|
+
*/
|
|
407
|
+
switch (pixel_depth)
|
|
408
|
+
{
|
|
409
|
+
case 1:
|
|
410
|
+
assert(y == 0 && rowbytes == 1 && size_max == 1);
|
|
411
|
+
row[0] = 0x6CU; /* binary: 01101100, only top 2 bits used */
|
|
412
|
+
filters = PNG_FILTER_NONE;
|
|
413
|
+
break;
|
|
414
|
+
|
|
415
|
+
case 2:
|
|
416
|
+
assert(y == 0 && rowbytes == 1 && size_max == 3);
|
|
417
|
+
row[0] = 0x1BU; /* binary 00011011, all bits used */
|
|
418
|
+
filters = PNG_FILTER_NONE;
|
|
419
|
+
break;
|
|
420
|
+
|
|
421
|
+
case 4:
|
|
422
|
+
assert(y == 0 && rowbytes == 8 && size_max == 15);
|
|
423
|
+
row[0] = 0x01U;
|
|
424
|
+
row[1] = 0x23U; /* SUB gives 0x22U for all following bytes */
|
|
425
|
+
row[2] = 0x45U;
|
|
426
|
+
row[3] = 0x67U;
|
|
427
|
+
row[4] = 0x89U;
|
|
428
|
+
row[5] = 0xABU;
|
|
429
|
+
row[6] = 0xCDU;
|
|
430
|
+
row[7] = 0xEFU;
|
|
431
|
+
filters = PNG_FILTER_SUB;
|
|
432
|
+
break;
|
|
433
|
+
|
|
434
|
+
case 8:
|
|
435
|
+
/* The row will have all the pixel values in order starting with
|
|
436
|
+
* '1', the SUB filter will change every byte into '1' (including
|
|
437
|
+
* the last, which generates pixel value '0'). Since the SUB filter
|
|
438
|
+
* has value 1 this should result in maximum compression.
|
|
439
|
+
*/
|
|
440
|
+
assert(y == 0 && rowbytes == 256 && size_max == 255);
|
|
441
|
+
for (;;)
|
|
442
|
+
{
|
|
443
|
+
row[size_max] = 0xFFU & (size_max+1);
|
|
444
|
+
if (size_max == 0)
|
|
445
|
+
break;
|
|
446
|
+
--size_max;
|
|
447
|
+
}
|
|
448
|
+
filters = PNG_FILTER_SUB;
|
|
449
|
+
break;
|
|
450
|
+
|
|
451
|
+
case 16:
|
|
452
|
+
/* Rows are generated such that each row has a constant difference
|
|
453
|
+
* between the first and second byte of each pixel and so that the
|
|
454
|
+
* difference increases by 1 at each row. The rows start with the
|
|
455
|
+
* first byte value of 0 and the value increases to 255 across the
|
|
456
|
+
* row.
|
|
457
|
+
*
|
|
458
|
+
* The difference starts at 1, so the first row is:
|
|
459
|
+
*
|
|
460
|
+
* 0 1 1 2 2 3 3 4 ... 254 255 255 0
|
|
461
|
+
*
|
|
462
|
+
* This means that running the SUB filter on the first row produces:
|
|
463
|
+
*
|
|
464
|
+
* [SUB==1] 0 1 0 1 0 1...
|
|
465
|
+
*
|
|
466
|
+
* Then the difference is 2 on the next row, giving:
|
|
467
|
+
*
|
|
468
|
+
* 0 2 1 3 2 4 3 5 ... 254 0 255 1
|
|
469
|
+
*
|
|
470
|
+
* When the UP filter is run on this libpng produces:
|
|
471
|
+
*
|
|
472
|
+
* [UP ==2] 0 1 0 1 0 1...
|
|
473
|
+
*
|
|
474
|
+
* And so on for all the remain rows to the final two * rows:
|
|
475
|
+
*
|
|
476
|
+
* row 254: 0 255 1 0 2 1 3 2 4 3 ... 254 253 255 254
|
|
477
|
+
* row 255: 0 0 1 1 2 2 3 3 4 4 ... 254 254 255 255
|
|
478
|
+
*/
|
|
479
|
+
assert(rowbytes == 512 && size_max == 255);
|
|
480
|
+
for (;;)
|
|
481
|
+
{
|
|
482
|
+
row[2*size_max ] = 0xFFU & size_max;
|
|
483
|
+
row[2*size_max+1] = 0xFFU & (size_max+y+1);
|
|
484
|
+
if (size_max == 0)
|
|
485
|
+
break;
|
|
486
|
+
--size_max;
|
|
487
|
+
}
|
|
488
|
+
/* The first row must include PNG_FILTER_UP so that libpng knows we
|
|
489
|
+
* need to keep it for the following row:
|
|
490
|
+
*/
|
|
491
|
+
filters = (y == 0 ? PNG_FILTER_SUB+PNG_FILTER_UP : PNG_FILTER_UP);
|
|
492
|
+
break;
|
|
493
|
+
|
|
494
|
+
case 24:
|
|
495
|
+
case 32:
|
|
496
|
+
case 48:
|
|
497
|
+
case 64:
|
|
498
|
+
/* The rows are filled by an alogorithm similar to the above, in the
|
|
499
|
+
* first row pixel bytes are all equal, increasing from 0 by 1 for
|
|
500
|
+
* each pixel. In the second row the bytes within a pixel are
|
|
501
|
+
* incremented 1,3,5,7,... from the previous row byte. Using an odd
|
|
502
|
+
* number ensures all the possible byte values are used.
|
|
503
|
+
*/
|
|
504
|
+
assert(size_max == 255 && rowbytes == 256*(pixel_depth>>3));
|
|
505
|
+
pixel_depth >>= 3; /* now in bytes */
|
|
506
|
+
while (rowbytes > 0)
|
|
507
|
+
{
|
|
508
|
+
const size_t pixel_index = --rowbytes/pixel_depth;
|
|
509
|
+
|
|
510
|
+
if (y == 0)
|
|
511
|
+
row[rowbytes] = 0xFFU & pixel_index;
|
|
512
|
+
|
|
513
|
+
else
|
|
514
|
+
{
|
|
515
|
+
const size_t byte_offset =
|
|
516
|
+
rowbytes - pixel_index * pixel_depth;
|
|
517
|
+
|
|
518
|
+
row[rowbytes] =
|
|
519
|
+
0xFFU & (pixel_index + (byte_offset * 2*y) + 1);
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
filters = (y == 0 ? PNG_FILTER_SUB+PNG_FILTER_UP : PNG_FILTER_UP);
|
|
523
|
+
break;
|
|
524
|
+
|
|
525
|
+
default:
|
|
526
|
+
assert(0/*NOT REACHED*/);
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
else switch (channels_of_type(color_type))
|
|
531
|
+
{
|
|
532
|
+
/* 1 channel: a square image with a diamond, the least luminous colors are on
|
|
533
|
+
* the edge of the image, the most luminous in the center.
|
|
534
|
+
*/
|
|
535
|
+
case 1:
|
|
536
|
+
{
|
|
537
|
+
png_uint_32 x;
|
|
538
|
+
png_uint_32 base = 2*size_max - abs(2*y-size_max);
|
|
539
|
+
|
|
540
|
+
for (x=0; x<=size_max; ++x)
|
|
541
|
+
{
|
|
542
|
+
png_uint_32 luma = base - abs(2*x-size_max);
|
|
543
|
+
|
|
544
|
+
/* 'luma' is now in the range 0..2*size_max, we need
|
|
545
|
+
* 0..depth_max
|
|
546
|
+
*/
|
|
547
|
+
luma = (luma*depth_max + size_max) / (2*size_max);
|
|
548
|
+
set_value(row, rowbytes, x, bit_depth, luma, gamma_table, conv);
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
break;
|
|
552
|
+
|
|
553
|
+
/* 2 channels: the color channel increases in luminosity from top to bottom,
|
|
554
|
+
* the alpha channel increases in opacity from left to right.
|
|
555
|
+
*/
|
|
556
|
+
case 2:
|
|
557
|
+
{
|
|
558
|
+
png_uint_32 alpha = (depth_max * y * 2 + size_max) / (2 * size_max);
|
|
559
|
+
png_uint_32 x;
|
|
560
|
+
|
|
561
|
+
for (x=0; x<=size_max; ++x)
|
|
562
|
+
{
|
|
563
|
+
set_value(row, rowbytes, 2*x, bit_depth,
|
|
564
|
+
(depth_max * x * 2 + size_max) / (2 * size_max), gamma_table,
|
|
565
|
+
conv);
|
|
566
|
+
set_value(row, rowbytes, 2*x+1, bit_depth, alpha, gamma_table,
|
|
567
|
+
conv);
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
break;
|
|
571
|
+
|
|
572
|
+
/* 3 channels: linear combinations of, from the top-left corner clockwise,
|
|
573
|
+
* black, green, white, red.
|
|
574
|
+
*/
|
|
575
|
+
case 3:
|
|
576
|
+
{
|
|
577
|
+
/* x0: the black->red scale (the value of the red component) at the
|
|
578
|
+
* start of the row (blue and green are 0).
|
|
579
|
+
* x1: the green->white scale (the value of the red and blue
|
|
580
|
+
* components at the end of the row; green is depth_max).
|
|
581
|
+
*/
|
|
582
|
+
png_uint_32 Y = (depth_max * y * 2 + size_max) / (2 * size_max);
|
|
583
|
+
png_uint_32 x;
|
|
584
|
+
|
|
585
|
+
/* Interpolate x/depth_max from start to end:
|
|
586
|
+
*
|
|
587
|
+
* start end difference
|
|
588
|
+
* red: Y Y 0
|
|
589
|
+
* green: 0 depth_max depth_max
|
|
590
|
+
* blue: 0 Y Y
|
|
591
|
+
*/
|
|
592
|
+
for (x=0; x<=size_max; ++x)
|
|
593
|
+
{
|
|
594
|
+
set_value(row, rowbytes, 3*x+0, bit_depth, /* red */ Y,
|
|
595
|
+
gamma_table, conv);
|
|
596
|
+
set_value(row, rowbytes, 3*x+1, bit_depth, /* green */
|
|
597
|
+
(depth_max * x * 2 + size_max) / (2 * size_max),
|
|
598
|
+
gamma_table, conv);
|
|
599
|
+
set_value(row, rowbytes, 3*x+2, bit_depth, /* blue */
|
|
600
|
+
(Y * x * 2 + size_max) / (2 * size_max),
|
|
601
|
+
gamma_table, conv);
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
break;
|
|
605
|
+
|
|
606
|
+
/* 4 channels: linear combinations of, from the top-left corner clockwise,
|
|
607
|
+
* transparent, red, green, blue.
|
|
608
|
+
*/
|
|
609
|
+
case 4:
|
|
610
|
+
{
|
|
611
|
+
/* x0: the transparent->blue scale (the value of the blue and alpha
|
|
612
|
+
* components) at the start of the row (red and green are 0).
|
|
613
|
+
* x1: the red->green scale (the value of the red and green
|
|
614
|
+
* components at the end of the row; blue is 0 and alpha is
|
|
615
|
+
* depth_max).
|
|
616
|
+
*/
|
|
617
|
+
png_uint_32 Y = (depth_max * y * 2 + size_max) / (2 * size_max);
|
|
618
|
+
png_uint_32 x;
|
|
619
|
+
|
|
620
|
+
/* Interpolate x/depth_max from start to end:
|
|
621
|
+
*
|
|
622
|
+
* start end difference
|
|
623
|
+
* red: 0 depth_max-Y depth_max-Y
|
|
624
|
+
* green: 0 Y Y
|
|
625
|
+
* blue: Y 0 -Y
|
|
626
|
+
* alpha: Y depth_max depth_max-Y
|
|
627
|
+
*/
|
|
628
|
+
for (x=0; x<=size_max; ++x)
|
|
629
|
+
{
|
|
630
|
+
set_value(row, rowbytes, 4*x+0, bit_depth, /* red */
|
|
631
|
+
((depth_max-Y) * x * 2 + size_max) / (2 * size_max),
|
|
632
|
+
gamma_table, conv);
|
|
633
|
+
set_value(row, rowbytes, 4*x+1, bit_depth, /* green */
|
|
634
|
+
(Y * x * 2 + size_max) / (2 * size_max),
|
|
635
|
+
gamma_table, conv);
|
|
636
|
+
set_value(row, rowbytes, 4*x+2, bit_depth, /* blue */
|
|
637
|
+
Y - (Y * x * 2 + size_max) / (2 * size_max),
|
|
638
|
+
gamma_table, conv);
|
|
639
|
+
set_value(row, rowbytes, 4*x+3, bit_depth, /* alpha */
|
|
640
|
+
Y + ((depth_max-Y) * x * 2 + size_max) / (2 * size_max),
|
|
641
|
+
gamma_table, conv);
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
break;
|
|
645
|
+
|
|
646
|
+
default:
|
|
647
|
+
fprintf(stderr, "makepng: internal bad channel count\n");
|
|
648
|
+
exit(2);
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
else if (color_type & PNG_COLOR_MASK_PALETTE)
|
|
652
|
+
{
|
|
653
|
+
/* Palette with fixed color: the image rows are all 0 and the image width
|
|
654
|
+
* is 16.
|
|
655
|
+
*/
|
|
656
|
+
memset(row, 0, rowbytes);
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
else if (colors[0] == channels_of_type(color_type))
|
|
660
|
+
switch (channels_of_type(color_type))
|
|
661
|
+
{
|
|
662
|
+
case 1:
|
|
663
|
+
{
|
|
664
|
+
png_uint_32 luma = colors[1];
|
|
665
|
+
png_uint_32 x;
|
|
666
|
+
|
|
667
|
+
for (x=0; x<=size_max; ++x)
|
|
668
|
+
set_value(row, rowbytes, x, bit_depth, luma, gamma_table,
|
|
669
|
+
conv);
|
|
670
|
+
}
|
|
671
|
+
break;
|
|
672
|
+
|
|
673
|
+
case 2:
|
|
674
|
+
{
|
|
675
|
+
png_uint_32 luma = colors[1];
|
|
676
|
+
png_uint_32 alpha = colors[2];
|
|
677
|
+
png_uint_32 x;
|
|
678
|
+
|
|
679
|
+
for (x=0; x<size_max; ++x)
|
|
680
|
+
{
|
|
681
|
+
set_value(row, rowbytes, 2*x, bit_depth, luma, gamma_table,
|
|
682
|
+
conv);
|
|
683
|
+
set_value(row, rowbytes, 2*x+1, bit_depth, alpha, gamma_table,
|
|
684
|
+
conv);
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
break;
|
|
688
|
+
|
|
689
|
+
case 3:
|
|
690
|
+
{
|
|
691
|
+
png_uint_32 red = colors[1];
|
|
692
|
+
png_uint_32 green = colors[2];
|
|
693
|
+
png_uint_32 blue = colors[3];
|
|
694
|
+
png_uint_32 x;
|
|
695
|
+
|
|
696
|
+
for (x=0; x<=size_max; ++x)
|
|
697
|
+
{
|
|
698
|
+
set_value(row, rowbytes, 3*x+0, bit_depth, red, gamma_table,
|
|
699
|
+
conv);
|
|
700
|
+
set_value(row, rowbytes, 3*x+1, bit_depth, green, gamma_table,
|
|
701
|
+
conv);
|
|
702
|
+
set_value(row, rowbytes, 3*x+2, bit_depth, blue, gamma_table,
|
|
703
|
+
conv);
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
break;
|
|
707
|
+
|
|
708
|
+
case 4:
|
|
709
|
+
{
|
|
710
|
+
png_uint_32 red = colors[1];
|
|
711
|
+
png_uint_32 green = colors[2];
|
|
712
|
+
png_uint_32 blue = colors[3];
|
|
713
|
+
png_uint_32 alpha = colors[4];
|
|
714
|
+
png_uint_32 x;
|
|
715
|
+
|
|
716
|
+
for (x=0; x<=size_max; ++x)
|
|
717
|
+
{
|
|
718
|
+
set_value(row, rowbytes, 4*x+0, bit_depth, red, gamma_table,
|
|
719
|
+
conv);
|
|
720
|
+
set_value(row, rowbytes, 4*x+1, bit_depth, green, gamma_table,
|
|
721
|
+
conv);
|
|
722
|
+
set_value(row, rowbytes, 4*x+2, bit_depth, blue, gamma_table,
|
|
723
|
+
conv);
|
|
724
|
+
set_value(row, rowbytes, 4*x+3, bit_depth, alpha, gamma_table,
|
|
725
|
+
conv);
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
break;
|
|
729
|
+
|
|
730
|
+
default:
|
|
731
|
+
fprintf(stderr, "makepng: internal bad channel count\n");
|
|
732
|
+
exit(2);
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
else
|
|
736
|
+
{
|
|
737
|
+
fprintf(stderr,
|
|
738
|
+
"makepng: --color: count(%u) does not match channels(%u)\n",
|
|
739
|
+
colors[0], channels_of_type(color_type));
|
|
740
|
+
exit(1);
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
return filters;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
static void PNGCBAPI
|
|
748
|
+
makepng_warning(png_structp png_ptr, png_const_charp message)
|
|
749
|
+
{
|
|
750
|
+
const char **ep = png_get_error_ptr(png_ptr);
|
|
751
|
+
const char *name;
|
|
752
|
+
|
|
753
|
+
if (ep != NULL && *ep != NULL)
|
|
754
|
+
name = *ep;
|
|
755
|
+
|
|
756
|
+
else
|
|
757
|
+
name = "makepng";
|
|
758
|
+
|
|
759
|
+
fprintf(stderr, "%s: warning: %s\n", name, message);
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
static void PNGCBAPI
|
|
763
|
+
makepng_error(png_structp png_ptr, png_const_charp message)
|
|
764
|
+
{
|
|
765
|
+
makepng_warning(png_ptr, message);
|
|
766
|
+
png_longjmp(png_ptr, 1);
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
static int /* 0 on success, else an error code */
|
|
770
|
+
write_png(const char **name, FILE *fp, int color_type, int bit_depth,
|
|
771
|
+
volatile png_fixed_point gamma, chunk_insert * volatile insert,
|
|
772
|
+
unsigned int filters, unsigned int *colors, int small, int tRNS)
|
|
773
|
+
{
|
|
774
|
+
png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING,
|
|
775
|
+
name, makepng_error, makepng_warning);
|
|
776
|
+
volatile png_infop info_ptr = NULL;
|
|
777
|
+
volatile png_bytep row = NULL;
|
|
778
|
+
|
|
779
|
+
if (png_ptr == NULL)
|
|
780
|
+
{
|
|
781
|
+
fprintf(stderr, "makepng: OOM allocating write structure\n");
|
|
782
|
+
return 1;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
if (setjmp(png_jmpbuf(png_ptr)))
|
|
786
|
+
{
|
|
787
|
+
png_structp nv_ptr = png_ptr;
|
|
788
|
+
png_infop nv_info = info_ptr;
|
|
789
|
+
|
|
790
|
+
png_ptr = NULL;
|
|
791
|
+
info_ptr = NULL;
|
|
792
|
+
png_destroy_write_struct(&nv_ptr, &nv_info);
|
|
793
|
+
if (row != NULL) free(row);
|
|
794
|
+
return 1;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
/* Allow benign errors so that we can write PNGs with errors */
|
|
798
|
+
png_set_benign_errors(png_ptr, 1/*allowed*/);
|
|
799
|
+
|
|
800
|
+
/* Max out the text compression level in an attempt to make the license
|
|
801
|
+
* small. If --small then do the same for the IDAT.
|
|
802
|
+
*/
|
|
803
|
+
if (small)
|
|
804
|
+
png_set_compression_level(png_ptr, Z_BEST_COMPRESSION);
|
|
805
|
+
|
|
806
|
+
png_set_text_compression_level(png_ptr, Z_BEST_COMPRESSION);
|
|
807
|
+
|
|
808
|
+
png_init_io(png_ptr, fp);
|
|
809
|
+
|
|
810
|
+
info_ptr = png_create_info_struct(png_ptr);
|
|
811
|
+
if (info_ptr == NULL)
|
|
812
|
+
png_error(png_ptr, "OOM allocating info structure");
|
|
813
|
+
|
|
814
|
+
{
|
|
815
|
+
unsigned int size =
|
|
816
|
+
image_size_of_type(color_type, bit_depth, colors, small);
|
|
817
|
+
unsigned int ysize;
|
|
818
|
+
png_fixed_point real_gamma = 45455; /* For sRGB */
|
|
819
|
+
png_byte gamma_table[256];
|
|
820
|
+
double conv;
|
|
821
|
+
|
|
822
|
+
/* Normally images are square, but with 'small' we want to simply generate
|
|
823
|
+
* all the pixel values, or all that we reasonably can:
|
|
824
|
+
*/
|
|
825
|
+
if (small)
|
|
826
|
+
{
|
|
827
|
+
unsigned int pixel_depth =
|
|
828
|
+
pixel_depth_of_type(color_type, bit_depth);
|
|
829
|
+
|
|
830
|
+
if (pixel_depth <= 8U)
|
|
831
|
+
{
|
|
832
|
+
assert(size == (1U<<pixel_depth));
|
|
833
|
+
ysize = 1U;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
else
|
|
837
|
+
{
|
|
838
|
+
assert(size == 256U);
|
|
839
|
+
ysize = 256U;
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
else
|
|
844
|
+
ysize = size;
|
|
845
|
+
|
|
846
|
+
/* This function uses the libpng values used on read to carry extra
|
|
847
|
+
* information about the gamma:
|
|
848
|
+
*/
|
|
849
|
+
if (gamma == PNG_GAMMA_MAC_18)
|
|
850
|
+
gamma = 65909;
|
|
851
|
+
|
|
852
|
+
else if (gamma > 0 && gamma < 1000)
|
|
853
|
+
gamma = PNG_FP_1;
|
|
854
|
+
|
|
855
|
+
if (gamma > 0)
|
|
856
|
+
real_gamma = gamma;
|
|
857
|
+
|
|
858
|
+
{
|
|
859
|
+
unsigned int i;
|
|
860
|
+
|
|
861
|
+
if (real_gamma == 45455) for (i=0; i<256; ++i)
|
|
862
|
+
{
|
|
863
|
+
gamma_table[i] = (png_byte)i;
|
|
864
|
+
conv = 1.;
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
else
|
|
868
|
+
{
|
|
869
|
+
/* Convert 'i' from sRGB (45455) to real_gamma, this makes
|
|
870
|
+
* the images look the same regardless of the gAMA chunk.
|
|
871
|
+
*/
|
|
872
|
+
conv = real_gamma;
|
|
873
|
+
conv /= 45455;
|
|
874
|
+
|
|
875
|
+
gamma_table[0] = 0;
|
|
876
|
+
|
|
877
|
+
for (i=1; i<255; ++i)
|
|
878
|
+
gamma_table[i] = floorb(pow(i/255.,conv) * 255 + .5);
|
|
879
|
+
|
|
880
|
+
gamma_table[255] = 255;
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
png_set_IHDR(png_ptr, info_ptr, size, ysize, bit_depth, color_type,
|
|
885
|
+
PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
|
|
886
|
+
|
|
887
|
+
if (color_type & PNG_COLOR_MASK_PALETTE)
|
|
888
|
+
{
|
|
889
|
+
int npalette;
|
|
890
|
+
png_color palette[256];
|
|
891
|
+
png_byte trans[256];
|
|
892
|
+
|
|
893
|
+
npalette = generate_palette(palette, trans, bit_depth, gamma_table,
|
|
894
|
+
colors);
|
|
895
|
+
png_set_PLTE(png_ptr, info_ptr, palette, npalette);
|
|
896
|
+
|
|
897
|
+
if (tRNS)
|
|
898
|
+
png_set_tRNS(png_ptr, info_ptr, trans, npalette-1,
|
|
899
|
+
NULL/*transparent color*/);
|
|
900
|
+
|
|
901
|
+
/* Reset gamma_table to prevent the image rows being changed */
|
|
902
|
+
for (npalette=0; npalette<256; ++npalette)
|
|
903
|
+
gamma_table[npalette] = (png_byte)npalette;
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
else if (tRNS)
|
|
907
|
+
{
|
|
908
|
+
png_color_16 col;
|
|
909
|
+
|
|
910
|
+
col.red = col.green = col.blue = col.gray =
|
|
911
|
+
0x0101U & ((1U<<bit_depth)-1U);
|
|
912
|
+
col.index = 0U;
|
|
913
|
+
png_set_tRNS(png_ptr, info_ptr, NULL/*trans*/, 1U, &col);
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
if (gamma == PNG_DEFAULT_sRGB)
|
|
917
|
+
png_set_sRGB(png_ptr, info_ptr, PNG_sRGB_INTENT_ABSOLUTE);
|
|
918
|
+
|
|
919
|
+
else if (gamma > 0) /* Else don't set color space information */
|
|
920
|
+
{
|
|
921
|
+
png_set_gAMA_fixed(png_ptr, info_ptr, real_gamma);
|
|
922
|
+
|
|
923
|
+
/* Just use the sRGB values here. */
|
|
924
|
+
png_set_cHRM_fixed(png_ptr, info_ptr,
|
|
925
|
+
/* color x y */
|
|
926
|
+
/* white */ 31270, 32900,
|
|
927
|
+
/* red */ 64000, 33000,
|
|
928
|
+
/* green */ 30000, 60000,
|
|
929
|
+
/* blue */ 15000, 6000
|
|
930
|
+
);
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
/* Insert extra information. */
|
|
934
|
+
while (insert != NULL)
|
|
935
|
+
{
|
|
936
|
+
insert->insert(png_ptr, info_ptr, insert->nparams, insert->parameters);
|
|
937
|
+
insert = insert->next;
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
/* Write the file header. */
|
|
941
|
+
png_write_info(png_ptr, info_ptr);
|
|
942
|
+
|
|
943
|
+
/* Restrict the filters */
|
|
944
|
+
png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE, filters);
|
|
945
|
+
|
|
946
|
+
{
|
|
947
|
+
# ifdef PNG_WRITE_INTERLACING_SUPPORTED
|
|
948
|
+
int passes = png_set_interlace_handling(png_ptr);
|
|
949
|
+
# else /* !WRITE_INTERLACING */
|
|
950
|
+
int passes = 1;
|
|
951
|
+
# endif /* !WRITE_INTERLACING */
|
|
952
|
+
int pass;
|
|
953
|
+
size_t rowbytes = png_get_rowbytes(png_ptr, info_ptr);
|
|
954
|
+
|
|
955
|
+
row = malloc(rowbytes);
|
|
956
|
+
|
|
957
|
+
if (row == NULL)
|
|
958
|
+
png_error(png_ptr, "OOM allocating row buffer");
|
|
959
|
+
|
|
960
|
+
for (pass = 0; pass < passes; ++pass)
|
|
961
|
+
{
|
|
962
|
+
unsigned int y;
|
|
963
|
+
|
|
964
|
+
for (y=0; y<ysize; ++y)
|
|
965
|
+
{
|
|
966
|
+
unsigned int row_filters =
|
|
967
|
+
generate_row(row, rowbytes, y, color_type, bit_depth,
|
|
968
|
+
gamma_table, conv, colors, small);
|
|
969
|
+
|
|
970
|
+
if (row_filters != 0 && filters == PNG_ALL_FILTERS)
|
|
971
|
+
png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE, row_filters);
|
|
972
|
+
|
|
973
|
+
png_write_row(png_ptr, row);
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
/* Finish writing the file. */
|
|
980
|
+
png_write_end(png_ptr, info_ptr);
|
|
981
|
+
|
|
982
|
+
{
|
|
983
|
+
png_structp nv_ptr = png_ptr;
|
|
984
|
+
png_infop nv_info = info_ptr;
|
|
985
|
+
|
|
986
|
+
png_ptr = NULL;
|
|
987
|
+
info_ptr = NULL;
|
|
988
|
+
png_destroy_write_struct(&nv_ptr, &nv_info);
|
|
989
|
+
}
|
|
990
|
+
free(row);
|
|
991
|
+
return 0;
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
|
|
995
|
+
static size_t
|
|
996
|
+
load_file(png_const_charp name, png_bytepp result)
|
|
997
|
+
{
|
|
998
|
+
FILE *fp = tmpfile();
|
|
999
|
+
|
|
1000
|
+
if (fp != NULL)
|
|
1001
|
+
{
|
|
1002
|
+
FILE *ip = fopen(name, "rb");
|
|
1003
|
+
|
|
1004
|
+
if (ip != NULL)
|
|
1005
|
+
{
|
|
1006
|
+
size_t total = 0;
|
|
1007
|
+
int ch;
|
|
1008
|
+
|
|
1009
|
+
for (;;)
|
|
1010
|
+
{
|
|
1011
|
+
ch = getc(ip);
|
|
1012
|
+
if (ch == EOF) break;
|
|
1013
|
+
putc(ch, fp);
|
|
1014
|
+
++total;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
if (ferror(ip))
|
|
1018
|
+
{
|
|
1019
|
+
perror(name);
|
|
1020
|
+
fprintf(stderr, "%s: read error\n", name);
|
|
1021
|
+
(void)fclose(ip);
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
else
|
|
1025
|
+
{
|
|
1026
|
+
(void)fclose(ip);
|
|
1027
|
+
|
|
1028
|
+
if (ferror(fp))
|
|
1029
|
+
{
|
|
1030
|
+
perror("temporary file");
|
|
1031
|
+
fprintf(stderr, "temporary file write error\n");
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
else
|
|
1035
|
+
{
|
|
1036
|
+
rewind(fp);
|
|
1037
|
+
|
|
1038
|
+
if (total > 0)
|
|
1039
|
+
{
|
|
1040
|
+
/* Round up to a multiple of 4 here to allow an iCCP profile
|
|
1041
|
+
* to be padded to a 4x boundary.
|
|
1042
|
+
*/
|
|
1043
|
+
png_bytep data = malloc((total+3)&~3);
|
|
1044
|
+
|
|
1045
|
+
if (data != NULL)
|
|
1046
|
+
{
|
|
1047
|
+
size_t new_size = 0;
|
|
1048
|
+
|
|
1049
|
+
for (;;)
|
|
1050
|
+
{
|
|
1051
|
+
ch = getc(fp);
|
|
1052
|
+
if (ch == EOF) break;
|
|
1053
|
+
data[new_size++] = (png_byte)ch;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
if (ferror(fp) || new_size != total)
|
|
1057
|
+
{
|
|
1058
|
+
perror("temporary file");
|
|
1059
|
+
fprintf(stderr, "temporary file read error\n");
|
|
1060
|
+
free(data);
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
else
|
|
1064
|
+
{
|
|
1065
|
+
(void)fclose(fp);
|
|
1066
|
+
*result = data;
|
|
1067
|
+
return total;
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
else
|
|
1072
|
+
fprintf(stderr, "%s: out of memory loading file\n", name);
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
else
|
|
1076
|
+
fprintf(stderr, "%s: empty file\n", name);
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
else
|
|
1082
|
+
{
|
|
1083
|
+
perror(name);
|
|
1084
|
+
fprintf(stderr, "%s: open failed\n", name);
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
fclose(fp);
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
else
|
|
1091
|
+
fprintf(stderr, "makepng: %s: could not open temporary file\n", name);
|
|
1092
|
+
|
|
1093
|
+
exit(1);
|
|
1094
|
+
return 0;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
static size_t
|
|
1098
|
+
load_fake(png_charp param, png_bytepp profile)
|
|
1099
|
+
{
|
|
1100
|
+
char *endptr = NULL;
|
|
1101
|
+
uint64_t size = strtoull(param, &endptr, 0/*base*/);
|
|
1102
|
+
|
|
1103
|
+
/* The 'fake' format is <number>*[string] */
|
|
1104
|
+
if (endptr != NULL && *endptr == '*')
|
|
1105
|
+
{
|
|
1106
|
+
size_t len = strlen(++endptr);
|
|
1107
|
+
size_t result = (size_t)size;
|
|
1108
|
+
|
|
1109
|
+
if (len == 0) len = 1; /* capture the terminating '\0' */
|
|
1110
|
+
|
|
1111
|
+
/* Now repeat that string to fill 'size' bytes. */
|
|
1112
|
+
if (result == size && (*profile = malloc(result)) != NULL)
|
|
1113
|
+
{
|
|
1114
|
+
png_bytep out = *profile;
|
|
1115
|
+
|
|
1116
|
+
if (len == 1)
|
|
1117
|
+
memset(out, *endptr, result);
|
|
1118
|
+
|
|
1119
|
+
else
|
|
1120
|
+
{
|
|
1121
|
+
while (size >= len)
|
|
1122
|
+
{
|
|
1123
|
+
memcpy(out, endptr, len);
|
|
1124
|
+
out += len;
|
|
1125
|
+
size -= len;
|
|
1126
|
+
}
|
|
1127
|
+
memcpy(out, endptr, size);
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
return result;
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
else
|
|
1134
|
+
{
|
|
1135
|
+
fprintf(stderr, "%s: size exceeds system limits\n", param);
|
|
1136
|
+
exit(1);
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
return 0;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
static void
|
|
1144
|
+
check_param_count(int nparams, int expect)
|
|
1145
|
+
{
|
|
1146
|
+
if (nparams != expect)
|
|
1147
|
+
{
|
|
1148
|
+
fprintf(stderr, "bad parameter count (internal error)\n");
|
|
1149
|
+
exit(1);
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
static void
|
|
1154
|
+
insert_iCCP(png_structp png_ptr, png_infop info_ptr, int nparams,
|
|
1155
|
+
png_charpp params)
|
|
1156
|
+
{
|
|
1157
|
+
png_bytep profile = NULL;
|
|
1158
|
+
png_uint_32 proflen = 0;
|
|
1159
|
+
int result;
|
|
1160
|
+
|
|
1161
|
+
check_param_count(nparams, 2);
|
|
1162
|
+
|
|
1163
|
+
switch (params[1][0])
|
|
1164
|
+
{
|
|
1165
|
+
case '<':
|
|
1166
|
+
{
|
|
1167
|
+
size_t filelen = load_file(params[1]+1, &profile);
|
|
1168
|
+
if (filelen > 0xfffffffc) /* Maximum profile length */
|
|
1169
|
+
{
|
|
1170
|
+
fprintf(stderr, "%s: file too long (%lu) for an ICC profile\n",
|
|
1171
|
+
params[1]+1, (unsigned long)filelen);
|
|
1172
|
+
exit(1);
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
proflen = (png_uint_32)filelen;
|
|
1176
|
+
}
|
|
1177
|
+
break;
|
|
1178
|
+
|
|
1179
|
+
case '0': case '1': case '2': case '3': case '4':
|
|
1180
|
+
case '5': case '6': case '7': case '8': case '9':
|
|
1181
|
+
{
|
|
1182
|
+
size_t fake_len = load_fake(params[1], &profile);
|
|
1183
|
+
|
|
1184
|
+
if (fake_len > 0) /* else a simple parameter */
|
|
1185
|
+
{
|
|
1186
|
+
if (fake_len > 0xffffffff) /* Maximum profile length */
|
|
1187
|
+
{
|
|
1188
|
+
fprintf(stderr,
|
|
1189
|
+
"%s: fake data too long (%lu) for an ICC profile\n",
|
|
1190
|
+
params[1], (unsigned long)fake_len);
|
|
1191
|
+
exit(1);
|
|
1192
|
+
}
|
|
1193
|
+
proflen = (png_uint_32)(fake_len & ~3U);
|
|
1194
|
+
/* Always fix up the profile length. */
|
|
1195
|
+
png_save_uint_32(profile, proflen);
|
|
1196
|
+
break;
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
default:
|
|
1201
|
+
fprintf(stderr, "--insert iCCP \"%s\": unrecognized\n", params[1]);
|
|
1202
|
+
fprintf(stderr, " use '<' to read a file: \"<filename\"\n");
|
|
1203
|
+
exit(1);
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
result = 1;
|
|
1207
|
+
|
|
1208
|
+
if (proflen & 3)
|
|
1209
|
+
{
|
|
1210
|
+
fprintf(stderr,
|
|
1211
|
+
"makepng: --insert iCCP %s: profile length made a multiple of 4\n",
|
|
1212
|
+
params[1]);
|
|
1213
|
+
|
|
1214
|
+
/* load_file allocates extra space for this padding, the ICC spec requires
|
|
1215
|
+
* padding with zero bytes.
|
|
1216
|
+
*/
|
|
1217
|
+
while (proflen & 3)
|
|
1218
|
+
profile[proflen++] = 0;
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
if (profile != NULL && proflen > 3)
|
|
1222
|
+
{
|
|
1223
|
+
png_uint_32 prof_header = png_get_uint_32(profile);
|
|
1224
|
+
|
|
1225
|
+
if (prof_header != proflen)
|
|
1226
|
+
{
|
|
1227
|
+
fprintf(stderr, "--insert iCCP %s: profile length field wrong:\n",
|
|
1228
|
+
params[1]);
|
|
1229
|
+
fprintf(stderr, " actual %lu, recorded value %lu (corrected)\n",
|
|
1230
|
+
(unsigned long)proflen, (unsigned long)prof_header);
|
|
1231
|
+
png_save_uint_32(profile, proflen);
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
if (result && profile != NULL && proflen >=4)
|
|
1236
|
+
png_set_iCCP(png_ptr, info_ptr, params[0], PNG_COMPRESSION_TYPE_BASE,
|
|
1237
|
+
profile, proflen);
|
|
1238
|
+
|
|
1239
|
+
if (profile)
|
|
1240
|
+
free(profile);
|
|
1241
|
+
|
|
1242
|
+
if (!result)
|
|
1243
|
+
exit(1);
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
static void
|
|
1247
|
+
clear_text(png_text *text, png_charp keyword)
|
|
1248
|
+
{
|
|
1249
|
+
text->compression = -1; /* none */
|
|
1250
|
+
text->key = keyword;
|
|
1251
|
+
text->text = NULL;
|
|
1252
|
+
text->text_length = 0; /* libpng calculates this */
|
|
1253
|
+
text->itxt_length = 0; /* libpng calculates this */
|
|
1254
|
+
text->lang = NULL;
|
|
1255
|
+
text->lang_key = NULL;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
static void
|
|
1259
|
+
set_text(png_structp png_ptr, png_infop info_ptr, png_textp text,
|
|
1260
|
+
png_charp param)
|
|
1261
|
+
{
|
|
1262
|
+
switch (param[0])
|
|
1263
|
+
{
|
|
1264
|
+
case '<':
|
|
1265
|
+
{
|
|
1266
|
+
png_bytep file = NULL;
|
|
1267
|
+
|
|
1268
|
+
text->text_length = load_file(param+1, &file);
|
|
1269
|
+
text->text = (png_charp)file;
|
|
1270
|
+
}
|
|
1271
|
+
break;
|
|
1272
|
+
|
|
1273
|
+
case '0': case '1': case '2': case '3': case '4':
|
|
1274
|
+
case '5': case '6': case '7': case '8': case '9':
|
|
1275
|
+
{
|
|
1276
|
+
png_bytep data = NULL;
|
|
1277
|
+
size_t fake_len = load_fake(param, &data);
|
|
1278
|
+
|
|
1279
|
+
if (fake_len > 0) /* else a simple parameter */
|
|
1280
|
+
{
|
|
1281
|
+
text->text_length = fake_len;
|
|
1282
|
+
text->text = (png_charp)data;
|
|
1283
|
+
break;
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
default:
|
|
1288
|
+
text->text = param;
|
|
1289
|
+
break;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
png_set_text(png_ptr, info_ptr, text, 1);
|
|
1293
|
+
|
|
1294
|
+
if (text->text != param)
|
|
1295
|
+
free(text->text);
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
static void
|
|
1299
|
+
insert_tEXt(png_structp png_ptr, png_infop info_ptr, int nparams,
|
|
1300
|
+
png_charpp params)
|
|
1301
|
+
{
|
|
1302
|
+
png_text text;
|
|
1303
|
+
|
|
1304
|
+
check_param_count(nparams, 2);
|
|
1305
|
+
clear_text(&text, params[0]);
|
|
1306
|
+
set_text(png_ptr, info_ptr, &text, params[1]);
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
static void
|
|
1310
|
+
insert_zTXt(png_structp png_ptr, png_infop info_ptr, int nparams,
|
|
1311
|
+
png_charpp params)
|
|
1312
|
+
{
|
|
1313
|
+
png_text text;
|
|
1314
|
+
|
|
1315
|
+
check_param_count(nparams, 2);
|
|
1316
|
+
clear_text(&text, params[0]);
|
|
1317
|
+
text.compression = 0; /* deflate */
|
|
1318
|
+
set_text(png_ptr, info_ptr, &text, params[1]);
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
static void
|
|
1322
|
+
insert_iTXt(png_structp png_ptr, png_infop info_ptr, int nparams,
|
|
1323
|
+
png_charpp params)
|
|
1324
|
+
{
|
|
1325
|
+
png_text text;
|
|
1326
|
+
|
|
1327
|
+
check_param_count(nparams, 4);
|
|
1328
|
+
clear_text(&text, params[0]);
|
|
1329
|
+
text.compression = 2; /* iTXt + deflate */
|
|
1330
|
+
text.lang = params[1];/* language tag */
|
|
1331
|
+
text.lang_key = params[2]; /* translated keyword */
|
|
1332
|
+
set_text(png_ptr, info_ptr, &text, params[3]);
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
static void
|
|
1336
|
+
insert_hIST(png_structp png_ptr, png_infop info_ptr, int nparams,
|
|
1337
|
+
png_charpp params)
|
|
1338
|
+
{
|
|
1339
|
+
int i;
|
|
1340
|
+
png_uint_16 freq[256];
|
|
1341
|
+
|
|
1342
|
+
/* libpng takes the count from the PLTE count; we don't check it here but we
|
|
1343
|
+
* do set the array to 0 for unspecified entries.
|
|
1344
|
+
*/
|
|
1345
|
+
memset(freq, 0, sizeof freq);
|
|
1346
|
+
for (i=0; i<nparams; ++i)
|
|
1347
|
+
{
|
|
1348
|
+
char *endptr = NULL;
|
|
1349
|
+
unsigned long int l = strtoul(params[i], &endptr, 0/*base*/);
|
|
1350
|
+
|
|
1351
|
+
if (params[i][0] && *endptr == 0 && l <= 65535)
|
|
1352
|
+
freq[i] = (png_uint_16)l;
|
|
1353
|
+
|
|
1354
|
+
else
|
|
1355
|
+
{
|
|
1356
|
+
fprintf(stderr, "hIST[%d]: %s: invalid frequency\n", i, params[i]);
|
|
1357
|
+
exit(1);
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
png_set_hIST(png_ptr, info_ptr, freq);
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
static png_byte
|
|
1365
|
+
bval(png_const_structrp png_ptr, png_charp param, unsigned int maxval)
|
|
1366
|
+
{
|
|
1367
|
+
char *endptr = NULL;
|
|
1368
|
+
unsigned long int l = strtoul(param, &endptr, 0/*base*/);
|
|
1369
|
+
|
|
1370
|
+
if (param[0] && *endptr == 0 && l <= maxval)
|
|
1371
|
+
return (png_byte)l;
|
|
1372
|
+
|
|
1373
|
+
else
|
|
1374
|
+
png_error(png_ptr, "sBIT: invalid sBIT value");
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
static void
|
|
1378
|
+
insert_sBIT(png_structp png_ptr, png_infop info_ptr, int nparams,
|
|
1379
|
+
png_charpp params)
|
|
1380
|
+
{
|
|
1381
|
+
int ct = png_get_color_type(png_ptr, info_ptr);
|
|
1382
|
+
int c = (ct & PNG_COLOR_MASK_COLOR ? 3 : 1) +
|
|
1383
|
+
(ct & PNG_COLOR_MASK_ALPHA ? 1 : 0);
|
|
1384
|
+
unsigned int maxval =
|
|
1385
|
+
ct & PNG_COLOR_MASK_PALETTE ? 8U : png_get_bit_depth(png_ptr, info_ptr);
|
|
1386
|
+
png_color_8 sBIT;
|
|
1387
|
+
|
|
1388
|
+
if (nparams != c)
|
|
1389
|
+
png_error(png_ptr, "sBIT: incorrect parameter count");
|
|
1390
|
+
|
|
1391
|
+
if (ct & PNG_COLOR_MASK_COLOR)
|
|
1392
|
+
{
|
|
1393
|
+
sBIT.red = bval(png_ptr, params[0], maxval);
|
|
1394
|
+
sBIT.green = bval(png_ptr, params[1], maxval);
|
|
1395
|
+
sBIT.blue = bval(png_ptr, params[2], maxval);
|
|
1396
|
+
sBIT.gray = 42;
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
else
|
|
1400
|
+
{
|
|
1401
|
+
sBIT.red = sBIT.green = sBIT.blue = 42;
|
|
1402
|
+
sBIT.gray = bval(png_ptr, params[0], maxval);
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
if (ct & PNG_COLOR_MASK_ALPHA)
|
|
1406
|
+
sBIT.alpha = bval(png_ptr, params[nparams-1], maxval);
|
|
1407
|
+
|
|
1408
|
+
else
|
|
1409
|
+
sBIT.alpha = 42;
|
|
1410
|
+
|
|
1411
|
+
png_set_sBIT(png_ptr, info_ptr, &sBIT);
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
#if 0
|
|
1415
|
+
static void
|
|
1416
|
+
insert_sPLT(png_structp png_ptr, png_infop info_ptr, int nparams, png_charpp params)
|
|
1417
|
+
{
|
|
1418
|
+
fprintf(stderr, "insert sPLT: NYI\n");
|
|
1419
|
+
}
|
|
1420
|
+
#endif
|
|
1421
|
+
|
|
1422
|
+
static int
|
|
1423
|
+
find_parameters(png_const_charp what, png_charp param, png_charp *list,
|
|
1424
|
+
int nparams)
|
|
1425
|
+
{
|
|
1426
|
+
/* Parameters are separated by '\n' or ':' characters, up to nparams are
|
|
1427
|
+
* accepted (more is an error) and the number found is returned.
|
|
1428
|
+
*/
|
|
1429
|
+
int i;
|
|
1430
|
+
for (i=0; *param && i<nparams; ++i)
|
|
1431
|
+
{
|
|
1432
|
+
list[i] = param;
|
|
1433
|
+
while (*++param) if (*param == '\n' || *param == ':')
|
|
1434
|
+
{
|
|
1435
|
+
*param++ = 0; /* Terminate last parameter */
|
|
1436
|
+
break; /* And start a new one. */
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
if (*param)
|
|
1441
|
+
{
|
|
1442
|
+
fprintf(stderr, "--insert %s: too many parameters (%s)\n", what, param);
|
|
1443
|
+
exit(1);
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
list[i] = NULL; /* terminates list */
|
|
1447
|
+
return i; /* number of parameters filled in */
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
static void
|
|
1451
|
+
bad_parameter_count(png_const_charp what, int nparams)
|
|
1452
|
+
{
|
|
1453
|
+
fprintf(stderr, "--insert %s: bad parameter count %d\n", what, nparams);
|
|
1454
|
+
exit(1);
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
static chunk_insert *
|
|
1458
|
+
make_insert(png_const_charp what,
|
|
1459
|
+
void (*insert)(png_structp, png_infop, int, png_charpp),
|
|
1460
|
+
int nparams, png_charpp list)
|
|
1461
|
+
{
|
|
1462
|
+
int i;
|
|
1463
|
+
chunk_insert *cip;
|
|
1464
|
+
|
|
1465
|
+
cip = malloc(offsetof(chunk_insert,parameters) +
|
|
1466
|
+
nparams * sizeof (png_charp));
|
|
1467
|
+
|
|
1468
|
+
if (cip == NULL)
|
|
1469
|
+
{
|
|
1470
|
+
fprintf(stderr, "--insert %s: out of memory allocating %d parameters\n",
|
|
1471
|
+
what, nparams);
|
|
1472
|
+
exit(1);
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
cip->next = NULL;
|
|
1476
|
+
cip->insert = insert;
|
|
1477
|
+
cip->nparams = nparams;
|
|
1478
|
+
for (i=0; i<nparams; ++i)
|
|
1479
|
+
cip->parameters[i] = list[i];
|
|
1480
|
+
|
|
1481
|
+
return cip;
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
static chunk_insert *
|
|
1485
|
+
find_insert(png_const_charp what, png_charp param)
|
|
1486
|
+
{
|
|
1487
|
+
png_uint_32 chunk = 0;
|
|
1488
|
+
png_charp parameter_list[1024];
|
|
1489
|
+
int i, nparams;
|
|
1490
|
+
|
|
1491
|
+
/* Assemble the chunk name */
|
|
1492
|
+
for (i=0; i<4; ++i)
|
|
1493
|
+
{
|
|
1494
|
+
char ch = what[i];
|
|
1495
|
+
|
|
1496
|
+
if ((ch >= 65 && ch <= 90) || (ch >= 97 && ch <= 122))
|
|
1497
|
+
chunk = (chunk << 8) + what[i];
|
|
1498
|
+
|
|
1499
|
+
else
|
|
1500
|
+
break;
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
if (i < 4 || what[4] != 0)
|
|
1504
|
+
{
|
|
1505
|
+
fprintf(stderr, "makepng --insert \"%s\": invalid chunk name\n", what);
|
|
1506
|
+
exit(1);
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
/* Assemble the parameter list. */
|
|
1510
|
+
nparams = find_parameters(what, param, parameter_list, 1024);
|
|
1511
|
+
|
|
1512
|
+
# define CHUNK(a,b,c,d) (((a)<<24)+((b)<<16)+((c)<<8)+(d))
|
|
1513
|
+
|
|
1514
|
+
switch (chunk)
|
|
1515
|
+
{
|
|
1516
|
+
case CHUNK(105,67,67,80): /* iCCP */
|
|
1517
|
+
if (nparams == 2)
|
|
1518
|
+
return make_insert(what, insert_iCCP, nparams, parameter_list);
|
|
1519
|
+
break;
|
|
1520
|
+
|
|
1521
|
+
case CHUNK(116,69,88,116): /* tEXt */
|
|
1522
|
+
if (nparams == 2)
|
|
1523
|
+
return make_insert(what, insert_tEXt, nparams, parameter_list);
|
|
1524
|
+
break;
|
|
1525
|
+
|
|
1526
|
+
case CHUNK(122,84,88,116): /* zTXt */
|
|
1527
|
+
if (nparams == 2)
|
|
1528
|
+
return make_insert(what, insert_zTXt, nparams, parameter_list);
|
|
1529
|
+
break;
|
|
1530
|
+
|
|
1531
|
+
case CHUNK(105,84,88,116): /* iTXt */
|
|
1532
|
+
if (nparams == 4)
|
|
1533
|
+
return make_insert(what, insert_iTXt, nparams, parameter_list);
|
|
1534
|
+
break;
|
|
1535
|
+
|
|
1536
|
+
case CHUNK(104,73,83,84): /* hIST */
|
|
1537
|
+
if (nparams <= 256)
|
|
1538
|
+
return make_insert(what, insert_hIST, nparams, parameter_list);
|
|
1539
|
+
break;
|
|
1540
|
+
|
|
1541
|
+
case CHUNK(115,66,73,84): /* sBIT */
|
|
1542
|
+
if (nparams <= 4)
|
|
1543
|
+
return make_insert(what, insert_sBIT, nparams, parameter_list);
|
|
1544
|
+
break;
|
|
1545
|
+
|
|
1546
|
+
#if 0
|
|
1547
|
+
case CHUNK(115,80,76,84): /* sPLT */
|
|
1548
|
+
return make_insert(what, insert_sPLT, nparams, parameter_list);
|
|
1549
|
+
#endif
|
|
1550
|
+
|
|
1551
|
+
default:
|
|
1552
|
+
fprintf(stderr, "makepng --insert \"%s\": unrecognized chunk name\n",
|
|
1553
|
+
what);
|
|
1554
|
+
exit(1);
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
bad_parameter_count(what, nparams);
|
|
1558
|
+
return NULL;
|
|
1559
|
+
}
|
|
1560
|
+
|
|
1561
|
+
/* This is necessary because libpng expects writeable strings for things like
|
|
1562
|
+
* text chunks (maybe this should be fixed...)
|
|
1563
|
+
*/
|
|
1564
|
+
static png_charp
|
|
1565
|
+
strstash(png_const_charp foo)
|
|
1566
|
+
{
|
|
1567
|
+
/* The program indicates a memory allocation error by crashing, this is by
|
|
1568
|
+
* design.
|
|
1569
|
+
*/
|
|
1570
|
+
if (foo != NULL)
|
|
1571
|
+
{
|
|
1572
|
+
png_charp bar = malloc(strlen(foo)+1);
|
|
1573
|
+
return strcpy(bar, foo);
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
return NULL;
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1579
|
+
static png_charp
|
|
1580
|
+
strstash_list(const png_const_charp *text)
|
|
1581
|
+
{
|
|
1582
|
+
size_t foo = 0;
|
|
1583
|
+
png_charp result, bar;
|
|
1584
|
+
const png_const_charp *line = text;
|
|
1585
|
+
|
|
1586
|
+
while (*line != NULL)
|
|
1587
|
+
foo += strlen(*line++);
|
|
1588
|
+
|
|
1589
|
+
result = bar = malloc(foo+1);
|
|
1590
|
+
|
|
1591
|
+
line = text;
|
|
1592
|
+
while (*line != NULL)
|
|
1593
|
+
{
|
|
1594
|
+
foo = strlen(*line);
|
|
1595
|
+
memcpy(bar, *line++, foo);
|
|
1596
|
+
bar += foo;
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
*bar = 0;
|
|
1600
|
+
return result;
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
/* These are used to insert Copyright and Licence fields, they allow the text to
|
|
1604
|
+
* have \n unlike the --insert option.
|
|
1605
|
+
*/
|
|
1606
|
+
static chunk_insert *
|
|
1607
|
+
add_tEXt(const char *key, const png_const_charp *text)
|
|
1608
|
+
{
|
|
1609
|
+
static char what[5] = { 116, 69, 88, 116, 0 };
|
|
1610
|
+
png_charp parameter_list[3];
|
|
1611
|
+
|
|
1612
|
+
parameter_list[0] = strstash(key);
|
|
1613
|
+
parameter_list[1] = strstash_list(text);
|
|
1614
|
+
parameter_list[2] = NULL;
|
|
1615
|
+
|
|
1616
|
+
return make_insert(what, insert_tEXt, 2, parameter_list);
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
static chunk_insert *
|
|
1620
|
+
add_iTXt(const char *key, const char *language, const char *language_key,
|
|
1621
|
+
const png_const_charp *text)
|
|
1622
|
+
{
|
|
1623
|
+
static char what[5] = { 105, 84, 88, 116, 0 };
|
|
1624
|
+
png_charp parameter_list[5];
|
|
1625
|
+
|
|
1626
|
+
parameter_list[0] = strstash(key);
|
|
1627
|
+
parameter_list[1] = strstash(language);
|
|
1628
|
+
parameter_list[2] = strstash(language_key);
|
|
1629
|
+
parameter_list[3] = strstash_list(text);
|
|
1630
|
+
parameter_list[4] = NULL;
|
|
1631
|
+
|
|
1632
|
+
return make_insert(what, insert_iTXt, 4, parameter_list);
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
/* This is a not-very-good parser for a sequence of numbers (including 0). It
|
|
1636
|
+
* doesn't accept some apparently valid things, but it accepts all the sensible
|
|
1637
|
+
* combinations.
|
|
1638
|
+
*/
|
|
1639
|
+
static void
|
|
1640
|
+
parse_color(char *arg, unsigned int *colors)
|
|
1641
|
+
{
|
|
1642
|
+
unsigned int ncolors = 0;
|
|
1643
|
+
|
|
1644
|
+
while (*arg && ncolors < 4)
|
|
1645
|
+
{
|
|
1646
|
+
char *ep = arg;
|
|
1647
|
+
|
|
1648
|
+
unsigned long ul = strtoul(arg, &ep, 0);
|
|
1649
|
+
|
|
1650
|
+
if (ul > 65535)
|
|
1651
|
+
{
|
|
1652
|
+
fprintf(stderr, "makepng --color=...'%s': too big\n", arg);
|
|
1653
|
+
exit(1);
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
if (ep == arg)
|
|
1657
|
+
{
|
|
1658
|
+
fprintf(stderr, "makepng --color=...'%s': not a valid color\n", arg);
|
|
1659
|
+
exit(1);
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
if (*ep) ++ep; /* skip a separator */
|
|
1663
|
+
arg = ep;
|
|
1664
|
+
|
|
1665
|
+
colors[++ncolors] = (unsigned int)ul; /* checked above */
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
if (*arg)
|
|
1669
|
+
{
|
|
1670
|
+
fprintf(stderr, "makepng --color=...'%s': too many values\n", arg);
|
|
1671
|
+
exit(1);
|
|
1672
|
+
}
|
|
1673
|
+
|
|
1674
|
+
*colors = ncolors;
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
int
|
|
1678
|
+
main(int argc, char **argv)
|
|
1679
|
+
{
|
|
1680
|
+
FILE *fp = stdout;
|
|
1681
|
+
const char *file_name = NULL;
|
|
1682
|
+
int color_type = 8; /* invalid */
|
|
1683
|
+
int bit_depth = 32; /* invalid */
|
|
1684
|
+
int small = 0; /* make full size images */
|
|
1685
|
+
int tRNS = 0; /* don't output a tRNS chunk */
|
|
1686
|
+
unsigned int colors[5];
|
|
1687
|
+
unsigned int filters = PNG_ALL_FILTERS;
|
|
1688
|
+
png_fixed_point gamma = 0; /* not set */
|
|
1689
|
+
chunk_insert *head_insert = NULL;
|
|
1690
|
+
chunk_insert **insert_ptr = &head_insert;
|
|
1691
|
+
|
|
1692
|
+
memset(colors, 0, sizeof colors);
|
|
1693
|
+
|
|
1694
|
+
while (--argc > 0)
|
|
1695
|
+
{
|
|
1696
|
+
char *arg = *++argv;
|
|
1697
|
+
|
|
1698
|
+
if (strcmp(arg, "--small") == 0)
|
|
1699
|
+
{
|
|
1700
|
+
small = 1;
|
|
1701
|
+
continue;
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1704
|
+
if (strcmp(arg, "--tRNS") == 0)
|
|
1705
|
+
{
|
|
1706
|
+
tRNS = 1;
|
|
1707
|
+
continue;
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
if (strcmp(arg, "--sRGB") == 0)
|
|
1711
|
+
{
|
|
1712
|
+
gamma = PNG_DEFAULT_sRGB;
|
|
1713
|
+
continue;
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1716
|
+
if (strcmp(arg, "--linear") == 0)
|
|
1717
|
+
{
|
|
1718
|
+
gamma = PNG_FP_1;
|
|
1719
|
+
continue;
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
if (strcmp(arg, "--1.8") == 0)
|
|
1723
|
+
{
|
|
1724
|
+
gamma = PNG_GAMMA_MAC_18;
|
|
1725
|
+
continue;
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1728
|
+
if (strcmp(arg, "--nofilters") == 0)
|
|
1729
|
+
{
|
|
1730
|
+
filters = PNG_FILTER_NONE;
|
|
1731
|
+
continue;
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
if (strncmp(arg, "--color=", 8) == 0)
|
|
1735
|
+
{
|
|
1736
|
+
parse_color(arg+8, colors);
|
|
1737
|
+
continue;
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
if (argc >= 3 && strcmp(arg, "--insert") == 0)
|
|
1741
|
+
{
|
|
1742
|
+
png_const_charp what = *++argv;
|
|
1743
|
+
png_charp param = *++argv;
|
|
1744
|
+
chunk_insert *new_insert;
|
|
1745
|
+
|
|
1746
|
+
argc -= 2;
|
|
1747
|
+
|
|
1748
|
+
new_insert = find_insert(what, param);
|
|
1749
|
+
|
|
1750
|
+
if (new_insert != NULL)
|
|
1751
|
+
{
|
|
1752
|
+
*insert_ptr = new_insert;
|
|
1753
|
+
insert_ptr = &new_insert->next;
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
continue;
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1759
|
+
if (arg[0] == '-')
|
|
1760
|
+
{
|
|
1761
|
+
fprintf(stderr, "makepng: %s: invalid option\n", arg);
|
|
1762
|
+
exit(1);
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1765
|
+
if (strcmp(arg, "palette") == 0)
|
|
1766
|
+
{
|
|
1767
|
+
color_type = PNG_COLOR_TYPE_PALETTE;
|
|
1768
|
+
continue;
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
if (strncmp(arg, "gray", 4) == 0)
|
|
1772
|
+
{
|
|
1773
|
+
if (arg[4] == 0)
|
|
1774
|
+
{
|
|
1775
|
+
color_type = PNG_COLOR_TYPE_GRAY;
|
|
1776
|
+
continue;
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
else if (strcmp(arg+4, "a") == 0 ||
|
|
1780
|
+
strcmp(arg+4, "alpha") == 0 ||
|
|
1781
|
+
strcmp(arg+4, "-alpha") == 0)
|
|
1782
|
+
{
|
|
1783
|
+
color_type = PNG_COLOR_TYPE_GRAY_ALPHA;
|
|
1784
|
+
continue;
|
|
1785
|
+
}
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1788
|
+
if (strncmp(arg, "rgb", 3) == 0)
|
|
1789
|
+
{
|
|
1790
|
+
if (arg[3] == 0)
|
|
1791
|
+
{
|
|
1792
|
+
color_type = PNG_COLOR_TYPE_RGB;
|
|
1793
|
+
continue;
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
else if (strcmp(arg+3, "a") == 0 ||
|
|
1797
|
+
strcmp(arg+3, "alpha") == 0 ||
|
|
1798
|
+
strcmp(arg+3, "-alpha") == 0)
|
|
1799
|
+
{
|
|
1800
|
+
color_type = PNG_COLOR_TYPE_RGB_ALPHA;
|
|
1801
|
+
continue;
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
if (color_type == 8 && isdigit(arg[0]))
|
|
1806
|
+
{
|
|
1807
|
+
color_type = atoi(arg);
|
|
1808
|
+
if (color_type < 0 || color_type > 6 || color_type == 1 ||
|
|
1809
|
+
color_type == 5)
|
|
1810
|
+
{
|
|
1811
|
+
fprintf(stderr, "makepng: %s: not a valid color type\n", arg);
|
|
1812
|
+
exit(1);
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
continue;
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
if (bit_depth == 32 && isdigit(arg[0]))
|
|
1819
|
+
{
|
|
1820
|
+
bit_depth = atoi(arg);
|
|
1821
|
+
if (bit_depth <= 0 || bit_depth > 16 ||
|
|
1822
|
+
(bit_depth & -bit_depth) != bit_depth)
|
|
1823
|
+
{
|
|
1824
|
+
fprintf(stderr, "makepng: %s: not a valid bit depth\n", arg);
|
|
1825
|
+
exit(1);
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
continue;
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
if (argc == 1) /* It's the file name */
|
|
1832
|
+
{
|
|
1833
|
+
fp = fopen(arg, "wb");
|
|
1834
|
+
if (fp == NULL)
|
|
1835
|
+
{
|
|
1836
|
+
fprintf(stderr, "%s: %s: could not open\n", arg, strerror(errno));
|
|
1837
|
+
exit(1);
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1840
|
+
file_name = arg;
|
|
1841
|
+
continue;
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
fprintf(stderr, "makepng: %s: unknown argument\n", arg);
|
|
1845
|
+
exit(1);
|
|
1846
|
+
} /* argument while loop */
|
|
1847
|
+
|
|
1848
|
+
if (color_type == 8 || bit_depth == 32)
|
|
1849
|
+
{
|
|
1850
|
+
fprintf(stderr, "usage: makepng [--small] [--sRGB|--linear|--1.8] "
|
|
1851
|
+
"[--color=...] color-type bit-depth [file-name]\n"
|
|
1852
|
+
" Make a test PNG file, by default writes to stdout.\n"
|
|
1853
|
+
" Other options are available, UTSL.\n");
|
|
1854
|
+
exit(1);
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1857
|
+
/* Check the colors */
|
|
1858
|
+
{
|
|
1859
|
+
unsigned int lim = (color_type == PNG_COLOR_TYPE_PALETTE ? 255U :
|
|
1860
|
+
(1U<<bit_depth)-1);
|
|
1861
|
+
unsigned int i;
|
|
1862
|
+
|
|
1863
|
+
for (i=1; i<=colors[0]; ++i)
|
|
1864
|
+
if (colors[i] > lim)
|
|
1865
|
+
{
|
|
1866
|
+
fprintf(stderr, "makepng: --color=...: %u out of range [0..%u]\n",
|
|
1867
|
+
colors[i], lim);
|
|
1868
|
+
exit(1);
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
|
|
1872
|
+
/* small and colors are incomparible (will probably crash if both are used at
|
|
1873
|
+
* the same time!)
|
|
1874
|
+
*/
|
|
1875
|
+
if (small && colors[0] != 0)
|
|
1876
|
+
{
|
|
1877
|
+
fprintf(stderr, "makepng: --color --small: only one at a time!\n");
|
|
1878
|
+
exit(1);
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
/* Restrict the filters for more speed to those we know are used for the
|
|
1882
|
+
* generated images.
|
|
1883
|
+
*/
|
|
1884
|
+
if (filters == PNG_ALL_FILTERS && !small/*small provides defaults*/)
|
|
1885
|
+
{
|
|
1886
|
+
if ((color_type & PNG_COLOR_MASK_PALETTE) != 0 || bit_depth < 8)
|
|
1887
|
+
filters = PNG_FILTER_NONE;
|
|
1888
|
+
|
|
1889
|
+
else if (color_type & PNG_COLOR_MASK_COLOR) /* rgb */
|
|
1890
|
+
{
|
|
1891
|
+
if (bit_depth == 8)
|
|
1892
|
+
filters &= ~(PNG_FILTER_NONE | PNG_FILTER_AVG);
|
|
1893
|
+
|
|
1894
|
+
else
|
|
1895
|
+
filters = PNG_FILTER_SUB | PNG_FILTER_PAETH;
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
else /* gray 8 or 16-bit */
|
|
1899
|
+
filters &= ~PNG_FILTER_NONE;
|
|
1900
|
+
}
|
|
1901
|
+
|
|
1902
|
+
/* Insert standard copyright and licence text. */
|
|
1903
|
+
{
|
|
1904
|
+
static png_const_charp copyright[] =
|
|
1905
|
+
{
|
|
1906
|
+
COPYRIGHT, /* ISO-Latin-1 */
|
|
1907
|
+
NULL
|
|
1908
|
+
};
|
|
1909
|
+
static png_const_charp licensing[] =
|
|
1910
|
+
{
|
|
1911
|
+
IMAGE_LICENSING, /* UTF-8 */
|
|
1912
|
+
NULL
|
|
1913
|
+
};
|
|
1914
|
+
|
|
1915
|
+
chunk_insert *new_insert;
|
|
1916
|
+
|
|
1917
|
+
new_insert = add_tEXt("Copyright", copyright);
|
|
1918
|
+
if (new_insert != NULL)
|
|
1919
|
+
{
|
|
1920
|
+
*insert_ptr = new_insert;
|
|
1921
|
+
insert_ptr = &new_insert->next;
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1924
|
+
new_insert = add_iTXt("Licensing", "en", NULL, licensing);
|
|
1925
|
+
if (new_insert != NULL)
|
|
1926
|
+
{
|
|
1927
|
+
*insert_ptr = new_insert;
|
|
1928
|
+
insert_ptr = &new_insert->next;
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
1931
|
+
|
|
1932
|
+
{
|
|
1933
|
+
int ret = write_png(&file_name, fp, color_type, bit_depth, gamma,
|
|
1934
|
+
head_insert, filters, colors, small, tRNS);
|
|
1935
|
+
|
|
1936
|
+
if (ret != 0 && file_name != NULL)
|
|
1937
|
+
remove(file_name);
|
|
1938
|
+
|
|
1939
|
+
return ret;
|
|
1940
|
+
}
|
|
1941
|
+
}
|