From 55bfff7cf6541caac172b43186cf14405185b14d Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Sat, 13 Apr 2019 12:40:52 -0400 Subject: fix curses on linux --- frontends/calculator/CEdev/bin/License | 240 +- frontends/calculator/CEdev/bin/eZ80.ini | 36 +- .../CEdev/examples/debugging/bin/DEMO.map | 70 +- .../calculator/CEdev/examples/debugging/makefile | 36 +- .../calculator/CEdev/examples/debugging/readme.md | 20 +- .../calculator/CEdev/examples/debugging/src/main.c | 94 +- .../CEdev/examples/delay/autotester.json | 78 +- frontends/calculator/CEdev/examples/delay/makefile | 30 +- .../calculator/CEdev/examples/delay/readme.md | 18 +- .../calculator/CEdev/examples/delay/src/main.c | 32 +- .../CEdev/examples/fileio_detect/autotester.json | 66 +- .../CEdev/examples/fileio_detect/bin/DEMO.map | 296 +- .../CEdev/examples/fileio_detect/makefile | 30 +- .../CEdev/examples/fileio_detect/readme.md | 22 +- .../CEdev/examples/fileio_detect/src/main.c | 94 +- .../examples/fileio_detectany/autotester.json | 66 +- .../CEdev/examples/fileio_detectany/bin/DEMO.map | 296 +- .../CEdev/examples/fileio_detectany/makefile | 30 +- .../CEdev/examples/fileio_detectany/readme.md | 22 +- .../CEdev/examples/fileio_detectany/src/main.c | 98 +- .../examples/fileio_factorize/autotester.badjson | 74 +- .../CEdev/examples/fileio_factorize/makefile | 30 +- .../CEdev/examples/fileio_factorize/readme.md | 24 +- .../CEdev/examples/fileio_factorize/src/main.c | 150 +- .../examples/fileio_os_vars/autotester.badjson | 130 +- .../CEdev/examples/fileio_os_vars/makefile | 30 +- .../CEdev/examples/fileio_os_vars/readme.md | 20 +- .../CEdev/examples/fileio_os_vars/src/main.c | 202 +- .../examples/fileio_read_write/autotester.json | 66 +- .../CEdev/examples/fileio_read_write/bin/DEMO.map | 308 +- .../CEdev/examples/fileio_read_write/makefile | 30 +- .../CEdev/examples/fileio_read_write/readme.md | 20 +- .../CEdev/examples/fileio_read_write/src/main.c | 176 +- .../CEdev/examples/fileio_rename/autotester.json | 66 +- .../CEdev/examples/fileio_rename/makefile | 30 +- .../CEdev/examples/fileio_rename/readme.md | 16 +- .../CEdev/examples/fileio_rename/src/main.c | 154 +- .../CEdev/examples/fileio_tokens/autotester.json | 66 +- .../CEdev/examples/fileio_tokens/makefile | 30 +- .../CEdev/examples/fileio_tokens/readme.md | 20 +- .../CEdev/examples/fileio_tokens/src/main.c | 118 +- .../CEdev/examples/gfx_blitting/autotester.json | 92 +- .../CEdev/examples/gfx_blitting/makefile | 30 +- .../CEdev/examples/gfx_blitting/readme.md | 14 +- .../CEdev/examples/gfx_blitting/src/main.c | 94 +- .../examples/gfx_buffered_cube/autotester.json | 80 +- .../CEdev/examples/gfx_buffered_cube/makefile | 30 +- .../CEdev/examples/gfx_buffered_cube/readme.md | 20 +- .../CEdev/examples/gfx_buffered_cube/src/main.c | 226 +- .../CEdev/examples/gfx_char/autotester.json | 60 +- .../calculator/CEdev/examples/gfx_char/makefile | 30 +- .../calculator/CEdev/examples/gfx_char/readme.md | 20 +- .../calculator/CEdev/examples/gfx_char/src/main.c | 104 +- .../CEdev/examples/gfx_clipping/autotester.json | 104 +- .../CEdev/examples/gfx_clipping/makefile | 30 +- .../CEdev/examples/gfx_clipping/readme.md | 20 +- .../CEdev/examples/gfx_clipping/src/main.c | 170 +- .../CEdev/examples/gfx_floodfill/autotester.json | 72 +- .../CEdev/examples/gfx_floodfill/makefile | 30 +- .../CEdev/examples/gfx_floodfill/readme.md | 20 +- .../CEdev/examples/gfx_floodfill/src/main.c | 100 +- .../gfx_fullscreen_tiled_image/autotester.json | 62 +- .../examples/gfx_fullscreen_tiled_image/makefile | 30 +- .../examples/gfx_fullscreen_tiled_image/readme.md | 18 +- .../gfx_fullscreen_tiled_image/src/gfx/convpng.ini | 30 +- .../gfx_fullscreen_tiled_image/src/gfx/tiles_gfx.c | 8 +- .../gfx_fullscreen_tiled_image/src/gfx/tiles_gfx.h | 16 +- .../gfx_fullscreen_tiled_image/src/gfx/tileset.c | 36 +- .../gfx_fullscreen_tiled_image/src/gfx/var_gfx.c | 62 +- .../gfx_fullscreen_tiled_image/src/gfx/var_gfx.h | 62 +- .../examples/gfx_fullscreen_tiled_image/src/main.c | 132 +- .../CEdev/examples/gfx_hello_world/autotester.json | 80 +- .../CEdev/examples/gfx_hello_world/makefile | 30 +- .../CEdev/examples/gfx_hello_world/readme.md | 20 +- .../CEdev/examples/gfx_hello_world/src/main.c | 92 +- .../CEdev/examples/gfx_light_dark/autotester.json | 126 +- .../CEdev/examples/gfx_light_dark/makefile | 30 +- .../CEdev/examples/gfx_light_dark/readme.md | 20 +- .../CEdev/examples/gfx_light_dark/src/main.c | 118 +- .../CEdev/examples/gfx_rletsprite/autotester.json | 60 +- .../CEdev/examples/gfx_rletsprite/makefile | 30 +- .../CEdev/examples/gfx_rletsprite/readme.md | 20 +- .../examples/gfx_rletsprite/src/gfx/convpng.ini | 10 +- .../examples/gfx_rletsprite/src/gfx/logo_gfx.c | 404 +- .../examples/gfx_rletsprite/src/gfx/logo_gfx.h | 34 +- .../CEdev/examples/gfx_rletsprite/src/gfx/ubuntu.c | 50 +- .../CEdev/examples/gfx_rletsprite/src/main.c | 218 +- .../examples/gfx_shapes_shift/autotester.json | 126 +- .../CEdev/examples/gfx_shapes_shift/makefile | 30 +- .../CEdev/examples/gfx_shapes_shift/readme.md | 20 +- .../CEdev/examples/gfx_shapes_shift/src/main.c | 224 +- .../CEdev/examples/gfx_sprite/autotester.json | 62 +- .../calculator/CEdev/examples/gfx_sprite/makefile | 30 +- .../calculator/CEdev/examples/gfx_sprite/readme.md | 20 +- .../CEdev/examples/gfx_sprite/src/gfx/convpng.ini | 8 +- .../CEdev/examples/gfx_sprite/src/gfx/logo_gfx.c | 388 +- .../CEdev/examples/gfx_sprite/src/gfx/logo_gfx.h | 34 +- .../CEdev/examples/gfx_sprite/src/gfx/ubuntu.c | 80 +- .../CEdev/examples/gfx_sprite/src/main.c | 78 +- .../examples/gfx_sprite_compress/autotester.json | 66 +- .../CEdev/examples/gfx_sprite_compress/makefile | 30 +- .../CEdev/examples/gfx_sprite_compress/readme.md | 20 +- .../examples/gfx_sprite_compress/src/gfx/all_gfx.c | 522 +- .../examples/gfx_sprite_compress/src/gfx/all_gfx.h | 26 +- .../examples/gfx_sprite_compress/src/gfx/apple.c | 1334 +- .../gfx_sprite_compress/src/gfx/convpng.ini | 10 +- .../CEdev/examples/gfx_sprite_compress/src/main.c | 90 +- .../CEdev/examples/gfx_sprite_keys/autotester.json | 62 +- .../CEdev/examples/gfx_sprite_keys/makefile | 30 +- .../CEdev/examples/gfx_sprite_keys/readme.md | 20 +- .../examples/gfx_sprite_keys/src/gfx/convpng.ini | 8 +- .../examples/gfx_sprite_keys/src/gfx/logo_gfx.c | 388 +- .../examples/gfx_sprite_keys/src/gfx/logo_gfx.h | 34 +- .../examples/gfx_sprite_keys/src/gfx/ubuntu.c | 80 +- .../CEdev/examples/gfx_sprite_keys/src/main.c | 178 +- .../examples/gfx_sprite_rotate/autotester.json | 66 +- .../CEdev/examples/gfx_sprite_rotate/makefile | 30 +- .../CEdev/examples/gfx_sprite_rotate/readme.md | 20 +- .../examples/gfx_sprite_rotate/src/gfx/convpng.ini | 8 +- .../examples/gfx_sprite_rotate/src/gfx/logo_gfx.c | 390 +- .../examples/gfx_sprite_rotate/src/gfx/logo_gfx.h | 30 +- .../examples/gfx_sprite_rotate/src/gfx/ubuntu.c | 80 +- .../CEdev/examples/gfx_sprite_rotate/src/main.c | 74 +- .../gfx_sprite_rotate_scale/autotester.json | 66 +- .../examples/gfx_sprite_rotate_scale/makefile | 30 +- .../examples/gfx_sprite_rotate_scale/readme.md | 18 +- .../gfx_sprite_rotate_scale/src/gfx/convpng.ini | 8 +- .../gfx_sprite_rotate_scale/src/gfx/logo_gfx.c | 390 +- .../gfx_sprite_rotate_scale/src/gfx/logo_gfx.h | 30 +- .../gfx_sprite_rotate_scale/src/gfx/ubuntu.c | 80 +- .../examples/gfx_sprite_rotate_scale/src/main.c | 88 +- .../examples/gfx_sprites_appvar/autotester.json | 62 +- .../CEdev/examples/gfx_sprites_appvar/makefile | 30 +- .../CEdev/examples/gfx_sprites_appvar/readme.md | 20 +- .../examples/gfx_sprites_appvar/src/gfx/all_gfx.c | 8 +- .../examples/gfx_sprites_appvar/src/gfx/all_gfx.h | 16 +- .../gfx_sprites_appvar/src/gfx/convpng.ini | 32 +- .../examples/gfx_sprites_appvar/src/gfx/mint.c | 8 +- .../examples/gfx_sprites_appvar/src/gfx/ubuntu.c | 8 +- .../examples/gfx_sprites_appvar/src/gfx/var_gfx.c | 54 +- .../examples/gfx_sprites_appvar/src/gfx/var_gfx.h | 36 +- .../CEdev/examples/gfx_sprites_appvar/src/main.c | 84 +- .../CEdev/examples/gfx_template/makefile | 30 +- .../CEdev/examples/gfx_template/readme.md | 24 +- .../CEdev/examples/gfx_template/src/main.c | 128 +- .../CEdev/examples/gfx_tilemap/autotester.json | 86 +- .../calculator/CEdev/examples/gfx_tilemap/makefile | 30 +- .../CEdev/examples/gfx_tilemap/readme.md | 20 +- .../CEdev/examples/gfx_tilemap/src/gfx/convpng.ini | 10 +- .../CEdev/examples/gfx_tilemap/src/gfx/tiles_gfx.c | 162 +- .../CEdev/examples/gfx_tilemap/src/gfx/tiles_gfx.h | 542 +- .../CEdev/examples/gfx_tilemap/src/gfx/tileset.c | 5388 +++---- .../CEdev/examples/gfx_tilemap/src/main.c | 204 +- .../CEdev/examples/gfx_tilemap/src/tilemapdata.c | 60 +- .../examples/gfx_tilemap_appvar/autotester.json | 86 +- .../CEdev/examples/gfx_tilemap_appvar/makefile | 30 +- .../CEdev/examples/gfx_tilemap_appvar/readme.md | 20 +- .../gfx_tilemap_appvar/src/gfx/convpng.ini | 28 +- .../gfx_tilemap_appvar/src/gfx/tiles_gfx.c | 8 +- .../gfx_tilemap_appvar/src/gfx/tiles_gfx.h | 20 +- .../examples/gfx_tilemap_appvar/src/gfx/tileset.c | 268 +- .../examples/gfx_tilemap_appvar/src/gfx/var_gfx.c | 62 +- .../examples/gfx_tilemap_appvar/src/gfx/var_gfx.h | 296 +- .../CEdev/examples/gfx_tilemap_appvar/src/main.c | 212 +- .../examples/gfx_tilemap_appvar/src/tilemapdata.c | 60 +- .../examples/gfx_tilemap_compress/autotester.json | 86 +- .../CEdev/examples/gfx_tilemap_compress/makefile | 30 +- .../CEdev/examples/gfx_tilemap_compress/readme.md | 20 +- .../gfx_tilemap_compress/src/gfx/convpng.ini | 12 +- .../gfx_tilemap_compress/src/gfx/tiles_gfx.c | 162 +- .../gfx_tilemap_compress/src/gfx/tiles_gfx.h | 284 +- .../gfx_tilemap_compress/src/gfx/tileset.c | 1452 +- .../CEdev/examples/gfx_tilemap_compress/src/main.c | 238 +- .../gfx_tilemap_compress/src/tilemapdata.c | 30 +- .../gfx_tilemap_compress/src/tilemapdata.h | 18 +- .../calculator/CEdev/examples/hello_world/makefile | 30 +- .../CEdev/examples/hello_world/readme.md | 18 +- .../CEdev/examples/hello_world/src/main.c | 96 +- .../CEdev/examples/keypad_arrows/autotester.json | 122 +- .../CEdev/examples/keypad_arrows/makefile | 30 +- .../CEdev/examples/keypad_arrows/readme.md | 20 +- .../CEdev/examples/keypad_arrows/src/main.c | 98 +- .../examples/keypad_multiple_keys/autotester.json | 124 +- .../CEdev/examples/keypad_multiple_keys/makefile | 30 +- .../CEdev/examples/keypad_multiple_keys/readme.md | 20 +- .../CEdev/examples/keypad_multiple_keys/src/main.c | 120 +- .../calculator/CEdev/examples/lcd_fade/makefile | 30 +- .../calculator/CEdev/examples/lcd_fade/readme.md | 16 +- .../calculator/CEdev/examples/lcd_fade/src/main.c | 58 +- .../calculator/CEdev/examples/lcd_fill/makefile | 30 +- .../calculator/CEdev/examples/lcd_fill/readme.md | 20 +- .../calculator/CEdev/examples/lcd_fill/src/main.c | 60 +- frontends/calculator/CEdev/examples/makefile | 24 +- .../CEdev/examples/os_input/autotester.json | 76 +- .../calculator/CEdev/examples/os_input/makefile | 30 +- .../calculator/CEdev/examples/os_input/readme.md | 18 +- .../calculator/CEdev/examples/os_input/src/main.c | 72 +- .../CEdev/examples/random/autotester.json | 60 +- .../calculator/CEdev/examples/random/bin/DEMO.map | 286 +- .../calculator/CEdev/examples/random/makefile | 30 +- .../calculator/CEdev/examples/random/readme.md | 18 +- .../calculator/CEdev/examples/random/src/main.c | 38 +- .../CEdev/examples/real_time_clock/makefile | 30 +- .../CEdev/examples/real_time_clock/readme.md | 20 +- .../CEdev/examples/real_time_clock/src/main.c | 78 +- .../CEdev/examples/second_counter/makefile | 30 +- .../CEdev/examples/second_counter/readme.md | 20 +- .../CEdev/examples/second_counter/src/main.c | 86 +- .../CEdev/examples/second_counter2/makefile | 30 +- .../CEdev/examples/second_counter2/readme.md | 20 +- .../CEdev/examples/second_counter2/src/main.c | 114 +- .../calculator/CEdev/examples/stopwatch/makefile | 30 +- .../calculator/CEdev/examples/stopwatch/readme.md | 20 +- .../calculator/CEdev/examples/stopwatch/src/main.c | 120 +- .../calculator/CEdev/examples/template/makefile | 30 +- .../calculator/CEdev/examples/template/readme.md | 28 +- .../calculator/CEdev/examples/template/src/main.c | 60 +- frontends/calculator/CEdev/include/.linker_script | 610 +- frontends/calculator/CEdev/include/.makefile | 426 +- frontends/calculator/CEdev/include/assert.h | 38 +- frontends/calculator/CEdev/include/compression.h | 54 +- frontends/calculator/CEdev/include/ctype.h | 60 +- frontends/calculator/CEdev/include/debug.h | 248 +- frontends/calculator/CEdev/include/decompress.h | 46 +- frontends/calculator/CEdev/include/errno.h | 30 +- .../calculator/CEdev/include/fasmg-ez80/ez80.inc | 1724 +-- .../calculator/CEdev/include/fasmg-ez80/ld.fasmg | 1518 +- .../CEdev/include/fasmg-ez80/ti84pceg.inc | 122 +- .../CEdev/include/fasmg-ez80/tiformat.inc | 210 +- frontends/calculator/CEdev/include/fileioc.h | 1018 +- frontends/calculator/CEdev/include/float.h | 150 +- frontends/calculator/CEdev/include/format.h | 218 +- frontends/calculator/CEdev/include/graphx.h | 3028 ++-- frontends/calculator/CEdev/include/intce.h | 186 +- frontends/calculator/CEdev/include/iso646.h | 34 +- frontends/calculator/CEdev/include/keypadc.h | 510 +- .../calculator/CEdev/include/lib/ce/fileioc.h | 4 +- frontends/calculator/CEdev/include/lib/ce/graphx.h | 4 +- .../calculator/CEdev/include/lib/ce/keypadc.h | 4 +- frontends/calculator/CEdev/include/limits.h | 70 +- frontends/calculator/CEdev/include/math.h | 134 +- frontends/calculator/CEdev/include/setjmp.h | 42 +- frontends/calculator/CEdev/include/stdarg.h | 30 +- frontends/calculator/CEdev/include/stdbool.h | 46 +- frontends/calculator/CEdev/include/stddef.h | 56 +- frontends/calculator/CEdev/include/stdint.h | 38 +- frontends/calculator/CEdev/include/stdio.h | 132 +- frontends/calculator/CEdev/include/stdlib.h | 204 +- frontends/calculator/CEdev/include/string.h | 98 +- frontends/calculator/CEdev/include/tice.h | 4164 ++--- frontends/calculator/CEdev/include/usb.h | 104 +- frontends/calculator/CEdev/lib/ccleanup.src | 28 +- frontends/calculator/CEdev/lib/cstartup.src | 150 +- frontends/calculator/CEdev/lib/libheader.src | 110 +- frontends/calculator/CEdev/lib/libload.lib | 2 +- frontends/calculator/CEdev/lib/libload/fileioc.lib | 70 +- frontends/calculator/CEdev/lib/libload/graphx.lib | 190 +- frontends/calculator/CEdev/lib/libload/keypadc.lib | 10 +- frontends/calculator/CEdev/lib/shared/abort.src | 26 +- frontends/calculator/CEdev/lib/shared/abs.src | 34 +- frontends/calculator/CEdev/lib/shared/atoi.src | 44 +- frontends/calculator/CEdev/lib/shared/atol.src | 16 +- .../calculator/CEdev/lib/shared/atomic_load_32.src | 122 +- .../CEdev/lib/shared/atomic_load_decreasing_32.src | 178 +- .../CEdev/lib/shared/atomic_load_increasing_32.src | 176 +- frontends/calculator/CEdev/lib/shared/atos.src | 16 +- frontends/calculator/CEdev/lib/shared/bdivs.src | 88 +- frontends/calculator/CEdev/lib/shared/bdivu.src | 82 +- frontends/calculator/CEdev/lib/shared/bldix.src | 50 +- frontends/calculator/CEdev/lib/shared/bldiy.src | 34 +- frontends/calculator/CEdev/lib/shared/bmuls.src | 50 +- frontends/calculator/CEdev/lib/shared/bmulu.src | 48 +- frontends/calculator/CEdev/lib/shared/brems.src | 80 +- frontends/calculator/CEdev/lib/shared/bremu.src | 78 +- frontends/calculator/CEdev/lib/shared/bshl.src | 36 +- frontends/calculator/CEdev/lib/shared/bshrs.src | 58 +- frontends/calculator/CEdev/lib/shared/bshru.src | 36 +- frontends/calculator/CEdev/lib/shared/bstix.src | 38 +- frontends/calculator/CEdev/lib/shared/bstiy.src | 36 +- frontends/calculator/CEdev/lib/shared/calloc.src | 54 +- frontends/calculator/CEdev/lib/shared/case.src | 54 +- frontends/calculator/CEdev/lib/shared/case16.src | 34 +- frontends/calculator/CEdev/lib/shared/case16d.src | 34 +- frontends/calculator/CEdev/lib/shared/case24.src | 34 +- frontends/calculator/CEdev/lib/shared/case24d.src | 34 +- frontends/calculator/CEdev/lib/shared/case8.src | 34 +- frontends/calculator/CEdev/lib/shared/case8d.src | 34 +- frontends/calculator/CEdev/lib/shared/debugger.src | 24 +- frontends/calculator/CEdev/lib/shared/delay.src | 184 +- frontends/calculator/CEdev/lib/shared/div.src | 108 +- .../calculator/CEdev/lib/shared/dzx7_standard.src | 212 +- .../calculator/CEdev/lib/shared/dzx7_turbo.src | 234 +- frontends/calculator/CEdev/lib/shared/finite.src | 38 +- frontends/calculator/CEdev/lib/shared/fpadd.src | 50 +- frontends/calculator/CEdev/lib/shared/fpcmp.src | 54 +- frontends/calculator/CEdev/lib/shared/fpdiv.src | 56 +- frontends/calculator/CEdev/lib/shared/fpftol.src | 40 +- frontends/calculator/CEdev/lib/shared/fpltof.src | 40 +- frontends/calculator/CEdev/lib/shared/fpmul.src | 52 +- frontends/calculator/CEdev/lib/shared/fpneg.src | 64 +- frontends/calculator/CEdev/lib/shared/fppack.src | 56 +- frontends/calculator/CEdev/lib/shared/fpsub.src | 54 +- frontends/calculator/CEdev/lib/shared/fpultof.src | 44 +- frontends/calculator/CEdev/lib/shared/fpupop1.src | 96 +- frontends/calculator/CEdev/lib/shared/fpupop2.src | 94 +- frontends/calculator/CEdev/lib/shared/frameset.src | 22 +- .../calculator/CEdev/lib/shared/frameset0.src | 16 +- frontends/calculator/CEdev/lib/shared/frbmuls.src | 106 +- frontends/calculator/CEdev/lib/shared/frbtof.src | 34 +- frontends/calculator/CEdev/lib/shared/frftob.src | 34 +- frontends/calculator/CEdev/lib/shared/frftoi.src | 34 +- frontends/calculator/CEdev/lib/shared/frftos.src | 34 +- frontends/calculator/CEdev/lib/shared/frftoub.src | 34 +- frontends/calculator/CEdev/lib/shared/frftoui.src | 34 +- frontends/calculator/CEdev/lib/shared/frftous.src | 34 +- frontends/calculator/CEdev/lib/shared/frimuls.src | 162 +- frontends/calculator/CEdev/lib/shared/frimulu.src | 224 +- frontends/calculator/CEdev/lib/shared/fritof.src | 34 +- frontends/calculator/CEdev/lib/shared/frsmuls.src | 122 +- frontends/calculator/CEdev/lib/shared/frsmulu.src | 102 +- frontends/calculator/CEdev/lib/shared/frstof.src | 34 +- frontends/calculator/CEdev/lib/shared/frubtof.src | 34 +- frontends/calculator/CEdev/lib/shared/fruitof.src | 34 +- frontends/calculator/CEdev/lib/shared/frustof.src | 34 +- .../calculator/CEdev/lib/shared/getstringinput.src | 272 +- frontends/calculator/CEdev/lib/shared/iand.src | 38 +- frontends/calculator/CEdev/lib/shared/icmpzero.src | 40 +- frontends/calculator/CEdev/lib/shared/idivs.src | 40 +- frontends/calculator/CEdev/lib/shared/idivu.src | 42 +- frontends/calculator/CEdev/lib/shared/ildix.src | 34 +- frontends/calculator/CEdev/lib/shared/ildiy.src | 34 +- frontends/calculator/CEdev/lib/shared/imuls.src | 38 +- frontends/calculator/CEdev/lib/shared/imulu.src | 48 +- frontends/calculator/CEdev/lib/shared/indcall.src | 28 +- frontends/calculator/CEdev/lib/shared/ineg.src | 32 +- frontends/calculator/CEdev/lib/shared/inot.src | 30 +- .../calculator/CEdev/lib/shared/interrupts.src | 284 +- frontends/calculator/CEdev/lib/shared/ior.src | 38 +- frontends/calculator/CEdev/lib/shared/irems.src | 38 +- frontends/calculator/CEdev/lib/shared/iremu.src | 42 +- frontends/calculator/CEdev/lib/shared/isalnum.src | 56 +- frontends/calculator/CEdev/lib/shared/isalpha.src | 54 +- frontends/calculator/CEdev/lib/shared/isascii.src | 38 +- frontends/calculator/CEdev/lib/shared/iscntrl.src | 54 +- frontends/calculator/CEdev/lib/shared/isdigit.src | 54 +- frontends/calculator/CEdev/lib/shared/isgraph.src | 56 +- frontends/calculator/CEdev/lib/shared/ishl.src | 40 +- frontends/calculator/CEdev/lib/shared/ishrs.src | 40 +- frontends/calculator/CEdev/lib/shared/ishru.src | 38 +- frontends/calculator/CEdev/lib/shared/isinf.src | 40 +- frontends/calculator/CEdev/lib/shared/islower.src | 58 +- frontends/calculator/CEdev/lib/shared/isnan.src | 40 +- frontends/calculator/CEdev/lib/shared/isprint.src | 56 +- frontends/calculator/CEdev/lib/shared/ispunct.src | 56 +- frontends/calculator/CEdev/lib/shared/isspace.src | 56 +- frontends/calculator/CEdev/lib/shared/istix.src | 36 +- frontends/calculator/CEdev/lib/shared/istiy.src | 36 +- frontends/calculator/CEdev/lib/shared/isupper.src | 56 +- frontends/calculator/CEdev/lib/shared/isxdigit.src | 56 +- frontends/calculator/CEdev/lib/shared/itol.src | 32 +- frontends/calculator/CEdev/lib/shared/ixor.src | 38 +- frontends/calculator/CEdev/lib/shared/labs.src | 48 +- frontends/calculator/CEdev/lib/shared/ladd.src | 40 +- frontends/calculator/CEdev/lib/shared/land.src | 38 +- frontends/calculator/CEdev/lib/shared/lcmps.src | 38 +- frontends/calculator/CEdev/lib/shared/lcmpu.src | 38 +- frontends/calculator/CEdev/lib/shared/lcmpzero.src | 32 +- frontends/calculator/CEdev/lib/shared/ldiv.src | 158 +- frontends/calculator/CEdev/lib/shared/ldivs.src | 38 +- frontends/calculator/CEdev/lib/shared/ldivu.src | 40 +- frontends/calculator/CEdev/lib/shared/lldix.src | 34 +- frontends/calculator/CEdev/lib/shared/lldiy.src | 34 +- frontends/calculator/CEdev/lib/shared/lmuls.src | 38 +- frontends/calculator/CEdev/lib/shared/lmulu.src | 44 +- frontends/calculator/CEdev/lib/shared/lneg.src | 32 +- frontends/calculator/CEdev/lib/shared/lnot.src | 32 +- frontends/calculator/CEdev/lib/shared/log2.src | 54 +- frontends/calculator/CEdev/lib/shared/longjmp.src | 6 +- frontends/calculator/CEdev/lib/shared/lor.src | 38 +- frontends/calculator/CEdev/lib/shared/lrems.src | 38 +- frontends/calculator/CEdev/lib/shared/lremu.src | 38 +- frontends/calculator/CEdev/lib/shared/lshl.src | 38 +- frontends/calculator/CEdev/lib/shared/lshrs.src | 38 +- frontends/calculator/CEdev/lib/shared/lshru.src | 38 +- frontends/calculator/CEdev/lib/shared/lstix.src | 34 +- frontends/calculator/CEdev/lib/shared/lstiy.src | 34 +- frontends/calculator/CEdev/lib/shared/lsub.src | 38 +- frontends/calculator/CEdev/lib/shared/lxor.src | 38 +- frontends/calculator/CEdev/lib/shared/memchr.src | 12 +- frontends/calculator/CEdev/lib/shared/memcmp.src | 12 +- frontends/calculator/CEdev/lib/shared/memcpy.src | 12 +- frontends/calculator/CEdev/lib/shared/memmove.src | 12 +- frontends/calculator/CEdev/lib/shared/memset.src | 52 +- frontends/calculator/CEdev/lib/shared/os.src | 28 +- .../calculator/CEdev/lib/shared/os_textbuffer.src | 44 +- frontends/calculator/CEdev/lib/shared/rand.src | 26 +- frontends/calculator/CEdev/lib/shared/random.src | 220 +- .../CEdev/lib/shared/removeallbreakpoints.src | 24 +- .../CEdev/lib/shared/removeallwatchpoints.src | 24 +- .../CEdev/lib/shared/removebreakpoint.src | 32 +- .../CEdev/lib/shared/removewatchpoint.src | 32 +- frontends/calculator/CEdev/lib/shared/round.src | 88 +- frontends/calculator/CEdev/lib/shared/sand.src | 38 +- frontends/calculator/CEdev/lib/shared/sbrk.src | 98 +- frontends/calculator/CEdev/lib/shared/scmpzero.src | 32 +- frontends/calculator/CEdev/lib/shared/sdivs.src | 40 +- frontends/calculator/CEdev/lib/shared/sdivu.src | 42 +- frontends/calculator/CEdev/lib/shared/seqcase.src | 48 +- frontends/calculator/CEdev/lib/shared/seqcased.src | 52 +- .../calculator/CEdev/lib/shared/setbreakpoint.src | 32 +- frontends/calculator/CEdev/lib/shared/setflag.src | 44 +- frontends/calculator/CEdev/lib/shared/setjmp.src | 12 +- .../CEdev/lib/shared/setreadwatchpoint.src | 36 +- .../CEdev/lib/shared/setreadwritewatchpoint.src | 36 +- .../calculator/CEdev/lib/shared/setwatchpoint.src | 36 +- .../CEdev/lib/shared/setwritewatchpoint.src | 36 +- frontends/calculator/CEdev/lib/shared/sldix.src | 34 +- frontends/calculator/CEdev/lib/shared/sldiy.src | 36 +- frontends/calculator/CEdev/lib/shared/smuls.src | 42 +- frontends/calculator/CEdev/lib/shared/smulu.src | 42 +- frontends/calculator/CEdev/lib/shared/sneg.src | 30 +- frontends/calculator/CEdev/lib/shared/snot.src | 32 +- frontends/calculator/CEdev/lib/shared/sor.src | 40 +- frontends/calculator/CEdev/lib/shared/sprintf.src | 14 +- frontends/calculator/CEdev/lib/shared/sqrtf.src | 74 +- frontends/calculator/CEdev/lib/shared/srand.src | 24 +- frontends/calculator/CEdev/lib/shared/srandom.src | 58 +- frontends/calculator/CEdev/lib/shared/srems.src | 42 +- frontends/calculator/CEdev/lib/shared/sremu.src | 42 +- frontends/calculator/CEdev/lib/shared/sshl.src | 44 +- frontends/calculator/CEdev/lib/shared/sshrs.src | 40 +- frontends/calculator/CEdev/lib/shared/sshru.src | 40 +- frontends/calculator/CEdev/lib/shared/sstix.src | 38 +- frontends/calculator/CEdev/lib/shared/sstiy.src | 38 +- frontends/calculator/CEdev/lib/shared/stoi.src | 32 +- frontends/calculator/CEdev/lib/shared/stoiu.src | 32 +- .../calculator/CEdev/lib/shared/strcasecmp.src | 10 +- frontends/calculator/CEdev/lib/shared/strcat.src | 12 +- frontends/calculator/CEdev/lib/shared/strchr.src | 12 +- frontends/calculator/CEdev/lib/shared/strcmp.src | 12 +- frontends/calculator/CEdev/lib/shared/strcpy.src | 12 +- frontends/calculator/CEdev/lib/shared/strcspn.src | 12 +- frontends/calculator/CEdev/lib/shared/strdup.src | 70 +- frontends/calculator/CEdev/lib/shared/strlen.src | 12 +- .../calculator/CEdev/lib/shared/strncasecmp.src | 12 +- frontends/calculator/CEdev/lib/shared/strncat.src | 12 +- frontends/calculator/CEdev/lib/shared/strncmp.src | 12 +- frontends/calculator/CEdev/lib/shared/strncpy.src | 12 +- frontends/calculator/CEdev/lib/shared/strndup.src | 92 +- frontends/calculator/CEdev/lib/shared/strnlen.src | 54 +- frontends/calculator/CEdev/lib/shared/strpbrk.src | 12 +- frontends/calculator/CEdev/lib/shared/strrchr.src | 12 +- frontends/calculator/CEdev/lib/shared/strspn.src | 10 +- frontends/calculator/CEdev/lib/shared/strstr.src | 12 +- frontends/calculator/CEdev/lib/shared/strtok.src | 8 +- frontends/calculator/CEdev/lib/shared/sxor.src | 36 +- frontends/calculator/CEdev/lib/shared/tice.src | 482 +- frontends/calculator/CEdev/lib/shared/tolower.src | 8 +- frontends/calculator/CEdev/lib/shared/toupper.src | 8 +- frontends/calculator/CEdev/lib/shared/uldiv.src | 256 +- frontends/calculator/CEdev/lib/shared/usb.src | 42 +- .../calculator/CEdev/lib/shared/zx7_Decompress.src | 234 +- frontends/curses/curses_ui.c | 428 +- frontends/curses/meson.build | 30 +- frontends/curses/win/curses.h | 2766 ++-- frontends/curses/win/curspriv.h | 244 +- frontends/curses/win/panel.h | 108 +- frontends/gl/glad/include/KHR/khrplatform.h | 564 +- frontends/gl/glad/include/glad/glad.h | 7300 ++++----- frontends/gl/glad/src/glad.c | 3632 ++--- frontends/gl/main.c | 452 +- frontends/gl/meson.build | 42 +- frontends/gl/stb_image.h | 15094 +++++++++---------- frontends/gl/win/glfw/include/GLFW/glfw3.h | 11088 +++++++------- frontends/gl/win/glfw/include/GLFW/glfw3native.h | 1050 +- 475 files changed, 47193 insertions(+), 47187 deletions(-) (limited to 'frontends') diff --git a/frontends/calculator/CEdev/bin/License b/frontends/calculator/CEdev/bin/License index 163b0f5..cd688ec 100644 --- a/frontends/calculator/CEdev/bin/License +++ b/frontends/calculator/CEdev/bin/License @@ -1,120 +1,120 @@ -License-To-Use Agreement for Zilog Software. - -BY CLICKING "Yes" IN THIS INSTALL PROGRAM, YOU AGREE TO BE BOUND BY -THE FOLLOWING TERMS. IF THE INDIVIDUAL INSTALLING THIS SOFTWARE IS AN -EMPLOYEE, AGENT, CONTRACTOR OR ASSISTANT OF AN ENTITY THAT HAS PURCHASED -THE RIGHT TO USE THE SOFTWARE ENCLOSED, THEN AS USED IN THIS AGREEMENT, THE -TERM "YOU" REFERS TO SUCH INDIVIDUAL'S EMPLOYER, ITS AFFILIATES AND -SUBSIDIARIES, IF ANY. OTHERWISE, IF THE PRECEDING SENTENCE DOES NOT APPLY, -AS USED IN THIS AGREEMENT THE TERM "YOU" REFERS TO THE INDIVIDUAL OPENING -THIS PACKAGE - -1. License: Zilog grants you license to use the current version of -the enclosed (Zilog interface & control software) "Programs" and on-line -& written documentation (together herein referred to as, "The Licensed -Software") solely for your own internal purposes, for an unlimited period -of time and under the conditions and restrictions as set out in this -Agreement. - -2. Restrictions: The Licensed Software and documentation in whole -or in part are copyrighted and the title to all copies is retained by Zilog -and/or its Licensors. Except as provided for in Clause 3, you may not -modify, adapt, translate, create derivative works, disassemble, decompile, -imitate or otherwise reverse engineer the Licensed Software. - -3. Compiler Products: You are granted a royalty free right to reproduce -and distribute certain parts of the runtime modules and libraries -("Module") of the Licensed Software provided that you: (a) distribute the -Module in object form only and only in conjunction with and as part of your -software program ("Application") into which it is incorporated; (b) do not -use Zilog's name, logo or trademarks to market your application; (c) agree -to indemnify, hold harmless and defend Zilog or its Licensors from and -against any claims or lawsuits, including attorney's fees, that arise or -result from the use or distribution of your Application; (d) prohibit users -of your Application from modifying, adapting, translating, creating -derivative works, reverse engineering, decompiling or disassembling the -Module. The files that constitute the Module are identified in the -documentation and/or on-line "README" file. - -4. Warranty & Disclaimer: Licensed Software is provided "AS IS" and -without a warranty of any kind. Zilog's entire liability and your -exclusive remedy under this warranty will be the corrections of defects in -media or replacement of media. ZILOG AND ITS LICENSORS DISCLAIMS ALL OTHER -WARRANTIES, EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTY OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT -EXCEPT TO THE EXTENT THAT THESE DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. - -5. High Risk Activities: The Licensed Software is not fault-tolerant -and is not designed, manufactured or intended for use in conjunction with -on-line control equipment in hazardous environments requiring fail-safe -performance such as; in operation of nuclear facilities, (air) craft -navigation or communications systems, air traffic control, direct life -support machines, or weapons systems ("High Risk Activities") in which the -failure of the Licensed Software could lead directly to death, personal -injury or severe physical or environmental damage. Zilog and its licensors -specifically disclaim any express or implied warranty to High Risk -Activities. - -6. Limitation of Liability: TO THE EXTENT NOT PROHIBITED BY APPLICATION -LAW, ZILOG OR ITS LICENSORS WILL NOT BE LIABLE FOR ANY LOST REVENUE, PROFIT -OR DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTIAL OR PUNITIVE -DAMAGE HOWEVER CAUSED AND REGARDLESS OF THEORY OF LIABILITY ARISING OUT OF -THE USE OF OR INABILITY TOUSE THE "Licensed Software", EVEN IF ZILOG HAS -BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event, shall -Zilog's liability whether in contract, tort (including negligence), or -otherwise exceed the license fee paid for the Licensed Software. - -7. Ownership: The copyrights and all other and industrial property rights -for the protection of information with respect to the Licensed Software -(including the methods and techniques on which it is based) is retained by -Zilog and its licensors. Nothing in this Agreement serves to transfer such -rights. - -8. Termination: This Agreement is effective until terminated. You -may terminate this Agreement at any time by destroying all copies of the -Licensed Software. This Agreement will terminate immediately without -notice from Zilog if you fail to comply with any provision of this -Agreement. - -9. Export Regulations: All software and technical data delivered -under this Agreement are subject to U.S. Export control laws and may be -subject to export or import regulations in other countries. You agree to -comply strictly with all such laws and regulations and acknowledge that you -have the responsibility to obtain such licenses to export, re-export or -import as may be required after delivery to you. - -10. Entire Agreement: This Agreement is the entire agreement between you -and Zilog relating to the Licensed Software and supersedes all prior or -contemporaneous oral or written communications, proposals and -representations with respect to its subject matter. No variations of the -terms of this consent, including an express waiver of the terms of this -Agreement, in writing and signed by an officer of Zilog. - -11. Governing Law: This Agreement is governed by the laws of the State -of California and the controlling U.S. federal law. No choice of law rules -of any jurisdiction will apply. The parties hereby submit to the -jurisdiction of, and wave any venue objections against the United States -District Court for the Northern District of California, the Superior Court -of the State of California for the County of Santa Clara, and any mutually -agreed to alternative dispute resolution proceeding taking place in Santa -Clara County, California, in any litigation or claims arising out of this -Agreement. - -12. Copyright Notices: The Licensed Software governed by this agreement -contains the following copyrights and trademarks appearing within the -software or within the source code generating the software, affixed on the -packaging and/or labeling or within the operational displays of the -software. The copyright notice shall be recognized whether visibly labeled -or contained within the Licensed Software by acceptance of this Agreement. - -Copyright (c) 1985 - 2012 Zilog Inc. Milpitas, California - -And/or by other parties by inclusion. The Files governed by this License -Agreement may contain restricted information and are or may be UNPUBLISHED -PROPRIETARY SOURCE CODE OF THE Owners. The Copyright Notices above do not -evidence any actual or intended publication of such source code. - - - - - +License-To-Use Agreement for Zilog Software. + +BY CLICKING "Yes" IN THIS INSTALL PROGRAM, YOU AGREE TO BE BOUND BY +THE FOLLOWING TERMS. IF THE INDIVIDUAL INSTALLING THIS SOFTWARE IS AN +EMPLOYEE, AGENT, CONTRACTOR OR ASSISTANT OF AN ENTITY THAT HAS PURCHASED +THE RIGHT TO USE THE SOFTWARE ENCLOSED, THEN AS USED IN THIS AGREEMENT, THE +TERM "YOU" REFERS TO SUCH INDIVIDUAL'S EMPLOYER, ITS AFFILIATES AND +SUBSIDIARIES, IF ANY. OTHERWISE, IF THE PRECEDING SENTENCE DOES NOT APPLY, +AS USED IN THIS AGREEMENT THE TERM "YOU" REFERS TO THE INDIVIDUAL OPENING +THIS PACKAGE + +1. License: Zilog grants you license to use the current version of +the enclosed (Zilog interface & control software) "Programs" and on-line +& written documentation (together herein referred to as, "The Licensed +Software") solely for your own internal purposes, for an unlimited period +of time and under the conditions and restrictions as set out in this +Agreement. + +2. Restrictions: The Licensed Software and documentation in whole +or in part are copyrighted and the title to all copies is retained by Zilog +and/or its Licensors. Except as provided for in Clause 3, you may not +modify, adapt, translate, create derivative works, disassemble, decompile, +imitate or otherwise reverse engineer the Licensed Software. + +3. Compiler Products: You are granted a royalty free right to reproduce +and distribute certain parts of the runtime modules and libraries +("Module") of the Licensed Software provided that you: (a) distribute the +Module in object form only and only in conjunction with and as part of your +software program ("Application") into which it is incorporated; (b) do not +use Zilog's name, logo or trademarks to market your application; (c) agree +to indemnify, hold harmless and defend Zilog or its Licensors from and +against any claims or lawsuits, including attorney's fees, that arise or +result from the use or distribution of your Application; (d) prohibit users +of your Application from modifying, adapting, translating, creating +derivative works, reverse engineering, decompiling or disassembling the +Module. The files that constitute the Module are identified in the +documentation and/or on-line "README" file. + +4. Warranty & Disclaimer: Licensed Software is provided "AS IS" and +without a warranty of any kind. Zilog's entire liability and your +exclusive remedy under this warranty will be the corrections of defects in +media or replacement of media. ZILOG AND ITS LICENSORS DISCLAIMS ALL OTHER +WARRANTIES, EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTY OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT +EXCEPT TO THE EXTENT THAT THESE DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. + +5. High Risk Activities: The Licensed Software is not fault-tolerant +and is not designed, manufactured or intended for use in conjunction with +on-line control equipment in hazardous environments requiring fail-safe +performance such as; in operation of nuclear facilities, (air) craft +navigation or communications systems, air traffic control, direct life +support machines, or weapons systems ("High Risk Activities") in which the +failure of the Licensed Software could lead directly to death, personal +injury or severe physical or environmental damage. Zilog and its licensors +specifically disclaim any express or implied warranty to High Risk +Activities. + +6. Limitation of Liability: TO THE EXTENT NOT PROHIBITED BY APPLICATION +LAW, ZILOG OR ITS LICENSORS WILL NOT BE LIABLE FOR ANY LOST REVENUE, PROFIT +OR DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTIAL OR PUNITIVE +DAMAGE HOWEVER CAUSED AND REGARDLESS OF THEORY OF LIABILITY ARISING OUT OF +THE USE OF OR INABILITY TOUSE THE "Licensed Software", EVEN IF ZILOG HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event, shall +Zilog's liability whether in contract, tort (including negligence), or +otherwise exceed the license fee paid for the Licensed Software. + +7. Ownership: The copyrights and all other and industrial property rights +for the protection of information with respect to the Licensed Software +(including the methods and techniques on which it is based) is retained by +Zilog and its licensors. Nothing in this Agreement serves to transfer such +rights. + +8. Termination: This Agreement is effective until terminated. You +may terminate this Agreement at any time by destroying all copies of the +Licensed Software. This Agreement will terminate immediately without +notice from Zilog if you fail to comply with any provision of this +Agreement. + +9. Export Regulations: All software and technical data delivered +under this Agreement are subject to U.S. Export control laws and may be +subject to export or import regulations in other countries. You agree to +comply strictly with all such laws and regulations and acknowledge that you +have the responsibility to obtain such licenses to export, re-export or +import as may be required after delivery to you. + +10. Entire Agreement: This Agreement is the entire agreement between you +and Zilog relating to the Licensed Software and supersedes all prior or +contemporaneous oral or written communications, proposals and +representations with respect to its subject matter. No variations of the +terms of this consent, including an express waiver of the terms of this +Agreement, in writing and signed by an officer of Zilog. + +11. Governing Law: This Agreement is governed by the laws of the State +of California and the controlling U.S. federal law. No choice of law rules +of any jurisdiction will apply. The parties hereby submit to the +jurisdiction of, and wave any venue objections against the United States +District Court for the Northern District of California, the Superior Court +of the State of California for the County of Santa Clara, and any mutually +agreed to alternative dispute resolution proceeding taking place in Santa +Clara County, California, in any litigation or claims arising out of this +Agreement. + +12. Copyright Notices: The Licensed Software governed by this agreement +contains the following copyrights and trademarks appearing within the +software or within the source code generating the software, affixed on the +packaging and/or labeling or within the operational displays of the +software. The copyright notice shall be recognized whether visibly labeled +or contained within the Licensed Software by acceptance of this Agreement. + +Copyright (c) 1985 - 2012 Zilog Inc. Milpitas, California + +And/or by other parties by inclusion. The Files governed by this License +Agreement may contain restricted information and are or may be UNPUBLISHED +PROPRIETARY SOURCE CODE OF THE Owners. The Copyright Notices above do not +evidence any actual or intended publication of such source code. + + + + + diff --git a/frontends/calculator/CEdev/bin/eZ80.ini b/frontends/calculator/CEdev/bin/eZ80.ini index 883aff4..f3355bc 100644 --- a/frontends/calculator/CEdev/bin/eZ80.ini +++ b/frontends/calculator/CEdev/bin/eZ80.ini @@ -1,18 +1,18 @@ -[Compiler] -ProcessorFamily = 0x200 -AUsSizedByType = 0 -NewAUatTypeChange = 0 -BitfieldSize = 24 -IntSize = 24 -DoubleSize = 32 -PointerSize = 24 -NearPointerSize = 24 -FarPointerSize = 24 -Bank0PointerSize = 24 -Bank1PointerSize = 24 -FunctionPointerSize = 24 -CharIsSigned = 1 - -[Backend] -BitfieldsPackL2R = 1 - +[Compiler] +ProcessorFamily = 0x200 +AUsSizedByType = 0 +NewAUatTypeChange = 0 +BitfieldSize = 24 +IntSize = 24 +DoubleSize = 32 +PointerSize = 24 +NearPointerSize = 24 +FarPointerSize = 24 +Bank0PointerSize = 24 +Bank1PointerSize = 24 +FunctionPointerSize = 24 +CharIsSigned = 1 + +[Backend] +BitfieldsPackL2R = 1 + diff --git a/frontends/calculator/CEdev/examples/debugging/bin/DEMO.map b/frontends/calculator/CEdev/examples/debugging/bin/DEMO.map index 4462134..ec5a9cf 100644 --- a/frontends/calculator/CEdev/examples/debugging/bin/DEMO.map +++ b/frontends/calculator/CEdev/examples/debugging/bin/DEMO.map @@ -1,35 +1,35 @@ -Segment Base Top High Length --------- ------ ------ ------ ------- -icon D1A882 D1A882 0h -launcher D1A882 D1A882 0h -libs D1A882 D1A882 0h -startup D1A882 D1A8C1 3Fh -cleanup D1A8C1 D1A8D5 14h -exit D1A8D5 D1A8DB 6h -code D1A8DB D1A9D6 FBh -data D1A9D6 D1A9D6 0h -strsect D1A9D6 D1AA7B A5h -text D1AA7B D1AA7B 0h -bss D031F6 D031F6 D13FD6 0h -header D1A87F D1A882 3h - -Label Value -------------------------- ------ -_os_DisableHomeTextBuffer = D1A8DB -_os_EnableHomeTextBuffer = D1A8ED -_dbg_Debugger = D1A8FF -_dbg_RemoveAllBreakpoints = D1A905 -_dbg_RemoveWatchpoint = D1A90B -_dbg_SetWatchpoint = D1A915 -_dbg_RemoveAllWatchpoints = D1A921 -_dbg_SetWriteWatchpoint = D1A927 -_abort = D1A933 -_sprintf = 0000BC -__ccleanup = D1A8C1 -_errno = D008DC -_init = D1A882 -_exit = D1A8D7 -__exit = D1A8B0 -__exitsp = D1A8B0 -__errsp = D1A8B0 -_main = D1A93C +Segment Base Top High Length +-------- ------ ------ ------ ------- +icon D1A882 D1A882 0h +launcher D1A882 D1A882 0h +libs D1A882 D1A882 0h +startup D1A882 D1A8C1 3Fh +cleanup D1A8C1 D1A8D5 14h +exit D1A8D5 D1A8DB 6h +code D1A8DB D1A9D6 FBh +data D1A9D6 D1A9D6 0h +strsect D1A9D6 D1AA7B A5h +text D1AA7B D1AA7B 0h +bss D031F6 D031F6 D13FD6 0h +header D1A87F D1A882 3h + +Label Value +------------------------- ------ +_os_DisableHomeTextBuffer = D1A8DB +_os_EnableHomeTextBuffer = D1A8ED +_dbg_Debugger = D1A8FF +_dbg_RemoveAllBreakpoints = D1A905 +_dbg_RemoveWatchpoint = D1A90B +_dbg_SetWatchpoint = D1A915 +_dbg_RemoveAllWatchpoints = D1A921 +_dbg_SetWriteWatchpoint = D1A927 +_abort = D1A933 +_sprintf = 0000BC +__ccleanup = D1A8C1 +_errno = D008DC +_init = D1A882 +_exit = D1A8D7 +__exit = D1A8B0 +__exitsp = D1A8B0 +__errsp = D1A8B0 +_main = D1A93C diff --git a/frontends/calculator/CEdev/examples/debugging/makefile b/frontends/calculator/CEdev/examples/debugging/makefile index 3ea542a..8617bbc 100644 --- a/frontends/calculator/CEdev/examples/debugging/makefile +++ b/frontends/calculator/CEdev/examples/debugging/makefile @@ -1,18 +1,18 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -# This is just so the main makefile in $CEDEV/examples makes this one be like "make debug" -.DEFAULT_GOAL := debug - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +# This is just so the main makefile in $CEDEV/examples makes this one be like "make debug" +.DEFAULT_GOAL := debug + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/debugging/readme.md b/frontends/calculator/CEdev/examples/debugging/readme.md index 9d95f90..47c916a 100644 --- a/frontends/calculator/CEdev/examples/debugging/readme.md +++ b/frontends/calculator/CEdev/examples/debugging/readme.md @@ -1,10 +1,10 @@ -### Debugging Demo - -This demo demonstrates how to use a few of the debugging features implemented in CEmu - -![Screenshot](screenshot.png) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### Debugging Demo + +This demo demonstrates how to use a few of the debugging features implemented in CEmu + +![Screenshot](screenshot.png) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/debugging/src/main.c b/frontends/calculator/CEdev/examples/debugging/src/main.c index 67b5bac..0972efd 100644 --- a/frontends/calculator/CEdev/examples/debugging/src/main.c +++ b/frontends/calculator/CEdev/examples/debugging/src/main.c @@ -1,47 +1,47 @@ -#include -#include -#include -#include - -#include -#include - -/* - * Even though debug.h has prototypes for Debugger, SetWriteWatchpoint, SetWatchpoint, RemoveWatchpoint, RemoveAllWatchpoints, RemoveAllBreakpoints... - * you have to use the dbg_ prefix as shown here: - */ - -void main(void) { - /* Set the intial value of some variables */ - int dbg_test_var_1 = 10; - uint8_t dbg_test_var_2 = 3; - - /* Print a simple debugging string */ - dbg_sprintf(dbgout, "This is the start of a CEmu debugging test\n"); - - /* You can enter the debugger manually */ - dbg_Debugger(); - - /* Set a watchpoint that will break anytime we write/change this variable */ - dbg_SetWriteWatchpoint(&dbg_test_var_1, sizeof dbg_test_var_1); - - /* Set a non breaking watchpoint just so we can see what is in this variable at any given time */ - dbg_SetWatchpoint(&dbg_test_var_2, sizeof dbg_test_var_2); - - /* Now, let's write to the variable to see what happens (Go to the 'Watchpoints' tab in CEmu to view the status) */ - dbg_test_var_1 = 5; - - /* Remove the watchpoint that we had set */ - dbg_RemoveWatchpoint(&dbg_test_var_1); - dbg_RemoveWatchpoint(&dbg_test_var_2); - - /* We can also use those */ - dbg_RemoveAllWatchpoints(); - dbg_RemoveAllBreakpoints(); - - /* Set this value to zero */ - dbg_test_var_2 = 0; - - /* Fail this assertion */ - assert(dbg_test_var_2); -} +#include +#include +#include +#include + +#include +#include + +/* + * Even though debug.h has prototypes for Debugger, SetWriteWatchpoint, SetWatchpoint, RemoveWatchpoint, RemoveAllWatchpoints, RemoveAllBreakpoints... + * you have to use the dbg_ prefix as shown here: + */ + +void main(void) { + /* Set the intial value of some variables */ + int dbg_test_var_1 = 10; + uint8_t dbg_test_var_2 = 3; + + /* Print a simple debugging string */ + dbg_sprintf(dbgout, "This is the start of a CEmu debugging test\n"); + + /* You can enter the debugger manually */ + dbg_Debugger(); + + /* Set a watchpoint that will break anytime we write/change this variable */ + dbg_SetWriteWatchpoint(&dbg_test_var_1, sizeof dbg_test_var_1); + + /* Set a non breaking watchpoint just so we can see what is in this variable at any given time */ + dbg_SetWatchpoint(&dbg_test_var_2, sizeof dbg_test_var_2); + + /* Now, let's write to the variable to see what happens (Go to the 'Watchpoints' tab in CEmu to view the status) */ + dbg_test_var_1 = 5; + + /* Remove the watchpoint that we had set */ + dbg_RemoveWatchpoint(&dbg_test_var_1); + dbg_RemoveWatchpoint(&dbg_test_var_2); + + /* We can also use those */ + dbg_RemoveAllWatchpoints(); + dbg_RemoveAllBreakpoints(); + + /* Set this value to zero */ + dbg_test_var_2 = 0; + + /* Fail this assertion */ + assert(dbg_test_var_2); +} diff --git a/frontends/calculator/CEdev/examples/delay/autotester.json b/frontends/calculator/CEdev/examples/delay/autotester.json index 4eabd14..6ce4042 100644 --- a/frontends/calculator/CEdev/examples/delay/autotester.json +++ b/frontends/calculator/CEdev/examples/delay/autotester.json @@ -1,39 +1,39 @@ -{ - "__comment": "FIXME timing is way too lenient because the autotester framework and travis are trash", - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "hashWait|1", - "delay|4500", - "hashWait|2", - "hashWait|3" - ], - "hashes": { - "1": { - "description": "Waiting for 5000 ms...", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "690F0EEC" ] - }, - "2": { - "description": "Done", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "948248E" ], - "timeout": 1100 - }, - "3": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} +{ + "__comment": "FIXME timing is way too lenient because the autotester framework and travis are trash", + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "hashWait|1", + "delay|4500", + "hashWait|2", + "hashWait|3" + ], + "hashes": { + "1": { + "description": "Waiting for 5000 ms...", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "690F0EEC" ] + }, + "2": { + "description": "Done", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "948248E" ], + "timeout": 1100 + }, + "3": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} diff --git a/frontends/calculator/CEdev/examples/delay/makefile b/frontends/calculator/CEdev/examples/delay/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/delay/makefile +++ b/frontends/calculator/CEdev/examples/delay/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/delay/readme.md b/frontends/calculator/CEdev/examples/delay/readme.md index 0110f27..f391939 100644 --- a/frontends/calculator/CEdev/examples/delay/readme.md +++ b/frontends/calculator/CEdev/examples/delay/readme.md @@ -1,9 +1,9 @@ -### Delay Demo - -Demonstrates using the millisecond delay function in tice.h. - -![Screenshot](screenshot.gif) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. +### Delay Demo + +Demonstrates using the millisecond delay function in tice.h. + +![Screenshot](screenshot.gif) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. diff --git a/frontends/calculator/CEdev/examples/delay/src/main.c b/frontends/calculator/CEdev/examples/delay/src/main.c index 2fb8c41..46856a8 100644 --- a/frontends/calculator/CEdev/examples/delay/src/main.c +++ b/frontends/calculator/CEdev/examples/delay/src/main.c @@ -1,16 +1,16 @@ -#include -#include -#include -#include - -void main(void) { - /* Clear the homescreen */ - os_ClrHome(); - - /* Wait for 5 seconds */ - os_PutStrFull("Waiting for 5000 ms..."); - delay(5000); - os_SetCursorPos(1, 22); - os_PutStrFull("Done"); - delay(100); -} +#include +#include +#include +#include + +void main(void) { + /* Clear the homescreen */ + os_ClrHome(); + + /* Wait for 5 seconds */ + os_PutStrFull("Waiting for 5000 ms..."); + delay(5000); + os_SetCursorPos(1, 22); + os_PutStrFull("Done"); + delay(100); +} diff --git a/frontends/calculator/CEdev/examples/fileio_detect/autotester.json b/frontends/calculator/CEdev/examples/fileio_detect/autotester.json index b8563a6..b3c8202 100644 --- a/frontends/calculator/CEdev/examples/fileio_detect/autotester.json +++ b/frontends/calculator/CEdev/examples/fileio_detect/autotester.json @@ -1,33 +1,33 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "delay|1000", - "hash|1", - "key|enter", - "delay|200", - "hashWait|2" - ], - "hashes": { - "1": { - "description": "'LibLoad' is displayed", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "D874E0B0" ] - }, - "2": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} - +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "delay|1000", + "hash|1", + "key|enter", + "delay|200", + "hashWait|2" + ], + "hashes": { + "1": { + "description": "'LibLoad' is displayed", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "D874E0B0" ] + }, + "2": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} + diff --git a/frontends/calculator/CEdev/examples/fileio_detect/bin/DEMO.map b/frontends/calculator/CEdev/examples/fileio_detect/bin/DEMO.map index 082420b..6ee8fbb 100644 --- a/frontends/calculator/CEdev/examples/fileio_detect/bin/DEMO.map +++ b/frontends/calculator/CEdev/examples/fileio_detect/bin/DEMO.map @@ -1,148 +1,148 @@ -Segment Base Top High Length --------- ------ ------ ------ ------- -icon D1A882 D1A882 0h -launcher D1A882 D1A8DA 58h -libs D1A8DA D1A8F6 1Ch -startup D1A8F6 D1A935 3Fh -cleanup D1A935 D1A949 14h -exit D1A949 D1A94F 6h -code D1A94F D1AA3B ECh -data D1AA3B D1AA5D 22h -strsect D1AA5D D1AA5D 0h -text D1AA5D D1AA60 3h -bss D031F6 D031F6 D13FD6 0h -header D1A87F D1A882 3h - -Label Value -------------------------- ------ -_os_DisableHomeTextBuffer = D1A94F -_os_EnableHomeTextBuffer = D1A961 -_boot_GetBootMajorVer = 000080 -_boot_GetHardwareVer = 000084 -_boot_GetBootMinorVer = 00008C -_boot_DebugPrintf = 0000B4 -_boot_ClearVRAM = 000374 -_boot_TurnOff = 000388 -_boot_NewLine = 000390 -_boot_Set6MHzMode = 00039C -_boot_Set48MHzMode = 0003A0 -_boot_Set6MHzModeI = 0003A4 -_boot_Set48MHzModeI = 0003A8 -_boot_GetBatteryStatus = 0003B0 -_boot_WaitShort = 0003B4 -_boot_CheckOnPressed = 00057C -_boot_SetDate = 000598 -_boot_GetDate = 0005A8 -_boot_GetTime = 0005B0 -_boot_SetTime = 0005B4 -_boot_IsAfterNoon = 0005C8 -_os_NewLine = 0207F0 -_os_PushErrorHandler = 021C78 -_os_PopErrorHandler = 021C7C -_os_ThrowError = 021C80 -_os_RealCopy = 021C84 -_os_RealAsinRad = 021C88 -_os_RealAcosRad = 021C8C -_os_RealAtanRad = 021C90 -_os_RealAdd = 021C94 -_os_CplxSquare = 021C98 -_os_RealCompare = 021C9C -_os_RealCosRad = 021CA0 -_os_RealRadToDeg = 021CA4 -_os_RealDiv = 021CA8 -_os_RealExp = 021CAC -_os_RealFloor = 021CB0 -_os_RealToStr = 021CB4 -_os_RealFrac = 021CB8 -_os_RealGcd = 021CBC -_os_RealRoundInt = 021CC0 -_os_RealLcm = 021CC4 -_os_RealLog = 021CC8 -_os_RealMax = 021CCC -_os_RealMin = 021CD0 -_os_RealMul = 021CD4 -_os_RealNcr = 021CD8 -_os_RealNeg = 021CDC -_os_RealNpr = 021CE0 -_os_RealPow = 021CE4 -_os_RealDegToRad = 021CE8 -_os_RealRandInt = 021CEC -_os_RealInv = 021CF0 -_os_RealMod = 021CF4 -_os_RealRound = 021CF8 -_os_RealSinRad = 021CFC -_os_RealSqrt = 021D00 -_os_RealSub = 021D04 -_os_RealTanRad = 021D08 -_os_StrToReal = 021D0C -_os_RealInt = 021D10 -_os_SetFlagBits = 021D14 -_os_ResetFlagBits = 021D18 -_os_TestFlagBits = 021D1C -_os_SetFlagByte = 021D20 -_os_GetFlagByte = 021D24 -_os_GetCursorPos = 021D28 -_os_PutStrFull = 021D2C -_os_PutStrLine = 021D30 -_os_SetCursorPos = 021D34 -_os_AppInit = 021D40 -_os_GetKey = 021D38 -_os_GetCSC = 021D3C -_os_DisableCursor = 021DE4 -_os_EnableCursor = 021DE8 -_os_FontDrawText = 021E00 -_os_FontGetHeight = 021E14 -_os_FontGetWidth = 021E18 -_os_InitDrawing = 021E1C -_os_SetDrawBGColor = 021E20 -_os_SetDrawFGColor = 021E24 -_os_FontSelect = 021E28 -_os_RclAns = 021E70 -_os_SetTimer1 = 021EC8 -_os_DisableTimer1 = 021ECC -_os_GetSystemStats = 021ED4 -_os_GetDrawBGColor = 021EE4 -_os_GetDrawFGColor = 021EE8 -_os_FontGetID = 021EEC -_os_RealToInt24 = 021EF4 -_os_Int24ToReal = 021EF8 -_os_ForceCmdNoChar = 021FA8 -_os_GetSymTablePtr = 021FB0 -_os_NextSymEntry = 021FB4 -_os_ChkFindSym = 021FB8 -_os_MemChk = 021FF0 -_os_SetTimer2 = 022080 -_os_DisableTimer2 = 022084 -_os_FloatToReal = 022170 -_os_RealToFloat = 022174 -_os_FontDrawTransText = 022178 -_os_CreateAppVar = 022184 -_asm_MoveDown = 0207F4 -_asm_MoveUp = 020800 -_asm_ClrLCDFull = 020808 -_asm_ClrLCD = 02080C -_asm_ClrTxtShd = 020818 -_asm_HomeUp = 020828 -_asm_RunIndicOn = 020844 -_asm_RunIndicOff = 020848 -_asm_DelRes = 020E5C -_asm_DisableAPD = 021134 -_asm_EnableAPD = 021138 -_asm_DrawStatusBar = 021A3C -_asm_ArcChk = 022040 -__OS = D1A973 -__frameset0 = D1A97D -__icmpzero = D1A988 -__frameset = D1A98D -__findlibload = D1A882 -__ccleanup = D1A935 -_errno = D008DC -_init = D1A882 -_exit = D1A94B -__exit = D1A924 -__exitsp = D1A924 -__errsp = D1A924 -_printText = D1AA19 -_main = D1A99B -_ti_CloseAll = D1A8EE -_ti_Detect = D1A8F2 +Segment Base Top High Length +-------- ------ ------ ------ ------- +icon D1A882 D1A882 0h +launcher D1A882 D1A8DA 58h +libs D1A8DA D1A8F6 1Ch +startup D1A8F6 D1A935 3Fh +cleanup D1A935 D1A949 14h +exit D1A949 D1A94F 6h +code D1A94F D1AA3B ECh +data D1AA3B D1AA5D 22h +strsect D1AA5D D1AA5D 0h +text D1AA5D D1AA60 3h +bss D031F6 D031F6 D13FD6 0h +header D1A87F D1A882 3h + +Label Value +------------------------- ------ +_os_DisableHomeTextBuffer = D1A94F +_os_EnableHomeTextBuffer = D1A961 +_boot_GetBootMajorVer = 000080 +_boot_GetHardwareVer = 000084 +_boot_GetBootMinorVer = 00008C +_boot_DebugPrintf = 0000B4 +_boot_ClearVRAM = 000374 +_boot_TurnOff = 000388 +_boot_NewLine = 000390 +_boot_Set6MHzMode = 00039C +_boot_Set48MHzMode = 0003A0 +_boot_Set6MHzModeI = 0003A4 +_boot_Set48MHzModeI = 0003A8 +_boot_GetBatteryStatus = 0003B0 +_boot_WaitShort = 0003B4 +_boot_CheckOnPressed = 00057C +_boot_SetDate = 000598 +_boot_GetDate = 0005A8 +_boot_GetTime = 0005B0 +_boot_SetTime = 0005B4 +_boot_IsAfterNoon = 0005C8 +_os_NewLine = 0207F0 +_os_PushErrorHandler = 021C78 +_os_PopErrorHandler = 021C7C +_os_ThrowError = 021C80 +_os_RealCopy = 021C84 +_os_RealAsinRad = 021C88 +_os_RealAcosRad = 021C8C +_os_RealAtanRad = 021C90 +_os_RealAdd = 021C94 +_os_CplxSquare = 021C98 +_os_RealCompare = 021C9C +_os_RealCosRad = 021CA0 +_os_RealRadToDeg = 021CA4 +_os_RealDiv = 021CA8 +_os_RealExp = 021CAC +_os_RealFloor = 021CB0 +_os_RealToStr = 021CB4 +_os_RealFrac = 021CB8 +_os_RealGcd = 021CBC +_os_RealRoundInt = 021CC0 +_os_RealLcm = 021CC4 +_os_RealLog = 021CC8 +_os_RealMax = 021CCC +_os_RealMin = 021CD0 +_os_RealMul = 021CD4 +_os_RealNcr = 021CD8 +_os_RealNeg = 021CDC +_os_RealNpr = 021CE0 +_os_RealPow = 021CE4 +_os_RealDegToRad = 021CE8 +_os_RealRandInt = 021CEC +_os_RealInv = 021CF0 +_os_RealMod = 021CF4 +_os_RealRound = 021CF8 +_os_RealSinRad = 021CFC +_os_RealSqrt = 021D00 +_os_RealSub = 021D04 +_os_RealTanRad = 021D08 +_os_StrToReal = 021D0C +_os_RealInt = 021D10 +_os_SetFlagBits = 021D14 +_os_ResetFlagBits = 021D18 +_os_TestFlagBits = 021D1C +_os_SetFlagByte = 021D20 +_os_GetFlagByte = 021D24 +_os_GetCursorPos = 021D28 +_os_PutStrFull = 021D2C +_os_PutStrLine = 021D30 +_os_SetCursorPos = 021D34 +_os_AppInit = 021D40 +_os_GetKey = 021D38 +_os_GetCSC = 021D3C +_os_DisableCursor = 021DE4 +_os_EnableCursor = 021DE8 +_os_FontDrawText = 021E00 +_os_FontGetHeight = 021E14 +_os_FontGetWidth = 021E18 +_os_InitDrawing = 021E1C +_os_SetDrawBGColor = 021E20 +_os_SetDrawFGColor = 021E24 +_os_FontSelect = 021E28 +_os_RclAns = 021E70 +_os_SetTimer1 = 021EC8 +_os_DisableTimer1 = 021ECC +_os_GetSystemStats = 021ED4 +_os_GetDrawBGColor = 021EE4 +_os_GetDrawFGColor = 021EE8 +_os_FontGetID = 021EEC +_os_RealToInt24 = 021EF4 +_os_Int24ToReal = 021EF8 +_os_ForceCmdNoChar = 021FA8 +_os_GetSymTablePtr = 021FB0 +_os_NextSymEntry = 021FB4 +_os_ChkFindSym = 021FB8 +_os_MemChk = 021FF0 +_os_SetTimer2 = 022080 +_os_DisableTimer2 = 022084 +_os_FloatToReal = 022170 +_os_RealToFloat = 022174 +_os_FontDrawTransText = 022178 +_os_CreateAppVar = 022184 +_asm_MoveDown = 0207F4 +_asm_MoveUp = 020800 +_asm_ClrLCDFull = 020808 +_asm_ClrLCD = 02080C +_asm_ClrTxtShd = 020818 +_asm_HomeUp = 020828 +_asm_RunIndicOn = 020844 +_asm_RunIndicOff = 020848 +_asm_DelRes = 020E5C +_asm_DisableAPD = 021134 +_asm_EnableAPD = 021138 +_asm_DrawStatusBar = 021A3C +_asm_ArcChk = 022040 +__OS = D1A973 +__frameset0 = D1A97D +__icmpzero = D1A988 +__frameset = D1A98D +__findlibload = D1A882 +__ccleanup = D1A935 +_errno = D008DC +_init = D1A882 +_exit = D1A94B +__exit = D1A924 +__exitsp = D1A924 +__errsp = D1A924 +_printText = D1AA19 +_main = D1A99B +_ti_CloseAll = D1A8EE +_ti_Detect = D1A8F2 diff --git a/frontends/calculator/CEdev/examples/fileio_detect/makefile b/frontends/calculator/CEdev/examples/fileio_detect/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/fileio_detect/makefile +++ b/frontends/calculator/CEdev/examples/fileio_detect/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/fileio_detect/readme.md b/frontends/calculator/CEdev/examples/fileio_detect/readme.md index 41ecb73..fdfeaaf 100644 --- a/frontends/calculator/CEdev/examples/fileio_detect/readme.md +++ b/frontends/calculator/CEdev/examples/fileio_detect/readme.md @@ -1,11 +1,11 @@ -### FileIO File Detection Demo - -This demo shows how to use the ti_Detect function to search for a varible that starts with a particular sequence of bytes -LibLoad is used because it is known to exist for demonstration. - -![Screenshot](screenshot.png) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### FileIO File Detection Demo + +This demo shows how to use the ti_Detect function to search for a varible that starts with a particular sequence of bytes +LibLoad is used because it is known to exist for demonstration. + +![Screenshot](screenshot.png) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/fileio_detect/src/main.c b/frontends/calculator/CEdev/examples/fileio_detect/src/main.c index d3be5a5..b249c7f 100644 --- a/frontends/calculator/CEdev/examples/fileio_detect/src/main.c +++ b/frontends/calculator/CEdev/examples/fileio_detect/src/main.c @@ -1,47 +1,47 @@ -#include -#include -#include -#include - -#include -#include -#include - -#include - -/* Function prototypes */ -void printText(int8_t xpos, int8_t ypos, const char *text); - -/* Main Function */ -void main(void) { - /* Declare some variables -- search_pos must be NULL to begin with */ - uint8_t *search_pos = NULL; - int8_t y = 0; - ti_var_t myVar; - char *var_name; - - /* First couple bytes of the LibLoad AppVar, which is known to exist * - /* Technically is a null-terminated string, if an odd looking one */ - const char search_string[] = { 0xBF, 0xFE, 0x00 }; - - /* Clear the homescreen */ - os_ClrHome(); - - /* Find all of the variables that start with this string */ - while ((var_name = ti_Detect(&search_pos, search_string)) != NULL) { - /* Print the name of the variable (Should be LibLoad) */ - printText(0, y++, var_name); - } - - /* Wait for a key */ - while (!os_GetCSC()); - - /* Close all open files */ - ti_CloseAll(); -} - -/* Draw text on the homescreen at the given X/Y location */ -void printText(int8_t xpos, int8_t ypos, const char *text) { - os_SetCursorPos(ypos, xpos); - os_PutStrFull(text); -} +#include +#include +#include +#include + +#include +#include +#include + +#include + +/* Function prototypes */ +void printText(int8_t xpos, int8_t ypos, const char *text); + +/* Main Function */ +void main(void) { + /* Declare some variables -- search_pos must be NULL to begin with */ + uint8_t *search_pos = NULL; + int8_t y = 0; + ti_var_t myVar; + char *var_name; + + /* First couple bytes of the LibLoad AppVar, which is known to exist * + /* Technically is a null-terminated string, if an odd looking one */ + const char search_string[] = { 0xBF, 0xFE, 0x00 }; + + /* Clear the homescreen */ + os_ClrHome(); + + /* Find all of the variables that start with this string */ + while ((var_name = ti_Detect(&search_pos, search_string)) != NULL) { + /* Print the name of the variable (Should be LibLoad) */ + printText(0, y++, var_name); + } + + /* Wait for a key */ + while (!os_GetCSC()); + + /* Close all open files */ + ti_CloseAll(); +} + +/* Draw text on the homescreen at the given X/Y location */ +void printText(int8_t xpos, int8_t ypos, const char *text) { + os_SetCursorPos(ypos, xpos); + os_PutStrFull(text); +} diff --git a/frontends/calculator/CEdev/examples/fileio_detectany/autotester.json b/frontends/calculator/CEdev/examples/fileio_detectany/autotester.json index b8563a6..b3c8202 100644 --- a/frontends/calculator/CEdev/examples/fileio_detectany/autotester.json +++ b/frontends/calculator/CEdev/examples/fileio_detectany/autotester.json @@ -1,33 +1,33 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "delay|1000", - "hash|1", - "key|enter", - "delay|200", - "hashWait|2" - ], - "hashes": { - "1": { - "description": "'LibLoad' is displayed", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "D874E0B0" ] - }, - "2": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} - +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "delay|1000", + "hash|1", + "key|enter", + "delay|200", + "hashWait|2" + ], + "hashes": { + "1": { + "description": "'LibLoad' is displayed", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "D874E0B0" ] + }, + "2": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} + diff --git a/frontends/calculator/CEdev/examples/fileio_detectany/bin/DEMO.map b/frontends/calculator/CEdev/examples/fileio_detectany/bin/DEMO.map index 4b8f06a..2c0eaf2 100644 --- a/frontends/calculator/CEdev/examples/fileio_detectany/bin/DEMO.map +++ b/frontends/calculator/CEdev/examples/fileio_detectany/bin/DEMO.map @@ -1,148 +1,148 @@ -Segment Base Top High Length --------- ------ ------ ------ ------- -icon D1A882 D1A882 0h -launcher D1A882 D1A8DA 58h -libs D1A8DA D1A8F6 1Ch -startup D1A8F6 D1A935 3Fh -cleanup D1A935 D1A949 14h -exit D1A949 D1A94F 6h -code D1A94F D1AA46 F7h -data D1AA46 D1AA68 22h -strsect D1AA68 D1AA68 0h -text D1AA68 D1AA6B 3h -bss D031F6 D031F6 D13FD6 0h -header D1A87F D1A882 3h - -Label Value -------------------------- ------ -_os_DisableHomeTextBuffer = D1A94F -_os_EnableHomeTextBuffer = D1A961 -_boot_GetBootMajorVer = 000080 -_boot_GetHardwareVer = 000084 -_boot_GetBootMinorVer = 00008C -_boot_DebugPrintf = 0000B4 -_boot_ClearVRAM = 000374 -_boot_TurnOff = 000388 -_boot_NewLine = 000390 -_boot_Set6MHzMode = 00039C -_boot_Set48MHzMode = 0003A0 -_boot_Set6MHzModeI = 0003A4 -_boot_Set48MHzModeI = 0003A8 -_boot_GetBatteryStatus = 0003B0 -_boot_WaitShort = 0003B4 -_boot_CheckOnPressed = 00057C -_boot_SetDate = 000598 -_boot_GetDate = 0005A8 -_boot_GetTime = 0005B0 -_boot_SetTime = 0005B4 -_boot_IsAfterNoon = 0005C8 -_os_NewLine = 0207F0 -_os_PushErrorHandler = 021C78 -_os_PopErrorHandler = 021C7C -_os_ThrowError = 021C80 -_os_RealCopy = 021C84 -_os_RealAsinRad = 021C88 -_os_RealAcosRad = 021C8C -_os_RealAtanRad = 021C90 -_os_RealAdd = 021C94 -_os_CplxSquare = 021C98 -_os_RealCompare = 021C9C -_os_RealCosRad = 021CA0 -_os_RealRadToDeg = 021CA4 -_os_RealDiv = 021CA8 -_os_RealExp = 021CAC -_os_RealFloor = 021CB0 -_os_RealToStr = 021CB4 -_os_RealFrac = 021CB8 -_os_RealGcd = 021CBC -_os_RealRoundInt = 021CC0 -_os_RealLcm = 021CC4 -_os_RealLog = 021CC8 -_os_RealMax = 021CCC -_os_RealMin = 021CD0 -_os_RealMul = 021CD4 -_os_RealNcr = 021CD8 -_os_RealNeg = 021CDC -_os_RealNpr = 021CE0 -_os_RealPow = 021CE4 -_os_RealDegToRad = 021CE8 -_os_RealRandInt = 021CEC -_os_RealInv = 021CF0 -_os_RealMod = 021CF4 -_os_RealRound = 021CF8 -_os_RealSinRad = 021CFC -_os_RealSqrt = 021D00 -_os_RealSub = 021D04 -_os_RealTanRad = 021D08 -_os_StrToReal = 021D0C -_os_RealInt = 021D10 -_os_SetFlagBits = 021D14 -_os_ResetFlagBits = 021D18 -_os_TestFlagBits = 021D1C -_os_SetFlagByte = 021D20 -_os_GetFlagByte = 021D24 -_os_GetCursorPos = 021D28 -_os_PutStrFull = 021D2C -_os_PutStrLine = 021D30 -_os_SetCursorPos = 021D34 -_os_AppInit = 021D40 -_os_GetKey = 021D38 -_os_GetCSC = 021D3C -_os_DisableCursor = 021DE4 -_os_EnableCursor = 021DE8 -_os_FontDrawText = 021E00 -_os_FontGetHeight = 021E14 -_os_FontGetWidth = 021E18 -_os_InitDrawing = 021E1C -_os_SetDrawBGColor = 021E20 -_os_SetDrawFGColor = 021E24 -_os_FontSelect = 021E28 -_os_RclAns = 021E70 -_os_SetTimer1 = 021EC8 -_os_DisableTimer1 = 021ECC -_os_GetSystemStats = 021ED4 -_os_GetDrawBGColor = 021EE4 -_os_GetDrawFGColor = 021EE8 -_os_FontGetID = 021EEC -_os_RealToInt24 = 021EF4 -_os_Int24ToReal = 021EF8 -_os_ForceCmdNoChar = 021FA8 -_os_GetSymTablePtr = 021FB0 -_os_NextSymEntry = 021FB4 -_os_ChkFindSym = 021FB8 -_os_MemChk = 021FF0 -_os_SetTimer2 = 022080 -_os_DisableTimer2 = 022084 -_os_FloatToReal = 022170 -_os_RealToFloat = 022174 -_os_FontDrawTransText = 022178 -_os_CreateAppVar = 022184 -_asm_MoveDown = 0207F4 -_asm_MoveUp = 020800 -_asm_ClrLCDFull = 020808 -_asm_ClrLCD = 02080C -_asm_ClrTxtShd = 020818 -_asm_HomeUp = 020828 -_asm_RunIndicOn = 020844 -_asm_RunIndicOff = 020848 -_asm_DelRes = 020E5C -_asm_DisableAPD = 021134 -_asm_EnableAPD = 021138 -_asm_DrawStatusBar = 021A3C -_asm_ArcChk = 022040 -__OS = D1A973 -__frameset0 = D1A97D -__icmpzero = D1A988 -__frameset = D1A98D -__findlibload = D1A882 -__ccleanup = D1A935 -_errno = D008DC -_init = D1A882 -_exit = D1A94B -__exit = D1A924 -__exitsp = D1A924 -__errsp = D1A924 -_printText = D1AA24 -_main = D1A99B -_ti_CloseAll = D1A8EE -_ti_DetectAny = D1A8F2 +Segment Base Top High Length +-------- ------ ------ ------ ------- +icon D1A882 D1A882 0h +launcher D1A882 D1A8DA 58h +libs D1A8DA D1A8F6 1Ch +startup D1A8F6 D1A935 3Fh +cleanup D1A935 D1A949 14h +exit D1A949 D1A94F 6h +code D1A94F D1AA46 F7h +data D1AA46 D1AA68 22h +strsect D1AA68 D1AA68 0h +text D1AA68 D1AA6B 3h +bss D031F6 D031F6 D13FD6 0h +header D1A87F D1A882 3h + +Label Value +------------------------- ------ +_os_DisableHomeTextBuffer = D1A94F +_os_EnableHomeTextBuffer = D1A961 +_boot_GetBootMajorVer = 000080 +_boot_GetHardwareVer = 000084 +_boot_GetBootMinorVer = 00008C +_boot_DebugPrintf = 0000B4 +_boot_ClearVRAM = 000374 +_boot_TurnOff = 000388 +_boot_NewLine = 000390 +_boot_Set6MHzMode = 00039C +_boot_Set48MHzMode = 0003A0 +_boot_Set6MHzModeI = 0003A4 +_boot_Set48MHzModeI = 0003A8 +_boot_GetBatteryStatus = 0003B0 +_boot_WaitShort = 0003B4 +_boot_CheckOnPressed = 00057C +_boot_SetDate = 000598 +_boot_GetDate = 0005A8 +_boot_GetTime = 0005B0 +_boot_SetTime = 0005B4 +_boot_IsAfterNoon = 0005C8 +_os_NewLine = 0207F0 +_os_PushErrorHandler = 021C78 +_os_PopErrorHandler = 021C7C +_os_ThrowError = 021C80 +_os_RealCopy = 021C84 +_os_RealAsinRad = 021C88 +_os_RealAcosRad = 021C8C +_os_RealAtanRad = 021C90 +_os_RealAdd = 021C94 +_os_CplxSquare = 021C98 +_os_RealCompare = 021C9C +_os_RealCosRad = 021CA0 +_os_RealRadToDeg = 021CA4 +_os_RealDiv = 021CA8 +_os_RealExp = 021CAC +_os_RealFloor = 021CB0 +_os_RealToStr = 021CB4 +_os_RealFrac = 021CB8 +_os_RealGcd = 021CBC +_os_RealRoundInt = 021CC0 +_os_RealLcm = 021CC4 +_os_RealLog = 021CC8 +_os_RealMax = 021CCC +_os_RealMin = 021CD0 +_os_RealMul = 021CD4 +_os_RealNcr = 021CD8 +_os_RealNeg = 021CDC +_os_RealNpr = 021CE0 +_os_RealPow = 021CE4 +_os_RealDegToRad = 021CE8 +_os_RealRandInt = 021CEC +_os_RealInv = 021CF0 +_os_RealMod = 021CF4 +_os_RealRound = 021CF8 +_os_RealSinRad = 021CFC +_os_RealSqrt = 021D00 +_os_RealSub = 021D04 +_os_RealTanRad = 021D08 +_os_StrToReal = 021D0C +_os_RealInt = 021D10 +_os_SetFlagBits = 021D14 +_os_ResetFlagBits = 021D18 +_os_TestFlagBits = 021D1C +_os_SetFlagByte = 021D20 +_os_GetFlagByte = 021D24 +_os_GetCursorPos = 021D28 +_os_PutStrFull = 021D2C +_os_PutStrLine = 021D30 +_os_SetCursorPos = 021D34 +_os_AppInit = 021D40 +_os_GetKey = 021D38 +_os_GetCSC = 021D3C +_os_DisableCursor = 021DE4 +_os_EnableCursor = 021DE8 +_os_FontDrawText = 021E00 +_os_FontGetHeight = 021E14 +_os_FontGetWidth = 021E18 +_os_InitDrawing = 021E1C +_os_SetDrawBGColor = 021E20 +_os_SetDrawFGColor = 021E24 +_os_FontSelect = 021E28 +_os_RclAns = 021E70 +_os_SetTimer1 = 021EC8 +_os_DisableTimer1 = 021ECC +_os_GetSystemStats = 021ED4 +_os_GetDrawBGColor = 021EE4 +_os_GetDrawFGColor = 021EE8 +_os_FontGetID = 021EEC +_os_RealToInt24 = 021EF4 +_os_Int24ToReal = 021EF8 +_os_ForceCmdNoChar = 021FA8 +_os_GetSymTablePtr = 021FB0 +_os_NextSymEntry = 021FB4 +_os_ChkFindSym = 021FB8 +_os_MemChk = 021FF0 +_os_SetTimer2 = 022080 +_os_DisableTimer2 = 022084 +_os_FloatToReal = 022170 +_os_RealToFloat = 022174 +_os_FontDrawTransText = 022178 +_os_CreateAppVar = 022184 +_asm_MoveDown = 0207F4 +_asm_MoveUp = 020800 +_asm_ClrLCDFull = 020808 +_asm_ClrLCD = 02080C +_asm_ClrTxtShd = 020818 +_asm_HomeUp = 020828 +_asm_RunIndicOn = 020844 +_asm_RunIndicOff = 020848 +_asm_DelRes = 020E5C +_asm_DisableAPD = 021134 +_asm_EnableAPD = 021138 +_asm_DrawStatusBar = 021A3C +_asm_ArcChk = 022040 +__OS = D1A973 +__frameset0 = D1A97D +__icmpzero = D1A988 +__frameset = D1A98D +__findlibload = D1A882 +__ccleanup = D1A935 +_errno = D008DC +_init = D1A882 +_exit = D1A94B +__exit = D1A924 +__exitsp = D1A924 +__errsp = D1A924 +_printText = D1AA24 +_main = D1A99B +_ti_CloseAll = D1A8EE +_ti_DetectAny = D1A8F2 diff --git a/frontends/calculator/CEdev/examples/fileio_detectany/makefile b/frontends/calculator/CEdev/examples/fileio_detectany/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/fileio_detectany/makefile +++ b/frontends/calculator/CEdev/examples/fileio_detectany/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/fileio_detectany/readme.md b/frontends/calculator/CEdev/examples/fileio_detectany/readme.md index 21a7e26..753d2bb 100644 --- a/frontends/calculator/CEdev/examples/fileio_detectany/readme.md +++ b/frontends/calculator/CEdev/examples/fileio_detectany/readme.md @@ -1,11 +1,11 @@ -### FileIO File Detection Demo - -This demo shows how to use the ti_DetectAny function to search for a variable that starts with a particular sequence of bytes -LibLoad is used because it is known to exist for demonstration. - -![Screenshot](screenshot.png) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### FileIO File Detection Demo + +This demo shows how to use the ti_DetectAny function to search for a variable that starts with a particular sequence of bytes +LibLoad is used because it is known to exist for demonstration. + +![Screenshot](screenshot.png) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/fileio_detectany/src/main.c b/frontends/calculator/CEdev/examples/fileio_detectany/src/main.c index 6809123..4262abe 100644 --- a/frontends/calculator/CEdev/examples/fileio_detectany/src/main.c +++ b/frontends/calculator/CEdev/examples/fileio_detectany/src/main.c @@ -1,49 +1,49 @@ -#include -#include -#include -#include - -#include -#include -#include - -#include - -/* Function prototypes */ -void printText(int8_t xpos, int8_t ypos, const char *text); - -/* Main Function */ -void main(void) { - /* Declare some variables -- search_pos must be NULL to begin with */ - uint8_t *search_pos = NULL, type; - int8_t y = 0; - ti_var_t myVar; - char *var_name; - - /* First couple bytes of the LibLoad AppVar, which is known to exist * - /* Technically is a null-terminated string, if an odd looking one */ - const char search_string[] = { 0xBF, 0xFE, 0x00 }; - - /* Clear the homescreen */ - os_ClrHome(); - - /* Find all of the variables that start with this string */ - while ((var_name = ti_DetectAny(&search_pos, search_string, &type)) != NULL) { - if (type == TI_APPVAR_TYPE) { - /* Print the name of the variable (Should be LibLoad) */ - printText(0, y++, var_name); - } - } - - /* Wait for a key */ - while (!os_GetCSC()); - - /* Close all open files */ - ti_CloseAll(); -} - -/* Draw text on the homescreen at the given X/Y location */ -void printText(int8_t xpos, int8_t ypos, const char *text) { - os_SetCursorPos(ypos, xpos); - os_PutStrFull(text); -} +#include +#include +#include +#include + +#include +#include +#include + +#include + +/* Function prototypes */ +void printText(int8_t xpos, int8_t ypos, const char *text); + +/* Main Function */ +void main(void) { + /* Declare some variables -- search_pos must be NULL to begin with */ + uint8_t *search_pos = NULL, type; + int8_t y = 0; + ti_var_t myVar; + char *var_name; + + /* First couple bytes of the LibLoad AppVar, which is known to exist * + /* Technically is a null-terminated string, if an odd looking one */ + const char search_string[] = { 0xBF, 0xFE, 0x00 }; + + /* Clear the homescreen */ + os_ClrHome(); + + /* Find all of the variables that start with this string */ + while ((var_name = ti_DetectAny(&search_pos, search_string, &type)) != NULL) { + if (type == TI_APPVAR_TYPE) { + /* Print the name of the variable (Should be LibLoad) */ + printText(0, y++, var_name); + } + } + + /* Wait for a key */ + while (!os_GetCSC()); + + /* Close all open files */ + ti_CloseAll(); +} + +/* Draw text on the homescreen at the given X/Y location */ +void printText(int8_t xpos, int8_t ypos, const char *text) { + os_SetCursorPos(ypos, xpos); + os_PutStrFull(text); +} diff --git a/frontends/calculator/CEdev/examples/fileio_factorize/autotester.badjson b/frontends/calculator/CEdev/examples/fileio_factorize/autotester.badjson index 1e97c78..7381145 100644 --- a/frontends/calculator/CEdev/examples/fileio_factorize/autotester.badjson +++ b/frontends/calculator/CEdev/examples/fileio_factorize/autotester.badjson @@ -1,37 +1,37 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", --> type input in Ans ; expect known output back in Ans - "delay|500", - "hash|1", - "key|enter", - "delay|200", - "hash|2" - ], - -******* Broken JSON TODO : -******* implement autotester var handling feature ******* - - "hashes": { - "1": { - "description": "Variable Ans is a list [TODO]", - "start": "var_complex_B", - "size": "var_size", - "expected_CRCs": [ "" ] - }, - "2": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} - +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", --> type input in Ans ; expect known output back in Ans + "delay|500", + "hash|1", + "key|enter", + "delay|200", + "hash|2" + ], + +******* Broken JSON TODO : +******* implement autotester var handling feature ******* + + "hashes": { + "1": { + "description": "Variable Ans is a list [TODO]", + "start": "var_complex_B", + "size": "var_size", + "expected_CRCs": [ "" ] + }, + "2": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} + diff --git a/frontends/calculator/CEdev/examples/fileio_factorize/makefile b/frontends/calculator/CEdev/examples/fileio_factorize/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/fileio_factorize/makefile +++ b/frontends/calculator/CEdev/examples/fileio_factorize/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/fileio_factorize/readme.md b/frontends/calculator/CEdev/examples/fileio_factorize/readme.md index 196474c..7695265 100644 --- a/frontends/calculator/CEdev/examples/fileio_factorize/readme.md +++ b/frontends/calculator/CEdev/examples/fileio_factorize/readme.md @@ -1,12 +1,12 @@ -### FileIO Factorize Demo - -This demo demonstrates a way to compute the factors of a input number in Ans - -![Screenshot](screenshot.png) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - - - +### FileIO Factorize Demo + +This demo demonstrates a way to compute the factors of a input number in Ans + +![Screenshot](screenshot.png) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + + + diff --git a/frontends/calculator/CEdev/examples/fileio_factorize/src/main.c b/frontends/calculator/CEdev/examples/fileio_factorize/src/main.c index 3be9992..c95bb46 100644 --- a/frontends/calculator/CEdev/examples/fileio_factorize/src/main.c +++ b/frontends/calculator/CEdev/examples/fileio_factorize/src/main.c @@ -1,75 +1,75 @@ -#include -#include -#include -#include - -#include -#include -#include - -#include - -void prime_factors(unsigned int n); - -int primes[512]; -unsigned int total_primes = 0; - -/* Main Function */ -void main(void) { - /* Declare some variables */ - real_t *real_in; - list_t *list_out; - unsigned i; - int in; - - /* Clear the homescreen */ - os_ClrHome(); - - /* Get the answer variable */ - if (ti_RclVar(TI_REAL_TYPE, ti_Ans, &real_in)) return; - if ((in = os_RealToInt24(real_in)) < 1) return; - - /* Get the prime factors of the input */ - prime_factors((unsigned)in); - - /* Create a list to store the primes */ - if (!total_primes) return; - list_out = ti_MallocList(total_primes); // Same as ti_AllocList(total_primes, malloc) - - /* Write out the list of primes */ - for (i=0; iitems[i] = os_Int24ToReal(primes[i]); - } - - /* Set the new answer */ - ti_SetVar(TI_REAL_LIST_TYPE, ti_Ans, list_out); -} - -/* Store to an array all the prime numbers */ -void prime_factors(unsigned int n) { - unsigned int div, end; - - while (!(n % 2)) { - primes[total_primes++] = 2; - n /= 2; - } - - if (n == 1) return; - - div = 3; - end = sqrt(n); - - while (div <= end) { - if (!(n % div)) { - do { - primes[total_primes++] = div; - n /= div; - } while (!(n % div)); - if (n == 1) return; - end = sqrt(n); - } - div += 2; - } - - primes[total_primes++] = n; -} +#include +#include +#include +#include + +#include +#include +#include + +#include + +void prime_factors(unsigned int n); + +int primes[512]; +unsigned int total_primes = 0; + +/* Main Function */ +void main(void) { + /* Declare some variables */ + real_t *real_in; + list_t *list_out; + unsigned i; + int in; + + /* Clear the homescreen */ + os_ClrHome(); + + /* Get the answer variable */ + if (ti_RclVar(TI_REAL_TYPE, ti_Ans, &real_in)) return; + if ((in = os_RealToInt24(real_in)) < 1) return; + + /* Get the prime factors of the input */ + prime_factors((unsigned)in); + + /* Create a list to store the primes */ + if (!total_primes) return; + list_out = ti_MallocList(total_primes); // Same as ti_AllocList(total_primes, malloc) + + /* Write out the list of primes */ + for (i=0; iitems[i] = os_Int24ToReal(primes[i]); + } + + /* Set the new answer */ + ti_SetVar(TI_REAL_LIST_TYPE, ti_Ans, list_out); +} + +/* Store to an array all the prime numbers */ +void prime_factors(unsigned int n) { + unsigned int div, end; + + while (!(n % 2)) { + primes[total_primes++] = 2; + n /= 2; + } + + if (n == 1) return; + + div = 3; + end = sqrt(n); + + while (div <= end) { + if (!(n % div)) { + do { + primes[total_primes++] = div; + n /= div; + } while (!(n % div)); + if (n == 1) return; + end = sqrt(n); + } + div += 2; + } + + primes[total_primes++] = n; +} diff --git a/frontends/calculator/CEdev/examples/fileio_os_vars/autotester.badjson b/frontends/calculator/CEdev/examples/fileio_os_vars/autotester.badjson index dbf9e3d..8b713fa 100644 --- a/frontends/calculator/CEdev/examples/fileio_os_vars/autotester.badjson +++ b/frontends/calculator/CEdev/examples/fileio_os_vars/autotester.badjson @@ -1,65 +1,65 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "delay|500", - "hash|1", - "hash|2", - "hash|3", - "hash|4", - "hash|5", - "key|enter", - "delay|200", - "hash|6" - ], - -******* Broken JSON TODO : -******* implement autotester var handling feature ******* - - "hashes": { - "1": { - "description": "Variable B is complex 1.5+2.5i", - "start": "var_complex_B", - "size": "var_size", - "expected_CRCs": [ "" ] - }, - "2": { - "description": "Variable A is real 1.5", - "start": "var_real_A", - "size": "var_size", - "expected_CRCs": [ "" ] - }, - "3": { - "description": "Variable Y1 is equation 2+2", - "start": "var", - "size": "var_equation_Y1", - "expected_CRCs": [ "" ] - }, - "4": { - "description": "Variable L1 is list {1.5,2.5,3.5}", - "start": "var", - "size": "var_list_L1", - "expected_CRCs": [ "" ] - }, - "5": { - "description": "Variable Ans is matrix [[2.5,2.5]]", - "start": "var_Ans", - "size": "var_size", - "expected_CRCs": [ "" ] - }, - "6": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} - +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "delay|500", + "hash|1", + "hash|2", + "hash|3", + "hash|4", + "hash|5", + "key|enter", + "delay|200", + "hash|6" + ], + +******* Broken JSON TODO : +******* implement autotester var handling feature ******* + + "hashes": { + "1": { + "description": "Variable B is complex 1.5+2.5i", + "start": "var_complex_B", + "size": "var_size", + "expected_CRCs": [ "" ] + }, + "2": { + "description": "Variable A is real 1.5", + "start": "var_real_A", + "size": "var_size", + "expected_CRCs": [ "" ] + }, + "3": { + "description": "Variable Y1 is equation 2+2", + "start": "var", + "size": "var_equation_Y1", + "expected_CRCs": [ "" ] + }, + "4": { + "description": "Variable L1 is list {1.5,2.5,3.5}", + "start": "var", + "size": "var_list_L1", + "expected_CRCs": [ "" ] + }, + "5": { + "description": "Variable Ans is matrix [[2.5,2.5]]", + "start": "var_Ans", + "size": "var_size", + "expected_CRCs": [ "" ] + }, + "6": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} + diff --git a/frontends/calculator/CEdev/examples/fileio_os_vars/makefile b/frontends/calculator/CEdev/examples/fileio_os_vars/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/fileio_os_vars/makefile +++ b/frontends/calculator/CEdev/examples/fileio_os_vars/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/fileio_os_vars/readme.md b/frontends/calculator/CEdev/examples/fileio_os_vars/readme.md index d628217..2f780d2 100644 --- a/frontends/calculator/CEdev/examples/fileio_os_vars/readme.md +++ b/frontends/calculator/CEdev/examples/fileio_os_vars/readme.md @@ -1,10 +1,10 @@ -### FileIO OS Variables Demo - -This demo shows how to use the different OS variable accessing functions. - -![Screenshot](screenshot.png) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### FileIO OS Variables Demo + +This demo shows how to use the different OS variable accessing functions. + +![Screenshot](screenshot.png) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/fileio_os_vars/src/main.c b/frontends/calculator/CEdev/examples/fileio_os_vars/src/main.c index 657f9d9..dd429d5 100644 --- a/frontends/calculator/CEdev/examples/fileio_os_vars/src/main.c +++ b/frontends/calculator/CEdev/examples/fileio_os_vars/src/main.c @@ -1,101 +1,101 @@ -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -/* Some function prototypes. Maybe in the future these functions will become a library */ -cplx_t Int24sToCplx(int real, int imag); -cplx_t FloatsToCplx(float real, float imag); -cplx_t RealsToCplx(real_t real, real_t imag); -cplx_t StrsToCplx(char *real, char **real_end, char *imag, char **imag_end); - -/* Main Function */ -void main(void) { - /* Declare some variables */ - equ_t *my_equ; - list_t *my_list; - matrix_t *my_matrix; - real_t my_real; - cplx_t my_cplx; - real_t real_1_5 = os_FloatToReal(1.5); - real_t real_2_5 = os_FloatToReal(2.5); - real_t real_3_5 = os_FloatToReal(3.5); - - /* Store the value '1.5+2.5i' into the variable B */ - my_cplx = FloatsToCplx(1.5, 2.5); - ti_SetVar(TI_CPLX_TYPE, ti_B, &my_cplx); - - /* Store the value '1.5' into the variable A */ - my_real = real_1_5; - ti_SetVar(TI_REAL_TYPE, ti_A, &my_real); - - /* Store the equation "2+2" into the Y1 variable */ - my_equ = ti_MallocEqu(3); // Same as ti_AllocEqu(3, malloc) - my_equ->data[0] = '2'; - my_equ->data[1] = tAdd; - my_equ->data[2] = '2'; - ti_SetVar(TI_EQU_TYPE, ti_Y1, my_equ); - free(my_equ); - - /* Store the list {1.5,2.5,3.5} to L1 */ - my_list = ti_MallocList(3); // Same as ti_AllocList(3, malloc) - my_list->items[0] = real_1_5; - my_list->items[1] = real_2_5; - my_list->items[2] = real_3_5; - ti_SetVar(TI_REAL_LIST_TYPE, ti_L1, my_list); - free(my_list); - - /* Store the matrix [[2.5,2.5]] to Ans */ - my_matrix = ti_MallocMatrix(1,2); // Same as ti_AllocMatrix(1, 2, malloc) - matrix_element(my_matrix, 0, 0) = real_2_5; - matrix_element(my_matrix, 0, 1) = real_2_5; - ti_SetVar(TI_MATRIX_TYPE, ti_Ans, my_matrix); - free(my_matrix); -} - -/* Stores some ints to a complex variable type */ -cplx_t Int24sToCplx(int real, int imag) { - cplx_t res; - res.real = os_Int24ToReal(real); - res.real.sign |= TI_CPLX_TYPE; - res.imag = os_Int24ToReal(imag); - res.imag.sign |= TI_CPLX_TYPE; - return res; -} - -/* Stores some floats to a complex variable type */ -cplx_t FloatsToCplx(float real, float imag) { - cplx_t res; - res.real = os_FloatToReal(real); - res.real.sign |= TI_CPLX_TYPE; - res.imag = os_FloatToReal(imag); - res.imag.sign |= TI_CPLX_TYPE; - return res; -} - -/* Converts a pair of reals to a complex number */ -cplx_t RealsToCplx(real_t real, real_t imag) { - cplx_t res; - res.real = real; - res.real.sign |= TI_CPLX_TYPE; - res.imag = imag; - res.imag.sign |= TI_CPLX_TYPE; - return res; -} - -/* Converts strings to a complex variable type */ -cplx_t StrsToCplx(char *real, char **real_end, char *imag, char **imag_end) { - cplx_t res; - res.real = os_StrToReal(real, real_end); - res.real.sign |= TI_CPLX_TYPE; - res.imag = os_StrToReal(imag, imag_end); - res.imag.sign |= TI_CPLX_TYPE; - return res; -} +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +/* Some function prototypes. Maybe in the future these functions will become a library */ +cplx_t Int24sToCplx(int real, int imag); +cplx_t FloatsToCplx(float real, float imag); +cplx_t RealsToCplx(real_t real, real_t imag); +cplx_t StrsToCplx(char *real, char **real_end, char *imag, char **imag_end); + +/* Main Function */ +void main(void) { + /* Declare some variables */ + equ_t *my_equ; + list_t *my_list; + matrix_t *my_matrix; + real_t my_real; + cplx_t my_cplx; + real_t real_1_5 = os_FloatToReal(1.5); + real_t real_2_5 = os_FloatToReal(2.5); + real_t real_3_5 = os_FloatToReal(3.5); + + /* Store the value '1.5+2.5i' into the variable B */ + my_cplx = FloatsToCplx(1.5, 2.5); + ti_SetVar(TI_CPLX_TYPE, ti_B, &my_cplx); + + /* Store the value '1.5' into the variable A */ + my_real = real_1_5; + ti_SetVar(TI_REAL_TYPE, ti_A, &my_real); + + /* Store the equation "2+2" into the Y1 variable */ + my_equ = ti_MallocEqu(3); // Same as ti_AllocEqu(3, malloc) + my_equ->data[0] = '2'; + my_equ->data[1] = tAdd; + my_equ->data[2] = '2'; + ti_SetVar(TI_EQU_TYPE, ti_Y1, my_equ); + free(my_equ); + + /* Store the list {1.5,2.5,3.5} to L1 */ + my_list = ti_MallocList(3); // Same as ti_AllocList(3, malloc) + my_list->items[0] = real_1_5; + my_list->items[1] = real_2_5; + my_list->items[2] = real_3_5; + ti_SetVar(TI_REAL_LIST_TYPE, ti_L1, my_list); + free(my_list); + + /* Store the matrix [[2.5,2.5]] to Ans */ + my_matrix = ti_MallocMatrix(1,2); // Same as ti_AllocMatrix(1, 2, malloc) + matrix_element(my_matrix, 0, 0) = real_2_5; + matrix_element(my_matrix, 0, 1) = real_2_5; + ti_SetVar(TI_MATRIX_TYPE, ti_Ans, my_matrix); + free(my_matrix); +} + +/* Stores some ints to a complex variable type */ +cplx_t Int24sToCplx(int real, int imag) { + cplx_t res; + res.real = os_Int24ToReal(real); + res.real.sign |= TI_CPLX_TYPE; + res.imag = os_Int24ToReal(imag); + res.imag.sign |= TI_CPLX_TYPE; + return res; +} + +/* Stores some floats to a complex variable type */ +cplx_t FloatsToCplx(float real, float imag) { + cplx_t res; + res.real = os_FloatToReal(real); + res.real.sign |= TI_CPLX_TYPE; + res.imag = os_FloatToReal(imag); + res.imag.sign |= TI_CPLX_TYPE; + return res; +} + +/* Converts a pair of reals to a complex number */ +cplx_t RealsToCplx(real_t real, real_t imag) { + cplx_t res; + res.real = real; + res.real.sign |= TI_CPLX_TYPE; + res.imag = imag; + res.imag.sign |= TI_CPLX_TYPE; + return res; +} + +/* Converts strings to a complex variable type */ +cplx_t StrsToCplx(char *real, char **real_end, char *imag, char **imag_end) { + cplx_t res; + res.real = os_StrToReal(real, real_end); + res.real.sign |= TI_CPLX_TYPE; + res.imag = os_StrToReal(imag, imag_end); + res.imag.sign |= TI_CPLX_TYPE; + return res; +} diff --git a/frontends/calculator/CEdev/examples/fileio_read_write/autotester.json b/frontends/calculator/CEdev/examples/fileio_read_write/autotester.json index bd30851..77be90b 100644 --- a/frontends/calculator/CEdev/examples/fileio_read_write/autotester.json +++ b/frontends/calculator/CEdev/examples/fileio_read_write/autotester.json @@ -1,33 +1,33 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "delay|1000", - "hash|1", - "key|enter", - "delay|200", - "hashWait|2" - ], - "hashes": { - "1": { - "description": "Assert that the read was succesful", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "D720F0D9" ] - }, - "2": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} - +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "delay|1000", + "hash|1", + "key|enter", + "delay|200", + "hashWait|2" + ], + "hashes": { + "1": { + "description": "Assert that the read was succesful", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "D720F0D9" ] + }, + "2": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} + diff --git a/frontends/calculator/CEdev/examples/fileio_read_write/bin/DEMO.map b/frontends/calculator/CEdev/examples/fileio_read_write/bin/DEMO.map index 7cf5131..6d7aa9a 100644 --- a/frontends/calculator/CEdev/examples/fileio_read_write/bin/DEMO.map +++ b/frontends/calculator/CEdev/examples/fileio_read_write/bin/DEMO.map @@ -1,154 +1,154 @@ -Segment Base Top High Length --------- ------ ------ ------ ------- -icon D1A882 D1A882 0h -launcher D1A882 D1A8DA 58h -libs D1A8DA D1A906 2Ch -startup D1A906 D1A945 3Fh -cleanup D1A945 D1A959 14h -exit D1A959 D1A95F 6h -code D1A95F D1AB0A 1ABh -data D1AB0A D1AB2F 25h -strsect D1AB2F D1AB6E 3Fh -text D1AB6E D1AB6E 0h -bss D031F6 D03207 D13FD6 11h -header D1A87F D1A882 3h - -Label Value -------------------------- ------ -_os_DisableHomeTextBuffer = D1A95F -_os_EnableHomeTextBuffer = D1A971 -_boot_GetBootMajorVer = 000080 -_boot_GetHardwareVer = 000084 -_boot_GetBootMinorVer = 00008C -_boot_DebugPrintf = 0000B4 -_boot_ClearVRAM = 000374 -_boot_TurnOff = 000388 -_boot_NewLine = 000390 -_boot_Set6MHzMode = 00039C -_boot_Set48MHzMode = 0003A0 -_boot_Set6MHzModeI = 0003A4 -_boot_Set48MHzModeI = 0003A8 -_boot_GetBatteryStatus = 0003B0 -_boot_WaitShort = 0003B4 -_boot_CheckOnPressed = 00057C -_boot_SetDate = 000598 -_boot_GetDate = 0005A8 -_boot_GetTime = 0005B0 -_boot_SetTime = 0005B4 -_boot_IsAfterNoon = 0005C8 -_os_NewLine = 0207F0 -_os_PushErrorHandler = 021C78 -_os_PopErrorHandler = 021C7C -_os_ThrowError = 021C80 -_os_RealCopy = 021C84 -_os_RealAsinRad = 021C88 -_os_RealAcosRad = 021C8C -_os_RealAtanRad = 021C90 -_os_RealAdd = 021C94 -_os_CplxSquare = 021C98 -_os_RealCompare = 021C9C -_os_RealCosRad = 021CA0 -_os_RealRadToDeg = 021CA4 -_os_RealDiv = 021CA8 -_os_RealExp = 021CAC -_os_RealFloor = 021CB0 -_os_RealToStr = 021CB4 -_os_RealFrac = 021CB8 -_os_RealGcd = 021CBC -_os_RealRoundInt = 021CC0 -_os_RealLcm = 021CC4 -_os_RealLog = 021CC8 -_os_RealMax = 021CCC -_os_RealMin = 021CD0 -_os_RealMul = 021CD4 -_os_RealNcr = 021CD8 -_os_RealNeg = 021CDC -_os_RealNpr = 021CE0 -_os_RealPow = 021CE4 -_os_RealDegToRad = 021CE8 -_os_RealRandInt = 021CEC -_os_RealInv = 021CF0 -_os_RealMod = 021CF4 -_os_RealRound = 021CF8 -_os_RealSinRad = 021CFC -_os_RealSqrt = 021D00 -_os_RealSub = 021D04 -_os_RealTanRad = 021D08 -_os_StrToReal = 021D0C -_os_RealInt = 021D10 -_os_SetFlagBits = 021D14 -_os_ResetFlagBits = 021D18 -_os_TestFlagBits = 021D1C -_os_SetFlagByte = 021D20 -_os_GetFlagByte = 021D24 -_os_GetCursorPos = 021D28 -_os_PutStrFull = 021D2C -_os_PutStrLine = 021D30 -_os_SetCursorPos = 021D34 -_os_AppInit = 021D40 -_os_GetKey = 021D38 -_os_GetCSC = 021D3C -_os_DisableCursor = 021DE4 -_os_EnableCursor = 021DE8 -_os_FontDrawText = 021E00 -_os_FontGetHeight = 021E14 -_os_FontGetWidth = 021E18 -_os_InitDrawing = 021E1C -_os_SetDrawBGColor = 021E20 -_os_SetDrawFGColor = 021E24 -_os_FontSelect = 021E28 -_os_RclAns = 021E70 -_os_SetTimer1 = 021EC8 -_os_DisableTimer1 = 021ECC -_os_GetSystemStats = 021ED4 -_os_GetDrawBGColor = 021EE4 -_os_GetDrawFGColor = 021EE8 -_os_FontGetID = 021EEC -_os_RealToInt24 = 021EF4 -_os_Int24ToReal = 021EF8 -_os_ForceCmdNoChar = 021FA8 -_os_GetSymTablePtr = 021FB0 -_os_NextSymEntry = 021FB4 -_os_ChkFindSym = 021FB8 -_os_MemChk = 021FF0 -_os_SetTimer2 = 022080 -_os_DisableTimer2 = 022084 -_os_FloatToReal = 022170 -_os_RealToFloat = 022174 -_os_FontDrawTransText = 022178 -_os_CreateAppVar = 022184 -_asm_MoveDown = 0207F4 -_asm_MoveUp = 020800 -_asm_ClrLCDFull = 020808 -_asm_ClrLCD = 02080C -_asm_ClrTxtShd = 020818 -_asm_HomeUp = 020828 -_asm_RunIndicOn = 020844 -_asm_RunIndicOff = 020848 -_asm_DelRes = 020E5C -_asm_DisableAPD = 021134 -_asm_EnableAPD = 021138 -_asm_DrawStatusBar = 021A3C -_asm_ArcChk = 022040 -__OS = D1A983 -__frameset0 = D1A98D -__frameset = D1A998 -_strcpy = 0000CC -__findlibload = D1A882 -__ccleanup = D1A945 -_errno = D008DC -_init = D1A882 -_exit = D1A95B -__exit = D1A934 -__exitsp = D1A934 -__errsp = D1A934 -_printText = D1AAE8 -_main = D1A9A6 -_data = D031F6 -_appvarName = D1AB2C -_ti_CloseAll = D1A8EE -_ti_Open = D1A8F2 -_ti_Write = D1A8F6 -_ti_Read = D1A8FA -_ti_Rewind = D1A8FE -_ti_GetName = D1A902 +Segment Base Top High Length +-------- ------ ------ ------ ------- +icon D1A882 D1A882 0h +launcher D1A882 D1A8DA 58h +libs D1A8DA D1A906 2Ch +startup D1A906 D1A945 3Fh +cleanup D1A945 D1A959 14h +exit D1A959 D1A95F 6h +code D1A95F D1AB0A 1ABh +data D1AB0A D1AB2F 25h +strsect D1AB2F D1AB6E 3Fh +text D1AB6E D1AB6E 0h +bss D031F6 D03207 D13FD6 11h +header D1A87F D1A882 3h + +Label Value +------------------------- ------ +_os_DisableHomeTextBuffer = D1A95F +_os_EnableHomeTextBuffer = D1A971 +_boot_GetBootMajorVer = 000080 +_boot_GetHardwareVer = 000084 +_boot_GetBootMinorVer = 00008C +_boot_DebugPrintf = 0000B4 +_boot_ClearVRAM = 000374 +_boot_TurnOff = 000388 +_boot_NewLine = 000390 +_boot_Set6MHzMode = 00039C +_boot_Set48MHzMode = 0003A0 +_boot_Set6MHzModeI = 0003A4 +_boot_Set48MHzModeI = 0003A8 +_boot_GetBatteryStatus = 0003B0 +_boot_WaitShort = 0003B4 +_boot_CheckOnPressed = 00057C +_boot_SetDate = 000598 +_boot_GetDate = 0005A8 +_boot_GetTime = 0005B0 +_boot_SetTime = 0005B4 +_boot_IsAfterNoon = 0005C8 +_os_NewLine = 0207F0 +_os_PushErrorHandler = 021C78 +_os_PopErrorHandler = 021C7C +_os_ThrowError = 021C80 +_os_RealCopy = 021C84 +_os_RealAsinRad = 021C88 +_os_RealAcosRad = 021C8C +_os_RealAtanRad = 021C90 +_os_RealAdd = 021C94 +_os_CplxSquare = 021C98 +_os_RealCompare = 021C9C +_os_RealCosRad = 021CA0 +_os_RealRadToDeg = 021CA4 +_os_RealDiv = 021CA8 +_os_RealExp = 021CAC +_os_RealFloor = 021CB0 +_os_RealToStr = 021CB4 +_os_RealFrac = 021CB8 +_os_RealGcd = 021CBC +_os_RealRoundInt = 021CC0 +_os_RealLcm = 021CC4 +_os_RealLog = 021CC8 +_os_RealMax = 021CCC +_os_RealMin = 021CD0 +_os_RealMul = 021CD4 +_os_RealNcr = 021CD8 +_os_RealNeg = 021CDC +_os_RealNpr = 021CE0 +_os_RealPow = 021CE4 +_os_RealDegToRad = 021CE8 +_os_RealRandInt = 021CEC +_os_RealInv = 021CF0 +_os_RealMod = 021CF4 +_os_RealRound = 021CF8 +_os_RealSinRad = 021CFC +_os_RealSqrt = 021D00 +_os_RealSub = 021D04 +_os_RealTanRad = 021D08 +_os_StrToReal = 021D0C +_os_RealInt = 021D10 +_os_SetFlagBits = 021D14 +_os_ResetFlagBits = 021D18 +_os_TestFlagBits = 021D1C +_os_SetFlagByte = 021D20 +_os_GetFlagByte = 021D24 +_os_GetCursorPos = 021D28 +_os_PutStrFull = 021D2C +_os_PutStrLine = 021D30 +_os_SetCursorPos = 021D34 +_os_AppInit = 021D40 +_os_GetKey = 021D38 +_os_GetCSC = 021D3C +_os_DisableCursor = 021DE4 +_os_EnableCursor = 021DE8 +_os_FontDrawText = 021E00 +_os_FontGetHeight = 021E14 +_os_FontGetWidth = 021E18 +_os_InitDrawing = 021E1C +_os_SetDrawBGColor = 021E20 +_os_SetDrawFGColor = 021E24 +_os_FontSelect = 021E28 +_os_RclAns = 021E70 +_os_SetTimer1 = 021EC8 +_os_DisableTimer1 = 021ECC +_os_GetSystemStats = 021ED4 +_os_GetDrawBGColor = 021EE4 +_os_GetDrawFGColor = 021EE8 +_os_FontGetID = 021EEC +_os_RealToInt24 = 021EF4 +_os_Int24ToReal = 021EF8 +_os_ForceCmdNoChar = 021FA8 +_os_GetSymTablePtr = 021FB0 +_os_NextSymEntry = 021FB4 +_os_ChkFindSym = 021FB8 +_os_MemChk = 021FF0 +_os_SetTimer2 = 022080 +_os_DisableTimer2 = 022084 +_os_FloatToReal = 022170 +_os_RealToFloat = 022174 +_os_FontDrawTransText = 022178 +_os_CreateAppVar = 022184 +_asm_MoveDown = 0207F4 +_asm_MoveUp = 020800 +_asm_ClrLCDFull = 020808 +_asm_ClrLCD = 02080C +_asm_ClrTxtShd = 020818 +_asm_HomeUp = 020828 +_asm_RunIndicOn = 020844 +_asm_RunIndicOff = 020848 +_asm_DelRes = 020E5C +_asm_DisableAPD = 021134 +_asm_EnableAPD = 021138 +_asm_DrawStatusBar = 021A3C +_asm_ArcChk = 022040 +__OS = D1A983 +__frameset0 = D1A98D +__frameset = D1A998 +_strcpy = 0000CC +__findlibload = D1A882 +__ccleanup = D1A945 +_errno = D008DC +_init = D1A882 +_exit = D1A95B +__exit = D1A934 +__exitsp = D1A934 +__errsp = D1A934 +_printText = D1AAE8 +_main = D1A9A6 +_data = D031F6 +_appvarName = D1AB2C +_ti_CloseAll = D1A8EE +_ti_Open = D1A8F2 +_ti_Write = D1A8F6 +_ti_Read = D1A8FA +_ti_Rewind = D1A8FE +_ti_GetName = D1A902 diff --git a/frontends/calculator/CEdev/examples/fileio_read_write/makefile b/frontends/calculator/CEdev/examples/fileio_read_write/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/fileio_read_write/makefile +++ b/frontends/calculator/CEdev/examples/fileio_read_write/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/fileio_read_write/readme.md b/frontends/calculator/CEdev/examples/fileio_read_write/readme.md index 8666507..5c3a134 100644 --- a/frontends/calculator/CEdev/examples/fileio_read_write/readme.md +++ b/frontends/calculator/CEdev/examples/fileio_read_write/readme.md @@ -1,10 +1,10 @@ -### FileIO Write/Read Demo - -This example demonstrates writing some data to a file and then reading it back out to make sure it was written correctly - -![Screenshot](screenshot.png) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### FileIO Write/Read Demo + +This example demonstrates writing some data to a file and then reading it back out to make sure it was written correctly + +![Screenshot](screenshot.png) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/fileio_read_write/src/main.c b/frontends/calculator/CEdev/examples/fileio_read_write/src/main.c index a776037..4747b99 100644 --- a/frontends/calculator/CEdev/examples/fileio_read_write/src/main.c +++ b/frontends/calculator/CEdev/examples/fileio_read_write/src/main.c @@ -1,88 +1,88 @@ -#include -#include -#include -#include - -#include -#include -#include - -#include - -/* Declare some variables */ -const char *appvarName = "AppVar"; - -typedef struct { - char name[15]; - uint8_t var1; - uint8_t var2; -} data_t; - -data_t data; - -#define VAR1_VALUE 10 -#define VAR2_VALUE 20 - -/* Function prototypes */ -void printText(int8_t xpos, int8_t ypos, const char *text); - -/* Main Function */ -void main(void) { - char nameBuffer[10]; - ti_var_t myAppVar; - int x; - - /* Clear the homescreen */ - os_ClrHome(); - - /* Declare some variable values */ - strcpy(data.name, "My Data"); - data.var1 = VAR1_VALUE; - data.var2 = VAR2_VALUE; - - /* Close any files that may be open already */ - ti_CloseAll(); - - /* Open a new variable; deleting it if it already exists */ - myAppVar = ti_Open(appvarName, "w"); - - /* Make sure we opened okay */ - if (!myAppVar) goto err; - - /* Write the structure to the appvar */ - if (ti_Write(&data, sizeof(data_t), 1, myAppVar) != 1) goto err; - - /* Go back to the start of the file */ - if (ti_Rewind(myAppVar) == EOF) goto err; - - /* Let's read it just to make sure we wrote it correctly */ - if (ti_Read(&data, sizeof(data_t), 1, myAppVar) != 1) goto err; - - /* Make sure we read these variables correctly too */ - if (data.var1 != VAR1_VALUE && data.var2 != VAR2_VALUE) goto err; - - /* Ensure the name of the AppVar is correct */ - ti_GetName(nameBuffer, myAppVar); - - printText(0, 0, "Appvar: "); - printText(8, 0, nameBuffer); - printText(0, 1, "Read was successful"); - goto noerr; - -err: - printText(0, 0, "An error occured"); -noerr: - - /* Pause */ - while (!os_GetCSC()); - - /* Close all open files */ - ti_CloseAll(); -} - -/* Draw text on the homescreen at the given X/Y location */ -void printText(int8_t xpos, int8_t ypos, const char *text) { - os_SetCursorPos(ypos, xpos); - os_PutStrFull(text); -} - +#include +#include +#include +#include + +#include +#include +#include + +#include + +/* Declare some variables */ +const char *appvarName = "AppVar"; + +typedef struct { + char name[15]; + uint8_t var1; + uint8_t var2; +} data_t; + +data_t data; + +#define VAR1_VALUE 10 +#define VAR2_VALUE 20 + +/* Function prototypes */ +void printText(int8_t xpos, int8_t ypos, const char *text); + +/* Main Function */ +void main(void) { + char nameBuffer[10]; + ti_var_t myAppVar; + int x; + + /* Clear the homescreen */ + os_ClrHome(); + + /* Declare some variable values */ + strcpy(data.name, "My Data"); + data.var1 = VAR1_VALUE; + data.var2 = VAR2_VALUE; + + /* Close any files that may be open already */ + ti_CloseAll(); + + /* Open a new variable; deleting it if it already exists */ + myAppVar = ti_Open(appvarName, "w"); + + /* Make sure we opened okay */ + if (!myAppVar) goto err; + + /* Write the structure to the appvar */ + if (ti_Write(&data, sizeof(data_t), 1, myAppVar) != 1) goto err; + + /* Go back to the start of the file */ + if (ti_Rewind(myAppVar) == EOF) goto err; + + /* Let's read it just to make sure we wrote it correctly */ + if (ti_Read(&data, sizeof(data_t), 1, myAppVar) != 1) goto err; + + /* Make sure we read these variables correctly too */ + if (data.var1 != VAR1_VALUE && data.var2 != VAR2_VALUE) goto err; + + /* Ensure the name of the AppVar is correct */ + ti_GetName(nameBuffer, myAppVar); + + printText(0, 0, "Appvar: "); + printText(8, 0, nameBuffer); + printText(0, 1, "Read was successful"); + goto noerr; + +err: + printText(0, 0, "An error occured"); +noerr: + + /* Pause */ + while (!os_GetCSC()); + + /* Close all open files */ + ti_CloseAll(); +} + +/* Draw text on the homescreen at the given X/Y location */ +void printText(int8_t xpos, int8_t ypos, const char *text) { + os_SetCursorPos(ypos, xpos); + os_PutStrFull(text); +} + diff --git a/frontends/calculator/CEdev/examples/fileio_rename/autotester.json b/frontends/calculator/CEdev/examples/fileio_rename/autotester.json index 5b454c9..abe87c4 100644 --- a/frontends/calculator/CEdev/examples/fileio_rename/autotester.json +++ b/frontends/calculator/CEdev/examples/fileio_rename/autotester.json @@ -1,33 +1,33 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "delay|1000", - "hash|1", - "key|enter", - "delay|200", - "hashWait|2" - ], - "hashes": { - "1": { - "description": "Assert that the rename was succesful", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "94538693" ] - }, - "2": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} - +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "delay|1000", + "hash|1", + "key|enter", + "delay|200", + "hashWait|2" + ], + "hashes": { + "1": { + "description": "Assert that the rename was succesful", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "94538693" ] + }, + "2": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} + diff --git a/frontends/calculator/CEdev/examples/fileio_rename/makefile b/frontends/calculator/CEdev/examples/fileio_rename/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/fileio_rename/makefile +++ b/frontends/calculator/CEdev/examples/fileio_rename/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/fileio_rename/readme.md b/frontends/calculator/CEdev/examples/fileio_rename/readme.md index 9584b02..518c9ff 100644 --- a/frontends/calculator/CEdev/examples/fileio_rename/readme.md +++ b/frontends/calculator/CEdev/examples/fileio_rename/readme.md @@ -1,8 +1,8 @@ -### FileIO Rename Demo - -This example demonstrates how to rename previously created files - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### FileIO Rename Demo + +This example demonstrates how to rename previously created files + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/fileio_rename/src/main.c b/frontends/calculator/CEdev/examples/fileio_rename/src/main.c index 6f046bb..49793a9 100644 --- a/frontends/calculator/CEdev/examples/fileio_rename/src/main.c +++ b/frontends/calculator/CEdev/examples/fileio_rename/src/main.c @@ -1,77 +1,77 @@ -#include -#include -#include -#include - -#include -#include -#include - -#include - -/* Function prototypes */ -void printText(int8_t xpos, int8_t ypos, const char *text); - -/* Main Function */ -void main(void) { - /* Declare some variables */ - const char *oldName = "OldFile"; - const char *newName = "NewFile"; - char nameBuffer[10]; - ti_var_t file; - bool err = true; - - /* Clear the homescreen */ - os_ClrHome(); - - /* Close any previously open files */ - ti_CloseAll(); - - /* Delete both the new and old files if they already exist */ - ti_Delete(oldName); - ti_Delete(newName); - - do { - /* Create a file with the old name */ - file = ti_Open(oldName, "w"); - if (!file) break; - - ti_GetName(nameBuffer, file); - printText(0, 0, "Old Name: "); - printText(10, 0, nameBuffer); - - /* Close the old file */ - ti_CloseAll(); - - /* Rename the old file to the new file name */ - ti_Rename(oldName, newName); - - /* Ensure the new name of the file is correct */ - file = ti_Open(newName, "r"); - if (!file) break; - - ti_GetName(nameBuffer, file); - printText(0, 1, "New Name: "); - printText(10, 1, nameBuffer); - - err = false; - } while (0); - - /* Close all open files */ - ti_CloseAll(); - - /* If an error occured, inform the user */ - if (err == true) { - printText(0, 2, "An error occured"); - } - - /* Wait for a keypress */ - while (!os_GetCSC()); -} - -/* Draw text on the homescreen at the given X/Y location */ -void printText(int8_t xpos, int8_t ypos, const char *text) { - os_SetCursorPos(ypos, xpos); - os_PutStrFull(text); -} - +#include +#include +#include +#include + +#include +#include +#include + +#include + +/* Function prototypes */ +void printText(int8_t xpos, int8_t ypos, const char *text); + +/* Main Function */ +void main(void) { + /* Declare some variables */ + const char *oldName = "OldFile"; + const char *newName = "NewFile"; + char nameBuffer[10]; + ti_var_t file; + bool err = true; + + /* Clear the homescreen */ + os_ClrHome(); + + /* Close any previously open files */ + ti_CloseAll(); + + /* Delete both the new and old files if they already exist */ + ti_Delete(oldName); + ti_Delete(newName); + + do { + /* Create a file with the old name */ + file = ti_Open(oldName, "w"); + if (!file) break; + + ti_GetName(nameBuffer, file); + printText(0, 0, "Old Name: "); + printText(10, 0, nameBuffer); + + /* Close the old file */ + ti_CloseAll(); + + /* Rename the old file to the new file name */ + ti_Rename(oldName, newName); + + /* Ensure the new name of the file is correct */ + file = ti_Open(newName, "r"); + if (!file) break; + + ti_GetName(nameBuffer, file); + printText(0, 1, "New Name: "); + printText(10, 1, nameBuffer); + + err = false; + } while (0); + + /* Close all open files */ + ti_CloseAll(); + + /* If an error occured, inform the user */ + if (err == true) { + printText(0, 2, "An error occured"); + } + + /* Wait for a keypress */ + while (!os_GetCSC()); +} + +/* Draw text on the homescreen at the given X/Y location */ +void printText(int8_t xpos, int8_t ypos, const char *text) { + os_SetCursorPos(ypos, xpos); + os_PutStrFull(text); +} + diff --git a/frontends/calculator/CEdev/examples/fileio_tokens/autotester.json b/frontends/calculator/CEdev/examples/fileio_tokens/autotester.json index 529758c..d780c28 100644 --- a/frontends/calculator/CEdev/examples/fileio_tokens/autotester.json +++ b/frontends/calculator/CEdev/examples/fileio_tokens/autotester.json @@ -1,33 +1,33 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "delay|1000", - "hash|1", - "key|enter", - "delay|200", - "hashWait|2" - ], - "hashes": { - "1": { - "description": "Blank screen", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "349F4775" ] - }, - "2": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} - +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "delay|1000", + "hash|1", + "key|enter", + "delay|200", + "hashWait|2" + ], + "hashes": { + "1": { + "description": "Blank screen", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "349F4775" ] + }, + "2": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} + diff --git a/frontends/calculator/CEdev/examples/fileio_tokens/makefile b/frontends/calculator/CEdev/examples/fileio_tokens/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/fileio_tokens/makefile +++ b/frontends/calculator/CEdev/examples/fileio_tokens/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/fileio_tokens/readme.md b/frontends/calculator/CEdev/examples/fileio_tokens/readme.md index a1d5546..9421319 100644 --- a/frontends/calculator/CEdev/examples/fileio_tokens/readme.md +++ b/frontends/calculator/CEdev/examples/fileio_tokens/readme.md @@ -1,10 +1,10 @@ -### FileIO Get Token Demo - -This demo shows how to use the ti_GetDataPtr and ti_GetTokenString functions. It prints out the first two tokens in the basic prgmABC. - -![Screenshot](screenshot.png) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### FileIO Get Token Demo + +This demo shows how to use the ti_GetDataPtr and ti_GetTokenString functions. It prints out the first two tokens in the basic prgmABC. + +![Screenshot](screenshot.png) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/fileio_tokens/src/main.c b/frontends/calculator/CEdev/examples/fileio_tokens/src/main.c index d3f6b57..f787180 100644 --- a/frontends/calculator/CEdev/examples/fileio_tokens/src/main.c +++ b/frontends/calculator/CEdev/examples/fileio_tokens/src/main.c @@ -1,59 +1,59 @@ -#include -#include -#include -#include - -#include -#include -#include - -#include - -/* Declare the program name */ -const char *prgmName = "ABC"; - -/* Function prototypes */ -void printText(int8_t xpos, int8_t ypos, const char *text); - -/* Main Function */ -void main(void) { - ti_var_t prgm; - char *text; - uint8_t *data_ptr; - uint8_t token_length; - uint16_t size; - int8_t y = 0; - - /* Clear the homescreen */ - os_ClrHome(); - - /* Close any files that may be open already */ - ti_CloseAll(); - - /* Open the program for reading */ - prgm = ti_OpenVar(prgmName, "r", TI_PRGM_TYPE); - - /* Make sure we opened okay */ - if (!prgm) goto err; - - data_ptr = ti_GetDataPtr(prgm); - size = ti_GetSize(prgm); - - while (size && y < 8) { - printText(0, y++, ti_GetTokenString(&data_ptr, &token_length, NULL)); - size -= token_length; - } - -err: - /* Pause */ - while (!os_GetCSC()); - - /* Close files */ - ti_CloseAll(); -} - -/* Draw text on the homescreen at the given X/Y location */ -void printText(int8_t xpos, int8_t ypos, const char *text) { - os_SetCursorPos(ypos, xpos); - os_PutStrFull(text); -} +#include +#include +#include +#include + +#include +#include +#include + +#include + +/* Declare the program name */ +const char *prgmName = "ABC"; + +/* Function prototypes */ +void printText(int8_t xpos, int8_t ypos, const char *text); + +/* Main Function */ +void main(void) { + ti_var_t prgm; + char *text; + uint8_t *data_ptr; + uint8_t token_length; + uint16_t size; + int8_t y = 0; + + /* Clear the homescreen */ + os_ClrHome(); + + /* Close any files that may be open already */ + ti_CloseAll(); + + /* Open the program for reading */ + prgm = ti_OpenVar(prgmName, "r", TI_PRGM_TYPE); + + /* Make sure we opened okay */ + if (!prgm) goto err; + + data_ptr = ti_GetDataPtr(prgm); + size = ti_GetSize(prgm); + + while (size && y < 8) { + printText(0, y++, ti_GetTokenString(&data_ptr, &token_length, NULL)); + size -= token_length; + } + +err: + /* Pause */ + while (!os_GetCSC()); + + /* Close files */ + ti_CloseAll(); +} + +/* Draw text on the homescreen at the given X/Y location */ +void printText(int8_t xpos, int8_t ypos, const char *text) { + os_SetCursorPos(ypos, xpos); + os_PutStrFull(text); +} diff --git a/frontends/calculator/CEdev/examples/gfx_blitting/autotester.json b/frontends/calculator/CEdev/examples/gfx_blitting/autotester.json index bb67e72..1a23534 100644 --- a/frontends/calculator/CEdev/examples/gfx_blitting/autotester.json +++ b/frontends/calculator/CEdev/examples/gfx_blitting/autotester.json @@ -1,46 +1,46 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "hashWait|1", - "key|enter", - "hashWait|2", - "key|enter", - "hashWait|3", - "key|enter", - "hashWait|4" - ], - "hashes": { - "1": { - "description": "Nothing blitted yet, white screen", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "3132DE74" ] - }, - "2": { - "description": "Parts of buffer blitted to screen", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "830291D3" ] - }, - "3": { - "description": "Full buffer blitted to screen", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "EA181DC1" ] - }, - "4": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "hashWait|1", + "key|enter", + "hashWait|2", + "key|enter", + "hashWait|3", + "key|enter", + "hashWait|4" + ], + "hashes": { + "1": { + "description": "Nothing blitted yet, white screen", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "3132DE74" ] + }, + "2": { + "description": "Parts of buffer blitted to screen", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "830291D3" ] + }, + "3": { + "description": "Full buffer blitted to screen", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "EA181DC1" ] + }, + "4": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} diff --git a/frontends/calculator/CEdev/examples/gfx_blitting/makefile b/frontends/calculator/CEdev/examples/gfx_blitting/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/gfx_blitting/makefile +++ b/frontends/calculator/CEdev/examples/gfx_blitting/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/gfx_blitting/readme.md b/frontends/calculator/CEdev/examples/gfx_blitting/readme.md index caa3bcb..b5db201 100644 --- a/frontends/calculator/CEdev/examples/gfx_blitting/readme.md +++ b/frontends/calculator/CEdev/examples/gfx_blitting/readme.md @@ -1,7 +1,7 @@ -### GraphX Blitting Demo - -This example demonstrates blitting to manually copy data from the drawing buffer to the screen buffer - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. +### GraphX Blitting Demo + +This example demonstrates blitting to manually copy data from the drawing buffer to the screen buffer + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. diff --git a/frontends/calculator/CEdev/examples/gfx_blitting/src/main.c b/frontends/calculator/CEdev/examples/gfx_blitting/src/main.c index 1582583..da7b90c 100644 --- a/frontends/calculator/CEdev/examples/gfx_blitting/src/main.c +++ b/frontends/calculator/CEdev/examples/gfx_blitting/src/main.c @@ -1,47 +1,47 @@ -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -/* This tutorial is meant to be played around with to get a feeling for how blitting works */ -void main(void) { - uint8_t c; - - /* Initialize the 8bpp graphics, screen cleared to white */ - gfx_Begin(); - - /* Draw to buffer instead of directly to screen */ - gfx_SetDrawBuffer(); // This is the same as gfx_SetDraw(gfx_buffer) - - /* Draw a gradient (to the buffer) */ - for (c = 0; c < 8; c++) { - gfx_SetColor(c); - gfx_FillRectangle_NoClip(c * (LCD_WIDTH / 8), 0, LCD_WIDTH / 8, LCD_HEIGHT); - } - - /* Wait for a key */ - while (!os_GetCSC()); - - /* Copy parts of the buffer to the screen */ - gfx_BlitLines(gfx_buffer, LCD_HEIGHT - 32, 32); - gfx_BlitRectangle(gfx_buffer, LCD_WIDTH / 4, LCD_HEIGHT / 4, LCD_WIDTH / 2, LCD_HEIGHT / 2); - - /* Wait for a key */ - while (!os_GetCSC()); - - /* Copy the full buffer to the screen */ - gfx_BlitBuffer(); // This is the same as gfx_Blit(gfx_buffer) - - /* Wait for a key */ - while (!os_GetCSC()); - - /* Close the graphics */ - gfx_End(); -} +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +/* This tutorial is meant to be played around with to get a feeling for how blitting works */ +void main(void) { + uint8_t c; + + /* Initialize the 8bpp graphics, screen cleared to white */ + gfx_Begin(); + + /* Draw to buffer instead of directly to screen */ + gfx_SetDrawBuffer(); // This is the same as gfx_SetDraw(gfx_buffer) + + /* Draw a gradient (to the buffer) */ + for (c = 0; c < 8; c++) { + gfx_SetColor(c); + gfx_FillRectangle_NoClip(c * (LCD_WIDTH / 8), 0, LCD_WIDTH / 8, LCD_HEIGHT); + } + + /* Wait for a key */ + while (!os_GetCSC()); + + /* Copy parts of the buffer to the screen */ + gfx_BlitLines(gfx_buffer, LCD_HEIGHT - 32, 32); + gfx_BlitRectangle(gfx_buffer, LCD_WIDTH / 4, LCD_HEIGHT / 4, LCD_WIDTH / 2, LCD_HEIGHT / 2); + + /* Wait for a key */ + while (!os_GetCSC()); + + /* Copy the full buffer to the screen */ + gfx_BlitBuffer(); // This is the same as gfx_Blit(gfx_buffer) + + /* Wait for a key */ + while (!os_GetCSC()); + + /* Close the graphics */ + gfx_End(); +} diff --git a/frontends/calculator/CEdev/examples/gfx_buffered_cube/autotester.json b/frontends/calculator/CEdev/examples/gfx_buffered_cube/autotester.json index 6d4c32f..8fef238 100644 --- a/frontends/calculator/CEdev/examples/gfx_buffered_cube/autotester.json +++ b/frontends/calculator/CEdev/examples/gfx_buffered_cube/autotester.json @@ -1,40 +1,40 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "delay|300", - "hash|1", - "hash|2", - "key|enter", - "delay|300", - "hashWait|3" - ], - "hashes": { - "1": { - "description": "The background will be white (check a part before the cube)", - "start": "vram_start", - "size": "0x500", - "expected_CRCs": [ "5DAA1FBD" ] - }, - "2": { - "description": "The background will be white (check a part after the cube)", - "start": "0xD52700", - "size": "0x500", - "expected_CRCs": [ "5DAA1FBD" ] - }, - "3": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} - +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "delay|300", + "hash|1", + "hash|2", + "key|enter", + "delay|300", + "hashWait|3" + ], + "hashes": { + "1": { + "description": "The background will be white (check a part before the cube)", + "start": "vram_start", + "size": "0x500", + "expected_CRCs": [ "5DAA1FBD" ] + }, + "2": { + "description": "The background will be white (check a part after the cube)", + "start": "0xD52700", + "size": "0x500", + "expected_CRCs": [ "5DAA1FBD" ] + }, + "3": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} + diff --git a/frontends/calculator/CEdev/examples/gfx_buffered_cube/makefile b/frontends/calculator/CEdev/examples/gfx_buffered_cube/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/gfx_buffered_cube/makefile +++ b/frontends/calculator/CEdev/examples/gfx_buffered_cube/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/gfx_buffered_cube/readme.md b/frontends/calculator/CEdev/examples/gfx_buffered_cube/readme.md index 413aa36..c7cf3f4 100644 --- a/frontends/calculator/CEdev/examples/gfx_buffered_cube/readme.md +++ b/frontends/calculator/CEdev/examples/gfx_buffered_cube/readme.md @@ -1,10 +1,10 @@ -### GraphX Cube Buffer Demo - -Draws a rotating cube which demonstartes the line and double buffering routines - -![Screenshot](screenshot.gif) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### GraphX Cube Buffer Demo + +Draws a rotating cube which demonstartes the line and double buffering routines + +![Screenshot](screenshot.gif) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/gfx_buffered_cube/src/main.c b/frontends/calculator/CEdev/examples/gfx_buffered_cube/src/main.c index 422e96c..3843d96 100644 --- a/frontends/calculator/CEdev/examples/gfx_buffered_cube/src/main.c +++ b/frontends/calculator/CEdev/examples/gfx_buffered_cube/src/main.c @@ -1,113 +1,113 @@ -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -/* Function prototypes */ -void rotate(void); - -/* Globals */ -#define ORG (-50) -#define DEG (6.0) -#define ANG (DEG * M_PI / 180.0) - -/* define the verticies for the two rectangles */ -float face1[4][2] = { - { 140, 45 }, - { 240, 45 }, - { 240, 145 }, - { 140, 145 }, -}; - -float face2[4][2] = { - { 140 + ORG, 45 - ORG }, - { 240 + ORG, 45 - ORG }, - { 240 + ORG, 145 - ORG }, - { 140 + ORG, 145 - ORG }, -}; - -/* declare some globals */ -float sin_angle, - cos_angle; - -float midx1, - midy1, - midx2, - midy2; - -/* Place main code in main */ -void main(void) { - uint8_t loop = 0; - - /* Seed the random numbers */ - srand(rtc_Time()); - - /* Get some main variables set up */ - sin_angle = sin(ANG); - cos_angle = cos(ANG); - midx1 = (face1[0][0] + face1[1][0]) / 2.0; - midy1 = (face1[1][1] + face1[2][1]) / 2.0; - midx2 = (face2[0][0] + face2[1][0]) / 2.0; - midy2 = (face2[1][1] + face2[2][1]) / 2.0; - - /* Start the graphics routines */ - gfx_Begin(); - gfx_SetDrawBuffer(); - - /* Loop until a key is pressed */ - while (!os_GetCSC()) { - - /* Change the color of the cube depending on loop (mod 16) */ - if (!((loop++) & 0xf)) { - gfx_SetColor(rand()); - } - - /* Call the rotation code */ - rotate(); - - /* Swap the buffer with the screen */ - gfx_SwapDraw(); - } - - /* End the graphics */ - gfx_End(); -} - -/* Rotation code */ -void rotate(void) { - uint8_t i, j; - float tmp1, tmp2; - - /* Compute the new vertex coordinates */ - for (i=0; i<4; i++) { - tmp1 = face1[i][0] - midx1; - tmp2 = face1[i][1] - midy1; - - face1[i][0] = midx1 + (tmp1 * cos_angle) - (tmp2 * sin_angle); - face1[i][1] = midy1 + (tmp1 * sin_angle) + (tmp2 * cos_angle); - - tmp1 = face2[i][0] - midx2; - tmp2 = face2[i][1] - midy2; - - face2[i][0] = midx2 + (tmp1 * cos_angle) - (tmp2 * sin_angle); - face2[i][1] = midy2 + (tmp1 * sin_angle) + (tmp2 * cos_angle); - } - - /* Clear the drawing buffer */ - gfx_FillScreen(gfx_white); - - /* Draw the cube */ - for (i=0; i<4; i++) { - j = i + 1 & 3; - gfx_Line(face1[i][0], face1[i][1], face1[j][0], face1[j][1]); - gfx_Line(face2[i][0], face2[i][1], face2[j][0], face2[j][1]); - gfx_Line(face1[i][0], face1[i][1], face2[i][0], face2[i][1]); - } -} +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +/* Function prototypes */ +void rotate(void); + +/* Globals */ +#define ORG (-50) +#define DEG (6.0) +#define ANG (DEG * M_PI / 180.0) + +/* define the verticies for the two rectangles */ +float face1[4][2] = { + { 140, 45 }, + { 240, 45 }, + { 240, 145 }, + { 140, 145 }, +}; + +float face2[4][2] = { + { 140 + ORG, 45 - ORG }, + { 240 + ORG, 45 - ORG }, + { 240 + ORG, 145 - ORG }, + { 140 + ORG, 145 - ORG }, +}; + +/* declare some globals */ +float sin_angle, + cos_angle; + +float midx1, + midy1, + midx2, + midy2; + +/* Place main code in main */ +void main(void) { + uint8_t loop = 0; + + /* Seed the random numbers */ + srand(rtc_Time()); + + /* Get some main variables set up */ + sin_angle = sin(ANG); + cos_angle = cos(ANG); + midx1 = (face1[0][0] + face1[1][0]) / 2.0; + midy1 = (face1[1][1] + face1[2][1]) / 2.0; + midx2 = (face2[0][0] + face2[1][0]) / 2.0; + midy2 = (face2[1][1] + face2[2][1]) / 2.0; + + /* Start the graphics routines */ + gfx_Begin(); + gfx_SetDrawBuffer(); + + /* Loop until a key is pressed */ + while (!os_GetCSC()) { + + /* Change the color of the cube depending on loop (mod 16) */ + if (!((loop++) & 0xf)) { + gfx_SetColor(rand()); + } + + /* Call the rotation code */ + rotate(); + + /* Swap the buffer with the screen */ + gfx_SwapDraw(); + } + + /* End the graphics */ + gfx_End(); +} + +/* Rotation code */ +void rotate(void) { + uint8_t i, j; + float tmp1, tmp2; + + /* Compute the new vertex coordinates */ + for (i=0; i<4; i++) { + tmp1 = face1[i][0] - midx1; + tmp2 = face1[i][1] - midy1; + + face1[i][0] = midx1 + (tmp1 * cos_angle) - (tmp2 * sin_angle); + face1[i][1] = midy1 + (tmp1 * sin_angle) + (tmp2 * cos_angle); + + tmp1 = face2[i][0] - midx2; + tmp2 = face2[i][1] - midy2; + + face2[i][0] = midx2 + (tmp1 * cos_angle) - (tmp2 * sin_angle); + face2[i][1] = midy2 + (tmp1 * sin_angle) + (tmp2 * cos_angle); + } + + /* Clear the drawing buffer */ + gfx_FillScreen(gfx_white); + + /* Draw the cube */ + for (i=0; i<4; i++) { + j = i + 1 & 3; + gfx_Line(face1[i][0], face1[i][1], face1[j][0], face1[j][1]); + gfx_Line(face2[i][0], face2[i][1], face2[j][0], face2[j][1]); + gfx_Line(face1[i][0], face1[i][1], face2[i][0], face2[i][1]); + } +} diff --git a/frontends/calculator/CEdev/examples/gfx_char/autotester.json b/frontends/calculator/CEdev/examples/gfx_char/autotester.json index 66dfe16..fabde19 100644 --- a/frontends/calculator/CEdev/examples/gfx_char/autotester.json +++ b/frontends/calculator/CEdev/examples/gfx_char/autotester.json @@ -1,30 +1,30 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "hashWait|1", - "key|enter", - "hashWait|2" - ], - "hashes": { - "1": { - "description": "Test flipped text on black background", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "198A8841" ] - }, - "2": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "hashWait|1", + "key|enter", + "hashWait|2" + ], + "hashes": { + "1": { + "description": "Test flipped text on black background", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "198A8841" ] + }, + "2": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} diff --git a/frontends/calculator/CEdev/examples/gfx_char/makefile b/frontends/calculator/CEdev/examples/gfx_char/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/gfx_char/makefile +++ b/frontends/calculator/CEdev/examples/gfx_char/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/gfx_char/readme.md b/frontends/calculator/CEdev/examples/gfx_char/readme.md index 7889ac8..10ba641 100644 --- a/frontends/calculator/CEdev/examples/gfx_char/readme.md +++ b/frontends/calculator/CEdev/examples/gfx_char/readme.md @@ -1,10 +1,10 @@ -### GraphX Character Demo - -A simple demo showing an upside down string. - -![Screenshot](screenshot.png) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### GraphX Character Demo + +A simple demo showing an upside down string. + +![Screenshot](screenshot.png) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/gfx_char/src/main.c b/frontends/calculator/CEdev/examples/gfx_char/src/main.c index 7d1b5ec..a7f108e 100644 --- a/frontends/calculator/CEdev/examples/gfx_char/src/main.c +++ b/frontends/calculator/CEdev/examples/gfx_char/src/main.c @@ -1,52 +1,52 @@ -#include -#include -#include -#include - -#include -#include -#include - -#include - -/* Use some random color as the transparent one */ -#define TRANSPARENT_COLOR 10 -#define FONT_WIDTH 8 -#define FONT_HEIGHT 8 - -/* Function prototypes */ -void printu(char *str, int x, int y); - -const char *my_str = "!!DEPPILF si txet sihT"; - -void main(void) { - /* Initialize the 8bpp graphics */ - gfx_Begin(); - gfx_FillScreen(gfx_black); - - /* Setup the colors */ - gfx_SetTextFGColor(gfx_white); - - /* Set the transparent text background color */ - gfx_SetTextBGColor(TRANSPARENT_COLOR); - gfx_SetTextTransparentColor(TRANSPARENT_COLOR); - gfx_SetMonospaceFont(FONT_WIDTH); - - /* Print some upside down text */ - printu(my_str, (LCD_WIDTH - gfx_GetStringWidth(my_str)) / 2, (LCD_HEIGHT - FONT_HEIGHT) / 2); - - /* Wait for key */ - while (!os_GetCSC()); - - /* Finish the graphics */ - gfx_End(); -} - -void printu(char *str, int x, int y) { - gfx_TempSprite(my_char, 8, 8); - - while (*str) { - gfx_TransparentSprite(gfx_RotateSpriteHalf(gfx_GetSpriteChar(*str), my_char), x, y); - x += gfx_GetCharWidth(*str++); - } -} +#include +#include +#include +#include + +#include +#include +#include + +#include + +/* Use some random color as the transparent one */ +#define TRANSPARENT_COLOR 10 +#define FONT_WIDTH 8 +#define FONT_HEIGHT 8 + +/* Function prototypes */ +void printu(char *str, int x, int y); + +const char *my_str = "!!DEPPILF si txet sihT"; + +void main(void) { + /* Initialize the 8bpp graphics */ + gfx_Begin(); + gfx_FillScreen(gfx_black); + + /* Setup the colors */ + gfx_SetTextFGColor(gfx_white); + + /* Set the transparent text background color */ + gfx_SetTextBGColor(TRANSPARENT_COLOR); + gfx_SetTextTransparentColor(TRANSPARENT_COLOR); + gfx_SetMonospaceFont(FONT_WIDTH); + + /* Print some upside down text */ + printu(my_str, (LCD_WIDTH - gfx_GetStringWidth(my_str)) / 2, (LCD_HEIGHT - FONT_HEIGHT) / 2); + + /* Wait for key */ + while (!os_GetCSC()); + + /* Finish the graphics */ + gfx_End(); +} + +void printu(char *str, int x, int y) { + gfx_TempSprite(my_char, 8, 8); + + while (*str) { + gfx_TransparentSprite(gfx_RotateSpriteHalf(gfx_GetSpriteChar(*str), my_char), x, y); + x += gfx_GetCharWidth(*str++); + } +} diff --git a/frontends/calculator/CEdev/examples/gfx_clipping/autotester.json b/frontends/calculator/CEdev/examples/gfx_clipping/autotester.json index 13f45cb..a43dad7 100644 --- a/frontends/calculator/CEdev/examples/gfx_clipping/autotester.json +++ b/frontends/calculator/CEdev/examples/gfx_clipping/autotester.json @@ -1,52 +1,52 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "delay|300", - "hash|1", - "key|enter", - "delay|300", - "hash|2", - "key|right", - "key|left", - "delay|300", - "hash|3", - "key|enter", - "delay|300", - "hashWait|4" - ], - "hashes": { - "1": { - "description": "Check text scaling", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "BCD2C22B" ] - }, - "2": { - "description": "Check text clipping", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "BCD2C22B" ] - }, - "3": { - "description": "Check clipped region movement and text clipping", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "BE2F6B1A" ] - }, - "4": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} - +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "delay|300", + "hash|1", + "key|enter", + "delay|300", + "hash|2", + "key|right", + "key|left", + "delay|300", + "hash|3", + "key|enter", + "delay|300", + "hashWait|4" + ], + "hashes": { + "1": { + "description": "Check text scaling", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "BCD2C22B" ] + }, + "2": { + "description": "Check text clipping", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "BCD2C22B" ] + }, + "3": { + "description": "Check clipped region movement and text clipping", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "BE2F6B1A" ] + }, + "4": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} + diff --git a/frontends/calculator/CEdev/examples/gfx_clipping/makefile b/frontends/calculator/CEdev/examples/gfx_clipping/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/gfx_clipping/makefile +++ b/frontends/calculator/CEdev/examples/gfx_clipping/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/gfx_clipping/readme.md b/frontends/calculator/CEdev/examples/gfx_clipping/readme.md index c0f0dbb..819dd6d 100644 --- a/frontends/calculator/CEdev/examples/gfx_clipping/readme.md +++ b/frontends/calculator/CEdev/examples/gfx_clipping/readme.md @@ -1,10 +1,10 @@ -### GraphX Clipping Demo - -This example demonstrates alternating the clipping region and using clipped text properly. - -![Screenshot](screenshot.gif) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### GraphX Clipping Demo + +This example demonstrates alternating the clipping region and using clipped text properly. + +![Screenshot](screenshot.gif) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/gfx_clipping/src/main.c b/frontends/calculator/CEdev/examples/gfx_clipping/src/main.c index 97f30eb..69308b1 100644 --- a/frontends/calculator/CEdev/examples/gfx_clipping/src/main.c +++ b/frontends/calculator/CEdev/examples/gfx_clipping/src/main.c @@ -1,85 +1,85 @@ -#include -#include -#include -#include - -#include -#include -#include - -#include - -/* Use some random color as the transparent one */ -#define TRANSPARENT_COLOR 10 -#define FONT_WIDTH 8 -#define FONT_HEIGHT 8 - -void main(void) { - uint8_t key = 24; - - /* Starting text posistion */ - int x = (LCD_WIDTH / 2) - 20; - int y = (LCD_HEIGHT / 2) - 5; - - int box_stride = 1; - int box_scale = 20; - - /* Initialize the 8bpp graphics */ - gfx_Begin(); - gfx_FillScreen(gfx_black); - - /* Setup the colors */ - gfx_SetColor(gfx_white); - gfx_SetTextFGColor(gfx_red); - - /* Set the transparent text background color */ - gfx_SetTextBGColor(TRANSPARENT_COLOR); - gfx_SetTextTransparentColor(TRANSPARENT_COLOR); - - /* Print some scaled font */ - gfx_SetTextScale(2, 2); - gfx_PrintStringXY("This text is SCALED!!", 15, 10); - - /* Wait for a key before continuing */ - while (!os_GetCSC()); - - /* Configure the font to normal size, clipped, and monospaced */ - gfx_SetTextScale(1, 1); - gfx_SetTextConfig(gfx_text_clip); - gfx_SetMonospaceFont(FONT_WIDTH); - - /* Graphics routines draw to the back buffer */ - gfx_SetDrawBuffer(); - - /* Run until the [ENTER] key is pressed */ - do { - /* Check if any keys are pressed */ - if (key == sk_Left) { x--; } - if (key == sk_Right) { x++; } - if (key == sk_Down) { y++; } - if (key == sk_Up) { y--; } - if (key) { - gfx_SetClipRegion((LCD_WIDTH/2) - box_scale, (LCD_HEIGHT/2) - box_scale, (LCD_WIDTH/2) + box_scale, (LCD_HEIGHT/2) + box_scale); - - gfx_FillScreen(gfx_black); - gfx_PrintStringXY("FUN WITH CLIPPING", x, y); - - /* Draw a rectangle on the edges of the clipping region so we can see it */ - gfx_Rectangle_NoClip((LCD_WIDTH/2) - box_scale, (LCD_HEIGHT/2) - box_scale, box_scale * 2, box_scale * 2); - - /* Change the clipping region */ - box_scale += box_stride; - - /* Check if we should increase or decrease the clip region */ - if (box_scale > 100 || box_scale < 10) { - box_stride = -box_stride; - } - - /* Move the graphics so the user can see it */ - gfx_SwapDraw(); - } - } while ((key = os_GetCSC()) != sk_Enter); - - /* Usual cleanup */ - gfx_End(); -} +#include +#include +#include +#include + +#include +#include +#include + +#include + +/* Use some random color as the transparent one */ +#define TRANSPARENT_COLOR 10 +#define FONT_WIDTH 8 +#define FONT_HEIGHT 8 + +void main(void) { + uint8_t key = 24; + + /* Starting text posistion */ + int x = (LCD_WIDTH / 2) - 20; + int y = (LCD_HEIGHT / 2) - 5; + + int box_stride = 1; + int box_scale = 20; + + /* Initialize the 8bpp graphics */ + gfx_Begin(); + gfx_FillScreen(gfx_black); + + /* Setup the colors */ + gfx_SetColor(gfx_white); + gfx_SetTextFGColor(gfx_red); + + /* Set the transparent text background color */ + gfx_SetTextBGColor(TRANSPARENT_COLOR); + gfx_SetTextTransparentColor(TRANSPARENT_COLOR); + + /* Print some scaled font */ + gfx_SetTextScale(2, 2); + gfx_PrintStringXY("This text is SCALED!!", 15, 10); + + /* Wait for a key before continuing */ + while (!os_GetCSC()); + + /* Configure the font to normal size, clipped, and monospaced */ + gfx_SetTextScale(1, 1); + gfx_SetTextConfig(gfx_text_clip); + gfx_SetMonospaceFont(FONT_WIDTH); + + /* Graphics routines draw to the back buffer */ + gfx_SetDrawBuffer(); + + /* Run until the [ENTER] key is pressed */ + do { + /* Check if any keys are pressed */ + if (key == sk_Left) { x--; } + if (key == sk_Right) { x++; } + if (key == sk_Down) { y++; } + if (key == sk_Up) { y--; } + if (key) { + gfx_SetClipRegion((LCD_WIDTH/2) - box_scale, (LCD_HEIGHT/2) - box_scale, (LCD_WIDTH/2) + box_scale, (LCD_HEIGHT/2) + box_scale); + + gfx_FillScreen(gfx_black); + gfx_PrintStringXY("FUN WITH CLIPPING", x, y); + + /* Draw a rectangle on the edges of the clipping region so we can see it */ + gfx_Rectangle_NoClip((LCD_WIDTH/2) - box_scale, (LCD_HEIGHT/2) - box_scale, box_scale * 2, box_scale * 2); + + /* Change the clipping region */ + box_scale += box_stride; + + /* Check if we should increase or decrease the clip region */ + if (box_scale > 100 || box_scale < 10) { + box_stride = -box_stride; + } + + /* Move the graphics so the user can see it */ + gfx_SwapDraw(); + } + } while ((key = os_GetCSC()) != sk_Enter); + + /* Usual cleanup */ + gfx_End(); +} diff --git a/frontends/calculator/CEdev/examples/gfx_floodfill/autotester.json b/frontends/calculator/CEdev/examples/gfx_floodfill/autotester.json index 01e94ee..0ffc0f3 100644 --- a/frontends/calculator/CEdev/examples/gfx_floodfill/autotester.json +++ b/frontends/calculator/CEdev/examples/gfx_floodfill/autotester.json @@ -1,36 +1,36 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "delay|300", - "hash|1", - "key|enter", - "delay|300", - "hash|2", - "delay|300", - "key|enter", - "delay|300" - ], - "hashes": { - "1": { - "description": "A black star outline is drawn to the screen", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "7EA01B1B" ] - }, - "2": { - "description": "The rest of the screen will be filled a solid black", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "4CECC590" ] - } - } -} - +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "delay|300", + "hash|1", + "key|enter", + "delay|300", + "hash|2", + "delay|300", + "key|enter", + "delay|300" + ], + "hashes": { + "1": { + "description": "A black star outline is drawn to the screen", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "7EA01B1B" ] + }, + "2": { + "description": "The rest of the screen will be filled a solid black", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "4CECC590" ] + } + } +} + diff --git a/frontends/calculator/CEdev/examples/gfx_floodfill/makefile b/frontends/calculator/CEdev/examples/gfx_floodfill/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/gfx_floodfill/makefile +++ b/frontends/calculator/CEdev/examples/gfx_floodfill/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/gfx_floodfill/readme.md b/frontends/calculator/CEdev/examples/gfx_floodfill/readme.md index e94fd0d..c535cd2 100644 --- a/frontends/calculator/CEdev/examples/gfx_floodfill/readme.md +++ b/frontends/calculator/CEdev/examples/gfx_floodfill/readme.md @@ -1,10 +1,10 @@ -### GraphX Flood Fill Demo - -This example demonstrates using the flood fill algorithim implemented in GraphX - -![Screenshot](screenshot.gif) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### GraphX Flood Fill Demo + +This example demonstrates using the flood fill algorithim implemented in GraphX + +![Screenshot](screenshot.gif) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/gfx_floodfill/src/main.c b/frontends/calculator/CEdev/examples/gfx_floodfill/src/main.c index 31a2090..a282527 100644 --- a/frontends/calculator/CEdev/examples/gfx_floodfill/src/main.c +++ b/frontends/calculator/CEdev/examples/gfx_floodfill/src/main.c @@ -1,50 +1,50 @@ -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -void main(void) { - int pts[10], i; - - int rx = 100; - int ry = 100; - int cx = LCD_WIDTH / 2; - int cy = LCD_HEIGHT / 2; - - /* Build the coordinates of the polygon */ - double theta = -M_PI / 2; - double dtheta = 4 * M_PI / 5; - for (i = 0; i < 10; i += 2) { - pts[i+0] = (int)(cx + rx * cos(theta)), - pts[i+1] = (int)(cy + ry * sin(theta)); - theta += dtheta; - } - - /* Initialize the 8bpp graphics */ - gfx_Begin(); - - /* Set up the palette */ - gfx_SetColor(gfx_black); - - /* Draw a polygon on the buffer */ - gfx_Polygon(pts, 5); - - /* Pause */ - while (!os_GetCSC()); - - /* Flood fill the rest of the screen */ - gfx_FloodFill(0, 0, 0); - - /* Pause */ - while (!os_GetCSC()); - - /* Close the graphics */ - gfx_End(); -} +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +void main(void) { + int pts[10], i; + + int rx = 100; + int ry = 100; + int cx = LCD_WIDTH / 2; + int cy = LCD_HEIGHT / 2; + + /* Build the coordinates of the polygon */ + double theta = -M_PI / 2; + double dtheta = 4 * M_PI / 5; + for (i = 0; i < 10; i += 2) { + pts[i+0] = (int)(cx + rx * cos(theta)), + pts[i+1] = (int)(cy + ry * sin(theta)); + theta += dtheta; + } + + /* Initialize the 8bpp graphics */ + gfx_Begin(); + + /* Set up the palette */ + gfx_SetColor(gfx_black); + + /* Draw a polygon on the buffer */ + gfx_Polygon(pts, 5); + + /* Pause */ + while (!os_GetCSC()); + + /* Flood fill the rest of the screen */ + gfx_FloodFill(0, 0, 0); + + /* Pause */ + while (!os_GetCSC()); + + /* Close the graphics */ + gfx_End(); +} diff --git a/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/autotester.json b/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/autotester.json index 3b57eb8..3d681be 100644 --- a/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/autotester.json +++ b/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/autotester.json @@ -1,31 +1,31 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp", - "src/gfx/var_gfx.8xv" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "hashWait|1", - "key|enter", - "hashWait|2" - ], - "hashes": { - "1": { - "description": "Fullscreen tiled image", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "2846A371" ] - }, - "2": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44", "43BF8092", "5ACF1C01" ] - } - } -} +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp", + "src/gfx/var_gfx.8xv" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "hashWait|1", + "key|enter", + "hashWait|2" + ], + "hashes": { + "1": { + "description": "Fullscreen tiled image", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "2846A371" ] + }, + "2": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44", "43BF8092", "5ACF1C01" ] + } + } +} diff --git a/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/makefile b/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/makefile +++ b/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/readme.md b/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/readme.md index c656e6d..8a20747 100644 --- a/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/readme.md +++ b/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/readme.md @@ -1,9 +1,9 @@ -### GraphX Fullscreen Image Demo - -An example of a compressed tiled image to construct a fullscreen image. - -![Screenshot](screenshot.png) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. +### GraphX Fullscreen Image Demo + +An example of a compressed tiled image to construct a fullscreen image. + +![Screenshot](screenshot.png) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. diff --git a/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/gfx/convpng.ini b/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/gfx/convpng.ini index 3c282fe..254b4e1 100644 --- a/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/gfx/convpng.ini +++ b/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/gfx/convpng.ini @@ -1,15 +1,15 @@ -// Appvar to place all graphics in - -#AppvarC : var_gfx -#OutputPalettes : tiles_gfx -#PNGImages : - tileset - -// The compressed group for the tileset - -#GroupC : tiles_gfx -#Tilemap : 80,80,true -#Compression : zx7 -#PNGImages : - tileset - +// Appvar to place all graphics in + +#AppvarC : var_gfx +#OutputPalettes : tiles_gfx +#PNGImages : + tileset + +// The compressed group for the tileset + +#GroupC : tiles_gfx +#Tilemap : 80,80,true +#Compression : zx7 +#PNGImages : + tileset + diff --git a/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/gfx/tiles_gfx.c b/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/gfx/tiles_gfx.c index 7243683..c1c9573 100644 --- a/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/gfx/tiles_gfx.c +++ b/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/gfx/tiles_gfx.c @@ -1,4 +1,4 @@ -// convpng -#include -#include "tiles_gfx.h" - +// convpng +#include +#include "tiles_gfx.h" + diff --git a/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/gfx/tiles_gfx.h b/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/gfx/tiles_gfx.h index 1ae708a..edc49ad 100644 --- a/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/gfx/tiles_gfx.h +++ b/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/gfx/tiles_gfx.h @@ -1,8 +1,8 @@ -// convpng -// this file contains all the graphics sources for easy inclusion in a project -#ifndef __tiles_gfx__ -#define __tiles_gfx__ -#include - - -#endif +// convpng +// this file contains all the graphics sources for easy inclusion in a project +#ifndef __tiles_gfx__ +#define __tiles_gfx__ +#include + + +#endif diff --git a/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/gfx/tileset.c b/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/gfx/tileset.c index ff03cd2..e558c26 100644 --- a/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/gfx/tileset.c +++ b/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/gfx/tileset.c @@ -1,18 +1,18 @@ -// convpng -#include -#include "tiles_gfx.h" - -uint8_t *tileset_tiles_compressed[12] = { - (uint8_t*)0, - (uint8_t*)3752, - (uint8_t*)7872, - (uint8_t*)12183, - (uint8_t*)15527, - (uint8_t*)20894, - (uint8_t*)25809, - (uint8_t*)30646, - (uint8_t*)35982, - (uint8_t*)41664, - (uint8_t*)46419, - (uint8_t*)50679, -}; +// convpng +#include +#include "tiles_gfx.h" + +uint8_t *tileset_tiles_compressed[12] = { + (uint8_t*)0, + (uint8_t*)3752, + (uint8_t*)7872, + (uint8_t*)12183, + (uint8_t*)15527, + (uint8_t*)20894, + (uint8_t*)25809, + (uint8_t*)30646, + (uint8_t*)35982, + (uint8_t*)41664, + (uint8_t*)46419, + (uint8_t*)50679, +}; diff --git a/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/gfx/var_gfx.c b/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/gfx/var_gfx.c index 6de6afa..3f115b0 100644 --- a/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/gfx/var_gfx.c +++ b/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/gfx/var_gfx.c @@ -1,31 +1,31 @@ -// convpng -#include -#include "var_gfx.h" - -#include -uint8_t *var_gfx[2] = { - (uint8_t*)0, - (uint8_t*)55530, -}; - -bool var_gfx_init(void) { - unsigned int data, i; - ti_var_t appvar; - - ti_CloseAll(); - - appvar = ti_Open("var_gfx", "r"); - data = (unsigned int)ti_GetDataPtr(appvar) - (unsigned int)var_gfx[0]; - for (i = 0; i < var_gfx_num; i++) { - var_gfx[i] += data; - } - - ti_CloseAll(); - - data = (unsigned int)var_gfx[0] - (unsigned int)tileset_tiles_compressed[0]; - for (i = 0; i < tileset_tiles_num; i++) { - tileset_tiles_compressed[i] += data; - } - - return (bool)appvar; -} +// convpng +#include +#include "var_gfx.h" + +#include +uint8_t *var_gfx[2] = { + (uint8_t*)0, + (uint8_t*)55530, +}; + +bool var_gfx_init(void) { + unsigned int data, i; + ti_var_t appvar; + + ti_CloseAll(); + + appvar = ti_Open("var_gfx", "r"); + data = (unsigned int)ti_GetDataPtr(appvar) - (unsigned int)var_gfx[0]; + for (i = 0; i < var_gfx_num; i++) { + var_gfx[i] += data; + } + + ti_CloseAll(); + + data = (unsigned int)var_gfx[0] - (unsigned int)tileset_tiles_compressed[0]; + for (i = 0; i < tileset_tiles_num; i++) { + tileset_tiles_compressed[i] += data; + } + + return (bool)appvar; +} diff --git a/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/gfx/var_gfx.h b/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/gfx/var_gfx.h index 23b61b1..c03c0ff 100644 --- a/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/gfx/var_gfx.h +++ b/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/gfx/var_gfx.h @@ -1,31 +1,31 @@ -// convpng -// this file contains all the graphics sources for easy inclusion in a project -#ifndef __var_gfx__ -#define __var_gfx__ -#include - -#include - -#define var_gfx_num 2 - -extern uint8_t *var_gfx[2]; -#define tileset_compressed ((gfx_sprite_t*)var_gfx[0]) -#define tileset_tiles_num 12 -extern uint8_t *tileset_tiles_compressed[12]; -#define tileset_tile_0_compressed ((gfx_sprite_t*)tileset_tiles_compressed[0]) -#define tileset_tile_1_compressed ((gfx_sprite_t*)tileset_tiles_compressed[1]) -#define tileset_tile_2_compressed ((gfx_sprite_t*)tileset_tiles_compressed[2]) -#define tileset_tile_3_compressed ((gfx_sprite_t*)tileset_tiles_compressed[3]) -#define tileset_tile_4_compressed ((gfx_sprite_t*)tileset_tiles_compressed[4]) -#define tileset_tile_5_compressed ((gfx_sprite_t*)tileset_tiles_compressed[5]) -#define tileset_tile_6_compressed ((gfx_sprite_t*)tileset_tiles_compressed[6]) -#define tileset_tile_7_compressed ((gfx_sprite_t*)tileset_tiles_compressed[7]) -#define tileset_tile_8_compressed ((gfx_sprite_t*)tileset_tiles_compressed[8]) -#define tileset_tile_9_compressed ((gfx_sprite_t*)tileset_tiles_compressed[9]) -#define tileset_tile_10_compressed ((gfx_sprite_t*)tileset_tiles_compressed[10]) -#define tileset_tile_11_compressed ((gfx_sprite_t*)tileset_tiles_compressed[11]) -#define sizeof_tiles_gfx_pal 512 -#define tiles_gfx_pal ((uint16_t*)var_gfx[1]) -bool var_gfx_init(void); - -#endif +// convpng +// this file contains all the graphics sources for easy inclusion in a project +#ifndef __var_gfx__ +#define __var_gfx__ +#include + +#include + +#define var_gfx_num 2 + +extern uint8_t *var_gfx[2]; +#define tileset_compressed ((gfx_sprite_t*)var_gfx[0]) +#define tileset_tiles_num 12 +extern uint8_t *tileset_tiles_compressed[12]; +#define tileset_tile_0_compressed ((gfx_sprite_t*)tileset_tiles_compressed[0]) +#define tileset_tile_1_compressed ((gfx_sprite_t*)tileset_tiles_compressed[1]) +#define tileset_tile_2_compressed ((gfx_sprite_t*)tileset_tiles_compressed[2]) +#define tileset_tile_3_compressed ((gfx_sprite_t*)tileset_tiles_compressed[3]) +#define tileset_tile_4_compressed ((gfx_sprite_t*)tileset_tiles_compressed[4]) +#define tileset_tile_5_compressed ((gfx_sprite_t*)tileset_tiles_compressed[5]) +#define tileset_tile_6_compressed ((gfx_sprite_t*)tileset_tiles_compressed[6]) +#define tileset_tile_7_compressed ((gfx_sprite_t*)tileset_tiles_compressed[7]) +#define tileset_tile_8_compressed ((gfx_sprite_t*)tileset_tiles_compressed[8]) +#define tileset_tile_9_compressed ((gfx_sprite_t*)tileset_tiles_compressed[9]) +#define tileset_tile_10_compressed ((gfx_sprite_t*)tileset_tiles_compressed[10]) +#define tileset_tile_11_compressed ((gfx_sprite_t*)tileset_tiles_compressed[11]) +#define sizeof_tiles_gfx_pal 512 +#define tiles_gfx_pal ((uint16_t*)var_gfx[1]) +bool var_gfx_init(void); + +#endif diff --git a/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/main.c b/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/main.c index 1ed734b..2aba306 100644 --- a/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/main.c +++ b/frontends/calculator/CEdev/examples/gfx_fullscreen_tiled_image/src/main.c @@ -1,66 +1,66 @@ -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -/* Include the graphics */ -#include "gfx/tiles_gfx.h" -#include "gfx/var_gfx.h" - -/* Include the external map data */ -extern uint8_t tilemap_map[]; - -#define TILE_WIDTH 80 -#define TILE_HEIGHT 80 - -void main(void) { - unsigned int i; - unsigned int x, y; - gfx_sprite_t *tile; - - tile = gfx_MallocSprite(TILE_WIDTH, TILE_HEIGHT); - - /* Initialize the graphics */ - if (!var_gfx_init()) { - return; - } - - /* Start the graphics */ - gfx_Begin(); - x = y = i = 0; - - /* Draw offscreen */ - gfx_SetDrawBuffer(); - - /* Decompress the tiles */ - for (; i < tileset_tiles_num; i++) { - zx7_Decompress(tile, tileset_tiles_compressed[i]); - gfx_Sprite_NoClip(tile, x, y); - x += TILE_WIDTH; - if (x >= LCD_WIDTH) { - y += TILE_HEIGHT; - x = 0; - } - } - - /* Copy to visible screen */ - gfx_SetPalette(tiles_gfx_pal, sizeof_tiles_gfx_pal, 0); - gfx_BlitBuffer(); - - /* Wait for a key */ - while (!os_GetCSC()); - - /* Close the graphics and return to the OS */ - gfx_End(); - - /* Free the earlier allocation */ - free(tile); -} +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +/* Include the graphics */ +#include "gfx/tiles_gfx.h" +#include "gfx/var_gfx.h" + +/* Include the external map data */ +extern uint8_t tilemap_map[]; + +#define TILE_WIDTH 80 +#define TILE_HEIGHT 80 + +void main(void) { + unsigned int i; + unsigned int x, y; + gfx_sprite_t *tile; + + tile = gfx_MallocSprite(TILE_WIDTH, TILE_HEIGHT); + + /* Initialize the graphics */ + if (!var_gfx_init()) { + return; + } + + /* Start the graphics */ + gfx_Begin(); + x = y = i = 0; + + /* Draw offscreen */ + gfx_SetDrawBuffer(); + + /* Decompress the tiles */ + for (; i < tileset_tiles_num; i++) { + zx7_Decompress(tile, tileset_tiles_compressed[i]); + gfx_Sprite_NoClip(tile, x, y); + x += TILE_WIDTH; + if (x >= LCD_WIDTH) { + y += TILE_HEIGHT; + x = 0; + } + } + + /* Copy to visible screen */ + gfx_SetPalette(tiles_gfx_pal, sizeof_tiles_gfx_pal, 0); + gfx_BlitBuffer(); + + /* Wait for a key */ + while (!os_GetCSC()); + + /* Close the graphics and return to the OS */ + gfx_End(); + + /* Free the earlier allocation */ + free(tile); +} diff --git a/frontends/calculator/CEdev/examples/gfx_hello_world/autotester.json b/frontends/calculator/CEdev/examples/gfx_hello_world/autotester.json index 2e8ca49..fd4b55e 100644 --- a/frontends/calculator/CEdev/examples/gfx_hello_world/autotester.json +++ b/frontends/calculator/CEdev/examples/gfx_hello_world/autotester.json @@ -1,40 +1,40 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "delay|300", - "hash|1", - "hash|2", - "key|enter", - "delay|300", - "hashWait|3" - ], - "hashes": { - "1": { - "description": "The background will be black (check a part before the text)", - "start": "vram_start", - "size": "0x4000", - "expected_CRCs": [ "94640B85" ] - }, - "2": { - "description": "The background will be black (check a part after the text)", - "start": "0xD4EC00", - "size": "0x4000", - "expected_CRCs": [ "94640B85" ] - }, - "3": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} - +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "delay|300", + "hash|1", + "hash|2", + "key|enter", + "delay|300", + "hashWait|3" + ], + "hashes": { + "1": { + "description": "The background will be black (check a part before the text)", + "start": "vram_start", + "size": "0x4000", + "expected_CRCs": [ "94640B85" ] + }, + "2": { + "description": "The background will be black (check a part after the text)", + "start": "0xD4EC00", + "size": "0x4000", + "expected_CRCs": [ "94640B85" ] + }, + "3": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} + diff --git a/frontends/calculator/CEdev/examples/gfx_hello_world/makefile b/frontends/calculator/CEdev/examples/gfx_hello_world/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/gfx_hello_world/makefile +++ b/frontends/calculator/CEdev/examples/gfx_hello_world/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/gfx_hello_world/readme.md b/frontends/calculator/CEdev/examples/gfx_hello_world/readme.md index 24fed5e..51ad44a 100644 --- a/frontends/calculator/CEdev/examples/gfx_hello_world/readme.md +++ b/frontends/calculator/CEdev/examples/gfx_hello_world/readme.md @@ -1,10 +1,10 @@ -### GraphX Hello World Demo - -This example of the graphics library demostrates filling the screen black and then printing `Hello World!` centered on the screen. - -![Screenshot](screenshot.png) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### GraphX Hello World Demo + +This example of the graphics library demostrates filling the screen black and then printing `Hello World!` centered on the screen. + +![Screenshot](screenshot.png) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/gfx_hello_world/src/main.c b/frontends/calculator/CEdev/examples/gfx_hello_world/src/main.c index 852120e..3843dca 100644 --- a/frontends/calculator/CEdev/examples/gfx_hello_world/src/main.c +++ b/frontends/calculator/CEdev/examples/gfx_hello_world/src/main.c @@ -1,46 +1,46 @@ -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -#define FONT_HEIGHT 8 - -/* Function prototypes */ -void print_string_centered(const char *str); - -void main(void) { - const char *msg = "Hello World!"; - - /* Seed the random numbers */ - srand(rtc_Time()); - - /* Initialize the 8bpp graphics */ - gfx_Begin(); - - /* Fill the screen black */ - gfx_FillScreen(gfx_black); - - /* Set the random text color */ - gfx_SetTextFGColor(randInt(1, 255)); - - /* Print the message on the screen */ - print_string_centered(msg); - - /* Wait for a key to be pressed */ - while (!os_GetCSC()); - - /* Close the graphics */ - gfx_End(); -} - -/* Prints a screen centered string */ -void print_string_centered(const char *str) { - gfx_PrintStringXY(str, (LCD_WIDTH - gfx_GetStringWidth(str)) / 2, (LCD_HEIGHT - FONT_HEIGHT) / 2); -} +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#define FONT_HEIGHT 8 + +/* Function prototypes */ +void print_string_centered(const char *str); + +void main(void) { + const char *msg = "Hello World!"; + + /* Seed the random numbers */ + srand(rtc_Time()); + + /* Initialize the 8bpp graphics */ + gfx_Begin(); + + /* Fill the screen black */ + gfx_FillScreen(gfx_black); + + /* Set the random text color */ + gfx_SetTextFGColor(randInt(1, 255)); + + /* Print the message on the screen */ + print_string_centered(msg); + + /* Wait for a key to be pressed */ + while (!os_GetCSC()); + + /* Close the graphics */ + gfx_End(); +} + +/* Prints a screen centered string */ +void print_string_centered(const char *str) { + gfx_PrintStringXY(str, (LCD_WIDTH - gfx_GetStringWidth(str)) / 2, (LCD_HEIGHT - FONT_HEIGHT) / 2); +} diff --git a/frontends/calculator/CEdev/examples/gfx_light_dark/autotester.json b/frontends/calculator/CEdev/examples/gfx_light_dark/autotester.json index 772c268..f1a5915 100644 --- a/frontends/calculator/CEdev/examples/gfx_light_dark/autotester.json +++ b/frontends/calculator/CEdev/examples/gfx_light_dark/autotester.json @@ -1,63 +1,63 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", "delay|300", "hash|rectangles", "hash|palette_0", - "key|enter", "delay|1000", "hash|palette_25", - "key|enter", "delay|1000", "hash|palette_50", - "key|enter", "delay|1000", "hash|palette_75", - "key|enter", "delay|1000", "hash|palette_100", - "key|enter", "delay|300", "hash|after_exit" - ], - "hashes": { - "rectangles": { - "description": "Test rectangles", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "328D511E" ] - }, - "palette_0": { - "description": "Test lighten/darken fade, 0% progress", - "start": "lcdPalette", - "size": "8", - "expected_CRCs": [ "41C3BFF8" ] - }, - "palette_25": { - "description": "Test lighten/darken fade, 25% progress", - "start": "lcdPalette", - "size": "8", - "expected_CRCs": [ "5F64F889" ] - }, - "palette_50": { - "description": "Test lighten/darken fade, 50% progress", - "start": "lcdPalette", - "size": "8", - "expected_CRCs": [ "C48CEF7C" ] - }, - "palette_75": { - "description": "Test lighten/darken fade, 75% progress", - "start": "lcdPalette", - "size": "8", - "expected_CRCs": [ "81FEDD4E" ] - }, - "palette_100": { - "description": "Test lighten/darken fade, 100% progress", - "start": "lcdPalette", - "size": "8", - "expected_CRCs": [ "B451E096" ] - }, - "after_exit": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5" ] - } - } -} - +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", "delay|300", "hash|rectangles", "hash|palette_0", + "key|enter", "delay|1000", "hash|palette_25", + "key|enter", "delay|1000", "hash|palette_50", + "key|enter", "delay|1000", "hash|palette_75", + "key|enter", "delay|1000", "hash|palette_100", + "key|enter", "delay|300", "hash|after_exit" + ], + "hashes": { + "rectangles": { + "description": "Test rectangles", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "328D511E" ] + }, + "palette_0": { + "description": "Test lighten/darken fade, 0% progress", + "start": "lcdPalette", + "size": "8", + "expected_CRCs": [ "41C3BFF8" ] + }, + "palette_25": { + "description": "Test lighten/darken fade, 25% progress", + "start": "lcdPalette", + "size": "8", + "expected_CRCs": [ "5F64F889" ] + }, + "palette_50": { + "description": "Test lighten/darken fade, 50% progress", + "start": "lcdPalette", + "size": "8", + "expected_CRCs": [ "C48CEF7C" ] + }, + "palette_75": { + "description": "Test lighten/darken fade, 75% progress", + "start": "lcdPalette", + "size": "8", + "expected_CRCs": [ "81FEDD4E" ] + }, + "palette_100": { + "description": "Test lighten/darken fade, 100% progress", + "start": "lcdPalette", + "size": "8", + "expected_CRCs": [ "B451E096" ] + }, + "after_exit": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5" ] + } + } +} + diff --git a/frontends/calculator/CEdev/examples/gfx_light_dark/makefile b/frontends/calculator/CEdev/examples/gfx_light_dark/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/gfx_light_dark/makefile +++ b/frontends/calculator/CEdev/examples/gfx_light_dark/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/gfx_light_dark/readme.md b/frontends/calculator/CEdev/examples/gfx_light_dark/readme.md index e429c6c..238c3e3 100644 --- a/frontends/calculator/CEdev/examples/gfx_light_dark/readme.md +++ b/frontends/calculator/CEdev/examples/gfx_light_dark/readme.md @@ -1,10 +1,10 @@ -### GraphX Lighten and Darken Demo - -Demonstrates rectangle drawing and using gfx_Darken and gfx_Lighten to modify colors in the palette to implement fade effects. - -![Screenshot](screenshot.gif) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### GraphX Lighten and Darken Demo + +Demonstrates rectangle drawing and using gfx_Darken and gfx_Lighten to modify colors in the palette to implement fade effects. + +![Screenshot](screenshot.gif) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/gfx_light_dark/src/main.c b/frontends/calculator/CEdev/examples/gfx_light_dark/src/main.c index d4c0a06..4f2e4d1 100644 --- a/frontends/calculator/CEdev/examples/gfx_light_dark/src/main.c +++ b/frontends/calculator/CEdev/examples/gfx_light_dark/src/main.c @@ -1,59 +1,59 @@ -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -#define color gfx_RGBTo1555(34, 55, 89) - -void main(void) { - uint8_t i = 0; - - /* Initialize the 8bpp graphics */ - gfx_Begin(); - - /* For i in 0..255 */ - do { - - /* Fade out to black */ - gfx_palette[0] = gfx_Darken(color, i); - /* Fade in from black */ - gfx_palette[1] = gfx_Darken(color, ~i); - /* Fade in from white */ - gfx_palette[3] = gfx_Lighten(color, ~i); - /* Fade out to white */ - gfx_palette[2] = gfx_Lighten(color, i); - - /* Fade out to black */ - gfx_SetColor(0); - gfx_FillRectangle_NoClip(0, 0, 160, 120); - /* Fade in from black */ - gfx_SetColor(1); - gfx_FillRectangle_NoClip(160, 0, 160, 120); - /* Fade in from white */ - gfx_SetColor(2); - gfx_FillRectangle_NoClip(0, 120, 160, 120); - /* Fade out to white */ - gfx_SetColor(3); - gfx_FillRectangle_NoClip(160, 120, 160, 120); - - /* Wait for a keypress at the start of each quarter of the fade */ - if (!(i & 0x3f)) { - while (!os_GetCSC()); - } - - /* Loop until i is 0 again because of 8 bit range */ - } while (++i); - - /* Wait for a keypress */ - while (!os_GetCSC()); - - /* Usual cleanup */ - gfx_End(); -} +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#define color gfx_RGBTo1555(34, 55, 89) + +void main(void) { + uint8_t i = 0; + + /* Initialize the 8bpp graphics */ + gfx_Begin(); + + /* For i in 0..255 */ + do { + + /* Fade out to black */ + gfx_palette[0] = gfx_Darken(color, i); + /* Fade in from black */ + gfx_palette[1] = gfx_Darken(color, ~i); + /* Fade in from white */ + gfx_palette[3] = gfx_Lighten(color, ~i); + /* Fade out to white */ + gfx_palette[2] = gfx_Lighten(color, i); + + /* Fade out to black */ + gfx_SetColor(0); + gfx_FillRectangle_NoClip(0, 0, 160, 120); + /* Fade in from black */ + gfx_SetColor(1); + gfx_FillRectangle_NoClip(160, 0, 160, 120); + /* Fade in from white */ + gfx_SetColor(2); + gfx_FillRectangle_NoClip(0, 120, 160, 120); + /* Fade out to white */ + gfx_SetColor(3); + gfx_FillRectangle_NoClip(160, 120, 160, 120); + + /* Wait for a keypress at the start of each quarter of the fade */ + if (!(i & 0x3f)) { + while (!os_GetCSC()); + } + + /* Loop until i is 0 again because of 8 bit range */ + } while (++i); + + /* Wait for a keypress */ + while (!os_GetCSC()); + + /* Usual cleanup */ + gfx_End(); +} diff --git a/frontends/calculator/CEdev/examples/gfx_rletsprite/autotester.json b/frontends/calculator/CEdev/examples/gfx_rletsprite/autotester.json index 8093b64..e35c63f 100644 --- a/frontends/calculator/CEdev/examples/gfx_rletsprite/autotester.json +++ b/frontends/calculator/CEdev/examples/gfx_rletsprite/autotester.json @@ -1,30 +1,30 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "hashWait|1", - "key|enter", - "hashWait|2" - ], - "hashes": { - "1": { - "description": "Make sure the sprites are displayed properly", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "4F8D6CB" ] - }, - "2": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "hashWait|1", + "key|enter", + "hashWait|2" + ], + "hashes": { + "1": { + "description": "Make sure the sprites are displayed properly", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "4F8D6CB" ] + }, + "2": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} diff --git a/frontends/calculator/CEdev/examples/gfx_rletsprite/makefile b/frontends/calculator/CEdev/examples/gfx_rletsprite/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/gfx_rletsprite/makefile +++ b/frontends/calculator/CEdev/examples/gfx_rletsprite/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/gfx_rletsprite/readme.md b/frontends/calculator/CEdev/examples/gfx_rletsprite/readme.md index b0c8df7..c919f67 100644 --- a/frontends/calculator/CEdev/examples/gfx_rletsprite/readme.md +++ b/frontends/calculator/CEdev/examples/gfx_rletsprite/readme.md @@ -1,10 +1,10 @@ -### GraphX RLETSprite Demo - -Draws a sprite with RLE transparency in many clipping scenarios and converts to -and from a normal sprite with transparency. Created for testing. - -![Screenshot](screenshot.png) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. +### GraphX RLETSprite Demo + +Draws a sprite with RLE transparency in many clipping scenarios and converts to +and from a normal sprite with transparency. Created for testing. + +![Screenshot](screenshot.png) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. diff --git a/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/convpng.ini b/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/convpng.ini index bac699c..369e17a 100644 --- a/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/convpng.ini +++ b/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/convpng.ini @@ -1,5 +1,5 @@ -#GroupC : logo_gfx -#Style : rlet -#TransparentColor : 255,255,255 -#PNGImages : - ubuntu +#GroupC : logo_gfx +#Style : rlet +#TransparentColor : 255,255,255 +#PNGImages : + ubuntu diff --git a/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/logo_gfx.c b/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/logo_gfx.c index 894a456..1fbc912 100644 --- a/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/logo_gfx.c +++ b/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/logo_gfx.c @@ -1,203 +1,203 @@ -// convpng -#include -#include "logo_gfx.h" - -uint16_t logo_gfx_pal[197] = { - 0xFFFF, // 00 :: rgb(255,255,255) - 0x7C00, // 01 :: rgb(255,0,0) - 0x6800, // 02 :: rgb(212,2,2) - 0xE821, // 03 :: rgb(213,11,11) - 0xFFE0, // 04 :: rgb(255,255,0) - 0x83E0, // 05 :: rgb(0,255,0) - 0x001F, // 06 :: rgb(0,0,255) - 0x7E20, // 07 :: rgb(251,139,0) - 0x7920, // 08 :: rgb(244,72,0) - 0xFFFF, // 09 :: rgb(255,254,254) - 0x7E20, // 10 :: rgb(251,139,2) - 0x7E20, // 11 :: rgb(251,139,1) - 0xFFFF, // 12 :: rgb(255,253,253) - 0xFE20, // 13 :: rgb(251,140,4) - 0xFFFF, // 14 :: rgb(255,254,253) - 0xFECC, // 15 :: rgb(252,182,97) - 0x7A90, // 16 :: rgb(249,163,128) - 0x7FDC, // 17 :: rgb(254,244,231) - 0xF985, // 18 :: rgb(245,100,40) - 0x7F9A, // 19 :: rgb(253,225,213) - 0x7FDD, // 20 :: rgb(253,242,242) - 0x6D6B, // 21 :: rgb(226,90,90) - 0xFFBC, // 22 :: rgb(254,239,233) - 0xF921, // 23 :: rgb(244,77,7) - 0x7EED, // 24 :: rgb(252,187,107) - 0xFF99, // 25 :: rgb(254,231,203) - 0xFFFE, // 26 :: rgb(255,253,250) - 0xFF16, // 27 :: rgb(251,199,177) - 0xF921, // 28 :: rgb(244,78,8) - 0x7F31, // 29 :: rgb(253,204,143) - 0x7FDD, // 30 :: rgb(252,241,241) - 0xF18C, // 31 :: rgb(229,102,102) - 0x7B5A, // 32 :: rgb(247,212,212) - 0xFF76, // 33 :: rgb(253,221,181) - 0xF652, // 34 :: rgb(237,151,151) - 0x7652, // 35 :: rgb(236,145,145) - 0xE800, // 36 :: rgb(212,3,3) - 0x718C, // 37 :: rgb(228,98,98) - 0xFF54, // 38 :: rgb(253,214,165) - 0x7673, // 39 :: rgb(237,153,153) - 0xFF32, // 40 :: rgb(252,205,148) - 0x7EA8, // 41 :: rgb(251,169,68) - 0x6CC6, // 42 :: rgb(219,48,48) - 0x7FBA, // 43 :: rgb(254,234,211) - 0xE842, // 44 :: rgb(215,20,20) - 0xFB7B, // 45 :: rgb(250,224,224) - 0xFF77, // 46 :: rgb(253,224,187) - 0xF652, // 47 :: rgb(237,149,149) - 0x7F75, // 48 :: rgb(253,218,175) - 0x7FFE, // 49 :: rgb(254,249,249) - 0x7EEC, // 50 :: rgb(252,185,102) - 0x7FBD, // 51 :: rgb(252,236,236) - 0xFFFF, // 52 :: rgb(255,253,251) - 0x7EED, // 53 :: rgb(252,188,109) - 0x7FFF, // 54 :: rgb(254,252,252) - 0xFAF7, // 55 :: rgb(243,189,189) - 0x7B9B, // 56 :: rgb(250,225,225) - 0xFE87, // 57 :: rgb(251,164,56) - 0x7AD2, // 58 :: rgb(250,179,149) - 0xED09, // 59 :: rgb(224,70,70) - 0xECA5, // 60 :: rgb(218,43,43) - 0xFAF4, // 61 :: rgb(250,190,165) - 0x6D29, // 62 :: rgb(224,74,74) - 0x6D4A, // 63 :: rgb(225,82,82) - 0xED08, // 64 :: rgb(223,69,69) - 0x6D08, // 65 :: rgb(222,63,63) - 0x76D6, // 66 :: rgb(242,178,178) - 0xECC6, // 67 :: rgb(220,51,51) - 0xF1AD, // 68 :: rgb(229,109,109) - 0xFFDD, // 69 :: rgb(254,246,235) - 0x718C, // 70 :: rgb(228,97,97) - 0xFFBC, // 71 :: rgb(254,239,234) - 0xFF77, // 72 :: rgb(253,223,187) - 0x76D6, // 73 :: rgb(242,179,179) - 0x6863, // 74 :: rgb(216,26,26) - 0x7AB1, // 75 :: rgb(249,169,136) - 0xE843, // 76 :: rgb(215,21,21) - 0xFF9C, // 77 :: rgb(251,230,230) - 0xF9A6, // 78 :: rgb(245,108,51) - 0x7F97, // 79 :: rgb(253,225,189) - 0x7942, // 80 :: rgb(244,81,13) - 0x7FBA, // 81 :: rgb(254,236,215) - 0xFE21, // 82 :: rgb(251,143,11) - 0x7FBC, // 83 :: rgb(251,234,234) - 0xFB18, // 84 :: rgb(245,197,197) - 0x76D6, // 85 :: rgb(242,177,177) - 0x71AD, // 86 :: rgb(229,106,106) - 0xFAB2, // 87 :: rgb(249,176,144) - 0x7F9A, // 88 :: rgb(253,227,217) - 0x7FDD, // 89 :: rgb(254,242,237) - 0x7FDE, // 90 :: rgb(253,243,243) - 0x7AB1, // 91 :: rgb(249,171,139) - 0xFFBB, // 92 :: rgb(254,239,221) - 0xF694, // 93 :: rgb(240,167,167) - 0xFE87, // 94 :: rgb(251,167,61) - 0xFF7A, // 95 :: rgb(253,224,213) - 0x7F0E, // 96 :: rgb(253,193,117) - 0xFA6F, // 97 :: rgb(249,159,121) - 0x7FFE, // 98 :: rgb(255,251,247) - 0xFEAA, // 99 :: rgb(251,175,80) - 0x7694, // 100 :: rgb(239,161,161) - 0x7AF3, // 101 :: rgb(250,186,160) - 0xE801, // 102 :: rgb(213,5,5) - 0xFA6F, // 103 :: rgb(249,159,122) - 0x7FDB, // 104 :: rgb(254,241,224) - 0xF920, // 105 :: rgb(244,75,4) - 0x7A8F, // 106 :: rgb(249,160,123) - 0x7694, // 107 :: rgb(239,163,163) - 0x7B7B, // 108 :: rgb(249,220,220) - 0xE822, // 109 :: rgb(214,14,14) - 0x6D29, // 110 :: rgb(223,71,71) - 0xFAF7, // 111 :: rgb(244,192,192) - 0xFF55, // 112 :: rgb(253,215,169) - 0x7A8F, // 113 :: rgb(249,161,124) - 0xFF32, // 114 :: rgb(253,207,151) - 0x7FBB, // 115 :: rgb(253,233,224) - 0xF694, // 116 :: rgb(239,165,165) - 0xFFBC, // 117 :: rgb(254,238,231) - 0xFB39, // 118 :: rgb(247,208,208) - 0x7B38, // 119 :: rgb(246,201,201) - 0x6842, // 120 :: rgb(214,16,16) - 0x7FFF, // 121 :: rgb(254,251,251) - 0xFB7B, // 122 :: rgb(250,223,223) - 0xF16C, // 123 :: rgb(227,95,95) - 0x7672, // 124 :: rgb(237,152,152) - 0x7631, // 125 :: rgb(235,138,138) - 0xFE87, // 126 :: rgb(251,165,60) - 0xFFDD, // 127 :: rgb(254,245,240) - 0xFF33, // 128 :: rgb(252,208,154) - 0x7F79, // 129 :: rgb(252,220,207) - 0x7E41, // 130 :: rgb(251,144,12) - 0x7E42, // 131 :: rgb(251,146,19) - 0x7F36, // 132 :: rgb(251,202,182) - 0x7FDC, // 133 :: rgb(254,243,230) - 0x7963, // 134 :: rgb(244,89,24) - 0x7F0E, // 135 :: rgb(252,193,119) - 0xFE87, // 136 :: rgb(251,164,57) - 0x7A2B, // 137 :: rgb(247,138,92) - 0xFA6E, // 138 :: rgb(249,157,119) - 0xFF9B, // 139 :: rgb(253,229,219) - 0x7920, // 140 :: rgb(244,74,3) - 0xFFDE, // 141 :: rgb(254,246,243) - 0xF964, // 142 :: rgb(245,95,32) - 0xF921, // 143 :: rgb(244,76,6) - 0xFAD3, // 144 :: rgb(250,183,155) - 0xFFBA, // 145 :: rgb(254,237,216) - 0xFAD3, // 146 :: rgb(250,182,154) - 0xF985, // 147 :: rgb(245,103,44) - 0x7FFE, // 148 :: rgb(255,252,250) - 0x7FFE, // 149 :: rgb(255,251,250) - 0x6800, // 150 :: rgb(212,1,1) - 0x7B18, // 151 :: rgb(245,195,195) - 0x7AD2, // 152 :: rgb(250,178,148) - 0x7ECB, // 153 :: rgb(251,179,87) - 0x7EA8, // 154 :: rgb(251,169,69) - 0xFEAA, // 155 :: rgb(251,176,82) - 0x7652, // 156 :: rgb(236,146,146) - 0xF942, // 157 :: rgb(244,83,16) - 0xF9E9, // 158 :: rgb(246,126,76) - 0xFFDD, // 159 :: rgb(254,246,242) - 0x71EF, // 160 :: rgb(231,120,120) - 0xFB39, // 161 :: rgb(247,206,206) - 0xFF37, // 162 :: rgb(252,208,190) - 0x6D08, // 163 :: rgb(222,65,65) - 0x7FDE, // 164 :: rgb(253,244,244) - 0x7A4D, // 165 :: rgb(248,147,106) - 0xFB5A, // 166 :: rgb(248,216,216) - 0x7F79, // 167 :: rgb(253,220,206) - 0xFAD3, // 168 :: rgb(250,181,153) - 0x7F15, // 169 :: rgb(251,196,173) - 0x7F31, // 170 :: rgb(252,201,137) - 0xF9C8, // 171 :: rgb(246,116,62) - 0xFAB2, // 172 :: rgb(250,176,145) - 0xFF10, // 173 :: rgb(252,198,131) - 0x7A6E, // 174 :: rgb(248,155,117) - 0xFF9B, // 175 :: rgb(253,232,224) - 0xFFBB, // 176 :: rgb(254,240,221) - 0x7920, // 177 :: rgb(244,74,2) - 0x7FDC, // 178 :: rgb(254,243,229) - 0xFE21, // 179 :: rgb(251,141,6) - 0x7F53, // 180 :: rgb(253,210,155) - 0xF9E9, // 181 :: rgb(247,127,77) - 0xFF58, // 182 :: rgb(252,213,197) - 0xFE87, // 183 :: rgb(251,164,58) - 0xFF54, // 184 :: rgb(253,213,164) - 0xFEA9, // 185 :: rgb(251,174,78) - 0xFE21, // 186 :: rgb(251,143,10) - 0x79E8, // 187 :: rgb(246,120,67) - 0x7E87, // 188 :: rgb(251,163,54) - 0xFFDD, // 189 :: rgb(254,248,240) - 0x7F57, // 190 :: rgb(252,210,193) - 0xFF76, // 191 :: rgb(253,222,183) - 0xC3E0, // 192 :: rgb(128,255,0) - 0x0210, // 193 :: rgb(0,128,128) - 0x7E00, // 194 :: rgb(255,128,0) - 0x4030, // 195 :: rgb(128,8,128) - 0x6800, // 196 :: rgb(212,0,0) +// convpng +#include +#include "logo_gfx.h" + +uint16_t logo_gfx_pal[197] = { + 0xFFFF, // 00 :: rgb(255,255,255) + 0x7C00, // 01 :: rgb(255,0,0) + 0x6800, // 02 :: rgb(212,2,2) + 0xE821, // 03 :: rgb(213,11,11) + 0xFFE0, // 04 :: rgb(255,255,0) + 0x83E0, // 05 :: rgb(0,255,0) + 0x001F, // 06 :: rgb(0,0,255) + 0x7E20, // 07 :: rgb(251,139,0) + 0x7920, // 08 :: rgb(244,72,0) + 0xFFFF, // 09 :: rgb(255,254,254) + 0x7E20, // 10 :: rgb(251,139,2) + 0x7E20, // 11 :: rgb(251,139,1) + 0xFFFF, // 12 :: rgb(255,253,253) + 0xFE20, // 13 :: rgb(251,140,4) + 0xFFFF, // 14 :: rgb(255,254,253) + 0xFECC, // 15 :: rgb(252,182,97) + 0x7A90, // 16 :: rgb(249,163,128) + 0x7FDC, // 17 :: rgb(254,244,231) + 0xF985, // 18 :: rgb(245,100,40) + 0x7F9A, // 19 :: rgb(253,225,213) + 0x7FDD, // 20 :: rgb(253,242,242) + 0x6D6B, // 21 :: rgb(226,90,90) + 0xFFBC, // 22 :: rgb(254,239,233) + 0xF921, // 23 :: rgb(244,77,7) + 0x7EED, // 24 :: rgb(252,187,107) + 0xFF99, // 25 :: rgb(254,231,203) + 0xFFFE, // 26 :: rgb(255,253,250) + 0xFF16, // 27 :: rgb(251,199,177) + 0xF921, // 28 :: rgb(244,78,8) + 0x7F31, // 29 :: rgb(253,204,143) + 0x7FDD, // 30 :: rgb(252,241,241) + 0xF18C, // 31 :: rgb(229,102,102) + 0x7B5A, // 32 :: rgb(247,212,212) + 0xFF76, // 33 :: rgb(253,221,181) + 0xF652, // 34 :: rgb(237,151,151) + 0x7652, // 35 :: rgb(236,145,145) + 0xE800, // 36 :: rgb(212,3,3) + 0x718C, // 37 :: rgb(228,98,98) + 0xFF54, // 38 :: rgb(253,214,165) + 0x7673, // 39 :: rgb(237,153,153) + 0xFF32, // 40 :: rgb(252,205,148) + 0x7EA8, // 41 :: rgb(251,169,68) + 0x6CC6, // 42 :: rgb(219,48,48) + 0x7FBA, // 43 :: rgb(254,234,211) + 0xE842, // 44 :: rgb(215,20,20) + 0xFB7B, // 45 :: rgb(250,224,224) + 0xFF77, // 46 :: rgb(253,224,187) + 0xF652, // 47 :: rgb(237,149,149) + 0x7F75, // 48 :: rgb(253,218,175) + 0x7FFE, // 49 :: rgb(254,249,249) + 0x7EEC, // 50 :: rgb(252,185,102) + 0x7FBD, // 51 :: rgb(252,236,236) + 0xFFFF, // 52 :: rgb(255,253,251) + 0x7EED, // 53 :: rgb(252,188,109) + 0x7FFF, // 54 :: rgb(254,252,252) + 0xFAF7, // 55 :: rgb(243,189,189) + 0x7B9B, // 56 :: rgb(250,225,225) + 0xFE87, // 57 :: rgb(251,164,56) + 0x7AD2, // 58 :: rgb(250,179,149) + 0xED09, // 59 :: rgb(224,70,70) + 0xECA5, // 60 :: rgb(218,43,43) + 0xFAF4, // 61 :: rgb(250,190,165) + 0x6D29, // 62 :: rgb(224,74,74) + 0x6D4A, // 63 :: rgb(225,82,82) + 0xED08, // 64 :: rgb(223,69,69) + 0x6D08, // 65 :: rgb(222,63,63) + 0x76D6, // 66 :: rgb(242,178,178) + 0xECC6, // 67 :: rgb(220,51,51) + 0xF1AD, // 68 :: rgb(229,109,109) + 0xFFDD, // 69 :: rgb(254,246,235) + 0x718C, // 70 :: rgb(228,97,97) + 0xFFBC, // 71 :: rgb(254,239,234) + 0xFF77, // 72 :: rgb(253,223,187) + 0x76D6, // 73 :: rgb(242,179,179) + 0x6863, // 74 :: rgb(216,26,26) + 0x7AB1, // 75 :: rgb(249,169,136) + 0xE843, // 76 :: rgb(215,21,21) + 0xFF9C, // 77 :: rgb(251,230,230) + 0xF9A6, // 78 :: rgb(245,108,51) + 0x7F97, // 79 :: rgb(253,225,189) + 0x7942, // 80 :: rgb(244,81,13) + 0x7FBA, // 81 :: rgb(254,236,215) + 0xFE21, // 82 :: rgb(251,143,11) + 0x7FBC, // 83 :: rgb(251,234,234) + 0xFB18, // 84 :: rgb(245,197,197) + 0x76D6, // 85 :: rgb(242,177,177) + 0x71AD, // 86 :: rgb(229,106,106) + 0xFAB2, // 87 :: rgb(249,176,144) + 0x7F9A, // 88 :: rgb(253,227,217) + 0x7FDD, // 89 :: rgb(254,242,237) + 0x7FDE, // 90 :: rgb(253,243,243) + 0x7AB1, // 91 :: rgb(249,171,139) + 0xFFBB, // 92 :: rgb(254,239,221) + 0xF694, // 93 :: rgb(240,167,167) + 0xFE87, // 94 :: rgb(251,167,61) + 0xFF7A, // 95 :: rgb(253,224,213) + 0x7F0E, // 96 :: rgb(253,193,117) + 0xFA6F, // 97 :: rgb(249,159,121) + 0x7FFE, // 98 :: rgb(255,251,247) + 0xFEAA, // 99 :: rgb(251,175,80) + 0x7694, // 100 :: rgb(239,161,161) + 0x7AF3, // 101 :: rgb(250,186,160) + 0xE801, // 102 :: rgb(213,5,5) + 0xFA6F, // 103 :: rgb(249,159,122) + 0x7FDB, // 104 :: rgb(254,241,224) + 0xF920, // 105 :: rgb(244,75,4) + 0x7A8F, // 106 :: rgb(249,160,123) + 0x7694, // 107 :: rgb(239,163,163) + 0x7B7B, // 108 :: rgb(249,220,220) + 0xE822, // 109 :: rgb(214,14,14) + 0x6D29, // 110 :: rgb(223,71,71) + 0xFAF7, // 111 :: rgb(244,192,192) + 0xFF55, // 112 :: rgb(253,215,169) + 0x7A8F, // 113 :: rgb(249,161,124) + 0xFF32, // 114 :: rgb(253,207,151) + 0x7FBB, // 115 :: rgb(253,233,224) + 0xF694, // 116 :: rgb(239,165,165) + 0xFFBC, // 117 :: rgb(254,238,231) + 0xFB39, // 118 :: rgb(247,208,208) + 0x7B38, // 119 :: rgb(246,201,201) + 0x6842, // 120 :: rgb(214,16,16) + 0x7FFF, // 121 :: rgb(254,251,251) + 0xFB7B, // 122 :: rgb(250,223,223) + 0xF16C, // 123 :: rgb(227,95,95) + 0x7672, // 124 :: rgb(237,152,152) + 0x7631, // 125 :: rgb(235,138,138) + 0xFE87, // 126 :: rgb(251,165,60) + 0xFFDD, // 127 :: rgb(254,245,240) + 0xFF33, // 128 :: rgb(252,208,154) + 0x7F79, // 129 :: rgb(252,220,207) + 0x7E41, // 130 :: rgb(251,144,12) + 0x7E42, // 131 :: rgb(251,146,19) + 0x7F36, // 132 :: rgb(251,202,182) + 0x7FDC, // 133 :: rgb(254,243,230) + 0x7963, // 134 :: rgb(244,89,24) + 0x7F0E, // 135 :: rgb(252,193,119) + 0xFE87, // 136 :: rgb(251,164,57) + 0x7A2B, // 137 :: rgb(247,138,92) + 0xFA6E, // 138 :: rgb(249,157,119) + 0xFF9B, // 139 :: rgb(253,229,219) + 0x7920, // 140 :: rgb(244,74,3) + 0xFFDE, // 141 :: rgb(254,246,243) + 0xF964, // 142 :: rgb(245,95,32) + 0xF921, // 143 :: rgb(244,76,6) + 0xFAD3, // 144 :: rgb(250,183,155) + 0xFFBA, // 145 :: rgb(254,237,216) + 0xFAD3, // 146 :: rgb(250,182,154) + 0xF985, // 147 :: rgb(245,103,44) + 0x7FFE, // 148 :: rgb(255,252,250) + 0x7FFE, // 149 :: rgb(255,251,250) + 0x6800, // 150 :: rgb(212,1,1) + 0x7B18, // 151 :: rgb(245,195,195) + 0x7AD2, // 152 :: rgb(250,178,148) + 0x7ECB, // 153 :: rgb(251,179,87) + 0x7EA8, // 154 :: rgb(251,169,69) + 0xFEAA, // 155 :: rgb(251,176,82) + 0x7652, // 156 :: rgb(236,146,146) + 0xF942, // 157 :: rgb(244,83,16) + 0xF9E9, // 158 :: rgb(246,126,76) + 0xFFDD, // 159 :: rgb(254,246,242) + 0x71EF, // 160 :: rgb(231,120,120) + 0xFB39, // 161 :: rgb(247,206,206) + 0xFF37, // 162 :: rgb(252,208,190) + 0x6D08, // 163 :: rgb(222,65,65) + 0x7FDE, // 164 :: rgb(253,244,244) + 0x7A4D, // 165 :: rgb(248,147,106) + 0xFB5A, // 166 :: rgb(248,216,216) + 0x7F79, // 167 :: rgb(253,220,206) + 0xFAD3, // 168 :: rgb(250,181,153) + 0x7F15, // 169 :: rgb(251,196,173) + 0x7F31, // 170 :: rgb(252,201,137) + 0xF9C8, // 171 :: rgb(246,116,62) + 0xFAB2, // 172 :: rgb(250,176,145) + 0xFF10, // 173 :: rgb(252,198,131) + 0x7A6E, // 174 :: rgb(248,155,117) + 0xFF9B, // 175 :: rgb(253,232,224) + 0xFFBB, // 176 :: rgb(254,240,221) + 0x7920, // 177 :: rgb(244,74,2) + 0x7FDC, // 178 :: rgb(254,243,229) + 0xFE21, // 179 :: rgb(251,141,6) + 0x7F53, // 180 :: rgb(253,210,155) + 0xF9E9, // 181 :: rgb(247,127,77) + 0xFF58, // 182 :: rgb(252,213,197) + 0xFE87, // 183 :: rgb(251,164,58) + 0xFF54, // 184 :: rgb(253,213,164) + 0xFEA9, // 185 :: rgb(251,174,78) + 0xFE21, // 186 :: rgb(251,143,10) + 0x79E8, // 187 :: rgb(246,120,67) + 0x7E87, // 188 :: rgb(251,163,54) + 0xFFDD, // 189 :: rgb(254,248,240) + 0x7F57, // 190 :: rgb(252,210,193) + 0xFF76, // 191 :: rgb(253,222,183) + 0xC3E0, // 192 :: rgb(128,255,0) + 0x0210, // 193 :: rgb(0,128,128) + 0x7E00, // 194 :: rgb(255,128,0) + 0x4030, // 195 :: rgb(128,8,128) + 0x6800, // 196 :: rgb(212,0,0) }; \ No newline at end of file diff --git a/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/logo_gfx.h b/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/logo_gfx.h index 96abca5..d444966 100644 --- a/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/logo_gfx.h +++ b/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/logo_gfx.h @@ -1,17 +1,17 @@ -// convpng -// this file contains all the graphics sources for easy inclusion in a project -#ifndef __logo_gfx__ -#define __logo_gfx__ -#include - -#define logo_gfx_transparent_color_index 0 - -#define ubuntu_width 31 -#define ubuntu_height 30 -#define ubuntu_size 545 -extern uint8_t ubuntu_data[545]; -#define ubuntu ((gfx_rletsprite_t*)ubuntu_data) -#define sizeof_logo_gfx_pal 394 -extern uint16_t logo_gfx_pal[197]; - -#endif +// convpng +// this file contains all the graphics sources for easy inclusion in a project +#ifndef __logo_gfx__ +#define __logo_gfx__ +#include + +#define logo_gfx_transparent_color_index 0 + +#define ubuntu_width 31 +#define ubuntu_height 30 +#define ubuntu_size 545 +extern uint8_t ubuntu_data[545]; +#define ubuntu ((gfx_rletsprite_t*)ubuntu_data) +#define sizeof_logo_gfx_pal 394 +extern uint16_t logo_gfx_pal[197]; + +#endif diff --git a/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/ubuntu.c b/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/ubuntu.c index eed6d7a..18514e9 100644 --- a/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/ubuntu.c +++ b/frontends/calculator/CEdev/examples/gfx_rletsprite/src/gfx/ubuntu.c @@ -1,25 +1,25 @@ -// convpng -#include -#include "logo_gfx.h" - -// 8 bpp image -uint8_t ubuntu_data[545] = { - 31,30, // width,height - 0x00,0x04,0xC0,0x04,0x04,0x04,0x17,0x04,0x04,0x04,0x04,0xC2,0x00,0x01,0x05,0x14,0x04,0x0C,0x42,0x23,0x6C,0x05,0x01,0x01,0x00,0x01,0x05,0x13,0x06,0x09,0x15,0xC4, - 0xC4,0x03,0x6F,0x04,0x01,0x01,0x00,0x01,0x05,0x0C,0x0D,0x09,0x58,0x3D,0x4B,0x10,0x90,0x16,0xA6,0xC4,0xC4,0xC4,0xC4,0x3E,0x04,0x01,0x01,0x0C,0x0E,0x84,0x12,0x08, - 0x08,0x08,0x08,0x08,0xA9,0xA1,0xC4,0xC4,0xC4,0xC4,0x40,0x05,0x0A,0x01,0x85,0x01,0x0E,0x8B,0x17,0x08,0x08,0x08,0x08,0x08,0xA5,0x09,0xA3,0xC4,0xC4,0x96,0x55,0x05, - 0x09,0x03,0x80,0x83,0x11,0x01,0x0C,0x8A,0x08,0x08,0x08,0x08,0x08,0x17,0xA7,0xA4,0x9C,0xA0,0x97,0x06,0x08,0x04,0x70,0x0B,0x07,0x0F,0x01,0x0E,0x7F,0x86,0x69,0x8E, - 0x93,0x1C,0x08,0x9D,0xA8,0x9F,0x95,0x13,0x5B,0x09,0x04,0x07,0x06,0x5C,0x52,0x07,0x07,0x0A,0x19,0x01,0x02,0x5F,0x59,0x02,0x09,0x94,0xA2,0x9E,0x08,0x08,0x8F,0x08, - 0x08,0x3A,0x04,0x07,0x06,0x9B,0x07,0x07,0x07,0x07,0x87,0x07,0x08,0x09,0x92,0x8C,0x08,0x08,0x08,0x50,0x47,0x03,0x06,0x07,0xB0,0x0B,0x07,0x07,0x07,0x7E,0x1A,0x09, - 0x06,0x57,0x08,0x08,0x08,0x08,0x10,0x03,0x06,0x06,0xB8,0x07,0x07,0x07,0x0A,0x51,0x0A,0x07,0x09,0x4E,0x08,0x08,0x08,0x12,0x09,0x02,0x02,0x04,0x8D,0xAC,0xAE,0xBE, - 0x01,0x04,0x18,0x07,0x07,0x9A,0x0C,0x06,0x65,0x08,0x08,0x08,0x08,0x16,0x02,0x01,0x0A,0x0E,0xAB,0x08,0x08,0xB1,0x1B,0xBD,0xBA,0x07,0xAD,0x0C,0x06,0x75,0x71,0x6A, - 0x67,0x61,0x73,0x02,0x01,0x06,0x81,0x08,0x08,0x08,0x08,0xBB,0x01,0x03,0xB7,0x07,0xB4,0x14,0x01,0x06,0x13,0x08,0x08,0x08,0x08,0xB5,0x01,0x03,0xBC,0x07,0xAA,0x0C, - 0x06,0x5A,0x64,0x6B,0x74,0x5D,0x53,0x02,0x01,0x0A,0x09,0x89,0x08,0x08,0x1C,0xB6,0xB2,0xB3,0x07,0x99,0x0C,0x06,0x49,0xC4,0xC4,0xC4,0xC4,0x4D,0x02,0x02,0x0A,0x0E, - 0x1B,0x98,0xAF,0x1A,0xB9,0x07,0x07,0x82,0x45,0x0B,0x06,0x3F,0xC4,0xC4,0xC4,0x4A,0x0C,0x02,0x06,0x06,0x19,0x07,0x07,0x07,0x07,0x32,0x0A,0x06,0x37,0x02,0xC4,0xC4, - 0xC4,0x44,0x03,0x06,0x07,0x09,0x88,0x07,0x07,0x07,0x07,0x28,0x08,0x07,0x76,0x4C,0xC4,0xC4,0xC4,0x24,0x20,0x03,0x07,0x06,0x48,0x07,0x07,0x07,0x07,0x30,0x01,0x02, - 0x31,0x09,0x03,0x08,0x14,0x7D,0x03,0xC4,0xC4,0xC4,0xC4,0x1F,0x04,0x08,0x13,0x35,0x07,0x07,0x29,0x09,0x36,0x2A,0x43,0x46,0x56,0x6E,0x6D,0xC4,0xC4,0x02,0x03,0xC4, - 0x3C,0x1E,0x04,0x08,0x04,0x34,0x0F,0x0D,0x2B,0x01,0x0D,0x2F,0xC4,0xC4,0xC4,0xC4,0xC4,0xC4,0x78,0x7C,0x14,0x79,0x7A,0x38,0x05,0x0A,0x01,0x2E,0x01,0x0D,0x33,0x2C, - 0xC4,0xC4,0xC4,0xC4,0xC4,0x66,0x77,0x62,0x72,0x60,0x4F,0x06,0x0C,0x0E,0x27,0x02,0xC4,0xC4,0xC4,0xC4,0xC4,0x7B,0x09,0x63,0x07,0x07,0x0B,0x26,0x05,0x0D,0x0D,0x2D, - 0x22,0x25,0x3B,0x41,0x15,0x54,0x68,0x07,0x07,0x07,0x07,0x39,0x05,0x00,0x01,0x05,0x13,0x06,0x11,0x0A,0x07,0x07,0x07,0x5E,0x04,0x01,0x01,0x00,0x01,0x05,0x14,0x05, - 0x18,0x07,0x07,0x0D,0xBF,0x04,0x01,0x01,0x00,0x01,0x05,0x15,0x03,0x21,0x1D,0x91,0x05,0x01,0x01,0x00,0x04,0xC1,0x06,0x06,0x06,0x17,0x04,0x06,0x06,0x06,0xC3, -}; +// convpng +#include +#include "logo_gfx.h" + +// 8 bpp image +uint8_t ubuntu_data[545] = { + 31,30, // width,height + 0x00,0x04,0xC0,0x04,0x04,0x04,0x17,0x04,0x04,0x04,0x04,0xC2,0x00,0x01,0x05,0x14,0x04,0x0C,0x42,0x23,0x6C,0x05,0x01,0x01,0x00,0x01,0x05,0x13,0x06,0x09,0x15,0xC4, + 0xC4,0x03,0x6F,0x04,0x01,0x01,0x00,0x01,0x05,0x0C,0x0D,0x09,0x58,0x3D,0x4B,0x10,0x90,0x16,0xA6,0xC4,0xC4,0xC4,0xC4,0x3E,0x04,0x01,0x01,0x0C,0x0E,0x84,0x12,0x08, + 0x08,0x08,0x08,0x08,0xA9,0xA1,0xC4,0xC4,0xC4,0xC4,0x40,0x05,0x0A,0x01,0x85,0x01,0x0E,0x8B,0x17,0x08,0x08,0x08,0x08,0x08,0xA5,0x09,0xA3,0xC4,0xC4,0x96,0x55,0x05, + 0x09,0x03,0x80,0x83,0x11,0x01,0x0C,0x8A,0x08,0x08,0x08,0x08,0x08,0x17,0xA7,0xA4,0x9C,0xA0,0x97,0x06,0x08,0x04,0x70,0x0B,0x07,0x0F,0x01,0x0E,0x7F,0x86,0x69,0x8E, + 0x93,0x1C,0x08,0x9D,0xA8,0x9F,0x95,0x13,0x5B,0x09,0x04,0x07,0x06,0x5C,0x52,0x07,0x07,0x0A,0x19,0x01,0x02,0x5F,0x59,0x02,0x09,0x94,0xA2,0x9E,0x08,0x08,0x8F,0x08, + 0x08,0x3A,0x04,0x07,0x06,0x9B,0x07,0x07,0x07,0x07,0x87,0x07,0x08,0x09,0x92,0x8C,0x08,0x08,0x08,0x50,0x47,0x03,0x06,0x07,0xB0,0x0B,0x07,0x07,0x07,0x7E,0x1A,0x09, + 0x06,0x57,0x08,0x08,0x08,0x08,0x10,0x03,0x06,0x06,0xB8,0x07,0x07,0x07,0x0A,0x51,0x0A,0x07,0x09,0x4E,0x08,0x08,0x08,0x12,0x09,0x02,0x02,0x04,0x8D,0xAC,0xAE,0xBE, + 0x01,0x04,0x18,0x07,0x07,0x9A,0x0C,0x06,0x65,0x08,0x08,0x08,0x08,0x16,0x02,0x01,0x0A,0x0E,0xAB,0x08,0x08,0xB1,0x1B,0xBD,0xBA,0x07,0xAD,0x0C,0x06,0x75,0x71,0x6A, + 0x67,0x61,0x73,0x02,0x01,0x06,0x81,0x08,0x08,0x08,0x08,0xBB,0x01,0x03,0xB7,0x07,0xB4,0x14,0x01,0x06,0x13,0x08,0x08,0x08,0x08,0xB5,0x01,0x03,0xBC,0x07,0xAA,0x0C, + 0x06,0x5A,0x64,0x6B,0x74,0x5D,0x53,0x02,0x01,0x0A,0x09,0x89,0x08,0x08,0x1C,0xB6,0xB2,0xB3,0x07,0x99,0x0C,0x06,0x49,0xC4,0xC4,0xC4,0xC4,0x4D,0x02,0x02,0x0A,0x0E, + 0x1B,0x98,0xAF,0x1A,0xB9,0x07,0x07,0x82,0x45,0x0B,0x06,0x3F,0xC4,0xC4,0xC4,0x4A,0x0C,0x02,0x06,0x06,0x19,0x07,0x07,0x07,0x07,0x32,0x0A,0x06,0x37,0x02,0xC4,0xC4, + 0xC4,0x44,0x03,0x06,0x07,0x09,0x88,0x07,0x07,0x07,0x07,0x28,0x08,0x07,0x76,0x4C,0xC4,0xC4,0xC4,0x24,0x20,0x03,0x07,0x06,0x48,0x07,0x07,0x07,0x07,0x30,0x01,0x02, + 0x31,0x09,0x03,0x08,0x14,0x7D,0x03,0xC4,0xC4,0xC4,0xC4,0x1F,0x04,0x08,0x13,0x35,0x07,0x07,0x29,0x09,0x36,0x2A,0x43,0x46,0x56,0x6E,0x6D,0xC4,0xC4,0x02,0x03,0xC4, + 0x3C,0x1E,0x04,0x08,0x04,0x34,0x0F,0x0D,0x2B,0x01,0x0D,0x2F,0xC4,0xC4,0xC4,0xC4,0xC4,0xC4,0x78,0x7C,0x14,0x79,0x7A,0x38,0x05,0x0A,0x01,0x2E,0x01,0x0D,0x33,0x2C, + 0xC4,0xC4,0xC4,0xC4,0xC4,0x66,0x77,0x62,0x72,0x60,0x4F,0x06,0x0C,0x0E,0x27,0x02,0xC4,0xC4,0xC4,0xC4,0xC4,0x7B,0x09,0x63,0x07,0x07,0x0B,0x26,0x05,0x0D,0x0D,0x2D, + 0x22,0x25,0x3B,0x41,0x15,0x54,0x68,0x07,0x07,0x07,0x07,0x39,0x05,0x00,0x01,0x05,0x13,0x06,0x11,0x0A,0x07,0x07,0x07,0x5E,0x04,0x01,0x01,0x00,0x01,0x05,0x14,0x05, + 0x18,0x07,0x07,0x0D,0xBF,0x04,0x01,0x01,0x00,0x01,0x05,0x15,0x03,0x21,0x1D,0x91,0x05,0x01,0x01,0x00,0x04,0xC1,0x06,0x06,0x06,0x17,0x04,0x06,0x06,0x06,0xC3, +}; diff --git a/frontends/calculator/CEdev/examples/gfx_rletsprite/src/main.c b/frontends/calculator/CEdev/examples/gfx_rletsprite/src/main.c index 8d4e485..696088c 100644 --- a/frontends/calculator/CEdev/examples/gfx_rletsprite/src/main.c +++ b/frontends/calculator/CEdev/examples/gfx_rletsprite/src/main.c @@ -1,109 +1,109 @@ -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -/* Include the sprite data */ -#include "gfx/logo_gfx.h" - -#define w ubuntu_width -#define h ubuntu_height - -#define xmin ((gfx_lcdWidth-w*6)/2) -#define ymin ((gfx_lcdHeight-h*6)/2) -#define xmax (xmin+w*6) -#define ymax (ymin+h*6) - -#define xmin2 (xmin+w*7/2+4) -#define ymin2 (ymin+h*2+4) -#define xmax2 (xmin2+w-8) -#define ymax2 (ymin2+h-8) - -/* For testing conversions */ -gfx_UninitedSprite(ubuntu_normal, w, h); -gfx_UninitedRLETSprite(ubuntu_uninited, (w + 1) * h); - -void main(void) { - /* For testing conversions */ - gfx_rletsprite_t *ubuntu_malloc; - - /* Initialize the 8bpp graphics */ - gfx_Begin(); - - /* Set up the palette for our sprites */ - gfx_SetPalette(logo_gfx_pal, sizeof_logo_gfx_pal, 0); - gfx_palette[255] = gfx_RGBTo1555(192, 192, 192); - - /* Set a centered 192*192 clip region, bordered by gray and filled with color index 0 */ - gfx_FillScreen(255); - gfx_SetColor(0); - gfx_FillRectangle_NoClip(xmin, ymin, xmax - xmin, ymax - ymin); - gfx_SetClipRegion(xmin, ymin, xmax, ymax); - - /* Test no clipping */ - gfx_RLETSprite_NoClip(ubuntu, xmin + w * 3 / 2, ymin + h * 2); - gfx_RLETSprite(ubuntu, xmin + w * 5 / 2, ymin + h * 2); - - /* Test top clipping */ - gfx_RLETSprite(ubuntu, xmin + w, ymin); - gfx_RLETSprite(ubuntu, xmin + w * 2, ymin - h + 1); - gfx_RLETSprite(ubuntu, xmin + w * 3, ymin - h); - gfx_RLETSprite(ubuntu, xmin + w * 4, INT_MIN); - - /* Test bottom clipping */ - gfx_RLETSprite(ubuntu, xmin + w * 4, ymax - h); - gfx_RLETSprite(ubuntu, xmin + w * 3, ymax - 1); - gfx_RLETSprite(ubuntu, xmin + w * 2, ymax); - gfx_RLETSprite(ubuntu, xmin + w, INT_MAX); - - /* Test right clipping */ - gfx_RLETSprite(ubuntu, xmax - w, ymin + h); - gfx_RLETSprite(ubuntu, xmax - 1, ymin + h * 2); - gfx_RLETSprite(ubuntu, xmax, ymin + h * 3); - gfx_RLETSprite(ubuntu, INT_MAX, ymin + h * 4); - - /* Test left clipping */ - gfx_RLETSprite(ubuntu, xmin, ymin + h * 4); - gfx_RLETSprite(ubuntu, xmin - w + 1, ymin + h * 3); - gfx_RLETSprite(ubuntu, xmin - w, ymin + h * 2); - gfx_RLETSprite(ubuntu, INT_MIN, ymin + h); - - /* Test corner clipping */ - gfx_RLETSprite(ubuntu, xmin - w + 1, ymin - h + 1); - gfx_RLETSprite(ubuntu, xmax - 1, ymin - h + 1); - gfx_RLETSprite(ubuntu, xmax - 1, ymax - 1); - gfx_RLETSprite(ubuntu, xmin - w + 1, ymax - 1); - - /* Set a centered 16*16 clip region, bordered by gray and filled with color index 0 */ - gfx_SetColor(255); - gfx_FillRectangle_NoClip(xmin2 - 4, ymin2 - 4, xmax2 - xmin2 + 8, ymax2 - ymin2 + 8); - gfx_SetColor(0); - gfx_FillRectangle_NoClip(xmin2, ymin2, xmax2 - xmin2, ymax2 - ymin2); - gfx_SetClipRegion(xmin2, ymin2, xmax2, ymax2); - - /* Test all-around clipping */ - gfx_RLETSprite(ubuntu, xmin2 - 4, ymin2 - 4); - - /* Test conversions */ - gfx_SetTransparentColor(0); - gfx_ConvertFromRLETSprite(ubuntu, ubuntu_normal); - gfx_TransparentSprite_NoClip(ubuntu_normal, xmin + w * 3 / 2, ymin + h * 3); - gfx_ConvertToRLETSprite(ubuntu_normal, ubuntu_uninited); - gfx_RLETSprite_NoClip(ubuntu_uninited, xmin + w * 5 / 2, ymin + h * 3); - ubuntu_malloc = gfx_ConvertMallocRLETSprite(ubuntu_normal); // Same as gfx_ConvertToNewRLETSprite(ubuntu_normal, malloc) - gfx_RLETSprite_NoClip(ubuntu_malloc, xmin + w * 7 / 2, ymin + h * 3); - - /* Wait for a key to be pressed */ - while (!os_GetCSC()); - - /* Close the graphics */ - gfx_End(); -} +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +/* Include the sprite data */ +#include "gfx/logo_gfx.h" + +#define w ubuntu_width +#define h ubuntu_height + +#define xmin ((gfx_lcdWidth-w*6)/2) +#define ymin ((gfx_lcdHeight-h*6)/2) +#define xmax (xmin+w*6) +#define ymax (ymin+h*6) + +#define xmin2 (xmin+w*7/2+4) +#define ymin2 (ymin+h*2+4) +#define xmax2 (xmin2+w-8) +#define ymax2 (ymin2+h-8) + +/* For testing conversions */ +gfx_UninitedSprite(ubuntu_normal, w, h); +gfx_UninitedRLETSprite(ubuntu_uninited, (w + 1) * h); + +void main(void) { + /* For testing conversions */ + gfx_rletsprite_t *ubuntu_malloc; + + /* Initialize the 8bpp graphics */ + gfx_Begin(); + + /* Set up the palette for our sprites */ + gfx_SetPalette(logo_gfx_pal, sizeof_logo_gfx_pal, 0); + gfx_palette[255] = gfx_RGBTo1555(192, 192, 192); + + /* Set a centered 192*192 clip region, bordered by gray and filled with color index 0 */ + gfx_FillScreen(255); + gfx_SetColor(0); + gfx_FillRectangle_NoClip(xmin, ymin, xmax - xmin, ymax - ymin); + gfx_SetClipRegion(xmin, ymin, xmax, ymax); + + /* Test no clipping */ + gfx_RLETSprite_NoClip(ubuntu, xmin + w * 3 / 2, ymin + h * 2); + gfx_RLETSprite(ubuntu, xmin + w * 5 / 2, ymin + h * 2); + + /* Test top clipping */ + gfx_RLETSprite(ubuntu, xmin + w, ymin); + gfx_RLETSprite(ubuntu, xmin + w * 2, ymin - h + 1); + gfx_RLETSprite(ubuntu, xmin + w * 3, ymin - h); + gfx_RLETSprite(ubuntu, xmin + w * 4, INT_MIN); + + /* Test bottom clipping */ + gfx_RLETSprite(ubuntu, xmin + w * 4, ymax - h); + gfx_RLETSprite(ubuntu, xmin + w * 3, ymax - 1); + gfx_RLETSprite(ubuntu, xmin + w * 2, ymax); + gfx_RLETSprite(ubuntu, xmin + w, INT_MAX); + + /* Test right clipping */ + gfx_RLETSprite(ubuntu, xmax - w, ymin + h); + gfx_RLETSprite(ubuntu, xmax - 1, ymin + h * 2); + gfx_RLETSprite(ubuntu, xmax, ymin + h * 3); + gfx_RLETSprite(ubuntu, INT_MAX, ymin + h * 4); + + /* Test left clipping */ + gfx_RLETSprite(ubuntu, xmin, ymin + h * 4); + gfx_RLETSprite(ubuntu, xmin - w + 1, ymin + h * 3); + gfx_RLETSprite(ubuntu, xmin - w, ymin + h * 2); + gfx_RLETSprite(ubuntu, INT_MIN, ymin + h); + + /* Test corner clipping */ + gfx_RLETSprite(ubuntu, xmin - w + 1, ymin - h + 1); + gfx_RLETSprite(ubuntu, xmax - 1, ymin - h + 1); + gfx_RLETSprite(ubuntu, xmax - 1, ymax - 1); + gfx_RLETSprite(ubuntu, xmin - w + 1, ymax - 1); + + /* Set a centered 16*16 clip region, bordered by gray and filled with color index 0 */ + gfx_SetColor(255); + gfx_FillRectangle_NoClip(xmin2 - 4, ymin2 - 4, xmax2 - xmin2 + 8, ymax2 - ymin2 + 8); + gfx_SetColor(0); + gfx_FillRectangle_NoClip(xmin2, ymin2, xmax2 - xmin2, ymax2 - ymin2); + gfx_SetClipRegion(xmin2, ymin2, xmax2, ymax2); + + /* Test all-around clipping */ + gfx_RLETSprite(ubuntu, xmin2 - 4, ymin2 - 4); + + /* Test conversions */ + gfx_SetTransparentColor(0); + gfx_ConvertFromRLETSprite(ubuntu, ubuntu_normal); + gfx_TransparentSprite_NoClip(ubuntu_normal, xmin + w * 3 / 2, ymin + h * 3); + gfx_ConvertToRLETSprite(ubuntu_normal, ubuntu_uninited); + gfx_RLETSprite_NoClip(ubuntu_uninited, xmin + w * 5 / 2, ymin + h * 3); + ubuntu_malloc = gfx_ConvertMallocRLETSprite(ubuntu_normal); // Same as gfx_ConvertToNewRLETSprite(ubuntu_normal, malloc) + gfx_RLETSprite_NoClip(ubuntu_malloc, xmin + w * 7 / 2, ymin + h * 3); + + /* Wait for a key to be pressed */ + while (!os_GetCSC()); + + /* Close the graphics */ + gfx_End(); +} diff --git a/frontends/calculator/CEdev/examples/gfx_shapes_shift/autotester.json b/frontends/calculator/CEdev/examples/gfx_shapes_shift/autotester.json index af3def5..89f6ee2 100644 --- a/frontends/calculator/CEdev/examples/gfx_shapes_shift/autotester.json +++ b/frontends/calculator/CEdev/examples/gfx_shapes_shift/autotester.json @@ -1,63 +1,63 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "hashWait|1", - "key|enter", - "hashWait|2", - "key|enter", - "hashWait|3", - "key|enter", - "hashWait|4", - "key|enter", - "hashWait|5", - "key|enter", - "hashWait|6" - ], - "hashes": { - "1": { - "description": "The empty and filled blue circles are drawn correctly", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "2C41178A" ] - }, - "2": { - "description": "The yellow rectangle, red circle, and blue triangle are drawn correctly", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "C8E3ED16" ] - }, - "3": { - "description": "Filled yellow rectangle, red circle, and blue triangle are drawn correctly", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "D7543DD6" ] - }, - "4": { - "description": "The screen is shifted several times", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "F2BD5102" ] - }, - "5": { - "description": "The screen displays many different triangles", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "CDE95095" ] - }, - "6": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} - +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "hashWait|1", + "key|enter", + "hashWait|2", + "key|enter", + "hashWait|3", + "key|enter", + "hashWait|4", + "key|enter", + "hashWait|5", + "key|enter", + "hashWait|6" + ], + "hashes": { + "1": { + "description": "The empty and filled blue circles are drawn correctly", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "2C41178A" ] + }, + "2": { + "description": "The yellow rectangle, red circle, and blue triangle are drawn correctly", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "C8E3ED16" ] + }, + "3": { + "description": "Filled yellow rectangle, red circle, and blue triangle are drawn correctly", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "D7543DD6" ] + }, + "4": { + "description": "The screen is shifted several times", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "F2BD5102" ] + }, + "5": { + "description": "The screen displays many different triangles", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "CDE95095" ] + }, + "6": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} + diff --git a/frontends/calculator/CEdev/examples/gfx_shapes_shift/makefile b/frontends/calculator/CEdev/examples/gfx_shapes_shift/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/gfx_shapes_shift/makefile +++ b/frontends/calculator/CEdev/examples/gfx_shapes_shift/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/gfx_shapes_shift/readme.md b/frontends/calculator/CEdev/examples/gfx_shapes_shift/readme.md index 5f163d3..c66cd1d 100644 --- a/frontends/calculator/CEdev/examples/gfx_shapes_shift/readme.md +++ b/frontends/calculator/CEdev/examples/gfx_shapes_shift/readme.md @@ -1,10 +1,10 @@ -### GraphX Shapes and Shift Demo - -Draws different shapes, and demonstrates window shifting. - -![Screenshot](screenshot.gif) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### GraphX Shapes and Shift Demo + +Draws different shapes, and demonstrates window shifting. + +![Screenshot](screenshot.gif) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/gfx_shapes_shift/src/main.c b/frontends/calculator/CEdev/examples/gfx_shapes_shift/src/main.c index cfa784d..382cd12 100644 --- a/frontends/calculator/CEdev/examples/gfx_shapes_shift/src/main.c +++ b/frontends/calculator/CEdev/examples/gfx_shapes_shift/src/main.c @@ -1,112 +1,112 @@ -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -void main(void) { - uint8_t y; - uint24_t i; - - /* Triangle coordinates */ - int verts[6] = { - 160, 1, /* (x0, y0) */ - 1, 238, /* (x1, y1) */ - 318,238, /* (x2, y2) */ - }; - - /* Initialize the 8bpp graphics */ - gfx_Begin(); - gfx_SetColor(gfx_blue); - - /* Draw some circles to make sure they all look the same */ - y = 40; - for (i = 2; i < 13; i++) { - y += i; - gfx_FillCircle_NoClip(80, y, i); - y += i + 3; - } - y = 40; - for (i = 2; i < 13; i++) { - y += i; - gfx_FillCircle(240, y, i); - y += i + 3; - } - y = 40; - for (i = 2; i < 13; i++) { - y += i; - gfx_Circle(160, y, i); - y += i + 3; - } - - /* Wait for any key */ - while (!os_GetCSC()); - - gfx_FillScreen(gfx_white); - gfx_SetColor(gfx_yellow); - gfx_Rectangle(0, 0, 320, 240); - - /* Draw a blue triangle outline */ - gfx_SetColor(gfx_blue); - gfx_Polygon(verts, 3); - - /* Draw a red circle outline */ - gfx_SetColor(gfx_red); - gfx_Circle(160, 152, 80); - - /* Wait for any key */ - while (!os_GetCSC()); - - /* Draw a filled yellow rectangle */ - gfx_SetColor(gfx_yellow); - gfx_FillRectangle(0, 0, 320, 240); - - /* Draw a filled blue triangle */ - gfx_SetColor(gfx_blue); - gfx_FillTriangle(verts[0], verts[1], verts[2], verts[3], verts[4], verts[5]); - - /* Draw a filled red circle */ - gfx_SetColor(gfx_red); - gfx_FillCircle(160, 152, 80); - - /* Wait for any key */ - while (!os_GetCSC()); - - /* Shift the screen around a bit */ - gfx_ShiftDown(20); - gfx_ShiftDown(20); - gfx_ShiftLeft(20); - gfx_ShiftLeft(20); - gfx_ShiftUp(20); - gfx_ShiftRight(20); - - /* Wait for any key */ - while (!os_GetCSC()); - - gfx_FillScreen(gfx_white); - - /* Test triangle drawing */ - gfx_SetColor(gfx_blue); - gfx_FillTriangle(110, 170, 110, 70, 230, 70); - gfx_SetColor(gfx_green); - gfx_FillTriangle_NoClip(110, 170, 230, 70, 230, 170); - gfx_SetColor(gfx_black); - gfx_FillTriangle(110, 170, 200, 200, 230, 200); - gfx_FillTriangle_NoClip(140, 40, 110, 40, 230, 70); - gfx_FillTriangle(1, 1, 318, 1, 1, 1); - gfx_FillTriangle_NoClip(1, 238, 1, 238, 318, 238); - gfx_FillTriangle(1, 3, 1, 236, 1, 236); - gfx_FillTriangle_NoClip(318, 3, 318, 236, 318, 3); - - /* Wait for any key */ - while (!os_GetCSC()); - - /* Close the graphics */ - gfx_End(); -} +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +void main(void) { + uint8_t y; + uint24_t i; + + /* Triangle coordinates */ + int verts[6] = { + 160, 1, /* (x0, y0) */ + 1, 238, /* (x1, y1) */ + 318,238, /* (x2, y2) */ + }; + + /* Initialize the 8bpp graphics */ + gfx_Begin(); + gfx_SetColor(gfx_blue); + + /* Draw some circles to make sure they all look the same */ + y = 40; + for (i = 2; i < 13; i++) { + y += i; + gfx_FillCircle_NoClip(80, y, i); + y += i + 3; + } + y = 40; + for (i = 2; i < 13; i++) { + y += i; + gfx_FillCircle(240, y, i); + y += i + 3; + } + y = 40; + for (i = 2; i < 13; i++) { + y += i; + gfx_Circle(160, y, i); + y += i + 3; + } + + /* Wait for any key */ + while (!os_GetCSC()); + + gfx_FillScreen(gfx_white); + gfx_SetColor(gfx_yellow); + gfx_Rectangle(0, 0, 320, 240); + + /* Draw a blue triangle outline */ + gfx_SetColor(gfx_blue); + gfx_Polygon(verts, 3); + + /* Draw a red circle outline */ + gfx_SetColor(gfx_red); + gfx_Circle(160, 152, 80); + + /* Wait for any key */ + while (!os_GetCSC()); + + /* Draw a filled yellow rectangle */ + gfx_SetColor(gfx_yellow); + gfx_FillRectangle(0, 0, 320, 240); + + /* Draw a filled blue triangle */ + gfx_SetColor(gfx_blue); + gfx_FillTriangle(verts[0], verts[1], verts[2], verts[3], verts[4], verts[5]); + + /* Draw a filled red circle */ + gfx_SetColor(gfx_red); + gfx_FillCircle(160, 152, 80); + + /* Wait for any key */ + while (!os_GetCSC()); + + /* Shift the screen around a bit */ + gfx_ShiftDown(20); + gfx_ShiftDown(20); + gfx_ShiftLeft(20); + gfx_ShiftLeft(20); + gfx_ShiftUp(20); + gfx_ShiftRight(20); + + /* Wait for any key */ + while (!os_GetCSC()); + + gfx_FillScreen(gfx_white); + + /* Test triangle drawing */ + gfx_SetColor(gfx_blue); + gfx_FillTriangle(110, 170, 110, 70, 230, 70); + gfx_SetColor(gfx_green); + gfx_FillTriangle_NoClip(110, 170, 230, 70, 230, 170); + gfx_SetColor(gfx_black); + gfx_FillTriangle(110, 170, 200, 200, 230, 200); + gfx_FillTriangle_NoClip(140, 40, 110, 40, 230, 70); + gfx_FillTriangle(1, 1, 318, 1, 1, 1); + gfx_FillTriangle_NoClip(1, 238, 1, 238, 318, 238); + gfx_FillTriangle(1, 3, 1, 236, 1, 236); + gfx_FillTriangle_NoClip(318, 3, 318, 236, 318, 3); + + /* Wait for any key */ + while (!os_GetCSC()); + + /* Close the graphics */ + gfx_End(); +} diff --git a/frontends/calculator/CEdev/examples/gfx_sprite/autotester.json b/frontends/calculator/CEdev/examples/gfx_sprite/autotester.json index a88868a..bcf6174 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite/autotester.json +++ b/frontends/calculator/CEdev/examples/gfx_sprite/autotester.json @@ -1,31 +1,31 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "hashWait|1", - "key|enter", - "hashWait|2" - ], - "hashes": { - "1": { - "description": "Make sure the sprites are displayed properly", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "DF7FD32" ] - }, - "2": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} - +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "hashWait|1", + "key|enter", + "hashWait|2" + ], + "hashes": { + "1": { + "description": "Make sure the sprites are displayed properly", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "DF7FD32" ] + }, + "2": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} + diff --git a/frontends/calculator/CEdev/examples/gfx_sprite/makefile b/frontends/calculator/CEdev/examples/gfx_sprite/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite/makefile +++ b/frontends/calculator/CEdev/examples/gfx_sprite/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/gfx_sprite/readme.md b/frontends/calculator/CEdev/examples/gfx_sprite/readme.md index 9c072c0..39b290e 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite/readme.md +++ b/frontends/calculator/CEdev/examples/gfx_sprite/readme.md @@ -1,10 +1,10 @@ -### GraphX Sprite Demo - -Draws a bunch of different styles of sprites on the screen. - -![Screenshot](screenshot.png) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### GraphX Sprite Demo + +Draws a bunch of different styles of sprites on the screen. + +![Screenshot](screenshot.png) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/gfx_sprite/src/gfx/convpng.ini b/frontends/calculator/CEdev/examples/gfx_sprite/src/gfx/convpng.ini index 7bd3158..b6ba98d 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite/src/gfx/convpng.ini +++ b/frontends/calculator/CEdev/examples/gfx_sprite/src/gfx/convpng.ini @@ -1,4 +1,4 @@ -#GroupC : logo_gfx -#TransparentColor : 255,255,255 -#PNGImages : - ubuntu +#GroupC : logo_gfx +#TransparentColor : 255,255,255 +#PNGImages : + ubuntu diff --git a/frontends/calculator/CEdev/examples/gfx_sprite/src/gfx/logo_gfx.c b/frontends/calculator/CEdev/examples/gfx_sprite/src/gfx/logo_gfx.c index 4086cdc..5d2ba8b 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite/src/gfx/logo_gfx.c +++ b/frontends/calculator/CEdev/examples/gfx_sprite/src/gfx/logo_gfx.c @@ -1,195 +1,195 @@ -// convpng -#include -#include "logo_gfx.h" - -uint16_t logo_gfx_pal[189] = { - 0xFFFF, // 00 :: rgb(255,255,255) - 0x7E20, // 01 :: rgb(251,139,1) - 0xFE20, // 02 :: rgb(251,140,4) - 0xFFFF, // 03 :: rgb(255,253,253) - 0x6800, // 04 :: rgb(212,2,2) - 0xE821, // 05 :: rgb(213,11,11) - 0x7E20, // 06 :: rgb(251,139,2) - 0x7E20, // 07 :: rgb(251,139,0) - 0x7920, // 08 :: rgb(244,72,0) - 0xFFFF, // 09 :: rgb(255,254,254) - 0xFFFF, // 10 :: rgb(255,254,253) - 0xFECC, // 11 :: rgb(252,182,97) - 0x7A90, // 12 :: rgb(249,163,128) - 0x7FDC, // 13 :: rgb(254,244,231) - 0xF985, // 14 :: rgb(245,100,40) - 0x7F9A, // 15 :: rgb(253,225,213) - 0x7FDD, // 16 :: rgb(253,242,242) - 0x6D6B, // 17 :: rgb(226,90,90) - 0xFFBC, // 18 :: rgb(254,239,233) - 0xF921, // 19 :: rgb(244,77,7) - 0x7EED, // 20 :: rgb(252,187,107) - 0xFF99, // 21 :: rgb(254,231,203) - 0xFFFE, // 22 :: rgb(255,253,250) - 0xFF16, // 23 :: rgb(251,199,177) - 0xF921, // 24 :: rgb(244,78,8) - 0xFE87, // 25 :: rgb(251,167,61) - 0xFFBA, // 26 :: rgb(254,237,216) - 0x7F31, // 27 :: rgb(253,204,143) - 0xFF76, // 28 :: rgb(253,222,183) - 0x7B7B, // 29 :: rgb(249,220,220) - 0xFAF7, // 30 :: rgb(244,192,192) - 0x7FDD, // 31 :: rgb(252,241,241) - 0xF18C, // 32 :: rgb(229,102,102) - 0xFE87, // 33 :: rgb(251,164,56) - 0x7B5A, // 34 :: rgb(247,212,212) - 0xFF76, // 35 :: rgb(253,221,181) - 0xF652, // 36 :: rgb(237,151,151) - 0x7652, // 37 :: rgb(236,145,145) - 0x6D29, // 38 :: rgb(224,74,74) - 0xE800, // 39 :: rgb(212,3,3) - 0x718C, // 40 :: rgb(228,98,98) - 0xFF54, // 41 :: rgb(253,214,165) - 0x7673, // 42 :: rgb(237,153,153) - 0xFF32, // 43 :: rgb(252,205,148) - 0x7EA8, // 44 :: rgb(251,169,68) - 0x6CC6, // 45 :: rgb(219,48,48) - 0x7FBA, // 46 :: rgb(254,234,211) - 0xE842, // 47 :: rgb(215,20,20) - 0xFB7B, // 48 :: rgb(250,224,224) - 0xFF77, // 49 :: rgb(253,224,187) - 0xF652, // 50 :: rgb(237,149,149) - 0x7F75, // 51 :: rgb(253,218,175) - 0x7FFE, // 52 :: rgb(254,249,249) - 0x7EEC, // 53 :: rgb(252,185,102) - 0x7FBD, // 54 :: rgb(252,236,236) - 0xFFFF, // 55 :: rgb(255,253,251) - 0x7EED, // 56 :: rgb(252,188,109) - 0x7FFF, // 57 :: rgb(254,252,252) - 0xFAF7, // 58 :: rgb(243,189,189) - 0x7B9B, // 59 :: rgb(250,225,225) - 0x7AD2, // 60 :: rgb(250,179,149) - 0xED09, // 61 :: rgb(224,70,70) - 0xECA5, // 62 :: rgb(218,43,43) - 0xFAF4, // 63 :: rgb(250,190,165) - 0x6D4A, // 64 :: rgb(225,82,82) - 0xED08, // 65 :: rgb(223,69,69) - 0x6D08, // 66 :: rgb(222,63,63) - 0x76D6, // 67 :: rgb(242,178,178) - 0xECC6, // 68 :: rgb(220,51,51) - 0xF1AD, // 69 :: rgb(229,109,109) - 0xFFDD, // 70 :: rgb(254,246,235) - 0x718C, // 71 :: rgb(228,97,97) - 0xFFBC, // 72 :: rgb(254,239,234) - 0xFF77, // 73 :: rgb(253,223,187) - 0x76D6, // 74 :: rgb(242,179,179) - 0x6863, // 75 :: rgb(216,26,26) - 0x7AB1, // 76 :: rgb(249,169,136) - 0xE843, // 77 :: rgb(215,21,21) - 0xFF9C, // 78 :: rgb(251,230,230) - 0xF9A6, // 79 :: rgb(245,108,51) - 0x7F97, // 80 :: rgb(253,225,189) - 0x7942, // 81 :: rgb(244,81,13) - 0x7FBA, // 82 :: rgb(254,236,215) - 0xFE21, // 83 :: rgb(251,143,11) - 0x7FBC, // 84 :: rgb(251,234,234) - 0xFB18, // 85 :: rgb(245,197,197) - 0x76D6, // 86 :: rgb(242,177,177) - 0x71AD, // 87 :: rgb(229,106,106) - 0xFAB2, // 88 :: rgb(249,176,144) - 0x7F9A, // 89 :: rgb(253,227,217) - 0x7FDD, // 90 :: rgb(254,242,237) - 0x7FDE, // 91 :: rgb(253,243,243) - 0x7AB1, // 92 :: rgb(249,171,139) - 0xFFBB, // 93 :: rgb(254,239,221) - 0xF694, // 94 :: rgb(240,167,167) - 0xFF7A, // 95 :: rgb(253,224,213) - 0x7F0E, // 96 :: rgb(253,193,117) - 0xFA6F, // 97 :: rgb(249,159,121) - 0x7FFE, // 98 :: rgb(255,251,247) - 0xFEAA, // 99 :: rgb(251,175,80) - 0x7694, // 100 :: rgb(239,161,161) - 0x7AF3, // 101 :: rgb(250,186,160) - 0xE801, // 102 :: rgb(213,5,5) - 0xFA6F, // 103 :: rgb(249,159,122) - 0x7FDB, // 104 :: rgb(254,241,224) - 0xF920, // 105 :: rgb(244,75,4) - 0x7A8F, // 106 :: rgb(249,160,123) - 0x7694, // 107 :: rgb(239,163,163) - 0xE822, // 108 :: rgb(214,14,14) - 0x6D29, // 109 :: rgb(223,71,71) - 0xFF55, // 110 :: rgb(253,215,169) - 0x7A8F, // 111 :: rgb(249,161,124) - 0xFF32, // 112 :: rgb(253,207,151) - 0x7FBB, // 113 :: rgb(253,233,224) - 0xF694, // 114 :: rgb(239,165,165) - 0xFFBC, // 115 :: rgb(254,238,231) - 0xFB39, // 116 :: rgb(247,208,208) - 0x7B38, // 117 :: rgb(246,201,201) - 0x6842, // 118 :: rgb(214,16,16) - 0x7FFF, // 119 :: rgb(254,251,251) - 0xFB7B, // 120 :: rgb(250,223,223) - 0xF16C, // 121 :: rgb(227,95,95) - 0x7672, // 122 :: rgb(237,152,152) - 0x7631, // 123 :: rgb(235,138,138) - 0xFE87, // 124 :: rgb(251,165,60) - 0xFFDD, // 125 :: rgb(254,245,240) - 0xFF33, // 126 :: rgb(252,208,154) - 0x7F79, // 127 :: rgb(252,220,207) - 0x7E41, // 128 :: rgb(251,144,12) - 0x7E42, // 129 :: rgb(251,146,19) - 0x7F36, // 130 :: rgb(251,202,182) - 0x7FDC, // 131 :: rgb(254,243,230) - 0x7963, // 132 :: rgb(244,89,24) - 0x7F0E, // 133 :: rgb(252,193,119) - 0xFE87, // 134 :: rgb(251,164,57) - 0x7A2B, // 135 :: rgb(247,138,92) - 0xFA6E, // 136 :: rgb(249,157,119) - 0xFF9B, // 137 :: rgb(253,229,219) - 0x7920, // 138 :: rgb(244,74,3) - 0xFFDE, // 139 :: rgb(254,246,243) - 0xF964, // 140 :: rgb(245,95,32) - 0xF921, // 141 :: rgb(244,76,6) - 0xFAD3, // 142 :: rgb(250,183,155) - 0xFAD3, // 143 :: rgb(250,182,154) - 0xF985, // 144 :: rgb(245,103,44) - 0x7FFE, // 145 :: rgb(255,252,250) - 0x7FFE, // 146 :: rgb(255,251,250) - 0x6800, // 147 :: rgb(212,1,1) - 0x7B18, // 148 :: rgb(245,195,195) - 0x7AD2, // 149 :: rgb(250,178,148) - 0x7ECB, // 150 :: rgb(251,179,87) - 0x7EA8, // 151 :: rgb(251,169,69) - 0xFEAA, // 152 :: rgb(251,176,82) - 0x7652, // 153 :: rgb(236,146,146) - 0xF942, // 154 :: rgb(244,83,16) - 0xF9E9, // 155 :: rgb(246,126,76) - 0xFFDD, // 156 :: rgb(254,246,242) - 0x71EF, // 157 :: rgb(231,120,120) - 0xFB39, // 158 :: rgb(247,206,206) - 0xFF37, // 159 :: rgb(252,208,190) - 0x6D08, // 160 :: rgb(222,65,65) - 0x7FDE, // 161 :: rgb(253,244,244) - 0x7A4D, // 162 :: rgb(248,147,106) - 0xFB5A, // 163 :: rgb(248,216,216) - 0x7F79, // 164 :: rgb(253,220,206) - 0xFAD3, // 165 :: rgb(250,181,153) - 0x7F15, // 166 :: rgb(251,196,173) - 0x7F31, // 167 :: rgb(252,201,137) - 0xF9C8, // 168 :: rgb(246,116,62) - 0xFAB2, // 169 :: rgb(250,176,145) - 0xFF10, // 170 :: rgb(252,198,131) - 0x7A6E, // 171 :: rgb(248,155,117) - 0xFF9B, // 172 :: rgb(253,232,224) - 0xFFBB, // 173 :: rgb(254,240,221) - 0x7920, // 174 :: rgb(244,74,2) - 0x7FDC, // 175 :: rgb(254,243,229) - 0xFE21, // 176 :: rgb(251,141,6) - 0x7F53, // 177 :: rgb(253,210,155) - 0xF9E9, // 178 :: rgb(247,127,77) - 0xFF58, // 179 :: rgb(252,213,197) - 0xFE87, // 180 :: rgb(251,164,58) - 0xFF54, // 181 :: rgb(253,213,164) - 0xFEA9, // 182 :: rgb(251,174,78) - 0xFE21, // 183 :: rgb(251,143,10) - 0x79E8, // 184 :: rgb(246,120,67) - 0x7E87, // 185 :: rgb(251,163,54) - 0xFFDD, // 186 :: rgb(254,248,240) - 0x7F57, // 187 :: rgb(252,210,193) - 0x6800, // 188 :: rgb(212,0,0) +// convpng +#include +#include "logo_gfx.h" + +uint16_t logo_gfx_pal[189] = { + 0xFFFF, // 00 :: rgb(255,255,255) + 0x7E20, // 01 :: rgb(251,139,1) + 0xFE20, // 02 :: rgb(251,140,4) + 0xFFFF, // 03 :: rgb(255,253,253) + 0x6800, // 04 :: rgb(212,2,2) + 0xE821, // 05 :: rgb(213,11,11) + 0x7E20, // 06 :: rgb(251,139,2) + 0x7E20, // 07 :: rgb(251,139,0) + 0x7920, // 08 :: rgb(244,72,0) + 0xFFFF, // 09 :: rgb(255,254,254) + 0xFFFF, // 10 :: rgb(255,254,253) + 0xFECC, // 11 :: rgb(252,182,97) + 0x7A90, // 12 :: rgb(249,163,128) + 0x7FDC, // 13 :: rgb(254,244,231) + 0xF985, // 14 :: rgb(245,100,40) + 0x7F9A, // 15 :: rgb(253,225,213) + 0x7FDD, // 16 :: rgb(253,242,242) + 0x6D6B, // 17 :: rgb(226,90,90) + 0xFFBC, // 18 :: rgb(254,239,233) + 0xF921, // 19 :: rgb(244,77,7) + 0x7EED, // 20 :: rgb(252,187,107) + 0xFF99, // 21 :: rgb(254,231,203) + 0xFFFE, // 22 :: rgb(255,253,250) + 0xFF16, // 23 :: rgb(251,199,177) + 0xF921, // 24 :: rgb(244,78,8) + 0xFE87, // 25 :: rgb(251,167,61) + 0xFFBA, // 26 :: rgb(254,237,216) + 0x7F31, // 27 :: rgb(253,204,143) + 0xFF76, // 28 :: rgb(253,222,183) + 0x7B7B, // 29 :: rgb(249,220,220) + 0xFAF7, // 30 :: rgb(244,192,192) + 0x7FDD, // 31 :: rgb(252,241,241) + 0xF18C, // 32 :: rgb(229,102,102) + 0xFE87, // 33 :: rgb(251,164,56) + 0x7B5A, // 34 :: rgb(247,212,212) + 0xFF76, // 35 :: rgb(253,221,181) + 0xF652, // 36 :: rgb(237,151,151) + 0x7652, // 37 :: rgb(236,145,145) + 0x6D29, // 38 :: rgb(224,74,74) + 0xE800, // 39 :: rgb(212,3,3) + 0x718C, // 40 :: rgb(228,98,98) + 0xFF54, // 41 :: rgb(253,214,165) + 0x7673, // 42 :: rgb(237,153,153) + 0xFF32, // 43 :: rgb(252,205,148) + 0x7EA8, // 44 :: rgb(251,169,68) + 0x6CC6, // 45 :: rgb(219,48,48) + 0x7FBA, // 46 :: rgb(254,234,211) + 0xE842, // 47 :: rgb(215,20,20) + 0xFB7B, // 48 :: rgb(250,224,224) + 0xFF77, // 49 :: rgb(253,224,187) + 0xF652, // 50 :: rgb(237,149,149) + 0x7F75, // 51 :: rgb(253,218,175) + 0x7FFE, // 52 :: rgb(254,249,249) + 0x7EEC, // 53 :: rgb(252,185,102) + 0x7FBD, // 54 :: rgb(252,236,236) + 0xFFFF, // 55 :: rgb(255,253,251) + 0x7EED, // 56 :: rgb(252,188,109) + 0x7FFF, // 57 :: rgb(254,252,252) + 0xFAF7, // 58 :: rgb(243,189,189) + 0x7B9B, // 59 :: rgb(250,225,225) + 0x7AD2, // 60 :: rgb(250,179,149) + 0xED09, // 61 :: rgb(224,70,70) + 0xECA5, // 62 :: rgb(218,43,43) + 0xFAF4, // 63 :: rgb(250,190,165) + 0x6D4A, // 64 :: rgb(225,82,82) + 0xED08, // 65 :: rgb(223,69,69) + 0x6D08, // 66 :: rgb(222,63,63) + 0x76D6, // 67 :: rgb(242,178,178) + 0xECC6, // 68 :: rgb(220,51,51) + 0xF1AD, // 69 :: rgb(229,109,109) + 0xFFDD, // 70 :: rgb(254,246,235) + 0x718C, // 71 :: rgb(228,97,97) + 0xFFBC, // 72 :: rgb(254,239,234) + 0xFF77, // 73 :: rgb(253,223,187) + 0x76D6, // 74 :: rgb(242,179,179) + 0x6863, // 75 :: rgb(216,26,26) + 0x7AB1, // 76 :: rgb(249,169,136) + 0xE843, // 77 :: rgb(215,21,21) + 0xFF9C, // 78 :: rgb(251,230,230) + 0xF9A6, // 79 :: rgb(245,108,51) + 0x7F97, // 80 :: rgb(253,225,189) + 0x7942, // 81 :: rgb(244,81,13) + 0x7FBA, // 82 :: rgb(254,236,215) + 0xFE21, // 83 :: rgb(251,143,11) + 0x7FBC, // 84 :: rgb(251,234,234) + 0xFB18, // 85 :: rgb(245,197,197) + 0x76D6, // 86 :: rgb(242,177,177) + 0x71AD, // 87 :: rgb(229,106,106) + 0xFAB2, // 88 :: rgb(249,176,144) + 0x7F9A, // 89 :: rgb(253,227,217) + 0x7FDD, // 90 :: rgb(254,242,237) + 0x7FDE, // 91 :: rgb(253,243,243) + 0x7AB1, // 92 :: rgb(249,171,139) + 0xFFBB, // 93 :: rgb(254,239,221) + 0xF694, // 94 :: rgb(240,167,167) + 0xFF7A, // 95 :: rgb(253,224,213) + 0x7F0E, // 96 :: rgb(253,193,117) + 0xFA6F, // 97 :: rgb(249,159,121) + 0x7FFE, // 98 :: rgb(255,251,247) + 0xFEAA, // 99 :: rgb(251,175,80) + 0x7694, // 100 :: rgb(239,161,161) + 0x7AF3, // 101 :: rgb(250,186,160) + 0xE801, // 102 :: rgb(213,5,5) + 0xFA6F, // 103 :: rgb(249,159,122) + 0x7FDB, // 104 :: rgb(254,241,224) + 0xF920, // 105 :: rgb(244,75,4) + 0x7A8F, // 106 :: rgb(249,160,123) + 0x7694, // 107 :: rgb(239,163,163) + 0xE822, // 108 :: rgb(214,14,14) + 0x6D29, // 109 :: rgb(223,71,71) + 0xFF55, // 110 :: rgb(253,215,169) + 0x7A8F, // 111 :: rgb(249,161,124) + 0xFF32, // 112 :: rgb(253,207,151) + 0x7FBB, // 113 :: rgb(253,233,224) + 0xF694, // 114 :: rgb(239,165,165) + 0xFFBC, // 115 :: rgb(254,238,231) + 0xFB39, // 116 :: rgb(247,208,208) + 0x7B38, // 117 :: rgb(246,201,201) + 0x6842, // 118 :: rgb(214,16,16) + 0x7FFF, // 119 :: rgb(254,251,251) + 0xFB7B, // 120 :: rgb(250,223,223) + 0xF16C, // 121 :: rgb(227,95,95) + 0x7672, // 122 :: rgb(237,152,152) + 0x7631, // 123 :: rgb(235,138,138) + 0xFE87, // 124 :: rgb(251,165,60) + 0xFFDD, // 125 :: rgb(254,245,240) + 0xFF33, // 126 :: rgb(252,208,154) + 0x7F79, // 127 :: rgb(252,220,207) + 0x7E41, // 128 :: rgb(251,144,12) + 0x7E42, // 129 :: rgb(251,146,19) + 0x7F36, // 130 :: rgb(251,202,182) + 0x7FDC, // 131 :: rgb(254,243,230) + 0x7963, // 132 :: rgb(244,89,24) + 0x7F0E, // 133 :: rgb(252,193,119) + 0xFE87, // 134 :: rgb(251,164,57) + 0x7A2B, // 135 :: rgb(247,138,92) + 0xFA6E, // 136 :: rgb(249,157,119) + 0xFF9B, // 137 :: rgb(253,229,219) + 0x7920, // 138 :: rgb(244,74,3) + 0xFFDE, // 139 :: rgb(254,246,243) + 0xF964, // 140 :: rgb(245,95,32) + 0xF921, // 141 :: rgb(244,76,6) + 0xFAD3, // 142 :: rgb(250,183,155) + 0xFAD3, // 143 :: rgb(250,182,154) + 0xF985, // 144 :: rgb(245,103,44) + 0x7FFE, // 145 :: rgb(255,252,250) + 0x7FFE, // 146 :: rgb(255,251,250) + 0x6800, // 147 :: rgb(212,1,1) + 0x7B18, // 148 :: rgb(245,195,195) + 0x7AD2, // 149 :: rgb(250,178,148) + 0x7ECB, // 150 :: rgb(251,179,87) + 0x7EA8, // 151 :: rgb(251,169,69) + 0xFEAA, // 152 :: rgb(251,176,82) + 0x7652, // 153 :: rgb(236,146,146) + 0xF942, // 154 :: rgb(244,83,16) + 0xF9E9, // 155 :: rgb(246,126,76) + 0xFFDD, // 156 :: rgb(254,246,242) + 0x71EF, // 157 :: rgb(231,120,120) + 0xFB39, // 158 :: rgb(247,206,206) + 0xFF37, // 159 :: rgb(252,208,190) + 0x6D08, // 160 :: rgb(222,65,65) + 0x7FDE, // 161 :: rgb(253,244,244) + 0x7A4D, // 162 :: rgb(248,147,106) + 0xFB5A, // 163 :: rgb(248,216,216) + 0x7F79, // 164 :: rgb(253,220,206) + 0xFAD3, // 165 :: rgb(250,181,153) + 0x7F15, // 166 :: rgb(251,196,173) + 0x7F31, // 167 :: rgb(252,201,137) + 0xF9C8, // 168 :: rgb(246,116,62) + 0xFAB2, // 169 :: rgb(250,176,145) + 0xFF10, // 170 :: rgb(252,198,131) + 0x7A6E, // 171 :: rgb(248,155,117) + 0xFF9B, // 172 :: rgb(253,232,224) + 0xFFBB, // 173 :: rgb(254,240,221) + 0x7920, // 174 :: rgb(244,74,2) + 0x7FDC, // 175 :: rgb(254,243,229) + 0xFE21, // 176 :: rgb(251,141,6) + 0x7F53, // 177 :: rgb(253,210,155) + 0xF9E9, // 178 :: rgb(247,127,77) + 0xFF58, // 179 :: rgb(252,213,197) + 0xFE87, // 180 :: rgb(251,164,58) + 0xFF54, // 181 :: rgb(253,213,164) + 0xFEA9, // 182 :: rgb(251,174,78) + 0xFE21, // 183 :: rgb(251,143,10) + 0x79E8, // 184 :: rgb(246,120,67) + 0x7E87, // 185 :: rgb(251,163,54) + 0xFFDD, // 186 :: rgb(254,248,240) + 0x7F57, // 187 :: rgb(252,210,193) + 0x6800, // 188 :: rgb(212,0,0) }; \ No newline at end of file diff --git a/frontends/calculator/CEdev/examples/gfx_sprite/src/gfx/logo_gfx.h b/frontends/calculator/CEdev/examples/gfx_sprite/src/gfx/logo_gfx.h index eba6d22..2be515d 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite/src/gfx/logo_gfx.h +++ b/frontends/calculator/CEdev/examples/gfx_sprite/src/gfx/logo_gfx.h @@ -1,17 +1,17 @@ -// convpng -// this file contains all the graphics sources for easy inclusion in a project -#ifndef __logo_gfx__ -#define __logo_gfx__ -#include - -#define logo_gfx_transparent_color_index 0 - -#define ubuntu_width 32 -#define ubuntu_height 32 -#define ubuntu_size 1026 -extern uint8_t ubuntu_data[1026]; -#define ubuntu ((gfx_sprite_t*)ubuntu_data) -#define sizeof_logo_gfx_pal 378 -extern uint16_t logo_gfx_pal[189]; - -#endif +// convpng +// this file contains all the graphics sources for easy inclusion in a project +#ifndef __logo_gfx__ +#define __logo_gfx__ +#include + +#define logo_gfx_transparent_color_index 0 + +#define ubuntu_width 32 +#define ubuntu_height 32 +#define ubuntu_size 1026 +extern uint8_t ubuntu_data[1026]; +#define ubuntu ((gfx_sprite_t*)ubuntu_data) +#define sizeof_logo_gfx_pal 378 +extern uint16_t logo_gfx_pal[189]; + +#endif diff --git a/frontends/calculator/CEdev/examples/gfx_sprite/src/gfx/ubuntu.c b/frontends/calculator/CEdev/examples/gfx_sprite/src/gfx/ubuntu.c index ac4f3b9..053323a 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite/src/gfx/ubuntu.c +++ b/frontends/calculator/CEdev/examples/gfx_sprite/src/gfx/ubuntu.c @@ -1,40 +1,40 @@ -// convpng -#include -#include "logo_gfx.h" - -// 8 bpp image -uint8_t ubuntu_data[1026] = { - 32,32, // width,height - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x43,0x25,0x1D,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x11,0xBC,0xBC,0x05,0x1E,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x59,0x3F,0x4C,0x0C,0x8E,0x12,0xA3,0xBC,0xBC,0xBC,0xBC,0x26,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x0E,0x08,0x08,0x08,0x08,0x08,0xA6,0x9E,0xBC,0xBC,0xBC,0xBC,0x41,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0x00,0x89,0x13,0x08,0x08,0x08,0x08,0x08,0xA2,0x09,0xA0,0xBC,0xBC,0x93,0x56,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x81,0x0D,0x00,0x88,0x08,0x08,0x08,0x08,0x08,0x13,0xA4,0xA1,0x99,0x9D,0x94,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6E,0x01,0x07,0x0B,0x00,0x7D,0x84,0x69,0x8C,0x90,0x18,0x08,0x9A,0xA5,0x9C,0x92,0x0F,0x5C,0x09,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5D,0x53,0x07,0x07,0x06,0x15,0x00,0x5F,0x5A,0x00,0x00,0x91,0x9F,0x9B,0x08,0x08,0x8D,0x08,0x08,0x3C,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x07,0x07,0x07,0x07,0x85,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x8F,0x8A,0x08,0x08,0x08,0x51,0x48,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xAD,0x01,0x07,0x07,0x07,0x7C,0x16,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x58,0x08,0x08,0x08,0x08,0x0C,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xB5,0x07,0x07,0x07,0x06,0x52,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x4F,0x08,0x08,0x08,0x0E,0x09,0x00,0x00, - 0x00,0x00,0x00,0x8B,0xA9,0xAB,0xBB,0x00,0x14,0x07,0x07,0x97,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x65,0x08,0x08,0x08,0x08,0x12,0x00,0x00, - 0x00,0x00,0x0A,0xA8,0x08,0x08,0xAE,0x17,0xBA,0xB7,0x07,0xAA,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x6F,0x6A,0x67,0x61,0x71,0x00,0x00, - 0x00,0x00,0x7F,0x08,0x08,0x08,0x08,0xB8,0x00,0xB4,0x07,0xB1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x0F,0x08,0x08,0x08,0x08,0xB2,0x00,0xB9,0x07,0xA7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5B,0x64,0x6B,0x72,0x5E,0x54,0x00,0x00, - 0x00,0x00,0x09,0x87,0x08,0x08,0x18,0xB3,0xAF,0xB0,0x07,0x96,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4A,0xBC,0xBC,0xBC,0xBC,0x4E,0x00,0x00, - 0x00,0x00,0x00,0x0A,0x17,0x95,0xAC,0x16,0xB6,0x07,0x07,0x80,0x46,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xBC,0xBC,0xBC,0x4B,0x03,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0x07,0x07,0x07,0x07,0x35,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3A,0x04,0xBC,0xBC,0xBC,0x45,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x86,0x07,0x07,0x07,0x07,0x2B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x74,0x4D,0xBC,0xBC,0xBC,0x27,0x22,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x49,0x07,0x07,0x07,0x07,0x33,0x00,0x34,0x09,0x00,0x00,0x00,0x10,0x7B,0x05,0xBC,0xBC,0xBC,0xBC,0x20,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x07,0x07,0x2C,0x09,0x39,0x2D,0x44,0x47,0x57,0x6D,0x6C,0xBC,0xBC,0x04,0x05,0xBC,0x3E,0x1F,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x37,0x0B,0x02,0x2E,0x00,0x32,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0x76,0x7A,0x10,0x77,0x78,0x3B,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x31,0x00,0x36,0x2F,0xBC,0xBC,0xBC,0xBC,0xBC,0x66,0x75,0x62,0x70,0x60,0x50,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2A,0x04,0xBC,0xBC,0xBC,0xBC,0xBC,0x79,0x09,0x63,0x07,0x07,0x01,0x29,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x24,0x28,0x3D,0x42,0x11,0x55,0x68,0x07,0x07,0x07,0x07,0x21,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0D,0x06,0x07,0x07,0x07,0x19,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x07,0x07,0x02,0x1C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0x1B,0x1A,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -}; +// convpng +#include +#include "logo_gfx.h" + +// 8 bpp image +uint8_t ubuntu_data[1026] = { + 32,32, // width,height + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x43,0x25,0x1D,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x11,0xBC,0xBC,0x05,0x1E,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x59,0x3F,0x4C,0x0C,0x8E,0x12,0xA3,0xBC,0xBC,0xBC,0xBC,0x26,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x0E,0x08,0x08,0x08,0x08,0x08,0xA6,0x9E,0xBC,0xBC,0xBC,0xBC,0x41,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0x00,0x89,0x13,0x08,0x08,0x08,0x08,0x08,0xA2,0x09,0xA0,0xBC,0xBC,0x93,0x56,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x81,0x0D,0x00,0x88,0x08,0x08,0x08,0x08,0x08,0x13,0xA4,0xA1,0x99,0x9D,0x94,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6E,0x01,0x07,0x0B,0x00,0x7D,0x84,0x69,0x8C,0x90,0x18,0x08,0x9A,0xA5,0x9C,0x92,0x0F,0x5C,0x09,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5D,0x53,0x07,0x07,0x06,0x15,0x00,0x5F,0x5A,0x00,0x00,0x91,0x9F,0x9B,0x08,0x08,0x8D,0x08,0x08,0x3C,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x07,0x07,0x07,0x07,0x85,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x8F,0x8A,0x08,0x08,0x08,0x51,0x48,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xAD,0x01,0x07,0x07,0x07,0x7C,0x16,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x58,0x08,0x08,0x08,0x08,0x0C,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xB5,0x07,0x07,0x07,0x06,0x52,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x4F,0x08,0x08,0x08,0x0E,0x09,0x00,0x00, + 0x00,0x00,0x00,0x8B,0xA9,0xAB,0xBB,0x00,0x14,0x07,0x07,0x97,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x65,0x08,0x08,0x08,0x08,0x12,0x00,0x00, + 0x00,0x00,0x0A,0xA8,0x08,0x08,0xAE,0x17,0xBA,0xB7,0x07,0xAA,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x6F,0x6A,0x67,0x61,0x71,0x00,0x00, + 0x00,0x00,0x7F,0x08,0x08,0x08,0x08,0xB8,0x00,0xB4,0x07,0xB1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x0F,0x08,0x08,0x08,0x08,0xB2,0x00,0xB9,0x07,0xA7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5B,0x64,0x6B,0x72,0x5E,0x54,0x00,0x00, + 0x00,0x00,0x09,0x87,0x08,0x08,0x18,0xB3,0xAF,0xB0,0x07,0x96,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4A,0xBC,0xBC,0xBC,0xBC,0x4E,0x00,0x00, + 0x00,0x00,0x00,0x0A,0x17,0x95,0xAC,0x16,0xB6,0x07,0x07,0x80,0x46,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xBC,0xBC,0xBC,0x4B,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0x07,0x07,0x07,0x07,0x35,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3A,0x04,0xBC,0xBC,0xBC,0x45,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x86,0x07,0x07,0x07,0x07,0x2B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x74,0x4D,0xBC,0xBC,0xBC,0x27,0x22,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x49,0x07,0x07,0x07,0x07,0x33,0x00,0x34,0x09,0x00,0x00,0x00,0x10,0x7B,0x05,0xBC,0xBC,0xBC,0xBC,0x20,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x07,0x07,0x2C,0x09,0x39,0x2D,0x44,0x47,0x57,0x6D,0x6C,0xBC,0xBC,0x04,0x05,0xBC,0x3E,0x1F,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x37,0x0B,0x02,0x2E,0x00,0x32,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0x76,0x7A,0x10,0x77,0x78,0x3B,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x31,0x00,0x36,0x2F,0xBC,0xBC,0xBC,0xBC,0xBC,0x66,0x75,0x62,0x70,0x60,0x50,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2A,0x04,0xBC,0xBC,0xBC,0xBC,0xBC,0x79,0x09,0x63,0x07,0x07,0x01,0x29,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x24,0x28,0x3D,0x42,0x11,0x55,0x68,0x07,0x07,0x07,0x07,0x21,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0D,0x06,0x07,0x07,0x07,0x19,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x07,0x07,0x02,0x1C,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0x1B,0x1A,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +}; diff --git a/frontends/calculator/CEdev/examples/gfx_sprite/src/main.c b/frontends/calculator/CEdev/examples/gfx_sprite/src/main.c index de618be..95c727a 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite/src/main.c +++ b/frontends/calculator/CEdev/examples/gfx_sprite/src/main.c @@ -1,39 +1,39 @@ -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -/* Include the sprite data */ -#include "gfx/logo_gfx.h" - -void main(void) { - /* Initialize the 8bpp graphics */ - gfx_Begin(); - - /* Set up the palette for our sprites */ - gfx_SetPalette(logo_gfx_pal, sizeof_logo_gfx_pal, 0); - - /* Fill the screen with color index 0 */ - gfx_FillScreen(0); - - /* Draw a bunch of different styled sprites on the screen */ - gfx_Sprite(ubuntu, 0, 0); - gfx_Sprite_NoClip(ubuntu, 32, 32); - gfx_TransparentSprite(ubuntu, 64, 64); - gfx_TransparentSprite_NoClip(ubuntu, 96, 96); - gfx_ScaledSprite_NoClip(ubuntu, 128, 128, 2, 2); - gfx_ScaledTransparentSprite_NoClip(ubuntu, 128, 0, 3, 3); - - /* Wait for a key to be pressed */ - while (!os_GetCSC()); - - /* Close the graphics */ - gfx_End(); -} +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +/* Include the sprite data */ +#include "gfx/logo_gfx.h" + +void main(void) { + /* Initialize the 8bpp graphics */ + gfx_Begin(); + + /* Set up the palette for our sprites */ + gfx_SetPalette(logo_gfx_pal, sizeof_logo_gfx_pal, 0); + + /* Fill the screen with color index 0 */ + gfx_FillScreen(0); + + /* Draw a bunch of different styled sprites on the screen */ + gfx_Sprite(ubuntu, 0, 0); + gfx_Sprite_NoClip(ubuntu, 32, 32); + gfx_TransparentSprite(ubuntu, 64, 64); + gfx_TransparentSprite_NoClip(ubuntu, 96, 96); + gfx_ScaledSprite_NoClip(ubuntu, 128, 128, 2, 2); + gfx_ScaledTransparentSprite_NoClip(ubuntu, 128, 0, 3, 3); + + /* Wait for a key to be pressed */ + while (!os_GetCSC()); + + /* Close the graphics */ + gfx_End(); +} diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_compress/autotester.json b/frontends/calculator/CEdev/examples/gfx_sprite_compress/autotester.json index 553842a..974161c 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_compress/autotester.json +++ b/frontends/calculator/CEdev/examples/gfx_sprite_compress/autotester.json @@ -1,33 +1,33 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "delay|1000", - "hash|1", - "key|enter", - "delay|300", - "hashWait|2" - ], - "hashes": { - "1": { - "description": "A green apple will be displayed", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "250E0F47" ] - }, - "2": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} - +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "delay|1000", + "hash|1", + "key|enter", + "delay|300", + "hashWait|2" + ], + "hashes": { + "1": { + "description": "A green apple will be displayed", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "250E0F47" ] + }, + "2": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} + diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_compress/makefile b/frontends/calculator/CEdev/examples/gfx_sprite_compress/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_compress/makefile +++ b/frontends/calculator/CEdev/examples/gfx_sprite_compress/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_compress/readme.md b/frontends/calculator/CEdev/examples/gfx_sprite_compress/readme.md index bd5fb0e..b0b9b48 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_compress/readme.md +++ b/frontends/calculator/CEdev/examples/gfx_sprite_compress/readme.md @@ -1,10 +1,10 @@ -### GraphX Sprite Compression Demo - -An example of decompressing sprites created with ConvPNG. - -![Screenshot](screenshot.png) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### GraphX Sprite Compression Demo + +An example of decompressing sprites created with ConvPNG. + +![Screenshot](screenshot.png) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_compress/src/gfx/all_gfx.c b/frontends/calculator/CEdev/examples/gfx_sprite_compress/src/gfx/all_gfx.c index f546e01..d1c1feb 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_compress/src/gfx/all_gfx.c +++ b/frontends/calculator/CEdev/examples/gfx_sprite_compress/src/gfx/all_gfx.c @@ -1,262 +1,262 @@ -// Converted using ConvPNG -#include -#include "all_gfx.h" - -uint16_t all_gfx_pal[256] = { - 0xFFFF, // 00 :: rgb(255,255,255) - 0x4AA4, // 01 :: rgb(146,169,33) - 0xFFFF, // 02 :: rgb(255,255,253) - 0xCAA0, // 03 :: rgb(144,173,1) - 0xCAA0, // 04 :: rgb(148,176,1) - 0xCEC0, // 05 :: rgb(154,183,3) - 0xCAC0, // 06 :: rgb(152,181,3) - 0xFFFF, // 07 :: rgb(254,255,255) - 0xFFFF, // 08 :: rgb(253,254,253) - 0x4AC0, // 09 :: rgb(150,178,2) - 0xCAA0, // 10 :: rgb(147,174,3) - 0xC684, // 11 :: rgb(142,166,29) - 0x4AA4, // 12 :: rgb(148,172,32) - 0x7BFE, // 13 :: rgb(250,250,250) - 0x5301, // 14 :: rgb(166,196,5) - 0x4EE0, // 15 :: rgb(158,188,2) - 0x4AA3, // 16 :: rgb(146,170,27) - 0x4EE0, // 17 :: rgb(156,185,3) - 0xFFFF, // 18 :: rgb(255,254,255) - 0xC680, // 19 :: rgb(141,167,3) - 0xCEE0, // 20 :: rgb(160,190,3) - 0xCAA5, // 21 :: rgb(150,173,39) - 0xCAA4, // 22 :: rgb(152,175,31) - 0x4AA5, // 23 :: rgb(147,169,45) - 0xB600, // 24 :: rgb(110,132,3) - 0xCA84, // 25 :: rgb(144,167,34) - 0x4683, // 26 :: rgb(137,160,22) - 0x7FFF, // 27 :: rgb(252,252,251) - 0x4683, // 28 :: rgb(140,162,27) - 0x4684, // 29 :: rgb(140,161,34) - 0x46A0, // 30 :: rgb(143,170,1) - 0xC682, // 31 :: rgb(142,167,19) - 0x4AA7, // 32 :: rgb(150,172,59) - 0x4AA5, // 33 :: rgb(147,169,39) - 0xFBDD, // 34 :: rgb(244,245,242) - 0xD301, // 35 :: rgb(168,198,5) - 0xFBDE, // 36 :: rgb(247,248,245) - 0xCAA3, // 37 :: rgb(150,175,24) - 0x4280, // 38 :: rgb(135,160,3) - 0xBE20, // 39 :: rgb(120,143,3) - 0x3600, // 40 :: rgb(107,129,2) - 0x3A20, // 41 :: rgb(112,136,2) - 0xCAA1, // 42 :: rgb(149,176,6) - 0xCAA6, // 43 :: rgb(151,173,46) - 0x5722, // 44 :: rgb(173,203,15) - 0x4263, // 45 :: rgb(133,154,27) - 0xC664, // 46 :: rgb(137,158,30) - 0xC241, // 47 :: rgb(129,151,12) - 0xC680, // 48 :: rgb(137,164,1) - 0x7FFF, // 49 :: rgb(252,252,253) - 0xC262, // 50 :: rgb(135,158,18) - 0x4AA1, // 51 :: rgb(146,171,8) - 0x4AA3, // 52 :: rgb(147,171,23) - 0x4AA6, // 53 :: rgb(150,172,52) - 0xC260, // 54 :: rgb(131,157,2) - 0x6BB3, // 55 :: rgb(214,234,153) - 0xD2E0, // 56 :: rgb(162,192,3) - 0x4EC2, // 57 :: rgb(153,179,13) - 0x4AA2, // 58 :: rgb(146,172,17) - 0x5721, // 59 :: rgb(172,202,5) - 0xDB22, // 60 :: rgb(177,207,20) - 0x3E46, // 61 :: rgb(124,145,53) - 0x6FD6, // 62 :: rgb(224,241,178) - 0x6BB3, // 63 :: rgb(216,235,159) - 0xE791, // 64 :: rgb(207,229,139) - 0xBE45, // 65 :: rgb(126,149,40) - 0xD702, // 66 :: rgb(170,199,15) - 0x4264, // 67 :: rgb(130,152,35) - 0xEB92, // 68 :: rgb(211,232,146) - 0x3E60, // 69 :: rgb(127,153,1) - 0xC243, // 70 :: rgb(129,151,22) - 0xEFB5, // 71 :: rgb(223,240,173) - 0x5300, // 72 :: rgb(164,194,3) - 0x4262, // 73 :: rgb(132,154,16) - 0x3E45, // 74 :: rgb(123,145,45) - 0xCAA2, // 75 :: rgb(150,175,15) - 0xF7BC, // 76 :: rgb(237,238,233) - 0xB1C0, // 77 :: rgb(98,118,4) - 0xEFB4, // 78 :: rgb(221,238,168) - 0xFFFF, // 79 :: rgb(252,253,255) - 0xBE40, // 80 :: rgb(123,149,2) - 0x4265, // 81 :: rgb(131,153,41) - 0x4AA8, // 82 :: rgb(150,172,68) - 0x77DD, // 83 :: rgb(241,242,237) - 0xC684, // 84 :: rgb(142,164,33) - 0x6FB4, // 85 :: rgb(218,236,165) - 0x6790, // 86 :: rgb(203,225,133) - 0xD2E1, // 87 :: rgb(163,192,11) - 0x3E44, // 88 :: rgb(123,145,36) - 0x2DC0, // 89 :: rgb(94,113,2) - 0x31E0, // 90 :: rgb(101,123,1) - 0x73BC, // 91 :: rgb(232,233,228) - 0xC681, // 92 :: rgb(139,164,9) - 0x3E41, // 93 :: rgb(124,146,6) - 0xCEA9, // 94 :: rgb(154,175,75) - 0xCA85, // 95 :: rgb(144,167,40) - 0x5723, // 96 :: rgb(174,203,28) - 0xDB24, // 97 :: rgb(180,208,30) - 0xDB43, // 98 :: rgb(183,214,27) - 0xBA20, // 99 :: rgb(115,140,2) - 0x4264, // 100 :: rgb(135,155,37) - 0x3A21, // 101 :: rgb(117,138,6) - 0x5B47, // 102 :: rgb(183,212,55) - 0xC685, // 103 :: rgb(142,164,38) - 0xD721, // 104 :: rgb(175,208,7) - 0x73D7, // 105 :: rgb(230,244,191) - 0xB5E0, // 106 :: rgb(106,124,4) - 0xCEAA, // 107 :: rgb(157,176,86) - 0xBE27, // 108 :: rgb(123,143,60) - 0xCEA8, // 109 :: rgb(154,175,62) - 0x3E42, // 110 :: rgb(126,146,18) - 0x73D6, // 111 :: rgb(227,242,183) - 0x5F68, // 112 :: rgb(190,217,65) - 0x5B49, // 113 :: rgb(184,211,74) - 0x636D, // 114 :: rgb(195,220,104) - 0xDB26, // 115 :: rgb(178,206,52) - 0x5F64, // 116 :: rgb(186,217,37) - 0x4ECC, // 117 :: rgb(160,178,98) - 0xD2CD, // 118 :: rgb(165,181,109) - 0x4249, // 119 :: rgb(129,147,77) - 0xDF4C, // 120 :: rgb(189,215,98) - 0xBA25, // 121 :: rgb(118,140,45) - 0xFFFE, // 122 :: rgb(254,255,249) - 0xE36B, // 123 :: rgb(196,223,92) - 0x5F69, // 124 :: rgb(191,218,76) - 0x5B48, // 125 :: rgb(181,209,65) - 0x2DA1, // 126 :: rgb(93,105,5) - 0x5302, // 127 :: rgb(166,195,15) - 0xDB41, // 128 :: rgb(181,214,11) - 0x4AA7, // 129 :: rgb(146,168,56) - 0x6F98, // 130 :: rgb(218,228,199) - 0x5B45, // 131 :: rgb(182,211,42) - 0x678F, // 132 :: rgb(203,226,123) - 0xBA24, // 133 :: rgb(119,140,32) - 0x6792, // 134 :: rgb(207,227,145) - 0xDB25, // 135 :: rgb(177,206,40) - 0xE367, // 136 :: rgb(195,223,56) - 0xE36E, // 137 :: rgb(197,221,117) - 0x6388, // 138 :: rgb(198,225,67) - 0x4EE2, // 139 :: rgb(159,187,13) - 0xBE44, // 140 :: rgb(127,149,30) - 0xBA03, // 141 :: rgb(114,133,22) - 0x4EC5, // 142 :: rgb(156,179,40) - 0x6B97, // 143 :: rgb(213,225,188) - 0x5F66, // 144 :: rgb(188,218,50) - 0x3E47, // 145 :: rgb(127,147,61) - 0x2960, // 146 :: rgb(80,89,3) - 0xBE22, // 147 :: rgb(121,141,15) - 0x5B4A, // 148 :: rgb(185,211,85) - 0xC246, // 149 :: rgb(128,150,46) - 0x5F6A, // 150 :: rgb(191,218,86) - 0xEF7A, // 151 :: rgb(222,223,214) - 0x6F7A, // 152 :: rgb(218,218,210) - 0x56EF, // 153 :: rgb(170,185,121) - 0x739B, // 154 :: rgb(227,227,221) - 0xE774, // 155 :: rgb(206,223,168) - 0x2981, // 156 :: rgb(86,97,5) - 0x5F63, // 157 :: rgb(188,219,24) - 0x3E43, // 158 :: rgb(123,145,27) - 0x7FFE, // 159 :: rgb(251,252,245) - 0x3E49, // 160 :: rgb(126,144,71) - 0x2101, // 161 :: rgb(69,66,9) - 0xEFB5, // 162 :: rgb(219,237,173) - 0x424A, // 163 :: rgb(131,147,86) - 0x678D, // 164 :: rgb(202,227,110) - 0x6758, // 165 :: rgb(208,209,195) - 0xDF65, // 166 :: rgb(193,223,41) - 0xE776, // 167 :: rgb(208,223,178) - 0x6316, // 168 :: rgb(196,195,181) - 0x2541, // 169 :: rgb(74,79,5) - 0xA903, // 170 :: rgb(79,68,22) - 0xC665, // 171 :: rgb(139,159,41) - 0x73BA, // 172 :: rgb(229,234,217) - 0x678C, // 173 :: rgb(202,228,99) - 0x6773, // 174 :: rgb(202,219,159) - 0xEB59, // 175 :: rgb(213,213,202) - 0xEF99, // 176 :: rgb(224,232,207) - 0x5EF5, // 177 :: rgb(190,185,172) - 0x638A, // 178 :: rgb(199,226,81) - 0x4EC3, // 179 :: rgb(154,180,24) - 0xC64C, // 180 :: rgb(136,151,95) - 0xB5E3, // 181 :: rgb(106,125,21) - 0x3A27, // 182 :: rgb(119,137,59) - 0x6737, // 183 :: rgb(203,201,189) - 0xBA06, // 184 :: rgb(114,133,53) - 0xC66C, // 185 :: rgb(142,157,102) - 0x6793, // 186 :: rgb(208,227,154) - 0x5B2D, // 187 :: rgb(177,201,103) - 0xBA04, // 188 :: rgb(113,134,37) - 0xCA6D, // 189 :: rgb(145,159,111) - 0xE790, // 190 :: rgb(209,232,128) - 0x6370, // 191 :: rgb(195,217,130) - 0xDB30, // 192 :: rgb(184,205,130) - 0xF7BB, // 193 :: rgb(236,239,223) - 0x5F51, // 194 :: rgb(191,211,142) - 0x3DCA, // 195 :: rgb(125,115,83) - 0x5AD4, // 196 :: rgb(182,177,161) - 0xD6F0, // 197 :: rgb(176,189,134) - 0x5B2E, // 198 :: rgb(181,204,117) - 0x4E4F, // 199 :: rgb(153,147,125) - 0x5303, // 200 :: rgb(168,196,27) - 0xD271, // 201 :: rgb(163,157,136) - 0xDF12, // 202 :: rgb(186,197,151) - 0xC1EC, // 203 :: rgb(134,125,96) - 0xE755, // 204 :: rgb(202,214,170) - 0xCA86, // 205 :: rgb(144,165,47) - 0xD692, // 206 :: rgb(174,167,149) - 0x5AF2, // 207 :: rgb(178,188,152) - 0xCA8E, // 208 :: rgb(151,164,117) - 0xB146, // 209 :: rgb(98,86,46) - 0x6353, // 210 :: rgb(194,212,154) - 0x6372, // 211 :: rgb(199,220,146) - 0x31C3, // 212 :: rgb(99,114,23) - 0xDF4E, // 213 :: rgb(190,214,115) - 0x4AAA, // 214 :: rgb(151,169,83) - 0xE334, // 215 :: rgb(195,205,168) - 0x6756, // 216 :: rgb(204,212,184) - 0xB5E5, // 217 :: rgb(107,124,41) - 0x52D2, // 218 :: rgb(168,178,144) - 0x4A2E, // 219 :: rgb(144,138,112) - 0xD705, // 220 :: rgb(172,199,43) - 0xF3D8, // 221 :: rgb(232,245,200) - 0x4EE6, // 222 :: rgb(160,185,52) - 0x4EAF, // 223 :: rgb(156,168,126) - 0x3587, // 224 :: rgb(107,97,59) - 0x39A9, // 225 :: rgb(119,106,71) - 0x5F15, // 226 :: rgb(187,194,170) - 0xC669, // 227 :: rgb(142,159,74) - 0xBE09, // 228 :: rgb(120,135,72) - 0x52E4, // 229 :: rgb(162,188,30) - 0xD2B1, // 230 :: rgb(161,173,136) - 0xD70A, // 231 :: rgb(173,200,85) - 0xAD24, // 232 :: rgb(88,77,33) - 0x4266, // 233 :: rgb(133,152,53) - 0x52E9, // 234 :: rgb(163,188,71) - 0x52EB, // 235 :: rgb(165,186,92) - 0x4687, // 236 :: rgb(142,161,55) - 0xEFB7, // 237 :: rgb(226,239,187) - 0x5707, // 238 :: rgb(171,196,59) - 0xAD84, // 239 :: rgb(94,102,31) - 0xFBDC, // 240 :: rgb(249,248,232) - 0x35E7, // 241 :: rgb(109,120,58) - 0x5A45, // 242 :: rgb(178,146,44) - 0xDE48, // 243 :: rgb(190,149,63) - 0x6689, // 244 :: rgb(203,161,74) - 0x5604, // 245 :: rgb(171,131,29) - 0x5628, // 246 :: rgb(169,137,62) - 0xC5A3, // 247 :: rgb(136,108,28) - 0xEAAB, // 248 :: rgb(214,175,88) - 0xC9E4, // 249 :: rgb(152,126,33) - 0x5EA8, // 250 :: rgb(186,168,67) - 0x3521, // 251 :: rgb(104,73,8) - 0x5E8D, // 252 :: rgb(192,163,106) - 0x4DE8, // 253 :: rgb(157,122,65) - 0xCA09, // 254 :: rgb(146,134,76) - 0x566C, // 255 :: rgb(173,152,98) +// Converted using ConvPNG +#include +#include "all_gfx.h" + +uint16_t all_gfx_pal[256] = { + 0xFFFF, // 00 :: rgb(255,255,255) + 0x4AA4, // 01 :: rgb(146,169,33) + 0xFFFF, // 02 :: rgb(255,255,253) + 0xCAA0, // 03 :: rgb(144,173,1) + 0xCAA0, // 04 :: rgb(148,176,1) + 0xCEC0, // 05 :: rgb(154,183,3) + 0xCAC0, // 06 :: rgb(152,181,3) + 0xFFFF, // 07 :: rgb(254,255,255) + 0xFFFF, // 08 :: rgb(253,254,253) + 0x4AC0, // 09 :: rgb(150,178,2) + 0xCAA0, // 10 :: rgb(147,174,3) + 0xC684, // 11 :: rgb(142,166,29) + 0x4AA4, // 12 :: rgb(148,172,32) + 0x7BFE, // 13 :: rgb(250,250,250) + 0x5301, // 14 :: rgb(166,196,5) + 0x4EE0, // 15 :: rgb(158,188,2) + 0x4AA3, // 16 :: rgb(146,170,27) + 0x4EE0, // 17 :: rgb(156,185,3) + 0xFFFF, // 18 :: rgb(255,254,255) + 0xC680, // 19 :: rgb(141,167,3) + 0xCEE0, // 20 :: rgb(160,190,3) + 0xCAA5, // 21 :: rgb(150,173,39) + 0xCAA4, // 22 :: rgb(152,175,31) + 0x4AA5, // 23 :: rgb(147,169,45) + 0xB600, // 24 :: rgb(110,132,3) + 0xCA84, // 25 :: rgb(144,167,34) + 0x4683, // 26 :: rgb(137,160,22) + 0x7FFF, // 27 :: rgb(252,252,251) + 0x4683, // 28 :: rgb(140,162,27) + 0x4684, // 29 :: rgb(140,161,34) + 0x46A0, // 30 :: rgb(143,170,1) + 0xC682, // 31 :: rgb(142,167,19) + 0x4AA7, // 32 :: rgb(150,172,59) + 0x4AA5, // 33 :: rgb(147,169,39) + 0xFBDD, // 34 :: rgb(244,245,242) + 0xD301, // 35 :: rgb(168,198,5) + 0xFBDE, // 36 :: rgb(247,248,245) + 0xCAA3, // 37 :: rgb(150,175,24) + 0x4280, // 38 :: rgb(135,160,3) + 0xBE20, // 39 :: rgb(120,143,3) + 0x3600, // 40 :: rgb(107,129,2) + 0x3A20, // 41 :: rgb(112,136,2) + 0xCAA1, // 42 :: rgb(149,176,6) + 0xCAA6, // 43 :: rgb(151,173,46) + 0x5722, // 44 :: rgb(173,203,15) + 0x4263, // 45 :: rgb(133,154,27) + 0xC664, // 46 :: rgb(137,158,30) + 0xC241, // 47 :: rgb(129,151,12) + 0xC680, // 48 :: rgb(137,164,1) + 0x7FFF, // 49 :: rgb(252,252,253) + 0xC262, // 50 :: rgb(135,158,18) + 0x4AA1, // 51 :: rgb(146,171,8) + 0x4AA3, // 52 :: rgb(147,171,23) + 0x4AA6, // 53 :: rgb(150,172,52) + 0xC260, // 54 :: rgb(131,157,2) + 0x6BB3, // 55 :: rgb(214,234,153) + 0xD2E0, // 56 :: rgb(162,192,3) + 0x4EC2, // 57 :: rgb(153,179,13) + 0x4AA2, // 58 :: rgb(146,172,17) + 0x5721, // 59 :: rgb(172,202,5) + 0xDB22, // 60 :: rgb(177,207,20) + 0x3E46, // 61 :: rgb(124,145,53) + 0x6FD6, // 62 :: rgb(224,241,178) + 0x6BB3, // 63 :: rgb(216,235,159) + 0xE791, // 64 :: rgb(207,229,139) + 0xBE45, // 65 :: rgb(126,149,40) + 0xD702, // 66 :: rgb(170,199,15) + 0x4264, // 67 :: rgb(130,152,35) + 0xEB92, // 68 :: rgb(211,232,146) + 0x3E60, // 69 :: rgb(127,153,1) + 0xC243, // 70 :: rgb(129,151,22) + 0xEFB5, // 71 :: rgb(223,240,173) + 0x5300, // 72 :: rgb(164,194,3) + 0x4262, // 73 :: rgb(132,154,16) + 0x3E45, // 74 :: rgb(123,145,45) + 0xCAA2, // 75 :: rgb(150,175,15) + 0xF7BC, // 76 :: rgb(237,238,233) + 0xB1C0, // 77 :: rgb(98,118,4) + 0xEFB4, // 78 :: rgb(221,238,168) + 0xFFFF, // 79 :: rgb(252,253,255) + 0xBE40, // 80 :: rgb(123,149,2) + 0x4265, // 81 :: rgb(131,153,41) + 0x4AA8, // 82 :: rgb(150,172,68) + 0x77DD, // 83 :: rgb(241,242,237) + 0xC684, // 84 :: rgb(142,164,33) + 0x6FB4, // 85 :: rgb(218,236,165) + 0x6790, // 86 :: rgb(203,225,133) + 0xD2E1, // 87 :: rgb(163,192,11) + 0x3E44, // 88 :: rgb(123,145,36) + 0x2DC0, // 89 :: rgb(94,113,2) + 0x31E0, // 90 :: rgb(101,123,1) + 0x73BC, // 91 :: rgb(232,233,228) + 0xC681, // 92 :: rgb(139,164,9) + 0x3E41, // 93 :: rgb(124,146,6) + 0xCEA9, // 94 :: rgb(154,175,75) + 0xCA85, // 95 :: rgb(144,167,40) + 0x5723, // 96 :: rgb(174,203,28) + 0xDB24, // 97 :: rgb(180,208,30) + 0xDB43, // 98 :: rgb(183,214,27) + 0xBA20, // 99 :: rgb(115,140,2) + 0x4264, // 100 :: rgb(135,155,37) + 0x3A21, // 101 :: rgb(117,138,6) + 0x5B47, // 102 :: rgb(183,212,55) + 0xC685, // 103 :: rgb(142,164,38) + 0xD721, // 104 :: rgb(175,208,7) + 0x73D7, // 105 :: rgb(230,244,191) + 0xB5E0, // 106 :: rgb(106,124,4) + 0xCEAA, // 107 :: rgb(157,176,86) + 0xBE27, // 108 :: rgb(123,143,60) + 0xCEA8, // 109 :: rgb(154,175,62) + 0x3E42, // 110 :: rgb(126,146,18) + 0x73D6, // 111 :: rgb(227,242,183) + 0x5F68, // 112 :: rgb(190,217,65) + 0x5B49, // 113 :: rgb(184,211,74) + 0x636D, // 114 :: rgb(195,220,104) + 0xDB26, // 115 :: rgb(178,206,52) + 0x5F64, // 116 :: rgb(186,217,37) + 0x4ECC, // 117 :: rgb(160,178,98) + 0xD2CD, // 118 :: rgb(165,181,109) + 0x4249, // 119 :: rgb(129,147,77) + 0xDF4C, // 120 :: rgb(189,215,98) + 0xBA25, // 121 :: rgb(118,140,45) + 0xFFFE, // 122 :: rgb(254,255,249) + 0xE36B, // 123 :: rgb(196,223,92) + 0x5F69, // 124 :: rgb(191,218,76) + 0x5B48, // 125 :: rgb(181,209,65) + 0x2DA1, // 126 :: rgb(93,105,5) + 0x5302, // 127 :: rgb(166,195,15) + 0xDB41, // 128 :: rgb(181,214,11) + 0x4AA7, // 129 :: rgb(146,168,56) + 0x6F98, // 130 :: rgb(218,228,199) + 0x5B45, // 131 :: rgb(182,211,42) + 0x678F, // 132 :: rgb(203,226,123) + 0xBA24, // 133 :: rgb(119,140,32) + 0x6792, // 134 :: rgb(207,227,145) + 0xDB25, // 135 :: rgb(177,206,40) + 0xE367, // 136 :: rgb(195,223,56) + 0xE36E, // 137 :: rgb(197,221,117) + 0x6388, // 138 :: rgb(198,225,67) + 0x4EE2, // 139 :: rgb(159,187,13) + 0xBE44, // 140 :: rgb(127,149,30) + 0xBA03, // 141 :: rgb(114,133,22) + 0x4EC5, // 142 :: rgb(156,179,40) + 0x6B97, // 143 :: rgb(213,225,188) + 0x5F66, // 144 :: rgb(188,218,50) + 0x3E47, // 145 :: rgb(127,147,61) + 0x2960, // 146 :: rgb(80,89,3) + 0xBE22, // 147 :: rgb(121,141,15) + 0x5B4A, // 148 :: rgb(185,211,85) + 0xC246, // 149 :: rgb(128,150,46) + 0x5F6A, // 150 :: rgb(191,218,86) + 0xEF7A, // 151 :: rgb(222,223,214) + 0x6F7A, // 152 :: rgb(218,218,210) + 0x56EF, // 153 :: rgb(170,185,121) + 0x739B, // 154 :: rgb(227,227,221) + 0xE774, // 155 :: rgb(206,223,168) + 0x2981, // 156 :: rgb(86,97,5) + 0x5F63, // 157 :: rgb(188,219,24) + 0x3E43, // 158 :: rgb(123,145,27) + 0x7FFE, // 159 :: rgb(251,252,245) + 0x3E49, // 160 :: rgb(126,144,71) + 0x2101, // 161 :: rgb(69,66,9) + 0xEFB5, // 162 :: rgb(219,237,173) + 0x424A, // 163 :: rgb(131,147,86) + 0x678D, // 164 :: rgb(202,227,110) + 0x6758, // 165 :: rgb(208,209,195) + 0xDF65, // 166 :: rgb(193,223,41) + 0xE776, // 167 :: rgb(208,223,178) + 0x6316, // 168 :: rgb(196,195,181) + 0x2541, // 169 :: rgb(74,79,5) + 0xA903, // 170 :: rgb(79,68,22) + 0xC665, // 171 :: rgb(139,159,41) + 0x73BA, // 172 :: rgb(229,234,217) + 0x678C, // 173 :: rgb(202,228,99) + 0x6773, // 174 :: rgb(202,219,159) + 0xEB59, // 175 :: rgb(213,213,202) + 0xEF99, // 176 :: rgb(224,232,207) + 0x5EF5, // 177 :: rgb(190,185,172) + 0x638A, // 178 :: rgb(199,226,81) + 0x4EC3, // 179 :: rgb(154,180,24) + 0xC64C, // 180 :: rgb(136,151,95) + 0xB5E3, // 181 :: rgb(106,125,21) + 0x3A27, // 182 :: rgb(119,137,59) + 0x6737, // 183 :: rgb(203,201,189) + 0xBA06, // 184 :: rgb(114,133,53) + 0xC66C, // 185 :: rgb(142,157,102) + 0x6793, // 186 :: rgb(208,227,154) + 0x5B2D, // 187 :: rgb(177,201,103) + 0xBA04, // 188 :: rgb(113,134,37) + 0xCA6D, // 189 :: rgb(145,159,111) + 0xE790, // 190 :: rgb(209,232,128) + 0x6370, // 191 :: rgb(195,217,130) + 0xDB30, // 192 :: rgb(184,205,130) + 0xF7BB, // 193 :: rgb(236,239,223) + 0x5F51, // 194 :: rgb(191,211,142) + 0x3DCA, // 195 :: rgb(125,115,83) + 0x5AD4, // 196 :: rgb(182,177,161) + 0xD6F0, // 197 :: rgb(176,189,134) + 0x5B2E, // 198 :: rgb(181,204,117) + 0x4E4F, // 199 :: rgb(153,147,125) + 0x5303, // 200 :: rgb(168,196,27) + 0xD271, // 201 :: rgb(163,157,136) + 0xDF12, // 202 :: rgb(186,197,151) + 0xC1EC, // 203 :: rgb(134,125,96) + 0xE755, // 204 :: rgb(202,214,170) + 0xCA86, // 205 :: rgb(144,165,47) + 0xD692, // 206 :: rgb(174,167,149) + 0x5AF2, // 207 :: rgb(178,188,152) + 0xCA8E, // 208 :: rgb(151,164,117) + 0xB146, // 209 :: rgb(98,86,46) + 0x6353, // 210 :: rgb(194,212,154) + 0x6372, // 211 :: rgb(199,220,146) + 0x31C3, // 212 :: rgb(99,114,23) + 0xDF4E, // 213 :: rgb(190,214,115) + 0x4AAA, // 214 :: rgb(151,169,83) + 0xE334, // 215 :: rgb(195,205,168) + 0x6756, // 216 :: rgb(204,212,184) + 0xB5E5, // 217 :: rgb(107,124,41) + 0x52D2, // 218 :: rgb(168,178,144) + 0x4A2E, // 219 :: rgb(144,138,112) + 0xD705, // 220 :: rgb(172,199,43) + 0xF3D8, // 221 :: rgb(232,245,200) + 0x4EE6, // 222 :: rgb(160,185,52) + 0x4EAF, // 223 :: rgb(156,168,126) + 0x3587, // 224 :: rgb(107,97,59) + 0x39A9, // 225 :: rgb(119,106,71) + 0x5F15, // 226 :: rgb(187,194,170) + 0xC669, // 227 :: rgb(142,159,74) + 0xBE09, // 228 :: rgb(120,135,72) + 0x52E4, // 229 :: rgb(162,188,30) + 0xD2B1, // 230 :: rgb(161,173,136) + 0xD70A, // 231 :: rgb(173,200,85) + 0xAD24, // 232 :: rgb(88,77,33) + 0x4266, // 233 :: rgb(133,152,53) + 0x52E9, // 234 :: rgb(163,188,71) + 0x52EB, // 235 :: rgb(165,186,92) + 0x4687, // 236 :: rgb(142,161,55) + 0xEFB7, // 237 :: rgb(226,239,187) + 0x5707, // 238 :: rgb(171,196,59) + 0xAD84, // 239 :: rgb(94,102,31) + 0xFBDC, // 240 :: rgb(249,248,232) + 0x35E7, // 241 :: rgb(109,120,58) + 0x5A45, // 242 :: rgb(178,146,44) + 0xDE48, // 243 :: rgb(190,149,63) + 0x6689, // 244 :: rgb(203,161,74) + 0x5604, // 245 :: rgb(171,131,29) + 0x5628, // 246 :: rgb(169,137,62) + 0xC5A3, // 247 :: rgb(136,108,28) + 0xEAAB, // 248 :: rgb(214,175,88) + 0xC9E4, // 249 :: rgb(152,126,33) + 0x5EA8, // 250 :: rgb(186,168,67) + 0x3521, // 251 :: rgb(104,73,8) + 0x5E8D, // 252 :: rgb(192,163,106) + 0x4DE8, // 253 :: rgb(157,122,65) + 0xCA09, // 254 :: rgb(146,134,76) + 0x566C, // 255 :: rgb(173,152,98) }; \ No newline at end of file diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_compress/src/gfx/all_gfx.h b/frontends/calculator/CEdev/examples/gfx_sprite_compress/src/gfx/all_gfx.h index 514fb34..8a6281d 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_compress/src/gfx/all_gfx.h +++ b/frontends/calculator/CEdev/examples/gfx_sprite_compress/src/gfx/all_gfx.h @@ -1,13 +1,13 @@ -// Converted using ConvPNG -// This file contains all the graphics sources for easier inclusion in a project -#ifndef __all_gfx__ -#define __all_gfx__ -#include - -#define apple_width 220 -#define apple_height 240 -extern uint8_t apple_compressed[21119]; -#define sizeof_all_gfx_pal 512 -extern uint16_t all_gfx_pal[256]; - -#endif +// Converted using ConvPNG +// This file contains all the graphics sources for easier inclusion in a project +#ifndef __all_gfx__ +#define __all_gfx__ +#include + +#define apple_width 220 +#define apple_height 240 +extern uint8_t apple_compressed[21119]; +#define sizeof_all_gfx_pal 512 +extern uint16_t all_gfx_pal[256]; + +#endif diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_compress/src/gfx/apple.c b/frontends/calculator/CEdev/examples/gfx_sprite_compress/src/gfx/apple.c index 8baf3bf..043d52f 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_compress/src/gfx/apple.c +++ b/frontends/calculator/CEdev/examples/gfx_sprite_compress/src/gfx/apple.c @@ -1,667 +1,667 @@ -// Converted using ConvPNG -#include -#include "all_gfx.h" - -// 8 bpp image -uint8_t apple_compressed[21119] = { - 0xDC,0x20,0xF0,0x00,0x46,0x00,0x02,0x02,0x1B,0x12,0x12,0x07,0x4F,0x83,0x00,0x0D,0x00,0x12,0x02,0x0A,0x20,0x12,0x00,0x32,0x86,0x00,0x7A,0x12,0x22,0xD6,0x01,0x07, - 0x07,0x08,0x02,0x80,0xE4,0x4F,0x12,0x0D,0x20,0x12,0x1B,0x32,0xC0,0xDB,0x24,0x07,0x64,0x31,0xAF,0x7A,0x52,0xF0,0x00,0x02,0x8A,0xBE,0x03,0x34,0xB7,0xA8,0xB4,0x80, - 0x7A,0x9F,0xB7,0xC9,0xE1,0xCB,0x3E,0xC7,0xC1,0x0A,0x01,0x03,0x30,0xB7,0x80,0x4F,0x24,0x02,0xF0,0xA8,0xCB,0x51,0xE1,0x00,0xB7,0x9F,0x82,0xE6,0x31,0x03,0x34,0xB7, - 0x80,0x4F,0x7A,0x98,0xCB,0xE0,0xF7,0x01,0xF6,0xFD,0xFD,0xCE,0xF0,0x7A,0x02,0xA4,0xA2,0x06,0x58,0xDB,0x64,0xA9,0x9F,0x00,0xCE,0xAA,0xFB,0xFB,0xF6,0xF3,0xFC,0xFC, - 0x35,0xCC,0xB0,0xF3,0x40,0x4F,0x65,0x86,0xDB,0xBD,0xE0,0x9F,0xC7,0xE1,0xFD,0xF7,0xF0,0x00,0xDC,0x08,0xFF,0xC4,0xF0,0x1B,0x0C,0xC0,0xDB,0x03,0x07,0x00,0x9F,0xC3, - 0xA1,0xD1,0xDA,0x00,0xF9,0xF3,0xF3,0xF6,0x02,0xFC,0xED,0x9F,0x24,0x4F,0x07,0xB2,0xE4,0xA4,0xB9,0x00,0x08,0xF8,0x1B,0x03,0x0B,0xE0,0xDB,0xC8,0xB7,0xCB,0xA1,0x52, - 0xA1,0x95,0x00,0xF9,0xF8,0xF3,0xFD,0xFF,0xFC,0xB1,0x3C,0xFC,0xF0,0xE5,0x09,0x1B,0x9F,0x7A,0x31,0x42,0xDB,0x02,0xF4,0xDC,0x00,0x31,0x4F,0x02,0xA5,0xC4,0xC9,0x30, - 0xCB,0xE8,0xDC,0x1B,0xF7,0xF4,0xF4,0xD1,0xD2,0x9A,0x01,0x97,0x12,0x08,0x7A,0x0D,0x31,0x61,0xD7,0xC0,0x03,0x5E,0x83,0xDC,0x12,0xCC,0x73,0x22,0x7A,0xBB,0xE5,0xAF, - 0x81,0xDD,0xF5,0xF8,0x90,0xBB,0xF5,0xF5,0xFD,0x3C,0xD7,0x9F,0x13,0xDF,0x38,0x00,0x0C,0x27,0xCB,0xF0,0xD2,0x07,0x08,0xC4,0x01,0x4C,0xA8,0xE1,0x92,0xAE,0xF5,0x52, - 0xF2,0xF7,0xC0,0x63,0x3B,0xD3,0x12,0xBC,0x7D,0x96,0x2C,0x00,0x08,0xAC,0x18,0xDB,0xD1,0xFB,0xDE,0x68,0x94,0xF4,0xC0,0xDF,0xFC,0xB0,0xC2,0xF0,0x03,0x05,0xEE,0x64, - 0xBF,0x03,0x07,0x07,0xE0,0x03,0x22,0x08,0x9B,0x91,0xA5,0xDB,0xE1,0x4A,0xF6,0xF9,0xC8,0xBA,0xF5,0xF6,0x2E,0xC1,0x24,0x1B,0x02,0xF9,0x98,0x1A,0x02,0x00,0x08,0x9A, - 0x02,0x00,0xF3,0xD6,0xE9,0x0B,0xF0,0xCC,0xFE,0xEA,0xCC,0xDC,0x02,0xF6,0xF6,0x4C,0x24,0xEE,0x82,0x03,0x2C,0x00,0x0D,0x22,0x19,0xCE,0xC3,0xF9,0xB8,0x2A,0xF5,0xB1, - 0x74,0x96,0x69,0x0D,0xA7,0xBC,0xE9,0x06,0x20,0xD6,0x48,0xFE,0x61,0x1B,0x0D,0xF0,0xD7,0xA3,0x94,0xF2,0xDD,0x00,0xF8,0xFD,0xFD,0xC1,0x04,0x02,0x4F,0x0D,0x02,0x1B, - 0x06,0x30,0xDB,0x48,0xDD,0x1D,0x8E,0x9C,0xA7,0xFE,0xAD,0x81,0xF2,0xF4,0xF5,0xF7,0xFF,0xF0,0xB1,0x88,0x7A,0x9F,0x01,0x88,0xDA,0x13,0x10,0xBA,0x31,0x02,0x9F,0x0E, - 0xB0,0xFE,0xFF,0xF4,0x89,0xE8,0xDC,0x1C,0x9F,0xC4,0xA0,0x4F,0x31,0xC2,0xDB,0xD4,0x04,0x4F,0xE5,0xA2,0xC1,0xFF,0xF9,0xF8,0xC5,0xF7,0xCA,0x20,0x7A,0x31,0x32,0x83, - 0xDB,0x05,0xE4,0xAD,0x24,0x4F,0x07,0x7A,0x82,0xFE,0xFC,0xFC,0xE6,0x83,0xF9,0xF7,0xD8,0xB8,0x2B,0x16,0x80,0xC7,0xCF,0x72,0x7A,0x1B,0xB8,0xCD,0x7A,0xAC,0x6A,0xE0, - 0xF3,0xF8,0xBC,0xE6,0x40,0x1B,0x63,0x84,0xD8,0x8F,0xCB,0x6B,0xE4,0xA8,0xF3,0xAF,0x7E,0xF9,0x64,0xF4,0xB9,0xF2,0x6F,0xFC,0xCF,0x01,0xA4,0x00,0xC4,0x28,0xD4,0xF9, - 0xB9,0x81,0xF6,0xCC,0x12,0x1B,0x9F,0x90,0xCA,0x07,0x0D,0x07,0x4D,0x08,0x00,0x09,0xCC,0xDE,0x5C,0x00,0x05,0x19,0xC4,0x01,0x9F,0x76,0xF9,0xF6,0xFA,0xF2,0x83,0xDC, - 0xC1,0xCF,0x70,0x00,0x02,0x08,0x02,0x47,0x07,0x84,0xCB,0x05,0xDE,0xEA,0x3B,0x02,0x89,0x7C,0xF6,0xC4,0xF5,0x03,0xF9,0xCE,0x9F,0x31,0x31,0x07,0xBA,0x24,0x0D,0x3F, - 0x32,0x01,0x56,0xDF,0x1C,0xA0,0x98,0xA8,0xFE,0xDA,0x64,0x00,0xFE,0xAC,0x80,0xDB,0x12,0x9C,0xAF,0xA1,0xC4,0x90,0x80,0xA6,0xCF,0x2D,0xD0,0xC2,0x9F,0xC5,0xF6,0xF5, - 0x90,0x94,0xCA,0x0D,0x1B,0x12,0x22,0x9F,0xE0,0xCE,0xC9,0x08,0x1B,0xA5,0x00,0x0D,0x54,0x00,0x06,0xE1,0xD1,0x01,0x54,0xDB,0x00,0x00,0xAC,0xE1,0xF6,0xF2,0xC2,0x00, - 0xFD,0xA5,0x02,0x24,0xA6,0xBC,0x70,0xBC,0x89,0xD7,0x08,0x80,0xE2,0x89,0xD0,0x08,0x0A,0x12,0xBF,0x90,0xC1,0x30,0xD0,0x1A,0x02,0x22,0x99,0xF0,0xE0,0xDD,0xF9,0x37, - 0xFF,0xC1,0xC9,0xE7,0xAD,0x13,0x98,0xA8,0xA6,0x00,0x7C,0x24,0x00,0x04,0x6D,0x12,0x40,0x0D,0x50,0x85,0xDB,0x00,0xB0,0x24,0x53,0xF0,0x05,0xC1,0x24,0x8F,0x93,0xF9, - 0x20,0x96,0xF7,0xCA,0x7A,0xCB,0x0F,0x9F,0x24,0x00,0x69,0x22,0x00,0x53,0x95,0x00,0x4C,0x03,0xF3,0x0D,0x00,0x4B,0x16,0x0A,0x41,0xDF,0x03,0xA8,0xDB,0x36,0x02,0x00, - 0x7A,0xDC,0x7C,0x04,0x82,0x78,0x08,0x4F,0x12,0x53,0x00,0x07,0x07,0xD8,0x53,0x22,0xF0,0xC8,0x0B,0xAE,0x00,0xC1,0xC1,0xAC,0xAC,0x50,0xB0,0x00,0x82,0x8F,0xA7,0x00, - 0xCC,0x9B,0xC2,0xC2,0x9B,0xAE,0xE9,0xF7,0x37,0xF4,0xDE,0xCE,0x30,0xF6,0x55,0x0D,0xAE,0xCC,0xCC,0xA7,0x91,0x00,0x9B,0x52,0x00,0x8C,0x09,0x8F,0x82,0xB0,0x2E,0x5B, - 0xAC,0x89,0x00,0xCA,0x3E,0xC1,0x4C,0xF2,0x0C,0xE3,0x0F,0x31,0x4F,0x00,0xEA,0x23,0x4F,0x08,0x6E,0xE9,0x00,0x74,0x1B,0x48,0x6F,0x07,0x17,0xC2,0xDA,0xE7,0x00,0xD2, - 0x16,0x07,0x00,0x1B,0xB2,0x8C,0xA0,0xD1,0x50,0xAC,0xCC,0x16,0x8F,0xCC,0x00,0xD2,0x98,0x00,0xC2,0xC0,0x78,0xC6,0x02,0x01,0xBF,0xEB,0xF7,0x07,0xF2,0xFA,0xF3,0xF2, - 0xF3,0x0A,0xB8,0x0F,0xC0,0x04,0x8D,0x00,0x20,0xAE,0x83,0xEB,0xA7,0x33,0x61,0x82,0xDD,0x3F,0x00,0x42,0x35,0x00,0x61,0x0A,0xE4,0x82,0xDF,0x9F,0x8A,0xC1,0xF9,0x6E, - 0x05,0x0F,0x89,0x6C,0x81,0x74,0xDA,0x2A,0x04,0x8A,0xA7,0x86,0xD1,0xF3,0x6C,0xF4,0xCE,0xDD,0x8A,0xA6,0x42,0xA4,0xF2,0x00,0xA6,0x60,0xCC,0xB1,0xC0,0xA6,0x00,0xC6, - 0xC3,0x12,0x98,0x06,0xBB,0xBB,0x03,0xE7,0x94,0xBB,0x58,0xEC,0xDC,0x00,0xF4,0xFC,0xBF,0xBB,0xE7,0xBB,0x78,0x4E,0xD5,0x00,0xBF,0xCB,0x00,0xD3,0xD3,0xDB,0x0A,0x00, - 0x4F,0x82,0x00,0xC5,0x46,0x50,0x00,0xE1,0x65,0xC2,0x85,0xDF,0x48,0x70,0x9E,0x77,0x70,0x02,0xF0,0xDB,0x25,0x07,0x83,0x45,0x07,0x06,0xD8,0xAD,0x54,0xFD,0x76,0x8F, - 0x16,0xE3,0x7D,0x00,0x95,0xB2,0x82,0xDC,0xC6,0x6C,0x00,0xD9,0x18,0xE7,0x00,0xEE,0x73,0xDC,0x00,0xEE,0xEE,0xF7,0xF9,0xFA,0xFA,0xF8,0xF4,0x0C,0x78,0x7D,0xEE,0x7D, - 0x00,0x71,0x71,0x31,0x94,0x78,0x00,0x72,0xD5,0x89,0x60,0xDC,0xAE,0xA4,0x9A,0x8C,0xDB,0x09,0x06,0xA3,0x74,0xB2,0xBC,0x18,0xBE,0x8D,0x22,0x0D,0x9D,0x30,0xDD,0xAD, - 0x9F,0xB8,0x7D,0x18,0x8B,0xB7,0xF1,0x5B,0x86,0x49,0x82,0xD9,0xC1,0x8C,0xAE,0x72,0x00,0x22,0x87,0xC0,0x40,0xD5,0xB0,0xD7,0x00,0xEA,0xDE,0xDE,0xEE,0x87,0x57,0x60, - 0x57,0x1C,0x8B,0x87,0x16,0xA8,0x81,0xFA,0xF4,0xF3,0xFA,0xEE,0xDC,0x23,0x00,0x73,0xDF,0x0A,0xDD,0x0B,0xB9,0x22,0xC2,0xD3,0x82,0xDD,0xD3,0x94,0x49,0x9D,0x92,0x24, - 0x4D,0x89,0x00,0xA6,0x8F,0xDB,0x8D,0xDD,0x0B,0xB8,0x2D,0x86,0x60,0x5D,0xDB,0x0B,0x89,0x45,0x02,0x35,0xDD,0x24,0x89,0xC0,0x89,0x8F,0x99,0x9B,0xEC,0xDB,0x27,0xB5, - 0x2B,0xD8,0x0B,0xD9,0x06,0xB3,0x00,0x38,0x1A,0x48,0x57,0x7F,0x02,0x73,0x80,0xD8,0xF4,0xF4,0x00,0xFA,0x7D,0x73,0x66,0x83,0x87,0x60,0x87,0x88,0xDB,0x05,0xC2,0x82, - 0xDB,0xA7,0x50,0xD9,0xB8,0x4B,0x97,0xE7,0x94,0xA9,0x6E,0x05,0x40,0xDD,0xD5,0xFA,0x9F,0x3A,0xF5,0xC0,0xB3,0x00,0x42,0xBD,0x7A,0x32,0x24,0xF0,0xB1,0x9C,0x8A,0x27, - 0x00,0xB7,0xC2,0xC2,0x8C,0x60,0xDB,0x90,0xB3,0xA8,0xDA,0x00,0xE5,0x8B,0x05,0x03,0x11,0x48,0x06,0x14,0x42,0x60,0xC8,0x73,0x90,0x86,0xF4,0xF8,0x03,0x71,0x30,0x7D, - 0x70,0xDC,0xD8,0x00,0x66,0xDB,0x14,0x96,0x96,0x95,0x8B,0xBF,0xD9,0x04,0x8F,0x85,0xAE,0x61,0xD2,0x21,0xF6,0x5B,0xE2,0xCB,0x07,0x7F,0x00,0x20,0x00,0xAC,0x0C,0xCC, - 0xDD,0x06,0xF0,0x9F,0x7A,0xCB,0xF0,0x2F,0x86,0xDB,0x8C,0x98,0xE5,0xCE,0xB9,0x69,0xAE,0x95,0x96,0x8F,0x2A,0xF4,0xCA,0xB9,0x56,0x91,0x81,0xE7,0xEB,0xEA,0x6D,0x40, - 0xDC,0xE5,0x60,0x11,0xDF,0x57,0x09,0x57,0xDC,0x71,0xDC,0x03,0xDB,0x00,0xD4,0xEB,0x7D,0x66,0x05,0x66,0x90,0x70,0x70,0x71,0xAD,0xF4,0x28,0xF1,0xD3,0xD8,0x82,0xB4, - 0xD7,0x63,0xD8,0x97,0xD0,0x00,0xC6,0x68,0xA4,0x56,0xE9,0x02,0xA9,0x2E,0xCD,0x69,0x0C,0xC0,0x34,0xD7,0xE0,0xDC,0x9B,0xF7,0x5F,0xD6,0xC8,0xBA,0x00,0x4F,0x81,0x37, - 0xDC,0xE6,0xD3,0x0A,0xD4,0xCA,0xCC,0xCE,0x9E,0x4A,0x0D,0x53,0xB3,0x2C,0xA6,0xA4,0xDE,0x5A,0xDC,0x09,0xA1,0xE4,0xB0,0x79,0x98,0x73,0xAC,0x55,0xFF,0x20,0xDC,0x4C, - 0xB7,0x58,0x00,0x06,0x06,0x14,0x53,0x7F,0xCC,0xD3,0xC9,0xA8,0xF3,0xDD,0x00,0xD5,0x94,0x71,0x66,0x74,0x62,0x60,0x74,0xDD,0x66,0xD0,0x95,0xD5,0xD3,0xB3,0xEE,0x9C, - 0x93,0x6C,0xA0,0xB0,0xDE,0xA0,0xD8,0x50,0x56,0xDE,0x5A,0xD7,0x2C,0xBF,0xA5,0x57,0xD5,0xEE,0x36,0xDF,0x0A,0xCC,0x2B,0x3A,0xB0,0x53,0x9C,0xC3,0x85,0x83,0x0B,0xC8, - 0x88,0x12,0xC3,0xE2,0xAF,0x2D,0xE5,0x6B,0xCC,0x16,0x4F,0xD9,0x16,0x8C,0x1C,0x00,0x4B,0xED,0x59,0xB9,0x4D,0x93,0x8E,0xB0,0x1B,0xC2,0xDD,0x40,0xDC,0xC0,0xDA,0x39, - 0x05,0x00,0x11,0x05,0x09,0x11,0x14,0x38,0xC8,0x66,0x53,0x70,0xC9,0xB0,0xF3,0xDA,0x29,0xFA,0x72,0x93,0x05,0x61,0x61,0x83,0x2E,0xEF,0x90,0x8B,0xBA,0x3A,0xA4,0xC9, - 0xB2,0xB0,0xE8,0x00,0xD2,0x28,0xB7,0x8B,0xD5,0x78,0xC2,0x97,0x72,0x03,0xF7,0x3F,0xAE,0xB2,0x90,0xC6,0x22,0xF2,0x69,0x98,0x31,0x64,0x97,0x4C,0x24,0xF5,0xC4,0x5E, - 0xFF,0x87,0x10,0x26,0x3C,0xD3,0x96,0xDE,0x9F,0xC1,0xD9,0xED,0x20,0xD8,0x13,0xBA,0xBA,0x87,0xDA,0x09,0x4B,0xB3,0xD5,0x0F,0x09,0x85,0xE0,0xAB,0xB9,0xD8,0xE0,0x39, - 0x0B,0xBA,0x94,0x40,0x8E,0xB3,0x06,0x09,0x00,0x06,0x05,0x7F,0xC8,0xE5,0xDE,0xE7,0x78,0x0C,0xFA,0xF2,0xF5,0xF5,0xB7,0x8B,0xFA,0x89,0xBB,0x0A,0xE7,0x5B,0x30,0x2D, - 0xA2,0x9B,0xC1,0x32,0xA4,0x50,0x89,0x00,0x84,0xD5,0x72,0xE8,0x00,0xD8,0x14,0x94,0xB4,0x9F,0x02,0x03,0xBD,0x00,0xEE,0x00,0xB6,0x3D,0x9D,0xE5,0x47,0x00,0xA2,0xBB, - 0xC0,0xDD,0xD8,0xAF,0x30,0xAC,0x24,0xD5,0x81,0x44,0xDB,0x28,0xDD,0x19,0x24,0xB3,0x24,0x8F,0xC1,0x8C,0xD0,0x09,0x37,0xBA,0x64,0x00,0xF2,0x15,0x86,0x5A,0x08,0xA2, - 0x49,0x87,0xD7,0xBB,0x34,0xBE,0xB9,0x81,0x62,0xF9,0xDE,0xC0,0xDC,0x4B,0x16,0x69,0x8E,0x90,0xFC,0x00,0xBE,0xEE,0x76,0x21,0x84,0xFA,0xCD,0xE6,0xAE,0x36,0x87,0xA9, - 0xD8,0xAE,0xED,0xDE,0x52,0xBF,0x06,0xCE,0xC4,0x14,0x00,0x7C,0xAA,0x07,0xC7,0x91,0x66,0x73,0x73,0xCF,0xCA,0x00,0xF6,0x06,0x00,0x37,0xBB,0xBE,0xFD,0xBB,0x04,0xF9, - 0x56,0xCA,0xD4,0xEE,0xAC,0xB0,0x73,0xBC,0xD5,0xA8,0x7A,0x02,0x5A,0xEF,0xF5,0x80,0xD3,0xF6,0xAC,0xB3,0x2B,0xD8,0x09,0x92,0x00,0x86,0x2E,0x00,0xAE,0x08,0x70,0xE4, - 0xA5,0xB2,0x90,0xDF,0x28,0xFF,0x3B,0x04,0x9C,0x4C,0x97,0xAC,0x99,0xB2,0xC2,0xFA,0x00,0x03,0xF1,0xAC,0xD4,0x2E,0x13,0xE9,0x12,0x00,0xD5,0x64,0xA6,0x94,0xB7,0xDB, - 0xBE,0x00,0xC0,0x5F,0x90,0x03,0x06,0x86,0xD4,0xDD,0x03,0x73,0x61,0x3C,0xB5,0x4B,0xB7,0x4F,0xF6,0xBE,0xF7,0xA4,0x9A,0x88,0x00,0xC3,0xDE,0x4E,0xDD,0xFB,0xC1,0x25, - 0x8D,0xC0,0x94,0xDB,0x02,0x08,0x9F,0x22,0xCB,0xB4,0xC9,0x04,0xAE,0xE0,0xD6,0x40,0x29,0x40,0x56,0x00,0xBE,0xEB,0x08,0x07,0x84,0x09,0xE7,0x00,0xE2,0x84,0xC0,0xE7, - 0xC8,0x6B,0xA7,0x2E,0x06,0xC7,0x0B,0xC0,0xCE,0xAF,0x1C,0x02,0x6B,0xBF,0x12,0xE7,0xAA,0x29,0x26,0xB1,0xA6,0xB3,0x94,0x00,0x74,0x00,0x83,0xAF,0x02,0x0D,0xD2,0x0C, - 0xB0,0xB3,0x16,0x3C,0x68,0xDC,0x00,0x3C,0x87,0x7D,0x96,0x0A,0x94,0x7D,0xDC,0xC8,0xBB,0x27,0xE7,0x30,0x26,0x00,0xA0,0x34,0xBB,0x59,0xBA,0x58,0xDC,0x67,0xC3,0x02, - 0x20,0xDB,0x48,0x04,0x1B,0x1C,0x0D,0xC1,0xAC,0x9C,0xA6,0x9B,0xAF,0x24,0x40,0xA0,0xCA,0x84,0x90,0x00,0xA4,0xAD,0x6B,0x7B,0x00,0x72,0x00,0x2A,0x89,0xD5,0xD4,0x82, - 0x44,0x84,0x78,0xE7,0xCF,0xE1,0xBA,0x09,0x01,0x8F,0xBB,0x6B,0xDE,0xD1,0x00,0xA5,0x6B,0xE9,0x9D,0x14,0xE7,0x71,0x29,0x15,0xA9,0xE5,0x00,0xA0,0xBB,0xD2,0x62,0x00, - 0x74,0x83,0x02,0xD4,0x1A,0x04,0x80,0xD7,0x0B,0x66,0xFC,0x94,0xE0,0x06,0x68,0x3B,0xDC,0x1E,0x01,0xE5,0x14,0xA2,0x98,0xDC,0x29,0xC8,0xD3,0x39,0xF3,0xAE,0x02,0x00, - 0x8B,0xFD,0xF7,0x55,0xC2,0x22,0x97,0x24,0xC2,0xDB,0x04,0x6C,0x00,0xDA,0x12,0x24,0x06,0xDA,0xE5,0xA5,0xD3,0x44,0x94,0xA7,0xCA,0x00,0x89,0xD0,0x03,0x7B,0x7C,0xCC, - 0x3C,0x00,0x70,0x7C,0xD6,0x00,0x96,0xA4,0xEC,0x56,0xE8,0xE8,0x91,0x2B,0xF7,0xFA,0x05,0xE2,0x0F,0x02,0x12,0xC1,0x8E,0x94,0x58,0x11,0xCA,0x03,0x83,0x60,0x61,0x60, - 0x60,0x04,0xD5,0xCB,0x60,0x47,0xF1,0xE1,0x21,0xD9,0x83,0xBE,0x68,0xD1,0x06,0x9D,0x02,0x74,0xA2,0xB8,0x56,0x9D,0x00,0x08,0x70,0x6D,0x8A,0x4B,0x62,0x1B,0x60,0xFA, - 0x18,0x19,0x02,0x2C,0xB1,0x26,0x83,0x28,0x23,0x0E,0xDC,0x1A,0xDE,0x00,0xEA,0x45,0x00,0xEB,0x20,0x97,0xCA,0xD7,0x82,0x10,0x4C,0x31,0x12,0x20,0x97,0xB1,0x03,0x52, - 0xF3,0x31,0x09,0x4F,0x9F,0xC1,0x8F,0x27,0x93,0xD7,0x0F,0x00,0xA8,0x2A,0x82,0x4C,0x04,0x56,0x89,0xCB,0xB0,0xD6,0x00,0x8A,0xB2,0xB2,0x88,0x1F,0xA6,0xA6,0x88,0x8B, - 0x7A,0x02,0x00,0x83,0x83,0x00,0x87,0x62,0x2C,0x42,0xB2,0x5C,0xBF,0x31,0xFA,0x30,0x23,0x23,0xC7,0xAA,0x08,0xF0,0xAD,0x14,0x3C,0xF2,0x0E,0x02,0x2C,0x00,0x80,0x03, - 0x62,0x66,0x32,0x78,0x89,0x2D,0x3C,0x80,0xAC,0x00,0xDB,0x31,0x98,0xE9,0x44,0x97,0x32,0xB8,0xB0,0xE6,0x64,0x62,0xAE,0x87,0xE8,0x16,0xB7,0xA8,0x32,0x3C,0xC8,0xC4, - 0x92,0x0E,0x23,0xA9,0xE7,0xE6,0xE8,0x93,0x99,0xD3,0xBA,0xC0,0x2E,0xFC,0x4C,0xBB,0xC5,0xDC,0x06,0x8F,0x4C,0x4F,0xF2,0xA3,0x12,0x1B,0x31,0xAF,0x94,0x08,0x1C,0xAF, - 0xE8,0x03,0x69,0x05,0x22,0x9E,0xC4,0x55,0xE4,0x52,0xBE,0x86,0x6D,0x00,0xA4,0x88,0x18,0xB2,0xCE,0x19,0x8A,0x8A,0xB7,0x36,0x88,0x00,0xA6,0xF8,0x34,0x9B,0x0A,0x3C, - 0x00,0x6A,0x68,0x05,0x61,0xDA,0x3A,0xFA,0x10,0x3B,0x3B,0x2C,0x60,0xB2,0xA3,0xC2,0xAB,0x8F,0xE8,0x15,0xE7,0x10,0x00,0xC3,0xB9,0xCD,0x01,0x7B,0xA4,0x7C,0xE5,0x15, - 0xAA,0xE4,0x0A,0xB8,0xA6,0xB2,0xF4,0x61,0x8A,0xDC,0x8C,0xA2,0x80,0xDB,0x80,0x51,0x83,0xBB,0x6D,0x3C,0x2C,0x1A,0x3C,0x86,0x34,0x2C,0x3C,0x60,0x0E,0x00,0x57,0xFF, - 0x80,0xDD,0x05,0xEA,0x01,0xDB,0x8E,0x8E,0x44,0xBE,0xEB,0x30,0x76,0xC5,0xDD,0xD0,0x96,0x1B,0x02,0xA2,0xBA,0x70,0x07,0x05,0x6A,0xDA,0x09,0x08,0x03,0xDF,0x41,0x1C, - 0x02,0xF0,0xB0,0xF2,0x5E,0xDF,0xC8,0xE7,0xBA,0x89,0x0C,0x56,0xA4,0xB2,0xD2,0x2B,0x02,0x00,0xC2,0xD4,0xF0,0x08,0xD9,0xF0,0x00,0xD8,0xB0,0xA8,0xA0,0xB6,0xA0,0x92, - 0x65,0x83,0x15,0x90,0x61,0x02,0xDB,0x68,0xDD,0x91,0x62,0x96,0xB7,0xB0,0x14,0xA7,0xFA,0xD0,0xC4,0x52,0x00,0xD8,0xE0,0xCD,0x96,0x65,0x96,0xF4,0x45,0xAC,0x5B,0x19, - 0x2D,0x70,0x0E,0xA2,0xFE,0xE8,0x47,0xB9,0xAB,0x28,0x10,0x90,0xDB,0x16,0x61,0x8E,0xD4,0x45,0x0E,0x19,0x48,0x48,0x14,0x00,0x0F,0x11,0x45,0xB4,0x57,0xD2,0x80,0xDC, - 0xDE,0x6D,0x6B,0xC1,0xDD,0x99,0x91,0xBA,0x4C,0x7A,0x7B,0xF2,0xF4,0xCA,0x1D,0x48,0xA4,0x08,0x12,0x07,0x2F,0xF0,0x82,0xD2,0x2B,0xB7,0xC6,0x40,0xBE,0xA4,0xDF,0xAD, - 0xAD,0x03,0x96,0x85,0x95,0x03,0x89,0xA6,0x03,0xB0,0xD9,0xC3,0xD7,0xF9,0x1C,0x0A,0x90,0x88,0xA0,0xBC,0x98,0xF4,0xF4,0x84,0x4A,0x90,0xA6,0x56,0xA9,0x1E,0x16,0x05, - 0xA6,0xF5,0x07,0xCC,0xB3,0xFF,0xFA,0x05,0x0C,0x9B,0x2B,0xBF,0x42,0x7D,0x7C,0xB1,0x00,0x83,0xF2,0x00,0xE4,0xF0,0x45,0xE9,0xCD,0x84,0x7C,0xC9,0x4A,0xB0,0x39,0x80, - 0xD1,0xE5,0x63,0xA0,0x4D,0x9B,0x95,0xB4,0xA0,0x98,0x23,0x48,0x38,0x31,0x14,0x38,0x02,0x0F,0x39,0xE5,0x83,0xDC,0xE5,0x00,0xC0,0xDC,0x6D,0x5E,0xAB,0xD1,0xC8,0xBB, - 0xA5,0x53,0x6B,0x7A,0xAB,0x94,0xB7,0x1E,0x60,0xE7,0x07,0x53,0xB0,0xCA,0xB4,0xB1,0xBE,0x86,0x6B,0xE4,0x85,0x81,0x02,0x82,0x70,0xA8,0x00,0xAB,0xB0,0xA2,0xC3,0xD9, - 0x00,0x53,0x7C,0x84,0xAC,0xA6,0xBF,0xAC,0xDA,0x25,0xDD,0x0C,0xAB,0xBF,0x00,0x0D,0xBB,0x74,0x90,0xDC,0x00,0x1D,0xD5,0xE7,0x25,0x0D,0xB5,0xA2,0x5B,0x36,0xFB,0xF5, - 0x05,0x48,0x95,0xC0,0x4E,0xE6,0xB0,0x37,0xED,0x36,0x99,0x85,0x83,0xA6,0x4D,0xB5,0x96,0xDB,0x8F,0x92,0x0C,0x00,0x68,0x42,0x0E,0xD9,0x29,0x96,0x00,0x14,0x05,0x09, - 0xB3,0xDC,0xE5,0x51,0xB3,0xB8,0x00,0xEA,0x6B,0x5E,0x5E,0x6B,0x75,0x76,0x03,0xCF,0x8F,0xF0,0x02,0x4F,0x12,0xF4,0xD8,0x3B,0xD9,0xCA,0x90,0x4C,0xDA,0x16,0xD3,0x8C, - 0x99,0xB3,0x51,0xC7,0xF8,0x00,0xA5,0x53,0xBB,0xEB,0x04,0x88,0xD0,0x0B,0xDB,0x0A,0x0E,0xC3,0xE8,0x04,0x9C,0xEF,0xED,0xB3,0x6D,0x00,0x96,0xB5,0x92,0x0A,0x89,0x96, - 0xDA,0x99,0xB9,0x00,0xD2,0x48,0x7B,0xC4,0x1D,0x00,0xE5,0x0D,0xFA,0xDF,0x15,0x0B,0x13,0xC8,0x40,0x0F,0xBE,0xEA,0x00,0xCC,0xE9,0xC6,0xB6,0xC2,0xB1,0x85,0x99,0xDC, - 0x34,0x98,0xA5,0xF0,0x17,0x42,0x42,0x7F,0x00,0x40,0xDC,0x4B,0xC0,0xD9,0x4B,0x3A,0xB0,0xDC,0x30,0x5E,0x52,0xDB,0xC0,0xDC,0xC5,0x82,0x34,0x9F,0x07,0x94,0x83,0x75, - 0xEF,0xB0,0xDB,0x5A,0x24,0xEB,0xAB,0x86,0x95,0xBA,0xEC,0xB5,0xA2,0xC6,0xF5,0x82,0xDA,0x4C,0x00,0xF1,0x6C,0xDD,0x3B,0x00,0x9A,0x45,0xA6,0xBD,0x94,0x86,0x90,0xD7, - 0x1B,0xDB,0xAC,0xAD,0x82,0x81,0xAD,0x89,0x40,0x44,0x44,0x52,0xCA,0xBE,0xF0,0x05,0x08,0x37,0x37,0x55,0xA2,0x2F,0xA2,0x40,0x00,0xC2,0x0B,0x10,0x92,0xC3,0xE4,0xE2, - 0x04,0x72,0x80,0xD6,0x56,0xF7,0x22,0x00,0xBE,0x1D,0x71,0xA4,0x49,0xEF,0x61,0xDB,0x49,0xD0,0x96,0xFE,0xB5,0x54,0xBC,0x5A,0x94,0x53,0xCD,0xE1,0xDA,0x81,0x00,0x7F, - 0xB3,0x3A,0x09,0x04,0x03,0x80,0xE0,0x8E,0x6D,0x6D,0x18,0x20,0x52,0xD6,0x00,0x76,0xCA,0xB0,0x74,0x1B,0xC2,0x12,0x83,0x9B,0x84,0x3C,0x24,0x4C,0xD5,0xA7,0xC6,0xC0, - 0xDA,0x89,0x7C,0xBC,0xC2,0xAA,0x00,0x80,0x45,0x90,0xA6,0x86,0xBF,0x77,0xFC,0x52,0xAF,0xF6,0xE1,0x15,0x11,0x6E,0x85,0x8A,0x30,0xAD,0xBE,0xC8,0xC3,0xBC,0xB9,0x02, - 0x86,0x9B,0x81,0xCE,0xBA,0x80,0xD5,0x3F,0x55,0x3F,0xB0,0xD9,0x07,0x6F,0x69,0x69,0x4E,0x55,0x00,0xBA,0x0B,0x44,0x12,0x20,0xBA,0x05,0xA9,0x21,0x89,0x89,0x84,0x56, - 0x05,0xD8,0x17,0x12,0x20,0xF4,0x61,0xEE,0xDA,0x67,0x93,0x2A,0x80,0x80,0xED,0xB4,0x9D,0x3B,0x01,0x02,0xDC,0x48,0x95,0xF3,0xE5,0xA0,0x91,0x4B,0x09,0x06,0x14,0x04, - 0x09,0x39,0xB9,0x4A,0x35,0xDC,0x0C,0xBB,0x81,0xDF,0xE2,0x4C,0x12,0x4F,0x06,0x80,0xDB,0x9F,0xC8,0xEF,0x31,0x7A,0x6B,0x9F,0xEB,0x73,0xA1,0x91,0x80,0x96,0x7D,0xB2, - 0xF3,0x7C,0xF9,0xA5,0xA6,0x6F,0x99,0x60,0xD4,0x96,0x5D,0x8A,0x05,0x5B,0x04,0x00,0x90,0xEA,0x3C,0xE5,0x0A,0x70,0x96,0xA6,0x24,0x37,0x8D,0x00,0x3F,0x00,0xA2,0xD0, - 0x00,0xCC,0x6E,0x00,0x3E,0x07,0xC1,0xDA,0x69,0x74,0x07,0x12,0xA2,0x29,0xED,0xDD,0x0A,0x4E,0x84,0xE9,0xC1,0xCE,0x41,0xD9,0x23,0x30,0x55,0x08,0xB1,0x94,0xA4,0x96, - 0xB4,0xC7,0x79,0x70,0xFB,0x41,0xD6,0xA2,0x95,0x3C,0x50,0xDA,0xC3,0xD9,0xCE,0x70,0x57,0xC8,0x7F,0x05,0x60,0x0A,0xDA,0x09,0x01,0x2A,0x4B,0x16,0x16,0x0C,0x5F,0x81, - 0x44,0xB8,0x6B,0x02,0x99,0xD7,0x53,0x07,0x0D,0x12,0xC3,0xDD,0xEC,0xC8,0x2C,0x9B,0x43,0x02,0x07,0x34,0x79,0x9F,0xD7,0x40,0xDA,0xBF,0x7F,0xD5,0xEB,0xE6,0x8D,0xDB, - 0x1D,0x00,0x85,0xDB,0xFD,0xC2,0xAA,0xE1,0x8A,0x5B,0x84,0xBB,0x80,0xD9,0x13,0x88,0xAF,0x6A,0xB9,0xAD,0xA0,0xDA,0xA2,0xA7,0xBA,0x00,0xA3,0x2B,0xC8,0x0B,0x00,0x60, - 0x3E,0xC9,0x3E,0x60,0xED,0xDA,0xED,0x55,0x6F,0x07,0x81,0xDF,0xDD,0xDD,0xD8,0x0B,0xDB,0x5D,0x00,0x94,0xD4,0xC0,0xDA,0x4E,0xAB,0x05,0xDB,0x0A,0xAE,0x8F,0xFC,0x36, - 0x05,0x70,0x97,0x98,0xDB,0x49,0xA7,0x34,0x95,0x94,0xDC,0x0B,0x38,0xDB,0x06,0x8B,0xD9,0x00,0x0A,0x1E,0x04,0x4B,0x25,0x0B,0x16,0x10,0x54,0x81,0x95,0x40,0x75,0xCF, - 0x98,0x0D,0x97,0xBB,0xB0,0xDA,0x82,0xDE,0xC3,0x69,0x31,0x31,0xC1,0x40,0xDA,0x78,0x94,0x61,0x71,0xD5,0x51,0xD2,0x7F,0xBC,0x40,0xDA,0x80,0xB0,0xDB,0x56,0x9D,0xD7, - 0x60,0xCD,0x7B,0xE8,0x08,0xC4,0xB7,0xCE,0xD0,0x8B,0x84,0x7B,0xB2,0xB4,0x48,0x3F,0xD0,0x18,0xB9,0x73,0x06,0xB0,0x00,0x47,0xD3,0x50,0x6F,0xDA,0x61,0xCF,0xD3,0x01, - 0x00,0x3E,0x0C,0x7B,0xDD,0x00,0x06,0x47,0xDB,0x07,0x47,0x0A,0xB9,0x00,0x3E,0x07,0x0A,0xE4,0xAC,0x32,0xE6,0x25,0x94,0x40,0x90,0x7C,0xA4,0x56,0x30,0x72,0x70,0xDB, - 0xC3,0xDC,0xD6,0x0A,0x80,0xFE,0x00,0xAC,0x86,0x38,0x48,0x7C,0x8B,0xC1,0x11,0x00,0x11,0x8B,0x06,0x0A,0x03,0x0A,0x3A,0x25,0x03,0x3A,0x1F,0x5F,0x20,0xE3,0xE3,0xDC, - 0x0D,0x95,0x04,0x5B,0x7A,0x08,0xF1,0xF7,0x05,0x74,0xFB,0x07,0x1A,0x02,0x4C,0x82,0xEC,0xA8,0xD2,0xDA,0x1C,0x71,0x00,0x94,0xF7,0x90,0xB2,0xB3,0x59,0x62,0xB7,0x54, - 0x09,0x97,0x81,0x26,0xE1,0x59,0xC4,0x61,0xD9,0x6F,0xB6,0x4B,0xD9,0x45,0x9A,0x84,0xB5,0xA7,0xFF,0xD8,0x0B,0xBE,0x4A,0xDA,0x0B,0xDD,0x00,0x90,0xDE,0x2F,0x06,0xDB, - 0x0C,0xB9,0xA9,0x1C,0x69,0xA6,0x1C,0x55,0xE5,0x2C,0xDC,0x2A,0x07,0x46,0xA9,0x70,0xAD,0xAD,0x66,0x71,0x96,0xB8,0x61,0xDB,0x82,0xD4,0x23,0x92,0x92,0xAC,0x00,0xB7, - 0xB9,0xAA,0x30,0x8B,0x05,0xDB,0x60,0x39,0xDA,0x03,0x00,0x33,0x3A,0x33,0x5C,0x0B,0x17,0x81,0xEC,0xC0,0xDC,0xD0,0xDA,0xF1,0xE5,0x0D,0x45,0xB3,0x05,0xF2,0xAC,0x4F, - 0x28,0x02,0x53,0xDA,0x28,0xB6,0xA8,0xB5,0xA9,0xC2,0xDC,0x70,0x01,0x81,0xDA,0x85,0xDB,0xBD,0xC5,0x2F,0xF2,0x06,0x41,0xD4,0x86,0xD9,0x8C,0x94,0x8C,0x19,0xD4,0x2A, - 0xB2,0xEF,0x2C,0xDB,0x18,0x47,0xD8,0x4B,0x00,0x61,0xE1,0x6A,0xE6,0x69,0x89,0xDA,0x07,0xDD,0x07,0x61,0xDB,0x22,0x9F,0x61,0xDC,0x6A,0x29,0x47,0xAD,0x29,0x0A,0xB4, - 0x74,0x9F,0xC9,0xB8,0x56,0x58,0xF4,0x66,0xBD,0x00,0x8D,0x2D,0xEA,0x70,0xDC,0x7E,0x48,0x03,0xE2,0x35,0x48,0xF0,0xE4,0xAA,0x11,0x05,0x60,0x8B,0x00,0x39,0x04,0x0A, - 0x33,0x1E,0x0B,0x13,0x30,0x1A,0x19,0xDB,0x00,0xB9,0xD0,0xCA,0x82,0x0C,0x22,0x7A,0x02,0x1B,0xDB,0x20,0xB5,0x92,0x15,0x02,0xFD,0x4A,0x9B,0xA0,0x9C,0xDA,0x11,0x7D, - 0x21,0xDB,0x50,0xC0,0x90,0xC0,0xCE,0xB2,0x88,0xD3,0x85,0xB9,0x7B,0xA6,0x9A,0xD2,0x0E,0xF0,0x3B,0x0E,0xE2,0x04,0x44,0x8B,0xB5,0x86,0xB1,0xBD,0x14,0xAB,0x55,0x00, - 0xD0,0x09,0xDB,0x48,0xD0,0x11,0x21,0xDB,0x69,0x98,0xD5,0x0C,0x02,0x5A,0x21,0xB8,0x61,0xD3,0x38,0xDB,0x55,0x05,0x95,0xB6,0x5F,0x00,0x6B,0xF2,0x22,0x3C,0x61,0x68, - 0xC9,0xB7,0x0E,0x64,0xB5,0x3B,0x64,0x42,0xB8,0x14,0x36,0x11,0x06,0x00,0x11,0xF3,0xAA,0xE5,0x95,0x46,0x33,0xDA,0x00,0x26,0x5C,0x1C,0xCD,0xEC,0xC0,0xDC,0xE3,0xB9, - 0x06,0xE6,0xD7,0x5B,0x9F,0x7A,0xDD,0x02,0x08,0x0D,0x07,0x0A,0xC1,0xDB,0x7A,0x6E,0xC7,0xBF,0x02,0xC6,0xD5,0x71,0x7D,0x73,0x7D,0x87,0xCA,0xDD,0xF7,0x90,0x71,0x6F, - 0x00,0x7C,0xBC,0x2B,0xCF,0x1E,0x9D,0x02,0xD8,0x14,0x90,0x87,0xBE,0x55,0x98,0x9E,0x07,0xDA,0x1D,0xCC,0x61,0x9D,0x85,0xD8,0x95,0x8B,0x05,0xDB,0x85,0xD9,0xE5,0x0B, - 0xA3,0x30,0xDB,0x49,0x07,0x28,0xE5,0x4C,0xDB,0x0B,0x6F,0x21,0xB0,0xDC,0xB9,0xCB,0xB4,0x8E,0x77,0x37,0x02,0xFE,0x9D,0x03,0xEA,0xC5,0x90,0x5A,0xFE,0xEB,0x02,0xDA, - 0x30,0xDB,0xEC,0x02,0xDB,0x18,0x05,0xDB,0x51,0xB7,0x05,0xB3,0x39,0x06,0x33,0x80,0xDB,0x26,0x1C,0x1D,0x1D,0xCD,0x81,0xE3,0x00,0x23,0x95,0xC1,0xDC,0x0C,0xB7,0xA0, - 0xB7,0xE7,0x34,0x91,0x1C,0xD8,0xAE,0xC2,0xA1,0x86,0xBB,0x73,0x87,0x87,0xA0,0x62,0x73,0x83,0x9D,0x40,0xD9,0xA4,0x8A,0xD7,0x8A,0x83,0x4E,0x0B,0xE6,0xAB,0xA7,0x98, - 0x9C,0xC2,0x3F,0x40,0x8B,0xB7,0xBE,0x26,0x40,0x8E,0x9A,0x8F,0x4B,0x92,0x36,0xB6,0x48,0x47,0xA0,0xDB,0xC2,0xEC,0x30,0xDB,0x2B,0x10,0x05,0xB9,0x24,0x1F,0xDB,0x25, - 0xB4,0x8C,0xB9,0xA3,0x2F,0xBA,0x86,0xD9,0xB4,0x93,0xE2,0x9F,0x91,0x93,0x83,0x20,0xDB,0x2C,0x3C,0xDB,0x15,0x0E,0x80,0x69,0x48,0x01,0xDB,0x09,0xBC,0x00,0x39,0xDD, - 0x60,0x39,0xDA,0x5C,0xB0,0xDB,0x0B,0x2D,0x35,0x5E,0x52,0xB8,0x20,0xB1,0x97,0x22,0x9F,0xC3,0xDB,0xD4,0xA8,0x24,0x8B,0x49,0x4C,0x00,0x9F,0x97,0xB6,0x86,0xC2,0xC0, - 0xD5,0x90,0x9F,0x9B,0xE6,0x9F,0x61,0x57,0x62,0xAB,0xD4,0x9F,0xE0,0xE0,0x83,0x52,0x88,0x91,0x50,0xDA,0x5A,0xEE,0xEA,0xEF,0x7C,0xA4,0x8A,0xAC,0x91,0xDC,0xD3,0x7B, - 0x72,0x26,0xBE,0x4E,0xE9,0x59,0x53,0x93,0x0C,0x5B,0x4E,0xAD,0xD4,0x0B,0x81,0xD1,0x3A,0xF8,0xCA,0xCB,0xF2,0x05,0xDB,0xB5,0x90,0xCE,0xAF,0xB0,0x56,0xDD,0x14,0xE8, - 0xAE,0x40,0x03,0xBB,0xCA,0xCF,0xEA,0xA8,0x93,0x83,0x61,0xFB,0x40,0x68,0x83,0x7C,0x71,0xC0,0xE2,0x3B,0x38,0xC1,0xDC,0x14,0x8C,0x03,0x38,0x11,0x14,0xDB,0x30,0x00, - 0x2A,0x0A,0x0A,0x09,0x00,0x8B,0x2A,0x1E,0x30,0x36,0x26,0x36,0x36,0x05,0x2F,0x1A,0x2B,0x6D,0xD6,0x00,0xDC,0xDA,0xD8,0xC1,0xF3,0xE3,0x00,0x82,0x47,0xCE,0x7C,0x1B, - 0x27,0xD0,0xE0,0xDA,0x4C,0xC2,0xDA,0x49,0xA2,0x2C,0x73,0x2C,0xDA,0x2E,0x00,0xE7,0xA2,0x05,0x63,0xA6,0xD5,0x4F,0xD2,0x7D,0xB6,0x74,0x00,0xB9,0x5E,0x90,0x32,0x7B, - 0xC0,0xE4,0x07,0xDB,0x0B,0xAE,0x0C,0x8B,0xA2,0x56,0x00,0x6F,0xCF,0x13,0x84,0xDA,0xC1,0xE6,0x65,0xC8,0xF2,0x0A,0x00,0x15,0xDA,0x2A,0xE9,0x4E,0xD4,0xED,0x44,0x84, - 0xA0,0xD6,0x3C,0x84,0x89,0x04,0x03,0x89,0x78,0xA4,0x93,0x64,0x61,0xB7,0x3C,0x00,0x90,0x96,0x94,0x73,0x60,0x2C,0x42,0x0F,0xA2,0xB6,0xDF,0xCC,0x05,0x2C,0x09,0x04, - 0x00,0x09,0x05,0x34,0x2A,0x03,0x92,0xC0,0xD9,0x45,0x45,0x05,0x36,0x5D,0x2D,0x6D,0x6B,0x00,0xDB,0xDF,0xCF,0xAF,0x10,0x53,0x31,0x4F,0x50,0xDB,0x0D,0x4F,0xEC,0x49, - 0x53,0x97,0x03,0xDA,0x5D,0x12,0xDC,0x42,0x3C,0x81,0xDA,0x61,0x9D,0x6F,0xC9,0xA4,0x07,0x83,0xBC,0xEC,0xDB,0x16,0x70,0xDB,0x14,0xE8,0xB9,0xC3,0xF4,0x00,0xE2,0x0C, - 0x44,0xDB,0x2D,0xBE,0xE7,0xC5,0x7A,0xC6,0x7B,0xB0,0x7B,0xCE,0x09,0x82,0xD3,0xE7,0x0D,0x08,0x96,0x25,0xC3,0xDA,0x00,0xBC,0x06,0xB6,0xB2,0xAD,0x50,0x84,0xD6,0x7E, - 0x46,0xDE,0x18,0xA4,0x96,0xBD,0xA4,0x83,0xDB,0x0C,0xB7,0xB5,0x8F,0x1B,0x60,0xDC,0x0F,0x00,0x38,0xDB,0x0C,0xE0,0x37,0xC4,0xE6,0xA1,0x94,0x00,0x09,0xDA,0x19,0xB5, - 0x18,0x45,0x50,0xDB,0x05,0x27,0x5D,0xCD,0x5E,0x03,0xDB,0xD0,0xCE,0x71,0xAC,0x24,0x08,0x04,0xA1,0xDB,0x8E,0x82,0x00,0x07,0x0D,0x9F,0xAC,0xD8,0xD2,0xEC,0x5A,0x94, - 0x91,0x63,0xB9,0x29,0xB7,0x60,0xD5,0x3C,0xFB,0x03,0x00,0xF2,0x5B,0x88,0xBC,0xDA,0x24,0xB7,0x2F,0x04,0xD7,0xCC,0xDB,0x2C,0xB5,0xB9,0xAE,0x58,0x47,0xDB,0x4E,0xC5, - 0xF4,0xC5,0x0C,0xC1,0xDC,0x28,0xC7,0xAC,0xDA,0x39,0x00,0xC2,0xDB,0xE6,0x0A,0xD9,0x04,0xA2,0xE1,0xDB,0x5B,0x87,0xA3,0x97,0xBE,0xFD,0x2C,0xD4,0x30,0xD7,0xBA,0x00, - 0xDB,0x07,0x83,0x00,0x86,0xDC,0x76,0xDC,0xF0,0x00,0xDB,0x69,0xC8,0x8F,0x96,0xB3,0xF2,0xB8,0xE0,0x7D,0xBA,0xAE,0xF0,0xDA,0x0C,0x03,0xDA,0x28,0xB6,0xB0,0xDA,0xD9, - 0x00,0x45,0x04,0x46,0xCD,0xAA,0xF1,0x77,0xC8,0xB8,0x4C,0x1B,0x82,0x50,0xDB,0xA0,0xDC,0xF9,0xB5,0xC1,0x48,0x91,0xC0,0x12,0xBB,0xE7,0x7D,0x87,0xDB,0x69,0xAF,0x6A, - 0x80,0x00,0x91,0x45,0xA6,0x12,0xB6,0x80,0xAE,0x81,0x70,0xDB,0x58,0xB2,0xDB,0x53,0xD2,0x96,0x44,0x3F,0xAB,0x13,0x05,0xDB,0x15,0xC2,0xCA,0x9B,0x6F,0xAC,0x08,0xCB, - 0x2C,0xC5,0xAF,0xC4,0xB9,0x00,0xD2,0x8B,0xE6,0xA3,0x59,0x06,0x73,0xD9,0x92,0x4E,0xA1,0x3F,0x46,0x49,0xA3,0x9F,0x06,0xA6,0x9E,0x93,0xA9,0xF0,0x77,0xC9,0x31,0x2C, - 0x7F,0x00,0x42,0x42,0x7F,0x96,0xB2,0xDB,0x1B,0x02,0x11,0x00,0xB7,0xCC,0xA4,0x02,0x03,0xA1,0xDB,0x86,0xDA,0x04,0x63,0x76,0x9E,0x86,0x77,0xA7,0xCE,0x04,0xE2,0x97, - 0x53,0x1B,0x1B,0x12,0x38,0xCB,0x4F,0x4F,0x07,0x28,0x22,0xB0,0xDA,0x02,0xC6,0xE7,0xEE,0xEE,0x85,0xB8,0x68,0x41,0xDB,0x63,0xC7,0xB3,0xDC,0x68,0xD4,0x07,0xA6,0xB3, - 0xEC,0x83,0xBF,0xAC,0xB6,0xAD,0xF1,0x56,0xB2,0xF0,0xB8,0x8D,0x61,0xDA,0x92,0xB5,0x3F,0x50,0xAF,0x94,0xEC,0xD6,0x4E,0xB9,0x57,0xFD,0xF7,0x06,0x2A,0xF7,0xD0,0xDA, - 0x65,0x9F,0x25,0x09,0xBD,0xBF,0xD9,0x28,0xB4,0x5A,0xEF,0xC8,0xC9,0xF8,0xDB,0x50,0xD5,0x61,0xD6,0x7F,0x00,0xA9,0xFA,0x62,0x00,0x3C,0xB3,0xD6,0x02,0xBE,0xB7,0xE5, - 0xA1,0x11,0x61,0xDB,0x4F,0xC9,0x40,0xD8,0x05,0xEC,0x82,0x4B,0x03,0xB0,0xDB,0x59,0x45,0xBA,0x30,0x63,0xDC,0x1D,0xE9,0xEC,0x91,0x87,0x84,0xCF,0xD8,0x5B,0x0D,0x12, - 0x17,0xB7,0xAC,0x66,0x07,0x0D,0xB6,0x52,0x00,0xDA,0xDC,0xC8,0x60,0xCB,0xB6,0xC1,0xDC,0xDB,0x14,0x66,0xC8,0x3D,0xF2,0xA9,0x3C,0x90,0x31,0xD2,0xF6,0xD8,0xD1,0x92, - 0xA6,0x77,0x83,0x60,0xDB,0x89,0xE7,0xA3,0x91,0x4C,0xB5,0xB9,0x94,0x56,0x4E,0xAE,0x28,0x47,0xBA,0x12,0x6F,0x84,0xB5,0xA9,0x9B,0x3D,0x00,0x95,0xAF,0x84,0xDB,0xA1, - 0xFA,0x55,0x28,0x07,0x84,0xD4,0xBD,0xB4,0xD8,0x00,0xDB,0x4E,0xDA,0x0D,0x96,0xCA,0xDD,0x66,0xF5,0xE3,0xCA,0x83,0xD9,0x3B,0x02,0xD3,0x8F,0xDD,0x07,0x14,0xD6,0x94, - 0xDA,0x07,0x05,0x09,0x06,0x53,0xA6,0x76,0x86,0x3A,0x88,0xDB,0x00,0x27,0x63,0x65,0x9E,0x2C,0x95,0xE9,0xB8,0x88,0x98,0x53,0x24,0xDB,0x0F,0x89,0x6C,0xB6,0x8D,0xC2, - 0xC6,0x91,0x30,0xDA,0xCE,0x94,0xB0,0x61,0xDB,0x38,0x66,0x70,0xB9,0xD2,0x8B,0xAF,0x88,0xD0,0x7E,0x8B,0xFC,0xDD,0xC2,0xDB,0x8A,0xB6,0x98,0x04,0x7C,0xDC,0x30,0x7C, - 0xD7,0xC3,0xDB,0xEC,0x55,0x44,0xFD,0xE3,0x85,0xB2,0xE4,0xB6,0xA0,0xDC,0x4E,0xAF,0xEE,0x98,0xC6,0xAA,0x04,0x5C,0xF2,0xAB,0x04,0x27,0x93,0x16,0x07,0xB0,0xD6,0xAB, - 0x03,0xDC,0xC5,0x40,0x4C,0xED,0x84,0xB8,0x71,0xFF,0x99,0xC1,0x2A,0x6C,0xC1,0xDB,0x23,0xCD,0xA1,0x77,0xB5,0xD7,0x80,0x14,0x57,0x05,0x05,0x11,0xEF,0x02,0xB9,0x9A, - 0x06,0xED,0xA7,0x0A,0xDB,0x0C,0x00,0x5D,0x50,0xA4,0x94,0x03,0x29,0x65,0x85,0x95,0x91,0xA3,0xB8,0x21,0xB7,0x9A,0x0D,0x04,0x61,0xDB,0xF5,0xE1,0xBE,0xC8,0xB6,0x5A, - 0x90,0x19,0xC8,0x57,0x92,0xE1,0xD9,0xAB,0xEF,0x62,0xDB,0x0E,0x96,0x9B,0x66,0xCC,0xE1,0xD8,0x44,0xB8,0x83,0xAE,0xB8,0x5A,0x90,0x91,0x28,0xB2,0xD9,0x29,0xEA,0x41, - 0xA4,0xB2,0x96,0x89,0x37,0x65,0xB2,0x28,0xCB,0x58,0xC0,0x4A,0xC4,0xB2,0xCF,0x83,0x0C,0x39,0xBF,0x61,0xEC,0xC8,0x21,0xB7,0x97,0x18,0x3D,0xFB,0x49,0x00,0xF2,0xB7, - 0x44,0x89,0xB8,0x78,0xAB,0xEE,0x94,0xEB,0x5D,0x68,0x7C,0x91,0xB9,0x96,0x90,0x9D,0xAD,0xA2,0x92,0x3B,0xC1,0xDC,0x05,0x49,0x8F,0x45,0xB4,0x75,0x00,0x86,0x6A,0x2A, - 0x03,0xB4,0x94,0xC0,0xD7,0x27,0x27,0xA2,0xB7,0xA1,0x00,0x8C,0x4A,0x91,0x45,0xB8,0x56,0x87,0x12,0xAE,0xBE,0x21,0x08,0x1B,0xC2,0xBF,0xCB,0x22,0xF0,0x82,0xC8,0x7A, - 0x91,0x45,0x0E,0x27,0xEE,0x00,0x4B,0xEF,0x5F,0xA8,0xB2,0xDC,0x3B,0x81,0xDB,0x3C,0x85,0xDB,0x75,0xC6,0x70,0xC3,0xA6,0x74,0xB2,0xAA,0x00,0xFF,0x60,0x72,0xAD,0x96, - 0xA4,0x50,0x44,0xD7,0x2E,0xA2,0x03,0x81,0xBA,0x4E,0x38,0xDB,0x72,0x04,0x87,0xDB,0x14,0x2D,0x00,0x95,0xA5,0xAC,0xE1,0x93,0x9D,0x4B,0xE4,0x22,0xE8,0xD5,0x00,0x05, - 0xDA,0x72,0xB5,0xA4,0xD4,0xF0,0x94,0x7C,0x90,0xDB,0x33,0x06,0x66,0x2C,0xDC,0x67,0x3B,0x7C,0x87,0xDA,0x00,0xAE,0xEE,0x91,0x97,0xB6,0xD6,0xDF,0x1E,0x04,0xD7,0x14, - 0x00,0x1E,0x4A,0x26,0xDB,0x1D,0x00,0x81,0xDB,0x9E,0x58,0x65,0xB8,0x5D,0xC0,0x23,0xAC,0xC3,0xC0,0xDB,0x1B,0x1A,0xAC,0xA7,0xD7,0x92,0x5A,0x91,0x72,0x5D,0x85,0xDB, - 0x4A,0xA8,0x3C,0xD2,0x9B,0x97,0xF2,0xF0,0x55,0x80,0x4F,0xA8,0x03,0xA6,0x98,0xEB,0xB6,0xDB,0x17,0xDD,0x0D,0x72,0x93,0x0B,0x37,0x55,0x96,0x2A,0xCE,0xAC,0xB5,0x2C, - 0xBB,0x2C,0xC6,0x27,0xBB,0xC9,0xF9,0x00,0x13,0x4A,0xCC,0xC2,0xFB,0xC2,0xD5,0xD1,0x8D,0x44,0x5C,0x00,0xA4,0xE1,0xD9,0xE9,0x01,0x93,0x87,0xD3,0xCF,0x8B,0x71,0x02, - 0xA7,0xCD,0x69,0x73,0x8F,0x6F,0xC8,0x6B,0xEE,0xDE,0x81,0x00,0x11,0xB0,0xD6,0xB2,0xBB,0xA0,0xDB,0x3C,0x1E,0x13,0x00,0xDB,0x2D,0x95,0x24,0xD9,0x00,0x29,0x29,0x93, - 0x85,0x2D,0x4A,0xA0,0xF1,0x54,0x22,0xB5,0x55,0x02,0x0E,0x80,0xDB,0x53,0x82,0xD7,0x64,0xCA,0xB6,0xEA,0xC1,0xDA,0x38,0x20,0xDB,0x1D,0x60,0x3C,0x00,0x3F,0xD1,0x93, - 0x58,0xD7,0x5A,0x93,0x52,0xED,0xD5,0x84,0xE9,0x95,0xF2,0xBB,0x70,0x60,0xDB,0x56,0x72,0xDD,0x51,0xB9,0x61,0xDF,0xE1,0x03,0xDA,0x3B,0xA0,0xAD,0x55,0xA6,0x27,0xD8, - 0x09,0x6A,0xE8,0x4E,0x03,0x0B,0xA5,0x16,0xB0,0x2B,0xDA,0x07,0x40,0x02,0xBA,0x05,0x56,0x00,0xDF,0xCA,0xB2,0x2E,0xF2,0xF0,0xDA,0x93,0x03,0xF9,0xBF,0x77,0xDB,0x07, - 0x48,0xD6,0x82,0x48,0x23,0x57,0xA9,0xFC,0x05,0x2A,0x92,0x29,0x06,0xCC,0xF0,0xDB,0x57,0x30,0xBB,0x6B,0x00,0x36,0xDB,0x05,0x29,0x00,0xDA,0x18,0x29,0x8D,0x2C,0x58, - 0x3D,0xB8,0x99,0x5B,0xB2,0x5D,0x88,0xA1,0x08,0xC5,0xF0,0x28,0xC1,0xA7,0xDA,0x05,0xE7,0xDE,0x7F,0x62,0x59,0xB9,0x42,0xC9,0xAD,0x3C,0xAD,0xF2,0x86,0xDA,0xDB,0x09, - 0x62,0x16,0xEF,0xA8,0x04,0xD9,0x32,0xB4,0xC3,0xDC,0xDA,0x0A,0x00,0x57,0xAD,0xC9,0xF6,0x83,0x40,0xC1,0xD8,0x86,0x61,0xDC,0x20,0xBF,0x5A,0xC3,0xC8,0xB0,0xF6,0xA0, - 0x52,0x4B,0x13,0x17,0x25,0x0D,0xF3,0x06,0x04,0x87,0xDA,0x00,0x47,0x04,0xBE,0x84,0x02,0x5D,0xB1,0xB5,0xD2,0x56,0x00,0xD1,0x85,0x73,0x66,0x73,0x87,0x56,0x9F,0xEA, - 0xBA,0xEB,0xFC,0xB0,0x42,0xC2,0xDB,0x44,0x91,0xB2,0xB4,0xA2,0xBB,0x50,0x2A,0xDB,0x61,0x00,0x26,0x30,0x5C,0x26,0x48,0x94,0x29,0xB0,0x00,0x18,0x28,0x18,0x85,0x5A, - 0x79,0xF1,0x92,0x97,0x22,0x02,0xDB,0x07,0x1C,0xA7,0x9E,0xA4,0x64,0xFF,0xA6,0x7F,0x59,0x38,0x94,0xDB,0x29,0x8E,0x29,0xFF,0x3D,0xCB,0xA2,0xC0,0xA0,0xDB,0x1B,0x61, - 0x68,0x61,0xC3,0xEE,0xC6,0x96,0x94,0xDB,0x18,0x96,0xDB,0x58,0xDA,0x50,0xFD,0x93,0x86,0x86,0x05,0xDB,0x9D,0xEC,0x05,0xDB,0x4F,0x9A,0xF0,0xF7,0x0A,0x35,0x00,0x17, - 0xB2,0x0D,0x52,0x1B,0x3C,0xBD,0x60,0xDB,0x32,0x84,0x40,0xBE,0x72,0x8A,0xB6,0xF1,0xD7,0x66,0x28,0xD9,0x45,0x02,0xDB,0x57,0xD6,0xEE,0x4E,0xB5,0xC9,0x06,0x39,0x2A, - 0x00,0xDA,0x26,0x5C,0x8C,0xDB,0x00,0x65,0x8D,0x3D,0xB4,0x01,0xDF,0xCF,0xAF,0x4C,0x7A,0x7A,0x08,0x0F,0x4A,0xA7,0x53,0xB3,0xDB,0x91,0x42,0x8E,0xC8,0x8E,0x8C,0x83, - 0xDB,0x8A,0xAB,0xE1,0xC5,0x3C,0x22,0x98,0x68,0xD2,0x9A,0x97,0xEF,0x07,0x61,0x83,0xDB,0x47,0xC1,0x30,0xDB,0x05,0x96,0x72,0x89,0xBE,0x1D,0xD8,0x3D,0x90,0x14,0xB7, - 0xA5,0xB3,0x6F,0xA0,0x98,0xFA,0xED,0xED,0xA2,0x9C,0xFB,0xE7,0xDB,0x0B,0x0B,0xCA,0xDE,0xE5,0x2D,0x9D,0x9C,0x8E,0x6C,0xDC,0x28,0xDB,0x36,0x00,0x72,0xE7,0xAC,0x7D, - 0xDB,0x2E,0xB5,0x28,0xD9,0x35,0x87,0x7C,0x83,0x6A,0x7B,0xE0,0xDB,0x11,0xE8,0x00,0xD9,0x1C,0x03,0xA0,0xE4,0xB6,0x0A,0x50,0x13,0xDA,0x6B,0xED,0x60,0xDB,0x5D,0x4A, - 0x63,0xDB,0x14,0x00,0x28,0x0E,0x79,0x77,0xBD,0xDA,0x86,0xDF,0x24,0x9A,0x64,0xB6,0x12,0x86,0xC3,0xDB,0x80,0xB0,0xCA,0xC6,0xEB,0x6D,0x1F,0x16,0x7F,0x8B,0x51,0x59, - 0xD5,0x60,0xE6,0xD8,0xDB,0x6E,0xCF,0x3B,0xA5,0xEF,0xB2,0xB7,0xD7,0xEC,0xBD,0x3C,0xD0,0x04,0x7B,0x88,0x90,0x40,0xDB,0x2C,0x40,0xB3,0x2D,0xB9,0x66,0xA1,0x2E,0x0C, - 0xD7,0xFA,0xDA,0x0C,0xDB,0x0F,0xBA,0xBA,0x14,0x01,0x96,0x00,0x90,0x8B,0x37,0xBA,0xEC,0x0D,0xDB,0x2D,0xBD,0x37,0xC2,0x9C,0xDB,0x34,0x92,0x6B,0x89,0x01,0x7B,0xDB, - 0x07,0x74,0x65,0x96,0xB9,0xDB,0x1A,0x84,0xE2,0x07,0x42,0x38,0x23,0xE4,0xA3,0x7F,0x42,0x57,0x8B,0xB8,0x79,0xE3,0x41,0xDC,0x2C,0xA2,0xD3,0xC8,0xD0,0xDB,0x28,0x26, - 0xDB,0x12,0x27,0x85,0xDB,0x90,0xB9,0x5A,0xBC,0x77,0xD1,0x94,0xA8,0xA6,0x94,0xDB,0x02,0x08,0x4F,0x12,0x15,0x9F,0x9C,0x1A,0x4F,0x07,0x39,0x02,0xF0,0xA4,0xC0,0xDB, - 0xEA,0xB3,0x1B,0x8B,0x8B,0x05,0x52,0x48,0x00,0xDF,0xCD,0x8F,0x4F,0x6B,0x6C,0xED,0x02,0xF0,0x7E,0x79,0x00,0x9D,0xD3,0x70,0x4A,0x00,0x8A,0xB9,0xEE,0xA1,0x6B,0xE8, - 0x74,0x94,0xB5,0xED,0xC2,0xDB,0xA4,0x00,0x95,0x4B,0x90,0x2B,0x00,0x98,0xD2,0x2E,0x07,0x4A,0x0B,0xFF,0x5C,0xEB,0x28,0xCC,0x2C,0xB1,0x95,0x37,0xD2,0x34,0xE9,0x5B, - 0xC3,0xD1,0x33,0x56,0x89,0xB5,0x46,0x84,0x04,0x94,0x25,0x8D,0x24,0x95,0x8D,0xDD,0xBE,0xC8,0x02,0x57,0xA9,0xA0,0x76,0x14,0x00,0x92,0x80,0x8B,0xDC,0x87,0xE5,0x0A, - 0x4A,0x0A,0xDA,0x19,0xB6,0x5C,0xA3,0xA9,0x45,0x03,0x27,0x29,0xB5,0x56,0x04,0xDB,0x00,0x5A,0x79,0xE3,0xBD,0xCF,0x19,0x82,0x5B,0x31,0xB5,0x10,0x08,0x7A,0xA0,0xDB, - 0x2C,0x31,0xDB,0x0F,0x7A,0xC1,0xDB,0x02,0xCA,0xBB,0xDE,0xB3,0xB7,0xB1,0x5A,0xAA,0x82,0xB9,0xA9,0xFB,0x6E,0x86,0xA4,0x93,0xF7,0x00,0xC5,0x74,0x61,0x02,0x93,0x94, - 0xDA,0x14,0x9E,0xAA,0x8A,0xDB,0x0E,0xDE,0x14,0x70,0xCA,0xF8,0xA0,0x5D,0xC7,0x58,0xDB,0x79,0x00,0x9A,0x4E,0x9B,0x49,0xBA,0x8E,0xF9,0x60,0xE7,0xA5,0xFE,0xDE,0xEF, - 0x89,0xA6,0xBA,0x56,0x14,0x83,0x3F,0x25,0x33,0x5E,0x00,0x04,0xDB,0x03,0x7B,0x89,0x89,0x93,0x4A,0xDB,0x0B,0x95,0x4A,0xCA,0x19,0x00,0xDE,0x7F,0x48,0xB2,0xAF,0x50, - 0x57,0xDE,0x60,0xDC,0xE5,0x09,0xC8,0x8B,0x0A,0x06,0x82,0xDA,0x4A,0xFF,0x5E,0x45,0xDF,0x25,0x63,0xDB,0x0A,0x92,0x46,0x4D,0xB8,0x40,0xA0,0xB4,0xDA,0xA5,0x5B,0x10, - 0x0D,0x07,0x4F,0xB0,0xDB,0x36,0x12,0x8A,0xC0,0xDB,0x22,0x82,0xC0,0xDA,0xC0,0xEB,0x0C,0x15,0x39,0x06,0x11,0xB9,0x96,0x57,0xDB,0x1A,0xFB,0x12,0x61,0x60,0xCA,0xA9, - 0x3B,0x40,0xE2,0x3C,0x80,0x68,0x05,0xE0,0x6D,0x00,0x7C,0x20,0xDB,0x14,0x7C,0xAD,0xDB,0x16,0xA7,0x14,0xDA,0x14,0xC3,0x1A,0x85,0x6F,0x02,0x86,0x00,0x06,0xF4,0x05, - 0x02,0x3F,0xF9,0xC3,0x7A,0x00,0xA1,0x69,0x93,0x69,0x84,0x7D,0x15,0x23,0xA4,0x90,0xA1,0xDC,0x87,0xDB,0xD0,0x81,0x94,0x78,0x94,0x7D,0x41,0xDB,0x4F,0xC6,0x51,0x61, - 0xA1,0xDB,0x8F,0xE2,0x07,0x86,0x8A,0x91,0x94,0xDB,0x09,0x1E,0x02,0xDB,0xFA,0xB8,0xB2,0xDD,0x60,0xDB,0x78,0x28,0x01,0x00,0x5A,0x4D,0xB5,0x0D,0xB6,0xA3,0xDF,0xD7, - 0x94,0x10,0x4F,0xB8,0xDB,0x34,0x02,0xAD,0x1A,0x12,0x07,0x53,0xED,0xD2,0x92,0x38,0x25,0x93,0x35,0x11,0xC8,0x58,0x38,0x03,0xDC,0x7F,0xFB,0x47,0x60,0x6A,0x82,0xE3, - 0x48,0xC2,0xE4,0xAE,0x79,0x8C,0xF7,0xD0,0xAA,0x00,0xDC,0x09,0x03,0xDB,0x97,0x49,0x03,0xDB,0x01,0xE4,0x02,0xC2,0x5A,0x02,0xBA,0x08,0x06,0x52,0xBA,0xD5,0xD8,0xE9, - 0x4D,0x0D,0x2C,0x99,0xA9,0x56,0xB8,0x0B,0x3F,0xBA,0x8B,0x19,0x43,0xDC,0x8E,0x42,0x72,0x94,0xB1,0xD3,0x7D,0x77,0x80,0x73,0xA1,0xB7,0xDA,0x6E,0x5E,0xB0,0x0E,0xEC, - 0x7B,0xB9,0xD4,0x57,0xB5,0x57,0xBB,0xD8,0xDB,0x6F,0xCB,0xDC,0x00,0xA4,0xF5,0xFE,0x20,0xDB,0x25,0x27,0x93,0x4B,0xD8,0x00,0x6A,0x6A,0x4D,0x59,0x3E,0x4D,0xD9,0xBF, - 0xD1,0x94,0x4C,0xAC,0xED,0x30,0xDB,0x19,0x03,0x07,0xAC,0xDF,0x80,0xA5,0x25,0xDE,0x33,0x01,0xDB,0xDC,0xC8,0xD0,0x58,0xDC,0x35,0x7F,0x6B,0x7F,0x0A,0x6A,0x3B,0x23, - 0xDC,0xC2,0x8A,0xD6,0x15,0x23,0x21,0x9B,0x80,0x62,0x59,0xE8,0x20,0xDB,0x66,0xCF,0x7C,0x6A,0x78,0x04,0x84,0xB1,0x05,0x44,0x84,0xDC,0xC1,0xDA,0x20,0xCD,0x76,0x0D, - 0xA1,0x56,0xE1,0xB7,0xE7,0x5C,0x00,0xD5,0x15,0x29,0x41,0xEF,0x41,0xD3,0x27,0x2D,0x06,0xBA,0xC6,0x78,0x50,0xD8,0xFB,0x00,0x5F,0xDB,0x0C,0xC1,0x68,0xDA,0x2B,0xB6, - 0x92,0x0F,0x63,0x00,0xE0,0x4C,0xF7,0x05,0xC1,0xDA,0x04,0x4A,0xEF,0x0A,0xCA,0xB7,0x70,0xDB,0x61,0x27,0xDB,0x65,0xB6,0x6B,0xEA,0x58,0x00,0xDB,0x0C,0x59,0xD9,0xE4, - 0xB8,0xBE,0xBE,0x7C,0x31,0xBA,0x02,0x86,0x00,0xDB,0x24,0xB0,0x61,0xD7,0xDA,0xA3,0x92,0x0A,0xF2,0x95,0x8B,0x86,0xDB,0xDC,0x07,0x57,0x7F,0x00,0x60,0xDB,0x23,0xA0, - 0xDB,0x63,0x70,0xD7,0xF2,0xB8,0x42,0xF9,0xC6,0x80,0x82,0x81,0x62,0xC3,0xDB,0xA7,0x57,0x78,0xE8,0x94,0xF0,0xB4,0x84,0x56,0x9A,0xF6,0x89,0x5C,0x06,0xDF,0x00,0x13, - 0x0B,0x65,0xB5,0x3D,0x0F,0xF7,0x12,0x13,0x00,0x2A,0x8C,0x5A,0xB9,0x50,0xDB,0x18,0x89,0xD5,0xDB,0x51,0xB1,0x2C,0x73,0xB6,0xAC,0xDB,0x33,0xA6,0xE4,0x03,0xDB,0x0C, - 0xD2,0x35,0x02,0x05,0xCD,0xA2,0x75,0xB5,0x03,0xD7,0x0A,0x02,0xF9,0xB8,0x13,0x49,0x92,0x68,0x93,0x50,0x8B,0xDB,0x02,0x4D,0x4D,0x83,0xDC,0x94,0x40,0xE4,0xB9,0xCA, - 0x97,0x42,0x24,0xC0,0xDB,0x02,0xDF,0xCA,0xF2,0x52,0x4C,0x8F,0xAC,0x80,0xEA,0x0C,0xAB,0xC9,0x0A,0xE5,0xEE,0xE5,0x8B,0xCD,0x7A,0xD8,0x07,0x0E,0x6A,0xD7,0x8F,0xEA, - 0x9F,0x78,0x9E,0x56,0x93,0x9D,0x00,0x2F,0xF1,0xAB,0x56,0x93,0x8A,0x96,0x83,0x75,0x96,0x86,0xDB,0x84,0x4A,0x37,0x9B,0x75,0x56,0x87,0xB3,0x02,0x36,0x00,0xCD,0x5C, - 0x0B,0xF6,0x00,0x0F,0xBE,0x92,0x15,0x67,0x0C,0xBF,0x08,0x28,0xDB,0x6A,0x40,0x72,0xDB,0x0C,0x59,0x73,0x7D,0x52,0x73,0x91,0x58,0xD8,0x59,0xB7,0x6B,0x81,0x4F,0xC2, - 0x41,0xDB,0x4B,0xEC,0xA6,0x90,0xE7,0x2D,0x04,0xE9,0x55,0x03,0x02,0xA9,0x00,0x13,0xC9,0xFB,0x00,0x91,0x4D,0x00,0x63,0x3A,0x93,0x50,0xDB,0x61,0x03,0xD4,0xB8,0xB6, - 0x77,0xB8,0xCD,0x53,0x08,0x1B,0x85,0x01,0xDB,0x7A,0x8D,0x00,0x12,0x4F,0x5B,0xEE,0x72,0xB6,0x30,0x6D,0x34,0xDB,0x28,0x4B,0xDE,0xDB,0x2A,0x85,0xC2,0x7F,0xC8,0x3B, - 0x48,0xD3,0xFF,0xEE,0xBA,0x72,0x91,0xD1,0xF0,0xDE,0x79,0x61,0xE4,0x61,0xDA,0xC8,0x00,0xDB,0x0C,0x94,0xDB,0x35,0x06,0x56,0x66,0xC9,0xA8,0x12,0x16,0x99,0x89,0x5D, - 0x00,0x1F,0xE9,0x19,0xC5,0x05,0x85,0xCD,0x1D,0xFD,0xDD,0x0F,0x23,0x2C,0x1E,0xBF,0xB6,0xA6,0xDB,0x02,0x94,0x71,0x92,0x8C,0xC1,0xDB,0xDC,0x41,0xD7,0x4C,0x00,0xC8, - 0xCF,0x6B,0xB5,0xA9,0x8F,0x69,0xC7,0xF3,0x02,0x09,0x05,0xB2,0x25,0x09,0xCA,0xA1,0x13,0x81,0xDC,0x30,0x61,0xD9,0x30,0xDB,0x4E,0xCB,0xED,0x5A,0x90,0x2C,0xDB,0x06, - 0xD9,0xB8,0xE4,0x94,0x82,0x4C,0x1B,0x0D,0x15,0xB7,0x2E,0x9C,0xEA,0xA5,0x40,0xCC,0xCA,0x99,0xEB,0x8E,0x2A,0xC8,0xB6,0x39,0xE5,0x0C,0xE5,0x39,0x09,0x0F,0x65,0xC8, - 0xDC,0xC3,0xD6,0xC2,0xE2,0x2C,0x7F,0x9F,0xD5,0xD9,0x0D,0x98,0x32,0xB3,0xB7,0xCB,0xC2,0xDD,0xC8,0xB8,0x90,0x66,0xDE,0xC7,0xAB,0xBB,0xBD,0x2E,0xA9,0x73,0xD8,0x48, - 0xD3,0xC3,0xB8,0xD2,0x61,0xBB,0x92,0x87,0x94,0x81,0x00,0x96,0x7B,0xD5,0xD5,0x72,0x56,0x00,0xE8,0x19,0xA5,0x2A,0xBF,0x1B,0xAE,0x02,0x0B,0xAA,0x00,0x13,0x8A,0xB7, - 0x5A,0xFF,0xEC,0x2D,0xDB,0x28,0xB7,0xBC,0x03,0xD4,0x2B,0xC9,0x76,0xD7,0x74,0x0E,0x00,0x91,0x98,0xDA,0x3D,0x8B,0x00,0xC7,0xE9,0x94,0x37,0xC7,0x51,0x0A,0xB4,0x57, - 0xB4,0x61,0xDB,0xA4,0x03,0x5C,0xDE,0xC2,0x63,0x63,0x80,0xDC,0x2F,0x27,0xA0,0xD9,0x91,0x93,0x2A,0x02,0x90,0x94,0xD9,0xB6,0x1D,0xB4,0xE2,0x9A,0x85,0xA1,0x08,0x40, - 0xDB,0xA7,0xC9,0x60,0x53,0xDB,0xC5,0x0C,0x76,0xEA,0x16,0x2A,0x00,0x39,0x8B,0xC0,0xDB,0x04,0x05,0x03,0x14,0x7F,0xDC,0x73,0x2C,0x48,0x05,0xAA,0x91,0xD3,0x99,0xD1, - 0x05,0x2C,0xD6,0x9C,0x80,0x16,0xDB,0x16,0xBB,0x42,0x66,0x71,0x78,0x83,0xC8,0x94,0x4B,0xC1,0x09,0x8B,0x99,0x08,0xEC,0x00,0xD2,0x1D,0x78,0x00,0xBD,0xA5,0x3F,0x19, - 0xD5,0x02,0x03,0x00,0xF9,0x03,0x06,0xEC,0x00,0xF2,0x30,0xEE,0xAF,0x02,0x03,0x22,0xF9,0x00,0xA6,0xA5,0xE8,0xC3,0xDB,0xDA,0x0E,0x66,0xFB,0x60,0x69,0xC8,0x7C,0xDC, - 0x18,0x8B,0xD8,0xFF,0xBF,0x4B,0x00,0x09,0xC6,0x7C,0xDA,0x2E,0x00,0xF9,0xB9,0x45,0x22,0x8D,0x58,0xDD,0x51,0xB8,0x48,0x91,0x9C,0xA4,0xDB,0x00,0xB5,0x94,0x40,0xA3, - 0xCF,0x98,0x24,0x21,0x07,0x07,0x60,0xDB,0x6A,0x4F,0xEE,0xD7,0x68,0xC5,0x92,0x16,0xF2,0x4E,0xB9,0x7F,0x06,0x58,0x03,0xD9,0x63,0xC8,0x73,0x23,0x69,0xA7,0xD0,0xC5, - 0xCC,0xC8,0x47,0xB1,0x61,0xDB,0x79,0x80,0x40,0xDC,0x62,0xA2,0xB9,0xC1,0xDC,0x96,0x54,0x00,0x9E,0x0B,0xA4,0xC0,0x09,0x51,0x8A,0x84,0x74,0x08,0x8E,0x57,0x00,0xE5, - 0xB6,0x86,0xE5,0xB3,0x97,0x0D,0xCD,0x21,0x00,0x7A,0x18,0x0D,0xD5,0x5B,0x00,0x19,0x69,0x71,0x8C,0xB1,0xCA,0x83,0x73,0x6F,0xC2,0xAD,0xE8,0x25,0x8F,0xBD,0xC7,0x2B, - 0xE8,0xC8,0x00,0x35,0x8B,0x06,0x00,0x04,0x3D,0xC6,0x04,0xDC,0xA1,0xD9,0x61,0xDA,0x69,0x8D,0x36,0x00,0xB8,0x52,0x86,0xDB,0x95,0x94,0xDB,0x0D,0xBC,0x94,0x1A,0xE6, - 0xF0,0xC2,0xE0,0xDB,0x4F,0x6A,0x0D,0xEE,0xD2,0xC0,0xDB,0x35,0x25,0x78,0x2A,0x4F,0xDE,0x7E,0x5F,0x60,0xDB,0x1F,0x92,0xF4,0x65,0xDB,0x19,0xB8,0x52,0x99,0x5E,0x7C, - 0xDC,0x0A,0x61,0x00,0x90,0xDE,0x19,0x74,0xBA,0x28,0x73,0xDC,0x2C,0xBB,0xBF,0xD9,0xAE,0x07,0x08,0xCB,0x92,0xC8,0x0E,0x0F,0x42,0xB8,0xAC,0xB4,0xD9,0x00,0x70,0x93, - 0x1A,0x94,0x7C,0x1B,0x7C,0x8A,0xDD,0xAE,0x1B,0x17,0x50,0xF5,0xAB,0x2B,0xDE,0x0B,0x27,0xD1,0x92,0x73,0x8E,0xB6,0xB8,0x58,0xDF,0x56,0xD7,0x7B,0xCD,0xA9,0x6A,0x48, - 0xEC,0x6F,0x7B,0x79,0xCB,0xB7,0x9B,0x5C,0xDA,0x25,0x00,0xB0,0xDA,0x2E,0x26,0x30,0xA3,0x67,0xDB,0x0C,0xBC,0xA5,0xDB,0x0B,0x01,0x50,0x59,0xDD,0x52,0xF0,0x88,0xBD, - 0xA8,0x5B,0x60,0xDB,0x0C,0x24,0xAC,0xDB,0x01,0x99,0xEA,0x2B,0x3A,0x04,0x60,0xDB,0x05,0xB6,0xC9,0x6B,0x06,0xF7,0xA8,0x06,0x57,0xDB,0x0E,0x57,0x0F,0xA9,0x6A,0xBE, - 0x3C,0xE7,0x5D,0x3B,0xA6,0x5F,0xBA,0xD0,0xDC,0x1A,0x61,0x87,0xF2,0xB0,0x7B,0xD8,0x15,0x96,0x7D,0x7C,0xA1,0x9A,0xF8,0xD9,0xA5,0x35,0x94,0x06,0x7C,0x7B,0xE6,0x78, - 0xE2,0x77,0x7D,0xC7,0x2B,0x70,0xD7,0xAF,0xBD,0x24,0x00,0xD2,0xBF,0xF5,0x14,0x00,0x7B,0x4F,0x24,0x00,0x75,0x0A,0x28,0x41,0xDB,0x9F,0x49,0xDC,0xDC,0x58,0x60,0x8B, - 0xBC,0xC8,0x92,0xAE,0x76,0xCE,0x00,0x8B,0x39,0x00,0xBA,0xB0,0x45,0xEC,0xE4,0x00,0xB6,0x2E,0xFF,0xAD,0xED,0x6D,0x8C,0x26,0x00,0x99,0xEF,0x72,0xB5,0xBC,0xE1,0xC0, - 0xDB,0xB9,0xE2,0x42,0xAC,0xA1,0xDB,0xD8,0x82,0x1B,0x53,0xB0,0x2C,0xCC,0xC2,0xDB,0x14,0x2A,0x93,0x8C,0x04,0x8E,0xF0,0xDD,0xA6,0x03,0x8B,0xF9,0x8F,0x57,0x00,0x04, - 0x79,0x14,0xE2,0x4C,0xE7,0x48,0xFB,0x04,0x7E,0xB5,0x2D,0xD1,0xE8,0xDC,0x3F,0xC3,0x61,0x83,0xDB,0x41,0xCC,0xAB,0xAC,0x87,0x00,0xB0,0xE7,0xB5,0xBB,0xD9,0x0C,0x7D, - 0xA5,0x79,0x00,0xB3,0x65,0xB0,0x41,0xD6,0xCF,0xCC,0x04,0x7E,0x12,0x00,0xD6,0x1F,0x12,0x05,0x43,0x81,0x2A,0xAE,0x73,0x23,0x55,0x07,0x1F,0x4E,0x9C,0xDB,0x15,0x82, - 0x75,0xC6,0xB9,0xA0,0xF9,0x6B,0xB6,0x5A,0xE7,0xB4,0x06,0x8A,0x54,0x06,0xA0,0xA4,0x04,0xEB,0x5B,0x03,0xDE,0xC8,0xEE,0x81,0xF2,0xDC,0x42,0xB5,0xB9,0xA4,0xD1,0x00, - 0x6A,0x00,0xDB,0xD4,0xB5,0xF0,0x10,0x97,0x1B,0x4F,0xB0,0xDB,0x1F,0x4C,0xAF,0xB9,0x14,0x99,0x6D,0xDB,0x18,0xB1,0xBD,0x2A,0x57,0xEE,0x5E,0x06,0x61,0xBF,0x39,0x6A, - 0x8B,0x57,0xDB,0x8D,0x0F,0xB2,0x2E,0x78,0x82,0xDB,0x95,0x7D,0x3B,0xCE,0x17,0x00,0x6C,0x06,0x61,0xB2,0x30,0xAF,0xC3,0xD9,0xE3,0x8A,0xC9,0x27,0x87,0x0B,0x41,0xDA, - 0xC6,0xF2,0xC8,0x0A,0x71,0xDC,0x0A,0x03,0x74,0x7C,0x0D,0xBC,0x58,0xD1,0x57,0x99,0x77,0x12,0x00,0x7F,0xFF,0xDF,0x0C,0x1F,0x00,0x77,0x03,0x00,0xF5,0x15,0x25,0xB2, - 0xD8,0xDA,0x50,0xE2,0x52,0x8F,0x58,0xC7,0xD8,0xDA,0x51,0x7E,0x0A,0x04,0x56,0x03,0xB7,0x52,0xB8,0xC6,0x13,0x3A,0x33,0x74,0x26,0xFF,0x36,0x60,0x50,0xDB,0x5D,0xA0, - 0xDC,0x73,0x27,0x03,0x04,0xDB,0x81,0xD8,0xF6,0x02,0x85,0x79,0xC0,0xDB,0xDA,0xAF,0x42,0x24,0xC0,0xDB,0x0D,0x00,0x4C,0xA5,0xCA,0xC0,0x76,0x20,0x2B,0x34,0x18,0x4B, - 0xE5,0xB3,0xDB,0x56,0x59,0xCB,0xFD,0x66,0x86,0xDF,0xCB,0x38,0xE1,0x1D,0x42,0x8B,0x75,0xB1,0xE8,0x0E,0x68,0x5A,0x00,0x99,0x65,0xBF,0x53,0xAF,0x58,0xEC,0x73,0x35, - 0xE7,0x66,0xA9,0x3A,0x87,0x62,0x0B,0xD0,0xEC,0x9E,0x28,0xA6,0x15,0x61,0xBE,0x34,0x94,0x98,0xDC,0x51,0x90,0x57,0xEE,0x59,0xB1,0x52,0x98,0x69,0xB5,0x20,0xC4,0x79, - 0x0E,0x9F,0x32,0x2C,0xA3,0xEB,0x28,0x22,0x0F,0x8A,0xDB,0x0E,0xEA,0xC0,0x73,0xEE,0xEE,0xC8,0x57,0x38,0xEC,0x5F,0xDA,0x3C,0x74,0xDA,0x3B,0x7E,0x00,0xE6,0x06,0xDB, - 0x0D,0x90,0x06,0x5C,0x4B,0x3A,0xD8,0x16,0xB5,0x52,0xAC,0xEE,0xC1,0xDB,0x69,0x93,0x61,0xDB,0xD0,0x02,0xDB,0x3E,0xE4,0xBD,0x85,0x40,0xDB,0x4F,0x07,0xD7,0xEE,0x81, - 0xB0,0x99,0x75,0x6D,0x8E,0x07,0x1F,0x3A,0xDE,0xDE,0x2A,0x56,0xAB,0x63,0x09,0x65,0x01,0xED,0x02,0xDC,0xA9,0xD2,0xFF,0x78,0xCF,0x72,0xB7,0xA2,0xAE,0xD1,0x95,0x80, - 0x41,0xDE,0x85,0xDD,0x67,0x8D,0x0E,0xA5,0xA4,0x3D,0xDE,0x5B,0x0A,0x81,0x5F,0x00,0x05,0xBD,0xE1,0x85,0xD8,0x59,0x0A,0xEB,0x95,0x83,0x3C,0x05,0x53,0x86,0xAE,0xEF, - 0xCA,0x54,0x9F,0x5F,0x0D,0x3E,0xAC,0x14,0x66,0xE2,0x95,0x71,0x24,0x54,0x04,0xD5,0x45,0x87,0x7F,0x25,0xF8,0x56,0xF2,0xE3,0xBE,0xCF,0xF8,0x0A,0xD1,0xD4,0x9E,0xB9, - 0x03,0x7F,0x27,0xA3,0xDB,0x0B,0xEC,0x5A,0xE9,0x5F,0x00,0x04,0x5C,0x45,0x00,0xAA,0xEF,0x27,0x30,0x2F,0x5D,0xDB,0xF0,0x01,0xD9,0x57,0x28,0xBB,0x5E,0x00,0xB7,0x42, - 0xB5,0xA0,0xA3,0xA6,0xA8,0x16,0xDB,0x01,0x22,0xB0,0xD7,0x40,0xDB,0x17,0x64,0x0C,0xFD,0x8E,0x7A,0x8E,0xA8,0x04,0xB0,0xD8,0xB0,0xD9,0xF0,0x00,0xD7,0xB9,0x03,0x80, - 0xDB,0x23,0x3C,0xA0,0xAD,0xC1,0xCA,0x68,0xBA,0x08,0x42,0x05,0x04,0xE8,0x03,0xC1,0xBD,0x09,0x06,0x42,0x5E,0x00,0x19,0x1A,0x60,0xB9,0xBD,0xE6,0xA1,0xC3,0xE6,0x0D, - 0xB0,0xEB,0xCB,0xBE,0x02,0xB0,0xDB,0xCA,0xC7,0xF3,0xC0,0x2B,0xB2,0xB9,0xB7,0xDD,0xB2,0xB2,0xE4,0x05,0xDB,0x07,0x48,0x3A,0x69,0x8C,0xED,0xC9,0x1E,0xA2,0xA7,0x74, - 0xD7,0x0B,0x04,0xB8,0x2C,0xB2,0xAA,0x80,0xEE,0xA4,0x6C,0xDB,0x1C,0x36,0x01,0x50,0xDB,0x2B,0x5D,0xBA,0x8A,0x28,0x18,0x92,0x4E,0x01,0x4B,0x84,0xCD,0x00,0xB5,0xD4, - 0x93,0x04,0xE6,0xB7,0x4C,0x28,0xDB,0x0A,0x07,0xB9,0xEB,0xDB,0x00,0x19,0x34,0x13,0x33,0x12,0xB3,0x25,0x13,0x85,0xDB,0x0F,0xC1,0x6B,0xF7,0x6C,0x07,0xB5,0x2E,0x38, - 0x00,0x95,0xEF,0x23,0x41,0x9A,0x4C,0xF6,0x3B,0xEB,0x09,0x8E,0x29,0xDA,0xEC,0xE3,0x32,0xC9,0xED,0x08,0xEA,0xD5,0x42,0xF0,0x19,0xC0,0x24,0x87,0x91,0x29,0x26,0xCE, - 0xDA,0x99,0xC2,0xDB,0x8B,0xBA,0x13,0xD6,0xD0,0xAA,0x2F,0x00,0xE4,0x41,0x82,0x6C,0xDA,0x2D,0xE6,0x7C,0x00,0xF3,0x3A,0x57,0xBA,0x2B,0xED,0xBE,0x8F,0xA9,0xE2,0xAA, - 0xC8,0x3A,0x02,0x00,0x90,0xDB,0x2F,0xB9,0xAC,0xDB,0x12,0x45,0x87,0xDA,0x00,0xAC,0xEF,0x84,0xB7,0x65,0xC3,0xDB,0x00,0x94,0xDC,0x26,0xDB,0x00,0xB8,0xA3,0xDF,0xE2, - 0x21,0x5B,0x08,0x40,0xDB,0x52,0x02,0xEE,0x83,0xC5,0x76,0xEB,0x10,0x3A,0xDD,0x46,0x3A,0xB7,0xDB,0xC6,0x2D,0x06,0x00,0x09,0x24,0xB2,0x76,0x00,0xB7,0x49,0x14,0x43, - 0xDB,0xC0,0x01,0x73,0x70,0x83,0xC6,0xD2,0xC8,0x0E,0x2C,0x0B,0xC3,0xDB,0x09,0xB0,0xD8,0xF4,0x00,0xA6,0xF5,0x12,0xED,0xB0,0xDB,0xB5,0xF8,0xC2,0xC8,0xE6,0xCD,0xBA, - 0x16,0x2E,0xDB,0x06,0x3C,0xC6,0x94,0xD6,0xBD,0x34,0x55,0x30,0x34,0xD0,0x12,0xD6,0x6A,0x02,0x60,0x4A,0xAC,0x08,0xB7,0xAA,0xF7,0xBA,0x60,0x02,0xFD,0x03,0x6A,0x99, - 0x2A,0x75,0xDA,0xEE,0x97,0xEB,0x93,0x45,0x2A,0x05,0xDC,0xF2,0xB5,0x30,0x60,0xD8,0x34,0x50,0x2F,0x8D,0xC8,0xB2,0x29,0x65,0xEC,0x03,0xDB,0x2B,0xE0,0x26,0xCD,0x79, - 0x00,0xDB,0xD0,0xE2,0x42,0x97,0xA0,0xDB,0x1B,0x09,0xC1,0xD8,0xCA,0x99,0x03,0xDB,0x93,0x8C,0xBA,0xA5,0xA9,0x9F,0x02,0x65,0x92,0x00,0xEA,0x77,0x88,0xE4,0xDB,0x06, - 0xC8,0x90,0x18,0xA6,0x76,0x07,0xAD,0x5B,0x00,0x7F,0xBB,0x95,0x48,0x83,0xE3,0x2C,0xFA,0xC6,0x23,0xB1,0x99,0xAC,0x14,0x60,0x68,0x94,0x97,0x00,0x69,0xA8,0x7D,0x00, - 0x0E,0x25,0x99,0x22,0xC1,0xC8,0xFF,0xF6,0x3E,0xBB,0x07,0xDB,0x0B,0x00,0xE7,0x98,0xDF,0x55,0xDC,0x37,0x00,0x60,0xC4,0x77,0x38,0x5E,0xD4,0x8A,0x05,0x8A,0x42,0x8B, - 0x8B,0xD6,0x8C,0x92,0x94,0xD1,0x8E,0x0A,0x6F,0xCB,0x60,0xDB,0x5C,0xB0,0xD7,0xA5,0x00,0x27,0x85,0xDB,0x12,0xB8,0x65,0x70,0xDB,0xB7,0xCC,0xB0,0xDD,0xC0,0x01,0xD9, - 0xA3,0xBD,0xC4,0xAF,0x7A,0x85,0xC3,0xDB,0x92,0x40,0xEB,0x6B,0x19,0x1F,0xEA,0x48,0xD0,0xFE,0xBD,0x76,0x09,0x57,0xDB,0x14,0xD3,0xD7,0xB1,0x3D,0x7B,0x84,0xDD,0xA9, - 0x93,0xCB,0x99,0xDC,0x87,0x29,0x41,0xDB,0x0E,0x30,0xDB,0x65,0xC4,0x5D,0x05,0x1D,0x06,0xB7,0xCD,0x16,0xF1,0x7D,0xE9,0x4C,0xDA,0x0E,0x3B,0xC3,0x70,0xCD,0xF5,0x0A, - 0x24,0x48,0xE1,0x1D,0xCC,0x6D,0x92,0x7B,0x00,0xB4,0xBE,0xC8,0x02,0x4D,0xC4,0x88,0xDC,0xC8,0xD1,0x8E,0x38,0xCA,0x02,0xDA,0x1E,0x00,0xD2,0xF6,0xE5,0xDD,0x7D,0xF4, - 0xB4,0xD3,0xA3,0x40,0xDA,0x30,0xBE,0xB5,0xA0,0xDA,0xB9,0x00,0xB9,0xBC,0x18,0x28,0xDB,0x58,0xD9,0x26,0x5A,0xDB,0x0A,0xA8,0x98,0x50,0xDB,0x0A,0x9F,0xC1,0xEE,0x50, - 0x6B,0x52,0x5F,0x1C,0xE9,0x47,0x54,0x33,0x5B,0xB8,0x41,0xDB,0xA7,0xF9,0x01,0x61,0xDB,0x6E,0xCC,0x11,0x90,0xDB,0x32,0x9F,0xCB,0xB8,0xC8,0xFC,0xAE,0x29,0x94,0x30, - 0xDB,0xC3,0xB0,0xAC,0x0E,0x12,0xEF,0x00,0xD3,0xF9,0x03,0x79,0x0A,0x9C,0xA0,0xDC,0xB7,0xE8,0xB9,0xCB,0xC9,0xC7,0x7F,0xF8,0x07,0x28,0x82,0xE9,0xD0,0x45,0xE4,0xD3, - 0x34,0xED,0xDB,0xF5,0xBA,0x7F,0x39,0x0D,0xAB,0x0F,0xDB,0x0A,0x59,0xE5,0x02,0xD5,0xCE,0x6F,0xEC,0x81,0x0A,0x39,0xFA,0xBA,0x40,0xDA,0xC3,0xD5,0x02,0xB4,0x00,0x26, - 0x81,0xDA,0x3D,0x81,0xCE,0xDA,0x12,0xF5,0xBB,0x4A,0xA4,0x6A,0xF3,0xE0,0x93,0x46,0xB4,0xCC,0xE8,0x53,0x60,0xDB,0x00,0x76,0x5E,0x81,0x35,0x19,0x1A,0xCB,0xB5,0x8C, - 0x3D,0xF0,0x58,0x2A,0xDB,0x5A,0xF6,0x4C,0xDB,0x0B,0x06,0x87,0xB5,0x14,0x4F,0xA7,0x02,0x96,0xAB,0xED,0x3C,0xD6,0x61,0xAB,0x40,0x9C,0x38,0xE4,0x04,0xAA,0x2D,0x12, - 0x7F,0x6F,0xD2,0xF6,0x07,0x00,0xD1,0xF9,0xD7,0x69,0x00,0x23,0x13,0xA9,0x00,0xAA,0x32,0xD4,0x9C,0xC9,0x28,0xDB,0x2C,0xE3,0xAE,0x26,0xAE,0x11,0x29,0xB5,0x00,0x14, - 0x57,0x22,0x95,0xC8,0x8D,0x91,0x05,0x75,0xF9,0x67,0xA7,0xF8,0x6F,0x73,0xD7,0x14,0x06,0x39,0xC9,0xF9,0xB8,0xCA,0xD8,0x16,0xDA,0x14,0xDB,0x09,0x27,0xC3,0xDB,0xD6, - 0x0B,0x00,0x9B,0xDE,0x22,0x00,0xDB,0xB5,0xB6,0x60,0xB4,0xDB,0xA8,0x42,0x4C,0x97,0x83,0xE5,0xDE,0x38,0xCA,0x6B,0x81,0xCD,0x29,0x0B,0x1F,0xEE,0x5B,0x4B,0x5F,0x33, - 0xDB,0x0F,0x6A,0x61,0xAB,0x6F,0xCB,0x71,0x8B,0xE5,0x57,0x28,0xDD,0x28,0x0F,0xFC,0xE8,0xD0,0x3C,0x02,0xB4,0x32,0x80,0xC2,0x9B,0x9F,0xE1,0x07,0x51,0x2C,0xC0,0x50, - 0xD5,0x57,0x0E,0x0B,0x87,0xF6,0x00,0xAD,0x0F,0x0E,0xF6,0xE4,0x93,0x4C,0xA7,0xA5,0xD0,0x2C,0x86,0x67,0xB5,0x4A,0x87,0x8A,0x2D,0xFB,0x37,0x33,0x3E,0x5C,0x57,0x9F, - 0xD1,0x94,0xD9,0x9B,0xAD,0x09,0xBD,0xFB,0x00,0xDA,0xC2,0x0A,0x2A,0x44,0x94,0xC2,0xD5,0xD0,0x90,0x5C,0x26,0x95,0xEC,0x6E,0xFF,0x9A,0x63,0x88,0x1E,0x27,0x93,0xD8, - 0x50,0xD6,0x4C,0xDA,0x16,0xC8,0xF4,0x04,0xD4,0x51,0xD9,0xB7,0x08,0xDA,0xA8,0x5B,0x50,0xB7,0xA5,0xDB,0x01,0x52,0x35,0x01,0x60,0xDB,0x33,0x7D,0x0A,0x52,0x87,0xF6, - 0x60,0x68,0x11,0x6B,0x57,0x82,0xC3,0xBC,0xC8,0xE2,0x6D,0x08,0x7F,0x79,0xE3,0x56,0x02,0xA2,0x1E,0x05,0xC1,0x14,0xC0,0x0B,0x48,0x0C,0xBA,0x08,0x91,0x2A,0xAB,0x7E, - 0xF2,0xB0,0xCB,0x90,0xEC,0xED,0x85,0xA9,0x0F,0x3B,0x5D,0xC2,0x74,0x1F,0xEE,0x55,0x22,0x54,0x03,0xEB,0x15,0x33,0x61,0xD8,0x74,0x4B,0xC4,0xF5,0xE4,0x76,0x8D,0x95, - 0x02,0x5F,0x00,0x6F,0x03,0x35,0x07,0x25,0x94,0xAA,0xEB,0x26,0x48,0x00,0x95,0xED,0xAC,0xD6,0xC1,0xDF,0x18,0x28,0xD7,0x22,0x6A,0x41,0xDB,0x4D,0x30,0xDB,0x21,0x4C, - 0x60,0xDB,0x79,0xCF,0xDD,0x81,0xDB,0x20,0x15,0x81,0xDB,0x5C,0x13,0x43,0xB1,0x69,0x99,0xE1,0x00,0xDE,0x63,0xD0,0x40,0xDF,0x87,0x75,0x57,0x04,0xDA,0xB4,0xB8,0x57, - 0x8D,0x74,0x94,0xF4,0x9F,0x1A,0x08,0x0E,0x50,0xD6,0xAB,0x04,0xF0,0x5B,0xDF,0x0A,0xCA,0x0A,0xFE,0x3B,0xFD,0xC9,0x42,0xF2,0xD6,0xDD,0x44,0x20,0x0E,0xB2,0x29,0x77, - 0x16,0x00,0x0E,0x61,0xDA,0xAD,0xE8,0xED,0xC0,0x75,0x03,0xF9,0x95,0xA8,0xC4,0xB7,0x89,0x99,0x79,0xDD,0x45,0xB7,0x22,0x8E,0x5F,0xB5,0x56,0xDB,0x4E,0xC7,0xF4,0x90, - 0x9A,0xEB,0xCC,0xDB,0x12,0x2A,0xEE,0x5A,0x50,0xDC,0x87,0x08,0xB7,0x22,0xB0,0xA0,0xDB,0x60,0x5E,0xDB,0x01,0x79,0x5C,0x50,0xB8,0x50,0xB5,0xD9,0x94,0xDD,0xE1,0xBC, - 0x2A,0x6A,0xD5,0x70,0xDB,0xDB,0x7C,0x0F,0xC4,0xD9,0xBD,0xFF,0xBE,0x87,0xD4,0x00,0x5E,0xC8,0x0E,0xA8,0xDF,0xA5,0xC8,0xB9,0xAB,0xA0,0xCD,0xB0,0xAF,0xB7,0x9C,0xC3, - 0xFF,0x09,0xBA,0xEB,0xCA,0xA0,0xD2,0xA3,0xD3,0x8B,0x14,0xEC,0x22,0xF1,0xB1,0x94,0xF2,0x07,0xFA,0xA9,0x0A,0x37,0xA8,0x30,0xB0,0xDA,0xB7,0xC2,0x5D,0x11,0x00,0x86, - 0xDB,0xEB,0xB2,0xC9,0x00,0xB8,0xDE,0x00,0xB7,0x53,0x05,0xDC,0x86,0xDA,0xD5,0x13,0xBD,0xC7,0x4F,0x9E,0x00,0x28,0xDB,0x5F,0x05,0x03,0x7C,0xBA,0x4D,0x60,0xD9,0xDB, - 0x77,0x86,0x01,0xDB,0x53,0x28,0xDB,0x6F,0xCB,0xA4,0xDD,0xA1,0xDB,0x69,0xEF,0xAF,0xF2,0x70,0x32,0xEF,0xE2,0xCE,0x0F,0x0C,0x7F,0xE5,0x8B,0x38,0xE2,0x5B,0x11,0x80, - 0xD0,0xED,0xF8,0x03,0xA6,0x61,0x99,0xBC,0x01,0x57,0x00,0xBA,0x30,0xA3,0xB2,0x83,0x9D,0xC1,0x64,0xCE,0x0C,0xDA,0x25,0xC0,0x2B,0xD9,0x0F,0x04,0x24,0xEA,0x14,0x2D, - 0x8A,0xF8,0xCA,0xAF,0x4B,0xCE,0xBA,0x30,0xF9,0xAB,0x95,0x39,0x6D,0x00,0x88,0x25,0x08,0xDE,0xC4,0xF2,0xD7,0x5C,0xD8,0xB7,0xC7,0x4C,0x36,0xB5,0x52,0xCD,0xA2,0xE4, - 0xD7,0xA5,0xB8,0x27,0x04,0x0A,0x28,0xDB,0x0D,0xB8,0xB6,0xA0,0xCB,0xD0,0xE2,0xB0,0xDB,0x25,0x82,0xDB,0x0C,0xB7,0xB1,0xA9,0xEA,0x55,0x85,0xFA,0x5D,0x06,0xEE,0x63, - 0x68,0x91,0x97,0x39,0x9A,0xA9,0x11,0xB6,0xD6,0xCA,0xB7,0x4C,0xEA,0xD4,0x07,0x57,0xA1,0x9D,0x06,0x65,0x03,0xA8,0xD8,0x03,0xD8,0x58,0xC9,0x5A,0x06,0x14,0xF2,0x0E, - 0xE3,0x9C,0xA0,0xAD,0x91,0x25,0xDD,0x59,0x4B,0xB4,0x33,0x92,0x40,0xE9,0x00,0xEC,0x7D,0x53,0xCD,0xA4,0x86,0x4B,0xDC,0x0E,0x68,0xD5,0xF5,0x2A,0xD9,0x70,0xB5,0x6E, - 0xC3,0x1F,0xD6,0x9E,0x40,0xDA,0x92,0xA5,0x67,0xDA,0x0B,0xB7,0x24,0x29,0x81,0xDC,0x77,0x82,0x30,0xDB,0x14,0xD4,0xB5,0xDB,0x0A,0xE4,0xDB,0x04,0xAC,0x34,0xDB,0x0A, - 0x5E,0xDB,0x0E,0x4F,0x95,0xEC,0x33,0x24,0xA9,0x76,0x07,0xC1,0x36,0xAC,0x6E,0x39,0x76,0xF2,0x04,0xBC,0xF2,0x00,0xB9,0xC3,0xCE,0x00,0x2E,0x8B,0x57,0x00,0xA2,0xE7, - 0x4C,0x00,0xB1,0x2C,0xBD,0x16,0x48,0xB3,0xF2,0x05,0xBD,0xDB,0x21,0xF5,0xCB,0x8E,0x32,0x27,0xB2,0x00,0xFD,0x12,0xB1,0x7D,0xA4,0x61,0xD8,0x52,0x05,0x3D,0xC6,0xDB, - 0x49,0xC7,0xE5,0xB3,0x61,0xDB,0xF1,0x05,0xBE,0xCA,0x00,0xB5,0x58,0xDA,0x09,0x0C,0x25,0x13,0x82,0xDA,0x7A,0xFD,0x93,0xD7,0x2D,0xF0,0x67,0xDD,0xCD,0xCF,0xCA,0x8D, - 0x28,0xDB,0xC5,0xD4,0x20,0x92,0xE4,0xE4,0xB9,0x85,0x89,0xB7,0x02,0x41,0xDB,0xCE,0xA6,0xDB,0x04,0xCD,0x19,0xA1,0xDB,0xB0,0x01,0x2A,0xC9,0xBD,0x65,0xF0,0x7C,0x75, - 0xD9,0x71,0xD1,0xBA,0x9C,0x72,0x39,0x7F,0x15,0xB9,0x11,0x80,0x60,0x7F,0x61,0xDE,0x5F,0x04,0x0E,0x11,0x77,0x9B,0x41,0xC9,0xD5,0x05,0x02,0xAC,0xC9,0xB5,0xD7,0x72, - 0x0E,0xD5,0x04,0x05,0x86,0xE0,0x30,0x8B,0xAD,0x93,0xBF,0x84,0xED,0x03,0xC0,0xED,0xEC,0x3B,0x12,0xDA,0x0B,0x00,0x99,0xC2,0xEB,0x00,0x04,0xA8,0xCB,0xC8,0xB6,0x0C, - 0x8E,0x11,0x8E,0x1F,0x45,0x29,0x92,0x20,0xD9,0x28,0x65,0xDB,0x11,0x29,0x60,0xDB,0xB5,0x13,0x8D,0xB5,0x4D,0x00,0xDB,0xA3,0xBD,0xE6,0x85,0x54,0xEF,0x0D,0x4C,0x60, - 0x8F,0xDB,0x76,0x64,0xEB,0xB7,0x5C,0xA5,0x4D,0x30,0x26,0x8E,0xF3,0xA3,0x39,0x39,0x2A,0x63,0xAB,0x69,0xCE,0x7D,0xF7,0x6E,0xA5,0xAC,0xB7,0xF0,0x8E,0xE7,0x00,0xD3, - 0x3A,0x00,0xB2,0xA1,0x94,0xC7,0x25,0xAF,0x25,0x14,0xDB,0x07,0xF2,0xD1,0xC8,0x54,0x1C,0x96,0x0B,0x8E,0x33,0xA6,0x89,0xA4,0xD6,0xB6,0x5D,0x03,0xFD,0xFE,0x87,0xCD, - 0x4E,0x2A,0xE8,0xA5,0x09,0x06,0xA3,0xA1,0x90,0xB6,0xB1,0xDD,0xD5,0x99,0x5C,0x56,0x00,0xB3,0x53,0x4D,0xA4,0xC9,0xA1,0x65,0x65,0x4E,0x04,0x63,0x05,0xD2,0x99,0xE8, - 0x00,0xB7,0x98,0xB5,0xDB,0x52,0x91,0x61,0xDA,0x28,0xDB,0x08,0x4C,0x08,0x08,0x44,0xDB,0x05,0x24,0x4C,0xA5,0x80,0xDB,0x6B,0x35,0x1A,0xC5,0xB0,0x26,0x28,0xDB,0x25, - 0x4B,0xDB,0x0B,0xCE,0xDA,0xCF,0x16,0x06,0xE0,0x32,0x8F,0xE9,0x04,0xF3,0x03,0x09,0x85,0xDD,0xD5,0xBF,0x24,0xA4,0xAF,0x99,0x7D,0x13,0x07,0xD5,0x16,0xAC,0xCA,0xF8, - 0xB5,0x14,0x7F,0x00,0x21,0x02,0x76,0x00,0xB2,0x55,0x1C,0xCB,0x08,0x93,0xF6,0xE6,0xB6,0xE3,0x15,0x04,0xD6,0x01,0x69,0x0F,0x1E,0xC5,0xD1,0x33,0xCC,0x7B,0xE7,0xB6, - 0xDB,0x16,0xDC,0x12,0x94,0xB7,0x95,0xFD,0x65,0xBB,0x41,0xDB,0x65,0xB7,0x2B,0xCF,0xBA,0xB5,0x00,0xB5,0x2B,0xB6,0x24,0xB4,0x30,0xDB,0x06,0xC1,0xD8,0xEF,0xB4,0xDB, - 0x02,0x20,0x1C,0x30,0xD2,0x93,0xC0,0xDB,0x2A,0x4B,0xBB,0x89,0x9B,0x00,0xB7,0x2A,0xE0,0x5B,0xD6,0x0B,0xC1,0x3A,0xEC,0x19,0x1E,0xD2,0x57,0x8E,0xB5,0xFF,0x49,0x7F, - 0xF4,0x12,0x14,0xA7,0xAB,0xED,0x73,0x87,0x33,0xAF,0xDC,0x29,0xCB,0xDD,0xDB,0x00,0xBD,0xFF,0x87,0xCD,0x05,0x94,0x36,0x8A,0x93,0xD6,0x08,0x65,0xA1,0x61,0x34,0xE5, - 0xE5,0x25,0x45,0xAF,0x27,0xB0,0x60,0xDB,0x1F,0xE2,0x04,0x92,0x93,0xC2,0xDB,0x70,0xDA,0x4D,0x18,0xAB,0x2B,0xB5,0x00,0xA0,0xDB,0xE4,0xA5,0xA3,0xB9,0x10,0xD0,0xDA, - 0xB7,0xA8,0xDB,0x25,0x5B,0xDB,0x02,0x52,0x0B,0xF4,0xAD,0x30,0x33,0xA0,0xDE,0x29,0x33,0x33,0xD1,0xAF,0xBF,0xA4,0xB6,0x86,0x03,0xB8,0x54,0xEC,0x32,0xD5,0xB2,0xFF, - 0xC7,0x00,0x28,0xDE,0x4A,0xB7,0xF2,0x25,0x98,0x9C,0xED,0xA1,0xC7,0x84,0xBF,0xD3,0xAE,0x20,0xDB,0x5D,0x00,0x4E,0x06,0xDB,0x18,0xBD,0x52,0xE2,0xDB,0xBE,0x4A,0xD2, - 0x12,0x5A,0x07,0x0F,0x2A,0xD9,0x00,0x25,0x1D,0xB3,0x5C,0x6D,0xF2,0x75,0xFD,0x41,0xE3,0x3B,0xCA,0x89,0x5D,0x5D,0x27,0x16,0xEE,0xD6,0xF5,0xD1,0x91,0x29,0x20,0xDC, - 0x2C,0x6A,0xDB,0x0A,0xBC,0xBC,0x91,0x45,0xB6,0x16,0xB6,0xDB,0x04,0xA5,0x53,0x32,0xB7,0x4D,0x75,0xCD,0xDB,0x5F,0x50,0x1F,0x57,0x57,0x33,0xC0,0x49,0x00,0x59,0xE7, - 0x25,0x00,0x15,0xC1,0x06,0x80,0xAE,0x56,0xBA,0x56,0xD1,0x76,0xC1,0x52,0x95,0x91,0x2D,0xCB,0x3C,0xA4,0xAB,0xD7,0x69,0xA3,0x2D,0x00,0x95,0xC5,0xB2,0x8A,0x14,0x62, - 0xAF,0xA9,0x27,0x3A,0x30,0x02,0xDB,0x04,0x39,0x9F,0xFB,0x32,0x8A,0x49,0x06,0x22,0x90,0x32,0x39,0x00,0x4B,0x33,0xA9,0x00,0xEB,0x68,0xD8,0x3C,0x04,0xD4,0x2C,0xD7, - 0x24,0xB7,0x20,0x5D,0x2F,0x2F,0x5D,0x59,0x63,0xB3,0x5C,0xA8,0xDE,0xDF,0x55,0x07,0x24,0x00,0xB5,0xDA,0x05,0xB8,0x05,0xDA,0xA3,0x92,0xDF,0xDB,0x08,0x5D,0x93,0x12, - 0xCA,0x00,0xDB,0x17,0x0B,0x15,0x30,0x2B,0x34,0xD8,0x4D,0x30,0x00,0x61,0xDD,0x41,0xDE,0x5F,0x02,0x7C,0x7D,0x8D,0xF4,0x0C,0xE2,0xB1,0xE1,0xCA,0x00,0xBA,0x56,0xB2, - 0x0F,0x57,0xCD,0x30,0xDE,0x97,0xF8,0x2B,0x1C,0x02,0xAB,0x13,0xF3,0x09,0x53,0x93,0x2C,0xE5,0x0D,0x0F,0x9A,0xF7,0xA8,0xC2,0x12,0x04,0xBD,0xBA,0x84,0xD7,0xD3,0xA2, - 0xAC,0x5E,0x2A,0xDA,0x17,0x4B,0xD4,0xAB,0x13,0xB6,0x2C,0xDB,0x32,0xB4,0x4B,0x45,0x00,0x40,0xDA,0x5D,0x30,0x32,0x49,0xDB,0xD2,0x90,0x77,0xC5,0x48,0x18,0x00,0x8D, - 0xA6,0x00,0xBC,0x00,0x79,0xA0,0xDB,0x08,0xE4,0x77,0xB9,0xB9,0x78,0xDB,0x28,0xDC,0x01,0x35,0x5F,0x20,0x6D,0x0C,0xBD,0xCF,0x05,0xD4,0xAC,0xF7,0x40,0xDC,0x55,0x8B, - 0xC9,0xC3,0xD6,0xDB,0x17,0xB1,0x33,0x06,0xDD,0x85,0x56,0xB4,0x09,0x8B,0x42,0xDB,0x50,0xDC,0xBE,0x14,0x00,0x64,0xB3,0xEE,0x02,0x31,0x5B,0x0A,0x11,0xE6,0x0E,0x80, - 0x49,0x4A,0xB7,0x22,0xFA,0xA4,0xEC,0x5C,0xD9,0x0E,0x3A,0x4B,0xBE,0x2F,0x78,0x00,0x90,0xDB,0x22,0x25,0xA5,0x5D,0x44,0xB7,0x27,0x95,0xEC,0x65,0xB7,0x29,0x25,0x00, - 0xDA,0x09,0x0B,0xB6,0xED,0x56,0xBD,0x92,0x84,0xDF,0xE6,0x2C,0xDB,0x0C,0xAC,0xDB,0x16,0xC5,0xB8,0x40,0x20,0xCD,0x20,0x5E,0x21,0xE6,0x5A,0xDB,0x09,0x82,0xDC,0x8A, - 0xB8,0x96,0x7E,0x03,0x8E,0x16,0xED,0xB7,0xBA,0x53,0x15,0xB9,0xCE,0xB3,0x04,0xB3,0x78,0xB3,0xE9,0x11,0xAA,0x0A,0x95,0x4B,0xC2,0x0B,0xF6,0x7E,0x05,0xE6,0x00,0xFA, - 0x79,0x42,0xDA,0xF9,0x30,0x0D,0x7A,0xA4,0xD2,0x83,0xE6,0xA7,0xC2,0xE4,0xAA,0x0B,0xA5,0x7F,0xAE,0xCE,0x00,0x3A,0x3A,0x6D,0x5E,0xAF,0xAB,0x04,0x07,0x58,0x50,0xDB, - 0x53,0xC8,0xE5,0xB4,0xE1,0x00,0xD4,0x6F,0xC7,0x69,0x8C,0x1E,0xDB,0x1A,0x91,0x60,0xDB,0xD0,0xA0,0xDB,0x21,0xDA,0xAF,0x62,0xB7,0x32,0xA5,0xD7,0xB8,0x60,0x75,0xDB, - 0x52,0x0E,0xCD,0x17,0x17,0x19,0x88,0xC6,0x1A,0x1F,0x1F,0xD7,0x0B,0x13,0xFB,0x4D,0xFB,0x69,0xEB,0x57,0x03,0xC3,0x15,0xFE,0x77,0xFC,0x74,0xBE,0x53,0xBD,0xD4,0x84, - 0xDD,0xD7,0x94,0xE9,0x03,0x01,0x57,0x82,0xDA,0x97,0xD2,0xC8,0x29,0x02,0xF6,0x4E,0xF2,0xB0,0xDC,0xA5,0x15,0x11,0x4D,0x27,0xC8,0x73,0x87,0xDC,0x1E,0xD4,0x01,0xA9, - 0x56,0x0A,0x95,0x7D,0x65,0xAD,0xEA,0x8D,0xD1,0xCD,0xA2,0xDF,0x00,0x07,0x02,0x69,0x92,0x95,0xB3,0x05,0xDB,0xBA,0xCB,0x27,0x7E,0xB8,0xCA,0xC3,0x50,0xD9,0x52,0xB8, - 0x91,0x2D,0xB6,0xED,0x70,0xDB,0xCA,0xB6,0x9E,0xCB,0x13,0xBB,0xE4,0x9F,0xC0,0xDB,0xEB,0x00,0x52,0x81,0x35,0x2B,0x21,0x1F,0x5C,0x01,0x16,0x0C,0x25,0x3A,0xD7,0xD6, - 0xE0,0x13,0xBC,0xCF,0xB7,0x8C,0x49,0x9E,0x35,0xB7,0x4C,0xDB,0x17,0x07,0x2A,0xA6,0x67,0xF1,0xCC,0xA1,0x9A,0x09,0xB9,0xF3,0x8B,0x6D,0x98,0xDD,0x0B,0x2A,0x95,0xB7, - 0x5C,0x03,0x19,0x85,0xBD,0x69,0x86,0x5C,0x49,0x46,0xF5,0x09,0x0B,0x49,0xF8,0x7C,0x6C,0x00,0xB5,0xFD,0x15,0x00,0x21,0xB9,0x27,0x63,0xDB,0x0E,0x09,0x24,0xDB,0x16, - 0x85,0xDB,0x09,0xB6,0x01,0xDB,0xB4,0x28,0xDB,0x21,0xAF,0x60,0xDB,0x50,0xAF,0xDB,0x57,0xBD,0x30,0x5E,0xDB,0x6E,0x35,0xCF,0x1F,0x0B,0x19,0x0C,0x10,0x3A,0x00,0x90, - 0xDB,0x17,0x13,0xE7,0x92,0x8F,0xDF,0x05,0x73,0x06,0xBC,0x84,0xA9,0x9A,0x2A,0xA7,0x58,0xB9,0x5A,0xD9,0xDE,0x12,0x86,0x4A,0x39,0x1B,0xE7,0x00,0x87,0x9E,0x16,0xE5, - 0x24,0xEE,0xA9,0x56,0xE0,0x64,0x45,0x09,0xE3,0xAF,0xFC,0x62,0x66,0x6B,0xF3,0xA0,0x12,0xD7,0x19,0x03,0x49,0x32,0x4F,0xC7,0x86,0xD2,0x01,0x65,0xFB,0x01,0x00,0xC2, - 0xEB,0xC4,0xEB,0xDA,0x05,0x85,0xBD,0xC7,0x86,0xDB,0xC9,0xF4,0xDB,0x14,0xEE,0xA2,0xC4,0xAF,0x22,0x14,0xDB,0x04,0x5B,0xA0,0xDB,0x75,0xC3,0xDB,0xDC,0x0D,0x94,0x06, - 0x1F,0x67,0x19,0xDF,0x00,0x1F,0x34,0x25,0x25,0x33,0xB8,0xB7,0xC3,0xDE,0xE3,0x65,0x2A,0x1D,0xBC,0x24,0x97,0xA5,0xC0,0x59,0x8C,0x3E,0xF5,0xCD,0x00,0x5F,0xE1,0xC8, - 0x0E,0x98,0x96,0xDE,0x1F,0x0B,0x29,0x65,0xD4,0x73,0x17,0x54,0xEC,0x44,0x99,0xF4,0x00,0xAA,0x57,0x47,0x24,0x0E,0xBB,0xBC,0x65,0xB4,0xE5,0x66,0xB4,0x16,0xB7,0x52, - 0xCE,0xA3,0x07,0x32,0x0C,0x1D,0x1D,0x1A,0x2F,0xB9,0xA6,0x00,0xB2,0xB6,0xB2,0xC0,0xB0,0xDA,0x8C,0xDB,0x0B,0xCA,0x71,0xC4,0x97,0x24,0x09,0x81,0xDB,0x0D,0x4C,0x38, - 0xDB,0x30,0x20,0x00,0x81,0x5F,0x0B,0x2B,0x24,0x15,0x01,0xDB,0x0B,0xF5,0x5C,0x00,0x3A,0xB3,0xE1,0xC3,0x0A,0x60,0x82,0x13,0x99,0x9B,0x12,0x04,0x9C,0xD1,0xB2,0x03, - 0x85,0xDC,0xAF,0xF6,0x01,0x28,0xF1,0x44,0x85,0xF6,0x84,0xC8,0xC1,0xD2,0x11,0xD3,0x96,0x86,0x92,0x50,0x46,0xA1,0xF5,0x04,0x55,0x47,0x96,0x2A,0xEB,0xB6,0x5C,0xDE, - 0x9A,0x00,0x40,0xDA,0x90,0xE3,0x18,0x1A,0xDB,0x25,0x2E,0xDB,0x05,0x5D,0x50,0x00,0xDC,0x5A,0xF1,0xAC,0x29,0xDA,0x14,0x79,0x00,0xB8,0x2D,0x6C,0xB6,0xCA,0xCB,0xB4, - 0xB9,0xDB,0x01,0xE2,0x97,0x9F,0x0C,0x02,0xDB,0xC5,0xEC,0x84,0x52,0x6D,0x35,0x52,0x20,0xF1,0xCF,0x00,0x0B,0x1A,0xC4,0x8A,0x34,0x34,0xA3,0xFA,0xAE,0x30,0x25,0x8E, - 0xB3,0x25,0xAB,0x83,0xB0,0xDD,0x5B,0x03,0x86,0xDB,0xD1,0xC8,0xB9,0x51,0x41,0xC5,0x6F,0xAA,0x5B,0x80,0x6F,0xBE,0x2A,0xAB,0x5D,0x1A,0x75,0xA5,0xD5,0x0E,0x05,0xFC, - 0xF4,0xD3,0x9D,0xD8,0x08,0xD1,0x2B,0x33,0x02,0x07,0xE5,0x08,0x00,0x48,0x13,0xDC,0xDC,0x6C,0x81,0xD8,0xC5,0x74,0x00,0xDB,0x32,0x1A,0x1A,0x44,0x32,0x07,0xDB,0x04, - 0xA0,0x96,0x93,0x93,0x8D,0xCA,0xB7,0x60,0xDA,0x18,0x79,0xB6,0x6C,0xDC,0x59,0xB7,0x58,0xDB,0x04,0xDA,0xA8,0x9A,0x1B,0x26,0xDB,0x02,0x1B,0x53,0x98,0x60,0xDB,0x00, - 0x5E,0x52,0x5E,0x6D,0x35,0x21,0x54,0x0B,0xF0,0x51,0xDB,0xFA,0x00,0x03,0xDA,0x00,0x3A,0x16,0xDE,0xDE,0x16,0x8E,0x4B,0x04,0xCD,0x78,0xE1,0xCA,0xD4,0x6B,0x0A,0xB4, - 0x59,0xCA,0xA1,0x45,0xF5,0x59,0x8B,0xB5,0x6A,0x05,0x8B,0x12,0x95,0x8D,0x2E,0x00,0x74,0x89,0x96,0x31,0xC6,0x92,0x92,0x3F,0x39,0x4C,0x94,0xA4,0xAF,0x1E,0x9C,0xDB, - 0x2E,0x00,0xC2,0xDA,0x70,0xDB,0xB0,0xDC,0x92,0xAC,0x69,0xEE,0x7C,0xDC,0x4C,0x5D,0x92,0x94,0xF1,0xA3,0x93,0x9E,0x9E,0x90,0x44,0x9E,0xC1,0xDA,0x28,0xDB,0x76,0x81, - 0xB4,0xAC,0xDE,0xDC,0xCA,0xB7,0x5B,0x85,0x41,0xDB,0x22,0x61,0xDB,0xA0,0x94,0x6B,0xD6,0x52,0xAF,0x00,0xC0,0x85,0x15,0x15,0x10,0x82,0xD9,0x5C,0xC1,0xDB,0x2A,0x20, - 0xDB,0x16,0x3A,0x1E,0x9D,0x1F,0x04,0x83,0x37,0xB7,0x52,0xC4,0xE9,0x89,0x83,0xCE,0x04,0xDB,0x14,0xBA,0xFC,0x1D,0xAD,0x89,0x2A,0xE7,0xEB,0xF6,0xBC,0xE3,0x8D,0x9E, - 0x34,0xE5,0xD9,0xF8,0x65,0xF0,0xA5,0x23,0x0A,0xE0,0x5F,0x5A,0xAA,0x29,0xC2,0xD9,0xDE,0xC7,0x28,0xDB,0x24,0xDC,0x09,0xAF,0x87,0xA7,0x9B,0xB1,0x29,0x67,0xAB,0xB4, - 0x21,0x9E,0x43,0x58,0x55,0xFE,0x30,0xDA,0x60,0xDB,0x91,0x90,0xDB,0x32,0xB6,0xA9,0xA6,0x08,0xCF,0xA5,0x5B,0x0D,0x4C,0xDB,0x01,0x7A,0x22,0x97,0xD8,0xCF,0x27,0xBC, - 0x64,0xB8,0x6D,0xD6,0xF0,0x47,0xD0,0x72,0x01,0xAA,0x1F,0xA7,0xC7,0x92,0xAF,0x42,0x19,0x16,0xB3,0x2A,0xC1,0xD0,0x03,0xA7,0x9F,0xBC,0x9C,0x0A,0x8B,0xC2,0x65,0xB8, - 0x7F,0xCF,0x39,0xB9,0x7A,0x00,0xBE,0xCB,0x8A,0x35,0x02,0x28,0xCE,0x4F,0xBB,0x7F,0x0D,0x26,0xDB,0x34,0xB5,0xD5,0x07,0xA4,0x93,0xB7,0xDE,0xDF,0x5C,0x9A,0xD3,0xC1, - 0xD8,0xDD,0x48,0xE6,0xB8,0xDE,0x2D,0x5C,0x00,0x32,0x6F,0xCC,0x7D,0xB8,0x65,0xB4,0x64,0xB5,0x5D,0xBA,0x05,0x8E,0x4C,0xDA,0x04,0x41,0x41,0x58,0xA9,0x90,0x4F,0xC9, - 0x44,0xB4,0x6C,0x2D,0xA0,0xE4,0x92,0x16,0xB9,0xEE,0xB8,0xDB,0x21,0x7A,0x50,0xDB,0x2C,0x9A,0xD8,0xB7,0xBC,0xE1,0xD3,0x93,0xF1,0x55,0x20,0xDB,0x88,0x5F,0x87,0xBB, - 0xBB,0x25,0x3A,0xB8,0xD3,0xB3,0x8E,0x8E,0xE5,0xB2,0x1E,0x77,0x82,0x95,0xB7,0x05,0xDB,0xD4,0xBA,0xAF,0x98,0xAC,0xC7,0xEF,0xBD,0x2F,0xF0,0xD8,0xDA,0x4E,0xB7,0x56, - 0x8A,0x35,0x00,0x32,0x8E,0x4B,0x0C,0x61,0xDB,0xD5,0x0B,0x06,0x97,0xB6,0x00,0x65,0xB7,0x94,0xC4,0xA1,0xE3,0x95,0xB4,0x15,0xB7,0xCD,0xA8,0x04,0xDB,0xAF,0xCE,0x64, - 0xBA,0x2F,0xBF,0x00,0xBE,0xAC,0xDB,0x28,0xD9,0x27,0xDB,0x01,0x58,0x79,0x4A,0x20,0xDB,0x24,0x91,0xEE,0x55,0xA3,0xAE,0xEE,0x92,0x82,0xA8,0xAF,0x4C,0x15,0xDB,0x01, - 0x24,0xAC,0xA5,0x41,0xDB,0x65,0xB8,0x60,0xDB,0x20,0xB0,0xDB,0x53,0x5F,0xD1,0x8D,0x1F,0x10,0x10,0xD0,0xC6,0x25,0x16,0x16,0xDB,0x0C,0xB3,0x8D,0x16,0x0A,0x8D,0xE2, - 0x39,0xB3,0xE5,0x93,0x95,0xED,0x39,0x8D,0xF4,0x09,0x2B,0xAE,0xDD,0x0D,0xA7,0xAB,0x0D,0x2D,0xF7,0x76,0x00,0xF5,0x17,0x93,0xB2,0xB4,0x9B,0xA9,0x90,0xA6,0x0D,0x1E, - 0xBE,0x79,0x82,0xDB,0x82,0xD1,0xFB,0x03,0x04,0xDB,0x0A,0xB2,0x29,0x6D,0x84,0x5C,0x77,0x03,0x89,0x6A,0x49,0xDE,0x0B,0xDB,0x0C,0xC2,0xB2,0x03,0x46,0x6E,0xF5,0x00, - 0xEC,0x59,0x58,0x00,0x41,0x4A,0x40,0xDB,0x79,0x18,0x3D,0x91,0x91,0xD9,0x49,0xA5,0x32,0x00,0xDB,0xD8,0x98,0x53,0x85,0x14,0xEF,0x08,0x24,0x0B,0xC1,0x82,0xE2,0xC5, - 0xB8,0x2B,0xF0,0x55,0x20,0x05,0x00,0x35,0xCD,0xCD,0x17,0x70,0xC5,0x01,0x0C,0x16,0x30,0x0C,0x25,0xDE,0x32,0x0C,0x8E,0xAD,0x5C,0x33,0x9C,0xA8,0x04,0xF8,0x70,0xC0, - 0xB5,0xD7,0xA0,0xBC,0xAA,0x03,0x09,0xB0,0xDB,0x9D,0xB1,0xFE,0x0D,0x0E,0xC2,0xF6,0xEA,0xE0,0xE6,0x10,0xE8,0x59,0x79,0xA1,0x1E,0x22,0x94,0x76,0x02,0xAC,0x55,0xF2, - 0x5C,0x06,0xBB,0xBC,0x75,0x0A,0x00,0x26,0xDD,0x72,0x01,0xD3,0x00,0xC3,0xF4,0x01,0xC6,0xF3,0x95,0xB7,0x84,0xD9,0xE0,0xDB,0x4A,0xD4,0x00,0x41,0xB7,0x4B,0x79,0xDB, - 0x0E,0x80,0xCB,0xA0,0xA0,0xA5,0x9D,0xEE,0x5A,0xDA,0xEE,0x88,0x97,0x22,0x07,0x4C,0xDB,0x1D,0x07,0x84,0x96,0x97,0xD7,0xDB,0x16,0xB7,0x56,0xEF,0xAA,0x20,0x04,0x63, - 0x35,0x00,0x19,0x21,0x0C,0x00,0x68,0x34,0x97,0x34,0x60,0x16,0xDB,0x4B,0x58,0x33,0xAE,0x50,0xA1,0x55,0x06,0xAA,0xB5,0x39,0xA5,0x00,0xCC,0x08,0x97,0xBF,0xB4,0x13, - 0x2A,0xAB,0xD2,0xDC,0x00,0x98,0xCF,0x00,0x69,0x8B,0x54,0x06,0xCD,0x13,0x65,0xD0,0xCD,0xAA,0x83,0xDB,0x5C,0xD0,0x69,0x02,0xDC,0x5E,0xB6,0x8A,0xDB,0x0C,0xD8,0x24, - 0xA2,0x97,0x49,0x03,0x38,0xDB,0x54,0x04,0xA0,0xDA,0x79,0x95,0xCA,0xD4,0x3D,0x90,0x94,0xDB,0x17,0xA5,0x38,0xDB,0x35,0xCF,0xEE,0xFA,0xBA,0x15,0xDB,0x0E,0x84,0xD6, - 0xAC,0xDB,0x15,0xA9,0x34,0xF0,0xB2,0x02,0xDB,0x35,0x82,0xDB,0xB0,0xE8,0x19,0x0B,0xD2,0x95,0x9D,0xCC,0x25,0x4C,0x00,0x4B,0xC3,0x2D,0x9F,0xEC,0xA6,0x13,0x39,0x58, - 0x00,0xE0,0x4B,0xEC,0x5D,0x00,0x94,0xBC,0xC1,0xDB,0x56,0x04,0x8F,0x91,0xA0,0xDB,0x2A,0xF0,0x05,0xCA,0x98,0xDC,0x17,0x33,0x00,0x7A,0x0D,0x88,0x6D,0xD1,0x69,0x94, - 0x65,0xB6,0x38,0xDB,0x52,0x93,0x59,0xB3,0x58,0xD5,0x50,0xDB,0x14,0x2D,0x46,0x05,0x46,0x4D,0x9E,0x00,0x61,0xDB,0x4F,0xC7,0x2C,0xA4,0xFA,0x00,0xEF,0xC9,0xB8,0xDB, - 0xCA,0xA8,0xE6,0xDB,0x3C,0xDE,0x85,0x40,0xDB,0x4F,0x22,0x5C,0xAC,0xA8,0xCF,0x85,0x76,0xBC,0x47,0x17,0x17,0x89,0x6A,0x2B,0xDB,0x0B,0xDA,0x0D,0x00,0x34,0x60,0xDB, - 0x2A,0xBE,0xBA,0xC0,0xB9,0x4B,0x4B,0x88,0xD8,0x09,0x82,0xDB,0x42,0xCA,0xEE,0x19,0x11,0x6E,0x1D,0x0D,0x2E,0x00,0xEB,0xFA,0x11,0x92,0xED,0xA4,0xFE,0xA9,0xC1,0xDB, - 0x0A,0x5A,0xBC,0x16,0x4A,0x3A,0xFC,0xAB,0x5C,0x86,0xBA,0x04,0xA9,0xA6,0xBE,0xB0,0xC3,0xD9,0x01,0xC0,0xD3,0x46,0x2D,0xF0,0x00,0x04,0x46,0x8C,0x8C,0x9E,0xAA,0x02, - 0x00,0x91,0xEA,0x6D,0xEB,0x52,0x3D,0x02,0xDC,0xA0,0xD3,0x92,0xB5,0x25,0xB9,0x58,0x81,0xE2,0xAF,0x5B,0x42,0x07,0xE0,0xDB,0xC1,0xB0,0xDB,0x99,0xF0,0x7E,0xBF,0xED, - 0x89,0x81,0x4E,0xCC,0x0C,0x61,0x2B,0xDC,0x49,0x92,0xE3,0x7B,0xDC,0xB9,0xD0,0x25,0x3A,0x41,0xBC,0x49,0x94,0x4F,0xCE,0x85,0xE6,0x05,0xC0,0x84,0xC2,0xE1,0xDC,0xF7, - 0x18,0x02,0x8F,0x64,0xB3,0xB3,0xA1,0xDB,0xF6,0x06,0x11,0x94,0x92,0x4D,0xAD,0x3E,0x00,0x33,0x0E,0x11,0x57,0xC0,0x90,0xD4,0x30,0xE0,0x4A,0x0A,0xF2,0xB1,0x41,0xDB, - 0x84,0xDC,0xCA,0x00,0x1A,0xD9,0x0A,0xDB,0x0B,0xB8,0x20,0x2D,0x2E,0x1D,0xAB,0x50,0x64,0xDC,0x30,0x43,0xD9,0x90,0xDB,0x25,0xC6,0x7A,0x8E,0x49,0x81,0xDB,0x6C,0x69, - 0x92,0x45,0xB7,0xBD,0xC9,0x03,0xDB,0x4C,0xC5,0x04,0x00,0x29,0x00,0xAB,0xF0,0x98,0xCC,0x77,0x99,0x00,0x85,0xDB,0x26,0x95,0x91,0x8A,0x6D,0x88,0xB0,0xCD,0x35,0x6D, - 0x5F,0x1B,0x2B,0x15,0x0B,0xCB,0x8B,0x3A,0x5C,0x0A,0xDB,0x0D,0x02,0x8E,0xE3,0xE6,0x4B,0xD9,0x3A,0xC1,0x0D,0x02,0x8E,0x41,0xC5,0xD0,0x04,0xC2,0x30,0x06,0xB5,0xB0, - 0xD1,0xB0,0xCB,0xA9,0xB5,0xAF,0x0B,0x27,0x0E,0xC2,0xDF,0xDF,0xD1,0xC5,0x05,0x03,0x3D,0xE3,0x55,0x17,0x1D,0x05,0xD9,0xA6,0xA6,0x12,0x3A,0xDA,0xB7,0xE6,0xAA,0xDA, - 0x8D,0xB3,0x05,0x0E,0x10,0x15,0xBD,0x1B,0xA5,0xF9,0x83,0xD7,0xCC,0x00,0x67,0x67,0x1C,0x32,0x30,0x1C,0x1A,0xD8,0x18,0x32,0x2E,0xAB,0xD7,0x28,0x64,0x03,0x2D,0x6E, - 0x12,0x5D,0x8C,0x43,0x12,0xB5,0x41,0x83,0xDB,0x03,0x9C,0xDB,0x29,0x91,0x32,0xB5,0x94,0xDC,0x28,0xDA,0x1A,0xA8,0xEE,0x90,0x08,0x08,0xA4,0xA7,0x96,0x00,0x1B,0xCC, - 0xF2,0x5C,0x84,0x81,0xDB,0x79,0xE4,0xA9,0xF0,0x20,0x17,0x40,0xDB,0x10,0xC1,0xDB,0x1F,0x82,0x82,0x0C,0x80,0xDB,0x8E,0xDE,0xAB,0x8B,0xC1,0xB5,0x4B,0x49,0x9E,0x57, - 0x97,0x82,0xC1,0xB3,0xB2,0x03,0xB5,0xA0,0xBA,0x48,0x25,0xBC,0xFF,0x04,0x1A,0xF9,0x18,0x20,0xB7,0x30,0x2A,0xC0,0xEE,0x0B,0xD2,0x68,0xDB,0x28,0xD4,0x2A,0x10,0x74, - 0xA2,0x91,0x8C,0x2A,0xAE,0x6A,0x8C,0xEC,0xC7,0x94,0x03,0xDB,0x15,0xAC,0x15,0xC7,0xB3,0x80,0xDB,0x1C,0x67,0x1D,0x61,0x1D,0xD9,0xE8,0x01,0x97,0x2E,0x0B,0x2E,0x64, - 0x43,0x64,0x00,0xDD,0xC3,0x5D,0xA4,0x91,0x8A,0xED,0x41,0xF2,0xD9,0xD6,0xF0,0x70,0xDB,0xB2,0xB6,0x88,0xDB,0x00,0xB7,0x9A,0x24,0x02,0x42,0x02,0x61,0xDB,0xDD,0x98, - 0x3E,0xCC,0x94,0x96,0xDB,0x02,0x75,0xEB,0x6B,0x97,0xEC,0xB8,0x2B,0xAD,0x9D,0xCC,0xE8,0xDB,0x29,0xF0,0x70,0xDB,0xEF,0x85,0xCC,0x0A,0xDB,0x02,0xEA,0xDE,0x83,0xDC, - 0xCA,0x06,0x0C,0x9C,0x58,0xF1,0x5A,0xDA,0xAD,0xB3,0xD9,0x69,0x9E,0x2E,0xF7,0x24,0xDB,0x0C,0xC7,0x12,0x25,0x85,0xDB,0xAA,0xF0,0x04,0xC3,0xF7,0x12,0xA8,0x89,0xC2, - 0xCF,0x50,0xFB,0xE4,0x00,0xDB,0x07,0x03,0x03,0x7F,0x2B,0x00,0x35,0xB7,0xC8,0xAB,0x07,0x1F,0x13,0x22,0x20,0xDD,0x6A,0xEC,0x1A,0x0A,0x0B,0x19,0x1D,0x2E,0xDA,0x0C, - 0xBF,0xB2,0xC0,0xA4,0x8C,0xD5,0xEC,0x64,0x45,0x05,0x6E,0x2F,0xAA,0xED,0x8C,0xC3,0xDB,0x00,0xB9,0xA8,0x48,0x4A,0x91,0x8A,0x6C,0x00,0xB5,0xF0,0x94,0xDB,0x04,0xA5, - 0x5B,0x0D,0x2A,0xDB,0x19,0xB7,0x53,0xCC,0x85,0x8F,0xCA,0xE6,0x76,0x80,0xDB,0xEB,0x5E,0x81,0xBC,0xE1,0xD2,0x93,0xE5,0xA9,0x15,0xBB,0xCC,0x0C,0x7D,0xC8,0xB6,0x15, - 0x8E,0xB0,0xDB,0x61,0xEB,0xDC,0xE9,0x06,0x8A,0xBB,0x00,0x16,0x13,0xEF,0x59,0x9E,0xD5,0x47,0xA7,0x55,0x2A,0x0E,0x48,0x10,0xA0,0x9A,0x04,0x4B,0x52,0xAA,0xE8,0x0F, - 0xE5,0xB2,0xE4,0xE8,0x05,0xDC,0x28,0xD5,0xAA,0x07,0xAC,0x00,0xBE,0xAE,0x0A,0xA9,0xFD,0x1E,0x51,0xA5,0x84,0xDA,0x50,0xDB,0x0B,0x1C,0x0B,0x1C,0xEF,0x5D,0xE8,0x56, - 0x64,0xE8,0xB3,0xE0,0x00,0xD8,0x43,0x69,0x43,0x8C,0x45,0xB5,0x41,0xDC,0x61,0xDB,0x69,0x96,0x30,0xDA,0x58,0xDB,0x30,0xD0,0xDB,0x6B,0xA8,0xEE,0x0A,0x74,0xB9,0x8E, - 0xCD,0x24,0x29,0x5B,0x82,0x94,0x1D,0x76,0x00,0x02,0xDB,0x52,0x40,0xDA,0x90,0xDB,0x37,0xCC,0x93,0xBE,0xB7,0xD5,0xA0,0xDB,0x4A,0x16,0xDB,0x18,0xE2,0x52,0x9B,0x69, - 0xA8,0xC4,0x00,0xBE,0xCF,0xC7,0x16,0xF9,0x75,0x0E,0x49,0x93,0xF6,0x00,0x0E,0xF1,0xB4,0xF3,0xB6,0xC2,0x14,0xD9,0x1B,0xA7,0x52,0xC5,0x5A,0x21,0x4B,0x70,0xDD,0x92, - 0x08,0x92,0x41,0x1F,0x61,0x00,0xDB,0x76,0x05,0xDB,0x17,0xA1,0x2A,0x1C,0x90,0x4A,0xB6,0x2A,0xB0,0x28,0x90,0xDB,0xC8,0xB6,0x51,0xE9,0x60,0x51,0xD8,0x9E,0xB0,0xDC, - 0x98,0xB6,0xB0,0xDB,0xFA,0xBA,0x42,0xB6,0xAC,0xDF,0xC3,0xDB,0x92,0x41,0x98,0x53,0x08,0x0A,0xAA,0xEF,0x02,0xDC,0xCC,0x82,0xCC,0x58,0xCA,0xDB,0x2F,0x75,0xE2,0x26, - 0xDB,0x05,0x2B,0x1A,0x00,0x21,0x15,0x00,0x34,0x42,0xB7,0xC1,0xA3,0x6D,0x61,0xD6,0x38,0xDB,0x59,0xB9,0x2C,0xB3,0xCA,0x12,0x0A,0x4C,0xA5,0xA1,0xAF,0x85,0xDB,0x01, - 0xC7,0x33,0x39,0x5B,0x08,0x8C,0x74,0x23,0xBA,0xF6,0xDA,0x1F,0x3B,0x13,0x4B,0xDE,0x2E,0xA5,0xD8,0xD3,0x77,0x06,0x3F,0xA5,0x00,0x10,0xDC,0x0C,0xD5,0x25,0x05,0xBA, - 0xFE,0xC2,0xD7,0x9D,0xC8,0x54,0xA4,0x98,0x81,0xD8,0x82,0xDE,0x49,0x40,0xD9,0xC5,0x02,0x51,0xEC,0x95,0x04,0xDB,0x8F,0xC9,0x85,0xDA,0xE1,0x00,0xDA,0xC8,0x00,0xB6, - 0x4C,0xA3,0xB6,0x8A,0xDF,0xDA,0xDD,0xCD,0xCA,0xD0,0x4F,0xA5,0x83,0x87,0x02,0x08,0x12,0x4F,0xA8,0x25,0xD8,0xD7,0x2A,0xF0,0x76,0x57,0xCC,0xB5,0xEE,0xB2,0xB7,0xD4, - 0x00,0x5F,0xDC,0x0A,0x25,0xDB,0x0A,0xB4,0x06,0x16,0x05,0x8E,0xED,0x02,0x00,0x25,0x61,0xBC,0x41,0xA7,0x72,0x95,0x4B,0xB5,0xEA,0x90,0x95,0xBA,0x0C,0xB0,0x4E,0x16, - 0xAE,0xAD,0x9F,0xEC,0x24,0xD2,0x37,0x33,0x07,0xDC,0x07,0x4B,0x2A,0x0A,0x13,0xA6,0xB4,0xD5,0x09,0x34,0x39,0xAE,0x00,0x34,0x00,0xB5,0xBE,0x1F,0x4C,0xCE,0x5C,0x98, - 0xE1,0x17,0x26,0xFD,0x57,0x00,0xBE,0xD0,0xDF,0x17,0xB2,0xD2,0x00,0xE0,0x8C,0x41,0x95,0xD3,0x94,0xB7,0x26,0x95,0x92,0x9C,0x09,0x97,0x82,0x20,0xDA,0x5C,0x00,0xA5, - 0xB7,0x79,0xDD,0x6A,0xEE,0x00,0x85,0x80,0xDB,0x1B,0x12,0x09,0x07,0x53,0x97,0xD8,0x13,0x94,0xBD,0xEB,0xDB,0x0E,0x00,0x40,0xDB,0xE5,0xA8,0x17,0xD1,0x93,0x15,0x21, - 0xCD,0x91,0x06,0xDB,0x94,0x0A,0x10,0xA8,0x05,0x21,0x05,0xDC,0x06,0xA2,0xCA,0x15,0x91,0x79,0x97,0x78,0x13,0xA9,0x61,0xDB,0x2C,0x81,0xDC,0xA4,0xC8,0x8B,0xD8,0xF0, - 0x7B,0x83,0xD9,0x08,0xF3,0x5D,0xF3,0x64,0xF3,0x0C,0x5E,0x01,0x9C,0xD8,0xDB,0x2B,0x15,0x39,0x10,0xAB,0x39,0xDB,0x0C,0x4E,0x10,0x17,0xBF,0x9B,0xB9,0xA6,0x9C,0xDB, - 0x2A,0x06,0x89,0xB8,0x0B,0x95,0xB6,0x77,0xBB,0xBC,0xC5,0x49,0x6E,0x80,0xDB,0x43,0xE9,0xE9,0x64,0x6E,0xB1,0xE9,0x60,0x4A,0xDB,0x43,0x98,0xDB,0x12,0x91,0x05,0xDA, - 0xDA,0x83,0xE4,0x81,0xDB,0xBD,0x41,0xDB,0xAB,0xEE,0x5B,0xEE,0x58,0x50,0xDA,0x24,0xF1,0x0D,0xCC,0xD2,0xAF,0xCE,0xA9,0xB7,0x5D,0x00,0x75,0xBF,0x83,0xDC,0x52,0xC1, - 0xE7,0x19,0xC3,0xCD,0x0C,0xCA,0xF2,0xB7,0xDD,0xD5,0x0C,0x41,0x90,0x63,0xFA,0x44,0x00,0x2B,0x0C,0xA4,0x8E,0x09,0xB3,0xE8,0xBE,0x95,0xD1,0x86,0x1E,0xE5,0xCF,0x54, - 0x13,0xCA,0x96,0x6D,0x2B,0xFC,0x16,0x00,0x0C,0xA3,0xF2,0xB3,0xFF,0xF9,0x36,0xE7,0xF0,0x0D,0xFA,0xB2,0xF7,0xEA,0x13,0x17,0xA8,0x20,0xD9,0x29,0x53,0x17,0x60,0xDC, - 0x1F,0xB2,0xB7,0xC2,0xCF,0xB5,0x07,0x00,0x1A,0xA9,0xEF,0x1C,0x2E,0x4A,0xF2,0x2D,0xB5,0xEE,0x1B,0x2F,0x6E,0x6E,0xC5,0xE5,0xB2,0xAA,0xEB,0x41,0xF9,0xB8,0x41,0xDA, - 0x00,0xEC,0xD2,0x8C,0x51,0xB8,0x5D,0x81,0x94,0x77,0x77,0xC9,0xFA,0xEE,0xAD,0xE6,0xEE,0x42,0x22,0x08,0x31,0x12,0x14,0xDB,0x04,0x08,0xC0,0xDB,0xCA,0x4D,0xC5,0xE1, - 0x95,0x00,0x6B,0xF1,0x9F,0x04,0x17,0x5F,0x00,0x75,0x61,0xDB,0x61,0x90,0x84,0x8F,0xA0,0xB4,0x16,0xB3,0xF5,0xF3,0x97,0xD7,0xCA,0xD4,0xEB,0xA7,0x76,0x33,0x08,0x03, - 0xA5,0xC7,0xB0,0xDB,0xC9,0x00,0x2B,0x16,0xBC,0x00,0x35,0xDA,0x3B,0x00,0xA2,0x2A,0x2C,0x7A,0x10,0x09,0x1D,0x2B,0x60,0xDB,0x4A,0x16,0xDB,0x07,0x15,0xCD,0x5C,0x20, - 0xDB,0x2E,0x0B,0x00,0xE6,0xA0,0x60,0xDB,0xB9,0xA9,0xB9,0x00,0x40,0xDB,0x95,0x95,0xC1,0xDB,0x58,0x41,0xDB,0xD4,0xFE,0x50,0xDB,0x5A,0x91,0x61,0xDB,0x49,0x91,0xAD, - 0xEE,0x80,0xDB,0x97,0x22,0x07,0x85,0x82,0xDB,0xC9,0x00,0x24,0xC1,0xC3,0xDB,0x00,0xB0,0xDB,0x50,0x6D,0xDB,0x14,0x5E,0x20,0xDA,0x36,0xDB,0x0B,0x21,0x8A,0x4B,0xDB, - 0x0B,0xDC,0x0D,0x04,0x25,0x5E,0xF1,0x4B,0xB7,0xA9,0xC2,0xB9,0xDE,0xB3,0xAB,0xE1,0xB2,0xCB,0xB1,0x7E,0x0E,0xD2,0x93,0x49,0x9A,0xB7,0x26,0x16,0x1F,0x7D,0x21,0x03, - 0x05,0xDB,0x0E,0x89,0xF8,0x15,0xED,0x3F,0x14,0x0A,0x68,0x9A,0x34,0xA2,0x06,0x15,0x67,0x50,0xDB,0xFC,0x00,0xD6,0xD8,0x00,0x0B,0xD1,0x4E,0xDD,0x14,0xD2,0xEB,0x2D, - 0xBB,0xEB,0xED,0x59,0x41,0xDB,0x41,0xE2,0xDE,0x85,0x20,0xDB,0x12,0x6C,0x3D,0xCA,0x85,0xDA,0xE6,0xDC,0x92,0x92,0x3E,0xCA,0xFC,0x70,0xA8,0xD7,0x5E,0xF4,0x35,0x7A, - 0xF0,0x11,0xA5,0xD7,0xCF,0x20,0xDB,0x52,0xB4,0x93,0xC8,0xB7,0x17,0x35,0xA0,0xDC,0x4A,0x21,0xDB,0x09,0x0C,0x75,0x00,0xA7,0xA0,0xDB,0xCB,0xB1,0x00,0x4A,0x33,0xA3, - 0x96,0xB9,0x5E,0xA8,0x0B,0xEA,0xEA,0x8E,0xEB,0x05,0x16,0xBF,0xE2,0x04,0x71,0x2C,0x21,0xDB,0xD8,0x18,0xCF,0x13,0x2B,0x6D,0x7C,0x43,0x0B,0x06,0x81,0xDB,0x87,0xDA, - 0xE2,0x74,0xDB,0x0C,0x3A,0xCE,0x1E,0x19,0x61,0xDC,0x16,0xD3,0x17,0xA8,0x29,0x54,0x03,0xDB,0x85,0xB5,0x51,0xAA,0xED,0x51,0x82,0xDB,0x91,0x8D,0x58,0x4B,0x00,0x4A, - 0xB8,0xE5,0x91,0x86,0xDB,0xB4,0x4B,0x91,0xD9,0x05,0xA0,0xDF,0x80,0xA5,0x2A,0xDA,0xEE,0x54,0x24,0x2C,0xEE,0xAB,0x00,0xD1,0xE0,0x02,0x22,0x9A,0xAF,0x65,0xD7,0xB8, - 0x87,0xDB,0x00,0x4F,0xCD,0x60,0xDA,0x20,0x50,0x6D,0xDB,0x1F,0x2B,0x20,0x03,0x78,0x86,0x86,0x90,0xFE,0xE8,0x73,0x04,0x98,0x00,0x3A,0x13,0xD7,0x50,0xE2,0x76,0x08, - 0xD9,0x15,0x03,0x90,0xB7,0x16,0xEA,0xEB,0x25,0x8E,0x3A,0xAB,0x99,0x82,0xDB,0x92,0xC0,0x92,0x8E,0xEA,0xF7,0x86,0x84,0x50,0xDB,0x55,0x2B,0x05,0xD4,0x3E,0x48,0x85, - 0xB8,0xA5,0x58,0x01,0xE6,0x5C,0xDB,0x28,0xC3,0x70,0xDC,0x4A,0x32,0xDC,0x0C,0x54,0xBB,0x96,0x2E,0xDB,0x0D,0x43,0x95,0x16,0x43,0xDB,0x18,0xD8,0x47,0x06,0xDB,0xDC, - 0x12,0x05,0xDA,0xA5,0x92,0x06,0xDB,0xCA,0xFA,0xEE,0xDF,0xB9,0x10,0x08,0x02,0xB8,0xDB,0x68,0x94,0x5B,0x50,0x98,0xDB,0x26,0x99,0xDB,0x05,0x81,0x86,0xDB,0x93,0x9C, - 0xAA,0xD8,0xDB,0x65,0xBD,0x86,0x8D,0x90,0xA8,0x01,0x80,0xDB,0x6E,0x21,0xA5,0x3A,0x61,0x10,0xF0,0x25,0xDD,0x59,0xBB,0x50,0xD4,0x28,0x8E,0xB7,0x93,0x25,0xCB,0x00, - 0xED,0x55,0x05,0x57,0x2B,0x08,0x69,0x93,0x40,0xCA,0x35,0xB0,0xDB,0xA0,0xF2,0x94,0xDB,0x1D,0x10,0x09,0xAD,0xE6,0x3E,0xBF,0xCB,0xF9,0x99,0xE5,0x6E,0xCD,0x67,0x94, - 0xAF,0x9D,0xBE,0xCD,0xA7,0x86,0xDB,0xD7,0x1D,0x02,0x84,0xDB,0xA1,0xD8,0x41,0xDA,0x60,0xDB,0x95,0x50,0x3D,0xDA,0x4A,0xB6,0x57,0xB7,0xD2,0x83,0xDB,0xAF,0xEE,0x52, - 0x31,0x07,0x16,0xDB,0x05,0x7A,0x93,0x15,0x1B,0x4C,0x5C,0x85,0x49,0xB7,0x14,0x5E,0x6D,0xDB,0x15,0xAC,0x35,0xCF,0x19,0x86,0x44,0x16,0xB7,0x9F,0x05,0x01,0x1F,0x1F, - 0xE5,0x0F,0xF6,0x10,0x11,0x9A,0x52,0x4F,0xB5,0xCE,0x9C,0x17,0x78,0xDC,0x56,0xE2,0x49,0x15,0x2A,0xEF,0xE2,0x92,0x15,0xA9,0x33,0x81,0xDB,0x10,0x87,0xDB,0x00,0x28, - 0xDB,0x64,0xB7,0x34,0x28,0x01,0x17,0xCB,0x6B,0xD5,0x24,0xDA,0x0C,0xB4,0x8B,0xAB,0xAB,0xB3,0x2F,0x00,0xBA,0x29,0x41,0xDB,0x41,0x16,0xDB,0x09,0x3D,0x82,0xDB,0xB3, - 0xDB,0xDA,0x0C,0xDB,0x2D,0xCA,0xDA,0x98,0xEE,0xB5,0x4F,0xEE,0x43,0x1B,0x40,0xDB,0x53,0x60,0x9A,0xDB,0xCA,0xC3,0xDB,0x00,0x92,0xA8,0x6C,0xB8,0xAC,0xDB,0x34,0x98, - 0x50,0x35,0xDB,0x50,0x94,0x60,0xBE,0x2B,0x98,0xDA,0x31,0xFB,0xC3,0xDB,0xAE,0x0C,0x9A,0x14,0x34,0xCE,0x54,0xF1,0x77,0x87,0x25,0x01,0x19,0x15,0xA0,0xBD,0xE5,0x69, - 0x00,0x09,0x34,0x13,0xA8,0x17,0xDD,0xBC,0x2B,0x41,0xDC,0x53,0xA3,0x69,0x9F,0xA2,0x0F,0x0B,0x03,0xDB,0x37,0xF2,0x3C,0xAC,0xA0,0xDB,0xFE,0x44,0x4B,0x27,0x50,0xDB, - 0x4E,0xCD,0xDB,0x0C,0x2D,0xDA,0x25,0xDB,0x0E,0x07,0xC9,0xB8,0x41,0x53,0x00,0x86,0xDB,0xFB,0xB6,0xC7,0xF3,0x84,0xDB,0x85,0xB7,0x91,0xB6,0xD7,0x97,0xE4,0xDD,0x30, - 0xDB,0x09,0x08,0x05,0x02,0x0D,0x4C,0x98,0x12,0xB8,0x76,0xCB,0xB8,0xB9,0x2D,0x00,0x20,0x45,0xB8,0x5D,0xC3,0x5C,0xC0,0x17,0xA6,0x08,0x2B,0xF4,0x2B,0x0C,0x86,0x0B, - 0xBB,0xA5,0x17,0x50,0x07,0xEC,0xD0,0xE6,0x5F,0xDC,0xD0,0xC3,0x55,0xDA,0x55,0x06,0xDD,0xA1,0xCB,0x08,0x83,0x36,0xAF,0x5E,0x33,0xDC,0x16,0xFF,0x6F,0x10,0x07,0x45, - 0x7F,0x21,0x1A,0x1D,0x00,0x70,0x8C,0x21,0xB6,0xC0,0x98,0xB7,0xAC,0xBA,0xB4,0x84,0x7B,0x54,0xC7,0x92,0xB6,0x64,0xE6,0xA5,0x49,0xA1,0x9A,0x00,0x8A,0xB4,0xCA,0xB7, - 0x54,0x95,0xB9,0xA3,0xEE,0x00,0xFF,0xAD,0xCA,0xD6,0xA0,0xDA,0x0C,0xB9,0xDB,0x29,0x92,0x39,0xA5,0xD1,0x92,0x08,0xAD,0xEF,0x43,0x02,0x41,0xDB,0xCD,0xA9,0x14,0xB8, - 0x40,0xDB,0x6F,0xC8,0x12,0xDB,0x1E,0x00,0xDB,0x0B,0x21,0xF3,0x1A,0x90,0x0C,0x96,0x0B,0x2B,0x10,0x96,0xE4,0x10,0xC1,0xD8,0x59,0x00,0xFB,0xF7,0x0C,0x09,0x33,0xBD, - 0xA4,0x34,0xA8,0xBA,0x1F,0xA4,0x92,0xB4,0xC7,0xEF,0x10,0xA7,0x92,0x01,0x04,0xDB,0x92,0xE8,0x19,0xAD,0x4C,0xC5,0xE6,0x00,0xEF,0x49,0x05,0x83,0xBC,0xDB,0x16,0x1D, - 0xB4,0x49,0x1A,0x41,0xDB,0x43,0x26,0x00,0xDA,0x14,0xD8,0x17,0xB4,0xD6,0xDA,0x16,0xDB,0x08,0x91,0x80,0xDB,0xB9,0xA4,0xA4,0x93,0xA9,0xA6,0xE7,0xA5,0x92,0x4B,0xD8, - 0x08,0x64,0xDB,0x35,0x03,0x1B,0x4A,0xA9,0xD8,0x54,0x94,0x9C,0xDC,0x2C,0xDB,0x15,0x17,0x87,0x75,0x00,0x86,0xDC,0xCB,0xF4,0x84,0x4A,0x0B,0x92,0x2B,0xC4,0x7E,0xD4, - 0x1D,0x0B,0xDB,0x65,0xBB,0x5D,0x85,0x55,0x04,0x1B,0xCC,0xB4,0x81,0xEA,0x25,0x05,0x4B,0x15,0x07,0xD8,0x2F,0xDB,0x5A,0xDB,0xB0,0x15,0xCD,0xD2,0x05,0x3A,0xB7,0xAF, - 0xF1,0x3C,0x96,0x6A,0x04,0x19,0x00,0xD5,0x08,0x1C,0xB3,0xD5,0x03,0x66,0x04,0x54,0x54,0x93,0x96,0xEC,0xB5,0x00,0x27,0xB8,0x2B,0x8C,0x00,0xDD,0x0B,0xD7,0x0B,0x03, - 0xA4,0x8D,0xA0,0xDB,0x2C,0xE9,0xE9,0xDA,0x26,0x82,0xBB,0xDB,0x0D,0x92,0x2C,0xB6,0xAA,0xA5,0x61,0xE0,0xDB,0xC1,0xFB,0xC1,0x32,0x94,0x4C,0xDB,0x1A,0x82,0xCA,0xDB, - 0x0B,0x2B,0xDA,0x0A,0xB8,0x23,0x15,0x6D,0x0C,0xC2,0x8F,0xCB,0x8C,0x0D,0xAC,0xF5,0xEA,0xDA,0xC2,0xDB,0xC3,0xD1,0xEF,0x3A,0x94,0x24,0x3A,0xBC,0x00,0xC1,0xF6,0x10, - 0xD2,0x56,0xC5,0x58,0xDB,0x5B,0xA7,0x75,0x02,0x0B,0xD4,0x00,0x21,0x89,0x92,0x86,0xDA,0x97,0x39,0x03,0x01,0x5F,0xF4,0x00,0x36,0xDB,0x13,0x04,0xDF,0x94,0x00,0xB2, - 0x56,0x00,0x1D,0xA0,0xD9,0xAE,0xB5,0x92,0x00,0xD6,0xEC,0x40,0xDF,0x73,0x95,0x00,0x02,0xDB,0x91,0x82,0xDB,0xFA,0xB8,0x45,0xED,0xA0,0xDB,0xC9,0xB6,0x22,0x61,0xD8, - 0x61,0xC2,0x0C,0x07,0xDB,0x03,0x7D,0xBE,0x79,0xE2,0xF4,0xBD,0x70,0xDB,0x26,0x17,0xDB,0x0F,0xA1,0x2C,0xDB,0x38,0xF0,0xF5,0x0F,0x12,0x01,0x84,0xDB,0xA4,0xA8,0x21, - 0xB0,0xDB,0xE4,0x00,0xDA,0x0A,0x88,0x6B,0xE6,0x7A,0xE0,0x0E,0xBA,0x4E,0x35,0x15,0x17,0xC2,0xDB,0xAF,0x10,0x12,0x1A,0xD2,0x05,0x01,0x93,0xB0,0x01,0x32,0xA3,0x8E, - 0x15,0x21,0x54,0x0B,0x0F,0x61,0xD5,0x95,0xAF,0xD0,0x03,0xD6,0x75,0xFE,0x39,0xB8,0x52,0x92,0x30,0x9E,0xDB,0x9B,0xBB,0xA8,0xB6,0x90,0xE9,0x90,0xDB,0x3D,0xD0,0x00, - 0x92,0x1B,0x98,0xC9,0xCE,0xC2,0x10,0xB5,0x00,0x8B,0x18,0x9F,0xAC,0xAF,0xB8,0x24,0x75,0xA1,0xDC,0xCC,0xAB,0xE9,0x93,0x54,0x00,0xDB,0x19,0xAD,0x50,0xDB,0x61,0x8B, - 0x62,0xF9,0x21,0xD6,0x0F,0x15,0xCE,0x12,0xB0,0x00,0x1F,0xAB,0xA5,0xFF,0xAA,0xD4,0xB0,0xD9,0xA0,0xC0,0xB5,0xE2,0xED,0x15,0xC0,0xFA,0x2E,0x88,0x69,0x2E,0xBB,0x70, - 0xDB,0xA0,0xD8,0x5E,0x21,0x00,0xB3,0x55,0x53,0x28,0xE6,0x2D,0x0B,0x87,0x2C,0xDB,0x0E,0x32,0x64,0xFC,0x92,0x67,0x04,0xDC,0x95,0xFF,0x81,0xD5,0x8C,0x9E,0x61,0xDB, - 0x85,0xD0,0x06,0xDB,0xDC,0x1D,0x00,0xAC,0xEE,0x78,0xDB,0x01,0xDF,0xCF,0xA5,0x9A,0x53,0x08,0x0F,0x05,0xDB,0x81,0xDE,0x9F,0x4C,0x64,0xB8,0x99,0xB0,0xDC,0x90,0xB8, - 0xA7,0xCB,0x7A,0x00,0xC1,0x8D,0x2B,0x78,0x00,0xD1,0x2C,0x0B,0xAA,0x2F,0xEB,0x28,0xE5,0x25,0xD9,0x0F,0x00,0xCA,0xAB,0xD2,0x0F,0x11,0x0B,0xBE,0x05,0x00,0xBA,0xD6, - 0xE7,0x9B,0x3E,0x98,0xDB,0x2E,0x94,0x6E,0x00,0x40,0xDB,0xAB,0x49,0x53,0xE7,0x97,0x94,0x47,0x54,0x0B,0xAE,0xE5,0xA1,0x8B,0x1A,0xAD,0x2B,0xB7,0x24,0xAB,0x48,0xDB, - 0x7C,0xB7,0x51,0xCA,0x00,0x46,0x9E,0xF0,0x5A,0xB0,0x2B,0xDB,0x0B,0xA4,0x97,0x79,0x02,0x61,0xDA,0x28,0xDB,0x30,0xA3,0xDB,0x68,0xBD,0x93,0xDA,0x64,0xD7,0xB6,0x0D, - 0x70,0x08,0x00,0xF1,0xB5,0x6F,0x1D,0x9F,0xE2,0x12,0xAF,0x84,0xDB,0xB3,0xAA,0x12,0xDB,0x18,0x89,0x58,0xDB,0x48,0xA4,0x12,0x87,0xAA,0x02,0x9A,0xCE,0x15,0x60,0xDA, - 0x97,0x00,0xCC,0x0F,0x0F,0x04,0xB7,0xE6,0xC2,0xBE,0xAF,0x81,0x26,0x58,0x6D,0xDB,0x69,0xA8,0x53,0xA4,0x45,0xE3,0x65,0xCC,0xD2,0x0C,0x93,0x78,0x1C,0xDA,0x5D,0x54, - 0x4E,0x96,0xBC,0xE6,0x5F,0x21,0xCA,0x18,0xDD,0x2B,0x32,0x0B,0x8D,0x4A,0xDC,0x0C,0xDA,0x1D,0xCD,0x02,0x07,0xD9,0x01,0x44,0xAF,0xE9,0xE6,0x00,0xDB,0x09,0x1E,0xC7, - 0xC1,0xDC,0x79,0xD9,0x00,0xBA,0x77,0x03,0x80,0x72,0x2E,0xEE,0xB6,0x4F,0xD8,0xDC,0x1B,0x07,0xA9,0xC3,0x61,0xDB,0x37,0xC3,0x64,0xB8,0x98,0xC9,0xB8,0x99,0x85,0xDC, - 0xAE,0xF2,0xB6,0x53,0x26,0x96,0x87,0x0C,0x6D,0xDB,0x30,0x91,0xB9,0xAE,0x92,0xC8,0xB3,0xCD,0xA0,0xA3,0xB3,0xE5,0xB2,0x8D,0xB8,0xF1,0x65,0x1D,0xB8,0x8D,0xFC,0x23, - 0x94,0x15,0xEE,0x5F,0xBA,0x2E,0xD4,0x56,0x01,0xCB,0x19,0xB6,0x29,0xEA,0xF1,0xEC,0xF4,0xE6,0x2D,0x2D,0x21,0x5F,0xEB,0x6C,0xD6,0xA9,0x48,0x21,0x54,0xF4,0x67,0x50, - 0x54,0xDF,0x28,0x54,0xA6,0xA8,0xAE,0xAC,0xDE,0x30,0xDF,0xBA,0x04,0x8F,0x4B,0xDB,0x0D,0x9F,0x12,0x51,0xDC,0x00,0xA4,0xCA,0xDA,0x16,0xB4,0x5A,0x00,0x6C,0x62,0xB5, - 0xA2,0xB6,0xAB,0x80,0xE4,0xA5,0x5B,0x24,0x20,0x7A,0x00,0x88,0x00,0x7A,0x1B,0xB7,0xCD,0x47,0xC5,0x86,0xDB,0x00,0xCD,0xCA,0xB6,0xE6,0xAD,0x50,0xDB,0xCE,0xEC,0xD2, - 0x8F,0x4C,0xAB,0xB0,0xDB,0xC1,0xA5,0x54,0x40,0xDB,0x19,0xB2,0xB8,0xCB,0xA3,0x0F,0xB4,0xBF,0x92,0xEA,0xAD,0xEE,0x6D,0xD9,0x6A,0x2C,0xE9,0x2D,0xA3,0xB9,0x3D,0x43, - 0xDC,0x09,0xCF,0x86,0x8A,0x44,0x67,0xC1,0xDB,0x45,0xB2,0x49,0x8B,0x61,0xD5,0x16,0xDB,0x16,0xE8,0xB5,0x9F,0x32,0x85,0xDC,0xCA,0xA3,0x4A,0x60,0xDA,0xB0,0xDC,0xB2, - 0xB5,0xE4,0x00,0xED,0x50,0xB7,0x98,0x4C,0x9F,0x82,0x40,0xDB,0x09,0x02,0x08,0x24,0x5B,0xB1,0xE2,0x75,0x30,0xDB,0x4A,0xDC,0x14,0xB7,0x54,0x90,0x55,0x82,0x76,0x83, - 0x55,0x87,0xD4,0x82,0x56,0x09,0x16,0xA0,0xB2,0xF0,0x0E,0xB0,0x2F,0x1A,0x0B,0xBE,0x3E,0x0B,0x02,0xEB,0xDD,0x92,0x6E,0x19,0xEB,0x00,0xFC,0xFB,0x02,0xE1,0xC4,0x0B, - 0xAF,0xFF,0x82,0xEB,0x21,0x60,0xDC,0xCA,0xCD,0x94,0xE6,0x5F,0xCD,0x45,0xCD,0x85,0xDB,0xAC,0xE5,0xE1,0xDB,0xD8,0x00,0xDB,0x5E,0xD8,0x4A,0xB9,0x5A,0x9D,0x5B,0xC9, - 0xCC,0xDA,0x14,0xDC,0x16,0xC8,0xF6,0xC9,0xEA,0xDF,0xDC,0xCE,0x80,0xC8,0x7A,0x08,0x24,0xDB,0x0C,0xDC,0x13,0x4C,0x65,0xE2,0x92,0xB8,0x5E,0x79,0xAB,0x52,0x6D,0x97, - 0x56,0x8E,0x65,0x87,0x59,0xC8,0x56,0x83,0x2B,0xEE,0x0E,0x08,0x40,0xDB,0xBC,0xB0,0xAF,0xD5,0xF7,0x0F,0xA8,0xFF,0x05,0x0D,0x0A,0x0D,0xB7,0xDB,0xBC,0xC9,0xA0,0xDA, - 0xEC,0x00,0xDB,0x29,0xBE,0xFF,0x03,0x22,0xA2,0x1A,0xAB,0xB9,0x3F,0x00,0x06,0x0E,0xAB,0x1B,0xDB,0x09,0x52,0x00,0xAB,0xE8,0x06,0x9B,0x64,0x88,0xB8,0xED,0xE8,0x6C, - 0xB6,0xB2,0xB1,0xAB,0x82,0xA9,0x05,0xA6,0xA4,0xE6,0xA1,0xC2,0xDC,0x50,0xDB,0xAE,0xB7,0x3E,0xCF,0xA8,0xB7,0x61,0x9F,0xB5,0x04,0x61,0xDB,0x42,0x80,0x22,0xDC,0xCD, - 0xCC,0xCF,0xB4,0x94,0xF0,0x00,0xDC,0xB4,0x98,0x90,0xDB,0x28,0xB1,0xAF,0xEB,0x68,0xDB,0x3A,0x00,0xB8,0xEB,0x0F,0xC3,0x9F,0xD8,0x0A,0x92,0x2B,0xC6,0x0D,0x03,0x01, - 0x5D,0x86,0x28,0xDB,0x6B,0xF8,0x61,0xDB,0xD1,0x11,0x9D,0x61,0xFA,0x2A,0x8E,0x73,0x03,0x85,0xDB,0xD8,0x09,0xD7,0x65,0xEA,0xD9,0x04,0xB7,0x22,0x1D,0xA9,0x00,0xA2, - 0x32,0xBD,0x69,0x64,0x00,0x2E,0xC2,0xDA,0xF2,0xD8,0xEC,0x00,0xDB,0x2D,0x92,0x2E,0xFB,0xAE,0xA2,0x66,0xDB,0x06,0xB4,0xDB,0x16,0xED,0xB9,0xB6,0x20,0x08,0x9C,0xDB, - 0x03,0x07,0x0D,0x4C,0x82,0x94,0x49,0x14,0xF1,0xEB,0xEB,0x72,0x6B,0x00,0x95,0xB8,0x5D,0x8C,0x2C,0xBA,0x99,0xE6,0xC8,0x02,0xDB,0x1D,0x07,0xAD,0xC8,0x92,0xB3,0x10, - 0xF2,0xDA,0x94,0xF4,0x1F,0x5C,0xB2,0xAE,0xA3,0xF1,0xA0,0xDC,0x93,0xA1,0xBE,0x1D,0x00,0xCA,0xC7,0x4E,0x0B,0x15,0xD2,0x93,0x50,0xDB,0xBA,0x05,0x82,0x1A,0xCB,0x09, - 0x12,0x83,0x60,0xDA,0x76,0xCD,0x00,0xDA,0x14,0x00,0x43,0xB7,0xC9,0x91,0x8C,0x27,0xDB,0x04,0xE9,0xCA,0xEE,0x6C,0xE2,0x01,0x41,0xDB,0xB9,0x65,0xB6,0xAD,0xED,0x5C, - 0x80,0x12,0x06,0xDB,0x24,0x4F,0x04,0x4F,0x53,0xB0,0x8F,0xD7,0x48,0xDB,0x4C,0xB8,0x53,0xF2,0xC2,0x2B,0x9E,0x9F,0xC3,0xDC,0x00,0xB3,0xED,0x90,0xBD,0x2F,0xDA,0x28, - 0xCC,0x13,0x0B,0x85,0xDB,0x85,0xB7,0xBF,0xB7,0x07,0xA4,0xB4,0xC0,0xDB,0x21,0xB2,0xDC,0xB9,0x13,0x53,0x92,0x39,0xFA,0x08,0x23,0xF2,0x54,0x1D,0x68,0xDB,0x4E,0xDA, - 0x1C,0x00,0xA0,0xDB,0x95,0x88,0x00,0x98,0xDB,0x09,0x79,0x6C,0x96,0xF0,0x62,0xB6,0x91,0xED,0x42,0x07,0x00,0x1B,0x00,0x09,0x40,0x00,0x31,0x07,0x24,0xAC,0x8F,0xCC, - 0xC2,0xDB,0xF3,0xE3,0xDB,0x05,0xD6,0xAD,0xF4,0x05,0xDC,0x16,0xBC,0xDB,0x15,0xD0,0x57,0xAB,0x36,0xB9,0x54,0xC0,0xF6,0xDB,0x0B,0x21,0xEA,0xCB,0xB6,0x2A,0xD6,0x0C, - 0xDB,0x0B,0x13,0x1F,0x92,0x4D,0xF4,0xE8,0xB8,0x2C,0xA3,0xA8,0xC8,0x24,0xAF,0xEC,0xD2,0xB4,0x00,0x1F,0xDD,0x08,0x31,0x97,0xC3,0x34,0x76,0x1C,0xCE,0x49,0x2E,0x81, - 0xDB,0x67,0x61,0xDA,0x1E,0xDB,0x16,0x8A,0x93,0xA2,0x00,0x3D,0xA6,0xA6,0x50,0xDB,0xE7,0xA5,0xDB,0x01,0xC5,0xE2,0xAF,0xF4,0xB7,0x13,0x83,0xDB,0x4F,0x02,0x35,0x1B, - 0x9F,0xF1,0x27,0xA5,0xCA,0xF1,0x59,0x03,0xDB,0x91,0x49,0x25,0x00,0xC4,0xEA,0xB1,0x2C,0xBE,0x2B,0x9C,0xAF,0xD0,0xED,0xA8,0xFC,0x0B,0xDB,0x3C,0xD5,0x9B,0x00,0xAE, - 0x9A,0xAF,0x7A,0xA1,0x2D,0x9A,0xBB,0x28,0x85,0x1A,0xB2,0x47,0x19,0x31,0x57,0x13,0x9D,0x3D,0x01,0xBD,0xDB,0xAE,0x1B,0x2B,0xE8,0x7A,0x00,0xD1,0x09,0xD6,0xEA,0xE9, - 0x05,0xE8,0x64,0xE5,0x5E,0x00,0x83,0xDD,0xE2,0x0B,0x05,0x4C,0x41,0xDF,0x12,0x65,0xDD,0xF6,0xB3,0x01,0xE3,0x57,0xE3,0xB7,0x29,0xA0,0xC9,0xE5,0xA4,0x9D,0xC8,0xD8, - 0x1B,0xDA,0x41,0x40,0xDB,0x7C,0xBF,0xC1,0x2D,0xAF,0xD7,0xF1,0x65,0xDB,0x04,0x6B,0x50,0xDB,0x50,0x93,0x5B,0xCE,0xDB,0xCD,0xF4,0x06,0xAE,0x12,0x15,0xBB,0xCA,0x97, - 0x10,0x54,0x99,0x50,0x1F,0xDB,0x75,0x17,0xB5,0x37,0xFB,0xF7,0xD4,0x3B,0xEA,0xCA,0xDB,0x15,0x2B,0xE1,0x29,0xDC,0x6B,0xED,0x72,0x36,0x50,0x44,0xDB,0x54,0x00,0xCF, - 0xC5,0x87,0xD8,0x01,0x94,0xB0,0x50,0xDB,0x27,0x43,0xDB,0x04,0x41,0x58,0xDB,0x2C,0x3D,0xDB,0x30,0xD9,0xA5,0xEE,0xBB,0x80,0x35,0xCF,0xD7,0xED,0x60,0x7A,0xDB,0x08, - 0x82,0x50,0xDB,0x5D,0x07,0x86,0x89,0x7A,0x53,0x9A,0x9E,0xCD,0x28,0xDB,0x25,0xC2,0xEA,0xDD,0x09,0x11,0x99,0x6D,0x34,0xA8,0xD9,0xE5,0xCC,0xDB,0x09,0x0B,0x81,0xDB, - 0x2B,0x61,0xDB,0x4B,0xD2,0x6D,0x92,0x6F,0xD7,0x87,0xC9,0x08,0x10,0xDB,0x1C,0x00,0xB9,0xE1,0x29,0xBF,0x69,0x85,0x20,0xDE,0x7E,0x00,0x06,0xD9,0x16,0x8B,0x88,0x51, - 0xA0,0xDB,0x95,0x0D,0x41,0x73,0x00,0x04,0xDB,0x96,0x00,0xC6,0xF6,0xC9,0xEB,0xB9,0xA4,0x91,0xD8,0x5B,0x22,0x59,0xB5,0x61,0xB6,0x04,0xB9,0x00,0x2C,0x02,0x24,0xC9, - 0xAA,0xD7,0xCF,0x6B,0xF1,0x3A,0x94,0x24,0x5E,0xDC,0x09,0xC2,0xDB,0x87,0xF6,0x10,0xB9,0xB8,0xB0,0xAA,0xB0,0xDC,0xCA,0xB3,0xE6,0x90,0xFB,0x00,0x94,0xA0,0xDB,0xC3, - 0xE1,0x11,0xA2,0xBA,0xBB,0x00,0xC8,0x0B,0xDE,0x94,0x15,0xA9,0x0D,0x15,0x72,0xDD,0xEC,0x17,0xDB,0x34,0x17,0x67,0xD5,0x00,0xBF,0xC6,0x64,0xAB,0xD3,0x09,0xE9,0xC2, - 0xDB,0xD6,0xF3,0x91,0x06,0x41,0x41,0xDB,0x28,0xDC,0x6F,0xCC,0x49,0x91,0x39,0xB6,0x04,0xD8,0x82,0x22,0x0D,0x15,0x87,0xDB,0xD0,0x38,0x2D,0x0D,0x22,0xAC,0x2C,0xA5, - 0xE2,0xB8,0xA3,0x41,0xDB,0x20,0x22,0x96,0x5B,0xCB,0xD8,0xDB,0x55,0x07,0x05,0xA3,0x95,0x80,0xF5,0xBF,0xE4,0xC4,0xA0,0xDB,0x17,0x61,0x01,0xDB,0x78,0x0A,0xAE,0x39, - 0x54,0x04,0x89,0xA4,0x5F,0x28,0xDB,0x2A,0x19,0x06,0x4A,0xFF,0x92,0x38,0xF6,0xAF,0x7C,0xDB,0x6F,0x54,0xD1,0xE5,0xDB,0x4C,0x98,0xE1,0xDB,0xDC,0x01,0x09,0xC1,0xD9, - 0xA7,0x02,0x4A,0xDB,0x0A,0xA7,0x9A,0xDA,0x05,0xA3,0x92,0xB6,0xD0,0xB1,0xDB,0xAC,0xD5,0xFF,0x04,0xB0,0x14,0x15,0xB4,0xBC,0x2A,0x1B,0xE3,0x45,0x97,0x26,0x95,0xDC, - 0x16,0xDB,0x16,0xB8,0x4B,0x6D,0xBA,0x2B,0xD1,0x7B,0x0C,0xA7,0xD3,0x26,0x19,0x0C,0xDC,0x0A,0xAE,0x9E,0x0A,0xAB,0x00,0xC3,0x95,0x5F,0xC3,0xD5,0x00,0xCF,0xAF,0x1D, - 0x53,0x05,0x48,0x00,0xAA,0x57,0x08,0x32,0x8E,0x5D,0xA8,0xF7,0x83,0xC4,0x02,0x75,0xB8,0x86,0xDB,0xE1,0xB1,0x89,0x93,0x12,0xDB,0x09,0x4A,0xA7,0x00,0xB6,0x2A,0xC8, - 0x76,0xBD,0x92,0x95,0xDB,0x8D,0x53,0xEB,0x7C,0x00,0xB4,0x88,0x12,0x12,0x24,0xDB,0x0E,0x2A,0xC9,0xE2,0x4F,0x68,0x95,0xC5,0xB0,0xDC,0x8C,0xDB,0x0B,0x95,0x49,0x23, - 0xFE,0x04,0xBA,0x05,0xA3,0x09,0x01,0xDB,0x15,0x7D,0xC3,0xDF,0x03,0x00,0xDE,0x9A,0xBA,0xD2,0xF8,0xD8,0xD4,0x73,0xCC,0x61,0xDD,0x72,0x00,0x87,0xDB,0x00,0x55,0x09, - 0x13,0x69,0xA2,0xAF,0xE9,0x26,0xC8,0xE6,0x0B,0x1C,0x1C,0x5D,0x2E,0x81,0xDF,0x04,0xA3,0x28,0x2E,0xD7,0xCB,0x9C,0xD9,0x2D,0x00,0x4A,0x3D,0x00,0x85,0xDB,0x84,0xDA, - 0xC4,0xB6,0x5B,0x94,0xB2,0x90,0x12,0x4A,0xDB,0x16,0xDA,0x16,0x2C,0x4F,0xD2,0x95,0xC9,0xB8,0x99,0x39,0xB8,0x4E,0xDB,0x09,0x6D,0x82,0xDB,0xED,0x8A,0x17,0x64,0xB1, - 0x01,0xA5,0xCE,0xA2,0xB4,0x94,0x94,0xB5,0x05,0x34,0x85,0xDB,0xE2,0xE5,0x19,0xD7,0xC5,0x1F,0x3A,0x1A,0x1C,0x00,0x99,0x4F,0x86,0x68,0xD8,0x2B,0x09,0xD5,0x2E,0x34, - 0xEB,0x3C,0xCB,0x3C,0x1D,0x10,0x1A,0x32,0x88,0xDB,0x05,0x2D,0x11,0x00,0x46,0x46,0x00,0xDB,0x41,0x98,0xDB,0x38,0x04,0xE0,0xDB,0x2C,0x6C,0xA0,0xDA,0x32,0xB6,0x48, - 0xB9,0xB6,0x48,0x12,0x2B,0xDB,0x08,0x94,0x9B,0x52,0x53,0x95,0x61,0xDA,0x64,0xB8,0x5E,0x24,0x6B,0xEB,0xE4,0xCB,0xB6,0x2C,0x04,0x81,0x81,0xA7,0xCF,0x2C,0x15,0x5F, - 0xA1,0x28,0x83,0xAE,0xF9,0x24,0xAF,0x29,0x5D,0xCC,0x01,0x9D,0xE6,0x9E,0xEB,0x05,0x5F,0xBA,0x04,0x03,0x50,0x1C,0xFA,0x78,0x0B,0xED,0x74,0x15,0xFC,0xAC,0x1A,0xE9, - 0x2A,0xB2,0xED,0xC2,0xD6,0xCD,0xF2,0xB7,0xB5,0xDA,0x88,0x5D,0x81,0xF8,0x09,0xD5,0x49,0xB3,0xC4,0x46,0x51,0xDB,0x00,0xBD,0xD9,0xBC,0x09,0x8C,0x8C,0x95,0x41,0xDA, - 0x79,0x2D,0x83,0xAC,0x91,0xDA,0x2B,0xDB,0x37,0xC8,0xDE,0xC9,0xB1,0xDB,0x4C,0x82,0xD5,0x00,0x0C,0xAA,0x00,0xAB,0x5F,0x5B,0xC0,0x4E,0x94,0x88,0x6B,0xA0,0xDB,0xEF, - 0x04,0xE5,0x2F,0xFF,0x6C,0xDC,0x2C,0xAC,0xA6,0x00,0xB3,0xF2,0xB5,0xC2,0x8A,0x00,0xDF,0xCE,0xCD,0x0A,0xC8,0x2A,0xD6,0x05,0x21,0xE5,0x19,0xB8,0x68,0x94,0x67,0xB0, - 0xDB,0xFB,0x0E,0x00,0xC2,0x72,0x67,0xAB,0x5E,0xB3,0xB0,0xDA,0xF2,0x00,0xB9,0x99,0x8D,0x25,0xB5,0x25,0x8C,0x06,0xDB,0xDC,0x04,0x58,0x58,0xEB,0xEC,0x61,0xDC,0x73, - 0xA4,0x41,0xDB,0x4A,0xED,0xB7,0x20,0x9A,0x0D,0xD8,0xDB,0x32,0xE6,0x18,0x22,0xB0,0xCC,0xDC,0x45,0x86,0xDB,0x94,0x86,0x35,0x81,0xDA,0x12,0x81,0xDC,0xCD,0x17,0x29, - 0xB8,0x59,0x9D,0x49,0xFB,0x12,0xBC,0xA8,0xB3,0x0E,0x50,0x00,0xCF,0x28,0x1C,0xAA,0xB0,0xBF,0x4D,0x67,0x16,0x2A,0xFA,0xF5,0x0E,0x38,0x74,0x29,0xDC,0x1D,0x0C,0xA4, - 0x91,0x50,0xDB,0x22,0x43,0x70,0x00,0xD4,0xC9,0x00,0x41,0xE9,0x03,0xDB,0xD5,0x09,0x9E,0xC8,0x81,0xDB,0xA0,0x3E,0xDB,0x02,0xAF,0x22,0x00,0x31,0x4F,0x0D,0x80,0xDB, - 0x1B,0x4C,0x11,0x8F,0xD7,0xCA,0x39,0xE3,0x85,0xDC,0x2D,0xF1,0x07,0xDB,0x04,0x61,0xDC,0x73,0xAB,0x61,0xDC,0x3C,0xF9,0x73,0xB3,0x74,0x06,0xA2,0x53,0x82,0xD8,0x0B, - 0x46,0x04,0x1C,0xD6,0xF7,0xB0,0x36,0x83,0x33,0x84,0xDB,0x8D,0x86,0xA4,0x02,0x19,0xDB,0x04,0x54,0xA1,0xDB,0xD2,0x00,0xE8,0xE1,0xDA,0x6B,0xF1,0x22,0xF3,0xAA,0x8C, - 0x00,0xC0,0xDB,0x4A,0x95,0x8D,0xDB,0x0A,0x92,0x4A,0xDB,0x0B,0xA4,0x96,0xE6,0xED,0xA7,0xAC,0x7A,0xCF,0x48,0x00,0x36,0xDB,0x02,0x12,0x24,0xDE,0xCE,0x26,0xAA,0x6F, - 0xAE,0xAA,0x00,0xA7,0x05,0x88,0xBA,0xDB,0x09,0x03,0xCE,0xA8,0x92,0x15,0x2B,0x49,0x80,0xC2,0xB3,0x74,0x8C,0x98,0xA3,0xB9,0xB2,0xB0,0xDC,0xDA,0x1B,0xCD,0x8E,0x69, - 0x98,0x6B,0x00,0x21,0xFB,0xA9,0x41,0xD8,0x54,0x16,0xDB,0x12,0x91,0xB6,0x2D,0x49,0x28,0xDC,0x60,0xD9,0x9E,0xB0,0xDB,0x58,0x41,0xDA,0x76,0x06,0xCA,0xE5,0x79,0x79, - 0x84,0xDA,0xC1,0xDB,0x21,0xB6,0x0A,0x98,0x24,0x02,0xA6,0x08,0x35,0xDB,0x0C,0xEF,0x8E,0x08,0x53,0x87,0xEC,0xDC,0x32,0xB8,0x9C,0xDB,0x25,0xBF,0xE9,0x52,0x97,0xF0, - 0x00,0xD8,0xC3,0xCE,0x03,0xCB,0x84,0xDA,0x04,0x15,0x40,0xDB,0x24,0x54,0x9A,0x49,0x26,0x95,0x4A,0x00,0x06,0xA2,0xAB,0x61,0x2E,0xDB,0x6A,0x10,0x1C,0xA7,0x9B,0x1F, - 0x5B,0x1C,0xC7,0xDA,0xEF,0xF2,0x19,0xAB,0xEE,0xAB,0x00,0xA0,0xDB,0x2C,0x49,0x2F,0xDB,0x29,0x8F,0x28,0xDB,0x14,0x8C,0xD4,0x1C,0xA6,0xF9,0x02,0xB6,0x5B,0xCB,0xF8, - 0x00,0xDA,0x4C,0xDB,0x14,0xB6,0x40,0xDF,0xE6,0xC4,0xB7,0x4C,0x3F,0x7A,0x07,0xE5,0x83,0x42,0xB8,0xA2,0xB6,0x05,0x31,0x12,0x7A,0xC1,0xAF,0xA4,0x95,0xE1,0xDB,0x65, - 0xB8,0x61,0xD8,0x12,0xDB,0x19,0xB7,0x77,0x01,0x00,0x57,0x86,0x6B,0xEF,0x4B,0xC5,0x61,0xD7,0x53,0x9D,0x85,0xCA,0x58,0x00,0xD8,0x5E,0xC3,0x74,0x08,0xBF,0x09,0x54, - 0x43,0xDB,0x29,0xB0,0xDB,0xE6,0xB1,0xAA,0xF3,0xC1,0xDC,0x54,0x33,0xC9,0xE1,0xDB,0x22,0xED,0xA7,0x2F,0xDB,0x0C,0xD1,0x26,0x00,0x48,0x4A,0x05,0x79,0x8C,0xDB,0x0A, - 0xA3,0x90,0xDA,0xA8,0x97,0x9F,0xC3,0xD8,0xDB,0x04,0x9F,0x19,0x82,0xDB,0x31,0xC1,0xDB,0x02,0xE2,0xE4,0xD7,0xDE,0xCE,0x34,0xDB,0x24,0xCF,0x7A,0xE7,0xCF,0xA2,0x2D, - 0x94,0x26,0x00,0xDE,0xCD,0x82,0xC9,0x82,0xD5,0x70,0xDB,0xA7,0xC3,0xB0,0xDA,0x56,0x1A,0xED,0x69,0x97,0x81,0xD5,0x1D,0x1C,0xC9,0x14,0x11,0x49,0xC4,0x5D,0x24,0x17, - 0xF4,0xAB,0x8F,0xC5,0x2B,0xC9,0x94,0x2E,0x8C,0xAB,0x49,0x46,0x42,0xDB,0x92,0x0A,0x51,0x83,0xDB,0x9E,0x00,0x8F,0xDB,0x02,0x6C,0xE4,0xC0,0xDB,0xDA,0xCF,0x3E,0xA5, - 0x53,0x88,0x55,0x4F,0xCD,0x20,0x00,0xE0,0x00,0x0D,0x22,0x2D,0x8F,0xCC,0x94,0x26,0xB9,0x29,0x96,0xEF,0xC2,0xDF,0x65,0xEF,0xD6,0xE6,0xAC,0x00,0x88,0xAA,0x05,0xE9, - 0xE1,0x1D,0x85,0xDF,0x65,0xAF,0x71,0x99,0xEC,0xAB,0xB5,0x87,0xAF,0xEC,0x05,0x29,0xBF,0x55,0x15,0x96,0xC2,0xF2,0x14,0xE8,0x17,0xB9,0x2C,0xAB,0xD1,0x06,0x32,0x32, - 0x49,0xD3,0x0C,0xAB,0xAC,0x8C,0x49,0x32,0xDB,0x2D,0xE2,0x75,0xE7,0xD7,0x0B,0x6E,0xC1,0xDF,0x00,0x0C,0x82,0xD7,0x85,0x40,0xD5,0x4E,0x41,0xDA,0x14,0x00,0xB8,0x35, - 0xB8,0xB6,0xEC,0x19,0xE4,0x77,0xB4,0xB6,0x02,0xC4,0xA8,0x22,0x0D,0x08,0x0E,0x41,0xD6,0x08,0x69,0x3B,0x1B,0x9E,0xCE,0x59,0xAA,0x45,0x52,0x2D,0xF0,0x94,0xB2,0xDD, - 0xBE,0xDC,0x00,0x95,0xAD,0x01,0xE0,0x6B,0xA0,0x95,0x54,0x8A,0xC9,0xCD,0x7E,0xF6,0xD6,0xF3,0x60,0xDB,0xE7,0x15,0xDB,0x0C,0xBD,0xBB,0x00,0xD6,0xCC,0xAE,0x94,0x1A, - 0xDB,0x1F,0xBB,0x48,0xC0,0xF5,0x82,0x76,0xB6,0x54,0xD6,0x12,0xCD,0xAA,0x4A,0xA6,0x9E,0xC0,0xD4,0x85,0x85,0xB4,0x03,0x85,0xA0,0xDA,0xB6,0xAA,0x00,0x92,0x45,0xB4, - 0xBF,0xC8,0xDA,0x92,0x2A,0xE9,0x08,0x0D,0xC2,0xDB,0xCD,0x38,0x08,0xF0,0xCE,0xD1,0xCF,0x05,0xB8,0x77,0x85,0x34,0x00,0xB7,0x82,0x84,0xD6,0xA1,0xDB,0x73,0x94,0x92, - 0xA5,0x1A,0xDE,0xB8,0x60,0xDB,0xA5,0xCA,0x5E,0x1C,0x00,0x93,0x97,0x07,0x73,0x92,0xDC,0x00,0x0F,0xC1,0xDC,0x73,0x9D,0xE5,0x0B,0xB6,0x61,0xDB,0x72,0x99,0x64,0xB0, - 0xDB,0x89,0x00,0xA0,0xDB,0x94,0xDA,0x17,0x85,0x03,0x40,0xDC,0x4A,0x94,0xDB,0x34,0x90,0xCB,0xB6,0x91,0x40,0xDF,0xC4,0xAF,0x7A,0x4E,0x08,0xA3,0x10,0x72,0xDB,0x1A, - 0xD1,0x37,0x4C,0xCE,0x4C,0xC5,0xDB,0x15,0xBD,0xCE,0x6D,0x03,0x2C,0xDB,0x30,0xD9,0x76,0x67,0x02,0xB6,0x54,0x9C,0x45,0x10,0x1F,0x85,0xB5,0xAA,0xF3,0x67,0xB2,0x00, - 0x95,0xBC,0x00,0xC0,0x2C,0xDB,0x3C,0x07,0xEF,0x27,0xDB,0x0D,0x88,0x3B,0x0D,0x07,0x97,0xD4,0x34,0x02,0x43,0x85,0xA8,0xD2,0x08,0x92,0x69,0x90,0x5D,0x00,0x05,0xCC, - 0x06,0x93,0x93,0x82,0xDA,0xBC,0x44,0x91,0x94,0xDB,0x00,0xA3,0xBD,0xD0,0xC9,0xB7,0x53,0x4E,0x7A,0xDB,0x70,0x6E,0x95,0x92,0x4A,0xAF,0x0D,0xD2,0x95,0x40,0xDC,0x61, - 0xD6,0xDC,0x74,0x00,0xD8,0x0E,0x81,0x00,0x62,0xB7,0xB0,0xDB,0x44,0x5F,0x06,0xDB,0xB5,0x1A,0x01,0x54,0x50,0xDC,0xCE,0xF0,0x82,0xC5,0xA7,0x89,0x09,0xB0,0xDB,0xA7, - 0xCB,0x9B,0x00,0x14,0xBE,0x00,0x07,0xC2,0xF7,0xDD,0xC5,0x8C,0x94,0xB2,0xE8,0x89,0x6E,0x89,0xDB,0x0D,0xC3,0xE8,0xDB,0x2E,0x00,0x44,0x91,0xC3,0xDB,0x00,0xC3,0xDA, - 0x00,0xA0,0xDB,0x53,0xE4,0xC8,0x81,0xC9,0xE2,0xC1,0x02,0x31,0x00,0x02,0x10,0x00,0x12,0x00,0x22,0x4A,0x97,0x95,0x98,0xDB,0x28,0xD6,0xD9,0x28,0xDF,0x2C,0xDA,0x2C, - 0xDB,0x16,0x2B,0xDB,0x12,0x86,0xDA,0x00,0x1D,0xE8,0x04,0xD8,0x32,0x8E,0xB0,0xDB,0xBE,0x93,0x94,0xFD,0xEB,0x9A,0xAA,0x07,0x52,0xAB,0x46,0x1A,0x75,0x00,0x13,0x9C, - 0x38,0xDB,0x51,0xB1,0x56,0xD8,0x58,0xDD,0x4E,0xB5,0x52,0x60,0x07,0xDB,0x8C,0xB0,0xDB,0x25,0x8D,0x85,0xB6,0x2A,0x00,0x58,0xB8,0xDB,0x29,0xE4,0xC8,0xC1,0xBD,0xC7, - 0xC4,0xAC,0x08,0xD4,0xC4,0xE5,0xB4,0x07,0xAA,0x00,0x1B,0xC1,0xE2,0xC5,0xC5,0xC2,0xDB,0x72,0xB8,0x98,0xDB,0x26,0x80,0xBC,0x98,0xAF,0xF1,0xEC,0xCD,0x2D,0xEC,0x6C, - 0xDC,0x24,0xE0,0x59,0x03,0xCB,0x07,0xB2,0xBF,0xB8,0x00,0xD0,0xDA,0xAA,0x10,0xC0,0x77,0x64,0x2D,0x28,0xDB,0x30,0x43,0xD0,0xCA,0x01,0x93,0x93,0xDB,0x07,0x8C,0x03, - 0x28,0xDB,0x48,0xB6,0x44,0x8D,0x8D,0xE1,0xDA,0x30,0xDB,0x2B,0x77,0xB7,0x83,0xE6,0xAF,0x1B,0x4F,0x9E,0xC9,0xDE,0x8F,0x0E,0x26,0xA6,0xFD,0x00,0xA0,0xF8,0xC1,0xD8, - 0xCF,0xA4,0x95,0xB0,0xDB,0x58,0x5E,0xDD,0x4E,0xDA,0x16,0xD7,0x08,0x67,0x80,0xDB,0xF0,0x00,0xC9,0xFE,0xFF,0x82,0xDB,0xDE,0xB0,0xF2,0xD0,0x70,0xD5,0x15,0x49,0x26, - 0x26,0x04,0x20,0xCF,0x58,0xED,0x26,0x2E,0xDA,0x0A,0xDB,0x01,0xAB,0xCD,0x2E,0x55,0xF4,0x6F,0xC6,0x61,0xCF,0x61,0xDB,0x84,0xD2,0xE1,0xDB,0x28,0xD6,0x4E,0xDA,0x17, - 0xFF,0x56,0xB6,0x58,0xDA,0x68,0x92,0xA8,0x56,0x24,0xF9,0xD9,0xB7,0x58,0xA5,0x20,0x1B,0xCD,0xC7,0xE7,0x00,0xD8,0xB4,0x12,0x4F,0x61,0x0D,0xDC,0x3A,0x95,0x2C,0xE3, - 0xB8,0x86,0x81,0xEC,0xEC,0xDD,0x0F,0xCD,0xC0,0x16,0x67,0xCD,0xAC,0x19,0xDC,0x1B,0xAB,0x07,0x19,0xB7,0x0B,0xFD,0x8E,0x08,0x65,0xD5,0xF3,0xB3,0x00,0x96,0x04,0x72, - 0xA6,0x54,0x49,0x97,0xE7,0x0C,0x1D,0x49,0x27,0x2D,0x0E,0x5F,0x00,0xB7,0x4B,0x97,0x34,0xD9,0x18,0xCE,0x56,0xE2,0x12,0x93,0x27,0x87,0xE5,0x00,0x20,0xD6,0x2B,0x8D, - 0x01,0x02,0xB0,0xDC,0x4A,0xD9,0xB7,0x43,0xB4,0xDB,0xC7,0xC7,0x77,0x9F,0xB0,0xC4,0x4F,0x12,0xE1,0xAA,0x07,0x80,0xDB,0x02,0x62,0x12,0x00,0x24,0xB0,0xD8,0xB3,0xE4, - 0xDA,0x09,0xC2,0xDB,0xC2,0xDA,0x95,0x00,0x17,0xFD,0x17,0x86,0xC9,0xAB,0x0A,0xB4,0xDE,0x9D,0x40,0xDB,0xB0,0xCC,0x9C,0xB3,0xB0,0xCA,0x89,0xDB,0x05,0x2E,0xE0,0x04, - 0xEF,0x1A,0x94,0xD8,0x0A,0x2F,0x2F,0xDD,0x5B,0xA9,0xE9,0x5E,0xC3,0x83,0xDB,0x00,0xC1,0xD2,0x5D,0xCB,0x08,0x00,0x61,0xD9,0x35,0x00,0x84,0xDA,0x81,0xDB,0x44,0xB6, - 0xBD,0x18,0xB1,0x9A,0x9F,0x92,0x10,0x00,0x31,0x23,0x85,0xDB,0x09,0xA4,0x22,0xAC,0x76,0x88,0xD6,0x94,0xDC,0x16,0x81,0xB7,0x58,0x02,0xCD,0x81,0x35,0x48,0xCD,0xD6, - 0x1D,0x03,0xE6,0xAC,0xEC,0x76,0xB3,0xF6,0xDA,0x13,0x85,0xD9,0x82,0xC5,0x2F,0x50,0xDA,0x90,0xA5,0xBE,0xA3,0x3F,0x45,0x2F,0x03,0x00,0x0D,0xF5,0x16,0x0D,0x49,0x83, - 0xD1,0x2F,0x10,0x98,0xDA,0x3B,0x00,0xDA,0x08,0x84,0x00,0x65,0xE0,0xD8,0xB5,0x94,0xDA,0x03,0xD9,0xF1,0xB8,0xF1,0xDA,0x00,0xCB,0xDB,0xC4,0x5B,0xA0,0xDA,0x39,0x02, - 0x08,0xA6,0x81,0x14,0xDB,0x36,0xB8,0xC1,0xDC,0x31,0xC9,0xAC,0xE2,0xE6,0x20,0xDC,0x14,0xE3,0xE3,0xED,0xB8,0xD7,0x12,0xCD,0xEC,0xA6,0x97,0x98,0x92,0x83,0xDB,0x32, - 0xDD,0x09,0x56,0xE1,0xCE,0xF2,0x50,0xBF,0xA2,0xA1,0xF0,0x0A,0xC4,0xB4,0x98,0xA2,0xA4,0xF0,0x08,0xDB,0x58,0x2F,0xDB,0x7D,0x09,0x0F,0x54,0x0D,0xA2,0xD0,0xD9,0x73, - 0x00,0x01,0xDA,0x65,0x65,0x4B,0xED,0x30,0xD6,0x5A,0x04,0x8D,0x2C,0xDB,0x16,0xD9,0xDB,0x0A,0xF1,0xED,0x50,0xDB,0xDA,0xAC,0x7A,0xC3,0x90,0x81,0x7D,0xE6,0x60,0x46, - 0xDB,0x0C,0xA4,0x70,0xDC,0xC0,0xDF,0x0D,0x98,0x16,0xE2,0xDA,0xD0,0xDB,0x1D,0x00,0x06,0xD6,0xDB,0x14,0xB8,0x5A,0x00,0xAB,0xC2,0xDB,0xC9,0xBB,0x1A,0x85,0xAB,0x74, - 0x9A,0xCF,0xAE,0x28,0xDB,0x61,0xB6,0x39,0xFE,0xDD,0x00,0x83,0xDB,0x46,0xDB,0x04,0x49,0xE1,0xDB,0x65,0xC5,0x69,0x15,0x2F,0x8A,0xB5,0x24,0xDB,0x34,0x09,0x65,0x50, - 0xDA,0x61,0xDB,0x38,0xDA,0x60,0xDB,0xC3,0x14,0xDB,0xCE,0x98,0x8E,0x02,0x0D,0x1B,0x02,0x04,0x60,0xDB,0xB2,0x00,0x07,0x12,0x98,0x00,0x22,0xDC,0x14,0xDF,0xD0,0xB9, - 0x56,0xDB,0x16,0xB4,0x56,0xD8,0x16,0xDB,0x15,0x03,0x44,0xB6,0x2F,0xF2,0x03,0x89,0xB2,0xAA,0x9D,0xA7,0xE4,0xAA,0x29,0xEE,0x0C,0x0E,0x60,0xDB,0xBB,0x16,0x1C,0xBC, - 0x07,0x06,0x5D,0x5D,0x9C,0xAD,0xA9,0xEA,0x56,0x27,0xD5,0x1F,0x03,0x00,0x38,0xD6,0x5E,0x00,0xD9,0x13,0x80,0xDA,0xE4,0xCB,0xC9,0xC1,0xDA,0x7A,0x85,0xD6,0x86,0xD7, - 0x04,0x08,0x85,0xA0,0x00,0xB8,0xDB,0x31,0xAB,0xE9,0x00,0x12,0x24,0x49,0x96,0x69,0x95,0x30,0xDC,0x79,0x95,0x59,0x98,0xDD,0x03,0x04,0x03,0xD5,0x2F,0x03,0xD2,0x04, - 0x46,0xA5,0x8B,0x82,0xB7,0x50,0x49,0x05,0x81,0xE4,0x45,0xAC,0x00,0x36,0xDB,0x1A,0x5D,0x93,0x61,0xDF,0x2B,0x00,0x5D,0x00,0xBC,0x06,0xD8,0x11,0x6E,0x2B,0xE2,0x20, - 0xD6,0x04,0x65,0x29,0x18,0x18,0x48,0xD9,0x51,0x00,0xD9,0xD4,0x30,0xDB,0x61,0xDA,0xE7,0xD8,0xD5,0x14,0xC4,0x77,0xFA,0x50,0x22,0x03,0xDB,0x12,0x47,0x3A,0x7A,0x9F, - 0x00,0xE5,0x4C,0x15,0x98,0xCF,0xD6,0xF2,0x74,0x95,0x30,0x64,0x51,0xD3,0xB0,0xD6,0x94,0xDB,0x30,0xAB,0x58,0x46,0xC6,0x55,0xCD,0x4C,0xBA,0x09,0x27,0xCA,0x9B,0xC2, - 0xE7,0xE8,0x00,0xDB,0x0D,0x6E,0x5D,0x05,0x6E,0x77,0x1C,0x1F,0x61,0xDB,0xE5,0x2F,0xB5,0x16,0xD8,0x16,0xD7,0x12,0x30,0x00,0x28,0xD2,0xE5,0x02,0x00,0x55,0xD4,0x00, - 0x86,0xDA,0xDB,0x03,0xBD,0xB7,0x7A,0xDA,0x05,0x12,0xA9,0xA0,0x1B,0x0D,0x06,0xA1,0xDB,0x0B,0xD6,0x33,0xE7,0x02,0x12,0x0D,0xB0,0xCF,0xD0,0xC2,0xDB,0x50,0xDD,0x29, - 0xE9,0x51,0x00,0x64,0x4F,0x00,0x43,0xA7,0x28,0xEF,0xE6,0x98,0x79,0xD6,0xC2,0xD6,0xD8,0x72,0xA2,0xB0,0xC8,0xF8,0x0E,0x08,0x4D,0x00,0x27,0x22,0x00,0x65,0x69,0x00, - 0x41,0xD9,0x6A,0x53,0x00,0x06,0xD8,0xB6,0x53,0x00,0xDB,0xE1,0xDB,0xB7,0x02,0x0D,0x07,0x0D,0x24,0x24,0x1B,0x26,0x00,0x04,0x80,0xDB,0x31,0x9F,0x08,0xAF,0x02,0x00, - 0x24,0x82,0xE2,0xB9,0xB9,0x81,0xDC,0xE9,0x74,0x00,0xD9,0x0A,0x43,0x00,0xC3,0xDB,0x03,0xD2,0x8F,0x62,0xB6,0xC2,0xC0,0x70,0xDB,0x88,0xF9,0x3B,0xBF,0x09,0x52,0x81, - 0x11,0xD2,0x09,0x24,0x06,0xB0,0x24,0x29,0xE0,0xDA,0x28,0x98,0xDB,0x13,0x4D,0x12,0xB3,0xEF,0x55,0xEE,0x57,0xC3,0xB3,0x18,0x24,0x22,0xD9,0x17,0x24,0x0D,0x00,0x38, - 0xDC,0x40,0x92,0xDB,0x00,0x0D,0x12,0x02,0x9F,0xC1,0x12,0xCF,0xDF,0xB4,0x83,0xDB,0x95,0xDA,0x06,0x41,0xD5,0x0A,0x8C,0xDC,0x0A,0xCF,0xFC,0xB0,0xA7,0xA0,0x79,0xC1, - 0xBC,0x2F,0x16,0xC6,0x11,0xE0,0xD2,0x5D,0xB0,0xD1,0xB8,0x09,0xC4,0x89,0xA0,0xD5,0xB4,0x00,0x6A,0x84,0xB6,0x4D,0x4C,0xD4,0x00,0xEF,0x58,0xEF,0xDA,0x03,0xDB,0xA5, - 0xC1,0x0D,0x22,0xDB,0x0A,0x02,0xB9,0x00,0xC2,0xDF,0x04,0x70,0xDB,0x52,0x02,0xEA,0x7C,0xC4,0x1B,0x24,0x53,0xB7,0xDC,0x03,0x3D,0x95,0x00,0x1D,0x41,0x41,0x8C,0x00, - 0x05,0xDF,0x05,0xDB,0x87,0xDD,0x00,0x09,0x9F,0xF1,0x02,0x38,0xCF,0x4D,0x08,0x12,0xD4,0x12,0x4C,0x04,0xD5,0x14,0xDF,0x13,0x04,0xD5,0xA1,0xDA,0x10,0xDB,0x0C,0xEF, - 0x00,0xF1,0xE0,0x00,0xE1,0xC7,0xA5,0x4C,0x5B,0x5B,0x4C,0x22,0x0A,0x53,0x4C,0x53,0x22,0x00,0x8B,0xDE,0x0E,0x00,0x04,0x10,0xDB,0xDE,0x42,0x00,0xE4,0x7F,0x4E,0xC6, - 0x06,0x22,0xB7,0xD0,0xA3,0xDC,0x00,0x91,0x3D,0x3D,0x4A,0x4A,0x3F,0x58,0x58,0xCB,0xE8,0x03,0xE1,0x32,0x06,0x8C,0x6E,0x38,0xDB,0x24,0xAB,0x28,0xC0,0xC5,0x8D,0x00, - 0x4B,0x29,0x05,0x41,0xD1,0x39,0xB1,0x4C,0xD6,0x05,0x5A,0x4D,0xCE,0x00,0xD8,0x16,0xD9,0x00,0xE0,0xC3,0xC9,0xA8,0xAC,0x14,0x9A,0x9A,0x5B,0x00,0x4C,0xC2,0xDC,0x93, - 0x00,0x22,0x94,0xBE,0xE1,0xDE,0x07,0xC0,0xDB,0x4F,0xB0,0xD7,0xA0,0xDC,0xE8,0x84,0x53,0xA5,0x02,0xDA,0xB4,0x77,0x77,0x6C,0x6C,0x80,0xDD,0x58,0x85,0xBC,0x00,0xE1, - 0x3A,0x00,0xDF,0x0B,0xF3,0x84,0x27,0x64,0x00,0x58,0xC5,0x55,0x07,0xDC,0x00,0x06,0xFC,0x0C,0x00,0x81,0xD4,0x21,0xB0,0x25,0x5A,0xD7,0x0F,0x00,0xD6,0x05,0x59,0xBB, - 0x00,0x7E,0x00,0xD9,0x0D,0x00,0xE0,0x80,0x00,0xCB,0xCE,0xA5,0xAF,0xA5,0x98,0x98,0xC1,0xDC,0x97,0xB0,0x02,0x9A,0xDD,0xB0,0xDF,0x9C,0xBE,0xA2,0x56,0xFD,0x1F,0x9B, - 0x48,0x74,0xDB,0x3F,0x48,0x41,0x04,0xC6,0x00,0x12,0x9F,0x98,0xDC,0x00,0xA3,0xA0,0x6C,0xB6,0xB6,0x2C,0x79,0xBC,0xDA,0x18,0x8D,0x02,0x93,0x85,0x9E,0xB0,0xE0,0xBA, - 0xCB,0x8F,0x9B,0x29,0x8E,0xF2,0xAE,0x00,0x07,0x79,0x0D,0xCA,0xAB,0x65,0xDF,0xB0,0xD2,0x49,0x4D,0x04,0xE1,0x00,0xD6,0x3C,0x00,0x80,0xDB,0xD1,0xE4,0xA0,0xCE,0xB7, - 0x6C,0xA5,0x01,0xAF,0x00,0x98,0x97,0xE6,0x00,0xBD,0x2F,0x00,0xDD,0x08,0xD2,0xBD,0x83,0xB0,0xDB,0xD4,0xEB,0x31,0x24,0xB6,0x4B,0xF0,0xF4,0x98,0x06,0xC1,0xCA,0xB9, - 0x05,0xA0,0xE4,0xB6,0xB8,0xBC,0x26,0x00,0x85,0xC4,0xFB,0xE5,0x05,0x93,0x84,0xCE,0xE5,0xA0,0x84,0xBF,0x50,0xC0,0x45,0xF1,0x0B,0x00,0x6F,0xB4,0x29,0xAD,0x4E,0xD7, - 0x13,0x11,0xB2,0x7E,0x9C,0x72,0x00,0x07,0xDB,0xA0,0x25,0xB1,0xA8,0x30,0x00,0xB7,0xDD,0xC1,0xE0,0xAF,0x45,0xBC,0x53,0x00,0xA4,0x9B,0x60,0xDC,0x41,0x00,0xDB,0x42, - 0xEB,0xEB,0x49,0x00,0x0D,0x3B,0x46,0x4D,0xCF,0x6C,0x59,0x9A,0x98,0x38,0xBD,0xA3,0xBD,0x75,0xB8,0x9D,0x84,0xDC,0x9F,0xC3,0x28,0xDF,0x65,0x90,0x2D,0xC6,0x58,0xBD, - 0x61,0xB2,0x73,0x05,0x85,0xC7,0xDC,0x0D,0x06,0x4C,0x07,0xE9,0x00,0x4D,0xE6,0x00,0xD5,0x09,0x82,0xD7,0xC7,0x00,0x92,0xE8,0xD1,0x9F,0x2C,0xC4,0x00,0xB1,0xB1,0x9C, - 0xDE,0x28,0xBB,0xB2,0xBC,0x9C,0xDE,0x24,0xF9,0x59,0x06,0xEF,0x09,0x12,0x97,0x1F,0xDA,0x0E,0x49,0xB0,0x4F,0xD9,0xF0,0x58,0xDB,0x14,0x8F,0xDA,0xCB,0xDC,0x05,0xBC, - 0xD9,0xEC,0xE2,0xE1,0xDA,0x79,0x9C,0x2C,0xEF,0x46,0x15,0x94,0xCE,0x06,0xD3,0x09,0x28,0xD6,0xD6,0x72,0xAB,0x4C,0x59,0xAB,0x51,0xA0,0xD8,0x92,0xEC,0x00,0xDA,0x02, - 0xCB,0xC9,0xCE,0xCE,0x50,0xDC,0xE5,0x00,0xBB,0x2B,0xDC,0x08,0xD2,0xBA,0x9C,0xDC,0x21,0xF9,0xB3,0x86,0x03,0xD9,0x00,0x98,0xB4,0xAC,0xD9,0x29,0x5B,0x97,0x81,0x62, - 0xA5,0xC4,0xBD,0xE4,0xEF,0xD4,0x61,0xDB,0x34,0x00,0xA1,0xCB,0x7B,0xFA,0x39,0xE8,0xCE,0xEA,0x76,0x00,0x5A,0x89,0xEC,0x09,0x02,0xD1,0x49,0x04,0xE3,0x00,0x0A,0xAD, - 0x46,0x00,0xA9,0x01,0xE8,0x30,0xE0,0xDB,0xDA,0xE3,0x00,0x82,0xDD,0x45,0xF6,0x98,0xDC,0x28,0xDD,0x23,0x83,0xDB,0x00,0x82,0xB0,0xDB,0x98,0xDA,0x13,0x0D,0x87,0xDA, - 0x53,0x20,0xD9,0x29,0xAF,0xDF,0x87,0xC4,0xC7,0xE4,0xA0,0x53,0xEC,0xE2,0xA1,0xC1,0x14,0xBE,0x11,0x67,0xEC,0x77,0x00,0x09,0x3C,0x06,0x58,0xD4,0x47,0x14,0xAE,0x81, - 0xD8,0x4A,0x00,0xAA,0x8F,0x40,0xC9,0xC7,0xC7,0xC9,0xE2,0x00,0x02,0xDD,0x64,0x97,0x4C,0x98,0xDC,0x12,0xCC,0xB1,0x44,0xAE,0xC1,0xA8,0xDB,0x49,0xE8,0x31,0x45,0xB5, - 0x82,0xDA,0xAF,0x98,0xD8,0xA8,0xB1,0xC2,0x70,0xCE,0xDB,0xC3,0xEF,0x4C,0x00,0xDB,0x2C,0xA1,0x11,0x59,0x67,0xE3,0x08,0x04,0xBF,0xB3,0x08,0xCF,0x0F,0x00,0x18,0xD4, - 0x16,0xD7,0x12,0x86,0xDB,0xB4,0x58,0xDA,0x68,0x00,0xC7,0xF0,0xDC,0x95,0x96,0x20,0x4A,0xDB,0x09,0x4A,0xB7,0x28,0xDA,0x28,0xB5,0xA5,0xDA,0x06,0xCE,0xD9,0x20,0xC3, - 0xE1,0xE0,0xD1,0xE8,0x48,0xE8,0xA0,0x08,0x7E,0x7E,0x00,0xE3,0x24,0x8A,0xA9,0x30,0xD9,0x13,0xA9,0x32,0x00,0xAA,0xB4,0xC1,0xDA,0xCB,0xD0,0x00,0xDC,0x23,0xDB,0x03, - 0xDD,0xDC,0x09,0xC2,0xDB,0x74,0x93,0x8F,0x92,0x48,0x3A,0xDB,0x0A,0x52,0xB2,0xB6,0x98,0xB5,0xBC,0x74,0x79,0xDB,0xCB,0x58,0xC3,0xDC,0x2C,0xE8,0x9B,0x2C,0xA6,0x2A, - 0x03,0x38,0xB9,0x26,0xBF,0x08,0xF8,0x0F,0xD4,0x00,0xA9,0xEE,0x00,0xA1,0x00,0xC1,0xDA,0xE1,0xD8,0x00,0xDD,0x26,0xCB,0xBB,0x29,0xC2,0xDB,0x64,0x93,0xB2,0xB6,0x99, - 0xCB,0xEE,0xE1,0x23,0xD6,0xED,0x0A,0xC2,0xDB,0x57,0xCB,0x9C,0xDB,0x30,0xDA,0x88,0xDB,0x07,0xC7,0x7A,0xA4,0x7E,0xC3,0xBA,0x29,0xC1,0x9B,0x92,0x0E,0xC3,0x00,0x01, - 0xD3,0x30,0xD7,0x58,0xD9,0x72,0x9F,0xE0,0xF0,0x00,0xDA,0xAB,0x00,0xDB,0x04,0xDB,0xE1,0xDB,0x29,0xB6,0x5B,0xCB,0xC5,0x4C,0xA7,0xE1,0xDA,0x06,0xD7,0x83,0x38,0xDB, - 0x5E,0xDA,0x71,0x00,0x24,0xB7,0xCE,0x89,0xDB,0x0C,0xDC,0x24,0xBB,0x24,0xAA,0x52,0x00,0xA9,0x0B,0x13,0x00,0xA1,0xA9,0x00,0xAA,0x46,0xD1,0x20,0xDB,0x58,0xDC,0x59, - 0xB8,0x4E,0xDB,0x11,0xE5,0xB5,0x3C,0xA3,0xDA,0x91,0x4E,0xD7,0x10,0x69,0xDF,0x93,0x5C,0x83,0xEB,0xF0,0x2A,0xEF,0xDA,0x93,0x4E,0xB8,0x58,0xDB,0x78,0x00,0x95,0x46, - 0x02,0xDF,0xA1,0x0B,0xA4,0x00,0x34,0xAA,0x41,0x49,0xB0,0xDA,0xB0,0xDB,0x9C,0xDA,0x25,0xB5,0x28,0x9B,0x80,0x8D,0xFE,0xAC,0xDA,0x20,0xE4,0xDB,0x24,0x97,0x47,0x9F, - 0x46,0x3A,0xF2,0xC6,0xAC,0xF1,0x81,0xDD,0x84,0x89,0xA1,0xDE,0x30,0xE0,0x58,0xE3,0x42,0xD0,0x00,0xD0,0xD9,0x5C,0x36,0xE4,0xB4,0xE1,0x98,0xB4,0x93,0xDB,0x94,0xB4, - 0x52,0x8E,0x4F,0xB5,0xD6,0xD8,0x11,0xE1,0xD9,0x05,0x81,0xDB,0x3D,0x13,0x42,0x44,0x21,0xDD,0x29,0xBB,0x58,0xDE,0x4A,0x9A,0x96,0xE1,0x1C,0x00,0xC1,0xE5,0x04,0x41, - 0xE8,0x2D,0x00,0xCD,0x21,0x30,0x18,0x8C,0x91,0x2B,0xE9,0x49,0x8D,0x16,0xD8,0x09,0x22,0xCA,0xB2,0x3D,0xE6,0x60,0xBC,0xDB,0x11,0x00,0x72,0xAF,0x24,0x95,0xD2,0xE2, - 0x42,0xDE,0x6B,0x8A,0x94,0xE1,0x2C,0xE2,0x2C,0xE4,0x2C,0xE6,0x27,0xE8,0x08,0xC0,0xEB,0xB0,0xEE,0x8A,0x0B,0x44,0xD1,0x4B,0x20,0x2F,0xC6,0x37,0x04,0xD6,0xEF,0xC1, - 0x84,0xD8,0xF5,0xF7,0x16,0xE5,0xB1,0xE1,0xD5,0x06,0xC9,0x93,0x1E,0xF9,0xB1,0x05,0xBD,0x59,0xEA,0x5D,0xC5,0x65,0xC0,0x61,0xE2,0x61,0xE3,0x61,0xE4,0x61,0xE6,0x38, - 0xE8,0x4C,0xEB,0x13,0x22,0x00,0xE1,0x82,0xC3,0x69,0x00,0xFB,0x25,0x00,0x33,0x45,0xC7,0x74,0xAD,0xFD,0xAC,0x13,0xAB,0xD3,0xCD,0x97,0xCE,0x00,0xD7,0x10,0x24,0x05, - 0xDB,0x28,0x00,0x31,0xDE,0x2D,0x60,0x22,0x39,0xBF,0x4B,0xCC,0xCB,0xAF,0xE3,0x0A,0xC6,0x2B,0xE6,0x0A,0xE7,0x09,0x02,0xE9,0x60,0xEC,0x98,0xEF,0x26,0x00,0xC2,0xBE, - 0x2A,0x00,0x6C,0x1E,0xCB,0x26,0x00,0x4F,0xC4,0xFF,0xF6,0xD3,0x16,0xDF,0xB1,0x40,0xD6,0x53,0x9D,0xB9,0xE1,0xDA,0xEF,0x83,0x60,0xDB,0x90,0x22,0x4F,0x4F,0xAA,0x58, - 0x60,0x94,0xDF,0x22,0x83,0xE1,0xE2,0x0B,0xC6,0x24,0x98,0xA1,0xE7,0x69,0x00,0xB7,0x42,0xEC,0x64,0x00,0xB1,0x2D,0x00,0x3D,0x1F,0xD8,0x2D,0xCF,0x54,0x02,0xA1,0xD3, - 0x41,0xD4,0x61,0xD5,0x61,0xD7,0x32,0xDE,0xD1,0x78,0x31,0x4F,0x38,0xD5,0x40,0x9C,0xDB,0x11,0xE9,0x9E,0x15,0xD6,0xD6,0xE3,0x16,0xE5,0x16,0xE7,0x17,0x00,0x84,0x96, - 0xC1,0xED,0x10,0x00,0x98,0x86,0xA5,0x00,0x21,0x96,0x33,0x5E,0x3F,0x47,0x3A,0xE6,0x91,0x0D,0xF0,0x7F,0x58,0x8F,0x90,0x5C,0xDB,0x11,0xF8,0xFC,0x24,0x9C,0xC8,0xA5, - 0xCC,0x29,0xC2,0xEA,0x25,0x00,0x5B,0x0C,0xC4,0x00,0x26,0x23,0x53,0x00,0x91,0x44,0x24,0x1E,0x83,0x90,0x38,0x04,0xDB,0xE1,0xE0,0x39,0xC8,0x24,0x9F,0x00,0xC2,0x95, - 0xE3,0x04,0x10,0x00,0x22,0xD4,0x00,0x92,0x1E,0xC8,0x26,0x3E,0x7A,0xE3,0x00,0xC2,0xCE,0x07,0x70,0xDB,0x8B,0x3A,0x4B,0x0D,0x00,0x3A,0xB0,0x47,0x61,0x00,0xBB,0x1F, - 0x11,0x1D,0x10,0x38,0xD0,0x21,0x1B,0x70,0xA4,0x83,0x00,0xD3,0x81,0x28,0xDB,0x24,0x00,0x4F,0x02,0x00,0x3C,0x0A,0xF1,0x0D,0xB1,0x0F,0x73,0x13,0xCE,0x1A,0xCB,0xD3, - 0x9C,0x90,0xF0,0x5A,0x3B,0x85,0xDB,0x90,0x00,0x07,0x07,0xAC,0x42,0x7C,0x5A,0x2F,0x72,0x1F,0x12,0x3D,0x19,0xC0,0x07,0xFE,0xDB,0x13,0xA3,0x42,0x1B,0xA3,0x00,0xA6, - 0xD7,0x19,0xAF,0x69,0xA3,0x23,0x82,0xE0,0x1F,0x95,0x08,0x17,0x02,0xDB,0x76,0x35,0x07,0x00,0x4F,0xB9,0x00,0xE3,0x46,0xE3,0x66,0xE1,0x10,0xD8,0x7E,0x98,0x0B,0x2F, - 0x97,0x08,0x7E,0x5F,0x02,0xEE,0x00,0x01,0xD3,0xDB,0x09,0xE0,0x00,0x34,0xC2,0xD3,0x01,0xBF,0xDB,0x09,0xE0,0x00,0x34,0xC2,0xD3,0x03,0x0C,0xDB,0x20,0x00,0x10, -}; +// Converted using ConvPNG +#include +#include "all_gfx.h" + +// 8 bpp image +uint8_t apple_compressed[21119] = { + 0xDC,0x20,0xF0,0x00,0x46,0x00,0x02,0x02,0x1B,0x12,0x12,0x07,0x4F,0x83,0x00,0x0D,0x00,0x12,0x02,0x0A,0x20,0x12,0x00,0x32,0x86,0x00,0x7A,0x12,0x22,0xD6,0x01,0x07, + 0x07,0x08,0x02,0x80,0xE4,0x4F,0x12,0x0D,0x20,0x12,0x1B,0x32,0xC0,0xDB,0x24,0x07,0x64,0x31,0xAF,0x7A,0x52,0xF0,0x00,0x02,0x8A,0xBE,0x03,0x34,0xB7,0xA8,0xB4,0x80, + 0x7A,0x9F,0xB7,0xC9,0xE1,0xCB,0x3E,0xC7,0xC1,0x0A,0x01,0x03,0x30,0xB7,0x80,0x4F,0x24,0x02,0xF0,0xA8,0xCB,0x51,0xE1,0x00,0xB7,0x9F,0x82,0xE6,0x31,0x03,0x34,0xB7, + 0x80,0x4F,0x7A,0x98,0xCB,0xE0,0xF7,0x01,0xF6,0xFD,0xFD,0xCE,0xF0,0x7A,0x02,0xA4,0xA2,0x06,0x58,0xDB,0x64,0xA9,0x9F,0x00,0xCE,0xAA,0xFB,0xFB,0xF6,0xF3,0xFC,0xFC, + 0x35,0xCC,0xB0,0xF3,0x40,0x4F,0x65,0x86,0xDB,0xBD,0xE0,0x9F,0xC7,0xE1,0xFD,0xF7,0xF0,0x00,0xDC,0x08,0xFF,0xC4,0xF0,0x1B,0x0C,0xC0,0xDB,0x03,0x07,0x00,0x9F,0xC3, + 0xA1,0xD1,0xDA,0x00,0xF9,0xF3,0xF3,0xF6,0x02,0xFC,0xED,0x9F,0x24,0x4F,0x07,0xB2,0xE4,0xA4,0xB9,0x00,0x08,0xF8,0x1B,0x03,0x0B,0xE0,0xDB,0xC8,0xB7,0xCB,0xA1,0x52, + 0xA1,0x95,0x00,0xF9,0xF8,0xF3,0xFD,0xFF,0xFC,0xB1,0x3C,0xFC,0xF0,0xE5,0x09,0x1B,0x9F,0x7A,0x31,0x42,0xDB,0x02,0xF4,0xDC,0x00,0x31,0x4F,0x02,0xA5,0xC4,0xC9,0x30, + 0xCB,0xE8,0xDC,0x1B,0xF7,0xF4,0xF4,0xD1,0xD2,0x9A,0x01,0x97,0x12,0x08,0x7A,0x0D,0x31,0x61,0xD7,0xC0,0x03,0x5E,0x83,0xDC,0x12,0xCC,0x73,0x22,0x7A,0xBB,0xE5,0xAF, + 0x81,0xDD,0xF5,0xF8,0x90,0xBB,0xF5,0xF5,0xFD,0x3C,0xD7,0x9F,0x13,0xDF,0x38,0x00,0x0C,0x27,0xCB,0xF0,0xD2,0x07,0x08,0xC4,0x01,0x4C,0xA8,0xE1,0x92,0xAE,0xF5,0x52, + 0xF2,0xF7,0xC0,0x63,0x3B,0xD3,0x12,0xBC,0x7D,0x96,0x2C,0x00,0x08,0xAC,0x18,0xDB,0xD1,0xFB,0xDE,0x68,0x94,0xF4,0xC0,0xDF,0xFC,0xB0,0xC2,0xF0,0x03,0x05,0xEE,0x64, + 0xBF,0x03,0x07,0x07,0xE0,0x03,0x22,0x08,0x9B,0x91,0xA5,0xDB,0xE1,0x4A,0xF6,0xF9,0xC8,0xBA,0xF5,0xF6,0x2E,0xC1,0x24,0x1B,0x02,0xF9,0x98,0x1A,0x02,0x00,0x08,0x9A, + 0x02,0x00,0xF3,0xD6,0xE9,0x0B,0xF0,0xCC,0xFE,0xEA,0xCC,0xDC,0x02,0xF6,0xF6,0x4C,0x24,0xEE,0x82,0x03,0x2C,0x00,0x0D,0x22,0x19,0xCE,0xC3,0xF9,0xB8,0x2A,0xF5,0xB1, + 0x74,0x96,0x69,0x0D,0xA7,0xBC,0xE9,0x06,0x20,0xD6,0x48,0xFE,0x61,0x1B,0x0D,0xF0,0xD7,0xA3,0x94,0xF2,0xDD,0x00,0xF8,0xFD,0xFD,0xC1,0x04,0x02,0x4F,0x0D,0x02,0x1B, + 0x06,0x30,0xDB,0x48,0xDD,0x1D,0x8E,0x9C,0xA7,0xFE,0xAD,0x81,0xF2,0xF4,0xF5,0xF7,0xFF,0xF0,0xB1,0x88,0x7A,0x9F,0x01,0x88,0xDA,0x13,0x10,0xBA,0x31,0x02,0x9F,0x0E, + 0xB0,0xFE,0xFF,0xF4,0x89,0xE8,0xDC,0x1C,0x9F,0xC4,0xA0,0x4F,0x31,0xC2,0xDB,0xD4,0x04,0x4F,0xE5,0xA2,0xC1,0xFF,0xF9,0xF8,0xC5,0xF7,0xCA,0x20,0x7A,0x31,0x32,0x83, + 0xDB,0x05,0xE4,0xAD,0x24,0x4F,0x07,0x7A,0x82,0xFE,0xFC,0xFC,0xE6,0x83,0xF9,0xF7,0xD8,0xB8,0x2B,0x16,0x80,0xC7,0xCF,0x72,0x7A,0x1B,0xB8,0xCD,0x7A,0xAC,0x6A,0xE0, + 0xF3,0xF8,0xBC,0xE6,0x40,0x1B,0x63,0x84,0xD8,0x8F,0xCB,0x6B,0xE4,0xA8,0xF3,0xAF,0x7E,0xF9,0x64,0xF4,0xB9,0xF2,0x6F,0xFC,0xCF,0x01,0xA4,0x00,0xC4,0x28,0xD4,0xF9, + 0xB9,0x81,0xF6,0xCC,0x12,0x1B,0x9F,0x90,0xCA,0x07,0x0D,0x07,0x4D,0x08,0x00,0x09,0xCC,0xDE,0x5C,0x00,0x05,0x19,0xC4,0x01,0x9F,0x76,0xF9,0xF6,0xFA,0xF2,0x83,0xDC, + 0xC1,0xCF,0x70,0x00,0x02,0x08,0x02,0x47,0x07,0x84,0xCB,0x05,0xDE,0xEA,0x3B,0x02,0x89,0x7C,0xF6,0xC4,0xF5,0x03,0xF9,0xCE,0x9F,0x31,0x31,0x07,0xBA,0x24,0x0D,0x3F, + 0x32,0x01,0x56,0xDF,0x1C,0xA0,0x98,0xA8,0xFE,0xDA,0x64,0x00,0xFE,0xAC,0x80,0xDB,0x12,0x9C,0xAF,0xA1,0xC4,0x90,0x80,0xA6,0xCF,0x2D,0xD0,0xC2,0x9F,0xC5,0xF6,0xF5, + 0x90,0x94,0xCA,0x0D,0x1B,0x12,0x22,0x9F,0xE0,0xCE,0xC9,0x08,0x1B,0xA5,0x00,0x0D,0x54,0x00,0x06,0xE1,0xD1,0x01,0x54,0xDB,0x00,0x00,0xAC,0xE1,0xF6,0xF2,0xC2,0x00, + 0xFD,0xA5,0x02,0x24,0xA6,0xBC,0x70,0xBC,0x89,0xD7,0x08,0x80,0xE2,0x89,0xD0,0x08,0x0A,0x12,0xBF,0x90,0xC1,0x30,0xD0,0x1A,0x02,0x22,0x99,0xF0,0xE0,0xDD,0xF9,0x37, + 0xFF,0xC1,0xC9,0xE7,0xAD,0x13,0x98,0xA8,0xA6,0x00,0x7C,0x24,0x00,0x04,0x6D,0x12,0x40,0x0D,0x50,0x85,0xDB,0x00,0xB0,0x24,0x53,0xF0,0x05,0xC1,0x24,0x8F,0x93,0xF9, + 0x20,0x96,0xF7,0xCA,0x7A,0xCB,0x0F,0x9F,0x24,0x00,0x69,0x22,0x00,0x53,0x95,0x00,0x4C,0x03,0xF3,0x0D,0x00,0x4B,0x16,0x0A,0x41,0xDF,0x03,0xA8,0xDB,0x36,0x02,0x00, + 0x7A,0xDC,0x7C,0x04,0x82,0x78,0x08,0x4F,0x12,0x53,0x00,0x07,0x07,0xD8,0x53,0x22,0xF0,0xC8,0x0B,0xAE,0x00,0xC1,0xC1,0xAC,0xAC,0x50,0xB0,0x00,0x82,0x8F,0xA7,0x00, + 0xCC,0x9B,0xC2,0xC2,0x9B,0xAE,0xE9,0xF7,0x37,0xF4,0xDE,0xCE,0x30,0xF6,0x55,0x0D,0xAE,0xCC,0xCC,0xA7,0x91,0x00,0x9B,0x52,0x00,0x8C,0x09,0x8F,0x82,0xB0,0x2E,0x5B, + 0xAC,0x89,0x00,0xCA,0x3E,0xC1,0x4C,0xF2,0x0C,0xE3,0x0F,0x31,0x4F,0x00,0xEA,0x23,0x4F,0x08,0x6E,0xE9,0x00,0x74,0x1B,0x48,0x6F,0x07,0x17,0xC2,0xDA,0xE7,0x00,0xD2, + 0x16,0x07,0x00,0x1B,0xB2,0x8C,0xA0,0xD1,0x50,0xAC,0xCC,0x16,0x8F,0xCC,0x00,0xD2,0x98,0x00,0xC2,0xC0,0x78,0xC6,0x02,0x01,0xBF,0xEB,0xF7,0x07,0xF2,0xFA,0xF3,0xF2, + 0xF3,0x0A,0xB8,0x0F,0xC0,0x04,0x8D,0x00,0x20,0xAE,0x83,0xEB,0xA7,0x33,0x61,0x82,0xDD,0x3F,0x00,0x42,0x35,0x00,0x61,0x0A,0xE4,0x82,0xDF,0x9F,0x8A,0xC1,0xF9,0x6E, + 0x05,0x0F,0x89,0x6C,0x81,0x74,0xDA,0x2A,0x04,0x8A,0xA7,0x86,0xD1,0xF3,0x6C,0xF4,0xCE,0xDD,0x8A,0xA6,0x42,0xA4,0xF2,0x00,0xA6,0x60,0xCC,0xB1,0xC0,0xA6,0x00,0xC6, + 0xC3,0x12,0x98,0x06,0xBB,0xBB,0x03,0xE7,0x94,0xBB,0x58,0xEC,0xDC,0x00,0xF4,0xFC,0xBF,0xBB,0xE7,0xBB,0x78,0x4E,0xD5,0x00,0xBF,0xCB,0x00,0xD3,0xD3,0xDB,0x0A,0x00, + 0x4F,0x82,0x00,0xC5,0x46,0x50,0x00,0xE1,0x65,0xC2,0x85,0xDF,0x48,0x70,0x9E,0x77,0x70,0x02,0xF0,0xDB,0x25,0x07,0x83,0x45,0x07,0x06,0xD8,0xAD,0x54,0xFD,0x76,0x8F, + 0x16,0xE3,0x7D,0x00,0x95,0xB2,0x82,0xDC,0xC6,0x6C,0x00,0xD9,0x18,0xE7,0x00,0xEE,0x73,0xDC,0x00,0xEE,0xEE,0xF7,0xF9,0xFA,0xFA,0xF8,0xF4,0x0C,0x78,0x7D,0xEE,0x7D, + 0x00,0x71,0x71,0x31,0x94,0x78,0x00,0x72,0xD5,0x89,0x60,0xDC,0xAE,0xA4,0x9A,0x8C,0xDB,0x09,0x06,0xA3,0x74,0xB2,0xBC,0x18,0xBE,0x8D,0x22,0x0D,0x9D,0x30,0xDD,0xAD, + 0x9F,0xB8,0x7D,0x18,0x8B,0xB7,0xF1,0x5B,0x86,0x49,0x82,0xD9,0xC1,0x8C,0xAE,0x72,0x00,0x22,0x87,0xC0,0x40,0xD5,0xB0,0xD7,0x00,0xEA,0xDE,0xDE,0xEE,0x87,0x57,0x60, + 0x57,0x1C,0x8B,0x87,0x16,0xA8,0x81,0xFA,0xF4,0xF3,0xFA,0xEE,0xDC,0x23,0x00,0x73,0xDF,0x0A,0xDD,0x0B,0xB9,0x22,0xC2,0xD3,0x82,0xDD,0xD3,0x94,0x49,0x9D,0x92,0x24, + 0x4D,0x89,0x00,0xA6,0x8F,0xDB,0x8D,0xDD,0x0B,0xB8,0x2D,0x86,0x60,0x5D,0xDB,0x0B,0x89,0x45,0x02,0x35,0xDD,0x24,0x89,0xC0,0x89,0x8F,0x99,0x9B,0xEC,0xDB,0x27,0xB5, + 0x2B,0xD8,0x0B,0xD9,0x06,0xB3,0x00,0x38,0x1A,0x48,0x57,0x7F,0x02,0x73,0x80,0xD8,0xF4,0xF4,0x00,0xFA,0x7D,0x73,0x66,0x83,0x87,0x60,0x87,0x88,0xDB,0x05,0xC2,0x82, + 0xDB,0xA7,0x50,0xD9,0xB8,0x4B,0x97,0xE7,0x94,0xA9,0x6E,0x05,0x40,0xDD,0xD5,0xFA,0x9F,0x3A,0xF5,0xC0,0xB3,0x00,0x42,0xBD,0x7A,0x32,0x24,0xF0,0xB1,0x9C,0x8A,0x27, + 0x00,0xB7,0xC2,0xC2,0x8C,0x60,0xDB,0x90,0xB3,0xA8,0xDA,0x00,0xE5,0x8B,0x05,0x03,0x11,0x48,0x06,0x14,0x42,0x60,0xC8,0x73,0x90,0x86,0xF4,0xF8,0x03,0x71,0x30,0x7D, + 0x70,0xDC,0xD8,0x00,0x66,0xDB,0x14,0x96,0x96,0x95,0x8B,0xBF,0xD9,0x04,0x8F,0x85,0xAE,0x61,0xD2,0x21,0xF6,0x5B,0xE2,0xCB,0x07,0x7F,0x00,0x20,0x00,0xAC,0x0C,0xCC, + 0xDD,0x06,0xF0,0x9F,0x7A,0xCB,0xF0,0x2F,0x86,0xDB,0x8C,0x98,0xE5,0xCE,0xB9,0x69,0xAE,0x95,0x96,0x8F,0x2A,0xF4,0xCA,0xB9,0x56,0x91,0x81,0xE7,0xEB,0xEA,0x6D,0x40, + 0xDC,0xE5,0x60,0x11,0xDF,0x57,0x09,0x57,0xDC,0x71,0xDC,0x03,0xDB,0x00,0xD4,0xEB,0x7D,0x66,0x05,0x66,0x90,0x70,0x70,0x71,0xAD,0xF4,0x28,0xF1,0xD3,0xD8,0x82,0xB4, + 0xD7,0x63,0xD8,0x97,0xD0,0x00,0xC6,0x68,0xA4,0x56,0xE9,0x02,0xA9,0x2E,0xCD,0x69,0x0C,0xC0,0x34,0xD7,0xE0,0xDC,0x9B,0xF7,0x5F,0xD6,0xC8,0xBA,0x00,0x4F,0x81,0x37, + 0xDC,0xE6,0xD3,0x0A,0xD4,0xCA,0xCC,0xCE,0x9E,0x4A,0x0D,0x53,0xB3,0x2C,0xA6,0xA4,0xDE,0x5A,0xDC,0x09,0xA1,0xE4,0xB0,0x79,0x98,0x73,0xAC,0x55,0xFF,0x20,0xDC,0x4C, + 0xB7,0x58,0x00,0x06,0x06,0x14,0x53,0x7F,0xCC,0xD3,0xC9,0xA8,0xF3,0xDD,0x00,0xD5,0x94,0x71,0x66,0x74,0x62,0x60,0x74,0xDD,0x66,0xD0,0x95,0xD5,0xD3,0xB3,0xEE,0x9C, + 0x93,0x6C,0xA0,0xB0,0xDE,0xA0,0xD8,0x50,0x56,0xDE,0x5A,0xD7,0x2C,0xBF,0xA5,0x57,0xD5,0xEE,0x36,0xDF,0x0A,0xCC,0x2B,0x3A,0xB0,0x53,0x9C,0xC3,0x85,0x83,0x0B,0xC8, + 0x88,0x12,0xC3,0xE2,0xAF,0x2D,0xE5,0x6B,0xCC,0x16,0x4F,0xD9,0x16,0x8C,0x1C,0x00,0x4B,0xED,0x59,0xB9,0x4D,0x93,0x8E,0xB0,0x1B,0xC2,0xDD,0x40,0xDC,0xC0,0xDA,0x39, + 0x05,0x00,0x11,0x05,0x09,0x11,0x14,0x38,0xC8,0x66,0x53,0x70,0xC9,0xB0,0xF3,0xDA,0x29,0xFA,0x72,0x93,0x05,0x61,0x61,0x83,0x2E,0xEF,0x90,0x8B,0xBA,0x3A,0xA4,0xC9, + 0xB2,0xB0,0xE8,0x00,0xD2,0x28,0xB7,0x8B,0xD5,0x78,0xC2,0x97,0x72,0x03,0xF7,0x3F,0xAE,0xB2,0x90,0xC6,0x22,0xF2,0x69,0x98,0x31,0x64,0x97,0x4C,0x24,0xF5,0xC4,0x5E, + 0xFF,0x87,0x10,0x26,0x3C,0xD3,0x96,0xDE,0x9F,0xC1,0xD9,0xED,0x20,0xD8,0x13,0xBA,0xBA,0x87,0xDA,0x09,0x4B,0xB3,0xD5,0x0F,0x09,0x85,0xE0,0xAB,0xB9,0xD8,0xE0,0x39, + 0x0B,0xBA,0x94,0x40,0x8E,0xB3,0x06,0x09,0x00,0x06,0x05,0x7F,0xC8,0xE5,0xDE,0xE7,0x78,0x0C,0xFA,0xF2,0xF5,0xF5,0xB7,0x8B,0xFA,0x89,0xBB,0x0A,0xE7,0x5B,0x30,0x2D, + 0xA2,0x9B,0xC1,0x32,0xA4,0x50,0x89,0x00,0x84,0xD5,0x72,0xE8,0x00,0xD8,0x14,0x94,0xB4,0x9F,0x02,0x03,0xBD,0x00,0xEE,0x00,0xB6,0x3D,0x9D,0xE5,0x47,0x00,0xA2,0xBB, + 0xC0,0xDD,0xD8,0xAF,0x30,0xAC,0x24,0xD5,0x81,0x44,0xDB,0x28,0xDD,0x19,0x24,0xB3,0x24,0x8F,0xC1,0x8C,0xD0,0x09,0x37,0xBA,0x64,0x00,0xF2,0x15,0x86,0x5A,0x08,0xA2, + 0x49,0x87,0xD7,0xBB,0x34,0xBE,0xB9,0x81,0x62,0xF9,0xDE,0xC0,0xDC,0x4B,0x16,0x69,0x8E,0x90,0xFC,0x00,0xBE,0xEE,0x76,0x21,0x84,0xFA,0xCD,0xE6,0xAE,0x36,0x87,0xA9, + 0xD8,0xAE,0xED,0xDE,0x52,0xBF,0x06,0xCE,0xC4,0x14,0x00,0x7C,0xAA,0x07,0xC7,0x91,0x66,0x73,0x73,0xCF,0xCA,0x00,0xF6,0x06,0x00,0x37,0xBB,0xBE,0xFD,0xBB,0x04,0xF9, + 0x56,0xCA,0xD4,0xEE,0xAC,0xB0,0x73,0xBC,0xD5,0xA8,0x7A,0x02,0x5A,0xEF,0xF5,0x80,0xD3,0xF6,0xAC,0xB3,0x2B,0xD8,0x09,0x92,0x00,0x86,0x2E,0x00,0xAE,0x08,0x70,0xE4, + 0xA5,0xB2,0x90,0xDF,0x28,0xFF,0x3B,0x04,0x9C,0x4C,0x97,0xAC,0x99,0xB2,0xC2,0xFA,0x00,0x03,0xF1,0xAC,0xD4,0x2E,0x13,0xE9,0x12,0x00,0xD5,0x64,0xA6,0x94,0xB7,0xDB, + 0xBE,0x00,0xC0,0x5F,0x90,0x03,0x06,0x86,0xD4,0xDD,0x03,0x73,0x61,0x3C,0xB5,0x4B,0xB7,0x4F,0xF6,0xBE,0xF7,0xA4,0x9A,0x88,0x00,0xC3,0xDE,0x4E,0xDD,0xFB,0xC1,0x25, + 0x8D,0xC0,0x94,0xDB,0x02,0x08,0x9F,0x22,0xCB,0xB4,0xC9,0x04,0xAE,0xE0,0xD6,0x40,0x29,0x40,0x56,0x00,0xBE,0xEB,0x08,0x07,0x84,0x09,0xE7,0x00,0xE2,0x84,0xC0,0xE7, + 0xC8,0x6B,0xA7,0x2E,0x06,0xC7,0x0B,0xC0,0xCE,0xAF,0x1C,0x02,0x6B,0xBF,0x12,0xE7,0xAA,0x29,0x26,0xB1,0xA6,0xB3,0x94,0x00,0x74,0x00,0x83,0xAF,0x02,0x0D,0xD2,0x0C, + 0xB0,0xB3,0x16,0x3C,0x68,0xDC,0x00,0x3C,0x87,0x7D,0x96,0x0A,0x94,0x7D,0xDC,0xC8,0xBB,0x27,0xE7,0x30,0x26,0x00,0xA0,0x34,0xBB,0x59,0xBA,0x58,0xDC,0x67,0xC3,0x02, + 0x20,0xDB,0x48,0x04,0x1B,0x1C,0x0D,0xC1,0xAC,0x9C,0xA6,0x9B,0xAF,0x24,0x40,0xA0,0xCA,0x84,0x90,0x00,0xA4,0xAD,0x6B,0x7B,0x00,0x72,0x00,0x2A,0x89,0xD5,0xD4,0x82, + 0x44,0x84,0x78,0xE7,0xCF,0xE1,0xBA,0x09,0x01,0x8F,0xBB,0x6B,0xDE,0xD1,0x00,0xA5,0x6B,0xE9,0x9D,0x14,0xE7,0x71,0x29,0x15,0xA9,0xE5,0x00,0xA0,0xBB,0xD2,0x62,0x00, + 0x74,0x83,0x02,0xD4,0x1A,0x04,0x80,0xD7,0x0B,0x66,0xFC,0x94,0xE0,0x06,0x68,0x3B,0xDC,0x1E,0x01,0xE5,0x14,0xA2,0x98,0xDC,0x29,0xC8,0xD3,0x39,0xF3,0xAE,0x02,0x00, + 0x8B,0xFD,0xF7,0x55,0xC2,0x22,0x97,0x24,0xC2,0xDB,0x04,0x6C,0x00,0xDA,0x12,0x24,0x06,0xDA,0xE5,0xA5,0xD3,0x44,0x94,0xA7,0xCA,0x00,0x89,0xD0,0x03,0x7B,0x7C,0xCC, + 0x3C,0x00,0x70,0x7C,0xD6,0x00,0x96,0xA4,0xEC,0x56,0xE8,0xE8,0x91,0x2B,0xF7,0xFA,0x05,0xE2,0x0F,0x02,0x12,0xC1,0x8E,0x94,0x58,0x11,0xCA,0x03,0x83,0x60,0x61,0x60, + 0x60,0x04,0xD5,0xCB,0x60,0x47,0xF1,0xE1,0x21,0xD9,0x83,0xBE,0x68,0xD1,0x06,0x9D,0x02,0x74,0xA2,0xB8,0x56,0x9D,0x00,0x08,0x70,0x6D,0x8A,0x4B,0x62,0x1B,0x60,0xFA, + 0x18,0x19,0x02,0x2C,0xB1,0x26,0x83,0x28,0x23,0x0E,0xDC,0x1A,0xDE,0x00,0xEA,0x45,0x00,0xEB,0x20,0x97,0xCA,0xD7,0x82,0x10,0x4C,0x31,0x12,0x20,0x97,0xB1,0x03,0x52, + 0xF3,0x31,0x09,0x4F,0x9F,0xC1,0x8F,0x27,0x93,0xD7,0x0F,0x00,0xA8,0x2A,0x82,0x4C,0x04,0x56,0x89,0xCB,0xB0,0xD6,0x00,0x8A,0xB2,0xB2,0x88,0x1F,0xA6,0xA6,0x88,0x8B, + 0x7A,0x02,0x00,0x83,0x83,0x00,0x87,0x62,0x2C,0x42,0xB2,0x5C,0xBF,0x31,0xFA,0x30,0x23,0x23,0xC7,0xAA,0x08,0xF0,0xAD,0x14,0x3C,0xF2,0x0E,0x02,0x2C,0x00,0x80,0x03, + 0x62,0x66,0x32,0x78,0x89,0x2D,0x3C,0x80,0xAC,0x00,0xDB,0x31,0x98,0xE9,0x44,0x97,0x32,0xB8,0xB0,0xE6,0x64,0x62,0xAE,0x87,0xE8,0x16,0xB7,0xA8,0x32,0x3C,0xC8,0xC4, + 0x92,0x0E,0x23,0xA9,0xE7,0xE6,0xE8,0x93,0x99,0xD3,0xBA,0xC0,0x2E,0xFC,0x4C,0xBB,0xC5,0xDC,0x06,0x8F,0x4C,0x4F,0xF2,0xA3,0x12,0x1B,0x31,0xAF,0x94,0x08,0x1C,0xAF, + 0xE8,0x03,0x69,0x05,0x22,0x9E,0xC4,0x55,0xE4,0x52,0xBE,0x86,0x6D,0x00,0xA4,0x88,0x18,0xB2,0xCE,0x19,0x8A,0x8A,0xB7,0x36,0x88,0x00,0xA6,0xF8,0x34,0x9B,0x0A,0x3C, + 0x00,0x6A,0x68,0x05,0x61,0xDA,0x3A,0xFA,0x10,0x3B,0x3B,0x2C,0x60,0xB2,0xA3,0xC2,0xAB,0x8F,0xE8,0x15,0xE7,0x10,0x00,0xC3,0xB9,0xCD,0x01,0x7B,0xA4,0x7C,0xE5,0x15, + 0xAA,0xE4,0x0A,0xB8,0xA6,0xB2,0xF4,0x61,0x8A,0xDC,0x8C,0xA2,0x80,0xDB,0x80,0x51,0x83,0xBB,0x6D,0x3C,0x2C,0x1A,0x3C,0x86,0x34,0x2C,0x3C,0x60,0x0E,0x00,0x57,0xFF, + 0x80,0xDD,0x05,0xEA,0x01,0xDB,0x8E,0x8E,0x44,0xBE,0xEB,0x30,0x76,0xC5,0xDD,0xD0,0x96,0x1B,0x02,0xA2,0xBA,0x70,0x07,0x05,0x6A,0xDA,0x09,0x08,0x03,0xDF,0x41,0x1C, + 0x02,0xF0,0xB0,0xF2,0x5E,0xDF,0xC8,0xE7,0xBA,0x89,0x0C,0x56,0xA4,0xB2,0xD2,0x2B,0x02,0x00,0xC2,0xD4,0xF0,0x08,0xD9,0xF0,0x00,0xD8,0xB0,0xA8,0xA0,0xB6,0xA0,0x92, + 0x65,0x83,0x15,0x90,0x61,0x02,0xDB,0x68,0xDD,0x91,0x62,0x96,0xB7,0xB0,0x14,0xA7,0xFA,0xD0,0xC4,0x52,0x00,0xD8,0xE0,0xCD,0x96,0x65,0x96,0xF4,0x45,0xAC,0x5B,0x19, + 0x2D,0x70,0x0E,0xA2,0xFE,0xE8,0x47,0xB9,0xAB,0x28,0x10,0x90,0xDB,0x16,0x61,0x8E,0xD4,0x45,0x0E,0x19,0x48,0x48,0x14,0x00,0x0F,0x11,0x45,0xB4,0x57,0xD2,0x80,0xDC, + 0xDE,0x6D,0x6B,0xC1,0xDD,0x99,0x91,0xBA,0x4C,0x7A,0x7B,0xF2,0xF4,0xCA,0x1D,0x48,0xA4,0x08,0x12,0x07,0x2F,0xF0,0x82,0xD2,0x2B,0xB7,0xC6,0x40,0xBE,0xA4,0xDF,0xAD, + 0xAD,0x03,0x96,0x85,0x95,0x03,0x89,0xA6,0x03,0xB0,0xD9,0xC3,0xD7,0xF9,0x1C,0x0A,0x90,0x88,0xA0,0xBC,0x98,0xF4,0xF4,0x84,0x4A,0x90,0xA6,0x56,0xA9,0x1E,0x16,0x05, + 0xA6,0xF5,0x07,0xCC,0xB3,0xFF,0xFA,0x05,0x0C,0x9B,0x2B,0xBF,0x42,0x7D,0x7C,0xB1,0x00,0x83,0xF2,0x00,0xE4,0xF0,0x45,0xE9,0xCD,0x84,0x7C,0xC9,0x4A,0xB0,0x39,0x80, + 0xD1,0xE5,0x63,0xA0,0x4D,0x9B,0x95,0xB4,0xA0,0x98,0x23,0x48,0x38,0x31,0x14,0x38,0x02,0x0F,0x39,0xE5,0x83,0xDC,0xE5,0x00,0xC0,0xDC,0x6D,0x5E,0xAB,0xD1,0xC8,0xBB, + 0xA5,0x53,0x6B,0x7A,0xAB,0x94,0xB7,0x1E,0x60,0xE7,0x07,0x53,0xB0,0xCA,0xB4,0xB1,0xBE,0x86,0x6B,0xE4,0x85,0x81,0x02,0x82,0x70,0xA8,0x00,0xAB,0xB0,0xA2,0xC3,0xD9, + 0x00,0x53,0x7C,0x84,0xAC,0xA6,0xBF,0xAC,0xDA,0x25,0xDD,0x0C,0xAB,0xBF,0x00,0x0D,0xBB,0x74,0x90,0xDC,0x00,0x1D,0xD5,0xE7,0x25,0x0D,0xB5,0xA2,0x5B,0x36,0xFB,0xF5, + 0x05,0x48,0x95,0xC0,0x4E,0xE6,0xB0,0x37,0xED,0x36,0x99,0x85,0x83,0xA6,0x4D,0xB5,0x96,0xDB,0x8F,0x92,0x0C,0x00,0x68,0x42,0x0E,0xD9,0x29,0x96,0x00,0x14,0x05,0x09, + 0xB3,0xDC,0xE5,0x51,0xB3,0xB8,0x00,0xEA,0x6B,0x5E,0x5E,0x6B,0x75,0x76,0x03,0xCF,0x8F,0xF0,0x02,0x4F,0x12,0xF4,0xD8,0x3B,0xD9,0xCA,0x90,0x4C,0xDA,0x16,0xD3,0x8C, + 0x99,0xB3,0x51,0xC7,0xF8,0x00,0xA5,0x53,0xBB,0xEB,0x04,0x88,0xD0,0x0B,0xDB,0x0A,0x0E,0xC3,0xE8,0x04,0x9C,0xEF,0xED,0xB3,0x6D,0x00,0x96,0xB5,0x92,0x0A,0x89,0x96, + 0xDA,0x99,0xB9,0x00,0xD2,0x48,0x7B,0xC4,0x1D,0x00,0xE5,0x0D,0xFA,0xDF,0x15,0x0B,0x13,0xC8,0x40,0x0F,0xBE,0xEA,0x00,0xCC,0xE9,0xC6,0xB6,0xC2,0xB1,0x85,0x99,0xDC, + 0x34,0x98,0xA5,0xF0,0x17,0x42,0x42,0x7F,0x00,0x40,0xDC,0x4B,0xC0,0xD9,0x4B,0x3A,0xB0,0xDC,0x30,0x5E,0x52,0xDB,0xC0,0xDC,0xC5,0x82,0x34,0x9F,0x07,0x94,0x83,0x75, + 0xEF,0xB0,0xDB,0x5A,0x24,0xEB,0xAB,0x86,0x95,0xBA,0xEC,0xB5,0xA2,0xC6,0xF5,0x82,0xDA,0x4C,0x00,0xF1,0x6C,0xDD,0x3B,0x00,0x9A,0x45,0xA6,0xBD,0x94,0x86,0x90,0xD7, + 0x1B,0xDB,0xAC,0xAD,0x82,0x81,0xAD,0x89,0x40,0x44,0x44,0x52,0xCA,0xBE,0xF0,0x05,0x08,0x37,0x37,0x55,0xA2,0x2F,0xA2,0x40,0x00,0xC2,0x0B,0x10,0x92,0xC3,0xE4,0xE2, + 0x04,0x72,0x80,0xD6,0x56,0xF7,0x22,0x00,0xBE,0x1D,0x71,0xA4,0x49,0xEF,0x61,0xDB,0x49,0xD0,0x96,0xFE,0xB5,0x54,0xBC,0x5A,0x94,0x53,0xCD,0xE1,0xDA,0x81,0x00,0x7F, + 0xB3,0x3A,0x09,0x04,0x03,0x80,0xE0,0x8E,0x6D,0x6D,0x18,0x20,0x52,0xD6,0x00,0x76,0xCA,0xB0,0x74,0x1B,0xC2,0x12,0x83,0x9B,0x84,0x3C,0x24,0x4C,0xD5,0xA7,0xC6,0xC0, + 0xDA,0x89,0x7C,0xBC,0xC2,0xAA,0x00,0x80,0x45,0x90,0xA6,0x86,0xBF,0x77,0xFC,0x52,0xAF,0xF6,0xE1,0x15,0x11,0x6E,0x85,0x8A,0x30,0xAD,0xBE,0xC8,0xC3,0xBC,0xB9,0x02, + 0x86,0x9B,0x81,0xCE,0xBA,0x80,0xD5,0x3F,0x55,0x3F,0xB0,0xD9,0x07,0x6F,0x69,0x69,0x4E,0x55,0x00,0xBA,0x0B,0x44,0x12,0x20,0xBA,0x05,0xA9,0x21,0x89,0x89,0x84,0x56, + 0x05,0xD8,0x17,0x12,0x20,0xF4,0x61,0xEE,0xDA,0x67,0x93,0x2A,0x80,0x80,0xED,0xB4,0x9D,0x3B,0x01,0x02,0xDC,0x48,0x95,0xF3,0xE5,0xA0,0x91,0x4B,0x09,0x06,0x14,0x04, + 0x09,0x39,0xB9,0x4A,0x35,0xDC,0x0C,0xBB,0x81,0xDF,0xE2,0x4C,0x12,0x4F,0x06,0x80,0xDB,0x9F,0xC8,0xEF,0x31,0x7A,0x6B,0x9F,0xEB,0x73,0xA1,0x91,0x80,0x96,0x7D,0xB2, + 0xF3,0x7C,0xF9,0xA5,0xA6,0x6F,0x99,0x60,0xD4,0x96,0x5D,0x8A,0x05,0x5B,0x04,0x00,0x90,0xEA,0x3C,0xE5,0x0A,0x70,0x96,0xA6,0x24,0x37,0x8D,0x00,0x3F,0x00,0xA2,0xD0, + 0x00,0xCC,0x6E,0x00,0x3E,0x07,0xC1,0xDA,0x69,0x74,0x07,0x12,0xA2,0x29,0xED,0xDD,0x0A,0x4E,0x84,0xE9,0xC1,0xCE,0x41,0xD9,0x23,0x30,0x55,0x08,0xB1,0x94,0xA4,0x96, + 0xB4,0xC7,0x79,0x70,0xFB,0x41,0xD6,0xA2,0x95,0x3C,0x50,0xDA,0xC3,0xD9,0xCE,0x70,0x57,0xC8,0x7F,0x05,0x60,0x0A,0xDA,0x09,0x01,0x2A,0x4B,0x16,0x16,0x0C,0x5F,0x81, + 0x44,0xB8,0x6B,0x02,0x99,0xD7,0x53,0x07,0x0D,0x12,0xC3,0xDD,0xEC,0xC8,0x2C,0x9B,0x43,0x02,0x07,0x34,0x79,0x9F,0xD7,0x40,0xDA,0xBF,0x7F,0xD5,0xEB,0xE6,0x8D,0xDB, + 0x1D,0x00,0x85,0xDB,0xFD,0xC2,0xAA,0xE1,0x8A,0x5B,0x84,0xBB,0x80,0xD9,0x13,0x88,0xAF,0x6A,0xB9,0xAD,0xA0,0xDA,0xA2,0xA7,0xBA,0x00,0xA3,0x2B,0xC8,0x0B,0x00,0x60, + 0x3E,0xC9,0x3E,0x60,0xED,0xDA,0xED,0x55,0x6F,0x07,0x81,0xDF,0xDD,0xDD,0xD8,0x0B,0xDB,0x5D,0x00,0x94,0xD4,0xC0,0xDA,0x4E,0xAB,0x05,0xDB,0x0A,0xAE,0x8F,0xFC,0x36, + 0x05,0x70,0x97,0x98,0xDB,0x49,0xA7,0x34,0x95,0x94,0xDC,0x0B,0x38,0xDB,0x06,0x8B,0xD9,0x00,0x0A,0x1E,0x04,0x4B,0x25,0x0B,0x16,0x10,0x54,0x81,0x95,0x40,0x75,0xCF, + 0x98,0x0D,0x97,0xBB,0xB0,0xDA,0x82,0xDE,0xC3,0x69,0x31,0x31,0xC1,0x40,0xDA,0x78,0x94,0x61,0x71,0xD5,0x51,0xD2,0x7F,0xBC,0x40,0xDA,0x80,0xB0,0xDB,0x56,0x9D,0xD7, + 0x60,0xCD,0x7B,0xE8,0x08,0xC4,0xB7,0xCE,0xD0,0x8B,0x84,0x7B,0xB2,0xB4,0x48,0x3F,0xD0,0x18,0xB9,0x73,0x06,0xB0,0x00,0x47,0xD3,0x50,0x6F,0xDA,0x61,0xCF,0xD3,0x01, + 0x00,0x3E,0x0C,0x7B,0xDD,0x00,0x06,0x47,0xDB,0x07,0x47,0x0A,0xB9,0x00,0x3E,0x07,0x0A,0xE4,0xAC,0x32,0xE6,0x25,0x94,0x40,0x90,0x7C,0xA4,0x56,0x30,0x72,0x70,0xDB, + 0xC3,0xDC,0xD6,0x0A,0x80,0xFE,0x00,0xAC,0x86,0x38,0x48,0x7C,0x8B,0xC1,0x11,0x00,0x11,0x8B,0x06,0x0A,0x03,0x0A,0x3A,0x25,0x03,0x3A,0x1F,0x5F,0x20,0xE3,0xE3,0xDC, + 0x0D,0x95,0x04,0x5B,0x7A,0x08,0xF1,0xF7,0x05,0x74,0xFB,0x07,0x1A,0x02,0x4C,0x82,0xEC,0xA8,0xD2,0xDA,0x1C,0x71,0x00,0x94,0xF7,0x90,0xB2,0xB3,0x59,0x62,0xB7,0x54, + 0x09,0x97,0x81,0x26,0xE1,0x59,0xC4,0x61,0xD9,0x6F,0xB6,0x4B,0xD9,0x45,0x9A,0x84,0xB5,0xA7,0xFF,0xD8,0x0B,0xBE,0x4A,0xDA,0x0B,0xDD,0x00,0x90,0xDE,0x2F,0x06,0xDB, + 0x0C,0xB9,0xA9,0x1C,0x69,0xA6,0x1C,0x55,0xE5,0x2C,0xDC,0x2A,0x07,0x46,0xA9,0x70,0xAD,0xAD,0x66,0x71,0x96,0xB8,0x61,0xDB,0x82,0xD4,0x23,0x92,0x92,0xAC,0x00,0xB7, + 0xB9,0xAA,0x30,0x8B,0x05,0xDB,0x60,0x39,0xDA,0x03,0x00,0x33,0x3A,0x33,0x5C,0x0B,0x17,0x81,0xEC,0xC0,0xDC,0xD0,0xDA,0xF1,0xE5,0x0D,0x45,0xB3,0x05,0xF2,0xAC,0x4F, + 0x28,0x02,0x53,0xDA,0x28,0xB6,0xA8,0xB5,0xA9,0xC2,0xDC,0x70,0x01,0x81,0xDA,0x85,0xDB,0xBD,0xC5,0x2F,0xF2,0x06,0x41,0xD4,0x86,0xD9,0x8C,0x94,0x8C,0x19,0xD4,0x2A, + 0xB2,0xEF,0x2C,0xDB,0x18,0x47,0xD8,0x4B,0x00,0x61,0xE1,0x6A,0xE6,0x69,0x89,0xDA,0x07,0xDD,0x07,0x61,0xDB,0x22,0x9F,0x61,0xDC,0x6A,0x29,0x47,0xAD,0x29,0x0A,0xB4, + 0x74,0x9F,0xC9,0xB8,0x56,0x58,0xF4,0x66,0xBD,0x00,0x8D,0x2D,0xEA,0x70,0xDC,0x7E,0x48,0x03,0xE2,0x35,0x48,0xF0,0xE4,0xAA,0x11,0x05,0x60,0x8B,0x00,0x39,0x04,0x0A, + 0x33,0x1E,0x0B,0x13,0x30,0x1A,0x19,0xDB,0x00,0xB9,0xD0,0xCA,0x82,0x0C,0x22,0x7A,0x02,0x1B,0xDB,0x20,0xB5,0x92,0x15,0x02,0xFD,0x4A,0x9B,0xA0,0x9C,0xDA,0x11,0x7D, + 0x21,0xDB,0x50,0xC0,0x90,0xC0,0xCE,0xB2,0x88,0xD3,0x85,0xB9,0x7B,0xA6,0x9A,0xD2,0x0E,0xF0,0x3B,0x0E,0xE2,0x04,0x44,0x8B,0xB5,0x86,0xB1,0xBD,0x14,0xAB,0x55,0x00, + 0xD0,0x09,0xDB,0x48,0xD0,0x11,0x21,0xDB,0x69,0x98,0xD5,0x0C,0x02,0x5A,0x21,0xB8,0x61,0xD3,0x38,0xDB,0x55,0x05,0x95,0xB6,0x5F,0x00,0x6B,0xF2,0x22,0x3C,0x61,0x68, + 0xC9,0xB7,0x0E,0x64,0xB5,0x3B,0x64,0x42,0xB8,0x14,0x36,0x11,0x06,0x00,0x11,0xF3,0xAA,0xE5,0x95,0x46,0x33,0xDA,0x00,0x26,0x5C,0x1C,0xCD,0xEC,0xC0,0xDC,0xE3,0xB9, + 0x06,0xE6,0xD7,0x5B,0x9F,0x7A,0xDD,0x02,0x08,0x0D,0x07,0x0A,0xC1,0xDB,0x7A,0x6E,0xC7,0xBF,0x02,0xC6,0xD5,0x71,0x7D,0x73,0x7D,0x87,0xCA,0xDD,0xF7,0x90,0x71,0x6F, + 0x00,0x7C,0xBC,0x2B,0xCF,0x1E,0x9D,0x02,0xD8,0x14,0x90,0x87,0xBE,0x55,0x98,0x9E,0x07,0xDA,0x1D,0xCC,0x61,0x9D,0x85,0xD8,0x95,0x8B,0x05,0xDB,0x85,0xD9,0xE5,0x0B, + 0xA3,0x30,0xDB,0x49,0x07,0x28,0xE5,0x4C,0xDB,0x0B,0x6F,0x21,0xB0,0xDC,0xB9,0xCB,0xB4,0x8E,0x77,0x37,0x02,0xFE,0x9D,0x03,0xEA,0xC5,0x90,0x5A,0xFE,0xEB,0x02,0xDA, + 0x30,0xDB,0xEC,0x02,0xDB,0x18,0x05,0xDB,0x51,0xB7,0x05,0xB3,0x39,0x06,0x33,0x80,0xDB,0x26,0x1C,0x1D,0x1D,0xCD,0x81,0xE3,0x00,0x23,0x95,0xC1,0xDC,0x0C,0xB7,0xA0, + 0xB7,0xE7,0x34,0x91,0x1C,0xD8,0xAE,0xC2,0xA1,0x86,0xBB,0x73,0x87,0x87,0xA0,0x62,0x73,0x83,0x9D,0x40,0xD9,0xA4,0x8A,0xD7,0x8A,0x83,0x4E,0x0B,0xE6,0xAB,0xA7,0x98, + 0x9C,0xC2,0x3F,0x40,0x8B,0xB7,0xBE,0x26,0x40,0x8E,0x9A,0x8F,0x4B,0x92,0x36,0xB6,0x48,0x47,0xA0,0xDB,0xC2,0xEC,0x30,0xDB,0x2B,0x10,0x05,0xB9,0x24,0x1F,0xDB,0x25, + 0xB4,0x8C,0xB9,0xA3,0x2F,0xBA,0x86,0xD9,0xB4,0x93,0xE2,0x9F,0x91,0x93,0x83,0x20,0xDB,0x2C,0x3C,0xDB,0x15,0x0E,0x80,0x69,0x48,0x01,0xDB,0x09,0xBC,0x00,0x39,0xDD, + 0x60,0x39,0xDA,0x5C,0xB0,0xDB,0x0B,0x2D,0x35,0x5E,0x52,0xB8,0x20,0xB1,0x97,0x22,0x9F,0xC3,0xDB,0xD4,0xA8,0x24,0x8B,0x49,0x4C,0x00,0x9F,0x97,0xB6,0x86,0xC2,0xC0, + 0xD5,0x90,0x9F,0x9B,0xE6,0x9F,0x61,0x57,0x62,0xAB,0xD4,0x9F,0xE0,0xE0,0x83,0x52,0x88,0x91,0x50,0xDA,0x5A,0xEE,0xEA,0xEF,0x7C,0xA4,0x8A,0xAC,0x91,0xDC,0xD3,0x7B, + 0x72,0x26,0xBE,0x4E,0xE9,0x59,0x53,0x93,0x0C,0x5B,0x4E,0xAD,0xD4,0x0B,0x81,0xD1,0x3A,0xF8,0xCA,0xCB,0xF2,0x05,0xDB,0xB5,0x90,0xCE,0xAF,0xB0,0x56,0xDD,0x14,0xE8, + 0xAE,0x40,0x03,0xBB,0xCA,0xCF,0xEA,0xA8,0x93,0x83,0x61,0xFB,0x40,0x68,0x83,0x7C,0x71,0xC0,0xE2,0x3B,0x38,0xC1,0xDC,0x14,0x8C,0x03,0x38,0x11,0x14,0xDB,0x30,0x00, + 0x2A,0x0A,0x0A,0x09,0x00,0x8B,0x2A,0x1E,0x30,0x36,0x26,0x36,0x36,0x05,0x2F,0x1A,0x2B,0x6D,0xD6,0x00,0xDC,0xDA,0xD8,0xC1,0xF3,0xE3,0x00,0x82,0x47,0xCE,0x7C,0x1B, + 0x27,0xD0,0xE0,0xDA,0x4C,0xC2,0xDA,0x49,0xA2,0x2C,0x73,0x2C,0xDA,0x2E,0x00,0xE7,0xA2,0x05,0x63,0xA6,0xD5,0x4F,0xD2,0x7D,0xB6,0x74,0x00,0xB9,0x5E,0x90,0x32,0x7B, + 0xC0,0xE4,0x07,0xDB,0x0B,0xAE,0x0C,0x8B,0xA2,0x56,0x00,0x6F,0xCF,0x13,0x84,0xDA,0xC1,0xE6,0x65,0xC8,0xF2,0x0A,0x00,0x15,0xDA,0x2A,0xE9,0x4E,0xD4,0xED,0x44,0x84, + 0xA0,0xD6,0x3C,0x84,0x89,0x04,0x03,0x89,0x78,0xA4,0x93,0x64,0x61,0xB7,0x3C,0x00,0x90,0x96,0x94,0x73,0x60,0x2C,0x42,0x0F,0xA2,0xB6,0xDF,0xCC,0x05,0x2C,0x09,0x04, + 0x00,0x09,0x05,0x34,0x2A,0x03,0x92,0xC0,0xD9,0x45,0x45,0x05,0x36,0x5D,0x2D,0x6D,0x6B,0x00,0xDB,0xDF,0xCF,0xAF,0x10,0x53,0x31,0x4F,0x50,0xDB,0x0D,0x4F,0xEC,0x49, + 0x53,0x97,0x03,0xDA,0x5D,0x12,0xDC,0x42,0x3C,0x81,0xDA,0x61,0x9D,0x6F,0xC9,0xA4,0x07,0x83,0xBC,0xEC,0xDB,0x16,0x70,0xDB,0x14,0xE8,0xB9,0xC3,0xF4,0x00,0xE2,0x0C, + 0x44,0xDB,0x2D,0xBE,0xE7,0xC5,0x7A,0xC6,0x7B,0xB0,0x7B,0xCE,0x09,0x82,0xD3,0xE7,0x0D,0x08,0x96,0x25,0xC3,0xDA,0x00,0xBC,0x06,0xB6,0xB2,0xAD,0x50,0x84,0xD6,0x7E, + 0x46,0xDE,0x18,0xA4,0x96,0xBD,0xA4,0x83,0xDB,0x0C,0xB7,0xB5,0x8F,0x1B,0x60,0xDC,0x0F,0x00,0x38,0xDB,0x0C,0xE0,0x37,0xC4,0xE6,0xA1,0x94,0x00,0x09,0xDA,0x19,0xB5, + 0x18,0x45,0x50,0xDB,0x05,0x27,0x5D,0xCD,0x5E,0x03,0xDB,0xD0,0xCE,0x71,0xAC,0x24,0x08,0x04,0xA1,0xDB,0x8E,0x82,0x00,0x07,0x0D,0x9F,0xAC,0xD8,0xD2,0xEC,0x5A,0x94, + 0x91,0x63,0xB9,0x29,0xB7,0x60,0xD5,0x3C,0xFB,0x03,0x00,0xF2,0x5B,0x88,0xBC,0xDA,0x24,0xB7,0x2F,0x04,0xD7,0xCC,0xDB,0x2C,0xB5,0xB9,0xAE,0x58,0x47,0xDB,0x4E,0xC5, + 0xF4,0xC5,0x0C,0xC1,0xDC,0x28,0xC7,0xAC,0xDA,0x39,0x00,0xC2,0xDB,0xE6,0x0A,0xD9,0x04,0xA2,0xE1,0xDB,0x5B,0x87,0xA3,0x97,0xBE,0xFD,0x2C,0xD4,0x30,0xD7,0xBA,0x00, + 0xDB,0x07,0x83,0x00,0x86,0xDC,0x76,0xDC,0xF0,0x00,0xDB,0x69,0xC8,0x8F,0x96,0xB3,0xF2,0xB8,0xE0,0x7D,0xBA,0xAE,0xF0,0xDA,0x0C,0x03,0xDA,0x28,0xB6,0xB0,0xDA,0xD9, + 0x00,0x45,0x04,0x46,0xCD,0xAA,0xF1,0x77,0xC8,0xB8,0x4C,0x1B,0x82,0x50,0xDB,0xA0,0xDC,0xF9,0xB5,0xC1,0x48,0x91,0xC0,0x12,0xBB,0xE7,0x7D,0x87,0xDB,0x69,0xAF,0x6A, + 0x80,0x00,0x91,0x45,0xA6,0x12,0xB6,0x80,0xAE,0x81,0x70,0xDB,0x58,0xB2,0xDB,0x53,0xD2,0x96,0x44,0x3F,0xAB,0x13,0x05,0xDB,0x15,0xC2,0xCA,0x9B,0x6F,0xAC,0x08,0xCB, + 0x2C,0xC5,0xAF,0xC4,0xB9,0x00,0xD2,0x8B,0xE6,0xA3,0x59,0x06,0x73,0xD9,0x92,0x4E,0xA1,0x3F,0x46,0x49,0xA3,0x9F,0x06,0xA6,0x9E,0x93,0xA9,0xF0,0x77,0xC9,0x31,0x2C, + 0x7F,0x00,0x42,0x42,0x7F,0x96,0xB2,0xDB,0x1B,0x02,0x11,0x00,0xB7,0xCC,0xA4,0x02,0x03,0xA1,0xDB,0x86,0xDA,0x04,0x63,0x76,0x9E,0x86,0x77,0xA7,0xCE,0x04,0xE2,0x97, + 0x53,0x1B,0x1B,0x12,0x38,0xCB,0x4F,0x4F,0x07,0x28,0x22,0xB0,0xDA,0x02,0xC6,0xE7,0xEE,0xEE,0x85,0xB8,0x68,0x41,0xDB,0x63,0xC7,0xB3,0xDC,0x68,0xD4,0x07,0xA6,0xB3, + 0xEC,0x83,0xBF,0xAC,0xB6,0xAD,0xF1,0x56,0xB2,0xF0,0xB8,0x8D,0x61,0xDA,0x92,0xB5,0x3F,0x50,0xAF,0x94,0xEC,0xD6,0x4E,0xB9,0x57,0xFD,0xF7,0x06,0x2A,0xF7,0xD0,0xDA, + 0x65,0x9F,0x25,0x09,0xBD,0xBF,0xD9,0x28,0xB4,0x5A,0xEF,0xC8,0xC9,0xF8,0xDB,0x50,0xD5,0x61,0xD6,0x7F,0x00,0xA9,0xFA,0x62,0x00,0x3C,0xB3,0xD6,0x02,0xBE,0xB7,0xE5, + 0xA1,0x11,0x61,0xDB,0x4F,0xC9,0x40,0xD8,0x05,0xEC,0x82,0x4B,0x03,0xB0,0xDB,0x59,0x45,0xBA,0x30,0x63,0xDC,0x1D,0xE9,0xEC,0x91,0x87,0x84,0xCF,0xD8,0x5B,0x0D,0x12, + 0x17,0xB7,0xAC,0x66,0x07,0x0D,0xB6,0x52,0x00,0xDA,0xDC,0xC8,0x60,0xCB,0xB6,0xC1,0xDC,0xDB,0x14,0x66,0xC8,0x3D,0xF2,0xA9,0x3C,0x90,0x31,0xD2,0xF6,0xD8,0xD1,0x92, + 0xA6,0x77,0x83,0x60,0xDB,0x89,0xE7,0xA3,0x91,0x4C,0xB5,0xB9,0x94,0x56,0x4E,0xAE,0x28,0x47,0xBA,0x12,0x6F,0x84,0xB5,0xA9,0x9B,0x3D,0x00,0x95,0xAF,0x84,0xDB,0xA1, + 0xFA,0x55,0x28,0x07,0x84,0xD4,0xBD,0xB4,0xD8,0x00,0xDB,0x4E,0xDA,0x0D,0x96,0xCA,0xDD,0x66,0xF5,0xE3,0xCA,0x83,0xD9,0x3B,0x02,0xD3,0x8F,0xDD,0x07,0x14,0xD6,0x94, + 0xDA,0x07,0x05,0x09,0x06,0x53,0xA6,0x76,0x86,0x3A,0x88,0xDB,0x00,0x27,0x63,0x65,0x9E,0x2C,0x95,0xE9,0xB8,0x88,0x98,0x53,0x24,0xDB,0x0F,0x89,0x6C,0xB6,0x8D,0xC2, + 0xC6,0x91,0x30,0xDA,0xCE,0x94,0xB0,0x61,0xDB,0x38,0x66,0x70,0xB9,0xD2,0x8B,0xAF,0x88,0xD0,0x7E,0x8B,0xFC,0xDD,0xC2,0xDB,0x8A,0xB6,0x98,0x04,0x7C,0xDC,0x30,0x7C, + 0xD7,0xC3,0xDB,0xEC,0x55,0x44,0xFD,0xE3,0x85,0xB2,0xE4,0xB6,0xA0,0xDC,0x4E,0xAF,0xEE,0x98,0xC6,0xAA,0x04,0x5C,0xF2,0xAB,0x04,0x27,0x93,0x16,0x07,0xB0,0xD6,0xAB, + 0x03,0xDC,0xC5,0x40,0x4C,0xED,0x84,0xB8,0x71,0xFF,0x99,0xC1,0x2A,0x6C,0xC1,0xDB,0x23,0xCD,0xA1,0x77,0xB5,0xD7,0x80,0x14,0x57,0x05,0x05,0x11,0xEF,0x02,0xB9,0x9A, + 0x06,0xED,0xA7,0x0A,0xDB,0x0C,0x00,0x5D,0x50,0xA4,0x94,0x03,0x29,0x65,0x85,0x95,0x91,0xA3,0xB8,0x21,0xB7,0x9A,0x0D,0x04,0x61,0xDB,0xF5,0xE1,0xBE,0xC8,0xB6,0x5A, + 0x90,0x19,0xC8,0x57,0x92,0xE1,0xD9,0xAB,0xEF,0x62,0xDB,0x0E,0x96,0x9B,0x66,0xCC,0xE1,0xD8,0x44,0xB8,0x83,0xAE,0xB8,0x5A,0x90,0x91,0x28,0xB2,0xD9,0x29,0xEA,0x41, + 0xA4,0xB2,0x96,0x89,0x37,0x65,0xB2,0x28,0xCB,0x58,0xC0,0x4A,0xC4,0xB2,0xCF,0x83,0x0C,0x39,0xBF,0x61,0xEC,0xC8,0x21,0xB7,0x97,0x18,0x3D,0xFB,0x49,0x00,0xF2,0xB7, + 0x44,0x89,0xB8,0x78,0xAB,0xEE,0x94,0xEB,0x5D,0x68,0x7C,0x91,0xB9,0x96,0x90,0x9D,0xAD,0xA2,0x92,0x3B,0xC1,0xDC,0x05,0x49,0x8F,0x45,0xB4,0x75,0x00,0x86,0x6A,0x2A, + 0x03,0xB4,0x94,0xC0,0xD7,0x27,0x27,0xA2,0xB7,0xA1,0x00,0x8C,0x4A,0x91,0x45,0xB8,0x56,0x87,0x12,0xAE,0xBE,0x21,0x08,0x1B,0xC2,0xBF,0xCB,0x22,0xF0,0x82,0xC8,0x7A, + 0x91,0x45,0x0E,0x27,0xEE,0x00,0x4B,0xEF,0x5F,0xA8,0xB2,0xDC,0x3B,0x81,0xDB,0x3C,0x85,0xDB,0x75,0xC6,0x70,0xC3,0xA6,0x74,0xB2,0xAA,0x00,0xFF,0x60,0x72,0xAD,0x96, + 0xA4,0x50,0x44,0xD7,0x2E,0xA2,0x03,0x81,0xBA,0x4E,0x38,0xDB,0x72,0x04,0x87,0xDB,0x14,0x2D,0x00,0x95,0xA5,0xAC,0xE1,0x93,0x9D,0x4B,0xE4,0x22,0xE8,0xD5,0x00,0x05, + 0xDA,0x72,0xB5,0xA4,0xD4,0xF0,0x94,0x7C,0x90,0xDB,0x33,0x06,0x66,0x2C,0xDC,0x67,0x3B,0x7C,0x87,0xDA,0x00,0xAE,0xEE,0x91,0x97,0xB6,0xD6,0xDF,0x1E,0x04,0xD7,0x14, + 0x00,0x1E,0x4A,0x26,0xDB,0x1D,0x00,0x81,0xDB,0x9E,0x58,0x65,0xB8,0x5D,0xC0,0x23,0xAC,0xC3,0xC0,0xDB,0x1B,0x1A,0xAC,0xA7,0xD7,0x92,0x5A,0x91,0x72,0x5D,0x85,0xDB, + 0x4A,0xA8,0x3C,0xD2,0x9B,0x97,0xF2,0xF0,0x55,0x80,0x4F,0xA8,0x03,0xA6,0x98,0xEB,0xB6,0xDB,0x17,0xDD,0x0D,0x72,0x93,0x0B,0x37,0x55,0x96,0x2A,0xCE,0xAC,0xB5,0x2C, + 0xBB,0x2C,0xC6,0x27,0xBB,0xC9,0xF9,0x00,0x13,0x4A,0xCC,0xC2,0xFB,0xC2,0xD5,0xD1,0x8D,0x44,0x5C,0x00,0xA4,0xE1,0xD9,0xE9,0x01,0x93,0x87,0xD3,0xCF,0x8B,0x71,0x02, + 0xA7,0xCD,0x69,0x73,0x8F,0x6F,0xC8,0x6B,0xEE,0xDE,0x81,0x00,0x11,0xB0,0xD6,0xB2,0xBB,0xA0,0xDB,0x3C,0x1E,0x13,0x00,0xDB,0x2D,0x95,0x24,0xD9,0x00,0x29,0x29,0x93, + 0x85,0x2D,0x4A,0xA0,0xF1,0x54,0x22,0xB5,0x55,0x02,0x0E,0x80,0xDB,0x53,0x82,0xD7,0x64,0xCA,0xB6,0xEA,0xC1,0xDA,0x38,0x20,0xDB,0x1D,0x60,0x3C,0x00,0x3F,0xD1,0x93, + 0x58,0xD7,0x5A,0x93,0x52,0xED,0xD5,0x84,0xE9,0x95,0xF2,0xBB,0x70,0x60,0xDB,0x56,0x72,0xDD,0x51,0xB9,0x61,0xDF,0xE1,0x03,0xDA,0x3B,0xA0,0xAD,0x55,0xA6,0x27,0xD8, + 0x09,0x6A,0xE8,0x4E,0x03,0x0B,0xA5,0x16,0xB0,0x2B,0xDA,0x07,0x40,0x02,0xBA,0x05,0x56,0x00,0xDF,0xCA,0xB2,0x2E,0xF2,0xF0,0xDA,0x93,0x03,0xF9,0xBF,0x77,0xDB,0x07, + 0x48,0xD6,0x82,0x48,0x23,0x57,0xA9,0xFC,0x05,0x2A,0x92,0x29,0x06,0xCC,0xF0,0xDB,0x57,0x30,0xBB,0x6B,0x00,0x36,0xDB,0x05,0x29,0x00,0xDA,0x18,0x29,0x8D,0x2C,0x58, + 0x3D,0xB8,0x99,0x5B,0xB2,0x5D,0x88,0xA1,0x08,0xC5,0xF0,0x28,0xC1,0xA7,0xDA,0x05,0xE7,0xDE,0x7F,0x62,0x59,0xB9,0x42,0xC9,0xAD,0x3C,0xAD,0xF2,0x86,0xDA,0xDB,0x09, + 0x62,0x16,0xEF,0xA8,0x04,0xD9,0x32,0xB4,0xC3,0xDC,0xDA,0x0A,0x00,0x57,0xAD,0xC9,0xF6,0x83,0x40,0xC1,0xD8,0x86,0x61,0xDC,0x20,0xBF,0x5A,0xC3,0xC8,0xB0,0xF6,0xA0, + 0x52,0x4B,0x13,0x17,0x25,0x0D,0xF3,0x06,0x04,0x87,0xDA,0x00,0x47,0x04,0xBE,0x84,0x02,0x5D,0xB1,0xB5,0xD2,0x56,0x00,0xD1,0x85,0x73,0x66,0x73,0x87,0x56,0x9F,0xEA, + 0xBA,0xEB,0xFC,0xB0,0x42,0xC2,0xDB,0x44,0x91,0xB2,0xB4,0xA2,0xBB,0x50,0x2A,0xDB,0x61,0x00,0x26,0x30,0x5C,0x26,0x48,0x94,0x29,0xB0,0x00,0x18,0x28,0x18,0x85,0x5A, + 0x79,0xF1,0x92,0x97,0x22,0x02,0xDB,0x07,0x1C,0xA7,0x9E,0xA4,0x64,0xFF,0xA6,0x7F,0x59,0x38,0x94,0xDB,0x29,0x8E,0x29,0xFF,0x3D,0xCB,0xA2,0xC0,0xA0,0xDB,0x1B,0x61, + 0x68,0x61,0xC3,0xEE,0xC6,0x96,0x94,0xDB,0x18,0x96,0xDB,0x58,0xDA,0x50,0xFD,0x93,0x86,0x86,0x05,0xDB,0x9D,0xEC,0x05,0xDB,0x4F,0x9A,0xF0,0xF7,0x0A,0x35,0x00,0x17, + 0xB2,0x0D,0x52,0x1B,0x3C,0xBD,0x60,0xDB,0x32,0x84,0x40,0xBE,0x72,0x8A,0xB6,0xF1,0xD7,0x66,0x28,0xD9,0x45,0x02,0xDB,0x57,0xD6,0xEE,0x4E,0xB5,0xC9,0x06,0x39,0x2A, + 0x00,0xDA,0x26,0x5C,0x8C,0xDB,0x00,0x65,0x8D,0x3D,0xB4,0x01,0xDF,0xCF,0xAF,0x4C,0x7A,0x7A,0x08,0x0F,0x4A,0xA7,0x53,0xB3,0xDB,0x91,0x42,0x8E,0xC8,0x8E,0x8C,0x83, + 0xDB,0x8A,0xAB,0xE1,0xC5,0x3C,0x22,0x98,0x68,0xD2,0x9A,0x97,0xEF,0x07,0x61,0x83,0xDB,0x47,0xC1,0x30,0xDB,0x05,0x96,0x72,0x89,0xBE,0x1D,0xD8,0x3D,0x90,0x14,0xB7, + 0xA5,0xB3,0x6F,0xA0,0x98,0xFA,0xED,0xED,0xA2,0x9C,0xFB,0xE7,0xDB,0x0B,0x0B,0xCA,0xDE,0xE5,0x2D,0x9D,0x9C,0x8E,0x6C,0xDC,0x28,0xDB,0x36,0x00,0x72,0xE7,0xAC,0x7D, + 0xDB,0x2E,0xB5,0x28,0xD9,0x35,0x87,0x7C,0x83,0x6A,0x7B,0xE0,0xDB,0x11,0xE8,0x00,0xD9,0x1C,0x03,0xA0,0xE4,0xB6,0x0A,0x50,0x13,0xDA,0x6B,0xED,0x60,0xDB,0x5D,0x4A, + 0x63,0xDB,0x14,0x00,0x28,0x0E,0x79,0x77,0xBD,0xDA,0x86,0xDF,0x24,0x9A,0x64,0xB6,0x12,0x86,0xC3,0xDB,0x80,0xB0,0xCA,0xC6,0xEB,0x6D,0x1F,0x16,0x7F,0x8B,0x51,0x59, + 0xD5,0x60,0xE6,0xD8,0xDB,0x6E,0xCF,0x3B,0xA5,0xEF,0xB2,0xB7,0xD7,0xEC,0xBD,0x3C,0xD0,0x04,0x7B,0x88,0x90,0x40,0xDB,0x2C,0x40,0xB3,0x2D,0xB9,0x66,0xA1,0x2E,0x0C, + 0xD7,0xFA,0xDA,0x0C,0xDB,0x0F,0xBA,0xBA,0x14,0x01,0x96,0x00,0x90,0x8B,0x37,0xBA,0xEC,0x0D,0xDB,0x2D,0xBD,0x37,0xC2,0x9C,0xDB,0x34,0x92,0x6B,0x89,0x01,0x7B,0xDB, + 0x07,0x74,0x65,0x96,0xB9,0xDB,0x1A,0x84,0xE2,0x07,0x42,0x38,0x23,0xE4,0xA3,0x7F,0x42,0x57,0x8B,0xB8,0x79,0xE3,0x41,0xDC,0x2C,0xA2,0xD3,0xC8,0xD0,0xDB,0x28,0x26, + 0xDB,0x12,0x27,0x85,0xDB,0x90,0xB9,0x5A,0xBC,0x77,0xD1,0x94,0xA8,0xA6,0x94,0xDB,0x02,0x08,0x4F,0x12,0x15,0x9F,0x9C,0x1A,0x4F,0x07,0x39,0x02,0xF0,0xA4,0xC0,0xDB, + 0xEA,0xB3,0x1B,0x8B,0x8B,0x05,0x52,0x48,0x00,0xDF,0xCD,0x8F,0x4F,0x6B,0x6C,0xED,0x02,0xF0,0x7E,0x79,0x00,0x9D,0xD3,0x70,0x4A,0x00,0x8A,0xB9,0xEE,0xA1,0x6B,0xE8, + 0x74,0x94,0xB5,0xED,0xC2,0xDB,0xA4,0x00,0x95,0x4B,0x90,0x2B,0x00,0x98,0xD2,0x2E,0x07,0x4A,0x0B,0xFF,0x5C,0xEB,0x28,0xCC,0x2C,0xB1,0x95,0x37,0xD2,0x34,0xE9,0x5B, + 0xC3,0xD1,0x33,0x56,0x89,0xB5,0x46,0x84,0x04,0x94,0x25,0x8D,0x24,0x95,0x8D,0xDD,0xBE,0xC8,0x02,0x57,0xA9,0xA0,0x76,0x14,0x00,0x92,0x80,0x8B,0xDC,0x87,0xE5,0x0A, + 0x4A,0x0A,0xDA,0x19,0xB6,0x5C,0xA3,0xA9,0x45,0x03,0x27,0x29,0xB5,0x56,0x04,0xDB,0x00,0x5A,0x79,0xE3,0xBD,0xCF,0x19,0x82,0x5B,0x31,0xB5,0x10,0x08,0x7A,0xA0,0xDB, + 0x2C,0x31,0xDB,0x0F,0x7A,0xC1,0xDB,0x02,0xCA,0xBB,0xDE,0xB3,0xB7,0xB1,0x5A,0xAA,0x82,0xB9,0xA9,0xFB,0x6E,0x86,0xA4,0x93,0xF7,0x00,0xC5,0x74,0x61,0x02,0x93,0x94, + 0xDA,0x14,0x9E,0xAA,0x8A,0xDB,0x0E,0xDE,0x14,0x70,0xCA,0xF8,0xA0,0x5D,0xC7,0x58,0xDB,0x79,0x00,0x9A,0x4E,0x9B,0x49,0xBA,0x8E,0xF9,0x60,0xE7,0xA5,0xFE,0xDE,0xEF, + 0x89,0xA6,0xBA,0x56,0x14,0x83,0x3F,0x25,0x33,0x5E,0x00,0x04,0xDB,0x03,0x7B,0x89,0x89,0x93,0x4A,0xDB,0x0B,0x95,0x4A,0xCA,0x19,0x00,0xDE,0x7F,0x48,0xB2,0xAF,0x50, + 0x57,0xDE,0x60,0xDC,0xE5,0x09,0xC8,0x8B,0x0A,0x06,0x82,0xDA,0x4A,0xFF,0x5E,0x45,0xDF,0x25,0x63,0xDB,0x0A,0x92,0x46,0x4D,0xB8,0x40,0xA0,0xB4,0xDA,0xA5,0x5B,0x10, + 0x0D,0x07,0x4F,0xB0,0xDB,0x36,0x12,0x8A,0xC0,0xDB,0x22,0x82,0xC0,0xDA,0xC0,0xEB,0x0C,0x15,0x39,0x06,0x11,0xB9,0x96,0x57,0xDB,0x1A,0xFB,0x12,0x61,0x60,0xCA,0xA9, + 0x3B,0x40,0xE2,0x3C,0x80,0x68,0x05,0xE0,0x6D,0x00,0x7C,0x20,0xDB,0x14,0x7C,0xAD,0xDB,0x16,0xA7,0x14,0xDA,0x14,0xC3,0x1A,0x85,0x6F,0x02,0x86,0x00,0x06,0xF4,0x05, + 0x02,0x3F,0xF9,0xC3,0x7A,0x00,0xA1,0x69,0x93,0x69,0x84,0x7D,0x15,0x23,0xA4,0x90,0xA1,0xDC,0x87,0xDB,0xD0,0x81,0x94,0x78,0x94,0x7D,0x41,0xDB,0x4F,0xC6,0x51,0x61, + 0xA1,0xDB,0x8F,0xE2,0x07,0x86,0x8A,0x91,0x94,0xDB,0x09,0x1E,0x02,0xDB,0xFA,0xB8,0xB2,0xDD,0x60,0xDB,0x78,0x28,0x01,0x00,0x5A,0x4D,0xB5,0x0D,0xB6,0xA3,0xDF,0xD7, + 0x94,0x10,0x4F,0xB8,0xDB,0x34,0x02,0xAD,0x1A,0x12,0x07,0x53,0xED,0xD2,0x92,0x38,0x25,0x93,0x35,0x11,0xC8,0x58,0x38,0x03,0xDC,0x7F,0xFB,0x47,0x60,0x6A,0x82,0xE3, + 0x48,0xC2,0xE4,0xAE,0x79,0x8C,0xF7,0xD0,0xAA,0x00,0xDC,0x09,0x03,0xDB,0x97,0x49,0x03,0xDB,0x01,0xE4,0x02,0xC2,0x5A,0x02,0xBA,0x08,0x06,0x52,0xBA,0xD5,0xD8,0xE9, + 0x4D,0x0D,0x2C,0x99,0xA9,0x56,0xB8,0x0B,0x3F,0xBA,0x8B,0x19,0x43,0xDC,0x8E,0x42,0x72,0x94,0xB1,0xD3,0x7D,0x77,0x80,0x73,0xA1,0xB7,0xDA,0x6E,0x5E,0xB0,0x0E,0xEC, + 0x7B,0xB9,0xD4,0x57,0xB5,0x57,0xBB,0xD8,0xDB,0x6F,0xCB,0xDC,0x00,0xA4,0xF5,0xFE,0x20,0xDB,0x25,0x27,0x93,0x4B,0xD8,0x00,0x6A,0x6A,0x4D,0x59,0x3E,0x4D,0xD9,0xBF, + 0xD1,0x94,0x4C,0xAC,0xED,0x30,0xDB,0x19,0x03,0x07,0xAC,0xDF,0x80,0xA5,0x25,0xDE,0x33,0x01,0xDB,0xDC,0xC8,0xD0,0x58,0xDC,0x35,0x7F,0x6B,0x7F,0x0A,0x6A,0x3B,0x23, + 0xDC,0xC2,0x8A,0xD6,0x15,0x23,0x21,0x9B,0x80,0x62,0x59,0xE8,0x20,0xDB,0x66,0xCF,0x7C,0x6A,0x78,0x04,0x84,0xB1,0x05,0x44,0x84,0xDC,0xC1,0xDA,0x20,0xCD,0x76,0x0D, + 0xA1,0x56,0xE1,0xB7,0xE7,0x5C,0x00,0xD5,0x15,0x29,0x41,0xEF,0x41,0xD3,0x27,0x2D,0x06,0xBA,0xC6,0x78,0x50,0xD8,0xFB,0x00,0x5F,0xDB,0x0C,0xC1,0x68,0xDA,0x2B,0xB6, + 0x92,0x0F,0x63,0x00,0xE0,0x4C,0xF7,0x05,0xC1,0xDA,0x04,0x4A,0xEF,0x0A,0xCA,0xB7,0x70,0xDB,0x61,0x27,0xDB,0x65,0xB6,0x6B,0xEA,0x58,0x00,0xDB,0x0C,0x59,0xD9,0xE4, + 0xB8,0xBE,0xBE,0x7C,0x31,0xBA,0x02,0x86,0x00,0xDB,0x24,0xB0,0x61,0xD7,0xDA,0xA3,0x92,0x0A,0xF2,0x95,0x8B,0x86,0xDB,0xDC,0x07,0x57,0x7F,0x00,0x60,0xDB,0x23,0xA0, + 0xDB,0x63,0x70,0xD7,0xF2,0xB8,0x42,0xF9,0xC6,0x80,0x82,0x81,0x62,0xC3,0xDB,0xA7,0x57,0x78,0xE8,0x94,0xF0,0xB4,0x84,0x56,0x9A,0xF6,0x89,0x5C,0x06,0xDF,0x00,0x13, + 0x0B,0x65,0xB5,0x3D,0x0F,0xF7,0x12,0x13,0x00,0x2A,0x8C,0x5A,0xB9,0x50,0xDB,0x18,0x89,0xD5,0xDB,0x51,0xB1,0x2C,0x73,0xB6,0xAC,0xDB,0x33,0xA6,0xE4,0x03,0xDB,0x0C, + 0xD2,0x35,0x02,0x05,0xCD,0xA2,0x75,0xB5,0x03,0xD7,0x0A,0x02,0xF9,0xB8,0x13,0x49,0x92,0x68,0x93,0x50,0x8B,0xDB,0x02,0x4D,0x4D,0x83,0xDC,0x94,0x40,0xE4,0xB9,0xCA, + 0x97,0x42,0x24,0xC0,0xDB,0x02,0xDF,0xCA,0xF2,0x52,0x4C,0x8F,0xAC,0x80,0xEA,0x0C,0xAB,0xC9,0x0A,0xE5,0xEE,0xE5,0x8B,0xCD,0x7A,0xD8,0x07,0x0E,0x6A,0xD7,0x8F,0xEA, + 0x9F,0x78,0x9E,0x56,0x93,0x9D,0x00,0x2F,0xF1,0xAB,0x56,0x93,0x8A,0x96,0x83,0x75,0x96,0x86,0xDB,0x84,0x4A,0x37,0x9B,0x75,0x56,0x87,0xB3,0x02,0x36,0x00,0xCD,0x5C, + 0x0B,0xF6,0x00,0x0F,0xBE,0x92,0x15,0x67,0x0C,0xBF,0x08,0x28,0xDB,0x6A,0x40,0x72,0xDB,0x0C,0x59,0x73,0x7D,0x52,0x73,0x91,0x58,0xD8,0x59,0xB7,0x6B,0x81,0x4F,0xC2, + 0x41,0xDB,0x4B,0xEC,0xA6,0x90,0xE7,0x2D,0x04,0xE9,0x55,0x03,0x02,0xA9,0x00,0x13,0xC9,0xFB,0x00,0x91,0x4D,0x00,0x63,0x3A,0x93,0x50,0xDB,0x61,0x03,0xD4,0xB8,0xB6, + 0x77,0xB8,0xCD,0x53,0x08,0x1B,0x85,0x01,0xDB,0x7A,0x8D,0x00,0x12,0x4F,0x5B,0xEE,0x72,0xB6,0x30,0x6D,0x34,0xDB,0x28,0x4B,0xDE,0xDB,0x2A,0x85,0xC2,0x7F,0xC8,0x3B, + 0x48,0xD3,0xFF,0xEE,0xBA,0x72,0x91,0xD1,0xF0,0xDE,0x79,0x61,0xE4,0x61,0xDA,0xC8,0x00,0xDB,0x0C,0x94,0xDB,0x35,0x06,0x56,0x66,0xC9,0xA8,0x12,0x16,0x99,0x89,0x5D, + 0x00,0x1F,0xE9,0x19,0xC5,0x05,0x85,0xCD,0x1D,0xFD,0xDD,0x0F,0x23,0x2C,0x1E,0xBF,0xB6,0xA6,0xDB,0x02,0x94,0x71,0x92,0x8C,0xC1,0xDB,0xDC,0x41,0xD7,0x4C,0x00,0xC8, + 0xCF,0x6B,0xB5,0xA9,0x8F,0x69,0xC7,0xF3,0x02,0x09,0x05,0xB2,0x25,0x09,0xCA,0xA1,0x13,0x81,0xDC,0x30,0x61,0xD9,0x30,0xDB,0x4E,0xCB,0xED,0x5A,0x90,0x2C,0xDB,0x06, + 0xD9,0xB8,0xE4,0x94,0x82,0x4C,0x1B,0x0D,0x15,0xB7,0x2E,0x9C,0xEA,0xA5,0x40,0xCC,0xCA,0x99,0xEB,0x8E,0x2A,0xC8,0xB6,0x39,0xE5,0x0C,0xE5,0x39,0x09,0x0F,0x65,0xC8, + 0xDC,0xC3,0xD6,0xC2,0xE2,0x2C,0x7F,0x9F,0xD5,0xD9,0x0D,0x98,0x32,0xB3,0xB7,0xCB,0xC2,0xDD,0xC8,0xB8,0x90,0x66,0xDE,0xC7,0xAB,0xBB,0xBD,0x2E,0xA9,0x73,0xD8,0x48, + 0xD3,0xC3,0xB8,0xD2,0x61,0xBB,0x92,0x87,0x94,0x81,0x00,0x96,0x7B,0xD5,0xD5,0x72,0x56,0x00,0xE8,0x19,0xA5,0x2A,0xBF,0x1B,0xAE,0x02,0x0B,0xAA,0x00,0x13,0x8A,0xB7, + 0x5A,0xFF,0xEC,0x2D,0xDB,0x28,0xB7,0xBC,0x03,0xD4,0x2B,0xC9,0x76,0xD7,0x74,0x0E,0x00,0x91,0x98,0xDA,0x3D,0x8B,0x00,0xC7,0xE9,0x94,0x37,0xC7,0x51,0x0A,0xB4,0x57, + 0xB4,0x61,0xDB,0xA4,0x03,0x5C,0xDE,0xC2,0x63,0x63,0x80,0xDC,0x2F,0x27,0xA0,0xD9,0x91,0x93,0x2A,0x02,0x90,0x94,0xD9,0xB6,0x1D,0xB4,0xE2,0x9A,0x85,0xA1,0x08,0x40, + 0xDB,0xA7,0xC9,0x60,0x53,0xDB,0xC5,0x0C,0x76,0xEA,0x16,0x2A,0x00,0x39,0x8B,0xC0,0xDB,0x04,0x05,0x03,0x14,0x7F,0xDC,0x73,0x2C,0x48,0x05,0xAA,0x91,0xD3,0x99,0xD1, + 0x05,0x2C,0xD6,0x9C,0x80,0x16,0xDB,0x16,0xBB,0x42,0x66,0x71,0x78,0x83,0xC8,0x94,0x4B,0xC1,0x09,0x8B,0x99,0x08,0xEC,0x00,0xD2,0x1D,0x78,0x00,0xBD,0xA5,0x3F,0x19, + 0xD5,0x02,0x03,0x00,0xF9,0x03,0x06,0xEC,0x00,0xF2,0x30,0xEE,0xAF,0x02,0x03,0x22,0xF9,0x00,0xA6,0xA5,0xE8,0xC3,0xDB,0xDA,0x0E,0x66,0xFB,0x60,0x69,0xC8,0x7C,0xDC, + 0x18,0x8B,0xD8,0xFF,0xBF,0x4B,0x00,0x09,0xC6,0x7C,0xDA,0x2E,0x00,0xF9,0xB9,0x45,0x22,0x8D,0x58,0xDD,0x51,0xB8,0x48,0x91,0x9C,0xA4,0xDB,0x00,0xB5,0x94,0x40,0xA3, + 0xCF,0x98,0x24,0x21,0x07,0x07,0x60,0xDB,0x6A,0x4F,0xEE,0xD7,0x68,0xC5,0x92,0x16,0xF2,0x4E,0xB9,0x7F,0x06,0x58,0x03,0xD9,0x63,0xC8,0x73,0x23,0x69,0xA7,0xD0,0xC5, + 0xCC,0xC8,0x47,0xB1,0x61,0xDB,0x79,0x80,0x40,0xDC,0x62,0xA2,0xB9,0xC1,0xDC,0x96,0x54,0x00,0x9E,0x0B,0xA4,0xC0,0x09,0x51,0x8A,0x84,0x74,0x08,0x8E,0x57,0x00,0xE5, + 0xB6,0x86,0xE5,0xB3,0x97,0x0D,0xCD,0x21,0x00,0x7A,0x18,0x0D,0xD5,0x5B,0x00,0x19,0x69,0x71,0x8C,0xB1,0xCA,0x83,0x73,0x6F,0xC2,0xAD,0xE8,0x25,0x8F,0xBD,0xC7,0x2B, + 0xE8,0xC8,0x00,0x35,0x8B,0x06,0x00,0x04,0x3D,0xC6,0x04,0xDC,0xA1,0xD9,0x61,0xDA,0x69,0x8D,0x36,0x00,0xB8,0x52,0x86,0xDB,0x95,0x94,0xDB,0x0D,0xBC,0x94,0x1A,0xE6, + 0xF0,0xC2,0xE0,0xDB,0x4F,0x6A,0x0D,0xEE,0xD2,0xC0,0xDB,0x35,0x25,0x78,0x2A,0x4F,0xDE,0x7E,0x5F,0x60,0xDB,0x1F,0x92,0xF4,0x65,0xDB,0x19,0xB8,0x52,0x99,0x5E,0x7C, + 0xDC,0x0A,0x61,0x00,0x90,0xDE,0x19,0x74,0xBA,0x28,0x73,0xDC,0x2C,0xBB,0xBF,0xD9,0xAE,0x07,0x08,0xCB,0x92,0xC8,0x0E,0x0F,0x42,0xB8,0xAC,0xB4,0xD9,0x00,0x70,0x93, + 0x1A,0x94,0x7C,0x1B,0x7C,0x8A,0xDD,0xAE,0x1B,0x17,0x50,0xF5,0xAB,0x2B,0xDE,0x0B,0x27,0xD1,0x92,0x73,0x8E,0xB6,0xB8,0x58,0xDF,0x56,0xD7,0x7B,0xCD,0xA9,0x6A,0x48, + 0xEC,0x6F,0x7B,0x79,0xCB,0xB7,0x9B,0x5C,0xDA,0x25,0x00,0xB0,0xDA,0x2E,0x26,0x30,0xA3,0x67,0xDB,0x0C,0xBC,0xA5,0xDB,0x0B,0x01,0x50,0x59,0xDD,0x52,0xF0,0x88,0xBD, + 0xA8,0x5B,0x60,0xDB,0x0C,0x24,0xAC,0xDB,0x01,0x99,0xEA,0x2B,0x3A,0x04,0x60,0xDB,0x05,0xB6,0xC9,0x6B,0x06,0xF7,0xA8,0x06,0x57,0xDB,0x0E,0x57,0x0F,0xA9,0x6A,0xBE, + 0x3C,0xE7,0x5D,0x3B,0xA6,0x5F,0xBA,0xD0,0xDC,0x1A,0x61,0x87,0xF2,0xB0,0x7B,0xD8,0x15,0x96,0x7D,0x7C,0xA1,0x9A,0xF8,0xD9,0xA5,0x35,0x94,0x06,0x7C,0x7B,0xE6,0x78, + 0xE2,0x77,0x7D,0xC7,0x2B,0x70,0xD7,0xAF,0xBD,0x24,0x00,0xD2,0xBF,0xF5,0x14,0x00,0x7B,0x4F,0x24,0x00,0x75,0x0A,0x28,0x41,0xDB,0x9F,0x49,0xDC,0xDC,0x58,0x60,0x8B, + 0xBC,0xC8,0x92,0xAE,0x76,0xCE,0x00,0x8B,0x39,0x00,0xBA,0xB0,0x45,0xEC,0xE4,0x00,0xB6,0x2E,0xFF,0xAD,0xED,0x6D,0x8C,0x26,0x00,0x99,0xEF,0x72,0xB5,0xBC,0xE1,0xC0, + 0xDB,0xB9,0xE2,0x42,0xAC,0xA1,0xDB,0xD8,0x82,0x1B,0x53,0xB0,0x2C,0xCC,0xC2,0xDB,0x14,0x2A,0x93,0x8C,0x04,0x8E,0xF0,0xDD,0xA6,0x03,0x8B,0xF9,0x8F,0x57,0x00,0x04, + 0x79,0x14,0xE2,0x4C,0xE7,0x48,0xFB,0x04,0x7E,0xB5,0x2D,0xD1,0xE8,0xDC,0x3F,0xC3,0x61,0x83,0xDB,0x41,0xCC,0xAB,0xAC,0x87,0x00,0xB0,0xE7,0xB5,0xBB,0xD9,0x0C,0x7D, + 0xA5,0x79,0x00,0xB3,0x65,0xB0,0x41,0xD6,0xCF,0xCC,0x04,0x7E,0x12,0x00,0xD6,0x1F,0x12,0x05,0x43,0x81,0x2A,0xAE,0x73,0x23,0x55,0x07,0x1F,0x4E,0x9C,0xDB,0x15,0x82, + 0x75,0xC6,0xB9,0xA0,0xF9,0x6B,0xB6,0x5A,0xE7,0xB4,0x06,0x8A,0x54,0x06,0xA0,0xA4,0x04,0xEB,0x5B,0x03,0xDE,0xC8,0xEE,0x81,0xF2,0xDC,0x42,0xB5,0xB9,0xA4,0xD1,0x00, + 0x6A,0x00,0xDB,0xD4,0xB5,0xF0,0x10,0x97,0x1B,0x4F,0xB0,0xDB,0x1F,0x4C,0xAF,0xB9,0x14,0x99,0x6D,0xDB,0x18,0xB1,0xBD,0x2A,0x57,0xEE,0x5E,0x06,0x61,0xBF,0x39,0x6A, + 0x8B,0x57,0xDB,0x8D,0x0F,0xB2,0x2E,0x78,0x82,0xDB,0x95,0x7D,0x3B,0xCE,0x17,0x00,0x6C,0x06,0x61,0xB2,0x30,0xAF,0xC3,0xD9,0xE3,0x8A,0xC9,0x27,0x87,0x0B,0x41,0xDA, + 0xC6,0xF2,0xC8,0x0A,0x71,0xDC,0x0A,0x03,0x74,0x7C,0x0D,0xBC,0x58,0xD1,0x57,0x99,0x77,0x12,0x00,0x7F,0xFF,0xDF,0x0C,0x1F,0x00,0x77,0x03,0x00,0xF5,0x15,0x25,0xB2, + 0xD8,0xDA,0x50,0xE2,0x52,0x8F,0x58,0xC7,0xD8,0xDA,0x51,0x7E,0x0A,0x04,0x56,0x03,0xB7,0x52,0xB8,0xC6,0x13,0x3A,0x33,0x74,0x26,0xFF,0x36,0x60,0x50,0xDB,0x5D,0xA0, + 0xDC,0x73,0x27,0x03,0x04,0xDB,0x81,0xD8,0xF6,0x02,0x85,0x79,0xC0,0xDB,0xDA,0xAF,0x42,0x24,0xC0,0xDB,0x0D,0x00,0x4C,0xA5,0xCA,0xC0,0x76,0x20,0x2B,0x34,0x18,0x4B, + 0xE5,0xB3,0xDB,0x56,0x59,0xCB,0xFD,0x66,0x86,0xDF,0xCB,0x38,0xE1,0x1D,0x42,0x8B,0x75,0xB1,0xE8,0x0E,0x68,0x5A,0x00,0x99,0x65,0xBF,0x53,0xAF,0x58,0xEC,0x73,0x35, + 0xE7,0x66,0xA9,0x3A,0x87,0x62,0x0B,0xD0,0xEC,0x9E,0x28,0xA6,0x15,0x61,0xBE,0x34,0x94,0x98,0xDC,0x51,0x90,0x57,0xEE,0x59,0xB1,0x52,0x98,0x69,0xB5,0x20,0xC4,0x79, + 0x0E,0x9F,0x32,0x2C,0xA3,0xEB,0x28,0x22,0x0F,0x8A,0xDB,0x0E,0xEA,0xC0,0x73,0xEE,0xEE,0xC8,0x57,0x38,0xEC,0x5F,0xDA,0x3C,0x74,0xDA,0x3B,0x7E,0x00,0xE6,0x06,0xDB, + 0x0D,0x90,0x06,0x5C,0x4B,0x3A,0xD8,0x16,0xB5,0x52,0xAC,0xEE,0xC1,0xDB,0x69,0x93,0x61,0xDB,0xD0,0x02,0xDB,0x3E,0xE4,0xBD,0x85,0x40,0xDB,0x4F,0x07,0xD7,0xEE,0x81, + 0xB0,0x99,0x75,0x6D,0x8E,0x07,0x1F,0x3A,0xDE,0xDE,0x2A,0x56,0xAB,0x63,0x09,0x65,0x01,0xED,0x02,0xDC,0xA9,0xD2,0xFF,0x78,0xCF,0x72,0xB7,0xA2,0xAE,0xD1,0x95,0x80, + 0x41,0xDE,0x85,0xDD,0x67,0x8D,0x0E,0xA5,0xA4,0x3D,0xDE,0x5B,0x0A,0x81,0x5F,0x00,0x05,0xBD,0xE1,0x85,0xD8,0x59,0x0A,0xEB,0x95,0x83,0x3C,0x05,0x53,0x86,0xAE,0xEF, + 0xCA,0x54,0x9F,0x5F,0x0D,0x3E,0xAC,0x14,0x66,0xE2,0x95,0x71,0x24,0x54,0x04,0xD5,0x45,0x87,0x7F,0x25,0xF8,0x56,0xF2,0xE3,0xBE,0xCF,0xF8,0x0A,0xD1,0xD4,0x9E,0xB9, + 0x03,0x7F,0x27,0xA3,0xDB,0x0B,0xEC,0x5A,0xE9,0x5F,0x00,0x04,0x5C,0x45,0x00,0xAA,0xEF,0x27,0x30,0x2F,0x5D,0xDB,0xF0,0x01,0xD9,0x57,0x28,0xBB,0x5E,0x00,0xB7,0x42, + 0xB5,0xA0,0xA3,0xA6,0xA8,0x16,0xDB,0x01,0x22,0xB0,0xD7,0x40,0xDB,0x17,0x64,0x0C,0xFD,0x8E,0x7A,0x8E,0xA8,0x04,0xB0,0xD8,0xB0,0xD9,0xF0,0x00,0xD7,0xB9,0x03,0x80, + 0xDB,0x23,0x3C,0xA0,0xAD,0xC1,0xCA,0x68,0xBA,0x08,0x42,0x05,0x04,0xE8,0x03,0xC1,0xBD,0x09,0x06,0x42,0x5E,0x00,0x19,0x1A,0x60,0xB9,0xBD,0xE6,0xA1,0xC3,0xE6,0x0D, + 0xB0,0xEB,0xCB,0xBE,0x02,0xB0,0xDB,0xCA,0xC7,0xF3,0xC0,0x2B,0xB2,0xB9,0xB7,0xDD,0xB2,0xB2,0xE4,0x05,0xDB,0x07,0x48,0x3A,0x69,0x8C,0xED,0xC9,0x1E,0xA2,0xA7,0x74, + 0xD7,0x0B,0x04,0xB8,0x2C,0xB2,0xAA,0x80,0xEE,0xA4,0x6C,0xDB,0x1C,0x36,0x01,0x50,0xDB,0x2B,0x5D,0xBA,0x8A,0x28,0x18,0x92,0x4E,0x01,0x4B,0x84,0xCD,0x00,0xB5,0xD4, + 0x93,0x04,0xE6,0xB7,0x4C,0x28,0xDB,0x0A,0x07,0xB9,0xEB,0xDB,0x00,0x19,0x34,0x13,0x33,0x12,0xB3,0x25,0x13,0x85,0xDB,0x0F,0xC1,0x6B,0xF7,0x6C,0x07,0xB5,0x2E,0x38, + 0x00,0x95,0xEF,0x23,0x41,0x9A,0x4C,0xF6,0x3B,0xEB,0x09,0x8E,0x29,0xDA,0xEC,0xE3,0x32,0xC9,0xED,0x08,0xEA,0xD5,0x42,0xF0,0x19,0xC0,0x24,0x87,0x91,0x29,0x26,0xCE, + 0xDA,0x99,0xC2,0xDB,0x8B,0xBA,0x13,0xD6,0xD0,0xAA,0x2F,0x00,0xE4,0x41,0x82,0x6C,0xDA,0x2D,0xE6,0x7C,0x00,0xF3,0x3A,0x57,0xBA,0x2B,0xED,0xBE,0x8F,0xA9,0xE2,0xAA, + 0xC8,0x3A,0x02,0x00,0x90,0xDB,0x2F,0xB9,0xAC,0xDB,0x12,0x45,0x87,0xDA,0x00,0xAC,0xEF,0x84,0xB7,0x65,0xC3,0xDB,0x00,0x94,0xDC,0x26,0xDB,0x00,0xB8,0xA3,0xDF,0xE2, + 0x21,0x5B,0x08,0x40,0xDB,0x52,0x02,0xEE,0x83,0xC5,0x76,0xEB,0x10,0x3A,0xDD,0x46,0x3A,0xB7,0xDB,0xC6,0x2D,0x06,0x00,0x09,0x24,0xB2,0x76,0x00,0xB7,0x49,0x14,0x43, + 0xDB,0xC0,0x01,0x73,0x70,0x83,0xC6,0xD2,0xC8,0x0E,0x2C,0x0B,0xC3,0xDB,0x09,0xB0,0xD8,0xF4,0x00,0xA6,0xF5,0x12,0xED,0xB0,0xDB,0xB5,0xF8,0xC2,0xC8,0xE6,0xCD,0xBA, + 0x16,0x2E,0xDB,0x06,0x3C,0xC6,0x94,0xD6,0xBD,0x34,0x55,0x30,0x34,0xD0,0x12,0xD6,0x6A,0x02,0x60,0x4A,0xAC,0x08,0xB7,0xAA,0xF7,0xBA,0x60,0x02,0xFD,0x03,0x6A,0x99, + 0x2A,0x75,0xDA,0xEE,0x97,0xEB,0x93,0x45,0x2A,0x05,0xDC,0xF2,0xB5,0x30,0x60,0xD8,0x34,0x50,0x2F,0x8D,0xC8,0xB2,0x29,0x65,0xEC,0x03,0xDB,0x2B,0xE0,0x26,0xCD,0x79, + 0x00,0xDB,0xD0,0xE2,0x42,0x97,0xA0,0xDB,0x1B,0x09,0xC1,0xD8,0xCA,0x99,0x03,0xDB,0x93,0x8C,0xBA,0xA5,0xA9,0x9F,0x02,0x65,0x92,0x00,0xEA,0x77,0x88,0xE4,0xDB,0x06, + 0xC8,0x90,0x18,0xA6,0x76,0x07,0xAD,0x5B,0x00,0x7F,0xBB,0x95,0x48,0x83,0xE3,0x2C,0xFA,0xC6,0x23,0xB1,0x99,0xAC,0x14,0x60,0x68,0x94,0x97,0x00,0x69,0xA8,0x7D,0x00, + 0x0E,0x25,0x99,0x22,0xC1,0xC8,0xFF,0xF6,0x3E,0xBB,0x07,0xDB,0x0B,0x00,0xE7,0x98,0xDF,0x55,0xDC,0x37,0x00,0x60,0xC4,0x77,0x38,0x5E,0xD4,0x8A,0x05,0x8A,0x42,0x8B, + 0x8B,0xD6,0x8C,0x92,0x94,0xD1,0x8E,0x0A,0x6F,0xCB,0x60,0xDB,0x5C,0xB0,0xD7,0xA5,0x00,0x27,0x85,0xDB,0x12,0xB8,0x65,0x70,0xDB,0xB7,0xCC,0xB0,0xDD,0xC0,0x01,0xD9, + 0xA3,0xBD,0xC4,0xAF,0x7A,0x85,0xC3,0xDB,0x92,0x40,0xEB,0x6B,0x19,0x1F,0xEA,0x48,0xD0,0xFE,0xBD,0x76,0x09,0x57,0xDB,0x14,0xD3,0xD7,0xB1,0x3D,0x7B,0x84,0xDD,0xA9, + 0x93,0xCB,0x99,0xDC,0x87,0x29,0x41,0xDB,0x0E,0x30,0xDB,0x65,0xC4,0x5D,0x05,0x1D,0x06,0xB7,0xCD,0x16,0xF1,0x7D,0xE9,0x4C,0xDA,0x0E,0x3B,0xC3,0x70,0xCD,0xF5,0x0A, + 0x24,0x48,0xE1,0x1D,0xCC,0x6D,0x92,0x7B,0x00,0xB4,0xBE,0xC8,0x02,0x4D,0xC4,0x88,0xDC,0xC8,0xD1,0x8E,0x38,0xCA,0x02,0xDA,0x1E,0x00,0xD2,0xF6,0xE5,0xDD,0x7D,0xF4, + 0xB4,0xD3,0xA3,0x40,0xDA,0x30,0xBE,0xB5,0xA0,0xDA,0xB9,0x00,0xB9,0xBC,0x18,0x28,0xDB,0x58,0xD9,0x26,0x5A,0xDB,0x0A,0xA8,0x98,0x50,0xDB,0x0A,0x9F,0xC1,0xEE,0x50, + 0x6B,0x52,0x5F,0x1C,0xE9,0x47,0x54,0x33,0x5B,0xB8,0x41,0xDB,0xA7,0xF9,0x01,0x61,0xDB,0x6E,0xCC,0x11,0x90,0xDB,0x32,0x9F,0xCB,0xB8,0xC8,0xFC,0xAE,0x29,0x94,0x30, + 0xDB,0xC3,0xB0,0xAC,0x0E,0x12,0xEF,0x00,0xD3,0xF9,0x03,0x79,0x0A,0x9C,0xA0,0xDC,0xB7,0xE8,0xB9,0xCB,0xC9,0xC7,0x7F,0xF8,0x07,0x28,0x82,0xE9,0xD0,0x45,0xE4,0xD3, + 0x34,0xED,0xDB,0xF5,0xBA,0x7F,0x39,0x0D,0xAB,0x0F,0xDB,0x0A,0x59,0xE5,0x02,0xD5,0xCE,0x6F,0xEC,0x81,0x0A,0x39,0xFA,0xBA,0x40,0xDA,0xC3,0xD5,0x02,0xB4,0x00,0x26, + 0x81,0xDA,0x3D,0x81,0xCE,0xDA,0x12,0xF5,0xBB,0x4A,0xA4,0x6A,0xF3,0xE0,0x93,0x46,0xB4,0xCC,0xE8,0x53,0x60,0xDB,0x00,0x76,0x5E,0x81,0x35,0x19,0x1A,0xCB,0xB5,0x8C, + 0x3D,0xF0,0x58,0x2A,0xDB,0x5A,0xF6,0x4C,0xDB,0x0B,0x06,0x87,0xB5,0x14,0x4F,0xA7,0x02,0x96,0xAB,0xED,0x3C,0xD6,0x61,0xAB,0x40,0x9C,0x38,0xE4,0x04,0xAA,0x2D,0x12, + 0x7F,0x6F,0xD2,0xF6,0x07,0x00,0xD1,0xF9,0xD7,0x69,0x00,0x23,0x13,0xA9,0x00,0xAA,0x32,0xD4,0x9C,0xC9,0x28,0xDB,0x2C,0xE3,0xAE,0x26,0xAE,0x11,0x29,0xB5,0x00,0x14, + 0x57,0x22,0x95,0xC8,0x8D,0x91,0x05,0x75,0xF9,0x67,0xA7,0xF8,0x6F,0x73,0xD7,0x14,0x06,0x39,0xC9,0xF9,0xB8,0xCA,0xD8,0x16,0xDA,0x14,0xDB,0x09,0x27,0xC3,0xDB,0xD6, + 0x0B,0x00,0x9B,0xDE,0x22,0x00,0xDB,0xB5,0xB6,0x60,0xB4,0xDB,0xA8,0x42,0x4C,0x97,0x83,0xE5,0xDE,0x38,0xCA,0x6B,0x81,0xCD,0x29,0x0B,0x1F,0xEE,0x5B,0x4B,0x5F,0x33, + 0xDB,0x0F,0x6A,0x61,0xAB,0x6F,0xCB,0x71,0x8B,0xE5,0x57,0x28,0xDD,0x28,0x0F,0xFC,0xE8,0xD0,0x3C,0x02,0xB4,0x32,0x80,0xC2,0x9B,0x9F,0xE1,0x07,0x51,0x2C,0xC0,0x50, + 0xD5,0x57,0x0E,0x0B,0x87,0xF6,0x00,0xAD,0x0F,0x0E,0xF6,0xE4,0x93,0x4C,0xA7,0xA5,0xD0,0x2C,0x86,0x67,0xB5,0x4A,0x87,0x8A,0x2D,0xFB,0x37,0x33,0x3E,0x5C,0x57,0x9F, + 0xD1,0x94,0xD9,0x9B,0xAD,0x09,0xBD,0xFB,0x00,0xDA,0xC2,0x0A,0x2A,0x44,0x94,0xC2,0xD5,0xD0,0x90,0x5C,0x26,0x95,0xEC,0x6E,0xFF,0x9A,0x63,0x88,0x1E,0x27,0x93,0xD8, + 0x50,0xD6,0x4C,0xDA,0x16,0xC8,0xF4,0x04,0xD4,0x51,0xD9,0xB7,0x08,0xDA,0xA8,0x5B,0x50,0xB7,0xA5,0xDB,0x01,0x52,0x35,0x01,0x60,0xDB,0x33,0x7D,0x0A,0x52,0x87,0xF6, + 0x60,0x68,0x11,0x6B,0x57,0x82,0xC3,0xBC,0xC8,0xE2,0x6D,0x08,0x7F,0x79,0xE3,0x56,0x02,0xA2,0x1E,0x05,0xC1,0x14,0xC0,0x0B,0x48,0x0C,0xBA,0x08,0x91,0x2A,0xAB,0x7E, + 0xF2,0xB0,0xCB,0x90,0xEC,0xED,0x85,0xA9,0x0F,0x3B,0x5D,0xC2,0x74,0x1F,0xEE,0x55,0x22,0x54,0x03,0xEB,0x15,0x33,0x61,0xD8,0x74,0x4B,0xC4,0xF5,0xE4,0x76,0x8D,0x95, + 0x02,0x5F,0x00,0x6F,0x03,0x35,0x07,0x25,0x94,0xAA,0xEB,0x26,0x48,0x00,0x95,0xED,0xAC,0xD6,0xC1,0xDF,0x18,0x28,0xD7,0x22,0x6A,0x41,0xDB,0x4D,0x30,0xDB,0x21,0x4C, + 0x60,0xDB,0x79,0xCF,0xDD,0x81,0xDB,0x20,0x15,0x81,0xDB,0x5C,0x13,0x43,0xB1,0x69,0x99,0xE1,0x00,0xDE,0x63,0xD0,0x40,0xDF,0x87,0x75,0x57,0x04,0xDA,0xB4,0xB8,0x57, + 0x8D,0x74,0x94,0xF4,0x9F,0x1A,0x08,0x0E,0x50,0xD6,0xAB,0x04,0xF0,0x5B,0xDF,0x0A,0xCA,0x0A,0xFE,0x3B,0xFD,0xC9,0x42,0xF2,0xD6,0xDD,0x44,0x20,0x0E,0xB2,0x29,0x77, + 0x16,0x00,0x0E,0x61,0xDA,0xAD,0xE8,0xED,0xC0,0x75,0x03,0xF9,0x95,0xA8,0xC4,0xB7,0x89,0x99,0x79,0xDD,0x45,0xB7,0x22,0x8E,0x5F,0xB5,0x56,0xDB,0x4E,0xC7,0xF4,0x90, + 0x9A,0xEB,0xCC,0xDB,0x12,0x2A,0xEE,0x5A,0x50,0xDC,0x87,0x08,0xB7,0x22,0xB0,0xA0,0xDB,0x60,0x5E,0xDB,0x01,0x79,0x5C,0x50,0xB8,0x50,0xB5,0xD9,0x94,0xDD,0xE1,0xBC, + 0x2A,0x6A,0xD5,0x70,0xDB,0xDB,0x7C,0x0F,0xC4,0xD9,0xBD,0xFF,0xBE,0x87,0xD4,0x00,0x5E,0xC8,0x0E,0xA8,0xDF,0xA5,0xC8,0xB9,0xAB,0xA0,0xCD,0xB0,0xAF,0xB7,0x9C,0xC3, + 0xFF,0x09,0xBA,0xEB,0xCA,0xA0,0xD2,0xA3,0xD3,0x8B,0x14,0xEC,0x22,0xF1,0xB1,0x94,0xF2,0x07,0xFA,0xA9,0x0A,0x37,0xA8,0x30,0xB0,0xDA,0xB7,0xC2,0x5D,0x11,0x00,0x86, + 0xDB,0xEB,0xB2,0xC9,0x00,0xB8,0xDE,0x00,0xB7,0x53,0x05,0xDC,0x86,0xDA,0xD5,0x13,0xBD,0xC7,0x4F,0x9E,0x00,0x28,0xDB,0x5F,0x05,0x03,0x7C,0xBA,0x4D,0x60,0xD9,0xDB, + 0x77,0x86,0x01,0xDB,0x53,0x28,0xDB,0x6F,0xCB,0xA4,0xDD,0xA1,0xDB,0x69,0xEF,0xAF,0xF2,0x70,0x32,0xEF,0xE2,0xCE,0x0F,0x0C,0x7F,0xE5,0x8B,0x38,0xE2,0x5B,0x11,0x80, + 0xD0,0xED,0xF8,0x03,0xA6,0x61,0x99,0xBC,0x01,0x57,0x00,0xBA,0x30,0xA3,0xB2,0x83,0x9D,0xC1,0x64,0xCE,0x0C,0xDA,0x25,0xC0,0x2B,0xD9,0x0F,0x04,0x24,0xEA,0x14,0x2D, + 0x8A,0xF8,0xCA,0xAF,0x4B,0xCE,0xBA,0x30,0xF9,0xAB,0x95,0x39,0x6D,0x00,0x88,0x25,0x08,0xDE,0xC4,0xF2,0xD7,0x5C,0xD8,0xB7,0xC7,0x4C,0x36,0xB5,0x52,0xCD,0xA2,0xE4, + 0xD7,0xA5,0xB8,0x27,0x04,0x0A,0x28,0xDB,0x0D,0xB8,0xB6,0xA0,0xCB,0xD0,0xE2,0xB0,0xDB,0x25,0x82,0xDB,0x0C,0xB7,0xB1,0xA9,0xEA,0x55,0x85,0xFA,0x5D,0x06,0xEE,0x63, + 0x68,0x91,0x97,0x39,0x9A,0xA9,0x11,0xB6,0xD6,0xCA,0xB7,0x4C,0xEA,0xD4,0x07,0x57,0xA1,0x9D,0x06,0x65,0x03,0xA8,0xD8,0x03,0xD8,0x58,0xC9,0x5A,0x06,0x14,0xF2,0x0E, + 0xE3,0x9C,0xA0,0xAD,0x91,0x25,0xDD,0x59,0x4B,0xB4,0x33,0x92,0x40,0xE9,0x00,0xEC,0x7D,0x53,0xCD,0xA4,0x86,0x4B,0xDC,0x0E,0x68,0xD5,0xF5,0x2A,0xD9,0x70,0xB5,0x6E, + 0xC3,0x1F,0xD6,0x9E,0x40,0xDA,0x92,0xA5,0x67,0xDA,0x0B,0xB7,0x24,0x29,0x81,0xDC,0x77,0x82,0x30,0xDB,0x14,0xD4,0xB5,0xDB,0x0A,0xE4,0xDB,0x04,0xAC,0x34,0xDB,0x0A, + 0x5E,0xDB,0x0E,0x4F,0x95,0xEC,0x33,0x24,0xA9,0x76,0x07,0xC1,0x36,0xAC,0x6E,0x39,0x76,0xF2,0x04,0xBC,0xF2,0x00,0xB9,0xC3,0xCE,0x00,0x2E,0x8B,0x57,0x00,0xA2,0xE7, + 0x4C,0x00,0xB1,0x2C,0xBD,0x16,0x48,0xB3,0xF2,0x05,0xBD,0xDB,0x21,0xF5,0xCB,0x8E,0x32,0x27,0xB2,0x00,0xFD,0x12,0xB1,0x7D,0xA4,0x61,0xD8,0x52,0x05,0x3D,0xC6,0xDB, + 0x49,0xC7,0xE5,0xB3,0x61,0xDB,0xF1,0x05,0xBE,0xCA,0x00,0xB5,0x58,0xDA,0x09,0x0C,0x25,0x13,0x82,0xDA,0x7A,0xFD,0x93,0xD7,0x2D,0xF0,0x67,0xDD,0xCD,0xCF,0xCA,0x8D, + 0x28,0xDB,0xC5,0xD4,0x20,0x92,0xE4,0xE4,0xB9,0x85,0x89,0xB7,0x02,0x41,0xDB,0xCE,0xA6,0xDB,0x04,0xCD,0x19,0xA1,0xDB,0xB0,0x01,0x2A,0xC9,0xBD,0x65,0xF0,0x7C,0x75, + 0xD9,0x71,0xD1,0xBA,0x9C,0x72,0x39,0x7F,0x15,0xB9,0x11,0x80,0x60,0x7F,0x61,0xDE,0x5F,0x04,0x0E,0x11,0x77,0x9B,0x41,0xC9,0xD5,0x05,0x02,0xAC,0xC9,0xB5,0xD7,0x72, + 0x0E,0xD5,0x04,0x05,0x86,0xE0,0x30,0x8B,0xAD,0x93,0xBF,0x84,0xED,0x03,0xC0,0xED,0xEC,0x3B,0x12,0xDA,0x0B,0x00,0x99,0xC2,0xEB,0x00,0x04,0xA8,0xCB,0xC8,0xB6,0x0C, + 0x8E,0x11,0x8E,0x1F,0x45,0x29,0x92,0x20,0xD9,0x28,0x65,0xDB,0x11,0x29,0x60,0xDB,0xB5,0x13,0x8D,0xB5,0x4D,0x00,0xDB,0xA3,0xBD,0xE6,0x85,0x54,0xEF,0x0D,0x4C,0x60, + 0x8F,0xDB,0x76,0x64,0xEB,0xB7,0x5C,0xA5,0x4D,0x30,0x26,0x8E,0xF3,0xA3,0x39,0x39,0x2A,0x63,0xAB,0x69,0xCE,0x7D,0xF7,0x6E,0xA5,0xAC,0xB7,0xF0,0x8E,0xE7,0x00,0xD3, + 0x3A,0x00,0xB2,0xA1,0x94,0xC7,0x25,0xAF,0x25,0x14,0xDB,0x07,0xF2,0xD1,0xC8,0x54,0x1C,0x96,0x0B,0x8E,0x33,0xA6,0x89,0xA4,0xD6,0xB6,0x5D,0x03,0xFD,0xFE,0x87,0xCD, + 0x4E,0x2A,0xE8,0xA5,0x09,0x06,0xA3,0xA1,0x90,0xB6,0xB1,0xDD,0xD5,0x99,0x5C,0x56,0x00,0xB3,0x53,0x4D,0xA4,0xC9,0xA1,0x65,0x65,0x4E,0x04,0x63,0x05,0xD2,0x99,0xE8, + 0x00,0xB7,0x98,0xB5,0xDB,0x52,0x91,0x61,0xDA,0x28,0xDB,0x08,0x4C,0x08,0x08,0x44,0xDB,0x05,0x24,0x4C,0xA5,0x80,0xDB,0x6B,0x35,0x1A,0xC5,0xB0,0x26,0x28,0xDB,0x25, + 0x4B,0xDB,0x0B,0xCE,0xDA,0xCF,0x16,0x06,0xE0,0x32,0x8F,0xE9,0x04,0xF3,0x03,0x09,0x85,0xDD,0xD5,0xBF,0x24,0xA4,0xAF,0x99,0x7D,0x13,0x07,0xD5,0x16,0xAC,0xCA,0xF8, + 0xB5,0x14,0x7F,0x00,0x21,0x02,0x76,0x00,0xB2,0x55,0x1C,0xCB,0x08,0x93,0xF6,0xE6,0xB6,0xE3,0x15,0x04,0xD6,0x01,0x69,0x0F,0x1E,0xC5,0xD1,0x33,0xCC,0x7B,0xE7,0xB6, + 0xDB,0x16,0xDC,0x12,0x94,0xB7,0x95,0xFD,0x65,0xBB,0x41,0xDB,0x65,0xB7,0x2B,0xCF,0xBA,0xB5,0x00,0xB5,0x2B,0xB6,0x24,0xB4,0x30,0xDB,0x06,0xC1,0xD8,0xEF,0xB4,0xDB, + 0x02,0x20,0x1C,0x30,0xD2,0x93,0xC0,0xDB,0x2A,0x4B,0xBB,0x89,0x9B,0x00,0xB7,0x2A,0xE0,0x5B,0xD6,0x0B,0xC1,0x3A,0xEC,0x19,0x1E,0xD2,0x57,0x8E,0xB5,0xFF,0x49,0x7F, + 0xF4,0x12,0x14,0xA7,0xAB,0xED,0x73,0x87,0x33,0xAF,0xDC,0x29,0xCB,0xDD,0xDB,0x00,0xBD,0xFF,0x87,0xCD,0x05,0x94,0x36,0x8A,0x93,0xD6,0x08,0x65,0xA1,0x61,0x34,0xE5, + 0xE5,0x25,0x45,0xAF,0x27,0xB0,0x60,0xDB,0x1F,0xE2,0x04,0x92,0x93,0xC2,0xDB,0x70,0xDA,0x4D,0x18,0xAB,0x2B,0xB5,0x00,0xA0,0xDB,0xE4,0xA5,0xA3,0xB9,0x10,0xD0,0xDA, + 0xB7,0xA8,0xDB,0x25,0x5B,0xDB,0x02,0x52,0x0B,0xF4,0xAD,0x30,0x33,0xA0,0xDE,0x29,0x33,0x33,0xD1,0xAF,0xBF,0xA4,0xB6,0x86,0x03,0xB8,0x54,0xEC,0x32,0xD5,0xB2,0xFF, + 0xC7,0x00,0x28,0xDE,0x4A,0xB7,0xF2,0x25,0x98,0x9C,0xED,0xA1,0xC7,0x84,0xBF,0xD3,0xAE,0x20,0xDB,0x5D,0x00,0x4E,0x06,0xDB,0x18,0xBD,0x52,0xE2,0xDB,0xBE,0x4A,0xD2, + 0x12,0x5A,0x07,0x0F,0x2A,0xD9,0x00,0x25,0x1D,0xB3,0x5C,0x6D,0xF2,0x75,0xFD,0x41,0xE3,0x3B,0xCA,0x89,0x5D,0x5D,0x27,0x16,0xEE,0xD6,0xF5,0xD1,0x91,0x29,0x20,0xDC, + 0x2C,0x6A,0xDB,0x0A,0xBC,0xBC,0x91,0x45,0xB6,0x16,0xB6,0xDB,0x04,0xA5,0x53,0x32,0xB7,0x4D,0x75,0xCD,0xDB,0x5F,0x50,0x1F,0x57,0x57,0x33,0xC0,0x49,0x00,0x59,0xE7, + 0x25,0x00,0x15,0xC1,0x06,0x80,0xAE,0x56,0xBA,0x56,0xD1,0x76,0xC1,0x52,0x95,0x91,0x2D,0xCB,0x3C,0xA4,0xAB,0xD7,0x69,0xA3,0x2D,0x00,0x95,0xC5,0xB2,0x8A,0x14,0x62, + 0xAF,0xA9,0x27,0x3A,0x30,0x02,0xDB,0x04,0x39,0x9F,0xFB,0x32,0x8A,0x49,0x06,0x22,0x90,0x32,0x39,0x00,0x4B,0x33,0xA9,0x00,0xEB,0x68,0xD8,0x3C,0x04,0xD4,0x2C,0xD7, + 0x24,0xB7,0x20,0x5D,0x2F,0x2F,0x5D,0x59,0x63,0xB3,0x5C,0xA8,0xDE,0xDF,0x55,0x07,0x24,0x00,0xB5,0xDA,0x05,0xB8,0x05,0xDA,0xA3,0x92,0xDF,0xDB,0x08,0x5D,0x93,0x12, + 0xCA,0x00,0xDB,0x17,0x0B,0x15,0x30,0x2B,0x34,0xD8,0x4D,0x30,0x00,0x61,0xDD,0x41,0xDE,0x5F,0x02,0x7C,0x7D,0x8D,0xF4,0x0C,0xE2,0xB1,0xE1,0xCA,0x00,0xBA,0x56,0xB2, + 0x0F,0x57,0xCD,0x30,0xDE,0x97,0xF8,0x2B,0x1C,0x02,0xAB,0x13,0xF3,0x09,0x53,0x93,0x2C,0xE5,0x0D,0x0F,0x9A,0xF7,0xA8,0xC2,0x12,0x04,0xBD,0xBA,0x84,0xD7,0xD3,0xA2, + 0xAC,0x5E,0x2A,0xDA,0x17,0x4B,0xD4,0xAB,0x13,0xB6,0x2C,0xDB,0x32,0xB4,0x4B,0x45,0x00,0x40,0xDA,0x5D,0x30,0x32,0x49,0xDB,0xD2,0x90,0x77,0xC5,0x48,0x18,0x00,0x8D, + 0xA6,0x00,0xBC,0x00,0x79,0xA0,0xDB,0x08,0xE4,0x77,0xB9,0xB9,0x78,0xDB,0x28,0xDC,0x01,0x35,0x5F,0x20,0x6D,0x0C,0xBD,0xCF,0x05,0xD4,0xAC,0xF7,0x40,0xDC,0x55,0x8B, + 0xC9,0xC3,0xD6,0xDB,0x17,0xB1,0x33,0x06,0xDD,0x85,0x56,0xB4,0x09,0x8B,0x42,0xDB,0x50,0xDC,0xBE,0x14,0x00,0x64,0xB3,0xEE,0x02,0x31,0x5B,0x0A,0x11,0xE6,0x0E,0x80, + 0x49,0x4A,0xB7,0x22,0xFA,0xA4,0xEC,0x5C,0xD9,0x0E,0x3A,0x4B,0xBE,0x2F,0x78,0x00,0x90,0xDB,0x22,0x25,0xA5,0x5D,0x44,0xB7,0x27,0x95,0xEC,0x65,0xB7,0x29,0x25,0x00, + 0xDA,0x09,0x0B,0xB6,0xED,0x56,0xBD,0x92,0x84,0xDF,0xE6,0x2C,0xDB,0x0C,0xAC,0xDB,0x16,0xC5,0xB8,0x40,0x20,0xCD,0x20,0x5E,0x21,0xE6,0x5A,0xDB,0x09,0x82,0xDC,0x8A, + 0xB8,0x96,0x7E,0x03,0x8E,0x16,0xED,0xB7,0xBA,0x53,0x15,0xB9,0xCE,0xB3,0x04,0xB3,0x78,0xB3,0xE9,0x11,0xAA,0x0A,0x95,0x4B,0xC2,0x0B,0xF6,0x7E,0x05,0xE6,0x00,0xFA, + 0x79,0x42,0xDA,0xF9,0x30,0x0D,0x7A,0xA4,0xD2,0x83,0xE6,0xA7,0xC2,0xE4,0xAA,0x0B,0xA5,0x7F,0xAE,0xCE,0x00,0x3A,0x3A,0x6D,0x5E,0xAF,0xAB,0x04,0x07,0x58,0x50,0xDB, + 0x53,0xC8,0xE5,0xB4,0xE1,0x00,0xD4,0x6F,0xC7,0x69,0x8C,0x1E,0xDB,0x1A,0x91,0x60,0xDB,0xD0,0xA0,0xDB,0x21,0xDA,0xAF,0x62,0xB7,0x32,0xA5,0xD7,0xB8,0x60,0x75,0xDB, + 0x52,0x0E,0xCD,0x17,0x17,0x19,0x88,0xC6,0x1A,0x1F,0x1F,0xD7,0x0B,0x13,0xFB,0x4D,0xFB,0x69,0xEB,0x57,0x03,0xC3,0x15,0xFE,0x77,0xFC,0x74,0xBE,0x53,0xBD,0xD4,0x84, + 0xDD,0xD7,0x94,0xE9,0x03,0x01,0x57,0x82,0xDA,0x97,0xD2,0xC8,0x29,0x02,0xF6,0x4E,0xF2,0xB0,0xDC,0xA5,0x15,0x11,0x4D,0x27,0xC8,0x73,0x87,0xDC,0x1E,0xD4,0x01,0xA9, + 0x56,0x0A,0x95,0x7D,0x65,0xAD,0xEA,0x8D,0xD1,0xCD,0xA2,0xDF,0x00,0x07,0x02,0x69,0x92,0x95,0xB3,0x05,0xDB,0xBA,0xCB,0x27,0x7E,0xB8,0xCA,0xC3,0x50,0xD9,0x52,0xB8, + 0x91,0x2D,0xB6,0xED,0x70,0xDB,0xCA,0xB6,0x9E,0xCB,0x13,0xBB,0xE4,0x9F,0xC0,0xDB,0xEB,0x00,0x52,0x81,0x35,0x2B,0x21,0x1F,0x5C,0x01,0x16,0x0C,0x25,0x3A,0xD7,0xD6, + 0xE0,0x13,0xBC,0xCF,0xB7,0x8C,0x49,0x9E,0x35,0xB7,0x4C,0xDB,0x17,0x07,0x2A,0xA6,0x67,0xF1,0xCC,0xA1,0x9A,0x09,0xB9,0xF3,0x8B,0x6D,0x98,0xDD,0x0B,0x2A,0x95,0xB7, + 0x5C,0x03,0x19,0x85,0xBD,0x69,0x86,0x5C,0x49,0x46,0xF5,0x09,0x0B,0x49,0xF8,0x7C,0x6C,0x00,0xB5,0xFD,0x15,0x00,0x21,0xB9,0x27,0x63,0xDB,0x0E,0x09,0x24,0xDB,0x16, + 0x85,0xDB,0x09,0xB6,0x01,0xDB,0xB4,0x28,0xDB,0x21,0xAF,0x60,0xDB,0x50,0xAF,0xDB,0x57,0xBD,0x30,0x5E,0xDB,0x6E,0x35,0xCF,0x1F,0x0B,0x19,0x0C,0x10,0x3A,0x00,0x90, + 0xDB,0x17,0x13,0xE7,0x92,0x8F,0xDF,0x05,0x73,0x06,0xBC,0x84,0xA9,0x9A,0x2A,0xA7,0x58,0xB9,0x5A,0xD9,0xDE,0x12,0x86,0x4A,0x39,0x1B,0xE7,0x00,0x87,0x9E,0x16,0xE5, + 0x24,0xEE,0xA9,0x56,0xE0,0x64,0x45,0x09,0xE3,0xAF,0xFC,0x62,0x66,0x6B,0xF3,0xA0,0x12,0xD7,0x19,0x03,0x49,0x32,0x4F,0xC7,0x86,0xD2,0x01,0x65,0xFB,0x01,0x00,0xC2, + 0xEB,0xC4,0xEB,0xDA,0x05,0x85,0xBD,0xC7,0x86,0xDB,0xC9,0xF4,0xDB,0x14,0xEE,0xA2,0xC4,0xAF,0x22,0x14,0xDB,0x04,0x5B,0xA0,0xDB,0x75,0xC3,0xDB,0xDC,0x0D,0x94,0x06, + 0x1F,0x67,0x19,0xDF,0x00,0x1F,0x34,0x25,0x25,0x33,0xB8,0xB7,0xC3,0xDE,0xE3,0x65,0x2A,0x1D,0xBC,0x24,0x97,0xA5,0xC0,0x59,0x8C,0x3E,0xF5,0xCD,0x00,0x5F,0xE1,0xC8, + 0x0E,0x98,0x96,0xDE,0x1F,0x0B,0x29,0x65,0xD4,0x73,0x17,0x54,0xEC,0x44,0x99,0xF4,0x00,0xAA,0x57,0x47,0x24,0x0E,0xBB,0xBC,0x65,0xB4,0xE5,0x66,0xB4,0x16,0xB7,0x52, + 0xCE,0xA3,0x07,0x32,0x0C,0x1D,0x1D,0x1A,0x2F,0xB9,0xA6,0x00,0xB2,0xB6,0xB2,0xC0,0xB0,0xDA,0x8C,0xDB,0x0B,0xCA,0x71,0xC4,0x97,0x24,0x09,0x81,0xDB,0x0D,0x4C,0x38, + 0xDB,0x30,0x20,0x00,0x81,0x5F,0x0B,0x2B,0x24,0x15,0x01,0xDB,0x0B,0xF5,0x5C,0x00,0x3A,0xB3,0xE1,0xC3,0x0A,0x60,0x82,0x13,0x99,0x9B,0x12,0x04,0x9C,0xD1,0xB2,0x03, + 0x85,0xDC,0xAF,0xF6,0x01,0x28,0xF1,0x44,0x85,0xF6,0x84,0xC8,0xC1,0xD2,0x11,0xD3,0x96,0x86,0x92,0x50,0x46,0xA1,0xF5,0x04,0x55,0x47,0x96,0x2A,0xEB,0xB6,0x5C,0xDE, + 0x9A,0x00,0x40,0xDA,0x90,0xE3,0x18,0x1A,0xDB,0x25,0x2E,0xDB,0x05,0x5D,0x50,0x00,0xDC,0x5A,0xF1,0xAC,0x29,0xDA,0x14,0x79,0x00,0xB8,0x2D,0x6C,0xB6,0xCA,0xCB,0xB4, + 0xB9,0xDB,0x01,0xE2,0x97,0x9F,0x0C,0x02,0xDB,0xC5,0xEC,0x84,0x52,0x6D,0x35,0x52,0x20,0xF1,0xCF,0x00,0x0B,0x1A,0xC4,0x8A,0x34,0x34,0xA3,0xFA,0xAE,0x30,0x25,0x8E, + 0xB3,0x25,0xAB,0x83,0xB0,0xDD,0x5B,0x03,0x86,0xDB,0xD1,0xC8,0xB9,0x51,0x41,0xC5,0x6F,0xAA,0x5B,0x80,0x6F,0xBE,0x2A,0xAB,0x5D,0x1A,0x75,0xA5,0xD5,0x0E,0x05,0xFC, + 0xF4,0xD3,0x9D,0xD8,0x08,0xD1,0x2B,0x33,0x02,0x07,0xE5,0x08,0x00,0x48,0x13,0xDC,0xDC,0x6C,0x81,0xD8,0xC5,0x74,0x00,0xDB,0x32,0x1A,0x1A,0x44,0x32,0x07,0xDB,0x04, + 0xA0,0x96,0x93,0x93,0x8D,0xCA,0xB7,0x60,0xDA,0x18,0x79,0xB6,0x6C,0xDC,0x59,0xB7,0x58,0xDB,0x04,0xDA,0xA8,0x9A,0x1B,0x26,0xDB,0x02,0x1B,0x53,0x98,0x60,0xDB,0x00, + 0x5E,0x52,0x5E,0x6D,0x35,0x21,0x54,0x0B,0xF0,0x51,0xDB,0xFA,0x00,0x03,0xDA,0x00,0x3A,0x16,0xDE,0xDE,0x16,0x8E,0x4B,0x04,0xCD,0x78,0xE1,0xCA,0xD4,0x6B,0x0A,0xB4, + 0x59,0xCA,0xA1,0x45,0xF5,0x59,0x8B,0xB5,0x6A,0x05,0x8B,0x12,0x95,0x8D,0x2E,0x00,0x74,0x89,0x96,0x31,0xC6,0x92,0x92,0x3F,0x39,0x4C,0x94,0xA4,0xAF,0x1E,0x9C,0xDB, + 0x2E,0x00,0xC2,0xDA,0x70,0xDB,0xB0,0xDC,0x92,0xAC,0x69,0xEE,0x7C,0xDC,0x4C,0x5D,0x92,0x94,0xF1,0xA3,0x93,0x9E,0x9E,0x90,0x44,0x9E,0xC1,0xDA,0x28,0xDB,0x76,0x81, + 0xB4,0xAC,0xDE,0xDC,0xCA,0xB7,0x5B,0x85,0x41,0xDB,0x22,0x61,0xDB,0xA0,0x94,0x6B,0xD6,0x52,0xAF,0x00,0xC0,0x85,0x15,0x15,0x10,0x82,0xD9,0x5C,0xC1,0xDB,0x2A,0x20, + 0xDB,0x16,0x3A,0x1E,0x9D,0x1F,0x04,0x83,0x37,0xB7,0x52,0xC4,0xE9,0x89,0x83,0xCE,0x04,0xDB,0x14,0xBA,0xFC,0x1D,0xAD,0x89,0x2A,0xE7,0xEB,0xF6,0xBC,0xE3,0x8D,0x9E, + 0x34,0xE5,0xD9,0xF8,0x65,0xF0,0xA5,0x23,0x0A,0xE0,0x5F,0x5A,0xAA,0x29,0xC2,0xD9,0xDE,0xC7,0x28,0xDB,0x24,0xDC,0x09,0xAF,0x87,0xA7,0x9B,0xB1,0x29,0x67,0xAB,0xB4, + 0x21,0x9E,0x43,0x58,0x55,0xFE,0x30,0xDA,0x60,0xDB,0x91,0x90,0xDB,0x32,0xB6,0xA9,0xA6,0x08,0xCF,0xA5,0x5B,0x0D,0x4C,0xDB,0x01,0x7A,0x22,0x97,0xD8,0xCF,0x27,0xBC, + 0x64,0xB8,0x6D,0xD6,0xF0,0x47,0xD0,0x72,0x01,0xAA,0x1F,0xA7,0xC7,0x92,0xAF,0x42,0x19,0x16,0xB3,0x2A,0xC1,0xD0,0x03,0xA7,0x9F,0xBC,0x9C,0x0A,0x8B,0xC2,0x65,0xB8, + 0x7F,0xCF,0x39,0xB9,0x7A,0x00,0xBE,0xCB,0x8A,0x35,0x02,0x28,0xCE,0x4F,0xBB,0x7F,0x0D,0x26,0xDB,0x34,0xB5,0xD5,0x07,0xA4,0x93,0xB7,0xDE,0xDF,0x5C,0x9A,0xD3,0xC1, + 0xD8,0xDD,0x48,0xE6,0xB8,0xDE,0x2D,0x5C,0x00,0x32,0x6F,0xCC,0x7D,0xB8,0x65,0xB4,0x64,0xB5,0x5D,0xBA,0x05,0x8E,0x4C,0xDA,0x04,0x41,0x41,0x58,0xA9,0x90,0x4F,0xC9, + 0x44,0xB4,0x6C,0x2D,0xA0,0xE4,0x92,0x16,0xB9,0xEE,0xB8,0xDB,0x21,0x7A,0x50,0xDB,0x2C,0x9A,0xD8,0xB7,0xBC,0xE1,0xD3,0x93,0xF1,0x55,0x20,0xDB,0x88,0x5F,0x87,0xBB, + 0xBB,0x25,0x3A,0xB8,0xD3,0xB3,0x8E,0x8E,0xE5,0xB2,0x1E,0x77,0x82,0x95,0xB7,0x05,0xDB,0xD4,0xBA,0xAF,0x98,0xAC,0xC7,0xEF,0xBD,0x2F,0xF0,0xD8,0xDA,0x4E,0xB7,0x56, + 0x8A,0x35,0x00,0x32,0x8E,0x4B,0x0C,0x61,0xDB,0xD5,0x0B,0x06,0x97,0xB6,0x00,0x65,0xB7,0x94,0xC4,0xA1,0xE3,0x95,0xB4,0x15,0xB7,0xCD,0xA8,0x04,0xDB,0xAF,0xCE,0x64, + 0xBA,0x2F,0xBF,0x00,0xBE,0xAC,0xDB,0x28,0xD9,0x27,0xDB,0x01,0x58,0x79,0x4A,0x20,0xDB,0x24,0x91,0xEE,0x55,0xA3,0xAE,0xEE,0x92,0x82,0xA8,0xAF,0x4C,0x15,0xDB,0x01, + 0x24,0xAC,0xA5,0x41,0xDB,0x65,0xB8,0x60,0xDB,0x20,0xB0,0xDB,0x53,0x5F,0xD1,0x8D,0x1F,0x10,0x10,0xD0,0xC6,0x25,0x16,0x16,0xDB,0x0C,0xB3,0x8D,0x16,0x0A,0x8D,0xE2, + 0x39,0xB3,0xE5,0x93,0x95,0xED,0x39,0x8D,0xF4,0x09,0x2B,0xAE,0xDD,0x0D,0xA7,0xAB,0x0D,0x2D,0xF7,0x76,0x00,0xF5,0x17,0x93,0xB2,0xB4,0x9B,0xA9,0x90,0xA6,0x0D,0x1E, + 0xBE,0x79,0x82,0xDB,0x82,0xD1,0xFB,0x03,0x04,0xDB,0x0A,0xB2,0x29,0x6D,0x84,0x5C,0x77,0x03,0x89,0x6A,0x49,0xDE,0x0B,0xDB,0x0C,0xC2,0xB2,0x03,0x46,0x6E,0xF5,0x00, + 0xEC,0x59,0x58,0x00,0x41,0x4A,0x40,0xDB,0x79,0x18,0x3D,0x91,0x91,0xD9,0x49,0xA5,0x32,0x00,0xDB,0xD8,0x98,0x53,0x85,0x14,0xEF,0x08,0x24,0x0B,0xC1,0x82,0xE2,0xC5, + 0xB8,0x2B,0xF0,0x55,0x20,0x05,0x00,0x35,0xCD,0xCD,0x17,0x70,0xC5,0x01,0x0C,0x16,0x30,0x0C,0x25,0xDE,0x32,0x0C,0x8E,0xAD,0x5C,0x33,0x9C,0xA8,0x04,0xF8,0x70,0xC0, + 0xB5,0xD7,0xA0,0xBC,0xAA,0x03,0x09,0xB0,0xDB,0x9D,0xB1,0xFE,0x0D,0x0E,0xC2,0xF6,0xEA,0xE0,0xE6,0x10,0xE8,0x59,0x79,0xA1,0x1E,0x22,0x94,0x76,0x02,0xAC,0x55,0xF2, + 0x5C,0x06,0xBB,0xBC,0x75,0x0A,0x00,0x26,0xDD,0x72,0x01,0xD3,0x00,0xC3,0xF4,0x01,0xC6,0xF3,0x95,0xB7,0x84,0xD9,0xE0,0xDB,0x4A,0xD4,0x00,0x41,0xB7,0x4B,0x79,0xDB, + 0x0E,0x80,0xCB,0xA0,0xA0,0xA5,0x9D,0xEE,0x5A,0xDA,0xEE,0x88,0x97,0x22,0x07,0x4C,0xDB,0x1D,0x07,0x84,0x96,0x97,0xD7,0xDB,0x16,0xB7,0x56,0xEF,0xAA,0x20,0x04,0x63, + 0x35,0x00,0x19,0x21,0x0C,0x00,0x68,0x34,0x97,0x34,0x60,0x16,0xDB,0x4B,0x58,0x33,0xAE,0x50,0xA1,0x55,0x06,0xAA,0xB5,0x39,0xA5,0x00,0xCC,0x08,0x97,0xBF,0xB4,0x13, + 0x2A,0xAB,0xD2,0xDC,0x00,0x98,0xCF,0x00,0x69,0x8B,0x54,0x06,0xCD,0x13,0x65,0xD0,0xCD,0xAA,0x83,0xDB,0x5C,0xD0,0x69,0x02,0xDC,0x5E,0xB6,0x8A,0xDB,0x0C,0xD8,0x24, + 0xA2,0x97,0x49,0x03,0x38,0xDB,0x54,0x04,0xA0,0xDA,0x79,0x95,0xCA,0xD4,0x3D,0x90,0x94,0xDB,0x17,0xA5,0x38,0xDB,0x35,0xCF,0xEE,0xFA,0xBA,0x15,0xDB,0x0E,0x84,0xD6, + 0xAC,0xDB,0x15,0xA9,0x34,0xF0,0xB2,0x02,0xDB,0x35,0x82,0xDB,0xB0,0xE8,0x19,0x0B,0xD2,0x95,0x9D,0xCC,0x25,0x4C,0x00,0x4B,0xC3,0x2D,0x9F,0xEC,0xA6,0x13,0x39,0x58, + 0x00,0xE0,0x4B,0xEC,0x5D,0x00,0x94,0xBC,0xC1,0xDB,0x56,0x04,0x8F,0x91,0xA0,0xDB,0x2A,0xF0,0x05,0xCA,0x98,0xDC,0x17,0x33,0x00,0x7A,0x0D,0x88,0x6D,0xD1,0x69,0x94, + 0x65,0xB6,0x38,0xDB,0x52,0x93,0x59,0xB3,0x58,0xD5,0x50,0xDB,0x14,0x2D,0x46,0x05,0x46,0x4D,0x9E,0x00,0x61,0xDB,0x4F,0xC7,0x2C,0xA4,0xFA,0x00,0xEF,0xC9,0xB8,0xDB, + 0xCA,0xA8,0xE6,0xDB,0x3C,0xDE,0x85,0x40,0xDB,0x4F,0x22,0x5C,0xAC,0xA8,0xCF,0x85,0x76,0xBC,0x47,0x17,0x17,0x89,0x6A,0x2B,0xDB,0x0B,0xDA,0x0D,0x00,0x34,0x60,0xDB, + 0x2A,0xBE,0xBA,0xC0,0xB9,0x4B,0x4B,0x88,0xD8,0x09,0x82,0xDB,0x42,0xCA,0xEE,0x19,0x11,0x6E,0x1D,0x0D,0x2E,0x00,0xEB,0xFA,0x11,0x92,0xED,0xA4,0xFE,0xA9,0xC1,0xDB, + 0x0A,0x5A,0xBC,0x16,0x4A,0x3A,0xFC,0xAB,0x5C,0x86,0xBA,0x04,0xA9,0xA6,0xBE,0xB0,0xC3,0xD9,0x01,0xC0,0xD3,0x46,0x2D,0xF0,0x00,0x04,0x46,0x8C,0x8C,0x9E,0xAA,0x02, + 0x00,0x91,0xEA,0x6D,0xEB,0x52,0x3D,0x02,0xDC,0xA0,0xD3,0x92,0xB5,0x25,0xB9,0x58,0x81,0xE2,0xAF,0x5B,0x42,0x07,0xE0,0xDB,0xC1,0xB0,0xDB,0x99,0xF0,0x7E,0xBF,0xED, + 0x89,0x81,0x4E,0xCC,0x0C,0x61,0x2B,0xDC,0x49,0x92,0xE3,0x7B,0xDC,0xB9,0xD0,0x25,0x3A,0x41,0xBC,0x49,0x94,0x4F,0xCE,0x85,0xE6,0x05,0xC0,0x84,0xC2,0xE1,0xDC,0xF7, + 0x18,0x02,0x8F,0x64,0xB3,0xB3,0xA1,0xDB,0xF6,0x06,0x11,0x94,0x92,0x4D,0xAD,0x3E,0x00,0x33,0x0E,0x11,0x57,0xC0,0x90,0xD4,0x30,0xE0,0x4A,0x0A,0xF2,0xB1,0x41,0xDB, + 0x84,0xDC,0xCA,0x00,0x1A,0xD9,0x0A,0xDB,0x0B,0xB8,0x20,0x2D,0x2E,0x1D,0xAB,0x50,0x64,0xDC,0x30,0x43,0xD9,0x90,0xDB,0x25,0xC6,0x7A,0x8E,0x49,0x81,0xDB,0x6C,0x69, + 0x92,0x45,0xB7,0xBD,0xC9,0x03,0xDB,0x4C,0xC5,0x04,0x00,0x29,0x00,0xAB,0xF0,0x98,0xCC,0x77,0x99,0x00,0x85,0xDB,0x26,0x95,0x91,0x8A,0x6D,0x88,0xB0,0xCD,0x35,0x6D, + 0x5F,0x1B,0x2B,0x15,0x0B,0xCB,0x8B,0x3A,0x5C,0x0A,0xDB,0x0D,0x02,0x8E,0xE3,0xE6,0x4B,0xD9,0x3A,0xC1,0x0D,0x02,0x8E,0x41,0xC5,0xD0,0x04,0xC2,0x30,0x06,0xB5,0xB0, + 0xD1,0xB0,0xCB,0xA9,0xB5,0xAF,0x0B,0x27,0x0E,0xC2,0xDF,0xDF,0xD1,0xC5,0x05,0x03,0x3D,0xE3,0x55,0x17,0x1D,0x05,0xD9,0xA6,0xA6,0x12,0x3A,0xDA,0xB7,0xE6,0xAA,0xDA, + 0x8D,0xB3,0x05,0x0E,0x10,0x15,0xBD,0x1B,0xA5,0xF9,0x83,0xD7,0xCC,0x00,0x67,0x67,0x1C,0x32,0x30,0x1C,0x1A,0xD8,0x18,0x32,0x2E,0xAB,0xD7,0x28,0x64,0x03,0x2D,0x6E, + 0x12,0x5D,0x8C,0x43,0x12,0xB5,0x41,0x83,0xDB,0x03,0x9C,0xDB,0x29,0x91,0x32,0xB5,0x94,0xDC,0x28,0xDA,0x1A,0xA8,0xEE,0x90,0x08,0x08,0xA4,0xA7,0x96,0x00,0x1B,0xCC, + 0xF2,0x5C,0x84,0x81,0xDB,0x79,0xE4,0xA9,0xF0,0x20,0x17,0x40,0xDB,0x10,0xC1,0xDB,0x1F,0x82,0x82,0x0C,0x80,0xDB,0x8E,0xDE,0xAB,0x8B,0xC1,0xB5,0x4B,0x49,0x9E,0x57, + 0x97,0x82,0xC1,0xB3,0xB2,0x03,0xB5,0xA0,0xBA,0x48,0x25,0xBC,0xFF,0x04,0x1A,0xF9,0x18,0x20,0xB7,0x30,0x2A,0xC0,0xEE,0x0B,0xD2,0x68,0xDB,0x28,0xD4,0x2A,0x10,0x74, + 0xA2,0x91,0x8C,0x2A,0xAE,0x6A,0x8C,0xEC,0xC7,0x94,0x03,0xDB,0x15,0xAC,0x15,0xC7,0xB3,0x80,0xDB,0x1C,0x67,0x1D,0x61,0x1D,0xD9,0xE8,0x01,0x97,0x2E,0x0B,0x2E,0x64, + 0x43,0x64,0x00,0xDD,0xC3,0x5D,0xA4,0x91,0x8A,0xED,0x41,0xF2,0xD9,0xD6,0xF0,0x70,0xDB,0xB2,0xB6,0x88,0xDB,0x00,0xB7,0x9A,0x24,0x02,0x42,0x02,0x61,0xDB,0xDD,0x98, + 0x3E,0xCC,0x94,0x96,0xDB,0x02,0x75,0xEB,0x6B,0x97,0xEC,0xB8,0x2B,0xAD,0x9D,0xCC,0xE8,0xDB,0x29,0xF0,0x70,0xDB,0xEF,0x85,0xCC,0x0A,0xDB,0x02,0xEA,0xDE,0x83,0xDC, + 0xCA,0x06,0x0C,0x9C,0x58,0xF1,0x5A,0xDA,0xAD,0xB3,0xD9,0x69,0x9E,0x2E,0xF7,0x24,0xDB,0x0C,0xC7,0x12,0x25,0x85,0xDB,0xAA,0xF0,0x04,0xC3,0xF7,0x12,0xA8,0x89,0xC2, + 0xCF,0x50,0xFB,0xE4,0x00,0xDB,0x07,0x03,0x03,0x7F,0x2B,0x00,0x35,0xB7,0xC8,0xAB,0x07,0x1F,0x13,0x22,0x20,0xDD,0x6A,0xEC,0x1A,0x0A,0x0B,0x19,0x1D,0x2E,0xDA,0x0C, + 0xBF,0xB2,0xC0,0xA4,0x8C,0xD5,0xEC,0x64,0x45,0x05,0x6E,0x2F,0xAA,0xED,0x8C,0xC3,0xDB,0x00,0xB9,0xA8,0x48,0x4A,0x91,0x8A,0x6C,0x00,0xB5,0xF0,0x94,0xDB,0x04,0xA5, + 0x5B,0x0D,0x2A,0xDB,0x19,0xB7,0x53,0xCC,0x85,0x8F,0xCA,0xE6,0x76,0x80,0xDB,0xEB,0x5E,0x81,0xBC,0xE1,0xD2,0x93,0xE5,0xA9,0x15,0xBB,0xCC,0x0C,0x7D,0xC8,0xB6,0x15, + 0x8E,0xB0,0xDB,0x61,0xEB,0xDC,0xE9,0x06,0x8A,0xBB,0x00,0x16,0x13,0xEF,0x59,0x9E,0xD5,0x47,0xA7,0x55,0x2A,0x0E,0x48,0x10,0xA0,0x9A,0x04,0x4B,0x52,0xAA,0xE8,0x0F, + 0xE5,0xB2,0xE4,0xE8,0x05,0xDC,0x28,0xD5,0xAA,0x07,0xAC,0x00,0xBE,0xAE,0x0A,0xA9,0xFD,0x1E,0x51,0xA5,0x84,0xDA,0x50,0xDB,0x0B,0x1C,0x0B,0x1C,0xEF,0x5D,0xE8,0x56, + 0x64,0xE8,0xB3,0xE0,0x00,0xD8,0x43,0x69,0x43,0x8C,0x45,0xB5,0x41,0xDC,0x61,0xDB,0x69,0x96,0x30,0xDA,0x58,0xDB,0x30,0xD0,0xDB,0x6B,0xA8,0xEE,0x0A,0x74,0xB9,0x8E, + 0xCD,0x24,0x29,0x5B,0x82,0x94,0x1D,0x76,0x00,0x02,0xDB,0x52,0x40,0xDA,0x90,0xDB,0x37,0xCC,0x93,0xBE,0xB7,0xD5,0xA0,0xDB,0x4A,0x16,0xDB,0x18,0xE2,0x52,0x9B,0x69, + 0xA8,0xC4,0x00,0xBE,0xCF,0xC7,0x16,0xF9,0x75,0x0E,0x49,0x93,0xF6,0x00,0x0E,0xF1,0xB4,0xF3,0xB6,0xC2,0x14,0xD9,0x1B,0xA7,0x52,0xC5,0x5A,0x21,0x4B,0x70,0xDD,0x92, + 0x08,0x92,0x41,0x1F,0x61,0x00,0xDB,0x76,0x05,0xDB,0x17,0xA1,0x2A,0x1C,0x90,0x4A,0xB6,0x2A,0xB0,0x28,0x90,0xDB,0xC8,0xB6,0x51,0xE9,0x60,0x51,0xD8,0x9E,0xB0,0xDC, + 0x98,0xB6,0xB0,0xDB,0xFA,0xBA,0x42,0xB6,0xAC,0xDF,0xC3,0xDB,0x92,0x41,0x98,0x53,0x08,0x0A,0xAA,0xEF,0x02,0xDC,0xCC,0x82,0xCC,0x58,0xCA,0xDB,0x2F,0x75,0xE2,0x26, + 0xDB,0x05,0x2B,0x1A,0x00,0x21,0x15,0x00,0x34,0x42,0xB7,0xC1,0xA3,0x6D,0x61,0xD6,0x38,0xDB,0x59,0xB9,0x2C,0xB3,0xCA,0x12,0x0A,0x4C,0xA5,0xA1,0xAF,0x85,0xDB,0x01, + 0xC7,0x33,0x39,0x5B,0x08,0x8C,0x74,0x23,0xBA,0xF6,0xDA,0x1F,0x3B,0x13,0x4B,0xDE,0x2E,0xA5,0xD8,0xD3,0x77,0x06,0x3F,0xA5,0x00,0x10,0xDC,0x0C,0xD5,0x25,0x05,0xBA, + 0xFE,0xC2,0xD7,0x9D,0xC8,0x54,0xA4,0x98,0x81,0xD8,0x82,0xDE,0x49,0x40,0xD9,0xC5,0x02,0x51,0xEC,0x95,0x04,0xDB,0x8F,0xC9,0x85,0xDA,0xE1,0x00,0xDA,0xC8,0x00,0xB6, + 0x4C,0xA3,0xB6,0x8A,0xDF,0xDA,0xDD,0xCD,0xCA,0xD0,0x4F,0xA5,0x83,0x87,0x02,0x08,0x12,0x4F,0xA8,0x25,0xD8,0xD7,0x2A,0xF0,0x76,0x57,0xCC,0xB5,0xEE,0xB2,0xB7,0xD4, + 0x00,0x5F,0xDC,0x0A,0x25,0xDB,0x0A,0xB4,0x06,0x16,0x05,0x8E,0xED,0x02,0x00,0x25,0x61,0xBC,0x41,0xA7,0x72,0x95,0x4B,0xB5,0xEA,0x90,0x95,0xBA,0x0C,0xB0,0x4E,0x16, + 0xAE,0xAD,0x9F,0xEC,0x24,0xD2,0x37,0x33,0x07,0xDC,0x07,0x4B,0x2A,0x0A,0x13,0xA6,0xB4,0xD5,0x09,0x34,0x39,0xAE,0x00,0x34,0x00,0xB5,0xBE,0x1F,0x4C,0xCE,0x5C,0x98, + 0xE1,0x17,0x26,0xFD,0x57,0x00,0xBE,0xD0,0xDF,0x17,0xB2,0xD2,0x00,0xE0,0x8C,0x41,0x95,0xD3,0x94,0xB7,0x26,0x95,0x92,0x9C,0x09,0x97,0x82,0x20,0xDA,0x5C,0x00,0xA5, + 0xB7,0x79,0xDD,0x6A,0xEE,0x00,0x85,0x80,0xDB,0x1B,0x12,0x09,0x07,0x53,0x97,0xD8,0x13,0x94,0xBD,0xEB,0xDB,0x0E,0x00,0x40,0xDB,0xE5,0xA8,0x17,0xD1,0x93,0x15,0x21, + 0xCD,0x91,0x06,0xDB,0x94,0x0A,0x10,0xA8,0x05,0x21,0x05,0xDC,0x06,0xA2,0xCA,0x15,0x91,0x79,0x97,0x78,0x13,0xA9,0x61,0xDB,0x2C,0x81,0xDC,0xA4,0xC8,0x8B,0xD8,0xF0, + 0x7B,0x83,0xD9,0x08,0xF3,0x5D,0xF3,0x64,0xF3,0x0C,0x5E,0x01,0x9C,0xD8,0xDB,0x2B,0x15,0x39,0x10,0xAB,0x39,0xDB,0x0C,0x4E,0x10,0x17,0xBF,0x9B,0xB9,0xA6,0x9C,0xDB, + 0x2A,0x06,0x89,0xB8,0x0B,0x95,0xB6,0x77,0xBB,0xBC,0xC5,0x49,0x6E,0x80,0xDB,0x43,0xE9,0xE9,0x64,0x6E,0xB1,0xE9,0x60,0x4A,0xDB,0x43,0x98,0xDB,0x12,0x91,0x05,0xDA, + 0xDA,0x83,0xE4,0x81,0xDB,0xBD,0x41,0xDB,0xAB,0xEE,0x5B,0xEE,0x58,0x50,0xDA,0x24,0xF1,0x0D,0xCC,0xD2,0xAF,0xCE,0xA9,0xB7,0x5D,0x00,0x75,0xBF,0x83,0xDC,0x52,0xC1, + 0xE7,0x19,0xC3,0xCD,0x0C,0xCA,0xF2,0xB7,0xDD,0xD5,0x0C,0x41,0x90,0x63,0xFA,0x44,0x00,0x2B,0x0C,0xA4,0x8E,0x09,0xB3,0xE8,0xBE,0x95,0xD1,0x86,0x1E,0xE5,0xCF,0x54, + 0x13,0xCA,0x96,0x6D,0x2B,0xFC,0x16,0x00,0x0C,0xA3,0xF2,0xB3,0xFF,0xF9,0x36,0xE7,0xF0,0x0D,0xFA,0xB2,0xF7,0xEA,0x13,0x17,0xA8,0x20,0xD9,0x29,0x53,0x17,0x60,0xDC, + 0x1F,0xB2,0xB7,0xC2,0xCF,0xB5,0x07,0x00,0x1A,0xA9,0xEF,0x1C,0x2E,0x4A,0xF2,0x2D,0xB5,0xEE,0x1B,0x2F,0x6E,0x6E,0xC5,0xE5,0xB2,0xAA,0xEB,0x41,0xF9,0xB8,0x41,0xDA, + 0x00,0xEC,0xD2,0x8C,0x51,0xB8,0x5D,0x81,0x94,0x77,0x77,0xC9,0xFA,0xEE,0xAD,0xE6,0xEE,0x42,0x22,0x08,0x31,0x12,0x14,0xDB,0x04,0x08,0xC0,0xDB,0xCA,0x4D,0xC5,0xE1, + 0x95,0x00,0x6B,0xF1,0x9F,0x04,0x17,0x5F,0x00,0x75,0x61,0xDB,0x61,0x90,0x84,0x8F,0xA0,0xB4,0x16,0xB3,0xF5,0xF3,0x97,0xD7,0xCA,0xD4,0xEB,0xA7,0x76,0x33,0x08,0x03, + 0xA5,0xC7,0xB0,0xDB,0xC9,0x00,0x2B,0x16,0xBC,0x00,0x35,0xDA,0x3B,0x00,0xA2,0x2A,0x2C,0x7A,0x10,0x09,0x1D,0x2B,0x60,0xDB,0x4A,0x16,0xDB,0x07,0x15,0xCD,0x5C,0x20, + 0xDB,0x2E,0x0B,0x00,0xE6,0xA0,0x60,0xDB,0xB9,0xA9,0xB9,0x00,0x40,0xDB,0x95,0x95,0xC1,0xDB,0x58,0x41,0xDB,0xD4,0xFE,0x50,0xDB,0x5A,0x91,0x61,0xDB,0x49,0x91,0xAD, + 0xEE,0x80,0xDB,0x97,0x22,0x07,0x85,0x82,0xDB,0xC9,0x00,0x24,0xC1,0xC3,0xDB,0x00,0xB0,0xDB,0x50,0x6D,0xDB,0x14,0x5E,0x20,0xDA,0x36,0xDB,0x0B,0x21,0x8A,0x4B,0xDB, + 0x0B,0xDC,0x0D,0x04,0x25,0x5E,0xF1,0x4B,0xB7,0xA9,0xC2,0xB9,0xDE,0xB3,0xAB,0xE1,0xB2,0xCB,0xB1,0x7E,0x0E,0xD2,0x93,0x49,0x9A,0xB7,0x26,0x16,0x1F,0x7D,0x21,0x03, + 0x05,0xDB,0x0E,0x89,0xF8,0x15,0xED,0x3F,0x14,0x0A,0x68,0x9A,0x34,0xA2,0x06,0x15,0x67,0x50,0xDB,0xFC,0x00,0xD6,0xD8,0x00,0x0B,0xD1,0x4E,0xDD,0x14,0xD2,0xEB,0x2D, + 0xBB,0xEB,0xED,0x59,0x41,0xDB,0x41,0xE2,0xDE,0x85,0x20,0xDB,0x12,0x6C,0x3D,0xCA,0x85,0xDA,0xE6,0xDC,0x92,0x92,0x3E,0xCA,0xFC,0x70,0xA8,0xD7,0x5E,0xF4,0x35,0x7A, + 0xF0,0x11,0xA5,0xD7,0xCF,0x20,0xDB,0x52,0xB4,0x93,0xC8,0xB7,0x17,0x35,0xA0,0xDC,0x4A,0x21,0xDB,0x09,0x0C,0x75,0x00,0xA7,0xA0,0xDB,0xCB,0xB1,0x00,0x4A,0x33,0xA3, + 0x96,0xB9,0x5E,0xA8,0x0B,0xEA,0xEA,0x8E,0xEB,0x05,0x16,0xBF,0xE2,0x04,0x71,0x2C,0x21,0xDB,0xD8,0x18,0xCF,0x13,0x2B,0x6D,0x7C,0x43,0x0B,0x06,0x81,0xDB,0x87,0xDA, + 0xE2,0x74,0xDB,0x0C,0x3A,0xCE,0x1E,0x19,0x61,0xDC,0x16,0xD3,0x17,0xA8,0x29,0x54,0x03,0xDB,0x85,0xB5,0x51,0xAA,0xED,0x51,0x82,0xDB,0x91,0x8D,0x58,0x4B,0x00,0x4A, + 0xB8,0xE5,0x91,0x86,0xDB,0xB4,0x4B,0x91,0xD9,0x05,0xA0,0xDF,0x80,0xA5,0x2A,0xDA,0xEE,0x54,0x24,0x2C,0xEE,0xAB,0x00,0xD1,0xE0,0x02,0x22,0x9A,0xAF,0x65,0xD7,0xB8, + 0x87,0xDB,0x00,0x4F,0xCD,0x60,0xDA,0x20,0x50,0x6D,0xDB,0x1F,0x2B,0x20,0x03,0x78,0x86,0x86,0x90,0xFE,0xE8,0x73,0x04,0x98,0x00,0x3A,0x13,0xD7,0x50,0xE2,0x76,0x08, + 0xD9,0x15,0x03,0x90,0xB7,0x16,0xEA,0xEB,0x25,0x8E,0x3A,0xAB,0x99,0x82,0xDB,0x92,0xC0,0x92,0x8E,0xEA,0xF7,0x86,0x84,0x50,0xDB,0x55,0x2B,0x05,0xD4,0x3E,0x48,0x85, + 0xB8,0xA5,0x58,0x01,0xE6,0x5C,0xDB,0x28,0xC3,0x70,0xDC,0x4A,0x32,0xDC,0x0C,0x54,0xBB,0x96,0x2E,0xDB,0x0D,0x43,0x95,0x16,0x43,0xDB,0x18,0xD8,0x47,0x06,0xDB,0xDC, + 0x12,0x05,0xDA,0xA5,0x92,0x06,0xDB,0xCA,0xFA,0xEE,0xDF,0xB9,0x10,0x08,0x02,0xB8,0xDB,0x68,0x94,0x5B,0x50,0x98,0xDB,0x26,0x99,0xDB,0x05,0x81,0x86,0xDB,0x93,0x9C, + 0xAA,0xD8,0xDB,0x65,0xBD,0x86,0x8D,0x90,0xA8,0x01,0x80,0xDB,0x6E,0x21,0xA5,0x3A,0x61,0x10,0xF0,0x25,0xDD,0x59,0xBB,0x50,0xD4,0x28,0x8E,0xB7,0x93,0x25,0xCB,0x00, + 0xED,0x55,0x05,0x57,0x2B,0x08,0x69,0x93,0x40,0xCA,0x35,0xB0,0xDB,0xA0,0xF2,0x94,0xDB,0x1D,0x10,0x09,0xAD,0xE6,0x3E,0xBF,0xCB,0xF9,0x99,0xE5,0x6E,0xCD,0x67,0x94, + 0xAF,0x9D,0xBE,0xCD,0xA7,0x86,0xDB,0xD7,0x1D,0x02,0x84,0xDB,0xA1,0xD8,0x41,0xDA,0x60,0xDB,0x95,0x50,0x3D,0xDA,0x4A,0xB6,0x57,0xB7,0xD2,0x83,0xDB,0xAF,0xEE,0x52, + 0x31,0x07,0x16,0xDB,0x05,0x7A,0x93,0x15,0x1B,0x4C,0x5C,0x85,0x49,0xB7,0x14,0x5E,0x6D,0xDB,0x15,0xAC,0x35,0xCF,0x19,0x86,0x44,0x16,0xB7,0x9F,0x05,0x01,0x1F,0x1F, + 0xE5,0x0F,0xF6,0x10,0x11,0x9A,0x52,0x4F,0xB5,0xCE,0x9C,0x17,0x78,0xDC,0x56,0xE2,0x49,0x15,0x2A,0xEF,0xE2,0x92,0x15,0xA9,0x33,0x81,0xDB,0x10,0x87,0xDB,0x00,0x28, + 0xDB,0x64,0xB7,0x34,0x28,0x01,0x17,0xCB,0x6B,0xD5,0x24,0xDA,0x0C,0xB4,0x8B,0xAB,0xAB,0xB3,0x2F,0x00,0xBA,0x29,0x41,0xDB,0x41,0x16,0xDB,0x09,0x3D,0x82,0xDB,0xB3, + 0xDB,0xDA,0x0C,0xDB,0x2D,0xCA,0xDA,0x98,0xEE,0xB5,0x4F,0xEE,0x43,0x1B,0x40,0xDB,0x53,0x60,0x9A,0xDB,0xCA,0xC3,0xDB,0x00,0x92,0xA8,0x6C,0xB8,0xAC,0xDB,0x34,0x98, + 0x50,0x35,0xDB,0x50,0x94,0x60,0xBE,0x2B,0x98,0xDA,0x31,0xFB,0xC3,0xDB,0xAE,0x0C,0x9A,0x14,0x34,0xCE,0x54,0xF1,0x77,0x87,0x25,0x01,0x19,0x15,0xA0,0xBD,0xE5,0x69, + 0x00,0x09,0x34,0x13,0xA8,0x17,0xDD,0xBC,0x2B,0x41,0xDC,0x53,0xA3,0x69,0x9F,0xA2,0x0F,0x0B,0x03,0xDB,0x37,0xF2,0x3C,0xAC,0xA0,0xDB,0xFE,0x44,0x4B,0x27,0x50,0xDB, + 0x4E,0xCD,0xDB,0x0C,0x2D,0xDA,0x25,0xDB,0x0E,0x07,0xC9,0xB8,0x41,0x53,0x00,0x86,0xDB,0xFB,0xB6,0xC7,0xF3,0x84,0xDB,0x85,0xB7,0x91,0xB6,0xD7,0x97,0xE4,0xDD,0x30, + 0xDB,0x09,0x08,0x05,0x02,0x0D,0x4C,0x98,0x12,0xB8,0x76,0xCB,0xB8,0xB9,0x2D,0x00,0x20,0x45,0xB8,0x5D,0xC3,0x5C,0xC0,0x17,0xA6,0x08,0x2B,0xF4,0x2B,0x0C,0x86,0x0B, + 0xBB,0xA5,0x17,0x50,0x07,0xEC,0xD0,0xE6,0x5F,0xDC,0xD0,0xC3,0x55,0xDA,0x55,0x06,0xDD,0xA1,0xCB,0x08,0x83,0x36,0xAF,0x5E,0x33,0xDC,0x16,0xFF,0x6F,0x10,0x07,0x45, + 0x7F,0x21,0x1A,0x1D,0x00,0x70,0x8C,0x21,0xB6,0xC0,0x98,0xB7,0xAC,0xBA,0xB4,0x84,0x7B,0x54,0xC7,0x92,0xB6,0x64,0xE6,0xA5,0x49,0xA1,0x9A,0x00,0x8A,0xB4,0xCA,0xB7, + 0x54,0x95,0xB9,0xA3,0xEE,0x00,0xFF,0xAD,0xCA,0xD6,0xA0,0xDA,0x0C,0xB9,0xDB,0x29,0x92,0x39,0xA5,0xD1,0x92,0x08,0xAD,0xEF,0x43,0x02,0x41,0xDB,0xCD,0xA9,0x14,0xB8, + 0x40,0xDB,0x6F,0xC8,0x12,0xDB,0x1E,0x00,0xDB,0x0B,0x21,0xF3,0x1A,0x90,0x0C,0x96,0x0B,0x2B,0x10,0x96,0xE4,0x10,0xC1,0xD8,0x59,0x00,0xFB,0xF7,0x0C,0x09,0x33,0xBD, + 0xA4,0x34,0xA8,0xBA,0x1F,0xA4,0x92,0xB4,0xC7,0xEF,0x10,0xA7,0x92,0x01,0x04,0xDB,0x92,0xE8,0x19,0xAD,0x4C,0xC5,0xE6,0x00,0xEF,0x49,0x05,0x83,0xBC,0xDB,0x16,0x1D, + 0xB4,0x49,0x1A,0x41,0xDB,0x43,0x26,0x00,0xDA,0x14,0xD8,0x17,0xB4,0xD6,0xDA,0x16,0xDB,0x08,0x91,0x80,0xDB,0xB9,0xA4,0xA4,0x93,0xA9,0xA6,0xE7,0xA5,0x92,0x4B,0xD8, + 0x08,0x64,0xDB,0x35,0x03,0x1B,0x4A,0xA9,0xD8,0x54,0x94,0x9C,0xDC,0x2C,0xDB,0x15,0x17,0x87,0x75,0x00,0x86,0xDC,0xCB,0xF4,0x84,0x4A,0x0B,0x92,0x2B,0xC4,0x7E,0xD4, + 0x1D,0x0B,0xDB,0x65,0xBB,0x5D,0x85,0x55,0x04,0x1B,0xCC,0xB4,0x81,0xEA,0x25,0x05,0x4B,0x15,0x07,0xD8,0x2F,0xDB,0x5A,0xDB,0xB0,0x15,0xCD,0xD2,0x05,0x3A,0xB7,0xAF, + 0xF1,0x3C,0x96,0x6A,0x04,0x19,0x00,0xD5,0x08,0x1C,0xB3,0xD5,0x03,0x66,0x04,0x54,0x54,0x93,0x96,0xEC,0xB5,0x00,0x27,0xB8,0x2B,0x8C,0x00,0xDD,0x0B,0xD7,0x0B,0x03, + 0xA4,0x8D,0xA0,0xDB,0x2C,0xE9,0xE9,0xDA,0x26,0x82,0xBB,0xDB,0x0D,0x92,0x2C,0xB6,0xAA,0xA5,0x61,0xE0,0xDB,0xC1,0xFB,0xC1,0x32,0x94,0x4C,0xDB,0x1A,0x82,0xCA,0xDB, + 0x0B,0x2B,0xDA,0x0A,0xB8,0x23,0x15,0x6D,0x0C,0xC2,0x8F,0xCB,0x8C,0x0D,0xAC,0xF5,0xEA,0xDA,0xC2,0xDB,0xC3,0xD1,0xEF,0x3A,0x94,0x24,0x3A,0xBC,0x00,0xC1,0xF6,0x10, + 0xD2,0x56,0xC5,0x58,0xDB,0x5B,0xA7,0x75,0x02,0x0B,0xD4,0x00,0x21,0x89,0x92,0x86,0xDA,0x97,0x39,0x03,0x01,0x5F,0xF4,0x00,0x36,0xDB,0x13,0x04,0xDF,0x94,0x00,0xB2, + 0x56,0x00,0x1D,0xA0,0xD9,0xAE,0xB5,0x92,0x00,0xD6,0xEC,0x40,0xDF,0x73,0x95,0x00,0x02,0xDB,0x91,0x82,0xDB,0xFA,0xB8,0x45,0xED,0xA0,0xDB,0xC9,0xB6,0x22,0x61,0xD8, + 0x61,0xC2,0x0C,0x07,0xDB,0x03,0x7D,0xBE,0x79,0xE2,0xF4,0xBD,0x70,0xDB,0x26,0x17,0xDB,0x0F,0xA1,0x2C,0xDB,0x38,0xF0,0xF5,0x0F,0x12,0x01,0x84,0xDB,0xA4,0xA8,0x21, + 0xB0,0xDB,0xE4,0x00,0xDA,0x0A,0x88,0x6B,0xE6,0x7A,0xE0,0x0E,0xBA,0x4E,0x35,0x15,0x17,0xC2,0xDB,0xAF,0x10,0x12,0x1A,0xD2,0x05,0x01,0x93,0xB0,0x01,0x32,0xA3,0x8E, + 0x15,0x21,0x54,0x0B,0x0F,0x61,0xD5,0x95,0xAF,0xD0,0x03,0xD6,0x75,0xFE,0x39,0xB8,0x52,0x92,0x30,0x9E,0xDB,0x9B,0xBB,0xA8,0xB6,0x90,0xE9,0x90,0xDB,0x3D,0xD0,0x00, + 0x92,0x1B,0x98,0xC9,0xCE,0xC2,0x10,0xB5,0x00,0x8B,0x18,0x9F,0xAC,0xAF,0xB8,0x24,0x75,0xA1,0xDC,0xCC,0xAB,0xE9,0x93,0x54,0x00,0xDB,0x19,0xAD,0x50,0xDB,0x61,0x8B, + 0x62,0xF9,0x21,0xD6,0x0F,0x15,0xCE,0x12,0xB0,0x00,0x1F,0xAB,0xA5,0xFF,0xAA,0xD4,0xB0,0xD9,0xA0,0xC0,0xB5,0xE2,0xED,0x15,0xC0,0xFA,0x2E,0x88,0x69,0x2E,0xBB,0x70, + 0xDB,0xA0,0xD8,0x5E,0x21,0x00,0xB3,0x55,0x53,0x28,0xE6,0x2D,0x0B,0x87,0x2C,0xDB,0x0E,0x32,0x64,0xFC,0x92,0x67,0x04,0xDC,0x95,0xFF,0x81,0xD5,0x8C,0x9E,0x61,0xDB, + 0x85,0xD0,0x06,0xDB,0xDC,0x1D,0x00,0xAC,0xEE,0x78,0xDB,0x01,0xDF,0xCF,0xA5,0x9A,0x53,0x08,0x0F,0x05,0xDB,0x81,0xDE,0x9F,0x4C,0x64,0xB8,0x99,0xB0,0xDC,0x90,0xB8, + 0xA7,0xCB,0x7A,0x00,0xC1,0x8D,0x2B,0x78,0x00,0xD1,0x2C,0x0B,0xAA,0x2F,0xEB,0x28,0xE5,0x25,0xD9,0x0F,0x00,0xCA,0xAB,0xD2,0x0F,0x11,0x0B,0xBE,0x05,0x00,0xBA,0xD6, + 0xE7,0x9B,0x3E,0x98,0xDB,0x2E,0x94,0x6E,0x00,0x40,0xDB,0xAB,0x49,0x53,0xE7,0x97,0x94,0x47,0x54,0x0B,0xAE,0xE5,0xA1,0x8B,0x1A,0xAD,0x2B,0xB7,0x24,0xAB,0x48,0xDB, + 0x7C,0xB7,0x51,0xCA,0x00,0x46,0x9E,0xF0,0x5A,0xB0,0x2B,0xDB,0x0B,0xA4,0x97,0x79,0x02,0x61,0xDA,0x28,0xDB,0x30,0xA3,0xDB,0x68,0xBD,0x93,0xDA,0x64,0xD7,0xB6,0x0D, + 0x70,0x08,0x00,0xF1,0xB5,0x6F,0x1D,0x9F,0xE2,0x12,0xAF,0x84,0xDB,0xB3,0xAA,0x12,0xDB,0x18,0x89,0x58,0xDB,0x48,0xA4,0x12,0x87,0xAA,0x02,0x9A,0xCE,0x15,0x60,0xDA, + 0x97,0x00,0xCC,0x0F,0x0F,0x04,0xB7,0xE6,0xC2,0xBE,0xAF,0x81,0x26,0x58,0x6D,0xDB,0x69,0xA8,0x53,0xA4,0x45,0xE3,0x65,0xCC,0xD2,0x0C,0x93,0x78,0x1C,0xDA,0x5D,0x54, + 0x4E,0x96,0xBC,0xE6,0x5F,0x21,0xCA,0x18,0xDD,0x2B,0x32,0x0B,0x8D,0x4A,0xDC,0x0C,0xDA,0x1D,0xCD,0x02,0x07,0xD9,0x01,0x44,0xAF,0xE9,0xE6,0x00,0xDB,0x09,0x1E,0xC7, + 0xC1,0xDC,0x79,0xD9,0x00,0xBA,0x77,0x03,0x80,0x72,0x2E,0xEE,0xB6,0x4F,0xD8,0xDC,0x1B,0x07,0xA9,0xC3,0x61,0xDB,0x37,0xC3,0x64,0xB8,0x98,0xC9,0xB8,0x99,0x85,0xDC, + 0xAE,0xF2,0xB6,0x53,0x26,0x96,0x87,0x0C,0x6D,0xDB,0x30,0x91,0xB9,0xAE,0x92,0xC8,0xB3,0xCD,0xA0,0xA3,0xB3,0xE5,0xB2,0x8D,0xB8,0xF1,0x65,0x1D,0xB8,0x8D,0xFC,0x23, + 0x94,0x15,0xEE,0x5F,0xBA,0x2E,0xD4,0x56,0x01,0xCB,0x19,0xB6,0x29,0xEA,0xF1,0xEC,0xF4,0xE6,0x2D,0x2D,0x21,0x5F,0xEB,0x6C,0xD6,0xA9,0x48,0x21,0x54,0xF4,0x67,0x50, + 0x54,0xDF,0x28,0x54,0xA6,0xA8,0xAE,0xAC,0xDE,0x30,0xDF,0xBA,0x04,0x8F,0x4B,0xDB,0x0D,0x9F,0x12,0x51,0xDC,0x00,0xA4,0xCA,0xDA,0x16,0xB4,0x5A,0x00,0x6C,0x62,0xB5, + 0xA2,0xB6,0xAB,0x80,0xE4,0xA5,0x5B,0x24,0x20,0x7A,0x00,0x88,0x00,0x7A,0x1B,0xB7,0xCD,0x47,0xC5,0x86,0xDB,0x00,0xCD,0xCA,0xB6,0xE6,0xAD,0x50,0xDB,0xCE,0xEC,0xD2, + 0x8F,0x4C,0xAB,0xB0,0xDB,0xC1,0xA5,0x54,0x40,0xDB,0x19,0xB2,0xB8,0xCB,0xA3,0x0F,0xB4,0xBF,0x92,0xEA,0xAD,0xEE,0x6D,0xD9,0x6A,0x2C,0xE9,0x2D,0xA3,0xB9,0x3D,0x43, + 0xDC,0x09,0xCF,0x86,0x8A,0x44,0x67,0xC1,0xDB,0x45,0xB2,0x49,0x8B,0x61,0xD5,0x16,0xDB,0x16,0xE8,0xB5,0x9F,0x32,0x85,0xDC,0xCA,0xA3,0x4A,0x60,0xDA,0xB0,0xDC,0xB2, + 0xB5,0xE4,0x00,0xED,0x50,0xB7,0x98,0x4C,0x9F,0x82,0x40,0xDB,0x09,0x02,0x08,0x24,0x5B,0xB1,0xE2,0x75,0x30,0xDB,0x4A,0xDC,0x14,0xB7,0x54,0x90,0x55,0x82,0x76,0x83, + 0x55,0x87,0xD4,0x82,0x56,0x09,0x16,0xA0,0xB2,0xF0,0x0E,0xB0,0x2F,0x1A,0x0B,0xBE,0x3E,0x0B,0x02,0xEB,0xDD,0x92,0x6E,0x19,0xEB,0x00,0xFC,0xFB,0x02,0xE1,0xC4,0x0B, + 0xAF,0xFF,0x82,0xEB,0x21,0x60,0xDC,0xCA,0xCD,0x94,0xE6,0x5F,0xCD,0x45,0xCD,0x85,0xDB,0xAC,0xE5,0xE1,0xDB,0xD8,0x00,0xDB,0x5E,0xD8,0x4A,0xB9,0x5A,0x9D,0x5B,0xC9, + 0xCC,0xDA,0x14,0xDC,0x16,0xC8,0xF6,0xC9,0xEA,0xDF,0xDC,0xCE,0x80,0xC8,0x7A,0x08,0x24,0xDB,0x0C,0xDC,0x13,0x4C,0x65,0xE2,0x92,0xB8,0x5E,0x79,0xAB,0x52,0x6D,0x97, + 0x56,0x8E,0x65,0x87,0x59,0xC8,0x56,0x83,0x2B,0xEE,0x0E,0x08,0x40,0xDB,0xBC,0xB0,0xAF,0xD5,0xF7,0x0F,0xA8,0xFF,0x05,0x0D,0x0A,0x0D,0xB7,0xDB,0xBC,0xC9,0xA0,0xDA, + 0xEC,0x00,0xDB,0x29,0xBE,0xFF,0x03,0x22,0xA2,0x1A,0xAB,0xB9,0x3F,0x00,0x06,0x0E,0xAB,0x1B,0xDB,0x09,0x52,0x00,0xAB,0xE8,0x06,0x9B,0x64,0x88,0xB8,0xED,0xE8,0x6C, + 0xB6,0xB2,0xB1,0xAB,0x82,0xA9,0x05,0xA6,0xA4,0xE6,0xA1,0xC2,0xDC,0x50,0xDB,0xAE,0xB7,0x3E,0xCF,0xA8,0xB7,0x61,0x9F,0xB5,0x04,0x61,0xDB,0x42,0x80,0x22,0xDC,0xCD, + 0xCC,0xCF,0xB4,0x94,0xF0,0x00,0xDC,0xB4,0x98,0x90,0xDB,0x28,0xB1,0xAF,0xEB,0x68,0xDB,0x3A,0x00,0xB8,0xEB,0x0F,0xC3,0x9F,0xD8,0x0A,0x92,0x2B,0xC6,0x0D,0x03,0x01, + 0x5D,0x86,0x28,0xDB,0x6B,0xF8,0x61,0xDB,0xD1,0x11,0x9D,0x61,0xFA,0x2A,0x8E,0x73,0x03,0x85,0xDB,0xD8,0x09,0xD7,0x65,0xEA,0xD9,0x04,0xB7,0x22,0x1D,0xA9,0x00,0xA2, + 0x32,0xBD,0x69,0x64,0x00,0x2E,0xC2,0xDA,0xF2,0xD8,0xEC,0x00,0xDB,0x2D,0x92,0x2E,0xFB,0xAE,0xA2,0x66,0xDB,0x06,0xB4,0xDB,0x16,0xED,0xB9,0xB6,0x20,0x08,0x9C,0xDB, + 0x03,0x07,0x0D,0x4C,0x82,0x94,0x49,0x14,0xF1,0xEB,0xEB,0x72,0x6B,0x00,0x95,0xB8,0x5D,0x8C,0x2C,0xBA,0x99,0xE6,0xC8,0x02,0xDB,0x1D,0x07,0xAD,0xC8,0x92,0xB3,0x10, + 0xF2,0xDA,0x94,0xF4,0x1F,0x5C,0xB2,0xAE,0xA3,0xF1,0xA0,0xDC,0x93,0xA1,0xBE,0x1D,0x00,0xCA,0xC7,0x4E,0x0B,0x15,0xD2,0x93,0x50,0xDB,0xBA,0x05,0x82,0x1A,0xCB,0x09, + 0x12,0x83,0x60,0xDA,0x76,0xCD,0x00,0xDA,0x14,0x00,0x43,0xB7,0xC9,0x91,0x8C,0x27,0xDB,0x04,0xE9,0xCA,0xEE,0x6C,0xE2,0x01,0x41,0xDB,0xB9,0x65,0xB6,0xAD,0xED,0x5C, + 0x80,0x12,0x06,0xDB,0x24,0x4F,0x04,0x4F,0x53,0xB0,0x8F,0xD7,0x48,0xDB,0x4C,0xB8,0x53,0xF2,0xC2,0x2B,0x9E,0x9F,0xC3,0xDC,0x00,0xB3,0xED,0x90,0xBD,0x2F,0xDA,0x28, + 0xCC,0x13,0x0B,0x85,0xDB,0x85,0xB7,0xBF,0xB7,0x07,0xA4,0xB4,0xC0,0xDB,0x21,0xB2,0xDC,0xB9,0x13,0x53,0x92,0x39,0xFA,0x08,0x23,0xF2,0x54,0x1D,0x68,0xDB,0x4E,0xDA, + 0x1C,0x00,0xA0,0xDB,0x95,0x88,0x00,0x98,0xDB,0x09,0x79,0x6C,0x96,0xF0,0x62,0xB6,0x91,0xED,0x42,0x07,0x00,0x1B,0x00,0x09,0x40,0x00,0x31,0x07,0x24,0xAC,0x8F,0xCC, + 0xC2,0xDB,0xF3,0xE3,0xDB,0x05,0xD6,0xAD,0xF4,0x05,0xDC,0x16,0xBC,0xDB,0x15,0xD0,0x57,0xAB,0x36,0xB9,0x54,0xC0,0xF6,0xDB,0x0B,0x21,0xEA,0xCB,0xB6,0x2A,0xD6,0x0C, + 0xDB,0x0B,0x13,0x1F,0x92,0x4D,0xF4,0xE8,0xB8,0x2C,0xA3,0xA8,0xC8,0x24,0xAF,0xEC,0xD2,0xB4,0x00,0x1F,0xDD,0x08,0x31,0x97,0xC3,0x34,0x76,0x1C,0xCE,0x49,0x2E,0x81, + 0xDB,0x67,0x61,0xDA,0x1E,0xDB,0x16,0x8A,0x93,0xA2,0x00,0x3D,0xA6,0xA6,0x50,0xDB,0xE7,0xA5,0xDB,0x01,0xC5,0xE2,0xAF,0xF4,0xB7,0x13,0x83,0xDB,0x4F,0x02,0x35,0x1B, + 0x9F,0xF1,0x27,0xA5,0xCA,0xF1,0x59,0x03,0xDB,0x91,0x49,0x25,0x00,0xC4,0xEA,0xB1,0x2C,0xBE,0x2B,0x9C,0xAF,0xD0,0xED,0xA8,0xFC,0x0B,0xDB,0x3C,0xD5,0x9B,0x00,0xAE, + 0x9A,0xAF,0x7A,0xA1,0x2D,0x9A,0xBB,0x28,0x85,0x1A,0xB2,0x47,0x19,0x31,0x57,0x13,0x9D,0x3D,0x01,0xBD,0xDB,0xAE,0x1B,0x2B,0xE8,0x7A,0x00,0xD1,0x09,0xD6,0xEA,0xE9, + 0x05,0xE8,0x64,0xE5,0x5E,0x00,0x83,0xDD,0xE2,0x0B,0x05,0x4C,0x41,0xDF,0x12,0x65,0xDD,0xF6,0xB3,0x01,0xE3,0x57,0xE3,0xB7,0x29,0xA0,0xC9,0xE5,0xA4,0x9D,0xC8,0xD8, + 0x1B,0xDA,0x41,0x40,0xDB,0x7C,0xBF,0xC1,0x2D,0xAF,0xD7,0xF1,0x65,0xDB,0x04,0x6B,0x50,0xDB,0x50,0x93,0x5B,0xCE,0xDB,0xCD,0xF4,0x06,0xAE,0x12,0x15,0xBB,0xCA,0x97, + 0x10,0x54,0x99,0x50,0x1F,0xDB,0x75,0x17,0xB5,0x37,0xFB,0xF7,0xD4,0x3B,0xEA,0xCA,0xDB,0x15,0x2B,0xE1,0x29,0xDC,0x6B,0xED,0x72,0x36,0x50,0x44,0xDB,0x54,0x00,0xCF, + 0xC5,0x87,0xD8,0x01,0x94,0xB0,0x50,0xDB,0x27,0x43,0xDB,0x04,0x41,0x58,0xDB,0x2C,0x3D,0xDB,0x30,0xD9,0xA5,0xEE,0xBB,0x80,0x35,0xCF,0xD7,0xED,0x60,0x7A,0xDB,0x08, + 0x82,0x50,0xDB,0x5D,0x07,0x86,0x89,0x7A,0x53,0x9A,0x9E,0xCD,0x28,0xDB,0x25,0xC2,0xEA,0xDD,0x09,0x11,0x99,0x6D,0x34,0xA8,0xD9,0xE5,0xCC,0xDB,0x09,0x0B,0x81,0xDB, + 0x2B,0x61,0xDB,0x4B,0xD2,0x6D,0x92,0x6F,0xD7,0x87,0xC9,0x08,0x10,0xDB,0x1C,0x00,0xB9,0xE1,0x29,0xBF,0x69,0x85,0x20,0xDE,0x7E,0x00,0x06,0xD9,0x16,0x8B,0x88,0x51, + 0xA0,0xDB,0x95,0x0D,0x41,0x73,0x00,0x04,0xDB,0x96,0x00,0xC6,0xF6,0xC9,0xEB,0xB9,0xA4,0x91,0xD8,0x5B,0x22,0x59,0xB5,0x61,0xB6,0x04,0xB9,0x00,0x2C,0x02,0x24,0xC9, + 0xAA,0xD7,0xCF,0x6B,0xF1,0x3A,0x94,0x24,0x5E,0xDC,0x09,0xC2,0xDB,0x87,0xF6,0x10,0xB9,0xB8,0xB0,0xAA,0xB0,0xDC,0xCA,0xB3,0xE6,0x90,0xFB,0x00,0x94,0xA0,0xDB,0xC3, + 0xE1,0x11,0xA2,0xBA,0xBB,0x00,0xC8,0x0B,0xDE,0x94,0x15,0xA9,0x0D,0x15,0x72,0xDD,0xEC,0x17,0xDB,0x34,0x17,0x67,0xD5,0x00,0xBF,0xC6,0x64,0xAB,0xD3,0x09,0xE9,0xC2, + 0xDB,0xD6,0xF3,0x91,0x06,0x41,0x41,0xDB,0x28,0xDC,0x6F,0xCC,0x49,0x91,0x39,0xB6,0x04,0xD8,0x82,0x22,0x0D,0x15,0x87,0xDB,0xD0,0x38,0x2D,0x0D,0x22,0xAC,0x2C,0xA5, + 0xE2,0xB8,0xA3,0x41,0xDB,0x20,0x22,0x96,0x5B,0xCB,0xD8,0xDB,0x55,0x07,0x05,0xA3,0x95,0x80,0xF5,0xBF,0xE4,0xC4,0xA0,0xDB,0x17,0x61,0x01,0xDB,0x78,0x0A,0xAE,0x39, + 0x54,0x04,0x89,0xA4,0x5F,0x28,0xDB,0x2A,0x19,0x06,0x4A,0xFF,0x92,0x38,0xF6,0xAF,0x7C,0xDB,0x6F,0x54,0xD1,0xE5,0xDB,0x4C,0x98,0xE1,0xDB,0xDC,0x01,0x09,0xC1,0xD9, + 0xA7,0x02,0x4A,0xDB,0x0A,0xA7,0x9A,0xDA,0x05,0xA3,0x92,0xB6,0xD0,0xB1,0xDB,0xAC,0xD5,0xFF,0x04,0xB0,0x14,0x15,0xB4,0xBC,0x2A,0x1B,0xE3,0x45,0x97,0x26,0x95,0xDC, + 0x16,0xDB,0x16,0xB8,0x4B,0x6D,0xBA,0x2B,0xD1,0x7B,0x0C,0xA7,0xD3,0x26,0x19,0x0C,0xDC,0x0A,0xAE,0x9E,0x0A,0xAB,0x00,0xC3,0x95,0x5F,0xC3,0xD5,0x00,0xCF,0xAF,0x1D, + 0x53,0x05,0x48,0x00,0xAA,0x57,0x08,0x32,0x8E,0x5D,0xA8,0xF7,0x83,0xC4,0x02,0x75,0xB8,0x86,0xDB,0xE1,0xB1,0x89,0x93,0x12,0xDB,0x09,0x4A,0xA7,0x00,0xB6,0x2A,0xC8, + 0x76,0xBD,0x92,0x95,0xDB,0x8D,0x53,0xEB,0x7C,0x00,0xB4,0x88,0x12,0x12,0x24,0xDB,0x0E,0x2A,0xC9,0xE2,0x4F,0x68,0x95,0xC5,0xB0,0xDC,0x8C,0xDB,0x0B,0x95,0x49,0x23, + 0xFE,0x04,0xBA,0x05,0xA3,0x09,0x01,0xDB,0x15,0x7D,0xC3,0xDF,0x03,0x00,0xDE,0x9A,0xBA,0xD2,0xF8,0xD8,0xD4,0x73,0xCC,0x61,0xDD,0x72,0x00,0x87,0xDB,0x00,0x55,0x09, + 0x13,0x69,0xA2,0xAF,0xE9,0x26,0xC8,0xE6,0x0B,0x1C,0x1C,0x5D,0x2E,0x81,0xDF,0x04,0xA3,0x28,0x2E,0xD7,0xCB,0x9C,0xD9,0x2D,0x00,0x4A,0x3D,0x00,0x85,0xDB,0x84,0xDA, + 0xC4,0xB6,0x5B,0x94,0xB2,0x90,0x12,0x4A,0xDB,0x16,0xDA,0x16,0x2C,0x4F,0xD2,0x95,0xC9,0xB8,0x99,0x39,0xB8,0x4E,0xDB,0x09,0x6D,0x82,0xDB,0xED,0x8A,0x17,0x64,0xB1, + 0x01,0xA5,0xCE,0xA2,0xB4,0x94,0x94,0xB5,0x05,0x34,0x85,0xDB,0xE2,0xE5,0x19,0xD7,0xC5,0x1F,0x3A,0x1A,0x1C,0x00,0x99,0x4F,0x86,0x68,0xD8,0x2B,0x09,0xD5,0x2E,0x34, + 0xEB,0x3C,0xCB,0x3C,0x1D,0x10,0x1A,0x32,0x88,0xDB,0x05,0x2D,0x11,0x00,0x46,0x46,0x00,0xDB,0x41,0x98,0xDB,0x38,0x04,0xE0,0xDB,0x2C,0x6C,0xA0,0xDA,0x32,0xB6,0x48, + 0xB9,0xB6,0x48,0x12,0x2B,0xDB,0x08,0x94,0x9B,0x52,0x53,0x95,0x61,0xDA,0x64,0xB8,0x5E,0x24,0x6B,0xEB,0xE4,0xCB,0xB6,0x2C,0x04,0x81,0x81,0xA7,0xCF,0x2C,0x15,0x5F, + 0xA1,0x28,0x83,0xAE,0xF9,0x24,0xAF,0x29,0x5D,0xCC,0x01,0x9D,0xE6,0x9E,0xEB,0x05,0x5F,0xBA,0x04,0x03,0x50,0x1C,0xFA,0x78,0x0B,0xED,0x74,0x15,0xFC,0xAC,0x1A,0xE9, + 0x2A,0xB2,0xED,0xC2,0xD6,0xCD,0xF2,0xB7,0xB5,0xDA,0x88,0x5D,0x81,0xF8,0x09,0xD5,0x49,0xB3,0xC4,0x46,0x51,0xDB,0x00,0xBD,0xD9,0xBC,0x09,0x8C,0x8C,0x95,0x41,0xDA, + 0x79,0x2D,0x83,0xAC,0x91,0xDA,0x2B,0xDB,0x37,0xC8,0xDE,0xC9,0xB1,0xDB,0x4C,0x82,0xD5,0x00,0x0C,0xAA,0x00,0xAB,0x5F,0x5B,0xC0,0x4E,0x94,0x88,0x6B,0xA0,0xDB,0xEF, + 0x04,0xE5,0x2F,0xFF,0x6C,0xDC,0x2C,0xAC,0xA6,0x00,0xB3,0xF2,0xB5,0xC2,0x8A,0x00,0xDF,0xCE,0xCD,0x0A,0xC8,0x2A,0xD6,0x05,0x21,0xE5,0x19,0xB8,0x68,0x94,0x67,0xB0, + 0xDB,0xFB,0x0E,0x00,0xC2,0x72,0x67,0xAB,0x5E,0xB3,0xB0,0xDA,0xF2,0x00,0xB9,0x99,0x8D,0x25,0xB5,0x25,0x8C,0x06,0xDB,0xDC,0x04,0x58,0x58,0xEB,0xEC,0x61,0xDC,0x73, + 0xA4,0x41,0xDB,0x4A,0xED,0xB7,0x20,0x9A,0x0D,0xD8,0xDB,0x32,0xE6,0x18,0x22,0xB0,0xCC,0xDC,0x45,0x86,0xDB,0x94,0x86,0x35,0x81,0xDA,0x12,0x81,0xDC,0xCD,0x17,0x29, + 0xB8,0x59,0x9D,0x49,0xFB,0x12,0xBC,0xA8,0xB3,0x0E,0x50,0x00,0xCF,0x28,0x1C,0xAA,0xB0,0xBF,0x4D,0x67,0x16,0x2A,0xFA,0xF5,0x0E,0x38,0x74,0x29,0xDC,0x1D,0x0C,0xA4, + 0x91,0x50,0xDB,0x22,0x43,0x70,0x00,0xD4,0xC9,0x00,0x41,0xE9,0x03,0xDB,0xD5,0x09,0x9E,0xC8,0x81,0xDB,0xA0,0x3E,0xDB,0x02,0xAF,0x22,0x00,0x31,0x4F,0x0D,0x80,0xDB, + 0x1B,0x4C,0x11,0x8F,0xD7,0xCA,0x39,0xE3,0x85,0xDC,0x2D,0xF1,0x07,0xDB,0x04,0x61,0xDC,0x73,0xAB,0x61,0xDC,0x3C,0xF9,0x73,0xB3,0x74,0x06,0xA2,0x53,0x82,0xD8,0x0B, + 0x46,0x04,0x1C,0xD6,0xF7,0xB0,0x36,0x83,0x33,0x84,0xDB,0x8D,0x86,0xA4,0x02,0x19,0xDB,0x04,0x54,0xA1,0xDB,0xD2,0x00,0xE8,0xE1,0xDA,0x6B,0xF1,0x22,0xF3,0xAA,0x8C, + 0x00,0xC0,0xDB,0x4A,0x95,0x8D,0xDB,0x0A,0x92,0x4A,0xDB,0x0B,0xA4,0x96,0xE6,0xED,0xA7,0xAC,0x7A,0xCF,0x48,0x00,0x36,0xDB,0x02,0x12,0x24,0xDE,0xCE,0x26,0xAA,0x6F, + 0xAE,0xAA,0x00,0xA7,0x05,0x88,0xBA,0xDB,0x09,0x03,0xCE,0xA8,0x92,0x15,0x2B,0x49,0x80,0xC2,0xB3,0x74,0x8C,0x98,0xA3,0xB9,0xB2,0xB0,0xDC,0xDA,0x1B,0xCD,0x8E,0x69, + 0x98,0x6B,0x00,0x21,0xFB,0xA9,0x41,0xD8,0x54,0x16,0xDB,0x12,0x91,0xB6,0x2D,0x49,0x28,0xDC,0x60,0xD9,0x9E,0xB0,0xDB,0x58,0x41,0xDA,0x76,0x06,0xCA,0xE5,0x79,0x79, + 0x84,0xDA,0xC1,0xDB,0x21,0xB6,0x0A,0x98,0x24,0x02,0xA6,0x08,0x35,0xDB,0x0C,0xEF,0x8E,0x08,0x53,0x87,0xEC,0xDC,0x32,0xB8,0x9C,0xDB,0x25,0xBF,0xE9,0x52,0x97,0xF0, + 0x00,0xD8,0xC3,0xCE,0x03,0xCB,0x84,0xDA,0x04,0x15,0x40,0xDB,0x24,0x54,0x9A,0x49,0x26,0x95,0x4A,0x00,0x06,0xA2,0xAB,0x61,0x2E,0xDB,0x6A,0x10,0x1C,0xA7,0x9B,0x1F, + 0x5B,0x1C,0xC7,0xDA,0xEF,0xF2,0x19,0xAB,0xEE,0xAB,0x00,0xA0,0xDB,0x2C,0x49,0x2F,0xDB,0x29,0x8F,0x28,0xDB,0x14,0x8C,0xD4,0x1C,0xA6,0xF9,0x02,0xB6,0x5B,0xCB,0xF8, + 0x00,0xDA,0x4C,0xDB,0x14,0xB6,0x40,0xDF,0xE6,0xC4,0xB7,0x4C,0x3F,0x7A,0x07,0xE5,0x83,0x42,0xB8,0xA2,0xB6,0x05,0x31,0x12,0x7A,0xC1,0xAF,0xA4,0x95,0xE1,0xDB,0x65, + 0xB8,0x61,0xD8,0x12,0xDB,0x19,0xB7,0x77,0x01,0x00,0x57,0x86,0x6B,0xEF,0x4B,0xC5,0x61,0xD7,0x53,0x9D,0x85,0xCA,0x58,0x00,0xD8,0x5E,0xC3,0x74,0x08,0xBF,0x09,0x54, + 0x43,0xDB,0x29,0xB0,0xDB,0xE6,0xB1,0xAA,0xF3,0xC1,0xDC,0x54,0x33,0xC9,0xE1,0xDB,0x22,0xED,0xA7,0x2F,0xDB,0x0C,0xD1,0x26,0x00,0x48,0x4A,0x05,0x79,0x8C,0xDB,0x0A, + 0xA3,0x90,0xDA,0xA8,0x97,0x9F,0xC3,0xD8,0xDB,0x04,0x9F,0x19,0x82,0xDB,0x31,0xC1,0xDB,0x02,0xE2,0xE4,0xD7,0xDE,0xCE,0x34,0xDB,0x24,0xCF,0x7A,0xE7,0xCF,0xA2,0x2D, + 0x94,0x26,0x00,0xDE,0xCD,0x82,0xC9,0x82,0xD5,0x70,0xDB,0xA7,0xC3,0xB0,0xDA,0x56,0x1A,0xED,0x69,0x97,0x81,0xD5,0x1D,0x1C,0xC9,0x14,0x11,0x49,0xC4,0x5D,0x24,0x17, + 0xF4,0xAB,0x8F,0xC5,0x2B,0xC9,0x94,0x2E,0x8C,0xAB,0x49,0x46,0x42,0xDB,0x92,0x0A,0x51,0x83,0xDB,0x9E,0x00,0x8F,0xDB,0x02,0x6C,0xE4,0xC0,0xDB,0xDA,0xCF,0x3E,0xA5, + 0x53,0x88,0x55,0x4F,0xCD,0x20,0x00,0xE0,0x00,0x0D,0x22,0x2D,0x8F,0xCC,0x94,0x26,0xB9,0x29,0x96,0xEF,0xC2,0xDF,0x65,0xEF,0xD6,0xE6,0xAC,0x00,0x88,0xAA,0x05,0xE9, + 0xE1,0x1D,0x85,0xDF,0x65,0xAF,0x71,0x99,0xEC,0xAB,0xB5,0x87,0xAF,0xEC,0x05,0x29,0xBF,0x55,0x15,0x96,0xC2,0xF2,0x14,0xE8,0x17,0xB9,0x2C,0xAB,0xD1,0x06,0x32,0x32, + 0x49,0xD3,0x0C,0xAB,0xAC,0x8C,0x49,0x32,0xDB,0x2D,0xE2,0x75,0xE7,0xD7,0x0B,0x6E,0xC1,0xDF,0x00,0x0C,0x82,0xD7,0x85,0x40,0xD5,0x4E,0x41,0xDA,0x14,0x00,0xB8,0x35, + 0xB8,0xB6,0xEC,0x19,0xE4,0x77,0xB4,0xB6,0x02,0xC4,0xA8,0x22,0x0D,0x08,0x0E,0x41,0xD6,0x08,0x69,0x3B,0x1B,0x9E,0xCE,0x59,0xAA,0x45,0x52,0x2D,0xF0,0x94,0xB2,0xDD, + 0xBE,0xDC,0x00,0x95,0xAD,0x01,0xE0,0x6B,0xA0,0x95,0x54,0x8A,0xC9,0xCD,0x7E,0xF6,0xD6,0xF3,0x60,0xDB,0xE7,0x15,0xDB,0x0C,0xBD,0xBB,0x00,0xD6,0xCC,0xAE,0x94,0x1A, + 0xDB,0x1F,0xBB,0x48,0xC0,0xF5,0x82,0x76,0xB6,0x54,0xD6,0x12,0xCD,0xAA,0x4A,0xA6,0x9E,0xC0,0xD4,0x85,0x85,0xB4,0x03,0x85,0xA0,0xDA,0xB6,0xAA,0x00,0x92,0x45,0xB4, + 0xBF,0xC8,0xDA,0x92,0x2A,0xE9,0x08,0x0D,0xC2,0xDB,0xCD,0x38,0x08,0xF0,0xCE,0xD1,0xCF,0x05,0xB8,0x77,0x85,0x34,0x00,0xB7,0x82,0x84,0xD6,0xA1,0xDB,0x73,0x94,0x92, + 0xA5,0x1A,0xDE,0xB8,0x60,0xDB,0xA5,0xCA,0x5E,0x1C,0x00,0x93,0x97,0x07,0x73,0x92,0xDC,0x00,0x0F,0xC1,0xDC,0x73,0x9D,0xE5,0x0B,0xB6,0x61,0xDB,0x72,0x99,0x64,0xB0, + 0xDB,0x89,0x00,0xA0,0xDB,0x94,0xDA,0x17,0x85,0x03,0x40,0xDC,0x4A,0x94,0xDB,0x34,0x90,0xCB,0xB6,0x91,0x40,0xDF,0xC4,0xAF,0x7A,0x4E,0x08,0xA3,0x10,0x72,0xDB,0x1A, + 0xD1,0x37,0x4C,0xCE,0x4C,0xC5,0xDB,0x15,0xBD,0xCE,0x6D,0x03,0x2C,0xDB,0x30,0xD9,0x76,0x67,0x02,0xB6,0x54,0x9C,0x45,0x10,0x1F,0x85,0xB5,0xAA,0xF3,0x67,0xB2,0x00, + 0x95,0xBC,0x00,0xC0,0x2C,0xDB,0x3C,0x07,0xEF,0x27,0xDB,0x0D,0x88,0x3B,0x0D,0x07,0x97,0xD4,0x34,0x02,0x43,0x85,0xA8,0xD2,0x08,0x92,0x69,0x90,0x5D,0x00,0x05,0xCC, + 0x06,0x93,0x93,0x82,0xDA,0xBC,0x44,0x91,0x94,0xDB,0x00,0xA3,0xBD,0xD0,0xC9,0xB7,0x53,0x4E,0x7A,0xDB,0x70,0x6E,0x95,0x92,0x4A,0xAF,0x0D,0xD2,0x95,0x40,0xDC,0x61, + 0xD6,0xDC,0x74,0x00,0xD8,0x0E,0x81,0x00,0x62,0xB7,0xB0,0xDB,0x44,0x5F,0x06,0xDB,0xB5,0x1A,0x01,0x54,0x50,0xDC,0xCE,0xF0,0x82,0xC5,0xA7,0x89,0x09,0xB0,0xDB,0xA7, + 0xCB,0x9B,0x00,0x14,0xBE,0x00,0x07,0xC2,0xF7,0xDD,0xC5,0x8C,0x94,0xB2,0xE8,0x89,0x6E,0x89,0xDB,0x0D,0xC3,0xE8,0xDB,0x2E,0x00,0x44,0x91,0xC3,0xDB,0x00,0xC3,0xDA, + 0x00,0xA0,0xDB,0x53,0xE4,0xC8,0x81,0xC9,0xE2,0xC1,0x02,0x31,0x00,0x02,0x10,0x00,0x12,0x00,0x22,0x4A,0x97,0x95,0x98,0xDB,0x28,0xD6,0xD9,0x28,0xDF,0x2C,0xDA,0x2C, + 0xDB,0x16,0x2B,0xDB,0x12,0x86,0xDA,0x00,0x1D,0xE8,0x04,0xD8,0x32,0x8E,0xB0,0xDB,0xBE,0x93,0x94,0xFD,0xEB,0x9A,0xAA,0x07,0x52,0xAB,0x46,0x1A,0x75,0x00,0x13,0x9C, + 0x38,0xDB,0x51,0xB1,0x56,0xD8,0x58,0xDD,0x4E,0xB5,0x52,0x60,0x07,0xDB,0x8C,0xB0,0xDB,0x25,0x8D,0x85,0xB6,0x2A,0x00,0x58,0xB8,0xDB,0x29,0xE4,0xC8,0xC1,0xBD,0xC7, + 0xC4,0xAC,0x08,0xD4,0xC4,0xE5,0xB4,0x07,0xAA,0x00,0x1B,0xC1,0xE2,0xC5,0xC5,0xC2,0xDB,0x72,0xB8,0x98,0xDB,0x26,0x80,0xBC,0x98,0xAF,0xF1,0xEC,0xCD,0x2D,0xEC,0x6C, + 0xDC,0x24,0xE0,0x59,0x03,0xCB,0x07,0xB2,0xBF,0xB8,0x00,0xD0,0xDA,0xAA,0x10,0xC0,0x77,0x64,0x2D,0x28,0xDB,0x30,0x43,0xD0,0xCA,0x01,0x93,0x93,0xDB,0x07,0x8C,0x03, + 0x28,0xDB,0x48,0xB6,0x44,0x8D,0x8D,0xE1,0xDA,0x30,0xDB,0x2B,0x77,0xB7,0x83,0xE6,0xAF,0x1B,0x4F,0x9E,0xC9,0xDE,0x8F,0x0E,0x26,0xA6,0xFD,0x00,0xA0,0xF8,0xC1,0xD8, + 0xCF,0xA4,0x95,0xB0,0xDB,0x58,0x5E,0xDD,0x4E,0xDA,0x16,0xD7,0x08,0x67,0x80,0xDB,0xF0,0x00,0xC9,0xFE,0xFF,0x82,0xDB,0xDE,0xB0,0xF2,0xD0,0x70,0xD5,0x15,0x49,0x26, + 0x26,0x04,0x20,0xCF,0x58,0xED,0x26,0x2E,0xDA,0x0A,0xDB,0x01,0xAB,0xCD,0x2E,0x55,0xF4,0x6F,0xC6,0x61,0xCF,0x61,0xDB,0x84,0xD2,0xE1,0xDB,0x28,0xD6,0x4E,0xDA,0x17, + 0xFF,0x56,0xB6,0x58,0xDA,0x68,0x92,0xA8,0x56,0x24,0xF9,0xD9,0xB7,0x58,0xA5,0x20,0x1B,0xCD,0xC7,0xE7,0x00,0xD8,0xB4,0x12,0x4F,0x61,0x0D,0xDC,0x3A,0x95,0x2C,0xE3, + 0xB8,0x86,0x81,0xEC,0xEC,0xDD,0x0F,0xCD,0xC0,0x16,0x67,0xCD,0xAC,0x19,0xDC,0x1B,0xAB,0x07,0x19,0xB7,0x0B,0xFD,0x8E,0x08,0x65,0xD5,0xF3,0xB3,0x00,0x96,0x04,0x72, + 0xA6,0x54,0x49,0x97,0xE7,0x0C,0x1D,0x49,0x27,0x2D,0x0E,0x5F,0x00,0xB7,0x4B,0x97,0x34,0xD9,0x18,0xCE,0x56,0xE2,0x12,0x93,0x27,0x87,0xE5,0x00,0x20,0xD6,0x2B,0x8D, + 0x01,0x02,0xB0,0xDC,0x4A,0xD9,0xB7,0x43,0xB4,0xDB,0xC7,0xC7,0x77,0x9F,0xB0,0xC4,0x4F,0x12,0xE1,0xAA,0x07,0x80,0xDB,0x02,0x62,0x12,0x00,0x24,0xB0,0xD8,0xB3,0xE4, + 0xDA,0x09,0xC2,0xDB,0xC2,0xDA,0x95,0x00,0x17,0xFD,0x17,0x86,0xC9,0xAB,0x0A,0xB4,0xDE,0x9D,0x40,0xDB,0xB0,0xCC,0x9C,0xB3,0xB0,0xCA,0x89,0xDB,0x05,0x2E,0xE0,0x04, + 0xEF,0x1A,0x94,0xD8,0x0A,0x2F,0x2F,0xDD,0x5B,0xA9,0xE9,0x5E,0xC3,0x83,0xDB,0x00,0xC1,0xD2,0x5D,0xCB,0x08,0x00,0x61,0xD9,0x35,0x00,0x84,0xDA,0x81,0xDB,0x44,0xB6, + 0xBD,0x18,0xB1,0x9A,0x9F,0x92,0x10,0x00,0x31,0x23,0x85,0xDB,0x09,0xA4,0x22,0xAC,0x76,0x88,0xD6,0x94,0xDC,0x16,0x81,0xB7,0x58,0x02,0xCD,0x81,0x35,0x48,0xCD,0xD6, + 0x1D,0x03,0xE6,0xAC,0xEC,0x76,0xB3,0xF6,0xDA,0x13,0x85,0xD9,0x82,0xC5,0x2F,0x50,0xDA,0x90,0xA5,0xBE,0xA3,0x3F,0x45,0x2F,0x03,0x00,0x0D,0xF5,0x16,0x0D,0x49,0x83, + 0xD1,0x2F,0x10,0x98,0xDA,0x3B,0x00,0xDA,0x08,0x84,0x00,0x65,0xE0,0xD8,0xB5,0x94,0xDA,0x03,0xD9,0xF1,0xB8,0xF1,0xDA,0x00,0xCB,0xDB,0xC4,0x5B,0xA0,0xDA,0x39,0x02, + 0x08,0xA6,0x81,0x14,0xDB,0x36,0xB8,0xC1,0xDC,0x31,0xC9,0xAC,0xE2,0xE6,0x20,0xDC,0x14,0xE3,0xE3,0xED,0xB8,0xD7,0x12,0xCD,0xEC,0xA6,0x97,0x98,0x92,0x83,0xDB,0x32, + 0xDD,0x09,0x56,0xE1,0xCE,0xF2,0x50,0xBF,0xA2,0xA1,0xF0,0x0A,0xC4,0xB4,0x98,0xA2,0xA4,0xF0,0x08,0xDB,0x58,0x2F,0xDB,0x7D,0x09,0x0F,0x54,0x0D,0xA2,0xD0,0xD9,0x73, + 0x00,0x01,0xDA,0x65,0x65,0x4B,0xED,0x30,0xD6,0x5A,0x04,0x8D,0x2C,0xDB,0x16,0xD9,0xDB,0x0A,0xF1,0xED,0x50,0xDB,0xDA,0xAC,0x7A,0xC3,0x90,0x81,0x7D,0xE6,0x60,0x46, + 0xDB,0x0C,0xA4,0x70,0xDC,0xC0,0xDF,0x0D,0x98,0x16,0xE2,0xDA,0xD0,0xDB,0x1D,0x00,0x06,0xD6,0xDB,0x14,0xB8,0x5A,0x00,0xAB,0xC2,0xDB,0xC9,0xBB,0x1A,0x85,0xAB,0x74, + 0x9A,0xCF,0xAE,0x28,0xDB,0x61,0xB6,0x39,0xFE,0xDD,0x00,0x83,0xDB,0x46,0xDB,0x04,0x49,0xE1,0xDB,0x65,0xC5,0x69,0x15,0x2F,0x8A,0xB5,0x24,0xDB,0x34,0x09,0x65,0x50, + 0xDA,0x61,0xDB,0x38,0xDA,0x60,0xDB,0xC3,0x14,0xDB,0xCE,0x98,0x8E,0x02,0x0D,0x1B,0x02,0x04,0x60,0xDB,0xB2,0x00,0x07,0x12,0x98,0x00,0x22,0xDC,0x14,0xDF,0xD0,0xB9, + 0x56,0xDB,0x16,0xB4,0x56,0xD8,0x16,0xDB,0x15,0x03,0x44,0xB6,0x2F,0xF2,0x03,0x89,0xB2,0xAA,0x9D,0xA7,0xE4,0xAA,0x29,0xEE,0x0C,0x0E,0x60,0xDB,0xBB,0x16,0x1C,0xBC, + 0x07,0x06,0x5D,0x5D,0x9C,0xAD,0xA9,0xEA,0x56,0x27,0xD5,0x1F,0x03,0x00,0x38,0xD6,0x5E,0x00,0xD9,0x13,0x80,0xDA,0xE4,0xCB,0xC9,0xC1,0xDA,0x7A,0x85,0xD6,0x86,0xD7, + 0x04,0x08,0x85,0xA0,0x00,0xB8,0xDB,0x31,0xAB,0xE9,0x00,0x12,0x24,0x49,0x96,0x69,0x95,0x30,0xDC,0x79,0x95,0x59,0x98,0xDD,0x03,0x04,0x03,0xD5,0x2F,0x03,0xD2,0x04, + 0x46,0xA5,0x8B,0x82,0xB7,0x50,0x49,0x05,0x81,0xE4,0x45,0xAC,0x00,0x36,0xDB,0x1A,0x5D,0x93,0x61,0xDF,0x2B,0x00,0x5D,0x00,0xBC,0x06,0xD8,0x11,0x6E,0x2B,0xE2,0x20, + 0xD6,0x04,0x65,0x29,0x18,0x18,0x48,0xD9,0x51,0x00,0xD9,0xD4,0x30,0xDB,0x61,0xDA,0xE7,0xD8,0xD5,0x14,0xC4,0x77,0xFA,0x50,0x22,0x03,0xDB,0x12,0x47,0x3A,0x7A,0x9F, + 0x00,0xE5,0x4C,0x15,0x98,0xCF,0xD6,0xF2,0x74,0x95,0x30,0x64,0x51,0xD3,0xB0,0xD6,0x94,0xDB,0x30,0xAB,0x58,0x46,0xC6,0x55,0xCD,0x4C,0xBA,0x09,0x27,0xCA,0x9B,0xC2, + 0xE7,0xE8,0x00,0xDB,0x0D,0x6E,0x5D,0x05,0x6E,0x77,0x1C,0x1F,0x61,0xDB,0xE5,0x2F,0xB5,0x16,0xD8,0x16,0xD7,0x12,0x30,0x00,0x28,0xD2,0xE5,0x02,0x00,0x55,0xD4,0x00, + 0x86,0xDA,0xDB,0x03,0xBD,0xB7,0x7A,0xDA,0x05,0x12,0xA9,0xA0,0x1B,0x0D,0x06,0xA1,0xDB,0x0B,0xD6,0x33,0xE7,0x02,0x12,0x0D,0xB0,0xCF,0xD0,0xC2,0xDB,0x50,0xDD,0x29, + 0xE9,0x51,0x00,0x64,0x4F,0x00,0x43,0xA7,0x28,0xEF,0xE6,0x98,0x79,0xD6,0xC2,0xD6,0xD8,0x72,0xA2,0xB0,0xC8,0xF8,0x0E,0x08,0x4D,0x00,0x27,0x22,0x00,0x65,0x69,0x00, + 0x41,0xD9,0x6A,0x53,0x00,0x06,0xD8,0xB6,0x53,0x00,0xDB,0xE1,0xDB,0xB7,0x02,0x0D,0x07,0x0D,0x24,0x24,0x1B,0x26,0x00,0x04,0x80,0xDB,0x31,0x9F,0x08,0xAF,0x02,0x00, + 0x24,0x82,0xE2,0xB9,0xB9,0x81,0xDC,0xE9,0x74,0x00,0xD9,0x0A,0x43,0x00,0xC3,0xDB,0x03,0xD2,0x8F,0x62,0xB6,0xC2,0xC0,0x70,0xDB,0x88,0xF9,0x3B,0xBF,0x09,0x52,0x81, + 0x11,0xD2,0x09,0x24,0x06,0xB0,0x24,0x29,0xE0,0xDA,0x28,0x98,0xDB,0x13,0x4D,0x12,0xB3,0xEF,0x55,0xEE,0x57,0xC3,0xB3,0x18,0x24,0x22,0xD9,0x17,0x24,0x0D,0x00,0x38, + 0xDC,0x40,0x92,0xDB,0x00,0x0D,0x12,0x02,0x9F,0xC1,0x12,0xCF,0xDF,0xB4,0x83,0xDB,0x95,0xDA,0x06,0x41,0xD5,0x0A,0x8C,0xDC,0x0A,0xCF,0xFC,0xB0,0xA7,0xA0,0x79,0xC1, + 0xBC,0x2F,0x16,0xC6,0x11,0xE0,0xD2,0x5D,0xB0,0xD1,0xB8,0x09,0xC4,0x89,0xA0,0xD5,0xB4,0x00,0x6A,0x84,0xB6,0x4D,0x4C,0xD4,0x00,0xEF,0x58,0xEF,0xDA,0x03,0xDB,0xA5, + 0xC1,0x0D,0x22,0xDB,0x0A,0x02,0xB9,0x00,0xC2,0xDF,0x04,0x70,0xDB,0x52,0x02,0xEA,0x7C,0xC4,0x1B,0x24,0x53,0xB7,0xDC,0x03,0x3D,0x95,0x00,0x1D,0x41,0x41,0x8C,0x00, + 0x05,0xDF,0x05,0xDB,0x87,0xDD,0x00,0x09,0x9F,0xF1,0x02,0x38,0xCF,0x4D,0x08,0x12,0xD4,0x12,0x4C,0x04,0xD5,0x14,0xDF,0x13,0x04,0xD5,0xA1,0xDA,0x10,0xDB,0x0C,0xEF, + 0x00,0xF1,0xE0,0x00,0xE1,0xC7,0xA5,0x4C,0x5B,0x5B,0x4C,0x22,0x0A,0x53,0x4C,0x53,0x22,0x00,0x8B,0xDE,0x0E,0x00,0x04,0x10,0xDB,0xDE,0x42,0x00,0xE4,0x7F,0x4E,0xC6, + 0x06,0x22,0xB7,0xD0,0xA3,0xDC,0x00,0x91,0x3D,0x3D,0x4A,0x4A,0x3F,0x58,0x58,0xCB,0xE8,0x03,0xE1,0x32,0x06,0x8C,0x6E,0x38,0xDB,0x24,0xAB,0x28,0xC0,0xC5,0x8D,0x00, + 0x4B,0x29,0x05,0x41,0xD1,0x39,0xB1,0x4C,0xD6,0x05,0x5A,0x4D,0xCE,0x00,0xD8,0x16,0xD9,0x00,0xE0,0xC3,0xC9,0xA8,0xAC,0x14,0x9A,0x9A,0x5B,0x00,0x4C,0xC2,0xDC,0x93, + 0x00,0x22,0x94,0xBE,0xE1,0xDE,0x07,0xC0,0xDB,0x4F,0xB0,0xD7,0xA0,0xDC,0xE8,0x84,0x53,0xA5,0x02,0xDA,0xB4,0x77,0x77,0x6C,0x6C,0x80,0xDD,0x58,0x85,0xBC,0x00,0xE1, + 0x3A,0x00,0xDF,0x0B,0xF3,0x84,0x27,0x64,0x00,0x58,0xC5,0x55,0x07,0xDC,0x00,0x06,0xFC,0x0C,0x00,0x81,0xD4,0x21,0xB0,0x25,0x5A,0xD7,0x0F,0x00,0xD6,0x05,0x59,0xBB, + 0x00,0x7E,0x00,0xD9,0x0D,0x00,0xE0,0x80,0x00,0xCB,0xCE,0xA5,0xAF,0xA5,0x98,0x98,0xC1,0xDC,0x97,0xB0,0x02,0x9A,0xDD,0xB0,0xDF,0x9C,0xBE,0xA2,0x56,0xFD,0x1F,0x9B, + 0x48,0x74,0xDB,0x3F,0x48,0x41,0x04,0xC6,0x00,0x12,0x9F,0x98,0xDC,0x00,0xA3,0xA0,0x6C,0xB6,0xB6,0x2C,0x79,0xBC,0xDA,0x18,0x8D,0x02,0x93,0x85,0x9E,0xB0,0xE0,0xBA, + 0xCB,0x8F,0x9B,0x29,0x8E,0xF2,0xAE,0x00,0x07,0x79,0x0D,0xCA,0xAB,0x65,0xDF,0xB0,0xD2,0x49,0x4D,0x04,0xE1,0x00,0xD6,0x3C,0x00,0x80,0xDB,0xD1,0xE4,0xA0,0xCE,0xB7, + 0x6C,0xA5,0x01,0xAF,0x00,0x98,0x97,0xE6,0x00,0xBD,0x2F,0x00,0xDD,0x08,0xD2,0xBD,0x83,0xB0,0xDB,0xD4,0xEB,0x31,0x24,0xB6,0x4B,0xF0,0xF4,0x98,0x06,0xC1,0xCA,0xB9, + 0x05,0xA0,0xE4,0xB6,0xB8,0xBC,0x26,0x00,0x85,0xC4,0xFB,0xE5,0x05,0x93,0x84,0xCE,0xE5,0xA0,0x84,0xBF,0x50,0xC0,0x45,0xF1,0x0B,0x00,0x6F,0xB4,0x29,0xAD,0x4E,0xD7, + 0x13,0x11,0xB2,0x7E,0x9C,0x72,0x00,0x07,0xDB,0xA0,0x25,0xB1,0xA8,0x30,0x00,0xB7,0xDD,0xC1,0xE0,0xAF,0x45,0xBC,0x53,0x00,0xA4,0x9B,0x60,0xDC,0x41,0x00,0xDB,0x42, + 0xEB,0xEB,0x49,0x00,0x0D,0x3B,0x46,0x4D,0xCF,0x6C,0x59,0x9A,0x98,0x38,0xBD,0xA3,0xBD,0x75,0xB8,0x9D,0x84,0xDC,0x9F,0xC3,0x28,0xDF,0x65,0x90,0x2D,0xC6,0x58,0xBD, + 0x61,0xB2,0x73,0x05,0x85,0xC7,0xDC,0x0D,0x06,0x4C,0x07,0xE9,0x00,0x4D,0xE6,0x00,0xD5,0x09,0x82,0xD7,0xC7,0x00,0x92,0xE8,0xD1,0x9F,0x2C,0xC4,0x00,0xB1,0xB1,0x9C, + 0xDE,0x28,0xBB,0xB2,0xBC,0x9C,0xDE,0x24,0xF9,0x59,0x06,0xEF,0x09,0x12,0x97,0x1F,0xDA,0x0E,0x49,0xB0,0x4F,0xD9,0xF0,0x58,0xDB,0x14,0x8F,0xDA,0xCB,0xDC,0x05,0xBC, + 0xD9,0xEC,0xE2,0xE1,0xDA,0x79,0x9C,0x2C,0xEF,0x46,0x15,0x94,0xCE,0x06,0xD3,0x09,0x28,0xD6,0xD6,0x72,0xAB,0x4C,0x59,0xAB,0x51,0xA0,0xD8,0x92,0xEC,0x00,0xDA,0x02, + 0xCB,0xC9,0xCE,0xCE,0x50,0xDC,0xE5,0x00,0xBB,0x2B,0xDC,0x08,0xD2,0xBA,0x9C,0xDC,0x21,0xF9,0xB3,0x86,0x03,0xD9,0x00,0x98,0xB4,0xAC,0xD9,0x29,0x5B,0x97,0x81,0x62, + 0xA5,0xC4,0xBD,0xE4,0xEF,0xD4,0x61,0xDB,0x34,0x00,0xA1,0xCB,0x7B,0xFA,0x39,0xE8,0xCE,0xEA,0x76,0x00,0x5A,0x89,0xEC,0x09,0x02,0xD1,0x49,0x04,0xE3,0x00,0x0A,0xAD, + 0x46,0x00,0xA9,0x01,0xE8,0x30,0xE0,0xDB,0xDA,0xE3,0x00,0x82,0xDD,0x45,0xF6,0x98,0xDC,0x28,0xDD,0x23,0x83,0xDB,0x00,0x82,0xB0,0xDB,0x98,0xDA,0x13,0x0D,0x87,0xDA, + 0x53,0x20,0xD9,0x29,0xAF,0xDF,0x87,0xC4,0xC7,0xE4,0xA0,0x53,0xEC,0xE2,0xA1,0xC1,0x14,0xBE,0x11,0x67,0xEC,0x77,0x00,0x09,0x3C,0x06,0x58,0xD4,0x47,0x14,0xAE,0x81, + 0xD8,0x4A,0x00,0xAA,0x8F,0x40,0xC9,0xC7,0xC7,0xC9,0xE2,0x00,0x02,0xDD,0x64,0x97,0x4C,0x98,0xDC,0x12,0xCC,0xB1,0x44,0xAE,0xC1,0xA8,0xDB,0x49,0xE8,0x31,0x45,0xB5, + 0x82,0xDA,0xAF,0x98,0xD8,0xA8,0xB1,0xC2,0x70,0xCE,0xDB,0xC3,0xEF,0x4C,0x00,0xDB,0x2C,0xA1,0x11,0x59,0x67,0xE3,0x08,0x04,0xBF,0xB3,0x08,0xCF,0x0F,0x00,0x18,0xD4, + 0x16,0xD7,0x12,0x86,0xDB,0xB4,0x58,0xDA,0x68,0x00,0xC7,0xF0,0xDC,0x95,0x96,0x20,0x4A,0xDB,0x09,0x4A,0xB7,0x28,0xDA,0x28,0xB5,0xA5,0xDA,0x06,0xCE,0xD9,0x20,0xC3, + 0xE1,0xE0,0xD1,0xE8,0x48,0xE8,0xA0,0x08,0x7E,0x7E,0x00,0xE3,0x24,0x8A,0xA9,0x30,0xD9,0x13,0xA9,0x32,0x00,0xAA,0xB4,0xC1,0xDA,0xCB,0xD0,0x00,0xDC,0x23,0xDB,0x03, + 0xDD,0xDC,0x09,0xC2,0xDB,0x74,0x93,0x8F,0x92,0x48,0x3A,0xDB,0x0A,0x52,0xB2,0xB6,0x98,0xB5,0xBC,0x74,0x79,0xDB,0xCB,0x58,0xC3,0xDC,0x2C,0xE8,0x9B,0x2C,0xA6,0x2A, + 0x03,0x38,0xB9,0x26,0xBF,0x08,0xF8,0x0F,0xD4,0x00,0xA9,0xEE,0x00,0xA1,0x00,0xC1,0xDA,0xE1,0xD8,0x00,0xDD,0x26,0xCB,0xBB,0x29,0xC2,0xDB,0x64,0x93,0xB2,0xB6,0x99, + 0xCB,0xEE,0xE1,0x23,0xD6,0xED,0x0A,0xC2,0xDB,0x57,0xCB,0x9C,0xDB,0x30,0xDA,0x88,0xDB,0x07,0xC7,0x7A,0xA4,0x7E,0xC3,0xBA,0x29,0xC1,0x9B,0x92,0x0E,0xC3,0x00,0x01, + 0xD3,0x30,0xD7,0x58,0xD9,0x72,0x9F,0xE0,0xF0,0x00,0xDA,0xAB,0x00,0xDB,0x04,0xDB,0xE1,0xDB,0x29,0xB6,0x5B,0xCB,0xC5,0x4C,0xA7,0xE1,0xDA,0x06,0xD7,0x83,0x38,0xDB, + 0x5E,0xDA,0x71,0x00,0x24,0xB7,0xCE,0x89,0xDB,0x0C,0xDC,0x24,0xBB,0x24,0xAA,0x52,0x00,0xA9,0x0B,0x13,0x00,0xA1,0xA9,0x00,0xAA,0x46,0xD1,0x20,0xDB,0x58,0xDC,0x59, + 0xB8,0x4E,0xDB,0x11,0xE5,0xB5,0x3C,0xA3,0xDA,0x91,0x4E,0xD7,0x10,0x69,0xDF,0x93,0x5C,0x83,0xEB,0xF0,0x2A,0xEF,0xDA,0x93,0x4E,0xB8,0x58,0xDB,0x78,0x00,0x95,0x46, + 0x02,0xDF,0xA1,0x0B,0xA4,0x00,0x34,0xAA,0x41,0x49,0xB0,0xDA,0xB0,0xDB,0x9C,0xDA,0x25,0xB5,0x28,0x9B,0x80,0x8D,0xFE,0xAC,0xDA,0x20,0xE4,0xDB,0x24,0x97,0x47,0x9F, + 0x46,0x3A,0xF2,0xC6,0xAC,0xF1,0x81,0xDD,0x84,0x89,0xA1,0xDE,0x30,0xE0,0x58,0xE3,0x42,0xD0,0x00,0xD0,0xD9,0x5C,0x36,0xE4,0xB4,0xE1,0x98,0xB4,0x93,0xDB,0x94,0xB4, + 0x52,0x8E,0x4F,0xB5,0xD6,0xD8,0x11,0xE1,0xD9,0x05,0x81,0xDB,0x3D,0x13,0x42,0x44,0x21,0xDD,0x29,0xBB,0x58,0xDE,0x4A,0x9A,0x96,0xE1,0x1C,0x00,0xC1,0xE5,0x04,0x41, + 0xE8,0x2D,0x00,0xCD,0x21,0x30,0x18,0x8C,0x91,0x2B,0xE9,0x49,0x8D,0x16,0xD8,0x09,0x22,0xCA,0xB2,0x3D,0xE6,0x60,0xBC,0xDB,0x11,0x00,0x72,0xAF,0x24,0x95,0xD2,0xE2, + 0x42,0xDE,0x6B,0x8A,0x94,0xE1,0x2C,0xE2,0x2C,0xE4,0x2C,0xE6,0x27,0xE8,0x08,0xC0,0xEB,0xB0,0xEE,0x8A,0x0B,0x44,0xD1,0x4B,0x20,0x2F,0xC6,0x37,0x04,0xD6,0xEF,0xC1, + 0x84,0xD8,0xF5,0xF7,0x16,0xE5,0xB1,0xE1,0xD5,0x06,0xC9,0x93,0x1E,0xF9,0xB1,0x05,0xBD,0x59,0xEA,0x5D,0xC5,0x65,0xC0,0x61,0xE2,0x61,0xE3,0x61,0xE4,0x61,0xE6,0x38, + 0xE8,0x4C,0xEB,0x13,0x22,0x00,0xE1,0x82,0xC3,0x69,0x00,0xFB,0x25,0x00,0x33,0x45,0xC7,0x74,0xAD,0xFD,0xAC,0x13,0xAB,0xD3,0xCD,0x97,0xCE,0x00,0xD7,0x10,0x24,0x05, + 0xDB,0x28,0x00,0x31,0xDE,0x2D,0x60,0x22,0x39,0xBF,0x4B,0xCC,0xCB,0xAF,0xE3,0x0A,0xC6,0x2B,0xE6,0x0A,0xE7,0x09,0x02,0xE9,0x60,0xEC,0x98,0xEF,0x26,0x00,0xC2,0xBE, + 0x2A,0x00,0x6C,0x1E,0xCB,0x26,0x00,0x4F,0xC4,0xFF,0xF6,0xD3,0x16,0xDF,0xB1,0x40,0xD6,0x53,0x9D,0xB9,0xE1,0xDA,0xEF,0x83,0x60,0xDB,0x90,0x22,0x4F,0x4F,0xAA,0x58, + 0x60,0x94,0xDF,0x22,0x83,0xE1,0xE2,0x0B,0xC6,0x24,0x98,0xA1,0xE7,0x69,0x00,0xB7,0x42,0xEC,0x64,0x00,0xB1,0x2D,0x00,0x3D,0x1F,0xD8,0x2D,0xCF,0x54,0x02,0xA1,0xD3, + 0x41,0xD4,0x61,0xD5,0x61,0xD7,0x32,0xDE,0xD1,0x78,0x31,0x4F,0x38,0xD5,0x40,0x9C,0xDB,0x11,0xE9,0x9E,0x15,0xD6,0xD6,0xE3,0x16,0xE5,0x16,0xE7,0x17,0x00,0x84,0x96, + 0xC1,0xED,0x10,0x00,0x98,0x86,0xA5,0x00,0x21,0x96,0x33,0x5E,0x3F,0x47,0x3A,0xE6,0x91,0x0D,0xF0,0x7F,0x58,0x8F,0x90,0x5C,0xDB,0x11,0xF8,0xFC,0x24,0x9C,0xC8,0xA5, + 0xCC,0x29,0xC2,0xEA,0x25,0x00,0x5B,0x0C,0xC4,0x00,0x26,0x23,0x53,0x00,0x91,0x44,0x24,0x1E,0x83,0x90,0x38,0x04,0xDB,0xE1,0xE0,0x39,0xC8,0x24,0x9F,0x00,0xC2,0x95, + 0xE3,0x04,0x10,0x00,0x22,0xD4,0x00,0x92,0x1E,0xC8,0x26,0x3E,0x7A,0xE3,0x00,0xC2,0xCE,0x07,0x70,0xDB,0x8B,0x3A,0x4B,0x0D,0x00,0x3A,0xB0,0x47,0x61,0x00,0xBB,0x1F, + 0x11,0x1D,0x10,0x38,0xD0,0x21,0x1B,0x70,0xA4,0x83,0x00,0xD3,0x81,0x28,0xDB,0x24,0x00,0x4F,0x02,0x00,0x3C,0x0A,0xF1,0x0D,0xB1,0x0F,0x73,0x13,0xCE,0x1A,0xCB,0xD3, + 0x9C,0x90,0xF0,0x5A,0x3B,0x85,0xDB,0x90,0x00,0x07,0x07,0xAC,0x42,0x7C,0x5A,0x2F,0x72,0x1F,0x12,0x3D,0x19,0xC0,0x07,0xFE,0xDB,0x13,0xA3,0x42,0x1B,0xA3,0x00,0xA6, + 0xD7,0x19,0xAF,0x69,0xA3,0x23,0x82,0xE0,0x1F,0x95,0x08,0x17,0x02,0xDB,0x76,0x35,0x07,0x00,0x4F,0xB9,0x00,0xE3,0x46,0xE3,0x66,0xE1,0x10,0xD8,0x7E,0x98,0x0B,0x2F, + 0x97,0x08,0x7E,0x5F,0x02,0xEE,0x00,0x01,0xD3,0xDB,0x09,0xE0,0x00,0x34,0xC2,0xD3,0x01,0xBF,0xDB,0x09,0xE0,0x00,0x34,0xC2,0xD3,0x03,0x0C,0xDB,0x20,0x00,0x10, +}; diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_compress/src/gfx/convpng.ini b/frontends/calculator/CEdev/examples/gfx_sprite_compress/src/gfx/convpng.ini index 4662a3b..5aaa5a7 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_compress/src/gfx/convpng.ini +++ b/frontends/calculator/CEdev/examples/gfx_sprite_compress/src/gfx/convpng.ini @@ -1,5 +1,5 @@ -#GroupC : all_gfx -#Compression : zx7 -#PNGImages : - apple - +#GroupC : all_gfx +#Compression : zx7 +#PNGImages : + apple + diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_compress/src/main.c b/frontends/calculator/CEdev/examples/gfx_sprite_compress/src/main.c index e269869..d74b073 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_compress/src/main.c +++ b/frontends/calculator/CEdev/examples/gfx_sprite_compress/src/main.c @@ -1,45 +1,45 @@ -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -/* Include the graphics file */ -#include "gfx/all_gfx.h" - -/* Put all your code here */ -void main(void) { - /* Define our sprite */ - gfx_sprite_t *apple; - - /* Allocate space for the decompressed sprite */ - apple = gfx_MallocSprite(apple_width, apple_height); /* Same as: gfx_AllocSprite(apple_width, apple_height, malloc) */ - - /* Decompress the sprite */ - zx7_Decompress(apple, apple_compressed); - - /* Initialize the 8bpp graphics */ - gfx_Begin(); - - /* Set up the palette */ - gfx_SetPalette(all_gfx_pal, sizeof_all_gfx_pal, 0); - gfx_FillScreen(0); - - /* Draw the decompressed sprite */ - gfx_Sprite(apple, (LCD_WIDTH - 220) / 2, (LCD_HEIGHT - 240) / 2); - - /* Wait for a key */ - while (!os_GetCSC()); - - /* Please, don't forget to free the apple image memory :) */ - free(apple); - - gfx_End(); -} +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +/* Include the graphics file */ +#include "gfx/all_gfx.h" + +/* Put all your code here */ +void main(void) { + /* Define our sprite */ + gfx_sprite_t *apple; + + /* Allocate space for the decompressed sprite */ + apple = gfx_MallocSprite(apple_width, apple_height); /* Same as: gfx_AllocSprite(apple_width, apple_height, malloc) */ + + /* Decompress the sprite */ + zx7_Decompress(apple, apple_compressed); + + /* Initialize the 8bpp graphics */ + gfx_Begin(); + + /* Set up the palette */ + gfx_SetPalette(all_gfx_pal, sizeof_all_gfx_pal, 0); + gfx_FillScreen(0); + + /* Draw the decompressed sprite */ + gfx_Sprite(apple, (LCD_WIDTH - 220) / 2, (LCD_HEIGHT - 240) / 2); + + /* Wait for a key */ + while (!os_GetCSC()); + + /* Please, don't forget to free the apple image memory :) */ + free(apple); + + gfx_End(); +} diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_keys/autotester.json b/frontends/calculator/CEdev/examples/gfx_sprite_keys/autotester.json index b4ba88a..c853e8b 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_keys/autotester.json +++ b/frontends/calculator/CEdev/examples/gfx_sprite_keys/autotester.json @@ -1,31 +1,31 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "hashWait|1", - "key|clear", - "hashWait|2" - ], - "hashes": { - "1": { - "description": "Make sure the sprite is displayed", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "F9825FDD" ] - }, - "2": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} - +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "hashWait|1", + "key|clear", + "hashWait|2" + ], + "hashes": { + "1": { + "description": "Make sure the sprite is displayed", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "F9825FDD" ] + }, + "2": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} + diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_keys/makefile b/frontends/calculator/CEdev/examples/gfx_sprite_keys/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_keys/makefile +++ b/frontends/calculator/CEdev/examples/gfx_sprite_keys/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_keys/readme.md b/frontends/calculator/CEdev/examples/gfx_sprite_keys/readme.md index 9ee2c1b..54c880f 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_keys/readme.md +++ b/frontends/calculator/CEdev/examples/gfx_sprite_keys/readme.md @@ -1,10 +1,10 @@ -### GraphX/KeypadC Sprite with Keys - -Demonstrates using the GraphX and KeypadC library together to move a sprite - -![Screenshot](screenshot.gif) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### GraphX/KeypadC Sprite with Keys + +Demonstrates using the GraphX and KeypadC library together to move a sprite + +![Screenshot](screenshot.gif) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_keys/src/gfx/convpng.ini b/frontends/calculator/CEdev/examples/gfx_sprite_keys/src/gfx/convpng.ini index 7bd3158..b6ba98d 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_keys/src/gfx/convpng.ini +++ b/frontends/calculator/CEdev/examples/gfx_sprite_keys/src/gfx/convpng.ini @@ -1,4 +1,4 @@ -#GroupC : logo_gfx -#TransparentColor : 255,255,255 -#PNGImages : - ubuntu +#GroupC : logo_gfx +#TransparentColor : 255,255,255 +#PNGImages : + ubuntu diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_keys/src/gfx/logo_gfx.c b/frontends/calculator/CEdev/examples/gfx_sprite_keys/src/gfx/logo_gfx.c index 4086cdc..5d2ba8b 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_keys/src/gfx/logo_gfx.c +++ b/frontends/calculator/CEdev/examples/gfx_sprite_keys/src/gfx/logo_gfx.c @@ -1,195 +1,195 @@ -// convpng -#include -#include "logo_gfx.h" - -uint16_t logo_gfx_pal[189] = { - 0xFFFF, // 00 :: rgb(255,255,255) - 0x7E20, // 01 :: rgb(251,139,1) - 0xFE20, // 02 :: rgb(251,140,4) - 0xFFFF, // 03 :: rgb(255,253,253) - 0x6800, // 04 :: rgb(212,2,2) - 0xE821, // 05 :: rgb(213,11,11) - 0x7E20, // 06 :: rgb(251,139,2) - 0x7E20, // 07 :: rgb(251,139,0) - 0x7920, // 08 :: rgb(244,72,0) - 0xFFFF, // 09 :: rgb(255,254,254) - 0xFFFF, // 10 :: rgb(255,254,253) - 0xFECC, // 11 :: rgb(252,182,97) - 0x7A90, // 12 :: rgb(249,163,128) - 0x7FDC, // 13 :: rgb(254,244,231) - 0xF985, // 14 :: rgb(245,100,40) - 0x7F9A, // 15 :: rgb(253,225,213) - 0x7FDD, // 16 :: rgb(253,242,242) - 0x6D6B, // 17 :: rgb(226,90,90) - 0xFFBC, // 18 :: rgb(254,239,233) - 0xF921, // 19 :: rgb(244,77,7) - 0x7EED, // 20 :: rgb(252,187,107) - 0xFF99, // 21 :: rgb(254,231,203) - 0xFFFE, // 22 :: rgb(255,253,250) - 0xFF16, // 23 :: rgb(251,199,177) - 0xF921, // 24 :: rgb(244,78,8) - 0xFE87, // 25 :: rgb(251,167,61) - 0xFFBA, // 26 :: rgb(254,237,216) - 0x7F31, // 27 :: rgb(253,204,143) - 0xFF76, // 28 :: rgb(253,222,183) - 0x7B7B, // 29 :: rgb(249,220,220) - 0xFAF7, // 30 :: rgb(244,192,192) - 0x7FDD, // 31 :: rgb(252,241,241) - 0xF18C, // 32 :: rgb(229,102,102) - 0xFE87, // 33 :: rgb(251,164,56) - 0x7B5A, // 34 :: rgb(247,212,212) - 0xFF76, // 35 :: rgb(253,221,181) - 0xF652, // 36 :: rgb(237,151,151) - 0x7652, // 37 :: rgb(236,145,145) - 0x6D29, // 38 :: rgb(224,74,74) - 0xE800, // 39 :: rgb(212,3,3) - 0x718C, // 40 :: rgb(228,98,98) - 0xFF54, // 41 :: rgb(253,214,165) - 0x7673, // 42 :: rgb(237,153,153) - 0xFF32, // 43 :: rgb(252,205,148) - 0x7EA8, // 44 :: rgb(251,169,68) - 0x6CC6, // 45 :: rgb(219,48,48) - 0x7FBA, // 46 :: rgb(254,234,211) - 0xE842, // 47 :: rgb(215,20,20) - 0xFB7B, // 48 :: rgb(250,224,224) - 0xFF77, // 49 :: rgb(253,224,187) - 0xF652, // 50 :: rgb(237,149,149) - 0x7F75, // 51 :: rgb(253,218,175) - 0x7FFE, // 52 :: rgb(254,249,249) - 0x7EEC, // 53 :: rgb(252,185,102) - 0x7FBD, // 54 :: rgb(252,236,236) - 0xFFFF, // 55 :: rgb(255,253,251) - 0x7EED, // 56 :: rgb(252,188,109) - 0x7FFF, // 57 :: rgb(254,252,252) - 0xFAF7, // 58 :: rgb(243,189,189) - 0x7B9B, // 59 :: rgb(250,225,225) - 0x7AD2, // 60 :: rgb(250,179,149) - 0xED09, // 61 :: rgb(224,70,70) - 0xECA5, // 62 :: rgb(218,43,43) - 0xFAF4, // 63 :: rgb(250,190,165) - 0x6D4A, // 64 :: rgb(225,82,82) - 0xED08, // 65 :: rgb(223,69,69) - 0x6D08, // 66 :: rgb(222,63,63) - 0x76D6, // 67 :: rgb(242,178,178) - 0xECC6, // 68 :: rgb(220,51,51) - 0xF1AD, // 69 :: rgb(229,109,109) - 0xFFDD, // 70 :: rgb(254,246,235) - 0x718C, // 71 :: rgb(228,97,97) - 0xFFBC, // 72 :: rgb(254,239,234) - 0xFF77, // 73 :: rgb(253,223,187) - 0x76D6, // 74 :: rgb(242,179,179) - 0x6863, // 75 :: rgb(216,26,26) - 0x7AB1, // 76 :: rgb(249,169,136) - 0xE843, // 77 :: rgb(215,21,21) - 0xFF9C, // 78 :: rgb(251,230,230) - 0xF9A6, // 79 :: rgb(245,108,51) - 0x7F97, // 80 :: rgb(253,225,189) - 0x7942, // 81 :: rgb(244,81,13) - 0x7FBA, // 82 :: rgb(254,236,215) - 0xFE21, // 83 :: rgb(251,143,11) - 0x7FBC, // 84 :: rgb(251,234,234) - 0xFB18, // 85 :: rgb(245,197,197) - 0x76D6, // 86 :: rgb(242,177,177) - 0x71AD, // 87 :: rgb(229,106,106) - 0xFAB2, // 88 :: rgb(249,176,144) - 0x7F9A, // 89 :: rgb(253,227,217) - 0x7FDD, // 90 :: rgb(254,242,237) - 0x7FDE, // 91 :: rgb(253,243,243) - 0x7AB1, // 92 :: rgb(249,171,139) - 0xFFBB, // 93 :: rgb(254,239,221) - 0xF694, // 94 :: rgb(240,167,167) - 0xFF7A, // 95 :: rgb(253,224,213) - 0x7F0E, // 96 :: rgb(253,193,117) - 0xFA6F, // 97 :: rgb(249,159,121) - 0x7FFE, // 98 :: rgb(255,251,247) - 0xFEAA, // 99 :: rgb(251,175,80) - 0x7694, // 100 :: rgb(239,161,161) - 0x7AF3, // 101 :: rgb(250,186,160) - 0xE801, // 102 :: rgb(213,5,5) - 0xFA6F, // 103 :: rgb(249,159,122) - 0x7FDB, // 104 :: rgb(254,241,224) - 0xF920, // 105 :: rgb(244,75,4) - 0x7A8F, // 106 :: rgb(249,160,123) - 0x7694, // 107 :: rgb(239,163,163) - 0xE822, // 108 :: rgb(214,14,14) - 0x6D29, // 109 :: rgb(223,71,71) - 0xFF55, // 110 :: rgb(253,215,169) - 0x7A8F, // 111 :: rgb(249,161,124) - 0xFF32, // 112 :: rgb(253,207,151) - 0x7FBB, // 113 :: rgb(253,233,224) - 0xF694, // 114 :: rgb(239,165,165) - 0xFFBC, // 115 :: rgb(254,238,231) - 0xFB39, // 116 :: rgb(247,208,208) - 0x7B38, // 117 :: rgb(246,201,201) - 0x6842, // 118 :: rgb(214,16,16) - 0x7FFF, // 119 :: rgb(254,251,251) - 0xFB7B, // 120 :: rgb(250,223,223) - 0xF16C, // 121 :: rgb(227,95,95) - 0x7672, // 122 :: rgb(237,152,152) - 0x7631, // 123 :: rgb(235,138,138) - 0xFE87, // 124 :: rgb(251,165,60) - 0xFFDD, // 125 :: rgb(254,245,240) - 0xFF33, // 126 :: rgb(252,208,154) - 0x7F79, // 127 :: rgb(252,220,207) - 0x7E41, // 128 :: rgb(251,144,12) - 0x7E42, // 129 :: rgb(251,146,19) - 0x7F36, // 130 :: rgb(251,202,182) - 0x7FDC, // 131 :: rgb(254,243,230) - 0x7963, // 132 :: rgb(244,89,24) - 0x7F0E, // 133 :: rgb(252,193,119) - 0xFE87, // 134 :: rgb(251,164,57) - 0x7A2B, // 135 :: rgb(247,138,92) - 0xFA6E, // 136 :: rgb(249,157,119) - 0xFF9B, // 137 :: rgb(253,229,219) - 0x7920, // 138 :: rgb(244,74,3) - 0xFFDE, // 139 :: rgb(254,246,243) - 0xF964, // 140 :: rgb(245,95,32) - 0xF921, // 141 :: rgb(244,76,6) - 0xFAD3, // 142 :: rgb(250,183,155) - 0xFAD3, // 143 :: rgb(250,182,154) - 0xF985, // 144 :: rgb(245,103,44) - 0x7FFE, // 145 :: rgb(255,252,250) - 0x7FFE, // 146 :: rgb(255,251,250) - 0x6800, // 147 :: rgb(212,1,1) - 0x7B18, // 148 :: rgb(245,195,195) - 0x7AD2, // 149 :: rgb(250,178,148) - 0x7ECB, // 150 :: rgb(251,179,87) - 0x7EA8, // 151 :: rgb(251,169,69) - 0xFEAA, // 152 :: rgb(251,176,82) - 0x7652, // 153 :: rgb(236,146,146) - 0xF942, // 154 :: rgb(244,83,16) - 0xF9E9, // 155 :: rgb(246,126,76) - 0xFFDD, // 156 :: rgb(254,246,242) - 0x71EF, // 157 :: rgb(231,120,120) - 0xFB39, // 158 :: rgb(247,206,206) - 0xFF37, // 159 :: rgb(252,208,190) - 0x6D08, // 160 :: rgb(222,65,65) - 0x7FDE, // 161 :: rgb(253,244,244) - 0x7A4D, // 162 :: rgb(248,147,106) - 0xFB5A, // 163 :: rgb(248,216,216) - 0x7F79, // 164 :: rgb(253,220,206) - 0xFAD3, // 165 :: rgb(250,181,153) - 0x7F15, // 166 :: rgb(251,196,173) - 0x7F31, // 167 :: rgb(252,201,137) - 0xF9C8, // 168 :: rgb(246,116,62) - 0xFAB2, // 169 :: rgb(250,176,145) - 0xFF10, // 170 :: rgb(252,198,131) - 0x7A6E, // 171 :: rgb(248,155,117) - 0xFF9B, // 172 :: rgb(253,232,224) - 0xFFBB, // 173 :: rgb(254,240,221) - 0x7920, // 174 :: rgb(244,74,2) - 0x7FDC, // 175 :: rgb(254,243,229) - 0xFE21, // 176 :: rgb(251,141,6) - 0x7F53, // 177 :: rgb(253,210,155) - 0xF9E9, // 178 :: rgb(247,127,77) - 0xFF58, // 179 :: rgb(252,213,197) - 0xFE87, // 180 :: rgb(251,164,58) - 0xFF54, // 181 :: rgb(253,213,164) - 0xFEA9, // 182 :: rgb(251,174,78) - 0xFE21, // 183 :: rgb(251,143,10) - 0x79E8, // 184 :: rgb(246,120,67) - 0x7E87, // 185 :: rgb(251,163,54) - 0xFFDD, // 186 :: rgb(254,248,240) - 0x7F57, // 187 :: rgb(252,210,193) - 0x6800, // 188 :: rgb(212,0,0) +// convpng +#include +#include "logo_gfx.h" + +uint16_t logo_gfx_pal[189] = { + 0xFFFF, // 00 :: rgb(255,255,255) + 0x7E20, // 01 :: rgb(251,139,1) + 0xFE20, // 02 :: rgb(251,140,4) + 0xFFFF, // 03 :: rgb(255,253,253) + 0x6800, // 04 :: rgb(212,2,2) + 0xE821, // 05 :: rgb(213,11,11) + 0x7E20, // 06 :: rgb(251,139,2) + 0x7E20, // 07 :: rgb(251,139,0) + 0x7920, // 08 :: rgb(244,72,0) + 0xFFFF, // 09 :: rgb(255,254,254) + 0xFFFF, // 10 :: rgb(255,254,253) + 0xFECC, // 11 :: rgb(252,182,97) + 0x7A90, // 12 :: rgb(249,163,128) + 0x7FDC, // 13 :: rgb(254,244,231) + 0xF985, // 14 :: rgb(245,100,40) + 0x7F9A, // 15 :: rgb(253,225,213) + 0x7FDD, // 16 :: rgb(253,242,242) + 0x6D6B, // 17 :: rgb(226,90,90) + 0xFFBC, // 18 :: rgb(254,239,233) + 0xF921, // 19 :: rgb(244,77,7) + 0x7EED, // 20 :: rgb(252,187,107) + 0xFF99, // 21 :: rgb(254,231,203) + 0xFFFE, // 22 :: rgb(255,253,250) + 0xFF16, // 23 :: rgb(251,199,177) + 0xF921, // 24 :: rgb(244,78,8) + 0xFE87, // 25 :: rgb(251,167,61) + 0xFFBA, // 26 :: rgb(254,237,216) + 0x7F31, // 27 :: rgb(253,204,143) + 0xFF76, // 28 :: rgb(253,222,183) + 0x7B7B, // 29 :: rgb(249,220,220) + 0xFAF7, // 30 :: rgb(244,192,192) + 0x7FDD, // 31 :: rgb(252,241,241) + 0xF18C, // 32 :: rgb(229,102,102) + 0xFE87, // 33 :: rgb(251,164,56) + 0x7B5A, // 34 :: rgb(247,212,212) + 0xFF76, // 35 :: rgb(253,221,181) + 0xF652, // 36 :: rgb(237,151,151) + 0x7652, // 37 :: rgb(236,145,145) + 0x6D29, // 38 :: rgb(224,74,74) + 0xE800, // 39 :: rgb(212,3,3) + 0x718C, // 40 :: rgb(228,98,98) + 0xFF54, // 41 :: rgb(253,214,165) + 0x7673, // 42 :: rgb(237,153,153) + 0xFF32, // 43 :: rgb(252,205,148) + 0x7EA8, // 44 :: rgb(251,169,68) + 0x6CC6, // 45 :: rgb(219,48,48) + 0x7FBA, // 46 :: rgb(254,234,211) + 0xE842, // 47 :: rgb(215,20,20) + 0xFB7B, // 48 :: rgb(250,224,224) + 0xFF77, // 49 :: rgb(253,224,187) + 0xF652, // 50 :: rgb(237,149,149) + 0x7F75, // 51 :: rgb(253,218,175) + 0x7FFE, // 52 :: rgb(254,249,249) + 0x7EEC, // 53 :: rgb(252,185,102) + 0x7FBD, // 54 :: rgb(252,236,236) + 0xFFFF, // 55 :: rgb(255,253,251) + 0x7EED, // 56 :: rgb(252,188,109) + 0x7FFF, // 57 :: rgb(254,252,252) + 0xFAF7, // 58 :: rgb(243,189,189) + 0x7B9B, // 59 :: rgb(250,225,225) + 0x7AD2, // 60 :: rgb(250,179,149) + 0xED09, // 61 :: rgb(224,70,70) + 0xECA5, // 62 :: rgb(218,43,43) + 0xFAF4, // 63 :: rgb(250,190,165) + 0x6D4A, // 64 :: rgb(225,82,82) + 0xED08, // 65 :: rgb(223,69,69) + 0x6D08, // 66 :: rgb(222,63,63) + 0x76D6, // 67 :: rgb(242,178,178) + 0xECC6, // 68 :: rgb(220,51,51) + 0xF1AD, // 69 :: rgb(229,109,109) + 0xFFDD, // 70 :: rgb(254,246,235) + 0x718C, // 71 :: rgb(228,97,97) + 0xFFBC, // 72 :: rgb(254,239,234) + 0xFF77, // 73 :: rgb(253,223,187) + 0x76D6, // 74 :: rgb(242,179,179) + 0x6863, // 75 :: rgb(216,26,26) + 0x7AB1, // 76 :: rgb(249,169,136) + 0xE843, // 77 :: rgb(215,21,21) + 0xFF9C, // 78 :: rgb(251,230,230) + 0xF9A6, // 79 :: rgb(245,108,51) + 0x7F97, // 80 :: rgb(253,225,189) + 0x7942, // 81 :: rgb(244,81,13) + 0x7FBA, // 82 :: rgb(254,236,215) + 0xFE21, // 83 :: rgb(251,143,11) + 0x7FBC, // 84 :: rgb(251,234,234) + 0xFB18, // 85 :: rgb(245,197,197) + 0x76D6, // 86 :: rgb(242,177,177) + 0x71AD, // 87 :: rgb(229,106,106) + 0xFAB2, // 88 :: rgb(249,176,144) + 0x7F9A, // 89 :: rgb(253,227,217) + 0x7FDD, // 90 :: rgb(254,242,237) + 0x7FDE, // 91 :: rgb(253,243,243) + 0x7AB1, // 92 :: rgb(249,171,139) + 0xFFBB, // 93 :: rgb(254,239,221) + 0xF694, // 94 :: rgb(240,167,167) + 0xFF7A, // 95 :: rgb(253,224,213) + 0x7F0E, // 96 :: rgb(253,193,117) + 0xFA6F, // 97 :: rgb(249,159,121) + 0x7FFE, // 98 :: rgb(255,251,247) + 0xFEAA, // 99 :: rgb(251,175,80) + 0x7694, // 100 :: rgb(239,161,161) + 0x7AF3, // 101 :: rgb(250,186,160) + 0xE801, // 102 :: rgb(213,5,5) + 0xFA6F, // 103 :: rgb(249,159,122) + 0x7FDB, // 104 :: rgb(254,241,224) + 0xF920, // 105 :: rgb(244,75,4) + 0x7A8F, // 106 :: rgb(249,160,123) + 0x7694, // 107 :: rgb(239,163,163) + 0xE822, // 108 :: rgb(214,14,14) + 0x6D29, // 109 :: rgb(223,71,71) + 0xFF55, // 110 :: rgb(253,215,169) + 0x7A8F, // 111 :: rgb(249,161,124) + 0xFF32, // 112 :: rgb(253,207,151) + 0x7FBB, // 113 :: rgb(253,233,224) + 0xF694, // 114 :: rgb(239,165,165) + 0xFFBC, // 115 :: rgb(254,238,231) + 0xFB39, // 116 :: rgb(247,208,208) + 0x7B38, // 117 :: rgb(246,201,201) + 0x6842, // 118 :: rgb(214,16,16) + 0x7FFF, // 119 :: rgb(254,251,251) + 0xFB7B, // 120 :: rgb(250,223,223) + 0xF16C, // 121 :: rgb(227,95,95) + 0x7672, // 122 :: rgb(237,152,152) + 0x7631, // 123 :: rgb(235,138,138) + 0xFE87, // 124 :: rgb(251,165,60) + 0xFFDD, // 125 :: rgb(254,245,240) + 0xFF33, // 126 :: rgb(252,208,154) + 0x7F79, // 127 :: rgb(252,220,207) + 0x7E41, // 128 :: rgb(251,144,12) + 0x7E42, // 129 :: rgb(251,146,19) + 0x7F36, // 130 :: rgb(251,202,182) + 0x7FDC, // 131 :: rgb(254,243,230) + 0x7963, // 132 :: rgb(244,89,24) + 0x7F0E, // 133 :: rgb(252,193,119) + 0xFE87, // 134 :: rgb(251,164,57) + 0x7A2B, // 135 :: rgb(247,138,92) + 0xFA6E, // 136 :: rgb(249,157,119) + 0xFF9B, // 137 :: rgb(253,229,219) + 0x7920, // 138 :: rgb(244,74,3) + 0xFFDE, // 139 :: rgb(254,246,243) + 0xF964, // 140 :: rgb(245,95,32) + 0xF921, // 141 :: rgb(244,76,6) + 0xFAD3, // 142 :: rgb(250,183,155) + 0xFAD3, // 143 :: rgb(250,182,154) + 0xF985, // 144 :: rgb(245,103,44) + 0x7FFE, // 145 :: rgb(255,252,250) + 0x7FFE, // 146 :: rgb(255,251,250) + 0x6800, // 147 :: rgb(212,1,1) + 0x7B18, // 148 :: rgb(245,195,195) + 0x7AD2, // 149 :: rgb(250,178,148) + 0x7ECB, // 150 :: rgb(251,179,87) + 0x7EA8, // 151 :: rgb(251,169,69) + 0xFEAA, // 152 :: rgb(251,176,82) + 0x7652, // 153 :: rgb(236,146,146) + 0xF942, // 154 :: rgb(244,83,16) + 0xF9E9, // 155 :: rgb(246,126,76) + 0xFFDD, // 156 :: rgb(254,246,242) + 0x71EF, // 157 :: rgb(231,120,120) + 0xFB39, // 158 :: rgb(247,206,206) + 0xFF37, // 159 :: rgb(252,208,190) + 0x6D08, // 160 :: rgb(222,65,65) + 0x7FDE, // 161 :: rgb(253,244,244) + 0x7A4D, // 162 :: rgb(248,147,106) + 0xFB5A, // 163 :: rgb(248,216,216) + 0x7F79, // 164 :: rgb(253,220,206) + 0xFAD3, // 165 :: rgb(250,181,153) + 0x7F15, // 166 :: rgb(251,196,173) + 0x7F31, // 167 :: rgb(252,201,137) + 0xF9C8, // 168 :: rgb(246,116,62) + 0xFAB2, // 169 :: rgb(250,176,145) + 0xFF10, // 170 :: rgb(252,198,131) + 0x7A6E, // 171 :: rgb(248,155,117) + 0xFF9B, // 172 :: rgb(253,232,224) + 0xFFBB, // 173 :: rgb(254,240,221) + 0x7920, // 174 :: rgb(244,74,2) + 0x7FDC, // 175 :: rgb(254,243,229) + 0xFE21, // 176 :: rgb(251,141,6) + 0x7F53, // 177 :: rgb(253,210,155) + 0xF9E9, // 178 :: rgb(247,127,77) + 0xFF58, // 179 :: rgb(252,213,197) + 0xFE87, // 180 :: rgb(251,164,58) + 0xFF54, // 181 :: rgb(253,213,164) + 0xFEA9, // 182 :: rgb(251,174,78) + 0xFE21, // 183 :: rgb(251,143,10) + 0x79E8, // 184 :: rgb(246,120,67) + 0x7E87, // 185 :: rgb(251,163,54) + 0xFFDD, // 186 :: rgb(254,248,240) + 0x7F57, // 187 :: rgb(252,210,193) + 0x6800, // 188 :: rgb(212,0,0) }; \ No newline at end of file diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_keys/src/gfx/logo_gfx.h b/frontends/calculator/CEdev/examples/gfx_sprite_keys/src/gfx/logo_gfx.h index eba6d22..2be515d 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_keys/src/gfx/logo_gfx.h +++ b/frontends/calculator/CEdev/examples/gfx_sprite_keys/src/gfx/logo_gfx.h @@ -1,17 +1,17 @@ -// convpng -// this file contains all the graphics sources for easy inclusion in a project -#ifndef __logo_gfx__ -#define __logo_gfx__ -#include - -#define logo_gfx_transparent_color_index 0 - -#define ubuntu_width 32 -#define ubuntu_height 32 -#define ubuntu_size 1026 -extern uint8_t ubuntu_data[1026]; -#define ubuntu ((gfx_sprite_t*)ubuntu_data) -#define sizeof_logo_gfx_pal 378 -extern uint16_t logo_gfx_pal[189]; - -#endif +// convpng +// this file contains all the graphics sources for easy inclusion in a project +#ifndef __logo_gfx__ +#define __logo_gfx__ +#include + +#define logo_gfx_transparent_color_index 0 + +#define ubuntu_width 32 +#define ubuntu_height 32 +#define ubuntu_size 1026 +extern uint8_t ubuntu_data[1026]; +#define ubuntu ((gfx_sprite_t*)ubuntu_data) +#define sizeof_logo_gfx_pal 378 +extern uint16_t logo_gfx_pal[189]; + +#endif diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_keys/src/gfx/ubuntu.c b/frontends/calculator/CEdev/examples/gfx_sprite_keys/src/gfx/ubuntu.c index ac4f3b9..053323a 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_keys/src/gfx/ubuntu.c +++ b/frontends/calculator/CEdev/examples/gfx_sprite_keys/src/gfx/ubuntu.c @@ -1,40 +1,40 @@ -// convpng -#include -#include "logo_gfx.h" - -// 8 bpp image -uint8_t ubuntu_data[1026] = { - 32,32, // width,height - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x43,0x25,0x1D,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x11,0xBC,0xBC,0x05,0x1E,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x59,0x3F,0x4C,0x0C,0x8E,0x12,0xA3,0xBC,0xBC,0xBC,0xBC,0x26,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x0E,0x08,0x08,0x08,0x08,0x08,0xA6,0x9E,0xBC,0xBC,0xBC,0xBC,0x41,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0x00,0x89,0x13,0x08,0x08,0x08,0x08,0x08,0xA2,0x09,0xA0,0xBC,0xBC,0x93,0x56,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x81,0x0D,0x00,0x88,0x08,0x08,0x08,0x08,0x08,0x13,0xA4,0xA1,0x99,0x9D,0x94,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6E,0x01,0x07,0x0B,0x00,0x7D,0x84,0x69,0x8C,0x90,0x18,0x08,0x9A,0xA5,0x9C,0x92,0x0F,0x5C,0x09,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5D,0x53,0x07,0x07,0x06,0x15,0x00,0x5F,0x5A,0x00,0x00,0x91,0x9F,0x9B,0x08,0x08,0x8D,0x08,0x08,0x3C,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x07,0x07,0x07,0x07,0x85,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x8F,0x8A,0x08,0x08,0x08,0x51,0x48,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xAD,0x01,0x07,0x07,0x07,0x7C,0x16,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x58,0x08,0x08,0x08,0x08,0x0C,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xB5,0x07,0x07,0x07,0x06,0x52,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x4F,0x08,0x08,0x08,0x0E,0x09,0x00,0x00, - 0x00,0x00,0x00,0x8B,0xA9,0xAB,0xBB,0x00,0x14,0x07,0x07,0x97,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x65,0x08,0x08,0x08,0x08,0x12,0x00,0x00, - 0x00,0x00,0x0A,0xA8,0x08,0x08,0xAE,0x17,0xBA,0xB7,0x07,0xAA,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x6F,0x6A,0x67,0x61,0x71,0x00,0x00, - 0x00,0x00,0x7F,0x08,0x08,0x08,0x08,0xB8,0x00,0xB4,0x07,0xB1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x0F,0x08,0x08,0x08,0x08,0xB2,0x00,0xB9,0x07,0xA7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5B,0x64,0x6B,0x72,0x5E,0x54,0x00,0x00, - 0x00,0x00,0x09,0x87,0x08,0x08,0x18,0xB3,0xAF,0xB0,0x07,0x96,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4A,0xBC,0xBC,0xBC,0xBC,0x4E,0x00,0x00, - 0x00,0x00,0x00,0x0A,0x17,0x95,0xAC,0x16,0xB6,0x07,0x07,0x80,0x46,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xBC,0xBC,0xBC,0x4B,0x03,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0x07,0x07,0x07,0x07,0x35,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3A,0x04,0xBC,0xBC,0xBC,0x45,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x86,0x07,0x07,0x07,0x07,0x2B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x74,0x4D,0xBC,0xBC,0xBC,0x27,0x22,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x49,0x07,0x07,0x07,0x07,0x33,0x00,0x34,0x09,0x00,0x00,0x00,0x10,0x7B,0x05,0xBC,0xBC,0xBC,0xBC,0x20,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x07,0x07,0x2C,0x09,0x39,0x2D,0x44,0x47,0x57,0x6D,0x6C,0xBC,0xBC,0x04,0x05,0xBC,0x3E,0x1F,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x37,0x0B,0x02,0x2E,0x00,0x32,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0x76,0x7A,0x10,0x77,0x78,0x3B,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x31,0x00,0x36,0x2F,0xBC,0xBC,0xBC,0xBC,0xBC,0x66,0x75,0x62,0x70,0x60,0x50,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2A,0x04,0xBC,0xBC,0xBC,0xBC,0xBC,0x79,0x09,0x63,0x07,0x07,0x01,0x29,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x24,0x28,0x3D,0x42,0x11,0x55,0x68,0x07,0x07,0x07,0x07,0x21,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0D,0x06,0x07,0x07,0x07,0x19,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x07,0x07,0x02,0x1C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0x1B,0x1A,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -}; +// convpng +#include +#include "logo_gfx.h" + +// 8 bpp image +uint8_t ubuntu_data[1026] = { + 32,32, // width,height + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x43,0x25,0x1D,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x11,0xBC,0xBC,0x05,0x1E,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x59,0x3F,0x4C,0x0C,0x8E,0x12,0xA3,0xBC,0xBC,0xBC,0xBC,0x26,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x0E,0x08,0x08,0x08,0x08,0x08,0xA6,0x9E,0xBC,0xBC,0xBC,0xBC,0x41,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0x00,0x89,0x13,0x08,0x08,0x08,0x08,0x08,0xA2,0x09,0xA0,0xBC,0xBC,0x93,0x56,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x81,0x0D,0x00,0x88,0x08,0x08,0x08,0x08,0x08,0x13,0xA4,0xA1,0x99,0x9D,0x94,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6E,0x01,0x07,0x0B,0x00,0x7D,0x84,0x69,0x8C,0x90,0x18,0x08,0x9A,0xA5,0x9C,0x92,0x0F,0x5C,0x09,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5D,0x53,0x07,0x07,0x06,0x15,0x00,0x5F,0x5A,0x00,0x00,0x91,0x9F,0x9B,0x08,0x08,0x8D,0x08,0x08,0x3C,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x07,0x07,0x07,0x07,0x85,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x8F,0x8A,0x08,0x08,0x08,0x51,0x48,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xAD,0x01,0x07,0x07,0x07,0x7C,0x16,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x58,0x08,0x08,0x08,0x08,0x0C,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xB5,0x07,0x07,0x07,0x06,0x52,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x4F,0x08,0x08,0x08,0x0E,0x09,0x00,0x00, + 0x00,0x00,0x00,0x8B,0xA9,0xAB,0xBB,0x00,0x14,0x07,0x07,0x97,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x65,0x08,0x08,0x08,0x08,0x12,0x00,0x00, + 0x00,0x00,0x0A,0xA8,0x08,0x08,0xAE,0x17,0xBA,0xB7,0x07,0xAA,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x6F,0x6A,0x67,0x61,0x71,0x00,0x00, + 0x00,0x00,0x7F,0x08,0x08,0x08,0x08,0xB8,0x00,0xB4,0x07,0xB1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x0F,0x08,0x08,0x08,0x08,0xB2,0x00,0xB9,0x07,0xA7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5B,0x64,0x6B,0x72,0x5E,0x54,0x00,0x00, + 0x00,0x00,0x09,0x87,0x08,0x08,0x18,0xB3,0xAF,0xB0,0x07,0x96,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4A,0xBC,0xBC,0xBC,0xBC,0x4E,0x00,0x00, + 0x00,0x00,0x00,0x0A,0x17,0x95,0xAC,0x16,0xB6,0x07,0x07,0x80,0x46,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xBC,0xBC,0xBC,0x4B,0x03,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0x07,0x07,0x07,0x07,0x35,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3A,0x04,0xBC,0xBC,0xBC,0x45,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x86,0x07,0x07,0x07,0x07,0x2B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x74,0x4D,0xBC,0xBC,0xBC,0x27,0x22,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x49,0x07,0x07,0x07,0x07,0x33,0x00,0x34,0x09,0x00,0x00,0x00,0x10,0x7B,0x05,0xBC,0xBC,0xBC,0xBC,0x20,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x07,0x07,0x2C,0x09,0x39,0x2D,0x44,0x47,0x57,0x6D,0x6C,0xBC,0xBC,0x04,0x05,0xBC,0x3E,0x1F,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x37,0x0B,0x02,0x2E,0x00,0x32,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0x76,0x7A,0x10,0x77,0x78,0x3B,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x31,0x00,0x36,0x2F,0xBC,0xBC,0xBC,0xBC,0xBC,0x66,0x75,0x62,0x70,0x60,0x50,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2A,0x04,0xBC,0xBC,0xBC,0xBC,0xBC,0x79,0x09,0x63,0x07,0x07,0x01,0x29,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x24,0x28,0x3D,0x42,0x11,0x55,0x68,0x07,0x07,0x07,0x07,0x21,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0D,0x06,0x07,0x07,0x07,0x19,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x07,0x07,0x02,0x1C,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0x1B,0x1A,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +}; diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_keys/src/main.c b/frontends/calculator/CEdev/examples/gfx_sprite_keys/src/main.c index 0939a9d..2eeee66 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_keys/src/main.c +++ b/frontends/calculator/CEdev/examples/gfx_sprite_keys/src/main.c @@ -1,89 +1,89 @@ -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -/* Include the sprite data */ -#include "gfx/logo_gfx.h" - -/* Function for drawing the main sprite */ -void draw_sprite(int x, int y) { - /* Fill the screen with color index 0 - /* Note that this is a super inefficient way to - /* redraw, but it demonstrates a simple way of clearing past data */ - gfx_FillScreen(0); - - /* Draw a bunch of different styled sprites on the screen */ - gfx_Sprite(ubuntu, x, y); - - /* Copy the buffer to the screen */ - gfx_BlitBuffer(); // This is the same as gfx_Blit(gfx_buffer) -} - -void main(void) { - bool right; - bool left; - bool up; - bool down; - kb_key_t arrows; - - /* Coordinates used for the sprite */ - int x, y; - - /* Initialize the 8bpp graphics */ - gfx_Begin(); - - /* Set up the palette for our sprites */ - gfx_SetPalette(logo_gfx_pal, sizeof_logo_gfx_pal, 0); - - /* Start at 0, 0 */ - x = 0; - y = 0; - - gfx_SetDrawBuffer(); - - draw_sprite(x, y); - - do { - /* Scan the keypad to update kb_Data */ - kb_Scan(); - - /* Get the arrow key statuses */ - arrows = kb_Data[7]; - - /* Convert the data to booleans so we can read them easier */ - right = arrows & kb_Right; - left = arrows & kb_Left; - down = arrows & kb_Down; - up = arrows & kb_Up; - - /* If any arrows are pressed, do this */ - if (arrows) { - /* Do different directions depending on the keypress */ - if (right) { - x++; - } - if (left) { - x--; - } - if (down) { - y++; - } - if (up) { - y--; - } - draw_sprite(x, y); - } - } while (kb_Data[6] != kb_Clear); - - /* Close the graphics */ - gfx_End(); -} +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +/* Include the sprite data */ +#include "gfx/logo_gfx.h" + +/* Function for drawing the main sprite */ +void draw_sprite(int x, int y) { + /* Fill the screen with color index 0 + /* Note that this is a super inefficient way to + /* redraw, but it demonstrates a simple way of clearing past data */ + gfx_FillScreen(0); + + /* Draw a bunch of different styled sprites on the screen */ + gfx_Sprite(ubuntu, x, y); + + /* Copy the buffer to the screen */ + gfx_BlitBuffer(); // This is the same as gfx_Blit(gfx_buffer) +} + +void main(void) { + bool right; + bool left; + bool up; + bool down; + kb_key_t arrows; + + /* Coordinates used for the sprite */ + int x, y; + + /* Initialize the 8bpp graphics */ + gfx_Begin(); + + /* Set up the palette for our sprites */ + gfx_SetPalette(logo_gfx_pal, sizeof_logo_gfx_pal, 0); + + /* Start at 0, 0 */ + x = 0; + y = 0; + + gfx_SetDrawBuffer(); + + draw_sprite(x, y); + + do { + /* Scan the keypad to update kb_Data */ + kb_Scan(); + + /* Get the arrow key statuses */ + arrows = kb_Data[7]; + + /* Convert the data to booleans so we can read them easier */ + right = arrows & kb_Right; + left = arrows & kb_Left; + down = arrows & kb_Down; + up = arrows & kb_Up; + + /* If any arrows are pressed, do this */ + if (arrows) { + /* Do different directions depending on the keypress */ + if (right) { + x++; + } + if (left) { + x--; + } + if (down) { + y++; + } + if (up) { + y--; + } + draw_sprite(x, y); + } + } while (kb_Data[6] != kb_Clear); + + /* Close the graphics */ + gfx_End(); +} diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_rotate/autotester.json b/frontends/calculator/CEdev/examples/gfx_sprite_rotate/autotester.json index 3a75731..6e283c4 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_rotate/autotester.json +++ b/frontends/calculator/CEdev/examples/gfx_sprite_rotate/autotester.json @@ -1,33 +1,33 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "delay|300", - "hash|1", - "key|enter", - "delay|300", - "hashWait|2" - ], - "hashes": { - "1": { - "description": "Make sure the rotated sprites are displayed properly", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "14098FC" ] - }, - "2": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} - +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "delay|300", + "hash|1", + "key|enter", + "delay|300", + "hashWait|2" + ], + "hashes": { + "1": { + "description": "Make sure the rotated sprites are displayed properly", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "14098FC" ] + }, + "2": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} + diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_rotate/makefile b/frontends/calculator/CEdev/examples/gfx_sprite_rotate/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_rotate/makefile +++ b/frontends/calculator/CEdev/examples/gfx_sprite_rotate/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_rotate/readme.md b/frontends/calculator/CEdev/examples/gfx_sprite_rotate/readme.md index 79a6b5d..8b53b0d 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_rotate/readme.md +++ b/frontends/calculator/CEdev/examples/gfx_sprite_rotate/readme.md @@ -1,10 +1,10 @@ -### GraphX Sprite Rotation Demo - -Demonstrates rotating and flipping sprites. - -![Screenshot](screenshot.png) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### GraphX Sprite Rotation Demo + +Demonstrates rotating and flipping sprites. + +![Screenshot](screenshot.png) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_rotate/src/gfx/convpng.ini b/frontends/calculator/CEdev/examples/gfx_sprite_rotate/src/gfx/convpng.ini index 10642ba..4d215dc 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_rotate/src/gfx/convpng.ini +++ b/frontends/calculator/CEdev/examples/gfx_sprite_rotate/src/gfx/convpng.ini @@ -1,4 +1,4 @@ -#GroupC : logo_gfx -#PNGImages : - ubuntu - +#GroupC : logo_gfx +#PNGImages : + ubuntu + diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_rotate/src/gfx/logo_gfx.c b/frontends/calculator/CEdev/examples/gfx_sprite_rotate/src/gfx/logo_gfx.c index 4e62af6..70c516f 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_rotate/src/gfx/logo_gfx.c +++ b/frontends/calculator/CEdev/examples/gfx_sprite_rotate/src/gfx/logo_gfx.c @@ -1,196 +1,196 @@ -// convpng -#include -#include "logo_gfx.h" - -uint16_t logo_gfx_pal[190] = { - 0xFFFF, // 00 :: rgb(255,255,255) - 0xE821, // 01 :: rgb(213,11,11) - 0x7E20, // 02 :: rgb(251,139,2) - 0x7E20, // 03 :: rgb(251,139,1) - 0xFFFF, // 04 :: rgb(255,254,254) - 0xFFFF, // 05 :: rgb(255,255,254) - 0x6800, // 06 :: rgb(212,2,2) - 0x6800, // 07 :: rgb(212,0,0) - 0x7E20, // 08 :: rgb(251,139,0) - 0x7920, // 09 :: rgb(244,72,0) - 0xFE20, // 10 :: rgb(251,140,4) - 0xFFFF, // 11 :: rgb(255,253,253) - 0xFFFF, // 12 :: rgb(255,254,253) - 0xFECC, // 13 :: rgb(252,182,97) - 0x7A90, // 14 :: rgb(249,163,128) - 0x7FDC, // 15 :: rgb(254,244,231) - 0xF985, // 16 :: rgb(245,100,40) - 0x7F9A, // 17 :: rgb(253,225,213) - 0x7FDD, // 18 :: rgb(253,242,242) - 0x6D6B, // 19 :: rgb(226,90,90) - 0xFFBC, // 20 :: rgb(254,239,233) - 0xF921, // 21 :: rgb(244,77,7) - 0x7EED, // 22 :: rgb(252,187,107) - 0xFF99, // 23 :: rgb(254,231,203) - 0xFFFE, // 24 :: rgb(255,253,250) - 0xFF16, // 25 :: rgb(251,199,177) - 0xF921, // 26 :: rgb(244,78,8) - 0xFE87, // 27 :: rgb(251,167,61) - 0xFFBA, // 28 :: rgb(254,237,216) - 0x7F31, // 29 :: rgb(253,204,143) - 0xFF76, // 30 :: rgb(253,222,183) - 0x7B7B, // 31 :: rgb(249,220,220) - 0xFAF7, // 32 :: rgb(244,192,192) - 0x7FDD, // 33 :: rgb(252,241,241) - 0xF18C, // 34 :: rgb(229,102,102) - 0xFE87, // 35 :: rgb(251,164,56) - 0x7B5A, // 36 :: rgb(247,212,212) - 0xFF76, // 37 :: rgb(253,221,181) - 0xF652, // 38 :: rgb(237,151,151) - 0x7652, // 39 :: rgb(236,145,145) - 0x6D29, // 40 :: rgb(224,74,74) - 0xE800, // 41 :: rgb(212,3,3) - 0x718C, // 42 :: rgb(228,98,98) - 0xFF54, // 43 :: rgb(253,214,165) - 0xFB7B, // 44 :: rgb(250,224,224) - 0x7673, // 45 :: rgb(237,153,153) - 0xFF32, // 46 :: rgb(252,205,148) - 0x7EA8, // 47 :: rgb(251,169,68) - 0x6CC6, // 48 :: rgb(219,48,48) - 0x7FBA, // 49 :: rgb(254,234,211) - 0xE842, // 50 :: rgb(215,20,20) - 0xFF77, // 51 :: rgb(253,224,187) - 0xF652, // 52 :: rgb(237,149,149) - 0x7F75, // 53 :: rgb(253,218,175) - 0x7FFE, // 54 :: rgb(254,249,249) - 0x7EEC, // 55 :: rgb(252,185,102) - 0x7FBD, // 56 :: rgb(252,236,236) - 0xFFFF, // 57 :: rgb(255,253,251) - 0x7EED, // 58 :: rgb(252,188,109) - 0x7FFF, // 59 :: rgb(254,252,252) - 0xFAF7, // 60 :: rgb(243,189,189) - 0x7B9B, // 61 :: rgb(250,225,225) - 0x7AD2, // 62 :: rgb(250,179,149) - 0xED09, // 63 :: rgb(224,70,70) - 0xECA5, // 64 :: rgb(218,43,43) - 0xFAF4, // 65 :: rgb(250,190,165) - 0x6D4A, // 66 :: rgb(225,82,82) - 0xED08, // 67 :: rgb(223,69,69) - 0x6D08, // 68 :: rgb(222,63,63) - 0x76D6, // 69 :: rgb(242,178,178) - 0xECC6, // 70 :: rgb(220,51,51) - 0xF1AD, // 71 :: rgb(229,109,109) - 0xFFDD, // 72 :: rgb(254,246,235) - 0x718C, // 73 :: rgb(228,97,97) - 0xFFBC, // 74 :: rgb(254,239,234) - 0xFF77, // 75 :: rgb(253,223,187) - 0x76D6, // 76 :: rgb(242,179,179) - 0x6863, // 77 :: rgb(216,26,26) - 0x7AB1, // 78 :: rgb(249,169,136) - 0xE843, // 79 :: rgb(215,21,21) - 0xFF9C, // 80 :: rgb(251,230,230) - 0xF9A6, // 81 :: rgb(245,108,51) - 0x7F97, // 82 :: rgb(253,225,189) - 0x7942, // 83 :: rgb(244,81,13) - 0x7FBA, // 84 :: rgb(254,236,215) - 0xFE21, // 85 :: rgb(251,143,11) - 0x7FBC, // 86 :: rgb(251,234,234) - 0xFB18, // 87 :: rgb(245,197,197) - 0x76D6, // 88 :: rgb(242,177,177) - 0x71AD, // 89 :: rgb(229,106,106) - 0xFAB2, // 90 :: rgb(249,176,144) - 0x7F9A, // 91 :: rgb(253,227,217) - 0x7FDD, // 92 :: rgb(254,242,237) - 0x7FDE, // 93 :: rgb(253,243,243) - 0x7AB1, // 94 :: rgb(249,171,139) - 0xFFBB, // 95 :: rgb(254,239,221) - 0xF694, // 96 :: rgb(240,167,167) - 0x7AF3, // 97 :: rgb(250,186,160) - 0xFF7A, // 98 :: rgb(253,224,213) - 0x7F0E, // 99 :: rgb(253,193,117) - 0xFA6F, // 100 :: rgb(249,159,121) - 0x7FFE, // 101 :: rgb(255,251,247) - 0xFEAA, // 102 :: rgb(251,175,80) - 0x7694, // 103 :: rgb(239,161,161) - 0xE801, // 104 :: rgb(213,5,5) - 0xFA6F, // 105 :: rgb(249,159,122) - 0x7FDB, // 106 :: rgb(254,241,224) - 0xF920, // 107 :: rgb(244,75,4) - 0x7A8F, // 108 :: rgb(249,160,123) - 0x7694, // 109 :: rgb(239,163,163) - 0xE822, // 110 :: rgb(214,14,14) - 0x6D29, // 111 :: rgb(223,71,71) - 0xFF55, // 112 :: rgb(253,215,169) - 0x7A8F, // 113 :: rgb(249,161,124) - 0xFF32, // 114 :: rgb(253,207,151) - 0x7FBB, // 115 :: rgb(253,233,224) - 0xF694, // 116 :: rgb(239,165,165) - 0xFFBC, // 117 :: rgb(254,238,231) - 0xFB39, // 118 :: rgb(247,208,208) - 0x7B38, // 119 :: rgb(246,201,201) - 0x6842, // 120 :: rgb(214,16,16) - 0x7FFF, // 121 :: rgb(254,251,251) - 0xFB7B, // 122 :: rgb(250,223,223) - 0xF16C, // 123 :: rgb(227,95,95) - 0x7672, // 124 :: rgb(237,152,152) - 0x7631, // 125 :: rgb(235,138,138) - 0xFE87, // 126 :: rgb(251,165,60) - 0xFFDD, // 127 :: rgb(254,245,240) - 0xFF33, // 128 :: rgb(252,208,154) - 0x7F79, // 129 :: rgb(252,220,207) - 0x7E41, // 130 :: rgb(251,144,12) - 0x7E42, // 131 :: rgb(251,146,19) - 0x7F36, // 132 :: rgb(251,202,182) - 0x7FDC, // 133 :: rgb(254,243,230) - 0x7963, // 134 :: rgb(244,89,24) - 0x7F0E, // 135 :: rgb(252,193,119) - 0xFE87, // 136 :: rgb(251,164,57) - 0x7A2B, // 137 :: rgb(247,138,92) - 0xFA6E, // 138 :: rgb(249,157,119) - 0xFF9B, // 139 :: rgb(253,229,219) - 0x7920, // 140 :: rgb(244,74,3) - 0xFFDE, // 141 :: rgb(254,246,243) - 0xF964, // 142 :: rgb(245,95,32) - 0xF921, // 143 :: rgb(244,76,6) - 0xFAD3, // 144 :: rgb(250,183,155) - 0xFAD3, // 145 :: rgb(250,182,154) - 0xF985, // 146 :: rgb(245,103,44) - 0x7FFE, // 147 :: rgb(255,252,250) - 0x7FFE, // 148 :: rgb(255,251,250) - 0x6800, // 149 :: rgb(212,1,1) - 0x7B18, // 150 :: rgb(245,195,195) - 0x7AD2, // 151 :: rgb(250,178,148) - 0x7ECB, // 152 :: rgb(251,179,87) - 0x7EA8, // 153 :: rgb(251,169,69) - 0xFEAA, // 154 :: rgb(251,176,82) - 0x7652, // 155 :: rgb(236,146,146) - 0xF942, // 156 :: rgb(244,83,16) - 0xF9E9, // 157 :: rgb(246,126,76) - 0xFFDD, // 158 :: rgb(254,246,242) - 0x71EF, // 159 :: rgb(231,120,120) - 0xFB39, // 160 :: rgb(247,206,206) - 0xFF37, // 161 :: rgb(252,208,190) - 0x6D08, // 162 :: rgb(222,65,65) - 0x7FDE, // 163 :: rgb(253,244,244) - 0x7A4D, // 164 :: rgb(248,147,106) - 0xFB5A, // 165 :: rgb(248,216,216) - 0x7F79, // 166 :: rgb(253,220,206) - 0xFAD3, // 167 :: rgb(250,181,153) - 0x7F15, // 168 :: rgb(251,196,173) - 0x7F31, // 169 :: rgb(252,201,137) - 0xF9C8, // 170 :: rgb(246,116,62) - 0xFAB2, // 171 :: rgb(250,176,145) - 0xFF10, // 172 :: rgb(252,198,131) - 0x7A6E, // 173 :: rgb(248,155,117) - 0xFF9B, // 174 :: rgb(253,232,224) - 0xFFBB, // 175 :: rgb(254,240,221) - 0x7920, // 176 :: rgb(244,74,2) - 0x7FDC, // 177 :: rgb(254,243,229) - 0xFE21, // 178 :: rgb(251,141,6) - 0x7F53, // 179 :: rgb(253,210,155) - 0xF9E9, // 180 :: rgb(247,127,77) - 0xFF58, // 181 :: rgb(252,213,197) - 0xFE87, // 182 :: rgb(251,164,58) - 0xFF54, // 183 :: rgb(253,213,164) - 0xFEA9, // 184 :: rgb(251,174,78) - 0xFE21, // 185 :: rgb(251,143,10) - 0x79E8, // 186 :: rgb(246,120,67) - 0x7E87, // 187 :: rgb(251,163,54) - 0xFFDD, // 188 :: rgb(254,248,240) - 0x7F57, // 189 :: rgb(252,210,193) +// convpng +#include +#include "logo_gfx.h" + +uint16_t logo_gfx_pal[190] = { + 0xFFFF, // 00 :: rgb(255,255,255) + 0xE821, // 01 :: rgb(213,11,11) + 0x7E20, // 02 :: rgb(251,139,2) + 0x7E20, // 03 :: rgb(251,139,1) + 0xFFFF, // 04 :: rgb(255,254,254) + 0xFFFF, // 05 :: rgb(255,255,254) + 0x6800, // 06 :: rgb(212,2,2) + 0x6800, // 07 :: rgb(212,0,0) + 0x7E20, // 08 :: rgb(251,139,0) + 0x7920, // 09 :: rgb(244,72,0) + 0xFE20, // 10 :: rgb(251,140,4) + 0xFFFF, // 11 :: rgb(255,253,253) + 0xFFFF, // 12 :: rgb(255,254,253) + 0xFECC, // 13 :: rgb(252,182,97) + 0x7A90, // 14 :: rgb(249,163,128) + 0x7FDC, // 15 :: rgb(254,244,231) + 0xF985, // 16 :: rgb(245,100,40) + 0x7F9A, // 17 :: rgb(253,225,213) + 0x7FDD, // 18 :: rgb(253,242,242) + 0x6D6B, // 19 :: rgb(226,90,90) + 0xFFBC, // 20 :: rgb(254,239,233) + 0xF921, // 21 :: rgb(244,77,7) + 0x7EED, // 22 :: rgb(252,187,107) + 0xFF99, // 23 :: rgb(254,231,203) + 0xFFFE, // 24 :: rgb(255,253,250) + 0xFF16, // 25 :: rgb(251,199,177) + 0xF921, // 26 :: rgb(244,78,8) + 0xFE87, // 27 :: rgb(251,167,61) + 0xFFBA, // 28 :: rgb(254,237,216) + 0x7F31, // 29 :: rgb(253,204,143) + 0xFF76, // 30 :: rgb(253,222,183) + 0x7B7B, // 31 :: rgb(249,220,220) + 0xFAF7, // 32 :: rgb(244,192,192) + 0x7FDD, // 33 :: rgb(252,241,241) + 0xF18C, // 34 :: rgb(229,102,102) + 0xFE87, // 35 :: rgb(251,164,56) + 0x7B5A, // 36 :: rgb(247,212,212) + 0xFF76, // 37 :: rgb(253,221,181) + 0xF652, // 38 :: rgb(237,151,151) + 0x7652, // 39 :: rgb(236,145,145) + 0x6D29, // 40 :: rgb(224,74,74) + 0xE800, // 41 :: rgb(212,3,3) + 0x718C, // 42 :: rgb(228,98,98) + 0xFF54, // 43 :: rgb(253,214,165) + 0xFB7B, // 44 :: rgb(250,224,224) + 0x7673, // 45 :: rgb(237,153,153) + 0xFF32, // 46 :: rgb(252,205,148) + 0x7EA8, // 47 :: rgb(251,169,68) + 0x6CC6, // 48 :: rgb(219,48,48) + 0x7FBA, // 49 :: rgb(254,234,211) + 0xE842, // 50 :: rgb(215,20,20) + 0xFF77, // 51 :: rgb(253,224,187) + 0xF652, // 52 :: rgb(237,149,149) + 0x7F75, // 53 :: rgb(253,218,175) + 0x7FFE, // 54 :: rgb(254,249,249) + 0x7EEC, // 55 :: rgb(252,185,102) + 0x7FBD, // 56 :: rgb(252,236,236) + 0xFFFF, // 57 :: rgb(255,253,251) + 0x7EED, // 58 :: rgb(252,188,109) + 0x7FFF, // 59 :: rgb(254,252,252) + 0xFAF7, // 60 :: rgb(243,189,189) + 0x7B9B, // 61 :: rgb(250,225,225) + 0x7AD2, // 62 :: rgb(250,179,149) + 0xED09, // 63 :: rgb(224,70,70) + 0xECA5, // 64 :: rgb(218,43,43) + 0xFAF4, // 65 :: rgb(250,190,165) + 0x6D4A, // 66 :: rgb(225,82,82) + 0xED08, // 67 :: rgb(223,69,69) + 0x6D08, // 68 :: rgb(222,63,63) + 0x76D6, // 69 :: rgb(242,178,178) + 0xECC6, // 70 :: rgb(220,51,51) + 0xF1AD, // 71 :: rgb(229,109,109) + 0xFFDD, // 72 :: rgb(254,246,235) + 0x718C, // 73 :: rgb(228,97,97) + 0xFFBC, // 74 :: rgb(254,239,234) + 0xFF77, // 75 :: rgb(253,223,187) + 0x76D6, // 76 :: rgb(242,179,179) + 0x6863, // 77 :: rgb(216,26,26) + 0x7AB1, // 78 :: rgb(249,169,136) + 0xE843, // 79 :: rgb(215,21,21) + 0xFF9C, // 80 :: rgb(251,230,230) + 0xF9A6, // 81 :: rgb(245,108,51) + 0x7F97, // 82 :: rgb(253,225,189) + 0x7942, // 83 :: rgb(244,81,13) + 0x7FBA, // 84 :: rgb(254,236,215) + 0xFE21, // 85 :: rgb(251,143,11) + 0x7FBC, // 86 :: rgb(251,234,234) + 0xFB18, // 87 :: rgb(245,197,197) + 0x76D6, // 88 :: rgb(242,177,177) + 0x71AD, // 89 :: rgb(229,106,106) + 0xFAB2, // 90 :: rgb(249,176,144) + 0x7F9A, // 91 :: rgb(253,227,217) + 0x7FDD, // 92 :: rgb(254,242,237) + 0x7FDE, // 93 :: rgb(253,243,243) + 0x7AB1, // 94 :: rgb(249,171,139) + 0xFFBB, // 95 :: rgb(254,239,221) + 0xF694, // 96 :: rgb(240,167,167) + 0x7AF3, // 97 :: rgb(250,186,160) + 0xFF7A, // 98 :: rgb(253,224,213) + 0x7F0E, // 99 :: rgb(253,193,117) + 0xFA6F, // 100 :: rgb(249,159,121) + 0x7FFE, // 101 :: rgb(255,251,247) + 0xFEAA, // 102 :: rgb(251,175,80) + 0x7694, // 103 :: rgb(239,161,161) + 0xE801, // 104 :: rgb(213,5,5) + 0xFA6F, // 105 :: rgb(249,159,122) + 0x7FDB, // 106 :: rgb(254,241,224) + 0xF920, // 107 :: rgb(244,75,4) + 0x7A8F, // 108 :: rgb(249,160,123) + 0x7694, // 109 :: rgb(239,163,163) + 0xE822, // 110 :: rgb(214,14,14) + 0x6D29, // 111 :: rgb(223,71,71) + 0xFF55, // 112 :: rgb(253,215,169) + 0x7A8F, // 113 :: rgb(249,161,124) + 0xFF32, // 114 :: rgb(253,207,151) + 0x7FBB, // 115 :: rgb(253,233,224) + 0xF694, // 116 :: rgb(239,165,165) + 0xFFBC, // 117 :: rgb(254,238,231) + 0xFB39, // 118 :: rgb(247,208,208) + 0x7B38, // 119 :: rgb(246,201,201) + 0x6842, // 120 :: rgb(214,16,16) + 0x7FFF, // 121 :: rgb(254,251,251) + 0xFB7B, // 122 :: rgb(250,223,223) + 0xF16C, // 123 :: rgb(227,95,95) + 0x7672, // 124 :: rgb(237,152,152) + 0x7631, // 125 :: rgb(235,138,138) + 0xFE87, // 126 :: rgb(251,165,60) + 0xFFDD, // 127 :: rgb(254,245,240) + 0xFF33, // 128 :: rgb(252,208,154) + 0x7F79, // 129 :: rgb(252,220,207) + 0x7E41, // 130 :: rgb(251,144,12) + 0x7E42, // 131 :: rgb(251,146,19) + 0x7F36, // 132 :: rgb(251,202,182) + 0x7FDC, // 133 :: rgb(254,243,230) + 0x7963, // 134 :: rgb(244,89,24) + 0x7F0E, // 135 :: rgb(252,193,119) + 0xFE87, // 136 :: rgb(251,164,57) + 0x7A2B, // 137 :: rgb(247,138,92) + 0xFA6E, // 138 :: rgb(249,157,119) + 0xFF9B, // 139 :: rgb(253,229,219) + 0x7920, // 140 :: rgb(244,74,3) + 0xFFDE, // 141 :: rgb(254,246,243) + 0xF964, // 142 :: rgb(245,95,32) + 0xF921, // 143 :: rgb(244,76,6) + 0xFAD3, // 144 :: rgb(250,183,155) + 0xFAD3, // 145 :: rgb(250,182,154) + 0xF985, // 146 :: rgb(245,103,44) + 0x7FFE, // 147 :: rgb(255,252,250) + 0x7FFE, // 148 :: rgb(255,251,250) + 0x6800, // 149 :: rgb(212,1,1) + 0x7B18, // 150 :: rgb(245,195,195) + 0x7AD2, // 151 :: rgb(250,178,148) + 0x7ECB, // 152 :: rgb(251,179,87) + 0x7EA8, // 153 :: rgb(251,169,69) + 0xFEAA, // 154 :: rgb(251,176,82) + 0x7652, // 155 :: rgb(236,146,146) + 0xF942, // 156 :: rgb(244,83,16) + 0xF9E9, // 157 :: rgb(246,126,76) + 0xFFDD, // 158 :: rgb(254,246,242) + 0x71EF, // 159 :: rgb(231,120,120) + 0xFB39, // 160 :: rgb(247,206,206) + 0xFF37, // 161 :: rgb(252,208,190) + 0x6D08, // 162 :: rgb(222,65,65) + 0x7FDE, // 163 :: rgb(253,244,244) + 0x7A4D, // 164 :: rgb(248,147,106) + 0xFB5A, // 165 :: rgb(248,216,216) + 0x7F79, // 166 :: rgb(253,220,206) + 0xFAD3, // 167 :: rgb(250,181,153) + 0x7F15, // 168 :: rgb(251,196,173) + 0x7F31, // 169 :: rgb(252,201,137) + 0xF9C8, // 170 :: rgb(246,116,62) + 0xFAB2, // 171 :: rgb(250,176,145) + 0xFF10, // 172 :: rgb(252,198,131) + 0x7A6E, // 173 :: rgb(248,155,117) + 0xFF9B, // 174 :: rgb(253,232,224) + 0xFFBB, // 175 :: rgb(254,240,221) + 0x7920, // 176 :: rgb(244,74,2) + 0x7FDC, // 177 :: rgb(254,243,229) + 0xFE21, // 178 :: rgb(251,141,6) + 0x7F53, // 179 :: rgb(253,210,155) + 0xF9E9, // 180 :: rgb(247,127,77) + 0xFF58, // 181 :: rgb(252,213,197) + 0xFE87, // 182 :: rgb(251,164,58) + 0xFF54, // 183 :: rgb(253,213,164) + 0xFEA9, // 184 :: rgb(251,174,78) + 0xFE21, // 185 :: rgb(251,143,10) + 0x79E8, // 186 :: rgb(246,120,67) + 0x7E87, // 187 :: rgb(251,163,54) + 0xFFDD, // 188 :: rgb(254,248,240) + 0x7F57, // 189 :: rgb(252,210,193) }; \ No newline at end of file diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_rotate/src/gfx/logo_gfx.h b/frontends/calculator/CEdev/examples/gfx_sprite_rotate/src/gfx/logo_gfx.h index 28d30ce..b06965d 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_rotate/src/gfx/logo_gfx.h +++ b/frontends/calculator/CEdev/examples/gfx_sprite_rotate/src/gfx/logo_gfx.h @@ -1,15 +1,15 @@ -// convpng -// this file contains all the graphics sources for easy inclusion in a project -#ifndef __logo_gfx__ -#define __logo_gfx__ -#include - -#define ubuntu_width 32 -#define ubuntu_height 32 -#define ubuntu_size 1026 -extern uint8_t ubuntu_data[1026]; -#define ubuntu ((gfx_sprite_t*)ubuntu_data) -#define sizeof_logo_gfx_pal 380 -extern uint16_t logo_gfx_pal[190]; - -#endif +// convpng +// this file contains all the graphics sources for easy inclusion in a project +#ifndef __logo_gfx__ +#define __logo_gfx__ +#include + +#define ubuntu_width 32 +#define ubuntu_height 32 +#define ubuntu_size 1026 +extern uint8_t ubuntu_data[1026]; +#define ubuntu ((gfx_sprite_t*)ubuntu_data) +#define sizeof_logo_gfx_pal 380 +extern uint16_t logo_gfx_pal[190]; + +#endif diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_rotate/src/gfx/ubuntu.c b/frontends/calculator/CEdev/examples/gfx_sprite_rotate/src/gfx/ubuntu.c index f2060ae..c861afc 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_rotate/src/gfx/ubuntu.c +++ b/frontends/calculator/CEdev/examples/gfx_sprite_rotate/src/gfx/ubuntu.c @@ -1,40 +1,40 @@ -// convpng -#include -#include "logo_gfx.h" - -// 8 bpp image -uint8_t ubuntu_data[1026] = { - 32,32, // width,height - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0B,0x45,0x27,0x1F,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x13,0x07,0x07,0x01,0x20,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x5B,0x41,0x4E,0x0E,0x90,0x14,0xA5,0x07,0x07,0x07,0x07,0x28,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x84,0x10,0x09,0x09,0x09,0x09,0x09,0xA8,0xA0,0x07,0x07,0x07,0x07,0x43,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x85,0x00,0x8B,0x15,0x09,0x09,0x09,0x09,0x09,0xA4,0x04,0xA2,0x07,0x07,0x95,0x58,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x83,0x0F,0x00,0x8A,0x09,0x09,0x09,0x09,0x09,0x15,0xA6,0xA3,0x9B,0x9F,0x96,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x03,0x08,0x0D,0x00,0x7F,0x86,0x6B,0x8E,0x92,0x1A,0x09,0x9C,0xA7,0x9E,0x94,0x11,0x5E,0x04,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5F,0x55,0x08,0x08,0x02,0x17,0x00,0x62,0x5C,0x05,0x00,0x93,0xA1,0x9D,0x09,0x09,0x8F,0x09,0x09,0x3E,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x9A,0x08,0x08,0x08,0x08,0x87,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x91,0x8C,0x09,0x09,0x09,0x53,0x4A,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xAF,0x03,0x08,0x08,0x08,0x7E,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5A,0x09,0x09,0x09,0x09,0x0E,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xB7,0x08,0x08,0x08,0x02,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x51,0x09,0x09,0x09,0x10,0x04,0x00,0x00, - 0x00,0x00,0x00,0x8D,0xAB,0xAD,0xBD,0x05,0x16,0x08,0x08,0x99,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x61,0x09,0x09,0x09,0x09,0x14,0x00,0x00, - 0x00,0x00,0x0C,0xAA,0x09,0x09,0xB0,0x19,0xBC,0xB9,0x08,0xAC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x75,0x71,0x6C,0x69,0x64,0x73,0x00,0x00, - 0x00,0x00,0x81,0x09,0x09,0x09,0x09,0xBA,0x00,0xB6,0x08,0xB3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x11,0x09,0x09,0x09,0x09,0xB4,0x00,0xBB,0x08,0xA9,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5D,0x67,0x6D,0x74,0x60,0x56,0x00,0x00, - 0x00,0x00,0x04,0x89,0x09,0x09,0x1A,0xB5,0xB1,0xB2,0x08,0x98,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4C,0x07,0x07,0x07,0x07,0x50,0x00,0x00, - 0x00,0x00,0x00,0x0C,0x19,0x97,0xAE,0x18,0xB8,0x08,0x08,0x82,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x42,0x07,0x07,0x07,0x4D,0x0B,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x17,0x08,0x08,0x08,0x08,0x37,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x06,0x07,0x07,0x07,0x47,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x88,0x08,0x08,0x08,0x08,0x2E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x76,0x4F,0x07,0x07,0x07,0x29,0x24,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4B,0x08,0x08,0x08,0x08,0x35,0x00,0x36,0x04,0x00,0x00,0x00,0x12,0x7D,0x01,0x07,0x07,0x07,0x07,0x22,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x3A,0x08,0x08,0x2F,0x04,0x3B,0x30,0x46,0x49,0x59,0x6F,0x6E,0x07,0x07,0x06,0x01,0x07,0x40,0x21,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x39,0x0D,0x0A,0x31,0x00,0x34,0x07,0x07,0x07,0x07,0x07,0x07,0x78,0x7C,0x12,0x79,0x7A,0x3D,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x33,0x00,0x38,0x32,0x07,0x07,0x07,0x07,0x07,0x68,0x77,0x65,0x72,0x63,0x52,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2D,0x06,0x07,0x07,0x07,0x07,0x07,0x7B,0x04,0x66,0x08,0x08,0x03,0x2B,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2C,0x26,0x2A,0x3F,0x44,0x13,0x57,0x6A,0x08,0x08,0x08,0x08,0x23,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x02,0x08,0x08,0x08,0x1B,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x16,0x08,0x08,0x0A,0x1E,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x25,0x1D,0x1C,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -}; +// convpng +#include +#include "logo_gfx.h" + +// 8 bpp image +uint8_t ubuntu_data[1026] = { + 32,32, // width,height + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0B,0x45,0x27,0x1F,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x13,0x07,0x07,0x01,0x20,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x5B,0x41,0x4E,0x0E,0x90,0x14,0xA5,0x07,0x07,0x07,0x07,0x28,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x84,0x10,0x09,0x09,0x09,0x09,0x09,0xA8,0xA0,0x07,0x07,0x07,0x07,0x43,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x85,0x00,0x8B,0x15,0x09,0x09,0x09,0x09,0x09,0xA4,0x04,0xA2,0x07,0x07,0x95,0x58,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x83,0x0F,0x00,0x8A,0x09,0x09,0x09,0x09,0x09,0x15,0xA6,0xA3,0x9B,0x9F,0x96,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x03,0x08,0x0D,0x00,0x7F,0x86,0x6B,0x8E,0x92,0x1A,0x09,0x9C,0xA7,0x9E,0x94,0x11,0x5E,0x04,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5F,0x55,0x08,0x08,0x02,0x17,0x00,0x62,0x5C,0x05,0x00,0x93,0xA1,0x9D,0x09,0x09,0x8F,0x09,0x09,0x3E,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x9A,0x08,0x08,0x08,0x08,0x87,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x91,0x8C,0x09,0x09,0x09,0x53,0x4A,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xAF,0x03,0x08,0x08,0x08,0x7E,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5A,0x09,0x09,0x09,0x09,0x0E,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xB7,0x08,0x08,0x08,0x02,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x51,0x09,0x09,0x09,0x10,0x04,0x00,0x00, + 0x00,0x00,0x00,0x8D,0xAB,0xAD,0xBD,0x05,0x16,0x08,0x08,0x99,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x61,0x09,0x09,0x09,0x09,0x14,0x00,0x00, + 0x00,0x00,0x0C,0xAA,0x09,0x09,0xB0,0x19,0xBC,0xB9,0x08,0xAC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x75,0x71,0x6C,0x69,0x64,0x73,0x00,0x00, + 0x00,0x00,0x81,0x09,0x09,0x09,0x09,0xBA,0x00,0xB6,0x08,0xB3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x11,0x09,0x09,0x09,0x09,0xB4,0x00,0xBB,0x08,0xA9,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5D,0x67,0x6D,0x74,0x60,0x56,0x00,0x00, + 0x00,0x00,0x04,0x89,0x09,0x09,0x1A,0xB5,0xB1,0xB2,0x08,0x98,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4C,0x07,0x07,0x07,0x07,0x50,0x00,0x00, + 0x00,0x00,0x00,0x0C,0x19,0x97,0xAE,0x18,0xB8,0x08,0x08,0x82,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x42,0x07,0x07,0x07,0x4D,0x0B,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x17,0x08,0x08,0x08,0x08,0x37,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x06,0x07,0x07,0x07,0x47,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x88,0x08,0x08,0x08,0x08,0x2E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x76,0x4F,0x07,0x07,0x07,0x29,0x24,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4B,0x08,0x08,0x08,0x08,0x35,0x00,0x36,0x04,0x00,0x00,0x00,0x12,0x7D,0x01,0x07,0x07,0x07,0x07,0x22,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x3A,0x08,0x08,0x2F,0x04,0x3B,0x30,0x46,0x49,0x59,0x6F,0x6E,0x07,0x07,0x06,0x01,0x07,0x40,0x21,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x39,0x0D,0x0A,0x31,0x00,0x34,0x07,0x07,0x07,0x07,0x07,0x07,0x78,0x7C,0x12,0x79,0x7A,0x3D,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x33,0x00,0x38,0x32,0x07,0x07,0x07,0x07,0x07,0x68,0x77,0x65,0x72,0x63,0x52,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2D,0x06,0x07,0x07,0x07,0x07,0x07,0x7B,0x04,0x66,0x08,0x08,0x03,0x2B,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2C,0x26,0x2A,0x3F,0x44,0x13,0x57,0x6A,0x08,0x08,0x08,0x08,0x23,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x02,0x08,0x08,0x08,0x1B,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x16,0x08,0x08,0x0A,0x1E,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x25,0x1D,0x1C,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +}; diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_rotate/src/main.c b/frontends/calculator/CEdev/examples/gfx_sprite_rotate/src/main.c index 9e4611b..9089a96 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_rotate/src/main.c +++ b/frontends/calculator/CEdev/examples/gfx_sprite_rotate/src/main.c @@ -1,37 +1,37 @@ -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include "gfx/logo_gfx.h" - -void main(void) { - /* Create a buffer the same size as the ubuntu sprite */ - gfx_UninitedSprite(sprite_buffer, ubuntu_width, ubuntu_height); - - gfx_Begin(); - - /* Setup the palette used by the sprites*/ - gfx_SetPalette(logo_gfx_pal, sizeof_logo_gfx_pal, 0); - - gfx_Sprite(ubuntu, 42, 42); - gfx_Sprite(gfx_FlipSpriteY(ubuntu, sprite_buffer), 74, 74); - gfx_Sprite(gfx_RotateSpriteC(ubuntu, sprite_buffer), 106, 106); - - /* Draw these ones without any clipping. Clipping refers to wether or not when it hits the edge of the window if */ - /* the sprite will be draw partially onscreen. These routines are usually faster, because edge detection doesn't occur */ - gfx_Sprite_NoClip(gfx_RotateSpriteCC(ubuntu, sprite_buffer), 138, 138); - gfx_Sprite_NoClip(gfx_RotateSpriteHalf(ubuntu, sprite_buffer), 170, 170); - - /* Wait for a key to be pressed */ - while (!os_GetCSC()); - - /* Close the graphics */ - gfx_End(); -} +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include "gfx/logo_gfx.h" + +void main(void) { + /* Create a buffer the same size as the ubuntu sprite */ + gfx_UninitedSprite(sprite_buffer, ubuntu_width, ubuntu_height); + + gfx_Begin(); + + /* Setup the palette used by the sprites*/ + gfx_SetPalette(logo_gfx_pal, sizeof_logo_gfx_pal, 0); + + gfx_Sprite(ubuntu, 42, 42); + gfx_Sprite(gfx_FlipSpriteY(ubuntu, sprite_buffer), 74, 74); + gfx_Sprite(gfx_RotateSpriteC(ubuntu, sprite_buffer), 106, 106); + + /* Draw these ones without any clipping. Clipping refers to wether or not when it hits the edge of the window if */ + /* the sprite will be draw partially onscreen. These routines are usually faster, because edge detection doesn't occur */ + gfx_Sprite_NoClip(gfx_RotateSpriteCC(ubuntu, sprite_buffer), 138, 138); + gfx_Sprite_NoClip(gfx_RotateSpriteHalf(ubuntu, sprite_buffer), 170, 170); + + /* Wait for a key to be pressed */ + while (!os_GetCSC()); + + /* Close the graphics */ + gfx_End(); +} diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/autotester.json b/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/autotester.json index c8d5d5c..d79c69e 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/autotester.json +++ b/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/autotester.json @@ -1,33 +1,33 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "delay|8000", - "hash|1", - "key|enter", - "delay|300", - "hashWait|2" - ], - "hashes": { - "1": { - "description": "Make sure the rotated and scaled sprites are displayed properly", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "27D90BD4" ] - }, - "2": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} - +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "delay|8000", + "hash|1", + "key|enter", + "delay|300", + "hashWait|2" + ], + "hashes": { + "1": { + "description": "Make sure the rotated and scaled sprites are displayed properly", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "27D90BD4" ] + }, + "2": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} + diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/makefile b/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/makefile +++ b/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/readme.md b/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/readme.md index 036af22..25ad6d6 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/readme.md +++ b/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/readme.md @@ -1,9 +1,9 @@ -### GraphX Sprite Rotation and Scaling Demo - -Demonstrates rotating sprites and scaling sprites when rotating. - -![Screenshot](screenshot.gif) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. +### GraphX Sprite Rotation and Scaling Demo + +Demonstrates rotating sprites and scaling sprites when rotating. + +![Screenshot](screenshot.gif) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/src/gfx/convpng.ini b/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/src/gfx/convpng.ini index 10642ba..4d215dc 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/src/gfx/convpng.ini +++ b/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/src/gfx/convpng.ini @@ -1,4 +1,4 @@ -#GroupC : logo_gfx -#PNGImages : - ubuntu - +#GroupC : logo_gfx +#PNGImages : + ubuntu + diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/src/gfx/logo_gfx.c b/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/src/gfx/logo_gfx.c index 4e62af6..70c516f 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/src/gfx/logo_gfx.c +++ b/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/src/gfx/logo_gfx.c @@ -1,196 +1,196 @@ -// convpng -#include -#include "logo_gfx.h" - -uint16_t logo_gfx_pal[190] = { - 0xFFFF, // 00 :: rgb(255,255,255) - 0xE821, // 01 :: rgb(213,11,11) - 0x7E20, // 02 :: rgb(251,139,2) - 0x7E20, // 03 :: rgb(251,139,1) - 0xFFFF, // 04 :: rgb(255,254,254) - 0xFFFF, // 05 :: rgb(255,255,254) - 0x6800, // 06 :: rgb(212,2,2) - 0x6800, // 07 :: rgb(212,0,0) - 0x7E20, // 08 :: rgb(251,139,0) - 0x7920, // 09 :: rgb(244,72,0) - 0xFE20, // 10 :: rgb(251,140,4) - 0xFFFF, // 11 :: rgb(255,253,253) - 0xFFFF, // 12 :: rgb(255,254,253) - 0xFECC, // 13 :: rgb(252,182,97) - 0x7A90, // 14 :: rgb(249,163,128) - 0x7FDC, // 15 :: rgb(254,244,231) - 0xF985, // 16 :: rgb(245,100,40) - 0x7F9A, // 17 :: rgb(253,225,213) - 0x7FDD, // 18 :: rgb(253,242,242) - 0x6D6B, // 19 :: rgb(226,90,90) - 0xFFBC, // 20 :: rgb(254,239,233) - 0xF921, // 21 :: rgb(244,77,7) - 0x7EED, // 22 :: rgb(252,187,107) - 0xFF99, // 23 :: rgb(254,231,203) - 0xFFFE, // 24 :: rgb(255,253,250) - 0xFF16, // 25 :: rgb(251,199,177) - 0xF921, // 26 :: rgb(244,78,8) - 0xFE87, // 27 :: rgb(251,167,61) - 0xFFBA, // 28 :: rgb(254,237,216) - 0x7F31, // 29 :: rgb(253,204,143) - 0xFF76, // 30 :: rgb(253,222,183) - 0x7B7B, // 31 :: rgb(249,220,220) - 0xFAF7, // 32 :: rgb(244,192,192) - 0x7FDD, // 33 :: rgb(252,241,241) - 0xF18C, // 34 :: rgb(229,102,102) - 0xFE87, // 35 :: rgb(251,164,56) - 0x7B5A, // 36 :: rgb(247,212,212) - 0xFF76, // 37 :: rgb(253,221,181) - 0xF652, // 38 :: rgb(237,151,151) - 0x7652, // 39 :: rgb(236,145,145) - 0x6D29, // 40 :: rgb(224,74,74) - 0xE800, // 41 :: rgb(212,3,3) - 0x718C, // 42 :: rgb(228,98,98) - 0xFF54, // 43 :: rgb(253,214,165) - 0xFB7B, // 44 :: rgb(250,224,224) - 0x7673, // 45 :: rgb(237,153,153) - 0xFF32, // 46 :: rgb(252,205,148) - 0x7EA8, // 47 :: rgb(251,169,68) - 0x6CC6, // 48 :: rgb(219,48,48) - 0x7FBA, // 49 :: rgb(254,234,211) - 0xE842, // 50 :: rgb(215,20,20) - 0xFF77, // 51 :: rgb(253,224,187) - 0xF652, // 52 :: rgb(237,149,149) - 0x7F75, // 53 :: rgb(253,218,175) - 0x7FFE, // 54 :: rgb(254,249,249) - 0x7EEC, // 55 :: rgb(252,185,102) - 0x7FBD, // 56 :: rgb(252,236,236) - 0xFFFF, // 57 :: rgb(255,253,251) - 0x7EED, // 58 :: rgb(252,188,109) - 0x7FFF, // 59 :: rgb(254,252,252) - 0xFAF7, // 60 :: rgb(243,189,189) - 0x7B9B, // 61 :: rgb(250,225,225) - 0x7AD2, // 62 :: rgb(250,179,149) - 0xED09, // 63 :: rgb(224,70,70) - 0xECA5, // 64 :: rgb(218,43,43) - 0xFAF4, // 65 :: rgb(250,190,165) - 0x6D4A, // 66 :: rgb(225,82,82) - 0xED08, // 67 :: rgb(223,69,69) - 0x6D08, // 68 :: rgb(222,63,63) - 0x76D6, // 69 :: rgb(242,178,178) - 0xECC6, // 70 :: rgb(220,51,51) - 0xF1AD, // 71 :: rgb(229,109,109) - 0xFFDD, // 72 :: rgb(254,246,235) - 0x718C, // 73 :: rgb(228,97,97) - 0xFFBC, // 74 :: rgb(254,239,234) - 0xFF77, // 75 :: rgb(253,223,187) - 0x76D6, // 76 :: rgb(242,179,179) - 0x6863, // 77 :: rgb(216,26,26) - 0x7AB1, // 78 :: rgb(249,169,136) - 0xE843, // 79 :: rgb(215,21,21) - 0xFF9C, // 80 :: rgb(251,230,230) - 0xF9A6, // 81 :: rgb(245,108,51) - 0x7F97, // 82 :: rgb(253,225,189) - 0x7942, // 83 :: rgb(244,81,13) - 0x7FBA, // 84 :: rgb(254,236,215) - 0xFE21, // 85 :: rgb(251,143,11) - 0x7FBC, // 86 :: rgb(251,234,234) - 0xFB18, // 87 :: rgb(245,197,197) - 0x76D6, // 88 :: rgb(242,177,177) - 0x71AD, // 89 :: rgb(229,106,106) - 0xFAB2, // 90 :: rgb(249,176,144) - 0x7F9A, // 91 :: rgb(253,227,217) - 0x7FDD, // 92 :: rgb(254,242,237) - 0x7FDE, // 93 :: rgb(253,243,243) - 0x7AB1, // 94 :: rgb(249,171,139) - 0xFFBB, // 95 :: rgb(254,239,221) - 0xF694, // 96 :: rgb(240,167,167) - 0x7AF3, // 97 :: rgb(250,186,160) - 0xFF7A, // 98 :: rgb(253,224,213) - 0x7F0E, // 99 :: rgb(253,193,117) - 0xFA6F, // 100 :: rgb(249,159,121) - 0x7FFE, // 101 :: rgb(255,251,247) - 0xFEAA, // 102 :: rgb(251,175,80) - 0x7694, // 103 :: rgb(239,161,161) - 0xE801, // 104 :: rgb(213,5,5) - 0xFA6F, // 105 :: rgb(249,159,122) - 0x7FDB, // 106 :: rgb(254,241,224) - 0xF920, // 107 :: rgb(244,75,4) - 0x7A8F, // 108 :: rgb(249,160,123) - 0x7694, // 109 :: rgb(239,163,163) - 0xE822, // 110 :: rgb(214,14,14) - 0x6D29, // 111 :: rgb(223,71,71) - 0xFF55, // 112 :: rgb(253,215,169) - 0x7A8F, // 113 :: rgb(249,161,124) - 0xFF32, // 114 :: rgb(253,207,151) - 0x7FBB, // 115 :: rgb(253,233,224) - 0xF694, // 116 :: rgb(239,165,165) - 0xFFBC, // 117 :: rgb(254,238,231) - 0xFB39, // 118 :: rgb(247,208,208) - 0x7B38, // 119 :: rgb(246,201,201) - 0x6842, // 120 :: rgb(214,16,16) - 0x7FFF, // 121 :: rgb(254,251,251) - 0xFB7B, // 122 :: rgb(250,223,223) - 0xF16C, // 123 :: rgb(227,95,95) - 0x7672, // 124 :: rgb(237,152,152) - 0x7631, // 125 :: rgb(235,138,138) - 0xFE87, // 126 :: rgb(251,165,60) - 0xFFDD, // 127 :: rgb(254,245,240) - 0xFF33, // 128 :: rgb(252,208,154) - 0x7F79, // 129 :: rgb(252,220,207) - 0x7E41, // 130 :: rgb(251,144,12) - 0x7E42, // 131 :: rgb(251,146,19) - 0x7F36, // 132 :: rgb(251,202,182) - 0x7FDC, // 133 :: rgb(254,243,230) - 0x7963, // 134 :: rgb(244,89,24) - 0x7F0E, // 135 :: rgb(252,193,119) - 0xFE87, // 136 :: rgb(251,164,57) - 0x7A2B, // 137 :: rgb(247,138,92) - 0xFA6E, // 138 :: rgb(249,157,119) - 0xFF9B, // 139 :: rgb(253,229,219) - 0x7920, // 140 :: rgb(244,74,3) - 0xFFDE, // 141 :: rgb(254,246,243) - 0xF964, // 142 :: rgb(245,95,32) - 0xF921, // 143 :: rgb(244,76,6) - 0xFAD3, // 144 :: rgb(250,183,155) - 0xFAD3, // 145 :: rgb(250,182,154) - 0xF985, // 146 :: rgb(245,103,44) - 0x7FFE, // 147 :: rgb(255,252,250) - 0x7FFE, // 148 :: rgb(255,251,250) - 0x6800, // 149 :: rgb(212,1,1) - 0x7B18, // 150 :: rgb(245,195,195) - 0x7AD2, // 151 :: rgb(250,178,148) - 0x7ECB, // 152 :: rgb(251,179,87) - 0x7EA8, // 153 :: rgb(251,169,69) - 0xFEAA, // 154 :: rgb(251,176,82) - 0x7652, // 155 :: rgb(236,146,146) - 0xF942, // 156 :: rgb(244,83,16) - 0xF9E9, // 157 :: rgb(246,126,76) - 0xFFDD, // 158 :: rgb(254,246,242) - 0x71EF, // 159 :: rgb(231,120,120) - 0xFB39, // 160 :: rgb(247,206,206) - 0xFF37, // 161 :: rgb(252,208,190) - 0x6D08, // 162 :: rgb(222,65,65) - 0x7FDE, // 163 :: rgb(253,244,244) - 0x7A4D, // 164 :: rgb(248,147,106) - 0xFB5A, // 165 :: rgb(248,216,216) - 0x7F79, // 166 :: rgb(253,220,206) - 0xFAD3, // 167 :: rgb(250,181,153) - 0x7F15, // 168 :: rgb(251,196,173) - 0x7F31, // 169 :: rgb(252,201,137) - 0xF9C8, // 170 :: rgb(246,116,62) - 0xFAB2, // 171 :: rgb(250,176,145) - 0xFF10, // 172 :: rgb(252,198,131) - 0x7A6E, // 173 :: rgb(248,155,117) - 0xFF9B, // 174 :: rgb(253,232,224) - 0xFFBB, // 175 :: rgb(254,240,221) - 0x7920, // 176 :: rgb(244,74,2) - 0x7FDC, // 177 :: rgb(254,243,229) - 0xFE21, // 178 :: rgb(251,141,6) - 0x7F53, // 179 :: rgb(253,210,155) - 0xF9E9, // 180 :: rgb(247,127,77) - 0xFF58, // 181 :: rgb(252,213,197) - 0xFE87, // 182 :: rgb(251,164,58) - 0xFF54, // 183 :: rgb(253,213,164) - 0xFEA9, // 184 :: rgb(251,174,78) - 0xFE21, // 185 :: rgb(251,143,10) - 0x79E8, // 186 :: rgb(246,120,67) - 0x7E87, // 187 :: rgb(251,163,54) - 0xFFDD, // 188 :: rgb(254,248,240) - 0x7F57, // 189 :: rgb(252,210,193) +// convpng +#include +#include "logo_gfx.h" + +uint16_t logo_gfx_pal[190] = { + 0xFFFF, // 00 :: rgb(255,255,255) + 0xE821, // 01 :: rgb(213,11,11) + 0x7E20, // 02 :: rgb(251,139,2) + 0x7E20, // 03 :: rgb(251,139,1) + 0xFFFF, // 04 :: rgb(255,254,254) + 0xFFFF, // 05 :: rgb(255,255,254) + 0x6800, // 06 :: rgb(212,2,2) + 0x6800, // 07 :: rgb(212,0,0) + 0x7E20, // 08 :: rgb(251,139,0) + 0x7920, // 09 :: rgb(244,72,0) + 0xFE20, // 10 :: rgb(251,140,4) + 0xFFFF, // 11 :: rgb(255,253,253) + 0xFFFF, // 12 :: rgb(255,254,253) + 0xFECC, // 13 :: rgb(252,182,97) + 0x7A90, // 14 :: rgb(249,163,128) + 0x7FDC, // 15 :: rgb(254,244,231) + 0xF985, // 16 :: rgb(245,100,40) + 0x7F9A, // 17 :: rgb(253,225,213) + 0x7FDD, // 18 :: rgb(253,242,242) + 0x6D6B, // 19 :: rgb(226,90,90) + 0xFFBC, // 20 :: rgb(254,239,233) + 0xF921, // 21 :: rgb(244,77,7) + 0x7EED, // 22 :: rgb(252,187,107) + 0xFF99, // 23 :: rgb(254,231,203) + 0xFFFE, // 24 :: rgb(255,253,250) + 0xFF16, // 25 :: rgb(251,199,177) + 0xF921, // 26 :: rgb(244,78,8) + 0xFE87, // 27 :: rgb(251,167,61) + 0xFFBA, // 28 :: rgb(254,237,216) + 0x7F31, // 29 :: rgb(253,204,143) + 0xFF76, // 30 :: rgb(253,222,183) + 0x7B7B, // 31 :: rgb(249,220,220) + 0xFAF7, // 32 :: rgb(244,192,192) + 0x7FDD, // 33 :: rgb(252,241,241) + 0xF18C, // 34 :: rgb(229,102,102) + 0xFE87, // 35 :: rgb(251,164,56) + 0x7B5A, // 36 :: rgb(247,212,212) + 0xFF76, // 37 :: rgb(253,221,181) + 0xF652, // 38 :: rgb(237,151,151) + 0x7652, // 39 :: rgb(236,145,145) + 0x6D29, // 40 :: rgb(224,74,74) + 0xE800, // 41 :: rgb(212,3,3) + 0x718C, // 42 :: rgb(228,98,98) + 0xFF54, // 43 :: rgb(253,214,165) + 0xFB7B, // 44 :: rgb(250,224,224) + 0x7673, // 45 :: rgb(237,153,153) + 0xFF32, // 46 :: rgb(252,205,148) + 0x7EA8, // 47 :: rgb(251,169,68) + 0x6CC6, // 48 :: rgb(219,48,48) + 0x7FBA, // 49 :: rgb(254,234,211) + 0xE842, // 50 :: rgb(215,20,20) + 0xFF77, // 51 :: rgb(253,224,187) + 0xF652, // 52 :: rgb(237,149,149) + 0x7F75, // 53 :: rgb(253,218,175) + 0x7FFE, // 54 :: rgb(254,249,249) + 0x7EEC, // 55 :: rgb(252,185,102) + 0x7FBD, // 56 :: rgb(252,236,236) + 0xFFFF, // 57 :: rgb(255,253,251) + 0x7EED, // 58 :: rgb(252,188,109) + 0x7FFF, // 59 :: rgb(254,252,252) + 0xFAF7, // 60 :: rgb(243,189,189) + 0x7B9B, // 61 :: rgb(250,225,225) + 0x7AD2, // 62 :: rgb(250,179,149) + 0xED09, // 63 :: rgb(224,70,70) + 0xECA5, // 64 :: rgb(218,43,43) + 0xFAF4, // 65 :: rgb(250,190,165) + 0x6D4A, // 66 :: rgb(225,82,82) + 0xED08, // 67 :: rgb(223,69,69) + 0x6D08, // 68 :: rgb(222,63,63) + 0x76D6, // 69 :: rgb(242,178,178) + 0xECC6, // 70 :: rgb(220,51,51) + 0xF1AD, // 71 :: rgb(229,109,109) + 0xFFDD, // 72 :: rgb(254,246,235) + 0x718C, // 73 :: rgb(228,97,97) + 0xFFBC, // 74 :: rgb(254,239,234) + 0xFF77, // 75 :: rgb(253,223,187) + 0x76D6, // 76 :: rgb(242,179,179) + 0x6863, // 77 :: rgb(216,26,26) + 0x7AB1, // 78 :: rgb(249,169,136) + 0xE843, // 79 :: rgb(215,21,21) + 0xFF9C, // 80 :: rgb(251,230,230) + 0xF9A6, // 81 :: rgb(245,108,51) + 0x7F97, // 82 :: rgb(253,225,189) + 0x7942, // 83 :: rgb(244,81,13) + 0x7FBA, // 84 :: rgb(254,236,215) + 0xFE21, // 85 :: rgb(251,143,11) + 0x7FBC, // 86 :: rgb(251,234,234) + 0xFB18, // 87 :: rgb(245,197,197) + 0x76D6, // 88 :: rgb(242,177,177) + 0x71AD, // 89 :: rgb(229,106,106) + 0xFAB2, // 90 :: rgb(249,176,144) + 0x7F9A, // 91 :: rgb(253,227,217) + 0x7FDD, // 92 :: rgb(254,242,237) + 0x7FDE, // 93 :: rgb(253,243,243) + 0x7AB1, // 94 :: rgb(249,171,139) + 0xFFBB, // 95 :: rgb(254,239,221) + 0xF694, // 96 :: rgb(240,167,167) + 0x7AF3, // 97 :: rgb(250,186,160) + 0xFF7A, // 98 :: rgb(253,224,213) + 0x7F0E, // 99 :: rgb(253,193,117) + 0xFA6F, // 100 :: rgb(249,159,121) + 0x7FFE, // 101 :: rgb(255,251,247) + 0xFEAA, // 102 :: rgb(251,175,80) + 0x7694, // 103 :: rgb(239,161,161) + 0xE801, // 104 :: rgb(213,5,5) + 0xFA6F, // 105 :: rgb(249,159,122) + 0x7FDB, // 106 :: rgb(254,241,224) + 0xF920, // 107 :: rgb(244,75,4) + 0x7A8F, // 108 :: rgb(249,160,123) + 0x7694, // 109 :: rgb(239,163,163) + 0xE822, // 110 :: rgb(214,14,14) + 0x6D29, // 111 :: rgb(223,71,71) + 0xFF55, // 112 :: rgb(253,215,169) + 0x7A8F, // 113 :: rgb(249,161,124) + 0xFF32, // 114 :: rgb(253,207,151) + 0x7FBB, // 115 :: rgb(253,233,224) + 0xF694, // 116 :: rgb(239,165,165) + 0xFFBC, // 117 :: rgb(254,238,231) + 0xFB39, // 118 :: rgb(247,208,208) + 0x7B38, // 119 :: rgb(246,201,201) + 0x6842, // 120 :: rgb(214,16,16) + 0x7FFF, // 121 :: rgb(254,251,251) + 0xFB7B, // 122 :: rgb(250,223,223) + 0xF16C, // 123 :: rgb(227,95,95) + 0x7672, // 124 :: rgb(237,152,152) + 0x7631, // 125 :: rgb(235,138,138) + 0xFE87, // 126 :: rgb(251,165,60) + 0xFFDD, // 127 :: rgb(254,245,240) + 0xFF33, // 128 :: rgb(252,208,154) + 0x7F79, // 129 :: rgb(252,220,207) + 0x7E41, // 130 :: rgb(251,144,12) + 0x7E42, // 131 :: rgb(251,146,19) + 0x7F36, // 132 :: rgb(251,202,182) + 0x7FDC, // 133 :: rgb(254,243,230) + 0x7963, // 134 :: rgb(244,89,24) + 0x7F0E, // 135 :: rgb(252,193,119) + 0xFE87, // 136 :: rgb(251,164,57) + 0x7A2B, // 137 :: rgb(247,138,92) + 0xFA6E, // 138 :: rgb(249,157,119) + 0xFF9B, // 139 :: rgb(253,229,219) + 0x7920, // 140 :: rgb(244,74,3) + 0xFFDE, // 141 :: rgb(254,246,243) + 0xF964, // 142 :: rgb(245,95,32) + 0xF921, // 143 :: rgb(244,76,6) + 0xFAD3, // 144 :: rgb(250,183,155) + 0xFAD3, // 145 :: rgb(250,182,154) + 0xF985, // 146 :: rgb(245,103,44) + 0x7FFE, // 147 :: rgb(255,252,250) + 0x7FFE, // 148 :: rgb(255,251,250) + 0x6800, // 149 :: rgb(212,1,1) + 0x7B18, // 150 :: rgb(245,195,195) + 0x7AD2, // 151 :: rgb(250,178,148) + 0x7ECB, // 152 :: rgb(251,179,87) + 0x7EA8, // 153 :: rgb(251,169,69) + 0xFEAA, // 154 :: rgb(251,176,82) + 0x7652, // 155 :: rgb(236,146,146) + 0xF942, // 156 :: rgb(244,83,16) + 0xF9E9, // 157 :: rgb(246,126,76) + 0xFFDD, // 158 :: rgb(254,246,242) + 0x71EF, // 159 :: rgb(231,120,120) + 0xFB39, // 160 :: rgb(247,206,206) + 0xFF37, // 161 :: rgb(252,208,190) + 0x6D08, // 162 :: rgb(222,65,65) + 0x7FDE, // 163 :: rgb(253,244,244) + 0x7A4D, // 164 :: rgb(248,147,106) + 0xFB5A, // 165 :: rgb(248,216,216) + 0x7F79, // 166 :: rgb(253,220,206) + 0xFAD3, // 167 :: rgb(250,181,153) + 0x7F15, // 168 :: rgb(251,196,173) + 0x7F31, // 169 :: rgb(252,201,137) + 0xF9C8, // 170 :: rgb(246,116,62) + 0xFAB2, // 171 :: rgb(250,176,145) + 0xFF10, // 172 :: rgb(252,198,131) + 0x7A6E, // 173 :: rgb(248,155,117) + 0xFF9B, // 174 :: rgb(253,232,224) + 0xFFBB, // 175 :: rgb(254,240,221) + 0x7920, // 176 :: rgb(244,74,2) + 0x7FDC, // 177 :: rgb(254,243,229) + 0xFE21, // 178 :: rgb(251,141,6) + 0x7F53, // 179 :: rgb(253,210,155) + 0xF9E9, // 180 :: rgb(247,127,77) + 0xFF58, // 181 :: rgb(252,213,197) + 0xFE87, // 182 :: rgb(251,164,58) + 0xFF54, // 183 :: rgb(253,213,164) + 0xFEA9, // 184 :: rgb(251,174,78) + 0xFE21, // 185 :: rgb(251,143,10) + 0x79E8, // 186 :: rgb(246,120,67) + 0x7E87, // 187 :: rgb(251,163,54) + 0xFFDD, // 188 :: rgb(254,248,240) + 0x7F57, // 189 :: rgb(252,210,193) }; \ No newline at end of file diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/src/gfx/logo_gfx.h b/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/src/gfx/logo_gfx.h index 28d30ce..b06965d 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/src/gfx/logo_gfx.h +++ b/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/src/gfx/logo_gfx.h @@ -1,15 +1,15 @@ -// convpng -// this file contains all the graphics sources for easy inclusion in a project -#ifndef __logo_gfx__ -#define __logo_gfx__ -#include - -#define ubuntu_width 32 -#define ubuntu_height 32 -#define ubuntu_size 1026 -extern uint8_t ubuntu_data[1026]; -#define ubuntu ((gfx_sprite_t*)ubuntu_data) -#define sizeof_logo_gfx_pal 380 -extern uint16_t logo_gfx_pal[190]; - -#endif +// convpng +// this file contains all the graphics sources for easy inclusion in a project +#ifndef __logo_gfx__ +#define __logo_gfx__ +#include + +#define ubuntu_width 32 +#define ubuntu_height 32 +#define ubuntu_size 1026 +extern uint8_t ubuntu_data[1026]; +#define ubuntu ((gfx_sprite_t*)ubuntu_data) +#define sizeof_logo_gfx_pal 380 +extern uint16_t logo_gfx_pal[190]; + +#endif diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/src/gfx/ubuntu.c b/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/src/gfx/ubuntu.c index f2060ae..c861afc 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/src/gfx/ubuntu.c +++ b/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/src/gfx/ubuntu.c @@ -1,40 +1,40 @@ -// convpng -#include -#include "logo_gfx.h" - -// 8 bpp image -uint8_t ubuntu_data[1026] = { - 32,32, // width,height - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0B,0x45,0x27,0x1F,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x13,0x07,0x07,0x01,0x20,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x5B,0x41,0x4E,0x0E,0x90,0x14,0xA5,0x07,0x07,0x07,0x07,0x28,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x84,0x10,0x09,0x09,0x09,0x09,0x09,0xA8,0xA0,0x07,0x07,0x07,0x07,0x43,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x85,0x00,0x8B,0x15,0x09,0x09,0x09,0x09,0x09,0xA4,0x04,0xA2,0x07,0x07,0x95,0x58,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x83,0x0F,0x00,0x8A,0x09,0x09,0x09,0x09,0x09,0x15,0xA6,0xA3,0x9B,0x9F,0x96,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x03,0x08,0x0D,0x00,0x7F,0x86,0x6B,0x8E,0x92,0x1A,0x09,0x9C,0xA7,0x9E,0x94,0x11,0x5E,0x04,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5F,0x55,0x08,0x08,0x02,0x17,0x00,0x62,0x5C,0x05,0x00,0x93,0xA1,0x9D,0x09,0x09,0x8F,0x09,0x09,0x3E,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x9A,0x08,0x08,0x08,0x08,0x87,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x91,0x8C,0x09,0x09,0x09,0x53,0x4A,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xAF,0x03,0x08,0x08,0x08,0x7E,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5A,0x09,0x09,0x09,0x09,0x0E,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xB7,0x08,0x08,0x08,0x02,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x51,0x09,0x09,0x09,0x10,0x04,0x00,0x00, - 0x00,0x00,0x00,0x8D,0xAB,0xAD,0xBD,0x05,0x16,0x08,0x08,0x99,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x61,0x09,0x09,0x09,0x09,0x14,0x00,0x00, - 0x00,0x00,0x0C,0xAA,0x09,0x09,0xB0,0x19,0xBC,0xB9,0x08,0xAC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x75,0x71,0x6C,0x69,0x64,0x73,0x00,0x00, - 0x00,0x00,0x81,0x09,0x09,0x09,0x09,0xBA,0x00,0xB6,0x08,0xB3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x11,0x09,0x09,0x09,0x09,0xB4,0x00,0xBB,0x08,0xA9,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5D,0x67,0x6D,0x74,0x60,0x56,0x00,0x00, - 0x00,0x00,0x04,0x89,0x09,0x09,0x1A,0xB5,0xB1,0xB2,0x08,0x98,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4C,0x07,0x07,0x07,0x07,0x50,0x00,0x00, - 0x00,0x00,0x00,0x0C,0x19,0x97,0xAE,0x18,0xB8,0x08,0x08,0x82,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x42,0x07,0x07,0x07,0x4D,0x0B,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x17,0x08,0x08,0x08,0x08,0x37,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x06,0x07,0x07,0x07,0x47,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x88,0x08,0x08,0x08,0x08,0x2E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x76,0x4F,0x07,0x07,0x07,0x29,0x24,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4B,0x08,0x08,0x08,0x08,0x35,0x00,0x36,0x04,0x00,0x00,0x00,0x12,0x7D,0x01,0x07,0x07,0x07,0x07,0x22,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x3A,0x08,0x08,0x2F,0x04,0x3B,0x30,0x46,0x49,0x59,0x6F,0x6E,0x07,0x07,0x06,0x01,0x07,0x40,0x21,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x39,0x0D,0x0A,0x31,0x00,0x34,0x07,0x07,0x07,0x07,0x07,0x07,0x78,0x7C,0x12,0x79,0x7A,0x3D,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x33,0x00,0x38,0x32,0x07,0x07,0x07,0x07,0x07,0x68,0x77,0x65,0x72,0x63,0x52,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2D,0x06,0x07,0x07,0x07,0x07,0x07,0x7B,0x04,0x66,0x08,0x08,0x03,0x2B,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2C,0x26,0x2A,0x3F,0x44,0x13,0x57,0x6A,0x08,0x08,0x08,0x08,0x23,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x02,0x08,0x08,0x08,0x1B,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x16,0x08,0x08,0x0A,0x1E,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x25,0x1D,0x1C,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -}; +// convpng +#include +#include "logo_gfx.h" + +// 8 bpp image +uint8_t ubuntu_data[1026] = { + 32,32, // width,height + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0B,0x45,0x27,0x1F,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x13,0x07,0x07,0x01,0x20,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x5B,0x41,0x4E,0x0E,0x90,0x14,0xA5,0x07,0x07,0x07,0x07,0x28,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x84,0x10,0x09,0x09,0x09,0x09,0x09,0xA8,0xA0,0x07,0x07,0x07,0x07,0x43,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x85,0x00,0x8B,0x15,0x09,0x09,0x09,0x09,0x09,0xA4,0x04,0xA2,0x07,0x07,0x95,0x58,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x83,0x0F,0x00,0x8A,0x09,0x09,0x09,0x09,0x09,0x15,0xA6,0xA3,0x9B,0x9F,0x96,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x03,0x08,0x0D,0x00,0x7F,0x86,0x6B,0x8E,0x92,0x1A,0x09,0x9C,0xA7,0x9E,0x94,0x11,0x5E,0x04,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5F,0x55,0x08,0x08,0x02,0x17,0x00,0x62,0x5C,0x05,0x00,0x93,0xA1,0x9D,0x09,0x09,0x8F,0x09,0x09,0x3E,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x9A,0x08,0x08,0x08,0x08,0x87,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x91,0x8C,0x09,0x09,0x09,0x53,0x4A,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xAF,0x03,0x08,0x08,0x08,0x7E,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5A,0x09,0x09,0x09,0x09,0x0E,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xB7,0x08,0x08,0x08,0x02,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x51,0x09,0x09,0x09,0x10,0x04,0x00,0x00, + 0x00,0x00,0x00,0x8D,0xAB,0xAD,0xBD,0x05,0x16,0x08,0x08,0x99,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x61,0x09,0x09,0x09,0x09,0x14,0x00,0x00, + 0x00,0x00,0x0C,0xAA,0x09,0x09,0xB0,0x19,0xBC,0xB9,0x08,0xAC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x75,0x71,0x6C,0x69,0x64,0x73,0x00,0x00, + 0x00,0x00,0x81,0x09,0x09,0x09,0x09,0xBA,0x00,0xB6,0x08,0xB3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x11,0x09,0x09,0x09,0x09,0xB4,0x00,0xBB,0x08,0xA9,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5D,0x67,0x6D,0x74,0x60,0x56,0x00,0x00, + 0x00,0x00,0x04,0x89,0x09,0x09,0x1A,0xB5,0xB1,0xB2,0x08,0x98,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4C,0x07,0x07,0x07,0x07,0x50,0x00,0x00, + 0x00,0x00,0x00,0x0C,0x19,0x97,0xAE,0x18,0xB8,0x08,0x08,0x82,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x42,0x07,0x07,0x07,0x4D,0x0B,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x17,0x08,0x08,0x08,0x08,0x37,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x06,0x07,0x07,0x07,0x47,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x88,0x08,0x08,0x08,0x08,0x2E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x76,0x4F,0x07,0x07,0x07,0x29,0x24,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4B,0x08,0x08,0x08,0x08,0x35,0x00,0x36,0x04,0x00,0x00,0x00,0x12,0x7D,0x01,0x07,0x07,0x07,0x07,0x22,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x3A,0x08,0x08,0x2F,0x04,0x3B,0x30,0x46,0x49,0x59,0x6F,0x6E,0x07,0x07,0x06,0x01,0x07,0x40,0x21,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x39,0x0D,0x0A,0x31,0x00,0x34,0x07,0x07,0x07,0x07,0x07,0x07,0x78,0x7C,0x12,0x79,0x7A,0x3D,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x33,0x00,0x38,0x32,0x07,0x07,0x07,0x07,0x07,0x68,0x77,0x65,0x72,0x63,0x52,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2D,0x06,0x07,0x07,0x07,0x07,0x07,0x7B,0x04,0x66,0x08,0x08,0x03,0x2B,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2C,0x26,0x2A,0x3F,0x44,0x13,0x57,0x6A,0x08,0x08,0x08,0x08,0x23,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x02,0x08,0x08,0x08,0x1B,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x16,0x08,0x08,0x0A,0x1E,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x25,0x1D,0x1C,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +}; diff --git a/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/src/main.c b/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/src/main.c index 7e9de0b..2310e0c 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/src/main.c +++ b/frontends/calculator/CEdev/examples/gfx_sprite_rotate_scale/src/main.c @@ -1,44 +1,44 @@ -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include "gfx/logo_gfx.h" - -/* Create some buffers used for storing the rotated and scaled sprites */ -gfx_UninitedSprite(rotate_sprite, ubuntu_width, ubuntu_height); - -void main(void) { - uint8_t x; - - /* Start the graphics */ - gfx_Begin(); - - /* Setup the palette used by the sprites*/ - gfx_SetPalette(logo_gfx_pal, sizeof_logo_gfx_pal, 0); - - /* Loop for a bunch of times */ - for (x = 0; ++x;) { - /* Rotate the sprite */ - gfx_RotateSprite(ubuntu, rotate_sprite, x); - - /* Rotate and scale the sprite */ - gfx_RotatedScaledSprite_NoClip(ubuntu, 0, 0, 256 - x, 128); - - /* Draw the new rotated buffer sprite */ - gfx_Sprite_NoClip(rotate_sprite, LCD_WIDTH / 2, LCD_HEIGHT / 2); - } - - /* Wait for a key to be pressed */ - while (!os_GetCSC()); - - /* Close the graphics */ - gfx_End(); -} +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#include "gfx/logo_gfx.h" + +/* Create some buffers used for storing the rotated and scaled sprites */ +gfx_UninitedSprite(rotate_sprite, ubuntu_width, ubuntu_height); + +void main(void) { + uint8_t x; + + /* Start the graphics */ + gfx_Begin(); + + /* Setup the palette used by the sprites*/ + gfx_SetPalette(logo_gfx_pal, sizeof_logo_gfx_pal, 0); + + /* Loop for a bunch of times */ + for (x = 0; ++x;) { + /* Rotate the sprite */ + gfx_RotateSprite(ubuntu, rotate_sprite, x); + + /* Rotate and scale the sprite */ + gfx_RotatedScaledSprite_NoClip(ubuntu, 0, 0, 256 - x, 128); + + /* Draw the new rotated buffer sprite */ + gfx_Sprite_NoClip(rotate_sprite, LCD_WIDTH / 2, LCD_HEIGHT / 2); + } + + /* Wait for a key to be pressed */ + while (!os_GetCSC()); + + /* Close the graphics */ + gfx_End(); +} diff --git a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/autotester.json b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/autotester.json index d246692..3b39b3b 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/autotester.json +++ b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/autotester.json @@ -1,31 +1,31 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp", - "src/gfx/var_gfx.8xv" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "hashWait|1", - "key|enter", - "hashWait|2" - ], - "hashes": { - "1": { - "description": "Make sure the sprites are displayed properly", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "A3ED6457" ] - }, - "2": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44", "43BF8092", "5ACF1C01" ] - } - } -} +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp", + "src/gfx/var_gfx.8xv" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "hashWait|1", + "key|enter", + "hashWait|2" + ], + "hashes": { + "1": { + "description": "Make sure the sprites are displayed properly", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "A3ED6457" ] + }, + "2": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44", "43BF8092", "5ACF1C01" ] + } + } +} diff --git a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/makefile b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/makefile +++ b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/readme.md b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/readme.md index 428bc83..9ef8479 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/readme.md +++ b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/readme.md @@ -1,10 +1,10 @@ -### GraphX Appvars Demo - -Demonstrates easily extracting and using images placed into an appvar - -![Screenshot](screenshot.png) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### GraphX Appvars Demo + +Demonstrates easily extracting and using images placed into an appvar + +![Screenshot](screenshot.png) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/all_gfx.c b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/all_gfx.c index 9f77108..d1b789d 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/all_gfx.c +++ b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/all_gfx.c @@ -1,4 +1,4 @@ -// convpng -#include -#include "all_gfx.h" - +// convpng +#include +#include "all_gfx.h" + diff --git a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/all_gfx.h b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/all_gfx.h index 37f0480..9a60010 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/all_gfx.h +++ b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/all_gfx.h @@ -1,8 +1,8 @@ -// convpng -// this file contains all the graphics sources for easy inclusion in a project -#ifndef __all_gfx__ -#define __all_gfx__ -#include - - -#endif +// convpng +// this file contains all the graphics sources for easy inclusion in a project +#ifndef __all_gfx__ +#define __all_gfx__ +#include + + +#endif diff --git a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/convpng.ini b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/convpng.ini index 8dc89f4..34a3c4a 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/convpng.ini +++ b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/convpng.ini @@ -1,16 +1,16 @@ -// #AppvarC -- The name of the appvar we are making -// #IncludePalettes -- List of comma separated groups with palettes - -#AppvarC : var_gfx -#IncludePalettes : all_gfx -#PNGImages : - ubuntu - mint - -// The main conversion group - -#GroupC : all_gfx -#PNGImages : - ubuntu - mint - +// #AppvarC -- The name of the appvar we are making +// #IncludePalettes -- List of comma separated groups with palettes + +#AppvarC : var_gfx +#IncludePalettes : all_gfx +#PNGImages : + ubuntu + mint + +// The main conversion group + +#GroupC : all_gfx +#PNGImages : + ubuntu + mint + diff --git a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/mint.c b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/mint.c index 9f77108..d1b789d 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/mint.c +++ b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/mint.c @@ -1,4 +1,4 @@ -// convpng -#include -#include "all_gfx.h" - +// convpng +#include +#include "all_gfx.h" + diff --git a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/ubuntu.c b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/ubuntu.c index 9f77108..d1b789d 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/ubuntu.c +++ b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/ubuntu.c @@ -1,4 +1,4 @@ -// convpng -#include -#include "all_gfx.h" - +// convpng +#include +#include "all_gfx.h" + diff --git a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/var_gfx.c b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/var_gfx.c index b0d3117..c3641ca 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/var_gfx.c +++ b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/var_gfx.c @@ -1,27 +1,27 @@ -// convpng -#include -#include "var_gfx.h" - -#include -uint8_t *var_gfx[3] = { - (uint8_t*)0, - (uint8_t*)1026, - (uint8_t*)2052, -}; - -bool var_gfx_init(void) { - unsigned int data, i; - ti_var_t appvar; - - ti_CloseAll(); - - appvar = ti_Open("var_gfx", "r"); - data = (unsigned int)ti_GetDataPtr(appvar) - (unsigned int)var_gfx[0]; - for (i = 0; i < var_gfx_num; i++) { - var_gfx[i] += data; - } - - ti_CloseAll(); - - return (bool)appvar; -} +// convpng +#include +#include "var_gfx.h" + +#include +uint8_t *var_gfx[3] = { + (uint8_t*)0, + (uint8_t*)1026, + (uint8_t*)2052, +}; + +bool var_gfx_init(void) { + unsigned int data, i; + ti_var_t appvar; + + ti_CloseAll(); + + appvar = ti_Open("var_gfx", "r"); + data = (unsigned int)ti_GetDataPtr(appvar) - (unsigned int)var_gfx[0]; + for (i = 0; i < var_gfx_num; i++) { + var_gfx[i] += data; + } + + ti_CloseAll(); + + return (bool)appvar; +} diff --git a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/var_gfx.h b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/var_gfx.h index 49afcb0..919da4b 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/var_gfx.h +++ b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/gfx/var_gfx.h @@ -1,18 +1,18 @@ -// convpng -// this file contains all the graphics sources for easy inclusion in a project -#ifndef __var_gfx__ -#define __var_gfx__ -#include - -#include - -#define var_gfx_num 3 - -extern uint8_t *var_gfx[3]; -#define ubuntu ((gfx_sprite_t*)var_gfx[0]) -#define mint ((gfx_sprite_t*)var_gfx[1]) -#define sizeof_all_gfx_pal 512 -#define all_gfx_pal ((uint16_t*)var_gfx[2]) -bool var_gfx_init(void); - -#endif +// convpng +// this file contains all the graphics sources for easy inclusion in a project +#ifndef __var_gfx__ +#define __var_gfx__ +#include + +#include + +#define var_gfx_num 3 + +extern uint8_t *var_gfx[3]; +#define ubuntu ((gfx_sprite_t*)var_gfx[0]) +#define mint ((gfx_sprite_t*)var_gfx[1]) +#define sizeof_all_gfx_pal 512 +#define all_gfx_pal ((uint16_t*)var_gfx[2]) +bool var_gfx_init(void); + +#endif diff --git a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/main.c b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/main.c index 7c18c3a..98edbf9 100644 --- a/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/main.c +++ b/frontends/calculator/CEdev/examples/gfx_sprites_appvar/src/main.c @@ -1,42 +1,42 @@ -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -/* Include the sprite data */ -#include "gfx/all_gfx.h" -#include "gfx/var_gfx.h" - -void main(void) { - /* This function is automatically created by convpng */ - /* Simply call it to load in graphics from the appvar */ - /* The common function name is _init */ - var_gfx_init(); - - /* Initialize the graphics */ - gfx_Begin(); - - /* Set up the palette for the sprite */ - gfx_SetPalette(all_gfx_pal, sizeof_all_gfx_pal, 0); - - /* Fill the screen with color index 0 */ - gfx_FillScreen(0); - - /* Draw the sprites directly from the appvar */ - gfx_Sprite(ubuntu, LCD_WIDTH / 2 - 16, LCD_HEIGHT / 2 - 16); - gfx_Sprite(mint, LCD_WIDTH / 2 + 16, LCD_HEIGHT / 2 - 16); - - /* Wait for a key to be pressed */ - while (!os_GetCSC()); - - /* Close the graphics */ - gfx_End(); -} +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +/* Include the sprite data */ +#include "gfx/all_gfx.h" +#include "gfx/var_gfx.h" + +void main(void) { + /* This function is automatically created by convpng */ + /* Simply call it to load in graphics from the appvar */ + /* The common function name is _init */ + var_gfx_init(); + + /* Initialize the graphics */ + gfx_Begin(); + + /* Set up the palette for the sprite */ + gfx_SetPalette(all_gfx_pal, sizeof_all_gfx_pal, 0); + + /* Fill the screen with color index 0 */ + gfx_FillScreen(0); + + /* Draw the sprites directly from the appvar */ + gfx_Sprite(ubuntu, LCD_WIDTH / 2 - 16, LCD_HEIGHT / 2 - 16); + gfx_Sprite(mint, LCD_WIDTH / 2 + 16, LCD_HEIGHT / 2 - 16); + + /* Wait for a key to be pressed */ + while (!os_GetCSC()); + + /* Close the graphics */ + gfx_End(); +} diff --git a/frontends/calculator/CEdev/examples/gfx_template/makefile b/frontends/calculator/CEdev/examples/gfx_template/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/gfx_template/makefile +++ b/frontends/calculator/CEdev/examples/gfx_template/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/gfx_template/readme.md b/frontends/calculator/CEdev/examples/gfx_template/readme.md index 9d807e1..8d20e1b 100644 --- a/frontends/calculator/CEdev/examples/gfx_template/readme.md +++ b/frontends/calculator/CEdev/examples/gfx_template/readme.md @@ -1,12 +1,12 @@ -### GraphX Template - -You can clone this directory for your own GraphX-based projects. - -To add code, fill in the begin, end, step, and draw functions in main.c. You can also create your own .c and .h files and add them to the directory; the Makefile included in this template will automatically find and compile the new .c files. - -In addition, you can also add your own .asm files, which will be detected and -added appropriately to the proper segment. - ---- - -This template is a part of the C SDK Toolchain for use on the CE. +### GraphX Template + +You can clone this directory for your own GraphX-based projects. + +To add code, fill in the begin, end, step, and draw functions in main.c. You can also create your own .c and .h files and add them to the directory; the Makefile included in this template will automatically find and compile the new .c files. + +In addition, you can also add your own .asm files, which will be detected and +added appropriately to the proper segment. + +--- + +This template is a part of the C SDK Toolchain for use on the CE. diff --git a/frontends/calculator/CEdev/examples/gfx_template/src/main.c b/frontends/calculator/CEdev/examples/gfx_template/src/main.c index 2904b0a..0b97651 100644 --- a/frontends/calculator/CEdev/examples/gfx_template/src/main.c +++ b/frontends/calculator/CEdev/examples/gfx_template/src/main.c @@ -1,64 +1,64 @@ -/* - *-------------------------------------- - * Program Name: - * Author: - * License: - * Description: - *-------------------------------------- -*/ - -/* Keep these headers */ -#include -#include -#include -#include - -/* Standard headers (recommended) */ -#include -#include -#include -#include - -#include - -/* Put your function prototypes here */ -void begin(); -void end(); -bool step(); -void draw(); - -/* Put all your globals here */ -bool partial_redraw; - -void main() { - begin(); // No rendering allowed! - gfx_Begin(); - gfx_SetDrawBuffer(); // Draw to the buffer to avoid rendering artifats - - while (step()) { // No rendering allowed in step! - if (partial_redraw) // Only want to redraw part of the previous frame? - gfx_BlitScreen(); // Copy previous frame as a base for this frame - draw(); // As little non-rendering logic as possible - gfx_SwapDraw(); // Queue the buffered frame to be displayed - } - - gfx_End(); - end(); -} - -/* Put other functions here */ -void begin() { - /* Implement me! */ -} - -void end() { - /* Implement me! */ -} - -bool step() { - /* Implement me! */ -} - -void draw() { - /* Implement me! */ -} +/* + *-------------------------------------- + * Program Name: + * Author: + * License: + * Description: + *-------------------------------------- +*/ + +/* Keep these headers */ +#include +#include +#include +#include + +/* Standard headers (recommended) */ +#include +#include +#include +#include + +#include + +/* Put your function prototypes here */ +void begin(); +void end(); +bool step(); +void draw(); + +/* Put all your globals here */ +bool partial_redraw; + +void main() { + begin(); // No rendering allowed! + gfx_Begin(); + gfx_SetDrawBuffer(); // Draw to the buffer to avoid rendering artifats + + while (step()) { // No rendering allowed in step! + if (partial_redraw) // Only want to redraw part of the previous frame? + gfx_BlitScreen(); // Copy previous frame as a base for this frame + draw(); // As little non-rendering logic as possible + gfx_SwapDraw(); // Queue the buffered frame to be displayed + } + + gfx_End(); + end(); +} + +/* Put other functions here */ +void begin() { + /* Implement me! */ +} + +void end() { + /* Implement me! */ +} + +bool step() { + /* Implement me! */ +} + +void draw() { + /* Implement me! */ +} diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap/autotester.json b/frontends/calculator/CEdev/examples/gfx_tilemap/autotester.json index 30af614..83c8338 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap/autotester.json +++ b/frontends/calculator/CEdev/examples/gfx_tilemap/autotester.json @@ -1,43 +1,43 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "hashWait|1", - "delay|100", - "key|right", - "key|right", - "key|down", - "key|down", - "hashWait|2", - "key|enter", - "hashWait|3" - ], - "hashes": { - "1": { - "description": "Initial sprite map state (top left)", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "3C2D7C36" ] - }, - "2": { - "description": "Moving a bit to the bottom right", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "F0C14AE9" ] - }, - "3": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} - +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "hashWait|1", + "delay|100", + "key|right", + "key|right", + "key|down", + "key|down", + "hashWait|2", + "key|enter", + "hashWait|3" + ], + "hashes": { + "1": { + "description": "Initial sprite map state (top left)", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "3C2D7C36" ] + }, + "2": { + "description": "Moving a bit to the bottom right", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "F0C14AE9" ] + }, + "3": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} + diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap/makefile b/frontends/calculator/CEdev/examples/gfx_tilemap/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap/makefile +++ b/frontends/calculator/CEdev/examples/gfx_tilemap/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap/readme.md b/frontends/calculator/CEdev/examples/gfx_tilemap/readme.md index 298dc25..5587abc 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap/readme.md +++ b/frontends/calculator/CEdev/examples/gfx_tilemap/readme.md @@ -1,10 +1,10 @@ -### GraphX Simple Tilemap Demo - -An example of tilemaping using a sequence of tiles and the keypad. - -![Screenshot](screenshot.gif) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### GraphX Simple Tilemap Demo + +An example of tilemaping using a sequence of tiles and the keypad. + +![Screenshot](screenshot.gif) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap/src/gfx/convpng.ini b/frontends/calculator/CEdev/examples/gfx_tilemap/src/gfx/convpng.ini index b8068e4..f5851e5 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap/src/gfx/convpng.ini +++ b/frontends/calculator/CEdev/examples/gfx_tilemap/src/gfx/convpng.ini @@ -1,5 +1,5 @@ -#GroupC : tiles_gfx -#TransparentColor : 255,201,14,255 -#Tilemap : 16,16,true -#PNGImages : - tileset +#GroupC : tiles_gfx +#TransparentColor : 255,201,14,255 +#Tilemap : 16,16,true +#PNGImages : + tileset diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap/src/gfx/tiles_gfx.c b/frontends/calculator/CEdev/examples/gfx_tilemap/src/gfx/tiles_gfx.c index 2d1e613..916813e 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap/src/gfx/tiles_gfx.c +++ b/frontends/calculator/CEdev/examples/gfx_tilemap/src/gfx/tiles_gfx.c @@ -1,82 +1,82 @@ -// convpng -#include -#include "tiles_gfx.h" - -uint16_t tiles_gfx_pal[76] = { - 0x7F22, // 00 :: rgb(255,201,14) - 0xC30C, // 01 :: rgb(132,198,99) - 0x212D, // 02 :: rgb(65,72,106) - 0x1D40, // 03 :: rgb(56,80,0) - 0x1E46, // 04 :: rgb(57,146,49) - 0xDBD1, // 05 :: rgb(184,248,136) - 0xEB7B, // 06 :: rgb(216,224,224) - 0x318F, // 07 :: rgb(99,96,123) - 0x7771, // 08 :: rgb(239,219,140) - 0x650A, // 09 :: rgb(206,64,81) - 0x5F3C, // 10 :: rgb(189,203,231) - 0x6F9D, // 11 :: rgb(222,227,239) - 0x25D5, // 12 :: rgb(73,113,173) - 0x52D8, // 13 :: rgb(165,178,198) - 0xD353, // 14 :: rgb(168,216,160) - 0x6DAC, // 15 :: rgb(222,105,98) - 0x4211, // 16 :: rgb(132,130,140) - 0x3AFE, // 17 :: rgb(115,186,247) - 0x764E, // 18 :: rgb(239,146,114) - 0xE319, // 19 :: rgb(199,199,207) - 0x5A0D, // 20 :: rgb(184,128,111) - 0xE6F0, // 21 :: rgb(208,192,128) - 0x7EF0, // 22 :: rgb(255,186,132) - 0x4EDB, // 23 :: rgb(156,178,222) - 0x6EAE, // 24 :: rgb(222,170,114) - 0x49AD, // 25 :: rgb(148,105,106) - 0x32BD, // 26 :: rgb(99,170,239) - 0xFFFF, // 27 :: rgb(255,255,255) - 0x0E8D, // 28 :: rgb(23,162,107) - 0x666A, // 29 :: rgb(206,154,81) - 0x6ACD, // 30 :: rgb(214,178,106) - 0x22D1, // 31 :: rgb(65,178,140) - 0x18C2, // 32 :: rgb(48,48,14) - 0x5A30, // 33 :: rgb(182,138,130) - 0xB27A, // 34 :: rgb(96,159,215) - 0x7BAE, // 35 :: rgb(245,233,112) - 0x6E2C, // 36 :: rgb(224,136,95) - 0x2A37, // 37 :: rgb(79,136,192) - 0x39A6, // 38 :: rgb(112,104,47) - 0x0420, // 39 :: rgb(8,8,4) - 0xEAF3, // 40 :: rgb(214,191,154) - 0x2CE8, // 41 :: rgb(89,56,65) - 0xEF12, // 42 :: rgb(224,200,144) - 0xDEAD, // 43 :: rgb(191,175,110) - 0x5A51, // 44 :: rgb(184,144,136) - 0x6F30, // 45 :: rgb(222,203,132) - 0xCB3E, // 46 :: rgb(151,207,247) - 0xE35C, // 47 :: rgb(199,215,231) - 0x7399, // 48 :: rgb(231,227,206) - 0x7794, // 49 :: rgb(239,227,165) - 0x7AD0, // 50 :: rgb(247,178,132) - 0x3D29, // 51 :: rgb(123,73,73) - 0x32BC, // 52 :: rgb(96,168,232) - 0x3DF0, // 53 :: rgb(123,123,132) - 0x7337, // 54 :: rgb(228,201,192) - 0x1CC5, // 55 :: rgb(56,48,40) - 0x252B, // 56 :: rgb(71,71,87) - 0x1A05, // 57 :: rgb(46,130,39) - 0xE6AD, // 58 :: rgb(208,176,103) - 0xCF77, // 59 :: rgb(160,224,192) - 0x356B, // 60 :: rgb(107,88,89) - 0xCB58, // 61 :: rgb(144,216,200) - 0xC32A, // 62 :: rgb(135,207,79) - 0x2505, // 63 :: rgb(78,65,39) - 0x6BBF, // 64 :: rgb(214,235,255) - 0x5085, // 65 :: rgb(167,31,39) - 0xAD4D, // 66 :: rgb(87,87,110) - 0xDB1B, // 67 :: rgb(184,200,224) - 0x25D4, // 68 :: rgb(71,112,168) - 0x4E23, // 69 :: rgb(155,139,24) - 0x6149, // 70 :: rgb(199,79,71) - 0x91CA, // 71 :: rgb(37,117,83) - 0x2DD7, // 72 :: rgb(89,113,189) - 0xC76C, // 73 :: rgb(142,221,101) - 0xFB33, // 74 :: rgb(247,207,159) - 0xBB13, // 75 :: rgb(112,199,159) +// convpng +#include +#include "tiles_gfx.h" + +uint16_t tiles_gfx_pal[76] = { + 0x7F22, // 00 :: rgb(255,201,14) + 0xC30C, // 01 :: rgb(132,198,99) + 0x212D, // 02 :: rgb(65,72,106) + 0x1D40, // 03 :: rgb(56,80,0) + 0x1E46, // 04 :: rgb(57,146,49) + 0xDBD1, // 05 :: rgb(184,248,136) + 0xEB7B, // 06 :: rgb(216,224,224) + 0x318F, // 07 :: rgb(99,96,123) + 0x7771, // 08 :: rgb(239,219,140) + 0x650A, // 09 :: rgb(206,64,81) + 0x5F3C, // 10 :: rgb(189,203,231) + 0x6F9D, // 11 :: rgb(222,227,239) + 0x25D5, // 12 :: rgb(73,113,173) + 0x52D8, // 13 :: rgb(165,178,198) + 0xD353, // 14 :: rgb(168,216,160) + 0x6DAC, // 15 :: rgb(222,105,98) + 0x4211, // 16 :: rgb(132,130,140) + 0x3AFE, // 17 :: rgb(115,186,247) + 0x764E, // 18 :: rgb(239,146,114) + 0xE319, // 19 :: rgb(199,199,207) + 0x5A0D, // 20 :: rgb(184,128,111) + 0xE6F0, // 21 :: rgb(208,192,128) + 0x7EF0, // 22 :: rgb(255,186,132) + 0x4EDB, // 23 :: rgb(156,178,222) + 0x6EAE, // 24 :: rgb(222,170,114) + 0x49AD, // 25 :: rgb(148,105,106) + 0x32BD, // 26 :: rgb(99,170,239) + 0xFFFF, // 27 :: rgb(255,255,255) + 0x0E8D, // 28 :: rgb(23,162,107) + 0x666A, // 29 :: rgb(206,154,81) + 0x6ACD, // 30 :: rgb(214,178,106) + 0x22D1, // 31 :: rgb(65,178,140) + 0x18C2, // 32 :: rgb(48,48,14) + 0x5A30, // 33 :: rgb(182,138,130) + 0xB27A, // 34 :: rgb(96,159,215) + 0x7BAE, // 35 :: rgb(245,233,112) + 0x6E2C, // 36 :: rgb(224,136,95) + 0x2A37, // 37 :: rgb(79,136,192) + 0x39A6, // 38 :: rgb(112,104,47) + 0x0420, // 39 :: rgb(8,8,4) + 0xEAF3, // 40 :: rgb(214,191,154) + 0x2CE8, // 41 :: rgb(89,56,65) + 0xEF12, // 42 :: rgb(224,200,144) + 0xDEAD, // 43 :: rgb(191,175,110) + 0x5A51, // 44 :: rgb(184,144,136) + 0x6F30, // 45 :: rgb(222,203,132) + 0xCB3E, // 46 :: rgb(151,207,247) + 0xE35C, // 47 :: rgb(199,215,231) + 0x7399, // 48 :: rgb(231,227,206) + 0x7794, // 49 :: rgb(239,227,165) + 0x7AD0, // 50 :: rgb(247,178,132) + 0x3D29, // 51 :: rgb(123,73,73) + 0x32BC, // 52 :: rgb(96,168,232) + 0x3DF0, // 53 :: rgb(123,123,132) + 0x7337, // 54 :: rgb(228,201,192) + 0x1CC5, // 55 :: rgb(56,48,40) + 0x252B, // 56 :: rgb(71,71,87) + 0x1A05, // 57 :: rgb(46,130,39) + 0xE6AD, // 58 :: rgb(208,176,103) + 0xCF77, // 59 :: rgb(160,224,192) + 0x356B, // 60 :: rgb(107,88,89) + 0xCB58, // 61 :: rgb(144,216,200) + 0xC32A, // 62 :: rgb(135,207,79) + 0x2505, // 63 :: rgb(78,65,39) + 0x6BBF, // 64 :: rgb(214,235,255) + 0x5085, // 65 :: rgb(167,31,39) + 0xAD4D, // 66 :: rgb(87,87,110) + 0xDB1B, // 67 :: rgb(184,200,224) + 0x25D4, // 68 :: rgb(71,112,168) + 0x4E23, // 69 :: rgb(155,139,24) + 0x6149, // 70 :: rgb(199,79,71) + 0x91CA, // 71 :: rgb(37,117,83) + 0x2DD7, // 72 :: rgb(89,113,189) + 0xC76C, // 73 :: rgb(142,221,101) + 0xFB33, // 74 :: rgb(247,207,159) + 0xBB13, // 75 :: rgb(112,199,159) }; \ No newline at end of file diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap/src/gfx/tiles_gfx.h b/frontends/calculator/CEdev/examples/gfx_tilemap/src/gfx/tiles_gfx.h index 6e8db9f..73a2ce6 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap/src/gfx/tiles_gfx.h +++ b/frontends/calculator/CEdev/examples/gfx_tilemap/src/gfx/tiles_gfx.h @@ -1,271 +1,271 @@ -// convpng -// this file contains all the graphics sources for easy inclusion in a project -#ifndef __tiles_gfx__ -#define __tiles_gfx__ -#include - -#define tiles_gfx_transparent_color_index 0 - -extern uint8_t tileset_tile_0_data[]; -#define tileset_tile_0 ((gfx_sprite_t*)tileset_tile_0_data) -extern uint8_t tileset_tile_1_data[]; -#define tileset_tile_1 ((gfx_sprite_t*)tileset_tile_1_data) -extern uint8_t tileset_tile_2_data[]; -#define tileset_tile_2 ((gfx_sprite_t*)tileset_tile_2_data) -extern uint8_t tileset_tile_3_data[]; -#define tileset_tile_3 ((gfx_sprite_t*)tileset_tile_3_data) -extern uint8_t tileset_tile_4_data[]; -#define tileset_tile_4 ((gfx_sprite_t*)tileset_tile_4_data) -extern uint8_t tileset_tile_5_data[]; -#define tileset_tile_5 ((gfx_sprite_t*)tileset_tile_5_data) -extern uint8_t tileset_tile_6_data[]; -#define tileset_tile_6 ((gfx_sprite_t*)tileset_tile_6_data) -extern uint8_t tileset_tile_7_data[]; -#define tileset_tile_7 ((gfx_sprite_t*)tileset_tile_7_data) -extern uint8_t tileset_tile_8_data[]; -#define tileset_tile_8 ((gfx_sprite_t*)tileset_tile_8_data) -extern uint8_t tileset_tile_9_data[]; -#define tileset_tile_9 ((gfx_sprite_t*)tileset_tile_9_data) -extern uint8_t tileset_tile_10_data[]; -#define tileset_tile_10 ((gfx_sprite_t*)tileset_tile_10_data) -extern uint8_t tileset_tile_11_data[]; -#define tileset_tile_11 ((gfx_sprite_t*)tileset_tile_11_data) -extern uint8_t tileset_tile_12_data[]; -#define tileset_tile_12 ((gfx_sprite_t*)tileset_tile_12_data) -extern uint8_t tileset_tile_13_data[]; -#define tileset_tile_13 ((gfx_sprite_t*)tileset_tile_13_data) -extern uint8_t tileset_tile_14_data[]; -#define tileset_tile_14 ((gfx_sprite_t*)tileset_tile_14_data) -extern uint8_t tileset_tile_15_data[]; -#define tileset_tile_15 ((gfx_sprite_t*)tileset_tile_15_data) -extern uint8_t tileset_tile_16_data[]; -#define tileset_tile_16 ((gfx_sprite_t*)tileset_tile_16_data) -extern uint8_t tileset_tile_17_data[]; -#define tileset_tile_17 ((gfx_sprite_t*)tileset_tile_17_data) -extern uint8_t tileset_tile_18_data[]; -#define tileset_tile_18 ((gfx_sprite_t*)tileset_tile_18_data) -extern uint8_t tileset_tile_19_data[]; -#define tileset_tile_19 ((gfx_sprite_t*)tileset_tile_19_data) -extern uint8_t tileset_tile_20_data[]; -#define tileset_tile_20 ((gfx_sprite_t*)tileset_tile_20_data) -extern uint8_t tileset_tile_21_data[]; -#define tileset_tile_21 ((gfx_sprite_t*)tileset_tile_21_data) -extern uint8_t tileset_tile_22_data[]; -#define tileset_tile_22 ((gfx_sprite_t*)tileset_tile_22_data) -extern uint8_t tileset_tile_23_data[]; -#define tileset_tile_23 ((gfx_sprite_t*)tileset_tile_23_data) -extern uint8_t tileset_tile_24_data[]; -#define tileset_tile_24 ((gfx_sprite_t*)tileset_tile_24_data) -extern uint8_t tileset_tile_25_data[]; -#define tileset_tile_25 ((gfx_sprite_t*)tileset_tile_25_data) -extern uint8_t tileset_tile_26_data[]; -#define tileset_tile_26 ((gfx_sprite_t*)tileset_tile_26_data) -extern uint8_t tileset_tile_27_data[]; -#define tileset_tile_27 ((gfx_sprite_t*)tileset_tile_27_data) -extern uint8_t tileset_tile_28_data[]; -#define tileset_tile_28 ((gfx_sprite_t*)tileset_tile_28_data) -extern uint8_t tileset_tile_29_data[]; -#define tileset_tile_29 ((gfx_sprite_t*)tileset_tile_29_data) -extern uint8_t tileset_tile_30_data[]; -#define tileset_tile_30 ((gfx_sprite_t*)tileset_tile_30_data) -extern uint8_t tileset_tile_31_data[]; -#define tileset_tile_31 ((gfx_sprite_t*)tileset_tile_31_data) -extern uint8_t tileset_tile_32_data[]; -#define tileset_tile_32 ((gfx_sprite_t*)tileset_tile_32_data) -extern uint8_t tileset_tile_33_data[]; -#define tileset_tile_33 ((gfx_sprite_t*)tileset_tile_33_data) -extern uint8_t tileset_tile_34_data[]; -#define tileset_tile_34 ((gfx_sprite_t*)tileset_tile_34_data) -extern uint8_t tileset_tile_35_data[]; -#define tileset_tile_35 ((gfx_sprite_t*)tileset_tile_35_data) -extern uint8_t tileset_tile_36_data[]; -#define tileset_tile_36 ((gfx_sprite_t*)tileset_tile_36_data) -extern uint8_t tileset_tile_37_data[]; -#define tileset_tile_37 ((gfx_sprite_t*)tileset_tile_37_data) -extern uint8_t tileset_tile_38_data[]; -#define tileset_tile_38 ((gfx_sprite_t*)tileset_tile_38_data) -extern uint8_t tileset_tile_39_data[]; -#define tileset_tile_39 ((gfx_sprite_t*)tileset_tile_39_data) -extern uint8_t tileset_tile_40_data[]; -#define tileset_tile_40 ((gfx_sprite_t*)tileset_tile_40_data) -extern uint8_t tileset_tile_41_data[]; -#define tileset_tile_41 ((gfx_sprite_t*)tileset_tile_41_data) -extern uint8_t tileset_tile_42_data[]; -#define tileset_tile_42 ((gfx_sprite_t*)tileset_tile_42_data) -extern uint8_t tileset_tile_43_data[]; -#define tileset_tile_43 ((gfx_sprite_t*)tileset_tile_43_data) -extern uint8_t tileset_tile_44_data[]; -#define tileset_tile_44 ((gfx_sprite_t*)tileset_tile_44_data) -extern uint8_t tileset_tile_45_data[]; -#define tileset_tile_45 ((gfx_sprite_t*)tileset_tile_45_data) -extern uint8_t tileset_tile_46_data[]; -#define tileset_tile_46 ((gfx_sprite_t*)tileset_tile_46_data) -extern uint8_t tileset_tile_47_data[]; -#define tileset_tile_47 ((gfx_sprite_t*)tileset_tile_47_data) -extern uint8_t tileset_tile_48_data[]; -#define tileset_tile_48 ((gfx_sprite_t*)tileset_tile_48_data) -extern uint8_t tileset_tile_49_data[]; -#define tileset_tile_49 ((gfx_sprite_t*)tileset_tile_49_data) -extern uint8_t tileset_tile_50_data[]; -#define tileset_tile_50 ((gfx_sprite_t*)tileset_tile_50_data) -extern uint8_t tileset_tile_51_data[]; -#define tileset_tile_51 ((gfx_sprite_t*)tileset_tile_51_data) -extern uint8_t tileset_tile_52_data[]; -#define tileset_tile_52 ((gfx_sprite_t*)tileset_tile_52_data) -extern uint8_t tileset_tile_53_data[]; -#define tileset_tile_53 ((gfx_sprite_t*)tileset_tile_53_data) -extern uint8_t tileset_tile_54_data[]; -#define tileset_tile_54 ((gfx_sprite_t*)tileset_tile_54_data) -extern uint8_t tileset_tile_55_data[]; -#define tileset_tile_55 ((gfx_sprite_t*)tileset_tile_55_data) -extern uint8_t tileset_tile_56_data[]; -#define tileset_tile_56 ((gfx_sprite_t*)tileset_tile_56_data) -extern uint8_t tileset_tile_57_data[]; -#define tileset_tile_57 ((gfx_sprite_t*)tileset_tile_57_data) -extern uint8_t tileset_tile_58_data[]; -#define tileset_tile_58 ((gfx_sprite_t*)tileset_tile_58_data) -extern uint8_t tileset_tile_59_data[]; -#define tileset_tile_59 ((gfx_sprite_t*)tileset_tile_59_data) -extern uint8_t tileset_tile_60_data[]; -#define tileset_tile_60 ((gfx_sprite_t*)tileset_tile_60_data) -extern uint8_t tileset_tile_61_data[]; -#define tileset_tile_61 ((gfx_sprite_t*)tileset_tile_61_data) -extern uint8_t tileset_tile_62_data[]; -#define tileset_tile_62 ((gfx_sprite_t*)tileset_tile_62_data) -extern uint8_t tileset_tile_63_data[]; -#define tileset_tile_63 ((gfx_sprite_t*)tileset_tile_63_data) -extern uint8_t tileset_tile_64_data[]; -#define tileset_tile_64 ((gfx_sprite_t*)tileset_tile_64_data) -extern uint8_t tileset_tile_65_data[]; -#define tileset_tile_65 ((gfx_sprite_t*)tileset_tile_65_data) -extern uint8_t tileset_tile_66_data[]; -#define tileset_tile_66 ((gfx_sprite_t*)tileset_tile_66_data) -extern uint8_t tileset_tile_67_data[]; -#define tileset_tile_67 ((gfx_sprite_t*)tileset_tile_67_data) -extern uint8_t tileset_tile_68_data[]; -#define tileset_tile_68 ((gfx_sprite_t*)tileset_tile_68_data) -extern uint8_t tileset_tile_69_data[]; -#define tileset_tile_69 ((gfx_sprite_t*)tileset_tile_69_data) -extern uint8_t tileset_tile_70_data[]; -#define tileset_tile_70 ((gfx_sprite_t*)tileset_tile_70_data) -extern uint8_t tileset_tile_71_data[]; -#define tileset_tile_71 ((gfx_sprite_t*)tileset_tile_71_data) -extern uint8_t tileset_tile_72_data[]; -#define tileset_tile_72 ((gfx_sprite_t*)tileset_tile_72_data) -extern uint8_t tileset_tile_73_data[]; -#define tileset_tile_73 ((gfx_sprite_t*)tileset_tile_73_data) -extern uint8_t tileset_tile_74_data[]; -#define tileset_tile_74 ((gfx_sprite_t*)tileset_tile_74_data) -extern uint8_t tileset_tile_75_data[]; -#define tileset_tile_75 ((gfx_sprite_t*)tileset_tile_75_data) -extern uint8_t tileset_tile_76_data[]; -#define tileset_tile_76 ((gfx_sprite_t*)tileset_tile_76_data) -extern uint8_t tileset_tile_77_data[]; -#define tileset_tile_77 ((gfx_sprite_t*)tileset_tile_77_data) -extern uint8_t tileset_tile_78_data[]; -#define tileset_tile_78 ((gfx_sprite_t*)tileset_tile_78_data) -extern uint8_t tileset_tile_79_data[]; -#define tileset_tile_79 ((gfx_sprite_t*)tileset_tile_79_data) -extern uint8_t tileset_tile_80_data[]; -#define tileset_tile_80 ((gfx_sprite_t*)tileset_tile_80_data) -extern uint8_t tileset_tile_81_data[]; -#define tileset_tile_81 ((gfx_sprite_t*)tileset_tile_81_data) -extern uint8_t tileset_tile_82_data[]; -#define tileset_tile_82 ((gfx_sprite_t*)tileset_tile_82_data) -extern uint8_t tileset_tile_83_data[]; -#define tileset_tile_83 ((gfx_sprite_t*)tileset_tile_83_data) -extern uint8_t tileset_tile_84_data[]; -#define tileset_tile_84 ((gfx_sprite_t*)tileset_tile_84_data) -extern uint8_t tileset_tile_85_data[]; -#define tileset_tile_85 ((gfx_sprite_t*)tileset_tile_85_data) -extern uint8_t tileset_tile_86_data[]; -#define tileset_tile_86 ((gfx_sprite_t*)tileset_tile_86_data) -extern uint8_t tileset_tile_87_data[]; -#define tileset_tile_87 ((gfx_sprite_t*)tileset_tile_87_data) -extern uint8_t tileset_tile_88_data[]; -#define tileset_tile_88 ((gfx_sprite_t*)tileset_tile_88_data) -extern uint8_t tileset_tile_89_data[]; -#define tileset_tile_89 ((gfx_sprite_t*)tileset_tile_89_data) -extern uint8_t tileset_tile_90_data[]; -#define tileset_tile_90 ((gfx_sprite_t*)tileset_tile_90_data) -extern uint8_t tileset_tile_91_data[]; -#define tileset_tile_91 ((gfx_sprite_t*)tileset_tile_91_data) -extern uint8_t tileset_tile_92_data[]; -#define tileset_tile_92 ((gfx_sprite_t*)tileset_tile_92_data) -extern uint8_t tileset_tile_93_data[]; -#define tileset_tile_93 ((gfx_sprite_t*)tileset_tile_93_data) -extern uint8_t tileset_tile_94_data[]; -#define tileset_tile_94 ((gfx_sprite_t*)tileset_tile_94_data) -extern uint8_t tileset_tile_95_data[]; -#define tileset_tile_95 ((gfx_sprite_t*)tileset_tile_95_data) -extern uint8_t tileset_tile_96_data[]; -#define tileset_tile_96 ((gfx_sprite_t*)tileset_tile_96_data) -extern uint8_t tileset_tile_97_data[]; -#define tileset_tile_97 ((gfx_sprite_t*)tileset_tile_97_data) -extern uint8_t tileset_tile_98_data[]; -#define tileset_tile_98 ((gfx_sprite_t*)tileset_tile_98_data) -extern uint8_t tileset_tile_99_data[]; -#define tileset_tile_99 ((gfx_sprite_t*)tileset_tile_99_data) -extern uint8_t tileset_tile_100_data[]; -#define tileset_tile_100 ((gfx_sprite_t*)tileset_tile_100_data) -extern uint8_t tileset_tile_101_data[]; -#define tileset_tile_101 ((gfx_sprite_t*)tileset_tile_101_data) -extern uint8_t tileset_tile_102_data[]; -#define tileset_tile_102 ((gfx_sprite_t*)tileset_tile_102_data) -extern uint8_t tileset_tile_103_data[]; -#define tileset_tile_103 ((gfx_sprite_t*)tileset_tile_103_data) -extern uint8_t tileset_tile_104_data[]; -#define tileset_tile_104 ((gfx_sprite_t*)tileset_tile_104_data) -extern uint8_t tileset_tile_105_data[]; -#define tileset_tile_105 ((gfx_sprite_t*)tileset_tile_105_data) -extern uint8_t tileset_tile_106_data[]; -#define tileset_tile_106 ((gfx_sprite_t*)tileset_tile_106_data) -extern uint8_t tileset_tile_107_data[]; -#define tileset_tile_107 ((gfx_sprite_t*)tileset_tile_107_data) -extern uint8_t tileset_tile_108_data[]; -#define tileset_tile_108 ((gfx_sprite_t*)tileset_tile_108_data) -extern uint8_t tileset_tile_109_data[]; -#define tileset_tile_109 ((gfx_sprite_t*)tileset_tile_109_data) -extern uint8_t tileset_tile_110_data[]; -#define tileset_tile_110 ((gfx_sprite_t*)tileset_tile_110_data) -extern uint8_t tileset_tile_111_data[]; -#define tileset_tile_111 ((gfx_sprite_t*)tileset_tile_111_data) -extern uint8_t tileset_tile_112_data[]; -#define tileset_tile_112 ((gfx_sprite_t*)tileset_tile_112_data) -extern uint8_t tileset_tile_113_data[]; -#define tileset_tile_113 ((gfx_sprite_t*)tileset_tile_113_data) -extern uint8_t tileset_tile_114_data[]; -#define tileset_tile_114 ((gfx_sprite_t*)tileset_tile_114_data) -extern uint8_t tileset_tile_115_data[]; -#define tileset_tile_115 ((gfx_sprite_t*)tileset_tile_115_data) -extern uint8_t tileset_tile_116_data[]; -#define tileset_tile_116 ((gfx_sprite_t*)tileset_tile_116_data) -extern uint8_t tileset_tile_117_data[]; -#define tileset_tile_117 ((gfx_sprite_t*)tileset_tile_117_data) -extern uint8_t tileset_tile_118_data[]; -#define tileset_tile_118 ((gfx_sprite_t*)tileset_tile_118_data) -extern uint8_t tileset_tile_119_data[]; -#define tileset_tile_119 ((gfx_sprite_t*)tileset_tile_119_data) -extern uint8_t tileset_tile_120_data[]; -#define tileset_tile_120 ((gfx_sprite_t*)tileset_tile_120_data) -extern uint8_t tileset_tile_121_data[]; -#define tileset_tile_121 ((gfx_sprite_t*)tileset_tile_121_data) -extern uint8_t tileset_tile_122_data[]; -#define tileset_tile_122 ((gfx_sprite_t*)tileset_tile_122_data) -extern uint8_t tileset_tile_123_data[]; -#define tileset_tile_123 ((gfx_sprite_t*)tileset_tile_123_data) -extern uint8_t tileset_tile_124_data[]; -#define tileset_tile_124 ((gfx_sprite_t*)tileset_tile_124_data) -extern uint8_t tileset_tile_125_data[]; -#define tileset_tile_125 ((gfx_sprite_t*)tileset_tile_125_data) -extern uint8_t tileset_tile_126_data[]; -#define tileset_tile_126 ((gfx_sprite_t*)tileset_tile_126_data) -extern uint8_t tileset_tile_127_data[]; -#define tileset_tile_127 ((gfx_sprite_t*)tileset_tile_127_data) -#define tileset_tiles_num 128 -extern uint8_t *tileset_tiles_data[128]; -#define tileset_tiles ((gfx_sprite_t**)tileset_tiles_data) -#define sizeof_tiles_gfx_pal 152 -extern uint16_t tiles_gfx_pal[76]; - -#endif +// convpng +// this file contains all the graphics sources for easy inclusion in a project +#ifndef __tiles_gfx__ +#define __tiles_gfx__ +#include + +#define tiles_gfx_transparent_color_index 0 + +extern uint8_t tileset_tile_0_data[]; +#define tileset_tile_0 ((gfx_sprite_t*)tileset_tile_0_data) +extern uint8_t tileset_tile_1_data[]; +#define tileset_tile_1 ((gfx_sprite_t*)tileset_tile_1_data) +extern uint8_t tileset_tile_2_data[]; +#define tileset_tile_2 ((gfx_sprite_t*)tileset_tile_2_data) +extern uint8_t tileset_tile_3_data[]; +#define tileset_tile_3 ((gfx_sprite_t*)tileset_tile_3_data) +extern uint8_t tileset_tile_4_data[]; +#define tileset_tile_4 ((gfx_sprite_t*)tileset_tile_4_data) +extern uint8_t tileset_tile_5_data[]; +#define tileset_tile_5 ((gfx_sprite_t*)tileset_tile_5_data) +extern uint8_t tileset_tile_6_data[]; +#define tileset_tile_6 ((gfx_sprite_t*)tileset_tile_6_data) +extern uint8_t tileset_tile_7_data[]; +#define tileset_tile_7 ((gfx_sprite_t*)tileset_tile_7_data) +extern uint8_t tileset_tile_8_data[]; +#define tileset_tile_8 ((gfx_sprite_t*)tileset_tile_8_data) +extern uint8_t tileset_tile_9_data[]; +#define tileset_tile_9 ((gfx_sprite_t*)tileset_tile_9_data) +extern uint8_t tileset_tile_10_data[]; +#define tileset_tile_10 ((gfx_sprite_t*)tileset_tile_10_data) +extern uint8_t tileset_tile_11_data[]; +#define tileset_tile_11 ((gfx_sprite_t*)tileset_tile_11_data) +extern uint8_t tileset_tile_12_data[]; +#define tileset_tile_12 ((gfx_sprite_t*)tileset_tile_12_data) +extern uint8_t tileset_tile_13_data[]; +#define tileset_tile_13 ((gfx_sprite_t*)tileset_tile_13_data) +extern uint8_t tileset_tile_14_data[]; +#define tileset_tile_14 ((gfx_sprite_t*)tileset_tile_14_data) +extern uint8_t tileset_tile_15_data[]; +#define tileset_tile_15 ((gfx_sprite_t*)tileset_tile_15_data) +extern uint8_t tileset_tile_16_data[]; +#define tileset_tile_16 ((gfx_sprite_t*)tileset_tile_16_data) +extern uint8_t tileset_tile_17_data[]; +#define tileset_tile_17 ((gfx_sprite_t*)tileset_tile_17_data) +extern uint8_t tileset_tile_18_data[]; +#define tileset_tile_18 ((gfx_sprite_t*)tileset_tile_18_data) +extern uint8_t tileset_tile_19_data[]; +#define tileset_tile_19 ((gfx_sprite_t*)tileset_tile_19_data) +extern uint8_t tileset_tile_20_data[]; +#define tileset_tile_20 ((gfx_sprite_t*)tileset_tile_20_data) +extern uint8_t tileset_tile_21_data[]; +#define tileset_tile_21 ((gfx_sprite_t*)tileset_tile_21_data) +extern uint8_t tileset_tile_22_data[]; +#define tileset_tile_22 ((gfx_sprite_t*)tileset_tile_22_data) +extern uint8_t tileset_tile_23_data[]; +#define tileset_tile_23 ((gfx_sprite_t*)tileset_tile_23_data) +extern uint8_t tileset_tile_24_data[]; +#define tileset_tile_24 ((gfx_sprite_t*)tileset_tile_24_data) +extern uint8_t tileset_tile_25_data[]; +#define tileset_tile_25 ((gfx_sprite_t*)tileset_tile_25_data) +extern uint8_t tileset_tile_26_data[]; +#define tileset_tile_26 ((gfx_sprite_t*)tileset_tile_26_data) +extern uint8_t tileset_tile_27_data[]; +#define tileset_tile_27 ((gfx_sprite_t*)tileset_tile_27_data) +extern uint8_t tileset_tile_28_data[]; +#define tileset_tile_28 ((gfx_sprite_t*)tileset_tile_28_data) +extern uint8_t tileset_tile_29_data[]; +#define tileset_tile_29 ((gfx_sprite_t*)tileset_tile_29_data) +extern uint8_t tileset_tile_30_data[]; +#define tileset_tile_30 ((gfx_sprite_t*)tileset_tile_30_data) +extern uint8_t tileset_tile_31_data[]; +#define tileset_tile_31 ((gfx_sprite_t*)tileset_tile_31_data) +extern uint8_t tileset_tile_32_data[]; +#define tileset_tile_32 ((gfx_sprite_t*)tileset_tile_32_data) +extern uint8_t tileset_tile_33_data[]; +#define tileset_tile_33 ((gfx_sprite_t*)tileset_tile_33_data) +extern uint8_t tileset_tile_34_data[]; +#define tileset_tile_34 ((gfx_sprite_t*)tileset_tile_34_data) +extern uint8_t tileset_tile_35_data[]; +#define tileset_tile_35 ((gfx_sprite_t*)tileset_tile_35_data) +extern uint8_t tileset_tile_36_data[]; +#define tileset_tile_36 ((gfx_sprite_t*)tileset_tile_36_data) +extern uint8_t tileset_tile_37_data[]; +#define tileset_tile_37 ((gfx_sprite_t*)tileset_tile_37_data) +extern uint8_t tileset_tile_38_data[]; +#define tileset_tile_38 ((gfx_sprite_t*)tileset_tile_38_data) +extern uint8_t tileset_tile_39_data[]; +#define tileset_tile_39 ((gfx_sprite_t*)tileset_tile_39_data) +extern uint8_t tileset_tile_40_data[]; +#define tileset_tile_40 ((gfx_sprite_t*)tileset_tile_40_data) +extern uint8_t tileset_tile_41_data[]; +#define tileset_tile_41 ((gfx_sprite_t*)tileset_tile_41_data) +extern uint8_t tileset_tile_42_data[]; +#define tileset_tile_42 ((gfx_sprite_t*)tileset_tile_42_data) +extern uint8_t tileset_tile_43_data[]; +#define tileset_tile_43 ((gfx_sprite_t*)tileset_tile_43_data) +extern uint8_t tileset_tile_44_data[]; +#define tileset_tile_44 ((gfx_sprite_t*)tileset_tile_44_data) +extern uint8_t tileset_tile_45_data[]; +#define tileset_tile_45 ((gfx_sprite_t*)tileset_tile_45_data) +extern uint8_t tileset_tile_46_data[]; +#define tileset_tile_46 ((gfx_sprite_t*)tileset_tile_46_data) +extern uint8_t tileset_tile_47_data[]; +#define tileset_tile_47 ((gfx_sprite_t*)tileset_tile_47_data) +extern uint8_t tileset_tile_48_data[]; +#define tileset_tile_48 ((gfx_sprite_t*)tileset_tile_48_data) +extern uint8_t tileset_tile_49_data[]; +#define tileset_tile_49 ((gfx_sprite_t*)tileset_tile_49_data) +extern uint8_t tileset_tile_50_data[]; +#define tileset_tile_50 ((gfx_sprite_t*)tileset_tile_50_data) +extern uint8_t tileset_tile_51_data[]; +#define tileset_tile_51 ((gfx_sprite_t*)tileset_tile_51_data) +extern uint8_t tileset_tile_52_data[]; +#define tileset_tile_52 ((gfx_sprite_t*)tileset_tile_52_data) +extern uint8_t tileset_tile_53_data[]; +#define tileset_tile_53 ((gfx_sprite_t*)tileset_tile_53_data) +extern uint8_t tileset_tile_54_data[]; +#define tileset_tile_54 ((gfx_sprite_t*)tileset_tile_54_data) +extern uint8_t tileset_tile_55_data[]; +#define tileset_tile_55 ((gfx_sprite_t*)tileset_tile_55_data) +extern uint8_t tileset_tile_56_data[]; +#define tileset_tile_56 ((gfx_sprite_t*)tileset_tile_56_data) +extern uint8_t tileset_tile_57_data[]; +#define tileset_tile_57 ((gfx_sprite_t*)tileset_tile_57_data) +extern uint8_t tileset_tile_58_data[]; +#define tileset_tile_58 ((gfx_sprite_t*)tileset_tile_58_data) +extern uint8_t tileset_tile_59_data[]; +#define tileset_tile_59 ((gfx_sprite_t*)tileset_tile_59_data) +extern uint8_t tileset_tile_60_data[]; +#define tileset_tile_60 ((gfx_sprite_t*)tileset_tile_60_data) +extern uint8_t tileset_tile_61_data[]; +#define tileset_tile_61 ((gfx_sprite_t*)tileset_tile_61_data) +extern uint8_t tileset_tile_62_data[]; +#define tileset_tile_62 ((gfx_sprite_t*)tileset_tile_62_data) +extern uint8_t tileset_tile_63_data[]; +#define tileset_tile_63 ((gfx_sprite_t*)tileset_tile_63_data) +extern uint8_t tileset_tile_64_data[]; +#define tileset_tile_64 ((gfx_sprite_t*)tileset_tile_64_data) +extern uint8_t tileset_tile_65_data[]; +#define tileset_tile_65 ((gfx_sprite_t*)tileset_tile_65_data) +extern uint8_t tileset_tile_66_data[]; +#define tileset_tile_66 ((gfx_sprite_t*)tileset_tile_66_data) +extern uint8_t tileset_tile_67_data[]; +#define tileset_tile_67 ((gfx_sprite_t*)tileset_tile_67_data) +extern uint8_t tileset_tile_68_data[]; +#define tileset_tile_68 ((gfx_sprite_t*)tileset_tile_68_data) +extern uint8_t tileset_tile_69_data[]; +#define tileset_tile_69 ((gfx_sprite_t*)tileset_tile_69_data) +extern uint8_t tileset_tile_70_data[]; +#define tileset_tile_70 ((gfx_sprite_t*)tileset_tile_70_data) +extern uint8_t tileset_tile_71_data[]; +#define tileset_tile_71 ((gfx_sprite_t*)tileset_tile_71_data) +extern uint8_t tileset_tile_72_data[]; +#define tileset_tile_72 ((gfx_sprite_t*)tileset_tile_72_data) +extern uint8_t tileset_tile_73_data[]; +#define tileset_tile_73 ((gfx_sprite_t*)tileset_tile_73_data) +extern uint8_t tileset_tile_74_data[]; +#define tileset_tile_74 ((gfx_sprite_t*)tileset_tile_74_data) +extern uint8_t tileset_tile_75_data[]; +#define tileset_tile_75 ((gfx_sprite_t*)tileset_tile_75_data) +extern uint8_t tileset_tile_76_data[]; +#define tileset_tile_76 ((gfx_sprite_t*)tileset_tile_76_data) +extern uint8_t tileset_tile_77_data[]; +#define tileset_tile_77 ((gfx_sprite_t*)tileset_tile_77_data) +extern uint8_t tileset_tile_78_data[]; +#define tileset_tile_78 ((gfx_sprite_t*)tileset_tile_78_data) +extern uint8_t tileset_tile_79_data[]; +#define tileset_tile_79 ((gfx_sprite_t*)tileset_tile_79_data) +extern uint8_t tileset_tile_80_data[]; +#define tileset_tile_80 ((gfx_sprite_t*)tileset_tile_80_data) +extern uint8_t tileset_tile_81_data[]; +#define tileset_tile_81 ((gfx_sprite_t*)tileset_tile_81_data) +extern uint8_t tileset_tile_82_data[]; +#define tileset_tile_82 ((gfx_sprite_t*)tileset_tile_82_data) +extern uint8_t tileset_tile_83_data[]; +#define tileset_tile_83 ((gfx_sprite_t*)tileset_tile_83_data) +extern uint8_t tileset_tile_84_data[]; +#define tileset_tile_84 ((gfx_sprite_t*)tileset_tile_84_data) +extern uint8_t tileset_tile_85_data[]; +#define tileset_tile_85 ((gfx_sprite_t*)tileset_tile_85_data) +extern uint8_t tileset_tile_86_data[]; +#define tileset_tile_86 ((gfx_sprite_t*)tileset_tile_86_data) +extern uint8_t tileset_tile_87_data[]; +#define tileset_tile_87 ((gfx_sprite_t*)tileset_tile_87_data) +extern uint8_t tileset_tile_88_data[]; +#define tileset_tile_88 ((gfx_sprite_t*)tileset_tile_88_data) +extern uint8_t tileset_tile_89_data[]; +#define tileset_tile_89 ((gfx_sprite_t*)tileset_tile_89_data) +extern uint8_t tileset_tile_90_data[]; +#define tileset_tile_90 ((gfx_sprite_t*)tileset_tile_90_data) +extern uint8_t tileset_tile_91_data[]; +#define tileset_tile_91 ((gfx_sprite_t*)tileset_tile_91_data) +extern uint8_t tileset_tile_92_data[]; +#define tileset_tile_92 ((gfx_sprite_t*)tileset_tile_92_data) +extern uint8_t tileset_tile_93_data[]; +#define tileset_tile_93 ((gfx_sprite_t*)tileset_tile_93_data) +extern uint8_t tileset_tile_94_data[]; +#define tileset_tile_94 ((gfx_sprite_t*)tileset_tile_94_data) +extern uint8_t tileset_tile_95_data[]; +#define tileset_tile_95 ((gfx_sprite_t*)tileset_tile_95_data) +extern uint8_t tileset_tile_96_data[]; +#define tileset_tile_96 ((gfx_sprite_t*)tileset_tile_96_data) +extern uint8_t tileset_tile_97_data[]; +#define tileset_tile_97 ((gfx_sprite_t*)tileset_tile_97_data) +extern uint8_t tileset_tile_98_data[]; +#define tileset_tile_98 ((gfx_sprite_t*)tileset_tile_98_data) +extern uint8_t tileset_tile_99_data[]; +#define tileset_tile_99 ((gfx_sprite_t*)tileset_tile_99_data) +extern uint8_t tileset_tile_100_data[]; +#define tileset_tile_100 ((gfx_sprite_t*)tileset_tile_100_data) +extern uint8_t tileset_tile_101_data[]; +#define tileset_tile_101 ((gfx_sprite_t*)tileset_tile_101_data) +extern uint8_t tileset_tile_102_data[]; +#define tileset_tile_102 ((gfx_sprite_t*)tileset_tile_102_data) +extern uint8_t tileset_tile_103_data[]; +#define tileset_tile_103 ((gfx_sprite_t*)tileset_tile_103_data) +extern uint8_t tileset_tile_104_data[]; +#define tileset_tile_104 ((gfx_sprite_t*)tileset_tile_104_data) +extern uint8_t tileset_tile_105_data[]; +#define tileset_tile_105 ((gfx_sprite_t*)tileset_tile_105_data) +extern uint8_t tileset_tile_106_data[]; +#define tileset_tile_106 ((gfx_sprite_t*)tileset_tile_106_data) +extern uint8_t tileset_tile_107_data[]; +#define tileset_tile_107 ((gfx_sprite_t*)tileset_tile_107_data) +extern uint8_t tileset_tile_108_data[]; +#define tileset_tile_108 ((gfx_sprite_t*)tileset_tile_108_data) +extern uint8_t tileset_tile_109_data[]; +#define tileset_tile_109 ((gfx_sprite_t*)tileset_tile_109_data) +extern uint8_t tileset_tile_110_data[]; +#define tileset_tile_110 ((gfx_sprite_t*)tileset_tile_110_data) +extern uint8_t tileset_tile_111_data[]; +#define tileset_tile_111 ((gfx_sprite_t*)tileset_tile_111_data) +extern uint8_t tileset_tile_112_data[]; +#define tileset_tile_112 ((gfx_sprite_t*)tileset_tile_112_data) +extern uint8_t tileset_tile_113_data[]; +#define tileset_tile_113 ((gfx_sprite_t*)tileset_tile_113_data) +extern uint8_t tileset_tile_114_data[]; +#define tileset_tile_114 ((gfx_sprite_t*)tileset_tile_114_data) +extern uint8_t tileset_tile_115_data[]; +#define tileset_tile_115 ((gfx_sprite_t*)tileset_tile_115_data) +extern uint8_t tileset_tile_116_data[]; +#define tileset_tile_116 ((gfx_sprite_t*)tileset_tile_116_data) +extern uint8_t tileset_tile_117_data[]; +#define tileset_tile_117 ((gfx_sprite_t*)tileset_tile_117_data) +extern uint8_t tileset_tile_118_data[]; +#define tileset_tile_118 ((gfx_sprite_t*)tileset_tile_118_data) +extern uint8_t tileset_tile_119_data[]; +#define tileset_tile_119 ((gfx_sprite_t*)tileset_tile_119_data) +extern uint8_t tileset_tile_120_data[]; +#define tileset_tile_120 ((gfx_sprite_t*)tileset_tile_120_data) +extern uint8_t tileset_tile_121_data[]; +#define tileset_tile_121 ((gfx_sprite_t*)tileset_tile_121_data) +extern uint8_t tileset_tile_122_data[]; +#define tileset_tile_122 ((gfx_sprite_t*)tileset_tile_122_data) +extern uint8_t tileset_tile_123_data[]; +#define tileset_tile_123 ((gfx_sprite_t*)tileset_tile_123_data) +extern uint8_t tileset_tile_124_data[]; +#define tileset_tile_124 ((gfx_sprite_t*)tileset_tile_124_data) +extern uint8_t tileset_tile_125_data[]; +#define tileset_tile_125 ((gfx_sprite_t*)tileset_tile_125_data) +extern uint8_t tileset_tile_126_data[]; +#define tileset_tile_126 ((gfx_sprite_t*)tileset_tile_126_data) +extern uint8_t tileset_tile_127_data[]; +#define tileset_tile_127 ((gfx_sprite_t*)tileset_tile_127_data) +#define tileset_tiles_num 128 +extern uint8_t *tileset_tiles_data[128]; +#define tileset_tiles ((gfx_sprite_t**)tileset_tiles_data) +#define sizeof_tiles_gfx_pal 152 +extern uint16_t tiles_gfx_pal[76]; + +#endif diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap/src/gfx/tileset.c b/frontends/calculator/CEdev/examples/gfx_tilemap/src/gfx/tileset.c index 077ec44..383f58b 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap/src/gfx/tileset.c +++ b/frontends/calculator/CEdev/examples/gfx_tilemap/src/gfx/tileset.c @@ -1,2694 +1,2694 @@ -// convpng -#include -#include "tiles_gfx.h" - -uint8_t tileset_tile_0_data[258] = { - 16, // tile_width - 16, // tile_height - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x3D,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x3D,0x4B,0x4B,0x3D,0x4B,0x4B,0x3D,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x3D,0x4B,0x4B,0x4B,0x3D,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, -}; -uint8_t tileset_tile_1_data[258] = { - 16, // tile_width - 16, // tile_height - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x1F,0x4B,0x4B,0x1F,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x1F,0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x3D,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x3D,0x4B,0x4B,0x3D,0x4B,0x4B,0x3D, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x3D,0x4B,0x4B,0x4B,0x3D,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x1F,0x4B,0x4B,0x1F, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x1F,0x4B, -}; -uint8_t tileset_tile_2_data[258] = { - 16, // tile_width - 16, // tile_height - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x1F,0x4B,0x4B,0x1F,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x3B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x3B,0x4B,0x4B,0x3B,0x4B,0x4B,0x3B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x3B,0x4B,0x4B,0x4B,0x3B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, -}; -uint8_t tileset_tile_3_data[258] = { - 16, // tile_width - 16, // tile_height - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x1F,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, -}; -uint8_t tileset_tile_4_data[258] = { - 16, // tile_width - 16, // tile_height - 0x4B,0x03,0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x03,0x03,0x01,0x01,0x04,0x01,0x01, - 0x4B,0x1C,0x03,0x03,0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x01, - 0x4B,0x1F,0x1C,0x03,0x04,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x03, - 0x4B,0x1F,0x1F,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x04,0x03, - 0x4B,0x4B,0x1F,0x1C,0x04,0x03,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x03,0x05, - 0x4B,0x1F,0x1C,0x04,0x04,0x04,0x03,0x03,0x04,0x03,0x04,0x04,0x03,0x03,0x04,0x05, - 0x1F,0x1C,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x04,0x03,0x03,0x01,0x05, - 0x1C,0x1C,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x05,0x05, - 0x1C,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x04,0x04,0x05,0x05,0x01,0x05,0x05, - 0x1C,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x04,0x01,0x01,0x05,0x01,0x05,0x05, - 0x1C,0x1C,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x04,0x05,0x05,0x01,0x05,0x05,0x05, - 0x1C,0x1C,0x1C,0x04,0x04,0x04,0x04,0x04,0x01,0x05,0x01,0x01,0x05,0x05,0x05,0x05, - 0x1F,0x1F,0x1C,0x1C,0x04,0x04,0x04,0x01,0x04,0x04,0x01,0x05,0x05,0x05,0x05,0x05, - 0x4B,0x4B,0x1F,0x1C,0x1C,0x03,0x05,0x05,0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05, - 0x4B,0x4B,0x4B,0x1F,0x1C,0x04,0x04,0x04,0x01,0x05,0x05,0x01,0x05,0x05,0x05,0x05, - 0x4B,0x4B,0x4B,0x1F,0x03,0x01,0x05,0x05,0x04,0x05,0x04,0x05,0x05,0x05,0x05,0x05, -}; -uint8_t tileset_tile_5_data[258] = { - 16, // tile_width - 16, // tile_height - 0x01,0x01,0x04,0x01,0x01,0x03,0x03,0x03,0x04,0x04,0x04,0x03,0x04,0x04,0x03,0x4B, - 0x01,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x03,0x04,0x04,0x03,0x03,0x1C,0x4B, - 0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x04,0x03,0x1C,0x1F,0x4B, - 0x03,0x04,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x1F,0x1F,0x4B, - 0x05,0x03,0x03,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x04,0x1C,0x1F,0x4B,0x4B, - 0x05,0x04,0x03,0x03,0x04,0x04,0x03,0x04,0x03,0x03,0x04,0x04,0x04,0x1C,0x1F,0x4B, - 0x05,0x01,0x03,0x03,0x04,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x1C,0x1F, - 0x05,0x01,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x1C,0x1C, - 0x05,0x01,0x01,0x05,0x05,0x04,0x04,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x1C, - 0x05,0x01,0x01,0x01,0x01,0x01,0x04,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x1C, - 0x05,0x01,0x05,0x01,0x01,0x05,0x04,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x1C,0x1C, - 0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x01,0x04,0x04,0x04,0x04,0x04,0x1C,0x1C,0x1C, - 0x05,0x05,0x05,0x05,0x01,0x05,0x04,0x04,0x01,0x04,0x04,0x04,0x1C,0x1C,0x1F,0x1F, - 0x05,0x05,0x05,0x01,0x05,0x01,0x01,0x04,0x05,0x05,0x03,0x1C,0x1C,0x1F,0x4B,0x4B, - 0x05,0x05,0x05,0x05,0x01,0x05,0x05,0x01,0x04,0x04,0x04,0x1C,0x1F,0x4B,0x4B,0x4B, - 0x05,0x05,0x05,0x01,0x05,0x04,0x05,0x04,0x05,0x05,0x01,0x03,0x1F,0x4B,0x4B,0x4B, -}; -uint8_t tileset_tile_6_data[258] = { - 16, // tile_width - 16, // tile_height - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x05, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x05, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x01,0x05, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04,0x05,0x05, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x05,0x05,0x01,0x05,0x05, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x01,0x01,0x05,0x01,0x05,0x05, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x05,0x05,0x01,0x05,0x05,0x05, - 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x01,0x05,0x01,0x01,0x05,0x05,0x05,0x05, - 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x01,0x04,0x04,0x01,0x05,0x05,0x05,0x05,0x05, - 0x00,0x00,0x00,0x00,0x00,0x03,0x05,0x05,0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05, - 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x01,0x05,0x05,0x01,0x05,0x05,0x05,0x05, - 0x00,0x00,0x00,0x00,0x03,0x01,0x05,0x05,0x04,0x05,0x04,0x05,0x05,0x05,0x05,0x05, -}; -uint8_t tileset_tile_7_data[258] = { - 16, // tile_width - 16, // tile_height - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x05,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x05,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x05,0x01,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x05,0x01,0x04,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x05,0x01,0x01,0x05,0x05,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x05,0x01,0x01,0x01,0x01,0x01,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x05,0x01,0x05,0x01,0x01,0x05,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x01,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00, - 0x05,0x05,0x05,0x05,0x01,0x05,0x04,0x04,0x01,0x04,0x00,0x00,0x00,0x00,0x00,0x00, - 0x05,0x05,0x05,0x01,0x05,0x01,0x01,0x04,0x05,0x05,0x03,0x00,0x00,0x00,0x00,0x00, - 0x05,0x05,0x05,0x05,0x01,0x05,0x05,0x01,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00, - 0x05,0x05,0x05,0x01,0x05,0x04,0x05,0x04,0x05,0x05,0x01,0x03,0x00,0x00,0x00,0x00, -}; -uint8_t tileset_tile_8_data[258] = { - 16, // tile_width - 16, // tile_height - 0x00,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x00, - 0x07,0x19,0x19,0x19,0x07,0x07,0x07,0x07,0x19,0x19,0x19,0x19,0x07,0x07,0x07,0x07, - 0x07,0x23,0x23,0x18,0x19,0x19,0x19,0x19,0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19, - 0x07,0x23,0x23,0x18,0x18,0x18,0x18,0x18,0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18, - 0x07,0x19,0x19,0x19,0x23,0x23,0x23,0x23,0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x23, - 0x07,0x23,0x23,0x18,0x19,0x19,0x19,0x19,0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19, - 0x07,0x23,0x23,0x18,0x18,0x18,0x18,0x18,0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18, - 0x07,0x19,0x19,0x19,0x23,0x23,0x23,0x23,0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x23, - 0x07,0x23,0x23,0x18,0x19,0x19,0x19,0x19,0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19, - 0x07,0x23,0x23,0x18,0x18,0x18,0x18,0x18,0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18, - 0x07,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19, - 0x07,0x14,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x07,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, - 0x07,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, -}; -uint8_t tileset_tile_9_data[258] = { - 16, // tile_width - 16, // tile_height - 0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x00, - 0x19,0x19,0x19,0x19,0x07,0x07,0x07,0x07,0x19,0x19,0x19,0x19,0x07,0x07,0x07,0x07, - 0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19,0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19, - 0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18,0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18, - 0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x23,0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x23, - 0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19,0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19, - 0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18,0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18, - 0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x23,0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x23, - 0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19,0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19, - 0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18,0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18, - 0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19, - 0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, -}; -uint8_t tileset_tile_10_data[258] = { - 16, // tile_width - 16, // tile_height - 0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x00, - 0x19,0x19,0x19,0x19,0x07,0x07,0x07,0x07,0x19,0x19,0x19,0x19,0x07,0x07,0x07,0x07, - 0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19,0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19, - 0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18,0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18, - 0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x23,0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x23, - 0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19,0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19, - 0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18,0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18, - 0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x23,0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x23, - 0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19,0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19, - 0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18,0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18, - 0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19, - 0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, -}; -uint8_t tileset_tile_11_data[258] = { - 16, // tile_width - 16, // tile_height - 0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x00, - 0x19,0x19,0x19,0x19,0x07,0x07,0x07,0x07,0x19,0x19,0x19,0x19,0x07,0x07,0x07,0x02, - 0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19,0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x02, - 0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18,0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x02, - 0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x23,0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x02, - 0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19,0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x02, - 0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18,0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x02, - 0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x23,0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x02, - 0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19,0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x02, - 0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18,0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x02, - 0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x02, - 0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x14,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02, - 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x02, - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x19,0x02, -}; -uint8_t tileset_tile_12_data[258] = { - 16, // tile_width - 16, // tile_height - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x16,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, - 0x00,0x00,0x00,0x00,0x00,0x09,0x16,0x16,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, - 0x00,0x00,0x00,0x00,0x09,0x16,0x16,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, - 0x00,0x00,0x00,0x09,0x09,0x16,0x12,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, - 0x00,0x00,0x09,0x16,0x09,0x12,0x12,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, - 0x00,0x09,0x16,0x16,0x09,0x12,0x12,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, - 0x09,0x16,0x16,0x12,0x09,0x12,0x12,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, -}; -uint8_t tileset_tile_13_data[258] = { - 16, // tile_width - 16, // tile_height - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x07, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x16,0x09,0x16,0x16,0x16, - 0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, - 0x00,0x00,0x00,0x00,0x00,0x07,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, - 0x00,0x00,0x00,0x07,0x07,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, - 0x00,0x00,0x07,0x07,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, - 0x00,0x07,0x0F,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, - 0x07,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, - 0x09,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, - 0x09,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, - 0x09,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, - 0x09,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, - 0x09,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, - 0x09,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, - 0x09,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, - 0x09,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, -}; -uint8_t tileset_tile_14_data[258] = { - 16, // tile_width - 16, // tile_height - 0x07,0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x16,0x16,0x16,0x09,0x16,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00, - 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x07,0x00,0x00,0x00,0x00,0x00, - 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x12,0x07,0x07,0x00,0x00,0x00, - 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x07,0x07,0x00,0x00, - 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x0F,0x07,0x00, - 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x07, - 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x09, - 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x09, - 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x09, - 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x09, - 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x09, - 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x09, - 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x09, - 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x09, -}; -uint8_t tileset_tile_15_data[258] = { - 16, // tile_width - 16, // tile_height - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x09,0x00,0x00,0x00,0x00,0x00,0x00, - 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x09,0x00,0x00,0x00,0x00,0x00, - 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x00,0x00,0x00,0x00, - 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x09,0x00,0x00,0x00, - 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x12,0x09,0x00,0x00, - 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x09,0x00, - 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09, -}; -uint8_t tileset_tile_16_data[258] = { - 16, // tile_width - 16, // tile_height - 0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x1F,0x04,0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B, - 0x4B,0x1F,0x4B,0x4B,0x4B,0x4B,0x1F,0x04,0x3B,0x04,0x4B,0x4B,0x4B,0x4B,0x4B,0x1F, - 0x4B,0x4B,0x04,0x04,0x04,0x1F,0x1F,0x3B,0x3B,0x04,0x1F,0x03,0x04,0x03,0x4B,0x4B, - 0x4B,0x1C,0x3B,0x3B,0x3B,0x04,0x04,0x3B,0x4B,0x04,0x03,0x3B,0x3B,0x3B,0x03,0x1F, - 0x4B,0x4B,0x1C,0x3B,0x3B,0x3B,0x04,0x4B,0x4B,0x03,0x1F,0x4B,0x3B,0x03,0x04,0x1F, - 0x4B,0x4B,0x4B,0x1C,0x4B,0x4B,0x4B,0x04,0x1F,0x03,0x1F,0x1F,0x04,0x04,0x1F,0x4B, - 0x4B,0x1C,0x1C,0x1C,0x04,0x04,0x4B,0x04,0x04,0x04,0x1F,0x03,0x03,0x03,0x03,0x4B, - 0x04,0x3B,0x3B,0x3B,0x4B,0x04,0x04,0x4B,0x03,0x1F,0x03,0x1F,0x4B,0x4B,0x4B,0x03, - 0x1F,0x04,0x3B,0x4B,0x4B,0x1F,0x04,0x04,0x03,0x03,0x1F,0x1F,0x1F,0x1F,0x03,0x1F, - 0x4B,0x1F,0x04,0x1F,0x1F,0x1F,0x1F,0x03,0x03,0x04,0x04,0x04,0x03,0x03,0x04,0x04, - 0x4B,0x4B,0x1F,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x1F, - 0x4B,0x1F,0x04,0x4B,0x4B,0x1F,0x03,0x04,0x03,0x03,0x04,0x1F,0x1F,0x03,0x1F,0x4B, - 0x4B,0x04,0x4B,0x4B,0x1F,0x04,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x1F,0x03,0x1F, - 0x1F,0x04,0x03,0x03,0x03,0x03,0x1F,0x1F,0x1F,0x04,0x03,0x03,0x03,0x03,0x03,0x04, - 0x1F,0x1F,0x04,0x04,0x04,0x04,0x03,0x1F,0x04,0x03,0x04,0x04,0x04,0x04,0x04,0x04, - 0x4B,0x4B,0x1F,0x1F,0x04,0x04,0x04,0x03,0x03,0x04,0x04,0x04,0x1F,0x1F,0x4B,0x4B, -}; -uint8_t tileset_tile_17_data[258] = { - 16, // tile_width - 16, // tile_height - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x20,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x39,0x39,0x3E,0x20,0x00, - 0x00,0x00,0x20,0x20,0x20,0x00,0x00,0x00,0x20,0x39,0x39,0x39,0x3E,0x3E,0x3E,0x20, - 0x00,0x20,0x3E,0x3E,0x39,0x20,0x20,0x00,0x20,0x20,0x39,0x39,0x3E,0x3E,0x3E,0x20, - 0x20,0x3E,0x3E,0x39,0x39,0x39,0x20,0x20,0x20,0x20,0x39,0x39,0x39,0x3E,0x39,0x20, - 0x20,0x3E,0x39,0x3E,0x39,0x20,0x20,0x20,0x20,0x39,0x20,0x39,0x39,0x39,0x20,0x00, - 0x00,0x20,0x39,0x39,0x39,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x39,0x39,0x39,0x20, - 0x20,0x39,0x39,0x39,0x20,0x20,0x20,0x20,0x20,0x3F,0x3F,0x20,0x20,0x20,0x20,0x00, - 0x20,0x20,0x20,0x20,0x20,0x3F,0x3F,0x20,0x3F,0x3F,0x20,0x00,0x00,0x00,0x00,0x00, - 0x00,0x20,0x20,0x20,0x20,0x20,0x3F,0x20,0x3F,0x20,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x20,0x20,0x00,0x20,0x45,0x3F,0x20,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x45,0x3F,0x20,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x39,0x20,0x20,0x3F,0x45,0x3F,0x20,0x39,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x39,0x20,0x33,0x45,0x3F,0x45,0x45,0x3F,0x20,0x39,0x00,0x00,0x00, - 0x00,0x00,0x00,0x39,0x20,0x20,0x33,0x45,0x3F,0x45,0x20,0x20,0x39,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x39,0x20,0x20,0x20,0x20,0x20,0x20,0x39,0x00,0x00,0x00,0x00, -}; -uint8_t tileset_tile_18_data[258] = { - 16, // tile_width - 16, // tile_height - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x04,0x04,0x05,0x01,0x01,0x05,0x04,0x04,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x04,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x04,0x00,0x00,0x00, - 0x00,0x00,0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x04,0x00,0x00, - 0x00,0x00,0x04,0x01,0x01,0x05,0x05,0x01,0x01,0x05,0x05,0x01,0x01,0x04,0x00,0x00, - 0x00,0x04,0x01,0x04,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x04,0x01,0x04,0x00, - 0x00,0x01,0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x04,0x01,0x1F, - 0x00,0x03,0x01,0x04,0x01,0x05,0x05,0x01,0x01,0x05,0x05,0x01,0x04,0x01,0x03,0x1C, - 0x00,0x04,0x01,0x04,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x1C, - 0x00,0x03,0x04,0x01,0x01,0x04,0x04,0x01,0x01,0x04,0x04,0x01,0x01,0x04,0x03,0x1C, - 0x00,0x03,0x04,0x04,0x01,0x01,0x01,0x04,0x04,0x01,0x01,0x01,0x04,0x04,0x03,0x1C, - 0x00,0x1F,0x03,0x04,0x04,0x04,0x04,0x01,0x01,0x04,0x04,0x04,0x04,0x03,0x1C,0x1F, - 0x00,0x00,0x1C,0x04,0x03,0x03,0x04,0x04,0x04,0x04,0x03,0x03,0x04,0x1C,0x1F,0x00, - 0x00,0x00,0x00,0x1C,0x1C,0x1C,0x03,0x03,0x03,0x03,0x1C,0x1C,0x1C,0x1C,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x1F,0x1C,0x1C,0x1C,0x1C,0x1C,0x1F,0x00,0x00,0x00,0x00, -}; -uint8_t tileset_tile_19_data[258] = { - 16, // tile_width - 16, // tile_height - 0x00,0x00,0x00,0x00,0x00,0x00,0x2C,0x2C,0x2C,0x33,0x33,0x33,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x33,0x2C,0x36,0x36,0x36,0x2C,0x19,0x2C,0x33,0x2C,0x00,0x00, - 0x00,0x00,0x00,0x2C,0x2C,0x36,0x36,0x36,0x36,0x2C,0x19,0x36,0x36,0x28,0x33,0x00, - 0x00,0x00,0x33,0x2C,0x36,0x36,0x36,0x28,0x2C,0x19,0x36,0x36,0x28,0x28,0x33,0x00, - 0x00,0x19,0x2C,0x36,0x36,0x28,0x36,0x28,0x28,0x28,0x36,0x36,0x28,0x28,0x2C,0x00, - 0x00,0x33,0x36,0x36,0x28,0x28,0x36,0x28,0x28,0x28,0x28,0x28,0x2C,0x2C,0x2C,0x19, - 0x00,0x33,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x2C,0x28,0x28,0x28,0x2C,0x28,0x29, - 0x35,0x33,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x19,0x2C,0x28,0x2C,0x28,0x2C,0x29, - 0x19,0x33,0x28,0x28,0x28,0x2C,0x19,0x28,0x28,0x2C,0x19,0x2C,0x28,0x2C,0x2C,0x29, - 0x29,0x33,0x19,0x28,0x28,0x19,0x28,0x2C,0x2C,0x19,0x29,0x19,0x19,0x29,0x29,0x29, - 0x29,0x33,0x33,0x19,0x19,0x19,0x2C,0x2C,0x19,0x33,0x29,0x33,0x33,0x29,0x29,0x29, - 0x29,0x33,0x33,0x2C,0x33,0x19,0x19,0x19,0x29,0x33,0x29,0x33,0x33,0x29,0x29,0x29, - 0x35,0x29,0x29,0x33,0x29,0x33,0x33,0x29,0x29,0x33,0x29,0x33,0x29,0x29,0x29,0x35, - 0x00,0x35,0x29,0x29,0x29,0x33,0x33,0x29,0x29,0x29,0x33,0x29,0x29,0x29,0x35,0x35, - 0x00,0x00,0x35,0x35,0x29,0x29,0x29,0x29,0x29,0x35,0x29,0x29,0x29,0x35,0x35,0x00, - 0x00,0x00,0x00,0x00,0x35,0x29,0x29,0x29,0x19,0x35,0x35,0x35,0x35,0x00,0x00,0x00, -}; -uint8_t tileset_tile_20_data[258] = { - 16, // tile_width - 16, // tile_height - 0x4B,0x4B,0x4B,0x1F,0x03,0x05,0x05,0x04,0x01,0x04,0x05,0x05,0x05,0x05,0x04,0x05, - 0x4B,0x1F,0x4B,0x1C,0x1C,0x04,0x01,0x05,0x05,0x04,0x05,0x01,0x01,0x05,0x01,0x05, - 0x1F,0x1C,0x1C,0x1C,0x03,0x05,0x05,0x05,0x01,0x01,0x04,0x04,0x04,0x01,0x05,0x05, - 0x1C,0x1C,0x03,0x03,0x03,0x05,0x05,0x01,0x04,0x01,0x05,0x05,0x01,0x04,0x05,0x01, - 0x1C,0x1C,0x03,0x01,0x01,0x03,0x01,0x03,0x05,0x05,0x05,0x05,0x01,0x01,0x04,0x04, - 0x1C,0x1C,0x1C,0x04,0x01,0x03,0x04,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x04,0x01, - 0x1F,0x1C,0x03,0x01,0x04,0x04,0x03,0x05,0x04,0x05,0x05,0x01,0x05,0x05,0x05,0x05, - 0x1F,0x1F,0x04,0x04,0x04,0x01,0x04,0x04,0x05,0x05,0x04,0x05,0x05,0x05,0x01,0x05, - 0x1F,0x1F,0x03,0x04,0x01,0x01,0x01,0x04,0x04,0x04,0x04,0x05,0x05,0x05,0x05,0x05, - 0x1F,0x03,0x03,0x01,0x01,0x01,0x04,0x01,0x01,0x01,0x04,0x04,0x05,0x04,0x05,0x05, - 0x1C,0x04,0x01,0x04,0x01,0x04,0x01,0x01,0x01,0x01,0x04,0x04,0x03,0x01,0x05,0x01, - 0x1C,0x03,0x04,0x03,0x04,0x04,0x01,0x01,0x04,0x01,0x01,0x04,0x04,0x04,0x01,0x01, - 0x1C,0x03,0x04,0x03,0x03,0x04,0x01,0x04,0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x04, - 0x1C,0x1F,0x03,0x01,0x04,0x03,0x04,0x01,0x01,0x01,0x01,0x04,0x01,0x01,0x04,0x01, - 0x1C,0x03,0x01,0x04,0x04,0x03,0x03,0x03,0x03,0x01,0x04,0x04,0x01,0x01,0x04,0x01, - 0x1C,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x04,0x01,0x01,0x04,0x01,0x04, -}; -uint8_t tileset_tile_21_data[258] = { - 16, // tile_width - 16, // tile_height - 0x05,0x04,0x05,0x01,0x05,0x05,0x04,0x01,0x04,0x05,0x05,0x03,0x1F,0x4B,0x4B,0x4B, - 0x05,0x01,0x05,0x05,0x01,0x04,0x01,0x01,0x05,0x01,0x04,0x1C,0x1C,0x4B,0x1F,0x4B, - 0x05,0x05,0x05,0x01,0x04,0x04,0x01,0x01,0x05,0x05,0x05,0x03,0x04,0x04,0x1C,0x1F, - 0x01,0x05,0x04,0x04,0x01,0x01,0x01,0x04,0x01,0x05,0x05,0x03,0x03,0x03,0x1C,0x1C, - 0x04,0x04,0x01,0x01,0x01,0x05,0x01,0x05,0x03,0x01,0x03,0x01,0x01,0x03,0x04,0x1C, - 0x01,0x04,0x01,0x01,0x05,0x01,0x05,0x01,0x05,0x04,0x03,0x01,0x04,0x04,0x04,0x1C, - 0x05,0x05,0x01,0x05,0x01,0x05,0x01,0x05,0x05,0x03,0x04,0x04,0x01,0x03,0x1C,0x1F, - 0x05,0x01,0x05,0x01,0x05,0x04,0x05,0x05,0x04,0x04,0x01,0x04,0x04,0x04,0x1F,0x1F, - 0x05,0x05,0x05,0x05,0x05,0x04,0x04,0x04,0x04,0x01,0x01,0x01,0x04,0x03,0x1F,0x1F, - 0x05,0x05,0x04,0x05,0x04,0x04,0x01,0x01,0x01,0x04,0x01,0x01,0x01,0x03,0x03,0x1F, - 0x01,0x05,0x01,0x03,0x04,0x04,0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x01,0x04,0x1C, - 0x01,0x01,0x04,0x04,0x04,0x01,0x01,0x04,0x01,0x01,0x04,0x04,0x03,0x04,0x03,0x1C, - 0x04,0x04,0x01,0x39,0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x03,0x03,0x04,0x03,0x1C, - 0x01,0x04,0x01,0x01,0x04,0x01,0x01,0x01,0x01,0x04,0x03,0x04,0x01,0x03,0x1C,0x1C, - 0x01,0x04,0x01,0x01,0x04,0x04,0x01,0x03,0x03,0x03,0x03,0x04,0x04,0x01,0x03,0x1C, - 0x04,0x01,0x04,0x01,0x01,0x04,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x1C, -}; -uint8_t tileset_tile_22_data[258] = { - 16, // tile_width - 16, // tile_height - 0x4B,0x4B,0x4B,0x4B,0x03,0x05,0x05,0x04,0x01,0x04,0x05,0x05,0x05,0x05,0x04,0x05, - 0x4B,0x4B,0x4B,0x1F,0x4B,0x04,0x01,0x05,0x05,0x04,0x05,0x01,0x01,0x05,0x01,0x05, - 0x4B,0x4B,0x4B,0x1F,0x03,0x05,0x05,0x05,0x01,0x01,0x04,0x04,0x04,0x01,0x05,0x05, - 0x4B,0x1F,0x03,0x03,0x03,0x05,0x05,0x01,0x04,0x01,0x05,0x05,0x01,0x04,0x05,0x01, - 0x4B,0x4B,0x03,0x01,0x01,0x03,0x01,0x03,0x05,0x05,0x05,0x05,0x01,0x01,0x04,0x04, - 0x4B,0x4B,0x4B,0x04,0x01,0x03,0x04,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x04,0x01, - 0x4B,0x4B,0x03,0x01,0x04,0x04,0x03,0x05,0x04,0x05,0x05,0x01,0x05,0x05,0x05,0x05, - 0x4B,0x4B,0x04,0x04,0x04,0x01,0x04,0x04,0x05,0x05,0x04,0x05,0x05,0x05,0x01,0x05, - 0x4B,0x4B,0x03,0x04,0x01,0x01,0x01,0x04,0x04,0x04,0x04,0x05,0x05,0x05,0x05,0x05, - 0x4B,0x03,0x03,0x01,0x01,0x01,0x04,0x01,0x01,0x01,0x04,0x04,0x05,0x04,0x05,0x05, - 0x4B,0x04,0x01,0x04,0x01,0x04,0x01,0x01,0x01,0x01,0x04,0x04,0x03,0x01,0x05,0x01, - 0x4B,0x03,0x04,0x03,0x04,0x04,0x01,0x01,0x04,0x01,0x01,0x04,0x04,0x04,0x01,0x01, - 0x4B,0x03,0x04,0x03,0x03,0x04,0x01,0x04,0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x04, - 0x4B,0x4B,0x03,0x01,0x04,0x03,0x04,0x01,0x01,0x01,0x01,0x04,0x01,0x01,0x04,0x01, - 0x4B,0x03,0x01,0x04,0x04,0x03,0x03,0x03,0x03,0x01,0x04,0x04,0x01,0x01,0x04,0x01, - 0x4B,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x04,0x01,0x01,0x04,0x01,0x04, -}; -uint8_t tileset_tile_23_data[258] = { - 16, // tile_width - 16, // tile_height - 0x05,0x04,0x05,0x01,0x05,0x05,0x04,0x01,0x04,0x05,0x05,0x03,0x4B,0x4B,0x4B,0x4B, - 0x05,0x01,0x05,0x05,0x01,0x04,0x01,0x01,0x05,0x01,0x04,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x05,0x05,0x05,0x01,0x04,0x04,0x01,0x01,0x05,0x05,0x05,0x03,0x4B,0x3D,0x4B,0x4B, - 0x01,0x05,0x04,0x04,0x01,0x01,0x01,0x04,0x01,0x05,0x05,0x03,0x03,0x03,0x4B,0x4B, - 0x04,0x04,0x01,0x01,0x01,0x05,0x01,0x05,0x03,0x01,0x03,0x01,0x01,0x03,0x4B,0x4B, - 0x01,0x04,0x01,0x01,0x05,0x01,0x05,0x01,0x05,0x04,0x03,0x01,0x04,0x4B,0x4B,0x4B, - 0x05,0x05,0x01,0x05,0x01,0x05,0x01,0x05,0x05,0x03,0x04,0x04,0x01,0x03,0x4B,0x4B, - 0x05,0x01,0x05,0x01,0x05,0x04,0x05,0x05,0x04,0x04,0x01,0x04,0x04,0x04,0x4B,0x4B, - 0x05,0x05,0x05,0x05,0x05,0x04,0x04,0x04,0x04,0x01,0x01,0x01,0x04,0x03,0x4B,0x4B, - 0x05,0x05,0x04,0x05,0x04,0x04,0x01,0x01,0x01,0x04,0x01,0x01,0x01,0x03,0x03,0x4B, - 0x01,0x05,0x01,0x03,0x04,0x04,0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x01,0x04,0x4B, - 0x01,0x01,0x04,0x04,0x04,0x01,0x01,0x04,0x01,0x01,0x04,0x04,0x03,0x04,0x03,0x4B, - 0x04,0x04,0x01,0x04,0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x03,0x03,0x04,0x03,0x4B, - 0x01,0x04,0x01,0x01,0x04,0x01,0x01,0x01,0x01,0x04,0x03,0x04,0x01,0x03,0x4B,0x4B, - 0x01,0x04,0x01,0x01,0x04,0x04,0x01,0x03,0x03,0x03,0x03,0x04,0x04,0x01,0x03,0x4B, - 0x04,0x01,0x04,0x01,0x01,0x04,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x4B, -}; -uint8_t tileset_tile_24_data[258] = { - 16, // tile_width - 16, // tile_height - 0x07,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, - 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14, - 0x07,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, - 0x07,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, - 0x07,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, - 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14, - 0x07,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, - 0x07,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, - 0x07,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, - 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14, - 0x07,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, - 0x07,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, - 0x07,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, - 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14, - 0x07,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, - 0x07,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, -}; -uint8_t tileset_tile_25_data[258] = { - 16, // tile_width - 16, // tile_height - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, - 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14, - 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, - 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14, - 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, - 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14, - 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, - 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14, - 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, -}; -uint8_t tileset_tile_26_data[258] = { - 16, // tile_width - 16, // tile_height - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, - 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14, - 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, - 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14, - 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, - 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14, - 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, - 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14, - 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, -}; -uint8_t tileset_tile_27_data[258] = { - 16, // tile_width - 16, // tile_height - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x19,0x02, - 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x19,0x02, - 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x02, - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x19,0x02, - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x19,0x02, - 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x19,0x02, - 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x02, - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x19,0x02, - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x19,0x02, - 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x19,0x02, - 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x02, - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x19,0x02, - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x19,0x02, - 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x19,0x02, - 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x02, - 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x19,0x02, -}; -uint8_t tileset_tile_28_data[258] = { - 16, // tile_width - 16, // tile_height - 0x02,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, - 0x02,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, - 0x02,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, - 0x02,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, - 0x02,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, - 0x02,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, - 0x02,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, - 0x02,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, - 0x02,0x12,0x12,0x12,0x09,0x12,0x12,0x0F,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x02,0x12,0x12,0x12,0x09,0x12,0x0F,0x0F,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x02,0x12,0x12,0x12,0x09,0x0F,0x0F,0x0F,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x02,0x12,0x12,0x12,0x09,0x0F,0x0F,0x0F,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x02,0x12,0x12,0x0F,0x07,0x07,0x0F,0x0F,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x02,0x12,0x0F,0x0F,0x0F,0x07,0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x02,0x0F,0x0F,0x0F,0x0F,0x0F,0x07,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x02,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, -}; -uint8_t tileset_tile_29_data[258] = { - 16, // tile_width - 16, // tile_height - 0x09,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x07,0x07,0x07,0x07,0x07, - 0x09,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x07,0x07,0x07,0x09,0x09,0x09,0x09,0x09, - 0x09,0x0F,0x0F,0x09,0x12,0x12,0x07,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x09,0x0F,0x0F,0x09,0x12,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x09,0x0F,0x0F,0x07,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x09,0x0F,0x07,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x0A,0x0B, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x0A,0x0B,0x0B,0x0B, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x0B,0x0B,0x0B,0x0B,0x0B, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x0A,0x0B,0x0B,0x0A,0x09,0x09, - 0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x0B,0x0B,0x0A,0x09,0x12,0x0B, - 0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x0A,0x0B,0x0B,0x09,0x12,0x0B,0x0B, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x09,0x09,0x0F,0x0F,0x0F,0x09,0x0B,0x0B,0x0B, -}; -uint8_t tileset_tile_30_data[258] = { - 16, // tile_width - 16, // tile_height - 0x07,0x07,0x07,0x07,0x07,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x09, - 0x09,0x09,0x09,0x09,0x09,0x07,0x07,0x07,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x09, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x07,0x12,0x12,0x09,0x0F,0x0F,0x09, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x12,0x09,0x0F,0x0F,0x09, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x07,0x0F,0x0F,0x09, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x07,0x0F,0x09, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x0B,0x0A,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x0B,0x0B,0x0B,0x0A,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x0B,0x0B,0x0B,0x0B,0x0B,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x09,0x09,0x0A,0x0B,0x0B,0x0A,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x0B,0x12,0x09,0x0A,0x0B,0x0B,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09, - 0x0B,0x0B,0x12,0x09,0x0B,0x0B,0x0A,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09, - 0x0B,0x0B,0x0B,0x09,0x0F,0x0F,0x0F,0x09,0x09,0x07,0x07,0x07,0x07,0x07,0x07,0x07, -}; -uint8_t tileset_tile_31_data[258] = { - 16, // tile_width - 16, // tile_height - 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x02, - 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x02, - 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x02, - 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x02, - 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x02, - 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x02, - 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x02, - 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x02, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x0F,0x12,0x12,0x09,0x12,0x12,0x12,0x02, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x0F,0x0F,0x12,0x09,0x12,0x12,0x12,0x02, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x0F,0x0F,0x0F,0x09,0x12,0x12,0x12,0x02, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x0F,0x0F,0x0F,0x09,0x12,0x12,0x12,0x02, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x0F,0x0F,0x07,0x07,0x0F,0x12,0x12,0x02, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x0F,0x07,0x07,0x0F,0x0F,0x0F,0x12,0x02, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x07,0x0F,0x0F,0x0F,0x0F,0x0F,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x02, -}; -uint8_t tileset_tile_32_data[258] = { - 16, // tile_width - 16, // tile_height - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x0E,0x0E,0x4B,0x4B,0x4B,0x4B,0x0E,0x0E, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, - 0x4B,0x4B,0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, - 0x4B,0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, - 0x4B,0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x15,0x15,0x0E,0x0E,0x0E,0x0E,0x15,0x15, - 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x15,0x15,0x15,0x15,0x08,0x08, - 0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x4B,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x4B,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, -}; -uint8_t tileset_tile_33_data[258] = { - 16, // tile_width - 16, // tile_height - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x0E,0x0E,0x4B,0x4B,0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B,0x4B,0x4B,0x0E,0x0E, - 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, - 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, - 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, - 0x15,0x0E,0x0E,0x15,0x15,0x0E,0x0E,0x15,0x15,0x15,0x0E,0x0E,0x0E,0x0E,0x15,0x15, - 0x08,0x15,0x15,0x08,0x08,0x15,0x15,0x08,0x08,0x08,0x15,0x15,0x15,0x15,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x15,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, -}; -uint8_t tileset_tile_34_data[258] = { - 16, // tile_width - 16, // tile_height - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x0E,0x0E,0x4B,0x4B,0x4B,0x4B,0x0E,0x0E,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B,0x4B,0x4B, - 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B,0x4B, - 0x15,0x0E,0x0E,0x15,0x15,0x0E,0x0E,0x15,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B,0x4B, - 0x08,0x15,0x15,0x08,0x08,0x15,0x15,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B, -}; -uint8_t tileset_tile_35_data[258] = { - 16, // tile_width - 16, // tile_height - 0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x20,0x20,0x26,0x2B,0x2B,0x26,0x2B,0x26,0x20,0x20,0x00,0x00,0x00, - 0x00,0x00,0x20,0x26,0x2B,0x2B,0x2B,0x2B,0x2B,0x26,0x2B,0x26,0x20,0x20,0x00,0x00, - 0x00,0x20,0x26,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x26,0x26,0x26,0x20,0x20,0x00, - 0x00,0x20,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x26,0x2B,0x26,0x20,0x26,0x20,0x00, - 0x20,0x26,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x26,0x26,0x26,0x20,0x20,0x27, - 0x20,0x26,0x26,0x2B,0x2B,0x2B,0x2B,0x26,0x2B,0x26,0x26,0x26,0x26,0x20,0x20,0x27, - 0x20,0x26,0x2B,0x26,0x2B,0x26,0x2B,0x2B,0x26,0x2B,0x26,0x26,0x20,0x26,0x20,0x27, - 0x20,0x26,0x26,0x2B,0x26,0x2B,0x26,0x26,0x2B,0x26,0x26,0x20,0x26,0x20,0x20,0x27, - 0x20,0x20,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x20,0x26,0x20,0x27, - 0x20,0x20,0x26,0x26,0x26,0x20,0x26,0x26,0x20,0x26,0x20,0x26,0x20,0x20,0x20,0x27, - 0x20,0x20,0x20,0x26,0x20,0x26,0x20,0x26,0x26,0x20,0x26,0x20,0x20,0x20,0x27,0x27, - 0x00,0x27,0x20,0x20,0x20,0x20,0x26,0x20,0x20,0x26,0x20,0x20,0x20,0x27,0x27,0x00, - 0x00,0x27,0x27,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x27,0x27,0x27,0x27,0x00, - 0x00,0x00,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x00,0x00, - 0x00,0x00,0x00,0x00,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x00,0x00,0x00,0x00, -}; -uint8_t tileset_tile_36_data[258] = { - 16, // tile_width - 16, // tile_height - 0x1F,0x03,0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x03,0x03,0x01,0x01,0x04,0x01,0x01, - 0x4B,0x4B,0x03,0x03,0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x01, - 0x4B,0x4B,0x4B,0x03,0x04,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x03, - 0x4B,0x4B,0x4B,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x04,0x04, - 0x4B,0x4B,0x4B,0x1C,0x04,0x03,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x04,0x04, - 0x4B,0x4B,0x1C,0x04,0x04,0x04,0x03,0x03,0x04,0x03,0x04,0x04,0x03,0x03,0x04,0x04, - 0x4B,0x1C,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x04,0x03,0x03,0x03,0x04, - 0x4B,0x1C,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x37,0x03,0x03,0x04, - 0x4B,0x1C,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x37,0x3C,0x3C,0x03, - 0x4B,0x1C,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x37,0x3C,0x3C,0x3C, - 0x4B,0x1C,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x37,0x3C,0x3C, - 0x4B,0x1F,0x1C,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x37,0x37, - 0x4B,0x4B,0x1F,0x1C,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03, - 0x4B,0x4B,0x4B,0x1F,0x1C,0x1C,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x1F,0x1C,0x1C,0x1C,0x04,0x04,0x04,0x04,0x04,0x04,0x04, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x1F,0x1F,0x1C,0x1C,0x1C,0x04,0x04,0x04,0x04, -}; -uint8_t tileset_tile_37_data[258] = { - 16, // tile_width - 16, // tile_height - 0x01,0x01,0x04,0x01,0x01,0x03,0x03,0x03,0x04,0x04,0x04,0x03,0x04,0x04,0x03,0x4B, - 0x01,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x03,0x04,0x04,0x03,0x03,0x4B,0x4B, - 0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x04,0x03,0x1F,0x4B,0x4B, - 0x04,0x04,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x4B,0x4B,0x4B, - 0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x04,0x1C,0x4B,0x4B,0x4B, - 0x04,0x04,0x03,0x03,0x04,0x04,0x03,0x04,0x03,0x03,0x04,0x04,0x04,0x1C,0x4B,0x4B, - 0x04,0x03,0x03,0x03,0x04,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x1C,0x4B, - 0x04,0x03,0x03,0x37,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x1C,0x4B, - 0x03,0x3C,0x3C,0x37,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x1C,0x4B, - 0x3C,0x3C,0x3C,0x37,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x1C,0x4B, - 0x3C,0x3C,0x37,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x1C,0x4B, - 0x37,0x37,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x1C,0x1F,0x4B, - 0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x1C,0x1F,0x4B,0x4B, - 0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x1C,0x1C,0x1F,0x4B,0x4B,0x4B, - 0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x1C,0x1C,0x1C,0x1F,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x04,0x04,0x04,0x04,0x1C,0x1C,0x1C,0x1F,0x1F,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, -}; -uint8_t tileset_tile_38_data[258] = { - 16, // tile_width - 16, // tile_height - 0x1F,0x03,0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x03,0x03,0x01,0x01,0x04,0x01,0x01, - 0x4B,0x4B,0x03,0x03,0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x01, - 0x4B,0x4B,0x4B,0x03,0x04,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x03, - 0x4B,0x4B,0x4B,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x04,0x03, - 0x4B,0x4B,0x4B,0x1C,0x04,0x03,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x03,0x05, - 0x4B,0x4B,0x1C,0x04,0x04,0x04,0x03,0x03,0x04,0x03,0x04,0x04,0x03,0x03,0x04,0x05, - 0x4B,0x1C,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x04,0x03,0x03,0x01,0x05, - 0x4B,0x1C,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x05,0x05, - 0x4B,0x1C,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x04,0x04,0x05,0x05,0x01,0x05,0x05, - 0x4B,0x1C,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x04,0x01,0x01,0x05,0x01,0x05,0x05, - 0x4B,0x1C,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x04,0x05,0x05,0x01,0x05,0x05,0x05, - 0x4B,0x4B,0x1C,0x04,0x04,0x04,0x04,0x04,0x01,0x05,0x01,0x01,0x05,0x05,0x05,0x05, - 0x4B,0x4B,0x4B,0x1C,0x04,0x04,0x04,0x01,0x04,0x04,0x01,0x05,0x05,0x05,0x05,0x05, - 0x4B,0x4B,0x4B,0x4B,0x1C,0x03,0x05,0x05,0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05, - 0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x04,0x04,0x01,0x05,0x05,0x01,0x05,0x05,0x05,0x05, - 0x4B,0x4B,0x4B,0x4B,0x03,0x01,0x05,0x05,0x04,0x05,0x04,0x05,0x05,0x05,0x05,0x05, -}; -uint8_t tileset_tile_39_data[258] = { - 16, // tile_width - 16, // tile_height - 0x01,0x01,0x04,0x01,0x01,0x03,0x03,0x03,0x04,0x04,0x04,0x03,0x04,0x04,0x03,0x4B, - 0x01,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x03,0x04,0x04,0x03,0x03,0x4B,0x4B, - 0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x04,0x03,0x1F,0x4B,0x4B, - 0x03,0x04,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x4B,0x4B,0x4B, - 0x05,0x03,0x03,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x04,0x1C,0x4B,0x4B,0x4B, - 0x05,0x04,0x03,0x03,0x04,0x04,0x03,0x04,0x03,0x03,0x04,0x04,0x04,0x1C,0x4B,0x4B, - 0x05,0x01,0x03,0x03,0x04,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x1C,0x4B, - 0x05,0x01,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x1C,0x4B, - 0x05,0x01,0x01,0x05,0x05,0x04,0x04,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x1C,0x4B, - 0x05,0x01,0x01,0x01,0x01,0x01,0x04,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x1C,0x4B, - 0x05,0x01,0x05,0x01,0x01,0x05,0x04,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x1C,0x4B, - 0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x01,0x03,0x04,0x04,0x04,0x04,0x1C,0x4B,0x4B, - 0x05,0x05,0x05,0x05,0x01,0x05,0x04,0x04,0x01,0x03,0x04,0x04,0x1C,0x1F,0x1F,0x4B, - 0x05,0x05,0x05,0x01,0x05,0x01,0x01,0x04,0x05,0x01,0x03,0x1C,0x4B,0x1F,0x1F,0x4B, - 0x05,0x05,0x05,0x05,0x01,0x05,0x05,0x01,0x04,0x04,0x04,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x05,0x05,0x05,0x01,0x05,0x04,0x05,0x04,0x05,0x01,0x01,0x03,0x3B,0x4B,0x4B,0x1F, -}; -uint8_t tileset_tile_40_data[258] = { - 16, // tile_width - 16, // tile_height - 0x07,0x18,0x18,0x18,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x18,0x14,0x14,0x14,0x14, - 0x07,0x07,0x07,0x07,0x18,0x18,0x18,0x18,0x07,0x07,0x07,0x07,0x18,0x18,0x18,0x18, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02, - 0x02,0x02,0x02,0x02,0x07,0x07,0x07,0x02,0x02,0x02,0x02,0x02,0x07,0x07,0x07,0x02, - 0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x00,0x00,0x02,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x00,0x00,0x02,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x00,0x00,0x02,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, - 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, - 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, - 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, - 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, - 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, - 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, - 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, -}; -uint8_t tileset_tile_41_data[258] = { - 16, // tile_width - 16, // tile_height - 0x19,0x18,0x18,0x18,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x18,0x14,0x14,0x14,0x14, - 0x07,0x07,0x07,0x07,0x18,0x18,0x18,0x18,0x07,0x07,0x07,0x07,0x18,0x18,0x18,0x18, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02, - 0x02,0x02,0x02,0x02,0x07,0x07,0x07,0x02,0x02,0x02,0x02,0x02,0x07,0x07,0x07,0x02, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x10,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15, - 0x10,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15, - 0x10,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15, - 0x10,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x02,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x02, - 0x02,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x02, - 0x02,0x32,0x32,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x32,0x32,0x02, -}; -uint8_t tileset_tile_42_data[258] = { - 16, // tile_width - 16, // tile_height - 0x19,0x18,0x18,0x18,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x18,0x14,0x14,0x14,0x14, - 0x07,0x07,0x07,0x07,0x18,0x18,0x18,0x18,0x07,0x07,0x07,0x07,0x18,0x18,0x18,0x18, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02, - 0x02,0x02,0x02,0x02,0x07,0x07,0x07,0x02,0x02,0x02,0x02,0x02,0x07,0x07,0x07,0x02, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15, - 0x4A,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24, - 0x24,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x24, - 0x24,0x02,0x2E,0x2E,0x2E,0x2E,0x2E,0x02,0x02,0x2E,0x2E,0x2E,0x2E,0x2E,0x02,0x24, - 0x24,0x02,0x2E,0x2E,0x2E,0x2E,0x2E,0x02,0x02,0x2E,0x2E,0x2E,0x2E,0x2E,0x02,0x24, - 0x24,0x02,0x2E,0x2E,0x2E,0x2E,0x2E,0x02,0x02,0x2E,0x2E,0x2E,0x2E,0x2E,0x02,0x24, - 0x24,0x02,0x2E,0x34,0x2E,0x34,0x2E,0x02,0x02,0x34,0x2E,0x34,0x2E,0x34,0x02,0x24, - 0x24,0x02,0x34,0x2E,0x34,0x2E,0x34,0x02,0x02,0x2E,0x34,0x2E,0x34,0x2E,0x02,0x24, -}; -uint8_t tileset_tile_43_data[258] = { - 16, // tile_width - 16, // tile_height - 0x19,0x18,0x18,0x18,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x18,0x14,0x14,0x19,0x02, - 0x07,0x07,0x07,0x07,0x18,0x18,0x18,0x18,0x07,0x07,0x07,0x07,0x18,0x18,0x14,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02, - 0x02,0x02,0x02,0x02,0x07,0x07,0x07,0x02,0x02,0x02,0x02,0x02,0x07,0x07,0x07,0x02, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02,0x10,0x10, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02,0x10,0x10, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02,0x10,0x10, - 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, - 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, - 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, - 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, - 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, - 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, - 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, - 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, -}; -uint8_t tileset_tile_44_data[258] = { - 16, // tile_width - 16, // tile_height - 0x02,0x07,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x02,0x02,0x07,0x09,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x02,0x10,0x02,0x07,0x09,0x0F,0x0F,0x0F,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x02,0x17,0x10,0x02,0x07,0x09,0x0F,0x0F,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x02,0x0B,0x17,0x10,0x02,0x07,0x09,0x0F,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x02,0x1B,0x0B,0x17,0x10,0x02,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x02,0x10,0x1B,0x0B,0x17,0x10,0x02,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x02,0x17,0x10,0x1B,0x0B,0x17,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x02,0x17,0x1B,0x10,0x1B,0x0B,0x17,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x02,0x17,0x1B,0x1B,0x10,0x1B,0x0B,0x17,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x02,0x17,0x1B,0x1B,0x1B,0x10,0x1B,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, - 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x10,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, - 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, -}; -uint8_t tileset_tile_45_data[258] = { - 16, // tile_width - 16, // tile_height - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x0A,0x0A,0x0A, - 0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x0A,0x0A,0x0A,0x09,0x12,0x0A,0x0A, - 0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x0A,0x0A,0x0A,0x09,0x12,0x0A, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x0A,0x0A,0x0A,0x0A,0x09,0x09, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x0A,0x0A,0x0A,0x0A, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x09,0x09,0x09,0x0F,0x0A,0x0A, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, - 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, - 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, - 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, -}; -uint8_t tileset_tile_46_data[258] = { - 16, // tile_width - 16, // tile_height - 0x0A,0x0A,0x0A,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x0A,0x0A,0x12,0x09,0x0A,0x0A,0x0A,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09, - 0x0A,0x12,0x09,0x0A,0x0A,0x0A,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09, - 0x09,0x09,0x0A,0x0A,0x0A,0x0A,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x0A,0x0A,0x0A,0x0A,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x0A,0x0A,0x0F,0x09,0x09,0x09,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x0B,0x0B,0x1B,0x1B,0x1B,0x1B,0x1B, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x02,0x10,0x10,0x10,0x10,0x10,0x10,0x10, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x1B,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B, -}; -uint8_t tileset_tile_47_data[258] = { - 16, // tile_width - 16, // tile_height - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x07,0x02, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x09,0x07,0x02,0x02, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x0F,0x0F,0x0F,0x09,0x07,0x02,0x10,0x02, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x0F,0x0F,0x09,0x07,0x02,0x10,0x17,0x02, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x0F,0x09,0x07,0x02,0x10,0x17,0x0B,0x02, - 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x02,0x10,0x17,0x0B,0x1B,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02,0x10,0x17,0x0B,0x1B,0x10,0x02, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x17,0x0B,0x1B,0x10,0x17,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x17,0x0B,0x1B,0x10,0x1B,0x17,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x17,0x0B,0x1B,0x10,0x1B,0x1B,0x17,0x02, - 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x1B,0x10,0x1B,0x1B,0x1B,0x17,0x02, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x17,0x10,0x1B,0x1B,0x1B,0x1B,0x17,0x02, - 0x1B,0x1B,0x1B,0x1B,0x1B,0x0B,0x0B,0x02,0x10,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, - 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x1B,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, - 0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, -}; -uint8_t tileset_tile_48_data[258] = { - 16, // tile_width - 16, // tile_height - 0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08, - 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x3A,0x08, - 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08, - 0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x4B,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x4B,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, -}; -uint8_t tileset_tile_49_data[258] = { - 16, // tile_width - 16, // tile_height - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x3A,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x15,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, -}; -uint8_t tileset_tile_50_data[258] = { - 16, // tile_width - 16, // tile_height - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x4B,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x4B,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B, - 0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, - 0x08,0x15,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B, -}; -uint8_t tileset_tile_51_data[258] = { - 16, // tile_width - 16, // tile_height - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x20,0x20,0x20,0x2B,0x2B,0x20,0x20,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x20,0x20,0x20,0x2B,0x2B,0x2B,0x2B,0x26,0x20,0x00,0x00,0x00,0x00, - 0x00,0x00,0x20,0x26,0x2B,0x20,0x2B,0x2B,0x2B,0x26,0x26,0x20,0x27,0x00,0x00,0x00, - 0x00,0x00,0x20,0x20,0x2B,0x2B,0x26,0x2B,0x26,0x2B,0x20,0x27,0x26,0x27,0x00,0x00, - 0x00,0x20,0x26,0x27,0x26,0x2B,0x2B,0x20,0x20,0x27,0x27,0x20,0x20,0x27,0x00,0x00, - 0x00,0x27,0x20,0x27,0x20,0x26,0x2B,0x26,0x2B,0x26,0x20,0x26,0x26,0x20,0x27,0x00, - 0x00,0x27,0x26,0x2B,0x20,0x20,0x26,0x2B,0x26,0x27,0x26,0x26,0x26,0x27,0x27,0x00, - 0x00,0x27,0x20,0x26,0x2B,0x20,0x2B,0x26,0x20,0x27,0x20,0x26,0x27,0x20,0x27,0x00, - 0x00,0x27,0x20,0x20,0x20,0x27,0x20,0x20,0x26,0x26,0x27,0x20,0x20,0x20,0x27,0x00, - 0x00,0x27,0x20,0x20,0x27,0x27,0x20,0x26,0x20,0x20,0x27,0x27,0x20,0x20,0x27,0x00, - 0x00,0x00,0x27,0x20,0x27,0x27,0x20,0x20,0x20,0x20,0x27,0x27,0x27,0x27,0x00,0x00, - 0x00,0x00,0x00,0x27,0x27,0x27,0x27,0x20,0x20,0x27,0x27,0x27,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x27,0x27,0x27,0x27,0x00,0x00,0x00,0x00,0x00,0x00, -}; -uint8_t tileset_tile_52_data[258] = { - 16, // tile_width - 16, // tile_height - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x29,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x29,0x29,0x29,0x29,0x29,0x36,0x36,0x29,0x29,0x29,0x29,0x29,0x00,0x00, - 0x00,0x33,0x36,0x36,0x36,0x36,0x2C,0x36,0x36,0x2C,0x36,0x36,0x36,0x36,0x29,0x00, - 0x00,0x33,0x36,0x36,0x36,0x36,0x36,0x2C,0x2C,0x36,0x36,0x36,0x36,0x36,0x29,0x00, - 0x00,0x33,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x29,0x00, - 0x00,0x33,0x2C,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x2C,0x29,0x00, - 0x00,0x33,0x2C,0x33,0x28,0x33,0x28,0x28,0x28,0x28,0x33,0x28,0x33,0x2C,0x29,0x00, - 0x00,0x33,0x2C,0x33,0x33,0x28,0x33,0x2C,0x2C,0x33,0x28,0x33,0x33,0x2C,0x29,0x00, - 0x00,0x33,0x2C,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x2C,0x29,0x00, - 0x00,0x33,0x2C,0x28,0x2C,0x2C,0x28,0x2C,0x28,0x2C,0x2C,0x2C,0x28,0x2C,0x29,0x00, - 0x00,0x33,0x2C,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x2C,0x29,0x00, - 0x00,0x00,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x00,0x00, - 0x00,0x00,0x00,0x00,0x35,0x35,0x33,0x2C,0x2C,0x29,0x35,0x35,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x35,0x35,0x35,0x33,0x36,0x2C,0x29,0x35,0x35,0x35,0x00,0x00,0x00, - 0x00,0x00,0x00,0x35,0x35,0x35,0x35,0x29,0x29,0x35,0x35,0x35,0x35,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x00,0x00,0x00,0x00, -}; -uint8_t tileset_tile_53_data[258] = { - 16, // tile_width - 16, // tile_height - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x37,0x37,0x37,0x37,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x37,0x09,0x09,0x09,0x09,0x37,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x37,0x09,0x1B,0x09,0x41,0x41,0x09,0x37,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x37,0x09,0x41,0x09,0x41,0x41,0x41,0x41,0x09,0x37,0x00,0x00,0x00, - 0x00,0x00,0x00,0x37,0x09,0x41,0x41,0x37,0x37,0x41,0x41,0x09,0x37,0x00,0x00,0x00, - 0x00,0x00,0x00,0x42,0x37,0x41,0x37,0x1B,0x35,0x37,0x41,0x37,0x42,0x00,0x00,0x00, - 0x00,0x00,0x00,0x42,0x43,0x37,0x37,0x35,0x35,0x37,0x37,0x43,0x42,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x42,0x43,0x1B,0x37,0x37,0x1B,0x43,0x42,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x42,0x43,0x1B,0x1B,0x43,0x42,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x42,0x42,0x42,0x42,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -}; -uint8_t tileset_tile_54_data[258] = { - 16, // tile_width - 16, // tile_height - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x04,0x04,0x01,0x04,0x04,0x01,0x04,0x04,0x00,0x00,0x00,0x00, - 0x00,0x00,0x04,0x04,0x05,0x05,0x04,0x01,0x01,0x04,0x05,0x05,0x04,0x04,0x00,0x00, - 0x00,0x04,0x05,0x01,0x05,0x01,0x05,0x05,0x05,0x05,0x01,0x05,0x01,0x05,0x04,0x00, - 0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x04, - 0x05,0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x05, - 0x04,0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x04, -}; -uint8_t tileset_tile_55_data[258] = { - 16, // tile_width - 16, // tile_height - 0x00,0x38,0x43,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x43,0x38,0x00, - 0x38,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x38, - 0x38,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x38, - 0x38,0x2F,0x44,0x44,0x48,0x2F,0x2F,0x2F,0x44,0x2F,0x2F,0x2F,0x44,0x2F,0x2F,0x38, - 0x38,0x2F,0x44,0x2F,0x44,0x2F,0x44,0x2F,0x2F,0x2F,0x48,0x2F,0x2F,0x44,0x2F,0x38, - 0x38,0x2F,0x48,0x2F,0x2F,0x2F,0x44,0x48,0x2F,0x2F,0x44,0x2F,0x44,0x48,0x2F,0x38, - 0x38,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x38, - 0x38,0x2F,0x46,0x09,0x09,0x09,0x46,0x09,0x09,0x09,0x46,0x46,0x09,0x46,0x2F,0x38, - 0x38,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x38, - 0x38,0x2F,0x46,0x2F,0x09,0x46,0x2F,0x09,0x09,0x2F,0x46,0x2F,0x46,0x09,0x2F,0x38, - 0x38,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x38, - 0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38, - 0x10,0x38,0x38,0x38,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x38,0x38,0x38,0x10, - 0x10,0x38,0x43,0x38,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x38,0x43,0x38,0x10, - 0x00,0x38,0x43,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x43,0x38,0x00, - 0x00,0x10,0x38,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x38,0x10,0x00, -}; -uint8_t tileset_tile_56_data[258] = { - 16, // tile_width - 16, // tile_height - 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, - 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, - 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, - 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, - 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, - 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, - 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, - 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, - 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, - 0x00,0x00,0x02,0x30,0x15,0x15,0x15,0x07,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, - 0x00,0x00,0x02,0x30,0x21,0x21,0x21,0x07,0x07,0x2A,0x21,0x21,0x21,0x21,0x21,0x07, - 0x00,0x00,0x02,0x30,0x21,0x21,0x21,0x07,0x07,0x15,0x21,0x21,0x21,0x21,0x21,0x07, - 0x00,0x00,0x02,0x30,0x21,0x21,0x21,0x07,0x07,0x15,0x21,0x21,0x21,0x21,0x21,0x07, - 0x00,0x00,0x02,0x30,0x21,0x21,0x21,0x07,0x07,0x15,0x21,0x21,0x21,0x21,0x21,0x07, - 0x00,0x00,0x02,0x30,0x21,0x21,0x21,0x07,0x07,0x15,0x21,0x21,0x21,0x21,0x21,0x07, - 0x00,0x00,0x10,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x10, -}; -uint8_t tileset_tile_57_data[258] = { - 16, // tile_width - 16, // tile_height - 0x02,0x32,0x32,0x07,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x07,0x32,0x32,0x02, - 0x02,0x32,0x32,0x07,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x07,0x32,0x32,0x02, - 0x02,0x32,0x32,0x07,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x07,0x32,0x32,0x02, - 0x02,0x32,0x32,0x07,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x07,0x32,0x32,0x02, - 0x02,0x32,0x32,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x32,0x32,0x02, - 0x02,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x02, - 0x02,0x07,0x07,0x24,0x32,0x24,0x32,0x24,0x32,0x24,0x32,0x24,0x32,0x24,0x32,0x02, - 0x07,0x30,0x15,0x07,0x24,0x32,0x24,0x32,0x24,0x32,0x24,0x32,0x24,0x32,0x24,0x02, - 0x07,0x15,0x15,0x07,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x02, - 0x02,0x07,0x07,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x02, - 0x02,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x02, - 0x02,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x02, - 0x02,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x02, - 0x02,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x02, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -}; -uint8_t tileset_tile_58_data[258] = { - 16, // tile_width - 16, // tile_height - 0x24,0x02,0x2E,0x34,0x2E,0x34,0x2E,0x02,0x02,0x34,0x2E,0x34,0x2E,0x34,0x02,0x24, - 0x24,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x24, - 0x24,0x02,0x34,0x34,0x34,0x34,0x34,0x02,0x02,0x34,0x34,0x34,0x34,0x34,0x02,0x24, - 0x24,0x02,0x34,0x34,0x34,0x34,0x34,0x02,0x02,0x34,0x34,0x34,0x34,0x34,0x02,0x24, - 0x24,0x02,0x34,0x34,0x34,0x34,0x34,0x02,0x02,0x34,0x34,0x34,0x34,0x34,0x02,0x24, - 0x24,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x24, - 0x15,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x15, - 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15, - 0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A, - 0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21, - 0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21, - 0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21, - 0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21, - 0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -}; -uint8_t tileset_tile_59_data[258] = { - 16, // tile_width - 16, // tile_height - 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, - 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, - 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, - 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, - 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, - 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, - 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, - 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, - 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x07,0x02,0x10,0x10, - 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x15,0x15,0x15,0x07,0x02,0x10,0x10, - 0x07,0x2A,0x21,0x21,0x21,0x21,0x21,0x07,0x10,0x21,0x21,0x21,0x07,0x02,0x10,0x10, - 0x07,0x15,0x21,0x21,0x21,0x21,0x21,0x07,0x10,0x21,0x21,0x21,0x07,0x02,0x10,0x10, - 0x07,0x15,0x21,0x21,0x21,0x21,0x21,0x07,0x10,0x21,0x21,0x21,0x07,0x02,0x10,0x10, - 0x07,0x15,0x21,0x21,0x21,0x21,0x21,0x07,0x10,0x21,0x21,0x21,0x07,0x02,0x10,0x10, - 0x07,0x15,0x21,0x21,0x21,0x21,0x21,0x07,0x10,0x21,0x21,0x21,0x07,0x02,0x10,0x10, - 0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10, -}; -uint8_t tileset_tile_60_data[258] = { - 16, // tile_width - 16, // tile_height - 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x02,0x0B,0x17,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x02,0x0B,0x0B,0x17,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x02,0x0B,0x0B,0x0B,0x17,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x02,0x0A,0x0B,0x0B,0x0B,0x17,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x02,0x0A,0x0A,0x0B,0x0B,0x0B,0x17,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x10,0x02,0x0A,0x0A,0x0B,0x0B,0x0B,0x17,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x10,0x10,0x02,0x0A,0x0A,0x0B,0x0B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x00,0x10,0x10,0x02,0x0A,0x0A,0x0B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x00,0x00,0x10,0x10,0x02,0x0A,0x0A,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x00,0x00,0x00,0x10,0x10,0x02,0x0A,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, - 0x00,0x00,0x00,0x00,0x10,0x10,0x02,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, - 0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -}; -uint8_t tileset_tile_61_data[258] = { - 16, // tile_width - 16, // tile_height - 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, - 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, - 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, - 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, - 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, - 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, - 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, - 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, - 0x02,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x02, - 0x02,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x02, - 0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x02, - 0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x02, - 0x02,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x02, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -}; -uint8_t tileset_tile_62_data[258] = { - 16, // tile_width - 16, // tile_height - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x1B,0x16,0x0F,0x0F,0x0F,0x16,0x1B,0x1B, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x1B,0x0F,0x0F,0x1B,0x0F,0x0F,0x1B,0x1B, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x1B,0x0F,0x0F,0x1B,0x0F,0x0F,0x1B,0x1B, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0B,0x09,0x09,0x09,0x09,0x0B,0x0B,0x09, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0B,0x09,0x09,0x0B,0x0B,0x0B,0x0B,0x09, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0B,0x0B,0x09,0x09,0x0B,0x09,0x0B,0x09, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, - 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -}; -uint8_t tileset_tile_63_data[258] = { - 16, // tile_width - 16, // tile_height - 0x1B,0x1B,0x16,0x0F,0x0F,0x0F,0x16,0x1B,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, - 0x1B,0x1B,0x0F,0x0F,0x16,0x1B,0x1B,0x1B,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, - 0x1B,0x1B,0x0F,0x0F,0x1B,0x1B,0x1B,0x1B,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, - 0x09,0x0B,0x09,0x09,0x16,0x0B,0x0B,0x0B,0x17,0x1B,0x1B,0x1B,0x1B,0x17,0x0B,0x02, - 0x09,0x0B,0x16,0x09,0x09,0x09,0x16,0x0B,0x17,0x1B,0x1B,0x1B,0x17,0x0B,0x0B,0x02, - 0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x17,0x1B,0x1B,0x17,0x0B,0x0B,0x0B,0x02, - 0x09,0x0B,0x09,0x0B,0x09,0x09,0x0B,0x0B,0x17,0x1B,0x17,0x0B,0x0B,0x0B,0x0A,0x02, - 0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x17,0x17,0x0B,0x0B,0x0B,0x0A,0x0A,0x02, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x17,0x0B,0x0B,0x0B,0x0A,0x0A,0x02,0x10, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x17,0x0B,0x0B,0x0A,0x0A,0x02,0x10,0x10, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x17,0x0B,0x0A,0x0A,0x02,0x10,0x10,0x00, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x17,0x0A,0x0A,0x02,0x10,0x10,0x00,0x00, - 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x0A,0x02,0x10,0x10,0x00,0x00,0x00, - 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x02,0x10,0x10,0x00,0x00,0x00,0x00, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x00,0x00,0x00,0x00,0x00, - 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x00, -}; -uint8_t tileset_tile_64_data[258] = { - 16, // tile_width - 16, // tile_height - 0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x15,0x15,0x08,0x08,0x15,0x15,0x08, - 0x4B,0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x15,0x0E,0x0E,0x15,0x15,0x0E,0x0E,0x15, - 0x4B,0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, - 0x4B,0x4B,0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x0E,0x0E,0x4B,0x4B,0x4B,0x4B,0x0E,0x0E, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, -}; -uint8_t tileset_tile_65_data[258] = { - 16, // tile_width - 16, // tile_height - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x3A,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x15,0x15,0x15,0x15,0x08,0x08,0x08,0x15,0x15,0x08,0x08,0x15,0x15,0x08, - 0x15,0x15,0x0E,0x0E,0x0E,0x0E,0x15,0x15,0x15,0x0E,0x0E,0x15,0x15,0x0E,0x0E,0x15, - 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, - 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, - 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, - 0x0E,0x0E,0x4B,0x4B,0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B,0x4B,0x4B,0x0E,0x0E, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, -}; -uint8_t tileset_tile_66_data[258] = { - 16, // tile_width - 16, // tile_height - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x4B,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x4B,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B, - 0x08,0x08,0x15,0x15,0x15,0x15,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, - 0x15,0x15,0x0E,0x0E,0x0E,0x0E,0x15,0x15,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B,0x4B, - 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B,0x4B, - 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B,0x4B,0x4B, - 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x0E,0x0E,0x4B,0x4B,0x4B,0x4B,0x0E,0x0E,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, -}; -uint8_t tileset_tile_67_data[258] = { - 16, // tile_width - 16, // tile_height - 0x4B,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08, - 0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x15,0x15,0x15,0x08,0x08,0x08,0x3A,0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x3A,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x15,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, -}; -uint8_t tileset_tile_68_data[258] = { - 16, // tile_width - 16, // tile_height - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x4B, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x15,0x15,0x15, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x15,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, -}; -uint8_t tileset_tile_69_data[258] = { - 16, // tile_width - 16, // tile_height - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x04,0x04,0x04,0x05,0x04, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x04,0x03,0x03,0x05,0x05,0x04,0x05, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x04,0x05,0x01,0x05,0x04,0x05,0x01, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x1F,0x4B,0x04,0x04,0x01,0x01,0x04,0x01,0x04,0x05,0x01, - 0x4B,0x4B,0x1F,0x4B,0x4B,0x1F,0x04,0x05,0x05,0x01,0x05,0x05,0x05,0x01,0x04,0x01, - 0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x01,0x01,0x01, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x04,0x03,0x05,0x05,0x05,0x05,0x05,0x05,0x04,0x04,0x01, - 0x4B,0x4B,0x4B,0x4B,0x04,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x04,0x04, - 0x4B,0x4B,0x1C,0x04,0x03,0x05,0x05,0x05,0x01,0x01,0x05,0x01,0x01,0x01,0x01,0x01, - 0x4B,0x4B,0x1C,0x03,0x01,0x05,0x05,0x01,0x04,0x01,0x05,0x05,0x01,0x05,0x05,0x04, - 0x4B,0x4B,0x04,0x03,0x01,0x01,0x01,0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x05, - 0x4B,0x4B,0x04,0x03,0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05, - 0x4B,0x1F,0x04,0x03,0x01,0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05, - 0x4B,0x1F,0x04,0x04,0x03,0x03,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05, - 0x1F,0x1F,0x04,0x03,0x01,0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05, - 0x1F,0x1C,0x03,0x01,0x04,0x01,0x04,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x05,0x05, -}; -uint8_t tileset_tile_70_data[258] = { - 16, // tile_width - 16, // tile_height - 0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01, - 0x01,0x01,0x05,0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x05,0x01,0x01, - 0x01,0x05,0x05,0x05,0x05,0x01,0x01,0x05,0x05,0x01,0x01,0x05,0x05,0x05,0x05,0x01, - 0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01, - 0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x01, - 0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x01,0x01,0x05,0x05,0x05,0x05,0x01,0x01,0x01, - 0x04,0x01,0x01,0x01,0x01,0x05,0x01,0x01,0x01,0x01,0x05,0x01,0x01,0x01,0x01,0x04, - 0x01,0x04,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x04,0x01, - 0x04,0x04,0x01,0x04,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x04, - 0x01,0x03,0x04,0x04,0x01,0x01,0x04,0x01,0x01,0x04,0x01,0x01,0x04,0x04,0x03,0x01, - 0x04,0x04,0x03,0x03,0x04,0x03,0x04,0x01,0x01,0x04,0x03,0x04,0x03,0x03,0x04,0x04, - 0x05,0x01,0x04,0x04,0x03,0x04,0x03,0x01,0x01,0x03,0x04,0x03,0x04,0x04,0x01,0x05, - 0x05,0x01,0x04,0x04,0x04,0x01,0x01,0x04,0x04,0x01,0x01,0x04,0x04,0x04,0x01,0x05, - 0x05,0x01,0x01,0x01,0x01,0x05,0x05,0x01,0x01,0x05,0x05,0x01,0x01,0x01,0x01,0x05, - 0x05,0x05,0x05,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x05,0x05,0x05, - 0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01, -}; -uint8_t tileset_tile_71_data[258] = { - 16, // tile_width - 16, // tile_height - 0x04,0x05,0x04,0x04,0x04,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x05,0x04,0x05,0x05,0x03,0x03,0x04,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x01,0x05,0x04,0x05,0x01,0x05,0x04,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x01,0x05,0x04,0x01,0x04,0x01,0x01,0x04,0x04,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x01,0x04,0x01,0x05,0x05,0x05,0x01,0x05,0x05,0x04,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x01,0x01,0x01,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x01,0x04,0x04,0x05,0x05,0x05,0x05,0x05,0x05,0x03,0x04,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x04,0x04,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x04,0x4B,0x4B,0x4B,0x4B, - 0x01,0x01,0x01,0x01,0x01,0x05,0x01,0x01,0x05,0x05,0x05,0x03,0x04,0x1C,0x4B,0x4B, - 0x04,0x05,0x05,0x01,0x05,0x05,0x01,0x04,0x01,0x05,0x05,0x01,0x03,0x1C,0x4B,0x4B, - 0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x01,0x01,0x01,0x01,0x03,0x04,0x4B,0x4B, - 0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x01,0x03,0x04,0x4B,0x4B, - 0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x01,0x03,0x04,0x1F,0x4B, - 0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x03,0x03,0x04,0x04,0x1F,0x4B, - 0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x04,0x01,0x03,0x04,0x1F,0x1F, - 0x05,0x05,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x04,0x01,0x04,0x01,0x03,0x1C,0x1F, -}; -uint8_t tileset_tile_72_data[258] = { - 16, // tile_width - 16, // tile_height - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x11,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x00,0x00,0x00,0x00,0x00,0x0C,0x11,0x11,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x00,0x00,0x00,0x00,0x0C,0x11,0x11,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x00,0x00,0x00,0x0C,0x0C,0x11,0x22,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x00,0x00,0x0C,0x11,0x0C,0x22,0x22,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x00,0x0C,0x11,0x11,0x0C,0x22,0x22,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x0C,0x11,0x11,0x22,0x0C,0x22,0x22,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, -}; -uint8_t tileset_tile_73_data[258] = { - 16, // tile_width - 16, // tile_height - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, -}; -uint8_t tileset_tile_74_data[258] = { - 16, // tile_width - 16, // tile_height - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, -}; -uint8_t tileset_tile_75_data[258] = { - 16, // tile_width - 16, // tile_height - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x0C,0x00,0x00,0x00,0x00,0x00,0x00, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x0C,0x00,0x00,0x00,0x00,0x00, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x00,0x00,0x00,0x00, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x0C,0x00,0x00,0x00, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x22,0x0C,0x00,0x00, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x22,0x22,0x0C,0x00, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x0C, -}; -uint8_t tileset_tile_76_data[258] = { - 16, // tile_width - 16, // tile_height - 0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, - 0x02,0x16,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0x02,0x16,0x16,0x12,0x12,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12, - 0x02,0x16,0x16,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09, - 0x02,0x16,0x16,0x12,0x12,0x12,0x12,0x09,0x12,0x12,0x09,0x0F,0x0F,0x0F,0x09,0x12, - 0x02,0x16,0x16,0x0F,0x0F,0x0F,0x0F,0x09,0x0F,0x0F,0x0F,0x09,0x09,0x09,0x0F,0x0F, - 0x02,0x16,0x16,0x12,0x12,0x12,0x12,0x09,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x12, - 0x02,0x16,0x16,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09, - 0x02,0x16,0x16,0x12,0x12,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12, - 0x02,0x16,0x16,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0x02,0x16,0x16,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x02,0x16,0x07,0x0F,0x09,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x0F,0x16,0x16,0x16, - 0x02,0x0F,0x07,0x0F,0x09,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x0F,0x16,0x16,0x16, - 0x02,0x0F,0x07,0x0F,0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x0F,0x12,0x12,0x12, - 0x02,0x0F,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x02,0x0F,0x09,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, -}; -uint8_t tileset_tile_77_data[258] = { - 16, // tile_width - 16, // tile_height - 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, - 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12, - 0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09, - 0x12,0x12,0x09,0x0F,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x0F,0x09,0x12, - 0x0F,0x0F,0x0F,0x09,0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x09,0x0F,0x0F, - 0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x12, - 0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09, - 0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12, - 0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x16,0x16,0x16,0x16,0x0F,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x0F,0x16,0x16,0x16, - 0x16,0x16,0x16,0x16,0x0F,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x0F,0x16,0x16,0x16, - 0x12,0x12,0x12,0x12,0x0F,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x0F,0x12,0x12,0x12, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, -}; -uint8_t tileset_tile_78_data[258] = { - 16, // tile_width - 16, // tile_height - 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, - 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12, - 0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09, - 0x12,0x12,0x09,0x0F,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x0F,0x09,0x12, - 0x0F,0x0F,0x0F,0x09,0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x09,0x0F,0x0F, - 0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x12, - 0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09, - 0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12, - 0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x16,0x16,0x16,0x16,0x0F,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x0F,0x16,0x16,0x16, - 0x16,0x16,0x16,0x16,0x0F,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x0F,0x16,0x16,0x16, - 0x12,0x12,0x12,0x12,0x0F,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x0F,0x12,0x12,0x12, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, -}; -uint8_t tileset_tile_79_data[258] = { - 16, // tile_width - 16, // tile_height - 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x00, - 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x02, - 0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x12,0x09,0x09,0x02, - 0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x02, - 0x12,0x12,0x09,0x0F,0x0F,0x0F,0x09,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x09,0x02, - 0x0F,0x0F,0x0F,0x09,0x09,0x09,0x0F,0x0F,0x0F,0x09,0x0F,0x0F,0x0F,0x09,0x09,0x02, - 0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x09,0x02, - 0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x02, - 0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x12,0x09,0x09,0x02, - 0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x09,0x09,0x02, - 0x16,0x16,0x16,0x16,0x0F,0x16,0x16,0x16,0x16,0x16,0x16,0x09,0x0F,0x07,0x09,0x02, - 0x16,0x16,0x16,0x16,0x0F,0x16,0x16,0x16,0x16,0x16,0x16,0x09,0x0F,0x07,0x07,0x02, - 0x12,0x12,0x12,0x12,0x0F,0x12,0x12,0x12,0x12,0x12,0x12,0x09,0x0F,0x07,0x07,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02, -}; -uint8_t tileset_tile_80_data[258] = { - 16, // tile_width - 16, // tile_height - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x0D,0x4B,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x0D,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0D,0x0D, - 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B, - 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B, - 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0B,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0B,0x0B, - 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D, - 0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, - 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, - 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06, - 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x06,0x06,0x06,0x13,0x06,0x06,0x06,0x06, - 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x06,0x06,0x06,0x13,0x13,0x06,0x06,0x06, - 0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x13,0x06,0x06,0x13,0x06,0x06,0x13,0x06,0x13, - 0x4B,0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x06,0x0D,0x06,0x06,0x06,0x06,0x0D,0x06, - 0x4B,0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, -}; -uint8_t tileset_tile_81_data[258] = { - 16, // tile_width - 16, // tile_height - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D, - 0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0B,0x0B,0x0B,0x0B,0x13, - 0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x13, - 0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x13, - 0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0D,0x0D,0x0D,0x0D,0x13, - 0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x0D,0x0D,0x0D,0x06,0x06,0x06,0x06,0x0D, - 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, - 0x06,0x06,0x0D,0x13,0x13,0x13,0x0D,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, - 0x06,0x06,0x06,0x0D,0x13,0x13,0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06, - 0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x06,0x06,0x06,0x06, - 0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x13,0x06,0x06,0x06, - 0x06,0x06,0x13,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x06,0x06,0x13,0x06,0x13, - 0x06,0x13,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x0D,0x06, - 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, -}; -uint8_t tileset_tile_82_data[258] = { - 16, // tile_width - 16, // tile_height - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x4B,0x0D,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B, - 0x0D,0x0D,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0D,0x4B,0x4B, - 0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, - 0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, - 0x0B,0x0B,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0B,0x0B,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, - 0x0D,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, - 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B, - 0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, - 0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, - 0x06,0x06,0x06,0x13,0x06,0x06,0x06,0x06,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, - 0x06,0x06,0x06,0x13,0x13,0x06,0x06,0x06,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, - 0x06,0x06,0x13,0x06,0x06,0x13,0x06,0x13,0x13,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B, - 0x06,0x0D,0x06,0x06,0x06,0x06,0x0D,0x06,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B,0x4B, - 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B,0x4B, -}; -uint8_t tileset_tile_83_data[258] = { - 16, // tile_width - 16, // tile_height - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x3A,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x15,0x15,0x15,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x4B,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, -}; -uint8_t tileset_tile_84_data[258] = { - 16, // tile_width - 16, // tile_height - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x3A,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x08,0x08, - 0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x15,0x15,0x15, - 0x08,0x15,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E, - 0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E, - 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x4B, -}; -uint8_t tileset_tile_85_data[258] = { - 16, // tile_width - 16, // tile_height - 0x1C,0x1C,0x03,0x01,0x01,0x04,0x04,0x01,0x05,0x05,0x05,0x01,0x01,0x01,0x01,0x04, - 0x1C,0x03,0x01,0x05,0x01,0x04,0x01,0x04,0x01,0x01,0x01,0x05,0x05,0x01,0x01,0x04, - 0x1C,0x03,0x01,0x01,0x05,0x01,0x04,0x04,0x04,0x01,0x01,0x05,0x05,0x01,0x04,0x04, - 0x1C,0x04,0x04,0x05,0x01,0x05,0x01,0x04,0x04,0x04,0x04,0x01,0x01,0x04,0x03,0x04, - 0x1C,0x04,0x01,0x01,0x05,0x01,0x01,0x01,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03, - 0x1C,0x03,0x01,0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x04,0x04,0x03,0x03,0x03,0x03, - 0x1C,0x03,0x04,0x04,0x01,0x01,0x04,0x01,0x01,0x04,0x04,0x03,0x03,0x04,0x03,0x03, - 0x1C,0x04,0x04,0x04,0x04,0x04,0x04,0x01,0x04,0x03,0x04,0x03,0x01,0x04,0x04,0x04, - 0x1F,0x04,0x03,0x04,0x04,0x04,0x04,0x04,0x01,0x03,0x04,0x01,0x01,0x01,0x01,0x04, - 0x1F,0x1F,0x04,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x01,0x01,0x01,0x01,0x01, - 0x4B,0x1F,0x04,0x04,0x03,0x03,0x03,0x04,0x04,0x04,0x01,0x04,0x01,0x01,0x01,0x01, - 0x4B,0x1F,0x1F,0x04,0x04,0x03,0x03,0x03,0x03,0x01,0x04,0x01,0x01,0x01,0x01,0x01, - 0x4B,0x4B,0x1F,0x1C,0x1C,0x04,0x04,0x03,0x03,0x03,0x01,0x01,0x04,0x01,0x04,0x01, - 0x4B,0x4B,0x4B,0x1C,0x1C,0x1C,0x04,0x04,0x03,0x03,0x04,0x03,0x04,0x04,0x04,0x04, - 0x4B,0x4B,0x1F,0x1C,0x1C,0x1C,0x04,0x04,0x04,0x03,0x03,0x04,0x03,0x04,0x03,0x04, - 0x4B,0x1F,0x1F,0x1C,0x1C,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x04,0x04,0x03,0x03, -}; -uint8_t tileset_tile_86_data[258] = { - 16, // tile_width - 16, // tile_height - 0x01,0x05,0x05,0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x05,0x05,0x01, - 0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x05,0x05,0x01,0x01,0x05,0x05,0x05,0x05,0x05, - 0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05, - 0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x04, - 0x04,0x04,0x01,0x01,0x05,0x05,0x05,0x01,0x01,0x05,0x05,0x05,0x01,0x01,0x04,0x04, - 0x04,0x04,0x04,0x04,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x04,0x04,0x04,0x04, - 0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x01,0x01,0x04,0x04,0x04,0x04,0x04,0x03,0x03, - 0x04,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x04, - 0x01,0x03,0x04,0x04,0x04,0x01,0x04,0x04,0x04,0x04,0x01,0x04,0x04,0x04,0x03,0x01, - 0x01,0x01,0x04,0x04,0x01,0x01,0x01,0x04,0x04,0x01,0x01,0x01,0x04,0x04,0x01,0x01, - 0x01,0x01,0x04,0x04,0x04,0x04,0x01,0x04,0x04,0x01,0x04,0x04,0x04,0x04,0x01,0x01, - 0x01,0x01,0x04,0x04,0x05,0x05,0x04,0x01,0x01,0x04,0x05,0x05,0x04,0x04,0x01,0x01, - 0x01,0x04,0x05,0x01,0x05,0x01,0x05,0x05,0x05,0x05,0x01,0x05,0x01,0x05,0x04,0x01, - 0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x04, - 0x05,0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x05, - 0x04,0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x04, -}; -uint8_t tileset_tile_87_data[258] = { - 16, // tile_width - 16, // tile_height - 0x04,0x01,0x01,0x01,0x01,0x05,0x05,0x05,0x01,0x04,0x04,0x01,0x01,0x03,0x1C,0x1C, - 0x04,0x01,0x01,0x05,0x05,0x01,0x01,0x01,0x04,0x01,0x04,0x01,0x05,0x01,0x03,0x1C, - 0x04,0x04,0x01,0x05,0x05,0x01,0x01,0x04,0x04,0x04,0x01,0x05,0x01,0x01,0x03,0x1C, - 0x04,0x03,0x04,0x01,0x01,0x04,0x04,0x04,0x04,0x01,0x05,0x01,0x05,0x04,0x04,0x1C, - 0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x01,0x01,0x01,0x05,0x01,0x01,0x04,0x1C, - 0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x01,0x04,0x01,0x01,0x01,0x01,0x01,0x03,0x1C, - 0x03,0x03,0x04,0x03,0x03,0x04,0x04,0x01,0x01,0x04,0x01,0x01,0x04,0x04,0x03,0x1C, - 0x04,0x04,0x04,0x01,0x03,0x04,0x03,0x04,0x01,0x04,0x04,0x04,0x04,0x04,0x04,0x1C, - 0x04,0x01,0x01,0x01,0x01,0x04,0x03,0x01,0x04,0x04,0x04,0x04,0x04,0x03,0x04,0x1F, - 0x01,0x01,0x01,0x01,0x01,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x04,0x1F,0x1F, - 0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x04,0x04,0x03,0x03,0x03,0x04,0x04,0x1F,0x4B, - 0x01,0x01,0x01,0x01,0x01,0x04,0x01,0x03,0x03,0x03,0x03,0x04,0x04,0x1F,0x1F,0x4B, - 0x01,0x04,0x01,0x04,0x01,0x01,0x03,0x03,0x03,0x04,0x04,0x1C,0x1C,0x1F,0x4B,0x4B, - 0x04,0x04,0x04,0x04,0x03,0x04,0x03,0x03,0x04,0x04,0x1C,0x1C,0x1C,0x4B,0x4B,0x4B, - 0x04,0x03,0x04,0x03,0x04,0x03,0x03,0x04,0x04,0x04,0x1C,0x1C,0x1C,0x1F,0x4B,0x4B, - 0x04,0x04,0x04,0x04,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x1C,0x1C,0x1F,0x1F,0x4B, -}; -uint8_t tileset_tile_88_data[258] = { - 16, // tile_width - 16, // tile_height - 0x02,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x02,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x02,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x02,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x02,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x02,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x02,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x02,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x02,0x22,0x22,0x22,0x0C,0x22,0x22,0x25,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, - 0x02,0x22,0x22,0x22,0x0C,0x22,0x25,0x25,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, - 0x02,0x22,0x22,0x22,0x0C,0x25,0x25,0x25,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, - 0x02,0x22,0x22,0x22,0x0C,0x25,0x25,0x25,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, - 0x02,0x22,0x22,0x25,0x07,0x07,0x25,0x25,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, - 0x02,0x22,0x25,0x25,0x25,0x07,0x07,0x25,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, - 0x02,0x25,0x25,0x25,0x25,0x25,0x07,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, - 0x02,0x0C,0x25,0x25,0x25,0x25,0x25,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, -}; -uint8_t tileset_tile_89_data[258] = { - 16, // tile_width - 16, // tile_height - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, - 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0C,0x0A,0x0B, - 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0A,0x0B,0x0B,0x0B, - 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0B,0x0B,0x0B,0x0B,0x0B, - 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0A,0x0B,0x0B,0x0A,0x0C,0x0C, - 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0B,0x0B,0x0A,0x0C,0x22,0x0B, - 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0A,0x0B,0x0B,0x0C,0x22,0x0B,0x0B, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x0C,0x0C,0x25,0x25,0x25,0x0C,0x0B,0x0B,0x0B, -}; -uint8_t tileset_tile_90_data[258] = { - 16, // tile_width - 16, // tile_height - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, - 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, - 0x0B,0x0A,0x0C,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, - 0x0B,0x0B,0x0B,0x0A,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, - 0x0B,0x0B,0x0B,0x0B,0x0B,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, - 0x0C,0x0C,0x0A,0x0B,0x0B,0x0A,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, - 0x0B,0x22,0x0C,0x0A,0x0B,0x0B,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, - 0x0B,0x0B,0x22,0x0C,0x0B,0x0B,0x0A,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, - 0x0B,0x0B,0x0B,0x0C,0x25,0x25,0x25,0x0C,0x0C,0x07,0x07,0x07,0x07,0x07,0x07,0x07, -}; -uint8_t tileset_tile_91_data[258] = { - 16, // tile_width - 16, // tile_height - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x02, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x02, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x02, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x02, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x02, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x02, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x02, - 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x02, - 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x25,0x22,0x22,0x0C,0x22,0x22,0x22,0x02, - 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x25,0x25,0x22,0x0C,0x22,0x22,0x22,0x02, - 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x25,0x25,0x25,0x0C,0x22,0x22,0x22,0x02, - 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x25,0x25,0x25,0x0C,0x22,0x22,0x22,0x02, - 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x25,0x25,0x07,0x07,0x25,0x22,0x22,0x02, - 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x25,0x07,0x07,0x25,0x25,0x25,0x22,0x02, - 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x07,0x25,0x25,0x25,0x25,0x25,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x25,0x25,0x25,0x25,0x25,0x0C,0x02, -}; -uint8_t tileset_tile_92_data[258] = { - 16, // tile_width - 16, // tile_height - 0x02,0x12,0x12,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x02,0x12,0x12,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x02,0x12,0x12,0x0F,0x0F,0x0F,0x0F,0x0F,0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x0F, - 0x02,0x12,0x12,0x07,0x07,0x07,0x07,0x07,0x09,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07, - 0x02,0x12,0x12,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x09, - 0x02,0x12,0x12,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x0F,0x07,0x07,0x07,0x0F,0x09, - 0x02,0x12,0x12,0x0F,0x0F,0x0F,0x0F,0x07,0x09,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F, - 0x02,0x12,0x12,0x07,0x07,0x07,0x07,0x07,0x0F,0x07,0x09,0x09,0x09,0x09,0x09,0x07, - 0x02,0x12,0x12,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x02,0x12,0x12,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x02,0x12,0x12,0x0F,0x0F,0x0F,0x0F,0x0F,0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x0F, - 0x02,0x12,0x12,0x07,0x07,0x07,0x07,0x07,0x09,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07, - 0x02,0x12,0x12,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x09, - 0x02,0x12,0x12,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x0F,0x07,0x07,0x07,0x0F,0x09, - 0x02,0x12,0x12,0x0F,0x0F,0x0F,0x0F,0x07,0x09,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F, - 0x02,0x12,0x12,0x07,0x07,0x07,0x07,0x07,0x0F,0x07,0x09,0x09,0x09,0x09,0x09,0x07, -}; -uint8_t tileset_tile_93_data[258] = { - 16, // tile_width - 16, // tile_height - 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x0F,0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x0F, - 0x09,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07,0x09,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07, - 0x09,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x09, - 0x09,0x09,0x0F,0x07,0x07,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07,0x07,0x07,0x0F,0x09, - 0x09,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F,0x09,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F, - 0x0F,0x07,0x09,0x09,0x09,0x09,0x09,0x07,0x0F,0x07,0x09,0x09,0x09,0x09,0x09,0x07, - 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x0F,0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x0F, - 0x09,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07,0x09,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07, - 0x09,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x09, - 0x09,0x09,0x0F,0x07,0x07,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07,0x07,0x07,0x0F,0x09, - 0x09,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F,0x09,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F, - 0x0F,0x07,0x09,0x09,0x09,0x09,0x09,0x07,0x0F,0x07,0x09,0x09,0x09,0x09,0x09,0x07, -}; -uint8_t tileset_tile_94_data[258] = { - 16, // tile_width - 16, // tile_height - 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x0F,0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x0F, - 0x09,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07,0x09,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07, - 0x09,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x09, - 0x09,0x09,0x0F,0x07,0x07,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07,0x07,0x07,0x0F,0x09, - 0x09,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F,0x09,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F, - 0x0F,0x07,0x09,0x09,0x09,0x09,0x09,0x07,0x0F,0x07,0x09,0x09,0x09,0x09,0x09,0x07, - 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x0F,0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x0F, - 0x09,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07,0x09,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07, - 0x09,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x09, - 0x09,0x09,0x0F,0x07,0x07,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07,0x07,0x07,0x0F,0x09, - 0x09,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F,0x09,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F, - 0x0F,0x07,0x09,0x09,0x09,0x09,0x09,0x07,0x0F,0x07,0x09,0x09,0x09,0x09,0x09,0x07, -}; -uint8_t tileset_tile_95_data[258] = { - 16, // tile_width - 16, // tile_height - 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x07,0x07,0x02, - 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x07,0x07,0x02, - 0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x0F,0x07,0x0F,0x0F,0x0F,0x0F,0x07,0x07,0x02, - 0x09,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07,0x09,0x07,0x07,0x07,0x07,0x07,0x07,0x02, - 0x09,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x09,0x09,0x07,0x09,0x09,0x09,0x07,0x07,0x02, - 0x09,0x09,0x0F,0x07,0x07,0x07,0x0F,0x09,0x09,0x07,0x09,0x09,0x09,0x07,0x07,0x02, - 0x09,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x07,0x02, - 0x0F,0x07,0x09,0x09,0x09,0x09,0x09,0x07,0x0F,0x07,0x07,0x07,0x07,0x07,0x07,0x02, - 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x07,0x07,0x02, - 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x07,0x07,0x02, - 0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x0F,0x07,0x0F,0x0F,0x0F,0x0F,0x07,0x07,0x02, - 0x09,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07,0x09,0x07,0x07,0x07,0x07,0x07,0x07,0x02, - 0x09,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x09,0x09,0x07,0x09,0x09,0x09,0x07,0x07,0x02, - 0x09,0x09,0x0F,0x07,0x07,0x07,0x0F,0x09,0x09,0x07,0x09,0x09,0x09,0x07,0x07,0x02, - 0x09,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x07,0x02, - 0x0F,0x07,0x09,0x09,0x09,0x09,0x09,0x07,0x0F,0x07,0x07,0x07,0x07,0x07,0x07,0x02, -}; -uint8_t tileset_tile_96_data[258] = { - 16, // tile_width - 16, // tile_height - 0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, - 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, - 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06, - 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06, - 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x13,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06, - 0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x13,0x13,0x13,0x13,0x06,0x06,0x13,0x06,0x06, - 0x4B,0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x0D,0x06,0x06,0x06,0x06,0x13,0x06, - 0x4B,0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, - 0x4B,0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, - 0x4B,0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, - 0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06, - 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x06,0x06,0x06,0x06,0x13,0x06,0x06,0x06,0x06, - 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x06,0x06,0x06,0x06,0x13,0x13,0x06,0x06,0x06, - 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x06,0x06,0x06,0x13,0x06,0x06,0x13,0x06,0x13, - 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x0D,0x06, - 0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x0D,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, -}; -uint8_t tileset_tile_97_data[258] = { - 16, // tile_width - 16, // tile_height - 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, - 0x06,0x13,0x06,0x06,0x06,0x06,0x0D,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, - 0x06,0x06,0x0D,0x06,0x06,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06, - 0x06,0x06,0x06,0x13,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06, - 0x06,0x06,0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06, - 0x06,0x06,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x06,0x06,0x13,0x06,0x06, - 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x13,0x06, - 0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, - 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, - 0x06,0x06,0x0D,0x13,0x13,0x13,0x0D,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, - 0x06,0x06,0x06,0x0D,0x13,0x13,0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06, - 0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x06,0x06,0x06,0x06, - 0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x13,0x06,0x06,0x06, - 0x06,0x06,0x13,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x06,0x06,0x13,0x06,0x13, - 0x06,0x13,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x0D,0x06, - 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, -}; -uint8_t tileset_tile_98_data[258] = { - 16, // tile_width - 16, // tile_height - 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x13,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B, - 0x06,0x13,0x06,0x06,0x06,0x06,0x0D,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, - 0x06,0x06,0x0D,0x06,0x06,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, - 0x06,0x06,0x06,0x13,0x0D,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, - 0x06,0x06,0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, - 0x06,0x06,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B, - 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B,0x4B, - 0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B,0x4B, - 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B,0x4B, - 0x06,0x06,0x0D,0x13,0x13,0x13,0x0D,0x06,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B,0x4B, - 0x06,0x06,0x06,0x0D,0x13,0x13,0x06,0x06,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B, - 0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, - 0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, - 0x06,0x06,0x13,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, - 0x06,0x13,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, - 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x0D,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B, -}; -uint8_t tileset_tile_99_data[258] = { - 16, // tile_width - 16, // tile_height - 0x4B,0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, - 0x4B,0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, - 0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0B,0x0D,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06, - 0x0D,0x0D,0x0D,0x0B,0x0B,0x0B,0x0D,0x0D,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06, - 0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x13,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06, - 0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x13,0x13,0x13,0x06,0x06,0x13,0x06,0x06, - 0x0B,0x0B,0x0D,0x0B,0x0B,0x0D,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x13,0x06, - 0x0D,0x0D,0x0D,0x0D,0x0D,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, - 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, - 0x06,0x06,0x0D,0x13,0x13,0x13,0x0D,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, - 0x06,0x06,0x06,0x0D,0x13,0x13,0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06, - 0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x06,0x06,0x06,0x06, - 0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x13,0x06,0x06,0x06, - 0x06,0x06,0x13,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x06,0x06,0x13,0x06,0x13, - 0x06,0x13,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x0D,0x06, - 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, -}; -uint8_t tileset_tile_100_data[258] = { - 16, // tile_width - 16, // tile_height - 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B,0x4B, - 0x06,0x13,0x06,0x06,0x06,0x06,0x0D,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B,0x4B, - 0x06,0x06,0x0D,0x06,0x06,0x13,0x13,0x13,0x0D,0x0B,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B, - 0x06,0x06,0x06,0x13,0x0D,0x13,0x13,0x13,0x0D,0x0D,0x0B,0x0B,0x0B,0x0D,0x0D,0x0D, - 0x06,0x06,0x06,0x0D,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B, - 0x06,0x06,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B, - 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0D,0x0B,0x0B, - 0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x13,0x13,0x0D,0x0D,0x0D,0x0D,0x0D, - 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, - 0x06,0x06,0x0D,0x13,0x13,0x13,0x0D,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, - 0x06,0x06,0x06,0x0D,0x13,0x13,0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06, - 0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x06,0x06,0x06,0x06, - 0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x13,0x06,0x06,0x06, - 0x06,0x06,0x13,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x06,0x06,0x13,0x06,0x13, - 0x06,0x13,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x0D,0x06, - 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, -}; -uint8_t tileset_tile_101_data[258] = { - 16, // tile_width - 16, // tile_height - 0x1F,0x1F,0x1C,0x1C,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x05,0x04, - 0x1F,0x1C,0x1C,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x05,0x05,0x04,0x05, - 0x1F,0x1C,0x1C,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x05,0x01,0x05,0x04,0x05,0x01, - 0x1F,0x1C,0x1C,0x04,0x03,0x03,0x03,0x03,0x03,0x01,0x01,0x04,0x01,0x04,0x05,0x01, - 0x1F,0x1C,0x1C,0x04,0x03,0x03,0x03,0x05,0x05,0x01,0x05,0x05,0x05,0x01,0x04,0x01, - 0x1F,0x1F,0x1C,0x04,0x03,0x03,0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x01,0x01,0x01, - 0x4B,0x1F,0x1C,0x1C,0x04,0x03,0x03,0x05,0x05,0x05,0x05,0x05,0x05,0x04,0x04,0x01, - 0x4B,0x1F,0x1C,0x04,0x04,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x04,0x04, - 0x4B,0x4B,0x1C,0x04,0x03,0x05,0x05,0x05,0x01,0x01,0x05,0x01,0x01,0x01,0x01,0x01, - 0x4B,0x4B,0x1C,0x03,0x01,0x05,0x05,0x01,0x04,0x01,0x05,0x05,0x01,0x05,0x05,0x04, - 0x4B,0x4B,0x04,0x03,0x01,0x01,0x01,0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x05, - 0x4B,0x4B,0x04,0x03,0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05, - 0x4B,0x1F,0x04,0x03,0x01,0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05, - 0x4B,0x1F,0x04,0x04,0x03,0x03,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05, - 0x1F,0x1F,0x04,0x03,0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05, - 0x1F,0x1C,0x03,0x01,0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x05,0x05, -}; -uint8_t tileset_tile_102_data[258] = { - 16, // tile_width - 16, // tile_height - 0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01, - 0x01,0x01,0x05,0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x05,0x01,0x01, - 0x01,0x05,0x05,0x05,0x05,0x01,0x01,0x05,0x05,0x01,0x01,0x05,0x05,0x05,0x05,0x01, - 0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01, - 0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x01, - 0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x01,0x01,0x05,0x05,0x05,0x05,0x01,0x01,0x01, - 0x04,0x01,0x01,0x01,0x01,0x05,0x01,0x01,0x01,0x01,0x05,0x01,0x01,0x01,0x01,0x04, - 0x01,0x04,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x04,0x01, - 0x04,0x04,0x01,0x04,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x04, - 0x01,0x03,0x04,0x04,0x01,0x01,0x04,0x01,0x01,0x04,0x01,0x01,0x04,0x04,0x03,0x01, - 0x04,0x04,0x03,0x03,0x04,0x03,0x04,0x01,0x01,0x04,0x03,0x04,0x03,0x03,0x04,0x04, - 0x05,0x01,0x04,0x04,0x03,0x04,0x03,0x01,0x01,0x03,0x04,0x03,0x04,0x04,0x01,0x05, - 0x05,0x01,0x04,0x04,0x04,0x01,0x01,0x04,0x04,0x01,0x01,0x04,0x04,0x04,0x01,0x05, - 0x05,0x01,0x01,0x01,0x01,0x05,0x05,0x01,0x01,0x05,0x05,0x01,0x01,0x01,0x01,0x05, - 0x05,0x05,0x05,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x05,0x05,0x05, - 0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01, -}; -uint8_t tileset_tile_103_data[258] = { - 16, // tile_width - 16, // tile_height - 0x04,0x05,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x1C,0x1C,0x1F,0x1F, - 0x05,0x04,0x05,0x05,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x1C,0x1C,0x1F, - 0x01,0x05,0x04,0x05,0x01,0x05,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x1C,0x1C,0x1F, - 0x01,0x05,0x04,0x01,0x04,0x01,0x01,0x03,0x03,0x03,0x03,0x03,0x04,0x1C,0x1C,0x1F, - 0x01,0x04,0x01,0x05,0x05,0x05,0x01,0x05,0x05,0x03,0x03,0x03,0x04,0x1C,0x1C,0x1F, - 0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x01,0x01,0x01,0x03,0x03,0x04,0x1C,0x1F,0x1F, - 0x01,0x04,0x04,0x05,0x05,0x05,0x05,0x05,0x05,0x03,0x03,0x04,0x1C,0x1C,0x1F,0x4B, - 0x04,0x04,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x04,0x04,0x1C,0x1F,0x4B, - 0x01,0x01,0x01,0x01,0x01,0x05,0x01,0x01,0x05,0x05,0x05,0x03,0x04,0x1C,0x4B,0x4B, - 0x04,0x05,0x05,0x01,0x05,0x05,0x01,0x04,0x01,0x05,0x05,0x01,0x03,0x1C,0x4B,0x4B, - 0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x01,0x01,0x01,0x01,0x03,0x04,0x4B,0x4B, - 0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x01,0x03,0x04,0x4B,0x4B, - 0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x01,0x03,0x04,0x1F,0x4B, - 0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x03,0x03,0x04,0x04,0x1F,0x4B, - 0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x01,0x03,0x04,0x1F,0x1F, - 0x05,0x05,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x01,0x03,0x1C,0x1F, -}; -uint8_t tileset_tile_104_data[258] = { - 16, // tile_width - 16, // tile_height - 0x02,0x07,0x0C,0x25,0x25,0x25,0x25,0x25,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x02,0x02,0x07,0x0C,0x25,0x25,0x25,0x25,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, - 0x02,0x10,0x02,0x07,0x0C,0x25,0x25,0x25,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, - 0x02,0x17,0x10,0x02,0x07,0x0C,0x25,0x25,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, - 0x02,0x0B,0x17,0x10,0x02,0x07,0x0C,0x25,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, - 0x02,0x1B,0x0B,0x17,0x10,0x02,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, - 0x02,0x10,0x1B,0x0B,0x17,0x10,0x02,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x02,0x17,0x10,0x1B,0x0B,0x17,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x02,0x17,0x1B,0x10,0x1B,0x0B,0x17,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x02,0x17,0x1B,0x1B,0x10,0x1B,0x0B,0x17,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x02,0x17,0x1B,0x1B,0x1B,0x10,0x1B,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, - 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x10,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, - 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, -}; -uint8_t tileset_tile_105_data[258] = { - 16, // tile_width - 16, // tile_height - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0A,0x0A,0x0A, - 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0A,0x0A,0x0A,0x0C,0x22,0x0A,0x0A, - 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0A,0x0A,0x0A,0x0C,0x22,0x0A, - 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0A,0x0A,0x0A,0x0A,0x0C,0x0C, - 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0A,0x0A,0x0A,0x0A, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x0C,0x0C,0x0C,0x25,0x0A,0x0A, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, - 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, - 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, - 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, -}; -uint8_t tileset_tile_106_data[258] = { - 16, // tile_width - 16, // tile_height - 0x0A,0x0A,0x0A,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x0A,0x0A,0x22,0x0C,0x0A,0x0A,0x0A,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, - 0x0A,0x22,0x0C,0x0A,0x0A,0x0A,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, - 0x0C,0x0C,0x0A,0x0A,0x0A,0x0A,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, - 0x0A,0x0A,0x0A,0x0A,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, - 0x0A,0x0A,0x25,0x0C,0x0C,0x0C,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x0B,0x0B,0x1B,0x1B,0x1B,0x1B,0x1B, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x02,0x10,0x10,0x10,0x10,0x10,0x10,0x10, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x1B,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B, -}; -uint8_t tileset_tile_107_data[258] = { - 16, // tile_width - 16, // tile_height - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x25,0x25,0x25,0x25,0x25,0x0C,0x07,0x02, - 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x25,0x25,0x25,0x25,0x0C,0x07,0x02,0x02, - 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x25,0x25,0x25,0x0C,0x07,0x02,0x10,0x02, - 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x25,0x25,0x0C,0x07,0x02,0x10,0x17,0x02, - 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x25,0x0C,0x07,0x02,0x10,0x17,0x0B,0x02, - 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x02,0x10,0x17,0x0B,0x1B,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02,0x10,0x17,0x0B,0x1B,0x10,0x02, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x17,0x0B,0x1B,0x10,0x17,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x17,0x0B,0x1B,0x10,0x1B,0x17,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x17,0x0B,0x1B,0x10,0x1B,0x1B,0x17,0x02, - 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x1B,0x10,0x1B,0x1B,0x1B,0x17,0x02, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x17,0x10,0x1B,0x1B,0x1B,0x1B,0x17,0x02, - 0x1B,0x1B,0x1B,0x1B,0x1B,0x0B,0x0B,0x02,0x10,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, - 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x1B,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, - 0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, -}; -uint8_t tileset_tile_108_data[258] = { - 16, // tile_width - 16, // tile_height - 0x02,0x12,0x12,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x02,0x12,0x12,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x02,0x12,0x12,0x0F,0x0F,0x0F,0x0F,0x0F,0x07,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0x02,0x12,0x0F,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x02,0x0F,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x00,0x00,0x02,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x00,0x00,0x02,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x00,0x00,0x02,0x31,0x2D,0x2D,0x2D,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, - 0x00,0x00,0x02,0x31,0x1E,0x1E,0x1E,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, - 0x00,0x00,0x02,0x31,0x2D,0x2D,0x2D,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, - 0x00,0x00,0x02,0x31,0x1E,0x1E,0x1E,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, - 0x00,0x00,0x02,0x31,0x2D,0x2D,0x2D,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, - 0x00,0x00,0x02,0x31,0x1E,0x1E,0x1E,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, - 0x00,0x00,0x02,0x31,0x2D,0x2D,0x2D,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, - 0x00,0x00,0x02,0x31,0x1E,0x1E,0x1E,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, -}; -uint8_t tileset_tile_109_data[258] = { - 16, // tile_width - 16, // tile_height - 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x07,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x07,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x07,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, - 0x07,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, - 0x07,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x02,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x02, - 0x02,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x02, - 0x02,0x0F,0x0F,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x0F,0x0F,0x02, -}; -uint8_t tileset_tile_110_data[258] = { - 16, // tile_width - 16, // tile_height - 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, - 0x07,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x07,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, - 0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E, - 0x1E,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1E, - 0x1D,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x1D, - 0x1D,0x02,0x0B,0x0B,0x0B,0x0B,0x0B,0x02,0x02,0x0B,0x0B,0x0B,0x0B,0x0B,0x02,0x1D, - 0x1D,0x02,0x0B,0x0B,0x0B,0x0B,0x0B,0x02,0x02,0x0B,0x0B,0x0B,0x0B,0x0B,0x02,0x1D, - 0x1D,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x1D, - 0x1D,0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x02,0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x02,0x1D, - 0x1D,0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x02,0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x02,0x1D, -}; -uint8_t tileset_tile_111_data[258] = { - 16, // tile_width - 16, // tile_height - 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x07,0x07,0x02, - 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x07,0x07,0x02, - 0x07,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x07,0x0F,0x0F,0x0F,0x0F,0x07,0x07,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02,0x10,0x00, - 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02,0x10,0x00, - 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x2D,0x2D,0x2D,0x10,0x02,0x10,0x00, - 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x1E,0x1E,0x1E,0x10,0x02,0x10,0x00, - 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x2D,0x2D,0x2D,0x10,0x02,0x10,0x00, - 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x1E,0x1E,0x1E,0x10,0x02,0x10,0x00, - 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x2D,0x2D,0x2D,0x10,0x02,0x10,0x00, - 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x1E,0x1E,0x1E,0x10,0x02,0x10,0x00, - 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x2D,0x2D,0x2D,0x10,0x02,0x10,0x00, - 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x1E,0x1E,0x1E,0x10,0x02,0x10,0x00, -}; -uint8_t tileset_tile_112_data[258] = { - 16, // tile_width - 16, // tile_height - 0x4B,0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, - 0x4B,0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, - 0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06, - 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06, - 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x13,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06, - 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x13,0x13,0x13,0x06,0x06,0x13,0x06,0x06, - 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x13,0x06, - 0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, - 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D, - 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0B,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0B,0x0B, - 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B, - 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B, - 0x4B,0x4B,0x0D,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0D,0x0D, - 0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x0D,0x4B,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, -}; -uint8_t tileset_tile_113_data[258] = { - 16, // tile_width - 16, // tile_height - 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, - 0x06,0x13,0x06,0x06,0x06,0x06,0x0D,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, - 0x06,0x06,0x0D,0x06,0x06,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06, - 0x06,0x06,0x06,0x13,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06, - 0x06,0x06,0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06, - 0x06,0x06,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x06,0x06,0x13,0x06,0x06, - 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x13,0x06, - 0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, - 0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x0D,0x0D,0x0D,0x06,0x06,0x06,0x06,0x0D, - 0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0D,0x0D,0x0D,0x0D,0x13, - 0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x13, - 0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x13, - 0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0B,0x0B,0x0B,0x0B,0x13, - 0x4B,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, -}; -uint8_t tileset_tile_114_data[258] = { - 16, // tile_width - 16, // tile_height - 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B,0x4B, - 0x06,0x13,0x06,0x06,0x06,0x06,0x0D,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B,0x4B, - 0x06,0x06,0x0D,0x06,0x06,0x13,0x13,0x13,0x13,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B, - 0x06,0x06,0x06,0x13,0x0D,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, - 0x06,0x06,0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, - 0x06,0x06,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, - 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, - 0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B, - 0x0D,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, - 0x0B,0x0B,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0B,0x0B,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, - 0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, - 0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, - 0x0D,0x0D,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0D,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x4B,0x0D,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, - 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, -}; -uint8_t tileset_tile_115_data[258] = { - 16, // tile_width - 16, // tile_height - 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, - 0x06,0x13,0x06,0x06,0x06,0x06,0x0D,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, - 0x06,0x06,0x0D,0x06,0x06,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06, - 0x06,0x06,0x06,0x13,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06, - 0x06,0x06,0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06, - 0x06,0x06,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x06,0x06,0x13,0x06,0x06, - 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x13,0x06, - 0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, - 0x0D,0x0D,0x0D,0x0D,0x0D,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, - 0x0B,0x0B,0x0D,0x0B,0x0B,0x0D,0x13,0x13,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, - 0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06, - 0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x06,0x06,0x06,0x13,0x06,0x06,0x06,0x06, - 0x0D,0x0D,0x0D,0x0B,0x0B,0x0B,0x0D,0x0D,0x06,0x06,0x06,0x13,0x13,0x06,0x06,0x06, - 0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0B,0x0D,0x06,0x06,0x13,0x06,0x06,0x13,0x06,0x13, - 0x4B,0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x06,0x0D,0x06,0x06,0x06,0x06,0x0D,0x06, - 0x4B,0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, -}; -uint8_t tileset_tile_116_data[258] = { - 16, // tile_width - 16, // tile_height - 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, - 0x06,0x13,0x06,0x06,0x06,0x06,0x0D,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, - 0x06,0x06,0x0D,0x06,0x06,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06, - 0x06,0x06,0x06,0x13,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06, - 0x06,0x06,0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06, - 0x06,0x06,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x06,0x06,0x13,0x06,0x06, - 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x13,0x06, - 0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, - 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x13,0x13,0x0D,0x0D,0x0D,0x0D,0x0D, - 0x06,0x06,0x0D,0x13,0x13,0x13,0x0D,0x06,0x13,0x13,0x0D,0x0B,0x0B,0x0D,0x0B,0x0B, - 0x06,0x06,0x06,0x0D,0x13,0x13,0x06,0x06,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B, - 0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B, - 0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x0D,0x0D,0x0B,0x0B,0x0B,0x0D,0x0D,0x0D, - 0x06,0x06,0x13,0x06,0x06,0x06,0x06,0x06,0x0D,0x0B,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B, - 0x06,0x13,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B,0x4B, - 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B,0x4B, -}; -uint8_t tileset_tile_117_data[258] = { - 16, // tile_width - 16, // tile_height - 0x47,0x47,0x03,0x01,0x01,0x04,0x04,0x01,0x05,0x05,0x05,0x01,0x01,0x01,0x01,0x04, - 0x47,0x03,0x01,0x05,0x01,0x04,0x49,0x04,0x01,0x01,0x01,0x05,0x05,0x01,0x01,0x04, - 0x1C,0x03,0x01,0x01,0x05,0x01,0x04,0x04,0x04,0x01,0x01,0x05,0x05,0x01,0x04,0x04, - 0x1C,0x04,0x04,0x05,0x01,0x05,0x01,0x04,0x04,0x04,0x04,0x01,0x01,0x04,0x03,0x04, - 0x1C,0x04,0x01,0x01,0x05,0x01,0x01,0x01,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03, - 0x1C,0x03,0x01,0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x04,0x04,0x03,0x03,0x03,0x03, - 0x1C,0x03,0x04,0x04,0x01,0x01,0x04,0x01,0x01,0x04,0x04,0x03,0x03,0x04,0x03,0x03, - 0x1C,0x04,0x04,0x04,0x04,0x04,0x04,0x01,0x04,0x03,0x04,0x03,0x01,0x04,0x04,0x04, - 0x1F,0x04,0x03,0x04,0x04,0x04,0x04,0x04,0x01,0x03,0x04,0x01,0x01,0x01,0x01,0x04, - 0x1F,0x1F,0x04,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x01,0x01,0x01,0x01,0x01, - 0x4B,0x1F,0x04,0x04,0x03,0x03,0x03,0x04,0x04,0x04,0x01,0x04,0x01,0x01,0x01,0x01, - 0x4B,0x1F,0x1F,0x04,0x04,0x03,0x03,0x03,0x03,0x01,0x04,0x01,0x01,0x01,0x01,0x01, - 0x4B,0x4B,0x1F,0x1C,0x1C,0x1C,0x1C,0x03,0x03,0x03,0x01,0x01,0x04,0x01,0x04,0x01, - 0x4B,0x4B,0x4B,0x1C,0x1C,0x1C,0x1C,0x1C,0x03,0x03,0x04,0x03,0x04,0x04,0x04,0x04, - 0x4B,0x4B,0x1F,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x03,0x03,0x04,0x03,0x04,0x03,0x04, - 0x4B,0x1F,0x1F,0x1C,0x1C,0x1C,0x1C,0x1C,0x04,0x04,0x03,0x03,0x04,0x04,0x03,0x03, -}; -uint8_t tileset_tile_118_data[258] = { - 16, // tile_width - 16, // tile_height - 0x01,0x05,0x05,0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x05,0x05,0x01, - 0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x05,0x05,0x01,0x01,0x05,0x05,0x05,0x05,0x05, - 0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05, - 0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x04, - 0x04,0x04,0x01,0x01,0x05,0x05,0x05,0x01,0x01,0x05,0x05,0x05,0x01,0x01,0x04,0x04, - 0x04,0x04,0x04,0x04,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x04,0x04,0x04,0x04, - 0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x01,0x01,0x04,0x04,0x04,0x04,0x04,0x03,0x03, - 0x04,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x04, - 0x01,0x03,0x04,0x04,0x04,0x01,0x04,0x04,0x04,0x04,0x01,0x04,0x04,0x04,0x03,0x01, - 0x01,0x01,0x04,0x04,0x01,0x01,0x01,0x04,0x04,0x01,0x01,0x01,0x04,0x04,0x01,0x01, - 0x01,0x01,0x04,0x04,0x01,0x01,0x04,0x04,0x04,0x04,0x01,0x01,0x04,0x04,0x01,0x01, - 0x01,0x01,0x04,0x04,0x03,0x01,0x04,0x04,0x04,0x04,0x01,0x03,0x04,0x04,0x01,0x01, - 0x01,0x04,0x04,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x04,0x04,0x01, - 0x04,0x04,0x03,0x04,0x03,0x03,0x04,0x03,0x03,0x04,0x03,0x03,0x04,0x03,0x04,0x04, - 0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04, - 0x03,0x03,0x03,0x03,0x37,0x37,0x37,0x03,0x03,0x37,0x37,0x37,0x03,0x03,0x03,0x03, -}; -uint8_t tileset_tile_119_data[258] = { - 16, // tile_width - 16, // tile_height - 0x04,0x01,0x01,0x01,0x01,0x05,0x05,0x05,0x01,0x04,0x04,0x01,0x01,0x03,0x47,0x47, - 0x04,0x01,0x01,0x05,0x05,0x01,0x01,0x01,0x04,0x01,0x04,0x01,0x05,0x01,0x03,0x47, - 0x04,0x04,0x01,0x05,0x05,0x01,0x01,0x04,0x04,0x04,0x01,0x05,0x01,0x01,0x03,0x1C, - 0x04,0x03,0x04,0x01,0x01,0x04,0x04,0x04,0x04,0x01,0x05,0x01,0x05,0x04,0x04,0x1C, - 0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x01,0x01,0x01,0x05,0x01,0x01,0x04,0x1C, - 0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x01,0x04,0x01,0x01,0x01,0x01,0x01,0x03,0x1C, - 0x03,0x03,0x04,0x03,0x03,0x04,0x04,0x01,0x01,0x04,0x01,0x01,0x04,0x04,0x03,0x1C, - 0x04,0x04,0x04,0x01,0x03,0x04,0x03,0x04,0x01,0x04,0x04,0x04,0x04,0x04,0x04,0x1C, - 0x04,0x01,0x01,0x01,0x01,0x04,0x03,0x01,0x04,0x04,0x04,0x04,0x04,0x03,0x04,0x1F, - 0x01,0x01,0x01,0x01,0x01,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x04,0x1F,0x1F, - 0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x04,0x04,0x03,0x03,0x03,0x04,0x04,0x1F,0x4B, - 0x01,0x01,0x01,0x01,0x01,0x04,0x01,0x03,0x03,0x03,0x03,0x04,0x04,0x1F,0x1F,0x4B, - 0x01,0x04,0x01,0x04,0x01,0x01,0x03,0x03,0x03,0x1C,0x1C,0x1C,0x1C,0x1F,0x4B,0x4B, - 0x04,0x04,0x04,0x04,0x03,0x04,0x03,0x03,0x1C,0x1C,0x1C,0x1C,0x1C,0x4B,0x4B,0x4B, - 0x04,0x03,0x04,0x03,0x04,0x03,0x03,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1F,0x4B,0x4B, - 0x04,0x04,0x04,0x04,0x03,0x03,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1F,0x1F,0x4B, -}; -uint8_t tileset_tile_120_data[258] = { - 16, // tile_width - 16, // tile_height - 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x02,0x0B,0x17,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x02,0x0B,0x0B,0x17,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x02,0x0B,0x0B,0x0B,0x17,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x02,0x0A,0x0B,0x0B,0x0B,0x17,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x02,0x0A,0x0A,0x0B,0x0B,0x0B,0x17,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x10,0x02,0x0A,0x0A,0x0B,0x0B,0x0B,0x17,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x10,0x10,0x02,0x0A,0x0A,0x0B,0x0B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x00,0x10,0x10,0x02,0x0A,0x0A,0x0B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x00,0x00,0x10,0x10,0x02,0x0A,0x0A,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x00,0x00,0x00,0x10,0x10,0x02,0x0A,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, - 0x00,0x00,0x00,0x00,0x10,0x10,0x02,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, - 0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -}; -uint8_t tileset_tile_121_data[258] = { - 16, // tile_width - 16, // tile_height - 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, - 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, - 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, - 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, - 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, - 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, - 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, - 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, - 0x02,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x02, - 0x02,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x02, - 0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x02, - 0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x02, - 0x02,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x02, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -}; -uint8_t tileset_tile_122_data[258] = { - 16, // tile_width - 16, // tile_height - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x1B,0x16,0x0F,0x1B,0x0F,0x1B,0x0F,0x1B, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x1B,0x0F,0x1B,0x1B,0x0F,0x1B,0x0F,0x1B, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x1B,0x0F,0x0F,0x1B,0x0F,0x0F,0x0F,0x1B, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0B,0x0B,0x09,0x0B,0x09,0x0B,0x09,0x0B, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0B,0x09,0x16,0x0B,0x09,0x0B,0x09,0x0B, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0B,0x0B,0x09,0x09,0x0B,0x09,0x0B,0x09, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, - 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, - 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -}; -uint8_t tileset_tile_123_data[258] = { - 16, // tile_width - 16, // tile_height - 0x16,0x0F,0x0F,0x1B,0x16,0x0F,0x0F,0x1B,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, - 0x0F,0x1B,0x0F,0x1B,0x0F,0x1B,0x0F,0x1B,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, - 0x0F,0x1B,0x0F,0x1B,0x0F,0x1B,0x0F,0x1B,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, - 0x09,0x0B,0x09,0x0B,0x09,0x09,0x16,0x0B,0x17,0x1B,0x1B,0x1B,0x1B,0x17,0x0B,0x02, - 0x09,0x09,0x16,0x0B,0x09,0x0B,0x0B,0x0B,0x17,0x1B,0x1B,0x1B,0x17,0x0B,0x0B,0x02, - 0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x17,0x1B,0x1B,0x17,0x0B,0x0B,0x0B,0x02, - 0x09,0x0B,0x09,0x0B,0x09,0x09,0x0B,0x0B,0x17,0x1B,0x17,0x0B,0x0B,0x0B,0x0A,0x02, - 0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x17,0x17,0x0B,0x0B,0x0B,0x0A,0x0A,0x02, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x17,0x0B,0x0B,0x0B,0x0A,0x0A,0x02,0x10, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x17,0x0B,0x0B,0x0A,0x0A,0x02,0x10,0x10, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x17,0x0B,0x0A,0x0A,0x02,0x10,0x10,0x00, - 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x17,0x0A,0x0A,0x02,0x10,0x10,0x00,0x00, - 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x0A,0x02,0x10,0x10,0x00,0x00,0x00, - 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x02,0x10,0x10,0x00,0x00,0x00,0x00, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x00,0x00,0x00,0x00,0x00, - 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x00, -}; -uint8_t tileset_tile_124_data[258] = { - 16, // tile_width - 16, // tile_height - 0x00,0x00,0x02,0x31,0x2D,0x2D,0x2D,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, - 0x00,0x00,0x02,0x31,0x1E,0x1E,0x1E,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, - 0x00,0x00,0x02,0x31,0x2D,0x2D,0x2D,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, - 0x00,0x00,0x02,0x31,0x1E,0x1E,0x1E,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, - 0x00,0x00,0x02,0x31,0x2D,0x2D,0x2D,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, - 0x00,0x00,0x02,0x31,0x1E,0x1E,0x1E,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, - 0x00,0x00,0x02,0x31,0x2D,0x2D,0x2D,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, - 0x00,0x00,0x02,0x31,0x1E,0x1E,0x1E,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, - 0x00,0x00,0x02,0x31,0x2D,0x2D,0x2D,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, - 0x00,0x00,0x02,0x31,0x1E,0x1E,0x1E,0x07,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, - 0x00,0x00,0x02,0x31,0x1D,0x1D,0x1D,0x07,0x07,0x2D,0x1D,0x1D,0x1D,0x1D,0x1D,0x07, - 0x00,0x00,0x02,0x31,0x1D,0x1D,0x1D,0x07,0x07,0x1E,0x1D,0x1D,0x1D,0x1D,0x1D,0x07, - 0x00,0x00,0x02,0x31,0x1D,0x1D,0x1D,0x07,0x07,0x1E,0x1D,0x1D,0x1D,0x1D,0x1D,0x07, - 0x00,0x00,0x02,0x31,0x1D,0x1D,0x1D,0x07,0x07,0x1E,0x1D,0x1D,0x1D,0x1D,0x1D,0x07, - 0x00,0x00,0x02,0x31,0x1D,0x1D,0x1D,0x07,0x07,0x1E,0x1D,0x1D,0x1D,0x1D,0x1D,0x07, - 0x00,0x00,0x10,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x10, -}; -uint8_t tileset_tile_125_data[258] = { - 16, // tile_width - 16, // tile_height - 0x02,0x0F,0x0F,0x07,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x07,0x0F,0x0F,0x02, - 0x02,0x0F,0x0F,0x07,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x07,0x0F,0x0F,0x02, - 0x02,0x0F,0x0F,0x07,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x07,0x0F,0x0F,0x02, - 0x02,0x0F,0x0F,0x07,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x07,0x0F,0x0F,0x02, - 0x02,0x0F,0x0F,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x0F,0x0F,0x02, - 0x02,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x02, - 0x02,0x07,0x07,0x09,0x0F,0x09,0x0F,0x09,0x0F,0x09,0x0F,0x09,0x0F,0x09,0x0F,0x02, - 0x07,0x1B,0x0A,0x07,0x09,0x0F,0x09,0x0F,0x09,0x0F,0x09,0x0F,0x09,0x0F,0x09,0x02, - 0x07,0x0A,0x0A,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x02, - 0x02,0x07,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x02, - 0x02,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x02, - 0x02,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x02, - 0x02,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x02, - 0x02,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x02, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -}; -uint8_t tileset_tile_126_data[258] = { - 16, // tile_width - 16, // tile_height - 0x1D,0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x02,0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x02,0x1D, - 0x1D,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x1D, - 0x1D,0x02,0x17,0x17,0x17,0x17,0x17,0x02,0x02,0x17,0x17,0x17,0x17,0x17,0x02,0x1D, - 0x1D,0x02,0x17,0x17,0x17,0x17,0x17,0x02,0x02,0x17,0x17,0x17,0x17,0x17,0x02,0x1D, - 0x1D,0x02,0x17,0x17,0x17,0x17,0x17,0x02,0x02,0x17,0x17,0x17,0x17,0x17,0x02,0x1D, - 0x1D,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x1D, - 0x1E,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1E, - 0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E, - 0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D, - 0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D, - 0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D, - 0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D, - 0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D, - 0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D, - 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, - 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -}; -uint8_t tileset_tile_127_data[258] = { - 16, // tile_width - 16, // tile_height - 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x2D,0x2D,0x2D,0x10,0x02,0x10,0x00, - 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x1E,0x1E,0x1E,0x10,0x02,0x10,0x00, - 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x2D,0x2D,0x2D,0x10,0x02,0x10,0x00, - 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x1E,0x1E,0x1E,0x10,0x02,0x10,0x00, - 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x2D,0x2D,0x2D,0x10,0x02,0x10,0x00, - 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x1E,0x1E,0x1E,0x10,0x02,0x10,0x00, - 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x2D,0x2D,0x2D,0x10,0x02,0x10,0x00, - 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x1E,0x1E,0x1E,0x10,0x02,0x10,0x00, - 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x2D,0x2D,0x2D,0x07,0x02,0x10,0x00, - 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x1E,0x1E,0x1E,0x07,0x02,0x10,0x00, - 0x07,0x2D,0x1D,0x1D,0x1D,0x1D,0x1D,0x07,0x10,0x1D,0x1D,0x1D,0x07,0x02,0x10,0x00, - 0x07,0x1E,0x1D,0x1D,0x1D,0x1D,0x1D,0x07,0x10,0x1D,0x1D,0x1D,0x07,0x02,0x10,0x00, - 0x07,0x1E,0x1D,0x1D,0x1D,0x1D,0x1D,0x07,0x10,0x1D,0x1D,0x1D,0x07,0x02,0x10,0x00, - 0x07,0x1E,0x1D,0x1D,0x1D,0x1D,0x1D,0x07,0x10,0x1D,0x1D,0x1D,0x07,0x02,0x10,0x00, - 0x07,0x1E,0x1D,0x1D,0x1D,0x1D,0x1D,0x07,0x10,0x1D,0x1D,0x1D,0x07,0x02,0x10,0x00, - 0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x00, -}; -uint8_t *tileset_tiles_data[128] = { - tileset_tile_0_data, - tileset_tile_1_data, - tileset_tile_2_data, - tileset_tile_3_data, - tileset_tile_4_data, - tileset_tile_5_data, - tileset_tile_6_data, - tileset_tile_7_data, - tileset_tile_8_data, - tileset_tile_9_data, - tileset_tile_10_data, - tileset_tile_11_data, - tileset_tile_12_data, - tileset_tile_13_data, - tileset_tile_14_data, - tileset_tile_15_data, - tileset_tile_16_data, - tileset_tile_17_data, - tileset_tile_18_data, - tileset_tile_19_data, - tileset_tile_20_data, - tileset_tile_21_data, - tileset_tile_22_data, - tileset_tile_23_data, - tileset_tile_24_data, - tileset_tile_25_data, - tileset_tile_26_data, - tileset_tile_27_data, - tileset_tile_28_data, - tileset_tile_29_data, - tileset_tile_30_data, - tileset_tile_31_data, - tileset_tile_32_data, - tileset_tile_33_data, - tileset_tile_34_data, - tileset_tile_35_data, - tileset_tile_36_data, - tileset_tile_37_data, - tileset_tile_38_data, - tileset_tile_39_data, - tileset_tile_40_data, - tileset_tile_41_data, - tileset_tile_42_data, - tileset_tile_43_data, - tileset_tile_44_data, - tileset_tile_45_data, - tileset_tile_46_data, - tileset_tile_47_data, - tileset_tile_48_data, - tileset_tile_49_data, - tileset_tile_50_data, - tileset_tile_51_data, - tileset_tile_52_data, - tileset_tile_53_data, - tileset_tile_54_data, - tileset_tile_55_data, - tileset_tile_56_data, - tileset_tile_57_data, - tileset_tile_58_data, - tileset_tile_59_data, - tileset_tile_60_data, - tileset_tile_61_data, - tileset_tile_62_data, - tileset_tile_63_data, - tileset_tile_64_data, - tileset_tile_65_data, - tileset_tile_66_data, - tileset_tile_67_data, - tileset_tile_68_data, - tileset_tile_69_data, - tileset_tile_70_data, - tileset_tile_71_data, - tileset_tile_72_data, - tileset_tile_73_data, - tileset_tile_74_data, - tileset_tile_75_data, - tileset_tile_76_data, - tileset_tile_77_data, - tileset_tile_78_data, - tileset_tile_79_data, - tileset_tile_80_data, - tileset_tile_81_data, - tileset_tile_82_data, - tileset_tile_83_data, - tileset_tile_84_data, - tileset_tile_85_data, - tileset_tile_86_data, - tileset_tile_87_data, - tileset_tile_88_data, - tileset_tile_89_data, - tileset_tile_90_data, - tileset_tile_91_data, - tileset_tile_92_data, - tileset_tile_93_data, - tileset_tile_94_data, - tileset_tile_95_data, - tileset_tile_96_data, - tileset_tile_97_data, - tileset_tile_98_data, - tileset_tile_99_data, - tileset_tile_100_data, - tileset_tile_101_data, - tileset_tile_102_data, - tileset_tile_103_data, - tileset_tile_104_data, - tileset_tile_105_data, - tileset_tile_106_data, - tileset_tile_107_data, - tileset_tile_108_data, - tileset_tile_109_data, - tileset_tile_110_data, - tileset_tile_111_data, - tileset_tile_112_data, - tileset_tile_113_data, - tileset_tile_114_data, - tileset_tile_115_data, - tileset_tile_116_data, - tileset_tile_117_data, - tileset_tile_118_data, - tileset_tile_119_data, - tileset_tile_120_data, - tileset_tile_121_data, - tileset_tile_122_data, - tileset_tile_123_data, - tileset_tile_124_data, - tileset_tile_125_data, - tileset_tile_126_data, - tileset_tile_127_data, -}; +// convpng +#include +#include "tiles_gfx.h" + +uint8_t tileset_tile_0_data[258] = { + 16, // tile_width + 16, // tile_height + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x3D,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x3D,0x4B,0x4B,0x3D,0x4B,0x4B,0x3D,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x3D,0x4B,0x4B,0x4B,0x3D,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, +}; +uint8_t tileset_tile_1_data[258] = { + 16, // tile_width + 16, // tile_height + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x1F,0x4B,0x4B,0x1F,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x1F,0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x3D,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x3D,0x4B,0x4B,0x3D,0x4B,0x4B,0x3D, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x3D,0x4B,0x4B,0x4B,0x3D,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x1F,0x4B,0x4B,0x1F, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x1F,0x4B, +}; +uint8_t tileset_tile_2_data[258] = { + 16, // tile_width + 16, // tile_height + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x1F,0x4B,0x4B,0x1F,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x3B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x3B,0x4B,0x4B,0x3B,0x4B,0x4B,0x3B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x3B,0x4B,0x4B,0x4B,0x3B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, +}; +uint8_t tileset_tile_3_data[258] = { + 16, // tile_width + 16, // tile_height + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x1F,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, +}; +uint8_t tileset_tile_4_data[258] = { + 16, // tile_width + 16, // tile_height + 0x4B,0x03,0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x03,0x03,0x01,0x01,0x04,0x01,0x01, + 0x4B,0x1C,0x03,0x03,0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x01, + 0x4B,0x1F,0x1C,0x03,0x04,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x03, + 0x4B,0x1F,0x1F,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x04,0x03, + 0x4B,0x4B,0x1F,0x1C,0x04,0x03,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x03,0x05, + 0x4B,0x1F,0x1C,0x04,0x04,0x04,0x03,0x03,0x04,0x03,0x04,0x04,0x03,0x03,0x04,0x05, + 0x1F,0x1C,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x04,0x03,0x03,0x01,0x05, + 0x1C,0x1C,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x05,0x05, + 0x1C,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x04,0x04,0x05,0x05,0x01,0x05,0x05, + 0x1C,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x04,0x01,0x01,0x05,0x01,0x05,0x05, + 0x1C,0x1C,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x04,0x05,0x05,0x01,0x05,0x05,0x05, + 0x1C,0x1C,0x1C,0x04,0x04,0x04,0x04,0x04,0x01,0x05,0x01,0x01,0x05,0x05,0x05,0x05, + 0x1F,0x1F,0x1C,0x1C,0x04,0x04,0x04,0x01,0x04,0x04,0x01,0x05,0x05,0x05,0x05,0x05, + 0x4B,0x4B,0x1F,0x1C,0x1C,0x03,0x05,0x05,0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05, + 0x4B,0x4B,0x4B,0x1F,0x1C,0x04,0x04,0x04,0x01,0x05,0x05,0x01,0x05,0x05,0x05,0x05, + 0x4B,0x4B,0x4B,0x1F,0x03,0x01,0x05,0x05,0x04,0x05,0x04,0x05,0x05,0x05,0x05,0x05, +}; +uint8_t tileset_tile_5_data[258] = { + 16, // tile_width + 16, // tile_height + 0x01,0x01,0x04,0x01,0x01,0x03,0x03,0x03,0x04,0x04,0x04,0x03,0x04,0x04,0x03,0x4B, + 0x01,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x03,0x04,0x04,0x03,0x03,0x1C,0x4B, + 0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x04,0x03,0x1C,0x1F,0x4B, + 0x03,0x04,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x1F,0x1F,0x4B, + 0x05,0x03,0x03,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x04,0x1C,0x1F,0x4B,0x4B, + 0x05,0x04,0x03,0x03,0x04,0x04,0x03,0x04,0x03,0x03,0x04,0x04,0x04,0x1C,0x1F,0x4B, + 0x05,0x01,0x03,0x03,0x04,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x1C,0x1F, + 0x05,0x01,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x1C,0x1C, + 0x05,0x01,0x01,0x05,0x05,0x04,0x04,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x1C, + 0x05,0x01,0x01,0x01,0x01,0x01,0x04,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x1C, + 0x05,0x01,0x05,0x01,0x01,0x05,0x04,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x1C,0x1C, + 0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x01,0x04,0x04,0x04,0x04,0x04,0x1C,0x1C,0x1C, + 0x05,0x05,0x05,0x05,0x01,0x05,0x04,0x04,0x01,0x04,0x04,0x04,0x1C,0x1C,0x1F,0x1F, + 0x05,0x05,0x05,0x01,0x05,0x01,0x01,0x04,0x05,0x05,0x03,0x1C,0x1C,0x1F,0x4B,0x4B, + 0x05,0x05,0x05,0x05,0x01,0x05,0x05,0x01,0x04,0x04,0x04,0x1C,0x1F,0x4B,0x4B,0x4B, + 0x05,0x05,0x05,0x01,0x05,0x04,0x05,0x04,0x05,0x05,0x01,0x03,0x1F,0x4B,0x4B,0x4B, +}; +uint8_t tileset_tile_6_data[258] = { + 16, // tile_width + 16, // tile_height + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x05, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x05, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x01,0x05, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04,0x05,0x05, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x05,0x05,0x01,0x05,0x05, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x01,0x01,0x05,0x01,0x05,0x05, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x05,0x05,0x01,0x05,0x05,0x05, + 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x01,0x05,0x01,0x01,0x05,0x05,0x05,0x05, + 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x01,0x04,0x04,0x01,0x05,0x05,0x05,0x05,0x05, + 0x00,0x00,0x00,0x00,0x00,0x03,0x05,0x05,0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05, + 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x01,0x05,0x05,0x01,0x05,0x05,0x05,0x05, + 0x00,0x00,0x00,0x00,0x03,0x01,0x05,0x05,0x04,0x05,0x04,0x05,0x05,0x05,0x05,0x05, +}; +uint8_t tileset_tile_7_data[258] = { + 16, // tile_width + 16, // tile_height + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x05,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x05,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x05,0x01,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x05,0x01,0x04,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x05,0x01,0x01,0x05,0x05,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x05,0x01,0x01,0x01,0x01,0x01,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x05,0x01,0x05,0x01,0x01,0x05,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x01,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00, + 0x05,0x05,0x05,0x05,0x01,0x05,0x04,0x04,0x01,0x04,0x00,0x00,0x00,0x00,0x00,0x00, + 0x05,0x05,0x05,0x01,0x05,0x01,0x01,0x04,0x05,0x05,0x03,0x00,0x00,0x00,0x00,0x00, + 0x05,0x05,0x05,0x05,0x01,0x05,0x05,0x01,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00, + 0x05,0x05,0x05,0x01,0x05,0x04,0x05,0x04,0x05,0x05,0x01,0x03,0x00,0x00,0x00,0x00, +}; +uint8_t tileset_tile_8_data[258] = { + 16, // tile_width + 16, // tile_height + 0x00,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x00, + 0x07,0x19,0x19,0x19,0x07,0x07,0x07,0x07,0x19,0x19,0x19,0x19,0x07,0x07,0x07,0x07, + 0x07,0x23,0x23,0x18,0x19,0x19,0x19,0x19,0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19, + 0x07,0x23,0x23,0x18,0x18,0x18,0x18,0x18,0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18, + 0x07,0x19,0x19,0x19,0x23,0x23,0x23,0x23,0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x23, + 0x07,0x23,0x23,0x18,0x19,0x19,0x19,0x19,0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19, + 0x07,0x23,0x23,0x18,0x18,0x18,0x18,0x18,0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18, + 0x07,0x19,0x19,0x19,0x23,0x23,0x23,0x23,0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x23, + 0x07,0x23,0x23,0x18,0x19,0x19,0x19,0x19,0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19, + 0x07,0x23,0x23,0x18,0x18,0x18,0x18,0x18,0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18, + 0x07,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19, + 0x07,0x14,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x07,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, + 0x07,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, +}; +uint8_t tileset_tile_9_data[258] = { + 16, // tile_width + 16, // tile_height + 0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x00, + 0x19,0x19,0x19,0x19,0x07,0x07,0x07,0x07,0x19,0x19,0x19,0x19,0x07,0x07,0x07,0x07, + 0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19,0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19, + 0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18,0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18, + 0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x23,0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x23, + 0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19,0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19, + 0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18,0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18, + 0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x23,0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x23, + 0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19,0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19, + 0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18,0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18, + 0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19, + 0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, +}; +uint8_t tileset_tile_10_data[258] = { + 16, // tile_width + 16, // tile_height + 0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x00, + 0x19,0x19,0x19,0x19,0x07,0x07,0x07,0x07,0x19,0x19,0x19,0x19,0x07,0x07,0x07,0x07, + 0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19,0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19, + 0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18,0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18, + 0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x23,0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x23, + 0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19,0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19, + 0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18,0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18, + 0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x23,0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x23, + 0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19,0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19, + 0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18,0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18, + 0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19, + 0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, +}; +uint8_t tileset_tile_11_data[258] = { + 16, // tile_width + 16, // tile_height + 0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x00, + 0x19,0x19,0x19,0x19,0x07,0x07,0x07,0x07,0x19,0x19,0x19,0x19,0x07,0x07,0x07,0x02, + 0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19,0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x02, + 0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18,0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x02, + 0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x23,0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x02, + 0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19,0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x02, + 0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18,0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x02, + 0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x23,0x19,0x19,0x19,0x19,0x23,0x23,0x23,0x02, + 0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x19,0x19,0x23,0x23,0x18,0x19,0x19,0x19,0x02, + 0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x18,0x19,0x23,0x23,0x18,0x18,0x18,0x18,0x02, + 0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x02, + 0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x14,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02, + 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x02, + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x19,0x02, +}; +uint8_t tileset_tile_12_data[258] = { + 16, // tile_width + 16, // tile_height + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x16,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, + 0x00,0x00,0x00,0x00,0x00,0x09,0x16,0x16,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, + 0x00,0x00,0x00,0x00,0x09,0x16,0x16,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, + 0x00,0x00,0x00,0x09,0x09,0x16,0x12,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, + 0x00,0x00,0x09,0x16,0x09,0x12,0x12,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, + 0x00,0x09,0x16,0x16,0x09,0x12,0x12,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, + 0x09,0x16,0x16,0x12,0x09,0x12,0x12,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, +}; +uint8_t tileset_tile_13_data[258] = { + 16, // tile_width + 16, // tile_height + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x07, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x16,0x09,0x16,0x16,0x16, + 0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, + 0x00,0x00,0x00,0x00,0x00,0x07,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, + 0x00,0x00,0x00,0x07,0x07,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, + 0x00,0x00,0x07,0x07,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, + 0x00,0x07,0x0F,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, + 0x07,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, + 0x09,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, + 0x09,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, + 0x09,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, + 0x09,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, + 0x09,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, + 0x09,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, + 0x09,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, + 0x09,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x09,0x16,0x16,0x16, +}; +uint8_t tileset_tile_14_data[258] = { + 16, // tile_width + 16, // tile_height + 0x07,0x07,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x16,0x16,0x16,0x09,0x16,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00, + 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x07,0x00,0x00,0x00,0x00,0x00, + 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x12,0x07,0x07,0x00,0x00,0x00, + 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x07,0x07,0x00,0x00, + 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x0F,0x07,0x00, + 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x07, + 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x09, + 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x09, + 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x09, + 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x09, + 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x09, + 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x09, + 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x09, + 0x16,0x16,0x16,0x09,0x16,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x09, +}; +uint8_t tileset_tile_15_data[258] = { + 16, // tile_width + 16, // tile_height + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x09,0x00,0x00,0x00,0x00,0x00,0x00, + 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x09,0x00,0x00,0x00,0x00,0x00, + 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x00,0x00,0x00,0x00, + 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x09,0x00,0x00,0x00, + 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x12,0x09,0x00,0x00, + 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x09,0x00, + 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09, +}; +uint8_t tileset_tile_16_data[258] = { + 16, // tile_width + 16, // tile_height + 0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x1F,0x04,0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x4B, + 0x4B,0x1F,0x4B,0x4B,0x4B,0x4B,0x1F,0x04,0x3B,0x04,0x4B,0x4B,0x4B,0x4B,0x4B,0x1F, + 0x4B,0x4B,0x04,0x04,0x04,0x1F,0x1F,0x3B,0x3B,0x04,0x1F,0x03,0x04,0x03,0x4B,0x4B, + 0x4B,0x1C,0x3B,0x3B,0x3B,0x04,0x04,0x3B,0x4B,0x04,0x03,0x3B,0x3B,0x3B,0x03,0x1F, + 0x4B,0x4B,0x1C,0x3B,0x3B,0x3B,0x04,0x4B,0x4B,0x03,0x1F,0x4B,0x3B,0x03,0x04,0x1F, + 0x4B,0x4B,0x4B,0x1C,0x4B,0x4B,0x4B,0x04,0x1F,0x03,0x1F,0x1F,0x04,0x04,0x1F,0x4B, + 0x4B,0x1C,0x1C,0x1C,0x04,0x04,0x4B,0x04,0x04,0x04,0x1F,0x03,0x03,0x03,0x03,0x4B, + 0x04,0x3B,0x3B,0x3B,0x4B,0x04,0x04,0x4B,0x03,0x1F,0x03,0x1F,0x4B,0x4B,0x4B,0x03, + 0x1F,0x04,0x3B,0x4B,0x4B,0x1F,0x04,0x04,0x03,0x03,0x1F,0x1F,0x1F,0x1F,0x03,0x1F, + 0x4B,0x1F,0x04,0x1F,0x1F,0x1F,0x1F,0x03,0x03,0x04,0x04,0x04,0x03,0x03,0x04,0x04, + 0x4B,0x4B,0x1F,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x1F, + 0x4B,0x1F,0x04,0x4B,0x4B,0x1F,0x03,0x04,0x03,0x03,0x04,0x1F,0x1F,0x03,0x1F,0x4B, + 0x4B,0x04,0x4B,0x4B,0x1F,0x04,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x1F,0x03,0x1F, + 0x1F,0x04,0x03,0x03,0x03,0x03,0x1F,0x1F,0x1F,0x04,0x03,0x03,0x03,0x03,0x03,0x04, + 0x1F,0x1F,0x04,0x04,0x04,0x04,0x03,0x1F,0x04,0x03,0x04,0x04,0x04,0x04,0x04,0x04, + 0x4B,0x4B,0x1F,0x1F,0x04,0x04,0x04,0x03,0x03,0x04,0x04,0x04,0x1F,0x1F,0x4B,0x4B, +}; +uint8_t tileset_tile_17_data[258] = { + 16, // tile_width + 16, // tile_height + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x20,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x39,0x39,0x3E,0x20,0x00, + 0x00,0x00,0x20,0x20,0x20,0x00,0x00,0x00,0x20,0x39,0x39,0x39,0x3E,0x3E,0x3E,0x20, + 0x00,0x20,0x3E,0x3E,0x39,0x20,0x20,0x00,0x20,0x20,0x39,0x39,0x3E,0x3E,0x3E,0x20, + 0x20,0x3E,0x3E,0x39,0x39,0x39,0x20,0x20,0x20,0x20,0x39,0x39,0x39,0x3E,0x39,0x20, + 0x20,0x3E,0x39,0x3E,0x39,0x20,0x20,0x20,0x20,0x39,0x20,0x39,0x39,0x39,0x20,0x00, + 0x00,0x20,0x39,0x39,0x39,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x39,0x39,0x39,0x20, + 0x20,0x39,0x39,0x39,0x20,0x20,0x20,0x20,0x20,0x3F,0x3F,0x20,0x20,0x20,0x20,0x00, + 0x20,0x20,0x20,0x20,0x20,0x3F,0x3F,0x20,0x3F,0x3F,0x20,0x00,0x00,0x00,0x00,0x00, + 0x00,0x20,0x20,0x20,0x20,0x20,0x3F,0x20,0x3F,0x20,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x20,0x20,0x00,0x20,0x45,0x3F,0x20,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x45,0x3F,0x20,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x39,0x20,0x20,0x3F,0x45,0x3F,0x20,0x39,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x39,0x20,0x33,0x45,0x3F,0x45,0x45,0x3F,0x20,0x39,0x00,0x00,0x00, + 0x00,0x00,0x00,0x39,0x20,0x20,0x33,0x45,0x3F,0x45,0x20,0x20,0x39,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x39,0x20,0x20,0x20,0x20,0x20,0x20,0x39,0x00,0x00,0x00,0x00, +}; +uint8_t tileset_tile_18_data[258] = { + 16, // tile_width + 16, // tile_height + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x04,0x04,0x05,0x01,0x01,0x05,0x04,0x04,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x04,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x04,0x00,0x00,0x00, + 0x00,0x00,0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x04,0x00,0x00, + 0x00,0x00,0x04,0x01,0x01,0x05,0x05,0x01,0x01,0x05,0x05,0x01,0x01,0x04,0x00,0x00, + 0x00,0x04,0x01,0x04,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x04,0x01,0x04,0x00, + 0x00,0x01,0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x04,0x01,0x1F, + 0x00,0x03,0x01,0x04,0x01,0x05,0x05,0x01,0x01,0x05,0x05,0x01,0x04,0x01,0x03,0x1C, + 0x00,0x04,0x01,0x04,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x1C, + 0x00,0x03,0x04,0x01,0x01,0x04,0x04,0x01,0x01,0x04,0x04,0x01,0x01,0x04,0x03,0x1C, + 0x00,0x03,0x04,0x04,0x01,0x01,0x01,0x04,0x04,0x01,0x01,0x01,0x04,0x04,0x03,0x1C, + 0x00,0x1F,0x03,0x04,0x04,0x04,0x04,0x01,0x01,0x04,0x04,0x04,0x04,0x03,0x1C,0x1F, + 0x00,0x00,0x1C,0x04,0x03,0x03,0x04,0x04,0x04,0x04,0x03,0x03,0x04,0x1C,0x1F,0x00, + 0x00,0x00,0x00,0x1C,0x1C,0x1C,0x03,0x03,0x03,0x03,0x1C,0x1C,0x1C,0x1C,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x1F,0x1C,0x1C,0x1C,0x1C,0x1C,0x1F,0x00,0x00,0x00,0x00, +}; +uint8_t tileset_tile_19_data[258] = { + 16, // tile_width + 16, // tile_height + 0x00,0x00,0x00,0x00,0x00,0x00,0x2C,0x2C,0x2C,0x33,0x33,0x33,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x33,0x2C,0x36,0x36,0x36,0x2C,0x19,0x2C,0x33,0x2C,0x00,0x00, + 0x00,0x00,0x00,0x2C,0x2C,0x36,0x36,0x36,0x36,0x2C,0x19,0x36,0x36,0x28,0x33,0x00, + 0x00,0x00,0x33,0x2C,0x36,0x36,0x36,0x28,0x2C,0x19,0x36,0x36,0x28,0x28,0x33,0x00, + 0x00,0x19,0x2C,0x36,0x36,0x28,0x36,0x28,0x28,0x28,0x36,0x36,0x28,0x28,0x2C,0x00, + 0x00,0x33,0x36,0x36,0x28,0x28,0x36,0x28,0x28,0x28,0x28,0x28,0x2C,0x2C,0x2C,0x19, + 0x00,0x33,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x2C,0x28,0x28,0x28,0x2C,0x28,0x29, + 0x35,0x33,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x19,0x2C,0x28,0x2C,0x28,0x2C,0x29, + 0x19,0x33,0x28,0x28,0x28,0x2C,0x19,0x28,0x28,0x2C,0x19,0x2C,0x28,0x2C,0x2C,0x29, + 0x29,0x33,0x19,0x28,0x28,0x19,0x28,0x2C,0x2C,0x19,0x29,0x19,0x19,0x29,0x29,0x29, + 0x29,0x33,0x33,0x19,0x19,0x19,0x2C,0x2C,0x19,0x33,0x29,0x33,0x33,0x29,0x29,0x29, + 0x29,0x33,0x33,0x2C,0x33,0x19,0x19,0x19,0x29,0x33,0x29,0x33,0x33,0x29,0x29,0x29, + 0x35,0x29,0x29,0x33,0x29,0x33,0x33,0x29,0x29,0x33,0x29,0x33,0x29,0x29,0x29,0x35, + 0x00,0x35,0x29,0x29,0x29,0x33,0x33,0x29,0x29,0x29,0x33,0x29,0x29,0x29,0x35,0x35, + 0x00,0x00,0x35,0x35,0x29,0x29,0x29,0x29,0x29,0x35,0x29,0x29,0x29,0x35,0x35,0x00, + 0x00,0x00,0x00,0x00,0x35,0x29,0x29,0x29,0x19,0x35,0x35,0x35,0x35,0x00,0x00,0x00, +}; +uint8_t tileset_tile_20_data[258] = { + 16, // tile_width + 16, // tile_height + 0x4B,0x4B,0x4B,0x1F,0x03,0x05,0x05,0x04,0x01,0x04,0x05,0x05,0x05,0x05,0x04,0x05, + 0x4B,0x1F,0x4B,0x1C,0x1C,0x04,0x01,0x05,0x05,0x04,0x05,0x01,0x01,0x05,0x01,0x05, + 0x1F,0x1C,0x1C,0x1C,0x03,0x05,0x05,0x05,0x01,0x01,0x04,0x04,0x04,0x01,0x05,0x05, + 0x1C,0x1C,0x03,0x03,0x03,0x05,0x05,0x01,0x04,0x01,0x05,0x05,0x01,0x04,0x05,0x01, + 0x1C,0x1C,0x03,0x01,0x01,0x03,0x01,0x03,0x05,0x05,0x05,0x05,0x01,0x01,0x04,0x04, + 0x1C,0x1C,0x1C,0x04,0x01,0x03,0x04,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x04,0x01, + 0x1F,0x1C,0x03,0x01,0x04,0x04,0x03,0x05,0x04,0x05,0x05,0x01,0x05,0x05,0x05,0x05, + 0x1F,0x1F,0x04,0x04,0x04,0x01,0x04,0x04,0x05,0x05,0x04,0x05,0x05,0x05,0x01,0x05, + 0x1F,0x1F,0x03,0x04,0x01,0x01,0x01,0x04,0x04,0x04,0x04,0x05,0x05,0x05,0x05,0x05, + 0x1F,0x03,0x03,0x01,0x01,0x01,0x04,0x01,0x01,0x01,0x04,0x04,0x05,0x04,0x05,0x05, + 0x1C,0x04,0x01,0x04,0x01,0x04,0x01,0x01,0x01,0x01,0x04,0x04,0x03,0x01,0x05,0x01, + 0x1C,0x03,0x04,0x03,0x04,0x04,0x01,0x01,0x04,0x01,0x01,0x04,0x04,0x04,0x01,0x01, + 0x1C,0x03,0x04,0x03,0x03,0x04,0x01,0x04,0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x04, + 0x1C,0x1F,0x03,0x01,0x04,0x03,0x04,0x01,0x01,0x01,0x01,0x04,0x01,0x01,0x04,0x01, + 0x1C,0x03,0x01,0x04,0x04,0x03,0x03,0x03,0x03,0x01,0x04,0x04,0x01,0x01,0x04,0x01, + 0x1C,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x04,0x01,0x01,0x04,0x01,0x04, +}; +uint8_t tileset_tile_21_data[258] = { + 16, // tile_width + 16, // tile_height + 0x05,0x04,0x05,0x01,0x05,0x05,0x04,0x01,0x04,0x05,0x05,0x03,0x1F,0x4B,0x4B,0x4B, + 0x05,0x01,0x05,0x05,0x01,0x04,0x01,0x01,0x05,0x01,0x04,0x1C,0x1C,0x4B,0x1F,0x4B, + 0x05,0x05,0x05,0x01,0x04,0x04,0x01,0x01,0x05,0x05,0x05,0x03,0x04,0x04,0x1C,0x1F, + 0x01,0x05,0x04,0x04,0x01,0x01,0x01,0x04,0x01,0x05,0x05,0x03,0x03,0x03,0x1C,0x1C, + 0x04,0x04,0x01,0x01,0x01,0x05,0x01,0x05,0x03,0x01,0x03,0x01,0x01,0x03,0x04,0x1C, + 0x01,0x04,0x01,0x01,0x05,0x01,0x05,0x01,0x05,0x04,0x03,0x01,0x04,0x04,0x04,0x1C, + 0x05,0x05,0x01,0x05,0x01,0x05,0x01,0x05,0x05,0x03,0x04,0x04,0x01,0x03,0x1C,0x1F, + 0x05,0x01,0x05,0x01,0x05,0x04,0x05,0x05,0x04,0x04,0x01,0x04,0x04,0x04,0x1F,0x1F, + 0x05,0x05,0x05,0x05,0x05,0x04,0x04,0x04,0x04,0x01,0x01,0x01,0x04,0x03,0x1F,0x1F, + 0x05,0x05,0x04,0x05,0x04,0x04,0x01,0x01,0x01,0x04,0x01,0x01,0x01,0x03,0x03,0x1F, + 0x01,0x05,0x01,0x03,0x04,0x04,0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x01,0x04,0x1C, + 0x01,0x01,0x04,0x04,0x04,0x01,0x01,0x04,0x01,0x01,0x04,0x04,0x03,0x04,0x03,0x1C, + 0x04,0x04,0x01,0x39,0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x03,0x03,0x04,0x03,0x1C, + 0x01,0x04,0x01,0x01,0x04,0x01,0x01,0x01,0x01,0x04,0x03,0x04,0x01,0x03,0x1C,0x1C, + 0x01,0x04,0x01,0x01,0x04,0x04,0x01,0x03,0x03,0x03,0x03,0x04,0x04,0x01,0x03,0x1C, + 0x04,0x01,0x04,0x01,0x01,0x04,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x1C, +}; +uint8_t tileset_tile_22_data[258] = { + 16, // tile_width + 16, // tile_height + 0x4B,0x4B,0x4B,0x4B,0x03,0x05,0x05,0x04,0x01,0x04,0x05,0x05,0x05,0x05,0x04,0x05, + 0x4B,0x4B,0x4B,0x1F,0x4B,0x04,0x01,0x05,0x05,0x04,0x05,0x01,0x01,0x05,0x01,0x05, + 0x4B,0x4B,0x4B,0x1F,0x03,0x05,0x05,0x05,0x01,0x01,0x04,0x04,0x04,0x01,0x05,0x05, + 0x4B,0x1F,0x03,0x03,0x03,0x05,0x05,0x01,0x04,0x01,0x05,0x05,0x01,0x04,0x05,0x01, + 0x4B,0x4B,0x03,0x01,0x01,0x03,0x01,0x03,0x05,0x05,0x05,0x05,0x01,0x01,0x04,0x04, + 0x4B,0x4B,0x4B,0x04,0x01,0x03,0x04,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x04,0x01, + 0x4B,0x4B,0x03,0x01,0x04,0x04,0x03,0x05,0x04,0x05,0x05,0x01,0x05,0x05,0x05,0x05, + 0x4B,0x4B,0x04,0x04,0x04,0x01,0x04,0x04,0x05,0x05,0x04,0x05,0x05,0x05,0x01,0x05, + 0x4B,0x4B,0x03,0x04,0x01,0x01,0x01,0x04,0x04,0x04,0x04,0x05,0x05,0x05,0x05,0x05, + 0x4B,0x03,0x03,0x01,0x01,0x01,0x04,0x01,0x01,0x01,0x04,0x04,0x05,0x04,0x05,0x05, + 0x4B,0x04,0x01,0x04,0x01,0x04,0x01,0x01,0x01,0x01,0x04,0x04,0x03,0x01,0x05,0x01, + 0x4B,0x03,0x04,0x03,0x04,0x04,0x01,0x01,0x04,0x01,0x01,0x04,0x04,0x04,0x01,0x01, + 0x4B,0x03,0x04,0x03,0x03,0x04,0x01,0x04,0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x04, + 0x4B,0x4B,0x03,0x01,0x04,0x03,0x04,0x01,0x01,0x01,0x01,0x04,0x01,0x01,0x04,0x01, + 0x4B,0x03,0x01,0x04,0x04,0x03,0x03,0x03,0x03,0x01,0x04,0x04,0x01,0x01,0x04,0x01, + 0x4B,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x04,0x01,0x01,0x04,0x01,0x04, +}; +uint8_t tileset_tile_23_data[258] = { + 16, // tile_width + 16, // tile_height + 0x05,0x04,0x05,0x01,0x05,0x05,0x04,0x01,0x04,0x05,0x05,0x03,0x4B,0x4B,0x4B,0x4B, + 0x05,0x01,0x05,0x05,0x01,0x04,0x01,0x01,0x05,0x01,0x04,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x05,0x05,0x05,0x01,0x04,0x04,0x01,0x01,0x05,0x05,0x05,0x03,0x4B,0x3D,0x4B,0x4B, + 0x01,0x05,0x04,0x04,0x01,0x01,0x01,0x04,0x01,0x05,0x05,0x03,0x03,0x03,0x4B,0x4B, + 0x04,0x04,0x01,0x01,0x01,0x05,0x01,0x05,0x03,0x01,0x03,0x01,0x01,0x03,0x4B,0x4B, + 0x01,0x04,0x01,0x01,0x05,0x01,0x05,0x01,0x05,0x04,0x03,0x01,0x04,0x4B,0x4B,0x4B, + 0x05,0x05,0x01,0x05,0x01,0x05,0x01,0x05,0x05,0x03,0x04,0x04,0x01,0x03,0x4B,0x4B, + 0x05,0x01,0x05,0x01,0x05,0x04,0x05,0x05,0x04,0x04,0x01,0x04,0x04,0x04,0x4B,0x4B, + 0x05,0x05,0x05,0x05,0x05,0x04,0x04,0x04,0x04,0x01,0x01,0x01,0x04,0x03,0x4B,0x4B, + 0x05,0x05,0x04,0x05,0x04,0x04,0x01,0x01,0x01,0x04,0x01,0x01,0x01,0x03,0x03,0x4B, + 0x01,0x05,0x01,0x03,0x04,0x04,0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x01,0x04,0x4B, + 0x01,0x01,0x04,0x04,0x04,0x01,0x01,0x04,0x01,0x01,0x04,0x04,0x03,0x04,0x03,0x4B, + 0x04,0x04,0x01,0x04,0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x03,0x03,0x04,0x03,0x4B, + 0x01,0x04,0x01,0x01,0x04,0x01,0x01,0x01,0x01,0x04,0x03,0x04,0x01,0x03,0x4B,0x4B, + 0x01,0x04,0x01,0x01,0x04,0x04,0x01,0x03,0x03,0x03,0x03,0x04,0x04,0x01,0x03,0x4B, + 0x04,0x01,0x04,0x01,0x01,0x04,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x4B, +}; +uint8_t tileset_tile_24_data[258] = { + 16, // tile_width + 16, // tile_height + 0x07,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, + 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14, + 0x07,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, + 0x07,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, + 0x07,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, + 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14, + 0x07,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, + 0x07,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, + 0x07,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, + 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14, + 0x07,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, + 0x07,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, + 0x07,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, + 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14, + 0x07,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, + 0x07,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, +}; +uint8_t tileset_tile_25_data[258] = { + 16, // tile_width + 16, // tile_height + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, + 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14, + 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, + 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14, + 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, + 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14, + 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, + 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14, + 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, +}; +uint8_t tileset_tile_26_data[258] = { + 16, // tile_width + 16, // tile_height + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, + 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14, + 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, + 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14, + 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, + 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14, + 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, + 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14, + 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07, + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14, +}; +uint8_t tileset_tile_27_data[258] = { + 16, // tile_width + 16, // tile_height + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x19,0x02, + 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x19,0x02, + 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x02, + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x19,0x02, + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x19,0x02, + 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x19,0x02, + 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x02, + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x19,0x02, + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x19,0x02, + 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x19,0x02, + 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x02, + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x19,0x02, + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x19,0x02, + 0x07,0x07,0x07,0x07,0x14,0x14,0x14,0x14,0x07,0x07,0x07,0x07,0x14,0x14,0x19,0x02, + 0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x07,0x19,0x18,0x18,0x14,0x07,0x07,0x07,0x02, + 0x19,0x18,0x18,0x14,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x14,0x14,0x14,0x19,0x02, +}; +uint8_t tileset_tile_28_data[258] = { + 16, // tile_width + 16, // tile_height + 0x02,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, + 0x02,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, + 0x02,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, + 0x02,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, + 0x02,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, + 0x02,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, + 0x02,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, + 0x02,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09, + 0x02,0x12,0x12,0x12,0x09,0x12,0x12,0x0F,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x02,0x12,0x12,0x12,0x09,0x12,0x0F,0x0F,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x02,0x12,0x12,0x12,0x09,0x0F,0x0F,0x0F,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x02,0x12,0x12,0x12,0x09,0x0F,0x0F,0x0F,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x02,0x12,0x12,0x0F,0x07,0x07,0x0F,0x0F,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x02,0x12,0x0F,0x0F,0x0F,0x07,0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x02,0x0F,0x0F,0x0F,0x0F,0x0F,0x07,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x02,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, +}; +uint8_t tileset_tile_29_data[258] = { + 16, // tile_width + 16, // tile_height + 0x09,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x07,0x07,0x07,0x07,0x07, + 0x09,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x07,0x07,0x07,0x09,0x09,0x09,0x09,0x09, + 0x09,0x0F,0x0F,0x09,0x12,0x12,0x07,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x09,0x0F,0x0F,0x09,0x12,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x09,0x0F,0x0F,0x07,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x09,0x0F,0x07,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x0A,0x0B, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x0A,0x0B,0x0B,0x0B, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x0B,0x0B,0x0B,0x0B,0x0B, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x0A,0x0B,0x0B,0x0A,0x09,0x09, + 0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x0B,0x0B,0x0A,0x09,0x12,0x0B, + 0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x0A,0x0B,0x0B,0x09,0x12,0x0B,0x0B, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x09,0x09,0x0F,0x0F,0x0F,0x09,0x0B,0x0B,0x0B, +}; +uint8_t tileset_tile_30_data[258] = { + 16, // tile_width + 16, // tile_height + 0x07,0x07,0x07,0x07,0x07,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x09, + 0x09,0x09,0x09,0x09,0x09,0x07,0x07,0x07,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x09, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x07,0x12,0x12,0x09,0x0F,0x0F,0x09, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x12,0x09,0x0F,0x0F,0x09, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x07,0x0F,0x0F,0x09, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x07,0x0F,0x09, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x0B,0x0A,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x0B,0x0B,0x0B,0x0A,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x0B,0x0B,0x0B,0x0B,0x0B,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x09,0x09,0x0A,0x0B,0x0B,0x0A,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x0B,0x12,0x09,0x0A,0x0B,0x0B,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09, + 0x0B,0x0B,0x12,0x09,0x0B,0x0B,0x0A,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09, + 0x0B,0x0B,0x0B,0x09,0x0F,0x0F,0x0F,0x09,0x09,0x07,0x07,0x07,0x07,0x07,0x07,0x07, +}; +uint8_t tileset_tile_31_data[258] = { + 16, // tile_width + 16, // tile_height + 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x02, + 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x02, + 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x02, + 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x02, + 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x02, + 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x02, + 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x02, + 0x16,0x16,0x16,0x09,0x16,0x16,0x16,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x02, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x0F,0x12,0x12,0x09,0x12,0x12,0x12,0x02, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x0F,0x0F,0x12,0x09,0x12,0x12,0x12,0x02, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x0F,0x0F,0x0F,0x09,0x12,0x12,0x12,0x02, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x0F,0x0F,0x0F,0x09,0x12,0x12,0x12,0x02, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x0F,0x0F,0x07,0x07,0x0F,0x12,0x12,0x02, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x0F,0x07,0x07,0x0F,0x0F,0x0F,0x12,0x02, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x07,0x0F,0x0F,0x0F,0x0F,0x0F,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x02, +}; +uint8_t tileset_tile_32_data[258] = { + 16, // tile_width + 16, // tile_height + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x0E,0x0E,0x4B,0x4B,0x4B,0x4B,0x0E,0x0E, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, + 0x4B,0x4B,0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, + 0x4B,0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, + 0x4B,0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x15,0x15,0x0E,0x0E,0x0E,0x0E,0x15,0x15, + 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x15,0x15,0x15,0x15,0x08,0x08, + 0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x4B,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x4B,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, +}; +uint8_t tileset_tile_33_data[258] = { + 16, // tile_width + 16, // tile_height + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x0E,0x0E,0x4B,0x4B,0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B,0x4B,0x4B,0x0E,0x0E, + 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, + 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, + 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, + 0x15,0x0E,0x0E,0x15,0x15,0x0E,0x0E,0x15,0x15,0x15,0x0E,0x0E,0x0E,0x0E,0x15,0x15, + 0x08,0x15,0x15,0x08,0x08,0x15,0x15,0x08,0x08,0x08,0x15,0x15,0x15,0x15,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x15,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, +}; +uint8_t tileset_tile_34_data[258] = { + 16, // tile_width + 16, // tile_height + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x0E,0x0E,0x4B,0x4B,0x4B,0x4B,0x0E,0x0E,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B,0x4B,0x4B, + 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B,0x4B, + 0x15,0x0E,0x0E,0x15,0x15,0x0E,0x0E,0x15,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B,0x4B, + 0x08,0x15,0x15,0x08,0x08,0x15,0x15,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B, +}; +uint8_t tileset_tile_35_data[258] = { + 16, // tile_width + 16, // tile_height + 0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x20,0x20,0x26,0x2B,0x2B,0x26,0x2B,0x26,0x20,0x20,0x00,0x00,0x00, + 0x00,0x00,0x20,0x26,0x2B,0x2B,0x2B,0x2B,0x2B,0x26,0x2B,0x26,0x20,0x20,0x00,0x00, + 0x00,0x20,0x26,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x26,0x26,0x26,0x20,0x20,0x00, + 0x00,0x20,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x26,0x2B,0x26,0x20,0x26,0x20,0x00, + 0x20,0x26,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x26,0x26,0x26,0x20,0x20,0x27, + 0x20,0x26,0x26,0x2B,0x2B,0x2B,0x2B,0x26,0x2B,0x26,0x26,0x26,0x26,0x20,0x20,0x27, + 0x20,0x26,0x2B,0x26,0x2B,0x26,0x2B,0x2B,0x26,0x2B,0x26,0x26,0x20,0x26,0x20,0x27, + 0x20,0x26,0x26,0x2B,0x26,0x2B,0x26,0x26,0x2B,0x26,0x26,0x20,0x26,0x20,0x20,0x27, + 0x20,0x20,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x20,0x26,0x20,0x27, + 0x20,0x20,0x26,0x26,0x26,0x20,0x26,0x26,0x20,0x26,0x20,0x26,0x20,0x20,0x20,0x27, + 0x20,0x20,0x20,0x26,0x20,0x26,0x20,0x26,0x26,0x20,0x26,0x20,0x20,0x20,0x27,0x27, + 0x00,0x27,0x20,0x20,0x20,0x20,0x26,0x20,0x20,0x26,0x20,0x20,0x20,0x27,0x27,0x00, + 0x00,0x27,0x27,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x27,0x27,0x27,0x27,0x00, + 0x00,0x00,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x00,0x00, + 0x00,0x00,0x00,0x00,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x00,0x00,0x00,0x00, +}; +uint8_t tileset_tile_36_data[258] = { + 16, // tile_width + 16, // tile_height + 0x1F,0x03,0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x03,0x03,0x01,0x01,0x04,0x01,0x01, + 0x4B,0x4B,0x03,0x03,0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x01, + 0x4B,0x4B,0x4B,0x03,0x04,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x03, + 0x4B,0x4B,0x4B,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x04,0x04, + 0x4B,0x4B,0x4B,0x1C,0x04,0x03,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x04,0x04, + 0x4B,0x4B,0x1C,0x04,0x04,0x04,0x03,0x03,0x04,0x03,0x04,0x04,0x03,0x03,0x04,0x04, + 0x4B,0x1C,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x04,0x03,0x03,0x03,0x04, + 0x4B,0x1C,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x37,0x03,0x03,0x04, + 0x4B,0x1C,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x37,0x3C,0x3C,0x03, + 0x4B,0x1C,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x37,0x3C,0x3C,0x3C, + 0x4B,0x1C,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x37,0x3C,0x3C, + 0x4B,0x1F,0x1C,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x37,0x37, + 0x4B,0x4B,0x1F,0x1C,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03, + 0x4B,0x4B,0x4B,0x1F,0x1C,0x1C,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x1F,0x1C,0x1C,0x1C,0x04,0x04,0x04,0x04,0x04,0x04,0x04, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x1F,0x1F,0x1C,0x1C,0x1C,0x04,0x04,0x04,0x04, +}; +uint8_t tileset_tile_37_data[258] = { + 16, // tile_width + 16, // tile_height + 0x01,0x01,0x04,0x01,0x01,0x03,0x03,0x03,0x04,0x04,0x04,0x03,0x04,0x04,0x03,0x4B, + 0x01,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x03,0x04,0x04,0x03,0x03,0x4B,0x4B, + 0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x04,0x03,0x1F,0x4B,0x4B, + 0x04,0x04,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x4B,0x4B,0x4B, + 0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x04,0x1C,0x4B,0x4B,0x4B, + 0x04,0x04,0x03,0x03,0x04,0x04,0x03,0x04,0x03,0x03,0x04,0x04,0x04,0x1C,0x4B,0x4B, + 0x04,0x03,0x03,0x03,0x04,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x1C,0x4B, + 0x04,0x03,0x03,0x37,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x1C,0x4B, + 0x03,0x3C,0x3C,0x37,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x1C,0x4B, + 0x3C,0x3C,0x3C,0x37,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x1C,0x4B, + 0x3C,0x3C,0x37,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x1C,0x4B, + 0x37,0x37,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x1C,0x1F,0x4B, + 0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x1C,0x1F,0x4B,0x4B, + 0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x1C,0x1C,0x1F,0x4B,0x4B,0x4B, + 0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x1C,0x1C,0x1C,0x1F,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x04,0x04,0x04,0x04,0x1C,0x1C,0x1C,0x1F,0x1F,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, +}; +uint8_t tileset_tile_38_data[258] = { + 16, // tile_width + 16, // tile_height + 0x1F,0x03,0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x03,0x03,0x01,0x01,0x04,0x01,0x01, + 0x4B,0x4B,0x03,0x03,0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x01, + 0x4B,0x4B,0x4B,0x03,0x04,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x03, + 0x4B,0x4B,0x4B,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x04,0x03, + 0x4B,0x4B,0x4B,0x1C,0x04,0x03,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x03,0x05, + 0x4B,0x4B,0x1C,0x04,0x04,0x04,0x03,0x03,0x04,0x03,0x04,0x04,0x03,0x03,0x04,0x05, + 0x4B,0x1C,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x04,0x03,0x03,0x01,0x05, + 0x4B,0x1C,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x05,0x05, + 0x4B,0x1C,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x04,0x04,0x05,0x05,0x01,0x05,0x05, + 0x4B,0x1C,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x04,0x01,0x01,0x05,0x01,0x05,0x05, + 0x4B,0x1C,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x04,0x05,0x05,0x01,0x05,0x05,0x05, + 0x4B,0x4B,0x1C,0x04,0x04,0x04,0x04,0x04,0x01,0x05,0x01,0x01,0x05,0x05,0x05,0x05, + 0x4B,0x4B,0x4B,0x1C,0x04,0x04,0x04,0x01,0x04,0x04,0x01,0x05,0x05,0x05,0x05,0x05, + 0x4B,0x4B,0x4B,0x4B,0x1C,0x03,0x05,0x05,0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05, + 0x4B,0x4B,0x1F,0x4B,0x4B,0x4B,0x04,0x04,0x01,0x05,0x05,0x01,0x05,0x05,0x05,0x05, + 0x4B,0x4B,0x4B,0x4B,0x03,0x01,0x05,0x05,0x04,0x05,0x04,0x05,0x05,0x05,0x05,0x05, +}; +uint8_t tileset_tile_39_data[258] = { + 16, // tile_width + 16, // tile_height + 0x01,0x01,0x04,0x01,0x01,0x03,0x03,0x03,0x04,0x04,0x04,0x03,0x04,0x04,0x03,0x4B, + 0x01,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x03,0x04,0x04,0x03,0x03,0x4B,0x4B, + 0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x04,0x03,0x1F,0x4B,0x4B, + 0x03,0x04,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x4B,0x4B,0x4B, + 0x05,0x03,0x03,0x04,0x04,0x04,0x03,0x04,0x04,0x04,0x03,0x04,0x1C,0x4B,0x4B,0x4B, + 0x05,0x04,0x03,0x03,0x04,0x04,0x03,0x04,0x03,0x03,0x04,0x04,0x04,0x1C,0x4B,0x4B, + 0x05,0x01,0x03,0x03,0x04,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x1C,0x4B, + 0x05,0x01,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x1C,0x4B, + 0x05,0x01,0x01,0x05,0x05,0x04,0x04,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x1C,0x4B, + 0x05,0x01,0x01,0x01,0x01,0x01,0x04,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x1C,0x4B, + 0x05,0x01,0x05,0x01,0x01,0x05,0x04,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x1C,0x4B, + 0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x01,0x03,0x04,0x04,0x04,0x04,0x1C,0x4B,0x4B, + 0x05,0x05,0x05,0x05,0x01,0x05,0x04,0x04,0x01,0x03,0x04,0x04,0x1C,0x1F,0x1F,0x4B, + 0x05,0x05,0x05,0x01,0x05,0x01,0x01,0x04,0x05,0x01,0x03,0x1C,0x4B,0x1F,0x1F,0x4B, + 0x05,0x05,0x05,0x05,0x01,0x05,0x05,0x01,0x04,0x04,0x04,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x05,0x05,0x05,0x01,0x05,0x04,0x05,0x04,0x05,0x01,0x01,0x03,0x3B,0x4B,0x4B,0x1F, +}; +uint8_t tileset_tile_40_data[258] = { + 16, // tile_width + 16, // tile_height + 0x07,0x18,0x18,0x18,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x18,0x14,0x14,0x14,0x14, + 0x07,0x07,0x07,0x07,0x18,0x18,0x18,0x18,0x07,0x07,0x07,0x07,0x18,0x18,0x18,0x18, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02, + 0x02,0x02,0x02,0x02,0x07,0x07,0x07,0x02,0x02,0x02,0x02,0x02,0x07,0x07,0x07,0x02, + 0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x00,0x00,0x02,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x00,0x00,0x02,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x00,0x00,0x02,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, + 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, + 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, + 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, + 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, + 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, + 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, + 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, +}; +uint8_t tileset_tile_41_data[258] = { + 16, // tile_width + 16, // tile_height + 0x19,0x18,0x18,0x18,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x18,0x14,0x14,0x14,0x14, + 0x07,0x07,0x07,0x07,0x18,0x18,0x18,0x18,0x07,0x07,0x07,0x07,0x18,0x18,0x18,0x18, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02, + 0x02,0x02,0x02,0x02,0x07,0x07,0x07,0x02,0x02,0x02,0x02,0x02,0x07,0x07,0x07,0x02, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x10,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15, + 0x10,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15, + 0x10,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15, + 0x10,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x02,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x02, + 0x02,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x02, + 0x02,0x32,0x32,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x32,0x32,0x02, +}; +uint8_t tileset_tile_42_data[258] = { + 16, // tile_width + 16, // tile_height + 0x19,0x18,0x18,0x18,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x18,0x14,0x14,0x14,0x14, + 0x07,0x07,0x07,0x07,0x18,0x18,0x18,0x18,0x07,0x07,0x07,0x07,0x18,0x18,0x18,0x18, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02, + 0x02,0x02,0x02,0x02,0x07,0x07,0x07,0x02,0x02,0x02,0x02,0x02,0x07,0x07,0x07,0x02, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15, + 0x4A,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24, + 0x24,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x24, + 0x24,0x02,0x2E,0x2E,0x2E,0x2E,0x2E,0x02,0x02,0x2E,0x2E,0x2E,0x2E,0x2E,0x02,0x24, + 0x24,0x02,0x2E,0x2E,0x2E,0x2E,0x2E,0x02,0x02,0x2E,0x2E,0x2E,0x2E,0x2E,0x02,0x24, + 0x24,0x02,0x2E,0x2E,0x2E,0x2E,0x2E,0x02,0x02,0x2E,0x2E,0x2E,0x2E,0x2E,0x02,0x24, + 0x24,0x02,0x2E,0x34,0x2E,0x34,0x2E,0x02,0x02,0x34,0x2E,0x34,0x2E,0x34,0x02,0x24, + 0x24,0x02,0x34,0x2E,0x34,0x2E,0x34,0x02,0x02,0x2E,0x34,0x2E,0x34,0x2E,0x02,0x24, +}; +uint8_t tileset_tile_43_data[258] = { + 16, // tile_width + 16, // tile_height + 0x19,0x18,0x18,0x18,0x14,0x14,0x14,0x14,0x19,0x18,0x18,0x18,0x14,0x14,0x19,0x02, + 0x07,0x07,0x07,0x07,0x18,0x18,0x18,0x18,0x07,0x07,0x07,0x07,0x18,0x18,0x14,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02, + 0x02,0x02,0x02,0x02,0x07,0x07,0x07,0x02,0x02,0x02,0x02,0x02,0x07,0x07,0x07,0x02, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02,0x10,0x10, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02,0x10,0x10, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02,0x10,0x10, + 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, + 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, + 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, + 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, + 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, + 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, + 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, + 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, +}; +uint8_t tileset_tile_44_data[258] = { + 16, // tile_width + 16, // tile_height + 0x02,0x07,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x02,0x02,0x07,0x09,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x02,0x10,0x02,0x07,0x09,0x0F,0x0F,0x0F,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x02,0x17,0x10,0x02,0x07,0x09,0x0F,0x0F,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x02,0x0B,0x17,0x10,0x02,0x07,0x09,0x0F,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x02,0x1B,0x0B,0x17,0x10,0x02,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x02,0x10,0x1B,0x0B,0x17,0x10,0x02,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x02,0x17,0x10,0x1B,0x0B,0x17,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x02,0x17,0x1B,0x10,0x1B,0x0B,0x17,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x02,0x17,0x1B,0x1B,0x10,0x1B,0x0B,0x17,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x02,0x17,0x1B,0x1B,0x1B,0x10,0x1B,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, + 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x10,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, + 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, +}; +uint8_t tileset_tile_45_data[258] = { + 16, // tile_width + 16, // tile_height + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x0A,0x0A,0x0A, + 0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x0A,0x0A,0x0A,0x09,0x12,0x0A,0x0A, + 0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x0A,0x0A,0x0A,0x09,0x12,0x0A, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x0A,0x0A,0x0A,0x0A,0x09,0x09, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x0A,0x0A,0x0A,0x0A, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x09,0x09,0x09,0x0F,0x0A,0x0A, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, + 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, + 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, + 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, +}; +uint8_t tileset_tile_46_data[258] = { + 16, // tile_width + 16, // tile_height + 0x0A,0x0A,0x0A,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x0A,0x0A,0x12,0x09,0x0A,0x0A,0x0A,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09, + 0x0A,0x12,0x09,0x0A,0x0A,0x0A,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09, + 0x09,0x09,0x0A,0x0A,0x0A,0x0A,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x0A,0x0A,0x0A,0x0A,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x0A,0x0A,0x0F,0x09,0x09,0x09,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x0B,0x0B,0x1B,0x1B,0x1B,0x1B,0x1B, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x02,0x10,0x10,0x10,0x10,0x10,0x10,0x10, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x1B,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B, +}; +uint8_t tileset_tile_47_data[258] = { + 16, // tile_width + 16, // tile_height + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x07,0x02, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x09,0x07,0x02,0x02, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x0F,0x0F,0x0F,0x09,0x07,0x02,0x10,0x02, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x0F,0x0F,0x09,0x07,0x02,0x10,0x17,0x02, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x0F,0x09,0x07,0x02,0x10,0x17,0x0B,0x02, + 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x02,0x10,0x17,0x0B,0x1B,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02,0x10,0x17,0x0B,0x1B,0x10,0x02, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x17,0x0B,0x1B,0x10,0x17,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x17,0x0B,0x1B,0x10,0x1B,0x17,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x17,0x0B,0x1B,0x10,0x1B,0x1B,0x17,0x02, + 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x1B,0x10,0x1B,0x1B,0x1B,0x17,0x02, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x17,0x10,0x1B,0x1B,0x1B,0x1B,0x17,0x02, + 0x1B,0x1B,0x1B,0x1B,0x1B,0x0B,0x0B,0x02,0x10,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, + 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x1B,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, + 0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, +}; +uint8_t tileset_tile_48_data[258] = { + 16, // tile_width + 16, // tile_height + 0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08, + 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x3A,0x08, + 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08, + 0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x4B,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x4B,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, +}; +uint8_t tileset_tile_49_data[258] = { + 16, // tile_width + 16, // tile_height + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x3A,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x15,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, +}; +uint8_t tileset_tile_50_data[258] = { + 16, // tile_width + 16, // tile_height + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x4B,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x4B,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B, + 0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, + 0x08,0x15,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B, +}; +uint8_t tileset_tile_51_data[258] = { + 16, // tile_width + 16, // tile_height + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x20,0x20,0x20,0x2B,0x2B,0x20,0x20,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x20,0x20,0x20,0x2B,0x2B,0x2B,0x2B,0x26,0x20,0x00,0x00,0x00,0x00, + 0x00,0x00,0x20,0x26,0x2B,0x20,0x2B,0x2B,0x2B,0x26,0x26,0x20,0x27,0x00,0x00,0x00, + 0x00,0x00,0x20,0x20,0x2B,0x2B,0x26,0x2B,0x26,0x2B,0x20,0x27,0x26,0x27,0x00,0x00, + 0x00,0x20,0x26,0x27,0x26,0x2B,0x2B,0x20,0x20,0x27,0x27,0x20,0x20,0x27,0x00,0x00, + 0x00,0x27,0x20,0x27,0x20,0x26,0x2B,0x26,0x2B,0x26,0x20,0x26,0x26,0x20,0x27,0x00, + 0x00,0x27,0x26,0x2B,0x20,0x20,0x26,0x2B,0x26,0x27,0x26,0x26,0x26,0x27,0x27,0x00, + 0x00,0x27,0x20,0x26,0x2B,0x20,0x2B,0x26,0x20,0x27,0x20,0x26,0x27,0x20,0x27,0x00, + 0x00,0x27,0x20,0x20,0x20,0x27,0x20,0x20,0x26,0x26,0x27,0x20,0x20,0x20,0x27,0x00, + 0x00,0x27,0x20,0x20,0x27,0x27,0x20,0x26,0x20,0x20,0x27,0x27,0x20,0x20,0x27,0x00, + 0x00,0x00,0x27,0x20,0x27,0x27,0x20,0x20,0x20,0x20,0x27,0x27,0x27,0x27,0x00,0x00, + 0x00,0x00,0x00,0x27,0x27,0x27,0x27,0x20,0x20,0x27,0x27,0x27,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x27,0x27,0x27,0x27,0x00,0x00,0x00,0x00,0x00,0x00, +}; +uint8_t tileset_tile_52_data[258] = { + 16, // tile_width + 16, // tile_height + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x29,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x29,0x29,0x29,0x29,0x29,0x36,0x36,0x29,0x29,0x29,0x29,0x29,0x00,0x00, + 0x00,0x33,0x36,0x36,0x36,0x36,0x2C,0x36,0x36,0x2C,0x36,0x36,0x36,0x36,0x29,0x00, + 0x00,0x33,0x36,0x36,0x36,0x36,0x36,0x2C,0x2C,0x36,0x36,0x36,0x36,0x36,0x29,0x00, + 0x00,0x33,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x29,0x00, + 0x00,0x33,0x2C,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x2C,0x29,0x00, + 0x00,0x33,0x2C,0x33,0x28,0x33,0x28,0x28,0x28,0x28,0x33,0x28,0x33,0x2C,0x29,0x00, + 0x00,0x33,0x2C,0x33,0x33,0x28,0x33,0x2C,0x2C,0x33,0x28,0x33,0x33,0x2C,0x29,0x00, + 0x00,0x33,0x2C,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x2C,0x29,0x00, + 0x00,0x33,0x2C,0x28,0x2C,0x2C,0x28,0x2C,0x28,0x2C,0x2C,0x2C,0x28,0x2C,0x29,0x00, + 0x00,0x33,0x2C,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x2C,0x29,0x00, + 0x00,0x00,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x00,0x00, + 0x00,0x00,0x00,0x00,0x35,0x35,0x33,0x2C,0x2C,0x29,0x35,0x35,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x35,0x35,0x35,0x33,0x36,0x2C,0x29,0x35,0x35,0x35,0x00,0x00,0x00, + 0x00,0x00,0x00,0x35,0x35,0x35,0x35,0x29,0x29,0x35,0x35,0x35,0x35,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x00,0x00,0x00,0x00, +}; +uint8_t tileset_tile_53_data[258] = { + 16, // tile_width + 16, // tile_height + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x37,0x37,0x37,0x37,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x37,0x09,0x09,0x09,0x09,0x37,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x37,0x09,0x1B,0x09,0x41,0x41,0x09,0x37,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x37,0x09,0x41,0x09,0x41,0x41,0x41,0x41,0x09,0x37,0x00,0x00,0x00, + 0x00,0x00,0x00,0x37,0x09,0x41,0x41,0x37,0x37,0x41,0x41,0x09,0x37,0x00,0x00,0x00, + 0x00,0x00,0x00,0x42,0x37,0x41,0x37,0x1B,0x35,0x37,0x41,0x37,0x42,0x00,0x00,0x00, + 0x00,0x00,0x00,0x42,0x43,0x37,0x37,0x35,0x35,0x37,0x37,0x43,0x42,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x42,0x43,0x1B,0x37,0x37,0x1B,0x43,0x42,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x42,0x43,0x1B,0x1B,0x43,0x42,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x42,0x42,0x42,0x42,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +}; +uint8_t tileset_tile_54_data[258] = { + 16, // tile_width + 16, // tile_height + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x04,0x04,0x01,0x04,0x04,0x01,0x04,0x04,0x00,0x00,0x00,0x00, + 0x00,0x00,0x04,0x04,0x05,0x05,0x04,0x01,0x01,0x04,0x05,0x05,0x04,0x04,0x00,0x00, + 0x00,0x04,0x05,0x01,0x05,0x01,0x05,0x05,0x05,0x05,0x01,0x05,0x01,0x05,0x04,0x00, + 0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x04, + 0x05,0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x05, + 0x04,0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x04, +}; +uint8_t tileset_tile_55_data[258] = { + 16, // tile_width + 16, // tile_height + 0x00,0x38,0x43,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x43,0x38,0x00, + 0x38,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x38, + 0x38,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x38, + 0x38,0x2F,0x44,0x44,0x48,0x2F,0x2F,0x2F,0x44,0x2F,0x2F,0x2F,0x44,0x2F,0x2F,0x38, + 0x38,0x2F,0x44,0x2F,0x44,0x2F,0x44,0x2F,0x2F,0x2F,0x48,0x2F,0x2F,0x44,0x2F,0x38, + 0x38,0x2F,0x48,0x2F,0x2F,0x2F,0x44,0x48,0x2F,0x2F,0x44,0x2F,0x44,0x48,0x2F,0x38, + 0x38,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x38, + 0x38,0x2F,0x46,0x09,0x09,0x09,0x46,0x09,0x09,0x09,0x46,0x46,0x09,0x46,0x2F,0x38, + 0x38,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x38, + 0x38,0x2F,0x46,0x2F,0x09,0x46,0x2F,0x09,0x09,0x2F,0x46,0x2F,0x46,0x09,0x2F,0x38, + 0x38,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x38, + 0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38, + 0x10,0x38,0x38,0x38,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x38,0x38,0x38,0x10, + 0x10,0x38,0x43,0x38,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x38,0x43,0x38,0x10, + 0x00,0x38,0x43,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x43,0x38,0x00, + 0x00,0x10,0x38,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x38,0x10,0x00, +}; +uint8_t tileset_tile_56_data[258] = { + 16, // tile_width + 16, // tile_height + 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, + 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, + 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, + 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, + 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, + 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, + 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, + 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, + 0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x10,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, + 0x00,0x00,0x02,0x30,0x15,0x15,0x15,0x07,0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07, + 0x00,0x00,0x02,0x30,0x21,0x21,0x21,0x07,0x07,0x2A,0x21,0x21,0x21,0x21,0x21,0x07, + 0x00,0x00,0x02,0x30,0x21,0x21,0x21,0x07,0x07,0x15,0x21,0x21,0x21,0x21,0x21,0x07, + 0x00,0x00,0x02,0x30,0x21,0x21,0x21,0x07,0x07,0x15,0x21,0x21,0x21,0x21,0x21,0x07, + 0x00,0x00,0x02,0x30,0x21,0x21,0x21,0x07,0x07,0x15,0x21,0x21,0x21,0x21,0x21,0x07, + 0x00,0x00,0x02,0x30,0x21,0x21,0x21,0x07,0x07,0x15,0x21,0x21,0x21,0x21,0x21,0x07, + 0x00,0x00,0x10,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x10, +}; +uint8_t tileset_tile_57_data[258] = { + 16, // tile_width + 16, // tile_height + 0x02,0x32,0x32,0x07,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x07,0x32,0x32,0x02, + 0x02,0x32,0x32,0x07,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x07,0x32,0x32,0x02, + 0x02,0x32,0x32,0x07,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x07,0x32,0x32,0x02, + 0x02,0x32,0x32,0x07,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x07,0x32,0x32,0x02, + 0x02,0x32,0x32,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x32,0x32,0x02, + 0x02,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x02, + 0x02,0x07,0x07,0x24,0x32,0x24,0x32,0x24,0x32,0x24,0x32,0x24,0x32,0x24,0x32,0x02, + 0x07,0x30,0x15,0x07,0x24,0x32,0x24,0x32,0x24,0x32,0x24,0x32,0x24,0x32,0x24,0x02, + 0x07,0x15,0x15,0x07,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x02, + 0x02,0x07,0x07,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x02, + 0x02,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x02, + 0x02,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x02, + 0x02,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x02, + 0x02,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x02, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, +}; +uint8_t tileset_tile_58_data[258] = { + 16, // tile_width + 16, // tile_height + 0x24,0x02,0x2E,0x34,0x2E,0x34,0x2E,0x02,0x02,0x34,0x2E,0x34,0x2E,0x34,0x02,0x24, + 0x24,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x24, + 0x24,0x02,0x34,0x34,0x34,0x34,0x34,0x02,0x02,0x34,0x34,0x34,0x34,0x34,0x02,0x24, + 0x24,0x02,0x34,0x34,0x34,0x34,0x34,0x02,0x02,0x34,0x34,0x34,0x34,0x34,0x02,0x24, + 0x24,0x02,0x34,0x34,0x34,0x34,0x34,0x02,0x02,0x34,0x34,0x34,0x34,0x34,0x02,0x24, + 0x24,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x24, + 0x15,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x15, + 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15, + 0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A, + 0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21, + 0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21, + 0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21, + 0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21, + 0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, +}; +uint8_t tileset_tile_59_data[258] = { + 16, // tile_width + 16, // tile_height + 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, + 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, + 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, + 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, + 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, + 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, + 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, + 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x10,0x10, + 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x2A,0x15,0x2A,0x07,0x02,0x10,0x10, + 0x07,0x30,0x15,0x15,0x15,0x15,0x21,0x07,0x10,0x15,0x15,0x15,0x07,0x02,0x10,0x10, + 0x07,0x2A,0x21,0x21,0x21,0x21,0x21,0x07,0x10,0x21,0x21,0x21,0x07,0x02,0x10,0x10, + 0x07,0x15,0x21,0x21,0x21,0x21,0x21,0x07,0x10,0x21,0x21,0x21,0x07,0x02,0x10,0x10, + 0x07,0x15,0x21,0x21,0x21,0x21,0x21,0x07,0x10,0x21,0x21,0x21,0x07,0x02,0x10,0x10, + 0x07,0x15,0x21,0x21,0x21,0x21,0x21,0x07,0x10,0x21,0x21,0x21,0x07,0x02,0x10,0x10, + 0x07,0x15,0x21,0x21,0x21,0x21,0x21,0x07,0x10,0x21,0x21,0x21,0x07,0x02,0x10,0x10, + 0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10, +}; +uint8_t tileset_tile_60_data[258] = { + 16, // tile_width + 16, // tile_height + 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x02,0x0B,0x17,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x02,0x0B,0x0B,0x17,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x02,0x0B,0x0B,0x0B,0x17,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x02,0x0A,0x0B,0x0B,0x0B,0x17,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x02,0x0A,0x0A,0x0B,0x0B,0x0B,0x17,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x10,0x02,0x0A,0x0A,0x0B,0x0B,0x0B,0x17,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x10,0x10,0x02,0x0A,0x0A,0x0B,0x0B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x00,0x10,0x10,0x02,0x0A,0x0A,0x0B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x00,0x00,0x10,0x10,0x02,0x0A,0x0A,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x00,0x00,0x00,0x10,0x10,0x02,0x0A,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, + 0x00,0x00,0x00,0x00,0x10,0x10,0x02,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, + 0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, +}; +uint8_t tileset_tile_61_data[258] = { + 16, // tile_width + 16, // tile_height + 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, + 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, + 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, + 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, + 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, + 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, + 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, + 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, + 0x02,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x02, + 0x02,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x02, + 0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x02, + 0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x02, + 0x02,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x02, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, +}; +uint8_t tileset_tile_62_data[258] = { + 16, // tile_width + 16, // tile_height + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x1B,0x16,0x0F,0x0F,0x0F,0x16,0x1B,0x1B, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x1B,0x0F,0x0F,0x1B,0x0F,0x0F,0x1B,0x1B, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x1B,0x0F,0x0F,0x1B,0x0F,0x0F,0x1B,0x1B, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0B,0x09,0x09,0x09,0x09,0x0B,0x0B,0x09, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0B,0x09,0x09,0x0B,0x0B,0x0B,0x0B,0x09, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0B,0x0B,0x09,0x09,0x0B,0x09,0x0B,0x09, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, + 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, +}; +uint8_t tileset_tile_63_data[258] = { + 16, // tile_width + 16, // tile_height + 0x1B,0x1B,0x16,0x0F,0x0F,0x0F,0x16,0x1B,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, + 0x1B,0x1B,0x0F,0x0F,0x16,0x1B,0x1B,0x1B,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, + 0x1B,0x1B,0x0F,0x0F,0x1B,0x1B,0x1B,0x1B,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, + 0x09,0x0B,0x09,0x09,0x16,0x0B,0x0B,0x0B,0x17,0x1B,0x1B,0x1B,0x1B,0x17,0x0B,0x02, + 0x09,0x0B,0x16,0x09,0x09,0x09,0x16,0x0B,0x17,0x1B,0x1B,0x1B,0x17,0x0B,0x0B,0x02, + 0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x17,0x1B,0x1B,0x17,0x0B,0x0B,0x0B,0x02, + 0x09,0x0B,0x09,0x0B,0x09,0x09,0x0B,0x0B,0x17,0x1B,0x17,0x0B,0x0B,0x0B,0x0A,0x02, + 0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x17,0x17,0x0B,0x0B,0x0B,0x0A,0x0A,0x02, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x17,0x0B,0x0B,0x0B,0x0A,0x0A,0x02,0x10, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x17,0x0B,0x0B,0x0A,0x0A,0x02,0x10,0x10, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x17,0x0B,0x0A,0x0A,0x02,0x10,0x10,0x00, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x17,0x0A,0x0A,0x02,0x10,0x10,0x00,0x00, + 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x0A,0x02,0x10,0x10,0x00,0x00,0x00, + 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x02,0x10,0x10,0x00,0x00,0x00,0x00, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x00,0x00,0x00,0x00,0x00, + 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x00, +}; +uint8_t tileset_tile_64_data[258] = { + 16, // tile_width + 16, // tile_height + 0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x15,0x15,0x08,0x08,0x15,0x15,0x08, + 0x4B,0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x15,0x0E,0x0E,0x15,0x15,0x0E,0x0E,0x15, + 0x4B,0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, + 0x4B,0x4B,0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x0E,0x0E,0x4B,0x4B,0x4B,0x4B,0x0E,0x0E, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, +}; +uint8_t tileset_tile_65_data[258] = { + 16, // tile_width + 16, // tile_height + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x3A,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x15,0x15,0x15,0x15,0x08,0x08,0x08,0x15,0x15,0x08,0x08,0x15,0x15,0x08, + 0x15,0x15,0x0E,0x0E,0x0E,0x0E,0x15,0x15,0x15,0x0E,0x0E,0x15,0x15,0x0E,0x0E,0x15, + 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, + 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, + 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, + 0x0E,0x0E,0x4B,0x4B,0x4B,0x4B,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B,0x4B,0x4B,0x0E,0x0E, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, +}; +uint8_t tileset_tile_66_data[258] = { + 16, // tile_width + 16, // tile_height + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x4B,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x4B,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B, + 0x08,0x08,0x15,0x15,0x15,0x15,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B, + 0x15,0x15,0x0E,0x0E,0x0E,0x0E,0x15,0x15,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B,0x4B, + 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B,0x4B, + 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B,0x4B,0x4B, + 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x0E,0x0E,0x4B,0x4B,0x4B,0x4B,0x0E,0x0E,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, +}; +uint8_t tileset_tile_67_data[258] = { + 16, // tile_width + 16, // tile_height + 0x4B,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08, + 0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x15,0x15,0x15,0x08,0x08,0x08,0x3A,0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x3A,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x15,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, +}; +uint8_t tileset_tile_68_data[258] = { + 16, // tile_width + 16, // tile_height + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x4B, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x15,0x15,0x15, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x15,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, +}; +uint8_t tileset_tile_69_data[258] = { + 16, // tile_width + 16, // tile_height + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x04,0x04,0x04,0x05,0x04, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x04,0x03,0x03,0x05,0x05,0x04,0x05, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x04,0x05,0x01,0x05,0x04,0x05,0x01, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x1F,0x4B,0x04,0x04,0x01,0x01,0x04,0x01,0x04,0x05,0x01, + 0x4B,0x4B,0x1F,0x4B,0x4B,0x1F,0x04,0x05,0x05,0x01,0x05,0x05,0x05,0x01,0x04,0x01, + 0x4B,0x4B,0x4B,0x1F,0x4B,0x4B,0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x01,0x01,0x01, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x04,0x03,0x05,0x05,0x05,0x05,0x05,0x05,0x04,0x04,0x01, + 0x4B,0x4B,0x4B,0x4B,0x04,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x04,0x04, + 0x4B,0x4B,0x1C,0x04,0x03,0x05,0x05,0x05,0x01,0x01,0x05,0x01,0x01,0x01,0x01,0x01, + 0x4B,0x4B,0x1C,0x03,0x01,0x05,0x05,0x01,0x04,0x01,0x05,0x05,0x01,0x05,0x05,0x04, + 0x4B,0x4B,0x04,0x03,0x01,0x01,0x01,0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x05, + 0x4B,0x4B,0x04,0x03,0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05, + 0x4B,0x1F,0x04,0x03,0x01,0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05, + 0x4B,0x1F,0x04,0x04,0x03,0x03,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05, + 0x1F,0x1F,0x04,0x03,0x01,0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05, + 0x1F,0x1C,0x03,0x01,0x04,0x01,0x04,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x05,0x05, +}; +uint8_t tileset_tile_70_data[258] = { + 16, // tile_width + 16, // tile_height + 0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01, + 0x01,0x01,0x05,0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x05,0x01,0x01, + 0x01,0x05,0x05,0x05,0x05,0x01,0x01,0x05,0x05,0x01,0x01,0x05,0x05,0x05,0x05,0x01, + 0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01, + 0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x01, + 0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x01,0x01,0x05,0x05,0x05,0x05,0x01,0x01,0x01, + 0x04,0x01,0x01,0x01,0x01,0x05,0x01,0x01,0x01,0x01,0x05,0x01,0x01,0x01,0x01,0x04, + 0x01,0x04,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x04,0x01, + 0x04,0x04,0x01,0x04,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x04, + 0x01,0x03,0x04,0x04,0x01,0x01,0x04,0x01,0x01,0x04,0x01,0x01,0x04,0x04,0x03,0x01, + 0x04,0x04,0x03,0x03,0x04,0x03,0x04,0x01,0x01,0x04,0x03,0x04,0x03,0x03,0x04,0x04, + 0x05,0x01,0x04,0x04,0x03,0x04,0x03,0x01,0x01,0x03,0x04,0x03,0x04,0x04,0x01,0x05, + 0x05,0x01,0x04,0x04,0x04,0x01,0x01,0x04,0x04,0x01,0x01,0x04,0x04,0x04,0x01,0x05, + 0x05,0x01,0x01,0x01,0x01,0x05,0x05,0x01,0x01,0x05,0x05,0x01,0x01,0x01,0x01,0x05, + 0x05,0x05,0x05,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x05,0x05,0x05, + 0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01, +}; +uint8_t tileset_tile_71_data[258] = { + 16, // tile_width + 16, // tile_height + 0x04,0x05,0x04,0x04,0x04,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x05,0x04,0x05,0x05,0x03,0x03,0x04,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x01,0x05,0x04,0x05,0x01,0x05,0x04,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x01,0x05,0x04,0x01,0x04,0x01,0x01,0x04,0x04,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x01,0x04,0x01,0x05,0x05,0x05,0x01,0x05,0x05,0x04,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x01,0x01,0x01,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x01,0x04,0x04,0x05,0x05,0x05,0x05,0x05,0x05,0x03,0x04,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x04,0x04,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x04,0x4B,0x4B,0x4B,0x4B, + 0x01,0x01,0x01,0x01,0x01,0x05,0x01,0x01,0x05,0x05,0x05,0x03,0x04,0x1C,0x4B,0x4B, + 0x04,0x05,0x05,0x01,0x05,0x05,0x01,0x04,0x01,0x05,0x05,0x01,0x03,0x1C,0x4B,0x4B, + 0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x01,0x01,0x01,0x01,0x03,0x04,0x4B,0x4B, + 0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x01,0x03,0x04,0x4B,0x4B, + 0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x01,0x03,0x04,0x1F,0x4B, + 0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x03,0x03,0x04,0x04,0x1F,0x4B, + 0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x04,0x01,0x03,0x04,0x1F,0x1F, + 0x05,0x05,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x04,0x01,0x04,0x01,0x03,0x1C,0x1F, +}; +uint8_t tileset_tile_72_data[258] = { + 16, // tile_width + 16, // tile_height + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x11,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x00,0x00,0x00,0x00,0x00,0x0C,0x11,0x11,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x00,0x00,0x00,0x00,0x0C,0x11,0x11,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x00,0x00,0x00,0x0C,0x0C,0x11,0x22,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x00,0x00,0x0C,0x11,0x0C,0x22,0x22,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x00,0x0C,0x11,0x11,0x0C,0x22,0x22,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x0C,0x11,0x11,0x22,0x0C,0x22,0x22,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, +}; +uint8_t tileset_tile_73_data[258] = { + 16, // tile_width + 16, // tile_height + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, +}; +uint8_t tileset_tile_74_data[258] = { + 16, // tile_width + 16, // tile_height + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, +}; +uint8_t tileset_tile_75_data[258] = { + 16, // tile_width + 16, // tile_height + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x0C,0x00,0x00,0x00,0x00,0x00,0x00, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x0C,0x00,0x00,0x00,0x00,0x00, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x00,0x00,0x00,0x00, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x0C,0x00,0x00,0x00, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x22,0x0C,0x00,0x00, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x22,0x22,0x0C,0x00, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x0C, +}; +uint8_t tileset_tile_76_data[258] = { + 16, // tile_width + 16, // tile_height + 0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, + 0x02,0x16,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, + 0x02,0x16,0x16,0x12,0x12,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12, + 0x02,0x16,0x16,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09, + 0x02,0x16,0x16,0x12,0x12,0x12,0x12,0x09,0x12,0x12,0x09,0x0F,0x0F,0x0F,0x09,0x12, + 0x02,0x16,0x16,0x0F,0x0F,0x0F,0x0F,0x09,0x0F,0x0F,0x0F,0x09,0x09,0x09,0x0F,0x0F, + 0x02,0x16,0x16,0x12,0x12,0x12,0x12,0x09,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x12, + 0x02,0x16,0x16,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09, + 0x02,0x16,0x16,0x12,0x12,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12, + 0x02,0x16,0x16,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, + 0x02,0x16,0x16,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x02,0x16,0x07,0x0F,0x09,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x0F,0x16,0x16,0x16, + 0x02,0x0F,0x07,0x0F,0x09,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x0F,0x16,0x16,0x16, + 0x02,0x0F,0x07,0x0F,0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x0F,0x12,0x12,0x12, + 0x02,0x0F,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x02,0x0F,0x09,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, +}; +uint8_t tileset_tile_77_data[258] = { + 16, // tile_width + 16, // tile_height + 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, + 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, + 0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12, + 0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09, + 0x12,0x12,0x09,0x0F,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x0F,0x09,0x12, + 0x0F,0x0F,0x0F,0x09,0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x09,0x0F,0x0F, + 0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x12, + 0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09, + 0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12, + 0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x16,0x16,0x16,0x16,0x0F,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x0F,0x16,0x16,0x16, + 0x16,0x16,0x16,0x16,0x0F,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x0F,0x16,0x16,0x16, + 0x12,0x12,0x12,0x12,0x0F,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x0F,0x12,0x12,0x12, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, +}; +uint8_t tileset_tile_78_data[258] = { + 16, // tile_width + 16, // tile_height + 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, + 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, + 0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12, + 0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09, + 0x12,0x12,0x09,0x0F,0x0F,0x0F,0x09,0x12,0x12,0x12,0x09,0x0F,0x0F,0x0F,0x09,0x12, + 0x0F,0x0F,0x0F,0x09,0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x09,0x0F,0x0F, + 0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x12, + 0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09, + 0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12, + 0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x16,0x16,0x16,0x16,0x0F,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x0F,0x16,0x16,0x16, + 0x16,0x16,0x16,0x16,0x0F,0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x0F,0x16,0x16,0x16, + 0x12,0x12,0x12,0x12,0x0F,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x0F,0x12,0x12,0x12, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, +}; +uint8_t tileset_tile_79_data[258] = { + 16, // tile_width + 16, // tile_height + 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x00, + 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x02, + 0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x12,0x09,0x09,0x02, + 0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x02, + 0x12,0x12,0x09,0x0F,0x0F,0x0F,0x09,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x09,0x02, + 0x0F,0x0F,0x0F,0x09,0x09,0x09,0x0F,0x0F,0x0F,0x09,0x0F,0x0F,0x0F,0x09,0x09,0x02, + 0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x12,0x12,0x09,0x12,0x12,0x12,0x09,0x09,0x02, + 0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x02, + 0x09,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x09,0x12,0x12,0x12,0x12,0x09,0x09,0x02, + 0x09,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x09,0x0F,0x0F,0x0F,0x0F,0x09,0x09,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x09,0x09,0x02, + 0x16,0x16,0x16,0x16,0x0F,0x16,0x16,0x16,0x16,0x16,0x16,0x09,0x0F,0x07,0x09,0x02, + 0x16,0x16,0x16,0x16,0x0F,0x16,0x16,0x16,0x16,0x16,0x16,0x09,0x0F,0x07,0x07,0x02, + 0x12,0x12,0x12,0x12,0x0F,0x12,0x12,0x12,0x12,0x12,0x12,0x09,0x0F,0x07,0x07,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02, +}; +uint8_t tileset_tile_80_data[258] = { + 16, // tile_width + 16, // tile_height + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x0D,0x4B,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x0D,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0D,0x0D, + 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B, + 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B, + 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0B,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0B,0x0B, + 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D, + 0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, + 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, + 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06, + 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x06,0x06,0x06,0x13,0x06,0x06,0x06,0x06, + 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x06,0x06,0x06,0x13,0x13,0x06,0x06,0x06, + 0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x13,0x06,0x06,0x13,0x06,0x06,0x13,0x06,0x13, + 0x4B,0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x06,0x0D,0x06,0x06,0x06,0x06,0x0D,0x06, + 0x4B,0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, +}; +uint8_t tileset_tile_81_data[258] = { + 16, // tile_width + 16, // tile_height + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D, + 0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0B,0x0B,0x0B,0x0B,0x13, + 0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x13, + 0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x13, + 0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0D,0x0D,0x0D,0x0D,0x13, + 0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x0D,0x0D,0x0D,0x06,0x06,0x06,0x06,0x0D, + 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, + 0x06,0x06,0x0D,0x13,0x13,0x13,0x0D,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, + 0x06,0x06,0x06,0x0D,0x13,0x13,0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06, + 0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x06,0x06,0x06,0x06, + 0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x13,0x06,0x06,0x06, + 0x06,0x06,0x13,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x06,0x06,0x13,0x06,0x13, + 0x06,0x13,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x0D,0x06, + 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, +}; +uint8_t tileset_tile_82_data[258] = { + 16, // tile_width + 16, // tile_height + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x4B,0x0D,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B, + 0x0D,0x0D,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0D,0x4B,0x4B, + 0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, + 0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, + 0x0B,0x0B,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0B,0x0B,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, + 0x0D,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, + 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B, + 0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, + 0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, + 0x06,0x06,0x06,0x13,0x06,0x06,0x06,0x06,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, + 0x06,0x06,0x06,0x13,0x13,0x06,0x06,0x06,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, + 0x06,0x06,0x13,0x06,0x06,0x13,0x06,0x13,0x13,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B, + 0x06,0x0D,0x06,0x06,0x06,0x06,0x0D,0x06,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B,0x4B, + 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B,0x4B, +}; +uint8_t tileset_tile_83_data[258] = { + 16, // tile_width + 16, // tile_height + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x3A,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x15,0x15,0x15,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x0E,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x4B,0x0E,0x0E,0x0E,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, +}; +uint8_t tileset_tile_84_data[258] = { + 16, // tile_width + 16, // tile_height + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x3A,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x08,0x08, + 0x08,0x08,0x08,0x15,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x15,0x15,0x15, + 0x08,0x15,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E, + 0x08,0x08,0x08,0x08,0x08,0x3A,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x0E, + 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x15,0x0E,0x0E,0x0E,0x4B, +}; +uint8_t tileset_tile_85_data[258] = { + 16, // tile_width + 16, // tile_height + 0x1C,0x1C,0x03,0x01,0x01,0x04,0x04,0x01,0x05,0x05,0x05,0x01,0x01,0x01,0x01,0x04, + 0x1C,0x03,0x01,0x05,0x01,0x04,0x01,0x04,0x01,0x01,0x01,0x05,0x05,0x01,0x01,0x04, + 0x1C,0x03,0x01,0x01,0x05,0x01,0x04,0x04,0x04,0x01,0x01,0x05,0x05,0x01,0x04,0x04, + 0x1C,0x04,0x04,0x05,0x01,0x05,0x01,0x04,0x04,0x04,0x04,0x01,0x01,0x04,0x03,0x04, + 0x1C,0x04,0x01,0x01,0x05,0x01,0x01,0x01,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03, + 0x1C,0x03,0x01,0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x04,0x04,0x03,0x03,0x03,0x03, + 0x1C,0x03,0x04,0x04,0x01,0x01,0x04,0x01,0x01,0x04,0x04,0x03,0x03,0x04,0x03,0x03, + 0x1C,0x04,0x04,0x04,0x04,0x04,0x04,0x01,0x04,0x03,0x04,0x03,0x01,0x04,0x04,0x04, + 0x1F,0x04,0x03,0x04,0x04,0x04,0x04,0x04,0x01,0x03,0x04,0x01,0x01,0x01,0x01,0x04, + 0x1F,0x1F,0x04,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x01,0x01,0x01,0x01,0x01, + 0x4B,0x1F,0x04,0x04,0x03,0x03,0x03,0x04,0x04,0x04,0x01,0x04,0x01,0x01,0x01,0x01, + 0x4B,0x1F,0x1F,0x04,0x04,0x03,0x03,0x03,0x03,0x01,0x04,0x01,0x01,0x01,0x01,0x01, + 0x4B,0x4B,0x1F,0x1C,0x1C,0x04,0x04,0x03,0x03,0x03,0x01,0x01,0x04,0x01,0x04,0x01, + 0x4B,0x4B,0x4B,0x1C,0x1C,0x1C,0x04,0x04,0x03,0x03,0x04,0x03,0x04,0x04,0x04,0x04, + 0x4B,0x4B,0x1F,0x1C,0x1C,0x1C,0x04,0x04,0x04,0x03,0x03,0x04,0x03,0x04,0x03,0x04, + 0x4B,0x1F,0x1F,0x1C,0x1C,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x04,0x04,0x03,0x03, +}; +uint8_t tileset_tile_86_data[258] = { + 16, // tile_width + 16, // tile_height + 0x01,0x05,0x05,0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x05,0x05,0x01, + 0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x05,0x05,0x01,0x01,0x05,0x05,0x05,0x05,0x05, + 0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05, + 0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x04, + 0x04,0x04,0x01,0x01,0x05,0x05,0x05,0x01,0x01,0x05,0x05,0x05,0x01,0x01,0x04,0x04, + 0x04,0x04,0x04,0x04,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x04,0x04,0x04,0x04, + 0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x01,0x01,0x04,0x04,0x04,0x04,0x04,0x03,0x03, + 0x04,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x04, + 0x01,0x03,0x04,0x04,0x04,0x01,0x04,0x04,0x04,0x04,0x01,0x04,0x04,0x04,0x03,0x01, + 0x01,0x01,0x04,0x04,0x01,0x01,0x01,0x04,0x04,0x01,0x01,0x01,0x04,0x04,0x01,0x01, + 0x01,0x01,0x04,0x04,0x04,0x04,0x01,0x04,0x04,0x01,0x04,0x04,0x04,0x04,0x01,0x01, + 0x01,0x01,0x04,0x04,0x05,0x05,0x04,0x01,0x01,0x04,0x05,0x05,0x04,0x04,0x01,0x01, + 0x01,0x04,0x05,0x01,0x05,0x01,0x05,0x05,0x05,0x05,0x01,0x05,0x01,0x05,0x04,0x01, + 0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x04, + 0x05,0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x05, + 0x04,0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x04, +}; +uint8_t tileset_tile_87_data[258] = { + 16, // tile_width + 16, // tile_height + 0x04,0x01,0x01,0x01,0x01,0x05,0x05,0x05,0x01,0x04,0x04,0x01,0x01,0x03,0x1C,0x1C, + 0x04,0x01,0x01,0x05,0x05,0x01,0x01,0x01,0x04,0x01,0x04,0x01,0x05,0x01,0x03,0x1C, + 0x04,0x04,0x01,0x05,0x05,0x01,0x01,0x04,0x04,0x04,0x01,0x05,0x01,0x01,0x03,0x1C, + 0x04,0x03,0x04,0x01,0x01,0x04,0x04,0x04,0x04,0x01,0x05,0x01,0x05,0x04,0x04,0x1C, + 0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x01,0x01,0x01,0x05,0x01,0x01,0x04,0x1C, + 0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x01,0x04,0x01,0x01,0x01,0x01,0x01,0x03,0x1C, + 0x03,0x03,0x04,0x03,0x03,0x04,0x04,0x01,0x01,0x04,0x01,0x01,0x04,0x04,0x03,0x1C, + 0x04,0x04,0x04,0x01,0x03,0x04,0x03,0x04,0x01,0x04,0x04,0x04,0x04,0x04,0x04,0x1C, + 0x04,0x01,0x01,0x01,0x01,0x04,0x03,0x01,0x04,0x04,0x04,0x04,0x04,0x03,0x04,0x1F, + 0x01,0x01,0x01,0x01,0x01,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x04,0x1F,0x1F, + 0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x04,0x04,0x03,0x03,0x03,0x04,0x04,0x1F,0x4B, + 0x01,0x01,0x01,0x01,0x01,0x04,0x01,0x03,0x03,0x03,0x03,0x04,0x04,0x1F,0x1F,0x4B, + 0x01,0x04,0x01,0x04,0x01,0x01,0x03,0x03,0x03,0x04,0x04,0x1C,0x1C,0x1F,0x4B,0x4B, + 0x04,0x04,0x04,0x04,0x03,0x04,0x03,0x03,0x04,0x04,0x1C,0x1C,0x1C,0x4B,0x4B,0x4B, + 0x04,0x03,0x04,0x03,0x04,0x03,0x03,0x04,0x04,0x04,0x1C,0x1C,0x1C,0x1F,0x4B,0x4B, + 0x04,0x04,0x04,0x04,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x1C,0x1C,0x1F,0x1F,0x4B, +}; +uint8_t tileset_tile_88_data[258] = { + 16, // tile_width + 16, // tile_height + 0x02,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x02,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x02,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x02,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x02,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x02,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x02,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x02,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x02,0x22,0x22,0x22,0x0C,0x22,0x22,0x25,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x02,0x22,0x22,0x22,0x0C,0x22,0x25,0x25,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x02,0x22,0x22,0x22,0x0C,0x25,0x25,0x25,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x02,0x22,0x22,0x22,0x0C,0x25,0x25,0x25,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x02,0x22,0x22,0x25,0x07,0x07,0x25,0x25,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x02,0x22,0x25,0x25,0x25,0x07,0x07,0x25,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x02,0x25,0x25,0x25,0x25,0x25,0x07,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x02,0x0C,0x25,0x25,0x25,0x25,0x25,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, +}; +uint8_t tileset_tile_89_data[258] = { + 16, // tile_width + 16, // tile_height + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0C,0x0A,0x0B, + 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0A,0x0B,0x0B,0x0B, + 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0B,0x0B,0x0B,0x0B,0x0B, + 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0A,0x0B,0x0B,0x0A,0x0C,0x0C, + 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0B,0x0B,0x0A,0x0C,0x22,0x0B, + 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0A,0x0B,0x0B,0x0C,0x22,0x0B,0x0B, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x0C,0x0C,0x25,0x25,0x25,0x0C,0x0B,0x0B,0x0B, +}; +uint8_t tileset_tile_90_data[258] = { + 16, // tile_width + 16, // tile_height + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C, + 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x0B,0x0A,0x0C,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x0B,0x0B,0x0B,0x0A,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x0B,0x0B,0x0B,0x0B,0x0B,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x0C,0x0C,0x0A,0x0B,0x0B,0x0A,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x0B,0x22,0x0C,0x0A,0x0B,0x0B,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x0B,0x0B,0x22,0x0C,0x0B,0x0B,0x0A,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x0B,0x0B,0x0B,0x0C,0x25,0x25,0x25,0x0C,0x0C,0x07,0x07,0x07,0x07,0x07,0x07,0x07, +}; +uint8_t tileset_tile_91_data[258] = { + 16, // tile_width + 16, // tile_height + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x02, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x02, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x02, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x02, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x02, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x02, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x02, + 0x11,0x11,0x11,0x0C,0x11,0x11,0x11,0x0C,0x22,0x22,0x22,0x0C,0x22,0x22,0x22,0x02, + 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x25,0x22,0x22,0x0C,0x22,0x22,0x22,0x02, + 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x25,0x25,0x22,0x0C,0x22,0x22,0x22,0x02, + 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x25,0x25,0x25,0x0C,0x22,0x22,0x22,0x02, + 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x25,0x25,0x25,0x0C,0x22,0x22,0x22,0x02, + 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x25,0x25,0x07,0x07,0x25,0x22,0x22,0x02, + 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x25,0x07,0x07,0x25,0x25,0x25,0x22,0x02, + 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x07,0x25,0x25,0x25,0x25,0x25,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x25,0x25,0x25,0x25,0x25,0x0C,0x02, +}; +uint8_t tileset_tile_92_data[258] = { + 16, // tile_width + 16, // tile_height + 0x02,0x12,0x12,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x02,0x12,0x12,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x02,0x12,0x12,0x0F,0x0F,0x0F,0x0F,0x0F,0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x0F, + 0x02,0x12,0x12,0x07,0x07,0x07,0x07,0x07,0x09,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07, + 0x02,0x12,0x12,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x09, + 0x02,0x12,0x12,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x0F,0x07,0x07,0x07,0x0F,0x09, + 0x02,0x12,0x12,0x0F,0x0F,0x0F,0x0F,0x07,0x09,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F, + 0x02,0x12,0x12,0x07,0x07,0x07,0x07,0x07,0x0F,0x07,0x09,0x09,0x09,0x09,0x09,0x07, + 0x02,0x12,0x12,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x02,0x12,0x12,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x02,0x12,0x12,0x0F,0x0F,0x0F,0x0F,0x0F,0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x0F, + 0x02,0x12,0x12,0x07,0x07,0x07,0x07,0x07,0x09,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07, + 0x02,0x12,0x12,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x09, + 0x02,0x12,0x12,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x0F,0x07,0x07,0x07,0x0F,0x09, + 0x02,0x12,0x12,0x0F,0x0F,0x0F,0x0F,0x07,0x09,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F, + 0x02,0x12,0x12,0x07,0x07,0x07,0x07,0x07,0x0F,0x07,0x09,0x09,0x09,0x09,0x09,0x07, +}; +uint8_t tileset_tile_93_data[258] = { + 16, // tile_width + 16, // tile_height + 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x0F,0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x0F, + 0x09,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07,0x09,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07, + 0x09,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x09, + 0x09,0x09,0x0F,0x07,0x07,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07,0x07,0x07,0x0F,0x09, + 0x09,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F,0x09,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F, + 0x0F,0x07,0x09,0x09,0x09,0x09,0x09,0x07,0x0F,0x07,0x09,0x09,0x09,0x09,0x09,0x07, + 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x0F,0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x0F, + 0x09,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07,0x09,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07, + 0x09,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x09, + 0x09,0x09,0x0F,0x07,0x07,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07,0x07,0x07,0x0F,0x09, + 0x09,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F,0x09,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F, + 0x0F,0x07,0x09,0x09,0x09,0x09,0x09,0x07,0x0F,0x07,0x09,0x09,0x09,0x09,0x09,0x07, +}; +uint8_t tileset_tile_94_data[258] = { + 16, // tile_width + 16, // tile_height + 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x0F,0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x0F, + 0x09,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07,0x09,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07, + 0x09,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x09, + 0x09,0x09,0x0F,0x07,0x07,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07,0x07,0x07,0x0F,0x09, + 0x09,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F,0x09,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F, + 0x0F,0x07,0x09,0x09,0x09,0x09,0x09,0x07,0x0F,0x07,0x09,0x09,0x09,0x09,0x09,0x07, + 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x0F,0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x0F, + 0x09,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07,0x09,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07, + 0x09,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x09, + 0x09,0x09,0x0F,0x07,0x07,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07,0x07,0x07,0x0F,0x09, + 0x09,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F,0x09,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F, + 0x0F,0x07,0x09,0x09,0x09,0x09,0x09,0x07,0x0F,0x07,0x09,0x09,0x09,0x09,0x09,0x07, +}; +uint8_t tileset_tile_95_data[258] = { + 16, // tile_width + 16, // tile_height + 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x07,0x07,0x02, + 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x07,0x07,0x02, + 0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x0F,0x07,0x0F,0x0F,0x0F,0x0F,0x07,0x07,0x02, + 0x09,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07,0x09,0x07,0x07,0x07,0x07,0x07,0x07,0x02, + 0x09,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x09,0x09,0x07,0x09,0x09,0x09,0x07,0x07,0x02, + 0x09,0x09,0x0F,0x07,0x07,0x07,0x0F,0x09,0x09,0x07,0x09,0x09,0x09,0x07,0x07,0x02, + 0x09,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x07,0x02, + 0x0F,0x07,0x09,0x09,0x09,0x09,0x09,0x07,0x0F,0x07,0x07,0x07,0x07,0x07,0x07,0x02, + 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x07,0x07,0x02, + 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x07,0x07,0x02, + 0x07,0x0F,0x09,0x09,0x09,0x09,0x09,0x0F,0x07,0x0F,0x0F,0x0F,0x0F,0x07,0x07,0x02, + 0x09,0x07,0x0F,0x09,0x09,0x09,0x0F,0x07,0x09,0x07,0x07,0x07,0x07,0x07,0x07,0x02, + 0x09,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x09,0x09,0x07,0x09,0x09,0x09,0x07,0x07,0x02, + 0x09,0x09,0x0F,0x07,0x07,0x07,0x0F,0x09,0x09,0x07,0x09,0x09,0x09,0x07,0x07,0x02, + 0x09,0x0F,0x07,0x09,0x09,0x09,0x07,0x0F,0x09,0x07,0x0F,0x0F,0x0F,0x07,0x07,0x02, + 0x0F,0x07,0x09,0x09,0x09,0x09,0x09,0x07,0x0F,0x07,0x07,0x07,0x07,0x07,0x07,0x02, +}; +uint8_t tileset_tile_96_data[258] = { + 16, // tile_width + 16, // tile_height + 0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, + 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, + 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06, + 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06, + 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x13,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06, + 0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x13,0x13,0x13,0x13,0x06,0x06,0x13,0x06,0x06, + 0x4B,0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x0D,0x06,0x06,0x06,0x06,0x13,0x06, + 0x4B,0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, + 0x4B,0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, + 0x4B,0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, + 0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06, + 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x06,0x06,0x06,0x06,0x13,0x06,0x06,0x06,0x06, + 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x06,0x06,0x06,0x06,0x13,0x13,0x06,0x06,0x06, + 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x06,0x06,0x06,0x13,0x06,0x06,0x13,0x06,0x13, + 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x0D,0x06, + 0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x0D,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, +}; +uint8_t tileset_tile_97_data[258] = { + 16, // tile_width + 16, // tile_height + 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, + 0x06,0x13,0x06,0x06,0x06,0x06,0x0D,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, + 0x06,0x06,0x0D,0x06,0x06,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06, + 0x06,0x06,0x06,0x13,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06, + 0x06,0x06,0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06, + 0x06,0x06,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x06,0x06,0x13,0x06,0x06, + 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x13,0x06, + 0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, + 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, + 0x06,0x06,0x0D,0x13,0x13,0x13,0x0D,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, + 0x06,0x06,0x06,0x0D,0x13,0x13,0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06, + 0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x06,0x06,0x06,0x06, + 0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x13,0x06,0x06,0x06, + 0x06,0x06,0x13,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x06,0x06,0x13,0x06,0x13, + 0x06,0x13,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x0D,0x06, + 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, +}; +uint8_t tileset_tile_98_data[258] = { + 16, // tile_width + 16, // tile_height + 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x13,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B, + 0x06,0x13,0x06,0x06,0x06,0x06,0x0D,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, + 0x06,0x06,0x0D,0x06,0x06,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, + 0x06,0x06,0x06,0x13,0x0D,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, + 0x06,0x06,0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, + 0x06,0x06,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B, + 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B,0x4B, + 0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B,0x4B, + 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B,0x4B, + 0x06,0x06,0x0D,0x13,0x13,0x13,0x0D,0x06,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B,0x4B, + 0x06,0x06,0x06,0x0D,0x13,0x13,0x06,0x06,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B, + 0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, + 0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, + 0x06,0x06,0x13,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, + 0x06,0x13,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, + 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x0D,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B, +}; +uint8_t tileset_tile_99_data[258] = { + 16, // tile_width + 16, // tile_height + 0x4B,0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, + 0x4B,0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, + 0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0B,0x0D,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06, + 0x0D,0x0D,0x0D,0x0B,0x0B,0x0B,0x0D,0x0D,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06, + 0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x13,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06, + 0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x13,0x13,0x13,0x06,0x06,0x13,0x06,0x06, + 0x0B,0x0B,0x0D,0x0B,0x0B,0x0D,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x13,0x06, + 0x0D,0x0D,0x0D,0x0D,0x0D,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, + 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, + 0x06,0x06,0x0D,0x13,0x13,0x13,0x0D,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, + 0x06,0x06,0x06,0x0D,0x13,0x13,0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06, + 0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x06,0x06,0x06,0x06, + 0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x13,0x06,0x06,0x06, + 0x06,0x06,0x13,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x06,0x06,0x13,0x06,0x13, + 0x06,0x13,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x0D,0x06, + 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, +}; +uint8_t tileset_tile_100_data[258] = { + 16, // tile_width + 16, // tile_height + 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B,0x4B, + 0x06,0x13,0x06,0x06,0x06,0x06,0x0D,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B,0x4B, + 0x06,0x06,0x0D,0x06,0x06,0x13,0x13,0x13,0x0D,0x0B,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B, + 0x06,0x06,0x06,0x13,0x0D,0x13,0x13,0x13,0x0D,0x0D,0x0B,0x0B,0x0B,0x0D,0x0D,0x0D, + 0x06,0x06,0x06,0x0D,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B, + 0x06,0x06,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B, + 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0D,0x0B,0x0B, + 0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x13,0x13,0x0D,0x0D,0x0D,0x0D,0x0D, + 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, + 0x06,0x06,0x0D,0x13,0x13,0x13,0x0D,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, + 0x06,0x06,0x06,0x0D,0x13,0x13,0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06, + 0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x06,0x06,0x06,0x06, + 0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x13,0x06,0x06,0x06, + 0x06,0x06,0x13,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x13,0x06,0x06,0x13,0x06,0x13, + 0x06,0x13,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x0D,0x06, + 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, +}; +uint8_t tileset_tile_101_data[258] = { + 16, // tile_width + 16, // tile_height + 0x1F,0x1F,0x1C,0x1C,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x05,0x04, + 0x1F,0x1C,0x1C,0x04,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x05,0x05,0x04,0x05, + 0x1F,0x1C,0x1C,0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x05,0x01,0x05,0x04,0x05,0x01, + 0x1F,0x1C,0x1C,0x04,0x03,0x03,0x03,0x03,0x03,0x01,0x01,0x04,0x01,0x04,0x05,0x01, + 0x1F,0x1C,0x1C,0x04,0x03,0x03,0x03,0x05,0x05,0x01,0x05,0x05,0x05,0x01,0x04,0x01, + 0x1F,0x1F,0x1C,0x04,0x03,0x03,0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x01,0x01,0x01, + 0x4B,0x1F,0x1C,0x1C,0x04,0x03,0x03,0x05,0x05,0x05,0x05,0x05,0x05,0x04,0x04,0x01, + 0x4B,0x1F,0x1C,0x04,0x04,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x04,0x04, + 0x4B,0x4B,0x1C,0x04,0x03,0x05,0x05,0x05,0x01,0x01,0x05,0x01,0x01,0x01,0x01,0x01, + 0x4B,0x4B,0x1C,0x03,0x01,0x05,0x05,0x01,0x04,0x01,0x05,0x05,0x01,0x05,0x05,0x04, + 0x4B,0x4B,0x04,0x03,0x01,0x01,0x01,0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x05, + 0x4B,0x4B,0x04,0x03,0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05, + 0x4B,0x1F,0x04,0x03,0x01,0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05, + 0x4B,0x1F,0x04,0x04,0x03,0x03,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05, + 0x1F,0x1F,0x04,0x03,0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05, + 0x1F,0x1C,0x03,0x01,0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x05,0x05, +}; +uint8_t tileset_tile_102_data[258] = { + 16, // tile_width + 16, // tile_height + 0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01, + 0x01,0x01,0x05,0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x05,0x01,0x01, + 0x01,0x05,0x05,0x05,0x05,0x01,0x01,0x05,0x05,0x01,0x01,0x05,0x05,0x05,0x05,0x01, + 0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01, + 0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x01, + 0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x01,0x01,0x05,0x05,0x05,0x05,0x01,0x01,0x01, + 0x04,0x01,0x01,0x01,0x01,0x05,0x01,0x01,0x01,0x01,0x05,0x01,0x01,0x01,0x01,0x04, + 0x01,0x04,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x04,0x01, + 0x04,0x04,0x01,0x04,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x04, + 0x01,0x03,0x04,0x04,0x01,0x01,0x04,0x01,0x01,0x04,0x01,0x01,0x04,0x04,0x03,0x01, + 0x04,0x04,0x03,0x03,0x04,0x03,0x04,0x01,0x01,0x04,0x03,0x04,0x03,0x03,0x04,0x04, + 0x05,0x01,0x04,0x04,0x03,0x04,0x03,0x01,0x01,0x03,0x04,0x03,0x04,0x04,0x01,0x05, + 0x05,0x01,0x04,0x04,0x04,0x01,0x01,0x04,0x04,0x01,0x01,0x04,0x04,0x04,0x01,0x05, + 0x05,0x01,0x01,0x01,0x01,0x05,0x05,0x01,0x01,0x05,0x05,0x01,0x01,0x01,0x01,0x05, + 0x05,0x05,0x05,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x05,0x05,0x05, + 0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01, +}; +uint8_t tileset_tile_103_data[258] = { + 16, // tile_width + 16, // tile_height + 0x04,0x05,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x1C,0x1C,0x1F,0x1F, + 0x05,0x04,0x05,0x05,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x04,0x1C,0x1C,0x1F, + 0x01,0x05,0x04,0x05,0x01,0x05,0x03,0x03,0x03,0x03,0x03,0x03,0x04,0x1C,0x1C,0x1F, + 0x01,0x05,0x04,0x01,0x04,0x01,0x01,0x03,0x03,0x03,0x03,0x03,0x04,0x1C,0x1C,0x1F, + 0x01,0x04,0x01,0x05,0x05,0x05,0x01,0x05,0x05,0x03,0x03,0x03,0x04,0x1C,0x1C,0x1F, + 0x01,0x01,0x01,0x05,0x05,0x05,0x05,0x01,0x01,0x01,0x03,0x03,0x04,0x1C,0x1F,0x1F, + 0x01,0x04,0x04,0x05,0x05,0x05,0x05,0x05,0x05,0x03,0x03,0x04,0x1C,0x1C,0x1F,0x4B, + 0x04,0x04,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x04,0x04,0x1C,0x1F,0x4B, + 0x01,0x01,0x01,0x01,0x01,0x05,0x01,0x01,0x05,0x05,0x05,0x03,0x04,0x1C,0x4B,0x4B, + 0x04,0x05,0x05,0x01,0x05,0x05,0x01,0x04,0x01,0x05,0x05,0x01,0x03,0x1C,0x4B,0x4B, + 0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x01,0x01,0x01,0x01,0x03,0x04,0x4B,0x4B, + 0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x01,0x03,0x04,0x4B,0x4B, + 0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x01,0x03,0x04,0x1F,0x4B, + 0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x03,0x03,0x04,0x04,0x1F,0x4B, + 0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x01,0x03,0x04,0x1F,0x1F, + 0x05,0x05,0x01,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x01,0x03,0x1C,0x1F, +}; +uint8_t tileset_tile_104_data[258] = { + 16, // tile_width + 16, // tile_height + 0x02,0x07,0x0C,0x25,0x25,0x25,0x25,0x25,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x02,0x02,0x07,0x0C,0x25,0x25,0x25,0x25,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x02,0x10,0x02,0x07,0x0C,0x25,0x25,0x25,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x02,0x17,0x10,0x02,0x07,0x0C,0x25,0x25,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x02,0x0B,0x17,0x10,0x02,0x07,0x0C,0x25,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x02,0x1B,0x0B,0x17,0x10,0x02,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x02,0x10,0x1B,0x0B,0x17,0x10,0x02,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x02,0x17,0x10,0x1B,0x0B,0x17,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x02,0x17,0x1B,0x10,0x1B,0x0B,0x17,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x02,0x17,0x1B,0x1B,0x10,0x1B,0x0B,0x17,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x02,0x17,0x1B,0x1B,0x1B,0x10,0x1B,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, + 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x10,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, + 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, +}; +uint8_t tileset_tile_105_data[258] = { + 16, // tile_width + 16, // tile_height + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0A,0x0A,0x0A, + 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0A,0x0A,0x0A,0x0C,0x22,0x0A,0x0A, + 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0A,0x0A,0x0A,0x0C,0x22,0x0A, + 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0A,0x0A,0x0A,0x0A,0x0C,0x0C, + 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0A,0x0A,0x0A,0x0A, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x0C,0x0C,0x0C,0x25,0x0A,0x0A, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, + 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, + 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, + 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, +}; +uint8_t tileset_tile_106_data[258] = { + 16, // tile_width + 16, // tile_height + 0x0A,0x0A,0x0A,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x0A,0x0A,0x22,0x0C,0x0A,0x0A,0x0A,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x0A,0x22,0x0C,0x0A,0x0A,0x0A,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x0C,0x0C,0x0A,0x0A,0x0A,0x0A,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x0A,0x0A,0x0A,0x0A,0x0C,0x0C,0x0C,0x07,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C, + 0x0A,0x0A,0x25,0x0C,0x0C,0x0C,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x0B,0x0B,0x1B,0x1B,0x1B,0x1B,0x1B, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x02,0x10,0x10,0x10,0x10,0x10,0x10,0x10, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x1B,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B, +}; +uint8_t tileset_tile_107_data[258] = { + 16, // tile_width + 16, // tile_height + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x25,0x25,0x25,0x25,0x25,0x0C,0x07,0x02, + 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x25,0x25,0x25,0x25,0x0C,0x07,0x02,0x02, + 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x25,0x25,0x25,0x0C,0x07,0x02,0x10,0x02, + 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x25,0x25,0x0C,0x07,0x02,0x10,0x17,0x02, + 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x25,0x0C,0x07,0x02,0x10,0x17,0x0B,0x02, + 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x07,0x02,0x10,0x17,0x0B,0x1B,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02,0x10,0x17,0x0B,0x1B,0x10,0x02, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x17,0x0B,0x1B,0x10,0x17,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x17,0x0B,0x1B,0x10,0x1B,0x17,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x17,0x0B,0x1B,0x10,0x1B,0x1B,0x17,0x02, + 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x1B,0x10,0x1B,0x1B,0x1B,0x17,0x02, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x17,0x10,0x1B,0x1B,0x1B,0x1B,0x17,0x02, + 0x1B,0x1B,0x1B,0x1B,0x1B,0x0B,0x0B,0x02,0x10,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, + 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x1B,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, + 0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, +}; +uint8_t tileset_tile_108_data[258] = { + 16, // tile_width + 16, // tile_height + 0x02,0x12,0x12,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x02,0x12,0x12,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x02,0x12,0x12,0x0F,0x0F,0x0F,0x0F,0x0F,0x07,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, + 0x02,0x12,0x0F,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x02,0x0F,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x00,0x00,0x02,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x00,0x00,0x02,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x00,0x00,0x02,0x31,0x2D,0x2D,0x2D,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, + 0x00,0x00,0x02,0x31,0x1E,0x1E,0x1E,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, + 0x00,0x00,0x02,0x31,0x2D,0x2D,0x2D,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, + 0x00,0x00,0x02,0x31,0x1E,0x1E,0x1E,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, + 0x00,0x00,0x02,0x31,0x2D,0x2D,0x2D,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, + 0x00,0x00,0x02,0x31,0x1E,0x1E,0x1E,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, + 0x00,0x00,0x02,0x31,0x2D,0x2D,0x2D,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, + 0x00,0x00,0x02,0x31,0x1E,0x1E,0x1E,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, +}; +uint8_t tileset_tile_109_data[258] = { + 16, // tile_width + 16, // tile_height + 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x07,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x07,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x07,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, + 0x07,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, + 0x07,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x02,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x02, + 0x02,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x02, + 0x02,0x0F,0x0F,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x0F,0x0F,0x02, +}; +uint8_t tileset_tile_110_data[258] = { + 16, // tile_width + 16, // tile_height + 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09, + 0x07,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x07,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07, + 0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E, + 0x1E,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1E, + 0x1D,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x1D, + 0x1D,0x02,0x0B,0x0B,0x0B,0x0B,0x0B,0x02,0x02,0x0B,0x0B,0x0B,0x0B,0x0B,0x02,0x1D, + 0x1D,0x02,0x0B,0x0B,0x0B,0x0B,0x0B,0x02,0x02,0x0B,0x0B,0x0B,0x0B,0x0B,0x02,0x1D, + 0x1D,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x1D, + 0x1D,0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x02,0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x02,0x1D, + 0x1D,0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x02,0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x02,0x1D, +}; +uint8_t tileset_tile_111_data[258] = { + 16, // tile_width + 16, // tile_height + 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x07,0x07,0x02, + 0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x07,0x09,0x09,0x09,0x09,0x07,0x07,0x02, + 0x07,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x07,0x0F,0x0F,0x0F,0x0F,0x07,0x07,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02,0x10,0x00, + 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x02,0x10,0x00, + 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x2D,0x2D,0x2D,0x10,0x02,0x10,0x00, + 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x1E,0x1E,0x1E,0x10,0x02,0x10,0x00, + 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x2D,0x2D,0x2D,0x10,0x02,0x10,0x00, + 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x1E,0x1E,0x1E,0x10,0x02,0x10,0x00, + 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x2D,0x2D,0x2D,0x10,0x02,0x10,0x00, + 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x1E,0x1E,0x1E,0x10,0x02,0x10,0x00, + 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x2D,0x2D,0x2D,0x10,0x02,0x10,0x00, + 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x1E,0x1E,0x1E,0x10,0x02,0x10,0x00, +}; +uint8_t tileset_tile_112_data[258] = { + 16, // tile_width + 16, // tile_height + 0x4B,0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, + 0x4B,0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, + 0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06, + 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06, + 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x13,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06, + 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x13,0x13,0x13,0x06,0x06,0x13,0x06,0x06, + 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x13,0x06, + 0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, + 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D, + 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0B,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0B,0x0B, + 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B, + 0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B, + 0x4B,0x4B,0x0D,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0D,0x0D, + 0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x0D,0x4B,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, +}; +uint8_t tileset_tile_113_data[258] = { + 16, // tile_width + 16, // tile_height + 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, + 0x06,0x13,0x06,0x06,0x06,0x06,0x0D,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, + 0x06,0x06,0x0D,0x06,0x06,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06, + 0x06,0x06,0x06,0x13,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06, + 0x06,0x06,0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06, + 0x06,0x06,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x06,0x06,0x13,0x06,0x06, + 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x13,0x06, + 0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, + 0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x0D,0x0D,0x0D,0x06,0x06,0x06,0x06,0x0D, + 0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0D,0x0D,0x0D,0x0D,0x13, + 0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x13, + 0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x13, + 0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0B,0x0B,0x0B,0x0B,0x13, + 0x4B,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, +}; +uint8_t tileset_tile_114_data[258] = { + 16, // tile_width + 16, // tile_height + 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B,0x4B, + 0x06,0x13,0x06,0x06,0x06,0x06,0x0D,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B,0x4B, + 0x06,0x06,0x0D,0x06,0x06,0x13,0x13,0x13,0x13,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B, + 0x06,0x06,0x06,0x13,0x0D,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, + 0x06,0x06,0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, + 0x06,0x06,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, + 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, + 0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B, + 0x0D,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, + 0x0B,0x0B,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0B,0x0B,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, + 0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, + 0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B, + 0x0D,0x0D,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0D,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0D,0x4B,0x0D,0x0D,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, + 0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B, +}; +uint8_t tileset_tile_115_data[258] = { + 16, // tile_width + 16, // tile_height + 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, + 0x06,0x13,0x06,0x06,0x06,0x06,0x0D,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, + 0x06,0x06,0x0D,0x06,0x06,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06, + 0x06,0x06,0x06,0x13,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06, + 0x06,0x06,0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06, + 0x06,0x06,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x06,0x06,0x13,0x06,0x06, + 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x13,0x06, + 0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, + 0x0D,0x0D,0x0D,0x0D,0x0D,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, + 0x0B,0x0B,0x0D,0x0B,0x0B,0x0D,0x13,0x13,0x06,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, + 0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0D,0x13,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x06, + 0x0B,0x0B,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x06,0x06,0x06,0x13,0x06,0x06,0x06,0x06, + 0x0D,0x0D,0x0D,0x0B,0x0B,0x0B,0x0D,0x0D,0x06,0x06,0x06,0x13,0x13,0x06,0x06,0x06, + 0x4B,0x4B,0x4B,0x0D,0x0D,0x0D,0x0B,0x0D,0x06,0x06,0x13,0x06,0x06,0x13,0x06,0x13, + 0x4B,0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x06,0x0D,0x06,0x06,0x06,0x06,0x0D,0x06, + 0x4B,0x4B,0x4B,0x0D,0x0B,0x0B,0x0B,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, +}; +uint8_t tileset_tile_116_data[258] = { + 16, // tile_width + 16, // tile_height + 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06, + 0x06,0x13,0x06,0x06,0x06,0x06,0x0D,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06, + 0x06,0x06,0x0D,0x06,0x06,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06, + 0x06,0x06,0x06,0x13,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06, + 0x06,0x06,0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x06,0x06,0x06, + 0x06,0x06,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x06,0x06,0x13,0x06,0x06, + 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x13,0x06, + 0x0D,0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x0D, + 0x06,0x0D,0x13,0x13,0x13,0x13,0x13,0x0D,0x0D,0x13,0x13,0x0D,0x0D,0x0D,0x0D,0x0D, + 0x06,0x06,0x0D,0x13,0x13,0x13,0x0D,0x06,0x13,0x13,0x0D,0x0B,0x0B,0x0D,0x0B,0x0B, + 0x06,0x06,0x06,0x0D,0x13,0x13,0x06,0x06,0x13,0x0D,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B, + 0x06,0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x0D,0x0B,0x0B,0x0B,0x0B,0x0D,0x0B,0x0B, + 0x06,0x06,0x06,0x0D,0x06,0x06,0x06,0x06,0x0D,0x0D,0x0B,0x0B,0x0B,0x0D,0x0D,0x0D, + 0x06,0x06,0x13,0x06,0x06,0x06,0x06,0x06,0x0D,0x0B,0x0D,0x0D,0x0D,0x4B,0x4B,0x4B, + 0x06,0x13,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B,0x4B, + 0x0D,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x0D,0x0B,0x0B,0x0B,0x0D,0x4B,0x4B,0x4B, +}; +uint8_t tileset_tile_117_data[258] = { + 16, // tile_width + 16, // tile_height + 0x47,0x47,0x03,0x01,0x01,0x04,0x04,0x01,0x05,0x05,0x05,0x01,0x01,0x01,0x01,0x04, + 0x47,0x03,0x01,0x05,0x01,0x04,0x49,0x04,0x01,0x01,0x01,0x05,0x05,0x01,0x01,0x04, + 0x1C,0x03,0x01,0x01,0x05,0x01,0x04,0x04,0x04,0x01,0x01,0x05,0x05,0x01,0x04,0x04, + 0x1C,0x04,0x04,0x05,0x01,0x05,0x01,0x04,0x04,0x04,0x04,0x01,0x01,0x04,0x03,0x04, + 0x1C,0x04,0x01,0x01,0x05,0x01,0x01,0x01,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03, + 0x1C,0x03,0x01,0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x04,0x04,0x03,0x03,0x03,0x03, + 0x1C,0x03,0x04,0x04,0x01,0x01,0x04,0x01,0x01,0x04,0x04,0x03,0x03,0x04,0x03,0x03, + 0x1C,0x04,0x04,0x04,0x04,0x04,0x04,0x01,0x04,0x03,0x04,0x03,0x01,0x04,0x04,0x04, + 0x1F,0x04,0x03,0x04,0x04,0x04,0x04,0x04,0x01,0x03,0x04,0x01,0x01,0x01,0x01,0x04, + 0x1F,0x1F,0x04,0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x04,0x01,0x01,0x01,0x01,0x01, + 0x4B,0x1F,0x04,0x04,0x03,0x03,0x03,0x04,0x04,0x04,0x01,0x04,0x01,0x01,0x01,0x01, + 0x4B,0x1F,0x1F,0x04,0x04,0x03,0x03,0x03,0x03,0x01,0x04,0x01,0x01,0x01,0x01,0x01, + 0x4B,0x4B,0x1F,0x1C,0x1C,0x1C,0x1C,0x03,0x03,0x03,0x01,0x01,0x04,0x01,0x04,0x01, + 0x4B,0x4B,0x4B,0x1C,0x1C,0x1C,0x1C,0x1C,0x03,0x03,0x04,0x03,0x04,0x04,0x04,0x04, + 0x4B,0x4B,0x1F,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x03,0x03,0x04,0x03,0x04,0x03,0x04, + 0x4B,0x1F,0x1F,0x1C,0x1C,0x1C,0x1C,0x1C,0x04,0x04,0x03,0x03,0x04,0x04,0x03,0x03, +}; +uint8_t tileset_tile_118_data[258] = { + 16, // tile_width + 16, // tile_height + 0x01,0x05,0x05,0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05,0x05,0x05,0x01, + 0x05,0x05,0x05,0x05,0x05,0x01,0x01,0x05,0x05,0x01,0x01,0x05,0x05,0x05,0x05,0x05, + 0x05,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x05, + 0x04,0x01,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x01,0x04, + 0x04,0x04,0x01,0x01,0x05,0x05,0x05,0x01,0x01,0x05,0x05,0x05,0x01,0x01,0x04,0x04, + 0x04,0x04,0x04,0x04,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x04,0x04,0x04,0x04, + 0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x01,0x01,0x04,0x04,0x04,0x04,0x04,0x03,0x03, + 0x04,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x04, + 0x01,0x03,0x04,0x04,0x04,0x01,0x04,0x04,0x04,0x04,0x01,0x04,0x04,0x04,0x03,0x01, + 0x01,0x01,0x04,0x04,0x01,0x01,0x01,0x04,0x04,0x01,0x01,0x01,0x04,0x04,0x01,0x01, + 0x01,0x01,0x04,0x04,0x01,0x01,0x04,0x04,0x04,0x04,0x01,0x01,0x04,0x04,0x01,0x01, + 0x01,0x01,0x04,0x04,0x03,0x01,0x04,0x04,0x04,0x04,0x01,0x03,0x04,0x04,0x01,0x01, + 0x01,0x04,0x04,0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x04,0x04,0x01, + 0x04,0x04,0x03,0x04,0x03,0x03,0x04,0x03,0x03,0x04,0x03,0x03,0x04,0x03,0x04,0x04, + 0x04,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x04, + 0x03,0x03,0x03,0x03,0x37,0x37,0x37,0x03,0x03,0x37,0x37,0x37,0x03,0x03,0x03,0x03, +}; +uint8_t tileset_tile_119_data[258] = { + 16, // tile_width + 16, // tile_height + 0x04,0x01,0x01,0x01,0x01,0x05,0x05,0x05,0x01,0x04,0x04,0x01,0x01,0x03,0x47,0x47, + 0x04,0x01,0x01,0x05,0x05,0x01,0x01,0x01,0x04,0x01,0x04,0x01,0x05,0x01,0x03,0x47, + 0x04,0x04,0x01,0x05,0x05,0x01,0x01,0x04,0x04,0x04,0x01,0x05,0x01,0x01,0x03,0x1C, + 0x04,0x03,0x04,0x01,0x01,0x04,0x04,0x04,0x04,0x01,0x05,0x01,0x05,0x04,0x04,0x1C, + 0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x01,0x01,0x01,0x05,0x01,0x01,0x04,0x1C, + 0x03,0x03,0x03,0x03,0x04,0x04,0x04,0x01,0x04,0x01,0x01,0x01,0x01,0x01,0x03,0x1C, + 0x03,0x03,0x04,0x03,0x03,0x04,0x04,0x01,0x01,0x04,0x01,0x01,0x04,0x04,0x03,0x1C, + 0x04,0x04,0x04,0x01,0x03,0x04,0x03,0x04,0x01,0x04,0x04,0x04,0x04,0x04,0x04,0x1C, + 0x04,0x01,0x01,0x01,0x01,0x04,0x03,0x01,0x04,0x04,0x04,0x04,0x04,0x03,0x04,0x1F, + 0x01,0x01,0x01,0x01,0x01,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x04,0x1F,0x1F, + 0x01,0x01,0x01,0x01,0x04,0x01,0x04,0x04,0x04,0x03,0x03,0x03,0x04,0x04,0x1F,0x4B, + 0x01,0x01,0x01,0x01,0x01,0x04,0x01,0x03,0x03,0x03,0x03,0x04,0x04,0x1F,0x1F,0x4B, + 0x01,0x04,0x01,0x04,0x01,0x01,0x03,0x03,0x03,0x1C,0x1C,0x1C,0x1C,0x1F,0x4B,0x4B, + 0x04,0x04,0x04,0x04,0x03,0x04,0x03,0x03,0x1C,0x1C,0x1C,0x1C,0x1C,0x4B,0x4B,0x4B, + 0x04,0x03,0x04,0x03,0x04,0x03,0x03,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1F,0x4B,0x4B, + 0x04,0x04,0x04,0x04,0x03,0x03,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1F,0x1F,0x4B, +}; +uint8_t tileset_tile_120_data[258] = { + 16, // tile_width + 16, // tile_height + 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x02,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x02,0x0B,0x17,0x1B,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x02,0x0B,0x0B,0x17,0x1B,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x02,0x0B,0x0B,0x0B,0x17,0x1B,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x02,0x0A,0x0B,0x0B,0x0B,0x17,0x1B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x02,0x0A,0x0A,0x0B,0x0B,0x0B,0x17,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x10,0x02,0x0A,0x0A,0x0B,0x0B,0x0B,0x17,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x10,0x10,0x02,0x0A,0x0A,0x0B,0x0B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x00,0x10,0x10,0x02,0x0A,0x0A,0x0B,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x00,0x00,0x10,0x10,0x02,0x0A,0x0A,0x17,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x00,0x00,0x00,0x10,0x10,0x02,0x0A,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, + 0x00,0x00,0x00,0x00,0x10,0x10,0x02,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, + 0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, +}; +uint8_t tileset_tile_121_data[258] = { + 16, // tile_width + 16, // tile_height + 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, + 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, + 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, + 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, + 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, + 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, + 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, + 0x02,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x02, + 0x02,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x02, + 0x02,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x02, + 0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x02, + 0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x02, + 0x02,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x02, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, +}; +uint8_t tileset_tile_122_data[258] = { + 16, // tile_width + 16, // tile_height + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x1B,0x16,0x0F,0x1B,0x0F,0x1B,0x0F,0x1B, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x1B,0x0F,0x1B,0x1B,0x0F,0x1B,0x0F,0x1B, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x1B,0x0F,0x0F,0x1B,0x0F,0x0F,0x0F,0x1B, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0B,0x0B,0x09,0x0B,0x09,0x0B,0x09,0x0B, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0B,0x09,0x16,0x0B,0x09,0x0B,0x09,0x0B, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0B,0x0B,0x09,0x09,0x0B,0x09,0x0B,0x09, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A, + 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, + 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, +}; +uint8_t tileset_tile_123_data[258] = { + 16, // tile_width + 16, // tile_height + 0x16,0x0F,0x0F,0x1B,0x16,0x0F,0x0F,0x1B,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, + 0x0F,0x1B,0x0F,0x1B,0x0F,0x1B,0x0F,0x1B,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, + 0x0F,0x1B,0x0F,0x1B,0x0F,0x1B,0x0F,0x1B,0x17,0x1B,0x1B,0x1B,0x1B,0x1B,0x17,0x02, + 0x09,0x0B,0x09,0x0B,0x09,0x09,0x16,0x0B,0x17,0x1B,0x1B,0x1B,0x1B,0x17,0x0B,0x02, + 0x09,0x09,0x16,0x0B,0x09,0x0B,0x0B,0x0B,0x17,0x1B,0x1B,0x1B,0x17,0x0B,0x0B,0x02, + 0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x17,0x1B,0x1B,0x17,0x0B,0x0B,0x0B,0x02, + 0x09,0x0B,0x09,0x0B,0x09,0x09,0x0B,0x0B,0x17,0x1B,0x17,0x0B,0x0B,0x0B,0x0A,0x02, + 0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x17,0x17,0x0B,0x0B,0x0B,0x0A,0x0A,0x02, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x17,0x0B,0x0B,0x0B,0x0A,0x0A,0x02,0x10, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x17,0x0B,0x0B,0x0A,0x0A,0x02,0x10,0x10, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x17,0x0B,0x0A,0x0A,0x02,0x10,0x10,0x00, + 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x17,0x0A,0x0A,0x02,0x10,0x10,0x00,0x00, + 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x0A,0x02,0x10,0x10,0x00,0x00,0x00, + 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x02,0x10,0x10,0x00,0x00,0x00,0x00, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x00,0x00,0x00,0x00,0x00, + 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x00, +}; +uint8_t tileset_tile_124_data[258] = { + 16, // tile_width + 16, // tile_height + 0x00,0x00,0x02,0x31,0x2D,0x2D,0x2D,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, + 0x00,0x00,0x02,0x31,0x1E,0x1E,0x1E,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, + 0x00,0x00,0x02,0x31,0x2D,0x2D,0x2D,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, + 0x00,0x00,0x02,0x31,0x1E,0x1E,0x1E,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, + 0x00,0x00,0x02,0x31,0x2D,0x2D,0x2D,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, + 0x00,0x00,0x02,0x31,0x1E,0x1E,0x1E,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, + 0x00,0x00,0x02,0x31,0x2D,0x2D,0x2D,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, + 0x00,0x00,0x02,0x31,0x1E,0x1E,0x1E,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, + 0x00,0x00,0x02,0x31,0x2D,0x2D,0x2D,0x10,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, + 0x00,0x00,0x02,0x31,0x1E,0x1E,0x1E,0x07,0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07, + 0x00,0x00,0x02,0x31,0x1D,0x1D,0x1D,0x07,0x07,0x2D,0x1D,0x1D,0x1D,0x1D,0x1D,0x07, + 0x00,0x00,0x02,0x31,0x1D,0x1D,0x1D,0x07,0x07,0x1E,0x1D,0x1D,0x1D,0x1D,0x1D,0x07, + 0x00,0x00,0x02,0x31,0x1D,0x1D,0x1D,0x07,0x07,0x1E,0x1D,0x1D,0x1D,0x1D,0x1D,0x07, + 0x00,0x00,0x02,0x31,0x1D,0x1D,0x1D,0x07,0x07,0x1E,0x1D,0x1D,0x1D,0x1D,0x1D,0x07, + 0x00,0x00,0x02,0x31,0x1D,0x1D,0x1D,0x07,0x07,0x1E,0x1D,0x1D,0x1D,0x1D,0x1D,0x07, + 0x00,0x00,0x10,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x10, +}; +uint8_t tileset_tile_125_data[258] = { + 16, // tile_width + 16, // tile_height + 0x02,0x0F,0x0F,0x07,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x07,0x0F,0x0F,0x02, + 0x02,0x0F,0x0F,0x07,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x07,0x0F,0x0F,0x02, + 0x02,0x0F,0x0F,0x07,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x07,0x0F,0x0F,0x02, + 0x02,0x0F,0x0F,0x07,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x07,0x0F,0x0F,0x02, + 0x02,0x0F,0x0F,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x0F,0x0F,0x02, + 0x02,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x02, + 0x02,0x07,0x07,0x09,0x0F,0x09,0x0F,0x09,0x0F,0x09,0x0F,0x09,0x0F,0x09,0x0F,0x02, + 0x07,0x1B,0x0A,0x07,0x09,0x0F,0x09,0x0F,0x09,0x0F,0x09,0x0F,0x09,0x0F,0x09,0x02, + 0x07,0x0A,0x0A,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x02, + 0x02,0x07,0x07,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x02, + 0x02,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x02, + 0x02,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x02, + 0x02,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x02, + 0x02,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x02, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, +}; +uint8_t tileset_tile_126_data[258] = { + 16, // tile_width + 16, // tile_height + 0x1D,0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x02,0x02,0x0A,0x0A,0x0A,0x0A,0x0A,0x02,0x1D, + 0x1D,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x1D, + 0x1D,0x02,0x17,0x17,0x17,0x17,0x17,0x02,0x02,0x17,0x17,0x17,0x17,0x17,0x02,0x1D, + 0x1D,0x02,0x17,0x17,0x17,0x17,0x17,0x02,0x02,0x17,0x17,0x17,0x17,0x17,0x02,0x1D, + 0x1D,0x02,0x17,0x17,0x17,0x17,0x17,0x02,0x02,0x17,0x17,0x17,0x17,0x17,0x02,0x1D, + 0x1D,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x1D, + 0x1E,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1E, + 0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E, + 0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D, + 0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D, + 0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D, + 0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D, + 0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D, + 0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D, + 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, + 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, +}; +uint8_t tileset_tile_127_data[258] = { + 16, // tile_width + 16, // tile_height + 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x2D,0x2D,0x2D,0x10,0x02,0x10,0x00, + 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x1E,0x1E,0x1E,0x10,0x02,0x10,0x00, + 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x2D,0x2D,0x2D,0x10,0x02,0x10,0x00, + 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x1E,0x1E,0x1E,0x10,0x02,0x10,0x00, + 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x2D,0x2D,0x2D,0x10,0x02,0x10,0x00, + 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x1E,0x1E,0x1E,0x10,0x02,0x10,0x00, + 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x2D,0x2D,0x2D,0x10,0x02,0x10,0x00, + 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x1E,0x1E,0x1E,0x10,0x02,0x10,0x00, + 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x2D,0x2D,0x2D,0x07,0x02,0x10,0x00, + 0x07,0x31,0x1E,0x1E,0x1E,0x1E,0x1D,0x07,0x10,0x1E,0x1E,0x1E,0x07,0x02,0x10,0x00, + 0x07,0x2D,0x1D,0x1D,0x1D,0x1D,0x1D,0x07,0x10,0x1D,0x1D,0x1D,0x07,0x02,0x10,0x00, + 0x07,0x1E,0x1D,0x1D,0x1D,0x1D,0x1D,0x07,0x10,0x1D,0x1D,0x1D,0x07,0x02,0x10,0x00, + 0x07,0x1E,0x1D,0x1D,0x1D,0x1D,0x1D,0x07,0x10,0x1D,0x1D,0x1D,0x07,0x02,0x10,0x00, + 0x07,0x1E,0x1D,0x1D,0x1D,0x1D,0x1D,0x07,0x10,0x1D,0x1D,0x1D,0x07,0x02,0x10,0x00, + 0x07,0x1E,0x1D,0x1D,0x1D,0x1D,0x1D,0x07,0x10,0x1D,0x1D,0x1D,0x07,0x02,0x10,0x00, + 0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x00, +}; +uint8_t *tileset_tiles_data[128] = { + tileset_tile_0_data, + tileset_tile_1_data, + tileset_tile_2_data, + tileset_tile_3_data, + tileset_tile_4_data, + tileset_tile_5_data, + tileset_tile_6_data, + tileset_tile_7_data, + tileset_tile_8_data, + tileset_tile_9_data, + tileset_tile_10_data, + tileset_tile_11_data, + tileset_tile_12_data, + tileset_tile_13_data, + tileset_tile_14_data, + tileset_tile_15_data, + tileset_tile_16_data, + tileset_tile_17_data, + tileset_tile_18_data, + tileset_tile_19_data, + tileset_tile_20_data, + tileset_tile_21_data, + tileset_tile_22_data, + tileset_tile_23_data, + tileset_tile_24_data, + tileset_tile_25_data, + tileset_tile_26_data, + tileset_tile_27_data, + tileset_tile_28_data, + tileset_tile_29_data, + tileset_tile_30_data, + tileset_tile_31_data, + tileset_tile_32_data, + tileset_tile_33_data, + tileset_tile_34_data, + tileset_tile_35_data, + tileset_tile_36_data, + tileset_tile_37_data, + tileset_tile_38_data, + tileset_tile_39_data, + tileset_tile_40_data, + tileset_tile_41_data, + tileset_tile_42_data, + tileset_tile_43_data, + tileset_tile_44_data, + tileset_tile_45_data, + tileset_tile_46_data, + tileset_tile_47_data, + tileset_tile_48_data, + tileset_tile_49_data, + tileset_tile_50_data, + tileset_tile_51_data, + tileset_tile_52_data, + tileset_tile_53_data, + tileset_tile_54_data, + tileset_tile_55_data, + tileset_tile_56_data, + tileset_tile_57_data, + tileset_tile_58_data, + tileset_tile_59_data, + tileset_tile_60_data, + tileset_tile_61_data, + tileset_tile_62_data, + tileset_tile_63_data, + tileset_tile_64_data, + tileset_tile_65_data, + tileset_tile_66_data, + tileset_tile_67_data, + tileset_tile_68_data, + tileset_tile_69_data, + tileset_tile_70_data, + tileset_tile_71_data, + tileset_tile_72_data, + tileset_tile_73_data, + tileset_tile_74_data, + tileset_tile_75_data, + tileset_tile_76_data, + tileset_tile_77_data, + tileset_tile_78_data, + tileset_tile_79_data, + tileset_tile_80_data, + tileset_tile_81_data, + tileset_tile_82_data, + tileset_tile_83_data, + tileset_tile_84_data, + tileset_tile_85_data, + tileset_tile_86_data, + tileset_tile_87_data, + tileset_tile_88_data, + tileset_tile_89_data, + tileset_tile_90_data, + tileset_tile_91_data, + tileset_tile_92_data, + tileset_tile_93_data, + tileset_tile_94_data, + tileset_tile_95_data, + tileset_tile_96_data, + tileset_tile_97_data, + tileset_tile_98_data, + tileset_tile_99_data, + tileset_tile_100_data, + tileset_tile_101_data, + tileset_tile_102_data, + tileset_tile_103_data, + tileset_tile_104_data, + tileset_tile_105_data, + tileset_tile_106_data, + tileset_tile_107_data, + tileset_tile_108_data, + tileset_tile_109_data, + tileset_tile_110_data, + tileset_tile_111_data, + tileset_tile_112_data, + tileset_tile_113_data, + tileset_tile_114_data, + tileset_tile_115_data, + tileset_tile_116_data, + tileset_tile_117_data, + tileset_tile_118_data, + tileset_tile_119_data, + tileset_tile_120_data, + tileset_tile_121_data, + tileset_tile_122_data, + tileset_tile_123_data, + tileset_tile_124_data, + tileset_tile_125_data, + tileset_tile_126_data, + tileset_tile_127_data, +}; diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap/src/main.c b/frontends/calculator/CEdev/examples/gfx_tilemap/src/main.c index 7845bf9..92f0a5e 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap/src/main.c +++ b/frontends/calculator/CEdev/examples/gfx_tilemap/src/main.c @@ -1,102 +1,102 @@ -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -/* Include the graphics */ -#include "gfx/tiles_gfx.h" - -/* Include the external map data */ -extern uint8_t tilemap_map[]; - -/* Tilemap defines */ -#define TILE_WIDTH 16 -#define TILE_HEIGHT 16 - -#define TILEMAP_WIDTH 32 -#define TILEMAP_HEIGHT 25 - -#define TILEMAP_DRAW_WIDTH 20 -#define TILEMAP_DRAW_HEIGHT 14 - -#define Y_OFFSET 16 -#define X_OFFSET 0 - -void main(void) { - sk_key_t key; - unsigned int x_offset = 0; - unsigned int y_offset = 0; - gfx_tilemap_t tilemap; - - /* Initialize the tilemap structure */ - tilemap.map = tilemap_map; - tilemap.tiles = tileset_tiles; - tilemap.type_width = gfx_tile_16_pixel; - tilemap.type_height = gfx_tile_16_pixel; - tilemap.tile_height = TILE_HEIGHT; - tilemap.tile_width = TILE_WIDTH; - tilemap.draw_height = TILEMAP_DRAW_HEIGHT; - tilemap.draw_width = TILEMAP_DRAW_WIDTH; - tilemap.height = TILEMAP_HEIGHT; - tilemap.width = TILEMAP_WIDTH; - tilemap.y_loc = Y_OFFSET; - tilemap.x_loc = X_OFFSET; - - /* Initialize the 8bpp graphics */ - gfx_Begin(); - - /* Set up the palette */ - gfx_SetPalette(tiles_gfx_pal, sizeof_tiles_gfx_pal, 0); - gfx_SetColor(gfx_white); - - /* Draw to buffer to avoid tearing */ - gfx_SetDrawBuffer(); - - /* Set monospace font with width of 8 */ - gfx_SetMonospaceFont(8); - - /* Wait for the enter key to quit */ - while ((key = os_GetCSC()) != sk_Enter) { - - /* Draw tilemap and coords */ - gfx_Tilemap(&tilemap, x_offset, y_offset); - gfx_FillRectangle(0, 0, 320, 16); - gfx_PrintStringXY("x offset:", 48, 4); - gfx_PrintUInt(x_offset, 4); - gfx_PrintString(" y offset:"); - gfx_PrintUInt(y_offset, 4); - - /* Do something based on the keypress */ - switch (key) { - case sk_Down: - if (y_offset < (TILEMAP_HEIGHT * TILE_HEIGHT) - (TILEMAP_DRAW_HEIGHT * TILE_HEIGHT)) - y_offset += TILE_HEIGHT; - break; - case sk_Left: - if (x_offset) - x_offset -= TILE_WIDTH; - break; - case sk_Right: - if (x_offset < (TILEMAP_WIDTH * TILE_WIDTH) - (TILEMAP_DRAW_WIDTH * TILE_WIDTH)) - x_offset += TILE_WIDTH; - break; - case sk_Up: - if (y_offset) - y_offset -= TILE_HEIGHT; - break; - default: - break; - } - gfx_SwapDraw(); - } - - /* Close the graphics and return to the OS */ - gfx_End(); -} +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +/* Include the graphics */ +#include "gfx/tiles_gfx.h" + +/* Include the external map data */ +extern uint8_t tilemap_map[]; + +/* Tilemap defines */ +#define TILE_WIDTH 16 +#define TILE_HEIGHT 16 + +#define TILEMAP_WIDTH 32 +#define TILEMAP_HEIGHT 25 + +#define TILEMAP_DRAW_WIDTH 20 +#define TILEMAP_DRAW_HEIGHT 14 + +#define Y_OFFSET 16 +#define X_OFFSET 0 + +void main(void) { + sk_key_t key; + unsigned int x_offset = 0; + unsigned int y_offset = 0; + gfx_tilemap_t tilemap; + + /* Initialize the tilemap structure */ + tilemap.map = tilemap_map; + tilemap.tiles = tileset_tiles; + tilemap.type_width = gfx_tile_16_pixel; + tilemap.type_height = gfx_tile_16_pixel; + tilemap.tile_height = TILE_HEIGHT; + tilemap.tile_width = TILE_WIDTH; + tilemap.draw_height = TILEMAP_DRAW_HEIGHT; + tilemap.draw_width = TILEMAP_DRAW_WIDTH; + tilemap.height = TILEMAP_HEIGHT; + tilemap.width = TILEMAP_WIDTH; + tilemap.y_loc = Y_OFFSET; + tilemap.x_loc = X_OFFSET; + + /* Initialize the 8bpp graphics */ + gfx_Begin(); + + /* Set up the palette */ + gfx_SetPalette(tiles_gfx_pal, sizeof_tiles_gfx_pal, 0); + gfx_SetColor(gfx_white); + + /* Draw to buffer to avoid tearing */ + gfx_SetDrawBuffer(); + + /* Set monospace font with width of 8 */ + gfx_SetMonospaceFont(8); + + /* Wait for the enter key to quit */ + while ((key = os_GetCSC()) != sk_Enter) { + + /* Draw tilemap and coords */ + gfx_Tilemap(&tilemap, x_offset, y_offset); + gfx_FillRectangle(0, 0, 320, 16); + gfx_PrintStringXY("x offset:", 48, 4); + gfx_PrintUInt(x_offset, 4); + gfx_PrintString(" y offset:"); + gfx_PrintUInt(y_offset, 4); + + /* Do something based on the keypress */ + switch (key) { + case sk_Down: + if (y_offset < (TILEMAP_HEIGHT * TILE_HEIGHT) - (TILEMAP_DRAW_HEIGHT * TILE_HEIGHT)) + y_offset += TILE_HEIGHT; + break; + case sk_Left: + if (x_offset) + x_offset -= TILE_WIDTH; + break; + case sk_Right: + if (x_offset < (TILEMAP_WIDTH * TILE_WIDTH) - (TILEMAP_DRAW_WIDTH * TILE_WIDTH)) + x_offset += TILE_WIDTH; + break; + case sk_Up: + if (y_offset) + y_offset -= TILE_HEIGHT; + break; + default: + break; + } + gfx_SwapDraw(); + } + + /* Close the graphics and return to the OS */ + gfx_End(); +} diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap/src/tilemapdata.c b/frontends/calculator/CEdev/examples/gfx_tilemap/src/tilemapdata.c index d443c6c..7fbe1a2 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap/src/tilemapdata.c +++ b/frontends/calculator/CEdev/examples/gfx_tilemap/src/tilemapdata.c @@ -1,30 +1,30 @@ -#include - -/* This is the data that is displayed with the tilemap */ -uint8_t tilemap_map[] = { - 0x20,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x22,0x14,0x15,0x04,0x05,0x20,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x22, - 0x30,0x54,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x53,0x32,0x04,0x05,0x14,0x15,0x40,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x53,0x32, - 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x30,0x32,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, - 0x30,0x32,0x01,0x10,0x10,0x10,0x00,0x00,0x01,0x00,0x01,0x00,0x30,0x32,0x04,0x05,0x14,0x15,0x00,0x50,0x51,0x51,0x52,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, - 0x30,0x32,0x00,0x10,0x10,0x10,0x00,0x01,0x00,0x01,0x00,0x01,0x30,0x32,0x14,0x15,0x04,0x05,0x00,0x60,0x61,0x61,0x62,0x00,0x00,0x00,0x10,0x10,0x10,0x00,0x30,0x32, - 0x30,0x32,0x01,0x10,0x10,0x10,0x00,0x00,0x01,0x00,0x01,0x00,0x40,0x42,0x04,0x05,0x14,0x15,0x00,0x60,0x61,0x61,0x62,0x00,0x00,0x00,0x10,0x10,0x10,0x00,0x30,0x32, - 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x00,0x14,0x15,0x04,0x05,0x00,0x70,0x71,0x71,0x72,0x00,0x00,0x00,0x10,0x10,0x10,0x00,0x30,0x32, - 0x30,0x32,0x01,0x00,0x01,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x01,0x00,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, - 0x30,0x32,0x00,0x01,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, - 0x30,0x32,0x01,0x00,0x00,0x00,0x01,0x10,0x10,0x10,0x10,0x10,0x01,0x00,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, - 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, - 0x30,0x32,0x01,0x00,0x01,0x00,0x01,0x10,0x10,0x10,0x10,0x10,0x01,0x00,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x20,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x43,0x32, - 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x00,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x40,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x53,0x32, - 0x30,0x32,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x20,0x22,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, - 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x30,0x32,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, - 0x30,0x32,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x30,0x32,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, - 0x30,0x32,0x00,0x00,0x00,0x01,0x00,0x01,0x10,0x10,0x00,0x01,0x30,0x32,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, - 0x30,0x32,0x01,0x00,0x01,0x00,0x01,0x00,0x10,0x10,0x01,0x00,0x30,0x32,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, - 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x30,0x32,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, - 0x30,0x32,0x01,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x30,0x32,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, - 0x30,0x32,0x00,0x10,0x10,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x30,0x32,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, - 0x30,0x32,0x01,0x10,0x10,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x30,0x32,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, - 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x00,0x30,0x32,0x14,0x15,0x24,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, - 0x30,0x44,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x43,0x32,0x04,0x05,0x20,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x43,0x32, - 0x40,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x42,0x14,0x15,0x40,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x42, -}; +#include + +/* This is the data that is displayed with the tilemap */ +uint8_t tilemap_map[] = { + 0x20,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x22,0x14,0x15,0x04,0x05,0x20,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x22, + 0x30,0x54,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x53,0x32,0x04,0x05,0x14,0x15,0x40,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x53,0x32, + 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x30,0x32,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, + 0x30,0x32,0x01,0x10,0x10,0x10,0x00,0x00,0x01,0x00,0x01,0x00,0x30,0x32,0x04,0x05,0x14,0x15,0x00,0x50,0x51,0x51,0x52,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, + 0x30,0x32,0x00,0x10,0x10,0x10,0x00,0x01,0x00,0x01,0x00,0x01,0x30,0x32,0x14,0x15,0x04,0x05,0x00,0x60,0x61,0x61,0x62,0x00,0x00,0x00,0x10,0x10,0x10,0x00,0x30,0x32, + 0x30,0x32,0x01,0x10,0x10,0x10,0x00,0x00,0x01,0x00,0x01,0x00,0x40,0x42,0x04,0x05,0x14,0x15,0x00,0x60,0x61,0x61,0x62,0x00,0x00,0x00,0x10,0x10,0x10,0x00,0x30,0x32, + 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x00,0x14,0x15,0x04,0x05,0x00,0x70,0x71,0x71,0x72,0x00,0x00,0x00,0x10,0x10,0x10,0x00,0x30,0x32, + 0x30,0x32,0x01,0x00,0x01,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x01,0x00,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, + 0x30,0x32,0x00,0x01,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, + 0x30,0x32,0x01,0x00,0x00,0x00,0x01,0x10,0x10,0x10,0x10,0x10,0x01,0x00,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, + 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, + 0x30,0x32,0x01,0x00,0x01,0x00,0x01,0x10,0x10,0x10,0x10,0x10,0x01,0x00,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x20,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x43,0x32, + 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x00,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x40,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x53,0x32, + 0x30,0x32,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x20,0x22,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, + 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x30,0x32,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, + 0x30,0x32,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x30,0x32,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, + 0x30,0x32,0x00,0x00,0x00,0x01,0x00,0x01,0x10,0x10,0x00,0x01,0x30,0x32,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, + 0x30,0x32,0x01,0x00,0x01,0x00,0x01,0x00,0x10,0x10,0x01,0x00,0x30,0x32,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, + 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x30,0x32,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, + 0x30,0x32,0x01,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x30,0x32,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, + 0x30,0x32,0x00,0x10,0x10,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x30,0x32,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, + 0x30,0x32,0x01,0x10,0x10,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x30,0x32,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, + 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x00,0x30,0x32,0x14,0x15,0x24,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, + 0x30,0x44,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x43,0x32,0x04,0x05,0x20,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x43,0x32, + 0x40,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x42,0x14,0x15,0x40,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x42, +}; diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/autotester.json b/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/autotester.json index 9a2cd06..77314bb 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/autotester.json +++ b/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/autotester.json @@ -1,43 +1,43 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp", - "src/gfx/var_gfx.8xv" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "hashWait|1", - "delay|100", - "key|right", - "key|right", - "key|down", - "key|down", - "hashWait|2", - "key|enter", - "hashWait|3" - ], - "hashes": { - "1": { - "description": "Initial sprite map state (top left)", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "3C2D7C36" ] - }, - "2": { - "description": "Moving a bit to the bottom right", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "F0C14AE9" ] - }, - "3": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44", "43BF8092", "5ACF1C01" ] - } - } -} +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp", + "src/gfx/var_gfx.8xv" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "hashWait|1", + "delay|100", + "key|right", + "key|right", + "key|down", + "key|down", + "hashWait|2", + "key|enter", + "hashWait|3" + ], + "hashes": { + "1": { + "description": "Initial sprite map state (top left)", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "3C2D7C36" ] + }, + "2": { + "description": "Moving a bit to the bottom right", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "F0C14AE9" ] + }, + "3": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44", "43BF8092", "5ACF1C01" ] + } + } +} diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/makefile b/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/makefile +++ b/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/readme.md b/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/readme.md index 83c687b..82edcd7 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/readme.md +++ b/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/readme.md @@ -1,10 +1,10 @@ -### GraphX Simple Appvar Tilemap Demo - -An example of tilemaping using a sequence of tiles and the keypad. Data for the tilemap is stored within an appvar. - -![Screenshot](screenshot.gif) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### GraphX Simple Appvar Tilemap Demo + +An example of tilemaping using a sequence of tiles and the keypad. Data for the tilemap is stored within an appvar. + +![Screenshot](screenshot.gif) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/gfx/convpng.ini b/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/gfx/convpng.ini index ebcba17..0f05bce 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/gfx/convpng.ini +++ b/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/gfx/convpng.ini @@ -1,14 +1,14 @@ -// Appvar to place all graphics in - -#AppvarC : var_gfx -#IncludePalettes : tiles_gfx -#PNGImages : - tileset - -// The group for the tileset - -#GroupC : tiles_gfx -#TransparentColor : 255,201,14 -#Tilemap : 16,16,true -#PNGImages : - tileset +// Appvar to place all graphics in + +#AppvarC : var_gfx +#IncludePalettes : tiles_gfx +#PNGImages : + tileset + +// The group for the tileset + +#GroupC : tiles_gfx +#TransparentColor : 255,201,14 +#Tilemap : 16,16,true +#PNGImages : + tileset diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/gfx/tiles_gfx.c b/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/gfx/tiles_gfx.c index 7243683..c1c9573 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/gfx/tiles_gfx.c +++ b/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/gfx/tiles_gfx.c @@ -1,4 +1,4 @@ -// convpng -#include -#include "tiles_gfx.h" - +// convpng +#include +#include "tiles_gfx.h" + diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/gfx/tiles_gfx.h b/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/gfx/tiles_gfx.h index e86b1ce..a04b391 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/gfx/tiles_gfx.h +++ b/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/gfx/tiles_gfx.h @@ -1,10 +1,10 @@ -// convpng -// this file contains all the graphics sources for easy inclusion in a project -#ifndef __tiles_gfx__ -#define __tiles_gfx__ -#include - -#define tiles_gfx_transparent_color_index 0 - - -#endif +// convpng +// this file contains all the graphics sources for easy inclusion in a project +#ifndef __tiles_gfx__ +#define __tiles_gfx__ +#include + +#define tiles_gfx_transparent_color_index 0 + + +#endif diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/gfx/tileset.c b/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/gfx/tileset.c index f4abe71..97bfe9b 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/gfx/tileset.c +++ b/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/gfx/tileset.c @@ -1,134 +1,134 @@ -// convpng -#include -#include "tiles_gfx.h" - -uint8_t *tileset_tiles_data[128] = { - (uint8_t*)0, - (uint8_t*)258, - (uint8_t*)516, - (uint8_t*)774, - (uint8_t*)1032, - (uint8_t*)1290, - (uint8_t*)1548, - (uint8_t*)1806, - (uint8_t*)2064, - (uint8_t*)2322, - (uint8_t*)2580, - (uint8_t*)2838, - (uint8_t*)3096, - (uint8_t*)3354, - (uint8_t*)3612, - (uint8_t*)3870, - (uint8_t*)4128, - (uint8_t*)4386, - (uint8_t*)4644, - (uint8_t*)4902, - (uint8_t*)5160, - (uint8_t*)5418, - (uint8_t*)5676, - (uint8_t*)5934, - (uint8_t*)6192, - (uint8_t*)6450, - (uint8_t*)6708, - (uint8_t*)6966, - (uint8_t*)7224, - (uint8_t*)7482, - (uint8_t*)7740, - (uint8_t*)7998, - (uint8_t*)8256, - (uint8_t*)8514, - (uint8_t*)8772, - (uint8_t*)9030, - (uint8_t*)9288, - (uint8_t*)9546, - (uint8_t*)9804, - (uint8_t*)10062, - (uint8_t*)10320, - (uint8_t*)10578, - (uint8_t*)10836, - (uint8_t*)11094, - (uint8_t*)11352, - (uint8_t*)11610, - (uint8_t*)11868, - (uint8_t*)12126, - (uint8_t*)12384, - (uint8_t*)12642, - (uint8_t*)12900, - (uint8_t*)13158, - (uint8_t*)13416, - (uint8_t*)13674, - (uint8_t*)13932, - (uint8_t*)14190, - (uint8_t*)14448, - (uint8_t*)14706, - (uint8_t*)14964, - (uint8_t*)15222, - (uint8_t*)15480, - (uint8_t*)15738, - (uint8_t*)15996, - (uint8_t*)16254, - (uint8_t*)16512, - (uint8_t*)16770, - (uint8_t*)17028, - (uint8_t*)17286, - (uint8_t*)17544, - (uint8_t*)17802, - (uint8_t*)18060, - (uint8_t*)18318, - (uint8_t*)18576, - (uint8_t*)18834, - (uint8_t*)19092, - (uint8_t*)19350, - (uint8_t*)19608, - (uint8_t*)19866, - (uint8_t*)20124, - (uint8_t*)20382, - (uint8_t*)20640, - (uint8_t*)20898, - (uint8_t*)21156, - (uint8_t*)21414, - (uint8_t*)21672, - (uint8_t*)21930, - (uint8_t*)22188, - (uint8_t*)22446, - (uint8_t*)22704, - (uint8_t*)22962, - (uint8_t*)23220, - (uint8_t*)23478, - (uint8_t*)23736, - (uint8_t*)23994, - (uint8_t*)24252, - (uint8_t*)24510, - (uint8_t*)24768, - (uint8_t*)25026, - (uint8_t*)25284, - (uint8_t*)25542, - (uint8_t*)25800, - (uint8_t*)26058, - (uint8_t*)26316, - (uint8_t*)26574, - (uint8_t*)26832, - (uint8_t*)27090, - (uint8_t*)27348, - (uint8_t*)27606, - (uint8_t*)27864, - (uint8_t*)28122, - (uint8_t*)28380, - (uint8_t*)28638, - (uint8_t*)28896, - (uint8_t*)29154, - (uint8_t*)29412, - (uint8_t*)29670, - (uint8_t*)29928, - (uint8_t*)30186, - (uint8_t*)30444, - (uint8_t*)30702, - (uint8_t*)30960, - (uint8_t*)31218, - (uint8_t*)31476, - (uint8_t*)31734, - (uint8_t*)31992, - (uint8_t*)32250, - (uint8_t*)32508, - (uint8_t*)32766, -}; +// convpng +#include +#include "tiles_gfx.h" + +uint8_t *tileset_tiles_data[128] = { + (uint8_t*)0, + (uint8_t*)258, + (uint8_t*)516, + (uint8_t*)774, + (uint8_t*)1032, + (uint8_t*)1290, + (uint8_t*)1548, + (uint8_t*)1806, + (uint8_t*)2064, + (uint8_t*)2322, + (uint8_t*)2580, + (uint8_t*)2838, + (uint8_t*)3096, + (uint8_t*)3354, + (uint8_t*)3612, + (uint8_t*)3870, + (uint8_t*)4128, + (uint8_t*)4386, + (uint8_t*)4644, + (uint8_t*)4902, + (uint8_t*)5160, + (uint8_t*)5418, + (uint8_t*)5676, + (uint8_t*)5934, + (uint8_t*)6192, + (uint8_t*)6450, + (uint8_t*)6708, + (uint8_t*)6966, + (uint8_t*)7224, + (uint8_t*)7482, + (uint8_t*)7740, + (uint8_t*)7998, + (uint8_t*)8256, + (uint8_t*)8514, + (uint8_t*)8772, + (uint8_t*)9030, + (uint8_t*)9288, + (uint8_t*)9546, + (uint8_t*)9804, + (uint8_t*)10062, + (uint8_t*)10320, + (uint8_t*)10578, + (uint8_t*)10836, + (uint8_t*)11094, + (uint8_t*)11352, + (uint8_t*)11610, + (uint8_t*)11868, + (uint8_t*)12126, + (uint8_t*)12384, + (uint8_t*)12642, + (uint8_t*)12900, + (uint8_t*)13158, + (uint8_t*)13416, + (uint8_t*)13674, + (uint8_t*)13932, + (uint8_t*)14190, + (uint8_t*)14448, + (uint8_t*)14706, + (uint8_t*)14964, + (uint8_t*)15222, + (uint8_t*)15480, + (uint8_t*)15738, + (uint8_t*)15996, + (uint8_t*)16254, + (uint8_t*)16512, + (uint8_t*)16770, + (uint8_t*)17028, + (uint8_t*)17286, + (uint8_t*)17544, + (uint8_t*)17802, + (uint8_t*)18060, + (uint8_t*)18318, + (uint8_t*)18576, + (uint8_t*)18834, + (uint8_t*)19092, + (uint8_t*)19350, + (uint8_t*)19608, + (uint8_t*)19866, + (uint8_t*)20124, + (uint8_t*)20382, + (uint8_t*)20640, + (uint8_t*)20898, + (uint8_t*)21156, + (uint8_t*)21414, + (uint8_t*)21672, + (uint8_t*)21930, + (uint8_t*)22188, + (uint8_t*)22446, + (uint8_t*)22704, + (uint8_t*)22962, + (uint8_t*)23220, + (uint8_t*)23478, + (uint8_t*)23736, + (uint8_t*)23994, + (uint8_t*)24252, + (uint8_t*)24510, + (uint8_t*)24768, + (uint8_t*)25026, + (uint8_t*)25284, + (uint8_t*)25542, + (uint8_t*)25800, + (uint8_t*)26058, + (uint8_t*)26316, + (uint8_t*)26574, + (uint8_t*)26832, + (uint8_t*)27090, + (uint8_t*)27348, + (uint8_t*)27606, + (uint8_t*)27864, + (uint8_t*)28122, + (uint8_t*)28380, + (uint8_t*)28638, + (uint8_t*)28896, + (uint8_t*)29154, + (uint8_t*)29412, + (uint8_t*)29670, + (uint8_t*)29928, + (uint8_t*)30186, + (uint8_t*)30444, + (uint8_t*)30702, + (uint8_t*)30960, + (uint8_t*)31218, + (uint8_t*)31476, + (uint8_t*)31734, + (uint8_t*)31992, + (uint8_t*)32250, + (uint8_t*)32508, + (uint8_t*)32766, +}; diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/gfx/var_gfx.c b/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/gfx/var_gfx.c index 3b84b3f..f8ea21f 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/gfx/var_gfx.c +++ b/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/gfx/var_gfx.c @@ -1,31 +1,31 @@ -// convpng -#include -#include "var_gfx.h" - -#include -uint8_t *var_gfx[2] = { - (uint8_t*)0, - (uint8_t*)33024, -}; - -bool var_gfx_init(void) { - unsigned int data, i; - ti_var_t appvar; - - ti_CloseAll(); - - appvar = ti_Open("var_gfx", "r"); - data = (unsigned int)ti_GetDataPtr(appvar) - (unsigned int)var_gfx[0]; - for (i = 0; i < var_gfx_num; i++) { - var_gfx[i] += data; - } - - ti_CloseAll(); - - data = (unsigned int)var_gfx[0] - (unsigned int)tileset_tiles_data[0]; - for (i = 0; i < tileset_tiles_num; i++) { - tileset_tiles_data[i] += data; - } - - return (bool)appvar; -} +// convpng +#include +#include "var_gfx.h" + +#include +uint8_t *var_gfx[2] = { + (uint8_t*)0, + (uint8_t*)33024, +}; + +bool var_gfx_init(void) { + unsigned int data, i; + ti_var_t appvar; + + ti_CloseAll(); + + appvar = ti_Open("var_gfx", "r"); + data = (unsigned int)ti_GetDataPtr(appvar) - (unsigned int)var_gfx[0]; + for (i = 0; i < var_gfx_num; i++) { + var_gfx[i] += data; + } + + ti_CloseAll(); + + data = (unsigned int)var_gfx[0] - (unsigned int)tileset_tiles_data[0]; + for (i = 0; i < tileset_tiles_num; i++) { + tileset_tiles_data[i] += data; + } + + return (bool)appvar; +} diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/gfx/var_gfx.h b/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/gfx/var_gfx.h index d472794..bc054aa 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/gfx/var_gfx.h +++ b/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/gfx/var_gfx.h @@ -1,148 +1,148 @@ -// convpng -// this file contains all the graphics sources for easy inclusion in a project -#ifndef __var_gfx__ -#define __var_gfx__ -#include - -#include - -#define var_gfx_num 2 - -extern uint8_t *var_gfx[2]; -#define tileset ((gfx_sprite_t*)var_gfx[0]) -#define tileset_tiles_num 128 -extern uint8_t *tileset_tiles_data[128]; -#define tileset_tiles ((gfx_sprite_t**)tileset_tiles_data) -#define tileset_tile_0 ((gfx_sprite_t*)tileset_tiles_data[0]) -#define tileset_tile_1 ((gfx_sprite_t*)tileset_tiles_data[1]) -#define tileset_tile_2 ((gfx_sprite_t*)tileset_tiles_data[2]) -#define tileset_tile_3 ((gfx_sprite_t*)tileset_tiles_data[3]) -#define tileset_tile_4 ((gfx_sprite_t*)tileset_tiles_data[4]) -#define tileset_tile_5 ((gfx_sprite_t*)tileset_tiles_data[5]) -#define tileset_tile_6 ((gfx_sprite_t*)tileset_tiles_data[6]) -#define tileset_tile_7 ((gfx_sprite_t*)tileset_tiles_data[7]) -#define tileset_tile_8 ((gfx_sprite_t*)tileset_tiles_data[8]) -#define tileset_tile_9 ((gfx_sprite_t*)tileset_tiles_data[9]) -#define tileset_tile_10 ((gfx_sprite_t*)tileset_tiles_data[10]) -#define tileset_tile_11 ((gfx_sprite_t*)tileset_tiles_data[11]) -#define tileset_tile_12 ((gfx_sprite_t*)tileset_tiles_data[12]) -#define tileset_tile_13 ((gfx_sprite_t*)tileset_tiles_data[13]) -#define tileset_tile_14 ((gfx_sprite_t*)tileset_tiles_data[14]) -#define tileset_tile_15 ((gfx_sprite_t*)tileset_tiles_data[15]) -#define tileset_tile_16 ((gfx_sprite_t*)tileset_tiles_data[16]) -#define tileset_tile_17 ((gfx_sprite_t*)tileset_tiles_data[17]) -#define tileset_tile_18 ((gfx_sprite_t*)tileset_tiles_data[18]) -#define tileset_tile_19 ((gfx_sprite_t*)tileset_tiles_data[19]) -#define tileset_tile_20 ((gfx_sprite_t*)tileset_tiles_data[20]) -#define tileset_tile_21 ((gfx_sprite_t*)tileset_tiles_data[21]) -#define tileset_tile_22 ((gfx_sprite_t*)tileset_tiles_data[22]) -#define tileset_tile_23 ((gfx_sprite_t*)tileset_tiles_data[23]) -#define tileset_tile_24 ((gfx_sprite_t*)tileset_tiles_data[24]) -#define tileset_tile_25 ((gfx_sprite_t*)tileset_tiles_data[25]) -#define tileset_tile_26 ((gfx_sprite_t*)tileset_tiles_data[26]) -#define tileset_tile_27 ((gfx_sprite_t*)tileset_tiles_data[27]) -#define tileset_tile_28 ((gfx_sprite_t*)tileset_tiles_data[28]) -#define tileset_tile_29 ((gfx_sprite_t*)tileset_tiles_data[29]) -#define tileset_tile_30 ((gfx_sprite_t*)tileset_tiles_data[30]) -#define tileset_tile_31 ((gfx_sprite_t*)tileset_tiles_data[31]) -#define tileset_tile_32 ((gfx_sprite_t*)tileset_tiles_data[32]) -#define tileset_tile_33 ((gfx_sprite_t*)tileset_tiles_data[33]) -#define tileset_tile_34 ((gfx_sprite_t*)tileset_tiles_data[34]) -#define tileset_tile_35 ((gfx_sprite_t*)tileset_tiles_data[35]) -#define tileset_tile_36 ((gfx_sprite_t*)tileset_tiles_data[36]) -#define tileset_tile_37 ((gfx_sprite_t*)tileset_tiles_data[37]) -#define tileset_tile_38 ((gfx_sprite_t*)tileset_tiles_data[38]) -#define tileset_tile_39 ((gfx_sprite_t*)tileset_tiles_data[39]) -#define tileset_tile_40 ((gfx_sprite_t*)tileset_tiles_data[40]) -#define tileset_tile_41 ((gfx_sprite_t*)tileset_tiles_data[41]) -#define tileset_tile_42 ((gfx_sprite_t*)tileset_tiles_data[42]) -#define tileset_tile_43 ((gfx_sprite_t*)tileset_tiles_data[43]) -#define tileset_tile_44 ((gfx_sprite_t*)tileset_tiles_data[44]) -#define tileset_tile_45 ((gfx_sprite_t*)tileset_tiles_data[45]) -#define tileset_tile_46 ((gfx_sprite_t*)tileset_tiles_data[46]) -#define tileset_tile_47 ((gfx_sprite_t*)tileset_tiles_data[47]) -#define tileset_tile_48 ((gfx_sprite_t*)tileset_tiles_data[48]) -#define tileset_tile_49 ((gfx_sprite_t*)tileset_tiles_data[49]) -#define tileset_tile_50 ((gfx_sprite_t*)tileset_tiles_data[50]) -#define tileset_tile_51 ((gfx_sprite_t*)tileset_tiles_data[51]) -#define tileset_tile_52 ((gfx_sprite_t*)tileset_tiles_data[52]) -#define tileset_tile_53 ((gfx_sprite_t*)tileset_tiles_data[53]) -#define tileset_tile_54 ((gfx_sprite_t*)tileset_tiles_data[54]) -#define tileset_tile_55 ((gfx_sprite_t*)tileset_tiles_data[55]) -#define tileset_tile_56 ((gfx_sprite_t*)tileset_tiles_data[56]) -#define tileset_tile_57 ((gfx_sprite_t*)tileset_tiles_data[57]) -#define tileset_tile_58 ((gfx_sprite_t*)tileset_tiles_data[58]) -#define tileset_tile_59 ((gfx_sprite_t*)tileset_tiles_data[59]) -#define tileset_tile_60 ((gfx_sprite_t*)tileset_tiles_data[60]) -#define tileset_tile_61 ((gfx_sprite_t*)tileset_tiles_data[61]) -#define tileset_tile_62 ((gfx_sprite_t*)tileset_tiles_data[62]) -#define tileset_tile_63 ((gfx_sprite_t*)tileset_tiles_data[63]) -#define tileset_tile_64 ((gfx_sprite_t*)tileset_tiles_data[64]) -#define tileset_tile_65 ((gfx_sprite_t*)tileset_tiles_data[65]) -#define tileset_tile_66 ((gfx_sprite_t*)tileset_tiles_data[66]) -#define tileset_tile_67 ((gfx_sprite_t*)tileset_tiles_data[67]) -#define tileset_tile_68 ((gfx_sprite_t*)tileset_tiles_data[68]) -#define tileset_tile_69 ((gfx_sprite_t*)tileset_tiles_data[69]) -#define tileset_tile_70 ((gfx_sprite_t*)tileset_tiles_data[70]) -#define tileset_tile_71 ((gfx_sprite_t*)tileset_tiles_data[71]) -#define tileset_tile_72 ((gfx_sprite_t*)tileset_tiles_data[72]) -#define tileset_tile_73 ((gfx_sprite_t*)tileset_tiles_data[73]) -#define tileset_tile_74 ((gfx_sprite_t*)tileset_tiles_data[74]) -#define tileset_tile_75 ((gfx_sprite_t*)tileset_tiles_data[75]) -#define tileset_tile_76 ((gfx_sprite_t*)tileset_tiles_data[76]) -#define tileset_tile_77 ((gfx_sprite_t*)tileset_tiles_data[77]) -#define tileset_tile_78 ((gfx_sprite_t*)tileset_tiles_data[78]) -#define tileset_tile_79 ((gfx_sprite_t*)tileset_tiles_data[79]) -#define tileset_tile_80 ((gfx_sprite_t*)tileset_tiles_data[80]) -#define tileset_tile_81 ((gfx_sprite_t*)tileset_tiles_data[81]) -#define tileset_tile_82 ((gfx_sprite_t*)tileset_tiles_data[82]) -#define tileset_tile_83 ((gfx_sprite_t*)tileset_tiles_data[83]) -#define tileset_tile_84 ((gfx_sprite_t*)tileset_tiles_data[84]) -#define tileset_tile_85 ((gfx_sprite_t*)tileset_tiles_data[85]) -#define tileset_tile_86 ((gfx_sprite_t*)tileset_tiles_data[86]) -#define tileset_tile_87 ((gfx_sprite_t*)tileset_tiles_data[87]) -#define tileset_tile_88 ((gfx_sprite_t*)tileset_tiles_data[88]) -#define tileset_tile_89 ((gfx_sprite_t*)tileset_tiles_data[89]) -#define tileset_tile_90 ((gfx_sprite_t*)tileset_tiles_data[90]) -#define tileset_tile_91 ((gfx_sprite_t*)tileset_tiles_data[91]) -#define tileset_tile_92 ((gfx_sprite_t*)tileset_tiles_data[92]) -#define tileset_tile_93 ((gfx_sprite_t*)tileset_tiles_data[93]) -#define tileset_tile_94 ((gfx_sprite_t*)tileset_tiles_data[94]) -#define tileset_tile_95 ((gfx_sprite_t*)tileset_tiles_data[95]) -#define tileset_tile_96 ((gfx_sprite_t*)tileset_tiles_data[96]) -#define tileset_tile_97 ((gfx_sprite_t*)tileset_tiles_data[97]) -#define tileset_tile_98 ((gfx_sprite_t*)tileset_tiles_data[98]) -#define tileset_tile_99 ((gfx_sprite_t*)tileset_tiles_data[99]) -#define tileset_tile_100 ((gfx_sprite_t*)tileset_tiles_data[100]) -#define tileset_tile_101 ((gfx_sprite_t*)tileset_tiles_data[101]) -#define tileset_tile_102 ((gfx_sprite_t*)tileset_tiles_data[102]) -#define tileset_tile_103 ((gfx_sprite_t*)tileset_tiles_data[103]) -#define tileset_tile_104 ((gfx_sprite_t*)tileset_tiles_data[104]) -#define tileset_tile_105 ((gfx_sprite_t*)tileset_tiles_data[105]) -#define tileset_tile_106 ((gfx_sprite_t*)tileset_tiles_data[106]) -#define tileset_tile_107 ((gfx_sprite_t*)tileset_tiles_data[107]) -#define tileset_tile_108 ((gfx_sprite_t*)tileset_tiles_data[108]) -#define tileset_tile_109 ((gfx_sprite_t*)tileset_tiles_data[109]) -#define tileset_tile_110 ((gfx_sprite_t*)tileset_tiles_data[110]) -#define tileset_tile_111 ((gfx_sprite_t*)tileset_tiles_data[111]) -#define tileset_tile_112 ((gfx_sprite_t*)tileset_tiles_data[112]) -#define tileset_tile_113 ((gfx_sprite_t*)tileset_tiles_data[113]) -#define tileset_tile_114 ((gfx_sprite_t*)tileset_tiles_data[114]) -#define tileset_tile_115 ((gfx_sprite_t*)tileset_tiles_data[115]) -#define tileset_tile_116 ((gfx_sprite_t*)tileset_tiles_data[116]) -#define tileset_tile_117 ((gfx_sprite_t*)tileset_tiles_data[117]) -#define tileset_tile_118 ((gfx_sprite_t*)tileset_tiles_data[118]) -#define tileset_tile_119 ((gfx_sprite_t*)tileset_tiles_data[119]) -#define tileset_tile_120 ((gfx_sprite_t*)tileset_tiles_data[120]) -#define tileset_tile_121 ((gfx_sprite_t*)tileset_tiles_data[121]) -#define tileset_tile_122 ((gfx_sprite_t*)tileset_tiles_data[122]) -#define tileset_tile_123 ((gfx_sprite_t*)tileset_tiles_data[123]) -#define tileset_tile_124 ((gfx_sprite_t*)tileset_tiles_data[124]) -#define tileset_tile_125 ((gfx_sprite_t*)tileset_tiles_data[125]) -#define tileset_tile_126 ((gfx_sprite_t*)tileset_tiles_data[126]) -#define tileset_tile_127 ((gfx_sprite_t*)tileset_tiles_data[127]) -#define sizeof_tiles_gfx_pal 152 -#define tiles_gfx_pal ((uint16_t*)var_gfx[1]) -bool var_gfx_init(void); - -#endif +// convpng +// this file contains all the graphics sources for easy inclusion in a project +#ifndef __var_gfx__ +#define __var_gfx__ +#include + +#include + +#define var_gfx_num 2 + +extern uint8_t *var_gfx[2]; +#define tileset ((gfx_sprite_t*)var_gfx[0]) +#define tileset_tiles_num 128 +extern uint8_t *tileset_tiles_data[128]; +#define tileset_tiles ((gfx_sprite_t**)tileset_tiles_data) +#define tileset_tile_0 ((gfx_sprite_t*)tileset_tiles_data[0]) +#define tileset_tile_1 ((gfx_sprite_t*)tileset_tiles_data[1]) +#define tileset_tile_2 ((gfx_sprite_t*)tileset_tiles_data[2]) +#define tileset_tile_3 ((gfx_sprite_t*)tileset_tiles_data[3]) +#define tileset_tile_4 ((gfx_sprite_t*)tileset_tiles_data[4]) +#define tileset_tile_5 ((gfx_sprite_t*)tileset_tiles_data[5]) +#define tileset_tile_6 ((gfx_sprite_t*)tileset_tiles_data[6]) +#define tileset_tile_7 ((gfx_sprite_t*)tileset_tiles_data[7]) +#define tileset_tile_8 ((gfx_sprite_t*)tileset_tiles_data[8]) +#define tileset_tile_9 ((gfx_sprite_t*)tileset_tiles_data[9]) +#define tileset_tile_10 ((gfx_sprite_t*)tileset_tiles_data[10]) +#define tileset_tile_11 ((gfx_sprite_t*)tileset_tiles_data[11]) +#define tileset_tile_12 ((gfx_sprite_t*)tileset_tiles_data[12]) +#define tileset_tile_13 ((gfx_sprite_t*)tileset_tiles_data[13]) +#define tileset_tile_14 ((gfx_sprite_t*)tileset_tiles_data[14]) +#define tileset_tile_15 ((gfx_sprite_t*)tileset_tiles_data[15]) +#define tileset_tile_16 ((gfx_sprite_t*)tileset_tiles_data[16]) +#define tileset_tile_17 ((gfx_sprite_t*)tileset_tiles_data[17]) +#define tileset_tile_18 ((gfx_sprite_t*)tileset_tiles_data[18]) +#define tileset_tile_19 ((gfx_sprite_t*)tileset_tiles_data[19]) +#define tileset_tile_20 ((gfx_sprite_t*)tileset_tiles_data[20]) +#define tileset_tile_21 ((gfx_sprite_t*)tileset_tiles_data[21]) +#define tileset_tile_22 ((gfx_sprite_t*)tileset_tiles_data[22]) +#define tileset_tile_23 ((gfx_sprite_t*)tileset_tiles_data[23]) +#define tileset_tile_24 ((gfx_sprite_t*)tileset_tiles_data[24]) +#define tileset_tile_25 ((gfx_sprite_t*)tileset_tiles_data[25]) +#define tileset_tile_26 ((gfx_sprite_t*)tileset_tiles_data[26]) +#define tileset_tile_27 ((gfx_sprite_t*)tileset_tiles_data[27]) +#define tileset_tile_28 ((gfx_sprite_t*)tileset_tiles_data[28]) +#define tileset_tile_29 ((gfx_sprite_t*)tileset_tiles_data[29]) +#define tileset_tile_30 ((gfx_sprite_t*)tileset_tiles_data[30]) +#define tileset_tile_31 ((gfx_sprite_t*)tileset_tiles_data[31]) +#define tileset_tile_32 ((gfx_sprite_t*)tileset_tiles_data[32]) +#define tileset_tile_33 ((gfx_sprite_t*)tileset_tiles_data[33]) +#define tileset_tile_34 ((gfx_sprite_t*)tileset_tiles_data[34]) +#define tileset_tile_35 ((gfx_sprite_t*)tileset_tiles_data[35]) +#define tileset_tile_36 ((gfx_sprite_t*)tileset_tiles_data[36]) +#define tileset_tile_37 ((gfx_sprite_t*)tileset_tiles_data[37]) +#define tileset_tile_38 ((gfx_sprite_t*)tileset_tiles_data[38]) +#define tileset_tile_39 ((gfx_sprite_t*)tileset_tiles_data[39]) +#define tileset_tile_40 ((gfx_sprite_t*)tileset_tiles_data[40]) +#define tileset_tile_41 ((gfx_sprite_t*)tileset_tiles_data[41]) +#define tileset_tile_42 ((gfx_sprite_t*)tileset_tiles_data[42]) +#define tileset_tile_43 ((gfx_sprite_t*)tileset_tiles_data[43]) +#define tileset_tile_44 ((gfx_sprite_t*)tileset_tiles_data[44]) +#define tileset_tile_45 ((gfx_sprite_t*)tileset_tiles_data[45]) +#define tileset_tile_46 ((gfx_sprite_t*)tileset_tiles_data[46]) +#define tileset_tile_47 ((gfx_sprite_t*)tileset_tiles_data[47]) +#define tileset_tile_48 ((gfx_sprite_t*)tileset_tiles_data[48]) +#define tileset_tile_49 ((gfx_sprite_t*)tileset_tiles_data[49]) +#define tileset_tile_50 ((gfx_sprite_t*)tileset_tiles_data[50]) +#define tileset_tile_51 ((gfx_sprite_t*)tileset_tiles_data[51]) +#define tileset_tile_52 ((gfx_sprite_t*)tileset_tiles_data[52]) +#define tileset_tile_53 ((gfx_sprite_t*)tileset_tiles_data[53]) +#define tileset_tile_54 ((gfx_sprite_t*)tileset_tiles_data[54]) +#define tileset_tile_55 ((gfx_sprite_t*)tileset_tiles_data[55]) +#define tileset_tile_56 ((gfx_sprite_t*)tileset_tiles_data[56]) +#define tileset_tile_57 ((gfx_sprite_t*)tileset_tiles_data[57]) +#define tileset_tile_58 ((gfx_sprite_t*)tileset_tiles_data[58]) +#define tileset_tile_59 ((gfx_sprite_t*)tileset_tiles_data[59]) +#define tileset_tile_60 ((gfx_sprite_t*)tileset_tiles_data[60]) +#define tileset_tile_61 ((gfx_sprite_t*)tileset_tiles_data[61]) +#define tileset_tile_62 ((gfx_sprite_t*)tileset_tiles_data[62]) +#define tileset_tile_63 ((gfx_sprite_t*)tileset_tiles_data[63]) +#define tileset_tile_64 ((gfx_sprite_t*)tileset_tiles_data[64]) +#define tileset_tile_65 ((gfx_sprite_t*)tileset_tiles_data[65]) +#define tileset_tile_66 ((gfx_sprite_t*)tileset_tiles_data[66]) +#define tileset_tile_67 ((gfx_sprite_t*)tileset_tiles_data[67]) +#define tileset_tile_68 ((gfx_sprite_t*)tileset_tiles_data[68]) +#define tileset_tile_69 ((gfx_sprite_t*)tileset_tiles_data[69]) +#define tileset_tile_70 ((gfx_sprite_t*)tileset_tiles_data[70]) +#define tileset_tile_71 ((gfx_sprite_t*)tileset_tiles_data[71]) +#define tileset_tile_72 ((gfx_sprite_t*)tileset_tiles_data[72]) +#define tileset_tile_73 ((gfx_sprite_t*)tileset_tiles_data[73]) +#define tileset_tile_74 ((gfx_sprite_t*)tileset_tiles_data[74]) +#define tileset_tile_75 ((gfx_sprite_t*)tileset_tiles_data[75]) +#define tileset_tile_76 ((gfx_sprite_t*)tileset_tiles_data[76]) +#define tileset_tile_77 ((gfx_sprite_t*)tileset_tiles_data[77]) +#define tileset_tile_78 ((gfx_sprite_t*)tileset_tiles_data[78]) +#define tileset_tile_79 ((gfx_sprite_t*)tileset_tiles_data[79]) +#define tileset_tile_80 ((gfx_sprite_t*)tileset_tiles_data[80]) +#define tileset_tile_81 ((gfx_sprite_t*)tileset_tiles_data[81]) +#define tileset_tile_82 ((gfx_sprite_t*)tileset_tiles_data[82]) +#define tileset_tile_83 ((gfx_sprite_t*)tileset_tiles_data[83]) +#define tileset_tile_84 ((gfx_sprite_t*)tileset_tiles_data[84]) +#define tileset_tile_85 ((gfx_sprite_t*)tileset_tiles_data[85]) +#define tileset_tile_86 ((gfx_sprite_t*)tileset_tiles_data[86]) +#define tileset_tile_87 ((gfx_sprite_t*)tileset_tiles_data[87]) +#define tileset_tile_88 ((gfx_sprite_t*)tileset_tiles_data[88]) +#define tileset_tile_89 ((gfx_sprite_t*)tileset_tiles_data[89]) +#define tileset_tile_90 ((gfx_sprite_t*)tileset_tiles_data[90]) +#define tileset_tile_91 ((gfx_sprite_t*)tileset_tiles_data[91]) +#define tileset_tile_92 ((gfx_sprite_t*)tileset_tiles_data[92]) +#define tileset_tile_93 ((gfx_sprite_t*)tileset_tiles_data[93]) +#define tileset_tile_94 ((gfx_sprite_t*)tileset_tiles_data[94]) +#define tileset_tile_95 ((gfx_sprite_t*)tileset_tiles_data[95]) +#define tileset_tile_96 ((gfx_sprite_t*)tileset_tiles_data[96]) +#define tileset_tile_97 ((gfx_sprite_t*)tileset_tiles_data[97]) +#define tileset_tile_98 ((gfx_sprite_t*)tileset_tiles_data[98]) +#define tileset_tile_99 ((gfx_sprite_t*)tileset_tiles_data[99]) +#define tileset_tile_100 ((gfx_sprite_t*)tileset_tiles_data[100]) +#define tileset_tile_101 ((gfx_sprite_t*)tileset_tiles_data[101]) +#define tileset_tile_102 ((gfx_sprite_t*)tileset_tiles_data[102]) +#define tileset_tile_103 ((gfx_sprite_t*)tileset_tiles_data[103]) +#define tileset_tile_104 ((gfx_sprite_t*)tileset_tiles_data[104]) +#define tileset_tile_105 ((gfx_sprite_t*)tileset_tiles_data[105]) +#define tileset_tile_106 ((gfx_sprite_t*)tileset_tiles_data[106]) +#define tileset_tile_107 ((gfx_sprite_t*)tileset_tiles_data[107]) +#define tileset_tile_108 ((gfx_sprite_t*)tileset_tiles_data[108]) +#define tileset_tile_109 ((gfx_sprite_t*)tileset_tiles_data[109]) +#define tileset_tile_110 ((gfx_sprite_t*)tileset_tiles_data[110]) +#define tileset_tile_111 ((gfx_sprite_t*)tileset_tiles_data[111]) +#define tileset_tile_112 ((gfx_sprite_t*)tileset_tiles_data[112]) +#define tileset_tile_113 ((gfx_sprite_t*)tileset_tiles_data[113]) +#define tileset_tile_114 ((gfx_sprite_t*)tileset_tiles_data[114]) +#define tileset_tile_115 ((gfx_sprite_t*)tileset_tiles_data[115]) +#define tileset_tile_116 ((gfx_sprite_t*)tileset_tiles_data[116]) +#define tileset_tile_117 ((gfx_sprite_t*)tileset_tiles_data[117]) +#define tileset_tile_118 ((gfx_sprite_t*)tileset_tiles_data[118]) +#define tileset_tile_119 ((gfx_sprite_t*)tileset_tiles_data[119]) +#define tileset_tile_120 ((gfx_sprite_t*)tileset_tiles_data[120]) +#define tileset_tile_121 ((gfx_sprite_t*)tileset_tiles_data[121]) +#define tileset_tile_122 ((gfx_sprite_t*)tileset_tiles_data[122]) +#define tileset_tile_123 ((gfx_sprite_t*)tileset_tiles_data[123]) +#define tileset_tile_124 ((gfx_sprite_t*)tileset_tiles_data[124]) +#define tileset_tile_125 ((gfx_sprite_t*)tileset_tiles_data[125]) +#define tileset_tile_126 ((gfx_sprite_t*)tileset_tiles_data[126]) +#define tileset_tile_127 ((gfx_sprite_t*)tileset_tiles_data[127]) +#define sizeof_tiles_gfx_pal 152 +#define tiles_gfx_pal ((uint16_t*)var_gfx[1]) +bool var_gfx_init(void); + +#endif diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/main.c b/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/main.c index caaf863..ffa2988 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/main.c +++ b/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/main.c @@ -1,106 +1,106 @@ -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -/* Include the graphics */ -#include "gfx/tiles_gfx.h" -#include "gfx/var_gfx.h" - -/* Include the external map data */ -extern uint8_t tilemap_map[]; - -/* Tilemap defines */ -#define TILE_WIDTH 16 -#define TILE_HEIGHT 16 - -#define TILEMAP_WIDTH 32 -#define TILEMAP_HEIGHT 25 - -#define TILEMAP_DRAW_WIDTH 20 -#define TILEMAP_DRAW_HEIGHT 14 - -#define Y_OFFSET 16 -#define X_OFFSET 0 - -void main(void) { - sk_key_t key; - unsigned int x_offset = 0; - unsigned int y_offset = 0; - gfx_tilemap_t tilemap; - - /* Initialize the graphics */ - var_gfx_init(); - - /* Initialize the tilemap structure */ - tilemap.map = tilemap_map; - tilemap.tiles = tileset_tiles; - tilemap.type_width = gfx_tile_16_pixel; - tilemap.type_height = gfx_tile_16_pixel; - tilemap.tile_height = TILE_HEIGHT; - tilemap.tile_width = TILE_WIDTH; - tilemap.draw_height = TILEMAP_DRAW_HEIGHT; - tilemap.draw_width = TILEMAP_DRAW_WIDTH; - tilemap.height = TILEMAP_HEIGHT; - tilemap.width = TILEMAP_WIDTH; - tilemap.y_loc = Y_OFFSET; - tilemap.x_loc = X_OFFSET; - - /* Initialize the 8bpp graphics */ - gfx_Begin(); - - /* Set up the palette */ - gfx_SetPalette(tiles_gfx_pal, sizeof_tiles_gfx_pal, 0); - gfx_SetColor(gfx_white); - - /* Draw to buffer to avoid tearing */ - gfx_SetDrawBuffer(); - - /* Set monospace font with width of 8 */ - gfx_SetMonospaceFont(8); - - /* Wait for the enter key to quit */ - while ((key = os_GetCSC()) != sk_Enter) { - - /* Draw tilemap and coords */ - gfx_Tilemap(&tilemap, x_offset, y_offset); - gfx_FillRectangle(0, 0, 320, 16); - gfx_PrintStringXY("x offset:", 48, 4); - gfx_PrintUInt(x_offset, 4); - gfx_PrintString(" y offset:"); - gfx_PrintUInt(y_offset, 4); - - /* Do something based on the keypress */ - switch (key) { - case sk_Down: - if (y_offset < (TILEMAP_HEIGHT * TILE_HEIGHT) - (TILEMAP_DRAW_HEIGHT * TILE_HEIGHT)) - y_offset += TILE_HEIGHT; - break; - case sk_Left: - if (x_offset) - x_offset -= TILE_WIDTH; - break; - case sk_Right: - if (x_offset < (TILEMAP_WIDTH * TILE_WIDTH) - (TILEMAP_DRAW_WIDTH * TILE_WIDTH)) - x_offset += TILE_WIDTH; - break; - case sk_Up: - if (y_offset) - y_offset -= TILE_HEIGHT; - break; - default: - break; - } - gfx_SwapDraw(); - } - - /* Close the graphics and return to the OS */ - gfx_End(); -} +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +/* Include the graphics */ +#include "gfx/tiles_gfx.h" +#include "gfx/var_gfx.h" + +/* Include the external map data */ +extern uint8_t tilemap_map[]; + +/* Tilemap defines */ +#define TILE_WIDTH 16 +#define TILE_HEIGHT 16 + +#define TILEMAP_WIDTH 32 +#define TILEMAP_HEIGHT 25 + +#define TILEMAP_DRAW_WIDTH 20 +#define TILEMAP_DRAW_HEIGHT 14 + +#define Y_OFFSET 16 +#define X_OFFSET 0 + +void main(void) { + sk_key_t key; + unsigned int x_offset = 0; + unsigned int y_offset = 0; + gfx_tilemap_t tilemap; + + /* Initialize the graphics */ + var_gfx_init(); + + /* Initialize the tilemap structure */ + tilemap.map = tilemap_map; + tilemap.tiles = tileset_tiles; + tilemap.type_width = gfx_tile_16_pixel; + tilemap.type_height = gfx_tile_16_pixel; + tilemap.tile_height = TILE_HEIGHT; + tilemap.tile_width = TILE_WIDTH; + tilemap.draw_height = TILEMAP_DRAW_HEIGHT; + tilemap.draw_width = TILEMAP_DRAW_WIDTH; + tilemap.height = TILEMAP_HEIGHT; + tilemap.width = TILEMAP_WIDTH; + tilemap.y_loc = Y_OFFSET; + tilemap.x_loc = X_OFFSET; + + /* Initialize the 8bpp graphics */ + gfx_Begin(); + + /* Set up the palette */ + gfx_SetPalette(tiles_gfx_pal, sizeof_tiles_gfx_pal, 0); + gfx_SetColor(gfx_white); + + /* Draw to buffer to avoid tearing */ + gfx_SetDrawBuffer(); + + /* Set monospace font with width of 8 */ + gfx_SetMonospaceFont(8); + + /* Wait for the enter key to quit */ + while ((key = os_GetCSC()) != sk_Enter) { + + /* Draw tilemap and coords */ + gfx_Tilemap(&tilemap, x_offset, y_offset); + gfx_FillRectangle(0, 0, 320, 16); + gfx_PrintStringXY("x offset:", 48, 4); + gfx_PrintUInt(x_offset, 4); + gfx_PrintString(" y offset:"); + gfx_PrintUInt(y_offset, 4); + + /* Do something based on the keypress */ + switch (key) { + case sk_Down: + if (y_offset < (TILEMAP_HEIGHT * TILE_HEIGHT) - (TILEMAP_DRAW_HEIGHT * TILE_HEIGHT)) + y_offset += TILE_HEIGHT; + break; + case sk_Left: + if (x_offset) + x_offset -= TILE_WIDTH; + break; + case sk_Right: + if (x_offset < (TILEMAP_WIDTH * TILE_WIDTH) - (TILEMAP_DRAW_WIDTH * TILE_WIDTH)) + x_offset += TILE_WIDTH; + break; + case sk_Up: + if (y_offset) + y_offset -= TILE_HEIGHT; + break; + default: + break; + } + gfx_SwapDraw(); + } + + /* Close the graphics and return to the OS */ + gfx_End(); +} diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/tilemapdata.c b/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/tilemapdata.c index d443c6c..7fbe1a2 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/tilemapdata.c +++ b/frontends/calculator/CEdev/examples/gfx_tilemap_appvar/src/tilemapdata.c @@ -1,30 +1,30 @@ -#include - -/* This is the data that is displayed with the tilemap */ -uint8_t tilemap_map[] = { - 0x20,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x22,0x14,0x15,0x04,0x05,0x20,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x22, - 0x30,0x54,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x53,0x32,0x04,0x05,0x14,0x15,0x40,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x53,0x32, - 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x30,0x32,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, - 0x30,0x32,0x01,0x10,0x10,0x10,0x00,0x00,0x01,0x00,0x01,0x00,0x30,0x32,0x04,0x05,0x14,0x15,0x00,0x50,0x51,0x51,0x52,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, - 0x30,0x32,0x00,0x10,0x10,0x10,0x00,0x01,0x00,0x01,0x00,0x01,0x30,0x32,0x14,0x15,0x04,0x05,0x00,0x60,0x61,0x61,0x62,0x00,0x00,0x00,0x10,0x10,0x10,0x00,0x30,0x32, - 0x30,0x32,0x01,0x10,0x10,0x10,0x00,0x00,0x01,0x00,0x01,0x00,0x40,0x42,0x04,0x05,0x14,0x15,0x00,0x60,0x61,0x61,0x62,0x00,0x00,0x00,0x10,0x10,0x10,0x00,0x30,0x32, - 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x00,0x14,0x15,0x04,0x05,0x00,0x70,0x71,0x71,0x72,0x00,0x00,0x00,0x10,0x10,0x10,0x00,0x30,0x32, - 0x30,0x32,0x01,0x00,0x01,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x01,0x00,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, - 0x30,0x32,0x00,0x01,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, - 0x30,0x32,0x01,0x00,0x00,0x00,0x01,0x10,0x10,0x10,0x10,0x10,0x01,0x00,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, - 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, - 0x30,0x32,0x01,0x00,0x01,0x00,0x01,0x10,0x10,0x10,0x10,0x10,0x01,0x00,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x20,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x43,0x32, - 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x00,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x40,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x53,0x32, - 0x30,0x32,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x20,0x22,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, - 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x30,0x32,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, - 0x30,0x32,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x30,0x32,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, - 0x30,0x32,0x00,0x00,0x00,0x01,0x00,0x01,0x10,0x10,0x00,0x01,0x30,0x32,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, - 0x30,0x32,0x01,0x00,0x01,0x00,0x01,0x00,0x10,0x10,0x01,0x00,0x30,0x32,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, - 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x30,0x32,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, - 0x30,0x32,0x01,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x30,0x32,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, - 0x30,0x32,0x00,0x10,0x10,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x30,0x32,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, - 0x30,0x32,0x01,0x10,0x10,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x30,0x32,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, - 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x00,0x30,0x32,0x14,0x15,0x24,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, - 0x30,0x44,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x43,0x32,0x04,0x05,0x20,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x43,0x32, - 0x40,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x42,0x14,0x15,0x40,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x42, -}; +#include + +/* This is the data that is displayed with the tilemap */ +uint8_t tilemap_map[] = { + 0x20,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x22,0x14,0x15,0x04,0x05,0x20,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x22, + 0x30,0x54,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x53,0x32,0x04,0x05,0x14,0x15,0x40,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x53,0x32, + 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x30,0x32,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, + 0x30,0x32,0x01,0x10,0x10,0x10,0x00,0x00,0x01,0x00,0x01,0x00,0x30,0x32,0x04,0x05,0x14,0x15,0x00,0x50,0x51,0x51,0x52,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, + 0x30,0x32,0x00,0x10,0x10,0x10,0x00,0x01,0x00,0x01,0x00,0x01,0x30,0x32,0x14,0x15,0x04,0x05,0x00,0x60,0x61,0x61,0x62,0x00,0x00,0x00,0x10,0x10,0x10,0x00,0x30,0x32, + 0x30,0x32,0x01,0x10,0x10,0x10,0x00,0x00,0x01,0x00,0x01,0x00,0x40,0x42,0x04,0x05,0x14,0x15,0x00,0x60,0x61,0x61,0x62,0x00,0x00,0x00,0x10,0x10,0x10,0x00,0x30,0x32, + 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x00,0x14,0x15,0x04,0x05,0x00,0x70,0x71,0x71,0x72,0x00,0x00,0x00,0x10,0x10,0x10,0x00,0x30,0x32, + 0x30,0x32,0x01,0x00,0x01,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x01,0x00,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, + 0x30,0x32,0x00,0x01,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, + 0x30,0x32,0x01,0x00,0x00,0x00,0x01,0x10,0x10,0x10,0x10,0x10,0x01,0x00,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, + 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, + 0x30,0x32,0x01,0x00,0x01,0x00,0x01,0x10,0x10,0x10,0x10,0x10,0x01,0x00,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x20,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x43,0x32, + 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x00,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x40,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x53,0x32, + 0x30,0x32,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x20,0x22,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, + 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x30,0x32,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, + 0x30,0x32,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x30,0x32,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, + 0x30,0x32,0x00,0x00,0x00,0x01,0x00,0x01,0x10,0x10,0x00,0x01,0x30,0x32,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, + 0x30,0x32,0x01,0x00,0x01,0x00,0x01,0x00,0x10,0x10,0x01,0x00,0x30,0x32,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, + 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x30,0x32,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, + 0x30,0x32,0x01,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x30,0x32,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, + 0x30,0x32,0x00,0x10,0x10,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x30,0x32,0x14,0x15,0x04,0x05,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, + 0x30,0x32,0x01,0x10,0x10,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x30,0x32,0x04,0x05,0x14,0x15,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x30,0x32, + 0x30,0x32,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x00,0x30,0x32,0x14,0x15,0x24,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x32, + 0x30,0x44,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x43,0x32,0x04,0x05,0x20,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x43,0x32, + 0x40,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x42,0x14,0x15,0x40,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x42, +}; diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap_compress/autotester.json b/frontends/calculator/CEdev/examples/gfx_tilemap_compress/autotester.json index 085435f..7f99ced 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap_compress/autotester.json +++ b/frontends/calculator/CEdev/examples/gfx_tilemap_compress/autotester.json @@ -1,43 +1,43 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "hashWait|1", - "delay|100", - "key|right", - "key|right", - "key|down", - "key|down", - "hashWait|2", - "key|enter", - "hashWait|3" - ], - "hashes": { - "1": { - "description": "Initial sprite map state (top left)", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "EEED1F0B" ] - }, - "2": { - "description": "Moving a bit to the bottom right", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "BBB0544" ] - }, - "3": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} - +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "hashWait|1", + "delay|100", + "key|right", + "key|right", + "key|down", + "key|down", + "hashWait|2", + "key|enter", + "hashWait|3" + ], + "hashes": { + "1": { + "description": "Initial sprite map state (top left)", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "EEED1F0B" ] + }, + "2": { + "description": "Moving a bit to the bottom right", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "BBB0544" ] + }, + "3": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} + diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap_compress/makefile b/frontends/calculator/CEdev/examples/gfx_tilemap_compress/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap_compress/makefile +++ b/frontends/calculator/CEdev/examples/gfx_tilemap_compress/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap_compress/readme.md b/frontends/calculator/CEdev/examples/gfx_tilemap_compress/readme.md index d38a92c..f680b54 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap_compress/readme.md +++ b/frontends/calculator/CEdev/examples/gfx_tilemap_compress/readme.md @@ -1,10 +1,10 @@ -### GraphX Simple Compressed Tilemap Demo - -An example of tilemaping using a sequence of tiles and the keypad, except with compressed tiles. - -![Screenshot](../gfx_tilemap/screenshot.gif) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### GraphX Simple Compressed Tilemap Demo + +An example of tilemaping using a sequence of tiles and the keypad, except with compressed tiles. + +![Screenshot](../gfx_tilemap/screenshot.gif) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/gfx/convpng.ini b/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/gfx/convpng.ini index 3e0f83e..743532f 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/gfx/convpng.ini +++ b/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/gfx/convpng.ini @@ -1,6 +1,6 @@ -#GroupC : tiles_gfx -#TransparentColor : 255,201,14,255 -#Compression : zx7 -#Tilemap : 16,16,true -#PNGImages : - tileset +#GroupC : tiles_gfx +#TransparentColor : 255,201,14,255 +#Compression : zx7 +#Tilemap : 16,16,true +#PNGImages : + tileset diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/gfx/tiles_gfx.c b/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/gfx/tiles_gfx.c index 2d1e613..916813e 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/gfx/tiles_gfx.c +++ b/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/gfx/tiles_gfx.c @@ -1,82 +1,82 @@ -// convpng -#include -#include "tiles_gfx.h" - -uint16_t tiles_gfx_pal[76] = { - 0x7F22, // 00 :: rgb(255,201,14) - 0xC30C, // 01 :: rgb(132,198,99) - 0x212D, // 02 :: rgb(65,72,106) - 0x1D40, // 03 :: rgb(56,80,0) - 0x1E46, // 04 :: rgb(57,146,49) - 0xDBD1, // 05 :: rgb(184,248,136) - 0xEB7B, // 06 :: rgb(216,224,224) - 0x318F, // 07 :: rgb(99,96,123) - 0x7771, // 08 :: rgb(239,219,140) - 0x650A, // 09 :: rgb(206,64,81) - 0x5F3C, // 10 :: rgb(189,203,231) - 0x6F9D, // 11 :: rgb(222,227,239) - 0x25D5, // 12 :: rgb(73,113,173) - 0x52D8, // 13 :: rgb(165,178,198) - 0xD353, // 14 :: rgb(168,216,160) - 0x6DAC, // 15 :: rgb(222,105,98) - 0x4211, // 16 :: rgb(132,130,140) - 0x3AFE, // 17 :: rgb(115,186,247) - 0x764E, // 18 :: rgb(239,146,114) - 0xE319, // 19 :: rgb(199,199,207) - 0x5A0D, // 20 :: rgb(184,128,111) - 0xE6F0, // 21 :: rgb(208,192,128) - 0x7EF0, // 22 :: rgb(255,186,132) - 0x4EDB, // 23 :: rgb(156,178,222) - 0x6EAE, // 24 :: rgb(222,170,114) - 0x49AD, // 25 :: rgb(148,105,106) - 0x32BD, // 26 :: rgb(99,170,239) - 0xFFFF, // 27 :: rgb(255,255,255) - 0x0E8D, // 28 :: rgb(23,162,107) - 0x666A, // 29 :: rgb(206,154,81) - 0x6ACD, // 30 :: rgb(214,178,106) - 0x22D1, // 31 :: rgb(65,178,140) - 0x18C2, // 32 :: rgb(48,48,14) - 0x5A30, // 33 :: rgb(182,138,130) - 0xB27A, // 34 :: rgb(96,159,215) - 0x7BAE, // 35 :: rgb(245,233,112) - 0x6E2C, // 36 :: rgb(224,136,95) - 0x2A37, // 37 :: rgb(79,136,192) - 0x39A6, // 38 :: rgb(112,104,47) - 0x0420, // 39 :: rgb(8,8,4) - 0xEAF3, // 40 :: rgb(214,191,154) - 0x2CE8, // 41 :: rgb(89,56,65) - 0xEF12, // 42 :: rgb(224,200,144) - 0xDEAD, // 43 :: rgb(191,175,110) - 0x5A51, // 44 :: rgb(184,144,136) - 0x6F30, // 45 :: rgb(222,203,132) - 0xCB3E, // 46 :: rgb(151,207,247) - 0xE35C, // 47 :: rgb(199,215,231) - 0x7399, // 48 :: rgb(231,227,206) - 0x7794, // 49 :: rgb(239,227,165) - 0x7AD0, // 50 :: rgb(247,178,132) - 0x3D29, // 51 :: rgb(123,73,73) - 0x32BC, // 52 :: rgb(96,168,232) - 0x3DF0, // 53 :: rgb(123,123,132) - 0x7337, // 54 :: rgb(228,201,192) - 0x1CC5, // 55 :: rgb(56,48,40) - 0x252B, // 56 :: rgb(71,71,87) - 0x1A05, // 57 :: rgb(46,130,39) - 0xE6AD, // 58 :: rgb(208,176,103) - 0xCF77, // 59 :: rgb(160,224,192) - 0x356B, // 60 :: rgb(107,88,89) - 0xCB58, // 61 :: rgb(144,216,200) - 0xC32A, // 62 :: rgb(135,207,79) - 0x2505, // 63 :: rgb(78,65,39) - 0x6BBF, // 64 :: rgb(214,235,255) - 0x5085, // 65 :: rgb(167,31,39) - 0xAD4D, // 66 :: rgb(87,87,110) - 0xDB1B, // 67 :: rgb(184,200,224) - 0x25D4, // 68 :: rgb(71,112,168) - 0x4E23, // 69 :: rgb(155,139,24) - 0x6149, // 70 :: rgb(199,79,71) - 0x91CA, // 71 :: rgb(37,117,83) - 0x2DD7, // 72 :: rgb(89,113,189) - 0xC76C, // 73 :: rgb(142,221,101) - 0xFB33, // 74 :: rgb(247,207,159) - 0xBB13, // 75 :: rgb(112,199,159) +// convpng +#include +#include "tiles_gfx.h" + +uint16_t tiles_gfx_pal[76] = { + 0x7F22, // 00 :: rgb(255,201,14) + 0xC30C, // 01 :: rgb(132,198,99) + 0x212D, // 02 :: rgb(65,72,106) + 0x1D40, // 03 :: rgb(56,80,0) + 0x1E46, // 04 :: rgb(57,146,49) + 0xDBD1, // 05 :: rgb(184,248,136) + 0xEB7B, // 06 :: rgb(216,224,224) + 0x318F, // 07 :: rgb(99,96,123) + 0x7771, // 08 :: rgb(239,219,140) + 0x650A, // 09 :: rgb(206,64,81) + 0x5F3C, // 10 :: rgb(189,203,231) + 0x6F9D, // 11 :: rgb(222,227,239) + 0x25D5, // 12 :: rgb(73,113,173) + 0x52D8, // 13 :: rgb(165,178,198) + 0xD353, // 14 :: rgb(168,216,160) + 0x6DAC, // 15 :: rgb(222,105,98) + 0x4211, // 16 :: rgb(132,130,140) + 0x3AFE, // 17 :: rgb(115,186,247) + 0x764E, // 18 :: rgb(239,146,114) + 0xE319, // 19 :: rgb(199,199,207) + 0x5A0D, // 20 :: rgb(184,128,111) + 0xE6F0, // 21 :: rgb(208,192,128) + 0x7EF0, // 22 :: rgb(255,186,132) + 0x4EDB, // 23 :: rgb(156,178,222) + 0x6EAE, // 24 :: rgb(222,170,114) + 0x49AD, // 25 :: rgb(148,105,106) + 0x32BD, // 26 :: rgb(99,170,239) + 0xFFFF, // 27 :: rgb(255,255,255) + 0x0E8D, // 28 :: rgb(23,162,107) + 0x666A, // 29 :: rgb(206,154,81) + 0x6ACD, // 30 :: rgb(214,178,106) + 0x22D1, // 31 :: rgb(65,178,140) + 0x18C2, // 32 :: rgb(48,48,14) + 0x5A30, // 33 :: rgb(182,138,130) + 0xB27A, // 34 :: rgb(96,159,215) + 0x7BAE, // 35 :: rgb(245,233,112) + 0x6E2C, // 36 :: rgb(224,136,95) + 0x2A37, // 37 :: rgb(79,136,192) + 0x39A6, // 38 :: rgb(112,104,47) + 0x0420, // 39 :: rgb(8,8,4) + 0xEAF3, // 40 :: rgb(214,191,154) + 0x2CE8, // 41 :: rgb(89,56,65) + 0xEF12, // 42 :: rgb(224,200,144) + 0xDEAD, // 43 :: rgb(191,175,110) + 0x5A51, // 44 :: rgb(184,144,136) + 0x6F30, // 45 :: rgb(222,203,132) + 0xCB3E, // 46 :: rgb(151,207,247) + 0xE35C, // 47 :: rgb(199,215,231) + 0x7399, // 48 :: rgb(231,227,206) + 0x7794, // 49 :: rgb(239,227,165) + 0x7AD0, // 50 :: rgb(247,178,132) + 0x3D29, // 51 :: rgb(123,73,73) + 0x32BC, // 52 :: rgb(96,168,232) + 0x3DF0, // 53 :: rgb(123,123,132) + 0x7337, // 54 :: rgb(228,201,192) + 0x1CC5, // 55 :: rgb(56,48,40) + 0x252B, // 56 :: rgb(71,71,87) + 0x1A05, // 57 :: rgb(46,130,39) + 0xE6AD, // 58 :: rgb(208,176,103) + 0xCF77, // 59 :: rgb(160,224,192) + 0x356B, // 60 :: rgb(107,88,89) + 0xCB58, // 61 :: rgb(144,216,200) + 0xC32A, // 62 :: rgb(135,207,79) + 0x2505, // 63 :: rgb(78,65,39) + 0x6BBF, // 64 :: rgb(214,235,255) + 0x5085, // 65 :: rgb(167,31,39) + 0xAD4D, // 66 :: rgb(87,87,110) + 0xDB1B, // 67 :: rgb(184,200,224) + 0x25D4, // 68 :: rgb(71,112,168) + 0x4E23, // 69 :: rgb(155,139,24) + 0x6149, // 70 :: rgb(199,79,71) + 0x91CA, // 71 :: rgb(37,117,83) + 0x2DD7, // 72 :: rgb(89,113,189) + 0xC76C, // 73 :: rgb(142,221,101) + 0xFB33, // 74 :: rgb(247,207,159) + 0xBB13, // 75 :: rgb(112,199,159) }; \ No newline at end of file diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/gfx/tiles_gfx.h b/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/gfx/tiles_gfx.h index a03d932..841afc5 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/gfx/tiles_gfx.h +++ b/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/gfx/tiles_gfx.h @@ -1,142 +1,142 @@ -// convpng -// this file contains all the graphics sources for easy inclusion in a project -#ifndef __tiles_gfx__ -#define __tiles_gfx__ -#include - -#define tiles_gfx_transparent_color_index 0 - -extern uint8_t tileset_tile_0_compressed[]; -extern uint8_t tileset_tile_1_compressed[]; -extern uint8_t tileset_tile_2_compressed[]; -extern uint8_t tileset_tile_3_compressed[]; -extern uint8_t tileset_tile_4_compressed[]; -extern uint8_t tileset_tile_5_compressed[]; -extern uint8_t tileset_tile_6_compressed[]; -extern uint8_t tileset_tile_7_compressed[]; -extern uint8_t tileset_tile_8_compressed[]; -extern uint8_t tileset_tile_9_compressed[]; -extern uint8_t tileset_tile_10_compressed[]; -extern uint8_t tileset_tile_11_compressed[]; -extern uint8_t tileset_tile_12_compressed[]; -extern uint8_t tileset_tile_13_compressed[]; -extern uint8_t tileset_tile_14_compressed[]; -extern uint8_t tileset_tile_15_compressed[]; -extern uint8_t tileset_tile_16_compressed[]; -extern uint8_t tileset_tile_17_compressed[]; -extern uint8_t tileset_tile_18_compressed[]; -extern uint8_t tileset_tile_19_compressed[]; -extern uint8_t tileset_tile_20_compressed[]; -extern uint8_t tileset_tile_21_compressed[]; -extern uint8_t tileset_tile_22_compressed[]; -extern uint8_t tileset_tile_23_compressed[]; -extern uint8_t tileset_tile_24_compressed[]; -extern uint8_t tileset_tile_25_compressed[]; -extern uint8_t tileset_tile_26_compressed[]; -extern uint8_t tileset_tile_27_compressed[]; -extern uint8_t tileset_tile_28_compressed[]; -extern uint8_t tileset_tile_29_compressed[]; -extern uint8_t tileset_tile_30_compressed[]; -extern uint8_t tileset_tile_31_compressed[]; -extern uint8_t tileset_tile_32_compressed[]; -extern uint8_t tileset_tile_33_compressed[]; -extern uint8_t tileset_tile_34_compressed[]; -extern uint8_t tileset_tile_35_compressed[]; -extern uint8_t tileset_tile_36_compressed[]; -extern uint8_t tileset_tile_37_compressed[]; -extern uint8_t tileset_tile_38_compressed[]; -extern uint8_t tileset_tile_39_compressed[]; -extern uint8_t tileset_tile_40_compressed[]; -extern uint8_t tileset_tile_41_compressed[]; -extern uint8_t tileset_tile_42_compressed[]; -extern uint8_t tileset_tile_43_compressed[]; -extern uint8_t tileset_tile_44_compressed[]; -extern uint8_t tileset_tile_45_compressed[]; -extern uint8_t tileset_tile_46_compressed[]; -extern uint8_t tileset_tile_47_compressed[]; -extern uint8_t tileset_tile_48_compressed[]; -extern uint8_t tileset_tile_49_compressed[]; -extern uint8_t tileset_tile_50_compressed[]; -extern uint8_t tileset_tile_51_compressed[]; -extern uint8_t tileset_tile_52_compressed[]; -extern uint8_t tileset_tile_53_compressed[]; -extern uint8_t tileset_tile_54_compressed[]; -extern uint8_t tileset_tile_55_compressed[]; -extern uint8_t tileset_tile_56_compressed[]; -extern uint8_t tileset_tile_57_compressed[]; -extern uint8_t tileset_tile_58_compressed[]; -extern uint8_t tileset_tile_59_compressed[]; -extern uint8_t tileset_tile_60_compressed[]; -extern uint8_t tileset_tile_61_compressed[]; -extern uint8_t tileset_tile_62_compressed[]; -extern uint8_t tileset_tile_63_compressed[]; -extern uint8_t tileset_tile_64_compressed[]; -extern uint8_t tileset_tile_65_compressed[]; -extern uint8_t tileset_tile_66_compressed[]; -extern uint8_t tileset_tile_67_compressed[]; -extern uint8_t tileset_tile_68_compressed[]; -extern uint8_t tileset_tile_69_compressed[]; -extern uint8_t tileset_tile_70_compressed[]; -extern uint8_t tileset_tile_71_compressed[]; -extern uint8_t tileset_tile_72_compressed[]; -extern uint8_t tileset_tile_73_compressed[]; -extern uint8_t tileset_tile_74_compressed[]; -extern uint8_t tileset_tile_75_compressed[]; -extern uint8_t tileset_tile_76_compressed[]; -extern uint8_t tileset_tile_77_compressed[]; -extern uint8_t tileset_tile_78_compressed[]; -extern uint8_t tileset_tile_79_compressed[]; -extern uint8_t tileset_tile_80_compressed[]; -extern uint8_t tileset_tile_81_compressed[]; -extern uint8_t tileset_tile_82_compressed[]; -extern uint8_t tileset_tile_83_compressed[]; -extern uint8_t tileset_tile_84_compressed[]; -extern uint8_t tileset_tile_85_compressed[]; -extern uint8_t tileset_tile_86_compressed[]; -extern uint8_t tileset_tile_87_compressed[]; -extern uint8_t tileset_tile_88_compressed[]; -extern uint8_t tileset_tile_89_compressed[]; -extern uint8_t tileset_tile_90_compressed[]; -extern uint8_t tileset_tile_91_compressed[]; -extern uint8_t tileset_tile_92_compressed[]; -extern uint8_t tileset_tile_93_compressed[]; -extern uint8_t tileset_tile_94_compressed[]; -extern uint8_t tileset_tile_95_compressed[]; -extern uint8_t tileset_tile_96_compressed[]; -extern uint8_t tileset_tile_97_compressed[]; -extern uint8_t tileset_tile_98_compressed[]; -extern uint8_t tileset_tile_99_compressed[]; -extern uint8_t tileset_tile_100_compressed[]; -extern uint8_t tileset_tile_101_compressed[]; -extern uint8_t tileset_tile_102_compressed[]; -extern uint8_t tileset_tile_103_compressed[]; -extern uint8_t tileset_tile_104_compressed[]; -extern uint8_t tileset_tile_105_compressed[]; -extern uint8_t tileset_tile_106_compressed[]; -extern uint8_t tileset_tile_107_compressed[]; -extern uint8_t tileset_tile_108_compressed[]; -extern uint8_t tileset_tile_109_compressed[]; -extern uint8_t tileset_tile_110_compressed[]; -extern uint8_t tileset_tile_111_compressed[]; -extern uint8_t tileset_tile_112_compressed[]; -extern uint8_t tileset_tile_113_compressed[]; -extern uint8_t tileset_tile_114_compressed[]; -extern uint8_t tileset_tile_115_compressed[]; -extern uint8_t tileset_tile_116_compressed[]; -extern uint8_t tileset_tile_117_compressed[]; -extern uint8_t tileset_tile_118_compressed[]; -extern uint8_t tileset_tile_119_compressed[]; -extern uint8_t tileset_tile_120_compressed[]; -extern uint8_t tileset_tile_121_compressed[]; -extern uint8_t tileset_tile_122_compressed[]; -extern uint8_t tileset_tile_123_compressed[]; -extern uint8_t tileset_tile_124_compressed[]; -extern uint8_t tileset_tile_125_compressed[]; -extern uint8_t tileset_tile_126_compressed[]; -extern uint8_t tileset_tile_127_compressed[]; -#define tileset_tiles_num 128 -extern uint8_t *tileset_tiles_compressed[128]; -#define sizeof_tiles_gfx_pal 152 -extern uint16_t tiles_gfx_pal[76]; - -#endif +// convpng +// this file contains all the graphics sources for easy inclusion in a project +#ifndef __tiles_gfx__ +#define __tiles_gfx__ +#include + +#define tiles_gfx_transparent_color_index 0 + +extern uint8_t tileset_tile_0_compressed[]; +extern uint8_t tileset_tile_1_compressed[]; +extern uint8_t tileset_tile_2_compressed[]; +extern uint8_t tileset_tile_3_compressed[]; +extern uint8_t tileset_tile_4_compressed[]; +extern uint8_t tileset_tile_5_compressed[]; +extern uint8_t tileset_tile_6_compressed[]; +extern uint8_t tileset_tile_7_compressed[]; +extern uint8_t tileset_tile_8_compressed[]; +extern uint8_t tileset_tile_9_compressed[]; +extern uint8_t tileset_tile_10_compressed[]; +extern uint8_t tileset_tile_11_compressed[]; +extern uint8_t tileset_tile_12_compressed[]; +extern uint8_t tileset_tile_13_compressed[]; +extern uint8_t tileset_tile_14_compressed[]; +extern uint8_t tileset_tile_15_compressed[]; +extern uint8_t tileset_tile_16_compressed[]; +extern uint8_t tileset_tile_17_compressed[]; +extern uint8_t tileset_tile_18_compressed[]; +extern uint8_t tileset_tile_19_compressed[]; +extern uint8_t tileset_tile_20_compressed[]; +extern uint8_t tileset_tile_21_compressed[]; +extern uint8_t tileset_tile_22_compressed[]; +extern uint8_t tileset_tile_23_compressed[]; +extern uint8_t tileset_tile_24_compressed[]; +extern uint8_t tileset_tile_25_compressed[]; +extern uint8_t tileset_tile_26_compressed[]; +extern uint8_t tileset_tile_27_compressed[]; +extern uint8_t tileset_tile_28_compressed[]; +extern uint8_t tileset_tile_29_compressed[]; +extern uint8_t tileset_tile_30_compressed[]; +extern uint8_t tileset_tile_31_compressed[]; +extern uint8_t tileset_tile_32_compressed[]; +extern uint8_t tileset_tile_33_compressed[]; +extern uint8_t tileset_tile_34_compressed[]; +extern uint8_t tileset_tile_35_compressed[]; +extern uint8_t tileset_tile_36_compressed[]; +extern uint8_t tileset_tile_37_compressed[]; +extern uint8_t tileset_tile_38_compressed[]; +extern uint8_t tileset_tile_39_compressed[]; +extern uint8_t tileset_tile_40_compressed[]; +extern uint8_t tileset_tile_41_compressed[]; +extern uint8_t tileset_tile_42_compressed[]; +extern uint8_t tileset_tile_43_compressed[]; +extern uint8_t tileset_tile_44_compressed[]; +extern uint8_t tileset_tile_45_compressed[]; +extern uint8_t tileset_tile_46_compressed[]; +extern uint8_t tileset_tile_47_compressed[]; +extern uint8_t tileset_tile_48_compressed[]; +extern uint8_t tileset_tile_49_compressed[]; +extern uint8_t tileset_tile_50_compressed[]; +extern uint8_t tileset_tile_51_compressed[]; +extern uint8_t tileset_tile_52_compressed[]; +extern uint8_t tileset_tile_53_compressed[]; +extern uint8_t tileset_tile_54_compressed[]; +extern uint8_t tileset_tile_55_compressed[]; +extern uint8_t tileset_tile_56_compressed[]; +extern uint8_t tileset_tile_57_compressed[]; +extern uint8_t tileset_tile_58_compressed[]; +extern uint8_t tileset_tile_59_compressed[]; +extern uint8_t tileset_tile_60_compressed[]; +extern uint8_t tileset_tile_61_compressed[]; +extern uint8_t tileset_tile_62_compressed[]; +extern uint8_t tileset_tile_63_compressed[]; +extern uint8_t tileset_tile_64_compressed[]; +extern uint8_t tileset_tile_65_compressed[]; +extern uint8_t tileset_tile_66_compressed[]; +extern uint8_t tileset_tile_67_compressed[]; +extern uint8_t tileset_tile_68_compressed[]; +extern uint8_t tileset_tile_69_compressed[]; +extern uint8_t tileset_tile_70_compressed[]; +extern uint8_t tileset_tile_71_compressed[]; +extern uint8_t tileset_tile_72_compressed[]; +extern uint8_t tileset_tile_73_compressed[]; +extern uint8_t tileset_tile_74_compressed[]; +extern uint8_t tileset_tile_75_compressed[]; +extern uint8_t tileset_tile_76_compressed[]; +extern uint8_t tileset_tile_77_compressed[]; +extern uint8_t tileset_tile_78_compressed[]; +extern uint8_t tileset_tile_79_compressed[]; +extern uint8_t tileset_tile_80_compressed[]; +extern uint8_t tileset_tile_81_compressed[]; +extern uint8_t tileset_tile_82_compressed[]; +extern uint8_t tileset_tile_83_compressed[]; +extern uint8_t tileset_tile_84_compressed[]; +extern uint8_t tileset_tile_85_compressed[]; +extern uint8_t tileset_tile_86_compressed[]; +extern uint8_t tileset_tile_87_compressed[]; +extern uint8_t tileset_tile_88_compressed[]; +extern uint8_t tileset_tile_89_compressed[]; +extern uint8_t tileset_tile_90_compressed[]; +extern uint8_t tileset_tile_91_compressed[]; +extern uint8_t tileset_tile_92_compressed[]; +extern uint8_t tileset_tile_93_compressed[]; +extern uint8_t tileset_tile_94_compressed[]; +extern uint8_t tileset_tile_95_compressed[]; +extern uint8_t tileset_tile_96_compressed[]; +extern uint8_t tileset_tile_97_compressed[]; +extern uint8_t tileset_tile_98_compressed[]; +extern uint8_t tileset_tile_99_compressed[]; +extern uint8_t tileset_tile_100_compressed[]; +extern uint8_t tileset_tile_101_compressed[]; +extern uint8_t tileset_tile_102_compressed[]; +extern uint8_t tileset_tile_103_compressed[]; +extern uint8_t tileset_tile_104_compressed[]; +extern uint8_t tileset_tile_105_compressed[]; +extern uint8_t tileset_tile_106_compressed[]; +extern uint8_t tileset_tile_107_compressed[]; +extern uint8_t tileset_tile_108_compressed[]; +extern uint8_t tileset_tile_109_compressed[]; +extern uint8_t tileset_tile_110_compressed[]; +extern uint8_t tileset_tile_111_compressed[]; +extern uint8_t tileset_tile_112_compressed[]; +extern uint8_t tileset_tile_113_compressed[]; +extern uint8_t tileset_tile_114_compressed[]; +extern uint8_t tileset_tile_115_compressed[]; +extern uint8_t tileset_tile_116_compressed[]; +extern uint8_t tileset_tile_117_compressed[]; +extern uint8_t tileset_tile_118_compressed[]; +extern uint8_t tileset_tile_119_compressed[]; +extern uint8_t tileset_tile_120_compressed[]; +extern uint8_t tileset_tile_121_compressed[]; +extern uint8_t tileset_tile_122_compressed[]; +extern uint8_t tileset_tile_123_compressed[]; +extern uint8_t tileset_tile_124_compressed[]; +extern uint8_t tileset_tile_125_compressed[]; +extern uint8_t tileset_tile_126_compressed[]; +extern uint8_t tileset_tile_127_compressed[]; +#define tileset_tiles_num 128 +extern uint8_t *tileset_tiles_compressed[128]; +#define sizeof_tiles_gfx_pal 152 +extern uint16_t tiles_gfx_pal[76]; + +#endif diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/gfx/tileset.c b/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/gfx/tileset.c index fcb18d0..591b566 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/gfx/tileset.c +++ b/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/gfx/tileset.c @@ -1,726 +1,726 @@ -// convpng -#include -#include "tiles_gfx.h" - -uint8_t tileset_tile_0_compressed[19] = { - 0x10,0x21,0x10,0x4B,0x84,0x00,0x3D,0x75,0x0C,0xC6,0x02,0xF0,0x1D,0x03,0x18,0x30,0x00,0x00,0x08, -}; -uint8_t tileset_tile_1_compressed[32] = { - 0x10,0x21,0x10,0x4B,0x14,0x00,0x1F,0x75,0x0C,0xC6,0x02,0xF0,0x1D,0x03,0x48,0x00,0x3D,0x8E,0x0C,0xB8,0x02,0xDE,0x1D,0x03,0x05,0xB8,0x00,0x23,0xC8,0x08,0x00,0x04, -}; -uint8_t tileset_tile_2_compressed[30] = { - 0x10,0x20,0x10,0x4B,0xCD,0x00,0x1F,0x1D,0x0C,0x71,0x02,0xB7,0x1D,0x03,0x07,0xE8,0x00,0x3B,0xEB,0x0C,0x02,0x8D,0x1D,0x40,0x3B,0x83,0x64,0x00,0x00,0x80, -}; -uint8_t tileset_tile_3_compressed[20] = { - 0x10,0x20,0x10,0x4B,0x54,0x00,0x47,0x1F,0x5C,0x0C,0x02,0x6F,0x1D,0x03,0x01,0x0B,0x00,0x00,0x00,0x80, -}; -uint8_t tileset_tile_4_compressed[118] = { - 0x10,0x05,0x10,0x4B,0x03,0x04,0x04,0x78,0x02,0x03,0x00,0x01,0x01,0x04,0xCE,0x02,0x4B,0x1C,0x08,0x7B,0x11,0x13,0x3B,0x4B,0x1F,0x10,0x0E,0xBB,0x00,0x12,0xDD,0x0F, - 0x1F,0x04,0xCB,0x0F,0x14,0xD5,0x0F,0x20,0xCC,0x0A,0x32,0x05,0xBB,0x0E,0x08,0xBA,0x0F,0x05,0x5C,0x05,0x0E,0xDE,0x4B,0x05,0x4E,0x05,0x27,0x1C,0x1C,0x0E,0xB7,0x30, - 0x05,0x0F,0x3D,0x1E,0xA2,0x0C,0x01,0xF0,0x0F,0x8B,0x92,0x0F,0x79,0x10,0x79,0x1E,0x0F,0x7E,0x10,0x1D,0x0D,0xFE,0x0E,0x5F,0x60,0xD7,0x10,0x01,0x11,0x76,0x00,0x8F, - 0x18,0xB1,0x73,0x07,0x77,0x0E,0x0F,0x10,0x77,0x20,0x3E,0x35,0x0F,0x07,0x86,0x1F,0x57,0x01,0x00,0x00,0x00,0x80, -}; -uint8_t tileset_tile_5_compressed[119] = { - 0x10,0x0D,0x10,0x01,0x01,0x04,0x02,0x03,0xBF,0x00,0x04,0x00,0x03,0x02,0x5C,0x4B,0x0B,0xF9,0x0D,0x07,0x1C,0x4B,0x2D,0x0C,0xFB,0x00,0x07,0x0E,0x1F,0x0F,0x96,0x0A, - 0xF6,0x04,0x00,0x1F,0x0F,0x05,0x9E,0x2C,0xAB,0x03,0x1E,0x0F,0xAB,0x17,0x0B,0xBB,0x05,0x10,0x77,0x05,0x50,0x0C,0x37,0x46,0x10,0xDC,0x0F,0x2A,0xE6,0x10,0x1C,0x1C, - 0x0F,0x01,0x7C,0x05,0x33,0x11,0xFD,0x20,0x0F,0xC5,0x00,0xDA,0x0F,0x21,0x04,0x7E,0x0E,0x0F,0xD7,0x00,0x01,0x45,0x72,0x0E,0xD6,0x0F,0x1F,0xC4,0x12,0x61,0x0E,0x90, - 0x2F,0x1D,0x0D,0xE1,0x06,0xAD,0x61,0x8F,0x2C,0x1F,0x96,0x2F,0x0E,0x4B,0x96,0x2E,0xA8,0x01,0x98,0x2E,0x0F,0x00,0x01, -}; -uint8_t tileset_tile_6_compressed[65] = { - 0x10,0x20,0x10,0x00,0xF5,0x00,0x03,0x1C,0x0E,0x05,0x8D,0x0F,0x46,0x04,0x91,0x0F,0x03,0x01,0x6D,0x0F,0x04,0x00,0x05,0x13,0x0F,0x68,0x0C,0x01,0xB2,0x0F,0x01,0x01, - 0x36,0x0F,0xE7,0x1E,0x0F,0xEA,0x2C,0x1C,0xE7,0x0E,0x0F,0x5C,0x01,0x11,0xFF,0x0F,0x67,0x07,0x34,0x0E,0x52,0x2F,0x05,0x7B,0x2F,0x86,0x0E,0x1F,0xAE,0x01,0x00,0x00, - 0x01, -}; -uint8_t tileset_tile_7_compressed[65] = { - 0x10,0x20,0x10,0x00,0xB9,0x00,0x03,0x1C,0x0F,0x05,0x8E,0x10,0x23,0x05,0x04,0x88,0x0F,0x01,0x03,0xE7,0x0F,0x04,0x00,0x18,0x0F,0x01,0x68,0x05,0x33,0x04,0xBA,0x0F, - 0x00,0x8B,0x0F,0xB8,0x21,0xAB,0x0F,0x00,0xA9,0x13,0xE5,0x32,0x0E,0xE7,0x0D,0x32,0x97,0x1D,0x0D,0xD1,0x06,0x03,0x51,0x1F,0x95,0x2F,0x2E,0x53,0x01,0x04,0x98,0x00, - 0x02, -}; -uint8_t tileset_tile_8_compressed[68] = { - 0x10,0x1B,0x10,0x00,0x07,0x00,0x00,0x00,0xE7,0x06,0x07,0x76,0x19,0x00,0x0B,0x19,0x98,0x07,0x07,0x23,0x2D,0x23,0x18,0x0B,0x19,0x35,0x07,0xDA,0x0F,0x00,0x19,0x6B, - 0x07,0x28,0xF4,0x0A,0x00,0x19,0xD0,0x07,0x29,0xC5,0x2F,0x88,0x00,0x07,0x14,0x23,0xC4,0x00,0x07,0x3F,0x00,0xA4,0x42,0x14,0xCF,0x09,0xAE,0x07,0x0F,0xD3,0x00,0x19, - 0x40,0x07,0x00,0x20, -}; -uint8_t tileset_tile_9_compressed[53] = { - 0x10,0x29,0x10,0x07,0x00,0x00,0x53,0x00,0xAA,0x07,0x19,0x00,0xE2,0x0B,0x05,0x07,0x23,0x23,0x18,0xC5,0x0B,0xDC,0x07,0x00,0xF2,0x07,0xF3,0x12,0x00,0xC0,0x07,0xA7, - 0x2F,0x16,0x00,0x23,0x8E,0x00,0x43,0x07,0xCD,0x00,0x19,0x42,0x14,0x1F,0x07,0x73,0x00,0xC0,0x07,0x00,0x20, -}; -uint8_t tileset_tile_10_compressed[53] = { - 0x10,0x29,0x10,0x07,0x00,0x00,0x53,0x00,0xAA,0x07,0x19,0x00,0xE2,0x0B,0x05,0x07,0x23,0x23,0x18,0xC5,0x0B,0xDC,0x07,0x00,0xF2,0x07,0xF3,0x12,0x00,0xC0,0x07,0xA7, - 0x2F,0x16,0x00,0x23,0x8E,0x00,0x43,0x07,0xCD,0x00,0x19,0x42,0x14,0x1F,0x07,0x73,0x00,0xC0,0x07,0x00,0x20, -}; -uint8_t tileset_tile_11_compressed[67] = { - 0x10,0x29,0x10,0x07,0x00,0x00,0x53,0x00,0xAA,0x07,0x19,0x00,0xE6,0x0B,0x07,0x05,0x02,0x19,0x23,0x23,0x18,0xCD,0x0B,0x07,0x25,0x0F,0xCC,0x00,0x07,0x02,0x97,0x1A, - 0x00,0x9A,0x07,0x05,0x48,0x2F,0xA2,0x00,0x02,0x23,0x30,0x00,0x14,0x02,0x46,0x07,0xC7,0x00,0xFA,0x0F,0x3F,0x43,0x14,0xEE,0x08,0x07,0x7B,0x0F,0x00,0x97,0x07,0x4F, - 0x80,0x00,0x40, -}; -uint8_t tileset_tile_12_compressed[46] = { - 0x10,0x20,0x10,0x00,0x21,0x49,0x00,0x09,0x07,0xA6,0x00,0x0E,0x55,0x16,0x00,0xA7,0x04,0x09,0x0E,0x8B,0x0F,0xA4,0x08,0x12,0x53,0x0F,0x09,0x08,0x45,0x12,0x64,0x0F, - 0x06,0x09,0x12,0x57,0x0F,0x05,0x19,0x0F,0x71,0x3B,0x70,0x0F,0x00,0x08, -}; -uint8_t tileset_tile_13_compressed[47] = { - 0x10,0x22,0x10,0x00,0x57,0x00,0x07,0x00,0x14,0x0C,0x16,0x39,0x09,0x16,0x00,0xDC,0x0D,0x12,0x00,0x4E,0x0F,0x0D,0x09,0x8A,0x0F,0xB8,0x1C,0xAB,0x0F,0x0E,0x8A,0x0F, - 0x11,0x07,0x0F,0x09,0x7C,0x0F,0x0E,0x6A,0x0F,0x09,0x07,0xE8,0x0F,0x00,0x04, -}; -uint8_t tileset_tile_14_compressed[48] = { - 0x10,0x2D,0x10,0x07,0x00,0x00,0x12,0x00,0x16,0xC9,0x00,0x09,0x16,0xE7,0x12,0x0F,0x7C,0x12,0x00,0x11,0x6B,0x0F,0x09,0x11,0x8E,0x0F,0xB8,0x22,0xCB,0x0F,0x10,0x8C, - 0x0F,0x11,0x09,0x0F,0x07,0xDC,0x0F,0x10,0x72,0x0F,0x09,0x06,0xF8,0x0F,0x00,0x04, -}; -uint8_t tileset_tile_15_compressed[41] = { - 0x10,0x20,0x10,0x00,0x7E,0x00,0x4C,0x07,0x00,0x09,0x99,0x0F,0x16,0xAC,0x00,0x09,0x03,0x12,0x09,0x8E,0x0F,0xE3,0x10,0xB8,0x0F,0x10,0xF4,0x0F,0x09,0x77,0x0F,0x01, - 0x1D,0x0F,0xC7,0x02,0x70,0x0F,0x03,0x00,0x08, -}; -uint8_t tileset_tile_16_compressed[126] = { - 0x10,0x35,0x10,0x4B,0x00,0x1F,0xA6,0x03,0x04,0x08,0x98,0x04,0x04,0x3B,0xE6,0x10,0x0D,0x63,0x04,0x00,0x1F,0x1F,0x3B,0x0F,0x0A,0x1F,0x03,0x04,0x03,0x11,0x7F,0x1C, - 0x0A,0x0B,0x1E,0xA8,0x16,0x03,0x08,0x03,0x1F,0x9B,0x10,0x06,0xAF,0x0A,0x0E,0x24,0xBA,0x21,0x03,0xAF,0x2D,0x34,0x26,0xBF,0x1E,0x00,0x07,0xBE,0x44,0x11,0xBA,0x00, - 0x08,0x2D,0xAA,0x0D,0x2E,0xBA,0x3B,0x06,0xEF,0x10,0x6E,0x4D,0xFB,0x09,0x00,0x13,0xE4,0x0B,0x08,0xEF,0x4A,0x13,0x03,0x9A,0x1C,0x5B,0x00,0x50,0xB0,0xA9,0xB0,0x8A, - 0xA9,0x6B,0x25,0x42,0x21,0xEE,0x00,0x30,0xEF,0x74,0x2C,0x06,0x9A,0x07,0xE4,0x24,0x1C,0xAB,0x0E,0x07,0xBE,0x4F,0x11,0x6A,0x5A,0x1B,0xE0,0x0D,0x00,0x10, -}; -uint8_t tileset_tile_17_compressed[98] = { - 0x10,0x22,0x10,0x00,0x5C,0x00,0x20,0x00,0x60,0x0D,0x39,0x39,0x3E,0xE7,0x10,0x16,0xAF,0x0D,0x0E,0x00,0xDB,0x0A,0x20,0x04,0x39,0x11,0x96,0x1E,0xAF,0x0F,0x0E,0x00, - 0xAB,0x23,0x20,0xB5,0x19,0x3E,0xDD,0x05,0x0E,0xD4,0x10,0x39,0x92,0x06,0xC9,0x00,0x09,0x39,0x0E,0x3F,0x3F,0x69,0x05,0x00,0xEA,0x0B,0x02,0x7B,0x77,0x10,0xA8,0x01, - 0xA0,0x89,0xD1,0x02,0x45,0x5C,0x0F,0x00,0x77,0x0F,0x50,0xFC,0x2E,0x10,0x59,0x43,0x0E,0x33,0x0D,0x44,0x45,0xD5,0x10,0x1E,0xA2,0x10,0x20,0xAE,0x20,0x00,0x58,0x0E, - 0x00,0x04, -}; -uint8_t tileset_tile_18_compressed[105] = { - 0x10,0x21,0x10,0x00,0x45,0x00,0x04,0x45,0x00,0x84,0x0D,0x05,0x01,0x01,0x05,0x47,0x11,0x0D,0x2A,0x00,0x01,0x57,0x10,0x04,0x1A,0x19,0x10,0xD4,0x0F,0x10,0xB7,0x03, - 0x0F,0xCF,0x0E,0x2F,0xDA,0x41,0x10,0x01,0x2C,0x2F,0x01,0x1F,0x39,0x00,0x03,0x05,0xF2,0x2F,0x08,0x03,0x1C,0xD3,0x2F,0x01,0x56,0x00,0x0A,0x0F,0x03,0xF9,0x05,0x06, - 0xD7,0x03,0x03,0x0F,0x73,0x1F,0x52,0x04,0x0F,0x1F,0xA5,0x10,0x1F,0xBC,0x0E,0x4F,0x00,0x1C,0xEE,0x06,0x12,0xEE,0x05,0x0E,0xBF,0x10,0x00,0x0B,0x00,0xAE,0x06,0x2D, - 0x55,0x00,0x1F,0xCB,0x0B,0x1C,0x00,0x00,0x80, -}; -uint8_t tileset_tile_19_compressed[130] = { - 0x10,0x24,0x10,0x00,0x00,0x6D,0x2C,0x00,0x33,0x00,0x00,0x30,0x00,0x33,0x2C,0x36,0xCD,0x00,0x2C,0x19,0x12,0x2C,0x37,0x1C,0x0D,0x79,0x0F,0x03,0x28,0x33,0x3A,0x1D, - 0x28,0x4B,0x0E,0x0F,0xEB,0x26,0x08,0x01,0xEF,0x00,0x0F,0x30,0xEE,0x1E,0x07,0xFF,0x0F,0x00,0x38,0x25,0xEE,0x0F,0x09,0xE4,0x0C,0x03,0x27,0x29,0x35,0x0F,0xFC,0x37, - 0x0E,0x01,0x29,0x19,0xBE,0x0F,0x26,0xEB,0x03,0x0E,0x0F,0x2B,0x29,0x33,0x0B,0x02,0xAF,0x39,0x1A,0x02,0xFF,0x00,0x0F,0x10,0x00,0xFA,0x0E,0x27,0x09,0x95,0x0F,0x2C, - 0x69,0x11,0x29,0x89,0x0F,0x35,0x29,0xAA,0x09,0x05,0xD5,0x0E,0x00,0x10,0x2C,0x19,0x9F,0x0E,0x0F,0x10,0x77,0x11,0x28,0x2F,0x0E,0x00,0x7F,0x22,0x5C,0x0B,0x24,0x0D, - 0x00,0x02, -}; -uint8_t tileset_tile_20_compressed[134] = { - 0x10,0x30,0x10,0x4B,0x00,0x1F,0x03,0x05,0x05,0x1F,0x04,0x01,0x04,0x04,0x00,0xE3,0x04,0x0D,0x4B,0x1C,0x1C,0x0D,0xB7,0x0A,0x01,0x05,0xB5,0x01,0x1F,0x0D,0x1C,0x7A, - 0x1F,0x09,0x20,0x04,0xEB,0x16,0x0D,0x00,0xAB,0x0E,0x0B,0xFA,0x04,0x02,0x0F,0xFE,0x1A,0x02,0x12,0x65,0x23,0x1C,0xA4,0x3D,0x03,0x4C,0xAF,0x3D,0x0A,0x3F,0xFF,0x1C, - 0x15,0x1E,0x11,0xEC,0x0E,0x13,0x1F,0x1F,0xBE,0x47,0x02,0xEF,0x60,0x12,0x0F,0xFB,0x2C,0x37,0x5C,0x97,0x33,0x0E,0xF9,0x2F,0x00,0x6E,0x12,0x22,0xAE,0x4D,0x01,0x4E, - 0x0F,0x19,0xBF,0x6F,0x2E,0x01,0x0F,0xBB,0x12,0x48,0xBE,0x0F,0x31,0x7B,0x21,0x7F,0xFB,0x40,0x05,0x52,0x95,0x22,0x01,0x2F,0x7E,0x00,0x72,0x06,0xDD,0x0F,0x6A,0xDF, - 0x12,0x0E,0x01,0x00,0x00,0x80, -}; -uint8_t tileset_tile_21_compressed[133] = { - 0x10,0x03,0x10,0x05,0x04,0x05,0x01,0x05,0x04,0x61,0x01,0x06,0x05,0x03,0x1F,0x4B,0xDE,0x00,0x0D,0x0C,0x01,0xF1,0x05,0x04,0x1C,0x1C,0x4B,0xAE,0x11,0x05,0x0E,0xEB, - 0x0F,0x1F,0x07,0x3B,0x1C,0x1F,0x08,0x0D,0xAA,0x21,0x0F,0xF9,0x00,0x22,0x3D,0x0D,0x22,0x0C,0x01,0xFC,0x01,0x02,0x20,0xBF,0x3B,0x01,0x26,0xFF,0x0F,0x1B,0x0F,0x26, - 0x2D,0x0E,0xFC,0x3D,0x1F,0x3F,0xBF,0x1B,0x0E,0x0D,0x6E,0x1E,0x1F,0x0F,0xF9,0x00,0x08,0x56,0x54,0x03,0x0F,0x04,0x9E,0x61,0xBA,0x4F,0x10,0x2E,0xBB,0x39,0x10,0xBE, - 0x01,0x5F,0xEF,0x36,0x0C,0x02,0xFB,0x2E,0x01,0x7F,0x4C,0x39,0x1D,0x03,0xBB,0x0F,0x19,0x95,0x2E,0x03,0x72,0x6F,0xD7,0x0F,0x09,0x00,0x28,0x80,0x5C,0x45,0x92,0x2A, - 0x70,0x00,0x0F,0x00,0x08, -}; -uint8_t tileset_tile_22_compressed[126] = { - 0x10,0x28,0x10,0x4B,0x00,0x03,0x05,0x0F,0x05,0x04,0x01,0x04,0x04,0x00,0xE8,0x04,0x0E,0x1F,0x4B,0xED,0x0D,0x0A,0x01,0xF7,0x05,0x01,0x0F,0x5E,0x1F,0x09,0x20,0x04, - 0xBA,0x16,0x0D,0xEA,0x00,0x0E,0xFE,0x0B,0x04,0x02,0xBF,0x3D,0x1A,0x02,0x12,0x9B,0x23,0x0F,0xF9,0x3D,0x0D,0x2B,0x4C,0x3D,0x0A,0xBF,0x1F,0x15,0x1E,0xFB,0x11,0x0E, - 0x13,0xEF,0x0F,0x47,0x02,0xBB,0x60,0x12,0xAE,0x1F,0x0E,0xEE,0x38,0x12,0xFB,0x1F,0x5D,0x0E,0x92,0x12,0xEA,0x22,0x4D,0xE4,0x01,0x0F,0xEB,0x19,0x6F,0x2E,0xFB,0x01, - 0x0F,0x12,0xBB,0x48,0x0F,0xE7,0x31,0x21,0xBB,0x7F,0x6F,0xB9,0x52,0x52,0x22,0x01,0xF7,0x7E,0x00,0x06,0x2D,0x0F,0xDD,0x6A,0x12,0xF0,0x0E,0x01,0x00,0x08, -}; -uint8_t tileset_tile_23_compressed[122] = { - 0x10,0x03,0x10,0x05,0x04,0x05,0x01,0x05,0x04,0x62,0x01,0x06,0x05,0x03,0x4B,0xAF,0x00,0x0D,0x0C,0x7D,0x01,0x05,0x04,0xF7,0x0E,0x0F,0x0E,0x76,0x0F,0x1F,0x3D,0xFB, - 0x0F,0x08,0x0D,0xAA,0x21,0x0F,0xF9,0x00,0x0F,0x3D,0x0D,0x22,0x0C,0x01,0xFC,0x01,0x02,0x0F,0xBF,0x3B,0x01,0x26,0xDF,0x0F,0x41,0x26,0x2F,0x0E,0x20,0xDC,0x29,0x1F, - 0xB5,0x1B,0x71,0x5C,0x72,0x00,0x97,0x5F,0x0C,0x2D,0x54,0xF3,0x1F,0x0C,0xD7,0x61,0x4F,0x10,0x57,0x2E,0x39,0x77,0x10,0x01,0xDD,0x0F,0x36,0xFF,0x0C,0x02,0x2E,0x01, - 0x73,0x7F,0xFD,0x1D,0x2D,0x02,0xCD,0x7F,0x10,0xCE,0x0D,0x8F,0x17,0x79,0xCA,0x00,0x80,0x12,0x5C,0x2E,0x2A,0x9C,0x00,0x0F,0x00,0x02, -}; -uint8_t tileset_tile_24_compressed[29] = { - 0x10,0x05,0x10,0x07,0x18,0x18,0x14,0xA6,0x00,0x19,0x07,0x54,0x07,0x00,0x65,0x07,0x5A,0x17,0x0B,0x19,0x68,0x07,0xF8,0x2F,0x0B,0xF8,0x3F,0x00,0x04, -}; -uint8_t tileset_tile_25_compressed[27] = { - 0x10,0x05,0x10,0x19,0x18,0x18,0x14,0xCE,0x00,0x07,0x07,0xA8,0x00,0xBB,0x07,0x17,0xB9,0x0B,0xE3,0x07,0xE0,0x2F,0x2F,0xE0,0x3F,0x00,0x10, -}; -uint8_t tileset_tile_26_compressed[27] = { - 0x10,0x05,0x10,0x19,0x18,0x18,0x14,0xCE,0x00,0x07,0x07,0xA8,0x00,0xBB,0x07,0x17,0xB9,0x0B,0xE3,0x07,0xE0,0x2F,0x2F,0xE0,0x3F,0x00,0x10, -}; -uint8_t tileset_tile_27_compressed[33] = { - 0x10,0x05,0x10,0x19,0x18,0x18,0x14,0xCA,0x00,0x07,0x19,0x2A,0x02,0x07,0x00,0xE5,0x0F,0x07,0xEE,0x0F,0x17,0xE6,0x0B,0x07,0x47,0x02,0xC0,0x2F,0x5F,0xC0,0x3F,0x00, - 0x20, -}; -uint8_t tileset_tile_28_compressed[51] = { - 0x10,0x1A,0x10,0x02,0x12,0x00,0x09,0x9A,0x03,0x16,0x00,0x09,0xE0,0x03,0x76,0x0F,0x26,0x0F,0x09,0x00,0x95,0x0F,0x0F,0x1A,0x0F,0x0F,0x87,0x04,0x0F,0x0F,0x07,0x07, - 0x5F,0x0F,0x0B,0x71,0x10,0x15,0x0F,0x0E,0x71,0x10,0x09,0x0F,0x09,0xA6,0x10,0x00,0x80,0x00,0x40, -}; -uint8_t tileset_tile_29_compressed[76] = { - 0x10,0x03,0x10,0x09,0x0F,0x0F,0x09,0x12,0x00,0xB5,0x03,0x07,0xCF,0x00,0x0F,0x77,0x0A,0x00,0x2C,0x0F,0xF3,0x0C,0x44,0x0F,0xDC,0x0D,0x0F,0x55,0x1C,0xC6,0x0F,0xA3, - 0x0E,0x09,0x78,0x0D,0x0E,0xE8,0x00,0xD8,0x1D,0xF2,0x37,0x0A,0x0B,0x2F,0x0E,0x0D,0xE2,0x00,0xB8,0x0E,0x0C,0xCA,0x0F,0x1D,0x45,0x0A,0xD9,0x2D,0x0E,0x12,0x0B,0x17, - 0x1E,0xF1,0x0E,0x03,0x0E,0x76,0x0F,0x00,0xE0,0x41,0x00,0x10, -}; -uint8_t tileset_tile_30_compressed[79] = { - 0x10,0x2D,0x10,0x07,0x00,0x12,0xAC,0x00,0x09,0x03,0x0F,0x0F,0x49,0x09,0x00,0x51,0x12,0x92,0x0F,0x46,0x12,0xD4,0x0F,0x11,0x75,0x0F,0x46,0x22,0xDF,0x0F,0x10,0x04, - 0x1B,0x11,0xC7,0x01,0x47,0x00,0x09,0x20,0x09,0x0B,0x0A,0x62,0x27,0x34,0x0F,0x00,0x0A,0x5A,0x10,0x0B,0xE3,0x00,0x17,0x21,0x0A,0x21,0x3E,0x0F,0x1F,0x12,0xE2,0x10, - 0xFE,0x20,0x0B,0x10,0x2E,0x20,0xD6,0x3D,0x0F,0xA7,0x13,0x40,0x7F,0x00,0x20, -}; -uint8_t tileset_tile_31_compressed[51] = { - 0x10,0x35,0x10,0x16,0x00,0x09,0xBB,0x03,0x12,0x00,0x03,0x40,0x02,0xDE,0x0F,0x09,0x99,0x00,0x0F,0x1E,0x0F,0x0F,0x8F,0x0F,0x43,0x0F,0xC2,0x0F,0x07,0x07,0x0F,0x2E, - 0x0F,0xB8,0x0E,0x00,0x99,0x0F,0x32,0x0E,0x00,0x02,0x07,0x7B,0x00,0x0D,0xD0,0x42,0x02,0x00,0x08, -}; -uint8_t tileset_tile_32_compressed[59] = { - 0x10,0x21,0x10,0x4B,0x62,0x00,0x0E,0x0E,0x26,0x05,0xE7,0x07,0x00,0x8D,0x0D,0xE7,0x00,0x0E,0x8F,0x0F,0x25,0x15,0x15,0x05,0x94,0x0E,0x15,0x08,0xFF,0x00,0x0B,0x00, - 0x05,0x97,0x1D,0x07,0x9E,0x00,0x78,0x1E,0xC8,0x0F,0xAE,0x10,0x3F,0x12,0x0F,0xE1,0x0E,0xDE,0x0F,0x10,0x19,0x4F,0x8E,0x6F,0x80,0x00,0x40, -}; -uint8_t tileset_tile_33_compressed[42] = { - 0x10,0x23,0x10,0x4B,0x89,0x00,0x0E,0x0E,0x67,0x05,0x07,0x82,0xF5,0x00,0x15,0x5D,0x02,0x03,0xDA,0x04,0x06,0x08,0xAE,0x02,0x03,0xEE,0x04,0x06,0x0C,0x90,0x00,0x15, - 0x42,0x1D,0x3A,0x87,0x61,0x41,0xA8,0x1E,0x00,0x04, -}; -uint8_t tileset_tile_34_compressed[52] = { - 0x10,0x23,0x10,0x4B,0x89,0x00,0x0E,0x0E,0xE7,0x05,0x0F,0x9E,0x00,0x3E,0x0F,0x78,0x29,0xD6,0x10,0x15,0x05,0x15,0xB9,0x03,0xDA,0x0F,0x08,0x0D,0x08,0x59,0x03,0x79, - 0x10,0x08,0xE5,0x00,0x21,0x89,0x0F,0x43,0x15,0xB3,0x0F,0xC1,0x3F,0xBC,0x0F,0x2D,0x5F,0x00,0x00,0x80, -}; -uint8_t tileset_tile_35_compressed[96] = { - 0x10,0x2D,0x10,0x00,0x00,0x20,0x25,0x00,0xCA,0x09,0x0D,0x26,0x34,0x2B,0x2B,0x02,0x26,0xD6,0x11,0x0D,0x2B,0x9E,0x10,0x7B,0x0E,0x10,0xED,0x00,0x10,0x20,0x3D,0x0E, - 0x73,0x1F,0x01,0xCE,0x1E,0x1F,0x27,0xD3,0x0F,0x26,0x4F,0x1D,0x0F,0x72,0x0B,0xF2,0x10,0x0B,0xDC,0x1F,0x0B,0xB5,0x0E,0x0F,0xCF,0x05,0x00,0x2D,0x1F,0xAE,0x0F,0x20, - 0x02,0xEE,0x1E,0x0F,0xF9,0x09,0x01,0x8B,0x0E,0x27,0x00,0x11,0xB9,0x0B,0xBE,0x0E,0x0F,0x10,0x6E,0x00,0x09,0xF8,0x0F,0x10,0xA9,0x00,0x42,0xE0,0x2E,0x0D,0x00,0x01, -}; -uint8_t tileset_tile_36_compressed[97] = { - 0x10,0x05,0x10,0x1F,0x03,0x04,0x04,0x78,0x02,0x03,0x00,0x01,0x01,0x04,0xCE,0x02,0x4B,0x4B,0x08,0x7B,0x11,0x13,0xFB,0x0F,0x10,0x0E,0xBB,0x00,0x12,0xBB,0x0F,0x21, - 0x4D,0x04,0x14,0x4B,0x0F,0x1C,0x0A,0x9E,0x03,0xEE,0x0E,0x28,0xEE,0x0B,0x27,0xE6,0x0E,0x4B,0xBB,0x05,0x0F,0x9B,0x0E,0x00,0x47,0x37,0x88,0x0F,0x3C,0x3C,0x03,0xE4, - 0x0F,0x3C,0xF3,0x3F,0x91,0x10,0x4B,0x1F,0x84,0x10,0x37,0x4B,0xD3,0x10,0xAE,0x11,0x4B,0x10,0x2B,0x11,0x0E,0x96,0x11,0xE6,0x12,0xAF,0x09,0x27,0x11,0x12,0x80,0x00, - 0x40, -}; -uint8_t tileset_tile_37_compressed[97] = { - 0x10,0x0D,0x10,0x01,0x01,0x04,0x02,0x03,0xBF,0x00,0x04,0x00,0x03,0x02,0x5C,0x4B,0x0B,0x46,0x0D,0x0E,0x4B,0x96,0x0C,0xF3,0x00,0x07,0x03,0x1F,0x0F,0x9A,0x0A,0xED, - 0x04,0x1E,0x4B,0x73,0x0C,0xA5,0x03,0x1C,0x0F,0xB9,0x39,0x2E,0x05,0x10,0xD3,0x26,0x04,0xF6,0x53,0x10,0x0F,0x37,0x92,0x0E,0x61,0x20,0x03,0x3C,0x3C,0x18,0x0F,0x3C, - 0x8F,0x0F,0x8B,0x0E,0xA4,0x0F,0x37,0x66,0x0E,0x90,0x11,0x56,0x0D,0x0E,0x4B,0x8A,0x0D,0xB9,0x0E,0x42,0xAF,0xEE,0x0C,0x0D,0x6B,0x0F,0x0C,0x97,0x0D,0x00,0x80,0x00, - 0x40, -}; -uint8_t tileset_tile_38_compressed[110] = { - 0x10,0x05,0x10,0x1F,0x03,0x04,0x04,0x78,0x02,0x03,0x00,0x01,0x01,0x04,0xCE,0x02,0x4B,0x4B,0x08,0x7B,0x11,0x13,0xFB,0x0F,0x10,0x0E,0xBB,0x00,0x12,0xBB,0x0F,0x21, - 0x95,0x23,0x04,0x6B,0x0F,0x1C,0x0A,0x99,0x32,0x05,0x77,0x0E,0x08,0x75,0x0F,0x05,0xF3,0x0F,0x0E,0xFD,0x4B,0x05,0x4E,0xCD,0x0F,0x0E,0x68,0x30,0x05,0x9B,0x0F,0x0C, - 0x45,0x01,0xE1,0x0F,0x8B,0x11,0x0F,0x72,0x10,0xCD,0x1E,0x5F,0xD5,0x00,0x1C,0xF2,0x0E,0x0F,0xAE,0x10,0x01,0x11,0x6D,0x0F,0x10,0x03,0xCD,0x07,0x0E,0x4A,0x0F,0x1F, - 0x11,0x92,0x1D,0x7C,0x2F,0xC0,0x2B,0x09,0x4E,0xEE,0x01,0x00,0x00,0x01, -}; -uint8_t tileset_tile_39_compressed[115] = { - 0x10,0x0D,0x10,0x01,0x01,0x04,0x02,0x03,0xBF,0x00,0x04,0x00,0x03,0x02,0x5C,0x4B,0x0B,0x46,0x0D,0x0E,0x4B,0x96,0x0C,0xF2,0x00,0x07,0x03,0x1F,0xA5,0x0F,0x0A,0xBB, - 0x04,0x1E,0x27,0x4B,0x05,0x2C,0xA5,0x03,0x1C,0xD5,0x0F,0x17,0xDD,0x0B,0x05,0xBB,0x10,0x05,0x50,0x0C,0x9B,0x46,0x10,0xEE,0x0F,0x2A,0x7B,0x10,0x0F,0x34,0x01,0x05, - 0x33,0x04,0x5D,0x0F,0x45,0x00,0xDA,0x0F,0x21,0x04,0x26,0x3F,0xEA,0x00,0x13,0x64,0x0E,0x4B,0xBD,0x0E,0x0A,0x98,0x10,0x1C,0x1F,0xA0,0x4B,0x1D,0xD7,0x40,0x21,0x1D, - 0xCD,0x0F,0x1F,0x22,0x75,0x4B,0xE5,0x00,0x2E,0xAA,0x01,0xF5,0x06,0x3B,0x0E,0x1F,0x80,0x00,0x40, -}; -uint8_t tileset_tile_40_compressed[55] = { - 0x10,0x1A,0x10,0x07,0x18,0x00,0x14,0x93,0x00,0x19,0x3B,0x07,0x07,0x00,0x12,0x45,0x18,0xD2,0x07,0x00,0x02,0x7B,0x07,0x00,0x8B,0x07,0x23,0x00,0x02,0x5A,0x00,0x00, - 0x10,0x07,0x2E,0x00,0x08,0x83,0x0F,0x30,0x2A,0x15,0x2A,0x87,0x02,0x30,0x15,0x90,0x00,0x21,0x38,0x40,0x0F,0x00,0x20, -}; -uint8_t tileset_tile_41_compressed[55] = { - 0x10,0x1A,0x10,0x19,0x18,0x00,0x14,0xA7,0x00,0x07,0x57,0x07,0x00,0x09,0xC5,0x00,0xD2,0x07,0x00,0x02,0x7B,0x07,0x00,0x8F,0x07,0x8B,0x00,0x41,0x07,0x71,0x00,0x10, - 0x15,0x1B,0x00,0x05,0xF0,0x0F,0x80,0x80,0x23,0x10,0x34,0x00,0x0F,0x32,0x65,0x00,0xC4,0x0F,0xD4,0x7C,0x0F,0x00,0x02, -}; -uint8_t tileset_tile_42_compressed[65] = { - 0x10,0x1A,0x10,0x19,0x18,0x00,0x14,0xA7,0x00,0x07,0x57,0x07,0x00,0x09,0xC5,0x00,0xD2,0x07,0x00,0x02,0x7B,0x07,0x00,0x8F,0x07,0x8B,0x00,0x41,0x07,0x72,0x00,0x15, - 0x38,0x00,0x4A,0x24,0x8E,0x00,0x8D,0x5E,0xA5,0x0F,0x2E,0xA6,0x00,0x02,0x06,0x82,0x35,0x0F,0x34,0x76,0x01,0x0F,0x05,0x34,0xB9,0x0F,0x66,0x08,0x16,0x40,0x24,0x00, - 0x20, -}; -uint8_t tileset_tile_43_compressed[56] = { - 0x10,0x1A,0x10,0x19,0x18,0x00,0x14,0xA5,0x00,0x07,0x15,0x19,0x02,0x07,0x00,0xF2,0x09,0x00,0xAE,0x07,0x14,0x0F,0xE2,0x00,0x2E,0x07,0x00,0x3E,0x07,0x28,0x00,0x10, - 0x07,0x8B,0x00,0xE0,0x0E,0x84,0x0F,0x30,0x15,0xA0,0x00,0x21,0x07,0x10,0x2A,0x10,0x15,0x2A,0x10,0x39,0x40,0x0F,0x00,0x20, -}; -uint8_t tileset_tile_44_compressed[79] = { - 0x10,0x05,0x10,0x02,0x07,0x09,0x0F,0xA6,0x00,0x07,0x00,0x4C,0x02,0x10,0x09,0x99,0x00,0x02,0x71,0x21,0x6B,0x0F,0x17,0x10,0x8A,0x0F,0x4B,0x0B,0x10,0x10,0x0F,0x1B, - 0x96,0x10,0x26,0x3F,0x59,0x10,0xF9,0x00,0x3F,0x67,0x10,0x00,0xD7,0x0F,0x1B,0x10,0x14,0x1F,0x1B,0x8C,0x10,0xBA,0x0F,0x10,0x4F,0x17,0x00,0x26,0x0F,0x10,0x17,0x4D, - 0x0A,0x00,0x2F,0x0F,0x10,0x3C,0x00,0xD1,0x0F,0xF0,0x1F,0xC4,0x0F,0x00,0x02, -}; -uint8_t tileset_tile_45_compressed[62] = { - 0x10,0x25,0x10,0x07,0x00,0x48,0x09,0x00,0x0A,0xE5,0x00,0x08,0x4A,0x07,0x0B,0x12,0x8A,0x0F,0x99,0x10,0x09,0x17,0x20,0x71,0x0D,0x9C,0x20,0x00,0x7C,0x10,0xD2,0x5F, - 0xB4,0x62,0x0F,0x0F,0x02,0x72,0x00,0x07,0x1E,0x00,0x47,0x17,0x23,0x00,0x0A,0x91,0x00,0x10,0xC4,0x00,0x02,0x1A,0x62,0x00,0x02,0x1F,0x0F,0x80,0x00,0x40, -}; -uint8_t tileset_tile_46_compressed[74] = { - 0x10,0x34,0x10,0x0A,0x00,0x09,0x89,0x00,0x07,0x72,0x00,0x0E,0x12,0x09,0xF9,0x13,0x0F,0x67,0x16,0x0E,0x9E,0x0F,0xA2,0x11,0xEE,0x1E,0x0D,0x33,0x1E,0x0C,0x8F,0x2D, - 0x44,0x0F,0xD2,0x5C,0x00,0x02,0x39,0x00,0x07,0x0F,0x23,0x00,0x17,0x91,0x00,0x0A,0xC9,0x00,0x10,0x82,0x00,0x02,0x0B,0x0B,0x1B,0xE7,0x00,0x17,0x4D,0x02,0x17,0x3A, - 0x0F,0x1B,0x68,0x4F,0x89,0x0F,0xA0,0x00,0x00,0x10, -}; -uint8_t tileset_tile_47_compressed[93] = { - 0x10,0x26,0x10,0x07,0x00,0x58,0x0F,0x00,0x09,0x07,0x02,0x4D,0x09,0x00,0x34,0x0E,0x5D,0x0F,0x22,0x0E,0x10,0xAD,0x0F,0x0E,0x17,0x13,0x0F,0x22,0x0E,0x0B,0x22,0x0F, - 0x52,0x0E,0x1B,0x02,0x79,0x5F,0x79,0x0E,0x3F,0xE5,0x00,0x0E,0x44,0x17,0xDB,0x1F,0x0E,0x1B,0x0F,0x8C,0x0E,0xA4,0x0F,0x17,0xF7,0x00,0x0E,0x49,0x0F,0x0A,0x97,0x00, - 0x17,0x0E,0x56,0x0F,0x05,0x1B,0x77,0x0B,0x77,0x0E,0x69,0x0F,0x10,0x79,0x00,0x37,0xA6,0x0F,0x4E,0x4E,0x1B,0x0F,0x1B,0x9A,0x00,0x78,0x0F,0x00,0x04, -}; -uint8_t tileset_tile_48_compressed[47] = { - 0x10,0x14,0x10,0x4B,0x0E,0x00,0x15,0x44,0x08,0x42,0x00,0x11,0x0F,0x28,0x10,0x15,0xE8,0x0F,0xD9,0x1F,0x11,0x12,0x3A,0xF1,0x1F,0xA8,0x4F,0x3A,0xF8,0x5F,0x5A,0x0F, - 0x3E,0x5F,0x3F,0x0F,0x0E,0x87,0x78,0x0F,0x10,0x66,0x4F,0x3A,0x6F,0x00,0x01, -}; -uint8_t tileset_tile_49_compressed[20] = { - 0x10,0x20,0x10,0x08,0xA5,0x00,0x15,0x04,0x28,0x1D,0x3A,0x76,0x41,0x1E,0x1E,0x81,0xCE,0x77,0x00,0x01, -}; -uint8_t tileset_tile_50_compressed[45] = { - 0x10,0x22,0x10,0x08,0x0A,0x00,0x15,0x0E,0x00,0x46,0x4B,0xC7,0x0E,0x91,0x0F,0x4B,0x4B,0xB0,0x2F,0xD4,0x0F,0x7C,0x2F,0x7F,0x4F,0x10,0x04,0xE8,0x0F,0x15,0x67,0x4F, - 0x0F,0x95,0x1D,0x3A,0x0C,0xCD,0x1F,0x1E,0x0B,0xC0,0x5F,0x00,0x20, -}; -uint8_t tileset_tile_51_compressed[96] = { - 0x10,0x20,0x10,0x00,0x91,0x00,0x20,0xC6,0x00,0x9C,0x0D,0x2B,0x2B,0x03,0x66,0x0E,0x00,0x26,0x98,0x10,0x20,0x26,0xEF,0x1B,0x0E,0x0F,0x4D,0x27,0x1E,0x55,0x0C,0x01, - 0xAF,0x0E,0x26,0x10,0x1E,0xEC,0x07,0x3D,0x27,0x27,0xEF,0x03,0x0F,0x06,0xEF,0x01,0x1E,0x2E,0x97,0x31,0x1D,0xEF,0x1C,0x10,0x07,0xFB,0x00,0x23,0x1F,0xBA,0x4F,0x1A, - 0xA9,0x38,0x2A,0x1F,0x6E,0xBB,0x03,0x1C,0x08,0x97,0x0F,0x26,0xE3,0x0E,0x2E,0x50,0x1A,0xAE,0x05,0x3E,0xD7,0x10,0x27,0x10,0x3C,0x0D,0xF3,0x12,0x40,0x0D,0x00,0x20, -}; -uint8_t tileset_tile_52_compressed[96] = { - 0x10,0x25,0x10,0x00,0x00,0x39,0x29,0x29,0x03,0xEC,0x0A,0x00,0x36,0x36,0xBB,0x05,0x14,0x7A,0x33,0x0A,0x00,0x2C,0x4A,0x02,0x14,0x9B,0x0F,0x0D,0xE7,0x0E,0x0F,0x45, - 0x2C,0x48,0x00,0x0F,0x28,0x88,0x00,0x94,0x0F,0x33,0x28,0x5D,0x33,0x0C,0x4D,0x06,0x0F,0x76,0x09,0x15,0x33,0x85,0x7E,0x2F,0x06,0x02,0xF8,0x04,0x03,0x4F,0x1F,0x9F, - 0x08,0xA9,0x00,0x40,0xB1,0x35,0x35,0xFD,0x24,0x1A,0x05,0x00,0x3E,0x0E,0x0F,0x36,0xBE,0x0F,0x10,0x77,0x0F,0x35,0x2A,0xC5,0x03,0xA7,0x20,0x35,0x0E,0x80,0x00,0x40, -}; -uint8_t tileset_tile_53_compressed[72] = { - 0x10,0x20,0x10,0x00,0x44,0x00,0x54,0x37,0x00,0x5A,0x0E,0x09,0x91,0x00,0x37,0x41,0x0E,0x1B,0x09,0x41,0x41,0x11,0x10,0xFC,0x0E,0x0B,0x0E,0x4F,0x10,0x0F,0xF1,0x0B, - 0x3E,0x2C,0x0F,0x42,0x0B,0x37,0x1B,0x52,0x35,0x04,0x42,0x66,0x0F,0x43,0x1D,0x35,0xCE,0x0F,0x37,0x43,0x0F,0x76,0x10,0x1B,0x0D,0x1B,0x9E,0x0E,0x58,0x10,0xBA,0x0E, - 0x10,0xA8,0x00,0x25,0xB9,0x08,0x00,0x04, -}; -uint8_t tileset_tile_54_compressed[45] = { - 0x10,0x20,0x10,0x00,0x28,0x84,0x00,0x04,0x04,0x01,0x93,0x02,0x9A,0x0D,0x05,0x05,0x0D,0x01,0xEF,0x05,0x11,0x07,0x57,0x01,0x01,0x00,0x7F,0x06,0x11,0x0E,0xC5,0x04, - 0x5C,0x00,0x25,0x57,0x10,0x0A,0xC6,0x21,0xA0,0x0F,0x04,0x00,0x10, -}; -uint8_t tileset_tile_55_compressed[89] = { - 0x10,0x02,0x10,0x00,0x38,0x43,0x38,0x00,0x6B,0x00,0x0A,0x23,0x38,0x40,0x04,0x00,0x38,0x38,0x2F,0x65,0x00,0x0F,0x0F,0x44,0x44,0x48,0x07,0x05,0x96,0x03,0xE4,0x0F, - 0x01,0xFE,0x00,0x15,0x06,0xE4,0x0F,0x1D,0xBB,0x0C,0x05,0x84,0x8E,0x3F,0x46,0x09,0x00,0x4D,0x03,0x04,0x46,0x0A,0x2B,0x1F,0x2F,0x17,0x1E,0xAE,0x07,0x20,0x12,0x1F, - 0x8E,0x00,0x5C,0x10,0x03,0xD2,0x00,0x61,0x0A,0xC4,0x13,0x0F,0xC7,0x0A,0x87,0xDF,0x04,0xA7,0x15,0x10,0x0F,0xB8,0x0A,0x00,0x04, -}; -uint8_t tileset_tile_56_compressed[48] = { - 0x10,0x00,0x10,0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x0A,0x10,0x07,0x30,0x15,0x00,0x20,0x21,0x07,0x20,0xE9,0x0F,0x08,0x07,0x16,0x0F,0x21,0xF7,0x00,0x0F,0x2A,0x04, - 0xC5,0x00,0x20,0x0F,0x15,0xDC,0x0F,0x10,0x02,0xB9,0x00,0x78,0x05,0x06,0x00,0x04, -}; -uint8_t tileset_tile_57_compressed[59] = { - 0x10,0x02,0x10,0x02,0x32,0x32,0x07,0x34,0x66,0x00,0x07,0x0B,0x02,0xB4,0x0F,0x2E,0xD0,0x00,0x4F,0x0F,0x3C,0x00,0xD1,0x0F,0x7E,0x00,0x0F,0x15,0x24,0x44,0x32,0xE4, - 0x01,0x0E,0x30,0x15,0x5E,0x10,0x0F,0x15,0xA8,0x0F,0x99,0x00,0x23,0x2F,0x38,0x0F,0x03,0x3D,0x0F,0x8E,0x00,0x47,0x10,0x40,0x00,0x00,0x20, -}; -uint8_t tileset_tile_58_compressed[53] = { - 0x10,0x05,0x10,0x24,0x02,0x2E,0x34,0x16,0x01,0x02,0x02,0x05,0x34,0x38,0x02,0x24,0x0F,0xCF,0x00,0x0F,0x18,0xB4,0x00,0x02,0xD0,0x06,0x45,0x0F,0x1A,0x3F,0x15,0x46, - 0x24,0x23,0x00,0x15,0xD1,0x00,0x2A,0xC8,0x00,0x21,0x13,0x91,0x00,0x02,0xC8,0x00,0x10,0xE8,0x00,0x00,0x04, -}; -uint8_t tileset_tile_59_compressed[46] = { - 0x10,0x0A,0x10,0x07,0x30,0x15,0x00,0x00,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x81,0xF5,0x0F,0x07,0x17,0x0F,0x52,0x05,0x17,0x0F,0x2A,0x21,0x00,0xDD,0x0F,0x04, - 0xA0,0x0F,0x15,0xF7,0x0F,0x73,0x92,0x00,0x5A,0x06,0x0E,0x80,0x00,0x40, -}; -uint8_t tileset_tile_60_compressed[72] = { - 0x10,0x0B,0x10,0x02,0x17,0x1B,0x00,0x26,0x17,0x0A,0x00,0x82,0x02,0x0F,0x0B,0x17,0x3B,0x0F,0x10,0x8E,0x0F,0xE2,0x10,0xD7,0x0F,0x0A,0x10,0x17,0x0F,0x24,0x10,0x42, - 0x0F,0x10,0x64,0x10,0x02,0xC9,0x00,0x10,0x62,0x10,0x12,0x1F,0x00,0xC4,0x10,0xCB,0x0F,0x10,0x15,0x0F,0x7C,0x10,0x0F,0xE9,0x00,0x00,0x63,0x10,0x2E,0x0F,0x10,0x74, - 0x00,0x00,0xD3,0x10,0xC0,0x00,0x00,0x20, -}; -uint8_t tileset_tile_61_compressed[33] = { - 0x10,0x11,0x10,0x02,0x1A,0x88,0x00,0x02,0x1C,0x11,0x0F,0x17,0x90,0x00,0x8A,0x0F,0x0A,0x32,0x00,0x11,0x0F,0x46,0x0B,0x21,0x00,0x02,0xF4,0x00,0x10,0x74,0x00,0x00, - 0x02, -}; -uint8_t tileset_tile_62_compressed[58] = { - 0x10,0x26,0x10,0x0A,0x00,0x18,0x1B,0x16,0x0F,0x00,0x16,0x1B,0x1B,0x88,0x0F,0xEE,0x0D,0x02,0x18,0x0F,0x29,0x0B,0x09,0x00,0x0B,0xC5,0x05,0x71,0x0F,0x0D,0x73,0x0F, - 0x44,0x00,0xFC,0x0F,0x20,0x02,0x22,0x1F,0x02,0x8E,0x00,0x41,0x0A,0x72,0x00,0x17,0x1E,0x00,0x8F,0x5F,0x47,0x10,0x40,0x00,0x00,0x20, -}; -uint8_t tileset_tile_63_compressed[107] = { - 0x10,0x06,0x10,0x1B,0x1B,0x16,0x0F,0x00,0x16,0x16,0x1B,0x17,0x1B,0x00,0x17,0x76,0x02,0x03,0x0D,0x1B,0x8C,0x0F,0x45,0x1B,0x01,0x0F,0x09,0x0B,0x09,0x09,0x16,0x0B, - 0xDE,0x00,0x0F,0x0E,0x0B,0xA2,0x0F,0x16,0x09,0xEF,0x11,0x0F,0x0E,0xD3,0x0F,0x0B,0x77,0x00,0x0F,0x0E,0x77,0x1F,0x31,0x76,0x0F,0x0E,0x0A,0x89,0x1F,0x93,0x0E,0x0F, - 0x9E,0x00,0x62,0x0E,0x10,0x0A,0x64,0x00,0x17,0xB1,0x0E,0x52,0x0F,0x22,0x0E,0x00,0x25,0x0F,0x0E,0x27,0x00,0x17,0x00,0x96,0x0E,0x26,0x0F,0x54,0x0E,0x00,0xF3,0x5F, - 0x13,0x0E,0x00,0x10,0xCA,0x00,0x0E,0x00,0x80,0x00,0x40, -}; -uint8_t tileset_tile_64_compressed[53] = { - 0x10,0x14,0x10,0x4B,0x0E,0x00,0x15,0x44,0x08,0x42,0x00,0x13,0x0F,0xC1,0x10,0xBC,0x0F,0x3F,0x5F,0x68,0x0F,0x0E,0x49,0x6F,0x15,0x2F,0x03,0x0F,0x2A,0x21,0x15,0xAE, - 0x02,0x03,0x79,0x0F,0xFE,0x00,0x0E,0x00,0x3F,0x0F,0x00,0x8F,0x0F,0xB9,0x11,0xE3,0x05,0x60,0x00,0x00,0x10, -}; -uint8_t tileset_tile_65_compressed[44] = { - 0x10,0x20,0x10,0x08,0xA5,0x00,0x15,0x04,0x28,0x1D,0x3A,0x75,0x41,0x3A,0x04,0x95,0x66,0x00,0x24,0x06,0x9A,0x03,0x02,0x0E,0x97,0x00,0x15,0x06,0x7C,0x03,0x02,0x18, - 0x2A,0x00,0x4B,0x00,0x25,0x07,0x4B,0x1D,0x00,0x00,0x00,0x80, -}; -uint8_t tileset_tile_66_compressed[59] = { - 0x10,0x22,0x10,0x08,0x0A,0x00,0x15,0x0E,0x00,0x46,0x4B,0xC7,0x0E,0x91,0x0F,0x4B,0x4B,0xB0,0x2F,0xD4,0x0F,0x7C,0x2F,0x7C,0x4F,0x7A,0x6F,0x08,0x75,0x1F,0x15,0x44, - 0x00,0xF6,0x3F,0x0B,0x07,0x15,0x9B,0x3D,0x00,0x45,0x0E,0xC7,0x00,0x7C,0x0F,0x0D,0x00,0x6D,0x0D,0xCF,0x0F,0x05,0x0A,0xC0,0x00,0x00,0x20, -}; -uint8_t tileset_tile_67_compressed[44] = { - 0x10,0x19,0x10,0x4B,0x0E,0x00,0x15,0x08,0x12,0x00,0x0E,0x86,0x64,0x0F,0x06,0x8E,0x1E,0xD6,0x14,0x15,0x0E,0x3A,0x9B,0x1D,0x07,0x84,0x62,0x00,0xB8,0x2E,0x1E,0x33, - 0x00,0x43,0x15,0xF0,0x1D,0xFC,0x58,0x37,0x1E,0x00,0x00,0x80, -}; -uint8_t tileset_tile_68_compressed[40] = { - 0x10,0x22,0x10,0x08,0x4D,0x00,0x15,0x0E,0x00,0x4B,0x1C,0x0F,0x0E,0x86,0xB8,0x0F,0x10,0xB5,0x0F,0x3A,0xE8,0x10,0x00,0x08,0x6F,0x00,0x1D,0x83,0x38,0x00,0x22,0x53, - 0x43,0x3A,0xB0,0x41,0xD4,0x1E,0x00,0x02, -}; -uint8_t tileset_tile_69_compressed[112] = { - 0x10,0x22,0x10,0x4B,0x59,0x00,0x04,0x00,0x05,0x04,0x12,0x0D,0x03,0x34,0x03,0x05,0x0E,0x05,0x49,0x0F,0x05,0x01,0xF2,0x0E,0x03,0x28,0x0B,0x1F,0x2B,0x01,0x01,0xE4, - 0x02,0x0F,0xFE,0x0C,0x02,0x08,0xAB,0x1D,0x03,0x12,0xBF,0x1D,0x02,0x1C,0xBF,0x0E,0x0F,0x00,0x9A,0x4B,0xEA,0x0D,0x4E,0xEE,0x1F,0x4A,0x5A,0x00,0x42,0xA4,0x6F,0x1C, - 0x9D,0x1D,0x0B,0xD9,0x2D,0x2F,0x1C,0x03,0xDD,0x0A,0x49,0xF7,0x52,0x31,0x3C,0x72,0x17,0xF3,0x50,0x00,0x27,0x0F,0x05,0x00,0xAA,0x7B,0x2F,0x8C,0x0F,0x90,0xB9,0x27, - 0x00,0x5D,0x1F,0x1F,0xCF,0x4C,0x0F,0xD8,0x5E,0xB8,0x4D,0x7F,0xC0,0x03,0x00,0x20, -}; -uint8_t tileset_tile_70_compressed[84] = { - 0x10,0x11,0x10,0x01,0x05,0x8E,0x00,0x01,0x00,0xA6,0x04,0x0B,0x9A,0x0E,0xF9,0x06,0x03,0xE3,0x09,0xF8,0x2F,0x00,0xD8,0x0D,0xBA,0x27,0x0C,0x49,0x04,0x11,0x3F,0x04, - 0x0E,0x2C,0x10,0xF5,0x00,0x0E,0x3C,0x11,0xEF,0x0D,0x03,0x03,0x09,0x98,0x02,0x04,0x03,0xBD,0x03,0x11,0x03,0x75,0x0C,0x06,0x4B,0x1B,0x05,0x11,0xAA,0x17,0x27,0xBF, - 0x29,0x63,0x0F,0xB9,0x30,0x6E,0x03,0x0F,0xE5,0x48,0x7F,0x8D,0x8B,0x09,0xA3,0x07,0xC2,0xBF,0x00,0x01, -}; -uint8_t tileset_tile_71_compressed[102] = { - 0x10,0x0D,0x10,0x04,0x05,0x04,0x00,0x4B,0x13,0x00,0x84,0x0E,0x05,0x05,0x03,0x03,0x4A,0x11,0x01,0xB8,0x10,0x03,0xC7,0x0F,0x01,0x01,0xCF,0x02,0x11,0x5D,0x0C,0x30, - 0x4F,0x21,0x22,0xDF,0x1A,0x0F,0x10,0xCF,0x00,0x1F,0x57,0x50,0x00,0x37,0x53,0x0E,0x2A,0x20,0x05,0x6E,0x31,0x0D,0xE4,0x31,0x13,0xD5,0x21,0x1C,0x1F,0x25,0x4C,0xEA, - 0x55,0x04,0x03,0x0F,0x96,0x2A,0xFE,0x24,0x00,0x20,0x7B,0x0F,0x12,0x8F,0x0F,0xF4,0x01,0x0F,0x1F,0x4D,0x0F,0x84,0xC5,0x5F,0x0F,0x52,0x6B,0x1F,0x1F,0x38,0x96,0x7D, - 0xC8,0x10,0x1C,0x1F,0x00,0x04, -}; -uint8_t tileset_tile_72_compressed[46] = { - 0x10,0x20,0x10,0x00,0x21,0x49,0x00,0x0C,0x07,0xA6,0x00,0x0E,0x55,0x11,0x00,0xA7,0x04,0x0C,0x0E,0x8B,0x0F,0xA4,0x08,0x22,0x53,0x0F,0x0C,0x08,0x45,0x22,0x64,0x0F, - 0x06,0x0C,0x22,0x57,0x0F,0x05,0x19,0x0F,0x71,0x3B,0x70,0x0F,0x00,0x08, -}; -uint8_t tileset_tile_73_compressed[18] = { - 0x10,0x20,0x10,0x00,0x7E,0x00,0x47,0x07,0x34,0x00,0x11,0x00,0x0C,0x0D,0x70,0x03,0x00,0x08, -}; -uint8_t tileset_tile_74_compressed[18] = { - 0x10,0x20,0x10,0x00,0x7E,0x00,0x47,0x07,0x34,0x00,0x11,0x00,0x0C,0x0D,0x70,0x03,0x00,0x08, -}; -uint8_t tileset_tile_75_compressed[41] = { - 0x10,0x20,0x10,0x00,0x7E,0x00,0x4C,0x07,0x00,0x0C,0x99,0x0F,0x11,0xAC,0x00,0x0C,0x03,0x22,0x0C,0x8E,0x0F,0xE3,0x10,0xB8,0x0F,0x10,0xF4,0x0F,0x0C,0x77,0x0F,0x01, - 0x1D,0x0F,0xC7,0x02,0x70,0x0F,0x03,0x00,0x08, -}; -uint8_t tileset_tile_76_compressed[79] = { - 0x10,0x11,0x10,0x00,0x10,0xA2,0x00,0x02,0x16,0x0F,0x33,0x00,0x0F,0x2C,0x16,0x12,0x00,0x09,0x12,0x97,0x00,0x0F,0x94,0x20,0x09,0x09,0x96,0x06,0x6F,0x1F,0x1E,0x02, - 0xB9,0x0E,0xE4,0x1F,0x0C,0xB8,0x23,0xAB,0x1F,0x06,0x85,0xE1,0x3F,0x18,0x5F,0x94,0x7F,0x07,0x5E,0x00,0x0F,0x07,0xD2,0x1B,0x16,0xA8,0x00,0x0F,0x03,0x02,0x0F,0x84, - 0xA6,0x0F,0x4B,0x5F,0x0F,0x4F,0x0F,0x1B,0x3F,0xC6,0x1D,0x40,0x0F,0x00,0x20, -}; -uint8_t tileset_tile_77_compressed[59] = { - 0x10,0x84,0x11,0x00,0x0F,0xC4,0x00,0x09,0x12,0xB1,0x00,0x09,0x07,0x09,0x67,0x16,0x07,0xA9,0x11,0xA5,0x25,0x07,0x8B,0x1B,0xBB,0x07,0x39,0x8B,0x03,0x8F,0x3F,0x84, - 0x27,0x5F,0x77,0x99,0x07,0x07,0x1C,0x00,0x16,0xA5,0x00,0x0F,0xC2,0x04,0xD7,0x07,0x43,0xF3,0x74,0x00,0xA1,0x07,0x07,0xE8,0x00,0x00,0x04, -}; -uint8_t tileset_tile_78_compressed[59] = { - 0x10,0x84,0x11,0x00,0x0F,0xC4,0x00,0x09,0x12,0xB1,0x00,0x09,0x07,0x09,0x67,0x16,0x07,0xA9,0x11,0xA5,0x25,0x07,0x8B,0x1B,0xBB,0x07,0x39,0x8B,0x03,0x8F,0x3F,0x84, - 0x27,0x5F,0x77,0x99,0x07,0x07,0x1C,0x00,0x16,0xA5,0x00,0x0F,0xC2,0x04,0xD7,0x07,0x43,0xF3,0x74,0x00,0xA1,0x07,0x07,0xE8,0x00,0x00,0x04, -}; -uint8_t tileset_tile_79_compressed[77] = { - 0x10,0x8F,0x00,0x23,0x00,0x0F,0x02,0x00,0x09,0x02,0x09,0x12,0x5B,0x00,0x07,0xFE,0x04,0x0F,0x02,0x59,0x18,0x2A,0x06,0x0F,0xAE,0x14,0x08,0x5A,0x20,0x0F,0x92,0x15, - 0x49,0x12,0xEE,0x1F,0x18,0xE1,0x1F,0x58,0x3F,0x42,0x5F,0x79,0x79,0x91,0x1F,0x07,0x74,0x00,0x0F,0x16,0xA5,0x00,0x0F,0xFA,0x04,0x00,0x22,0x07,0x3C,0x0F,0x07,0x02, - 0xB4,0x46,0x0F,0xD7,0x52,0x0F,0x19,0x3F,0x09,0x40,0x0F,0x00,0x20, -}; -uint8_t tileset_tile_80_compressed[74] = { - 0x10,0x20,0x10,0x4B,0x85,0x00,0x0D,0x72,0x00,0x4C,0x05,0x0E,0x0B,0xA9,0x00,0x6E,0x04,0x12,0xE7,0x09,0x0F,0xE1,0x02,0x8B,0x0F,0x00,0x89,0x0F,0x24,0x0D,0x13,0x00, - 0xE6,0x11,0x5F,0xD2,0x09,0x06,0xCB,0x00,0x1F,0x91,0x0F,0x06,0x0D,0xDC,0x0F,0x10,0x71,0x0F,0x06,0x13,0x1F,0x0F,0x73,0x04,0xDF,0x4F,0x1E,0x02,0xA6,0x01,0x4B,0x20, - 0x97,0x3E,0x04,0x9E,0x0F,0x64,0x5E,0x0D,0x00,0x02, -}; -uint8_t tileset_tile_81_compressed[68] = { - 0x10,0x21,0x10,0x4B,0xF5,0x00,0x0D,0x4F,0x00,0x08,0x6A,0x00,0x0B,0x00,0x89,0x09,0x4B,0x13,0x0F,0x70,0x04,0xB4,0x0F,0x6A,0x34,0x13,0x59,0x00,0x15,0x0B,0x06,0x00, - 0xCB,0x04,0x12,0x73,0x0D,0x5D,0x00,0x10,0x46,0x0D,0x71,0x10,0x04,0x92,0x10,0xDC,0x06,0x15,0x5F,0x18,0x26,0x18,0x16,0x13,0xB4,0x02,0x13,0x6D,0x25,0x46,0x6E,0xA0, - 0x34,0x0D,0x00,0x10, -}; -uint8_t tileset_tile_82_compressed[74] = { - 0x10,0x20,0x10,0x4B,0x85,0x00,0x0D,0x57,0x00,0x04,0xCA,0x00,0x0C,0x0B,0xA9,0x00,0x6A,0x04,0x10,0x7B,0x0A,0x04,0x42,0x0B,0xB2,0x0F,0x4F,0x00,0x0F,0xA4,0x09,0x13, - 0x00,0x4E,0x0D,0x0F,0x06,0x95,0x00,0x13,0x31,0x5F,0x06,0x0D,0x3C,0x0F,0xBA,0x1F,0x09,0x0D,0x3B,0x0F,0x0A,0x8F,0x0F,0x46,0x13,0x2D,0x0F,0x13,0x02,0x13,0x1B,0x4F, - 0xCD,0x04,0x1E,0x3A,0x6F,0x0D,0x78,0x0F,0x00,0x04, -}; -uint8_t tileset_tile_83_compressed[35] = { - 0x10,0x20,0x10,0x08,0xA5,0x00,0x15,0x04,0x28,0x1D,0x3A,0x75,0x41,0x3A,0x02,0x17,0x66,0x00,0x18,0x48,0x0E,0xE3,0x00,0x17,0x30,0x0E,0x10,0x0D,0x23,0x0F,0x4B,0xA0, - 0x0F,0x00,0x10, -}; -uint8_t tileset_tile_84_compressed[41] = { - 0x10,0x20,0x10,0x08,0xA5,0x00,0x15,0x04,0x28,0x1D,0x3A,0x76,0x41,0x78,0x1E,0x2D,0x71,0x43,0x15,0x0E,0x4B,0x15,0x00,0x2C,0x77,0x15,0x0E,0xE2,0x00,0xD7,0x3D,0x0E, - 0x0F,0x1B,0x1E,0x1E,0x1F,0x4B,0x80,0x00,0x40, -}; -uint8_t tileset_tile_85_compressed[122] = { - 0x10,0x00,0x10,0x1C,0x1C,0x03,0x01,0x01,0x04,0x04,0x3E,0x01,0x05,0x00,0x07,0xAB,0x09,0x0E,0x08,0xFE,0x0E,0x01,0x00,0xEE,0x11,0x0F,0xFB,0x10,0x00,0x0F,0xFF,0x07, - 0x0F,0x02,0x06,0xBB,0x08,0x11,0x3B,0x04,0x03,0x0F,0x18,0xBB,0x38,0x00,0xD7,0x0F,0x03,0x2F,0x77,0x0E,0x10,0xDC,0x0D,0x0F,0x97,0x28,0x20,0xDC,0x0C,0x1F,0xB6,0x28, - 0x3A,0x03,0xB7,0x23,0x1F,0x06,0x2F,0x10,0x06,0x7F,0x37,0x0F,0x10,0x72,0x36,0xD3,0x5F,0x00,0x4B,0x0F,0xB9,0x10,0x25,0x32,0x0F,0x97,0x10,0x3C,0x9B,0x1F,0x10,0xC2, - 0xC2,0x49,0x11,0x3D,0x74,0x0F,0x00,0x1C,0x2C,0x10,0xB7,0x58,0x1F,0x72,0x0F,0xF5,0x10,0x01,0x3F,0x35,0x0E,0xF0,0x54,0x03,0x00,0x08, -}; -uint8_t tileset_tile_86_compressed[86] = { - 0x10,0x1D,0x10,0x01,0x05,0x00,0xDC,0x03,0x06,0xFA,0x0A,0x05,0x01,0xE7,0x03,0x15,0x8A,0x00,0xD1,0x0C,0x04,0xAE,0x0F,0x04,0x00,0x49,0x28,0xAA,0x04,0x0E,0xE6,0x11, - 0x00,0xB2,0x0B,0x03,0x03,0x64,0x12,0x04,0xD3,0x0D,0x4E,0x10,0x0E,0x01,0xBE,0x0E,0x1C,0x64,0x04,0x03,0x91,0x35,0x93,0x04,0xDC,0x1B,0x07,0xDD,0x0F,0x69,0xF2,0x4F, - 0x05,0xF2,0x24,0x76,0x85,0xA3,0xF1,0x06,0x10,0xE1,0x9F,0x18,0xC0,0x15,0x0A,0x71,0x2E,0x61,0xCE,0x00,0x00,0x80, -}; -uint8_t tileset_tile_87_compressed[123] = { - 0x10,0x14,0x10,0x04,0x01,0x00,0x05,0xCA,0x00,0x01,0x04,0x09,0x0B,0x03,0x1C,0x1C,0x04,0x0D,0xAF,0x12,0x07,0x01,0xFA,0x07,0x10,0x16,0xBE,0x0F,0x06,0xED,0x0E,0x0F, - 0x03,0xDD,0x08,0x0D,0xB1,0x0E,0x05,0x05,0x1C,0x03,0x03,0x77,0x0C,0x3C,0x77,0x1F,0x0F,0x77,0x11,0x3D,0x6B,0x00,0x03,0x1F,0xBB,0x10,0x50,0xAB,0x36,0x4F,0xD7,0x08, - 0x03,0x44,0x2D,0x36,0xFC,0x6F,0x00,0x0F,0xBA,0x0E,0x16,0x1F,0x4B,0x36,0x0B,0xBE,0x48,0x0E,0x49,0x0F,0x2F,0x2C,0x0E,0x0F,0x4B,0x4B,0x1F,0xCB,0x42,0x0E,0x52,0x0F, - 0x49,0x6A,0x0D,0x86,0xBC,0x0E,0x4B,0x96,0x46,0x57,0x0E,0x1C,0x0E,0xA6,0x0F,0x03,0x0E,0xB9,0x0F,0xEE,0x1F,0x0E,0x4E,0x2F,0x10,0x00,0x01, -}; -uint8_t tileset_tile_88_compressed[51] = { - 0x10,0x1A,0x10,0x02,0x22,0x00,0x0C,0x9A,0x03,0x11,0x00,0x0C,0xE0,0x03,0x76,0x0F,0x26,0x25,0x0C,0x00,0x95,0x0F,0x25,0x1A,0x0F,0x25,0x87,0x04,0x0F,0x25,0x07,0x07, - 0x5F,0x0F,0x0B,0x71,0x10,0x15,0x0F,0x0E,0x71,0x10,0x09,0x0F,0x0C,0xA6,0x10,0x00,0x80,0x00,0x40, -}; -uint8_t tileset_tile_89_compressed[49] = { - 0x10,0x34,0x10,0x11,0x00,0x0C,0x0F,0x70,0x03,0xC2,0x00,0x07,0xC8,0x04,0x0A,0x0B,0xBF,0x0E,0x0D,0x00,0x8A,0x0E,0xE3,0x0C,0x29,0x0F,0x1D,0x0A,0x17,0x2D,0x64,0x0E, - 0x22,0x0B,0x5F,0x1E,0x0E,0xA5,0x03,0x07,0x00,0xDD,0x0F,0x25,0x00,0xC0,0x41,0x00,0x20, -}; -uint8_t tileset_tile_90_compressed[51] = { - 0x10,0x34,0x10,0x11,0x00,0x0C,0x0F,0x71,0x03,0xE5,0x00,0x0B,0x0A,0xA2,0x05,0x07,0x74,0x0F,0x00,0x0A,0x5A,0x10,0x0B,0xE3,0x00,0x17,0x21,0x0A,0x21,0x3E,0x0F,0x1F, - 0x22,0xE2,0x10,0xFE,0x20,0x0B,0x10,0x2E,0x20,0xDD,0x3D,0x25,0x00,0x4B,0x0F,0x00,0x00,0x00,0x80, -}; -uint8_t tileset_tile_91_compressed[51] = { - 0x10,0x35,0x10,0x11,0x00,0x0C,0xBB,0x03,0x22,0x00,0x03,0x40,0x02,0xDE,0x0F,0x0C,0x99,0x00,0x25,0x1E,0x0F,0x25,0x8F,0x0F,0x43,0x25,0xC2,0x0F,0x07,0x07,0x25,0x2E, - 0x0F,0xB8,0x0E,0x00,0x99,0x0F,0x32,0x0E,0x00,0x02,0x07,0x7B,0x00,0x0D,0xD0,0x42,0x02,0x00,0x08, -}; -uint8_t tileset_tile_92_compressed[59] = { - 0x10,0x05,0x10,0x02,0x12,0x12,0x09,0x92,0x00,0x07,0x09,0xC2,0x00,0x4B,0x0F,0x0F,0x00,0x24,0x07,0x0F,0x0E,0x52,0x0F,0x0F,0x07,0xFB,0x00,0x20,0x10,0xE6,0x16,0x2F, - 0xFB,0x0F,0x02,0x25,0x44,0x09,0xFA,0x0F,0x0C,0x00,0x0F,0x7E,0x3F,0x0F,0xAE,0x02,0x23,0x7B,0x3F,0x0E,0xB8,0x10,0x1F,0xE0,0x7F,0x00,0x10, -}; -uint8_t tileset_tile_93_compressed[44] = { - 0x10,0x12,0x10,0x07,0x09,0xC3,0x00,0x09,0x07,0x0F,0x13,0x06,0x0F,0xCB,0x07,0x10,0xCF,0x0E,0x07,0x7D,0x21,0x00,0xCF,0x2D,0x07,0xAE,0x04,0x07,0x1B,0x79,0x07,0xA7, - 0x1B,0x07,0xE6,0x06,0x56,0x9A,0x07,0x07,0xF8,0x7F,0x00,0x04, -}; -uint8_t tileset_tile_94_compressed[44] = { - 0x10,0x12,0x10,0x07,0x09,0xC3,0x00,0x09,0x07,0x0F,0x13,0x06,0x0F,0xCB,0x07,0x10,0xCF,0x0E,0x07,0x7D,0x21,0x00,0xCF,0x2D,0x07,0xAE,0x04,0x07,0x1B,0x79,0x07,0xA7, - 0x1B,0x07,0xE6,0x06,0x56,0x9A,0x07,0x07,0xF8,0x7F,0x00,0x04, -}; -uint8_t tileset_tile_95_compressed[57] = { - 0x10,0x12,0x10,0x07,0x09,0xDE,0x00,0x07,0x04,0x07,0x42,0x02,0x09,0x0F,0x0F,0x1D,0x0E,0x0F,0x07,0x57,0x00,0x0F,0x13,0x7D,0x10,0x09,0x5F,0x1B,0x00,0x0F,0xDC,0x08, - 0x18,0xB2,0x30,0x55,0x0F,0x25,0xCF,0x23,0x0F,0x76,0x1B,0x34,0x07,0x96,0x3F,0x4B,0x0E,0x10,0x9A,0x3F,0x07,0xF8,0x7F,0x00,0x04, -}; -uint8_t tileset_tile_96_compressed[79] = { - 0x10,0x35,0x10,0x4B,0x00,0x0D,0x09,0x00,0x13,0x0D,0x06,0x69,0x00,0x0E,0x0B,0xFC,0x00,0x0F,0x10,0x77,0x0F,0x10,0x1D,0x0F,0xC7,0x10,0xDC,0x0F,0x10,0xF5,0x4F,0x00, - 0xFC,0x0C,0x02,0x0F,0xF2,0x20,0x73,0x2D,0x10,0xCC,0x0F,0x5E,0x0D,0x8E,0x0F,0x9F,0x1F,0x0E,0x89,0x7F,0x93,0x00,0x09,0x8C,0x7F,0x96,0x4C,0x39,0x0F,0x13,0x19,0x0F, - 0x7C,0x7F,0x01,0xF2,0x0F,0xA7,0x3E,0x0D,0x4F,0x4F,0x13,0x7F,0x00,0x00,0x80, -}; -uint8_t tileset_tile_97_compressed[74] = { - 0x10,0x12,0x10,0x0D,0x06,0x26,0x00,0x0D,0x07,0xD2,0x00,0x13,0x11,0x0E,0x13,0x13,0x1F,0x10,0x08,0x13,0x71,0x00,0x3C,0x21,0x1D,0x64,0x10,0xC9,0x0E,0x13,0x93,0x43, - 0x13,0xDC,0x00,0x4B,0x54,0x1D,0xB1,0x5C,0x96,0x0E,0x5C,0x0D,0x8B,0x3B,0x9E,0x4E,0xA3,0x0D,0x38,0x10,0x04,0xC8,0x10,0xA0,0xA9,0x8A,0x18,0xE3,0x26,0x2F,0x16,0x7F, - 0x01,0x8D,0x25,0xA8,0x6E,0xD4,0x34,0x0D,0x00,0x02, -}; -uint8_t tileset_tile_98_compressed[85] = { - 0x10,0x12,0x10,0x0D,0x06,0x0A,0x00,0x0D,0x13,0x0D,0x00,0x64,0x4B,0x00,0x06,0x13,0xBB,0x0E,0x0F,0x0B,0x00,0xAA,0x10,0x0B,0xF8,0x02,0x0D,0xAD,0x0F,0x0D,0x0D,0x1B, - 0x0F,0xC6,0x0E,0x25,0x0F,0x13,0x00,0x9F,0x4F,0x1D,0x8B,0x1E,0x71,0x4B,0x0E,0xB3,0x0F,0xCF,0x3D,0x0F,0x2F,0x4E,0x73,0x13,0x0F,0x75,0x10,0x04,0x72,0x00,0xF7,0x6F, - 0x0B,0x04,0x14,0x7F,0x06,0x8C,0x0F,0xE3,0x2C,0x38,0x0F,0x0E,0xC9,0x0F,0x6A,0x2C,0x25,0x68,0x4F,0x00,0x04, -}; -uint8_t tileset_tile_99_compressed[86] = { - 0x10,0x33,0x10,0x4B,0x00,0x0D,0x0B,0x00,0x12,0x0D,0x0D,0x06,0xCE,0x00,0x0F,0x13,0x44,0x0D,0xF5,0x0F,0x00,0x0F,0x35,0x10,0xDA,0x0C,0x2E,0x13,0x6E,0x10,0x0B,0xEF, - 0x0F,0x1F,0x0F,0xE7,0x10,0x0F,0xB6,0x0E,0x13,0x0C,0x13,0x9A,0x0F,0x7E,0x2D,0x10,0xEE,0x3F,0x3C,0x7E,0x6F,0x06,0xE2,0x1B,0x6E,0x0F,0x12,0x58,0x2C,0xCE,0x10,0x04, - 0x32,0x10,0x5B,0x06,0x15,0x8B,0x18,0xE3,0x26,0x2F,0x16,0x7F,0x01,0x8D,0x25,0xA8,0x6E,0xD4,0x34,0x0D,0x00,0x02, -}; -uint8_t tileset_tile_100_compressed[93] = { - 0x10,0x12,0x10,0x0D,0x06,0x0C,0x00,0x0D,0x0D,0x0B,0x00,0x0D,0x4B,0xC9,0x00,0x06,0x13,0x13,0x0E,0x13,0xFF,0x0F,0x0B,0x21,0x13,0xFC,0x00,0x0F,0x22,0xBF,0x0F,0x0D, - 0x1D,0xCB,0x00,0x30,0xC9,0x00,0x2C,0x25,0x1F,0xF2,0x0F,0x02,0x4F,0x2C,0x10,0x77,0x0F,0x1D,0x3D,0x10,0xCF,0x02,0x0D,0x77,0x42,0x3F,0x2D,0x10,0xCD,0x48,0x00,0x27, - 0x5D,0x06,0x19,0x10,0xC6,0x04,0x4A,0x10,0x06,0x13,0x8D,0x0E,0xA8,0x78,0xC5,0x16,0x13,0xA3,0x02,0x13,0x6A,0x25,0x6E,0x35,0x34,0x0D,0x00,0x00,0x80, -}; -uint8_t tileset_tile_101_compressed[109] = { - 0x10,0x03,0x10,0x1F,0x1F,0x1C,0x1C,0x04,0x00,0x4A,0x03,0x00,0x05,0x49,0x04,0x0E,0x3E,0x0D,0x0E,0x05,0xB9,0x0F,0x9F,0x0D,0x01,0x0E,0x03,0x10,0x0F,0x01,0x11,0x01, - 0x04,0x01,0x3F,0x0F,0x2A,0x1D,0x5F,0x03,0x12,0x4F,0x7D,0x0F,0x1C,0xFA,0x0E,0x0F,0x00,0x4B,0x5B,0x20,0x0D,0xFB,0x00,0x59,0x0F,0xE5,0x05,0x0D,0xAC,0x1E,0x0A,0x4B, - 0x4B,0xA9,0x1E,0x2E,0x0B,0x2D,0xBE,0x2F,0x0F,0x3D,0x49,0x49,0x29,0x52,0x1F,0x04,0x73,0x4D,0x73,0x50,0x00,0x27,0x0F,0x05,0x00,0xFE,0x4F,0x0F,0x0D,0x32,0x0F,0x22, - 0x6E,0xF0,0x00,0x8F,0x8D,0x2F,0xE2,0x7E,0x6E,0x2E,0x16,0x00,0x01, -}; -uint8_t tileset_tile_102_compressed[84] = { - 0x10,0x11,0x10,0x01,0x05,0x8E,0x00,0x01,0x00,0xA6,0x04,0x0B,0x9A,0x0E,0xF9,0x06,0x03,0xE3,0x09,0xF8,0x2F,0x00,0xD8,0x0D,0xBA,0x27,0x0C,0x49,0x04,0x11,0x3F,0x04, - 0x0E,0x2C,0x10,0xF5,0x00,0x0E,0x3C,0x11,0xEF,0x0D,0x03,0x03,0x09,0x98,0x02,0x04,0x03,0xBD,0x03,0x11,0x03,0x75,0x0C,0x06,0x4B,0x1B,0x05,0x11,0xAA,0x17,0x27,0xBF, - 0x29,0x63,0x0F,0xB9,0x30,0x6E,0x03,0x0F,0xE5,0x48,0x7F,0x8D,0x8B,0x09,0xA3,0x07,0xC2,0xBF,0x00,0x01, -}; -uint8_t tileset_tile_103_compressed[107] = { - 0x10,0x09,0x10,0x04,0x05,0x03,0x58,0x00,0x04,0x00,0x1C,0x1C,0x1F,0x38,0x1F,0x05,0x10,0x9A,0x11,0x10,0x52,0x01,0x10,0x01,0x69,0x11,0x9A,0x0F,0x01,0x01,0x01,0x27, - 0x0F,0x0C,0xFE,0x30,0x21,0x02,0x75,0x0F,0x01,0xF7,0x0F,0x10,0x22,0xFD,0x0F,0x4F,0x1F,0x5C,0x50,0x00,0xAE,0x1E,0x4B,0x0E,0x5A,0x20,0x00,0xAF,0x5F,0x0F,0x0D,0xB9, - 0x31,0x29,0x13,0x20,0x4B,0xC9,0x1F,0x4C,0x27,0x55,0x41,0x5C,0x0F,0x06,0xD6,0x4E,0x51,0x04,0x9E,0x0F,0xE3,0x12,0xFD,0x0F,0x01,0x0F,0x1F,0x13,0x0F,0x7C,0x70,0x0F, - 0x76,0x2F,0x8F,0x17,0x08,0x13,0x30,0x84,0x80,0x00,0x02, -}; -uint8_t tileset_tile_104_compressed[79] = { - 0x10,0x05,0x10,0x02,0x07,0x0C,0x25,0xA6,0x00,0x07,0x00,0x4C,0x02,0x10,0x0C,0x99,0x00,0x02,0x71,0x21,0x6B,0x0F,0x17,0x10,0x8A,0x0F,0x4B,0x0B,0x10,0x10,0x0F,0x1B, - 0x96,0x10,0x26,0x3F,0x59,0x10,0xF9,0x00,0x3F,0x67,0x10,0x00,0xD7,0x0F,0x1B,0x10,0x14,0x1F,0x1B,0x8C,0x10,0xBA,0x0F,0x10,0x4F,0x17,0x00,0x26,0x0F,0x10,0x17,0x4D, - 0x0A,0x00,0x2F,0x0F,0x10,0x3C,0x00,0xD1,0x0F,0xF0,0x1F,0xC4,0x0F,0x00,0x02, -}; -uint8_t tileset_tile_105_compressed[62] = { - 0x10,0x25,0x10,0x07,0x00,0x48,0x0C,0x00,0x0A,0xE5,0x00,0x08,0x4A,0x07,0x0B,0x22,0x8A,0x0F,0x99,0x10,0x0C,0x17,0x20,0x71,0x0D,0x9C,0x20,0x00,0x7C,0x10,0xD2,0x5F, - 0xB4,0x62,0x25,0x0F,0x02,0x72,0x00,0x07,0x1E,0x00,0x47,0x17,0x23,0x00,0x0A,0x91,0x00,0x10,0xC4,0x00,0x02,0x1A,0x62,0x00,0x02,0x1F,0x0F,0x80,0x00,0x40, -}; -uint8_t tileset_tile_106_compressed[74] = { - 0x10,0x34,0x10,0x0A,0x00,0x0C,0x89,0x00,0x07,0x72,0x00,0x0E,0x22,0x0C,0xF9,0x13,0x0F,0x67,0x16,0x0E,0x9E,0x0F,0xA2,0x11,0xEE,0x1E,0x0D,0x33,0x1E,0x0C,0x8F,0x2D, - 0x44,0x25,0xD2,0x5C,0x00,0x02,0x39,0x00,0x07,0x0F,0x23,0x00,0x17,0x91,0x00,0x0A,0xC9,0x00,0x10,0x82,0x00,0x02,0x0B,0x0B,0x1B,0xE7,0x00,0x17,0x4D,0x02,0x17,0x3A, - 0x0F,0x1B,0x68,0x4F,0x89,0x0F,0xA0,0x00,0x00,0x10, -}; -uint8_t tileset_tile_107_compressed[93] = { - 0x10,0x26,0x10,0x07,0x00,0x58,0x25,0x00,0x0C,0x07,0x02,0x4D,0x0C,0x00,0x34,0x0E,0x5D,0x0F,0x22,0x0E,0x10,0xAD,0x0F,0x0E,0x17,0x13,0x0F,0x22,0x0E,0x0B,0x22,0x0F, - 0x52,0x0E,0x1B,0x02,0x79,0x5F,0x79,0x0E,0x3F,0xE5,0x00,0x0E,0x44,0x17,0xDB,0x1F,0x0E,0x1B,0x0F,0x8C,0x0E,0xA4,0x0F,0x17,0xF7,0x00,0x0E,0x49,0x0F,0x0A,0x97,0x00, - 0x17,0x0E,0x56,0x0F,0x05,0x1B,0x77,0x0B,0x77,0x0E,0x69,0x0F,0x10,0x79,0x00,0x37,0xA6,0x0F,0x4E,0x4E,0x1B,0x0F,0x1B,0x9A,0x00,0x78,0x0F,0x00,0x04, -}; -uint8_t tileset_tile_108_compressed[61] = { - 0x10,0x05,0x10,0x02,0x12,0x12,0x09,0x92,0x00,0x07,0x09,0xC2,0x00,0x4B,0x0F,0x0F,0x00,0x25,0x07,0x0F,0x00,0xF8,0x0F,0x0A,0xB4,0x00,0x02,0x68,0x0E,0x07,0x00,0x02, - 0x8D,0x00,0x71,0x00,0x10,0xB0,0x1F,0x89,0x0F,0x31,0x2D,0x85,0x00,0x10,0x07,0x31,0x1E,0x2E,0x00,0x1D,0x0F,0xE7,0x09,0x0F,0x81,0x82,0x1F,0x00,0x01, -}; -uint8_t tileset_tile_109_compressed[46] = { - 0x10,0x12,0x10,0x07,0x09,0xC3,0x00,0x09,0x07,0x0F,0x62,0x00,0x21,0x07,0xE4,0x00,0x02,0x74,0x00,0x3E,0x2F,0x07,0x46,0x10,0xC3,0x00,0xF0,0x0F,0xF9,0x6F,0x02,0x09, - 0x19,0x00,0xA3,0x0F,0x0F,0x2E,0x00,0x0F,0x26,0x3C,0xA0,0x0F,0x00,0x10, -}; -uint8_t tileset_tile_110_compressed[53] = { - 0x10,0x12,0x10,0x07,0x09,0xC3,0x00,0x09,0x07,0x0F,0x62,0x00,0x21,0x07,0xE4,0x00,0x02,0x74,0x00,0x3E,0x2F,0x1E,0x8F,0x00,0x46,0x1D,0x71,0x00,0x0E,0xB9,0x4E,0x11, - 0x02,0x0B,0x69,0x00,0x02,0xA1,0x06,0x28,0x0F,0xF5,0x2F,0x0A,0xA6,0x00,0x02,0x06,0x84,0x20,0x0F,0x00,0x10, -}; -uint8_t tileset_tile_111_compressed[54] = { - 0x10,0x12,0x10,0x07,0x09,0xDE,0x00,0x07,0x04,0x07,0x42,0x02,0x09,0x0F,0x0F,0x64,0x00,0x07,0xB8,0x0F,0xD8,0x00,0x42,0x0F,0x39,0x00,0x10,0x1A,0x1D,0x10,0x42,0x00, - 0x05,0x0F,0x31,0x1E,0x06,0x00,0x1D,0x07,0x10,0x2D,0x00,0x10,0x8B,0x0F,0xA4,0x05,0x10,0x0C,0x50,0x1F,0x00,0x08, -}; -uint8_t tileset_tile_112_compressed[75] = { - 0x10,0x33,0x10,0x4B,0x00,0x0D,0x0B,0x00,0x12,0x0D,0x0D,0x06,0xCE,0x00,0x0F,0x13,0x44,0x0D,0xFA,0x0F,0x00,0x0E,0x13,0x69,0x10,0xEE,0x1E,0x10,0x3D,0x0F,0x0D,0x1B, - 0x0F,0xF3,0x0C,0x02,0xCC,0x0F,0x2D,0x13,0x9E,0x4F,0x75,0x5E,0x0D,0xCF,0x1F,0x30,0x73,0x42,0x72,0x0F,0x10,0x73,0x00,0x07,0xCB,0x0F,0x25,0x0A,0x4F,0x0F,0x0A,0x24, - 0x34,0xDC,0x5F,0x07,0x90,0x04,0x43,0x00,0x00,0x00,0x80, -}; -uint8_t tileset_tile_113_compressed[77] = { - 0x10,0x12,0x10,0x0D,0x06,0x26,0x00,0x0D,0x07,0xD2,0x00,0x13,0x11,0x0E,0x13,0x13,0x1F,0x10,0x08,0x13,0x71,0x00,0x3C,0x21,0x1D,0x64,0x10,0xC9,0x0E,0x13,0x93,0x43, - 0x13,0xDC,0x00,0x4B,0x54,0x1D,0xB1,0x5C,0x93,0x0E,0xF7,0x1D,0x0D,0x00,0x24,0x0F,0xAA,0x00,0x0B,0x00,0xBE,0x07,0x1E,0x58,0x0A,0x88,0x04,0x5A,0x0F,0x7D,0x34,0x0F, - 0x4B,0x6B,0x09,0x4B,0x00,0x95,0x14,0x4B,0x0F,0x40,0x00,0x00,0x20, -}; -uint8_t tileset_tile_114_compressed[80] = { - 0x10,0x12,0x10,0x0D,0x06,0x0C,0x00,0x0D,0x0D,0x0B,0x00,0x0D,0x4B,0xC9,0x00,0x06,0x13,0x13,0x0E,0x13,0xFF,0x0F,0x0B,0x21,0x13,0xFC,0x00,0x10,0x00,0xBF,0x0F,0x0D, - 0x1D,0xCF,0x00,0x20,0x24,0x2C,0x67,0x0F,0x0A,0x18,0x0F,0x0D,0x8D,0x0F,0x9E,0x0E,0x7E,0x4F,0x04,0x26,0x1E,0xEA,0x1F,0x04,0xEE,0x00,0x0E,0x7B,0x0F,0x09,0x86,0x2E, - 0x0F,0x2A,0x7B,0x0F,0x50,0xBB,0x52,0x59,0x4D,0x0D,0x5F,0x0F,0xC0,0x00,0x00,0x20, -}; -uint8_t tileset_tile_115_compressed[92] = { - 0x10,0x12,0x10,0x0D,0x06,0x26,0x00,0x0D,0x07,0xD2,0x00,0x13,0x11,0x0E,0x13,0x13,0x1F,0x10,0x08,0x13,0x71,0x00,0x3C,0x21,0x1D,0x64,0x10,0xC9,0x0E,0x13,0x93,0x43, - 0x13,0xDC,0x00,0x4B,0x54,0x1D,0xB1,0x5C,0x97,0x0E,0x77,0x71,0x00,0x18,0x3B,0x00,0x0B,0x0B,0x0D,0xAF,0x02,0x10,0x19,0x8A,0x0F,0xAA,0x10,0x2A,0x8A,0x0F,0xEE,0x04, - 0x4C,0x6B,0x40,0x0E,0x92,0x0F,0xDD,0x10,0x4B,0x00,0xD5,0x12,0x0F,0xF7,0x7F,0x01,0x0F,0x72,0x20,0xF3,0x3E,0x04,0xCF,0x0F,0x7F,0x00,0x00,0x80, -}; -uint8_t tileset_tile_116_compressed[92] = { - 0x10,0x12,0x10,0x0D,0x06,0x26,0x00,0x0D,0x07,0xD2,0x00,0x13,0x11,0x0E,0x13,0x13,0x1F,0x10,0x08,0x13,0x71,0x00,0x3C,0x21,0x1D,0x64,0x10,0xC9,0x0E,0x13,0x93,0x43, - 0x13,0xDC,0x00,0x4B,0x54,0x1D,0xB1,0x5C,0x96,0x0E,0x5C,0x0D,0x9A,0x3B,0xEA,0x03,0x00,0x5E,0x30,0x06,0x8A,0x03,0x0B,0x0B,0x02,0x96,0x41,0xD3,0x74,0x0B,0xAE,0x0F, - 0x06,0x3B,0xE7,0x0E,0x1F,0x92,0x13,0xEE,0x10,0x3F,0xEE,0x74,0x0F,0xDC,0x0C,0x4B,0x00,0xD2,0x0E,0x5F,0x2F,0x0F,0x20,0x1B,0x0F,0x00,0x00,0x80, -}; -uint8_t tileset_tile_117_compressed[124] = { - 0x10,0x00,0x10,0x47,0x47,0x03,0x01,0x01,0x04,0x04,0x3E,0x01,0x05,0x00,0x07,0xBF,0x09,0x0E,0x0A,0x05,0x7D,0x49,0x10,0x00,0x9D,0x11,0x04,0x1C,0x0F,0xF7,0x10,0x00, - 0x0F,0xFF,0x07,0x0F,0x02,0x06,0x76,0x08,0x11,0x04,0x77,0x03,0x0F,0x18,0x77,0x38,0x00,0xAE,0x0F,0x03,0x2F,0xEF,0x0E,0x10,0x0D,0xB9,0x0F,0x2F,0x28,0x20,0x0C,0xB9, - 0x1F,0x6D,0x28,0x3A,0x03,0x6E,0x23,0x1F,0x06,0x5E,0x10,0x06,0xFE,0x37,0x0F,0x10,0xE5,0x36,0x5F,0xA7,0x00,0x4B,0x0F,0x72,0x10,0x4B,0x32,0x0F,0x2F,0x10,0x3C,0x36, - 0x1F,0x10,0x1C,0xAB,0x00,0x10,0xBF,0x74,0x0F,0x00,0x4B,0x1C,0x10,0x2C,0x58,0xD3,0x1F,0x7C,0x10,0x01,0x0E,0xB7,0x0F,0x44,0x70,0x03,0x00,0x08, -}; -uint8_t tileset_tile_118_compressed[87] = { - 0x10,0x1D,0x10,0x01,0x05,0x00,0xDC,0x03,0x06,0xFA,0x0A,0x05,0x01,0xE7,0x03,0x15,0x8A,0x00,0xD1,0x0C,0x04,0xAE,0x0F,0x04,0x00,0x49,0x28,0xAA,0x04,0x0E,0xE6,0x11, - 0x00,0xB2,0x0B,0x03,0x03,0x64,0x12,0x04,0xD3,0x0D,0x4E,0x10,0x0E,0x01,0xBE,0x0E,0x1C,0x64,0x04,0x03,0x91,0x35,0x89,0x04,0x01,0xE2,0x3C,0x52,0x0F,0x03,0xA6,0x0F, - 0x03,0x24,0x9E,0x51,0xEE,0x07,0x0E,0x6B,0x65,0x02,0xB8,0x15,0xC9,0x00,0x1C,0x0E,0x37,0x00,0xDC,0x04,0x00,0x00,0x02, -}; -uint8_t tileset_tile_119_compressed[124] = { - 0x10,0x14,0x10,0x04,0x01,0x00,0x05,0xCA,0x00,0x01,0x04,0x09,0x0B,0x03,0x47,0x47,0x04,0x0D,0xAF,0x12,0x07,0x01,0xFA,0x07,0x10,0x16,0xBE,0x0F,0x06,0xF1,0x0E,0x0F, - 0x1C,0x04,0x03,0xDD,0x08,0x0D,0xB1,0x0E,0x05,0x05,0x1C,0x03,0x03,0x77,0x0C,0x3C,0x77,0x1F,0x0F,0x77,0x11,0x3D,0x6B,0x00,0x03,0x1F,0xBB,0x10,0x50,0xAE,0x36,0x0F, - 0xD7,0x1B,0x03,0x44,0x2F,0x36,0x0F,0x7C,0x26,0x0F,0xBA,0x0E,0x16,0x1F,0x4B,0x36,0x0B,0xBE,0x48,0x0E,0x49,0x0F,0x2F,0x2C,0x0E,0x0F,0x4B,0x4B,0x1F,0xCB,0x42,0x0E, - 0x57,0x0F,0x6A,0x6A,0x0E,0x1C,0x00,0xD2,0x0E,0x4B,0xCA,0x46,0x0E,0x1C,0xF4,0x0E,0x0F,0x03,0xF1,0x0E,0x53,0x1F,0x7C,0x0E,0x0F,0x10,0x00,0x02, -}; -uint8_t tileset_tile_120_compressed[72] = { - 0x10,0x0B,0x10,0x02,0x17,0x1B,0x00,0x26,0x17,0x0A,0x00,0x82,0x02,0x0F,0x0B,0x17,0x3B,0x0F,0x10,0x8E,0x0F,0xE2,0x10,0xD7,0x0F,0x0A,0x10,0x17,0x0F,0x24,0x10,0x42, - 0x0F,0x10,0x64,0x10,0x02,0xC9,0x00,0x10,0x62,0x10,0x12,0x1F,0x00,0xC4,0x10,0xCB,0x0F,0x10,0x15,0x0F,0x7C,0x10,0x0F,0xE9,0x00,0x00,0x63,0x10,0x2E,0x0F,0x10,0x74, - 0x00,0x00,0xD3,0x10,0xC0,0x00,0x00,0x20, -}; -uint8_t tileset_tile_121_compressed[33] = { - 0x10,0x11,0x10,0x02,0x1A,0x88,0x00,0x02,0x1C,0x11,0x0F,0x17,0x90,0x00,0x8A,0x0F,0x0A,0x32,0x00,0x11,0x0F,0x46,0x0B,0x21,0x00,0x02,0xF4,0x00,0x10,0x74,0x00,0x00, - 0x02, -}; -uint8_t tileset_tile_122_compressed[57] = { - 0x10,0x26,0x10,0x0A,0x00,0x0B,0x1B,0x16,0x0F,0x1B,0x01,0x88,0x0F,0xE3,0x0A,0xBE,0x0F,0x0B,0x02,0x24,0x0F,0x0B,0x0B,0x49,0x09,0x01,0x3E,0x0F,0x0A,0x16,0x8D,0x0F, - 0x9A,0x00,0x2A,0x2F,0x48,0x30,0xF4,0x1F,0x02,0x72,0x00,0x0A,0x0B,0x90,0x00,0x17,0xF4,0x00,0x7A,0x5F,0x10,0x3A,0x00,0x00,0x01, -}; -uint8_t tileset_tile_123_compressed[100] = { - 0x10,0x05,0x10,0x16,0x0F,0x0F,0x1B,0x96,0x03,0x17,0x1B,0x00,0x17,0x77,0x02,0x09,0x01,0x0C,0x94,0x0F,0x09,0x0B,0x01,0x09,0x2F,0x16,0x0B,0x0F,0x0E,0x2F,0x0B,0x02, - 0x0B,0x11,0xEF,0x00,0x0F,0x0E,0xD3,0x0F,0x0B,0x76,0x00,0x0F,0x0E,0x0B,0x9A,0x2F,0xED,0x0F,0x0E,0x0A,0x13,0x1F,0x27,0x0E,0x0F,0x3C,0x00,0xC4,0x0E,0x10,0x0A,0xC9, - 0x00,0x17,0x62,0x0E,0xA4,0x0F,0x0E,0x44,0x00,0x4A,0x0F,0x0E,0x00,0x4F,0x17,0x00,0x2C,0x0E,0x4C,0x0F,0xA9,0x0E,0x00,0xE6,0x5F,0x0E,0x27,0x00,0x10,0x00,0x95,0x0E, - 0x00,0x00,0x00,0x80, -}; -uint8_t tileset_tile_124_compressed[50] = { - 0x10,0x03,0x10,0x00,0x00,0x02,0x31,0x2D,0x00,0x0A,0x10,0x07,0x31,0x1E,0x00,0x2E,0x1D,0x07,0x0F,0xA3,0x08,0x20,0x0F,0x72,0x1F,0x45,0x07,0xBD,0x0F,0x1D,0x00,0x0F, - 0x2D,0xF1,0x04,0x00,0x48,0x0F,0x1E,0x37,0x0F,0x2E,0x10,0x02,0x00,0x5E,0x05,0x06,0x00,0x01, -}; -uint8_t tileset_tile_125_compressed[59] = { - 0x10,0x02,0x10,0x02,0x0F,0x0F,0x07,0x1A,0x66,0x00,0x07,0x0B,0x02,0xB4,0x0F,0x11,0xD0,0x00,0x4F,0x0F,0x3C,0x00,0xD1,0x0F,0x7E,0x00,0x0F,0x15,0x09,0x44,0x0F,0xE4, - 0x01,0x0E,0x1B,0x0A,0x5E,0x10,0x0F,0x0A,0xA8,0x0F,0x99,0x00,0x23,0x2F,0x38,0x0F,0x03,0x3D,0x0F,0x8E,0x00,0x47,0x10,0x40,0x00,0x00,0x20, -}; -uint8_t tileset_tile_126_compressed[49] = { - 0x10,0x0B,0x10,0x1D,0x02,0x0A,0x00,0x4C,0x02,0x06,0x1D,0xE3,0x0F,0x29,0x00,0x0F,0x17,0x69,0x00,0x02,0xA0,0x06,0x8A,0x0F,0x34,0x3F,0x1E,0x1D,0x8C,0x00,0x47,0x1E, - 0xA3,0x00,0x2D,0x90,0x00,0x1D,0x27,0x23,0x00,0x02,0x91,0x00,0x10,0xD0,0x00,0x00,0x08, -}; -uint8_t tileset_tile_127_compressed[51] = { - 0x10,0x0A,0x10,0x07,0x31,0x1E,0x00,0x0C,0x1D,0x07,0x10,0x2D,0x00,0x10,0x02,0x22,0x10,0x00,0x2A,0x0F,0x05,0xE0,0x0F,0x6B,0x1F,0x47,0x07,0x48,0x1F,0x0F,0x2D,0x5F, - 0x1D,0x00,0x0F,0x76,0x04,0x0F,0x1E,0x83,0xDE,0x0F,0x73,0xF9,0x00,0x08,0x78,0x05,0x0F,0x00,0x04, -}; -uint8_t *tileset_tiles_compressed[128] = { - tileset_tile_0_compressed, - tileset_tile_1_compressed, - tileset_tile_2_compressed, - tileset_tile_3_compressed, - tileset_tile_4_compressed, - tileset_tile_5_compressed, - tileset_tile_6_compressed, - tileset_tile_7_compressed, - tileset_tile_8_compressed, - tileset_tile_9_compressed, - tileset_tile_10_compressed, - tileset_tile_11_compressed, - tileset_tile_12_compressed, - tileset_tile_13_compressed, - tileset_tile_14_compressed, - tileset_tile_15_compressed, - tileset_tile_16_compressed, - tileset_tile_17_compressed, - tileset_tile_18_compressed, - tileset_tile_19_compressed, - tileset_tile_20_compressed, - tileset_tile_21_compressed, - tileset_tile_22_compressed, - tileset_tile_23_compressed, - tileset_tile_24_compressed, - tileset_tile_25_compressed, - tileset_tile_26_compressed, - tileset_tile_27_compressed, - tileset_tile_28_compressed, - tileset_tile_29_compressed, - tileset_tile_30_compressed, - tileset_tile_31_compressed, - tileset_tile_32_compressed, - tileset_tile_33_compressed, - tileset_tile_34_compressed, - tileset_tile_35_compressed, - tileset_tile_36_compressed, - tileset_tile_37_compressed, - tileset_tile_38_compressed, - tileset_tile_39_compressed, - tileset_tile_40_compressed, - tileset_tile_41_compressed, - tileset_tile_42_compressed, - tileset_tile_43_compressed, - tileset_tile_44_compressed, - tileset_tile_45_compressed, - tileset_tile_46_compressed, - tileset_tile_47_compressed, - tileset_tile_48_compressed, - tileset_tile_49_compressed, - tileset_tile_50_compressed, - tileset_tile_51_compressed, - tileset_tile_52_compressed, - tileset_tile_53_compressed, - tileset_tile_54_compressed, - tileset_tile_55_compressed, - tileset_tile_56_compressed, - tileset_tile_57_compressed, - tileset_tile_58_compressed, - tileset_tile_59_compressed, - tileset_tile_60_compressed, - tileset_tile_61_compressed, - tileset_tile_62_compressed, - tileset_tile_63_compressed, - tileset_tile_64_compressed, - tileset_tile_65_compressed, - tileset_tile_66_compressed, - tileset_tile_67_compressed, - tileset_tile_68_compressed, - tileset_tile_69_compressed, - tileset_tile_70_compressed, - tileset_tile_71_compressed, - tileset_tile_72_compressed, - tileset_tile_73_compressed, - tileset_tile_74_compressed, - tileset_tile_75_compressed, - tileset_tile_76_compressed, - tileset_tile_77_compressed, - tileset_tile_78_compressed, - tileset_tile_79_compressed, - tileset_tile_80_compressed, - tileset_tile_81_compressed, - tileset_tile_82_compressed, - tileset_tile_83_compressed, - tileset_tile_84_compressed, - tileset_tile_85_compressed, - tileset_tile_86_compressed, - tileset_tile_87_compressed, - tileset_tile_88_compressed, - tileset_tile_89_compressed, - tileset_tile_90_compressed, - tileset_tile_91_compressed, - tileset_tile_92_compressed, - tileset_tile_93_compressed, - tileset_tile_94_compressed, - tileset_tile_95_compressed, - tileset_tile_96_compressed, - tileset_tile_97_compressed, - tileset_tile_98_compressed, - tileset_tile_99_compressed, - tileset_tile_100_compressed, - tileset_tile_101_compressed, - tileset_tile_102_compressed, - tileset_tile_103_compressed, - tileset_tile_104_compressed, - tileset_tile_105_compressed, - tileset_tile_106_compressed, - tileset_tile_107_compressed, - tileset_tile_108_compressed, - tileset_tile_109_compressed, - tileset_tile_110_compressed, - tileset_tile_111_compressed, - tileset_tile_112_compressed, - tileset_tile_113_compressed, - tileset_tile_114_compressed, - tileset_tile_115_compressed, - tileset_tile_116_compressed, - tileset_tile_117_compressed, - tileset_tile_118_compressed, - tileset_tile_119_compressed, - tileset_tile_120_compressed, - tileset_tile_121_compressed, - tileset_tile_122_compressed, - tileset_tile_123_compressed, - tileset_tile_124_compressed, - tileset_tile_125_compressed, - tileset_tile_126_compressed, - tileset_tile_127_compressed, -}; +// convpng +#include +#include "tiles_gfx.h" + +uint8_t tileset_tile_0_compressed[19] = { + 0x10,0x21,0x10,0x4B,0x84,0x00,0x3D,0x75,0x0C,0xC6,0x02,0xF0,0x1D,0x03,0x18,0x30,0x00,0x00,0x08, +}; +uint8_t tileset_tile_1_compressed[32] = { + 0x10,0x21,0x10,0x4B,0x14,0x00,0x1F,0x75,0x0C,0xC6,0x02,0xF0,0x1D,0x03,0x48,0x00,0x3D,0x8E,0x0C,0xB8,0x02,0xDE,0x1D,0x03,0x05,0xB8,0x00,0x23,0xC8,0x08,0x00,0x04, +}; +uint8_t tileset_tile_2_compressed[30] = { + 0x10,0x20,0x10,0x4B,0xCD,0x00,0x1F,0x1D,0x0C,0x71,0x02,0xB7,0x1D,0x03,0x07,0xE8,0x00,0x3B,0xEB,0x0C,0x02,0x8D,0x1D,0x40,0x3B,0x83,0x64,0x00,0x00,0x80, +}; +uint8_t tileset_tile_3_compressed[20] = { + 0x10,0x20,0x10,0x4B,0x54,0x00,0x47,0x1F,0x5C,0x0C,0x02,0x6F,0x1D,0x03,0x01,0x0B,0x00,0x00,0x00,0x80, +}; +uint8_t tileset_tile_4_compressed[118] = { + 0x10,0x05,0x10,0x4B,0x03,0x04,0x04,0x78,0x02,0x03,0x00,0x01,0x01,0x04,0xCE,0x02,0x4B,0x1C,0x08,0x7B,0x11,0x13,0x3B,0x4B,0x1F,0x10,0x0E,0xBB,0x00,0x12,0xDD,0x0F, + 0x1F,0x04,0xCB,0x0F,0x14,0xD5,0x0F,0x20,0xCC,0x0A,0x32,0x05,0xBB,0x0E,0x08,0xBA,0x0F,0x05,0x5C,0x05,0x0E,0xDE,0x4B,0x05,0x4E,0x05,0x27,0x1C,0x1C,0x0E,0xB7,0x30, + 0x05,0x0F,0x3D,0x1E,0xA2,0x0C,0x01,0xF0,0x0F,0x8B,0x92,0x0F,0x79,0x10,0x79,0x1E,0x0F,0x7E,0x10,0x1D,0x0D,0xFE,0x0E,0x5F,0x60,0xD7,0x10,0x01,0x11,0x76,0x00,0x8F, + 0x18,0xB1,0x73,0x07,0x77,0x0E,0x0F,0x10,0x77,0x20,0x3E,0x35,0x0F,0x07,0x86,0x1F,0x57,0x01,0x00,0x00,0x00,0x80, +}; +uint8_t tileset_tile_5_compressed[119] = { + 0x10,0x0D,0x10,0x01,0x01,0x04,0x02,0x03,0xBF,0x00,0x04,0x00,0x03,0x02,0x5C,0x4B,0x0B,0xF9,0x0D,0x07,0x1C,0x4B,0x2D,0x0C,0xFB,0x00,0x07,0x0E,0x1F,0x0F,0x96,0x0A, + 0xF6,0x04,0x00,0x1F,0x0F,0x05,0x9E,0x2C,0xAB,0x03,0x1E,0x0F,0xAB,0x17,0x0B,0xBB,0x05,0x10,0x77,0x05,0x50,0x0C,0x37,0x46,0x10,0xDC,0x0F,0x2A,0xE6,0x10,0x1C,0x1C, + 0x0F,0x01,0x7C,0x05,0x33,0x11,0xFD,0x20,0x0F,0xC5,0x00,0xDA,0x0F,0x21,0x04,0x7E,0x0E,0x0F,0xD7,0x00,0x01,0x45,0x72,0x0E,0xD6,0x0F,0x1F,0xC4,0x12,0x61,0x0E,0x90, + 0x2F,0x1D,0x0D,0xE1,0x06,0xAD,0x61,0x8F,0x2C,0x1F,0x96,0x2F,0x0E,0x4B,0x96,0x2E,0xA8,0x01,0x98,0x2E,0x0F,0x00,0x01, +}; +uint8_t tileset_tile_6_compressed[65] = { + 0x10,0x20,0x10,0x00,0xF5,0x00,0x03,0x1C,0x0E,0x05,0x8D,0x0F,0x46,0x04,0x91,0x0F,0x03,0x01,0x6D,0x0F,0x04,0x00,0x05,0x13,0x0F,0x68,0x0C,0x01,0xB2,0x0F,0x01,0x01, + 0x36,0x0F,0xE7,0x1E,0x0F,0xEA,0x2C,0x1C,0xE7,0x0E,0x0F,0x5C,0x01,0x11,0xFF,0x0F,0x67,0x07,0x34,0x0E,0x52,0x2F,0x05,0x7B,0x2F,0x86,0x0E,0x1F,0xAE,0x01,0x00,0x00, + 0x01, +}; +uint8_t tileset_tile_7_compressed[65] = { + 0x10,0x20,0x10,0x00,0xB9,0x00,0x03,0x1C,0x0F,0x05,0x8E,0x10,0x23,0x05,0x04,0x88,0x0F,0x01,0x03,0xE7,0x0F,0x04,0x00,0x18,0x0F,0x01,0x68,0x05,0x33,0x04,0xBA,0x0F, + 0x00,0x8B,0x0F,0xB8,0x21,0xAB,0x0F,0x00,0xA9,0x13,0xE5,0x32,0x0E,0xE7,0x0D,0x32,0x97,0x1D,0x0D,0xD1,0x06,0x03,0x51,0x1F,0x95,0x2F,0x2E,0x53,0x01,0x04,0x98,0x00, + 0x02, +}; +uint8_t tileset_tile_8_compressed[68] = { + 0x10,0x1B,0x10,0x00,0x07,0x00,0x00,0x00,0xE7,0x06,0x07,0x76,0x19,0x00,0x0B,0x19,0x98,0x07,0x07,0x23,0x2D,0x23,0x18,0x0B,0x19,0x35,0x07,0xDA,0x0F,0x00,0x19,0x6B, + 0x07,0x28,0xF4,0x0A,0x00,0x19,0xD0,0x07,0x29,0xC5,0x2F,0x88,0x00,0x07,0x14,0x23,0xC4,0x00,0x07,0x3F,0x00,0xA4,0x42,0x14,0xCF,0x09,0xAE,0x07,0x0F,0xD3,0x00,0x19, + 0x40,0x07,0x00,0x20, +}; +uint8_t tileset_tile_9_compressed[53] = { + 0x10,0x29,0x10,0x07,0x00,0x00,0x53,0x00,0xAA,0x07,0x19,0x00,0xE2,0x0B,0x05,0x07,0x23,0x23,0x18,0xC5,0x0B,0xDC,0x07,0x00,0xF2,0x07,0xF3,0x12,0x00,0xC0,0x07,0xA7, + 0x2F,0x16,0x00,0x23,0x8E,0x00,0x43,0x07,0xCD,0x00,0x19,0x42,0x14,0x1F,0x07,0x73,0x00,0xC0,0x07,0x00,0x20, +}; +uint8_t tileset_tile_10_compressed[53] = { + 0x10,0x29,0x10,0x07,0x00,0x00,0x53,0x00,0xAA,0x07,0x19,0x00,0xE2,0x0B,0x05,0x07,0x23,0x23,0x18,0xC5,0x0B,0xDC,0x07,0x00,0xF2,0x07,0xF3,0x12,0x00,0xC0,0x07,0xA7, + 0x2F,0x16,0x00,0x23,0x8E,0x00,0x43,0x07,0xCD,0x00,0x19,0x42,0x14,0x1F,0x07,0x73,0x00,0xC0,0x07,0x00,0x20, +}; +uint8_t tileset_tile_11_compressed[67] = { + 0x10,0x29,0x10,0x07,0x00,0x00,0x53,0x00,0xAA,0x07,0x19,0x00,0xE6,0x0B,0x07,0x05,0x02,0x19,0x23,0x23,0x18,0xCD,0x0B,0x07,0x25,0x0F,0xCC,0x00,0x07,0x02,0x97,0x1A, + 0x00,0x9A,0x07,0x05,0x48,0x2F,0xA2,0x00,0x02,0x23,0x30,0x00,0x14,0x02,0x46,0x07,0xC7,0x00,0xFA,0x0F,0x3F,0x43,0x14,0xEE,0x08,0x07,0x7B,0x0F,0x00,0x97,0x07,0x4F, + 0x80,0x00,0x40, +}; +uint8_t tileset_tile_12_compressed[46] = { + 0x10,0x20,0x10,0x00,0x21,0x49,0x00,0x09,0x07,0xA6,0x00,0x0E,0x55,0x16,0x00,0xA7,0x04,0x09,0x0E,0x8B,0x0F,0xA4,0x08,0x12,0x53,0x0F,0x09,0x08,0x45,0x12,0x64,0x0F, + 0x06,0x09,0x12,0x57,0x0F,0x05,0x19,0x0F,0x71,0x3B,0x70,0x0F,0x00,0x08, +}; +uint8_t tileset_tile_13_compressed[47] = { + 0x10,0x22,0x10,0x00,0x57,0x00,0x07,0x00,0x14,0x0C,0x16,0x39,0x09,0x16,0x00,0xDC,0x0D,0x12,0x00,0x4E,0x0F,0x0D,0x09,0x8A,0x0F,0xB8,0x1C,0xAB,0x0F,0x0E,0x8A,0x0F, + 0x11,0x07,0x0F,0x09,0x7C,0x0F,0x0E,0x6A,0x0F,0x09,0x07,0xE8,0x0F,0x00,0x04, +}; +uint8_t tileset_tile_14_compressed[48] = { + 0x10,0x2D,0x10,0x07,0x00,0x00,0x12,0x00,0x16,0xC9,0x00,0x09,0x16,0xE7,0x12,0x0F,0x7C,0x12,0x00,0x11,0x6B,0x0F,0x09,0x11,0x8E,0x0F,0xB8,0x22,0xCB,0x0F,0x10,0x8C, + 0x0F,0x11,0x09,0x0F,0x07,0xDC,0x0F,0x10,0x72,0x0F,0x09,0x06,0xF8,0x0F,0x00,0x04, +}; +uint8_t tileset_tile_15_compressed[41] = { + 0x10,0x20,0x10,0x00,0x7E,0x00,0x4C,0x07,0x00,0x09,0x99,0x0F,0x16,0xAC,0x00,0x09,0x03,0x12,0x09,0x8E,0x0F,0xE3,0x10,0xB8,0x0F,0x10,0xF4,0x0F,0x09,0x77,0x0F,0x01, + 0x1D,0x0F,0xC7,0x02,0x70,0x0F,0x03,0x00,0x08, +}; +uint8_t tileset_tile_16_compressed[126] = { + 0x10,0x35,0x10,0x4B,0x00,0x1F,0xA6,0x03,0x04,0x08,0x98,0x04,0x04,0x3B,0xE6,0x10,0x0D,0x63,0x04,0x00,0x1F,0x1F,0x3B,0x0F,0x0A,0x1F,0x03,0x04,0x03,0x11,0x7F,0x1C, + 0x0A,0x0B,0x1E,0xA8,0x16,0x03,0x08,0x03,0x1F,0x9B,0x10,0x06,0xAF,0x0A,0x0E,0x24,0xBA,0x21,0x03,0xAF,0x2D,0x34,0x26,0xBF,0x1E,0x00,0x07,0xBE,0x44,0x11,0xBA,0x00, + 0x08,0x2D,0xAA,0x0D,0x2E,0xBA,0x3B,0x06,0xEF,0x10,0x6E,0x4D,0xFB,0x09,0x00,0x13,0xE4,0x0B,0x08,0xEF,0x4A,0x13,0x03,0x9A,0x1C,0x5B,0x00,0x50,0xB0,0xA9,0xB0,0x8A, + 0xA9,0x6B,0x25,0x42,0x21,0xEE,0x00,0x30,0xEF,0x74,0x2C,0x06,0x9A,0x07,0xE4,0x24,0x1C,0xAB,0x0E,0x07,0xBE,0x4F,0x11,0x6A,0x5A,0x1B,0xE0,0x0D,0x00,0x10, +}; +uint8_t tileset_tile_17_compressed[98] = { + 0x10,0x22,0x10,0x00,0x5C,0x00,0x20,0x00,0x60,0x0D,0x39,0x39,0x3E,0xE7,0x10,0x16,0xAF,0x0D,0x0E,0x00,0xDB,0x0A,0x20,0x04,0x39,0x11,0x96,0x1E,0xAF,0x0F,0x0E,0x00, + 0xAB,0x23,0x20,0xB5,0x19,0x3E,0xDD,0x05,0x0E,0xD4,0x10,0x39,0x92,0x06,0xC9,0x00,0x09,0x39,0x0E,0x3F,0x3F,0x69,0x05,0x00,0xEA,0x0B,0x02,0x7B,0x77,0x10,0xA8,0x01, + 0xA0,0x89,0xD1,0x02,0x45,0x5C,0x0F,0x00,0x77,0x0F,0x50,0xFC,0x2E,0x10,0x59,0x43,0x0E,0x33,0x0D,0x44,0x45,0xD5,0x10,0x1E,0xA2,0x10,0x20,0xAE,0x20,0x00,0x58,0x0E, + 0x00,0x04, +}; +uint8_t tileset_tile_18_compressed[105] = { + 0x10,0x21,0x10,0x00,0x45,0x00,0x04,0x45,0x00,0x84,0x0D,0x05,0x01,0x01,0x05,0x47,0x11,0x0D,0x2A,0x00,0x01,0x57,0x10,0x04,0x1A,0x19,0x10,0xD4,0x0F,0x10,0xB7,0x03, + 0x0F,0xCF,0x0E,0x2F,0xDA,0x41,0x10,0x01,0x2C,0x2F,0x01,0x1F,0x39,0x00,0x03,0x05,0xF2,0x2F,0x08,0x03,0x1C,0xD3,0x2F,0x01,0x56,0x00,0x0A,0x0F,0x03,0xF9,0x05,0x06, + 0xD7,0x03,0x03,0x0F,0x73,0x1F,0x52,0x04,0x0F,0x1F,0xA5,0x10,0x1F,0xBC,0x0E,0x4F,0x00,0x1C,0xEE,0x06,0x12,0xEE,0x05,0x0E,0xBF,0x10,0x00,0x0B,0x00,0xAE,0x06,0x2D, + 0x55,0x00,0x1F,0xCB,0x0B,0x1C,0x00,0x00,0x80, +}; +uint8_t tileset_tile_19_compressed[130] = { + 0x10,0x24,0x10,0x00,0x00,0x6D,0x2C,0x00,0x33,0x00,0x00,0x30,0x00,0x33,0x2C,0x36,0xCD,0x00,0x2C,0x19,0x12,0x2C,0x37,0x1C,0x0D,0x79,0x0F,0x03,0x28,0x33,0x3A,0x1D, + 0x28,0x4B,0x0E,0x0F,0xEB,0x26,0x08,0x01,0xEF,0x00,0x0F,0x30,0xEE,0x1E,0x07,0xFF,0x0F,0x00,0x38,0x25,0xEE,0x0F,0x09,0xE4,0x0C,0x03,0x27,0x29,0x35,0x0F,0xFC,0x37, + 0x0E,0x01,0x29,0x19,0xBE,0x0F,0x26,0xEB,0x03,0x0E,0x0F,0x2B,0x29,0x33,0x0B,0x02,0xAF,0x39,0x1A,0x02,0xFF,0x00,0x0F,0x10,0x00,0xFA,0x0E,0x27,0x09,0x95,0x0F,0x2C, + 0x69,0x11,0x29,0x89,0x0F,0x35,0x29,0xAA,0x09,0x05,0xD5,0x0E,0x00,0x10,0x2C,0x19,0x9F,0x0E,0x0F,0x10,0x77,0x11,0x28,0x2F,0x0E,0x00,0x7F,0x22,0x5C,0x0B,0x24,0x0D, + 0x00,0x02, +}; +uint8_t tileset_tile_20_compressed[134] = { + 0x10,0x30,0x10,0x4B,0x00,0x1F,0x03,0x05,0x05,0x1F,0x04,0x01,0x04,0x04,0x00,0xE3,0x04,0x0D,0x4B,0x1C,0x1C,0x0D,0xB7,0x0A,0x01,0x05,0xB5,0x01,0x1F,0x0D,0x1C,0x7A, + 0x1F,0x09,0x20,0x04,0xEB,0x16,0x0D,0x00,0xAB,0x0E,0x0B,0xFA,0x04,0x02,0x0F,0xFE,0x1A,0x02,0x12,0x65,0x23,0x1C,0xA4,0x3D,0x03,0x4C,0xAF,0x3D,0x0A,0x3F,0xFF,0x1C, + 0x15,0x1E,0x11,0xEC,0x0E,0x13,0x1F,0x1F,0xBE,0x47,0x02,0xEF,0x60,0x12,0x0F,0xFB,0x2C,0x37,0x5C,0x97,0x33,0x0E,0xF9,0x2F,0x00,0x6E,0x12,0x22,0xAE,0x4D,0x01,0x4E, + 0x0F,0x19,0xBF,0x6F,0x2E,0x01,0x0F,0xBB,0x12,0x48,0xBE,0x0F,0x31,0x7B,0x21,0x7F,0xFB,0x40,0x05,0x52,0x95,0x22,0x01,0x2F,0x7E,0x00,0x72,0x06,0xDD,0x0F,0x6A,0xDF, + 0x12,0x0E,0x01,0x00,0x00,0x80, +}; +uint8_t tileset_tile_21_compressed[133] = { + 0x10,0x03,0x10,0x05,0x04,0x05,0x01,0x05,0x04,0x61,0x01,0x06,0x05,0x03,0x1F,0x4B,0xDE,0x00,0x0D,0x0C,0x01,0xF1,0x05,0x04,0x1C,0x1C,0x4B,0xAE,0x11,0x05,0x0E,0xEB, + 0x0F,0x1F,0x07,0x3B,0x1C,0x1F,0x08,0x0D,0xAA,0x21,0x0F,0xF9,0x00,0x22,0x3D,0x0D,0x22,0x0C,0x01,0xFC,0x01,0x02,0x20,0xBF,0x3B,0x01,0x26,0xFF,0x0F,0x1B,0x0F,0x26, + 0x2D,0x0E,0xFC,0x3D,0x1F,0x3F,0xBF,0x1B,0x0E,0x0D,0x6E,0x1E,0x1F,0x0F,0xF9,0x00,0x08,0x56,0x54,0x03,0x0F,0x04,0x9E,0x61,0xBA,0x4F,0x10,0x2E,0xBB,0x39,0x10,0xBE, + 0x01,0x5F,0xEF,0x36,0x0C,0x02,0xFB,0x2E,0x01,0x7F,0x4C,0x39,0x1D,0x03,0xBB,0x0F,0x19,0x95,0x2E,0x03,0x72,0x6F,0xD7,0x0F,0x09,0x00,0x28,0x80,0x5C,0x45,0x92,0x2A, + 0x70,0x00,0x0F,0x00,0x08, +}; +uint8_t tileset_tile_22_compressed[126] = { + 0x10,0x28,0x10,0x4B,0x00,0x03,0x05,0x0F,0x05,0x04,0x01,0x04,0x04,0x00,0xE8,0x04,0x0E,0x1F,0x4B,0xED,0x0D,0x0A,0x01,0xF7,0x05,0x01,0x0F,0x5E,0x1F,0x09,0x20,0x04, + 0xBA,0x16,0x0D,0xEA,0x00,0x0E,0xFE,0x0B,0x04,0x02,0xBF,0x3D,0x1A,0x02,0x12,0x9B,0x23,0x0F,0xF9,0x3D,0x0D,0x2B,0x4C,0x3D,0x0A,0xBF,0x1F,0x15,0x1E,0xFB,0x11,0x0E, + 0x13,0xEF,0x0F,0x47,0x02,0xBB,0x60,0x12,0xAE,0x1F,0x0E,0xEE,0x38,0x12,0xFB,0x1F,0x5D,0x0E,0x92,0x12,0xEA,0x22,0x4D,0xE4,0x01,0x0F,0xEB,0x19,0x6F,0x2E,0xFB,0x01, + 0x0F,0x12,0xBB,0x48,0x0F,0xE7,0x31,0x21,0xBB,0x7F,0x6F,0xB9,0x52,0x52,0x22,0x01,0xF7,0x7E,0x00,0x06,0x2D,0x0F,0xDD,0x6A,0x12,0xF0,0x0E,0x01,0x00,0x08, +}; +uint8_t tileset_tile_23_compressed[122] = { + 0x10,0x03,0x10,0x05,0x04,0x05,0x01,0x05,0x04,0x62,0x01,0x06,0x05,0x03,0x4B,0xAF,0x00,0x0D,0x0C,0x7D,0x01,0x05,0x04,0xF7,0x0E,0x0F,0x0E,0x76,0x0F,0x1F,0x3D,0xFB, + 0x0F,0x08,0x0D,0xAA,0x21,0x0F,0xF9,0x00,0x0F,0x3D,0x0D,0x22,0x0C,0x01,0xFC,0x01,0x02,0x0F,0xBF,0x3B,0x01,0x26,0xDF,0x0F,0x41,0x26,0x2F,0x0E,0x20,0xDC,0x29,0x1F, + 0xB5,0x1B,0x71,0x5C,0x72,0x00,0x97,0x5F,0x0C,0x2D,0x54,0xF3,0x1F,0x0C,0xD7,0x61,0x4F,0x10,0x57,0x2E,0x39,0x77,0x10,0x01,0xDD,0x0F,0x36,0xFF,0x0C,0x02,0x2E,0x01, + 0x73,0x7F,0xFD,0x1D,0x2D,0x02,0xCD,0x7F,0x10,0xCE,0x0D,0x8F,0x17,0x79,0xCA,0x00,0x80,0x12,0x5C,0x2E,0x2A,0x9C,0x00,0x0F,0x00,0x02, +}; +uint8_t tileset_tile_24_compressed[29] = { + 0x10,0x05,0x10,0x07,0x18,0x18,0x14,0xA6,0x00,0x19,0x07,0x54,0x07,0x00,0x65,0x07,0x5A,0x17,0x0B,0x19,0x68,0x07,0xF8,0x2F,0x0B,0xF8,0x3F,0x00,0x04, +}; +uint8_t tileset_tile_25_compressed[27] = { + 0x10,0x05,0x10,0x19,0x18,0x18,0x14,0xCE,0x00,0x07,0x07,0xA8,0x00,0xBB,0x07,0x17,0xB9,0x0B,0xE3,0x07,0xE0,0x2F,0x2F,0xE0,0x3F,0x00,0x10, +}; +uint8_t tileset_tile_26_compressed[27] = { + 0x10,0x05,0x10,0x19,0x18,0x18,0x14,0xCE,0x00,0x07,0x07,0xA8,0x00,0xBB,0x07,0x17,0xB9,0x0B,0xE3,0x07,0xE0,0x2F,0x2F,0xE0,0x3F,0x00,0x10, +}; +uint8_t tileset_tile_27_compressed[33] = { + 0x10,0x05,0x10,0x19,0x18,0x18,0x14,0xCA,0x00,0x07,0x19,0x2A,0x02,0x07,0x00,0xE5,0x0F,0x07,0xEE,0x0F,0x17,0xE6,0x0B,0x07,0x47,0x02,0xC0,0x2F,0x5F,0xC0,0x3F,0x00, + 0x20, +}; +uint8_t tileset_tile_28_compressed[51] = { + 0x10,0x1A,0x10,0x02,0x12,0x00,0x09,0x9A,0x03,0x16,0x00,0x09,0xE0,0x03,0x76,0x0F,0x26,0x0F,0x09,0x00,0x95,0x0F,0x0F,0x1A,0x0F,0x0F,0x87,0x04,0x0F,0x0F,0x07,0x07, + 0x5F,0x0F,0x0B,0x71,0x10,0x15,0x0F,0x0E,0x71,0x10,0x09,0x0F,0x09,0xA6,0x10,0x00,0x80,0x00,0x40, +}; +uint8_t tileset_tile_29_compressed[76] = { + 0x10,0x03,0x10,0x09,0x0F,0x0F,0x09,0x12,0x00,0xB5,0x03,0x07,0xCF,0x00,0x0F,0x77,0x0A,0x00,0x2C,0x0F,0xF3,0x0C,0x44,0x0F,0xDC,0x0D,0x0F,0x55,0x1C,0xC6,0x0F,0xA3, + 0x0E,0x09,0x78,0x0D,0x0E,0xE8,0x00,0xD8,0x1D,0xF2,0x37,0x0A,0x0B,0x2F,0x0E,0x0D,0xE2,0x00,0xB8,0x0E,0x0C,0xCA,0x0F,0x1D,0x45,0x0A,0xD9,0x2D,0x0E,0x12,0x0B,0x17, + 0x1E,0xF1,0x0E,0x03,0x0E,0x76,0x0F,0x00,0xE0,0x41,0x00,0x10, +}; +uint8_t tileset_tile_30_compressed[79] = { + 0x10,0x2D,0x10,0x07,0x00,0x12,0xAC,0x00,0x09,0x03,0x0F,0x0F,0x49,0x09,0x00,0x51,0x12,0x92,0x0F,0x46,0x12,0xD4,0x0F,0x11,0x75,0x0F,0x46,0x22,0xDF,0x0F,0x10,0x04, + 0x1B,0x11,0xC7,0x01,0x47,0x00,0x09,0x20,0x09,0x0B,0x0A,0x62,0x27,0x34,0x0F,0x00,0x0A,0x5A,0x10,0x0B,0xE3,0x00,0x17,0x21,0x0A,0x21,0x3E,0x0F,0x1F,0x12,0xE2,0x10, + 0xFE,0x20,0x0B,0x10,0x2E,0x20,0xD6,0x3D,0x0F,0xA7,0x13,0x40,0x7F,0x00,0x20, +}; +uint8_t tileset_tile_31_compressed[51] = { + 0x10,0x35,0x10,0x16,0x00,0x09,0xBB,0x03,0x12,0x00,0x03,0x40,0x02,0xDE,0x0F,0x09,0x99,0x00,0x0F,0x1E,0x0F,0x0F,0x8F,0x0F,0x43,0x0F,0xC2,0x0F,0x07,0x07,0x0F,0x2E, + 0x0F,0xB8,0x0E,0x00,0x99,0x0F,0x32,0x0E,0x00,0x02,0x07,0x7B,0x00,0x0D,0xD0,0x42,0x02,0x00,0x08, +}; +uint8_t tileset_tile_32_compressed[59] = { + 0x10,0x21,0x10,0x4B,0x62,0x00,0x0E,0x0E,0x26,0x05,0xE7,0x07,0x00,0x8D,0x0D,0xE7,0x00,0x0E,0x8F,0x0F,0x25,0x15,0x15,0x05,0x94,0x0E,0x15,0x08,0xFF,0x00,0x0B,0x00, + 0x05,0x97,0x1D,0x07,0x9E,0x00,0x78,0x1E,0xC8,0x0F,0xAE,0x10,0x3F,0x12,0x0F,0xE1,0x0E,0xDE,0x0F,0x10,0x19,0x4F,0x8E,0x6F,0x80,0x00,0x40, +}; +uint8_t tileset_tile_33_compressed[42] = { + 0x10,0x23,0x10,0x4B,0x89,0x00,0x0E,0x0E,0x67,0x05,0x07,0x82,0xF5,0x00,0x15,0x5D,0x02,0x03,0xDA,0x04,0x06,0x08,0xAE,0x02,0x03,0xEE,0x04,0x06,0x0C,0x90,0x00,0x15, + 0x42,0x1D,0x3A,0x87,0x61,0x41,0xA8,0x1E,0x00,0x04, +}; +uint8_t tileset_tile_34_compressed[52] = { + 0x10,0x23,0x10,0x4B,0x89,0x00,0x0E,0x0E,0xE7,0x05,0x0F,0x9E,0x00,0x3E,0x0F,0x78,0x29,0xD6,0x10,0x15,0x05,0x15,0xB9,0x03,0xDA,0x0F,0x08,0x0D,0x08,0x59,0x03,0x79, + 0x10,0x08,0xE5,0x00,0x21,0x89,0x0F,0x43,0x15,0xB3,0x0F,0xC1,0x3F,0xBC,0x0F,0x2D,0x5F,0x00,0x00,0x80, +}; +uint8_t tileset_tile_35_compressed[96] = { + 0x10,0x2D,0x10,0x00,0x00,0x20,0x25,0x00,0xCA,0x09,0x0D,0x26,0x34,0x2B,0x2B,0x02,0x26,0xD6,0x11,0x0D,0x2B,0x9E,0x10,0x7B,0x0E,0x10,0xED,0x00,0x10,0x20,0x3D,0x0E, + 0x73,0x1F,0x01,0xCE,0x1E,0x1F,0x27,0xD3,0x0F,0x26,0x4F,0x1D,0x0F,0x72,0x0B,0xF2,0x10,0x0B,0xDC,0x1F,0x0B,0xB5,0x0E,0x0F,0xCF,0x05,0x00,0x2D,0x1F,0xAE,0x0F,0x20, + 0x02,0xEE,0x1E,0x0F,0xF9,0x09,0x01,0x8B,0x0E,0x27,0x00,0x11,0xB9,0x0B,0xBE,0x0E,0x0F,0x10,0x6E,0x00,0x09,0xF8,0x0F,0x10,0xA9,0x00,0x42,0xE0,0x2E,0x0D,0x00,0x01, +}; +uint8_t tileset_tile_36_compressed[97] = { + 0x10,0x05,0x10,0x1F,0x03,0x04,0x04,0x78,0x02,0x03,0x00,0x01,0x01,0x04,0xCE,0x02,0x4B,0x4B,0x08,0x7B,0x11,0x13,0xFB,0x0F,0x10,0x0E,0xBB,0x00,0x12,0xBB,0x0F,0x21, + 0x4D,0x04,0x14,0x4B,0x0F,0x1C,0x0A,0x9E,0x03,0xEE,0x0E,0x28,0xEE,0x0B,0x27,0xE6,0x0E,0x4B,0xBB,0x05,0x0F,0x9B,0x0E,0x00,0x47,0x37,0x88,0x0F,0x3C,0x3C,0x03,0xE4, + 0x0F,0x3C,0xF3,0x3F,0x91,0x10,0x4B,0x1F,0x84,0x10,0x37,0x4B,0xD3,0x10,0xAE,0x11,0x4B,0x10,0x2B,0x11,0x0E,0x96,0x11,0xE6,0x12,0xAF,0x09,0x27,0x11,0x12,0x80,0x00, + 0x40, +}; +uint8_t tileset_tile_37_compressed[97] = { + 0x10,0x0D,0x10,0x01,0x01,0x04,0x02,0x03,0xBF,0x00,0x04,0x00,0x03,0x02,0x5C,0x4B,0x0B,0x46,0x0D,0x0E,0x4B,0x96,0x0C,0xF3,0x00,0x07,0x03,0x1F,0x0F,0x9A,0x0A,0xED, + 0x04,0x1E,0x4B,0x73,0x0C,0xA5,0x03,0x1C,0x0F,0xB9,0x39,0x2E,0x05,0x10,0xD3,0x26,0x04,0xF6,0x53,0x10,0x0F,0x37,0x92,0x0E,0x61,0x20,0x03,0x3C,0x3C,0x18,0x0F,0x3C, + 0x8F,0x0F,0x8B,0x0E,0xA4,0x0F,0x37,0x66,0x0E,0x90,0x11,0x56,0x0D,0x0E,0x4B,0x8A,0x0D,0xB9,0x0E,0x42,0xAF,0xEE,0x0C,0x0D,0x6B,0x0F,0x0C,0x97,0x0D,0x00,0x80,0x00, + 0x40, +}; +uint8_t tileset_tile_38_compressed[110] = { + 0x10,0x05,0x10,0x1F,0x03,0x04,0x04,0x78,0x02,0x03,0x00,0x01,0x01,0x04,0xCE,0x02,0x4B,0x4B,0x08,0x7B,0x11,0x13,0xFB,0x0F,0x10,0x0E,0xBB,0x00,0x12,0xBB,0x0F,0x21, + 0x95,0x23,0x04,0x6B,0x0F,0x1C,0x0A,0x99,0x32,0x05,0x77,0x0E,0x08,0x75,0x0F,0x05,0xF3,0x0F,0x0E,0xFD,0x4B,0x05,0x4E,0xCD,0x0F,0x0E,0x68,0x30,0x05,0x9B,0x0F,0x0C, + 0x45,0x01,0xE1,0x0F,0x8B,0x11,0x0F,0x72,0x10,0xCD,0x1E,0x5F,0xD5,0x00,0x1C,0xF2,0x0E,0x0F,0xAE,0x10,0x01,0x11,0x6D,0x0F,0x10,0x03,0xCD,0x07,0x0E,0x4A,0x0F,0x1F, + 0x11,0x92,0x1D,0x7C,0x2F,0xC0,0x2B,0x09,0x4E,0xEE,0x01,0x00,0x00,0x01, +}; +uint8_t tileset_tile_39_compressed[115] = { + 0x10,0x0D,0x10,0x01,0x01,0x04,0x02,0x03,0xBF,0x00,0x04,0x00,0x03,0x02,0x5C,0x4B,0x0B,0x46,0x0D,0x0E,0x4B,0x96,0x0C,0xF2,0x00,0x07,0x03,0x1F,0xA5,0x0F,0x0A,0xBB, + 0x04,0x1E,0x27,0x4B,0x05,0x2C,0xA5,0x03,0x1C,0xD5,0x0F,0x17,0xDD,0x0B,0x05,0xBB,0x10,0x05,0x50,0x0C,0x9B,0x46,0x10,0xEE,0x0F,0x2A,0x7B,0x10,0x0F,0x34,0x01,0x05, + 0x33,0x04,0x5D,0x0F,0x45,0x00,0xDA,0x0F,0x21,0x04,0x26,0x3F,0xEA,0x00,0x13,0x64,0x0E,0x4B,0xBD,0x0E,0x0A,0x98,0x10,0x1C,0x1F,0xA0,0x4B,0x1D,0xD7,0x40,0x21,0x1D, + 0xCD,0x0F,0x1F,0x22,0x75,0x4B,0xE5,0x00,0x2E,0xAA,0x01,0xF5,0x06,0x3B,0x0E,0x1F,0x80,0x00,0x40, +}; +uint8_t tileset_tile_40_compressed[55] = { + 0x10,0x1A,0x10,0x07,0x18,0x00,0x14,0x93,0x00,0x19,0x3B,0x07,0x07,0x00,0x12,0x45,0x18,0xD2,0x07,0x00,0x02,0x7B,0x07,0x00,0x8B,0x07,0x23,0x00,0x02,0x5A,0x00,0x00, + 0x10,0x07,0x2E,0x00,0x08,0x83,0x0F,0x30,0x2A,0x15,0x2A,0x87,0x02,0x30,0x15,0x90,0x00,0x21,0x38,0x40,0x0F,0x00,0x20, +}; +uint8_t tileset_tile_41_compressed[55] = { + 0x10,0x1A,0x10,0x19,0x18,0x00,0x14,0xA7,0x00,0x07,0x57,0x07,0x00,0x09,0xC5,0x00,0xD2,0x07,0x00,0x02,0x7B,0x07,0x00,0x8F,0x07,0x8B,0x00,0x41,0x07,0x71,0x00,0x10, + 0x15,0x1B,0x00,0x05,0xF0,0x0F,0x80,0x80,0x23,0x10,0x34,0x00,0x0F,0x32,0x65,0x00,0xC4,0x0F,0xD4,0x7C,0x0F,0x00,0x02, +}; +uint8_t tileset_tile_42_compressed[65] = { + 0x10,0x1A,0x10,0x19,0x18,0x00,0x14,0xA7,0x00,0x07,0x57,0x07,0x00,0x09,0xC5,0x00,0xD2,0x07,0x00,0x02,0x7B,0x07,0x00,0x8F,0x07,0x8B,0x00,0x41,0x07,0x72,0x00,0x15, + 0x38,0x00,0x4A,0x24,0x8E,0x00,0x8D,0x5E,0xA5,0x0F,0x2E,0xA6,0x00,0x02,0x06,0x82,0x35,0x0F,0x34,0x76,0x01,0x0F,0x05,0x34,0xB9,0x0F,0x66,0x08,0x16,0x40,0x24,0x00, + 0x20, +}; +uint8_t tileset_tile_43_compressed[56] = { + 0x10,0x1A,0x10,0x19,0x18,0x00,0x14,0xA5,0x00,0x07,0x15,0x19,0x02,0x07,0x00,0xF2,0x09,0x00,0xAE,0x07,0x14,0x0F,0xE2,0x00,0x2E,0x07,0x00,0x3E,0x07,0x28,0x00,0x10, + 0x07,0x8B,0x00,0xE0,0x0E,0x84,0x0F,0x30,0x15,0xA0,0x00,0x21,0x07,0x10,0x2A,0x10,0x15,0x2A,0x10,0x39,0x40,0x0F,0x00,0x20, +}; +uint8_t tileset_tile_44_compressed[79] = { + 0x10,0x05,0x10,0x02,0x07,0x09,0x0F,0xA6,0x00,0x07,0x00,0x4C,0x02,0x10,0x09,0x99,0x00,0x02,0x71,0x21,0x6B,0x0F,0x17,0x10,0x8A,0x0F,0x4B,0x0B,0x10,0x10,0x0F,0x1B, + 0x96,0x10,0x26,0x3F,0x59,0x10,0xF9,0x00,0x3F,0x67,0x10,0x00,0xD7,0x0F,0x1B,0x10,0x14,0x1F,0x1B,0x8C,0x10,0xBA,0x0F,0x10,0x4F,0x17,0x00,0x26,0x0F,0x10,0x17,0x4D, + 0x0A,0x00,0x2F,0x0F,0x10,0x3C,0x00,0xD1,0x0F,0xF0,0x1F,0xC4,0x0F,0x00,0x02, +}; +uint8_t tileset_tile_45_compressed[62] = { + 0x10,0x25,0x10,0x07,0x00,0x48,0x09,0x00,0x0A,0xE5,0x00,0x08,0x4A,0x07,0x0B,0x12,0x8A,0x0F,0x99,0x10,0x09,0x17,0x20,0x71,0x0D,0x9C,0x20,0x00,0x7C,0x10,0xD2,0x5F, + 0xB4,0x62,0x0F,0x0F,0x02,0x72,0x00,0x07,0x1E,0x00,0x47,0x17,0x23,0x00,0x0A,0x91,0x00,0x10,0xC4,0x00,0x02,0x1A,0x62,0x00,0x02,0x1F,0x0F,0x80,0x00,0x40, +}; +uint8_t tileset_tile_46_compressed[74] = { + 0x10,0x34,0x10,0x0A,0x00,0x09,0x89,0x00,0x07,0x72,0x00,0x0E,0x12,0x09,0xF9,0x13,0x0F,0x67,0x16,0x0E,0x9E,0x0F,0xA2,0x11,0xEE,0x1E,0x0D,0x33,0x1E,0x0C,0x8F,0x2D, + 0x44,0x0F,0xD2,0x5C,0x00,0x02,0x39,0x00,0x07,0x0F,0x23,0x00,0x17,0x91,0x00,0x0A,0xC9,0x00,0x10,0x82,0x00,0x02,0x0B,0x0B,0x1B,0xE7,0x00,0x17,0x4D,0x02,0x17,0x3A, + 0x0F,0x1B,0x68,0x4F,0x89,0x0F,0xA0,0x00,0x00,0x10, +}; +uint8_t tileset_tile_47_compressed[93] = { + 0x10,0x26,0x10,0x07,0x00,0x58,0x0F,0x00,0x09,0x07,0x02,0x4D,0x09,0x00,0x34,0x0E,0x5D,0x0F,0x22,0x0E,0x10,0xAD,0x0F,0x0E,0x17,0x13,0x0F,0x22,0x0E,0x0B,0x22,0x0F, + 0x52,0x0E,0x1B,0x02,0x79,0x5F,0x79,0x0E,0x3F,0xE5,0x00,0x0E,0x44,0x17,0xDB,0x1F,0x0E,0x1B,0x0F,0x8C,0x0E,0xA4,0x0F,0x17,0xF7,0x00,0x0E,0x49,0x0F,0x0A,0x97,0x00, + 0x17,0x0E,0x56,0x0F,0x05,0x1B,0x77,0x0B,0x77,0x0E,0x69,0x0F,0x10,0x79,0x00,0x37,0xA6,0x0F,0x4E,0x4E,0x1B,0x0F,0x1B,0x9A,0x00,0x78,0x0F,0x00,0x04, +}; +uint8_t tileset_tile_48_compressed[47] = { + 0x10,0x14,0x10,0x4B,0x0E,0x00,0x15,0x44,0x08,0x42,0x00,0x11,0x0F,0x28,0x10,0x15,0xE8,0x0F,0xD9,0x1F,0x11,0x12,0x3A,0xF1,0x1F,0xA8,0x4F,0x3A,0xF8,0x5F,0x5A,0x0F, + 0x3E,0x5F,0x3F,0x0F,0x0E,0x87,0x78,0x0F,0x10,0x66,0x4F,0x3A,0x6F,0x00,0x01, +}; +uint8_t tileset_tile_49_compressed[20] = { + 0x10,0x20,0x10,0x08,0xA5,0x00,0x15,0x04,0x28,0x1D,0x3A,0x76,0x41,0x1E,0x1E,0x81,0xCE,0x77,0x00,0x01, +}; +uint8_t tileset_tile_50_compressed[45] = { + 0x10,0x22,0x10,0x08,0x0A,0x00,0x15,0x0E,0x00,0x46,0x4B,0xC7,0x0E,0x91,0x0F,0x4B,0x4B,0xB0,0x2F,0xD4,0x0F,0x7C,0x2F,0x7F,0x4F,0x10,0x04,0xE8,0x0F,0x15,0x67,0x4F, + 0x0F,0x95,0x1D,0x3A,0x0C,0xCD,0x1F,0x1E,0x0B,0xC0,0x5F,0x00,0x20, +}; +uint8_t tileset_tile_51_compressed[96] = { + 0x10,0x20,0x10,0x00,0x91,0x00,0x20,0xC6,0x00,0x9C,0x0D,0x2B,0x2B,0x03,0x66,0x0E,0x00,0x26,0x98,0x10,0x20,0x26,0xEF,0x1B,0x0E,0x0F,0x4D,0x27,0x1E,0x55,0x0C,0x01, + 0xAF,0x0E,0x26,0x10,0x1E,0xEC,0x07,0x3D,0x27,0x27,0xEF,0x03,0x0F,0x06,0xEF,0x01,0x1E,0x2E,0x97,0x31,0x1D,0xEF,0x1C,0x10,0x07,0xFB,0x00,0x23,0x1F,0xBA,0x4F,0x1A, + 0xA9,0x38,0x2A,0x1F,0x6E,0xBB,0x03,0x1C,0x08,0x97,0x0F,0x26,0xE3,0x0E,0x2E,0x50,0x1A,0xAE,0x05,0x3E,0xD7,0x10,0x27,0x10,0x3C,0x0D,0xF3,0x12,0x40,0x0D,0x00,0x20, +}; +uint8_t tileset_tile_52_compressed[96] = { + 0x10,0x25,0x10,0x00,0x00,0x39,0x29,0x29,0x03,0xEC,0x0A,0x00,0x36,0x36,0xBB,0x05,0x14,0x7A,0x33,0x0A,0x00,0x2C,0x4A,0x02,0x14,0x9B,0x0F,0x0D,0xE7,0x0E,0x0F,0x45, + 0x2C,0x48,0x00,0x0F,0x28,0x88,0x00,0x94,0x0F,0x33,0x28,0x5D,0x33,0x0C,0x4D,0x06,0x0F,0x76,0x09,0x15,0x33,0x85,0x7E,0x2F,0x06,0x02,0xF8,0x04,0x03,0x4F,0x1F,0x9F, + 0x08,0xA9,0x00,0x40,0xB1,0x35,0x35,0xFD,0x24,0x1A,0x05,0x00,0x3E,0x0E,0x0F,0x36,0xBE,0x0F,0x10,0x77,0x0F,0x35,0x2A,0xC5,0x03,0xA7,0x20,0x35,0x0E,0x80,0x00,0x40, +}; +uint8_t tileset_tile_53_compressed[72] = { + 0x10,0x20,0x10,0x00,0x44,0x00,0x54,0x37,0x00,0x5A,0x0E,0x09,0x91,0x00,0x37,0x41,0x0E,0x1B,0x09,0x41,0x41,0x11,0x10,0xFC,0x0E,0x0B,0x0E,0x4F,0x10,0x0F,0xF1,0x0B, + 0x3E,0x2C,0x0F,0x42,0x0B,0x37,0x1B,0x52,0x35,0x04,0x42,0x66,0x0F,0x43,0x1D,0x35,0xCE,0x0F,0x37,0x43,0x0F,0x76,0x10,0x1B,0x0D,0x1B,0x9E,0x0E,0x58,0x10,0xBA,0x0E, + 0x10,0xA8,0x00,0x25,0xB9,0x08,0x00,0x04, +}; +uint8_t tileset_tile_54_compressed[45] = { + 0x10,0x20,0x10,0x00,0x28,0x84,0x00,0x04,0x04,0x01,0x93,0x02,0x9A,0x0D,0x05,0x05,0x0D,0x01,0xEF,0x05,0x11,0x07,0x57,0x01,0x01,0x00,0x7F,0x06,0x11,0x0E,0xC5,0x04, + 0x5C,0x00,0x25,0x57,0x10,0x0A,0xC6,0x21,0xA0,0x0F,0x04,0x00,0x10, +}; +uint8_t tileset_tile_55_compressed[89] = { + 0x10,0x02,0x10,0x00,0x38,0x43,0x38,0x00,0x6B,0x00,0x0A,0x23,0x38,0x40,0x04,0x00,0x38,0x38,0x2F,0x65,0x00,0x0F,0x0F,0x44,0x44,0x48,0x07,0x05,0x96,0x03,0xE4,0x0F, + 0x01,0xFE,0x00,0x15,0x06,0xE4,0x0F,0x1D,0xBB,0x0C,0x05,0x84,0x8E,0x3F,0x46,0x09,0x00,0x4D,0x03,0x04,0x46,0x0A,0x2B,0x1F,0x2F,0x17,0x1E,0xAE,0x07,0x20,0x12,0x1F, + 0x8E,0x00,0x5C,0x10,0x03,0xD2,0x00,0x61,0x0A,0xC4,0x13,0x0F,0xC7,0x0A,0x87,0xDF,0x04,0xA7,0x15,0x10,0x0F,0xB8,0x0A,0x00,0x04, +}; +uint8_t tileset_tile_56_compressed[48] = { + 0x10,0x00,0x10,0x00,0x00,0x02,0x30,0x2A,0x15,0x2A,0x0A,0x10,0x07,0x30,0x15,0x00,0x20,0x21,0x07,0x20,0xE9,0x0F,0x08,0x07,0x16,0x0F,0x21,0xF7,0x00,0x0F,0x2A,0x04, + 0xC5,0x00,0x20,0x0F,0x15,0xDC,0x0F,0x10,0x02,0xB9,0x00,0x78,0x05,0x06,0x00,0x04, +}; +uint8_t tileset_tile_57_compressed[59] = { + 0x10,0x02,0x10,0x02,0x32,0x32,0x07,0x34,0x66,0x00,0x07,0x0B,0x02,0xB4,0x0F,0x2E,0xD0,0x00,0x4F,0x0F,0x3C,0x00,0xD1,0x0F,0x7E,0x00,0x0F,0x15,0x24,0x44,0x32,0xE4, + 0x01,0x0E,0x30,0x15,0x5E,0x10,0x0F,0x15,0xA8,0x0F,0x99,0x00,0x23,0x2F,0x38,0x0F,0x03,0x3D,0x0F,0x8E,0x00,0x47,0x10,0x40,0x00,0x00,0x20, +}; +uint8_t tileset_tile_58_compressed[53] = { + 0x10,0x05,0x10,0x24,0x02,0x2E,0x34,0x16,0x01,0x02,0x02,0x05,0x34,0x38,0x02,0x24,0x0F,0xCF,0x00,0x0F,0x18,0xB4,0x00,0x02,0xD0,0x06,0x45,0x0F,0x1A,0x3F,0x15,0x46, + 0x24,0x23,0x00,0x15,0xD1,0x00,0x2A,0xC8,0x00,0x21,0x13,0x91,0x00,0x02,0xC8,0x00,0x10,0xE8,0x00,0x00,0x04, +}; +uint8_t tileset_tile_59_compressed[46] = { + 0x10,0x0A,0x10,0x07,0x30,0x15,0x00,0x00,0x21,0x07,0x10,0x2A,0x15,0x2A,0x10,0x02,0x81,0xF5,0x0F,0x07,0x17,0x0F,0x52,0x05,0x17,0x0F,0x2A,0x21,0x00,0xDD,0x0F,0x04, + 0xA0,0x0F,0x15,0xF7,0x0F,0x73,0x92,0x00,0x5A,0x06,0x0E,0x80,0x00,0x40, +}; +uint8_t tileset_tile_60_compressed[72] = { + 0x10,0x0B,0x10,0x02,0x17,0x1B,0x00,0x26,0x17,0x0A,0x00,0x82,0x02,0x0F,0x0B,0x17,0x3B,0x0F,0x10,0x8E,0x0F,0xE2,0x10,0xD7,0x0F,0x0A,0x10,0x17,0x0F,0x24,0x10,0x42, + 0x0F,0x10,0x64,0x10,0x02,0xC9,0x00,0x10,0x62,0x10,0x12,0x1F,0x00,0xC4,0x10,0xCB,0x0F,0x10,0x15,0x0F,0x7C,0x10,0x0F,0xE9,0x00,0x00,0x63,0x10,0x2E,0x0F,0x10,0x74, + 0x00,0x00,0xD3,0x10,0xC0,0x00,0x00,0x20, +}; +uint8_t tileset_tile_61_compressed[33] = { + 0x10,0x11,0x10,0x02,0x1A,0x88,0x00,0x02,0x1C,0x11,0x0F,0x17,0x90,0x00,0x8A,0x0F,0x0A,0x32,0x00,0x11,0x0F,0x46,0x0B,0x21,0x00,0x02,0xF4,0x00,0x10,0x74,0x00,0x00, + 0x02, +}; +uint8_t tileset_tile_62_compressed[58] = { + 0x10,0x26,0x10,0x0A,0x00,0x18,0x1B,0x16,0x0F,0x00,0x16,0x1B,0x1B,0x88,0x0F,0xEE,0x0D,0x02,0x18,0x0F,0x29,0x0B,0x09,0x00,0x0B,0xC5,0x05,0x71,0x0F,0x0D,0x73,0x0F, + 0x44,0x00,0xFC,0x0F,0x20,0x02,0x22,0x1F,0x02,0x8E,0x00,0x41,0x0A,0x72,0x00,0x17,0x1E,0x00,0x8F,0x5F,0x47,0x10,0x40,0x00,0x00,0x20, +}; +uint8_t tileset_tile_63_compressed[107] = { + 0x10,0x06,0x10,0x1B,0x1B,0x16,0x0F,0x00,0x16,0x16,0x1B,0x17,0x1B,0x00,0x17,0x76,0x02,0x03,0x0D,0x1B,0x8C,0x0F,0x45,0x1B,0x01,0x0F,0x09,0x0B,0x09,0x09,0x16,0x0B, + 0xDE,0x00,0x0F,0x0E,0x0B,0xA2,0x0F,0x16,0x09,0xEF,0x11,0x0F,0x0E,0xD3,0x0F,0x0B,0x77,0x00,0x0F,0x0E,0x77,0x1F,0x31,0x76,0x0F,0x0E,0x0A,0x89,0x1F,0x93,0x0E,0x0F, + 0x9E,0x00,0x62,0x0E,0x10,0x0A,0x64,0x00,0x17,0xB1,0x0E,0x52,0x0F,0x22,0x0E,0x00,0x25,0x0F,0x0E,0x27,0x00,0x17,0x00,0x96,0x0E,0x26,0x0F,0x54,0x0E,0x00,0xF3,0x5F, + 0x13,0x0E,0x00,0x10,0xCA,0x00,0x0E,0x00,0x80,0x00,0x40, +}; +uint8_t tileset_tile_64_compressed[53] = { + 0x10,0x14,0x10,0x4B,0x0E,0x00,0x15,0x44,0x08,0x42,0x00,0x13,0x0F,0xC1,0x10,0xBC,0x0F,0x3F,0x5F,0x68,0x0F,0x0E,0x49,0x6F,0x15,0x2F,0x03,0x0F,0x2A,0x21,0x15,0xAE, + 0x02,0x03,0x79,0x0F,0xFE,0x00,0x0E,0x00,0x3F,0x0F,0x00,0x8F,0x0F,0xB9,0x11,0xE3,0x05,0x60,0x00,0x00,0x10, +}; +uint8_t tileset_tile_65_compressed[44] = { + 0x10,0x20,0x10,0x08,0xA5,0x00,0x15,0x04,0x28,0x1D,0x3A,0x75,0x41,0x3A,0x04,0x95,0x66,0x00,0x24,0x06,0x9A,0x03,0x02,0x0E,0x97,0x00,0x15,0x06,0x7C,0x03,0x02,0x18, + 0x2A,0x00,0x4B,0x00,0x25,0x07,0x4B,0x1D,0x00,0x00,0x00,0x80, +}; +uint8_t tileset_tile_66_compressed[59] = { + 0x10,0x22,0x10,0x08,0x0A,0x00,0x15,0x0E,0x00,0x46,0x4B,0xC7,0x0E,0x91,0x0F,0x4B,0x4B,0xB0,0x2F,0xD4,0x0F,0x7C,0x2F,0x7C,0x4F,0x7A,0x6F,0x08,0x75,0x1F,0x15,0x44, + 0x00,0xF6,0x3F,0x0B,0x07,0x15,0x9B,0x3D,0x00,0x45,0x0E,0xC7,0x00,0x7C,0x0F,0x0D,0x00,0x6D,0x0D,0xCF,0x0F,0x05,0x0A,0xC0,0x00,0x00,0x20, +}; +uint8_t tileset_tile_67_compressed[44] = { + 0x10,0x19,0x10,0x4B,0x0E,0x00,0x15,0x08,0x12,0x00,0x0E,0x86,0x64,0x0F,0x06,0x8E,0x1E,0xD6,0x14,0x15,0x0E,0x3A,0x9B,0x1D,0x07,0x84,0x62,0x00,0xB8,0x2E,0x1E,0x33, + 0x00,0x43,0x15,0xF0,0x1D,0xFC,0x58,0x37,0x1E,0x00,0x00,0x80, +}; +uint8_t tileset_tile_68_compressed[40] = { + 0x10,0x22,0x10,0x08,0x4D,0x00,0x15,0x0E,0x00,0x4B,0x1C,0x0F,0x0E,0x86,0xB8,0x0F,0x10,0xB5,0x0F,0x3A,0xE8,0x10,0x00,0x08,0x6F,0x00,0x1D,0x83,0x38,0x00,0x22,0x53, + 0x43,0x3A,0xB0,0x41,0xD4,0x1E,0x00,0x02, +}; +uint8_t tileset_tile_69_compressed[112] = { + 0x10,0x22,0x10,0x4B,0x59,0x00,0x04,0x00,0x05,0x04,0x12,0x0D,0x03,0x34,0x03,0x05,0x0E,0x05,0x49,0x0F,0x05,0x01,0xF2,0x0E,0x03,0x28,0x0B,0x1F,0x2B,0x01,0x01,0xE4, + 0x02,0x0F,0xFE,0x0C,0x02,0x08,0xAB,0x1D,0x03,0x12,0xBF,0x1D,0x02,0x1C,0xBF,0x0E,0x0F,0x00,0x9A,0x4B,0xEA,0x0D,0x4E,0xEE,0x1F,0x4A,0x5A,0x00,0x42,0xA4,0x6F,0x1C, + 0x9D,0x1D,0x0B,0xD9,0x2D,0x2F,0x1C,0x03,0xDD,0x0A,0x49,0xF7,0x52,0x31,0x3C,0x72,0x17,0xF3,0x50,0x00,0x27,0x0F,0x05,0x00,0xAA,0x7B,0x2F,0x8C,0x0F,0x90,0xB9,0x27, + 0x00,0x5D,0x1F,0x1F,0xCF,0x4C,0x0F,0xD8,0x5E,0xB8,0x4D,0x7F,0xC0,0x03,0x00,0x20, +}; +uint8_t tileset_tile_70_compressed[84] = { + 0x10,0x11,0x10,0x01,0x05,0x8E,0x00,0x01,0x00,0xA6,0x04,0x0B,0x9A,0x0E,0xF9,0x06,0x03,0xE3,0x09,0xF8,0x2F,0x00,0xD8,0x0D,0xBA,0x27,0x0C,0x49,0x04,0x11,0x3F,0x04, + 0x0E,0x2C,0x10,0xF5,0x00,0x0E,0x3C,0x11,0xEF,0x0D,0x03,0x03,0x09,0x98,0x02,0x04,0x03,0xBD,0x03,0x11,0x03,0x75,0x0C,0x06,0x4B,0x1B,0x05,0x11,0xAA,0x17,0x27,0xBF, + 0x29,0x63,0x0F,0xB9,0x30,0x6E,0x03,0x0F,0xE5,0x48,0x7F,0x8D,0x8B,0x09,0xA3,0x07,0xC2,0xBF,0x00,0x01, +}; +uint8_t tileset_tile_71_compressed[102] = { + 0x10,0x0D,0x10,0x04,0x05,0x04,0x00,0x4B,0x13,0x00,0x84,0x0E,0x05,0x05,0x03,0x03,0x4A,0x11,0x01,0xB8,0x10,0x03,0xC7,0x0F,0x01,0x01,0xCF,0x02,0x11,0x5D,0x0C,0x30, + 0x4F,0x21,0x22,0xDF,0x1A,0x0F,0x10,0xCF,0x00,0x1F,0x57,0x50,0x00,0x37,0x53,0x0E,0x2A,0x20,0x05,0x6E,0x31,0x0D,0xE4,0x31,0x13,0xD5,0x21,0x1C,0x1F,0x25,0x4C,0xEA, + 0x55,0x04,0x03,0x0F,0x96,0x2A,0xFE,0x24,0x00,0x20,0x7B,0x0F,0x12,0x8F,0x0F,0xF4,0x01,0x0F,0x1F,0x4D,0x0F,0x84,0xC5,0x5F,0x0F,0x52,0x6B,0x1F,0x1F,0x38,0x96,0x7D, + 0xC8,0x10,0x1C,0x1F,0x00,0x04, +}; +uint8_t tileset_tile_72_compressed[46] = { + 0x10,0x20,0x10,0x00,0x21,0x49,0x00,0x0C,0x07,0xA6,0x00,0x0E,0x55,0x11,0x00,0xA7,0x04,0x0C,0x0E,0x8B,0x0F,0xA4,0x08,0x22,0x53,0x0F,0x0C,0x08,0x45,0x22,0x64,0x0F, + 0x06,0x0C,0x22,0x57,0x0F,0x05,0x19,0x0F,0x71,0x3B,0x70,0x0F,0x00,0x08, +}; +uint8_t tileset_tile_73_compressed[18] = { + 0x10,0x20,0x10,0x00,0x7E,0x00,0x47,0x07,0x34,0x00,0x11,0x00,0x0C,0x0D,0x70,0x03,0x00,0x08, +}; +uint8_t tileset_tile_74_compressed[18] = { + 0x10,0x20,0x10,0x00,0x7E,0x00,0x47,0x07,0x34,0x00,0x11,0x00,0x0C,0x0D,0x70,0x03,0x00,0x08, +}; +uint8_t tileset_tile_75_compressed[41] = { + 0x10,0x20,0x10,0x00,0x7E,0x00,0x4C,0x07,0x00,0x0C,0x99,0x0F,0x11,0xAC,0x00,0x0C,0x03,0x22,0x0C,0x8E,0x0F,0xE3,0x10,0xB8,0x0F,0x10,0xF4,0x0F,0x0C,0x77,0x0F,0x01, + 0x1D,0x0F,0xC7,0x02,0x70,0x0F,0x03,0x00,0x08, +}; +uint8_t tileset_tile_76_compressed[79] = { + 0x10,0x11,0x10,0x00,0x10,0xA2,0x00,0x02,0x16,0x0F,0x33,0x00,0x0F,0x2C,0x16,0x12,0x00,0x09,0x12,0x97,0x00,0x0F,0x94,0x20,0x09,0x09,0x96,0x06,0x6F,0x1F,0x1E,0x02, + 0xB9,0x0E,0xE4,0x1F,0x0C,0xB8,0x23,0xAB,0x1F,0x06,0x85,0xE1,0x3F,0x18,0x5F,0x94,0x7F,0x07,0x5E,0x00,0x0F,0x07,0xD2,0x1B,0x16,0xA8,0x00,0x0F,0x03,0x02,0x0F,0x84, + 0xA6,0x0F,0x4B,0x5F,0x0F,0x4F,0x0F,0x1B,0x3F,0xC6,0x1D,0x40,0x0F,0x00,0x20, +}; +uint8_t tileset_tile_77_compressed[59] = { + 0x10,0x84,0x11,0x00,0x0F,0xC4,0x00,0x09,0x12,0xB1,0x00,0x09,0x07,0x09,0x67,0x16,0x07,0xA9,0x11,0xA5,0x25,0x07,0x8B,0x1B,0xBB,0x07,0x39,0x8B,0x03,0x8F,0x3F,0x84, + 0x27,0x5F,0x77,0x99,0x07,0x07,0x1C,0x00,0x16,0xA5,0x00,0x0F,0xC2,0x04,0xD7,0x07,0x43,0xF3,0x74,0x00,0xA1,0x07,0x07,0xE8,0x00,0x00,0x04, +}; +uint8_t tileset_tile_78_compressed[59] = { + 0x10,0x84,0x11,0x00,0x0F,0xC4,0x00,0x09,0x12,0xB1,0x00,0x09,0x07,0x09,0x67,0x16,0x07,0xA9,0x11,0xA5,0x25,0x07,0x8B,0x1B,0xBB,0x07,0x39,0x8B,0x03,0x8F,0x3F,0x84, + 0x27,0x5F,0x77,0x99,0x07,0x07,0x1C,0x00,0x16,0xA5,0x00,0x0F,0xC2,0x04,0xD7,0x07,0x43,0xF3,0x74,0x00,0xA1,0x07,0x07,0xE8,0x00,0x00,0x04, +}; +uint8_t tileset_tile_79_compressed[77] = { + 0x10,0x8F,0x00,0x23,0x00,0x0F,0x02,0x00,0x09,0x02,0x09,0x12,0x5B,0x00,0x07,0xFE,0x04,0x0F,0x02,0x59,0x18,0x2A,0x06,0x0F,0xAE,0x14,0x08,0x5A,0x20,0x0F,0x92,0x15, + 0x49,0x12,0xEE,0x1F,0x18,0xE1,0x1F,0x58,0x3F,0x42,0x5F,0x79,0x79,0x91,0x1F,0x07,0x74,0x00,0x0F,0x16,0xA5,0x00,0x0F,0xFA,0x04,0x00,0x22,0x07,0x3C,0x0F,0x07,0x02, + 0xB4,0x46,0x0F,0xD7,0x52,0x0F,0x19,0x3F,0x09,0x40,0x0F,0x00,0x20, +}; +uint8_t tileset_tile_80_compressed[74] = { + 0x10,0x20,0x10,0x4B,0x85,0x00,0x0D,0x72,0x00,0x4C,0x05,0x0E,0x0B,0xA9,0x00,0x6E,0x04,0x12,0xE7,0x09,0x0F,0xE1,0x02,0x8B,0x0F,0x00,0x89,0x0F,0x24,0x0D,0x13,0x00, + 0xE6,0x11,0x5F,0xD2,0x09,0x06,0xCB,0x00,0x1F,0x91,0x0F,0x06,0x0D,0xDC,0x0F,0x10,0x71,0x0F,0x06,0x13,0x1F,0x0F,0x73,0x04,0xDF,0x4F,0x1E,0x02,0xA6,0x01,0x4B,0x20, + 0x97,0x3E,0x04,0x9E,0x0F,0x64,0x5E,0x0D,0x00,0x02, +}; +uint8_t tileset_tile_81_compressed[68] = { + 0x10,0x21,0x10,0x4B,0xF5,0x00,0x0D,0x4F,0x00,0x08,0x6A,0x00,0x0B,0x00,0x89,0x09,0x4B,0x13,0x0F,0x70,0x04,0xB4,0x0F,0x6A,0x34,0x13,0x59,0x00,0x15,0x0B,0x06,0x00, + 0xCB,0x04,0x12,0x73,0x0D,0x5D,0x00,0x10,0x46,0x0D,0x71,0x10,0x04,0x92,0x10,0xDC,0x06,0x15,0x5F,0x18,0x26,0x18,0x16,0x13,0xB4,0x02,0x13,0x6D,0x25,0x46,0x6E,0xA0, + 0x34,0x0D,0x00,0x10, +}; +uint8_t tileset_tile_82_compressed[74] = { + 0x10,0x20,0x10,0x4B,0x85,0x00,0x0D,0x57,0x00,0x04,0xCA,0x00,0x0C,0x0B,0xA9,0x00,0x6A,0x04,0x10,0x7B,0x0A,0x04,0x42,0x0B,0xB2,0x0F,0x4F,0x00,0x0F,0xA4,0x09,0x13, + 0x00,0x4E,0x0D,0x0F,0x06,0x95,0x00,0x13,0x31,0x5F,0x06,0x0D,0x3C,0x0F,0xBA,0x1F,0x09,0x0D,0x3B,0x0F,0x0A,0x8F,0x0F,0x46,0x13,0x2D,0x0F,0x13,0x02,0x13,0x1B,0x4F, + 0xCD,0x04,0x1E,0x3A,0x6F,0x0D,0x78,0x0F,0x00,0x04, +}; +uint8_t tileset_tile_83_compressed[35] = { + 0x10,0x20,0x10,0x08,0xA5,0x00,0x15,0x04,0x28,0x1D,0x3A,0x75,0x41,0x3A,0x02,0x17,0x66,0x00,0x18,0x48,0x0E,0xE3,0x00,0x17,0x30,0x0E,0x10,0x0D,0x23,0x0F,0x4B,0xA0, + 0x0F,0x00,0x10, +}; +uint8_t tileset_tile_84_compressed[41] = { + 0x10,0x20,0x10,0x08,0xA5,0x00,0x15,0x04,0x28,0x1D,0x3A,0x76,0x41,0x78,0x1E,0x2D,0x71,0x43,0x15,0x0E,0x4B,0x15,0x00,0x2C,0x77,0x15,0x0E,0xE2,0x00,0xD7,0x3D,0x0E, + 0x0F,0x1B,0x1E,0x1E,0x1F,0x4B,0x80,0x00,0x40, +}; +uint8_t tileset_tile_85_compressed[122] = { + 0x10,0x00,0x10,0x1C,0x1C,0x03,0x01,0x01,0x04,0x04,0x3E,0x01,0x05,0x00,0x07,0xAB,0x09,0x0E,0x08,0xFE,0x0E,0x01,0x00,0xEE,0x11,0x0F,0xFB,0x10,0x00,0x0F,0xFF,0x07, + 0x0F,0x02,0x06,0xBB,0x08,0x11,0x3B,0x04,0x03,0x0F,0x18,0xBB,0x38,0x00,0xD7,0x0F,0x03,0x2F,0x77,0x0E,0x10,0xDC,0x0D,0x0F,0x97,0x28,0x20,0xDC,0x0C,0x1F,0xB6,0x28, + 0x3A,0x03,0xB7,0x23,0x1F,0x06,0x2F,0x10,0x06,0x7F,0x37,0x0F,0x10,0x72,0x36,0xD3,0x5F,0x00,0x4B,0x0F,0xB9,0x10,0x25,0x32,0x0F,0x97,0x10,0x3C,0x9B,0x1F,0x10,0xC2, + 0xC2,0x49,0x11,0x3D,0x74,0x0F,0x00,0x1C,0x2C,0x10,0xB7,0x58,0x1F,0x72,0x0F,0xF5,0x10,0x01,0x3F,0x35,0x0E,0xF0,0x54,0x03,0x00,0x08, +}; +uint8_t tileset_tile_86_compressed[86] = { + 0x10,0x1D,0x10,0x01,0x05,0x00,0xDC,0x03,0x06,0xFA,0x0A,0x05,0x01,0xE7,0x03,0x15,0x8A,0x00,0xD1,0x0C,0x04,0xAE,0x0F,0x04,0x00,0x49,0x28,0xAA,0x04,0x0E,0xE6,0x11, + 0x00,0xB2,0x0B,0x03,0x03,0x64,0x12,0x04,0xD3,0x0D,0x4E,0x10,0x0E,0x01,0xBE,0x0E,0x1C,0x64,0x04,0x03,0x91,0x35,0x93,0x04,0xDC,0x1B,0x07,0xDD,0x0F,0x69,0xF2,0x4F, + 0x05,0xF2,0x24,0x76,0x85,0xA3,0xF1,0x06,0x10,0xE1,0x9F,0x18,0xC0,0x15,0x0A,0x71,0x2E,0x61,0xCE,0x00,0x00,0x80, +}; +uint8_t tileset_tile_87_compressed[123] = { + 0x10,0x14,0x10,0x04,0x01,0x00,0x05,0xCA,0x00,0x01,0x04,0x09,0x0B,0x03,0x1C,0x1C,0x04,0x0D,0xAF,0x12,0x07,0x01,0xFA,0x07,0x10,0x16,0xBE,0x0F,0x06,0xED,0x0E,0x0F, + 0x03,0xDD,0x08,0x0D,0xB1,0x0E,0x05,0x05,0x1C,0x03,0x03,0x77,0x0C,0x3C,0x77,0x1F,0x0F,0x77,0x11,0x3D,0x6B,0x00,0x03,0x1F,0xBB,0x10,0x50,0xAB,0x36,0x4F,0xD7,0x08, + 0x03,0x44,0x2D,0x36,0xFC,0x6F,0x00,0x0F,0xBA,0x0E,0x16,0x1F,0x4B,0x36,0x0B,0xBE,0x48,0x0E,0x49,0x0F,0x2F,0x2C,0x0E,0x0F,0x4B,0x4B,0x1F,0xCB,0x42,0x0E,0x52,0x0F, + 0x49,0x6A,0x0D,0x86,0xBC,0x0E,0x4B,0x96,0x46,0x57,0x0E,0x1C,0x0E,0xA6,0x0F,0x03,0x0E,0xB9,0x0F,0xEE,0x1F,0x0E,0x4E,0x2F,0x10,0x00,0x01, +}; +uint8_t tileset_tile_88_compressed[51] = { + 0x10,0x1A,0x10,0x02,0x22,0x00,0x0C,0x9A,0x03,0x11,0x00,0x0C,0xE0,0x03,0x76,0x0F,0x26,0x25,0x0C,0x00,0x95,0x0F,0x25,0x1A,0x0F,0x25,0x87,0x04,0x0F,0x25,0x07,0x07, + 0x5F,0x0F,0x0B,0x71,0x10,0x15,0x0F,0x0E,0x71,0x10,0x09,0x0F,0x0C,0xA6,0x10,0x00,0x80,0x00,0x40, +}; +uint8_t tileset_tile_89_compressed[49] = { + 0x10,0x34,0x10,0x11,0x00,0x0C,0x0F,0x70,0x03,0xC2,0x00,0x07,0xC8,0x04,0x0A,0x0B,0xBF,0x0E,0x0D,0x00,0x8A,0x0E,0xE3,0x0C,0x29,0x0F,0x1D,0x0A,0x17,0x2D,0x64,0x0E, + 0x22,0x0B,0x5F,0x1E,0x0E,0xA5,0x03,0x07,0x00,0xDD,0x0F,0x25,0x00,0xC0,0x41,0x00,0x20, +}; +uint8_t tileset_tile_90_compressed[51] = { + 0x10,0x34,0x10,0x11,0x00,0x0C,0x0F,0x71,0x03,0xE5,0x00,0x0B,0x0A,0xA2,0x05,0x07,0x74,0x0F,0x00,0x0A,0x5A,0x10,0x0B,0xE3,0x00,0x17,0x21,0x0A,0x21,0x3E,0x0F,0x1F, + 0x22,0xE2,0x10,0xFE,0x20,0x0B,0x10,0x2E,0x20,0xDD,0x3D,0x25,0x00,0x4B,0x0F,0x00,0x00,0x00,0x80, +}; +uint8_t tileset_tile_91_compressed[51] = { + 0x10,0x35,0x10,0x11,0x00,0x0C,0xBB,0x03,0x22,0x00,0x03,0x40,0x02,0xDE,0x0F,0x0C,0x99,0x00,0x25,0x1E,0x0F,0x25,0x8F,0x0F,0x43,0x25,0xC2,0x0F,0x07,0x07,0x25,0x2E, + 0x0F,0xB8,0x0E,0x00,0x99,0x0F,0x32,0x0E,0x00,0x02,0x07,0x7B,0x00,0x0D,0xD0,0x42,0x02,0x00,0x08, +}; +uint8_t tileset_tile_92_compressed[59] = { + 0x10,0x05,0x10,0x02,0x12,0x12,0x09,0x92,0x00,0x07,0x09,0xC2,0x00,0x4B,0x0F,0x0F,0x00,0x24,0x07,0x0F,0x0E,0x52,0x0F,0x0F,0x07,0xFB,0x00,0x20,0x10,0xE6,0x16,0x2F, + 0xFB,0x0F,0x02,0x25,0x44,0x09,0xFA,0x0F,0x0C,0x00,0x0F,0x7E,0x3F,0x0F,0xAE,0x02,0x23,0x7B,0x3F,0x0E,0xB8,0x10,0x1F,0xE0,0x7F,0x00,0x10, +}; +uint8_t tileset_tile_93_compressed[44] = { + 0x10,0x12,0x10,0x07,0x09,0xC3,0x00,0x09,0x07,0x0F,0x13,0x06,0x0F,0xCB,0x07,0x10,0xCF,0x0E,0x07,0x7D,0x21,0x00,0xCF,0x2D,0x07,0xAE,0x04,0x07,0x1B,0x79,0x07,0xA7, + 0x1B,0x07,0xE6,0x06,0x56,0x9A,0x07,0x07,0xF8,0x7F,0x00,0x04, +}; +uint8_t tileset_tile_94_compressed[44] = { + 0x10,0x12,0x10,0x07,0x09,0xC3,0x00,0x09,0x07,0x0F,0x13,0x06,0x0F,0xCB,0x07,0x10,0xCF,0x0E,0x07,0x7D,0x21,0x00,0xCF,0x2D,0x07,0xAE,0x04,0x07,0x1B,0x79,0x07,0xA7, + 0x1B,0x07,0xE6,0x06,0x56,0x9A,0x07,0x07,0xF8,0x7F,0x00,0x04, +}; +uint8_t tileset_tile_95_compressed[57] = { + 0x10,0x12,0x10,0x07,0x09,0xDE,0x00,0x07,0x04,0x07,0x42,0x02,0x09,0x0F,0x0F,0x1D,0x0E,0x0F,0x07,0x57,0x00,0x0F,0x13,0x7D,0x10,0x09,0x5F,0x1B,0x00,0x0F,0xDC,0x08, + 0x18,0xB2,0x30,0x55,0x0F,0x25,0xCF,0x23,0x0F,0x76,0x1B,0x34,0x07,0x96,0x3F,0x4B,0x0E,0x10,0x9A,0x3F,0x07,0xF8,0x7F,0x00,0x04, +}; +uint8_t tileset_tile_96_compressed[79] = { + 0x10,0x35,0x10,0x4B,0x00,0x0D,0x09,0x00,0x13,0x0D,0x06,0x69,0x00,0x0E,0x0B,0xFC,0x00,0x0F,0x10,0x77,0x0F,0x10,0x1D,0x0F,0xC7,0x10,0xDC,0x0F,0x10,0xF5,0x4F,0x00, + 0xFC,0x0C,0x02,0x0F,0xF2,0x20,0x73,0x2D,0x10,0xCC,0x0F,0x5E,0x0D,0x8E,0x0F,0x9F,0x1F,0x0E,0x89,0x7F,0x93,0x00,0x09,0x8C,0x7F,0x96,0x4C,0x39,0x0F,0x13,0x19,0x0F, + 0x7C,0x7F,0x01,0xF2,0x0F,0xA7,0x3E,0x0D,0x4F,0x4F,0x13,0x7F,0x00,0x00,0x80, +}; +uint8_t tileset_tile_97_compressed[74] = { + 0x10,0x12,0x10,0x0D,0x06,0x26,0x00,0x0D,0x07,0xD2,0x00,0x13,0x11,0x0E,0x13,0x13,0x1F,0x10,0x08,0x13,0x71,0x00,0x3C,0x21,0x1D,0x64,0x10,0xC9,0x0E,0x13,0x93,0x43, + 0x13,0xDC,0x00,0x4B,0x54,0x1D,0xB1,0x5C,0x96,0x0E,0x5C,0x0D,0x8B,0x3B,0x9E,0x4E,0xA3,0x0D,0x38,0x10,0x04,0xC8,0x10,0xA0,0xA9,0x8A,0x18,0xE3,0x26,0x2F,0x16,0x7F, + 0x01,0x8D,0x25,0xA8,0x6E,0xD4,0x34,0x0D,0x00,0x02, +}; +uint8_t tileset_tile_98_compressed[85] = { + 0x10,0x12,0x10,0x0D,0x06,0x0A,0x00,0x0D,0x13,0x0D,0x00,0x64,0x4B,0x00,0x06,0x13,0xBB,0x0E,0x0F,0x0B,0x00,0xAA,0x10,0x0B,0xF8,0x02,0x0D,0xAD,0x0F,0x0D,0x0D,0x1B, + 0x0F,0xC6,0x0E,0x25,0x0F,0x13,0x00,0x9F,0x4F,0x1D,0x8B,0x1E,0x71,0x4B,0x0E,0xB3,0x0F,0xCF,0x3D,0x0F,0x2F,0x4E,0x73,0x13,0x0F,0x75,0x10,0x04,0x72,0x00,0xF7,0x6F, + 0x0B,0x04,0x14,0x7F,0x06,0x8C,0x0F,0xE3,0x2C,0x38,0x0F,0x0E,0xC9,0x0F,0x6A,0x2C,0x25,0x68,0x4F,0x00,0x04, +}; +uint8_t tileset_tile_99_compressed[86] = { + 0x10,0x33,0x10,0x4B,0x00,0x0D,0x0B,0x00,0x12,0x0D,0x0D,0x06,0xCE,0x00,0x0F,0x13,0x44,0x0D,0xF5,0x0F,0x00,0x0F,0x35,0x10,0xDA,0x0C,0x2E,0x13,0x6E,0x10,0x0B,0xEF, + 0x0F,0x1F,0x0F,0xE7,0x10,0x0F,0xB6,0x0E,0x13,0x0C,0x13,0x9A,0x0F,0x7E,0x2D,0x10,0xEE,0x3F,0x3C,0x7E,0x6F,0x06,0xE2,0x1B,0x6E,0x0F,0x12,0x58,0x2C,0xCE,0x10,0x04, + 0x32,0x10,0x5B,0x06,0x15,0x8B,0x18,0xE3,0x26,0x2F,0x16,0x7F,0x01,0x8D,0x25,0xA8,0x6E,0xD4,0x34,0x0D,0x00,0x02, +}; +uint8_t tileset_tile_100_compressed[93] = { + 0x10,0x12,0x10,0x0D,0x06,0x0C,0x00,0x0D,0x0D,0x0B,0x00,0x0D,0x4B,0xC9,0x00,0x06,0x13,0x13,0x0E,0x13,0xFF,0x0F,0x0B,0x21,0x13,0xFC,0x00,0x0F,0x22,0xBF,0x0F,0x0D, + 0x1D,0xCB,0x00,0x30,0xC9,0x00,0x2C,0x25,0x1F,0xF2,0x0F,0x02,0x4F,0x2C,0x10,0x77,0x0F,0x1D,0x3D,0x10,0xCF,0x02,0x0D,0x77,0x42,0x3F,0x2D,0x10,0xCD,0x48,0x00,0x27, + 0x5D,0x06,0x19,0x10,0xC6,0x04,0x4A,0x10,0x06,0x13,0x8D,0x0E,0xA8,0x78,0xC5,0x16,0x13,0xA3,0x02,0x13,0x6A,0x25,0x6E,0x35,0x34,0x0D,0x00,0x00,0x80, +}; +uint8_t tileset_tile_101_compressed[109] = { + 0x10,0x03,0x10,0x1F,0x1F,0x1C,0x1C,0x04,0x00,0x4A,0x03,0x00,0x05,0x49,0x04,0x0E,0x3E,0x0D,0x0E,0x05,0xB9,0x0F,0x9F,0x0D,0x01,0x0E,0x03,0x10,0x0F,0x01,0x11,0x01, + 0x04,0x01,0x3F,0x0F,0x2A,0x1D,0x5F,0x03,0x12,0x4F,0x7D,0x0F,0x1C,0xFA,0x0E,0x0F,0x00,0x4B,0x5B,0x20,0x0D,0xFB,0x00,0x59,0x0F,0xE5,0x05,0x0D,0xAC,0x1E,0x0A,0x4B, + 0x4B,0xA9,0x1E,0x2E,0x0B,0x2D,0xBE,0x2F,0x0F,0x3D,0x49,0x49,0x29,0x52,0x1F,0x04,0x73,0x4D,0x73,0x50,0x00,0x27,0x0F,0x05,0x00,0xFE,0x4F,0x0F,0x0D,0x32,0x0F,0x22, + 0x6E,0xF0,0x00,0x8F,0x8D,0x2F,0xE2,0x7E,0x6E,0x2E,0x16,0x00,0x01, +}; +uint8_t tileset_tile_102_compressed[84] = { + 0x10,0x11,0x10,0x01,0x05,0x8E,0x00,0x01,0x00,0xA6,0x04,0x0B,0x9A,0x0E,0xF9,0x06,0x03,0xE3,0x09,0xF8,0x2F,0x00,0xD8,0x0D,0xBA,0x27,0x0C,0x49,0x04,0x11,0x3F,0x04, + 0x0E,0x2C,0x10,0xF5,0x00,0x0E,0x3C,0x11,0xEF,0x0D,0x03,0x03,0x09,0x98,0x02,0x04,0x03,0xBD,0x03,0x11,0x03,0x75,0x0C,0x06,0x4B,0x1B,0x05,0x11,0xAA,0x17,0x27,0xBF, + 0x29,0x63,0x0F,0xB9,0x30,0x6E,0x03,0x0F,0xE5,0x48,0x7F,0x8D,0x8B,0x09,0xA3,0x07,0xC2,0xBF,0x00,0x01, +}; +uint8_t tileset_tile_103_compressed[107] = { + 0x10,0x09,0x10,0x04,0x05,0x03,0x58,0x00,0x04,0x00,0x1C,0x1C,0x1F,0x38,0x1F,0x05,0x10,0x9A,0x11,0x10,0x52,0x01,0x10,0x01,0x69,0x11,0x9A,0x0F,0x01,0x01,0x01,0x27, + 0x0F,0x0C,0xFE,0x30,0x21,0x02,0x75,0x0F,0x01,0xF7,0x0F,0x10,0x22,0xFD,0x0F,0x4F,0x1F,0x5C,0x50,0x00,0xAE,0x1E,0x4B,0x0E,0x5A,0x20,0x00,0xAF,0x5F,0x0F,0x0D,0xB9, + 0x31,0x29,0x13,0x20,0x4B,0xC9,0x1F,0x4C,0x27,0x55,0x41,0x5C,0x0F,0x06,0xD6,0x4E,0x51,0x04,0x9E,0x0F,0xE3,0x12,0xFD,0x0F,0x01,0x0F,0x1F,0x13,0x0F,0x7C,0x70,0x0F, + 0x76,0x2F,0x8F,0x17,0x08,0x13,0x30,0x84,0x80,0x00,0x02, +}; +uint8_t tileset_tile_104_compressed[79] = { + 0x10,0x05,0x10,0x02,0x07,0x0C,0x25,0xA6,0x00,0x07,0x00,0x4C,0x02,0x10,0x0C,0x99,0x00,0x02,0x71,0x21,0x6B,0x0F,0x17,0x10,0x8A,0x0F,0x4B,0x0B,0x10,0x10,0x0F,0x1B, + 0x96,0x10,0x26,0x3F,0x59,0x10,0xF9,0x00,0x3F,0x67,0x10,0x00,0xD7,0x0F,0x1B,0x10,0x14,0x1F,0x1B,0x8C,0x10,0xBA,0x0F,0x10,0x4F,0x17,0x00,0x26,0x0F,0x10,0x17,0x4D, + 0x0A,0x00,0x2F,0x0F,0x10,0x3C,0x00,0xD1,0x0F,0xF0,0x1F,0xC4,0x0F,0x00,0x02, +}; +uint8_t tileset_tile_105_compressed[62] = { + 0x10,0x25,0x10,0x07,0x00,0x48,0x0C,0x00,0x0A,0xE5,0x00,0x08,0x4A,0x07,0x0B,0x22,0x8A,0x0F,0x99,0x10,0x0C,0x17,0x20,0x71,0x0D,0x9C,0x20,0x00,0x7C,0x10,0xD2,0x5F, + 0xB4,0x62,0x25,0x0F,0x02,0x72,0x00,0x07,0x1E,0x00,0x47,0x17,0x23,0x00,0x0A,0x91,0x00,0x10,0xC4,0x00,0x02,0x1A,0x62,0x00,0x02,0x1F,0x0F,0x80,0x00,0x40, +}; +uint8_t tileset_tile_106_compressed[74] = { + 0x10,0x34,0x10,0x0A,0x00,0x0C,0x89,0x00,0x07,0x72,0x00,0x0E,0x22,0x0C,0xF9,0x13,0x0F,0x67,0x16,0x0E,0x9E,0x0F,0xA2,0x11,0xEE,0x1E,0x0D,0x33,0x1E,0x0C,0x8F,0x2D, + 0x44,0x25,0xD2,0x5C,0x00,0x02,0x39,0x00,0x07,0x0F,0x23,0x00,0x17,0x91,0x00,0x0A,0xC9,0x00,0x10,0x82,0x00,0x02,0x0B,0x0B,0x1B,0xE7,0x00,0x17,0x4D,0x02,0x17,0x3A, + 0x0F,0x1B,0x68,0x4F,0x89,0x0F,0xA0,0x00,0x00,0x10, +}; +uint8_t tileset_tile_107_compressed[93] = { + 0x10,0x26,0x10,0x07,0x00,0x58,0x25,0x00,0x0C,0x07,0x02,0x4D,0x0C,0x00,0x34,0x0E,0x5D,0x0F,0x22,0x0E,0x10,0xAD,0x0F,0x0E,0x17,0x13,0x0F,0x22,0x0E,0x0B,0x22,0x0F, + 0x52,0x0E,0x1B,0x02,0x79,0x5F,0x79,0x0E,0x3F,0xE5,0x00,0x0E,0x44,0x17,0xDB,0x1F,0x0E,0x1B,0x0F,0x8C,0x0E,0xA4,0x0F,0x17,0xF7,0x00,0x0E,0x49,0x0F,0x0A,0x97,0x00, + 0x17,0x0E,0x56,0x0F,0x05,0x1B,0x77,0x0B,0x77,0x0E,0x69,0x0F,0x10,0x79,0x00,0x37,0xA6,0x0F,0x4E,0x4E,0x1B,0x0F,0x1B,0x9A,0x00,0x78,0x0F,0x00,0x04, +}; +uint8_t tileset_tile_108_compressed[61] = { + 0x10,0x05,0x10,0x02,0x12,0x12,0x09,0x92,0x00,0x07,0x09,0xC2,0x00,0x4B,0x0F,0x0F,0x00,0x25,0x07,0x0F,0x00,0xF8,0x0F,0x0A,0xB4,0x00,0x02,0x68,0x0E,0x07,0x00,0x02, + 0x8D,0x00,0x71,0x00,0x10,0xB0,0x1F,0x89,0x0F,0x31,0x2D,0x85,0x00,0x10,0x07,0x31,0x1E,0x2E,0x00,0x1D,0x0F,0xE7,0x09,0x0F,0x81,0x82,0x1F,0x00,0x01, +}; +uint8_t tileset_tile_109_compressed[46] = { + 0x10,0x12,0x10,0x07,0x09,0xC3,0x00,0x09,0x07,0x0F,0x62,0x00,0x21,0x07,0xE4,0x00,0x02,0x74,0x00,0x3E,0x2F,0x07,0x46,0x10,0xC3,0x00,0xF0,0x0F,0xF9,0x6F,0x02,0x09, + 0x19,0x00,0xA3,0x0F,0x0F,0x2E,0x00,0x0F,0x26,0x3C,0xA0,0x0F,0x00,0x10, +}; +uint8_t tileset_tile_110_compressed[53] = { + 0x10,0x12,0x10,0x07,0x09,0xC3,0x00,0x09,0x07,0x0F,0x62,0x00,0x21,0x07,0xE4,0x00,0x02,0x74,0x00,0x3E,0x2F,0x1E,0x8F,0x00,0x46,0x1D,0x71,0x00,0x0E,0xB9,0x4E,0x11, + 0x02,0x0B,0x69,0x00,0x02,0xA1,0x06,0x28,0x0F,0xF5,0x2F,0x0A,0xA6,0x00,0x02,0x06,0x84,0x20,0x0F,0x00,0x10, +}; +uint8_t tileset_tile_111_compressed[54] = { + 0x10,0x12,0x10,0x07,0x09,0xDE,0x00,0x07,0x04,0x07,0x42,0x02,0x09,0x0F,0x0F,0x64,0x00,0x07,0xB8,0x0F,0xD8,0x00,0x42,0x0F,0x39,0x00,0x10,0x1A,0x1D,0x10,0x42,0x00, + 0x05,0x0F,0x31,0x1E,0x06,0x00,0x1D,0x07,0x10,0x2D,0x00,0x10,0x8B,0x0F,0xA4,0x05,0x10,0x0C,0x50,0x1F,0x00,0x08, +}; +uint8_t tileset_tile_112_compressed[75] = { + 0x10,0x33,0x10,0x4B,0x00,0x0D,0x0B,0x00,0x12,0x0D,0x0D,0x06,0xCE,0x00,0x0F,0x13,0x44,0x0D,0xFA,0x0F,0x00,0x0E,0x13,0x69,0x10,0xEE,0x1E,0x10,0x3D,0x0F,0x0D,0x1B, + 0x0F,0xF3,0x0C,0x02,0xCC,0x0F,0x2D,0x13,0x9E,0x4F,0x75,0x5E,0x0D,0xCF,0x1F,0x30,0x73,0x42,0x72,0x0F,0x10,0x73,0x00,0x07,0xCB,0x0F,0x25,0x0A,0x4F,0x0F,0x0A,0x24, + 0x34,0xDC,0x5F,0x07,0x90,0x04,0x43,0x00,0x00,0x00,0x80, +}; +uint8_t tileset_tile_113_compressed[77] = { + 0x10,0x12,0x10,0x0D,0x06,0x26,0x00,0x0D,0x07,0xD2,0x00,0x13,0x11,0x0E,0x13,0x13,0x1F,0x10,0x08,0x13,0x71,0x00,0x3C,0x21,0x1D,0x64,0x10,0xC9,0x0E,0x13,0x93,0x43, + 0x13,0xDC,0x00,0x4B,0x54,0x1D,0xB1,0x5C,0x93,0x0E,0xF7,0x1D,0x0D,0x00,0x24,0x0F,0xAA,0x00,0x0B,0x00,0xBE,0x07,0x1E,0x58,0x0A,0x88,0x04,0x5A,0x0F,0x7D,0x34,0x0F, + 0x4B,0x6B,0x09,0x4B,0x00,0x95,0x14,0x4B,0x0F,0x40,0x00,0x00,0x20, +}; +uint8_t tileset_tile_114_compressed[80] = { + 0x10,0x12,0x10,0x0D,0x06,0x0C,0x00,0x0D,0x0D,0x0B,0x00,0x0D,0x4B,0xC9,0x00,0x06,0x13,0x13,0x0E,0x13,0xFF,0x0F,0x0B,0x21,0x13,0xFC,0x00,0x10,0x00,0xBF,0x0F,0x0D, + 0x1D,0xCF,0x00,0x20,0x24,0x2C,0x67,0x0F,0x0A,0x18,0x0F,0x0D,0x8D,0x0F,0x9E,0x0E,0x7E,0x4F,0x04,0x26,0x1E,0xEA,0x1F,0x04,0xEE,0x00,0x0E,0x7B,0x0F,0x09,0x86,0x2E, + 0x0F,0x2A,0x7B,0x0F,0x50,0xBB,0x52,0x59,0x4D,0x0D,0x5F,0x0F,0xC0,0x00,0x00,0x20, +}; +uint8_t tileset_tile_115_compressed[92] = { + 0x10,0x12,0x10,0x0D,0x06,0x26,0x00,0x0D,0x07,0xD2,0x00,0x13,0x11,0x0E,0x13,0x13,0x1F,0x10,0x08,0x13,0x71,0x00,0x3C,0x21,0x1D,0x64,0x10,0xC9,0x0E,0x13,0x93,0x43, + 0x13,0xDC,0x00,0x4B,0x54,0x1D,0xB1,0x5C,0x97,0x0E,0x77,0x71,0x00,0x18,0x3B,0x00,0x0B,0x0B,0x0D,0xAF,0x02,0x10,0x19,0x8A,0x0F,0xAA,0x10,0x2A,0x8A,0x0F,0xEE,0x04, + 0x4C,0x6B,0x40,0x0E,0x92,0x0F,0xDD,0x10,0x4B,0x00,0xD5,0x12,0x0F,0xF7,0x7F,0x01,0x0F,0x72,0x20,0xF3,0x3E,0x04,0xCF,0x0F,0x7F,0x00,0x00,0x80, +}; +uint8_t tileset_tile_116_compressed[92] = { + 0x10,0x12,0x10,0x0D,0x06,0x26,0x00,0x0D,0x07,0xD2,0x00,0x13,0x11,0x0E,0x13,0x13,0x1F,0x10,0x08,0x13,0x71,0x00,0x3C,0x21,0x1D,0x64,0x10,0xC9,0x0E,0x13,0x93,0x43, + 0x13,0xDC,0x00,0x4B,0x54,0x1D,0xB1,0x5C,0x96,0x0E,0x5C,0x0D,0x9A,0x3B,0xEA,0x03,0x00,0x5E,0x30,0x06,0x8A,0x03,0x0B,0x0B,0x02,0x96,0x41,0xD3,0x74,0x0B,0xAE,0x0F, + 0x06,0x3B,0xE7,0x0E,0x1F,0x92,0x13,0xEE,0x10,0x3F,0xEE,0x74,0x0F,0xDC,0x0C,0x4B,0x00,0xD2,0x0E,0x5F,0x2F,0x0F,0x20,0x1B,0x0F,0x00,0x00,0x80, +}; +uint8_t tileset_tile_117_compressed[124] = { + 0x10,0x00,0x10,0x47,0x47,0x03,0x01,0x01,0x04,0x04,0x3E,0x01,0x05,0x00,0x07,0xBF,0x09,0x0E,0x0A,0x05,0x7D,0x49,0x10,0x00,0x9D,0x11,0x04,0x1C,0x0F,0xF7,0x10,0x00, + 0x0F,0xFF,0x07,0x0F,0x02,0x06,0x76,0x08,0x11,0x04,0x77,0x03,0x0F,0x18,0x77,0x38,0x00,0xAE,0x0F,0x03,0x2F,0xEF,0x0E,0x10,0x0D,0xB9,0x0F,0x2F,0x28,0x20,0x0C,0xB9, + 0x1F,0x6D,0x28,0x3A,0x03,0x6E,0x23,0x1F,0x06,0x5E,0x10,0x06,0xFE,0x37,0x0F,0x10,0xE5,0x36,0x5F,0xA7,0x00,0x4B,0x0F,0x72,0x10,0x4B,0x32,0x0F,0x2F,0x10,0x3C,0x36, + 0x1F,0x10,0x1C,0xAB,0x00,0x10,0xBF,0x74,0x0F,0x00,0x4B,0x1C,0x10,0x2C,0x58,0xD3,0x1F,0x7C,0x10,0x01,0x0E,0xB7,0x0F,0x44,0x70,0x03,0x00,0x08, +}; +uint8_t tileset_tile_118_compressed[87] = { + 0x10,0x1D,0x10,0x01,0x05,0x00,0xDC,0x03,0x06,0xFA,0x0A,0x05,0x01,0xE7,0x03,0x15,0x8A,0x00,0xD1,0x0C,0x04,0xAE,0x0F,0x04,0x00,0x49,0x28,0xAA,0x04,0x0E,0xE6,0x11, + 0x00,0xB2,0x0B,0x03,0x03,0x64,0x12,0x04,0xD3,0x0D,0x4E,0x10,0x0E,0x01,0xBE,0x0E,0x1C,0x64,0x04,0x03,0x91,0x35,0x89,0x04,0x01,0xE2,0x3C,0x52,0x0F,0x03,0xA6,0x0F, + 0x03,0x24,0x9E,0x51,0xEE,0x07,0x0E,0x6B,0x65,0x02,0xB8,0x15,0xC9,0x00,0x1C,0x0E,0x37,0x00,0xDC,0x04,0x00,0x00,0x02, +}; +uint8_t tileset_tile_119_compressed[124] = { + 0x10,0x14,0x10,0x04,0x01,0x00,0x05,0xCA,0x00,0x01,0x04,0x09,0x0B,0x03,0x47,0x47,0x04,0x0D,0xAF,0x12,0x07,0x01,0xFA,0x07,0x10,0x16,0xBE,0x0F,0x06,0xF1,0x0E,0x0F, + 0x1C,0x04,0x03,0xDD,0x08,0x0D,0xB1,0x0E,0x05,0x05,0x1C,0x03,0x03,0x77,0x0C,0x3C,0x77,0x1F,0x0F,0x77,0x11,0x3D,0x6B,0x00,0x03,0x1F,0xBB,0x10,0x50,0xAE,0x36,0x0F, + 0xD7,0x1B,0x03,0x44,0x2F,0x36,0x0F,0x7C,0x26,0x0F,0xBA,0x0E,0x16,0x1F,0x4B,0x36,0x0B,0xBE,0x48,0x0E,0x49,0x0F,0x2F,0x2C,0x0E,0x0F,0x4B,0x4B,0x1F,0xCB,0x42,0x0E, + 0x57,0x0F,0x6A,0x6A,0x0E,0x1C,0x00,0xD2,0x0E,0x4B,0xCA,0x46,0x0E,0x1C,0xF4,0x0E,0x0F,0x03,0xF1,0x0E,0x53,0x1F,0x7C,0x0E,0x0F,0x10,0x00,0x02, +}; +uint8_t tileset_tile_120_compressed[72] = { + 0x10,0x0B,0x10,0x02,0x17,0x1B,0x00,0x26,0x17,0x0A,0x00,0x82,0x02,0x0F,0x0B,0x17,0x3B,0x0F,0x10,0x8E,0x0F,0xE2,0x10,0xD7,0x0F,0x0A,0x10,0x17,0x0F,0x24,0x10,0x42, + 0x0F,0x10,0x64,0x10,0x02,0xC9,0x00,0x10,0x62,0x10,0x12,0x1F,0x00,0xC4,0x10,0xCB,0x0F,0x10,0x15,0x0F,0x7C,0x10,0x0F,0xE9,0x00,0x00,0x63,0x10,0x2E,0x0F,0x10,0x74, + 0x00,0x00,0xD3,0x10,0xC0,0x00,0x00,0x20, +}; +uint8_t tileset_tile_121_compressed[33] = { + 0x10,0x11,0x10,0x02,0x1A,0x88,0x00,0x02,0x1C,0x11,0x0F,0x17,0x90,0x00,0x8A,0x0F,0x0A,0x32,0x00,0x11,0x0F,0x46,0x0B,0x21,0x00,0x02,0xF4,0x00,0x10,0x74,0x00,0x00, + 0x02, +}; +uint8_t tileset_tile_122_compressed[57] = { + 0x10,0x26,0x10,0x0A,0x00,0x0B,0x1B,0x16,0x0F,0x1B,0x01,0x88,0x0F,0xE3,0x0A,0xBE,0x0F,0x0B,0x02,0x24,0x0F,0x0B,0x0B,0x49,0x09,0x01,0x3E,0x0F,0x0A,0x16,0x8D,0x0F, + 0x9A,0x00,0x2A,0x2F,0x48,0x30,0xF4,0x1F,0x02,0x72,0x00,0x0A,0x0B,0x90,0x00,0x17,0xF4,0x00,0x7A,0x5F,0x10,0x3A,0x00,0x00,0x01, +}; +uint8_t tileset_tile_123_compressed[100] = { + 0x10,0x05,0x10,0x16,0x0F,0x0F,0x1B,0x96,0x03,0x17,0x1B,0x00,0x17,0x77,0x02,0x09,0x01,0x0C,0x94,0x0F,0x09,0x0B,0x01,0x09,0x2F,0x16,0x0B,0x0F,0x0E,0x2F,0x0B,0x02, + 0x0B,0x11,0xEF,0x00,0x0F,0x0E,0xD3,0x0F,0x0B,0x76,0x00,0x0F,0x0E,0x0B,0x9A,0x2F,0xED,0x0F,0x0E,0x0A,0x13,0x1F,0x27,0x0E,0x0F,0x3C,0x00,0xC4,0x0E,0x10,0x0A,0xC9, + 0x00,0x17,0x62,0x0E,0xA4,0x0F,0x0E,0x44,0x00,0x4A,0x0F,0x0E,0x00,0x4F,0x17,0x00,0x2C,0x0E,0x4C,0x0F,0xA9,0x0E,0x00,0xE6,0x5F,0x0E,0x27,0x00,0x10,0x00,0x95,0x0E, + 0x00,0x00,0x00,0x80, +}; +uint8_t tileset_tile_124_compressed[50] = { + 0x10,0x03,0x10,0x00,0x00,0x02,0x31,0x2D,0x00,0x0A,0x10,0x07,0x31,0x1E,0x00,0x2E,0x1D,0x07,0x0F,0xA3,0x08,0x20,0x0F,0x72,0x1F,0x45,0x07,0xBD,0x0F,0x1D,0x00,0x0F, + 0x2D,0xF1,0x04,0x00,0x48,0x0F,0x1E,0x37,0x0F,0x2E,0x10,0x02,0x00,0x5E,0x05,0x06,0x00,0x01, +}; +uint8_t tileset_tile_125_compressed[59] = { + 0x10,0x02,0x10,0x02,0x0F,0x0F,0x07,0x1A,0x66,0x00,0x07,0x0B,0x02,0xB4,0x0F,0x11,0xD0,0x00,0x4F,0x0F,0x3C,0x00,0xD1,0x0F,0x7E,0x00,0x0F,0x15,0x09,0x44,0x0F,0xE4, + 0x01,0x0E,0x1B,0x0A,0x5E,0x10,0x0F,0x0A,0xA8,0x0F,0x99,0x00,0x23,0x2F,0x38,0x0F,0x03,0x3D,0x0F,0x8E,0x00,0x47,0x10,0x40,0x00,0x00,0x20, +}; +uint8_t tileset_tile_126_compressed[49] = { + 0x10,0x0B,0x10,0x1D,0x02,0x0A,0x00,0x4C,0x02,0x06,0x1D,0xE3,0x0F,0x29,0x00,0x0F,0x17,0x69,0x00,0x02,0xA0,0x06,0x8A,0x0F,0x34,0x3F,0x1E,0x1D,0x8C,0x00,0x47,0x1E, + 0xA3,0x00,0x2D,0x90,0x00,0x1D,0x27,0x23,0x00,0x02,0x91,0x00,0x10,0xD0,0x00,0x00,0x08, +}; +uint8_t tileset_tile_127_compressed[51] = { + 0x10,0x0A,0x10,0x07,0x31,0x1E,0x00,0x0C,0x1D,0x07,0x10,0x2D,0x00,0x10,0x02,0x22,0x10,0x00,0x2A,0x0F,0x05,0xE0,0x0F,0x6B,0x1F,0x47,0x07,0x48,0x1F,0x0F,0x2D,0x5F, + 0x1D,0x00,0x0F,0x76,0x04,0x0F,0x1E,0x83,0xDE,0x0F,0x73,0xF9,0x00,0x08,0x78,0x05,0x0F,0x00,0x04, +}; +uint8_t *tileset_tiles_compressed[128] = { + tileset_tile_0_compressed, + tileset_tile_1_compressed, + tileset_tile_2_compressed, + tileset_tile_3_compressed, + tileset_tile_4_compressed, + tileset_tile_5_compressed, + tileset_tile_6_compressed, + tileset_tile_7_compressed, + tileset_tile_8_compressed, + tileset_tile_9_compressed, + tileset_tile_10_compressed, + tileset_tile_11_compressed, + tileset_tile_12_compressed, + tileset_tile_13_compressed, + tileset_tile_14_compressed, + tileset_tile_15_compressed, + tileset_tile_16_compressed, + tileset_tile_17_compressed, + tileset_tile_18_compressed, + tileset_tile_19_compressed, + tileset_tile_20_compressed, + tileset_tile_21_compressed, + tileset_tile_22_compressed, + tileset_tile_23_compressed, + tileset_tile_24_compressed, + tileset_tile_25_compressed, + tileset_tile_26_compressed, + tileset_tile_27_compressed, + tileset_tile_28_compressed, + tileset_tile_29_compressed, + tileset_tile_30_compressed, + tileset_tile_31_compressed, + tileset_tile_32_compressed, + tileset_tile_33_compressed, + tileset_tile_34_compressed, + tileset_tile_35_compressed, + tileset_tile_36_compressed, + tileset_tile_37_compressed, + tileset_tile_38_compressed, + tileset_tile_39_compressed, + tileset_tile_40_compressed, + tileset_tile_41_compressed, + tileset_tile_42_compressed, + tileset_tile_43_compressed, + tileset_tile_44_compressed, + tileset_tile_45_compressed, + tileset_tile_46_compressed, + tileset_tile_47_compressed, + tileset_tile_48_compressed, + tileset_tile_49_compressed, + tileset_tile_50_compressed, + tileset_tile_51_compressed, + tileset_tile_52_compressed, + tileset_tile_53_compressed, + tileset_tile_54_compressed, + tileset_tile_55_compressed, + tileset_tile_56_compressed, + tileset_tile_57_compressed, + tileset_tile_58_compressed, + tileset_tile_59_compressed, + tileset_tile_60_compressed, + tileset_tile_61_compressed, + tileset_tile_62_compressed, + tileset_tile_63_compressed, + tileset_tile_64_compressed, + tileset_tile_65_compressed, + tileset_tile_66_compressed, + tileset_tile_67_compressed, + tileset_tile_68_compressed, + tileset_tile_69_compressed, + tileset_tile_70_compressed, + tileset_tile_71_compressed, + tileset_tile_72_compressed, + tileset_tile_73_compressed, + tileset_tile_74_compressed, + tileset_tile_75_compressed, + tileset_tile_76_compressed, + tileset_tile_77_compressed, + tileset_tile_78_compressed, + tileset_tile_79_compressed, + tileset_tile_80_compressed, + tileset_tile_81_compressed, + tileset_tile_82_compressed, + tileset_tile_83_compressed, + tileset_tile_84_compressed, + tileset_tile_85_compressed, + tileset_tile_86_compressed, + tileset_tile_87_compressed, + tileset_tile_88_compressed, + tileset_tile_89_compressed, + tileset_tile_90_compressed, + tileset_tile_91_compressed, + tileset_tile_92_compressed, + tileset_tile_93_compressed, + tileset_tile_94_compressed, + tileset_tile_95_compressed, + tileset_tile_96_compressed, + tileset_tile_97_compressed, + tileset_tile_98_compressed, + tileset_tile_99_compressed, + tileset_tile_100_compressed, + tileset_tile_101_compressed, + tileset_tile_102_compressed, + tileset_tile_103_compressed, + tileset_tile_104_compressed, + tileset_tile_105_compressed, + tileset_tile_106_compressed, + tileset_tile_107_compressed, + tileset_tile_108_compressed, + tileset_tile_109_compressed, + tileset_tile_110_compressed, + tileset_tile_111_compressed, + tileset_tile_112_compressed, + tileset_tile_113_compressed, + tileset_tile_114_compressed, + tileset_tile_115_compressed, + tileset_tile_116_compressed, + tileset_tile_117_compressed, + tileset_tile_118_compressed, + tileset_tile_119_compressed, + tileset_tile_120_compressed, + tileset_tile_121_compressed, + tileset_tile_122_compressed, + tileset_tile_123_compressed, + tileset_tile_124_compressed, + tileset_tile_125_compressed, + tileset_tile_126_compressed, + tileset_tile_127_compressed, +}; diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/main.c b/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/main.c index 70360a6..143ee63 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/main.c +++ b/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/main.c @@ -1,119 +1,119 @@ -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -/* Include the graphics */ -#include "gfx/tiles_gfx.h" -#include "tilemapdata.h" - -/* Tilemap defines */ -#define TILE_WIDTH (16) -#define TILE_HEIGHT (16) -#define TILE_SIZE ((TILE_WIDTH * TILE_HEIGHT) + 2) // +2 for width and height bytes - -#define TILEMAP_WIDTH (32) -#define TILEMAP_HEIGHT (25) - -#define TILEMAP_DRAW_WIDTH (20) -#define TILEMAP_DRAW_HEIGHT (14) - -#define Y_OFFSET (16) -#define X_OFFSET (0) - -/* This is where the decompressed tilemap data is to be stored */ -uint8_t tilemap_map[TILEMAP_WIDTH * TILEMAP_HEIGHT]; - -/* Place to hold decompressed tile pointers */ -gfx_sprite_t *tileset_tiles[128]; - -/* Put all your code here */ -void main(void) { - sk_key_t key; - uint8_t i; - unsigned int x_offset = 0; - unsigned int y_offset = 0; - gfx_sprite_t *tmp_ptr; - gfx_tilemap_t tilemap; - - /* Decompress the compressed tiles */ - for (i = 0; i < sizeof(tileset_tiles)/sizeof(gfx_sprite_t*) ; i++) { - tmp_ptr = gfx_MallocSprite(TILE_WIDTH, TILE_HEIGHT); /* Same as gfx_AllocSprite(TILE_WIDTH, TILE_HEIGHT, malloc) */ - zx7_Decompress(tmp_ptr, tileset_tiles_compressed[i]); - tileset_tiles[i] = tmp_ptr; - } - - zx7_Decompress(tilemap_map, tilemap_compressed); - - /* Initialize the tilemap structure */ - tilemap.map = tilemap_map; - tilemap.tiles = tileset_tiles; - tilemap.type_width = gfx_tile_16_pixel; - tilemap.type_height = gfx_tile_16_pixel; - tilemap.tile_height = TILE_HEIGHT; - tilemap.tile_width = TILE_WIDTH; - tilemap.draw_height = TILEMAP_DRAW_HEIGHT; - tilemap.draw_width = TILEMAP_DRAW_WIDTH; - tilemap.height = TILEMAP_HEIGHT; - tilemap.width = TILEMAP_WIDTH; - tilemap.y_loc = Y_OFFSET; - tilemap.x_loc = X_OFFSET; - - /* Initialize the graphics scene */ - gfx_Begin(); - - /* Set up the palette */ - gfx_SetPalette(tiles_gfx_pal, sizeof_tiles_gfx_pal, 0); - gfx_SetColor(gfx_white); - - /* Draw to buffer to avoid tearing. Note, this is the same as gfx_SetDraw(gfx_buffer) */ - gfx_SetDrawBuffer(); - - /* Set monospace font with width of 8 */ - gfx_SetMonospaceFont(8); - - /* Wait for the enter key to quit */ - while ((key = os_GetCSC()) != sk_Enter) { - - /* Draw tilemap and coords */ - gfx_Tilemap(&tilemap, x_offset, y_offset); - gfx_FillRectangle(0, 0, 320, 16); - gfx_PrintStringXY("x offset:", 48, 4); - gfx_PrintUInt(x_offset, 4); - gfx_PrintString(" y offset:"); - gfx_PrintUInt(y_offset, 4); - - /* Do something based on the keypress */ - switch (key) { - case sk_Down: - if (y_offset < (TILEMAP_HEIGHT * TILE_HEIGHT) - (TILEMAP_DRAW_HEIGHT * TILE_HEIGHT)) - y_offset += TILE_HEIGHT; - break; - case sk_Left: - if (x_offset) - x_offset -= TILE_WIDTH; - break; - case sk_Right: - if (x_offset < (TILEMAP_WIDTH * TILE_WIDTH) - (TILEMAP_DRAW_WIDTH * TILE_WIDTH)) - x_offset += TILE_WIDTH; - break; - case sk_Up: - if (y_offset) - y_offset -= TILE_HEIGHT; - break; - default: - break; - } - gfx_SwapDraw(); - } - - /* Close the graphics */ - gfx_End(); -} +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +/* Include the graphics */ +#include "gfx/tiles_gfx.h" +#include "tilemapdata.h" + +/* Tilemap defines */ +#define TILE_WIDTH (16) +#define TILE_HEIGHT (16) +#define TILE_SIZE ((TILE_WIDTH * TILE_HEIGHT) + 2) // +2 for width and height bytes + +#define TILEMAP_WIDTH (32) +#define TILEMAP_HEIGHT (25) + +#define TILEMAP_DRAW_WIDTH (20) +#define TILEMAP_DRAW_HEIGHT (14) + +#define Y_OFFSET (16) +#define X_OFFSET (0) + +/* This is where the decompressed tilemap data is to be stored */ +uint8_t tilemap_map[TILEMAP_WIDTH * TILEMAP_HEIGHT]; + +/* Place to hold decompressed tile pointers */ +gfx_sprite_t *tileset_tiles[128]; + +/* Put all your code here */ +void main(void) { + sk_key_t key; + uint8_t i; + unsigned int x_offset = 0; + unsigned int y_offset = 0; + gfx_sprite_t *tmp_ptr; + gfx_tilemap_t tilemap; + + /* Decompress the compressed tiles */ + for (i = 0; i < sizeof(tileset_tiles)/sizeof(gfx_sprite_t*) ; i++) { + tmp_ptr = gfx_MallocSprite(TILE_WIDTH, TILE_HEIGHT); /* Same as gfx_AllocSprite(TILE_WIDTH, TILE_HEIGHT, malloc) */ + zx7_Decompress(tmp_ptr, tileset_tiles_compressed[i]); + tileset_tiles[i] = tmp_ptr; + } + + zx7_Decompress(tilemap_map, tilemap_compressed); + + /* Initialize the tilemap structure */ + tilemap.map = tilemap_map; + tilemap.tiles = tileset_tiles; + tilemap.type_width = gfx_tile_16_pixel; + tilemap.type_height = gfx_tile_16_pixel; + tilemap.tile_height = TILE_HEIGHT; + tilemap.tile_width = TILE_WIDTH; + tilemap.draw_height = TILEMAP_DRAW_HEIGHT; + tilemap.draw_width = TILEMAP_DRAW_WIDTH; + tilemap.height = TILEMAP_HEIGHT; + tilemap.width = TILEMAP_WIDTH; + tilemap.y_loc = Y_OFFSET; + tilemap.x_loc = X_OFFSET; + + /* Initialize the graphics scene */ + gfx_Begin(); + + /* Set up the palette */ + gfx_SetPalette(tiles_gfx_pal, sizeof_tiles_gfx_pal, 0); + gfx_SetColor(gfx_white); + + /* Draw to buffer to avoid tearing. Note, this is the same as gfx_SetDraw(gfx_buffer) */ + gfx_SetDrawBuffer(); + + /* Set monospace font with width of 8 */ + gfx_SetMonospaceFont(8); + + /* Wait for the enter key to quit */ + while ((key = os_GetCSC()) != sk_Enter) { + + /* Draw tilemap and coords */ + gfx_Tilemap(&tilemap, x_offset, y_offset); + gfx_FillRectangle(0, 0, 320, 16); + gfx_PrintStringXY("x offset:", 48, 4); + gfx_PrintUInt(x_offset, 4); + gfx_PrintString(" y offset:"); + gfx_PrintUInt(y_offset, 4); + + /* Do something based on the keypress */ + switch (key) { + case sk_Down: + if (y_offset < (TILEMAP_HEIGHT * TILE_HEIGHT) - (TILEMAP_DRAW_HEIGHT * TILE_HEIGHT)) + y_offset += TILE_HEIGHT; + break; + case sk_Left: + if (x_offset) + x_offset -= TILE_WIDTH; + break; + case sk_Right: + if (x_offset < (TILEMAP_WIDTH * TILE_WIDTH) - (TILEMAP_DRAW_WIDTH * TILE_WIDTH)) + x_offset += TILE_WIDTH; + break; + case sk_Up: + if (y_offset) + y_offset -= TILE_HEIGHT; + break; + default: + break; + } + gfx_SwapDraw(); + } + + /* Close the graphics */ + gfx_End(); +} diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/tilemapdata.c b/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/tilemapdata.c index 90eefa2..9b57fcb 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/tilemapdata.c +++ b/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/tilemapdata.c @@ -1,16 +1,16 @@ -// Converted using ConvTile -#include - -uint8_t tilemap_compressed[339] = { - 0x04,0x03,0x05,0x02,0x00,0x01,0x02,0x03,0x01,0xBB,0x05,0x0A,0xFB,0x08,0x00,0x06,0xEB,0x18,0x05,0x04,0x2C,0x14,0x15,0x1A,0x10,0x10,0xFE,0x05,0x0D,0x02,0xEA,0x18, - 0x0E,0xF1,0x06,0x18,0x50,0x51,0x52,0xF5,0x04,0x21,0x06,0x56,0x1F,0x1D,0x10,0x97,0x00,0x1D,0xB0,0x47,0x24,0x25,0x60,0x61,0x5D,0x62,0x3F,0x5D,0x06,0x2F,0xF3,0x5E, - 0x1B,0xD8,0x00,0x0D,0x70,0x71,0x72,0xBA,0x3F,0x06,0x92,0x56,0x54,0x5A,0x02,0xB3,0x03,0x05,0x93,0xA5,0x3F,0x03,0x16,0x92,0x41,0x59,0x5A,0x69,0x11,0x45,0x03,0x7C, - 0x3F,0x0C,0x93,0x13,0xCF,0x1C,0x0B,0xD5,0x1F,0x27,0xCD,0x3F,0x1F,0x34,0x77,0xD2,0x61,0xA6,0x1F,0x02,0x3F,0x44,0x10,0xC9,0x00,0x3E,0x61,0xD2,0x72,0x6F,0xF3,0x3F, - 0x06,0x84,0xBF,0xA3,0x99,0xE0,0x02,0xD2,0x64,0xBE,0x07,0x0F,0x49,0x3F,0x65,0x1C,0x7C,0x94,0x1F,0x70,0x73,0x4A,0x74,0xCE,0x32,0x4E,0x3F,0x91,0x17,0x3D,0x31,0x49, - 0x60,0x62,0x73,0x0A,0x03,0x3F,0x00,0x20,0x21,0x21,0x22,0x05,0x98,0x80,0x24,0x89,0x1E,0x1F,0x41,0x82,0x90,0xFF,0x70,0x0E,0x30,0x31,0x31,0x32,0xB2,0x84,0x9E,0x00, - 0x64,0x1F,0x10,0xE1,0x7F,0x40,0x53,0x54,0x42,0xC5,0x0F,0x57,0x20,0x1F,0x0E,0xCE,0x06,0x3F,0x02,0x26,0x30,0x32,0xD2,0x1B,0x87,0x0E,0x02,0xE5,0x3F,0x6A,0x97,0x7F, - 0x60,0x9F,0x1F,0x01,0x8D,0x1F,0xB9,0x3F,0x93,0x1F,0x03,0x09,0xF9,0x50,0x52,0xC7,0x05,0x3B,0x3F,0x00,0x1F,0x58,0x94,0x61,0x60,0x64,0x67,0x51,0x00,0x63,0x62,0x08, - 0x3F,0x7F,0x15,0x53,0x1F,0x8E,0xFB,0x3E,0x63,0x29,0x74,0x71,0x00,0x72,0x53,0x2F,0x2D,0x3F,0x00,0x5F,0x00,0x38,0xFB,0xD1,0xAD,0xD4,0x17,0xE9,0x90,0x7D,0x3F,0x36, - 0xCE,0x1F,0x94,0x74,0xAD,0x68,0x03,0x9F,0x1F,0x1D,0xE6,0x3A,0x07,0xA9,0x1F,0xE6,0x00,0xA9,0x2E,0x7D,0x65,0x3F,0x21,0x92,0x00,0x43,0x44,0x22,0x06,0x22,0x4F,0xDA, - 0x6C,0x93,0x08,0x3F,0x45,0x41,0x25,0x00,0x42,0x9C,0x39,0x46,0xC8,0x43,0xEE,0xE0,0x5D,0x00,0x10 +// Converted using ConvTile +#include + +uint8_t tilemap_compressed[339] = { + 0x04,0x03,0x05,0x02,0x00,0x01,0x02,0x03,0x01,0xBB,0x05,0x0A,0xFB,0x08,0x00,0x06,0xEB,0x18,0x05,0x04,0x2C,0x14,0x15,0x1A,0x10,0x10,0xFE,0x05,0x0D,0x02,0xEA,0x18, + 0x0E,0xF1,0x06,0x18,0x50,0x51,0x52,0xF5,0x04,0x21,0x06,0x56,0x1F,0x1D,0x10,0x97,0x00,0x1D,0xB0,0x47,0x24,0x25,0x60,0x61,0x5D,0x62,0x3F,0x5D,0x06,0x2F,0xF3,0x5E, + 0x1B,0xD8,0x00,0x0D,0x70,0x71,0x72,0xBA,0x3F,0x06,0x92,0x56,0x54,0x5A,0x02,0xB3,0x03,0x05,0x93,0xA5,0x3F,0x03,0x16,0x92,0x41,0x59,0x5A,0x69,0x11,0x45,0x03,0x7C, + 0x3F,0x0C,0x93,0x13,0xCF,0x1C,0x0B,0xD5,0x1F,0x27,0xCD,0x3F,0x1F,0x34,0x77,0xD2,0x61,0xA6,0x1F,0x02,0x3F,0x44,0x10,0xC9,0x00,0x3E,0x61,0xD2,0x72,0x6F,0xF3,0x3F, + 0x06,0x84,0xBF,0xA3,0x99,0xE0,0x02,0xD2,0x64,0xBE,0x07,0x0F,0x49,0x3F,0x65,0x1C,0x7C,0x94,0x1F,0x70,0x73,0x4A,0x74,0xCE,0x32,0x4E,0x3F,0x91,0x17,0x3D,0x31,0x49, + 0x60,0x62,0x73,0x0A,0x03,0x3F,0x00,0x20,0x21,0x21,0x22,0x05,0x98,0x80,0x24,0x89,0x1E,0x1F,0x41,0x82,0x90,0xFF,0x70,0x0E,0x30,0x31,0x31,0x32,0xB2,0x84,0x9E,0x00, + 0x64,0x1F,0x10,0xE1,0x7F,0x40,0x53,0x54,0x42,0xC5,0x0F,0x57,0x20,0x1F,0x0E,0xCE,0x06,0x3F,0x02,0x26,0x30,0x32,0xD2,0x1B,0x87,0x0E,0x02,0xE5,0x3F,0x6A,0x97,0x7F, + 0x60,0x9F,0x1F,0x01,0x8D,0x1F,0xB9,0x3F,0x93,0x1F,0x03,0x09,0xF9,0x50,0x52,0xC7,0x05,0x3B,0x3F,0x00,0x1F,0x58,0x94,0x61,0x60,0x64,0x67,0x51,0x00,0x63,0x62,0x08, + 0x3F,0x7F,0x15,0x53,0x1F,0x8E,0xFB,0x3E,0x63,0x29,0x74,0x71,0x00,0x72,0x53,0x2F,0x2D,0x3F,0x00,0x5F,0x00,0x38,0xFB,0xD1,0xAD,0xD4,0x17,0xE9,0x90,0x7D,0x3F,0x36, + 0xCE,0x1F,0x94,0x74,0xAD,0x68,0x03,0x9F,0x1F,0x1D,0xE6,0x3A,0x07,0xA9,0x1F,0xE6,0x00,0xA9,0x2E,0x7D,0x65,0x3F,0x21,0x92,0x00,0x43,0x44,0x22,0x06,0x22,0x4F,0xDA, + 0x6C,0x93,0x08,0x3F,0x45,0x41,0x25,0x00,0x42,0x9C,0x39,0x46,0xC8,0x43,0xEE,0xE0,0x5D,0x00,0x10 }; \ No newline at end of file diff --git a/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/tilemapdata.h b/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/tilemapdata.h index af369c7..6df9df6 100644 --- a/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/tilemapdata.h +++ b/frontends/calculator/CEdev/examples/gfx_tilemap_compress/src/tilemapdata.h @@ -1,9 +1,9 @@ -// Converted using ConvTile -// This file contains all the tilemap sources for easier inclusion in a project -#ifndef tilemapdata_header -#define tilemapdata_header -#include - -extern uint8_t tilemap_compressed[339]; - -#endif +// Converted using ConvTile +// This file contains all the tilemap sources for easier inclusion in a project +#ifndef tilemapdata_header +#define tilemapdata_header +#include + +extern uint8_t tilemap_compressed[339]; + +#endif diff --git a/frontends/calculator/CEdev/examples/hello_world/makefile b/frontends/calculator/CEdev/examples/hello_world/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/hello_world/makefile +++ b/frontends/calculator/CEdev/examples/hello_world/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/hello_world/readme.md b/frontends/calculator/CEdev/examples/hello_world/readme.md index 880be97..0be163e 100644 --- a/frontends/calculator/CEdev/examples/hello_world/readme.md +++ b/frontends/calculator/CEdev/examples/hello_world/readme.md @@ -1,9 +1,9 @@ -### Hello World Demo - -This is a simple demo to demonstrate displaying text using the TI-OS rotuines. - -![Screenshot](screenshot.png) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. +### Hello World Demo + +This is a simple demo to demonstrate displaying text using the TI-OS rotuines. + +![Screenshot](screenshot.png) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. diff --git a/frontends/calculator/CEdev/examples/hello_world/src/main.c b/frontends/calculator/CEdev/examples/hello_world/src/main.c index 333dcdc..16c9dd0 100644 --- a/frontends/calculator/CEdev/examples/hello_world/src/main.c +++ b/frontends/calculator/CEdev/examples/hello_world/src/main.c @@ -1,48 +1,48 @@ -/* Keep these headers */ -#include -#include -#include -#include - -/* Standard headers */ -#include -#include -#include -#include - -/* Put function prototypes here */ -void printText(const char *text, uint8_t x, uint8_t y); -void printTextSmall(const char *text, uint8_t xpos, uint8_t ypos); - -/* Put all your code here */ -void main(void) { - /* uint8_t is an unsigned integer that can range from 0-255. */ - /* It performs faster than just an int, so try to use it (or int8_t) when possible */ - uint8_t count; - - /* Initialize some strings */ - const char *HelloWorld = "Hello World!"; - const char *Welcome = "Welcome to C!"; - - /* Clear the homescreen */ - os_ClrHome(); - - /* Print a few strings */ - printText(HelloWorld, 0, 0); - printText(Welcome, 0, 1); - - /* Wait for a key press */ - while (!os_GetCSC()); -} - -/* Draw text on the homescreen at the given X/Y location */ -void printText(const char *text, uint8_t xpos, uint8_t ypos) { - os_SetCursorPos(ypos, xpos); - os_PutStrFull(text); -} - -/* Draw small text at the given X/Y location */ -void printTextSmall(const char *text, uint8_t xpos, uint8_t ypos) { - os_FontSelect(0); // sets small font (1 == big, see docs) - os_FontDrawText(text, xpos, ypos); -} +/* Keep these headers */ +#include +#include +#include +#include + +/* Standard headers */ +#include +#include +#include +#include + +/* Put function prototypes here */ +void printText(const char *text, uint8_t x, uint8_t y); +void printTextSmall(const char *text, uint8_t xpos, uint8_t ypos); + +/* Put all your code here */ +void main(void) { + /* uint8_t is an unsigned integer that can range from 0-255. */ + /* It performs faster than just an int, so try to use it (or int8_t) when possible */ + uint8_t count; + + /* Initialize some strings */ + const char *HelloWorld = "Hello World!"; + const char *Welcome = "Welcome to C!"; + + /* Clear the homescreen */ + os_ClrHome(); + + /* Print a few strings */ + printText(HelloWorld, 0, 0); + printText(Welcome, 0, 1); + + /* Wait for a key press */ + while (!os_GetCSC()); +} + +/* Draw text on the homescreen at the given X/Y location */ +void printText(const char *text, uint8_t xpos, uint8_t ypos) { + os_SetCursorPos(ypos, xpos); + os_PutStrFull(text); +} + +/* Draw small text at the given X/Y location */ +void printTextSmall(const char *text, uint8_t xpos, uint8_t ypos) { + os_FontSelect(0); // sets small font (1 == big, see docs) + os_FontDrawText(text, xpos, ypos); +} diff --git a/frontends/calculator/CEdev/examples/keypad_arrows/autotester.json b/frontends/calculator/CEdev/examples/keypad_arrows/autotester.json index c81becf..61768c3 100644 --- a/frontends/calculator/CEdev/examples/keypad_arrows/autotester.json +++ b/frontends/calculator/CEdev/examples/keypad_arrows/autotester.json @@ -1,61 +1,61 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "delay|500", - "key|down", - "hash|1", - "delay|200", - "key|right", - "hash|2", - "delay|200", - "key|up", - "hash|3", - "delay|200", - "key|left", - "hash|4", - "delay|200", - "key|2nd", - "hashWait|5" - ], - "hashes": { - "1": { - "description": "The screen is black", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "AF74BFCB" ] - }, - "2": { - "description": "The screen is red", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "D2E7DAC8" ] - }, - "3": { - "description": "The screen is white", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "3132DE74" ] - }, - "4": { - "description": "The screen is red (other)", - "start": "vram_start", - "size": "vram_8_size", - "expected_CRCs": [ "74B02578" ] - }, - "5": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} - +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "delay|500", + "key|down", + "hash|1", + "delay|200", + "key|right", + "hash|2", + "delay|200", + "key|up", + "hash|3", + "delay|200", + "key|left", + "hash|4", + "delay|200", + "key|2nd", + "hashWait|5" + ], + "hashes": { + "1": { + "description": "The screen is black", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "AF74BFCB" ] + }, + "2": { + "description": "The screen is red", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "D2E7DAC8" ] + }, + "3": { + "description": "The screen is white", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "3132DE74" ] + }, + "4": { + "description": "The screen is red (other)", + "start": "vram_start", + "size": "vram_8_size", + "expected_CRCs": [ "74B02578" ] + }, + "5": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} + diff --git a/frontends/calculator/CEdev/examples/keypad_arrows/makefile b/frontends/calculator/CEdev/examples/keypad_arrows/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/keypad_arrows/makefile +++ b/frontends/calculator/CEdev/examples/keypad_arrows/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/keypad_arrows/readme.md b/frontends/calculator/CEdev/examples/keypad_arrows/readme.md index 698dd4e..486b144 100644 --- a/frontends/calculator/CEdev/examples/keypad_arrows/readme.md +++ b/frontends/calculator/CEdev/examples/keypad_arrows/readme.md @@ -1,10 +1,10 @@ -### Keypad Arrow Key Demo - -This demo changes the color of the screen depending on which arrow keys are pressed. - -![Screenshot](screenshot.gif) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### Keypad Arrow Key Demo + +This demo changes the color of the screen depending on which arrow keys are pressed. + +![Screenshot](screenshot.gif) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/keypad_arrows/src/main.c b/frontends/calculator/CEdev/examples/keypad_arrows/src/main.c index c4f7adf..e358faf 100644 --- a/frontends/calculator/CEdev/examples/keypad_arrows/src/main.c +++ b/frontends/calculator/CEdev/examples/keypad_arrows/src/main.c @@ -1,49 +1,49 @@ -#include -#include -#include -#include - -#include -#include -#include - -#include - -/* Function Prototypes */ -void fill_screen(uint8_t color); - -void main(void) { - /* Key variable */ - kb_key_t key; - - /* Loop until 2nd is pressed */ - do { - /* Update kb_Data */ - kb_Scan(); - - /* Load group 7 registers */ - key = kb_Data[7]; - - switch (key) { - case kb_Down: /* Change screen color to black */ - fill_screen(0x00); - break; - case kb_Right: /* Change screen color to red */ - fill_screen(0xE0); - break; - case kb_Up: /* Change screen color to white */ - fill_screen(0xFF); - break; - case kb_Left: /* Change screen color to a different red */ - fill_screen(0xC0); - break; - default: - break; - } - } while (kb_Data[1] != kb_2nd); -} - -/* Simple way to fill the screen with a given color */ -void fill_screen(uint8_t color) { - memset(lcd_Ram, color, LCD_SIZE); -} +#include +#include +#include +#include + +#include +#include +#include + +#include + +/* Function Prototypes */ +void fill_screen(uint8_t color); + +void main(void) { + /* Key variable */ + kb_key_t key; + + /* Loop until 2nd is pressed */ + do { + /* Update kb_Data */ + kb_Scan(); + + /* Load group 7 registers */ + key = kb_Data[7]; + + switch (key) { + case kb_Down: /* Change screen color to black */ + fill_screen(0x00); + break; + case kb_Right: /* Change screen color to red */ + fill_screen(0xE0); + break; + case kb_Up: /* Change screen color to white */ + fill_screen(0xFF); + break; + case kb_Left: /* Change screen color to a different red */ + fill_screen(0xC0); + break; + default: + break; + } + } while (kb_Data[1] != kb_2nd); +} + +/* Simple way to fill the screen with a given color */ +void fill_screen(uint8_t color) { + memset(lcd_Ram, color, LCD_SIZE); +} diff --git a/frontends/calculator/CEdev/examples/keypad_multiple_keys/autotester.json b/frontends/calculator/CEdev/examples/keypad_multiple_keys/autotester.json index ea6581f..33e2115 100644 --- a/frontends/calculator/CEdev/examples/keypad_multiple_keys/autotester.json +++ b/frontends/calculator/CEdev/examples/keypad_multiple_keys/autotester.json @@ -1,62 +1,62 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "delay|500", - "key|down", - "hash|1", - "delay|200", - "key|right", - "hash|2", - "delay|200", - "key|up", - "hash|3", - "delay|200", - "key|left", - "hash|4", - "delay|200", - "key|2nd", - "delay|300", - "hashWait|5" - ], - "hashes": { - "1": { - "description": "The screen shows Down", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "349F4775" ] - }, - "2": { - "description": "The screen shows Right", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "349F4775" ] - }, - "3": { - "description": "The screen shows Up", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "349F4775" ] - }, - "4": { - "description": "The screen shows Left", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "349F4775" ] - }, - "5": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} - +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "delay|500", + "key|down", + "hash|1", + "delay|200", + "key|right", + "hash|2", + "delay|200", + "key|up", + "hash|3", + "delay|200", + "key|left", + "hash|4", + "delay|200", + "key|2nd", + "delay|300", + "hashWait|5" + ], + "hashes": { + "1": { + "description": "The screen shows Down", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "349F4775" ] + }, + "2": { + "description": "The screen shows Right", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "349F4775" ] + }, + "3": { + "description": "The screen shows Up", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "349F4775" ] + }, + "4": { + "description": "The screen shows Left", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "349F4775" ] + }, + "5": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} + diff --git a/frontends/calculator/CEdev/examples/keypad_multiple_keys/makefile b/frontends/calculator/CEdev/examples/keypad_multiple_keys/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/keypad_multiple_keys/makefile +++ b/frontends/calculator/CEdev/examples/keypad_multiple_keys/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/keypad_multiple_keys/readme.md b/frontends/calculator/CEdev/examples/keypad_multiple_keys/readme.md index 170f907..4a34d2e 100644 --- a/frontends/calculator/CEdev/examples/keypad_multiple_keys/readme.md +++ b/frontends/calculator/CEdev/examples/keypad_multiple_keys/readme.md @@ -1,10 +1,10 @@ -### Keypad Multiple Keys Demo - -This demo shows how to interpret multiple keypresses at the same time - -![Screenshot](screenshot.gif) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### Keypad Multiple Keys Demo + +This demo shows how to interpret multiple keypresses at the same time + +![Screenshot](screenshot.gif) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/keypad_multiple_keys/src/main.c b/frontends/calculator/CEdev/examples/keypad_multiple_keys/src/main.c index fbe3ffa..715d437 100644 --- a/frontends/calculator/CEdev/examples/keypad_multiple_keys/src/main.c +++ b/frontends/calculator/CEdev/examples/keypad_multiple_keys/src/main.c @@ -1,60 +1,60 @@ -#include -#include -#include -#include - -#include -#include -#include - -#include - -/* Function prototypes */ -void printText(int8_t xpos, int8_t ypos, const char *text); - -void main(void) { - /* Key variable */ - kb_key_t key; - const char *erase_string = " "; - - /* Clear the homescreen */ - os_ClrHome(); - - /* Loop until 2nd is pressed */ - do { - - /* Update kb_Data */ - kb_Scan(); - - key = kb_Data[7]; - - /* Print the current arrow key input */ - if (key & kb_Down) { - printText(0, 0, "Down"); - } else { - printText(0, 0, erase_string); - } - if (key & kb_Up) { - printText(0, 1, "Up"); - } else { - printText(0, 1, erase_string); - } - if (key & kb_Left) { - printText(0, 2, "Left"); - } else { - printText(0, 2, erase_string); - } - if (key & kb_Right) { - printText(0, 3, "Right"); - } else { - printText(0, 3, erase_string); - } - - } while (kb_Data[1] != kb_2nd); -} - -/* Draw text on the homescreen at the given X/Y location */ -void printText(int8_t xpos, int8_t ypos, const char *text) { - os_SetCursorPos(ypos, xpos); - os_PutStrFull(text); -} +#include +#include +#include +#include + +#include +#include +#include + +#include + +/* Function prototypes */ +void printText(int8_t xpos, int8_t ypos, const char *text); + +void main(void) { + /* Key variable */ + kb_key_t key; + const char *erase_string = " "; + + /* Clear the homescreen */ + os_ClrHome(); + + /* Loop until 2nd is pressed */ + do { + + /* Update kb_Data */ + kb_Scan(); + + key = kb_Data[7]; + + /* Print the current arrow key input */ + if (key & kb_Down) { + printText(0, 0, "Down"); + } else { + printText(0, 0, erase_string); + } + if (key & kb_Up) { + printText(0, 1, "Up"); + } else { + printText(0, 1, erase_string); + } + if (key & kb_Left) { + printText(0, 2, "Left"); + } else { + printText(0, 2, erase_string); + } + if (key & kb_Right) { + printText(0, 3, "Right"); + } else { + printText(0, 3, erase_string); + } + + } while (kb_Data[1] != kb_2nd); +} + +/* Draw text on the homescreen at the given X/Y location */ +void printText(int8_t xpos, int8_t ypos, const char *text) { + os_SetCursorPos(ypos, xpos); + os_PutStrFull(text); +} diff --git a/frontends/calculator/CEdev/examples/lcd_fade/makefile b/frontends/calculator/CEdev/examples/lcd_fade/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/lcd_fade/makefile +++ b/frontends/calculator/CEdev/examples/lcd_fade/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/lcd_fade/readme.md b/frontends/calculator/CEdev/examples/lcd_fade/readme.md index caa170e..4917042 100644 --- a/frontends/calculator/CEdev/examples/lcd_fade/readme.md +++ b/frontends/calculator/CEdev/examples/lcd_fade/readme.md @@ -1,8 +1,8 @@ -### LCD Fade Demo - -This demo demonstrates controlling the LCD backlight by fading in and out - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### LCD Fade Demo + +This demo demonstrates controlling the LCD backlight by fading in and out + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/lcd_fade/src/main.c b/frontends/calculator/CEdev/examples/lcd_fade/src/main.c index b529d01..c7ae436 100644 --- a/frontends/calculator/CEdev/examples/lcd_fade/src/main.c +++ b/frontends/calculator/CEdev/examples/lcd_fade/src/main.c @@ -1,29 +1,29 @@ -#include -#include -#include -#include - -#include -#include -#include - -void main(void) { - uint8_t i, level; - - /* Store the current brightness level */ - level = lcd_BacklightLevel; - - /* Change lcd brightness levels */ - for (i = level; i > 0; i--) { - boot_WaitShort(); - lcd_BacklightLevel = i; - } - - for (i = 0; i < 255; i++) { - boot_WaitShort(); - lcd_BacklightLevel = i; - } - - /* Restore the old brightness level */ - lcd_BacklightLevel = level; -} +#include +#include +#include +#include + +#include +#include +#include + +void main(void) { + uint8_t i, level; + + /* Store the current brightness level */ + level = lcd_BacklightLevel; + + /* Change lcd brightness levels */ + for (i = level; i > 0; i--) { + boot_WaitShort(); + lcd_BacklightLevel = i; + } + + for (i = 0; i < 255; i++) { + boot_WaitShort(); + lcd_BacklightLevel = i; + } + + /* Restore the old brightness level */ + lcd_BacklightLevel = level; +} diff --git a/frontends/calculator/CEdev/examples/lcd_fill/makefile b/frontends/calculator/CEdev/examples/lcd_fill/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/lcd_fill/makefile +++ b/frontends/calculator/CEdev/examples/lcd_fill/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/lcd_fill/readme.md b/frontends/calculator/CEdev/examples/lcd_fill/readme.md index 233ffc8..ca0a9a0 100644 --- a/frontends/calculator/CEdev/examples/lcd_fill/readme.md +++ b/frontends/calculator/CEdev/examples/lcd_fill/readme.md @@ -1,10 +1,10 @@ -### Fill Screen Demo - -This is a simple demo to demonstrate filling the screen with a certain color. - -![Screenshot](screenshot.gif) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### Fill Screen Demo + +This is a simple demo to demonstrate filling the screen with a certain color. + +![Screenshot](screenshot.gif) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/lcd_fill/src/main.c b/frontends/calculator/CEdev/examples/lcd_fill/src/main.c index ee96bf7..6204a9d 100644 --- a/frontends/calculator/CEdev/examples/lcd_fill/src/main.c +++ b/frontends/calculator/CEdev/examples/lcd_fill/src/main.c @@ -1,30 +1,30 @@ -#include -#include -#include -#include - -#include -#include -#include - -/* Function prototypes */ -void fill_screen(uint8_t color); - -void main(void) { - /* Turn the whole screen black */ - fill_screen(0x00); - - /* Wait for a key press */ - while (!os_GetCSC()); - - /* Turn the whole screen red */ - fill_screen(0xe0); - - /* Wait for a key press */ - while (!os_GetCSC()); -} - -/* Fill the screen with a given color */ -void fill_screen(uint8_t color) { - memset(lcd_Ram, color, LCD_SIZE); -} +#include +#include +#include +#include + +#include +#include +#include + +/* Function prototypes */ +void fill_screen(uint8_t color); + +void main(void) { + /* Turn the whole screen black */ + fill_screen(0x00); + + /* Wait for a key press */ + while (!os_GetCSC()); + + /* Turn the whole screen red */ + fill_screen(0xe0); + + /* Wait for a key press */ + while (!os_GetCSC()); +} + +/* Fill the screen with a given color */ +void fill_screen(uint8_t color) { + memset(lcd_Ram, color, LCD_SIZE); +} diff --git a/frontends/calculator/CEdev/examples/makefile b/frontends/calculator/CEdev/examples/makefile index 852ed6c..33f84cd 100644 --- a/frontends/calculator/CEdev/examples/makefile +++ b/frontends/calculator/CEdev/examples/makefile @@ -1,12 +1,12 @@ -#----------------------------------------------- -# This makefile builds all the example projects -#----------------------------------------------- - -DIRS = $(wildcard */makefile) - -all clean gfx .PHONY: $(DIRS) - -$(DIRS): - $(MAKE) -C $(dir $@) $(MAKECMDGOALS) - -.PHONY: all clean gfx +#----------------------------------------------- +# This makefile builds all the example projects +#----------------------------------------------- + +DIRS = $(wildcard */makefile) + +all clean gfx .PHONY: $(DIRS) + +$(DIRS): + $(MAKE) -C $(dir $@) $(MAKECMDGOALS) + +.PHONY: all clean gfx diff --git a/frontends/calculator/CEdev/examples/os_input/autotester.json b/frontends/calculator/CEdev/examples/os_input/autotester.json index da88dfe..b7e1247 100644 --- a/frontends/calculator/CEdev/examples/os_input/autotester.json +++ b/frontends/calculator/CEdev/examples/os_input/autotester.json @@ -1,38 +1,38 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "delay|700", - "key|1", - "delay|200", - "key|2", - "delay|200", - "key|enter", - "hashWait|1", - "key|enter", - "hashWait|2" - ], - "hashes": { - "1": { - "description": "Output should be 'N is 12.'", - "start": "0xD44B00", - "size": "128000", - "size_comment": "offset + 320x200x2 because we don't want the busy indicator", - "expected_CRCs": [ "44FD49F5" ] - }, - "2": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} - +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "delay|700", + "key|1", + "delay|200", + "key|2", + "delay|200", + "key|enter", + "hashWait|1", + "key|enter", + "hashWait|2" + ], + "hashes": { + "1": { + "description": "Output should be 'N is 12.'", + "start": "0xD44B00", + "size": "128000", + "size_comment": "offset + 320x200x2 because we don't want the busy indicator", + "expected_CRCs": [ "44FD49F5" ] + }, + "2": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} + diff --git a/frontends/calculator/CEdev/examples/os_input/makefile b/frontends/calculator/CEdev/examples/os_input/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/os_input/makefile +++ b/frontends/calculator/CEdev/examples/os_input/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/os_input/readme.md b/frontends/calculator/CEdev/examples/os_input/readme.md index e0f6d7b..1e35256 100644 --- a/frontends/calculator/CEdev/examples/os_input/readme.md +++ b/frontends/calculator/CEdev/examples/os_input/readme.md @@ -1,9 +1,9 @@ -### OS Input Demo - -This demo shows how to get an input string from the OS. - -![Screenshot](screenshot.png) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. +### OS Input Demo + +This demo shows how to get an input string from the OS. + +![Screenshot](screenshot.png) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. diff --git a/frontends/calculator/CEdev/examples/os_input/src/main.c b/frontends/calculator/CEdev/examples/os_input/src/main.c index 7674897..a2fa7c0 100644 --- a/frontends/calculator/CEdev/examples/os_input/src/main.c +++ b/frontends/calculator/CEdev/examples/os_input/src/main.c @@ -1,36 +1,36 @@ -#include -#include -#include -#include -#include - -/* Make sure to adjust those sizes according to your usage! */ -#define INPUT_SIZE 10 -#define RESP_SIZE 20 - -/* Draw text on the homescreen at the given X/Y location */ -void print(const char* text, uint8_t xpos, uint8_t ypos) { - os_SetCursorPos(ypos, xpos); - os_PutStrFull(text); -} - -void main(void) { - char inputBuffer[INPUT_SIZE]; - char response[RESP_SIZE]; - - /* Clear the homescreen */ - os_ClrHome(); - - /* Ask the user to type a string, which gets stored in `inputBuf` */ - os_GetStringInput("What is N? ", inputBuffer, INPUT_SIZE); - - /* Build the user response */ - sprintf(response, "N is %s.", inputBuffer); - - /* Clear the homescreen and display the built response */ - os_ClrHome(); - print(response, 0, 0); - - /* Wait for a key press before quitting */ - while (!os_GetCSC()); -} +#include +#include +#include +#include +#include + +/* Make sure to adjust those sizes according to your usage! */ +#define INPUT_SIZE 10 +#define RESP_SIZE 20 + +/* Draw text on the homescreen at the given X/Y location */ +void print(const char* text, uint8_t xpos, uint8_t ypos) { + os_SetCursorPos(ypos, xpos); + os_PutStrFull(text); +} + +void main(void) { + char inputBuffer[INPUT_SIZE]; + char response[RESP_SIZE]; + + /* Clear the homescreen */ + os_ClrHome(); + + /* Ask the user to type a string, which gets stored in `inputBuf` */ + os_GetStringInput("What is N? ", inputBuffer, INPUT_SIZE); + + /* Build the user response */ + sprintf(response, "N is %s.", inputBuffer); + + /* Clear the homescreen and display the built response */ + os_ClrHome(); + print(response, 0, 0); + + /* Wait for a key press before quitting */ + while (!os_GetCSC()); +} diff --git a/frontends/calculator/CEdev/examples/random/autotester.json b/frontends/calculator/CEdev/examples/random/autotester.json index b41ad50..57db73a 100644 --- a/frontends/calculator/CEdev/examples/random/autotester.json +++ b/frontends/calculator/CEdev/examples/random/autotester.json @@ -1,30 +1,30 @@ -{ - "rom": "84pce_515.rom", - "transfer_files": [ - "bin/DEMO.8xp" - ], - "target": { - "name": "DEMO", - "isASM": true - }, - "sequence": [ - "action|launch", - "hashWait|1", - "key|enter", - "hashWait|2" - ], - "hashes": { - "1": { - "description": "VRAM filled with output of random()", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "5FB4A617" ] - }, - "2": { - "description": "Back to the home screen (exit check)", - "start": "vram_start", - "size": "vram_16_size", - "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] - } - } -} +{ + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "hashWait|1", + "key|enter", + "hashWait|2" + ], + "hashes": { + "1": { + "description": "VRAM filled with output of random()", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "5FB4A617" ] + }, + "2": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} diff --git a/frontends/calculator/CEdev/examples/random/bin/DEMO.map b/frontends/calculator/CEdev/examples/random/bin/DEMO.map index 294fb77..95b082a 100644 --- a/frontends/calculator/CEdev/examples/random/bin/DEMO.map +++ b/frontends/calculator/CEdev/examples/random/bin/DEMO.map @@ -1,143 +1,143 @@ -Segment Base Top High Length --------- ------ ------ ------ ------- -icon D1A882 D1A882 0h -launcher D1A882 D1A882 0h -libs D1A882 D1A882 0h -startup D1A882 D1A8C1 3Fh -cleanup D1A8C1 D1A8D5 14h -exit D1A8D5 D1A8DB 6h -code D1A8DB D1A9A0 C5h -data D1A9A0 D1A9B0 10h -strsect D1A9B0 D1A9B0 0h -text D1A9B0 D1A9B0 0h -bss D031F6 D031F6 D13FD6 0h -header D1A87F D1A882 3h - -Label Value -------------------------- ------ -_os_DisableHomeTextBuffer = D1A8DB -_os_EnableHomeTextBuffer = D1A8ED -_random = D1A8FF -__state = D1A9A0 -_boot_GetBootMajorVer = 000080 -_boot_GetHardwareVer = 000084 -_boot_GetBootMinorVer = 00008C -_boot_DebugPrintf = 0000B4 -_boot_ClearVRAM = 000374 -_boot_TurnOff = 000388 -_boot_NewLine = 000390 -_boot_Set6MHzMode = 00039C -_boot_Set48MHzMode = 0003A0 -_boot_Set6MHzModeI = 0003A4 -_boot_Set48MHzModeI = 0003A8 -_boot_GetBatteryStatus = 0003B0 -_boot_WaitShort = 0003B4 -_boot_CheckOnPressed = 00057C -_boot_SetDate = 000598 -_boot_GetDate = 0005A8 -_boot_GetTime = 0005B0 -_boot_SetTime = 0005B4 -_boot_IsAfterNoon = 0005C8 -_os_NewLine = 0207F0 -_os_PushErrorHandler = 021C78 -_os_PopErrorHandler = 021C7C -_os_ThrowError = 021C80 -_os_RealCopy = 021C84 -_os_RealAsinRad = 021C88 -_os_RealAcosRad = 021C8C -_os_RealAtanRad = 021C90 -_os_RealAdd = 021C94 -_os_CplxSquare = 021C98 -_os_RealCompare = 021C9C -_os_RealCosRad = 021CA0 -_os_RealRadToDeg = 021CA4 -_os_RealDiv = 021CA8 -_os_RealExp = 021CAC -_os_RealFloor = 021CB0 -_os_RealToStr = 021CB4 -_os_RealFrac = 021CB8 -_os_RealGcd = 021CBC -_os_RealRoundInt = 021CC0 -_os_RealLcm = 021CC4 -_os_RealLog = 021CC8 -_os_RealMax = 021CCC -_os_RealMin = 021CD0 -_os_RealMul = 021CD4 -_os_RealNcr = 021CD8 -_os_RealNeg = 021CDC -_os_RealNpr = 021CE0 -_os_RealPow = 021CE4 -_os_RealDegToRad = 021CE8 -_os_RealRandInt = 021CEC -_os_RealInv = 021CF0 -_os_RealMod = 021CF4 -_os_RealRound = 021CF8 -_os_RealSinRad = 021CFC -_os_RealSqrt = 021D00 -_os_RealSub = 021D04 -_os_RealTanRad = 021D08 -_os_StrToReal = 021D0C -_os_RealInt = 021D10 -_os_SetFlagBits = 021D14 -_os_ResetFlagBits = 021D18 -_os_TestFlagBits = 021D1C -_os_SetFlagByte = 021D20 -_os_GetFlagByte = 021D24 -_os_GetCursorPos = 021D28 -_os_PutStrFull = 021D2C -_os_PutStrLine = 021D30 -_os_SetCursorPos = 021D34 -_os_AppInit = 021D40 -_os_GetKey = 021D38 -_os_GetCSC = 021D3C -_os_DisableCursor = 021DE4 -_os_EnableCursor = 021DE8 -_os_FontDrawText = 021E00 -_os_FontGetHeight = 021E14 -_os_FontGetWidth = 021E18 -_os_InitDrawing = 021E1C -_os_SetDrawBGColor = 021E20 -_os_SetDrawFGColor = 021E24 -_os_FontSelect = 021E28 -_os_RclAns = 021E70 -_os_SetTimer1 = 021EC8 -_os_DisableTimer1 = 021ECC -_os_GetSystemStats = 021ED4 -_os_GetDrawBGColor = 021EE4 -_os_GetDrawFGColor = 021EE8 -_os_FontGetID = 021EEC -_os_RealToInt24 = 021EF4 -_os_Int24ToReal = 021EF8 -_os_ForceCmdNoChar = 021FA8 -_os_GetSymTablePtr = 021FB0 -_os_NextSymEntry = 021FB4 -_os_ChkFindSym = 021FB8 -_os_MemChk = 021FF0 -_os_SetTimer2 = 022080 -_os_DisableTimer2 = 022084 -_os_FloatToReal = 022170 -_os_RealToFloat = 022174 -_os_FontDrawTransText = 022178 -_os_CreateAppVar = 022184 -_asm_MoveDown = 0207F4 -_asm_MoveUp = 020800 -_asm_ClrLCDFull = 020808 -_asm_ClrLCD = 02080C -_asm_ClrTxtShd = 020818 -_asm_HomeUp = 020828 -_asm_RunIndicOn = 020844 -_asm_RunIndicOff = 020848 -_asm_DelRes = 020E5C -_asm_DisableAPD = 021134 -_asm_EnableAPD = 021138 -_asm_DrawStatusBar = 021A3C -_asm_ArcChk = 022040 -__frameset = D1A956 -__ccleanup = D1A8C1 -_errno = D008DC -_init = D1A882 -_exit = D1A8D7 -__exit = D1A8B0 -__exitsp = D1A8B0 -__errsp = D1A8B0 -_main = D1A964 +Segment Base Top High Length +-------- ------ ------ ------ ------- +icon D1A882 D1A882 0h +launcher D1A882 D1A882 0h +libs D1A882 D1A882 0h +startup D1A882 D1A8C1 3Fh +cleanup D1A8C1 D1A8D5 14h +exit D1A8D5 D1A8DB 6h +code D1A8DB D1A9A0 C5h +data D1A9A0 D1A9B0 10h +strsect D1A9B0 D1A9B0 0h +text D1A9B0 D1A9B0 0h +bss D031F6 D031F6 D13FD6 0h +header D1A87F D1A882 3h + +Label Value +------------------------- ------ +_os_DisableHomeTextBuffer = D1A8DB +_os_EnableHomeTextBuffer = D1A8ED +_random = D1A8FF +__state = D1A9A0 +_boot_GetBootMajorVer = 000080 +_boot_GetHardwareVer = 000084 +_boot_GetBootMinorVer = 00008C +_boot_DebugPrintf = 0000B4 +_boot_ClearVRAM = 000374 +_boot_TurnOff = 000388 +_boot_NewLine = 000390 +_boot_Set6MHzMode = 00039C +_boot_Set48MHzMode = 0003A0 +_boot_Set6MHzModeI = 0003A4 +_boot_Set48MHzModeI = 0003A8 +_boot_GetBatteryStatus = 0003B0 +_boot_WaitShort = 0003B4 +_boot_CheckOnPressed = 00057C +_boot_SetDate = 000598 +_boot_GetDate = 0005A8 +_boot_GetTime = 0005B0 +_boot_SetTime = 0005B4 +_boot_IsAfterNoon = 0005C8 +_os_NewLine = 0207F0 +_os_PushErrorHandler = 021C78 +_os_PopErrorHandler = 021C7C +_os_ThrowError = 021C80 +_os_RealCopy = 021C84 +_os_RealAsinRad = 021C88 +_os_RealAcosRad = 021C8C +_os_RealAtanRad = 021C90 +_os_RealAdd = 021C94 +_os_CplxSquare = 021C98 +_os_RealCompare = 021C9C +_os_RealCosRad = 021CA0 +_os_RealRadToDeg = 021CA4 +_os_RealDiv = 021CA8 +_os_RealExp = 021CAC +_os_RealFloor = 021CB0 +_os_RealToStr = 021CB4 +_os_RealFrac = 021CB8 +_os_RealGcd = 021CBC +_os_RealRoundInt = 021CC0 +_os_RealLcm = 021CC4 +_os_RealLog = 021CC8 +_os_RealMax = 021CCC +_os_RealMin = 021CD0 +_os_RealMul = 021CD4 +_os_RealNcr = 021CD8 +_os_RealNeg = 021CDC +_os_RealNpr = 021CE0 +_os_RealPow = 021CE4 +_os_RealDegToRad = 021CE8 +_os_RealRandInt = 021CEC +_os_RealInv = 021CF0 +_os_RealMod = 021CF4 +_os_RealRound = 021CF8 +_os_RealSinRad = 021CFC +_os_RealSqrt = 021D00 +_os_RealSub = 021D04 +_os_RealTanRad = 021D08 +_os_StrToReal = 021D0C +_os_RealInt = 021D10 +_os_SetFlagBits = 021D14 +_os_ResetFlagBits = 021D18 +_os_TestFlagBits = 021D1C +_os_SetFlagByte = 021D20 +_os_GetFlagByte = 021D24 +_os_GetCursorPos = 021D28 +_os_PutStrFull = 021D2C +_os_PutStrLine = 021D30 +_os_SetCursorPos = 021D34 +_os_AppInit = 021D40 +_os_GetKey = 021D38 +_os_GetCSC = 021D3C +_os_DisableCursor = 021DE4 +_os_EnableCursor = 021DE8 +_os_FontDrawText = 021E00 +_os_FontGetHeight = 021E14 +_os_FontGetWidth = 021E18 +_os_InitDrawing = 021E1C +_os_SetDrawBGColor = 021E20 +_os_SetDrawFGColor = 021E24 +_os_FontSelect = 021E28 +_os_RclAns = 021E70 +_os_SetTimer1 = 021EC8 +_os_DisableTimer1 = 021ECC +_os_GetSystemStats = 021ED4 +_os_GetDrawBGColor = 021EE4 +_os_GetDrawFGColor = 021EE8 +_os_FontGetID = 021EEC +_os_RealToInt24 = 021EF4 +_os_Int24ToReal = 021EF8 +_os_ForceCmdNoChar = 021FA8 +_os_GetSymTablePtr = 021FB0 +_os_NextSymEntry = 021FB4 +_os_ChkFindSym = 021FB8 +_os_MemChk = 021FF0 +_os_SetTimer2 = 022080 +_os_DisableTimer2 = 022084 +_os_FloatToReal = 022170 +_os_RealToFloat = 022174 +_os_FontDrawTransText = 022178 +_os_CreateAppVar = 022184 +_asm_MoveDown = 0207F4 +_asm_MoveUp = 020800 +_asm_ClrLCDFull = 020808 +_asm_ClrLCD = 02080C +_asm_ClrTxtShd = 020818 +_asm_HomeUp = 020828 +_asm_RunIndicOn = 020844 +_asm_RunIndicOff = 020848 +_asm_DelRes = 020E5C +_asm_DisableAPD = 021134 +_asm_EnableAPD = 021138 +_asm_DrawStatusBar = 021A3C +_asm_ArcChk = 022040 +__frameset = D1A956 +__ccleanup = D1A8C1 +_errno = D008DC +_init = D1A882 +_exit = D1A8D7 +__exit = D1A8B0 +__exitsp = D1A8B0 +__errsp = D1A8B0 +_main = D1A964 diff --git a/frontends/calculator/CEdev/examples/random/makefile b/frontends/calculator/CEdev/examples/random/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/random/makefile +++ b/frontends/calculator/CEdev/examples/random/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/random/readme.md b/frontends/calculator/CEdev/examples/random/readme.md index 776d1f8..ffae68a 100644 --- a/frontends/calculator/CEdev/examples/random/readme.md +++ b/frontends/calculator/CEdev/examples/random/readme.md @@ -1,9 +1,9 @@ -### Random Fill Screen Demo - -This is a simple demo to demonstrate filling the screen with random colors. - -![Screenshot](screenshot.png) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. +### Random Fill Screen Demo + +This is a simple demo to demonstrate filling the screen with random colors. + +![Screenshot](screenshot.png) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. diff --git a/frontends/calculator/CEdev/examples/random/src/main.c b/frontends/calculator/CEdev/examples/random/src/main.c index 83477e4..3bd5070 100644 --- a/frontends/calculator/CEdev/examples/random/src/main.c +++ b/frontends/calculator/CEdev/examples/random/src/main.c @@ -1,19 +1,19 @@ -#include -#include -#include -#include - -#include -#include -#include - -void main(void) { - /* Fill VRAM with random data */ - uint32_t *lcd_Ram_i, *lcd_Ram_end = (uint32_t *) ((int) lcd_Ram + LCD_SIZE); - for (lcd_Ram_i = (uint32_t *) lcd_Ram; lcd_Ram_i < lcd_Ram_end; lcd_Ram_i++) { - *lcd_Ram_i = random(); - } - - /* Wait for a key press */ - while (!os_GetCSC()); -} +#include +#include +#include +#include + +#include +#include +#include + +void main(void) { + /* Fill VRAM with random data */ + uint32_t *lcd_Ram_i, *lcd_Ram_end = (uint32_t *) ((int) lcd_Ram + LCD_SIZE); + for (lcd_Ram_i = (uint32_t *) lcd_Ram; lcd_Ram_i < lcd_Ram_end; lcd_Ram_i++) { + *lcd_Ram_i = random(); + } + + /* Wait for a key press */ + while (!os_GetCSC()); +} diff --git a/frontends/calculator/CEdev/examples/real_time_clock/makefile b/frontends/calculator/CEdev/examples/real_time_clock/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/real_time_clock/makefile +++ b/frontends/calculator/CEdev/examples/real_time_clock/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/real_time_clock/readme.md b/frontends/calculator/CEdev/examples/real_time_clock/readme.md index 08554eb..548e5b5 100644 --- a/frontends/calculator/CEdev/examples/real_time_clock/readme.md +++ b/frontends/calculator/CEdev/examples/real_time_clock/readme.md @@ -1,10 +1,10 @@ -### Real Time Clock Demo - -This demo demonstrates how to use the basics of the real time clock (RTC) - -![Screenshot](screenshot.gif) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### Real Time Clock Demo + +This demo demonstrates how to use the basics of the real time clock (RTC) + +![Screenshot](screenshot.gif) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/real_time_clock/src/main.c b/frontends/calculator/CEdev/examples/real_time_clock/src/main.c index 1aa24cb..fa9b881 100644 --- a/frontends/calculator/CEdev/examples/real_time_clock/src/main.c +++ b/frontends/calculator/CEdev/examples/real_time_clock/src/main.c @@ -1,39 +1,39 @@ -#include -#include -#include -#include - -#include -#include -#include - -unsigned int seconds = 0; - -void main(void) { - - /* Clear the homescreen */ - os_ClrHome(); - - /* Randomize things */ - srand(rtc_Time()); - - /* Configure the RTC */ - rtc_LoadSeconds = rtc_LoadMinutes = rtc_LoadHours = rtc_LoadDays = 0; - rtc_Control = RTC_ENABLE | RTC_LOAD | RTC_SEC_INT_SOURCE; - - /* Wait for the RTC to load in the new values and then acknowledge all the interrupts */ - while (rtc_IsBusy()); - rtc_IntAcknowledge = RTC_INT_MASK; - - /* Wait until 5 seconds have passed */ - while (seconds < 5) { - - /* If a second passed, increment the second counter */ - if (rtc_IntStatus & RTC_SEC_INT) { - memset(lcd_Ram, randInt(0,255), LCD_SIZE); - seconds++; - - rtc_IntAcknowledge = rtc_IntStatus; - } - } -} +#include +#include +#include +#include + +#include +#include +#include + +unsigned int seconds = 0; + +void main(void) { + + /* Clear the homescreen */ + os_ClrHome(); + + /* Randomize things */ + srand(rtc_Time()); + + /* Configure the RTC */ + rtc_LoadSeconds = rtc_LoadMinutes = rtc_LoadHours = rtc_LoadDays = 0; + rtc_Control = RTC_ENABLE | RTC_LOAD | RTC_SEC_INT_SOURCE; + + /* Wait for the RTC to load in the new values and then acknowledge all the interrupts */ + while (rtc_IsBusy()); + rtc_IntAcknowledge = RTC_INT_MASK; + + /* Wait until 5 seconds have passed */ + while (seconds < 5) { + + /* If a second passed, increment the second counter */ + if (rtc_IntStatus & RTC_SEC_INT) { + memset(lcd_Ram, randInt(0,255), LCD_SIZE); + seconds++; + + rtc_IntAcknowledge = rtc_IntStatus; + } + } +} diff --git a/frontends/calculator/CEdev/examples/second_counter/makefile b/frontends/calculator/CEdev/examples/second_counter/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/second_counter/makefile +++ b/frontends/calculator/CEdev/examples/second_counter/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/second_counter/readme.md b/frontends/calculator/CEdev/examples/second_counter/readme.md index 9211916..c3ca06f 100644 --- a/frontends/calculator/CEdev/examples/second_counter/readme.md +++ b/frontends/calculator/CEdev/examples/second_counter/readme.md @@ -1,10 +1,10 @@ -### Second Counter Demo - -This demo demonstrates using the hardware timers, and makes a simple second counter - -![Screenshot](screenshot.gif) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### Second Counter Demo + +This demo demonstrates using the hardware timers, and makes a simple second counter + +![Screenshot](screenshot.gif) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/second_counter/src/main.c b/frontends/calculator/CEdev/examples/second_counter/src/main.c index 8a4ebc5..ba2e0ac 100644 --- a/frontends/calculator/CEdev/examples/second_counter/src/main.c +++ b/frontends/calculator/CEdev/examples/second_counter/src/main.c @@ -1,43 +1,43 @@ -#include -#include -#include -#include - -#include -#include -#include - -#define ONE_SECOND 32768/1 -#define HALF_SECOND 32768/2 -#define QUARTER_SECOND 32768/4 - -/* Put all your code here */ -void main(void) { - unsigned seconds = 0; - char str[10]; - - /* Clear the homescreen */ - os_ClrHome(); - - /* Disable the timer so it doesn't run when we don't want it to be running */ - timer_Control = TIMER1_DISABLE; - - /* By using the 32768 kHz clock, we can count for exactly 1 second here, or a different interval of time */ - timer_1_ReloadValue = timer_1_Counter = ONE_SECOND; - - /* Enable the timer, set it to the 32768 kHz clock, enable an interrupt once it reaches 0, and make it count down */ - timer_Control = TIMER1_ENABLE | TIMER1_32K | TIMER1_0INT | TIMER1_DOWN; - - do { - /* If the timer is reloaded, we reached 0 */ - if (timer_IntStatus & TIMER1_RELOADED) { - /* Print a string */ - sprintf(str, "%u", seconds++); - os_SetCursorPos(0, 0); - os_PutStrFull(str); - - /* Acknowledge the reload */ - timer_IntAcknowledge = TIMER1_RELOADED; - } - } while (!os_GetCSC()); -} +#include +#include +#include +#include + +#include +#include +#include + +#define ONE_SECOND 32768/1 +#define HALF_SECOND 32768/2 +#define QUARTER_SECOND 32768/4 + +/* Put all your code here */ +void main(void) { + unsigned seconds = 0; + char str[10]; + + /* Clear the homescreen */ + os_ClrHome(); + + /* Disable the timer so it doesn't run when we don't want it to be running */ + timer_Control = TIMER1_DISABLE; + + /* By using the 32768 kHz clock, we can count for exactly 1 second here, or a different interval of time */ + timer_1_ReloadValue = timer_1_Counter = ONE_SECOND; + + /* Enable the timer, set it to the 32768 kHz clock, enable an interrupt once it reaches 0, and make it count down */ + timer_Control = TIMER1_ENABLE | TIMER1_32K | TIMER1_0INT | TIMER1_DOWN; + + do { + /* If the timer is reloaded, we reached 0 */ + if (timer_IntStatus & TIMER1_RELOADED) { + /* Print a string */ + sprintf(str, "%u", seconds++); + os_SetCursorPos(0, 0); + os_PutStrFull(str); + + /* Acknowledge the reload */ + timer_IntAcknowledge = TIMER1_RELOADED; + } + } while (!os_GetCSC()); +} diff --git a/frontends/calculator/CEdev/examples/second_counter2/makefile b/frontends/calculator/CEdev/examples/second_counter2/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/second_counter2/makefile +++ b/frontends/calculator/CEdev/examples/second_counter2/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/second_counter2/readme.md b/frontends/calculator/CEdev/examples/second_counter2/readme.md index 8913644..eb125d3 100644 --- a/frontends/calculator/CEdev/examples/second_counter2/readme.md +++ b/frontends/calculator/CEdev/examples/second_counter2/readme.md @@ -1,10 +1,10 @@ -### Second Counter 2 Demo - -This demo demonstrates using more uses of the timers - -![Screenshot](screenshot.gif) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. - +### Second Counter 2 Demo + +This demo demonstrates using more uses of the timers + +![Screenshot](screenshot.gif) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. + diff --git a/frontends/calculator/CEdev/examples/second_counter2/src/main.c b/frontends/calculator/CEdev/examples/second_counter2/src/main.c index dff02f2..e2e6244 100644 --- a/frontends/calculator/CEdev/examples/second_counter2/src/main.c +++ b/frontends/calculator/CEdev/examples/second_counter2/src/main.c @@ -1,57 +1,57 @@ -#include -#include -#include -#include - -#include -#include -#include - -#define ONE_SECOND 32768/1 -#define HALF_SECOND 32768/2 -#define QUARTER_SECOND 32768/4 - -/* Function Prototypes */ -void reset_counter(void); - -void main(void) { - unsigned int count = 0; - char str[10]; - - timer_1_MatchValue_1 = ONE_SECOND; - - /* Clear the homescreen */ - os_ClrHome(); - - /* Reset the counter */ - reset_counter(); - - do { - - /* Poll until we reach the match value */ - if (timer_IntStatus & TIMER1_MATCH1) { - /* Print the count */ - sprintf(str, "%u", count++); - os_SetCursorPos(0, 0); - os_PutStrFull(str); - - /* Reset the count */ - reset_counter(); - - /* Acknowledge the interrupt */ - timer_IntStatus = TIMER1_MATCH1; - } - - } while (count < 5); -} - -void reset_counter(void) { - /* Disable the timer so it doesn't run when we don't want it to be running */ - timer_Control = TIMER1_DISABLE; - - /* By using the 32768 kHz clock, we can count for exactly 1 second here, or a different interval of time */ - timer_1_Counter = 0; - - /* Enable the timer, set it to the 32768 kHz clock, enable an interrupt once it reaches 0, and make it count down */ - timer_Control = TIMER1_ENABLE | TIMER1_32K | TIMER1_NOINT | TIMER1_UP; -} +#include +#include +#include +#include + +#include +#include +#include + +#define ONE_SECOND 32768/1 +#define HALF_SECOND 32768/2 +#define QUARTER_SECOND 32768/4 + +/* Function Prototypes */ +void reset_counter(void); + +void main(void) { + unsigned int count = 0; + char str[10]; + + timer_1_MatchValue_1 = ONE_SECOND; + + /* Clear the homescreen */ + os_ClrHome(); + + /* Reset the counter */ + reset_counter(); + + do { + + /* Poll until we reach the match value */ + if (timer_IntStatus & TIMER1_MATCH1) { + /* Print the count */ + sprintf(str, "%u", count++); + os_SetCursorPos(0, 0); + os_PutStrFull(str); + + /* Reset the count */ + reset_counter(); + + /* Acknowledge the interrupt */ + timer_IntStatus = TIMER1_MATCH1; + } + + } while (count < 5); +} + +void reset_counter(void) { + /* Disable the timer so it doesn't run when we don't want it to be running */ + timer_Control = TIMER1_DISABLE; + + /* By using the 32768 kHz clock, we can count for exactly 1 second here, or a different interval of time */ + timer_1_Counter = 0; + + /* Enable the timer, set it to the 32768 kHz clock, enable an interrupt once it reaches 0, and make it count down */ + timer_Control = TIMER1_ENABLE | TIMER1_32K | TIMER1_NOINT | TIMER1_UP; +} diff --git a/frontends/calculator/CEdev/examples/stopwatch/makefile b/frontends/calculator/CEdev/examples/stopwatch/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/stopwatch/makefile +++ b/frontends/calculator/CEdev/examples/stopwatch/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/stopwatch/readme.md b/frontends/calculator/CEdev/examples/stopwatch/readme.md index a10bdb9..f27edf4 100644 --- a/frontends/calculator/CEdev/examples/stopwatch/readme.md +++ b/frontends/calculator/CEdev/examples/stopwatch/readme.md @@ -1,10 +1,10 @@ -### Stopwatch Demo - -This demo demonstrates using the hardware timers to make a simple stopwatch -displaying millisecond precision. - -![Screenshot](screenshot.png) - ---- - -This demo is a part of the C SDK Toolchain for use on the CE. +### Stopwatch Demo + +This demo demonstrates using the hardware timers to make a simple stopwatch +displaying millisecond precision. + +![Screenshot](screenshot.png) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. diff --git a/frontends/calculator/CEdev/examples/stopwatch/src/main.c b/frontends/calculator/CEdev/examples/stopwatch/src/main.c index 3ec82b1..6dc8fdf 100644 --- a/frontends/calculator/CEdev/examples/stopwatch/src/main.c +++ b/frontends/calculator/CEdev/examples/stopwatch/src/main.c @@ -1,60 +1,60 @@ -#include -#include -#include -#include - -#include -#include -#include - -/* Print a stopwatch value on the home screen */ -void print(float elapsed) { - /* Float format for printf may be unimplemented, so go through an OS real */ - real_t elapsed_real; - - /* Max stopwatch value is (2^32 - 1) / 32768 = 131072.00, */ - /* so create a buffer with room for 9 characters plus a null terminator */ - char str[10]; - - /* If the elapsed time is small enough that the OS would print it using */ - /* scientific notation, force it down to zero before conversion */ - elapsed_real = os_FloatToReal(elapsed <= 0.001f ? 0.0f : elapsed); - - /* Convert the elapsed time real to a string */ - os_RealToStr(str, &elapsed_real, 8, 1, 2); - - /* Print the string */ - os_SetCursorPos(0, 0); - os_PutStrFull(str); -} - -/* Put all your code here */ -void main(void) { - /* Clear the homescreen */ - os_ClrHome(); - - /* Display an initial time of zero */ - print(0.0f); - - /* Disable the timer */ - timer_Control = TIMER1_DISABLE; - - /* Reset the timer's counter */ - timer_1_Counter = 0; - - /* Wait for a key press */ - while (!os_GetCSC()); - - /* Enable the timer while setting it to 32768 KHz and making it count up */ - timer_Control = TIMER1_ENABLE | TIMER1_32K | TIMER1_UP; - - /* Continue running until a key is pressed */ - do { - /* Calculate and print the elapsed time */ - float elapsed = (float)atomic_load_increasing_32(&timer_1_Counter) / 32768; - print(elapsed); - } while (!os_GetCSC()); - - /* Wait for a key press */ - while (!os_GetCSC()); -} +#include +#include +#include +#include + +#include +#include +#include + +/* Print a stopwatch value on the home screen */ +void print(float elapsed) { + /* Float format for printf may be unimplemented, so go through an OS real */ + real_t elapsed_real; + + /* Max stopwatch value is (2^32 - 1) / 32768 = 131072.00, */ + /* so create a buffer with room for 9 characters plus a null terminator */ + char str[10]; + + /* If the elapsed time is small enough that the OS would print it using */ + /* scientific notation, force it down to zero before conversion */ + elapsed_real = os_FloatToReal(elapsed <= 0.001f ? 0.0f : elapsed); + + /* Convert the elapsed time real to a string */ + os_RealToStr(str, &elapsed_real, 8, 1, 2); + + /* Print the string */ + os_SetCursorPos(0, 0); + os_PutStrFull(str); +} + +/* Put all your code here */ +void main(void) { + /* Clear the homescreen */ + os_ClrHome(); + + /* Display an initial time of zero */ + print(0.0f); + + /* Disable the timer */ + timer_Control = TIMER1_DISABLE; + + /* Reset the timer's counter */ + timer_1_Counter = 0; + + /* Wait for a key press */ + while (!os_GetCSC()); + + /* Enable the timer while setting it to 32768 KHz and making it count up */ + timer_Control = TIMER1_ENABLE | TIMER1_32K | TIMER1_UP; + + /* Continue running until a key is pressed */ + do { + /* Calculate and print the elapsed time */ + float elapsed = (float)atomic_load_increasing_32(&timer_1_Counter) / 32768; + print(elapsed); + } while (!os_GetCSC()); + + /* Wait for a key press */ + while (!os_GetCSC()); +} diff --git a/frontends/calculator/CEdev/examples/template/makefile b/frontends/calculator/CEdev/examples/template/makefile index 1f1b36b..d3deba8 100644 --- a/frontends/calculator/CEdev/examples/template/makefile +++ b/frontends/calculator/CEdev/examples/template/makefile @@ -1,15 +1,15 @@ -# ---------------------------- -# Set NAME to the program name -# Set ICON to the png icon file name -# Set DESCRIPTION to display within a compatible shell -# Set COMPRESSED to "YES" to create a compressed program -# ---------------------------- - -NAME ?= DEMO -COMPRESSED ?= NO -ICON ?= iconc.png -DESCRIPTION ?= "C SDK Demo" - -# ---------------------------- - -include $(CEDEV)/include/.makefile +# ---------------------------- +# Set NAME to the program name +# Set ICON to the png icon file name +# Set DESCRIPTION to display within a compatible shell +# Set COMPRESSED to "YES" to create a compressed program +# ---------------------------- + +NAME ?= DEMO +COMPRESSED ?= NO +ICON ?= iconc.png +DESCRIPTION ?= "C SDK Demo" + +# ---------------------------- + +include $(CEDEV)/include/.makefile diff --git a/frontends/calculator/CEdev/examples/template/readme.md b/frontends/calculator/CEdev/examples/template/readme.md index 093834f..0335c19 100644 --- a/frontends/calculator/CEdev/examples/template/readme.md +++ b/frontends/calculator/CEdev/examples/template/readme.md @@ -1,14 +1,14 @@ -### Template - -You can clone this directory for your own projects. - -To add code, fill in the void main() function in main.c. You can also create -your own .c and .h files and add them to the directory; the Makefile included in -this template will automatically find and compile the new .c files. - -In addition, you can also add your own .asm files, which will be detected and -added appropriately to the proper segment. - ---- - -This template is a part of the C SDK Toolchain for use on the CE. +### Template + +You can clone this directory for your own projects. + +To add code, fill in the void main() function in main.c. You can also create +your own .c and .h files and add them to the directory; the Makefile included in +this template will automatically find and compile the new .c files. + +In addition, you can also add your own .asm files, which will be detected and +added appropriately to the proper segment. + +--- + +This template is a part of the C SDK Toolchain for use on the CE. diff --git a/frontends/calculator/CEdev/examples/template/src/main.c b/frontends/calculator/CEdev/examples/template/src/main.c index 88416b7..65eaafd 100644 --- a/frontends/calculator/CEdev/examples/template/src/main.c +++ b/frontends/calculator/CEdev/examples/template/src/main.c @@ -1,30 +1,30 @@ -/* - *-------------------------------------- - * Program Name: - * Author: - * License: - * Description: - *-------------------------------------- -*/ - -/* Keep these headers */ -#include -#include -#include -#include - -/* Standard headers (recommended) */ -#include -#include -#include -#include - -/* Put your function prototypes here */ - -/* Put all your globals here */ - -void main(void) { - /* Fill in the body of the main function here */ -} - -/* Put other functions here */ +/* + *-------------------------------------- + * Program Name: + * Author: + * License: + * Description: + *-------------------------------------- +*/ + +/* Keep these headers */ +#include +#include +#include +#include + +/* Standard headers (recommended) */ +#include +#include +#include +#include + +/* Put your function prototypes here */ + +/* Put all your globals here */ + +void main(void) { + /* Fill in the body of the main function here */ +} + +/* Put other functions here */ diff --git a/frontends/calculator/CEdev/include/.linker_script b/frontends/calculator/CEdev/include/.linker_script index e3a1887..eb5ea8b 100644 --- a/frontends/calculator/CEdev/include/.linker_script +++ b/frontends/calculator/CEdev/include/.linker_script @@ -1,305 +1,305 @@ -symbol __low_bss = bss.base -symbol __len_bss = bss.length -symbol __heaptop = bss.high -symbol __heapbot = bss.top -order header, icon, launcher, libs, startup, cleanup, exit, code, data, strsect, text -if STATIC - srcs "../../lib/static/atof.src" - srcs "../../lib/static/ceil.src" - srcs "../../lib/static/fabs.src" - srcs "../../lib/static/acos.src" - srcs "../../lib/static/cos.src" - srcs "../../lib/static/exp.src" - srcs "../../lib/static/log.src" - srcs "../../lib/static/ufltinfo.src" - srcs "../../lib/static/pow.src" - srcs "../../lib/static/strtod.src" - srcs "../../lib/static/asin.src" - srcs "../../lib/static/sinh.src" - srcs "../../lib/static/log10.src" - srcs "../../lib/static/sin.src" - srcs "../../lib/static/atan.src" - srcs "../../lib/static/atan2.src" - srcs "../../lib/static/fmod.src" - srcs "../../lib/static/tanh.src" - srcs "../../lib/static/tan.src" - srcs "../../lib/static/frexp.src" - srcs "../../lib/static/sqrt.src" - srcs "../../lib/static/floor.src" - srcs "../../lib/static/ldexp.src" - srcs "../../lib/static/modf.src" - srcs "../../lib/static/ufltrnd.src" -else - srcs "../../lib/linked/frexp.src" - srcs "../../lib/linked/atan2.src" - srcs "../../lib/linked/atof.src" - srcs "../../lib/linked/acos.src" - srcs "../../lib/linked/sqrt.src" - srcs "../../lib/linked/atan.src" - srcs "../../lib/linked/sinh.src" - srcs "../../lib/linked/tan.src" - srcs "../../lib/linked/floor.src" - srcs "../../lib/linked/ldexp.src" - srcs "../../lib/linked/ufltrnd.src" - srcs "../../lib/linked/fabs.src" - srcs "../../lib/linked/log10.src" - srcs "../../lib/linked/strtod.src" - srcs "../../lib/linked/fmod.src" - srcs "../../lib/linked/asin.src" - srcs "../../lib/linked/exp.src" - srcs "../../lib/linked/ufltinfo.src" - srcs "../../lib/linked/cosh.src" - srcs "../../lib/linked/modf.src" - srcs "../../lib/linked/log.src" - srcs "../../lib/linked/tanh.src" - srcs "../../lib/linked/ceil.src" - srcs "../../lib/linked/cos.src" - srcs "../../lib/linked/pow.src" - srcs "../../lib/linked/sin.src" -end if -srcs "../../lib/shared/os_textbuffer.src" -srcs "../../lib/shared/debugger.src" -srcs "../../lib/shared/zx7_Decompress.src" -srcs "../../lib/shared/random.src" -srcs "../../lib/shared/atomic_load_decreasing_32.src" -srcs "../../lib/shared/removeallbreakpoints.src" -srcs "../../lib/shared/removebreakpoint.src" -srcs "../../lib/shared/srandom.src" -srcs "../../lib/shared/tice.src" -srcs "../../lib/shared/removewatchpoint.src" -srcs "../../lib/shared/atomic_load_increasing_32.src" -srcs "../../lib/shared/setwatchpoint.src" -srcs "../../lib/shared/interrupts.src" -srcs "../../lib/shared/removeallwatchpoints.src" -srcs "../../lib/shared/getstringinput.src" -srcs "../../lib/shared/dzx7_turbo.src" -srcs "../../lib/shared/atomic_load_32.src" -srcs "../../lib/shared/setwritewatchpoint.src" -srcs "../../lib/shared/setreadwatchpoint.src" -srcs "../../lib/shared/os.src" -srcs "../../lib/shared/usb.src" -srcs "../../lib/shared/setreadwritewatchpoint.src" -srcs "../../lib/shared/abort.src" -srcs "../../lib/shared/setbreakpoint.src" -srcs "../../lib/shared/dzx7_standard.src" -srcs "../../lib/shared/delay.src" -srcs "../../lib/shared/frftoub.src" -srcs "../../lib/shared/fpupop1.src" -srcs "../../lib/shared/frimulu.src" -srcs "../../lib/shared/ladd.src" -srcs "../../lib/shared/atoi.src" -srcs "../../lib/shared/idivs.src" -srcs "../../lib/shared/isnan.src" -srcs "../../lib/shared/case24d.src" -srcs "../../lib/shared/isupper.src" -srcs "../../lib/shared/memmove.src" -srcs "../../lib/shared/frameset0.src" -srcs "../../lib/shared/sneg.src" -srcs "../../lib/shared/setjmp.src" -srcs "../../lib/shared/strcspn.src" -srcs "../../lib/shared/fpdiv.src" -srcs "../../lib/shared/istiy.src" -srcs "../../lib/shared/frstof.src" -srcs "../../lib/shared/abs.src" -srcs "../../lib/shared/frsmulu.src" -srcs "../../lib/shared/strdup.src" -srcs "../../lib/shared/sprintf.src" -srcs "../../lib/shared/sldix.src" -srcs "../../lib/shared/finite.src" -srcs "../../lib/shared/lnot.src" -srcs "../../lib/shared/imulu.src" -srcs "../../lib/shared/setflag.src" -srcs "../../lib/shared/iscntrl.src" -srcs "../../lib/shared/fpupop2.src" -srcs "../../lib/shared/ishrs.src" -srcs "../../lib/shared/fpsub.src" -srcs "../../lib/shared/fpmul.src" -srcs "../../lib/shared/case24.src" -srcs "../../lib/shared/isinf.src" -srcs "../../lib/shared/bldix.src" -srcs "../../lib/shared/ldiv.src" -srcs "../../lib/shared/strcmp.src" -srcs "../../lib/shared/strcasecmp.src" -srcs "../../lib/shared/sand.src" -srcs "../../lib/shared/strrchr.src" -srcs "../../lib/shared/sshrs.src" -srcs "../../lib/shared/tolower.src" -srcs "../../lib/shared/isgraph.src" -srcs "../../lib/shared/case8d.src" -srcs "../../lib/shared/snot.src" -srcs "../../lib/shared/round.src" -srcs "../../lib/shared/seqcased.src" -srcs "../../lib/shared/frbtof.src" -srcs "../../lib/shared/fruitof.src" -srcs "../../lib/shared/fritof.src" -srcs "../../lib/shared/log2.src" -srcs "../../lib/shared/fpultof.src" -srcs "../../lib/shared/bshrs.src" -srcs "../../lib/shared/seqcase.src" -srcs "../../lib/shared/bremu.src" -srcs "../../lib/shared/lmulu.src" -srcs "../../lib/shared/strncmp.src" -srcs "../../lib/shared/frbmuls.src" -srcs "../../lib/shared/scmpzero.src" -srcs "../../lib/shared/isxdigit.src" -srcs "../../lib/shared/bdivs.src" -srcs "../../lib/shared/strndup.src" -srcs "../../lib/shared/memset.src" -srcs "../../lib/shared/strncpy.src" -srcs "../../lib/shared/itol.src" -srcs "../../lib/shared/strstr.src" -srcs "../../lib/shared/sdivs.src" -srcs "../../lib/shared/lcmpu.src" -srcs "../../lib/shared/case8.src" -srcs "../../lib/shared/indcall.src" -srcs "../../lib/shared/sqrtf.src" -srcs "../../lib/shared/sstix.src" -srcs "../../lib/shared/fpftol.src" -srcs "../../lib/shared/rand.src" -srcs "../../lib/shared/lstix.src" -srcs "../../lib/shared/lrems.src" -srcs "../../lib/shared/ildiy.src" -srcs "../../lib/shared/lmuls.src" -srcs "../../lib/shared/fppack.src" -srcs "../../lib/shared/lor.src" -srcs "../../lib/shared/icmpzero.src" -srcs "../../lib/shared/strpbrk.src" -srcs "../../lib/shared/sstiy.src" -srcs "../../lib/shared/land.src" -srcs "../../lib/shared/ldivu.src" -srcs "../../lib/shared/frsmuls.src" -srcs "../../lib/shared/strtok.src" -srcs "../../lib/shared/iand.src" -srcs "../../lib/shared/ldivs.src" -srcs "../../lib/shared/ineg.src" -srcs "../../lib/shared/stoi.src" -srcs "../../lib/shared/sremu.src" -srcs "../../lib/shared/sldiy.src" -srcs "../../lib/shared/bstiy.src" -srcs "../../lib/shared/memchr.src" -srcs "../../lib/shared/ior.src" -srcs "../../lib/shared/fpneg.src" -srcs "../../lib/shared/isascii.src" -srcs "../../lib/shared/lldix.src" -srcs "../../lib/shared/smuls.src" -srcs "../../lib/shared/smulu.src" -srcs "../../lib/shared/isspace.src" -srcs "../../lib/shared/frftous.src" -srcs "../../lib/shared/sshl.src" -srcs "../../lib/shared/sdivu.src" -srcs "../../lib/shared/fpadd.src" -srcs "../../lib/shared/lsub.src" -srcs "../../lib/shared/bldiy.src" -srcs "../../lib/shared/ixor.src" -srcs "../../lib/shared/lstiy.src" -srcs "../../lib/shared/srand.src" -srcs "../../lib/shared/uldiv.src" -srcs "../../lib/shared/frftos.src" -srcs "../../lib/shared/frubtof.src" -srcs "../../lib/shared/ishru.src" -srcs "../../lib/shared/sshru.src" -srcs "../../lib/shared/atos.src" -srcs "../../lib/shared/iremu.src" -srcs "../../lib/shared/lshrs.src" -srcs "../../lib/shared/strspn.src" -srcs "../../lib/shared/strnlen.src" -srcs "../../lib/shared/bmuls.src" -srcs "../../lib/shared/sor.src" -srcs "../../lib/shared/imuls.src" -srcs "../../lib/shared/fpltof.src" -srcs "../../lib/shared/sxor.src" -srcs "../../lib/shared/istix.src" -srcs "../../lib/shared/bdivu.src" -srcs "../../lib/shared/bshl.src" -srcs "../../lib/shared/memcmp.src" -srcs "../../lib/shared/srems.src" -srcs "../../lib/shared/strchr.src" -srcs "../../lib/shared/ildix.src" -srcs "../../lib/shared/frustof.src" -srcs "../../lib/shared/lneg.src" -srcs "../../lib/shared/atol.src" -srcs "../../lib/shared/longjmp.src" -srcs "../../lib/shared/labs.src" -srcs "../../lib/shared/memcpy.src" -srcs "../../lib/shared/isalpha.src" -srcs "../../lib/shared/bshru.src" -srcs "../../lib/shared/isprint.src" -srcs "../../lib/shared/strcat.src" -srcs "../../lib/shared/div.src" -srcs "../../lib/shared/isalnum.src" -srcs "../../lib/shared/lshl.src" -srcs "../../lib/shared/case16d.src" -srcs "../../lib/shared/ispunct.src" -srcs "../../lib/shared/toupper.src" -srcs "../../lib/shared/frftoui.src" -srcs "../../lib/shared/idivu.src" -srcs "../../lib/shared/isdigit.src" -srcs "../../lib/shared/sbrk.src" -srcs "../../lib/shared/fpcmp.src" -srcs "../../lib/shared/lcmpzero.src" -srcs "../../lib/shared/stoiu.src" -srcs "../../lib/shared/inot.src" -srcs "../../lib/shared/frimuls.src" -srcs "../../lib/shared/lcmps.src" -srcs "../../lib/shared/irems.src" -srcs "../../lib/shared/lldiy.src" -srcs "../../lib/shared/ishl.src" -srcs "../../lib/shared/strncat.src" -srcs "../../lib/shared/bstix.src" -srcs "../../lib/shared/lxor.src" -srcs "../../lib/shared/lshru.src" -srcs "../../lib/shared/bmulu.src" -srcs "../../lib/shared/calloc.src" -srcs "../../lib/shared/frftoi.src" -srcs "../../lib/shared/islower.src" -srcs "../../lib/shared/case16.src" -srcs "../../lib/shared/frameset.src" -srcs "../../lib/shared/strcpy.src" -srcs "../../lib/shared/frftob.src" -srcs "../../lib/shared/strncasecmp.src" -srcs "../../lib/shared/brems.src" -srcs "../../lib/shared/lremu.src" -srcs "../../lib/shared/case.src" -srcs "../../lib/shared/strlen.src" -srcs "../../lib/shared/gamma.src" -srcs "../../lib/shared/uuitoa.src" -srcs "../../lib/shared/udtog.src" -srcs "../../lib/shared/uscan.src" -srcs "../../lib/shared/strtoul.src" -srcs "../../lib/shared/print_sputch.src" -srcs "../../lib/shared/print_putch.src" -srcs "../../lib/shared/strtol.src" -srcs "../../lib/shared/bsearch.src" -srcs "../../lib/shared/vsprintf.src" -srcs "../../lib/shared/print_putstring.src" -srcs "../../lib/shared/ustoa.src" -srcs "../../lib/shared/maptab.src" -srcs "../../lib/shared/ultoa.src" -srcs "../../lib/shared/usscan.src" -srcs "../../lib/shared/udtof.src" -srcs "../../lib/shared/realloc.src" -srcs "../../lib/shared/free.src" -srcs "../../lib/shared/udtoe.src" -srcs "../../lib/shared/uitoa.src" -srcs "../../lib/shared/qsort.src" -srcs "../../lib/shared/fpdata.src" -srcs "../../lib/shared/uustoa.src" -srcs "../../lib/shared/upscan.src" -srcs "../../lib/shared/malloc.src" -srcs "../../lib/shared/uprint.src" -srcs "../../lib/shared/ureverse.src" -srcs "../../lib/shared/uultoa.src" -srcs "../../lib/shared/print_globals.src" -srcs "../../lib/fileio/files.src" -srcs "../../lib/fileio/fclose.src" -srcs "../../lib/fileio/feof.src" -srcs "../../lib/fileio/fopen.src" -srcs "../../lib/fileio/fwrite.src" -srcs "../../lib/fileio/ftell.src" -srcs "../../lib/fileio/fputs.src" -srcs "../../lib/fileio/fgets.src" -srcs "../../lib/fileio/remove.src" -srcs "../../lib/fileio/fputc.src" -srcs "../../lib/fileio/fgetc.src" -srcs "../../lib/fileio/fread.src" -srcs "../../lib/fileio/fseek.src" +symbol __low_bss = bss.base +symbol __len_bss = bss.length +symbol __heaptop = bss.high +symbol __heapbot = bss.top +order header, icon, launcher, libs, startup, cleanup, exit, code, data, strsect, text +if STATIC + srcs "../../lib/static/atof.src" + srcs "../../lib/static/ceil.src" + srcs "../../lib/static/fabs.src" + srcs "../../lib/static/acos.src" + srcs "../../lib/static/cos.src" + srcs "../../lib/static/exp.src" + srcs "../../lib/static/log.src" + srcs "../../lib/static/ufltinfo.src" + srcs "../../lib/static/pow.src" + srcs "../../lib/static/strtod.src" + srcs "../../lib/static/asin.src" + srcs "../../lib/static/sinh.src" + srcs "../../lib/static/log10.src" + srcs "../../lib/static/sin.src" + srcs "../../lib/static/atan.src" + srcs "../../lib/static/atan2.src" + srcs "../../lib/static/fmod.src" + srcs "../../lib/static/tanh.src" + srcs "../../lib/static/tan.src" + srcs "../../lib/static/frexp.src" + srcs "../../lib/static/sqrt.src" + srcs "../../lib/static/floor.src" + srcs "../../lib/static/ldexp.src" + srcs "../../lib/static/modf.src" + srcs "../../lib/static/ufltrnd.src" +else + srcs "../../lib/linked/frexp.src" + srcs "../../lib/linked/atan2.src" + srcs "../../lib/linked/atof.src" + srcs "../../lib/linked/acos.src" + srcs "../../lib/linked/sqrt.src" + srcs "../../lib/linked/atan.src" + srcs "../../lib/linked/sinh.src" + srcs "../../lib/linked/tan.src" + srcs "../../lib/linked/floor.src" + srcs "../../lib/linked/ldexp.src" + srcs "../../lib/linked/ufltrnd.src" + srcs "../../lib/linked/fabs.src" + srcs "../../lib/linked/log10.src" + srcs "../../lib/linked/strtod.src" + srcs "../../lib/linked/fmod.src" + srcs "../../lib/linked/asin.src" + srcs "../../lib/linked/exp.src" + srcs "../../lib/linked/ufltinfo.src" + srcs "../../lib/linked/cosh.src" + srcs "../../lib/linked/modf.src" + srcs "../../lib/linked/log.src" + srcs "../../lib/linked/tanh.src" + srcs "../../lib/linked/ceil.src" + srcs "../../lib/linked/cos.src" + srcs "../../lib/linked/pow.src" + srcs "../../lib/linked/sin.src" +end if +srcs "../../lib/shared/os_textbuffer.src" +srcs "../../lib/shared/debugger.src" +srcs "../../lib/shared/zx7_Decompress.src" +srcs "../../lib/shared/random.src" +srcs "../../lib/shared/atomic_load_decreasing_32.src" +srcs "../../lib/shared/removeallbreakpoints.src" +srcs "../../lib/shared/removebreakpoint.src" +srcs "../../lib/shared/srandom.src" +srcs "../../lib/shared/tice.src" +srcs "../../lib/shared/removewatchpoint.src" +srcs "../../lib/shared/atomic_load_increasing_32.src" +srcs "../../lib/shared/setwatchpoint.src" +srcs "../../lib/shared/interrupts.src" +srcs "../../lib/shared/removeallwatchpoints.src" +srcs "../../lib/shared/getstringinput.src" +srcs "../../lib/shared/dzx7_turbo.src" +srcs "../../lib/shared/atomic_load_32.src" +srcs "../../lib/shared/setwritewatchpoint.src" +srcs "../../lib/shared/setreadwatchpoint.src" +srcs "../../lib/shared/os.src" +srcs "../../lib/shared/usb.src" +srcs "../../lib/shared/setreadwritewatchpoint.src" +srcs "../../lib/shared/abort.src" +srcs "../../lib/shared/setbreakpoint.src" +srcs "../../lib/shared/dzx7_standard.src" +srcs "../../lib/shared/delay.src" +srcs "../../lib/shared/frftoub.src" +srcs "../../lib/shared/fpupop1.src" +srcs "../../lib/shared/frimulu.src" +srcs "../../lib/shared/ladd.src" +srcs "../../lib/shared/atoi.src" +srcs "../../lib/shared/idivs.src" +srcs "../../lib/shared/isnan.src" +srcs "../../lib/shared/case24d.src" +srcs "../../lib/shared/isupper.src" +srcs "../../lib/shared/memmove.src" +srcs "../../lib/shared/frameset0.src" +srcs "../../lib/shared/sneg.src" +srcs "../../lib/shared/setjmp.src" +srcs "../../lib/shared/strcspn.src" +srcs "../../lib/shared/fpdiv.src" +srcs "../../lib/shared/istiy.src" +srcs "../../lib/shared/frstof.src" +srcs "../../lib/shared/abs.src" +srcs "../../lib/shared/frsmulu.src" +srcs "../../lib/shared/strdup.src" +srcs "../../lib/shared/sprintf.src" +srcs "../../lib/shared/sldix.src" +srcs "../../lib/shared/finite.src" +srcs "../../lib/shared/lnot.src" +srcs "../../lib/shared/imulu.src" +srcs "../../lib/shared/setflag.src" +srcs "../../lib/shared/iscntrl.src" +srcs "../../lib/shared/fpupop2.src" +srcs "../../lib/shared/ishrs.src" +srcs "../../lib/shared/fpsub.src" +srcs "../../lib/shared/fpmul.src" +srcs "../../lib/shared/case24.src" +srcs "../../lib/shared/isinf.src" +srcs "../../lib/shared/bldix.src" +srcs "../../lib/shared/ldiv.src" +srcs "../../lib/shared/strcmp.src" +srcs "../../lib/shared/strcasecmp.src" +srcs "../../lib/shared/sand.src" +srcs "../../lib/shared/strrchr.src" +srcs "../../lib/shared/sshrs.src" +srcs "../../lib/shared/tolower.src" +srcs "../../lib/shared/isgraph.src" +srcs "../../lib/shared/case8d.src" +srcs "../../lib/shared/snot.src" +srcs "../../lib/shared/round.src" +srcs "../../lib/shared/seqcased.src" +srcs "../../lib/shared/frbtof.src" +srcs "../../lib/shared/fruitof.src" +srcs "../../lib/shared/fritof.src" +srcs "../../lib/shared/log2.src" +srcs "../../lib/shared/fpultof.src" +srcs "../../lib/shared/bshrs.src" +srcs "../../lib/shared/seqcase.src" +srcs "../../lib/shared/bremu.src" +srcs "../../lib/shared/lmulu.src" +srcs "../../lib/shared/strncmp.src" +srcs "../../lib/shared/frbmuls.src" +srcs "../../lib/shared/scmpzero.src" +srcs "../../lib/shared/isxdigit.src" +srcs "../../lib/shared/bdivs.src" +srcs "../../lib/shared/strndup.src" +srcs "../../lib/shared/memset.src" +srcs "../../lib/shared/strncpy.src" +srcs "../../lib/shared/itol.src" +srcs "../../lib/shared/strstr.src" +srcs "../../lib/shared/sdivs.src" +srcs "../../lib/shared/lcmpu.src" +srcs "../../lib/shared/case8.src" +srcs "../../lib/shared/indcall.src" +srcs "../../lib/shared/sqrtf.src" +srcs "../../lib/shared/sstix.src" +srcs "../../lib/shared/fpftol.src" +srcs "../../lib/shared/rand.src" +srcs "../../lib/shared/lstix.src" +srcs "../../lib/shared/lrems.src" +srcs "../../lib/shared/ildiy.src" +srcs "../../lib/shared/lmuls.src" +srcs "../../lib/shared/fppack.src" +srcs "../../lib/shared/lor.src" +srcs "../../lib/shared/icmpzero.src" +srcs "../../lib/shared/strpbrk.src" +srcs "../../lib/shared/sstiy.src" +srcs "../../lib/shared/land.src" +srcs "../../lib/shared/ldivu.src" +srcs "../../lib/shared/frsmuls.src" +srcs "../../lib/shared/strtok.src" +srcs "../../lib/shared/iand.src" +srcs "../../lib/shared/ldivs.src" +srcs "../../lib/shared/ineg.src" +srcs "../../lib/shared/stoi.src" +srcs "../../lib/shared/sremu.src" +srcs "../../lib/shared/sldiy.src" +srcs "../../lib/shared/bstiy.src" +srcs "../../lib/shared/memchr.src" +srcs "../../lib/shared/ior.src" +srcs "../../lib/shared/fpneg.src" +srcs "../../lib/shared/isascii.src" +srcs "../../lib/shared/lldix.src" +srcs "../../lib/shared/smuls.src" +srcs "../../lib/shared/smulu.src" +srcs "../../lib/shared/isspace.src" +srcs "../../lib/shared/frftous.src" +srcs "../../lib/shared/sshl.src" +srcs "../../lib/shared/sdivu.src" +srcs "../../lib/shared/fpadd.src" +srcs "../../lib/shared/lsub.src" +srcs "../../lib/shared/bldiy.src" +srcs "../../lib/shared/ixor.src" +srcs "../../lib/shared/lstiy.src" +srcs "../../lib/shared/srand.src" +srcs "../../lib/shared/uldiv.src" +srcs "../../lib/shared/frftos.src" +srcs "../../lib/shared/frubtof.src" +srcs "../../lib/shared/ishru.src" +srcs "../../lib/shared/sshru.src" +srcs "../../lib/shared/atos.src" +srcs "../../lib/shared/iremu.src" +srcs "../../lib/shared/lshrs.src" +srcs "../../lib/shared/strspn.src" +srcs "../../lib/shared/strnlen.src" +srcs "../../lib/shared/bmuls.src" +srcs "../../lib/shared/sor.src" +srcs "../../lib/shared/imuls.src" +srcs "../../lib/shared/fpltof.src" +srcs "../../lib/shared/sxor.src" +srcs "../../lib/shared/istix.src" +srcs "../../lib/shared/bdivu.src" +srcs "../../lib/shared/bshl.src" +srcs "../../lib/shared/memcmp.src" +srcs "../../lib/shared/srems.src" +srcs "../../lib/shared/strchr.src" +srcs "../../lib/shared/ildix.src" +srcs "../../lib/shared/frustof.src" +srcs "../../lib/shared/lneg.src" +srcs "../../lib/shared/atol.src" +srcs "../../lib/shared/longjmp.src" +srcs "../../lib/shared/labs.src" +srcs "../../lib/shared/memcpy.src" +srcs "../../lib/shared/isalpha.src" +srcs "../../lib/shared/bshru.src" +srcs "../../lib/shared/isprint.src" +srcs "../../lib/shared/strcat.src" +srcs "../../lib/shared/div.src" +srcs "../../lib/shared/isalnum.src" +srcs "../../lib/shared/lshl.src" +srcs "../../lib/shared/case16d.src" +srcs "../../lib/shared/ispunct.src" +srcs "../../lib/shared/toupper.src" +srcs "../../lib/shared/frftoui.src" +srcs "../../lib/shared/idivu.src" +srcs "../../lib/shared/isdigit.src" +srcs "../../lib/shared/sbrk.src" +srcs "../../lib/shared/fpcmp.src" +srcs "../../lib/shared/lcmpzero.src" +srcs "../../lib/shared/stoiu.src" +srcs "../../lib/shared/inot.src" +srcs "../../lib/shared/frimuls.src" +srcs "../../lib/shared/lcmps.src" +srcs "../../lib/shared/irems.src" +srcs "../../lib/shared/lldiy.src" +srcs "../../lib/shared/ishl.src" +srcs "../../lib/shared/strncat.src" +srcs "../../lib/shared/bstix.src" +srcs "../../lib/shared/lxor.src" +srcs "../../lib/shared/lshru.src" +srcs "../../lib/shared/bmulu.src" +srcs "../../lib/shared/calloc.src" +srcs "../../lib/shared/frftoi.src" +srcs "../../lib/shared/islower.src" +srcs "../../lib/shared/case16.src" +srcs "../../lib/shared/frameset.src" +srcs "../../lib/shared/strcpy.src" +srcs "../../lib/shared/frftob.src" +srcs "../../lib/shared/strncasecmp.src" +srcs "../../lib/shared/brems.src" +srcs "../../lib/shared/lremu.src" +srcs "../../lib/shared/case.src" +srcs "../../lib/shared/strlen.src" +srcs "../../lib/shared/gamma.src" +srcs "../../lib/shared/uuitoa.src" +srcs "../../lib/shared/udtog.src" +srcs "../../lib/shared/uscan.src" +srcs "../../lib/shared/strtoul.src" +srcs "../../lib/shared/print_sputch.src" +srcs "../../lib/shared/print_putch.src" +srcs "../../lib/shared/strtol.src" +srcs "../../lib/shared/bsearch.src" +srcs "../../lib/shared/vsprintf.src" +srcs "../../lib/shared/print_putstring.src" +srcs "../../lib/shared/ustoa.src" +srcs "../../lib/shared/maptab.src" +srcs "../../lib/shared/ultoa.src" +srcs "../../lib/shared/usscan.src" +srcs "../../lib/shared/udtof.src" +srcs "../../lib/shared/realloc.src" +srcs "../../lib/shared/free.src" +srcs "../../lib/shared/udtoe.src" +srcs "../../lib/shared/uitoa.src" +srcs "../../lib/shared/qsort.src" +srcs "../../lib/shared/fpdata.src" +srcs "../../lib/shared/uustoa.src" +srcs "../../lib/shared/upscan.src" +srcs "../../lib/shared/malloc.src" +srcs "../../lib/shared/uprint.src" +srcs "../../lib/shared/ureverse.src" +srcs "../../lib/shared/uultoa.src" +srcs "../../lib/shared/print_globals.src" +srcs "../../lib/fileio/files.src" +srcs "../../lib/fileio/fclose.src" +srcs "../../lib/fileio/feof.src" +srcs "../../lib/fileio/fopen.src" +srcs "../../lib/fileio/fwrite.src" +srcs "../../lib/fileio/ftell.src" +srcs "../../lib/fileio/fputs.src" +srcs "../../lib/fileio/fgets.src" +srcs "../../lib/fileio/remove.src" +srcs "../../lib/fileio/fputc.src" +srcs "../../lib/fileio/fgetc.src" +srcs "../../lib/fileio/fread.src" +srcs "../../lib/fileio/fseek.src" diff --git a/frontends/calculator/CEdev/include/.makefile b/frontends/calculator/CEdev/include/.makefile index 8bc89e6..c6f243c 100644 --- a/frontends/calculator/CEdev/include/.makefile +++ b/frontends/calculator/CEdev/include/.makefile @@ -1,213 +1,213 @@ -#---------------------------- -# Core C Makefile -#---------------------------- -CLEANUP ?= YES -BSSHEAP_LOW ?= D031F6 -BSSHEAP_HIGH ?= D13FD6 -STACK_HIGH ?= D1A87E -INIT_LOC ?= D1A87F -USE_FLASH_FUNCTIONS ?= YES -OUTPUT_MAP ?= YES -ARCHIVED ?= NO -OPT_MODE ?= -optsize -#---------------------------- -SRCDIR ?= src -OBJDIR ?= obj -BINDIR ?= bin -GFXDIR ?= src/gfx -#---------------------------- - -VERSION := 8.5 - -#---------------------------- -# try not to edit anything below these lines unless you know what you are doing -#---------------------------- - -#---------------------------- - -# define some common makefile things -empty := -space := $(empty) $(empty) -comma := , - -TARGET ?= $(NAME) -ICONPNG ?= $(ICON) -DEBUGMODE = NDEBUG -CCDEBUGFLAG = -nodebug - -# verbosity -V ?= 0 -ifeq ($(V),0) -Q = @ -else -Q = -endif - -# get the os specific items -ifeq ($(OS),Windows_NT) -SHELL := cmd.exe -MAKEDIR := $(CURDIR) -NATIVEPATH = $(subst /,\,$1) -WINPATH = $(NATIVEPATH) -WINRELPATH = $(subst /,\,$1) -RM = del /q /f 2>nul -CEDEV ?= $(call NATIVEPATH,$(realpath ..\..)) -BIN ?= $(call NATIVEPATH,$(CEDEV)/bin) -LD = $(call NATIVEPATH,$(BIN)/fasmg.exe) -CC = $(call NATIVEPATH,$(BIN)/ez80cc.exe) -CV = $(call NATIVEPATH,$(BIN)/convhex.exe) -PG = $(call NATIVEPATH,$(BIN)/convpng.exe) -CD = cd -CP = copy /y -MV = move /y >nul -NULL = >nul 2>&1 -RMDIR = call && (if exist $1 rmdir /s /q $1) -MKDIR = call && (if not exist $1 mkdir $1) -QUOTE_ARG = "$(subst ",',$1)"#' -TO_LOWER = $1 -else -MAKEDIR := $(CURDIR) -NATIVEPATH = $(subst \,/,$1) -WINPATH = $(shell winepath -w $1) -WINRELPATH = $(subst /,\,$1) -RM = rm -f -CEDEV ?= $(call NATIVEPATH,$(realpath ..\..)) -BIN ?= $(call NATIVEPATH,$(CEDEV)/bin) -CC = $(call NATIVEPATH,wine "$(BIN)/ez80cc.exe") -LD = $(call NATIVEPATH,$(BIN)/fasmg) -CV = $(call NATIVEPATH,$(BIN)/convhex) -PG = $(call NATIVEPATH,$(BIN)/convpng) -CD = cd -CP = cp -MV = mv -RMDIR = rm -rf $1 -MKDIR = mkdir -p $1 -QUOTE_ARG = '$(subst ','\'',$1)'#' -TO_LOWER = $(shell printf %s $(call QUOTE_ARG,$1) | tr [:upper:] [:lower:]) -endif -FASMG_FILES = $(subst $(space),$(comma) ,$(patsubst %,"%",$(subst ",\",$(subst \,\\,$(call NATIVEPATH,$1)))))#" - -# ensure native paths -SRCDIR := $(call NATIVEPATH,$(SRCDIR)) -OBJDIR := $(call NATIVEPATH,$(OBJDIR)) -BINDIR := $(call NATIVEPATH,$(BINDIR)) -GFXDIR := $(call NATIVEPATH,$(GFXDIR)) - -# generate default names -TARGETBIN := $(TARGET).bin -TARGETMAP := $(TARGET).map -TARGET8XP := $(TARGET).8xp -ICON_ASM := iconc.src - -# init conditionals -F_STARTUP := $(call NATIVEPATH,$(CEDEV)/lib/cstartup.src) -F_LAUNCHER := $(call NATIVEPATH,$(CEDEV)/lib/libheader.src) -F_CLEANUP := $(call NATIVEPATH,$(CEDEV)/lib/ccleanup.src) - -# source: http://blog.jgc.org/2011/07/gnu-make-recursive-wildcard-function.html -rwildcard = $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2)$(filter $(subst *,%,$2),$d)) - -# find all of the available C, H and ASM files (Remember, you can create C <-> assembly routines easily this way) -CSOURCES := $(call rwildcard,$(SRCDIR),*.c) -CPPSOURCES := $(call rwildcard,$(SRCDIR),*.cpp) -USERHEADERS := $(call rwildcard,$(SRCDIR),*.h *.hpp) -ASMSOURCES := $(call rwildcard,$(SRCDIR),*.asm) - -# create links for later -LINK_CSOURCES := $(CSOURCES:$(SRCDIR)/%.c=$(OBJDIR)/%.src) -LINK_CPPSOURCES := $(CPPSOURCES:$(SRCDIR)/%=$(OBJDIR)/%.src) -LINK_ASMSOURCES := $(ASMSOURCES) - -# files created to be used for linking -LINK_FILES := $(LINK_CSOURCES) $(LINK_CPPSOURCES) $(LINK_ASMSOURCES) -LINK_LIBS := $(wildcard $(CEDEV)/lib/libload/*.lib) -LINK_LIBLOAD := $(CEDEV)/lib/libload.lib - -# check if there is an icon present that we can convert; if so, generate a recipe to build it properly -ifneq ("$(wildcard $(ICONPNG))","") -F_ICON := $(OBJDIR)/$(ICON_ASM) -ICON_CONV := $(PG) -c $(ICONPNG)$(comma)$(call NATIVEPATH,$(F_ICON))$(comma)$(DESCRIPTION) -LINK_ICON = , $(call FASMG_FILES,$(F_ICON)) used -endif - -# determine if output should be archived or compressed -ifeq ($(ARCHIVED),YES) -CVFLAGS += -a -endif -ifeq ($(COMPRESSED),YES) -CVFLAGS += -x -endif -ifeq ($(CLEANUP),YES) -LINK_CLEANUP = , $(call FASMG_FILES,$(F_CLEANUP)) used -endif -ifeq ($(OUTPUT_MAP),YES) -LDMAPFLAG = -i map -endif - -# choose static or linked flash functions -ifeq ($(USE_FLASH_FUNCTIONS),YES) -STATIC := 0 -else -STATIC := 1 -endif - -# define the C flags used by the Zilog compiler -CFLAGS ?= \ - -noasm $(CCDEBUGFLAG) -nogenprint -keepasm -quiet $(OPT_MODE) -cpu:EZ80F91 -noreduceopt -nolistinc -nomodsect -define:_EZ80F91 -define:_EZ80 -define:$(DEBUGMODE) - -# these are the linker flags, basically organized to properly set up the environment -LDFLAGS ?= \ - $(call QUOTE_ARG,$(call NATIVEPATH,$(CEDEV)/include/fasmg-ez80/ld.fasmg)) \ - -i $(call QUOTE_ARG,include $(call FASMG_FILES,$(CEDEV)/include/.linker_script)) \ - $(LDDEBUGFLAG) \ - $(LDMAPFLAG) \ - -i $(call QUOTE_ARG,range bss $$$(BSSHEAP_LOW) : $$$(BSSHEAP_HIGH)) \ - -i $(call QUOTE_ARG,symbol __stack = $$$(STACK_HIGH)) \ - -i $(call QUOTE_ARG,locate header at $$$(INIT_LOC)) \ - -i $(call QUOTE_ARG,STATIC := $(STATIC)) \ - -i $(call QUOTE_ARG,srcs $(call FASMG_FILES,$(F_LAUNCHER)) used if libs.length$(LINK_ICON)$(LINK_CLEANUP)$(comma) $(call FASMG_FILES,$(F_STARTUP)) used$(comma) $(call FASMG_FILES,$(LINK_FILES))) \ - -i $(call QUOTE_ARG,libs $(call FASMG_FILES,$(LINK_LIBLOAD)) used if libs.length$(comma) $(call FASMG_FILES,$(LINK_LIBS))) - -# this rule is trigged to build everything -all: dirs $(BINDIR)/$(TARGET8XP) ; - -# this rule is trigged to build debug everything -debug: LDDEBUGFLAG = -i dbg -debug: DEBUGMODE = DEBUG -debug: CCDEBUGFLAG = -debug -debug: dirs $(BINDIR)/$(TARGET8XP) ; - -dirs: - @echo C CE SDK Version $(VERSION) && \ - $(call MKDIR,$(BINDIR)) && \ - $(call MKDIR,$(OBJDIR)) - -$(BINDIR)/$(TARGET8XP): $(BINDIR)/$(TARGETBIN) - $(Q)$(CD) $(BINDIR) && \ - $(CV) $(CVFLAGS) $(notdir $<) $(notdir $@) - -$(BINDIR)/$(TARGETBIN): $(LINK_FILES) $(F_ICON) - $(Q)$(LD) $(LDFLAGS) $@ - -# this rule handles conversion of the icon, if it is ever updated -$(OBJDIR)/$(ICON_ASM): $(ICONPNG) - $(Q)$(ICON_CONV) - -# these rules compile the source files into object files -$(OBJDIR)/%.src: $(SRCDIR)/%.c $(USERHEADERS) - $(Q)$(call MKDIR,$(call NATIVEPATH,$(@D))) && \ - $(CC) $(CFLAGS) $(call QUOTE_ARG,$(call WINPATH,$(addprefix $(MAKEDIR)/,$<))) && \ - $(MV) $(call QUOTE_ARG,$(call TO_LOWER,$(@F))) $(call QUOTE_ARG,$@) - -clean: - $(Q)$(call RMDIR,$(OBJDIR)) - $(Q)$(call RMDIR,$(BINDIR)) - @echo Cleaned build files. - -gfx: - $(Q)$(CD) $(GFXDIR) && convpng - -version: - @echo C SDK Version $(VERSION) - -.PHONY: all clean version gfx dirs debug +#---------------------------- +# Core C Makefile +#---------------------------- +CLEANUP ?= YES +BSSHEAP_LOW ?= D031F6 +BSSHEAP_HIGH ?= D13FD6 +STACK_HIGH ?= D1A87E +INIT_LOC ?= D1A87F +USE_FLASH_FUNCTIONS ?= YES +OUTPUT_MAP ?= YES +ARCHIVED ?= NO +OPT_MODE ?= -optsize +#---------------------------- +SRCDIR ?= src +OBJDIR ?= obj +BINDIR ?= bin +GFXDIR ?= src/gfx +#---------------------------- + +VERSION := 8.5 + +#---------------------------- +# try not to edit anything below these lines unless you know what you are doing +#---------------------------- + +#---------------------------- + +# define some common makefile things +empty := +space := $(empty) $(empty) +comma := , + +TARGET ?= $(NAME) +ICONPNG ?= $(ICON) +DEBUGMODE = NDEBUG +CCDEBUGFLAG = -nodebug + +# verbosity +V ?= 0 +ifeq ($(V),0) +Q = @ +else +Q = +endif + +# get the os specific items +ifeq ($(OS),Windows_NT) +SHELL := cmd.exe +MAKEDIR := $(CURDIR) +NATIVEPATH = $(subst /,\,$1) +WINPATH = $(NATIVEPATH) +WINRELPATH = $(subst /,\,$1) +RM = del /q /f 2>nul +CEDEV ?= $(call NATIVEPATH,$(realpath ..\..)) +BIN ?= $(call NATIVEPATH,$(CEDEV)/bin) +LD = $(call NATIVEPATH,$(BIN)/fasmg.exe) +CC = $(call NATIVEPATH,$(BIN)/ez80cc.exe) +CV = $(call NATIVEPATH,$(BIN)/convhex.exe) +PG = $(call NATIVEPATH,$(BIN)/convpng.exe) +CD = cd +CP = copy /y +MV = move /y >nul +NULL = >nul 2>&1 +RMDIR = call && (if exist $1 rmdir /s /q $1) +MKDIR = call && (if not exist $1 mkdir $1) +QUOTE_ARG = "$(subst ",',$1)"#' +TO_LOWER = $1 +else +MAKEDIR := $(CURDIR) +NATIVEPATH = $(subst \,/,$1) +WINPATH = $(shell winepath -w $1) +WINRELPATH = $(subst /,\,$1) +RM = rm -f +CEDEV ?= $(call NATIVEPATH,$(realpath ..\..)) +BIN ?= $(call NATIVEPATH,$(CEDEV)/bin) +CC = $(call NATIVEPATH,wine "$(BIN)/ez80cc.exe") +LD = $(call NATIVEPATH,$(BIN)/fasmg) +CV = $(call NATIVEPATH,$(BIN)/convhex) +PG = $(call NATIVEPATH,$(BIN)/convpng) +CD = cd +CP = cp +MV = mv +RMDIR = rm -rf $1 +MKDIR = mkdir -p $1 +QUOTE_ARG = '$(subst ','\'',$1)'#' +TO_LOWER = $(shell printf %s $(call QUOTE_ARG,$1) | tr [:upper:] [:lower:]) +endif +FASMG_FILES = $(subst $(space),$(comma) ,$(patsubst %,"%",$(subst ",\",$(subst \,\\,$(call NATIVEPATH,$1)))))#" + +# ensure native paths +SRCDIR := $(call NATIVEPATH,$(SRCDIR)) +OBJDIR := $(call NATIVEPATH,$(OBJDIR)) +BINDIR := $(call NATIVEPATH,$(BINDIR)) +GFXDIR := $(call NATIVEPATH,$(GFXDIR)) + +# generate default names +TARGETBIN := $(TARGET).bin +TARGETMAP := $(TARGET).map +TARGET8XP := $(TARGET).8xp +ICON_ASM := iconc.src + +# init conditionals +F_STARTUP := $(call NATIVEPATH,$(CEDEV)/lib/cstartup.src) +F_LAUNCHER := $(call NATIVEPATH,$(CEDEV)/lib/libheader.src) +F_CLEANUP := $(call NATIVEPATH,$(CEDEV)/lib/ccleanup.src) + +# source: http://blog.jgc.org/2011/07/gnu-make-recursive-wildcard-function.html +rwildcard = $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2)$(filter $(subst *,%,$2),$d)) + +# find all of the available C, H and ASM files (Remember, you can create C <-> assembly routines easily this way) +CSOURCES := $(call rwildcard,$(SRCDIR),*.c) +CPPSOURCES := $(call rwildcard,$(SRCDIR),*.cpp) +USERHEADERS := $(call rwildcard,$(SRCDIR),*.h *.hpp) +ASMSOURCES := $(call rwildcard,$(SRCDIR),*.asm) + +# create links for later +LINK_CSOURCES := $(CSOURCES:$(SRCDIR)/%.c=$(OBJDIR)/%.src) +LINK_CPPSOURCES := $(CPPSOURCES:$(SRCDIR)/%=$(OBJDIR)/%.src) +LINK_ASMSOURCES := $(ASMSOURCES) + +# files created to be used for linking +LINK_FILES := $(LINK_CSOURCES) $(LINK_CPPSOURCES) $(LINK_ASMSOURCES) +LINK_LIBS := $(wildcard $(CEDEV)/lib/libload/*.lib) +LINK_LIBLOAD := $(CEDEV)/lib/libload.lib + +# check if there is an icon present that we can convert; if so, generate a recipe to build it properly +ifneq ("$(wildcard $(ICONPNG))","") +F_ICON := $(OBJDIR)/$(ICON_ASM) +ICON_CONV := $(PG) -c $(ICONPNG)$(comma)$(call NATIVEPATH,$(F_ICON))$(comma)$(DESCRIPTION) +LINK_ICON = , $(call FASMG_FILES,$(F_ICON)) used +endif + +# determine if output should be archived or compressed +ifeq ($(ARCHIVED),YES) +CVFLAGS += -a +endif +ifeq ($(COMPRESSED),YES) +CVFLAGS += -x +endif +ifeq ($(CLEANUP),YES) +LINK_CLEANUP = , $(call FASMG_FILES,$(F_CLEANUP)) used +endif +ifeq ($(OUTPUT_MAP),YES) +LDMAPFLAG = -i map +endif + +# choose static or linked flash functions +ifeq ($(USE_FLASH_FUNCTIONS),YES) +STATIC := 0 +else +STATIC := 1 +endif + +# define the C flags used by the Zilog compiler +CFLAGS ?= \ + -noasm $(CCDEBUGFLAG) -nogenprint -keepasm -quiet $(OPT_MODE) -cpu:EZ80F91 -noreduceopt -nolistinc -nomodsect -define:_EZ80F91 -define:_EZ80 -define:$(DEBUGMODE) + +# these are the linker flags, basically organized to properly set up the environment +LDFLAGS ?= \ + $(call QUOTE_ARG,$(call NATIVEPATH,$(CEDEV)/include/fasmg-ez80/ld.fasmg)) \ + -i $(call QUOTE_ARG,include $(call FASMG_FILES,$(CEDEV)/include/.linker_script)) \ + $(LDDEBUGFLAG) \ + $(LDMAPFLAG) \ + -i $(call QUOTE_ARG,range bss $$$(BSSHEAP_LOW) : $$$(BSSHEAP_HIGH)) \ + -i $(call QUOTE_ARG,symbol __stack = $$$(STACK_HIGH)) \ + -i $(call QUOTE_ARG,locate header at $$$(INIT_LOC)) \ + -i $(call QUOTE_ARG,STATIC := $(STATIC)) \ + -i $(call QUOTE_ARG,srcs $(call FASMG_FILES,$(F_LAUNCHER)) used if libs.length$(LINK_ICON)$(LINK_CLEANUP)$(comma) $(call FASMG_FILES,$(F_STARTUP)) used$(comma) $(call FASMG_FILES,$(LINK_FILES))) \ + -i $(call QUOTE_ARG,libs $(call FASMG_FILES,$(LINK_LIBLOAD)) used if libs.length$(comma) $(call FASMG_FILES,$(LINK_LIBS))) + +# this rule is trigged to build everything +all: dirs $(BINDIR)/$(TARGET8XP) ; + +# this rule is trigged to build debug everything +debug: LDDEBUGFLAG = -i dbg +debug: DEBUGMODE = DEBUG +debug: CCDEBUGFLAG = -debug +debug: dirs $(BINDIR)/$(TARGET8XP) ; + +dirs: + @echo C CE SDK Version $(VERSION) && \ + $(call MKDIR,$(BINDIR)) && \ + $(call MKDIR,$(OBJDIR)) + +$(BINDIR)/$(TARGET8XP): $(BINDIR)/$(TARGETBIN) + $(Q)$(CD) $(BINDIR) && \ + $(CV) $(CVFLAGS) $(notdir $<) $(notdir $@) + +$(BINDIR)/$(TARGETBIN): $(LINK_FILES) $(F_ICON) + $(Q)$(LD) $(LDFLAGS) $@ + +# this rule handles conversion of the icon, if it is ever updated +$(OBJDIR)/$(ICON_ASM): $(ICONPNG) + $(Q)$(ICON_CONV) + +# these rules compile the source files into object files +$(OBJDIR)/%.src: $(SRCDIR)/%.c $(USERHEADERS) + $(Q)$(call MKDIR,$(call NATIVEPATH,$(@D))) && \ + $(CC) $(CFLAGS) $(call QUOTE_ARG,$(call WINPATH,$(addprefix $(MAKEDIR)/,$<))) && \ + $(MV) $(call QUOTE_ARG,$(call TO_LOWER,$(@F))) $(call QUOTE_ARG,$@) + +clean: + $(Q)$(call RMDIR,$(OBJDIR)) + $(Q)$(call RMDIR,$(BINDIR)) + @echo Cleaned build files. + +gfx: + $(Q)$(CD) $(GFXDIR) && convpng + +version: + @echo C SDK Version $(VERSION) + +.PHONY: all clean version gfx dirs debug diff --git a/frontends/calculator/CEdev/include/assert.h b/frontends/calculator/CEdev/include/assert.h index 04c3a34..0341a98 100644 --- a/frontends/calculator/CEdev/include/assert.h +++ b/frontends/calculator/CEdev/include/assert.h @@ -1,19 +1,19 @@ -#include -#include -#include - -#ifdef assert -#undef assert -#endif - -#ifdef NDEBUG -#define assert(ignore) ((void)0) -#else -#define assert(e) \ - do { \ - if (!(e)) { \ - dbg_sprintf(dbgout, "Assertion failure: %s, file: %s, line %d\n", #e, __FILE__, __LINE__); \ - abort(); \ - } \ - } while (0) -#endif +#include +#include +#include + +#ifdef assert +#undef assert +#endif + +#ifdef NDEBUG +#define assert(ignore) ((void)0) +#else +#define assert(e) \ + do { \ + if (!(e)) { \ + dbg_sprintf(dbgout, "Assertion failure: %s, file: %s, line %d\n", #e, __FILE__, __LINE__); \ + abort(); \ + } \ + } while (0) +#endif diff --git a/frontends/calculator/CEdev/include/compression.h b/frontends/calculator/CEdev/include/compression.h index 234d25d..89754c9 100644 --- a/frontends/calculator/CEdev/include/compression.h +++ b/frontends/calculator/CEdev/include/compression.h @@ -1,27 +1,27 @@ -/** - * @file - * @author Matt "MateoConLechuga" Waltz - * @brief Optimized (de)compression routines - */ - -#ifndef COMPRESSION_H -#define COMPRESSION_H - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Decompress a block of zx7 encoded data - * - * @param dest Pointer to destination for uncompressed data - * @param src Pointer to compressed data -*/ -void zx7_Decompress(void *dest, void *src); - -#ifdef __cplusplus -} -#endif - -#endif - +/** + * @file + * @author Matt "MateoConLechuga" Waltz + * @brief Optimized (de)compression routines + */ + +#ifndef COMPRESSION_H +#define COMPRESSION_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Decompress a block of zx7 encoded data + * + * @param dest Pointer to destination for uncompressed data + * @param src Pointer to compressed data +*/ +void zx7_Decompress(void *dest, void *src); + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/frontends/calculator/CEdev/include/ctype.h b/frontends/calculator/CEdev/include/ctype.h index 215dae0..29301aa 100644 --- a/frontends/calculator/CEdev/include/ctype.h +++ b/frontends/calculator/CEdev/include/ctype.h @@ -1,30 +1,30 @@ -#ifndef CTYPE_H -#define CTYPE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define TRUE 1 -#define FALSE 0 - -int isalnum(int c); -int isalpha(int c); -int iscntrl(int c); -int isdigit(int c); -int isgraph(int c); -int islower(int c); -int isprint(int c); -int ispunct(int c); -int isspace(int c); -int isupper(int c); -int tolower(int c); -int toupper(int c); -int isascii(int c); -int isxdigit(int c); - -#ifdef __cplusplus -} -#endif - -#endif +#ifndef CTYPE_H +#define CTYPE_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define TRUE 1 +#define FALSE 0 + +int isalnum(int c); +int isalpha(int c); +int iscntrl(int c); +int isdigit(int c); +int isgraph(int c); +int islower(int c); +int isprint(int c); +int ispunct(int c); +int isspace(int c); +int isupper(int c); +int tolower(int c); +int toupper(int c); +int isascii(int c); +int isxdigit(int c); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/frontends/calculator/CEdev/include/debug.h b/frontends/calculator/CEdev/include/debug.h index aabbd41..bb20b94 100644 --- a/frontends/calculator/CEdev/include/debug.h +++ b/frontends/calculator/CEdev/include/debug.h @@ -1,124 +1,124 @@ -/** - * @file - * @author Matt "MateoConLechuga" Waltz - * @brief Contains useful debugging features for use with the integrated CEmu debugger - */ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * void dbg_sprintf(out, const char *format, ...) - * - * @brief Use to print to the emulator console. - * - * See the syntax for 'printf' for more information - * @param out Can be dbgout (black) or dbgerr (red) - * @param format Uses printf-formated specifier string - * @def dbg_sprintf - */ - -/** - * void dbg_ClearConsole(void) - * - * @brief Clears the emulator's console screen. - * @def dbg_ClearConsole - */ - -#ifndef NDEBUG - -/** - * Opens the emulator debugger - */ -void dbg_Debugger(void); - -/** - * Sets an emulated breakpoint at a particular address - * - * @param address The address of the breakpoint to remove - */ -void dbg_SetBreakpoint(void *address); - -/** - * Removes an emulated breakpoint at a particular address - * - * @param address The address of the breakpoint to remove - */ -void dbg_RemoveBreakpoint(void *address); - -/** - * Sets an emulated empty watchpoint at a particular address - * - * @param address The address of the watchpoint to set - * @param length The size of the data at the address (values 1-4) - */ -void dbg_SetWatchpoint(void *address, unsigned int length); - -/** - * Sets an emulated read watchpoint at a particular address - * - * @param address The address of the watchpoint to set - * @param length The size of the data at the address (values 1-4) - */ -void dbg_SetReadWatchpoint(void *address, unsigned int length); - -/** - * Sets an emulated write watchpoint at a particular address - * - * @param address The address of the watchpoint to set - * @param length The size of the data at the address (values 1-4) - */ -void dbg_SetWriteWatchpoint(void *address, unsigned int length); - -/** - * Sets an emulated read/write watchpoint at a particular address - * - * @param address The address of the watchpoint to set - * @param length The size of the data at the address (values 1-4) - */ -void dbg_SetReadWriteWatchpoint(void *address, unsigned int length); - -/** - * Removes an emulated watchpoint at a particular address - * - * @param address The address of the watchpoint to remove - */ -void dbg_RemoveWatchpoint(void *address); - -/** - * Removes all emulated watchpoints - */ -void dbg_RemoveAllWatchpoints(void); - -/** - * Removes all emulated breakpoints - */ -void dbg_RemoveAllBreakpoints(void); - -#define dbgout ((char*)0xFB0000) /**< Standard debug output */ -#define dbgerr ((char*)0xFC0000) /**< Error debug output */ -#define dbg_sprintf sprintf -#define dbg_ClearConsole() (*(unsigned char*)0xFD0000 = 1) -#else -#define dbg_Debugger(ignore) ((void)0) -#define dbg_SetBreakpoint(ignore) ((void)0) -#define dbg_RemoveBreakpoint(ignore) ((void)0) -#define dbg_SetWatchpoint(ignore,ignore) ((void)0) -#define dbg_SetReadWatchpoint(ignore,ignore) ((void)0) -#define dbg_SetWriteWatchpoint(ignore,ignore) ((void)0) -#define dbg_SetReadWriteWatchpoint(ignore,ignore) ((void)0) -#define dbg_RemoveWatchpoint(ignore) ((void)0) -#define dbg_RemoveAllWatchpoints(ignore) ((void)0) -#define dbg_RemoveAllBreakpoints(ignore) ((void)0) -#define dbg_sprintf if(0)(void) -#define dbg_ClearConsole(ignore) ((void)0) -#define dbgout (NULL) -#define dbgerr (NULL) -#endif - -#ifdef __cplusplus -} -#endif +/** + * @file + * @author Matt "MateoConLechuga" Waltz + * @brief Contains useful debugging features for use with the integrated CEmu debugger + */ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * void dbg_sprintf(out, const char *format, ...) + * + * @brief Use to print to the emulator console. + * + * See the syntax for 'printf' for more information + * @param out Can be dbgout (black) or dbgerr (red) + * @param format Uses printf-formated specifier string + * @def dbg_sprintf + */ + +/** + * void dbg_ClearConsole(void) + * + * @brief Clears the emulator's console screen. + * @def dbg_ClearConsole + */ + +#ifndef NDEBUG + +/** + * Opens the emulator debugger + */ +void dbg_Debugger(void); + +/** + * Sets an emulated breakpoint at a particular address + * + * @param address The address of the breakpoint to remove + */ +void dbg_SetBreakpoint(void *address); + +/** + * Removes an emulated breakpoint at a particular address + * + * @param address The address of the breakpoint to remove + */ +void dbg_RemoveBreakpoint(void *address); + +/** + * Sets an emulated empty watchpoint at a particular address + * + * @param address The address of the watchpoint to set + * @param length The size of the data at the address (values 1-4) + */ +void dbg_SetWatchpoint(void *address, unsigned int length); + +/** + * Sets an emulated read watchpoint at a particular address + * + * @param address The address of the watchpoint to set + * @param length The size of the data at the address (values 1-4) + */ +void dbg_SetReadWatchpoint(void *address, unsigned int length); + +/** + * Sets an emulated write watchpoint at a particular address + * + * @param address The address of the watchpoint to set + * @param length The size of the data at the address (values 1-4) + */ +void dbg_SetWriteWatchpoint(void *address, unsigned int length); + +/** + * Sets an emulated read/write watchpoint at a particular address + * + * @param address The address of the watchpoint to set + * @param length The size of the data at the address (values 1-4) + */ +void dbg_SetReadWriteWatchpoint(void *address, unsigned int length); + +/** + * Removes an emulated watchpoint at a particular address + * + * @param address The address of the watchpoint to remove + */ +void dbg_RemoveWatchpoint(void *address); + +/** + * Removes all emulated watchpoints + */ +void dbg_RemoveAllWatchpoints(void); + +/** + * Removes all emulated breakpoints + */ +void dbg_RemoveAllBreakpoints(void); + +#define dbgout ((char*)0xFB0000) /**< Standard debug output */ +#define dbgerr ((char*)0xFC0000) /**< Error debug output */ +#define dbg_sprintf sprintf +#define dbg_ClearConsole() (*(unsigned char*)0xFD0000 = 1) +#else +#define dbg_Debugger(ignore) ((void)0) +#define dbg_SetBreakpoint(ignore) ((void)0) +#define dbg_RemoveBreakpoint(ignore) ((void)0) +#define dbg_SetWatchpoint(ignore,ignore) ((void)0) +#define dbg_SetReadWatchpoint(ignore,ignore) ((void)0) +#define dbg_SetWriteWatchpoint(ignore,ignore) ((void)0) +#define dbg_SetReadWriteWatchpoint(ignore,ignore) ((void)0) +#define dbg_RemoveWatchpoint(ignore) ((void)0) +#define dbg_RemoveAllWatchpoints(ignore) ((void)0) +#define dbg_RemoveAllBreakpoints(ignore) ((void)0) +#define dbg_sprintf if(0)(void) +#define dbg_ClearConsole(ignore) ((void)0) +#define dbgout (NULL) +#define dbgerr (NULL) +#endif + +#ifdef __cplusplus +} +#endif diff --git a/frontends/calculator/CEdev/include/decompress.h b/frontends/calculator/CEdev/include/decompress.h index 451008b..1fdfa1e 100644 --- a/frontends/calculator/CEdev/include/decompress.h +++ b/frontends/calculator/CEdev/include/decompress.h @@ -1,23 +1,23 @@ -/** - * @file - * @author Matt "MateoConLechuga" Waltz - * @brief Optimized decompression routines - */ - -#ifndef DECOMPRESS_H -#define DECOMPRESS_H - -#ifdef __cplusplus -extern "C" { -#endif - -#warning compatibility defines (do not use) -void dzx7_Turbo(void *src, void *dst); -void dzx7_Standard(void *src, void *dst); - -#ifdef __cplusplus -} -#endif - -#endif - +/** + * @file + * @author Matt "MateoConLechuga" Waltz + * @brief Optimized decompression routines + */ + +#ifndef DECOMPRESS_H +#define DECOMPRESS_H + +#ifdef __cplusplus +extern "C" { +#endif + +#warning compatibility defines (do not use) +void dzx7_Turbo(void *src, void *dst); +void dzx7_Standard(void *src, void *dst); + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/frontends/calculator/CEdev/include/errno.h b/frontends/calculator/CEdev/include/errno.h index f72dfef..0e397bf 100644 --- a/frontends/calculator/CEdev/include/errno.h +++ b/frontends/calculator/CEdev/include/errno.h @@ -1,15 +1,15 @@ -/* - * Copyright (C) 1999-2008 by Zilog, Inc. - * All Rights Reserved - * Modified by Matt "MateoConLechuga" Waltz for TI84+CE platform - */ -#ifndef ERRNO_H -#define ERRNO_H - -#define ERR_NOR 1 /* read not allowed for file */ -#define ERR_NOW 2 /* write not allowed for file */ -#define ERR_IO 3 /* io error */ -#define EDOM 4 /* domain error */ -#define ERANGE 5 /* range error */ -extern int errno; -#endif +/* + * Copyright (C) 1999-2008 by Zilog, Inc. + * All Rights Reserved + * Modified by Matt "MateoConLechuga" Waltz for TI84+CE platform + */ +#ifndef ERRNO_H +#define ERRNO_H + +#define ERR_NOR 1 /* read not allowed for file */ +#define ERR_NOW 2 /* write not allowed for file */ +#define ERR_IO 3 /* io error */ +#define EDOM 4 /* domain error */ +#define ERANGE 5 /* range error */ +extern int errno; +#endif diff --git a/frontends/calculator/CEdev/include/fasmg-ez80/ez80.inc b/frontends/calculator/CEdev/include/fasmg-ez80/ez80.inc index 6e8e005..73c2175 100644 --- a/frontends/calculator/CEdev/include/fasmg-ez80/ez80.inc +++ b/frontends/calculator/CEdev/include/fasmg-ez80/ez80.inc @@ -1,862 +1,862 @@ -define @ez80 @ez80 -macro @ez80.suffix @l, @il* - @ez80.l = @l - @ez80.il = @il - @ez80.lil = @ez80.l or @ez80.il shl 1 - @ez80.pre = @ez80.lil or @ez80.lil shl 3 or 100o -end macro -macro @ez80.byte @values*& - db @values -end macro -macro @ez80.offset @value* - local value - value = @value - if elementsof value - err 'invalid offset' - else if value < -200o | 200o <= value - err 'offset is out of range' - end if - db value -end macro -macro @ez80.word @value* - local value - value = @value - if elementsof value - err 'invalid immediate' - end if - emit word + @ez80.il: @value -end macro -macro @ez80.idxpre @regs*& - local pre - iterate @reg, @regs - pre = @reg metadata 1 scale 1 - if pre > 300o - @ez80.byte pre - break - end if - end iterate -end macro -macro @ez80.idxoff @reg* - local reg - reg = @reg - if reg metadata 1 scale 1 > 300o - @ez80.offset @reg scale 0 - else if reg scale 0 - err 'invalid arguments' - end if -end macro -macro @ez80.emit @values*& - if defined @ez80.pre - db @ez80.pre - end if - iterate @value, @values - @ez80.@value - end iterate -end macro -macro @ez80.nest @inst*& - if defined @ez80.pre - @ez80.pre =: @ez80.pre - end if - @inst -end macro -macro @ez80.check @ind*, @expr& - match @left ) @right, <@expr> - match @ ( @mid, <@left> - @ez80.check @ind, @mid @right - else - @ind =: 0 - end match - else - @ind =: 1 - end match -end macro -macro @ez80.classify @val, @ind*, @arg& - match, @arg - @ind =: 0 - else - @val =: @arg - match ( @ ), @arg - @ez80.check @ind, @ - else - @ind =: 0 - end match - end match -end macro - -long? = 3 -; FIXME: dup relocations -macro dw? @values*& - if @ez80.adl - emit word?: @values - else - match left =dup? right, @values - emit word?: @values - else - iterate @value, @values - @ez80.word @value - end iterate - end match - end if -end macro -macro dl? @values*& - if @ez80.adl - match left =dup? right, @values - emit long?: @values - else - iterate @value, @values - @ez80.word @value - end iterate - end match - else - emit long?: @values - end if -end macro -iterate @name, dw, rw, dl, rl - struc (name) @name? @values*& - label name: long? - @name? @values - end struc -end iterate -macro assume? @expr* - match =adl? == @adl, @expr - local adl - adl = @adl - if adl = adl and 1 - @ez80.l = adl - @ez80.il = adl - @ez80.adl = adl - else - err 'adl assume should be 0 or 1' - end if - else - err 'invalid assume statement' - end match -end macro -assume? adl = 1 - -element @ez80.breg -element b?: @ez80.breg * 003o + 030o -element nz?: @ez80.breg * 010o + 001o -element z?: @ez80.breg * 010o + 011o -element nc?: @ez80.breg * 010o + 021o -element c?: @ez80.breg * 003o + 031o -element po?: @ez80.breg * 010o + 041o -element pe?: @ez80.breg * 010o + 051o -nv? = po? -v? = pe? -element p?: @ez80.breg * 010o + 061o -element m?: @ez80.breg * 010o + 071o -element d?: @ez80.breg * 003o + 032o -element e?: @ez80.breg * 003o + 033o -element h?: @ez80.breg * 003o + 034o -element ixh?: @ez80.breg * 335o + 034o -element iyh?: @ez80.breg * 375o + 034o -element l?: @ez80.breg * 003o + 035o -element ixl?: @ez80.breg * 335o + 035o -element iyl?: @ez80.breg * 375o + 035o -element f?: @ez80.breg * 002o + 036o -element a?: @ez80.breg * 003o + 037o - -element @ez80.irmb -element i?: @ez80.irmb * 107o + 127o -element r?: @ez80.irmb * 117o + 137o -element mb?: @ez80.irmb * 155o + 156o - -element @ez80.wreg -element bc?: @ez80.wreg * 007o + 000o -element de?: @ez80.wreg * 007o + 020o -element hl?: @ez80.wreg * 007o + 040o -element ix?: @ez80.wreg * 335o + 040o -element iy?: @ez80.wreg * 375o + 040o -element sp?: @ez80.wreg * 006o + 060o -element af?: @ez80.wreg * 001o + 060o -element af'? - -@ez80.is_reg equ metadata 1 element 1 eq - -macro inst! @name*, @params& - restore @name? - define @name? @name? - @ez80.oplist equ @name? - namespace @name? - macro s? @args& - @ez80.suffix 0, @ez80.il - @name? @args - end macro - macro l? @args& - @ez80.suffix 1, @ez80.il - @name? @args - end macro - macro is? @args& - @ez80.suffix @ez80.l, 0 - @name? @args - end macro - macro il? @args& - @ez80.suffix @ez80.l, 1 - @name? @args - end macro - macro sis? @args& - @ez80.suffix 0, 0 - @name? @args - end macro - macro lis? @args& - @ez80.suffix 1, 0 - @name? @args - end macro - macro sil? @args& - @ez80.suffix 0, 1 - @name? @args - end macro - macro lil? @args& - @ez80.suffix 1, 1 - @name? @args - end macro - end namespace - local @temp - virtual - iterate @param, @params - match @arg @, @param* - @temp = string `@arg shr 8 - db 'local ', @temp, ', ', @temp, 'ind', 10 - match @arg &, @param - db 'iterate @, ', `@arg, 10, 9, 'indx %%-%+1', 10, 9 - end match - db '@ez80.classify ', @temp, ', ', @temp, 'ind, ' - match @@ &, @param - db '@', 10, 'end iterate', 10 - else - db `@arg, 10 - end match - end match - end iterate - load @temp: $ - $$ from $$ - end virtual - esc macro @name?: @params - local before, after, noerr - label before - eval @temp -end macro -macro end?.inst! - label after - if ~defined noerr & before = after - err 'invalid arguments' - end if - restore @ez80.pre - assume? adl = @ez80.adl - esc end macro -end macro - -iterate <@name, @opc*>, \ - nop, 000o, \ - rlca, 007o, \ - rrca, 017o, \ - rla, 027o, \ - rra, 037o, \ - daa, 047o, \ - cpl, 057o, \ - scf, 067o, \ - ccf, 077o, \ - halt, 166o, \ - exx, 331o, \ - di, 363o, \ - ei, 373o, \ - neg, <355o, 104o>, \ - retn, <355o, 105o>, \ - reti, <355o, 115o>, \ - rrd, <355o, 147o>, \ - rld, <355o, 157o>, \ - slp, <355o, 166o>, \ - stmix, <355o, 175o>, \ - rsmix, <355o, 176o>, \ - inim, <355o, 202o>, \ - otim, <355o, 203o>, \ - ini2, <355o, 204o>, \ - indm, <355o, 212o>, \ - otdm, <355o, 213o>, \ - ind2, <355o, 214o>, \ - inimr, <355o, 222o>, \ - otimr, <355o, 223o>, \ - ini2r, <355o, 224o>, \ - indmr, <355o, 232o>, \ - otdmr, <355o, 233o>, \ - ind2r, <355o, 234o>, \ - ldi, <355o, 240o>, \ - cpi, <355o, 241o>, \ - ini, <355o, 242o>, \ - outi, <355o, 243o>, \ - outi2, <355o, 244o>, \ - ldd, <355o, 250o>, \ - cpd, <355o, 251o>, \ - ind, <355o, 252o>, \ - outd, <355o, 253o>, \ - outd2, <355o, 254o>, \ - ldir, <355o, 260o>, \ - cpir, <355o, 261o>, \ - inir, <355o, 262o>, \ - otir, <355o, 263o>, \ - oti2r, <355o, 264o>, \ - lddr, <355o, 270o>, \ - cpdr, <355o, 271o>, \ - indr, <355o, 272o>, \ - otdr, <355o, 273o>, \ - otd2r, <355o, 274o>, \ - inirx, <355o, 302o>, \ - otirx, <355o, 303o>, \ - indrx, <355o, 312o>, \ - otdrx, <355o, 313o> - inst @name - @ez80.emit - end inst -end iterate - -iterate @name, inc, dec - inst @name, @reg* - if regind - if reg relativeto reg element 1 & reg @ez80.is_reg @ez80.wreg \ - & reg metadata 1 scale 0 = 040o - @ez80.emit idxpre reg, byte 063o + %, idxoff reg - end if - else if reg eq reg element 1 - if reg @ez80.is_reg @ez80.wreg & reg metadata 1 scale 1 and 004o - @ez80.emit idxpre reg, byte reg metadata 1 scale 0 - 005o \ - + % shl 3 - else if reg @ez80.is_reg @ez80.breg \ - & reg metadata 1 scale 1 and 001o - @ez80.emit idxpre reg, byte reg metadata 1 scale 0 shl 3 \ - and 070o or % + 3 - end if - end if - end inst -end iterate - -inst ex, @arg1, @arg2* - if arg1ind - if arg2ind - err 'invalid indirection' - else if arg1 eq sp? & arg2 eq arg2 element 1 \ - & arg2 @ez80.is_reg @ez80.wreg & arg2 metadata 1 scale 0 = 040o - @ez80.emit idxpre arg2, byte 343o - end if - else if arg2ind - @ez80.nest ex? @arg2, @arg1 - else if (arg1 eq af? & arg2 eq af'?) | (arg1 eq af'? & arg2 eq af?) - @ez80.emit byte 010o - else if (arg1 eq de? & arg2 eq hl?) | (arg1 eq hl? & arg2 eq de?) - @ez80.emit byte 353o - end if -end inst - -inst djnz, @addr* - if addrind - err 'invalid indirection' - else - @ez80.emit byte 020o, offset addr - after - end if -end inst -inst jr, @arg1*, @arg2 - if arg1ind | arg2ind - err 'invalid indirection' - else if ~defined arg2 - @ez80.emit byte 030o, offset arg1 - after - else - if arg1 eq arg1 element 1 & arg1 @ez80.is_reg @ez80.breg \ - & arg1 metadata 1 scale 0 and 047o = 001o - @ez80.emit byte arg1 metadata 1 scale 0 and 030o or 040o, \ - offset arg2 - after - end if - end if -end inst -inst jq, @arg1*, @arg2 - local off, keep - if arg1ind | arg2ind - err 'invalid indirection' - else if ~defined arg2 - off = arg1 - before - 2 - if defined @ez80.pre - off = off - 1 - end if - if defined noerr & ~arg1 eq after | defined keep - define keep - end if - if defined after & arg1 eq after & ~defined keep - define noerr - else if ~elementsof off & -200o <= off & off < 200o - @ez80.emit byte 030o, offset off - else - @ez80.emit byte 303o, word arg1 - end if - else if arg1 eq arg1 element 1 & arg1 @ez80.is_reg @ez80.breg \ - & arg1 metadata 1 scale 0 and 007o = 001o - off = arg2 - before - 2 - if defined @ez80.pre - off = off - 1 - end if - if defined noerr & ~arg2 eq after | defined keep - define keep - end if - if defined after & arg2 eq after & ~defined keep - define noerr - else if arg1 metadata 1 scale 0 < 040o & ~elementsof off & -200o <= off & off < 200o - @ez80.emit byte arg1 metadata 1 scale 0 and 030o or 040o, \ - offset off - else - @ez80.emit byte arg1 metadata 1 scale 0 and 070o or 302o, \ - word arg2 - end if - end if -end inst - -inst ld, @dst, @src* - local opc - if dstind & srcind - err 'invalid indirection' - else if dstind - if dst relativeto dst element 1 & dst @ez80.is_reg @ez80.wreg - if dst metadata 1 scale 0 = 040o - if src eq src element 1 & src @ez80.is_reg @ez80.breg \ - & src metadata 1 scale 1 = 003o - @ez80.emit idxpre dst, byte src metadata 1 scale 0 \ - and 007o or 160o, idxoff dst - else if src eq src element 1 & src @ez80.is_reg @ez80.wreg \ - & src metadata 1 scale 1 and 005o = 005o - opc = src metadata 1 scale 0 or 017o - if src metadata 1 scale 1 > 300o - if dst metadata 1 scale 1 xor src metadata 1 scale 1 \ - and 040o - opc = opc + 017o - else - opc = opc + 020o - end if - end if - if dst metadata 1 scale 1 > 300o - @ez80.emit idxpre dst, byte opc, idxoff dst - else - @ez80.emit - end if - else - @ez80.emit idxpre dst, byte 066o, idxoff dst, byte src - end if - else if src eq a? & dst metadata 1 scale 0 < 040o - @ez80.emit byte dst metadata 1 scale 0 or 002o - end if - else if src eq a? - @ez80.emit byte 062o, word dst - else if src eq src element 1 & src @ez80.is_reg @ez80.wreg \ - & src metadata 1 scale 1 and 004o - if src metadata 1 scale 0 = 040o - @ez80.emit idxpre src, byte 042o, word dst - else - @ez80.emit , word dst - end if - end if - else if srcind - if ~dst eq dst element 1 - else if src relativeto src element 1 & src @ez80.is_reg @ez80.wreg - if src metadata 1 scale 0 = 040o - if dst @ez80.is_reg @ez80.breg & dst metadata 1 scale 1 = 003o - @ez80.emit idxpre src, byte dst metadata 1 scale 0 \ - shl 3 and 070o or 106o, idxoff src - else if dst @ez80.is_reg @ez80.wreg \ - & dst metadata 1 scale 1 and 005o = 005o - opc = dst metadata 1 scale 0 or 007o - if dst metadata 1 scale 1 > 300o - if dst metadata 1 scale 1 xor src metadata 1 scale 1 \ - and 040o - opc = opc + 012o - else - opc = opc + 020o - end if - end if - if src metadata 1 scale 1 > 300o - @ez80.emit idxpre src, byte opc, idxoff src - else - @ez80.emit - end if - end if - else if dst eq a? & src metadata 1 scale 0 < 040o - @ez80.emit byte src metadata 1 scale 0 or 012o - end if - else if dst eq a? - @ez80.emit byte 072o, word src - else if dst @ez80.is_reg @ez80.wreg & dst metadata 1 scale 1 and 004o - if dst metadata 1 scale 0 = 040o - @ez80.emit idxpre dst, byte 052o, word src - else - @ez80.emit , word src - end if - end if - else if dst eq dst element 1 - if dst @ez80.is_reg @ez80.breg - if src eq src element 1 & src @ez80.is_reg @ez80.breg \ - & dst metadata 1 scale 1 and src metadata 1 scale 1 and 001o \ - & (dst metadata 1 scale 0 xor src metadata 1 scale 0 and 006o \ - | dst metadata 1 scale 1 = src metadata 1 scale 1) \ - & (~dst eq src | dst metadata 1 scale 0 > 033o) - @ez80.emit , \ - byte dst metadata 1 scale 0 shl 3 and 070o \ - + src metadata 1 scale 0 and 007o or 100o - else if src eq src element 1 & src @ez80.is_reg @ez80.irmb \ - & dst eq a? - @ez80.emit - else if dst metadata 1 scale 1 and 001o - @ez80.emit idxpre dst, \ - byte dst metadata 1 scale 0 shl 3 and 070o or 006o, \ - byte src - end if - else if dst @ez80.is_reg @ez80.wreg & dst metadata 1 scale 1 and 004o - if dst eq sp? & src eq src element 1 & src @ez80.is_reg @ez80.wreg \ - & src metadata 1 scale 0 = 040o - @ez80.emit idxpre src, byte 371o - else if dst eq hl? & src eq i? - @ez80.emit - else - @ez80.emit idxpre dst, byte dst metadata 1 scale 0 or 001o, \ - word src - end if - else if dst @ez80.is_reg @ez80.irmb & src eq a? - @ez80.emit - else if dst eq i? & src eq hl? - @ez80.emit - end if - end if -end inst - -inst add, @arg1*, @arg2 - if ~defined arg2 - @ez80.nest a?, @arg1 - else if arg1ind - err 'invalid indirection' - else if arg1 eq a? - if arg2ind - if arg2 relativeto arg2 element 1 & arg2 @ez80.is_reg @ez80.wreg \ - & arg2 metadata 1 scale 0 = 040o - @ez80.emit idxpre arg2, byte 206o, idxoff arg2 - end if - else if arg2 eq arg2 element 1 & arg2 @ez80.is_reg @ez80.breg \ - & arg2 metadata 1 scale 1 and 001o - @ez80.emit idxpre arg2, byte arg2 metadata 1 scale 0 and 007o \ - or 200o - else - @ez80.emit - end if - else if arg2ind - err 'invalid indirection' - else if arg1 eq arg1 element 1 & arg1 @ez80.is_reg @ez80.wreg \ - & arg2 eq arg2 element 1 & arg1 @ez80.is_reg @ez80.wreg \ - & arg1 metadata 1 scale 0 = 040o & arg2 metadata 1 scale 1 and 004o \ - & (arg1 metadata 1 scale 0 <> arg2 metadata 1 scale 0 \ - | arg1 metadata 1 scale 1 = arg2 metadata 1 scale 1) - @ez80.emit idxpre arg1, byte arg2 metadata 1 scale 0 or 011o - end if -end inst -iterate @name, adc, sbc - inst @name, @arg1*, @arg2 - if ~defined arg2 - if arg1 @ez80.is_reg @ez80.wreg - @ez80.nest hl?, @arg1 - else - @ez80.nest a?, @arg1 - end if - else if arg1ind - err 'invalid indirection' - else if arg1 eq a? - if arg2ind - if arg2 relativeto arg2 element 1 \ - & arg2 @ez80.is_reg @ez80.wreg \ - & arg2 metadata 1 scale 0 = 040o - @ez80.emit idxpre arg2, byte 176o + % shl 4, idxoff arg2 - end if - else if arg2 eq arg2 element 1 & arg2 @ez80.is_reg @ez80.breg \ - & arg2 metadata 1 scale 1 and 001o - @ez80.emit idxpre arg2, byte arg2 metadata 1 scale 0 and 007o \ - or 170o + % shl 4 - else - @ez80.emit - end if - else if arg2ind - err 'invalid indirection' - else if arg1 eq hl? & arg2 eq arg2 element 1 \ - & arg2 @ez80.is_reg @ez80.wreg \ - & arg2 metadata 1 scale 1 and 002o - @ez80.emit - end if - end inst -end iterate -iterate <@name, @opc*>, \ - sub, 220o, \ - and, 240o, \ - xor, 250o, \ - or, 260o, \ - cp, 270o - inst @name, @arg1*, @arg2 - if ~defined arg2 - if arg1ind - if arg1 relativeto arg1 element 1 \ - & arg1 @ez80.is_reg @ez80.wreg \ - & arg1 metadata 1 scale 0 = 040o - @ez80.emit idxpre arg1, byte @opc or 006o, idxoff arg1 - end if - else if arg1 relativeto arg1 element 1 \ - & arg1 @ez80.is_reg @ez80.breg \ - & arg1 metadata 1 scale 1 and 001o - @ez80.emit idxpre arg1, byte arg1 metadata 1 scale 0 and 007o \ - or @opc - else - @ez80.emit - end if - else if arg1ind - err 'invalid indirection' - else if arg1 eq a? - @ez80.nest @name? @arg2 - end if - end inst -end iterate -inst tst, @arg1*, @arg2 - if ~defined arg2 - if arg1ind - if arg1 eq hl? - @ez80.emit - end if - else if arg1 eq arg1 element 1 & arg1 @ez80.is_reg @ez80.breg \ - & arg1 metadata 1 scale 1 = 003o - @ez80.emit - else - @ez80.emit - end if - else if arg1ind - err 'invalid indirection' - else if arg1 eq a? - @ez80.nest tst? @arg2 - end if -end inst - -inst ret, @cond - if ~defined cond - @ez80.emit byte 311o - else if condind - err 'invalid indirection' - else if cond eq cond element 1 & cond @ez80.is_reg @ez80.breg \ - & cond metadata 1 scale 0 and 007o = 001o - @ez80.emit byte cond metadata 1 scale 0 and 070o or 300o - end if -end inst -iterate @name, pop, push - inst @name, @reg*& - while defined reg + regind - if regind - err 'invalid indirection' - else if reg eq reg element 1 & reg @ez80.is_reg @ez80.wreg \ - & reg metadata 1 scale 1 and 001o - @ez80.emit idxpre reg, \ - byte reg metadata 1 scale 0 + 275o + % shl 2 - else if `@name = 'push' - @ez80.nest pea? reg - else - err 'invalid argument' - end if - restore reg, regind - end while - end inst -end iterate - -inst jp, @arg1*, @arg2 - if ~defined arg2 - if ~arg1ind - @ez80.emit byte 303o, word arg1 - else if arg1 eq arg1 element 1 & arg1 @ez80.is_reg @ez80.wreg \ - & arg1 metadata 1 scale 0 = 040o - @ez80.emit idxpre arg1, byte 351o - end if - else if arg1ind | arg2ind - err 'invalid indirection' - else if arg1 eq arg1 element 1 & arg1 @ez80.is_reg @ez80.breg \ - & arg1 metadata 1 scale 0 and 007o = 001o - @ez80.emit byte arg1 metadata 1 scale 0 and 070o or 302o, word arg2 - end if -end inst -inst call, @arg1*, @arg2 - if arg1ind | arg2ind - err 'invalid indirection' - else if ~defined arg2 - @ez80.emit byte 315o, word arg1 - else if arg1 eq arg1 element 1 & arg1 @ez80.is_reg @ez80.breg \ - & arg1 metadata 1 scale 0 and 007o = 001o - @ez80.emit byte arg1 metadata 1 scale 0 and 070o or 304o, word arg2 - end if -end inst -inst rst, @addr* - if addrind - err 'invalid indirection' - else if addr = addr and 070o - @ez80.emit byte addr or 307o - else - err 'invalid rst target' - end if -end inst - -iterate <@name, @opc*>, \ - rlc, 000o, \ - rrc, 010o, \ - rl, 020o, \ - rr, 030o, \ - sla, 040o, \ - sra, 050o, \ - srl, 070o - inst @name, @reg* - if `@name = 'rl' & ~defined @ez80.pre & ~elementsof reg - rb long? * reg - define noerr - else if regind - if reg relativeto reg element 1 & reg @ez80.is_reg @ez80.wreg \ - & reg metadata 1 scale 0 = 040o - @ez80.emit idxpre reg, byte 313o, idxoff reg, byte @opc or 006o - end if - else if reg eq reg element 1 & reg @ez80.is_reg @ez80.breg \ - & reg metadata 1 scale 1 = 003o - @ez80.emit - end if - end inst -end iterate -iterate @name, bit, res, set - inst @name, @bit, @reg* - if bitind - err 'invalid indirection' - else if regind - if reg relativeto reg element 1 & reg @ez80.is_reg @ez80.wreg \ - & reg metadata 1 scale 0 = 040o - @ez80.emit idxpre reg, byte 313o, idxoff bit shr 3 + reg, \ - byte bit shl 3 and 070o or % shl 6 or 006o - end if - else if reg eq reg element 1 - if reg @ez80.is_reg @ez80.breg & reg metadata 1 scale 1 = 003o \ - & bit = bit and 007o - @ez80.emit - else if reg @ez80.is_reg @ez80.wreg \ - & reg metadata 1 scale 1 = 007o & bit = bit and 017o - @ez80.emit - end if - end if - end inst -end iterate - -inst out, @port, @reg* - if ~portind - err 'missing indirection' - else if regind - err 'invalid indirection' - else if port eq bc? | port eq c? - if reg eq reg element 1 & reg @ez80.is_reg @ez80.breg \ - & reg metadata 1 scale 1 = 003o - @ez80.emit - else if ~reg - @ez80.emit - end if - else if reg eq a? - @ez80.emit - end if -end inst -inst in, @reg*, @port - if ~defined port - @ez80.nest in? f?, @reg - else if regind - err 'invalid indirection' - else if ~portind - err 'missing indirection' - else if port eq bc? | port eq c? & reg eq reg element 1 \ - & reg @ez80.is_reg @ez80.breg & reg metadata 1 scale 1 and 002o - @ez80.emit - else if reg eq a? - @ez80.emit - end if -end inst -inst in0, @reg*, @port - if ~defined port - @ez80.nest in0? f?, @reg - else if regind - err 'invalid indirection' - else if ~portind - err 'missing indirection' - else if reg eq reg element 1 & reg @ez80.is_reg @ez80.breg \ - & reg metadata 1 scale 1 and 002o - @ez80.emit - end if -end inst -inst out0, @port, @reg* - if ~portind - err 'missing indirection' - else if regind - err 'invalid indirection' - else if reg eq reg element 1 & reg @ez80.is_reg @ez80.breg \ - & reg metadata 1 scale 1 = 003o - @ez80.emit - end if -end inst -inst tstio, @src* - if srcind - err 'invalid indirection' - else - @ez80.emit - end if -end inst - -inst lea, @dst, @src* - if dstind | srcind - err 'invalid indirection' - else if dst eq dst element 1 & src relativeto src element 1 \ - & dst @ez80.is_reg @ez80.wreg & src @ez80.is_reg @ez80.wreg \ - & dst metadata 1 scale 0 <> 060o & src metadata 1 scale 1 > 300o - local opc - if dst metadata 1 scale 1 and 002o - opc = src metadata 1 scale 1 shr 5 and 001o \ - or dst metadata 1 scale 0 or 002o - else if dst relativeto src - opc = dst metadata 1 scale 1 shr 5 and 001o or 062o - else - opc = dst metadata 1 scale 1 shr 5 and 001o or 124o - end if - @ez80.emit , offset src scale 0 - end if -end inst -inst pea, @src* - if srcind - err 'invalid indirection' - else if src relativeto src element 1 & src @ez80.is_reg @ez80.wreg \ - & src metadata 1 scale 1 > 300o - @ez80.emit , \ - offset src scale 0 - end if -end inst - -inst im, @mode* - if modeind - err 'invalid indirection' - else if mode = 0 - @ez80.emit - else if mode = 1 - @ez80.emit - else if mode = 2 - @ez80.emit - else - err 'invalid mode' - end if -end inst - -inst mlt, @reg* - if regind - err 'invalid indirection' - else if reg eq reg element 1 & reg @ez80.is_reg @ez80.wreg \ - & reg metadata 1 scale 1 and 002o - @ez80.emit - end if -end inst - -purge inst -purge end?.inst +define @ez80 @ez80 +macro @ez80.suffix @l, @il* + @ez80.l = @l + @ez80.il = @il + @ez80.lil = @ez80.l or @ez80.il shl 1 + @ez80.pre = @ez80.lil or @ez80.lil shl 3 or 100o +end macro +macro @ez80.byte @values*& + db @values +end macro +macro @ez80.offset @value* + local value + value = @value + if elementsof value + err 'invalid offset' + else if value < -200o | 200o <= value + err 'offset is out of range' + end if + db value +end macro +macro @ez80.word @value* + local value + value = @value + if elementsof value + err 'invalid immediate' + end if + emit word + @ez80.il: @value +end macro +macro @ez80.idxpre @regs*& + local pre + iterate @reg, @regs + pre = @reg metadata 1 scale 1 + if pre > 300o + @ez80.byte pre + break + end if + end iterate +end macro +macro @ez80.idxoff @reg* + local reg + reg = @reg + if reg metadata 1 scale 1 > 300o + @ez80.offset @reg scale 0 + else if reg scale 0 + err 'invalid arguments' + end if +end macro +macro @ez80.emit @values*& + if defined @ez80.pre + db @ez80.pre + end if + iterate @value, @values + @ez80.@value + end iterate +end macro +macro @ez80.nest @inst*& + if defined @ez80.pre + @ez80.pre =: @ez80.pre + end if + @inst +end macro +macro @ez80.check @ind*, @expr& + match @left ) @right, <@expr> + match @ ( @mid, <@left> + @ez80.check @ind, @mid @right + else + @ind =: 0 + end match + else + @ind =: 1 + end match +end macro +macro @ez80.classify @val, @ind*, @arg& + match, @arg + @ind =: 0 + else + @val =: @arg + match ( @ ), @arg + @ez80.check @ind, @ + else + @ind =: 0 + end match + end match +end macro + +long? = 3 +; FIXME: dup relocations +macro dw? @values*& + if @ez80.adl + emit word?: @values + else + match left =dup? right, @values + emit word?: @values + else + iterate @value, @values + @ez80.word @value + end iterate + end match + end if +end macro +macro dl? @values*& + if @ez80.adl + match left =dup? right, @values + emit long?: @values + else + iterate @value, @values + @ez80.word @value + end iterate + end match + else + emit long?: @values + end if +end macro +iterate @name, dw, rw, dl, rl + struc (name) @name? @values*& + label name: long? + @name? @values + end struc +end iterate +macro assume? @expr* + match =adl? == @adl, @expr + local adl + adl = @adl + if adl = adl and 1 + @ez80.l = adl + @ez80.il = adl + @ez80.adl = adl + else + err 'adl assume should be 0 or 1' + end if + else + err 'invalid assume statement' + end match +end macro +assume? adl = 1 + +element @ez80.breg +element b?: @ez80.breg * 003o + 030o +element nz?: @ez80.breg * 010o + 001o +element z?: @ez80.breg * 010o + 011o +element nc?: @ez80.breg * 010o + 021o +element c?: @ez80.breg * 003o + 031o +element po?: @ez80.breg * 010o + 041o +element pe?: @ez80.breg * 010o + 051o +nv? = po? +v? = pe? +element p?: @ez80.breg * 010o + 061o +element m?: @ez80.breg * 010o + 071o +element d?: @ez80.breg * 003o + 032o +element e?: @ez80.breg * 003o + 033o +element h?: @ez80.breg * 003o + 034o +element ixh?: @ez80.breg * 335o + 034o +element iyh?: @ez80.breg * 375o + 034o +element l?: @ez80.breg * 003o + 035o +element ixl?: @ez80.breg * 335o + 035o +element iyl?: @ez80.breg * 375o + 035o +element f?: @ez80.breg * 002o + 036o +element a?: @ez80.breg * 003o + 037o + +element @ez80.irmb +element i?: @ez80.irmb * 107o + 127o +element r?: @ez80.irmb * 117o + 137o +element mb?: @ez80.irmb * 155o + 156o + +element @ez80.wreg +element bc?: @ez80.wreg * 007o + 000o +element de?: @ez80.wreg * 007o + 020o +element hl?: @ez80.wreg * 007o + 040o +element ix?: @ez80.wreg * 335o + 040o +element iy?: @ez80.wreg * 375o + 040o +element sp?: @ez80.wreg * 006o + 060o +element af?: @ez80.wreg * 001o + 060o +element af'? + +@ez80.is_reg equ metadata 1 element 1 eq + +macro inst! @name*, @params& + restore @name? + define @name? @name? + @ez80.oplist equ @name? + namespace @name? + macro s? @args& + @ez80.suffix 0, @ez80.il + @name? @args + end macro + macro l? @args& + @ez80.suffix 1, @ez80.il + @name? @args + end macro + macro is? @args& + @ez80.suffix @ez80.l, 0 + @name? @args + end macro + macro il? @args& + @ez80.suffix @ez80.l, 1 + @name? @args + end macro + macro sis? @args& + @ez80.suffix 0, 0 + @name? @args + end macro + macro lis? @args& + @ez80.suffix 1, 0 + @name? @args + end macro + macro sil? @args& + @ez80.suffix 0, 1 + @name? @args + end macro + macro lil? @args& + @ez80.suffix 1, 1 + @name? @args + end macro + end namespace + local @temp + virtual + iterate @param, @params + match @arg @, @param* + @temp = string `@arg shr 8 + db 'local ', @temp, ', ', @temp, 'ind', 10 + match @arg &, @param + db 'iterate @, ', `@arg, 10, 9, 'indx %%-%+1', 10, 9 + end match + db '@ez80.classify ', @temp, ', ', @temp, 'ind, ' + match @@ &, @param + db '@', 10, 'end iterate', 10 + else + db `@arg, 10 + end match + end match + end iterate + load @temp: $ - $$ from $$ + end virtual + esc macro @name?: @params + local before, after, noerr + label before + eval @temp +end macro +macro end?.inst! + label after + if ~defined noerr & before = after + err 'invalid arguments' + end if + restore @ez80.pre + assume? adl = @ez80.adl + esc end macro +end macro + +iterate <@name, @opc*>, \ + nop, 000o, \ + rlca, 007o, \ + rrca, 017o, \ + rla, 027o, \ + rra, 037o, \ + daa, 047o, \ + cpl, 057o, \ + scf, 067o, \ + ccf, 077o, \ + halt, 166o, \ + exx, 331o, \ + di, 363o, \ + ei, 373o, \ + neg, <355o, 104o>, \ + retn, <355o, 105o>, \ + reti, <355o, 115o>, \ + rrd, <355o, 147o>, \ + rld, <355o, 157o>, \ + slp, <355o, 166o>, \ + stmix, <355o, 175o>, \ + rsmix, <355o, 176o>, \ + inim, <355o, 202o>, \ + otim, <355o, 203o>, \ + ini2, <355o, 204o>, \ + indm, <355o, 212o>, \ + otdm, <355o, 213o>, \ + ind2, <355o, 214o>, \ + inimr, <355o, 222o>, \ + otimr, <355o, 223o>, \ + ini2r, <355o, 224o>, \ + indmr, <355o, 232o>, \ + otdmr, <355o, 233o>, \ + ind2r, <355o, 234o>, \ + ldi, <355o, 240o>, \ + cpi, <355o, 241o>, \ + ini, <355o, 242o>, \ + outi, <355o, 243o>, \ + outi2, <355o, 244o>, \ + ldd, <355o, 250o>, \ + cpd, <355o, 251o>, \ + ind, <355o, 252o>, \ + outd, <355o, 253o>, \ + outd2, <355o, 254o>, \ + ldir, <355o, 260o>, \ + cpir, <355o, 261o>, \ + inir, <355o, 262o>, \ + otir, <355o, 263o>, \ + oti2r, <355o, 264o>, \ + lddr, <355o, 270o>, \ + cpdr, <355o, 271o>, \ + indr, <355o, 272o>, \ + otdr, <355o, 273o>, \ + otd2r, <355o, 274o>, \ + inirx, <355o, 302o>, \ + otirx, <355o, 303o>, \ + indrx, <355o, 312o>, \ + otdrx, <355o, 313o> + inst @name + @ez80.emit + end inst +end iterate + +iterate @name, inc, dec + inst @name, @reg* + if regind + if reg relativeto reg element 1 & reg @ez80.is_reg @ez80.wreg \ + & reg metadata 1 scale 0 = 040o + @ez80.emit idxpre reg, byte 063o + %, idxoff reg + end if + else if reg eq reg element 1 + if reg @ez80.is_reg @ez80.wreg & reg metadata 1 scale 1 and 004o + @ez80.emit idxpre reg, byte reg metadata 1 scale 0 - 005o \ + + % shl 3 + else if reg @ez80.is_reg @ez80.breg \ + & reg metadata 1 scale 1 and 001o + @ez80.emit idxpre reg, byte reg metadata 1 scale 0 shl 3 \ + and 070o or % + 3 + end if + end if + end inst +end iterate + +inst ex, @arg1, @arg2* + if arg1ind + if arg2ind + err 'invalid indirection' + else if arg1 eq sp? & arg2 eq arg2 element 1 \ + & arg2 @ez80.is_reg @ez80.wreg & arg2 metadata 1 scale 0 = 040o + @ez80.emit idxpre arg2, byte 343o + end if + else if arg2ind + @ez80.nest ex? @arg2, @arg1 + else if (arg1 eq af? & arg2 eq af'?) | (arg1 eq af'? & arg2 eq af?) + @ez80.emit byte 010o + else if (arg1 eq de? & arg2 eq hl?) | (arg1 eq hl? & arg2 eq de?) + @ez80.emit byte 353o + end if +end inst + +inst djnz, @addr* + if addrind + err 'invalid indirection' + else + @ez80.emit byte 020o, offset addr - after + end if +end inst +inst jr, @arg1*, @arg2 + if arg1ind | arg2ind + err 'invalid indirection' + else if ~defined arg2 + @ez80.emit byte 030o, offset arg1 - after + else + if arg1 eq arg1 element 1 & arg1 @ez80.is_reg @ez80.breg \ + & arg1 metadata 1 scale 0 and 047o = 001o + @ez80.emit byte arg1 metadata 1 scale 0 and 030o or 040o, \ + offset arg2 - after + end if + end if +end inst +inst jq, @arg1*, @arg2 + local off, keep + if arg1ind | arg2ind + err 'invalid indirection' + else if ~defined arg2 + off = arg1 - before - 2 + if defined @ez80.pre + off = off - 1 + end if + if defined noerr & ~arg1 eq after | defined keep + define keep + end if + if defined after & arg1 eq after & ~defined keep + define noerr + else if ~elementsof off & -200o <= off & off < 200o + @ez80.emit byte 030o, offset off + else + @ez80.emit byte 303o, word arg1 + end if + else if arg1 eq arg1 element 1 & arg1 @ez80.is_reg @ez80.breg \ + & arg1 metadata 1 scale 0 and 007o = 001o + off = arg2 - before - 2 + if defined @ez80.pre + off = off - 1 + end if + if defined noerr & ~arg2 eq after | defined keep + define keep + end if + if defined after & arg2 eq after & ~defined keep + define noerr + else if arg1 metadata 1 scale 0 < 040o & ~elementsof off & -200o <= off & off < 200o + @ez80.emit byte arg1 metadata 1 scale 0 and 030o or 040o, \ + offset off + else + @ez80.emit byte arg1 metadata 1 scale 0 and 070o or 302o, \ + word arg2 + end if + end if +end inst + +inst ld, @dst, @src* + local opc + if dstind & srcind + err 'invalid indirection' + else if dstind + if dst relativeto dst element 1 & dst @ez80.is_reg @ez80.wreg + if dst metadata 1 scale 0 = 040o + if src eq src element 1 & src @ez80.is_reg @ez80.breg \ + & src metadata 1 scale 1 = 003o + @ez80.emit idxpre dst, byte src metadata 1 scale 0 \ + and 007o or 160o, idxoff dst + else if src eq src element 1 & src @ez80.is_reg @ez80.wreg \ + & src metadata 1 scale 1 and 005o = 005o + opc = src metadata 1 scale 0 or 017o + if src metadata 1 scale 1 > 300o + if dst metadata 1 scale 1 xor src metadata 1 scale 1 \ + and 040o + opc = opc + 017o + else + opc = opc + 020o + end if + end if + if dst metadata 1 scale 1 > 300o + @ez80.emit idxpre dst, byte opc, idxoff dst + else + @ez80.emit + end if + else + @ez80.emit idxpre dst, byte 066o, idxoff dst, byte src + end if + else if src eq a? & dst metadata 1 scale 0 < 040o + @ez80.emit byte dst metadata 1 scale 0 or 002o + end if + else if src eq a? + @ez80.emit byte 062o, word dst + else if src eq src element 1 & src @ez80.is_reg @ez80.wreg \ + & src metadata 1 scale 1 and 004o + if src metadata 1 scale 0 = 040o + @ez80.emit idxpre src, byte 042o, word dst + else + @ez80.emit , word dst + end if + end if + else if srcind + if ~dst eq dst element 1 + else if src relativeto src element 1 & src @ez80.is_reg @ez80.wreg + if src metadata 1 scale 0 = 040o + if dst @ez80.is_reg @ez80.breg & dst metadata 1 scale 1 = 003o + @ez80.emit idxpre src, byte dst metadata 1 scale 0 \ + shl 3 and 070o or 106o, idxoff src + else if dst @ez80.is_reg @ez80.wreg \ + & dst metadata 1 scale 1 and 005o = 005o + opc = dst metadata 1 scale 0 or 007o + if dst metadata 1 scale 1 > 300o + if dst metadata 1 scale 1 xor src metadata 1 scale 1 \ + and 040o + opc = opc + 012o + else + opc = opc + 020o + end if + end if + if src metadata 1 scale 1 > 300o + @ez80.emit idxpre src, byte opc, idxoff src + else + @ez80.emit + end if + end if + else if dst eq a? & src metadata 1 scale 0 < 040o + @ez80.emit byte src metadata 1 scale 0 or 012o + end if + else if dst eq a? + @ez80.emit byte 072o, word src + else if dst @ez80.is_reg @ez80.wreg & dst metadata 1 scale 1 and 004o + if dst metadata 1 scale 0 = 040o + @ez80.emit idxpre dst, byte 052o, word src + else + @ez80.emit , word src + end if + end if + else if dst eq dst element 1 + if dst @ez80.is_reg @ez80.breg + if src eq src element 1 & src @ez80.is_reg @ez80.breg \ + & dst metadata 1 scale 1 and src metadata 1 scale 1 and 001o \ + & (dst metadata 1 scale 0 xor src metadata 1 scale 0 and 006o \ + | dst metadata 1 scale 1 = src metadata 1 scale 1) \ + & (~dst eq src | dst metadata 1 scale 0 > 033o) + @ez80.emit , \ + byte dst metadata 1 scale 0 shl 3 and 070o \ + + src metadata 1 scale 0 and 007o or 100o + else if src eq src element 1 & src @ez80.is_reg @ez80.irmb \ + & dst eq a? + @ez80.emit + else if dst metadata 1 scale 1 and 001o + @ez80.emit idxpre dst, \ + byte dst metadata 1 scale 0 shl 3 and 070o or 006o, \ + byte src + end if + else if dst @ez80.is_reg @ez80.wreg & dst metadata 1 scale 1 and 004o + if dst eq sp? & src eq src element 1 & src @ez80.is_reg @ez80.wreg \ + & src metadata 1 scale 0 = 040o + @ez80.emit idxpre src, byte 371o + else if dst eq hl? & src eq i? + @ez80.emit + else + @ez80.emit idxpre dst, byte dst metadata 1 scale 0 or 001o, \ + word src + end if + else if dst @ez80.is_reg @ez80.irmb & src eq a? + @ez80.emit + else if dst eq i? & src eq hl? + @ez80.emit + end if + end if +end inst + +inst add, @arg1*, @arg2 + if ~defined arg2 + @ez80.nest a?, @arg1 + else if arg1ind + err 'invalid indirection' + else if arg1 eq a? + if arg2ind + if arg2 relativeto arg2 element 1 & arg2 @ez80.is_reg @ez80.wreg \ + & arg2 metadata 1 scale 0 = 040o + @ez80.emit idxpre arg2, byte 206o, idxoff arg2 + end if + else if arg2 eq arg2 element 1 & arg2 @ez80.is_reg @ez80.breg \ + & arg2 metadata 1 scale 1 and 001o + @ez80.emit idxpre arg2, byte arg2 metadata 1 scale 0 and 007o \ + or 200o + else + @ez80.emit + end if + else if arg2ind + err 'invalid indirection' + else if arg1 eq arg1 element 1 & arg1 @ez80.is_reg @ez80.wreg \ + & arg2 eq arg2 element 1 & arg1 @ez80.is_reg @ez80.wreg \ + & arg1 metadata 1 scale 0 = 040o & arg2 metadata 1 scale 1 and 004o \ + & (arg1 metadata 1 scale 0 <> arg2 metadata 1 scale 0 \ + | arg1 metadata 1 scale 1 = arg2 metadata 1 scale 1) + @ez80.emit idxpre arg1, byte arg2 metadata 1 scale 0 or 011o + end if +end inst +iterate @name, adc, sbc + inst @name, @arg1*, @arg2 + if ~defined arg2 + if arg1 @ez80.is_reg @ez80.wreg + @ez80.nest hl?, @arg1 + else + @ez80.nest a?, @arg1 + end if + else if arg1ind + err 'invalid indirection' + else if arg1 eq a? + if arg2ind + if arg2 relativeto arg2 element 1 \ + & arg2 @ez80.is_reg @ez80.wreg \ + & arg2 metadata 1 scale 0 = 040o + @ez80.emit idxpre arg2, byte 176o + % shl 4, idxoff arg2 + end if + else if arg2 eq arg2 element 1 & arg2 @ez80.is_reg @ez80.breg \ + & arg2 metadata 1 scale 1 and 001o + @ez80.emit idxpre arg2, byte arg2 metadata 1 scale 0 and 007o \ + or 170o + % shl 4 + else + @ez80.emit + end if + else if arg2ind + err 'invalid indirection' + else if arg1 eq hl? & arg2 eq arg2 element 1 \ + & arg2 @ez80.is_reg @ez80.wreg \ + & arg2 metadata 1 scale 1 and 002o + @ez80.emit + end if + end inst +end iterate +iterate <@name, @opc*>, \ + sub, 220o, \ + and, 240o, \ + xor, 250o, \ + or, 260o, \ + cp, 270o + inst @name, @arg1*, @arg2 + if ~defined arg2 + if arg1ind + if arg1 relativeto arg1 element 1 \ + & arg1 @ez80.is_reg @ez80.wreg \ + & arg1 metadata 1 scale 0 = 040o + @ez80.emit idxpre arg1, byte @opc or 006o, idxoff arg1 + end if + else if arg1 relativeto arg1 element 1 \ + & arg1 @ez80.is_reg @ez80.breg \ + & arg1 metadata 1 scale 1 and 001o + @ez80.emit idxpre arg1, byte arg1 metadata 1 scale 0 and 007o \ + or @opc + else + @ez80.emit + end if + else if arg1ind + err 'invalid indirection' + else if arg1 eq a? + @ez80.nest @name? @arg2 + end if + end inst +end iterate +inst tst, @arg1*, @arg2 + if ~defined arg2 + if arg1ind + if arg1 eq hl? + @ez80.emit + end if + else if arg1 eq arg1 element 1 & arg1 @ez80.is_reg @ez80.breg \ + & arg1 metadata 1 scale 1 = 003o + @ez80.emit + else + @ez80.emit + end if + else if arg1ind + err 'invalid indirection' + else if arg1 eq a? + @ez80.nest tst? @arg2 + end if +end inst + +inst ret, @cond + if ~defined cond + @ez80.emit byte 311o + else if condind + err 'invalid indirection' + else if cond eq cond element 1 & cond @ez80.is_reg @ez80.breg \ + & cond metadata 1 scale 0 and 007o = 001o + @ez80.emit byte cond metadata 1 scale 0 and 070o or 300o + end if +end inst +iterate @name, pop, push + inst @name, @reg*& + while defined reg + regind + if regind + err 'invalid indirection' + else if reg eq reg element 1 & reg @ez80.is_reg @ez80.wreg \ + & reg metadata 1 scale 1 and 001o + @ez80.emit idxpre reg, \ + byte reg metadata 1 scale 0 + 275o + % shl 2 + else if `@name = 'push' + @ez80.nest pea? reg + else + err 'invalid argument' + end if + restore reg, regind + end while + end inst +end iterate + +inst jp, @arg1*, @arg2 + if ~defined arg2 + if ~arg1ind + @ez80.emit byte 303o, word arg1 + else if arg1 eq arg1 element 1 & arg1 @ez80.is_reg @ez80.wreg \ + & arg1 metadata 1 scale 0 = 040o + @ez80.emit idxpre arg1, byte 351o + end if + else if arg1ind | arg2ind + err 'invalid indirection' + else if arg1 eq arg1 element 1 & arg1 @ez80.is_reg @ez80.breg \ + & arg1 metadata 1 scale 0 and 007o = 001o + @ez80.emit byte arg1 metadata 1 scale 0 and 070o or 302o, word arg2 + end if +end inst +inst call, @arg1*, @arg2 + if arg1ind | arg2ind + err 'invalid indirection' + else if ~defined arg2 + @ez80.emit byte 315o, word arg1 + else if arg1 eq arg1 element 1 & arg1 @ez80.is_reg @ez80.breg \ + & arg1 metadata 1 scale 0 and 007o = 001o + @ez80.emit byte arg1 metadata 1 scale 0 and 070o or 304o, word arg2 + end if +end inst +inst rst, @addr* + if addrind + err 'invalid indirection' + else if addr = addr and 070o + @ez80.emit byte addr or 307o + else + err 'invalid rst target' + end if +end inst + +iterate <@name, @opc*>, \ + rlc, 000o, \ + rrc, 010o, \ + rl, 020o, \ + rr, 030o, \ + sla, 040o, \ + sra, 050o, \ + srl, 070o + inst @name, @reg* + if `@name = 'rl' & ~defined @ez80.pre & ~elementsof reg + rb long? * reg + define noerr + else if regind + if reg relativeto reg element 1 & reg @ez80.is_reg @ez80.wreg \ + & reg metadata 1 scale 0 = 040o + @ez80.emit idxpre reg, byte 313o, idxoff reg, byte @opc or 006o + end if + else if reg eq reg element 1 & reg @ez80.is_reg @ez80.breg \ + & reg metadata 1 scale 1 = 003o + @ez80.emit + end if + end inst +end iterate +iterate @name, bit, res, set + inst @name, @bit, @reg* + if bitind + err 'invalid indirection' + else if regind + if reg relativeto reg element 1 & reg @ez80.is_reg @ez80.wreg \ + & reg metadata 1 scale 0 = 040o + @ez80.emit idxpre reg, byte 313o, idxoff bit shr 3 + reg, \ + byte bit shl 3 and 070o or % shl 6 or 006o + end if + else if reg eq reg element 1 + if reg @ez80.is_reg @ez80.breg & reg metadata 1 scale 1 = 003o \ + & bit = bit and 007o + @ez80.emit + else if reg @ez80.is_reg @ez80.wreg \ + & reg metadata 1 scale 1 = 007o & bit = bit and 017o + @ez80.emit + end if + end if + end inst +end iterate + +inst out, @port, @reg* + if ~portind + err 'missing indirection' + else if regind + err 'invalid indirection' + else if port eq bc? | port eq c? + if reg eq reg element 1 & reg @ez80.is_reg @ez80.breg \ + & reg metadata 1 scale 1 = 003o + @ez80.emit + else if ~reg + @ez80.emit + end if + else if reg eq a? + @ez80.emit + end if +end inst +inst in, @reg*, @port + if ~defined port + @ez80.nest in? f?, @reg + else if regind + err 'invalid indirection' + else if ~portind + err 'missing indirection' + else if port eq bc? | port eq c? & reg eq reg element 1 \ + & reg @ez80.is_reg @ez80.breg & reg metadata 1 scale 1 and 002o + @ez80.emit + else if reg eq a? + @ez80.emit + end if +end inst +inst in0, @reg*, @port + if ~defined port + @ez80.nest in0? f?, @reg + else if regind + err 'invalid indirection' + else if ~portind + err 'missing indirection' + else if reg eq reg element 1 & reg @ez80.is_reg @ez80.breg \ + & reg metadata 1 scale 1 and 002o + @ez80.emit + end if +end inst +inst out0, @port, @reg* + if ~portind + err 'missing indirection' + else if regind + err 'invalid indirection' + else if reg eq reg element 1 & reg @ez80.is_reg @ez80.breg \ + & reg metadata 1 scale 1 = 003o + @ez80.emit + end if +end inst +inst tstio, @src* + if srcind + err 'invalid indirection' + else + @ez80.emit + end if +end inst + +inst lea, @dst, @src* + if dstind | srcind + err 'invalid indirection' + else if dst eq dst element 1 & src relativeto src element 1 \ + & dst @ez80.is_reg @ez80.wreg & src @ez80.is_reg @ez80.wreg \ + & dst metadata 1 scale 0 <> 060o & src metadata 1 scale 1 > 300o + local opc + if dst metadata 1 scale 1 and 002o + opc = src metadata 1 scale 1 shr 5 and 001o \ + or dst metadata 1 scale 0 or 002o + else if dst relativeto src + opc = dst metadata 1 scale 1 shr 5 and 001o or 062o + else + opc = dst metadata 1 scale 1 shr 5 and 001o or 124o + end if + @ez80.emit , offset src scale 0 + end if +end inst +inst pea, @src* + if srcind + err 'invalid indirection' + else if src relativeto src element 1 & src @ez80.is_reg @ez80.wreg \ + & src metadata 1 scale 1 > 300o + @ez80.emit , \ + offset src scale 0 + end if +end inst + +inst im, @mode* + if modeind + err 'invalid indirection' + else if mode = 0 + @ez80.emit + else if mode = 1 + @ez80.emit + else if mode = 2 + @ez80.emit + else + err 'invalid mode' + end if +end inst + +inst mlt, @reg* + if regind + err 'invalid indirection' + else if reg eq reg element 1 & reg @ez80.is_reg @ez80.wreg \ + & reg metadata 1 scale 1 and 002o + @ez80.emit + end if +end inst + +purge inst +purge end?.inst diff --git a/frontends/calculator/CEdev/include/fasmg-ez80/ld.fasmg b/frontends/calculator/CEdev/include/fasmg-ez80/ld.fasmg index e7bdbf8..3c3e168 100644 --- a/frontends/calculator/CEdev/include/fasmg-ez80/ld.fasmg +++ b/frontends/calculator/CEdev/include/fasmg-ez80/ld.fasmg @@ -1,759 +1,759 @@ -assert "\"" = '"' ; check for patched fasmg -include 'tiformat.inc' -define ez80 ez80 -namespace ez80 - include 'ez80.inc' -end namespace -macro ?! $ : $ , \ - $@ : $@ , \ - $$ : $$ , \ - and : and , \ - assert : assert , \ - at : at , \ - break : break , \ - define : define , \ - defined : defined , \ - dup : dup , \ - else : else , \ - emit : emit , \ - end : end , \ - equ : equ , \ - err : err , \ - esc : esc , \ - ez80 : ez80 , \ - from : from , \ - if : if , \ - include : include , \ - irpv : irpv , \ - iterate : iterate , \ - label : label , \ - lengthof : lengthof , \ - load : load , \ - local : local , \ - macro : macro , \ - match : match , \ - mod : mod , \ - namespace: namespace, \ - not : not , \ - or : or , \ - purge : purge , \ - rb : rb , \ - repeat : repeat , \ - restore : restore , \ - restruc : restruc , \ - rawmatch : rawmatch , \ - segment : segment , \ - shl : shl , \ - shr : shr , \ - store : store , \ - struc : struc , \ - used : used , \ - virtual : virtual , \ - while : while , \ - xor : xor - local global, debug, files, segments, hex, output - global equ - segments equ - restore global, segments - - macro files.libs.parse file, offset, isused, anyused* - local private - namespace private - macro library?! name, version* - end if - if anyused - emit 1: $C0, name, 0, version - end if - if 0 - end macro - iterate each, export, export_pointer - macro each?! function* - end if - namespace ez80 - if used global._#function - isused = 1 - global._#function := $ + %-1 - jp offset - virtual - local name - emit 1: '_', `function - load name: $ - $$ from $$ - global equ name = global._#function - end virtual - end if - offset = offset + word + @ez80.il - end namespace - if 0 - end macro - end iterate - if 0 - esc include! file - end if - end namespace - end macro - macro files.libs.handle file, isused* - local offset, anyused - offset = 0 - files.libs.parse file, offset, isused, anyused - anyused := isused - end macro - - macro files.srcs.check file, isused* - local private - namespace private - iterate name, DEF, GLOBAL, PUBLIC, XDEF - iterate style, name, .name - macro style?! symbols*& - end if - iterate symbol, symbols - if used global.symbol - isused = 1 - end if - end iterate - if 0 - end macro - end iterate - end iterate - if 0 - esc include! file - end if - end namespace - end macro - macro files.srcs.parse file* - local private - namespace private - virtual segments.code.area - ?$ equ $ - ?XOR? equ xor - ?AND? equ and - ?OR? equ or - ?SHL? equ shl - ?SHR? equ shr - ?NOT? equ not - iterate name, LIST, NEWPAGE, NOLIST, PAGE - macro name? - end macro - end iterate - iterate name, CPU, TITLE - macro name? arg* - end macro - end iterate - iterate name, COPY, INCLUDE - macro name?! path* - include path - end macro - end iterate - iterate name, EXTERN, EXTERNAL, REF, XREF - macro name? symbols*& - match list : space, symbols - iterate symbol, list - symbol := global.symbol - end iterate - else - iterate symbol, symbols - symbol := global.symbol - end iterate - end match - end macro - end iterate - iterate name, DEF, GLOBAL, PUBLIC, XDEF - macro name? symbols*& - iterate symbol, symbols - global.symbol := symbol - virtual - local name - emit 1: `symbol - load name: $ - $$ from $$ - global equ name = global.symbol - end virtual - end iterate - end macro - end iterate - struc (symbol) EQU? expr* - local error - if ~defined error & defined symbol | error - err 'Symbol "', `symbol, '" already defined' - error = 1 - else - error = 0 - end if - ?symbol = expr - end struc - iterate name, VAR, SET - struc (symbol) name? expr* - ?symbol = expr - end struc - end iterate - macro DS? count - local c - c = count - rb c - end macro - struc DS? count - .: DS? count - end struc - iterate , B,B,1, W,W,2, W24,P,3, L,L,4 - macro D#def? vals*& - local v - iterate val, vals - v = val - emit size: v - end iterate - end macro - macro BLK#blk? count*, init - local c, i - c = count - match, init - emit size: c dup ? - else - i = init - emit size: c dup i - end match - end macro - iterate name, D#def, BLK#blk - struc name? args& - .: name? args - end struc - end iterate - end iterate - iterate , TRIO,DW24, DF,DL - macro name? vals*& - alias? vals - end macro - struc name? args& - .: name? args - end struc - end iterate - macro ALIGN? val* - local v - v = val - rb v-1 - ($ + v-1) mod v - end macro - macro SEGMENT? name* - segment name - end macro - macro ASSUME? expr* - namespace ez80 - assume? expr - end namespace - end macro - iterate register, B, NZ, Z, NC, C, PO, PE, P, M, D, E, \ - H, IXH, IYH, L, IXL, IYL, F, A, I, R, \ - MB, BC, DE, HL, IX, IY, SP, AF, AF' - register? := ez80.register? - end iterate - iterate suffix, , .s?, .l?, .is?, .il?, .sis?, .sil?, .lis?, .lil? - irpv name, ez80.@ez80.oplist - rawmatch rawname, name - define rawname rawname - macro rawname#suffix args& - namespace ez80 - name#suffix args - end namespace - end macro - end rawmatch - end irpv - macro LD? d, s* - namespace ez80 - @ez80.classify dst, dstind, d - @ez80.classify src, srcind, s - if ~dstind & dst eq dst element 1 & dst @ez80.is_reg @ez80.wreg \ - & dst metadata 1 scale 1 and 001o & ~srcind \ - & src relativeto src element 1 & src @ez80.is_reg @ez80.wreg - if src metadata 1 scale 1 = 007o - PUSH? s - POP? d - else - LEA? d, s - end if - else - LD? d, s - end if - end namespace - end macro - macro JR?#suffix args& - namespace ez80 - jq?#suffix args - end namespace - end macro - end iterate - iterate , UEXT,, SEXT,RLA - macro name? reg* - carry? - SBC? reg, reg - end macro - end iterate - macro COMMENT?! delim*& - end match - local inside - inside = 0 - macro ?! line& - local length, text - length = 0 - if inside - length = lengthof `line - text = `line - else if `line = 'end match' - inside = 1 - length = lengthof `delim - 1 - text = `delim shr 8 - end if - repeat length - if ~text xor `delim and $FF - purge ? - break - end if - text = text shr 8 - end repeat - end macro - end macro - - if defined debug - debug.enabled = 0 - debug.startAddr = $ - iterate name, ALIAS, BASE, DEFINE, ENDREC, SPACE, TAG - macro name? str1* - if debug.enabled - virtual debug - debug.uleb128 debug.name - debug.string str1 - end virtual - end if - end macro - end iterate - iterate name, BEGFUNC, ENDFUNC - macro name? str1, num1, str2* - if debug.enabled - local line, addr - line = num1 - addr = $ - virtual debug - debug.uleb128 debug.name - debug.string str1, str2 - debug.uleb128 line - debug.line, addr - debug.addr - end virtual - debug.line = line - debug.addr = addr - end if - end macro - end iterate - macro BEGREC? str1, num1* - if debug.enabled - virtual debug - debug.uleb128 debug.BEGREC - debug.string str1 - debug.uleb128 num1 - end virtual - end if - end macro - iterate , CLASS,u, DIM,u, LENGTH,u, REG,u, SIZE,u, TYPE,s, VALUE,s - macro name? num1* - if debug.enabled - virtual debug - debug.uleb128 debug.name - debug.signed#leb128 num1 - end virtual - end if - end macro - end iterate - macro DEBUG? str1* - virtual debug - debug.uleb128 debug.FILE, lengthof debug.source - emit 1: debug.source - debug.uleb128 debug.startAddr - debug.addr, debug.DEBUG - debug.string str1 - end virtual - debug.enabled = 1 - debug.line = 0 - debug.addr = debug.startAddr - end macro - macro END?! - end if - if debug.enabled - local addr - segment code - addr = $ - virtual debug - debug.uleb128 debug.END, addr - debug.addr - end virtual - debug.addr = addr - end if - if 0 - end macro - macro ENDEF? - if debug.enabled - virtual debug - debug.uleb128 debug.ENDEF - end virtual - end if - end macro - macro FILE? str1* - debug.source = str1 - end macro - macro LINE? num1* - local line, addr - line = num1 - addr = $ - if line <> debug.line | addr <> debug.addr & debug.enabled - virtual debug - debug.uleb128 debug.LINE, line - debug.line, addr - debug.addr - end virtual - debug.line = line - debug.addr = addr - end if - end macro - else - iterate name, ALIAS, BASE, BEGFUNC, BEGREC, CLASS, DEBUG, \ - DEFINE, DIM, ENDEF, ENDFUNC, ENDREC, FILE, \ - LENGTH, LINE, REG, SIZE, SPACE, TAG, TYPE, VALUE - macro name? args& - end macro - end iterate - macro END?! - end if - if 0 - end macro - end if - - struc ? def::& - . def - end struc - macro ? line& - match .rest, line - rest - else match first= .rest, line - first rest - else - line - end match - end macro - if 1 - include file - end if - purge ? - restruc ? - end virtual - end namespace - end macro - macro files.srcs.handle file, isused* - if ~isused - files.srcs.check file, isused - end if - if isused - files.srcs.parse file - end if - end macro - - macro symbol? args*& - iterate arg, args - rawmatch symbol == value, arg - namespace segments - global.symbol := value - virtual - local name - emit 1: `symbol - load name: $ - $$ from $$ - global equ = name global.symbol - end virtual - end namespace - else - 'Syntax error in symbol arguments' - end rawmatch - end iterate - end macro - - iterate name, srcs, libs - macro files.name.add file, used* - local isused - rawmatch rawused, used - namespace segments - isused = rawused - end namespace - end rawmatch - if `file and $FF = "'" - files.name equ file, isused - else - files.name equ `file, isused - end if - end macro - macro name? args*& - local require - iterate arg, args - match file= =used? =if?= used, arg - files.name.add file, used - else match file= =used?, arg - files.name.add file, 1 - else - files.name.add arg, 0 - end match - end iterate - end macro - end iterate - - macro locate? args*& - iterate arg, args - rawmatch name =at? location, arg - segments equ segments.name? - namespace segments - name? := `name - name.base? := location - end namespace - else - err 'Syntax error in locate argument' - end rawmatch - end iterate - end macro - macro range? args*& - iterate arg, args - rawmatch name lower : upper, arg - locate name at lower - namespace segments - name.high? := upper - end namespace - else - err 'Syntax error in range arguments' - end rawmatch - end iterate - end macro - macro order?: args*& - match first =, second =, rest, args - order first, second - order second, rest - else match first =, second, args - locate second at first.base + first.length - else - err 'Not enough order arguments' - end match - end macro - macro merge? args*& - match name == list, args - order list - iterate segment, list - locate name at segment.base - indx %% - namespace segments - name.top? := segment.base + segment.length - if defined segment.high - name.high? := segment.high - end if - end namespace - break - end iterate - else - err 'Syntax error in merge arguments' - end match - end macro - - macro hex value*, leading: '0', digits: 6 - local val, zero, digit, char - emit 1: ' ' - val = value - zero = leading - repeat digits - digit = (val shr ((%% - %) shl 2)) and 0Fh - if digit < 10 - char = '0' + digit - else - char = 'A' + digit - 10 - end if - if digit - zero = '0' - else if % <> %% - char = zero - end if - emit 1: char - end repeat - end macro - - macro map? - local longest, name - postpone ? - virtual as 'map' - longest = lengthof "Segment" - irpv segment, segments - if longest < lengthof segment - longest = lengthof segment - end if - end irpv - emit 1: "Segment", longest - lengthof "Segment" + 1 dup ' ', "Base Top High Length", 10, longest dup '-', 4 dup " ------", '-', 10 - irpv segment, segments - namespace segment - if longest < lengthof segment - longest = lengthof segment - end if - emit 1: segment, longest - lengthof segment dup ' ' - hex base - hex top - if defined high - hex high - else - emit 1: 7 dup ' ' - end if - hex length, ' ' - emit 1: 'h', 10 - end namespace - end irpv - match any, global - longest = lengthof "Label" - irpv symbol, global - match name == value, symbol - if longest < lengthof name - longest = lengthof name - end if - end match - end irpv - emit 1: 10, "Label", longest - lengthof "Label" + 3 dup ' ', "Value", 10, longest dup '-', 3 dup ' ', 6 dup '-', 10 - irpv symbol, global - match name == value, symbol - emit 1: name, longest - lengthof name + 1 dup ' ', '=' - hex value - emit 1: 10 - end match - end irpv - end match - end virtual - end postpone - end macro - macro dbg? - virtual as 'dbg' - debug:: - end virtual - namespace debug - virtual at 0 - iterate name, EOF, ALIAS, BASE, BEGFUNC, BEGREC, CLASS, DEBUG, DEFINE, \ - DIM, END, ENDEF, ENDFUNC, ENDREC, FILE, LENGTH, LINE, \ - REG, SIZE, SPACE, STRINGS, TAG, TYPE, VALUE - name rb 1 - end iterate - end virtual - line = 0 - addr = 0 - macro uleb128 values*& - iterate value, values - local val - val = value - assert val >= 0 - while val shr 7 > 0 - emit 1: val and 07Fh or 080h - val = val shr 7 - end while - emit 1: val - end iterate - end macro - macro sleb128 values*& - iterate value, values - local val - val = value - while val shr 6 <> 0 & val shr 6 <> -1 - emit 1: val and 07Fh or 080h - val = val shr 7 - end while - emit 1: val and 07Fh - end iterate - end macro - restore strings - macro string values*& - iterate value, values - local count, unfound - count = 0 - unfound = 1 - irpv each, debug.strings - if each = value - unfound = 0 - debug.uleb128 % - break - end if - count = %% - end irpv - if unfound - debug.uleb128 count + 1 - debug.strings =: value - end if - end iterate - end macro - end namespace - end macro - - macro segment name* - end virtual - virtual segments.name.area - end macro - - if ~defined segments - err 'No segments defined' - else - restore output.base, output.top ; forbid forward reference - irpv segment, segments - namespace segment - virtual at base - area?:: - end virtual - if ~defined output.base | output.base > base & ~defined high - output.base = base - end if - end namespace - end irpv - irpv file, files.srcs - files = 0 - files.srcs.handle file - end irpv - if ~defined files - err 'Please pass the input files with -i\'srcs "file1" [if require1], "file2" [if require2], ...\'' - end if - irpv file, files.libs - virtual segments.libs.area - files.libs.handle file - end virtual - end irpv - - if defined debug - virtual debug - if defined debug.strings - debug.uleb128 debug.STRINGS - irpv string, debug.strings - if % = 1 - debug.uleb128 %% - end if - debug.uleb128 lengthof string - emit 1: string - end irpv - end if - debug.uleb128 debug.EOF - end virtual - end if - - irpv segment, segments - namespace segment - virtual area - top? := $ - length? := $ - $$ - initlen? := $@ - $$ - end virtual - if ~defined high - if ~defined output.top | output.top < top - output.top = top - end if - else if top > high - repeat 1, len: length, over: top - high, max: high - base - err 'Segment ', segment, ' is ', `len, ' bytes, ', \ - `over, ' bytes larger than the maximum of ', \ - `max, ' bytes' - end repeat - end if - end namespace - end irpv - org output.base - rb output.top - $ - postpone ? - irpv segment, segments - namespace segment - if ~defined high - load output: initlen from area: base - store output: initlen at base - end if - end namespace - end irpv - end postpone - end if - purge ? -end macro +assert "\"" = '"' ; check for patched fasmg +include 'tiformat.inc' +define ez80 ez80 +namespace ez80 + include 'ez80.inc' +end namespace +macro ?! $ : $ , \ + $@ : $@ , \ + $$ : $$ , \ + and : and , \ + assert : assert , \ + at : at , \ + break : break , \ + define : define , \ + defined : defined , \ + dup : dup , \ + else : else , \ + emit : emit , \ + end : end , \ + equ : equ , \ + err : err , \ + esc : esc , \ + ez80 : ez80 , \ + from : from , \ + if : if , \ + include : include , \ + irpv : irpv , \ + iterate : iterate , \ + label : label , \ + lengthof : lengthof , \ + load : load , \ + local : local , \ + macro : macro , \ + match : match , \ + mod : mod , \ + namespace: namespace, \ + not : not , \ + or : or , \ + purge : purge , \ + rb : rb , \ + repeat : repeat , \ + restore : restore , \ + restruc : restruc , \ + rawmatch : rawmatch , \ + segment : segment , \ + shl : shl , \ + shr : shr , \ + store : store , \ + struc : struc , \ + used : used , \ + virtual : virtual , \ + while : while , \ + xor : xor + local global, debug, files, segments, hex, output + global equ + segments equ + restore global, segments + + macro files.libs.parse file, offset, isused, anyused* + local private + namespace private + macro library?! name, version* + end if + if anyused + emit 1: $C0, name, 0, version + end if + if 0 + end macro + iterate each, export, export_pointer + macro each?! function* + end if + namespace ez80 + if used global._#function + isused = 1 + global._#function := $ + %-1 + jp offset + virtual + local name + emit 1: '_', `function + load name: $ - $$ from $$ + global equ name = global._#function + end virtual + end if + offset = offset + word + @ez80.il + end namespace + if 0 + end macro + end iterate + if 0 + esc include! file + end if + end namespace + end macro + macro files.libs.handle file, isused* + local offset, anyused + offset = 0 + files.libs.parse file, offset, isused, anyused + anyused := isused + end macro + + macro files.srcs.check file, isused* + local private + namespace private + iterate name, DEF, GLOBAL, PUBLIC, XDEF + iterate style, name, .name + macro style?! symbols*& + end if + iterate symbol, symbols + if used global.symbol + isused = 1 + end if + end iterate + if 0 + end macro + end iterate + end iterate + if 0 + esc include! file + end if + end namespace + end macro + macro files.srcs.parse file* + local private + namespace private + virtual segments.code.area + ?$ equ $ + ?XOR? equ xor + ?AND? equ and + ?OR? equ or + ?SHL? equ shl + ?SHR? equ shr + ?NOT? equ not + iterate name, LIST, NEWPAGE, NOLIST, PAGE + macro name? + end macro + end iterate + iterate name, CPU, TITLE + macro name? arg* + end macro + end iterate + iterate name, COPY, INCLUDE + macro name?! path* + include path + end macro + end iterate + iterate name, EXTERN, EXTERNAL, REF, XREF + macro name? symbols*& + match list : space, symbols + iterate symbol, list + symbol := global.symbol + end iterate + else + iterate symbol, symbols + symbol := global.symbol + end iterate + end match + end macro + end iterate + iterate name, DEF, GLOBAL, PUBLIC, XDEF + macro name? symbols*& + iterate symbol, symbols + global.symbol := symbol + virtual + local name + emit 1: `symbol + load name: $ - $$ from $$ + global equ name = global.symbol + end virtual + end iterate + end macro + end iterate + struc (symbol) EQU? expr* + local error + if ~defined error & defined symbol | error + err 'Symbol "', `symbol, '" already defined' + error = 1 + else + error = 0 + end if + ?symbol = expr + end struc + iterate name, VAR, SET + struc (symbol) name? expr* + ?symbol = expr + end struc + end iterate + macro DS? count + local c + c = count + rb c + end macro + struc DS? count + .: DS? count + end struc + iterate , B,B,1, W,W,2, W24,P,3, L,L,4 + macro D#def? vals*& + local v + iterate val, vals + v = val + emit size: v + end iterate + end macro + macro BLK#blk? count*, init + local c, i + c = count + match, init + emit size: c dup ? + else + i = init + emit size: c dup i + end match + end macro + iterate name, D#def, BLK#blk + struc name? args& + .: name? args + end struc + end iterate + end iterate + iterate , TRIO,DW24, DF,DL + macro name? vals*& + alias? vals + end macro + struc name? args& + .: name? args + end struc + end iterate + macro ALIGN? val* + local v + v = val + rb v-1 - ($ + v-1) mod v + end macro + macro SEGMENT? name* + segment name + end macro + macro ASSUME? expr* + namespace ez80 + assume? expr + end namespace + end macro + iterate register, B, NZ, Z, NC, C, PO, PE, P, M, D, E, \ + H, IXH, IYH, L, IXL, IYL, F, A, I, R, \ + MB, BC, DE, HL, IX, IY, SP, AF, AF' + register? := ez80.register? + end iterate + iterate suffix, , .s?, .l?, .is?, .il?, .sis?, .sil?, .lis?, .lil? + irpv name, ez80.@ez80.oplist + rawmatch rawname, name + define rawname rawname + macro rawname#suffix args& + namespace ez80 + name#suffix args + end namespace + end macro + end rawmatch + end irpv + macro LD? d, s* + namespace ez80 + @ez80.classify dst, dstind, d + @ez80.classify src, srcind, s + if ~dstind & dst eq dst element 1 & dst @ez80.is_reg @ez80.wreg \ + & dst metadata 1 scale 1 and 001o & ~srcind \ + & src relativeto src element 1 & src @ez80.is_reg @ez80.wreg + if src metadata 1 scale 1 = 007o + PUSH? s + POP? d + else + LEA? d, s + end if + else + LD? d, s + end if + end namespace + end macro + macro JR?#suffix args& + namespace ez80 + jq?#suffix args + end namespace + end macro + end iterate + iterate , UEXT,, SEXT,RLA + macro name? reg* + carry? + SBC? reg, reg + end macro + end iterate + macro COMMENT?! delim*& + end match + local inside + inside = 0 + macro ?! line& + local length, text + length = 0 + if inside + length = lengthof `line + text = `line + else if `line = 'end match' + inside = 1 + length = lengthof `delim - 1 + text = `delim shr 8 + end if + repeat length + if ~text xor `delim and $FF + purge ? + break + end if + text = text shr 8 + end repeat + end macro + end macro + + if defined debug + debug.enabled = 0 + debug.startAddr = $ + iterate name, ALIAS, BASE, DEFINE, ENDREC, SPACE, TAG + macro name? str1* + if debug.enabled + virtual debug + debug.uleb128 debug.name + debug.string str1 + end virtual + end if + end macro + end iterate + iterate name, BEGFUNC, ENDFUNC + macro name? str1, num1, str2* + if debug.enabled + local line, addr + line = num1 + addr = $ + virtual debug + debug.uleb128 debug.name + debug.string str1, str2 + debug.uleb128 line - debug.line, addr - debug.addr + end virtual + debug.line = line + debug.addr = addr + end if + end macro + end iterate + macro BEGREC? str1, num1* + if debug.enabled + virtual debug + debug.uleb128 debug.BEGREC + debug.string str1 + debug.uleb128 num1 + end virtual + end if + end macro + iterate , CLASS,u, DIM,u, LENGTH,u, REG,u, SIZE,u, TYPE,s, VALUE,s + macro name? num1* + if debug.enabled + virtual debug + debug.uleb128 debug.name + debug.signed#leb128 num1 + end virtual + end if + end macro + end iterate + macro DEBUG? str1* + virtual debug + debug.uleb128 debug.FILE, lengthof debug.source + emit 1: debug.source + debug.uleb128 debug.startAddr - debug.addr, debug.DEBUG + debug.string str1 + end virtual + debug.enabled = 1 + debug.line = 0 + debug.addr = debug.startAddr + end macro + macro END?! + end if + if debug.enabled + local addr + segment code + addr = $ + virtual debug + debug.uleb128 debug.END, addr - debug.addr + end virtual + debug.addr = addr + end if + if 0 + end macro + macro ENDEF? + if debug.enabled + virtual debug + debug.uleb128 debug.ENDEF + end virtual + end if + end macro + macro FILE? str1* + debug.source = str1 + end macro + macro LINE? num1* + local line, addr + line = num1 + addr = $ + if line <> debug.line | addr <> debug.addr & debug.enabled + virtual debug + debug.uleb128 debug.LINE, line - debug.line, addr - debug.addr + end virtual + debug.line = line + debug.addr = addr + end if + end macro + else + iterate name, ALIAS, BASE, BEGFUNC, BEGREC, CLASS, DEBUG, \ + DEFINE, DIM, ENDEF, ENDFUNC, ENDREC, FILE, \ + LENGTH, LINE, REG, SIZE, SPACE, TAG, TYPE, VALUE + macro name? args& + end macro + end iterate + macro END?! + end if + if 0 + end macro + end if + + struc ? def::& + . def + end struc + macro ? line& + match .rest, line + rest + else match first= .rest, line + first rest + else + line + end match + end macro + if 1 + include file + end if + purge ? + restruc ? + end virtual + end namespace + end macro + macro files.srcs.handle file, isused* + if ~isused + files.srcs.check file, isused + end if + if isused + files.srcs.parse file + end if + end macro + + macro symbol? args*& + iterate arg, args + rawmatch symbol == value, arg + namespace segments + global.symbol := value + virtual + local name + emit 1: `symbol + load name: $ - $$ from $$ + global equ = name global.symbol + end virtual + end namespace + else + 'Syntax error in symbol arguments' + end rawmatch + end iterate + end macro + + iterate name, srcs, libs + macro files.name.add file, used* + local isused + rawmatch rawused, used + namespace segments + isused = rawused + end namespace + end rawmatch + if `file and $FF = "'" + files.name equ file, isused + else + files.name equ `file, isused + end if + end macro + macro name? args*& + local require + iterate arg, args + match file= =used? =if?= used, arg + files.name.add file, used + else match file= =used?, arg + files.name.add file, 1 + else + files.name.add arg, 0 + end match + end iterate + end macro + end iterate + + macro locate? args*& + iterate arg, args + rawmatch name =at? location, arg + segments equ segments.name? + namespace segments + name? := `name + name.base? := location + end namespace + else + err 'Syntax error in locate argument' + end rawmatch + end iterate + end macro + macro range? args*& + iterate arg, args + rawmatch name lower : upper, arg + locate name at lower + namespace segments + name.high? := upper + end namespace + else + err 'Syntax error in range arguments' + end rawmatch + end iterate + end macro + macro order?: args*& + match first =, second =, rest, args + order first, second + order second, rest + else match first =, second, args + locate second at first.base + first.length + else + err 'Not enough order arguments' + end match + end macro + macro merge? args*& + match name == list, args + order list + iterate segment, list + locate name at segment.base + indx %% + namespace segments + name.top? := segment.base + segment.length + if defined segment.high + name.high? := segment.high + end if + end namespace + break + end iterate + else + err 'Syntax error in merge arguments' + end match + end macro + + macro hex value*, leading: '0', digits: 6 + local val, zero, digit, char + emit 1: ' ' + val = value + zero = leading + repeat digits + digit = (val shr ((%% - %) shl 2)) and 0Fh + if digit < 10 + char = '0' + digit + else + char = 'A' + digit - 10 + end if + if digit + zero = '0' + else if % <> %% + char = zero + end if + emit 1: char + end repeat + end macro + + macro map? + local longest, name + postpone ? + virtual as 'map' + longest = lengthof "Segment" + irpv segment, segments + if longest < lengthof segment + longest = lengthof segment + end if + end irpv + emit 1: "Segment", longest - lengthof "Segment" + 1 dup ' ', "Base Top High Length", 10, longest dup '-', 4 dup " ------", '-', 10 + irpv segment, segments + namespace segment + if longest < lengthof segment + longest = lengthof segment + end if + emit 1: segment, longest - lengthof segment dup ' ' + hex base + hex top + if defined high + hex high + else + emit 1: 7 dup ' ' + end if + hex length, ' ' + emit 1: 'h', 10 + end namespace + end irpv + match any, global + longest = lengthof "Label" + irpv symbol, global + match name == value, symbol + if longest < lengthof name + longest = lengthof name + end if + end match + end irpv + emit 1: 10, "Label", longest - lengthof "Label" + 3 dup ' ', "Value", 10, longest dup '-', 3 dup ' ', 6 dup '-', 10 + irpv symbol, global + match name == value, symbol + emit 1: name, longest - lengthof name + 1 dup ' ', '=' + hex value + emit 1: 10 + end match + end irpv + end match + end virtual + end postpone + end macro + macro dbg? + virtual as 'dbg' + debug:: + end virtual + namespace debug + virtual at 0 + iterate name, EOF, ALIAS, BASE, BEGFUNC, BEGREC, CLASS, DEBUG, DEFINE, \ + DIM, END, ENDEF, ENDFUNC, ENDREC, FILE, LENGTH, LINE, \ + REG, SIZE, SPACE, STRINGS, TAG, TYPE, VALUE + name rb 1 + end iterate + end virtual + line = 0 + addr = 0 + macro uleb128 values*& + iterate value, values + local val + val = value + assert val >= 0 + while val shr 7 > 0 + emit 1: val and 07Fh or 080h + val = val shr 7 + end while + emit 1: val + end iterate + end macro + macro sleb128 values*& + iterate value, values + local val + val = value + while val shr 6 <> 0 & val shr 6 <> -1 + emit 1: val and 07Fh or 080h + val = val shr 7 + end while + emit 1: val and 07Fh + end iterate + end macro + restore strings + macro string values*& + iterate value, values + local count, unfound + count = 0 + unfound = 1 + irpv each, debug.strings + if each = value + unfound = 0 + debug.uleb128 % + break + end if + count = %% + end irpv + if unfound + debug.uleb128 count + 1 + debug.strings =: value + end if + end iterate + end macro + end namespace + end macro + + macro segment name* + end virtual + virtual segments.name.area + end macro + + if ~defined segments + err 'No segments defined' + else + restore output.base, output.top ; forbid forward reference + irpv segment, segments + namespace segment + virtual at base + area?:: + end virtual + if ~defined output.base | output.base > base & ~defined high + output.base = base + end if + end namespace + end irpv + irpv file, files.srcs + files = 0 + files.srcs.handle file + end irpv + if ~defined files + err 'Please pass the input files with -i\'srcs "file1" [if require1], "file2" [if require2], ...\'' + end if + irpv file, files.libs + virtual segments.libs.area + files.libs.handle file + end virtual + end irpv + + if defined debug + virtual debug + if defined debug.strings + debug.uleb128 debug.STRINGS + irpv string, debug.strings + if % = 1 + debug.uleb128 %% + end if + debug.uleb128 lengthof string + emit 1: string + end irpv + end if + debug.uleb128 debug.EOF + end virtual + end if + + irpv segment, segments + namespace segment + virtual area + top? := $ + length? := $ - $$ + initlen? := $@ - $$ + end virtual + if ~defined high + if ~defined output.top | output.top < top + output.top = top + end if + else if top > high + repeat 1, len: length, over: top - high, max: high - base + err 'Segment ', segment, ' is ', `len, ' bytes, ', \ + `over, ' bytes larger than the maximum of ', \ + `max, ' bytes' + end repeat + end if + end namespace + end irpv + org output.base + rb output.top - $ + postpone ? + irpv segment, segments + namespace segment + if ~defined high + load output: initlen from area: base + store output: initlen at base + end if + end namespace + end irpv + end postpone + end if + purge ? +end macro diff --git a/frontends/calculator/CEdev/include/fasmg-ez80/ti84pceg.inc b/frontends/calculator/CEdev/include/fasmg-ez80/ti84pceg.inc index 73b7fc1..8dac20d 100644 --- a/frontends/calculator/CEdev/include/fasmg-ez80/ti84pceg.inc +++ b/frontends/calculator/CEdev/include/fasmg-ez80/ti84pceg.inc @@ -1,61 +1,61 @@ -macro ?! - ; assign needs to be local so that it is only - ; defined once (no purge!) so that it can be - ; forward referenced so that it can recurse - local assign - macro assign: name*, expr& - match left =% right, expr - assign name, left mod right - else match left =| right, expr - assign name, left or right - else match left =& right, expr - assign name, left and right - else match left =^ right, expr - assign name, left xor right - else match left =<=< right, expr - assign name, left shl right - else match left =>=> right, expr - assign name, left shr right - else match left =~ right, expr - assign name, left not right - else match =~ right, expr - assign name, not right - else - name? := expr - end match - end macro - struc (name) equ? expr& - assign name, expr - end struc - macro Ld args& - match =equ? expr, args - assign name, expr - end match - end macro - purge ? -end macro - -macro .list? -end macro -macro .nolist? -end macro -macro #define? name -end macro -macro #ifdef? name -end macro -macro #ifndef? name -end macro -macro #endif? -end macro - -element anovaf_vars? -include 'ti84pce.inc' - -restruc equ? -purge Ld -purge .list? -purge .nolist? -purge #define? -purge #ifdef? -purge #ifndef? -purge #endif? +macro ?! + ; assign needs to be local so that it is only + ; defined once (no purge!) so that it can be + ; forward referenced so that it can recurse + local assign + macro assign: name*, expr& + match left =% right, expr + assign name, left mod right + else match left =| right, expr + assign name, left or right + else match left =& right, expr + assign name, left and right + else match left =^ right, expr + assign name, left xor right + else match left =<=< right, expr + assign name, left shl right + else match left =>=> right, expr + assign name, left shr right + else match left =~ right, expr + assign name, left not right + else match =~ right, expr + assign name, not right + else + name? := expr + end match + end macro + struc (name) equ? expr& + assign name, expr + end struc + macro Ld args& + match =equ? expr, args + assign name, expr + end match + end macro + purge ? +end macro + +macro .list? +end macro +macro .nolist? +end macro +macro #define? name +end macro +macro #ifdef? name +end macro +macro #ifndef? name +end macro +macro #endif? +end macro + +element anovaf_vars? +include 'ti84pce.inc' + +restruc equ? +purge Ld +purge .list? +purge .nolist? +purge #define? +purge #ifdef? +purge #ifndef? +purge #endif? diff --git a/frontends/calculator/CEdev/include/fasmg-ez80/tiformat.inc b/frontends/calculator/CEdev/include/fasmg-ez80/tiformat.inc index 23ec697..88faa36 100644 --- a/frontends/calculator/CEdev/include/fasmg-ez80/tiformat.inc +++ b/frontends/calculator/CEdev/include/fasmg-ez80/tiformat.inc @@ -1,105 +1,105 @@ -macro format?.ti? clause& - local all, checkloc, checksum, cplx, data, exec, flag, head, name, process, prot, temp, type, ext, var - macro process: setting - match first rest, setting - process first - process rest - else match =ARCHIVED?, setting - flag = flag or 1 shl 7 - else match =EXECUTABLE?, setting - define exec - else match =PROTECTED?, setting - type = 6 - define prot - else match =REAL?, setting - type = 0 - ext = '8xn' - else match =LIST?, setting - if defined cplx - type = 13 - else - type = 2 - end if - ext = '8xl' - else match =MATRIX?, setting - type = 2 - ext = '8xm' - else match =EQUATION?, setting - type = 3 - ext = '8xy' - else match =STRING?, setting - type = 4 - ext = '8xs' - else match =PROGRAM?, setting - if defined prot - type = 6 - else - type = 5 - end if - ext = '8xp' - else match =PICTURE?, setting - type = 7 - ext = '8ci' - else match =GDB?, setting - type = 1 - ext = '8xd' - else match =COMPLEX?, setting - type = 12 - define cplx - ext = '8xc' - else match =APPVAR?, setting - type = 21 - ext = '8xv' - else match =GROUP?, setting - type = 23 - ext = '8xg' - else match =IMAGE?, setting - type = 26 - ext = '8ca' - else if setting eqtype 'name' - name = setting - else if setting eqtype 0 - type = setting - ext = '8x' - end if - end macro - name = 'A' - type = 6 - ext = '8xp' - flag = 0 - process clause - format binary as ext - assert ~$% & 'Unexpected data before format directive' - dq '**TI83F*' - db 26, 10, 0 - rb 42 - dw sizeof all - label all: checkloc - $% - dw sizeof head, sizeof data - label head: data - $ - db type - dq name - db 0, flag - dw sizeof data - label data: checkloc - $% - dw sizeof var - label var: checkloc - $% - if defined exec - dw 07BEFh - org 0D1A881h - else - org 0 - end if - postpone - label checkloc at $% - end postpone - postpone ? - assert checkloc = $% & 'Unexpected postpone before format directive' - checksum = 0 - repeat sizeof all - load temp: byte from: all + %-1 - checksum = (checksum + temp) and 0FFFFh - end repeat - dw checksum - end postpone -end macro +macro format?.ti? clause& + local all, checkloc, checksum, cplx, data, exec, flag, head, name, process, prot, temp, type, ext, var + macro process: setting + match first rest, setting + process first + process rest + else match =ARCHIVED?, setting + flag = flag or 1 shl 7 + else match =EXECUTABLE?, setting + define exec + else match =PROTECTED?, setting + type = 6 + define prot + else match =REAL?, setting + type = 0 + ext = '8xn' + else match =LIST?, setting + if defined cplx + type = 13 + else + type = 2 + end if + ext = '8xl' + else match =MATRIX?, setting + type = 2 + ext = '8xm' + else match =EQUATION?, setting + type = 3 + ext = '8xy' + else match =STRING?, setting + type = 4 + ext = '8xs' + else match =PROGRAM?, setting + if defined prot + type = 6 + else + type = 5 + end if + ext = '8xp' + else match =PICTURE?, setting + type = 7 + ext = '8ci' + else match =GDB?, setting + type = 1 + ext = '8xd' + else match =COMPLEX?, setting + type = 12 + define cplx + ext = '8xc' + else match =APPVAR?, setting + type = 21 + ext = '8xv' + else match =GROUP?, setting + type = 23 + ext = '8xg' + else match =IMAGE?, setting + type = 26 + ext = '8ca' + else if setting eqtype 'name' + name = setting + else if setting eqtype 0 + type = setting + ext = '8x' + end if + end macro + name = 'A' + type = 6 + ext = '8xp' + flag = 0 + process clause + format binary as ext + assert ~$% & 'Unexpected data before format directive' + dq '**TI83F*' + db 26, 10, 0 + rb 42 + dw sizeof all + label all: checkloc - $% + dw sizeof head, sizeof data + label head: data - $ + db type + dq name + db 0, flag + dw sizeof data + label data: checkloc - $% + dw sizeof var + label var: checkloc - $% + if defined exec + dw 07BEFh + org 0D1A881h + else + org 0 + end if + postpone + label checkloc at $% + end postpone + postpone ? + assert checkloc = $% & 'Unexpected postpone before format directive' + checksum = 0 + repeat sizeof all + load temp: byte from: all + %-1 + checksum = (checksum + temp) and 0FFFFh + end repeat + dw checksum + end postpone +end macro diff --git a/frontends/calculator/CEdev/include/fileioc.h b/frontends/calculator/CEdev/include/fileioc.h index e703143..cdce463 100644 --- a/frontends/calculator/CEdev/include/fileioc.h +++ b/frontends/calculator/CEdev/include/fileioc.h @@ -1,509 +1,509 @@ -/** - * @file - * @author Matt "MateoConLechuga" Waltz - * @brief Implements variable reading and writing routines - */ - -#ifndef H_FILEIOC -#define H_FILEIOC - -#include -#include -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Varible and flag definitions */ -#define TI_PRGM_TYPE (0x05) -#define TI_PPRGM_TYPE (0x06) -#define TI_TPRGM_TYPE (0x16) -#define TI_APPVAR_TYPE (0x15) -#define TI_REAL_TYPE (0x00) -#define TI_CPLX_TYPE (0x0C) -#define TI_MATRIX_TYPE (0x02) -#define TI_STRING_TYPE (0x04) -#define TI_EQU_TYPE (0x03) -#define TI_REAL_LIST_TYPE (0x01) -#define TI_CPLX_LIST_TYPE (0x0D) - -#ifndef EOF -#define EOF (-1) -#endif - -/** - * @brief Variable slot type - */ -typedef uint8_t ti_var_t; - -/** - * Closes all open slots - * @warning Call before you use any variable functions - */ -void ti_CloseAll(void); - -/** - * Opens a file - * - * An AppVar is used as default file storage - * @param name Name of file to open - * @param mode - * "r" - Opens a file for reading. The file must exist. Keeps file in archive if in archive.
- * "w" - Creates an empty file for writing. Overwrites file if already exists.
- * "a" - Appends to a file. Writing operations, append data at the end of the file. The file is created if it does not exist.
- * "r+" - Opens a file to update both reading and writing. The file must exist. Moves file from archive to RAM if in archive.
- * "w+" - Creates an empty file for both reading and writing. Overwrites file if already exists.
- * "a+" - Opens a file for reading and appending. Moves file from archive to RAM if in archive. Created if it does not exist. - * @returns Slot variable - * @note If there isn't enough memory to create the variable, or a slot isn't open, zero (0) is returned - */ -ti_var_t ti_Open(const char *name, const char *mode); - -/** - * Opens a variable - * - * Can open any type of program or appvar variable - * @param varname Name of variable to open - * @param mode - * "r" - Opens a file for reading. The file must exist. Keeps file in archive if in archive.
- * "w" - Creates an empty file for writing. Overwrites file if already exists.
- * "a" - Appends to a file. Writing operations, append data at the end of the file. The file is created if it does not exist.
- * "r+" - Opens a file to update both reading and writing. The file must exist. Moves file from archive to RAM if in archive.
- * "w+" - Creates an empty file for both reading and writing. Overwrites file if already exists.
- * "a+" - Opens a file for reading and appending. Moves file from archive to RAM if in archive. Created if it does not exist. - * @param type Specifies the type of variable to open - * @returns Slot variable - * @note If there isn't enough memory to create the variable, or a slot isn't open, zero (0) is returned - */ -ti_var_t ti_OpenVar(const char *varname, const char *mode, uint8_t type); - -/** - * Frees an open variable slot - * @returns Zero if closing failed - */ -int ti_Close(const ti_var_t slot); - -/** - * Returns the name of the file(s) that contains the string as the first part of the variable; - * which can then be used with ti_Open and other functions - * - * seach_pos should be set to NULL to begin a search, and is updated with each call - * - * @code - * char *var_name; - * uint8_t *search_pos = NULL; - * while((var_name = ti_Detect(&search_pos, "my_data")) != NULL) { - * ...do something with the name or search_pos... - * } - * @endcode - * @param curr_search_posistion Current offset in the VAT - * @param detection_string String to search for (NULL to search for all) - * @note If the return value is NULL, there are no more variables to find - */ -char *ti_Detect(void **curr_search_posistion, const char *detection_string); - -/** - * Returns the name of the file(s) that contains the string as the first part of the variable; - * which can then be used with ti_OpenVar and other functions - * - * seach_pos should be set to NULL to begin a search, and is updated with each call - * - * @code - * char *var_name; - * uint8_t *search_pos = NULL; - * while((var_name = ti_DetectVar(&search_pos, "my_data", TI_PRGM_TYPE)) != NULL) { - * ...do something with the name or search_pos... - * } - * @endcode - * @param curr_search_posistion Current offset in the VAT - * @param detection_string String to search for (NULL to search for all) - * @param var_type Type of variable to detect - * @note If the return value is NULL, there are no more variables to find - */ -char *ti_DetectVar(void **curr_search_posistion, const char *detection_string, uint8_t var_type); - -/** - * Returns the name of the file(s) that contains the string as the first part of the variable; - * which can then be used with ti_OpenVar and other functions - * - * seach_pos should be set to NULL to begin a search, and is updated with each call - * - * @code - * char *var_name; - * uint8_t *search_pos = NULL; - * uint8_t type; - * while((var_name = ti_DetectVar(&search_pos, "my_data", &type)) != NULL) { - * if (type == TI_PRGM_TYPE || type == TI_PPRGM_TYPE) { - * ...do something with the name or search_pos... - * } - * } - * @endcode - * @param curr_search_posistion Current offset in the VAT - * @param detection_string String to search for (NULL to search for all) - * @param var_type Type of variable found - * @note If the return value is NULL, there are no more variables to find - */ -char *ti_DetectAny(void **curr_search_posistion, const char *detection_string, uint8_t *var_type); - -/** - * Writes to the current variable slot - * - * @param data Pointer to data to write - * @param size Size (in bytes) of a single data chunk - * @param count Number of data chunks to write to the variable slot - * @param slot Variable slot to write the data to - * @returns The number of chunks written (should be equal to count) - */ -size_t ti_Write(const void *data, size_t size, size_t count, const ti_var_t slot); - -/** - * Reads from the current variable pointer - * - * @param data Pointer to data to read into - * @param size Size (in bytes) of a single data chunk - * @param count Number of data chunks to read from the variable slot - * @param slot Variable slot to read the data from - * @returns The number of chunks read (should be equal to count) - */ -size_t ti_Read(const void *data, size_t size, size_t count, const ti_var_t slot); - -/** - * Writes a character directly into the slot data pointer, and increments the offset - * - * @param c Character to write - * @param slot Variable slot to put the character to - * @returns The input c is returned if no error - * @returns 'EOF' if current offset is larger than file size, or memory isn't large enough - */ -int ti_PutC(const char c, const ti_var_t slot); - -/** - * Pulls a character directly from the slot data pointer, and increments the offset - * - * @param slot Variable slot to get the character from - * @returns 1 byte character at the current variable offset - * @returns 'EOF' if current offset is larger than file size - */ -int ti_GetC(const ti_var_t slot); - -/** - * Seeks to an offset - * - * @param offset Number of bytes to offest from (can be negative) - * @param origin - * SEEK_SET (0) - Seek from beginning of file
- * SEEK_CUR (1) - Seek from current offset in file
- * SEEK_END (2) - Seek from end of file - * @param slot Variable slot seeking in - * @returns 'EOF' on seek failure - */ -int ti_Seek(int offset, unsigned int origin, const ti_var_t slot); - -/** - * Seeks to the start of the given variable - * - * Basically an ti_Seek(0, SEEK_SET, slot); - * @param slot Variable slot to rewind - * @returns 'EOF' on rewind failure - */ -int ti_Rewind(const ti_var_t slot); - -/** - * Gets the offset in a slot - * - * @param slot Slot to test - * @returns The value of the current slot offset - */ -uint16_t ti_Tell(const ti_var_t slot); - -/** - * Gets the size of a slot - * - * @param slot Slot to test - * @returns The size of the slot variable - */ -uint16_t ti_GetSize(const ti_var_t slot); - -/** - * Resizes the slot variable - * - * @param slot Slot to resize - * @param new_size New size of slot - * @returns Resized size on success, 0 on failure, or -1 if the slot cannot be opened - * @note The variable offset is set to the beginning of the file - */ -int ti_Resize(size_t new_size, const ti_var_t slot); - -/** - * Tests if a slot is in the archive - * - * @param slot Slot to test - * @returns Zero (0) if the slot is not in the archive - */ -int ti_IsArchived(const ti_var_t slot); - -/** - * Sends the variable into either the archive or RAM if needed - * - * @param archived - * True - Send to Archive
- * False - Send to RAM - * @param slot Slot to send - * @returns Zero if the operation fails from not enough memory or another error - */ -int ti_SetArchiveStatus(bool archived, const ti_var_t slot); - -/** - * Deletes an AppVar - * - * @param name Name of AppVar to delete - * @returns 0 if failed - */ -int ti_Delete(const char *name); - -/** - * Deletes a variable given the name and type - * - * @param varname Name of variable to delete - * @param type Type of variable to delete - * @returns 0 if failed - */ -int ti_DeleteVar(const char *varname, const uint8_t type); - -/** - * Gets the string used for displaying a TI token - * - * @param length_of_string Pointer to variable to hold length of resulting string (Can be NULL if you don't care) - * @param length_of_token Pointer to variable to hold length of the token, used for determining the next read location (Can be NULL if you don't care) - * @param read_pointer Address of pointer to data to read - * @note read_pointer is updated to the next token, depending on if it is 1 or 2 bytes in length - */ -char *ti_GetTokenString(void **read_pointer, uint8_t *length_of_token, unsigned int *length_of_string); - -/** - * Gets a pointer to the data located at the current posistion in the slot; - * Good way for fast reading of data - * @param slot Variable slot to get pointer of - * @returns Pointer to variable data - */ -void *ti_GetDataPtr(const ti_var_t slot); - -/** - * Gets the VAT location of the slot - * - * @param slot Variable slot to get VAT location of - * @returns VAT location of variable - */ -void *ti_GetVATPtr(const ti_var_t slot); - -/** - * Gets the variable name of an already opened slot - * - * @param slot Variable slot to get name of - * @param name Buffer to store name in, generally at least 10 bytes including null terminator. - * @returns None - */ -void ti_GetName(char *name, const ti_var_t slot); - -/** - * Renames a file - * - * @param old Old name of file - * @param new New name of file - * @returns 0 if success, 1 if file already exists, 2 any other error occurs. - * @warning It is potentially hazardous to rename an open file. Be sure to close the open file before renaming, - */ -uint8_t ti_Rename(const char *old, const char *new); - -/** - * Renames a variable - * - * @param old Old name of variable - * @param new New name of variable - * @param type Type of variable to rename - * @returns 0 if success, 1 if variable already exists, 2 any other error occurs. - * @warning It is potentially hazardous to rename an open variable. Be sure to close the open variable before renaming, - */ -uint8_t ti_RenameVar(const char *old, const char *new, const uint8_t type); - -/** - * Sets a variable - * - * @param var_type Type of variable to set - * @param name Pointer to name of variable - * @param data Pointer to data to set - * @returns 0 if success - */ -uint8_t ti_SetVar(const ti_var_t var_type, const char *name, void *data); - -/** - * Stores a variable to another variable - * - * @param var_type_to Type of variable to store to - * @param to Pointer to data to store to - * @param var_type_from Type of variable to get from - * @param from Pointer to data to get from - * @returns 0 if success - */ -uint8_t ti_StoVar(const ti_var_t var_type_to, void *to, const ti_var_t var_type_from, void *from); - -/** - * Recalls a variable - * - * @param var_type Type of variable to recall - * @param var_name Pointer to name of variable to recall - * @param data_struct Address of pointer to variable structure - * @returns 0 if success - * @note data_struct is set to the variable's data - */ -uint8_t ti_RclVar(const uint8_t var_type, const char *var_name, void **data_struct); - -/** - * Allocates space for a real variable - * @returns Pointer to variable - */ -#define ti_MallocReal() ((real_t*)malloc(sizeof(real_t))) - -/** - * Allocates space for a complex variable - * @returns Pointer to variable - */ -#define ti_MallocCplx() ((cplx_t*)malloc(sizeof(cplx_t))) - -/** - * Allocates space for a string variable - * @param len Length of string - * @returns Pointer to variable - */ -#define ti_MallocString(len) ti_AllocString((len), ((void*)malloc)) - -/** - * Allocates space for a list variable - * @param dim Dimension of list - * @returns Pointer to variable - */ -#define ti_MallocList(dim) ti_AllocList((dim), ((void*)malloc)) - -/** - * Allocates space for a matrix variable - * @param rows Rows in matrix - * @param cols Columns in matrix - * @returns Pointer to variable - */ -#define ti_MallocMatrix(rows, cols) ti_AllocMatrix((rows), (cols), ((void*)malloc)) - -/** - * Allocates space for a complex list variable - * @param dim Dimension of complex list - * @returns Pointer to variable - */ -#define ti_MallocCplxList(dim) ti_AllocCplxList((dim), ((void*)malloc)) - -/** - * Allocates space for an equation variable - * @param len Length of equation variable - * @returns Pointer to variable - */ -#define ti_MallocEqu(len) ti_AllocEqu((len), ((void*)malloc)) - -string_t *ti_AllocString(unsigned len, void (*malloc_routine)(size_t)); -list_t *ti_AllocList(unsigned dim, void (*malloc_routine)(size_t)); -matrix_t *ti_AllocMatrix(uint8_t rows, uint8_t cols, void (*malloc_routine)(size_t)); -cplx_list_t *ti_AllocCplxList(unsigned dim, void (*malloc_routine)(size_t)); -equ_t *ti_AllocEqu(unsigned len, void (*malloc_routine)(size_t)); - -/* Some more definitions using Ans */ -#define TI_ANS_TYPE (0x00) -#define ti_Ans ("\x72\0") - -/* Some string definitions */ -#define ti_Str1 ("\xAA\x0\0") -#define ti_Str2 ("\xAA\x1\0") -#define ti_Str3 ("\xAA\x2\0") -#define ti_Str4 ("\xAA\x3\0") -#define ti_Str5 ("\xAA\x4\0") -#define ti_Str6 ("\xAA\x5\0") -#define ti_Str7 ("\xAA\x6\0") -#define ti_Str8 ("\xAA\x7\0") -#define ti_Str0 ("\xAA\x8\0") -#define ti_StrT ('\xAA') - -/* Some equation definitions */ -#define ti_Y1 ("\x5E\x10\0") -#define ti_Y2 ("\x5E\x11\0") -#define ti_Y3 ("\x5E\x12\0") -#define ti_Y4 ("\x5E\x13\0") -#define ti_Y5 ("\x5E\x14\0") -#define ti_Y6 ("\x5E\x15\0") -#define ti_Y7 ("\x5E\x16\0") -#define ti_Y8 ("\x5E\x17\0") -#define ti_Y9 ("\x5E\x18\0") -#define ti_Y0 ("\x5E\x19\0") -#define ti_EquT ('\x5E') - -/* Some real and complex defines */ -#define ti_A ("\x41\0\0") -#define ti_B ("\x42\0\0") -#define ti_C ("\x43\0\0") -#define ti_D ("\x44\0\0") -#define ti_E ("\x45\0\0") -#define ti_F ("\x46\0\0") -#define ti_G ("\x47\0\0") -#define ti_H ("\x48\0\0") -#define ti_I ("\x49\0\0") -#define ti_J ("\x4A\0\0") -#define ti_K ("\x4B\0\0") -#define ti_L ("\x4C\0\0") -#define ti_M ("\x4D\0\0") -#define ti_N ("\x4E\0\0") -#define ti_O ("\x4F\0\0") -#define ti_P ("\x50\0\0") -#define ti_Q ("\x51\0\0") -#define ti_R ("\x52\0\0") -#define ti_S ("\x53\0\0") -#define ti_T ("\x54\0\0") -#define ti_U ("\x55\0\0") -#define ti_V ("\x56\0\0") -#define ti_W ("\x57\0\0") -#define ti_X ("\x58\0\0") -#define ti_Y ("\x59\0\0") -#define ti_Z ("\x60\0\0") -#define ti_Theta ("\x61\0\0") - -/* Some matrix defines */ -#define ti_MatA ("\x5C\x0\0") -#define ti_MatB ("\x5C\x1\0") -#define ti_MatC ("\x5C\x2\0") -#define ti_MatD ("\x5C\x3\0") -#define ti_MatE ("\x5C\x4\0") -#define ti_MatF ("\x5C\x5\0") -#define ti_MatG ("\x5C\x6\0") -#define ti_MatH ("\x5C\x7\0") -#define ti_MatI ("\x5C\x8\0") -#define ti_MatJ ("\x5C\x9\0") -#define ti_MatT ('\x5C') - -/* Some list defines */ -#define ti_L1 ("\x5D\x0\0") -#define ti_L2 ("\x5D\x1\0") -#define ti_L3 ("\x5D\x2\0") -#define ti_L4 ("\x5D\x3\0") -#define ti_L5 ("\x5D\x4\0") -#define ti_L6 ("\x5D\x5\0") -#define ti_LT ('\x5D') - -/* Compatibility defines */ -#define ti_Program TI_PRGM_TYPE -#define ti_ProtectedProgram TI_PPRGM_TYPE -#define ti_TempProgram TI_TPRGM_TYPE -#define ti_AppVar TI_APPVAR_TYPE - -#ifdef __cplusplus -} -#endif - -#endif +/** + * @file + * @author Matt "MateoConLechuga" Waltz + * @brief Implements variable reading and writing routines + */ + +#ifndef H_FILEIOC +#define H_FILEIOC + +#include +#include +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Varible and flag definitions */ +#define TI_PRGM_TYPE (0x05) +#define TI_PPRGM_TYPE (0x06) +#define TI_TPRGM_TYPE (0x16) +#define TI_APPVAR_TYPE (0x15) +#define TI_REAL_TYPE (0x00) +#define TI_CPLX_TYPE (0x0C) +#define TI_MATRIX_TYPE (0x02) +#define TI_STRING_TYPE (0x04) +#define TI_EQU_TYPE (0x03) +#define TI_REAL_LIST_TYPE (0x01) +#define TI_CPLX_LIST_TYPE (0x0D) + +#ifndef EOF +#define EOF (-1) +#endif + +/** + * @brief Variable slot type + */ +typedef uint8_t ti_var_t; + +/** + * Closes all open slots + * @warning Call before you use any variable functions + */ +void ti_CloseAll(void); + +/** + * Opens a file + * + * An AppVar is used as default file storage + * @param name Name of file to open + * @param mode + * "r" - Opens a file for reading. The file must exist. Keeps file in archive if in archive.
+ * "w" - Creates an empty file for writing. Overwrites file if already exists.
+ * "a" - Appends to a file. Writing operations, append data at the end of the file. The file is created if it does not exist.
+ * "r+" - Opens a file to update both reading and writing. The file must exist. Moves file from archive to RAM if in archive.
+ * "w+" - Creates an empty file for both reading and writing. Overwrites file if already exists.
+ * "a+" - Opens a file for reading and appending. Moves file from archive to RAM if in archive. Created if it does not exist. + * @returns Slot variable + * @note If there isn't enough memory to create the variable, or a slot isn't open, zero (0) is returned + */ +ti_var_t ti_Open(const char *name, const char *mode); + +/** + * Opens a variable + * + * Can open any type of program or appvar variable + * @param varname Name of variable to open + * @param mode + * "r" - Opens a file for reading. The file must exist. Keeps file in archive if in archive.
+ * "w" - Creates an empty file for writing. Overwrites file if already exists.
+ * "a" - Appends to a file. Writing operations, append data at the end of the file. The file is created if it does not exist.
+ * "r+" - Opens a file to update both reading and writing. The file must exist. Moves file from archive to RAM if in archive.
+ * "w+" - Creates an empty file for both reading and writing. Overwrites file if already exists.
+ * "a+" - Opens a file for reading and appending. Moves file from archive to RAM if in archive. Created if it does not exist. + * @param type Specifies the type of variable to open + * @returns Slot variable + * @note If there isn't enough memory to create the variable, or a slot isn't open, zero (0) is returned + */ +ti_var_t ti_OpenVar(const char *varname, const char *mode, uint8_t type); + +/** + * Frees an open variable slot + * @returns Zero if closing failed + */ +int ti_Close(const ti_var_t slot); + +/** + * Returns the name of the file(s) that contains the string as the first part of the variable; + * which can then be used with ti_Open and other functions + * + * seach_pos should be set to NULL to begin a search, and is updated with each call + * + * @code + * char *var_name; + * uint8_t *search_pos = NULL; + * while((var_name = ti_Detect(&search_pos, "my_data")) != NULL) { + * ...do something with the name or search_pos... + * } + * @endcode + * @param curr_search_posistion Current offset in the VAT + * @param detection_string String to search for (NULL to search for all) + * @note If the return value is NULL, there are no more variables to find + */ +char *ti_Detect(void **curr_search_posistion, const char *detection_string); + +/** + * Returns the name of the file(s) that contains the string as the first part of the variable; + * which can then be used with ti_OpenVar and other functions + * + * seach_pos should be set to NULL to begin a search, and is updated with each call + * + * @code + * char *var_name; + * uint8_t *search_pos = NULL; + * while((var_name = ti_DetectVar(&search_pos, "my_data", TI_PRGM_TYPE)) != NULL) { + * ...do something with the name or search_pos... + * } + * @endcode + * @param curr_search_posistion Current offset in the VAT + * @param detection_string String to search for (NULL to search for all) + * @param var_type Type of variable to detect + * @note If the return value is NULL, there are no more variables to find + */ +char *ti_DetectVar(void **curr_search_posistion, const char *detection_string, uint8_t var_type); + +/** + * Returns the name of the file(s) that contains the string as the first part of the variable; + * which can then be used with ti_OpenVar and other functions + * + * seach_pos should be set to NULL to begin a search, and is updated with each call + * + * @code + * char *var_name; + * uint8_t *search_pos = NULL; + * uint8_t type; + * while((var_name = ti_DetectVar(&search_pos, "my_data", &type)) != NULL) { + * if (type == TI_PRGM_TYPE || type == TI_PPRGM_TYPE) { + * ...do something with the name or search_pos... + * } + * } + * @endcode + * @param curr_search_posistion Current offset in the VAT + * @param detection_string String to search for (NULL to search for all) + * @param var_type Type of variable found + * @note If the return value is NULL, there are no more variables to find + */ +char *ti_DetectAny(void **curr_search_posistion, const char *detection_string, uint8_t *var_type); + +/** + * Writes to the current variable slot + * + * @param data Pointer to data to write + * @param size Size (in bytes) of a single data chunk + * @param count Number of data chunks to write to the variable slot + * @param slot Variable slot to write the data to + * @returns The number of chunks written (should be equal to count) + */ +size_t ti_Write(const void *data, size_t size, size_t count, const ti_var_t slot); + +/** + * Reads from the current variable pointer + * + * @param data Pointer to data to read into + * @param size Size (in bytes) of a single data chunk + * @param count Number of data chunks to read from the variable slot + * @param slot Variable slot to read the data from + * @returns The number of chunks read (should be equal to count) + */ +size_t ti_Read(const void *data, size_t size, size_t count, const ti_var_t slot); + +/** + * Writes a character directly into the slot data pointer, and increments the offset + * + * @param c Character to write + * @param slot Variable slot to put the character to + * @returns The input c is returned if no error + * @returns 'EOF' if current offset is larger than file size, or memory isn't large enough + */ +int ti_PutC(const char c, const ti_var_t slot); + +/** + * Pulls a character directly from the slot data pointer, and increments the offset + * + * @param slot Variable slot to get the character from + * @returns 1 byte character at the current variable offset + * @returns 'EOF' if current offset is larger than file size + */ +int ti_GetC(const ti_var_t slot); + +/** + * Seeks to an offset + * + * @param offset Number of bytes to offest from (can be negative) + * @param origin + * SEEK_SET (0) - Seek from beginning of file
+ * SEEK_CUR (1) - Seek from current offset in file
+ * SEEK_END (2) - Seek from end of file + * @param slot Variable slot seeking in + * @returns 'EOF' on seek failure + */ +int ti_Seek(int offset, unsigned int origin, const ti_var_t slot); + +/** + * Seeks to the start of the given variable + * + * Basically an ti_Seek(0, SEEK_SET, slot); + * @param slot Variable slot to rewind + * @returns 'EOF' on rewind failure + */ +int ti_Rewind(const ti_var_t slot); + +/** + * Gets the offset in a slot + * + * @param slot Slot to test + * @returns The value of the current slot offset + */ +uint16_t ti_Tell(const ti_var_t slot); + +/** + * Gets the size of a slot + * + * @param slot Slot to test + * @returns The size of the slot variable + */ +uint16_t ti_GetSize(const ti_var_t slot); + +/** + * Resizes the slot variable + * + * @param slot Slot to resize + * @param new_size New size of slot + * @returns Resized size on success, 0 on failure, or -1 if the slot cannot be opened + * @note The variable offset is set to the beginning of the file + */ +int ti_Resize(size_t new_size, const ti_var_t slot); + +/** + * Tests if a slot is in the archive + * + * @param slot Slot to test + * @returns Zero (0) if the slot is not in the archive + */ +int ti_IsArchived(const ti_var_t slot); + +/** + * Sends the variable into either the archive or RAM if needed + * + * @param archived + * True - Send to Archive
+ * False - Send to RAM + * @param slot Slot to send + * @returns Zero if the operation fails from not enough memory or another error + */ +int ti_SetArchiveStatus(bool archived, const ti_var_t slot); + +/** + * Deletes an AppVar + * + * @param name Name of AppVar to delete + * @returns 0 if failed + */ +int ti_Delete(const char *name); + +/** + * Deletes a variable given the name and type + * + * @param varname Name of variable to delete + * @param type Type of variable to delete + * @returns 0 if failed + */ +int ti_DeleteVar(const char *varname, const uint8_t type); + +/** + * Gets the string used for displaying a TI token + * + * @param length_of_string Pointer to variable to hold length of resulting string (Can be NULL if you don't care) + * @param length_of_token Pointer to variable to hold length of the token, used for determining the next read location (Can be NULL if you don't care) + * @param read_pointer Address of pointer to data to read + * @note read_pointer is updated to the next token, depending on if it is 1 or 2 bytes in length + */ +char *ti_GetTokenString(void **read_pointer, uint8_t *length_of_token, unsigned int *length_of_string); + +/** + * Gets a pointer to the data located at the current posistion in the slot; + * Good way for fast reading of data + * @param slot Variable slot to get pointer of + * @returns Pointer to variable data + */ +void *ti_GetDataPtr(const ti_var_t slot); + +/** + * Gets the VAT location of the slot + * + * @param slot Variable slot to get VAT location of + * @returns VAT location of variable + */ +void *ti_GetVATPtr(const ti_var_t slot); + +/** + * Gets the variable name of an already opened slot + * + * @param slot Variable slot to get name of + * @param name Buffer to store name in, generally at least 10 bytes including null terminator. + * @returns None + */ +void ti_GetName(char *name, const ti_var_t slot); + +/** + * Renames a file + * + * @param old Old name of file + * @param new New name of file + * @returns 0 if success, 1 if file already exists, 2 any other error occurs. + * @warning It is potentially hazardous to rename an open file. Be sure to close the open file before renaming, + */ +uint8_t ti_Rename(const char *old, const char *new); + +/** + * Renames a variable + * + * @param old Old name of variable + * @param new New name of variable + * @param type Type of variable to rename + * @returns 0 if success, 1 if variable already exists, 2 any other error occurs. + * @warning It is potentially hazardous to rename an open variable. Be sure to close the open variable before renaming, + */ +uint8_t ti_RenameVar(const char *old, const char *new, const uint8_t type); + +/** + * Sets a variable + * + * @param var_type Type of variable to set + * @param name Pointer to name of variable + * @param data Pointer to data to set + * @returns 0 if success + */ +uint8_t ti_SetVar(const ti_var_t var_type, const char *name, void *data); + +/** + * Stores a variable to another variable + * + * @param var_type_to Type of variable to store to + * @param to Pointer to data to store to + * @param var_type_from Type of variable to get from + * @param from Pointer to data to get from + * @returns 0 if success + */ +uint8_t ti_StoVar(const ti_var_t var_type_to, void *to, const ti_var_t var_type_from, void *from); + +/** + * Recalls a variable + * + * @param var_type Type of variable to recall + * @param var_name Pointer to name of variable to recall + * @param data_struct Address of pointer to variable structure + * @returns 0 if success + * @note data_struct is set to the variable's data + */ +uint8_t ti_RclVar(const uint8_t var_type, const char *var_name, void **data_struct); + +/** + * Allocates space for a real variable + * @returns Pointer to variable + */ +#define ti_MallocReal() ((real_t*)malloc(sizeof(real_t))) + +/** + * Allocates space for a complex variable + * @returns Pointer to variable + */ +#define ti_MallocCplx() ((cplx_t*)malloc(sizeof(cplx_t))) + +/** + * Allocates space for a string variable + * @param len Length of string + * @returns Pointer to variable + */ +#define ti_MallocString(len) ti_AllocString((len), ((void*)malloc)) + +/** + * Allocates space for a list variable + * @param dim Dimension of list + * @returns Pointer to variable + */ +#define ti_MallocList(dim) ti_AllocList((dim), ((void*)malloc)) + +/** + * Allocates space for a matrix variable + * @param rows Rows in matrix + * @param cols Columns in matrix + * @returns Pointer to variable + */ +#define ti_MallocMatrix(rows, cols) ti_AllocMatrix((rows), (cols), ((void*)malloc)) + +/** + * Allocates space for a complex list variable + * @param dim Dimension of complex list + * @returns Pointer to variable + */ +#define ti_MallocCplxList(dim) ti_AllocCplxList((dim), ((void*)malloc)) + +/** + * Allocates space for an equation variable + * @param len Length of equation variable + * @returns Pointer to variable + */ +#define ti_MallocEqu(len) ti_AllocEqu((len), ((void*)malloc)) + +string_t *ti_AllocString(unsigned len, void (*malloc_routine)(size_t)); +list_t *ti_AllocList(unsigned dim, void (*malloc_routine)(size_t)); +matrix_t *ti_AllocMatrix(uint8_t rows, uint8_t cols, void (*malloc_routine)(size_t)); +cplx_list_t *ti_AllocCplxList(unsigned dim, void (*malloc_routine)(size_t)); +equ_t *ti_AllocEqu(unsigned len, void (*malloc_routine)(size_t)); + +/* Some more definitions using Ans */ +#define TI_ANS_TYPE (0x00) +#define ti_Ans ("\x72\0") + +/* Some string definitions */ +#define ti_Str1 ("\xAA\x0\0") +#define ti_Str2 ("\xAA\x1\0") +#define ti_Str3 ("\xAA\x2\0") +#define ti_Str4 ("\xAA\x3\0") +#define ti_Str5 ("\xAA\x4\0") +#define ti_Str6 ("\xAA\x5\0") +#define ti_Str7 ("\xAA\x6\0") +#define ti_Str8 ("\xAA\x7\0") +#define ti_Str0 ("\xAA\x8\0") +#define ti_StrT ('\xAA') + +/* Some equation definitions */ +#define ti_Y1 ("\x5E\x10\0") +#define ti_Y2 ("\x5E\x11\0") +#define ti_Y3 ("\x5E\x12\0") +#define ti_Y4 ("\x5E\x13\0") +#define ti_Y5 ("\x5E\x14\0") +#define ti_Y6 ("\x5E\x15\0") +#define ti_Y7 ("\x5E\x16\0") +#define ti_Y8 ("\x5E\x17\0") +#define ti_Y9 ("\x5E\x18\0") +#define ti_Y0 ("\x5E\x19\0") +#define ti_EquT ('\x5E') + +/* Some real and complex defines */ +#define ti_A ("\x41\0\0") +#define ti_B ("\x42\0\0") +#define ti_C ("\x43\0\0") +#define ti_D ("\x44\0\0") +#define ti_E ("\x45\0\0") +#define ti_F ("\x46\0\0") +#define ti_G ("\x47\0\0") +#define ti_H ("\x48\0\0") +#define ti_I ("\x49\0\0") +#define ti_J ("\x4A\0\0") +#define ti_K ("\x4B\0\0") +#define ti_L ("\x4C\0\0") +#define ti_M ("\x4D\0\0") +#define ti_N ("\x4E\0\0") +#define ti_O ("\x4F\0\0") +#define ti_P ("\x50\0\0") +#define ti_Q ("\x51\0\0") +#define ti_R ("\x52\0\0") +#define ti_S ("\x53\0\0") +#define ti_T ("\x54\0\0") +#define ti_U ("\x55\0\0") +#define ti_V ("\x56\0\0") +#define ti_W ("\x57\0\0") +#define ti_X ("\x58\0\0") +#define ti_Y ("\x59\0\0") +#define ti_Z ("\x60\0\0") +#define ti_Theta ("\x61\0\0") + +/* Some matrix defines */ +#define ti_MatA ("\x5C\x0\0") +#define ti_MatB ("\x5C\x1\0") +#define ti_MatC ("\x5C\x2\0") +#define ti_MatD ("\x5C\x3\0") +#define ti_MatE ("\x5C\x4\0") +#define ti_MatF ("\x5C\x5\0") +#define ti_MatG ("\x5C\x6\0") +#define ti_MatH ("\x5C\x7\0") +#define ti_MatI ("\x5C\x8\0") +#define ti_MatJ ("\x5C\x9\0") +#define ti_MatT ('\x5C') + +/* Some list defines */ +#define ti_L1 ("\x5D\x0\0") +#define ti_L2 ("\x5D\x1\0") +#define ti_L3 ("\x5D\x2\0") +#define ti_L4 ("\x5D\x3\0") +#define ti_L5 ("\x5D\x4\0") +#define ti_L6 ("\x5D\x5\0") +#define ti_LT ('\x5D') + +/* Compatibility defines */ +#define ti_Program TI_PRGM_TYPE +#define ti_ProtectedProgram TI_PPRGM_TYPE +#define ti_TempProgram TI_TPRGM_TYPE +#define ti_AppVar TI_APPVAR_TYPE + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/frontends/calculator/CEdev/include/float.h b/frontends/calculator/CEdev/include/float.h index bd022b2..ea526e8 100644 --- a/frontends/calculator/CEdev/include/float.h +++ b/frontends/calculator/CEdev/include/float.h @@ -1,75 +1,75 @@ -/* - * Copyright (C) 1999-2008 by Zilog, Inc. - * All Rights Reserved - * Modified by Matt "MateoConLechuga" Waltz for TI84+CE platform - */ -#ifndef FLOAT_H -#define FLOAT_H - -#define FLT_RADIX 2 /* radix of exponent representation */ - -#define FLT_ROUNDS 0 /* addition rounds to nearest */ - -/* number of base-FLT_RADIX digits in the mantissa */ - -#define FLT_MANT_DIG 24 -#define DBL_MANT_DIG FLT_MANT_DIG -#define LDBL_MANT_DIG FLT_MANT_DIG - -/* number of decimal digits of precision */ - -#define FLT_DIG 6 -#define DBL_DIG FLT_DIG -#define LDBL_DIG FLT_DIG - -/* minimum negative integer such that FLT_RADIX raised to that */ -/* power approximates a positive floating point number in the */ -/* range of representable values. */ - -#define FLT_MIN_EXP -125 -#define DBL_MIN_EXP FLT_MIN_EXP -#define LDBL_MIN_EXP FLT_MIN_EXP - -/* maximum integer such that FLT_RADIX raised to that power */ -/* approximates a floating point number in the range of */ -/* representable numbers. */ - -#define FLT_MAX_EXP 128 -#define DBL_MAX_EXP FLT_MAX_EXP -#define LDBL_MAX_EXP FLT_MAX_EXP - -/* maximum integer such that 10 raised to that power */ -/* approximates a floating point number in the range of */ -/* representable value ((int)log10(FLT_MAX),etc) */ - -#define FLT_MAX_10_EXP +38 -#define DBL_MAX_10_EXP FLT_MAX_10_EXP -#define LDBL_MAX_10_EXP FLT_MAX_10_EXP - -/* minimum negative integer such that 10 raised to that power */ -/* approximates a positive floating point number in the range */ -/* of representable values ((int)log10(FLT_MIN),etc.) */ - -#define FLT_MIN_10_EXP -37 -#define DBL_MIN_10_EXP FLT_MIN_10_EXP -#define LDBL_MIN_10_EXP FLT_MIN_10_EXP - -/* maximum representable floating point numbers */ - -#define FLT_MAX 3.40282347E+38 -#define DBL_MAX FLT_MAX -#define LDBL_MAX FLT_MAX - -/* minimum positive number x such that 1.0 + x != 1.0 (b ^ (1-p)) */ - -#define FLT_EPSILON 1.19209290E-07 -#define DBL_EPSILON FLT_EPSILON -#define LDBL_EPSILON FLT_EPSILON - -/* minimum representable positive floating point numbers */ - -#define FLT_MIN 1.17549435E-38 -#define DBL_MIN FLT_MIN -#define LDBL_MIN FLT_MIN - -#endif +/* + * Copyright (C) 1999-2008 by Zilog, Inc. + * All Rights Reserved + * Modified by Matt "MateoConLechuga" Waltz for TI84+CE platform + */ +#ifndef FLOAT_H +#define FLOAT_H + +#define FLT_RADIX 2 /* radix of exponent representation */ + +#define FLT_ROUNDS 0 /* addition rounds to nearest */ + +/* number of base-FLT_RADIX digits in the mantissa */ + +#define FLT_MANT_DIG 24 +#define DBL_MANT_DIG FLT_MANT_DIG +#define LDBL_MANT_DIG FLT_MANT_DIG + +/* number of decimal digits of precision */ + +#define FLT_DIG 6 +#define DBL_DIG FLT_DIG +#define LDBL_DIG FLT_DIG + +/* minimum negative integer such that FLT_RADIX raised to that */ +/* power approximates a positive floating point number in the */ +/* range of representable values. */ + +#define FLT_MIN_EXP -125 +#define DBL_MIN_EXP FLT_MIN_EXP +#define LDBL_MIN_EXP FLT_MIN_EXP + +/* maximum integer such that FLT_RADIX raised to that power */ +/* approximates a floating point number in the range of */ +/* representable numbers. */ + +#define FLT_MAX_EXP 128 +#define DBL_MAX_EXP FLT_MAX_EXP +#define LDBL_MAX_EXP FLT_MAX_EXP + +/* maximum integer such that 10 raised to that power */ +/* approximates a floating point number in the range of */ +/* representable value ((int)log10(FLT_MAX),etc) */ + +#define FLT_MAX_10_EXP +38 +#define DBL_MAX_10_EXP FLT_MAX_10_EXP +#define LDBL_MAX_10_EXP FLT_MAX_10_EXP + +/* minimum negative integer such that 10 raised to that power */ +/* approximates a positive floating point number in the range */ +/* of representable values ((int)log10(FLT_MIN),etc.) */ + +#define FLT_MIN_10_EXP -37 +#define DBL_MIN_10_EXP FLT_MIN_10_EXP +#define LDBL_MIN_10_EXP FLT_MIN_10_EXP + +/* maximum representable floating point numbers */ + +#define FLT_MAX 3.40282347E+38 +#define DBL_MAX FLT_MAX +#define LDBL_MAX FLT_MAX + +/* minimum positive number x such that 1.0 + x != 1.0 (b ^ (1-p)) */ + +#define FLT_EPSILON 1.19209290E-07 +#define DBL_EPSILON FLT_EPSILON +#define LDBL_EPSILON FLT_EPSILON + +/* minimum representable positive floating point numbers */ + +#define FLT_MIN 1.17549435E-38 +#define DBL_MIN FLT_MIN +#define LDBL_MIN FLT_MIN + +#endif diff --git a/frontends/calculator/CEdev/include/format.h b/frontends/calculator/CEdev/include/format.h index 52a0e80..16186bf 100644 --- a/frontends/calculator/CEdev/include/format.h +++ b/frontends/calculator/CEdev/include/format.h @@ -1,109 +1,109 @@ -/* - * Copyright (C) 1999-2008 by Zilog, Inc. - * All Rights Reserved - * Modified by Matt "MateoConLechuga" Waltz for TI84+CE platform - */ -#ifndef FORMAT_H -#define FORMAT_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef _PTR_ -#define _PTR_ * -#endif - -/* Note: 24 bits times log(2) is 7.224 decimal digits. - We only need 14 if and when we support doubles. */ -#define MAXDIGITS 10 -#define MINEXP -4 -#define DEFAULT_PRECISION 6 - -/* format status codes */ -#define FMT_OK 0 -#define FMT_ERR 1 -#define FMT_PASS_THRU 2 - -/* format flags */ -#define FMT_FLAG_MINUS 0x01 -#define FMT_FLAG_PLUS 0x02 -#define FMT_FLAG_SPACE 0x04 -#define FMT_FLAG_POUND 0x08 -#define FMT_FLAG_IGNORE 0x10 // scanf only. -#define FMT_FLAG_PRECISION 0x10 // Only needed for %s, as 0 is valid precision -#define FMT_FLAG_UPPERCASE 0x20 // Added. -#define FMT_FLAG_PAD_ZERO 0x40 -#define FMT_FLAG_STRIP 0x80 // Output only. -#define FMT_FLAG_SET 0x80 // Input only; maybe not needed if - // set_begin != 0 is used instead. - -/* structures and defines for format routines */ -/* NOTE: Some fields in this structure, and the bits in flags, are */ -/* known to the optimizer, If you change this, check out the */ -/* optimizer code in genprintf.c . */ - -struct fmt_type { - unsigned char status; /* status, OK, ERR, or PASS_THRU */ - unsigned char flags; /* flags bit mask */ - char size; /* size character h,l or L */ - char chr; /* pass thru character */ - char type; /* type of argument d,i,o,u,x ... */ - char field_width; /* field width */ - char precision; /* precision */ - char _PTR_ set_begin; /* pointer to first char in set */ - char _PTR_ set_end; /* pointer to last char in set */ - unsigned char pad_whole; - unsigned char pad_pre_fract; - unsigned char pad_post_fract; - char _PTR_ pad_at; - }; - -/* info flags */ -#define FLT_INFO_SIGN (1<<0) -#define FLT_INFO_INF (1<<1) -#define FLT_INFO_NAN (1<<2) - -/* Note: using char to represent the (decimal) exponent only works for - 4-byte floats. If we choose to support 8-byte doubles, then this must - be increased. */ -struct flt_info { - unsigned char flags; /* 1=sign, 2=inf, 4=nan */ - char exp; /* (signed) exponent (base 10) */ - unsigned char digits[MAXDIGITS]; /* max significant digits */ -}; - -extern struct fmt_type __print_fmt; -extern char __print_buff[]; -extern unsigned char __print_len; -extern char __print_leading_char; // Initial +, -, or space for number -extern void __print_send(); - -extern void _u_stoa(short); -extern void _u_ustoa(unsigned short); -extern void _u_itoa(int); -extern void _u_uitoa(unsigned int); -extern void _u_ltoa(long); -extern void _u_ultoa(unsigned long); -extern int _u_print(char _PTR_ src,char _PTR_ fmt,va_list); -extern int _u_scan(char _PTR_ src,char _PTR_ fmt,va_list ap); -extern void _u_dtof(double); -extern void _u_dtog(double); - -extern char _PTR_ _u_pscan(char _PTR_ fmt,struct fmt_type _PTR_ str, va_list _PTR_ argp); -extern char _PTR_ _u_sscan (char _PTR_ fmt,struct fmt_type _PTR_ str); - -extern void _u_reverse(char _PTR_ s); -extern char _PTR_ _u_dtoe(double); - -extern void _u_flt_info(double,struct flt_info _PTR_); -extern void _u_flt_rnd(struct flt_info _PTR_ , char); - -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright (C) 1999-2008 by Zilog, Inc. + * All Rights Reserved + * Modified by Matt "MateoConLechuga" Waltz for TI84+CE platform + */ +#ifndef FORMAT_H +#define FORMAT_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _PTR_ +#define _PTR_ * +#endif + +/* Note: 24 bits times log(2) is 7.224 decimal digits. + We only need 14 if and when we support doubles. */ +#define MAXDIGITS 10 +#define MINEXP -4 +#define DEFAULT_PRECISION 6 + +/* format status codes */ +#define FMT_OK 0 +#define FMT_ERR 1 +#define FMT_PASS_THRU 2 + +/* format flags */ +#define FMT_FLAG_MINUS 0x01 +#define FMT_FLAG_PLUS 0x02 +#define FMT_FLAG_SPACE 0x04 +#define FMT_FLAG_POUND 0x08 +#define FMT_FLAG_IGNORE 0x10 // scanf only. +#define FMT_FLAG_PRECISION 0x10 // Only needed for %s, as 0 is valid precision +#define FMT_FLAG_UPPERCASE 0x20 // Added. +#define FMT_FLAG_PAD_ZERO 0x40 +#define FMT_FLAG_STRIP 0x80 // Output only. +#define FMT_FLAG_SET 0x80 // Input only; maybe not needed if + // set_begin != 0 is used instead. + +/* structures and defines for format routines */ +/* NOTE: Some fields in this structure, and the bits in flags, are */ +/* known to the optimizer, If you change this, check out the */ +/* optimizer code in genprintf.c . */ + +struct fmt_type { + unsigned char status; /* status, OK, ERR, or PASS_THRU */ + unsigned char flags; /* flags bit mask */ + char size; /* size character h,l or L */ + char chr; /* pass thru character */ + char type; /* type of argument d,i,o,u,x ... */ + char field_width; /* field width */ + char precision; /* precision */ + char _PTR_ set_begin; /* pointer to first char in set */ + char _PTR_ set_end; /* pointer to last char in set */ + unsigned char pad_whole; + unsigned char pad_pre_fract; + unsigned char pad_post_fract; + char _PTR_ pad_at; + }; + +/* info flags */ +#define FLT_INFO_SIGN (1<<0) +#define FLT_INFO_INF (1<<1) +#define FLT_INFO_NAN (1<<2) + +/* Note: using char to represent the (decimal) exponent only works for + 4-byte floats. If we choose to support 8-byte doubles, then this must + be increased. */ +struct flt_info { + unsigned char flags; /* 1=sign, 2=inf, 4=nan */ + char exp; /* (signed) exponent (base 10) */ + unsigned char digits[MAXDIGITS]; /* max significant digits */ +}; + +extern struct fmt_type __print_fmt; +extern char __print_buff[]; +extern unsigned char __print_len; +extern char __print_leading_char; // Initial +, -, or space for number +extern void __print_send(); + +extern void _u_stoa(short); +extern void _u_ustoa(unsigned short); +extern void _u_itoa(int); +extern void _u_uitoa(unsigned int); +extern void _u_ltoa(long); +extern void _u_ultoa(unsigned long); +extern int _u_print(char _PTR_ src,char _PTR_ fmt,va_list); +extern int _u_scan(char _PTR_ src,char _PTR_ fmt,va_list ap); +extern void _u_dtof(double); +extern void _u_dtog(double); + +extern char _PTR_ _u_pscan(char _PTR_ fmt,struct fmt_type _PTR_ str, va_list _PTR_ argp); +extern char _PTR_ _u_sscan (char _PTR_ fmt,struct fmt_type _PTR_ str); + +extern void _u_reverse(char _PTR_ s); +extern char _PTR_ _u_dtoe(double); + +extern void _u_flt_info(double,struct flt_info _PTR_); +extern void _u_flt_rnd(struct flt_info _PTR_ , char); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/frontends/calculator/CEdev/include/graphx.h b/frontends/calculator/CEdev/include/graphx.h index bbcf697..33e93e7 100644 --- a/frontends/calculator/CEdev/include/graphx.h +++ b/frontends/calculator/CEdev/include/graphx.h @@ -1,1514 +1,1514 @@ -/** - * @file - * @brief Contains optimized graphics operations and routines - * - * Example program template with best graphx buffer usage pattern: - * @code - * // Standard #includes omitted - * - * bool partial_redraw; - * - * // Implement us! - * void begin(); - * void end(); - * bool step(); - * void draw(); - * - * void main() { - * begin(); // No rendering allowed! - * gfx_Begin(); - * gfx_SetDrawBuffer(); // Draw to the buffer to avoid rendering artifats - * - * while (step()) { // No rendering allowed in step! - * if (partial_redraw) // Only want to redraw part of the previous frame? - * gfx_BlitScreen(); // Copy previous frame as a base for this frame - * draw(); // As little non-rendering logic as possible - * gfx_SwapDraw(); // Queue the buffered frame to be displayed - * } - * - * gfx_End(); - * end(); - * } - * @endcode - * - * @authors Matt "MateoConLechuga" Waltz - * @authors Jacob "jacobly" Young - * @authors Zachary "Runer112" Wassall - * @authors Patrick "tr1p1ea" Prendergast - * @authors "grosged" - */ - -#ifndef H_GRAPHX -#define H_GRAPHX - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Sprite (image) type. - * - * Whether or not a sprite includes transparency is not explicitly encoded, and - * is determined only by usage. If used with transparency, transparent pixels - * are those with a certain color index, which can be set with - * gfx_SetTransparentColor(). - * - * @attention - * Displaying a gfx_rletsprite_t (which includes transparency) is significantly - * faster than displaying a gfx_sprite_t with transparency, and should be - * preferred. However, gfx_rletsprite_t does not support transformations, such - * as flipping and rotation. Such transformations can be applied to a - * gfx_sprite_t, which can then be converted to a gfx_rletsprite_t for faster - * display using gfx_ConvertToNewRLETSprite() or gfx_ConvertToRLETSprite(). - * - * @remarks - * Create at compile-time with a tool like - * convpng. - * Create at runtime (with uninitialized data) with gfx_MallocSprite(), - * gfx_UninitedSprite(), or gfx_TempSprite(). - */ -typedef struct { - uint8_t width; /**< Width of the image */ - uint8_t height; /**< Height of the image */ - uint8_t data[1]; /**< Image data array */ -} gfx_sprite_t; - -/** - * @brief Sprite (image) type with RLE transparency. - * - * @attention - * Displaying a gfx_rletsprite_t (which includes transparency) is significantly - * faster than displaying a gfx_sprite_t with transparency, and should be - * preferred. However, gfx_rletsprite_t does not support transformations, such - * as flipping and rotation. Such transformations can be applied to a - * gfx_sprite_t, which can then be converted to a gfx_rletsprite_t for faster - * display using gfx_ConvertToNewRLETSprite() or gfx_ConvertToRLETSprite(). - * - * @remarks - * Create at compile-time with a tool like - * convpng. - */ -typedef struct { - uint8_t width; /**< Width of the image */ - uint8_t height; /**< Height of the image */ - uint8_t data[1]; /**< Image data array */ -} gfx_rletsprite_t; - -/** - * @brief A simple structure for working with 2D points - */ -typedef struct { - int x; /**< x point */ - int y; /**< y point */ -} gfx_point_t; - -/** - * @brief Stores operating modes of this library - * @see gfx_Begin - */ -typedef enum { - gfx_8bpp = 0x27 /**< Enable 8 bits per pixel mode */ -} gfx_mode_t; - -/** - * Dynamically allocates memory for a sprite. - * - * Allocates the memory with \p malloc_routine. \p width and \p height will be - * set in the allocated sprite. Returns \c NULL upon allocation failure. - * - * @note - * If not used in a dynamic context and \p width and \p height are static, - * consider statically allocating the sprite instead with gfx_UninitedSprite() - * or gfx_TempSprite(). - * - * @remarks - * If using \c malloc as the \p malloc_routine, gfx_MallocSprite() can be used - * as a shortcut. - * - * @param width sprite width - * @param height sprite height - * @param malloc_routine malloc implementation to use - * @return pointer to the allocated sprite - */ -gfx_sprite_t *gfx_AllocSprite(uint8_t width, uint8_t height, void *(*malloc_routine)(size_t)); - -/** - * Dynamically allocates memory for a sprite using \c malloc. - * - * \p width and \p height will be set in the sprite. Returns \c NULL upon - * allocation failure. - * - * @note - * If not used in a dynamic context and \p width and \p height are static, - * consider statically allocating the sprite instead with gfx_UninitedSprite() - * or gfx_TempSprite(). - * - * @param width sprite width - * @param height sprite height - * @return pointer to the allocated sprite - * @see gfx_AllocSprite - */ -#define gfx_MallocSprite(width, height) \ -gfx_AllocSprite(width, height, malloc) - -/** - * Statically allocates unitialized memory for a sprite. - * - * Declares a gfx_sprite_t * with the given \p name pointing to the - * allocated memory. \p width and \p height will \b not be set in the sprite, - * unlike gfx_TempSprite(). - * - * @warning - * If used outside of a function body, the memory will be allocated in the - * global unitialized data segment (BSS). If used inside a function body, the - * memory will be allocated on the stack. If the sprite is sufficiently large, - * usage inside a function body will overflow the stack, so it is recommended - * that this normally be used outside of a function body. - * - * @param name name of declared gfx_sprite_t * - * @param width sprite width - * @param height sprite height - * @see gfx_MallocSprite - */ -#define gfx_UninitedSprite(name, width, height) \ -uint8_t name##_data[2 + (width) * (height)]; \ -gfx_sprite_t *name = (gfx_sprite_t *)name##_data - -/** - * Statically allocates memory for a sprite. - * - * Declares a gfx_sprite_t * with the given \p name pointing to the - * allocated memory. \p width and \p height will be set in the sprite, unlike - * gfx_UninitedSprite(). - * - * @attention - * Due to \p width and \p height being set, the memory will be allocated in the - * initialized data segment. If the compiled program is not compressed, then - * this could be a serious source of bloat and gfx_UninitedSprite() should be - * preferred. - * - * @param name name of declared gfx_sprite_t * - * @param width sprite width - * @param height sprite height - * @see gfx_MallocSprite - */ -#define gfx_TempSprite(name, width, height) \ -uint8_t name##_data[2 + (width) * (height)] = { (width), (height) }; \ -gfx_sprite_t *name = (gfx_sprite_t *)name##_data - -/** - * Dynamically allocates memory for a sprite with RLE transpareny. - * - * Allocates the memory with \p malloc_routine. Returns \c NULL upon allocation - * failure. - * - * \p data_size is the maximum predicted/calculated size of the sprite data - * (excuding the width and height bytes) that will be stored in the allocated - * sprite. Sprite data size could be up to (width + 1) * height * 3 / 2 - * bytes in the worst case, in which pixels horizontally alternate between - * non-transparent and transparent and each row begins with a non-transparent - * pixel. But if the average length of a horizontal transparent run is at least - * 2, then the sprite data will be no larger than (width + 1) * height - * bytes. The exact data size necessary is 2 * - * num_horizontal_transparent_runs + num_non_transparent_pixels + - * num_rows_beginning_with_non_transparent_pixel - - * num_rows_ending_with_transparent_pixel bytes. - * - * @note - * If not used in a dynamic context and \p data_size is static, consider - * statically allocating the sprite instead with gfx_UninitedRLETSprite() or - * gfx_TempRLETSprite(). - * - * @remarks - * If using \c malloc as the \p malloc_routine, gfx_MallocRLETSprite() can be - * used as a shortcut. - * - * @param data_size (maximum) sprite data size - * @param malloc_routine malloc implementation to use - * @return pointer to the allocated sprite - */ -#define gfx_AllocRLETSprite(data_size, malloc_routine) \ -(gfx_rletsprite_t *)(malloc_routine)(data_size) - -/** - * Dynamically allocates memory for a sprite with RLE transparency using \c - * malloc. - * - * \p data_size is the size to allocate for sprite data; see - * gfx_AllocRLETSprite() for information. Returns \c NULL upon allocation - * failure. - * - * @note - * If not used in a dynamic context and \p data_size is static, consider - * statically allocating the sprite instead with gfx_UninitedRLETSprite() or - * gfx_TempRLETSprite(). - * - * @param data_size (maximum) sprite data size - * @return pointer to the allocated sprite - * @see gfx_AllocRLETSprite - */ -#define gfx_MallocRLETSprite(data_size) \ -gfx_AllocRLETSprite(data_size, malloc) - -/** - * Statically allocates unitialized memory for a sprite with RLE transparency. - * - * Declares a gfx_rletsprite_t * with the given \p name pointing to the - * allocated memory. \p data_size is the size to allocate for sprite data; see - * gfx_AllocRLETSprite() for information. - * - * @warning - * If used outside of a function body, the memory will be allocated in the - * global unitialized data segment (BSS). If used inside a function body, the - * memory will be allocated on the stack. If the sprite is sufficiently large, - * usage inside a function body will overflow the stack, so it is recommended - * that this normally be used outside of a function body. - * - * @param name name of declared gfx_rletsprite_t * - * @param data_size (maximum) sprite data size - * @see gfx_MallocRLETSprite - */ -#define gfx_UninitedRLETSprite(name, data_size) \ -uint8_t name##_data[2 + (data_size)]; \ -gfx_rletsprite_t *name = (gfx_rletsprite_t *)name##_data - -/** - * Initializes the graphics library setup - */ -int gfx_Begin(); - -/** - * Closes the graphics setup - * - * Restores the LCD to 16bpp prefered by the OS and clears the screen. - */ -void gfx_End(void); - -/** - * Used for accessing the lcd palette directly - * - * This consists of 256 entries, each 2 bytes in size for a total of 512 bytes - */ -#define gfx_palette \ -((uint16_t*)0xE30200) - -/** - * Array of the LCD RAM - * - * Total of 153600 bytes in size - * @see gfx_vbuffer - */ -#define gfx_vram \ -((uint8_t*)0xD40000) - -/** - * Array of the current drawing buffer - * - * Total of 76800 bytes in size - * @see gfx_vram - */ -#define gfx_vbuffer \ -(**(uint8_t(**)[240][320])0xE30014) - -/** - * @brief Defines a rectangular graphics region - * - * @see gfx_GetClipRegion - */ -typedef struct { - int xmin; /**< Minimum x coordinate */ - int ymin; /**< Minimum y coordinate */ - int xmax; /**< Maximum x coordinate */ - int ymax; /**< Maximum y coordinate */ -} gfx_region_t; - -/** - * @brief Defines tilemap structure - * - * @see gfx_Tilemap - */ -typedef struct { - uint8_t *map; /**< Pointer to indexed map array */ - gfx_sprite_t **tiles; /**< Pointer to tiles */ - uint8_t tile_height; /**< Individual tile height */ - uint8_t tile_width; /**< Individual tile width */ - uint8_t draw_height; /**< Number of tiles per row to draw */ - uint8_t draw_width; /**< Number of tile per column to draw */ - uint8_t type_width; /**< Tile type height @see gfx_tilemap_type_t */ - uint8_t type_height; /**< Tile type width @see gfx_tilemap_type_t */ - uint8_t height; /**< Total number of rows in the tilemap */ - uint8_t width; /**< Total number of columns in the tilemap */ - uint8_t y_loc; /**< Y pixel location of tilemap */ - uint24_t x_loc; /**< X pixel location to tilemap */ -} gfx_tilemap_t; - -/** - * @brief Used for defining tile types - * - * @see gfx_tilemap_t - */ -typedef enum { - gfx_tile_no_pow2 = 0, /**< Set when using non powers of 2 */ - gfx_tile_2_pixel, /**< Set when using 2 pixel tiles */ - gfx_tile_4_pixel, /**< Set when using 4 pixel tiles */ - gfx_tile_8_pixel, /**< Set when using 8 pixel tiles */ - gfx_tile_16_pixel, /**< Set when using 16 pixel tiles */ - gfx_tile_32_pixel, /**< Set when using 32 pixel tiles */ - gfx_tile_64_pixel, /**< Set when using 64 pixel tiles */ - gfx_tile_128_pixel /**< Set when using 128 pixel tiles */ -} gfx_tilemap_type_t; - -/** - * Draws a tilemap given an initialized tilemap structure - * - * @param tilemap Pointer to initialized tilemap structure - * @param x_offset Offset in pixels from the left of the tilemap - * @param y_offset Offset in pixels from the top of the tilemap - * @see gfx_tilemap_t - */ -void gfx_Tilemap(gfx_tilemap_t *tilemap, uint24_t x_offset, uint24_t y_offset); - -/** - * Draws an unclipped tilemap given an initialized tilemap structure - * - * @param tilemap Pointer to initialized tilemap structure - * @param x_offset Offset in pixels from the left of the tilemap - * @param y_offset Offset in pixels from the top of the tilemap - * @see gfx_tilemap_t - */ -void gfx_Tilemap_NoClip(gfx_tilemap_t *tilemap, uint24_t x_offset, uint24_t y_offset); - -/** - * Draws a transparent tilemap given an initialized tilemap structure - * - * @param tilemap Pointer to initialized tilemap structure - * @param x_offset Offset in pixels from the left of the tilemap - * @param y_offset Offset in pixels from the top of the tilemap - * @see gfx_tilemap_t - */ -void gfx_TransparentTilemap(gfx_tilemap_t *tilemap, uint24_t x_offset, uint24_t y_offset); - -/** - * Draws an unclipped transparent tilemap given an initialized tilemap structure - * - * @param tilemap Pointer to initialized tilemap structure - * @param x_offset Offset in pixels from the left of the tilemap - * @param y_offset Offset in pixels from the top of the tilemap - * @see gfx_tilemap_t - */ -void gfx_TransparentTilemap_NoClip(gfx_tilemap_t *tilemap, uint24_t x_offset, uint24_t y_offset); - -/** - * Gets a pointer to a particular tile given an initialized tilemap structure and pixel offsets - * - * @param tilemap Pointer to initialized tilemap structure - * @param x_offset Offset in pixels from the left of the tilemap - * @param y_offset Offset in pixels from the top of the tilemap - */ -uint8_t *gfx_TilePtr(gfx_tilemap_t *tilemap, uint24_t x_offset, uint24_t y_offset); - -/** - * Sets a particular tile's value given an initialized tilemap structure and pixel offsets - * - * @param tilemap Pointer to initialized tilemap structure - * @param x_offset Offset in pixels from the left of the tilemap - * @param y_offset Offset in pixels from the top of the tilemap - * @param value Value to set tile to - */ -#define gfx_SetTile(tilemap, x_offset, y_offset, value) \ -(*(gfx_TilePtr((tilemap), (x_offset), (y_offset))) = (uint8_t)(value)) - -/** - * Gets a particular tile's value given an initialized tilemap structure and pixel offsets - * - * @param tilemap Pointer to initialized tilemap structure - * @param x_offset Offset in pixels from the left of the tilemap - * @param y_offset Offset in pixels from the top of the tilemap - */ -#define gfx_GetTile(tilemap, x_offset, y_offset) \ -(*(gfx_TilePtr((tilemap), (x_offset), (y_offset)))) - -/** - * Gets a pointer to a particular tile given an initialized tilemap structure and mapped offsets - * - * @param tilemap Pointer to initialized tilemap structure - * @param row Offset in bytes in the row - * @param col Offset in bytes in the column - */ -uint8_t *gfx_TilePtrMapped(gfx_tilemap_t *tilemap, uint8_t row, uint8_t col); - -/** - * Sets a particular tile's value given an initialized tilemap structure and mapped offsets - * - * @param tilemap Pointer to initialized tilemap structure - * @param row Offset in bytes in the row - * @param col Offset in bytes in the column - * @param value Value to set tile to - */ -#define gfx_SetTileMapped(tilemap, row, col, value) \ -(*(gfx_TilePtrMapped((tilemap), (row), (col))) = (uint8_t)(value)) - -/** - * Gets a particular tile's value given an initialized tilemap structure and mapped offsets - * - * @param tilemap Pointer to initialized tilemap structure - * @param row Offset in bytes in the row - * @param col Offset in bytes in the column - */ -#define gfx_GetTileMapped(tilemap, row, col) \ -(*(gfx_TilePtrMapped((tilemap), (row), (col)))) - -/** - * Sets the color index that drawing routines will use - * - * This applies to lines, rectangles, circles, etc - * @param index Color index to set - * @returns Previous set color index - */ -uint8_t gfx_SetColor(uint8_t index); - -/** - * Sets the transparent index that drawing routines will use - * - * This currently applies to transparent sprites, both scaled and unscaled - * @param index Transparent color index to set - * @returns The previous transparent color index - */ -uint8_t gfx_SetTransparentColor(uint8_t index); - -/** - * Sets up the default palette for the given mode - * - * @param mode Palette to use - */ -void gfx_SetDefaultPalette(gfx_mode_t mode); - -/** - * Sets entries in the palette - * - * @param palette Pointer to palette to use - * @param size Size of palette to store - * @param offset Offset in bytes to start at (Generally set to 0) - */ -void gfx_SetPalette(uint16_t *palette, uint24_t size, uint8_t offset); - -/** - * Fills the screen with a given palette index - * - * @param index Color index to fill with - */ -void gfx_FillScreen(uint8_t index); - -/** - * Implements a faster version of gfx_FillScreen(0) - * - * @see gfx_FillScreen - */ -void gfx_ZeroScreen(void); - -/** - * Sets a pixel to the global color index - * - * This is measured from the top left origin of the screen. - * Pixels are only clipped within the screen boundaries - * @param x X coordinate location - * @param y Y coordinate location - * @see gfx_SetColor - */ -void gfx_SetPixel(uint24_t x, uint8_t y); - -/** - * Gets a pixel's color index - * - * This is measured from the top left origin of the screen. - * Pixels are only clipped within the screen boundaries - * @param x X coordinate location - * @param y Y coordinate location - */ -uint8_t gfx_GetPixel(uint24_t x, uint8_t y); - -/** - * Draws a line - * - * This is measured from the top left origin of the screen. - * @param x0 First X coordinate - * @param y0 First Y coordinate - * @param x1 Second X coordinate - * @param y1 Second Y coordinate - */ -void gfx_Line(int x0, int y0, int x1, int y1); - -/** - * Draws an unclipped line - * - * This is measured from the top left origin of the screen. - * @param x0 First X coordinate - * @param y0 First Y coordinate - * @param x1 Second X coordinate - * @param y1 Second Y coordinate - */ -void gfx_Line_NoClip(uint24_t x0, uint8_t y0, uint24_t x1, uint8_t y1); - -/** - * Clips the points in a window region - * - * This is measured from the top left origin of the screen. - * @param x0 First X coordinate - * @param y0 First Y coordinate - * @param x1 Second X coordinate - * @param y1 Second Y coordinate - * @returns False if not within window, true otherwise - */ -bool gfx_CohenSutherlandClip(int *x0, int *y0, int *x1, int *y1); - -/** - * Draws a horizontal line - * - * This is measured from the top left origin of the screen. - * Performs faster than using @c gfx_Line - * @param x X coordinate - * @param y Y coordinate - * @param length Length of line - */ -void gfx_HorizLine(int x, int y, int length); - -/** - * Draws an unclipped horizontal line - * - * This is measured from the top left origin of the screen. - * Performs faster than using @c gfx_Line - * @param x X coordinate - * @param y Y coordinate - * @param length Length of line - */ -void gfx_HorizLine_NoClip(uint24_t x, uint8_t y, uint24_t length); - -/** - * Draws a vertical line - * - * This is measured from the top left origin of the screen. - * Performs faster than using @c gfx_Line - * @param x X coordinate - * @param y Y coordinate - * @param length Length of line - */ -void gfx_VertLine(int x, int y, int length); - -/** - * Draws an unclipped vertical line - * - * This is measured from the top left origin of the screen. - * Performs faster than using @c gfx_Line - * @param x X coordinate - * @param y Y coordinate - * @param length Length of line - */ -void gfx_VertLine_NoClip(uint24_t x, uint8_t y, uint24_t length); - -/** - * Draws a rectangle outline - * - * This is measured from the top left origin of the screen. - * @param x X coordinate - * @param y Y coordinate - * @param width Width of rectangle - * @param height Height of rectangle - */ -void gfx_Rectangle(int x, int y, int width, int height); - -/** - * Draws an unclipped rectangle outline - * - * This is measured from the top left origin of the screen. - * @param x X coordinate - * @param y Y coordinate - * @param width Width of rectangle - * @param height Height of rectangle - */ -void gfx_Rectangle_NoClip(uint24_t x, uint8_t y, uint24_t width, uint8_t height); - -/** - * Draws a filled rectangle - * - * This is measured from the top left origin of the screen. - * @param x X coordinate - * @param y Y coordinate - * @param width Width of rectangle - * @param height Height of rectangle - */ -void gfx_FillRectangle(int x, int y, int width, int height); - -/** - * Draws an unclipped filled rectangle - * - * This is measured from the top left origin of the screen. - * @param x X coordinate - * @param y Y coordinate - * @param width Width of rectangle - * @param height Height of rectangle - */ -void gfx_FillRectangle_NoClip(uint24_t x, uint8_t y, uint24_t width, uint8_t height); - -/** - * Draws a circle outline - * - * This is measured from the top left origin of the screen. - * @param x X coordinate - * @param y Y coordinate - * @param radius The radius of the circle - */ -void gfx_Circle(int x, int y, unsigned radius); - -/** - * Draws a filled circle - * - * This is measured from the top left origin of the screen. - * @param x X coordinate - * @param y Y coordinate - * @param radius The radius of the circle - */ -void gfx_FillCircle(int x, int y, unsigned radius); - -/** - * Draws an unclipped filled circle - * - * This is measured from the top left origin of the screen. - * @param x X coordinate - * @param y Y coordinate - * @param radius The radius of the circle - */ -void gfx_FillCircle_NoClip(uint24_t x, uint8_t y, unsigned radius); - -/** - * Draws an unclipped circle outline - * - * This is measured from the top left origin of the screen. - * @param x X coordinate - * @param y Y coordinate - * @param radius The radius of the circle - */ -#define gfx_Circle_NoClip(x, y, radius) \ -gfx_Circle((x), (y), (radius)) - -/** - * Draws a polygon outline - * - * Points are measured from the top left origin of the screen. - * @code - * int points[6] = { - * 160, 1, // (x0, y0) - * 1, 238, // (x1, y1) - * 318,238, // (x2, y2) - * }; - * num_points = 3; - * gfx_Polygon(points, num_points) - * @endcode - * @param points Pointer to x and y pairs - * @param num_points Number of x and y pairs - */ -void gfx_Polygon(int *points, unsigned num_points); - -/** - * Draws an unclipped polygon outline - * - * Points are measured from the top left origin of the screen. - * @code - * int points[6] = { - * 160, 1, // (x0, y0) - * 1, 238, // (x1, y1) - * 318,238, // (x2, y2) - * }; - * num_points = 3; - * gfx_Polygon_NoClip(points, num_points) - * @endcode - * @param points Pointer to x and y pairs - * @param num_points Number of x and y pairs - */ -void gfx_Polygon_NoClip(int *points, unsigned num_points); - -/** - * Draws a filled triangle - * - * Points are measured from the top left origin of the screen. - * @param x0 First X coordinate - * @param y0 First Y coordinate - * @param x1 Second X coordinate - * @param y1 Second Y coordinate - * @param x2 Third X coordinate - * @param y2 Third Y coordinate - */ -void gfx_FillTriangle(int x0, int y0, int x1, int y1, int x2, int y2); -void gfx_FillTriangle_NoClip(int x0, int y0, int x1, int y1, int x2, int y2); - -/** - * Forces all graphics routines draw location - * - * @param location Location routines should draw to - * @see gfx_draw_location_t - */ -void gfx_SetDraw(uint8_t location); - -/** - * @brief Different locations routines can be drawn to - */ -typedef enum { - gfx_screen = 0, /**< Screen */ - gfx_buffer /**< Buffer */ -} gfx_draw_location_t; - -/** - * Makes the subsequent GraphX drawing routines act on the buffer - */ -#define gfx_SetDrawBuffer() \ -gfx_SetDraw(gfx_buffer) - -/** - * Makes the subsequent GraphX drawing routines act on the screen - */ -#define gfx_SetDrawScreen() \ -gfx_SetDraw(gfx_screen) - -/** - * Gets current draw location - * - * @returns Location type enumeration - * @see gfx_draw_location_t - */ -uint8_t gfx_GetDraw(void); - -/** - * Swaps the roles of the screen and drawing buffers. - * - * Does not wait for the old screen buffer to finish being displayed. Instead, - * the next invocation of a graphx drawing function will block, waiting for this - * event. To block and wait explicitly, use gfx_Wait(). - * - * The LCD driver maintains its own screen buffer pointer for the duration of a - * refresh. The swap performed by this function will only be picked up at a - * point between refreshes. - * - * @remarks - * In practice, this function should be invoked immediately after finishing - * drawing a frame to the drawing buffer, and invocation of the first graphx - * drawing function for the next frame should be scheduled as late as possible - * relative to non-drawing logic. Non-drawing logic can execute during time when - * a drawing function may otherwise block. - */ -void gfx_SwapDraw(void); - -/** - * Waits for the screen buffer to finish being displayed after gfx_SwapDraw(). - * - * @remarks - * In practice, this function should not need to be invoked by user code. It - * should be invoked by custom drawing functions (as late as reasonably - * possible) before writing to the drawing buffer, gfx_vbuffer. - */ -void gfx_Wait(void); - -/** - * Copies the input buffer to the opposite buffer - * - * No clipping is performed; as it is a copy not a draw - * @param src drawing location to copy from - * @see gfx_draw_location_t - */ -void gfx_Blit(uint8_t src); - -/** - * Copies lines from the input buffer to the opposite buffer - * - * No clipping is performed; as it is a copy not a draw - * @param src drawing location to copy from - * @param y_loc Y Location to begin copying at - * @param num_lines Number of lines to copy - * @see gfx_draw_location_t - */ -void gfx_BlitLines(uint8_t src, uint8_t y_loc, uint8_t num_lines); - -/** - * Copies a rectangle from the input buffer to the opposite buffer - * - * No clipping is performed; as it is a copy not a draw - * @param src drawing location to copy from - * @param x X coordinate - * @param y Y coordinate - * @param width Width of rectangle - * @param height Height of rectangle - * @see gfx_draw_location_t - */ -void gfx_BlitRectangle(uint8_t src, uint24_t x, uint8_t y, uint24_t width, uint24_t height); - -/** - * Copies the screen to the buffer - */ -#define gfx_BlitScreen() \ -gfx_Blit(gfx_screen) - -/** - * Copies the buffer to the screen - */ -#define gfx_BlitBuffer() \ -gfx_Blit(gfx_buffer) - -/** - * Sets the scaling for text - * - * Values in the range from 1-5 are preferred. - * @param width_scale Text width scaling - * @param height_scale Text height scaling - */ -void gfx_SetTextScale(uint8_t width_scale, uint8_t height_scale); - -/** - * Prints a character - * - * Outputs a character at the current cursor position. - * @param c Character to print - * @note By default, no text clipping is performed (configurable with gfx_SetTextConfig) - */ -void gfx_PrintChar(const char c); - -/** - * Prints a signed integer - * - * Outputs at the current cursor position. Padded with leading zeros if - * necessary to satisfy the specified minimum length. - * @param n Integer to print - * @param length Minimum number of characters to print - * @note By default, no text clipping is performed (configurable with gfx_SetTextConfig) - * @note \c length must be between 1 and 8, inclusive - */ -void gfx_PrintInt(int n, uint8_t length); - -/** - * Prints an unsigned integer - * - * Outputs at the current cursor position. Padded with leading zeros if - * necessary to satisfy the specified minimum length. - * @param n Unsigned integer to print - * @param length Minimum number of characters to print - * @note By default, no text clipping is performed (configurable with gfx_SetTextConfig) - * @note \c length must be between 1 and 8, inclusive - */ -void gfx_PrintUInt(unsigned int n, uint8_t length); - -/** - * Prints a string - * - * Outputs a string at the current cursor position. - * @param string Pointer to string to print - * @note By default, no text clipping is performed (configurable with gfx_SetTextConfig) - */ -void gfx_PrintString(const char *string); - -/** - * Prints a string at coordinates - * - * Outputs a string at the supplied coordinates - * Posistion is measured from top left origin of screen. - * @param string Pointer to string to print - * @param x X coordinate - * @param y Y coordinate - * @note By default, no text clipping is performed (configurable with gfx_SetTextConfig) - */ -void gfx_PrintStringXY(const char *string, int x, int y); - -/** - * @returns The current text cursor X position - */ -int gfx_GetTextX(void); - -/** - * @returns The current text cursor Y position - */ -int gfx_GetTextY(void); - -/** - * Sets the text cursor XY position - * - * @param x X coordinate - * @param y Y coordinate - */ -void gfx_SetTextXY(int x, int y); - -/** - * Sets the configuration for the text routines - * - * @param config Set the options for the text mode - * @see gfx_text_options_t - * @note Scaled text does not clip - */ -void gfx_SetTextConfig(uint8_t config); - -/** - * @brief Different available text modes - */ -typedef enum { - gfx_text_clip = 1, /**< Text routines will clip against the defined clip window */ - gfx_text_noclip /**< Default, text routines do not clip (much faster) */ -} gfx_text_options_t; - -/** - * Sets text foreground color - * - * @param color Color index to set - * @returns Previous text foreground color index - * @note Default text foreground color index: 0 - */ -uint8_t gfx_SetTextFGColor(uint8_t color); - -/** - * Sets text background color - * - * @param color Color index to set - * @returns Previous text background color index - * @note Default text background color index: 255 - */ -uint8_t gfx_SetTextBGColor(uint8_t color); - -/** - * Sets text transparency color - * - * @param color Color index to set - * @returns Previous text transparency color index - * @note Default text transparency color index: 255 - */ -uint8_t gfx_SetTextTransparentColor(uint8_t color); - -/** - * Draws a sprite - * - * @param sprite Pointer to initialized sprite structure - * @param x X coordinate - * @param y Y coordinate - */ -void gfx_Sprite(gfx_sprite_t *sprite, int x, int y); - -/** - * Draws an unclipped sprite - * - * @param sprite Pointer to initialized sprite structure - * @param x X coordinate - * @param y Y coordinate - */ -void gfx_Sprite_NoClip(gfx_sprite_t *sprite, uint24_t x, uint8_t y); - -/** - * Draws a transparent sprite - * - * @param sprite Pointer to initialized sprite structure - * @param x X coordinate - * @param y Y coordinate - */ -void gfx_TransparentSprite(gfx_sprite_t *sprite, int x, int y); - -/** - * Draws an unclipped transparent sprite - * - * @param sprite Pointer to initialized sprite structure - * @param x X coordinate - * @param y Y coordinate - */ -void gfx_TransparentSprite_NoClip(gfx_sprite_t *sprite, uint24_t x, uint8_t y); - -/** - * Grabs the background behind a sprite - * - * This is useful for partial redraw. - * @param sprite_buffer Buffer used to store grabbed sprite - * @param x X coordinate to grab sprite - * @param y Y coordinate to grab sprite - * @returns A pointer to sprite_buffer - * @note sprite_buffer must be pointing to a large enough buffer to hold width*height number of bytes - */ -gfx_sprite_t *gfx_GetSprite(gfx_sprite_t *sprite_buffer, int x, int y); - -/** - * Grabs the background behind an unclipped sprite - * - * This is useful for partial redraw. - * @param sprite_buffer Buffer used to store grabbed sprite - * @param x X coordinate to grab sprite - * @param y Y coordinate to grab sprite - * @returns A pointer to sprite_buffer - * @note sprite_buffer must be pointing to a large enough buffer to hold width*height number of bytes - */ -#define gfx_GetSprite_NoClip(sprite_buffer, x, y) \ -gfx_GetSprite((sprite_buffer), (x), (y)) - -/** - * Scales an unclipped sprite - * - * Scaling factors must be greater than or equal to 1, and an integer factor - * @param sprite Pointer to initialized sprite structure - * @param x X coordinate - * @param y Y coordinate - * @param width_scale Width scaling factor - * @param height_scale Height scaling factor - * @note Useable with gfx_GetSprite in order to create clipped versions - */ -void gfx_ScaledSprite_NoClip(gfx_sprite_t *sprite, uint24_t x, uint8_t y, uint8_t width_scale, uint8_t height_scale); - -/** - * Scales an unclipped transparent sprite - * - * Scaling factors must be greater than or equal to 1, and an integer factor - * @param sprite Pointer to initialized sprite structure - * @param x X coordinate - * @param y Y coordinate - * @param width_scale Width scaling factor - * @param height_scale Height scaling factor - * @note Useable with gfx_GetSprite in order to create clipped versions - */ -void gfx_ScaledTransparentSprite_NoClip(gfx_sprite_t *sprite, uint24_t x, uint8_t y, uint8_t width_scale, uint8_t height_scale); - -/** - * Fixed Rotation with scaling fator for sprites - * - * @note A scale factor of 64 represents 100% scaling - * @warning This routine only accepts square input sprites - * @param sprite Input sprite to rotate/scale - * @param x X coordinate position - * @param x Y coordinate position - * @param angle 256 position angular integer - * @param scale Scaling factor; range is about 1% to 400% scale - * @returns The size of the sprite after scaling. This can be used for centering purposes. - */ -uint8_t gfx_RotatedScaledTransparentSprite_NoClip(gfx_sprite_t *sprite, uint24_t x, uint8_t y, uint8_t angle, uint8_t scale); - -/** - * Helper macro to only perform rotation using gfx_RotatedScaledTransparentSprite_NoClip - * - * @param sprite_in Input sprite to rotate - * @param sprite_out Pointer to where rotated sprite will be stored - * @param angle 256 position angular integer - * @see gfx_RotatedScaledTransparentSprite_NoClip - */ -#define gfx_RotatedTransparentSprite_NoClip(sprite, x, y, angle) gfx_RotatedScaledTransparentSprite_NoClip(sprite, x, y, angle, 64) - -/** - * Fixed Rotation with scaling fator for sprites without transparency - * - * @note A scale factor of 64 represents 100% scaling - * @warning This routine only accepts square input sprites - * @param sprite Input sprite to rotate/scale - * @param x X coordinate position - * @param x Y coordinate position - * @param angle 256 position angular integer - * @param scale Scaling factor; range is about 1% to 400% scale - * @returns The size of the sprite after scaling. This can be used for centering purposes. - */ -uint8_t gfx_RotatedScaledSprite_NoClip(gfx_sprite_t *sprite, uint24_t x, uint8_t y, uint8_t angle, uint8_t scale); - -/** - * Helper macro to only perform rotation using gfx_RotatedScaledSprite_NoClip - * - * @param sprite_in Input sprite to rotate - * @param sprite_out Pointer to where rotated sprite will be stored - * @param angle 256 position angular integer - * @see gfx_RotatedScaledTransparentSprite_NoClip - */ -#define gfx_RotatedSprite_NoClip(sprite, x, y, angle) gfx_RotatedScaledTransparentSprite_NoClip(sprite, x, y, angle, 64) - -/** - * Flips a sprite along the X axis - * - * @param sprite_in Input sprite to flip - * @param sprite_out Pointer to where flipped sprite will be stored - * @returns A pointer to sprite_out - * @note sprite_in and sprite_out cannot be the same - */ -gfx_sprite_t *gfx_FlipSpriteX(gfx_sprite_t *sprite_in, gfx_sprite_t *sprite_out); - -/** - * Flips a sprite along the Y axis - * - * @param sprite_in Input sprite to flip - * @param sprite_out Pointer to where flipped sprite will be stored - * @returns A pointer to sprite_out - * @note sprite_in and sprite_out cannot be the same - */ -gfx_sprite_t *gfx_FlipSpriteY(gfx_sprite_t *sprite_in, gfx_sprite_t *sprite_out); - -/** - * Rotates a sprite 90 degrees clockwise - * - * @param sprite_in Input sprite to rotate - * @param sprite_out Pointer to where rotated sprite will be stored - * @returns A pointer to sprite_out - * @note sprite_in and sprite_out cannot be the same - */ -gfx_sprite_t *gfx_RotateSpriteC(gfx_sprite_t *sprite_in, gfx_sprite_t *sprite_out); - -/** - * Rotates a sprite 90 degrees counter clockwise - * - * @param sprite_in Input sprite to rotate - * @param sprite_out Pointer to where rotated sprite will be stored - * @returns A pointer to sprite_out - * @note sprite_in and sprite_out cannot be the same - */ -gfx_sprite_t *gfx_RotateSpriteCC(gfx_sprite_t *sprite_in, gfx_sprite_t *sprite_out); - -/** - * Rotates a sprite 180 degrees - * - * @param sprite_in Input sprite to rotate - * @param sprite_out Pointer to where rotated sprite will be stored - * @returns A pointer to sprite_out - */ -gfx_sprite_t *gfx_RotateSpriteHalf(gfx_sprite_t *sprite_in, gfx_sprite_t *sprite_out); - -/** - * Resizes a sprite to new dimensions - * - * Place new image dimensions in sprite_out; i.e. sprite_out->width = 80; sprite_out->height = 20. - * @param sprite_in Input sprite to scale - * @param sprite_out Pointer to where scaled sprite will be stored - * @returns A pointer to \p sprite_out - */ -gfx_sprite_t *gfx_ScaleSprite(gfx_sprite_t *sprite_in, gfx_sprite_t *sprite_out); - -/** - * Fixed Rotation with scaling factor for sprites - * - * The output sprite is updated with the dimensions required for the implemented scaling factor. - * You must make sure that \p sprite_out has enough memory to store the needed output sprite. This can be - * found with the following formula: size = (max_scale / 64) * width * height + 2; - * - * @note A scale factor of 64 represents 100% scaling - * @warning This routine only accepts square input sprites - * @param sprite_in Input sprite to rotate/scale - * @param sprite_out Pointer to where rotated/scaled sprite will be stored - * @param angle 256 position angular integer - * @param scale Scaling factor; range is about 1% to 400% scale - * @returns A pointer to \p sprite_out - */ -gfx_sprite_t *gfx_RotateScaleSprite(gfx_sprite_t *sprite_in, gfx_sprite_t *sprite_out, uint8_t angle, uint8_t scale); - -/** - * Helper macro to only perform rotation using gfx_RotateScaleSprite - * - * @param sprite_in Input sprite to rotate - * @param sprite_out Pointer to where rotated sprite will be stored - * @param angle 256 position angular integer - * @returns A pointer to \p sprite_out - * @see gfx_RotateScaleSprite - */ -#define gfx_RotateSprite(sprite_in, sprite_out, angle) gfx_RotateScaleSprite(sprite_in, sprite_out, angle, 64) - -/** - * Creates a temporary character sprite - * - * This may be useful for performing rotations and other - * operations on characters. The sprite returned is always 8x8 pixels. - * @param c Character to generate - */ -gfx_sprite_t *gfx_GetSpriteChar(char c); - -/** - * Sets the font's character data - * - * Fonts can be created manually or and exported to a C-style format using 8x8 Pixel ROM Font Editor. - * (https://www.min.at/prinz/o/software/pixelfont/#download) - * - * @param data Pointer to formated 8x8 pixel font - * @returns Pointer to previous font data - * @note Format of font data is 8 bytes horizontally aligned. - */ -uint8_t *gfx_SetFontData(uint8_t *data); - -/** - * Sets the font data for a specific character - * - * @param index Character index to modify (if using default font, values range from 0-127, custom font can have indexes 0-255) - * @param data Pointer to formated 8x8 pixel font - * @returns Pointer to current character data if \p data is NULL, otherwise a pointer to next character data - * @note Format of font data is 8 bytes horizontally aligned. - * @see gfx_SetFontData - */ -uint8_t *gfx_SetCharData(uint8_t index, uint8_t *data); - -/** - * Sets the font spacing - * - * @param spacing Pointer to array of character spacing - */ -void gfx_SetFontSpacing(uint8_t *spacing); - -/** - * Sets the height in pixels of each character - * - * The default value is 8 pixels - * @param height New font height in pixels - * @returns Previous height of font in pixels - */ -uint8_t gfx_SetFontHeight(uint8_t height); - -/** - * Sets monospaced font - * - * @param spacing Distance between characters - * @note To disable monospaced font, set to 0 - */ -void gfx_SetMonospaceFont(uint8_t spacing); - -/** - * Gets the pixel width of the given string - * - * @param string Pointer to string - * @note Takes into account monospacing flag - */ -unsigned int gfx_GetStringWidth(const char *string); - -/** - * Gets the pixel width of the given character - * - * @param c Character to get width of - * @returns Width in pixels of character - * @note Takes into account monospacing flag - */ -unsigned int gfx_GetCharWidth(const char c); - -/** - * Sets the clipping window - * - * This window is used across all clipped routines - * @param xmin Minimum x coordinate - * @param ymin Minimum y coordinate - * @param xmax Maximum x coordinate - * @param ymax Maximum y coordinate - * @note This routine is exclusive - */ -void gfx_SetClipRegion(int xmin, int ymin, int xmax, int ymax); - -/** - * Clips a region to fit within the window - * - * @returns False if offscreen, true if onscreen - */ -bool gfx_GetClipRegion(gfx_region_t *region); - -/** - * Shifts the drawing window down - * - * @param pixels Number of pixels to shift - * @note Data left over is undefined (Must be drawn over) - */ -void gfx_ShiftDown(uint8_t pixels); - -/** - * Shifts the drawing window up - * - * @param pixels Number of pixels to shift - * @note Data left over is undefined (Must be drawn over) - */ -void gfx_ShiftUp(uint8_t pixels); - -/** - * Shifts the drawing window left - * - * @param pixels Number of pixels to shift - * @note Data left over is undefined (Must be drawn over) - */ -void gfx_ShiftLeft(uint24_t pixels); - -/** - * Shifts the drawing window right - * - * @param pixels Number of pixels to shift - * @note Data left over is undefined (Must be drawn over) - */ -void gfx_ShiftRight(uint24_t pixels); - -/** - * Lightens a given 1555 color; useful for palette color conversions. - * - * @param color Original color input in 1555 format - * @param amount Amount to lighten by - * @returns Lightened color - * @note 0 returns full white, 255 returns original color - */ -uint16_t gfx_Lighten(uint16_t color, uint8_t amount); - -/** - * Darkens a given 1555 color; useful for palette color conversions. - * - * @param color Original color input in 1555 format - * @param amount Amount to darken by - * @returns Darkened color - * @note 0 returns full black, 255 returns original color - */ -uint16_t gfx_Darken(uint16_t color, uint8_t amount); - -/** - * Fills an area with a color - * - * @param x X coordinate to begin filling at - * @param y Y coordinate to begin filling at - * @param color New color to fill with - * - * @note This routine performs clipping to stay within the window, but you must ensure it starts in the window. - */ -void gfx_FloodFill(unsigned int x, uint8_t y, uint8_t color); - -/** - * Draws a sprite with RLE transparency. - * - * @param sprite sprite to draw - * @param x x-coordinate - * @param y y-coordinate - */ -void gfx_RLETSprite(gfx_rletsprite_t *sprite, int x, int y); - -/** - * Draws an unclipped sprite with RLE transparency. - * - * @param sprite sprite to draw - * @param x x-coordinate - * @param y y-coordinate - */ -void gfx_RLETSprite_NoClip(gfx_rletsprite_t *sprite, uint24_t x, uint8_t y); - -/** - * Converts a sprite with RLE transpareny to a sprite with normal transparency. - * - * Width and height will be set in the converted sprite. - * - * The transparent color index in the converted sprite is controlled by - * gfx_SetTransparentColor(). - * - * @attention - * The output sprite must have been allocated with a large enough \c data field - * to hold the converted sprite data, which will be width * height - * bytes large. - * - * @param[in] sprite_in input sprite with RLE transparency - * @param[out] sprite_out converted sprite with normal transparency - * @returns the converted sprite - * @see gfx_ConvertMallocRLETSprite - * @see gfx_ConvertToRLETSprite - */ -gfx_sprite_t *gfx_ConvertFromRLETSprite(gfx_rletsprite_t *sprite_in, gfx_sprite_t *sprite_out); - -/** - * Converts a sprite with normal transpareny to a sprite with RLE transparency. - * - * Width and height will be set in the converted sprite. - * - * The transparent color index in the input sprite is controlled by - * gfx_SetTransparentColor(). - * - * @attention - * The output sprite must have been allocated with a large enough data field to - * hold the converted sprite data; see gfx_AllocRLETSprite() for information. - * - * @note - * To avoid needing to predict the output size and risking either the prediction - * being too high and wasting space, or being too low and corrupting memory, - * gfx_ConvertMallocRLETSprite() can be used instead to allocate the exact - * amount of necessary space for the converted sprite. - * - * @param[in] sprite_in input sprite with normal transparency - * @param[out] sprite_out converted sprite with RLE transparency - * @returns the converted sprite - * @see gfx_ConvertFromRLETSprite - */ -gfx_rletsprite_t *gfx_ConvertToRLETSprite(gfx_sprite_t *sprite_in, gfx_rletsprite_t *sprite_out); - -/** - * Converts a sprite with normal transpareny to a sprite with RLE transparency, - * allocating the exact amount of necessary space for the converted sprite. - * - * Allocates the memory with \p malloc_routine. Width and height will be set in - * the converted sprite. Returns \c NULL upon allocation failure. - * - * The transparent color index in the input sprite is controlled by - * gfx_SetTransparentColor(). - * - * @remarks - * If using \c malloc as the \p malloc_routine, gfx_ConvertMallocRLETSprite() - * can be used as a shortcut. - * - * @remarks - * A gfx_sprite_t can be converted into an appropriately large, - * already-allocated gfx_rletsprite_t using gfx_ConvertToRLETSprite(). - * - * @param sprite_in input sprite with normal transparency - * @param malloc_routine malloc implementation to use - * @returns a newly allocated converted sprite with RLE transparency - * @see gfx_ConvertFromRLETSprite - */ -gfx_rletsprite_t *gfx_ConvertToNewRLETSprite(gfx_sprite_t *sprite_in, void *(*malloc_routine)(size_t)); - -/** - * Converts a sprite with normal transpareny to a sprite with RLE transparency, - * allocating the exact amount of necessary space for the converted sprite using - * \c malloc. - * - * Width and height will be set in the converted sprite. Returns \c NULL upon - * allocation failure. - * - * The transparent color index in the input sprite is controlled by - * gfx_SetTransparentColor(). - * - * @remarks - * A gfx_sprite_t can be converted into an appropriately large, - * already-allocated gfx_rletsprite_t using gfx_ConvertToRLETSprite(). - * - * @param sprite_in input sprite with normal transparency - * @param malloc_routine malloc implementation to use - * @returns a newly allocated converted sprite with RLE transparency - * @see gfx_ConvertFromRLETSprite - */ -#define gfx_ConvertMallocRLETSprite(sprite_in) \ -gfx_ConvertToNewRLETSprite(sprite_in, malloc) - -/** - * Converts an RGB value to a palette color - * - * Conversion is not 100% perfect, but is quite close - */ -#define gfx_RGBTo1555(r,g,b) \ -((uint16_t)(((uint8_t)(r) >> 3) << 10) | \ -(((uint8_t)(g) >> 3) << 5) | \ -((uint8_t)(b) >> 3)) - -/** - * Checks if we are currently in a rectangular hotspot area - */ -#define gfx_CheckRectangleHotspot(master_x, master_y, master_width, master_height, test_x, test_y, test_width, test_height) \ -(((test_x) < ((master_x) + (master_width))) && \ -(((test_x) + (test_width)) > (master_x)) && \ -((test_y) < ((master_y) + (master_height))) && \ -(((test_y) + (test_height)) > (master_y))) - -/* Color definitions (try to avoid) */ -#define gfx_black 0x00 -#define gfx_red 0xE0 -#define gfx_orange 0xE3 -#define gfx_green 0x03 -#define gfx_blue 0x10 -#define gfx_purple 0x50 -#define gfx_yellow 0xE7 -#define gfx_pink 0xF0 -#define gfx_white 0xFF - -/* Compatability defines (don't use please) */ -typedef gfx_sprite_t gfx_image_t; -#define gfx_BlitArea gfx_BlitRectangle -void gfx_LZDecompress(uint8_t *in, uint8_t *out, unsigned int in_size); - -#define gfx_lcdWidth (320) -#define gfx_lcdHeight (240) - -#ifdef __cplusplus -} -#endif - -#endif +/** + * @file + * @brief Contains optimized graphics operations and routines + * + * Example program template with best graphx buffer usage pattern: + * @code + * // Standard #includes omitted + * + * bool partial_redraw; + * + * // Implement us! + * void begin(); + * void end(); + * bool step(); + * void draw(); + * + * void main() { + * begin(); // No rendering allowed! + * gfx_Begin(); + * gfx_SetDrawBuffer(); // Draw to the buffer to avoid rendering artifats + * + * while (step()) { // No rendering allowed in step! + * if (partial_redraw) // Only want to redraw part of the previous frame? + * gfx_BlitScreen(); // Copy previous frame as a base for this frame + * draw(); // As little non-rendering logic as possible + * gfx_SwapDraw(); // Queue the buffered frame to be displayed + * } + * + * gfx_End(); + * end(); + * } + * @endcode + * + * @authors Matt "MateoConLechuga" Waltz + * @authors Jacob "jacobly" Young + * @authors Zachary "Runer112" Wassall + * @authors Patrick "tr1p1ea" Prendergast + * @authors "grosged" + */ + +#ifndef H_GRAPHX +#define H_GRAPHX + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Sprite (image) type. + * + * Whether or not a sprite includes transparency is not explicitly encoded, and + * is determined only by usage. If used with transparency, transparent pixels + * are those with a certain color index, which can be set with + * gfx_SetTransparentColor(). + * + * @attention + * Displaying a gfx_rletsprite_t (which includes transparency) is significantly + * faster than displaying a gfx_sprite_t with transparency, and should be + * preferred. However, gfx_rletsprite_t does not support transformations, such + * as flipping and rotation. Such transformations can be applied to a + * gfx_sprite_t, which can then be converted to a gfx_rletsprite_t for faster + * display using gfx_ConvertToNewRLETSprite() or gfx_ConvertToRLETSprite(). + * + * @remarks + * Create at compile-time with a tool like + * convpng. + * Create at runtime (with uninitialized data) with gfx_MallocSprite(), + * gfx_UninitedSprite(), or gfx_TempSprite(). + */ +typedef struct { + uint8_t width; /**< Width of the image */ + uint8_t height; /**< Height of the image */ + uint8_t data[1]; /**< Image data array */ +} gfx_sprite_t; + +/** + * @brief Sprite (image) type with RLE transparency. + * + * @attention + * Displaying a gfx_rletsprite_t (which includes transparency) is significantly + * faster than displaying a gfx_sprite_t with transparency, and should be + * preferred. However, gfx_rletsprite_t does not support transformations, such + * as flipping and rotation. Such transformations can be applied to a + * gfx_sprite_t, which can then be converted to a gfx_rletsprite_t for faster + * display using gfx_ConvertToNewRLETSprite() or gfx_ConvertToRLETSprite(). + * + * @remarks + * Create at compile-time with a tool like + * convpng. + */ +typedef struct { + uint8_t width; /**< Width of the image */ + uint8_t height; /**< Height of the image */ + uint8_t data[1]; /**< Image data array */ +} gfx_rletsprite_t; + +/** + * @brief A simple structure for working with 2D points + */ +typedef struct { + int x; /**< x point */ + int y; /**< y point */ +} gfx_point_t; + +/** + * @brief Stores operating modes of this library + * @see gfx_Begin + */ +typedef enum { + gfx_8bpp = 0x27 /**< Enable 8 bits per pixel mode */ +} gfx_mode_t; + +/** + * Dynamically allocates memory for a sprite. + * + * Allocates the memory with \p malloc_routine. \p width and \p height will be + * set in the allocated sprite. Returns \c NULL upon allocation failure. + * + * @note + * If not used in a dynamic context and \p width and \p height are static, + * consider statically allocating the sprite instead with gfx_UninitedSprite() + * or gfx_TempSprite(). + * + * @remarks + * If using \c malloc as the \p malloc_routine, gfx_MallocSprite() can be used + * as a shortcut. + * + * @param width sprite width + * @param height sprite height + * @param malloc_routine malloc implementation to use + * @return pointer to the allocated sprite + */ +gfx_sprite_t *gfx_AllocSprite(uint8_t width, uint8_t height, void *(*malloc_routine)(size_t)); + +/** + * Dynamically allocates memory for a sprite using \c malloc. + * + * \p width and \p height will be set in the sprite. Returns \c NULL upon + * allocation failure. + * + * @note + * If not used in a dynamic context and \p width and \p height are static, + * consider statically allocating the sprite instead with gfx_UninitedSprite() + * or gfx_TempSprite(). + * + * @param width sprite width + * @param height sprite height + * @return pointer to the allocated sprite + * @see gfx_AllocSprite + */ +#define gfx_MallocSprite(width, height) \ +gfx_AllocSprite(width, height, malloc) + +/** + * Statically allocates unitialized memory for a sprite. + * + * Declares a gfx_sprite_t * with the given \p name pointing to the + * allocated memory. \p width and \p height will \b not be set in the sprite, + * unlike gfx_TempSprite(). + * + * @warning + * If used outside of a function body, the memory will be allocated in the + * global unitialized data segment (BSS). If used inside a function body, the + * memory will be allocated on the stack. If the sprite is sufficiently large, + * usage inside a function body will overflow the stack, so it is recommended + * that this normally be used outside of a function body. + * + * @param name name of declared gfx_sprite_t * + * @param width sprite width + * @param height sprite height + * @see gfx_MallocSprite + */ +#define gfx_UninitedSprite(name, width, height) \ +uint8_t name##_data[2 + (width) * (height)]; \ +gfx_sprite_t *name = (gfx_sprite_t *)name##_data + +/** + * Statically allocates memory for a sprite. + * + * Declares a gfx_sprite_t * with the given \p name pointing to the + * allocated memory. \p width and \p height will be set in the sprite, unlike + * gfx_UninitedSprite(). + * + * @attention + * Due to \p width and \p height being set, the memory will be allocated in the + * initialized data segment. If the compiled program is not compressed, then + * this could be a serious source of bloat and gfx_UninitedSprite() should be + * preferred. + * + * @param name name of declared gfx_sprite_t * + * @param width sprite width + * @param height sprite height + * @see gfx_MallocSprite + */ +#define gfx_TempSprite(name, width, height) \ +uint8_t name##_data[2 + (width) * (height)] = { (width), (height) }; \ +gfx_sprite_t *name = (gfx_sprite_t *)name##_data + +/** + * Dynamically allocates memory for a sprite with RLE transpareny. + * + * Allocates the memory with \p malloc_routine. Returns \c NULL upon allocation + * failure. + * + * \p data_size is the maximum predicted/calculated size of the sprite data + * (excuding the width and height bytes) that will be stored in the allocated + * sprite. Sprite data size could be up to (width + 1) * height * 3 / 2 + * bytes in the worst case, in which pixels horizontally alternate between + * non-transparent and transparent and each row begins with a non-transparent + * pixel. But if the average length of a horizontal transparent run is at least + * 2, then the sprite data will be no larger than (width + 1) * height + * bytes. The exact data size necessary is 2 * + * num_horizontal_transparent_runs + num_non_transparent_pixels + + * num_rows_beginning_with_non_transparent_pixel - + * num_rows_ending_with_transparent_pixel bytes. + * + * @note + * If not used in a dynamic context and \p data_size is static, consider + * statically allocating the sprite instead with gfx_UninitedRLETSprite() or + * gfx_TempRLETSprite(). + * + * @remarks + * If using \c malloc as the \p malloc_routine, gfx_MallocRLETSprite() can be + * used as a shortcut. + * + * @param data_size (maximum) sprite data size + * @param malloc_routine malloc implementation to use + * @return pointer to the allocated sprite + */ +#define gfx_AllocRLETSprite(data_size, malloc_routine) \ +(gfx_rletsprite_t *)(malloc_routine)(data_size) + +/** + * Dynamically allocates memory for a sprite with RLE transparency using \c + * malloc. + * + * \p data_size is the size to allocate for sprite data; see + * gfx_AllocRLETSprite() for information. Returns \c NULL upon allocation + * failure. + * + * @note + * If not used in a dynamic context and \p data_size is static, consider + * statically allocating the sprite instead with gfx_UninitedRLETSprite() or + * gfx_TempRLETSprite(). + * + * @param data_size (maximum) sprite data size + * @return pointer to the allocated sprite + * @see gfx_AllocRLETSprite + */ +#define gfx_MallocRLETSprite(data_size) \ +gfx_AllocRLETSprite(data_size, malloc) + +/** + * Statically allocates unitialized memory for a sprite with RLE transparency. + * + * Declares a gfx_rletsprite_t * with the given \p name pointing to the + * allocated memory. \p data_size is the size to allocate for sprite data; see + * gfx_AllocRLETSprite() for information. + * + * @warning + * If used outside of a function body, the memory will be allocated in the + * global unitialized data segment (BSS). If used inside a function body, the + * memory will be allocated on the stack. If the sprite is sufficiently large, + * usage inside a function body will overflow the stack, so it is recommended + * that this normally be used outside of a function body. + * + * @param name name of declared gfx_rletsprite_t * + * @param data_size (maximum) sprite data size + * @see gfx_MallocRLETSprite + */ +#define gfx_UninitedRLETSprite(name, data_size) \ +uint8_t name##_data[2 + (data_size)]; \ +gfx_rletsprite_t *name = (gfx_rletsprite_t *)name##_data + +/** + * Initializes the graphics library setup + */ +int gfx_Begin(); + +/** + * Closes the graphics setup + * + * Restores the LCD to 16bpp prefered by the OS and clears the screen. + */ +void gfx_End(void); + +/** + * Used for accessing the lcd palette directly + * + * This consists of 256 entries, each 2 bytes in size for a total of 512 bytes + */ +#define gfx_palette \ +((uint16_t*)0xE30200) + +/** + * Array of the LCD RAM + * + * Total of 153600 bytes in size + * @see gfx_vbuffer + */ +#define gfx_vram \ +((uint8_t*)0xD40000) + +/** + * Array of the current drawing buffer + * + * Total of 76800 bytes in size + * @see gfx_vram + */ +#define gfx_vbuffer \ +(**(uint8_t(**)[240][320])0xE30014) + +/** + * @brief Defines a rectangular graphics region + * + * @see gfx_GetClipRegion + */ +typedef struct { + int xmin; /**< Minimum x coordinate */ + int ymin; /**< Minimum y coordinate */ + int xmax; /**< Maximum x coordinate */ + int ymax; /**< Maximum y coordinate */ +} gfx_region_t; + +/** + * @brief Defines tilemap structure + * + * @see gfx_Tilemap + */ +typedef struct { + uint8_t *map; /**< Pointer to indexed map array */ + gfx_sprite_t **tiles; /**< Pointer to tiles */ + uint8_t tile_height; /**< Individual tile height */ + uint8_t tile_width; /**< Individual tile width */ + uint8_t draw_height; /**< Number of tiles per row to draw */ + uint8_t draw_width; /**< Number of tile per column to draw */ + uint8_t type_width; /**< Tile type height @see gfx_tilemap_type_t */ + uint8_t type_height; /**< Tile type width @see gfx_tilemap_type_t */ + uint8_t height; /**< Total number of rows in the tilemap */ + uint8_t width; /**< Total number of columns in the tilemap */ + uint8_t y_loc; /**< Y pixel location of tilemap */ + uint24_t x_loc; /**< X pixel location to tilemap */ +} gfx_tilemap_t; + +/** + * @brief Used for defining tile types + * + * @see gfx_tilemap_t + */ +typedef enum { + gfx_tile_no_pow2 = 0, /**< Set when using non powers of 2 */ + gfx_tile_2_pixel, /**< Set when using 2 pixel tiles */ + gfx_tile_4_pixel, /**< Set when using 4 pixel tiles */ + gfx_tile_8_pixel, /**< Set when using 8 pixel tiles */ + gfx_tile_16_pixel, /**< Set when using 16 pixel tiles */ + gfx_tile_32_pixel, /**< Set when using 32 pixel tiles */ + gfx_tile_64_pixel, /**< Set when using 64 pixel tiles */ + gfx_tile_128_pixel /**< Set when using 128 pixel tiles */ +} gfx_tilemap_type_t; + +/** + * Draws a tilemap given an initialized tilemap structure + * + * @param tilemap Pointer to initialized tilemap structure + * @param x_offset Offset in pixels from the left of the tilemap + * @param y_offset Offset in pixels from the top of the tilemap + * @see gfx_tilemap_t + */ +void gfx_Tilemap(gfx_tilemap_t *tilemap, uint24_t x_offset, uint24_t y_offset); + +/** + * Draws an unclipped tilemap given an initialized tilemap structure + * + * @param tilemap Pointer to initialized tilemap structure + * @param x_offset Offset in pixels from the left of the tilemap + * @param y_offset Offset in pixels from the top of the tilemap + * @see gfx_tilemap_t + */ +void gfx_Tilemap_NoClip(gfx_tilemap_t *tilemap, uint24_t x_offset, uint24_t y_offset); + +/** + * Draws a transparent tilemap given an initialized tilemap structure + * + * @param tilemap Pointer to initialized tilemap structure + * @param x_offset Offset in pixels from the left of the tilemap + * @param y_offset Offset in pixels from the top of the tilemap + * @see gfx_tilemap_t + */ +void gfx_TransparentTilemap(gfx_tilemap_t *tilemap, uint24_t x_offset, uint24_t y_offset); + +/** + * Draws an unclipped transparent tilemap given an initialized tilemap structure + * + * @param tilemap Pointer to initialized tilemap structure + * @param x_offset Offset in pixels from the left of the tilemap + * @param y_offset Offset in pixels from the top of the tilemap + * @see gfx_tilemap_t + */ +void gfx_TransparentTilemap_NoClip(gfx_tilemap_t *tilemap, uint24_t x_offset, uint24_t y_offset); + +/** + * Gets a pointer to a particular tile given an initialized tilemap structure and pixel offsets + * + * @param tilemap Pointer to initialized tilemap structure + * @param x_offset Offset in pixels from the left of the tilemap + * @param y_offset Offset in pixels from the top of the tilemap + */ +uint8_t *gfx_TilePtr(gfx_tilemap_t *tilemap, uint24_t x_offset, uint24_t y_offset); + +/** + * Sets a particular tile's value given an initialized tilemap structure and pixel offsets + * + * @param tilemap Pointer to initialized tilemap structure + * @param x_offset Offset in pixels from the left of the tilemap + * @param y_offset Offset in pixels from the top of the tilemap + * @param value Value to set tile to + */ +#define gfx_SetTile(tilemap, x_offset, y_offset, value) \ +(*(gfx_TilePtr((tilemap), (x_offset), (y_offset))) = (uint8_t)(value)) + +/** + * Gets a particular tile's value given an initialized tilemap structure and pixel offsets + * + * @param tilemap Pointer to initialized tilemap structure + * @param x_offset Offset in pixels from the left of the tilemap + * @param y_offset Offset in pixels from the top of the tilemap + */ +#define gfx_GetTile(tilemap, x_offset, y_offset) \ +(*(gfx_TilePtr((tilemap), (x_offset), (y_offset)))) + +/** + * Gets a pointer to a particular tile given an initialized tilemap structure and mapped offsets + * + * @param tilemap Pointer to initialized tilemap structure + * @param row Offset in bytes in the row + * @param col Offset in bytes in the column + */ +uint8_t *gfx_TilePtrMapped(gfx_tilemap_t *tilemap, uint8_t row, uint8_t col); + +/** + * Sets a particular tile's value given an initialized tilemap structure and mapped offsets + * + * @param tilemap Pointer to initialized tilemap structure + * @param row Offset in bytes in the row + * @param col Offset in bytes in the column + * @param value Value to set tile to + */ +#define gfx_SetTileMapped(tilemap, row, col, value) \ +(*(gfx_TilePtrMapped((tilemap), (row), (col))) = (uint8_t)(value)) + +/** + * Gets a particular tile's value given an initialized tilemap structure and mapped offsets + * + * @param tilemap Pointer to initialized tilemap structure + * @param row Offset in bytes in the row + * @param col Offset in bytes in the column + */ +#define gfx_GetTileMapped(tilemap, row, col) \ +(*(gfx_TilePtrMapped((tilemap), (row), (col)))) + +/** + * Sets the color index that drawing routines will use + * + * This applies to lines, rectangles, circles, etc + * @param index Color index to set + * @returns Previous set color index + */ +uint8_t gfx_SetColor(uint8_t index); + +/** + * Sets the transparent index that drawing routines will use + * + * This currently applies to transparent sprites, both scaled and unscaled + * @param index Transparent color index to set + * @returns The previous transparent color index + */ +uint8_t gfx_SetTransparentColor(uint8_t index); + +/** + * Sets up the default palette for the given mode + * + * @param mode Palette to use + */ +void gfx_SetDefaultPalette(gfx_mode_t mode); + +/** + * Sets entries in the palette + * + * @param palette Pointer to palette to use + * @param size Size of palette to store + * @param offset Offset in bytes to start at (Generally set to 0) + */ +void gfx_SetPalette(uint16_t *palette, uint24_t size, uint8_t offset); + +/** + * Fills the screen with a given palette index + * + * @param index Color index to fill with + */ +void gfx_FillScreen(uint8_t index); + +/** + * Implements a faster version of gfx_FillScreen(0) + * + * @see gfx_FillScreen + */ +void gfx_ZeroScreen(void); + +/** + * Sets a pixel to the global color index + * + * This is measured from the top left origin of the screen. + * Pixels are only clipped within the screen boundaries + * @param x X coordinate location + * @param y Y coordinate location + * @see gfx_SetColor + */ +void gfx_SetPixel(uint24_t x, uint8_t y); + +/** + * Gets a pixel's color index + * + * This is measured from the top left origin of the screen. + * Pixels are only clipped within the screen boundaries + * @param x X coordinate location + * @param y Y coordinate location + */ +uint8_t gfx_GetPixel(uint24_t x, uint8_t y); + +/** + * Draws a line + * + * This is measured from the top left origin of the screen. + * @param x0 First X coordinate + * @param y0 First Y coordinate + * @param x1 Second X coordinate + * @param y1 Second Y coordinate + */ +void gfx_Line(int x0, int y0, int x1, int y1); + +/** + * Draws an unclipped line + * + * This is measured from the top left origin of the screen. + * @param x0 First X coordinate + * @param y0 First Y coordinate + * @param x1 Second X coordinate + * @param y1 Second Y coordinate + */ +void gfx_Line_NoClip(uint24_t x0, uint8_t y0, uint24_t x1, uint8_t y1); + +/** + * Clips the points in a window region + * + * This is measured from the top left origin of the screen. + * @param x0 First X coordinate + * @param y0 First Y coordinate + * @param x1 Second X coordinate + * @param y1 Second Y coordinate + * @returns False if not within window, true otherwise + */ +bool gfx_CohenSutherlandClip(int *x0, int *y0, int *x1, int *y1); + +/** + * Draws a horizontal line + * + * This is measured from the top left origin of the screen. + * Performs faster than using @c gfx_Line + * @param x X coordinate + * @param y Y coordinate + * @param length Length of line + */ +void gfx_HorizLine(int x, int y, int length); + +/** + * Draws an unclipped horizontal line + * + * This is measured from the top left origin of the screen. + * Performs faster than using @c gfx_Line + * @param x X coordinate + * @param y Y coordinate + * @param length Length of line + */ +void gfx_HorizLine_NoClip(uint24_t x, uint8_t y, uint24_t length); + +/** + * Draws a vertical line + * + * This is measured from the top left origin of the screen. + * Performs faster than using @c gfx_Line + * @param x X coordinate + * @param y Y coordinate + * @param length Length of line + */ +void gfx_VertLine(int x, int y, int length); + +/** + * Draws an unclipped vertical line + * + * This is measured from the top left origin of the screen. + * Performs faster than using @c gfx_Line + * @param x X coordinate + * @param y Y coordinate + * @param length Length of line + */ +void gfx_VertLine_NoClip(uint24_t x, uint8_t y, uint24_t length); + +/** + * Draws a rectangle outline + * + * This is measured from the top left origin of the screen. + * @param x X coordinate + * @param y Y coordinate + * @param width Width of rectangle + * @param height Height of rectangle + */ +void gfx_Rectangle(int x, int y, int width, int height); + +/** + * Draws an unclipped rectangle outline + * + * This is measured from the top left origin of the screen. + * @param x X coordinate + * @param y Y coordinate + * @param width Width of rectangle + * @param height Height of rectangle + */ +void gfx_Rectangle_NoClip(uint24_t x, uint8_t y, uint24_t width, uint8_t height); + +/** + * Draws a filled rectangle + * + * This is measured from the top left origin of the screen. + * @param x X coordinate + * @param y Y coordinate + * @param width Width of rectangle + * @param height Height of rectangle + */ +void gfx_FillRectangle(int x, int y, int width, int height); + +/** + * Draws an unclipped filled rectangle + * + * This is measured from the top left origin of the screen. + * @param x X coordinate + * @param y Y coordinate + * @param width Width of rectangle + * @param height Height of rectangle + */ +void gfx_FillRectangle_NoClip(uint24_t x, uint8_t y, uint24_t width, uint8_t height); + +/** + * Draws a circle outline + * + * This is measured from the top left origin of the screen. + * @param x X coordinate + * @param y Y coordinate + * @param radius The radius of the circle + */ +void gfx_Circle(int x, int y, unsigned radius); + +/** + * Draws a filled circle + * + * This is measured from the top left origin of the screen. + * @param x X coordinate + * @param y Y coordinate + * @param radius The radius of the circle + */ +void gfx_FillCircle(int x, int y, unsigned radius); + +/** + * Draws an unclipped filled circle + * + * This is measured from the top left origin of the screen. + * @param x X coordinate + * @param y Y coordinate + * @param radius The radius of the circle + */ +void gfx_FillCircle_NoClip(uint24_t x, uint8_t y, unsigned radius); + +/** + * Draws an unclipped circle outline + * + * This is measured from the top left origin of the screen. + * @param x X coordinate + * @param y Y coordinate + * @param radius The radius of the circle + */ +#define gfx_Circle_NoClip(x, y, radius) \ +gfx_Circle((x), (y), (radius)) + +/** + * Draws a polygon outline + * + * Points are measured from the top left origin of the screen. + * @code + * int points[6] = { + * 160, 1, // (x0, y0) + * 1, 238, // (x1, y1) + * 318,238, // (x2, y2) + * }; + * num_points = 3; + * gfx_Polygon(points, num_points) + * @endcode + * @param points Pointer to x and y pairs + * @param num_points Number of x and y pairs + */ +void gfx_Polygon(int *points, unsigned num_points); + +/** + * Draws an unclipped polygon outline + * + * Points are measured from the top left origin of the screen. + * @code + * int points[6] = { + * 160, 1, // (x0, y0) + * 1, 238, // (x1, y1) + * 318,238, // (x2, y2) + * }; + * num_points = 3; + * gfx_Polygon_NoClip(points, num_points) + * @endcode + * @param points Pointer to x and y pairs + * @param num_points Number of x and y pairs + */ +void gfx_Polygon_NoClip(int *points, unsigned num_points); + +/** + * Draws a filled triangle + * + * Points are measured from the top left origin of the screen. + * @param x0 First X coordinate + * @param y0 First Y coordinate + * @param x1 Second X coordinate + * @param y1 Second Y coordinate + * @param x2 Third X coordinate + * @param y2 Third Y coordinate + */ +void gfx_FillTriangle(int x0, int y0, int x1, int y1, int x2, int y2); +void gfx_FillTriangle_NoClip(int x0, int y0, int x1, int y1, int x2, int y2); + +/** + * Forces all graphics routines draw location + * + * @param location Location routines should draw to + * @see gfx_draw_location_t + */ +void gfx_SetDraw(uint8_t location); + +/** + * @brief Different locations routines can be drawn to + */ +typedef enum { + gfx_screen = 0, /**< Screen */ + gfx_buffer /**< Buffer */ +} gfx_draw_location_t; + +/** + * Makes the subsequent GraphX drawing routines act on the buffer + */ +#define gfx_SetDrawBuffer() \ +gfx_SetDraw(gfx_buffer) + +/** + * Makes the subsequent GraphX drawing routines act on the screen + */ +#define gfx_SetDrawScreen() \ +gfx_SetDraw(gfx_screen) + +/** + * Gets current draw location + * + * @returns Location type enumeration + * @see gfx_draw_location_t + */ +uint8_t gfx_GetDraw(void); + +/** + * Swaps the roles of the screen and drawing buffers. + * + * Does not wait for the old screen buffer to finish being displayed. Instead, + * the next invocation of a graphx drawing function will block, waiting for this + * event. To block and wait explicitly, use gfx_Wait(). + * + * The LCD driver maintains its own screen buffer pointer for the duration of a + * refresh. The swap performed by this function will only be picked up at a + * point between refreshes. + * + * @remarks + * In practice, this function should be invoked immediately after finishing + * drawing a frame to the drawing buffer, and invocation of the first graphx + * drawing function for the next frame should be scheduled as late as possible + * relative to non-drawing logic. Non-drawing logic can execute during time when + * a drawing function may otherwise block. + */ +void gfx_SwapDraw(void); + +/** + * Waits for the screen buffer to finish being displayed after gfx_SwapDraw(). + * + * @remarks + * In practice, this function should not need to be invoked by user code. It + * should be invoked by custom drawing functions (as late as reasonably + * possible) before writing to the drawing buffer, gfx_vbuffer. + */ +void gfx_Wait(void); + +/** + * Copies the input buffer to the opposite buffer + * + * No clipping is performed; as it is a copy not a draw + * @param src drawing location to copy from + * @see gfx_draw_location_t + */ +void gfx_Blit(uint8_t src); + +/** + * Copies lines from the input buffer to the opposite buffer + * + * No clipping is performed; as it is a copy not a draw + * @param src drawing location to copy from + * @param y_loc Y Location to begin copying at + * @param num_lines Number of lines to copy + * @see gfx_draw_location_t + */ +void gfx_BlitLines(uint8_t src, uint8_t y_loc, uint8_t num_lines); + +/** + * Copies a rectangle from the input buffer to the opposite buffer + * + * No clipping is performed; as it is a copy not a draw + * @param src drawing location to copy from + * @param x X coordinate + * @param y Y coordinate + * @param width Width of rectangle + * @param height Height of rectangle + * @see gfx_draw_location_t + */ +void gfx_BlitRectangle(uint8_t src, uint24_t x, uint8_t y, uint24_t width, uint24_t height); + +/** + * Copies the screen to the buffer + */ +#define gfx_BlitScreen() \ +gfx_Blit(gfx_screen) + +/** + * Copies the buffer to the screen + */ +#define gfx_BlitBuffer() \ +gfx_Blit(gfx_buffer) + +/** + * Sets the scaling for text + * + * Values in the range from 1-5 are preferred. + * @param width_scale Text width scaling + * @param height_scale Text height scaling + */ +void gfx_SetTextScale(uint8_t width_scale, uint8_t height_scale); + +/** + * Prints a character + * + * Outputs a character at the current cursor position. + * @param c Character to print + * @note By default, no text clipping is performed (configurable with gfx_SetTextConfig) + */ +void gfx_PrintChar(const char c); + +/** + * Prints a signed integer + * + * Outputs at the current cursor position. Padded with leading zeros if + * necessary to satisfy the specified minimum length. + * @param n Integer to print + * @param length Minimum number of characters to print + * @note By default, no text clipping is performed (configurable with gfx_SetTextConfig) + * @note \c length must be between 1 and 8, inclusive + */ +void gfx_PrintInt(int n, uint8_t length); + +/** + * Prints an unsigned integer + * + * Outputs at the current cursor position. Padded with leading zeros if + * necessary to satisfy the specified minimum length. + * @param n Unsigned integer to print + * @param length Minimum number of characters to print + * @note By default, no text clipping is performed (configurable with gfx_SetTextConfig) + * @note \c length must be between 1 and 8, inclusive + */ +void gfx_PrintUInt(unsigned int n, uint8_t length); + +/** + * Prints a string + * + * Outputs a string at the current cursor position. + * @param string Pointer to string to print + * @note By default, no text clipping is performed (configurable with gfx_SetTextConfig) + */ +void gfx_PrintString(const char *string); + +/** + * Prints a string at coordinates + * + * Outputs a string at the supplied coordinates + * Posistion is measured from top left origin of screen. + * @param string Pointer to string to print + * @param x X coordinate + * @param y Y coordinate + * @note By default, no text clipping is performed (configurable with gfx_SetTextConfig) + */ +void gfx_PrintStringXY(const char *string, int x, int y); + +/** + * @returns The current text cursor X position + */ +int gfx_GetTextX(void); + +/** + * @returns The current text cursor Y position + */ +int gfx_GetTextY(void); + +/** + * Sets the text cursor XY position + * + * @param x X coordinate + * @param y Y coordinate + */ +void gfx_SetTextXY(int x, int y); + +/** + * Sets the configuration for the text routines + * + * @param config Set the options for the text mode + * @see gfx_text_options_t + * @note Scaled text does not clip + */ +void gfx_SetTextConfig(uint8_t config); + +/** + * @brief Different available text modes + */ +typedef enum { + gfx_text_clip = 1, /**< Text routines will clip against the defined clip window */ + gfx_text_noclip /**< Default, text routines do not clip (much faster) */ +} gfx_text_options_t; + +/** + * Sets text foreground color + * + * @param color Color index to set + * @returns Previous text foreground color index + * @note Default text foreground color index: 0 + */ +uint8_t gfx_SetTextFGColor(uint8_t color); + +/** + * Sets text background color + * + * @param color Color index to set + * @returns Previous text background color index + * @note Default text background color index: 255 + */ +uint8_t gfx_SetTextBGColor(uint8_t color); + +/** + * Sets text transparency color + * + * @param color Color index to set + * @returns Previous text transparency color index + * @note Default text transparency color index: 255 + */ +uint8_t gfx_SetTextTransparentColor(uint8_t color); + +/** + * Draws a sprite + * + * @param sprite Pointer to initialized sprite structure + * @param x X coordinate + * @param y Y coordinate + */ +void gfx_Sprite(gfx_sprite_t *sprite, int x, int y); + +/** + * Draws an unclipped sprite + * + * @param sprite Pointer to initialized sprite structure + * @param x X coordinate + * @param y Y coordinate + */ +void gfx_Sprite_NoClip(gfx_sprite_t *sprite, uint24_t x, uint8_t y); + +/** + * Draws a transparent sprite + * + * @param sprite Pointer to initialized sprite structure + * @param x X coordinate + * @param y Y coordinate + */ +void gfx_TransparentSprite(gfx_sprite_t *sprite, int x, int y); + +/** + * Draws an unclipped transparent sprite + * + * @param sprite Pointer to initialized sprite structure + * @param x X coordinate + * @param y Y coordinate + */ +void gfx_TransparentSprite_NoClip(gfx_sprite_t *sprite, uint24_t x, uint8_t y); + +/** + * Grabs the background behind a sprite + * + * This is useful for partial redraw. + * @param sprite_buffer Buffer used to store grabbed sprite + * @param x X coordinate to grab sprite + * @param y Y coordinate to grab sprite + * @returns A pointer to sprite_buffer + * @note sprite_buffer must be pointing to a large enough buffer to hold width*height number of bytes + */ +gfx_sprite_t *gfx_GetSprite(gfx_sprite_t *sprite_buffer, int x, int y); + +/** + * Grabs the background behind an unclipped sprite + * + * This is useful for partial redraw. + * @param sprite_buffer Buffer used to store grabbed sprite + * @param x X coordinate to grab sprite + * @param y Y coordinate to grab sprite + * @returns A pointer to sprite_buffer + * @note sprite_buffer must be pointing to a large enough buffer to hold width*height number of bytes + */ +#define gfx_GetSprite_NoClip(sprite_buffer, x, y) \ +gfx_GetSprite((sprite_buffer), (x), (y)) + +/** + * Scales an unclipped sprite + * + * Scaling factors must be greater than or equal to 1, and an integer factor + * @param sprite Pointer to initialized sprite structure + * @param x X coordinate + * @param y Y coordinate + * @param width_scale Width scaling factor + * @param height_scale Height scaling factor + * @note Useable with gfx_GetSprite in order to create clipped versions + */ +void gfx_ScaledSprite_NoClip(gfx_sprite_t *sprite, uint24_t x, uint8_t y, uint8_t width_scale, uint8_t height_scale); + +/** + * Scales an unclipped transparent sprite + * + * Scaling factors must be greater than or equal to 1, and an integer factor + * @param sprite Pointer to initialized sprite structure + * @param x X coordinate + * @param y Y coordinate + * @param width_scale Width scaling factor + * @param height_scale Height scaling factor + * @note Useable with gfx_GetSprite in order to create clipped versions + */ +void gfx_ScaledTransparentSprite_NoClip(gfx_sprite_t *sprite, uint24_t x, uint8_t y, uint8_t width_scale, uint8_t height_scale); + +/** + * Fixed Rotation with scaling fator for sprites + * + * @note A scale factor of 64 represents 100% scaling + * @warning This routine only accepts square input sprites + * @param sprite Input sprite to rotate/scale + * @param x X coordinate position + * @param x Y coordinate position + * @param angle 256 position angular integer + * @param scale Scaling factor; range is about 1% to 400% scale + * @returns The size of the sprite after scaling. This can be used for centering purposes. + */ +uint8_t gfx_RotatedScaledTransparentSprite_NoClip(gfx_sprite_t *sprite, uint24_t x, uint8_t y, uint8_t angle, uint8_t scale); + +/** + * Helper macro to only perform rotation using gfx_RotatedScaledTransparentSprite_NoClip + * + * @param sprite_in Input sprite to rotate + * @param sprite_out Pointer to where rotated sprite will be stored + * @param angle 256 position angular integer + * @see gfx_RotatedScaledTransparentSprite_NoClip + */ +#define gfx_RotatedTransparentSprite_NoClip(sprite, x, y, angle) gfx_RotatedScaledTransparentSprite_NoClip(sprite, x, y, angle, 64) + +/** + * Fixed Rotation with scaling fator for sprites without transparency + * + * @note A scale factor of 64 represents 100% scaling + * @warning This routine only accepts square input sprites + * @param sprite Input sprite to rotate/scale + * @param x X coordinate position + * @param x Y coordinate position + * @param angle 256 position angular integer + * @param scale Scaling factor; range is about 1% to 400% scale + * @returns The size of the sprite after scaling. This can be used for centering purposes. + */ +uint8_t gfx_RotatedScaledSprite_NoClip(gfx_sprite_t *sprite, uint24_t x, uint8_t y, uint8_t angle, uint8_t scale); + +/** + * Helper macro to only perform rotation using gfx_RotatedScaledSprite_NoClip + * + * @param sprite_in Input sprite to rotate + * @param sprite_out Pointer to where rotated sprite will be stored + * @param angle 256 position angular integer + * @see gfx_RotatedScaledTransparentSprite_NoClip + */ +#define gfx_RotatedSprite_NoClip(sprite, x, y, angle) gfx_RotatedScaledTransparentSprite_NoClip(sprite, x, y, angle, 64) + +/** + * Flips a sprite along the X axis + * + * @param sprite_in Input sprite to flip + * @param sprite_out Pointer to where flipped sprite will be stored + * @returns A pointer to sprite_out + * @note sprite_in and sprite_out cannot be the same + */ +gfx_sprite_t *gfx_FlipSpriteX(gfx_sprite_t *sprite_in, gfx_sprite_t *sprite_out); + +/** + * Flips a sprite along the Y axis + * + * @param sprite_in Input sprite to flip + * @param sprite_out Pointer to where flipped sprite will be stored + * @returns A pointer to sprite_out + * @note sprite_in and sprite_out cannot be the same + */ +gfx_sprite_t *gfx_FlipSpriteY(gfx_sprite_t *sprite_in, gfx_sprite_t *sprite_out); + +/** + * Rotates a sprite 90 degrees clockwise + * + * @param sprite_in Input sprite to rotate + * @param sprite_out Pointer to where rotated sprite will be stored + * @returns A pointer to sprite_out + * @note sprite_in and sprite_out cannot be the same + */ +gfx_sprite_t *gfx_RotateSpriteC(gfx_sprite_t *sprite_in, gfx_sprite_t *sprite_out); + +/** + * Rotates a sprite 90 degrees counter clockwise + * + * @param sprite_in Input sprite to rotate + * @param sprite_out Pointer to where rotated sprite will be stored + * @returns A pointer to sprite_out + * @note sprite_in and sprite_out cannot be the same + */ +gfx_sprite_t *gfx_RotateSpriteCC(gfx_sprite_t *sprite_in, gfx_sprite_t *sprite_out); + +/** + * Rotates a sprite 180 degrees + * + * @param sprite_in Input sprite to rotate + * @param sprite_out Pointer to where rotated sprite will be stored + * @returns A pointer to sprite_out + */ +gfx_sprite_t *gfx_RotateSpriteHalf(gfx_sprite_t *sprite_in, gfx_sprite_t *sprite_out); + +/** + * Resizes a sprite to new dimensions + * + * Place new image dimensions in sprite_out; i.e. sprite_out->width = 80; sprite_out->height = 20. + * @param sprite_in Input sprite to scale + * @param sprite_out Pointer to where scaled sprite will be stored + * @returns A pointer to \p sprite_out + */ +gfx_sprite_t *gfx_ScaleSprite(gfx_sprite_t *sprite_in, gfx_sprite_t *sprite_out); + +/** + * Fixed Rotation with scaling factor for sprites + * + * The output sprite is updated with the dimensions required for the implemented scaling factor. + * You must make sure that \p sprite_out has enough memory to store the needed output sprite. This can be + * found with the following formula: size = (max_scale / 64) * width * height + 2; + * + * @note A scale factor of 64 represents 100% scaling + * @warning This routine only accepts square input sprites + * @param sprite_in Input sprite to rotate/scale + * @param sprite_out Pointer to where rotated/scaled sprite will be stored + * @param angle 256 position angular integer + * @param scale Scaling factor; range is about 1% to 400% scale + * @returns A pointer to \p sprite_out + */ +gfx_sprite_t *gfx_RotateScaleSprite(gfx_sprite_t *sprite_in, gfx_sprite_t *sprite_out, uint8_t angle, uint8_t scale); + +/** + * Helper macro to only perform rotation using gfx_RotateScaleSprite + * + * @param sprite_in Input sprite to rotate + * @param sprite_out Pointer to where rotated sprite will be stored + * @param angle 256 position angular integer + * @returns A pointer to \p sprite_out + * @see gfx_RotateScaleSprite + */ +#define gfx_RotateSprite(sprite_in, sprite_out, angle) gfx_RotateScaleSprite(sprite_in, sprite_out, angle, 64) + +/** + * Creates a temporary character sprite + * + * This may be useful for performing rotations and other + * operations on characters. The sprite returned is always 8x8 pixels. + * @param c Character to generate + */ +gfx_sprite_t *gfx_GetSpriteChar(char c); + +/** + * Sets the font's character data + * + * Fonts can be created manually or and exported to a C-style format using 8x8 Pixel ROM Font Editor. + * (https://www.min.at/prinz/o/software/pixelfont/#download) + * + * @param data Pointer to formated 8x8 pixel font + * @returns Pointer to previous font data + * @note Format of font data is 8 bytes horizontally aligned. + */ +uint8_t *gfx_SetFontData(uint8_t *data); + +/** + * Sets the font data for a specific character + * + * @param index Character index to modify (if using default font, values range from 0-127, custom font can have indexes 0-255) + * @param data Pointer to formated 8x8 pixel font + * @returns Pointer to current character data if \p data is NULL, otherwise a pointer to next character data + * @note Format of font data is 8 bytes horizontally aligned. + * @see gfx_SetFontData + */ +uint8_t *gfx_SetCharData(uint8_t index, uint8_t *data); + +/** + * Sets the font spacing + * + * @param spacing Pointer to array of character spacing + */ +void gfx_SetFontSpacing(uint8_t *spacing); + +/** + * Sets the height in pixels of each character + * + * The default value is 8 pixels + * @param height New font height in pixels + * @returns Previous height of font in pixels + */ +uint8_t gfx_SetFontHeight(uint8_t height); + +/** + * Sets monospaced font + * + * @param spacing Distance between characters + * @note To disable monospaced font, set to 0 + */ +void gfx_SetMonospaceFont(uint8_t spacing); + +/** + * Gets the pixel width of the given string + * + * @param string Pointer to string + * @note Takes into account monospacing flag + */ +unsigned int gfx_GetStringWidth(const char *string); + +/** + * Gets the pixel width of the given character + * + * @param c Character to get width of + * @returns Width in pixels of character + * @note Takes into account monospacing flag + */ +unsigned int gfx_GetCharWidth(const char c); + +/** + * Sets the clipping window + * + * This window is used across all clipped routines + * @param xmin Minimum x coordinate + * @param ymin Minimum y coordinate + * @param xmax Maximum x coordinate + * @param ymax Maximum y coordinate + * @note This routine is exclusive + */ +void gfx_SetClipRegion(int xmin, int ymin, int xmax, int ymax); + +/** + * Clips a region to fit within the window + * + * @returns False if offscreen, true if onscreen + */ +bool gfx_GetClipRegion(gfx_region_t *region); + +/** + * Shifts the drawing window down + * + * @param pixels Number of pixels to shift + * @note Data left over is undefined (Must be drawn over) + */ +void gfx_ShiftDown(uint8_t pixels); + +/** + * Shifts the drawing window up + * + * @param pixels Number of pixels to shift + * @note Data left over is undefined (Must be drawn over) + */ +void gfx_ShiftUp(uint8_t pixels); + +/** + * Shifts the drawing window left + * + * @param pixels Number of pixels to shift + * @note Data left over is undefined (Must be drawn over) + */ +void gfx_ShiftLeft(uint24_t pixels); + +/** + * Shifts the drawing window right + * + * @param pixels Number of pixels to shift + * @note Data left over is undefined (Must be drawn over) + */ +void gfx_ShiftRight(uint24_t pixels); + +/** + * Lightens a given 1555 color; useful for palette color conversions. + * + * @param color Original color input in 1555 format + * @param amount Amount to lighten by + * @returns Lightened color + * @note 0 returns full white, 255 returns original color + */ +uint16_t gfx_Lighten(uint16_t color, uint8_t amount); + +/** + * Darkens a given 1555 color; useful for palette color conversions. + * + * @param color Original color input in 1555 format + * @param amount Amount to darken by + * @returns Darkened color + * @note 0 returns full black, 255 returns original color + */ +uint16_t gfx_Darken(uint16_t color, uint8_t amount); + +/** + * Fills an area with a color + * + * @param x X coordinate to begin filling at + * @param y Y coordinate to begin filling at + * @param color New color to fill with + * + * @note This routine performs clipping to stay within the window, but you must ensure it starts in the window. + */ +void gfx_FloodFill(unsigned int x, uint8_t y, uint8_t color); + +/** + * Draws a sprite with RLE transparency. + * + * @param sprite sprite to draw + * @param x x-coordinate + * @param y y-coordinate + */ +void gfx_RLETSprite(gfx_rletsprite_t *sprite, int x, int y); + +/** + * Draws an unclipped sprite with RLE transparency. + * + * @param sprite sprite to draw + * @param x x-coordinate + * @param y y-coordinate + */ +void gfx_RLETSprite_NoClip(gfx_rletsprite_t *sprite, uint24_t x, uint8_t y); + +/** + * Converts a sprite with RLE transpareny to a sprite with normal transparency. + * + * Width and height will be set in the converted sprite. + * + * The transparent color index in the converted sprite is controlled by + * gfx_SetTransparentColor(). + * + * @attention + * The output sprite must have been allocated with a large enough \c data field + * to hold the converted sprite data, which will be width * height + * bytes large. + * + * @param[in] sprite_in input sprite with RLE transparency + * @param[out] sprite_out converted sprite with normal transparency + * @returns the converted sprite + * @see gfx_ConvertMallocRLETSprite + * @see gfx_ConvertToRLETSprite + */ +gfx_sprite_t *gfx_ConvertFromRLETSprite(gfx_rletsprite_t *sprite_in, gfx_sprite_t *sprite_out); + +/** + * Converts a sprite with normal transpareny to a sprite with RLE transparency. + * + * Width and height will be set in the converted sprite. + * + * The transparent color index in the input sprite is controlled by + * gfx_SetTransparentColor(). + * + * @attention + * The output sprite must have been allocated with a large enough data field to + * hold the converted sprite data; see gfx_AllocRLETSprite() for information. + * + * @note + * To avoid needing to predict the output size and risking either the prediction + * being too high and wasting space, or being too low and corrupting memory, + * gfx_ConvertMallocRLETSprite() can be used instead to allocate the exact + * amount of necessary space for the converted sprite. + * + * @param[in] sprite_in input sprite with normal transparency + * @param[out] sprite_out converted sprite with RLE transparency + * @returns the converted sprite + * @see gfx_ConvertFromRLETSprite + */ +gfx_rletsprite_t *gfx_ConvertToRLETSprite(gfx_sprite_t *sprite_in, gfx_rletsprite_t *sprite_out); + +/** + * Converts a sprite with normal transpareny to a sprite with RLE transparency, + * allocating the exact amount of necessary space for the converted sprite. + * + * Allocates the memory with \p malloc_routine. Width and height will be set in + * the converted sprite. Returns \c NULL upon allocation failure. + * + * The transparent color index in the input sprite is controlled by + * gfx_SetTransparentColor(). + * + * @remarks + * If using \c malloc as the \p malloc_routine, gfx_ConvertMallocRLETSprite() + * can be used as a shortcut. + * + * @remarks + * A gfx_sprite_t can be converted into an appropriately large, + * already-allocated gfx_rletsprite_t using gfx_ConvertToRLETSprite(). + * + * @param sprite_in input sprite with normal transparency + * @param malloc_routine malloc implementation to use + * @returns a newly allocated converted sprite with RLE transparency + * @see gfx_ConvertFromRLETSprite + */ +gfx_rletsprite_t *gfx_ConvertToNewRLETSprite(gfx_sprite_t *sprite_in, void *(*malloc_routine)(size_t)); + +/** + * Converts a sprite with normal transpareny to a sprite with RLE transparency, + * allocating the exact amount of necessary space for the converted sprite using + * \c malloc. + * + * Width and height will be set in the converted sprite. Returns \c NULL upon + * allocation failure. + * + * The transparent color index in the input sprite is controlled by + * gfx_SetTransparentColor(). + * + * @remarks + * A gfx_sprite_t can be converted into an appropriately large, + * already-allocated gfx_rletsprite_t using gfx_ConvertToRLETSprite(). + * + * @param sprite_in input sprite with normal transparency + * @param malloc_routine malloc implementation to use + * @returns a newly allocated converted sprite with RLE transparency + * @see gfx_ConvertFromRLETSprite + */ +#define gfx_ConvertMallocRLETSprite(sprite_in) \ +gfx_ConvertToNewRLETSprite(sprite_in, malloc) + +/** + * Converts an RGB value to a palette color + * + * Conversion is not 100% perfect, but is quite close + */ +#define gfx_RGBTo1555(r,g,b) \ +((uint16_t)(((uint8_t)(r) >> 3) << 10) | \ +(((uint8_t)(g) >> 3) << 5) | \ +((uint8_t)(b) >> 3)) + +/** + * Checks if we are currently in a rectangular hotspot area + */ +#define gfx_CheckRectangleHotspot(master_x, master_y, master_width, master_height, test_x, test_y, test_width, test_height) \ +(((test_x) < ((master_x) + (master_width))) && \ +(((test_x) + (test_width)) > (master_x)) && \ +((test_y) < ((master_y) + (master_height))) && \ +(((test_y) + (test_height)) > (master_y))) + +/* Color definitions (try to avoid) */ +#define gfx_black 0x00 +#define gfx_red 0xE0 +#define gfx_orange 0xE3 +#define gfx_green 0x03 +#define gfx_blue 0x10 +#define gfx_purple 0x50 +#define gfx_yellow 0xE7 +#define gfx_pink 0xF0 +#define gfx_white 0xFF + +/* Compatability defines (don't use please) */ +typedef gfx_sprite_t gfx_image_t; +#define gfx_BlitArea gfx_BlitRectangle +void gfx_LZDecompress(uint8_t *in, uint8_t *out, unsigned int in_size); + +#define gfx_lcdWidth (320) +#define gfx_lcdHeight (240) + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/frontends/calculator/CEdev/include/intce.h b/frontends/calculator/CEdev/include/intce.h index 1184c29..dd27a31 100644 --- a/frontends/calculator/CEdev/include/intce.h +++ b/frontends/calculator/CEdev/include/intce.h @@ -1,93 +1,93 @@ -/** - * @file - * @authors Matt "MateoConLechuga" Waltz - * @authors Jacob "jacobly" Young - * @brief Interrupt configuring and setting - */ - -#ifndef INTCE_H -#define INTCE_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Enable global interrupts - */ -#define int_Enable() \ -asm("ei") - -/** - * @brief Diasble global interrupts - */ -#define int_Disable() \ -asm("di") - -/** - * @brief Blocking wait for an interrupt to trigger - */ -#define int_Wait() \ -asm("halt") - -#ifdef FORCE_INTERRUPTS -#warning TI has removed custom interrupt support on CE models with hardware revision >= I. Please check that this is acceptable. - -/** - * Initizalize to use custom interrupts - * @note Saves status of current interrupt state - * @warning TI has removed custom interrupt support on CE models with hardware revision >= I. - */ -void int_Initialize(void); - -/** - * Resets interrupts back to the OS expected values - * @warning Must have called int_Initialize before using - * @warning TI has removed custom interrupt support on CE models with hardware revision >= I. - */ -void int_Reset(void); - -/** - * Sets up an interrupt vector given an ISR - * @param ivect Interrupt vector to set - * @param handler Handler to interrupt service routine - * @warning TI has removed custom interrupt support on CE models with hardware revision >= I. - */ -void int_SetVector(uint8_t ivect, void (*handler)(void)); - -#endif - -#define ON_IVECT 0 /**< [on] key interrupt source */ -#define TIMER1_IVECT 1 /**< Timer 1 interrupt source */ -#define TIMER2_IVECT 2 /**< Timer 2 interrupt source */ -#define TIMER3_IVECT 3 /**< Timer 3 interrupt source */ -#define TIMEROS_IVECT 4 /**< Timer OS interrupt source */ -#define KEYBOARD_IVECT 10 /**< Keyboard interrupt source */ -#define LCD_IVECT 11 /**< LCD interrupt source */ -#define RTC_IVECT 12 /**< Real Time Clock interrupt source */ -#define USB_IVECT 13 /**< USB interrupt source */ - -#define INT_ON 1< + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Enable global interrupts + */ +#define int_Enable() \ +asm("ei") + +/** + * @brief Diasble global interrupts + */ +#define int_Disable() \ +asm("di") + +/** + * @brief Blocking wait for an interrupt to trigger + */ +#define int_Wait() \ +asm("halt") + +#ifdef FORCE_INTERRUPTS +#warning TI has removed custom interrupt support on CE models with hardware revision >= I. Please check that this is acceptable. + +/** + * Initizalize to use custom interrupts + * @note Saves status of current interrupt state + * @warning TI has removed custom interrupt support on CE models with hardware revision >= I. + */ +void int_Initialize(void); + +/** + * Resets interrupts back to the OS expected values + * @warning Must have called int_Initialize before using + * @warning TI has removed custom interrupt support on CE models with hardware revision >= I. + */ +void int_Reset(void); + +/** + * Sets up an interrupt vector given an ISR + * @param ivect Interrupt vector to set + * @param handler Handler to interrupt service routine + * @warning TI has removed custom interrupt support on CE models with hardware revision >= I. + */ +void int_SetVector(uint8_t ivect, void (*handler)(void)); + +#endif + +#define ON_IVECT 0 /**< [on] key interrupt source */ +#define TIMER1_IVECT 1 /**< Timer 1 interrupt source */ +#define TIMER2_IVECT 2 /**< Timer 2 interrupt source */ +#define TIMER3_IVECT 3 /**< Timer 3 interrupt source */ +#define TIMEROS_IVECT 4 /**< Timer OS interrupt source */ +#define KEYBOARD_IVECT 10 /**< Keyboard interrupt source */ +#define LCD_IVECT 11 /**< LCD interrupt source */ +#define RTC_IVECT 12 /**< Real Time Clock interrupt source */ +#define USB_IVECT 13 /**< USB interrupt source */ + +#define INT_ON 1< -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef uint8_t kb_key_t; ///< Normal key type -typedef uint16_t kb_lkey_t; ///< Long key type - -/** - * Scans the keyboard to update data values - * @note Disables interrupts - */ -void kb_Scan(void); - -/** - * Scans the given keyboard row and returns the row value - * @param row Row to scan - * @note Disables interrupts - */ -kb_key_t kb_ScanGroup(uint8_t row); - -/** - * Scans the keyboard quickly to tell if any key was pressed - * @note Disables interrupts - */ -uint8_t kb_AnyKey(void); - -/** - * Resets the keyboard - * @note Only use if you modify keyboard timers or number of rows - */ -void kb_Reset(void); - -/** - * @brief Sets the keypad scanning mode - * @see kb_scan_mode_t - */ -#define kb_SetMode(mode) \ -(kb_Config = ((kb_Config & ~3)|(mode))) - -/** - * @brief Gets the keypad scanning mode - * @see kb_scan_mode_t - */ -#define kb_GetMode() \ -(kb_Config & 3) - -/** - * Different available scanning modes - */ -typedef enum { - MODE_0_IDLE = 0, /**< Keypad scanning is idle */ - MODE_1_INDISCRIMINATE, /**< Indiscriminate key detection. Data registers are invalid, but whenever any key is pressed, interrupt KB_MODE_1_PRESS is set (and cannot be cleared until the key is released). */ - MODE_2_SINGLE, /**< Single scan. The keypad is scanned once, and then the mode returns to MODE_0_IDLE. */ - MODE_3_CONTINUOUS /**< Continuous scan. When scanning completes, it just starts over again after a delay. */ -} kb_scan_mode_t; - -#define kb_EnableInt \ -(*(uint8_t*)0xF5000C) /**< Enabled keypad interrupt signals */ -#define kb_IntAcknowledge \ -(*(volatile uint8_t*)0xF50008) /**< Acknowledege keypad interrupt signals */ -#define kb_IntStatus \ -(*(volatile uint8_t*)0xF50008) /**< Status of keypad interrupt signals */ -#define kb_Config \ -(*(uint8_t*)0xF50000) /**< Configuration of keypad controller */ - -/** - * Keypad Data registers - * - * | Offset | Bit 0 | Bit 1 | Bit 2 | Bit 3 | Bit 4 | Bit 5 | Bit 6 | Bit 7 | - * | -------| ---------- | ---------- | ---------- | ---------- | ---------- | ---------- | ---------- | ---------- | - * | 1 | kb_Graph | kb_Trace | kb_Zoom | kb_Window | kb_Yequ | kb_2nd | kb_Mode | kb_Del | - * | 2 | | kb_Sto | kb_Ln | kb_Log | kb_Square | kb_Recip | kb_Math | kb_Alpha | - * | 3 | kb_0 | kb_1 | kb_4 | kb_7 | kb_Comma | kb_Sin | kb_Apps | kb_GraphVar| - * | 4 | kb_DecPnt | kb_2 | kb_5 | kb_8 | kb_LParen | kb_Cos | kb_Prgm | kb_Stat | - * | 5 | kb_Chs | kb_3 | kb_6 | kb_9 | kb_RParen | kb_Tan | kb_Vars | | - * | 6 | kb_Enter | kb_Add | kb_Sub | kb_Mul | kb_Div | kb_Power | kb_Clear | | - * | 7 | kb_Down | kb_Left | kb_Right | kb_Up | | | | | - * - * These data registers can be indexed just like an array. For example, if you want to check the status of the '2nd' key: - * @code - * if (kb_Data[1] & kb_2nd) { - * ... - * } - * @endcode - */ -#define kb_Data \ -(uint8_t)((uint16_t*)0xF50010) - -/** - * Different available interrupt signals - */ -typedef enum { - KB_SCAN_COMPLETE = 1, /**< Interrupt set when keypad is done scanning */ - KB_DATA_CHANGED = 2, /**< Interrupt set when data is changed on a press or a release */ - KB_MODE_1_PRESS = 4 /**< Interrupt set when a key is pressed in MODE_1_INDISCRIMINATE */ -} kb_int_signal_t; - -/* Keyboard group 1 */ -#define kb_Graph 1<<0 -#define kb_Trace 1<<1 -#define kb_Zoom 1<<2 -#define kb_Window 1<<3 -#define kb_Yequ 1<<4 -#define kb_2nd 1<<5 -#define kb_Mode 1<<6 -#define kb_Del 1<<7 - -/* Keyboard group 2 */ -#define kb_Sto 1<<1 -#define kb_Ln 1<<2 -#define kb_Log 1<<3 -#define kb_Square 1<<4 -#define kb_Recip 1<<5 -#define kb_Math 1<<6 -#define kb_Alpha 1<<7 - -/* Keyboard group 3 */ -#define kb_0 1<<0 -#define kb_1 1<<1 -#define kb_4 1<<2 -#define kb_7 1<<3 -#define kb_Comma 1<<4 -#define kb_Sin 1<<5 -#define kb_Apps 1<<6 -#define kb_GraphVar 1<<7 - -/* Keyboard group 4 */ -#define kb_DecPnt 1<<0 -#define kb_2 1<<1 -#define kb_5 1<<2 -#define kb_8 1<<3 -#define kb_LParen 1<<4 -#define kb_Cos 1<<5 -#define kb_Prgm 1<<6 -#define kb_Stat 1<<7 - -/* Keyboard group 5 */ -#define kb_Chs 1<<0 -#define kb_3 1<<1 -#define kb_6 1<<2 -#define kb_9 1<<3 -#define kb_RParen 1<<4 -#define kb_Tan 1<<5 -#define kb_Vars 1<<6 - -/* Keyboard group 6 */ -#define kb_Enter 1<<0 -#define kb_Add 1<<1 -#define kb_Sub 1<<2 -#define kb_Mul 1<<3 -#define kb_Div 1<<4 -#define kb_Power 1<<5 -#define kb_Clear 1<<6 - -/* Keyboard group 7 */ -#define kb_Down 1<<0 -#define kb_Left 1<<1 -#define kb_Right 1<<2 -#define kb_Up 1<<3 - -/* Keyboard group 1 */ -#define kb_KeyGraph (kb_lkey_t)(1 << 8 | 1<<0) -#define kb_KeyTrace (kb_lkey_t)(1 << 8 | 1<<1) -#define kb_KeyZoom (kb_lkey_t)(1 << 8 | 1<<2) -#define kb_KeyWindow (kb_lkey_t)(1 << 8 | 1<<3) -#define kb_KeyYequ (kb_lkey_t)(1 << 8 | 1<<4) -#define kb_Key2nd (kb_lkey_t)(1 << 8 | 1<<5) -#define kb_KeyMode (kb_lkey_t)(1 << 8 | 1<<6) -#define kb_KeyDel (kb_lkey_t)(1 << 8 | 1<<7) - -/* Keyboard group 2 */ -#define kb_KeyStore (kb_lkey_t)(2 << 8 | 1<<1) -#define kb_KeyLn (kb_lkey_t)(2 << 8 | 1<<2) -#define kb_KeyLog (kb_lkey_t)(2 << 8 | 1<<3) -#define kb_KeySquare (kb_lkey_t)(2 << 8 | 1<<4) -#define kb_KeyRecip (kb_lkey_t)(2 << 8 | 1<<5) -#define kb_KeyMath (kb_lkey_t)(2 << 8 | 1<<6) -#define kb_KeyAlpha (kb_lkey_t)(2 << 8 | 1<<7) - -/* Keyboard group 3 */ -#define kb_Key0 (kb_lkey_t)(3 << 8 | 1<<0) -#define kb_Key1 (kb_lkey_t)(3 << 8 | 1<<1) -#define kb_Key4 (kb_lkey_t)(3 << 8 | 1<<2) -#define kb_Key7 (kb_lkey_t)(3 << 8 | 1<<3) -#define kb_KeyComma (kb_lkey_t)(3 << 8 | 1<<4) -#define kb_KeySin (kb_lkey_t)(3 << 8 | 1<<5) -#define kb_KeyApps (kb_lkey_t)(3 << 8 | 1<<6) -#define kb_KeyGraphVar (kb_lkey_t)(3 << 8 | 1<<7) - -/* Keyboard group 4 */ -#define kb_KeyDecPnt (kb_lkey_t)(4 << 8 | 1<<0) -#define kb_Key2 (kb_lkey_t)(4 << 8 | 1<<1) -#define kb_Key5 (kb_lkey_t)(4 << 8 | 1<<2) -#define kb_Key8 (kb_lkey_t)(4 << 8 | 1<<3) -#define kb_KeyLParen (kb_lkey_t)(4 << 8 | 1<<4) -#define kb_KeyCos (kb_lkey_t)(4 << 8 | 1<<5) -#define kb_KeyPrgm (kb_lkey_t)(4 << 8 | 1<<6) -#define kb_KeyStat (kb_lkey_t)(4 << 8 | 1<<7) - -/* Keyboard group 5 */ -#define kb_KeyChs (kb_lkey_t)(5 << 8 | 1<<0) -#define kb_Key3 (kb_lkey_t)(5 << 8 | 1<<1) -#define kb_Key6 (kb_lkey_t)(5 << 8 | 1<<2) -#define kb_Key9 (kb_lkey_t)(5 << 8 | 1<<3) -#define kb_KeyRParen (kb_lkey_t)(5 << 8 | 1<<4) -#define kb_KeyTan (kb_lkey_t)(5 << 8 | 1<<5) -#define kb_KeyVars (kb_lkey_t)(5 << 8 | 1<<6) - -/* Keyboard group 6 */ -#define kb_KeyEnter (kb_lkey_t)(6 << 8 | 1<<0) -#define kb_KeyAdd (kb_lkey_t)(6 << 8 | 1<<1) -#define kb_KeySub (kb_lkey_t)(6 << 8 | 1<<2) -#define kb_KeyMul (kb_lkey_t)(6 << 8 | 1<<3) -#define kb_KeyDiv (kb_lkey_t)(6 << 8 | 1<<4) -#define kb_KeyPower (kb_lkey_t)(6 << 8 | 1<<5) -#define kb_KeyClear (kb_lkey_t)(6 << 8 | 1<<6) - -/* Keyboard group 7 */ -#define kb_KeyDown (kb_lkey_t)(7 << 8 | 1<<0) -#define kb_KeyLeft (kb_lkey_t)(7 << 8 | 1<<1) -#define kb_KeyRight (kb_lkey_t)(7 << 8 | 1<<2) -#define kb_KeyUp (kb_lkey_t)(7 << 8 | 1<<3) - -/* Compatibility defines */ -#define kb_DataArray ((uint16_t*)0xF50010) -#define kb_dataArray ((uint16_t*)0xF50010) -#define kb_Store 1<<1 -#define kb_KeyPgrm kb_KeyPrgm -#define kb_group_0 0 -#define kb_group_1 1 -#define kb_group_2 2 -#define kb_group_3 3 -#define kb_group_4 4 -#define kb_group_5 5 -#define kb_group_6 6 -#define kb_group_7 7 - -#ifdef __cplusplus -} -#endif - -#endif +/** + * @file + * @authors Matt "MateoConLechuga" Waltz + * @authors Shaun "Methsoft" McFall + * @brief Simple direct input keypad library + */ + +#ifndef H_KEYPADC +#define H_KEYPADC + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef uint8_t kb_key_t; ///< Normal key type +typedef uint16_t kb_lkey_t; ///< Long key type + +/** + * Scans the keyboard to update data values + * @note Disables interrupts + */ +void kb_Scan(void); + +/** + * Scans the given keyboard row and returns the row value + * @param row Row to scan + * @note Disables interrupts + */ +kb_key_t kb_ScanGroup(uint8_t row); + +/** + * Scans the keyboard quickly to tell if any key was pressed + * @note Disables interrupts + */ +uint8_t kb_AnyKey(void); + +/** + * Resets the keyboard + * @note Only use if you modify keyboard timers or number of rows + */ +void kb_Reset(void); + +/** + * @brief Sets the keypad scanning mode + * @see kb_scan_mode_t + */ +#define kb_SetMode(mode) \ +(kb_Config = ((kb_Config & ~3)|(mode))) + +/** + * @brief Gets the keypad scanning mode + * @see kb_scan_mode_t + */ +#define kb_GetMode() \ +(kb_Config & 3) + +/** + * Different available scanning modes + */ +typedef enum { + MODE_0_IDLE = 0, /**< Keypad scanning is idle */ + MODE_1_INDISCRIMINATE, /**< Indiscriminate key detection. Data registers are invalid, but whenever any key is pressed, interrupt KB_MODE_1_PRESS is set (and cannot be cleared until the key is released). */ + MODE_2_SINGLE, /**< Single scan. The keypad is scanned once, and then the mode returns to MODE_0_IDLE. */ + MODE_3_CONTINUOUS /**< Continuous scan. When scanning completes, it just starts over again after a delay. */ +} kb_scan_mode_t; + +#define kb_EnableInt \ +(*(uint8_t*)0xF5000C) /**< Enabled keypad interrupt signals */ +#define kb_IntAcknowledge \ +(*(volatile uint8_t*)0xF50008) /**< Acknowledege keypad interrupt signals */ +#define kb_IntStatus \ +(*(volatile uint8_t*)0xF50008) /**< Status of keypad interrupt signals */ +#define kb_Config \ +(*(uint8_t*)0xF50000) /**< Configuration of keypad controller */ + +/** + * Keypad Data registers + * + * | Offset | Bit 0 | Bit 1 | Bit 2 | Bit 3 | Bit 4 | Bit 5 | Bit 6 | Bit 7 | + * | -------| ---------- | ---------- | ---------- | ---------- | ---------- | ---------- | ---------- | ---------- | + * | 1 | kb_Graph | kb_Trace | kb_Zoom | kb_Window | kb_Yequ | kb_2nd | kb_Mode | kb_Del | + * | 2 | | kb_Sto | kb_Ln | kb_Log | kb_Square | kb_Recip | kb_Math | kb_Alpha | + * | 3 | kb_0 | kb_1 | kb_4 | kb_7 | kb_Comma | kb_Sin | kb_Apps | kb_GraphVar| + * | 4 | kb_DecPnt | kb_2 | kb_5 | kb_8 | kb_LParen | kb_Cos | kb_Prgm | kb_Stat | + * | 5 | kb_Chs | kb_3 | kb_6 | kb_9 | kb_RParen | kb_Tan | kb_Vars | | + * | 6 | kb_Enter | kb_Add | kb_Sub | kb_Mul | kb_Div | kb_Power | kb_Clear | | + * | 7 | kb_Down | kb_Left | kb_Right | kb_Up | | | | | + * + * These data registers can be indexed just like an array. For example, if you want to check the status of the '2nd' key: + * @code + * if (kb_Data[1] & kb_2nd) { + * ... + * } + * @endcode + */ +#define kb_Data \ +(uint8_t)((uint16_t*)0xF50010) + +/** + * Different available interrupt signals + */ +typedef enum { + KB_SCAN_COMPLETE = 1, /**< Interrupt set when keypad is done scanning */ + KB_DATA_CHANGED = 2, /**< Interrupt set when data is changed on a press or a release */ + KB_MODE_1_PRESS = 4 /**< Interrupt set when a key is pressed in MODE_1_INDISCRIMINATE */ +} kb_int_signal_t; + +/* Keyboard group 1 */ +#define kb_Graph 1<<0 +#define kb_Trace 1<<1 +#define kb_Zoom 1<<2 +#define kb_Window 1<<3 +#define kb_Yequ 1<<4 +#define kb_2nd 1<<5 +#define kb_Mode 1<<6 +#define kb_Del 1<<7 + +/* Keyboard group 2 */ +#define kb_Sto 1<<1 +#define kb_Ln 1<<2 +#define kb_Log 1<<3 +#define kb_Square 1<<4 +#define kb_Recip 1<<5 +#define kb_Math 1<<6 +#define kb_Alpha 1<<7 + +/* Keyboard group 3 */ +#define kb_0 1<<0 +#define kb_1 1<<1 +#define kb_4 1<<2 +#define kb_7 1<<3 +#define kb_Comma 1<<4 +#define kb_Sin 1<<5 +#define kb_Apps 1<<6 +#define kb_GraphVar 1<<7 + +/* Keyboard group 4 */ +#define kb_DecPnt 1<<0 +#define kb_2 1<<1 +#define kb_5 1<<2 +#define kb_8 1<<3 +#define kb_LParen 1<<4 +#define kb_Cos 1<<5 +#define kb_Prgm 1<<6 +#define kb_Stat 1<<7 + +/* Keyboard group 5 */ +#define kb_Chs 1<<0 +#define kb_3 1<<1 +#define kb_6 1<<2 +#define kb_9 1<<3 +#define kb_RParen 1<<4 +#define kb_Tan 1<<5 +#define kb_Vars 1<<6 + +/* Keyboard group 6 */ +#define kb_Enter 1<<0 +#define kb_Add 1<<1 +#define kb_Sub 1<<2 +#define kb_Mul 1<<3 +#define kb_Div 1<<4 +#define kb_Power 1<<5 +#define kb_Clear 1<<6 + +/* Keyboard group 7 */ +#define kb_Down 1<<0 +#define kb_Left 1<<1 +#define kb_Right 1<<2 +#define kb_Up 1<<3 + +/* Keyboard group 1 */ +#define kb_KeyGraph (kb_lkey_t)(1 << 8 | 1<<0) +#define kb_KeyTrace (kb_lkey_t)(1 << 8 | 1<<1) +#define kb_KeyZoom (kb_lkey_t)(1 << 8 | 1<<2) +#define kb_KeyWindow (kb_lkey_t)(1 << 8 | 1<<3) +#define kb_KeyYequ (kb_lkey_t)(1 << 8 | 1<<4) +#define kb_Key2nd (kb_lkey_t)(1 << 8 | 1<<5) +#define kb_KeyMode (kb_lkey_t)(1 << 8 | 1<<6) +#define kb_KeyDel (kb_lkey_t)(1 << 8 | 1<<7) + +/* Keyboard group 2 */ +#define kb_KeyStore (kb_lkey_t)(2 << 8 | 1<<1) +#define kb_KeyLn (kb_lkey_t)(2 << 8 | 1<<2) +#define kb_KeyLog (kb_lkey_t)(2 << 8 | 1<<3) +#define kb_KeySquare (kb_lkey_t)(2 << 8 | 1<<4) +#define kb_KeyRecip (kb_lkey_t)(2 << 8 | 1<<5) +#define kb_KeyMath (kb_lkey_t)(2 << 8 | 1<<6) +#define kb_KeyAlpha (kb_lkey_t)(2 << 8 | 1<<7) + +/* Keyboard group 3 */ +#define kb_Key0 (kb_lkey_t)(3 << 8 | 1<<0) +#define kb_Key1 (kb_lkey_t)(3 << 8 | 1<<1) +#define kb_Key4 (kb_lkey_t)(3 << 8 | 1<<2) +#define kb_Key7 (kb_lkey_t)(3 << 8 | 1<<3) +#define kb_KeyComma (kb_lkey_t)(3 << 8 | 1<<4) +#define kb_KeySin (kb_lkey_t)(3 << 8 | 1<<5) +#define kb_KeyApps (kb_lkey_t)(3 << 8 | 1<<6) +#define kb_KeyGraphVar (kb_lkey_t)(3 << 8 | 1<<7) + +/* Keyboard group 4 */ +#define kb_KeyDecPnt (kb_lkey_t)(4 << 8 | 1<<0) +#define kb_Key2 (kb_lkey_t)(4 << 8 | 1<<1) +#define kb_Key5 (kb_lkey_t)(4 << 8 | 1<<2) +#define kb_Key8 (kb_lkey_t)(4 << 8 | 1<<3) +#define kb_KeyLParen (kb_lkey_t)(4 << 8 | 1<<4) +#define kb_KeyCos (kb_lkey_t)(4 << 8 | 1<<5) +#define kb_KeyPrgm (kb_lkey_t)(4 << 8 | 1<<6) +#define kb_KeyStat (kb_lkey_t)(4 << 8 | 1<<7) + +/* Keyboard group 5 */ +#define kb_KeyChs (kb_lkey_t)(5 << 8 | 1<<0) +#define kb_Key3 (kb_lkey_t)(5 << 8 | 1<<1) +#define kb_Key6 (kb_lkey_t)(5 << 8 | 1<<2) +#define kb_Key9 (kb_lkey_t)(5 << 8 | 1<<3) +#define kb_KeyRParen (kb_lkey_t)(5 << 8 | 1<<4) +#define kb_KeyTan (kb_lkey_t)(5 << 8 | 1<<5) +#define kb_KeyVars (kb_lkey_t)(5 << 8 | 1<<6) + +/* Keyboard group 6 */ +#define kb_KeyEnter (kb_lkey_t)(6 << 8 | 1<<0) +#define kb_KeyAdd (kb_lkey_t)(6 << 8 | 1<<1) +#define kb_KeySub (kb_lkey_t)(6 << 8 | 1<<2) +#define kb_KeyMul (kb_lkey_t)(6 << 8 | 1<<3) +#define kb_KeyDiv (kb_lkey_t)(6 << 8 | 1<<4) +#define kb_KeyPower (kb_lkey_t)(6 << 8 | 1<<5) +#define kb_KeyClear (kb_lkey_t)(6 << 8 | 1<<6) + +/* Keyboard group 7 */ +#define kb_KeyDown (kb_lkey_t)(7 << 8 | 1<<0) +#define kb_KeyLeft (kb_lkey_t)(7 << 8 | 1<<1) +#define kb_KeyRight (kb_lkey_t)(7 << 8 | 1<<2) +#define kb_KeyUp (kb_lkey_t)(7 << 8 | 1<<3) + +/* Compatibility defines */ +#define kb_DataArray ((uint16_t*)0xF50010) +#define kb_dataArray ((uint16_t*)0xF50010) +#define kb_Store 1<<1 +#define kb_KeyPgrm kb_KeyPrgm +#define kb_group_0 0 +#define kb_group_1 1 +#define kb_group_2 2 +#define kb_group_3 3 +#define kb_group_4 4 +#define kb_group_5 5 +#define kb_group_6 6 +#define kb_group_7 7 + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/frontends/calculator/CEdev/include/lib/ce/fileioc.h b/frontends/calculator/CEdev/include/lib/ce/fileioc.h index 8bb6ee4..b29714c 100644 --- a/frontends/calculator/CEdev/include/lib/ce/fileioc.h +++ b/frontends/calculator/CEdev/include/lib/ce/fileioc.h @@ -1,2 +1,2 @@ -#warning You are using a deprecated lib include path. Simply use #include instead -#include +#warning You are using a deprecated lib include path. Simply use #include instead +#include diff --git a/frontends/calculator/CEdev/include/lib/ce/graphx.h b/frontends/calculator/CEdev/include/lib/ce/graphx.h index 9a1343c..45534b0 100644 --- a/frontends/calculator/CEdev/include/lib/ce/graphx.h +++ b/frontends/calculator/CEdev/include/lib/ce/graphx.h @@ -1,2 +1,2 @@ -#warning You are using a deprecated lib include path. Simply use #include instead -#include +#warning You are using a deprecated lib include path. Simply use #include instead +#include diff --git a/frontends/calculator/CEdev/include/lib/ce/keypadc.h b/frontends/calculator/CEdev/include/lib/ce/keypadc.h index 7c2fd66..b17fd8e 100644 --- a/frontends/calculator/CEdev/include/lib/ce/keypadc.h +++ b/frontends/calculator/CEdev/include/lib/ce/keypadc.h @@ -1,2 +1,2 @@ -#warning You are using a deprecated lib include path. Simply use #include instead -#include +#warning You are using a deprecated lib include path. Simply use #include instead +#include diff --git a/frontends/calculator/CEdev/include/limits.h b/frontends/calculator/CEdev/include/limits.h index 2dbdab8..8d4a333 100644 --- a/frontends/calculator/CEdev/include/limits.h +++ b/frontends/calculator/CEdev/include/limits.h @@ -1,35 +1,35 @@ -/* - * Copyright (C) 1999-2008 by Zilog, Inc. - * All Rights Reserved - * Modified by Matt "MateoConLechuga" Waltz for TI84+CE platform - */ -#ifndef LIMITS_H -#define LIMITS_H - -#define CHAR_BIT 8 /* number of bits in byte */ -#define SCHAR_MAX 127 /* max value for signed char */ -#define SCHAR_MIN (-127-1) /* min value for signed char */ -#define UCHAR_MAX 0xFF /* max value for unsigned char */ -#ifdef __UNSIGNED_CHARS__ -#define CHAR_MAX UCHAR_MAX /* max value for char */ -#define CHAR_MIN 0 /* Min value for char */ -#else -#define CHAR_MAX SCHAR_MAX /* max value for char */ -#define CHAR_MIN SCHAR_MIN /* Min value for char */ -#endif - -#define SHRT_MAX 32767 /* max value for short int */ -#define SHRT_MIN (-32767-1) /* min value for short int */ -#define USHRT_MAX 0xFFFF /* max value for unsigned short */ - -#define INT_MAX 8388607 /* max value for int */ -#define INT_MIN (-8388607 - 1) /* min value for int */ -#define UINT_MAX 0xFFFFFF /* max value for unsigned int */ - -#define LONG_MAX 2147483647L /* max value for long int */ -#define LONG_MIN (-2147483647L - 1) /* min value for long int */ -#define ULONG_MAX 0xFFFFFFFFUL /* max value for unsigned long */ - -#define MB_LEN_MAX 1 /* max multibyte char length */ - -#endif +/* + * Copyright (C) 1999-2008 by Zilog, Inc. + * All Rights Reserved + * Modified by Matt "MateoConLechuga" Waltz for TI84+CE platform + */ +#ifndef LIMITS_H +#define LIMITS_H + +#define CHAR_BIT 8 /* number of bits in byte */ +#define SCHAR_MAX 127 /* max value for signed char */ +#define SCHAR_MIN (-127-1) /* min value for signed char */ +#define UCHAR_MAX 0xFF /* max value for unsigned char */ +#ifdef __UNSIGNED_CHARS__ +#define CHAR_MAX UCHAR_MAX /* max value for char */ +#define CHAR_MIN 0 /* Min value for char */ +#else +#define CHAR_MAX SCHAR_MAX /* max value for char */ +#define CHAR_MIN SCHAR_MIN /* Min value for char */ +#endif + +#define SHRT_MAX 32767 /* max value for short int */ +#define SHRT_MIN (-32767-1) /* min value for short int */ +#define USHRT_MAX 0xFFFF /* max value for unsigned short */ + +#define INT_MAX 8388607 /* max value for int */ +#define INT_MIN (-8388607 - 1) /* min value for int */ +#define UINT_MAX 0xFFFFFF /* max value for unsigned int */ + +#define LONG_MAX 2147483647L /* max value for long int */ +#define LONG_MIN (-2147483647L - 1) /* min value for long int */ +#define ULONG_MAX 0xFFFFFFFFUL /* max value for unsigned long */ + +#define MB_LEN_MAX 1 /* max multibyte char length */ + +#endif diff --git a/frontends/calculator/CEdev/include/math.h b/frontends/calculator/CEdev/include/math.h index 3225311..1360e45 100644 --- a/frontends/calculator/CEdev/include/math.h +++ b/frontends/calculator/CEdev/include/math.h @@ -1,67 +1,67 @@ -/* - * Copyright (C) 1999-2008 by Zilog, Inc. - * All Rights Reserved - * Modified by Matt "MateoConLechuga" Waltz for TI84+CE platform - */ -#ifndef MATH_H -#define MATH_H - -#ifdef __cplusplus -extern "C" { -#endif - -extern double _huge_val; -#define HUGE_VAL _huge_val /* overflow error */ - -#define M_E 2.71828182845904523536 /* e */ -#define M_LOG2E 1.44269504088896340736 /* log2(e) */ -#define M_LOG10E 0.434294481903251827651 /* log10(e) */ -#define M_LN2 0.693147180559945309417 /* ln(2) */ -#define M_LN10 2.30258509299404568402 /* ln(10) */ -#define M_PI 3.14159265358979323846 /* pi */ -#define M_PI_2 1.57079632679489661923 /* pi/2 */ -#define M_PI_4 0.785398163397448309616 /* pi/4 */ -#define M_1_PI 0.318309886183790671538 /* 1/pi */ -#define M_2_PI 0.636619772367581343076 /* 2/pi */ -#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */ -#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */ -#define M_SQRT1_2 0.707106781186547524401 /* 1/sqrt(2) */ -#define M_LOG_2M_PI 1.83787706640934548 /* log2(M_PI) */ - -double acos(double x); -double asin(double x); -double atan(double x); -double atan2(double y,double x); -double cos(double x); -double sin(double x); -double tan(double x); -double cosh(double x); -double sinh(double x); -double tanh(double x); -double exp(double x); -double ldexp(double x, int exp); -double log(double x); -double log10(double x); -double pow(double x,double y); -double sqrt(double x); -double ceil(double x); -double floor(double x); -double fabs(double x); -double fmod(double x, double y); -double round(double x); - -double frexp(double value, int *exp); -double modf(double value, double *iptr); - -int isinf(double n); -int isnan(double n); -int finite(double n); - -double tgamma(double x); -double log2(double x); - -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright (C) 1999-2008 by Zilog, Inc. + * All Rights Reserved + * Modified by Matt "MateoConLechuga" Waltz for TI84+CE platform + */ +#ifndef MATH_H +#define MATH_H + +#ifdef __cplusplus +extern "C" { +#endif + +extern double _huge_val; +#define HUGE_VAL _huge_val /* overflow error */ + +#define M_E 2.71828182845904523536 /* e */ +#define M_LOG2E 1.44269504088896340736 /* log2(e) */ +#define M_LOG10E 0.434294481903251827651 /* log10(e) */ +#define M_LN2 0.693147180559945309417 /* ln(2) */ +#define M_LN10 2.30258509299404568402 /* ln(10) */ +#define M_PI 3.14159265358979323846 /* pi */ +#define M_PI_2 1.57079632679489661923 /* pi/2 */ +#define M_PI_4 0.785398163397448309616 /* pi/4 */ +#define M_1_PI 0.318309886183790671538 /* 1/pi */ +#define M_2_PI 0.636619772367581343076 /* 2/pi */ +#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */ +#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */ +#define M_SQRT1_2 0.707106781186547524401 /* 1/sqrt(2) */ +#define M_LOG_2M_PI 1.83787706640934548 /* log2(M_PI) */ + +double acos(double x); +double asin(double x); +double atan(double x); +double atan2(double y,double x); +double cos(double x); +double sin(double x); +double tan(double x); +double cosh(double x); +double sinh(double x); +double tanh(double x); +double exp(double x); +double ldexp(double x, int exp); +double log(double x); +double log10(double x); +double pow(double x,double y); +double sqrt(double x); +double ceil(double x); +double floor(double x); +double fabs(double x); +double fmod(double x, double y); +double round(double x); + +double frexp(double value, int *exp); +double modf(double value, double *iptr); + +int isinf(double n); +int isnan(double n); +int finite(double n); + +double tgamma(double x); +double log2(double x); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/frontends/calculator/CEdev/include/setjmp.h b/frontends/calculator/CEdev/include/setjmp.h index 3858118..e8376c5 100644 --- a/frontends/calculator/CEdev/include/setjmp.h +++ b/frontends/calculator/CEdev/include/setjmp.h @@ -1,21 +1,21 @@ -/* - * Copyright (C) 1999-2008 by Zilog, Inc. - * All Rights Reserved - */ -#ifndef __SETJMP_H -#define __SETJMP_H - -#ifdef __cplusplus -extern "C" { -#endif - -typedef unsigned char jmp_buf[12]; - -int setjmp(jmp_buf env); -void longjmp(jmp_buf env, int val); - -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright (C) 1999-2008 by Zilog, Inc. + * All Rights Reserved + */ +#ifndef __SETJMP_H +#define __SETJMP_H + +#ifdef __cplusplus +extern "C" { +#endif + +typedef unsigned char jmp_buf[12]; + +int setjmp(jmp_buf env); +void longjmp(jmp_buf env, int val); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/frontends/calculator/CEdev/include/stdarg.h b/frontends/calculator/CEdev/include/stdarg.h index 2938417..b794bdb 100644 --- a/frontends/calculator/CEdev/include/stdarg.h +++ b/frontends/calculator/CEdev/include/stdarg.h @@ -1,15 +1,15 @@ -/* - * Copyright (C) 1999-2008 by Zilog, Inc. - * All Rights Reserved - */ -#ifndef STDARG_H -#define STDARG_H - -typedef char * va_list; -#define _INTSIZEOF(n) (sizeof(n) + sizeof(int)-1-((sizeof(n)-1)%sizeof(int))) - -#define va_start(ap, parm) (ap = (char *)&parm + _INTSIZEOF(parm)) -#define va_arg(ap,type) (*(type *)((ap += _INTSIZEOF(type)) - _INTSIZEOF(type))) -#define va_end(ap) - -#endif +/* + * Copyright (C) 1999-2008 by Zilog, Inc. + * All Rights Reserved + */ +#ifndef STDARG_H +#define STDARG_H + +typedef char * va_list; +#define _INTSIZEOF(n) (sizeof(n) + sizeof(int)-1-((sizeof(n)-1)%sizeof(int))) + +#define va_start(ap, parm) (ap = (char *)&parm + _INTSIZEOF(parm)) +#define va_arg(ap,type) (*(type *)((ap += _INTSIZEOF(type)) - _INTSIZEOF(type))) +#define va_end(ap) + +#endif diff --git a/frontends/calculator/CEdev/include/stdbool.h b/frontends/calculator/CEdev/include/stdbool.h index 0681e78..c6c20fd 100644 --- a/frontends/calculator/CEdev/include/stdbool.h +++ b/frontends/calculator/CEdev/include/stdbool.h @@ -1,23 +1,23 @@ -/* - * Copyright (C) 1999-2008 by Zilog, Inc. - * All Rights Reserved - * Modified by Matt "MateoConLechuga" Waltz for TI84+CE platform - */ -#ifndef STDBOOL_H -#define STDBOOL_H - -#ifndef __bool_true_false_are_defined -#define __bool_true_false_are_defined - -#ifndef __cplusplus - -typedef unsigned char bool; - -#define _Bool bool -#define false 0 -#define true 1 - -#endif - -#endif -#endif +/* + * Copyright (C) 1999-2008 by Zilog, Inc. + * All Rights Reserved + * Modified by Matt "MateoConLechuga" Waltz for TI84+CE platform + */ +#ifndef STDBOOL_H +#define STDBOOL_H + +#ifndef __bool_true_false_are_defined +#define __bool_true_false_are_defined + +#ifndef __cplusplus + +typedef unsigned char bool; + +#define _Bool bool +#define false 0 +#define true 1 + +#endif + +#endif +#endif diff --git a/frontends/calculator/CEdev/include/stddef.h b/frontends/calculator/CEdev/include/stddef.h index 1f277b7..e436fcb 100644 --- a/frontends/calculator/CEdev/include/stddef.h +++ b/frontends/calculator/CEdev/include/stddef.h @@ -1,28 +1,28 @@ -/* - * Copyright (C) 1999-2008 by Zilog, Inc. - * All Rights Reserved - * Modified by Matt "MateoConLechuga" Waltz for TI84+CE platform - */ -#ifndef STDDEF_H -#define STDDEF_H - -#ifndef SIZE_T_DEFINED -#define SIZE_T_DEFINED -typedef unsigned int size_t; -#endif - -#ifndef NULL -#define NULL ((void *)0) -#endif -#define offsetof(type,member) ((size_t) &((type*)0)->member) - -typedef int ptrdiff_t; - -#ifndef __cplusplus -#ifndef WCHAR_T_DEFINED -#define WCHAR_T_DEFINED -typedef unsigned short wchar_t; -#endif -#endif - -#endif +/* + * Copyright (C) 1999-2008 by Zilog, Inc. + * All Rights Reserved + * Modified by Matt "MateoConLechuga" Waltz for TI84+CE platform + */ +#ifndef STDDEF_H +#define STDDEF_H + +#ifndef SIZE_T_DEFINED +#define SIZE_T_DEFINED +typedef unsigned int size_t; +#endif + +#ifndef NULL +#define NULL ((void *)0) +#endif +#define offsetof(type,member) ((size_t) &((type*)0)->member) + +typedef int ptrdiff_t; + +#ifndef __cplusplus +#ifndef WCHAR_T_DEFINED +#define WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#endif +#endif + +#endif diff --git a/frontends/calculator/CEdev/include/stdint.h b/frontends/calculator/CEdev/include/stdint.h index 5e48f60..c1fbe17 100644 --- a/frontends/calculator/CEdev/include/stdint.h +++ b/frontends/calculator/CEdev/include/stdint.h @@ -1,19 +1,19 @@ -#ifndef __STDINT_H -#define __STDINT_H - -typedef signed char int8_t; -typedef unsigned char uint8_t; - -typedef signed short int16_t; -typedef unsigned short uint16_t; - -typedef signed int int24_t; -typedef unsigned int uint24_t; - -typedef signed long int32_t; -typedef unsigned long uint32_t; - -typedef int24_t intptr_t; -typedef uint24_t uintptr_t; - -#endif +#ifndef __STDINT_H +#define __STDINT_H + +typedef signed char int8_t; +typedef unsigned char uint8_t; + +typedef signed short int16_t; +typedef unsigned short uint16_t; + +typedef signed int int24_t; +typedef unsigned int uint24_t; + +typedef signed long int32_t; +typedef unsigned long uint32_t; + +typedef int24_t intptr_t; +typedef uint24_t uintptr_t; + +#endif diff --git a/frontends/calculator/CEdev/include/stdio.h b/frontends/calculator/CEdev/include/stdio.h index 27de9cc..1d35443 100644 --- a/frontends/calculator/CEdev/include/stdio.h +++ b/frontends/calculator/CEdev/include/stdio.h @@ -1,66 +1,66 @@ -#ifndef STDIO_H -#define STDIO_H - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define FILENAME_MAX 9 -#define SYS_OPEN 5 /* max open files */ -#define FOPEN_MAX 5 - -#define SEEK_CUR 1 -#define SEEK_END 2 -#define SEEK_SET 0 - -/* ANSI prototypes */ -#ifndef SIZE_T_DEFINED -#define SIZE_T_DEFINED -typedef unsigned int size_t; -#endif - -#ifndef NULL -#define NULL ((void *)0) -#endif - -#ifndef EOF -#define EOF (-1) /* end of file */ -#endif - -typedef struct __stdio_file { - unsigned char slot; -} FILE; - -extern FILE __stdio_files[FOPEN_MAX]; - -int sprintf(char *s, const char *format, ...); -int vprintf(const char *format, va_list arg); -int vsprintf(char *s, const char *format, va_list arg); - -/* stdio.h functions implemented using FILEIOC */ -int remove(const char *filename); -int fgetc(FILE *stream); -int fputc(int c, FILE *stream); -char *fgets(char *str, int num, FILE *stream); -int fputs(const char *str, FILE *stream); -size_t fread(void *ptr, size_t size, size_t count, FILE *stream); -size_t fwrite(const void *ptr, size_t size, size_t count, FILE *stream); -int fseek(FILE *stream, long int offset, int origin); -long int ftell(FILE *stream); -int fclose(FILE *stream); -FILE *fopen(const char *filename, const char *mode); -int feof(FILE *stream); -#define ferror(stream) (0) -#define fflush(ignore) ((void)0) -#define rewind(stream) ti_Rewind(stream->slot) -#define fcloseall() ti_CloseAll() - -#ifdef __cplusplus -} -#endif - -#endif +#ifndef STDIO_H +#define STDIO_H + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define FILENAME_MAX 9 +#define SYS_OPEN 5 /* max open files */ +#define FOPEN_MAX 5 + +#define SEEK_CUR 1 +#define SEEK_END 2 +#define SEEK_SET 0 + +/* ANSI prototypes */ +#ifndef SIZE_T_DEFINED +#define SIZE_T_DEFINED +typedef unsigned int size_t; +#endif + +#ifndef NULL +#define NULL ((void *)0) +#endif + +#ifndef EOF +#define EOF (-1) /* end of file */ +#endif + +typedef struct __stdio_file { + unsigned char slot; +} FILE; + +extern FILE __stdio_files[FOPEN_MAX]; + +int sprintf(char *s, const char *format, ...); +int vprintf(const char *format, va_list arg); +int vsprintf(char *s, const char *format, va_list arg); + +/* stdio.h functions implemented using FILEIOC */ +int remove(const char *filename); +int fgetc(FILE *stream); +int fputc(int c, FILE *stream); +char *fgets(char *str, int num, FILE *stream); +int fputs(const char *str, FILE *stream); +size_t fread(void *ptr, size_t size, size_t count, FILE *stream); +size_t fwrite(const void *ptr, size_t size, size_t count, FILE *stream); +int fseek(FILE *stream, long int offset, int origin); +long int ftell(FILE *stream); +int fclose(FILE *stream); +FILE *fopen(const char *filename, const char *mode); +int feof(FILE *stream); +#define ferror(stream) (0) +#define fflush(ignore) ((void)0) +#define rewind(stream) ti_Rewind(stream->slot) +#define fcloseall() ti_CloseAll() + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/frontends/calculator/CEdev/include/stdlib.h b/frontends/calculator/CEdev/include/stdlib.h index b45077a..cef8c10 100644 --- a/frontends/calculator/CEdev/include/stdlib.h +++ b/frontends/calculator/CEdev/include/stdlib.h @@ -1,102 +1,102 @@ -/* - * Copyright (C) 1999-2008 by Zilog, Inc. - * All Rights Reserved - * Modified by Matt "MateoConLechuga" Waltz for TI84+CE platform - */ -#ifndef STDLIB_H -#define STDLIB_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define EXIT_SUCCESS 0 -#define EXIT_FAILURE 1 - -typedef int onexit_t; - -#ifndef __cplusplus -#ifndef WCHAR_T_DEFINED -#define WCHAR_T_DEFINED -typedef unsigned short wchar_t; -#endif -#endif - -typedef struct { - int quot; - int rem; -} div_t; - -typedef struct { - long quot; - long rem; -} ldiv_t; - -/* Heap packet header for malloc */ - -typedef char __align; /* alignment type */ -union header { - struct { - union header *ptr; /* next free block */ - unsigned int size; /* size of block */ - } s; - __align x; -}; -typedef union header _HEADER; - -#define EDOM 4 /* domain error */ -#define ERANGE 5 /* range error */ -extern double _huge_val; -#define HUGE_VAL _huge_val /* overflow error */ - -#define RAND_MAX 8388607 /* maximum value returned by rand() */ - -#ifndef SIZE_T_DEFINED -#define SIZE_T_DEFINED -typedef unsigned int size_t; -#endif -#define HEADER _HEADER -#define allocp _allocp -#define NALLOC 50 - -#ifndef NULL -#define NULL ((void *)0) -#endif - -/* Dynamic memory functions */ -void *calloc(size_t, size_t); -void *malloc(size_t); -void *realloc(void *, size_t); -void free(void *); - -/* Character and string functions */ -double atof(char * nptr); -int atoi(char * nptr); -long atol(char * nptr); -double strtod(char * nptr,char ** endptr); -long strtol(char *nptr,char ** endptr,int base); -unsigned long strtoul(char *nptr,char ** endptr,int base); - -/* Random routines */ -void srand(unsigned int seed); -int rand(void); - -/* Binary search and quicksort */ -void *bsearch(void * key,void * base, size_t nmemb, size_t size, int (*compar)(void * ,void * )); -void qsort(void * base,size_t nmemb,size_t size, int (*compar)(void * ,void * )); - -/* Exit and abort */ -void abort(void); -void exit(int status); - -/* Absolutes and division */ -int abs(int j); -long labs(long j); -div_t div(int numer,int denom); -ldiv_t ldiv(long numer, long denom); - -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright (C) 1999-2008 by Zilog, Inc. + * All Rights Reserved + * Modified by Matt "MateoConLechuga" Waltz for TI84+CE platform + */ +#ifndef STDLIB_H +#define STDLIB_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define EXIT_SUCCESS 0 +#define EXIT_FAILURE 1 + +typedef int onexit_t; + +#ifndef __cplusplus +#ifndef WCHAR_T_DEFINED +#define WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#endif +#endif + +typedef struct { + int quot; + int rem; +} div_t; + +typedef struct { + long quot; + long rem; +} ldiv_t; + +/* Heap packet header for malloc */ + +typedef char __align; /* alignment type */ +union header { + struct { + union header *ptr; /* next free block */ + unsigned int size; /* size of block */ + } s; + __align x; +}; +typedef union header _HEADER; + +#define EDOM 4 /* domain error */ +#define ERANGE 5 /* range error */ +extern double _huge_val; +#define HUGE_VAL _huge_val /* overflow error */ + +#define RAND_MAX 8388607 /* maximum value returned by rand() */ + +#ifndef SIZE_T_DEFINED +#define SIZE_T_DEFINED +typedef unsigned int size_t; +#endif +#define HEADER _HEADER +#define allocp _allocp +#define NALLOC 50 + +#ifndef NULL +#define NULL ((void *)0) +#endif + +/* Dynamic memory functions */ +void *calloc(size_t, size_t); +void *malloc(size_t); +void *realloc(void *, size_t); +void free(void *); + +/* Character and string functions */ +double atof(char * nptr); +int atoi(char * nptr); +long atol(char * nptr); +double strtod(char * nptr,char ** endptr); +long strtol(char *nptr,char ** endptr,int base); +unsigned long strtoul(char *nptr,char ** endptr,int base); + +/* Random routines */ +void srand(unsigned int seed); +int rand(void); + +/* Binary search and quicksort */ +void *bsearch(void * key,void * base, size_t nmemb, size_t size, int (*compar)(void * ,void * )); +void qsort(void * base,size_t nmemb,size_t size, int (*compar)(void * ,void * )); + +/* Exit and abort */ +void abort(void); +void exit(int status); + +/* Absolutes and division */ +int abs(int j); +long labs(long j); +div_t div(int numer,int denom); +ldiv_t ldiv(long numer, long denom); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/frontends/calculator/CEdev/include/string.h b/frontends/calculator/CEdev/include/string.h index 762eef7..760cfc5 100644 --- a/frontends/calculator/CEdev/include/string.h +++ b/frontends/calculator/CEdev/include/string.h @@ -1,49 +1,49 @@ -/* - * Copyright (C) 1999-2008 by Zilog, Inc. - * All Rights Reserved - * Modified by Matt "MateoConLechuga" Waltz for TI84+CE platform - */ -#ifndef STRING_H -#define STRING_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef SIZE_T_DEFINED -#define SIZE_T_DEFINED -typedef unsigned int size_t; -#endif - -void *memcpy(void *, const void *, size_t); -void *memchr(const void *, int, size_t); -void *memset(void *, int, size_t); -void *memmove(void *, const void *, size_t); -int memcmp(const void *, const void *, size_t); - -char *strcpy(char *, const char *); -char *strncpy(char *, const char *, size_t); -char *strcat(char *, const char *); -char *strncat(char *, const char *, size_t); -char *strchr(const char *, int); -char *strpbrk(const char *, const char *); -char *strrchr(const char *, int); -char *strstr(const char *, const char *); -char *strtok(char *, const char *); -char *strerror(int errnum); -char *strdup(const char *); -char *strndup(const char *, size_t n); -size_t strcspn(const char *, const char *); -size_t strspn(const char *, const char *); -size_t strlen(const char *); -size_t strnlen(const char *, size_t); -int strcmp(const char *, const char *); -int strncmp(const char *, const char *, size_t); -int strcasecmp(const char *, const char *); -int strncasecmp(const char *, const char *, size_t); - -#ifdef __cplusplus -} -#endif - -#endif +/* + * Copyright (C) 1999-2008 by Zilog, Inc. + * All Rights Reserved + * Modified by Matt "MateoConLechuga" Waltz for TI84+CE platform + */ +#ifndef STRING_H +#define STRING_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef SIZE_T_DEFINED +#define SIZE_T_DEFINED +typedef unsigned int size_t; +#endif + +void *memcpy(void *, const void *, size_t); +void *memchr(const void *, int, size_t); +void *memset(void *, int, size_t); +void *memmove(void *, const void *, size_t); +int memcmp(const void *, const void *, size_t); + +char *strcpy(char *, const char *); +char *strncpy(char *, const char *, size_t); +char *strcat(char *, const char *); +char *strncat(char *, const char *, size_t); +char *strchr(const char *, int); +char *strpbrk(const char *, const char *); +char *strrchr(const char *, int); +char *strstr(const char *, const char *); +char *strtok(char *, const char *); +char *strerror(int errnum); +char *strdup(const char *); +char *strndup(const char *, size_t n); +size_t strcspn(const char *, const char *); +size_t strspn(const char *, const char *); +size_t strlen(const char *); +size_t strnlen(const char *, size_t); +int strcmp(const char *, const char *); +int strncmp(const char *, const char *, size_t); +int strcasecmp(const char *, const char *); +int strncasecmp(const char *, const char *, size_t); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/frontends/calculator/CEdev/include/tice.h b/frontends/calculator/CEdev/include/tice.h index b572c79..1ace792 100644 --- a/frontends/calculator/CEdev/include/tice.h +++ b/frontends/calculator/CEdev/include/tice.h @@ -1,2082 +1,2082 @@ -/** - * @file - * @authors Matt "MateoConLechuga" Waltz - * @authors Jacob "jacobly" Young - * @brief Core CE define file - */ - -#ifndef H_TICE -#define H_TICE - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Hardware & custom macros/functions - */ - -/** - * Returns a pseudo-random 32-bit integer. - * - * @return the random integer - */ -uint32_t random(void); - -/** - * Seeds the pseudo-random number generator used by random() and rand() with the - * value seed. - * - * @param seed the seed value - */ -void srandom(uint32_t seed); - -/** - * Returns a pseudo-random integer in the range of \p min to \p max (inclusive). - */ -#define randInt(min, max) \ -((unsigned)random() % ((max) - (min) + 1) + (min)) - -/** - * Delays for a number of milliseconds. - *

- * Counts time spent while interrupted. Assumes a CPU clock speed of 48MHz. - * - * @param msec number of milliseconds - */ -void delay(uint16_t msec); - -/** - * "Atomically" loads from a volatile 32-bit value. - * - * @remarks - * The hardware does not provide a mechanism to truly atomically load from a - * 32-bit value. This "atomic" load is implemented by non-atomically reading the - * value twice and retrying if the values read differ. - * - * @attention - * If the maximum period between two value changes is 1us or less (assuming a - * CPU clock speed of 48MHz), then this function may never complete. For - * instance, the counter of a timer ticking at 1MHz or more should not be read - * using this function. In such a case of a purely increasing or decreasing - * value, atomic_load_increasing_32() or atomic_load_decreasing_32() may be - * appropriate instead. - * - * @param p pointer to 32-bit value - */ -uint32_t atomic_load_32(volatile uint32_t *p); - -/** - * "Atomically" loads from a volatile, increasing 32-bit value. - * - * @remarks - * The hardware does not provide a mechanism to truly atomically load from a - * 32-bit value. This "atomic" load is implemented by temporarily disabling - * interrupts while non-atomically reading the value twice and then returning - * the lesser of the two values read. - * - * @attention - * If the minimum period between two value changes is 5us or less and the - * value's maximum rate of change over a 5us period exceeds 256 (assuming a CPU - * clock speed of 48MHz), then the value returned may be incorrect. Of relevant - * note may be the fact that a 48MHz counter does not exceed this limit. - * - * @param p pointer to 32-bit value - */ -uint32_t atomic_load_increasing_32(volatile uint32_t *p); - -/** - * "Atomically" loads from a volatile, decreasing 32-bit value. - * - * @remarks - * The hardware does not provide a mechanism to truly atomically load from a - * 32-bit value. This "atomic" load is implemented by temporarily disabling - * interrupts while non-atomically reading the value twice and then returning - * the greater of the two values read. - * - * @attention - * If the minimum period between two value changes is 5us or less and the - * value's maximum rate of change over a 5us period exceeds 256 (assuming a CPU - * clock speed of 48MHz), then the value returned may be incorrect. Of relevant - * note may be the fact that a 48MHz counter does not exceed this limit. - * - * @param p pointer to 32-bit value - */ -uint32_t atomic_load_decreasing_32(volatile uint32_t *p); - -/** - * Gets a combination of the RTC time; useful for srand() - */ -#define rtc_Time() (*(volatile uint32_t*)0xF30044) - -/* RTC definitions */ -#define RTC_UNFREEZE (1<<7) -#define RTC_FREEZE (0<<7) -#define RTC_LOAD (1<<6) -#define RTC_ENABLE ((1<<0)|(RTC_UNFREEZE)) -#define RTC_DISABLE (0<<0) - -/* RTC registers */ -#define rtc_Seconds (*(volatile uint8_t*)0xF30000) -#define rtc_Minutes (*(volatile uint8_t*)0xF30004) -#define rtc_Hours (*(volatile uint8_t*)0xF30008) -#define rtc_Days (*(volatile uint16_t*)0xF3000C) -#define rtc_AlarmSeconds (*(uint8_t*)0xF30010) -#define rtc_AlarmMinutes (*(uint8_t*)0xF30014) -#define rtc_AlarmHours (*(uint8_t*)0xF30018) -#define rtc_Control (*(uint8_t*)0xF30020) -#define rtc_LoadSeconds (*(uint8_t*)0xF30024) -#define rtc_LoadMinutes (*(uint8_t*)0xF30028) -#define rtc_LoadHours (*(uint8_t*)0xF3002C) -#define rtc_LoadDays (*(uint16_t*)0xF30030) -#define rtc_IntStatus (*(volatile uint8_t*)0xF30034) -#define rtc_IntAcknowledge (*(volatile uint8_t*)0xF30034) -#define rtc_IsBusy() (rtc_Control & RTC_LOAD) - -/* RTC interrupt masks */ -#define RTC_ALARM_INT_SOURCE (1<<5) -#define RTC_DAY_INT_SOURCE (1<<4) -#define RTC_HR_INT_SOURCE (1<<3) -#define RTC_MIN_INT_SOURCE (1<<2) -#define RTC_SEC_INT_SOURCE (1<<1) - -/* RTC interrupt statuses */ -#define RTC_LOAD_INT (1<<5) -#define RTC_ALARM_INT (1<<4) -#define RTC_DAY_INT (1<<3) -#define RTC_HR_INT (1<<2) -#define RTC_MIN_INT (1<<1) -#define RTC_SEC_INT (1<<0) -#define RTC_INT_MASK (RTC_SEC_INT | RTC_MIN_INT | RTC_HR_INT | RTC_DAY_INT | RTC_ALARM_INT | RTC_LOAD_INT) - -/* Whole bunch of useful timer functions */ -#define TIMER1_ENABLE (1<<0) /* Enables Timer 1 */ -#define TIMER1_DISABLE (0<<0) /* Disables Timer 1 */ -#define TIMER1_32K (1<<1) /* Use the 32K clock for timer 1 */ -#define TIMER1_CPU (0<<1) /* Use the CPU clock rate for timer 1 */ -#define TIMER1_0INT (1<<2) /* Enable an interrupt when 0 is reached for the timer 1 */ -#define TIMER1_NOINT (0<<2) /* Disable interrupts for the timer 1 */ -#define TIMER1_UP (1<<9) /* Timer 1 counts up */ -#define TIMER1_DOWN (0<<9) /* Timer 1 counts down */ - -#define TIMER2_ENABLE (1<<3) /* Enables Timer 2 */ -#define TIMER2_DISABLE (0<<3) /* Disables Timer 2 */ -#define TIMER2_32K (1<<4) /* Use the 32K clock for timer 2 */ -#define TIMER2_CPU (0<<4) /* Use the CPU clock rate for timer 2 */ -#define TIMER2_0INT (1<<5) /* Enable an interrupt when 0 is reached for the timer 2 */ -#define TIMER2_NOINT (0<<5) /* Disable interrupts for the timer 2 */ -#define TIMER2_UP (1<<10) /* Timer 2 counts up */ -#define TIMER2_DOWN (0<<10) /* Timer 2 counts down */ - -#define TIMER3_ENABLE (1<<6) /* Enables Timer 3 */ -#define TIMER3_DISABLE (0<<6) /* Disables Timer 3 */ -#define TIMER3_32K (1<<7) /* Use the 32K clock for timer 3 */ -#define TIMER3_CPU (0<<7) /* Use the CPU clock rate for timer 3 */ -#define TIMER3_0INT (1<<8) /* Enable an interrupt when 0 is reached for the timer 3 */ -#define TIMER3_NOINT (0<<8) /* Disable interrupts for the timer 3 */ -#define TIMER3_UP (1<<11) /* Timer 3 counts up */ -#define TIMER3_DOWN (0<<11) /* Timer 3 counts down */ - -/* These defines can be used to check the status of the timer */ -#define TIMER1_MATCH1 (1<<0) /* Timer 1 hit the first match value */ -#define TIMER1_MATCH2 (1<<1) /* Timer 1 hit the second match value */ -#define TIMER1_RELOADED (1<<2) /* Timer 1 was reloaded (Needs TIMER1_0INT enabled) */ - -#define TIMER2_MATCH1 (1<<3) /* Timer 2 hit the first match value */ -#define TIMER2_MATCH2 (1<<4) /* Timer 2 hit the second match value */ -#define TIMER2_RELOADED (1<<5) /* Timer 2 was reloaded (Needs TIMER2_0INT enabled) */ - -#define TIMER3_MATCH1 (1<<6) /* Timer 3 hit the first match value */ -#define TIMER3_MATCH2 (1<<7) /* Timer 3 hit the second match value */ -#define TIMER3_RELOADED (1<<8) /* Timer 3 was reloaded (Needs TIMER3_0INT enabled) */ - -/* Timer registers */ -#define timer_1_Counter (*(volatile uint32_t*)0xF20000) -#define timer_1_ReloadValue (*(uint32_t*)0xF20004) -#define timer_1_MatchValue_1 (*(uint32_t*)0xF20008) -#define timer_1_MatchValue_2 (*(uint32_t*)0xF2000C) -#define timer_2_Counter (*(volatile uint32_t*)0xF20010) -#define timer_2_ReloadValue (*(uint32_t*)0xF20014) -#define timer_2_MatchValue_1 (*(uint32_t*)0xF20018) -#define timer_2_MatchValue_2 (*(uint32_t*)0xF2001C) -#define timer_3_Counter (*(volatile uint32_t*)0xF20020) -#define timer_3_ReloadValue (*(uint32_t*)0xF20024) -#define timer_3_MatchValue_1 (*(uint32_t*)0xF20028) -#define timer_3_MatchValue_2 (*(uint32_t*)0xF2002C) -#define timer_Control (*(uint16_t*)0xF20030) -#define timer_IntStatus (*(volatile uint16_t*)0xF20034) -#define timer_IntAcknowledge (*(volatile uint16_t*)0xF20034) -#define timer_EnableInt (*(uint16_t*)0xF20038) - -/* LCD defines */ -#define lcd_BacklightLevel (*(uint8_t*)0xF60024) -#define lcd_Timing0 (*(uint32_t*)0xE30000) -#define lcd_Timing1 (*(uint32_t*)0xE30004) -#define lcd_Timing2 (*(uint32_t*)0xE30008) -#define lcd_Timing3 (*(uint24_t*)0xE3000C) -#define lcd_UpBase (*(uint32_t*)0xE30010) -#define lcd_LpBase (*(uint32_t*)0xE30014) -#define lcd_Control (*(uint24_t*)0xE30018) -#define lcd_EnableInt (*(uint8_t*)0xE3001C) -#define lcd_IntStatus (*(uint8_t*)0xE30020) -#define lcd_IntStatusMasked (*(uint8_t*)0xE30024) -#define lcd_IntAcknowledge (*(volatile uint8_t*)0xE30028) -#define lcd_UpBaseCurr (*(volatile uint32_t*)0xE3002C) -#define lcd_LpBaseCurr (*(volatile uint32_t*)0xE30030) -#define lcd_Palette ((uint16_t*)0xE30200) -#define lcd_Ram ((uint16_t*)0xD40000) - -/** - * Width of LCD in pixels - */ -#define LCD_WIDTH \ -(320) - -/** - * Height of LCD in pixels - */ -#define LCD_HEIGHT \ -(240) - -/** - * Total number of pixels in LCD - */ -#define LCD_SIZE \ -(LCD_WIDTH*LCD_HEIGHT*2) - -/** - * @brief Structure of real variable type - */ -typedef struct { int8_t sign, exp; uint8_t mant[7]; } real_t; -/** - * @brief Structure of complex variable type - */ -typedef struct { real_t real, imag; } cplx_t; -/** - * @brief Structure of list variable type - */ -typedef struct { uint16_t dim; real_t items[1]; } list_t; -/** - * @brief Structure of complex list variable type - */ -typedef struct { uint16_t dim; cplx_t items[1]; } cplx_list_t; -/** - * @brief Structure of matrix variable type - */ -typedef struct { uint8_t cols, rows; real_t items[1]; } matrix_t; -/** - * @brief Structure of string variable type - */ -typedef struct { uint16_t len; char data[1]; } string_t; -/** - * @brief Structure of equation variable type - */ -typedef struct { uint16_t len; char data[1]; } equ_t; -/** - * @brief Structure of miscellaneous variable type - */ -typedef struct { uint16_t size; uint8_t data[1]; } var_t; - -/** - * Gets an element from a matrix - * - * @param matrix Structure of matrix - * @param row Row in matrix - * @param col Column in matrix - * @returns real_t containing element data - */ -#define matrix_element(matrix, row, col) ((matrix)->items[(row)+(col)*(matrix)->rows]) - -/** - * Resets the OS homescreen; accounts for split screen - */ -#define os_ClrHome() do { _OS(asm_ClrLCD); _OS(asm_HomeUp); _OS(asm_DrawStatusBar); } while (0) - -/** - * Resets the OS homescreen fully - */ -#define os_ClrHomeFull() do { _OS(asm_ClrLCDFull); _OS(asm_HomeUp); _OS(asm_DrawStatusBar); } while (0) - -/* - * Bootcode functions - */ - -/** - * Sets the calculator's date - * - * Performs checks to ensure date is within range - * @param day Day to set - * @param month Month to set - * @param year Year to set - */ -void boot_SetDate(uint8_t day, uint8_t month, uint16_t year); - -/** - * Gets the calculator's date - * - * @param day Pointer to variable to store day - * @param month Pointer to variable to store month - * @param year Pointer to variable to store year - */ -void boot_GetDate(uint8_t *day, uint8_t *month, uint16_t *year); - -/** - * Sets the calculator's time - * - * Performs checks to ensure time is within range - * @param seconds Seconds to set - * @param minutes Minutes to set - * @param hours Hours to set - */ -void boot_SetTime(uint8_t seconds, uint8_t minutes, uint8_t hours); - -/** - * Gets the calculator's time - * - * @param seconds Pointer to variable to store seconds - * @param minutes Pointer to variable to store minutes - * @param hours Pointer to variable to store hours - */ -void boot_GetTime(uint8_t *seconds, uint8_t *minutes, uint8_t *hours); - -/** - * Checks if past noon - * - * @returns True if past noon - */ -bool boot_IsAfterNoon(void); - -/** - * @returns Bootcode version major - */ -uint8_t boot_GetBootMajorVer(void); - -/** - * @returns Bootcode version minor - */ -uint8_t boot_GetBootMinorVer(void); - -/** - * @returns Hardware version - */ -uint8_t boot_GetHardwareVer(void); - -/** - * Turns all of VRAM into 0xFF (white) - */ -void boot_ClearVRAM(void); - -/** - * Checks if the [on] key was pressed - * - * @returns True is returned if [on] key was pressed - */ -bool boot_CheckOnPressed(void); - -/** - * Basically a reimplemented form of printf that prints to some debugging device - * - * @param string String to send to debug device - */ -void boot_DebugPrintf(const char *string); - -/** - * Turns off the calculator (probably not a good idea to use) - */ -void boot_TurnOff(void); - -/** - * Inserts a new line at the current cursor posistion on the homescreen - * Does not scroll. - */ -void boot_NewLine(void); - -/** - * @returns Current battery status - */ -uint8_t boot_GetBatteryStatus(void); - -/** - * Waits for ~10 ms - */ -void boot_WaitShort(void); - -/* - * OS Routines - */ - -/** - * Inserts a new line at the current cursor posistion on the homescreen - * Does scroll. - */ -void os_NewLine(void); - -/** - * Disables the OS cursor - */ -void os_DisableCursor(void); - -/** - * Enables the OS cursor - */ -void os_EnableCursor(void); - -/** - * Sets the foreground color used to draw text on the graphscreen - * @param color 565 BGR color to set text foreground to - */ -void os_SetDrawFGColor(uint24_t color); - -/** - * Gets the foreground color used to draw text on the graphscreen - * @returns 565 BGR color of text foreground - */ -uint24_t os_GetDrawFGColor(void); - -/** - * Sets the background color used to draw text on the graphscreen - * @param color 565 BGR color to set text background to - */ -void os_SetDrawBGColor(uint24_t color); - -/** - * Gets the background color used to draw text on the graphscreen - * - * @returns 565 BGR color of text nackground - * @warning Only useable in OS 5.2 and above; use at your own risk - */ -uint24_t os_GetDrawBGColor(void); - -/** - * Set the cursor posistion used on the homescreen - * - * @param curRow The row aligned offset - * @param curCol The column aligned offset - */ -void os_SetCursorPos(uint8_t curRow, uint8_t curCol); - -/** - * Gets the cursor posistion used on the homescreen - * - * @param curRow Pointer to store the row aligned offset - * @param curCol Pointer to store the column aligned offset - */ -void os_GetCursorPos(unsigned int *curRow, unsigned int *curCol); - -/** - * Selects the font to use when drawing on the graphscreen - * - * @param id - * 0: small font
- * 1: large monospace font - */ -void os_FontSelect(char id); - -/** - * Gets the font to use when drawing on the graphscreen - * - * @returns - * 0: small font
- * 1: large monospace font - */ -uint24_t os_FontGetID(void); - -/** - * @param string String to get pixel width of - * @returns The width of a string in the variable-width format - */ -uint24_t os_FontGetWidth(const char *string); - -/** - * @returns The height of the font characters - */ -uint24_t os_FontGetHeight(void); - -/** - * Draws text using the small font to the screen - * - * @param string String to draw - * @param col Column to start drawing at - * @param row Row to start drawing at - * @returns The end column - */ -uint24_t os_FontDrawText(const char *string, uint16_t col, uint8_t row); - -/** - * Draws transparent text using the small font to the screen - * - * @param string String to draw - * @param col Column to start drawing at - * @param row Row to start drawing at - * @returns The end column - */ -uint24_t os_FontDrawTransText(const char *string, uint16_t col, uint8_t row); - -/** - * Puts some text at the current homescreen cursor location - * - * @param string Test to put on homescreen - * @returns 1 if string fits on screen, 0 otherwise - */ -uint24_t os_PutStrFull(const char *string); - -/** - * Puts some text at the current homescreen cursor location - * - * @param string Test to put on homescreen - * @returns 1 if string fits on line, 0 otherwise - */ -uint24_t os_PutStrLine(const char *string); - -/** - * Set a particular flag variable - * - * @param offset Offset to particular flag in list - * @param set Bitmask of flag to set - */ -void os_SetFlagByte(int offset, uint8_t set); - -/** - * Get a particular flag variable - * - * @param offset Offset to particular flag in list - * @returns Bitmask of flag - */ -uint8_t os_GetFlagByte(int offset); - -/** - * Get amount of free ram in order to allocate extra ram - * - * @param free Set to start of free available ram - * @returns Size of available ram - */ -size_t os_MemChk(void **free); - -/** - * Throws an OS error - * - * @param error Error code to throw - */ -void os_ThrowError(uint8_t error); - -/** - * Gets a pointer to the system stats - * - * @returns - * [3] - Hardware version
- * [12-13] - Boot Version Major
- * [14] - Boot Version Minor
- * [15-16] - Boot Version Build
- * [28-37] - Calc ID (From certificate if exists)
- * [38-39] - Appears to be localization language - */ -void *os_GetSystemStats(void); - -/** - * This function can return twice (like setjmp). - * First return always happens with a return value of 0. - * Second return only happens if an error occurs before os_PopErrorHandler is called, - * with the errNo as the return value. - * - * @code - * int errno = os_PushErrorHandler(); - * if (errno) { - * // handle error, but no longer under the protection of the error handler so do not call os_PopErrorHandler() - * } else { - * // run some code that may error - * os_PopErrorHandler(); - * } - * @endcode - * - * @param routine Error handling routine - * @see os_PopErrorHandler - */ -int os_PushErrorHandler(void); - -/** - * Restores stack state after a call to os_PushErrorHandler. Must be called with stack in the same state - * as it was when os_PushErrorHandler returned with 0, and should not be called along the error path. - * - * @see os_PushErrorHandler - */ -void os_PopErrorHandler(void); - -/** - * @returns A pointer to symtable of the OS - */ -void *os_GetSymTablePtr(void); - -/** - * Creates an AppVar - * - * @param name Pointer to name of AppVar to create - * @param size Size of AppVar to create - * @returns A pointer to the AppVar data - * @note Returns NULL if creation failed for some reason, otherwise a pointer to the size bytes - */ -var_t *os_CreateAppVar(const char *name, uint16_t size); - -/** - * Returns next entry or NULL if no more entries, pass os_GetSymTablePtr() as first entry - */ -void *os_NextSymEntry(void *entry, uint24_t *type, uint24_t *nameLength, char *name, void **data); - -/** - * Locates a symbol in the symtable - * - * @param type Type of symbol to find - * @param name Pointer to name of symbol to find - * @param entry Can be NULL if you don't care - * @param data Can be NULL if you don't care - * @returns If file exists, returns 1 and sets entry and data, otherwise returns 0. - */ -int os_ChkFindSym(uint8_t type, const char *name, void **entry, void **data); - -/** - * Gets the Ans variable - * - * @param type This is set to the current variable type in ANS - * @returns Pointer to the data - * @note Returns NULL if Ans doesn't exist or type is NULL - */ -void *os_RclAns(uint8_t *type); - -/** - * Copies a real_t type - * - * @param src Pointer to original real_t - * @returns Copied real_t - */ -real_t os_RealCopy(const real_t *src); - -/* Unary operations used to interact with the OS math functions */ -real_t os_RealAcosRad(const real_t *arg); -real_t os_RealAsinRad(const real_t *arg); -real_t os_RealAtanRad(const real_t *arg); -real_t os_RealCosRad(const real_t *arg); -real_t os_RealRadToDeg(const real_t *arg); -real_t os_RealExp(const real_t *arg); -real_t os_RealFloor(const real_t *arg); -real_t os_RealFrac(const real_t *arg); -real_t os_RealRoundInt(const real_t *arg); -real_t os_RealLog(const real_t *arg); -real_t os_RealNeg(const real_t *arg); -real_t os_RealDegToRad(const real_t *arg); -real_t os_RealInv(const real_t *arg); -real_t os_RealSinRad(const real_t *arg); -real_t os_RealSqrt(const real_t *arg); -real_t os_RealTanRad(const real_t *arg); -real_t os_RealInt(const real_t *arg); -cplx_t os_CplxSquare(const cplx_t *arg); - -/* Binary operations used to interact with the OS math functions */ -real_t os_RealAdd(const real_t *arg1, const real_t *arg2); -real_t os_RealDiv(const real_t *arg1, const real_t *arg2); -real_t os_RealGcd(const real_t *arg1, const real_t *arg2); -real_t os_RealLcm(const real_t *arg1, const real_t *arg2); -real_t os_RealMax(const real_t *arg1, const real_t *arg2); -real_t os_RealMin(const real_t *arg1, const real_t *arg2); -real_t os_RealMul(const real_t *arg1, const real_t *arg2); -real_t os_RealNcr(const real_t *total, const real_t *num); -real_t os_RealNpr(const real_t *total, const real_t *num); -real_t os_RealPow(const real_t *base, const real_t *exp); -real_t os_RealRandInt(const real_t *min, const real_t *max); -real_t os_RealMod(const real_t *arg1, const real_t *arg2); -real_t os_RealSub(const real_t *arg1, const real_t *arg2); - -/** - * Rounds a real_t - * - * @note digits must be in the range 0 - 9 - */ -real_t os_RealRound(const real_t *arg, char digits); - -/** - * Compares two real_t - * - * @returns -1, 0, or 1 depending on the comparison - */ -int os_RealCompare(const real_t *arg1, const real_t *arg2); - -/** - * Converts a real_t to an integer - * @note Saturates on overflow - */ -int24_t os_RealToInt24(const real_t *arg); - -/** - * Converts an integer to a real_t - * @note Saturates on overflow - */ -real_t os_Int24ToReal(int24_t arg); - -/** - * Converts a real_t to a float - * @note Saturates on overflow - */ -float os_RealToFloat(const real_t *arg); - -/** - * Converts an float to a real_t - * @note Saturates on overflow - */ -real_t os_FloatToReal(float arg); - -/** This converts a ti-float to a ti-ascii string. - * - * @param result Zero terminated string copied to this address - * @param arg Real to convert - * @param maxLength - * <=0: use default max length (14)
- * >0: max length of result, minimum of 6 - * @param mode: - * 0: Use current mode for everything (digits ignored)
- * 1: Normal mode
- * 2: Sci mode
- * 3: Eng mode
- * >4: Use current Normal/Sci/Eng mode (digits still used)
- * @param digits - * -1: Float mode
- * 0-9: Fix # mode
- * @returns Length of result - */ -int os_RealToStr(char *result, const real_t *arg, int8_t maxLength, uint8_t mode, int8_t digits); - -/** - * This converts a ti-ascii string to a ti-float. - * - * String format regexp: / *[-\032+]?[0-9]*(\.[0-9]*)?([eE\033][-\032+]?[0-9]*)?/ - * @param string TI-ascii string to convert - * @param end If non-null, pointer to end of parsed number is stored here - * @returns resulting TI-float; on exponent overflow this is +-9.9999999999999e99 - */ -real_t os_StrToReal(const char *string, char **end); - -/** - * High 8 is unsigned offset, low 8 is bits to test - */ -int os_TestFlagBits(uint16_t offset_pattern); -void os_SetFlagBits(int16_t offset_pattern); -void os_ResetFlagBits(int16_t offset_pattern); - -/** - * Custom implementation input routine for use in conjunction with the TIOS. - * It is HIGHLY recommended you implement your own routine, this routine has - * some quirks. It is good enough for getting basic input however. - * - * @param string Input prompt string to be displayed to the user - * @param buf Storage location to store input string - * @param bufsize Available storage size for input string. -1 for null termination. - * @returns None - */ -void os_GetStringInput(char *string, char *buf, size_t bufsize); - -/** - * Gets a key from the OS - * - * @returns Key code - * @returns Extended key code in high byte - */ -uint16_t os_GetKey(void); - -/** - * Disable text buffering on the homescreen. C programs use this area by default for the BSS / Heap. - */ -void os_DisableHomeTextBuffer(void); - -/** - * Enables text buffering on the homescreen. C programs use this area by default for the BSS / Heap. - */ -void os_EnableHomeTextBuffer(void); - -/** - * @brief Scan code type - */ -typedef uint8_t sk_key_t; - -/** - * Performs an OS call to get the keypad scan code - * - * You can also use this function to get input from the user as a string like this: - * @code - * const char *chars = "\0\0\0\0\0\0\0\0\0\0\"WRMH\0\0?[VQLG\0\0:ZUPKFC\0 YTOJEB\0\0XSNIDA\0\0\0\0\0\0\0\0"; - * uint8_t key, i = 0; - * char buffer[50]; - * - * while((key = os_GetCSC()) != sk_Enter) { - * if(chars[key]) { - * buffer[i++] = chars[key]; - * } - * } - * @endcode - * Feel free to modify the string to suit your needs. - * @returns Key scan code - */ -sk_key_t os_GetCSC(void); - -/** - * Runs the calulator at 6 MHz - */ -void boot_Set6MHzMode(void); - -/** - * Runs the calulator at 48 MHz - */ -void boot_Set48MHzMode(void); - -/** - * Runs the calulator at 6 MHz (saves interrupt status) - */ -void boot_Set6MHzModeI(void); - -/** - * Runs the calulator at 48 MHz (saves interrupt status) - */ -void boot_Set48MHzModeI(void); - -/** - * Executes the assembly routine _ForceCmdNoChar - */ -void os_ForceCmdNoChar(void); - -/** - * Use this function to call assembly functions in the OS and Bootcode - * i.e. _OS( asm_ArcChk ); - */ -void _OS(void (*function)(void)); - -/** - * Assembly routine to scroll homescreen up - */ -void asm_MoveUp(void); - -/** - * Assembly routine to scroll homescreen down - */ -void asm_MoveDown(void); - -/** - * Assembly routine to move row and column posistion to (0,0) - */ -void asm_HomeUp(void); - -/** - * Assembly routine to turn on the Run Indicator - */ -void asm_RunIndicOn(void); - -/** - * Assembly routine to turn off the Run Indicator - */ -void asm_RunIndicOff(void); - -/** - * Assembly routine to turn off APD - */ -void asm_DisableAPD(void); - -/** - * Assembly routine to turn on APD - */ -void asm_EnableAPD(void); - -/** - * Assembly routine checks the amount of free archive - */ -void asm_ArcChk(void); - -/** - * Assembly routine to clear the homescreen lcd - */ -void asm_ClrLCDFull(void); - -/** - * Assembly routine to clear the homescreen lcd. - * Accounts for split screen - */ -void asm_ClrLCD(void); - -/** - * Assembly routine to redraw the status bar - */ -void asm_DrawStatusBar(void); - -/** - * Invalidate and clear stat variables - */ -void asm_DelRes(void); - -/** - * Invalidate and clear text shadow area - */ -void asm_ClrTxtShd(void); - -/** - * Colors used by the OS - */ -typedef enum { - OS_COLOR_BLUE = 10, - OS_COLOR_RED, - OS_COLOR_BLACK, - OS_COLOR_MAGENTA, - OS_COLOR_GREEN, - OS_COLOR_ORANGE, - OS_COLOR_BROWN, - OS_COLOR_NAVY, - OS_COLOR_LTBLUE, - OS_COLOR_YELLOW, - OS_COLOR_WHITE, - OS_COLOR_LTGRAY, - OS_COLOR_MEDGRAY, - OS_COLOR_GRAY, - OS_COLOR_DARKGRAY -} os_colors_t; - -#define os_RamStart ((uint8_t*)0xD00000) -#define os_Flags ((uint8_t*)0xD00080) -#define os_TextFlags (*(uint8_t*)0xD00080) -#define os_ApdFlags (*(uint8_t*)0xD00088) -#define os_RclFlags (*(uint8_t*)0xD0008E) - -#define os_AppData ((uint8_t*)0xD00429) - -#define os_KbdScanCode (*(uint8_t*)0xD00587) -#define os_KbdLGSC (*(uint8_t*)0xD00588) -#define os_KbdPSC (*(uint8_t*)0xD00589) -#define os_KbdWUR (*(uint8_t*)0xD0058A) -#define os_KbdDebncCnt (*(uint8_t*)0xD0058B) -#define os_KbdKey (*(uint8_t*)0xD0058C) -#define os_KbdGetKy (*(uint8_t*)0xD0058D) -#define os_KeyExtend (*(uint8_t*)0xD0058E) -#define os_Brightness (*(uint8_t*)0xD0058F) -#define os_ApdSubTimer (*(uint8_t*)0xD00590) -#define os_ApdTimer (*(uint8_t*)0xD00591) -#define os_CurRow (*(uint8_t*)0xD00595) -#define os_CurCol (*(uint8_t*)0xD00596) - -#define os_OP1 ((uint8_t*)0xD005F8) -#define os_OP2 ((uint8_t*)0xD00603) -#define os_OP3 ((uint8_t*)0xD0060E) -#define os_OP4 ((uint8_t*)0xD00619) -#define os_OP5 ((uint8_t*)0xD00624) -#define os_OP6 ((uint8_t*)0xD0062F) -#define os_OP7 ((uint8_t*)0xD0063A) - -#define os_ProgToEdit ((char*)0xD0065B) -#define os_NameBuff ((char*)0xD00663) - -#define os_TextShadow ((uint8_t*)0xD006C0) /**< Text buffer 260 bytes */ - -#define os_PromptRow (*(uint8_t*)0xD00800) -#define os_PromptCol (*(uint8_t*)0xD00801) -#define os_PromptIns (*(uint8_t*)0xD00802) -#define os_PromptShift (*(uint8_t*)0xD00803) -#define os_PromptRet (*(uint8_t*)0xD00804) -#define os_PromptValid (*(uint8_t*)0xD00807) - -#define os_PenCol (*(uint24_t*)0xD008D2) /**< Small font column location */ -#define os_PenRow (*(uint8_t*)0xD008D5) /**< Small font row location */ - -#define os_StatVars ((uint8_t*)0xD01191) -#define os_AsmPrgmSize (*(uint16_t*)0xD0118C) /**< Current size of executing program */ - -#define os_uXMin (*(real_t*)0xD01D61) -#define os_uXMax (*(real_t*)0xD01D6A) -#define os_uXScl (*(real_t*)0xD01D73) -#define os_uYMin (*(real_t*)0xD01D7C) -#define os_uYMax (*(real_t*)0xD01D85) -#define os_uYScl (*(real_t*)0xD01D8E) -#define os_uThetaMin (*(real_t*)0xD01D97) -#define os_uThetaMax (*(real_t*)0xD01DA0) -#define os_uThetaStep (*(real_t*)0xD01DA9) -#define os_uTmin (*(real_t*)0xD01DB2) -#define os_uTmax (*(real_t*)0xD01DBB) -#define os_uTStep (*(real_t*)0xD01DC4) -#define os_uPlotStart (*(real_t*)0xD01DCD) -#define os_unMax (*(real_t*)0xD01DD6) -#define os_uu0 (*(real_t*)0xD01DDF) -#define os_uv0 (*(real_t*)0xD01DE8) -#define os_unMin (*(real_t*)0xD01DF1) -#define os_uu02 (*(real_t*)0xD01DFA) -#define os_uv02 (*(real_t*)0xD01E03) -#define os_uw0 (*(real_t*)0xD01E0C) -#define os_uPlotStep (*(real_t*)0xD01E15) -#define os_uXres (*(real_t*)0xD01E1E) -#define os_uw02 (*(real_t*)0xD01E27) -#define os_XMin (*(real_t*)0xD01E33) -#define os_XMax (*(real_t*)0xD01E3C) -#define os_XScl (*(real_t*)0xD01E45) -#define os_YMin (*(real_t*)0xD01E4E) -#define os_YMax (*(real_t*)0xD01E57) -#define os_YScl (*(real_t*)0xD01E60) -#define os_ThetaMin (*(real_t*)0xD01E69) -#define os_ThetaMax (*(real_t*)0xD01E72) -#define os_ThetaStep (*(real_t*)0xD01E7B) -#define os_TMinPar (*(real_t*)0xD01E84) -#define os_TMaxPar (*(real_t*)0xD01E8D) -#define os_TStep (*(real_t*)0xD01E96) -#define os_PlotStart (*(real_t*)0xD01E9F) -#define os_NMax (*(real_t*)0xD01EA8) -#define os_u0 (*(real_t*)0xD01EB1) -#define os_V0 (*(real_t*)0xD01EBA) -#define os_NMin (*(real_t*)0xD01EC3) -#define os_u02 (*(real_t*)0xD01ECC) -#define os_V02 (*(real_t*)0xD01ED5) -#define os_W0 (*(real_t*)0xD01EDE) -#define os_PlotStep (*(real_t*)0xD01EE7) -#define os_XResO (*(real_t*)0xD01EF0) -#define os_W02 (*(real_t*)0xD01EF9) -#define os_un1 (*(real_t*)0xD01F02) -#define os_un2 (*(real_t*)0xD01F0B) -#define os_Vn1 (*(real_t*)0xD01F14) -#define os_Vn2 (*(real_t*)0xD01F1D) -#define os_Wn1 (*(real_t*)0xD01F26) -#define os_Wn2 (*(real_t*)0xD01F2F) -#define os_Fin_N (*(real_t*)0xD01F38) -#define os_Fin_I (*(real_t*)0xD01F41) -#define os_Fin_PV (*(real_t*)0xD01F4A) -#define os_Fin_PMT (*(real_t*)0xD01F53) -#define os_Fin_FV (*(real_t*)0xD01F5C) -#define os_Fin_PY (*(real_t*)0xD01F65) -#define os_Fin_CY (*(real_t*)0xD01F6E) -#define os_Cal_N (*(real_t*)0xD01F77) -#define os_Cal_I (*(real_t*)0xD01F80) -#define os_Cal_PV (*(real_t*)0xD01F89) -#define os_Cal_PMT (*(real_t*)0xD01F92) -#define os_Cal_FV (*(real_t*)0xD01F9B) -#define os_Cal_PY (*(real_t*)0xD01FA4) - -#define os_CmdShadow ((uint8_t*)0xD0232D) - -#define os_Y1LineType (*(uint8_t*)0xD024BF) -#define os_Y2LineType (*(uint8_t*)0xD024C0) -#define os_Y3LineType (*(uint8_t*)0xD024C1) -#define os_Y4LineType (*(uint8_t*)0xD024C2) -#define os_Y5LineType (*(uint8_t*)0xD024C3) -#define os_Y6LineType (*(uint8_t*)0xD024C4) -#define os_Y7LineType (*(uint8_t*)0xD024C5) -#define os_Y8LineType (*(uint8_t*)0xD024C6) -#define os_Y9LineType (*(uint8_t*)0xD024C7) -#define os_Y0LineType (*(uint8_t*)0xD024C8) -#define os_Para1LineType (*(uint8_t*)0xD024C9) -#define os_Para2LineType (*(uint8_t*)0xD024CA) -#define os_Para3LineType (*(uint8_t*)0xD024CB) -#define os_Para4LineType (*(uint8_t*)0xD024CC) -#define os_Para5LineType (*(uint8_t*)0xD024CD) -#define os_Para6LineType (*(uint8_t*)0xD024CE) -#define os_Polar1LineType (*(uint8_t*)0xD024CF) -#define os_Polar2LineType (*(uint8_t*)0xD024D0) -#define os_Polar3LineType (*(uint8_t*)0xD024D1) -#define os_Polar4LineType (*(uint8_t*)0xD024D2) -#define os_Polar5LineType (*(uint8_t*)0xD024D3) -#define os_Polar6LineType (*(uint8_t*)0xD024D4) -#define os_SecULineType (*(uint8_t*)0xD024D5) -#define os_SecVLineType (*(uint8_t*)0xD024D6) -#define os_SecWLineType (*(uint8_t*)0xD024D7) -#define os_Y1LineColor (*(uint8_t*)0xD024D8) -#define os_Y2LineColor (*(uint8_t*)0xD024D9) -#define os_Y3LineColor (*(uint8_t*)0xD024DA) -#define os_Y4LineColor (*(uint8_t*)0xD024DB) -#define os_Y5LineColor (*(uint8_t*)0xD024DC) -#define os_Y6LineColor (*(uint8_t*)0xD024DD) -#define os_Y7LineColor (*(uint8_t*)0xD024DE) -#define os_Y8LineColor (*(uint8_t*)0xD024DF) -#define os_Y9LineColor (*(uint8_t*)0xD024E0) -#define os_Y0LineColor (*(uint8_t*)0xD024E1) -#define os_Para1LineColor (*(uint8_t*)0xD024E2) -#define os_Para2LineColor (*(uint8_t*)0xD024E3) -#define os_Para3LineColor (*(uint8_t*)0xD024E4) -#define os_Para4LineColor (*(uint8_t*)0xD024E5) -#define os_Para5LineColor (*(uint8_t*)0xD024E6) -#define os_Para6LineColor (*(uint8_t*)0xD024E7) -#define os_Polar1LineColor (*(uint8_t*)0xD024E8) -#define os_Polar2LineColor (*(uint8_t*)0xD024E9) -#define os_Polar3LineColor (*(uint8_t*)0xD024EA) -#define os_Polar4LineColor (*(uint8_t*)0xD024EB) -#define os_Polar5LineColor (*(uint8_t*)0xD024EC) -#define os_Polar6LineColor (*(uint8_t*)0xD024ED) -#define os_SecULineColor (*(uint8_t*)0xD024EE) -#define os_SecVLineColor (*(uint8_t*)0xD024EF) -#define os_SecWLineColor (*(uint8_t*)0xD024F0) - -#define os_AppErr1 ((char*)0xD025A9) /**< String [1] for custom error */ -#define os_AppErr2 ((char*)0xD025B6) /**< String [2] for custom error */ - -#define os_CursorHookPtr (*(uint24_t*)0xD025D5) -#define os_LibraryHookPtr (*(uint24_t*)0xD025D8) -#define os_RawKeyHookPtr (*(uint24_t*)0xD025DB) -#define os_GetKeyHookPtr (*(uint24_t*)0xD025DE) -#define os_HomescreenHookPtr (*(uint24_t*)0xD025E1) -#define os_WindowHookPtr (*(uint24_t*)0xD025E4) -#define os_GraphHookPtr (*(uint24_t*)0xD025E7) -#define os_YEqualsHookPtr (*(uint24_t*)0xD025EA) -#define os_FontHookPtr (*(uint24_t*)0xD025ED) -#define os_RegraphHookPtr (*(uint24_t*)0xD025F0) -#define os_GraphicsHookPtr (*(uint24_t*)0xD025F3) -#define os_TraceHookPtr (*(uint24_t*)0xD025F6) -#define os_ParserHookPtr (*(uint24_t*)0xD025F9) -#define os_AppChangeHookPtr (*(uint24_t*)0xD025FC) -#define os_Catalog1HookPtr (*(uint24_t*)0xD025FF) -#define os_HelpHookPtr (*(uint24_t*)0xD02602) -#define os_CxRedispHookPtr (*(uint24_t*)0xD02605) -#define os_MenuHookPtr (*(uint24_t*)0xD02608) -#define os_Catalog2HookPtr (*(uint24_t*)0xD0260B) -#define os_TokenHookPtr (*(uint24_t*)0xD0260E) -#define os_LocalizeHookPtr (*(uint24_t*)0xD02611) -#define os_SilentLinkHookPtr (*(uint24_t*)0xD02614) -#define os_ActiveUSBHookPtr (*(uint24_t*)0xD0261A) - -#define os_TempFreeArc (*(uint24_t*)0xD02655) /**< Set after asm_ArcChk call */ - -#define os_TextBGcolor (*(uint16_t*)0xD02688) /**< Large font background color */ -#define os_TextFGcolor (*(uint16_t*)0xD0268A) /**< Large font foreground color */ - -#define os_DrawBGColor (*(uint16_t*)0xD026AA) /**< Small font background color */ -#define os_DrawFGColor (*(uint16_t*)0xD026AC) /**< Small font foreground color */ -#define os_DrawColorCode (*(uint8_t*)0xD026AE) - -#define os_BatteryStatus (*(uint8_t*)0xD02A86) - -#define os_GraphBGColor (*(uint16_t*)0xD02A98) /**< Graph background 565 color */ - -#define os_FillRectColor (*(uint16_t*)0xD02AC0) -#define os_StatusBarBGColor (*(uint16_t*)0xD02ACC) /**< Status bar 565 color */ - -#define os_TmpYears (*(real_t*)0xD02B01) -#define os_TmpMonths (*(real_t*)0xD02B0A) -#define os_TmpDays (*(real_t*)0xD02B13) -#define os_TmpHours (*(real_t*)0xD02B1C) -#define os_TmpMinutes (*(real_t*)0xD02B25) - -#define os_RamCode ((uint8_t*)0xD18C7C) /**< 1023 bytes free ram */ - -/* - * TI-OS Token definitions - */ - -#define tToDMS 0x01 -#define tToDEC 0x02 -#define tToAbc 0x03 -#define tStore 0x04 -#define tBoxPlot 0x05 -#define tLBrack 0x06 -#define tRBrack 0x07 -#define tLBrace 0x08 -#define tRBrace 0x09 -#define tFromRad 0x0A -#define tFromDeg 0x0B -#define tRecip 0x0C -#define tSqr 0x0D -#define tTrnspos 0x0E -#define tCube 0x0F -#define tLParen 0x10 -#define tRParen 0x11 -#define tRound 0x12 -#define tPxTst 0x13 -#define tAug 0x14 -#define tRowSwap 0x15 -#define tRowPlu 0x16 -#define tmRow 0x17 -#define tmRowPlus 0x18 -#define tMax 0x19 // 'max' -#define tMin 0x1A // 'min' -#define tRToPr 0x1B // 'R>Pr' -#define tRToPo 0x1C // 'R>Po' -#define tPToRx 0x1D // 'P>Rx' -#define tPToRy 0x1E // 'P>Ry' -#define tMedian 0x1F // 'MEDIAN' -#define tRandM 0x20 // 'randM' -#define tMean 0x21 // 'MEAN' -#define tRoot 0x22 // 'ROOT' -#define tSeries 0x23 // 'seq' -#define tFnInt 0x24 // 'fnInt' -#define tNDeriv 0x25 // 'fnIr' -#define tEvalF 0x26 -#define tFmin 0x27 -#define tFmax 0x28 -#define tSpace 0x29 // ' ' -#define tString 0x2A // '"' -#define tComma 0x2B // ',' -#define tii 0x2C // 'i' -#define tFact 0x2D // '!' -#define tCubicR 0x2E -#define tQuartR 0x2F -#define t0 0x30 -#define t1 0x31 -#define t2 0x32 -#define t3 0x33 -#define t4 0x34 -#define t5 0x35 -#define t6 0x36 -#define t7 0x37 -#define t8 0x38 -#define t9 0x39 -#define tDecPt 0x3A // '.' -#define tee 0x3B // 'e' -#define tOr 0x3C // '_or_' -#define tXor 0x3D -#define tColon 0x3E // ':' -#define tEnter 0x3F -#define tAnd 0x40 // '_and_' -#define tA 0x41 -#define tB 0x42 -#define tC 0x43 -#define tD 0x44 -#define tE 0x45 -#define tF 0x46 -#define tG 0x47 -#define tH 0x48 -#define tI 0x49 -#define tJ 0x4A -#define tK 0x4B -#define tL 0x4C -#define tM 0x4D -#define tN 0x4E -#define tO 0x4F -#define tP 0x50 -#define tQ 0x51 -#define tR 0x52 -#define tS 0x53 -#define tT 0x54 -#define tU 0x55 -#define tV 0x56 -#define tW 0x57 -#define tX 0x58 -#define tY 0x59 -#define tZ 0x5A -#define tTheta 0x5B -#define tProg 0x5F - -/* - * Mode settings tokens - */ -#define tRad 0x64 // 'Radian' -#define tDeg 0x65 // 'Degree' -#define tNormF 0x66 // 'Normal' -#define tSci 0x67 // 'Sci' -#define tEng 0x68 // 'Eng' -#define tFloat 0x69 // 'Float' -#define tFix 0x73 // 'Fix_' -#define tSplitOn 0x74 -#define tFullScreen 0x75 -#define tStndrd 0x76 // 'Func' -#define tParam 0x77 // 'Param' -#define tPolar 0x78 // 'Pol' -#define tSeqG 0x79 // ;79h -#define tAFillOn 0x7A // 'AUTO FILL ON' -#define tAFillOff 0x7B // 'AutoFill OFF' -#define tACalcOn 0x7C -#define tACalcOff 0x7D - -#define tEQ 0x6A // '=' -#define tLT 0x6B // '<' -#define tGT 0x6C // '>' -#define tLE 0x6D // LLE -#define tGE 0x6E // LGE -#define tNE 0x6F // LNE -#define tAdd 0x70 // '+' -#define tSub 0x71 // '-' -#define tAns 0x72 -#define tMul 0x82 // '*' -#define tDiv 0x83 // '/' - -#define tBoxIcon 0x7F -#define tCrossIcon 0x80 -#define tDotIcon 0x81 - -#define tTrace 0x84 // 'Trace' -#define tClDrw 0x85 // 'ClrDraw' -#define tZoomStd 0x86 // 'ZStd' -#define tZoomtrg 0x87 // 'Ztrg' -#define tZoomBox 0x88 // 'ZBOX' -#define tZoomIn 0x89 // 'ZIn' -#define tZoomOut 0x8A // 'ZOut' -#define tZoomSqr 0x8B // 'ZSqr' -#define tZoomInt 0x8C // 'ZInt' -#define tZoomPrev 0x8D // 'ZPrev' -#define tZoomDec 0x8E // 'ZDecm' -#define tZoomStat 0x8F // 'ZStat -#define tUsrZm 0x90 // 'ZRcl' -#define tPrtScrn 0x91 // 'PrtScrn' -#define tZoomSto 0x92 // 'ZSto' -#define tText 0x93 - -#define tnPr 0x94 // '_nPr_' -#define tnCr 0x95 // '_nCr_' - -// Graph Commands -#define tYOn 0x96 // 'FnOn_' -#define tYOff 0x97 // 'FnOff_' -#define tStPic 0x98 // 'StPic_' -#define tRcPic 0x99 // 'RcPic_' -#define tStoDB 0x9A // 'StGDB_' -#define tRclDB 0x9B // 'RcGDB_' -#define tLine 0x9C // 'Line' -#define tVert 0x9D // 'Vert_' -#define tPtOn 0x9E // 'PtOn' -#define tPtOff 0x9F // 'PtOff' -#define tPtChg 0xA0 // 'PtChg' -#define tPXOn 0xA1 -#define tPXOff 0xA2 -#define tPXChg 0xA3 -#define tShade 0xA4 // 'Shade' -#define tCircle 0xA5 // 'Circle' -#define tHorz 0xA6 // 'HORIZONTAL' -#define tTanLn 0xA7 // 'TanLn' -#define tDrInv 0xA8 // 'DrInv_' -#define tDrawF 0xA9 // 'DrawF_' - -// Functions with no argument -#define tRand 0xAB // 'rand' -#define tPi 0xAC // Lpi -#define tGetKey 0xAD // 'getKy' -#define tAPost 0xAE // ''' -#define tQuest 0xAF // '?' -#define tChs 0xB0 -#define tInt 0xB1 -#define tAbs 0xB2 -#define tDet 0xB3 -#define tIdent 0xB4 -#define tDim 0xB5 -#define tSum 0xB6 -#define tProd 0xB7 -#define tNot 0xB8 -#define tIPart 0xB9 -#define tFPart 0xBA - -// New 2 Byte Tokens -#define t2ByteTok 0xBB -#define tSqrt 0xBC -#define tCubRt 0xBD -#define tLn 0xBE -#define tExp 0xBF -#define tLog 0xC0 -#define tALog 0xC1 -#define tSin 0xC2 -#define tASin 0xC3 -#define tCos 0xC4 -#define tACos 0xC5 -#define tTan 0xC6 -#define tATan 0xC7 -#define tSinH 0xC8 -#define tASinH 0xC9 -#define tCoshH 0xCA -#define tACosH 0xCB -#define tTanH 0xCC -#define tATanH 0xCD - -// Some Programming Commands -#define tIf 0xCE // 'If_' -#define tThen 0xCF // 'Then_' -#define tElse 0xD0 // 'Else_' -#define tWhile 0xD1 // 'While_' -#define tRepeat 0xD2 // 'Repeat_' -#define tFor 0xD3 // 'For_' -#define tEnd 0xD4 // 'End' -#define tReturn 0xD5 // 'Return' -#define tLbl 0xD6 // 'Lbl_' -#define tGoto 0xD7 // 'Goto_' -#define tPause 0xD8 // 'Pause_' -#define tStop 0xD9 // 'Stop' -#define tISG 0xDA // 'IS>' -#define tDSL 0xDB // 'DS<' -#define tInput 0xDC // 'Input_' -#define tPrompt 0xDD // 'Prompt_' -#define tDisp 0xDE // 'Disp_' -#define tDispG 0xDF // 'DispG' -#define tOutput 0xE0 // 'Outpt' -#define tClLCD 0xE1 // 'ClLCD' -#define tConst 0xE2 // 'Fill' -#define tSortA 0xE3 // 'sortA_' -#define tSortD 0xE4 // 'sortD_' -#define tDispTab 0xE5 // 'Disp Table -#define tMenu 0xE6 // 'Menu' -#define tSendMBL 0xE7 // 'Send' -#define tGetMBL 0xE8 // 'Get' - -// Stat Plot Commands -#define tPlotOn 0xE9 // 'PLOTSON' -#define tPlotOff 0xEA // 'PLOTSOFF -#define tListName 0xEB // List Designator -#define tPlot1 0xEC -#define tPlot2 0xED -#define tPlot3 0xEE -#define tUnused01 0xEF // available? -#define tPower 0xF0 // '^' -#define tXRoot 0xF1 // LsupX,Lroot -#define tOneVar 0xF2 // 'OneVar_' -#define tTwoVar 0xF3 -#define tLR 0xF4 // 'LinR(A+BX)' -#define tLRExp 0xF5 // 'ExpR_' -#define tLRLn 0xF6 // 'LnR_' -#define tLRPwr 0xF7 // 'PwrR_' -#define tMedMed 0xF8 -#define tQuad 0xF9 -#define tClrLst 0xFA // 'Clear List' -#define tClrTbl 0xFB // 'Clear Table' -#define tHist 0xFC // 'Hist_' -#define txyLine 0xFD // 'xyline_' -#define tScatter 0xFE // 'Scatter_' -#define tLR1 0xFF // 'LINR(AX+B)' - -#define tGFormat 0x7E -// 2nd Half Of Graph Format Tokens -#define tSeq 0x00 // 'SeqG' -#define tSimulG 0x01 // 'SimulG' -#define tPolarG 0x02 // 'PolarGC' -#define tRectG 0x03 // 'RectGC' -#define tCoordOn 0x04 // 'CoordOn' -#define tCoordOff 0x05 // 'CoordOff' -#define tDrawLine 0x06 // 'DrawLine' -#define tDrawDot 0x07 // 'DrawDot' -#define tAxisOn 0x08 // 'AxesOn' -#define tAxisOff 0x09 // 'AxesOff' -#define tGridOn 0x0A // 'GridOn' -#define tGridOff 0x0B // 'GridOff' -#define tLblOn 0x0C // 'LabelOn' -#define tLblOff 0x0D // 'LabelOff' -#define tWebOn 0x0E // 'WebOn' -#define tWebOff 0x0F // 'WebOFF' -#define tuv 0x10 // U vs V -#define tvw 0x11 // V vs W -#define tuw 0x12 // U vs W - -#define tVarMat 0x5C -// 2nd Half Of User Matrix Tokens -#define tMatA 0x00 // MAT A -#define tMatB 0x01 // MAT B -#define tMatC 0x02 // MAT C -#define tMatD 0x03 // MAT D -#define tMatE 0x04 // MAT E -#define tMatF 0x05 // MAT F -#define tMatG 0x06 // MAT G -#define tMatH 0x07 // MAT H -#define tMatI 0x08 // MAT I -#define tMatJ 0x09 // MAT J - -#define tVarLst 0x5D -// 2nd Half Of User List Tokens -#define tL1 0x00 // LIST 1 -#define tL2 0x01 // LIST 2 -#define tL3 0x02 // LIST 3 -#define tL4 0x03 // LIST 4 -#define tL5 0x04 // LIST 5 -#define tL6 0x05 // LIST 6 - -#define tVarEqu 0x5E -// 2nd Half Of User Equation Tokens - -// Y Equations have bit 4 set -#define tY1 0x10 // Y1 -#define tY2 0x11 // Y2 -#define tY3 0x12 // Y3 -#define tY4 0x13 // Y4 -#define tY5 0x14 // Y5 -#define tY6 0x15 // Y6 -#define tY7 0x16 // Y7 -#define tY8 0x17 // Y8 -#define tY9 0x18 // Y9 -#define tY0 0x19 // Y0 - -// Param Equations Have Bit 5 Set -#define tX1T 0x20 // X1t -#define tY1T 0x21 // Y1t -#define tX2T 0x22 // X2t -#define tY2T 0x23 // Y2t -#define tX3T 0x24 // X3t -#define tY3T 0x25 // Y3t -#define tX4T 0x26 // X4t -#define tY4T 0x27 // Y4t -#define tX5T 0x28 // X5t -#define tY5T 0x29 // Y5t -#define tX6T 0x2A // X6t -#define tY6T 0x2B // Y6t - -// Polar Equations Have Bit 6 Set -#define tR1 0x40 // R1 -#define tR2 0x41 // R2 -#define tR3 0x42 // R3 -#define tR4 0x43 // R4 -#define tR5 0x44 // R5 -#define tR6 0x45 // R6 - -// Recursion Equations Have Bit 7 Set -#define tun 0x80 // Un -#define tvn 0x81 // Vn -#define twn 0x82 // Wn - -#define tVarPict 0x60 -// 2nd Half User Picture Tokens -#define tPic1 0x00 // PIC1 -#define tPic2 0x01 // PIC2 -#define tPic3 0x02 // PIC3 -#define tPic4 0x03 // PIC4 -#define tPic5 0x04 // PIC5 -#define tPic6 0x05 // PIC6 -#define tPic7 0x06 // PIC7 -#define tPic8 0x07 // PIC8 -#define tPic9 0x08 // PIC9 -#define tPic0 0x09 // PIC0 - -#define tVarGDB 0x61 -// 2nd Half User Graph Database Tokens -#define tGDB1 0x00 // GDB1 -#define tGDB2 0x01 // GDB2 -#define tGDB3 0x02 // GDB3 -#define tGDB4 0x03 // GDB4 -#define tGDB5 0x04 // GDB5 -#define tGDB6 0x05 // GDB6 -#define tGDB7 0x06 // GDB7 -#define tGDB8 0x07 // GDB8 -#define tGDB9 0x08 // GDB9 -#define tGDB0 0x09 // GDB0 - -#define tVarStrng 0xAA -// 2nd Half Of String Vars -#define tStr1 0x00 -#define tStr2 0x01 -#define tStr3 0x02 -#define tStr4 0x03 -#define tStr5 0x04 -#define tStr6 0x05 -#define tStr7 0x06 -#define tStr8 0x07 -#define tStr9 0x08 -#define tStr0 0x09 - -#define tVarOut 0x62 -// 2nd Half Of System Output Only Variables -#define tRegEq 0x01 // REGRESSION EQUATION -#define tStatN 0x02 // STATISTICS N -#define tXMean 0x03 // X MEAN -#define tSumX 0x04 // SUM(X) -#define tSumXSqr 0x05 // SUM(X^2) -#define tStdX 0x06 // STANDARD DEV X -#define tStdPX 0x07 // STANDARD DEV POP X -#define tMinX 0x08 // Min X VALUE -#define tMaxX 0x09 // Max X VALUE -#define tMinY 0x0A // Min Y VALUE -#define tMaxY 0x0B // Max Y VALUE -#define tYmean 0x0C // Y MEAN -#define tSumY 0x0D // SUM(Y) -#define tSumYSqr 0x0E // SUM(Y^2) -#define tStdY 0x0F // STANDARD DEV Y -#define tStdPY 0x10 // STANDARD DEV POP Y -#define tSumXY 0x11 // SUM(XY) -#define tCorr 0x12 // CORRELATION -#define tMedX 0x13 // MED(X) -#define tQ1 0x14 // 1ST QUADRANT OF X -#define tQ3 0x15 // 3RD QUADRANT OF X -#define tQuadA 0x16 // 1ST TERM OF QUAD POLY REG/ Y-INT -#define tQuadB 0x17 // 2ND TERM OF QUAD POLY REG/ SLOPE -#define tQuadC 0x18 // 3RD TERM OF QUAD POLY REG -#define tCubeD 0x19 // 4TH TERM OF CUBIC POLY REG -#define tQuartE 0x1A // 5TH TERM OF QUART POLY REG -#define tMedX1 0x1B // x1 FOR MED-MED -#define tMedX2 0x1C // x2 FOR MED-MED -#define tMedX3 0x1D // x3 FOR MED-MED -#define tMedY1 0x1E // y1 FOR MED-MED -#define tMedY2 0x1F // y2 FOR MED-MED -#define tMedY3 0x20 // y3 FOR MED-MED -#define tRecurn 0x21 // RECURSION N -#define tStatP 0x22 -#define tStatZ 0x23 -#define tStatT 0x24 -#define tStatChi 0x25 -#define tStatF 0x26 -#define tStatDF 0x27 -#define tStatPhat 0x28 -#define tStatPhat1 0x29 -#define tStatPhat2 0x2A -#define tStatMeanX1 0x2B -#define tStatStdX1 0x2C -#define tStatN1 0x2D -#define tStatMeanX2 0x2E -#define tStatStdX2 0x2F -#define tStatN2 0x30 -#define tStatStdXP 0x31 -#define tStatLower 0x32 -#define tStatUpper 0x33 -#define tStat_s 0x34 -#define tLRSqr 0x35 -#define tBRSqr 0x36 - -// These next tokens are only used to access the data -// They are display only and the user cannot access them at all -#define tF_DF 0x37 -#define tF_SS 0x38 -#define tF_MS 0x39 -#define tE_DF 0x3A -#define tE_SS 0x3B -#define tE_MS 0x3C - -#define tVarSys 0x63 -// 2nd Half Of System Input/Output Variables -#define tuXscl 0x00 -#define tuYscl 0x01 -#define tXscl 0x02 -#define tYscl 0x03 -#define tRecuru0 0x04 -#define tRecurv0 0x05 -#define tun1 0x06 -#define tvn1 0x07 -#define tuRecuru0 0x08 -#define tuRecurv0 0x09 -#define tXmin 0x0A -#define tXmax 0x0B -#define tYmin 0x0C -#define tYmax 0x0D -#define tTmin 0x0E -#define tTmax 0x0F -#define tThetaMin 0x10 -#define tThetaMax 0x11 -#define tuXmin 0x12 -#define tuXmax 0x13 -#define tuYmin 0x14 -#define tuYmax 0x15 -#define tuThetMin 0x16 -#define tuThetMax 0x17 -#define tuTmin 0x18 -#define tuTmax 0x19 -#define tTblMin 0x1A -#define tPlotStart 0x1B -#define tuPlotStart 0x1C -#define tnMax 0x1D -#define tunMax 0x1E -#define tnMin 0x1F -#define tunMin 0x20 -#define tTblStep 0x21 -#define tTStep 0x22 -#define tThetaStep 0x23 -#define tuTStep 0x24 -#define tuThetStep 0x25 -#define tDeltaX 0x26 -#define tDeltaY 0x27 -#define tXFact 0x28 -#define tYFact 0x29 -#define tTblInput 0x2A -#define tFinN 0x2B -#define tFinI 0x2C -#define tFinPV 0x2D -#define tFinPMT 0x2E -#define tFinFV 0x2F -#define tFinPY 0x30 -#define tFinCY 0x31 -#define tRecurw0 0x32 -#define tuRecurw0 0x33 -#define tPlotStep 0x34 -#define tuPlotStep 0x35 -#define tXres 0x36 -#define tuXres 0x37 -#define tRecuru02 0x38 -#define tuRecuru02 0x39 -#define tRecurv02 0x3C -#define tuRecurv02 0x3D -#define tRecurw02 0x3E -#define tuRecurw02 0x3F - -// 2nd Byte Of t2ByteTok Tokens -#define tFinNPV 0x00 -#define tFinIRR 0x01 -#define tFinBAL 0x02 -#define tFinPRN 0x03 -#define tFinINT 0x04 -#define tFinToNom 0x05 -#define tFinToEff 0x06 -#define tFinDBD 0x07 -#define tLCM 0x08 -#define tGCD 0x09 -#define tRandInt 0x0A -#define tRandBin 0x0B -#define tSubStrng 0x0C -#define tStdDev 0x0D -#define tVariance 0x0E -#define tInStrng 0x0F -#define tDNormal 0x10 -#define tInvNorm 0x11 -#define tDT 0x12 -#define tChI 0x13 -#define tDF 0x14 -#define tBINPDF 0x15 -#define tBINCDF 0x16 -#define tPOIPDF 0x17 -#define tPOICDF 0x18 -#define tGEOPDF 0x19 -#define tGEOCDF 0x1A -#define tNormalPDF 0x1B -#define tTPDF 0x1C -#define tChiPDF 0x1D -#define tFPDF 0x1E -#define tRandNorm 0x1F -#define tFinFPMT 0x20 -#define tFinFI 0x21 -#define tFinFPV 0x22 -#define tFinFN 0x23 -#define tFinFFV 0x24 -#define tConj 0x25 -#define tReal 0x26 -#define tImag 0x27 -#define tAngle 0x28 -#define tCumSum 0x29 -#define tExpr 0x2A -#define tLength 0x2B -#define tDeltaLst 0x2C -#define tRef 0x2D -#define tRRef 0x2E -#define tToRect 0x2F -#define tToPolar 0x30 -#define tConste 0x31 -#define tSinReg 0x32 -#define tLogistic 0x33 -#define tLinRegTTest 0x34 -#define tShadeNorm 0x35 -#define tShadeT 0x36 -#define tShadeChi 0x37 -#define tShadeF 0x38 -#define tMatToLst 0x39 -#define tLstToMat 0x3A -#define tZTest 0x3B -#define tTTest 0x3C -#define t2SampZTest 0x3D -#define t1PropZTest 0x3E -#define t2PropZTest 0x3F -#define tChiTest 0x40 -#define tZIntVal 0x41 -#define t2SampZInt 0x42 -#define t1PropZInt 0x43 -#define t2PropZInt 0x44 -#define tGraphStyle 0x45 -#define t2SampTTest 0x46 -#define t2SampFTest 0x47 -#define tTIntVal 0x48 -#define t2SampTInt 0x49 -#define tSetupLst 0x4A -#define tFinPMTend 0x4B -#define tFinPMTbeg 0x4C -#define tRealM 0x4D -#define tPolarM 0x4E -#define tRectM 0x4F -#define tExprOn 0x50 -#define tExprOff 0x51 -#define tClrAllLst 0x52 -#define tGetCalc 0x53 -#define tDelVar 0x54 -#define tEquToStrng 0x55 -#define tStrngToequ 0x56 -#define tDelLast 0x57 -#define tSelect 0x58 -#define tANOVA 0x59 -#define tModBox 0x5A -#define tNormProb 0x5B -#define tMGT 0x64 -#define tZFit 0x65 -#define tDiag_on 0x66 -#define tDiag_off 0x67 -#define tArchive 0x68 -#define tUnarchive 0x69 -#define tAsm 0x6A -#define tAsmComp 0x6B -#define tAsmPrgm 0x6C -#define tAsmCmp 0x6D -#define tLcapAAcute 0x6E -#define tLcapAGrave 0x6F -#define tLcapACaret 0x70 -#define tLcapADier 0x71 -#define tLaAcute 0x72 -#define tLaGrave 0x73 -#define tLaCaret 0x74 -#define tLaDier 0x75 -#define tLcapEAcute 0x76 -#define tLcapEGrave 0x77 -#define tLcapECaret 0x78 -#define tLcapEDier 0x79 -#define tLeAcute 0x7A -#define tLeGrave 0x7B -#define tLeCaret 0x7C -#define tLeDier 0x7D -#define tLcapIGrave 0x7F -#define tLcapICaret 0x80 -#define tLcapIDier 0x81 -#define tLiAcute 0x82 -#define tLiGrave 0x83 -#define tLiCaret 0x84 -#define tLiDier 0x85 -#define tLcapOAcute 0x86 -#define tLcapOGrave 0x87 -#define tLcapOCaret 0x88 -#define tLcapODier 0x89 -#define tLoAcute 0x8A -#define tLoGrave 0x8B -#define tLoCaret 0x8C -#define tLoDier 0x8D -#define tLcapUAcute 0x8E -#define tLcapUGrave 0x8F -#define tLcapUCaret 0x90 -#define tLcapUDier 0x91 -#define tLuAcute 0x92 -#define tLuGrave 0x93 -#define tLuCaret 0x94 -#define tLuDier 0x95 -#define tLcapCCed 0x96 -#define tLcCed 0x97 -#define tLcapNTilde 0x98 -#define tLnTilde 0x99 -#define tLaccent 0x9A -#define tLgrave 0x9B -#define tLdieresis 0x9C -#define tLquesDown 0x9D -#define tLexclamDown 0x9E -#define tLalpha 0x9F -#define tLbeta 0xA0 -#define tLgamma 0xA1 -#define tLcapDelta 0xA2 -#define tLdelta 0xA3 -#define tLepsilon 0xA4 -#define tLlambda 0xA5 -#define tLmu 0xA6 -#define tLpi 0xA7 -#define tLrho 0xA8 -#define tLcapSigma 0xA9 -#define tLphi 0xAB -#define tLcapOmega 0xAC -#define tLphat 0xAD -#define tLchi 0xAE -#define tLstatF 0xAF -#define tLa 0xB0 -#define tLb 0xB1 -#define tLc 0xB2 -#define tLd 0xB3 -#define tLsmalle 0xB4 -#define tLf 0xB5 -#define tLsmallg 0xB6 -#define tLh 0xB7 -#define tLi 0xB8 -#define tLj 0xB9 -#define tLk 0xBA -#define tLl 0xBC -#define tLm 0xBD -#define tLsmalln 0xBE -#define tLo 0xBF -#define tLp 0xC0 -#define tLq 0xC1 -#define tLsmallr 0xC2 -#define tLs 0xC3 -#define tLsmallt 0xC4 -#define tLu 0xC5 -#define tLv 0xC6 -#define tLw 0xC7 -#define tLx 0xC8 -#define tLy 0xC9 -#define tLz 0xCA -#define tLsigma 0xCB -#define tLtau 0xCC -#define tLcapIAcute 0xCD -#define tGarbageCollect 0xCE - -#define tExtTok 0xEF -// 2nd Byte Of tExtTok Tokens -#define tSetDate 0x00 -#define tSetTime 0x01 -#define tCheckTmr 0x02 -#define tSetDtFmt 0x03 -#define tSetTmFmt 0x04 -#define tTimeCnv 0x05 -#define tDayOfWk 0x06 -#define tGetDtStr 0x07 -#define tGetTmStr 0x08 -#define tGetDate 0x09 -#define tGetTime 0x0A -#define tStartTmr 0x0B -#define tGtDtFmt 0x0C -#define tGetTmFmt 0x0D -#define tIsClockOn 0x0E -#define tClockOff 0x0F -#define tClockOn 0x10 -#define tOpenLib 0x11 -#define tExecLib 0x12 -#define tInvT 0x13 -#define tChiSquaredTest 0x14 -#define tLinRegTInt 0x15 -#define tManualFit 0x16 -#define tZQuadrant 0x17 -#define tZFracHalf 0x18 -#define tZFracThird 0x19 -#define tZFracFourth 0x1A -#define tZFracFifth 0x1B -#define tZFracEighth 0x1C -#define tZFracTenth 0x1D -#define tFracSlash 0x2E -#define tFracMixedNum 0x2F -#define tSwapImProper 0x30 -#define tSwapFracDec 0x31 -#define tRemainder 0x32 -#define tSummationSigma 0x33 -#define tLogBase 0x34 -#define tRandIntNoRep 0x35 -#define tMathPrint 0x36 -#define tClassic 0x38 -#define tAutoAnswer 0x3B -#define tDecAnswer 0x3C -#define tFracAnswer 0x3D -#define tBlue 0x41 -#define tRed 0x42 -#define tBlack 0x43 -#define tMagenta 0x44 -#define tGreen 0x45 -#define tOrange 0x46 -#define tBrown 0x47 -#define tNavy 0x48 -#define tLtBlue 0x49 -#define tYellow 0x4A -#define tWhite 0x4B -#define tLtGray 0x4C -#define tMedGray 0x4D -#define tGray 0x4E -#define tDarkGray 0x4F -#define tGraphColor 0x65 -#define tTextColor 0x67 -#define tBackgroundOn 0x5B -#define tBackgroundOff 0x64 -#define tThin 0x74 -#define tBorderColor 0x6C -#define tAsm84CPrgm 0x68 -#define tAsm84CCmp 0x69 -#define tAsm84CeCmp 0x7B -#define tAsm84CePrgm 0x7A - -/* 2 byte extended tokens (tExtTok) present in OS 5.2 and above */ -#define tSEQn 0x8F /* 'SEQ(n)' */ -#define tSEQn1 0x90 /* 'SEQ(n+1)' */ -#define tSEQn2 0x91 /* 'SEQ(n+2)' */ -#define tLEFT 0x92 /* 'LEFT' */ -#define tCENTER 0x93 /* 'CENTER' */ -#define tRIGHT 0x94 /* 'RIGHT' */ -#define tInvBinom 0x95 /* 'invBinom(' */ -#define tWait 0x96 /* 'Wait_' */ -#define tToString 0x97 /* 'toString(' */ -#define tEval 0x98 /* 'eval(' */ - -/* - * --- TIOS System error codes --- - */ -#define OS_E_EDIT (1<<7) -#define OS_E_MASK (0x7F) -#define OS_E_OVERFLOW (1+OS_E_EDIT) -#define OS_E_DIVBY0 (2+OS_E_EDIT) -#define OS_E_SINGULARMAT (3+OS_E_EDIT) -#define OS_E_DOMAIN (4+OS_E_EDIT) -#define OS_E_INCREMENT (5+OS_E_EDIT) -#define OS_E_BREAK (6+OS_E_EDIT) -#define OS_E_NONREAL (7+OS_E_EDIT) -#define OS_E_SYNTAX (8+OS_E_EDIT) -#define OS_E_DATATYPE (9+OS_E_EDIT) -#define OS_E_ARGUMENT (10+OS_E_EDIT) -#define OS_E_DIMMISMATCH (11+OS_E_EDIT) -#define OS_E_DIMENSION (12+OS_E_EDIT) -#define OS_E_UNDEFINED (13+OS_E_EDIT) -#define OS_E_MEMORY (14+OS_E_EDIT) -#define OS_E_INVALID (15+OS_E_EDIT) -#define OS_E_ILLEGALNEST (16+OS_E_EDIT) -#define OS_E_BOUND (17+OS_E_EDIT) -#define OS_E_GRAPHRANGE (18+OS_E_EDIT) -#define OS_E_ZOOM (19+OS_E_EDIT) -#define OS_E_LABEL (20) -#define OS_E_STAT (21) -#define OS_E_SOLVER (22+OS_E_EDIT) -#define OS_E_SINGULARITY (23+OS_E_EDIT) -#define OS_E_SIGNCHANGE (24+OS_E_EDIT) -#define OS_E_ITERATIONS (25+OS_E_EDIT) -#define OS_E_BADGUESS (26+OS_E_EDIT) -#define OS_E_STATPLOT (27) -#define OS_E_TOLTOOSMALL (28+OS_E_EDIT) -#define OS_E_RESERVED (29+OS_E_EDIT) -#define OS_E_MODE (30+OS_E_EDIT) -#define OS_E_LNKERR (31+OS_E_EDIT) -#define OS_E_LNKMEMERR (32+OS_E_EDIT) -#define OS_E_LNKTRANSERR (33+OS_E_EDIT) -#define OS_E_LNKDUPERR (34+OS_E_EDIT) -#define OS_E_LNKMEMFULL (35+OS_E_EDIT) -#define OS_E_UNKNOWN (36+OS_E_EDIT) -#define OS_E_SCALE (37+OS_E_EDIT) -#define OS_E_IDNOTFOUND (38) -#define OS_E_NOMODE (39+OS_E_EDIT) -#define OS_E_VALIDATION (40) -#define OS_E_LENGTH (41+OS_E_EDIT) -#define OS_E_APPLICATION (42+OS_E_EDIT) -#define OS_E_APPERR1 (43+OS_E_EDIT) -#define OS_E_APPERR2 (44+OS_E_EDIT) -#define OS_E_EXPIREDAPP (45) -#define OS_E_BADADD (46) -#define OS_E_ARCHIVED (47+OS_E_EDIT) -#define OS_E_VERSION (48) -#define OS_E_ARCHFULL (49) -#define OS_E_VARIABLE (50+OS_E_EDIT) -#define OS_E_DUPLICATE (51+OS_E_EDIT) - -/* - * --- TI-OS os_GetCSC Scan Code Return Values --- - */ -#define sk_Down 0x01 -#define sk_Left 0x02 -#define sk_Right 0x03 -#define sk_Up 0x04 -#define sk_Enter 0x09 -#define sk_2nd 0x36 -#define sk_Clear 0x0F -#define sk_Alpha 0x30 -#define sk_Add 0x0A -#define sk_Sub 0x0B -#define sk_Mul 0x0C -#define sk_Div 0x0D -#define sk_Graph 0x31 -#define sk_Trace 0x32 -#define sk_Zoom 0x33 -#define sk_Window 0x34 -#define sk_Yequ 0x35 -#define sk_Mode 0x37 -#define sk_Del 0x38 -#define sk_Store 0x2A -#define sk_Ln 0x2B -#define sk_Log 0x2C -#define sk_Square 0x2D -#define sk_Recip 0x2E -#define sk_Math 0x2F -#define sk_0 0x21 -#define sk_1 0x22 -#define sk_4 0x23 -#define sk_7 0x24 -#define sk_2 0x1A -#define sk_5 0x1B -#define sk_8 0x1C -#define sk_3 0x12 -#define sk_6 0x13 -#define sk_9 0x14 -#define sk_Comma 0x25 -#define sk_Sin 0x26 -#define sk_Apps 0x27 -#define sk_GraphVar 0x28 -#define sk_DecPnt 0x19 -#define sk_LParen 0x1D -#define sk_Cos 0x1E -#define sk_Prgm 0x1F -#define sk_Stat 0x20 -#define sk_Chs 0x11 -#define sk_RParen 0x15 -#define sk_Tan 0x16 -#define sk_Vars 0x17 -#define sk_Power 0x0E - -/* Compatibility defines */ -#define prgm_CleanUp() -#define pgrm_CleanUp() -#define memset_fast memset - -#ifdef __cplusplus -} -#endif - -#endif +/** + * @file + * @authors Matt "MateoConLechuga" Waltz + * @authors Jacob "jacobly" Young + * @brief Core CE define file + */ + +#ifndef H_TICE +#define H_TICE + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Hardware & custom macros/functions + */ + +/** + * Returns a pseudo-random 32-bit integer. + * + * @return the random integer + */ +uint32_t random(void); + +/** + * Seeds the pseudo-random number generator used by random() and rand() with the + * value seed. + * + * @param seed the seed value + */ +void srandom(uint32_t seed); + +/** + * Returns a pseudo-random integer in the range of \p min to \p max (inclusive). + */ +#define randInt(min, max) \ +((unsigned)random() % ((max) - (min) + 1) + (min)) + +/** + * Delays for a number of milliseconds. + *

+ * Counts time spent while interrupted. Assumes a CPU clock speed of 48MHz. + * + * @param msec number of milliseconds + */ +void delay(uint16_t msec); + +/** + * "Atomically" loads from a volatile 32-bit value. + * + * @remarks + * The hardware does not provide a mechanism to truly atomically load from a + * 32-bit value. This "atomic" load is implemented by non-atomically reading the + * value twice and retrying if the values read differ. + * + * @attention + * If the maximum period between two value changes is 1us or less (assuming a + * CPU clock speed of 48MHz), then this function may never complete. For + * instance, the counter of a timer ticking at 1MHz or more should not be read + * using this function. In such a case of a purely increasing or decreasing + * value, atomic_load_increasing_32() or atomic_load_decreasing_32() may be + * appropriate instead. + * + * @param p pointer to 32-bit value + */ +uint32_t atomic_load_32(volatile uint32_t *p); + +/** + * "Atomically" loads from a volatile, increasing 32-bit value. + * + * @remarks + * The hardware does not provide a mechanism to truly atomically load from a + * 32-bit value. This "atomic" load is implemented by temporarily disabling + * interrupts while non-atomically reading the value twice and then returning + * the lesser of the two values read. + * + * @attention + * If the minimum period between two value changes is 5us or less and the + * value's maximum rate of change over a 5us period exceeds 256 (assuming a CPU + * clock speed of 48MHz), then the value returned may be incorrect. Of relevant + * note may be the fact that a 48MHz counter does not exceed this limit. + * + * @param p pointer to 32-bit value + */ +uint32_t atomic_load_increasing_32(volatile uint32_t *p); + +/** + * "Atomically" loads from a volatile, decreasing 32-bit value. + * + * @remarks + * The hardware does not provide a mechanism to truly atomically load from a + * 32-bit value. This "atomic" load is implemented by temporarily disabling + * interrupts while non-atomically reading the value twice and then returning + * the greater of the two values read. + * + * @attention + * If the minimum period between two value changes is 5us or less and the + * value's maximum rate of change over a 5us period exceeds 256 (assuming a CPU + * clock speed of 48MHz), then the value returned may be incorrect. Of relevant + * note may be the fact that a 48MHz counter does not exceed this limit. + * + * @param p pointer to 32-bit value + */ +uint32_t atomic_load_decreasing_32(volatile uint32_t *p); + +/** + * Gets a combination of the RTC time; useful for srand() + */ +#define rtc_Time() (*(volatile uint32_t*)0xF30044) + +/* RTC definitions */ +#define RTC_UNFREEZE (1<<7) +#define RTC_FREEZE (0<<7) +#define RTC_LOAD (1<<6) +#define RTC_ENABLE ((1<<0)|(RTC_UNFREEZE)) +#define RTC_DISABLE (0<<0) + +/* RTC registers */ +#define rtc_Seconds (*(volatile uint8_t*)0xF30000) +#define rtc_Minutes (*(volatile uint8_t*)0xF30004) +#define rtc_Hours (*(volatile uint8_t*)0xF30008) +#define rtc_Days (*(volatile uint16_t*)0xF3000C) +#define rtc_AlarmSeconds (*(uint8_t*)0xF30010) +#define rtc_AlarmMinutes (*(uint8_t*)0xF30014) +#define rtc_AlarmHours (*(uint8_t*)0xF30018) +#define rtc_Control (*(uint8_t*)0xF30020) +#define rtc_LoadSeconds (*(uint8_t*)0xF30024) +#define rtc_LoadMinutes (*(uint8_t*)0xF30028) +#define rtc_LoadHours (*(uint8_t*)0xF3002C) +#define rtc_LoadDays (*(uint16_t*)0xF30030) +#define rtc_IntStatus (*(volatile uint8_t*)0xF30034) +#define rtc_IntAcknowledge (*(volatile uint8_t*)0xF30034) +#define rtc_IsBusy() (rtc_Control & RTC_LOAD) + +/* RTC interrupt masks */ +#define RTC_ALARM_INT_SOURCE (1<<5) +#define RTC_DAY_INT_SOURCE (1<<4) +#define RTC_HR_INT_SOURCE (1<<3) +#define RTC_MIN_INT_SOURCE (1<<2) +#define RTC_SEC_INT_SOURCE (1<<1) + +/* RTC interrupt statuses */ +#define RTC_LOAD_INT (1<<5) +#define RTC_ALARM_INT (1<<4) +#define RTC_DAY_INT (1<<3) +#define RTC_HR_INT (1<<2) +#define RTC_MIN_INT (1<<1) +#define RTC_SEC_INT (1<<0) +#define RTC_INT_MASK (RTC_SEC_INT | RTC_MIN_INT | RTC_HR_INT | RTC_DAY_INT | RTC_ALARM_INT | RTC_LOAD_INT) + +/* Whole bunch of useful timer functions */ +#define TIMER1_ENABLE (1<<0) /* Enables Timer 1 */ +#define TIMER1_DISABLE (0<<0) /* Disables Timer 1 */ +#define TIMER1_32K (1<<1) /* Use the 32K clock for timer 1 */ +#define TIMER1_CPU (0<<1) /* Use the CPU clock rate for timer 1 */ +#define TIMER1_0INT (1<<2) /* Enable an interrupt when 0 is reached for the timer 1 */ +#define TIMER1_NOINT (0<<2) /* Disable interrupts for the timer 1 */ +#define TIMER1_UP (1<<9) /* Timer 1 counts up */ +#define TIMER1_DOWN (0<<9) /* Timer 1 counts down */ + +#define TIMER2_ENABLE (1<<3) /* Enables Timer 2 */ +#define TIMER2_DISABLE (0<<3) /* Disables Timer 2 */ +#define TIMER2_32K (1<<4) /* Use the 32K clock for timer 2 */ +#define TIMER2_CPU (0<<4) /* Use the CPU clock rate for timer 2 */ +#define TIMER2_0INT (1<<5) /* Enable an interrupt when 0 is reached for the timer 2 */ +#define TIMER2_NOINT (0<<5) /* Disable interrupts for the timer 2 */ +#define TIMER2_UP (1<<10) /* Timer 2 counts up */ +#define TIMER2_DOWN (0<<10) /* Timer 2 counts down */ + +#define TIMER3_ENABLE (1<<6) /* Enables Timer 3 */ +#define TIMER3_DISABLE (0<<6) /* Disables Timer 3 */ +#define TIMER3_32K (1<<7) /* Use the 32K clock for timer 3 */ +#define TIMER3_CPU (0<<7) /* Use the CPU clock rate for timer 3 */ +#define TIMER3_0INT (1<<8) /* Enable an interrupt when 0 is reached for the timer 3 */ +#define TIMER3_NOINT (0<<8) /* Disable interrupts for the timer 3 */ +#define TIMER3_UP (1<<11) /* Timer 3 counts up */ +#define TIMER3_DOWN (0<<11) /* Timer 3 counts down */ + +/* These defines can be used to check the status of the timer */ +#define TIMER1_MATCH1 (1<<0) /* Timer 1 hit the first match value */ +#define TIMER1_MATCH2 (1<<1) /* Timer 1 hit the second match value */ +#define TIMER1_RELOADED (1<<2) /* Timer 1 was reloaded (Needs TIMER1_0INT enabled) */ + +#define TIMER2_MATCH1 (1<<3) /* Timer 2 hit the first match value */ +#define TIMER2_MATCH2 (1<<4) /* Timer 2 hit the second match value */ +#define TIMER2_RELOADED (1<<5) /* Timer 2 was reloaded (Needs TIMER2_0INT enabled) */ + +#define TIMER3_MATCH1 (1<<6) /* Timer 3 hit the first match value */ +#define TIMER3_MATCH2 (1<<7) /* Timer 3 hit the second match value */ +#define TIMER3_RELOADED (1<<8) /* Timer 3 was reloaded (Needs TIMER3_0INT enabled) */ + +/* Timer registers */ +#define timer_1_Counter (*(volatile uint32_t*)0xF20000) +#define timer_1_ReloadValue (*(uint32_t*)0xF20004) +#define timer_1_MatchValue_1 (*(uint32_t*)0xF20008) +#define timer_1_MatchValue_2 (*(uint32_t*)0xF2000C) +#define timer_2_Counter (*(volatile uint32_t*)0xF20010) +#define timer_2_ReloadValue (*(uint32_t*)0xF20014) +#define timer_2_MatchValue_1 (*(uint32_t*)0xF20018) +#define timer_2_MatchValue_2 (*(uint32_t*)0xF2001C) +#define timer_3_Counter (*(volatile uint32_t*)0xF20020) +#define timer_3_ReloadValue (*(uint32_t*)0xF20024) +#define timer_3_MatchValue_1 (*(uint32_t*)0xF20028) +#define timer_3_MatchValue_2 (*(uint32_t*)0xF2002C) +#define timer_Control (*(uint16_t*)0xF20030) +#define timer_IntStatus (*(volatile uint16_t*)0xF20034) +#define timer_IntAcknowledge (*(volatile uint16_t*)0xF20034) +#define timer_EnableInt (*(uint16_t*)0xF20038) + +/* LCD defines */ +#define lcd_BacklightLevel (*(uint8_t*)0xF60024) +#define lcd_Timing0 (*(uint32_t*)0xE30000) +#define lcd_Timing1 (*(uint32_t*)0xE30004) +#define lcd_Timing2 (*(uint32_t*)0xE30008) +#define lcd_Timing3 (*(uint24_t*)0xE3000C) +#define lcd_UpBase (*(uint32_t*)0xE30010) +#define lcd_LpBase (*(uint32_t*)0xE30014) +#define lcd_Control (*(uint24_t*)0xE30018) +#define lcd_EnableInt (*(uint8_t*)0xE3001C) +#define lcd_IntStatus (*(uint8_t*)0xE30020) +#define lcd_IntStatusMasked (*(uint8_t*)0xE30024) +#define lcd_IntAcknowledge (*(volatile uint8_t*)0xE30028) +#define lcd_UpBaseCurr (*(volatile uint32_t*)0xE3002C) +#define lcd_LpBaseCurr (*(volatile uint32_t*)0xE30030) +#define lcd_Palette ((uint16_t*)0xE30200) +#define lcd_Ram ((uint16_t*)0xD40000) + +/** + * Width of LCD in pixels + */ +#define LCD_WIDTH \ +(320) + +/** + * Height of LCD in pixels + */ +#define LCD_HEIGHT \ +(240) + +/** + * Total number of pixels in LCD + */ +#define LCD_SIZE \ +(LCD_WIDTH*LCD_HEIGHT*2) + +/** + * @brief Structure of real variable type + */ +typedef struct { int8_t sign, exp; uint8_t mant[7]; } real_t; +/** + * @brief Structure of complex variable type + */ +typedef struct { real_t real, imag; } cplx_t; +/** + * @brief Structure of list variable type + */ +typedef struct { uint16_t dim; real_t items[1]; } list_t; +/** + * @brief Structure of complex list variable type + */ +typedef struct { uint16_t dim; cplx_t items[1]; } cplx_list_t; +/** + * @brief Structure of matrix variable type + */ +typedef struct { uint8_t cols, rows; real_t items[1]; } matrix_t; +/** + * @brief Structure of string variable type + */ +typedef struct { uint16_t len; char data[1]; } string_t; +/** + * @brief Structure of equation variable type + */ +typedef struct { uint16_t len; char data[1]; } equ_t; +/** + * @brief Structure of miscellaneous variable type + */ +typedef struct { uint16_t size; uint8_t data[1]; } var_t; + +/** + * Gets an element from a matrix + * + * @param matrix Structure of matrix + * @param row Row in matrix + * @param col Column in matrix + * @returns real_t containing element data + */ +#define matrix_element(matrix, row, col) ((matrix)->items[(row)+(col)*(matrix)->rows]) + +/** + * Resets the OS homescreen; accounts for split screen + */ +#define os_ClrHome() do { _OS(asm_ClrLCD); _OS(asm_HomeUp); _OS(asm_DrawStatusBar); } while (0) + +/** + * Resets the OS homescreen fully + */ +#define os_ClrHomeFull() do { _OS(asm_ClrLCDFull); _OS(asm_HomeUp); _OS(asm_DrawStatusBar); } while (0) + +/* + * Bootcode functions + */ + +/** + * Sets the calculator's date + * + * Performs checks to ensure date is within range + * @param day Day to set + * @param month Month to set + * @param year Year to set + */ +void boot_SetDate(uint8_t day, uint8_t month, uint16_t year); + +/** + * Gets the calculator's date + * + * @param day Pointer to variable to store day + * @param month Pointer to variable to store month + * @param year Pointer to variable to store year + */ +void boot_GetDate(uint8_t *day, uint8_t *month, uint16_t *year); + +/** + * Sets the calculator's time + * + * Performs checks to ensure time is within range + * @param seconds Seconds to set + * @param minutes Minutes to set + * @param hours Hours to set + */ +void boot_SetTime(uint8_t seconds, uint8_t minutes, uint8_t hours); + +/** + * Gets the calculator's time + * + * @param seconds Pointer to variable to store seconds + * @param minutes Pointer to variable to store minutes + * @param hours Pointer to variable to store hours + */ +void boot_GetTime(uint8_t *seconds, uint8_t *minutes, uint8_t *hours); + +/** + * Checks if past noon + * + * @returns True if past noon + */ +bool boot_IsAfterNoon(void); + +/** + * @returns Bootcode version major + */ +uint8_t boot_GetBootMajorVer(void); + +/** + * @returns Bootcode version minor + */ +uint8_t boot_GetBootMinorVer(void); + +/** + * @returns Hardware version + */ +uint8_t boot_GetHardwareVer(void); + +/** + * Turns all of VRAM into 0xFF (white) + */ +void boot_ClearVRAM(void); + +/** + * Checks if the [on] key was pressed + * + * @returns True is returned if [on] key was pressed + */ +bool boot_CheckOnPressed(void); + +/** + * Basically a reimplemented form of printf that prints to some debugging device + * + * @param string String to send to debug device + */ +void boot_DebugPrintf(const char *string); + +/** + * Turns off the calculator (probably not a good idea to use) + */ +void boot_TurnOff(void); + +/** + * Inserts a new line at the current cursor posistion on the homescreen + * Does not scroll. + */ +void boot_NewLine(void); + +/** + * @returns Current battery status + */ +uint8_t boot_GetBatteryStatus(void); + +/** + * Waits for ~10 ms + */ +void boot_WaitShort(void); + +/* + * OS Routines + */ + +/** + * Inserts a new line at the current cursor posistion on the homescreen + * Does scroll. + */ +void os_NewLine(void); + +/** + * Disables the OS cursor + */ +void os_DisableCursor(void); + +/** + * Enables the OS cursor + */ +void os_EnableCursor(void); + +/** + * Sets the foreground color used to draw text on the graphscreen + * @param color 565 BGR color to set text foreground to + */ +void os_SetDrawFGColor(uint24_t color); + +/** + * Gets the foreground color used to draw text on the graphscreen + * @returns 565 BGR color of text foreground + */ +uint24_t os_GetDrawFGColor(void); + +/** + * Sets the background color used to draw text on the graphscreen + * @param color 565 BGR color to set text background to + */ +void os_SetDrawBGColor(uint24_t color); + +/** + * Gets the background color used to draw text on the graphscreen + * + * @returns 565 BGR color of text nackground + * @warning Only useable in OS 5.2 and above; use at your own risk + */ +uint24_t os_GetDrawBGColor(void); + +/** + * Set the cursor posistion used on the homescreen + * + * @param curRow The row aligned offset + * @param curCol The column aligned offset + */ +void os_SetCursorPos(uint8_t curRow, uint8_t curCol); + +/** + * Gets the cursor posistion used on the homescreen + * + * @param curRow Pointer to store the row aligned offset + * @param curCol Pointer to store the column aligned offset + */ +void os_GetCursorPos(unsigned int *curRow, unsigned int *curCol); + +/** + * Selects the font to use when drawing on the graphscreen + * + * @param id + * 0: small font
+ * 1: large monospace font + */ +void os_FontSelect(char id); + +/** + * Gets the font to use when drawing on the graphscreen + * + * @returns + * 0: small font
+ * 1: large monospace font + */ +uint24_t os_FontGetID(void); + +/** + * @param string String to get pixel width of + * @returns The width of a string in the variable-width format + */ +uint24_t os_FontGetWidth(const char *string); + +/** + * @returns The height of the font characters + */ +uint24_t os_FontGetHeight(void); + +/** + * Draws text using the small font to the screen + * + * @param string String to draw + * @param col Column to start drawing at + * @param row Row to start drawing at + * @returns The end column + */ +uint24_t os_FontDrawText(const char *string, uint16_t col, uint8_t row); + +/** + * Draws transparent text using the small font to the screen + * + * @param string String to draw + * @param col Column to start drawing at + * @param row Row to start drawing at + * @returns The end column + */ +uint24_t os_FontDrawTransText(const char *string, uint16_t col, uint8_t row); + +/** + * Puts some text at the current homescreen cursor location + * + * @param string Test to put on homescreen + * @returns 1 if string fits on screen, 0 otherwise + */ +uint24_t os_PutStrFull(const char *string); + +/** + * Puts some text at the current homescreen cursor location + * + * @param string Test to put on homescreen + * @returns 1 if string fits on line, 0 otherwise + */ +uint24_t os_PutStrLine(const char *string); + +/** + * Set a particular flag variable + * + * @param offset Offset to particular flag in list + * @param set Bitmask of flag to set + */ +void os_SetFlagByte(int offset, uint8_t set); + +/** + * Get a particular flag variable + * + * @param offset Offset to particular flag in list + * @returns Bitmask of flag + */ +uint8_t os_GetFlagByte(int offset); + +/** + * Get amount of free ram in order to allocate extra ram + * + * @param free Set to start of free available ram + * @returns Size of available ram + */ +size_t os_MemChk(void **free); + +/** + * Throws an OS error + * + * @param error Error code to throw + */ +void os_ThrowError(uint8_t error); + +/** + * Gets a pointer to the system stats + * + * @returns + * [3] - Hardware version
+ * [12-13] - Boot Version Major
+ * [14] - Boot Version Minor
+ * [15-16] - Boot Version Build
+ * [28-37] - Calc ID (From certificate if exists)
+ * [38-39] - Appears to be localization language + */ +void *os_GetSystemStats(void); + +/** + * This function can return twice (like setjmp). + * First return always happens with a return value of 0. + * Second return only happens if an error occurs before os_PopErrorHandler is called, + * with the errNo as the return value. + * + * @code + * int errno = os_PushErrorHandler(); + * if (errno) { + * // handle error, but no longer under the protection of the error handler so do not call os_PopErrorHandler() + * } else { + * // run some code that may error + * os_PopErrorHandler(); + * } + * @endcode + * + * @param routine Error handling routine + * @see os_PopErrorHandler + */ +int os_PushErrorHandler(void); + +/** + * Restores stack state after a call to os_PushErrorHandler. Must be called with stack in the same state + * as it was when os_PushErrorHandler returned with 0, and should not be called along the error path. + * + * @see os_PushErrorHandler + */ +void os_PopErrorHandler(void); + +/** + * @returns A pointer to symtable of the OS + */ +void *os_GetSymTablePtr(void); + +/** + * Creates an AppVar + * + * @param name Pointer to name of AppVar to create + * @param size Size of AppVar to create + * @returns A pointer to the AppVar data + * @note Returns NULL if creation failed for some reason, otherwise a pointer to the size bytes + */ +var_t *os_CreateAppVar(const char *name, uint16_t size); + +/** + * Returns next entry or NULL if no more entries, pass os_GetSymTablePtr() as first entry + */ +void *os_NextSymEntry(void *entry, uint24_t *type, uint24_t *nameLength, char *name, void **data); + +/** + * Locates a symbol in the symtable + * + * @param type Type of symbol to find + * @param name Pointer to name of symbol to find + * @param entry Can be NULL if you don't care + * @param data Can be NULL if you don't care + * @returns If file exists, returns 1 and sets entry and data, otherwise returns 0. + */ +int os_ChkFindSym(uint8_t type, const char *name, void **entry, void **data); + +/** + * Gets the Ans variable + * + * @param type This is set to the current variable type in ANS + * @returns Pointer to the data + * @note Returns NULL if Ans doesn't exist or type is NULL + */ +void *os_RclAns(uint8_t *type); + +/** + * Copies a real_t type + * + * @param src Pointer to original real_t + * @returns Copied real_t + */ +real_t os_RealCopy(const real_t *src); + +/* Unary operations used to interact with the OS math functions */ +real_t os_RealAcosRad(const real_t *arg); +real_t os_RealAsinRad(const real_t *arg); +real_t os_RealAtanRad(const real_t *arg); +real_t os_RealCosRad(const real_t *arg); +real_t os_RealRadToDeg(const real_t *arg); +real_t os_RealExp(const real_t *arg); +real_t os_RealFloor(const real_t *arg); +real_t os_RealFrac(const real_t *arg); +real_t os_RealRoundInt(const real_t *arg); +real_t os_RealLog(const real_t *arg); +real_t os_RealNeg(const real_t *arg); +real_t os_RealDegToRad(const real_t *arg); +real_t os_RealInv(const real_t *arg); +real_t os_RealSinRad(const real_t *arg); +real_t os_RealSqrt(const real_t *arg); +real_t os_RealTanRad(const real_t *arg); +real_t os_RealInt(const real_t *arg); +cplx_t os_CplxSquare(const cplx_t *arg); + +/* Binary operations used to interact with the OS math functions */ +real_t os_RealAdd(const real_t *arg1, const real_t *arg2); +real_t os_RealDiv(const real_t *arg1, const real_t *arg2); +real_t os_RealGcd(const real_t *arg1, const real_t *arg2); +real_t os_RealLcm(const real_t *arg1, const real_t *arg2); +real_t os_RealMax(const real_t *arg1, const real_t *arg2); +real_t os_RealMin(const real_t *arg1, const real_t *arg2); +real_t os_RealMul(const real_t *arg1, const real_t *arg2); +real_t os_RealNcr(const real_t *total, const real_t *num); +real_t os_RealNpr(const real_t *total, const real_t *num); +real_t os_RealPow(const real_t *base, const real_t *exp); +real_t os_RealRandInt(const real_t *min, const real_t *max); +real_t os_RealMod(const real_t *arg1, const real_t *arg2); +real_t os_RealSub(const real_t *arg1, const real_t *arg2); + +/** + * Rounds a real_t + * + * @note digits must be in the range 0 - 9 + */ +real_t os_RealRound(const real_t *arg, char digits); + +/** + * Compares two real_t + * + * @returns -1, 0, or 1 depending on the comparison + */ +int os_RealCompare(const real_t *arg1, const real_t *arg2); + +/** + * Converts a real_t to an integer + * @note Saturates on overflow + */ +int24_t os_RealToInt24(const real_t *arg); + +/** + * Converts an integer to a real_t + * @note Saturates on overflow + */ +real_t os_Int24ToReal(int24_t arg); + +/** + * Converts a real_t to a float + * @note Saturates on overflow + */ +float os_RealToFloat(const real_t *arg); + +/** + * Converts an float to a real_t + * @note Saturates on overflow + */ +real_t os_FloatToReal(float arg); + +/** This converts a ti-float to a ti-ascii string. + * + * @param result Zero terminated string copied to this address + * @param arg Real to convert + * @param maxLength + * <=0: use default max length (14)
+ * >0: max length of result, minimum of 6 + * @param mode: + * 0: Use current mode for everything (digits ignored)
+ * 1: Normal mode
+ * 2: Sci mode
+ * 3: Eng mode
+ * >4: Use current Normal/Sci/Eng mode (digits still used)
+ * @param digits + * -1: Float mode
+ * 0-9: Fix # mode
+ * @returns Length of result + */ +int os_RealToStr(char *result, const real_t *arg, int8_t maxLength, uint8_t mode, int8_t digits); + +/** + * This converts a ti-ascii string to a ti-float. + * + * String format regexp: / *[-\032+]?[0-9]*(\.[0-9]*)?([eE\033][-\032+]?[0-9]*)?/ + * @param string TI-ascii string to convert + * @param end If non-null, pointer to end of parsed number is stored here + * @returns resulting TI-float; on exponent overflow this is +-9.9999999999999e99 + */ +real_t os_StrToReal(const char *string, char **end); + +/** + * High 8 is unsigned offset, low 8 is bits to test + */ +int os_TestFlagBits(uint16_t offset_pattern); +void os_SetFlagBits(int16_t offset_pattern); +void os_ResetFlagBits(int16_t offset_pattern); + +/** + * Custom implementation input routine for use in conjunction with the TIOS. + * It is HIGHLY recommended you implement your own routine, this routine has + * some quirks. It is good enough for getting basic input however. + * + * @param string Input prompt string to be displayed to the user + * @param buf Storage location to store input string + * @param bufsize Available storage size for input string. -1 for null termination. + * @returns None + */ +void os_GetStringInput(char *string, char *buf, size_t bufsize); + +/** + * Gets a key from the OS + * + * @returns Key code + * @returns Extended key code in high byte + */ +uint16_t os_GetKey(void); + +/** + * Disable text buffering on the homescreen. C programs use this area by default for the BSS / Heap. + */ +void os_DisableHomeTextBuffer(void); + +/** + * Enables text buffering on the homescreen. C programs use this area by default for the BSS / Heap. + */ +void os_EnableHomeTextBuffer(void); + +/** + * @brief Scan code type + */ +typedef uint8_t sk_key_t; + +/** + * Performs an OS call to get the keypad scan code + * + * You can also use this function to get input from the user as a string like this: + * @code + * const char *chars = "\0\0\0\0\0\0\0\0\0\0\"WRMH\0\0?[VQLG\0\0:ZUPKFC\0 YTOJEB\0\0XSNIDA\0\0\0\0\0\0\0\0"; + * uint8_t key, i = 0; + * char buffer[50]; + * + * while((key = os_GetCSC()) != sk_Enter) { + * if(chars[key]) { + * buffer[i++] = chars[key]; + * } + * } + * @endcode + * Feel free to modify the string to suit your needs. + * @returns Key scan code + */ +sk_key_t os_GetCSC(void); + +/** + * Runs the calulator at 6 MHz + */ +void boot_Set6MHzMode(void); + +/** + * Runs the calulator at 48 MHz + */ +void boot_Set48MHzMode(void); + +/** + * Runs the calulator at 6 MHz (saves interrupt status) + */ +void boot_Set6MHzModeI(void); + +/** + * Runs the calulator at 48 MHz (saves interrupt status) + */ +void boot_Set48MHzModeI(void); + +/** + * Executes the assembly routine _ForceCmdNoChar + */ +void os_ForceCmdNoChar(void); + +/** + * Use this function to call assembly functions in the OS and Bootcode + * i.e. _OS( asm_ArcChk ); + */ +void _OS(void (*function)(void)); + +/** + * Assembly routine to scroll homescreen up + */ +void asm_MoveUp(void); + +/** + * Assembly routine to scroll homescreen down + */ +void asm_MoveDown(void); + +/** + * Assembly routine to move row and column posistion to (0,0) + */ +void asm_HomeUp(void); + +/** + * Assembly routine to turn on the Run Indicator + */ +void asm_RunIndicOn(void); + +/** + * Assembly routine to turn off the Run Indicator + */ +void asm_RunIndicOff(void); + +/** + * Assembly routine to turn off APD + */ +void asm_DisableAPD(void); + +/** + * Assembly routine to turn on APD + */ +void asm_EnableAPD(void); + +/** + * Assembly routine checks the amount of free archive + */ +void asm_ArcChk(void); + +/** + * Assembly routine to clear the homescreen lcd + */ +void asm_ClrLCDFull(void); + +/** + * Assembly routine to clear the homescreen lcd. + * Accounts for split screen + */ +void asm_ClrLCD(void); + +/** + * Assembly routine to redraw the status bar + */ +void asm_DrawStatusBar(void); + +/** + * Invalidate and clear stat variables + */ +void asm_DelRes(void); + +/** + * Invalidate and clear text shadow area + */ +void asm_ClrTxtShd(void); + +/** + * Colors used by the OS + */ +typedef enum { + OS_COLOR_BLUE = 10, + OS_COLOR_RED, + OS_COLOR_BLACK, + OS_COLOR_MAGENTA, + OS_COLOR_GREEN, + OS_COLOR_ORANGE, + OS_COLOR_BROWN, + OS_COLOR_NAVY, + OS_COLOR_LTBLUE, + OS_COLOR_YELLOW, + OS_COLOR_WHITE, + OS_COLOR_LTGRAY, + OS_COLOR_MEDGRAY, + OS_COLOR_GRAY, + OS_COLOR_DARKGRAY +} os_colors_t; + +#define os_RamStart ((uint8_t*)0xD00000) +#define os_Flags ((uint8_t*)0xD00080) +#define os_TextFlags (*(uint8_t*)0xD00080) +#define os_ApdFlags (*(uint8_t*)0xD00088) +#define os_RclFlags (*(uint8_t*)0xD0008E) + +#define os_AppData ((uint8_t*)0xD00429) + +#define os_KbdScanCode (*(uint8_t*)0xD00587) +#define os_KbdLGSC (*(uint8_t*)0xD00588) +#define os_KbdPSC (*(uint8_t*)0xD00589) +#define os_KbdWUR (*(uint8_t*)0xD0058A) +#define os_KbdDebncCnt (*(uint8_t*)0xD0058B) +#define os_KbdKey (*(uint8_t*)0xD0058C) +#define os_KbdGetKy (*(uint8_t*)0xD0058D) +#define os_KeyExtend (*(uint8_t*)0xD0058E) +#define os_Brightness (*(uint8_t*)0xD0058F) +#define os_ApdSubTimer (*(uint8_t*)0xD00590) +#define os_ApdTimer (*(uint8_t*)0xD00591) +#define os_CurRow (*(uint8_t*)0xD00595) +#define os_CurCol (*(uint8_t*)0xD00596) + +#define os_OP1 ((uint8_t*)0xD005F8) +#define os_OP2 ((uint8_t*)0xD00603) +#define os_OP3 ((uint8_t*)0xD0060E) +#define os_OP4 ((uint8_t*)0xD00619) +#define os_OP5 ((uint8_t*)0xD00624) +#define os_OP6 ((uint8_t*)0xD0062F) +#define os_OP7 ((uint8_t*)0xD0063A) + +#define os_ProgToEdit ((char*)0xD0065B) +#define os_NameBuff ((char*)0xD00663) + +#define os_TextShadow ((uint8_t*)0xD006C0) /**< Text buffer 260 bytes */ + +#define os_PromptRow (*(uint8_t*)0xD00800) +#define os_PromptCol (*(uint8_t*)0xD00801) +#define os_PromptIns (*(uint8_t*)0xD00802) +#define os_PromptShift (*(uint8_t*)0xD00803) +#define os_PromptRet (*(uint8_t*)0xD00804) +#define os_PromptValid (*(uint8_t*)0xD00807) + +#define os_PenCol (*(uint24_t*)0xD008D2) /**< Small font column location */ +#define os_PenRow (*(uint8_t*)0xD008D5) /**< Small font row location */ + +#define os_StatVars ((uint8_t*)0xD01191) +#define os_AsmPrgmSize (*(uint16_t*)0xD0118C) /**< Current size of executing program */ + +#define os_uXMin (*(real_t*)0xD01D61) +#define os_uXMax (*(real_t*)0xD01D6A) +#define os_uXScl (*(real_t*)0xD01D73) +#define os_uYMin (*(real_t*)0xD01D7C) +#define os_uYMax (*(real_t*)0xD01D85) +#define os_uYScl (*(real_t*)0xD01D8E) +#define os_uThetaMin (*(real_t*)0xD01D97) +#define os_uThetaMax (*(real_t*)0xD01DA0) +#define os_uThetaStep (*(real_t*)0xD01DA9) +#define os_uTmin (*(real_t*)0xD01DB2) +#define os_uTmax (*(real_t*)0xD01DBB) +#define os_uTStep (*(real_t*)0xD01DC4) +#define os_uPlotStart (*(real_t*)0xD01DCD) +#define os_unMax (*(real_t*)0xD01DD6) +#define os_uu0 (*(real_t*)0xD01DDF) +#define os_uv0 (*(real_t*)0xD01DE8) +#define os_unMin (*(real_t*)0xD01DF1) +#define os_uu02 (*(real_t*)0xD01DFA) +#define os_uv02 (*(real_t*)0xD01E03) +#define os_uw0 (*(real_t*)0xD01E0C) +#define os_uPlotStep (*(real_t*)0xD01E15) +#define os_uXres (*(real_t*)0xD01E1E) +#define os_uw02 (*(real_t*)0xD01E27) +#define os_XMin (*(real_t*)0xD01E33) +#define os_XMax (*(real_t*)0xD01E3C) +#define os_XScl (*(real_t*)0xD01E45) +#define os_YMin (*(real_t*)0xD01E4E) +#define os_YMax (*(real_t*)0xD01E57) +#define os_YScl (*(real_t*)0xD01E60) +#define os_ThetaMin (*(real_t*)0xD01E69) +#define os_ThetaMax (*(real_t*)0xD01E72) +#define os_ThetaStep (*(real_t*)0xD01E7B) +#define os_TMinPar (*(real_t*)0xD01E84) +#define os_TMaxPar (*(real_t*)0xD01E8D) +#define os_TStep (*(real_t*)0xD01E96) +#define os_PlotStart (*(real_t*)0xD01E9F) +#define os_NMax (*(real_t*)0xD01EA8) +#define os_u0 (*(real_t*)0xD01EB1) +#define os_V0 (*(real_t*)0xD01EBA) +#define os_NMin (*(real_t*)0xD01EC3) +#define os_u02 (*(real_t*)0xD01ECC) +#define os_V02 (*(real_t*)0xD01ED5) +#define os_W0 (*(real_t*)0xD01EDE) +#define os_PlotStep (*(real_t*)0xD01EE7) +#define os_XResO (*(real_t*)0xD01EF0) +#define os_W02 (*(real_t*)0xD01EF9) +#define os_un1 (*(real_t*)0xD01F02) +#define os_un2 (*(real_t*)0xD01F0B) +#define os_Vn1 (*(real_t*)0xD01F14) +#define os_Vn2 (*(real_t*)0xD01F1D) +#define os_Wn1 (*(real_t*)0xD01F26) +#define os_Wn2 (*(real_t*)0xD01F2F) +#define os_Fin_N (*(real_t*)0xD01F38) +#define os_Fin_I (*(real_t*)0xD01F41) +#define os_Fin_PV (*(real_t*)0xD01F4A) +#define os_Fin_PMT (*(real_t*)0xD01F53) +#define os_Fin_FV (*(real_t*)0xD01F5C) +#define os_Fin_PY (*(real_t*)0xD01F65) +#define os_Fin_CY (*(real_t*)0xD01F6E) +#define os_Cal_N (*(real_t*)0xD01F77) +#define os_Cal_I (*(real_t*)0xD01F80) +#define os_Cal_PV (*(real_t*)0xD01F89) +#define os_Cal_PMT (*(real_t*)0xD01F92) +#define os_Cal_FV (*(real_t*)0xD01F9B) +#define os_Cal_PY (*(real_t*)0xD01FA4) + +#define os_CmdShadow ((uint8_t*)0xD0232D) + +#define os_Y1LineType (*(uint8_t*)0xD024BF) +#define os_Y2LineType (*(uint8_t*)0xD024C0) +#define os_Y3LineType (*(uint8_t*)0xD024C1) +#define os_Y4LineType (*(uint8_t*)0xD024C2) +#define os_Y5LineType (*(uint8_t*)0xD024C3) +#define os_Y6LineType (*(uint8_t*)0xD024C4) +#define os_Y7LineType (*(uint8_t*)0xD024C5) +#define os_Y8LineType (*(uint8_t*)0xD024C6) +#define os_Y9LineType (*(uint8_t*)0xD024C7) +#define os_Y0LineType (*(uint8_t*)0xD024C8) +#define os_Para1LineType (*(uint8_t*)0xD024C9) +#define os_Para2LineType (*(uint8_t*)0xD024CA) +#define os_Para3LineType (*(uint8_t*)0xD024CB) +#define os_Para4LineType (*(uint8_t*)0xD024CC) +#define os_Para5LineType (*(uint8_t*)0xD024CD) +#define os_Para6LineType (*(uint8_t*)0xD024CE) +#define os_Polar1LineType (*(uint8_t*)0xD024CF) +#define os_Polar2LineType (*(uint8_t*)0xD024D0) +#define os_Polar3LineType (*(uint8_t*)0xD024D1) +#define os_Polar4LineType (*(uint8_t*)0xD024D2) +#define os_Polar5LineType (*(uint8_t*)0xD024D3) +#define os_Polar6LineType (*(uint8_t*)0xD024D4) +#define os_SecULineType (*(uint8_t*)0xD024D5) +#define os_SecVLineType (*(uint8_t*)0xD024D6) +#define os_SecWLineType (*(uint8_t*)0xD024D7) +#define os_Y1LineColor (*(uint8_t*)0xD024D8) +#define os_Y2LineColor (*(uint8_t*)0xD024D9) +#define os_Y3LineColor (*(uint8_t*)0xD024DA) +#define os_Y4LineColor (*(uint8_t*)0xD024DB) +#define os_Y5LineColor (*(uint8_t*)0xD024DC) +#define os_Y6LineColor (*(uint8_t*)0xD024DD) +#define os_Y7LineColor (*(uint8_t*)0xD024DE) +#define os_Y8LineColor (*(uint8_t*)0xD024DF) +#define os_Y9LineColor (*(uint8_t*)0xD024E0) +#define os_Y0LineColor (*(uint8_t*)0xD024E1) +#define os_Para1LineColor (*(uint8_t*)0xD024E2) +#define os_Para2LineColor (*(uint8_t*)0xD024E3) +#define os_Para3LineColor (*(uint8_t*)0xD024E4) +#define os_Para4LineColor (*(uint8_t*)0xD024E5) +#define os_Para5LineColor (*(uint8_t*)0xD024E6) +#define os_Para6LineColor (*(uint8_t*)0xD024E7) +#define os_Polar1LineColor (*(uint8_t*)0xD024E8) +#define os_Polar2LineColor (*(uint8_t*)0xD024E9) +#define os_Polar3LineColor (*(uint8_t*)0xD024EA) +#define os_Polar4LineColor (*(uint8_t*)0xD024EB) +#define os_Polar5LineColor (*(uint8_t*)0xD024EC) +#define os_Polar6LineColor (*(uint8_t*)0xD024ED) +#define os_SecULineColor (*(uint8_t*)0xD024EE) +#define os_SecVLineColor (*(uint8_t*)0xD024EF) +#define os_SecWLineColor (*(uint8_t*)0xD024F0) + +#define os_AppErr1 ((char*)0xD025A9) /**< String [1] for custom error */ +#define os_AppErr2 ((char*)0xD025B6) /**< String [2] for custom error */ + +#define os_CursorHookPtr (*(uint24_t*)0xD025D5) +#define os_LibraryHookPtr (*(uint24_t*)0xD025D8) +#define os_RawKeyHookPtr (*(uint24_t*)0xD025DB) +#define os_GetKeyHookPtr (*(uint24_t*)0xD025DE) +#define os_HomescreenHookPtr (*(uint24_t*)0xD025E1) +#define os_WindowHookPtr (*(uint24_t*)0xD025E4) +#define os_GraphHookPtr (*(uint24_t*)0xD025E7) +#define os_YEqualsHookPtr (*(uint24_t*)0xD025EA) +#define os_FontHookPtr (*(uint24_t*)0xD025ED) +#define os_RegraphHookPtr (*(uint24_t*)0xD025F0) +#define os_GraphicsHookPtr (*(uint24_t*)0xD025F3) +#define os_TraceHookPtr (*(uint24_t*)0xD025F6) +#define os_ParserHookPtr (*(uint24_t*)0xD025F9) +#define os_AppChangeHookPtr (*(uint24_t*)0xD025FC) +#define os_Catalog1HookPtr (*(uint24_t*)0xD025FF) +#define os_HelpHookPtr (*(uint24_t*)0xD02602) +#define os_CxRedispHookPtr (*(uint24_t*)0xD02605) +#define os_MenuHookPtr (*(uint24_t*)0xD02608) +#define os_Catalog2HookPtr (*(uint24_t*)0xD0260B) +#define os_TokenHookPtr (*(uint24_t*)0xD0260E) +#define os_LocalizeHookPtr (*(uint24_t*)0xD02611) +#define os_SilentLinkHookPtr (*(uint24_t*)0xD02614) +#define os_ActiveUSBHookPtr (*(uint24_t*)0xD0261A) + +#define os_TempFreeArc (*(uint24_t*)0xD02655) /**< Set after asm_ArcChk call */ + +#define os_TextBGcolor (*(uint16_t*)0xD02688) /**< Large font background color */ +#define os_TextFGcolor (*(uint16_t*)0xD0268A) /**< Large font foreground color */ + +#define os_DrawBGColor (*(uint16_t*)0xD026AA) /**< Small font background color */ +#define os_DrawFGColor (*(uint16_t*)0xD026AC) /**< Small font foreground color */ +#define os_DrawColorCode (*(uint8_t*)0xD026AE) + +#define os_BatteryStatus (*(uint8_t*)0xD02A86) + +#define os_GraphBGColor (*(uint16_t*)0xD02A98) /**< Graph background 565 color */ + +#define os_FillRectColor (*(uint16_t*)0xD02AC0) +#define os_StatusBarBGColor (*(uint16_t*)0xD02ACC) /**< Status bar 565 color */ + +#define os_TmpYears (*(real_t*)0xD02B01) +#define os_TmpMonths (*(real_t*)0xD02B0A) +#define os_TmpDays (*(real_t*)0xD02B13) +#define os_TmpHours (*(real_t*)0xD02B1C) +#define os_TmpMinutes (*(real_t*)0xD02B25) + +#define os_RamCode ((uint8_t*)0xD18C7C) /**< 1023 bytes free ram */ + +/* + * TI-OS Token definitions + */ + +#define tToDMS 0x01 +#define tToDEC 0x02 +#define tToAbc 0x03 +#define tStore 0x04 +#define tBoxPlot 0x05 +#define tLBrack 0x06 +#define tRBrack 0x07 +#define tLBrace 0x08 +#define tRBrace 0x09 +#define tFromRad 0x0A +#define tFromDeg 0x0B +#define tRecip 0x0C +#define tSqr 0x0D +#define tTrnspos 0x0E +#define tCube 0x0F +#define tLParen 0x10 +#define tRParen 0x11 +#define tRound 0x12 +#define tPxTst 0x13 +#define tAug 0x14 +#define tRowSwap 0x15 +#define tRowPlu 0x16 +#define tmRow 0x17 +#define tmRowPlus 0x18 +#define tMax 0x19 // 'max' +#define tMin 0x1A // 'min' +#define tRToPr 0x1B // 'R>Pr' +#define tRToPo 0x1C // 'R>Po' +#define tPToRx 0x1D // 'P>Rx' +#define tPToRy 0x1E // 'P>Ry' +#define tMedian 0x1F // 'MEDIAN' +#define tRandM 0x20 // 'randM' +#define tMean 0x21 // 'MEAN' +#define tRoot 0x22 // 'ROOT' +#define tSeries 0x23 // 'seq' +#define tFnInt 0x24 // 'fnInt' +#define tNDeriv 0x25 // 'fnIr' +#define tEvalF 0x26 +#define tFmin 0x27 +#define tFmax 0x28 +#define tSpace 0x29 // ' ' +#define tString 0x2A // '"' +#define tComma 0x2B // ',' +#define tii 0x2C // 'i' +#define tFact 0x2D // '!' +#define tCubicR 0x2E +#define tQuartR 0x2F +#define t0 0x30 +#define t1 0x31 +#define t2 0x32 +#define t3 0x33 +#define t4 0x34 +#define t5 0x35 +#define t6 0x36 +#define t7 0x37 +#define t8 0x38 +#define t9 0x39 +#define tDecPt 0x3A // '.' +#define tee 0x3B // 'e' +#define tOr 0x3C // '_or_' +#define tXor 0x3D +#define tColon 0x3E // ':' +#define tEnter 0x3F +#define tAnd 0x40 // '_and_' +#define tA 0x41 +#define tB 0x42 +#define tC 0x43 +#define tD 0x44 +#define tE 0x45 +#define tF 0x46 +#define tG 0x47 +#define tH 0x48 +#define tI 0x49 +#define tJ 0x4A +#define tK 0x4B +#define tL 0x4C +#define tM 0x4D +#define tN 0x4E +#define tO 0x4F +#define tP 0x50 +#define tQ 0x51 +#define tR 0x52 +#define tS 0x53 +#define tT 0x54 +#define tU 0x55 +#define tV 0x56 +#define tW 0x57 +#define tX 0x58 +#define tY 0x59 +#define tZ 0x5A +#define tTheta 0x5B +#define tProg 0x5F + +/* + * Mode settings tokens + */ +#define tRad 0x64 // 'Radian' +#define tDeg 0x65 // 'Degree' +#define tNormF 0x66 // 'Normal' +#define tSci 0x67 // 'Sci' +#define tEng 0x68 // 'Eng' +#define tFloat 0x69 // 'Float' +#define tFix 0x73 // 'Fix_' +#define tSplitOn 0x74 +#define tFullScreen 0x75 +#define tStndrd 0x76 // 'Func' +#define tParam 0x77 // 'Param' +#define tPolar 0x78 // 'Pol' +#define tSeqG 0x79 // ;79h +#define tAFillOn 0x7A // 'AUTO FILL ON' +#define tAFillOff 0x7B // 'AutoFill OFF' +#define tACalcOn 0x7C +#define tACalcOff 0x7D + +#define tEQ 0x6A // '=' +#define tLT 0x6B // '<' +#define tGT 0x6C // '>' +#define tLE 0x6D // LLE +#define tGE 0x6E // LGE +#define tNE 0x6F // LNE +#define tAdd 0x70 // '+' +#define tSub 0x71 // '-' +#define tAns 0x72 +#define tMul 0x82 // '*' +#define tDiv 0x83 // '/' + +#define tBoxIcon 0x7F +#define tCrossIcon 0x80 +#define tDotIcon 0x81 + +#define tTrace 0x84 // 'Trace' +#define tClDrw 0x85 // 'ClrDraw' +#define tZoomStd 0x86 // 'ZStd' +#define tZoomtrg 0x87 // 'Ztrg' +#define tZoomBox 0x88 // 'ZBOX' +#define tZoomIn 0x89 // 'ZIn' +#define tZoomOut 0x8A // 'ZOut' +#define tZoomSqr 0x8B // 'ZSqr' +#define tZoomInt 0x8C // 'ZInt' +#define tZoomPrev 0x8D // 'ZPrev' +#define tZoomDec 0x8E // 'ZDecm' +#define tZoomStat 0x8F // 'ZStat +#define tUsrZm 0x90 // 'ZRcl' +#define tPrtScrn 0x91 // 'PrtScrn' +#define tZoomSto 0x92 // 'ZSto' +#define tText 0x93 + +#define tnPr 0x94 // '_nPr_' +#define tnCr 0x95 // '_nCr_' + +// Graph Commands +#define tYOn 0x96 // 'FnOn_' +#define tYOff 0x97 // 'FnOff_' +#define tStPic 0x98 // 'StPic_' +#define tRcPic 0x99 // 'RcPic_' +#define tStoDB 0x9A // 'StGDB_' +#define tRclDB 0x9B // 'RcGDB_' +#define tLine 0x9C // 'Line' +#define tVert 0x9D // 'Vert_' +#define tPtOn 0x9E // 'PtOn' +#define tPtOff 0x9F // 'PtOff' +#define tPtChg 0xA0 // 'PtChg' +#define tPXOn 0xA1 +#define tPXOff 0xA2 +#define tPXChg 0xA3 +#define tShade 0xA4 // 'Shade' +#define tCircle 0xA5 // 'Circle' +#define tHorz 0xA6 // 'HORIZONTAL' +#define tTanLn 0xA7 // 'TanLn' +#define tDrInv 0xA8 // 'DrInv_' +#define tDrawF 0xA9 // 'DrawF_' + +// Functions with no argument +#define tRand 0xAB // 'rand' +#define tPi 0xAC // Lpi +#define tGetKey 0xAD // 'getKy' +#define tAPost 0xAE // ''' +#define tQuest 0xAF // '?' +#define tChs 0xB0 +#define tInt 0xB1 +#define tAbs 0xB2 +#define tDet 0xB3 +#define tIdent 0xB4 +#define tDim 0xB5 +#define tSum 0xB6 +#define tProd 0xB7 +#define tNot 0xB8 +#define tIPart 0xB9 +#define tFPart 0xBA + +// New 2 Byte Tokens +#define t2ByteTok 0xBB +#define tSqrt 0xBC +#define tCubRt 0xBD +#define tLn 0xBE +#define tExp 0xBF +#define tLog 0xC0 +#define tALog 0xC1 +#define tSin 0xC2 +#define tASin 0xC3 +#define tCos 0xC4 +#define tACos 0xC5 +#define tTan 0xC6 +#define tATan 0xC7 +#define tSinH 0xC8 +#define tASinH 0xC9 +#define tCoshH 0xCA +#define tACosH 0xCB +#define tTanH 0xCC +#define tATanH 0xCD + +// Some Programming Commands +#define tIf 0xCE // 'If_' +#define tThen 0xCF // 'Then_' +#define tElse 0xD0 // 'Else_' +#define tWhile 0xD1 // 'While_' +#define tRepeat 0xD2 // 'Repeat_' +#define tFor 0xD3 // 'For_' +#define tEnd 0xD4 // 'End' +#define tReturn 0xD5 // 'Return' +#define tLbl 0xD6 // 'Lbl_' +#define tGoto 0xD7 // 'Goto_' +#define tPause 0xD8 // 'Pause_' +#define tStop 0xD9 // 'Stop' +#define tISG 0xDA // 'IS>' +#define tDSL 0xDB // 'DS<' +#define tInput 0xDC // 'Input_' +#define tPrompt 0xDD // 'Prompt_' +#define tDisp 0xDE // 'Disp_' +#define tDispG 0xDF // 'DispG' +#define tOutput 0xE0 // 'Outpt' +#define tClLCD 0xE1 // 'ClLCD' +#define tConst 0xE2 // 'Fill' +#define tSortA 0xE3 // 'sortA_' +#define tSortD 0xE4 // 'sortD_' +#define tDispTab 0xE5 // 'Disp Table +#define tMenu 0xE6 // 'Menu' +#define tSendMBL 0xE7 // 'Send' +#define tGetMBL 0xE8 // 'Get' + +// Stat Plot Commands +#define tPlotOn 0xE9 // 'PLOTSON' +#define tPlotOff 0xEA // 'PLOTSOFF +#define tListName 0xEB // List Designator +#define tPlot1 0xEC +#define tPlot2 0xED +#define tPlot3 0xEE +#define tUnused01 0xEF // available? +#define tPower 0xF0 // '^' +#define tXRoot 0xF1 // LsupX,Lroot +#define tOneVar 0xF2 // 'OneVar_' +#define tTwoVar 0xF3 +#define tLR 0xF4 // 'LinR(A+BX)' +#define tLRExp 0xF5 // 'ExpR_' +#define tLRLn 0xF6 // 'LnR_' +#define tLRPwr 0xF7 // 'PwrR_' +#define tMedMed 0xF8 +#define tQuad 0xF9 +#define tClrLst 0xFA // 'Clear List' +#define tClrTbl 0xFB // 'Clear Table' +#define tHist 0xFC // 'Hist_' +#define txyLine 0xFD // 'xyline_' +#define tScatter 0xFE // 'Scatter_' +#define tLR1 0xFF // 'LINR(AX+B)' + +#define tGFormat 0x7E +// 2nd Half Of Graph Format Tokens +#define tSeq 0x00 // 'SeqG' +#define tSimulG 0x01 // 'SimulG' +#define tPolarG 0x02 // 'PolarGC' +#define tRectG 0x03 // 'RectGC' +#define tCoordOn 0x04 // 'CoordOn' +#define tCoordOff 0x05 // 'CoordOff' +#define tDrawLine 0x06 // 'DrawLine' +#define tDrawDot 0x07 // 'DrawDot' +#define tAxisOn 0x08 // 'AxesOn' +#define tAxisOff 0x09 // 'AxesOff' +#define tGridOn 0x0A // 'GridOn' +#define tGridOff 0x0B // 'GridOff' +#define tLblOn 0x0C // 'LabelOn' +#define tLblOff 0x0D // 'LabelOff' +#define tWebOn 0x0E // 'WebOn' +#define tWebOff 0x0F // 'WebOFF' +#define tuv 0x10 // U vs V +#define tvw 0x11 // V vs W +#define tuw 0x12 // U vs W + +#define tVarMat 0x5C +// 2nd Half Of User Matrix Tokens +#define tMatA 0x00 // MAT A +#define tMatB 0x01 // MAT B +#define tMatC 0x02 // MAT C +#define tMatD 0x03 // MAT D +#define tMatE 0x04 // MAT E +#define tMatF 0x05 // MAT F +#define tMatG 0x06 // MAT G +#define tMatH 0x07 // MAT H +#define tMatI 0x08 // MAT I +#define tMatJ 0x09 // MAT J + +#define tVarLst 0x5D +// 2nd Half Of User List Tokens +#define tL1 0x00 // LIST 1 +#define tL2 0x01 // LIST 2 +#define tL3 0x02 // LIST 3 +#define tL4 0x03 // LIST 4 +#define tL5 0x04 // LIST 5 +#define tL6 0x05 // LIST 6 + +#define tVarEqu 0x5E +// 2nd Half Of User Equation Tokens + +// Y Equations have bit 4 set +#define tY1 0x10 // Y1 +#define tY2 0x11 // Y2 +#define tY3 0x12 // Y3 +#define tY4 0x13 // Y4 +#define tY5 0x14 // Y5 +#define tY6 0x15 // Y6 +#define tY7 0x16 // Y7 +#define tY8 0x17 // Y8 +#define tY9 0x18 // Y9 +#define tY0 0x19 // Y0 + +// Param Equations Have Bit 5 Set +#define tX1T 0x20 // X1t +#define tY1T 0x21 // Y1t +#define tX2T 0x22 // X2t +#define tY2T 0x23 // Y2t +#define tX3T 0x24 // X3t +#define tY3T 0x25 // Y3t +#define tX4T 0x26 // X4t +#define tY4T 0x27 // Y4t +#define tX5T 0x28 // X5t +#define tY5T 0x29 // Y5t +#define tX6T 0x2A // X6t +#define tY6T 0x2B // Y6t + +// Polar Equations Have Bit 6 Set +#define tR1 0x40 // R1 +#define tR2 0x41 // R2 +#define tR3 0x42 // R3 +#define tR4 0x43 // R4 +#define tR5 0x44 // R5 +#define tR6 0x45 // R6 + +// Recursion Equations Have Bit 7 Set +#define tun 0x80 // Un +#define tvn 0x81 // Vn +#define twn 0x82 // Wn + +#define tVarPict 0x60 +// 2nd Half User Picture Tokens +#define tPic1 0x00 // PIC1 +#define tPic2 0x01 // PIC2 +#define tPic3 0x02 // PIC3 +#define tPic4 0x03 // PIC4 +#define tPic5 0x04 // PIC5 +#define tPic6 0x05 // PIC6 +#define tPic7 0x06 // PIC7 +#define tPic8 0x07 // PIC8 +#define tPic9 0x08 // PIC9 +#define tPic0 0x09 // PIC0 + +#define tVarGDB 0x61 +// 2nd Half User Graph Database Tokens +#define tGDB1 0x00 // GDB1 +#define tGDB2 0x01 // GDB2 +#define tGDB3 0x02 // GDB3 +#define tGDB4 0x03 // GDB4 +#define tGDB5 0x04 // GDB5 +#define tGDB6 0x05 // GDB6 +#define tGDB7 0x06 // GDB7 +#define tGDB8 0x07 // GDB8 +#define tGDB9 0x08 // GDB9 +#define tGDB0 0x09 // GDB0 + +#define tVarStrng 0xAA +// 2nd Half Of String Vars +#define tStr1 0x00 +#define tStr2 0x01 +#define tStr3 0x02 +#define tStr4 0x03 +#define tStr5 0x04 +#define tStr6 0x05 +#define tStr7 0x06 +#define tStr8 0x07 +#define tStr9 0x08 +#define tStr0 0x09 + +#define tVarOut 0x62 +// 2nd Half Of System Output Only Variables +#define tRegEq 0x01 // REGRESSION EQUATION +#define tStatN 0x02 // STATISTICS N +#define tXMean 0x03 // X MEAN +#define tSumX 0x04 // SUM(X) +#define tSumXSqr 0x05 // SUM(X^2) +#define tStdX 0x06 // STANDARD DEV X +#define tStdPX 0x07 // STANDARD DEV POP X +#define tMinX 0x08 // Min X VALUE +#define tMaxX 0x09 // Max X VALUE +#define tMinY 0x0A // Min Y VALUE +#define tMaxY 0x0B // Max Y VALUE +#define tYmean 0x0C // Y MEAN +#define tSumY 0x0D // SUM(Y) +#define tSumYSqr 0x0E // SUM(Y^2) +#define tStdY 0x0F // STANDARD DEV Y +#define tStdPY 0x10 // STANDARD DEV POP Y +#define tSumXY 0x11 // SUM(XY) +#define tCorr 0x12 // CORRELATION +#define tMedX 0x13 // MED(X) +#define tQ1 0x14 // 1ST QUADRANT OF X +#define tQ3 0x15 // 3RD QUADRANT OF X +#define tQuadA 0x16 // 1ST TERM OF QUAD POLY REG/ Y-INT +#define tQuadB 0x17 // 2ND TERM OF QUAD POLY REG/ SLOPE +#define tQuadC 0x18 // 3RD TERM OF QUAD POLY REG +#define tCubeD 0x19 // 4TH TERM OF CUBIC POLY REG +#define tQuartE 0x1A // 5TH TERM OF QUART POLY REG +#define tMedX1 0x1B // x1 FOR MED-MED +#define tMedX2 0x1C // x2 FOR MED-MED +#define tMedX3 0x1D // x3 FOR MED-MED +#define tMedY1 0x1E // y1 FOR MED-MED +#define tMedY2 0x1F // y2 FOR MED-MED +#define tMedY3 0x20 // y3 FOR MED-MED +#define tRecurn 0x21 // RECURSION N +#define tStatP 0x22 +#define tStatZ 0x23 +#define tStatT 0x24 +#define tStatChi 0x25 +#define tStatF 0x26 +#define tStatDF 0x27 +#define tStatPhat 0x28 +#define tStatPhat1 0x29 +#define tStatPhat2 0x2A +#define tStatMeanX1 0x2B +#define tStatStdX1 0x2C +#define tStatN1 0x2D +#define tStatMeanX2 0x2E +#define tStatStdX2 0x2F +#define tStatN2 0x30 +#define tStatStdXP 0x31 +#define tStatLower 0x32 +#define tStatUpper 0x33 +#define tStat_s 0x34 +#define tLRSqr 0x35 +#define tBRSqr 0x36 + +// These next tokens are only used to access the data +// They are display only and the user cannot access them at all +#define tF_DF 0x37 +#define tF_SS 0x38 +#define tF_MS 0x39 +#define tE_DF 0x3A +#define tE_SS 0x3B +#define tE_MS 0x3C + +#define tVarSys 0x63 +// 2nd Half Of System Input/Output Variables +#define tuXscl 0x00 +#define tuYscl 0x01 +#define tXscl 0x02 +#define tYscl 0x03 +#define tRecuru0 0x04 +#define tRecurv0 0x05 +#define tun1 0x06 +#define tvn1 0x07 +#define tuRecuru0 0x08 +#define tuRecurv0 0x09 +#define tXmin 0x0A +#define tXmax 0x0B +#define tYmin 0x0C +#define tYmax 0x0D +#define tTmin 0x0E +#define tTmax 0x0F +#define tThetaMin 0x10 +#define tThetaMax 0x11 +#define tuXmin 0x12 +#define tuXmax 0x13 +#define tuYmin 0x14 +#define tuYmax 0x15 +#define tuThetMin 0x16 +#define tuThetMax 0x17 +#define tuTmin 0x18 +#define tuTmax 0x19 +#define tTblMin 0x1A +#define tPlotStart 0x1B +#define tuPlotStart 0x1C +#define tnMax 0x1D +#define tunMax 0x1E +#define tnMin 0x1F +#define tunMin 0x20 +#define tTblStep 0x21 +#define tTStep 0x22 +#define tThetaStep 0x23 +#define tuTStep 0x24 +#define tuThetStep 0x25 +#define tDeltaX 0x26 +#define tDeltaY 0x27 +#define tXFact 0x28 +#define tYFact 0x29 +#define tTblInput 0x2A +#define tFinN 0x2B +#define tFinI 0x2C +#define tFinPV 0x2D +#define tFinPMT 0x2E +#define tFinFV 0x2F +#define tFinPY 0x30 +#define tFinCY 0x31 +#define tRecurw0 0x32 +#define tuRecurw0 0x33 +#define tPlotStep 0x34 +#define tuPlotStep 0x35 +#define tXres 0x36 +#define tuXres 0x37 +#define tRecuru02 0x38 +#define tuRecuru02 0x39 +#define tRecurv02 0x3C +#define tuRecurv02 0x3D +#define tRecurw02 0x3E +#define tuRecurw02 0x3F + +// 2nd Byte Of t2ByteTok Tokens +#define tFinNPV 0x00 +#define tFinIRR 0x01 +#define tFinBAL 0x02 +#define tFinPRN 0x03 +#define tFinINT 0x04 +#define tFinToNom 0x05 +#define tFinToEff 0x06 +#define tFinDBD 0x07 +#define tLCM 0x08 +#define tGCD 0x09 +#define tRandInt 0x0A +#define tRandBin 0x0B +#define tSubStrng 0x0C +#define tStdDev 0x0D +#define tVariance 0x0E +#define tInStrng 0x0F +#define tDNormal 0x10 +#define tInvNorm 0x11 +#define tDT 0x12 +#define tChI 0x13 +#define tDF 0x14 +#define tBINPDF 0x15 +#define tBINCDF 0x16 +#define tPOIPDF 0x17 +#define tPOICDF 0x18 +#define tGEOPDF 0x19 +#define tGEOCDF 0x1A +#define tNormalPDF 0x1B +#define tTPDF 0x1C +#define tChiPDF 0x1D +#define tFPDF 0x1E +#define tRandNorm 0x1F +#define tFinFPMT 0x20 +#define tFinFI 0x21 +#define tFinFPV 0x22 +#define tFinFN 0x23 +#define tFinFFV 0x24 +#define tConj 0x25 +#define tReal 0x26 +#define tImag 0x27 +#define tAngle 0x28 +#define tCumSum 0x29 +#define tExpr 0x2A +#define tLength 0x2B +#define tDeltaLst 0x2C +#define tRef 0x2D +#define tRRef 0x2E +#define tToRect 0x2F +#define tToPolar 0x30 +#define tConste 0x31 +#define tSinReg 0x32 +#define tLogistic 0x33 +#define tLinRegTTest 0x34 +#define tShadeNorm 0x35 +#define tShadeT 0x36 +#define tShadeChi 0x37 +#define tShadeF 0x38 +#define tMatToLst 0x39 +#define tLstToMat 0x3A +#define tZTest 0x3B +#define tTTest 0x3C +#define t2SampZTest 0x3D +#define t1PropZTest 0x3E +#define t2PropZTest 0x3F +#define tChiTest 0x40 +#define tZIntVal 0x41 +#define t2SampZInt 0x42 +#define t1PropZInt 0x43 +#define t2PropZInt 0x44 +#define tGraphStyle 0x45 +#define t2SampTTest 0x46 +#define t2SampFTest 0x47 +#define tTIntVal 0x48 +#define t2SampTInt 0x49 +#define tSetupLst 0x4A +#define tFinPMTend 0x4B +#define tFinPMTbeg 0x4C +#define tRealM 0x4D +#define tPolarM 0x4E +#define tRectM 0x4F +#define tExprOn 0x50 +#define tExprOff 0x51 +#define tClrAllLst 0x52 +#define tGetCalc 0x53 +#define tDelVar 0x54 +#define tEquToStrng 0x55 +#define tStrngToequ 0x56 +#define tDelLast 0x57 +#define tSelect 0x58 +#define tANOVA 0x59 +#define tModBox 0x5A +#define tNormProb 0x5B +#define tMGT 0x64 +#define tZFit 0x65 +#define tDiag_on 0x66 +#define tDiag_off 0x67 +#define tArchive 0x68 +#define tUnarchive 0x69 +#define tAsm 0x6A +#define tAsmComp 0x6B +#define tAsmPrgm 0x6C +#define tAsmCmp 0x6D +#define tLcapAAcute 0x6E +#define tLcapAGrave 0x6F +#define tLcapACaret 0x70 +#define tLcapADier 0x71 +#define tLaAcute 0x72 +#define tLaGrave 0x73 +#define tLaCaret 0x74 +#define tLaDier 0x75 +#define tLcapEAcute 0x76 +#define tLcapEGrave 0x77 +#define tLcapECaret 0x78 +#define tLcapEDier 0x79 +#define tLeAcute 0x7A +#define tLeGrave 0x7B +#define tLeCaret 0x7C +#define tLeDier 0x7D +#define tLcapIGrave 0x7F +#define tLcapICaret 0x80 +#define tLcapIDier 0x81 +#define tLiAcute 0x82 +#define tLiGrave 0x83 +#define tLiCaret 0x84 +#define tLiDier 0x85 +#define tLcapOAcute 0x86 +#define tLcapOGrave 0x87 +#define tLcapOCaret 0x88 +#define tLcapODier 0x89 +#define tLoAcute 0x8A +#define tLoGrave 0x8B +#define tLoCaret 0x8C +#define tLoDier 0x8D +#define tLcapUAcute 0x8E +#define tLcapUGrave 0x8F +#define tLcapUCaret 0x90 +#define tLcapUDier 0x91 +#define tLuAcute 0x92 +#define tLuGrave 0x93 +#define tLuCaret 0x94 +#define tLuDier 0x95 +#define tLcapCCed 0x96 +#define tLcCed 0x97 +#define tLcapNTilde 0x98 +#define tLnTilde 0x99 +#define tLaccent 0x9A +#define tLgrave 0x9B +#define tLdieresis 0x9C +#define tLquesDown 0x9D +#define tLexclamDown 0x9E +#define tLalpha 0x9F +#define tLbeta 0xA0 +#define tLgamma 0xA1 +#define tLcapDelta 0xA2 +#define tLdelta 0xA3 +#define tLepsilon 0xA4 +#define tLlambda 0xA5 +#define tLmu 0xA6 +#define tLpi 0xA7 +#define tLrho 0xA8 +#define tLcapSigma 0xA9 +#define tLphi 0xAB +#define tLcapOmega 0xAC +#define tLphat 0xAD +#define tLchi 0xAE +#define tLstatF 0xAF +#define tLa 0xB0 +#define tLb 0xB1 +#define tLc 0xB2 +#define tLd 0xB3 +#define tLsmalle 0xB4 +#define tLf 0xB5 +#define tLsmallg 0xB6 +#define tLh 0xB7 +#define tLi 0xB8 +#define tLj 0xB9 +#define tLk 0xBA +#define tLl 0xBC +#define tLm 0xBD +#define tLsmalln 0xBE +#define tLo 0xBF +#define tLp 0xC0 +#define tLq 0xC1 +#define tLsmallr 0xC2 +#define tLs 0xC3 +#define tLsmallt 0xC4 +#define tLu 0xC5 +#define tLv 0xC6 +#define tLw 0xC7 +#define tLx 0xC8 +#define tLy 0xC9 +#define tLz 0xCA +#define tLsigma 0xCB +#define tLtau 0xCC +#define tLcapIAcute 0xCD +#define tGarbageCollect 0xCE + +#define tExtTok 0xEF +// 2nd Byte Of tExtTok Tokens +#define tSetDate 0x00 +#define tSetTime 0x01 +#define tCheckTmr 0x02 +#define tSetDtFmt 0x03 +#define tSetTmFmt 0x04 +#define tTimeCnv 0x05 +#define tDayOfWk 0x06 +#define tGetDtStr 0x07 +#define tGetTmStr 0x08 +#define tGetDate 0x09 +#define tGetTime 0x0A +#define tStartTmr 0x0B +#define tGtDtFmt 0x0C +#define tGetTmFmt 0x0D +#define tIsClockOn 0x0E +#define tClockOff 0x0F +#define tClockOn 0x10 +#define tOpenLib 0x11 +#define tExecLib 0x12 +#define tInvT 0x13 +#define tChiSquaredTest 0x14 +#define tLinRegTInt 0x15 +#define tManualFit 0x16 +#define tZQuadrant 0x17 +#define tZFracHalf 0x18 +#define tZFracThird 0x19 +#define tZFracFourth 0x1A +#define tZFracFifth 0x1B +#define tZFracEighth 0x1C +#define tZFracTenth 0x1D +#define tFracSlash 0x2E +#define tFracMixedNum 0x2F +#define tSwapImProper 0x30 +#define tSwapFracDec 0x31 +#define tRemainder 0x32 +#define tSummationSigma 0x33 +#define tLogBase 0x34 +#define tRandIntNoRep 0x35 +#define tMathPrint 0x36 +#define tClassic 0x38 +#define tAutoAnswer 0x3B +#define tDecAnswer 0x3C +#define tFracAnswer 0x3D +#define tBlue 0x41 +#define tRed 0x42 +#define tBlack 0x43 +#define tMagenta 0x44 +#define tGreen 0x45 +#define tOrange 0x46 +#define tBrown 0x47 +#define tNavy 0x48 +#define tLtBlue 0x49 +#define tYellow 0x4A +#define tWhite 0x4B +#define tLtGray 0x4C +#define tMedGray 0x4D +#define tGray 0x4E +#define tDarkGray 0x4F +#define tGraphColor 0x65 +#define tTextColor 0x67 +#define tBackgroundOn 0x5B +#define tBackgroundOff 0x64 +#define tThin 0x74 +#define tBorderColor 0x6C +#define tAsm84CPrgm 0x68 +#define tAsm84CCmp 0x69 +#define tAsm84CeCmp 0x7B +#define tAsm84CePrgm 0x7A + +/* 2 byte extended tokens (tExtTok) present in OS 5.2 and above */ +#define tSEQn 0x8F /* 'SEQ(n)' */ +#define tSEQn1 0x90 /* 'SEQ(n+1)' */ +#define tSEQn2 0x91 /* 'SEQ(n+2)' */ +#define tLEFT 0x92 /* 'LEFT' */ +#define tCENTER 0x93 /* 'CENTER' */ +#define tRIGHT 0x94 /* 'RIGHT' */ +#define tInvBinom 0x95 /* 'invBinom(' */ +#define tWait 0x96 /* 'Wait_' */ +#define tToString 0x97 /* 'toString(' */ +#define tEval 0x98 /* 'eval(' */ + +/* + * --- TIOS System error codes --- + */ +#define OS_E_EDIT (1<<7) +#define OS_E_MASK (0x7F) +#define OS_E_OVERFLOW (1+OS_E_EDIT) +#define OS_E_DIVBY0 (2+OS_E_EDIT) +#define OS_E_SINGULARMAT (3+OS_E_EDIT) +#define OS_E_DOMAIN (4+OS_E_EDIT) +#define OS_E_INCREMENT (5+OS_E_EDIT) +#define OS_E_BREAK (6+OS_E_EDIT) +#define OS_E_NONREAL (7+OS_E_EDIT) +#define OS_E_SYNTAX (8+OS_E_EDIT) +#define OS_E_DATATYPE (9+OS_E_EDIT) +#define OS_E_ARGUMENT (10+OS_E_EDIT) +#define OS_E_DIMMISMATCH (11+OS_E_EDIT) +#define OS_E_DIMENSION (12+OS_E_EDIT) +#define OS_E_UNDEFINED (13+OS_E_EDIT) +#define OS_E_MEMORY (14+OS_E_EDIT) +#define OS_E_INVALID (15+OS_E_EDIT) +#define OS_E_ILLEGALNEST (16+OS_E_EDIT) +#define OS_E_BOUND (17+OS_E_EDIT) +#define OS_E_GRAPHRANGE (18+OS_E_EDIT) +#define OS_E_ZOOM (19+OS_E_EDIT) +#define OS_E_LABEL (20) +#define OS_E_STAT (21) +#define OS_E_SOLVER (22+OS_E_EDIT) +#define OS_E_SINGULARITY (23+OS_E_EDIT) +#define OS_E_SIGNCHANGE (24+OS_E_EDIT) +#define OS_E_ITERATIONS (25+OS_E_EDIT) +#define OS_E_BADGUESS (26+OS_E_EDIT) +#define OS_E_STATPLOT (27) +#define OS_E_TOLTOOSMALL (28+OS_E_EDIT) +#define OS_E_RESERVED (29+OS_E_EDIT) +#define OS_E_MODE (30+OS_E_EDIT) +#define OS_E_LNKERR (31+OS_E_EDIT) +#define OS_E_LNKMEMERR (32+OS_E_EDIT) +#define OS_E_LNKTRANSERR (33+OS_E_EDIT) +#define OS_E_LNKDUPERR (34+OS_E_EDIT) +#define OS_E_LNKMEMFULL (35+OS_E_EDIT) +#define OS_E_UNKNOWN (36+OS_E_EDIT) +#define OS_E_SCALE (37+OS_E_EDIT) +#define OS_E_IDNOTFOUND (38) +#define OS_E_NOMODE (39+OS_E_EDIT) +#define OS_E_VALIDATION (40) +#define OS_E_LENGTH (41+OS_E_EDIT) +#define OS_E_APPLICATION (42+OS_E_EDIT) +#define OS_E_APPERR1 (43+OS_E_EDIT) +#define OS_E_APPERR2 (44+OS_E_EDIT) +#define OS_E_EXPIREDAPP (45) +#define OS_E_BADADD (46) +#define OS_E_ARCHIVED (47+OS_E_EDIT) +#define OS_E_VERSION (48) +#define OS_E_ARCHFULL (49) +#define OS_E_VARIABLE (50+OS_E_EDIT) +#define OS_E_DUPLICATE (51+OS_E_EDIT) + +/* + * --- TI-OS os_GetCSC Scan Code Return Values --- + */ +#define sk_Down 0x01 +#define sk_Left 0x02 +#define sk_Right 0x03 +#define sk_Up 0x04 +#define sk_Enter 0x09 +#define sk_2nd 0x36 +#define sk_Clear 0x0F +#define sk_Alpha 0x30 +#define sk_Add 0x0A +#define sk_Sub 0x0B +#define sk_Mul 0x0C +#define sk_Div 0x0D +#define sk_Graph 0x31 +#define sk_Trace 0x32 +#define sk_Zoom 0x33 +#define sk_Window 0x34 +#define sk_Yequ 0x35 +#define sk_Mode 0x37 +#define sk_Del 0x38 +#define sk_Store 0x2A +#define sk_Ln 0x2B +#define sk_Log 0x2C +#define sk_Square 0x2D +#define sk_Recip 0x2E +#define sk_Math 0x2F +#define sk_0 0x21 +#define sk_1 0x22 +#define sk_4 0x23 +#define sk_7 0x24 +#define sk_2 0x1A +#define sk_5 0x1B +#define sk_8 0x1C +#define sk_3 0x12 +#define sk_6 0x13 +#define sk_9 0x14 +#define sk_Comma 0x25 +#define sk_Sin 0x26 +#define sk_Apps 0x27 +#define sk_GraphVar 0x28 +#define sk_DecPnt 0x19 +#define sk_LParen 0x1D +#define sk_Cos 0x1E +#define sk_Prgm 0x1F +#define sk_Stat 0x20 +#define sk_Chs 0x11 +#define sk_RParen 0x15 +#define sk_Tan 0x16 +#define sk_Vars 0x17 +#define sk_Power 0x0E + +/* Compatibility defines */ +#define prgm_CleanUp() +#define pgrm_CleanUp() +#define memset_fast memset + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/frontends/calculator/CEdev/include/usb.h b/frontends/calculator/CEdev/include/usb.h index 35d95d1..3bbf465 100644 --- a/frontends/calculator/CEdev/include/usb.h +++ b/frontends/calculator/CEdev/include/usb.h @@ -1,52 +1,52 @@ -/** - * @file - * @authors Matt "MateoConLechuga" Waltz - * @authors Jacob "jacobly" Young - * @brief USB communication routines - */ - -#ifndef H_USB -#define H_USB - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @returns True if the usb bus line is powered, i.e. connected to a another calc - */ -bool usb_BusPowered(void); - -/** - * @returns True if the usb is self powered - */ -bool usb_SelfPowered(void); - -/** - * Resets the usb controller chip - */ -void usb_ResetChip(void); - -/** - * Disables the usb timer interrupt (timer 3) - */ -void usb_DisableTimers(void); - -/** - * Enables the usb timer interrupt (timer 3) - */ -void usb_EnableTimers(void); - -/** - * Resets the usb timer interrupt (timer 3) - */ -void usb_ResetTimers(void); - -#ifdef __cplusplus -} -#endif - -#endif +/** + * @file + * @authors Matt "MateoConLechuga" Waltz + * @authors Jacob "jacobly" Young + * @brief USB communication routines + */ + +#ifndef H_USB +#define H_USB + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @returns True if the usb bus line is powered, i.e. connected to a another calc + */ +bool usb_BusPowered(void); + +/** + * @returns True if the usb is self powered + */ +bool usb_SelfPowered(void); + +/** + * Resets the usb controller chip + */ +void usb_ResetChip(void); + +/** + * Disables the usb timer interrupt (timer 3) + */ +void usb_DisableTimers(void); + +/** + * Enables the usb timer interrupt (timer 3) + */ +void usb_EnableTimers(void); + +/** + * Resets the usb timer interrupt (timer 3) + */ +void usb_ResetTimers(void); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/frontends/calculator/CEdev/lib/ccleanup.src b/frontends/calculator/CEdev/lib/ccleanup.src index 6479ea0..79f8db5 100644 --- a/frontends/calculator/CEdev/lib/ccleanup.src +++ b/frontends/calculator/CEdev/lib/ccleanup.src @@ -1,14 +1,14 @@ -;------------------------------------------------------------------------------- -; Standard C Cleanup module -;------------------------------------------------------------------------------- - .def __ccleanup - - segment cleanup - .assume adl=1 - -__ccleanup: - res 4,(iy+9) ; onInterrupt,(iy+onFlags) - set 0,(iy+3) ; graphDraw,(iy+graphFlags) - call 020808h ; _ClrLCDFull - call 020828h ; _HomeUp - call 021A3Ch ; _DrawStatusBar +;------------------------------------------------------------------------------- +; Standard C Cleanup module +;------------------------------------------------------------------------------- + .def __ccleanup + + segment cleanup + .assume adl=1 + +__ccleanup: + res 4,(iy+9) ; onInterrupt,(iy+onFlags) + set 0,(iy+3) ; graphDraw,(iy+graphFlags) + call 020808h ; _ClrLCDFull + call 020828h ; _HomeUp + call 021A3Ch ; _DrawStatusBar diff --git a/frontends/calculator/CEdev/lib/cstartup.src b/frontends/calculator/CEdev/lib/cstartup.src index 816a138..013deba 100644 --- a/frontends/calculator/CEdev/lib/cstartup.src +++ b/frontends/calculator/CEdev/lib/cstartup.src @@ -1,75 +1,75 @@ -;------------------------------------------------------------------------------- -; Standard CE startup module definitions and references -;------------------------------------------------------------------------------- - - .ref _main - .ref __low_bss - .ref __len_bss - .ref _os_DisableHomeTextBuffer - .ref _os_EnableHomeTextBuffer - - .def _errno - .def _init - .def _exit - .def __exit - .def __exitsp - .def __errsp - - .assume adl=1 - -_errno equ 0D008DCh - -;------------------------------------------------------------------------------- - segment header - db 0efh - db 07bh - db 0 ; Magic byte recognition for C programs -_init: - -;------------------------------------------------------------------------------- - segment startup - - call 0020848h ; _RunInicOff, assumes iy = flags - call 00004F4h ; _usb_DisableTimer - di ; disable interrupts - call _os_DisableHomeTextBuffer - ld hl,0E00305h - push hl ; save flash wait state control port - ld a,(hl) - push af ; save flash wait states - ld (hl),h ; set flash wait states to 3; 1 was definitely - ; too low for some calcs, 2 is untested - push iy ; save iy (flags) - ld (__exitsp+1),sp ; save sp for exiting - ld bc,__len_bss - ld hl,__low_bss - push bc - push hl - call 0000B0h ; __memclear, clear BSS - ; args will get removed from stack on exit - call _main -__exit: -__exitsp: -__errsp: - ld sp,0 - pop iy ; iy = flags - pop af ; a = original flash wait states - ex (sp),hl ; hl = flash wait state control port, - ; save exit code - ld (hl),a ; restore flash wait states - call 00004F0h ; _usb_ResetTimer - call _os_EnableHomeTextBuffer - -;------------------------------------------------------------------------------- - segment exit - - pop hl ; hl = exit code - ret - -_exit: - pop hl - pop hl - jr __exit - -;------------------------------------------------------------------------------- - segment code +;------------------------------------------------------------------------------- +; Standard CE startup module definitions and references +;------------------------------------------------------------------------------- + + .ref _main + .ref __low_bss + .ref __len_bss + .ref _os_DisableHomeTextBuffer + .ref _os_EnableHomeTextBuffer + + .def _errno + .def _init + .def _exit + .def __exit + .def __exitsp + .def __errsp + + .assume adl=1 + +_errno equ 0D008DCh + +;------------------------------------------------------------------------------- + segment header + db 0efh + db 07bh + db 0 ; Magic byte recognition for C programs +_init: + +;------------------------------------------------------------------------------- + segment startup + + call 0020848h ; _RunInicOff, assumes iy = flags + call 00004F4h ; _usb_DisableTimer + di ; disable interrupts + call _os_DisableHomeTextBuffer + ld hl,0E00305h + push hl ; save flash wait state control port + ld a,(hl) + push af ; save flash wait states + ld (hl),h ; set flash wait states to 3; 1 was definitely + ; too low for some calcs, 2 is untested + push iy ; save iy (flags) + ld (__exitsp+1),sp ; save sp for exiting + ld bc,__len_bss + ld hl,__low_bss + push bc + push hl + call 0000B0h ; __memclear, clear BSS + ; args will get removed from stack on exit + call _main +__exit: +__exitsp: +__errsp: + ld sp,0 + pop iy ; iy = flags + pop af ; a = original flash wait states + ex (sp),hl ; hl = flash wait state control port, + ; save exit code + ld (hl),a ; restore flash wait states + call 00004F0h ; _usb_ResetTimer + call _os_EnableHomeTextBuffer + +;------------------------------------------------------------------------------- + segment exit + + pop hl ; hl = exit code + ret + +_exit: + pop hl + pop hl + jr __exit + +;------------------------------------------------------------------------------- + segment code diff --git a/frontends/calculator/CEdev/lib/libheader.src b/frontends/calculator/CEdev/lib/libheader.src index bfd9183..465b96e 100644 --- a/frontends/calculator/CEdev/lib/libheader.src +++ b/frontends/calculator/CEdev/lib/libheader.src @@ -1,55 +1,55 @@ -;------------------------------------------------------------------------------- -; Libload launcher for shared libraries -;------------------------------------------------------------------------------- - .def __findlibload - - segment launcher - .assume adl=1 - -__findlibload: - call 020628h ; _pushop1 to save running program name - jr __tryfind -__inram: - call 021448h ; _arc_unarc -__tryfind: - ld hl,__libloadname-1 - call 020320h ; _mov9toop1 - ld a,015h ; appvarobj - ld (0D005F8h),a ; op1 - call 02050Ch ; _chkfindsym - jr c,__notfound - call 021F98h ; _chkinram - jr z,__inram ; if in ram, archive LibLoad and search again - ld hl,9+1+__libloadnamelen+2 - add hl,de - push hl - call 0205C4h ; _popop1 to restore running program name - pop hl ; start of loader (required to be in hl) - ld de,__relocationstart ; start of relocation data - jp (hl) ; jump to the loader -- it should take care of everything else -__notfound: - call 0205C4h ; _popop1 to restore running program name - call 020814h ; _clrscrn - call 020828h ; _homeup - ld hl,__missingappvar - call 0207C0h ; _puts - call 0207F0h ; _newline - ld hl,__webaddress - call 0207C0h ; _puts - jp 020D8Ch ; _getkey - - segment libs -__relocationstart: ; relocation data will be placed here - ;... - ;... - ;... - - segment data -__missingappvar: - db "Need " -__libloadname: - db "LibLoad" -__libloadnamelen := $-__libloadname - db 0 -__webaddress: - db "http://tiny.cc/clibs",0 +;------------------------------------------------------------------------------- +; Libload launcher for shared libraries +;------------------------------------------------------------------------------- + .def __findlibload + + segment launcher + .assume adl=1 + +__findlibload: + call 020628h ; _pushop1 to save running program name + jr __tryfind +__inram: + call 021448h ; _arc_unarc +__tryfind: + ld hl,__libloadname-1 + call 020320h ; _mov9toop1 + ld a,015h ; appvarobj + ld (0D005F8h),a ; op1 + call 02050Ch ; _chkfindsym + jr c,__notfound + call 021F98h ; _chkinram + jr z,__inram ; if in ram, archive LibLoad and search again + ld hl,9+1+__libloadnamelen+2 + add hl,de + push hl + call 0205C4h ; _popop1 to restore running program name + pop hl ; start of loader (required to be in hl) + ld de,__relocationstart ; start of relocation data + jp (hl) ; jump to the loader -- it should take care of everything else +__notfound: + call 0205C4h ; _popop1 to restore running program name + call 020814h ; _clrscrn + call 020828h ; _homeup + ld hl,__missingappvar + call 0207C0h ; _puts + call 0207F0h ; _newline + ld hl,__webaddress + call 0207C0h ; _puts + jp 020D8Ch ; _getkey + + segment libs +__relocationstart: ; relocation data will be placed here + ;... + ;... + ;... + + segment data +__missingappvar: + db "Need " +__libloadname: + db "LibLoad" +__libloadnamelen := $-__libloadname + db 0 +__webaddress: + db "http://tiny.cc/clibs",0 diff --git a/frontends/calculator/CEdev/lib/libload.lib b/frontends/calculator/CEdev/lib/libload.lib index 16549cd..5e9ee20 100644 --- a/frontends/calculator/CEdev/lib/libload.lib +++ b/frontends/calculator/CEdev/lib/libload.lib @@ -1 +1 @@ -library "LibLoad", 30 +library "LibLoad", 30 diff --git a/frontends/calculator/CEdev/lib/libload/fileioc.lib b/frontends/calculator/CEdev/lib/libload/fileioc.lib index 73b0a24..910dbef 100644 --- a/frontends/calculator/CEdev/lib/libload/fileioc.lib +++ b/frontends/calculator/CEdev/lib/libload/fileioc.lib @@ -1,35 +1,35 @@ -library "FILEIOC", 4 - export ti_CloseAll ; 2 - export ti_Open ; 4 - export ti_OpenVar ; 6 - export ti_Close ; 8 - export ti_Write ; 10 - export ti_Read ; 12 - export ti_GetC ; 14 - export ti_PutC ; 16 - export ti_Delete ; 18 - export ti_DeleteVar ; 20 - export ti_Seek ; 22 - export ti_Resize ; 24 - export ti_IsArchived ; 26 - export ti_SetArchiveStatus ; 28 - export ti_Tell ; 30 - export ti_Rewind ; 32 - export ti_GetSize ; 34 - export ti_GetTokenString ; 36 - export ti_GetDataPtr ; 38 - export ti_Detect ; 40 - export ti_DetectVar ; 42 - export ti_SetVar ; 44 - export ti_StoVar ; 46 - export ti_RclVar ; 48 - export ti_AllocString ; 50 - export ti_AllocList ; 52 - export ti_AllocMatrix ; 54 - export ti_AllocCplxList ; 56 - export ti_AllocEqu ; 58 - export ti_DetectAny ; 60 - export ti_GetVATPtr ; 62 - export ti_GetName ; 64 - export ti_Rename ; 66 - export ti_RenameVar ; 68 +library "FILEIOC", 4 + export ti_CloseAll ; 2 + export ti_Open ; 4 + export ti_OpenVar ; 6 + export ti_Close ; 8 + export ti_Write ; 10 + export ti_Read ; 12 + export ti_GetC ; 14 + export ti_PutC ; 16 + export ti_Delete ; 18 + export ti_DeleteVar ; 20 + export ti_Seek ; 22 + export ti_Resize ; 24 + export ti_IsArchived ; 26 + export ti_SetArchiveStatus ; 28 + export ti_Tell ; 30 + export ti_Rewind ; 32 + export ti_GetSize ; 34 + export ti_GetTokenString ; 36 + export ti_GetDataPtr ; 38 + export ti_Detect ; 40 + export ti_DetectVar ; 42 + export ti_SetVar ; 44 + export ti_StoVar ; 46 + export ti_RclVar ; 48 + export ti_AllocString ; 50 + export ti_AllocList ; 52 + export ti_AllocMatrix ; 54 + export ti_AllocCplxList ; 56 + export ti_AllocEqu ; 58 + export ti_DetectAny ; 60 + export ti_GetVATPtr ; 62 + export ti_GetName ; 64 + export ti_Rename ; 66 + export ti_RenameVar ; 68 diff --git a/frontends/calculator/CEdev/lib/libload/graphx.lib b/frontends/calculator/CEdev/lib/libload/graphx.lib index 58aafe8..8822316 100644 --- a/frontends/calculator/CEdev/lib/libload/graphx.lib +++ b/frontends/calculator/CEdev/lib/libload/graphx.lib @@ -1,95 +1,95 @@ -library "GRAPHX", 10 - export gfx_Begin ; 2 - export gfx_End ; 4 - export gfx_SetColor ; 6 - export gfx_SetDefaultPalette ; 8 - export gfx_SetPalette ; 10 - export gfx_FillScreen ; 12 - export gfx_SetPixel ; 14 - export gfx_GetPixel ; 16 - export gfx_GetDraw ; 18 - export gfx_SetDraw ; 20 - export gfx_SwapDraw ; 22 - export gfx_Blit ; 24 - export gfx_BlitLines ; 26 - export gfx_BlitRectangle ; 28 - export gfx_PrintChar ; 30 - export gfx_PrintInt ; 32 - export gfx_PrintUInt ; 34 - export gfx_PrintString ; 36 - export gfx_PrintStringXY ; 38 - export gfx_SetTextXY ; 40 - export gfx_SetTextBGColor ; 42 - export gfx_SetTextFGColor ; 44 - export gfx_SetTextTransparentColor ; 46 - export gfx_SetFontData ; 48 - export gfx_SetFontSpacing ; 50 - export gfx_SetMonospaceFont ; 52 - export gfx_GetStringWidth ; 54 - export gfx_GetCharWidth ; 56 - export gfx_GetTextX ; 58 - export gfx_GetTextY ; 60 - export gfx_Line ; 62 - export gfx_HorizLine ; 64 - export gfx_VertLine ; 66 - export gfx_Circle ; 68 - export gfx_FillCircle ; 70 - export gfx_Rectangle ; 72 - export gfx_FillRectangle ; 74 - export gfx_Line_NoClip ; 76 - export gfx_HorizLine_NoClip ; 78 - export gfx_VertLine_NoClip ; 80 - export gfx_FillCircle_NoClip ; 82 - export gfx_Rectangle_NoClip ; 84 - export gfx_FillRectangle_NoClip ; 86 - export gfx_SetClipRegion ; 88 - export gfx_GetClipRegion ; 90 - export gfx_ShiftDown ; 92 - export gfx_ShiftUp ; 94 - export gfx_ShiftLeft ; 96 - export gfx_ShiftRight ; 98 - export gfx_Tilemap ; 100 - export gfx_Tilemap_NoClip ; 102 - export gfx_TransparentTilemap ; 104 - export gfx_TransparentTilemap_NoClip ; 106 - export gfx_TilePtr ; 108 - export gfx_TilePtrMapped ; 110 - export gfx_Reserved ; 112 - export gfx_AllocSprite ; 114 - export gfx_Sprite ; 116 - export gfx_TransparentSprite ; 118 - export gfx_Sprite_NoClip ; 120 - export gfx_TransparentSprite_NoClip ; 122 - export gfx_GetSprite ; 124 - export gfx_ScaledSprite_NoClip ; 126 - export gfx_ScaledTransparentSprite_NoClip ; 128 - export gfx_FlipSpriteY ; 130 - export gfx_FlipSpriteX ; 132 - export gfx_RotateSpriteC ; 134 - export gfx_RotateSpriteCC ; 136 - export gfx_RotateSpriteHalf ; 138 - export gfx_Polygon ; 140 - export gfx_Polygon_NoClip ; 142 - export gfx_FillTriangle ; 144 - export gfx_FillTriangle_NoClip ; 146 - export gfx_Deprecated ; 148 - export gfx_SetTextScale ; 150 - export gfx_SetTransparentColor ; 152 - export gfx_ZeroScreen ; 154 - export gfx_SetTextConfig ; 156 - export gfx_GetSpriteChar ; 158 - export gfx_Lighten ; 160 - export gfx_Darken ; 162 - export gfx_SetFontHeight ; 164 - export gfx_ScaleSprite ; 166 - export gfx_FloodFill ; 168 - export gfx_RLETSprite ; 170 - export gfx_RLETSprite_NoClip ; 172 - export gfx_ConvertFromRLETSprite ; 174 - export gfx_ConvertToRLETSprite ; 176 - export gfx_ConvertToNewRLETSprite ; 178 - export gfx_RotateScaleSprite ; 180 - export gfx_RotatedScaledTransparentSprite_NoClip ; 182 - export gfx_RotatedScaledSprite_NoClip ; 184 - export gfx_SetCharData ; 186 - export gfx_Wait ; 188 +library "GRAPHX", 10 + export gfx_Begin ; 2 + export gfx_End ; 4 + export gfx_SetColor ; 6 + export gfx_SetDefaultPalette ; 8 + export gfx_SetPalette ; 10 + export gfx_FillScreen ; 12 + export gfx_SetPixel ; 14 + export gfx_GetPixel ; 16 + export gfx_GetDraw ; 18 + export gfx_SetDraw ; 20 + export gfx_SwapDraw ; 22 + export gfx_Blit ; 24 + export gfx_BlitLines ; 26 + export gfx_BlitRectangle ; 28 + export gfx_PrintChar ; 30 + export gfx_PrintInt ; 32 + export gfx_PrintUInt ; 34 + export gfx_PrintString ; 36 + export gfx_PrintStringXY ; 38 + export gfx_SetTextXY ; 40 + export gfx_SetTextBGColor ; 42 + export gfx_SetTextFGColor ; 44 + export gfx_SetTextTransparentColor ; 46 + export gfx_SetFontData ; 48 + export gfx_SetFontSpacing ; 50 + export gfx_SetMonospaceFont ; 52 + export gfx_GetStringWidth ; 54 + export gfx_GetCharWidth ; 56 + export gfx_GetTextX ; 58 + export gfx_GetTextY ; 60 + export gfx_Line ; 62 + export gfx_HorizLine ; 64 + export gfx_VertLine ; 66 + export gfx_Circle ; 68 + export gfx_FillCircle ; 70 + export gfx_Rectangle ; 72 + export gfx_FillRectangle ; 74 + export gfx_Line_NoClip ; 76 + export gfx_HorizLine_NoClip ; 78 + export gfx_VertLine_NoClip ; 80 + export gfx_FillCircle_NoClip ; 82 + export gfx_Rectangle_NoClip ; 84 + export gfx_FillRectangle_NoClip ; 86 + export gfx_SetClipRegion ; 88 + export gfx_GetClipRegion ; 90 + export gfx_ShiftDown ; 92 + export gfx_ShiftUp ; 94 + export gfx_ShiftLeft ; 96 + export gfx_ShiftRight ; 98 + export gfx_Tilemap ; 100 + export gfx_Tilemap_NoClip ; 102 + export gfx_TransparentTilemap ; 104 + export gfx_TransparentTilemap_NoClip ; 106 + export gfx_TilePtr ; 108 + export gfx_TilePtrMapped ; 110 + export gfx_Reserved ; 112 + export gfx_AllocSprite ; 114 + export gfx_Sprite ; 116 + export gfx_TransparentSprite ; 118 + export gfx_Sprite_NoClip ; 120 + export gfx_TransparentSprite_NoClip ; 122 + export gfx_GetSprite ; 124 + export gfx_ScaledSprite_NoClip ; 126 + export gfx_ScaledTransparentSprite_NoClip ; 128 + export gfx_FlipSpriteY ; 130 + export gfx_FlipSpriteX ; 132 + export gfx_RotateSpriteC ; 134 + export gfx_RotateSpriteCC ; 136 + export gfx_RotateSpriteHalf ; 138 + export gfx_Polygon ; 140 + export gfx_Polygon_NoClip ; 142 + export gfx_FillTriangle ; 144 + export gfx_FillTriangle_NoClip ; 146 + export gfx_Deprecated ; 148 + export gfx_SetTextScale ; 150 + export gfx_SetTransparentColor ; 152 + export gfx_ZeroScreen ; 154 + export gfx_SetTextConfig ; 156 + export gfx_GetSpriteChar ; 158 + export gfx_Lighten ; 160 + export gfx_Darken ; 162 + export gfx_SetFontHeight ; 164 + export gfx_ScaleSprite ; 166 + export gfx_FloodFill ; 168 + export gfx_RLETSprite ; 170 + export gfx_RLETSprite_NoClip ; 172 + export gfx_ConvertFromRLETSprite ; 174 + export gfx_ConvertToRLETSprite ; 176 + export gfx_ConvertToNewRLETSprite ; 178 + export gfx_RotateScaleSprite ; 180 + export gfx_RotatedScaledTransparentSprite_NoClip ; 182 + export gfx_RotatedScaledSprite_NoClip ; 184 + export gfx_SetCharData ; 186 + export gfx_Wait ; 188 diff --git a/frontends/calculator/CEdev/lib/libload/keypadc.lib b/frontends/calculator/CEdev/lib/libload/keypadc.lib index 89bc3ba..0f6eb9f 100644 --- a/frontends/calculator/CEdev/lib/libload/keypadc.lib +++ b/frontends/calculator/CEdev/lib/libload/keypadc.lib @@ -1,5 +1,5 @@ -library "KEYPADC", 2 - export kb_Scan ; 2 - export kb_ScanGroup ; 4 - export kb_AnyKey ; 6 - export kb_Reset ; 8 +library "KEYPADC", 2 + export kb_Scan ; 2 + export kb_ScanGroup ; 4 + export kb_AnyKey ; 6 + export kb_Reset ; 8 diff --git a/frontends/calculator/CEdev/lib/shared/abort.src b/frontends/calculator/CEdev/lib/shared/abort.src index b2d9648..cbab8af 100644 --- a/frontends/calculator/CEdev/lib/shared/abort.src +++ b/frontends/calculator/CEdev/lib/shared/abort.src @@ -1,13 +1,13 @@ -; --- -; triggers open debugger -; --- - - .def _abort - .ref __exit - .assume adl=1 - -_abort: - scf - sbc hl,hl - ld (hl),1 - jp __exit +; --- +; triggers open debugger +; --- + + .def _abort + .ref __exit + .assume adl=1 + +_abort: + scf + sbc hl,hl + ld (hl),1 + jp __exit diff --git a/frontends/calculator/CEdev/lib/shared/abs.src b/frontends/calculator/CEdev/lib/shared/abs.src index 5dc8aa1..65aa2b6 100644 --- a/frontends/calculator/CEdev/lib/shared/abs.src +++ b/frontends/calculator/CEdev/lib/shared/abs.src @@ -1,17 +1,17 @@ - .def _abs - .assume adl=1 - -;int abs(int); - -_abs: - pop hl - pop de - push de - push hl - or a,a - sbc hl,hl - sbc hl,de - ret p - ex de,hl - ret - + .def _abs + .assume adl=1 + +;int abs(int); + +_abs: + pop hl + pop de + push de + push hl + or a,a + sbc hl,hl + sbc hl,de + ret p + ex de,hl + ret + diff --git a/frontends/calculator/CEdev/lib/shared/atoi.src b/frontends/calculator/CEdev/lib/shared/atoi.src index 2619388..86bc88e 100644 --- a/frontends/calculator/CEdev/lib/shared/atoi.src +++ b/frontends/calculator/CEdev/lib/shared/atoi.src @@ -1,22 +1,22 @@ - .ref _strtol - .def _atoi - .assume adl=1 - -; int atoi(char *cp); - -_atoi: - pop bc - pop de - push de - push bc - ld bc,10 - push bc - ld c,b - push bc - push de - call _strtol - pop de - pop bc - pop bc - ret - + .ref _strtol + .def _atoi + .assume adl=1 + +; int atoi(char *cp); + +_atoi: + pop bc + pop de + push de + push bc + ld bc,10 + push bc + ld c,b + push bc + push de + call _strtol + pop de + pop bc + pop bc + ret + diff --git a/frontends/calculator/CEdev/lib/shared/atol.src b/frontends/calculator/CEdev/lib/shared/atol.src index 7bf22d7..b241ad7 100644 --- a/frontends/calculator/CEdev/lib/shared/atol.src +++ b/frontends/calculator/CEdev/lib/shared/atol.src @@ -1,8 +1,8 @@ - .ref _atoi - .def _atol - .assume adl=1 - -; long atol(char *cp); - -_atol equ _atoi - + .ref _atoi + .def _atol + .assume adl=1 + +; long atol(char *cp); + +_atol equ _atoi + diff --git a/frontends/calculator/CEdev/lib/shared/atomic_load_32.src b/frontends/calculator/CEdev/lib/shared/atomic_load_32.src index a49df22..d0bb9fa 100644 --- a/frontends/calculator/CEdev/lib/shared/atomic_load_32.src +++ b/frontends/calculator/CEdev/lib/shared/atomic_load_32.src @@ -1,61 +1,61 @@ -; --- -; uint32_t atomic_load_32(volatile uint32_t *p) -; --- - - .def _atomic_load_32 - .assume adl=1 - -_atomic_load_32: - pop hl - ex (sp),iy - push hl - ld c,0 -retry: -; Wait for a different (increasing) amount of time before each retry to prevent -; getting caught in an endless loop of the value changing between reads with a -; fixed period equal to the amount of time it takes for each retry - inc c - ld b,c -wait: - djnz wait -; Read the value twice. - lea hl,iy+3 - ; Time between first and last byte read: - ld de,(iy) ; 2R - ld a,(hl) ; + 1F+1R - cp a,(hl) ; + 1F+1R - ld hl,(iy) ; + 3F+3R - ; = 5F+7R - ; = 48cc (assuming F = R = 3) - ; = 1us (assuming 48MHz clock speed) - ; Don't need to worry about DMA, just - ; retry until not interrupted by DMA -; Retry if the values read differ. -; -; If the values differ, then the underlying value changed between reading the -; first byte of the first 32-bit read and the last byte of the second 32-bit -; read: -; * If a change occurs between the two 32-bit reads, then both values read -; remain valid. -; * If a change occurs in the middle of one of the 32-bit reads: -; * If the bytes already read change but the bytes yet to read do not -; change, then the value read is the valid value before the change. -; * If the bytes already read do not change but the yet still to read -; change, then the value read is the valid value after the change. -; * If the bytes already read and the bytes yet to read change, then the -; value read is an invalid mix of the values before and after the change. -; -; Without reading the value again, there is not enough information to determine -; if the third case occurred. If it did occur, then one of the values is -; invalid. But there is also not enough information to determine which is -; invalid, and therefore which is valid. So reading the value must be retried. -; -; (Furthermore, if a change occurs in the middle of both 32-bit reads and the -; bytes already read change in both, then both values read become invalid.) - jr nz,retry - sbc hl,de - jr nz,retry -; Values don't differ, good to go. - add hl,de - ld e,a ; euhl = value read - ret +; --- +; uint32_t atomic_load_32(volatile uint32_t *p) +; --- + + .def _atomic_load_32 + .assume adl=1 + +_atomic_load_32: + pop hl + ex (sp),iy + push hl + ld c,0 +retry: +; Wait for a different (increasing) amount of time before each retry to prevent +; getting caught in an endless loop of the value changing between reads with a +; fixed period equal to the amount of time it takes for each retry + inc c + ld b,c +wait: + djnz wait +; Read the value twice. + lea hl,iy+3 + ; Time between first and last byte read: + ld de,(iy) ; 2R + ld a,(hl) ; + 1F+1R + cp a,(hl) ; + 1F+1R + ld hl,(iy) ; + 3F+3R + ; = 5F+7R + ; = 48cc (assuming F = R = 3) + ; = 1us (assuming 48MHz clock speed) + ; Don't need to worry about DMA, just + ; retry until not interrupted by DMA +; Retry if the values read differ. +; +; If the values differ, then the underlying value changed between reading the +; first byte of the first 32-bit read and the last byte of the second 32-bit +; read: +; * If a change occurs between the two 32-bit reads, then both values read +; remain valid. +; * If a change occurs in the middle of one of the 32-bit reads: +; * If the bytes already read change but the bytes yet to read do not +; change, then the value read is the valid value before the change. +; * If the bytes already read do not change but the yet still to read +; change, then the value read is the valid value after the change. +; * If the bytes already read and the bytes yet to read change, then the +; value read is an invalid mix of the values before and after the change. +; +; Without reading the value again, there is not enough information to determine +; if the third case occurred. If it did occur, then one of the values is +; invalid. But there is also not enough information to determine which is +; invalid, and therefore which is valid. So reading the value must be retried. +; +; (Furthermore, if a change occurs in the middle of both 32-bit reads and the +; bytes already read change in both, then both values read become invalid.) + jr nz,retry + sbc hl,de + jr nz,retry +; Values don't differ, good to go. + add hl,de + ld e,a ; euhl = value read + ret diff --git a/frontends/calculator/CEdev/lib/shared/atomic_load_decreasing_32.src b/frontends/calculator/CEdev/lib/shared/atomic_load_decreasing_32.src index 639eac1..555e93e 100644 --- a/frontends/calculator/CEdev/lib/shared/atomic_load_decreasing_32.src +++ b/frontends/calculator/CEdev/lib/shared/atomic_load_decreasing_32.src @@ -1,89 +1,89 @@ -; --- -; uint32_t atomic_load_decreasing_32(volatile uint32_t *p) -; --- - - .def _atomic_load_decreasing_32 - .assume adl=1 - -_atomic_load_decreasing_32: - pop hl - ex (sp),iy - push hl -; Temporarily disable interrupts. - ld a,i - di -; Read the value twice. -; first value read = cude, second value read = auhl - ; Time between first and last byte read: - ld de,(iy) ; 2R - ld c,(iy+3) ; + 3F+1R - ld hl,(iy) ; + 3F+3R - ld a,(iy+3) ; + 3F+1R - ; = 9F+7R - ; = 56cc (assuming F = R = 3) - ; ~ 1.17us (assuming 48MHz clock speed) - ; + approximate worst-case LCD + USB DMA - ; ~ 5us -; Re-enable interrupts if they were previously enabled. - jp po,no_ei - ei -no_ei: -; Compare and return the greater of the two values read. -; -; If the values differ, then the underlying value changed between reading the -; first byte of the first 32-bit read and the last byte of the second 32-bit -; read: -; * If a change occurs between the two 32-bit reads, then both values read -; remain valid. -; * If a change occurs in the middle of one of the 32-bit reads: -; * If the bytes already read change but the bytes yet to read do not -; change, then the value read is the valid value before the change. -; * If the bytes already read do not change but the yet still to read -; change, then the value read is the valid value after the change. -; * If the bytes already read and the bytes yet to read change, then the -; value read is an invalid mix of the values before and after the change. -; -; If the final case did not occur, then both values read are valid. -; -; If the final case occurred for only the second value read, then due to reading -; bytes in little-endian order, one to three upper bytes will reflect the -; decreased value after the change. Regardless of the lower bytes, the valid, -; first value read will be greater than the invalid, second value read. -; -; If the final case occurred for only the first value read, then due to reading -; bytes in little-endian order, one to three upper bytes will reflect the -; decreased value after the change, while the remaining one to three lower bytes -; will reflect the value before the change. If it is assumed that the value -; decreased by less than 256, then the upper bytes must have decreased through -; borrow and the lower bytes of the valid, second value read will be greater -; than the lower bytes of the invalid, first value read. And because the full -; second value read will reflect the the decreased value after the change, and -; therefore the two values read will only differ in the lower bytes, it follows -; that the full, valid, second valid read will be greater than the full, -; invalid, first value read. (Note that this assertion can be extended to -; include 256 because only one byte would change, making this whole case -; unreachable.) -; -; If the third case occurred for both values read, then both are invalid. There -; is no reasonable way to detect this, so it is assumed that this did not occur. -; -; Combining all of these cases and assumptions, the greater of the two values -; read will always be valid. - or a,a - sbc hl,de - sbc a,c ; auhl = second value read - ; - first value read - jr c,swap -; second value read >= first value read -; ==> second value read is valid - add hl,de - adc a,c - ld e,a ; euhl = second value read - ret - -swap: -; second value read < first value read -; ==> first value read is valid - ex de,hl - ld e,c ; euhl = first value read - ret +; --- +; uint32_t atomic_load_decreasing_32(volatile uint32_t *p) +; --- + + .def _atomic_load_decreasing_32 + .assume adl=1 + +_atomic_load_decreasing_32: + pop hl + ex (sp),iy + push hl +; Temporarily disable interrupts. + ld a,i + di +; Read the value twice. +; first value read = cude, second value read = auhl + ; Time between first and last byte read: + ld de,(iy) ; 2R + ld c,(iy+3) ; + 3F+1R + ld hl,(iy) ; + 3F+3R + ld a,(iy+3) ; + 3F+1R + ; = 9F+7R + ; = 56cc (assuming F = R = 3) + ; ~ 1.17us (assuming 48MHz clock speed) + ; + approximate worst-case LCD + USB DMA + ; ~ 5us +; Re-enable interrupts if they were previously enabled. + jp po,no_ei + ei +no_ei: +; Compare and return the greater of the two values read. +; +; If the values differ, then the underlying value changed between reading the +; first byte of the first 32-bit read and the last byte of the second 32-bit +; read: +; * If a change occurs between the two 32-bit reads, then both values read +; remain valid. +; * If a change occurs in the middle of one of the 32-bit reads: +; * If the bytes already read change but the bytes yet to read do not +; change, then the value read is the valid value before the change. +; * If the bytes already read do not change but the yet still to read +; change, then the value read is the valid value after the change. +; * If the bytes already read and the bytes yet to read change, then the +; value read is an invalid mix of the values before and after the change. +; +; If the final case did not occur, then both values read are valid. +; +; If the final case occurred for only the second value read, then due to reading +; bytes in little-endian order, one to three upper bytes will reflect the +; decreased value after the change. Regardless of the lower bytes, the valid, +; first value read will be greater than the invalid, second value read. +; +; If the final case occurred for only the first value read, then due to reading +; bytes in little-endian order, one to three upper bytes will reflect the +; decreased value after the change, while the remaining one to three lower bytes +; will reflect the value before the change. If it is assumed that the value +; decreased by less than 256, then the upper bytes must have decreased through +; borrow and the lower bytes of the valid, second value read will be greater +; than the lower bytes of the invalid, first value read. And because the full +; second value read will reflect the the decreased value after the change, and +; therefore the two values read will only differ in the lower bytes, it follows +; that the full, valid, second valid read will be greater than the full, +; invalid, first value read. (Note that this assertion can be extended to +; include 256 because only one byte would change, making this whole case +; unreachable.) +; +; If the third case occurred for both values read, then both are invalid. There +; is no reasonable way to detect this, so it is assumed that this did not occur. +; +; Combining all of these cases and assumptions, the greater of the two values +; read will always be valid. + or a,a + sbc hl,de + sbc a,c ; auhl = second value read + ; - first value read + jr c,swap +; second value read >= first value read +; ==> second value read is valid + add hl,de + adc a,c + ld e,a ; euhl = second value read + ret + +swap: +; second value read < first value read +; ==> first value read is valid + ex de,hl + ld e,c ; euhl = first value read + ret diff --git a/frontends/calculator/CEdev/lib/shared/atomic_load_increasing_32.src b/frontends/calculator/CEdev/lib/shared/atomic_load_increasing_32.src index d8c871f..1ef6f8f 100644 --- a/frontends/calculator/CEdev/lib/shared/atomic_load_increasing_32.src +++ b/frontends/calculator/CEdev/lib/shared/atomic_load_increasing_32.src @@ -1,88 +1,88 @@ -; --- -; uint32_t atomic_load_increasing_32(volatile uint32_t *p) -; --- - - .def _atomic_load_increasing_32 - .assume adl=1 - -_atomic_load_increasing_32: - pop hl - ex (sp),iy - push hl -; Temporarily disable interrupts. - ld a,i - di -; Read the value twice. -; first value read = cude, second value read = auhl - ; Time between first and last byte read: - ld de,(iy) ; 2R - ld c,(iy+3) ; + 3F+1R - ld hl,(iy) ; + 3F+3R - ld a,(iy+3) ; + 3F+1R - ; = 9F+7R - ; = 56cc (assuming F = R = 3) - ; ~ 1.17us (assuming 48MHz clock speed) - ; + approximate worst-case LCD + USB DMA - ; ~ 5us -; Re-enable interrupts if they were previously enabled. - jp po,no_ei - ei -no_ei: -; Compare and return the lesser of the two values read. -; -; If the values differ, then the underlying value changed between reading the -; first byte of the first 32-bit read and the last byte of the second 32-bit -; read: -; * If a change occurs between the two 32-bit reads, then both values read -; remain valid. -; * If a change occurs in the middle of one of the 32-bit reads: -; * If the bytes already read change but the bytes yet to read do not -; change, then the value read is the valid value before the change. -; * If the bytes already read do not change but the yet still to read -; change, then the value read is the valid value after the change. -; * If the bytes already read and the bytes yet to read change, then the -; value read is an invalid mix of the values before and after the change. -; -; If the final case did not occur, then both values read are valid. -; -; If the final case occurred for only the second value read, then due to reading -; bytes in little-endian order, one to three upper bytes will reflect the -; increased value after the change. Regardless of the lower bytes, the valid, -; first value read will be less than the invalid, second value read. -; -; If the final case occurred for only the first value read, then due to reading -; bytes in little-endian order, one to three upper bytes will reflect the -; increased value after the change, while the remaining one to three lower bytes -; will reflect the value before the change. If it is assumed that the value -; increased by less than 256, then the upper bytes must have increased through -; carry and the lower bytes of the valid, second value read will be less than -; the lower bytes of the invalid, first value read. And because the full second -; value read will reflect the the increased value after the change, and -; therefore the two values read will only differ in the lower bytes, it follows -; that the full, valid, second valid read will be less than the full, invalid, -; first value read. (Note that this assertion can be extended to include 256 -; because only one byte would change, making this whole case unreachable.) -; -; If the third case occurred for both values read, then both are invalid. There -; is no reasonable way to detect this, so it is assumed that this did not occur. -; -; Combining all of these cases and assumptions, the lesser of the two values -; read will always be valid. - or a,a - sbc hl,de - sbc a,c ; auhl = second value read - ; - first value read - jr c,no_swap -; second value read >= first value read -; ==> first value read is valid - ex de,hl - ld e,c ; euhl = first value read - ret - -no_swap: -; second value read < first value read -; ==> second value read is valid - add hl,de - adc a,c - ld e,a ; euhl = second value read - ret +; --- +; uint32_t atomic_load_increasing_32(volatile uint32_t *p) +; --- + + .def _atomic_load_increasing_32 + .assume adl=1 + +_atomic_load_increasing_32: + pop hl + ex (sp),iy + push hl +; Temporarily disable interrupts. + ld a,i + di +; Read the value twice. +; first value read = cude, second value read = auhl + ; Time between first and last byte read: + ld de,(iy) ; 2R + ld c,(iy+3) ; + 3F+1R + ld hl,(iy) ; + 3F+3R + ld a,(iy+3) ; + 3F+1R + ; = 9F+7R + ; = 56cc (assuming F = R = 3) + ; ~ 1.17us (assuming 48MHz clock speed) + ; + approximate worst-case LCD + USB DMA + ; ~ 5us +; Re-enable interrupts if they were previously enabled. + jp po,no_ei + ei +no_ei: +; Compare and return the lesser of the two values read. +; +; If the values differ, then the underlying value changed between reading the +; first byte of the first 32-bit read and the last byte of the second 32-bit +; read: +; * If a change occurs between the two 32-bit reads, then both values read +; remain valid. +; * If a change occurs in the middle of one of the 32-bit reads: +; * If the bytes already read change but the bytes yet to read do not +; change, then the value read is the valid value before the change. +; * If the bytes already read do not change but the yet still to read +; change, then the value read is the valid value after the change. +; * If the bytes already read and the bytes yet to read change, then the +; value read is an invalid mix of the values before and after the change. +; +; If the final case did not occur, then both values read are valid. +; +; If the final case occurred for only the second value read, then due to reading +; bytes in little-endian order, one to three upper bytes will reflect the +; increased value after the change. Regardless of the lower bytes, the valid, +; first value read will be less than the invalid, second value read. +; +; If the final case occurred for only the first value read, then due to reading +; bytes in little-endian order, one to three upper bytes will reflect the +; increased value after the change, while the remaining one to three lower bytes +; will reflect the value before the change. If it is assumed that the value +; increased by less than 256, then the upper bytes must have increased through +; carry and the lower bytes of the valid, second value read will be less than +; the lower bytes of the invalid, first value read. And because the full second +; value read will reflect the the increased value after the change, and +; therefore the two values read will only differ in the lower bytes, it follows +; that the full, valid, second valid read will be less than the full, invalid, +; first value read. (Note that this assertion can be extended to include 256 +; because only one byte would change, making this whole case unreachable.) +; +; If the third case occurred for both values read, then both are invalid. There +; is no reasonable way to detect this, so it is assumed that this did not occur. +; +; Combining all of these cases and assumptions, the lesser of the two values +; read will always be valid. + or a,a + sbc hl,de + sbc a,c ; auhl = second value read + ; - first value read + jr c,no_swap +; second value read >= first value read +; ==> first value read is valid + ex de,hl + ld e,c ; euhl = first value read + ret + +no_swap: +; second value read < first value read +; ==> second value read is valid + add hl,de + adc a,c + ld e,a ; euhl = second value read + ret diff --git a/frontends/calculator/CEdev/lib/shared/atos.src b/frontends/calculator/CEdev/lib/shared/atos.src index cb3403b..6c39f89 100644 --- a/frontends/calculator/CEdev/lib/shared/atos.src +++ b/frontends/calculator/CEdev/lib/shared/atos.src @@ -1,8 +1,8 @@ - .ref _atoi - .def _atos - .assume adl=1 - -; short int atos(char *cp); - -_atos equ _atoi - + .ref _atoi + .def _atos + .assume adl=1 + +; short int atos(char *cp); + +_atos equ _atoi + diff --git a/frontends/calculator/CEdev/lib/shared/bdivs.src b/frontends/calculator/CEdev/lib/shared/bdivs.src index 1bd30b8..710ad7e 100644 --- a/frontends/calculator/CEdev/lib/shared/bdivs.src +++ b/frontends/calculator/CEdev/lib/shared/bdivs.src @@ -1,44 +1,44 @@ -; (c) Copyright 2001-2008 Zilog Inc. -;------------------------------------------------------------------------- -; Signed Byte Division. -; Input: -; Operand1: -; B : 8 bit dividend (numerator) -; -; Operand2: -; C : 8 bit divisor (denominator) -; -; Output: -; Result: A : 8 bit quotient -; Registers Used: -; d, e -;------------------------------------------------------------------------- - .ref __bdivu - .def __bdivs - .assume adl=1 - -__bdivs: - push bc - xor a,a - sub a,b - jp m,_L0 - ld b,a -_L0: - xor a,a - sub a,c - jp m,_L1 - ld c,a -_L1: - call __bdivu - pop bc - push hl - ld l,a - ld a,b - xor a,c - ld a,l - jp p,_L2 - neg -_L2: - pop hl - ret - +; (c) Copyright 2001-2008 Zilog Inc. +;------------------------------------------------------------------------- +; Signed Byte Division. +; Input: +; Operand1: +; B : 8 bit dividend (numerator) +; +; Operand2: +; C : 8 bit divisor (denominator) +; +; Output: +; Result: A : 8 bit quotient +; Registers Used: +; d, e +;------------------------------------------------------------------------- + .ref __bdivu + .def __bdivs + .assume adl=1 + +__bdivs: + push bc + xor a,a + sub a,b + jp m,_L0 + ld b,a +_L0: + xor a,a + sub a,c + jp m,_L1 + ld c,a +_L1: + call __bdivu + pop bc + push hl + ld l,a + ld a,b + xor a,c + ld a,l + jp p,_L2 + neg +_L2: + pop hl + ret + diff --git a/frontends/calculator/CEdev/lib/shared/bdivu.src b/frontends/calculator/CEdev/lib/shared/bdivu.src index cd2b7d3..68b9d82 100644 --- a/frontends/calculator/CEdev/lib/shared/bdivu.src +++ b/frontends/calculator/CEdev/lib/shared/bdivu.src @@ -1,41 +1,41 @@ -; (c) Copyright 2007-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Unsigned Byte Division. -; Input: -; Operand1: -; B : 8 bit dividend (numerator x) -; -; Operand2: -; C : 8 bit divisor (denominator y) -; -; Output: -; Result: A : 8 bit quotient -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __bdivu - .assume adl=1 - -__bdivu: - push bc - push hl - ld h,b - xor a,a - ld b,8 ;i = 8 (bit counter) -loop: - sla h - rla - jr c,over - cp a,c - jr c,under -over: - sub a,c - inc h -under: - djnz loop - - ld a,h - pop hl - pop bc - ret - +; (c) Copyright 2007-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Unsigned Byte Division. +; Input: +; Operand1: +; B : 8 bit dividend (numerator x) +; +; Operand2: +; C : 8 bit divisor (denominator y) +; +; Output: +; Result: A : 8 bit quotient +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __bdivu + .assume adl=1 + +__bdivu: + push bc + push hl + ld h,b + xor a,a + ld b,8 ;i = 8 (bit counter) +loop: + sla h + rla + jr c,over + cp a,c + jr c,under +over: + sub a,c + inc h +under: + djnz loop + + ld a,h + pop hl + pop bc + ret + diff --git a/frontends/calculator/CEdev/lib/shared/bldix.src b/frontends/calculator/CEdev/lib/shared/bldix.src index 6d3dbf7..dbf7ef0 100644 --- a/frontends/calculator/CEdev/lib/shared/bldix.src +++ b/frontends/calculator/CEdev/lib/shared/bldix.src @@ -1,25 +1,25 @@ -; (c) Copyright 2007-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; byte load a,(ix+nnnnnn) -; Input: -; Operand1: -; BC : 24-bit offset from ix -; -; Output: -; Result: A : 8 bit -; -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __bldix - .assume adl=1 - -__bldix: - push ix - push af ; Preserve flags - add ix,bc - pop af ; Restore flags - ld a,(ix) - pop ix - ret - +; (c) Copyright 2007-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; byte load a,(ix+nnnnnn) +; Input: +; Operand1: +; BC : 24-bit offset from ix +; +; Output: +; Result: A : 8 bit +; +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __bldix + .assume adl=1 + +__bldix: + push ix + push af ; Preserve flags + add ix,bc + pop af ; Restore flags + ld a,(ix) + pop ix + ret + diff --git a/frontends/calculator/CEdev/lib/shared/bldiy.src b/frontends/calculator/CEdev/lib/shared/bldiy.src index acda08a..3631134 100644 --- a/frontends/calculator/CEdev/lib/shared/bldiy.src +++ b/frontends/calculator/CEdev/lib/shared/bldiy.src @@ -1,17 +1,17 @@ -; (c) Copyright 2007-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; byte load a,(iy+nnnnnn) -; Input: -; Operand1: -; BC : 24-bit offset from iy -; -; Output: -; Result: A : 8 bit -; -; Registers Used: -; -;------------------------------------------------------------------------- - .def __bldiy - .assume adl=1 - -__bldiy equ 0000FCh +; (c) Copyright 2007-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; byte load a,(iy+nnnnnn) +; Input: +; Operand1: +; BC : 24-bit offset from iy +; +; Output: +; Result: A : 8 bit +; +; Registers Used: +; +;------------------------------------------------------------------------- + .def __bldiy + .assume adl=1 + +__bldiy equ 0000FCh diff --git a/frontends/calculator/CEdev/lib/shared/bmuls.src b/frontends/calculator/CEdev/lib/shared/bmuls.src index 45d7111..1c5ab2e 100644 --- a/frontends/calculator/CEdev/lib/shared/bmuls.src +++ b/frontends/calculator/CEdev/lib/shared/bmuls.src @@ -1,25 +1,25 @@ -; (c) Copyright 2007-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Signed Byte Multiply -; Input: -; Operand1: -; A : 8 bit -; -; Operand2: -; B : 8 bit -; -; Output: -; Result: A : 8 bit product -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __bmuls - .assume adl=1 - -__bmuls: - push bc - ld c,a - mlt bc - ld a,c - pop bc - ret +; (c) Copyright 2007-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Signed Byte Multiply +; Input: +; Operand1: +; A : 8 bit +; +; Operand2: +; B : 8 bit +; +; Output: +; Result: A : 8 bit product +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __bmuls + .assume adl=1 + +__bmuls: + push bc + ld c,a + mlt bc + ld a,c + pop bc + ret diff --git a/frontends/calculator/CEdev/lib/shared/bmulu.src b/frontends/calculator/CEdev/lib/shared/bmulu.src index 20c27b5..a8413df 100644 --- a/frontends/calculator/CEdev/lib/shared/bmulu.src +++ b/frontends/calculator/CEdev/lib/shared/bmulu.src @@ -1,24 +1,24 @@ -; (c) Copyright 2007-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Unsigned Byte Multiply -; Input: -; Operand1: -; B : 8 bit -; -; Operand2: -; C : 8 bit -; -; Output: -; Result: A : 8 bit product -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __bmulu - .assume adl=1 - -__bmulu: - push bc - mlt bc - ld a,c - pop bc - ret +; (c) Copyright 2007-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Unsigned Byte Multiply +; Input: +; Operand1: +; B : 8 bit +; +; Operand2: +; C : 8 bit +; +; Output: +; Result: A : 8 bit product +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __bmulu + .assume adl=1 + +__bmulu: + push bc + mlt bc + ld a,c + pop bc + ret diff --git a/frontends/calculator/CEdev/lib/shared/brems.src b/frontends/calculator/CEdev/lib/shared/brems.src index 3687ced..5a05f82 100644 --- a/frontends/calculator/CEdev/lib/shared/brems.src +++ b/frontends/calculator/CEdev/lib/shared/brems.src @@ -1,40 +1,40 @@ -; (c) Copyright 2007-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Signed Byte Modulus -; Input: -; Operand1: -; A : 8 bit dividend (numerator) -; -; Operand2: -; C : 8 bit divisor (denominator) -; -; Output: -; Result: A : 8 bit modulus -; Registers Used: -; -;------------------------------------------------------------------------- - .ref __bremu - .def __brems - .assume adl=1 - -__brems: - push bc - ld b,a - bit 7,c - jr z,skip1 - ld a,c - neg - ld c,a -skip1: - ld a,b - bit 7,a - jr z,skip2 - neg -skip2: - call __bremu - bit 7,b - jr z,skip3 - neg -skip3: - pop bc - ret +; (c) Copyright 2007-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Signed Byte Modulus +; Input: +; Operand1: +; A : 8 bit dividend (numerator) +; +; Operand2: +; C : 8 bit divisor (denominator) +; +; Output: +; Result: A : 8 bit modulus +; Registers Used: +; +;------------------------------------------------------------------------- + .ref __bremu + .def __brems + .assume adl=1 + +__brems: + push bc + ld b,a + bit 7,c + jr z,skip1 + ld a,c + neg + ld c,a +skip1: + ld a,b + bit 7,a + jr z,skip2 + neg +skip2: + call __bremu + bit 7,b + jr z,skip3 + neg +skip3: + pop bc + ret diff --git a/frontends/calculator/CEdev/lib/shared/bremu.src b/frontends/calculator/CEdev/lib/shared/bremu.src index 4c60bc8..758e765 100644 --- a/frontends/calculator/CEdev/lib/shared/bremu.src +++ b/frontends/calculator/CEdev/lib/shared/bremu.src @@ -1,39 +1,39 @@ -; (c) Copyright 2007-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Unsigned Byte Modulus -; Input: -; Operand1: -; A : 8 bit dividend (numerator) -; -; Operand2: -; C : 8 bit divisor (denominator) -; -; Output: -; Result: A : 8 bit modulus -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __bremu - .assume adl=1 - -__bremu: - push bc - push hl - ld h,a - xor a,a - ld b,8 -loop: - sla h - rla - jr c,over - cp a,c - jr c,under -over: - sub a,c - inc h -under: - djnz loop - pop hl - pop bc - ret - +; (c) Copyright 2007-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Unsigned Byte Modulus +; Input: +; Operand1: +; A : 8 bit dividend (numerator) +; +; Operand2: +; C : 8 bit divisor (denominator) +; +; Output: +; Result: A : 8 bit modulus +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __bremu + .assume adl=1 + +__bremu: + push bc + push hl + ld h,a + xor a,a + ld b,8 +loop: + sla h + rla + jr c,over + cp a,c + jr c,under +over: + sub a,c + inc h +under: + djnz loop + pop hl + pop bc + ret + diff --git a/frontends/calculator/CEdev/lib/shared/bshl.src b/frontends/calculator/CEdev/lib/shared/bshl.src index 9c6c14b..2688b9e 100644 --- a/frontends/calculator/CEdev/lib/shared/bshl.src +++ b/frontends/calculator/CEdev/lib/shared/bshl.src @@ -1,18 +1,18 @@ -; (c) Copyright 2007-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Byte Shift Left -; Input: -; Operand1: -; A : 8 bit number to shift -; Operand2: -; B : 8 bit shift count -; -; Output: -; Result: A : 8 bit -; Registers Used: -; flags -;------------------------------------------------------------------------- - .def __bshl - .assume adl=1 - -__bshl equ 000100h +; (c) Copyright 2007-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Byte Shift Left +; Input: +; Operand1: +; A : 8 bit number to shift +; Operand2: +; B : 8 bit shift count +; +; Output: +; Result: A : 8 bit +; Registers Used: +; flags +;------------------------------------------------------------------------- + .def __bshl + .assume adl=1 + +__bshl equ 000100h diff --git a/frontends/calculator/CEdev/lib/shared/bshrs.src b/frontends/calculator/CEdev/lib/shared/bshrs.src index 4c53262..7a3fd54 100644 --- a/frontends/calculator/CEdev/lib/shared/bshrs.src +++ b/frontends/calculator/CEdev/lib/shared/bshrs.src @@ -1,29 +1,29 @@ -; (c) Copyright 2007-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Byte Shift Right Signed -; Input: -; Operand1: -; A : 8 bit number to shift -; Operand2: -; B : 8 bit shift count -; -; Output: -; Result: A : 8 bit -; Registers Used: -; flags -;------------------------------------------------------------------------- - .def __bshrs - .assume adl=1 - -__bshrs: - push bc - inc b - jr test - -loop: - sra a -test: - djnz loop - - pop bc - ret +; (c) Copyright 2007-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Byte Shift Right Signed +; Input: +; Operand1: +; A : 8 bit number to shift +; Operand2: +; B : 8 bit shift count +; +; Output: +; Result: A : 8 bit +; Registers Used: +; flags +;------------------------------------------------------------------------- + .def __bshrs + .assume adl=1 + +__bshrs: + push bc + inc b + jr test + +loop: + sra a +test: + djnz loop + + pop bc + ret diff --git a/frontends/calculator/CEdev/lib/shared/bshru.src b/frontends/calculator/CEdev/lib/shared/bshru.src index ec73588..8b13d56 100644 --- a/frontends/calculator/CEdev/lib/shared/bshru.src +++ b/frontends/calculator/CEdev/lib/shared/bshru.src @@ -1,18 +1,18 @@ -; (c) Copyright 2007-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Byte Shift Right Unsigned -; Input: -; Operand1: -; A : 8 bit number to shift -; Operand2: -; B : 8 bit shift count -; -; Output: -; Result: A : 8 bit -; Registers Used: -; flags -;------------------------------------------------------------------------- - .def __bshru - .assume adl=1 - -__bshru equ 000104h +; (c) Copyright 2007-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Byte Shift Right Unsigned +; Input: +; Operand1: +; A : 8 bit number to shift +; Operand2: +; B : 8 bit shift count +; +; Output: +; Result: A : 8 bit +; Registers Used: +; flags +;------------------------------------------------------------------------- + .def __bshru + .assume adl=1 + +__bshru equ 000104h diff --git a/frontends/calculator/CEdev/lib/shared/bstix.src b/frontends/calculator/CEdev/lib/shared/bstix.src index 3719b30..1fec2dd 100644 --- a/frontends/calculator/CEdev/lib/shared/bstix.src +++ b/frontends/calculator/CEdev/lib/shared/bstix.src @@ -1,19 +1,19 @@ -; (c) Copyright 2007-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; byte store (ix+nnnnnn),A -; Input: -; Operand1: -; BC : 24-bit offset from ix -; A : 8-bit integer to store -; -; Output: -; none -; -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __bstix - .assume adl=1 - -__bstix equ 00010Ch - +; (c) Copyright 2007-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; byte store (ix+nnnnnn),A +; Input: +; Operand1: +; BC : 24-bit offset from ix +; A : 8-bit integer to store +; +; Output: +; none +; +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __bstix + .assume adl=1 + +__bstix equ 00010Ch + diff --git a/frontends/calculator/CEdev/lib/shared/bstiy.src b/frontends/calculator/CEdev/lib/shared/bstiy.src index b95ce91..98a9d00 100644 --- a/frontends/calculator/CEdev/lib/shared/bstiy.src +++ b/frontends/calculator/CEdev/lib/shared/bstiy.src @@ -1,18 +1,18 @@ -; (c) Copyright 2007-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; byte store (iy+nnnnnn),A -; Input: -; Operand1: -; BC : 24-bit offset from iy -; A : 8-bit integer to store -; -; Output: -; -; -; Registers Used: -; -;------------------------------------------------------------------------- - .def __bstiy - .assume adl=1 - -__bstiy equ 000108h +; (c) Copyright 2007-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; byte store (iy+nnnnnn),A +; Input: +; Operand1: +; BC : 24-bit offset from iy +; A : 8-bit integer to store +; +; Output: +; +; +; Registers Used: +; +;------------------------------------------------------------------------- + .def __bstiy + .assume adl=1 + +__bstiy equ 000108h diff --git a/frontends/calculator/CEdev/lib/shared/calloc.src b/frontends/calculator/CEdev/lib/shared/calloc.src index 069e4bf..73d5704 100644 --- a/frontends/calculator/CEdev/lib/shared/calloc.src +++ b/frontends/calculator/CEdev/lib/shared/calloc.src @@ -1,27 +1,27 @@ - .ref __imulu - .ref _malloc - .ref _memset - .def _calloc - .assume adl=1 - -_calloc: - pop de - pop bc - pop hl - push hl - push bc - push de - call __imulu - push hl - call _malloc - add hl,de - xor a,a - sbc hl,de - ld e,a - push de - push hl - call nz,_memset - pop hl - pop de - pop bc - ret + .ref __imulu + .ref _malloc + .ref _memset + .def _calloc + .assume adl=1 + +_calloc: + pop de + pop bc + pop hl + push hl + push bc + push de + call __imulu + push hl + call _malloc + add hl,de + xor a,a + sbc hl,de + ld e,a + push de + push hl + call nz,_memset + pop hl + pop de + pop bc + ret diff --git a/frontends/calculator/CEdev/lib/shared/case.src b/frontends/calculator/CEdev/lib/shared/case.src index 26919eb..c2fc6c4 100644 --- a/frontends/calculator/CEdev/lib/shared/case.src +++ b/frontends/calculator/CEdev/lib/shared/case.src @@ -1,27 +1,27 @@ -; (c) Copyright 2001-2008 Zilog Inc. -;------------------------------------------------------------------------- -; CASE branch resolution. -; -; Input: -; Operand1: -; bc : 24 bit address of CASE TABLE -; -; Operand2: -; de : 24 bit number of entries in table -; -; Operand3: -; hl : 24 bit value to match in table -; -; Output: -; Result: hl : 24 bit address of case jp to take -; Registers Used: -; -; -; Table Format: -; [24-bit value][JP label (4-bytes)] 7 bytes total -; -;------------------------------------------------------------------------- - .def __case - .assume adl=1 - -__case equ 000110h +; (c) Copyright 2001-2008 Zilog Inc. +;------------------------------------------------------------------------- +; CASE branch resolution. +; +; Input: +; Operand1: +; bc : 24 bit address of CASE TABLE +; +; Operand2: +; de : 24 bit number of entries in table +; +; Operand3: +; hl : 24 bit value to match in table +; +; Output: +; Result: hl : 24 bit address of case jp to take +; Registers Used: +; +; +; Table Format: +; [24-bit value][JP label (4-bytes)] 7 bytes total +; +;------------------------------------------------------------------------- + .def __case + .assume adl=1 + +__case equ 000110h diff --git a/frontends/calculator/CEdev/lib/shared/case16.src b/frontends/calculator/CEdev/lib/shared/case16.src index 33cb5cc..4d25c76 100644 --- a/frontends/calculator/CEdev/lib/shared/case16.src +++ b/frontends/calculator/CEdev/lib/shared/case16.src @@ -1,17 +1,17 @@ -; (c) Copyright 2007-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; CASE branch resolution. -; -; Input: -; Operand3: -; hl : 24 bit value to match in table -; -; Output: -; -; Registers Used: -; -;------------------------------------------------------------------------- - .def __case16 - .assume adl=1 - -__case16 equ 000114h +; (c) Copyright 2007-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; CASE branch resolution. +; +; Input: +; Operand3: +; hl : 24 bit value to match in table +; +; Output: +; +; Registers Used: +; +;------------------------------------------------------------------------- + .def __case16 + .assume adl=1 + +__case16 equ 000114h diff --git a/frontends/calculator/CEdev/lib/shared/case16d.src b/frontends/calculator/CEdev/lib/shared/case16d.src index f2a929d..21f47d9 100644 --- a/frontends/calculator/CEdev/lib/shared/case16d.src +++ b/frontends/calculator/CEdev/lib/shared/case16d.src @@ -1,17 +1,17 @@ -; (c) Copyright 2007-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; CASE branch resolution. -; -; Input: -; Operand3: -; hl : 24 bit value to match in table -; -; Output: -; Result: hl : 24 bit address of case jp to take -; Registers Used: -; -;------------------------------------------------------------------------- - .def __case16D - .assume adl=1 - -__case16D equ 000118h +; (c) Copyright 2007-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; CASE branch resolution. +; +; Input: +; Operand3: +; hl : 24 bit value to match in table +; +; Output: +; Result: hl : 24 bit address of case jp to take +; Registers Used: +; +;------------------------------------------------------------------------- + .def __case16D + .assume adl=1 + +__case16D equ 000118h diff --git a/frontends/calculator/CEdev/lib/shared/case24.src b/frontends/calculator/CEdev/lib/shared/case24.src index 43539e5..de39859 100644 --- a/frontends/calculator/CEdev/lib/shared/case24.src +++ b/frontends/calculator/CEdev/lib/shared/case24.src @@ -1,17 +1,17 @@ -; (c) Copyright 2007-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; CASE branch resolution. -; -; Input: -; Operand3: -; hl : 24 bit value to match in table -; -; Output: -; -; Registers Used: -; -;------------------------------------------------------------------------- - .def __case24 - .assume adl=1 - -__case24 equ 00011Ch +; (c) Copyright 2007-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; CASE branch resolution. +; +; Input: +; Operand3: +; hl : 24 bit value to match in table +; +; Output: +; +; Registers Used: +; +;------------------------------------------------------------------------- + .def __case24 + .assume adl=1 + +__case24 equ 00011Ch diff --git a/frontends/calculator/CEdev/lib/shared/case24d.src b/frontends/calculator/CEdev/lib/shared/case24d.src index bdec1ac..8ebfbc0 100644 --- a/frontends/calculator/CEdev/lib/shared/case24d.src +++ b/frontends/calculator/CEdev/lib/shared/case24d.src @@ -1,17 +1,17 @@ -; (c) Copyright 2007-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; CASE branch resolution. -; -; Input: -; Operand3: -; hl : 24 bit value to match in table -; -; Output: -; Result: hl : 24 bit address of case jp to take -; Registers Used: -; -;------------------------------------------------------------------------- - .def __case24D - .assume adl=1 - -__case24D equ 000120h +; (c) Copyright 2007-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; CASE branch resolution. +; +; Input: +; Operand3: +; hl : 24 bit value to match in table +; +; Output: +; Result: hl : 24 bit address of case jp to take +; Registers Used: +; +;------------------------------------------------------------------------- + .def __case24D + .assume adl=1 + +__case24D equ 000120h diff --git a/frontends/calculator/CEdev/lib/shared/case8.src b/frontends/calculator/CEdev/lib/shared/case8.src index 8d4f00f..da200d6 100644 --- a/frontends/calculator/CEdev/lib/shared/case8.src +++ b/frontends/calculator/CEdev/lib/shared/case8.src @@ -1,17 +1,17 @@ -; (c) Copyright 2007-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; CASE branch resolution. -; -; Input: -; Operand3: -; hl : 24 bit value to match in table -; -; Output: -; -; Registers Used: -; -;------------------------------------------------------------------------- - .def __case8 - .assume adl=1 - -__case8 equ 000124h +; (c) Copyright 2007-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; CASE branch resolution. +; +; Input: +; Operand3: +; hl : 24 bit value to match in table +; +; Output: +; +; Registers Used: +; +;------------------------------------------------------------------------- + .def __case8 + .assume adl=1 + +__case8 equ 000124h diff --git a/frontends/calculator/CEdev/lib/shared/case8d.src b/frontends/calculator/CEdev/lib/shared/case8d.src index f4be7a6..52ade6f 100644 --- a/frontends/calculator/CEdev/lib/shared/case8d.src +++ b/frontends/calculator/CEdev/lib/shared/case8d.src @@ -1,17 +1,17 @@ -; (c) Copyright 2007-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; CASE branch resolution. -; -; Input: -; Operand3: -; hl : 24 bit value to match in table -; -; Output: -; Result: hl : 24 bit address of case jp to take -; Registers Used: -; -;------------------------------------------------------------------------- - .def __case8D - .assume adl=1 - -__case8D equ 000128h +; (c) Copyright 2007-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; CASE branch resolution. +; +; Input: +; Operand3: +; hl : 24 bit value to match in table +; +; Output: +; Result: hl : 24 bit address of case jp to take +; Registers Used: +; +;------------------------------------------------------------------------- + .def __case8D + .assume adl=1 + +__case8D equ 000128h diff --git a/frontends/calculator/CEdev/lib/shared/debugger.src b/frontends/calculator/CEdev/lib/shared/debugger.src index 684b3a2..bc6a4a4 100644 --- a/frontends/calculator/CEdev/lib/shared/debugger.src +++ b/frontends/calculator/CEdev/lib/shared/debugger.src @@ -1,12 +1,12 @@ -; --- -; opens the debugger -; --- - - .def _dbg_Debugger - .assume adl=1 - -_dbg_Debugger: - scf - sbc hl,hl - ld (hl),2 - ret +; --- +; opens the debugger +; --- + + .def _dbg_Debugger + .assume adl=1 + +_dbg_Debugger: + scf + sbc hl,hl + ld (hl),2 + ret diff --git a/frontends/calculator/CEdev/lib/shared/delay.src b/frontends/calculator/CEdev/lib/shared/delay.src index 62978b8..affa948 100644 --- a/frontends/calculator/CEdev/lib/shared/delay.src +++ b/frontends/calculator/CEdev/lib/shared/delay.src @@ -1,92 +1,92 @@ - -; --- -; void delay(uint16_t millis) -; --- - - .def _delay - .assume adl=1 - -mpTmrRange equ 0F20000h - -tmr2Counter equ 10h -tmr2Load equ 14h -tmr2Match1 equ 18h -tmr2Match2 equ 1Ch - -tmrCtrl equ 30h - -bTmr2Enable equ 3 -bTmr2Crystal equ 4 -bTmr2Overflow equ 5 -bTmr2CountUp equ 10 - -_delay: -; Read argument. - pop de - ex (sp),hl ; 0hl = millis - push de -; Abort ASAP if millis == 0. - ld a,h - or a,l - ret z -; Convert millis to CPU cycles by multiplying by 48000. -; Subtract 2 to offset overhead and the unknown counter low byte. - ld b,h - ld c,l ; 0bc = millis - dec.s bc ; bc = millis-1; need to set bcu = 0 - srl b - rr c ; bc = (millis-1)>>1 - ; = millis*(48000&0FFh)>>8, - ; off by -1 or -0.5 - ld e,l - ld d,187 ; 48000/256 == 187.5 - ld l,d - mlt de ; de = (millis&0FFh)*(48000>>8) - mlt hl ; hl = (millis>>8)*(48000>>8) - dec hl - push hl - dec sp - pop hl - inc sp - ld l,-2 ; hl = (millis&0FF00h)*(48000>>8)-2 - add hl,de ; hl = millis*(48000>>8)-2 - add hl,bc ; hl ~ (millis*48000>>8)-3 -; Set up timer 2 control bits: disabled, CPU clock, no interrupt, count down. - ex de,hl ; de ~ (millis*48000>>8)-3 - ld hl,mpTmrRange+tmrCtrl - res bTmr2Enable,(hl) - res bTmr2Crystal,(hl) - res bTmr2Overflow,(hl) - inc hl - res bTmr2CountUp-8,(hl) -; Set up timer 2 counter, match, and reload values. - ld l,tmr2Counter+1 - ld (hl),de ; counter = millis*48000-768+0xxh - ld l,tmr2Match1+3 - ld (hl),0FFh ; match1 = 0FFxxxxxxh - ld l,tmr2Match2+3 - ld (hl),0FFh ; match2 = 0FFxxxxxxh - ld l,tmr2Load+3 - ld (hl),0FEh ; reload = 0FExxxxxxh -; Enable timer 2. - ld l,tmrCtrl - set bTmr2Enable,(hl) -; Wait until timer 2 expires (underflows). -; Will catch the underflow if not interrupted for a continuous period of -; ((254-188)<<24)/48000000 ~ 23.1s. - ld l,tmr2Counter+3 - ld a,188 ; = 1+((0FFFFh*24000 shl 1)-12 shr 24) -; 380 cc up to this point -_delay_wait: - cp a,(hl) - jr nc,_delay_wait -; 12-29 cc to exit waitloop -; Done. - ret -; ~421 cc up to this point -; caller overhead: -; ld bc,millis -; push bc -; call _delay -; pop bc -; ~485 cc total + +; --- +; void delay(uint16_t millis) +; --- + + .def _delay + .assume adl=1 + +mpTmrRange equ 0F20000h + +tmr2Counter equ 10h +tmr2Load equ 14h +tmr2Match1 equ 18h +tmr2Match2 equ 1Ch + +tmrCtrl equ 30h + +bTmr2Enable equ 3 +bTmr2Crystal equ 4 +bTmr2Overflow equ 5 +bTmr2CountUp equ 10 + +_delay: +; Read argument. + pop de + ex (sp),hl ; 0hl = millis + push de +; Abort ASAP if millis == 0. + ld a,h + or a,l + ret z +; Convert millis to CPU cycles by multiplying by 48000. +; Subtract 2 to offset overhead and the unknown counter low byte. + ld b,h + ld c,l ; 0bc = millis + dec.s bc ; bc = millis-1; need to set bcu = 0 + srl b + rr c ; bc = (millis-1)>>1 + ; = millis*(48000&0FFh)>>8, + ; off by -1 or -0.5 + ld e,l + ld d,187 ; 48000/256 == 187.5 + ld l,d + mlt de ; de = (millis&0FFh)*(48000>>8) + mlt hl ; hl = (millis>>8)*(48000>>8) + dec hl + push hl + dec sp + pop hl + inc sp + ld l,-2 ; hl = (millis&0FF00h)*(48000>>8)-2 + add hl,de ; hl = millis*(48000>>8)-2 + add hl,bc ; hl ~ (millis*48000>>8)-3 +; Set up timer 2 control bits: disabled, CPU clock, no interrupt, count down. + ex de,hl ; de ~ (millis*48000>>8)-3 + ld hl,mpTmrRange+tmrCtrl + res bTmr2Enable,(hl) + res bTmr2Crystal,(hl) + res bTmr2Overflow,(hl) + inc hl + res bTmr2CountUp-8,(hl) +; Set up timer 2 counter, match, and reload values. + ld l,tmr2Counter+1 + ld (hl),de ; counter = millis*48000-768+0xxh + ld l,tmr2Match1+3 + ld (hl),0FFh ; match1 = 0FFxxxxxxh + ld l,tmr2Match2+3 + ld (hl),0FFh ; match2 = 0FFxxxxxxh + ld l,tmr2Load+3 + ld (hl),0FEh ; reload = 0FExxxxxxh +; Enable timer 2. + ld l,tmrCtrl + set bTmr2Enable,(hl) +; Wait until timer 2 expires (underflows). +; Will catch the underflow if not interrupted for a continuous period of +; ((254-188)<<24)/48000000 ~ 23.1s. + ld l,tmr2Counter+3 + ld a,188 ; = 1+((0FFFFh*24000 shl 1)-12 shr 24) +; 380 cc up to this point +_delay_wait: + cp a,(hl) + jr nc,_delay_wait +; 12-29 cc to exit waitloop +; Done. + ret +; ~421 cc up to this point +; caller overhead: +; ld bc,millis +; push bc +; call _delay +; pop bc +; ~485 cc total diff --git a/frontends/calculator/CEdev/lib/shared/div.src b/frontends/calculator/CEdev/lib/shared/div.src index 0ae3c0d..030a767 100644 --- a/frontends/calculator/CEdev/lib/shared/div.src +++ b/frontends/calculator/CEdev/lib/shared/div.src @@ -1,54 +1,54 @@ -; Copyright 1992-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Div function -; -; div_t div(int numer,int denom); -; -;------------------------------------------------------------------------- - .def _div - .ref __idivs - .ref __irems - .assume adl=1 - -_div: - push af - push bc - push hl - push de - - ld hl,21 - add hl,sp - ld bc,(hl) ; bc=val of denominator - dec hl - dec hl - dec hl - ld hl,(hl) ; hl=val of numerator - push hl - call __idivs - ex de,hl ; de= quotient - pop hl ; hl=val of numerator - call __irems - ld bc,hl - - ld hl,15 - add hl,sp - ld hl,(hl) - inc hl - inc hl - inc hl - ld (hl),bc ; remainder - dec hl - dec hl - dec hl - ld (hl),de ;quotient - - pop de - pop bc - pop bc - pop af - - ret - - - - +; Copyright 1992-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Div function +; +; div_t div(int numer,int denom); +; +;------------------------------------------------------------------------- + .def _div + .ref __idivs + .ref __irems + .assume adl=1 + +_div: + push af + push bc + push hl + push de + + ld hl,21 + add hl,sp + ld bc,(hl) ; bc=val of denominator + dec hl + dec hl + dec hl + ld hl,(hl) ; hl=val of numerator + push hl + call __idivs + ex de,hl ; de= quotient + pop hl ; hl=val of numerator + call __irems + ld bc,hl + + ld hl,15 + add hl,sp + ld hl,(hl) + inc hl + inc hl + inc hl + ld (hl),bc ; remainder + dec hl + dec hl + dec hl + ld (hl),de ;quotient + + pop de + pop bc + pop bc + pop af + + ret + + + + diff --git a/frontends/calculator/CEdev/lib/shared/dzx7_standard.src b/frontends/calculator/CEdev/lib/shared/dzx7_standard.src index a3591a2..9b71b89 100644 --- a/frontends/calculator/CEdev/lib/shared/dzx7_standard.src +++ b/frontends/calculator/CEdev/lib/shared/dzx7_standard.src @@ -1,106 +1,106 @@ -; --- -; void dzx7_turbo(void *src, void *dst) -; --- -; Dec 2012 by Einar Saukas & Urusergi -; "Standard" version (70 bytes) -; --- - - .def _dzx7_Standard - .assume adl=1 - -; enter : hl = void *src -; de = void *dst -; -; exit : hl = & following uncompressed block -; -; uses : af, bc, de, hl - -_dzx7_Standard: - pop bc - pop hl - pop de - push de - push hl - push bc - - ld a, 128 - -dzx7s_copy_byte_loop: - - ldi ; copy literal byte - -dzx7s_main_loop: - - call dzx7s_next_bit - jr nc, dzx7s_copy_byte_loop ; next bit indicates either literal or sequence - -; determine number of bits used for length (Elias gamma coding) - - push de - ld de, 0 - ld bc, 0 - -dzx7s_len_size_loop: - - inc d - call dzx7s_next_bit - jr nc, dzx7s_len_size_loop - -; determine length - -dzx7s_len_value_loop: - - call nc, dzx7s_next_bit - rl c - rl b - jr c, dzx7s_exit ; check end marker - dec d - jr nz, dzx7s_len_value_loop - inc bc ; adjust length - -; determine offset - - ld e, (hl) ; load offset flag (1 bit) + offset value (7 bits) - inc hl - - sla e - inc e - - jr nc, dzx7s_offset_end ; if offset flag is set, load 4 extra bits - ld d, 16 ; bit marker to load 4 bits - -dzx7s_rld_next_bit: - - call dzx7s_next_bit - rl d ; insert next bit into D - jr nc, dzx7s_rld_next_bit ; repeat 4 times, until bit marker is out - inc d ; add 128 to DE - srl d ; retrieve fourth bit from D - -dzx7s_offset_end: - - rr e ; insert fourth bit into E - -; copy previous sequence - - ex (sp), hl ; store source, restore destination - push hl ; store destination - sbc hl, de ; HL = destination - offset - 1 - pop de ; DE = destination - ldir - -dzx7s_exit: - - pop hl ; restore source address (compressed data) - jr nc, dzx7s_main_loop - -dzx7s_next_bit: - - add a, a ; check next bit - ret nz ; no more bits left? - ld a, (hl) ; load another group of 8 bits - inc hl - rla - ret - - end +; --- +; void dzx7_turbo(void *src, void *dst) +; --- +; Dec 2012 by Einar Saukas & Urusergi +; "Standard" version (70 bytes) +; --- + + .def _dzx7_Standard + .assume adl=1 + +; enter : hl = void *src +; de = void *dst +; +; exit : hl = & following uncompressed block +; +; uses : af, bc, de, hl + +_dzx7_Standard: + pop bc + pop hl + pop de + push de + push hl + push bc + + ld a, 128 + +dzx7s_copy_byte_loop: + + ldi ; copy literal byte + +dzx7s_main_loop: + + call dzx7s_next_bit + jr nc, dzx7s_copy_byte_loop ; next bit indicates either literal or sequence + +; determine number of bits used for length (Elias gamma coding) + + push de + ld de, 0 + ld bc, 0 + +dzx7s_len_size_loop: + + inc d + call dzx7s_next_bit + jr nc, dzx7s_len_size_loop + +; determine length + +dzx7s_len_value_loop: + + call nc, dzx7s_next_bit + rl c + rl b + jr c, dzx7s_exit ; check end marker + dec d + jr nz, dzx7s_len_value_loop + inc bc ; adjust length + +; determine offset + + ld e, (hl) ; load offset flag (1 bit) + offset value (7 bits) + inc hl + + sla e + inc e + + jr nc, dzx7s_offset_end ; if offset flag is set, load 4 extra bits + ld d, 16 ; bit marker to load 4 bits + +dzx7s_rld_next_bit: + + call dzx7s_next_bit + rl d ; insert next bit into D + jr nc, dzx7s_rld_next_bit ; repeat 4 times, until bit marker is out + inc d ; add 128 to DE + srl d ; retrieve fourth bit from D + +dzx7s_offset_end: + + rr e ; insert fourth bit into E + +; copy previous sequence + + ex (sp), hl ; store source, restore destination + push hl ; store destination + sbc hl, de ; HL = destination - offset - 1 + pop de ; DE = destination + ldir + +dzx7s_exit: + + pop hl ; restore source address (compressed data) + jr nc, dzx7s_main_loop + +dzx7s_next_bit: + + add a, a ; check next bit + ret nz ; no more bits left? + ld a, (hl) ; load another group of 8 bits + inc hl + rla + ret + + end diff --git a/frontends/calculator/CEdev/lib/shared/dzx7_turbo.src b/frontends/calculator/CEdev/lib/shared/dzx7_turbo.src index 15a6236..cd54eae 100644 --- a/frontends/calculator/CEdev/lib/shared/dzx7_turbo.src +++ b/frontends/calculator/CEdev/lib/shared/dzx7_turbo.src @@ -1,117 +1,117 @@ -; --- -; void dzx7_turbo(void *src, void *dst) -; --- -; Dec 2012 by Einar Saukas & Urusergi -; "Turbo" version (89 bytes, 25% faster) -; --- - - .def _dzx7_Turbo - .assume adl=1 - -; enter : hl = void *src -; de = void *dst -; -; exit : hl = & following uncompressed block -; -; uses : af, bc, de, hl - -_dzx7_Turbo: - pop bc - pop hl - pop de - push de - push hl - push bc - - ld a, 128 - -dzx7t_copy_byte_loop: - - ldi ; copy literal byte - -dzx7t_main_loop: - - add a, a ; check next bit - call z, dzx7t_load_bits ; no more bits left? - jr nc, dzx7t_copy_byte_loop ; next bit indicates either literal or sequence - -; determine number of bits used for length (Elias gamma coding) - - push de - ld de, 0 - ld bc, 1 - -dzx7t_len_size_loop: - - inc d - add a, a ; check next bit - call z, dzx7t_load_bits ; no more bits left? - jr nc, dzx7t_len_size_loop - jp dzx7t_len_value_start - -; determine length - -dzx7t_len_value_loop: - - add a, a ; check next bit - call z, dzx7t_load_bits ; no more bits left? - rl c - rl b - jr c, dzx7t_exit ; check end marker - -dzx7t_len_value_start: - - dec d - jr nz, dzx7t_len_value_loop - inc bc ; adjust length - -; determine offset - - ld e, (hl) ; load offset flag (1 bit) + offset value (7 bits) - inc hl - - sla e - inc e - - jr nc, dzx7t_offset_end ; if offset flag is set, load 4 extra bits - add a, a ; check next bit - call z, dzx7t_load_bits ; no more bits left? - rl d ; insert first bit into D - add a, a ; check next bit - call z, dzx7t_load_bits ; no more bits left? - rl d ; insert second bit into D - add a, a ; check next bit - call z, dzx7t_load_bits ; no more bits left? - rl d ; insert third bit into D - add a, a ; check next bit - call z, dzx7t_load_bits ; no more bits left? - ccf - jr c, dzx7t_offset_end - inc d ; equivalent to adding 128 to DE - -dzx7t_offset_end: - - rr e ; insert inverted fourth bit into E - -; copy previous sequence - - ex (sp), hl ; store source, restore destination - push hl ; store destination - sbc hl, de ; HL = destination - offset - 1 - pop de ; DE = destination - ldir - -dzx7t_exit: - - pop hl ; restore source address (compressed data) - jp nc, dzx7t_main_loop - -dzx7t_load_bits: - - ld a, (hl) ; load another group of 8 bits - inc hl - rla - ret - - - end +; --- +; void dzx7_turbo(void *src, void *dst) +; --- +; Dec 2012 by Einar Saukas & Urusergi +; "Turbo" version (89 bytes, 25% faster) +; --- + + .def _dzx7_Turbo + .assume adl=1 + +; enter : hl = void *src +; de = void *dst +; +; exit : hl = & following uncompressed block +; +; uses : af, bc, de, hl + +_dzx7_Turbo: + pop bc + pop hl + pop de + push de + push hl + push bc + + ld a, 128 + +dzx7t_copy_byte_loop: + + ldi ; copy literal byte + +dzx7t_main_loop: + + add a, a ; check next bit + call z, dzx7t_load_bits ; no more bits left? + jr nc, dzx7t_copy_byte_loop ; next bit indicates either literal or sequence + +; determine number of bits used for length (Elias gamma coding) + + push de + ld de, 0 + ld bc, 1 + +dzx7t_len_size_loop: + + inc d + add a, a ; check next bit + call z, dzx7t_load_bits ; no more bits left? + jr nc, dzx7t_len_size_loop + jp dzx7t_len_value_start + +; determine length + +dzx7t_len_value_loop: + + add a, a ; check next bit + call z, dzx7t_load_bits ; no more bits left? + rl c + rl b + jr c, dzx7t_exit ; check end marker + +dzx7t_len_value_start: + + dec d + jr nz, dzx7t_len_value_loop + inc bc ; adjust length + +; determine offset + + ld e, (hl) ; load offset flag (1 bit) + offset value (7 bits) + inc hl + + sla e + inc e + + jr nc, dzx7t_offset_end ; if offset flag is set, load 4 extra bits + add a, a ; check next bit + call z, dzx7t_load_bits ; no more bits left? + rl d ; insert first bit into D + add a, a ; check next bit + call z, dzx7t_load_bits ; no more bits left? + rl d ; insert second bit into D + add a, a ; check next bit + call z, dzx7t_load_bits ; no more bits left? + rl d ; insert third bit into D + add a, a ; check next bit + call z, dzx7t_load_bits ; no more bits left? + ccf + jr c, dzx7t_offset_end + inc d ; equivalent to adding 128 to DE + +dzx7t_offset_end: + + rr e ; insert inverted fourth bit into E + +; copy previous sequence + + ex (sp), hl ; store source, restore destination + push hl ; store destination + sbc hl, de ; HL = destination - offset - 1 + pop de ; DE = destination + ldir + +dzx7t_exit: + + pop hl ; restore source address (compressed data) + jp nc, dzx7t_main_loop + +dzx7t_load_bits: + + ld a, (hl) ; load another group of 8 bits + inc hl + rla + ret + + + end diff --git a/frontends/calculator/CEdev/lib/shared/finite.src b/frontends/calculator/CEdev/lib/shared/finite.src index 35c8c5c..2b55337 100644 --- a/frontends/calculator/CEdev/lib/shared/finite.src +++ b/frontends/calculator/CEdev/lib/shared/finite.src @@ -1,19 +1,19 @@ - .def _finite - .assume adl=1 - -; int finite(double n); - -_finite: - pop bc - pop hl - pop de - push de - push hl - push bc - add hl,hl - ld a,e - rla - add a,1 - sbc hl,hl - inc hl - ret + .def _finite + .assume adl=1 + +; int finite(double n); + +_finite: + pop bc + pop hl + pop de + push de + push hl + push bc + add hl,hl + ld a,e + rla + add a,1 + sbc hl,hl + inc hl + ret diff --git a/frontends/calculator/CEdev/lib/shared/fpadd.src b/frontends/calculator/CEdev/lib/shared/fpadd.src index 238ee39..696867b 100644 --- a/frontends/calculator/CEdev/lib/shared/fpadd.src +++ b/frontends/calculator/CEdev/lib/shared/fpadd.src @@ -1,25 +1,25 @@ -;-------------------------------------------------------------- -; -; Code Generation Helper -; For the Zilog eZ80 C Compiler -; Copyright 1992-2008 Zilog, Inc. -; -;-------------------------------------------------------------- -;-------------------------------------------------------------- -; -; IEEE Single precision add -; -; INPUTS: AuBC OP1. -; EuHL OP2. -; -; OUTPUTS: AuBC Sum. -; -; Returns the result of adding the absolute values of the single-precision -; floating-point values OP1 and OP2. If Sign of result is 1, the sum is -; negated before being returned. -; -;-------------------------------------------------------------- - .def __fadd - .assume adl=1 - -__fadd equ 000270h +;-------------------------------------------------------------- +; +; Code Generation Helper +; For the Zilog eZ80 C Compiler +; Copyright 1992-2008 Zilog, Inc. +; +;-------------------------------------------------------------- +;-------------------------------------------------------------- +; +; IEEE Single precision add +; +; INPUTS: AuBC OP1. +; EuHL OP2. +; +; OUTPUTS: AuBC Sum. +; +; Returns the result of adding the absolute values of the single-precision +; floating-point values OP1 and OP2. If Sign of result is 1, the sum is +; negated before being returned. +; +;-------------------------------------------------------------- + .def __fadd + .assume adl=1 + +__fadd equ 000270h diff --git a/frontends/calculator/CEdev/lib/shared/fpcmp.src b/frontends/calculator/CEdev/lib/shared/fpcmp.src index acfbce0..1e1df2e 100644 --- a/frontends/calculator/CEdev/lib/shared/fpcmp.src +++ b/frontends/calculator/CEdev/lib/shared/fpcmp.src @@ -1,27 +1,27 @@ -;-------------------------------------------------------------- -; -; Code Generation Helper -; For the Zilog eZ80 C Compiler -; Copyright 1992-2008 Zilog, Inc. -; -;-------------------------------------------------------------- -;-------------------------------------------------------------- -; -; IEEE Single precision compare. -; -; INPUTS: -; -; Operand1: -; EuHL : 32 bit IEEE format -; -; Operand2: -; AuBC : 32 bit IEEE format -; -; -; OUTPUTS: FLAGS based on Op1 - Op2 -; -;-------------------------------------------------------------- - .def __fcmp - .assume adl=1 - -__fcmp equ 000274h +;-------------------------------------------------------------- +; +; Code Generation Helper +; For the Zilog eZ80 C Compiler +; Copyright 1992-2008 Zilog, Inc. +; +;-------------------------------------------------------------- +;-------------------------------------------------------------- +; +; IEEE Single precision compare. +; +; INPUTS: +; +; Operand1: +; EuHL : 32 bit IEEE format +; +; Operand2: +; AuBC : 32 bit IEEE format +; +; +; OUTPUTS: FLAGS based on Op1 - Op2 +; +;-------------------------------------------------------------- + .def __fcmp + .assume adl=1 + +__fcmp equ 000274h diff --git a/frontends/calculator/CEdev/lib/shared/fpdiv.src b/frontends/calculator/CEdev/lib/shared/fpdiv.src index ab80d15..f8ec9e1 100644 --- a/frontends/calculator/CEdev/lib/shared/fpdiv.src +++ b/frontends/calculator/CEdev/lib/shared/fpdiv.src @@ -1,28 +1,28 @@ -;-------------------------------------------------------------- -; -; Code Generation Helper -; For the Zilog eZ80 C Compiler -; Copyright 1992-2008 Zilog, Inc. -; -;-------------------------------------------------------------- -;-------------------------------------------------------------- -; -; IEEE Single precision division -; -; INPUTS: -; Operand1: -; AuBC : 32 bit IEEE format -; -; Operand2: -; EuHL : 32 bit IEEE format divisor -; -; OUTPUTS: -; Result: AuBC : 32 bit IEEE Quotient. -; Registers Used: -; flags -; -;-------------------------------------------------------------- - .def __fdiv - .assume adl=1 - -__fdiv equ 000278h +;-------------------------------------------------------------- +; +; Code Generation Helper +; For the Zilog eZ80 C Compiler +; Copyright 1992-2008 Zilog, Inc. +; +;-------------------------------------------------------------- +;-------------------------------------------------------------- +; +; IEEE Single precision division +; +; INPUTS: +; Operand1: +; AuBC : 32 bit IEEE format +; +; Operand2: +; EuHL : 32 bit IEEE format divisor +; +; OUTPUTS: +; Result: AuBC : 32 bit IEEE Quotient. +; Registers Used: +; flags +; +;-------------------------------------------------------------- + .def __fdiv + .assume adl=1 + +__fdiv equ 000278h diff --git a/frontends/calculator/CEdev/lib/shared/fpftol.src b/frontends/calculator/CEdev/lib/shared/fpftol.src index bc4e01e..4e21a05 100644 --- a/frontends/calculator/CEdev/lib/shared/fpftol.src +++ b/frontends/calculator/CEdev/lib/shared/fpftol.src @@ -1,20 +1,20 @@ -;-------------------------------------------------------------- -; -; Code Generation Helper -; For the Zilog eZ80 C Compiler -; Copyright 1992-2008 Zilog, Inc. -; -;-------------------------------------------------------------- -;-------------------------------------------------------------- -; -; IEEE Single precision to long. -; -; INPUTS: abc: 32-bit IEEE Single precision. -; -; OUTPUTS: abc: 32-bit signed long. -; -;-------------------------------------------------------------- - .def __ftol - .assume adl=1 - -__ftol equ 00027Ch +;-------------------------------------------------------------- +; +; Code Generation Helper +; For the Zilog eZ80 C Compiler +; Copyright 1992-2008 Zilog, Inc. +; +;-------------------------------------------------------------- +;-------------------------------------------------------------- +; +; IEEE Single precision to long. +; +; INPUTS: abc: 32-bit IEEE Single precision. +; +; OUTPUTS: abc: 32-bit signed long. +; +;-------------------------------------------------------------- + .def __ftol + .assume adl=1 + +__ftol equ 00027Ch diff --git a/frontends/calculator/CEdev/lib/shared/fpltof.src b/frontends/calculator/CEdev/lib/shared/fpltof.src index ba2e70f..19b4dbb 100644 --- a/frontends/calculator/CEdev/lib/shared/fpltof.src +++ b/frontends/calculator/CEdev/lib/shared/fpltof.src @@ -1,20 +1,20 @@ -;-------------------------------------------------------------- -; -; Code Generation Helper -; For the Zilog eZ80 C Compiler -; Copyright 1992-2008 Zilog, Inc. -; -;-------------------------------------------------------------- -;-------------------------------------------------------------- -; -; Signed long to IEEE Single precision. -; -; INPUTS: AuBC 32-bit signed long. -; -; OUTPUTS: AuBC 32-bit IEEE Single precision. -; -;-------------------------------------------------------------- - .def __ltof - .assume adl=1 - -__ltof equ 000284h +;-------------------------------------------------------------- +; +; Code Generation Helper +; For the Zilog eZ80 C Compiler +; Copyright 1992-2008 Zilog, Inc. +; +;-------------------------------------------------------------- +;-------------------------------------------------------------- +; +; Signed long to IEEE Single precision. +; +; INPUTS: AuBC 32-bit signed long. +; +; OUTPUTS: AuBC 32-bit IEEE Single precision. +; +;-------------------------------------------------------------- + .def __ltof + .assume adl=1 + +__ltof equ 000284h diff --git a/frontends/calculator/CEdev/lib/shared/fpmul.src b/frontends/calculator/CEdev/lib/shared/fpmul.src index 7b59483..3080acd 100644 --- a/frontends/calculator/CEdev/lib/shared/fpmul.src +++ b/frontends/calculator/CEdev/lib/shared/fpmul.src @@ -1,26 +1,26 @@ -;-------------------------------------------------------------- -; -; Code Generation Helper -; For the Zilog eZ80 C Compiler -; Copyright 1992-2008 Zilog, Inc. -; -;-------------------------------------------------------------- -;------------------------------------------------------------------------- -; IEEE Single precision multiply -; Input: -; Operand1: -; AuBC : 32 bit -; -; Operand2: -; EuHL : 32 bit -; -; Output: -; Result: AuBC : 32 bit -; Registers Used: -; flags -; -;------------------------------------------------------------------------- - .def __fmul - .assume adl=1 - -__fmul equ 000288h +;-------------------------------------------------------------- +; +; Code Generation Helper +; For the Zilog eZ80 C Compiler +; Copyright 1992-2008 Zilog, Inc. +; +;-------------------------------------------------------------- +;------------------------------------------------------------------------- +; IEEE Single precision multiply +; Input: +; Operand1: +; AuBC : 32 bit +; +; Operand2: +; EuHL : 32 bit +; +; Output: +; Result: AuBC : 32 bit +; Registers Used: +; flags +; +;------------------------------------------------------------------------- + .def __fmul + .assume adl=1 + +__fmul equ 000288h diff --git a/frontends/calculator/CEdev/lib/shared/fpneg.src b/frontends/calculator/CEdev/lib/shared/fpneg.src index 9de1421..06e6643 100644 --- a/frontends/calculator/CEdev/lib/shared/fpneg.src +++ b/frontends/calculator/CEdev/lib/shared/fpneg.src @@ -1,32 +1,32 @@ -;-------------------------------------------------------------- -; -; Code Generation Helper -; For the Zilog eZ80 C Compiler -; Copyright 1992-2008 Zilog, Inc. -; -;-------------------------------------------------------------- -;-------------------------------------------------------------- -; -; IEEE Negate. -; -; INPUTS: -; AuBC: 32-bit IEEE Single Precision. -; -; OUTPUTS: -; AuBC: 32-bit IEEE Single Precision. -; -;-------------------------------------------------------------- - .def __fneg - .assume adl=1 - -__fneg: - or a,a - jr nz,__noexit - push hl - sbc hl,hl - sbc hl,bc - pop hl - ret z -__noexit: - xor a,80h - ret +;-------------------------------------------------------------- +; +; Code Generation Helper +; For the Zilog eZ80 C Compiler +; Copyright 1992-2008 Zilog, Inc. +; +;-------------------------------------------------------------- +;-------------------------------------------------------------- +; +; IEEE Negate. +; +; INPUTS: +; AuBC: 32-bit IEEE Single Precision. +; +; OUTPUTS: +; AuBC: 32-bit IEEE Single Precision. +; +;-------------------------------------------------------------- + .def __fneg + .assume adl=1 + +__fneg: + or a,a + jr nz,__noexit + push hl + sbc hl,hl + sbc hl,bc + pop hl + ret z +__noexit: + xor a,80h + ret diff --git a/frontends/calculator/CEdev/lib/shared/fppack.src b/frontends/calculator/CEdev/lib/shared/fppack.src index fe14285..6dad178 100644 --- a/frontends/calculator/CEdev/lib/shared/fppack.src +++ b/frontends/calculator/CEdev/lib/shared/fppack.src @@ -1,28 +1,28 @@ -;-------------------------------------------------------------- -; -; Code Generation Helper -; For the Zilog eZ80 C Compiler -; Copyright 1992-2008 Zilog, Inc. -; -;-------------------------------------------------------------- -;-------------------------------------------------------------- -; -; Pack IEEE operand of dyadic operations. -; -; INPUTS: -; AuBC: 2s-comp mantissa+fraction (9+23 bit) -; E: Exponent. -; D: Sign. -; -; OUTPUTS: AuBC: 32 bit IEEE float. -; -; A AAAAAAB BBBBBBBBBBBBBBCCCCCCCCC -; S EEEEEEE FFFFFFFFFFFFFFFFFFFFFFF -; 0 1 8 9 31 -; MODIFIES: -; flags -;-------------------------------------------------------------- - .def __fppack - .assume adl=1 - -__fppack equ 00026Ch +;-------------------------------------------------------------- +; +; Code Generation Helper +; For the Zilog eZ80 C Compiler +; Copyright 1992-2008 Zilog, Inc. +; +;-------------------------------------------------------------- +;-------------------------------------------------------------- +; +; Pack IEEE operand of dyadic operations. +; +; INPUTS: +; AuBC: 2s-comp mantissa+fraction (9+23 bit) +; E: Exponent. +; D: Sign. +; +; OUTPUTS: AuBC: 32 bit IEEE float. +; +; A AAAAAAB BBBBBBBBBBBBBBCCCCCCCCC +; S EEEEEEE FFFFFFFFFFFFFFFFFFFFFFF +; 0 1 8 9 31 +; MODIFIES: +; flags +;-------------------------------------------------------------- + .def __fppack + .assume adl=1 + +__fppack equ 00026Ch diff --git a/frontends/calculator/CEdev/lib/shared/fpsub.src b/frontends/calculator/CEdev/lib/shared/fpsub.src index daaf034..cefa0e3 100644 --- a/frontends/calculator/CEdev/lib/shared/fpsub.src +++ b/frontends/calculator/CEdev/lib/shared/fpsub.src @@ -1,27 +1,27 @@ -;-------------------------------------------------------------- -; -; Code Generation Helper -; For the Zilog eZ80 C Compiler -; Copyright 1992-2008 Zilog, Inc. -; -;-------------------------------------------------------------- -;-------------------------------------------------------------- -; -; IEEE Single precision sub -; Input: -; Operand1: -; abc : 32 bit IEEE single precision -; -; Operand2: -; ehl : 32 bit IEEE single precision -; -; Output: -; Result: abc : 32 bit IEEE single precision (abc - ehl) -; Registers Used: - -;------------------------------------------------------------------------- - .def __fsub - .ref __fadd - .assume adl=1 - -__fsub equ 000290h +;-------------------------------------------------------------- +; +; Code Generation Helper +; For the Zilog eZ80 C Compiler +; Copyright 1992-2008 Zilog, Inc. +; +;-------------------------------------------------------------- +;-------------------------------------------------------------- +; +; IEEE Single precision sub +; Input: +; Operand1: +; abc : 32 bit IEEE single precision +; +; Operand2: +; ehl : 32 bit IEEE single precision +; +; Output: +; Result: abc : 32 bit IEEE single precision (abc - ehl) +; Registers Used: + +;------------------------------------------------------------------------- + .def __fsub + .ref __fadd + .assume adl=1 + +__fsub equ 000290h diff --git a/frontends/calculator/CEdev/lib/shared/fpultof.src b/frontends/calculator/CEdev/lib/shared/fpultof.src index 45fe5f4..5a91730 100644 --- a/frontends/calculator/CEdev/lib/shared/fpultof.src +++ b/frontends/calculator/CEdev/lib/shared/fpultof.src @@ -1,22 +1,22 @@ -;-------------------------------------------------------------- -; -; Code Generation Helper -; For the Zilog eZ80 C Compiler -; Copyright 1992-2008 Zilog, Inc. -; -;-------------------------------------------------------------- -;-------------------------------------------------------------- -; -; Unsigned long to IEEE Single precision. -; -; INPUTS: -; abc: 32-bit unsigned long -; -; OUTPUTS: -; abc: IEEE Single precision. -; -;-------------------------------------------------------------- - .def __ultof - .assume adl=1 - -__ultof equ 000280h +;-------------------------------------------------------------- +; +; Code Generation Helper +; For the Zilog eZ80 C Compiler +; Copyright 1992-2008 Zilog, Inc. +; +;-------------------------------------------------------------- +;-------------------------------------------------------------- +; +; Unsigned long to IEEE Single precision. +; +; INPUTS: +; abc: 32-bit unsigned long +; +; OUTPUTS: +; abc: IEEE Single precision. +; +;-------------------------------------------------------------- + .def __ultof + .assume adl=1 + +__ultof equ 000280h diff --git a/frontends/calculator/CEdev/lib/shared/fpupop1.src b/frontends/calculator/CEdev/lib/shared/fpupop1.src index 4a7064f..e0c623d 100644 --- a/frontends/calculator/CEdev/lib/shared/fpupop1.src +++ b/frontends/calculator/CEdev/lib/shared/fpupop1.src @@ -1,48 +1,48 @@ -;-------------------------------------------------------------- -; -; Code Generation Helper -; For the Zilog eZ80 C Compiler -; Copyright 1992-2008 Zilog, Inc. -; -;-------------------------------------------------------------- -;-------------------------------------------------------------- -; -; Unpack IEEE op1 of dyadic operations. -; -; INPUTS: AuBC: 32bits -; -; A AAAAAAAB BBBBBBBBBBBBBBBCCCCCCCC -; S EEEEEEEE FFFFFFFFFFFFFFFFFFFFFFF -; 0 1 8 9 31 -; -; OUTPUTS: uBC: Mantissa -; A: Exponent -; D: Sign Bit -; ZERO FLAG Set if op was zero. -; -; MODIFIES: -; flags -;-------------------------------------------------------------- - .def __fpupop1 - .assume adl=1 - -__fpupop1: - push ix - ld ix,0 - add ix,sp - push bc - rlc (ix-1) ;move high-bit to low-bit - scf - rr (ix-1) ;carry = exponent low-bit, high-bit = 1 - pop bc ;restore modified mantissa - rl a ;compute exponent, carry = sign - ld d,0 - jr nz,nzero ;skip if exponent non-zero - - ld bc,0 ;clear mantissa - or a,a ;clear carry -nzero: - rl d ;set 1 if negative operand - or a,a ;set Z/NZ - pop ix - ret +;-------------------------------------------------------------- +; +; Code Generation Helper +; For the Zilog eZ80 C Compiler +; Copyright 1992-2008 Zilog, Inc. +; +;-------------------------------------------------------------- +;-------------------------------------------------------------- +; +; Unpack IEEE op1 of dyadic operations. +; +; INPUTS: AuBC: 32bits +; +; A AAAAAAAB BBBBBBBBBBBBBBBCCCCCCCC +; S EEEEEEEE FFFFFFFFFFFFFFFFFFFFFFF +; 0 1 8 9 31 +; +; OUTPUTS: uBC: Mantissa +; A: Exponent +; D: Sign Bit +; ZERO FLAG Set if op was zero. +; +; MODIFIES: +; flags +;-------------------------------------------------------------- + .def __fpupop1 + .assume adl=1 + +__fpupop1: + push ix + ld ix,0 + add ix,sp + push bc + rlc (ix-1) ;move high-bit to low-bit + scf + rr (ix-1) ;carry = exponent low-bit, high-bit = 1 + pop bc ;restore modified mantissa + rl a ;compute exponent, carry = sign + ld d,0 + jr nz,nzero ;skip if exponent non-zero + + ld bc,0 ;clear mantissa + or a,a ;clear carry +nzero: + rl d ;set 1 if negative operand + or a,a ;set Z/NZ + pop ix + ret diff --git a/frontends/calculator/CEdev/lib/shared/fpupop2.src b/frontends/calculator/CEdev/lib/shared/fpupop2.src index 8461f59..e5e899b 100644 --- a/frontends/calculator/CEdev/lib/shared/fpupop2.src +++ b/frontends/calculator/CEdev/lib/shared/fpupop2.src @@ -1,47 +1,47 @@ -;-------------------------------------------------------------- -; -; Code Generation Helper -; For the Zilog eZ80 C Compiler -; Copyright 1992-2008 Zilog, Inc. -; -;-------------------------------------------------------------- -;-------------------------------------------------------------- -; -; Unpack IEEE op2 of dyadic operations. -; -; INPUTS: EuHL: 32 bits -; -; E EEEEEEEH HHHHHHHHHHHHHHHLLLLLLLL -; S EEEEEEEE FFFFFFFFFFFFFFFFFFFFFFF -; 0 1 8 9 31 -; -; OUTPUTS: uHL: Mantissa -; E: Exponent -; D: Sign Bit -; ZERO FLAG Set if op was zero. -; -; MODIFIES: -; flags -;-------------------------------------------------------------- - .def __fpupop2 - .assume adl=1 - -__fpupop2: - push bc - ld bc,0800000h - add hl,bc - jr nc,ncarry - add hl,bc - scf -ncarry: - ld d,c - pop bc - rl e - jr nz,nzero - or a,a - sbc hl,hl -nzero: - rl d - inc e - dec e - ret +;-------------------------------------------------------------- +; +; Code Generation Helper +; For the Zilog eZ80 C Compiler +; Copyright 1992-2008 Zilog, Inc. +; +;-------------------------------------------------------------- +;-------------------------------------------------------------- +; +; Unpack IEEE op2 of dyadic operations. +; +; INPUTS: EuHL: 32 bits +; +; E EEEEEEEH HHHHHHHHHHHHHHHLLLLLLLL +; S EEEEEEEE FFFFFFFFFFFFFFFFFFFFFFF +; 0 1 8 9 31 +; +; OUTPUTS: uHL: Mantissa +; E: Exponent +; D: Sign Bit +; ZERO FLAG Set if op was zero. +; +; MODIFIES: +; flags +;-------------------------------------------------------------- + .def __fpupop2 + .assume adl=1 + +__fpupop2: + push bc + ld bc,0800000h + add hl,bc + jr nc,ncarry + add hl,bc + scf +ncarry: + ld d,c + pop bc + rl e + jr nz,nzero + or a,a + sbc hl,hl +nzero: + rl d + inc e + dec e + ret diff --git a/frontends/calculator/CEdev/lib/shared/frameset.src b/frontends/calculator/CEdev/lib/shared/frameset.src index 669a9d2..c9e7848 100644 --- a/frontends/calculator/CEdev/lib/shared/frameset.src +++ b/frontends/calculator/CEdev/lib/shared/frameset.src @@ -1,12 +1,12 @@ - .assume adl=1 - .def __frameset - -__frameset: - pop de - push ix - ld ix,0 - add ix,sp - add hl,sp - ld sp,hl - ex de,hl + .assume adl=1 + .def __frameset + +__frameset: + pop de + push ix + ld ix,0 + add ix,sp + add hl,sp + ld sp,hl + ex de,hl jp (hl) \ No newline at end of file diff --git a/frontends/calculator/CEdev/lib/shared/frameset0.src b/frontends/calculator/CEdev/lib/shared/frameset0.src index 061a597..d15c47e 100644 --- a/frontends/calculator/CEdev/lib/shared/frameset0.src +++ b/frontends/calculator/CEdev/lib/shared/frameset0.src @@ -1,9 +1,9 @@ - .assume adl=1 - .def __frameset0 - -__frameset0: - pop hl - push ix - ld ix,0 - add ix,sp + .assume adl=1 + .def __frameset0 + +__frameset0: + pop hl + push ix + ld ix,0 + add ix,sp jp (hl) \ No newline at end of file diff --git a/frontends/calculator/CEdev/lib/shared/frbmuls.src b/frontends/calculator/CEdev/lib/shared/frbmuls.src index c415d42..3897459 100644 --- a/frontends/calculator/CEdev/lib/shared/frbmuls.src +++ b/frontends/calculator/CEdev/lib/shared/frbmuls.src @@ -1,53 +1,53 @@ -; (c) Copyright 2004-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; fract short Multiplication signed. -; -; Input: -; Operand1: -; H : 8 bits -; -; Operand2: -; L : 8 bits -; -; Output: -; Result: A : 8 bits -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __frbmuls - .assume adl=1 - -__frbmuls: - push hl - ;; - ;; Check sign info - ;; - xor a,a - rl h - jr nc,_L0 - sub a,h - ld h,a -_L0: - xor a,a - rl l - jr nc,_L1 - sub a,l - ld l,a -_L1: - mlt hl - ld a,h - pop hl - or a,a - rra - adc a,0h - push af - ld a,h - xor a,l - jp p,_L2 - pop af - neg - ret -_L2: - pop af - ret - +; (c) Copyright 2004-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; fract short Multiplication signed. +; +; Input: +; Operand1: +; H : 8 bits +; +; Operand2: +; L : 8 bits +; +; Output: +; Result: A : 8 bits +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __frbmuls + .assume adl=1 + +__frbmuls: + push hl + ;; + ;; Check sign info + ;; + xor a,a + rl h + jr nc,_L0 + sub a,h + ld h,a +_L0: + xor a,a + rl l + jr nc,_L1 + sub a,l + ld l,a +_L1: + mlt hl + ld a,h + pop hl + or a,a + rra + adc a,0h + push af + ld a,h + xor a,l + jp p,_L2 + pop af + neg + ret +_L2: + pop af + ret + diff --git a/frontends/calculator/CEdev/lib/shared/frbtof.src b/frontends/calculator/CEdev/lib/shared/frbtof.src index 1967abb..7d9f158 100644 --- a/frontends/calculator/CEdev/lib/shared/frbtof.src +++ b/frontends/calculator/CEdev/lib/shared/frbtof.src @@ -1,17 +1,17 @@ -; (c) Copyright 2004-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; fract unsigned char to float conversion. -; -; Input: -; Operand1: -; A : 8 bits -; -; Output: -; Result: eHL : 32 bit -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __frbtof - .assume adl=1 - -__frbtof equ 00029Ch +; (c) Copyright 2004-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; fract unsigned char to float conversion. +; +; Input: +; Operand1: +; A : 8 bits +; +; Output: +; Result: eHL : 32 bit +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __frbtof + .assume adl=1 + +__frbtof equ 00029Ch diff --git a/frontends/calculator/CEdev/lib/shared/frftob.src b/frontends/calculator/CEdev/lib/shared/frftob.src index 39065d8..99cb225 100644 --- a/frontends/calculator/CEdev/lib/shared/frftob.src +++ b/frontends/calculator/CEdev/lib/shared/frftob.src @@ -1,17 +1,17 @@ -; (c) Copyright 2004-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; float to fract char conversion. -; -; Input: -; Operand1: -; eHL : 32 bits -; -; Output: -; Result: A : 8 bits -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __frftob - .assume adl=1 - -__frftob equ 0002A0h +; (c) Copyright 2004-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; float to fract char conversion. +; +; Input: +; Operand1: +; eHL : 32 bits +; +; Output: +; Result: A : 8 bits +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __frftob + .assume adl=1 + +__frftob equ 0002A0h diff --git a/frontends/calculator/CEdev/lib/shared/frftoi.src b/frontends/calculator/CEdev/lib/shared/frftoi.src index 048c298..6f4706d 100644 --- a/frontends/calculator/CEdev/lib/shared/frftoi.src +++ b/frontends/calculator/CEdev/lib/shared/frftoi.src @@ -1,17 +1,17 @@ -; (c) Copyright 2004-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; float to fract integer conversion. -; -; Input: -; Operand1: -; eHL : 32 bits -; -; Output: -; Result: HL : 24 bit -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __frftoi - .assume adl=1 - -__frftoi equ 0002A8h +; (c) Copyright 2004-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; float to fract integer conversion. +; +; Input: +; Operand1: +; eHL : 32 bits +; +; Output: +; Result: HL : 24 bit +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __frftoi + .assume adl=1 + +__frftoi equ 0002A8h diff --git a/frontends/calculator/CEdev/lib/shared/frftos.src b/frontends/calculator/CEdev/lib/shared/frftos.src index b2f71b1..17f1bcb 100644 --- a/frontends/calculator/CEdev/lib/shared/frftos.src +++ b/frontends/calculator/CEdev/lib/shared/frftos.src @@ -1,17 +1,17 @@ -; (c) Copyright 2004-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; float to fract short conversion. -; -; Input: -; Operand1: -; eHL : 32 bits -; -; Output: -; Result: HL : 16 bits -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __frftos - .assume adl=1 - -__frftos equ 0002B0h +; (c) Copyright 2004-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; float to fract short conversion. +; +; Input: +; Operand1: +; eHL : 32 bits +; +; Output: +; Result: HL : 16 bits +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __frftos + .assume adl=1 + +__frftos equ 0002B0h diff --git a/frontends/calculator/CEdev/lib/shared/frftoub.src b/frontends/calculator/CEdev/lib/shared/frftoub.src index e07b750..da46faf 100644 --- a/frontends/calculator/CEdev/lib/shared/frftoub.src +++ b/frontends/calculator/CEdev/lib/shared/frftoub.src @@ -1,17 +1,17 @@ -; (c) Copyright 2004-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; float to fract unsigned char conversion. -; -; Input: -; Operand1: -; eHL : 32 bits -; -; Output: -; Result: A : 8 bit -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __frftoub - .assume adl=1 - -__frftoub equ 0002A4h +; (c) Copyright 2004-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; float to fract unsigned char conversion. +; +; Input: +; Operand1: +; eHL : 32 bits +; +; Output: +; Result: A : 8 bit +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __frftoub + .assume adl=1 + +__frftoub equ 0002A4h diff --git a/frontends/calculator/CEdev/lib/shared/frftoui.src b/frontends/calculator/CEdev/lib/shared/frftoui.src index 07ef9c0..0136f56 100644 --- a/frontends/calculator/CEdev/lib/shared/frftoui.src +++ b/frontends/calculator/CEdev/lib/shared/frftoui.src @@ -1,17 +1,17 @@ -; (c) Copyright 2004-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; float to fract unsigned integer conversion. -; -; Input: -; Operand1: -; eHL : 32 bits -; -; Output: -; Result: HL : 24 bits -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __frftoui - .assume adl=1 - -__frftoui equ 0002ACh +; (c) Copyright 2004-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; float to fract unsigned integer conversion. +; +; Input: +; Operand1: +; eHL : 32 bits +; +; Output: +; Result: HL : 24 bits +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __frftoui + .assume adl=1 + +__frftoui equ 0002ACh diff --git a/frontends/calculator/CEdev/lib/shared/frftous.src b/frontends/calculator/CEdev/lib/shared/frftous.src index 0fbb6b2..12b743e 100644 --- a/frontends/calculator/CEdev/lib/shared/frftous.src +++ b/frontends/calculator/CEdev/lib/shared/frftous.src @@ -1,17 +1,17 @@ -; (c) Copyright 2004-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; float to fract unsigned short conversion. -; -; Input: -; Operand1: -; eHL : 32 bits -; -; Output: -; Result: HL : 16 bits -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __frftous - .assume adl=1 - -__frftous equ 0002B4h +; (c) Copyright 2004-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; float to fract unsigned short conversion. +; +; Input: +; Operand1: +; eHL : 32 bits +; +; Output: +; Result: HL : 16 bits +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __frftous + .assume adl=1 + +__frftous equ 0002B4h diff --git a/frontends/calculator/CEdev/lib/shared/frimuls.src b/frontends/calculator/CEdev/lib/shared/frimuls.src index 955d658..bc886a5 100644 --- a/frontends/calculator/CEdev/lib/shared/frimuls.src +++ b/frontends/calculator/CEdev/lib/shared/frimuls.src @@ -1,81 +1,81 @@ -; (c) Copyright 2004-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; fract interger Multiplication Unsigned. -; -; Input: -; Operand1: -; uHL : 24 bits -; -; Operand2: -; uBC : 24 bits -; -; Output: -; Result: uHL : 24 bit -; Registers Used: -; none -;------------------------------------------------------------------------- - .assume adl=1 - .def __frimuls - .ref __frimulu - -__frimuls: - push af - push de - push bc - push hl - ;; - ;; Check sign info - ;; - add hl,hl - jr nc,_L0 - ex de,hl - or a,a - sbc hl,hl - sbc hl,de -_L0: - ex de,hl - or a,a - sbc hl,hl - add hl,bc - add hl,hl - jr nc,_L1 - or a,a - sbc hl,hl - sbc hl,bc - add hl,hl -_L1: - ld bc,hl - ex de,hl - call __frimulu - push hl - ex de,hl - ld hl,2 - add hl,sp - rr (hl) - rr d - rr e - pop hl - ld h,d - ld l,e - ;; - ;; Check signs - ;; - ex de,hl - ld hl,2 - add hl,sp - ld a,(hl) - inc hl - ld sp,hl - inc hl - inc hl - xor a,(hl) - jp p,_L2 - sbc hl,hl - sbc hl,de - ex de,hl -_L2: - ex de,hl - pop bc - pop de - pop af - ret +; (c) Copyright 2004-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; fract interger Multiplication Unsigned. +; +; Input: +; Operand1: +; uHL : 24 bits +; +; Operand2: +; uBC : 24 bits +; +; Output: +; Result: uHL : 24 bit +; Registers Used: +; none +;------------------------------------------------------------------------- + .assume adl=1 + .def __frimuls + .ref __frimulu + +__frimuls: + push af + push de + push bc + push hl + ;; + ;; Check sign info + ;; + add hl,hl + jr nc,_L0 + ex de,hl + or a,a + sbc hl,hl + sbc hl,de +_L0: + ex de,hl + or a,a + sbc hl,hl + add hl,bc + add hl,hl + jr nc,_L1 + or a,a + sbc hl,hl + sbc hl,bc + add hl,hl +_L1: + ld bc,hl + ex de,hl + call __frimulu + push hl + ex de,hl + ld hl,2 + add hl,sp + rr (hl) + rr d + rr e + pop hl + ld h,d + ld l,e + ;; + ;; Check signs + ;; + ex de,hl + ld hl,2 + add hl,sp + ld a,(hl) + inc hl + ld sp,hl + inc hl + inc hl + xor a,(hl) + jp p,_L2 + sbc hl,hl + sbc hl,de + ex de,hl +_L2: + ex de,hl + pop bc + pop de + pop af + ret diff --git a/frontends/calculator/CEdev/lib/shared/frimulu.src b/frontends/calculator/CEdev/lib/shared/frimulu.src index d008a49..1f95434 100644 --- a/frontends/calculator/CEdev/lib/shared/frimulu.src +++ b/frontends/calculator/CEdev/lib/shared/frimulu.src @@ -1,112 +1,112 @@ -; (c) Copyright 2004-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; fract interger Multiplication Unsigned. -; -; Input: -; Operand1: -; uHL : 24 bits -; -; Operand2: -; uBC : 24 bits -; -; Output: -; Result: uHL : 24 bits -; Registers Used: -; none -;------------------------------------------------------------------------- - .assume adl=1 - .def __frimulu - -__frimulu: - push af - push de - push iy - push bc - push hl - ld d,l - ld e,c - mlt de - ld a,d - ld d,h - ld e,b - ld b,h - ld h,e - mlt hl - mlt bc - mlt de - add a,c - ld c,a - ld a,b - adc a,0h - ld b,a - add.s hl,bc - jr nc,_L0 - inc d -_L0: - ld iy,0h - add iy,sp - ld b,(iy+2) - ld c,(iy+5) - mlt bc - ld a,h - add a,e - ld e,a - jr nc,_L1 - inc d - jr nz,_L1 - inc bc -_L1: - ld h,(iy+2) - ld l,(iy+3) - mlt hl - - ld a,l ;approximation - add a,80h - ld l,a - ld a,h - adc a,0h - ld h,a - - add.s hl,de - jr nc,_L2 - inc bc -_L2: - ld d,(iy+0) - ld e,(iy+5) - mlt de - add.s hl,de - jr nc,_L3 - inc bc -_L3: - ld a,h - ld d,(iy+2) - ld e,(iy+4) - ld h,(iy+1) - ld l,(iy+5) - mlt de - mlt hl - add.s hl,de - jr nc,_L4 - inc b -_L4: - add a,l - ld l,a - ld a,h - adc a,c - ld h,a - jr nc,_L5 - inc b -_L5: - ex de,hl - push bc - dec sp - pop hl - inc sp - ld h,d - ld l,e - pop bc - pop bc - pop iy - pop de - pop af - ret +; (c) Copyright 2004-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; fract interger Multiplication Unsigned. +; +; Input: +; Operand1: +; uHL : 24 bits +; +; Operand2: +; uBC : 24 bits +; +; Output: +; Result: uHL : 24 bits +; Registers Used: +; none +;------------------------------------------------------------------------- + .assume adl=1 + .def __frimulu + +__frimulu: + push af + push de + push iy + push bc + push hl + ld d,l + ld e,c + mlt de + ld a,d + ld d,h + ld e,b + ld b,h + ld h,e + mlt hl + mlt bc + mlt de + add a,c + ld c,a + ld a,b + adc a,0h + ld b,a + add.s hl,bc + jr nc,_L0 + inc d +_L0: + ld iy,0h + add iy,sp + ld b,(iy+2) + ld c,(iy+5) + mlt bc + ld a,h + add a,e + ld e,a + jr nc,_L1 + inc d + jr nz,_L1 + inc bc +_L1: + ld h,(iy+2) + ld l,(iy+3) + mlt hl + + ld a,l ;approximation + add a,80h + ld l,a + ld a,h + adc a,0h + ld h,a + + add.s hl,de + jr nc,_L2 + inc bc +_L2: + ld d,(iy+0) + ld e,(iy+5) + mlt de + add.s hl,de + jr nc,_L3 + inc bc +_L3: + ld a,h + ld d,(iy+2) + ld e,(iy+4) + ld h,(iy+1) + ld l,(iy+5) + mlt de + mlt hl + add.s hl,de + jr nc,_L4 + inc b +_L4: + add a,l + ld l,a + ld a,h + adc a,c + ld h,a + jr nc,_L5 + inc b +_L5: + ex de,hl + push bc + dec sp + pop hl + inc sp + ld h,d + ld l,e + pop bc + pop bc + pop iy + pop de + pop af + ret diff --git a/frontends/calculator/CEdev/lib/shared/fritof.src b/frontends/calculator/CEdev/lib/shared/fritof.src index d35fb32..fddf7ab 100644 --- a/frontends/calculator/CEdev/lib/shared/fritof.src +++ b/frontends/calculator/CEdev/lib/shared/fritof.src @@ -1,17 +1,17 @@ -; (c) Copyright 2004-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; fract integer to float conversion. -; -; Input: -; Operand1: -; HL : 24 bits -; -; Output: -; Result: eHL : 32 bit -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __fritof - .assume adl=1 - -__fritof equ 0002B8h +; (c) Copyright 2004-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; fract integer to float conversion. +; +; Input: +; Operand1: +; HL : 24 bits +; +; Output: +; Result: eHL : 32 bit +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __fritof + .assume adl=1 + +__fritof equ 0002B8h diff --git a/frontends/calculator/CEdev/lib/shared/frsmuls.src b/frontends/calculator/CEdev/lib/shared/frsmuls.src index b337a01..fb0e389 100644 --- a/frontends/calculator/CEdev/lib/shared/frsmuls.src +++ b/frontends/calculator/CEdev/lib/shared/frsmuls.src @@ -1,61 +1,61 @@ -; (c) Copyright 2004-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; fract short Multiplication signed. -; -; Input: -; Operand1: -; HL : 16 bits -; -; Operand2: -; BC : 16 bits -; -; Output: -; Result: HL : 16 bits -; Registers Used: -; none -;------------------------------------------------------------------------- - .assume adl=1 - .def __frsmuls - .ref __frsmulu - -__frsmuls: - push af - push de - push bc - push hl - ;; - ;; Check sign info - ;; - add.s hl,hl - jr nc,_L0 - ex de,hl - or a,a - sbc hl,hl - sbc hl,de -_L0: - rl c - rl b - jr nc,_L1 - ex de,hl - or a,a - sbc hl,hl - sbc hl,bc - ld b,h - ld c,l - ex de,hl -_L1: - call __frsmulu - srl h - rr l - pop af - pop bc - xor a,b - jp p,_L2 - ex de,hl - sbc hl,hl - sbc hl,de -_L2: - pop de - pop af - ret - +; (c) Copyright 2004-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; fract short Multiplication signed. +; +; Input: +; Operand1: +; HL : 16 bits +; +; Operand2: +; BC : 16 bits +; +; Output: +; Result: HL : 16 bits +; Registers Used: +; none +;------------------------------------------------------------------------- + .assume adl=1 + .def __frsmuls + .ref __frsmulu + +__frsmuls: + push af + push de + push bc + push hl + ;; + ;; Check sign info + ;; + add.s hl,hl + jr nc,_L0 + ex de,hl + or a,a + sbc hl,hl + sbc hl,de +_L0: + rl c + rl b + jr nc,_L1 + ex de,hl + or a,a + sbc hl,hl + sbc hl,bc + ld b,h + ld c,l + ex de,hl +_L1: + call __frsmulu + srl h + rr l + pop af + pop bc + xor a,b + jp p,_L2 + ex de,hl + sbc hl,hl + sbc hl,de +_L2: + pop de + pop af + ret + diff --git a/frontends/calculator/CEdev/lib/shared/frsmulu.src b/frontends/calculator/CEdev/lib/shared/frsmulu.src index ca9e7f6..30ee909 100644 --- a/frontends/calculator/CEdev/lib/shared/frsmulu.src +++ b/frontends/calculator/CEdev/lib/shared/frsmulu.src @@ -1,51 +1,51 @@ -; (c) Copyright 2004-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; fract interger Multiplication Unsigned. -; -; Input: -; Operand1: -; HL : 16 bits -; -; Operand2: -; BC : 16 bits -; -; Output: -; Result: HL : 16 bits -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __frsmulu - .assume adl=1 - -__frsmulu: - push af - push de - push bc - ld d,l - ld e,c - mlt de - ld a,d - ld d,h - ld e,b - ld b,h - ld h,e - mlt hl - mlt bc - mlt de - add a,c - jr nc,_L0 - inc de -_L0: - ld c,a - xor a,a - add hl,bc - adc a,d - ld d,a - ld l,h - ld h,0h - ex de,hl - add hl,de - pop bc - pop de - pop af - ret +; (c) Copyright 2004-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; fract interger Multiplication Unsigned. +; +; Input: +; Operand1: +; HL : 16 bits +; +; Operand2: +; BC : 16 bits +; +; Output: +; Result: HL : 16 bits +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __frsmulu + .assume adl=1 + +__frsmulu: + push af + push de + push bc + ld d,l + ld e,c + mlt de + ld a,d + ld d,h + ld e,b + ld b,h + ld h,e + mlt hl + mlt bc + mlt de + add a,c + jr nc,_L0 + inc de +_L0: + ld c,a + xor a,a + add hl,bc + adc a,d + ld d,a + ld l,h + ld h,0h + ex de,hl + add hl,de + pop bc + pop de + pop af + ret diff --git a/frontends/calculator/CEdev/lib/shared/frstof.src b/frontends/calculator/CEdev/lib/shared/frstof.src index a5e8003..03f0f56 100644 --- a/frontends/calculator/CEdev/lib/shared/frstof.src +++ b/frontends/calculator/CEdev/lib/shared/frstof.src @@ -1,17 +1,17 @@ -; (c) Copyright 2004-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; fract short to float conversion. -; -; Input: -; Operand1: -; HL : 24 bits -; -; Output: -; Result: eHL : 32 bit -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __frstof - .assume adl=1 - -__frstof equ 0002C0h +; (c) Copyright 2004-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; fract short to float conversion. +; +; Input: +; Operand1: +; HL : 24 bits +; +; Output: +; Result: eHL : 32 bit +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __frstof + .assume adl=1 + +__frstof equ 0002C0h diff --git a/frontends/calculator/CEdev/lib/shared/frubtof.src b/frontends/calculator/CEdev/lib/shared/frubtof.src index 7a2a234..e4e6511 100644 --- a/frontends/calculator/CEdev/lib/shared/frubtof.src +++ b/frontends/calculator/CEdev/lib/shared/frubtof.src @@ -1,17 +1,17 @@ -; (c) Copyright 2004-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; fract unsigned char to float conversion. -; -; Input: -; Operand1: -; A : 8 bits -; -; Output: -; Result: eHL : 32 bit -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __frubtof - .assume adl=1 - -__frubtof equ 0002C4h +; (c) Copyright 2004-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; fract unsigned char to float conversion. +; +; Input: +; Operand1: +; A : 8 bits +; +; Output: +; Result: eHL : 32 bit +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __frubtof + .assume adl=1 + +__frubtof equ 0002C4h diff --git a/frontends/calculator/CEdev/lib/shared/fruitof.src b/frontends/calculator/CEdev/lib/shared/fruitof.src index a173276..2726889 100644 --- a/frontends/calculator/CEdev/lib/shared/fruitof.src +++ b/frontends/calculator/CEdev/lib/shared/fruitof.src @@ -1,17 +1,17 @@ -; (c) Copyright 2008 Zilog, Inc. -;------------------------------------------------------------------------- -; fract unsigned integer to float conversion. -; -; Input: -; Operand1: -; HL : 24 bits -; -; Output: -; Result: eHL : 32 bit -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __fruitof - .assume adl=1 - -__fruitof equ 0002BCh +; (c) Copyright 2008 Zilog, Inc. +;------------------------------------------------------------------------- +; fract unsigned integer to float conversion. +; +; Input: +; Operand1: +; HL : 24 bits +; +; Output: +; Result: eHL : 32 bit +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __fruitof + .assume adl=1 + +__fruitof equ 0002BCh diff --git a/frontends/calculator/CEdev/lib/shared/frustof.src b/frontends/calculator/CEdev/lib/shared/frustof.src index 4cf0ba8..9b10c57 100644 --- a/frontends/calculator/CEdev/lib/shared/frustof.src +++ b/frontends/calculator/CEdev/lib/shared/frustof.src @@ -1,17 +1,17 @@ -; (c) Copyright 2008 Zilog, Inc. -;------------------------------------------------------------------------- -; fract unsigned short to float conversion. -; -; Input: -; Operand1: -; HL : 16 bits -; -; Output: -; Result: eHL : 32 bit -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __frustof - .assume adl=1 - -__frustof equ 0002C8h +; (c) Copyright 2008 Zilog, Inc. +;------------------------------------------------------------------------- +; fract unsigned short to float conversion. +; +; Input: +; Operand1: +; HL : 16 bits +; +; Output: +; Result: eHL : 32 bit +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __frustof + .assume adl=1 + +__frustof equ 0002C8h diff --git a/frontends/calculator/CEdev/lib/shared/getstringinput.src b/frontends/calculator/CEdev/lib/shared/getstringinput.src index b3282c3..d29028e 100644 --- a/frontends/calculator/CEdev/lib/shared/getstringinput.src +++ b/frontends/calculator/CEdev/lib/shared/getstringinput.src @@ -1,136 +1,136 @@ -; --- -; void os_GetStringInput(char *string, char *buf, size_t size) -; --- - - .def _os_GetStringInput - .assume adl=1 - -kUp := 3 -kLeft := 2 -kDown := 4 -kEnter := 5 -kClear := 9 -kRight := 1 -curLock := 4 -flags := $D00080 -curRow := $D00595 -curUnder := $D00599 -_PutS := $207C0 -_PutC := $207B8 -_PutPS := $207C8 -_GetKey := $20D8C -_CursorOn := $208B0 -_CursorOff := $208A8 -_PullDownChk := $208BC -_ConvKeyToTok := $20E40 -_GetTokString := $20874 -_PutTokString := $20D74 - -_os_GetStringInput: - push ix - ld ix,0 - add ix,sp - ld hl,(ix+6) ; hl -> input string prompt - add hl,de - xor a,a - sbc hl,de - jr z,__nodisp - ld iy,flags - call _PutS -__nodisp: - ld hl,(curRow) - ld (__savecur),hl - ld a,(ix+12) - dec a - ld (ix+12),a - ld (ix+6),a -__start: - ld de,(ix+9) -__loop: - ld a,' ' - ld (curUnder),a - push de - push ix - call _CursorOn -__getkey: - call _GetKey - call _CursorOff - call _PullDownChk - call _CursorOn - jr c,__getkey - cp a,kLeft - jr z,__loop - cp a,kDown - jr z,__loop - cp a,kRight - jr z,__loop - cp a,kUp - jr z,__loop - cp a,kClear - jr z,__clearpop - cp a,kEnter - jr z,__done - call _ConvKeyToTok - call _GetTokString - pop ix - pop de - ld b,(hl) - inc hl - ld a,(ix+12) - sub a,b - jr nc,__notfull - ld b,(ix+12) - xor a,a -__notfull: - ld (ix+12),a -__draw: - ld a,(hl) - ld (de),a - inc hl - inc de - call _PutC - djnz __draw - ld a,(ix+12) - or a,a - jr nz,__loop -__full: - ld a,' ' - ld (curUnder),a - call _GetKey - cp a,kClear - jr z,__clear - cp a,kEnter - jr z,__exit - jr __full -__clearpop: - pop ix - pop de -__clear: -__savecur := $+1 - ld hl,0 - ld (curRow),hl - ld a,(ix+6) - ld b,(ix+12) - ld (ix+12),a - sub a,b - ld b,a - inc b -__clearloop: - ld a,' ' - call _PutC - djnz __clearloop - ld hl,(__savecur) - ld (curRow),hl - jr __start -__done: - pop ix - pop de -__exit: - ld a,' ' - ld (curUnder),a - xor a,a - ld (de),a - call _CursorOff - di - pop ix - ret +; --- +; void os_GetStringInput(char *string, char *buf, size_t size) +; --- + + .def _os_GetStringInput + .assume adl=1 + +kUp := 3 +kLeft := 2 +kDown := 4 +kEnter := 5 +kClear := 9 +kRight := 1 +curLock := 4 +flags := $D00080 +curRow := $D00595 +curUnder := $D00599 +_PutS := $207C0 +_PutC := $207B8 +_PutPS := $207C8 +_GetKey := $20D8C +_CursorOn := $208B0 +_CursorOff := $208A8 +_PullDownChk := $208BC +_ConvKeyToTok := $20E40 +_GetTokString := $20874 +_PutTokString := $20D74 + +_os_GetStringInput: + push ix + ld ix,0 + add ix,sp + ld hl,(ix+6) ; hl -> input string prompt + add hl,de + xor a,a + sbc hl,de + jr z,__nodisp + ld iy,flags + call _PutS +__nodisp: + ld hl,(curRow) + ld (__savecur),hl + ld a,(ix+12) + dec a + ld (ix+12),a + ld (ix+6),a +__start: + ld de,(ix+9) +__loop: + ld a,' ' + ld (curUnder),a + push de + push ix + call _CursorOn +__getkey: + call _GetKey + call _CursorOff + call _PullDownChk + call _CursorOn + jr c,__getkey + cp a,kLeft + jr z,__loop + cp a,kDown + jr z,__loop + cp a,kRight + jr z,__loop + cp a,kUp + jr z,__loop + cp a,kClear + jr z,__clearpop + cp a,kEnter + jr z,__done + call _ConvKeyToTok + call _GetTokString + pop ix + pop de + ld b,(hl) + inc hl + ld a,(ix+12) + sub a,b + jr nc,__notfull + ld b,(ix+12) + xor a,a +__notfull: + ld (ix+12),a +__draw: + ld a,(hl) + ld (de),a + inc hl + inc de + call _PutC + djnz __draw + ld a,(ix+12) + or a,a + jr nz,__loop +__full: + ld a,' ' + ld (curUnder),a + call _GetKey + cp a,kClear + jr z,__clear + cp a,kEnter + jr z,__exit + jr __full +__clearpop: + pop ix + pop de +__clear: +__savecur := $+1 + ld hl,0 + ld (curRow),hl + ld a,(ix+6) + ld b,(ix+12) + ld (ix+12),a + sub a,b + ld b,a + inc b +__clearloop: + ld a,' ' + call _PutC + djnz __clearloop + ld hl,(__savecur) + ld (curRow),hl + jr __start +__done: + pop ix + pop de +__exit: + ld a,' ' + ld (curUnder),a + xor a,a + ld (de),a + call _CursorOff + di + pop ix + ret diff --git a/frontends/calculator/CEdev/lib/shared/iand.src b/frontends/calculator/CEdev/lib/shared/iand.src index 79d731c..0ddf272 100644 --- a/frontends/calculator/CEdev/lib/shared/iand.src +++ b/frontends/calculator/CEdev/lib/shared/iand.src @@ -1,19 +1,19 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Integer AND. -; Input: -; Operand1: -; hl : 24 bit -; -; Operand2: -; bc : 24 bit -; -; Output: -; Result: hl : 24 bit -; Registers Used: -; a -;------------------------------------------------------------------------- - .def __iand - .assume adl=1 - -__iand equ 000134h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Integer AND. +; Input: +; Operand1: +; hl : 24 bit +; +; Operand2: +; bc : 24 bit +; +; Output: +; Result: hl : 24 bit +; Registers Used: +; a +;------------------------------------------------------------------------- + .def __iand + .assume adl=1 + +__iand equ 000134h diff --git a/frontends/calculator/CEdev/lib/shared/icmpzero.src b/frontends/calculator/CEdev/lib/shared/icmpzero.src index fced974..d264461 100644 --- a/frontends/calculator/CEdev/lib/shared/icmpzero.src +++ b/frontends/calculator/CEdev/lib/shared/icmpzero.src @@ -1,20 +1,20 @@ -; (c) Copyright 2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Set flag for comparison of 24-bit scalar with constant value zero -; Input: -; Operand1: HL register -; -; Output: -; Result: f register -; -; Registers Used: -; None -;------------------------------------------------------------------------- - .def __icmpzero - .assume adl=1 - -__icmpzero: - add hl,de - or a,a - sbc hl,de - ret +; (c) Copyright 2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Set flag for comparison of 24-bit scalar with constant value zero +; Input: +; Operand1: HL register +; +; Output: +; Result: f register +; +; Registers Used: +; None +;------------------------------------------------------------------------- + .def __icmpzero + .assume adl=1 + +__icmpzero: + add hl,de + or a,a + sbc hl,de + ret diff --git a/frontends/calculator/CEdev/lib/shared/idivs.src b/frontends/calculator/CEdev/lib/shared/idivs.src index 1c7bba1..a52e712 100644 --- a/frontends/calculator/CEdev/lib/shared/idivs.src +++ b/frontends/calculator/CEdev/lib/shared/idivs.src @@ -1,20 +1,20 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Signed Integer Division -; Input: -; Operand1: -; hl : 24 bits (dividend x) -; -; Operand2: -; bc : 24 bits (divisor y) -; -; Output: -; Result: hl : 24 bits -; -; Registers Used: -; a, de -;------------------------------------------------------------------------- - .def __idivs - .assume adl=1 - -__idivs equ 00013Ch +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Signed Integer Division +; Input: +; Operand1: +; hl : 24 bits (dividend x) +; +; Operand2: +; bc : 24 bits (divisor y) +; +; Output: +; Result: hl : 24 bits +; +; Registers Used: +; a, de +;------------------------------------------------------------------------- + .def __idivs + .assume adl=1 + +__idivs equ 00013Ch diff --git a/frontends/calculator/CEdev/lib/shared/idivu.src b/frontends/calculator/CEdev/lib/shared/idivu.src index 6fdcacc..6db78cf 100644 --- a/frontends/calculator/CEdev/lib/shared/idivu.src +++ b/frontends/calculator/CEdev/lib/shared/idivu.src @@ -1,21 +1,21 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Unsigned Integer Division. -; Input: -; Operand1: -; uHL : 24 bit dividend -; -; Operand2: -; uBC : 24 bit divisor -; -; Output: -; Result: uHL: 24 bit quotient -; -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __idivu,__idvrmu - .assume adl=1 - -__idivu equ 000140h -__idvrmu equ 000144h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Unsigned Integer Division. +; Input: +; Operand1: +; uHL : 24 bit dividend +; +; Operand2: +; uBC : 24 bit divisor +; +; Output: +; Result: uHL: 24 bit quotient +; +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __idivu,__idvrmu + .assume adl=1 + +__idivu equ 000140h +__idvrmu equ 000144h diff --git a/frontends/calculator/CEdev/lib/shared/ildix.src b/frontends/calculator/CEdev/lib/shared/ildix.src index 8702ff5..e6523cc 100644 --- a/frontends/calculator/CEdev/lib/shared/ildix.src +++ b/frontends/calculator/CEdev/lib/shared/ildix.src @@ -1,17 +1,17 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Integer load hl,(ix+nnnnnn) -; Input: -; Operand1: -; BC : 24-bit offset from ix -; -; Output: -; Result: hl : 24 bit -; -; Registers Used: -; -;------------------------------------------------------------------------- - .def __ildix - .assume adl=1 - -__ildix equ 000148h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Integer load hl,(ix+nnnnnn) +; Input: +; Operand1: +; BC : 24-bit offset from ix +; +; Output: +; Result: hl : 24 bit +; +; Registers Used: +; +;------------------------------------------------------------------------- + .def __ildix + .assume adl=1 + +__ildix equ 000148h diff --git a/frontends/calculator/CEdev/lib/shared/ildiy.src b/frontends/calculator/CEdev/lib/shared/ildiy.src index 3883f15..07a02f2 100644 --- a/frontends/calculator/CEdev/lib/shared/ildiy.src +++ b/frontends/calculator/CEdev/lib/shared/ildiy.src @@ -1,17 +1,17 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Integer load hl,(iy+nnnnnn) -; Input: -; Operand1: -; BC : 24-bit offset from iy -; -; Output: -; Result: hl : 24 bit -; -; Registers Used: -; -;------------------------------------------------------------------------- - .def __ildiy - .assume adl=1 - -__ildiy equ 00014Ch +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Integer load hl,(iy+nnnnnn) +; Input: +; Operand1: +; BC : 24-bit offset from iy +; +; Output: +; Result: hl : 24 bit +; +; Registers Used: +; +;------------------------------------------------------------------------- + .def __ildiy + .assume adl=1 + +__ildiy equ 00014Ch diff --git a/frontends/calculator/CEdev/lib/shared/imuls.src b/frontends/calculator/CEdev/lib/shared/imuls.src index 6d70bc3..c67ab51 100644 --- a/frontends/calculator/CEdev/lib/shared/imuls.src +++ b/frontends/calculator/CEdev/lib/shared/imuls.src @@ -1,19 +1,19 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Integer Multiplication Signed. -; Input: -; Operand1: -; BC : 24 bits -; -; Operand2: -; HL : 24 bits -; -; Output: -; Result: hl : 24 bit -; Registers Used: -; de,af -;------------------------------------------------------------------------- - .def __imuls - .assume adl=1 - -__imuls equ 000154h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Integer Multiplication Signed. +; Input: +; Operand1: +; BC : 24 bits +; +; Operand2: +; HL : 24 bits +; +; Output: +; Result: hl : 24 bit +; Registers Used: +; de,af +;------------------------------------------------------------------------- + .def __imuls + .assume adl=1 + +__imuls equ 000154h diff --git a/frontends/calculator/CEdev/lib/shared/imulu.src b/frontends/calculator/CEdev/lib/shared/imulu.src index fd9c068..061efe2 100644 --- a/frontends/calculator/CEdev/lib/shared/imulu.src +++ b/frontends/calculator/CEdev/lib/shared/imulu.src @@ -1,24 +1,24 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Integer Multiplication Unsigned. -; Note: When multipying two n-bit values, the low-order n-bits -; of the product are the same, whether or not the values -; are considered signed or unsigned. -; Input: -; Operand1: -; uHL : 24 bits -; -; Operand2: -; uBC : 24 bits -; -; Output: -; Result: uHL : 24 bit -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __imulu,__imul_b - .assume adl=1 - -__imul_b equ 000150h -__imulu equ 000158h - +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Integer Multiplication Unsigned. +; Note: When multipying two n-bit values, the low-order n-bits +; of the product are the same, whether or not the values +; are considered signed or unsigned. +; Input: +; Operand1: +; uHL : 24 bits +; +; Operand2: +; uBC : 24 bits +; +; Output: +; Result: uHL : 24 bit +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __imulu,__imul_b + .assume adl=1 + +__imul_b equ 000150h +__imulu equ 000158h + diff --git a/frontends/calculator/CEdev/lib/shared/indcall.src b/frontends/calculator/CEdev/lib/shared/indcall.src index 5f5a122..d8c8ea5 100644 --- a/frontends/calculator/CEdev/lib/shared/indcall.src +++ b/frontends/calculator/CEdev/lib/shared/indcall.src @@ -1,14 +1,14 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Indirect Call -; Input: -; Operand1: -; iy : 24 bit -; -; Output: -; Registers Used: -;------------------------------------------------------------------------- - .def __indcall - .assume adl=1 - -__indcall equ 00015Ch +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Indirect Call +; Input: +; Operand1: +; iy : 24 bit +; +; Output: +; Registers Used: +;------------------------------------------------------------------------- + .def __indcall + .assume adl=1 + +__indcall equ 00015Ch diff --git a/frontends/calculator/CEdev/lib/shared/ineg.src b/frontends/calculator/CEdev/lib/shared/ineg.src index 4bb0b46..3444991 100644 --- a/frontends/calculator/CEdev/lib/shared/ineg.src +++ b/frontends/calculator/CEdev/lib/shared/ineg.src @@ -1,16 +1,16 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Integer/short NEG. -; Input: -; Operand1: -; hl : 24/16 bit -; -; Output: -; Result: hl : 24/16 bit ( 0 - hl) -; Registers Used: -; a,de -;------------------------------------------------------------------------- - .def __ineg - .assume adl=1 - -__ineg equ 000160h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Integer/short NEG. +; Input: +; Operand1: +; hl : 24/16 bit +; +; Output: +; Result: hl : 24/16 bit ( 0 - hl) +; Registers Used: +; a,de +;------------------------------------------------------------------------- + .def __ineg + .assume adl=1 + +__ineg equ 000160h diff --git a/frontends/calculator/CEdev/lib/shared/inot.src b/frontends/calculator/CEdev/lib/shared/inot.src index 8fcf888..74efd5b 100644 --- a/frontends/calculator/CEdev/lib/shared/inot.src +++ b/frontends/calculator/CEdev/lib/shared/inot.src @@ -1,15 +1,15 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Integer/Short NOT. -; Input: -; Operand1: -; hl : 24/16 bit -; -; Output: -; Result: hl : 24/16 bit -; Registers Used: -;------------------------------------------------------------------------- - .def __inot - .assume adl=1 - -__inot equ 000164h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Integer/Short NOT. +; Input: +; Operand1: +; hl : 24/16 bit +; +; Output: +; Result: hl : 24/16 bit +; Registers Used: +;------------------------------------------------------------------------- + .def __inot + .assume adl=1 + +__inot equ 000164h diff --git a/frontends/calculator/CEdev/lib/shared/interrupts.src b/frontends/calculator/CEdev/lib/shared/interrupts.src index 64d30d5..868906b 100644 --- a/frontends/calculator/CEdev/lib/shared/interrupts.src +++ b/frontends/calculator/CEdev/lib/shared/interrupts.src @@ -1,142 +1,142 @@ - .def _int_Initialize - .def _int_Handler - .def _int_SetVector - .def _int_Reset - .assume adl=1 - -;------------------------------------------------------------------------------- -; Interrupts equates -mpIntStatus equ 0F00000h -mpIntMask equ 0F00004h -mpIntAck equ 0F00008h -mpIntLachEnable equ 0F0000Ch -mpIntXor equ 0F00010h -mpIntStatusMasked equ 0F00014h - -intOnKey equ 1 -intTimer1 equ 2 -intTimer2 equ 4 -intTimer3 equ 8 -intOsTimer equ 10h -intKbd equ 400h -intLcd equ 800h -intRtc equ 1000h - -;------------------------------------------------------------------------------- -_int_Initialize: - di - ld de,lconf - ld hl,mpIntMask - ld bc,16 - ldir - ld hl,cconf - ld de,mpIntMask - ld bc,16 - ldir - ld hl,0D18879h - ld de,0C90611h - ld (hl),de - dec hl - ld (hl),0EDh - push hl - inc d - call 0D18878h - ld hl, 0E10010h | ((_int_Handler >> 8) & 000FF00h) - ld de, 0C3h | ((_int_Handler << 8) & 0FFFF00h) - ld (hl),h - inc hl - ld (hl),de - ld hl,0E30800h - ld bc,0401h - ld a,0E1h - call 00210E0h ; _Memset - ld hl,0E308h - ld i,hl - im 2 - ld d,3 - ret - -_int_Handler: - ex af,af' - exx - ld hl,(mpIntStatusMasked) - add hl,hl - inc hl - add hl,hl - xor a,a -isr_loop: - inc a - add hl,hl - jr nc,isr_loop -identified: - dec a - add a,a - add a,a - ld (isr_dispatch_smc+1),a - exx - ex af, af' -isr_dispatch_smc: - jr $+2 -iv_list: - jp unhandledInt - jp unhandledInt - jp unhandledInt - jp unhandledInt - jp unhandledInt - jp unhandledInt - jp unhandledInt - jp unhandledInt - jp unhandledInt - jp unhandledInt - jp unhandledInt - jp unhandledInt - jp unhandledInt - jp unhandledInt - jp unhandledInt - jp unhandledInt - jp unhandledInt - jp unhandledInt - jp unhandledInt - jp unhandledInt - jp unhandledInt - jp unhandledInt -unhandledInt: - ei - ret - -;------------------------------------------------------------------------------- -_int_SetVector: - ld iy,0 - add iy,sp - ld a,21 - ld l,(iy+3) - sub a,l - ld l,a - ld h,4 - mlt hl - ld de,iv_list+1 - add hl,de - ld de,(iy+6) - ld (hl),de - ret - -;------------------------------------------------------------------------------- -_int_Reset: - di - ld hl, lconf - ld de, mpIntMask - ld bc, 16 - ldir - im 1 - ret - segment bss -lconf: ds 16 - segment data -cconf: ; Mask - db 000h,000h,000h,000h - ; ACK - db 0FFh,0FFh,0FFh,0FFh - ; Latch - db 000h,000h,000h,000h - ; Invert - db 000h,000h,000h,000h + .def _int_Initialize + .def _int_Handler + .def _int_SetVector + .def _int_Reset + .assume adl=1 + +;------------------------------------------------------------------------------- +; Interrupts equates +mpIntStatus equ 0F00000h +mpIntMask equ 0F00004h +mpIntAck equ 0F00008h +mpIntLachEnable equ 0F0000Ch +mpIntXor equ 0F00010h +mpIntStatusMasked equ 0F00014h + +intOnKey equ 1 +intTimer1 equ 2 +intTimer2 equ 4 +intTimer3 equ 8 +intOsTimer equ 10h +intKbd equ 400h +intLcd equ 800h +intRtc equ 1000h + +;------------------------------------------------------------------------------- +_int_Initialize: + di + ld de,lconf + ld hl,mpIntMask + ld bc,16 + ldir + ld hl,cconf + ld de,mpIntMask + ld bc,16 + ldir + ld hl,0D18879h + ld de,0C90611h + ld (hl),de + dec hl + ld (hl),0EDh + push hl + inc d + call 0D18878h + ld hl, 0E10010h | ((_int_Handler >> 8) & 000FF00h) + ld de, 0C3h | ((_int_Handler << 8) & 0FFFF00h) + ld (hl),h + inc hl + ld (hl),de + ld hl,0E30800h + ld bc,0401h + ld a,0E1h + call 00210E0h ; _Memset + ld hl,0E308h + ld i,hl + im 2 + ld d,3 + ret + +_int_Handler: + ex af,af' + exx + ld hl,(mpIntStatusMasked) + add hl,hl + inc hl + add hl,hl + xor a,a +isr_loop: + inc a + add hl,hl + jr nc,isr_loop +identified: + dec a + add a,a + add a,a + ld (isr_dispatch_smc+1),a + exx + ex af, af' +isr_dispatch_smc: + jr $+2 +iv_list: + jp unhandledInt + jp unhandledInt + jp unhandledInt + jp unhandledInt + jp unhandledInt + jp unhandledInt + jp unhandledInt + jp unhandledInt + jp unhandledInt + jp unhandledInt + jp unhandledInt + jp unhandledInt + jp unhandledInt + jp unhandledInt + jp unhandledInt + jp unhandledInt + jp unhandledInt + jp unhandledInt + jp unhandledInt + jp unhandledInt + jp unhandledInt + jp unhandledInt +unhandledInt: + ei + ret + +;------------------------------------------------------------------------------- +_int_SetVector: + ld iy,0 + add iy,sp + ld a,21 + ld l,(iy+3) + sub a,l + ld l,a + ld h,4 + mlt hl + ld de,iv_list+1 + add hl,de + ld de,(iy+6) + ld (hl),de + ret + +;------------------------------------------------------------------------------- +_int_Reset: + di + ld hl, lconf + ld de, mpIntMask + ld bc, 16 + ldir + im 1 + ret + segment bss +lconf: ds 16 + segment data +cconf: ; Mask + db 000h,000h,000h,000h + ; ACK + db 0FFh,0FFh,0FFh,0FFh + ; Latch + db 000h,000h,000h,000h + ; Invert + db 000h,000h,000h,000h diff --git a/frontends/calculator/CEdev/lib/shared/ior.src b/frontends/calculator/CEdev/lib/shared/ior.src index 0edcd5a..c59a38c 100644 --- a/frontends/calculator/CEdev/lib/shared/ior.src +++ b/frontends/calculator/CEdev/lib/shared/ior.src @@ -1,19 +1,19 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Integer OR. -; Input: -; Operand1: -; HL : 24 bit -; -; Operand2: -; BC : 24 bit -; -; Output: -; Result: HL : 24 bit -; Registers Used: -; a -;------------------------------------------------------------------------- - .def __ior - .assume adl=1 - -__ior equ 000168h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Integer OR. +; Input: +; Operand1: +; HL : 24 bit +; +; Operand2: +; BC : 24 bit +; +; Output: +; Result: HL : 24 bit +; Registers Used: +; a +;------------------------------------------------------------------------- + .def __ior + .assume adl=1 + +__ior equ 000168h diff --git a/frontends/calculator/CEdev/lib/shared/irems.src b/frontends/calculator/CEdev/lib/shared/irems.src index ef4c8d7..b73666e 100644 --- a/frontends/calculator/CEdev/lib/shared/irems.src +++ b/frontends/calculator/CEdev/lib/shared/irems.src @@ -1,19 +1,19 @@ -; (c) Copyright 1999-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Integer Modulus Signed. -; Input: -; Operand1: -; HL : 24 bits (dividend) -; -; Operand2: -; BC : 24 bits (divisor) -; -; Output: -; Result: HL : 24 bit -; Registers Used: -; de,af -;------------------------------------------------------------------------- - .def __irems - .assume adl=1 - -__irems equ 00016Ch +; (c) Copyright 1999-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Integer Modulus Signed. +; Input: +; Operand1: +; HL : 24 bits (dividend) +; +; Operand2: +; BC : 24 bits (divisor) +; +; Output: +; Result: HL : 24 bit +; Registers Used: +; de,af +;------------------------------------------------------------------------- + .def __irems + .assume adl=1 + +__irems equ 00016Ch diff --git a/frontends/calculator/CEdev/lib/shared/iremu.src b/frontends/calculator/CEdev/lib/shared/iremu.src index dac22a0..e519264 100644 --- a/frontends/calculator/CEdev/lib/shared/iremu.src +++ b/frontends/calculator/CEdev/lib/shared/iremu.src @@ -1,21 +1,21 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Unsigned Integer Modulus -; Input: -; Operand1: -; uHL : 24 bits (dividend x) -; -; Operand2: -; uBC : 24 bits (divisor y) -; -; Output: -; Result: uHL : 24 bits (remainder) -; -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __iremu - .assume adl=1 - -__iremu equ 000170h - +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Unsigned Integer Modulus +; Input: +; Operand1: +; uHL : 24 bits (dividend x) +; +; Operand2: +; uBC : 24 bits (divisor y) +; +; Output: +; Result: uHL : 24 bits (remainder) +; +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __iremu + .assume adl=1 + +__iremu equ 000170h + diff --git a/frontends/calculator/CEdev/lib/shared/isalnum.src b/frontends/calculator/CEdev/lib/shared/isalnum.src index 12c28a1..7c38350 100644 --- a/frontends/calculator/CEdev/lib/shared/isalnum.src +++ b/frontends/calculator/CEdev/lib/shared/isalnum.src @@ -1,28 +1,28 @@ - .def _isalnum - .ref ___maptab - .assume adl=1 - -; original source -; int isalnum(int c) { -; if( (unsigned char)c & (unsigned char)0x80 ) -; return (0); -; return(__maptab[c] & (unsigned char)(UC|LC|DIG)); -; } - -_isalnum: - pop hl - pop de - push de - push hl - or a,a - sbc hl,hl - bit 7,e - ret nz - ex de,hl - ld de,___maptab - add hl,de - ld a,(hl) - and a,13 - sbc hl,hl - ld l,a - ret + .def _isalnum + .ref ___maptab + .assume adl=1 + +; original source +; int isalnum(int c) { +; if( (unsigned char)c & (unsigned char)0x80 ) +; return (0); +; return(__maptab[c] & (unsigned char)(UC|LC|DIG)); +; } + +_isalnum: + pop hl + pop de + push de + push hl + or a,a + sbc hl,hl + bit 7,e + ret nz + ex de,hl + ld de,___maptab + add hl,de + ld a,(hl) + and a,13 + sbc hl,hl + ld l,a + ret diff --git a/frontends/calculator/CEdev/lib/shared/isalpha.src b/frontends/calculator/CEdev/lib/shared/isalpha.src index 94627ba..56bfc47 100644 --- a/frontends/calculator/CEdev/lib/shared/isalpha.src +++ b/frontends/calculator/CEdev/lib/shared/isalpha.src @@ -1,27 +1,27 @@ - .def _isalpha - .ref ___maptab - .assume adl=1 - -; original source -; int isalnum(int c) { -; if( (unsigned char)c & (unsigned char)0x80 ) -; return (0); -; return(__maptab[c] & (unsigned char)(UC|LC)); - -_isalpha: - pop hl - pop de - push de - push hl - or a,a - sbc hl,hl - bit 7,e - ret nz - ex de,hl - ld de,___maptab - add hl,de - ld a,(hl) - and a,12 - sbc hl,hl - ld l,a - ret + .def _isalpha + .ref ___maptab + .assume adl=1 + +; original source +; int isalnum(int c) { +; if( (unsigned char)c & (unsigned char)0x80 ) +; return (0); +; return(__maptab[c] & (unsigned char)(UC|LC)); + +_isalpha: + pop hl + pop de + push de + push hl + or a,a + sbc hl,hl + bit 7,e + ret nz + ex de,hl + ld de,___maptab + add hl,de + ld a,(hl) + and a,12 + sbc hl,hl + ld l,a + ret diff --git a/frontends/calculator/CEdev/lib/shared/isascii.src b/frontends/calculator/CEdev/lib/shared/isascii.src index 0c88ffb..2d5b87e 100644 --- a/frontends/calculator/CEdev/lib/shared/isascii.src +++ b/frontends/calculator/CEdev/lib/shared/isascii.src @@ -1,19 +1,19 @@ - .def _isascii - .assume adl=1 - -; original source -; int isascii(int c) { -; return c >= 0 && c < 128; -; } - -_isascii: - pop de - pop hl - push hl - push de - - ld de,-128 - add hl,de - sbc hl,hl - inc hl - ret + .def _isascii + .assume adl=1 + +; original source +; int isascii(int c) { +; return c >= 0 && c < 128; +; } + +_isascii: + pop de + pop hl + push hl + push de + + ld de,-128 + add hl,de + sbc hl,hl + inc hl + ret diff --git a/frontends/calculator/CEdev/lib/shared/iscntrl.src b/frontends/calculator/CEdev/lib/shared/iscntrl.src index a8e7864..d6205c7 100644 --- a/frontends/calculator/CEdev/lib/shared/iscntrl.src +++ b/frontends/calculator/CEdev/lib/shared/iscntrl.src @@ -1,27 +1,27 @@ - .def _iscntrl - .ref ___maptab - .assume adl=1 - -;int iscntrl(int c) { -; if( (unsigned char)c & (unsigned char)0x80 ) -; return (0); -; return(__maptab[c] & (unsigned char)(CTL)); -;} - -_iscntrl: - pop hl - pop de - push de - push hl - or a,a - sbc hl,hl - bit 7,e - ret nz - ex de,hl - ld de,___maptab - add hl,de - ld a,(hl) - and a,128 - sbc hl,hl - ld l,a - ret + .def _iscntrl + .ref ___maptab + .assume adl=1 + +;int iscntrl(int c) { +; if( (unsigned char)c & (unsigned char)0x80 ) +; return (0); +; return(__maptab[c] & (unsigned char)(CTL)); +;} + +_iscntrl: + pop hl + pop de + push de + push hl + or a,a + sbc hl,hl + bit 7,e + ret nz + ex de,hl + ld de,___maptab + add hl,de + ld a,(hl) + and a,128 + sbc hl,hl + ld l,a + ret diff --git a/frontends/calculator/CEdev/lib/shared/isdigit.src b/frontends/calculator/CEdev/lib/shared/isdigit.src index bbd555a..8517967 100644 --- a/frontends/calculator/CEdev/lib/shared/isdigit.src +++ b/frontends/calculator/CEdev/lib/shared/isdigit.src @@ -1,27 +1,27 @@ - .def _isdigit - .ref ___maptab - .assume adl=1 - -;int isdigit(int c) { -; if( (unsigned char)c & (unsigned char)0x80 ) -; return (0); -; return(__maptab[c] & (unsigned char)(DIG)); -;} - -_isdigit: - pop hl - pop de - push de - push hl - or a,a - sbc hl,hl - bit 7,e - ret nz - ex de,hl - ld de,___maptab - add hl,de - ld a,(hl) - and a,1 - sbc hl,hl - ld l,a - ret + .def _isdigit + .ref ___maptab + .assume adl=1 + +;int isdigit(int c) { +; if( (unsigned char)c & (unsigned char)0x80 ) +; return (0); +; return(__maptab[c] & (unsigned char)(DIG)); +;} + +_isdigit: + pop hl + pop de + push de + push hl + or a,a + sbc hl,hl + bit 7,e + ret nz + ex de,hl + ld de,___maptab + add hl,de + ld a,(hl) + and a,1 + sbc hl,hl + ld l,a + ret diff --git a/frontends/calculator/CEdev/lib/shared/isgraph.src b/frontends/calculator/CEdev/lib/shared/isgraph.src index 59bc61e..063009d 100644 --- a/frontends/calculator/CEdev/lib/shared/isgraph.src +++ b/frontends/calculator/CEdev/lib/shared/isgraph.src @@ -1,28 +1,28 @@ - .def _isgraph - .ref ___maptab - .assume adl=1 - -; original source -; int isgraph(int c) { -; if( (unsigned char)c & (unsigned char)0x80 ) -; return (0); -; return(__maptab[c] & (unsigned char)(UC|LC|DIG|PUN)); -; } - -_isgraph: - pop hl - pop de - push de - push hl - or a,a - sbc hl,hl - bit 7,e - ret nz - ex de,hl - ld de,___maptab - add hl,de - ld a,(hl) - and a,15 - sbc hl,hl - ld l,a - ret + .def _isgraph + .ref ___maptab + .assume adl=1 + +; original source +; int isgraph(int c) { +; if( (unsigned char)c & (unsigned char)0x80 ) +; return (0); +; return(__maptab[c] & (unsigned char)(UC|LC|DIG|PUN)); +; } + +_isgraph: + pop hl + pop de + push de + push hl + or a,a + sbc hl,hl + bit 7,e + ret nz + ex de,hl + ld de,___maptab + add hl,de + ld a,(hl) + and a,15 + sbc hl,hl + ld l,a + ret diff --git a/frontends/calculator/CEdev/lib/shared/ishl.src b/frontends/calculator/CEdev/lib/shared/ishl.src index b9a7347..084ea40 100644 --- a/frontends/calculator/CEdev/lib/shared/ishl.src +++ b/frontends/calculator/CEdev/lib/shared/ishl.src @@ -1,20 +1,20 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Integer Shift Left -; Input: -; Operand1: -; BC : 24 bit number of bits to shift -; Asuume B=0 C=shift count -; Operand2: -; HL : 24 bit value to be shifted by C -; -; Output: -; Result: HL : 24 bit -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __ishl, __ishl_b - .assume adl=1 - -__ishl_b equ 000178h -__ishl equ 000174h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Integer Shift Left +; Input: +; Operand1: +; BC : 24 bit number of bits to shift +; Asuume B=0 C=shift count +; Operand2: +; HL : 24 bit value to be shifted by C +; +; Output: +; Result: HL : 24 bit +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __ishl, __ishl_b + .assume adl=1 + +__ishl_b equ 000178h +__ishl equ 000174h diff --git a/frontends/calculator/CEdev/lib/shared/ishrs.src b/frontends/calculator/CEdev/lib/shared/ishrs.src index 79125e7..0c0a3c7 100644 --- a/frontends/calculator/CEdev/lib/shared/ishrs.src +++ b/frontends/calculator/CEdev/lib/shared/ishrs.src @@ -1,20 +1,20 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Integer Shift Right Signed -; Input: -; Operand1: -; BC : 24 bit number of bits to shift -; Assume B=0 C=shift count -; Operand2: -; HL : 24 bit value to be shifted by C -; -; Output: -; Result: HL : 24 bit -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __ishrs, __ishrs_b - .assume adl=1 - -__ishrs_b equ 000180h -__ishrs equ 00017Ch +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Integer Shift Right Signed +; Input: +; Operand1: +; BC : 24 bit number of bits to shift +; Assume B=0 C=shift count +; Operand2: +; HL : 24 bit value to be shifted by C +; +; Output: +; Result: HL : 24 bit +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __ishrs, __ishrs_b + .assume adl=1 + +__ishrs_b equ 000180h +__ishrs equ 00017Ch diff --git a/frontends/calculator/CEdev/lib/shared/ishru.src b/frontends/calculator/CEdev/lib/shared/ishru.src index ed190d4..f369fa9 100644 --- a/frontends/calculator/CEdev/lib/shared/ishru.src +++ b/frontends/calculator/CEdev/lib/shared/ishru.src @@ -1,20 +1,20 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Integer Shift Right Unsigned -; Input: -; Operand1: -; BC : 24 bit number of bits to shift -; Assume B=0 C=shift count -; Operand2: -; HL : 24 bit value to be shifted by C -; -; Output: -; Result: HL : 24 bit -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __ishru, __ishru_b - .assume adl=1 - -__ishru_b equ 000188h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Integer Shift Right Unsigned +; Input: +; Operand1: +; BC : 24 bit number of bits to shift +; Assume B=0 C=shift count +; Operand2: +; HL : 24 bit value to be shifted by C +; +; Output: +; Result: HL : 24 bit +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __ishru, __ishru_b + .assume adl=1 + +__ishru_b equ 000188h __ishru equ 000184h \ No newline at end of file diff --git a/frontends/calculator/CEdev/lib/shared/isinf.src b/frontends/calculator/CEdev/lib/shared/isinf.src index 1c0c46b..f3782a9 100644 --- a/frontends/calculator/CEdev/lib/shared/isinf.src +++ b/frontends/calculator/CEdev/lib/shared/isinf.src @@ -1,20 +1,20 @@ - .ref __frameset0 - .def _isinf - .assume adl=1 - -; int isinf(double n); - -_isinf: - call __frameset0 - ld hl,(ix+6) - adc hl,hl - jr nz,l_1 - ld hl,(ix+8) - add hl,hl - inc h -l_1: ld hl,0 - jr nz,l_2 - inc hl -l_2: ld sp,ix - pop ix - ret + .ref __frameset0 + .def _isinf + .assume adl=1 + +; int isinf(double n); + +_isinf: + call __frameset0 + ld hl,(ix+6) + adc hl,hl + jr nz,l_1 + ld hl,(ix+8) + add hl,hl + inc h +l_1: ld hl,0 + jr nz,l_2 + inc hl +l_2: ld sp,ix + pop ix + ret diff --git a/frontends/calculator/CEdev/lib/shared/islower.src b/frontends/calculator/CEdev/lib/shared/islower.src index 3f72f9c..260a1d0 100644 --- a/frontends/calculator/CEdev/lib/shared/islower.src +++ b/frontends/calculator/CEdev/lib/shared/islower.src @@ -1,29 +1,29 @@ - .def _islower - .ref ___maptab - .assume adl=1 - -; original source -; int islower(int c) { -; if( (unsigned char)c & (unsigned char)0x80 ) -; return (0); -; return(__maptab[c] & (unsigned char)(LC)); -; } - -_islower: - pop hl - pop de - push de - push hl - or a,a - sbc hl,hl - ld a,e - and a,128 - ret nz - ex de,hl - ld de,___maptab - add hl,de - ld a,(hl) - and a,4 - sbc hl,hl - ld l,a - ret + .def _islower + .ref ___maptab + .assume adl=1 + +; original source +; int islower(int c) { +; if( (unsigned char)c & (unsigned char)0x80 ) +; return (0); +; return(__maptab[c] & (unsigned char)(LC)); +; } + +_islower: + pop hl + pop de + push de + push hl + or a,a + sbc hl,hl + ld a,e + and a,128 + ret nz + ex de,hl + ld de,___maptab + add hl,de + ld a,(hl) + and a,4 + sbc hl,hl + ld l,a + ret diff --git a/frontends/calculator/CEdev/lib/shared/isnan.src b/frontends/calculator/CEdev/lib/shared/isnan.src index 129bf69..d3e2b44 100644 --- a/frontends/calculator/CEdev/lib/shared/isnan.src +++ b/frontends/calculator/CEdev/lib/shared/isnan.src @@ -1,20 +1,20 @@ - .ref __frameset0 - .def _isnan - .assume adl=1 - -; int isnan(double n); - -_isnan: - call __frameset0 - ld hl,(ix+6) - adc hl,hl - jr z,l_1 - ld hl,(ix+8) - add hl,hl -l_1: inc h - ld hl,0 - jr nz,l_2 - inc hl -l_2: ld sp,ix - pop ix - ret + .ref __frameset0 + .def _isnan + .assume adl=1 + +; int isnan(double n); + +_isnan: + call __frameset0 + ld hl,(ix+6) + adc hl,hl + jr z,l_1 + ld hl,(ix+8) + add hl,hl +l_1: inc h + ld hl,0 + jr nz,l_2 + inc hl +l_2: ld sp,ix + pop ix + ret diff --git a/frontends/calculator/CEdev/lib/shared/isprint.src b/frontends/calculator/CEdev/lib/shared/isprint.src index 79b7bbf..ed19c41 100644 --- a/frontends/calculator/CEdev/lib/shared/isprint.src +++ b/frontends/calculator/CEdev/lib/shared/isprint.src @@ -1,28 +1,28 @@ - .def _isprint - .ref ___maptab - .assume adl=1 - -; original source -; int isprint(int c) { -; if( (unsigned char)c & (unsigned char)0x80 ) -; return (0); -; return(__maptab[c] & (unsigned char)(UC|LC|DIG|PUN|SP)); -; } - -_isprint: - pop hl - pop de - push de - push hl - or a,a - sbc hl,hl - bit 7,e - ret nz - ex de,hl - ld de,___maptab - add hl,de - ld a,(hl) - and a,47 - sbc hl,hl - ld l,a - ret + .def _isprint + .ref ___maptab + .assume adl=1 + +; original source +; int isprint(int c) { +; if( (unsigned char)c & (unsigned char)0x80 ) +; return (0); +; return(__maptab[c] & (unsigned char)(UC|LC|DIG|PUN|SP)); +; } + +_isprint: + pop hl + pop de + push de + push hl + or a,a + sbc hl,hl + bit 7,e + ret nz + ex de,hl + ld de,___maptab + add hl,de + ld a,(hl) + and a,47 + sbc hl,hl + ld l,a + ret diff --git a/frontends/calculator/CEdev/lib/shared/ispunct.src b/frontends/calculator/CEdev/lib/shared/ispunct.src index 52a2e79..baefad2 100644 --- a/frontends/calculator/CEdev/lib/shared/ispunct.src +++ b/frontends/calculator/CEdev/lib/shared/ispunct.src @@ -1,28 +1,28 @@ - .def _ispunct - .ref ___maptab - .assume adl=1 - -; original source -; int ispunct(int c) { -; if( (unsigned char)c & (unsigned char)0x80 ) -; return (0); -; return(__maptab[c] & (unsigned char)(PUN)); -; } - -_ispunct: - pop hl - pop de - push de - push hl - or a,a - sbc hl,hl - bit 7,e - ret nz - ex de,hl - ld de,___maptab - add hl,de - ld a,(hl) - and a,2 - sbc hl,hl - ld l,a - ret + .def _ispunct + .ref ___maptab + .assume adl=1 + +; original source +; int ispunct(int c) { +; if( (unsigned char)c & (unsigned char)0x80 ) +; return (0); +; return(__maptab[c] & (unsigned char)(PUN)); +; } + +_ispunct: + pop hl + pop de + push de + push hl + or a,a + sbc hl,hl + bit 7,e + ret nz + ex de,hl + ld de,___maptab + add hl,de + ld a,(hl) + and a,2 + sbc hl,hl + ld l,a + ret diff --git a/frontends/calculator/CEdev/lib/shared/isspace.src b/frontends/calculator/CEdev/lib/shared/isspace.src index 4e670f2..e6b8ec6 100644 --- a/frontends/calculator/CEdev/lib/shared/isspace.src +++ b/frontends/calculator/CEdev/lib/shared/isspace.src @@ -1,28 +1,28 @@ - .def _isspace - .ref ___maptab - .assume adl=1 - -; original source -; int isspace(int c) { -; if( (unsigned char)c & (unsigned char)0x80 ) -; return (0); -; return(__maptab[c] & (unsigned char)(WS)); -; } - -_isspace: - pop hl - pop de - push de - push hl - or a,a - sbc hl,hl - bit 7,e - ret nz - ex de,hl - ld de,___maptab - add hl,de - ld a,(hl) - and a,64 - sbc hl,hl - ld l,a - ret + .def _isspace + .ref ___maptab + .assume adl=1 + +; original source +; int isspace(int c) { +; if( (unsigned char)c & (unsigned char)0x80 ) +; return (0); +; return(__maptab[c] & (unsigned char)(WS)); +; } + +_isspace: + pop hl + pop de + push de + push hl + or a,a + sbc hl,hl + bit 7,e + ret nz + ex de,hl + ld de,___maptab + add hl,de + ld a,(hl) + and a,64 + sbc hl,hl + ld l,a + ret diff --git a/frontends/calculator/CEdev/lib/shared/istix.src b/frontends/calculator/CEdev/lib/shared/istix.src index 8570366..6e986e1 100644 --- a/frontends/calculator/CEdev/lib/shared/istix.src +++ b/frontends/calculator/CEdev/lib/shared/istix.src @@ -1,18 +1,18 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Integer store (ix+nnnnnn),HL -; Input: -; Operand1: -; BC : 24-bit offset from ix -; HL : 24-bit integer to store -; -; Output: -; -; -; Registers Used: -; -;------------------------------------------------------------------------- - .def __istix - .assume adl=1 - -__istix equ 00018Ch +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Integer store (ix+nnnnnn),HL +; Input: +; Operand1: +; BC : 24-bit offset from ix +; HL : 24-bit integer to store +; +; Output: +; +; +; Registers Used: +; +;------------------------------------------------------------------------- + .def __istix + .assume adl=1 + +__istix equ 00018Ch diff --git a/frontends/calculator/CEdev/lib/shared/istiy.src b/frontends/calculator/CEdev/lib/shared/istiy.src index 7ca71ea..d336856 100644 --- a/frontends/calculator/CEdev/lib/shared/istiy.src +++ b/frontends/calculator/CEdev/lib/shared/istiy.src @@ -1,18 +1,18 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Integer store (iy+nnnnnn),HL -; Input: -; Operand1: -; BC : 24-bit offset from iy -; HL : 24-bit integer to store -; -; Output: -; -; -; Registers Used: -; -;------------------------------------------------------------------------- - .def __istiy - .assume adl=1 - -__istiy equ 000190h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Integer store (iy+nnnnnn),HL +; Input: +; Operand1: +; BC : 24-bit offset from iy +; HL : 24-bit integer to store +; +; Output: +; +; +; Registers Used: +; +;------------------------------------------------------------------------- + .def __istiy + .assume adl=1 + +__istiy equ 000190h diff --git a/frontends/calculator/CEdev/lib/shared/isupper.src b/frontends/calculator/CEdev/lib/shared/isupper.src index 300474e..79b812e 100644 --- a/frontends/calculator/CEdev/lib/shared/isupper.src +++ b/frontends/calculator/CEdev/lib/shared/isupper.src @@ -1,28 +1,28 @@ - .def _isupper - .ref ___maptab - .assume adl=1 - -; original source -; int isupper(int c) { -; if( (unsigned char)c & (unsigned char)0x80 ) -; return (0); -; return(__maptab[c] & (unsigned char)(UC)); -; } - -_isupper: - pop hl - pop de - push de - push hl - or a,a - sbc hl,hl - bit 7,e - ret nz - ex de,hl - ld de,___maptab - add hl,de - ld a,(hl) - and a,8 - sbc hl,hl - ld l,a - ret + .def _isupper + .ref ___maptab + .assume adl=1 + +; original source +; int isupper(int c) { +; if( (unsigned char)c & (unsigned char)0x80 ) +; return (0); +; return(__maptab[c] & (unsigned char)(UC)); +; } + +_isupper: + pop hl + pop de + push de + push hl + or a,a + sbc hl,hl + bit 7,e + ret nz + ex de,hl + ld de,___maptab + add hl,de + ld a,(hl) + and a,8 + sbc hl,hl + ld l,a + ret diff --git a/frontends/calculator/CEdev/lib/shared/isxdigit.src b/frontends/calculator/CEdev/lib/shared/isxdigit.src index 9db54a4..354a161 100644 --- a/frontends/calculator/CEdev/lib/shared/isxdigit.src +++ b/frontends/calculator/CEdev/lib/shared/isxdigit.src @@ -1,28 +1,28 @@ - .def _isxdigit - .ref ___maptab - .assume adl=1 - -; original source -; int isxdigit(int c) { -; if( (unsigned char)c & (unsigned char)0x80 ) -; return (0); -; return(__maptab[c] & (unsigned char)(DIG|HEX)); -; } - -_isxdigit: - pop hl - pop de - push de - push hl - or a,a - sbc hl,hl - bit 7,e - ret nz - ex de,hl - ld de,___maptab - add hl,de - ld a,(hl) - and a,17 - sbc hl,hl - ld l,a - ret + .def _isxdigit + .ref ___maptab + .assume adl=1 + +; original source +; int isxdigit(int c) { +; if( (unsigned char)c & (unsigned char)0x80 ) +; return (0); +; return(__maptab[c] & (unsigned char)(DIG|HEX)); +; } + +_isxdigit: + pop hl + pop de + push de + push hl + or a,a + sbc hl,hl + bit 7,e + ret nz + ex de,hl + ld de,___maptab + add hl,de + ld a,(hl) + and a,17 + sbc hl,hl + ld l,a + ret diff --git a/frontends/calculator/CEdev/lib/shared/itol.src b/frontends/calculator/CEdev/lib/shared/itol.src index 8efd34d..81e7315 100644 --- a/frontends/calculator/CEdev/lib/shared/itol.src +++ b/frontends/calculator/CEdev/lib/shared/itol.src @@ -1,16 +1,16 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Signed Integer to Long conversion -; Input: -; Operand1: -; BC : 24 bit -; -; Output: -; Result: A:BC : 32 bit -; Registers Used: -; -;------------------------------------------------------------------------- - .def __itol - .assume adl=1 - -__itol equ 000194h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Signed Integer to Long conversion +; Input: +; Operand1: +; BC : 24 bit +; +; Output: +; Result: A:BC : 32 bit +; Registers Used: +; +;------------------------------------------------------------------------- + .def __itol + .assume adl=1 + +__itol equ 000194h diff --git a/frontends/calculator/CEdev/lib/shared/ixor.src b/frontends/calculator/CEdev/lib/shared/ixor.src index 75299dd..7b6b41b 100644 --- a/frontends/calculator/CEdev/lib/shared/ixor.src +++ b/frontends/calculator/CEdev/lib/shared/ixor.src @@ -1,19 +1,19 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Integer XOR. -; Input: -; Operand1: -; hl : 24 bit -; -; Operand2: -; bc : 24 bit -; -; Output: -; Result: hl : 24 bit -; Registers Used: -; a -;------------------------------------------------------------------------- - .def __ixor - .assume adl=1 - -__ixor equ 000198h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Integer XOR. +; Input: +; Operand1: +; hl : 24 bit +; +; Operand2: +; bc : 24 bit +; +; Output: +; Result: hl : 24 bit +; Registers Used: +; a +;------------------------------------------------------------------------- + .def __ixor + .assume adl=1 + +__ixor equ 000198h diff --git a/frontends/calculator/CEdev/lib/shared/labs.src b/frontends/calculator/CEdev/lib/shared/labs.src index 38cd6dc..dfe7f98 100644 --- a/frontends/calculator/CEdev/lib/shared/labs.src +++ b/frontends/calculator/CEdev/lib/shared/labs.src @@ -1,24 +1,24 @@ - .ref __frameset0 - .ref __lcmpzero - .ref __setflag - .ref __lneg - .def _labs - .assume adl=1 - -; long labs(long j); - -_labs: - call __frameset0 - ld hl,(ix+6) - ld e,(ix+9) - push hl - push de - call __lcmpzero - call __setflag - pop de - pop hl - jp p,l_1 - call __lneg -l_1: ld sp,ix - pop ix - ret + .ref __frameset0 + .ref __lcmpzero + .ref __setflag + .ref __lneg + .def _labs + .assume adl=1 + +; long labs(long j); + +_labs: + call __frameset0 + ld hl,(ix+6) + ld e,(ix+9) + push hl + push de + call __lcmpzero + call __setflag + pop de + pop hl + jp p,l_1 + call __lneg +l_1: ld sp,ix + pop ix + ret diff --git a/frontends/calculator/CEdev/lib/shared/ladd.src b/frontends/calculator/CEdev/lib/shared/ladd.src index c678a1e..39b16e9 100644 --- a/frontends/calculator/CEdev/lib/shared/ladd.src +++ b/frontends/calculator/CEdev/lib/shared/ladd.src @@ -1,20 +1,20 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Long ADD. -; Input: -; Operand1: -; ehl : 32 bit -; -; Operand2: -; abc : 32 bit -; -; Output: -; Result: ehl : 32 bit -; Registers Used: - -;------------------------------------------------------------------------- - .def __ladd, __ladd_b - .assume adl=1 - -__ladd_b equ 0001A0h -__ladd equ 00019Ch +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Long ADD. +; Input: +; Operand1: +; ehl : 32 bit +; +; Operand2: +; abc : 32 bit +; +; Output: +; Result: ehl : 32 bit +; Registers Used: + +;------------------------------------------------------------------------- + .def __ladd, __ladd_b + .assume adl=1 + +__ladd_b equ 0001A0h +__ladd equ 00019Ch diff --git a/frontends/calculator/CEdev/lib/shared/land.src b/frontends/calculator/CEdev/lib/shared/land.src index 6db554a..ae0460c 100644 --- a/frontends/calculator/CEdev/lib/shared/land.src +++ b/frontends/calculator/CEdev/lib/shared/land.src @@ -1,19 +1,19 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Long AND. -; Input: -; Operand1: -; ehl : 32 bit -; -; Operand2: -; abc : 32 bit -; -; Output: -; Result: ehl : 32 bit -; Registers Used: - -;------------------------------------------------------------------------- - .def __land - .assume adl=1 - -__land equ 0001A4h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Long AND. +; Input: +; Operand1: +; ehl : 32 bit +; +; Operand2: +; abc : 32 bit +; +; Output: +; Result: ehl : 32 bit +; Registers Used: + +;------------------------------------------------------------------------- + .def __land + .assume adl=1 + +__land equ 0001A4h diff --git a/frontends/calculator/CEdev/lib/shared/lcmps.src b/frontends/calculator/CEdev/lib/shared/lcmps.src index 495cadd..aaf3163 100644 --- a/frontends/calculator/CEdev/lib/shared/lcmps.src +++ b/frontends/calculator/CEdev/lib/shared/lcmps.src @@ -1,19 +1,19 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Long Comparison -; Input: -; Operand1: -; EHL : 32 bits -; -; Operand2: -; ABC : 32 bits -; -; Output: -; Result: F : S,V flags from EHL - ABC -; Registers Used: -; None -;------------------------------------------------------------------------- - .def __lcmps - .assume adl=1 - -__lcmps equ 0001A8h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Long Comparison +; Input: +; Operand1: +; EHL : 32 bits +; +; Operand2: +; ABC : 32 bits +; +; Output: +; Result: F : S,V flags from EHL - ABC +; Registers Used: +; None +;------------------------------------------------------------------------- + .def __lcmps + .assume adl=1 + +__lcmps equ 0001A8h diff --git a/frontends/calculator/CEdev/lib/shared/lcmpu.src b/frontends/calculator/CEdev/lib/shared/lcmpu.src index 5d7db79..deda9dc 100644 --- a/frontends/calculator/CEdev/lib/shared/lcmpu.src +++ b/frontends/calculator/CEdev/lib/shared/lcmpu.src @@ -1,19 +1,19 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Long Unsigned Comparison -; Input: -; Operand1: -; EHL : 32 bits -; -; Operand2: -; ABC : 32 bits -; -; Output: -; Result: F : S,V flags from EHL - ABC -; Registers Used: -; None -;------------------------------------------------------------------------- - .def __lcmpu - .assume adl=1 - -__lcmpu equ 0001ACh +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Long Unsigned Comparison +; Input: +; Operand1: +; EHL : 32 bits +; +; Operand2: +; ABC : 32 bits +; +; Output: +; Result: F : S,V flags from EHL - ABC +; Registers Used: +; None +;------------------------------------------------------------------------- + .def __lcmpu + .assume adl=1 + +__lcmpu equ 0001ACh diff --git a/frontends/calculator/CEdev/lib/shared/lcmpzero.src b/frontends/calculator/CEdev/lib/shared/lcmpzero.src index 518c58a..e9c19f3 100644 --- a/frontends/calculator/CEdev/lib/shared/lcmpzero.src +++ b/frontends/calculator/CEdev/lib/shared/lcmpzero.src @@ -1,16 +1,16 @@ -; (c) Copyright 2007-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Set flag for comparison of 32-bit scalar with constant value zero -; Input: -; Operand1: E:HL register -; -; Output: -; Result: f register -; -; Registers Used: -; None -;------------------------------------------------------------------------- - .def __lcmpzero - .assume adl=1 - -__lcmpzero equ 0001B0h +; (c) Copyright 2007-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Set flag for comparison of 32-bit scalar with constant value zero +; Input: +; Operand1: E:HL register +; +; Output: +; Result: f register +; +; Registers Used: +; None +;------------------------------------------------------------------------- + .def __lcmpzero + .assume adl=1 + +__lcmpzero equ 0001B0h diff --git a/frontends/calculator/CEdev/lib/shared/ldiv.src b/frontends/calculator/CEdev/lib/shared/ldiv.src index 8da316b..7f41e0c 100644 --- a/frontends/calculator/CEdev/lib/shared/ldiv.src +++ b/frontends/calculator/CEdev/lib/shared/ldiv.src @@ -1,79 +1,79 @@ -; Copyright (C) 1999-2008 Zilog, Inc, All Rights Reserved -;------------------------------------------------------------------------- -; ldiv function -; -; ldiv_t ldiv(long numer, long denom); -; -;------------------------------------------------------------------------- - .def _ldiv - .ref __ldivs - .ref __lrems - .assume adl=1 - -_ldiv: - - push bc - push af - push de - push hl - - ld hl,27 - add hl,sp - ld a,(hl) - dec hl - dec hl - dec hl - ld bc,(hl) ; aBC : denominator - dec hl - dec hl - dec hl - ld e,(hl) - dec hl - dec hl - dec hl - ld hl,(hl) ; eHL: Numerator - call __ldivs - push de - push hl ; eHL : quotient - - ld hl,27 - add hl,sp - ld e,(hl) - dec hl - dec hl - dec hl - ld hl,(hl) - call __lrems - ld a,e - ex de,hl ;aDE :remainder - - ld hl,21 - add hl,sp - ld hl,(hl) - push hl - - ld bc, 7 - add hl, bc - ld (hl),a - dec hl - dec hl - dec hl - ld (hl),de ; aDE : remainder - - pop hl - pop bc - ld (hl),bc ; bc : 3 LSB of quotient - pop bc - push hl - inc hl - inc hl - inc hl - ld (hl),c ; c : MSB of quotient - pop hl - - pop de - pop de - pop af - pop bc - - ret +; Copyright (C) 1999-2008 Zilog, Inc, All Rights Reserved +;------------------------------------------------------------------------- +; ldiv function +; +; ldiv_t ldiv(long numer, long denom); +; +;------------------------------------------------------------------------- + .def _ldiv + .ref __ldivs + .ref __lrems + .assume adl=1 + +_ldiv: + + push bc + push af + push de + push hl + + ld hl,27 + add hl,sp + ld a,(hl) + dec hl + dec hl + dec hl + ld bc,(hl) ; aBC : denominator + dec hl + dec hl + dec hl + ld e,(hl) + dec hl + dec hl + dec hl + ld hl,(hl) ; eHL: Numerator + call __ldivs + push de + push hl ; eHL : quotient + + ld hl,27 + add hl,sp + ld e,(hl) + dec hl + dec hl + dec hl + ld hl,(hl) + call __lrems + ld a,e + ex de,hl ;aDE :remainder + + ld hl,21 + add hl,sp + ld hl,(hl) + push hl + + ld bc, 7 + add hl, bc + ld (hl),a + dec hl + dec hl + dec hl + ld (hl),de ; aDE : remainder + + pop hl + pop bc + ld (hl),bc ; bc : 3 LSB of quotient + pop bc + push hl + inc hl + inc hl + inc hl + ld (hl),c ; c : MSB of quotient + pop hl + + pop de + pop de + pop af + pop bc + + ret diff --git a/frontends/calculator/CEdev/lib/shared/ldivs.src b/frontends/calculator/CEdev/lib/shared/ldivs.src index 950209e..bc5779c 100644 --- a/frontends/calculator/CEdev/lib/shared/ldivs.src +++ b/frontends/calculator/CEdev/lib/shared/ldivs.src @@ -1,19 +1,19 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Long Division Signed -; Input: -; Operand1: -; eHL : 32 bits -; -; Operand2: -; aBC : 32 bits -; Output: -; Result: eHL : 24 bits -; -; Registers Used: -; -;------------------------------------------------------------------------- - .def __ldivs - .assume adl=1 - -__ldivs equ 0001B4h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Long Division Signed +; Input: +; Operand1: +; eHL : 32 bits +; +; Operand2: +; aBC : 32 bits +; Output: +; Result: eHL : 24 bits +; +; Registers Used: +; +;------------------------------------------------------------------------- + .def __ldivs + .assume adl=1 + +__ldivs equ 0001B4h diff --git a/frontends/calculator/CEdev/lib/shared/ldivu.src b/frontends/calculator/CEdev/lib/shared/ldivu.src index c570423..32f7c83 100644 --- a/frontends/calculator/CEdev/lib/shared/ldivu.src +++ b/frontends/calculator/CEdev/lib/shared/ldivu.src @@ -1,20 +1,20 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Long Division Unsigned -; Input: -; Operand1: -; EuHL : 32 bits -; -; Operand2: -; AuBC : 32 bits -; Output: -; Result: EuHL : 32 bits -; -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __ldivu, __ldvrmu - .assume adl=1 - -__ldivu equ 0001B8h -__ldvrmu equ 0001BCh +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Long Division Unsigned +; Input: +; Operand1: +; EuHL : 32 bits +; +; Operand2: +; AuBC : 32 bits +; Output: +; Result: EuHL : 32 bits +; +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __ldivu, __ldvrmu + .assume adl=1 + +__ldivu equ 0001B8h +__ldvrmu equ 0001BCh diff --git a/frontends/calculator/CEdev/lib/shared/lldix.src b/frontends/calculator/CEdev/lib/shared/lldix.src index 379c4e7..9697040 100644 --- a/frontends/calculator/CEdev/lib/shared/lldix.src +++ b/frontends/calculator/CEdev/lib/shared/lldix.src @@ -1,17 +1,17 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; long load e:hl,(ix+nnnnnn) -; Input: -; Operand1: -; BC : 24-bit offset from ix -; -; Output: -; Result: E:HL : 32 bit -; -; Registers Used: -; -;------------------------------------------------------------------------- - .def __lldix - .assume adl=1 - -__lldix equ 0001C0h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; long load e:hl,(ix+nnnnnn) +; Input: +; Operand1: +; BC : 24-bit offset from ix +; +; Output: +; Result: E:HL : 32 bit +; +; Registers Used: +; +;------------------------------------------------------------------------- + .def __lldix + .assume adl=1 + +__lldix equ 0001C0h diff --git a/frontends/calculator/CEdev/lib/shared/lldiy.src b/frontends/calculator/CEdev/lib/shared/lldiy.src index 8e308fd..8cec260 100644 --- a/frontends/calculator/CEdev/lib/shared/lldiy.src +++ b/frontends/calculator/CEdev/lib/shared/lldiy.src @@ -1,17 +1,17 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; long load e:hl,(iy+nnnnnn) -; Input: -; Operand1: -; BC : 24-bit offset from iy -; -; Output: -; Result: E:HL : 32 bit -; -; Registers Used: -; -;------------------------------------------------------------------------- - .def __lldiy - .assume adl=1 - -__lldiy equ 0001C4h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; long load e:hl,(iy+nnnnnn) +; Input: +; Operand1: +; BC : 24-bit offset from iy +; +; Output: +; Result: E:HL : 32 bit +; +; Registers Used: +; +;------------------------------------------------------------------------- + .def __lldiy + .assume adl=1 + +__lldiy equ 0001C4h diff --git a/frontends/calculator/CEdev/lib/shared/lmuls.src b/frontends/calculator/CEdev/lib/shared/lmuls.src index 8f75c0b..3629808 100644 --- a/frontends/calculator/CEdev/lib/shared/lmuls.src +++ b/frontends/calculator/CEdev/lib/shared/lmuls.src @@ -1,19 +1,19 @@ -; (c) Copyright 1999-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Long Multiplication Signed. -; Input: -; Operand1: -; ABC : 32 bits -; -; Operand2: -; EHL : 32 bits -; -; Output: -; Result: ABC : 32 bit -; Registers Used: -; de,af -;------------------------------------------------------------------------- - .def __lmuls - .assume adl=1 - -__lmuls equ 0001C8h +; (c) Copyright 1999-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Long Multiplication Signed. +; Input: +; Operand1: +; ABC : 32 bits +; +; Operand2: +; EHL : 32 bits +; +; Output: +; Result: ABC : 32 bit +; Registers Used: +; de,af +;------------------------------------------------------------------------- + .def __lmuls + .assume adl=1 + +__lmuls equ 0001C8h diff --git a/frontends/calculator/CEdev/lib/shared/lmulu.src b/frontends/calculator/CEdev/lib/shared/lmulu.src index f84fe24..87bc9d7 100644 --- a/frontends/calculator/CEdev/lib/shared/lmulu.src +++ b/frontends/calculator/CEdev/lib/shared/lmulu.src @@ -1,22 +1,22 @@ -; (c) Copyright 1999-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Long Multiplication Signed/Unsigned. -; Note: When multipying two n-bit values, the low-order n-bits -; of the product are the same, whether or not the values -; are considered signed or unsigned. -; Input: -; Operand1: -; EuHL : 32 bits -; -; Operand2: -; AuBC : 32 bits -; -; Output: -; Result: EuHL : 32 bit -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __lmulu - .assume adl=1 - -__lmulu equ 0001CCh +; (c) Copyright 1999-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Long Multiplication Signed/Unsigned. +; Note: When multipying two n-bit values, the low-order n-bits +; of the product are the same, whether or not the values +; are considered signed or unsigned. +; Input: +; Operand1: +; EuHL : 32 bits +; +; Operand2: +; AuBC : 32 bits +; +; Output: +; Result: EuHL : 32 bit +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __lmulu + .assume adl=1 + +__lmulu equ 0001CCh diff --git a/frontends/calculator/CEdev/lib/shared/lneg.src b/frontends/calculator/CEdev/lib/shared/lneg.src index 3e8b407..ab44f20 100644 --- a/frontends/calculator/CEdev/lib/shared/lneg.src +++ b/frontends/calculator/CEdev/lib/shared/lneg.src @@ -1,16 +1,16 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Long NEG. -; Input: -; Operand1: -; EuHL : 32 bit -; -; Output: -; Result: EuHL : 32 bit -; Registers Used: -; flags -;------------------------------------------------------------------------- - .def __lneg - .assume adl=1 - -__lneg equ 0001D0h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Long NEG. +; Input: +; Operand1: +; EuHL : 32 bit +; +; Output: +; Result: EuHL : 32 bit +; Registers Used: +; flags +;------------------------------------------------------------------------- + .def __lneg + .assume adl=1 + +__lneg equ 0001D0h diff --git a/frontends/calculator/CEdev/lib/shared/lnot.src b/frontends/calculator/CEdev/lib/shared/lnot.src index 774b304..083a572 100644 --- a/frontends/calculator/CEdev/lib/shared/lnot.src +++ b/frontends/calculator/CEdev/lib/shared/lnot.src @@ -1,16 +1,16 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Long NOT. -; Input: -; Operand1: -; eHL : 32 bit -; -; Output: -; Result: eHL : 32 bit -; Registers Used: -; None -;------------------------------------------------------------------------- - .def __lnot - .assume adl=1 - -__lnot equ 0001D4h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Long NOT. +; Input: +; Operand1: +; eHL : 32 bit +; +; Output: +; Result: eHL : 32 bit +; Registers Used: +; None +;------------------------------------------------------------------------- + .def __lnot + .assume adl=1 + +__lnot equ 0001D4h diff --git a/frontends/calculator/CEdev/lib/shared/log2.src b/frontends/calculator/CEdev/lib/shared/log2.src index 5630503..028886f 100644 --- a/frontends/calculator/CEdev/lib/shared/log2.src +++ b/frontends/calculator/CEdev/lib/shared/log2.src @@ -1,27 +1,27 @@ - .def _log2 - .ref _log - .ref __fdiv - .ref __frameset0 - .assume adl=1 - -_log2: - call __frameset0 - ld c,(ix+9) - ld b,0 - push bc - ld bc,(ix+6) - push bc - call _log - push hl - pop bc - ld a,e - ld hl,3240472 - ld e,63 - call __fdiv - ld e,a - push bc - pop hl - ld sp,ix - pop ix - ret - + .def _log2 + .ref _log + .ref __fdiv + .ref __frameset0 + .assume adl=1 + +_log2: + call __frameset0 + ld c,(ix+9) + ld b,0 + push bc + ld bc,(ix+6) + push bc + call _log + push hl + pop bc + ld a,e + ld hl,3240472 + ld e,63 + call __fdiv + ld e,a + push bc + pop hl + ld sp,ix + pop ix + ret + diff --git a/frontends/calculator/CEdev/lib/shared/longjmp.src b/frontends/calculator/CEdev/lib/shared/longjmp.src index 0399ff0..54baa77 100644 --- a/frontends/calculator/CEdev/lib/shared/longjmp.src +++ b/frontends/calculator/CEdev/lib/shared/longjmp.src @@ -1,4 +1,4 @@ - .def _longjmp - .assume adl=1 - + .def _longjmp + .assume adl=1 + _longjmp equ 000098h \ No newline at end of file diff --git a/frontends/calculator/CEdev/lib/shared/lor.src b/frontends/calculator/CEdev/lib/shared/lor.src index b9a3c95..91fef65 100644 --- a/frontends/calculator/CEdev/lib/shared/lor.src +++ b/frontends/calculator/CEdev/lib/shared/lor.src @@ -1,19 +1,19 @@ -; (c) Copyright 1999-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Long OR. -; Input: -; Operand1: -; ehl : 32 bit -; -; Operand2: -; abc : 32 bit -; -; Output: -; Result: ehl : 32 bit -; Registers Used: -; -;------------------------------------------------------------------------- - .def __lor - .assume adl=1 - -__lor equ 0001D8h +; (c) Copyright 1999-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Long OR. +; Input: +; Operand1: +; ehl : 32 bit +; +; Operand2: +; abc : 32 bit +; +; Output: +; Result: ehl : 32 bit +; Registers Used: +; +;------------------------------------------------------------------------- + .def __lor + .assume adl=1 + +__lor equ 0001D8h diff --git a/frontends/calculator/CEdev/lib/shared/lrems.src b/frontends/calculator/CEdev/lib/shared/lrems.src index 958404b..8e1d9bc 100644 --- a/frontends/calculator/CEdev/lib/shared/lrems.src +++ b/frontends/calculator/CEdev/lib/shared/lrems.src @@ -1,19 +1,19 @@ -; (c) Copyright 1999-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Long Modulus Signed. -; Input: -; Operand1: -; EHL : 32 bits (dividend) -; -; Operand2: -; ABC : 32 bits (divisor) -; -; Output: -; Result: EHL : 32 bit -; Registers Used: -; de,af -;------------------------------------------------------------------------- - .def __lrems - .assume adl=1 - -__lrems equ 0001DCh +; (c) Copyright 1999-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Long Modulus Signed. +; Input: +; Operand1: +; EHL : 32 bits (dividend) +; +; Operand2: +; ABC : 32 bits (divisor) +; +; Output: +; Result: EHL : 32 bit +; Registers Used: +; de,af +;------------------------------------------------------------------------- + .def __lrems + .assume adl=1 + +__lrems equ 0001DCh diff --git a/frontends/calculator/CEdev/lib/shared/lremu.src b/frontends/calculator/CEdev/lib/shared/lremu.src index 6ed28b1..9b00573 100644 --- a/frontends/calculator/CEdev/lib/shared/lremu.src +++ b/frontends/calculator/CEdev/lib/shared/lremu.src @@ -1,19 +1,19 @@ -; (c) Copyright 1999-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Long Modulus Unsigned. -; Input: -; Operand1: -; EuHL : 32 bits (dividend x) -; -; Operand2: -; AuBC : 32 bits (divisor y) -; -; Output: -; Result: EuHL : 32 bit -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __lremu - .assume adl=1 - -__lremu equ 0001E0h +; (c) Copyright 1999-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Long Modulus Unsigned. +; Input: +; Operand1: +; EuHL : 32 bits (dividend x) +; +; Operand2: +; AuBC : 32 bits (divisor y) +; +; Output: +; Result: EuHL : 32 bit +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __lremu + .assume adl=1 + +__lremu equ 0001E0h diff --git a/frontends/calculator/CEdev/lib/shared/lshl.src b/frontends/calculator/CEdev/lib/shared/lshl.src index 3038a0d..c49c3d9 100644 --- a/frontends/calculator/CEdev/lib/shared/lshl.src +++ b/frontends/calculator/CEdev/lib/shared/lshl.src @@ -1,19 +1,19 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Long Shift Left -; Input: -; Operand1: -; AuBC : 32 bit value to be shifted -; -; Operand2: -; L : number of bits to shift -; -; Output: -; Result: AuBC : 32 bit result -; Registers Used: -; flags -;------------------------------------------------------------------------- - .def __lshl - .assume adl=1 - -__lshl equ 0001E4h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Long Shift Left +; Input: +; Operand1: +; AuBC : 32 bit value to be shifted +; +; Operand2: +; L : number of bits to shift +; +; Output: +; Result: AuBC : 32 bit result +; Registers Used: +; flags +;------------------------------------------------------------------------- + .def __lshl + .assume adl=1 + +__lshl equ 0001E4h diff --git a/frontends/calculator/CEdev/lib/shared/lshrs.src b/frontends/calculator/CEdev/lib/shared/lshrs.src index a8a35d1..08bb693 100644 --- a/frontends/calculator/CEdev/lib/shared/lshrs.src +++ b/frontends/calculator/CEdev/lib/shared/lshrs.src @@ -1,19 +1,19 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Long Shift Right Signed -; Input: -; Operand1: -; AuBC : 32 bit value to be shifted by L -; -; Operand2: -; L : number of bits to shift -; -; Output: -; Result: AuBC : 32 bit -; Registers Used: -; flags -;------------------------------------------------------------------------- - .def __lshrs - .assume adl=1 - -__lshrs equ 0001E8h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Long Shift Right Signed +; Input: +; Operand1: +; AuBC : 32 bit value to be shifted by L +; +; Operand2: +; L : number of bits to shift +; +; Output: +; Result: AuBC : 32 bit +; Registers Used: +; flags +;------------------------------------------------------------------------- + .def __lshrs + .assume adl=1 + +__lshrs equ 0001E8h diff --git a/frontends/calculator/CEdev/lib/shared/lshru.src b/frontends/calculator/CEdev/lib/shared/lshru.src index 5334d7f..2734ecf 100644 --- a/frontends/calculator/CEdev/lib/shared/lshru.src +++ b/frontends/calculator/CEdev/lib/shared/lshru.src @@ -1,19 +1,19 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Long Shift Right Unsigned -; Input: -; Operand1: -; AuBC : 32 bit value to be shifted by L -; -; Operand2: -; L : number of bits to shift -; -; Output: -; Result: AuBC : 32 bit -; Registers Used: -; flags -;------------------------------------------------------------------------- - .def __lshru - .assume adl=1 - -__lshru equ 0001ECh +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Long Shift Right Unsigned +; Input: +; Operand1: +; AuBC : 32 bit value to be shifted by L +; +; Operand2: +; L : number of bits to shift +; +; Output: +; Result: AuBC : 32 bit +; Registers Used: +; flags +;------------------------------------------------------------------------- + .def __lshru + .assume adl=1 + +__lshru equ 0001ECh diff --git a/frontends/calculator/CEdev/lib/shared/lstix.src b/frontends/calculator/CEdev/lib/shared/lstix.src index 22c014e..749d3ff 100644 --- a/frontends/calculator/CEdev/lib/shared/lstix.src +++ b/frontends/calculator/CEdev/lib/shared/lstix.src @@ -1,17 +1,17 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; long store (ix+nnnnnn),H:HL -; Input: -; Operand1: -; BC : 24-bit offset from ix -; E:HL : 32-bit value -; -; Output: -; -; Registers Used: -; -;------------------------------------------------------------------------- - .def __lstix - .assume adl=1 - -__lstix equ 0001F0h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; long store (ix+nnnnnn),H:HL +; Input: +; Operand1: +; BC : 24-bit offset from ix +; E:HL : 32-bit value +; +; Output: +; +; Registers Used: +; +;------------------------------------------------------------------------- + .def __lstix + .assume adl=1 + +__lstix equ 0001F0h diff --git a/frontends/calculator/CEdev/lib/shared/lstiy.src b/frontends/calculator/CEdev/lib/shared/lstiy.src index e141502..4da53a6 100644 --- a/frontends/calculator/CEdev/lib/shared/lstiy.src +++ b/frontends/calculator/CEdev/lib/shared/lstiy.src @@ -1,17 +1,17 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; long store (iy+nnnnnn),E:HL -; Input: -; Operand1: -; BC : 24-bit offset from iy -; E:HL : 32-bit value -; -; Output: -; -; Registers Used: -; -;------------------------------------------------------------------------- - .def __lstiy - .assume adl=1 - -__lstiy equ 0001F4h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; long store (iy+nnnnnn),E:HL +; Input: +; Operand1: +; BC : 24-bit offset from iy +; E:HL : 32-bit value +; +; Output: +; +; Registers Used: +; +;------------------------------------------------------------------------- + .def __lstiy + .assume adl=1 + +__lstiy equ 0001F4h diff --git a/frontends/calculator/CEdev/lib/shared/lsub.src b/frontends/calculator/CEdev/lib/shared/lsub.src index ef51463..1cccbd4 100644 --- a/frontends/calculator/CEdev/lib/shared/lsub.src +++ b/frontends/calculator/CEdev/lib/shared/lsub.src @@ -1,19 +1,19 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Long Subtract Op1 - Op2 -; Input: -; Operand1: -; EHL : 32 bits -; -; Operand2: -; ABC : 32 bits -; -; Output: -; Result: EHL : 32 bits -; Registers Used: -; flags -;------------------------------------------------------------------------- - .def __lsub - .assume adl=1 - -__lsub equ 0001F8h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Long Subtract Op1 - Op2 +; Input: +; Operand1: +; EHL : 32 bits +; +; Operand2: +; ABC : 32 bits +; +; Output: +; Result: EHL : 32 bits +; Registers Used: +; flags +;------------------------------------------------------------------------- + .def __lsub + .assume adl=1 + +__lsub equ 0001F8h diff --git a/frontends/calculator/CEdev/lib/shared/lxor.src b/frontends/calculator/CEdev/lib/shared/lxor.src index c14d3cc..b8753d1 100644 --- a/frontends/calculator/CEdev/lib/shared/lxor.src +++ b/frontends/calculator/CEdev/lib/shared/lxor.src @@ -1,19 +1,19 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Long XOR. -; Input: -; Operand1: -; ehl : 32 bit -; -; Operand2: -; abc : 32 bit -; -; Output: -; Result: ehl : 32 bit -; Registers Used: -; -;------------------------------------------------------------------------- - .def __lxor - .assume adl=1 - -__lxor equ 0001FCh +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Long XOR. +; Input: +; Operand1: +; ehl : 32 bit +; +; Operand2: +; abc : 32 bit +; +; Output: +; Result: ehl : 32 bit +; Registers Used: +; +;------------------------------------------------------------------------- + .def __lxor + .assume adl=1 + +__lxor equ 0001FCh diff --git a/frontends/calculator/CEdev/lib/shared/memchr.src b/frontends/calculator/CEdev/lib/shared/memchr.src index 1dec0c8..cc1646c 100644 --- a/frontends/calculator/CEdev/lib/shared/memchr.src +++ b/frontends/calculator/CEdev/lib/shared/memchr.src @@ -1,6 +1,6 @@ - .def _memchr - .assume adl=1 - -; void *memchr(const void *buf, int c, size_t count); - -_memchr equ 00009Ch + .def _memchr + .assume adl=1 + +; void *memchr(const void *buf, int c, size_t count); + +_memchr equ 00009Ch diff --git a/frontends/calculator/CEdev/lib/shared/memcmp.src b/frontends/calculator/CEdev/lib/shared/memcmp.src index 4658030..72477a6 100644 --- a/frontends/calculator/CEdev/lib/shared/memcmp.src +++ b/frontends/calculator/CEdev/lib/shared/memcmp.src @@ -1,6 +1,6 @@ - .def _memcmp - .assume adl=1 - -; int memcmp(const void *buf1, const void *buf2, size_t count); - -_memcmp equ 0000A0h + .def _memcmp + .assume adl=1 + +; int memcmp(const void *buf1, const void *buf2, size_t count); + +_memcmp equ 0000A0h diff --git a/frontends/calculator/CEdev/lib/shared/memcpy.src b/frontends/calculator/CEdev/lib/shared/memcpy.src index 9ecc289..3049840 100644 --- a/frontends/calculator/CEdev/lib/shared/memcpy.src +++ b/frontends/calculator/CEdev/lib/shared/memcpy.src @@ -1,6 +1,6 @@ - .def _memcpy - .assume adl=1 - -; void *memcpy( void *dest, const void *src, size_t count ); - -_memcpy equ 0000A4h + .def _memcpy + .assume adl=1 + +; void *memcpy( void *dest, const void *src, size_t count ); + +_memcpy equ 0000A4h diff --git a/frontends/calculator/CEdev/lib/shared/memmove.src b/frontends/calculator/CEdev/lib/shared/memmove.src index 4a219cd..31d3ce9 100644 --- a/frontends/calculator/CEdev/lib/shared/memmove.src +++ b/frontends/calculator/CEdev/lib/shared/memmove.src @@ -1,6 +1,6 @@ - .def _memmove - .assume adl=1 - -; void *memmove(void *dest, const void *src, size_t count); - -_memmove equ 0000A8h + .def _memmove + .assume adl=1 + +; void *memmove(void *dest, const void *src, size_t count); + +_memmove equ 0000A8h diff --git a/frontends/calculator/CEdev/lib/shared/memset.src b/frontends/calculator/CEdev/lib/shared/memset.src index 2ff1317..f64608c 100644 --- a/frontends/calculator/CEdev/lib/shared/memset.src +++ b/frontends/calculator/CEdev/lib/shared/memset.src @@ -1,26 +1,26 @@ - .def _memset - .assume adl=1 - -; void *memset(void *dest, int c, size_t count); - -_memset: - pop iy - pop hl - pop de - pop bc - push bc - push de - push hl - push iy - cpi - add hl,bc - ret c - dec hl - ld (hl),e - ret po - push hl - pop de - dec de - lddr - ret - + .def _memset + .assume adl=1 + +; void *memset(void *dest, int c, size_t count); + +_memset: + pop iy + pop hl + pop de + pop bc + push bc + push de + push hl + push iy + cpi + add hl,bc + ret c + dec hl + ld (hl),e + ret po + push hl + pop de + dec de + lddr + ret + diff --git a/frontends/calculator/CEdev/lib/shared/os.src b/frontends/calculator/CEdev/lib/shared/os.src index 23e0852..76fd462 100644 --- a/frontends/calculator/CEdev/lib/shared/os.src +++ b/frontends/calculator/CEdev/lib/shared/os.src @@ -1,14 +1,14 @@ -; --- -; call an os or bootcode routine -; --- - - .def __OS - .assume adl=1 - -__OS: - pop de - pop hl - push hl - push de - ld iy,13631616 - jp (hl) +; --- +; call an os or bootcode routine +; --- + + .def __OS + .assume adl=1 + +__OS: + pop de + pop hl + push hl + push de + ld iy,13631616 + jp (hl) diff --git a/frontends/calculator/CEdev/lib/shared/os_textbuffer.src b/frontends/calculator/CEdev/lib/shared/os_textbuffer.src index 0f3c106..f8462c7 100644 --- a/frontends/calculator/CEdev/lib/shared/os_textbuffer.src +++ b/frontends/calculator/CEdev/lib/shared/os_textbuffer.src @@ -1,22 +1,22 @@ -; --- -; enables / disables homescreen text buffering which can destroy bss / heap -; --- - - .def _os_DisableHomeTextBuffer - .def _os_EnableHomeTextBuffer - .assume adl=1 - -_os_DisableHomeTextBuffer: - ld iy,$d00080 - res 1,(iy + $0d) ; no text buffer - res 3,(iy + $4a) ; use first shadow buffer - set 5,(iy + $4c) ; only display - ret - -_os_EnableHomeTextBuffer: - ld iy,$d00080 - set 1,(iy + $0d) ; use text buffer - res 3,(iy + $4a) ; use first shadow buffer - res 5,(iy + $4c) ; use shadow buffer - ret - +; --- +; enables / disables homescreen text buffering which can destroy bss / heap +; --- + + .def _os_DisableHomeTextBuffer + .def _os_EnableHomeTextBuffer + .assume adl=1 + +_os_DisableHomeTextBuffer: + ld iy,$d00080 + res 1,(iy + $0d) ; no text buffer + res 3,(iy + $4a) ; use first shadow buffer + set 5,(iy + $4c) ; only display + ret + +_os_EnableHomeTextBuffer: + ld iy,$d00080 + set 1,(iy + $0d) ; use text buffer + res 3,(iy + $4a) ; use first shadow buffer + res 5,(iy + $4c) ; use shadow buffer + ret + diff --git a/frontends/calculator/CEdev/lib/shared/rand.src b/frontends/calculator/CEdev/lib/shared/rand.src index ea569cf..df14c3a 100644 --- a/frontends/calculator/CEdev/lib/shared/rand.src +++ b/frontends/calculator/CEdev/lib/shared/rand.src @@ -1,13 +1,13 @@ - .ref _random - .def _rand - .assume adl=1 - -; int rand(void); - -_rand: - call _random - ld de,8388608 - sbc hl,de - ret p - add hl,de - ret + .ref _random + .def _rand + .assume adl=1 + +; int rand(void); + +_rand: + call _random + ld de,8388608 + sbc hl,de + ret p + add hl,de + ret diff --git a/frontends/calculator/CEdev/lib/shared/random.src b/frontends/calculator/CEdev/lib/shared/random.src index ede9051..5381840 100644 --- a/frontends/calculator/CEdev/lib/shared/random.src +++ b/frontends/calculator/CEdev/lib/shared/random.src @@ -1,110 +1,110 @@ -; --- -; uint32_t random(void) -; --- - - .def _random - .def __state - .assume adl=1 - -; https://github.com/MersenneTwister-Lab/XSadd/blob/master/xsadd.h#L75 -; using shift parameters (19, 21, 8) instead of (15, 18, 11) - -; uint32_t xsadd(uint32_t state[static 4]) -; { -; uint32_t s0, s1, s2, t0, t1, t2, t3, z, result; -; t0 = state[0]; -; state[0] = state[1]; state[1] = state[2]; state[2] = state[3]; -; s0 = t0 << 19; -; t1 = t0 ^ s0; -; s1 = t1 >> 21; -; t2 = t1 ^ s1; -; z = state[3]; -; s2 = z << 8; -; t3 = t2 ^ s2; -; state[3] = t3; -; result = t3 + state[2]; -; return result; -; } - - segment data -__state: - dl 0d0e0f10h,090a0b0ch,05060708h,01020304h - - segment code -_random: -; Read state[0] and perform state shifting. - ld iy,__state ; iy = &state[0] - ld hl,(iy+0*4+0) ; hl = hl(state[0]) - push hl - ld hl,(iy+0*4+2) ; hl = eu(state[0]) - push hl - lea hl,iy+1*4 ; hl = &state[1] - lea de,iy+0*4 ; de = &state[0] - ld bc,3*4 - ldir ; state[0] = state[1] - ; state[1] = state[2] - ; state[2] = state[3] - pop bc - pop de ; bcde = state[0] == t0 -; -; s0 = t0 << 19 ==> s0h == 0 ==> t1h = t0h -; s0l == 0 ==> t1l = t0l -; -; s1 = t1 >> 21 ==> s1e == 0 ==> t2e = t1e -; s1u == 0 ==> t2u = t1u -; -; s2 = z << 8 ==> s2e == zu ==> t3e == t2e ^ s2e == t1e ^ s2e == t0e ^ s0e ^ s2e -; s2u == zh ==> t3u == t2u ^ s2u == t1u ^ s2u == t0u ^ s0u ^ s2u -; s2h == zl ==> t3h == t2h ^ s2h == t1h ^ s1h ^ s2h == t0h ^ s1h ^ s2h -; s2l == 0 ==> t3l == t2l == t1l ^ s1l == t0l ^ s1l -; -; Calculate s0. - ld h,d - ld l,e ; hl = t0hl == t0 << 16 - add hl,hl - add hl,hl - add hl,hl ; hl = t0 << 19 = s0eu - ; h = s0e - ; l = s0u -; Calculate t1e and t3e. - ld a,b ; a = t0e - xor a,h ; a = t0e ^ s0e == t1e - ld h,a ; h = t1e - xor a,(iy+3*4+2) ; a = t1e ^ zu == t2e ^ s2e == t3e - ld (iy+3*4+3),a ; e(state[3]) = t3e - ld b,a ; b = t3e -; Calculate t1u and t3u. - ld a,c ; a = t0u - xor a,l ; a = t0u ^ s0u == t1u - ld l,a ; l = t1u - ; hl = t1eu == t1 >> 16 - xor a,(iy+3*4+1) ; a = t1u ^ zh == t2u ^ s2u == t3u - ld (iy+3*4+2),a ; u(state[3]) = t3u -; Calculate s1. - xor a,a ; a = 0 - add.s hl,hl - adc a,a - add.s hl,hl - adc a,a - add.s hl,hl - adc a,a ; ahl = (t1 >> 16) << 3 - ; ah = ((t1 >> 16) << 3) >> 8 == t1 >> 21 == s1hl - ; a = s1h - ; h = s1l -; Calculate t3h. - xor a,d ; a = s1h ^ t0h === s1h ^ t1h == t2h - xor a,(iy+3*4+0) ; a = t2h ^ zl == t2h ^ s2h == t3h - ld (iy+3*4+1),a ; h(state[3]) = t3h -; Calculate t3l. - ld a,e ; a = t0l == t1l - xor a,h ; a = t1l ^ s1l == t2l == t3l - ld (iy+3*4+0),a ; l(state[3]) = t3l -; Calculate result. - ld hl,(iy+3*4) - ld a,b ; auhl = t3 - ld de,(iy+2*4) - ld c,(iy+2*4+3) ; cude = state[2] - add hl,de - adc a,c ; auhl = t3 + state[2] = result - ld e,a ; euhl = result - ret +; --- +; uint32_t random(void) +; --- + + .def _random + .def __state + .assume adl=1 + +; https://github.com/MersenneTwister-Lab/XSadd/blob/master/xsadd.h#L75 +; using shift parameters (19, 21, 8) instead of (15, 18, 11) + +; uint32_t xsadd(uint32_t state[static 4]) +; { +; uint32_t s0, s1, s2, t0, t1, t2, t3, z, result; +; t0 = state[0]; +; state[0] = state[1]; state[1] = state[2]; state[2] = state[3]; +; s0 = t0 << 19; +; t1 = t0 ^ s0; +; s1 = t1 >> 21; +; t2 = t1 ^ s1; +; z = state[3]; +; s2 = z << 8; +; t3 = t2 ^ s2; +; state[3] = t3; +; result = t3 + state[2]; +; return result; +; } + + segment data +__state: + dl 0d0e0f10h,090a0b0ch,05060708h,01020304h + + segment code +_random: +; Read state[0] and perform state shifting. + ld iy,__state ; iy = &state[0] + ld hl,(iy+0*4+0) ; hl = hl(state[0]) + push hl + ld hl,(iy+0*4+2) ; hl = eu(state[0]) + push hl + lea hl,iy+1*4 ; hl = &state[1] + lea de,iy+0*4 ; de = &state[0] + ld bc,3*4 + ldir ; state[0] = state[1] + ; state[1] = state[2] + ; state[2] = state[3] + pop bc + pop de ; bcde = state[0] == t0 +; +; s0 = t0 << 19 ==> s0h == 0 ==> t1h = t0h +; s0l == 0 ==> t1l = t0l +; +; s1 = t1 >> 21 ==> s1e == 0 ==> t2e = t1e +; s1u == 0 ==> t2u = t1u +; +; s2 = z << 8 ==> s2e == zu ==> t3e == t2e ^ s2e == t1e ^ s2e == t0e ^ s0e ^ s2e +; s2u == zh ==> t3u == t2u ^ s2u == t1u ^ s2u == t0u ^ s0u ^ s2u +; s2h == zl ==> t3h == t2h ^ s2h == t1h ^ s1h ^ s2h == t0h ^ s1h ^ s2h +; s2l == 0 ==> t3l == t2l == t1l ^ s1l == t0l ^ s1l +; +; Calculate s0. + ld h,d + ld l,e ; hl = t0hl == t0 << 16 + add hl,hl + add hl,hl + add hl,hl ; hl = t0 << 19 = s0eu + ; h = s0e + ; l = s0u +; Calculate t1e and t3e. + ld a,b ; a = t0e + xor a,h ; a = t0e ^ s0e == t1e + ld h,a ; h = t1e + xor a,(iy+3*4+2) ; a = t1e ^ zu == t2e ^ s2e == t3e + ld (iy+3*4+3),a ; e(state[3]) = t3e + ld b,a ; b = t3e +; Calculate t1u and t3u. + ld a,c ; a = t0u + xor a,l ; a = t0u ^ s0u == t1u + ld l,a ; l = t1u + ; hl = t1eu == t1 >> 16 + xor a,(iy+3*4+1) ; a = t1u ^ zh == t2u ^ s2u == t3u + ld (iy+3*4+2),a ; u(state[3]) = t3u +; Calculate s1. + xor a,a ; a = 0 + add.s hl,hl + adc a,a + add.s hl,hl + adc a,a + add.s hl,hl + adc a,a ; ahl = (t1 >> 16) << 3 + ; ah = ((t1 >> 16) << 3) >> 8 == t1 >> 21 == s1hl + ; a = s1h + ; h = s1l +; Calculate t3h. + xor a,d ; a = s1h ^ t0h === s1h ^ t1h == t2h + xor a,(iy+3*4+0) ; a = t2h ^ zl == t2h ^ s2h == t3h + ld (iy+3*4+1),a ; h(state[3]) = t3h +; Calculate t3l. + ld a,e ; a = t0l == t1l + xor a,h ; a = t1l ^ s1l == t2l == t3l + ld (iy+3*4+0),a ; l(state[3]) = t3l +; Calculate result. + ld hl,(iy+3*4) + ld a,b ; auhl = t3 + ld de,(iy+2*4) + ld c,(iy+2*4+3) ; cude = state[2] + add hl,de + adc a,c ; auhl = t3 + state[2] = result + ld e,a ; euhl = result + ret diff --git a/frontends/calculator/CEdev/lib/shared/removeallbreakpoints.src b/frontends/calculator/CEdev/lib/shared/removeallbreakpoints.src index ddae792..effb0d2 100644 --- a/frontends/calculator/CEdev/lib/shared/removeallbreakpoints.src +++ b/frontends/calculator/CEdev/lib/shared/removeallbreakpoints.src @@ -1,12 +1,12 @@ -; --- -; remove all breakpoints -; --- - - .def _dbg_RemoveAllBreakpoints - .assume adl=1 - -_dbg_RemoveAllBreakpoints: - scf - sbc hl,hl - ld (hl),9 - ret +; --- +; remove all breakpoints +; --- + + .def _dbg_RemoveAllBreakpoints + .assume adl=1 + +_dbg_RemoveAllBreakpoints: + scf + sbc hl,hl + ld (hl),9 + ret diff --git a/frontends/calculator/CEdev/lib/shared/removeallwatchpoints.src b/frontends/calculator/CEdev/lib/shared/removeallwatchpoints.src index 7171ba4..c5b86bb 100644 --- a/frontends/calculator/CEdev/lib/shared/removeallwatchpoints.src +++ b/frontends/calculator/CEdev/lib/shared/removeallwatchpoints.src @@ -1,12 +1,12 @@ -; --- -; remove all watchpoints -; --- - - .def _dbg_RemoveAllWatchpoints - .assume adl=1 - -_dbg_RemoveAllWatchpoints: - scf - sbc hl,hl - ld (hl),10 - ret +; --- +; remove all watchpoints +; --- + + .def _dbg_RemoveAllWatchpoints + .assume adl=1 + +_dbg_RemoveAllWatchpoints: + scf + sbc hl,hl + ld (hl),10 + ret diff --git a/frontends/calculator/CEdev/lib/shared/removebreakpoint.src b/frontends/calculator/CEdev/lib/shared/removebreakpoint.src index d2c4b9b..a7094da 100644 --- a/frontends/calculator/CEdev/lib/shared/removebreakpoint.src +++ b/frontends/calculator/CEdev/lib/shared/removebreakpoint.src @@ -1,16 +1,16 @@ -; --- -; remove breakpoint -; --- - - .def _dbg_RemoveBreakpoint - .assume adl=1 - -_dbg_RemoveBreakpoint: - pop hl - pop de - push de - push hl - scf - sbc hl,hl - ld (hl),4 - ret +; --- +; remove breakpoint +; --- + + .def _dbg_RemoveBreakpoint + .assume adl=1 + +_dbg_RemoveBreakpoint: + pop hl + pop de + push de + push hl + scf + sbc hl,hl + ld (hl),4 + ret diff --git a/frontends/calculator/CEdev/lib/shared/removewatchpoint.src b/frontends/calculator/CEdev/lib/shared/removewatchpoint.src index a096d15..eb39c92 100644 --- a/frontends/calculator/CEdev/lib/shared/removewatchpoint.src +++ b/frontends/calculator/CEdev/lib/shared/removewatchpoint.src @@ -1,16 +1,16 @@ -; --- -; remove watchpoint -; --- - - .def _dbg_RemoveWatchpoint - .assume adl=1 - -_dbg_RemoveWatchpoint: - pop hl - pop de - push de - push hl - scf - sbc hl,hl - ld (hl),8 - ret +; --- +; remove watchpoint +; --- + + .def _dbg_RemoveWatchpoint + .assume adl=1 + +_dbg_RemoveWatchpoint: + pop hl + pop de + push de + push hl + scf + sbc hl,hl + ld (hl),8 + ret diff --git a/frontends/calculator/CEdev/lib/shared/round.src b/frontends/calculator/CEdev/lib/shared/round.src index e78e237..99573e9 100644 --- a/frontends/calculator/CEdev/lib/shared/round.src +++ b/frontends/calculator/CEdev/lib/shared/round.src @@ -1,44 +1,44 @@ - .def _round - .ref __frameset0 - .ref __fcmp - .ref __fadd - .ref __fsub - .ref _floor - .ref _ceil - .assume adl=1 - -_round: - call __frameset0 - ld hl,(ix+6) - ld e,(ix+9) - ld bc,0 - xor a,a - call __fcmp - push af - or a,a - sbc hl,hl - ld e,63 - ld bc,(ix+6) - pop af - ld a,(ix+9) - jp m,IsLessZero - call __fadd - or a,a - sbc hl,hl - ld l,a - push bc - push hl - call _floor - jr Finish -IsLessZero: - call __fsub - or a,a - sbc hl,hl - ld l,a - push bc - push hl - call _ceil -Finish: - ld sp,ix - pop ix - ret + .def _round + .ref __frameset0 + .ref __fcmp + .ref __fadd + .ref __fsub + .ref _floor + .ref _ceil + .assume adl=1 + +_round: + call __frameset0 + ld hl,(ix+6) + ld e,(ix+9) + ld bc,0 + xor a,a + call __fcmp + push af + or a,a + sbc hl,hl + ld e,63 + ld bc,(ix+6) + pop af + ld a,(ix+9) + jp m,IsLessZero + call __fadd + or a,a + sbc hl,hl + ld l,a + push bc + push hl + call _floor + jr Finish +IsLessZero: + call __fsub + or a,a + sbc hl,hl + ld l,a + push bc + push hl + call _ceil +Finish: + ld sp,ix + pop ix + ret diff --git a/frontends/calculator/CEdev/lib/shared/sand.src b/frontends/calculator/CEdev/lib/shared/sand.src index a39e220..401ffc6 100644 --- a/frontends/calculator/CEdev/lib/shared/sand.src +++ b/frontends/calculator/CEdev/lib/shared/sand.src @@ -1,19 +1,19 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Short AND. -; Input: -; Operand1: -; hl : 16 bit -; -; Operand2: -; bc : 16 bit -; -; Output: -; Result: hl : 16 bit -; Registers Used: -; a -;------------------------------------------------------------------------- - .def __sand - .assume adl=1 - -__sand equ 000200h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Short AND. +; Input: +; Operand1: +; hl : 16 bit +; +; Operand2: +; bc : 16 bit +; +; Output: +; Result: hl : 16 bit +; Registers Used: +; a +;------------------------------------------------------------------------- + .def __sand + .assume adl=1 + +__sand equ 000200h diff --git a/frontends/calculator/CEdev/lib/shared/sbrk.src b/frontends/calculator/CEdev/lib/shared/sbrk.src index ab1cf1b..6410631 100644 --- a/frontends/calculator/CEdev/lib/shared/sbrk.src +++ b/frontends/calculator/CEdev/lib/shared/sbrk.src @@ -1,49 +1,49 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Heap allocation routine s_sbrk -; Input: -; argument : 24 bit - number of bytes requested -; -; Output: -; Result: HL: 24 bit address of memory allocated -; HL = 0 if no memory available - -; Registers Used: -; -;------------------------------------------------------------------------- - .assume adl=1 - .ref __heapbot - .ref __heaptop - .def __s_sbrk - - SEGMENT DATA -__sbrkbase: - .trio __heapbot - - SEGMENT CODE -__s_sbrk: - ld hl,3 - add hl,sp - ld hl,(hl) ;nbytes - ld de,(__sbrkbase) - add hl,de - jr c,_fail - - ; fail if hl >= sp. - ; hl is now, or will be, the next un-allocated address = minimal value - ; for sp that will not corrupt allocated data or that writing to - ; allocated data may corrupt the stack. - ; Actually, if hl is anywhere close to sp we're probably in trouble :( - - push hl - sbc hl,sp - pop hl - jr nc,_fail -_ok: - ex hl,de - ld (__sbrkbase),de - ret -_fail: - or a,a - sbc hl,hl - ret +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Heap allocation routine s_sbrk +; Input: +; argument : 24 bit - number of bytes requested +; +; Output: +; Result: HL: 24 bit address of memory allocated +; HL = 0 if no memory available + +; Registers Used: +; +;------------------------------------------------------------------------- + .assume adl=1 + .ref __heapbot + .ref __heaptop + .def __s_sbrk + + SEGMENT DATA +__sbrkbase: + .trio __heapbot + + SEGMENT CODE +__s_sbrk: + ld hl,3 + add hl,sp + ld hl,(hl) ;nbytes + ld de,(__sbrkbase) + add hl,de + jr c,_fail + + ; fail if hl >= sp. + ; hl is now, or will be, the next un-allocated address = minimal value + ; for sp that will not corrupt allocated data or that writing to + ; allocated data may corrupt the stack. + ; Actually, if hl is anywhere close to sp we're probably in trouble :( + + push hl + sbc hl,sp + pop hl + jr nc,_fail +_ok: + ex hl,de + ld (__sbrkbase),de + ret +_fail: + or a,a + sbc hl,hl + ret diff --git a/frontends/calculator/CEdev/lib/shared/scmpzero.src b/frontends/calculator/CEdev/lib/shared/scmpzero.src index 5c62a13..5b54941 100644 --- a/frontends/calculator/CEdev/lib/shared/scmpzero.src +++ b/frontends/calculator/CEdev/lib/shared/scmpzero.src @@ -1,16 +1,16 @@ -; (c) Copyright 2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Set flag for comparison of 16-bit scalar with constant value zero -; Input: -; Operand1: HL register -; -; Output: -; Result: f register -; -; Registers Used: -; None -;------------------------------------------------------------------------- - .def __scmpzero - .assume adl=1 - -__scmpzero equ 000204h +; (c) Copyright 2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Set flag for comparison of 16-bit scalar with constant value zero +; Input: +; Operand1: HL register +; +; Output: +; Result: f register +; +; Registers Used: +; None +;------------------------------------------------------------------------- + .def __scmpzero + .assume adl=1 + +__scmpzero equ 000204h diff --git a/frontends/calculator/CEdev/lib/shared/sdivs.src b/frontends/calculator/CEdev/lib/shared/sdivs.src index 75cda77..e91692c 100644 --- a/frontends/calculator/CEdev/lib/shared/sdivs.src +++ b/frontends/calculator/CEdev/lib/shared/sdivs.src @@ -1,20 +1,20 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Short Division Signed -; Input: -; Operand1: -; hl : 16 bits x -; -; Operand2: -; bc : 16 bits y -; -; Output: -; Result: hl : 16 bits -; -; Registers Used: -; -;------------------------------------------------------------------------- - .def __sdivs - .assume adl=1 - -__sdivs equ 000208h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Short Division Signed +; Input: +; Operand1: +; hl : 16 bits x +; +; Operand2: +; bc : 16 bits y +; +; Output: +; Result: hl : 16 bits +; +; Registers Used: +; +;------------------------------------------------------------------------- + .def __sdivs + .assume adl=1 + +__sdivs equ 000208h diff --git a/frontends/calculator/CEdev/lib/shared/sdivu.src b/frontends/calculator/CEdev/lib/shared/sdivu.src index 2002728..9cde056 100644 --- a/frontends/calculator/CEdev/lib/shared/sdivu.src +++ b/frontends/calculator/CEdev/lib/shared/sdivu.src @@ -1,21 +1,21 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Short Division Unsigned -; Input: -; Operand1: -; hl : 16 bits -; -; Operand2: -; bc : 16 bits -; -; Output: -; Result: hl : 16 bits -; -; Registers Used: -; -;------------------------------------------------------------------------- - .def __sdivu - .assume adl=1 - -__sdivu equ 00020Ch - +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Short Division Unsigned +; Input: +; Operand1: +; hl : 16 bits +; +; Operand2: +; bc : 16 bits +; +; Output: +; Result: hl : 16 bits +; +; Registers Used: +; +;------------------------------------------------------------------------- + .def __sdivu + .assume adl=1 + +__sdivu equ 00020Ch + diff --git a/frontends/calculator/CEdev/lib/shared/seqcase.src b/frontends/calculator/CEdev/lib/shared/seqcase.src index 5c4a084..fda01b3 100644 --- a/frontends/calculator/CEdev/lib/shared/seqcase.src +++ b/frontends/calculator/CEdev/lib/shared/seqcase.src @@ -1,25 +1,25 @@ -; (c) Copyright 2007-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; CASE branch resolution. -; -; Input: -; Operand3: -; hl : 24 bit value to match in table -; -; Output: -; Returns to case label -; Data at Return Address: -; DW numCases 0 -; DW24 startValue 2 -; DW24 Lab1 5 -; DW24 Lab2 8 -; ... -; DW24 defaultLab 5+3*numCases -; -; Registers Used: -; -;------------------------------------------------------------------------- - .def __seqcase - .assume adl=1 - +; (c) Copyright 2007-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; CASE branch resolution. +; +; Input: +; Operand3: +; hl : 24 bit value to match in table +; +; Output: +; Returns to case label +; Data at Return Address: +; DW numCases 0 +; DW24 startValue 2 +; DW24 Lab1 5 +; DW24 Lab2 8 +; ... +; DW24 defaultLab 5+3*numCases +; +; Registers Used: +; +;------------------------------------------------------------------------- + .def __seqcase + .assume adl=1 + __seqcase equ 000210h \ No newline at end of file diff --git a/frontends/calculator/CEdev/lib/shared/seqcased.src b/frontends/calculator/CEdev/lib/shared/seqcased.src index d6dcea1..7a40003 100644 --- a/frontends/calculator/CEdev/lib/shared/seqcased.src +++ b/frontends/calculator/CEdev/lib/shared/seqcased.src @@ -1,26 +1,26 @@ -; (c) Copyright 2007-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; CASE branch resolution. -; -; Input: -; Operand3: -; hl : 24 bit value to match in table -; -; Output: -; Result: hl : 24 bit address of case jp to take -; Registers Used: -; -; Data at Return Address: -; JP (HL) 0 -; DW numCases 1 -; DW24 startValue 3 -; DW24 Lab1 6 -; DW24 Lab2 9 -; ... -; DW24 defaultLab 6+3*numCases -; -;------------------------------------------------------------------------- - .def __seqcaseD - .assume adl=1 - -__seqcaseD equ 000214h +; (c) Copyright 2007-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; CASE branch resolution. +; +; Input: +; Operand3: +; hl : 24 bit value to match in table +; +; Output: +; Result: hl : 24 bit address of case jp to take +; Registers Used: +; +; Data at Return Address: +; JP (HL) 0 +; DW numCases 1 +; DW24 startValue 3 +; DW24 Lab1 6 +; DW24 Lab2 9 +; ... +; DW24 defaultLab 6+3*numCases +; +;------------------------------------------------------------------------- + .def __seqcaseD + .assume adl=1 + +__seqcaseD equ 000214h diff --git a/frontends/calculator/CEdev/lib/shared/setbreakpoint.src b/frontends/calculator/CEdev/lib/shared/setbreakpoint.src index 5a1e929..6fd03d5 100644 --- a/frontends/calculator/CEdev/lib/shared/setbreakpoint.src +++ b/frontends/calculator/CEdev/lib/shared/setbreakpoint.src @@ -1,16 +1,16 @@ -; --- -; set breakpoint -; --- - - .def _dbg_SetBreakpoint - .assume adl=1 - -_dbg_SetBreakpoint: - pop hl - pop de - push de - push hl - scf - sbc hl,hl - ld (hl),3 - ret +; --- +; set breakpoint +; --- + + .def _dbg_SetBreakpoint + .assume adl=1 + +_dbg_SetBreakpoint: + pop hl + pop de + push de + push hl + scf + sbc hl,hl + ld (hl),3 + ret diff --git a/frontends/calculator/CEdev/lib/shared/setflag.src b/frontends/calculator/CEdev/lib/shared/setflag.src index b710b95..928cfdd 100644 --- a/frontends/calculator/CEdev/lib/shared/setflag.src +++ b/frontends/calculator/CEdev/lib/shared/setflag.src @@ -1,22 +1,22 @@ -; (c) Copyright 2007-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Set Sign flag for signed comparison -; s <-- s xor v -; Input: -; Operand1: f register -; -; Output: -; Result: updated f register -; -; Registers Used: -; None -;------------------------------------------------------------------------- -; if ( V == 0) -; S = S xor 0 -> S = S -; if ( V != 0) -; S = S xor V -;------------------------------------------------------------------------- - .def __setflag - .assume adl=1 - -__setflag equ 000218h +; (c) Copyright 2007-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Set Sign flag for signed comparison +; s <-- s xor v +; Input: +; Operand1: f register +; +; Output: +; Result: updated f register +; +; Registers Used: +; None +;------------------------------------------------------------------------- +; if ( V == 0) +; S = S xor 0 -> S = S +; if ( V != 0) +; S = S xor V +;------------------------------------------------------------------------- + .def __setflag + .assume adl=1 + +__setflag equ 000218h diff --git a/frontends/calculator/CEdev/lib/shared/setjmp.src b/frontends/calculator/CEdev/lib/shared/setjmp.src index 9bc7c37..607a6eb 100644 --- a/frontends/calculator/CEdev/lib/shared/setjmp.src +++ b/frontends/calculator/CEdev/lib/shared/setjmp.src @@ -1,6 +1,6 @@ - .def _setjmp - .assume adl=1 - -; int setjmp(jmp_buf env); - -_setjmp equ 0000B8h + .def _setjmp + .assume adl=1 + +; int setjmp(jmp_buf env); + +_setjmp equ 0000B8h diff --git a/frontends/calculator/CEdev/lib/shared/setreadwatchpoint.src b/frontends/calculator/CEdev/lib/shared/setreadwatchpoint.src index 7ada983..c4c57aa 100644 --- a/frontends/calculator/CEdev/lib/shared/setreadwatchpoint.src +++ b/frontends/calculator/CEdev/lib/shared/setreadwatchpoint.src @@ -1,18 +1,18 @@ -; --- -; set read watchpoint -; --- - - .def _dbg_SetReadWatchpoint - .assume adl=1 - -_dbg_SetReadWatchpoint: - pop hl - pop de - pop bc - push bc - push de - push hl - scf - sbc hl,hl - ld (hl),5 - ret +; --- +; set read watchpoint +; --- + + .def _dbg_SetReadWatchpoint + .assume adl=1 + +_dbg_SetReadWatchpoint: + pop hl + pop de + pop bc + push bc + push de + push hl + scf + sbc hl,hl + ld (hl),5 + ret diff --git a/frontends/calculator/CEdev/lib/shared/setreadwritewatchpoint.src b/frontends/calculator/CEdev/lib/shared/setreadwritewatchpoint.src index f303929..ba7a44d 100644 --- a/frontends/calculator/CEdev/lib/shared/setreadwritewatchpoint.src +++ b/frontends/calculator/CEdev/lib/shared/setreadwritewatchpoint.src @@ -1,18 +1,18 @@ -; --- -; set write watchpoint -; --- - - .def _dbg_SetReadWriteWatchpoint - .assume adl=1 - -_dbg_SetReadWriteWatchpoint: - pop hl - pop de - pop bc - push bc - push de - push hl - scf - sbc hl,hl - ld (hl),7 - ret +; --- +; set write watchpoint +; --- + + .def _dbg_SetReadWriteWatchpoint + .assume adl=1 + +_dbg_SetReadWriteWatchpoint: + pop hl + pop de + pop bc + push bc + push de + push hl + scf + sbc hl,hl + ld (hl),7 + ret diff --git a/frontends/calculator/CEdev/lib/shared/setwatchpoint.src b/frontends/calculator/CEdev/lib/shared/setwatchpoint.src index bf148d4..a46bc74 100644 --- a/frontends/calculator/CEdev/lib/shared/setwatchpoint.src +++ b/frontends/calculator/CEdev/lib/shared/setwatchpoint.src @@ -1,18 +1,18 @@ -; --- -; set watchpoint -; --- - - .def _dbg_SetWatchpoint - .assume adl=1 - -_dbg_SetWatchpoint: - pop hl - pop de - pop bc - push bc - push de - push hl - scf - sbc hl,hl - ld (hl),11 - ret +; --- +; set watchpoint +; --- + + .def _dbg_SetWatchpoint + .assume adl=1 + +_dbg_SetWatchpoint: + pop hl + pop de + pop bc + push bc + push de + push hl + scf + sbc hl,hl + ld (hl),11 + ret diff --git a/frontends/calculator/CEdev/lib/shared/setwritewatchpoint.src b/frontends/calculator/CEdev/lib/shared/setwritewatchpoint.src index 62bb06f..42f8ef9 100644 --- a/frontends/calculator/CEdev/lib/shared/setwritewatchpoint.src +++ b/frontends/calculator/CEdev/lib/shared/setwritewatchpoint.src @@ -1,18 +1,18 @@ -; --- -; set write watchpoint -; --- - - .def _dbg_SetWriteWatchpoint - .assume adl=1 - -_dbg_SetWriteWatchpoint: - pop hl - pop de - pop bc - push bc - push de - push hl - scf - sbc hl,hl - ld (hl),6 - ret +; --- +; set write watchpoint +; --- + + .def _dbg_SetWriteWatchpoint + .assume adl=1 + +_dbg_SetWriteWatchpoint: + pop hl + pop de + pop bc + push bc + push de + push hl + scf + sbc hl,hl + ld (hl),6 + ret diff --git a/frontends/calculator/CEdev/lib/shared/sldix.src b/frontends/calculator/CEdev/lib/shared/sldix.src index 45c8006..9306541 100644 --- a/frontends/calculator/CEdev/lib/shared/sldix.src +++ b/frontends/calculator/CEdev/lib/shared/sldix.src @@ -1,17 +1,17 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; short load hl,(ix+nnnnnn) -; Input: -; Operand1: -; BC : 24-bit offset from ix -; -; Output: -; Result: hl : 16 bit -; -; Registers Used: -; -;------------------------------------------------------------------------- - .def __sldix - .assume adl=1 - -__sldix equ 00021Ch +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; short load hl,(ix+nnnnnn) +; Input: +; Operand1: +; BC : 24-bit offset from ix +; +; Output: +; Result: hl : 16 bit +; +; Registers Used: +; +;------------------------------------------------------------------------- + .def __sldix + .assume adl=1 + +__sldix equ 00021Ch diff --git a/frontends/calculator/CEdev/lib/shared/sldiy.src b/frontends/calculator/CEdev/lib/shared/sldiy.src index 2a820ce..a0e923e 100644 --- a/frontends/calculator/CEdev/lib/shared/sldiy.src +++ b/frontends/calculator/CEdev/lib/shared/sldiy.src @@ -1,18 +1,18 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; short load hl,(iy+nnnnnn) -; Input: -; Operand1: -; BC : 24-bit offset from iy -; -; Output: -; Result: hl : 16-bit -; -; Registers Used: -; -;------------------------------------------------------------------------- - .def __sldiy - .assume adl=1 - -__sldiy equ 000220h - +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; short load hl,(iy+nnnnnn) +; Input: +; Operand1: +; BC : 24-bit offset from iy +; +; Output: +; Result: hl : 16-bit +; +; Registers Used: +; +;------------------------------------------------------------------------- + .def __sldiy + .assume adl=1 + +__sldiy equ 000220h + diff --git a/frontends/calculator/CEdev/lib/shared/smuls.src b/frontends/calculator/CEdev/lib/shared/smuls.src index 4ac0260..f16bb98 100644 --- a/frontends/calculator/CEdev/lib/shared/smuls.src +++ b/frontends/calculator/CEdev/lib/shared/smuls.src @@ -1,21 +1,21 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Short Multiply Signed -; Input: -; Operand1: -; bc : 16 bits -; -; Operand2: -; hl : 16 bits -; -; Output: -; Result: hl : 16 bits -; -; Registers Used: -; -;------------------------------------------------------------------------- - .def __smuls - .assume adl=1 - -__smuls equ 000224h - +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Short Multiply Signed +; Input: +; Operand1: +; bc : 16 bits +; +; Operand2: +; hl : 16 bits +; +; Output: +; Result: hl : 16 bits +; +; Registers Used: +; +;------------------------------------------------------------------------- + .def __smuls + .assume adl=1 + +__smuls equ 000224h + diff --git a/frontends/calculator/CEdev/lib/shared/smulu.src b/frontends/calculator/CEdev/lib/shared/smulu.src index 4433a62..aace92f 100644 --- a/frontends/calculator/CEdev/lib/shared/smulu.src +++ b/frontends/calculator/CEdev/lib/shared/smulu.src @@ -1,21 +1,21 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Short Multiply Unsigned -; Input: -; Operand1: -; BC : 16 bits -; -; Operand2: -; HL : 16 bits -; -; Output: -; Result: HL : 16 bits -; -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __smulu - .assume adl=1 - -__smulu equ 000228h - +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Short Multiply Unsigned +; Input: +; Operand1: +; BC : 16 bits +; +; Operand2: +; HL : 16 bits +; +; Output: +; Result: HL : 16 bits +; +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __smulu + .assume adl=1 + +__smulu equ 000228h + diff --git a/frontends/calculator/CEdev/lib/shared/sneg.src b/frontends/calculator/CEdev/lib/shared/sneg.src index 4a3fb47..6222cf2 100644 --- a/frontends/calculator/CEdev/lib/shared/sneg.src +++ b/frontends/calculator/CEdev/lib/shared/sneg.src @@ -1,16 +1,16 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Short NEG. -; Input: -; Operand1: -; hl : 16 bit -; -; Output: -; Result: hl : 16 bit -; Registers Used: -; None -;------------------------------------------------------------------------- - .def __sneg - .assume adl=1 - +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Short NEG. +; Input: +; Operand1: +; hl : 16 bit +; +; Output: +; Result: hl : 16 bit +; Registers Used: +; None +;------------------------------------------------------------------------- + .def __sneg + .assume adl=1 + __sneg equ 00022Ch \ No newline at end of file diff --git a/frontends/calculator/CEdev/lib/shared/snot.src b/frontends/calculator/CEdev/lib/shared/snot.src index 307da76..9a9cb26 100644 --- a/frontends/calculator/CEdev/lib/shared/snot.src +++ b/frontends/calculator/CEdev/lib/shared/snot.src @@ -1,16 +1,16 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Short NOT. -; Input: -; Operand1: -; hl : 16 bit -; -; Output: -; Result: hl : 16 bit -; Registers Used: -; a -;------------------------------------------------------------------------- - .def __snot - .assume adl=1 - -__snot equ 000230h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Short NOT. +; Input: +; Operand1: +; hl : 16 bit +; +; Output: +; Result: hl : 16 bit +; Registers Used: +; a +;------------------------------------------------------------------------- + .def __snot + .assume adl=1 + +__snot equ 000230h diff --git a/frontends/calculator/CEdev/lib/shared/sor.src b/frontends/calculator/CEdev/lib/shared/sor.src index 119a003..1e8968a 100644 --- a/frontends/calculator/CEdev/lib/shared/sor.src +++ b/frontends/calculator/CEdev/lib/shared/sor.src @@ -1,20 +1,20 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Short OR. -; Input: -; Operand1: -; hl : 16 bit -; -; Operand2: -; bc : 16 bit -; -; Output: -; Result: hl : 16 bit -; hl OR bc -; Registers Used: -; a -;------------------------------------------------------------------------- - .def __sor - .assume adl=1 - -__sor equ 000234h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Short OR. +; Input: +; Operand1: +; hl : 16 bit +; +; Operand2: +; bc : 16 bit +; +; Output: +; Result: hl : 16 bit +; hl OR bc +; Registers Used: +; a +;------------------------------------------------------------------------- + .def __sor + .assume adl=1 + +__sor equ 000234h diff --git a/frontends/calculator/CEdev/lib/shared/sprintf.src b/frontends/calculator/CEdev/lib/shared/sprintf.src index 7c09553..367e689 100644 --- a/frontends/calculator/CEdev/lib/shared/sprintf.src +++ b/frontends/calculator/CEdev/lib/shared/sprintf.src @@ -1,7 +1,7 @@ - .def _sprintf - .assume adl=1 - -; int sprintf (char * str, const char * format, ...); - -_sprintf equ 0000BCh - + .def _sprintf + .assume adl=1 + +; int sprintf (char * str, const char * format, ...); + +_sprintf equ 0000BCh + diff --git a/frontends/calculator/CEdev/lib/shared/sqrtf.src b/frontends/calculator/CEdev/lib/shared/sqrtf.src index 563d151..f3d4214 100644 --- a/frontends/calculator/CEdev/lib/shared/sqrtf.src +++ b/frontends/calculator/CEdev/lib/shared/sqrtf.src @@ -1,37 +1,37 @@ -;-------------------------------------------------------------- -; -; IEEE Single precision square root -; Copyright 2003-2008 Zilog, Inc. -; -;-------------------------------------------------------------- -; -; INPUTS: -; Operand1: -; (stack) : 32 bit IEEE format -; -; OUTPUTS: -; Result: -; EuHL : 32 bit IEEE format result -; -; ALGORITHM: -; This algorithm is very similar to that used for binary -; division; readers should be familiar with that -; algorithm of repetitive compare/subtract, and shift. -; This algorithm uses the same concepts, except that the -; number compared/subtracted is 2*x+1, where 'x' is the -; developing result. Briefly, if 'y' is the input parameter, -; and 'x' is the result developed (and subtracted out) so -; far, then 'y - x^2' is the residual value. If the residual -; is greater than '2*x + 1', then we subtract that out, -; and add one to x; this means that the new residual is -; 'y - (x+1)^2'. Repetitively applied with shifting, 'x^2' -; approaches the value of 'y'. -; -; Registers Used: -; AF,BC,D -; -;-------------------------------------------------------------- - .def _sqrtf - .assume adl=1 - -_sqrtf equ 000298h +;-------------------------------------------------------------- +; +; IEEE Single precision square root +; Copyright 2003-2008 Zilog, Inc. +; +;-------------------------------------------------------------- +; +; INPUTS: +; Operand1: +; (stack) : 32 bit IEEE format +; +; OUTPUTS: +; Result: +; EuHL : 32 bit IEEE format result +; +; ALGORITHM: +; This algorithm is very similar to that used for binary +; division; readers should be familiar with that +; algorithm of repetitive compare/subtract, and shift. +; This algorithm uses the same concepts, except that the +; number compared/subtracted is 2*x+1, where 'x' is the +; developing result. Briefly, if 'y' is the input parameter, +; and 'x' is the result developed (and subtracted out) so +; far, then 'y - x^2' is the residual value. If the residual +; is greater than '2*x + 1', then we subtract that out, +; and add one to x; this means that the new residual is +; 'y - (x+1)^2'. Repetitively applied with shifting, 'x^2' +; approaches the value of 'y'. +; +; Registers Used: +; AF,BC,D +; +;-------------------------------------------------------------- + .def _sqrtf + .assume adl=1 + +_sqrtf equ 000298h diff --git a/frontends/calculator/CEdev/lib/shared/srand.src b/frontends/calculator/CEdev/lib/shared/srand.src index bbcf8f2..cf19c1d 100644 --- a/frontends/calculator/CEdev/lib/shared/srand.src +++ b/frontends/calculator/CEdev/lib/shared/srand.src @@ -1,12 +1,12 @@ - .ref __setstate - .def _srand - .assume adl=1 - -; void srand(unsigned int seed); - -_srand: - pop bc - ex (sp),hl - push bc - xor a,a - jp __setstate + .ref __setstate + .def _srand + .assume adl=1 + +; void srand(unsigned int seed); + +_srand: + pop bc + ex (sp),hl + push bc + xor a,a + jp __setstate diff --git a/frontends/calculator/CEdev/lib/shared/srandom.src b/frontends/calculator/CEdev/lib/shared/srandom.src index 0aa5189..ffcd54f 100644 --- a/frontends/calculator/CEdev/lib/shared/srandom.src +++ b/frontends/calculator/CEdev/lib/shared/srandom.src @@ -1,29 +1,29 @@ -; --- -; void srandom(uint32_t seed) -; --- - - .ref __state - .def _srandom - .def __setstate - .assume adl=1 - -_MemClear equ 00210E0h - -_srandom: - pop bc - pop de - ex (sp),hl ; lude = seed - push de - push bc - ex de,hl - ld a,e ; auhl = seed -__setstate: - ld (__state),hl - ld hl,__state+3 - ld (hl),a - ld b,12 -__setstateloop: - inc hl - ld (hl),b - djnz __setstateloop - ret +; --- +; void srandom(uint32_t seed) +; --- + + .ref __state + .def _srandom + .def __setstate + .assume adl=1 + +_MemClear equ 00210E0h + +_srandom: + pop bc + pop de + ex (sp),hl ; lude = seed + push de + push bc + ex de,hl + ld a,e ; auhl = seed +__setstate: + ld (__state),hl + ld hl,__state+3 + ld (hl),a + ld b,12 +__setstateloop: + inc hl + ld (hl),b + djnz __setstateloop + ret diff --git a/frontends/calculator/CEdev/lib/shared/srems.src b/frontends/calculator/CEdev/lib/shared/srems.src index 54b2907..1cc74a2 100644 --- a/frontends/calculator/CEdev/lib/shared/srems.src +++ b/frontends/calculator/CEdev/lib/shared/srems.src @@ -1,21 +1,21 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Short Modulus Signed -; Input: -; Operand1: -; hl : 16 bits -; -; Operand2: -; bc : 16 bits -; -; Output: -; Result: hl : 16 bits -; -; Registers Used: -; -;------------------------------------------------------------------------- - .ref __irems - .def __srems - .assume adl=1 - -__srems equ 000238h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Short Modulus Signed +; Input: +; Operand1: +; hl : 16 bits +; +; Operand2: +; bc : 16 bits +; +; Output: +; Result: hl : 16 bits +; +; Registers Used: +; +;------------------------------------------------------------------------- + .ref __irems + .def __srems + .assume adl=1 + +__srems equ 000238h diff --git a/frontends/calculator/CEdev/lib/shared/sremu.src b/frontends/calculator/CEdev/lib/shared/sremu.src index 6ecd4aa..d8ca078 100644 --- a/frontends/calculator/CEdev/lib/shared/sremu.src +++ b/frontends/calculator/CEdev/lib/shared/sremu.src @@ -1,21 +1,21 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Short Modulus Unsigned -; Input: -; Operand1: -; hl : 16 bits -; -; Operand2: -; bc : 16 bits -; -; Output: -; Result: hl : 16 bits -; -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __sremu - .ref __iremu - .assume adl=1 - -__sremu equ 00023Ch +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Short Modulus Unsigned +; Input: +; Operand1: +; hl : 16 bits +; +; Operand2: +; bc : 16 bits +; +; Output: +; Result: hl : 16 bits +; +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __sremu + .ref __iremu + .assume adl=1 + +__sremu equ 00023Ch diff --git a/frontends/calculator/CEdev/lib/shared/sshl.src b/frontends/calculator/CEdev/lib/shared/sshl.src index cf5034d..1c10828 100644 --- a/frontends/calculator/CEdev/lib/shared/sshl.src +++ b/frontends/calculator/CEdev/lib/shared/sshl.src @@ -1,22 +1,22 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Short Shift Left -; Input: -; Operand1: -; BC : 16 bit number of bits to shift -; Assume B=0 C=shift count -; Operand2: -; HL : 16 bit value to be shifted by C -; -; Output: -; Result: HL : 16 bit -; Registers Used: -; none -; Comments: -; Created 12/2001: G.Loegel -;------------------------------------------------------------------------- - .def __sshl, __sshl_b - .assume adl=1 - -__sshl_b equ 000244h -__sshl equ 000240h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Short Shift Left +; Input: +; Operand1: +; BC : 16 bit number of bits to shift +; Assume B=0 C=shift count +; Operand2: +; HL : 16 bit value to be shifted by C +; +; Output: +; Result: HL : 16 bit +; Registers Used: +; none +; Comments: +; Created 12/2001: G.Loegel +;------------------------------------------------------------------------- + .def __sshl, __sshl_b + .assume adl=1 + +__sshl_b equ 000244h +__sshl equ 000240h diff --git a/frontends/calculator/CEdev/lib/shared/sshrs.src b/frontends/calculator/CEdev/lib/shared/sshrs.src index a997ae1..94be572 100644 --- a/frontends/calculator/CEdev/lib/shared/sshrs.src +++ b/frontends/calculator/CEdev/lib/shared/sshrs.src @@ -1,20 +1,20 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Short Shift Right Signed -; Input: -; Operand1: -; BC : 16 bit number of bits to shift -; Assume B=0 C=shift count -; Operand2: -; HL : 16 bit value to be shifted by C -; -; Output: -; Result: HL : 16 bit -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __sshrs, __sshrs_b - .assume adl=1 - -__sshrs_b equ 00024Ch -__sshrs equ 000248h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Short Shift Right Signed +; Input: +; Operand1: +; BC : 16 bit number of bits to shift +; Assume B=0 C=shift count +; Operand2: +; HL : 16 bit value to be shifted by C +; +; Output: +; Result: HL : 16 bit +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __sshrs, __sshrs_b + .assume adl=1 + +__sshrs_b equ 00024Ch +__sshrs equ 000248h diff --git a/frontends/calculator/CEdev/lib/shared/sshru.src b/frontends/calculator/CEdev/lib/shared/sshru.src index 796f776..3a47401 100644 --- a/frontends/calculator/CEdev/lib/shared/sshru.src +++ b/frontends/calculator/CEdev/lib/shared/sshru.src @@ -1,20 +1,20 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Short Shift Right Unsigned -; Input: -; Operand1: -; BC : 16 bit number of bits to shift -; Assume B=0 C=shift count -; Operand2: -; HL : 16 bit value to be shifted by C -; -; Output: -; Result: HL : 16 bit -; Registers Used: -; none -;------------------------------------------------------------------------- - .def __sshru, __sshru_b - .assume adl=1 - -__sshru_b equ 000254h -__sshru equ 000250h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Short Shift Right Unsigned +; Input: +; Operand1: +; BC : 16 bit number of bits to shift +; Assume B=0 C=shift count +; Operand2: +; HL : 16 bit value to be shifted by C +; +; Output: +; Result: HL : 16 bit +; Registers Used: +; none +;------------------------------------------------------------------------- + .def __sshru, __sshru_b + .assume adl=1 + +__sshru_b equ 000254h +__sshru equ 000250h diff --git a/frontends/calculator/CEdev/lib/shared/sstix.src b/frontends/calculator/CEdev/lib/shared/sstix.src index 6f0a11b..652d263 100644 --- a/frontends/calculator/CEdev/lib/shared/sstix.src +++ b/frontends/calculator/CEdev/lib/shared/sstix.src @@ -1,19 +1,19 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Integer store (ix+nnnnnn),HL -; Input: -; Operand1: -; BC : 24-bit offset from ix -; HL : 16-bit integer to store -; -; Output: -; -; -; Registers Used: -; -;------------------------------------------------------------------------- - .def __sstix - .assume adl=1 - -__sstix equ 000258h - +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Integer store (ix+nnnnnn),HL +; Input: +; Operand1: +; BC : 24-bit offset from ix +; HL : 16-bit integer to store +; +; Output: +; +; +; Registers Used: +; +;------------------------------------------------------------------------- + .def __sstix + .assume adl=1 + +__sstix equ 000258h + diff --git a/frontends/calculator/CEdev/lib/shared/sstiy.src b/frontends/calculator/CEdev/lib/shared/sstiy.src index 504133c..799a899 100644 --- a/frontends/calculator/CEdev/lib/shared/sstiy.src +++ b/frontends/calculator/CEdev/lib/shared/sstiy.src @@ -1,19 +1,19 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; short store (iy+nnnnnn),HL -; Input: -; Operand1: -; BC : 24-bit offset from iy -; HL : 16-bit integer to store -; -; Output: -; -; -; Registers Used: -; -;------------------------------------------------------------------------- - .def __sstiy - .assume adl=1 - -__sstiy equ 00025Ch - +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; short store (iy+nnnnnn),HL +; Input: +; Operand1: +; BC : 24-bit offset from iy +; HL : 16-bit integer to store +; +; Output: +; +; +; Registers Used: +; +;------------------------------------------------------------------------- + .def __sstiy + .assume adl=1 + +__sstiy equ 00025Ch + diff --git a/frontends/calculator/CEdev/lib/shared/stoi.src b/frontends/calculator/CEdev/lib/shared/stoi.src index 9ad6430..e4b66d6 100644 --- a/frontends/calculator/CEdev/lib/shared/stoi.src +++ b/frontends/calculator/CEdev/lib/shared/stoi.src @@ -1,16 +1,16 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Signed Short to Integer Conversion -; Input: -; Operand1: -; BC : 16 bit number to convert -; -; Output: -; Result: HL : 24 bit -; Registers Used: -; a -;------------------------------------------------------------------------- - .def __stoi - .assume adl=1 - -__stoi equ 000260h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Signed Short to Integer Conversion +; Input: +; Operand1: +; BC : 16 bit number to convert +; +; Output: +; Result: HL : 24 bit +; Registers Used: +; a +;------------------------------------------------------------------------- + .def __stoi + .assume adl=1 + +__stoi equ 000260h diff --git a/frontends/calculator/CEdev/lib/shared/stoiu.src b/frontends/calculator/CEdev/lib/shared/stoiu.src index db0d59e..1985544 100644 --- a/frontends/calculator/CEdev/lib/shared/stoiu.src +++ b/frontends/calculator/CEdev/lib/shared/stoiu.src @@ -1,16 +1,16 @@ -; (c) Copyright 2001-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Unsigned Short to Integer Conversion -; Input: -; Operand1: -; BC : 16 bit number to convert -; -; Output: -; Result: HL : 24 bit -; Registers Used: -; a -;------------------------------------------------------------------------- - .def __stoiu - .assume adl=1 - -__stoiu equ 000264h +; (c) Copyright 2001-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Unsigned Short to Integer Conversion +; Input: +; Operand1: +; BC : 16 bit number to convert +; +; Output: +; Result: HL : 24 bit +; Registers Used: +; a +;------------------------------------------------------------------------- + .def __stoiu + .assume adl=1 + +__stoiu equ 000264h diff --git a/frontends/calculator/CEdev/lib/shared/strcasecmp.src b/frontends/calculator/CEdev/lib/shared/strcasecmp.src index 2808f5b..abc6b93 100644 --- a/frontends/calculator/CEdev/lib/shared/strcasecmp.src +++ b/frontends/calculator/CEdev/lib/shared/strcasecmp.src @@ -1,6 +1,6 @@ - .def _strcasecmp - .assume adl=1 - -; int strcasecmp(const char *f1, const char *f2); - + .def _strcasecmp + .assume adl=1 + +; int strcasecmp(const char *f1, const char *f2); + _strcasecmp equ 021E3Ch \ No newline at end of file diff --git a/frontends/calculator/CEdev/lib/shared/strcat.src b/frontends/calculator/CEdev/lib/shared/strcat.src index 297e5da..553c111 100644 --- a/frontends/calculator/CEdev/lib/shared/strcat.src +++ b/frontends/calculator/CEdev/lib/shared/strcat.src @@ -1,6 +1,6 @@ - .def _strcat - .assume adl=1 - -; char *strcat(char *s1, char *s2); - -_strcat equ 0000C0h + .def _strcat + .assume adl=1 + +; char *strcat(char *s1, char *s2); + +_strcat equ 0000C0h diff --git a/frontends/calculator/CEdev/lib/shared/strchr.src b/frontends/calculator/CEdev/lib/shared/strchr.src index 103602b..109a37c 100644 --- a/frontends/calculator/CEdev/lib/shared/strchr.src +++ b/frontends/calculator/CEdev/lib/shared/strchr.src @@ -1,6 +1,6 @@ - .def _strchr - .assume adl=1 - -; char *strchr(char *s, int c); - -_strchr equ 0000C4h + .def _strchr + .assume adl=1 + +; char *strchr(char *s, int c); + +_strchr equ 0000C4h diff --git a/frontends/calculator/CEdev/lib/shared/strcmp.src b/frontends/calculator/CEdev/lib/shared/strcmp.src index 9eb4f6e..3ba6280 100644 --- a/frontends/calculator/CEdev/lib/shared/strcmp.src +++ b/frontends/calculator/CEdev/lib/shared/strcmp.src @@ -1,6 +1,6 @@ - .def _strcmp - .assume adl=1 - -; int strcmp(register char *s1, register char *s2) - -_strcmp equ 0000C8h + .def _strcmp + .assume adl=1 + +; int strcmp(register char *s1, register char *s2) + +_strcmp equ 0000C8h diff --git a/frontends/calculator/CEdev/lib/shared/strcpy.src b/frontends/calculator/CEdev/lib/shared/strcpy.src index 38c0eb0..da9a089 100644 --- a/frontends/calculator/CEdev/lib/shared/strcpy.src +++ b/frontends/calculator/CEdev/lib/shared/strcpy.src @@ -1,6 +1,6 @@ - .def _strcpy - .assume adl=1 - -; char *strcpy(void *d, void *s); - -_strcpy equ 0000CCh + .def _strcpy + .assume adl=1 + +; char *strcpy(void *d, void *s); + +_strcpy equ 0000CCh diff --git a/frontends/calculator/CEdev/lib/shared/strcspn.src b/frontends/calculator/CEdev/lib/shared/strcspn.src index 1d83171..ca3d1ff 100644 --- a/frontends/calculator/CEdev/lib/shared/strcspn.src +++ b/frontends/calculator/CEdev/lib/shared/strcspn.src @@ -1,6 +1,6 @@ - .def _strcspn - .assume adl=1 - -; size_t strcspn(char *s1, char *s2); - -_strcspn equ 0000D0h + .def _strcspn + .assume adl=1 + +; size_t strcspn(char *s1, char *s2); + +_strcspn equ 0000D0h diff --git a/frontends/calculator/CEdev/lib/shared/strdup.src b/frontends/calculator/CEdev/lib/shared/strdup.src index 2debaa3..4e893ca 100644 --- a/frontends/calculator/CEdev/lib/shared/strdup.src +++ b/frontends/calculator/CEdev/lib/shared/strdup.src @@ -1,35 +1,35 @@ - .ref __frameset - .ref _malloc - .ref _strlen - .ref _strcpy - .def _strdup - .assume adl=1 - -_strdup: - ld hl,-3 - call __frameset - ld bc,(ix+6) - push bc - call _strlen - pop bc - inc hl - push hl - call _malloc - pop bc - ld (ix+-3),hl - add hl,de - or a,a - sbc hl,de - jr z,MallocFail - ld bc,(ix+6) - push bc - ld bc,(ix+-3) - push bc - call _strcpy - pop bc - pop bc -MallocFail: - ld hl,(ix+-3) - ld sp,ix - pop ix - ret + .ref __frameset + .ref _malloc + .ref _strlen + .ref _strcpy + .def _strdup + .assume adl=1 + +_strdup: + ld hl,-3 + call __frameset + ld bc,(ix+6) + push bc + call _strlen + pop bc + inc hl + push hl + call _malloc + pop bc + ld (ix+-3),hl + add hl,de + or a,a + sbc hl,de + jr z,MallocFail + ld bc,(ix+6) + push bc + ld bc,(ix+-3) + push bc + call _strcpy + pop bc + pop bc +MallocFail: + ld hl,(ix+-3) + ld sp,ix + pop ix + ret diff --git a/frontends/calculator/CEdev/lib/shared/strlen.src b/frontends/calculator/CEdev/lib/shared/strlen.src index 5ef9fad..12abdfc 100644 --- a/frontends/calculator/CEdev/lib/shared/strlen.src +++ b/frontends/calculator/CEdev/lib/shared/strlen.src @@ -1,6 +1,6 @@ - .def _strlen - .assume adl=1 - -; size_t strlen(char *s); - -_strlen equ 0000D4h + .def _strlen + .assume adl=1 + +; size_t strlen(char *s); + +_strlen equ 0000D4h diff --git a/frontends/calculator/CEdev/lib/shared/strncasecmp.src b/frontends/calculator/CEdev/lib/shared/strncasecmp.src index fdc603e..2e0dc4b 100644 --- a/frontends/calculator/CEdev/lib/shared/strncasecmp.src +++ b/frontends/calculator/CEdev/lib/shared/strncasecmp.src @@ -1,6 +1,6 @@ - .def _strncasecmp - .assume adl=1 - -; int strncasecmp ( const char *str1 , const char *str2 , int len ); - -_strncasecmp equ 021E3Ch + .def _strncasecmp + .assume adl=1 + +; int strncasecmp ( const char *str1 , const char *str2 , int len ); + +_strncasecmp equ 021E3Ch diff --git a/frontends/calculator/CEdev/lib/shared/strncat.src b/frontends/calculator/CEdev/lib/shared/strncat.src index 5f6a532..9d7e8be 100644 --- a/frontends/calculator/CEdev/lib/shared/strncat.src +++ b/frontends/calculator/CEdev/lib/shared/strncat.src @@ -1,6 +1,6 @@ - .def _strncat - .assume adl=1 - -; char *strncat(char *s1, char *s2, size_t n) - -_strncat equ 0000D8h + .def _strncat + .assume adl=1 + +; char *strncat(char *s1, char *s2, size_t n) + +_strncat equ 0000D8h diff --git a/frontends/calculator/CEdev/lib/shared/strncmp.src b/frontends/calculator/CEdev/lib/shared/strncmp.src index 08f2750..62bc058 100644 --- a/frontends/calculator/CEdev/lib/shared/strncmp.src +++ b/frontends/calculator/CEdev/lib/shared/strncmp.src @@ -1,6 +1,6 @@ - .def _strncmp - .assume adl=1 - -; int strncmp(char *s1, char *s2, size_t n) - -_strncmp equ 0000DCh + .def _strncmp + .assume adl=1 + +; int strncmp(char *s1, char *s2, size_t n) + +_strncmp equ 0000DCh diff --git a/frontends/calculator/CEdev/lib/shared/strncpy.src b/frontends/calculator/CEdev/lib/shared/strncpy.src index b46a72e..ef359b2 100644 --- a/frontends/calculator/CEdev/lib/shared/strncpy.src +++ b/frontends/calculator/CEdev/lib/shared/strncpy.src @@ -1,6 +1,6 @@ - .def _strncpy - .assume adl=1 - -; char *strncpy(char *dst, char *src, size_t n) - -_strncpy equ 0000E0h + .def _strncpy + .assume adl=1 + +; char *strncpy(char *dst, char *src, size_t n) + +_strncpy equ 0000E0h diff --git a/frontends/calculator/CEdev/lib/shared/strndup.src b/frontends/calculator/CEdev/lib/shared/strndup.src index 26c656c..b2ee007 100644 --- a/frontends/calculator/CEdev/lib/shared/strndup.src +++ b/frontends/calculator/CEdev/lib/shared/strndup.src @@ -1,46 +1,46 @@ - .def _strndup - .ref __frameset - .ref _strlen - .ref _malloc - .ref _memcpy - .assume adl=1 - -_strndup: - ld hl,-6 - call __frameset - ld bc,(ix+6) - push bc - call _strlen - ld (ix+-3),hl - ex de,hl - ld hl,(ix+9) - or a,a - sbc hl,de - jr nc,Greater - ld hl,(ix+9) - ld (ix+-3),hl -Greater: - ld bc,(ix+-3) - inc bc - push bc - call _malloc - ld (ix+-6),hl - add hl,bc - or a,a - sbc hl,bc - jr z,MallocFail - ld bc,(ix+-3) - ld hl,(ix+-6) - add hl,bc - ld (hl),0 - or a,a - sbc hl,bc - push bc - ld bc,(ix+6) - push bc - push hl - call _memcpy -MallocFail: - ld sp,ix - pop ix - ret + .def _strndup + .ref __frameset + .ref _strlen + .ref _malloc + .ref _memcpy + .assume adl=1 + +_strndup: + ld hl,-6 + call __frameset + ld bc,(ix+6) + push bc + call _strlen + ld (ix+-3),hl + ex de,hl + ld hl,(ix+9) + or a,a + sbc hl,de + jr nc,Greater + ld hl,(ix+9) + ld (ix+-3),hl +Greater: + ld bc,(ix+-3) + inc bc + push bc + call _malloc + ld (ix+-6),hl + add hl,bc + or a,a + sbc hl,bc + jr z,MallocFail + ld bc,(ix+-3) + ld hl,(ix+-6) + add hl,bc + ld (hl),0 + or a,a + sbc hl,bc + push bc + ld bc,(ix+6) + push bc + push hl + call _memcpy +MallocFail: + ld sp,ix + pop ix + ret diff --git a/frontends/calculator/CEdev/lib/shared/strnlen.src b/frontends/calculator/CEdev/lib/shared/strnlen.src index 823ea49..f7e7380 100644 --- a/frontends/calculator/CEdev/lib/shared/strnlen.src +++ b/frontends/calculator/CEdev/lib/shared/strnlen.src @@ -1,27 +1,27 @@ - .def _strnlen - .ref __frameset0 - .assume adl=1 - -_strnlen: - call __frameset0 - ld de,(ix+6) - ld bc,(ix+9) - or a,a - sbc hl,hl - jr StartFor -ForLoop: - inc hl - inc de -StartFor: - push hl - or a,a - sbc hl,bc - pop hl - jr nc,ReachedMax - ld a,(de) - or a,a - jr nz,ForLoop -ReachedMax: - ld sp,ix - pop ix - ret + .def _strnlen + .ref __frameset0 + .assume adl=1 + +_strnlen: + call __frameset0 + ld de,(ix+6) + ld bc,(ix+9) + or a,a + sbc hl,hl + jr StartFor +ForLoop: + inc hl + inc de +StartFor: + push hl + or a,a + sbc hl,bc + pop hl + jr nc,ReachedMax + ld a,(de) + or a,a + jr nz,ForLoop +ReachedMax: + ld sp,ix + pop ix + ret diff --git a/frontends/calculator/CEdev/lib/shared/strpbrk.src b/frontends/calculator/CEdev/lib/shared/strpbrk.src index f9ff01f..ee38418 100644 --- a/frontends/calculator/CEdev/lib/shared/strpbrk.src +++ b/frontends/calculator/CEdev/lib/shared/strpbrk.src @@ -1,6 +1,6 @@ - .def _strpbrk - .assume adl=1 - -; char *strpbrk(char *s1, char *s2) - -_strpbrk equ 0000E4h + .def _strpbrk + .assume adl=1 + +; char *strpbrk(char *s1, char *s2) + +_strpbrk equ 0000E4h diff --git a/frontends/calculator/CEdev/lib/shared/strrchr.src b/frontends/calculator/CEdev/lib/shared/strrchr.src index 80fab4a..d682fa2 100644 --- a/frontends/calculator/CEdev/lib/shared/strrchr.src +++ b/frontends/calculator/CEdev/lib/shared/strrchr.src @@ -1,6 +1,6 @@ - .def _strrchr - .assume adl=1 - -; char *strrchr(char *s, int c) - -_strrchr equ 0000E8h + .def _strrchr + .assume adl=1 + +; char *strrchr(char *s, int c) + +_strrchr equ 0000E8h diff --git a/frontends/calculator/CEdev/lib/shared/strspn.src b/frontends/calculator/CEdev/lib/shared/strspn.src index bb5ad3e..37613d1 100644 --- a/frontends/calculator/CEdev/lib/shared/strspn.src +++ b/frontends/calculator/CEdev/lib/shared/strspn.src @@ -1,5 +1,5 @@ - .def _strspn - .assume adl=1 - -; size_t strspn(char *s1,char *s2) -_strspn equ 0000ECh + .def _strspn + .assume adl=1 + +; size_t strspn(char *s1,char *s2) +_strspn equ 0000ECh diff --git a/frontends/calculator/CEdev/lib/shared/strstr.src b/frontends/calculator/CEdev/lib/shared/strstr.src index 585c5c0..a28c80e 100644 --- a/frontends/calculator/CEdev/lib/shared/strstr.src +++ b/frontends/calculator/CEdev/lib/shared/strstr.src @@ -1,6 +1,6 @@ - .def _strstr - .assume adl=1 - -; char *strstr(char *s1, char *s2); - -_strstr equ 0000F0h + .def _strstr + .assume adl=1 + +; char *strstr(char *s1, char *s2); + +_strstr equ 0000F0h diff --git a/frontends/calculator/CEdev/lib/shared/strtok.src b/frontends/calculator/CEdev/lib/shared/strtok.src index 14f3ef6..0bce87d 100644 --- a/frontends/calculator/CEdev/lib/shared/strtok.src +++ b/frontends/calculator/CEdev/lib/shared/strtok.src @@ -1,5 +1,5 @@ - .def _strtok - .assume adl=1 - -_strtok equ 0000F4h + .def _strtok + .assume adl=1 + +_strtok equ 0000F4h \ No newline at end of file diff --git a/frontends/calculator/CEdev/lib/shared/sxor.src b/frontends/calculator/CEdev/lib/shared/sxor.src index 2771ff2..f6e9ae8 100644 --- a/frontends/calculator/CEdev/lib/shared/sxor.src +++ b/frontends/calculator/CEdev/lib/shared/sxor.src @@ -1,18 +1,18 @@ -;------------------------------------------------------------------------- -; Short XOR. -; Input: -; Operand1: -; bc : 16 bit -; -; Operand2: -; hl : 16 bit -; -; Output: -; Result: hl : 16 bit -; Registers Used: -; a -;------------------------------------------------------------------------- - .def __sxor - .assume adl=1 - -__sxor equ 000268h +;------------------------------------------------------------------------- +; Short XOR. +; Input: +; Operand1: +; bc : 16 bit +; +; Operand2: +; hl : 16 bit +; +; Output: +; Result: hl : 16 bit +; Registers Used: +; a +;------------------------------------------------------------------------- + .def __sxor + .assume adl=1 + +__sxor equ 000268h diff --git a/frontends/calculator/CEdev/lib/shared/tice.src b/frontends/calculator/CEdev/lib/shared/tice.src index 5467be1..c95ade8 100644 --- a/frontends/calculator/CEdev/lib/shared/tice.src +++ b/frontends/calculator/CEdev/lib/shared/tice.src @@ -1,241 +1,241 @@ -; --- -; external definitions -; --- - .def _boot_GetBootMajorVer - .def _boot_GetHardwareVer - .def _boot_GetBootMinorVer - .def _boot_DebugPrintf - .def _boot_ClearVRAM - .def _boot_TurnOff - .def _boot_NewLine - .def _boot_Set6MHzMode - .def _boot_Set48MHzMode - .def _boot_Set6MHzModeI - .def _boot_Set48MHzModeI - .def _boot_GetBatteryStatus - .def _boot_WaitShort - .def _boot_CheckOnPressed - .def _boot_SetDate - .def _boot_GetDate - .def _boot_GetTime - .def _boot_SetTime - .def _boot_IsAfterNoon - - .def _os_NewLine - .def _os_PushErrorHandler - .def _os_PopErrorHandler - .def _os_ThrowError - .def _os_RealCopy - .def _os_RealAsinRad - .def _os_RealAcosRad - .def _os_RealAtanRad - .def _os_RealAdd - .def _os_CplxSquare - .def _os_RealCompare - .def _os_RealCosRad - .def _os_RealRadToDeg - .def _os_RealDiv - .def _os_RealExp - .def _os_RealFloor - .def _os_RealToStr - .def _os_RealFrac - .def _os_RealGcd - .def _os_RealRoundInt - .def _os_RealLcm - .def _os_RealLog - .def _os_RealMax - .def _os_RealMin - .def _os_RealMul - .def _os_RealNcr - .def _os_RealNeg - .def _os_RealNpr - .def _os_RealPow - .def _os_RealDegToRad - .def _os_RealRandInt - .def _os_RealInv - .def _os_RealMod - .def _os_RealRound - .def _os_RealSinRad - .def _os_RealSqrt - .def _os_RealSub - .def _os_RealTanRad - .def _os_StrToReal - .def _os_RealInt - .def _os_SetFlagBits - .def _os_ResetFlagBits - .def _os_TestFlagBits - .def _os_SetFlagByte - .def _os_GetFlagByte - .def _os_GetCursorPos - .def _os_PutStrFull - .def _os_PutStrLine - .def _os_SetCursorPos - .def _os_AppInit - .def _os_GetKey - .def _os_GetCSC - .def _os_DisableCursor - .def _os_EnableCursor - .def _os_FontDrawText - .def _os_FontGetHeight - .def _os_FontGetWidth - .def _os_InitDrawing - .def _os_SetDrawBGColor - .def _os_SetDrawFGColor - .def _os_FontSelect - .def _os_RclAns - .def _os_SetTimer1 - .def _os_DisableTimer1 - .def _os_GetSystemStats - .def _os_GetDrawBGColor - .def _os_GetDrawFGColor - .def _os_FontGetID - .def _os_RealToInt24 - .def _os_Int24ToReal - .def _os_ForceCmdNoChar - .def _os_GetSymTablePtr - .def _os_NextSymEntry - .def _os_ChkFindSym - .def _os_MemChk - .def _os_SetTimer2 - .def _os_DisableTimer2 - .def _os_FloatToReal - .def _os_RealToFloat - .def _os_FontDrawTransText - .def _os_CreateAppVar - - .def _asm_MoveDown - .def _asm_MoveUp - .def _asm_ClrLCDFull - .def _asm_ClrLCD - .def _asm_ClrTxtShd - .def _asm_HomeUp - .def _asm_RunIndicOn - .def _asm_RunIndicOff - .def _asm_DelRes - .def _asm_DisableAPD - .def _asm_EnableAPD - .def _asm_DrawStatusBar - .def _asm_ArcChk - .assume adl=1 - -; --- -; locations -; --- -_boot_GetBootMajorVer equ 000080h -_boot_GetHardwareVer equ 000084h -_boot_GetBootMinorVer equ 00008Ch -_boot_DebugPrintf equ 0000B4h -_boot_ClearVRAM equ 000374h -_boot_TurnOff equ 000388h -_boot_NewLine equ 000390h -_boot_Set6MHzMode equ 00039Ch -_boot_Set48MHzMode equ 0003A0h -_boot_Set6MHzModeI equ 0003A4h -_boot_Set48MHzModeI equ 0003A8h -_boot_GetBatteryStatus equ 0003B0h -_boot_WaitShort equ 0003B4h -_boot_CheckOnPressed equ 00057Ch -_boot_SetDate equ 000598h -_boot_GetDate equ 0005A8h -_boot_GetTime equ 0005B0h -_boot_SetTime equ 0005B4h -_boot_IsAfterNoon equ 0005C8h - -_os_NewLine equ 0207F0h -_os_PushErrorHandler equ 021C78h -_os_PopErrorHandler equ 021C7Ch -_os_ThrowError equ 021C80h -_os_RealCopy equ 021C84h -_os_RealAsinRad equ 021C88h -_os_RealAcosRad equ 021C8Ch -_os_RealAtanRad equ 021C90h -_os_RealAdd equ 021C94h -_os_CplxSquare equ 021C98h -_os_RealCompare equ 021C9Ch -_os_RealCosRad equ 021CA0h -_os_RealRadToDeg equ 021CA4h -_os_RealDiv equ 021CA8h -_os_RealExp equ 021CACh -_os_RealFloor equ 021CB0h -_os_RealToStr equ 021CB4h -_os_RealFrac equ 021CB8h -_os_RealGcd equ 021CBCh -_os_RealRoundInt equ 021CC0h -_os_RealLcm equ 021CC4h -_os_RealLog equ 021CC8h -_os_RealMax equ 021CCCh -_os_RealMin equ 021CD0h -_os_RealMul equ 021CD4h -_os_RealNcr equ 021CD8h -_os_RealNeg equ 021CDCh -_os_RealNpr equ 021CE0h -_os_RealPow equ 021CE4h -_os_RealDegToRad equ 021CE8h -_os_RealRandInt equ 021CECh -_os_RealInv equ 021CF0h -_os_RealMod equ 021CF4h -_os_RealRound equ 021CF8h -_os_RealSinRad equ 021CFCh -_os_RealSqrt equ 021D00h -_os_RealSub equ 021D04h -_os_RealTanRad equ 021D08h -_os_StrToReal equ 021D0Ch -_os_RealInt equ 021D10h -_os_SetFlagBits equ 021D14h -_os_ResetFlagBits equ 021D18h -_os_TestFlagBits equ 021D1Ch -_os_SetFlagByte equ 021D20h -_os_GetFlagByte equ 021D24h -_os_GetCursorPos equ 021D28h -_os_PutStrFull equ 021D2Ch -_os_PutStrLine equ 021D30h -_os_SetCursorPos equ 021D34h -_os_AppInit equ 021D40h -_os_GetKey equ 021D38h -_os_GetCSC equ 021D3Ch -_os_DisableCursor equ 021DE4h -_os_EnableCursor equ 021DE8h -_os_FontDrawText equ 021E00h -_os_FontGetHeight equ 021E14h -_os_FontGetWidth equ 021E18h -_os_InitDrawing equ 021E1Ch -_os_SetDrawBGColor equ 021E20h -_os_SetDrawFGColor equ 021E24h -_os_FontSelect equ 021E28h -_os_RclAns equ 021E70h -_os_SetTimer1 equ 021EC8h -_os_DisableTimer1 equ 021ECCh -_os_GetSystemStats equ 021ED4h -_os_GetDrawBGColor equ 021EE4h -_os_GetDrawFGColor equ 021EE8h -_os_FontGetID equ 021EECh -_os_RealToInt24 equ 021EF4h -_os_Int24ToReal equ 021EF8h -_os_ForceCmdNoChar equ 021FA8h -_os_GetSymTablePtr equ 021FB0h -_os_NextSymEntry equ 021FB4h -_os_ChkFindSym equ 021FB8h -_os_MemChk equ 021FF0h -_os_SetTimer2 equ 022080h -_os_DisableTimer2 equ 022084h -_os_FloatToReal equ 022170h -_os_RealToFloat equ 022174h -_os_FontDrawTransText equ 022178h -_os_CreateAppVar equ 022184h - -; --- -; directly callable asm functions -; --- -_asm_MoveDown equ 0207F4h -_asm_MoveUp equ 020800h -_asm_ClrLCDFull equ 020808h -_asm_ClrLCD equ 02080Ch -_asm_ClrTxtShd equ 020818h -_asm_HomeUp equ 020828h -_asm_RunIndicOn equ 020844h -_asm_RunIndicOff equ 020848h -_asm_DelRes equ 020E5Ch -_asm_DisableAPD equ 021134h -_asm_EnableAPD equ 021138h -_asm_DrawStatusBar equ 021A3Ch -_asm_ArcChk equ 022040h +; --- +; external definitions +; --- + .def _boot_GetBootMajorVer + .def _boot_GetHardwareVer + .def _boot_GetBootMinorVer + .def _boot_DebugPrintf + .def _boot_ClearVRAM + .def _boot_TurnOff + .def _boot_NewLine + .def _boot_Set6MHzMode + .def _boot_Set48MHzMode + .def _boot_Set6MHzModeI + .def _boot_Set48MHzModeI + .def _boot_GetBatteryStatus + .def _boot_WaitShort + .def _boot_CheckOnPressed + .def _boot_SetDate + .def _boot_GetDate + .def _boot_GetTime + .def _boot_SetTime + .def _boot_IsAfterNoon + + .def _os_NewLine + .def _os_PushErrorHandler + .def _os_PopErrorHandler + .def _os_ThrowError + .def _os_RealCopy + .def _os_RealAsinRad + .def _os_RealAcosRad + .def _os_RealAtanRad + .def _os_RealAdd + .def _os_CplxSquare + .def _os_RealCompare + .def _os_RealCosRad + .def _os_RealRadToDeg + .def _os_RealDiv + .def _os_RealExp + .def _os_RealFloor + .def _os_RealToStr + .def _os_RealFrac + .def _os_RealGcd + .def _os_RealRoundInt + .def _os_RealLcm + .def _os_RealLog + .def _os_RealMax + .def _os_RealMin + .def _os_RealMul + .def _os_RealNcr + .def _os_RealNeg + .def _os_RealNpr + .def _os_RealPow + .def _os_RealDegToRad + .def _os_RealRandInt + .def _os_RealInv + .def _os_RealMod + .def _os_RealRound + .def _os_RealSinRad + .def _os_RealSqrt + .def _os_RealSub + .def _os_RealTanRad + .def _os_StrToReal + .def _os_RealInt + .def _os_SetFlagBits + .def _os_ResetFlagBits + .def _os_TestFlagBits + .def _os_SetFlagByte + .def _os_GetFlagByte + .def _os_GetCursorPos + .def _os_PutStrFull + .def _os_PutStrLine + .def _os_SetCursorPos + .def _os_AppInit + .def _os_GetKey + .def _os_GetCSC + .def _os_DisableCursor + .def _os_EnableCursor + .def _os_FontDrawText + .def _os_FontGetHeight + .def _os_FontGetWidth + .def _os_InitDrawing + .def _os_SetDrawBGColor + .def _os_SetDrawFGColor + .def _os_FontSelect + .def _os_RclAns + .def _os_SetTimer1 + .def _os_DisableTimer1 + .def _os_GetSystemStats + .def _os_GetDrawBGColor + .def _os_GetDrawFGColor + .def _os_FontGetID + .def _os_RealToInt24 + .def _os_Int24ToReal + .def _os_ForceCmdNoChar + .def _os_GetSymTablePtr + .def _os_NextSymEntry + .def _os_ChkFindSym + .def _os_MemChk + .def _os_SetTimer2 + .def _os_DisableTimer2 + .def _os_FloatToReal + .def _os_RealToFloat + .def _os_FontDrawTransText + .def _os_CreateAppVar + + .def _asm_MoveDown + .def _asm_MoveUp + .def _asm_ClrLCDFull + .def _asm_ClrLCD + .def _asm_ClrTxtShd + .def _asm_HomeUp + .def _asm_RunIndicOn + .def _asm_RunIndicOff + .def _asm_DelRes + .def _asm_DisableAPD + .def _asm_EnableAPD + .def _asm_DrawStatusBar + .def _asm_ArcChk + .assume adl=1 + +; --- +; locations +; --- +_boot_GetBootMajorVer equ 000080h +_boot_GetHardwareVer equ 000084h +_boot_GetBootMinorVer equ 00008Ch +_boot_DebugPrintf equ 0000B4h +_boot_ClearVRAM equ 000374h +_boot_TurnOff equ 000388h +_boot_NewLine equ 000390h +_boot_Set6MHzMode equ 00039Ch +_boot_Set48MHzMode equ 0003A0h +_boot_Set6MHzModeI equ 0003A4h +_boot_Set48MHzModeI equ 0003A8h +_boot_GetBatteryStatus equ 0003B0h +_boot_WaitShort equ 0003B4h +_boot_CheckOnPressed equ 00057Ch +_boot_SetDate equ 000598h +_boot_GetDate equ 0005A8h +_boot_GetTime equ 0005B0h +_boot_SetTime equ 0005B4h +_boot_IsAfterNoon equ 0005C8h + +_os_NewLine equ 0207F0h +_os_PushErrorHandler equ 021C78h +_os_PopErrorHandler equ 021C7Ch +_os_ThrowError equ 021C80h +_os_RealCopy equ 021C84h +_os_RealAsinRad equ 021C88h +_os_RealAcosRad equ 021C8Ch +_os_RealAtanRad equ 021C90h +_os_RealAdd equ 021C94h +_os_CplxSquare equ 021C98h +_os_RealCompare equ 021C9Ch +_os_RealCosRad equ 021CA0h +_os_RealRadToDeg equ 021CA4h +_os_RealDiv equ 021CA8h +_os_RealExp equ 021CACh +_os_RealFloor equ 021CB0h +_os_RealToStr equ 021CB4h +_os_RealFrac equ 021CB8h +_os_RealGcd equ 021CBCh +_os_RealRoundInt equ 021CC0h +_os_RealLcm equ 021CC4h +_os_RealLog equ 021CC8h +_os_RealMax equ 021CCCh +_os_RealMin equ 021CD0h +_os_RealMul equ 021CD4h +_os_RealNcr equ 021CD8h +_os_RealNeg equ 021CDCh +_os_RealNpr equ 021CE0h +_os_RealPow equ 021CE4h +_os_RealDegToRad equ 021CE8h +_os_RealRandInt equ 021CECh +_os_RealInv equ 021CF0h +_os_RealMod equ 021CF4h +_os_RealRound equ 021CF8h +_os_RealSinRad equ 021CFCh +_os_RealSqrt equ 021D00h +_os_RealSub equ 021D04h +_os_RealTanRad equ 021D08h +_os_StrToReal equ 021D0Ch +_os_RealInt equ 021D10h +_os_SetFlagBits equ 021D14h +_os_ResetFlagBits equ 021D18h +_os_TestFlagBits equ 021D1Ch +_os_SetFlagByte equ 021D20h +_os_GetFlagByte equ 021D24h +_os_GetCursorPos equ 021D28h +_os_PutStrFull equ 021D2Ch +_os_PutStrLine equ 021D30h +_os_SetCursorPos equ 021D34h +_os_AppInit equ 021D40h +_os_GetKey equ 021D38h +_os_GetCSC equ 021D3Ch +_os_DisableCursor equ 021DE4h +_os_EnableCursor equ 021DE8h +_os_FontDrawText equ 021E00h +_os_FontGetHeight equ 021E14h +_os_FontGetWidth equ 021E18h +_os_InitDrawing equ 021E1Ch +_os_SetDrawBGColor equ 021E20h +_os_SetDrawFGColor equ 021E24h +_os_FontSelect equ 021E28h +_os_RclAns equ 021E70h +_os_SetTimer1 equ 021EC8h +_os_DisableTimer1 equ 021ECCh +_os_GetSystemStats equ 021ED4h +_os_GetDrawBGColor equ 021EE4h +_os_GetDrawFGColor equ 021EE8h +_os_FontGetID equ 021EECh +_os_RealToInt24 equ 021EF4h +_os_Int24ToReal equ 021EF8h +_os_ForceCmdNoChar equ 021FA8h +_os_GetSymTablePtr equ 021FB0h +_os_NextSymEntry equ 021FB4h +_os_ChkFindSym equ 021FB8h +_os_MemChk equ 021FF0h +_os_SetTimer2 equ 022080h +_os_DisableTimer2 equ 022084h +_os_FloatToReal equ 022170h +_os_RealToFloat equ 022174h +_os_FontDrawTransText equ 022178h +_os_CreateAppVar equ 022184h + +; --- +; directly callable asm functions +; --- +_asm_MoveDown equ 0207F4h +_asm_MoveUp equ 020800h +_asm_ClrLCDFull equ 020808h +_asm_ClrLCD equ 02080Ch +_asm_ClrTxtShd equ 020818h +_asm_HomeUp equ 020828h +_asm_RunIndicOn equ 020844h +_asm_RunIndicOff equ 020848h +_asm_DelRes equ 020E5Ch +_asm_DisableAPD equ 021134h +_asm_EnableAPD equ 021138h +_asm_DrawStatusBar equ 021A3Ch +_asm_ArcChk equ 022040h diff --git a/frontends/calculator/CEdev/lib/shared/tolower.src b/frontends/calculator/CEdev/lib/shared/tolower.src index db6c58d..a389331 100644 --- a/frontends/calculator/CEdev/lib/shared/tolower.src +++ b/frontends/calculator/CEdev/lib/shared/tolower.src @@ -1,4 +1,4 @@ - .assume adl=1 - .def _tolower - -_tolower equ 021E34h + .assume adl=1 + .def _tolower + +_tolower equ 021E34h diff --git a/frontends/calculator/CEdev/lib/shared/toupper.src b/frontends/calculator/CEdev/lib/shared/toupper.src index eb5dcea..9edc2b1 100644 --- a/frontends/calculator/CEdev/lib/shared/toupper.src +++ b/frontends/calculator/CEdev/lib/shared/toupper.src @@ -1,4 +1,4 @@ - .assume adl=1 - .def _toupper - -_toupper equ 021E38h + .assume adl=1 + .def _toupper + +_toupper equ 021E38h diff --git a/frontends/calculator/CEdev/lib/shared/uldiv.src b/frontends/calculator/CEdev/lib/shared/uldiv.src index 6acdeac..ff407ac 100644 --- a/frontends/calculator/CEdev/lib/shared/uldiv.src +++ b/frontends/calculator/CEdev/lib/shared/uldiv.src @@ -1,128 +1,128 @@ -; (c) Copyright 1999-2008 Zilog, Inc. -;------------------------------------------------------------------------- -; Unsigned Long Division. -; Input: -; Operand1: -; (ix+9) : high word,high byte -; (ix+8) : high word,low byte -; (ix+7) : low word,high byte -; (ix+6) : low word,low byte -; -; Operand2: -; (ix+15) : high word,high byte -; (ix+14) : high word,low byte -; (ix+13) : low word,high byte -; (ix+12) : low word,low byte -; -; Output: -; Result: b : high byte -; de : low byte -; Registers Used: -; a,b,c,d,e,h,l,iy -;------------------------------------------------------------------------- - .assume adl=1 - .def .uldiv - -.uldiv: - push ix - ld ix,0 - add ix,sp - - ld de,0 ;res = 0; - ld b,0 - - ld hl,0 ;num = 0 - ld c,0 - - ld iy,32 ;i = 32; - -loop: - ;res = res << 1 - ex de,hl - add hl,hl - ld a,b - adc a,b - ld b,a - ex de,hl - - ;num = num << 1 - add hl,hl - ld a,c - adc a,c - ld c,a - - ;x = x << 1 - ld a,(ix+6) - add a,(ix+6) - ld (ix+6),a - ld a,(ix+7) - adc a,(ix+7) - ld (ix+7),a - ld a,(ix+8) - adc a,(ix+8) - ld (ix+8),a - ld a,(ix+9) - adc a,(ix+9) - ld (ix+9),a - - - push de - - ;num = num + carry - - ld de,0 - adc hl,de - ld a,c - adc a,d - ld c,a - - - ;num = num - y - ld de,(ix+12) - or a,a - sbc hl,de - ld a,c - ld d,(ix+15) - sbc a,d - ld c,a - - pop de - jr c, out ;if (num < y) goto out - - inc de ;res = res | 1 - - jr done ;goto done - -out: - push de - ;num = num + y - ld de,(ix+12) - add hl,de - ld a,c - ld d,(ix+15) - adc a,d - ld c,a - - pop de - -done: - ;i--, if (i != 0) go to loop - dec iyl - jr nz,loop - - - pop ix - ret - - .def .uldivbdechl -.uldivbdechl: - push bc - push hl - ld c,b - push bc - push de - call .uldiv - ld iy,12 - add iy,sp - ld sp,iy - ret +; (c) Copyright 1999-2008 Zilog, Inc. +;------------------------------------------------------------------------- +; Unsigned Long Division. +; Input: +; Operand1: +; (ix+9) : high word,high byte +; (ix+8) : high word,low byte +; (ix+7) : low word,high byte +; (ix+6) : low word,low byte +; +; Operand2: +; (ix+15) : high word,high byte +; (ix+14) : high word,low byte +; (ix+13) : low word,high byte +; (ix+12) : low word,low byte +; +; Output: +; Result: b : high byte +; de : low byte +; Registers Used: +; a,b,c,d,e,h,l,iy +;------------------------------------------------------------------------- + .assume adl=1 + .def .uldiv + +.uldiv: + push ix + ld ix,0 + add ix,sp + + ld de,0 ;res = 0; + ld b,0 + + ld hl,0 ;num = 0 + ld c,0 + + ld iy,32 ;i = 32; + +loop: + ;res = res << 1 + ex de,hl + add hl,hl + ld a,b + adc a,b + ld b,a + ex de,hl + + ;num = num << 1 + add hl,hl + ld a,c + adc a,c + ld c,a + + ;x = x << 1 + ld a,(ix+6) + add a,(ix+6) + ld (ix+6),a + ld a,(ix+7) + adc a,(ix+7) + ld (ix+7),a + ld a,(ix+8) + adc a,(ix+8) + ld (ix+8),a + ld a,(ix+9) + adc a,(ix+9) + ld (ix+9),a + + + push de + + ;num = num + carry + + ld de,0 + adc hl,de + ld a,c + adc a,d + ld c,a + + + ;num = num - y + ld de,(ix+12) + or a,a + sbc hl,de + ld a,c + ld d,(ix+15) + sbc a,d + ld c,a + + pop de + jr c, out ;if (num < y) goto out + + inc de ;res = res | 1 + + jr done ;goto done + +out: + push de + ;num = num + y + ld de,(ix+12) + add hl,de + ld a,c + ld d,(ix+15) + adc a,d + ld c,a + + pop de + +done: + ;i--, if (i != 0) go to loop + dec iyl + jr nz,loop + + + pop ix + ret + + .def .uldivbdechl +.uldivbdechl: + push bc + push hl + ld c,b + push bc + push de + call .uldiv + ld iy,12 + add iy,sp + ld sp,iy + ret diff --git a/frontends/calculator/CEdev/lib/shared/usb.src b/frontends/calculator/CEdev/lib/shared/usb.src index 91cc310..f339be8 100644 --- a/frontends/calculator/CEdev/lib/shared/usb.src +++ b/frontends/calculator/CEdev/lib/shared/usb.src @@ -1,21 +1,21 @@ -; --- -; External Definitions -; --- - .def _usb_BusPowered - .def _usb_SelfPowered - .def _usb_ResetChip - .def _usb_DisableTimers - .def _usb_EnableTimers - .def _usb_ResetTimers - .assume adl=1 - -; --- -; Location Equates -; --- -_usb_BusPowered equ 0003E4h -_usb_SelfPowered equ 0003E8h -_usb_ResetChip equ 0003F4h -_usb_DisableTimers equ 0004F4h -_usb_EnableTimers equ 0004F8h -_usb_ResetTimers equ 0004F0h -; --- +; --- +; External Definitions +; --- + .def _usb_BusPowered + .def _usb_SelfPowered + .def _usb_ResetChip + .def _usb_DisableTimers + .def _usb_EnableTimers + .def _usb_ResetTimers + .assume adl=1 + +; --- +; Location Equates +; --- +_usb_BusPowered equ 0003E4h +_usb_SelfPowered equ 0003E8h +_usb_ResetChip equ 0003F4h +_usb_DisableTimers equ 0004F4h +_usb_EnableTimers equ 0004F8h +_usb_ResetTimers equ 0004F0h +; --- diff --git a/frontends/calculator/CEdev/lib/shared/zx7_Decompress.src b/frontends/calculator/CEdev/lib/shared/zx7_Decompress.src index e45c146..3190bdb 100644 --- a/frontends/calculator/CEdev/lib/shared/zx7_Decompress.src +++ b/frontends/calculator/CEdev/lib/shared/zx7_Decompress.src @@ -1,117 +1,117 @@ -; --- -; void zx7_Decompress(void *dest, void *src) -; --- -; Dec 2012 by Einar Saukas & Urusergi -; "Turbo" version (89 bytes, 25% faster) -; --- - - .def _zx7_Decompress - .assume adl=1 - -; enter : hl = void *src -; de = void *dst -; -; exit : hl = & following uncompressed block -; -; uses : af, bc, de, hl - -_zx7_Decompress: - pop bc - pop de - pop hl - push hl - push de - push bc - - ld a, 128 - -zx7t_copy_byte_loop: - - ldi ; copy literal byte - -zx7t_main_loop: - - add a, a ; check next bit - call z, zx7t_load_bits ; no more bits left? - jr nc, zx7t_copy_byte_loop ; next bit indicates either literal or sequence - -; determine number of bits used for length (Elias gamma coding) - - push de - ld de, 0 - ld bc, 1 - -zx7t_len_size_loop: - - inc d - add a, a ; check next bit - call z, zx7t_load_bits ; no more bits left? - jr nc, zx7t_len_size_loop - jp zx7t_len_value_start - -; determine length - -zx7t_len_value_loop: - - add a, a ; check next bit - call z, zx7t_load_bits ; no more bits left? - rl c - rl b - jr c, zx7t_exit ; check end marker - -zx7t_len_value_start: - - dec d - jr nz, zx7t_len_value_loop - inc bc ; adjust length - -; determine offset - - ld e, (hl) ; load offset flag (1 bit) + offset value (7 bits) - inc hl - - sla e - inc e - - jr nc, zx7t_offset_end ; if offset flag is set, load 4 extra bits - add a, a ; check next bit - call z, zx7t_load_bits ; no more bits left? - rl d ; insert first bit into D - add a, a ; check next bit - call z, zx7t_load_bits ; no more bits left? - rl d ; insert second bit into D - add a, a ; check next bit - call z, zx7t_load_bits ; no more bits left? - rl d ; insert third bit into D - add a, a ; check next bit - call z, zx7t_load_bits ; no more bits left? - ccf - jr c, zx7t_offset_end - inc d ; equivalent to adding 128 to DE - -zx7t_offset_end: - - rr e ; insert inverted fourth bit into E - -; copy previous sequence - - ex (sp), hl ; store source, restore destination - push hl ; store destination - sbc hl, de ; HL = destination - offset - 1 - pop de ; DE = destination - ldir - -zx7t_exit: - - pop hl ; restore source address (compressed data) - jp nc, zx7t_main_loop - -zx7t_load_bits: - - ld a, (hl) ; load another group of 8 bits - inc hl - rla - ret - - - end +; --- +; void zx7_Decompress(void *dest, void *src) +; --- +; Dec 2012 by Einar Saukas & Urusergi +; "Turbo" version (89 bytes, 25% faster) +; --- + + .def _zx7_Decompress + .assume adl=1 + +; enter : hl = void *src +; de = void *dst +; +; exit : hl = & following uncompressed block +; +; uses : af, bc, de, hl + +_zx7_Decompress: + pop bc + pop de + pop hl + push hl + push de + push bc + + ld a, 128 + +zx7t_copy_byte_loop: + + ldi ; copy literal byte + +zx7t_main_loop: + + add a, a ; check next bit + call z, zx7t_load_bits ; no more bits left? + jr nc, zx7t_copy_byte_loop ; next bit indicates either literal or sequence + +; determine number of bits used for length (Elias gamma coding) + + push de + ld de, 0 + ld bc, 1 + +zx7t_len_size_loop: + + inc d + add a, a ; check next bit + call z, zx7t_load_bits ; no more bits left? + jr nc, zx7t_len_size_loop + jp zx7t_len_value_start + +; determine length + +zx7t_len_value_loop: + + add a, a ; check next bit + call z, zx7t_load_bits ; no more bits left? + rl c + rl b + jr c, zx7t_exit ; check end marker + +zx7t_len_value_start: + + dec d + jr nz, zx7t_len_value_loop + inc bc ; adjust length + +; determine offset + + ld e, (hl) ; load offset flag (1 bit) + offset value (7 bits) + inc hl + + sla e + inc e + + jr nc, zx7t_offset_end ; if offset flag is set, load 4 extra bits + add a, a ; check next bit + call z, zx7t_load_bits ; no more bits left? + rl d ; insert first bit into D + add a, a ; check next bit + call z, zx7t_load_bits ; no more bits left? + rl d ; insert second bit into D + add a, a ; check next bit + call z, zx7t_load_bits ; no more bits left? + rl d ; insert third bit into D + add a, a ; check next bit + call z, zx7t_load_bits ; no more bits left? + ccf + jr c, zx7t_offset_end + inc d ; equivalent to adding 128 to DE + +zx7t_offset_end: + + rr e ; insert inverted fourth bit into E + +; copy previous sequence + + ex (sp), hl ; store source, restore destination + push hl ; store destination + sbc hl, de ; HL = destination - offset - 1 + pop de ; DE = destination + ldir + +zx7t_exit: + + pop hl ; restore source address (compressed data) + jp nc, zx7t_main_loop + +zx7t_load_bits: + + ld a, (hl) ; load another group of 8 bits + inc hl + rla + ret + + + end diff --git a/frontends/curses/curses_ui.c b/frontends/curses/curses_ui.c index 23c35d7..60d930a 100644 --- a/frontends/curses/curses_ui.c +++ b/frontends/curses/curses_ui.c @@ -1,212 +1,216 @@ -#include -#include -#ifdef _WIN32 -#define ASCII_COMPATIBLE -#include "win\curses.h" -#include -#else -#include -#include -#endif -#include - -#include "cetris.h" - -#ifdef ASCII_COMPATIBLE -#define BLOCK "[]" -#define PLAY_FIELD_STR " /--------------------\\ /----------------\\\n"\ - " | | | |\n"\ - " | | \\----------------/\n"\ - " | | \n"\ - " | | \n"\ - " | | /---------\\ \n"\ - " | | | | \n"\ - " | | | | \n"\ - " | | | | \n"\ - " | | | | \n"\ - " | | \\---------/ \n"\ - " | | \n"\ - " | | \n"\ - " | | \n"\ - " | | \n"\ - " | | \n"\ - " | | \n"\ - " | | \n"\ - " | | \n"\ - " | | \n"\ - " | | \n"\ - " \\--------------------/" -#else -#define BLOCK "[]" -#define PLAY_FIELD_STR " ┏━━━━━━━━━━━━━━━━━━━━┓ ┏━━━━━━━━━━━━━━━┓ \n"\ - " ┃ ┃ ┃ ┃ \n"\ - " ┃ ┃ ┗━━━━━━━━━━━━━━━┛ \n"\ - " ┃ ┃ \n"\ - " ┃ ┃ \n"\ - " ┃ ┃ ┏━━━━━━━━━━━┓ \n"\ - " ┃ ┃ ┃ ┃ \n"\ - " ┃ ┃ ┃ ┃ \n"\ - " ┃ ┃ ┃ ┃ \n"\ - " ┃ ┃ ┃ ┃ \n"\ - " ┃ ┃ ┗━━━━━━━━━━━┛ \n"\ - " ┃ ┃ \n"\ - " ┃ ┃ \n"\ - " ┃ ┃ \n"\ - " ┃ ┃ \n"\ - " ┃ ┃ \n"\ - " ┃ ┃ \n"\ - " ┃ ┃ \n"\ - " ┃ ┃ \n"\ - " ┃ ┃ \n"\ - " ┃ ┃ \n"\ - " ┗━━━━━━━━━━━━━━━━━━━━┛ " -#endif - -#define X_OFFSET 8 -#define Y_OFFSET 0 - -struct cetris_game game; - -void curses_init() { - setlocale(LC_CTYPE, ""); - initscr(); - noecho(); - //keypad(stdscr, TRUE); - curs_set(0); - //timeout(1000 / CETRIS_HZ); - nodelay(stdscr, true); - - start_color(); - init_pair(COLOR_NONE, COLOR_BLACK, COLOR_BLACK); - init_pair(COLOR_O, COLOR_MAGENTA, COLOR_BLACK); - init_pair(COLOR_Z, COLOR_RED, COLOR_BLACK); - init_pair(COLOR_S, COLOR_CYAN, COLOR_BLACK); - init_pair(COLOR_T, COLOR_WHITE, COLOR_BLACK); - init_pair(COLOR_L, COLOR_GREEN, COLOR_BLACK); - init_pair(COLOR_I, COLOR_BLUE, COLOR_BLACK); - init_pair(COLOR_J, COLOR_YELLOW, COLOR_BLACK); - clear(); -} - -#ifdef _WIN32 -DWORD WINAPI game_loop(void* data) { - while(1) { - Sleep((1.0/60.0) * 1000.0); - update_game_tick(&game); - } - return 0; -} -#else -void *game_loop(void) { - while(1) { - usleep((1/60) * 1000000); - update_game_tick(&game); - } - return 0; -} -#endif - - -void draw_board() { - mvaddstr(0, 0, PLAY_FIELD_STR); - for (int x = 0; x < CETRIS_BOARD_X; x++) { - for (int y = CETRIS_BOARD_VISABLE; y < CETRIS_BOARD_Y; y++) { - if (game.board[x][y].occupied) { - attron(COLOR_PAIR(game.board[x][y].c)); - if (game.board[x][y].remove_tick > 0) { - if (game.tick % 2 == 0) { - mvaddstr((y - CETRIS_BOARD_VISABLE) + 1, x * 2 + X_OFFSET, BLOCK); - } - } else { - mvaddstr((y - CETRIS_BOARD_VISABLE) + 1, x * 2 + X_OFFSET, BLOCK); - } - attroff(COLOR_PAIR(game.board[x][y].c)); - } - } - - int index = game.current_index; - attron(COLOR_PAIR(game.piece_queue[index].c)); - for (int x = 0; x < 4; x++) { - for (int y = 0; y < 4; y++) { - if (game.piece_queue[index].m[y][x]) { - if (game.piece_queue[index].t == I) { - mvaddstr(6 + y, (x * 2) + 36, BLOCK); - } else { - mvaddstr(6 + y, (x * 2) + 37, BLOCK); - } - } - } - } - attroff(COLOR_PAIR(game.piece_queue[index].c)); - - attron(A_BOLD); - - char score[50]; - sprintf(score, "%li", game.score); - mvaddstr(1, (39 + X_OFFSET) - strlen(score), score); - - char level[20]; - sprintf(level, "%i", game.level); - mvaddstr(3, 37, "Level"); - mvaddstr(4, 40 - strlen(level), level); - - if (game.game_over) { - mvaddstr(10, 6 + X_OFFSET, "GAME OVER"); - mvaddstr(11, 5 + X_OFFSET, "r to restart"); - } - - attroff(A_BOLD); - } -} - -int main(void) { - curses_init(); - - init_game(&game); - -#ifdef _WIN32 - HANDLE thread = CreateThread(NULL, 0, game_loop, NULL, 0, NULL); -#else - pthread_t thread; - pthread_create(&thread, NULL, game_loop, (void*)0); -#endif - - while(1) { - int keys[50]; int key_count = 0; - int moves[7]; memset(moves, 0, sizeof(int) * 7); - while((keys[key_count] = getch()) != ERR) key_count++; - for (int i = 0; i < key_count; i++) { - switch (keys[i]) { - case 'q': endwin(); exit(1); - case KEY_LEFT: - move_piece(&game, LEFT); - moves[LEFT] = 1; break; - case KEY_RIGHT: - move_piece(&game, RIGHT); - moves[RIGHT] = 1; break; - case KEY_DOWN: - move_piece(&game, DOWN); - moves[DOWN] = 1; break; - case KEY_UP: - move_piece(&game, ROTATE_CW); - moves[ROTATE_CW] = 1; break; - case ' ': - move_piece(&game, HARD_DROP); - moves[HARD_DROP] = 1; break; - case 'r': - if (game.game_over) { - init_game(&game); - } - break; - } - } - for (int i = 1; i < key_count; i++) { - if (!moves[i]) stop_holding(&game, i); - } - erase(); - draw_board(); - refresh(); - } - return 0; -} - +#include +#include +#ifdef _WIN32 +#define ASCII_COMPATIBLE +#include "win\curses.h" +#include +#else +#include +#include +#include +#endif +#include + +#include "cetris.h" + +#ifdef ASCII_COMPATIBLE +#define BLOCK "[]" +#define PLAY_FIELD_STR " /--------------------\\ /----------------\\\n"\ + " | | | |\n"\ + " | | \\----------------/\n"\ + " | | \n"\ + " | | \n"\ + " | | /---------\\ \n"\ + " | | | | \n"\ + " | | | | \n"\ + " | | | | \n"\ + " | | | | \n"\ + " | | \\---------/ \n"\ + " | | \n"\ + " | | \n"\ + " | | \n"\ + " | | \n"\ + " | | \n"\ + " | | \n"\ + " | | \n"\ + " | | \n"\ + " | | \n"\ + " | | \n"\ + " \\--------------------/" +#else +#define BLOCK "[]" +#define PLAY_FIELD_STR " ┏━━━━━━━━━━━━━━━━━━━━┓ ┏━━━━━━━━━━━━━━━┓ \n"\ + " ┃ ┃ ┃ ┃ \n"\ + " ┃ ┃ ┗━━━━━━━━━━━━━━━┛ \n"\ + " ┃ ┃ \n"\ + " ┃ ┃ \n"\ + " ┃ ┃ ┏━━━━━━━━━━━┓ \n"\ + " ┃ ┃ ┃ ┃ \n"\ + " ┃ ┃ ┃ ┃ \n"\ + " ┃ ┃ ┃ ┃ \n"\ + " ┃ ┃ ┃ ┃ \n"\ + " ┃ ┃ ┗━━━━━━━━━━━┛ \n"\ + " ┃ ┃ \n"\ + " ┃ ┃ \n"\ + " ┃ ┃ \n"\ + " ┃ ┃ \n"\ + " ┃ ┃ \n"\ + " ┃ ┃ \n"\ + " ┃ ┃ \n"\ + " ┃ ┃ \n"\ + " ┃ ┃ \n"\ + " ┃ ┃ \n"\ + " ┗━━━━━━━━━━━━━━━━━━━━┛ " +#endif + +#define X_OFFSET 8 +#define Y_OFFSET 0 + +struct cetris_game game; + +void curses_init() { + setlocale(LC_CTYPE, ""); + initscr(); + curs_set(0); + //noecho(); + keypad(stdscr, TRUE); + //timeout(1000 / CETRIS_HZ); + nodelay(stdscr, true); + + start_color(); + init_pair(COLOR_NONE, COLOR_BLACK, COLOR_BLACK); + init_pair(COLOR_O, COLOR_MAGENTA, COLOR_BLACK); + init_pair(COLOR_Z, COLOR_RED, COLOR_BLACK); + init_pair(COLOR_S, COLOR_CYAN, COLOR_BLACK); + init_pair(COLOR_T, COLOR_WHITE, COLOR_BLACK); + init_pair(COLOR_L, COLOR_GREEN, COLOR_BLACK); + init_pair(COLOR_I, COLOR_BLUE, COLOR_BLACK); + init_pair(COLOR_J, COLOR_YELLOW, COLOR_BLACK); + clear(); +} + +#ifdef _WIN32 +DWORD WINAPI game_loop(void* data) { + while(1) { + Sleep((1.0/60.0) * 1000.0); + update_game_tick(&game); + } + return 0; +} +#else +void *game_loop(void) { + while(1) { + usleep((1.0/60.0) * 1000000.0); + update_game_tick(&game); + } + return 0; +} +#endif + + +void draw_board() { + mvaddstr(0, 0, PLAY_FIELD_STR); + for (int x = 0; x < CETRIS_BOARD_X; x++) { + for (int y = CETRIS_BOARD_VISABLE; y < CETRIS_BOARD_Y; y++) { + if (game.board[x][y].occupied) { + attron(COLOR_PAIR(game.board[x][y].c)); + if (game.board[x][y].remove_tick > 0) { + if (game.tick % 2 == 0) { + mvaddstr((y - CETRIS_BOARD_VISABLE) + 1, x * 2 + X_OFFSET, BLOCK); + } + } else { + mvaddstr((y - CETRIS_BOARD_VISABLE) + 1, x * 2 + X_OFFSET, BLOCK); + } + attroff(COLOR_PAIR(game.board[x][y].c)); + } + } + + int index = game.current_index; + attron(COLOR_PAIR(game.piece_queue[index].c)); + for (int x = 0; x < 4; x++) { + for (int y = 0; y < 4; y++) { + if (game.piece_queue[index].m[y][x]) { + if (game.piece_queue[index].t == I) { + mvaddstr(6 + y, (x * 2) + 36, BLOCK); + } else { + mvaddstr(6 + y, (x * 2) + 37, BLOCK); + } + } + } + } + attroff(COLOR_PAIR(game.piece_queue[index].c)); + + attron(A_BOLD); + + char score[50]; + sprintf(score, "%li", game.score); + mvaddstr(1, (39 + X_OFFSET) - strlen(score), score); + + char level[20]; + sprintf(level, "%i", game.level); + mvaddstr(3, 37, "Level"); + mvaddstr(4, 40 - strlen(level), level); + + if (game.game_over) { + mvaddstr(10, 6 + X_OFFSET, "GAME OVER"); + mvaddstr(11, 5 + X_OFFSET, "r to restart"); + } + + attroff(A_BOLD); + } +} + +int main(void) { + curses_init(); + + init_game(&game); + +#ifdef _WIN32 + HANDLE thread = CreateThread(NULL, 0, game_loop, NULL, 0, NULL); +#else + pthread_t thread; + pthread_create(&thread, NULL, game_loop, (void*)0); +#endif + + int down = 0; + while(1) { + int keys[50]; int key_count = 0; + int moves[7]; memset(moves, 0, sizeof(int) * 7); + while((keys[key_count] = getch()) != ERR) key_count++; + if (down) move_piece(&game, DOWN); + for (int i = 0; i < key_count; i++) { + switch (keys[i]) { + case 'q': endwin(); exit(1); + case KEY_LEFT: + move_piece(&game, LEFT); + moves[LEFT] = 1; break; + case KEY_RIGHT: + move_piece(&game, RIGHT); + moves[RIGHT] = 1; break; + case KEY_DOWN: + down = 1; + moves[DOWN] = 1; break; + case KEY_UP: + move_piece(&game, ROTATE_CW); + moves[ROTATE_CW] = 1; break; + case ' ': + move_piece(&game, HARD_DROP); + moves[HARD_DROP] = 1; break; + case 'r': + if (game.game_over) { + init_game(&game); + } + break; + } + } + if (!moves[DOWN]) down = 0; + for (int i = 1; i < 8; i++) { + if (!moves[i]) stop_holding(&game, i); + } + erase(); + draw_board(); + refresh(); + } + return 0; +} + diff --git a/frontends/curses/meson.build b/frontends/curses/meson.build index 156f46d..a390193 100644 --- a/frontends/curses/meson.build +++ b/frontends/curses/meson.build @@ -1,14 +1,16 @@ -src = ['curses_ui.c'] - -inc = [] -if host_machine.system() == 'windows' - inc += include_directories('win') - curses = compiler.find_library('pdcurses', dirs: meson.current_source_dir() + '/win') -else - curses = dependency('ncursesw') -endif - -executable('cetris_curses', src, - dependencies: [curses, cetris], - include_directories: [inc, cetris_inc], - install: false) +src = ['curses_ui.c'] + +inc = [] +deps = [] +if host_machine.system() == 'windows' + inc += include_directories('win') + deps += compiler.find_library('pdcurses', dirs: meson.current_source_dir() + '/win') +else + deps += dependency('ncursesw') + deps += dependency('threads') +endif + +executable('cetris_curses', src, + dependencies: [deps, cetris], + include_directories: [inc, cetris_inc], + install: false) diff --git a/frontends/curses/win/curses.h b/frontends/curses/win/curses.h index 8251ec5..1ee294b 100644 --- a/frontends/curses/win/curses.h +++ b/frontends/curses/win/curses.h @@ -1,1383 +1,1383 @@ -/*----------------------------------------------------------------------* - * PDCurses * - *----------------------------------------------------------------------*/ - -#ifndef __PDCURSES__ -#define __PDCURSES__ 1 - -/*man-start************************************************************** - -Define before inclusion (only those needed): - - XCURSES True if compiling for X11. - PDC_RGB True if you want to use RGB color definitions - (Red = 1, Green = 2, Blue = 4) instead of BGR. - PDC_WIDE True if building wide-character support. - PDC_DLL_BUILD True if building a Windows DLL. - PDC_NCMOUSE Use the ncurses mouse API instead - of PDCurses' traditional mouse API. - -Defined by this header: - - PDCURSES Enables access to PDCurses-only routines. - PDC_BUILD Defines API build version. - PDC_VER_MAJOR Major version number - PDC_VER_MINOR Minor version number - PDC_VERDOT Version string - -**man-end****************************************************************/ - -#define PDCURSES 1 /* PDCurses-only routines */ -#define PDC_BUILD 3802 -#define PDC_VER_MAJOR 3 -#define PDC_VER_MINOR 8 -#define PDC_VERDOT "3.8" -#define CHTYPE_LONG 1 /* chtype >= 32 bits */ - -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -# define PDC_99 1 -#endif - -#if defined(__cplusplus) && __cplusplus >= 199711L -# define PDC_PP98 1 -#endif - -/*----------------------------------------------------------------------*/ - -#include -#include -#include /* Required by X/Open usage below */ - -#ifdef PDC_WIDE -# include -#endif - -#if defined(PDC_99) && !defined(__bool_true_false_are_defined) -# include -#endif - -#ifdef __cplusplus -extern "C" -{ -# ifndef PDC_PP98 -# define bool _bool -# endif -#endif - -/*---------------------------------------------------------------------- - * - * Constants and Types - * - */ - -#undef FALSE -#define FALSE 0 - -#undef TRUE -#define TRUE 1 - -#undef ERR -#define ERR (-1) - -#undef OK -#define OK 0 - -#if !defined(PDC_PP98) && !defined(__bool_true_false_are_defined) -typedef unsigned char bool; -#endif - -#if _LP64 -typedef unsigned int chtype; -#else -typedef unsigned long chtype; /* 16-bit attr + 16-bit char */ -#endif - -#ifdef PDC_WIDE -typedef chtype cchar_t; -#endif - -typedef chtype attr_t; - -/*---------------------------------------------------------------------- - * - * Version Info - * - */ - -/* Use this structure with PDC_get_version() for run-time info about the - way the library was built, in case it doesn't match the header. */ - -typedef struct -{ - short flags; /* flags OR'd together (see below) */ - short build; /* PDC_BUILD at compile time */ - unsigned char major; /* PDC_VER_MAJOR */ - unsigned char minor; /* PDC_VER_MINOR */ - unsigned char csize; /* sizeof chtype */ - unsigned char bsize; /* sizeof bool */ -} PDC_VERSION; - -enum -{ - PDC_VFLAG_DEBUG = 1, /* set if built with -DPDCDEBUG */ - PDC_VFLAG_WIDE = 2, /* -DPDC_WIDE */ - PDC_VFLAG_UTF8 = 4, /* -DPDC_FORCE_UTF8 */ - PDC_VFLAG_DLL = 8, /* -DPDC_DLL_BUILD */ - PDC_VFLAG_RGB = 16 /* -DPDC_RGB */ -}; - -/*---------------------------------------------------------------------- - * - * Mouse Interface -- SYSVR4, with extensions - * - */ - -#if _LP64 -typedef unsigned int mmask_t; -#else -typedef unsigned long mmask_t; -#endif - -typedef struct -{ - int x; /* absolute column, 0 based, measured in characters */ - int y; /* absolute row, 0 based, measured in characters */ - short button[3]; /* state of each button */ - int changes; /* flags indicating what has changed with the mouse */ -} MOUSE_STATUS; - -#define BUTTON_RELEASED 0x0000 -#define BUTTON_PRESSED 0x0001 -#define BUTTON_CLICKED 0x0002 -#define BUTTON_DOUBLE_CLICKED 0x0003 -#define BUTTON_TRIPLE_CLICKED 0x0004 -#define BUTTON_MOVED 0x0005 /* PDCurses */ -#define WHEEL_SCROLLED 0x0006 /* PDCurses */ -#define BUTTON_ACTION_MASK 0x0007 /* PDCurses */ - -#define PDC_BUTTON_SHIFT 0x0008 /* PDCurses */ -#define PDC_BUTTON_CONTROL 0x0010 /* PDCurses */ -#define PDC_BUTTON_ALT 0x0020 /* PDCurses */ -#define BUTTON_MODIFIER_MASK 0x0038 /* PDCurses */ - -#define MOUSE_X_POS (Mouse_status.x) -#define MOUSE_Y_POS (Mouse_status.y) - -/* - * Bits associated with the .changes field: - * 3 2 1 0 - * 210987654321098765432109876543210 - * 1 <- button 1 has changed - * 10 <- button 2 has changed - * 100 <- button 3 has changed - * 1000 <- mouse has moved - * 10000 <- mouse position report - * 100000 <- mouse wheel up - * 1000000 <- mouse wheel down - * 10000000 <- mouse wheel left - * 100000000 <- mouse wheel right - */ - -#define PDC_MOUSE_MOVED 0x0008 -#define PDC_MOUSE_POSITION 0x0010 -#define PDC_MOUSE_WHEEL_UP 0x0020 -#define PDC_MOUSE_WHEEL_DOWN 0x0040 -#define PDC_MOUSE_WHEEL_LEFT 0x0080 -#define PDC_MOUSE_WHEEL_RIGHT 0x0100 - -#define A_BUTTON_CHANGED (Mouse_status.changes & 7) -#define MOUSE_MOVED (Mouse_status.changes & PDC_MOUSE_MOVED) -#define MOUSE_POS_REPORT (Mouse_status.changes & PDC_MOUSE_POSITION) -#define BUTTON_CHANGED(x) (Mouse_status.changes & (1 << ((x) - 1))) -#define BUTTON_STATUS(x) (Mouse_status.button[(x) - 1]) -#define MOUSE_WHEEL_UP (Mouse_status.changes & PDC_MOUSE_WHEEL_UP) -#define MOUSE_WHEEL_DOWN (Mouse_status.changes & PDC_MOUSE_WHEEL_DOWN) -#define MOUSE_WHEEL_LEFT (Mouse_status.changes & PDC_MOUSE_WHEEL_LEFT) -#define MOUSE_WHEEL_RIGHT (Mouse_status.changes & PDC_MOUSE_WHEEL_RIGHT) - -/* mouse bit-masks */ - -#define BUTTON1_RELEASED 0x00000001L -#define BUTTON1_PRESSED 0x00000002L -#define BUTTON1_CLICKED 0x00000004L -#define BUTTON1_DOUBLE_CLICKED 0x00000008L -#define BUTTON1_TRIPLE_CLICKED 0x00000010L -#define BUTTON1_MOVED 0x00000010L /* PDCurses */ - -#define BUTTON2_RELEASED 0x00000020L -#define BUTTON2_PRESSED 0x00000040L -#define BUTTON2_CLICKED 0x00000080L -#define BUTTON2_DOUBLE_CLICKED 0x00000100L -#define BUTTON2_TRIPLE_CLICKED 0x00000200L -#define BUTTON2_MOVED 0x00000200L /* PDCurses */ - -#define BUTTON3_RELEASED 0x00000400L -#define BUTTON3_PRESSED 0x00000800L -#define BUTTON3_CLICKED 0x00001000L -#define BUTTON3_DOUBLE_CLICKED 0x00002000L -#define BUTTON3_TRIPLE_CLICKED 0x00004000L -#define BUTTON3_MOVED 0x00004000L /* PDCurses */ - -/* For the ncurses-compatible functions only, BUTTON4_PRESSED and - BUTTON5_PRESSED are returned for mouse scroll wheel up and down; - otherwise PDCurses doesn't support buttons 4 and 5 */ - -#define BUTTON4_RELEASED 0x00008000L -#define BUTTON4_PRESSED 0x00010000L -#define BUTTON4_CLICKED 0x00020000L -#define BUTTON4_DOUBLE_CLICKED 0x00040000L -#define BUTTON4_TRIPLE_CLICKED 0x00080000L - -#define BUTTON5_RELEASED 0x00100000L -#define BUTTON5_PRESSED 0x00200000L -#define BUTTON5_CLICKED 0x00400000L -#define BUTTON5_DOUBLE_CLICKED 0x00800000L -#define BUTTON5_TRIPLE_CLICKED 0x01000000L - -#define MOUSE_WHEEL_SCROLL 0x02000000L /* PDCurses */ -#define BUTTON_MODIFIER_SHIFT 0x04000000L /* PDCurses */ -#define BUTTON_MODIFIER_CONTROL 0x08000000L /* PDCurses */ -#define BUTTON_MODIFIER_ALT 0x10000000L /* PDCurses */ - -#define ALL_MOUSE_EVENTS 0x1fffffffL -#define REPORT_MOUSE_POSITION 0x20000000L - -/* ncurses mouse interface */ - -typedef struct -{ - short id; /* unused, always 0 */ - int x, y, z; /* x, y same as MOUSE_STATUS; z unused */ - mmask_t bstate; /* equivalent to changes + button[], but - in the same format as used for mousemask() */ -} MEVENT; - -#if defined(PDC_NCMOUSE) && !defined(NCURSES_MOUSE_VERSION) -# define NCURSES_MOUSE_VERSION 2 -#endif - -#ifdef NCURSES_MOUSE_VERSION -# define BUTTON_SHIFT BUTTON_MODIFIER_SHIFT -# define BUTTON_CONTROL BUTTON_MODIFIER_CONTROL -# define BUTTON_CTRL BUTTON_MODIFIER_CONTROL -# define BUTTON_ALT BUTTON_MODIFIER_ALT -#else -# define BUTTON_SHIFT PDC_BUTTON_SHIFT -# define BUTTON_CONTROL PDC_BUTTON_CONTROL -# define BUTTON_ALT PDC_BUTTON_ALT -#endif - -/*---------------------------------------------------------------------- - * - * Window and Screen Structures - * - */ - -typedef struct _win /* definition of a window */ -{ - int _cury; /* current pseudo-cursor */ - int _curx; - int _maxy; /* max window coordinates */ - int _maxx; - int _begy; /* origin on screen */ - int _begx; - int _flags; /* window properties */ - chtype _attrs; /* standard attributes and colors */ - chtype _bkgd; /* background, normally blank */ - bool _clear; /* causes clear at next refresh */ - bool _leaveit; /* leaves cursor where it is */ - bool _scroll; /* allows window scrolling */ - bool _nodelay; /* input character wait flag */ - bool _immed; /* immediate update flag */ - bool _sync; /* synchronise window ancestors */ - bool _use_keypad; /* flags keypad key mode active */ - chtype **_y; /* pointer to line pointer array */ - int *_firstch; /* first changed character in line */ - int *_lastch; /* last changed character in line */ - int _tmarg; /* top of scrolling region */ - int _bmarg; /* bottom of scrolling region */ - int _delayms; /* milliseconds of delay for getch() */ - int _parx, _pary; /* coords relative to parent (0,0) */ - struct _win *_parent; /* subwin's pointer to parent win */ -} WINDOW; - -/* Avoid using the SCREEN struct directly -- use the corresponding - functions if possible. This struct may eventually be made private. */ - -typedef struct -{ - bool alive; /* if initscr() called, and not endwin() */ - bool autocr; /* if cr -> lf */ - bool cbreak; /* if terminal unbuffered */ - bool echo; /* if terminal echo */ - bool raw_inp; /* raw input mode (v. cooked input) */ - bool raw_out; /* raw output mode (7 v. 8 bits) */ - bool audible; /* FALSE if the bell is visual */ - bool mono; /* TRUE if current screen is mono */ - short resized; /* TRUE if TERM has been resized */ - bool orig_attr; /* TRUE if we have the original colors */ - short orig_fore; /* original screen foreground color */ - short orig_back; /* original screen foreground color */ - int cursrow; /* position of physical cursor */ - int curscol; /* position of physical cursor */ - int visibility; /* visibility of cursor */ - int orig_cursor; /* original cursor size */ - int lines; /* new value for LINES */ - int cols; /* new value for COLS */ - mmask_t _trap_mbe; /* trap these mouse button events */ - int mouse_wait; /* time to wait (in ms) for a - button release after a press, in - order to count it as a click */ - int slklines; /* lines in use by slk_init() */ - WINDOW *slk_winptr; /* window for slk */ - int linesrippedoff; /* lines ripped off via ripoffline() */ - int linesrippedoffontop; /* lines ripped off on - top via ripoffline() */ - int delaytenths; /* 1/10ths second to wait block - getch() for */ - bool _preserve; /* TRUE if screen background - to be preserved */ - int _restore; /* specifies if screen background - to be restored, and how */ - bool save_key_modifiers; /* TRUE if each key modifiers saved - with each key press */ - bool return_key_modifiers; /* TRUE if modifier keys are - returned as "real" keys */ - bool key_code; /* TRUE if last key is a special key; - used internally by get_wch() */ -#ifdef XCURSES - int XcurscrSize; /* size of Xcurscr shared memory block */ - bool sb_on; - int sb_viewport_y; - int sb_viewport_x; - int sb_total_y; - int sb_total_x; - int sb_cur_y; - int sb_cur_x; -#endif - short line_color; /* color of line attributes - default -1 */ - attr_t termattrs; /* attribute capabilities */ -} SCREEN; - -/*---------------------------------------------------------------------- - * - * External Variables - * - */ - -#ifdef PDC_DLL_BUILD -# ifdef CURSES_LIBRARY -# define PDCEX __declspec(dllexport) extern -# else -# define PDCEX __declspec(dllimport) -# endif -#else -# define PDCEX extern -#endif - -PDCEX int LINES; /* terminal height */ -PDCEX int COLS; /* terminal width */ -PDCEX WINDOW *stdscr; /* the default screen window */ -PDCEX WINDOW *curscr; /* the current screen image */ -PDCEX SCREEN *SP; /* curses variables */ -PDCEX MOUSE_STATUS Mouse_status; -PDCEX int COLORS; -PDCEX int COLOR_PAIRS; -PDCEX int TABSIZE; -PDCEX chtype acs_map[]; /* alternate character set map */ -PDCEX char ttytype[]; /* terminal name/description */ - -/*man-start************************************************************** - -Text Attributes -=============== - -PDCurses uses a 32-bit integer for its chtype: - - +--------------------------------------------------------------------+ - |31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16|15|14|13|..| 2| 1| 0| - +--------------------------------------------------------------------+ - color pair | modifiers | character eg 'a' - -There are 256 color pairs (8 bits), 8 bits for modifiers, and 16 bits -for character data. The modifiers are bold, underline, right-line, -left-line, italic, reverse and blink, plus the alternate character set -indicator. - -**man-end****************************************************************/ - -/*** Video attribute macros ***/ - -#define A_NORMAL (chtype)0 - -#define A_ALTCHARSET (chtype)0x00010000 -#define A_RIGHT (chtype)0x00020000 -#define A_LEFT (chtype)0x00040000 -#define A_ITALIC (chtype)0x00080000 -#define A_UNDERLINE (chtype)0x00100000 -#define A_REVERSE (chtype)0x00200000 -#define A_BLINK (chtype)0x00400000 -#define A_BOLD (chtype)0x00800000 - -#define A_ATTRIBUTES (chtype)0xffff0000 -#define A_CHARTEXT (chtype)0x0000ffff -#define A_COLOR (chtype)0xff000000 - -#define PDC_COLOR_SHIFT 24 - -#define A_LEFTLINE A_LEFT -#define A_RIGHTLINE A_RIGHT -#define A_STANDOUT (A_REVERSE | A_BOLD) /* X/Open */ - -#define A_DIM A_NORMAL -#define A_INVIS A_NORMAL -#define A_PROTECT A_NORMAL - -#define A_HORIZONTAL A_NORMAL -#define A_LOW A_NORMAL -#define A_TOP A_NORMAL -#define A_VERTICAL A_NORMAL - -#define CHR_MSK A_CHARTEXT /* Obsolete */ -#define ATR_MSK A_ATTRIBUTES /* Obsolete */ -#define ATR_NRM A_NORMAL /* Obsolete */ - -/* For use with attr_t -- X/Open says, "these shall be distinct", so - this is a non-conforming implementation. */ - -#define WA_NORMAL A_NORMAL - -#define WA_ALTCHARSET A_ALTCHARSET -#define WA_BLINK A_BLINK -#define WA_BOLD A_BOLD -#define WA_DIM A_DIM -#define WA_INVIS A_INVIS -#define WA_ITALIC A_ITALIC -#define WA_LEFT A_LEFT -#define WA_PROTECT A_PROTECT -#define WA_REVERSE A_REVERSE -#define WA_RIGHT A_RIGHT -#define WA_STANDOUT A_STANDOUT -#define WA_UNDERLINE A_UNDERLINE - -#define WA_HORIZONTAL A_HORIZONTAL -#define WA_LOW A_LOW -#define WA_TOP A_TOP -#define WA_VERTICAL A_VERTICAL - -#define WA_ATTRIBUTES A_ATTRIBUTES - -/*** Alternate character set macros ***/ - -#define PDC_ACS(w) ((chtype)w | A_ALTCHARSET) - -/* VT100-compatible symbols -- box chars */ - -#define ACS_ULCORNER PDC_ACS('l') -#define ACS_LLCORNER PDC_ACS('m') -#define ACS_URCORNER PDC_ACS('k') -#define ACS_LRCORNER PDC_ACS('j') -#define ACS_RTEE PDC_ACS('u') -#define ACS_LTEE PDC_ACS('t') -#define ACS_BTEE PDC_ACS('v') -#define ACS_TTEE PDC_ACS('w') -#define ACS_HLINE PDC_ACS('q') -#define ACS_VLINE PDC_ACS('x') -#define ACS_PLUS PDC_ACS('n') - -/* VT100-compatible symbols -- other */ - -#define ACS_S1 PDC_ACS('o') -#define ACS_S9 PDC_ACS('s') -#define ACS_DIAMOND PDC_ACS('`') -#define ACS_CKBOARD PDC_ACS('a') -#define ACS_DEGREE PDC_ACS('f') -#define ACS_PLMINUS PDC_ACS('g') -#define ACS_BULLET PDC_ACS('~') - -/* Teletype 5410v1 symbols -- these are defined in SysV curses, but - are not well-supported by most terminals. Stick to VT100 characters - for optimum portability. */ - -#define ACS_LARROW PDC_ACS(',') -#define ACS_RARROW PDC_ACS('+') -#define ACS_DARROW PDC_ACS('.') -#define ACS_UARROW PDC_ACS('-') -#define ACS_BOARD PDC_ACS('h') -#define ACS_LANTERN PDC_ACS('i') -#define ACS_BLOCK PDC_ACS('0') - -/* That goes double for these -- undocumented SysV symbols. Don't use - them. */ - -#define ACS_S3 PDC_ACS('p') -#define ACS_S7 PDC_ACS('r') -#define ACS_LEQUAL PDC_ACS('y') -#define ACS_GEQUAL PDC_ACS('z') -#define ACS_PI PDC_ACS('{') -#define ACS_NEQUAL PDC_ACS('|') -#define ACS_STERLING PDC_ACS('}') - -/* Box char aliases */ - -#define ACS_BSSB ACS_ULCORNER -#define ACS_SSBB ACS_LLCORNER -#define ACS_BBSS ACS_URCORNER -#define ACS_SBBS ACS_LRCORNER -#define ACS_SBSS ACS_RTEE -#define ACS_SSSB ACS_LTEE -#define ACS_SSBS ACS_BTEE -#define ACS_BSSS ACS_TTEE -#define ACS_BSBS ACS_HLINE -#define ACS_SBSB ACS_VLINE -#define ACS_SSSS ACS_PLUS - -/* cchar_t aliases */ - -#ifdef PDC_WIDE -# define WACS_ULCORNER (&(acs_map['l'])) -# define WACS_LLCORNER (&(acs_map['m'])) -# define WACS_URCORNER (&(acs_map['k'])) -# define WACS_LRCORNER (&(acs_map['j'])) -# define WACS_RTEE (&(acs_map['u'])) -# define WACS_LTEE (&(acs_map['t'])) -# define WACS_BTEE (&(acs_map['v'])) -# define WACS_TTEE (&(acs_map['w'])) -# define WACS_HLINE (&(acs_map['q'])) -# define WACS_VLINE (&(acs_map['x'])) -# define WACS_PLUS (&(acs_map['n'])) - -# define WACS_S1 (&(acs_map['o'])) -# define WACS_S9 (&(acs_map['s'])) -# define WACS_DIAMOND (&(acs_map['`'])) -# define WACS_CKBOARD (&(acs_map['a'])) -# define WACS_DEGREE (&(acs_map['f'])) -# define WACS_PLMINUS (&(acs_map['g'])) -# define WACS_BULLET (&(acs_map['~'])) - -# define WACS_LARROW (&(acs_map[','])) -# define WACS_RARROW (&(acs_map['+'])) -# define WACS_DARROW (&(acs_map['.'])) -# define WACS_UARROW (&(acs_map['-'])) -# define WACS_BOARD (&(acs_map['h'])) -# define WACS_LANTERN (&(acs_map['i'])) -# define WACS_BLOCK (&(acs_map['0'])) - -# define WACS_S3 (&(acs_map['p'])) -# define WACS_S7 (&(acs_map['r'])) -# define WACS_LEQUAL (&(acs_map['y'])) -# define WACS_GEQUAL (&(acs_map['z'])) -# define WACS_PI (&(acs_map['{'])) -# define WACS_NEQUAL (&(acs_map['|'])) -# define WACS_STERLING (&(acs_map['}'])) - -# define WACS_BSSB WACS_ULCORNER -# define WACS_SSBB WACS_LLCORNER -# define WACS_BBSS WACS_URCORNER -# define WACS_SBBS WACS_LRCORNER -# define WACS_SBSS WACS_RTEE -# define WACS_SSSB WACS_LTEE -# define WACS_SSBS WACS_BTEE -# define WACS_BSSS WACS_TTEE -# define WACS_BSBS WACS_HLINE -# define WACS_SBSB WACS_VLINE -# define WACS_SSSS WACS_PLUS -#endif - -/*** Color macros ***/ - -#define COLOR_BLACK 0 - -#ifdef PDC_RGB /* RGB */ -# define COLOR_RED 1 -# define COLOR_GREEN 2 -# define COLOR_BLUE 4 -#else /* BGR */ -# define COLOR_BLUE 1 -# define COLOR_GREEN 2 -# define COLOR_RED 4 -#endif - -#define COLOR_CYAN (COLOR_BLUE | COLOR_GREEN) -#define COLOR_MAGENTA (COLOR_RED | COLOR_BLUE) -#define COLOR_YELLOW (COLOR_RED | COLOR_GREEN) - -#define COLOR_WHITE 7 - -/*---------------------------------------------------------------------- - * - * Function and Keypad Key Definitions - * Many are just for compatibility - * - */ - -#define KEY_CODE_YES 0x100 /* If get_wch() gives a key code */ - -#define KEY_BREAK 0x101 /* Not on PC KBD */ -#define KEY_DOWN 0x102 /* Down arrow key */ -#define KEY_UP 0x103 /* Up arrow key */ -#define KEY_LEFT 0x104 /* Left arrow key */ -#define KEY_RIGHT 0x105 /* Right arrow key */ -#define KEY_HOME 0x106 /* home key */ -#define KEY_BACKSPACE 0x107 /* not on pc */ -#define KEY_F0 0x108 /* function keys; 64 reserved */ - -#define KEY_DL 0x148 /* delete line */ -#define KEY_IL 0x149 /* insert line */ -#define KEY_DC 0x14a /* delete character */ -#define KEY_IC 0x14b /* insert char or enter ins mode */ -#define KEY_EIC 0x14c /* exit insert char mode */ -#define KEY_CLEAR 0x14d /* clear screen */ -#define KEY_EOS 0x14e /* clear to end of screen */ -#define KEY_EOL 0x14f /* clear to end of line */ -#define KEY_SF 0x150 /* scroll 1 line forward */ -#define KEY_SR 0x151 /* scroll 1 line back (reverse) */ -#define KEY_NPAGE 0x152 /* next page */ -#define KEY_PPAGE 0x153 /* previous page */ -#define KEY_STAB 0x154 /* set tab */ -#define KEY_CTAB 0x155 /* clear tab */ -#define KEY_CATAB 0x156 /* clear all tabs */ -#define KEY_ENTER 0x157 /* enter or send (unreliable) */ -#define KEY_SRESET 0x158 /* soft/reset (partial/unreliable) */ -#define KEY_RESET 0x159 /* reset/hard reset (unreliable) */ -#define KEY_PRINT 0x15a /* print/copy */ -#define KEY_LL 0x15b /* home down/bottom (lower left) */ -#define KEY_ABORT 0x15c /* abort/terminate key (any) */ -#define KEY_SHELP 0x15d /* short help */ -#define KEY_LHELP 0x15e /* long help */ -#define KEY_BTAB 0x15f /* Back tab key */ -#define KEY_BEG 0x160 /* beg(inning) key */ -#define KEY_CANCEL 0x161 /* cancel key */ -#define KEY_CLOSE 0x162 /* close key */ -#define KEY_COMMAND 0x163 /* cmd (command) key */ -#define KEY_COPY 0x164 /* copy key */ -#define KEY_CREATE 0x165 /* create key */ -#define KEY_END 0x166 /* end key */ -#define KEY_EXIT 0x167 /* exit key */ -#define KEY_FIND 0x168 /* find key */ -#define KEY_HELP 0x169 /* help key */ -#define KEY_MARK 0x16a /* mark key */ -#define KEY_MESSAGE 0x16b /* message key */ -#define KEY_MOVE 0x16c /* move key */ -#define KEY_NEXT 0x16d /* next object key */ -#define KEY_OPEN 0x16e /* open key */ -#define KEY_OPTIONS 0x16f /* options key */ -#define KEY_PREVIOUS 0x170 /* previous object key */ -#define KEY_REDO 0x171 /* redo key */ -#define KEY_REFERENCE 0x172 /* ref(erence) key */ -#define KEY_REFRESH 0x173 /* refresh key */ -#define KEY_REPLACE 0x174 /* replace key */ -#define KEY_RESTART 0x175 /* restart key */ -#define KEY_RESUME 0x176 /* resume key */ -#define KEY_SAVE 0x177 /* save key */ -#define KEY_SBEG 0x178 /* shifted beginning key */ -#define KEY_SCANCEL 0x179 /* shifted cancel key */ -#define KEY_SCOMMAND 0x17a /* shifted command key */ -#define KEY_SCOPY 0x17b /* shifted copy key */ -#define KEY_SCREATE 0x17c /* shifted create key */ -#define KEY_SDC 0x17d /* shifted delete char key */ -#define KEY_SDL 0x17e /* shifted delete line key */ -#define KEY_SELECT 0x17f /* select key */ -#define KEY_SEND 0x180 /* shifted end key */ -#define KEY_SEOL 0x181 /* shifted clear line key */ -#define KEY_SEXIT 0x182 /* shifted exit key */ -#define KEY_SFIND 0x183 /* shifted find key */ -#define KEY_SHOME 0x184 /* shifted home key */ -#define KEY_SIC 0x185 /* shifted input key */ - -#define KEY_SLEFT 0x187 /* shifted left arrow key */ -#define KEY_SMESSAGE 0x188 /* shifted message key */ -#define KEY_SMOVE 0x189 /* shifted move key */ -#define KEY_SNEXT 0x18a /* shifted next key */ -#define KEY_SOPTIONS 0x18b /* shifted options key */ -#define KEY_SPREVIOUS 0x18c /* shifted prev key */ -#define KEY_SPRINT 0x18d /* shifted print key */ -#define KEY_SREDO 0x18e /* shifted redo key */ -#define KEY_SREPLACE 0x18f /* shifted replace key */ -#define KEY_SRIGHT 0x190 /* shifted right arrow */ -#define KEY_SRSUME 0x191 /* shifted resume key */ -#define KEY_SSAVE 0x192 /* shifted save key */ -#define KEY_SSUSPEND 0x193 /* shifted suspend key */ -#define KEY_SUNDO 0x194 /* shifted undo key */ -#define KEY_SUSPEND 0x195 /* suspend key */ -#define KEY_UNDO 0x196 /* undo key */ - -/* PDCurses-specific key definitions -- PC only */ - -#define ALT_0 0x197 -#define ALT_1 0x198 -#define ALT_2 0x199 -#define ALT_3 0x19a -#define ALT_4 0x19b -#define ALT_5 0x19c -#define ALT_6 0x19d -#define ALT_7 0x19e -#define ALT_8 0x19f -#define ALT_9 0x1a0 -#define ALT_A 0x1a1 -#define ALT_B 0x1a2 -#define ALT_C 0x1a3 -#define ALT_D 0x1a4 -#define ALT_E 0x1a5 -#define ALT_F 0x1a6 -#define ALT_G 0x1a7 -#define ALT_H 0x1a8 -#define ALT_I 0x1a9 -#define ALT_J 0x1aa -#define ALT_K 0x1ab -#define ALT_L 0x1ac -#define ALT_M 0x1ad -#define ALT_N 0x1ae -#define ALT_O 0x1af -#define ALT_P 0x1b0 -#define ALT_Q 0x1b1 -#define ALT_R 0x1b2 -#define ALT_S 0x1b3 -#define ALT_T 0x1b4 -#define ALT_U 0x1b5 -#define ALT_V 0x1b6 -#define ALT_W 0x1b7 -#define ALT_X 0x1b8 -#define ALT_Y 0x1b9 -#define ALT_Z 0x1ba - -#define CTL_LEFT 0x1bb /* Control-Left-Arrow */ -#define CTL_RIGHT 0x1bc -#define CTL_PGUP 0x1bd -#define CTL_PGDN 0x1be -#define CTL_HOME 0x1bf -#define CTL_END 0x1c0 - -#define KEY_A1 0x1c1 /* upper left on Virtual keypad */ -#define KEY_A2 0x1c2 /* upper middle on Virt. keypad */ -#define KEY_A3 0x1c3 /* upper right on Vir. keypad */ -#define KEY_B1 0x1c4 /* middle left on Virt. keypad */ -#define KEY_B2 0x1c5 /* center on Virt. keypad */ -#define KEY_B3 0x1c6 /* middle right on Vir. keypad */ -#define KEY_C1 0x1c7 /* lower left on Virt. keypad */ -#define KEY_C2 0x1c8 /* lower middle on Virt. keypad */ -#define KEY_C3 0x1c9 /* lower right on Vir. keypad */ - -#define PADSLASH 0x1ca /* slash on keypad */ -#define PADENTER 0x1cb /* enter on keypad */ -#define CTL_PADENTER 0x1cc /* ctl-enter on keypad */ -#define ALT_PADENTER 0x1cd /* alt-enter on keypad */ -#define PADSTOP 0x1ce /* stop on keypad */ -#define PADSTAR 0x1cf /* star on keypad */ -#define PADMINUS 0x1d0 /* minus on keypad */ -#define PADPLUS 0x1d1 /* plus on keypad */ -#define CTL_PADSTOP 0x1d2 /* ctl-stop on keypad */ -#define CTL_PADCENTER 0x1d3 /* ctl-enter on keypad */ -#define CTL_PADPLUS 0x1d4 /* ctl-plus on keypad */ -#define CTL_PADMINUS 0x1d5 /* ctl-minus on keypad */ -#define CTL_PADSLASH 0x1d6 /* ctl-slash on keypad */ -#define CTL_PADSTAR 0x1d7 /* ctl-star on keypad */ -#define ALT_PADPLUS 0x1d8 /* alt-plus on keypad */ -#define ALT_PADMINUS 0x1d9 /* alt-minus on keypad */ -#define ALT_PADSLASH 0x1da /* alt-slash on keypad */ -#define ALT_PADSTAR 0x1db /* alt-star on keypad */ -#define ALT_PADSTOP 0x1dc /* alt-stop on keypad */ -#define CTL_INS 0x1dd /* ctl-insert */ -#define ALT_DEL 0x1de /* alt-delete */ -#define ALT_INS 0x1df /* alt-insert */ -#define CTL_UP 0x1e0 /* ctl-up arrow */ -#define CTL_DOWN 0x1e1 /* ctl-down arrow */ -#define CTL_TAB 0x1e2 /* ctl-tab */ -#define ALT_TAB 0x1e3 -#define ALT_MINUS 0x1e4 -#define ALT_EQUAL 0x1e5 -#define ALT_HOME 0x1e6 -#define ALT_PGUP 0x1e7 -#define ALT_PGDN 0x1e8 -#define ALT_END 0x1e9 -#define ALT_UP 0x1ea /* alt-up arrow */ -#define ALT_DOWN 0x1eb /* alt-down arrow */ -#define ALT_RIGHT 0x1ec /* alt-right arrow */ -#define ALT_LEFT 0x1ed /* alt-left arrow */ -#define ALT_ENTER 0x1ee /* alt-enter */ -#define ALT_ESC 0x1ef /* alt-escape */ -#define ALT_BQUOTE 0x1f0 /* alt-back quote */ -#define ALT_LBRACKET 0x1f1 /* alt-left bracket */ -#define ALT_RBRACKET 0x1f2 /* alt-right bracket */ -#define ALT_SEMICOLON 0x1f3 /* alt-semi-colon */ -#define ALT_FQUOTE 0x1f4 /* alt-forward quote */ -#define ALT_COMMA 0x1f5 /* alt-comma */ -#define ALT_STOP 0x1f6 /* alt-stop */ -#define ALT_FSLASH 0x1f7 /* alt-forward slash */ -#define ALT_BKSP 0x1f8 /* alt-backspace */ -#define CTL_BKSP 0x1f9 /* ctl-backspace */ -#define PAD0 0x1fa /* keypad 0 */ - -#define CTL_PAD0 0x1fb /* ctl-keypad 0 */ -#define CTL_PAD1 0x1fc -#define CTL_PAD2 0x1fd -#define CTL_PAD3 0x1fe -#define CTL_PAD4 0x1ff -#define CTL_PAD5 0x200 -#define CTL_PAD6 0x201 -#define CTL_PAD7 0x202 -#define CTL_PAD8 0x203 -#define CTL_PAD9 0x204 - -#define ALT_PAD0 0x205 /* alt-keypad 0 */ -#define ALT_PAD1 0x206 -#define ALT_PAD2 0x207 -#define ALT_PAD3 0x208 -#define ALT_PAD4 0x209 -#define ALT_PAD5 0x20a -#define ALT_PAD6 0x20b -#define ALT_PAD7 0x20c -#define ALT_PAD8 0x20d -#define ALT_PAD9 0x20e - -#define CTL_DEL 0x20f /* clt-delete */ -#define ALT_BSLASH 0x210 /* alt-back slash */ -#define CTL_ENTER 0x211 /* ctl-enter */ - -#define SHF_PADENTER 0x212 /* shift-enter on keypad */ -#define SHF_PADSLASH 0x213 /* shift-slash on keypad */ -#define SHF_PADSTAR 0x214 /* shift-star on keypad */ -#define SHF_PADPLUS 0x215 /* shift-plus on keypad */ -#define SHF_PADMINUS 0x216 /* shift-minus on keypad */ -#define SHF_UP 0x217 /* shift-up on keypad */ -#define SHF_DOWN 0x218 /* shift-down on keypad */ -#define SHF_IC 0x219 /* shift-insert on keypad */ -#define SHF_DC 0x21a /* shift-delete on keypad */ - -#define KEY_MOUSE 0x21b /* "mouse" key */ -#define KEY_SHIFT_L 0x21c /* Left-shift */ -#define KEY_SHIFT_R 0x21d /* Right-shift */ -#define KEY_CONTROL_L 0x21e /* Left-control */ -#define KEY_CONTROL_R 0x21f /* Right-control */ -#define KEY_ALT_L 0x220 /* Left-alt */ -#define KEY_ALT_R 0x221 /* Right-alt */ -#define KEY_RESIZE 0x222 /* Window resize */ -#define KEY_SUP 0x223 /* Shifted up arrow */ -#define KEY_SDOWN 0x224 /* Shifted down arrow */ - -#define KEY_MIN KEY_BREAK /* Minimum curses key value */ -#define KEY_MAX KEY_SDOWN /* Maximum curses key */ - -#define KEY_F(n) (KEY_F0 + (n)) - -/*---------------------------------------------------------------------- - * - * Functions - * - */ - -/* Standard */ - -PDCEX int addch(const chtype); -PDCEX int addchnstr(const chtype *, int); -PDCEX int addchstr(const chtype *); -PDCEX int addnstr(const char *, int); -PDCEX int addstr(const char *); -PDCEX int attroff(chtype); -PDCEX int attron(chtype); -PDCEX int attrset(chtype); -PDCEX int attr_get(attr_t *, short *, void *); -PDCEX int attr_off(attr_t, void *); -PDCEX int attr_on(attr_t, void *); -PDCEX int attr_set(attr_t, short, void *); -PDCEX int baudrate(void); -PDCEX int beep(void); -PDCEX int bkgd(chtype); -PDCEX void bkgdset(chtype); -PDCEX int border(chtype, chtype, chtype, chtype, - chtype, chtype, chtype, chtype); -PDCEX int box(WINDOW *, chtype, chtype); -PDCEX bool can_change_color(void); -PDCEX int cbreak(void); -PDCEX int chgat(int, attr_t, short, const void *); -PDCEX int clearok(WINDOW *, bool); -PDCEX int clear(void); -PDCEX int clrtobot(void); -PDCEX int clrtoeol(void); -PDCEX int color_content(short, short *, short *, short *); -PDCEX int color_set(short, void *); -PDCEX int copywin(const WINDOW *, WINDOW *, int, int, int, - int, int, int, int); -PDCEX int curs_set(int); -PDCEX int def_prog_mode(void); -PDCEX int def_shell_mode(void); -PDCEX int delay_output(int); -PDCEX int delch(void); -PDCEX int deleteln(void); -PDCEX void delscreen(SCREEN *); -PDCEX int delwin(WINDOW *); -PDCEX WINDOW *derwin(WINDOW *, int, int, int, int); -PDCEX int doupdate(void); -PDCEX WINDOW *dupwin(WINDOW *); -PDCEX int echochar(const chtype); -PDCEX int echo(void); -PDCEX int endwin(void); -PDCEX char erasechar(void); -PDCEX int erase(void); -PDCEX void filter(void); -PDCEX int flash(void); -PDCEX int flushinp(void); -PDCEX chtype getbkgd(WINDOW *); -PDCEX int getnstr(char *, int); -PDCEX int getstr(char *); -PDCEX WINDOW *getwin(FILE *); -PDCEX int halfdelay(int); -PDCEX bool has_colors(void); -PDCEX bool has_ic(void); -PDCEX bool has_il(void); -PDCEX int hline(chtype, int); -PDCEX void idcok(WINDOW *, bool); -PDCEX int idlok(WINDOW *, bool); -PDCEX void immedok(WINDOW *, bool); -PDCEX int inchnstr(chtype *, int); -PDCEX int inchstr(chtype *); -PDCEX chtype inch(void); -PDCEX int init_color(short, short, short, short); -PDCEX int init_pair(short, short, short); -PDCEX WINDOW *initscr(void); -PDCEX int innstr(char *, int); -PDCEX int insch(chtype); -PDCEX int insdelln(int); -PDCEX int insertln(void); -PDCEX int insnstr(const char *, int); -PDCEX int insstr(const char *); -PDCEX int instr(char *); -PDCEX int intrflush(WINDOW *, bool); -PDCEX bool isendwin(void); -PDCEX bool is_linetouched(WINDOW *, int); -PDCEX bool is_wintouched(WINDOW *); -PDCEX char *keyname(int); -PDCEX int keypad(WINDOW *, bool); -PDCEX char killchar(void); -PDCEX int leaveok(WINDOW *, bool); -PDCEX char *longname(void); -PDCEX int meta(WINDOW *, bool); -PDCEX int move(int, int); -PDCEX int mvaddch(int, int, const chtype); -PDCEX int mvaddchnstr(int, int, const chtype *, int); -PDCEX int mvaddchstr(int, int, const chtype *); -PDCEX int mvaddnstr(int, int, const char *, int); -PDCEX int mvaddstr(int, int, const char *); -PDCEX int mvchgat(int, int, int, attr_t, short, const void *); -PDCEX int mvcur(int, int, int, int); -PDCEX int mvdelch(int, int); -PDCEX int mvderwin(WINDOW *, int, int); -PDCEX int mvgetch(int, int); -PDCEX int mvgetnstr(int, int, char *, int); -PDCEX int mvgetstr(int, int, char *); -PDCEX int mvhline(int, int, chtype, int); -PDCEX chtype mvinch(int, int); -PDCEX int mvinchnstr(int, int, chtype *, int); -PDCEX int mvinchstr(int, int, chtype *); -PDCEX int mvinnstr(int, int, char *, int); -PDCEX int mvinsch(int, int, chtype); -PDCEX int mvinsnstr(int, int, const char *, int); -PDCEX int mvinsstr(int, int, const char *); -PDCEX int mvinstr(int, int, char *); -PDCEX int mvprintw(int, int, const char *, ...); -PDCEX int mvscanw(int, int, const char *, ...); -PDCEX int mvvline(int, int, chtype, int); -PDCEX int mvwaddchnstr(WINDOW *, int, int, const chtype *, int); -PDCEX int mvwaddchstr(WINDOW *, int, int, const chtype *); -PDCEX int mvwaddch(WINDOW *, int, int, const chtype); -PDCEX int mvwaddnstr(WINDOW *, int, int, const char *, int); -PDCEX int mvwaddstr(WINDOW *, int, int, const char *); -PDCEX int mvwchgat(WINDOW *, int, int, int, attr_t, short, const void *); -PDCEX int mvwdelch(WINDOW *, int, int); -PDCEX int mvwgetch(WINDOW *, int, int); -PDCEX int mvwgetnstr(WINDOW *, int, int, char *, int); -PDCEX int mvwgetstr(WINDOW *, int, int, char *); -PDCEX int mvwhline(WINDOW *, int, int, chtype, int); -PDCEX int mvwinchnstr(WINDOW *, int, int, chtype *, int); -PDCEX int mvwinchstr(WINDOW *, int, int, chtype *); -PDCEX chtype mvwinch(WINDOW *, int, int); -PDCEX int mvwinnstr(WINDOW *, int, int, char *, int); -PDCEX int mvwinsch(WINDOW *, int, int, chtype); -PDCEX int mvwinsnstr(WINDOW *, int, int, const char *, int); -PDCEX int mvwinsstr(WINDOW *, int, int, const char *); -PDCEX int mvwinstr(WINDOW *, int, int, char *); -PDCEX int mvwin(WINDOW *, int, int); -PDCEX int mvwprintw(WINDOW *, int, int, const char *, ...); -PDCEX int mvwscanw(WINDOW *, int, int, const char *, ...); -PDCEX int mvwvline(WINDOW *, int, int, chtype, int); -PDCEX int napms(int); -PDCEX WINDOW *newpad(int, int); -PDCEX SCREEN *newterm(const char *, FILE *, FILE *); -PDCEX WINDOW *newwin(int, int, int, int); -PDCEX int nl(void); -PDCEX int nocbreak(void); -PDCEX int nodelay(WINDOW *, bool); -PDCEX int noecho(void); -PDCEX int nonl(void); -PDCEX void noqiflush(void); -PDCEX int noraw(void); -PDCEX int notimeout(WINDOW *, bool); -PDCEX int overlay(const WINDOW *, WINDOW *); -PDCEX int overwrite(const WINDOW *, WINDOW *); -PDCEX int pair_content(short, short *, short *); -PDCEX int pechochar(WINDOW *, chtype); -PDCEX int pnoutrefresh(WINDOW *, int, int, int, int, int, int); -PDCEX int prefresh(WINDOW *, int, int, int, int, int, int); -PDCEX int printw(const char *, ...); -PDCEX int putwin(WINDOW *, FILE *); -PDCEX void qiflush(void); -PDCEX int raw(void); -PDCEX int redrawwin(WINDOW *); -PDCEX int refresh(void); -PDCEX int reset_prog_mode(void); -PDCEX int reset_shell_mode(void); -PDCEX int resetty(void); -PDCEX int ripoffline(int, int (*)(WINDOW *, int)); -PDCEX int savetty(void); -PDCEX int scanw(const char *, ...); -PDCEX int scr_dump(const char *); -PDCEX int scr_init(const char *); -PDCEX int scr_restore(const char *); -PDCEX int scr_set(const char *); -PDCEX int scrl(int); -PDCEX int scroll(WINDOW *); -PDCEX int scrollok(WINDOW *, bool); -PDCEX SCREEN *set_term(SCREEN *); -PDCEX int setscrreg(int, int); -PDCEX int slk_attroff(const chtype); -PDCEX int slk_attr_off(const attr_t, void *); -PDCEX int slk_attron(const chtype); -PDCEX int slk_attr_on(const attr_t, void *); -PDCEX int slk_attrset(const chtype); -PDCEX int slk_attr_set(const attr_t, short, void *); -PDCEX int slk_clear(void); -PDCEX int slk_color(short); -PDCEX int slk_init(int); -PDCEX char *slk_label(int); -PDCEX int slk_noutrefresh(void); -PDCEX int slk_refresh(void); -PDCEX int slk_restore(void); -PDCEX int slk_set(int, const char *, int); -PDCEX int slk_touch(void); -PDCEX int standend(void); -PDCEX int standout(void); -PDCEX int start_color(void); -PDCEX WINDOW *subpad(WINDOW *, int, int, int, int); -PDCEX WINDOW *subwin(WINDOW *, int, int, int, int); -PDCEX int syncok(WINDOW *, bool); -PDCEX chtype termattrs(void); -PDCEX attr_t term_attrs(void); -PDCEX char *termname(void); -PDCEX void timeout(int); -PDCEX int touchline(WINDOW *, int, int); -PDCEX int touchwin(WINDOW *); -PDCEX int typeahead(int); -PDCEX int untouchwin(WINDOW *); -PDCEX void use_env(bool); -PDCEX int vidattr(chtype); -PDCEX int vid_attr(attr_t, short, void *); -PDCEX int vidputs(chtype, int (*)(int)); -PDCEX int vid_puts(attr_t, short, void *, int (*)(int)); -PDCEX int vline(chtype, int); -PDCEX int vw_printw(WINDOW *, const char *, va_list); -PDCEX int vwprintw(WINDOW *, const char *, va_list); -PDCEX int vw_scanw(WINDOW *, const char *, va_list); -PDCEX int vwscanw(WINDOW *, const char *, va_list); -PDCEX int waddchnstr(WINDOW *, const chtype *, int); -PDCEX int waddchstr(WINDOW *, const chtype *); -PDCEX int waddch(WINDOW *, const chtype); -PDCEX int waddnstr(WINDOW *, const char *, int); -PDCEX int waddstr(WINDOW *, const char *); -PDCEX int wattroff(WINDOW *, chtype); -PDCEX int wattron(WINDOW *, chtype); -PDCEX int wattrset(WINDOW *, chtype); -PDCEX int wattr_get(WINDOW *, attr_t *, short *, void *); -PDCEX int wattr_off(WINDOW *, attr_t, void *); -PDCEX int wattr_on(WINDOW *, attr_t, void *); -PDCEX int wattr_set(WINDOW *, attr_t, short, void *); -PDCEX void wbkgdset(WINDOW *, chtype); -PDCEX int wbkgd(WINDOW *, chtype); -PDCEX int wborder(WINDOW *, chtype, chtype, chtype, chtype, - chtype, chtype, chtype, chtype); -PDCEX int wchgat(WINDOW *, int, attr_t, short, const void *); -PDCEX int wclear(WINDOW *); -PDCEX int wclrtobot(WINDOW *); -PDCEX int wclrtoeol(WINDOW *); -PDCEX int wcolor_set(WINDOW *, short, void *); -PDCEX void wcursyncup(WINDOW *); -PDCEX int wdelch(WINDOW *); -PDCEX int wdeleteln(WINDOW *); -PDCEX int wechochar(WINDOW *, const chtype); -PDCEX int werase(WINDOW *); -PDCEX int wgetch(WINDOW *); -PDCEX int wgetnstr(WINDOW *, char *, int); -PDCEX int wgetstr(WINDOW *, char *); -PDCEX int whline(WINDOW *, chtype, int); -PDCEX int winchnstr(WINDOW *, chtype *, int); -PDCEX int winchstr(WINDOW *, chtype *); -PDCEX chtype winch(WINDOW *); -PDCEX int winnstr(WINDOW *, char *, int); -PDCEX int winsch(WINDOW *, chtype); -PDCEX int winsdelln(WINDOW *, int); -PDCEX int winsertln(WINDOW *); -PDCEX int winsnstr(WINDOW *, const char *, int); -PDCEX int winsstr(WINDOW *, const char *); -PDCEX int winstr(WINDOW *, char *); -PDCEX int wmove(WINDOW *, int, int); -PDCEX int wnoutrefresh(WINDOW *); -PDCEX int wprintw(WINDOW *, const char *, ...); -PDCEX int wredrawln(WINDOW *, int, int); -PDCEX int wrefresh(WINDOW *); -PDCEX int wscanw(WINDOW *, const char *, ...); -PDCEX int wscrl(WINDOW *, int); -PDCEX int wsetscrreg(WINDOW *, int, int); -PDCEX int wstandend(WINDOW *); -PDCEX int wstandout(WINDOW *); -PDCEX void wsyncdown(WINDOW *); -PDCEX void wsyncup(WINDOW *); -PDCEX void wtimeout(WINDOW *, int); -PDCEX int wtouchln(WINDOW *, int, int, int); -PDCEX int wvline(WINDOW *, chtype, int); - -/* Wide-character functions */ - -#ifdef PDC_WIDE -PDCEX int addnwstr(const wchar_t *, int); -PDCEX int addwstr(const wchar_t *); -PDCEX int add_wch(const cchar_t *); -PDCEX int add_wchnstr(const cchar_t *, int); -PDCEX int add_wchstr(const cchar_t *); -PDCEX int bkgrnd(const cchar_t *); -PDCEX void bkgrndset(const cchar_t *); -PDCEX int border_set(const cchar_t *, const cchar_t *, const cchar_t *, - const cchar_t *, const cchar_t *, const cchar_t *, - const cchar_t *, const cchar_t *); -PDCEX int box_set(WINDOW *, const cchar_t *, const cchar_t *); -PDCEX int echo_wchar(const cchar_t *); -PDCEX int erasewchar(wchar_t *); -PDCEX int getbkgrnd(cchar_t *); -PDCEX int getcchar(const cchar_t *, wchar_t *, attr_t *, short *, void *); -PDCEX int getn_wstr(wint_t *, int); -PDCEX int get_wch(wint_t *); -PDCEX int get_wstr(wint_t *); -PDCEX int hline_set(const cchar_t *, int); -PDCEX int innwstr(wchar_t *, int); -PDCEX int ins_nwstr(const wchar_t *, int); -PDCEX int ins_wch(const cchar_t *); -PDCEX int ins_wstr(const wchar_t *); -PDCEX int inwstr(wchar_t *); -PDCEX int in_wch(cchar_t *); -PDCEX int in_wchnstr(cchar_t *, int); -PDCEX int in_wchstr(cchar_t *); -PDCEX char *key_name(wchar_t); -PDCEX int killwchar(wchar_t *); -PDCEX int mvaddnwstr(int, int, const wchar_t *, int); -PDCEX int mvaddwstr(int, int, const wchar_t *); -PDCEX int mvadd_wch(int, int, const cchar_t *); -PDCEX int mvadd_wchnstr(int, int, const cchar_t *, int); -PDCEX int mvadd_wchstr(int, int, const cchar_t *); -PDCEX int mvgetn_wstr(int, int, wint_t *, int); -PDCEX int mvget_wch(int, int, wint_t *); -PDCEX int mvget_wstr(int, int, wint_t *); -PDCEX int mvhline_set(int, int, const cchar_t *, int); -PDCEX int mvinnwstr(int, int, wchar_t *, int); -PDCEX int mvins_nwstr(int, int, const wchar_t *, int); -PDCEX int mvins_wch(int, int, const cchar_t *); -PDCEX int mvins_wstr(int, int, const wchar_t *); -PDCEX int mvinwstr(int, int, wchar_t *); -PDCEX int mvin_wch(int, int, cchar_t *); -PDCEX int mvin_wchnstr(int, int, cchar_t *, int); -PDCEX int mvin_wchstr(int, int, cchar_t *); -PDCEX int mvvline_set(int, int, const cchar_t *, int); -PDCEX int mvwaddnwstr(WINDOW *, int, int, const wchar_t *, int); -PDCEX int mvwaddwstr(WINDOW *, int, int, const wchar_t *); -PDCEX int mvwadd_wch(WINDOW *, int, int, const cchar_t *); -PDCEX int mvwadd_wchnstr(WINDOW *, int, int, const cchar_t *, int); -PDCEX int mvwadd_wchstr(WINDOW *, int, int, const cchar_t *); -PDCEX int mvwgetn_wstr(WINDOW *, int, int, wint_t *, int); -PDCEX int mvwget_wch(WINDOW *, int, int, wint_t *); -PDCEX int mvwget_wstr(WINDOW *, int, int, wint_t *); -PDCEX int mvwhline_set(WINDOW *, int, int, const cchar_t *, int); -PDCEX int mvwinnwstr(WINDOW *, int, int, wchar_t *, int); -PDCEX int mvwins_nwstr(WINDOW *, int, int, const wchar_t *, int); -PDCEX int mvwins_wch(WINDOW *, int, int, const cchar_t *); -PDCEX int mvwins_wstr(WINDOW *, int, int, const wchar_t *); -PDCEX int mvwin_wch(WINDOW *, int, int, cchar_t *); -PDCEX int mvwin_wchnstr(WINDOW *, int, int, cchar_t *, int); -PDCEX int mvwin_wchstr(WINDOW *, int, int, cchar_t *); -PDCEX int mvwinwstr(WINDOW *, int, int, wchar_t *); -PDCEX int mvwvline_set(WINDOW *, int, int, const cchar_t *, int); -PDCEX int pecho_wchar(WINDOW *, const cchar_t*); -PDCEX int setcchar(cchar_t*, const wchar_t*, const attr_t, - short, const void*); -PDCEX int slk_wset(int, const wchar_t *, int); -PDCEX int unget_wch(const wchar_t); -PDCEX int vline_set(const cchar_t *, int); -PDCEX int waddnwstr(WINDOW *, const wchar_t *, int); -PDCEX int waddwstr(WINDOW *, const wchar_t *); -PDCEX int wadd_wch(WINDOW *, const cchar_t *); -PDCEX int wadd_wchnstr(WINDOW *, const cchar_t *, int); -PDCEX int wadd_wchstr(WINDOW *, const cchar_t *); -PDCEX int wbkgrnd(WINDOW *, const cchar_t *); -PDCEX void wbkgrndset(WINDOW *, const cchar_t *); -PDCEX int wborder_set(WINDOW *, const cchar_t *, const cchar_t *, - const cchar_t *, const cchar_t *, const cchar_t *, - const cchar_t *, const cchar_t *, const cchar_t *); -PDCEX int wecho_wchar(WINDOW *, const cchar_t *); -PDCEX int wgetbkgrnd(WINDOW *, cchar_t *); -PDCEX int wgetn_wstr(WINDOW *, wint_t *, int); -PDCEX int wget_wch(WINDOW *, wint_t *); -PDCEX int wget_wstr(WINDOW *, wint_t *); -PDCEX int whline_set(WINDOW *, const cchar_t *, int); -PDCEX int winnwstr(WINDOW *, wchar_t *, int); -PDCEX int wins_nwstr(WINDOW *, const wchar_t *, int); -PDCEX int wins_wch(WINDOW *, const cchar_t *); -PDCEX int wins_wstr(WINDOW *, const wchar_t *); -PDCEX int winwstr(WINDOW *, wchar_t *); -PDCEX int win_wch(WINDOW *, cchar_t *); -PDCEX int win_wchnstr(WINDOW *, cchar_t *, int); -PDCEX int win_wchstr(WINDOW *, cchar_t *); -PDCEX wchar_t *wunctrl(cchar_t *); -PDCEX int wvline_set(WINDOW *, const cchar_t *, int); -#endif - -/* Quasi-standard */ - -PDCEX chtype getattrs(WINDOW *); -PDCEX int getbegx(WINDOW *); -PDCEX int getbegy(WINDOW *); -PDCEX int getmaxx(WINDOW *); -PDCEX int getmaxy(WINDOW *); -PDCEX int getparx(WINDOW *); -PDCEX int getpary(WINDOW *); -PDCEX int getcurx(WINDOW *); -PDCEX int getcury(WINDOW *); -PDCEX void traceoff(void); -PDCEX void traceon(void); -PDCEX char *unctrl(chtype); - -PDCEX int crmode(void); -PDCEX int nocrmode(void); -PDCEX int draino(int); -PDCEX int resetterm(void); -PDCEX int fixterm(void); -PDCEX int saveterm(void); -PDCEX void setsyx(int, int); - -PDCEX int mouse_set(mmask_t); -PDCEX int mouse_on(mmask_t); -PDCEX int mouse_off(mmask_t); -PDCEX int request_mouse_pos(void); -PDCEX void wmouse_position(WINDOW *, int *, int *); -PDCEX mmask_t getmouse(void); - -/* ncurses */ - -PDCEX int assume_default_colors(int, int); -PDCEX const char *curses_version(void); -PDCEX bool has_key(int); -PDCEX int use_default_colors(void); -PDCEX int wresize(WINDOW *, int, int); - -PDCEX int mouseinterval(int); -PDCEX mmask_t mousemask(mmask_t, mmask_t *); -PDCEX bool mouse_trafo(int *, int *, bool); -PDCEX int nc_getmouse(MEVENT *); -PDCEX int ungetmouse(MEVENT *); -PDCEX bool wenclose(const WINDOW *, int, int); -PDCEX bool wmouse_trafo(const WINDOW *, int *, int *, bool); - -/* PDCurses */ - -PDCEX int addrawch(chtype); -PDCEX int insrawch(chtype); -PDCEX bool is_termresized(void); -PDCEX int mvaddrawch(int, int, chtype); -PDCEX int mvdeleteln(int, int); -PDCEX int mvinsertln(int, int); -PDCEX int mvinsrawch(int, int, chtype); -PDCEX int mvwaddrawch(WINDOW *, int, int, chtype); -PDCEX int mvwdeleteln(WINDOW *, int, int); -PDCEX int mvwinsertln(WINDOW *, int, int); -PDCEX int mvwinsrawch(WINDOW *, int, int, chtype); -PDCEX int raw_output(bool); -PDCEX int resize_term(int, int); -PDCEX WINDOW *resize_window(WINDOW *, int, int); -PDCEX int waddrawch(WINDOW *, chtype); -PDCEX int winsrawch(WINDOW *, chtype); -PDCEX char wordchar(void); - -#ifdef PDC_WIDE -PDCEX wchar_t *slk_wlabel(int); -#endif - -PDCEX void PDC_debug(const char *, ...); -PDCEX void PDC_get_version(PDC_VERSION *); -PDCEX int PDC_ungetch(int); -PDCEX int PDC_set_blink(bool); -PDCEX int PDC_set_bold(bool); -PDCEX int PDC_set_line_color(short); -PDCEX void PDC_set_title(const char *); - -PDCEX int PDC_clearclipboard(void); -PDCEX int PDC_freeclipboard(char *); -PDCEX int PDC_getclipboard(char **, long *); -PDCEX int PDC_setclipboard(const char *, long); - -PDCEX unsigned long PDC_get_input_fd(void); -PDCEX unsigned long PDC_get_key_modifiers(void); -PDCEX int PDC_return_key_modifiers(bool); -PDCEX int PDC_save_key_modifiers(bool); - -#ifdef XCURSES -PDCEX WINDOW *Xinitscr(int, char **); -PDCEX void XCursesExit(void); -PDCEX int sb_init(void); -PDCEX int sb_set_horz(int, int, int); -PDCEX int sb_set_vert(int, int, int); -PDCEX int sb_get_horz(int *, int *, int *); -PDCEX int sb_get_vert(int *, int *, int *); -PDCEX int sb_refresh(void); -#endif - -/*** Functions defined as macros ***/ - -/* getch() and ungetch() conflict with some DOS libraries */ - -#define getch() wgetch(stdscr) -#define ungetch(ch) PDC_ungetch(ch) - -#define COLOR_PAIR(n) (((chtype)(n) << PDC_COLOR_SHIFT) & A_COLOR) -#define PAIR_NUMBER(n) (((n) & A_COLOR) >> PDC_COLOR_SHIFT) - -/* These will _only_ work as macros */ - -#define getbegyx(w, y, x) (y = getbegy(w), x = getbegx(w)) -#define getmaxyx(w, y, x) (y = getmaxy(w), x = getmaxx(w)) -#define getparyx(w, y, x) (y = getpary(w), x = getparx(w)) -#define getyx(w, y, x) (y = getcury(w), x = getcurx(w)) - -#define getsyx(y, x) { if (curscr->_leaveit) (y)=(x)=-1; \ - else getyx(curscr,(y),(x)); } - -#ifdef NCURSES_MOUSE_VERSION -# define getmouse(x) nc_getmouse(x) -#endif - -/* return codes from PDC_getclipboard() and PDC_setclipboard() calls */ - -#define PDC_CLIP_SUCCESS 0 -#define PDC_CLIP_ACCESS_ERROR 1 -#define PDC_CLIP_EMPTY 2 -#define PDC_CLIP_MEMORY_ERROR 3 - -/* PDCurses key modifier masks */ - -#define PDC_KEY_MODIFIER_SHIFT 1 -#define PDC_KEY_MODIFIER_CONTROL 2 -#define PDC_KEY_MODIFIER_ALT 4 -#define PDC_KEY_MODIFIER_NUMLOCK 8 - -#ifdef __cplusplus -# ifndef PDC_PP98 -# undef bool -# endif -} -#endif - -#endif /* __PDCURSES__ */ +/*----------------------------------------------------------------------* + * PDCurses * + *----------------------------------------------------------------------*/ + +#ifndef __PDCURSES__ +#define __PDCURSES__ 1 + +/*man-start************************************************************** + +Define before inclusion (only those needed): + + XCURSES True if compiling for X11. + PDC_RGB True if you want to use RGB color definitions + (Red = 1, Green = 2, Blue = 4) instead of BGR. + PDC_WIDE True if building wide-character support. + PDC_DLL_BUILD True if building a Windows DLL. + PDC_NCMOUSE Use the ncurses mouse API instead + of PDCurses' traditional mouse API. + +Defined by this header: + + PDCURSES Enables access to PDCurses-only routines. + PDC_BUILD Defines API build version. + PDC_VER_MAJOR Major version number + PDC_VER_MINOR Minor version number + PDC_VERDOT Version string + +**man-end****************************************************************/ + +#define PDCURSES 1 /* PDCurses-only routines */ +#define PDC_BUILD 3802 +#define PDC_VER_MAJOR 3 +#define PDC_VER_MINOR 8 +#define PDC_VERDOT "3.8" +#define CHTYPE_LONG 1 /* chtype >= 32 bits */ + +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +# define PDC_99 1 +#endif + +#if defined(__cplusplus) && __cplusplus >= 199711L +# define PDC_PP98 1 +#endif + +/*----------------------------------------------------------------------*/ + +#include +#include +#include /* Required by X/Open usage below */ + +#ifdef PDC_WIDE +# include +#endif + +#if defined(PDC_99) && !defined(__bool_true_false_are_defined) +# include +#endif + +#ifdef __cplusplus +extern "C" +{ +# ifndef PDC_PP98 +# define bool _bool +# endif +#endif + +/*---------------------------------------------------------------------- + * + * Constants and Types + * + */ + +#undef FALSE +#define FALSE 0 + +#undef TRUE +#define TRUE 1 + +#undef ERR +#define ERR (-1) + +#undef OK +#define OK 0 + +#if !defined(PDC_PP98) && !defined(__bool_true_false_are_defined) +typedef unsigned char bool; +#endif + +#if _LP64 +typedef unsigned int chtype; +#else +typedef unsigned long chtype; /* 16-bit attr + 16-bit char */ +#endif + +#ifdef PDC_WIDE +typedef chtype cchar_t; +#endif + +typedef chtype attr_t; + +/*---------------------------------------------------------------------- + * + * Version Info + * + */ + +/* Use this structure with PDC_get_version() for run-time info about the + way the library was built, in case it doesn't match the header. */ + +typedef struct +{ + short flags; /* flags OR'd together (see below) */ + short build; /* PDC_BUILD at compile time */ + unsigned char major; /* PDC_VER_MAJOR */ + unsigned char minor; /* PDC_VER_MINOR */ + unsigned char csize; /* sizeof chtype */ + unsigned char bsize; /* sizeof bool */ +} PDC_VERSION; + +enum +{ + PDC_VFLAG_DEBUG = 1, /* set if built with -DPDCDEBUG */ + PDC_VFLAG_WIDE = 2, /* -DPDC_WIDE */ + PDC_VFLAG_UTF8 = 4, /* -DPDC_FORCE_UTF8 */ + PDC_VFLAG_DLL = 8, /* -DPDC_DLL_BUILD */ + PDC_VFLAG_RGB = 16 /* -DPDC_RGB */ +}; + +/*---------------------------------------------------------------------- + * + * Mouse Interface -- SYSVR4, with extensions + * + */ + +#if _LP64 +typedef unsigned int mmask_t; +#else +typedef unsigned long mmask_t; +#endif + +typedef struct +{ + int x; /* absolute column, 0 based, measured in characters */ + int y; /* absolute row, 0 based, measured in characters */ + short button[3]; /* state of each button */ + int changes; /* flags indicating what has changed with the mouse */ +} MOUSE_STATUS; + +#define BUTTON_RELEASED 0x0000 +#define BUTTON_PRESSED 0x0001 +#define BUTTON_CLICKED 0x0002 +#define BUTTON_DOUBLE_CLICKED 0x0003 +#define BUTTON_TRIPLE_CLICKED 0x0004 +#define BUTTON_MOVED 0x0005 /* PDCurses */ +#define WHEEL_SCROLLED 0x0006 /* PDCurses */ +#define BUTTON_ACTION_MASK 0x0007 /* PDCurses */ + +#define PDC_BUTTON_SHIFT 0x0008 /* PDCurses */ +#define PDC_BUTTON_CONTROL 0x0010 /* PDCurses */ +#define PDC_BUTTON_ALT 0x0020 /* PDCurses */ +#define BUTTON_MODIFIER_MASK 0x0038 /* PDCurses */ + +#define MOUSE_X_POS (Mouse_status.x) +#define MOUSE_Y_POS (Mouse_status.y) + +/* + * Bits associated with the .changes field: + * 3 2 1 0 + * 210987654321098765432109876543210 + * 1 <- button 1 has changed + * 10 <- button 2 has changed + * 100 <- button 3 has changed + * 1000 <- mouse has moved + * 10000 <- mouse position report + * 100000 <- mouse wheel up + * 1000000 <- mouse wheel down + * 10000000 <- mouse wheel left + * 100000000 <- mouse wheel right + */ + +#define PDC_MOUSE_MOVED 0x0008 +#define PDC_MOUSE_POSITION 0x0010 +#define PDC_MOUSE_WHEEL_UP 0x0020 +#define PDC_MOUSE_WHEEL_DOWN 0x0040 +#define PDC_MOUSE_WHEEL_LEFT 0x0080 +#define PDC_MOUSE_WHEEL_RIGHT 0x0100 + +#define A_BUTTON_CHANGED (Mouse_status.changes & 7) +#define MOUSE_MOVED (Mouse_status.changes & PDC_MOUSE_MOVED) +#define MOUSE_POS_REPORT (Mouse_status.changes & PDC_MOUSE_POSITION) +#define BUTTON_CHANGED(x) (Mouse_status.changes & (1 << ((x) - 1))) +#define BUTTON_STATUS(x) (Mouse_status.button[(x) - 1]) +#define MOUSE_WHEEL_UP (Mouse_status.changes & PDC_MOUSE_WHEEL_UP) +#define MOUSE_WHEEL_DOWN (Mouse_status.changes & PDC_MOUSE_WHEEL_DOWN) +#define MOUSE_WHEEL_LEFT (Mouse_status.changes & PDC_MOUSE_WHEEL_LEFT) +#define MOUSE_WHEEL_RIGHT (Mouse_status.changes & PDC_MOUSE_WHEEL_RIGHT) + +/* mouse bit-masks */ + +#define BUTTON1_RELEASED 0x00000001L +#define BUTTON1_PRESSED 0x00000002L +#define BUTTON1_CLICKED 0x00000004L +#define BUTTON1_DOUBLE_CLICKED 0x00000008L +#define BUTTON1_TRIPLE_CLICKED 0x00000010L +#define BUTTON1_MOVED 0x00000010L /* PDCurses */ + +#define BUTTON2_RELEASED 0x00000020L +#define BUTTON2_PRESSED 0x00000040L +#define BUTTON2_CLICKED 0x00000080L +#define BUTTON2_DOUBLE_CLICKED 0x00000100L +#define BUTTON2_TRIPLE_CLICKED 0x00000200L +#define BUTTON2_MOVED 0x00000200L /* PDCurses */ + +#define BUTTON3_RELEASED 0x00000400L +#define BUTTON3_PRESSED 0x00000800L +#define BUTTON3_CLICKED 0x00001000L +#define BUTTON3_DOUBLE_CLICKED 0x00002000L +#define BUTTON3_TRIPLE_CLICKED 0x00004000L +#define BUTTON3_MOVED 0x00004000L /* PDCurses */ + +/* For the ncurses-compatible functions only, BUTTON4_PRESSED and + BUTTON5_PRESSED are returned for mouse scroll wheel up and down; + otherwise PDCurses doesn't support buttons 4 and 5 */ + +#define BUTTON4_RELEASED 0x00008000L +#define BUTTON4_PRESSED 0x00010000L +#define BUTTON4_CLICKED 0x00020000L +#define BUTTON4_DOUBLE_CLICKED 0x00040000L +#define BUTTON4_TRIPLE_CLICKED 0x00080000L + +#define BUTTON5_RELEASED 0x00100000L +#define BUTTON5_PRESSED 0x00200000L +#define BUTTON5_CLICKED 0x00400000L +#define BUTTON5_DOUBLE_CLICKED 0x00800000L +#define BUTTON5_TRIPLE_CLICKED 0x01000000L + +#define MOUSE_WHEEL_SCROLL 0x02000000L /* PDCurses */ +#define BUTTON_MODIFIER_SHIFT 0x04000000L /* PDCurses */ +#define BUTTON_MODIFIER_CONTROL 0x08000000L /* PDCurses */ +#define BUTTON_MODIFIER_ALT 0x10000000L /* PDCurses */ + +#define ALL_MOUSE_EVENTS 0x1fffffffL +#define REPORT_MOUSE_POSITION 0x20000000L + +/* ncurses mouse interface */ + +typedef struct +{ + short id; /* unused, always 0 */ + int x, y, z; /* x, y same as MOUSE_STATUS; z unused */ + mmask_t bstate; /* equivalent to changes + button[], but + in the same format as used for mousemask() */ +} MEVENT; + +#if defined(PDC_NCMOUSE) && !defined(NCURSES_MOUSE_VERSION) +# define NCURSES_MOUSE_VERSION 2 +#endif + +#ifdef NCURSES_MOUSE_VERSION +# define BUTTON_SHIFT BUTTON_MODIFIER_SHIFT +# define BUTTON_CONTROL BUTTON_MODIFIER_CONTROL +# define BUTTON_CTRL BUTTON_MODIFIER_CONTROL +# define BUTTON_ALT BUTTON_MODIFIER_ALT +#else +# define BUTTON_SHIFT PDC_BUTTON_SHIFT +# define BUTTON_CONTROL PDC_BUTTON_CONTROL +# define BUTTON_ALT PDC_BUTTON_ALT +#endif + +/*---------------------------------------------------------------------- + * + * Window and Screen Structures + * + */ + +typedef struct _win /* definition of a window */ +{ + int _cury; /* current pseudo-cursor */ + int _curx; + int _maxy; /* max window coordinates */ + int _maxx; + int _begy; /* origin on screen */ + int _begx; + int _flags; /* window properties */ + chtype _attrs; /* standard attributes and colors */ + chtype _bkgd; /* background, normally blank */ + bool _clear; /* causes clear at next refresh */ + bool _leaveit; /* leaves cursor where it is */ + bool _scroll; /* allows window scrolling */ + bool _nodelay; /* input character wait flag */ + bool _immed; /* immediate update flag */ + bool _sync; /* synchronise window ancestors */ + bool _use_keypad; /* flags keypad key mode active */ + chtype **_y; /* pointer to line pointer array */ + int *_firstch; /* first changed character in line */ + int *_lastch; /* last changed character in line */ + int _tmarg; /* top of scrolling region */ + int _bmarg; /* bottom of scrolling region */ + int _delayms; /* milliseconds of delay for getch() */ + int _parx, _pary; /* coords relative to parent (0,0) */ + struct _win *_parent; /* subwin's pointer to parent win */ +} WINDOW; + +/* Avoid using the SCREEN struct directly -- use the corresponding + functions if possible. This struct may eventually be made private. */ + +typedef struct +{ + bool alive; /* if initscr() called, and not endwin() */ + bool autocr; /* if cr -> lf */ + bool cbreak; /* if terminal unbuffered */ + bool echo; /* if terminal echo */ + bool raw_inp; /* raw input mode (v. cooked input) */ + bool raw_out; /* raw output mode (7 v. 8 bits) */ + bool audible; /* FALSE if the bell is visual */ + bool mono; /* TRUE if current screen is mono */ + short resized; /* TRUE if TERM has been resized */ + bool orig_attr; /* TRUE if we have the original colors */ + short orig_fore; /* original screen foreground color */ + short orig_back; /* original screen foreground color */ + int cursrow; /* position of physical cursor */ + int curscol; /* position of physical cursor */ + int visibility; /* visibility of cursor */ + int orig_cursor; /* original cursor size */ + int lines; /* new value for LINES */ + int cols; /* new value for COLS */ + mmask_t _trap_mbe; /* trap these mouse button events */ + int mouse_wait; /* time to wait (in ms) for a + button release after a press, in + order to count it as a click */ + int slklines; /* lines in use by slk_init() */ + WINDOW *slk_winptr; /* window for slk */ + int linesrippedoff; /* lines ripped off via ripoffline() */ + int linesrippedoffontop; /* lines ripped off on + top via ripoffline() */ + int delaytenths; /* 1/10ths second to wait block + getch() for */ + bool _preserve; /* TRUE if screen background + to be preserved */ + int _restore; /* specifies if screen background + to be restored, and how */ + bool save_key_modifiers; /* TRUE if each key modifiers saved + with each key press */ + bool return_key_modifiers; /* TRUE if modifier keys are + returned as "real" keys */ + bool key_code; /* TRUE if last key is a special key; + used internally by get_wch() */ +#ifdef XCURSES + int XcurscrSize; /* size of Xcurscr shared memory block */ + bool sb_on; + int sb_viewport_y; + int sb_viewport_x; + int sb_total_y; + int sb_total_x; + int sb_cur_y; + int sb_cur_x; +#endif + short line_color; /* color of line attributes - default -1 */ + attr_t termattrs; /* attribute capabilities */ +} SCREEN; + +/*---------------------------------------------------------------------- + * + * External Variables + * + */ + +#ifdef PDC_DLL_BUILD +# ifdef CURSES_LIBRARY +# define PDCEX __declspec(dllexport) extern +# else +# define PDCEX __declspec(dllimport) +# endif +#else +# define PDCEX extern +#endif + +PDCEX int LINES; /* terminal height */ +PDCEX int COLS; /* terminal width */ +PDCEX WINDOW *stdscr; /* the default screen window */ +PDCEX WINDOW *curscr; /* the current screen image */ +PDCEX SCREEN *SP; /* curses variables */ +PDCEX MOUSE_STATUS Mouse_status; +PDCEX int COLORS; +PDCEX int COLOR_PAIRS; +PDCEX int TABSIZE; +PDCEX chtype acs_map[]; /* alternate character set map */ +PDCEX char ttytype[]; /* terminal name/description */ + +/*man-start************************************************************** + +Text Attributes +=============== + +PDCurses uses a 32-bit integer for its chtype: + + +--------------------------------------------------------------------+ + |31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16|15|14|13|..| 2| 1| 0| + +--------------------------------------------------------------------+ + color pair | modifiers | character eg 'a' + +There are 256 color pairs (8 bits), 8 bits for modifiers, and 16 bits +for character data. The modifiers are bold, underline, right-line, +left-line, italic, reverse and blink, plus the alternate character set +indicator. + +**man-end****************************************************************/ + +/*** Video attribute macros ***/ + +#define A_NORMAL (chtype)0 + +#define A_ALTCHARSET (chtype)0x00010000 +#define A_RIGHT (chtype)0x00020000 +#define A_LEFT (chtype)0x00040000 +#define A_ITALIC (chtype)0x00080000 +#define A_UNDERLINE (chtype)0x00100000 +#define A_REVERSE (chtype)0x00200000 +#define A_BLINK (chtype)0x00400000 +#define A_BOLD (chtype)0x00800000 + +#define A_ATTRIBUTES (chtype)0xffff0000 +#define A_CHARTEXT (chtype)0x0000ffff +#define A_COLOR (chtype)0xff000000 + +#define PDC_COLOR_SHIFT 24 + +#define A_LEFTLINE A_LEFT +#define A_RIGHTLINE A_RIGHT +#define A_STANDOUT (A_REVERSE | A_BOLD) /* X/Open */ + +#define A_DIM A_NORMAL +#define A_INVIS A_NORMAL +#define A_PROTECT A_NORMAL + +#define A_HORIZONTAL A_NORMAL +#define A_LOW A_NORMAL +#define A_TOP A_NORMAL +#define A_VERTICAL A_NORMAL + +#define CHR_MSK A_CHARTEXT /* Obsolete */ +#define ATR_MSK A_ATTRIBUTES /* Obsolete */ +#define ATR_NRM A_NORMAL /* Obsolete */ + +/* For use with attr_t -- X/Open says, "these shall be distinct", so + this is a non-conforming implementation. */ + +#define WA_NORMAL A_NORMAL + +#define WA_ALTCHARSET A_ALTCHARSET +#define WA_BLINK A_BLINK +#define WA_BOLD A_BOLD +#define WA_DIM A_DIM +#define WA_INVIS A_INVIS +#define WA_ITALIC A_ITALIC +#define WA_LEFT A_LEFT +#define WA_PROTECT A_PROTECT +#define WA_REVERSE A_REVERSE +#define WA_RIGHT A_RIGHT +#define WA_STANDOUT A_STANDOUT +#define WA_UNDERLINE A_UNDERLINE + +#define WA_HORIZONTAL A_HORIZONTAL +#define WA_LOW A_LOW +#define WA_TOP A_TOP +#define WA_VERTICAL A_VERTICAL + +#define WA_ATTRIBUTES A_ATTRIBUTES + +/*** Alternate character set macros ***/ + +#define PDC_ACS(w) ((chtype)w | A_ALTCHARSET) + +/* VT100-compatible symbols -- box chars */ + +#define ACS_ULCORNER PDC_ACS('l') +#define ACS_LLCORNER PDC_ACS('m') +#define ACS_URCORNER PDC_ACS('k') +#define ACS_LRCORNER PDC_ACS('j') +#define ACS_RTEE PDC_ACS('u') +#define ACS_LTEE PDC_ACS('t') +#define ACS_BTEE PDC_ACS('v') +#define ACS_TTEE PDC_ACS('w') +#define ACS_HLINE PDC_ACS('q') +#define ACS_VLINE PDC_ACS('x') +#define ACS_PLUS PDC_ACS('n') + +/* VT100-compatible symbols -- other */ + +#define ACS_S1 PDC_ACS('o') +#define ACS_S9 PDC_ACS('s') +#define ACS_DIAMOND PDC_ACS('`') +#define ACS_CKBOARD PDC_ACS('a') +#define ACS_DEGREE PDC_ACS('f') +#define ACS_PLMINUS PDC_ACS('g') +#define ACS_BULLET PDC_ACS('~') + +/* Teletype 5410v1 symbols -- these are defined in SysV curses, but + are not well-supported by most terminals. Stick to VT100 characters + for optimum portability. */ + +#define ACS_LARROW PDC_ACS(',') +#define ACS_RARROW PDC_ACS('+') +#define ACS_DARROW PDC_ACS('.') +#define ACS_UARROW PDC_ACS('-') +#define ACS_BOARD PDC_ACS('h') +#define ACS_LANTERN PDC_ACS('i') +#define ACS_BLOCK PDC_ACS('0') + +/* That goes double for these -- undocumented SysV symbols. Don't use + them. */ + +#define ACS_S3 PDC_ACS('p') +#define ACS_S7 PDC_ACS('r') +#define ACS_LEQUAL PDC_ACS('y') +#define ACS_GEQUAL PDC_ACS('z') +#define ACS_PI PDC_ACS('{') +#define ACS_NEQUAL PDC_ACS('|') +#define ACS_STERLING PDC_ACS('}') + +/* Box char aliases */ + +#define ACS_BSSB ACS_ULCORNER +#define ACS_SSBB ACS_LLCORNER +#define ACS_BBSS ACS_URCORNER +#define ACS_SBBS ACS_LRCORNER +#define ACS_SBSS ACS_RTEE +#define ACS_SSSB ACS_LTEE +#define ACS_SSBS ACS_BTEE +#define ACS_BSSS ACS_TTEE +#define ACS_BSBS ACS_HLINE +#define ACS_SBSB ACS_VLINE +#define ACS_SSSS ACS_PLUS + +/* cchar_t aliases */ + +#ifdef PDC_WIDE +# define WACS_ULCORNER (&(acs_map['l'])) +# define WACS_LLCORNER (&(acs_map['m'])) +# define WACS_URCORNER (&(acs_map['k'])) +# define WACS_LRCORNER (&(acs_map['j'])) +# define WACS_RTEE (&(acs_map['u'])) +# define WACS_LTEE (&(acs_map['t'])) +# define WACS_BTEE (&(acs_map['v'])) +# define WACS_TTEE (&(acs_map['w'])) +# define WACS_HLINE (&(acs_map['q'])) +# define WACS_VLINE (&(acs_map['x'])) +# define WACS_PLUS (&(acs_map['n'])) + +# define WACS_S1 (&(acs_map['o'])) +# define WACS_S9 (&(acs_map['s'])) +# define WACS_DIAMOND (&(acs_map['`'])) +# define WACS_CKBOARD (&(acs_map['a'])) +# define WACS_DEGREE (&(acs_map['f'])) +# define WACS_PLMINUS (&(acs_map['g'])) +# define WACS_BULLET (&(acs_map['~'])) + +# define WACS_LARROW (&(acs_map[','])) +# define WACS_RARROW (&(acs_map['+'])) +# define WACS_DARROW (&(acs_map['.'])) +# define WACS_UARROW (&(acs_map['-'])) +# define WACS_BOARD (&(acs_map['h'])) +# define WACS_LANTERN (&(acs_map['i'])) +# define WACS_BLOCK (&(acs_map['0'])) + +# define WACS_S3 (&(acs_map['p'])) +# define WACS_S7 (&(acs_map['r'])) +# define WACS_LEQUAL (&(acs_map['y'])) +# define WACS_GEQUAL (&(acs_map['z'])) +# define WACS_PI (&(acs_map['{'])) +# define WACS_NEQUAL (&(acs_map['|'])) +# define WACS_STERLING (&(acs_map['}'])) + +# define WACS_BSSB WACS_ULCORNER +# define WACS_SSBB WACS_LLCORNER +# define WACS_BBSS WACS_URCORNER +# define WACS_SBBS WACS_LRCORNER +# define WACS_SBSS WACS_RTEE +# define WACS_SSSB WACS_LTEE +# define WACS_SSBS WACS_BTEE +# define WACS_BSSS WACS_TTEE +# define WACS_BSBS WACS_HLINE +# define WACS_SBSB WACS_VLINE +# define WACS_SSSS WACS_PLUS +#endif + +/*** Color macros ***/ + +#define COLOR_BLACK 0 + +#ifdef PDC_RGB /* RGB */ +# define COLOR_RED 1 +# define COLOR_GREEN 2 +# define COLOR_BLUE 4 +#else /* BGR */ +# define COLOR_BLUE 1 +# define COLOR_GREEN 2 +# define COLOR_RED 4 +#endif + +#define COLOR_CYAN (COLOR_BLUE | COLOR_GREEN) +#define COLOR_MAGENTA (COLOR_RED | COLOR_BLUE) +#define COLOR_YELLOW (COLOR_RED | COLOR_GREEN) + +#define COLOR_WHITE 7 + +/*---------------------------------------------------------------------- + * + * Function and Keypad Key Definitions + * Many are just for compatibility + * + */ + +#define KEY_CODE_YES 0x100 /* If get_wch() gives a key code */ + +#define KEY_BREAK 0x101 /* Not on PC KBD */ +#define KEY_DOWN 0x102 /* Down arrow key */ +#define KEY_UP 0x103 /* Up arrow key */ +#define KEY_LEFT 0x104 /* Left arrow key */ +#define KEY_RIGHT 0x105 /* Right arrow key */ +#define KEY_HOME 0x106 /* home key */ +#define KEY_BACKSPACE 0x107 /* not on pc */ +#define KEY_F0 0x108 /* function keys; 64 reserved */ + +#define KEY_DL 0x148 /* delete line */ +#define KEY_IL 0x149 /* insert line */ +#define KEY_DC 0x14a /* delete character */ +#define KEY_IC 0x14b /* insert char or enter ins mode */ +#define KEY_EIC 0x14c /* exit insert char mode */ +#define KEY_CLEAR 0x14d /* clear screen */ +#define KEY_EOS 0x14e /* clear to end of screen */ +#define KEY_EOL 0x14f /* clear to end of line */ +#define KEY_SF 0x150 /* scroll 1 line forward */ +#define KEY_SR 0x151 /* scroll 1 line back (reverse) */ +#define KEY_NPAGE 0x152 /* next page */ +#define KEY_PPAGE 0x153 /* previous page */ +#define KEY_STAB 0x154 /* set tab */ +#define KEY_CTAB 0x155 /* clear tab */ +#define KEY_CATAB 0x156 /* clear all tabs */ +#define KEY_ENTER 0x157 /* enter or send (unreliable) */ +#define KEY_SRESET 0x158 /* soft/reset (partial/unreliable) */ +#define KEY_RESET 0x159 /* reset/hard reset (unreliable) */ +#define KEY_PRINT 0x15a /* print/copy */ +#define KEY_LL 0x15b /* home down/bottom (lower left) */ +#define KEY_ABORT 0x15c /* abort/terminate key (any) */ +#define KEY_SHELP 0x15d /* short help */ +#define KEY_LHELP 0x15e /* long help */ +#define KEY_BTAB 0x15f /* Back tab key */ +#define KEY_BEG 0x160 /* beg(inning) key */ +#define KEY_CANCEL 0x161 /* cancel key */ +#define KEY_CLOSE 0x162 /* close key */ +#define KEY_COMMAND 0x163 /* cmd (command) key */ +#define KEY_COPY 0x164 /* copy key */ +#define KEY_CREATE 0x165 /* create key */ +#define KEY_END 0x166 /* end key */ +#define KEY_EXIT 0x167 /* exit key */ +#define KEY_FIND 0x168 /* find key */ +#define KEY_HELP 0x169 /* help key */ +#define KEY_MARK 0x16a /* mark key */ +#define KEY_MESSAGE 0x16b /* message key */ +#define KEY_MOVE 0x16c /* move key */ +#define KEY_NEXT 0x16d /* next object key */ +#define KEY_OPEN 0x16e /* open key */ +#define KEY_OPTIONS 0x16f /* options key */ +#define KEY_PREVIOUS 0x170 /* previous object key */ +#define KEY_REDO 0x171 /* redo key */ +#define KEY_REFERENCE 0x172 /* ref(erence) key */ +#define KEY_REFRESH 0x173 /* refresh key */ +#define KEY_REPLACE 0x174 /* replace key */ +#define KEY_RESTART 0x175 /* restart key */ +#define KEY_RESUME 0x176 /* resume key */ +#define KEY_SAVE 0x177 /* save key */ +#define KEY_SBEG 0x178 /* shifted beginning key */ +#define KEY_SCANCEL 0x179 /* shifted cancel key */ +#define KEY_SCOMMAND 0x17a /* shifted command key */ +#define KEY_SCOPY 0x17b /* shifted copy key */ +#define KEY_SCREATE 0x17c /* shifted create key */ +#define KEY_SDC 0x17d /* shifted delete char key */ +#define KEY_SDL 0x17e /* shifted delete line key */ +#define KEY_SELECT 0x17f /* select key */ +#define KEY_SEND 0x180 /* shifted end key */ +#define KEY_SEOL 0x181 /* shifted clear line key */ +#define KEY_SEXIT 0x182 /* shifted exit key */ +#define KEY_SFIND 0x183 /* shifted find key */ +#define KEY_SHOME 0x184 /* shifted home key */ +#define KEY_SIC 0x185 /* shifted input key */ + +#define KEY_SLEFT 0x187 /* shifted left arrow key */ +#define KEY_SMESSAGE 0x188 /* shifted message key */ +#define KEY_SMOVE 0x189 /* shifted move key */ +#define KEY_SNEXT 0x18a /* shifted next key */ +#define KEY_SOPTIONS 0x18b /* shifted options key */ +#define KEY_SPREVIOUS 0x18c /* shifted prev key */ +#define KEY_SPRINT 0x18d /* shifted print key */ +#define KEY_SREDO 0x18e /* shifted redo key */ +#define KEY_SREPLACE 0x18f /* shifted replace key */ +#define KEY_SRIGHT 0x190 /* shifted right arrow */ +#define KEY_SRSUME 0x191 /* shifted resume key */ +#define KEY_SSAVE 0x192 /* shifted save key */ +#define KEY_SSUSPEND 0x193 /* shifted suspend key */ +#define KEY_SUNDO 0x194 /* shifted undo key */ +#define KEY_SUSPEND 0x195 /* suspend key */ +#define KEY_UNDO 0x196 /* undo key */ + +/* PDCurses-specific key definitions -- PC only */ + +#define ALT_0 0x197 +#define ALT_1 0x198 +#define ALT_2 0x199 +#define ALT_3 0x19a +#define ALT_4 0x19b +#define ALT_5 0x19c +#define ALT_6 0x19d +#define ALT_7 0x19e +#define ALT_8 0x19f +#define ALT_9 0x1a0 +#define ALT_A 0x1a1 +#define ALT_B 0x1a2 +#define ALT_C 0x1a3 +#define ALT_D 0x1a4 +#define ALT_E 0x1a5 +#define ALT_F 0x1a6 +#define ALT_G 0x1a7 +#define ALT_H 0x1a8 +#define ALT_I 0x1a9 +#define ALT_J 0x1aa +#define ALT_K 0x1ab +#define ALT_L 0x1ac +#define ALT_M 0x1ad +#define ALT_N 0x1ae +#define ALT_O 0x1af +#define ALT_P 0x1b0 +#define ALT_Q 0x1b1 +#define ALT_R 0x1b2 +#define ALT_S 0x1b3 +#define ALT_T 0x1b4 +#define ALT_U 0x1b5 +#define ALT_V 0x1b6 +#define ALT_W 0x1b7 +#define ALT_X 0x1b8 +#define ALT_Y 0x1b9 +#define ALT_Z 0x1ba + +#define CTL_LEFT 0x1bb /* Control-Left-Arrow */ +#define CTL_RIGHT 0x1bc +#define CTL_PGUP 0x1bd +#define CTL_PGDN 0x1be +#define CTL_HOME 0x1bf +#define CTL_END 0x1c0 + +#define KEY_A1 0x1c1 /* upper left on Virtual keypad */ +#define KEY_A2 0x1c2 /* upper middle on Virt. keypad */ +#define KEY_A3 0x1c3 /* upper right on Vir. keypad */ +#define KEY_B1 0x1c4 /* middle left on Virt. keypad */ +#define KEY_B2 0x1c5 /* center on Virt. keypad */ +#define KEY_B3 0x1c6 /* middle right on Vir. keypad */ +#define KEY_C1 0x1c7 /* lower left on Virt. keypad */ +#define KEY_C2 0x1c8 /* lower middle on Virt. keypad */ +#define KEY_C3 0x1c9 /* lower right on Vir. keypad */ + +#define PADSLASH 0x1ca /* slash on keypad */ +#define PADENTER 0x1cb /* enter on keypad */ +#define CTL_PADENTER 0x1cc /* ctl-enter on keypad */ +#define ALT_PADENTER 0x1cd /* alt-enter on keypad */ +#define PADSTOP 0x1ce /* stop on keypad */ +#define PADSTAR 0x1cf /* star on keypad */ +#define PADMINUS 0x1d0 /* minus on keypad */ +#define PADPLUS 0x1d1 /* plus on keypad */ +#define CTL_PADSTOP 0x1d2 /* ctl-stop on keypad */ +#define CTL_PADCENTER 0x1d3 /* ctl-enter on keypad */ +#define CTL_PADPLUS 0x1d4 /* ctl-plus on keypad */ +#define CTL_PADMINUS 0x1d5 /* ctl-minus on keypad */ +#define CTL_PADSLASH 0x1d6 /* ctl-slash on keypad */ +#define CTL_PADSTAR 0x1d7 /* ctl-star on keypad */ +#define ALT_PADPLUS 0x1d8 /* alt-plus on keypad */ +#define ALT_PADMINUS 0x1d9 /* alt-minus on keypad */ +#define ALT_PADSLASH 0x1da /* alt-slash on keypad */ +#define ALT_PADSTAR 0x1db /* alt-star on keypad */ +#define ALT_PADSTOP 0x1dc /* alt-stop on keypad */ +#define CTL_INS 0x1dd /* ctl-insert */ +#define ALT_DEL 0x1de /* alt-delete */ +#define ALT_INS 0x1df /* alt-insert */ +#define CTL_UP 0x1e0 /* ctl-up arrow */ +#define CTL_DOWN 0x1e1 /* ctl-down arrow */ +#define CTL_TAB 0x1e2 /* ctl-tab */ +#define ALT_TAB 0x1e3 +#define ALT_MINUS 0x1e4 +#define ALT_EQUAL 0x1e5 +#define ALT_HOME 0x1e6 +#define ALT_PGUP 0x1e7 +#define ALT_PGDN 0x1e8 +#define ALT_END 0x1e9 +#define ALT_UP 0x1ea /* alt-up arrow */ +#define ALT_DOWN 0x1eb /* alt-down arrow */ +#define ALT_RIGHT 0x1ec /* alt-right arrow */ +#define ALT_LEFT 0x1ed /* alt-left arrow */ +#define ALT_ENTER 0x1ee /* alt-enter */ +#define ALT_ESC 0x1ef /* alt-escape */ +#define ALT_BQUOTE 0x1f0 /* alt-back quote */ +#define ALT_LBRACKET 0x1f1 /* alt-left bracket */ +#define ALT_RBRACKET 0x1f2 /* alt-right bracket */ +#define ALT_SEMICOLON 0x1f3 /* alt-semi-colon */ +#define ALT_FQUOTE 0x1f4 /* alt-forward quote */ +#define ALT_COMMA 0x1f5 /* alt-comma */ +#define ALT_STOP 0x1f6 /* alt-stop */ +#define ALT_FSLASH 0x1f7 /* alt-forward slash */ +#define ALT_BKSP 0x1f8 /* alt-backspace */ +#define CTL_BKSP 0x1f9 /* ctl-backspace */ +#define PAD0 0x1fa /* keypad 0 */ + +#define CTL_PAD0 0x1fb /* ctl-keypad 0 */ +#define CTL_PAD1 0x1fc +#define CTL_PAD2 0x1fd +#define CTL_PAD3 0x1fe +#define CTL_PAD4 0x1ff +#define CTL_PAD5 0x200 +#define CTL_PAD6 0x201 +#define CTL_PAD7 0x202 +#define CTL_PAD8 0x203 +#define CTL_PAD9 0x204 + +#define ALT_PAD0 0x205 /* alt-keypad 0 */ +#define ALT_PAD1 0x206 +#define ALT_PAD2 0x207 +#define ALT_PAD3 0x208 +#define ALT_PAD4 0x209 +#define ALT_PAD5 0x20a +#define ALT_PAD6 0x20b +#define ALT_PAD7 0x20c +#define ALT_PAD8 0x20d +#define ALT_PAD9 0x20e + +#define CTL_DEL 0x20f /* clt-delete */ +#define ALT_BSLASH 0x210 /* alt-back slash */ +#define CTL_ENTER 0x211 /* ctl-enter */ + +#define SHF_PADENTER 0x212 /* shift-enter on keypad */ +#define SHF_PADSLASH 0x213 /* shift-slash on keypad */ +#define SHF_PADSTAR 0x214 /* shift-star on keypad */ +#define SHF_PADPLUS 0x215 /* shift-plus on keypad */ +#define SHF_PADMINUS 0x216 /* shift-minus on keypad */ +#define SHF_UP 0x217 /* shift-up on keypad */ +#define SHF_DOWN 0x218 /* shift-down on keypad */ +#define SHF_IC 0x219 /* shift-insert on keypad */ +#define SHF_DC 0x21a /* shift-delete on keypad */ + +#define KEY_MOUSE 0x21b /* "mouse" key */ +#define KEY_SHIFT_L 0x21c /* Left-shift */ +#define KEY_SHIFT_R 0x21d /* Right-shift */ +#define KEY_CONTROL_L 0x21e /* Left-control */ +#define KEY_CONTROL_R 0x21f /* Right-control */ +#define KEY_ALT_L 0x220 /* Left-alt */ +#define KEY_ALT_R 0x221 /* Right-alt */ +#define KEY_RESIZE 0x222 /* Window resize */ +#define KEY_SUP 0x223 /* Shifted up arrow */ +#define KEY_SDOWN 0x224 /* Shifted down arrow */ + +#define KEY_MIN KEY_BREAK /* Minimum curses key value */ +#define KEY_MAX KEY_SDOWN /* Maximum curses key */ + +#define KEY_F(n) (KEY_F0 + (n)) + +/*---------------------------------------------------------------------- + * + * Functions + * + */ + +/* Standard */ + +PDCEX int addch(const chtype); +PDCEX int addchnstr(const chtype *, int); +PDCEX int addchstr(const chtype *); +PDCEX int addnstr(const char *, int); +PDCEX int addstr(const char *); +PDCEX int attroff(chtype); +PDCEX int attron(chtype); +PDCEX int attrset(chtype); +PDCEX int attr_get(attr_t *, short *, void *); +PDCEX int attr_off(attr_t, void *); +PDCEX int attr_on(attr_t, void *); +PDCEX int attr_set(attr_t, short, void *); +PDCEX int baudrate(void); +PDCEX int beep(void); +PDCEX int bkgd(chtype); +PDCEX void bkgdset(chtype); +PDCEX int border(chtype, chtype, chtype, chtype, + chtype, chtype, chtype, chtype); +PDCEX int box(WINDOW *, chtype, chtype); +PDCEX bool can_change_color(void); +PDCEX int cbreak(void); +PDCEX int chgat(int, attr_t, short, const void *); +PDCEX int clearok(WINDOW *, bool); +PDCEX int clear(void); +PDCEX int clrtobot(void); +PDCEX int clrtoeol(void); +PDCEX int color_content(short, short *, short *, short *); +PDCEX int color_set(short, void *); +PDCEX int copywin(const WINDOW *, WINDOW *, int, int, int, + int, int, int, int); +PDCEX int curs_set(int); +PDCEX int def_prog_mode(void); +PDCEX int def_shell_mode(void); +PDCEX int delay_output(int); +PDCEX int delch(void); +PDCEX int deleteln(void); +PDCEX void delscreen(SCREEN *); +PDCEX int delwin(WINDOW *); +PDCEX WINDOW *derwin(WINDOW *, int, int, int, int); +PDCEX int doupdate(void); +PDCEX WINDOW *dupwin(WINDOW *); +PDCEX int echochar(const chtype); +PDCEX int echo(void); +PDCEX int endwin(void); +PDCEX char erasechar(void); +PDCEX int erase(void); +PDCEX void filter(void); +PDCEX int flash(void); +PDCEX int flushinp(void); +PDCEX chtype getbkgd(WINDOW *); +PDCEX int getnstr(char *, int); +PDCEX int getstr(char *); +PDCEX WINDOW *getwin(FILE *); +PDCEX int halfdelay(int); +PDCEX bool has_colors(void); +PDCEX bool has_ic(void); +PDCEX bool has_il(void); +PDCEX int hline(chtype, int); +PDCEX void idcok(WINDOW *, bool); +PDCEX int idlok(WINDOW *, bool); +PDCEX void immedok(WINDOW *, bool); +PDCEX int inchnstr(chtype *, int); +PDCEX int inchstr(chtype *); +PDCEX chtype inch(void); +PDCEX int init_color(short, short, short, short); +PDCEX int init_pair(short, short, short); +PDCEX WINDOW *initscr(void); +PDCEX int innstr(char *, int); +PDCEX int insch(chtype); +PDCEX int insdelln(int); +PDCEX int insertln(void); +PDCEX int insnstr(const char *, int); +PDCEX int insstr(const char *); +PDCEX int instr(char *); +PDCEX int intrflush(WINDOW *, bool); +PDCEX bool isendwin(void); +PDCEX bool is_linetouched(WINDOW *, int); +PDCEX bool is_wintouched(WINDOW *); +PDCEX char *keyname(int); +PDCEX int keypad(WINDOW *, bool); +PDCEX char killchar(void); +PDCEX int leaveok(WINDOW *, bool); +PDCEX char *longname(void); +PDCEX int meta(WINDOW *, bool); +PDCEX int move(int, int); +PDCEX int mvaddch(int, int, const chtype); +PDCEX int mvaddchnstr(int, int, const chtype *, int); +PDCEX int mvaddchstr(int, int, const chtype *); +PDCEX int mvaddnstr(int, int, const char *, int); +PDCEX int mvaddstr(int, int, const char *); +PDCEX int mvchgat(int, int, int, attr_t, short, const void *); +PDCEX int mvcur(int, int, int, int); +PDCEX int mvdelch(int, int); +PDCEX int mvderwin(WINDOW *, int, int); +PDCEX int mvgetch(int, int); +PDCEX int mvgetnstr(int, int, char *, int); +PDCEX int mvgetstr(int, int, char *); +PDCEX int mvhline(int, int, chtype, int); +PDCEX chtype mvinch(int, int); +PDCEX int mvinchnstr(int, int, chtype *, int); +PDCEX int mvinchstr(int, int, chtype *); +PDCEX int mvinnstr(int, int, char *, int); +PDCEX int mvinsch(int, int, chtype); +PDCEX int mvinsnstr(int, int, const char *, int); +PDCEX int mvinsstr(int, int, const char *); +PDCEX int mvinstr(int, int, char *); +PDCEX int mvprintw(int, int, const char *, ...); +PDCEX int mvscanw(int, int, const char *, ...); +PDCEX int mvvline(int, int, chtype, int); +PDCEX int mvwaddchnstr(WINDOW *, int, int, const chtype *, int); +PDCEX int mvwaddchstr(WINDOW *, int, int, const chtype *); +PDCEX int mvwaddch(WINDOW *, int, int, const chtype); +PDCEX int mvwaddnstr(WINDOW *, int, int, const char *, int); +PDCEX int mvwaddstr(WINDOW *, int, int, const char *); +PDCEX int mvwchgat(WINDOW *, int, int, int, attr_t, short, const void *); +PDCEX int mvwdelch(WINDOW *, int, int); +PDCEX int mvwgetch(WINDOW *, int, int); +PDCEX int mvwgetnstr(WINDOW *, int, int, char *, int); +PDCEX int mvwgetstr(WINDOW *, int, int, char *); +PDCEX int mvwhline(WINDOW *, int, int, chtype, int); +PDCEX int mvwinchnstr(WINDOW *, int, int, chtype *, int); +PDCEX int mvwinchstr(WINDOW *, int, int, chtype *); +PDCEX chtype mvwinch(WINDOW *, int, int); +PDCEX int mvwinnstr(WINDOW *, int, int, char *, int); +PDCEX int mvwinsch(WINDOW *, int, int, chtype); +PDCEX int mvwinsnstr(WINDOW *, int, int, const char *, int); +PDCEX int mvwinsstr(WINDOW *, int, int, const char *); +PDCEX int mvwinstr(WINDOW *, int, int, char *); +PDCEX int mvwin(WINDOW *, int, int); +PDCEX int mvwprintw(WINDOW *, int, int, const char *, ...); +PDCEX int mvwscanw(WINDOW *, int, int, const char *, ...); +PDCEX int mvwvline(WINDOW *, int, int, chtype, int); +PDCEX int napms(int); +PDCEX WINDOW *newpad(int, int); +PDCEX SCREEN *newterm(const char *, FILE *, FILE *); +PDCEX WINDOW *newwin(int, int, int, int); +PDCEX int nl(void); +PDCEX int nocbreak(void); +PDCEX int nodelay(WINDOW *, bool); +PDCEX int noecho(void); +PDCEX int nonl(void); +PDCEX void noqiflush(void); +PDCEX int noraw(void); +PDCEX int notimeout(WINDOW *, bool); +PDCEX int overlay(const WINDOW *, WINDOW *); +PDCEX int overwrite(const WINDOW *, WINDOW *); +PDCEX int pair_content(short, short *, short *); +PDCEX int pechochar(WINDOW *, chtype); +PDCEX int pnoutrefresh(WINDOW *, int, int, int, int, int, int); +PDCEX int prefresh(WINDOW *, int, int, int, int, int, int); +PDCEX int printw(const char *, ...); +PDCEX int putwin(WINDOW *, FILE *); +PDCEX void qiflush(void); +PDCEX int raw(void); +PDCEX int redrawwin(WINDOW *); +PDCEX int refresh(void); +PDCEX int reset_prog_mode(void); +PDCEX int reset_shell_mode(void); +PDCEX int resetty(void); +PDCEX int ripoffline(int, int (*)(WINDOW *, int)); +PDCEX int savetty(void); +PDCEX int scanw(const char *, ...); +PDCEX int scr_dump(const char *); +PDCEX int scr_init(const char *); +PDCEX int scr_restore(const char *); +PDCEX int scr_set(const char *); +PDCEX int scrl(int); +PDCEX int scroll(WINDOW *); +PDCEX int scrollok(WINDOW *, bool); +PDCEX SCREEN *set_term(SCREEN *); +PDCEX int setscrreg(int, int); +PDCEX int slk_attroff(const chtype); +PDCEX int slk_attr_off(const attr_t, void *); +PDCEX int slk_attron(const chtype); +PDCEX int slk_attr_on(const attr_t, void *); +PDCEX int slk_attrset(const chtype); +PDCEX int slk_attr_set(const attr_t, short, void *); +PDCEX int slk_clear(void); +PDCEX int slk_color(short); +PDCEX int slk_init(int); +PDCEX char *slk_label(int); +PDCEX int slk_noutrefresh(void); +PDCEX int slk_refresh(void); +PDCEX int slk_restore(void); +PDCEX int slk_set(int, const char *, int); +PDCEX int slk_touch(void); +PDCEX int standend(void); +PDCEX int standout(void); +PDCEX int start_color(void); +PDCEX WINDOW *subpad(WINDOW *, int, int, int, int); +PDCEX WINDOW *subwin(WINDOW *, int, int, int, int); +PDCEX int syncok(WINDOW *, bool); +PDCEX chtype termattrs(void); +PDCEX attr_t term_attrs(void); +PDCEX char *termname(void); +PDCEX void timeout(int); +PDCEX int touchline(WINDOW *, int, int); +PDCEX int touchwin(WINDOW *); +PDCEX int typeahead(int); +PDCEX int untouchwin(WINDOW *); +PDCEX void use_env(bool); +PDCEX int vidattr(chtype); +PDCEX int vid_attr(attr_t, short, void *); +PDCEX int vidputs(chtype, int (*)(int)); +PDCEX int vid_puts(attr_t, short, void *, int (*)(int)); +PDCEX int vline(chtype, int); +PDCEX int vw_printw(WINDOW *, const char *, va_list); +PDCEX int vwprintw(WINDOW *, const char *, va_list); +PDCEX int vw_scanw(WINDOW *, const char *, va_list); +PDCEX int vwscanw(WINDOW *, const char *, va_list); +PDCEX int waddchnstr(WINDOW *, const chtype *, int); +PDCEX int waddchstr(WINDOW *, const chtype *); +PDCEX int waddch(WINDOW *, const chtype); +PDCEX int waddnstr(WINDOW *, const char *, int); +PDCEX int waddstr(WINDOW *, const char *); +PDCEX int wattroff(WINDOW *, chtype); +PDCEX int wattron(WINDOW *, chtype); +PDCEX int wattrset(WINDOW *, chtype); +PDCEX int wattr_get(WINDOW *, attr_t *, short *, void *); +PDCEX int wattr_off(WINDOW *, attr_t, void *); +PDCEX int wattr_on(WINDOW *, attr_t, void *); +PDCEX int wattr_set(WINDOW *, attr_t, short, void *); +PDCEX void wbkgdset(WINDOW *, chtype); +PDCEX int wbkgd(WINDOW *, chtype); +PDCEX int wborder(WINDOW *, chtype, chtype, chtype, chtype, + chtype, chtype, chtype, chtype); +PDCEX int wchgat(WINDOW *, int, attr_t, short, const void *); +PDCEX int wclear(WINDOW *); +PDCEX int wclrtobot(WINDOW *); +PDCEX int wclrtoeol(WINDOW *); +PDCEX int wcolor_set(WINDOW *, short, void *); +PDCEX void wcursyncup(WINDOW *); +PDCEX int wdelch(WINDOW *); +PDCEX int wdeleteln(WINDOW *); +PDCEX int wechochar(WINDOW *, const chtype); +PDCEX int werase(WINDOW *); +PDCEX int wgetch(WINDOW *); +PDCEX int wgetnstr(WINDOW *, char *, int); +PDCEX int wgetstr(WINDOW *, char *); +PDCEX int whline(WINDOW *, chtype, int); +PDCEX int winchnstr(WINDOW *, chtype *, int); +PDCEX int winchstr(WINDOW *, chtype *); +PDCEX chtype winch(WINDOW *); +PDCEX int winnstr(WINDOW *, char *, int); +PDCEX int winsch(WINDOW *, chtype); +PDCEX int winsdelln(WINDOW *, int); +PDCEX int winsertln(WINDOW *); +PDCEX int winsnstr(WINDOW *, const char *, int); +PDCEX int winsstr(WINDOW *, const char *); +PDCEX int winstr(WINDOW *, char *); +PDCEX int wmove(WINDOW *, int, int); +PDCEX int wnoutrefresh(WINDOW *); +PDCEX int wprintw(WINDOW *, const char *, ...); +PDCEX int wredrawln(WINDOW *, int, int); +PDCEX int wrefresh(WINDOW *); +PDCEX int wscanw(WINDOW *, const char *, ...); +PDCEX int wscrl(WINDOW *, int); +PDCEX int wsetscrreg(WINDOW *, int, int); +PDCEX int wstandend(WINDOW *); +PDCEX int wstandout(WINDOW *); +PDCEX void wsyncdown(WINDOW *); +PDCEX void wsyncup(WINDOW *); +PDCEX void wtimeout(WINDOW *, int); +PDCEX int wtouchln(WINDOW *, int, int, int); +PDCEX int wvline(WINDOW *, chtype, int); + +/* Wide-character functions */ + +#ifdef PDC_WIDE +PDCEX int addnwstr(const wchar_t *, int); +PDCEX int addwstr(const wchar_t *); +PDCEX int add_wch(const cchar_t *); +PDCEX int add_wchnstr(const cchar_t *, int); +PDCEX int add_wchstr(const cchar_t *); +PDCEX int bkgrnd(const cchar_t *); +PDCEX void bkgrndset(const cchar_t *); +PDCEX int border_set(const cchar_t *, const cchar_t *, const cchar_t *, + const cchar_t *, const cchar_t *, const cchar_t *, + const cchar_t *, const cchar_t *); +PDCEX int box_set(WINDOW *, const cchar_t *, const cchar_t *); +PDCEX int echo_wchar(const cchar_t *); +PDCEX int erasewchar(wchar_t *); +PDCEX int getbkgrnd(cchar_t *); +PDCEX int getcchar(const cchar_t *, wchar_t *, attr_t *, short *, void *); +PDCEX int getn_wstr(wint_t *, int); +PDCEX int get_wch(wint_t *); +PDCEX int get_wstr(wint_t *); +PDCEX int hline_set(const cchar_t *, int); +PDCEX int innwstr(wchar_t *, int); +PDCEX int ins_nwstr(const wchar_t *, int); +PDCEX int ins_wch(const cchar_t *); +PDCEX int ins_wstr(const wchar_t *); +PDCEX int inwstr(wchar_t *); +PDCEX int in_wch(cchar_t *); +PDCEX int in_wchnstr(cchar_t *, int); +PDCEX int in_wchstr(cchar_t *); +PDCEX char *key_name(wchar_t); +PDCEX int killwchar(wchar_t *); +PDCEX int mvaddnwstr(int, int, const wchar_t *, int); +PDCEX int mvaddwstr(int, int, const wchar_t *); +PDCEX int mvadd_wch(int, int, const cchar_t *); +PDCEX int mvadd_wchnstr(int, int, const cchar_t *, int); +PDCEX int mvadd_wchstr(int, int, const cchar_t *); +PDCEX int mvgetn_wstr(int, int, wint_t *, int); +PDCEX int mvget_wch(int, int, wint_t *); +PDCEX int mvget_wstr(int, int, wint_t *); +PDCEX int mvhline_set(int, int, const cchar_t *, int); +PDCEX int mvinnwstr(int, int, wchar_t *, int); +PDCEX int mvins_nwstr(int, int, const wchar_t *, int); +PDCEX int mvins_wch(int, int, const cchar_t *); +PDCEX int mvins_wstr(int, int, const wchar_t *); +PDCEX int mvinwstr(int, int, wchar_t *); +PDCEX int mvin_wch(int, int, cchar_t *); +PDCEX int mvin_wchnstr(int, int, cchar_t *, int); +PDCEX int mvin_wchstr(int, int, cchar_t *); +PDCEX int mvvline_set(int, int, const cchar_t *, int); +PDCEX int mvwaddnwstr(WINDOW *, int, int, const wchar_t *, int); +PDCEX int mvwaddwstr(WINDOW *, int, int, const wchar_t *); +PDCEX int mvwadd_wch(WINDOW *, int, int, const cchar_t *); +PDCEX int mvwadd_wchnstr(WINDOW *, int, int, const cchar_t *, int); +PDCEX int mvwadd_wchstr(WINDOW *, int, int, const cchar_t *); +PDCEX int mvwgetn_wstr(WINDOW *, int, int, wint_t *, int); +PDCEX int mvwget_wch(WINDOW *, int, int, wint_t *); +PDCEX int mvwget_wstr(WINDOW *, int, int, wint_t *); +PDCEX int mvwhline_set(WINDOW *, int, int, const cchar_t *, int); +PDCEX int mvwinnwstr(WINDOW *, int, int, wchar_t *, int); +PDCEX int mvwins_nwstr(WINDOW *, int, int, const wchar_t *, int); +PDCEX int mvwins_wch(WINDOW *, int, int, const cchar_t *); +PDCEX int mvwins_wstr(WINDOW *, int, int, const wchar_t *); +PDCEX int mvwin_wch(WINDOW *, int, int, cchar_t *); +PDCEX int mvwin_wchnstr(WINDOW *, int, int, cchar_t *, int); +PDCEX int mvwin_wchstr(WINDOW *, int, int, cchar_t *); +PDCEX int mvwinwstr(WINDOW *, int, int, wchar_t *); +PDCEX int mvwvline_set(WINDOW *, int, int, const cchar_t *, int); +PDCEX int pecho_wchar(WINDOW *, const cchar_t*); +PDCEX int setcchar(cchar_t*, const wchar_t*, const attr_t, + short, const void*); +PDCEX int slk_wset(int, const wchar_t *, int); +PDCEX int unget_wch(const wchar_t); +PDCEX int vline_set(const cchar_t *, int); +PDCEX int waddnwstr(WINDOW *, const wchar_t *, int); +PDCEX int waddwstr(WINDOW *, const wchar_t *); +PDCEX int wadd_wch(WINDOW *, const cchar_t *); +PDCEX int wadd_wchnstr(WINDOW *, const cchar_t *, int); +PDCEX int wadd_wchstr(WINDOW *, const cchar_t *); +PDCEX int wbkgrnd(WINDOW *, const cchar_t *); +PDCEX void wbkgrndset(WINDOW *, const cchar_t *); +PDCEX int wborder_set(WINDOW *, const cchar_t *, const cchar_t *, + const cchar_t *, const cchar_t *, const cchar_t *, + const cchar_t *, const cchar_t *, const cchar_t *); +PDCEX int wecho_wchar(WINDOW *, const cchar_t *); +PDCEX int wgetbkgrnd(WINDOW *, cchar_t *); +PDCEX int wgetn_wstr(WINDOW *, wint_t *, int); +PDCEX int wget_wch(WINDOW *, wint_t *); +PDCEX int wget_wstr(WINDOW *, wint_t *); +PDCEX int whline_set(WINDOW *, const cchar_t *, int); +PDCEX int winnwstr(WINDOW *, wchar_t *, int); +PDCEX int wins_nwstr(WINDOW *, const wchar_t *, int); +PDCEX int wins_wch(WINDOW *, const cchar_t *); +PDCEX int wins_wstr(WINDOW *, const wchar_t *); +PDCEX int winwstr(WINDOW *, wchar_t *); +PDCEX int win_wch(WINDOW *, cchar_t *); +PDCEX int win_wchnstr(WINDOW *, cchar_t *, int); +PDCEX int win_wchstr(WINDOW *, cchar_t *); +PDCEX wchar_t *wunctrl(cchar_t *); +PDCEX int wvline_set(WINDOW *, const cchar_t *, int); +#endif + +/* Quasi-standard */ + +PDCEX chtype getattrs(WINDOW *); +PDCEX int getbegx(WINDOW *); +PDCEX int getbegy(WINDOW *); +PDCEX int getmaxx(WINDOW *); +PDCEX int getmaxy(WINDOW *); +PDCEX int getparx(WINDOW *); +PDCEX int getpary(WINDOW *); +PDCEX int getcurx(WINDOW *); +PDCEX int getcury(WINDOW *); +PDCEX void traceoff(void); +PDCEX void traceon(void); +PDCEX char *unctrl(chtype); + +PDCEX int crmode(void); +PDCEX int nocrmode(void); +PDCEX int draino(int); +PDCEX int resetterm(void); +PDCEX int fixterm(void); +PDCEX int saveterm(void); +PDCEX void setsyx(int, int); + +PDCEX int mouse_set(mmask_t); +PDCEX int mouse_on(mmask_t); +PDCEX int mouse_off(mmask_t); +PDCEX int request_mouse_pos(void); +PDCEX void wmouse_position(WINDOW *, int *, int *); +PDCEX mmask_t getmouse(void); + +/* ncurses */ + +PDCEX int assume_default_colors(int, int); +PDCEX const char *curses_version(void); +PDCEX bool has_key(int); +PDCEX int use_default_colors(void); +PDCEX int wresize(WINDOW *, int, int); + +PDCEX int mouseinterval(int); +PDCEX mmask_t mousemask(mmask_t, mmask_t *); +PDCEX bool mouse_trafo(int *, int *, bool); +PDCEX int nc_getmouse(MEVENT *); +PDCEX int ungetmouse(MEVENT *); +PDCEX bool wenclose(const WINDOW *, int, int); +PDCEX bool wmouse_trafo(const WINDOW *, int *, int *, bool); + +/* PDCurses */ + +PDCEX int addrawch(chtype); +PDCEX int insrawch(chtype); +PDCEX bool is_termresized(void); +PDCEX int mvaddrawch(int, int, chtype); +PDCEX int mvdeleteln(int, int); +PDCEX int mvinsertln(int, int); +PDCEX int mvinsrawch(int, int, chtype); +PDCEX int mvwaddrawch(WINDOW *, int, int, chtype); +PDCEX int mvwdeleteln(WINDOW *, int, int); +PDCEX int mvwinsertln(WINDOW *, int, int); +PDCEX int mvwinsrawch(WINDOW *, int, int, chtype); +PDCEX int raw_output(bool); +PDCEX int resize_term(int, int); +PDCEX WINDOW *resize_window(WINDOW *, int, int); +PDCEX int waddrawch(WINDOW *, chtype); +PDCEX int winsrawch(WINDOW *, chtype); +PDCEX char wordchar(void); + +#ifdef PDC_WIDE +PDCEX wchar_t *slk_wlabel(int); +#endif + +PDCEX void PDC_debug(const char *, ...); +PDCEX void PDC_get_version(PDC_VERSION *); +PDCEX int PDC_ungetch(int); +PDCEX int PDC_set_blink(bool); +PDCEX int PDC_set_bold(bool); +PDCEX int PDC_set_line_color(short); +PDCEX void PDC_set_title(const char *); + +PDCEX int PDC_clearclipboard(void); +PDCEX int PDC_freeclipboard(char *); +PDCEX int PDC_getclipboard(char **, long *); +PDCEX int PDC_setclipboard(const char *, long); + +PDCEX unsigned long PDC_get_input_fd(void); +PDCEX unsigned long PDC_get_key_modifiers(void); +PDCEX int PDC_return_key_modifiers(bool); +PDCEX int PDC_save_key_modifiers(bool); + +#ifdef XCURSES +PDCEX WINDOW *Xinitscr(int, char **); +PDCEX void XCursesExit(void); +PDCEX int sb_init(void); +PDCEX int sb_set_horz(int, int, int); +PDCEX int sb_set_vert(int, int, int); +PDCEX int sb_get_horz(int *, int *, int *); +PDCEX int sb_get_vert(int *, int *, int *); +PDCEX int sb_refresh(void); +#endif + +/*** Functions defined as macros ***/ + +/* getch() and ungetch() conflict with some DOS libraries */ + +#define getch() wgetch(stdscr) +#define ungetch(ch) PDC_ungetch(ch) + +#define COLOR_PAIR(n) (((chtype)(n) << PDC_COLOR_SHIFT) & A_COLOR) +#define PAIR_NUMBER(n) (((n) & A_COLOR) >> PDC_COLOR_SHIFT) + +/* These will _only_ work as macros */ + +#define getbegyx(w, y, x) (y = getbegy(w), x = getbegx(w)) +#define getmaxyx(w, y, x) (y = getmaxy(w), x = getmaxx(w)) +#define getparyx(w, y, x) (y = getpary(w), x = getparx(w)) +#define getyx(w, y, x) (y = getcury(w), x = getcurx(w)) + +#define getsyx(y, x) { if (curscr->_leaveit) (y)=(x)=-1; \ + else getyx(curscr,(y),(x)); } + +#ifdef NCURSES_MOUSE_VERSION +# define getmouse(x) nc_getmouse(x) +#endif + +/* return codes from PDC_getclipboard() and PDC_setclipboard() calls */ + +#define PDC_CLIP_SUCCESS 0 +#define PDC_CLIP_ACCESS_ERROR 1 +#define PDC_CLIP_EMPTY 2 +#define PDC_CLIP_MEMORY_ERROR 3 + +/* PDCurses key modifier masks */ + +#define PDC_KEY_MODIFIER_SHIFT 1 +#define PDC_KEY_MODIFIER_CONTROL 2 +#define PDC_KEY_MODIFIER_ALT 4 +#define PDC_KEY_MODIFIER_NUMLOCK 8 + +#ifdef __cplusplus +# ifndef PDC_PP98 +# undef bool +# endif +} +#endif + +#endif /* __PDCURSES__ */ diff --git a/frontends/curses/win/curspriv.h b/frontends/curses/win/curspriv.h index 991b295..e17fb7b 100644 --- a/frontends/curses/win/curspriv.h +++ b/frontends/curses/win/curspriv.h @@ -1,122 +1,122 @@ -/* Private definitions and declarations for use within PDCurses. - These should generally not be referenced by applications. */ - -#ifndef __CURSES_INTERNALS__ -#define __CURSES_INTERNALS__ 1 - -#define CURSES_LIBRARY -#include - -#if defined(__TURBOC__) || defined(__EMX__) || defined(__DJGPP__) || \ - defined(PDC_99) || defined(__WATCOMC__) -# ifndef HAVE_VSSCANF -# define HAVE_VSSCANF /* have vsscanf() */ -# endif -#endif - -#if defined(PDC_99) || defined(__WATCOMC__) -# ifndef HAVE_VSNPRINTF -# define HAVE_VSNPRINTF /* have vsnprintf() */ -# endif -#endif - -/*----------------------------------------------------------------------*/ - -typedef struct /* structure for ripped off lines */ -{ - int line; - int (*init)(WINDOW *, int); -} RIPPEDOFFLINE; - -/* Window properties */ - -#define _SUBWIN 0x01 /* window is a subwindow */ -#define _PAD 0x10 /* X/Open Pad. */ -#define _SUBPAD 0x20 /* X/Open subpad. */ - -/* Miscellaneous */ - -#define _NO_CHANGE -1 /* flags line edge unchanged */ - -#define _ECHAR 0x08 /* Erase char (^H) */ -#define _DWCHAR 0x17 /* Delete Word char (^W) */ -#define _DLCHAR 0x15 /* Delete Line char (^U) */ - -extern WINDOW *pdc_lastscr; -extern FILE *pdc_dbfp; /* tracing file pointer (NULL = off) */ -extern bool pdc_color_started; -extern unsigned long pdc_key_modifiers; -extern MOUSE_STATUS pdc_mouse_status; - -/*----------------------------------------------------------------------*/ - -/* Platform implementation functions */ - -void PDC_beep(void); -bool PDC_can_change_color(void); -int PDC_color_content(short, short *, short *, short *); -bool PDC_check_key(void); -int PDC_curs_set(int); -void PDC_flushinp(void); -int PDC_get_columns(void); -int PDC_get_cursor_mode(void); -int PDC_get_key(void); -int PDC_get_rows(void); -void PDC_gotoyx(int, int); -int PDC_init_color(short, short, short, short); -void PDC_init_pair(short, short, short); -int PDC_modifiers_set(void); -int PDC_mouse_set(void); -void PDC_napms(int); -int PDC_pair_content(short, short *, short *); -void PDC_reset_prog_mode(void); -void PDC_reset_shell_mode(void); -int PDC_resize_screen(int, int); -void PDC_restore_screen_mode(int); -void PDC_save_screen_mode(int); -void PDC_scr_close(void); -void PDC_scr_free(void); -int PDC_scr_open(int, char **); -void PDC_set_keyboard_binary(bool); -void PDC_transform_line(int, int, int, const chtype *); -const char *PDC_sysname(void); - -/* Internal cross-module functions */ - -void PDC_init_atrtab(void); -WINDOW *PDC_makelines(WINDOW *); -WINDOW *PDC_makenew(int, int, int, int); -int PDC_mouse_in_slk(int, int); -void PDC_slk_free(void); -void PDC_slk_initialize(void); -void PDC_sync(WINDOW *); - -#ifdef PDC_WIDE -int PDC_mbtowc(wchar_t *, const char *, size_t); -size_t PDC_mbstowcs(wchar_t *, const char *, size_t); -size_t PDC_wcstombs(char *, const wchar_t *, size_t); -#endif - -#ifdef PDCDEBUG -# define PDC_LOG(x) if (pdc_dbfp) PDC_debug x -#else -# define PDC_LOG(x) -#endif - -/* Internal macros for attributes */ - -#define PDC_COLOR_PAIRS 256 - -#ifndef max -# define max(a,b) (((a) > (b)) ? (a) : (b)) -#endif -#ifndef min -# define min(a,b) (((a) < (b)) ? (a) : (b)) -#endif - -#define DIVROUND(num, divisor) ((num) + ((divisor) >> 1)) / (divisor) - -#define PDC_CLICK_PERIOD 150 /* time to wait for a click, if - not set by mouseinterval() */ - -#endif /* __CURSES_INTERNALS__ */ +/* Private definitions and declarations for use within PDCurses. + These should generally not be referenced by applications. */ + +#ifndef __CURSES_INTERNALS__ +#define __CURSES_INTERNALS__ 1 + +#define CURSES_LIBRARY +#include + +#if defined(__TURBOC__) || defined(__EMX__) || defined(__DJGPP__) || \ + defined(PDC_99) || defined(__WATCOMC__) +# ifndef HAVE_VSSCANF +# define HAVE_VSSCANF /* have vsscanf() */ +# endif +#endif + +#if defined(PDC_99) || defined(__WATCOMC__) +# ifndef HAVE_VSNPRINTF +# define HAVE_VSNPRINTF /* have vsnprintf() */ +# endif +#endif + +/*----------------------------------------------------------------------*/ + +typedef struct /* structure for ripped off lines */ +{ + int line; + int (*init)(WINDOW *, int); +} RIPPEDOFFLINE; + +/* Window properties */ + +#define _SUBWIN 0x01 /* window is a subwindow */ +#define _PAD 0x10 /* X/Open Pad. */ +#define _SUBPAD 0x20 /* X/Open subpad. */ + +/* Miscellaneous */ + +#define _NO_CHANGE -1 /* flags line edge unchanged */ + +#define _ECHAR 0x08 /* Erase char (^H) */ +#define _DWCHAR 0x17 /* Delete Word char (^W) */ +#define _DLCHAR 0x15 /* Delete Line char (^U) */ + +extern WINDOW *pdc_lastscr; +extern FILE *pdc_dbfp; /* tracing file pointer (NULL = off) */ +extern bool pdc_color_started; +extern unsigned long pdc_key_modifiers; +extern MOUSE_STATUS pdc_mouse_status; + +/*----------------------------------------------------------------------*/ + +/* Platform implementation functions */ + +void PDC_beep(void); +bool PDC_can_change_color(void); +int PDC_color_content(short, short *, short *, short *); +bool PDC_check_key(void); +int PDC_curs_set(int); +void PDC_flushinp(void); +int PDC_get_columns(void); +int PDC_get_cursor_mode(void); +int PDC_get_key(void); +int PDC_get_rows(void); +void PDC_gotoyx(int, int); +int PDC_init_color(short, short, short, short); +void PDC_init_pair(short, short, short); +int PDC_modifiers_set(void); +int PDC_mouse_set(void); +void PDC_napms(int); +int PDC_pair_content(short, short *, short *); +void PDC_reset_prog_mode(void); +void PDC_reset_shell_mode(void); +int PDC_resize_screen(int, int); +void PDC_restore_screen_mode(int); +void PDC_save_screen_mode(int); +void PDC_scr_close(void); +void PDC_scr_free(void); +int PDC_scr_open(int, char **); +void PDC_set_keyboard_binary(bool); +void PDC_transform_line(int, int, int, const chtype *); +const char *PDC_sysname(void); + +/* Internal cross-module functions */ + +void PDC_init_atrtab(void); +WINDOW *PDC_makelines(WINDOW *); +WINDOW *PDC_makenew(int, int, int, int); +int PDC_mouse_in_slk(int, int); +void PDC_slk_free(void); +void PDC_slk_initialize(void); +void PDC_sync(WINDOW *); + +#ifdef PDC_WIDE +int PDC_mbtowc(wchar_t *, const char *, size_t); +size_t PDC_mbstowcs(wchar_t *, const char *, size_t); +size_t PDC_wcstombs(char *, const wchar_t *, size_t); +#endif + +#ifdef PDCDEBUG +# define PDC_LOG(x) if (pdc_dbfp) PDC_debug x +#else +# define PDC_LOG(x) +#endif + +/* Internal macros for attributes */ + +#define PDC_COLOR_PAIRS 256 + +#ifndef max +# define max(a,b) (((a) > (b)) ? (a) : (b)) +#endif +#ifndef min +# define min(a,b) (((a) < (b)) ? (a) : (b)) +#endif + +#define DIVROUND(num, divisor) ((num) + ((divisor) >> 1)) / (divisor) + +#define PDC_CLICK_PERIOD 150 /* time to wait for a click, if + not set by mouseinterval() */ + +#endif /* __CURSES_INTERNALS__ */ diff --git a/frontends/curses/win/panel.h b/frontends/curses/win/panel.h index 83d4f2c..b2b3593 100644 --- a/frontends/curses/win/panel.h +++ b/frontends/curses/win/panel.h @@ -1,54 +1,54 @@ -/*----------------------------------------------------------------------* - * Panels for PDCurses * - *----------------------------------------------------------------------*/ - -#ifndef __PDCURSES_PANEL_H__ -#define __PDCURSES_PANEL_H__ 1 - -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -typedef struct panelobs -{ - struct panelobs *above; - struct panel *pan; -} PANELOBS; - -typedef struct panel -{ - WINDOW *win; - int wstarty; - int wendy; - int wstartx; - int wendx; - struct panel *below; - struct panel *above; - const void *user; - struct panelobs *obscure; -} PANEL; - -PDCEX int bottom_panel(PANEL *pan); -PDCEX int del_panel(PANEL *pan); -PDCEX int hide_panel(PANEL *pan); -PDCEX int move_panel(PANEL *pan, int starty, int startx); -PDCEX PANEL *new_panel(WINDOW *win); -PDCEX PANEL *panel_above(const PANEL *pan); -PDCEX PANEL *panel_below(const PANEL *pan); -PDCEX int panel_hidden(const PANEL *pan); -PDCEX const void *panel_userptr(const PANEL *pan); -PDCEX WINDOW *panel_window(const PANEL *pan); -PDCEX int replace_panel(PANEL *pan, WINDOW *win); -PDCEX int set_panel_userptr(PANEL *pan, const void *uptr); -PDCEX int show_panel(PANEL *pan); -PDCEX int top_panel(PANEL *pan); -PDCEX void update_panels(void); - -#ifdef __cplusplus -} -#endif - -#endif /* __PDCURSES_PANEL_H__ */ +/*----------------------------------------------------------------------* + * Panels for PDCurses * + *----------------------------------------------------------------------*/ + +#ifndef __PDCURSES_PANEL_H__ +#define __PDCURSES_PANEL_H__ 1 + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +typedef struct panelobs +{ + struct panelobs *above; + struct panel *pan; +} PANELOBS; + +typedef struct panel +{ + WINDOW *win; + int wstarty; + int wendy; + int wstartx; + int wendx; + struct panel *below; + struct panel *above; + const void *user; + struct panelobs *obscure; +} PANEL; + +PDCEX int bottom_panel(PANEL *pan); +PDCEX int del_panel(PANEL *pan); +PDCEX int hide_panel(PANEL *pan); +PDCEX int move_panel(PANEL *pan, int starty, int startx); +PDCEX PANEL *new_panel(WINDOW *win); +PDCEX PANEL *panel_above(const PANEL *pan); +PDCEX PANEL *panel_below(const PANEL *pan); +PDCEX int panel_hidden(const PANEL *pan); +PDCEX const void *panel_userptr(const PANEL *pan); +PDCEX WINDOW *panel_window(const PANEL *pan); +PDCEX int replace_panel(PANEL *pan, WINDOW *win); +PDCEX int set_panel_userptr(PANEL *pan, const void *uptr); +PDCEX int show_panel(PANEL *pan); +PDCEX int top_panel(PANEL *pan); +PDCEX void update_panels(void); + +#ifdef __cplusplus +} +#endif + +#endif /* __PDCURSES_PANEL_H__ */ diff --git a/frontends/gl/glad/include/KHR/khrplatform.h b/frontends/gl/glad/include/KHR/khrplatform.h index 975bbff..f65dab9 100644 --- a/frontends/gl/glad/include/KHR/khrplatform.h +++ b/frontends/gl/glad/include/KHR/khrplatform.h @@ -1,282 +1,282 @@ -#ifndef __khrplatform_h_ -#define __khrplatform_h_ - -/* -** Copyright (c) 2008-2018 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Materials. -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ - -/* Khronos platform-specific types and definitions. - * - * The master copy of khrplatform.h is maintained in the Khronos EGL - * Registry repository at https://github.com/KhronosGroup/EGL-Registry - * The last semantic modification to khrplatform.h was at commit ID: - * 67a3e0864c2d75ea5287b9f3d2eb74a745936692 - * - * Adopters may modify this file to suit their platform. Adopters are - * encouraged to submit platform specific modifications to the Khronos - * group so that they can be included in future versions of this file. - * Please submit changes by filing pull requests or issues on - * the EGL Registry repository linked above. - * - * - * See the Implementer's Guidelines for information about where this file - * should be located on your system and for more details of its use: - * http://www.khronos.org/registry/implementers_guide.pdf - * - * This file should be included as - * #include - * by Khronos client API header files that use its types and defines. - * - * The types in khrplatform.h should only be used to define API-specific types. - * - * Types defined in khrplatform.h: - * khronos_int8_t signed 8 bit - * khronos_uint8_t unsigned 8 bit - * khronos_int16_t signed 16 bit - * khronos_uint16_t unsigned 16 bit - * khronos_int32_t signed 32 bit - * khronos_uint32_t unsigned 32 bit - * khronos_int64_t signed 64 bit - * khronos_uint64_t unsigned 64 bit - * khronos_intptr_t signed same number of bits as a pointer - * khronos_uintptr_t unsigned same number of bits as a pointer - * khronos_ssize_t signed size - * khronos_usize_t unsigned size - * khronos_float_t signed 32 bit floating point - * khronos_time_ns_t unsigned 64 bit time in nanoseconds - * khronos_utime_nanoseconds_t unsigned time interval or absolute time in - * nanoseconds - * khronos_stime_nanoseconds_t signed time interval in nanoseconds - * khronos_boolean_enum_t enumerated boolean type. This should - * only be used as a base type when a client API's boolean type is - * an enum. Client APIs which use an integer or other type for - * booleans cannot use this as the base type for their boolean. - * - * Tokens defined in khrplatform.h: - * - * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. - * - * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. - * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. - * - * Calling convention macros defined in this file: - * KHRONOS_APICALL - * KHRONOS_APIENTRY - * KHRONOS_APIATTRIBUTES - * - * These may be used in function prototypes as: - * - * KHRONOS_APICALL void KHRONOS_APIENTRY funcname( - * int arg1, - * int arg2) KHRONOS_APIATTRIBUTES; - */ - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APICALL - *------------------------------------------------------------------------- - * This precedes the return type of the function in the function prototype. - */ -#if defined(_WIN32) && !defined(__SCITECH_SNAP__) -# define KHRONOS_APICALL __declspec(dllimport) -#elif defined (__SYMBIAN32__) -# define KHRONOS_APICALL IMPORT_C -#elif defined(__ANDROID__) -# define KHRONOS_APICALL __attribute__((visibility("default"))) -#else -# define KHRONOS_APICALL -#endif - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APIENTRY - *------------------------------------------------------------------------- - * This follows the return type of the function and precedes the function - * name in the function prototype. - */ -#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) - /* Win32 but not WinCE */ -# define KHRONOS_APIENTRY __stdcall -#else -# define KHRONOS_APIENTRY -#endif - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APIATTRIBUTES - *------------------------------------------------------------------------- - * This follows the closing parenthesis of the function prototype arguments. - */ -#if defined (__ARMCC_2__) -#define KHRONOS_APIATTRIBUTES __softfp -#else -#define KHRONOS_APIATTRIBUTES -#endif - -/*------------------------------------------------------------------------- - * basic type definitions - *-----------------------------------------------------------------------*/ -#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__) - - -/* - * Using - */ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(__VMS ) || defined(__sgi) - -/* - * Using - */ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(_WIN32) && !defined(__SCITECH_SNAP__) - -/* - * Win32 - */ -typedef __int32 khronos_int32_t; -typedef unsigned __int32 khronos_uint32_t; -typedef __int64 khronos_int64_t; -typedef unsigned __int64 khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(__sun__) || defined(__digital__) - -/* - * Sun or Digital - */ -typedef int khronos_int32_t; -typedef unsigned int khronos_uint32_t; -#if defined(__arch64__) || defined(_LP64) -typedef long int khronos_int64_t; -typedef unsigned long int khronos_uint64_t; -#else -typedef long long int khronos_int64_t; -typedef unsigned long long int khronos_uint64_t; -#endif /* __arch64__ */ -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif 0 - -/* - * Hypothetical platform with no float or int64 support - */ -typedef int khronos_int32_t; -typedef unsigned int khronos_uint32_t; -#define KHRONOS_SUPPORT_INT64 0 -#define KHRONOS_SUPPORT_FLOAT 0 - -#else - -/* - * Generic fallback - */ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#endif - - -/* - * Types that are (so far) the same on all platforms - */ -typedef signed char khronos_int8_t; -typedef unsigned char khronos_uint8_t; -typedef signed short int khronos_int16_t; -typedef unsigned short int khronos_uint16_t; - -/* - * Types that differ between LLP64 and LP64 architectures - in LLP64, - * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears - * to be the only LLP64 architecture in current use. - */ -#ifdef _WIN64 -typedef signed long long int khronos_intptr_t; -typedef unsigned long long int khronos_uintptr_t; -typedef signed long long int khronos_ssize_t; -typedef unsigned long long int khronos_usize_t; -#else -typedef signed long int khronos_intptr_t; -typedef unsigned long int khronos_uintptr_t; -typedef signed long int khronos_ssize_t; -typedef unsigned long int khronos_usize_t; -#endif - -#if KHRONOS_SUPPORT_FLOAT -/* - * Float type - */ -typedef float khronos_float_t; -#endif - -#if KHRONOS_SUPPORT_INT64 -/* Time types - * - * These types can be used to represent a time interval in nanoseconds or - * an absolute Unadjusted System Time. Unadjusted System Time is the number - * of nanoseconds since some arbitrary system event (e.g. since the last - * time the system booted). The Unadjusted System Time is an unsigned - * 64 bit value that wraps back to 0 every 584 years. Time intervals - * may be either signed or unsigned. - */ -typedef khronos_uint64_t khronos_utime_nanoseconds_t; -typedef khronos_int64_t khronos_stime_nanoseconds_t; -#endif - -/* - * Dummy value used to pad enum types to 32 bits. - */ -#ifndef KHRONOS_MAX_ENUM -#define KHRONOS_MAX_ENUM 0x7FFFFFFF -#endif - -/* - * Enumerated boolean type - * - * Values other than zero should be considered to be true. Therefore - * comparisons should not be made against KHRONOS_TRUE. - */ -typedef enum { - KHRONOS_FALSE = 0, - KHRONOS_TRUE = 1, - KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM -} khronos_boolean_enum_t; - -#endif /* __khrplatform_h_ */ +#ifndef __khrplatform_h_ +#define __khrplatform_h_ + +/* +** Copyright (c) 2008-2018 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +/* Khronos platform-specific types and definitions. + * + * The master copy of khrplatform.h is maintained in the Khronos EGL + * Registry repository at https://github.com/KhronosGroup/EGL-Registry + * The last semantic modification to khrplatform.h was at commit ID: + * 67a3e0864c2d75ea5287b9f3d2eb74a745936692 + * + * Adopters may modify this file to suit their platform. Adopters are + * encouraged to submit platform specific modifications to the Khronos + * group so that they can be included in future versions of this file. + * Please submit changes by filing pull requests or issues on + * the EGL Registry repository linked above. + * + * + * See the Implementer's Guidelines for information about where this file + * should be located on your system and for more details of its use: + * http://www.khronos.org/registry/implementers_guide.pdf + * + * This file should be included as + * #include + * by Khronos client API header files that use its types and defines. + * + * The types in khrplatform.h should only be used to define API-specific types. + * + * Types defined in khrplatform.h: + * khronos_int8_t signed 8 bit + * khronos_uint8_t unsigned 8 bit + * khronos_int16_t signed 16 bit + * khronos_uint16_t unsigned 16 bit + * khronos_int32_t signed 32 bit + * khronos_uint32_t unsigned 32 bit + * khronos_int64_t signed 64 bit + * khronos_uint64_t unsigned 64 bit + * khronos_intptr_t signed same number of bits as a pointer + * khronos_uintptr_t unsigned same number of bits as a pointer + * khronos_ssize_t signed size + * khronos_usize_t unsigned size + * khronos_float_t signed 32 bit floating point + * khronos_time_ns_t unsigned 64 bit time in nanoseconds + * khronos_utime_nanoseconds_t unsigned time interval or absolute time in + * nanoseconds + * khronos_stime_nanoseconds_t signed time interval in nanoseconds + * khronos_boolean_enum_t enumerated boolean type. This should + * only be used as a base type when a client API's boolean type is + * an enum. Client APIs which use an integer or other type for + * booleans cannot use this as the base type for their boolean. + * + * Tokens defined in khrplatform.h: + * + * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. + * + * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. + * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. + * + * Calling convention macros defined in this file: + * KHRONOS_APICALL + * KHRONOS_APIENTRY + * KHRONOS_APIATTRIBUTES + * + * These may be used in function prototypes as: + * + * KHRONOS_APICALL void KHRONOS_APIENTRY funcname( + * int arg1, + * int arg2) KHRONOS_APIATTRIBUTES; + */ + +/*------------------------------------------------------------------------- + * Definition of KHRONOS_APICALL + *------------------------------------------------------------------------- + * This precedes the return type of the function in the function prototype. + */ +#if defined(_WIN32) && !defined(__SCITECH_SNAP__) +# define KHRONOS_APICALL __declspec(dllimport) +#elif defined (__SYMBIAN32__) +# define KHRONOS_APICALL IMPORT_C +#elif defined(__ANDROID__) +# define KHRONOS_APICALL __attribute__((visibility("default"))) +#else +# define KHRONOS_APICALL +#endif + +/*------------------------------------------------------------------------- + * Definition of KHRONOS_APIENTRY + *------------------------------------------------------------------------- + * This follows the return type of the function and precedes the function + * name in the function prototype. + */ +#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) + /* Win32 but not WinCE */ +# define KHRONOS_APIENTRY __stdcall +#else +# define KHRONOS_APIENTRY +#endif + +/*------------------------------------------------------------------------- + * Definition of KHRONOS_APIATTRIBUTES + *------------------------------------------------------------------------- + * This follows the closing parenthesis of the function prototype arguments. + */ +#if defined (__ARMCC_2__) +#define KHRONOS_APIATTRIBUTES __softfp +#else +#define KHRONOS_APIATTRIBUTES +#endif + +/*------------------------------------------------------------------------- + * basic type definitions + *-----------------------------------------------------------------------*/ +#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__) + + +/* + * Using + */ +#include +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif defined(__VMS ) || defined(__sgi) + +/* + * Using + */ +#include +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif defined(_WIN32) && !defined(__SCITECH_SNAP__) + +/* + * Win32 + */ +typedef __int32 khronos_int32_t; +typedef unsigned __int32 khronos_uint32_t; +typedef __int64 khronos_int64_t; +typedef unsigned __int64 khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif defined(__sun__) || defined(__digital__) + +/* + * Sun or Digital + */ +typedef int khronos_int32_t; +typedef unsigned int khronos_uint32_t; +#if defined(__arch64__) || defined(_LP64) +typedef long int khronos_int64_t; +typedef unsigned long int khronos_uint64_t; +#else +typedef long long int khronos_int64_t; +typedef unsigned long long int khronos_uint64_t; +#endif /* __arch64__ */ +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif 0 + +/* + * Hypothetical platform with no float or int64 support + */ +typedef int khronos_int32_t; +typedef unsigned int khronos_uint32_t; +#define KHRONOS_SUPPORT_INT64 0 +#define KHRONOS_SUPPORT_FLOAT 0 + +#else + +/* + * Generic fallback + */ +#include +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#endif + + +/* + * Types that are (so far) the same on all platforms + */ +typedef signed char khronos_int8_t; +typedef unsigned char khronos_uint8_t; +typedef signed short int khronos_int16_t; +typedef unsigned short int khronos_uint16_t; + +/* + * Types that differ between LLP64 and LP64 architectures - in LLP64, + * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears + * to be the only LLP64 architecture in current use. + */ +#ifdef _WIN64 +typedef signed long long int khronos_intptr_t; +typedef unsigned long long int khronos_uintptr_t; +typedef signed long long int khronos_ssize_t; +typedef unsigned long long int khronos_usize_t; +#else +typedef signed long int khronos_intptr_t; +typedef unsigned long int khronos_uintptr_t; +typedef signed long int khronos_ssize_t; +typedef unsigned long int khronos_usize_t; +#endif + +#if KHRONOS_SUPPORT_FLOAT +/* + * Float type + */ +typedef float khronos_float_t; +#endif + +#if KHRONOS_SUPPORT_INT64 +/* Time types + * + * These types can be used to represent a time interval in nanoseconds or + * an absolute Unadjusted System Time. Unadjusted System Time is the number + * of nanoseconds since some arbitrary system event (e.g. since the last + * time the system booted). The Unadjusted System Time is an unsigned + * 64 bit value that wraps back to 0 every 584 years. Time intervals + * may be either signed or unsigned. + */ +typedef khronos_uint64_t khronos_utime_nanoseconds_t; +typedef khronos_int64_t khronos_stime_nanoseconds_t; +#endif + +/* + * Dummy value used to pad enum types to 32 bits. + */ +#ifndef KHRONOS_MAX_ENUM +#define KHRONOS_MAX_ENUM 0x7FFFFFFF +#endif + +/* + * Enumerated boolean type + * + * Values other than zero should be considered to be true. Therefore + * comparisons should not be made against KHRONOS_TRUE. + */ +typedef enum { + KHRONOS_FALSE = 0, + KHRONOS_TRUE = 1, + KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM +} khronos_boolean_enum_t; + +#endif /* __khrplatform_h_ */ diff --git a/frontends/gl/glad/include/glad/glad.h b/frontends/gl/glad/include/glad/glad.h index 1e8a38a..1875a14 100644 --- a/frontends/gl/glad/include/glad/glad.h +++ b/frontends/gl/glad/include/glad/glad.h @@ -1,3650 +1,3650 @@ -/* - - OpenGL loader generated by glad 0.1.29 on Wed Apr 3 21:28:46 2019. - - Language/Generator: C/C++ - Specification: gl - APIs: gl=4.5 - Profile: core - Extensions: - - Loader: True - Local files: False - Omit khrplatform: False - Reproducible: False - - Commandline: - --profile="core" --api="gl=4.5" --generator="c" --spec="gl" --extensions="" - Online: - https://glad.dav1d.de/#profile=core&language=c&specification=gl&loader=on&api=gl%3D4.5 -*/ - - -#ifndef __glad_h_ -#define __glad_h_ - -#ifdef __gl_h_ -#error OpenGL header already included, remove this include, glad already provides it -#endif -#define __gl_h_ - -#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN 1 -#endif -#ifndef NOMINMAX -#define NOMINMAX 1 -#endif -#include -#endif - -#ifndef APIENTRY -#define APIENTRY -#endif -#ifndef APIENTRYP -#define APIENTRYP APIENTRY * -#endif - -#ifndef GLAPIENTRY -#define GLAPIENTRY APIENTRY -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -struct gladGLversionStruct { - int major; - int minor; -}; - -typedef void* (* GLADloadproc)(const char *name); - -#ifndef GLAPI -# if defined(GLAD_GLAPI_EXPORT) -# if defined(_WIN32) || defined(__CYGWIN__) -# if defined(GLAD_GLAPI_EXPORT_BUILD) -# if defined(__GNUC__) -# define GLAPI __attribute__ ((dllexport)) extern -# else -# define GLAPI __declspec(dllexport) extern -# endif -# else -# if defined(__GNUC__) -# define GLAPI __attribute__ ((dllimport)) extern -# else -# define GLAPI __declspec(dllimport) extern -# endif -# endif -# elif defined(__GNUC__) && defined(GLAD_GLAPI_EXPORT_BUILD) -# define GLAPI __attribute__ ((visibility ("default"))) extern -# else -# define GLAPI extern -# endif -# else -# define GLAPI extern -# endif -#endif - -GLAPI struct gladGLversionStruct GLVersion; - -GLAPI int gladLoadGL(void); - -GLAPI int gladLoadGLLoader(GLADloadproc); - -#include -typedef unsigned int GLenum; -typedef unsigned char GLboolean; -typedef unsigned int GLbitfield; -typedef void GLvoid; -typedef khronos_int8_t GLbyte; -typedef khronos_uint8_t GLubyte; -typedef khronos_int16_t GLshort; -typedef khronos_uint16_t GLushort; -typedef int GLint; -typedef unsigned int GLuint; -typedef khronos_int32_t GLclampx; -typedef int GLsizei; -typedef khronos_float_t GLfloat; -typedef khronos_float_t GLclampf; -typedef double GLdouble; -typedef double GLclampd; -typedef void *GLeglClientBufferEXT; -typedef void *GLeglImageOES; -typedef char GLchar; -typedef char GLcharARB; -#ifdef __APPLE__ -typedef void *GLhandleARB; -#else -typedef unsigned int GLhandleARB; -#endif -typedef khronos_uint16_t GLhalf; -typedef khronos_uint16_t GLhalfARB; -typedef khronos_int32_t GLfixed; -typedef khronos_intptr_t GLintptr; -typedef khronos_intptr_t GLintptrARB; -typedef khronos_ssize_t GLsizeiptr; -typedef khronos_ssize_t GLsizeiptrARB; -typedef khronos_int64_t GLint64; -typedef khronos_int64_t GLint64EXT; -typedef khronos_uint64_t GLuint64; -typedef khronos_uint64_t GLuint64EXT; -typedef struct __GLsync *GLsync; -struct _cl_context; -struct _cl_event; -typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); -typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); -typedef void (APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); -typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam); -typedef unsigned short GLhalfNV; -typedef GLintptr GLvdpauSurfaceNV; -typedef void (APIENTRY *GLVULKANPROCNV)(void); -#define GL_DEPTH_BUFFER_BIT 0x00000100 -#define GL_STENCIL_BUFFER_BIT 0x00000400 -#define GL_COLOR_BUFFER_BIT 0x00004000 -#define GL_FALSE 0 -#define GL_TRUE 1 -#define GL_POINTS 0x0000 -#define GL_LINES 0x0001 -#define GL_LINE_LOOP 0x0002 -#define GL_LINE_STRIP 0x0003 -#define GL_TRIANGLES 0x0004 -#define GL_TRIANGLE_STRIP 0x0005 -#define GL_TRIANGLE_FAN 0x0006 -#define GL_NEVER 0x0200 -#define GL_LESS 0x0201 -#define GL_EQUAL 0x0202 -#define GL_LEQUAL 0x0203 -#define GL_GREATER 0x0204 -#define GL_NOTEQUAL 0x0205 -#define GL_GEQUAL 0x0206 -#define GL_ALWAYS 0x0207 -#define GL_ZERO 0 -#define GL_ONE 1 -#define GL_SRC_COLOR 0x0300 -#define GL_ONE_MINUS_SRC_COLOR 0x0301 -#define GL_SRC_ALPHA 0x0302 -#define GL_ONE_MINUS_SRC_ALPHA 0x0303 -#define GL_DST_ALPHA 0x0304 -#define GL_ONE_MINUS_DST_ALPHA 0x0305 -#define GL_DST_COLOR 0x0306 -#define GL_ONE_MINUS_DST_COLOR 0x0307 -#define GL_SRC_ALPHA_SATURATE 0x0308 -#define GL_NONE 0 -#define GL_FRONT_LEFT 0x0400 -#define GL_FRONT_RIGHT 0x0401 -#define GL_BACK_LEFT 0x0402 -#define GL_BACK_RIGHT 0x0403 -#define GL_FRONT 0x0404 -#define GL_BACK 0x0405 -#define GL_LEFT 0x0406 -#define GL_RIGHT 0x0407 -#define GL_FRONT_AND_BACK 0x0408 -#define GL_NO_ERROR 0 -#define GL_INVALID_ENUM 0x0500 -#define GL_INVALID_VALUE 0x0501 -#define GL_INVALID_OPERATION 0x0502 -#define GL_OUT_OF_MEMORY 0x0505 -#define GL_CW 0x0900 -#define GL_CCW 0x0901 -#define GL_POINT_SIZE 0x0B11 -#define GL_POINT_SIZE_RANGE 0x0B12 -#define GL_POINT_SIZE_GRANULARITY 0x0B13 -#define GL_LINE_SMOOTH 0x0B20 -#define GL_LINE_WIDTH 0x0B21 -#define GL_LINE_WIDTH_RANGE 0x0B22 -#define GL_LINE_WIDTH_GRANULARITY 0x0B23 -#define GL_POLYGON_MODE 0x0B40 -#define GL_POLYGON_SMOOTH 0x0B41 -#define GL_CULL_FACE 0x0B44 -#define GL_CULL_FACE_MODE 0x0B45 -#define GL_FRONT_FACE 0x0B46 -#define GL_DEPTH_RANGE 0x0B70 -#define GL_DEPTH_TEST 0x0B71 -#define GL_DEPTH_WRITEMASK 0x0B72 -#define GL_DEPTH_CLEAR_VALUE 0x0B73 -#define GL_DEPTH_FUNC 0x0B74 -#define GL_STENCIL_TEST 0x0B90 -#define GL_STENCIL_CLEAR_VALUE 0x0B91 -#define GL_STENCIL_FUNC 0x0B92 -#define GL_STENCIL_VALUE_MASK 0x0B93 -#define GL_STENCIL_FAIL 0x0B94 -#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 -#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 -#define GL_STENCIL_REF 0x0B97 -#define GL_STENCIL_WRITEMASK 0x0B98 -#define GL_VIEWPORT 0x0BA2 -#define GL_DITHER 0x0BD0 -#define GL_BLEND_DST 0x0BE0 -#define GL_BLEND_SRC 0x0BE1 -#define GL_BLEND 0x0BE2 -#define GL_LOGIC_OP_MODE 0x0BF0 -#define GL_DRAW_BUFFER 0x0C01 -#define GL_READ_BUFFER 0x0C02 -#define GL_SCISSOR_BOX 0x0C10 -#define GL_SCISSOR_TEST 0x0C11 -#define GL_COLOR_CLEAR_VALUE 0x0C22 -#define GL_COLOR_WRITEMASK 0x0C23 -#define GL_DOUBLEBUFFER 0x0C32 -#define GL_STEREO 0x0C33 -#define GL_LINE_SMOOTH_HINT 0x0C52 -#define GL_POLYGON_SMOOTH_HINT 0x0C53 -#define GL_UNPACK_SWAP_BYTES 0x0CF0 -#define GL_UNPACK_LSB_FIRST 0x0CF1 -#define GL_UNPACK_ROW_LENGTH 0x0CF2 -#define GL_UNPACK_SKIP_ROWS 0x0CF3 -#define GL_UNPACK_SKIP_PIXELS 0x0CF4 -#define GL_UNPACK_ALIGNMENT 0x0CF5 -#define GL_PACK_SWAP_BYTES 0x0D00 -#define GL_PACK_LSB_FIRST 0x0D01 -#define GL_PACK_ROW_LENGTH 0x0D02 -#define GL_PACK_SKIP_ROWS 0x0D03 -#define GL_PACK_SKIP_PIXELS 0x0D04 -#define GL_PACK_ALIGNMENT 0x0D05 -#define GL_MAX_TEXTURE_SIZE 0x0D33 -#define GL_MAX_VIEWPORT_DIMS 0x0D3A -#define GL_SUBPIXEL_BITS 0x0D50 -#define GL_TEXTURE_1D 0x0DE0 -#define GL_TEXTURE_2D 0x0DE1 -#define GL_TEXTURE_WIDTH 0x1000 -#define GL_TEXTURE_HEIGHT 0x1001 -#define GL_TEXTURE_BORDER_COLOR 0x1004 -#define GL_DONT_CARE 0x1100 -#define GL_FASTEST 0x1101 -#define GL_NICEST 0x1102 -#define GL_BYTE 0x1400 -#define GL_UNSIGNED_BYTE 0x1401 -#define GL_SHORT 0x1402 -#define GL_UNSIGNED_SHORT 0x1403 -#define GL_INT 0x1404 -#define GL_UNSIGNED_INT 0x1405 -#define GL_FLOAT 0x1406 -#define GL_CLEAR 0x1500 -#define GL_AND 0x1501 -#define GL_AND_REVERSE 0x1502 -#define GL_COPY 0x1503 -#define GL_AND_INVERTED 0x1504 -#define GL_NOOP 0x1505 -#define GL_XOR 0x1506 -#define GL_OR 0x1507 -#define GL_NOR 0x1508 -#define GL_EQUIV 0x1509 -#define GL_INVERT 0x150A -#define GL_OR_REVERSE 0x150B -#define GL_COPY_INVERTED 0x150C -#define GL_OR_INVERTED 0x150D -#define GL_NAND 0x150E -#define GL_SET 0x150F -#define GL_TEXTURE 0x1702 -#define GL_COLOR 0x1800 -#define GL_DEPTH 0x1801 -#define GL_STENCIL 0x1802 -#define GL_STENCIL_INDEX 0x1901 -#define GL_DEPTH_COMPONENT 0x1902 -#define GL_RED 0x1903 -#define GL_GREEN 0x1904 -#define GL_BLUE 0x1905 -#define GL_ALPHA 0x1906 -#define GL_RGB 0x1907 -#define GL_RGBA 0x1908 -#define GL_POINT 0x1B00 -#define GL_LINE 0x1B01 -#define GL_FILL 0x1B02 -#define GL_KEEP 0x1E00 -#define GL_REPLACE 0x1E01 -#define GL_INCR 0x1E02 -#define GL_DECR 0x1E03 -#define GL_VENDOR 0x1F00 -#define GL_RENDERER 0x1F01 -#define GL_VERSION 0x1F02 -#define GL_EXTENSIONS 0x1F03 -#define GL_NEAREST 0x2600 -#define GL_LINEAR 0x2601 -#define GL_NEAREST_MIPMAP_NEAREST 0x2700 -#define GL_LINEAR_MIPMAP_NEAREST 0x2701 -#define GL_NEAREST_MIPMAP_LINEAR 0x2702 -#define GL_LINEAR_MIPMAP_LINEAR 0x2703 -#define GL_TEXTURE_MAG_FILTER 0x2800 -#define GL_TEXTURE_MIN_FILTER 0x2801 -#define GL_TEXTURE_WRAP_S 0x2802 -#define GL_TEXTURE_WRAP_T 0x2803 -#define GL_REPEAT 0x2901 -#define GL_COLOR_LOGIC_OP 0x0BF2 -#define GL_POLYGON_OFFSET_UNITS 0x2A00 -#define GL_POLYGON_OFFSET_POINT 0x2A01 -#define GL_POLYGON_OFFSET_LINE 0x2A02 -#define GL_POLYGON_OFFSET_FILL 0x8037 -#define GL_POLYGON_OFFSET_FACTOR 0x8038 -#define GL_TEXTURE_BINDING_1D 0x8068 -#define GL_TEXTURE_BINDING_2D 0x8069 -#define GL_TEXTURE_INTERNAL_FORMAT 0x1003 -#define GL_TEXTURE_RED_SIZE 0x805C -#define GL_TEXTURE_GREEN_SIZE 0x805D -#define GL_TEXTURE_BLUE_SIZE 0x805E -#define GL_TEXTURE_ALPHA_SIZE 0x805F -#define GL_DOUBLE 0x140A -#define GL_PROXY_TEXTURE_1D 0x8063 -#define GL_PROXY_TEXTURE_2D 0x8064 -#define GL_R3_G3_B2 0x2A10 -#define GL_RGB4 0x804F -#define GL_RGB5 0x8050 -#define GL_RGB8 0x8051 -#define GL_RGB10 0x8052 -#define GL_RGB12 0x8053 -#define GL_RGB16 0x8054 -#define GL_RGBA2 0x8055 -#define GL_RGBA4 0x8056 -#define GL_RGB5_A1 0x8057 -#define GL_RGBA8 0x8058 -#define GL_RGB10_A2 0x8059 -#define GL_RGBA12 0x805A -#define GL_RGBA16 0x805B -#define GL_UNSIGNED_BYTE_3_3_2 0x8032 -#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 -#define GL_UNSIGNED_INT_8_8_8_8 0x8035 -#define GL_UNSIGNED_INT_10_10_10_2 0x8036 -#define GL_TEXTURE_BINDING_3D 0x806A -#define GL_PACK_SKIP_IMAGES 0x806B -#define GL_PACK_IMAGE_HEIGHT 0x806C -#define GL_UNPACK_SKIP_IMAGES 0x806D -#define GL_UNPACK_IMAGE_HEIGHT 0x806E -#define GL_TEXTURE_3D 0x806F -#define GL_PROXY_TEXTURE_3D 0x8070 -#define GL_TEXTURE_DEPTH 0x8071 -#define GL_TEXTURE_WRAP_R 0x8072 -#define GL_MAX_3D_TEXTURE_SIZE 0x8073 -#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 -#define GL_UNSIGNED_SHORT_5_6_5 0x8363 -#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 -#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 -#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 -#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 -#define GL_BGR 0x80E0 -#define GL_BGRA 0x80E1 -#define GL_MAX_ELEMENTS_VERTICES 0x80E8 -#define GL_MAX_ELEMENTS_INDICES 0x80E9 -#define GL_CLAMP_TO_EDGE 0x812F -#define GL_TEXTURE_MIN_LOD 0x813A -#define GL_TEXTURE_MAX_LOD 0x813B -#define GL_TEXTURE_BASE_LEVEL 0x813C -#define GL_TEXTURE_MAX_LEVEL 0x813D -#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 -#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 -#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 -#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 -#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E -#define GL_TEXTURE0 0x84C0 -#define GL_TEXTURE1 0x84C1 -#define GL_TEXTURE2 0x84C2 -#define GL_TEXTURE3 0x84C3 -#define GL_TEXTURE4 0x84C4 -#define GL_TEXTURE5 0x84C5 -#define GL_TEXTURE6 0x84C6 -#define GL_TEXTURE7 0x84C7 -#define GL_TEXTURE8 0x84C8 -#define GL_TEXTURE9 0x84C9 -#define GL_TEXTURE10 0x84CA -#define GL_TEXTURE11 0x84CB -#define GL_TEXTURE12 0x84CC -#define GL_TEXTURE13 0x84CD -#define GL_TEXTURE14 0x84CE -#define GL_TEXTURE15 0x84CF -#define GL_TEXTURE16 0x84D0 -#define GL_TEXTURE17 0x84D1 -#define GL_TEXTURE18 0x84D2 -#define GL_TEXTURE19 0x84D3 -#define GL_TEXTURE20 0x84D4 -#define GL_TEXTURE21 0x84D5 -#define GL_TEXTURE22 0x84D6 -#define GL_TEXTURE23 0x84D7 -#define GL_TEXTURE24 0x84D8 -#define GL_TEXTURE25 0x84D9 -#define GL_TEXTURE26 0x84DA -#define GL_TEXTURE27 0x84DB -#define GL_TEXTURE28 0x84DC -#define GL_TEXTURE29 0x84DD -#define GL_TEXTURE30 0x84DE -#define GL_TEXTURE31 0x84DF -#define GL_ACTIVE_TEXTURE 0x84E0 -#define GL_MULTISAMPLE 0x809D -#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE 0x809F -#define GL_SAMPLE_COVERAGE 0x80A0 -#define GL_SAMPLE_BUFFERS 0x80A8 -#define GL_SAMPLES 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT 0x80AB -#define GL_TEXTURE_CUBE_MAP 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A -#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C -#define GL_COMPRESSED_RGB 0x84ED -#define GL_COMPRESSED_RGBA 0x84EE -#define GL_TEXTURE_COMPRESSION_HINT 0x84EF -#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 -#define GL_TEXTURE_COMPRESSED 0x86A1 -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 -#define GL_CLAMP_TO_BORDER 0x812D -#define GL_BLEND_DST_RGB 0x80C8 -#define GL_BLEND_SRC_RGB 0x80C9 -#define GL_BLEND_DST_ALPHA 0x80CA -#define GL_BLEND_SRC_ALPHA 0x80CB -#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 -#define GL_DEPTH_COMPONENT16 0x81A5 -#define GL_DEPTH_COMPONENT24 0x81A6 -#define GL_DEPTH_COMPONENT32 0x81A7 -#define GL_MIRRORED_REPEAT 0x8370 -#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD -#define GL_TEXTURE_LOD_BIAS 0x8501 -#define GL_INCR_WRAP 0x8507 -#define GL_DECR_WRAP 0x8508 -#define GL_TEXTURE_DEPTH_SIZE 0x884A -#define GL_TEXTURE_COMPARE_MODE 0x884C -#define GL_TEXTURE_COMPARE_FUNC 0x884D -#define GL_BLEND_COLOR 0x8005 -#define GL_BLEND_EQUATION 0x8009 -#define GL_CONSTANT_COLOR 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 -#define GL_CONSTANT_ALPHA 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 -#define GL_FUNC_ADD 0x8006 -#define GL_FUNC_REVERSE_SUBTRACT 0x800B -#define GL_FUNC_SUBTRACT 0x800A -#define GL_MIN 0x8007 -#define GL_MAX 0x8008 -#define GL_BUFFER_SIZE 0x8764 -#define GL_BUFFER_USAGE 0x8765 -#define GL_QUERY_COUNTER_BITS 0x8864 -#define GL_CURRENT_QUERY 0x8865 -#define GL_QUERY_RESULT 0x8866 -#define GL_QUERY_RESULT_AVAILABLE 0x8867 -#define GL_ARRAY_BUFFER 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER 0x8893 -#define GL_ARRAY_BUFFER_BINDING 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F -#define GL_READ_ONLY 0x88B8 -#define GL_WRITE_ONLY 0x88B9 -#define GL_READ_WRITE 0x88BA -#define GL_BUFFER_ACCESS 0x88BB -#define GL_BUFFER_MAPPED 0x88BC -#define GL_BUFFER_MAP_POINTER 0x88BD -#define GL_STREAM_DRAW 0x88E0 -#define GL_STREAM_READ 0x88E1 -#define GL_STREAM_COPY 0x88E2 -#define GL_STATIC_DRAW 0x88E4 -#define GL_STATIC_READ 0x88E5 -#define GL_STATIC_COPY 0x88E6 -#define GL_DYNAMIC_DRAW 0x88E8 -#define GL_DYNAMIC_READ 0x88E9 -#define GL_DYNAMIC_COPY 0x88EA -#define GL_SAMPLES_PASSED 0x8914 -#define GL_SRC1_ALPHA 0x8589 -#define GL_BLEND_EQUATION_RGB 0x8009 -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 -#define GL_CURRENT_VERTEX_ATTRIB 0x8626 -#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 -#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 -#define GL_STENCIL_BACK_FUNC 0x8800 -#define GL_STENCIL_BACK_FAIL 0x8801 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 -#define GL_MAX_DRAW_BUFFERS 0x8824 -#define GL_DRAW_BUFFER0 0x8825 -#define GL_DRAW_BUFFER1 0x8826 -#define GL_DRAW_BUFFER2 0x8827 -#define GL_DRAW_BUFFER3 0x8828 -#define GL_DRAW_BUFFER4 0x8829 -#define GL_DRAW_BUFFER5 0x882A -#define GL_DRAW_BUFFER6 0x882B -#define GL_DRAW_BUFFER7 0x882C -#define GL_DRAW_BUFFER8 0x882D -#define GL_DRAW_BUFFER9 0x882E -#define GL_DRAW_BUFFER10 0x882F -#define GL_DRAW_BUFFER11 0x8830 -#define GL_DRAW_BUFFER12 0x8831 -#define GL_DRAW_BUFFER13 0x8832 -#define GL_DRAW_BUFFER14 0x8833 -#define GL_DRAW_BUFFER15 0x8834 -#define GL_BLEND_EQUATION_ALPHA 0x883D -#define GL_MAX_VERTEX_ATTRIBS 0x8869 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A -#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 -#define GL_FRAGMENT_SHADER 0x8B30 -#define GL_VERTEX_SHADER 0x8B31 -#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 -#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A -#define GL_MAX_VARYING_FLOATS 0x8B4B -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D -#define GL_SHADER_TYPE 0x8B4F -#define GL_FLOAT_VEC2 0x8B50 -#define GL_FLOAT_VEC3 0x8B51 -#define GL_FLOAT_VEC4 0x8B52 -#define GL_INT_VEC2 0x8B53 -#define GL_INT_VEC3 0x8B54 -#define GL_INT_VEC4 0x8B55 -#define GL_BOOL 0x8B56 -#define GL_BOOL_VEC2 0x8B57 -#define GL_BOOL_VEC3 0x8B58 -#define GL_BOOL_VEC4 0x8B59 -#define GL_FLOAT_MAT2 0x8B5A -#define GL_FLOAT_MAT3 0x8B5B -#define GL_FLOAT_MAT4 0x8B5C -#define GL_SAMPLER_1D 0x8B5D -#define GL_SAMPLER_2D 0x8B5E -#define GL_SAMPLER_3D 0x8B5F -#define GL_SAMPLER_CUBE 0x8B60 -#define GL_SAMPLER_1D_SHADOW 0x8B61 -#define GL_SAMPLER_2D_SHADOW 0x8B62 -#define GL_DELETE_STATUS 0x8B80 -#define GL_COMPILE_STATUS 0x8B81 -#define GL_LINK_STATUS 0x8B82 -#define GL_VALIDATE_STATUS 0x8B83 -#define GL_INFO_LOG_LENGTH 0x8B84 -#define GL_ATTACHED_SHADERS 0x8B85 -#define GL_ACTIVE_UNIFORMS 0x8B86 -#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 -#define GL_SHADER_SOURCE_LENGTH 0x8B88 -#define GL_ACTIVE_ATTRIBUTES 0x8B89 -#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B -#define GL_SHADING_LANGUAGE_VERSION 0x8B8C -#define GL_CURRENT_PROGRAM 0x8B8D -#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 -#define GL_LOWER_LEFT 0x8CA1 -#define GL_UPPER_LEFT 0x8CA2 -#define GL_STENCIL_BACK_REF 0x8CA3 -#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 -#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 -#define GL_PIXEL_PACK_BUFFER 0x88EB -#define GL_PIXEL_UNPACK_BUFFER 0x88EC -#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED -#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF -#define GL_FLOAT_MAT2x3 0x8B65 -#define GL_FLOAT_MAT2x4 0x8B66 -#define GL_FLOAT_MAT3x2 0x8B67 -#define GL_FLOAT_MAT3x4 0x8B68 -#define GL_FLOAT_MAT4x2 0x8B69 -#define GL_FLOAT_MAT4x3 0x8B6A -#define GL_SRGB 0x8C40 -#define GL_SRGB8 0x8C41 -#define GL_SRGB_ALPHA 0x8C42 -#define GL_SRGB8_ALPHA8 0x8C43 -#define GL_COMPRESSED_SRGB 0x8C48 -#define GL_COMPRESSED_SRGB_ALPHA 0x8C49 -#define GL_COMPARE_REF_TO_TEXTURE 0x884E -#define GL_CLIP_DISTANCE0 0x3000 -#define GL_CLIP_DISTANCE1 0x3001 -#define GL_CLIP_DISTANCE2 0x3002 -#define GL_CLIP_DISTANCE3 0x3003 -#define GL_CLIP_DISTANCE4 0x3004 -#define GL_CLIP_DISTANCE5 0x3005 -#define GL_CLIP_DISTANCE6 0x3006 -#define GL_CLIP_DISTANCE7 0x3007 -#define GL_MAX_CLIP_DISTANCES 0x0D32 -#define GL_MAJOR_VERSION 0x821B -#define GL_MINOR_VERSION 0x821C -#define GL_NUM_EXTENSIONS 0x821D -#define GL_CONTEXT_FLAGS 0x821E -#define GL_COMPRESSED_RED 0x8225 -#define GL_COMPRESSED_RG 0x8226 -#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001 -#define GL_RGBA32F 0x8814 -#define GL_RGB32F 0x8815 -#define GL_RGBA16F 0x881A -#define GL_RGB16F 0x881B -#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD -#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF -#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 -#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 -#define GL_CLAMP_READ_COLOR 0x891C -#define GL_FIXED_ONLY 0x891D -#define GL_MAX_VARYING_COMPONENTS 0x8B4B -#define GL_TEXTURE_1D_ARRAY 0x8C18 -#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19 -#define GL_TEXTURE_2D_ARRAY 0x8C1A -#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B -#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C -#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D -#define GL_R11F_G11F_B10F 0x8C3A -#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B -#define GL_RGB9_E5 0x8C3D -#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E -#define GL_TEXTURE_SHARED_SIZE 0x8C3F -#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 -#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 -#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 -#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 -#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 -#define GL_PRIMITIVES_GENERATED 0x8C87 -#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 -#define GL_RASTERIZER_DISCARD 0x8C89 -#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B -#define GL_INTERLEAVED_ATTRIBS 0x8C8C -#define GL_SEPARATE_ATTRIBS 0x8C8D -#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E -#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F -#define GL_RGBA32UI 0x8D70 -#define GL_RGB32UI 0x8D71 -#define GL_RGBA16UI 0x8D76 -#define GL_RGB16UI 0x8D77 -#define GL_RGBA8UI 0x8D7C -#define GL_RGB8UI 0x8D7D -#define GL_RGBA32I 0x8D82 -#define GL_RGB32I 0x8D83 -#define GL_RGBA16I 0x8D88 -#define GL_RGB16I 0x8D89 -#define GL_RGBA8I 0x8D8E -#define GL_RGB8I 0x8D8F -#define GL_RED_INTEGER 0x8D94 -#define GL_GREEN_INTEGER 0x8D95 -#define GL_BLUE_INTEGER 0x8D96 -#define GL_RGB_INTEGER 0x8D98 -#define GL_RGBA_INTEGER 0x8D99 -#define GL_BGR_INTEGER 0x8D9A -#define GL_BGRA_INTEGER 0x8D9B -#define GL_SAMPLER_1D_ARRAY 0x8DC0 -#define GL_SAMPLER_2D_ARRAY 0x8DC1 -#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3 -#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 -#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 -#define GL_UNSIGNED_INT_VEC2 0x8DC6 -#define GL_UNSIGNED_INT_VEC3 0x8DC7 -#define GL_UNSIGNED_INT_VEC4 0x8DC8 -#define GL_INT_SAMPLER_1D 0x8DC9 -#define GL_INT_SAMPLER_2D 0x8DCA -#define GL_INT_SAMPLER_3D 0x8DCB -#define GL_INT_SAMPLER_CUBE 0x8DCC -#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE -#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF -#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1 -#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 -#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 -#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 -#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6 -#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 -#define GL_QUERY_WAIT 0x8E13 -#define GL_QUERY_NO_WAIT 0x8E14 -#define GL_QUERY_BY_REGION_WAIT 0x8E15 -#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16 -#define GL_BUFFER_ACCESS_FLAGS 0x911F -#define GL_BUFFER_MAP_LENGTH 0x9120 -#define GL_BUFFER_MAP_OFFSET 0x9121 -#define GL_DEPTH_COMPONENT32F 0x8CAC -#define GL_DEPTH32F_STENCIL8 0x8CAD -#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD -#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 -#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 -#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 -#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 -#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 -#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 -#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 -#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 -#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 -#define GL_FRAMEBUFFER_DEFAULT 0x8218 -#define GL_FRAMEBUFFER_UNDEFINED 0x8219 -#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A -#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 -#define GL_DEPTH_STENCIL 0x84F9 -#define GL_UNSIGNED_INT_24_8 0x84FA -#define GL_DEPTH24_STENCIL8 0x88F0 -#define GL_TEXTURE_STENCIL_SIZE 0x88F1 -#define GL_TEXTURE_RED_TYPE 0x8C10 -#define GL_TEXTURE_GREEN_TYPE 0x8C11 -#define GL_TEXTURE_BLUE_TYPE 0x8C12 -#define GL_TEXTURE_ALPHA_TYPE 0x8C13 -#define GL_TEXTURE_DEPTH_TYPE 0x8C16 -#define GL_UNSIGNED_NORMALIZED 0x8C17 -#define GL_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_RENDERBUFFER_BINDING 0x8CA7 -#define GL_READ_FRAMEBUFFER 0x8CA8 -#define GL_DRAW_FRAMEBUFFER 0x8CA9 -#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA -#define GL_RENDERBUFFER_SAMPLES 0x8CAB -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 -#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB -#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC -#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD -#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF -#define GL_COLOR_ATTACHMENT0 0x8CE0 -#define GL_COLOR_ATTACHMENT1 0x8CE1 -#define GL_COLOR_ATTACHMENT2 0x8CE2 -#define GL_COLOR_ATTACHMENT3 0x8CE3 -#define GL_COLOR_ATTACHMENT4 0x8CE4 -#define GL_COLOR_ATTACHMENT5 0x8CE5 -#define GL_COLOR_ATTACHMENT6 0x8CE6 -#define GL_COLOR_ATTACHMENT7 0x8CE7 -#define GL_COLOR_ATTACHMENT8 0x8CE8 -#define GL_COLOR_ATTACHMENT9 0x8CE9 -#define GL_COLOR_ATTACHMENT10 0x8CEA -#define GL_COLOR_ATTACHMENT11 0x8CEB -#define GL_COLOR_ATTACHMENT12 0x8CEC -#define GL_COLOR_ATTACHMENT13 0x8CED -#define GL_COLOR_ATTACHMENT14 0x8CEE -#define GL_COLOR_ATTACHMENT15 0x8CEF -#define GL_COLOR_ATTACHMENT16 0x8CF0 -#define GL_COLOR_ATTACHMENT17 0x8CF1 -#define GL_COLOR_ATTACHMENT18 0x8CF2 -#define GL_COLOR_ATTACHMENT19 0x8CF3 -#define GL_COLOR_ATTACHMENT20 0x8CF4 -#define GL_COLOR_ATTACHMENT21 0x8CF5 -#define GL_COLOR_ATTACHMENT22 0x8CF6 -#define GL_COLOR_ATTACHMENT23 0x8CF7 -#define GL_COLOR_ATTACHMENT24 0x8CF8 -#define GL_COLOR_ATTACHMENT25 0x8CF9 -#define GL_COLOR_ATTACHMENT26 0x8CFA -#define GL_COLOR_ATTACHMENT27 0x8CFB -#define GL_COLOR_ATTACHMENT28 0x8CFC -#define GL_COLOR_ATTACHMENT29 0x8CFD -#define GL_COLOR_ATTACHMENT30 0x8CFE -#define GL_COLOR_ATTACHMENT31 0x8CFF -#define GL_DEPTH_ATTACHMENT 0x8D00 -#define GL_STENCIL_ATTACHMENT 0x8D20 -#define GL_FRAMEBUFFER 0x8D40 -#define GL_RENDERBUFFER 0x8D41 -#define GL_RENDERBUFFER_WIDTH 0x8D42 -#define GL_RENDERBUFFER_HEIGHT 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 -#define GL_STENCIL_INDEX1 0x8D46 -#define GL_STENCIL_INDEX4 0x8D47 -#define GL_STENCIL_INDEX8 0x8D48 -#define GL_STENCIL_INDEX16 0x8D49 -#define GL_RENDERBUFFER_RED_SIZE 0x8D50 -#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 -#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 -#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 -#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 -#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 -#define GL_MAX_SAMPLES 0x8D57 -#define GL_FRAMEBUFFER_SRGB 0x8DB9 -#define GL_HALF_FLOAT 0x140B -#define GL_MAP_READ_BIT 0x0001 -#define GL_MAP_WRITE_BIT 0x0002 -#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 -#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 -#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 -#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 -#define GL_COMPRESSED_RED_RGTC1 0x8DBB -#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC -#define GL_COMPRESSED_RG_RGTC2 0x8DBD -#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE -#define GL_RG 0x8227 -#define GL_RG_INTEGER 0x8228 -#define GL_R8 0x8229 -#define GL_R16 0x822A -#define GL_RG8 0x822B -#define GL_RG16 0x822C -#define GL_R16F 0x822D -#define GL_R32F 0x822E -#define GL_RG16F 0x822F -#define GL_RG32F 0x8230 -#define GL_R8I 0x8231 -#define GL_R8UI 0x8232 -#define GL_R16I 0x8233 -#define GL_R16UI 0x8234 -#define GL_R32I 0x8235 -#define GL_R32UI 0x8236 -#define GL_RG8I 0x8237 -#define GL_RG8UI 0x8238 -#define GL_RG16I 0x8239 -#define GL_RG16UI 0x823A -#define GL_RG32I 0x823B -#define GL_RG32UI 0x823C -#define GL_VERTEX_ARRAY_BINDING 0x85B5 -#define GL_SAMPLER_2D_RECT 0x8B63 -#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64 -#define GL_SAMPLER_BUFFER 0x8DC2 -#define GL_INT_SAMPLER_2D_RECT 0x8DCD -#define GL_INT_SAMPLER_BUFFER 0x8DD0 -#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5 -#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8 -#define GL_TEXTURE_BUFFER 0x8C2A -#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B -#define GL_TEXTURE_BINDING_BUFFER 0x8C2C -#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D -#define GL_TEXTURE_RECTANGLE 0x84F5 -#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6 -#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7 -#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 -#define GL_R8_SNORM 0x8F94 -#define GL_RG8_SNORM 0x8F95 -#define GL_RGB8_SNORM 0x8F96 -#define GL_RGBA8_SNORM 0x8F97 -#define GL_R16_SNORM 0x8F98 -#define GL_RG16_SNORM 0x8F99 -#define GL_RGB16_SNORM 0x8F9A -#define GL_RGBA16_SNORM 0x8F9B -#define GL_SIGNED_NORMALIZED 0x8F9C -#define GL_PRIMITIVE_RESTART 0x8F9D -#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E -#define GL_COPY_READ_BUFFER 0x8F36 -#define GL_COPY_WRITE_BUFFER 0x8F37 -#define GL_UNIFORM_BUFFER 0x8A11 -#define GL_UNIFORM_BUFFER_BINDING 0x8A28 -#define GL_UNIFORM_BUFFER_START 0x8A29 -#define GL_UNIFORM_BUFFER_SIZE 0x8A2A -#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B -#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C -#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D -#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E -#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F -#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 -#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 -#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32 -#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 -#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 -#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 -#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 -#define GL_UNIFORM_TYPE 0x8A37 -#define GL_UNIFORM_SIZE 0x8A38 -#define GL_UNIFORM_NAME_LENGTH 0x8A39 -#define GL_UNIFORM_BLOCK_INDEX 0x8A3A -#define GL_UNIFORM_OFFSET 0x8A3B -#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C -#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D -#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E -#define GL_UNIFORM_BLOCK_BINDING 0x8A3F -#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 -#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 -#define GL_INVALID_INDEX 0xFFFFFFFF -#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001 -#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002 -#define GL_LINES_ADJACENCY 0x000A -#define GL_LINE_STRIP_ADJACENCY 0x000B -#define GL_TRIANGLES_ADJACENCY 0x000C -#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D -#define GL_PROGRAM_POINT_SIZE 0x8642 -#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29 -#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8 -#define GL_GEOMETRY_SHADER 0x8DD9 -#define GL_GEOMETRY_VERTICES_OUT 0x8916 -#define GL_GEOMETRY_INPUT_TYPE 0x8917 -#define GL_GEOMETRY_OUTPUT_TYPE 0x8918 -#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF -#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0 -#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1 -#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 -#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123 -#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124 -#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 -#define GL_CONTEXT_PROFILE_MASK 0x9126 -#define GL_DEPTH_CLAMP 0x864F -#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C -#define GL_FIRST_VERTEX_CONVENTION 0x8E4D -#define GL_LAST_VERTEX_CONVENTION 0x8E4E -#define GL_PROVOKING_VERTEX 0x8E4F -#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F -#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 -#define GL_OBJECT_TYPE 0x9112 -#define GL_SYNC_CONDITION 0x9113 -#define GL_SYNC_STATUS 0x9114 -#define GL_SYNC_FLAGS 0x9115 -#define GL_SYNC_FENCE 0x9116 -#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 -#define GL_UNSIGNALED 0x9118 -#define GL_SIGNALED 0x9119 -#define GL_ALREADY_SIGNALED 0x911A -#define GL_TIMEOUT_EXPIRED 0x911B -#define GL_CONDITION_SATISFIED 0x911C -#define GL_WAIT_FAILED 0x911D -#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFF -#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 -#define GL_SAMPLE_POSITION 0x8E50 -#define GL_SAMPLE_MASK 0x8E51 -#define GL_SAMPLE_MASK_VALUE 0x8E52 -#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 -#define GL_TEXTURE_2D_MULTISAMPLE 0x9100 -#define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101 -#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102 -#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103 -#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104 -#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105 -#define GL_TEXTURE_SAMPLES 0x9106 -#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107 -#define GL_SAMPLER_2D_MULTISAMPLE 0x9108 -#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 -#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A -#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B -#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C -#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D -#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E -#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F -#define GL_MAX_INTEGER_SAMPLES 0x9110 -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE -#define GL_SRC1_COLOR 0x88F9 -#define GL_ONE_MINUS_SRC1_COLOR 0x88FA -#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB -#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC -#define GL_ANY_SAMPLES_PASSED 0x8C2F -#define GL_SAMPLER_BINDING 0x8919 -#define GL_RGB10_A2UI 0x906F -#define GL_TEXTURE_SWIZZLE_R 0x8E42 -#define GL_TEXTURE_SWIZZLE_G 0x8E43 -#define GL_TEXTURE_SWIZZLE_B 0x8E44 -#define GL_TEXTURE_SWIZZLE_A 0x8E45 -#define GL_TEXTURE_SWIZZLE_RGBA 0x8E46 -#define GL_TIME_ELAPSED 0x88BF -#define GL_TIMESTAMP 0x8E28 -#define GL_INT_2_10_10_10_REV 0x8D9F -#define GL_SAMPLE_SHADING 0x8C36 -#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 -#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E -#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F -#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 -#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A -#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B -#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C -#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D -#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E -#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F -#define GL_DRAW_INDIRECT_BUFFER 0x8F3F -#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 -#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F -#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A -#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B -#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C -#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D -#define GL_MAX_VERTEX_STREAMS 0x8E71 -#define GL_DOUBLE_VEC2 0x8FFC -#define GL_DOUBLE_VEC3 0x8FFD -#define GL_DOUBLE_VEC4 0x8FFE -#define GL_DOUBLE_MAT2 0x8F46 -#define GL_DOUBLE_MAT3 0x8F47 -#define GL_DOUBLE_MAT4 0x8F48 -#define GL_DOUBLE_MAT2x3 0x8F49 -#define GL_DOUBLE_MAT2x4 0x8F4A -#define GL_DOUBLE_MAT3x2 0x8F4B -#define GL_DOUBLE_MAT3x4 0x8F4C -#define GL_DOUBLE_MAT4x2 0x8F4D -#define GL_DOUBLE_MAT4x3 0x8F4E -#define GL_ACTIVE_SUBROUTINES 0x8DE5 -#define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6 -#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47 -#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48 -#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49 -#define GL_MAX_SUBROUTINES 0x8DE7 -#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8 -#define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A -#define GL_COMPATIBLE_SUBROUTINES 0x8E4B -#define GL_PATCHES 0x000E -#define GL_PATCH_VERTICES 0x8E72 -#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73 -#define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74 -#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75 -#define GL_TESS_GEN_MODE 0x8E76 -#define GL_TESS_GEN_SPACING 0x8E77 -#define GL_TESS_GEN_VERTEX_ORDER 0x8E78 -#define GL_TESS_GEN_POINT_MODE 0x8E79 -#define GL_ISOLINES 0x8E7A -#define GL_QUADS 0x0007 -#define GL_FRACTIONAL_ODD 0x8E7B -#define GL_FRACTIONAL_EVEN 0x8E7C -#define GL_MAX_PATCH_VERTICES 0x8E7D -#define GL_MAX_TESS_GEN_LEVEL 0x8E7E -#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F -#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80 -#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81 -#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82 -#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83 -#define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84 -#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85 -#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86 -#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89 -#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A -#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C -#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D -#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E -#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F -#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1 -#define GL_TESS_EVALUATION_SHADER 0x8E87 -#define GL_TESS_CONTROL_SHADER 0x8E88 -#define GL_TRANSFORM_FEEDBACK 0x8E22 -#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23 -#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24 -#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 -#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70 -#define GL_FIXED 0x140C -#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B -#define GL_LOW_FLOAT 0x8DF0 -#define GL_MEDIUM_FLOAT 0x8DF1 -#define GL_HIGH_FLOAT 0x8DF2 -#define GL_LOW_INT 0x8DF3 -#define GL_MEDIUM_INT 0x8DF4 -#define GL_HIGH_INT 0x8DF5 -#define GL_SHADER_COMPILER 0x8DFA -#define GL_SHADER_BINARY_FORMATS 0x8DF8 -#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 -#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB -#define GL_MAX_VARYING_VECTORS 0x8DFC -#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD -#define GL_RGB565 0x8D62 -#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 -#define GL_PROGRAM_BINARY_LENGTH 0x8741 -#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE -#define GL_PROGRAM_BINARY_FORMATS 0x87FF -#define GL_VERTEX_SHADER_BIT 0x00000001 -#define GL_FRAGMENT_SHADER_BIT 0x00000002 -#define GL_GEOMETRY_SHADER_BIT 0x00000004 -#define GL_TESS_CONTROL_SHADER_BIT 0x00000008 -#define GL_TESS_EVALUATION_SHADER_BIT 0x00000010 -#define GL_ALL_SHADER_BITS 0xFFFFFFFF -#define GL_PROGRAM_SEPARABLE 0x8258 -#define GL_ACTIVE_PROGRAM 0x8259 -#define GL_PROGRAM_PIPELINE_BINDING 0x825A -#define GL_MAX_VIEWPORTS 0x825B -#define GL_VIEWPORT_SUBPIXEL_BITS 0x825C -#define GL_VIEWPORT_BOUNDS_RANGE 0x825D -#define GL_LAYER_PROVOKING_VERTEX 0x825E -#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F -#define GL_UNDEFINED_VERTEX 0x8260 -#define GL_COPY_READ_BUFFER_BINDING 0x8F36 -#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 -#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 -#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 -#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127 -#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128 -#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129 -#define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A -#define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B -#define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C -#define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D -#define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E -#define GL_NUM_SAMPLE_COUNTS 0x9380 -#define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC -#define GL_ATOMIC_COUNTER_BUFFER 0x92C0 -#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1 -#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2 -#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3 -#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4 -#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5 -#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB -#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC -#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD -#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE -#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF -#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0 -#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1 -#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2 -#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3 -#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4 -#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5 -#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6 -#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7 -#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8 -#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC -#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9 -#define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA -#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB -#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001 -#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002 -#define GL_UNIFORM_BARRIER_BIT 0x00000004 -#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008 -#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020 -#define GL_COMMAND_BARRIER_BIT 0x00000040 -#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080 -#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100 -#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200 -#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400 -#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800 -#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000 -#define GL_ALL_BARRIER_BITS 0xFFFFFFFF -#define GL_MAX_IMAGE_UNITS 0x8F38 -#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39 -#define GL_IMAGE_BINDING_NAME 0x8F3A -#define GL_IMAGE_BINDING_LEVEL 0x8F3B -#define GL_IMAGE_BINDING_LAYERED 0x8F3C -#define GL_IMAGE_BINDING_LAYER 0x8F3D -#define GL_IMAGE_BINDING_ACCESS 0x8F3E -#define GL_IMAGE_1D 0x904C -#define GL_IMAGE_2D 0x904D -#define GL_IMAGE_3D 0x904E -#define GL_IMAGE_2D_RECT 0x904F -#define GL_IMAGE_CUBE 0x9050 -#define GL_IMAGE_BUFFER 0x9051 -#define GL_IMAGE_1D_ARRAY 0x9052 -#define GL_IMAGE_2D_ARRAY 0x9053 -#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054 -#define GL_IMAGE_2D_MULTISAMPLE 0x9055 -#define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056 -#define GL_INT_IMAGE_1D 0x9057 -#define GL_INT_IMAGE_2D 0x9058 -#define GL_INT_IMAGE_3D 0x9059 -#define GL_INT_IMAGE_2D_RECT 0x905A -#define GL_INT_IMAGE_CUBE 0x905B -#define GL_INT_IMAGE_BUFFER 0x905C -#define GL_INT_IMAGE_1D_ARRAY 0x905D -#define GL_INT_IMAGE_2D_ARRAY 0x905E -#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F -#define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060 -#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061 -#define GL_UNSIGNED_INT_IMAGE_1D 0x9062 -#define GL_UNSIGNED_INT_IMAGE_2D 0x9063 -#define GL_UNSIGNED_INT_IMAGE_3D 0x9064 -#define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065 -#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066 -#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067 -#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068 -#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069 -#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C -#define GL_MAX_IMAGE_SAMPLES 0x906D -#define GL_IMAGE_BINDING_FORMAT 0x906E -#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7 -#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8 -#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9 -#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA -#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB -#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC -#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD -#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE -#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF -#define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C -#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D -#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E -#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F -#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F -#define GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9 -#define GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E -#define GL_COMPRESSED_RGB8_ETC2 0x9274 -#define GL_COMPRESSED_SRGB8_ETC2 0x9275 -#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 -#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 -#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 -#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 -#define GL_COMPRESSED_R11_EAC 0x9270 -#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 -#define GL_COMPRESSED_RG11_EAC 0x9272 -#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 -#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 -#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A -#define GL_MAX_ELEMENT_INDEX 0x8D6B -#define GL_COMPUTE_SHADER 0x91B9 -#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB -#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC -#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD -#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262 -#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263 -#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264 -#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265 -#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266 -#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB -#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE -#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF -#define GL_COMPUTE_WORK_GROUP_SIZE 0x8267 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED -#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE -#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF -#define GL_COMPUTE_SHADER_BIT 0x00000020 -#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 -#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 -#define GL_DEBUG_CALLBACK_FUNCTION 0x8244 -#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245 -#define GL_DEBUG_SOURCE_API 0x8246 -#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247 -#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248 -#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249 -#define GL_DEBUG_SOURCE_APPLICATION 0x824A -#define GL_DEBUG_SOURCE_OTHER 0x824B -#define GL_DEBUG_TYPE_ERROR 0x824C -#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D -#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E -#define GL_DEBUG_TYPE_PORTABILITY 0x824F -#define GL_DEBUG_TYPE_PERFORMANCE 0x8250 -#define GL_DEBUG_TYPE_OTHER 0x8251 -#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143 -#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144 -#define GL_DEBUG_LOGGED_MESSAGES 0x9145 -#define GL_DEBUG_SEVERITY_HIGH 0x9146 -#define GL_DEBUG_SEVERITY_MEDIUM 0x9147 -#define GL_DEBUG_SEVERITY_LOW 0x9148 -#define GL_DEBUG_TYPE_MARKER 0x8268 -#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269 -#define GL_DEBUG_TYPE_POP_GROUP 0x826A -#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B -#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C -#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D -#define GL_BUFFER 0x82E0 -#define GL_SHADER 0x82E1 -#define GL_PROGRAM 0x82E2 -#define GL_VERTEX_ARRAY 0x8074 -#define GL_QUERY 0x82E3 -#define GL_PROGRAM_PIPELINE 0x82E4 -#define GL_SAMPLER 0x82E6 -#define GL_MAX_LABEL_LENGTH 0x82E8 -#define GL_DEBUG_OUTPUT 0x92E0 -#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 -#define GL_MAX_UNIFORM_LOCATIONS 0x826E -#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310 -#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311 -#define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312 -#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313 -#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314 -#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315 -#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316 -#define GL_MAX_FRAMEBUFFER_LAYERS 0x9317 -#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318 -#define GL_INTERNALFORMAT_SUPPORTED 0x826F -#define GL_INTERNALFORMAT_PREFERRED 0x8270 -#define GL_INTERNALFORMAT_RED_SIZE 0x8271 -#define GL_INTERNALFORMAT_GREEN_SIZE 0x8272 -#define GL_INTERNALFORMAT_BLUE_SIZE 0x8273 -#define GL_INTERNALFORMAT_ALPHA_SIZE 0x8274 -#define GL_INTERNALFORMAT_DEPTH_SIZE 0x8275 -#define GL_INTERNALFORMAT_STENCIL_SIZE 0x8276 -#define GL_INTERNALFORMAT_SHARED_SIZE 0x8277 -#define GL_INTERNALFORMAT_RED_TYPE 0x8278 -#define GL_INTERNALFORMAT_GREEN_TYPE 0x8279 -#define GL_INTERNALFORMAT_BLUE_TYPE 0x827A -#define GL_INTERNALFORMAT_ALPHA_TYPE 0x827B -#define GL_INTERNALFORMAT_DEPTH_TYPE 0x827C -#define GL_INTERNALFORMAT_STENCIL_TYPE 0x827D -#define GL_MAX_WIDTH 0x827E -#define GL_MAX_HEIGHT 0x827F -#define GL_MAX_DEPTH 0x8280 -#define GL_MAX_LAYERS 0x8281 -#define GL_MAX_COMBINED_DIMENSIONS 0x8282 -#define GL_COLOR_COMPONENTS 0x8283 -#define GL_DEPTH_COMPONENTS 0x8284 -#define GL_STENCIL_COMPONENTS 0x8285 -#define GL_COLOR_RENDERABLE 0x8286 -#define GL_DEPTH_RENDERABLE 0x8287 -#define GL_STENCIL_RENDERABLE 0x8288 -#define GL_FRAMEBUFFER_RENDERABLE 0x8289 -#define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A -#define GL_FRAMEBUFFER_BLEND 0x828B -#define GL_READ_PIXELS 0x828C -#define GL_READ_PIXELS_FORMAT 0x828D -#define GL_READ_PIXELS_TYPE 0x828E -#define GL_TEXTURE_IMAGE_FORMAT 0x828F -#define GL_TEXTURE_IMAGE_TYPE 0x8290 -#define GL_GET_TEXTURE_IMAGE_FORMAT 0x8291 -#define GL_GET_TEXTURE_IMAGE_TYPE 0x8292 -#define GL_MIPMAP 0x8293 -#define GL_MANUAL_GENERATE_MIPMAP 0x8294 -#define GL_AUTO_GENERATE_MIPMAP 0x8295 -#define GL_COLOR_ENCODING 0x8296 -#define GL_SRGB_READ 0x8297 -#define GL_SRGB_WRITE 0x8298 -#define GL_FILTER 0x829A -#define GL_VERTEX_TEXTURE 0x829B -#define GL_TESS_CONTROL_TEXTURE 0x829C -#define GL_TESS_EVALUATION_TEXTURE 0x829D -#define GL_GEOMETRY_TEXTURE 0x829E -#define GL_FRAGMENT_TEXTURE 0x829F -#define GL_COMPUTE_TEXTURE 0x82A0 -#define GL_TEXTURE_SHADOW 0x82A1 -#define GL_TEXTURE_GATHER 0x82A2 -#define GL_TEXTURE_GATHER_SHADOW 0x82A3 -#define GL_SHADER_IMAGE_LOAD 0x82A4 -#define GL_SHADER_IMAGE_STORE 0x82A5 -#define GL_SHADER_IMAGE_ATOMIC 0x82A6 -#define GL_IMAGE_TEXEL_SIZE 0x82A7 -#define GL_IMAGE_COMPATIBILITY_CLASS 0x82A8 -#define GL_IMAGE_PIXEL_FORMAT 0x82A9 -#define GL_IMAGE_PIXEL_TYPE 0x82AA -#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC -#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD -#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE -#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF -#define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1 -#define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2 -#define GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3 -#define GL_CLEAR_BUFFER 0x82B4 -#define GL_TEXTURE_VIEW 0x82B5 -#define GL_VIEW_COMPATIBILITY_CLASS 0x82B6 -#define GL_FULL_SUPPORT 0x82B7 -#define GL_CAVEAT_SUPPORT 0x82B8 -#define GL_IMAGE_CLASS_4_X_32 0x82B9 -#define GL_IMAGE_CLASS_2_X_32 0x82BA -#define GL_IMAGE_CLASS_1_X_32 0x82BB -#define GL_IMAGE_CLASS_4_X_16 0x82BC -#define GL_IMAGE_CLASS_2_X_16 0x82BD -#define GL_IMAGE_CLASS_1_X_16 0x82BE -#define GL_IMAGE_CLASS_4_X_8 0x82BF -#define GL_IMAGE_CLASS_2_X_8 0x82C0 -#define GL_IMAGE_CLASS_1_X_8 0x82C1 -#define GL_IMAGE_CLASS_11_11_10 0x82C2 -#define GL_IMAGE_CLASS_10_10_10_2 0x82C3 -#define GL_VIEW_CLASS_128_BITS 0x82C4 -#define GL_VIEW_CLASS_96_BITS 0x82C5 -#define GL_VIEW_CLASS_64_BITS 0x82C6 -#define GL_VIEW_CLASS_48_BITS 0x82C7 -#define GL_VIEW_CLASS_32_BITS 0x82C8 -#define GL_VIEW_CLASS_24_BITS 0x82C9 -#define GL_VIEW_CLASS_16_BITS 0x82CA -#define GL_VIEW_CLASS_8_BITS 0x82CB -#define GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC -#define GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD -#define GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE -#define GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF -#define GL_VIEW_CLASS_RGTC1_RED 0x82D0 -#define GL_VIEW_CLASS_RGTC2_RG 0x82D1 -#define GL_VIEW_CLASS_BPTC_UNORM 0x82D2 -#define GL_VIEW_CLASS_BPTC_FLOAT 0x82D3 -#define GL_UNIFORM 0x92E1 -#define GL_UNIFORM_BLOCK 0x92E2 -#define GL_PROGRAM_INPUT 0x92E3 -#define GL_PROGRAM_OUTPUT 0x92E4 -#define GL_BUFFER_VARIABLE 0x92E5 -#define GL_SHADER_STORAGE_BLOCK 0x92E6 -#define GL_VERTEX_SUBROUTINE 0x92E8 -#define GL_TESS_CONTROL_SUBROUTINE 0x92E9 -#define GL_TESS_EVALUATION_SUBROUTINE 0x92EA -#define GL_GEOMETRY_SUBROUTINE 0x92EB -#define GL_FRAGMENT_SUBROUTINE 0x92EC -#define GL_COMPUTE_SUBROUTINE 0x92ED -#define GL_VERTEX_SUBROUTINE_UNIFORM 0x92EE -#define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF -#define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0 -#define GL_GEOMETRY_SUBROUTINE_UNIFORM 0x92F1 -#define GL_FRAGMENT_SUBROUTINE_UNIFORM 0x92F2 -#define GL_COMPUTE_SUBROUTINE_UNIFORM 0x92F3 -#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4 -#define GL_ACTIVE_RESOURCES 0x92F5 -#define GL_MAX_NAME_LENGTH 0x92F6 -#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7 -#define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8 -#define GL_NAME_LENGTH 0x92F9 -#define GL_TYPE 0x92FA -#define GL_ARRAY_SIZE 0x92FB -#define GL_OFFSET 0x92FC -#define GL_BLOCK_INDEX 0x92FD -#define GL_ARRAY_STRIDE 0x92FE -#define GL_MATRIX_STRIDE 0x92FF -#define GL_IS_ROW_MAJOR 0x9300 -#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301 -#define GL_BUFFER_BINDING 0x9302 -#define GL_BUFFER_DATA_SIZE 0x9303 -#define GL_NUM_ACTIVE_VARIABLES 0x9304 -#define GL_ACTIVE_VARIABLES 0x9305 -#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306 -#define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307 -#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308 -#define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309 -#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A -#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B -#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C -#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D -#define GL_LOCATION 0x930E -#define GL_LOCATION_INDEX 0x930F -#define GL_IS_PER_PATCH 0x92E7 -#define GL_SHADER_STORAGE_BUFFER 0x90D2 -#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3 -#define GL_SHADER_STORAGE_BUFFER_START 0x90D4 -#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5 -#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6 -#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7 -#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8 -#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9 -#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA -#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB -#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC -#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD -#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE -#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF -#define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000 -#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39 -#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA -#define GL_TEXTURE_BUFFER_OFFSET 0x919D -#define GL_TEXTURE_BUFFER_SIZE 0x919E -#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F -#define GL_TEXTURE_VIEW_MIN_LEVEL 0x82DB -#define GL_TEXTURE_VIEW_NUM_LEVELS 0x82DC -#define GL_TEXTURE_VIEW_MIN_LAYER 0x82DD -#define GL_TEXTURE_VIEW_NUM_LAYERS 0x82DE -#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF -#define GL_VERTEX_ATTRIB_BINDING 0x82D4 -#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5 -#define GL_VERTEX_BINDING_DIVISOR 0x82D6 -#define GL_VERTEX_BINDING_OFFSET 0x82D7 -#define GL_VERTEX_BINDING_STRIDE 0x82D8 -#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 -#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA -#define GL_VERTEX_BINDING_BUFFER 0x8F4F -#define GL_DISPLAY_LIST 0x82E7 -#define GL_STACK_UNDERFLOW 0x0504 -#define GL_STACK_OVERFLOW 0x0503 -#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5 -#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221 -#define GL_TEXTURE_BUFFER_BINDING 0x8C2A -#define GL_MAP_PERSISTENT_BIT 0x0040 -#define GL_MAP_COHERENT_BIT 0x0080 -#define GL_DYNAMIC_STORAGE_BIT 0x0100 -#define GL_CLIENT_STORAGE_BIT 0x0200 -#define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000 -#define GL_BUFFER_IMMUTABLE_STORAGE 0x821F -#define GL_BUFFER_STORAGE_FLAGS 0x8220 -#define GL_CLEAR_TEXTURE 0x9365 -#define GL_LOCATION_COMPONENT 0x934A -#define GL_TRANSFORM_FEEDBACK_BUFFER_INDEX 0x934B -#define GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE 0x934C -#define GL_QUERY_BUFFER 0x9192 -#define GL_QUERY_BUFFER_BARRIER_BIT 0x00008000 -#define GL_QUERY_BUFFER_BINDING 0x9193 -#define GL_QUERY_RESULT_NO_WAIT 0x9194 -#define GL_MIRROR_CLAMP_TO_EDGE 0x8743 -#define GL_CONTEXT_LOST 0x0507 -#define GL_NEGATIVE_ONE_TO_ONE 0x935E -#define GL_ZERO_TO_ONE 0x935F -#define GL_CLIP_ORIGIN 0x935C -#define GL_CLIP_DEPTH_MODE 0x935D -#define GL_QUERY_WAIT_INVERTED 0x8E17 -#define GL_QUERY_NO_WAIT_INVERTED 0x8E18 -#define GL_QUERY_BY_REGION_WAIT_INVERTED 0x8E19 -#define GL_QUERY_BY_REGION_NO_WAIT_INVERTED 0x8E1A -#define GL_MAX_CULL_DISTANCES 0x82F9 -#define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES 0x82FA -#define GL_TEXTURE_TARGET 0x1006 -#define GL_QUERY_TARGET 0x82EA -#define GL_GUILTY_CONTEXT_RESET 0x8253 -#define GL_INNOCENT_CONTEXT_RESET 0x8254 -#define GL_UNKNOWN_CONTEXT_RESET 0x8255 -#define GL_RESET_NOTIFICATION_STRATEGY 0x8256 -#define GL_LOSE_CONTEXT_ON_RESET 0x8252 -#define GL_NO_RESET_NOTIFICATION 0x8261 -#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT 0x00000004 -#define GL_CONTEXT_RELEASE_BEHAVIOR 0x82FB -#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC -#ifndef GL_VERSION_1_0 -#define GL_VERSION_1_0 1 -GLAPI int GLAD_GL_VERSION_1_0; -typedef void (APIENTRYP PFNGLCULLFACEPROC)(GLenum mode); -GLAPI PFNGLCULLFACEPROC glad_glCullFace; -#define glCullFace glad_glCullFace -typedef void (APIENTRYP PFNGLFRONTFACEPROC)(GLenum mode); -GLAPI PFNGLFRONTFACEPROC glad_glFrontFace; -#define glFrontFace glad_glFrontFace -typedef void (APIENTRYP PFNGLHINTPROC)(GLenum target, GLenum mode); -GLAPI PFNGLHINTPROC glad_glHint; -#define glHint glad_glHint -typedef void (APIENTRYP PFNGLLINEWIDTHPROC)(GLfloat width); -GLAPI PFNGLLINEWIDTHPROC glad_glLineWidth; -#define glLineWidth glad_glLineWidth -typedef void (APIENTRYP PFNGLPOINTSIZEPROC)(GLfloat size); -GLAPI PFNGLPOINTSIZEPROC glad_glPointSize; -#define glPointSize glad_glPointSize -typedef void (APIENTRYP PFNGLPOLYGONMODEPROC)(GLenum face, GLenum mode); -GLAPI PFNGLPOLYGONMODEPROC glad_glPolygonMode; -#define glPolygonMode glad_glPolygonMode -typedef void (APIENTRYP PFNGLSCISSORPROC)(GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI PFNGLSCISSORPROC glad_glScissor; -#define glScissor glad_glScissor -typedef void (APIENTRYP PFNGLTEXPARAMETERFPROC)(GLenum target, GLenum pname, GLfloat param); -GLAPI PFNGLTEXPARAMETERFPROC glad_glTexParameterf; -#define glTexParameterf glad_glTexParameterf -typedef void (APIENTRYP PFNGLTEXPARAMETERFVPROC)(GLenum target, GLenum pname, const GLfloat *params); -GLAPI PFNGLTEXPARAMETERFVPROC glad_glTexParameterfv; -#define glTexParameterfv glad_glTexParameterfv -typedef void (APIENTRYP PFNGLTEXPARAMETERIPROC)(GLenum target, GLenum pname, GLint param); -GLAPI PFNGLTEXPARAMETERIPROC glad_glTexParameteri; -#define glTexParameteri glad_glTexParameteri -typedef void (APIENTRYP PFNGLTEXPARAMETERIVPROC)(GLenum target, GLenum pname, const GLint *params); -GLAPI PFNGLTEXPARAMETERIVPROC glad_glTexParameteriv; -#define glTexParameteriv glad_glTexParameteriv -typedef void (APIENTRYP PFNGLTEXIMAGE1DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); -GLAPI PFNGLTEXIMAGE1DPROC glad_glTexImage1D; -#define glTexImage1D glad_glTexImage1D -typedef void (APIENTRYP PFNGLTEXIMAGE2DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); -GLAPI PFNGLTEXIMAGE2DPROC glad_glTexImage2D; -#define glTexImage2D glad_glTexImage2D -typedef void (APIENTRYP PFNGLDRAWBUFFERPROC)(GLenum buf); -GLAPI PFNGLDRAWBUFFERPROC glad_glDrawBuffer; -#define glDrawBuffer glad_glDrawBuffer -typedef void (APIENTRYP PFNGLCLEARPROC)(GLbitfield mask); -GLAPI PFNGLCLEARPROC glad_glClear; -#define glClear glad_glClear -typedef void (APIENTRYP PFNGLCLEARCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -GLAPI PFNGLCLEARCOLORPROC glad_glClearColor; -#define glClearColor glad_glClearColor -typedef void (APIENTRYP PFNGLCLEARSTENCILPROC)(GLint s); -GLAPI PFNGLCLEARSTENCILPROC glad_glClearStencil; -#define glClearStencil glad_glClearStencil -typedef void (APIENTRYP PFNGLCLEARDEPTHPROC)(GLdouble depth); -GLAPI PFNGLCLEARDEPTHPROC glad_glClearDepth; -#define glClearDepth glad_glClearDepth -typedef void (APIENTRYP PFNGLSTENCILMASKPROC)(GLuint mask); -GLAPI PFNGLSTENCILMASKPROC glad_glStencilMask; -#define glStencilMask glad_glStencilMask -typedef void (APIENTRYP PFNGLCOLORMASKPROC)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -GLAPI PFNGLCOLORMASKPROC glad_glColorMask; -#define glColorMask glad_glColorMask -typedef void (APIENTRYP PFNGLDEPTHMASKPROC)(GLboolean flag); -GLAPI PFNGLDEPTHMASKPROC glad_glDepthMask; -#define glDepthMask glad_glDepthMask -typedef void (APIENTRYP PFNGLDISABLEPROC)(GLenum cap); -GLAPI PFNGLDISABLEPROC glad_glDisable; -#define glDisable glad_glDisable -typedef void (APIENTRYP PFNGLENABLEPROC)(GLenum cap); -GLAPI PFNGLENABLEPROC glad_glEnable; -#define glEnable glad_glEnable -typedef void (APIENTRYP PFNGLFINISHPROC)(void); -GLAPI PFNGLFINISHPROC glad_glFinish; -#define glFinish glad_glFinish -typedef void (APIENTRYP PFNGLFLUSHPROC)(void); -GLAPI PFNGLFLUSHPROC glad_glFlush; -#define glFlush glad_glFlush -typedef void (APIENTRYP PFNGLBLENDFUNCPROC)(GLenum sfactor, GLenum dfactor); -GLAPI PFNGLBLENDFUNCPROC glad_glBlendFunc; -#define glBlendFunc glad_glBlendFunc -typedef void (APIENTRYP PFNGLLOGICOPPROC)(GLenum opcode); -GLAPI PFNGLLOGICOPPROC glad_glLogicOp; -#define glLogicOp glad_glLogicOp -typedef void (APIENTRYP PFNGLSTENCILFUNCPROC)(GLenum func, GLint ref, GLuint mask); -GLAPI PFNGLSTENCILFUNCPROC glad_glStencilFunc; -#define glStencilFunc glad_glStencilFunc -typedef void (APIENTRYP PFNGLSTENCILOPPROC)(GLenum fail, GLenum zfail, GLenum zpass); -GLAPI PFNGLSTENCILOPPROC glad_glStencilOp; -#define glStencilOp glad_glStencilOp -typedef void (APIENTRYP PFNGLDEPTHFUNCPROC)(GLenum func); -GLAPI PFNGLDEPTHFUNCPROC glad_glDepthFunc; -#define glDepthFunc glad_glDepthFunc -typedef void (APIENTRYP PFNGLPIXELSTOREFPROC)(GLenum pname, GLfloat param); -GLAPI PFNGLPIXELSTOREFPROC glad_glPixelStoref; -#define glPixelStoref glad_glPixelStoref -typedef void (APIENTRYP PFNGLPIXELSTOREIPROC)(GLenum pname, GLint param); -GLAPI PFNGLPIXELSTOREIPROC glad_glPixelStorei; -#define glPixelStorei glad_glPixelStorei -typedef void (APIENTRYP PFNGLREADBUFFERPROC)(GLenum src); -GLAPI PFNGLREADBUFFERPROC glad_glReadBuffer; -#define glReadBuffer glad_glReadBuffer -typedef void (APIENTRYP PFNGLREADPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); -GLAPI PFNGLREADPIXELSPROC glad_glReadPixels; -#define glReadPixels glad_glReadPixels -typedef void (APIENTRYP PFNGLGETBOOLEANVPROC)(GLenum pname, GLboolean *data); -GLAPI PFNGLGETBOOLEANVPROC glad_glGetBooleanv; -#define glGetBooleanv glad_glGetBooleanv -typedef void (APIENTRYP PFNGLGETDOUBLEVPROC)(GLenum pname, GLdouble *data); -GLAPI PFNGLGETDOUBLEVPROC glad_glGetDoublev; -#define glGetDoublev glad_glGetDoublev -typedef GLenum (APIENTRYP PFNGLGETERRORPROC)(void); -GLAPI PFNGLGETERRORPROC glad_glGetError; -#define glGetError glad_glGetError -typedef void (APIENTRYP PFNGLGETFLOATVPROC)(GLenum pname, GLfloat *data); -GLAPI PFNGLGETFLOATVPROC glad_glGetFloatv; -#define glGetFloatv glad_glGetFloatv -typedef void (APIENTRYP PFNGLGETINTEGERVPROC)(GLenum pname, GLint *data); -GLAPI PFNGLGETINTEGERVPROC glad_glGetIntegerv; -#define glGetIntegerv glad_glGetIntegerv -typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGPROC)(GLenum name); -GLAPI PFNGLGETSTRINGPROC glad_glGetString; -#define glGetString glad_glGetString -typedef void (APIENTRYP PFNGLGETTEXIMAGEPROC)(GLenum target, GLint level, GLenum format, GLenum type, void *pixels); -GLAPI PFNGLGETTEXIMAGEPROC glad_glGetTexImage; -#define glGetTexImage glad_glGetTexImage -typedef void (APIENTRYP PFNGLGETTEXPARAMETERFVPROC)(GLenum target, GLenum pname, GLfloat *params); -GLAPI PFNGLGETTEXPARAMETERFVPROC glad_glGetTexParameterfv; -#define glGetTexParameterfv glad_glGetTexParameterfv -typedef void (APIENTRYP PFNGLGETTEXPARAMETERIVPROC)(GLenum target, GLenum pname, GLint *params); -GLAPI PFNGLGETTEXPARAMETERIVPROC glad_glGetTexParameteriv; -#define glGetTexParameteriv glad_glGetTexParameteriv -typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERFVPROC)(GLenum target, GLint level, GLenum pname, GLfloat *params); -GLAPI PFNGLGETTEXLEVELPARAMETERFVPROC glad_glGetTexLevelParameterfv; -#define glGetTexLevelParameterfv glad_glGetTexLevelParameterfv -typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERIVPROC)(GLenum target, GLint level, GLenum pname, GLint *params); -GLAPI PFNGLGETTEXLEVELPARAMETERIVPROC glad_glGetTexLevelParameteriv; -#define glGetTexLevelParameteriv glad_glGetTexLevelParameteriv -typedef GLboolean (APIENTRYP PFNGLISENABLEDPROC)(GLenum cap); -GLAPI PFNGLISENABLEDPROC glad_glIsEnabled; -#define glIsEnabled glad_glIsEnabled -typedef void (APIENTRYP PFNGLDEPTHRANGEPROC)(GLdouble n, GLdouble f); -GLAPI PFNGLDEPTHRANGEPROC glad_glDepthRange; -#define glDepthRange glad_glDepthRange -typedef void (APIENTRYP PFNGLVIEWPORTPROC)(GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI PFNGLVIEWPORTPROC glad_glViewport; -#define glViewport glad_glViewport -#endif -#ifndef GL_VERSION_1_1 -#define GL_VERSION_1_1 1 -GLAPI int GLAD_GL_VERSION_1_1; -typedef void (APIENTRYP PFNGLDRAWARRAYSPROC)(GLenum mode, GLint first, GLsizei count); -GLAPI PFNGLDRAWARRAYSPROC glad_glDrawArrays; -#define glDrawArrays glad_glDrawArrays -typedef void (APIENTRYP PFNGLDRAWELEMENTSPROC)(GLenum mode, GLsizei count, GLenum type, const void *indices); -GLAPI PFNGLDRAWELEMENTSPROC glad_glDrawElements; -#define glDrawElements glad_glDrawElements -typedef void (APIENTRYP PFNGLPOLYGONOFFSETPROC)(GLfloat factor, GLfloat units); -GLAPI PFNGLPOLYGONOFFSETPROC glad_glPolygonOffset; -#define glPolygonOffset glad_glPolygonOffset -typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DPROC)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -GLAPI PFNGLCOPYTEXIMAGE1DPROC glad_glCopyTexImage1D; -#define glCopyTexImage1D glad_glCopyTexImage1D -typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DPROC)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GLAPI PFNGLCOPYTEXIMAGE2DPROC glad_glCopyTexImage2D; -#define glCopyTexImage2D glad_glCopyTexImage2D -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -GLAPI PFNGLCOPYTEXSUBIMAGE1DPROC glad_glCopyTexSubImage1D; -#define glCopyTexSubImage1D glad_glCopyTexSubImage1D -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI PFNGLCOPYTEXSUBIMAGE2DPROC glad_glCopyTexSubImage2D; -#define glCopyTexSubImage2D glad_glCopyTexSubImage2D -typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); -GLAPI PFNGLTEXSUBIMAGE1DPROC glad_glTexSubImage1D; -#define glTexSubImage1D glad_glTexSubImage1D -typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -GLAPI PFNGLTEXSUBIMAGE2DPROC glad_glTexSubImage2D; -#define glTexSubImage2D glad_glTexSubImage2D -typedef void (APIENTRYP PFNGLBINDTEXTUREPROC)(GLenum target, GLuint texture); -GLAPI PFNGLBINDTEXTUREPROC glad_glBindTexture; -#define glBindTexture glad_glBindTexture -typedef void (APIENTRYP PFNGLDELETETEXTURESPROC)(GLsizei n, const GLuint *textures); -GLAPI PFNGLDELETETEXTURESPROC glad_glDeleteTextures; -#define glDeleteTextures glad_glDeleteTextures -typedef void (APIENTRYP PFNGLGENTEXTURESPROC)(GLsizei n, GLuint *textures); -GLAPI PFNGLGENTEXTURESPROC glad_glGenTextures; -#define glGenTextures glad_glGenTextures -typedef GLboolean (APIENTRYP PFNGLISTEXTUREPROC)(GLuint texture); -GLAPI PFNGLISTEXTUREPROC glad_glIsTexture; -#define glIsTexture glad_glIsTexture -#endif -#ifndef GL_VERSION_1_2 -#define GL_VERSION_1_2 1 -GLAPI int GLAD_GL_VERSION_1_2; -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); -GLAPI PFNGLDRAWRANGEELEMENTSPROC glad_glDrawRangeElements; -#define glDrawRangeElements glad_glDrawRangeElements -typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -GLAPI PFNGLTEXIMAGE3DPROC glad_glTexImage3D; -#define glTexImage3D glad_glTexImage3D -typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -GLAPI PFNGLTEXSUBIMAGE3DPROC glad_glTexSubImage3D; -#define glTexSubImage3D glad_glTexSubImage3D -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI PFNGLCOPYTEXSUBIMAGE3DPROC glad_glCopyTexSubImage3D; -#define glCopyTexSubImage3D glad_glCopyTexSubImage3D -#endif -#ifndef GL_VERSION_1_3 -#define GL_VERSION_1_3 1 -GLAPI int GLAD_GL_VERSION_1_3; -typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC)(GLenum texture); -GLAPI PFNGLACTIVETEXTUREPROC glad_glActiveTexture; -#define glActiveTexture glad_glActiveTexture -typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC)(GLfloat value, GLboolean invert); -GLAPI PFNGLSAMPLECOVERAGEPROC glad_glSampleCoverage; -#define glSampleCoverage glad_glSampleCoverage -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); -GLAPI PFNGLCOMPRESSEDTEXIMAGE3DPROC glad_glCompressedTexImage3D; -#define glCompressedTexImage3D glad_glCompressedTexImage3D -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); -GLAPI PFNGLCOMPRESSEDTEXIMAGE2DPROC glad_glCompressedTexImage2D; -#define glCompressedTexImage2D glad_glCompressedTexImage2D -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data); -GLAPI PFNGLCOMPRESSEDTEXIMAGE1DPROC glad_glCompressedTexImage1D; -#define glCompressedTexImage1D glad_glCompressedTexImage1D -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); -GLAPI PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glad_glCompressedTexSubImage3D; -#define glCompressedTexSubImage3D glad_glCompressedTexSubImage3D -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); -GLAPI PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glad_glCompressedTexSubImage2D; -#define glCompressedTexSubImage2D glad_glCompressedTexSubImage2D -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); -GLAPI PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC glad_glCompressedTexSubImage1D; -#define glCompressedTexSubImage1D glad_glCompressedTexSubImage1D -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC)(GLenum target, GLint level, void *img); -GLAPI PFNGLGETCOMPRESSEDTEXIMAGEPROC glad_glGetCompressedTexImage; -#define glGetCompressedTexImage glad_glGetCompressedTexImage -#endif -#ifndef GL_VERSION_1_4 -#define GL_VERSION_1_4 1 -GLAPI int GLAD_GL_VERSION_1_4; -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -GLAPI PFNGLBLENDFUNCSEPARATEPROC glad_glBlendFuncSeparate; -#define glBlendFuncSeparate glad_glBlendFuncSeparate -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC)(GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount); -GLAPI PFNGLMULTIDRAWARRAYSPROC glad_glMultiDrawArrays; -#define glMultiDrawArrays glad_glMultiDrawArrays -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC)(GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount); -GLAPI PFNGLMULTIDRAWELEMENTSPROC glad_glMultiDrawElements; -#define glMultiDrawElements glad_glMultiDrawElements -typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC)(GLenum pname, GLfloat param); -GLAPI PFNGLPOINTPARAMETERFPROC glad_glPointParameterf; -#define glPointParameterf glad_glPointParameterf -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC)(GLenum pname, const GLfloat *params); -GLAPI PFNGLPOINTPARAMETERFVPROC glad_glPointParameterfv; -#define glPointParameterfv glad_glPointParameterfv -typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC)(GLenum pname, GLint param); -GLAPI PFNGLPOINTPARAMETERIPROC glad_glPointParameteri; -#define glPointParameteri glad_glPointParameteri -typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC)(GLenum pname, const GLint *params); -GLAPI PFNGLPOINTPARAMETERIVPROC glad_glPointParameteriv; -#define glPointParameteriv glad_glPointParameteriv -typedef void (APIENTRYP PFNGLBLENDCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -GLAPI PFNGLBLENDCOLORPROC glad_glBlendColor; -#define glBlendColor glad_glBlendColor -typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC)(GLenum mode); -GLAPI PFNGLBLENDEQUATIONPROC glad_glBlendEquation; -#define glBlendEquation glad_glBlendEquation -#endif -#ifndef GL_VERSION_1_5 -#define GL_VERSION_1_5 1 -GLAPI int GLAD_GL_VERSION_1_5; -typedef void (APIENTRYP PFNGLGENQUERIESPROC)(GLsizei n, GLuint *ids); -GLAPI PFNGLGENQUERIESPROC glad_glGenQueries; -#define glGenQueries glad_glGenQueries -typedef void (APIENTRYP PFNGLDELETEQUERIESPROC)(GLsizei n, const GLuint *ids); -GLAPI PFNGLDELETEQUERIESPROC glad_glDeleteQueries; -#define glDeleteQueries glad_glDeleteQueries -typedef GLboolean (APIENTRYP PFNGLISQUERYPROC)(GLuint id); -GLAPI PFNGLISQUERYPROC glad_glIsQuery; -#define glIsQuery glad_glIsQuery -typedef void (APIENTRYP PFNGLBEGINQUERYPROC)(GLenum target, GLuint id); -GLAPI PFNGLBEGINQUERYPROC glad_glBeginQuery; -#define glBeginQuery glad_glBeginQuery -typedef void (APIENTRYP PFNGLENDQUERYPROC)(GLenum target); -GLAPI PFNGLENDQUERYPROC glad_glEndQuery; -#define glEndQuery glad_glEndQuery -typedef void (APIENTRYP PFNGLGETQUERYIVPROC)(GLenum target, GLenum pname, GLint *params); -GLAPI PFNGLGETQUERYIVPROC glad_glGetQueryiv; -#define glGetQueryiv glad_glGetQueryiv -typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC)(GLuint id, GLenum pname, GLint *params); -GLAPI PFNGLGETQUERYOBJECTIVPROC glad_glGetQueryObjectiv; -#define glGetQueryObjectiv glad_glGetQueryObjectiv -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC)(GLuint id, GLenum pname, GLuint *params); -GLAPI PFNGLGETQUERYOBJECTUIVPROC glad_glGetQueryObjectuiv; -#define glGetQueryObjectuiv glad_glGetQueryObjectuiv -typedef void (APIENTRYP PFNGLBINDBUFFERPROC)(GLenum target, GLuint buffer); -GLAPI PFNGLBINDBUFFERPROC glad_glBindBuffer; -#define glBindBuffer glad_glBindBuffer -typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC)(GLsizei n, const GLuint *buffers); -GLAPI PFNGLDELETEBUFFERSPROC glad_glDeleteBuffers; -#define glDeleteBuffers glad_glDeleteBuffers -typedef void (APIENTRYP PFNGLGENBUFFERSPROC)(GLsizei n, GLuint *buffers); -GLAPI PFNGLGENBUFFERSPROC glad_glGenBuffers; -#define glGenBuffers glad_glGenBuffers -typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC)(GLuint buffer); -GLAPI PFNGLISBUFFERPROC glad_glIsBuffer; -#define glIsBuffer glad_glIsBuffer -typedef void (APIENTRYP PFNGLBUFFERDATAPROC)(GLenum target, GLsizeiptr size, const void *data, GLenum usage); -GLAPI PFNGLBUFFERDATAPROC glad_glBufferData; -#define glBufferData glad_glBufferData -typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC)(GLenum target, GLintptr offset, GLsizeiptr size, const void *data); -GLAPI PFNGLBUFFERSUBDATAPROC glad_glBufferSubData; -#define glBufferSubData glad_glBufferSubData -typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC)(GLenum target, GLintptr offset, GLsizeiptr size, void *data); -GLAPI PFNGLGETBUFFERSUBDATAPROC glad_glGetBufferSubData; -#define glGetBufferSubData glad_glGetBufferSubData -typedef void * (APIENTRYP PFNGLMAPBUFFERPROC)(GLenum target, GLenum access); -GLAPI PFNGLMAPBUFFERPROC glad_glMapBuffer; -#define glMapBuffer glad_glMapBuffer -typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC)(GLenum target); -GLAPI PFNGLUNMAPBUFFERPROC glad_glUnmapBuffer; -#define glUnmapBuffer glad_glUnmapBuffer -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint *params); -GLAPI PFNGLGETBUFFERPARAMETERIVPROC glad_glGetBufferParameteriv; -#define glGetBufferParameteriv glad_glGetBufferParameteriv -typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC)(GLenum target, GLenum pname, void **params); -GLAPI PFNGLGETBUFFERPOINTERVPROC glad_glGetBufferPointerv; -#define glGetBufferPointerv glad_glGetBufferPointerv -#endif -#ifndef GL_VERSION_2_0 -#define GL_VERSION_2_0 1 -GLAPI int GLAD_GL_VERSION_2_0; -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC)(GLenum modeRGB, GLenum modeAlpha); -GLAPI PFNGLBLENDEQUATIONSEPARATEPROC glad_glBlendEquationSeparate; -#define glBlendEquationSeparate glad_glBlendEquationSeparate -typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC)(GLsizei n, const GLenum *bufs); -GLAPI PFNGLDRAWBUFFERSPROC glad_glDrawBuffers; -#define glDrawBuffers glad_glDrawBuffers -typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC)(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -GLAPI PFNGLSTENCILOPSEPARATEPROC glad_glStencilOpSeparate; -#define glStencilOpSeparate glad_glStencilOpSeparate -typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC)(GLenum face, GLenum func, GLint ref, GLuint mask); -GLAPI PFNGLSTENCILFUNCSEPARATEPROC glad_glStencilFuncSeparate; -#define glStencilFuncSeparate glad_glStencilFuncSeparate -typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC)(GLenum face, GLuint mask); -GLAPI PFNGLSTENCILMASKSEPARATEPROC glad_glStencilMaskSeparate; -#define glStencilMaskSeparate glad_glStencilMaskSeparate -typedef void (APIENTRYP PFNGLATTACHSHADERPROC)(GLuint program, GLuint shader); -GLAPI PFNGLATTACHSHADERPROC glad_glAttachShader; -#define glAttachShader glad_glAttachShader -typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC)(GLuint program, GLuint index, const GLchar *name); -GLAPI PFNGLBINDATTRIBLOCATIONPROC glad_glBindAttribLocation; -#define glBindAttribLocation glad_glBindAttribLocation -typedef void (APIENTRYP PFNGLCOMPILESHADERPROC)(GLuint shader); -GLAPI PFNGLCOMPILESHADERPROC glad_glCompileShader; -#define glCompileShader glad_glCompileShader -typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC)(void); -GLAPI PFNGLCREATEPROGRAMPROC glad_glCreateProgram; -#define glCreateProgram glad_glCreateProgram -typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC)(GLenum type); -GLAPI PFNGLCREATESHADERPROC glad_glCreateShader; -#define glCreateShader glad_glCreateShader -typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC)(GLuint program); -GLAPI PFNGLDELETEPROGRAMPROC glad_glDeleteProgram; -#define glDeleteProgram glad_glDeleteProgram -typedef void (APIENTRYP PFNGLDELETESHADERPROC)(GLuint shader); -GLAPI PFNGLDELETESHADERPROC glad_glDeleteShader; -#define glDeleteShader glad_glDeleteShader -typedef void (APIENTRYP PFNGLDETACHSHADERPROC)(GLuint program, GLuint shader); -GLAPI PFNGLDETACHSHADERPROC glad_glDetachShader; -#define glDetachShader glad_glDetachShader -typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC)(GLuint index); -GLAPI PFNGLDISABLEVERTEXATTRIBARRAYPROC glad_glDisableVertexAttribArray; -#define glDisableVertexAttribArray glad_glDisableVertexAttribArray -typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC)(GLuint index); -GLAPI PFNGLENABLEVERTEXATTRIBARRAYPROC glad_glEnableVertexAttribArray; -#define glEnableVertexAttribArray glad_glEnableVertexAttribArray -typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GLAPI PFNGLGETACTIVEATTRIBPROC glad_glGetActiveAttrib; -#define glGetActiveAttrib glad_glGetActiveAttrib -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GLAPI PFNGLGETACTIVEUNIFORMPROC glad_glGetActiveUniform; -#define glGetActiveUniform glad_glGetActiveUniform -typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC)(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); -GLAPI PFNGLGETATTACHEDSHADERSPROC glad_glGetAttachedShaders; -#define glGetAttachedShaders glad_glGetAttachedShaders -typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC)(GLuint program, const GLchar *name); -GLAPI PFNGLGETATTRIBLOCATIONPROC glad_glGetAttribLocation; -#define glGetAttribLocation glad_glGetAttribLocation -typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC)(GLuint program, GLenum pname, GLint *params); -GLAPI PFNGLGETPROGRAMIVPROC glad_glGetProgramiv; -#define glGetProgramiv glad_glGetProgramiv -typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC)(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GLAPI PFNGLGETPROGRAMINFOLOGPROC glad_glGetProgramInfoLog; -#define glGetProgramInfoLog glad_glGetProgramInfoLog -typedef void (APIENTRYP PFNGLGETSHADERIVPROC)(GLuint shader, GLenum pname, GLint *params); -GLAPI PFNGLGETSHADERIVPROC glad_glGetShaderiv; -#define glGetShaderiv glad_glGetShaderiv -typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GLAPI PFNGLGETSHADERINFOLOGPROC glad_glGetShaderInfoLog; -#define glGetShaderInfoLog glad_glGetShaderInfoLog -typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); -GLAPI PFNGLGETSHADERSOURCEPROC glad_glGetShaderSource; -#define glGetShaderSource glad_glGetShaderSource -typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC)(GLuint program, const GLchar *name); -GLAPI PFNGLGETUNIFORMLOCATIONPROC glad_glGetUniformLocation; -#define glGetUniformLocation glad_glGetUniformLocation -typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC)(GLuint program, GLint location, GLfloat *params); -GLAPI PFNGLGETUNIFORMFVPROC glad_glGetUniformfv; -#define glGetUniformfv glad_glGetUniformfv -typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC)(GLuint program, GLint location, GLint *params); -GLAPI PFNGLGETUNIFORMIVPROC glad_glGetUniformiv; -#define glGetUniformiv glad_glGetUniformiv -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC)(GLuint index, GLenum pname, GLdouble *params); -GLAPI PFNGLGETVERTEXATTRIBDVPROC glad_glGetVertexAttribdv; -#define glGetVertexAttribdv glad_glGetVertexAttribdv -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC)(GLuint index, GLenum pname, GLfloat *params); -GLAPI PFNGLGETVERTEXATTRIBFVPROC glad_glGetVertexAttribfv; -#define glGetVertexAttribfv glad_glGetVertexAttribfv -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC)(GLuint index, GLenum pname, GLint *params); -GLAPI PFNGLGETVERTEXATTRIBIVPROC glad_glGetVertexAttribiv; -#define glGetVertexAttribiv glad_glGetVertexAttribiv -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC)(GLuint index, GLenum pname, void **pointer); -GLAPI PFNGLGETVERTEXATTRIBPOINTERVPROC glad_glGetVertexAttribPointerv; -#define glGetVertexAttribPointerv glad_glGetVertexAttribPointerv -typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC)(GLuint program); -GLAPI PFNGLISPROGRAMPROC glad_glIsProgram; -#define glIsProgram glad_glIsProgram -typedef GLboolean (APIENTRYP PFNGLISSHADERPROC)(GLuint shader); -GLAPI PFNGLISSHADERPROC glad_glIsShader; -#define glIsShader glad_glIsShader -typedef void (APIENTRYP PFNGLLINKPROGRAMPROC)(GLuint program); -GLAPI PFNGLLINKPROGRAMPROC glad_glLinkProgram; -#define glLinkProgram glad_glLinkProgram -typedef void (APIENTRYP PFNGLSHADERSOURCEPROC)(GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); -GLAPI PFNGLSHADERSOURCEPROC glad_glShaderSource; -#define glShaderSource glad_glShaderSource -typedef void (APIENTRYP PFNGLUSEPROGRAMPROC)(GLuint program); -GLAPI PFNGLUSEPROGRAMPROC glad_glUseProgram; -#define glUseProgram glad_glUseProgram -typedef void (APIENTRYP PFNGLUNIFORM1FPROC)(GLint location, GLfloat v0); -GLAPI PFNGLUNIFORM1FPROC glad_glUniform1f; -#define glUniform1f glad_glUniform1f -typedef void (APIENTRYP PFNGLUNIFORM2FPROC)(GLint location, GLfloat v0, GLfloat v1); -GLAPI PFNGLUNIFORM2FPROC glad_glUniform2f; -#define glUniform2f glad_glUniform2f -typedef void (APIENTRYP PFNGLUNIFORM3FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GLAPI PFNGLUNIFORM3FPROC glad_glUniform3f; -#define glUniform3f glad_glUniform3f -typedef void (APIENTRYP PFNGLUNIFORM4FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GLAPI PFNGLUNIFORM4FPROC glad_glUniform4f; -#define glUniform4f glad_glUniform4f -typedef void (APIENTRYP PFNGLUNIFORM1IPROC)(GLint location, GLint v0); -GLAPI PFNGLUNIFORM1IPROC glad_glUniform1i; -#define glUniform1i glad_glUniform1i -typedef void (APIENTRYP PFNGLUNIFORM2IPROC)(GLint location, GLint v0, GLint v1); -GLAPI PFNGLUNIFORM2IPROC glad_glUniform2i; -#define glUniform2i glad_glUniform2i -typedef void (APIENTRYP PFNGLUNIFORM3IPROC)(GLint location, GLint v0, GLint v1, GLint v2); -GLAPI PFNGLUNIFORM3IPROC glad_glUniform3i; -#define glUniform3i glad_glUniform3i -typedef void (APIENTRYP PFNGLUNIFORM4IPROC)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GLAPI PFNGLUNIFORM4IPROC glad_glUniform4i; -#define glUniform4i glad_glUniform4i -typedef void (APIENTRYP PFNGLUNIFORM1FVPROC)(GLint location, GLsizei count, const GLfloat *value); -GLAPI PFNGLUNIFORM1FVPROC glad_glUniform1fv; -#define glUniform1fv glad_glUniform1fv -typedef void (APIENTRYP PFNGLUNIFORM2FVPROC)(GLint location, GLsizei count, const GLfloat *value); -GLAPI PFNGLUNIFORM2FVPROC glad_glUniform2fv; -#define glUniform2fv glad_glUniform2fv -typedef void (APIENTRYP PFNGLUNIFORM3FVPROC)(GLint location, GLsizei count, const GLfloat *value); -GLAPI PFNGLUNIFORM3FVPROC glad_glUniform3fv; -#define glUniform3fv glad_glUniform3fv -typedef void (APIENTRYP PFNGLUNIFORM4FVPROC)(GLint location, GLsizei count, const GLfloat *value); -GLAPI PFNGLUNIFORM4FVPROC glad_glUniform4fv; -#define glUniform4fv glad_glUniform4fv -typedef void (APIENTRYP PFNGLUNIFORM1IVPROC)(GLint location, GLsizei count, const GLint *value); -GLAPI PFNGLUNIFORM1IVPROC glad_glUniform1iv; -#define glUniform1iv glad_glUniform1iv -typedef void (APIENTRYP PFNGLUNIFORM2IVPROC)(GLint location, GLsizei count, const GLint *value); -GLAPI PFNGLUNIFORM2IVPROC glad_glUniform2iv; -#define glUniform2iv glad_glUniform2iv -typedef void (APIENTRYP PFNGLUNIFORM3IVPROC)(GLint location, GLsizei count, const GLint *value); -GLAPI PFNGLUNIFORM3IVPROC glad_glUniform3iv; -#define glUniform3iv glad_glUniform3iv -typedef void (APIENTRYP PFNGLUNIFORM4IVPROC)(GLint location, GLsizei count, const GLint *value); -GLAPI PFNGLUNIFORM4IVPROC glad_glUniform4iv; -#define glUniform4iv glad_glUniform4iv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLUNIFORMMATRIX2FVPROC glad_glUniformMatrix2fv; -#define glUniformMatrix2fv glad_glUniformMatrix2fv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLUNIFORMMATRIX3FVPROC glad_glUniformMatrix3fv; -#define glUniformMatrix3fv glad_glUniformMatrix3fv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLUNIFORMMATRIX4FVPROC glad_glUniformMatrix4fv; -#define glUniformMatrix4fv glad_glUniformMatrix4fv -typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC)(GLuint program); -GLAPI PFNGLVALIDATEPROGRAMPROC glad_glValidateProgram; -#define glValidateProgram glad_glValidateProgram -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC)(GLuint index, GLdouble x); -GLAPI PFNGLVERTEXATTRIB1DPROC glad_glVertexAttrib1d; -#define glVertexAttrib1d glad_glVertexAttrib1d -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC)(GLuint index, const GLdouble *v); -GLAPI PFNGLVERTEXATTRIB1DVPROC glad_glVertexAttrib1dv; -#define glVertexAttrib1dv glad_glVertexAttrib1dv -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC)(GLuint index, GLfloat x); -GLAPI PFNGLVERTEXATTRIB1FPROC glad_glVertexAttrib1f; -#define glVertexAttrib1f glad_glVertexAttrib1f -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC)(GLuint index, const GLfloat *v); -GLAPI PFNGLVERTEXATTRIB1FVPROC glad_glVertexAttrib1fv; -#define glVertexAttrib1fv glad_glVertexAttrib1fv -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC)(GLuint index, GLshort x); -GLAPI PFNGLVERTEXATTRIB1SPROC glad_glVertexAttrib1s; -#define glVertexAttrib1s glad_glVertexAttrib1s -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC)(GLuint index, const GLshort *v); -GLAPI PFNGLVERTEXATTRIB1SVPROC glad_glVertexAttrib1sv; -#define glVertexAttrib1sv glad_glVertexAttrib1sv -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC)(GLuint index, GLdouble x, GLdouble y); -GLAPI PFNGLVERTEXATTRIB2DPROC glad_glVertexAttrib2d; -#define glVertexAttrib2d glad_glVertexAttrib2d -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC)(GLuint index, const GLdouble *v); -GLAPI PFNGLVERTEXATTRIB2DVPROC glad_glVertexAttrib2dv; -#define glVertexAttrib2dv glad_glVertexAttrib2dv -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC)(GLuint index, GLfloat x, GLfloat y); -GLAPI PFNGLVERTEXATTRIB2FPROC glad_glVertexAttrib2f; -#define glVertexAttrib2f glad_glVertexAttrib2f -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC)(GLuint index, const GLfloat *v); -GLAPI PFNGLVERTEXATTRIB2FVPROC glad_glVertexAttrib2fv; -#define glVertexAttrib2fv glad_glVertexAttrib2fv -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC)(GLuint index, GLshort x, GLshort y); -GLAPI PFNGLVERTEXATTRIB2SPROC glad_glVertexAttrib2s; -#define glVertexAttrib2s glad_glVertexAttrib2s -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC)(GLuint index, const GLshort *v); -GLAPI PFNGLVERTEXATTRIB2SVPROC glad_glVertexAttrib2sv; -#define glVertexAttrib2sv glad_glVertexAttrib2sv -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC)(GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI PFNGLVERTEXATTRIB3DPROC glad_glVertexAttrib3d; -#define glVertexAttrib3d glad_glVertexAttrib3d -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC)(GLuint index, const GLdouble *v); -GLAPI PFNGLVERTEXATTRIB3DVPROC glad_glVertexAttrib3dv; -#define glVertexAttrib3dv glad_glVertexAttrib3dv -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z); -GLAPI PFNGLVERTEXATTRIB3FPROC glad_glVertexAttrib3f; -#define glVertexAttrib3f glad_glVertexAttrib3f -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC)(GLuint index, const GLfloat *v); -GLAPI PFNGLVERTEXATTRIB3FVPROC glad_glVertexAttrib3fv; -#define glVertexAttrib3fv glad_glVertexAttrib3fv -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC)(GLuint index, GLshort x, GLshort y, GLshort z); -GLAPI PFNGLVERTEXATTRIB3SPROC glad_glVertexAttrib3s; -#define glVertexAttrib3s glad_glVertexAttrib3s -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC)(GLuint index, const GLshort *v); -GLAPI PFNGLVERTEXATTRIB3SVPROC glad_glVertexAttrib3sv; -#define glVertexAttrib3sv glad_glVertexAttrib3sv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC)(GLuint index, const GLbyte *v); -GLAPI PFNGLVERTEXATTRIB4NBVPROC glad_glVertexAttrib4Nbv; -#define glVertexAttrib4Nbv glad_glVertexAttrib4Nbv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC)(GLuint index, const GLint *v); -GLAPI PFNGLVERTEXATTRIB4NIVPROC glad_glVertexAttrib4Niv; -#define glVertexAttrib4Niv glad_glVertexAttrib4Niv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC)(GLuint index, const GLshort *v); -GLAPI PFNGLVERTEXATTRIB4NSVPROC glad_glVertexAttrib4Nsv; -#define glVertexAttrib4Nsv glad_glVertexAttrib4Nsv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -GLAPI PFNGLVERTEXATTRIB4NUBPROC glad_glVertexAttrib4Nub; -#define glVertexAttrib4Nub glad_glVertexAttrib4Nub -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC)(GLuint index, const GLubyte *v); -GLAPI PFNGLVERTEXATTRIB4NUBVPROC glad_glVertexAttrib4Nubv; -#define glVertexAttrib4Nubv glad_glVertexAttrib4Nubv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC)(GLuint index, const GLuint *v); -GLAPI PFNGLVERTEXATTRIB4NUIVPROC glad_glVertexAttrib4Nuiv; -#define glVertexAttrib4Nuiv glad_glVertexAttrib4Nuiv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC)(GLuint index, const GLushort *v); -GLAPI PFNGLVERTEXATTRIB4NUSVPROC glad_glVertexAttrib4Nusv; -#define glVertexAttrib4Nusv glad_glVertexAttrib4Nusv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC)(GLuint index, const GLbyte *v); -GLAPI PFNGLVERTEXATTRIB4BVPROC glad_glVertexAttrib4bv; -#define glVertexAttrib4bv glad_glVertexAttrib4bv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI PFNGLVERTEXATTRIB4DPROC glad_glVertexAttrib4d; -#define glVertexAttrib4d glad_glVertexAttrib4d -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC)(GLuint index, const GLdouble *v); -GLAPI PFNGLVERTEXATTRIB4DVPROC glad_glVertexAttrib4dv; -#define glVertexAttrib4dv glad_glVertexAttrib4dv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI PFNGLVERTEXATTRIB4FPROC glad_glVertexAttrib4f; -#define glVertexAttrib4f glad_glVertexAttrib4f -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC)(GLuint index, const GLfloat *v); -GLAPI PFNGLVERTEXATTRIB4FVPROC glad_glVertexAttrib4fv; -#define glVertexAttrib4fv glad_glVertexAttrib4fv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC)(GLuint index, const GLint *v); -GLAPI PFNGLVERTEXATTRIB4IVPROC glad_glVertexAttrib4iv; -#define glVertexAttrib4iv glad_glVertexAttrib4iv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI PFNGLVERTEXATTRIB4SPROC glad_glVertexAttrib4s; -#define glVertexAttrib4s glad_glVertexAttrib4s -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC)(GLuint index, const GLshort *v); -GLAPI PFNGLVERTEXATTRIB4SVPROC glad_glVertexAttrib4sv; -#define glVertexAttrib4sv glad_glVertexAttrib4sv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC)(GLuint index, const GLubyte *v); -GLAPI PFNGLVERTEXATTRIB4UBVPROC glad_glVertexAttrib4ubv; -#define glVertexAttrib4ubv glad_glVertexAttrib4ubv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC)(GLuint index, const GLuint *v); -GLAPI PFNGLVERTEXATTRIB4UIVPROC glad_glVertexAttrib4uiv; -#define glVertexAttrib4uiv glad_glVertexAttrib4uiv -typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC)(GLuint index, const GLushort *v); -GLAPI PFNGLVERTEXATTRIB4USVPROC glad_glVertexAttrib4usv; -#define glVertexAttrib4usv glad_glVertexAttrib4usv -typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); -GLAPI PFNGLVERTEXATTRIBPOINTERPROC glad_glVertexAttribPointer; -#define glVertexAttribPointer glad_glVertexAttribPointer -#endif -#ifndef GL_VERSION_2_1 -#define GL_VERSION_2_1 1 -GLAPI int GLAD_GL_VERSION_2_1; -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLUNIFORMMATRIX2X3FVPROC glad_glUniformMatrix2x3fv; -#define glUniformMatrix2x3fv glad_glUniformMatrix2x3fv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLUNIFORMMATRIX3X2FVPROC glad_glUniformMatrix3x2fv; -#define glUniformMatrix3x2fv glad_glUniformMatrix3x2fv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLUNIFORMMATRIX2X4FVPROC glad_glUniformMatrix2x4fv; -#define glUniformMatrix2x4fv glad_glUniformMatrix2x4fv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLUNIFORMMATRIX4X2FVPROC glad_glUniformMatrix4x2fv; -#define glUniformMatrix4x2fv glad_glUniformMatrix4x2fv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLUNIFORMMATRIX3X4FVPROC glad_glUniformMatrix3x4fv; -#define glUniformMatrix3x4fv glad_glUniformMatrix3x4fv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLUNIFORMMATRIX4X3FVPROC glad_glUniformMatrix4x3fv; -#define glUniformMatrix4x3fv glad_glUniformMatrix4x3fv -#endif -#ifndef GL_VERSION_3_0 -#define GL_VERSION_3_0 1 -GLAPI int GLAD_GL_VERSION_3_0; -typedef void (APIENTRYP PFNGLCOLORMASKIPROC)(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -GLAPI PFNGLCOLORMASKIPROC glad_glColorMaski; -#define glColorMaski glad_glColorMaski -typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC)(GLenum target, GLuint index, GLboolean *data); -GLAPI PFNGLGETBOOLEANI_VPROC glad_glGetBooleani_v; -#define glGetBooleani_v glad_glGetBooleani_v -typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC)(GLenum target, GLuint index, GLint *data); -GLAPI PFNGLGETINTEGERI_VPROC glad_glGetIntegeri_v; -#define glGetIntegeri_v glad_glGetIntegeri_v -typedef void (APIENTRYP PFNGLENABLEIPROC)(GLenum target, GLuint index); -GLAPI PFNGLENABLEIPROC glad_glEnablei; -#define glEnablei glad_glEnablei -typedef void (APIENTRYP PFNGLDISABLEIPROC)(GLenum target, GLuint index); -GLAPI PFNGLDISABLEIPROC glad_glDisablei; -#define glDisablei glad_glDisablei -typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC)(GLenum target, GLuint index); -GLAPI PFNGLISENABLEDIPROC glad_glIsEnabledi; -#define glIsEnabledi glad_glIsEnabledi -typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC)(GLenum primitiveMode); -GLAPI PFNGLBEGINTRANSFORMFEEDBACKPROC glad_glBeginTransformFeedback; -#define glBeginTransformFeedback glad_glBeginTransformFeedback -typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC)(void); -GLAPI PFNGLENDTRANSFORMFEEDBACKPROC glad_glEndTransformFeedback; -#define glEndTransformFeedback glad_glEndTransformFeedback -typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI PFNGLBINDBUFFERRANGEPROC glad_glBindBufferRange; -#define glBindBufferRange glad_glBindBufferRange -typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC)(GLenum target, GLuint index, GLuint buffer); -GLAPI PFNGLBINDBUFFERBASEPROC glad_glBindBufferBase; -#define glBindBufferBase glad_glBindBufferBase -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC)(GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); -GLAPI PFNGLTRANSFORMFEEDBACKVARYINGSPROC glad_glTransformFeedbackVaryings; -#define glTransformFeedbackVaryings glad_glTransformFeedbackVaryings -typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -GLAPI PFNGLGETTRANSFORMFEEDBACKVARYINGPROC glad_glGetTransformFeedbackVarying; -#define glGetTransformFeedbackVarying glad_glGetTransformFeedbackVarying -typedef void (APIENTRYP PFNGLCLAMPCOLORPROC)(GLenum target, GLenum clamp); -GLAPI PFNGLCLAMPCOLORPROC glad_glClampColor; -#define glClampColor glad_glClampColor -typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC)(GLuint id, GLenum mode); -GLAPI PFNGLBEGINCONDITIONALRENDERPROC glad_glBeginConditionalRender; -#define glBeginConditionalRender glad_glBeginConditionalRender -typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC)(void); -GLAPI PFNGLENDCONDITIONALRENDERPROC glad_glEndConditionalRender; -#define glEndConditionalRender glad_glEndConditionalRender -typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC)(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); -GLAPI PFNGLVERTEXATTRIBIPOINTERPROC glad_glVertexAttribIPointer; -#define glVertexAttribIPointer glad_glVertexAttribIPointer -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC)(GLuint index, GLenum pname, GLint *params); -GLAPI PFNGLGETVERTEXATTRIBIIVPROC glad_glGetVertexAttribIiv; -#define glGetVertexAttribIiv glad_glGetVertexAttribIiv -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC)(GLuint index, GLenum pname, GLuint *params); -GLAPI PFNGLGETVERTEXATTRIBIUIVPROC glad_glGetVertexAttribIuiv; -#define glGetVertexAttribIuiv glad_glGetVertexAttribIuiv -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC)(GLuint index, GLint x); -GLAPI PFNGLVERTEXATTRIBI1IPROC glad_glVertexAttribI1i; -#define glVertexAttribI1i glad_glVertexAttribI1i -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC)(GLuint index, GLint x, GLint y); -GLAPI PFNGLVERTEXATTRIBI2IPROC glad_glVertexAttribI2i; -#define glVertexAttribI2i glad_glVertexAttribI2i -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC)(GLuint index, GLint x, GLint y, GLint z); -GLAPI PFNGLVERTEXATTRIBI3IPROC glad_glVertexAttribI3i; -#define glVertexAttribI3i glad_glVertexAttribI3i -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC)(GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI PFNGLVERTEXATTRIBI4IPROC glad_glVertexAttribI4i; -#define glVertexAttribI4i glad_glVertexAttribI4i -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC)(GLuint index, GLuint x); -GLAPI PFNGLVERTEXATTRIBI1UIPROC glad_glVertexAttribI1ui; -#define glVertexAttribI1ui glad_glVertexAttribI1ui -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC)(GLuint index, GLuint x, GLuint y); -GLAPI PFNGLVERTEXATTRIBI2UIPROC glad_glVertexAttribI2ui; -#define glVertexAttribI2ui glad_glVertexAttribI2ui -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC)(GLuint index, GLuint x, GLuint y, GLuint z); -GLAPI PFNGLVERTEXATTRIBI3UIPROC glad_glVertexAttribI3ui; -#define glVertexAttribI3ui glad_glVertexAttribI3ui -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI PFNGLVERTEXATTRIBI4UIPROC glad_glVertexAttribI4ui; -#define glVertexAttribI4ui glad_glVertexAttribI4ui -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC)(GLuint index, const GLint *v); -GLAPI PFNGLVERTEXATTRIBI1IVPROC glad_glVertexAttribI1iv; -#define glVertexAttribI1iv glad_glVertexAttribI1iv -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC)(GLuint index, const GLint *v); -GLAPI PFNGLVERTEXATTRIBI2IVPROC glad_glVertexAttribI2iv; -#define glVertexAttribI2iv glad_glVertexAttribI2iv -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC)(GLuint index, const GLint *v); -GLAPI PFNGLVERTEXATTRIBI3IVPROC glad_glVertexAttribI3iv; -#define glVertexAttribI3iv glad_glVertexAttribI3iv -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC)(GLuint index, const GLint *v); -GLAPI PFNGLVERTEXATTRIBI4IVPROC glad_glVertexAttribI4iv; -#define glVertexAttribI4iv glad_glVertexAttribI4iv -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC)(GLuint index, const GLuint *v); -GLAPI PFNGLVERTEXATTRIBI1UIVPROC glad_glVertexAttribI1uiv; -#define glVertexAttribI1uiv glad_glVertexAttribI1uiv -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC)(GLuint index, const GLuint *v); -GLAPI PFNGLVERTEXATTRIBI2UIVPROC glad_glVertexAttribI2uiv; -#define glVertexAttribI2uiv glad_glVertexAttribI2uiv -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC)(GLuint index, const GLuint *v); -GLAPI PFNGLVERTEXATTRIBI3UIVPROC glad_glVertexAttribI3uiv; -#define glVertexAttribI3uiv glad_glVertexAttribI3uiv -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC)(GLuint index, const GLuint *v); -GLAPI PFNGLVERTEXATTRIBI4UIVPROC glad_glVertexAttribI4uiv; -#define glVertexAttribI4uiv glad_glVertexAttribI4uiv -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC)(GLuint index, const GLbyte *v); -GLAPI PFNGLVERTEXATTRIBI4BVPROC glad_glVertexAttribI4bv; -#define glVertexAttribI4bv glad_glVertexAttribI4bv -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC)(GLuint index, const GLshort *v); -GLAPI PFNGLVERTEXATTRIBI4SVPROC glad_glVertexAttribI4sv; -#define glVertexAttribI4sv glad_glVertexAttribI4sv -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC)(GLuint index, const GLubyte *v); -GLAPI PFNGLVERTEXATTRIBI4UBVPROC glad_glVertexAttribI4ubv; -#define glVertexAttribI4ubv glad_glVertexAttribI4ubv -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC)(GLuint index, const GLushort *v); -GLAPI PFNGLVERTEXATTRIBI4USVPROC glad_glVertexAttribI4usv; -#define glVertexAttribI4usv glad_glVertexAttribI4usv -typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC)(GLuint program, GLint location, GLuint *params); -GLAPI PFNGLGETUNIFORMUIVPROC glad_glGetUniformuiv; -#define glGetUniformuiv glad_glGetUniformuiv -typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC)(GLuint program, GLuint color, const GLchar *name); -GLAPI PFNGLBINDFRAGDATALOCATIONPROC glad_glBindFragDataLocation; -#define glBindFragDataLocation glad_glBindFragDataLocation -typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC)(GLuint program, const GLchar *name); -GLAPI PFNGLGETFRAGDATALOCATIONPROC glad_glGetFragDataLocation; -#define glGetFragDataLocation glad_glGetFragDataLocation -typedef void (APIENTRYP PFNGLUNIFORM1UIPROC)(GLint location, GLuint v0); -GLAPI PFNGLUNIFORM1UIPROC glad_glUniform1ui; -#define glUniform1ui glad_glUniform1ui -typedef void (APIENTRYP PFNGLUNIFORM2UIPROC)(GLint location, GLuint v0, GLuint v1); -GLAPI PFNGLUNIFORM2UIPROC glad_glUniform2ui; -#define glUniform2ui glad_glUniform2ui -typedef void (APIENTRYP PFNGLUNIFORM3UIPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2); -GLAPI PFNGLUNIFORM3UIPROC glad_glUniform3ui; -#define glUniform3ui glad_glUniform3ui -typedef void (APIENTRYP PFNGLUNIFORM4UIPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GLAPI PFNGLUNIFORM4UIPROC glad_glUniform4ui; -#define glUniform4ui glad_glUniform4ui -typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC)(GLint location, GLsizei count, const GLuint *value); -GLAPI PFNGLUNIFORM1UIVPROC glad_glUniform1uiv; -#define glUniform1uiv glad_glUniform1uiv -typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC)(GLint location, GLsizei count, const GLuint *value); -GLAPI PFNGLUNIFORM2UIVPROC glad_glUniform2uiv; -#define glUniform2uiv glad_glUniform2uiv -typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC)(GLint location, GLsizei count, const GLuint *value); -GLAPI PFNGLUNIFORM3UIVPROC glad_glUniform3uiv; -#define glUniform3uiv glad_glUniform3uiv -typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC)(GLint location, GLsizei count, const GLuint *value); -GLAPI PFNGLUNIFORM4UIVPROC glad_glUniform4uiv; -#define glUniform4uiv glad_glUniform4uiv -typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC)(GLenum target, GLenum pname, const GLint *params); -GLAPI PFNGLTEXPARAMETERIIVPROC glad_glTexParameterIiv; -#define glTexParameterIiv glad_glTexParameterIiv -typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC)(GLenum target, GLenum pname, const GLuint *params); -GLAPI PFNGLTEXPARAMETERIUIVPROC glad_glTexParameterIuiv; -#define glTexParameterIuiv glad_glTexParameterIuiv -typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC)(GLenum target, GLenum pname, GLint *params); -GLAPI PFNGLGETTEXPARAMETERIIVPROC glad_glGetTexParameterIiv; -#define glGetTexParameterIiv glad_glGetTexParameterIiv -typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC)(GLenum target, GLenum pname, GLuint *params); -GLAPI PFNGLGETTEXPARAMETERIUIVPROC glad_glGetTexParameterIuiv; -#define glGetTexParameterIuiv glad_glGetTexParameterIuiv -typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC)(GLenum buffer, GLint drawbuffer, const GLint *value); -GLAPI PFNGLCLEARBUFFERIVPROC glad_glClearBufferiv; -#define glClearBufferiv glad_glClearBufferiv -typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC)(GLenum buffer, GLint drawbuffer, const GLuint *value); -GLAPI PFNGLCLEARBUFFERUIVPROC glad_glClearBufferuiv; -#define glClearBufferuiv glad_glClearBufferuiv -typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC)(GLenum buffer, GLint drawbuffer, const GLfloat *value); -GLAPI PFNGLCLEARBUFFERFVPROC glad_glClearBufferfv; -#define glClearBufferfv glad_glClearBufferfv -typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC)(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -GLAPI PFNGLCLEARBUFFERFIPROC glad_glClearBufferfi; -#define glClearBufferfi glad_glClearBufferfi -typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGIPROC)(GLenum name, GLuint index); -GLAPI PFNGLGETSTRINGIPROC glad_glGetStringi; -#define glGetStringi glad_glGetStringi -typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC)(GLuint renderbuffer); -GLAPI PFNGLISRENDERBUFFERPROC glad_glIsRenderbuffer; -#define glIsRenderbuffer glad_glIsRenderbuffer -typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC)(GLenum target, GLuint renderbuffer); -GLAPI PFNGLBINDRENDERBUFFERPROC glad_glBindRenderbuffer; -#define glBindRenderbuffer glad_glBindRenderbuffer -typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC)(GLsizei n, const GLuint *renderbuffers); -GLAPI PFNGLDELETERENDERBUFFERSPROC glad_glDeleteRenderbuffers; -#define glDeleteRenderbuffers glad_glDeleteRenderbuffers -typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC)(GLsizei n, GLuint *renderbuffers); -GLAPI PFNGLGENRENDERBUFFERSPROC glad_glGenRenderbuffers; -#define glGenRenderbuffers glad_glGenRenderbuffers -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI PFNGLRENDERBUFFERSTORAGEPROC glad_glRenderbufferStorage; -#define glRenderbufferStorage glad_glRenderbufferStorage -typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint *params); -GLAPI PFNGLGETRENDERBUFFERPARAMETERIVPROC glad_glGetRenderbufferParameteriv; -#define glGetRenderbufferParameteriv glad_glGetRenderbufferParameteriv -typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC)(GLuint framebuffer); -GLAPI PFNGLISFRAMEBUFFERPROC glad_glIsFramebuffer; -#define glIsFramebuffer glad_glIsFramebuffer -typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC)(GLenum target, GLuint framebuffer); -GLAPI PFNGLBINDFRAMEBUFFERPROC glad_glBindFramebuffer; -#define glBindFramebuffer glad_glBindFramebuffer -typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC)(GLsizei n, const GLuint *framebuffers); -GLAPI PFNGLDELETEFRAMEBUFFERSPROC glad_glDeleteFramebuffers; -#define glDeleteFramebuffers glad_glDeleteFramebuffers -typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC)(GLsizei n, GLuint *framebuffers); -GLAPI PFNGLGENFRAMEBUFFERSPROC glad_glGenFramebuffers; -#define glGenFramebuffers glad_glGenFramebuffers -typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC)(GLenum target); -GLAPI PFNGLCHECKFRAMEBUFFERSTATUSPROC glad_glCheckFramebufferStatus; -#define glCheckFramebufferStatus glad_glCheckFramebufferStatus -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI PFNGLFRAMEBUFFERTEXTURE1DPROC glad_glFramebufferTexture1D; -#define glFramebufferTexture1D glad_glFramebufferTexture1D -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI PFNGLFRAMEBUFFERTEXTURE2DPROC glad_glFramebufferTexture2D; -#define glFramebufferTexture2D glad_glFramebufferTexture2D -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -GLAPI PFNGLFRAMEBUFFERTEXTURE3DPROC glad_glFramebufferTexture3D; -#define glFramebufferTexture3D glad_glFramebufferTexture3D -typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GLAPI PFNGLFRAMEBUFFERRENDERBUFFERPROC glad_glFramebufferRenderbuffer; -#define glFramebufferRenderbuffer glad_glFramebufferRenderbuffer -typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)(GLenum target, GLenum attachment, GLenum pname, GLint *params); -GLAPI PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glad_glGetFramebufferAttachmentParameteriv; -#define glGetFramebufferAttachmentParameteriv glad_glGetFramebufferAttachmentParameteriv -typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC)(GLenum target); -GLAPI PFNGLGENERATEMIPMAPPROC glad_glGenerateMipmap; -#define glGenerateMipmap glad_glGenerateMipmap -typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -GLAPI PFNGLBLITFRAMEBUFFERPROC glad_glBlitFramebuffer; -#define glBlitFramebuffer glad_glBlitFramebuffer -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glad_glRenderbufferStorageMultisample; -#define glRenderbufferStorageMultisample glad_glRenderbufferStorageMultisample -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -GLAPI PFNGLFRAMEBUFFERTEXTURELAYERPROC glad_glFramebufferTextureLayer; -#define glFramebufferTextureLayer glad_glFramebufferTextureLayer -typedef void * (APIENTRYP PFNGLMAPBUFFERRANGEPROC)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -GLAPI PFNGLMAPBUFFERRANGEPROC glad_glMapBufferRange; -#define glMapBufferRange glad_glMapBufferRange -typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC)(GLenum target, GLintptr offset, GLsizeiptr length); -GLAPI PFNGLFLUSHMAPPEDBUFFERRANGEPROC glad_glFlushMappedBufferRange; -#define glFlushMappedBufferRange glad_glFlushMappedBufferRange -typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC)(GLuint array); -GLAPI PFNGLBINDVERTEXARRAYPROC glad_glBindVertexArray; -#define glBindVertexArray glad_glBindVertexArray -typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC)(GLsizei n, const GLuint *arrays); -GLAPI PFNGLDELETEVERTEXARRAYSPROC glad_glDeleteVertexArrays; -#define glDeleteVertexArrays glad_glDeleteVertexArrays -typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC)(GLsizei n, GLuint *arrays); -GLAPI PFNGLGENVERTEXARRAYSPROC glad_glGenVertexArrays; -#define glGenVertexArrays glad_glGenVertexArrays -typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC)(GLuint array); -GLAPI PFNGLISVERTEXARRAYPROC glad_glIsVertexArray; -#define glIsVertexArray glad_glIsVertexArray -#endif -#ifndef GL_VERSION_3_1 -#define GL_VERSION_3_1 1 -GLAPI int GLAD_GL_VERSION_3_1; -typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC)(GLenum mode, GLint first, GLsizei count, GLsizei instancecount); -GLAPI PFNGLDRAWARRAYSINSTANCEDPROC glad_glDrawArraysInstanced; -#define glDrawArraysInstanced glad_glDrawArraysInstanced -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); -GLAPI PFNGLDRAWELEMENTSINSTANCEDPROC glad_glDrawElementsInstanced; -#define glDrawElementsInstanced glad_glDrawElementsInstanced -typedef void (APIENTRYP PFNGLTEXBUFFERPROC)(GLenum target, GLenum internalformat, GLuint buffer); -GLAPI PFNGLTEXBUFFERPROC glad_glTexBuffer; -#define glTexBuffer glad_glTexBuffer -typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC)(GLuint index); -GLAPI PFNGLPRIMITIVERESTARTINDEXPROC glad_glPrimitiveRestartIndex; -#define glPrimitiveRestartIndex glad_glPrimitiveRestartIndex -typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -GLAPI PFNGLCOPYBUFFERSUBDATAPROC glad_glCopyBufferSubData; -#define glCopyBufferSubData glad_glCopyBufferSubData -typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC)(GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); -GLAPI PFNGLGETUNIFORMINDICESPROC glad_glGetUniformIndices; -#define glGetUniformIndices glad_glGetUniformIndices -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC)(GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); -GLAPI PFNGLGETACTIVEUNIFORMSIVPROC glad_glGetActiveUniformsiv; -#define glGetActiveUniformsiv glad_glGetActiveUniformsiv -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC)(GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); -GLAPI PFNGLGETACTIVEUNIFORMNAMEPROC glad_glGetActiveUniformName; -#define glGetActiveUniformName glad_glGetActiveUniformName -typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC)(GLuint program, const GLchar *uniformBlockName); -GLAPI PFNGLGETUNIFORMBLOCKINDEXPROC glad_glGetUniformBlockIndex; -#define glGetUniformBlockIndex glad_glGetUniformBlockIndex -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC)(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); -GLAPI PFNGLGETACTIVEUNIFORMBLOCKIVPROC glad_glGetActiveUniformBlockiv; -#define glGetActiveUniformBlockiv glad_glGetActiveUniformBlockiv -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC)(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); -GLAPI PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glad_glGetActiveUniformBlockName; -#define glGetActiveUniformBlockName glad_glGetActiveUniformBlockName -typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC)(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); -GLAPI PFNGLUNIFORMBLOCKBINDINGPROC glad_glUniformBlockBinding; -#define glUniformBlockBinding glad_glUniformBlockBinding -#endif -#ifndef GL_VERSION_3_2 -#define GL_VERSION_3_2 1 -GLAPI int GLAD_GL_VERSION_3_2; -typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); -GLAPI PFNGLDRAWELEMENTSBASEVERTEXPROC glad_glDrawElementsBaseVertex; -#define glDrawElementsBaseVertex glad_glDrawElementsBaseVertex -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); -GLAPI PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC glad_glDrawRangeElementsBaseVertex; -#define glDrawRangeElementsBaseVertex glad_glDrawRangeElementsBaseVertex -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); -GLAPI PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC glad_glDrawElementsInstancedBaseVertex; -#define glDrawElementsInstancedBaseVertex glad_glDrawElementsInstancedBaseVertex -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC)(GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex); -GLAPI PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC glad_glMultiDrawElementsBaseVertex; -#define glMultiDrawElementsBaseVertex glad_glMultiDrawElementsBaseVertex -typedef void (APIENTRYP PFNGLPROVOKINGVERTEXPROC)(GLenum mode); -GLAPI PFNGLPROVOKINGVERTEXPROC glad_glProvokingVertex; -#define glProvokingVertex glad_glProvokingVertex -typedef GLsync (APIENTRYP PFNGLFENCESYNCPROC)(GLenum condition, GLbitfield flags); -GLAPI PFNGLFENCESYNCPROC glad_glFenceSync; -#define glFenceSync glad_glFenceSync -typedef GLboolean (APIENTRYP PFNGLISSYNCPROC)(GLsync sync); -GLAPI PFNGLISSYNCPROC glad_glIsSync; -#define glIsSync glad_glIsSync -typedef void (APIENTRYP PFNGLDELETESYNCPROC)(GLsync sync); -GLAPI PFNGLDELETESYNCPROC glad_glDeleteSync; -#define glDeleteSync glad_glDeleteSync -typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC)(GLsync sync, GLbitfield flags, GLuint64 timeout); -GLAPI PFNGLCLIENTWAITSYNCPROC glad_glClientWaitSync; -#define glClientWaitSync glad_glClientWaitSync -typedef void (APIENTRYP PFNGLWAITSYNCPROC)(GLsync sync, GLbitfield flags, GLuint64 timeout); -GLAPI PFNGLWAITSYNCPROC glad_glWaitSync; -#define glWaitSync glad_glWaitSync -typedef void (APIENTRYP PFNGLGETINTEGER64VPROC)(GLenum pname, GLint64 *data); -GLAPI PFNGLGETINTEGER64VPROC glad_glGetInteger64v; -#define glGetInteger64v glad_glGetInteger64v -typedef void (APIENTRYP PFNGLGETSYNCIVPROC)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -GLAPI PFNGLGETSYNCIVPROC glad_glGetSynciv; -#define glGetSynciv glad_glGetSynciv -typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC)(GLenum target, GLuint index, GLint64 *data); -GLAPI PFNGLGETINTEGER64I_VPROC glad_glGetInteger64i_v; -#define glGetInteger64i_v glad_glGetInteger64i_v -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC)(GLenum target, GLenum pname, GLint64 *params); -GLAPI PFNGLGETBUFFERPARAMETERI64VPROC glad_glGetBufferParameteri64v; -#define glGetBufferParameteri64v glad_glGetBufferParameteri64v -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC)(GLenum target, GLenum attachment, GLuint texture, GLint level); -GLAPI PFNGLFRAMEBUFFERTEXTUREPROC glad_glFramebufferTexture; -#define glFramebufferTexture glad_glFramebufferTexture -typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -GLAPI PFNGLTEXIMAGE2DMULTISAMPLEPROC glad_glTexImage2DMultisample; -#define glTexImage2DMultisample glad_glTexImage2DMultisample -typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -GLAPI PFNGLTEXIMAGE3DMULTISAMPLEPROC glad_glTexImage3DMultisample; -#define glTexImage3DMultisample glad_glTexImage3DMultisample -typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC)(GLenum pname, GLuint index, GLfloat *val); -GLAPI PFNGLGETMULTISAMPLEFVPROC glad_glGetMultisamplefv; -#define glGetMultisamplefv glad_glGetMultisamplefv -typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC)(GLuint maskNumber, GLbitfield mask); -GLAPI PFNGLSAMPLEMASKIPROC glad_glSampleMaski; -#define glSampleMaski glad_glSampleMaski -#endif -#ifndef GL_VERSION_3_3 -#define GL_VERSION_3_3 1 -GLAPI int GLAD_GL_VERSION_3_3; -typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC)(GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); -GLAPI PFNGLBINDFRAGDATALOCATIONINDEXEDPROC glad_glBindFragDataLocationIndexed; -#define glBindFragDataLocationIndexed glad_glBindFragDataLocationIndexed -typedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC)(GLuint program, const GLchar *name); -GLAPI PFNGLGETFRAGDATAINDEXPROC glad_glGetFragDataIndex; -#define glGetFragDataIndex glad_glGetFragDataIndex -typedef void (APIENTRYP PFNGLGENSAMPLERSPROC)(GLsizei count, GLuint *samplers); -GLAPI PFNGLGENSAMPLERSPROC glad_glGenSamplers; -#define glGenSamplers glad_glGenSamplers -typedef void (APIENTRYP PFNGLDELETESAMPLERSPROC)(GLsizei count, const GLuint *samplers); -GLAPI PFNGLDELETESAMPLERSPROC glad_glDeleteSamplers; -#define glDeleteSamplers glad_glDeleteSamplers -typedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC)(GLuint sampler); -GLAPI PFNGLISSAMPLERPROC glad_glIsSampler; -#define glIsSampler glad_glIsSampler -typedef void (APIENTRYP PFNGLBINDSAMPLERPROC)(GLuint unit, GLuint sampler); -GLAPI PFNGLBINDSAMPLERPROC glad_glBindSampler; -#define glBindSampler glad_glBindSampler -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC)(GLuint sampler, GLenum pname, GLint param); -GLAPI PFNGLSAMPLERPARAMETERIPROC glad_glSamplerParameteri; -#define glSamplerParameteri glad_glSamplerParameteri -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC)(GLuint sampler, GLenum pname, const GLint *param); -GLAPI PFNGLSAMPLERPARAMETERIVPROC glad_glSamplerParameteriv; -#define glSamplerParameteriv glad_glSamplerParameteriv -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC)(GLuint sampler, GLenum pname, GLfloat param); -GLAPI PFNGLSAMPLERPARAMETERFPROC glad_glSamplerParameterf; -#define glSamplerParameterf glad_glSamplerParameterf -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFVPROC)(GLuint sampler, GLenum pname, const GLfloat *param); -GLAPI PFNGLSAMPLERPARAMETERFVPROC glad_glSamplerParameterfv; -#define glSamplerParameterfv glad_glSamplerParameterfv -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC)(GLuint sampler, GLenum pname, const GLint *param); -GLAPI PFNGLSAMPLERPARAMETERIIVPROC glad_glSamplerParameterIiv; -#define glSamplerParameterIiv glad_glSamplerParameterIiv -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC)(GLuint sampler, GLenum pname, const GLuint *param); -GLAPI PFNGLSAMPLERPARAMETERIUIVPROC glad_glSamplerParameterIuiv; -#define glSamplerParameterIuiv glad_glSamplerParameterIuiv -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC)(GLuint sampler, GLenum pname, GLint *params); -GLAPI PFNGLGETSAMPLERPARAMETERIVPROC glad_glGetSamplerParameteriv; -#define glGetSamplerParameteriv glad_glGetSamplerParameteriv -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC)(GLuint sampler, GLenum pname, GLint *params); -GLAPI PFNGLGETSAMPLERPARAMETERIIVPROC glad_glGetSamplerParameterIiv; -#define glGetSamplerParameterIiv glad_glGetSamplerParameterIiv -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC)(GLuint sampler, GLenum pname, GLfloat *params); -GLAPI PFNGLGETSAMPLERPARAMETERFVPROC glad_glGetSamplerParameterfv; -#define glGetSamplerParameterfv glad_glGetSamplerParameterfv -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC)(GLuint sampler, GLenum pname, GLuint *params); -GLAPI PFNGLGETSAMPLERPARAMETERIUIVPROC glad_glGetSamplerParameterIuiv; -#define glGetSamplerParameterIuiv glad_glGetSamplerParameterIuiv -typedef void (APIENTRYP PFNGLQUERYCOUNTERPROC)(GLuint id, GLenum target); -GLAPI PFNGLQUERYCOUNTERPROC glad_glQueryCounter; -#define glQueryCounter glad_glQueryCounter -typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC)(GLuint id, GLenum pname, GLint64 *params); -GLAPI PFNGLGETQUERYOBJECTI64VPROC glad_glGetQueryObjecti64v; -#define glGetQueryObjecti64v glad_glGetQueryObjecti64v -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC)(GLuint id, GLenum pname, GLuint64 *params); -GLAPI PFNGLGETQUERYOBJECTUI64VPROC glad_glGetQueryObjectui64v; -#define glGetQueryObjectui64v glad_glGetQueryObjectui64v -typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC)(GLuint index, GLuint divisor); -GLAPI PFNGLVERTEXATTRIBDIVISORPROC glad_glVertexAttribDivisor; -#define glVertexAttribDivisor glad_glVertexAttribDivisor -typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIPROC)(GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI PFNGLVERTEXATTRIBP1UIPROC glad_glVertexAttribP1ui; -#define glVertexAttribP1ui glad_glVertexAttribP1ui -typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC)(GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI PFNGLVERTEXATTRIBP1UIVPROC glad_glVertexAttribP1uiv; -#define glVertexAttribP1uiv glad_glVertexAttribP1uiv -typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIPROC)(GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI PFNGLVERTEXATTRIBP2UIPROC glad_glVertexAttribP2ui; -#define glVertexAttribP2ui glad_glVertexAttribP2ui -typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC)(GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI PFNGLVERTEXATTRIBP2UIVPROC glad_glVertexAttribP2uiv; -#define glVertexAttribP2uiv glad_glVertexAttribP2uiv -typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIPROC)(GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI PFNGLVERTEXATTRIBP3UIPROC glad_glVertexAttribP3ui; -#define glVertexAttribP3ui glad_glVertexAttribP3ui -typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC)(GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI PFNGLVERTEXATTRIBP3UIVPROC glad_glVertexAttribP3uiv; -#define glVertexAttribP3uiv glad_glVertexAttribP3uiv -typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIPROC)(GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI PFNGLVERTEXATTRIBP4UIPROC glad_glVertexAttribP4ui; -#define glVertexAttribP4ui glad_glVertexAttribP4ui -typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC)(GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI PFNGLVERTEXATTRIBP4UIVPROC glad_glVertexAttribP4uiv; -#define glVertexAttribP4uiv glad_glVertexAttribP4uiv -typedef void (APIENTRYP PFNGLVERTEXP2UIPROC)(GLenum type, GLuint value); -GLAPI PFNGLVERTEXP2UIPROC glad_glVertexP2ui; -#define glVertexP2ui glad_glVertexP2ui -typedef void (APIENTRYP PFNGLVERTEXP2UIVPROC)(GLenum type, const GLuint *value); -GLAPI PFNGLVERTEXP2UIVPROC glad_glVertexP2uiv; -#define glVertexP2uiv glad_glVertexP2uiv -typedef void (APIENTRYP PFNGLVERTEXP3UIPROC)(GLenum type, GLuint value); -GLAPI PFNGLVERTEXP3UIPROC glad_glVertexP3ui; -#define glVertexP3ui glad_glVertexP3ui -typedef void (APIENTRYP PFNGLVERTEXP3UIVPROC)(GLenum type, const GLuint *value); -GLAPI PFNGLVERTEXP3UIVPROC glad_glVertexP3uiv; -#define glVertexP3uiv glad_glVertexP3uiv -typedef void (APIENTRYP PFNGLVERTEXP4UIPROC)(GLenum type, GLuint value); -GLAPI PFNGLVERTEXP4UIPROC glad_glVertexP4ui; -#define glVertexP4ui glad_glVertexP4ui -typedef void (APIENTRYP PFNGLVERTEXP4UIVPROC)(GLenum type, const GLuint *value); -GLAPI PFNGLVERTEXP4UIVPROC glad_glVertexP4uiv; -#define glVertexP4uiv glad_glVertexP4uiv -typedef void (APIENTRYP PFNGLTEXCOORDP1UIPROC)(GLenum type, GLuint coords); -GLAPI PFNGLTEXCOORDP1UIPROC glad_glTexCoordP1ui; -#define glTexCoordP1ui glad_glTexCoordP1ui -typedef void (APIENTRYP PFNGLTEXCOORDP1UIVPROC)(GLenum type, const GLuint *coords); -GLAPI PFNGLTEXCOORDP1UIVPROC glad_glTexCoordP1uiv; -#define glTexCoordP1uiv glad_glTexCoordP1uiv -typedef void (APIENTRYP PFNGLTEXCOORDP2UIPROC)(GLenum type, GLuint coords); -GLAPI PFNGLTEXCOORDP2UIPROC glad_glTexCoordP2ui; -#define glTexCoordP2ui glad_glTexCoordP2ui -typedef void (APIENTRYP PFNGLTEXCOORDP2UIVPROC)(GLenum type, const GLuint *coords); -GLAPI PFNGLTEXCOORDP2UIVPROC glad_glTexCoordP2uiv; -#define glTexCoordP2uiv glad_glTexCoordP2uiv -typedef void (APIENTRYP PFNGLTEXCOORDP3UIPROC)(GLenum type, GLuint coords); -GLAPI PFNGLTEXCOORDP3UIPROC glad_glTexCoordP3ui; -#define glTexCoordP3ui glad_glTexCoordP3ui -typedef void (APIENTRYP PFNGLTEXCOORDP3UIVPROC)(GLenum type, const GLuint *coords); -GLAPI PFNGLTEXCOORDP3UIVPROC glad_glTexCoordP3uiv; -#define glTexCoordP3uiv glad_glTexCoordP3uiv -typedef void (APIENTRYP PFNGLTEXCOORDP4UIPROC)(GLenum type, GLuint coords); -GLAPI PFNGLTEXCOORDP4UIPROC glad_glTexCoordP4ui; -#define glTexCoordP4ui glad_glTexCoordP4ui -typedef void (APIENTRYP PFNGLTEXCOORDP4UIVPROC)(GLenum type, const GLuint *coords); -GLAPI PFNGLTEXCOORDP4UIVPROC glad_glTexCoordP4uiv; -#define glTexCoordP4uiv glad_glTexCoordP4uiv -typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIPROC)(GLenum texture, GLenum type, GLuint coords); -GLAPI PFNGLMULTITEXCOORDP1UIPROC glad_glMultiTexCoordP1ui; -#define glMultiTexCoordP1ui glad_glMultiTexCoordP1ui -typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIVPROC)(GLenum texture, GLenum type, const GLuint *coords); -GLAPI PFNGLMULTITEXCOORDP1UIVPROC glad_glMultiTexCoordP1uiv; -#define glMultiTexCoordP1uiv glad_glMultiTexCoordP1uiv -typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIPROC)(GLenum texture, GLenum type, GLuint coords); -GLAPI PFNGLMULTITEXCOORDP2UIPROC glad_glMultiTexCoordP2ui; -#define glMultiTexCoordP2ui glad_glMultiTexCoordP2ui -typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIVPROC)(GLenum texture, GLenum type, const GLuint *coords); -GLAPI PFNGLMULTITEXCOORDP2UIVPROC glad_glMultiTexCoordP2uiv; -#define glMultiTexCoordP2uiv glad_glMultiTexCoordP2uiv -typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIPROC)(GLenum texture, GLenum type, GLuint coords); -GLAPI PFNGLMULTITEXCOORDP3UIPROC glad_glMultiTexCoordP3ui; -#define glMultiTexCoordP3ui glad_glMultiTexCoordP3ui -typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIVPROC)(GLenum texture, GLenum type, const GLuint *coords); -GLAPI PFNGLMULTITEXCOORDP3UIVPROC glad_glMultiTexCoordP3uiv; -#define glMultiTexCoordP3uiv glad_glMultiTexCoordP3uiv -typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIPROC)(GLenum texture, GLenum type, GLuint coords); -GLAPI PFNGLMULTITEXCOORDP4UIPROC glad_glMultiTexCoordP4ui; -#define glMultiTexCoordP4ui glad_glMultiTexCoordP4ui -typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIVPROC)(GLenum texture, GLenum type, const GLuint *coords); -GLAPI PFNGLMULTITEXCOORDP4UIVPROC glad_glMultiTexCoordP4uiv; -#define glMultiTexCoordP4uiv glad_glMultiTexCoordP4uiv -typedef void (APIENTRYP PFNGLNORMALP3UIPROC)(GLenum type, GLuint coords); -GLAPI PFNGLNORMALP3UIPROC glad_glNormalP3ui; -#define glNormalP3ui glad_glNormalP3ui -typedef void (APIENTRYP PFNGLNORMALP3UIVPROC)(GLenum type, const GLuint *coords); -GLAPI PFNGLNORMALP3UIVPROC glad_glNormalP3uiv; -#define glNormalP3uiv glad_glNormalP3uiv -typedef void (APIENTRYP PFNGLCOLORP3UIPROC)(GLenum type, GLuint color); -GLAPI PFNGLCOLORP3UIPROC glad_glColorP3ui; -#define glColorP3ui glad_glColorP3ui -typedef void (APIENTRYP PFNGLCOLORP3UIVPROC)(GLenum type, const GLuint *color); -GLAPI PFNGLCOLORP3UIVPROC glad_glColorP3uiv; -#define glColorP3uiv glad_glColorP3uiv -typedef void (APIENTRYP PFNGLCOLORP4UIPROC)(GLenum type, GLuint color); -GLAPI PFNGLCOLORP4UIPROC glad_glColorP4ui; -#define glColorP4ui glad_glColorP4ui -typedef void (APIENTRYP PFNGLCOLORP4UIVPROC)(GLenum type, const GLuint *color); -GLAPI PFNGLCOLORP4UIVPROC glad_glColorP4uiv; -#define glColorP4uiv glad_glColorP4uiv -typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIPROC)(GLenum type, GLuint color); -GLAPI PFNGLSECONDARYCOLORP3UIPROC glad_glSecondaryColorP3ui; -#define glSecondaryColorP3ui glad_glSecondaryColorP3ui -typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIVPROC)(GLenum type, const GLuint *color); -GLAPI PFNGLSECONDARYCOLORP3UIVPROC glad_glSecondaryColorP3uiv; -#define glSecondaryColorP3uiv glad_glSecondaryColorP3uiv -#endif -#ifndef GL_VERSION_4_0 -#define GL_VERSION_4_0 1 -GLAPI int GLAD_GL_VERSION_4_0; -typedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC)(GLfloat value); -GLAPI PFNGLMINSAMPLESHADINGPROC glad_glMinSampleShading; -#define glMinSampleShading glad_glMinSampleShading -typedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC)(GLuint buf, GLenum mode); -GLAPI PFNGLBLENDEQUATIONIPROC glad_glBlendEquationi; -#define glBlendEquationi glad_glBlendEquationi -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC)(GLuint buf, GLenum modeRGB, GLenum modeAlpha); -GLAPI PFNGLBLENDEQUATIONSEPARATEIPROC glad_glBlendEquationSeparatei; -#define glBlendEquationSeparatei glad_glBlendEquationSeparatei -typedef void (APIENTRYP PFNGLBLENDFUNCIPROC)(GLuint buf, GLenum src, GLenum dst); -GLAPI PFNGLBLENDFUNCIPROC glad_glBlendFunci; -#define glBlendFunci glad_glBlendFunci -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -GLAPI PFNGLBLENDFUNCSEPARATEIPROC glad_glBlendFuncSeparatei; -#define glBlendFuncSeparatei glad_glBlendFuncSeparatei -typedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC)(GLenum mode, const void *indirect); -GLAPI PFNGLDRAWARRAYSINDIRECTPROC glad_glDrawArraysIndirect; -#define glDrawArraysIndirect glad_glDrawArraysIndirect -typedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC)(GLenum mode, GLenum type, const void *indirect); -GLAPI PFNGLDRAWELEMENTSINDIRECTPROC glad_glDrawElementsIndirect; -#define glDrawElementsIndirect glad_glDrawElementsIndirect -typedef void (APIENTRYP PFNGLUNIFORM1DPROC)(GLint location, GLdouble x); -GLAPI PFNGLUNIFORM1DPROC glad_glUniform1d; -#define glUniform1d glad_glUniform1d -typedef void (APIENTRYP PFNGLUNIFORM2DPROC)(GLint location, GLdouble x, GLdouble y); -GLAPI PFNGLUNIFORM2DPROC glad_glUniform2d; -#define glUniform2d glad_glUniform2d -typedef void (APIENTRYP PFNGLUNIFORM3DPROC)(GLint location, GLdouble x, GLdouble y, GLdouble z); -GLAPI PFNGLUNIFORM3DPROC glad_glUniform3d; -#define glUniform3d glad_glUniform3d -typedef void (APIENTRYP PFNGLUNIFORM4DPROC)(GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI PFNGLUNIFORM4DPROC glad_glUniform4d; -#define glUniform4d glad_glUniform4d -typedef void (APIENTRYP PFNGLUNIFORM1DVPROC)(GLint location, GLsizei count, const GLdouble *value); -GLAPI PFNGLUNIFORM1DVPROC glad_glUniform1dv; -#define glUniform1dv glad_glUniform1dv -typedef void (APIENTRYP PFNGLUNIFORM2DVPROC)(GLint location, GLsizei count, const GLdouble *value); -GLAPI PFNGLUNIFORM2DVPROC glad_glUniform2dv; -#define glUniform2dv glad_glUniform2dv -typedef void (APIENTRYP PFNGLUNIFORM3DVPROC)(GLint location, GLsizei count, const GLdouble *value); -GLAPI PFNGLUNIFORM3DVPROC glad_glUniform3dv; -#define glUniform3dv glad_glUniform3dv -typedef void (APIENTRYP PFNGLUNIFORM4DVPROC)(GLint location, GLsizei count, const GLdouble *value); -GLAPI PFNGLUNIFORM4DVPROC glad_glUniform4dv; -#define glUniform4dv glad_glUniform4dv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLUNIFORMMATRIX2DVPROC glad_glUniformMatrix2dv; -#define glUniformMatrix2dv glad_glUniformMatrix2dv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLUNIFORMMATRIX3DVPROC glad_glUniformMatrix3dv; -#define glUniformMatrix3dv glad_glUniformMatrix3dv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLUNIFORMMATRIX4DVPROC glad_glUniformMatrix4dv; -#define glUniformMatrix4dv glad_glUniformMatrix4dv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLUNIFORMMATRIX2X3DVPROC glad_glUniformMatrix2x3dv; -#define glUniformMatrix2x3dv glad_glUniformMatrix2x3dv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLUNIFORMMATRIX2X4DVPROC glad_glUniformMatrix2x4dv; -#define glUniformMatrix2x4dv glad_glUniformMatrix2x4dv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLUNIFORMMATRIX3X2DVPROC glad_glUniformMatrix3x2dv; -#define glUniformMatrix3x2dv glad_glUniformMatrix3x2dv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLUNIFORMMATRIX3X4DVPROC glad_glUniformMatrix3x4dv; -#define glUniformMatrix3x4dv glad_glUniformMatrix3x4dv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLUNIFORMMATRIX4X2DVPROC glad_glUniformMatrix4x2dv; -#define glUniformMatrix4x2dv glad_glUniformMatrix4x2dv -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLUNIFORMMATRIX4X3DVPROC glad_glUniformMatrix4x3dv; -#define glUniformMatrix4x3dv glad_glUniformMatrix4x3dv -typedef void (APIENTRYP PFNGLGETUNIFORMDVPROC)(GLuint program, GLint location, GLdouble *params); -GLAPI PFNGLGETUNIFORMDVPROC glad_glGetUniformdv; -#define glGetUniformdv glad_glGetUniformdv -typedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC)(GLuint program, GLenum shadertype, const GLchar *name); -GLAPI PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC glad_glGetSubroutineUniformLocation; -#define glGetSubroutineUniformLocation glad_glGetSubroutineUniformLocation -typedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC)(GLuint program, GLenum shadertype, const GLchar *name); -GLAPI PFNGLGETSUBROUTINEINDEXPROC glad_glGetSubroutineIndex; -#define glGetSubroutineIndex glad_glGetSubroutineIndex -typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC)(GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); -GLAPI PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC glad_glGetActiveSubroutineUniformiv; -#define glGetActiveSubroutineUniformiv glad_glGetActiveSubroutineUniformiv -typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC)(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); -GLAPI PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC glad_glGetActiveSubroutineUniformName; -#define glGetActiveSubroutineUniformName glad_glGetActiveSubroutineUniformName -typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC)(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); -GLAPI PFNGLGETACTIVESUBROUTINENAMEPROC glad_glGetActiveSubroutineName; -#define glGetActiveSubroutineName glad_glGetActiveSubroutineName -typedef void (APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC)(GLenum shadertype, GLsizei count, const GLuint *indices); -GLAPI PFNGLUNIFORMSUBROUTINESUIVPROC glad_glUniformSubroutinesuiv; -#define glUniformSubroutinesuiv glad_glUniformSubroutinesuiv -typedef void (APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC)(GLenum shadertype, GLint location, GLuint *params); -GLAPI PFNGLGETUNIFORMSUBROUTINEUIVPROC glad_glGetUniformSubroutineuiv; -#define glGetUniformSubroutineuiv glad_glGetUniformSubroutineuiv -typedef void (APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC)(GLuint program, GLenum shadertype, GLenum pname, GLint *values); -GLAPI PFNGLGETPROGRAMSTAGEIVPROC glad_glGetProgramStageiv; -#define glGetProgramStageiv glad_glGetProgramStageiv -typedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC)(GLenum pname, GLint value); -GLAPI PFNGLPATCHPARAMETERIPROC glad_glPatchParameteri; -#define glPatchParameteri glad_glPatchParameteri -typedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC)(GLenum pname, const GLfloat *values); -GLAPI PFNGLPATCHPARAMETERFVPROC glad_glPatchParameterfv; -#define glPatchParameterfv glad_glPatchParameterfv -typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC)(GLenum target, GLuint id); -GLAPI PFNGLBINDTRANSFORMFEEDBACKPROC glad_glBindTransformFeedback; -#define glBindTransformFeedback glad_glBindTransformFeedback -typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC)(GLsizei n, const GLuint *ids); -GLAPI PFNGLDELETETRANSFORMFEEDBACKSPROC glad_glDeleteTransformFeedbacks; -#define glDeleteTransformFeedbacks glad_glDeleteTransformFeedbacks -typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC)(GLsizei n, GLuint *ids); -GLAPI PFNGLGENTRANSFORMFEEDBACKSPROC glad_glGenTransformFeedbacks; -#define glGenTransformFeedbacks glad_glGenTransformFeedbacks -typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC)(GLuint id); -GLAPI PFNGLISTRANSFORMFEEDBACKPROC glad_glIsTransformFeedback; -#define glIsTransformFeedback glad_glIsTransformFeedback -typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC)(void); -GLAPI PFNGLPAUSETRANSFORMFEEDBACKPROC glad_glPauseTransformFeedback; -#define glPauseTransformFeedback glad_glPauseTransformFeedback -typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC)(void); -GLAPI PFNGLRESUMETRANSFORMFEEDBACKPROC glad_glResumeTransformFeedback; -#define glResumeTransformFeedback glad_glResumeTransformFeedback -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC)(GLenum mode, GLuint id); -GLAPI PFNGLDRAWTRANSFORMFEEDBACKPROC glad_glDrawTransformFeedback; -#define glDrawTransformFeedback glad_glDrawTransformFeedback -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC)(GLenum mode, GLuint id, GLuint stream); -GLAPI PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC glad_glDrawTransformFeedbackStream; -#define glDrawTransformFeedbackStream glad_glDrawTransformFeedbackStream -typedef void (APIENTRYP PFNGLBEGINQUERYINDEXEDPROC)(GLenum target, GLuint index, GLuint id); -GLAPI PFNGLBEGINQUERYINDEXEDPROC glad_glBeginQueryIndexed; -#define glBeginQueryIndexed glad_glBeginQueryIndexed -typedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC)(GLenum target, GLuint index); -GLAPI PFNGLENDQUERYINDEXEDPROC glad_glEndQueryIndexed; -#define glEndQueryIndexed glad_glEndQueryIndexed -typedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC)(GLenum target, GLuint index, GLenum pname, GLint *params); -GLAPI PFNGLGETQUERYINDEXEDIVPROC glad_glGetQueryIndexediv; -#define glGetQueryIndexediv glad_glGetQueryIndexediv -#endif -#ifndef GL_VERSION_4_1 -#define GL_VERSION_4_1 1 -GLAPI int GLAD_GL_VERSION_4_1; -typedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC)(void); -GLAPI PFNGLRELEASESHADERCOMPILERPROC glad_glReleaseShaderCompiler; -#define glReleaseShaderCompiler glad_glReleaseShaderCompiler -typedef void (APIENTRYP PFNGLSHADERBINARYPROC)(GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); -GLAPI PFNGLSHADERBINARYPROC glad_glShaderBinary; -#define glShaderBinary glad_glShaderBinary -typedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC)(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); -GLAPI PFNGLGETSHADERPRECISIONFORMATPROC glad_glGetShaderPrecisionFormat; -#define glGetShaderPrecisionFormat glad_glGetShaderPrecisionFormat -typedef void (APIENTRYP PFNGLDEPTHRANGEFPROC)(GLfloat n, GLfloat f); -GLAPI PFNGLDEPTHRANGEFPROC glad_glDepthRangef; -#define glDepthRangef glad_glDepthRangef -typedef void (APIENTRYP PFNGLCLEARDEPTHFPROC)(GLfloat d); -GLAPI PFNGLCLEARDEPTHFPROC glad_glClearDepthf; -#define glClearDepthf glad_glClearDepthf -typedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC)(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); -GLAPI PFNGLGETPROGRAMBINARYPROC glad_glGetProgramBinary; -#define glGetProgramBinary glad_glGetProgramBinary -typedef void (APIENTRYP PFNGLPROGRAMBINARYPROC)(GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); -GLAPI PFNGLPROGRAMBINARYPROC glad_glProgramBinary; -#define glProgramBinary glad_glProgramBinary -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC)(GLuint program, GLenum pname, GLint value); -GLAPI PFNGLPROGRAMPARAMETERIPROC glad_glProgramParameteri; -#define glProgramParameteri glad_glProgramParameteri -typedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC)(GLuint pipeline, GLbitfield stages, GLuint program); -GLAPI PFNGLUSEPROGRAMSTAGESPROC glad_glUseProgramStages; -#define glUseProgramStages glad_glUseProgramStages -typedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC)(GLuint pipeline, GLuint program); -GLAPI PFNGLACTIVESHADERPROGRAMPROC glad_glActiveShaderProgram; -#define glActiveShaderProgram glad_glActiveShaderProgram -typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC)(GLenum type, GLsizei count, const GLchar *const*strings); -GLAPI PFNGLCREATESHADERPROGRAMVPROC glad_glCreateShaderProgramv; -#define glCreateShaderProgramv glad_glCreateShaderProgramv -typedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC)(GLuint pipeline); -GLAPI PFNGLBINDPROGRAMPIPELINEPROC glad_glBindProgramPipeline; -#define glBindProgramPipeline glad_glBindProgramPipeline -typedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC)(GLsizei n, const GLuint *pipelines); -GLAPI PFNGLDELETEPROGRAMPIPELINESPROC glad_glDeleteProgramPipelines; -#define glDeleteProgramPipelines glad_glDeleteProgramPipelines -typedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC)(GLsizei n, GLuint *pipelines); -GLAPI PFNGLGENPROGRAMPIPELINESPROC glad_glGenProgramPipelines; -#define glGenProgramPipelines glad_glGenProgramPipelines -typedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC)(GLuint pipeline); -GLAPI PFNGLISPROGRAMPIPELINEPROC glad_glIsProgramPipeline; -#define glIsProgramPipeline glad_glIsProgramPipeline -typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC)(GLuint pipeline, GLenum pname, GLint *params); -GLAPI PFNGLGETPROGRAMPIPELINEIVPROC glad_glGetProgramPipelineiv; -#define glGetProgramPipelineiv glad_glGetProgramPipelineiv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC)(GLuint program, GLint location, GLint v0); -GLAPI PFNGLPROGRAMUNIFORM1IPROC glad_glProgramUniform1i; -#define glProgramUniform1i glad_glProgramUniform1i -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC)(GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI PFNGLPROGRAMUNIFORM1IVPROC glad_glProgramUniform1iv; -#define glProgramUniform1iv glad_glProgramUniform1iv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC)(GLuint program, GLint location, GLfloat v0); -GLAPI PFNGLPROGRAMUNIFORM1FPROC glad_glProgramUniform1f; -#define glProgramUniform1f glad_glProgramUniform1f -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC)(GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORM1FVPROC glad_glProgramUniform1fv; -#define glProgramUniform1fv glad_glProgramUniform1fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC)(GLuint program, GLint location, GLdouble v0); -GLAPI PFNGLPROGRAMUNIFORM1DPROC glad_glProgramUniform1d; -#define glProgramUniform1d glad_glProgramUniform1d -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC)(GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORM1DVPROC glad_glProgramUniform1dv; -#define glProgramUniform1dv glad_glProgramUniform1dv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC)(GLuint program, GLint location, GLuint v0); -GLAPI PFNGLPROGRAMUNIFORM1UIPROC glad_glProgramUniform1ui; -#define glProgramUniform1ui glad_glProgramUniform1ui -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC)(GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI PFNGLPROGRAMUNIFORM1UIVPROC glad_glProgramUniform1uiv; -#define glProgramUniform1uiv glad_glProgramUniform1uiv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC)(GLuint program, GLint location, GLint v0, GLint v1); -GLAPI PFNGLPROGRAMUNIFORM2IPROC glad_glProgramUniform2i; -#define glProgramUniform2i glad_glProgramUniform2i -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC)(GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI PFNGLPROGRAMUNIFORM2IVPROC glad_glProgramUniform2iv; -#define glProgramUniform2iv glad_glProgramUniform2iv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC)(GLuint program, GLint location, GLfloat v0, GLfloat v1); -GLAPI PFNGLPROGRAMUNIFORM2FPROC glad_glProgramUniform2f; -#define glProgramUniform2f glad_glProgramUniform2f -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC)(GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORM2FVPROC glad_glProgramUniform2fv; -#define glProgramUniform2fv glad_glProgramUniform2fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC)(GLuint program, GLint location, GLdouble v0, GLdouble v1); -GLAPI PFNGLPROGRAMUNIFORM2DPROC glad_glProgramUniform2d; -#define glProgramUniform2d glad_glProgramUniform2d -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC)(GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORM2DVPROC glad_glProgramUniform2dv; -#define glProgramUniform2dv glad_glProgramUniform2dv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC)(GLuint program, GLint location, GLuint v0, GLuint v1); -GLAPI PFNGLPROGRAMUNIFORM2UIPROC glad_glProgramUniform2ui; -#define glProgramUniform2ui glad_glProgramUniform2ui -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC)(GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI PFNGLPROGRAMUNIFORM2UIVPROC glad_glProgramUniform2uiv; -#define glProgramUniform2uiv glad_glProgramUniform2uiv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -GLAPI PFNGLPROGRAMUNIFORM3IPROC glad_glProgramUniform3i; -#define glProgramUniform3i glad_glProgramUniform3i -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC)(GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI PFNGLPROGRAMUNIFORM3IVPROC glad_glProgramUniform3iv; -#define glProgramUniform3iv glad_glProgramUniform3iv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GLAPI PFNGLPROGRAMUNIFORM3FPROC glad_glProgramUniform3f; -#define glProgramUniform3f glad_glProgramUniform3f -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC)(GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORM3FVPROC glad_glProgramUniform3fv; -#define glProgramUniform3fv glad_glProgramUniform3fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC)(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); -GLAPI PFNGLPROGRAMUNIFORM3DPROC glad_glProgramUniform3d; -#define glProgramUniform3d glad_glProgramUniform3d -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC)(GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORM3DVPROC glad_glProgramUniform3dv; -#define glProgramUniform3dv glad_glProgramUniform3dv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -GLAPI PFNGLPROGRAMUNIFORM3UIPROC glad_glProgramUniform3ui; -#define glProgramUniform3ui glad_glProgramUniform3ui -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC)(GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI PFNGLPROGRAMUNIFORM3UIVPROC glad_glProgramUniform3uiv; -#define glProgramUniform3uiv glad_glProgramUniform3uiv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GLAPI PFNGLPROGRAMUNIFORM4IPROC glad_glProgramUniform4i; -#define glProgramUniform4i glad_glProgramUniform4i -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC)(GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI PFNGLPROGRAMUNIFORM4IVPROC glad_glProgramUniform4iv; -#define glProgramUniform4iv glad_glProgramUniform4iv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GLAPI PFNGLPROGRAMUNIFORM4FPROC glad_glProgramUniform4f; -#define glProgramUniform4f glad_glProgramUniform4f -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC)(GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORM4FVPROC glad_glProgramUniform4fv; -#define glProgramUniform4fv glad_glProgramUniform4fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC)(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); -GLAPI PFNGLPROGRAMUNIFORM4DPROC glad_glProgramUniform4d; -#define glProgramUniform4d glad_glProgramUniform4d -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC)(GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORM4DVPROC glad_glProgramUniform4dv; -#define glProgramUniform4dv glad_glProgramUniform4dv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GLAPI PFNGLPROGRAMUNIFORM4UIPROC glad_glProgramUniform4ui; -#define glProgramUniform4ui glad_glProgramUniform4ui -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC)(GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI PFNGLPROGRAMUNIFORM4UIVPROC glad_glProgramUniform4uiv; -#define glProgramUniform4uiv glad_glProgramUniform4uiv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX2FVPROC glad_glProgramUniformMatrix2fv; -#define glProgramUniformMatrix2fv glad_glProgramUniformMatrix2fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX3FVPROC glad_glProgramUniformMatrix3fv; -#define glProgramUniformMatrix3fv glad_glProgramUniformMatrix3fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX4FVPROC glad_glProgramUniformMatrix4fv; -#define glProgramUniformMatrix4fv glad_glProgramUniformMatrix4fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX2DVPROC glad_glProgramUniformMatrix2dv; -#define glProgramUniformMatrix2dv glad_glProgramUniformMatrix2dv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX3DVPROC glad_glProgramUniformMatrix3dv; -#define glProgramUniformMatrix3dv glad_glProgramUniformMatrix3dv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX4DVPROC glad_glProgramUniformMatrix4dv; -#define glProgramUniformMatrix4dv glad_glProgramUniformMatrix4dv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC glad_glProgramUniformMatrix2x3fv; -#define glProgramUniformMatrix2x3fv glad_glProgramUniformMatrix2x3fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC glad_glProgramUniformMatrix3x2fv; -#define glProgramUniformMatrix3x2fv glad_glProgramUniformMatrix3x2fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC glad_glProgramUniformMatrix2x4fv; -#define glProgramUniformMatrix2x4fv glad_glProgramUniformMatrix2x4fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC glad_glProgramUniformMatrix4x2fv; -#define glProgramUniformMatrix4x2fv glad_glProgramUniformMatrix4x2fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC glad_glProgramUniformMatrix3x4fv; -#define glProgramUniformMatrix3x4fv glad_glProgramUniformMatrix3x4fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC glad_glProgramUniformMatrix4x3fv; -#define glProgramUniformMatrix4x3fv glad_glProgramUniformMatrix4x3fv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC glad_glProgramUniformMatrix2x3dv; -#define glProgramUniformMatrix2x3dv glad_glProgramUniformMatrix2x3dv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC glad_glProgramUniformMatrix3x2dv; -#define glProgramUniformMatrix3x2dv glad_glProgramUniformMatrix3x2dv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC glad_glProgramUniformMatrix2x4dv; -#define glProgramUniformMatrix2x4dv glad_glProgramUniformMatrix2x4dv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC glad_glProgramUniformMatrix4x2dv; -#define glProgramUniformMatrix4x2dv glad_glProgramUniformMatrix4x2dv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC glad_glProgramUniformMatrix3x4dv; -#define glProgramUniformMatrix3x4dv glad_glProgramUniformMatrix3x4dv -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC glad_glProgramUniformMatrix4x3dv; -#define glProgramUniformMatrix4x3dv glad_glProgramUniformMatrix4x3dv -typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC)(GLuint pipeline); -GLAPI PFNGLVALIDATEPROGRAMPIPELINEPROC glad_glValidateProgramPipeline; -#define glValidateProgramPipeline glad_glValidateProgramPipeline -typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC)(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GLAPI PFNGLGETPROGRAMPIPELINEINFOLOGPROC glad_glGetProgramPipelineInfoLog; -#define glGetProgramPipelineInfoLog glad_glGetProgramPipelineInfoLog -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC)(GLuint index, GLdouble x); -GLAPI PFNGLVERTEXATTRIBL1DPROC glad_glVertexAttribL1d; -#define glVertexAttribL1d glad_glVertexAttribL1d -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC)(GLuint index, GLdouble x, GLdouble y); -GLAPI PFNGLVERTEXATTRIBL2DPROC glad_glVertexAttribL2d; -#define glVertexAttribL2d glad_glVertexAttribL2d -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC)(GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI PFNGLVERTEXATTRIBL3DPROC glad_glVertexAttribL3d; -#define glVertexAttribL3d glad_glVertexAttribL3d -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI PFNGLVERTEXATTRIBL4DPROC glad_glVertexAttribL4d; -#define glVertexAttribL4d glad_glVertexAttribL4d -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC)(GLuint index, const GLdouble *v); -GLAPI PFNGLVERTEXATTRIBL1DVPROC glad_glVertexAttribL1dv; -#define glVertexAttribL1dv glad_glVertexAttribL1dv -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC)(GLuint index, const GLdouble *v); -GLAPI PFNGLVERTEXATTRIBL2DVPROC glad_glVertexAttribL2dv; -#define glVertexAttribL2dv glad_glVertexAttribL2dv -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC)(GLuint index, const GLdouble *v); -GLAPI PFNGLVERTEXATTRIBL3DVPROC glad_glVertexAttribL3dv; -#define glVertexAttribL3dv glad_glVertexAttribL3dv -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC)(GLuint index, const GLdouble *v); -GLAPI PFNGLVERTEXATTRIBL4DVPROC glad_glVertexAttribL4dv; -#define glVertexAttribL4dv glad_glVertexAttribL4dv -typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC)(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); -GLAPI PFNGLVERTEXATTRIBLPOINTERPROC glad_glVertexAttribLPointer; -#define glVertexAttribLPointer glad_glVertexAttribLPointer -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC)(GLuint index, GLenum pname, GLdouble *params); -GLAPI PFNGLGETVERTEXATTRIBLDVPROC glad_glGetVertexAttribLdv; -#define glGetVertexAttribLdv glad_glGetVertexAttribLdv -typedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC)(GLuint first, GLsizei count, const GLfloat *v); -GLAPI PFNGLVIEWPORTARRAYVPROC glad_glViewportArrayv; -#define glViewportArrayv glad_glViewportArrayv -typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); -GLAPI PFNGLVIEWPORTINDEXEDFPROC glad_glViewportIndexedf; -#define glViewportIndexedf glad_glViewportIndexedf -typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC)(GLuint index, const GLfloat *v); -GLAPI PFNGLVIEWPORTINDEXEDFVPROC glad_glViewportIndexedfv; -#define glViewportIndexedfv glad_glViewportIndexedfv -typedef void (APIENTRYP PFNGLSCISSORARRAYVPROC)(GLuint first, GLsizei count, const GLint *v); -GLAPI PFNGLSCISSORARRAYVPROC glad_glScissorArrayv; -#define glScissorArrayv glad_glScissorArrayv -typedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC)(GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); -GLAPI PFNGLSCISSORINDEXEDPROC glad_glScissorIndexed; -#define glScissorIndexed glad_glScissorIndexed -typedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC)(GLuint index, const GLint *v); -GLAPI PFNGLSCISSORINDEXEDVPROC glad_glScissorIndexedv; -#define glScissorIndexedv glad_glScissorIndexedv -typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC)(GLuint first, GLsizei count, const GLdouble *v); -GLAPI PFNGLDEPTHRANGEARRAYVPROC glad_glDepthRangeArrayv; -#define glDepthRangeArrayv glad_glDepthRangeArrayv -typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC)(GLuint index, GLdouble n, GLdouble f); -GLAPI PFNGLDEPTHRANGEINDEXEDPROC glad_glDepthRangeIndexed; -#define glDepthRangeIndexed glad_glDepthRangeIndexed -typedef void (APIENTRYP PFNGLGETFLOATI_VPROC)(GLenum target, GLuint index, GLfloat *data); -GLAPI PFNGLGETFLOATI_VPROC glad_glGetFloati_v; -#define glGetFloati_v glad_glGetFloati_v -typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC)(GLenum target, GLuint index, GLdouble *data); -GLAPI PFNGLGETDOUBLEI_VPROC glad_glGetDoublei_v; -#define glGetDoublei_v glad_glGetDoublei_v -#endif -#ifndef GL_VERSION_4_2 -#define GL_VERSION_4_2 1 -GLAPI int GLAD_GL_VERSION_4_2; -typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC)(GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); -GLAPI PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC glad_glDrawArraysInstancedBaseInstance; -#define glDrawArraysInstancedBaseInstance glad_glDrawArraysInstancedBaseInstance -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); -GLAPI PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC glad_glDrawElementsInstancedBaseInstance; -#define glDrawElementsInstancedBaseInstance glad_glDrawElementsInstancedBaseInstance -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); -GLAPI PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC glad_glDrawElementsInstancedBaseVertexBaseInstance; -#define glDrawElementsInstancedBaseVertexBaseInstance glad_glDrawElementsInstancedBaseVertexBaseInstance -typedef void (APIENTRYP PFNGLGETINTERNALFORMATIVPROC)(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); -GLAPI PFNGLGETINTERNALFORMATIVPROC glad_glGetInternalformativ; -#define glGetInternalformativ glad_glGetInternalformativ -typedef void (APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC)(GLuint program, GLuint bufferIndex, GLenum pname, GLint *params); -GLAPI PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC glad_glGetActiveAtomicCounterBufferiv; -#define glGetActiveAtomicCounterBufferiv glad_glGetActiveAtomicCounterBufferiv -typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREPROC)(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); -GLAPI PFNGLBINDIMAGETEXTUREPROC glad_glBindImageTexture; -#define glBindImageTexture glad_glBindImageTexture -typedef void (APIENTRYP PFNGLMEMORYBARRIERPROC)(GLbitfield barriers); -GLAPI PFNGLMEMORYBARRIERPROC glad_glMemoryBarrier; -#define glMemoryBarrier glad_glMemoryBarrier -typedef void (APIENTRYP PFNGLTEXSTORAGE1DPROC)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -GLAPI PFNGLTEXSTORAGE1DPROC glad_glTexStorage1D; -#define glTexStorage1D glad_glTexStorage1D -typedef void (APIENTRYP PFNGLTEXSTORAGE2DPROC)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI PFNGLTEXSTORAGE2DPROC glad_glTexStorage2D; -#define glTexStorage2D glad_glTexStorage2D -typedef void (APIENTRYP PFNGLTEXSTORAGE3DPROC)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -GLAPI PFNGLTEXSTORAGE3DPROC glad_glTexStorage3D; -#define glTexStorage3D glad_glTexStorage3D -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC)(GLenum mode, GLuint id, GLsizei instancecount); -GLAPI PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC glad_glDrawTransformFeedbackInstanced; -#define glDrawTransformFeedbackInstanced glad_glDrawTransformFeedbackInstanced -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC)(GLenum mode, GLuint id, GLuint stream, GLsizei instancecount); -GLAPI PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC glad_glDrawTransformFeedbackStreamInstanced; -#define glDrawTransformFeedbackStreamInstanced glad_glDrawTransformFeedbackStreamInstanced -#endif -#ifndef GL_VERSION_4_3 -#define GL_VERSION_4_3 1 -GLAPI int GLAD_GL_VERSION_4_3; -typedef void (APIENTRYP PFNGLCLEARBUFFERDATAPROC)(GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data); -GLAPI PFNGLCLEARBUFFERDATAPROC glad_glClearBufferData; -#define glClearBufferData glad_glClearBufferData -typedef void (APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC)(GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); -GLAPI PFNGLCLEARBUFFERSUBDATAPROC glad_glClearBufferSubData; -#define glClearBufferSubData glad_glClearBufferSubData -typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEPROC)(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); -GLAPI PFNGLDISPATCHCOMPUTEPROC glad_glDispatchCompute; -#define glDispatchCompute glad_glDispatchCompute -typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC)(GLintptr indirect); -GLAPI PFNGLDISPATCHCOMPUTEINDIRECTPROC glad_glDispatchComputeIndirect; -#define glDispatchComputeIndirect glad_glDispatchComputeIndirect -typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATAPROC)(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); -GLAPI PFNGLCOPYIMAGESUBDATAPROC glad_glCopyImageSubData; -#define glCopyImageSubData glad_glCopyImageSubData -typedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC)(GLenum target, GLenum pname, GLint param); -GLAPI PFNGLFRAMEBUFFERPARAMETERIPROC glad_glFramebufferParameteri; -#define glFramebufferParameteri glad_glFramebufferParameteri -typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint *params); -GLAPI PFNGLGETFRAMEBUFFERPARAMETERIVPROC glad_glGetFramebufferParameteriv; -#define glGetFramebufferParameteriv glad_glGetFramebufferParameteriv -typedef void (APIENTRYP PFNGLGETINTERNALFORMATI64VPROC)(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params); -GLAPI PFNGLGETINTERNALFORMATI64VPROC glad_glGetInternalformati64v; -#define glGetInternalformati64v glad_glGetInternalformati64v -typedef void (APIENTRYP PFNGLINVALIDATETEXSUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth); -GLAPI PFNGLINVALIDATETEXSUBIMAGEPROC glad_glInvalidateTexSubImage; -#define glInvalidateTexSubImage glad_glInvalidateTexSubImage -typedef void (APIENTRYP PFNGLINVALIDATETEXIMAGEPROC)(GLuint texture, GLint level); -GLAPI PFNGLINVALIDATETEXIMAGEPROC glad_glInvalidateTexImage; -#define glInvalidateTexImage glad_glInvalidateTexImage -typedef void (APIENTRYP PFNGLINVALIDATEBUFFERSUBDATAPROC)(GLuint buffer, GLintptr offset, GLsizeiptr length); -GLAPI PFNGLINVALIDATEBUFFERSUBDATAPROC glad_glInvalidateBufferSubData; -#define glInvalidateBufferSubData glad_glInvalidateBufferSubData -typedef void (APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC)(GLuint buffer); -GLAPI PFNGLINVALIDATEBUFFERDATAPROC glad_glInvalidateBufferData; -#define glInvalidateBufferData glad_glInvalidateBufferData -typedef void (APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC)(GLenum target, GLsizei numAttachments, const GLenum *attachments); -GLAPI PFNGLINVALIDATEFRAMEBUFFERPROC glad_glInvalidateFramebuffer; -#define glInvalidateFramebuffer glad_glInvalidateFramebuffer -typedef void (APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC)(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI PFNGLINVALIDATESUBFRAMEBUFFERPROC glad_glInvalidateSubFramebuffer; -#define glInvalidateSubFramebuffer glad_glInvalidateSubFramebuffer -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTPROC)(GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride); -GLAPI PFNGLMULTIDRAWARRAYSINDIRECTPROC glad_glMultiDrawArraysIndirect; -#define glMultiDrawArraysIndirect glad_glMultiDrawArraysIndirect -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTPROC)(GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride); -GLAPI PFNGLMULTIDRAWELEMENTSINDIRECTPROC glad_glMultiDrawElementsIndirect; -#define glMultiDrawElementsIndirect glad_glMultiDrawElementsIndirect -typedef void (APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC)(GLuint program, GLenum programInterface, GLenum pname, GLint *params); -GLAPI PFNGLGETPROGRAMINTERFACEIVPROC glad_glGetProgramInterfaceiv; -#define glGetProgramInterfaceiv glad_glGetProgramInterfaceiv -typedef GLuint (APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC)(GLuint program, GLenum programInterface, const GLchar *name); -GLAPI PFNGLGETPROGRAMRESOURCEINDEXPROC glad_glGetProgramResourceIndex; -#define glGetProgramResourceIndex glad_glGetProgramResourceIndex -typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC)(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); -GLAPI PFNGLGETPROGRAMRESOURCENAMEPROC glad_glGetProgramResourceName; -#define glGetProgramResourceName glad_glGetProgramResourceName -typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC)(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params); -GLAPI PFNGLGETPROGRAMRESOURCEIVPROC glad_glGetProgramResourceiv; -#define glGetProgramResourceiv glad_glGetProgramResourceiv -typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC)(GLuint program, GLenum programInterface, const GLchar *name); -GLAPI PFNGLGETPROGRAMRESOURCELOCATIONPROC glad_glGetProgramResourceLocation; -#define glGetProgramResourceLocation glad_glGetProgramResourceLocation -typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC)(GLuint program, GLenum programInterface, const GLchar *name); -GLAPI PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC glad_glGetProgramResourceLocationIndex; -#define glGetProgramResourceLocationIndex glad_glGetProgramResourceLocationIndex -typedef void (APIENTRYP PFNGLSHADERSTORAGEBLOCKBINDINGPROC)(GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding); -GLAPI PFNGLSHADERSTORAGEBLOCKBINDINGPROC glad_glShaderStorageBlockBinding; -#define glShaderStorageBlockBinding glad_glShaderStorageBlockBinding -typedef void (APIENTRYP PFNGLTEXBUFFERRANGEPROC)(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI PFNGLTEXBUFFERRANGEPROC glad_glTexBufferRange; -#define glTexBufferRange glad_glTexBufferRange -typedef void (APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -GLAPI PFNGLTEXSTORAGE2DMULTISAMPLEPROC glad_glTexStorage2DMultisample; -#define glTexStorage2DMultisample glad_glTexStorage2DMultisample -typedef void (APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -GLAPI PFNGLTEXSTORAGE3DMULTISAMPLEPROC glad_glTexStorage3DMultisample; -#define glTexStorage3DMultisample glad_glTexStorage3DMultisample -typedef void (APIENTRYP PFNGLTEXTUREVIEWPROC)(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); -GLAPI PFNGLTEXTUREVIEWPROC glad_glTextureView; -#define glTextureView glad_glTextureView -typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERPROC)(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); -GLAPI PFNGLBINDVERTEXBUFFERPROC glad_glBindVertexBuffer; -#define glBindVertexBuffer glad_glBindVertexBuffer -typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATPROC)(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); -GLAPI PFNGLVERTEXATTRIBFORMATPROC glad_glVertexAttribFormat; -#define glVertexAttribFormat glad_glVertexAttribFormat -typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC)(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -GLAPI PFNGLVERTEXATTRIBIFORMATPROC glad_glVertexAttribIFormat; -#define glVertexAttribIFormat glad_glVertexAttribIFormat -typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATPROC)(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -GLAPI PFNGLVERTEXATTRIBLFORMATPROC glad_glVertexAttribLFormat; -#define glVertexAttribLFormat glad_glVertexAttribLFormat -typedef void (APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC)(GLuint attribindex, GLuint bindingindex); -GLAPI PFNGLVERTEXATTRIBBINDINGPROC glad_glVertexAttribBinding; -#define glVertexAttribBinding glad_glVertexAttribBinding -typedef void (APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC)(GLuint bindingindex, GLuint divisor); -GLAPI PFNGLVERTEXBINDINGDIVISORPROC glad_glVertexBindingDivisor; -#define glVertexBindingDivisor glad_glVertexBindingDivisor -typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC)(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -GLAPI PFNGLDEBUGMESSAGECONTROLPROC glad_glDebugMessageControl; -#define glDebugMessageControl glad_glDebugMessageControl -typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -GLAPI PFNGLDEBUGMESSAGEINSERTPROC glad_glDebugMessageInsert; -#define glDebugMessageInsert glad_glDebugMessageInsert -typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC)(GLDEBUGPROC callback, const void *userParam); -GLAPI PFNGLDEBUGMESSAGECALLBACKPROC glad_glDebugMessageCallback; -#define glDebugMessageCallback glad_glDebugMessageCallback -typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC)(GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -GLAPI PFNGLGETDEBUGMESSAGELOGPROC glad_glGetDebugMessageLog; -#define glGetDebugMessageLog glad_glGetDebugMessageLog -typedef void (APIENTRYP PFNGLPUSHDEBUGGROUPPROC)(GLenum source, GLuint id, GLsizei length, const GLchar *message); -GLAPI PFNGLPUSHDEBUGGROUPPROC glad_glPushDebugGroup; -#define glPushDebugGroup glad_glPushDebugGroup -typedef void (APIENTRYP PFNGLPOPDEBUGGROUPPROC)(void); -GLAPI PFNGLPOPDEBUGGROUPPROC glad_glPopDebugGroup; -#define glPopDebugGroup glad_glPopDebugGroup -typedef void (APIENTRYP PFNGLOBJECTLABELPROC)(GLenum identifier, GLuint name, GLsizei length, const GLchar *label); -GLAPI PFNGLOBJECTLABELPROC glad_glObjectLabel; -#define glObjectLabel glad_glObjectLabel -typedef void (APIENTRYP PFNGLGETOBJECTLABELPROC)(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); -GLAPI PFNGLGETOBJECTLABELPROC glad_glGetObjectLabel; -#define glGetObjectLabel glad_glGetObjectLabel -typedef void (APIENTRYP PFNGLOBJECTPTRLABELPROC)(const void *ptr, GLsizei length, const GLchar *label); -GLAPI PFNGLOBJECTPTRLABELPROC glad_glObjectPtrLabel; -#define glObjectPtrLabel glad_glObjectPtrLabel -typedef void (APIENTRYP PFNGLGETOBJECTPTRLABELPROC)(const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); -GLAPI PFNGLGETOBJECTPTRLABELPROC glad_glGetObjectPtrLabel; -#define glGetObjectPtrLabel glad_glGetObjectPtrLabel -typedef void (APIENTRYP PFNGLGETPOINTERVPROC)(GLenum pname, void **params); -GLAPI PFNGLGETPOINTERVPROC glad_glGetPointerv; -#define glGetPointerv glad_glGetPointerv -#endif -#ifndef GL_VERSION_4_4 -#define GL_VERSION_4_4 1 -GLAPI int GLAD_GL_VERSION_4_4; -typedef void (APIENTRYP PFNGLBUFFERSTORAGEPROC)(GLenum target, GLsizeiptr size, const void *data, GLbitfield flags); -GLAPI PFNGLBUFFERSTORAGEPROC glad_glBufferStorage; -#define glBufferStorage glad_glBufferStorage -typedef void (APIENTRYP PFNGLCLEARTEXIMAGEPROC)(GLuint texture, GLint level, GLenum format, GLenum type, const void *data); -GLAPI PFNGLCLEARTEXIMAGEPROC glad_glClearTexImage; -#define glClearTexImage glad_glClearTexImage -typedef void (APIENTRYP PFNGLCLEARTEXSUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data); -GLAPI PFNGLCLEARTEXSUBIMAGEPROC glad_glClearTexSubImage; -#define glClearTexSubImage glad_glClearTexSubImage -typedef void (APIENTRYP PFNGLBINDBUFFERSBASEPROC)(GLenum target, GLuint first, GLsizei count, const GLuint *buffers); -GLAPI PFNGLBINDBUFFERSBASEPROC glad_glBindBuffersBase; -#define glBindBuffersBase glad_glBindBuffersBase -typedef void (APIENTRYP PFNGLBINDBUFFERSRANGEPROC)(GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes); -GLAPI PFNGLBINDBUFFERSRANGEPROC glad_glBindBuffersRange; -#define glBindBuffersRange glad_glBindBuffersRange -typedef void (APIENTRYP PFNGLBINDTEXTURESPROC)(GLuint first, GLsizei count, const GLuint *textures); -GLAPI PFNGLBINDTEXTURESPROC glad_glBindTextures; -#define glBindTextures glad_glBindTextures -typedef void (APIENTRYP PFNGLBINDSAMPLERSPROC)(GLuint first, GLsizei count, const GLuint *samplers); -GLAPI PFNGLBINDSAMPLERSPROC glad_glBindSamplers; -#define glBindSamplers glad_glBindSamplers -typedef void (APIENTRYP PFNGLBINDIMAGETEXTURESPROC)(GLuint first, GLsizei count, const GLuint *textures); -GLAPI PFNGLBINDIMAGETEXTURESPROC glad_glBindImageTextures; -#define glBindImageTextures glad_glBindImageTextures -typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERSPROC)(GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides); -GLAPI PFNGLBINDVERTEXBUFFERSPROC glad_glBindVertexBuffers; -#define glBindVertexBuffers glad_glBindVertexBuffers -#endif -#ifndef GL_VERSION_4_5 -#define GL_VERSION_4_5 1 -GLAPI int GLAD_GL_VERSION_4_5; -typedef void (APIENTRYP PFNGLCLIPCONTROLPROC)(GLenum origin, GLenum depth); -GLAPI PFNGLCLIPCONTROLPROC glad_glClipControl; -#define glClipControl glad_glClipControl -typedef void (APIENTRYP PFNGLCREATETRANSFORMFEEDBACKSPROC)(GLsizei n, GLuint *ids); -GLAPI PFNGLCREATETRANSFORMFEEDBACKSPROC glad_glCreateTransformFeedbacks; -#define glCreateTransformFeedbacks glad_glCreateTransformFeedbacks -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC)(GLuint xfb, GLuint index, GLuint buffer); -GLAPI PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC glad_glTransformFeedbackBufferBase; -#define glTransformFeedbackBufferBase glad_glTransformFeedbackBufferBase -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC)(GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC glad_glTransformFeedbackBufferRange; -#define glTransformFeedbackBufferRange glad_glTransformFeedbackBufferRange -typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKIVPROC)(GLuint xfb, GLenum pname, GLint *param); -GLAPI PFNGLGETTRANSFORMFEEDBACKIVPROC glad_glGetTransformFeedbackiv; -#define glGetTransformFeedbackiv glad_glGetTransformFeedbackiv -typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI_VPROC)(GLuint xfb, GLenum pname, GLuint index, GLint *param); -GLAPI PFNGLGETTRANSFORMFEEDBACKI_VPROC glad_glGetTransformFeedbacki_v; -#define glGetTransformFeedbacki_v glad_glGetTransformFeedbacki_v -typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI64_VPROC)(GLuint xfb, GLenum pname, GLuint index, GLint64 *param); -GLAPI PFNGLGETTRANSFORMFEEDBACKI64_VPROC glad_glGetTransformFeedbacki64_v; -#define glGetTransformFeedbacki64_v glad_glGetTransformFeedbacki64_v -typedef void (APIENTRYP PFNGLCREATEBUFFERSPROC)(GLsizei n, GLuint *buffers); -GLAPI PFNGLCREATEBUFFERSPROC glad_glCreateBuffers; -#define glCreateBuffers glad_glCreateBuffers -typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEPROC)(GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); -GLAPI PFNGLNAMEDBUFFERSTORAGEPROC glad_glNamedBufferStorage; -#define glNamedBufferStorage glad_glNamedBufferStorage -typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAPROC)(GLuint buffer, GLsizeiptr size, const void *data, GLenum usage); -GLAPI PFNGLNAMEDBUFFERDATAPROC glad_glNamedBufferData; -#define glNamedBufferData glad_glNamedBufferData -typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAPROC)(GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); -GLAPI PFNGLNAMEDBUFFERSUBDATAPROC glad_glNamedBufferSubData; -#define glNamedBufferSubData glad_glNamedBufferSubData -typedef void (APIENTRYP PFNGLCOPYNAMEDBUFFERSUBDATAPROC)(GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -GLAPI PFNGLCOPYNAMEDBUFFERSUBDATAPROC glad_glCopyNamedBufferSubData; -#define glCopyNamedBufferSubData glad_glCopyNamedBufferSubData -typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAPROC)(GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); -GLAPI PFNGLCLEARNAMEDBUFFERDATAPROC glad_glClearNamedBufferData; -#define glClearNamedBufferData glad_glClearNamedBufferData -typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAPROC)(GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); -GLAPI PFNGLCLEARNAMEDBUFFERSUBDATAPROC glad_glClearNamedBufferSubData; -#define glClearNamedBufferSubData glad_glClearNamedBufferSubData -typedef void * (APIENTRYP PFNGLMAPNAMEDBUFFERPROC)(GLuint buffer, GLenum access); -GLAPI PFNGLMAPNAMEDBUFFERPROC glad_glMapNamedBuffer; -#define glMapNamedBuffer glad_glMapNamedBuffer -typedef void * (APIENTRYP PFNGLMAPNAMEDBUFFERRANGEPROC)(GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); -GLAPI PFNGLMAPNAMEDBUFFERRANGEPROC glad_glMapNamedBufferRange; -#define glMapNamedBufferRange glad_glMapNamedBufferRange -typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFERPROC)(GLuint buffer); -GLAPI PFNGLUNMAPNAMEDBUFFERPROC glad_glUnmapNamedBuffer; -#define glUnmapNamedBuffer glad_glUnmapNamedBuffer -typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC)(GLuint buffer, GLintptr offset, GLsizeiptr length); -GLAPI PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC glad_glFlushMappedNamedBufferRange; -#define glFlushMappedNamedBufferRange glad_glFlushMappedNamedBufferRange -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVPROC)(GLuint buffer, GLenum pname, GLint *params); -GLAPI PFNGLGETNAMEDBUFFERPARAMETERIVPROC glad_glGetNamedBufferParameteriv; -#define glGetNamedBufferParameteriv glad_glGetNamedBufferParameteriv -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERI64VPROC)(GLuint buffer, GLenum pname, GLint64 *params); -GLAPI PFNGLGETNAMEDBUFFERPARAMETERI64VPROC glad_glGetNamedBufferParameteri64v; -#define glGetNamedBufferParameteri64v glad_glGetNamedBufferParameteri64v -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVPROC)(GLuint buffer, GLenum pname, void **params); -GLAPI PFNGLGETNAMEDBUFFERPOINTERVPROC glad_glGetNamedBufferPointerv; -#define glGetNamedBufferPointerv glad_glGetNamedBufferPointerv -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAPROC)(GLuint buffer, GLintptr offset, GLsizeiptr size, void *data); -GLAPI PFNGLGETNAMEDBUFFERSUBDATAPROC glad_glGetNamedBufferSubData; -#define glGetNamedBufferSubData glad_glGetNamedBufferSubData -typedef void (APIENTRYP PFNGLCREATEFRAMEBUFFERSPROC)(GLsizei n, GLuint *framebuffers); -GLAPI PFNGLCREATEFRAMEBUFFERSPROC glad_glCreateFramebuffers; -#define glCreateFramebuffers glad_glCreateFramebuffers -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC)(GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GLAPI PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC glad_glNamedFramebufferRenderbuffer; -#define glNamedFramebufferRenderbuffer glad_glNamedFramebufferRenderbuffer -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC)(GLuint framebuffer, GLenum pname, GLint param); -GLAPI PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC glad_glNamedFramebufferParameteri; -#define glNamedFramebufferParameteri glad_glNamedFramebufferParameteri -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREPROC)(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); -GLAPI PFNGLNAMEDFRAMEBUFFERTEXTUREPROC glad_glNamedFramebufferTexture; -#define glNamedFramebufferTexture glad_glNamedFramebufferTexture -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC)(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); -GLAPI PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC glad_glNamedFramebufferTextureLayer; -#define glNamedFramebufferTextureLayer glad_glNamedFramebufferTextureLayer -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC)(GLuint framebuffer, GLenum buf); -GLAPI PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC glad_glNamedFramebufferDrawBuffer; -#define glNamedFramebufferDrawBuffer glad_glNamedFramebufferDrawBuffer -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC)(GLuint framebuffer, GLsizei n, const GLenum *bufs); -GLAPI PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC glad_glNamedFramebufferDrawBuffers; -#define glNamedFramebufferDrawBuffers glad_glNamedFramebufferDrawBuffers -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC)(GLuint framebuffer, GLenum src); -GLAPI PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC glad_glNamedFramebufferReadBuffer; -#define glNamedFramebufferReadBuffer glad_glNamedFramebufferReadBuffer -typedef void (APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC)(GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments); -GLAPI PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC glad_glInvalidateNamedFramebufferData; -#define glInvalidateNamedFramebufferData glad_glInvalidateNamedFramebufferData -typedef void (APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC)(GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC glad_glInvalidateNamedFramebufferSubData; -#define glInvalidateNamedFramebufferSubData glad_glInvalidateNamedFramebufferSubData -typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERIVPROC)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value); -GLAPI PFNGLCLEARNAMEDFRAMEBUFFERIVPROC glad_glClearNamedFramebufferiv; -#define glClearNamedFramebufferiv glad_glClearNamedFramebufferiv -typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value); -GLAPI PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC glad_glClearNamedFramebufferuiv; -#define glClearNamedFramebufferuiv glad_glClearNamedFramebufferuiv -typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFVPROC)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value); -GLAPI PFNGLCLEARNAMEDFRAMEBUFFERFVPROC glad_glClearNamedFramebufferfv; -#define glClearNamedFramebufferfv glad_glClearNamedFramebufferfv -typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFIPROC)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -GLAPI PFNGLCLEARNAMEDFRAMEBUFFERFIPROC glad_glClearNamedFramebufferfi; -#define glClearNamedFramebufferfi glad_glClearNamedFramebufferfi -typedef void (APIENTRYP PFNGLBLITNAMEDFRAMEBUFFERPROC)(GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -GLAPI PFNGLBLITNAMEDFRAMEBUFFERPROC glad_glBlitNamedFramebuffer; -#define glBlitNamedFramebuffer glad_glBlitNamedFramebuffer -typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC)(GLuint framebuffer, GLenum target); -GLAPI PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC glad_glCheckNamedFramebufferStatus; -#define glCheckNamedFramebufferStatus glad_glCheckNamedFramebufferStatus -typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC)(GLuint framebuffer, GLenum pname, GLint *param); -GLAPI PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC glad_glGetNamedFramebufferParameteriv; -#define glGetNamedFramebufferParameteriv glad_glGetNamedFramebufferParameteriv -typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC)(GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); -GLAPI PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC glad_glGetNamedFramebufferAttachmentParameteriv; -#define glGetNamedFramebufferAttachmentParameteriv glad_glGetNamedFramebufferAttachmentParameteriv -typedef void (APIENTRYP PFNGLCREATERENDERBUFFERSPROC)(GLsizei n, GLuint *renderbuffers); -GLAPI PFNGLCREATERENDERBUFFERSPROC glad_glCreateRenderbuffers; -#define glCreateRenderbuffers glad_glCreateRenderbuffers -typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEPROC)(GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI PFNGLNAMEDRENDERBUFFERSTORAGEPROC glad_glNamedRenderbufferStorage; -#define glNamedRenderbufferStorage glad_glNamedRenderbufferStorage -typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC)(GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC glad_glNamedRenderbufferStorageMultisample; -#define glNamedRenderbufferStorageMultisample glad_glNamedRenderbufferStorageMultisample -typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC)(GLuint renderbuffer, GLenum pname, GLint *params); -GLAPI PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC glad_glGetNamedRenderbufferParameteriv; -#define glGetNamedRenderbufferParameteriv glad_glGetNamedRenderbufferParameteriv -typedef void (APIENTRYP PFNGLCREATETEXTURESPROC)(GLenum target, GLsizei n, GLuint *textures); -GLAPI PFNGLCREATETEXTURESPROC glad_glCreateTextures; -#define glCreateTextures glad_glCreateTextures -typedef void (APIENTRYP PFNGLTEXTUREBUFFERPROC)(GLuint texture, GLenum internalformat, GLuint buffer); -GLAPI PFNGLTEXTUREBUFFERPROC glad_glTextureBuffer; -#define glTextureBuffer glad_glTextureBuffer -typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEPROC)(GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI PFNGLTEXTUREBUFFERRANGEPROC glad_glTextureBufferRange; -#define glTextureBufferRange glad_glTextureBufferRange -typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DPROC)(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width); -GLAPI PFNGLTEXTURESTORAGE1DPROC glad_glTextureStorage1D; -#define glTextureStorage1D glad_glTextureStorage1D -typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DPROC)(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI PFNGLTEXTURESTORAGE2DPROC glad_glTextureStorage2D; -#define glTextureStorage2D glad_glTextureStorage2D -typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DPROC)(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -GLAPI PFNGLTEXTURESTORAGE3DPROC glad_glTextureStorage3D; -#define glTextureStorage3D glad_glTextureStorage3D -typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC)(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -GLAPI PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC glad_glTextureStorage2DMultisample; -#define glTextureStorage2DMultisample glad_glTextureStorage2DMultisample -typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC)(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -GLAPI PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC glad_glTextureStorage3DMultisample; -#define glTextureStorage3DMultisample glad_glTextureStorage3DMultisample -typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DPROC)(GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); -GLAPI PFNGLTEXTURESUBIMAGE1DPROC glad_glTextureSubImage1D; -#define glTextureSubImage1D glad_glTextureSubImage1D -typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -GLAPI PFNGLTEXTURESUBIMAGE2DPROC glad_glTextureSubImage2D; -#define glTextureSubImage2D glad_glTextureSubImage2D -typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -GLAPI PFNGLTEXTURESUBIMAGE3DPROC glad_glTextureSubImage3D; -#define glTextureSubImage3D glad_glTextureSubImage3D -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC)(GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); -GLAPI PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC glad_glCompressedTextureSubImage1D; -#define glCompressedTextureSubImage1D glad_glCompressedTextureSubImage1D -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); -GLAPI PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC glad_glCompressedTextureSubImage2D; -#define glCompressedTextureSubImage2D glad_glCompressedTextureSubImage2D -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); -GLAPI PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC glad_glCompressedTextureSubImage3D; -#define glCompressedTextureSubImage3D glad_glCompressedTextureSubImage3D -typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DPROC)(GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -GLAPI PFNGLCOPYTEXTURESUBIMAGE1DPROC glad_glCopyTextureSubImage1D; -#define glCopyTextureSubImage1D glad_glCopyTextureSubImage1D -typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI PFNGLCOPYTEXTURESUBIMAGE2DPROC glad_glCopyTextureSubImage2D; -#define glCopyTextureSubImage2D glad_glCopyTextureSubImage2D -typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI PFNGLCOPYTEXTURESUBIMAGE3DPROC glad_glCopyTextureSubImage3D; -#define glCopyTextureSubImage3D glad_glCopyTextureSubImage3D -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFPROC)(GLuint texture, GLenum pname, GLfloat param); -GLAPI PFNGLTEXTUREPARAMETERFPROC glad_glTextureParameterf; -#define glTextureParameterf glad_glTextureParameterf -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVPROC)(GLuint texture, GLenum pname, const GLfloat *param); -GLAPI PFNGLTEXTUREPARAMETERFVPROC glad_glTextureParameterfv; -#define glTextureParameterfv glad_glTextureParameterfv -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIPROC)(GLuint texture, GLenum pname, GLint param); -GLAPI PFNGLTEXTUREPARAMETERIPROC glad_glTextureParameteri; -#define glTextureParameteri glad_glTextureParameteri -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVPROC)(GLuint texture, GLenum pname, const GLint *params); -GLAPI PFNGLTEXTUREPARAMETERIIVPROC glad_glTextureParameterIiv; -#define glTextureParameterIiv glad_glTextureParameterIiv -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVPROC)(GLuint texture, GLenum pname, const GLuint *params); -GLAPI PFNGLTEXTUREPARAMETERIUIVPROC glad_glTextureParameterIuiv; -#define glTextureParameterIuiv glad_glTextureParameterIuiv -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVPROC)(GLuint texture, GLenum pname, const GLint *param); -GLAPI PFNGLTEXTUREPARAMETERIVPROC glad_glTextureParameteriv; -#define glTextureParameteriv glad_glTextureParameteriv -typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPPROC)(GLuint texture); -GLAPI PFNGLGENERATETEXTUREMIPMAPPROC glad_glGenerateTextureMipmap; -#define glGenerateTextureMipmap glad_glGenerateTextureMipmap -typedef void (APIENTRYP PFNGLBINDTEXTUREUNITPROC)(GLuint unit, GLuint texture); -GLAPI PFNGLBINDTEXTUREUNITPROC glad_glBindTextureUnit; -#define glBindTextureUnit glad_glBindTextureUnit -typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEPROC)(GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels); -GLAPI PFNGLGETTEXTUREIMAGEPROC glad_glGetTextureImage; -#define glGetTextureImage glad_glGetTextureImage -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC)(GLuint texture, GLint level, GLsizei bufSize, void *pixels); -GLAPI PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC glad_glGetCompressedTextureImage; -#define glGetCompressedTextureImage glad_glGetCompressedTextureImage -typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVPROC)(GLuint texture, GLint level, GLenum pname, GLfloat *params); -GLAPI PFNGLGETTEXTURELEVELPARAMETERFVPROC glad_glGetTextureLevelParameterfv; -#define glGetTextureLevelParameterfv glad_glGetTextureLevelParameterfv -typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVPROC)(GLuint texture, GLint level, GLenum pname, GLint *params); -GLAPI PFNGLGETTEXTURELEVELPARAMETERIVPROC glad_glGetTextureLevelParameteriv; -#define glGetTextureLevelParameteriv glad_glGetTextureLevelParameteriv -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVPROC)(GLuint texture, GLenum pname, GLfloat *params); -GLAPI PFNGLGETTEXTUREPARAMETERFVPROC glad_glGetTextureParameterfv; -#define glGetTextureParameterfv glad_glGetTextureParameterfv -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVPROC)(GLuint texture, GLenum pname, GLint *params); -GLAPI PFNGLGETTEXTUREPARAMETERIIVPROC glad_glGetTextureParameterIiv; -#define glGetTextureParameterIiv glad_glGetTextureParameterIiv -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVPROC)(GLuint texture, GLenum pname, GLuint *params); -GLAPI PFNGLGETTEXTUREPARAMETERIUIVPROC glad_glGetTextureParameterIuiv; -#define glGetTextureParameterIuiv glad_glGetTextureParameterIuiv -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVPROC)(GLuint texture, GLenum pname, GLint *params); -GLAPI PFNGLGETTEXTUREPARAMETERIVPROC glad_glGetTextureParameteriv; -#define glGetTextureParameteriv glad_glGetTextureParameteriv -typedef void (APIENTRYP PFNGLCREATEVERTEXARRAYSPROC)(GLsizei n, GLuint *arrays); -GLAPI PFNGLCREATEVERTEXARRAYSPROC glad_glCreateVertexArrays; -#define glCreateVertexArrays glad_glCreateVertexArrays -typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBPROC)(GLuint vaobj, GLuint index); -GLAPI PFNGLDISABLEVERTEXARRAYATTRIBPROC glad_glDisableVertexArrayAttrib; -#define glDisableVertexArrayAttrib glad_glDisableVertexArrayAttrib -typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBPROC)(GLuint vaobj, GLuint index); -GLAPI PFNGLENABLEVERTEXARRAYATTRIBPROC glad_glEnableVertexArrayAttrib; -#define glEnableVertexArrayAttrib glad_glEnableVertexArrayAttrib -typedef void (APIENTRYP PFNGLVERTEXARRAYELEMENTBUFFERPROC)(GLuint vaobj, GLuint buffer); -GLAPI PFNGLVERTEXARRAYELEMENTBUFFERPROC glad_glVertexArrayElementBuffer; -#define glVertexArrayElementBuffer glad_glVertexArrayElementBuffer -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERPROC)(GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); -GLAPI PFNGLVERTEXARRAYVERTEXBUFFERPROC glad_glVertexArrayVertexBuffer; -#define glVertexArrayVertexBuffer glad_glVertexArrayVertexBuffer -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERSPROC)(GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides); -GLAPI PFNGLVERTEXARRAYVERTEXBUFFERSPROC glad_glVertexArrayVertexBuffers; -#define glVertexArrayVertexBuffers glad_glVertexArrayVertexBuffers -typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBBINDINGPROC)(GLuint vaobj, GLuint attribindex, GLuint bindingindex); -GLAPI PFNGLVERTEXARRAYATTRIBBINDINGPROC glad_glVertexArrayAttribBinding; -#define glVertexArrayAttribBinding glad_glVertexArrayAttribBinding -typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBFORMATPROC)(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); -GLAPI PFNGLVERTEXARRAYATTRIBFORMATPROC glad_glVertexArrayAttribFormat; -#define glVertexArrayAttribFormat glad_glVertexArrayAttribFormat -typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBIFORMATPROC)(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -GLAPI PFNGLVERTEXARRAYATTRIBIFORMATPROC glad_glVertexArrayAttribIFormat; -#define glVertexArrayAttribIFormat glad_glVertexArrayAttribIFormat -typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBLFORMATPROC)(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -GLAPI PFNGLVERTEXARRAYATTRIBLFORMATPROC glad_glVertexArrayAttribLFormat; -#define glVertexArrayAttribLFormat glad_glVertexArrayAttribLFormat -typedef void (APIENTRYP PFNGLVERTEXARRAYBINDINGDIVISORPROC)(GLuint vaobj, GLuint bindingindex, GLuint divisor); -GLAPI PFNGLVERTEXARRAYBINDINGDIVISORPROC glad_glVertexArrayBindingDivisor; -#define glVertexArrayBindingDivisor glad_glVertexArrayBindingDivisor -typedef void (APIENTRYP PFNGLGETVERTEXARRAYIVPROC)(GLuint vaobj, GLenum pname, GLint *param); -GLAPI PFNGLGETVERTEXARRAYIVPROC glad_glGetVertexArrayiv; -#define glGetVertexArrayiv glad_glGetVertexArrayiv -typedef void (APIENTRYP PFNGLGETVERTEXARRAYINDEXEDIVPROC)(GLuint vaobj, GLuint index, GLenum pname, GLint *param); -GLAPI PFNGLGETVERTEXARRAYINDEXEDIVPROC glad_glGetVertexArrayIndexediv; -#define glGetVertexArrayIndexediv glad_glGetVertexArrayIndexediv -typedef void (APIENTRYP PFNGLGETVERTEXARRAYINDEXED64IVPROC)(GLuint vaobj, GLuint index, GLenum pname, GLint64 *param); -GLAPI PFNGLGETVERTEXARRAYINDEXED64IVPROC glad_glGetVertexArrayIndexed64iv; -#define glGetVertexArrayIndexed64iv glad_glGetVertexArrayIndexed64iv -typedef void (APIENTRYP PFNGLCREATESAMPLERSPROC)(GLsizei n, GLuint *samplers); -GLAPI PFNGLCREATESAMPLERSPROC glad_glCreateSamplers; -#define glCreateSamplers glad_glCreateSamplers -typedef void (APIENTRYP PFNGLCREATEPROGRAMPIPELINESPROC)(GLsizei n, GLuint *pipelines); -GLAPI PFNGLCREATEPROGRAMPIPELINESPROC glad_glCreateProgramPipelines; -#define glCreateProgramPipelines glad_glCreateProgramPipelines -typedef void (APIENTRYP PFNGLCREATEQUERIESPROC)(GLenum target, GLsizei n, GLuint *ids); -GLAPI PFNGLCREATEQUERIESPROC glad_glCreateQueries; -#define glCreateQueries glad_glCreateQueries -typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTI64VPROC)(GLuint id, GLuint buffer, GLenum pname, GLintptr offset); -GLAPI PFNGLGETQUERYBUFFEROBJECTI64VPROC glad_glGetQueryBufferObjecti64v; -#define glGetQueryBufferObjecti64v glad_glGetQueryBufferObjecti64v -typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTIVPROC)(GLuint id, GLuint buffer, GLenum pname, GLintptr offset); -GLAPI PFNGLGETQUERYBUFFEROBJECTIVPROC glad_glGetQueryBufferObjectiv; -#define glGetQueryBufferObjectiv glad_glGetQueryBufferObjectiv -typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTUI64VPROC)(GLuint id, GLuint buffer, GLenum pname, GLintptr offset); -GLAPI PFNGLGETQUERYBUFFEROBJECTUI64VPROC glad_glGetQueryBufferObjectui64v; -#define glGetQueryBufferObjectui64v glad_glGetQueryBufferObjectui64v -typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTUIVPROC)(GLuint id, GLuint buffer, GLenum pname, GLintptr offset); -GLAPI PFNGLGETQUERYBUFFEROBJECTUIVPROC glad_glGetQueryBufferObjectuiv; -#define glGetQueryBufferObjectuiv glad_glGetQueryBufferObjectuiv -typedef void (APIENTRYP PFNGLMEMORYBARRIERBYREGIONPROC)(GLbitfield barriers); -GLAPI PFNGLMEMORYBARRIERBYREGIONPROC glad_glMemoryBarrierByRegion; -#define glMemoryBarrierByRegion glad_glMemoryBarrierByRegion -typedef void (APIENTRYP PFNGLGETTEXTURESUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels); -GLAPI PFNGLGETTEXTURESUBIMAGEPROC glad_glGetTextureSubImage; -#define glGetTextureSubImage glad_glGetTextureSubImage -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels); -GLAPI PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC glad_glGetCompressedTextureSubImage; -#define glGetCompressedTextureSubImage glad_glGetCompressedTextureSubImage -typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSPROC)(void); -GLAPI PFNGLGETGRAPHICSRESETSTATUSPROC glad_glGetGraphicsResetStatus; -#define glGetGraphicsResetStatus glad_glGetGraphicsResetStatus -typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEPROC)(GLenum target, GLint lod, GLsizei bufSize, void *pixels); -GLAPI PFNGLGETNCOMPRESSEDTEXIMAGEPROC glad_glGetnCompressedTexImage; -#define glGetnCompressedTexImage glad_glGetnCompressedTexImage -typedef void (APIENTRYP PFNGLGETNTEXIMAGEPROC)(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels); -GLAPI PFNGLGETNTEXIMAGEPROC glad_glGetnTexImage; -#define glGetnTexImage glad_glGetnTexImage -typedef void (APIENTRYP PFNGLGETNUNIFORMDVPROC)(GLuint program, GLint location, GLsizei bufSize, GLdouble *params); -GLAPI PFNGLGETNUNIFORMDVPROC glad_glGetnUniformdv; -#define glGetnUniformdv glad_glGetnUniformdv -typedef void (APIENTRYP PFNGLGETNUNIFORMFVPROC)(GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -GLAPI PFNGLGETNUNIFORMFVPROC glad_glGetnUniformfv; -#define glGetnUniformfv glad_glGetnUniformfv -typedef void (APIENTRYP PFNGLGETNUNIFORMIVPROC)(GLuint program, GLint location, GLsizei bufSize, GLint *params); -GLAPI PFNGLGETNUNIFORMIVPROC glad_glGetnUniformiv; -#define glGetnUniformiv glad_glGetnUniformiv -typedef void (APIENTRYP PFNGLGETNUNIFORMUIVPROC)(GLuint program, GLint location, GLsizei bufSize, GLuint *params); -GLAPI PFNGLGETNUNIFORMUIVPROC glad_glGetnUniformuiv; -#define glGetnUniformuiv glad_glGetnUniformuiv -typedef void (APIENTRYP PFNGLREADNPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); -GLAPI PFNGLREADNPIXELSPROC glad_glReadnPixels; -#define glReadnPixels glad_glReadnPixels -typedef void (APIENTRYP PFNGLGETNMAPDVPROC)(GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); -GLAPI PFNGLGETNMAPDVPROC glad_glGetnMapdv; -#define glGetnMapdv glad_glGetnMapdv -typedef void (APIENTRYP PFNGLGETNMAPFVPROC)(GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); -GLAPI PFNGLGETNMAPFVPROC glad_glGetnMapfv; -#define glGetnMapfv glad_glGetnMapfv -typedef void (APIENTRYP PFNGLGETNMAPIVPROC)(GLenum target, GLenum query, GLsizei bufSize, GLint *v); -GLAPI PFNGLGETNMAPIVPROC glad_glGetnMapiv; -#define glGetnMapiv glad_glGetnMapiv -typedef void (APIENTRYP PFNGLGETNPIXELMAPFVPROC)(GLenum map, GLsizei bufSize, GLfloat *values); -GLAPI PFNGLGETNPIXELMAPFVPROC glad_glGetnPixelMapfv; -#define glGetnPixelMapfv glad_glGetnPixelMapfv -typedef void (APIENTRYP PFNGLGETNPIXELMAPUIVPROC)(GLenum map, GLsizei bufSize, GLuint *values); -GLAPI PFNGLGETNPIXELMAPUIVPROC glad_glGetnPixelMapuiv; -#define glGetnPixelMapuiv glad_glGetnPixelMapuiv -typedef void (APIENTRYP PFNGLGETNPIXELMAPUSVPROC)(GLenum map, GLsizei bufSize, GLushort *values); -GLAPI PFNGLGETNPIXELMAPUSVPROC glad_glGetnPixelMapusv; -#define glGetnPixelMapusv glad_glGetnPixelMapusv -typedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEPROC)(GLsizei bufSize, GLubyte *pattern); -GLAPI PFNGLGETNPOLYGONSTIPPLEPROC glad_glGetnPolygonStipple; -#define glGetnPolygonStipple glad_glGetnPolygonStipple -typedef void (APIENTRYP PFNGLGETNCOLORTABLEPROC)(GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table); -GLAPI PFNGLGETNCOLORTABLEPROC glad_glGetnColorTable; -#define glGetnColorTable glad_glGetnColorTable -typedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERPROC)(GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image); -GLAPI PFNGLGETNCONVOLUTIONFILTERPROC glad_glGetnConvolutionFilter; -#define glGetnConvolutionFilter glad_glGetnConvolutionFilter -typedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERPROC)(GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span); -GLAPI PFNGLGETNSEPARABLEFILTERPROC glad_glGetnSeparableFilter; -#define glGetnSeparableFilter glad_glGetnSeparableFilter -typedef void (APIENTRYP PFNGLGETNHISTOGRAMPROC)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); -GLAPI PFNGLGETNHISTOGRAMPROC glad_glGetnHistogram; -#define glGetnHistogram glad_glGetnHistogram -typedef void (APIENTRYP PFNGLGETNMINMAXPROC)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); -GLAPI PFNGLGETNMINMAXPROC glad_glGetnMinmax; -#define glGetnMinmax glad_glGetnMinmax -typedef void (APIENTRYP PFNGLTEXTUREBARRIERPROC)(void); -GLAPI PFNGLTEXTUREBARRIERPROC glad_glTextureBarrier; -#define glTextureBarrier glad_glTextureBarrier -#endif - -#ifdef __cplusplus -} -#endif - -#endif +/* + + OpenGL loader generated by glad 0.1.29 on Wed Apr 3 21:28:46 2019. + + Language/Generator: C/C++ + Specification: gl + APIs: gl=4.5 + Profile: core + Extensions: + + Loader: True + Local files: False + Omit khrplatform: False + Reproducible: False + + Commandline: + --profile="core" --api="gl=4.5" --generator="c" --spec="gl" --extensions="" + Online: + https://glad.dav1d.de/#profile=core&language=c&specification=gl&loader=on&api=gl%3D4.5 +*/ + + +#ifndef __glad_h_ +#define __glad_h_ + +#ifdef __gl_h_ +#error OpenGL header already included, remove this include, glad already provides it +#endif +#define __gl_h_ + +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN 1 +#endif +#ifndef NOMINMAX +#define NOMINMAX 1 +#endif +#include +#endif + +#ifndef APIENTRY +#define APIENTRY +#endif +#ifndef APIENTRYP +#define APIENTRYP APIENTRY * +#endif + +#ifndef GLAPIENTRY +#define GLAPIENTRY APIENTRY +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +struct gladGLversionStruct { + int major; + int minor; +}; + +typedef void* (* GLADloadproc)(const char *name); + +#ifndef GLAPI +# if defined(GLAD_GLAPI_EXPORT) +# if defined(_WIN32) || defined(__CYGWIN__) +# if defined(GLAD_GLAPI_EXPORT_BUILD) +# if defined(__GNUC__) +# define GLAPI __attribute__ ((dllexport)) extern +# else +# define GLAPI __declspec(dllexport) extern +# endif +# else +# if defined(__GNUC__) +# define GLAPI __attribute__ ((dllimport)) extern +# else +# define GLAPI __declspec(dllimport) extern +# endif +# endif +# elif defined(__GNUC__) && defined(GLAD_GLAPI_EXPORT_BUILD) +# define GLAPI __attribute__ ((visibility ("default"))) extern +# else +# define GLAPI extern +# endif +# else +# define GLAPI extern +# endif +#endif + +GLAPI struct gladGLversionStruct GLVersion; + +GLAPI int gladLoadGL(void); + +GLAPI int gladLoadGLLoader(GLADloadproc); + +#include +typedef unsigned int GLenum; +typedef unsigned char GLboolean; +typedef unsigned int GLbitfield; +typedef void GLvoid; +typedef khronos_int8_t GLbyte; +typedef khronos_uint8_t GLubyte; +typedef khronos_int16_t GLshort; +typedef khronos_uint16_t GLushort; +typedef int GLint; +typedef unsigned int GLuint; +typedef khronos_int32_t GLclampx; +typedef int GLsizei; +typedef khronos_float_t GLfloat; +typedef khronos_float_t GLclampf; +typedef double GLdouble; +typedef double GLclampd; +typedef void *GLeglClientBufferEXT; +typedef void *GLeglImageOES; +typedef char GLchar; +typedef char GLcharARB; +#ifdef __APPLE__ +typedef void *GLhandleARB; +#else +typedef unsigned int GLhandleARB; +#endif +typedef khronos_uint16_t GLhalf; +typedef khronos_uint16_t GLhalfARB; +typedef khronos_int32_t GLfixed; +typedef khronos_intptr_t GLintptr; +typedef khronos_intptr_t GLintptrARB; +typedef khronos_ssize_t GLsizeiptr; +typedef khronos_ssize_t GLsizeiptrARB; +typedef khronos_int64_t GLint64; +typedef khronos_int64_t GLint64EXT; +typedef khronos_uint64_t GLuint64; +typedef khronos_uint64_t GLuint64EXT; +typedef struct __GLsync *GLsync; +struct _cl_context; +struct _cl_event; +typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); +typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); +typedef void (APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); +typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam); +typedef unsigned short GLhalfNV; +typedef GLintptr GLvdpauSurfaceNV; +typedef void (APIENTRY *GLVULKANPROCNV)(void); +#define GL_DEPTH_BUFFER_BIT 0x00000100 +#define GL_STENCIL_BUFFER_BIT 0x00000400 +#define GL_COLOR_BUFFER_BIT 0x00004000 +#define GL_FALSE 0 +#define GL_TRUE 1 +#define GL_POINTS 0x0000 +#define GL_LINES 0x0001 +#define GL_LINE_LOOP 0x0002 +#define GL_LINE_STRIP 0x0003 +#define GL_TRIANGLES 0x0004 +#define GL_TRIANGLE_STRIP 0x0005 +#define GL_TRIANGLE_FAN 0x0006 +#define GL_NEVER 0x0200 +#define GL_LESS 0x0201 +#define GL_EQUAL 0x0202 +#define GL_LEQUAL 0x0203 +#define GL_GREATER 0x0204 +#define GL_NOTEQUAL 0x0205 +#define GL_GEQUAL 0x0206 +#define GL_ALWAYS 0x0207 +#define GL_ZERO 0 +#define GL_ONE 1 +#define GL_SRC_COLOR 0x0300 +#define GL_ONE_MINUS_SRC_COLOR 0x0301 +#define GL_SRC_ALPHA 0x0302 +#define GL_ONE_MINUS_SRC_ALPHA 0x0303 +#define GL_DST_ALPHA 0x0304 +#define GL_ONE_MINUS_DST_ALPHA 0x0305 +#define GL_DST_COLOR 0x0306 +#define GL_ONE_MINUS_DST_COLOR 0x0307 +#define GL_SRC_ALPHA_SATURATE 0x0308 +#define GL_NONE 0 +#define GL_FRONT_LEFT 0x0400 +#define GL_FRONT_RIGHT 0x0401 +#define GL_BACK_LEFT 0x0402 +#define GL_BACK_RIGHT 0x0403 +#define GL_FRONT 0x0404 +#define GL_BACK 0x0405 +#define GL_LEFT 0x0406 +#define GL_RIGHT 0x0407 +#define GL_FRONT_AND_BACK 0x0408 +#define GL_NO_ERROR 0 +#define GL_INVALID_ENUM 0x0500 +#define GL_INVALID_VALUE 0x0501 +#define GL_INVALID_OPERATION 0x0502 +#define GL_OUT_OF_MEMORY 0x0505 +#define GL_CW 0x0900 +#define GL_CCW 0x0901 +#define GL_POINT_SIZE 0x0B11 +#define GL_POINT_SIZE_RANGE 0x0B12 +#define GL_POINT_SIZE_GRANULARITY 0x0B13 +#define GL_LINE_SMOOTH 0x0B20 +#define GL_LINE_WIDTH 0x0B21 +#define GL_LINE_WIDTH_RANGE 0x0B22 +#define GL_LINE_WIDTH_GRANULARITY 0x0B23 +#define GL_POLYGON_MODE 0x0B40 +#define GL_POLYGON_SMOOTH 0x0B41 +#define GL_CULL_FACE 0x0B44 +#define GL_CULL_FACE_MODE 0x0B45 +#define GL_FRONT_FACE 0x0B46 +#define GL_DEPTH_RANGE 0x0B70 +#define GL_DEPTH_TEST 0x0B71 +#define GL_DEPTH_WRITEMASK 0x0B72 +#define GL_DEPTH_CLEAR_VALUE 0x0B73 +#define GL_DEPTH_FUNC 0x0B74 +#define GL_STENCIL_TEST 0x0B90 +#define GL_STENCIL_CLEAR_VALUE 0x0B91 +#define GL_STENCIL_FUNC 0x0B92 +#define GL_STENCIL_VALUE_MASK 0x0B93 +#define GL_STENCIL_FAIL 0x0B94 +#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 +#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 +#define GL_STENCIL_REF 0x0B97 +#define GL_STENCIL_WRITEMASK 0x0B98 +#define GL_VIEWPORT 0x0BA2 +#define GL_DITHER 0x0BD0 +#define GL_BLEND_DST 0x0BE0 +#define GL_BLEND_SRC 0x0BE1 +#define GL_BLEND 0x0BE2 +#define GL_LOGIC_OP_MODE 0x0BF0 +#define GL_DRAW_BUFFER 0x0C01 +#define GL_READ_BUFFER 0x0C02 +#define GL_SCISSOR_BOX 0x0C10 +#define GL_SCISSOR_TEST 0x0C11 +#define GL_COLOR_CLEAR_VALUE 0x0C22 +#define GL_COLOR_WRITEMASK 0x0C23 +#define GL_DOUBLEBUFFER 0x0C32 +#define GL_STEREO 0x0C33 +#define GL_LINE_SMOOTH_HINT 0x0C52 +#define GL_POLYGON_SMOOTH_HINT 0x0C53 +#define GL_UNPACK_SWAP_BYTES 0x0CF0 +#define GL_UNPACK_LSB_FIRST 0x0CF1 +#define GL_UNPACK_ROW_LENGTH 0x0CF2 +#define GL_UNPACK_SKIP_ROWS 0x0CF3 +#define GL_UNPACK_SKIP_PIXELS 0x0CF4 +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_SWAP_BYTES 0x0D00 +#define GL_PACK_LSB_FIRST 0x0D01 +#define GL_PACK_ROW_LENGTH 0x0D02 +#define GL_PACK_SKIP_ROWS 0x0D03 +#define GL_PACK_SKIP_PIXELS 0x0D04 +#define GL_PACK_ALIGNMENT 0x0D05 +#define GL_MAX_TEXTURE_SIZE 0x0D33 +#define GL_MAX_VIEWPORT_DIMS 0x0D3A +#define GL_SUBPIXEL_BITS 0x0D50 +#define GL_TEXTURE_1D 0x0DE0 +#define GL_TEXTURE_2D 0x0DE1 +#define GL_TEXTURE_WIDTH 0x1000 +#define GL_TEXTURE_HEIGHT 0x1001 +#define GL_TEXTURE_BORDER_COLOR 0x1004 +#define GL_DONT_CARE 0x1100 +#define GL_FASTEST 0x1101 +#define GL_NICEST 0x1102 +#define GL_BYTE 0x1400 +#define GL_UNSIGNED_BYTE 0x1401 +#define GL_SHORT 0x1402 +#define GL_UNSIGNED_SHORT 0x1403 +#define GL_INT 0x1404 +#define GL_UNSIGNED_INT 0x1405 +#define GL_FLOAT 0x1406 +#define GL_CLEAR 0x1500 +#define GL_AND 0x1501 +#define GL_AND_REVERSE 0x1502 +#define GL_COPY 0x1503 +#define GL_AND_INVERTED 0x1504 +#define GL_NOOP 0x1505 +#define GL_XOR 0x1506 +#define GL_OR 0x1507 +#define GL_NOR 0x1508 +#define GL_EQUIV 0x1509 +#define GL_INVERT 0x150A +#define GL_OR_REVERSE 0x150B +#define GL_COPY_INVERTED 0x150C +#define GL_OR_INVERTED 0x150D +#define GL_NAND 0x150E +#define GL_SET 0x150F +#define GL_TEXTURE 0x1702 +#define GL_COLOR 0x1800 +#define GL_DEPTH 0x1801 +#define GL_STENCIL 0x1802 +#define GL_STENCIL_INDEX 0x1901 +#define GL_DEPTH_COMPONENT 0x1902 +#define GL_RED 0x1903 +#define GL_GREEN 0x1904 +#define GL_BLUE 0x1905 +#define GL_ALPHA 0x1906 +#define GL_RGB 0x1907 +#define GL_RGBA 0x1908 +#define GL_POINT 0x1B00 +#define GL_LINE 0x1B01 +#define GL_FILL 0x1B02 +#define GL_KEEP 0x1E00 +#define GL_REPLACE 0x1E01 +#define GL_INCR 0x1E02 +#define GL_DECR 0x1E03 +#define GL_VENDOR 0x1F00 +#define GL_RENDERER 0x1F01 +#define GL_VERSION 0x1F02 +#define GL_EXTENSIONS 0x1F03 +#define GL_NEAREST 0x2600 +#define GL_LINEAR 0x2601 +#define GL_NEAREST_MIPMAP_NEAREST 0x2700 +#define GL_LINEAR_MIPMAP_NEAREST 0x2701 +#define GL_NEAREST_MIPMAP_LINEAR 0x2702 +#define GL_LINEAR_MIPMAP_LINEAR 0x2703 +#define GL_TEXTURE_MAG_FILTER 0x2800 +#define GL_TEXTURE_MIN_FILTER 0x2801 +#define GL_TEXTURE_WRAP_S 0x2802 +#define GL_TEXTURE_WRAP_T 0x2803 +#define GL_REPEAT 0x2901 +#define GL_COLOR_LOGIC_OP 0x0BF2 +#define GL_POLYGON_OFFSET_UNITS 0x2A00 +#define GL_POLYGON_OFFSET_POINT 0x2A01 +#define GL_POLYGON_OFFSET_LINE 0x2A02 +#define GL_POLYGON_OFFSET_FILL 0x8037 +#define GL_POLYGON_OFFSET_FACTOR 0x8038 +#define GL_TEXTURE_BINDING_1D 0x8068 +#define GL_TEXTURE_BINDING_2D 0x8069 +#define GL_TEXTURE_INTERNAL_FORMAT 0x1003 +#define GL_TEXTURE_RED_SIZE 0x805C +#define GL_TEXTURE_GREEN_SIZE 0x805D +#define GL_TEXTURE_BLUE_SIZE 0x805E +#define GL_TEXTURE_ALPHA_SIZE 0x805F +#define GL_DOUBLE 0x140A +#define GL_PROXY_TEXTURE_1D 0x8063 +#define GL_PROXY_TEXTURE_2D 0x8064 +#define GL_R3_G3_B2 0x2A10 +#define GL_RGB4 0x804F +#define GL_RGB5 0x8050 +#define GL_RGB8 0x8051 +#define GL_RGB10 0x8052 +#define GL_RGB12 0x8053 +#define GL_RGB16 0x8054 +#define GL_RGBA2 0x8055 +#define GL_RGBA4 0x8056 +#define GL_RGB5_A1 0x8057 +#define GL_RGBA8 0x8058 +#define GL_RGB10_A2 0x8059 +#define GL_RGBA12 0x805A +#define GL_RGBA16 0x805B +#define GL_UNSIGNED_BYTE_3_3_2 0x8032 +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_INT_8_8_8_8 0x8035 +#define GL_UNSIGNED_INT_10_10_10_2 0x8036 +#define GL_TEXTURE_BINDING_3D 0x806A +#define GL_PACK_SKIP_IMAGES 0x806B +#define GL_PACK_IMAGE_HEIGHT 0x806C +#define GL_UNPACK_SKIP_IMAGES 0x806D +#define GL_UNPACK_IMAGE_HEIGHT 0x806E +#define GL_TEXTURE_3D 0x806F +#define GL_PROXY_TEXTURE_3D 0x8070 +#define GL_TEXTURE_DEPTH 0x8071 +#define GL_TEXTURE_WRAP_R 0x8072 +#define GL_MAX_3D_TEXTURE_SIZE 0x8073 +#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 +#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 +#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 +#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 +#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 +#define GL_BGR 0x80E0 +#define GL_BGRA 0x80E1 +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENTS_INDICES 0x80E9 +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_TEXTURE_MIN_LOD 0x813A +#define GL_TEXTURE_MAX_LOD 0x813B +#define GL_TEXTURE_BASE_LEVEL 0x813C +#define GL_TEXTURE_MAX_LEVEL 0x813D +#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 +#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 +#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 +#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_MULTISAMPLE 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE 0x809F +#define GL_SAMPLE_COVERAGE 0x80A0 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB +#define GL_TEXTURE_CUBE_MAP 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C +#define GL_COMPRESSED_RGB 0x84ED +#define GL_COMPRESSED_RGBA 0x84EE +#define GL_TEXTURE_COMPRESSION_HINT 0x84EF +#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 +#define GL_TEXTURE_COMPRESSED 0x86A1 +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 +#define GL_CLAMP_TO_BORDER 0x812D +#define GL_BLEND_DST_RGB 0x80C8 +#define GL_BLEND_SRC_RGB 0x80C9 +#define GL_BLEND_DST_ALPHA 0x80CA +#define GL_BLEND_SRC_ALPHA 0x80CB +#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 +#define GL_DEPTH_COMPONENT16 0x81A5 +#define GL_DEPTH_COMPONENT24 0x81A6 +#define GL_DEPTH_COMPONENT32 0x81A7 +#define GL_MIRRORED_REPEAT 0x8370 +#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD +#define GL_TEXTURE_LOD_BIAS 0x8501 +#define GL_INCR_WRAP 0x8507 +#define GL_DECR_WRAP 0x8508 +#define GL_TEXTURE_DEPTH_SIZE 0x884A +#define GL_TEXTURE_COMPARE_MODE 0x884C +#define GL_TEXTURE_COMPARE_FUNC 0x884D +#define GL_BLEND_COLOR 0x8005 +#define GL_BLEND_EQUATION 0x8009 +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_FUNC_ADD 0x8006 +#define GL_FUNC_REVERSE_SUBTRACT 0x800B +#define GL_FUNC_SUBTRACT 0x800A +#define GL_MIN 0x8007 +#define GL_MAX 0x8008 +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 +#define GL_QUERY_COUNTER_BITS 0x8864 +#define GL_CURRENT_QUERY 0x8865 +#define GL_QUERY_RESULT 0x8866 +#define GL_QUERY_RESULT_AVAILABLE 0x8867 +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F +#define GL_READ_ONLY 0x88B8 +#define GL_WRITE_ONLY 0x88B9 +#define GL_READ_WRITE 0x88BA +#define GL_BUFFER_ACCESS 0x88BB +#define GL_BUFFER_MAPPED 0x88BC +#define GL_BUFFER_MAP_POINTER 0x88BD +#define GL_STREAM_DRAW 0x88E0 +#define GL_STREAM_READ 0x88E1 +#define GL_STREAM_COPY 0x88E2 +#define GL_STATIC_DRAW 0x88E4 +#define GL_STATIC_READ 0x88E5 +#define GL_STATIC_COPY 0x88E6 +#define GL_DYNAMIC_DRAW 0x88E8 +#define GL_DYNAMIC_READ 0x88E9 +#define GL_DYNAMIC_COPY 0x88EA +#define GL_SAMPLES_PASSED 0x8914 +#define GL_SRC1_ALPHA 0x8589 +#define GL_BLEND_EQUATION_RGB 0x8009 +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 +#define GL_CURRENT_VERTEX_ATTRIB 0x8626 +#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 +#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 +#define GL_STENCIL_BACK_FUNC 0x8800 +#define GL_STENCIL_BACK_FAIL 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 +#define GL_MAX_DRAW_BUFFERS 0x8824 +#define GL_DRAW_BUFFER0 0x8825 +#define GL_DRAW_BUFFER1 0x8826 +#define GL_DRAW_BUFFER2 0x8827 +#define GL_DRAW_BUFFER3 0x8828 +#define GL_DRAW_BUFFER4 0x8829 +#define GL_DRAW_BUFFER5 0x882A +#define GL_DRAW_BUFFER6 0x882B +#define GL_DRAW_BUFFER7 0x882C +#define GL_DRAW_BUFFER8 0x882D +#define GL_DRAW_BUFFER9 0x882E +#define GL_DRAW_BUFFER10 0x882F +#define GL_DRAW_BUFFER11 0x8830 +#define GL_DRAW_BUFFER12 0x8831 +#define GL_DRAW_BUFFER13 0x8832 +#define GL_DRAW_BUFFER14 0x8833 +#define GL_DRAW_BUFFER15 0x8834 +#define GL_BLEND_EQUATION_ALPHA 0x883D +#define GL_MAX_VERTEX_ATTRIBS 0x8869 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A +#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 +#define GL_FRAGMENT_SHADER 0x8B30 +#define GL_VERTEX_SHADER 0x8B31 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A +#define GL_MAX_VARYING_FLOATS 0x8B4B +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D +#define GL_SHADER_TYPE 0x8B4F +#define GL_FLOAT_VEC2 0x8B50 +#define GL_FLOAT_VEC3 0x8B51 +#define GL_FLOAT_VEC4 0x8B52 +#define GL_INT_VEC2 0x8B53 +#define GL_INT_VEC3 0x8B54 +#define GL_INT_VEC4 0x8B55 +#define GL_BOOL 0x8B56 +#define GL_BOOL_VEC2 0x8B57 +#define GL_BOOL_VEC3 0x8B58 +#define GL_BOOL_VEC4 0x8B59 +#define GL_FLOAT_MAT2 0x8B5A +#define GL_FLOAT_MAT3 0x8B5B +#define GL_FLOAT_MAT4 0x8B5C +#define GL_SAMPLER_1D 0x8B5D +#define GL_SAMPLER_2D 0x8B5E +#define GL_SAMPLER_3D 0x8B5F +#define GL_SAMPLER_CUBE 0x8B60 +#define GL_SAMPLER_1D_SHADOW 0x8B61 +#define GL_SAMPLER_2D_SHADOW 0x8B62 +#define GL_DELETE_STATUS 0x8B80 +#define GL_COMPILE_STATUS 0x8B81 +#define GL_LINK_STATUS 0x8B82 +#define GL_VALIDATE_STATUS 0x8B83 +#define GL_INFO_LOG_LENGTH 0x8B84 +#define GL_ATTACHED_SHADERS 0x8B85 +#define GL_ACTIVE_UNIFORMS 0x8B86 +#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 +#define GL_SHADER_SOURCE_LENGTH 0x8B88 +#define GL_ACTIVE_ATTRIBUTES 0x8B89 +#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B +#define GL_SHADING_LANGUAGE_VERSION 0x8B8C +#define GL_CURRENT_PROGRAM 0x8B8D +#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 +#define GL_LOWER_LEFT 0x8CA1 +#define GL_UPPER_LEFT 0x8CA2 +#define GL_STENCIL_BACK_REF 0x8CA3 +#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 +#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 +#define GL_PIXEL_PACK_BUFFER 0x88EB +#define GL_PIXEL_UNPACK_BUFFER 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF +#define GL_FLOAT_MAT2x3 0x8B65 +#define GL_FLOAT_MAT2x4 0x8B66 +#define GL_FLOAT_MAT3x2 0x8B67 +#define GL_FLOAT_MAT3x4 0x8B68 +#define GL_FLOAT_MAT4x2 0x8B69 +#define GL_FLOAT_MAT4x3 0x8B6A +#define GL_SRGB 0x8C40 +#define GL_SRGB8 0x8C41 +#define GL_SRGB_ALPHA 0x8C42 +#define GL_SRGB8_ALPHA8 0x8C43 +#define GL_COMPRESSED_SRGB 0x8C48 +#define GL_COMPRESSED_SRGB_ALPHA 0x8C49 +#define GL_COMPARE_REF_TO_TEXTURE 0x884E +#define GL_CLIP_DISTANCE0 0x3000 +#define GL_CLIP_DISTANCE1 0x3001 +#define GL_CLIP_DISTANCE2 0x3002 +#define GL_CLIP_DISTANCE3 0x3003 +#define GL_CLIP_DISTANCE4 0x3004 +#define GL_CLIP_DISTANCE5 0x3005 +#define GL_CLIP_DISTANCE6 0x3006 +#define GL_CLIP_DISTANCE7 0x3007 +#define GL_MAX_CLIP_DISTANCES 0x0D32 +#define GL_MAJOR_VERSION 0x821B +#define GL_MINOR_VERSION 0x821C +#define GL_NUM_EXTENSIONS 0x821D +#define GL_CONTEXT_FLAGS 0x821E +#define GL_COMPRESSED_RED 0x8225 +#define GL_COMPRESSED_RG 0x8226 +#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001 +#define GL_RGBA32F 0x8814 +#define GL_RGB32F 0x8815 +#define GL_RGBA16F 0x881A +#define GL_RGB16F 0x881B +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD +#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF +#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 +#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 +#define GL_CLAMP_READ_COLOR 0x891C +#define GL_FIXED_ONLY 0x891D +#define GL_MAX_VARYING_COMPONENTS 0x8B4B +#define GL_TEXTURE_1D_ARRAY 0x8C18 +#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19 +#define GL_TEXTURE_2D_ARRAY 0x8C1A +#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B +#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C +#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D +#define GL_R11F_G11F_B10F 0x8C3A +#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B +#define GL_RGB9_E5 0x8C3D +#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E +#define GL_TEXTURE_SHARED_SIZE 0x8C3F +#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 +#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 +#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 +#define GL_PRIMITIVES_GENERATED 0x8C87 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 +#define GL_RASTERIZER_DISCARD 0x8C89 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B +#define GL_INTERLEAVED_ATTRIBS 0x8C8C +#define GL_SEPARATE_ATTRIBS 0x8C8D +#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F +#define GL_RGBA32UI 0x8D70 +#define GL_RGB32UI 0x8D71 +#define GL_RGBA16UI 0x8D76 +#define GL_RGB16UI 0x8D77 +#define GL_RGBA8UI 0x8D7C +#define GL_RGB8UI 0x8D7D +#define GL_RGBA32I 0x8D82 +#define GL_RGB32I 0x8D83 +#define GL_RGBA16I 0x8D88 +#define GL_RGB16I 0x8D89 +#define GL_RGBA8I 0x8D8E +#define GL_RGB8I 0x8D8F +#define GL_RED_INTEGER 0x8D94 +#define GL_GREEN_INTEGER 0x8D95 +#define GL_BLUE_INTEGER 0x8D96 +#define GL_RGB_INTEGER 0x8D98 +#define GL_RGBA_INTEGER 0x8D99 +#define GL_BGR_INTEGER 0x8D9A +#define GL_BGRA_INTEGER 0x8D9B +#define GL_SAMPLER_1D_ARRAY 0x8DC0 +#define GL_SAMPLER_2D_ARRAY 0x8DC1 +#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3 +#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 +#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 +#define GL_UNSIGNED_INT_VEC2 0x8DC6 +#define GL_UNSIGNED_INT_VEC3 0x8DC7 +#define GL_UNSIGNED_INT_VEC4 0x8DC8 +#define GL_INT_SAMPLER_1D 0x8DC9 +#define GL_INT_SAMPLER_2D 0x8DCA +#define GL_INT_SAMPLER_3D 0x8DCB +#define GL_INT_SAMPLER_CUBE 0x8DCC +#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE +#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF +#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1 +#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 +#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 +#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 +#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6 +#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 +#define GL_QUERY_WAIT 0x8E13 +#define GL_QUERY_NO_WAIT 0x8E14 +#define GL_QUERY_BY_REGION_WAIT 0x8E15 +#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16 +#define GL_BUFFER_ACCESS_FLAGS 0x911F +#define GL_BUFFER_MAP_LENGTH 0x9120 +#define GL_BUFFER_MAP_OFFSET 0x9121 +#define GL_DEPTH_COMPONENT32F 0x8CAC +#define GL_DEPTH32F_STENCIL8 0x8CAD +#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD +#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 +#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 +#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 +#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 +#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 +#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 +#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 +#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 +#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 +#define GL_FRAMEBUFFER_DEFAULT 0x8218 +#define GL_FRAMEBUFFER_UNDEFINED 0x8219 +#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A +#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 +#define GL_DEPTH_STENCIL 0x84F9 +#define GL_UNSIGNED_INT_24_8 0x84FA +#define GL_DEPTH24_STENCIL8 0x88F0 +#define GL_TEXTURE_STENCIL_SIZE 0x88F1 +#define GL_TEXTURE_RED_TYPE 0x8C10 +#define GL_TEXTURE_GREEN_TYPE 0x8C11 +#define GL_TEXTURE_BLUE_TYPE 0x8C12 +#define GL_TEXTURE_ALPHA_TYPE 0x8C13 +#define GL_TEXTURE_DEPTH_TYPE 0x8C16 +#define GL_UNSIGNED_NORMALIZED 0x8C17 +#define GL_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_RENDERBUFFER_BINDING 0x8CA7 +#define GL_READ_FRAMEBUFFER 0x8CA8 +#define GL_DRAW_FRAMEBUFFER 0x8CA9 +#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA +#define GL_RENDERBUFFER_SAMPLES 0x8CAB +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 +#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB +#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC +#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD +#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF +#define GL_COLOR_ATTACHMENT0 0x8CE0 +#define GL_COLOR_ATTACHMENT1 0x8CE1 +#define GL_COLOR_ATTACHMENT2 0x8CE2 +#define GL_COLOR_ATTACHMENT3 0x8CE3 +#define GL_COLOR_ATTACHMENT4 0x8CE4 +#define GL_COLOR_ATTACHMENT5 0x8CE5 +#define GL_COLOR_ATTACHMENT6 0x8CE6 +#define GL_COLOR_ATTACHMENT7 0x8CE7 +#define GL_COLOR_ATTACHMENT8 0x8CE8 +#define GL_COLOR_ATTACHMENT9 0x8CE9 +#define GL_COLOR_ATTACHMENT10 0x8CEA +#define GL_COLOR_ATTACHMENT11 0x8CEB +#define GL_COLOR_ATTACHMENT12 0x8CEC +#define GL_COLOR_ATTACHMENT13 0x8CED +#define GL_COLOR_ATTACHMENT14 0x8CEE +#define GL_COLOR_ATTACHMENT15 0x8CEF +#define GL_COLOR_ATTACHMENT16 0x8CF0 +#define GL_COLOR_ATTACHMENT17 0x8CF1 +#define GL_COLOR_ATTACHMENT18 0x8CF2 +#define GL_COLOR_ATTACHMENT19 0x8CF3 +#define GL_COLOR_ATTACHMENT20 0x8CF4 +#define GL_COLOR_ATTACHMENT21 0x8CF5 +#define GL_COLOR_ATTACHMENT22 0x8CF6 +#define GL_COLOR_ATTACHMENT23 0x8CF7 +#define GL_COLOR_ATTACHMENT24 0x8CF8 +#define GL_COLOR_ATTACHMENT25 0x8CF9 +#define GL_COLOR_ATTACHMENT26 0x8CFA +#define GL_COLOR_ATTACHMENT27 0x8CFB +#define GL_COLOR_ATTACHMENT28 0x8CFC +#define GL_COLOR_ATTACHMENT29 0x8CFD +#define GL_COLOR_ATTACHMENT30 0x8CFE +#define GL_COLOR_ATTACHMENT31 0x8CFF +#define GL_DEPTH_ATTACHMENT 0x8D00 +#define GL_STENCIL_ATTACHMENT 0x8D20 +#define GL_FRAMEBUFFER 0x8D40 +#define GL_RENDERBUFFER 0x8D41 +#define GL_RENDERBUFFER_WIDTH 0x8D42 +#define GL_RENDERBUFFER_HEIGHT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 +#define GL_STENCIL_INDEX1 0x8D46 +#define GL_STENCIL_INDEX4 0x8D47 +#define GL_STENCIL_INDEX8 0x8D48 +#define GL_STENCIL_INDEX16 0x8D49 +#define GL_RENDERBUFFER_RED_SIZE 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 +#define GL_MAX_SAMPLES 0x8D57 +#define GL_FRAMEBUFFER_SRGB 0x8DB9 +#define GL_HALF_FLOAT 0x140B +#define GL_MAP_READ_BIT 0x0001 +#define GL_MAP_WRITE_BIT 0x0002 +#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 +#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 +#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 +#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 +#define GL_COMPRESSED_RED_RGTC1 0x8DBB +#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC +#define GL_COMPRESSED_RG_RGTC2 0x8DBD +#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE +#define GL_RG 0x8227 +#define GL_RG_INTEGER 0x8228 +#define GL_R8 0x8229 +#define GL_R16 0x822A +#define GL_RG8 0x822B +#define GL_RG16 0x822C +#define GL_R16F 0x822D +#define GL_R32F 0x822E +#define GL_RG16F 0x822F +#define GL_RG32F 0x8230 +#define GL_R8I 0x8231 +#define GL_R8UI 0x8232 +#define GL_R16I 0x8233 +#define GL_R16UI 0x8234 +#define GL_R32I 0x8235 +#define GL_R32UI 0x8236 +#define GL_RG8I 0x8237 +#define GL_RG8UI 0x8238 +#define GL_RG16I 0x8239 +#define GL_RG16UI 0x823A +#define GL_RG32I 0x823B +#define GL_RG32UI 0x823C +#define GL_VERTEX_ARRAY_BINDING 0x85B5 +#define GL_SAMPLER_2D_RECT 0x8B63 +#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64 +#define GL_SAMPLER_BUFFER 0x8DC2 +#define GL_INT_SAMPLER_2D_RECT 0x8DCD +#define GL_INT_SAMPLER_BUFFER 0x8DD0 +#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8 +#define GL_TEXTURE_BUFFER 0x8C2A +#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B +#define GL_TEXTURE_BINDING_BUFFER 0x8C2C +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D +#define GL_TEXTURE_RECTANGLE 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 +#define GL_R8_SNORM 0x8F94 +#define GL_RG8_SNORM 0x8F95 +#define GL_RGB8_SNORM 0x8F96 +#define GL_RGBA8_SNORM 0x8F97 +#define GL_R16_SNORM 0x8F98 +#define GL_RG16_SNORM 0x8F99 +#define GL_RGB16_SNORM 0x8F9A +#define GL_RGBA16_SNORM 0x8F9B +#define GL_SIGNED_NORMALIZED 0x8F9C +#define GL_PRIMITIVE_RESTART 0x8F9D +#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E +#define GL_COPY_READ_BUFFER 0x8F36 +#define GL_COPY_WRITE_BUFFER 0x8F37 +#define GL_UNIFORM_BUFFER 0x8A11 +#define GL_UNIFORM_BUFFER_BINDING 0x8A28 +#define GL_UNIFORM_BUFFER_START 0x8A29 +#define GL_UNIFORM_BUFFER_SIZE 0x8A2A +#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B +#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C +#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D +#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E +#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F +#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 +#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 +#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32 +#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 +#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 +#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 +#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 +#define GL_UNIFORM_TYPE 0x8A37 +#define GL_UNIFORM_SIZE 0x8A38 +#define GL_UNIFORM_NAME_LENGTH 0x8A39 +#define GL_UNIFORM_BLOCK_INDEX 0x8A3A +#define GL_UNIFORM_OFFSET 0x8A3B +#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C +#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D +#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E +#define GL_UNIFORM_BLOCK_BINDING 0x8A3F +#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 +#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 +#define GL_INVALID_INDEX 0xFFFFFFFF +#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001 +#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002 +#define GL_LINES_ADJACENCY 0x000A +#define GL_LINE_STRIP_ADJACENCY 0x000B +#define GL_TRIANGLES_ADJACENCY 0x000C +#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D +#define GL_PROGRAM_POINT_SIZE 0x8642 +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29 +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8 +#define GL_GEOMETRY_SHADER 0x8DD9 +#define GL_GEOMETRY_VERTICES_OUT 0x8916 +#define GL_GEOMETRY_INPUT_TYPE 0x8917 +#define GL_GEOMETRY_OUTPUT_TYPE 0x8918 +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1 +#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 +#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123 +#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124 +#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 +#define GL_CONTEXT_PROFILE_MASK 0x9126 +#define GL_DEPTH_CLAMP 0x864F +#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C +#define GL_FIRST_VERTEX_CONVENTION 0x8E4D +#define GL_LAST_VERTEX_CONVENTION 0x8E4E +#define GL_PROVOKING_VERTEX 0x8E4F +#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F +#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 +#define GL_OBJECT_TYPE 0x9112 +#define GL_SYNC_CONDITION 0x9113 +#define GL_SYNC_STATUS 0x9114 +#define GL_SYNC_FLAGS 0x9115 +#define GL_SYNC_FENCE 0x9116 +#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 +#define GL_UNSIGNALED 0x9118 +#define GL_SIGNALED 0x9119 +#define GL_ALREADY_SIGNALED 0x911A +#define GL_TIMEOUT_EXPIRED 0x911B +#define GL_CONDITION_SATISFIED 0x911C +#define GL_WAIT_FAILED 0x911D +#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFF +#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 +#define GL_SAMPLE_POSITION 0x8E50 +#define GL_SAMPLE_MASK 0x8E51 +#define GL_SAMPLE_MASK_VALUE 0x8E52 +#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 +#define GL_TEXTURE_2D_MULTISAMPLE 0x9100 +#define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101 +#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102 +#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103 +#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104 +#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105 +#define GL_TEXTURE_SAMPLES 0x9106 +#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107 +#define GL_SAMPLER_2D_MULTISAMPLE 0x9108 +#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 +#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A +#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B +#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C +#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D +#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E +#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F +#define GL_MAX_INTEGER_SAMPLES 0x9110 +#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE +#define GL_SRC1_COLOR 0x88F9 +#define GL_ONE_MINUS_SRC1_COLOR 0x88FA +#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB +#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC +#define GL_ANY_SAMPLES_PASSED 0x8C2F +#define GL_SAMPLER_BINDING 0x8919 +#define GL_RGB10_A2UI 0x906F +#define GL_TEXTURE_SWIZZLE_R 0x8E42 +#define GL_TEXTURE_SWIZZLE_G 0x8E43 +#define GL_TEXTURE_SWIZZLE_B 0x8E44 +#define GL_TEXTURE_SWIZZLE_A 0x8E45 +#define GL_TEXTURE_SWIZZLE_RGBA 0x8E46 +#define GL_TIME_ELAPSED 0x88BF +#define GL_TIMESTAMP 0x8E28 +#define GL_INT_2_10_10_10_REV 0x8D9F +#define GL_SAMPLE_SHADING 0x8C36 +#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 +#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E +#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F +#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A +#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B +#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C +#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D +#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E +#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F +#define GL_DRAW_INDIRECT_BUFFER 0x8F3F +#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 +#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F +#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A +#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B +#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C +#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D +#define GL_MAX_VERTEX_STREAMS 0x8E71 +#define GL_DOUBLE_VEC2 0x8FFC +#define GL_DOUBLE_VEC3 0x8FFD +#define GL_DOUBLE_VEC4 0x8FFE +#define GL_DOUBLE_MAT2 0x8F46 +#define GL_DOUBLE_MAT3 0x8F47 +#define GL_DOUBLE_MAT4 0x8F48 +#define GL_DOUBLE_MAT2x3 0x8F49 +#define GL_DOUBLE_MAT2x4 0x8F4A +#define GL_DOUBLE_MAT3x2 0x8F4B +#define GL_DOUBLE_MAT3x4 0x8F4C +#define GL_DOUBLE_MAT4x2 0x8F4D +#define GL_DOUBLE_MAT4x3 0x8F4E +#define GL_ACTIVE_SUBROUTINES 0x8DE5 +#define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6 +#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47 +#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48 +#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49 +#define GL_MAX_SUBROUTINES 0x8DE7 +#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8 +#define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A +#define GL_COMPATIBLE_SUBROUTINES 0x8E4B +#define GL_PATCHES 0x000E +#define GL_PATCH_VERTICES 0x8E72 +#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73 +#define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74 +#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75 +#define GL_TESS_GEN_MODE 0x8E76 +#define GL_TESS_GEN_SPACING 0x8E77 +#define GL_TESS_GEN_VERTEX_ORDER 0x8E78 +#define GL_TESS_GEN_POINT_MODE 0x8E79 +#define GL_ISOLINES 0x8E7A +#define GL_QUADS 0x0007 +#define GL_FRACTIONAL_ODD 0x8E7B +#define GL_FRACTIONAL_EVEN 0x8E7C +#define GL_MAX_PATCH_VERTICES 0x8E7D +#define GL_MAX_TESS_GEN_LEVEL 0x8E7E +#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F +#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80 +#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81 +#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82 +#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83 +#define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84 +#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85 +#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86 +#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89 +#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A +#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C +#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D +#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E +#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F +#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1 +#define GL_TESS_EVALUATION_SHADER 0x8E87 +#define GL_TESS_CONTROL_SHADER 0x8E88 +#define GL_TRANSFORM_FEEDBACK 0x8E22 +#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23 +#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24 +#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 +#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70 +#define GL_FIXED 0x140C +#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B +#define GL_LOW_FLOAT 0x8DF0 +#define GL_MEDIUM_FLOAT 0x8DF1 +#define GL_HIGH_FLOAT 0x8DF2 +#define GL_LOW_INT 0x8DF3 +#define GL_MEDIUM_INT 0x8DF4 +#define GL_HIGH_INT 0x8DF5 +#define GL_SHADER_COMPILER 0x8DFA +#define GL_SHADER_BINARY_FORMATS 0x8DF8 +#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 +#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB +#define GL_MAX_VARYING_VECTORS 0x8DFC +#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD +#define GL_RGB565 0x8D62 +#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 +#define GL_PROGRAM_BINARY_LENGTH 0x8741 +#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE +#define GL_PROGRAM_BINARY_FORMATS 0x87FF +#define GL_VERTEX_SHADER_BIT 0x00000001 +#define GL_FRAGMENT_SHADER_BIT 0x00000002 +#define GL_GEOMETRY_SHADER_BIT 0x00000004 +#define GL_TESS_CONTROL_SHADER_BIT 0x00000008 +#define GL_TESS_EVALUATION_SHADER_BIT 0x00000010 +#define GL_ALL_SHADER_BITS 0xFFFFFFFF +#define GL_PROGRAM_SEPARABLE 0x8258 +#define GL_ACTIVE_PROGRAM 0x8259 +#define GL_PROGRAM_PIPELINE_BINDING 0x825A +#define GL_MAX_VIEWPORTS 0x825B +#define GL_VIEWPORT_SUBPIXEL_BITS 0x825C +#define GL_VIEWPORT_BOUNDS_RANGE 0x825D +#define GL_LAYER_PROVOKING_VERTEX 0x825E +#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F +#define GL_UNDEFINED_VERTEX 0x8260 +#define GL_COPY_READ_BUFFER_BINDING 0x8F36 +#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 +#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 +#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 +#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127 +#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128 +#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129 +#define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A +#define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B +#define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C +#define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D +#define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E +#define GL_NUM_SAMPLE_COUNTS 0x9380 +#define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC +#define GL_ATOMIC_COUNTER_BUFFER 0x92C0 +#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1 +#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2 +#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3 +#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4 +#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5 +#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9 +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB +#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC +#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD +#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE +#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF +#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0 +#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1 +#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2 +#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3 +#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4 +#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5 +#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6 +#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7 +#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8 +#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC +#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9 +#define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA +#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB +#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001 +#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002 +#define GL_UNIFORM_BARRIER_BIT 0x00000004 +#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008 +#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020 +#define GL_COMMAND_BARRIER_BIT 0x00000040 +#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080 +#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100 +#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200 +#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400 +#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800 +#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000 +#define GL_ALL_BARRIER_BITS 0xFFFFFFFF +#define GL_MAX_IMAGE_UNITS 0x8F38 +#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39 +#define GL_IMAGE_BINDING_NAME 0x8F3A +#define GL_IMAGE_BINDING_LEVEL 0x8F3B +#define GL_IMAGE_BINDING_LAYERED 0x8F3C +#define GL_IMAGE_BINDING_LAYER 0x8F3D +#define GL_IMAGE_BINDING_ACCESS 0x8F3E +#define GL_IMAGE_1D 0x904C +#define GL_IMAGE_2D 0x904D +#define GL_IMAGE_3D 0x904E +#define GL_IMAGE_2D_RECT 0x904F +#define GL_IMAGE_CUBE 0x9050 +#define GL_IMAGE_BUFFER 0x9051 +#define GL_IMAGE_1D_ARRAY 0x9052 +#define GL_IMAGE_2D_ARRAY 0x9053 +#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054 +#define GL_IMAGE_2D_MULTISAMPLE 0x9055 +#define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056 +#define GL_INT_IMAGE_1D 0x9057 +#define GL_INT_IMAGE_2D 0x9058 +#define GL_INT_IMAGE_3D 0x9059 +#define GL_INT_IMAGE_2D_RECT 0x905A +#define GL_INT_IMAGE_CUBE 0x905B +#define GL_INT_IMAGE_BUFFER 0x905C +#define GL_INT_IMAGE_1D_ARRAY 0x905D +#define GL_INT_IMAGE_2D_ARRAY 0x905E +#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F +#define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060 +#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061 +#define GL_UNSIGNED_INT_IMAGE_1D 0x9062 +#define GL_UNSIGNED_INT_IMAGE_2D 0x9063 +#define GL_UNSIGNED_INT_IMAGE_3D 0x9064 +#define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065 +#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066 +#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067 +#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068 +#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069 +#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B +#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C +#define GL_MAX_IMAGE_SAMPLES 0x906D +#define GL_IMAGE_BINDING_FORMAT 0x906E +#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7 +#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8 +#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9 +#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA +#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB +#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC +#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD +#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE +#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF +#define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C +#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D +#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E +#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F +#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F +#define GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9 +#define GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E +#define GL_COMPRESSED_RGB8_ETC2 0x9274 +#define GL_COMPRESSED_SRGB8_ETC2 0x9275 +#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 +#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 +#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 +#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 +#define GL_COMPRESSED_R11_EAC 0x9270 +#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 +#define GL_COMPRESSED_RG11_EAC 0x9272 +#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 +#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 +#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A +#define GL_MAX_ELEMENT_INDEX 0x8D6B +#define GL_COMPUTE_SHADER 0x91B9 +#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB +#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC +#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD +#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262 +#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263 +#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264 +#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265 +#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266 +#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB +#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE +#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF +#define GL_COMPUTE_WORK_GROUP_SIZE 0x8267 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC +#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED +#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE +#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF +#define GL_COMPUTE_SHADER_BIT 0x00000020 +#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 +#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 +#define GL_DEBUG_CALLBACK_FUNCTION 0x8244 +#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245 +#define GL_DEBUG_SOURCE_API 0x8246 +#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247 +#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248 +#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249 +#define GL_DEBUG_SOURCE_APPLICATION 0x824A +#define GL_DEBUG_SOURCE_OTHER 0x824B +#define GL_DEBUG_TYPE_ERROR 0x824C +#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D +#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E +#define GL_DEBUG_TYPE_PORTABILITY 0x824F +#define GL_DEBUG_TYPE_PERFORMANCE 0x8250 +#define GL_DEBUG_TYPE_OTHER 0x8251 +#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143 +#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144 +#define GL_DEBUG_LOGGED_MESSAGES 0x9145 +#define GL_DEBUG_SEVERITY_HIGH 0x9146 +#define GL_DEBUG_SEVERITY_MEDIUM 0x9147 +#define GL_DEBUG_SEVERITY_LOW 0x9148 +#define GL_DEBUG_TYPE_MARKER 0x8268 +#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269 +#define GL_DEBUG_TYPE_POP_GROUP 0x826A +#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B +#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C +#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D +#define GL_BUFFER 0x82E0 +#define GL_SHADER 0x82E1 +#define GL_PROGRAM 0x82E2 +#define GL_VERTEX_ARRAY 0x8074 +#define GL_QUERY 0x82E3 +#define GL_PROGRAM_PIPELINE 0x82E4 +#define GL_SAMPLER 0x82E6 +#define GL_MAX_LABEL_LENGTH 0x82E8 +#define GL_DEBUG_OUTPUT 0x92E0 +#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 +#define GL_MAX_UNIFORM_LOCATIONS 0x826E +#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310 +#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311 +#define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312 +#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313 +#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314 +#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315 +#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316 +#define GL_MAX_FRAMEBUFFER_LAYERS 0x9317 +#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318 +#define GL_INTERNALFORMAT_SUPPORTED 0x826F +#define GL_INTERNALFORMAT_PREFERRED 0x8270 +#define GL_INTERNALFORMAT_RED_SIZE 0x8271 +#define GL_INTERNALFORMAT_GREEN_SIZE 0x8272 +#define GL_INTERNALFORMAT_BLUE_SIZE 0x8273 +#define GL_INTERNALFORMAT_ALPHA_SIZE 0x8274 +#define GL_INTERNALFORMAT_DEPTH_SIZE 0x8275 +#define GL_INTERNALFORMAT_STENCIL_SIZE 0x8276 +#define GL_INTERNALFORMAT_SHARED_SIZE 0x8277 +#define GL_INTERNALFORMAT_RED_TYPE 0x8278 +#define GL_INTERNALFORMAT_GREEN_TYPE 0x8279 +#define GL_INTERNALFORMAT_BLUE_TYPE 0x827A +#define GL_INTERNALFORMAT_ALPHA_TYPE 0x827B +#define GL_INTERNALFORMAT_DEPTH_TYPE 0x827C +#define GL_INTERNALFORMAT_STENCIL_TYPE 0x827D +#define GL_MAX_WIDTH 0x827E +#define GL_MAX_HEIGHT 0x827F +#define GL_MAX_DEPTH 0x8280 +#define GL_MAX_LAYERS 0x8281 +#define GL_MAX_COMBINED_DIMENSIONS 0x8282 +#define GL_COLOR_COMPONENTS 0x8283 +#define GL_DEPTH_COMPONENTS 0x8284 +#define GL_STENCIL_COMPONENTS 0x8285 +#define GL_COLOR_RENDERABLE 0x8286 +#define GL_DEPTH_RENDERABLE 0x8287 +#define GL_STENCIL_RENDERABLE 0x8288 +#define GL_FRAMEBUFFER_RENDERABLE 0x8289 +#define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A +#define GL_FRAMEBUFFER_BLEND 0x828B +#define GL_READ_PIXELS 0x828C +#define GL_READ_PIXELS_FORMAT 0x828D +#define GL_READ_PIXELS_TYPE 0x828E +#define GL_TEXTURE_IMAGE_FORMAT 0x828F +#define GL_TEXTURE_IMAGE_TYPE 0x8290 +#define GL_GET_TEXTURE_IMAGE_FORMAT 0x8291 +#define GL_GET_TEXTURE_IMAGE_TYPE 0x8292 +#define GL_MIPMAP 0x8293 +#define GL_MANUAL_GENERATE_MIPMAP 0x8294 +#define GL_AUTO_GENERATE_MIPMAP 0x8295 +#define GL_COLOR_ENCODING 0x8296 +#define GL_SRGB_READ 0x8297 +#define GL_SRGB_WRITE 0x8298 +#define GL_FILTER 0x829A +#define GL_VERTEX_TEXTURE 0x829B +#define GL_TESS_CONTROL_TEXTURE 0x829C +#define GL_TESS_EVALUATION_TEXTURE 0x829D +#define GL_GEOMETRY_TEXTURE 0x829E +#define GL_FRAGMENT_TEXTURE 0x829F +#define GL_COMPUTE_TEXTURE 0x82A0 +#define GL_TEXTURE_SHADOW 0x82A1 +#define GL_TEXTURE_GATHER 0x82A2 +#define GL_TEXTURE_GATHER_SHADOW 0x82A3 +#define GL_SHADER_IMAGE_LOAD 0x82A4 +#define GL_SHADER_IMAGE_STORE 0x82A5 +#define GL_SHADER_IMAGE_ATOMIC 0x82A6 +#define GL_IMAGE_TEXEL_SIZE 0x82A7 +#define GL_IMAGE_COMPATIBILITY_CLASS 0x82A8 +#define GL_IMAGE_PIXEL_FORMAT 0x82A9 +#define GL_IMAGE_PIXEL_TYPE 0x82AA +#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC +#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD +#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE +#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF +#define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1 +#define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2 +#define GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3 +#define GL_CLEAR_BUFFER 0x82B4 +#define GL_TEXTURE_VIEW 0x82B5 +#define GL_VIEW_COMPATIBILITY_CLASS 0x82B6 +#define GL_FULL_SUPPORT 0x82B7 +#define GL_CAVEAT_SUPPORT 0x82B8 +#define GL_IMAGE_CLASS_4_X_32 0x82B9 +#define GL_IMAGE_CLASS_2_X_32 0x82BA +#define GL_IMAGE_CLASS_1_X_32 0x82BB +#define GL_IMAGE_CLASS_4_X_16 0x82BC +#define GL_IMAGE_CLASS_2_X_16 0x82BD +#define GL_IMAGE_CLASS_1_X_16 0x82BE +#define GL_IMAGE_CLASS_4_X_8 0x82BF +#define GL_IMAGE_CLASS_2_X_8 0x82C0 +#define GL_IMAGE_CLASS_1_X_8 0x82C1 +#define GL_IMAGE_CLASS_11_11_10 0x82C2 +#define GL_IMAGE_CLASS_10_10_10_2 0x82C3 +#define GL_VIEW_CLASS_128_BITS 0x82C4 +#define GL_VIEW_CLASS_96_BITS 0x82C5 +#define GL_VIEW_CLASS_64_BITS 0x82C6 +#define GL_VIEW_CLASS_48_BITS 0x82C7 +#define GL_VIEW_CLASS_32_BITS 0x82C8 +#define GL_VIEW_CLASS_24_BITS 0x82C9 +#define GL_VIEW_CLASS_16_BITS 0x82CA +#define GL_VIEW_CLASS_8_BITS 0x82CB +#define GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC +#define GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD +#define GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE +#define GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF +#define GL_VIEW_CLASS_RGTC1_RED 0x82D0 +#define GL_VIEW_CLASS_RGTC2_RG 0x82D1 +#define GL_VIEW_CLASS_BPTC_UNORM 0x82D2 +#define GL_VIEW_CLASS_BPTC_FLOAT 0x82D3 +#define GL_UNIFORM 0x92E1 +#define GL_UNIFORM_BLOCK 0x92E2 +#define GL_PROGRAM_INPUT 0x92E3 +#define GL_PROGRAM_OUTPUT 0x92E4 +#define GL_BUFFER_VARIABLE 0x92E5 +#define GL_SHADER_STORAGE_BLOCK 0x92E6 +#define GL_VERTEX_SUBROUTINE 0x92E8 +#define GL_TESS_CONTROL_SUBROUTINE 0x92E9 +#define GL_TESS_EVALUATION_SUBROUTINE 0x92EA +#define GL_GEOMETRY_SUBROUTINE 0x92EB +#define GL_FRAGMENT_SUBROUTINE 0x92EC +#define GL_COMPUTE_SUBROUTINE 0x92ED +#define GL_VERTEX_SUBROUTINE_UNIFORM 0x92EE +#define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF +#define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0 +#define GL_GEOMETRY_SUBROUTINE_UNIFORM 0x92F1 +#define GL_FRAGMENT_SUBROUTINE_UNIFORM 0x92F2 +#define GL_COMPUTE_SUBROUTINE_UNIFORM 0x92F3 +#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4 +#define GL_ACTIVE_RESOURCES 0x92F5 +#define GL_MAX_NAME_LENGTH 0x92F6 +#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7 +#define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8 +#define GL_NAME_LENGTH 0x92F9 +#define GL_TYPE 0x92FA +#define GL_ARRAY_SIZE 0x92FB +#define GL_OFFSET 0x92FC +#define GL_BLOCK_INDEX 0x92FD +#define GL_ARRAY_STRIDE 0x92FE +#define GL_MATRIX_STRIDE 0x92FF +#define GL_IS_ROW_MAJOR 0x9300 +#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301 +#define GL_BUFFER_BINDING 0x9302 +#define GL_BUFFER_DATA_SIZE 0x9303 +#define GL_NUM_ACTIVE_VARIABLES 0x9304 +#define GL_ACTIVE_VARIABLES 0x9305 +#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306 +#define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307 +#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308 +#define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309 +#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A +#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B +#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C +#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D +#define GL_LOCATION 0x930E +#define GL_LOCATION_INDEX 0x930F +#define GL_IS_PER_PATCH 0x92E7 +#define GL_SHADER_STORAGE_BUFFER 0x90D2 +#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3 +#define GL_SHADER_STORAGE_BUFFER_START 0x90D4 +#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5 +#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6 +#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7 +#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8 +#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9 +#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA +#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB +#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC +#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD +#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE +#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF +#define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000 +#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39 +#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA +#define GL_TEXTURE_BUFFER_OFFSET 0x919D +#define GL_TEXTURE_BUFFER_SIZE 0x919E +#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F +#define GL_TEXTURE_VIEW_MIN_LEVEL 0x82DB +#define GL_TEXTURE_VIEW_NUM_LEVELS 0x82DC +#define GL_TEXTURE_VIEW_MIN_LAYER 0x82DD +#define GL_TEXTURE_VIEW_NUM_LAYERS 0x82DE +#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF +#define GL_VERTEX_ATTRIB_BINDING 0x82D4 +#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5 +#define GL_VERTEX_BINDING_DIVISOR 0x82D6 +#define GL_VERTEX_BINDING_OFFSET 0x82D7 +#define GL_VERTEX_BINDING_STRIDE 0x82D8 +#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 +#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA +#define GL_VERTEX_BINDING_BUFFER 0x8F4F +#define GL_DISPLAY_LIST 0x82E7 +#define GL_STACK_UNDERFLOW 0x0504 +#define GL_STACK_OVERFLOW 0x0503 +#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5 +#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221 +#define GL_TEXTURE_BUFFER_BINDING 0x8C2A +#define GL_MAP_PERSISTENT_BIT 0x0040 +#define GL_MAP_COHERENT_BIT 0x0080 +#define GL_DYNAMIC_STORAGE_BIT 0x0100 +#define GL_CLIENT_STORAGE_BIT 0x0200 +#define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000 +#define GL_BUFFER_IMMUTABLE_STORAGE 0x821F +#define GL_BUFFER_STORAGE_FLAGS 0x8220 +#define GL_CLEAR_TEXTURE 0x9365 +#define GL_LOCATION_COMPONENT 0x934A +#define GL_TRANSFORM_FEEDBACK_BUFFER_INDEX 0x934B +#define GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE 0x934C +#define GL_QUERY_BUFFER 0x9192 +#define GL_QUERY_BUFFER_BARRIER_BIT 0x00008000 +#define GL_QUERY_BUFFER_BINDING 0x9193 +#define GL_QUERY_RESULT_NO_WAIT 0x9194 +#define GL_MIRROR_CLAMP_TO_EDGE 0x8743 +#define GL_CONTEXT_LOST 0x0507 +#define GL_NEGATIVE_ONE_TO_ONE 0x935E +#define GL_ZERO_TO_ONE 0x935F +#define GL_CLIP_ORIGIN 0x935C +#define GL_CLIP_DEPTH_MODE 0x935D +#define GL_QUERY_WAIT_INVERTED 0x8E17 +#define GL_QUERY_NO_WAIT_INVERTED 0x8E18 +#define GL_QUERY_BY_REGION_WAIT_INVERTED 0x8E19 +#define GL_QUERY_BY_REGION_NO_WAIT_INVERTED 0x8E1A +#define GL_MAX_CULL_DISTANCES 0x82F9 +#define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES 0x82FA +#define GL_TEXTURE_TARGET 0x1006 +#define GL_QUERY_TARGET 0x82EA +#define GL_GUILTY_CONTEXT_RESET 0x8253 +#define GL_INNOCENT_CONTEXT_RESET 0x8254 +#define GL_UNKNOWN_CONTEXT_RESET 0x8255 +#define GL_RESET_NOTIFICATION_STRATEGY 0x8256 +#define GL_LOSE_CONTEXT_ON_RESET 0x8252 +#define GL_NO_RESET_NOTIFICATION 0x8261 +#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT 0x00000004 +#define GL_CONTEXT_RELEASE_BEHAVIOR 0x82FB +#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC +#ifndef GL_VERSION_1_0 +#define GL_VERSION_1_0 1 +GLAPI int GLAD_GL_VERSION_1_0; +typedef void (APIENTRYP PFNGLCULLFACEPROC)(GLenum mode); +GLAPI PFNGLCULLFACEPROC glad_glCullFace; +#define glCullFace glad_glCullFace +typedef void (APIENTRYP PFNGLFRONTFACEPROC)(GLenum mode); +GLAPI PFNGLFRONTFACEPROC glad_glFrontFace; +#define glFrontFace glad_glFrontFace +typedef void (APIENTRYP PFNGLHINTPROC)(GLenum target, GLenum mode); +GLAPI PFNGLHINTPROC glad_glHint; +#define glHint glad_glHint +typedef void (APIENTRYP PFNGLLINEWIDTHPROC)(GLfloat width); +GLAPI PFNGLLINEWIDTHPROC glad_glLineWidth; +#define glLineWidth glad_glLineWidth +typedef void (APIENTRYP PFNGLPOINTSIZEPROC)(GLfloat size); +GLAPI PFNGLPOINTSIZEPROC glad_glPointSize; +#define glPointSize glad_glPointSize +typedef void (APIENTRYP PFNGLPOLYGONMODEPROC)(GLenum face, GLenum mode); +GLAPI PFNGLPOLYGONMODEPROC glad_glPolygonMode; +#define glPolygonMode glad_glPolygonMode +typedef void (APIENTRYP PFNGLSCISSORPROC)(GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI PFNGLSCISSORPROC glad_glScissor; +#define glScissor glad_glScissor +typedef void (APIENTRYP PFNGLTEXPARAMETERFPROC)(GLenum target, GLenum pname, GLfloat param); +GLAPI PFNGLTEXPARAMETERFPROC glad_glTexParameterf; +#define glTexParameterf glad_glTexParameterf +typedef void (APIENTRYP PFNGLTEXPARAMETERFVPROC)(GLenum target, GLenum pname, const GLfloat *params); +GLAPI PFNGLTEXPARAMETERFVPROC glad_glTexParameterfv; +#define glTexParameterfv glad_glTexParameterfv +typedef void (APIENTRYP PFNGLTEXPARAMETERIPROC)(GLenum target, GLenum pname, GLint param); +GLAPI PFNGLTEXPARAMETERIPROC glad_glTexParameteri; +#define glTexParameteri glad_glTexParameteri +typedef void (APIENTRYP PFNGLTEXPARAMETERIVPROC)(GLenum target, GLenum pname, const GLint *params); +GLAPI PFNGLTEXPARAMETERIVPROC glad_glTexParameteriv; +#define glTexParameteriv glad_glTexParameteriv +typedef void (APIENTRYP PFNGLTEXIMAGE1DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); +GLAPI PFNGLTEXIMAGE1DPROC glad_glTexImage1D; +#define glTexImage1D glad_glTexImage1D +typedef void (APIENTRYP PFNGLTEXIMAGE2DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); +GLAPI PFNGLTEXIMAGE2DPROC glad_glTexImage2D; +#define glTexImage2D glad_glTexImage2D +typedef void (APIENTRYP PFNGLDRAWBUFFERPROC)(GLenum buf); +GLAPI PFNGLDRAWBUFFERPROC glad_glDrawBuffer; +#define glDrawBuffer glad_glDrawBuffer +typedef void (APIENTRYP PFNGLCLEARPROC)(GLbitfield mask); +GLAPI PFNGLCLEARPROC glad_glClear; +#define glClear glad_glClear +typedef void (APIENTRYP PFNGLCLEARCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GLAPI PFNGLCLEARCOLORPROC glad_glClearColor; +#define glClearColor glad_glClearColor +typedef void (APIENTRYP PFNGLCLEARSTENCILPROC)(GLint s); +GLAPI PFNGLCLEARSTENCILPROC glad_glClearStencil; +#define glClearStencil glad_glClearStencil +typedef void (APIENTRYP PFNGLCLEARDEPTHPROC)(GLdouble depth); +GLAPI PFNGLCLEARDEPTHPROC glad_glClearDepth; +#define glClearDepth glad_glClearDepth +typedef void (APIENTRYP PFNGLSTENCILMASKPROC)(GLuint mask); +GLAPI PFNGLSTENCILMASKPROC glad_glStencilMask; +#define glStencilMask glad_glStencilMask +typedef void (APIENTRYP PFNGLCOLORMASKPROC)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +GLAPI PFNGLCOLORMASKPROC glad_glColorMask; +#define glColorMask glad_glColorMask +typedef void (APIENTRYP PFNGLDEPTHMASKPROC)(GLboolean flag); +GLAPI PFNGLDEPTHMASKPROC glad_glDepthMask; +#define glDepthMask glad_glDepthMask +typedef void (APIENTRYP PFNGLDISABLEPROC)(GLenum cap); +GLAPI PFNGLDISABLEPROC glad_glDisable; +#define glDisable glad_glDisable +typedef void (APIENTRYP PFNGLENABLEPROC)(GLenum cap); +GLAPI PFNGLENABLEPROC glad_glEnable; +#define glEnable glad_glEnable +typedef void (APIENTRYP PFNGLFINISHPROC)(void); +GLAPI PFNGLFINISHPROC glad_glFinish; +#define glFinish glad_glFinish +typedef void (APIENTRYP PFNGLFLUSHPROC)(void); +GLAPI PFNGLFLUSHPROC glad_glFlush; +#define glFlush glad_glFlush +typedef void (APIENTRYP PFNGLBLENDFUNCPROC)(GLenum sfactor, GLenum dfactor); +GLAPI PFNGLBLENDFUNCPROC glad_glBlendFunc; +#define glBlendFunc glad_glBlendFunc +typedef void (APIENTRYP PFNGLLOGICOPPROC)(GLenum opcode); +GLAPI PFNGLLOGICOPPROC glad_glLogicOp; +#define glLogicOp glad_glLogicOp +typedef void (APIENTRYP PFNGLSTENCILFUNCPROC)(GLenum func, GLint ref, GLuint mask); +GLAPI PFNGLSTENCILFUNCPROC glad_glStencilFunc; +#define glStencilFunc glad_glStencilFunc +typedef void (APIENTRYP PFNGLSTENCILOPPROC)(GLenum fail, GLenum zfail, GLenum zpass); +GLAPI PFNGLSTENCILOPPROC glad_glStencilOp; +#define glStencilOp glad_glStencilOp +typedef void (APIENTRYP PFNGLDEPTHFUNCPROC)(GLenum func); +GLAPI PFNGLDEPTHFUNCPROC glad_glDepthFunc; +#define glDepthFunc glad_glDepthFunc +typedef void (APIENTRYP PFNGLPIXELSTOREFPROC)(GLenum pname, GLfloat param); +GLAPI PFNGLPIXELSTOREFPROC glad_glPixelStoref; +#define glPixelStoref glad_glPixelStoref +typedef void (APIENTRYP PFNGLPIXELSTOREIPROC)(GLenum pname, GLint param); +GLAPI PFNGLPIXELSTOREIPROC glad_glPixelStorei; +#define glPixelStorei glad_glPixelStorei +typedef void (APIENTRYP PFNGLREADBUFFERPROC)(GLenum src); +GLAPI PFNGLREADBUFFERPROC glad_glReadBuffer; +#define glReadBuffer glad_glReadBuffer +typedef void (APIENTRYP PFNGLREADPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); +GLAPI PFNGLREADPIXELSPROC glad_glReadPixels; +#define glReadPixels glad_glReadPixels +typedef void (APIENTRYP PFNGLGETBOOLEANVPROC)(GLenum pname, GLboolean *data); +GLAPI PFNGLGETBOOLEANVPROC glad_glGetBooleanv; +#define glGetBooleanv glad_glGetBooleanv +typedef void (APIENTRYP PFNGLGETDOUBLEVPROC)(GLenum pname, GLdouble *data); +GLAPI PFNGLGETDOUBLEVPROC glad_glGetDoublev; +#define glGetDoublev glad_glGetDoublev +typedef GLenum (APIENTRYP PFNGLGETERRORPROC)(void); +GLAPI PFNGLGETERRORPROC glad_glGetError; +#define glGetError glad_glGetError +typedef void (APIENTRYP PFNGLGETFLOATVPROC)(GLenum pname, GLfloat *data); +GLAPI PFNGLGETFLOATVPROC glad_glGetFloatv; +#define glGetFloatv glad_glGetFloatv +typedef void (APIENTRYP PFNGLGETINTEGERVPROC)(GLenum pname, GLint *data); +GLAPI PFNGLGETINTEGERVPROC glad_glGetIntegerv; +#define glGetIntegerv glad_glGetIntegerv +typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGPROC)(GLenum name); +GLAPI PFNGLGETSTRINGPROC glad_glGetString; +#define glGetString glad_glGetString +typedef void (APIENTRYP PFNGLGETTEXIMAGEPROC)(GLenum target, GLint level, GLenum format, GLenum type, void *pixels); +GLAPI PFNGLGETTEXIMAGEPROC glad_glGetTexImage; +#define glGetTexImage glad_glGetTexImage +typedef void (APIENTRYP PFNGLGETTEXPARAMETERFVPROC)(GLenum target, GLenum pname, GLfloat *params); +GLAPI PFNGLGETTEXPARAMETERFVPROC glad_glGetTexParameterfv; +#define glGetTexParameterfv glad_glGetTexParameterfv +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIVPROC)(GLenum target, GLenum pname, GLint *params); +GLAPI PFNGLGETTEXPARAMETERIVPROC glad_glGetTexParameteriv; +#define glGetTexParameteriv glad_glGetTexParameteriv +typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERFVPROC)(GLenum target, GLint level, GLenum pname, GLfloat *params); +GLAPI PFNGLGETTEXLEVELPARAMETERFVPROC glad_glGetTexLevelParameterfv; +#define glGetTexLevelParameterfv glad_glGetTexLevelParameterfv +typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERIVPROC)(GLenum target, GLint level, GLenum pname, GLint *params); +GLAPI PFNGLGETTEXLEVELPARAMETERIVPROC glad_glGetTexLevelParameteriv; +#define glGetTexLevelParameteriv glad_glGetTexLevelParameteriv +typedef GLboolean (APIENTRYP PFNGLISENABLEDPROC)(GLenum cap); +GLAPI PFNGLISENABLEDPROC glad_glIsEnabled; +#define glIsEnabled glad_glIsEnabled +typedef void (APIENTRYP PFNGLDEPTHRANGEPROC)(GLdouble n, GLdouble f); +GLAPI PFNGLDEPTHRANGEPROC glad_glDepthRange; +#define glDepthRange glad_glDepthRange +typedef void (APIENTRYP PFNGLVIEWPORTPROC)(GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI PFNGLVIEWPORTPROC glad_glViewport; +#define glViewport glad_glViewport +#endif +#ifndef GL_VERSION_1_1 +#define GL_VERSION_1_1 1 +GLAPI int GLAD_GL_VERSION_1_1; +typedef void (APIENTRYP PFNGLDRAWARRAYSPROC)(GLenum mode, GLint first, GLsizei count); +GLAPI PFNGLDRAWARRAYSPROC glad_glDrawArrays; +#define glDrawArrays glad_glDrawArrays +typedef void (APIENTRYP PFNGLDRAWELEMENTSPROC)(GLenum mode, GLsizei count, GLenum type, const void *indices); +GLAPI PFNGLDRAWELEMENTSPROC glad_glDrawElements; +#define glDrawElements glad_glDrawElements +typedef void (APIENTRYP PFNGLPOLYGONOFFSETPROC)(GLfloat factor, GLfloat units); +GLAPI PFNGLPOLYGONOFFSETPROC glad_glPolygonOffset; +#define glPolygonOffset glad_glPolygonOffset +typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DPROC)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +GLAPI PFNGLCOPYTEXIMAGE1DPROC glad_glCopyTexImage1D; +#define glCopyTexImage1D glad_glCopyTexImage1D +typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DPROC)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GLAPI PFNGLCOPYTEXIMAGE2DPROC glad_glCopyTexImage2D; +#define glCopyTexImage2D glad_glCopyTexImage2D +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +GLAPI PFNGLCOPYTEXSUBIMAGE1DPROC glad_glCopyTexSubImage1D; +#define glCopyTexSubImage1D glad_glCopyTexSubImage1D +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI PFNGLCOPYTEXSUBIMAGE2DPROC glad_glCopyTexSubImage2D; +#define glCopyTexSubImage2D glad_glCopyTexSubImage2D +typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +GLAPI PFNGLTEXSUBIMAGE1DPROC glad_glTexSubImage1D; +#define glTexSubImage1D glad_glTexSubImage1D +typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +GLAPI PFNGLTEXSUBIMAGE2DPROC glad_glTexSubImage2D; +#define glTexSubImage2D glad_glTexSubImage2D +typedef void (APIENTRYP PFNGLBINDTEXTUREPROC)(GLenum target, GLuint texture); +GLAPI PFNGLBINDTEXTUREPROC glad_glBindTexture; +#define glBindTexture glad_glBindTexture +typedef void (APIENTRYP PFNGLDELETETEXTURESPROC)(GLsizei n, const GLuint *textures); +GLAPI PFNGLDELETETEXTURESPROC glad_glDeleteTextures; +#define glDeleteTextures glad_glDeleteTextures +typedef void (APIENTRYP PFNGLGENTEXTURESPROC)(GLsizei n, GLuint *textures); +GLAPI PFNGLGENTEXTURESPROC glad_glGenTextures; +#define glGenTextures glad_glGenTextures +typedef GLboolean (APIENTRYP PFNGLISTEXTUREPROC)(GLuint texture); +GLAPI PFNGLISTEXTUREPROC glad_glIsTexture; +#define glIsTexture glad_glIsTexture +#endif +#ifndef GL_VERSION_1_2 +#define GL_VERSION_1_2 1 +GLAPI int GLAD_GL_VERSION_1_2; +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); +GLAPI PFNGLDRAWRANGEELEMENTSPROC glad_glDrawRangeElements; +#define glDrawRangeElements glad_glDrawRangeElements +typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); +GLAPI PFNGLTEXIMAGE3DPROC glad_glTexImage3D; +#define glTexImage3D glad_glTexImage3D +typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); +GLAPI PFNGLTEXSUBIMAGE3DPROC glad_glTexSubImage3D; +#define glTexSubImage3D glad_glTexSubImage3D +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI PFNGLCOPYTEXSUBIMAGE3DPROC glad_glCopyTexSubImage3D; +#define glCopyTexSubImage3D glad_glCopyTexSubImage3D +#endif +#ifndef GL_VERSION_1_3 +#define GL_VERSION_1_3 1 +GLAPI int GLAD_GL_VERSION_1_3; +typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC)(GLenum texture); +GLAPI PFNGLACTIVETEXTUREPROC glad_glActiveTexture; +#define glActiveTexture glad_glActiveTexture +typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC)(GLfloat value, GLboolean invert); +GLAPI PFNGLSAMPLECOVERAGEPROC glad_glSampleCoverage; +#define glSampleCoverage glad_glSampleCoverage +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); +GLAPI PFNGLCOMPRESSEDTEXIMAGE3DPROC glad_glCompressedTexImage3D; +#define glCompressedTexImage3D glad_glCompressedTexImage3D +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); +GLAPI PFNGLCOMPRESSEDTEXIMAGE2DPROC glad_glCompressedTexImage2D; +#define glCompressedTexImage2D glad_glCompressedTexImage2D +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data); +GLAPI PFNGLCOMPRESSEDTEXIMAGE1DPROC glad_glCompressedTexImage1D; +#define glCompressedTexImage1D glad_glCompressedTexImage1D +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); +GLAPI PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glad_glCompressedTexSubImage3D; +#define glCompressedTexSubImage3D glad_glCompressedTexSubImage3D +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +GLAPI PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glad_glCompressedTexSubImage2D; +#define glCompressedTexSubImage2D glad_glCompressedTexSubImage2D +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); +GLAPI PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC glad_glCompressedTexSubImage1D; +#define glCompressedTexSubImage1D glad_glCompressedTexSubImage1D +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC)(GLenum target, GLint level, void *img); +GLAPI PFNGLGETCOMPRESSEDTEXIMAGEPROC glad_glGetCompressedTexImage; +#define glGetCompressedTexImage glad_glGetCompressedTexImage +#endif +#ifndef GL_VERSION_1_4 +#define GL_VERSION_1_4 1 +GLAPI int GLAD_GL_VERSION_1_4; +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +GLAPI PFNGLBLENDFUNCSEPARATEPROC glad_glBlendFuncSeparate; +#define glBlendFuncSeparate glad_glBlendFuncSeparate +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC)(GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount); +GLAPI PFNGLMULTIDRAWARRAYSPROC glad_glMultiDrawArrays; +#define glMultiDrawArrays glad_glMultiDrawArrays +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC)(GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount); +GLAPI PFNGLMULTIDRAWELEMENTSPROC glad_glMultiDrawElements; +#define glMultiDrawElements glad_glMultiDrawElements +typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC)(GLenum pname, GLfloat param); +GLAPI PFNGLPOINTPARAMETERFPROC glad_glPointParameterf; +#define glPointParameterf glad_glPointParameterf +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC)(GLenum pname, const GLfloat *params); +GLAPI PFNGLPOINTPARAMETERFVPROC glad_glPointParameterfv; +#define glPointParameterfv glad_glPointParameterfv +typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC)(GLenum pname, GLint param); +GLAPI PFNGLPOINTPARAMETERIPROC glad_glPointParameteri; +#define glPointParameteri glad_glPointParameteri +typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC)(GLenum pname, const GLint *params); +GLAPI PFNGLPOINTPARAMETERIVPROC glad_glPointParameteriv; +#define glPointParameteriv glad_glPointParameteriv +typedef void (APIENTRYP PFNGLBLENDCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GLAPI PFNGLBLENDCOLORPROC glad_glBlendColor; +#define glBlendColor glad_glBlendColor +typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC)(GLenum mode); +GLAPI PFNGLBLENDEQUATIONPROC glad_glBlendEquation; +#define glBlendEquation glad_glBlendEquation +#endif +#ifndef GL_VERSION_1_5 +#define GL_VERSION_1_5 1 +GLAPI int GLAD_GL_VERSION_1_5; +typedef void (APIENTRYP PFNGLGENQUERIESPROC)(GLsizei n, GLuint *ids); +GLAPI PFNGLGENQUERIESPROC glad_glGenQueries; +#define glGenQueries glad_glGenQueries +typedef void (APIENTRYP PFNGLDELETEQUERIESPROC)(GLsizei n, const GLuint *ids); +GLAPI PFNGLDELETEQUERIESPROC glad_glDeleteQueries; +#define glDeleteQueries glad_glDeleteQueries +typedef GLboolean (APIENTRYP PFNGLISQUERYPROC)(GLuint id); +GLAPI PFNGLISQUERYPROC glad_glIsQuery; +#define glIsQuery glad_glIsQuery +typedef void (APIENTRYP PFNGLBEGINQUERYPROC)(GLenum target, GLuint id); +GLAPI PFNGLBEGINQUERYPROC glad_glBeginQuery; +#define glBeginQuery glad_glBeginQuery +typedef void (APIENTRYP PFNGLENDQUERYPROC)(GLenum target); +GLAPI PFNGLENDQUERYPROC glad_glEndQuery; +#define glEndQuery glad_glEndQuery +typedef void (APIENTRYP PFNGLGETQUERYIVPROC)(GLenum target, GLenum pname, GLint *params); +GLAPI PFNGLGETQUERYIVPROC glad_glGetQueryiv; +#define glGetQueryiv glad_glGetQueryiv +typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC)(GLuint id, GLenum pname, GLint *params); +GLAPI PFNGLGETQUERYOBJECTIVPROC glad_glGetQueryObjectiv; +#define glGetQueryObjectiv glad_glGetQueryObjectiv +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC)(GLuint id, GLenum pname, GLuint *params); +GLAPI PFNGLGETQUERYOBJECTUIVPROC glad_glGetQueryObjectuiv; +#define glGetQueryObjectuiv glad_glGetQueryObjectuiv +typedef void (APIENTRYP PFNGLBINDBUFFERPROC)(GLenum target, GLuint buffer); +GLAPI PFNGLBINDBUFFERPROC glad_glBindBuffer; +#define glBindBuffer glad_glBindBuffer +typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC)(GLsizei n, const GLuint *buffers); +GLAPI PFNGLDELETEBUFFERSPROC glad_glDeleteBuffers; +#define glDeleteBuffers glad_glDeleteBuffers +typedef void (APIENTRYP PFNGLGENBUFFERSPROC)(GLsizei n, GLuint *buffers); +GLAPI PFNGLGENBUFFERSPROC glad_glGenBuffers; +#define glGenBuffers glad_glGenBuffers +typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC)(GLuint buffer); +GLAPI PFNGLISBUFFERPROC glad_glIsBuffer; +#define glIsBuffer glad_glIsBuffer +typedef void (APIENTRYP PFNGLBUFFERDATAPROC)(GLenum target, GLsizeiptr size, const void *data, GLenum usage); +GLAPI PFNGLBUFFERDATAPROC glad_glBufferData; +#define glBufferData glad_glBufferData +typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC)(GLenum target, GLintptr offset, GLsizeiptr size, const void *data); +GLAPI PFNGLBUFFERSUBDATAPROC glad_glBufferSubData; +#define glBufferSubData glad_glBufferSubData +typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC)(GLenum target, GLintptr offset, GLsizeiptr size, void *data); +GLAPI PFNGLGETBUFFERSUBDATAPROC glad_glGetBufferSubData; +#define glGetBufferSubData glad_glGetBufferSubData +typedef void * (APIENTRYP PFNGLMAPBUFFERPROC)(GLenum target, GLenum access); +GLAPI PFNGLMAPBUFFERPROC glad_glMapBuffer; +#define glMapBuffer glad_glMapBuffer +typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC)(GLenum target); +GLAPI PFNGLUNMAPBUFFERPROC glad_glUnmapBuffer; +#define glUnmapBuffer glad_glUnmapBuffer +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint *params); +GLAPI PFNGLGETBUFFERPARAMETERIVPROC glad_glGetBufferParameteriv; +#define glGetBufferParameteriv glad_glGetBufferParameteriv +typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC)(GLenum target, GLenum pname, void **params); +GLAPI PFNGLGETBUFFERPOINTERVPROC glad_glGetBufferPointerv; +#define glGetBufferPointerv glad_glGetBufferPointerv +#endif +#ifndef GL_VERSION_2_0 +#define GL_VERSION_2_0 1 +GLAPI int GLAD_GL_VERSION_2_0; +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC)(GLenum modeRGB, GLenum modeAlpha); +GLAPI PFNGLBLENDEQUATIONSEPARATEPROC glad_glBlendEquationSeparate; +#define glBlendEquationSeparate glad_glBlendEquationSeparate +typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC)(GLsizei n, const GLenum *bufs); +GLAPI PFNGLDRAWBUFFERSPROC glad_glDrawBuffers; +#define glDrawBuffers glad_glDrawBuffers +typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC)(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +GLAPI PFNGLSTENCILOPSEPARATEPROC glad_glStencilOpSeparate; +#define glStencilOpSeparate glad_glStencilOpSeparate +typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC)(GLenum face, GLenum func, GLint ref, GLuint mask); +GLAPI PFNGLSTENCILFUNCSEPARATEPROC glad_glStencilFuncSeparate; +#define glStencilFuncSeparate glad_glStencilFuncSeparate +typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC)(GLenum face, GLuint mask); +GLAPI PFNGLSTENCILMASKSEPARATEPROC glad_glStencilMaskSeparate; +#define glStencilMaskSeparate glad_glStencilMaskSeparate +typedef void (APIENTRYP PFNGLATTACHSHADERPROC)(GLuint program, GLuint shader); +GLAPI PFNGLATTACHSHADERPROC glad_glAttachShader; +#define glAttachShader glad_glAttachShader +typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC)(GLuint program, GLuint index, const GLchar *name); +GLAPI PFNGLBINDATTRIBLOCATIONPROC glad_glBindAttribLocation; +#define glBindAttribLocation glad_glBindAttribLocation +typedef void (APIENTRYP PFNGLCOMPILESHADERPROC)(GLuint shader); +GLAPI PFNGLCOMPILESHADERPROC glad_glCompileShader; +#define glCompileShader glad_glCompileShader +typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC)(void); +GLAPI PFNGLCREATEPROGRAMPROC glad_glCreateProgram; +#define glCreateProgram glad_glCreateProgram +typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC)(GLenum type); +GLAPI PFNGLCREATESHADERPROC glad_glCreateShader; +#define glCreateShader glad_glCreateShader +typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC)(GLuint program); +GLAPI PFNGLDELETEPROGRAMPROC glad_glDeleteProgram; +#define glDeleteProgram glad_glDeleteProgram +typedef void (APIENTRYP PFNGLDELETESHADERPROC)(GLuint shader); +GLAPI PFNGLDELETESHADERPROC glad_glDeleteShader; +#define glDeleteShader glad_glDeleteShader +typedef void (APIENTRYP PFNGLDETACHSHADERPROC)(GLuint program, GLuint shader); +GLAPI PFNGLDETACHSHADERPROC glad_glDetachShader; +#define glDetachShader glad_glDetachShader +typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC)(GLuint index); +GLAPI PFNGLDISABLEVERTEXATTRIBARRAYPROC glad_glDisableVertexAttribArray; +#define glDisableVertexAttribArray glad_glDisableVertexAttribArray +typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC)(GLuint index); +GLAPI PFNGLENABLEVERTEXATTRIBARRAYPROC glad_glEnableVertexAttribArray; +#define glEnableVertexAttribArray glad_glEnableVertexAttribArray +typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GLAPI PFNGLGETACTIVEATTRIBPROC glad_glGetActiveAttrib; +#define glGetActiveAttrib glad_glGetActiveAttrib +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +GLAPI PFNGLGETACTIVEUNIFORMPROC glad_glGetActiveUniform; +#define glGetActiveUniform glad_glGetActiveUniform +typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC)(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); +GLAPI PFNGLGETATTACHEDSHADERSPROC glad_glGetAttachedShaders; +#define glGetAttachedShaders glad_glGetAttachedShaders +typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC)(GLuint program, const GLchar *name); +GLAPI PFNGLGETATTRIBLOCATIONPROC glad_glGetAttribLocation; +#define glGetAttribLocation glad_glGetAttribLocation +typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC)(GLuint program, GLenum pname, GLint *params); +GLAPI PFNGLGETPROGRAMIVPROC glad_glGetProgramiv; +#define glGetProgramiv glad_glGetProgramiv +typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC)(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GLAPI PFNGLGETPROGRAMINFOLOGPROC glad_glGetProgramInfoLog; +#define glGetProgramInfoLog glad_glGetProgramInfoLog +typedef void (APIENTRYP PFNGLGETSHADERIVPROC)(GLuint shader, GLenum pname, GLint *params); +GLAPI PFNGLGETSHADERIVPROC glad_glGetShaderiv; +#define glGetShaderiv glad_glGetShaderiv +typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GLAPI PFNGLGETSHADERINFOLOGPROC glad_glGetShaderInfoLog; +#define glGetShaderInfoLog glad_glGetShaderInfoLog +typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +GLAPI PFNGLGETSHADERSOURCEPROC glad_glGetShaderSource; +#define glGetShaderSource glad_glGetShaderSource +typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC)(GLuint program, const GLchar *name); +GLAPI PFNGLGETUNIFORMLOCATIONPROC glad_glGetUniformLocation; +#define glGetUniformLocation glad_glGetUniformLocation +typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC)(GLuint program, GLint location, GLfloat *params); +GLAPI PFNGLGETUNIFORMFVPROC glad_glGetUniformfv; +#define glGetUniformfv glad_glGetUniformfv +typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC)(GLuint program, GLint location, GLint *params); +GLAPI PFNGLGETUNIFORMIVPROC glad_glGetUniformiv; +#define glGetUniformiv glad_glGetUniformiv +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC)(GLuint index, GLenum pname, GLdouble *params); +GLAPI PFNGLGETVERTEXATTRIBDVPROC glad_glGetVertexAttribdv; +#define glGetVertexAttribdv glad_glGetVertexAttribdv +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC)(GLuint index, GLenum pname, GLfloat *params); +GLAPI PFNGLGETVERTEXATTRIBFVPROC glad_glGetVertexAttribfv; +#define glGetVertexAttribfv glad_glGetVertexAttribfv +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC)(GLuint index, GLenum pname, GLint *params); +GLAPI PFNGLGETVERTEXATTRIBIVPROC glad_glGetVertexAttribiv; +#define glGetVertexAttribiv glad_glGetVertexAttribiv +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC)(GLuint index, GLenum pname, void **pointer); +GLAPI PFNGLGETVERTEXATTRIBPOINTERVPROC glad_glGetVertexAttribPointerv; +#define glGetVertexAttribPointerv glad_glGetVertexAttribPointerv +typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC)(GLuint program); +GLAPI PFNGLISPROGRAMPROC glad_glIsProgram; +#define glIsProgram glad_glIsProgram +typedef GLboolean (APIENTRYP PFNGLISSHADERPROC)(GLuint shader); +GLAPI PFNGLISSHADERPROC glad_glIsShader; +#define glIsShader glad_glIsShader +typedef void (APIENTRYP PFNGLLINKPROGRAMPROC)(GLuint program); +GLAPI PFNGLLINKPROGRAMPROC glad_glLinkProgram; +#define glLinkProgram glad_glLinkProgram +typedef void (APIENTRYP PFNGLSHADERSOURCEPROC)(GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); +GLAPI PFNGLSHADERSOURCEPROC glad_glShaderSource; +#define glShaderSource glad_glShaderSource +typedef void (APIENTRYP PFNGLUSEPROGRAMPROC)(GLuint program); +GLAPI PFNGLUSEPROGRAMPROC glad_glUseProgram; +#define glUseProgram glad_glUseProgram +typedef void (APIENTRYP PFNGLUNIFORM1FPROC)(GLint location, GLfloat v0); +GLAPI PFNGLUNIFORM1FPROC glad_glUniform1f; +#define glUniform1f glad_glUniform1f +typedef void (APIENTRYP PFNGLUNIFORM2FPROC)(GLint location, GLfloat v0, GLfloat v1); +GLAPI PFNGLUNIFORM2FPROC glad_glUniform2f; +#define glUniform2f glad_glUniform2f +typedef void (APIENTRYP PFNGLUNIFORM3FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GLAPI PFNGLUNIFORM3FPROC glad_glUniform3f; +#define glUniform3f glad_glUniform3f +typedef void (APIENTRYP PFNGLUNIFORM4FPROC)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GLAPI PFNGLUNIFORM4FPROC glad_glUniform4f; +#define glUniform4f glad_glUniform4f +typedef void (APIENTRYP PFNGLUNIFORM1IPROC)(GLint location, GLint v0); +GLAPI PFNGLUNIFORM1IPROC glad_glUniform1i; +#define glUniform1i glad_glUniform1i +typedef void (APIENTRYP PFNGLUNIFORM2IPROC)(GLint location, GLint v0, GLint v1); +GLAPI PFNGLUNIFORM2IPROC glad_glUniform2i; +#define glUniform2i glad_glUniform2i +typedef void (APIENTRYP PFNGLUNIFORM3IPROC)(GLint location, GLint v0, GLint v1, GLint v2); +GLAPI PFNGLUNIFORM3IPROC glad_glUniform3i; +#define glUniform3i glad_glUniform3i +typedef void (APIENTRYP PFNGLUNIFORM4IPROC)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GLAPI PFNGLUNIFORM4IPROC glad_glUniform4i; +#define glUniform4i glad_glUniform4i +typedef void (APIENTRYP PFNGLUNIFORM1FVPROC)(GLint location, GLsizei count, const GLfloat *value); +GLAPI PFNGLUNIFORM1FVPROC glad_glUniform1fv; +#define glUniform1fv glad_glUniform1fv +typedef void (APIENTRYP PFNGLUNIFORM2FVPROC)(GLint location, GLsizei count, const GLfloat *value); +GLAPI PFNGLUNIFORM2FVPROC glad_glUniform2fv; +#define glUniform2fv glad_glUniform2fv +typedef void (APIENTRYP PFNGLUNIFORM3FVPROC)(GLint location, GLsizei count, const GLfloat *value); +GLAPI PFNGLUNIFORM3FVPROC glad_glUniform3fv; +#define glUniform3fv glad_glUniform3fv +typedef void (APIENTRYP PFNGLUNIFORM4FVPROC)(GLint location, GLsizei count, const GLfloat *value); +GLAPI PFNGLUNIFORM4FVPROC glad_glUniform4fv; +#define glUniform4fv glad_glUniform4fv +typedef void (APIENTRYP PFNGLUNIFORM1IVPROC)(GLint location, GLsizei count, const GLint *value); +GLAPI PFNGLUNIFORM1IVPROC glad_glUniform1iv; +#define glUniform1iv glad_glUniform1iv +typedef void (APIENTRYP PFNGLUNIFORM2IVPROC)(GLint location, GLsizei count, const GLint *value); +GLAPI PFNGLUNIFORM2IVPROC glad_glUniform2iv; +#define glUniform2iv glad_glUniform2iv +typedef void (APIENTRYP PFNGLUNIFORM3IVPROC)(GLint location, GLsizei count, const GLint *value); +GLAPI PFNGLUNIFORM3IVPROC glad_glUniform3iv; +#define glUniform3iv glad_glUniform3iv +typedef void (APIENTRYP PFNGLUNIFORM4IVPROC)(GLint location, GLsizei count, const GLint *value); +GLAPI PFNGLUNIFORM4IVPROC glad_glUniform4iv; +#define glUniform4iv glad_glUniform4iv +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI PFNGLUNIFORMMATRIX2FVPROC glad_glUniformMatrix2fv; +#define glUniformMatrix2fv glad_glUniformMatrix2fv +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI PFNGLUNIFORMMATRIX3FVPROC glad_glUniformMatrix3fv; +#define glUniformMatrix3fv glad_glUniformMatrix3fv +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI PFNGLUNIFORMMATRIX4FVPROC glad_glUniformMatrix4fv; +#define glUniformMatrix4fv glad_glUniformMatrix4fv +typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC)(GLuint program); +GLAPI PFNGLVALIDATEPROGRAMPROC glad_glValidateProgram; +#define glValidateProgram glad_glValidateProgram +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC)(GLuint index, GLdouble x); +GLAPI PFNGLVERTEXATTRIB1DPROC glad_glVertexAttrib1d; +#define glVertexAttrib1d glad_glVertexAttrib1d +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC)(GLuint index, const GLdouble *v); +GLAPI PFNGLVERTEXATTRIB1DVPROC glad_glVertexAttrib1dv; +#define glVertexAttrib1dv glad_glVertexAttrib1dv +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC)(GLuint index, GLfloat x); +GLAPI PFNGLVERTEXATTRIB1FPROC glad_glVertexAttrib1f; +#define glVertexAttrib1f glad_glVertexAttrib1f +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC)(GLuint index, const GLfloat *v); +GLAPI PFNGLVERTEXATTRIB1FVPROC glad_glVertexAttrib1fv; +#define glVertexAttrib1fv glad_glVertexAttrib1fv +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC)(GLuint index, GLshort x); +GLAPI PFNGLVERTEXATTRIB1SPROC glad_glVertexAttrib1s; +#define glVertexAttrib1s glad_glVertexAttrib1s +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC)(GLuint index, const GLshort *v); +GLAPI PFNGLVERTEXATTRIB1SVPROC glad_glVertexAttrib1sv; +#define glVertexAttrib1sv glad_glVertexAttrib1sv +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC)(GLuint index, GLdouble x, GLdouble y); +GLAPI PFNGLVERTEXATTRIB2DPROC glad_glVertexAttrib2d; +#define glVertexAttrib2d glad_glVertexAttrib2d +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC)(GLuint index, const GLdouble *v); +GLAPI PFNGLVERTEXATTRIB2DVPROC glad_glVertexAttrib2dv; +#define glVertexAttrib2dv glad_glVertexAttrib2dv +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC)(GLuint index, GLfloat x, GLfloat y); +GLAPI PFNGLVERTEXATTRIB2FPROC glad_glVertexAttrib2f; +#define glVertexAttrib2f glad_glVertexAttrib2f +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC)(GLuint index, const GLfloat *v); +GLAPI PFNGLVERTEXATTRIB2FVPROC glad_glVertexAttrib2fv; +#define glVertexAttrib2fv glad_glVertexAttrib2fv +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC)(GLuint index, GLshort x, GLshort y); +GLAPI PFNGLVERTEXATTRIB2SPROC glad_glVertexAttrib2s; +#define glVertexAttrib2s glad_glVertexAttrib2s +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC)(GLuint index, const GLshort *v); +GLAPI PFNGLVERTEXATTRIB2SVPROC glad_glVertexAttrib2sv; +#define glVertexAttrib2sv glad_glVertexAttrib2sv +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC)(GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI PFNGLVERTEXATTRIB3DPROC glad_glVertexAttrib3d; +#define glVertexAttrib3d glad_glVertexAttrib3d +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC)(GLuint index, const GLdouble *v); +GLAPI PFNGLVERTEXATTRIB3DVPROC glad_glVertexAttrib3dv; +#define glVertexAttrib3dv glad_glVertexAttrib3dv +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z); +GLAPI PFNGLVERTEXATTRIB3FPROC glad_glVertexAttrib3f; +#define glVertexAttrib3f glad_glVertexAttrib3f +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC)(GLuint index, const GLfloat *v); +GLAPI PFNGLVERTEXATTRIB3FVPROC glad_glVertexAttrib3fv; +#define glVertexAttrib3fv glad_glVertexAttrib3fv +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC)(GLuint index, GLshort x, GLshort y, GLshort z); +GLAPI PFNGLVERTEXATTRIB3SPROC glad_glVertexAttrib3s; +#define glVertexAttrib3s glad_glVertexAttrib3s +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC)(GLuint index, const GLshort *v); +GLAPI PFNGLVERTEXATTRIB3SVPROC glad_glVertexAttrib3sv; +#define glVertexAttrib3sv glad_glVertexAttrib3sv +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC)(GLuint index, const GLbyte *v); +GLAPI PFNGLVERTEXATTRIB4NBVPROC glad_glVertexAttrib4Nbv; +#define glVertexAttrib4Nbv glad_glVertexAttrib4Nbv +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC)(GLuint index, const GLint *v); +GLAPI PFNGLVERTEXATTRIB4NIVPROC glad_glVertexAttrib4Niv; +#define glVertexAttrib4Niv glad_glVertexAttrib4Niv +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC)(GLuint index, const GLshort *v); +GLAPI PFNGLVERTEXATTRIB4NSVPROC glad_glVertexAttrib4Nsv; +#define glVertexAttrib4Nsv glad_glVertexAttrib4Nsv +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +GLAPI PFNGLVERTEXATTRIB4NUBPROC glad_glVertexAttrib4Nub; +#define glVertexAttrib4Nub glad_glVertexAttrib4Nub +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC)(GLuint index, const GLubyte *v); +GLAPI PFNGLVERTEXATTRIB4NUBVPROC glad_glVertexAttrib4Nubv; +#define glVertexAttrib4Nubv glad_glVertexAttrib4Nubv +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC)(GLuint index, const GLuint *v); +GLAPI PFNGLVERTEXATTRIB4NUIVPROC glad_glVertexAttrib4Nuiv; +#define glVertexAttrib4Nuiv glad_glVertexAttrib4Nuiv +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC)(GLuint index, const GLushort *v); +GLAPI PFNGLVERTEXATTRIB4NUSVPROC glad_glVertexAttrib4Nusv; +#define glVertexAttrib4Nusv glad_glVertexAttrib4Nusv +typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC)(GLuint index, const GLbyte *v); +GLAPI PFNGLVERTEXATTRIB4BVPROC glad_glVertexAttrib4bv; +#define glVertexAttrib4bv glad_glVertexAttrib4bv +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI PFNGLVERTEXATTRIB4DPROC glad_glVertexAttrib4d; +#define glVertexAttrib4d glad_glVertexAttrib4d +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC)(GLuint index, const GLdouble *v); +GLAPI PFNGLVERTEXATTRIB4DVPROC glad_glVertexAttrib4dv; +#define glVertexAttrib4dv glad_glVertexAttrib4dv +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI PFNGLVERTEXATTRIB4FPROC glad_glVertexAttrib4f; +#define glVertexAttrib4f glad_glVertexAttrib4f +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC)(GLuint index, const GLfloat *v); +GLAPI PFNGLVERTEXATTRIB4FVPROC glad_glVertexAttrib4fv; +#define glVertexAttrib4fv glad_glVertexAttrib4fv +typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC)(GLuint index, const GLint *v); +GLAPI PFNGLVERTEXATTRIB4IVPROC glad_glVertexAttrib4iv; +#define glVertexAttrib4iv glad_glVertexAttrib4iv +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +GLAPI PFNGLVERTEXATTRIB4SPROC glad_glVertexAttrib4s; +#define glVertexAttrib4s glad_glVertexAttrib4s +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC)(GLuint index, const GLshort *v); +GLAPI PFNGLVERTEXATTRIB4SVPROC glad_glVertexAttrib4sv; +#define glVertexAttrib4sv glad_glVertexAttrib4sv +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC)(GLuint index, const GLubyte *v); +GLAPI PFNGLVERTEXATTRIB4UBVPROC glad_glVertexAttrib4ubv; +#define glVertexAttrib4ubv glad_glVertexAttrib4ubv +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC)(GLuint index, const GLuint *v); +GLAPI PFNGLVERTEXATTRIB4UIVPROC glad_glVertexAttrib4uiv; +#define glVertexAttrib4uiv glad_glVertexAttrib4uiv +typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC)(GLuint index, const GLushort *v); +GLAPI PFNGLVERTEXATTRIB4USVPROC glad_glVertexAttrib4usv; +#define glVertexAttrib4usv glad_glVertexAttrib4usv +typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); +GLAPI PFNGLVERTEXATTRIBPOINTERPROC glad_glVertexAttribPointer; +#define glVertexAttribPointer glad_glVertexAttribPointer +#endif +#ifndef GL_VERSION_2_1 +#define GL_VERSION_2_1 1 +GLAPI int GLAD_GL_VERSION_2_1; +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI PFNGLUNIFORMMATRIX2X3FVPROC glad_glUniformMatrix2x3fv; +#define glUniformMatrix2x3fv glad_glUniformMatrix2x3fv +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI PFNGLUNIFORMMATRIX3X2FVPROC glad_glUniformMatrix3x2fv; +#define glUniformMatrix3x2fv glad_glUniformMatrix3x2fv +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI PFNGLUNIFORMMATRIX2X4FVPROC glad_glUniformMatrix2x4fv; +#define glUniformMatrix2x4fv glad_glUniformMatrix2x4fv +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI PFNGLUNIFORMMATRIX4X2FVPROC glad_glUniformMatrix4x2fv; +#define glUniformMatrix4x2fv glad_glUniformMatrix4x2fv +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI PFNGLUNIFORMMATRIX3X4FVPROC glad_glUniformMatrix3x4fv; +#define glUniformMatrix3x4fv glad_glUniformMatrix3x4fv +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI PFNGLUNIFORMMATRIX4X3FVPROC glad_glUniformMatrix4x3fv; +#define glUniformMatrix4x3fv glad_glUniformMatrix4x3fv +#endif +#ifndef GL_VERSION_3_0 +#define GL_VERSION_3_0 1 +GLAPI int GLAD_GL_VERSION_3_0; +typedef void (APIENTRYP PFNGLCOLORMASKIPROC)(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +GLAPI PFNGLCOLORMASKIPROC glad_glColorMaski; +#define glColorMaski glad_glColorMaski +typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC)(GLenum target, GLuint index, GLboolean *data); +GLAPI PFNGLGETBOOLEANI_VPROC glad_glGetBooleani_v; +#define glGetBooleani_v glad_glGetBooleani_v +typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC)(GLenum target, GLuint index, GLint *data); +GLAPI PFNGLGETINTEGERI_VPROC glad_glGetIntegeri_v; +#define glGetIntegeri_v glad_glGetIntegeri_v +typedef void (APIENTRYP PFNGLENABLEIPROC)(GLenum target, GLuint index); +GLAPI PFNGLENABLEIPROC glad_glEnablei; +#define glEnablei glad_glEnablei +typedef void (APIENTRYP PFNGLDISABLEIPROC)(GLenum target, GLuint index); +GLAPI PFNGLDISABLEIPROC glad_glDisablei; +#define glDisablei glad_glDisablei +typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC)(GLenum target, GLuint index); +GLAPI PFNGLISENABLEDIPROC glad_glIsEnabledi; +#define glIsEnabledi glad_glIsEnabledi +typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC)(GLenum primitiveMode); +GLAPI PFNGLBEGINTRANSFORMFEEDBACKPROC glad_glBeginTransformFeedback; +#define glBeginTransformFeedback glad_glBeginTransformFeedback +typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC)(void); +GLAPI PFNGLENDTRANSFORMFEEDBACKPROC glad_glEndTransformFeedback; +#define glEndTransformFeedback glad_glEndTransformFeedback +typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI PFNGLBINDBUFFERRANGEPROC glad_glBindBufferRange; +#define glBindBufferRange glad_glBindBufferRange +typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC)(GLenum target, GLuint index, GLuint buffer); +GLAPI PFNGLBINDBUFFERBASEPROC glad_glBindBufferBase; +#define glBindBufferBase glad_glBindBufferBase +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC)(GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); +GLAPI PFNGLTRANSFORMFEEDBACKVARYINGSPROC glad_glTransformFeedbackVaryings; +#define glTransformFeedbackVaryings glad_glTransformFeedbackVaryings +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +GLAPI PFNGLGETTRANSFORMFEEDBACKVARYINGPROC glad_glGetTransformFeedbackVarying; +#define glGetTransformFeedbackVarying glad_glGetTransformFeedbackVarying +typedef void (APIENTRYP PFNGLCLAMPCOLORPROC)(GLenum target, GLenum clamp); +GLAPI PFNGLCLAMPCOLORPROC glad_glClampColor; +#define glClampColor glad_glClampColor +typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC)(GLuint id, GLenum mode); +GLAPI PFNGLBEGINCONDITIONALRENDERPROC glad_glBeginConditionalRender; +#define glBeginConditionalRender glad_glBeginConditionalRender +typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC)(void); +GLAPI PFNGLENDCONDITIONALRENDERPROC glad_glEndConditionalRender; +#define glEndConditionalRender glad_glEndConditionalRender +typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC)(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +GLAPI PFNGLVERTEXATTRIBIPOINTERPROC glad_glVertexAttribIPointer; +#define glVertexAttribIPointer glad_glVertexAttribIPointer +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC)(GLuint index, GLenum pname, GLint *params); +GLAPI PFNGLGETVERTEXATTRIBIIVPROC glad_glGetVertexAttribIiv; +#define glGetVertexAttribIiv glad_glGetVertexAttribIiv +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC)(GLuint index, GLenum pname, GLuint *params); +GLAPI PFNGLGETVERTEXATTRIBIUIVPROC glad_glGetVertexAttribIuiv; +#define glGetVertexAttribIuiv glad_glGetVertexAttribIuiv +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC)(GLuint index, GLint x); +GLAPI PFNGLVERTEXATTRIBI1IPROC glad_glVertexAttribI1i; +#define glVertexAttribI1i glad_glVertexAttribI1i +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC)(GLuint index, GLint x, GLint y); +GLAPI PFNGLVERTEXATTRIBI2IPROC glad_glVertexAttribI2i; +#define glVertexAttribI2i glad_glVertexAttribI2i +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC)(GLuint index, GLint x, GLint y, GLint z); +GLAPI PFNGLVERTEXATTRIBI3IPROC glad_glVertexAttribI3i; +#define glVertexAttribI3i glad_glVertexAttribI3i +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC)(GLuint index, GLint x, GLint y, GLint z, GLint w); +GLAPI PFNGLVERTEXATTRIBI4IPROC glad_glVertexAttribI4i; +#define glVertexAttribI4i glad_glVertexAttribI4i +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC)(GLuint index, GLuint x); +GLAPI PFNGLVERTEXATTRIBI1UIPROC glad_glVertexAttribI1ui; +#define glVertexAttribI1ui glad_glVertexAttribI1ui +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC)(GLuint index, GLuint x, GLuint y); +GLAPI PFNGLVERTEXATTRIBI2UIPROC glad_glVertexAttribI2ui; +#define glVertexAttribI2ui glad_glVertexAttribI2ui +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC)(GLuint index, GLuint x, GLuint y, GLuint z); +GLAPI PFNGLVERTEXATTRIBI3UIPROC glad_glVertexAttribI3ui; +#define glVertexAttribI3ui glad_glVertexAttribI3ui +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GLAPI PFNGLVERTEXATTRIBI4UIPROC glad_glVertexAttribI4ui; +#define glVertexAttribI4ui glad_glVertexAttribI4ui +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC)(GLuint index, const GLint *v); +GLAPI PFNGLVERTEXATTRIBI1IVPROC glad_glVertexAttribI1iv; +#define glVertexAttribI1iv glad_glVertexAttribI1iv +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC)(GLuint index, const GLint *v); +GLAPI PFNGLVERTEXATTRIBI2IVPROC glad_glVertexAttribI2iv; +#define glVertexAttribI2iv glad_glVertexAttribI2iv +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC)(GLuint index, const GLint *v); +GLAPI PFNGLVERTEXATTRIBI3IVPROC glad_glVertexAttribI3iv; +#define glVertexAttribI3iv glad_glVertexAttribI3iv +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC)(GLuint index, const GLint *v); +GLAPI PFNGLVERTEXATTRIBI4IVPROC glad_glVertexAttribI4iv; +#define glVertexAttribI4iv glad_glVertexAttribI4iv +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC)(GLuint index, const GLuint *v); +GLAPI PFNGLVERTEXATTRIBI1UIVPROC glad_glVertexAttribI1uiv; +#define glVertexAttribI1uiv glad_glVertexAttribI1uiv +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC)(GLuint index, const GLuint *v); +GLAPI PFNGLVERTEXATTRIBI2UIVPROC glad_glVertexAttribI2uiv; +#define glVertexAttribI2uiv glad_glVertexAttribI2uiv +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC)(GLuint index, const GLuint *v); +GLAPI PFNGLVERTEXATTRIBI3UIVPROC glad_glVertexAttribI3uiv; +#define glVertexAttribI3uiv glad_glVertexAttribI3uiv +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC)(GLuint index, const GLuint *v); +GLAPI PFNGLVERTEXATTRIBI4UIVPROC glad_glVertexAttribI4uiv; +#define glVertexAttribI4uiv glad_glVertexAttribI4uiv +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC)(GLuint index, const GLbyte *v); +GLAPI PFNGLVERTEXATTRIBI4BVPROC glad_glVertexAttribI4bv; +#define glVertexAttribI4bv glad_glVertexAttribI4bv +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC)(GLuint index, const GLshort *v); +GLAPI PFNGLVERTEXATTRIBI4SVPROC glad_glVertexAttribI4sv; +#define glVertexAttribI4sv glad_glVertexAttribI4sv +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC)(GLuint index, const GLubyte *v); +GLAPI PFNGLVERTEXATTRIBI4UBVPROC glad_glVertexAttribI4ubv; +#define glVertexAttribI4ubv glad_glVertexAttribI4ubv +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC)(GLuint index, const GLushort *v); +GLAPI PFNGLVERTEXATTRIBI4USVPROC glad_glVertexAttribI4usv; +#define glVertexAttribI4usv glad_glVertexAttribI4usv +typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC)(GLuint program, GLint location, GLuint *params); +GLAPI PFNGLGETUNIFORMUIVPROC glad_glGetUniformuiv; +#define glGetUniformuiv glad_glGetUniformuiv +typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC)(GLuint program, GLuint color, const GLchar *name); +GLAPI PFNGLBINDFRAGDATALOCATIONPROC glad_glBindFragDataLocation; +#define glBindFragDataLocation glad_glBindFragDataLocation +typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC)(GLuint program, const GLchar *name); +GLAPI PFNGLGETFRAGDATALOCATIONPROC glad_glGetFragDataLocation; +#define glGetFragDataLocation glad_glGetFragDataLocation +typedef void (APIENTRYP PFNGLUNIFORM1UIPROC)(GLint location, GLuint v0); +GLAPI PFNGLUNIFORM1UIPROC glad_glUniform1ui; +#define glUniform1ui glad_glUniform1ui +typedef void (APIENTRYP PFNGLUNIFORM2UIPROC)(GLint location, GLuint v0, GLuint v1); +GLAPI PFNGLUNIFORM2UIPROC glad_glUniform2ui; +#define glUniform2ui glad_glUniform2ui +typedef void (APIENTRYP PFNGLUNIFORM3UIPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2); +GLAPI PFNGLUNIFORM3UIPROC glad_glUniform3ui; +#define glUniform3ui glad_glUniform3ui +typedef void (APIENTRYP PFNGLUNIFORM4UIPROC)(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GLAPI PFNGLUNIFORM4UIPROC glad_glUniform4ui; +#define glUniform4ui glad_glUniform4ui +typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC)(GLint location, GLsizei count, const GLuint *value); +GLAPI PFNGLUNIFORM1UIVPROC glad_glUniform1uiv; +#define glUniform1uiv glad_glUniform1uiv +typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC)(GLint location, GLsizei count, const GLuint *value); +GLAPI PFNGLUNIFORM2UIVPROC glad_glUniform2uiv; +#define glUniform2uiv glad_glUniform2uiv +typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC)(GLint location, GLsizei count, const GLuint *value); +GLAPI PFNGLUNIFORM3UIVPROC glad_glUniform3uiv; +#define glUniform3uiv glad_glUniform3uiv +typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC)(GLint location, GLsizei count, const GLuint *value); +GLAPI PFNGLUNIFORM4UIVPROC glad_glUniform4uiv; +#define glUniform4uiv glad_glUniform4uiv +typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC)(GLenum target, GLenum pname, const GLint *params); +GLAPI PFNGLTEXPARAMETERIIVPROC glad_glTexParameterIiv; +#define glTexParameterIiv glad_glTexParameterIiv +typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC)(GLenum target, GLenum pname, const GLuint *params); +GLAPI PFNGLTEXPARAMETERIUIVPROC glad_glTexParameterIuiv; +#define glTexParameterIuiv glad_glTexParameterIuiv +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC)(GLenum target, GLenum pname, GLint *params); +GLAPI PFNGLGETTEXPARAMETERIIVPROC glad_glGetTexParameterIiv; +#define glGetTexParameterIiv glad_glGetTexParameterIiv +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC)(GLenum target, GLenum pname, GLuint *params); +GLAPI PFNGLGETTEXPARAMETERIUIVPROC glad_glGetTexParameterIuiv; +#define glGetTexParameterIuiv glad_glGetTexParameterIuiv +typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC)(GLenum buffer, GLint drawbuffer, const GLint *value); +GLAPI PFNGLCLEARBUFFERIVPROC glad_glClearBufferiv; +#define glClearBufferiv glad_glClearBufferiv +typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC)(GLenum buffer, GLint drawbuffer, const GLuint *value); +GLAPI PFNGLCLEARBUFFERUIVPROC glad_glClearBufferuiv; +#define glClearBufferuiv glad_glClearBufferuiv +typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC)(GLenum buffer, GLint drawbuffer, const GLfloat *value); +GLAPI PFNGLCLEARBUFFERFVPROC glad_glClearBufferfv; +#define glClearBufferfv glad_glClearBufferfv +typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC)(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +GLAPI PFNGLCLEARBUFFERFIPROC glad_glClearBufferfi; +#define glClearBufferfi glad_glClearBufferfi +typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGIPROC)(GLenum name, GLuint index); +GLAPI PFNGLGETSTRINGIPROC glad_glGetStringi; +#define glGetStringi glad_glGetStringi +typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC)(GLuint renderbuffer); +GLAPI PFNGLISRENDERBUFFERPROC glad_glIsRenderbuffer; +#define glIsRenderbuffer glad_glIsRenderbuffer +typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC)(GLenum target, GLuint renderbuffer); +GLAPI PFNGLBINDRENDERBUFFERPROC glad_glBindRenderbuffer; +#define glBindRenderbuffer glad_glBindRenderbuffer +typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC)(GLsizei n, const GLuint *renderbuffers); +GLAPI PFNGLDELETERENDERBUFFERSPROC glad_glDeleteRenderbuffers; +#define glDeleteRenderbuffers glad_glDeleteRenderbuffers +typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC)(GLsizei n, GLuint *renderbuffers); +GLAPI PFNGLGENRENDERBUFFERSPROC glad_glGenRenderbuffers; +#define glGenRenderbuffers glad_glGenRenderbuffers +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI PFNGLRENDERBUFFERSTORAGEPROC glad_glRenderbufferStorage; +#define glRenderbufferStorage glad_glRenderbufferStorage +typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint *params); +GLAPI PFNGLGETRENDERBUFFERPARAMETERIVPROC glad_glGetRenderbufferParameteriv; +#define glGetRenderbufferParameteriv glad_glGetRenderbufferParameteriv +typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC)(GLuint framebuffer); +GLAPI PFNGLISFRAMEBUFFERPROC glad_glIsFramebuffer; +#define glIsFramebuffer glad_glIsFramebuffer +typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC)(GLenum target, GLuint framebuffer); +GLAPI PFNGLBINDFRAMEBUFFERPROC glad_glBindFramebuffer; +#define glBindFramebuffer glad_glBindFramebuffer +typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC)(GLsizei n, const GLuint *framebuffers); +GLAPI PFNGLDELETEFRAMEBUFFERSPROC glad_glDeleteFramebuffers; +#define glDeleteFramebuffers glad_glDeleteFramebuffers +typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC)(GLsizei n, GLuint *framebuffers); +GLAPI PFNGLGENFRAMEBUFFERSPROC glad_glGenFramebuffers; +#define glGenFramebuffers glad_glGenFramebuffers +typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC)(GLenum target); +GLAPI PFNGLCHECKFRAMEBUFFERSTATUSPROC glad_glCheckFramebufferStatus; +#define glCheckFramebufferStatus glad_glCheckFramebufferStatus +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI PFNGLFRAMEBUFFERTEXTURE1DPROC glad_glFramebufferTexture1D; +#define glFramebufferTexture1D glad_glFramebufferTexture1D +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GLAPI PFNGLFRAMEBUFFERTEXTURE2DPROC glad_glFramebufferTexture2D; +#define glFramebufferTexture2D glad_glFramebufferTexture2D +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +GLAPI PFNGLFRAMEBUFFERTEXTURE3DPROC glad_glFramebufferTexture3D; +#define glFramebufferTexture3D glad_glFramebufferTexture3D +typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GLAPI PFNGLFRAMEBUFFERRENDERBUFFERPROC glad_glFramebufferRenderbuffer; +#define glFramebufferRenderbuffer glad_glFramebufferRenderbuffer +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)(GLenum target, GLenum attachment, GLenum pname, GLint *params); +GLAPI PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glad_glGetFramebufferAttachmentParameteriv; +#define glGetFramebufferAttachmentParameteriv glad_glGetFramebufferAttachmentParameteriv +typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC)(GLenum target); +GLAPI PFNGLGENERATEMIPMAPPROC glad_glGenerateMipmap; +#define glGenerateMipmap glad_glGenerateMipmap +typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +GLAPI PFNGLBLITFRAMEBUFFERPROC glad_glBlitFramebuffer; +#define glBlitFramebuffer glad_glBlitFramebuffer +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glad_glRenderbufferStorageMultisample; +#define glRenderbufferStorageMultisample glad_glRenderbufferStorageMultisample +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +GLAPI PFNGLFRAMEBUFFERTEXTURELAYERPROC glad_glFramebufferTextureLayer; +#define glFramebufferTextureLayer glad_glFramebufferTextureLayer +typedef void * (APIENTRYP PFNGLMAPBUFFERRANGEPROC)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +GLAPI PFNGLMAPBUFFERRANGEPROC glad_glMapBufferRange; +#define glMapBufferRange glad_glMapBufferRange +typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC)(GLenum target, GLintptr offset, GLsizeiptr length); +GLAPI PFNGLFLUSHMAPPEDBUFFERRANGEPROC glad_glFlushMappedBufferRange; +#define glFlushMappedBufferRange glad_glFlushMappedBufferRange +typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC)(GLuint array); +GLAPI PFNGLBINDVERTEXARRAYPROC glad_glBindVertexArray; +#define glBindVertexArray glad_glBindVertexArray +typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC)(GLsizei n, const GLuint *arrays); +GLAPI PFNGLDELETEVERTEXARRAYSPROC glad_glDeleteVertexArrays; +#define glDeleteVertexArrays glad_glDeleteVertexArrays +typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC)(GLsizei n, GLuint *arrays); +GLAPI PFNGLGENVERTEXARRAYSPROC glad_glGenVertexArrays; +#define glGenVertexArrays glad_glGenVertexArrays +typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC)(GLuint array); +GLAPI PFNGLISVERTEXARRAYPROC glad_glIsVertexArray; +#define glIsVertexArray glad_glIsVertexArray +#endif +#ifndef GL_VERSION_3_1 +#define GL_VERSION_3_1 1 +GLAPI int GLAD_GL_VERSION_3_1; +typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC)(GLenum mode, GLint first, GLsizei count, GLsizei instancecount); +GLAPI PFNGLDRAWARRAYSINSTANCEDPROC glad_glDrawArraysInstanced; +#define glDrawArraysInstanced glad_glDrawArraysInstanced +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); +GLAPI PFNGLDRAWELEMENTSINSTANCEDPROC glad_glDrawElementsInstanced; +#define glDrawElementsInstanced glad_glDrawElementsInstanced +typedef void (APIENTRYP PFNGLTEXBUFFERPROC)(GLenum target, GLenum internalformat, GLuint buffer); +GLAPI PFNGLTEXBUFFERPROC glad_glTexBuffer; +#define glTexBuffer glad_glTexBuffer +typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC)(GLuint index); +GLAPI PFNGLPRIMITIVERESTARTINDEXPROC glad_glPrimitiveRestartIndex; +#define glPrimitiveRestartIndex glad_glPrimitiveRestartIndex +typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +GLAPI PFNGLCOPYBUFFERSUBDATAPROC glad_glCopyBufferSubData; +#define glCopyBufferSubData glad_glCopyBufferSubData +typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC)(GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); +GLAPI PFNGLGETUNIFORMINDICESPROC glad_glGetUniformIndices; +#define glGetUniformIndices glad_glGetUniformIndices +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC)(GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +GLAPI PFNGLGETACTIVEUNIFORMSIVPROC glad_glGetActiveUniformsiv; +#define glGetActiveUniformsiv glad_glGetActiveUniformsiv +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC)(GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); +GLAPI PFNGLGETACTIVEUNIFORMNAMEPROC glad_glGetActiveUniformName; +#define glGetActiveUniformName glad_glGetActiveUniformName +typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC)(GLuint program, const GLchar *uniformBlockName); +GLAPI PFNGLGETUNIFORMBLOCKINDEXPROC glad_glGetUniformBlockIndex; +#define glGetUniformBlockIndex glad_glGetUniformBlockIndex +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC)(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +GLAPI PFNGLGETACTIVEUNIFORMBLOCKIVPROC glad_glGetActiveUniformBlockiv; +#define glGetActiveUniformBlockiv glad_glGetActiveUniformBlockiv +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC)(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +GLAPI PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glad_glGetActiveUniformBlockName; +#define glGetActiveUniformBlockName glad_glGetActiveUniformBlockName +typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC)(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +GLAPI PFNGLUNIFORMBLOCKBINDINGPROC glad_glUniformBlockBinding; +#define glUniformBlockBinding glad_glUniformBlockBinding +#endif +#ifndef GL_VERSION_3_2 +#define GL_VERSION_3_2 1 +GLAPI int GLAD_GL_VERSION_3_2; +typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); +GLAPI PFNGLDRAWELEMENTSBASEVERTEXPROC glad_glDrawElementsBaseVertex; +#define glDrawElementsBaseVertex glad_glDrawElementsBaseVertex +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); +GLAPI PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC glad_glDrawRangeElementsBaseVertex; +#define glDrawRangeElementsBaseVertex glad_glDrawRangeElementsBaseVertex +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); +GLAPI PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC glad_glDrawElementsInstancedBaseVertex; +#define glDrawElementsInstancedBaseVertex glad_glDrawElementsInstancedBaseVertex +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC)(GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex); +GLAPI PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC glad_glMultiDrawElementsBaseVertex; +#define glMultiDrawElementsBaseVertex glad_glMultiDrawElementsBaseVertex +typedef void (APIENTRYP PFNGLPROVOKINGVERTEXPROC)(GLenum mode); +GLAPI PFNGLPROVOKINGVERTEXPROC glad_glProvokingVertex; +#define glProvokingVertex glad_glProvokingVertex +typedef GLsync (APIENTRYP PFNGLFENCESYNCPROC)(GLenum condition, GLbitfield flags); +GLAPI PFNGLFENCESYNCPROC glad_glFenceSync; +#define glFenceSync glad_glFenceSync +typedef GLboolean (APIENTRYP PFNGLISSYNCPROC)(GLsync sync); +GLAPI PFNGLISSYNCPROC glad_glIsSync; +#define glIsSync glad_glIsSync +typedef void (APIENTRYP PFNGLDELETESYNCPROC)(GLsync sync); +GLAPI PFNGLDELETESYNCPROC glad_glDeleteSync; +#define glDeleteSync glad_glDeleteSync +typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC)(GLsync sync, GLbitfield flags, GLuint64 timeout); +GLAPI PFNGLCLIENTWAITSYNCPROC glad_glClientWaitSync; +#define glClientWaitSync glad_glClientWaitSync +typedef void (APIENTRYP PFNGLWAITSYNCPROC)(GLsync sync, GLbitfield flags, GLuint64 timeout); +GLAPI PFNGLWAITSYNCPROC glad_glWaitSync; +#define glWaitSync glad_glWaitSync +typedef void (APIENTRYP PFNGLGETINTEGER64VPROC)(GLenum pname, GLint64 *data); +GLAPI PFNGLGETINTEGER64VPROC glad_glGetInteger64v; +#define glGetInteger64v glad_glGetInteger64v +typedef void (APIENTRYP PFNGLGETSYNCIVPROC)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +GLAPI PFNGLGETSYNCIVPROC glad_glGetSynciv; +#define glGetSynciv glad_glGetSynciv +typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC)(GLenum target, GLuint index, GLint64 *data); +GLAPI PFNGLGETINTEGER64I_VPROC glad_glGetInteger64i_v; +#define glGetInteger64i_v glad_glGetInteger64i_v +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC)(GLenum target, GLenum pname, GLint64 *params); +GLAPI PFNGLGETBUFFERPARAMETERI64VPROC glad_glGetBufferParameteri64v; +#define glGetBufferParameteri64v glad_glGetBufferParameteri64v +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC)(GLenum target, GLenum attachment, GLuint texture, GLint level); +GLAPI PFNGLFRAMEBUFFERTEXTUREPROC glad_glFramebufferTexture; +#define glFramebufferTexture glad_glFramebufferTexture +typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +GLAPI PFNGLTEXIMAGE2DMULTISAMPLEPROC glad_glTexImage2DMultisample; +#define glTexImage2DMultisample glad_glTexImage2DMultisample +typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +GLAPI PFNGLTEXIMAGE3DMULTISAMPLEPROC glad_glTexImage3DMultisample; +#define glTexImage3DMultisample glad_glTexImage3DMultisample +typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC)(GLenum pname, GLuint index, GLfloat *val); +GLAPI PFNGLGETMULTISAMPLEFVPROC glad_glGetMultisamplefv; +#define glGetMultisamplefv glad_glGetMultisamplefv +typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC)(GLuint maskNumber, GLbitfield mask); +GLAPI PFNGLSAMPLEMASKIPROC glad_glSampleMaski; +#define glSampleMaski glad_glSampleMaski +#endif +#ifndef GL_VERSION_3_3 +#define GL_VERSION_3_3 1 +GLAPI int GLAD_GL_VERSION_3_3; +typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC)(GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); +GLAPI PFNGLBINDFRAGDATALOCATIONINDEXEDPROC glad_glBindFragDataLocationIndexed; +#define glBindFragDataLocationIndexed glad_glBindFragDataLocationIndexed +typedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC)(GLuint program, const GLchar *name); +GLAPI PFNGLGETFRAGDATAINDEXPROC glad_glGetFragDataIndex; +#define glGetFragDataIndex glad_glGetFragDataIndex +typedef void (APIENTRYP PFNGLGENSAMPLERSPROC)(GLsizei count, GLuint *samplers); +GLAPI PFNGLGENSAMPLERSPROC glad_glGenSamplers; +#define glGenSamplers glad_glGenSamplers +typedef void (APIENTRYP PFNGLDELETESAMPLERSPROC)(GLsizei count, const GLuint *samplers); +GLAPI PFNGLDELETESAMPLERSPROC glad_glDeleteSamplers; +#define glDeleteSamplers glad_glDeleteSamplers +typedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC)(GLuint sampler); +GLAPI PFNGLISSAMPLERPROC glad_glIsSampler; +#define glIsSampler glad_glIsSampler +typedef void (APIENTRYP PFNGLBINDSAMPLERPROC)(GLuint unit, GLuint sampler); +GLAPI PFNGLBINDSAMPLERPROC glad_glBindSampler; +#define glBindSampler glad_glBindSampler +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC)(GLuint sampler, GLenum pname, GLint param); +GLAPI PFNGLSAMPLERPARAMETERIPROC glad_glSamplerParameteri; +#define glSamplerParameteri glad_glSamplerParameteri +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC)(GLuint sampler, GLenum pname, const GLint *param); +GLAPI PFNGLSAMPLERPARAMETERIVPROC glad_glSamplerParameteriv; +#define glSamplerParameteriv glad_glSamplerParameteriv +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC)(GLuint sampler, GLenum pname, GLfloat param); +GLAPI PFNGLSAMPLERPARAMETERFPROC glad_glSamplerParameterf; +#define glSamplerParameterf glad_glSamplerParameterf +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFVPROC)(GLuint sampler, GLenum pname, const GLfloat *param); +GLAPI PFNGLSAMPLERPARAMETERFVPROC glad_glSamplerParameterfv; +#define glSamplerParameterfv glad_glSamplerParameterfv +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC)(GLuint sampler, GLenum pname, const GLint *param); +GLAPI PFNGLSAMPLERPARAMETERIIVPROC glad_glSamplerParameterIiv; +#define glSamplerParameterIiv glad_glSamplerParameterIiv +typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC)(GLuint sampler, GLenum pname, const GLuint *param); +GLAPI PFNGLSAMPLERPARAMETERIUIVPROC glad_glSamplerParameterIuiv; +#define glSamplerParameterIuiv glad_glSamplerParameterIuiv +typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC)(GLuint sampler, GLenum pname, GLint *params); +GLAPI PFNGLGETSAMPLERPARAMETERIVPROC glad_glGetSamplerParameteriv; +#define glGetSamplerParameteriv glad_glGetSamplerParameteriv +typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC)(GLuint sampler, GLenum pname, GLint *params); +GLAPI PFNGLGETSAMPLERPARAMETERIIVPROC glad_glGetSamplerParameterIiv; +#define glGetSamplerParameterIiv glad_glGetSamplerParameterIiv +typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC)(GLuint sampler, GLenum pname, GLfloat *params); +GLAPI PFNGLGETSAMPLERPARAMETERFVPROC glad_glGetSamplerParameterfv; +#define glGetSamplerParameterfv glad_glGetSamplerParameterfv +typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC)(GLuint sampler, GLenum pname, GLuint *params); +GLAPI PFNGLGETSAMPLERPARAMETERIUIVPROC glad_glGetSamplerParameterIuiv; +#define glGetSamplerParameterIuiv glad_glGetSamplerParameterIuiv +typedef void (APIENTRYP PFNGLQUERYCOUNTERPROC)(GLuint id, GLenum target); +GLAPI PFNGLQUERYCOUNTERPROC glad_glQueryCounter; +#define glQueryCounter glad_glQueryCounter +typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC)(GLuint id, GLenum pname, GLint64 *params); +GLAPI PFNGLGETQUERYOBJECTI64VPROC glad_glGetQueryObjecti64v; +#define glGetQueryObjecti64v glad_glGetQueryObjecti64v +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC)(GLuint id, GLenum pname, GLuint64 *params); +GLAPI PFNGLGETQUERYOBJECTUI64VPROC glad_glGetQueryObjectui64v; +#define glGetQueryObjectui64v glad_glGetQueryObjectui64v +typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC)(GLuint index, GLuint divisor); +GLAPI PFNGLVERTEXATTRIBDIVISORPROC glad_glVertexAttribDivisor; +#define glVertexAttribDivisor glad_glVertexAttribDivisor +typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIPROC)(GLuint index, GLenum type, GLboolean normalized, GLuint value); +GLAPI PFNGLVERTEXATTRIBP1UIPROC glad_glVertexAttribP1ui; +#define glVertexAttribP1ui glad_glVertexAttribP1ui +typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC)(GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +GLAPI PFNGLVERTEXATTRIBP1UIVPROC glad_glVertexAttribP1uiv; +#define glVertexAttribP1uiv glad_glVertexAttribP1uiv +typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIPROC)(GLuint index, GLenum type, GLboolean normalized, GLuint value); +GLAPI PFNGLVERTEXATTRIBP2UIPROC glad_glVertexAttribP2ui; +#define glVertexAttribP2ui glad_glVertexAttribP2ui +typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC)(GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +GLAPI PFNGLVERTEXATTRIBP2UIVPROC glad_glVertexAttribP2uiv; +#define glVertexAttribP2uiv glad_glVertexAttribP2uiv +typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIPROC)(GLuint index, GLenum type, GLboolean normalized, GLuint value); +GLAPI PFNGLVERTEXATTRIBP3UIPROC glad_glVertexAttribP3ui; +#define glVertexAttribP3ui glad_glVertexAttribP3ui +typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC)(GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +GLAPI PFNGLVERTEXATTRIBP3UIVPROC glad_glVertexAttribP3uiv; +#define glVertexAttribP3uiv glad_glVertexAttribP3uiv +typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIPROC)(GLuint index, GLenum type, GLboolean normalized, GLuint value); +GLAPI PFNGLVERTEXATTRIBP4UIPROC glad_glVertexAttribP4ui; +#define glVertexAttribP4ui glad_glVertexAttribP4ui +typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC)(GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +GLAPI PFNGLVERTEXATTRIBP4UIVPROC glad_glVertexAttribP4uiv; +#define glVertexAttribP4uiv glad_glVertexAttribP4uiv +typedef void (APIENTRYP PFNGLVERTEXP2UIPROC)(GLenum type, GLuint value); +GLAPI PFNGLVERTEXP2UIPROC glad_glVertexP2ui; +#define glVertexP2ui glad_glVertexP2ui +typedef void (APIENTRYP PFNGLVERTEXP2UIVPROC)(GLenum type, const GLuint *value); +GLAPI PFNGLVERTEXP2UIVPROC glad_glVertexP2uiv; +#define glVertexP2uiv glad_glVertexP2uiv +typedef void (APIENTRYP PFNGLVERTEXP3UIPROC)(GLenum type, GLuint value); +GLAPI PFNGLVERTEXP3UIPROC glad_glVertexP3ui; +#define glVertexP3ui glad_glVertexP3ui +typedef void (APIENTRYP PFNGLVERTEXP3UIVPROC)(GLenum type, const GLuint *value); +GLAPI PFNGLVERTEXP3UIVPROC glad_glVertexP3uiv; +#define glVertexP3uiv glad_glVertexP3uiv +typedef void (APIENTRYP PFNGLVERTEXP4UIPROC)(GLenum type, GLuint value); +GLAPI PFNGLVERTEXP4UIPROC glad_glVertexP4ui; +#define glVertexP4ui glad_glVertexP4ui +typedef void (APIENTRYP PFNGLVERTEXP4UIVPROC)(GLenum type, const GLuint *value); +GLAPI PFNGLVERTEXP4UIVPROC glad_glVertexP4uiv; +#define glVertexP4uiv glad_glVertexP4uiv +typedef void (APIENTRYP PFNGLTEXCOORDP1UIPROC)(GLenum type, GLuint coords); +GLAPI PFNGLTEXCOORDP1UIPROC glad_glTexCoordP1ui; +#define glTexCoordP1ui glad_glTexCoordP1ui +typedef void (APIENTRYP PFNGLTEXCOORDP1UIVPROC)(GLenum type, const GLuint *coords); +GLAPI PFNGLTEXCOORDP1UIVPROC glad_glTexCoordP1uiv; +#define glTexCoordP1uiv glad_glTexCoordP1uiv +typedef void (APIENTRYP PFNGLTEXCOORDP2UIPROC)(GLenum type, GLuint coords); +GLAPI PFNGLTEXCOORDP2UIPROC glad_glTexCoordP2ui; +#define glTexCoordP2ui glad_glTexCoordP2ui +typedef void (APIENTRYP PFNGLTEXCOORDP2UIVPROC)(GLenum type, const GLuint *coords); +GLAPI PFNGLTEXCOORDP2UIVPROC glad_glTexCoordP2uiv; +#define glTexCoordP2uiv glad_glTexCoordP2uiv +typedef void (APIENTRYP PFNGLTEXCOORDP3UIPROC)(GLenum type, GLuint coords); +GLAPI PFNGLTEXCOORDP3UIPROC glad_glTexCoordP3ui; +#define glTexCoordP3ui glad_glTexCoordP3ui +typedef void (APIENTRYP PFNGLTEXCOORDP3UIVPROC)(GLenum type, const GLuint *coords); +GLAPI PFNGLTEXCOORDP3UIVPROC glad_glTexCoordP3uiv; +#define glTexCoordP3uiv glad_glTexCoordP3uiv +typedef void (APIENTRYP PFNGLTEXCOORDP4UIPROC)(GLenum type, GLuint coords); +GLAPI PFNGLTEXCOORDP4UIPROC glad_glTexCoordP4ui; +#define glTexCoordP4ui glad_glTexCoordP4ui +typedef void (APIENTRYP PFNGLTEXCOORDP4UIVPROC)(GLenum type, const GLuint *coords); +GLAPI PFNGLTEXCOORDP4UIVPROC glad_glTexCoordP4uiv; +#define glTexCoordP4uiv glad_glTexCoordP4uiv +typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIPROC)(GLenum texture, GLenum type, GLuint coords); +GLAPI PFNGLMULTITEXCOORDP1UIPROC glad_glMultiTexCoordP1ui; +#define glMultiTexCoordP1ui glad_glMultiTexCoordP1ui +typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIVPROC)(GLenum texture, GLenum type, const GLuint *coords); +GLAPI PFNGLMULTITEXCOORDP1UIVPROC glad_glMultiTexCoordP1uiv; +#define glMultiTexCoordP1uiv glad_glMultiTexCoordP1uiv +typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIPROC)(GLenum texture, GLenum type, GLuint coords); +GLAPI PFNGLMULTITEXCOORDP2UIPROC glad_glMultiTexCoordP2ui; +#define glMultiTexCoordP2ui glad_glMultiTexCoordP2ui +typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIVPROC)(GLenum texture, GLenum type, const GLuint *coords); +GLAPI PFNGLMULTITEXCOORDP2UIVPROC glad_glMultiTexCoordP2uiv; +#define glMultiTexCoordP2uiv glad_glMultiTexCoordP2uiv +typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIPROC)(GLenum texture, GLenum type, GLuint coords); +GLAPI PFNGLMULTITEXCOORDP3UIPROC glad_glMultiTexCoordP3ui; +#define glMultiTexCoordP3ui glad_glMultiTexCoordP3ui +typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIVPROC)(GLenum texture, GLenum type, const GLuint *coords); +GLAPI PFNGLMULTITEXCOORDP3UIVPROC glad_glMultiTexCoordP3uiv; +#define glMultiTexCoordP3uiv glad_glMultiTexCoordP3uiv +typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIPROC)(GLenum texture, GLenum type, GLuint coords); +GLAPI PFNGLMULTITEXCOORDP4UIPROC glad_glMultiTexCoordP4ui; +#define glMultiTexCoordP4ui glad_glMultiTexCoordP4ui +typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIVPROC)(GLenum texture, GLenum type, const GLuint *coords); +GLAPI PFNGLMULTITEXCOORDP4UIVPROC glad_glMultiTexCoordP4uiv; +#define glMultiTexCoordP4uiv glad_glMultiTexCoordP4uiv +typedef void (APIENTRYP PFNGLNORMALP3UIPROC)(GLenum type, GLuint coords); +GLAPI PFNGLNORMALP3UIPROC glad_glNormalP3ui; +#define glNormalP3ui glad_glNormalP3ui +typedef void (APIENTRYP PFNGLNORMALP3UIVPROC)(GLenum type, const GLuint *coords); +GLAPI PFNGLNORMALP3UIVPROC glad_glNormalP3uiv; +#define glNormalP3uiv glad_glNormalP3uiv +typedef void (APIENTRYP PFNGLCOLORP3UIPROC)(GLenum type, GLuint color); +GLAPI PFNGLCOLORP3UIPROC glad_glColorP3ui; +#define glColorP3ui glad_glColorP3ui +typedef void (APIENTRYP PFNGLCOLORP3UIVPROC)(GLenum type, const GLuint *color); +GLAPI PFNGLCOLORP3UIVPROC glad_glColorP3uiv; +#define glColorP3uiv glad_glColorP3uiv +typedef void (APIENTRYP PFNGLCOLORP4UIPROC)(GLenum type, GLuint color); +GLAPI PFNGLCOLORP4UIPROC glad_glColorP4ui; +#define glColorP4ui glad_glColorP4ui +typedef void (APIENTRYP PFNGLCOLORP4UIVPROC)(GLenum type, const GLuint *color); +GLAPI PFNGLCOLORP4UIVPROC glad_glColorP4uiv; +#define glColorP4uiv glad_glColorP4uiv +typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIPROC)(GLenum type, GLuint color); +GLAPI PFNGLSECONDARYCOLORP3UIPROC glad_glSecondaryColorP3ui; +#define glSecondaryColorP3ui glad_glSecondaryColorP3ui +typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIVPROC)(GLenum type, const GLuint *color); +GLAPI PFNGLSECONDARYCOLORP3UIVPROC glad_glSecondaryColorP3uiv; +#define glSecondaryColorP3uiv glad_glSecondaryColorP3uiv +#endif +#ifndef GL_VERSION_4_0 +#define GL_VERSION_4_0 1 +GLAPI int GLAD_GL_VERSION_4_0; +typedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC)(GLfloat value); +GLAPI PFNGLMINSAMPLESHADINGPROC glad_glMinSampleShading; +#define glMinSampleShading glad_glMinSampleShading +typedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC)(GLuint buf, GLenum mode); +GLAPI PFNGLBLENDEQUATIONIPROC glad_glBlendEquationi; +#define glBlendEquationi glad_glBlendEquationi +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC)(GLuint buf, GLenum modeRGB, GLenum modeAlpha); +GLAPI PFNGLBLENDEQUATIONSEPARATEIPROC glad_glBlendEquationSeparatei; +#define glBlendEquationSeparatei glad_glBlendEquationSeparatei +typedef void (APIENTRYP PFNGLBLENDFUNCIPROC)(GLuint buf, GLenum src, GLenum dst); +GLAPI PFNGLBLENDFUNCIPROC glad_glBlendFunci; +#define glBlendFunci glad_glBlendFunci +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +GLAPI PFNGLBLENDFUNCSEPARATEIPROC glad_glBlendFuncSeparatei; +#define glBlendFuncSeparatei glad_glBlendFuncSeparatei +typedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC)(GLenum mode, const void *indirect); +GLAPI PFNGLDRAWARRAYSINDIRECTPROC glad_glDrawArraysIndirect; +#define glDrawArraysIndirect glad_glDrawArraysIndirect +typedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC)(GLenum mode, GLenum type, const void *indirect); +GLAPI PFNGLDRAWELEMENTSINDIRECTPROC glad_glDrawElementsIndirect; +#define glDrawElementsIndirect glad_glDrawElementsIndirect +typedef void (APIENTRYP PFNGLUNIFORM1DPROC)(GLint location, GLdouble x); +GLAPI PFNGLUNIFORM1DPROC glad_glUniform1d; +#define glUniform1d glad_glUniform1d +typedef void (APIENTRYP PFNGLUNIFORM2DPROC)(GLint location, GLdouble x, GLdouble y); +GLAPI PFNGLUNIFORM2DPROC glad_glUniform2d; +#define glUniform2d glad_glUniform2d +typedef void (APIENTRYP PFNGLUNIFORM3DPROC)(GLint location, GLdouble x, GLdouble y, GLdouble z); +GLAPI PFNGLUNIFORM3DPROC glad_glUniform3d; +#define glUniform3d glad_glUniform3d +typedef void (APIENTRYP PFNGLUNIFORM4DPROC)(GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI PFNGLUNIFORM4DPROC glad_glUniform4d; +#define glUniform4d glad_glUniform4d +typedef void (APIENTRYP PFNGLUNIFORM1DVPROC)(GLint location, GLsizei count, const GLdouble *value); +GLAPI PFNGLUNIFORM1DVPROC glad_glUniform1dv; +#define glUniform1dv glad_glUniform1dv +typedef void (APIENTRYP PFNGLUNIFORM2DVPROC)(GLint location, GLsizei count, const GLdouble *value); +GLAPI PFNGLUNIFORM2DVPROC glad_glUniform2dv; +#define glUniform2dv glad_glUniform2dv +typedef void (APIENTRYP PFNGLUNIFORM3DVPROC)(GLint location, GLsizei count, const GLdouble *value); +GLAPI PFNGLUNIFORM3DVPROC glad_glUniform3dv; +#define glUniform3dv glad_glUniform3dv +typedef void (APIENTRYP PFNGLUNIFORM4DVPROC)(GLint location, GLsizei count, const GLdouble *value); +GLAPI PFNGLUNIFORM4DVPROC glad_glUniform4dv; +#define glUniform4dv glad_glUniform4dv +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI PFNGLUNIFORMMATRIX2DVPROC glad_glUniformMatrix2dv; +#define glUniformMatrix2dv glad_glUniformMatrix2dv +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI PFNGLUNIFORMMATRIX3DVPROC glad_glUniformMatrix3dv; +#define glUniformMatrix3dv glad_glUniformMatrix3dv +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI PFNGLUNIFORMMATRIX4DVPROC glad_glUniformMatrix4dv; +#define glUniformMatrix4dv glad_glUniformMatrix4dv +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI PFNGLUNIFORMMATRIX2X3DVPROC glad_glUniformMatrix2x3dv; +#define glUniformMatrix2x3dv glad_glUniformMatrix2x3dv +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI PFNGLUNIFORMMATRIX2X4DVPROC glad_glUniformMatrix2x4dv; +#define glUniformMatrix2x4dv glad_glUniformMatrix2x4dv +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI PFNGLUNIFORMMATRIX3X2DVPROC glad_glUniformMatrix3x2dv; +#define glUniformMatrix3x2dv glad_glUniformMatrix3x2dv +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI PFNGLUNIFORMMATRIX3X4DVPROC glad_glUniformMatrix3x4dv; +#define glUniformMatrix3x4dv glad_glUniformMatrix3x4dv +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI PFNGLUNIFORMMATRIX4X2DVPROC glad_glUniformMatrix4x2dv; +#define glUniformMatrix4x2dv glad_glUniformMatrix4x2dv +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC)(GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI PFNGLUNIFORMMATRIX4X3DVPROC glad_glUniformMatrix4x3dv; +#define glUniformMatrix4x3dv glad_glUniformMatrix4x3dv +typedef void (APIENTRYP PFNGLGETUNIFORMDVPROC)(GLuint program, GLint location, GLdouble *params); +GLAPI PFNGLGETUNIFORMDVPROC glad_glGetUniformdv; +#define glGetUniformdv glad_glGetUniformdv +typedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC)(GLuint program, GLenum shadertype, const GLchar *name); +GLAPI PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC glad_glGetSubroutineUniformLocation; +#define glGetSubroutineUniformLocation glad_glGetSubroutineUniformLocation +typedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC)(GLuint program, GLenum shadertype, const GLchar *name); +GLAPI PFNGLGETSUBROUTINEINDEXPROC glad_glGetSubroutineIndex; +#define glGetSubroutineIndex glad_glGetSubroutineIndex +typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC)(GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); +GLAPI PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC glad_glGetActiveSubroutineUniformiv; +#define glGetActiveSubroutineUniformiv glad_glGetActiveSubroutineUniformiv +typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC)(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +GLAPI PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC glad_glGetActiveSubroutineUniformName; +#define glGetActiveSubroutineUniformName glad_glGetActiveSubroutineUniformName +typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC)(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +GLAPI PFNGLGETACTIVESUBROUTINENAMEPROC glad_glGetActiveSubroutineName; +#define glGetActiveSubroutineName glad_glGetActiveSubroutineName +typedef void (APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC)(GLenum shadertype, GLsizei count, const GLuint *indices); +GLAPI PFNGLUNIFORMSUBROUTINESUIVPROC glad_glUniformSubroutinesuiv; +#define glUniformSubroutinesuiv glad_glUniformSubroutinesuiv +typedef void (APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC)(GLenum shadertype, GLint location, GLuint *params); +GLAPI PFNGLGETUNIFORMSUBROUTINEUIVPROC glad_glGetUniformSubroutineuiv; +#define glGetUniformSubroutineuiv glad_glGetUniformSubroutineuiv +typedef void (APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC)(GLuint program, GLenum shadertype, GLenum pname, GLint *values); +GLAPI PFNGLGETPROGRAMSTAGEIVPROC glad_glGetProgramStageiv; +#define glGetProgramStageiv glad_glGetProgramStageiv +typedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC)(GLenum pname, GLint value); +GLAPI PFNGLPATCHPARAMETERIPROC glad_glPatchParameteri; +#define glPatchParameteri glad_glPatchParameteri +typedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC)(GLenum pname, const GLfloat *values); +GLAPI PFNGLPATCHPARAMETERFVPROC glad_glPatchParameterfv; +#define glPatchParameterfv glad_glPatchParameterfv +typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC)(GLenum target, GLuint id); +GLAPI PFNGLBINDTRANSFORMFEEDBACKPROC glad_glBindTransformFeedback; +#define glBindTransformFeedback glad_glBindTransformFeedback +typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC)(GLsizei n, const GLuint *ids); +GLAPI PFNGLDELETETRANSFORMFEEDBACKSPROC glad_glDeleteTransformFeedbacks; +#define glDeleteTransformFeedbacks glad_glDeleteTransformFeedbacks +typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC)(GLsizei n, GLuint *ids); +GLAPI PFNGLGENTRANSFORMFEEDBACKSPROC glad_glGenTransformFeedbacks; +#define glGenTransformFeedbacks glad_glGenTransformFeedbacks +typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC)(GLuint id); +GLAPI PFNGLISTRANSFORMFEEDBACKPROC glad_glIsTransformFeedback; +#define glIsTransformFeedback glad_glIsTransformFeedback +typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC)(void); +GLAPI PFNGLPAUSETRANSFORMFEEDBACKPROC glad_glPauseTransformFeedback; +#define glPauseTransformFeedback glad_glPauseTransformFeedback +typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC)(void); +GLAPI PFNGLRESUMETRANSFORMFEEDBACKPROC glad_glResumeTransformFeedback; +#define glResumeTransformFeedback glad_glResumeTransformFeedback +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC)(GLenum mode, GLuint id); +GLAPI PFNGLDRAWTRANSFORMFEEDBACKPROC glad_glDrawTransformFeedback; +#define glDrawTransformFeedback glad_glDrawTransformFeedback +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC)(GLenum mode, GLuint id, GLuint stream); +GLAPI PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC glad_glDrawTransformFeedbackStream; +#define glDrawTransformFeedbackStream glad_glDrawTransformFeedbackStream +typedef void (APIENTRYP PFNGLBEGINQUERYINDEXEDPROC)(GLenum target, GLuint index, GLuint id); +GLAPI PFNGLBEGINQUERYINDEXEDPROC glad_glBeginQueryIndexed; +#define glBeginQueryIndexed glad_glBeginQueryIndexed +typedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC)(GLenum target, GLuint index); +GLAPI PFNGLENDQUERYINDEXEDPROC glad_glEndQueryIndexed; +#define glEndQueryIndexed glad_glEndQueryIndexed +typedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC)(GLenum target, GLuint index, GLenum pname, GLint *params); +GLAPI PFNGLGETQUERYINDEXEDIVPROC glad_glGetQueryIndexediv; +#define glGetQueryIndexediv glad_glGetQueryIndexediv +#endif +#ifndef GL_VERSION_4_1 +#define GL_VERSION_4_1 1 +GLAPI int GLAD_GL_VERSION_4_1; +typedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC)(void); +GLAPI PFNGLRELEASESHADERCOMPILERPROC glad_glReleaseShaderCompiler; +#define glReleaseShaderCompiler glad_glReleaseShaderCompiler +typedef void (APIENTRYP PFNGLSHADERBINARYPROC)(GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); +GLAPI PFNGLSHADERBINARYPROC glad_glShaderBinary; +#define glShaderBinary glad_glShaderBinary +typedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC)(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +GLAPI PFNGLGETSHADERPRECISIONFORMATPROC glad_glGetShaderPrecisionFormat; +#define glGetShaderPrecisionFormat glad_glGetShaderPrecisionFormat +typedef void (APIENTRYP PFNGLDEPTHRANGEFPROC)(GLfloat n, GLfloat f); +GLAPI PFNGLDEPTHRANGEFPROC glad_glDepthRangef; +#define glDepthRangef glad_glDepthRangef +typedef void (APIENTRYP PFNGLCLEARDEPTHFPROC)(GLfloat d); +GLAPI PFNGLCLEARDEPTHFPROC glad_glClearDepthf; +#define glClearDepthf glad_glClearDepthf +typedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC)(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); +GLAPI PFNGLGETPROGRAMBINARYPROC glad_glGetProgramBinary; +#define glGetProgramBinary glad_glGetProgramBinary +typedef void (APIENTRYP PFNGLPROGRAMBINARYPROC)(GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); +GLAPI PFNGLPROGRAMBINARYPROC glad_glProgramBinary; +#define glProgramBinary glad_glProgramBinary +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC)(GLuint program, GLenum pname, GLint value); +GLAPI PFNGLPROGRAMPARAMETERIPROC glad_glProgramParameteri; +#define glProgramParameteri glad_glProgramParameteri +typedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC)(GLuint pipeline, GLbitfield stages, GLuint program); +GLAPI PFNGLUSEPROGRAMSTAGESPROC glad_glUseProgramStages; +#define glUseProgramStages glad_glUseProgramStages +typedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC)(GLuint pipeline, GLuint program); +GLAPI PFNGLACTIVESHADERPROGRAMPROC glad_glActiveShaderProgram; +#define glActiveShaderProgram glad_glActiveShaderProgram +typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC)(GLenum type, GLsizei count, const GLchar *const*strings); +GLAPI PFNGLCREATESHADERPROGRAMVPROC glad_glCreateShaderProgramv; +#define glCreateShaderProgramv glad_glCreateShaderProgramv +typedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC)(GLuint pipeline); +GLAPI PFNGLBINDPROGRAMPIPELINEPROC glad_glBindProgramPipeline; +#define glBindProgramPipeline glad_glBindProgramPipeline +typedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC)(GLsizei n, const GLuint *pipelines); +GLAPI PFNGLDELETEPROGRAMPIPELINESPROC glad_glDeleteProgramPipelines; +#define glDeleteProgramPipelines glad_glDeleteProgramPipelines +typedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC)(GLsizei n, GLuint *pipelines); +GLAPI PFNGLGENPROGRAMPIPELINESPROC glad_glGenProgramPipelines; +#define glGenProgramPipelines glad_glGenProgramPipelines +typedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC)(GLuint pipeline); +GLAPI PFNGLISPROGRAMPIPELINEPROC glad_glIsProgramPipeline; +#define glIsProgramPipeline glad_glIsProgramPipeline +typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC)(GLuint pipeline, GLenum pname, GLint *params); +GLAPI PFNGLGETPROGRAMPIPELINEIVPROC glad_glGetProgramPipelineiv; +#define glGetProgramPipelineiv glad_glGetProgramPipelineiv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC)(GLuint program, GLint location, GLint v0); +GLAPI PFNGLPROGRAMUNIFORM1IPROC glad_glProgramUniform1i; +#define glProgramUniform1i glad_glProgramUniform1i +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC)(GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI PFNGLPROGRAMUNIFORM1IVPROC glad_glProgramUniform1iv; +#define glProgramUniform1iv glad_glProgramUniform1iv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC)(GLuint program, GLint location, GLfloat v0); +GLAPI PFNGLPROGRAMUNIFORM1FPROC glad_glProgramUniform1f; +#define glProgramUniform1f glad_glProgramUniform1f +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC)(GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI PFNGLPROGRAMUNIFORM1FVPROC glad_glProgramUniform1fv; +#define glProgramUniform1fv glad_glProgramUniform1fv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC)(GLuint program, GLint location, GLdouble v0); +GLAPI PFNGLPROGRAMUNIFORM1DPROC glad_glProgramUniform1d; +#define glProgramUniform1d glad_glProgramUniform1d +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC)(GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI PFNGLPROGRAMUNIFORM1DVPROC glad_glProgramUniform1dv; +#define glProgramUniform1dv glad_glProgramUniform1dv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC)(GLuint program, GLint location, GLuint v0); +GLAPI PFNGLPROGRAMUNIFORM1UIPROC glad_glProgramUniform1ui; +#define glProgramUniform1ui glad_glProgramUniform1ui +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC)(GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI PFNGLPROGRAMUNIFORM1UIVPROC glad_glProgramUniform1uiv; +#define glProgramUniform1uiv glad_glProgramUniform1uiv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC)(GLuint program, GLint location, GLint v0, GLint v1); +GLAPI PFNGLPROGRAMUNIFORM2IPROC glad_glProgramUniform2i; +#define glProgramUniform2i glad_glProgramUniform2i +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC)(GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI PFNGLPROGRAMUNIFORM2IVPROC glad_glProgramUniform2iv; +#define glProgramUniform2iv glad_glProgramUniform2iv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC)(GLuint program, GLint location, GLfloat v0, GLfloat v1); +GLAPI PFNGLPROGRAMUNIFORM2FPROC glad_glProgramUniform2f; +#define glProgramUniform2f glad_glProgramUniform2f +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC)(GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI PFNGLPROGRAMUNIFORM2FVPROC glad_glProgramUniform2fv; +#define glProgramUniform2fv glad_glProgramUniform2fv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC)(GLuint program, GLint location, GLdouble v0, GLdouble v1); +GLAPI PFNGLPROGRAMUNIFORM2DPROC glad_glProgramUniform2d; +#define glProgramUniform2d glad_glProgramUniform2d +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC)(GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI PFNGLPROGRAMUNIFORM2DVPROC glad_glProgramUniform2dv; +#define glProgramUniform2dv glad_glProgramUniform2dv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC)(GLuint program, GLint location, GLuint v0, GLuint v1); +GLAPI PFNGLPROGRAMUNIFORM2UIPROC glad_glProgramUniform2ui; +#define glProgramUniform2ui glad_glProgramUniform2ui +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC)(GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI PFNGLPROGRAMUNIFORM2UIVPROC glad_glProgramUniform2uiv; +#define glProgramUniform2uiv glad_glProgramUniform2uiv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +GLAPI PFNGLPROGRAMUNIFORM3IPROC glad_glProgramUniform3i; +#define glProgramUniform3i glad_glProgramUniform3i +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC)(GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI PFNGLPROGRAMUNIFORM3IVPROC glad_glProgramUniform3iv; +#define glProgramUniform3iv glad_glProgramUniform3iv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +GLAPI PFNGLPROGRAMUNIFORM3FPROC glad_glProgramUniform3f; +#define glProgramUniform3f glad_glProgramUniform3f +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC)(GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI PFNGLPROGRAMUNIFORM3FVPROC glad_glProgramUniform3fv; +#define glProgramUniform3fv glad_glProgramUniform3fv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC)(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); +GLAPI PFNGLPROGRAMUNIFORM3DPROC glad_glProgramUniform3d; +#define glProgramUniform3d glad_glProgramUniform3d +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC)(GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI PFNGLPROGRAMUNIFORM3DVPROC glad_glProgramUniform3dv; +#define glProgramUniform3dv glad_glProgramUniform3dv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +GLAPI PFNGLPROGRAMUNIFORM3UIPROC glad_glProgramUniform3ui; +#define glProgramUniform3ui glad_glProgramUniform3ui +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC)(GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI PFNGLPROGRAMUNIFORM3UIVPROC glad_glProgramUniform3uiv; +#define glProgramUniform3uiv glad_glProgramUniform3uiv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +GLAPI PFNGLPROGRAMUNIFORM4IPROC glad_glProgramUniform4i; +#define glProgramUniform4i glad_glProgramUniform4i +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC)(GLuint program, GLint location, GLsizei count, const GLint *value); +GLAPI PFNGLPROGRAMUNIFORM4IVPROC glad_glProgramUniform4iv; +#define glProgramUniform4iv glad_glProgramUniform4iv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +GLAPI PFNGLPROGRAMUNIFORM4FPROC glad_glProgramUniform4f; +#define glProgramUniform4f glad_glProgramUniform4f +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC)(GLuint program, GLint location, GLsizei count, const GLfloat *value); +GLAPI PFNGLPROGRAMUNIFORM4FVPROC glad_glProgramUniform4fv; +#define glProgramUniform4fv glad_glProgramUniform4fv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC)(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +GLAPI PFNGLPROGRAMUNIFORM4DPROC glad_glProgramUniform4d; +#define glProgramUniform4d glad_glProgramUniform4d +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC)(GLuint program, GLint location, GLsizei count, const GLdouble *value); +GLAPI PFNGLPROGRAMUNIFORM4DVPROC glad_glProgramUniform4dv; +#define glProgramUniform4dv glad_glProgramUniform4dv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GLAPI PFNGLPROGRAMUNIFORM4UIPROC glad_glProgramUniform4ui; +#define glProgramUniform4ui glad_glProgramUniform4ui +typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC)(GLuint program, GLint location, GLsizei count, const GLuint *value); +GLAPI PFNGLPROGRAMUNIFORM4UIVPROC glad_glProgramUniform4uiv; +#define glProgramUniform4uiv glad_glProgramUniform4uiv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI PFNGLPROGRAMUNIFORMMATRIX2FVPROC glad_glProgramUniformMatrix2fv; +#define glProgramUniformMatrix2fv glad_glProgramUniformMatrix2fv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI PFNGLPROGRAMUNIFORMMATRIX3FVPROC glad_glProgramUniformMatrix3fv; +#define glProgramUniformMatrix3fv glad_glProgramUniformMatrix3fv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI PFNGLPROGRAMUNIFORMMATRIX4FVPROC glad_glProgramUniformMatrix4fv; +#define glProgramUniformMatrix4fv glad_glProgramUniformMatrix4fv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI PFNGLPROGRAMUNIFORMMATRIX2DVPROC glad_glProgramUniformMatrix2dv; +#define glProgramUniformMatrix2dv glad_glProgramUniformMatrix2dv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI PFNGLPROGRAMUNIFORMMATRIX3DVPROC glad_glProgramUniformMatrix3dv; +#define glProgramUniformMatrix3dv glad_glProgramUniformMatrix3dv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI PFNGLPROGRAMUNIFORMMATRIX4DVPROC glad_glProgramUniformMatrix4dv; +#define glProgramUniformMatrix4dv glad_glProgramUniformMatrix4dv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC glad_glProgramUniformMatrix2x3fv; +#define glProgramUniformMatrix2x3fv glad_glProgramUniformMatrix2x3fv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC glad_glProgramUniformMatrix3x2fv; +#define glProgramUniformMatrix3x2fv glad_glProgramUniformMatrix3x2fv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC glad_glProgramUniformMatrix2x4fv; +#define glProgramUniformMatrix2x4fv glad_glProgramUniformMatrix2x4fv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC glad_glProgramUniformMatrix4x2fv; +#define glProgramUniformMatrix4x2fv glad_glProgramUniformMatrix4x2fv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC glad_glProgramUniformMatrix3x4fv; +#define glProgramUniformMatrix3x4fv glad_glProgramUniformMatrix3x4fv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GLAPI PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC glad_glProgramUniformMatrix4x3fv; +#define glProgramUniformMatrix4x3fv glad_glProgramUniformMatrix4x3fv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC glad_glProgramUniformMatrix2x3dv; +#define glProgramUniformMatrix2x3dv glad_glProgramUniformMatrix2x3dv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC glad_glProgramUniformMatrix3x2dv; +#define glProgramUniformMatrix3x2dv glad_glProgramUniformMatrix3x2dv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC glad_glProgramUniformMatrix2x4dv; +#define glProgramUniformMatrix2x4dv glad_glProgramUniformMatrix2x4dv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC glad_glProgramUniformMatrix4x2dv; +#define glProgramUniformMatrix4x2dv glad_glProgramUniformMatrix4x2dv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC glad_glProgramUniformMatrix3x4dv; +#define glProgramUniformMatrix3x4dv glad_glProgramUniformMatrix3x4dv +typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +GLAPI PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC glad_glProgramUniformMatrix4x3dv; +#define glProgramUniformMatrix4x3dv glad_glProgramUniformMatrix4x3dv +typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC)(GLuint pipeline); +GLAPI PFNGLVALIDATEPROGRAMPIPELINEPROC glad_glValidateProgramPipeline; +#define glValidateProgramPipeline glad_glValidateProgramPipeline +typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC)(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +GLAPI PFNGLGETPROGRAMPIPELINEINFOLOGPROC glad_glGetProgramPipelineInfoLog; +#define glGetProgramPipelineInfoLog glad_glGetProgramPipelineInfoLog +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC)(GLuint index, GLdouble x); +GLAPI PFNGLVERTEXATTRIBL1DPROC glad_glVertexAttribL1d; +#define glVertexAttribL1d glad_glVertexAttribL1d +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC)(GLuint index, GLdouble x, GLdouble y); +GLAPI PFNGLVERTEXATTRIBL2DPROC glad_glVertexAttribL2d; +#define glVertexAttribL2d glad_glVertexAttribL2d +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC)(GLuint index, GLdouble x, GLdouble y, GLdouble z); +GLAPI PFNGLVERTEXATTRIBL3DPROC glad_glVertexAttribL3d; +#define glVertexAttribL3d glad_glVertexAttribL3d +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI PFNGLVERTEXATTRIBL4DPROC glad_glVertexAttribL4d; +#define glVertexAttribL4d glad_glVertexAttribL4d +typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC)(GLuint index, const GLdouble *v); +GLAPI PFNGLVERTEXATTRIBL1DVPROC glad_glVertexAttribL1dv; +#define glVertexAttribL1dv glad_glVertexAttribL1dv +typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC)(GLuint index, const GLdouble *v); +GLAPI PFNGLVERTEXATTRIBL2DVPROC glad_glVertexAttribL2dv; +#define glVertexAttribL2dv glad_glVertexAttribL2dv +typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC)(GLuint index, const GLdouble *v); +GLAPI PFNGLVERTEXATTRIBL3DVPROC glad_glVertexAttribL3dv; +#define glVertexAttribL3dv glad_glVertexAttribL3dv +typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC)(GLuint index, const GLdouble *v); +GLAPI PFNGLVERTEXATTRIBL4DVPROC glad_glVertexAttribL4dv; +#define glVertexAttribL4dv glad_glVertexAttribL4dv +typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC)(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); +GLAPI PFNGLVERTEXATTRIBLPOINTERPROC glad_glVertexAttribLPointer; +#define glVertexAttribLPointer glad_glVertexAttribLPointer +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC)(GLuint index, GLenum pname, GLdouble *params); +GLAPI PFNGLGETVERTEXATTRIBLDVPROC glad_glGetVertexAttribLdv; +#define glGetVertexAttribLdv glad_glGetVertexAttribLdv +typedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC)(GLuint first, GLsizei count, const GLfloat *v); +GLAPI PFNGLVIEWPORTARRAYVPROC glad_glViewportArrayv; +#define glViewportArrayv glad_glViewportArrayv +typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +GLAPI PFNGLVIEWPORTINDEXEDFPROC glad_glViewportIndexedf; +#define glViewportIndexedf glad_glViewportIndexedf +typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC)(GLuint index, const GLfloat *v); +GLAPI PFNGLVIEWPORTINDEXEDFVPROC glad_glViewportIndexedfv; +#define glViewportIndexedfv glad_glViewportIndexedfv +typedef void (APIENTRYP PFNGLSCISSORARRAYVPROC)(GLuint first, GLsizei count, const GLint *v); +GLAPI PFNGLSCISSORARRAYVPROC glad_glScissorArrayv; +#define glScissorArrayv glad_glScissorArrayv +typedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC)(GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +GLAPI PFNGLSCISSORINDEXEDPROC glad_glScissorIndexed; +#define glScissorIndexed glad_glScissorIndexed +typedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC)(GLuint index, const GLint *v); +GLAPI PFNGLSCISSORINDEXEDVPROC glad_glScissorIndexedv; +#define glScissorIndexedv glad_glScissorIndexedv +typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC)(GLuint first, GLsizei count, const GLdouble *v); +GLAPI PFNGLDEPTHRANGEARRAYVPROC glad_glDepthRangeArrayv; +#define glDepthRangeArrayv glad_glDepthRangeArrayv +typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC)(GLuint index, GLdouble n, GLdouble f); +GLAPI PFNGLDEPTHRANGEINDEXEDPROC glad_glDepthRangeIndexed; +#define glDepthRangeIndexed glad_glDepthRangeIndexed +typedef void (APIENTRYP PFNGLGETFLOATI_VPROC)(GLenum target, GLuint index, GLfloat *data); +GLAPI PFNGLGETFLOATI_VPROC glad_glGetFloati_v; +#define glGetFloati_v glad_glGetFloati_v +typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC)(GLenum target, GLuint index, GLdouble *data); +GLAPI PFNGLGETDOUBLEI_VPROC glad_glGetDoublei_v; +#define glGetDoublei_v glad_glGetDoublei_v +#endif +#ifndef GL_VERSION_4_2 +#define GL_VERSION_4_2 1 +GLAPI int GLAD_GL_VERSION_4_2; +typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC)(GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); +GLAPI PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC glad_glDrawArraysInstancedBaseInstance; +#define glDrawArraysInstancedBaseInstance glad_glDrawArraysInstancedBaseInstance +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); +GLAPI PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC glad_glDrawElementsInstancedBaseInstance; +#define glDrawElementsInstancedBaseInstance glad_glDrawElementsInstancedBaseInstance +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); +GLAPI PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC glad_glDrawElementsInstancedBaseVertexBaseInstance; +#define glDrawElementsInstancedBaseVertexBaseInstance glad_glDrawElementsInstancedBaseVertexBaseInstance +typedef void (APIENTRYP PFNGLGETINTERNALFORMATIVPROC)(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); +GLAPI PFNGLGETINTERNALFORMATIVPROC glad_glGetInternalformativ; +#define glGetInternalformativ glad_glGetInternalformativ +typedef void (APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC)(GLuint program, GLuint bufferIndex, GLenum pname, GLint *params); +GLAPI PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC glad_glGetActiveAtomicCounterBufferiv; +#define glGetActiveAtomicCounterBufferiv glad_glGetActiveAtomicCounterBufferiv +typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREPROC)(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); +GLAPI PFNGLBINDIMAGETEXTUREPROC glad_glBindImageTexture; +#define glBindImageTexture glad_glBindImageTexture +typedef void (APIENTRYP PFNGLMEMORYBARRIERPROC)(GLbitfield barriers); +GLAPI PFNGLMEMORYBARRIERPROC glad_glMemoryBarrier; +#define glMemoryBarrier glad_glMemoryBarrier +typedef void (APIENTRYP PFNGLTEXSTORAGE1DPROC)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +GLAPI PFNGLTEXSTORAGE1DPROC glad_glTexStorage1D; +#define glTexStorage1D glad_glTexStorage1D +typedef void (APIENTRYP PFNGLTEXSTORAGE2DPROC)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI PFNGLTEXSTORAGE2DPROC glad_glTexStorage2D; +#define glTexStorage2D glad_glTexStorage2D +typedef void (APIENTRYP PFNGLTEXSTORAGE3DPROC)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GLAPI PFNGLTEXSTORAGE3DPROC glad_glTexStorage3D; +#define glTexStorage3D glad_glTexStorage3D +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC)(GLenum mode, GLuint id, GLsizei instancecount); +GLAPI PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC glad_glDrawTransformFeedbackInstanced; +#define glDrawTransformFeedbackInstanced glad_glDrawTransformFeedbackInstanced +typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC)(GLenum mode, GLuint id, GLuint stream, GLsizei instancecount); +GLAPI PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC glad_glDrawTransformFeedbackStreamInstanced; +#define glDrawTransformFeedbackStreamInstanced glad_glDrawTransformFeedbackStreamInstanced +#endif +#ifndef GL_VERSION_4_3 +#define GL_VERSION_4_3 1 +GLAPI int GLAD_GL_VERSION_4_3; +typedef void (APIENTRYP PFNGLCLEARBUFFERDATAPROC)(GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data); +GLAPI PFNGLCLEARBUFFERDATAPROC glad_glClearBufferData; +#define glClearBufferData glad_glClearBufferData +typedef void (APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC)(GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); +GLAPI PFNGLCLEARBUFFERSUBDATAPROC glad_glClearBufferSubData; +#define glClearBufferSubData glad_glClearBufferSubData +typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEPROC)(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); +GLAPI PFNGLDISPATCHCOMPUTEPROC glad_glDispatchCompute; +#define glDispatchCompute glad_glDispatchCompute +typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC)(GLintptr indirect); +GLAPI PFNGLDISPATCHCOMPUTEINDIRECTPROC glad_glDispatchComputeIndirect; +#define glDispatchComputeIndirect glad_glDispatchComputeIndirect +typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATAPROC)(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); +GLAPI PFNGLCOPYIMAGESUBDATAPROC glad_glCopyImageSubData; +#define glCopyImageSubData glad_glCopyImageSubData +typedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC)(GLenum target, GLenum pname, GLint param); +GLAPI PFNGLFRAMEBUFFERPARAMETERIPROC glad_glFramebufferParameteri; +#define glFramebufferParameteri glad_glFramebufferParameteri +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname, GLint *params); +GLAPI PFNGLGETFRAMEBUFFERPARAMETERIVPROC glad_glGetFramebufferParameteriv; +#define glGetFramebufferParameteriv glad_glGetFramebufferParameteriv +typedef void (APIENTRYP PFNGLGETINTERNALFORMATI64VPROC)(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params); +GLAPI PFNGLGETINTERNALFORMATI64VPROC glad_glGetInternalformati64v; +#define glGetInternalformati64v glad_glGetInternalformati64v +typedef void (APIENTRYP PFNGLINVALIDATETEXSUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth); +GLAPI PFNGLINVALIDATETEXSUBIMAGEPROC glad_glInvalidateTexSubImage; +#define glInvalidateTexSubImage glad_glInvalidateTexSubImage +typedef void (APIENTRYP PFNGLINVALIDATETEXIMAGEPROC)(GLuint texture, GLint level); +GLAPI PFNGLINVALIDATETEXIMAGEPROC glad_glInvalidateTexImage; +#define glInvalidateTexImage glad_glInvalidateTexImage +typedef void (APIENTRYP PFNGLINVALIDATEBUFFERSUBDATAPROC)(GLuint buffer, GLintptr offset, GLsizeiptr length); +GLAPI PFNGLINVALIDATEBUFFERSUBDATAPROC glad_glInvalidateBufferSubData; +#define glInvalidateBufferSubData glad_glInvalidateBufferSubData +typedef void (APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC)(GLuint buffer); +GLAPI PFNGLINVALIDATEBUFFERDATAPROC glad_glInvalidateBufferData; +#define glInvalidateBufferData glad_glInvalidateBufferData +typedef void (APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC)(GLenum target, GLsizei numAttachments, const GLenum *attachments); +GLAPI PFNGLINVALIDATEFRAMEBUFFERPROC glad_glInvalidateFramebuffer; +#define glInvalidateFramebuffer glad_glInvalidateFramebuffer +typedef void (APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC)(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI PFNGLINVALIDATESUBFRAMEBUFFERPROC glad_glInvalidateSubFramebuffer; +#define glInvalidateSubFramebuffer glad_glInvalidateSubFramebuffer +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTPROC)(GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride); +GLAPI PFNGLMULTIDRAWARRAYSINDIRECTPROC glad_glMultiDrawArraysIndirect; +#define glMultiDrawArraysIndirect glad_glMultiDrawArraysIndirect +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTPROC)(GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride); +GLAPI PFNGLMULTIDRAWELEMENTSINDIRECTPROC glad_glMultiDrawElementsIndirect; +#define glMultiDrawElementsIndirect glad_glMultiDrawElementsIndirect +typedef void (APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC)(GLuint program, GLenum programInterface, GLenum pname, GLint *params); +GLAPI PFNGLGETPROGRAMINTERFACEIVPROC glad_glGetProgramInterfaceiv; +#define glGetProgramInterfaceiv glad_glGetProgramInterfaceiv +typedef GLuint (APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC)(GLuint program, GLenum programInterface, const GLchar *name); +GLAPI PFNGLGETPROGRAMRESOURCEINDEXPROC glad_glGetProgramResourceIndex; +#define glGetProgramResourceIndex glad_glGetProgramResourceIndex +typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC)(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); +GLAPI PFNGLGETPROGRAMRESOURCENAMEPROC glad_glGetProgramResourceName; +#define glGetProgramResourceName glad_glGetProgramResourceName +typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC)(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params); +GLAPI PFNGLGETPROGRAMRESOURCEIVPROC glad_glGetProgramResourceiv; +#define glGetProgramResourceiv glad_glGetProgramResourceiv +typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC)(GLuint program, GLenum programInterface, const GLchar *name); +GLAPI PFNGLGETPROGRAMRESOURCELOCATIONPROC glad_glGetProgramResourceLocation; +#define glGetProgramResourceLocation glad_glGetProgramResourceLocation +typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC)(GLuint program, GLenum programInterface, const GLchar *name); +GLAPI PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC glad_glGetProgramResourceLocationIndex; +#define glGetProgramResourceLocationIndex glad_glGetProgramResourceLocationIndex +typedef void (APIENTRYP PFNGLSHADERSTORAGEBLOCKBINDINGPROC)(GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding); +GLAPI PFNGLSHADERSTORAGEBLOCKBINDINGPROC glad_glShaderStorageBlockBinding; +#define glShaderStorageBlockBinding glad_glShaderStorageBlockBinding +typedef void (APIENTRYP PFNGLTEXBUFFERRANGEPROC)(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI PFNGLTEXBUFFERRANGEPROC glad_glTexBufferRange; +#define glTexBufferRange glad_glTexBufferRange +typedef void (APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +GLAPI PFNGLTEXSTORAGE2DMULTISAMPLEPROC glad_glTexStorage2DMultisample; +#define glTexStorage2DMultisample glad_glTexStorage2DMultisample +typedef void (APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +GLAPI PFNGLTEXSTORAGE3DMULTISAMPLEPROC glad_glTexStorage3DMultisample; +#define glTexStorage3DMultisample glad_glTexStorage3DMultisample +typedef void (APIENTRYP PFNGLTEXTUREVIEWPROC)(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); +GLAPI PFNGLTEXTUREVIEWPROC glad_glTextureView; +#define glTextureView glad_glTextureView +typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERPROC)(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +GLAPI PFNGLBINDVERTEXBUFFERPROC glad_glBindVertexBuffer; +#define glBindVertexBuffer glad_glBindVertexBuffer +typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATPROC)(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +GLAPI PFNGLVERTEXATTRIBFORMATPROC glad_glVertexAttribFormat; +#define glVertexAttribFormat glad_glVertexAttribFormat +typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC)(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI PFNGLVERTEXATTRIBIFORMATPROC glad_glVertexAttribIFormat; +#define glVertexAttribIFormat glad_glVertexAttribIFormat +typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATPROC)(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI PFNGLVERTEXATTRIBLFORMATPROC glad_glVertexAttribLFormat; +#define glVertexAttribLFormat glad_glVertexAttribLFormat +typedef void (APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC)(GLuint attribindex, GLuint bindingindex); +GLAPI PFNGLVERTEXATTRIBBINDINGPROC glad_glVertexAttribBinding; +#define glVertexAttribBinding glad_glVertexAttribBinding +typedef void (APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC)(GLuint bindingindex, GLuint divisor); +GLAPI PFNGLVERTEXBINDINGDIVISORPROC glad_glVertexBindingDivisor; +#define glVertexBindingDivisor glad_glVertexBindingDivisor +typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC)(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +GLAPI PFNGLDEBUGMESSAGECONTROLPROC glad_glDebugMessageControl; +#define glDebugMessageControl glad_glDebugMessageControl +typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +GLAPI PFNGLDEBUGMESSAGEINSERTPROC glad_glDebugMessageInsert; +#define glDebugMessageInsert glad_glDebugMessageInsert +typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC)(GLDEBUGPROC callback, const void *userParam); +GLAPI PFNGLDEBUGMESSAGECALLBACKPROC glad_glDebugMessageCallback; +#define glDebugMessageCallback glad_glDebugMessageCallback +typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC)(GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +GLAPI PFNGLGETDEBUGMESSAGELOGPROC glad_glGetDebugMessageLog; +#define glGetDebugMessageLog glad_glGetDebugMessageLog +typedef void (APIENTRYP PFNGLPUSHDEBUGGROUPPROC)(GLenum source, GLuint id, GLsizei length, const GLchar *message); +GLAPI PFNGLPUSHDEBUGGROUPPROC glad_glPushDebugGroup; +#define glPushDebugGroup glad_glPushDebugGroup +typedef void (APIENTRYP PFNGLPOPDEBUGGROUPPROC)(void); +GLAPI PFNGLPOPDEBUGGROUPPROC glad_glPopDebugGroup; +#define glPopDebugGroup glad_glPopDebugGroup +typedef void (APIENTRYP PFNGLOBJECTLABELPROC)(GLenum identifier, GLuint name, GLsizei length, const GLchar *label); +GLAPI PFNGLOBJECTLABELPROC glad_glObjectLabel; +#define glObjectLabel glad_glObjectLabel +typedef void (APIENTRYP PFNGLGETOBJECTLABELPROC)(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); +GLAPI PFNGLGETOBJECTLABELPROC glad_glGetObjectLabel; +#define glGetObjectLabel glad_glGetObjectLabel +typedef void (APIENTRYP PFNGLOBJECTPTRLABELPROC)(const void *ptr, GLsizei length, const GLchar *label); +GLAPI PFNGLOBJECTPTRLABELPROC glad_glObjectPtrLabel; +#define glObjectPtrLabel glad_glObjectPtrLabel +typedef void (APIENTRYP PFNGLGETOBJECTPTRLABELPROC)(const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); +GLAPI PFNGLGETOBJECTPTRLABELPROC glad_glGetObjectPtrLabel; +#define glGetObjectPtrLabel glad_glGetObjectPtrLabel +typedef void (APIENTRYP PFNGLGETPOINTERVPROC)(GLenum pname, void **params); +GLAPI PFNGLGETPOINTERVPROC glad_glGetPointerv; +#define glGetPointerv glad_glGetPointerv +#endif +#ifndef GL_VERSION_4_4 +#define GL_VERSION_4_4 1 +GLAPI int GLAD_GL_VERSION_4_4; +typedef void (APIENTRYP PFNGLBUFFERSTORAGEPROC)(GLenum target, GLsizeiptr size, const void *data, GLbitfield flags); +GLAPI PFNGLBUFFERSTORAGEPROC glad_glBufferStorage; +#define glBufferStorage glad_glBufferStorage +typedef void (APIENTRYP PFNGLCLEARTEXIMAGEPROC)(GLuint texture, GLint level, GLenum format, GLenum type, const void *data); +GLAPI PFNGLCLEARTEXIMAGEPROC glad_glClearTexImage; +#define glClearTexImage glad_glClearTexImage +typedef void (APIENTRYP PFNGLCLEARTEXSUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data); +GLAPI PFNGLCLEARTEXSUBIMAGEPROC glad_glClearTexSubImage; +#define glClearTexSubImage glad_glClearTexSubImage +typedef void (APIENTRYP PFNGLBINDBUFFERSBASEPROC)(GLenum target, GLuint first, GLsizei count, const GLuint *buffers); +GLAPI PFNGLBINDBUFFERSBASEPROC glad_glBindBuffersBase; +#define glBindBuffersBase glad_glBindBuffersBase +typedef void (APIENTRYP PFNGLBINDBUFFERSRANGEPROC)(GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes); +GLAPI PFNGLBINDBUFFERSRANGEPROC glad_glBindBuffersRange; +#define glBindBuffersRange glad_glBindBuffersRange +typedef void (APIENTRYP PFNGLBINDTEXTURESPROC)(GLuint first, GLsizei count, const GLuint *textures); +GLAPI PFNGLBINDTEXTURESPROC glad_glBindTextures; +#define glBindTextures glad_glBindTextures +typedef void (APIENTRYP PFNGLBINDSAMPLERSPROC)(GLuint first, GLsizei count, const GLuint *samplers); +GLAPI PFNGLBINDSAMPLERSPROC glad_glBindSamplers; +#define glBindSamplers glad_glBindSamplers +typedef void (APIENTRYP PFNGLBINDIMAGETEXTURESPROC)(GLuint first, GLsizei count, const GLuint *textures); +GLAPI PFNGLBINDIMAGETEXTURESPROC glad_glBindImageTextures; +#define glBindImageTextures glad_glBindImageTextures +typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERSPROC)(GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides); +GLAPI PFNGLBINDVERTEXBUFFERSPROC glad_glBindVertexBuffers; +#define glBindVertexBuffers glad_glBindVertexBuffers +#endif +#ifndef GL_VERSION_4_5 +#define GL_VERSION_4_5 1 +GLAPI int GLAD_GL_VERSION_4_5; +typedef void (APIENTRYP PFNGLCLIPCONTROLPROC)(GLenum origin, GLenum depth); +GLAPI PFNGLCLIPCONTROLPROC glad_glClipControl; +#define glClipControl glad_glClipControl +typedef void (APIENTRYP PFNGLCREATETRANSFORMFEEDBACKSPROC)(GLsizei n, GLuint *ids); +GLAPI PFNGLCREATETRANSFORMFEEDBACKSPROC glad_glCreateTransformFeedbacks; +#define glCreateTransformFeedbacks glad_glCreateTransformFeedbacks +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC)(GLuint xfb, GLuint index, GLuint buffer); +GLAPI PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC glad_glTransformFeedbackBufferBase; +#define glTransformFeedbackBufferBase glad_glTransformFeedbackBufferBase +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC)(GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC glad_glTransformFeedbackBufferRange; +#define glTransformFeedbackBufferRange glad_glTransformFeedbackBufferRange +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKIVPROC)(GLuint xfb, GLenum pname, GLint *param); +GLAPI PFNGLGETTRANSFORMFEEDBACKIVPROC glad_glGetTransformFeedbackiv; +#define glGetTransformFeedbackiv glad_glGetTransformFeedbackiv +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI_VPROC)(GLuint xfb, GLenum pname, GLuint index, GLint *param); +GLAPI PFNGLGETTRANSFORMFEEDBACKI_VPROC glad_glGetTransformFeedbacki_v; +#define glGetTransformFeedbacki_v glad_glGetTransformFeedbacki_v +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI64_VPROC)(GLuint xfb, GLenum pname, GLuint index, GLint64 *param); +GLAPI PFNGLGETTRANSFORMFEEDBACKI64_VPROC glad_glGetTransformFeedbacki64_v; +#define glGetTransformFeedbacki64_v glad_glGetTransformFeedbacki64_v +typedef void (APIENTRYP PFNGLCREATEBUFFERSPROC)(GLsizei n, GLuint *buffers); +GLAPI PFNGLCREATEBUFFERSPROC glad_glCreateBuffers; +#define glCreateBuffers glad_glCreateBuffers +typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEPROC)(GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); +GLAPI PFNGLNAMEDBUFFERSTORAGEPROC glad_glNamedBufferStorage; +#define glNamedBufferStorage glad_glNamedBufferStorage +typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAPROC)(GLuint buffer, GLsizeiptr size, const void *data, GLenum usage); +GLAPI PFNGLNAMEDBUFFERDATAPROC glad_glNamedBufferData; +#define glNamedBufferData glad_glNamedBufferData +typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAPROC)(GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); +GLAPI PFNGLNAMEDBUFFERSUBDATAPROC glad_glNamedBufferSubData; +#define glNamedBufferSubData glad_glNamedBufferSubData +typedef void (APIENTRYP PFNGLCOPYNAMEDBUFFERSUBDATAPROC)(GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +GLAPI PFNGLCOPYNAMEDBUFFERSUBDATAPROC glad_glCopyNamedBufferSubData; +#define glCopyNamedBufferSubData glad_glCopyNamedBufferSubData +typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAPROC)(GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); +GLAPI PFNGLCLEARNAMEDBUFFERDATAPROC glad_glClearNamedBufferData; +#define glClearNamedBufferData glad_glClearNamedBufferData +typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAPROC)(GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); +GLAPI PFNGLCLEARNAMEDBUFFERSUBDATAPROC glad_glClearNamedBufferSubData; +#define glClearNamedBufferSubData glad_glClearNamedBufferSubData +typedef void * (APIENTRYP PFNGLMAPNAMEDBUFFERPROC)(GLuint buffer, GLenum access); +GLAPI PFNGLMAPNAMEDBUFFERPROC glad_glMapNamedBuffer; +#define glMapNamedBuffer glad_glMapNamedBuffer +typedef void * (APIENTRYP PFNGLMAPNAMEDBUFFERRANGEPROC)(GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +GLAPI PFNGLMAPNAMEDBUFFERRANGEPROC glad_glMapNamedBufferRange; +#define glMapNamedBufferRange glad_glMapNamedBufferRange +typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFERPROC)(GLuint buffer); +GLAPI PFNGLUNMAPNAMEDBUFFERPROC glad_glUnmapNamedBuffer; +#define glUnmapNamedBuffer glad_glUnmapNamedBuffer +typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC)(GLuint buffer, GLintptr offset, GLsizeiptr length); +GLAPI PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC glad_glFlushMappedNamedBufferRange; +#define glFlushMappedNamedBufferRange glad_glFlushMappedNamedBufferRange +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVPROC)(GLuint buffer, GLenum pname, GLint *params); +GLAPI PFNGLGETNAMEDBUFFERPARAMETERIVPROC glad_glGetNamedBufferParameteriv; +#define glGetNamedBufferParameteriv glad_glGetNamedBufferParameteriv +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERI64VPROC)(GLuint buffer, GLenum pname, GLint64 *params); +GLAPI PFNGLGETNAMEDBUFFERPARAMETERI64VPROC glad_glGetNamedBufferParameteri64v; +#define glGetNamedBufferParameteri64v glad_glGetNamedBufferParameteri64v +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVPROC)(GLuint buffer, GLenum pname, void **params); +GLAPI PFNGLGETNAMEDBUFFERPOINTERVPROC glad_glGetNamedBufferPointerv; +#define glGetNamedBufferPointerv glad_glGetNamedBufferPointerv +typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAPROC)(GLuint buffer, GLintptr offset, GLsizeiptr size, void *data); +GLAPI PFNGLGETNAMEDBUFFERSUBDATAPROC glad_glGetNamedBufferSubData; +#define glGetNamedBufferSubData glad_glGetNamedBufferSubData +typedef void (APIENTRYP PFNGLCREATEFRAMEBUFFERSPROC)(GLsizei n, GLuint *framebuffers); +GLAPI PFNGLCREATEFRAMEBUFFERSPROC glad_glCreateFramebuffers; +#define glCreateFramebuffers glad_glCreateFramebuffers +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC)(GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GLAPI PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC glad_glNamedFramebufferRenderbuffer; +#define glNamedFramebufferRenderbuffer glad_glNamedFramebufferRenderbuffer +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC)(GLuint framebuffer, GLenum pname, GLint param); +GLAPI PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC glad_glNamedFramebufferParameteri; +#define glNamedFramebufferParameteri glad_glNamedFramebufferParameteri +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREPROC)(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +GLAPI PFNGLNAMEDFRAMEBUFFERTEXTUREPROC glad_glNamedFramebufferTexture; +#define glNamedFramebufferTexture glad_glNamedFramebufferTexture +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC)(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +GLAPI PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC glad_glNamedFramebufferTextureLayer; +#define glNamedFramebufferTextureLayer glad_glNamedFramebufferTextureLayer +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC)(GLuint framebuffer, GLenum buf); +GLAPI PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC glad_glNamedFramebufferDrawBuffer; +#define glNamedFramebufferDrawBuffer glad_glNamedFramebufferDrawBuffer +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC)(GLuint framebuffer, GLsizei n, const GLenum *bufs); +GLAPI PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC glad_glNamedFramebufferDrawBuffers; +#define glNamedFramebufferDrawBuffers glad_glNamedFramebufferDrawBuffers +typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC)(GLuint framebuffer, GLenum src); +GLAPI PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC glad_glNamedFramebufferReadBuffer; +#define glNamedFramebufferReadBuffer glad_glNamedFramebufferReadBuffer +typedef void (APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC)(GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments); +GLAPI PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC glad_glInvalidateNamedFramebufferData; +#define glInvalidateNamedFramebufferData glad_glInvalidateNamedFramebufferData +typedef void (APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC)(GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC glad_glInvalidateNamedFramebufferSubData; +#define glInvalidateNamedFramebufferSubData glad_glInvalidateNamedFramebufferSubData +typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERIVPROC)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value); +GLAPI PFNGLCLEARNAMEDFRAMEBUFFERIVPROC glad_glClearNamedFramebufferiv; +#define glClearNamedFramebufferiv glad_glClearNamedFramebufferiv +typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value); +GLAPI PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC glad_glClearNamedFramebufferuiv; +#define glClearNamedFramebufferuiv glad_glClearNamedFramebufferuiv +typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFVPROC)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value); +GLAPI PFNGLCLEARNAMEDFRAMEBUFFERFVPROC glad_glClearNamedFramebufferfv; +#define glClearNamedFramebufferfv glad_glClearNamedFramebufferfv +typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFIPROC)(GLuint framebuffer, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +GLAPI PFNGLCLEARNAMEDFRAMEBUFFERFIPROC glad_glClearNamedFramebufferfi; +#define glClearNamedFramebufferfi glad_glClearNamedFramebufferfi +typedef void (APIENTRYP PFNGLBLITNAMEDFRAMEBUFFERPROC)(GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +GLAPI PFNGLBLITNAMEDFRAMEBUFFERPROC glad_glBlitNamedFramebuffer; +#define glBlitNamedFramebuffer glad_glBlitNamedFramebuffer +typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC)(GLuint framebuffer, GLenum target); +GLAPI PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC glad_glCheckNamedFramebufferStatus; +#define glCheckNamedFramebufferStatus glad_glCheckNamedFramebufferStatus +typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC)(GLuint framebuffer, GLenum pname, GLint *param); +GLAPI PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC glad_glGetNamedFramebufferParameteriv; +#define glGetNamedFramebufferParameteriv glad_glGetNamedFramebufferParameteriv +typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC)(GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); +GLAPI PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC glad_glGetNamedFramebufferAttachmentParameteriv; +#define glGetNamedFramebufferAttachmentParameteriv glad_glGetNamedFramebufferAttachmentParameteriv +typedef void (APIENTRYP PFNGLCREATERENDERBUFFERSPROC)(GLsizei n, GLuint *renderbuffers); +GLAPI PFNGLCREATERENDERBUFFERSPROC glad_glCreateRenderbuffers; +#define glCreateRenderbuffers glad_glCreateRenderbuffers +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEPROC)(GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI PFNGLNAMEDRENDERBUFFERSTORAGEPROC glad_glNamedRenderbufferStorage; +#define glNamedRenderbufferStorage glad_glNamedRenderbufferStorage +typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC)(GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC glad_glNamedRenderbufferStorageMultisample; +#define glNamedRenderbufferStorageMultisample glad_glNamedRenderbufferStorageMultisample +typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC)(GLuint renderbuffer, GLenum pname, GLint *params); +GLAPI PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC glad_glGetNamedRenderbufferParameteriv; +#define glGetNamedRenderbufferParameteriv glad_glGetNamedRenderbufferParameteriv +typedef void (APIENTRYP PFNGLCREATETEXTURESPROC)(GLenum target, GLsizei n, GLuint *textures); +GLAPI PFNGLCREATETEXTURESPROC glad_glCreateTextures; +#define glCreateTextures glad_glCreateTextures +typedef void (APIENTRYP PFNGLTEXTUREBUFFERPROC)(GLuint texture, GLenum internalformat, GLuint buffer); +GLAPI PFNGLTEXTUREBUFFERPROC glad_glTextureBuffer; +#define glTextureBuffer glad_glTextureBuffer +typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEPROC)(GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +GLAPI PFNGLTEXTUREBUFFERRANGEPROC glad_glTextureBufferRange; +#define glTextureBufferRange glad_glTextureBufferRange +typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DPROC)(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width); +GLAPI PFNGLTEXTURESTORAGE1DPROC glad_glTextureStorage1D; +#define glTextureStorage1D glad_glTextureStorage1D +typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DPROC)(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GLAPI PFNGLTEXTURESTORAGE2DPROC glad_glTextureStorage2D; +#define glTextureStorage2D glad_glTextureStorage2D +typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DPROC)(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GLAPI PFNGLTEXTURESTORAGE3DPROC glad_glTextureStorage3D; +#define glTextureStorage3D glad_glTextureStorage3D +typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC)(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +GLAPI PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC glad_glTextureStorage2DMultisample; +#define glTextureStorage2DMultisample glad_glTextureStorage2DMultisample +typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC)(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +GLAPI PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC glad_glTextureStorage3DMultisample; +#define glTextureStorage3DMultisample glad_glTextureStorage3DMultisample +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DPROC)(GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); +GLAPI PFNGLTEXTURESUBIMAGE1DPROC glad_glTextureSubImage1D; +#define glTextureSubImage1D glad_glTextureSubImage1D +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +GLAPI PFNGLTEXTURESUBIMAGE2DPROC glad_glTextureSubImage2D; +#define glTextureSubImage2D glad_glTextureSubImage2D +typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); +GLAPI PFNGLTEXTURESUBIMAGE3DPROC glad_glTextureSubImage3D; +#define glTextureSubImage3D glad_glTextureSubImage3D +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC)(GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data); +GLAPI PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC glad_glCompressedTextureSubImage1D; +#define glCompressedTextureSubImage1D glad_glCompressedTextureSubImage1D +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); +GLAPI PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC glad_glCompressedTextureSubImage2D; +#define glCompressedTextureSubImage2D glad_glCompressedTextureSubImage2D +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); +GLAPI PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC glad_glCompressedTextureSubImage3D; +#define glCompressedTextureSubImage3D glad_glCompressedTextureSubImage3D +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DPROC)(GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +GLAPI PFNGLCOPYTEXTURESUBIMAGE1DPROC glad_glCopyTextureSubImage1D; +#define glCopyTextureSubImage1D glad_glCopyTextureSubImage1D +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI PFNGLCOPYTEXTURESUBIMAGE2DPROC glad_glCopyTextureSubImage2D; +#define glCopyTextureSubImage2D glad_glCopyTextureSubImage2D +typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI PFNGLCOPYTEXTURESUBIMAGE3DPROC glad_glCopyTextureSubImage3D; +#define glCopyTextureSubImage3D glad_glCopyTextureSubImage3D +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFPROC)(GLuint texture, GLenum pname, GLfloat param); +GLAPI PFNGLTEXTUREPARAMETERFPROC glad_glTextureParameterf; +#define glTextureParameterf glad_glTextureParameterf +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVPROC)(GLuint texture, GLenum pname, const GLfloat *param); +GLAPI PFNGLTEXTUREPARAMETERFVPROC glad_glTextureParameterfv; +#define glTextureParameterfv glad_glTextureParameterfv +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIPROC)(GLuint texture, GLenum pname, GLint param); +GLAPI PFNGLTEXTUREPARAMETERIPROC glad_glTextureParameteri; +#define glTextureParameteri glad_glTextureParameteri +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVPROC)(GLuint texture, GLenum pname, const GLint *params); +GLAPI PFNGLTEXTUREPARAMETERIIVPROC glad_glTextureParameterIiv; +#define glTextureParameterIiv glad_glTextureParameterIiv +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVPROC)(GLuint texture, GLenum pname, const GLuint *params); +GLAPI PFNGLTEXTUREPARAMETERIUIVPROC glad_glTextureParameterIuiv; +#define glTextureParameterIuiv glad_glTextureParameterIuiv +typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVPROC)(GLuint texture, GLenum pname, const GLint *param); +GLAPI PFNGLTEXTUREPARAMETERIVPROC glad_glTextureParameteriv; +#define glTextureParameteriv glad_glTextureParameteriv +typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPPROC)(GLuint texture); +GLAPI PFNGLGENERATETEXTUREMIPMAPPROC glad_glGenerateTextureMipmap; +#define glGenerateTextureMipmap glad_glGenerateTextureMipmap +typedef void (APIENTRYP PFNGLBINDTEXTUREUNITPROC)(GLuint unit, GLuint texture); +GLAPI PFNGLBINDTEXTUREUNITPROC glad_glBindTextureUnit; +#define glBindTextureUnit glad_glBindTextureUnit +typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEPROC)(GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels); +GLAPI PFNGLGETTEXTUREIMAGEPROC glad_glGetTextureImage; +#define glGetTextureImage glad_glGetTextureImage +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC)(GLuint texture, GLint level, GLsizei bufSize, void *pixels); +GLAPI PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC glad_glGetCompressedTextureImage; +#define glGetCompressedTextureImage glad_glGetCompressedTextureImage +typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVPROC)(GLuint texture, GLint level, GLenum pname, GLfloat *params); +GLAPI PFNGLGETTEXTURELEVELPARAMETERFVPROC glad_glGetTextureLevelParameterfv; +#define glGetTextureLevelParameterfv glad_glGetTextureLevelParameterfv +typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVPROC)(GLuint texture, GLint level, GLenum pname, GLint *params); +GLAPI PFNGLGETTEXTURELEVELPARAMETERIVPROC glad_glGetTextureLevelParameteriv; +#define glGetTextureLevelParameteriv glad_glGetTextureLevelParameteriv +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVPROC)(GLuint texture, GLenum pname, GLfloat *params); +GLAPI PFNGLGETTEXTUREPARAMETERFVPROC glad_glGetTextureParameterfv; +#define glGetTextureParameterfv glad_glGetTextureParameterfv +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVPROC)(GLuint texture, GLenum pname, GLint *params); +GLAPI PFNGLGETTEXTUREPARAMETERIIVPROC glad_glGetTextureParameterIiv; +#define glGetTextureParameterIiv glad_glGetTextureParameterIiv +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVPROC)(GLuint texture, GLenum pname, GLuint *params); +GLAPI PFNGLGETTEXTUREPARAMETERIUIVPROC glad_glGetTextureParameterIuiv; +#define glGetTextureParameterIuiv glad_glGetTextureParameterIuiv +typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVPROC)(GLuint texture, GLenum pname, GLint *params); +GLAPI PFNGLGETTEXTUREPARAMETERIVPROC glad_glGetTextureParameteriv; +#define glGetTextureParameteriv glad_glGetTextureParameteriv +typedef void (APIENTRYP PFNGLCREATEVERTEXARRAYSPROC)(GLsizei n, GLuint *arrays); +GLAPI PFNGLCREATEVERTEXARRAYSPROC glad_glCreateVertexArrays; +#define glCreateVertexArrays glad_glCreateVertexArrays +typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBPROC)(GLuint vaobj, GLuint index); +GLAPI PFNGLDISABLEVERTEXARRAYATTRIBPROC glad_glDisableVertexArrayAttrib; +#define glDisableVertexArrayAttrib glad_glDisableVertexArrayAttrib +typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBPROC)(GLuint vaobj, GLuint index); +GLAPI PFNGLENABLEVERTEXARRAYATTRIBPROC glad_glEnableVertexArrayAttrib; +#define glEnableVertexArrayAttrib glad_glEnableVertexArrayAttrib +typedef void (APIENTRYP PFNGLVERTEXARRAYELEMENTBUFFERPROC)(GLuint vaobj, GLuint buffer); +GLAPI PFNGLVERTEXARRAYELEMENTBUFFERPROC glad_glVertexArrayElementBuffer; +#define glVertexArrayElementBuffer glad_glVertexArrayElementBuffer +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERPROC)(GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +GLAPI PFNGLVERTEXARRAYVERTEXBUFFERPROC glad_glVertexArrayVertexBuffer; +#define glVertexArrayVertexBuffer glad_glVertexArrayVertexBuffer +typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERSPROC)(GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides); +GLAPI PFNGLVERTEXARRAYVERTEXBUFFERSPROC glad_glVertexArrayVertexBuffers; +#define glVertexArrayVertexBuffers glad_glVertexArrayVertexBuffers +typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBBINDINGPROC)(GLuint vaobj, GLuint attribindex, GLuint bindingindex); +GLAPI PFNGLVERTEXARRAYATTRIBBINDINGPROC glad_glVertexArrayAttribBinding; +#define glVertexArrayAttribBinding glad_glVertexArrayAttribBinding +typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBFORMATPROC)(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +GLAPI PFNGLVERTEXARRAYATTRIBFORMATPROC glad_glVertexArrayAttribFormat; +#define glVertexArrayAttribFormat glad_glVertexArrayAttribFormat +typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBIFORMATPROC)(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI PFNGLVERTEXARRAYATTRIBIFORMATPROC glad_glVertexArrayAttribIFormat; +#define glVertexArrayAttribIFormat glad_glVertexArrayAttribIFormat +typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBLFORMATPROC)(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +GLAPI PFNGLVERTEXARRAYATTRIBLFORMATPROC glad_glVertexArrayAttribLFormat; +#define glVertexArrayAttribLFormat glad_glVertexArrayAttribLFormat +typedef void (APIENTRYP PFNGLVERTEXARRAYBINDINGDIVISORPROC)(GLuint vaobj, GLuint bindingindex, GLuint divisor); +GLAPI PFNGLVERTEXARRAYBINDINGDIVISORPROC glad_glVertexArrayBindingDivisor; +#define glVertexArrayBindingDivisor glad_glVertexArrayBindingDivisor +typedef void (APIENTRYP PFNGLGETVERTEXARRAYIVPROC)(GLuint vaobj, GLenum pname, GLint *param); +GLAPI PFNGLGETVERTEXARRAYIVPROC glad_glGetVertexArrayiv; +#define glGetVertexArrayiv glad_glGetVertexArrayiv +typedef void (APIENTRYP PFNGLGETVERTEXARRAYINDEXEDIVPROC)(GLuint vaobj, GLuint index, GLenum pname, GLint *param); +GLAPI PFNGLGETVERTEXARRAYINDEXEDIVPROC glad_glGetVertexArrayIndexediv; +#define glGetVertexArrayIndexediv glad_glGetVertexArrayIndexediv +typedef void (APIENTRYP PFNGLGETVERTEXARRAYINDEXED64IVPROC)(GLuint vaobj, GLuint index, GLenum pname, GLint64 *param); +GLAPI PFNGLGETVERTEXARRAYINDEXED64IVPROC glad_glGetVertexArrayIndexed64iv; +#define glGetVertexArrayIndexed64iv glad_glGetVertexArrayIndexed64iv +typedef void (APIENTRYP PFNGLCREATESAMPLERSPROC)(GLsizei n, GLuint *samplers); +GLAPI PFNGLCREATESAMPLERSPROC glad_glCreateSamplers; +#define glCreateSamplers glad_glCreateSamplers +typedef void (APIENTRYP PFNGLCREATEPROGRAMPIPELINESPROC)(GLsizei n, GLuint *pipelines); +GLAPI PFNGLCREATEPROGRAMPIPELINESPROC glad_glCreateProgramPipelines; +#define glCreateProgramPipelines glad_glCreateProgramPipelines +typedef void (APIENTRYP PFNGLCREATEQUERIESPROC)(GLenum target, GLsizei n, GLuint *ids); +GLAPI PFNGLCREATEQUERIESPROC glad_glCreateQueries; +#define glCreateQueries glad_glCreateQueries +typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTI64VPROC)(GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +GLAPI PFNGLGETQUERYBUFFEROBJECTI64VPROC glad_glGetQueryBufferObjecti64v; +#define glGetQueryBufferObjecti64v glad_glGetQueryBufferObjecti64v +typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTIVPROC)(GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +GLAPI PFNGLGETQUERYBUFFEROBJECTIVPROC glad_glGetQueryBufferObjectiv; +#define glGetQueryBufferObjectiv glad_glGetQueryBufferObjectiv +typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTUI64VPROC)(GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +GLAPI PFNGLGETQUERYBUFFEROBJECTUI64VPROC glad_glGetQueryBufferObjectui64v; +#define glGetQueryBufferObjectui64v glad_glGetQueryBufferObjectui64v +typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTUIVPROC)(GLuint id, GLuint buffer, GLenum pname, GLintptr offset); +GLAPI PFNGLGETQUERYBUFFEROBJECTUIVPROC glad_glGetQueryBufferObjectuiv; +#define glGetQueryBufferObjectuiv glad_glGetQueryBufferObjectuiv +typedef void (APIENTRYP PFNGLMEMORYBARRIERBYREGIONPROC)(GLbitfield barriers); +GLAPI PFNGLMEMORYBARRIERBYREGIONPROC glad_glMemoryBarrierByRegion; +#define glMemoryBarrierByRegion glad_glMemoryBarrierByRegion +typedef void (APIENTRYP PFNGLGETTEXTURESUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels); +GLAPI PFNGLGETTEXTURESUBIMAGEPROC glad_glGetTextureSubImage; +#define glGetTextureSubImage glad_glGetTextureSubImage +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels); +GLAPI PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC glad_glGetCompressedTextureSubImage; +#define glGetCompressedTextureSubImage glad_glGetCompressedTextureSubImage +typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSPROC)(void); +GLAPI PFNGLGETGRAPHICSRESETSTATUSPROC glad_glGetGraphicsResetStatus; +#define glGetGraphicsResetStatus glad_glGetGraphicsResetStatus +typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEPROC)(GLenum target, GLint lod, GLsizei bufSize, void *pixels); +GLAPI PFNGLGETNCOMPRESSEDTEXIMAGEPROC glad_glGetnCompressedTexImage; +#define glGetnCompressedTexImage glad_glGetnCompressedTexImage +typedef void (APIENTRYP PFNGLGETNTEXIMAGEPROC)(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels); +GLAPI PFNGLGETNTEXIMAGEPROC glad_glGetnTexImage; +#define glGetnTexImage glad_glGetnTexImage +typedef void (APIENTRYP PFNGLGETNUNIFORMDVPROC)(GLuint program, GLint location, GLsizei bufSize, GLdouble *params); +GLAPI PFNGLGETNUNIFORMDVPROC glad_glGetnUniformdv; +#define glGetnUniformdv glad_glGetnUniformdv +typedef void (APIENTRYP PFNGLGETNUNIFORMFVPROC)(GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +GLAPI PFNGLGETNUNIFORMFVPROC glad_glGetnUniformfv; +#define glGetnUniformfv glad_glGetnUniformfv +typedef void (APIENTRYP PFNGLGETNUNIFORMIVPROC)(GLuint program, GLint location, GLsizei bufSize, GLint *params); +GLAPI PFNGLGETNUNIFORMIVPROC glad_glGetnUniformiv; +#define glGetnUniformiv glad_glGetnUniformiv +typedef void (APIENTRYP PFNGLGETNUNIFORMUIVPROC)(GLuint program, GLint location, GLsizei bufSize, GLuint *params); +GLAPI PFNGLGETNUNIFORMUIVPROC glad_glGetnUniformuiv; +#define glGetnUniformuiv glad_glGetnUniformuiv +typedef void (APIENTRYP PFNGLREADNPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +GLAPI PFNGLREADNPIXELSPROC glad_glReadnPixels; +#define glReadnPixels glad_glReadnPixels +typedef void (APIENTRYP PFNGLGETNMAPDVPROC)(GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); +GLAPI PFNGLGETNMAPDVPROC glad_glGetnMapdv; +#define glGetnMapdv glad_glGetnMapdv +typedef void (APIENTRYP PFNGLGETNMAPFVPROC)(GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); +GLAPI PFNGLGETNMAPFVPROC glad_glGetnMapfv; +#define glGetnMapfv glad_glGetnMapfv +typedef void (APIENTRYP PFNGLGETNMAPIVPROC)(GLenum target, GLenum query, GLsizei bufSize, GLint *v); +GLAPI PFNGLGETNMAPIVPROC glad_glGetnMapiv; +#define glGetnMapiv glad_glGetnMapiv +typedef void (APIENTRYP PFNGLGETNPIXELMAPFVPROC)(GLenum map, GLsizei bufSize, GLfloat *values); +GLAPI PFNGLGETNPIXELMAPFVPROC glad_glGetnPixelMapfv; +#define glGetnPixelMapfv glad_glGetnPixelMapfv +typedef void (APIENTRYP PFNGLGETNPIXELMAPUIVPROC)(GLenum map, GLsizei bufSize, GLuint *values); +GLAPI PFNGLGETNPIXELMAPUIVPROC glad_glGetnPixelMapuiv; +#define glGetnPixelMapuiv glad_glGetnPixelMapuiv +typedef void (APIENTRYP PFNGLGETNPIXELMAPUSVPROC)(GLenum map, GLsizei bufSize, GLushort *values); +GLAPI PFNGLGETNPIXELMAPUSVPROC glad_glGetnPixelMapusv; +#define glGetnPixelMapusv glad_glGetnPixelMapusv +typedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEPROC)(GLsizei bufSize, GLubyte *pattern); +GLAPI PFNGLGETNPOLYGONSTIPPLEPROC glad_glGetnPolygonStipple; +#define glGetnPolygonStipple glad_glGetnPolygonStipple +typedef void (APIENTRYP PFNGLGETNCOLORTABLEPROC)(GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table); +GLAPI PFNGLGETNCOLORTABLEPROC glad_glGetnColorTable; +#define glGetnColorTable glad_glGetnColorTable +typedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERPROC)(GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image); +GLAPI PFNGLGETNCONVOLUTIONFILTERPROC glad_glGetnConvolutionFilter; +#define glGetnConvolutionFilter glad_glGetnConvolutionFilter +typedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERPROC)(GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span); +GLAPI PFNGLGETNSEPARABLEFILTERPROC glad_glGetnSeparableFilter; +#define glGetnSeparableFilter glad_glGetnSeparableFilter +typedef void (APIENTRYP PFNGLGETNHISTOGRAMPROC)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); +GLAPI PFNGLGETNHISTOGRAMPROC glad_glGetnHistogram; +#define glGetnHistogram glad_glGetnHistogram +typedef void (APIENTRYP PFNGLGETNMINMAXPROC)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values); +GLAPI PFNGLGETNMINMAXPROC glad_glGetnMinmax; +#define glGetnMinmax glad_glGetnMinmax +typedef void (APIENTRYP PFNGLTEXTUREBARRIERPROC)(void); +GLAPI PFNGLTEXTUREBARRIERPROC glad_glTextureBarrier; +#define glTextureBarrier glad_glTextureBarrier +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/frontends/gl/glad/src/glad.c b/frontends/gl/glad/src/glad.c index d642cb9..4bd8c74 100644 --- a/frontends/gl/glad/src/glad.c +++ b/frontends/gl/glad/src/glad.c @@ -1,1816 +1,1816 @@ -/* - - OpenGL loader generated by glad 0.1.29 on Wed Apr 3 21:28:46 2019. - - Language/Generator: C/C++ - Specification: gl - APIs: gl=4.5 - Profile: core - Extensions: - - Loader: True - Local files: False - Omit khrplatform: False - Reproducible: False - - Commandline: - --profile="core" --api="gl=4.5" --generator="c" --spec="gl" --extensions="" - Online: - https://glad.dav1d.de/#profile=core&language=c&specification=gl&loader=on&api=gl%3D4.5 -*/ - -#include -#include -#include -#include - -static void* get_proc(const char *namez); - -#if defined(_WIN32) || defined(__CYGWIN__) -#include -static HMODULE libGL; - -typedef void* (APIENTRYP PFNWGLGETPROCADDRESSPROC_PRIVATE)(const char*); -static PFNWGLGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr; - -#ifdef _MSC_VER -#ifdef __has_include - #if __has_include() - #define HAVE_WINAPIFAMILY 1 - #endif -#elif _MSC_VER >= 1700 && !_USING_V110_SDK71_ - #define HAVE_WINAPIFAMILY 1 -#endif -#endif - -#ifdef HAVE_WINAPIFAMILY - #include - #if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) - #define IS_UWP 1 - #endif -#endif - -static -int open_gl(void) { -#ifndef IS_UWP - libGL = LoadLibraryW(L"opengl32.dll"); - if(libGL != NULL) { - void (* tmp)(void); - tmp = (void(*)(void)) GetProcAddress(libGL, "wglGetProcAddress"); - gladGetProcAddressPtr = (PFNWGLGETPROCADDRESSPROC_PRIVATE) tmp; - return gladGetProcAddressPtr != NULL; - } -#endif - - return 0; -} - -static -void close_gl(void) { - if(libGL != NULL) { - FreeLibrary((HMODULE) libGL); - libGL = NULL; - } -} -#else -#include -static void* libGL; - -#if !defined(__APPLE__) && !defined(__HAIKU__) -typedef void* (APIENTRYP PFNGLXGETPROCADDRESSPROC_PRIVATE)(const char*); -static PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr; -#endif - -static -int open_gl(void) { -#ifdef __APPLE__ - static const char *NAMES[] = { - "../Frameworks/OpenGL.framework/OpenGL", - "/Library/Frameworks/OpenGL.framework/OpenGL", - "/System/Library/Frameworks/OpenGL.framework/OpenGL", - "/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL" - }; -#else - static const char *NAMES[] = {"libGL.so.1", "libGL.so"}; -#endif - - unsigned int index = 0; - for(index = 0; index < (sizeof(NAMES) / sizeof(NAMES[0])); index++) { - libGL = dlopen(NAMES[index], RTLD_NOW | RTLD_GLOBAL); - - if(libGL != NULL) { -#if defined(__APPLE__) || defined(__HAIKU__) - return 1; -#else - gladGetProcAddressPtr = (PFNGLXGETPROCADDRESSPROC_PRIVATE)dlsym(libGL, - "glXGetProcAddressARB"); - return gladGetProcAddressPtr != NULL; -#endif - } - } - - return 0; -} - -static -void close_gl(void) { - if(libGL != NULL) { - dlclose(libGL); - libGL = NULL; - } -} -#endif - -static -void* get_proc(const char *namez) { - void* result = NULL; - if(libGL == NULL) return NULL; - -#if !defined(__APPLE__) && !defined(__HAIKU__) - if(gladGetProcAddressPtr != NULL) { - result = gladGetProcAddressPtr(namez); - } -#endif - if(result == NULL) { -#if defined(_WIN32) || defined(__CYGWIN__) - result = (void*)GetProcAddress((HMODULE) libGL, namez); -#else - result = dlsym(libGL, namez); -#endif - } - - return result; -} - -int gladLoadGL(void) { - int status = 0; - - if(open_gl()) { - status = gladLoadGLLoader(&get_proc); - close_gl(); - } - - return status; -} - -struct gladGLversionStruct GLVersion = { 0, 0 }; - -#if defined(GL_ES_VERSION_3_0) || defined(GL_VERSION_3_0) -#define _GLAD_IS_SOME_NEW_VERSION 1 -#endif - -static int max_loaded_major; -static int max_loaded_minor; - -static const char *exts = NULL; -static int num_exts_i = 0; -static char **exts_i = NULL; - -static int get_exts(void) { -#ifdef _GLAD_IS_SOME_NEW_VERSION - if(max_loaded_major < 3) { -#endif - exts = (const char *)glGetString(GL_EXTENSIONS); -#ifdef _GLAD_IS_SOME_NEW_VERSION - } else { - unsigned int index; - - num_exts_i = 0; - glGetIntegerv(GL_NUM_EXTENSIONS, &num_exts_i); - if (num_exts_i > 0) { - exts_i = (char **)malloc((size_t)num_exts_i * (sizeof *exts_i)); - } - - if (exts_i == NULL) { - return 0; - } - - for(index = 0; index < (unsigned)num_exts_i; index++) { - const char *gl_str_tmp = (const char*)glGetStringi(GL_EXTENSIONS, index); - size_t len = strlen(gl_str_tmp); - - char *local_str = (char*)malloc((len+1) * sizeof(char)); - if(local_str != NULL) { - memcpy(local_str, gl_str_tmp, (len+1) * sizeof(char)); - } - exts_i[index] = local_str; - } - } -#endif - return 1; -} - -static void free_exts(void) { - if (exts_i != NULL) { - int index; - for(index = 0; index < num_exts_i; index++) { - free((char *)exts_i[index]); - } - free((void *)exts_i); - exts_i = NULL; - } -} - -static int has_ext(const char *ext) { -#ifdef _GLAD_IS_SOME_NEW_VERSION - if(max_loaded_major < 3) { -#endif - const char *extensions; - const char *loc; - const char *terminator; - extensions = exts; - if(extensions == NULL || ext == NULL) { - return 0; - } - - while(1) { - loc = strstr(extensions, ext); - if(loc == NULL) { - return 0; - } - - terminator = loc + strlen(ext); - if((loc == extensions || *(loc - 1) == ' ') && - (*terminator == ' ' || *terminator == '\0')) { - return 1; - } - extensions = terminator; - } -#ifdef _GLAD_IS_SOME_NEW_VERSION - } else { - int index; - if(exts_i == NULL) return 0; - for(index = 0; index < num_exts_i; index++) { - const char *e = exts_i[index]; - - if(exts_i[index] != NULL && strcmp(e, ext) == 0) { - return 1; - } - } - } -#endif - - return 0; -} -int GLAD_GL_VERSION_1_0 = 0; -int GLAD_GL_VERSION_1_1 = 0; -int GLAD_GL_VERSION_1_2 = 0; -int GLAD_GL_VERSION_1_3 = 0; -int GLAD_GL_VERSION_1_4 = 0; -int GLAD_GL_VERSION_1_5 = 0; -int GLAD_GL_VERSION_2_0 = 0; -int GLAD_GL_VERSION_2_1 = 0; -int GLAD_GL_VERSION_3_0 = 0; -int GLAD_GL_VERSION_3_1 = 0; -int GLAD_GL_VERSION_3_2 = 0; -int GLAD_GL_VERSION_3_3 = 0; -int GLAD_GL_VERSION_4_0 = 0; -int GLAD_GL_VERSION_4_1 = 0; -int GLAD_GL_VERSION_4_2 = 0; -int GLAD_GL_VERSION_4_3 = 0; -int GLAD_GL_VERSION_4_4 = 0; -int GLAD_GL_VERSION_4_5 = 0; -PFNGLACTIVESHADERPROGRAMPROC glad_glActiveShaderProgram = NULL; -PFNGLACTIVETEXTUREPROC glad_glActiveTexture = NULL; -PFNGLATTACHSHADERPROC glad_glAttachShader = NULL; -PFNGLBEGINCONDITIONALRENDERPROC glad_glBeginConditionalRender = NULL; -PFNGLBEGINQUERYPROC glad_glBeginQuery = NULL; -PFNGLBEGINQUERYINDEXEDPROC glad_glBeginQueryIndexed = NULL; -PFNGLBEGINTRANSFORMFEEDBACKPROC glad_glBeginTransformFeedback = NULL; -PFNGLBINDATTRIBLOCATIONPROC glad_glBindAttribLocation = NULL; -PFNGLBINDBUFFERPROC glad_glBindBuffer = NULL; -PFNGLBINDBUFFERBASEPROC glad_glBindBufferBase = NULL; -PFNGLBINDBUFFERRANGEPROC glad_glBindBufferRange = NULL; -PFNGLBINDBUFFERSBASEPROC glad_glBindBuffersBase = NULL; -PFNGLBINDBUFFERSRANGEPROC glad_glBindBuffersRange = NULL; -PFNGLBINDFRAGDATALOCATIONPROC glad_glBindFragDataLocation = NULL; -PFNGLBINDFRAGDATALOCATIONINDEXEDPROC glad_glBindFragDataLocationIndexed = NULL; -PFNGLBINDFRAMEBUFFERPROC glad_glBindFramebuffer = NULL; -PFNGLBINDIMAGETEXTUREPROC glad_glBindImageTexture = NULL; -PFNGLBINDIMAGETEXTURESPROC glad_glBindImageTextures = NULL; -PFNGLBINDPROGRAMPIPELINEPROC glad_glBindProgramPipeline = NULL; -PFNGLBINDRENDERBUFFERPROC glad_glBindRenderbuffer = NULL; -PFNGLBINDSAMPLERPROC glad_glBindSampler = NULL; -PFNGLBINDSAMPLERSPROC glad_glBindSamplers = NULL; -PFNGLBINDTEXTUREPROC glad_glBindTexture = NULL; -PFNGLBINDTEXTUREUNITPROC glad_glBindTextureUnit = NULL; -PFNGLBINDTEXTURESPROC glad_glBindTextures = NULL; -PFNGLBINDTRANSFORMFEEDBACKPROC glad_glBindTransformFeedback = NULL; -PFNGLBINDVERTEXARRAYPROC glad_glBindVertexArray = NULL; -PFNGLBINDVERTEXBUFFERPROC glad_glBindVertexBuffer = NULL; -PFNGLBINDVERTEXBUFFERSPROC glad_glBindVertexBuffers = NULL; -PFNGLBLENDCOLORPROC glad_glBlendColor = NULL; -PFNGLBLENDEQUATIONPROC glad_glBlendEquation = NULL; -PFNGLBLENDEQUATIONSEPARATEPROC glad_glBlendEquationSeparate = NULL; -PFNGLBLENDEQUATIONSEPARATEIPROC glad_glBlendEquationSeparatei = NULL; -PFNGLBLENDEQUATIONIPROC glad_glBlendEquationi = NULL; -PFNGLBLENDFUNCPROC glad_glBlendFunc = NULL; -PFNGLBLENDFUNCSEPARATEPROC glad_glBlendFuncSeparate = NULL; -PFNGLBLENDFUNCSEPARATEIPROC glad_glBlendFuncSeparatei = NULL; -PFNGLBLENDFUNCIPROC glad_glBlendFunci = NULL; -PFNGLBLITFRAMEBUFFERPROC glad_glBlitFramebuffer = NULL; -PFNGLBLITNAMEDFRAMEBUFFERPROC glad_glBlitNamedFramebuffer = NULL; -PFNGLBUFFERDATAPROC glad_glBufferData = NULL; -PFNGLBUFFERSTORAGEPROC glad_glBufferStorage = NULL; -PFNGLBUFFERSUBDATAPROC glad_glBufferSubData = NULL; -PFNGLCHECKFRAMEBUFFERSTATUSPROC glad_glCheckFramebufferStatus = NULL; -PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC glad_glCheckNamedFramebufferStatus = NULL; -PFNGLCLAMPCOLORPROC glad_glClampColor = NULL; -PFNGLCLEARPROC glad_glClear = NULL; -PFNGLCLEARBUFFERDATAPROC glad_glClearBufferData = NULL; -PFNGLCLEARBUFFERSUBDATAPROC glad_glClearBufferSubData = NULL; -PFNGLCLEARBUFFERFIPROC glad_glClearBufferfi = NULL; -PFNGLCLEARBUFFERFVPROC glad_glClearBufferfv = NULL; -PFNGLCLEARBUFFERIVPROC glad_glClearBufferiv = NULL; -PFNGLCLEARBUFFERUIVPROC glad_glClearBufferuiv = NULL; -PFNGLCLEARCOLORPROC glad_glClearColor = NULL; -PFNGLCLEARDEPTHPROC glad_glClearDepth = NULL; -PFNGLCLEARDEPTHFPROC glad_glClearDepthf = NULL; -PFNGLCLEARNAMEDBUFFERDATAPROC glad_glClearNamedBufferData = NULL; -PFNGLCLEARNAMEDBUFFERSUBDATAPROC glad_glClearNamedBufferSubData = NULL; -PFNGLCLEARNAMEDFRAMEBUFFERFIPROC glad_glClearNamedFramebufferfi = NULL; -PFNGLCLEARNAMEDFRAMEBUFFERFVPROC glad_glClearNamedFramebufferfv = NULL; -PFNGLCLEARNAMEDFRAMEBUFFERIVPROC glad_glClearNamedFramebufferiv = NULL; -PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC glad_glClearNamedFramebufferuiv = NULL; -PFNGLCLEARSTENCILPROC glad_glClearStencil = NULL; -PFNGLCLEARTEXIMAGEPROC glad_glClearTexImage = NULL; -PFNGLCLEARTEXSUBIMAGEPROC glad_glClearTexSubImage = NULL; -PFNGLCLIENTWAITSYNCPROC glad_glClientWaitSync = NULL; -PFNGLCLIPCONTROLPROC glad_glClipControl = NULL; -PFNGLCOLORMASKPROC glad_glColorMask = NULL; -PFNGLCOLORMASKIPROC glad_glColorMaski = NULL; -PFNGLCOLORP3UIPROC glad_glColorP3ui = NULL; -PFNGLCOLORP3UIVPROC glad_glColorP3uiv = NULL; -PFNGLCOLORP4UIPROC glad_glColorP4ui = NULL; -PFNGLCOLORP4UIVPROC glad_glColorP4uiv = NULL; -PFNGLCOMPILESHADERPROC glad_glCompileShader = NULL; -PFNGLCOMPRESSEDTEXIMAGE1DPROC glad_glCompressedTexImage1D = NULL; -PFNGLCOMPRESSEDTEXIMAGE2DPROC glad_glCompressedTexImage2D = NULL; -PFNGLCOMPRESSEDTEXIMAGE3DPROC glad_glCompressedTexImage3D = NULL; -PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC glad_glCompressedTexSubImage1D = NULL; -PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glad_glCompressedTexSubImage2D = NULL; -PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glad_glCompressedTexSubImage3D = NULL; -PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC glad_glCompressedTextureSubImage1D = NULL; -PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC glad_glCompressedTextureSubImage2D = NULL; -PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC glad_glCompressedTextureSubImage3D = NULL; -PFNGLCOPYBUFFERSUBDATAPROC glad_glCopyBufferSubData = NULL; -PFNGLCOPYIMAGESUBDATAPROC glad_glCopyImageSubData = NULL; -PFNGLCOPYNAMEDBUFFERSUBDATAPROC glad_glCopyNamedBufferSubData = NULL; -PFNGLCOPYTEXIMAGE1DPROC glad_glCopyTexImage1D = NULL; -PFNGLCOPYTEXIMAGE2DPROC glad_glCopyTexImage2D = NULL; -PFNGLCOPYTEXSUBIMAGE1DPROC glad_glCopyTexSubImage1D = NULL; -PFNGLCOPYTEXSUBIMAGE2DPROC glad_glCopyTexSubImage2D = NULL; -PFNGLCOPYTEXSUBIMAGE3DPROC glad_glCopyTexSubImage3D = NULL; -PFNGLCOPYTEXTURESUBIMAGE1DPROC glad_glCopyTextureSubImage1D = NULL; -PFNGLCOPYTEXTURESUBIMAGE2DPROC glad_glCopyTextureSubImage2D = NULL; -PFNGLCOPYTEXTURESUBIMAGE3DPROC glad_glCopyTextureSubImage3D = NULL; -PFNGLCREATEBUFFERSPROC glad_glCreateBuffers = NULL; -PFNGLCREATEFRAMEBUFFERSPROC glad_glCreateFramebuffers = NULL; -PFNGLCREATEPROGRAMPROC glad_glCreateProgram = NULL; -PFNGLCREATEPROGRAMPIPELINESPROC glad_glCreateProgramPipelines = NULL; -PFNGLCREATEQUERIESPROC glad_glCreateQueries = NULL; -PFNGLCREATERENDERBUFFERSPROC glad_glCreateRenderbuffers = NULL; -PFNGLCREATESAMPLERSPROC glad_glCreateSamplers = NULL; -PFNGLCREATESHADERPROC glad_glCreateShader = NULL; -PFNGLCREATESHADERPROGRAMVPROC glad_glCreateShaderProgramv = NULL; -PFNGLCREATETEXTURESPROC glad_glCreateTextures = NULL; -PFNGLCREATETRANSFORMFEEDBACKSPROC glad_glCreateTransformFeedbacks = NULL; -PFNGLCREATEVERTEXARRAYSPROC glad_glCreateVertexArrays = NULL; -PFNGLCULLFACEPROC glad_glCullFace = NULL; -PFNGLDEBUGMESSAGECALLBACKPROC glad_glDebugMessageCallback = NULL; -PFNGLDEBUGMESSAGECONTROLPROC glad_glDebugMessageControl = NULL; -PFNGLDEBUGMESSAGEINSERTPROC glad_glDebugMessageInsert = NULL; -PFNGLDELETEBUFFERSPROC glad_glDeleteBuffers = NULL; -PFNGLDELETEFRAMEBUFFERSPROC glad_glDeleteFramebuffers = NULL; -PFNGLDELETEPROGRAMPROC glad_glDeleteProgram = NULL; -PFNGLDELETEPROGRAMPIPELINESPROC glad_glDeleteProgramPipelines = NULL; -PFNGLDELETEQUERIESPROC glad_glDeleteQueries = NULL; -PFNGLDELETERENDERBUFFERSPROC glad_glDeleteRenderbuffers = NULL; -PFNGLDELETESAMPLERSPROC glad_glDeleteSamplers = NULL; -PFNGLDELETESHADERPROC glad_glDeleteShader = NULL; -PFNGLDELETESYNCPROC glad_glDeleteSync = NULL; -PFNGLDELETETEXTURESPROC glad_glDeleteTextures = NULL; -PFNGLDELETETRANSFORMFEEDBACKSPROC glad_glDeleteTransformFeedbacks = NULL; -PFNGLDELETEVERTEXARRAYSPROC glad_glDeleteVertexArrays = NULL; -PFNGLDEPTHFUNCPROC glad_glDepthFunc = NULL; -PFNGLDEPTHMASKPROC glad_glDepthMask = NULL; -PFNGLDEPTHRANGEPROC glad_glDepthRange = NULL; -PFNGLDEPTHRANGEARRAYVPROC glad_glDepthRangeArrayv = NULL; -PFNGLDEPTHRANGEINDEXEDPROC glad_glDepthRangeIndexed = NULL; -PFNGLDEPTHRANGEFPROC glad_glDepthRangef = NULL; -PFNGLDETACHSHADERPROC glad_glDetachShader = NULL; -PFNGLDISABLEPROC glad_glDisable = NULL; -PFNGLDISABLEVERTEXARRAYATTRIBPROC glad_glDisableVertexArrayAttrib = NULL; -PFNGLDISABLEVERTEXATTRIBARRAYPROC glad_glDisableVertexAttribArray = NULL; -PFNGLDISABLEIPROC glad_glDisablei = NULL; -PFNGLDISPATCHCOMPUTEPROC glad_glDispatchCompute = NULL; -PFNGLDISPATCHCOMPUTEINDIRECTPROC glad_glDispatchComputeIndirect = NULL; -PFNGLDRAWARRAYSPROC glad_glDrawArrays = NULL; -PFNGLDRAWARRAYSINDIRECTPROC glad_glDrawArraysIndirect = NULL; -PFNGLDRAWARRAYSINSTANCEDPROC glad_glDrawArraysInstanced = NULL; -PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC glad_glDrawArraysInstancedBaseInstance = NULL; -PFNGLDRAWBUFFERPROC glad_glDrawBuffer = NULL; -PFNGLDRAWBUFFERSPROC glad_glDrawBuffers = NULL; -PFNGLDRAWELEMENTSPROC glad_glDrawElements = NULL; -PFNGLDRAWELEMENTSBASEVERTEXPROC glad_glDrawElementsBaseVertex = NULL; -PFNGLDRAWELEMENTSINDIRECTPROC glad_glDrawElementsIndirect = NULL; -PFNGLDRAWELEMENTSINSTANCEDPROC glad_glDrawElementsInstanced = NULL; -PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC glad_glDrawElementsInstancedBaseInstance = NULL; -PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC glad_glDrawElementsInstancedBaseVertex = NULL; -PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC glad_glDrawElementsInstancedBaseVertexBaseInstance = NULL; -PFNGLDRAWRANGEELEMENTSPROC glad_glDrawRangeElements = NULL; -PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC glad_glDrawRangeElementsBaseVertex = NULL; -PFNGLDRAWTRANSFORMFEEDBACKPROC glad_glDrawTransformFeedback = NULL; -PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC glad_glDrawTransformFeedbackInstanced = NULL; -PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC glad_glDrawTransformFeedbackStream = NULL; -PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC glad_glDrawTransformFeedbackStreamInstanced = NULL; -PFNGLENABLEPROC glad_glEnable = NULL; -PFNGLENABLEVERTEXARRAYATTRIBPROC glad_glEnableVertexArrayAttrib = NULL; -PFNGLENABLEVERTEXATTRIBARRAYPROC glad_glEnableVertexAttribArray = NULL; -PFNGLENABLEIPROC glad_glEnablei = NULL; -PFNGLENDCONDITIONALRENDERPROC glad_glEndConditionalRender = NULL; -PFNGLENDQUERYPROC glad_glEndQuery = NULL; -PFNGLENDQUERYINDEXEDPROC glad_glEndQueryIndexed = NULL; -PFNGLENDTRANSFORMFEEDBACKPROC glad_glEndTransformFeedback = NULL; -PFNGLFENCESYNCPROC glad_glFenceSync = NULL; -PFNGLFINISHPROC glad_glFinish = NULL; -PFNGLFLUSHPROC glad_glFlush = NULL; -PFNGLFLUSHMAPPEDBUFFERRANGEPROC glad_glFlushMappedBufferRange = NULL; -PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC glad_glFlushMappedNamedBufferRange = NULL; -PFNGLFRAMEBUFFERPARAMETERIPROC glad_glFramebufferParameteri = NULL; -PFNGLFRAMEBUFFERRENDERBUFFERPROC glad_glFramebufferRenderbuffer = NULL; -PFNGLFRAMEBUFFERTEXTUREPROC glad_glFramebufferTexture = NULL; -PFNGLFRAMEBUFFERTEXTURE1DPROC glad_glFramebufferTexture1D = NULL; -PFNGLFRAMEBUFFERTEXTURE2DPROC glad_glFramebufferTexture2D = NULL; -PFNGLFRAMEBUFFERTEXTURE3DPROC glad_glFramebufferTexture3D = NULL; -PFNGLFRAMEBUFFERTEXTURELAYERPROC glad_glFramebufferTextureLayer = NULL; -PFNGLFRONTFACEPROC glad_glFrontFace = NULL; -PFNGLGENBUFFERSPROC glad_glGenBuffers = NULL; -PFNGLGENFRAMEBUFFERSPROC glad_glGenFramebuffers = NULL; -PFNGLGENPROGRAMPIPELINESPROC glad_glGenProgramPipelines = NULL; -PFNGLGENQUERIESPROC glad_glGenQueries = NULL; -PFNGLGENRENDERBUFFERSPROC glad_glGenRenderbuffers = NULL; -PFNGLGENSAMPLERSPROC glad_glGenSamplers = NULL; -PFNGLGENTEXTURESPROC glad_glGenTextures = NULL; -PFNGLGENTRANSFORMFEEDBACKSPROC glad_glGenTransformFeedbacks = NULL; -PFNGLGENVERTEXARRAYSPROC glad_glGenVertexArrays = NULL; -PFNGLGENERATEMIPMAPPROC glad_glGenerateMipmap = NULL; -PFNGLGENERATETEXTUREMIPMAPPROC glad_glGenerateTextureMipmap = NULL; -PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC glad_glGetActiveAtomicCounterBufferiv = NULL; -PFNGLGETACTIVEATTRIBPROC glad_glGetActiveAttrib = NULL; -PFNGLGETACTIVESUBROUTINENAMEPROC glad_glGetActiveSubroutineName = NULL; -PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC glad_glGetActiveSubroutineUniformName = NULL; -PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC glad_glGetActiveSubroutineUniformiv = NULL; -PFNGLGETACTIVEUNIFORMPROC glad_glGetActiveUniform = NULL; -PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glad_glGetActiveUniformBlockName = NULL; -PFNGLGETACTIVEUNIFORMBLOCKIVPROC glad_glGetActiveUniformBlockiv = NULL; -PFNGLGETACTIVEUNIFORMNAMEPROC glad_glGetActiveUniformName = NULL; -PFNGLGETACTIVEUNIFORMSIVPROC glad_glGetActiveUniformsiv = NULL; -PFNGLGETATTACHEDSHADERSPROC glad_glGetAttachedShaders = NULL; -PFNGLGETATTRIBLOCATIONPROC glad_glGetAttribLocation = NULL; -PFNGLGETBOOLEANI_VPROC glad_glGetBooleani_v = NULL; -PFNGLGETBOOLEANVPROC glad_glGetBooleanv = NULL; -PFNGLGETBUFFERPARAMETERI64VPROC glad_glGetBufferParameteri64v = NULL; -PFNGLGETBUFFERPARAMETERIVPROC glad_glGetBufferParameteriv = NULL; -PFNGLGETBUFFERPOINTERVPROC glad_glGetBufferPointerv = NULL; -PFNGLGETBUFFERSUBDATAPROC glad_glGetBufferSubData = NULL; -PFNGLGETCOMPRESSEDTEXIMAGEPROC glad_glGetCompressedTexImage = NULL; -PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC glad_glGetCompressedTextureImage = NULL; -PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC glad_glGetCompressedTextureSubImage = NULL; -PFNGLGETDEBUGMESSAGELOGPROC glad_glGetDebugMessageLog = NULL; -PFNGLGETDOUBLEI_VPROC glad_glGetDoublei_v = NULL; -PFNGLGETDOUBLEVPROC glad_glGetDoublev = NULL; -PFNGLGETERRORPROC glad_glGetError = NULL; -PFNGLGETFLOATI_VPROC glad_glGetFloati_v = NULL; -PFNGLGETFLOATVPROC glad_glGetFloatv = NULL; -PFNGLGETFRAGDATAINDEXPROC glad_glGetFragDataIndex = NULL; -PFNGLGETFRAGDATALOCATIONPROC glad_glGetFragDataLocation = NULL; -PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glad_glGetFramebufferAttachmentParameteriv = NULL; -PFNGLGETFRAMEBUFFERPARAMETERIVPROC glad_glGetFramebufferParameteriv = NULL; -PFNGLGETGRAPHICSRESETSTATUSPROC glad_glGetGraphicsResetStatus = NULL; -PFNGLGETINTEGER64I_VPROC glad_glGetInteger64i_v = NULL; -PFNGLGETINTEGER64VPROC glad_glGetInteger64v = NULL; -PFNGLGETINTEGERI_VPROC glad_glGetIntegeri_v = NULL; -PFNGLGETINTEGERVPROC glad_glGetIntegerv = NULL; -PFNGLGETINTERNALFORMATI64VPROC glad_glGetInternalformati64v = NULL; -PFNGLGETINTERNALFORMATIVPROC glad_glGetInternalformativ = NULL; -PFNGLGETMULTISAMPLEFVPROC glad_glGetMultisamplefv = NULL; -PFNGLGETNAMEDBUFFERPARAMETERI64VPROC glad_glGetNamedBufferParameteri64v = NULL; -PFNGLGETNAMEDBUFFERPARAMETERIVPROC glad_glGetNamedBufferParameteriv = NULL; -PFNGLGETNAMEDBUFFERPOINTERVPROC glad_glGetNamedBufferPointerv = NULL; -PFNGLGETNAMEDBUFFERSUBDATAPROC glad_glGetNamedBufferSubData = NULL; -PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC glad_glGetNamedFramebufferAttachmentParameteriv = NULL; -PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC glad_glGetNamedFramebufferParameteriv = NULL; -PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC glad_glGetNamedRenderbufferParameteriv = NULL; -PFNGLGETOBJECTLABELPROC glad_glGetObjectLabel = NULL; -PFNGLGETOBJECTPTRLABELPROC glad_glGetObjectPtrLabel = NULL; -PFNGLGETPOINTERVPROC glad_glGetPointerv = NULL; -PFNGLGETPROGRAMBINARYPROC glad_glGetProgramBinary = NULL; -PFNGLGETPROGRAMINFOLOGPROC glad_glGetProgramInfoLog = NULL; -PFNGLGETPROGRAMINTERFACEIVPROC glad_glGetProgramInterfaceiv = NULL; -PFNGLGETPROGRAMPIPELINEINFOLOGPROC glad_glGetProgramPipelineInfoLog = NULL; -PFNGLGETPROGRAMPIPELINEIVPROC glad_glGetProgramPipelineiv = NULL; -PFNGLGETPROGRAMRESOURCEINDEXPROC glad_glGetProgramResourceIndex = NULL; -PFNGLGETPROGRAMRESOURCELOCATIONPROC glad_glGetProgramResourceLocation = NULL; -PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC glad_glGetProgramResourceLocationIndex = NULL; -PFNGLGETPROGRAMRESOURCENAMEPROC glad_glGetProgramResourceName = NULL; -PFNGLGETPROGRAMRESOURCEIVPROC glad_glGetProgramResourceiv = NULL; -PFNGLGETPROGRAMSTAGEIVPROC glad_glGetProgramStageiv = NULL; -PFNGLGETPROGRAMIVPROC glad_glGetProgramiv = NULL; -PFNGLGETQUERYBUFFEROBJECTI64VPROC glad_glGetQueryBufferObjecti64v = NULL; -PFNGLGETQUERYBUFFEROBJECTIVPROC glad_glGetQueryBufferObjectiv = NULL; -PFNGLGETQUERYBUFFEROBJECTUI64VPROC glad_glGetQueryBufferObjectui64v = NULL; -PFNGLGETQUERYBUFFEROBJECTUIVPROC glad_glGetQueryBufferObjectuiv = NULL; -PFNGLGETQUERYINDEXEDIVPROC glad_glGetQueryIndexediv = NULL; -PFNGLGETQUERYOBJECTI64VPROC glad_glGetQueryObjecti64v = NULL; -PFNGLGETQUERYOBJECTIVPROC glad_glGetQueryObjectiv = NULL; -PFNGLGETQUERYOBJECTUI64VPROC glad_glGetQueryObjectui64v = NULL; -PFNGLGETQUERYOBJECTUIVPROC glad_glGetQueryObjectuiv = NULL; -PFNGLGETQUERYIVPROC glad_glGetQueryiv = NULL; -PFNGLGETRENDERBUFFERPARAMETERIVPROC glad_glGetRenderbufferParameteriv = NULL; -PFNGLGETSAMPLERPARAMETERIIVPROC glad_glGetSamplerParameterIiv = NULL; -PFNGLGETSAMPLERPARAMETERIUIVPROC glad_glGetSamplerParameterIuiv = NULL; -PFNGLGETSAMPLERPARAMETERFVPROC glad_glGetSamplerParameterfv = NULL; -PFNGLGETSAMPLERPARAMETERIVPROC glad_glGetSamplerParameteriv = NULL; -PFNGLGETSHADERINFOLOGPROC glad_glGetShaderInfoLog = NULL; -PFNGLGETSHADERPRECISIONFORMATPROC glad_glGetShaderPrecisionFormat = NULL; -PFNGLGETSHADERSOURCEPROC glad_glGetShaderSource = NULL; -PFNGLGETSHADERIVPROC glad_glGetShaderiv = NULL; -PFNGLGETSTRINGPROC glad_glGetString = NULL; -PFNGLGETSTRINGIPROC glad_glGetStringi = NULL; -PFNGLGETSUBROUTINEINDEXPROC glad_glGetSubroutineIndex = NULL; -PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC glad_glGetSubroutineUniformLocation = NULL; -PFNGLGETSYNCIVPROC glad_glGetSynciv = NULL; -PFNGLGETTEXIMAGEPROC glad_glGetTexImage = NULL; -PFNGLGETTEXLEVELPARAMETERFVPROC glad_glGetTexLevelParameterfv = NULL; -PFNGLGETTEXLEVELPARAMETERIVPROC glad_glGetTexLevelParameteriv = NULL; -PFNGLGETTEXPARAMETERIIVPROC glad_glGetTexParameterIiv = NULL; -PFNGLGETTEXPARAMETERIUIVPROC glad_glGetTexParameterIuiv = NULL; -PFNGLGETTEXPARAMETERFVPROC glad_glGetTexParameterfv = NULL; -PFNGLGETTEXPARAMETERIVPROC glad_glGetTexParameteriv = NULL; -PFNGLGETTEXTUREIMAGEPROC glad_glGetTextureImage = NULL; -PFNGLGETTEXTURELEVELPARAMETERFVPROC glad_glGetTextureLevelParameterfv = NULL; -PFNGLGETTEXTURELEVELPARAMETERIVPROC glad_glGetTextureLevelParameteriv = NULL; -PFNGLGETTEXTUREPARAMETERIIVPROC glad_glGetTextureParameterIiv = NULL; -PFNGLGETTEXTUREPARAMETERIUIVPROC glad_glGetTextureParameterIuiv = NULL; -PFNGLGETTEXTUREPARAMETERFVPROC glad_glGetTextureParameterfv = NULL; -PFNGLGETTEXTUREPARAMETERIVPROC glad_glGetTextureParameteriv = NULL; -PFNGLGETTEXTURESUBIMAGEPROC glad_glGetTextureSubImage = NULL; -PFNGLGETTRANSFORMFEEDBACKVARYINGPROC glad_glGetTransformFeedbackVarying = NULL; -PFNGLGETTRANSFORMFEEDBACKI64_VPROC glad_glGetTransformFeedbacki64_v = NULL; -PFNGLGETTRANSFORMFEEDBACKI_VPROC glad_glGetTransformFeedbacki_v = NULL; -PFNGLGETTRANSFORMFEEDBACKIVPROC glad_glGetTransformFeedbackiv = NULL; -PFNGLGETUNIFORMBLOCKINDEXPROC glad_glGetUniformBlockIndex = NULL; -PFNGLGETUNIFORMINDICESPROC glad_glGetUniformIndices = NULL; -PFNGLGETUNIFORMLOCATIONPROC glad_glGetUniformLocation = NULL; -PFNGLGETUNIFORMSUBROUTINEUIVPROC glad_glGetUniformSubroutineuiv = NULL; -PFNGLGETUNIFORMDVPROC glad_glGetUniformdv = NULL; -PFNGLGETUNIFORMFVPROC glad_glGetUniformfv = NULL; -PFNGLGETUNIFORMIVPROC glad_glGetUniformiv = NULL; -PFNGLGETUNIFORMUIVPROC glad_glGetUniformuiv = NULL; -PFNGLGETVERTEXARRAYINDEXED64IVPROC glad_glGetVertexArrayIndexed64iv = NULL; -PFNGLGETVERTEXARRAYINDEXEDIVPROC glad_glGetVertexArrayIndexediv = NULL; -PFNGLGETVERTEXARRAYIVPROC glad_glGetVertexArrayiv = NULL; -PFNGLGETVERTEXATTRIBIIVPROC glad_glGetVertexAttribIiv = NULL; -PFNGLGETVERTEXATTRIBIUIVPROC glad_glGetVertexAttribIuiv = NULL; -PFNGLGETVERTEXATTRIBLDVPROC glad_glGetVertexAttribLdv = NULL; -PFNGLGETVERTEXATTRIBPOINTERVPROC glad_glGetVertexAttribPointerv = NULL; -PFNGLGETVERTEXATTRIBDVPROC glad_glGetVertexAttribdv = NULL; -PFNGLGETVERTEXATTRIBFVPROC glad_glGetVertexAttribfv = NULL; -PFNGLGETVERTEXATTRIBIVPROC glad_glGetVertexAttribiv = NULL; -PFNGLGETNCOLORTABLEPROC glad_glGetnColorTable = NULL; -PFNGLGETNCOMPRESSEDTEXIMAGEPROC glad_glGetnCompressedTexImage = NULL; -PFNGLGETNCONVOLUTIONFILTERPROC glad_glGetnConvolutionFilter = NULL; -PFNGLGETNHISTOGRAMPROC glad_glGetnHistogram = NULL; -PFNGLGETNMAPDVPROC glad_glGetnMapdv = NULL; -PFNGLGETNMAPFVPROC glad_glGetnMapfv = NULL; -PFNGLGETNMAPIVPROC glad_glGetnMapiv = NULL; -PFNGLGETNMINMAXPROC glad_glGetnMinmax = NULL; -PFNGLGETNPIXELMAPFVPROC glad_glGetnPixelMapfv = NULL; -PFNGLGETNPIXELMAPUIVPROC glad_glGetnPixelMapuiv = NULL; -PFNGLGETNPIXELMAPUSVPROC glad_glGetnPixelMapusv = NULL; -PFNGLGETNPOLYGONSTIPPLEPROC glad_glGetnPolygonStipple = NULL; -PFNGLGETNSEPARABLEFILTERPROC glad_glGetnSeparableFilter = NULL; -PFNGLGETNTEXIMAGEPROC glad_glGetnTexImage = NULL; -PFNGLGETNUNIFORMDVPROC glad_glGetnUniformdv = NULL; -PFNGLGETNUNIFORMFVPROC glad_glGetnUniformfv = NULL; -PFNGLGETNUNIFORMIVPROC glad_glGetnUniformiv = NULL; -PFNGLGETNUNIFORMUIVPROC glad_glGetnUniformuiv = NULL; -PFNGLHINTPROC glad_glHint = NULL; -PFNGLINVALIDATEBUFFERDATAPROC glad_glInvalidateBufferData = NULL; -PFNGLINVALIDATEBUFFERSUBDATAPROC glad_glInvalidateBufferSubData = NULL; -PFNGLINVALIDATEFRAMEBUFFERPROC glad_glInvalidateFramebuffer = NULL; -PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC glad_glInvalidateNamedFramebufferData = NULL; -PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC glad_glInvalidateNamedFramebufferSubData = NULL; -PFNGLINVALIDATESUBFRAMEBUFFERPROC glad_glInvalidateSubFramebuffer = NULL; -PFNGLINVALIDATETEXIMAGEPROC glad_glInvalidateTexImage = NULL; -PFNGLINVALIDATETEXSUBIMAGEPROC glad_glInvalidateTexSubImage = NULL; -PFNGLISBUFFERPROC glad_glIsBuffer = NULL; -PFNGLISENABLEDPROC glad_glIsEnabled = NULL; -PFNGLISENABLEDIPROC glad_glIsEnabledi = NULL; -PFNGLISFRAMEBUFFERPROC glad_glIsFramebuffer = NULL; -PFNGLISPROGRAMPROC glad_glIsProgram = NULL; -PFNGLISPROGRAMPIPELINEPROC glad_glIsProgramPipeline = NULL; -PFNGLISQUERYPROC glad_glIsQuery = NULL; -PFNGLISRENDERBUFFERPROC glad_glIsRenderbuffer = NULL; -PFNGLISSAMPLERPROC glad_glIsSampler = NULL; -PFNGLISSHADERPROC glad_glIsShader = NULL; -PFNGLISSYNCPROC glad_glIsSync = NULL; -PFNGLISTEXTUREPROC glad_glIsTexture = NULL; -PFNGLISTRANSFORMFEEDBACKPROC glad_glIsTransformFeedback = NULL; -PFNGLISVERTEXARRAYPROC glad_glIsVertexArray = NULL; -PFNGLLINEWIDTHPROC glad_glLineWidth = NULL; -PFNGLLINKPROGRAMPROC glad_glLinkProgram = NULL; -PFNGLLOGICOPPROC glad_glLogicOp = NULL; -PFNGLMAPBUFFERPROC glad_glMapBuffer = NULL; -PFNGLMAPBUFFERRANGEPROC glad_glMapBufferRange = NULL; -PFNGLMAPNAMEDBUFFERPROC glad_glMapNamedBuffer = NULL; -PFNGLMAPNAMEDBUFFERRANGEPROC glad_glMapNamedBufferRange = NULL; -PFNGLMEMORYBARRIERPROC glad_glMemoryBarrier = NULL; -PFNGLMEMORYBARRIERBYREGIONPROC glad_glMemoryBarrierByRegion = NULL; -PFNGLMINSAMPLESHADINGPROC glad_glMinSampleShading = NULL; -PFNGLMULTIDRAWARRAYSPROC glad_glMultiDrawArrays = NULL; -PFNGLMULTIDRAWARRAYSINDIRECTPROC glad_glMultiDrawArraysIndirect = NULL; -PFNGLMULTIDRAWELEMENTSPROC glad_glMultiDrawElements = NULL; -PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC glad_glMultiDrawElementsBaseVertex = NULL; -PFNGLMULTIDRAWELEMENTSINDIRECTPROC glad_glMultiDrawElementsIndirect = NULL; -PFNGLMULTITEXCOORDP1UIPROC glad_glMultiTexCoordP1ui = NULL; -PFNGLMULTITEXCOORDP1UIVPROC glad_glMultiTexCoordP1uiv = NULL; -PFNGLMULTITEXCOORDP2UIPROC glad_glMultiTexCoordP2ui = NULL; -PFNGLMULTITEXCOORDP2UIVPROC glad_glMultiTexCoordP2uiv = NULL; -PFNGLMULTITEXCOORDP3UIPROC glad_glMultiTexCoordP3ui = NULL; -PFNGLMULTITEXCOORDP3UIVPROC glad_glMultiTexCoordP3uiv = NULL; -PFNGLMULTITEXCOORDP4UIPROC glad_glMultiTexCoordP4ui = NULL; -PFNGLMULTITEXCOORDP4UIVPROC glad_glMultiTexCoordP4uiv = NULL; -PFNGLNAMEDBUFFERDATAPROC glad_glNamedBufferData = NULL; -PFNGLNAMEDBUFFERSTORAGEPROC glad_glNamedBufferStorage = NULL; -PFNGLNAMEDBUFFERSUBDATAPROC glad_glNamedBufferSubData = NULL; -PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC glad_glNamedFramebufferDrawBuffer = NULL; -PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC glad_glNamedFramebufferDrawBuffers = NULL; -PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC glad_glNamedFramebufferParameteri = NULL; -PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC glad_glNamedFramebufferReadBuffer = NULL; -PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC glad_glNamedFramebufferRenderbuffer = NULL; -PFNGLNAMEDFRAMEBUFFERTEXTUREPROC glad_glNamedFramebufferTexture = NULL; -PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC glad_glNamedFramebufferTextureLayer = NULL; -PFNGLNAMEDRENDERBUFFERSTORAGEPROC glad_glNamedRenderbufferStorage = NULL; -PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC glad_glNamedRenderbufferStorageMultisample = NULL; -PFNGLNORMALP3UIPROC glad_glNormalP3ui = NULL; -PFNGLNORMALP3UIVPROC glad_glNormalP3uiv = NULL; -PFNGLOBJECTLABELPROC glad_glObjectLabel = NULL; -PFNGLOBJECTPTRLABELPROC glad_glObjectPtrLabel = NULL; -PFNGLPATCHPARAMETERFVPROC glad_glPatchParameterfv = NULL; -PFNGLPATCHPARAMETERIPROC glad_glPatchParameteri = NULL; -PFNGLPAUSETRANSFORMFEEDBACKPROC glad_glPauseTransformFeedback = NULL; -PFNGLPIXELSTOREFPROC glad_glPixelStoref = NULL; -PFNGLPIXELSTOREIPROC glad_glPixelStorei = NULL; -PFNGLPOINTPARAMETERFPROC glad_glPointParameterf = NULL; -PFNGLPOINTPARAMETERFVPROC glad_glPointParameterfv = NULL; -PFNGLPOINTPARAMETERIPROC glad_glPointParameteri = NULL; -PFNGLPOINTPARAMETERIVPROC glad_glPointParameteriv = NULL; -PFNGLPOINTSIZEPROC glad_glPointSize = NULL; -PFNGLPOLYGONMODEPROC glad_glPolygonMode = NULL; -PFNGLPOLYGONOFFSETPROC glad_glPolygonOffset = NULL; -PFNGLPOPDEBUGGROUPPROC glad_glPopDebugGroup = NULL; -PFNGLPRIMITIVERESTARTINDEXPROC glad_glPrimitiveRestartIndex = NULL; -PFNGLPROGRAMBINARYPROC glad_glProgramBinary = NULL; -PFNGLPROGRAMPARAMETERIPROC glad_glProgramParameteri = NULL; -PFNGLPROGRAMUNIFORM1DPROC glad_glProgramUniform1d = NULL; -PFNGLPROGRAMUNIFORM1DVPROC glad_glProgramUniform1dv = NULL; -PFNGLPROGRAMUNIFORM1FPROC glad_glProgramUniform1f = NULL; -PFNGLPROGRAMUNIFORM1FVPROC glad_glProgramUniform1fv = NULL; -PFNGLPROGRAMUNIFORM1IPROC glad_glProgramUniform1i = NULL; -PFNGLPROGRAMUNIFORM1IVPROC glad_glProgramUniform1iv = NULL; -PFNGLPROGRAMUNIFORM1UIPROC glad_glProgramUniform1ui = NULL; -PFNGLPROGRAMUNIFORM1UIVPROC glad_glProgramUniform1uiv = NULL; -PFNGLPROGRAMUNIFORM2DPROC glad_glProgramUniform2d = NULL; -PFNGLPROGRAMUNIFORM2DVPROC glad_glProgramUniform2dv = NULL; -PFNGLPROGRAMUNIFORM2FPROC glad_glProgramUniform2f = NULL; -PFNGLPROGRAMUNIFORM2FVPROC glad_glProgramUniform2fv = NULL; -PFNGLPROGRAMUNIFORM2IPROC glad_glProgramUniform2i = NULL; -PFNGLPROGRAMUNIFORM2IVPROC glad_glProgramUniform2iv = NULL; -PFNGLPROGRAMUNIFORM2UIPROC glad_glProgramUniform2ui = NULL; -PFNGLPROGRAMUNIFORM2UIVPROC glad_glProgramUniform2uiv = NULL; -PFNGLPROGRAMUNIFORM3DPROC glad_glProgramUniform3d = NULL; -PFNGLPROGRAMUNIFORM3DVPROC glad_glProgramUniform3dv = NULL; -PFNGLPROGRAMUNIFORM3FPROC glad_glProgramUniform3f = NULL; -PFNGLPROGRAMUNIFORM3FVPROC glad_glProgramUniform3fv = NULL; -PFNGLPROGRAMUNIFORM3IPROC glad_glProgramUniform3i = NULL; -PFNGLPROGRAMUNIFORM3IVPROC glad_glProgramUniform3iv = NULL; -PFNGLPROGRAMUNIFORM3UIPROC glad_glProgramUniform3ui = NULL; -PFNGLPROGRAMUNIFORM3UIVPROC glad_glProgramUniform3uiv = NULL; -PFNGLPROGRAMUNIFORM4DPROC glad_glProgramUniform4d = NULL; -PFNGLPROGRAMUNIFORM4DVPROC glad_glProgramUniform4dv = NULL; -PFNGLPROGRAMUNIFORM4FPROC glad_glProgramUniform4f = NULL; -PFNGLPROGRAMUNIFORM4FVPROC glad_glProgramUniform4fv = NULL; -PFNGLPROGRAMUNIFORM4IPROC glad_glProgramUniform4i = NULL; -PFNGLPROGRAMUNIFORM4IVPROC glad_glProgramUniform4iv = NULL; -PFNGLPROGRAMUNIFORM4UIPROC glad_glProgramUniform4ui = NULL; -PFNGLPROGRAMUNIFORM4UIVPROC glad_glProgramUniform4uiv = NULL; -PFNGLPROGRAMUNIFORMMATRIX2DVPROC glad_glProgramUniformMatrix2dv = NULL; -PFNGLPROGRAMUNIFORMMATRIX2FVPROC glad_glProgramUniformMatrix2fv = NULL; -PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC glad_glProgramUniformMatrix2x3dv = NULL; -PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC glad_glProgramUniformMatrix2x3fv = NULL; -PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC glad_glProgramUniformMatrix2x4dv = NULL; -PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC glad_glProgramUniformMatrix2x4fv = NULL; -PFNGLPROGRAMUNIFORMMATRIX3DVPROC glad_glProgramUniformMatrix3dv = NULL; -PFNGLPROGRAMUNIFORMMATRIX3FVPROC glad_glProgramUniformMatrix3fv = NULL; -PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC glad_glProgramUniformMatrix3x2dv = NULL; -PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC glad_glProgramUniformMatrix3x2fv = NULL; -PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC glad_glProgramUniformMatrix3x4dv = NULL; -PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC glad_glProgramUniformMatrix3x4fv = NULL; -PFNGLPROGRAMUNIFORMMATRIX4DVPROC glad_glProgramUniformMatrix4dv = NULL; -PFNGLPROGRAMUNIFORMMATRIX4FVPROC glad_glProgramUniformMatrix4fv = NULL; -PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC glad_glProgramUniformMatrix4x2dv = NULL; -PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC glad_glProgramUniformMatrix4x2fv = NULL; -PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC glad_glProgramUniformMatrix4x3dv = NULL; -PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC glad_glProgramUniformMatrix4x3fv = NULL; -PFNGLPROVOKINGVERTEXPROC glad_glProvokingVertex = NULL; -PFNGLPUSHDEBUGGROUPPROC glad_glPushDebugGroup = NULL; -PFNGLQUERYCOUNTERPROC glad_glQueryCounter = NULL; -PFNGLREADBUFFERPROC glad_glReadBuffer = NULL; -PFNGLREADPIXELSPROC glad_glReadPixels = NULL; -PFNGLREADNPIXELSPROC glad_glReadnPixels = NULL; -PFNGLRELEASESHADERCOMPILERPROC glad_glReleaseShaderCompiler = NULL; -PFNGLRENDERBUFFERSTORAGEPROC glad_glRenderbufferStorage = NULL; -PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glad_glRenderbufferStorageMultisample = NULL; -PFNGLRESUMETRANSFORMFEEDBACKPROC glad_glResumeTransformFeedback = NULL; -PFNGLSAMPLECOVERAGEPROC glad_glSampleCoverage = NULL; -PFNGLSAMPLEMASKIPROC glad_glSampleMaski = NULL; -PFNGLSAMPLERPARAMETERIIVPROC glad_glSamplerParameterIiv = NULL; -PFNGLSAMPLERPARAMETERIUIVPROC glad_glSamplerParameterIuiv = NULL; -PFNGLSAMPLERPARAMETERFPROC glad_glSamplerParameterf = NULL; -PFNGLSAMPLERPARAMETERFVPROC glad_glSamplerParameterfv = NULL; -PFNGLSAMPLERPARAMETERIPROC glad_glSamplerParameteri = NULL; -PFNGLSAMPLERPARAMETERIVPROC glad_glSamplerParameteriv = NULL; -PFNGLSCISSORPROC glad_glScissor = NULL; -PFNGLSCISSORARRAYVPROC glad_glScissorArrayv = NULL; -PFNGLSCISSORINDEXEDPROC glad_glScissorIndexed = NULL; -PFNGLSCISSORINDEXEDVPROC glad_glScissorIndexedv = NULL; -PFNGLSECONDARYCOLORP3UIPROC glad_glSecondaryColorP3ui = NULL; -PFNGLSECONDARYCOLORP3UIVPROC glad_glSecondaryColorP3uiv = NULL; -PFNGLSHADERBINARYPROC glad_glShaderBinary = NULL; -PFNGLSHADERSOURCEPROC glad_glShaderSource = NULL; -PFNGLSHADERSTORAGEBLOCKBINDINGPROC glad_glShaderStorageBlockBinding = NULL; -PFNGLSTENCILFUNCPROC glad_glStencilFunc = NULL; -PFNGLSTENCILFUNCSEPARATEPROC glad_glStencilFuncSeparate = NULL; -PFNGLSTENCILMASKPROC glad_glStencilMask = NULL; -PFNGLSTENCILMASKSEPARATEPROC glad_glStencilMaskSeparate = NULL; -PFNGLSTENCILOPPROC glad_glStencilOp = NULL; -PFNGLSTENCILOPSEPARATEPROC glad_glStencilOpSeparate = NULL; -PFNGLTEXBUFFERPROC glad_glTexBuffer = NULL; -PFNGLTEXBUFFERRANGEPROC glad_glTexBufferRange = NULL; -PFNGLTEXCOORDP1UIPROC glad_glTexCoordP1ui = NULL; -PFNGLTEXCOORDP1UIVPROC glad_glTexCoordP1uiv = NULL; -PFNGLTEXCOORDP2UIPROC glad_glTexCoordP2ui = NULL; -PFNGLTEXCOORDP2UIVPROC glad_glTexCoordP2uiv = NULL; -PFNGLTEXCOORDP3UIPROC glad_glTexCoordP3ui = NULL; -PFNGLTEXCOORDP3UIVPROC glad_glTexCoordP3uiv = NULL; -PFNGLTEXCOORDP4UIPROC glad_glTexCoordP4ui = NULL; -PFNGLTEXCOORDP4UIVPROC glad_glTexCoordP4uiv = NULL; -PFNGLTEXIMAGE1DPROC glad_glTexImage1D = NULL; -PFNGLTEXIMAGE2DPROC glad_glTexImage2D = NULL; -PFNGLTEXIMAGE2DMULTISAMPLEPROC glad_glTexImage2DMultisample = NULL; -PFNGLTEXIMAGE3DPROC glad_glTexImage3D = NULL; -PFNGLTEXIMAGE3DMULTISAMPLEPROC glad_glTexImage3DMultisample = NULL; -PFNGLTEXPARAMETERIIVPROC glad_glTexParameterIiv = NULL; -PFNGLTEXPARAMETERIUIVPROC glad_glTexParameterIuiv = NULL; -PFNGLTEXPARAMETERFPROC glad_glTexParameterf = NULL; -PFNGLTEXPARAMETERFVPROC glad_glTexParameterfv = NULL; -PFNGLTEXPARAMETERIPROC glad_glTexParameteri = NULL; -PFNGLTEXPARAMETERIVPROC glad_glTexParameteriv = NULL; -PFNGLTEXSTORAGE1DPROC glad_glTexStorage1D = NULL; -PFNGLTEXSTORAGE2DPROC glad_glTexStorage2D = NULL; -PFNGLTEXSTORAGE2DMULTISAMPLEPROC glad_glTexStorage2DMultisample = NULL; -PFNGLTEXSTORAGE3DPROC glad_glTexStorage3D = NULL; -PFNGLTEXSTORAGE3DMULTISAMPLEPROC glad_glTexStorage3DMultisample = NULL; -PFNGLTEXSUBIMAGE1DPROC glad_glTexSubImage1D = NULL; -PFNGLTEXSUBIMAGE2DPROC glad_glTexSubImage2D = NULL; -PFNGLTEXSUBIMAGE3DPROC glad_glTexSubImage3D = NULL; -PFNGLTEXTUREBARRIERPROC glad_glTextureBarrier = NULL; -PFNGLTEXTUREBUFFERPROC glad_glTextureBuffer = NULL; -PFNGLTEXTUREBUFFERRANGEPROC glad_glTextureBufferRange = NULL; -PFNGLTEXTUREPARAMETERIIVPROC glad_glTextureParameterIiv = NULL; -PFNGLTEXTUREPARAMETERIUIVPROC glad_glTextureParameterIuiv = NULL; -PFNGLTEXTUREPARAMETERFPROC glad_glTextureParameterf = NULL; -PFNGLTEXTUREPARAMETERFVPROC glad_glTextureParameterfv = NULL; -PFNGLTEXTUREPARAMETERIPROC glad_glTextureParameteri = NULL; -PFNGLTEXTUREPARAMETERIVPROC glad_glTextureParameteriv = NULL; -PFNGLTEXTURESTORAGE1DPROC glad_glTextureStorage1D = NULL; -PFNGLTEXTURESTORAGE2DPROC glad_glTextureStorage2D = NULL; -PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC glad_glTextureStorage2DMultisample = NULL; -PFNGLTEXTURESTORAGE3DPROC glad_glTextureStorage3D = NULL; -PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC glad_glTextureStorage3DMultisample = NULL; -PFNGLTEXTURESUBIMAGE1DPROC glad_glTextureSubImage1D = NULL; -PFNGLTEXTURESUBIMAGE2DPROC glad_glTextureSubImage2D = NULL; -PFNGLTEXTURESUBIMAGE3DPROC glad_glTextureSubImage3D = NULL; -PFNGLTEXTUREVIEWPROC glad_glTextureView = NULL; -PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC glad_glTransformFeedbackBufferBase = NULL; -PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC glad_glTransformFeedbackBufferRange = NULL; -PFNGLTRANSFORMFEEDBACKVARYINGSPROC glad_glTransformFeedbackVaryings = NULL; -PFNGLUNIFORM1DPROC glad_glUniform1d = NULL; -PFNGLUNIFORM1DVPROC glad_glUniform1dv = NULL; -PFNGLUNIFORM1FPROC glad_glUniform1f = NULL; -PFNGLUNIFORM1FVPROC glad_glUniform1fv = NULL; -PFNGLUNIFORM1IPROC glad_glUniform1i = NULL; -PFNGLUNIFORM1IVPROC glad_glUniform1iv = NULL; -PFNGLUNIFORM1UIPROC glad_glUniform1ui = NULL; -PFNGLUNIFORM1UIVPROC glad_glUniform1uiv = NULL; -PFNGLUNIFORM2DPROC glad_glUniform2d = NULL; -PFNGLUNIFORM2DVPROC glad_glUniform2dv = NULL; -PFNGLUNIFORM2FPROC glad_glUniform2f = NULL; -PFNGLUNIFORM2FVPROC glad_glUniform2fv = NULL; -PFNGLUNIFORM2IPROC glad_glUniform2i = NULL; -PFNGLUNIFORM2IVPROC glad_glUniform2iv = NULL; -PFNGLUNIFORM2UIPROC glad_glUniform2ui = NULL; -PFNGLUNIFORM2UIVPROC glad_glUniform2uiv = NULL; -PFNGLUNIFORM3DPROC glad_glUniform3d = NULL; -PFNGLUNIFORM3DVPROC glad_glUniform3dv = NULL; -PFNGLUNIFORM3FPROC glad_glUniform3f = NULL; -PFNGLUNIFORM3FVPROC glad_glUniform3fv = NULL; -PFNGLUNIFORM3IPROC glad_glUniform3i = NULL; -PFNGLUNIFORM3IVPROC glad_glUniform3iv = NULL; -PFNGLUNIFORM3UIPROC glad_glUniform3ui = NULL; -PFNGLUNIFORM3UIVPROC glad_glUniform3uiv = NULL; -PFNGLUNIFORM4DPROC glad_glUniform4d = NULL; -PFNGLUNIFORM4DVPROC glad_glUniform4dv = NULL; -PFNGLUNIFORM4FPROC glad_glUniform4f = NULL; -PFNGLUNIFORM4FVPROC glad_glUniform4fv = NULL; -PFNGLUNIFORM4IPROC glad_glUniform4i = NULL; -PFNGLUNIFORM4IVPROC glad_glUniform4iv = NULL; -PFNGLUNIFORM4UIPROC glad_glUniform4ui = NULL; -PFNGLUNIFORM4UIVPROC glad_glUniform4uiv = NULL; -PFNGLUNIFORMBLOCKBINDINGPROC glad_glUniformBlockBinding = NULL; -PFNGLUNIFORMMATRIX2DVPROC glad_glUniformMatrix2dv = NULL; -PFNGLUNIFORMMATRIX2FVPROC glad_glUniformMatrix2fv = NULL; -PFNGLUNIFORMMATRIX2X3DVPROC glad_glUniformMatrix2x3dv = NULL; -PFNGLUNIFORMMATRIX2X3FVPROC glad_glUniformMatrix2x3fv = NULL; -PFNGLUNIFORMMATRIX2X4DVPROC glad_glUniformMatrix2x4dv = NULL; -PFNGLUNIFORMMATRIX2X4FVPROC glad_glUniformMatrix2x4fv = NULL; -PFNGLUNIFORMMATRIX3DVPROC glad_glUniformMatrix3dv = NULL; -PFNGLUNIFORMMATRIX3FVPROC glad_glUniformMatrix3fv = NULL; -PFNGLUNIFORMMATRIX3X2DVPROC glad_glUniformMatrix3x2dv = NULL; -PFNGLUNIFORMMATRIX3X2FVPROC glad_glUniformMatrix3x2fv = NULL; -PFNGLUNIFORMMATRIX3X4DVPROC glad_glUniformMatrix3x4dv = NULL; -PFNGLUNIFORMMATRIX3X4FVPROC glad_glUniformMatrix3x4fv = NULL; -PFNGLUNIFORMMATRIX4DVPROC glad_glUniformMatrix4dv = NULL; -PFNGLUNIFORMMATRIX4FVPROC glad_glUniformMatrix4fv = NULL; -PFNGLUNIFORMMATRIX4X2DVPROC glad_glUniformMatrix4x2dv = NULL; -PFNGLUNIFORMMATRIX4X2FVPROC glad_glUniformMatrix4x2fv = NULL; -PFNGLUNIFORMMATRIX4X3DVPROC glad_glUniformMatrix4x3dv = NULL; -PFNGLUNIFORMMATRIX4X3FVPROC glad_glUniformMatrix4x3fv = NULL; -PFNGLUNIFORMSUBROUTINESUIVPROC glad_glUniformSubroutinesuiv = NULL; -PFNGLUNMAPBUFFERPROC glad_glUnmapBuffer = NULL; -PFNGLUNMAPNAMEDBUFFERPROC glad_glUnmapNamedBuffer = NULL; -PFNGLUSEPROGRAMPROC glad_glUseProgram = NULL; -PFNGLUSEPROGRAMSTAGESPROC glad_glUseProgramStages = NULL; -PFNGLVALIDATEPROGRAMPROC glad_glValidateProgram = NULL; -PFNGLVALIDATEPROGRAMPIPELINEPROC glad_glValidateProgramPipeline = NULL; -PFNGLVERTEXARRAYATTRIBBINDINGPROC glad_glVertexArrayAttribBinding = NULL; -PFNGLVERTEXARRAYATTRIBFORMATPROC glad_glVertexArrayAttribFormat = NULL; -PFNGLVERTEXARRAYATTRIBIFORMATPROC glad_glVertexArrayAttribIFormat = NULL; -PFNGLVERTEXARRAYATTRIBLFORMATPROC glad_glVertexArrayAttribLFormat = NULL; -PFNGLVERTEXARRAYBINDINGDIVISORPROC glad_glVertexArrayBindingDivisor = NULL; -PFNGLVERTEXARRAYELEMENTBUFFERPROC glad_glVertexArrayElementBuffer = NULL; -PFNGLVERTEXARRAYVERTEXBUFFERPROC glad_glVertexArrayVertexBuffer = NULL; -PFNGLVERTEXARRAYVERTEXBUFFERSPROC glad_glVertexArrayVertexBuffers = NULL; -PFNGLVERTEXATTRIB1DPROC glad_glVertexAttrib1d = NULL; -PFNGLVERTEXATTRIB1DVPROC glad_glVertexAttrib1dv = NULL; -PFNGLVERTEXATTRIB1FPROC glad_glVertexAttrib1f = NULL; -PFNGLVERTEXATTRIB1FVPROC glad_glVertexAttrib1fv = NULL; -PFNGLVERTEXATTRIB1SPROC glad_glVertexAttrib1s = NULL; -PFNGLVERTEXATTRIB1SVPROC glad_glVertexAttrib1sv = NULL; -PFNGLVERTEXATTRIB2DPROC glad_glVertexAttrib2d = NULL; -PFNGLVERTEXATTRIB2DVPROC glad_glVertexAttrib2dv = NULL; -PFNGLVERTEXATTRIB2FPROC glad_glVertexAttrib2f = NULL; -PFNGLVERTEXATTRIB2FVPROC glad_glVertexAttrib2fv = NULL; -PFNGLVERTEXATTRIB2SPROC glad_glVertexAttrib2s = NULL; -PFNGLVERTEXATTRIB2SVPROC glad_glVertexAttrib2sv = NULL; -PFNGLVERTEXATTRIB3DPROC glad_glVertexAttrib3d = NULL; -PFNGLVERTEXATTRIB3DVPROC glad_glVertexAttrib3dv = NULL; -PFNGLVERTEXATTRIB3FPROC glad_glVertexAttrib3f = NULL; -PFNGLVERTEXATTRIB3FVPROC glad_glVertexAttrib3fv = NULL; -PFNGLVERTEXATTRIB3SPROC glad_glVertexAttrib3s = NULL; -PFNGLVERTEXATTRIB3SVPROC glad_glVertexAttrib3sv = NULL; -PFNGLVERTEXATTRIB4NBVPROC glad_glVertexAttrib4Nbv = NULL; -PFNGLVERTEXATTRIB4NIVPROC glad_glVertexAttrib4Niv = NULL; -PFNGLVERTEXATTRIB4NSVPROC glad_glVertexAttrib4Nsv = NULL; -PFNGLVERTEXATTRIB4NUBPROC glad_glVertexAttrib4Nub = NULL; -PFNGLVERTEXATTRIB4NUBVPROC glad_glVertexAttrib4Nubv = NULL; -PFNGLVERTEXATTRIB4NUIVPROC glad_glVertexAttrib4Nuiv = NULL; -PFNGLVERTEXATTRIB4NUSVPROC glad_glVertexAttrib4Nusv = NULL; -PFNGLVERTEXATTRIB4BVPROC glad_glVertexAttrib4bv = NULL; -PFNGLVERTEXATTRIB4DPROC glad_glVertexAttrib4d = NULL; -PFNGLVERTEXATTRIB4DVPROC glad_glVertexAttrib4dv = NULL; -PFNGLVERTEXATTRIB4FPROC glad_glVertexAttrib4f = NULL; -PFNGLVERTEXATTRIB4FVPROC glad_glVertexAttrib4fv = NULL; -PFNGLVERTEXATTRIB4IVPROC glad_glVertexAttrib4iv = NULL; -PFNGLVERTEXATTRIB4SPROC glad_glVertexAttrib4s = NULL; -PFNGLVERTEXATTRIB4SVPROC glad_glVertexAttrib4sv = NULL; -PFNGLVERTEXATTRIB4UBVPROC glad_glVertexAttrib4ubv = NULL; -PFNGLVERTEXATTRIB4UIVPROC glad_glVertexAttrib4uiv = NULL; -PFNGLVERTEXATTRIB4USVPROC glad_glVertexAttrib4usv = NULL; -PFNGLVERTEXATTRIBBINDINGPROC glad_glVertexAttribBinding = NULL; -PFNGLVERTEXATTRIBDIVISORPROC glad_glVertexAttribDivisor = NULL; -PFNGLVERTEXATTRIBFORMATPROC glad_glVertexAttribFormat = NULL; -PFNGLVERTEXATTRIBI1IPROC glad_glVertexAttribI1i = NULL; -PFNGLVERTEXATTRIBI1IVPROC glad_glVertexAttribI1iv = NULL; -PFNGLVERTEXATTRIBI1UIPROC glad_glVertexAttribI1ui = NULL; -PFNGLVERTEXATTRIBI1UIVPROC glad_glVertexAttribI1uiv = NULL; -PFNGLVERTEXATTRIBI2IPROC glad_glVertexAttribI2i = NULL; -PFNGLVERTEXATTRIBI2IVPROC glad_glVertexAttribI2iv = NULL; -PFNGLVERTEXATTRIBI2UIPROC glad_glVertexAttribI2ui = NULL; -PFNGLVERTEXATTRIBI2UIVPROC glad_glVertexAttribI2uiv = NULL; -PFNGLVERTEXATTRIBI3IPROC glad_glVertexAttribI3i = NULL; -PFNGLVERTEXATTRIBI3IVPROC glad_glVertexAttribI3iv = NULL; -PFNGLVERTEXATTRIBI3UIPROC glad_glVertexAttribI3ui = NULL; -PFNGLVERTEXATTRIBI3UIVPROC glad_glVertexAttribI3uiv = NULL; -PFNGLVERTEXATTRIBI4BVPROC glad_glVertexAttribI4bv = NULL; -PFNGLVERTEXATTRIBI4IPROC glad_glVertexAttribI4i = NULL; -PFNGLVERTEXATTRIBI4IVPROC glad_glVertexAttribI4iv = NULL; -PFNGLVERTEXATTRIBI4SVPROC glad_glVertexAttribI4sv = NULL; -PFNGLVERTEXATTRIBI4UBVPROC glad_glVertexAttribI4ubv = NULL; -PFNGLVERTEXATTRIBI4UIPROC glad_glVertexAttribI4ui = NULL; -PFNGLVERTEXATTRIBI4UIVPROC glad_glVertexAttribI4uiv = NULL; -PFNGLVERTEXATTRIBI4USVPROC glad_glVertexAttribI4usv = NULL; -PFNGLVERTEXATTRIBIFORMATPROC glad_glVertexAttribIFormat = NULL; -PFNGLVERTEXATTRIBIPOINTERPROC glad_glVertexAttribIPointer = NULL; -PFNGLVERTEXATTRIBL1DPROC glad_glVertexAttribL1d = NULL; -PFNGLVERTEXATTRIBL1DVPROC glad_glVertexAttribL1dv = NULL; -PFNGLVERTEXATTRIBL2DPROC glad_glVertexAttribL2d = NULL; -PFNGLVERTEXATTRIBL2DVPROC glad_glVertexAttribL2dv = NULL; -PFNGLVERTEXATTRIBL3DPROC glad_glVertexAttribL3d = NULL; -PFNGLVERTEXATTRIBL3DVPROC glad_glVertexAttribL3dv = NULL; -PFNGLVERTEXATTRIBL4DPROC glad_glVertexAttribL4d = NULL; -PFNGLVERTEXATTRIBL4DVPROC glad_glVertexAttribL4dv = NULL; -PFNGLVERTEXATTRIBLFORMATPROC glad_glVertexAttribLFormat = NULL; -PFNGLVERTEXATTRIBLPOINTERPROC glad_glVertexAttribLPointer = NULL; -PFNGLVERTEXATTRIBP1UIPROC glad_glVertexAttribP1ui = NULL; -PFNGLVERTEXATTRIBP1UIVPROC glad_glVertexAttribP1uiv = NULL; -PFNGLVERTEXATTRIBP2UIPROC glad_glVertexAttribP2ui = NULL; -PFNGLVERTEXATTRIBP2UIVPROC glad_glVertexAttribP2uiv = NULL; -PFNGLVERTEXATTRIBP3UIPROC glad_glVertexAttribP3ui = NULL; -PFNGLVERTEXATTRIBP3UIVPROC glad_glVertexAttribP3uiv = NULL; -PFNGLVERTEXATTRIBP4UIPROC glad_glVertexAttribP4ui = NULL; -PFNGLVERTEXATTRIBP4UIVPROC glad_glVertexAttribP4uiv = NULL; -PFNGLVERTEXATTRIBPOINTERPROC glad_glVertexAttribPointer = NULL; -PFNGLVERTEXBINDINGDIVISORPROC glad_glVertexBindingDivisor = NULL; -PFNGLVERTEXP2UIPROC glad_glVertexP2ui = NULL; -PFNGLVERTEXP2UIVPROC glad_glVertexP2uiv = NULL; -PFNGLVERTEXP3UIPROC glad_glVertexP3ui = NULL; -PFNGLVERTEXP3UIVPROC glad_glVertexP3uiv = NULL; -PFNGLVERTEXP4UIPROC glad_glVertexP4ui = NULL; -PFNGLVERTEXP4UIVPROC glad_glVertexP4uiv = NULL; -PFNGLVIEWPORTPROC glad_glViewport = NULL; -PFNGLVIEWPORTARRAYVPROC glad_glViewportArrayv = NULL; -PFNGLVIEWPORTINDEXEDFPROC glad_glViewportIndexedf = NULL; -PFNGLVIEWPORTINDEXEDFVPROC glad_glViewportIndexedfv = NULL; -PFNGLWAITSYNCPROC glad_glWaitSync = NULL; -static void load_GL_VERSION_1_0(GLADloadproc load) { - if(!GLAD_GL_VERSION_1_0) return; - glad_glCullFace = (PFNGLCULLFACEPROC)load("glCullFace"); - glad_glFrontFace = (PFNGLFRONTFACEPROC)load("glFrontFace"); - glad_glHint = (PFNGLHINTPROC)load("glHint"); - glad_glLineWidth = (PFNGLLINEWIDTHPROC)load("glLineWidth"); - glad_glPointSize = (PFNGLPOINTSIZEPROC)load("glPointSize"); - glad_glPolygonMode = (PFNGLPOLYGONMODEPROC)load("glPolygonMode"); - glad_glScissor = (PFNGLSCISSORPROC)load("glScissor"); - glad_glTexParameterf = (PFNGLTEXPARAMETERFPROC)load("glTexParameterf"); - glad_glTexParameterfv = (PFNGLTEXPARAMETERFVPROC)load("glTexParameterfv"); - glad_glTexParameteri = (PFNGLTEXPARAMETERIPROC)load("glTexParameteri"); - glad_glTexParameteriv = (PFNGLTEXPARAMETERIVPROC)load("glTexParameteriv"); - glad_glTexImage1D = (PFNGLTEXIMAGE1DPROC)load("glTexImage1D"); - glad_glTexImage2D = (PFNGLTEXIMAGE2DPROC)load("glTexImage2D"); - glad_glDrawBuffer = (PFNGLDRAWBUFFERPROC)load("glDrawBuffer"); - glad_glClear = (PFNGLCLEARPROC)load("glClear"); - glad_glClearColor = (PFNGLCLEARCOLORPROC)load("glClearColor"); - glad_glClearStencil = (PFNGLCLEARSTENCILPROC)load("glClearStencil"); - glad_glClearDepth = (PFNGLCLEARDEPTHPROC)load("glClearDepth"); - glad_glStencilMask = (PFNGLSTENCILMASKPROC)load("glStencilMask"); - glad_glColorMask = (PFNGLCOLORMASKPROC)load("glColorMask"); - glad_glDepthMask = (PFNGLDEPTHMASKPROC)load("glDepthMask"); - glad_glDisable = (PFNGLDISABLEPROC)load("glDisable"); - glad_glEnable = (PFNGLENABLEPROC)load("glEnable"); - glad_glFinish = (PFNGLFINISHPROC)load("glFinish"); - glad_glFlush = (PFNGLFLUSHPROC)load("glFlush"); - glad_glBlendFunc = (PFNGLBLENDFUNCPROC)load("glBlendFunc"); - glad_glLogicOp = (PFNGLLOGICOPPROC)load("glLogicOp"); - glad_glStencilFunc = (PFNGLSTENCILFUNCPROC)load("glStencilFunc"); - glad_glStencilOp = (PFNGLSTENCILOPPROC)load("glStencilOp"); - glad_glDepthFunc = (PFNGLDEPTHFUNCPROC)load("glDepthFunc"); - glad_glPixelStoref = (PFNGLPIXELSTOREFPROC)load("glPixelStoref"); - glad_glPixelStorei = (PFNGLPIXELSTOREIPROC)load("glPixelStorei"); - glad_glReadBuffer = (PFNGLREADBUFFERPROC)load("glReadBuffer"); - glad_glReadPixels = (PFNGLREADPIXELSPROC)load("glReadPixels"); - glad_glGetBooleanv = (PFNGLGETBOOLEANVPROC)load("glGetBooleanv"); - glad_glGetDoublev = (PFNGLGETDOUBLEVPROC)load("glGetDoublev"); - glad_glGetError = (PFNGLGETERRORPROC)load("glGetError"); - glad_glGetFloatv = (PFNGLGETFLOATVPROC)load("glGetFloatv"); - glad_glGetIntegerv = (PFNGLGETINTEGERVPROC)load("glGetIntegerv"); - glad_glGetString = (PFNGLGETSTRINGPROC)load("glGetString"); - glad_glGetTexImage = (PFNGLGETTEXIMAGEPROC)load("glGetTexImage"); - glad_glGetTexParameterfv = (PFNGLGETTEXPARAMETERFVPROC)load("glGetTexParameterfv"); - glad_glGetTexParameteriv = (PFNGLGETTEXPARAMETERIVPROC)load("glGetTexParameteriv"); - glad_glGetTexLevelParameterfv = (PFNGLGETTEXLEVELPARAMETERFVPROC)load("glGetTexLevelParameterfv"); - glad_glGetTexLevelParameteriv = (PFNGLGETTEXLEVELPARAMETERIVPROC)load("glGetTexLevelParameteriv"); - glad_glIsEnabled = (PFNGLISENABLEDPROC)load("glIsEnabled"); - glad_glDepthRange = (PFNGLDEPTHRANGEPROC)load("glDepthRange"); - glad_glViewport = (PFNGLVIEWPORTPROC)load("glViewport"); -} -static void load_GL_VERSION_1_1(GLADloadproc load) { - if(!GLAD_GL_VERSION_1_1) return; - glad_glDrawArrays = (PFNGLDRAWARRAYSPROC)load("glDrawArrays"); - glad_glDrawElements = (PFNGLDRAWELEMENTSPROC)load("glDrawElements"); - glad_glPolygonOffset = (PFNGLPOLYGONOFFSETPROC)load("glPolygonOffset"); - glad_glCopyTexImage1D = (PFNGLCOPYTEXIMAGE1DPROC)load("glCopyTexImage1D"); - glad_glCopyTexImage2D = (PFNGLCOPYTEXIMAGE2DPROC)load("glCopyTexImage2D"); - glad_glCopyTexSubImage1D = (PFNGLCOPYTEXSUBIMAGE1DPROC)load("glCopyTexSubImage1D"); - glad_glCopyTexSubImage2D = (PFNGLCOPYTEXSUBIMAGE2DPROC)load("glCopyTexSubImage2D"); - glad_glTexSubImage1D = (PFNGLTEXSUBIMAGE1DPROC)load("glTexSubImage1D"); - glad_glTexSubImage2D = (PFNGLTEXSUBIMAGE2DPROC)load("glTexSubImage2D"); - glad_glBindTexture = (PFNGLBINDTEXTUREPROC)load("glBindTexture"); - glad_glDeleteTextures = (PFNGLDELETETEXTURESPROC)load("glDeleteTextures"); - glad_glGenTextures = (PFNGLGENTEXTURESPROC)load("glGenTextures"); - glad_glIsTexture = (PFNGLISTEXTUREPROC)load("glIsTexture"); -} -static void load_GL_VERSION_1_2(GLADloadproc load) { - if(!GLAD_GL_VERSION_1_2) return; - glad_glDrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC)load("glDrawRangeElements"); - glad_glTexImage3D = (PFNGLTEXIMAGE3DPROC)load("glTexImage3D"); - glad_glTexSubImage3D = (PFNGLTEXSUBIMAGE3DPROC)load("glTexSubImage3D"); - glad_glCopyTexSubImage3D = (PFNGLCOPYTEXSUBIMAGE3DPROC)load("glCopyTexSubImage3D"); -} -static void load_GL_VERSION_1_3(GLADloadproc load) { - if(!GLAD_GL_VERSION_1_3) return; - glad_glActiveTexture = (PFNGLACTIVETEXTUREPROC)load("glActiveTexture"); - glad_glSampleCoverage = (PFNGLSAMPLECOVERAGEPROC)load("glSampleCoverage"); - glad_glCompressedTexImage3D = (PFNGLCOMPRESSEDTEXIMAGE3DPROC)load("glCompressedTexImage3D"); - glad_glCompressedTexImage2D = (PFNGLCOMPRESSEDTEXIMAGE2DPROC)load("glCompressedTexImage2D"); - glad_glCompressedTexImage1D = (PFNGLCOMPRESSEDTEXIMAGE1DPROC)load("glCompressedTexImage1D"); - glad_glCompressedTexSubImage3D = (PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC)load("glCompressedTexSubImage3D"); - glad_glCompressedTexSubImage2D = (PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)load("glCompressedTexSubImage2D"); - glad_glCompressedTexSubImage1D = (PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC)load("glCompressedTexSubImage1D"); - glad_glGetCompressedTexImage = (PFNGLGETCOMPRESSEDTEXIMAGEPROC)load("glGetCompressedTexImage"); -} -static void load_GL_VERSION_1_4(GLADloadproc load) { - if(!GLAD_GL_VERSION_1_4) return; - glad_glBlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC)load("glBlendFuncSeparate"); - glad_glMultiDrawArrays = (PFNGLMULTIDRAWARRAYSPROC)load("glMultiDrawArrays"); - glad_glMultiDrawElements = (PFNGLMULTIDRAWELEMENTSPROC)load("glMultiDrawElements"); - glad_glPointParameterf = (PFNGLPOINTPARAMETERFPROC)load("glPointParameterf"); - glad_glPointParameterfv = (PFNGLPOINTPARAMETERFVPROC)load("glPointParameterfv"); - glad_glPointParameteri = (PFNGLPOINTPARAMETERIPROC)load("glPointParameteri"); - glad_glPointParameteriv = (PFNGLPOINTPARAMETERIVPROC)load("glPointParameteriv"); - glad_glBlendColor = (PFNGLBLENDCOLORPROC)load("glBlendColor"); - glad_glBlendEquation = (PFNGLBLENDEQUATIONPROC)load("glBlendEquation"); -} -static void load_GL_VERSION_1_5(GLADloadproc load) { - if(!GLAD_GL_VERSION_1_5) return; - glad_glGenQueries = (PFNGLGENQUERIESPROC)load("glGenQueries"); - glad_glDeleteQueries = (PFNGLDELETEQUERIESPROC)load("glDeleteQueries"); - glad_glIsQuery = (PFNGLISQUERYPROC)load("glIsQuery"); - glad_glBeginQuery = (PFNGLBEGINQUERYPROC)load("glBeginQuery"); - glad_glEndQuery = (PFNGLENDQUERYPROC)load("glEndQuery"); - glad_glGetQueryiv = (PFNGLGETQUERYIVPROC)load("glGetQueryiv"); - glad_glGetQueryObjectiv = (PFNGLGETQUERYOBJECTIVPROC)load("glGetQueryObjectiv"); - glad_glGetQueryObjectuiv = (PFNGLGETQUERYOBJECTUIVPROC)load("glGetQueryObjectuiv"); - glad_glBindBuffer = (PFNGLBINDBUFFERPROC)load("glBindBuffer"); - glad_glDeleteBuffers = (PFNGLDELETEBUFFERSPROC)load("glDeleteBuffers"); - glad_glGenBuffers = (PFNGLGENBUFFERSPROC)load("glGenBuffers"); - glad_glIsBuffer = (PFNGLISBUFFERPROC)load("glIsBuffer"); - glad_glBufferData = (PFNGLBUFFERDATAPROC)load("glBufferData"); - glad_glBufferSubData = (PFNGLBUFFERSUBDATAPROC)load("glBufferSubData"); - glad_glGetBufferSubData = (PFNGLGETBUFFERSUBDATAPROC)load("glGetBufferSubData"); - glad_glMapBuffer = (PFNGLMAPBUFFERPROC)load("glMapBuffer"); - glad_glUnmapBuffer = (PFNGLUNMAPBUFFERPROC)load("glUnmapBuffer"); - glad_glGetBufferParameteriv = (PFNGLGETBUFFERPARAMETERIVPROC)load("glGetBufferParameteriv"); - glad_glGetBufferPointerv = (PFNGLGETBUFFERPOINTERVPROC)load("glGetBufferPointerv"); -} -static void load_GL_VERSION_2_0(GLADloadproc load) { - if(!GLAD_GL_VERSION_2_0) return; - glad_glBlendEquationSeparate = (PFNGLBLENDEQUATIONSEPARATEPROC)load("glBlendEquationSeparate"); - glad_glDrawBuffers = (PFNGLDRAWBUFFERSPROC)load("glDrawBuffers"); - glad_glStencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC)load("glStencilOpSeparate"); - glad_glStencilFuncSeparate = (PFNGLSTENCILFUNCSEPARATEPROC)load("glStencilFuncSeparate"); - glad_glStencilMaskSeparate = (PFNGLSTENCILMASKSEPARATEPROC)load("glStencilMaskSeparate"); - glad_glAttachShader = (PFNGLATTACHSHADERPROC)load("glAttachShader"); - glad_glBindAttribLocation = (PFNGLBINDATTRIBLOCATIONPROC)load("glBindAttribLocation"); - glad_glCompileShader = (PFNGLCOMPILESHADERPROC)load("glCompileShader"); - glad_glCreateProgram = (PFNGLCREATEPROGRAMPROC)load("glCreateProgram"); - glad_glCreateShader = (PFNGLCREATESHADERPROC)load("glCreateShader"); - glad_glDeleteProgram = (PFNGLDELETEPROGRAMPROC)load("glDeleteProgram"); - glad_glDeleteShader = (PFNGLDELETESHADERPROC)load("glDeleteShader"); - glad_glDetachShader = (PFNGLDETACHSHADERPROC)load("glDetachShader"); - glad_glDisableVertexAttribArray = (PFNGLDISABLEVERTEXATTRIBARRAYPROC)load("glDisableVertexAttribArray"); - glad_glEnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC)load("glEnableVertexAttribArray"); - glad_glGetActiveAttrib = (PFNGLGETACTIVEATTRIBPROC)load("glGetActiveAttrib"); - glad_glGetActiveUniform = (PFNGLGETACTIVEUNIFORMPROC)load("glGetActiveUniform"); - glad_glGetAttachedShaders = (PFNGLGETATTACHEDSHADERSPROC)load("glGetAttachedShaders"); - glad_glGetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC)load("glGetAttribLocation"); - glad_glGetProgramiv = (PFNGLGETPROGRAMIVPROC)load("glGetProgramiv"); - glad_glGetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC)load("glGetProgramInfoLog"); - glad_glGetShaderiv = (PFNGLGETSHADERIVPROC)load("glGetShaderiv"); - glad_glGetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC)load("glGetShaderInfoLog"); - glad_glGetShaderSource = (PFNGLGETSHADERSOURCEPROC)load("glGetShaderSource"); - glad_glGetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC)load("glGetUniformLocation"); - glad_glGetUniformfv = (PFNGLGETUNIFORMFVPROC)load("glGetUniformfv"); - glad_glGetUniformiv = (PFNGLGETUNIFORMIVPROC)load("glGetUniformiv"); - glad_glGetVertexAttribdv = (PFNGLGETVERTEXATTRIBDVPROC)load("glGetVertexAttribdv"); - glad_glGetVertexAttribfv = (PFNGLGETVERTEXATTRIBFVPROC)load("glGetVertexAttribfv"); - glad_glGetVertexAttribiv = (PFNGLGETVERTEXATTRIBIVPROC)load("glGetVertexAttribiv"); - glad_glGetVertexAttribPointerv = (PFNGLGETVERTEXATTRIBPOINTERVPROC)load("glGetVertexAttribPointerv"); - glad_glIsProgram = (PFNGLISPROGRAMPROC)load("glIsProgram"); - glad_glIsShader = (PFNGLISSHADERPROC)load("glIsShader"); - glad_glLinkProgram = (PFNGLLINKPROGRAMPROC)load("glLinkProgram"); - glad_glShaderSource = (PFNGLSHADERSOURCEPROC)load("glShaderSource"); - glad_glUseProgram = (PFNGLUSEPROGRAMPROC)load("glUseProgram"); - glad_glUniform1f = (PFNGLUNIFORM1FPROC)load("glUniform1f"); - glad_glUniform2f = (PFNGLUNIFORM2FPROC)load("glUniform2f"); - glad_glUniform3f = (PFNGLUNIFORM3FPROC)load("glUniform3f"); - glad_glUniform4f = (PFNGLUNIFORM4FPROC)load("glUniform4f"); - glad_glUniform1i = (PFNGLUNIFORM1IPROC)load("glUniform1i"); - glad_glUniform2i = (PFNGLUNIFORM2IPROC)load("glUniform2i"); - glad_glUniform3i = (PFNGLUNIFORM3IPROC)load("glUniform3i"); - glad_glUniform4i = (PFNGLUNIFORM4IPROC)load("glUniform4i"); - glad_glUniform1fv = (PFNGLUNIFORM1FVPROC)load("glUniform1fv"); - glad_glUniform2fv = (PFNGLUNIFORM2FVPROC)load("glUniform2fv"); - glad_glUniform3fv = (PFNGLUNIFORM3FVPROC)load("glUniform3fv"); - glad_glUniform4fv = (PFNGLUNIFORM4FVPROC)load("glUniform4fv"); - glad_glUniform1iv = (PFNGLUNIFORM1IVPROC)load("glUniform1iv"); - glad_glUniform2iv = (PFNGLUNIFORM2IVPROC)load("glUniform2iv"); - glad_glUniform3iv = (PFNGLUNIFORM3IVPROC)load("glUniform3iv"); - glad_glUniform4iv = (PFNGLUNIFORM4IVPROC)load("glUniform4iv"); - glad_glUniformMatrix2fv = (PFNGLUNIFORMMATRIX2FVPROC)load("glUniformMatrix2fv"); - glad_glUniformMatrix3fv = (PFNGLUNIFORMMATRIX3FVPROC)load("glUniformMatrix3fv"); - glad_glUniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC)load("glUniformMatrix4fv"); - glad_glValidateProgram = (PFNGLVALIDATEPROGRAMPROC)load("glValidateProgram"); - glad_glVertexAttrib1d = (PFNGLVERTEXATTRIB1DPROC)load("glVertexAttrib1d"); - glad_glVertexAttrib1dv = (PFNGLVERTEXATTRIB1DVPROC)load("glVertexAttrib1dv"); - glad_glVertexAttrib1f = (PFNGLVERTEXATTRIB1FPROC)load("glVertexAttrib1f"); - glad_glVertexAttrib1fv = (PFNGLVERTEXATTRIB1FVPROC)load("glVertexAttrib1fv"); - glad_glVertexAttrib1s = (PFNGLVERTEXATTRIB1SPROC)load("glVertexAttrib1s"); - glad_glVertexAttrib1sv = (PFNGLVERTEXATTRIB1SVPROC)load("glVertexAttrib1sv"); - glad_glVertexAttrib2d = (PFNGLVERTEXATTRIB2DPROC)load("glVertexAttrib2d"); - glad_glVertexAttrib2dv = (PFNGLVERTEXATTRIB2DVPROC)load("glVertexAttrib2dv"); - glad_glVertexAttrib2f = (PFNGLVERTEXATTRIB2FPROC)load("glVertexAttrib2f"); - glad_glVertexAttrib2fv = (PFNGLVERTEXATTRIB2FVPROC)load("glVertexAttrib2fv"); - glad_glVertexAttrib2s = (PFNGLVERTEXATTRIB2SPROC)load("glVertexAttrib2s"); - glad_glVertexAttrib2sv = (PFNGLVERTEXATTRIB2SVPROC)load("glVertexAttrib2sv"); - glad_glVertexAttrib3d = (PFNGLVERTEXATTRIB3DPROC)load("glVertexAttrib3d"); - glad_glVertexAttrib3dv = (PFNGLVERTEXATTRIB3DVPROC)load("glVertexAttrib3dv"); - glad_glVertexAttrib3f = (PFNGLVERTEXATTRIB3FPROC)load("glVertexAttrib3f"); - glad_glVertexAttrib3fv = (PFNGLVERTEXATTRIB3FVPROC)load("glVertexAttrib3fv"); - glad_glVertexAttrib3s = (PFNGLVERTEXATTRIB3SPROC)load("glVertexAttrib3s"); - glad_glVertexAttrib3sv = (PFNGLVERTEXATTRIB3SVPROC)load("glVertexAttrib3sv"); - glad_glVertexAttrib4Nbv = (PFNGLVERTEXATTRIB4NBVPROC)load("glVertexAttrib4Nbv"); - glad_glVertexAttrib4Niv = (PFNGLVERTEXATTRIB4NIVPROC)load("glVertexAttrib4Niv"); - glad_glVertexAttrib4Nsv = (PFNGLVERTEXATTRIB4NSVPROC)load("glVertexAttrib4Nsv"); - glad_glVertexAttrib4Nub = (PFNGLVERTEXATTRIB4NUBPROC)load("glVertexAttrib4Nub"); - glad_glVertexAttrib4Nubv = (PFNGLVERTEXATTRIB4NUBVPROC)load("glVertexAttrib4Nubv"); - glad_glVertexAttrib4Nuiv = (PFNGLVERTEXATTRIB4NUIVPROC)load("glVertexAttrib4Nuiv"); - glad_glVertexAttrib4Nusv = (PFNGLVERTEXATTRIB4NUSVPROC)load("glVertexAttrib4Nusv"); - glad_glVertexAttrib4bv = (PFNGLVERTEXATTRIB4BVPROC)load("glVertexAttrib4bv"); - glad_glVertexAttrib4d = (PFNGLVERTEXATTRIB4DPROC)load("glVertexAttrib4d"); - glad_glVertexAttrib4dv = (PFNGLVERTEXATTRIB4DVPROC)load("glVertexAttrib4dv"); - glad_glVertexAttrib4f = (PFNGLVERTEXATTRIB4FPROC)load("glVertexAttrib4f"); - glad_glVertexAttrib4fv = (PFNGLVERTEXATTRIB4FVPROC)load("glVertexAttrib4fv"); - glad_glVertexAttrib4iv = (PFNGLVERTEXATTRIB4IVPROC)load("glVertexAttrib4iv"); - glad_glVertexAttrib4s = (PFNGLVERTEXATTRIB4SPROC)load("glVertexAttrib4s"); - glad_glVertexAttrib4sv = (PFNGLVERTEXATTRIB4SVPROC)load("glVertexAttrib4sv"); - glad_glVertexAttrib4ubv = (PFNGLVERTEXATTRIB4UBVPROC)load("glVertexAttrib4ubv"); - glad_glVertexAttrib4uiv = (PFNGLVERTEXATTRIB4UIVPROC)load("glVertexAttrib4uiv"); - glad_glVertexAttrib4usv = (PFNGLVERTEXATTRIB4USVPROC)load("glVertexAttrib4usv"); - glad_glVertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC)load("glVertexAttribPointer"); -} -static void load_GL_VERSION_2_1(GLADloadproc load) { - if(!GLAD_GL_VERSION_2_1) return; - glad_glUniformMatrix2x3fv = (PFNGLUNIFORMMATRIX2X3FVPROC)load("glUniformMatrix2x3fv"); - glad_glUniformMatrix3x2fv = (PFNGLUNIFORMMATRIX3X2FVPROC)load("glUniformMatrix3x2fv"); - glad_glUniformMatrix2x4fv = (PFNGLUNIFORMMATRIX2X4FVPROC)load("glUniformMatrix2x4fv"); - glad_glUniformMatrix4x2fv = (PFNGLUNIFORMMATRIX4X2FVPROC)load("glUniformMatrix4x2fv"); - glad_glUniformMatrix3x4fv = (PFNGLUNIFORMMATRIX3X4FVPROC)load("glUniformMatrix3x4fv"); - glad_glUniformMatrix4x3fv = (PFNGLUNIFORMMATRIX4X3FVPROC)load("glUniformMatrix4x3fv"); -} -static void load_GL_VERSION_3_0(GLADloadproc load) { - if(!GLAD_GL_VERSION_3_0) return; - glad_glColorMaski = (PFNGLCOLORMASKIPROC)load("glColorMaski"); - glad_glGetBooleani_v = (PFNGLGETBOOLEANI_VPROC)load("glGetBooleani_v"); - glad_glGetIntegeri_v = (PFNGLGETINTEGERI_VPROC)load("glGetIntegeri_v"); - glad_glEnablei = (PFNGLENABLEIPROC)load("glEnablei"); - glad_glDisablei = (PFNGLDISABLEIPROC)load("glDisablei"); - glad_glIsEnabledi = (PFNGLISENABLEDIPROC)load("glIsEnabledi"); - glad_glBeginTransformFeedback = (PFNGLBEGINTRANSFORMFEEDBACKPROC)load("glBeginTransformFeedback"); - glad_glEndTransformFeedback = (PFNGLENDTRANSFORMFEEDBACKPROC)load("glEndTransformFeedback"); - glad_glBindBufferRange = (PFNGLBINDBUFFERRANGEPROC)load("glBindBufferRange"); - glad_glBindBufferBase = (PFNGLBINDBUFFERBASEPROC)load("glBindBufferBase"); - glad_glTransformFeedbackVaryings = (PFNGLTRANSFORMFEEDBACKVARYINGSPROC)load("glTransformFeedbackVaryings"); - glad_glGetTransformFeedbackVarying = (PFNGLGETTRANSFORMFEEDBACKVARYINGPROC)load("glGetTransformFeedbackVarying"); - glad_glClampColor = (PFNGLCLAMPCOLORPROC)load("glClampColor"); - glad_glBeginConditionalRender = (PFNGLBEGINCONDITIONALRENDERPROC)load("glBeginConditionalRender"); - glad_glEndConditionalRender = (PFNGLENDCONDITIONALRENDERPROC)load("glEndConditionalRender"); - glad_glVertexAttribIPointer = (PFNGLVERTEXATTRIBIPOINTERPROC)load("glVertexAttribIPointer"); - glad_glGetVertexAttribIiv = (PFNGLGETVERTEXATTRIBIIVPROC)load("glGetVertexAttribIiv"); - glad_glGetVertexAttribIuiv = (PFNGLGETVERTEXATTRIBIUIVPROC)load("glGetVertexAttribIuiv"); - glad_glVertexAttribI1i = (PFNGLVERTEXATTRIBI1IPROC)load("glVertexAttribI1i"); - glad_glVertexAttribI2i = (PFNGLVERTEXATTRIBI2IPROC)load("glVertexAttribI2i"); - glad_glVertexAttribI3i = (PFNGLVERTEXATTRIBI3IPROC)load("glVertexAttribI3i"); - glad_glVertexAttribI4i = (PFNGLVERTEXATTRIBI4IPROC)load("glVertexAttribI4i"); - glad_glVertexAttribI1ui = (PFNGLVERTEXATTRIBI1UIPROC)load("glVertexAttribI1ui"); - glad_glVertexAttribI2ui = (PFNGLVERTEXATTRIBI2UIPROC)load("glVertexAttribI2ui"); - glad_glVertexAttribI3ui = (PFNGLVERTEXATTRIBI3UIPROC)load("glVertexAttribI3ui"); - glad_glVertexAttribI4ui = (PFNGLVERTEXATTRIBI4UIPROC)load("glVertexAttribI4ui"); - glad_glVertexAttribI1iv = (PFNGLVERTEXATTRIBI1IVPROC)load("glVertexAttribI1iv"); - glad_glVertexAttribI2iv = (PFNGLVERTEXATTRIBI2IVPROC)load("glVertexAttribI2iv"); - glad_glVertexAttribI3iv = (PFNGLVERTEXATTRIBI3IVPROC)load("glVertexAttribI3iv"); - glad_glVertexAttribI4iv = (PFNGLVERTEXATTRIBI4IVPROC)load("glVertexAttribI4iv"); - glad_glVertexAttribI1uiv = (PFNGLVERTEXATTRIBI1UIVPROC)load("glVertexAttribI1uiv"); - glad_glVertexAttribI2uiv = (PFNGLVERTEXATTRIBI2UIVPROC)load("glVertexAttribI2uiv"); - glad_glVertexAttribI3uiv = (PFNGLVERTEXATTRIBI3UIVPROC)load("glVertexAttribI3uiv"); - glad_glVertexAttribI4uiv = (PFNGLVERTEXATTRIBI4UIVPROC)load("glVertexAttribI4uiv"); - glad_glVertexAttribI4bv = (PFNGLVERTEXATTRIBI4BVPROC)load("glVertexAttribI4bv"); - glad_glVertexAttribI4sv = (PFNGLVERTEXATTRIBI4SVPROC)load("glVertexAttribI4sv"); - glad_glVertexAttribI4ubv = (PFNGLVERTEXATTRIBI4UBVPROC)load("glVertexAttribI4ubv"); - glad_glVertexAttribI4usv = (PFNGLVERTEXATTRIBI4USVPROC)load("glVertexAttribI4usv"); - glad_glGetUniformuiv = (PFNGLGETUNIFORMUIVPROC)load("glGetUniformuiv"); - glad_glBindFragDataLocation = (PFNGLBINDFRAGDATALOCATIONPROC)load("glBindFragDataLocation"); - glad_glGetFragDataLocation = (PFNGLGETFRAGDATALOCATIONPROC)load("glGetFragDataLocation"); - glad_glUniform1ui = (PFNGLUNIFORM1UIPROC)load("glUniform1ui"); - glad_glUniform2ui = (PFNGLUNIFORM2UIPROC)load("glUniform2ui"); - glad_glUniform3ui = (PFNGLUNIFORM3UIPROC)load("glUniform3ui"); - glad_glUniform4ui = (PFNGLUNIFORM4UIPROC)load("glUniform4ui"); - glad_glUniform1uiv = (PFNGLUNIFORM1UIVPROC)load("glUniform1uiv"); - glad_glUniform2uiv = (PFNGLUNIFORM2UIVPROC)load("glUniform2uiv"); - glad_glUniform3uiv = (PFNGLUNIFORM3UIVPROC)load("glUniform3uiv"); - glad_glUniform4uiv = (PFNGLUNIFORM4UIVPROC)load("glUniform4uiv"); - glad_glTexParameterIiv = (PFNGLTEXPARAMETERIIVPROC)load("glTexParameterIiv"); - glad_glTexParameterIuiv = (PFNGLTEXPARAMETERIUIVPROC)load("glTexParameterIuiv"); - glad_glGetTexParameterIiv = (PFNGLGETTEXPARAMETERIIVPROC)load("glGetTexParameterIiv"); - glad_glGetTexParameterIuiv = (PFNGLGETTEXPARAMETERIUIVPROC)load("glGetTexParameterIuiv"); - glad_glClearBufferiv = (PFNGLCLEARBUFFERIVPROC)load("glClearBufferiv"); - glad_glClearBufferuiv = (PFNGLCLEARBUFFERUIVPROC)load("glClearBufferuiv"); - glad_glClearBufferfv = (PFNGLCLEARBUFFERFVPROC)load("glClearBufferfv"); - glad_glClearBufferfi = (PFNGLCLEARBUFFERFIPROC)load("glClearBufferfi"); - glad_glGetStringi = (PFNGLGETSTRINGIPROC)load("glGetStringi"); - glad_glIsRenderbuffer = (PFNGLISRENDERBUFFERPROC)load("glIsRenderbuffer"); - glad_glBindRenderbuffer = (PFNGLBINDRENDERBUFFERPROC)load("glBindRenderbuffer"); - glad_glDeleteRenderbuffers = (PFNGLDELETERENDERBUFFERSPROC)load("glDeleteRenderbuffers"); - glad_glGenRenderbuffers = (PFNGLGENRENDERBUFFERSPROC)load("glGenRenderbuffers"); - glad_glRenderbufferStorage = (PFNGLRENDERBUFFERSTORAGEPROC)load("glRenderbufferStorage"); - glad_glGetRenderbufferParameteriv = (PFNGLGETRENDERBUFFERPARAMETERIVPROC)load("glGetRenderbufferParameteriv"); - glad_glIsFramebuffer = (PFNGLISFRAMEBUFFERPROC)load("glIsFramebuffer"); - glad_glBindFramebuffer = (PFNGLBINDFRAMEBUFFERPROC)load("glBindFramebuffer"); - glad_glDeleteFramebuffers = (PFNGLDELETEFRAMEBUFFERSPROC)load("glDeleteFramebuffers"); - glad_glGenFramebuffers = (PFNGLGENFRAMEBUFFERSPROC)load("glGenFramebuffers"); - glad_glCheckFramebufferStatus = (PFNGLCHECKFRAMEBUFFERSTATUSPROC)load("glCheckFramebufferStatus"); - glad_glFramebufferTexture1D = (PFNGLFRAMEBUFFERTEXTURE1DPROC)load("glFramebufferTexture1D"); - glad_glFramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DPROC)load("glFramebufferTexture2D"); - glad_glFramebufferTexture3D = (PFNGLFRAMEBUFFERTEXTURE3DPROC)load("glFramebufferTexture3D"); - glad_glFramebufferRenderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFERPROC)load("glFramebufferRenderbuffer"); - glad_glGetFramebufferAttachmentParameteriv = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)load("glGetFramebufferAttachmentParameteriv"); - glad_glGenerateMipmap = (PFNGLGENERATEMIPMAPPROC)load("glGenerateMipmap"); - glad_glBlitFramebuffer = (PFNGLBLITFRAMEBUFFERPROC)load("glBlitFramebuffer"); - glad_glRenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC)load("glRenderbufferStorageMultisample"); - glad_glFramebufferTextureLayer = (PFNGLFRAMEBUFFERTEXTURELAYERPROC)load("glFramebufferTextureLayer"); - glad_glMapBufferRange = (PFNGLMAPBUFFERRANGEPROC)load("glMapBufferRange"); - glad_glFlushMappedBufferRange = (PFNGLFLUSHMAPPEDBUFFERRANGEPROC)load("glFlushMappedBufferRange"); - glad_glBindVertexArray = (PFNGLBINDVERTEXARRAYPROC)load("glBindVertexArray"); - glad_glDeleteVertexArrays = (PFNGLDELETEVERTEXARRAYSPROC)load("glDeleteVertexArrays"); - glad_glGenVertexArrays = (PFNGLGENVERTEXARRAYSPROC)load("glGenVertexArrays"); - glad_glIsVertexArray = (PFNGLISVERTEXARRAYPROC)load("glIsVertexArray"); -} -static void load_GL_VERSION_3_1(GLADloadproc load) { - if(!GLAD_GL_VERSION_3_1) return; - glad_glDrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDPROC)load("glDrawArraysInstanced"); - glad_glDrawElementsInstanced = (PFNGLDRAWELEMENTSINSTANCEDPROC)load("glDrawElementsInstanced"); - glad_glTexBuffer = (PFNGLTEXBUFFERPROC)load("glTexBuffer"); - glad_glPrimitiveRestartIndex = (PFNGLPRIMITIVERESTARTINDEXPROC)load("glPrimitiveRestartIndex"); - glad_glCopyBufferSubData = (PFNGLCOPYBUFFERSUBDATAPROC)load("glCopyBufferSubData"); - glad_glGetUniformIndices = (PFNGLGETUNIFORMINDICESPROC)load("glGetUniformIndices"); - glad_glGetActiveUniformsiv = (PFNGLGETACTIVEUNIFORMSIVPROC)load("glGetActiveUniformsiv"); - glad_glGetActiveUniformName = (PFNGLGETACTIVEUNIFORMNAMEPROC)load("glGetActiveUniformName"); - glad_glGetUniformBlockIndex = (PFNGLGETUNIFORMBLOCKINDEXPROC)load("glGetUniformBlockIndex"); - glad_glGetActiveUniformBlockiv = (PFNGLGETACTIVEUNIFORMBLOCKIVPROC)load("glGetActiveUniformBlockiv"); - glad_glGetActiveUniformBlockName = (PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC)load("glGetActiveUniformBlockName"); - glad_glUniformBlockBinding = (PFNGLUNIFORMBLOCKBINDINGPROC)load("glUniformBlockBinding"); - glad_glBindBufferRange = (PFNGLBINDBUFFERRANGEPROC)load("glBindBufferRange"); - glad_glBindBufferBase = (PFNGLBINDBUFFERBASEPROC)load("glBindBufferBase"); - glad_glGetIntegeri_v = (PFNGLGETINTEGERI_VPROC)load("glGetIntegeri_v"); -} -static void load_GL_VERSION_3_2(GLADloadproc load) { - if(!GLAD_GL_VERSION_3_2) return; - glad_glDrawElementsBaseVertex = (PFNGLDRAWELEMENTSBASEVERTEXPROC)load("glDrawElementsBaseVertex"); - glad_glDrawRangeElementsBaseVertex = (PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC)load("glDrawRangeElementsBaseVertex"); - glad_glDrawElementsInstancedBaseVertex = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC)load("glDrawElementsInstancedBaseVertex"); - glad_glMultiDrawElementsBaseVertex = (PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC)load("glMultiDrawElementsBaseVertex"); - glad_glProvokingVertex = (PFNGLPROVOKINGVERTEXPROC)load("glProvokingVertex"); - glad_glFenceSync = (PFNGLFENCESYNCPROC)load("glFenceSync"); - glad_glIsSync = (PFNGLISSYNCPROC)load("glIsSync"); - glad_glDeleteSync = (PFNGLDELETESYNCPROC)load("glDeleteSync"); - glad_glClientWaitSync = (PFNGLCLIENTWAITSYNCPROC)load("glClientWaitSync"); - glad_glWaitSync = (PFNGLWAITSYNCPROC)load("glWaitSync"); - glad_glGetInteger64v = (PFNGLGETINTEGER64VPROC)load("glGetInteger64v"); - glad_glGetSynciv = (PFNGLGETSYNCIVPROC)load("glGetSynciv"); - glad_glGetInteger64i_v = (PFNGLGETINTEGER64I_VPROC)load("glGetInteger64i_v"); - glad_glGetBufferParameteri64v = (PFNGLGETBUFFERPARAMETERI64VPROC)load("glGetBufferParameteri64v"); - glad_glFramebufferTexture = (PFNGLFRAMEBUFFERTEXTUREPROC)load("glFramebufferTexture"); - glad_glTexImage2DMultisample = (PFNGLTEXIMAGE2DMULTISAMPLEPROC)load("glTexImage2DMultisample"); - glad_glTexImage3DMultisample = (PFNGLTEXIMAGE3DMULTISAMPLEPROC)load("glTexImage3DMultisample"); - glad_glGetMultisamplefv = (PFNGLGETMULTISAMPLEFVPROC)load("glGetMultisamplefv"); - glad_glSampleMaski = (PFNGLSAMPLEMASKIPROC)load("glSampleMaski"); -} -static void load_GL_VERSION_3_3(GLADloadproc load) { - if(!GLAD_GL_VERSION_3_3) return; - glad_glBindFragDataLocationIndexed = (PFNGLBINDFRAGDATALOCATIONINDEXEDPROC)load("glBindFragDataLocationIndexed"); - glad_glGetFragDataIndex = (PFNGLGETFRAGDATAINDEXPROC)load("glGetFragDataIndex"); - glad_glGenSamplers = (PFNGLGENSAMPLERSPROC)load("glGenSamplers"); - glad_glDeleteSamplers = (PFNGLDELETESAMPLERSPROC)load("glDeleteSamplers"); - glad_glIsSampler = (PFNGLISSAMPLERPROC)load("glIsSampler"); - glad_glBindSampler = (PFNGLBINDSAMPLERPROC)load("glBindSampler"); - glad_glSamplerParameteri = (PFNGLSAMPLERPARAMETERIPROC)load("glSamplerParameteri"); - glad_glSamplerParameteriv = (PFNGLSAMPLERPARAMETERIVPROC)load("glSamplerParameteriv"); - glad_glSamplerParameterf = (PFNGLSAMPLERPARAMETERFPROC)load("glSamplerParameterf"); - glad_glSamplerParameterfv = (PFNGLSAMPLERPARAMETERFVPROC)load("glSamplerParameterfv"); - glad_glSamplerParameterIiv = (PFNGLSAMPLERPARAMETERIIVPROC)load("glSamplerParameterIiv"); - glad_glSamplerParameterIuiv = (PFNGLSAMPLERPARAMETERIUIVPROC)load("glSamplerParameterIuiv"); - glad_glGetSamplerParameteriv = (PFNGLGETSAMPLERPARAMETERIVPROC)load("glGetSamplerParameteriv"); - glad_glGetSamplerParameterIiv = (PFNGLGETSAMPLERPARAMETERIIVPROC)load("glGetSamplerParameterIiv"); - glad_glGetSamplerParameterfv = (PFNGLGETSAMPLERPARAMETERFVPROC)load("glGetSamplerParameterfv"); - glad_glGetSamplerParameterIuiv = (PFNGLGETSAMPLERPARAMETERIUIVPROC)load("glGetSamplerParameterIuiv"); - glad_glQueryCounter = (PFNGLQUERYCOUNTERPROC)load("glQueryCounter"); - glad_glGetQueryObjecti64v = (PFNGLGETQUERYOBJECTI64VPROC)load("glGetQueryObjecti64v"); - glad_glGetQueryObjectui64v = (PFNGLGETQUERYOBJECTUI64VPROC)load("glGetQueryObjectui64v"); - glad_glVertexAttribDivisor = (PFNGLVERTEXATTRIBDIVISORPROC)load("glVertexAttribDivisor"); - glad_glVertexAttribP1ui = (PFNGLVERTEXATTRIBP1UIPROC)load("glVertexAttribP1ui"); - glad_glVertexAttribP1uiv = (PFNGLVERTEXATTRIBP1UIVPROC)load("glVertexAttribP1uiv"); - glad_glVertexAttribP2ui = (PFNGLVERTEXATTRIBP2UIPROC)load("glVertexAttribP2ui"); - glad_glVertexAttribP2uiv = (PFNGLVERTEXATTRIBP2UIVPROC)load("glVertexAttribP2uiv"); - glad_glVertexAttribP3ui = (PFNGLVERTEXATTRIBP3UIPROC)load("glVertexAttribP3ui"); - glad_glVertexAttribP3uiv = (PFNGLVERTEXATTRIBP3UIVPROC)load("glVertexAttribP3uiv"); - glad_glVertexAttribP4ui = (PFNGLVERTEXATTRIBP4UIPROC)load("glVertexAttribP4ui"); - glad_glVertexAttribP4uiv = (PFNGLVERTEXATTRIBP4UIVPROC)load("glVertexAttribP4uiv"); - glad_glVertexP2ui = (PFNGLVERTEXP2UIPROC)load("glVertexP2ui"); - glad_glVertexP2uiv = (PFNGLVERTEXP2UIVPROC)load("glVertexP2uiv"); - glad_glVertexP3ui = (PFNGLVERTEXP3UIPROC)load("glVertexP3ui"); - glad_glVertexP3uiv = (PFNGLVERTEXP3UIVPROC)load("glVertexP3uiv"); - glad_glVertexP4ui = (PFNGLVERTEXP4UIPROC)load("glVertexP4ui"); - glad_glVertexP4uiv = (PFNGLVERTEXP4UIVPROC)load("glVertexP4uiv"); - glad_glTexCoordP1ui = (PFNGLTEXCOORDP1UIPROC)load("glTexCoordP1ui"); - glad_glTexCoordP1uiv = (PFNGLTEXCOORDP1UIVPROC)load("glTexCoordP1uiv"); - glad_glTexCoordP2ui = (PFNGLTEXCOORDP2UIPROC)load("glTexCoordP2ui"); - glad_glTexCoordP2uiv = (PFNGLTEXCOORDP2UIVPROC)load("glTexCoordP2uiv"); - glad_glTexCoordP3ui = (PFNGLTEXCOORDP3UIPROC)load("glTexCoordP3ui"); - glad_glTexCoordP3uiv = (PFNGLTEXCOORDP3UIVPROC)load("glTexCoordP3uiv"); - glad_glTexCoordP4ui = (PFNGLTEXCOORDP4UIPROC)load("glTexCoordP4ui"); - glad_glTexCoordP4uiv = (PFNGLTEXCOORDP4UIVPROC)load("glTexCoordP4uiv"); - glad_glMultiTexCoordP1ui = (PFNGLMULTITEXCOORDP1UIPROC)load("glMultiTexCoordP1ui"); - glad_glMultiTexCoordP1uiv = (PFNGLMULTITEXCOORDP1UIVPROC)load("glMultiTexCoordP1uiv"); - glad_glMultiTexCoordP2ui = (PFNGLMULTITEXCOORDP2UIPROC)load("glMultiTexCoordP2ui"); - glad_glMultiTexCoordP2uiv = (PFNGLMULTITEXCOORDP2UIVPROC)load("glMultiTexCoordP2uiv"); - glad_glMultiTexCoordP3ui = (PFNGLMULTITEXCOORDP3UIPROC)load("glMultiTexCoordP3ui"); - glad_glMultiTexCoordP3uiv = (PFNGLMULTITEXCOORDP3UIVPROC)load("glMultiTexCoordP3uiv"); - glad_glMultiTexCoordP4ui = (PFNGLMULTITEXCOORDP4UIPROC)load("glMultiTexCoordP4ui"); - glad_glMultiTexCoordP4uiv = (PFNGLMULTITEXCOORDP4UIVPROC)load("glMultiTexCoordP4uiv"); - glad_glNormalP3ui = (PFNGLNORMALP3UIPROC)load("glNormalP3ui"); - glad_glNormalP3uiv = (PFNGLNORMALP3UIVPROC)load("glNormalP3uiv"); - glad_glColorP3ui = (PFNGLCOLORP3UIPROC)load("glColorP3ui"); - glad_glColorP3uiv = (PFNGLCOLORP3UIVPROC)load("glColorP3uiv"); - glad_glColorP4ui = (PFNGLCOLORP4UIPROC)load("glColorP4ui"); - glad_glColorP4uiv = (PFNGLCOLORP4UIVPROC)load("glColorP4uiv"); - glad_glSecondaryColorP3ui = (PFNGLSECONDARYCOLORP3UIPROC)load("glSecondaryColorP3ui"); - glad_glSecondaryColorP3uiv = (PFNGLSECONDARYCOLORP3UIVPROC)load("glSecondaryColorP3uiv"); -} -static void load_GL_VERSION_4_0(GLADloadproc load) { - if(!GLAD_GL_VERSION_4_0) return; - glad_glMinSampleShading = (PFNGLMINSAMPLESHADINGPROC)load("glMinSampleShading"); - glad_glBlendEquationi = (PFNGLBLENDEQUATIONIPROC)load("glBlendEquationi"); - glad_glBlendEquationSeparatei = (PFNGLBLENDEQUATIONSEPARATEIPROC)load("glBlendEquationSeparatei"); - glad_glBlendFunci = (PFNGLBLENDFUNCIPROC)load("glBlendFunci"); - glad_glBlendFuncSeparatei = (PFNGLBLENDFUNCSEPARATEIPROC)load("glBlendFuncSeparatei"); - glad_glDrawArraysIndirect = (PFNGLDRAWARRAYSINDIRECTPROC)load("glDrawArraysIndirect"); - glad_glDrawElementsIndirect = (PFNGLDRAWELEMENTSINDIRECTPROC)load("glDrawElementsIndirect"); - glad_glUniform1d = (PFNGLUNIFORM1DPROC)load("glUniform1d"); - glad_glUniform2d = (PFNGLUNIFORM2DPROC)load("glUniform2d"); - glad_glUniform3d = (PFNGLUNIFORM3DPROC)load("glUniform3d"); - glad_glUniform4d = (PFNGLUNIFORM4DPROC)load("glUniform4d"); - glad_glUniform1dv = (PFNGLUNIFORM1DVPROC)load("glUniform1dv"); - glad_glUniform2dv = (PFNGLUNIFORM2DVPROC)load("glUniform2dv"); - glad_glUniform3dv = (PFNGLUNIFORM3DVPROC)load("glUniform3dv"); - glad_glUniform4dv = (PFNGLUNIFORM4DVPROC)load("glUniform4dv"); - glad_glUniformMatrix2dv = (PFNGLUNIFORMMATRIX2DVPROC)load("glUniformMatrix2dv"); - glad_glUniformMatrix3dv = (PFNGLUNIFORMMATRIX3DVPROC)load("glUniformMatrix3dv"); - glad_glUniformMatrix4dv = (PFNGLUNIFORMMATRIX4DVPROC)load("glUniformMatrix4dv"); - glad_glUniformMatrix2x3dv = (PFNGLUNIFORMMATRIX2X3DVPROC)load("glUniformMatrix2x3dv"); - glad_glUniformMatrix2x4dv = (PFNGLUNIFORMMATRIX2X4DVPROC)load("glUniformMatrix2x4dv"); - glad_glUniformMatrix3x2dv = (PFNGLUNIFORMMATRIX3X2DVPROC)load("glUniformMatrix3x2dv"); - glad_glUniformMatrix3x4dv = (PFNGLUNIFORMMATRIX3X4DVPROC)load("glUniformMatrix3x4dv"); - glad_glUniformMatrix4x2dv = (PFNGLUNIFORMMATRIX4X2DVPROC)load("glUniformMatrix4x2dv"); - glad_glUniformMatrix4x3dv = (PFNGLUNIFORMMATRIX4X3DVPROC)load("glUniformMatrix4x3dv"); - glad_glGetUniformdv = (PFNGLGETUNIFORMDVPROC)load("glGetUniformdv"); - glad_glGetSubroutineUniformLocation = (PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC)load("glGetSubroutineUniformLocation"); - glad_glGetSubroutineIndex = (PFNGLGETSUBROUTINEINDEXPROC)load("glGetSubroutineIndex"); - glad_glGetActiveSubroutineUniformiv = (PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC)load("glGetActiveSubroutineUniformiv"); - glad_glGetActiveSubroutineUniformName = (PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC)load("glGetActiveSubroutineUniformName"); - glad_glGetActiveSubroutineName = (PFNGLGETACTIVESUBROUTINENAMEPROC)load("glGetActiveSubroutineName"); - glad_glUniformSubroutinesuiv = (PFNGLUNIFORMSUBROUTINESUIVPROC)load("glUniformSubroutinesuiv"); - glad_glGetUniformSubroutineuiv = (PFNGLGETUNIFORMSUBROUTINEUIVPROC)load("glGetUniformSubroutineuiv"); - glad_glGetProgramStageiv = (PFNGLGETPROGRAMSTAGEIVPROC)load("glGetProgramStageiv"); - glad_glPatchParameteri = (PFNGLPATCHPARAMETERIPROC)load("glPatchParameteri"); - glad_glPatchParameterfv = (PFNGLPATCHPARAMETERFVPROC)load("glPatchParameterfv"); - glad_glBindTransformFeedback = (PFNGLBINDTRANSFORMFEEDBACKPROC)load("glBindTransformFeedback"); - glad_glDeleteTransformFeedbacks = (PFNGLDELETETRANSFORMFEEDBACKSPROC)load("glDeleteTransformFeedbacks"); - glad_glGenTransformFeedbacks = (PFNGLGENTRANSFORMFEEDBACKSPROC)load("glGenTransformFeedbacks"); - glad_glIsTransformFeedback = (PFNGLISTRANSFORMFEEDBACKPROC)load("glIsTransformFeedback"); - glad_glPauseTransformFeedback = (PFNGLPAUSETRANSFORMFEEDBACKPROC)load("glPauseTransformFeedback"); - glad_glResumeTransformFeedback = (PFNGLRESUMETRANSFORMFEEDBACKPROC)load("glResumeTransformFeedback"); - glad_glDrawTransformFeedback = (PFNGLDRAWTRANSFORMFEEDBACKPROC)load("glDrawTransformFeedback"); - glad_glDrawTransformFeedbackStream = (PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC)load("glDrawTransformFeedbackStream"); - glad_glBeginQueryIndexed = (PFNGLBEGINQUERYINDEXEDPROC)load("glBeginQueryIndexed"); - glad_glEndQueryIndexed = (PFNGLENDQUERYINDEXEDPROC)load("glEndQueryIndexed"); - glad_glGetQueryIndexediv = (PFNGLGETQUERYINDEXEDIVPROC)load("glGetQueryIndexediv"); -} -static void load_GL_VERSION_4_1(GLADloadproc load) { - if(!GLAD_GL_VERSION_4_1) return; - glad_glReleaseShaderCompiler = (PFNGLRELEASESHADERCOMPILERPROC)load("glReleaseShaderCompiler"); - glad_glShaderBinary = (PFNGLSHADERBINARYPROC)load("glShaderBinary"); - glad_glGetShaderPrecisionFormat = (PFNGLGETSHADERPRECISIONFORMATPROC)load("glGetShaderPrecisionFormat"); - glad_glDepthRangef = (PFNGLDEPTHRANGEFPROC)load("glDepthRangef"); - glad_glClearDepthf = (PFNGLCLEARDEPTHFPROC)load("glClearDepthf"); - glad_glGetProgramBinary = (PFNGLGETPROGRAMBINARYPROC)load("glGetProgramBinary"); - glad_glProgramBinary = (PFNGLPROGRAMBINARYPROC)load("glProgramBinary"); - glad_glProgramParameteri = (PFNGLPROGRAMPARAMETERIPROC)load("glProgramParameteri"); - glad_glUseProgramStages = (PFNGLUSEPROGRAMSTAGESPROC)load("glUseProgramStages"); - glad_glActiveShaderProgram = (PFNGLACTIVESHADERPROGRAMPROC)load("glActiveShaderProgram"); - glad_glCreateShaderProgramv = (PFNGLCREATESHADERPROGRAMVPROC)load("glCreateShaderProgramv"); - glad_glBindProgramPipeline = (PFNGLBINDPROGRAMPIPELINEPROC)load("glBindProgramPipeline"); - glad_glDeleteProgramPipelines = (PFNGLDELETEPROGRAMPIPELINESPROC)load("glDeleteProgramPipelines"); - glad_glGenProgramPipelines = (PFNGLGENPROGRAMPIPELINESPROC)load("glGenProgramPipelines"); - glad_glIsProgramPipeline = (PFNGLISPROGRAMPIPELINEPROC)load("glIsProgramPipeline"); - glad_glGetProgramPipelineiv = (PFNGLGETPROGRAMPIPELINEIVPROC)load("glGetProgramPipelineiv"); - glad_glProgramParameteri = (PFNGLPROGRAMPARAMETERIPROC)load("glProgramParameteri"); - glad_glProgramUniform1i = (PFNGLPROGRAMUNIFORM1IPROC)load("glProgramUniform1i"); - glad_glProgramUniform1iv = (PFNGLPROGRAMUNIFORM1IVPROC)load("glProgramUniform1iv"); - glad_glProgramUniform1f = (PFNGLPROGRAMUNIFORM1FPROC)load("glProgramUniform1f"); - glad_glProgramUniform1fv = (PFNGLPROGRAMUNIFORM1FVPROC)load("glProgramUniform1fv"); - glad_glProgramUniform1d = (PFNGLPROGRAMUNIFORM1DPROC)load("glProgramUniform1d"); - glad_glProgramUniform1dv = (PFNGLPROGRAMUNIFORM1DVPROC)load("glProgramUniform1dv"); - glad_glProgramUniform1ui = (PFNGLPROGRAMUNIFORM1UIPROC)load("glProgramUniform1ui"); - glad_glProgramUniform1uiv = (PFNGLPROGRAMUNIFORM1UIVPROC)load("glProgramUniform1uiv"); - glad_glProgramUniform2i = (PFNGLPROGRAMUNIFORM2IPROC)load("glProgramUniform2i"); - glad_glProgramUniform2iv = (PFNGLPROGRAMUNIFORM2IVPROC)load("glProgramUniform2iv"); - glad_glProgramUniform2f = (PFNGLPROGRAMUNIFORM2FPROC)load("glProgramUniform2f"); - glad_glProgramUniform2fv = (PFNGLPROGRAMUNIFORM2FVPROC)load("glProgramUniform2fv"); - glad_glProgramUniform2d = (PFNGLPROGRAMUNIFORM2DPROC)load("glProgramUniform2d"); - glad_glProgramUniform2dv = (PFNGLPROGRAMUNIFORM2DVPROC)load("glProgramUniform2dv"); - glad_glProgramUniform2ui = (PFNGLPROGRAMUNIFORM2UIPROC)load("glProgramUniform2ui"); - glad_glProgramUniform2uiv = (PFNGLPROGRAMUNIFORM2UIVPROC)load("glProgramUniform2uiv"); - glad_glProgramUniform3i = (PFNGLPROGRAMUNIFORM3IPROC)load("glProgramUniform3i"); - glad_glProgramUniform3iv = (PFNGLPROGRAMUNIFORM3IVPROC)load("glProgramUniform3iv"); - glad_glProgramUniform3f = (PFNGLPROGRAMUNIFORM3FPROC)load("glProgramUniform3f"); - glad_glProgramUniform3fv = (PFNGLPROGRAMUNIFORM3FVPROC)load("glProgramUniform3fv"); - glad_glProgramUniform3d = (PFNGLPROGRAMUNIFORM3DPROC)load("glProgramUniform3d"); - glad_glProgramUniform3dv = (PFNGLPROGRAMUNIFORM3DVPROC)load("glProgramUniform3dv"); - glad_glProgramUniform3ui = (PFNGLPROGRAMUNIFORM3UIPROC)load("glProgramUniform3ui"); - glad_glProgramUniform3uiv = (PFNGLPROGRAMUNIFORM3UIVPROC)load("glProgramUniform3uiv"); - glad_glProgramUniform4i = (PFNGLPROGRAMUNIFORM4IPROC)load("glProgramUniform4i"); - glad_glProgramUniform4iv = (PFNGLPROGRAMUNIFORM4IVPROC)load("glProgramUniform4iv"); - glad_glProgramUniform4f = (PFNGLPROGRAMUNIFORM4FPROC)load("glProgramUniform4f"); - glad_glProgramUniform4fv = (PFNGLPROGRAMUNIFORM4FVPROC)load("glProgramUniform4fv"); - glad_glProgramUniform4d = (PFNGLPROGRAMUNIFORM4DPROC)load("glProgramUniform4d"); - glad_glProgramUniform4dv = (PFNGLPROGRAMUNIFORM4DVPROC)load("glProgramUniform4dv"); - glad_glProgramUniform4ui = (PFNGLPROGRAMUNIFORM4UIPROC)load("glProgramUniform4ui"); - glad_glProgramUniform4uiv = (PFNGLPROGRAMUNIFORM4UIVPROC)load("glProgramUniform4uiv"); - glad_glProgramUniformMatrix2fv = (PFNGLPROGRAMUNIFORMMATRIX2FVPROC)load("glProgramUniformMatrix2fv"); - glad_glProgramUniformMatrix3fv = (PFNGLPROGRAMUNIFORMMATRIX3FVPROC)load("glProgramUniformMatrix3fv"); - glad_glProgramUniformMatrix4fv = (PFNGLPROGRAMUNIFORMMATRIX4FVPROC)load("glProgramUniformMatrix4fv"); - glad_glProgramUniformMatrix2dv = (PFNGLPROGRAMUNIFORMMATRIX2DVPROC)load("glProgramUniformMatrix2dv"); - glad_glProgramUniformMatrix3dv = (PFNGLPROGRAMUNIFORMMATRIX3DVPROC)load("glProgramUniformMatrix3dv"); - glad_glProgramUniformMatrix4dv = (PFNGLPROGRAMUNIFORMMATRIX4DVPROC)load("glProgramUniformMatrix4dv"); - glad_glProgramUniformMatrix2x3fv = (PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC)load("glProgramUniformMatrix2x3fv"); - glad_glProgramUniformMatrix3x2fv = (PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC)load("glProgramUniformMatrix3x2fv"); - glad_glProgramUniformMatrix2x4fv = (PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC)load("glProgramUniformMatrix2x4fv"); - glad_glProgramUniformMatrix4x2fv = (PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC)load("glProgramUniformMatrix4x2fv"); - glad_glProgramUniformMatrix3x4fv = (PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC)load("glProgramUniformMatrix3x4fv"); - glad_glProgramUniformMatrix4x3fv = (PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC)load("glProgramUniformMatrix4x3fv"); - glad_glProgramUniformMatrix2x3dv = (PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC)load("glProgramUniformMatrix2x3dv"); - glad_glProgramUniformMatrix3x2dv = (PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC)load("glProgramUniformMatrix3x2dv"); - glad_glProgramUniformMatrix2x4dv = (PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC)load("glProgramUniformMatrix2x4dv"); - glad_glProgramUniformMatrix4x2dv = (PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC)load("glProgramUniformMatrix4x2dv"); - glad_glProgramUniformMatrix3x4dv = (PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC)load("glProgramUniformMatrix3x4dv"); - glad_glProgramUniformMatrix4x3dv = (PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC)load("glProgramUniformMatrix4x3dv"); - glad_glValidateProgramPipeline = (PFNGLVALIDATEPROGRAMPIPELINEPROC)load("glValidateProgramPipeline"); - glad_glGetProgramPipelineInfoLog = (PFNGLGETPROGRAMPIPELINEINFOLOGPROC)load("glGetProgramPipelineInfoLog"); - glad_glVertexAttribL1d = (PFNGLVERTEXATTRIBL1DPROC)load("glVertexAttribL1d"); - glad_glVertexAttribL2d = (PFNGLVERTEXATTRIBL2DPROC)load("glVertexAttribL2d"); - glad_glVertexAttribL3d = (PFNGLVERTEXATTRIBL3DPROC)load("glVertexAttribL3d"); - glad_glVertexAttribL4d = (PFNGLVERTEXATTRIBL4DPROC)load("glVertexAttribL4d"); - glad_glVertexAttribL1dv = (PFNGLVERTEXATTRIBL1DVPROC)load("glVertexAttribL1dv"); - glad_glVertexAttribL2dv = (PFNGLVERTEXATTRIBL2DVPROC)load("glVertexAttribL2dv"); - glad_glVertexAttribL3dv = (PFNGLVERTEXATTRIBL3DVPROC)load("glVertexAttribL3dv"); - glad_glVertexAttribL4dv = (PFNGLVERTEXATTRIBL4DVPROC)load("glVertexAttribL4dv"); - glad_glVertexAttribLPointer = (PFNGLVERTEXATTRIBLPOINTERPROC)load("glVertexAttribLPointer"); - glad_glGetVertexAttribLdv = (PFNGLGETVERTEXATTRIBLDVPROC)load("glGetVertexAttribLdv"); - glad_glViewportArrayv = (PFNGLVIEWPORTARRAYVPROC)load("glViewportArrayv"); - glad_glViewportIndexedf = (PFNGLVIEWPORTINDEXEDFPROC)load("glViewportIndexedf"); - glad_glViewportIndexedfv = (PFNGLVIEWPORTINDEXEDFVPROC)load("glViewportIndexedfv"); - glad_glScissorArrayv = (PFNGLSCISSORARRAYVPROC)load("glScissorArrayv"); - glad_glScissorIndexed = (PFNGLSCISSORINDEXEDPROC)load("glScissorIndexed"); - glad_glScissorIndexedv = (PFNGLSCISSORINDEXEDVPROC)load("glScissorIndexedv"); - glad_glDepthRangeArrayv = (PFNGLDEPTHRANGEARRAYVPROC)load("glDepthRangeArrayv"); - glad_glDepthRangeIndexed = (PFNGLDEPTHRANGEINDEXEDPROC)load("glDepthRangeIndexed"); - glad_glGetFloati_v = (PFNGLGETFLOATI_VPROC)load("glGetFloati_v"); - glad_glGetDoublei_v = (PFNGLGETDOUBLEI_VPROC)load("glGetDoublei_v"); -} -static void load_GL_VERSION_4_2(GLADloadproc load) { - if(!GLAD_GL_VERSION_4_2) return; - glad_glDrawArraysInstancedBaseInstance = (PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC)load("glDrawArraysInstancedBaseInstance"); - glad_glDrawElementsInstancedBaseInstance = (PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC)load("glDrawElementsInstancedBaseInstance"); - glad_glDrawElementsInstancedBaseVertexBaseInstance = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC)load("glDrawElementsInstancedBaseVertexBaseInstance"); - glad_glGetInternalformativ = (PFNGLGETINTERNALFORMATIVPROC)load("glGetInternalformativ"); - glad_glGetActiveAtomicCounterBufferiv = (PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC)load("glGetActiveAtomicCounterBufferiv"); - glad_glBindImageTexture = (PFNGLBINDIMAGETEXTUREPROC)load("glBindImageTexture"); - glad_glMemoryBarrier = (PFNGLMEMORYBARRIERPROC)load("glMemoryBarrier"); - glad_glTexStorage1D = (PFNGLTEXSTORAGE1DPROC)load("glTexStorage1D"); - glad_glTexStorage2D = (PFNGLTEXSTORAGE2DPROC)load("glTexStorage2D"); - glad_glTexStorage3D = (PFNGLTEXSTORAGE3DPROC)load("glTexStorage3D"); - glad_glDrawTransformFeedbackInstanced = (PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC)load("glDrawTransformFeedbackInstanced"); - glad_glDrawTransformFeedbackStreamInstanced = (PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC)load("glDrawTransformFeedbackStreamInstanced"); -} -static void load_GL_VERSION_4_3(GLADloadproc load) { - if(!GLAD_GL_VERSION_4_3) return; - glad_glClearBufferData = (PFNGLCLEARBUFFERDATAPROC)load("glClearBufferData"); - glad_glClearBufferSubData = (PFNGLCLEARBUFFERSUBDATAPROC)load("glClearBufferSubData"); - glad_glDispatchCompute = (PFNGLDISPATCHCOMPUTEPROC)load("glDispatchCompute"); - glad_glDispatchComputeIndirect = (PFNGLDISPATCHCOMPUTEINDIRECTPROC)load("glDispatchComputeIndirect"); - glad_glCopyImageSubData = (PFNGLCOPYIMAGESUBDATAPROC)load("glCopyImageSubData"); - glad_glFramebufferParameteri = (PFNGLFRAMEBUFFERPARAMETERIPROC)load("glFramebufferParameteri"); - glad_glGetFramebufferParameteriv = (PFNGLGETFRAMEBUFFERPARAMETERIVPROC)load("glGetFramebufferParameteriv"); - glad_glGetInternalformati64v = (PFNGLGETINTERNALFORMATI64VPROC)load("glGetInternalformati64v"); - glad_glInvalidateTexSubImage = (PFNGLINVALIDATETEXSUBIMAGEPROC)load("glInvalidateTexSubImage"); - glad_glInvalidateTexImage = (PFNGLINVALIDATETEXIMAGEPROC)load("glInvalidateTexImage"); - glad_glInvalidateBufferSubData = (PFNGLINVALIDATEBUFFERSUBDATAPROC)load("glInvalidateBufferSubData"); - glad_glInvalidateBufferData = (PFNGLINVALIDATEBUFFERDATAPROC)load("glInvalidateBufferData"); - glad_glInvalidateFramebuffer = (PFNGLINVALIDATEFRAMEBUFFERPROC)load("glInvalidateFramebuffer"); - glad_glInvalidateSubFramebuffer = (PFNGLINVALIDATESUBFRAMEBUFFERPROC)load("glInvalidateSubFramebuffer"); - glad_glMultiDrawArraysIndirect = (PFNGLMULTIDRAWARRAYSINDIRECTPROC)load("glMultiDrawArraysIndirect"); - glad_glMultiDrawElementsIndirect = (PFNGLMULTIDRAWELEMENTSINDIRECTPROC)load("glMultiDrawElementsIndirect"); - glad_glGetProgramInterfaceiv = (PFNGLGETPROGRAMINTERFACEIVPROC)load("glGetProgramInterfaceiv"); - glad_glGetProgramResourceIndex = (PFNGLGETPROGRAMRESOURCEINDEXPROC)load("glGetProgramResourceIndex"); - glad_glGetProgramResourceName = (PFNGLGETPROGRAMRESOURCENAMEPROC)load("glGetProgramResourceName"); - glad_glGetProgramResourceiv = (PFNGLGETPROGRAMRESOURCEIVPROC)load("glGetProgramResourceiv"); - glad_glGetProgramResourceLocation = (PFNGLGETPROGRAMRESOURCELOCATIONPROC)load("glGetProgramResourceLocation"); - glad_glGetProgramResourceLocationIndex = (PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC)load("glGetProgramResourceLocationIndex"); - glad_glShaderStorageBlockBinding = (PFNGLSHADERSTORAGEBLOCKBINDINGPROC)load("glShaderStorageBlockBinding"); - glad_glTexBufferRange = (PFNGLTEXBUFFERRANGEPROC)load("glTexBufferRange"); - glad_glTexStorage2DMultisample = (PFNGLTEXSTORAGE2DMULTISAMPLEPROC)load("glTexStorage2DMultisample"); - glad_glTexStorage3DMultisample = (PFNGLTEXSTORAGE3DMULTISAMPLEPROC)load("glTexStorage3DMultisample"); - glad_glTextureView = (PFNGLTEXTUREVIEWPROC)load("glTextureView"); - glad_glBindVertexBuffer = (PFNGLBINDVERTEXBUFFERPROC)load("glBindVertexBuffer"); - glad_glVertexAttribFormat = (PFNGLVERTEXATTRIBFORMATPROC)load("glVertexAttribFormat"); - glad_glVertexAttribIFormat = (PFNGLVERTEXATTRIBIFORMATPROC)load("glVertexAttribIFormat"); - glad_glVertexAttribLFormat = (PFNGLVERTEXATTRIBLFORMATPROC)load("glVertexAttribLFormat"); - glad_glVertexAttribBinding = (PFNGLVERTEXATTRIBBINDINGPROC)load("glVertexAttribBinding"); - glad_glVertexBindingDivisor = (PFNGLVERTEXBINDINGDIVISORPROC)load("glVertexBindingDivisor"); - glad_glDebugMessageControl = (PFNGLDEBUGMESSAGECONTROLPROC)load("glDebugMessageControl"); - glad_glDebugMessageInsert = (PFNGLDEBUGMESSAGEINSERTPROC)load("glDebugMessageInsert"); - glad_glDebugMessageCallback = (PFNGLDEBUGMESSAGECALLBACKPROC)load("glDebugMessageCallback"); - glad_glGetDebugMessageLog = (PFNGLGETDEBUGMESSAGELOGPROC)load("glGetDebugMessageLog"); - glad_glPushDebugGroup = (PFNGLPUSHDEBUGGROUPPROC)load("glPushDebugGroup"); - glad_glPopDebugGroup = (PFNGLPOPDEBUGGROUPPROC)load("glPopDebugGroup"); - glad_glObjectLabel = (PFNGLOBJECTLABELPROC)load("glObjectLabel"); - glad_glGetObjectLabel = (PFNGLGETOBJECTLABELPROC)load("glGetObjectLabel"); - glad_glObjectPtrLabel = (PFNGLOBJECTPTRLABELPROC)load("glObjectPtrLabel"); - glad_glGetObjectPtrLabel = (PFNGLGETOBJECTPTRLABELPROC)load("glGetObjectPtrLabel"); - glad_glGetPointerv = (PFNGLGETPOINTERVPROC)load("glGetPointerv"); -} -static void load_GL_VERSION_4_4(GLADloadproc load) { - if(!GLAD_GL_VERSION_4_4) return; - glad_glBufferStorage = (PFNGLBUFFERSTORAGEPROC)load("glBufferStorage"); - glad_glClearTexImage = (PFNGLCLEARTEXIMAGEPROC)load("glClearTexImage"); - glad_glClearTexSubImage = (PFNGLCLEARTEXSUBIMAGEPROC)load("glClearTexSubImage"); - glad_glBindBuffersBase = (PFNGLBINDBUFFERSBASEPROC)load("glBindBuffersBase"); - glad_glBindBuffersRange = (PFNGLBINDBUFFERSRANGEPROC)load("glBindBuffersRange"); - glad_glBindTextures = (PFNGLBINDTEXTURESPROC)load("glBindTextures"); - glad_glBindSamplers = (PFNGLBINDSAMPLERSPROC)load("glBindSamplers"); - glad_glBindImageTextures = (PFNGLBINDIMAGETEXTURESPROC)load("glBindImageTextures"); - glad_glBindVertexBuffers = (PFNGLBINDVERTEXBUFFERSPROC)load("glBindVertexBuffers"); -} -static void load_GL_VERSION_4_5(GLADloadproc load) { - if(!GLAD_GL_VERSION_4_5) return; - glad_glClipControl = (PFNGLCLIPCONTROLPROC)load("glClipControl"); - glad_glCreateTransformFeedbacks = (PFNGLCREATETRANSFORMFEEDBACKSPROC)load("glCreateTransformFeedbacks"); - glad_glTransformFeedbackBufferBase = (PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC)load("glTransformFeedbackBufferBase"); - glad_glTransformFeedbackBufferRange = (PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC)load("glTransformFeedbackBufferRange"); - glad_glGetTransformFeedbackiv = (PFNGLGETTRANSFORMFEEDBACKIVPROC)load("glGetTransformFeedbackiv"); - glad_glGetTransformFeedbacki_v = (PFNGLGETTRANSFORMFEEDBACKI_VPROC)load("glGetTransformFeedbacki_v"); - glad_glGetTransformFeedbacki64_v = (PFNGLGETTRANSFORMFEEDBACKI64_VPROC)load("glGetTransformFeedbacki64_v"); - glad_glCreateBuffers = (PFNGLCREATEBUFFERSPROC)load("glCreateBuffers"); - glad_glNamedBufferStorage = (PFNGLNAMEDBUFFERSTORAGEPROC)load("glNamedBufferStorage"); - glad_glNamedBufferData = (PFNGLNAMEDBUFFERDATAPROC)load("glNamedBufferData"); - glad_glNamedBufferSubData = (PFNGLNAMEDBUFFERSUBDATAPROC)load("glNamedBufferSubData"); - glad_glCopyNamedBufferSubData = (PFNGLCOPYNAMEDBUFFERSUBDATAPROC)load("glCopyNamedBufferSubData"); - glad_glClearNamedBufferData = (PFNGLCLEARNAMEDBUFFERDATAPROC)load("glClearNamedBufferData"); - glad_glClearNamedBufferSubData = (PFNGLCLEARNAMEDBUFFERSUBDATAPROC)load("glClearNamedBufferSubData"); - glad_glMapNamedBuffer = (PFNGLMAPNAMEDBUFFERPROC)load("glMapNamedBuffer"); - glad_glMapNamedBufferRange = (PFNGLMAPNAMEDBUFFERRANGEPROC)load("glMapNamedBufferRange"); - glad_glUnmapNamedBuffer = (PFNGLUNMAPNAMEDBUFFERPROC)load("glUnmapNamedBuffer"); - glad_glFlushMappedNamedBufferRange = (PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC)load("glFlushMappedNamedBufferRange"); - glad_glGetNamedBufferParameteriv = (PFNGLGETNAMEDBUFFERPARAMETERIVPROC)load("glGetNamedBufferParameteriv"); - glad_glGetNamedBufferParameteri64v = (PFNGLGETNAMEDBUFFERPARAMETERI64VPROC)load("glGetNamedBufferParameteri64v"); - glad_glGetNamedBufferPointerv = (PFNGLGETNAMEDBUFFERPOINTERVPROC)load("glGetNamedBufferPointerv"); - glad_glGetNamedBufferSubData = (PFNGLGETNAMEDBUFFERSUBDATAPROC)load("glGetNamedBufferSubData"); - glad_glCreateFramebuffers = (PFNGLCREATEFRAMEBUFFERSPROC)load("glCreateFramebuffers"); - glad_glNamedFramebufferRenderbuffer = (PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC)load("glNamedFramebufferRenderbuffer"); - glad_glNamedFramebufferParameteri = (PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC)load("glNamedFramebufferParameteri"); - glad_glNamedFramebufferTexture = (PFNGLNAMEDFRAMEBUFFERTEXTUREPROC)load("glNamedFramebufferTexture"); - glad_glNamedFramebufferTextureLayer = (PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC)load("glNamedFramebufferTextureLayer"); - glad_glNamedFramebufferDrawBuffer = (PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC)load("glNamedFramebufferDrawBuffer"); - glad_glNamedFramebufferDrawBuffers = (PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC)load("glNamedFramebufferDrawBuffers"); - glad_glNamedFramebufferReadBuffer = (PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC)load("glNamedFramebufferReadBuffer"); - glad_glInvalidateNamedFramebufferData = (PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC)load("glInvalidateNamedFramebufferData"); - glad_glInvalidateNamedFramebufferSubData = (PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC)load("glInvalidateNamedFramebufferSubData"); - glad_glClearNamedFramebufferiv = (PFNGLCLEARNAMEDFRAMEBUFFERIVPROC)load("glClearNamedFramebufferiv"); - glad_glClearNamedFramebufferuiv = (PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC)load("glClearNamedFramebufferuiv"); - glad_glClearNamedFramebufferfv = (PFNGLCLEARNAMEDFRAMEBUFFERFVPROC)load("glClearNamedFramebufferfv"); - glad_glClearNamedFramebufferfi = (PFNGLCLEARNAMEDFRAMEBUFFERFIPROC)load("glClearNamedFramebufferfi"); - glad_glBlitNamedFramebuffer = (PFNGLBLITNAMEDFRAMEBUFFERPROC)load("glBlitNamedFramebuffer"); - glad_glCheckNamedFramebufferStatus = (PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC)load("glCheckNamedFramebufferStatus"); - glad_glGetNamedFramebufferParameteriv = (PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC)load("glGetNamedFramebufferParameteriv"); - glad_glGetNamedFramebufferAttachmentParameteriv = (PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC)load("glGetNamedFramebufferAttachmentParameteriv"); - glad_glCreateRenderbuffers = (PFNGLCREATERENDERBUFFERSPROC)load("glCreateRenderbuffers"); - glad_glNamedRenderbufferStorage = (PFNGLNAMEDRENDERBUFFERSTORAGEPROC)load("glNamedRenderbufferStorage"); - glad_glNamedRenderbufferStorageMultisample = (PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC)load("glNamedRenderbufferStorageMultisample"); - glad_glGetNamedRenderbufferParameteriv = (PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC)load("glGetNamedRenderbufferParameteriv"); - glad_glCreateTextures = (PFNGLCREATETEXTURESPROC)load("glCreateTextures"); - glad_glTextureBuffer = (PFNGLTEXTUREBUFFERPROC)load("glTextureBuffer"); - glad_glTextureBufferRange = (PFNGLTEXTUREBUFFERRANGEPROC)load("glTextureBufferRange"); - glad_glTextureStorage1D = (PFNGLTEXTURESTORAGE1DPROC)load("glTextureStorage1D"); - glad_glTextureStorage2D = (PFNGLTEXTURESTORAGE2DPROC)load("glTextureStorage2D"); - glad_glTextureStorage3D = (PFNGLTEXTURESTORAGE3DPROC)load("glTextureStorage3D"); - glad_glTextureStorage2DMultisample = (PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC)load("glTextureStorage2DMultisample"); - glad_glTextureStorage3DMultisample = (PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC)load("glTextureStorage3DMultisample"); - glad_glTextureSubImage1D = (PFNGLTEXTURESUBIMAGE1DPROC)load("glTextureSubImage1D"); - glad_glTextureSubImage2D = (PFNGLTEXTURESUBIMAGE2DPROC)load("glTextureSubImage2D"); - glad_glTextureSubImage3D = (PFNGLTEXTURESUBIMAGE3DPROC)load("glTextureSubImage3D"); - glad_glCompressedTextureSubImage1D = (PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC)load("glCompressedTextureSubImage1D"); - glad_glCompressedTextureSubImage2D = (PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC)load("glCompressedTextureSubImage2D"); - glad_glCompressedTextureSubImage3D = (PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC)load("glCompressedTextureSubImage3D"); - glad_glCopyTextureSubImage1D = (PFNGLCOPYTEXTURESUBIMAGE1DPROC)load("glCopyTextureSubImage1D"); - glad_glCopyTextureSubImage2D = (PFNGLCOPYTEXTURESUBIMAGE2DPROC)load("glCopyTextureSubImage2D"); - glad_glCopyTextureSubImage3D = (PFNGLCOPYTEXTURESUBIMAGE3DPROC)load("glCopyTextureSubImage3D"); - glad_glTextureParameterf = (PFNGLTEXTUREPARAMETERFPROC)load("glTextureParameterf"); - glad_glTextureParameterfv = (PFNGLTEXTUREPARAMETERFVPROC)load("glTextureParameterfv"); - glad_glTextureParameteri = (PFNGLTEXTUREPARAMETERIPROC)load("glTextureParameteri"); - glad_glTextureParameterIiv = (PFNGLTEXTUREPARAMETERIIVPROC)load("glTextureParameterIiv"); - glad_glTextureParameterIuiv = (PFNGLTEXTUREPARAMETERIUIVPROC)load("glTextureParameterIuiv"); - glad_glTextureParameteriv = (PFNGLTEXTUREPARAMETERIVPROC)load("glTextureParameteriv"); - glad_glGenerateTextureMipmap = (PFNGLGENERATETEXTUREMIPMAPPROC)load("glGenerateTextureMipmap"); - glad_glBindTextureUnit = (PFNGLBINDTEXTUREUNITPROC)load("glBindTextureUnit"); - glad_glGetTextureImage = (PFNGLGETTEXTUREIMAGEPROC)load("glGetTextureImage"); - glad_glGetCompressedTextureImage = (PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC)load("glGetCompressedTextureImage"); - glad_glGetTextureLevelParameterfv = (PFNGLGETTEXTURELEVELPARAMETERFVPROC)load("glGetTextureLevelParameterfv"); - glad_glGetTextureLevelParameteriv = (PFNGLGETTEXTURELEVELPARAMETERIVPROC)load("glGetTextureLevelParameteriv"); - glad_glGetTextureParameterfv = (PFNGLGETTEXTUREPARAMETERFVPROC)load("glGetTextureParameterfv"); - glad_glGetTextureParameterIiv = (PFNGLGETTEXTUREPARAMETERIIVPROC)load("glGetTextureParameterIiv"); - glad_glGetTextureParameterIuiv = (PFNGLGETTEXTUREPARAMETERIUIVPROC)load("glGetTextureParameterIuiv"); - glad_glGetTextureParameteriv = (PFNGLGETTEXTUREPARAMETERIVPROC)load("glGetTextureParameteriv"); - glad_glCreateVertexArrays = (PFNGLCREATEVERTEXARRAYSPROC)load("glCreateVertexArrays"); - glad_glDisableVertexArrayAttrib = (PFNGLDISABLEVERTEXARRAYATTRIBPROC)load("glDisableVertexArrayAttrib"); - glad_glEnableVertexArrayAttrib = (PFNGLENABLEVERTEXARRAYATTRIBPROC)load("glEnableVertexArrayAttrib"); - glad_glVertexArrayElementBuffer = (PFNGLVERTEXARRAYELEMENTBUFFERPROC)load("glVertexArrayElementBuffer"); - glad_glVertexArrayVertexBuffer = (PFNGLVERTEXARRAYVERTEXBUFFERPROC)load("glVertexArrayVertexBuffer"); - glad_glVertexArrayVertexBuffers = (PFNGLVERTEXARRAYVERTEXBUFFERSPROC)load("glVertexArrayVertexBuffers"); - glad_glVertexArrayAttribBinding = (PFNGLVERTEXARRAYATTRIBBINDINGPROC)load("glVertexArrayAttribBinding"); - glad_glVertexArrayAttribFormat = (PFNGLVERTEXARRAYATTRIBFORMATPROC)load("glVertexArrayAttribFormat"); - glad_glVertexArrayAttribIFormat = (PFNGLVERTEXARRAYATTRIBIFORMATPROC)load("glVertexArrayAttribIFormat"); - glad_glVertexArrayAttribLFormat = (PFNGLVERTEXARRAYATTRIBLFORMATPROC)load("glVertexArrayAttribLFormat"); - glad_glVertexArrayBindingDivisor = (PFNGLVERTEXARRAYBINDINGDIVISORPROC)load("glVertexArrayBindingDivisor"); - glad_glGetVertexArrayiv = (PFNGLGETVERTEXARRAYIVPROC)load("glGetVertexArrayiv"); - glad_glGetVertexArrayIndexediv = (PFNGLGETVERTEXARRAYINDEXEDIVPROC)load("glGetVertexArrayIndexediv"); - glad_glGetVertexArrayIndexed64iv = (PFNGLGETVERTEXARRAYINDEXED64IVPROC)load("glGetVertexArrayIndexed64iv"); - glad_glCreateSamplers = (PFNGLCREATESAMPLERSPROC)load("glCreateSamplers"); - glad_glCreateProgramPipelines = (PFNGLCREATEPROGRAMPIPELINESPROC)load("glCreateProgramPipelines"); - glad_glCreateQueries = (PFNGLCREATEQUERIESPROC)load("glCreateQueries"); - glad_glGetQueryBufferObjecti64v = (PFNGLGETQUERYBUFFEROBJECTI64VPROC)load("glGetQueryBufferObjecti64v"); - glad_glGetQueryBufferObjectiv = (PFNGLGETQUERYBUFFEROBJECTIVPROC)load("glGetQueryBufferObjectiv"); - glad_glGetQueryBufferObjectui64v = (PFNGLGETQUERYBUFFEROBJECTUI64VPROC)load("glGetQueryBufferObjectui64v"); - glad_glGetQueryBufferObjectuiv = (PFNGLGETQUERYBUFFEROBJECTUIVPROC)load("glGetQueryBufferObjectuiv"); - glad_glMemoryBarrierByRegion = (PFNGLMEMORYBARRIERBYREGIONPROC)load("glMemoryBarrierByRegion"); - glad_glGetTextureSubImage = (PFNGLGETTEXTURESUBIMAGEPROC)load("glGetTextureSubImage"); - glad_glGetCompressedTextureSubImage = (PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC)load("glGetCompressedTextureSubImage"); - glad_glGetGraphicsResetStatus = (PFNGLGETGRAPHICSRESETSTATUSPROC)load("glGetGraphicsResetStatus"); - glad_glGetnCompressedTexImage = (PFNGLGETNCOMPRESSEDTEXIMAGEPROC)load("glGetnCompressedTexImage"); - glad_glGetnTexImage = (PFNGLGETNTEXIMAGEPROC)load("glGetnTexImage"); - glad_glGetnUniformdv = (PFNGLGETNUNIFORMDVPROC)load("glGetnUniformdv"); - glad_glGetnUniformfv = (PFNGLGETNUNIFORMFVPROC)load("glGetnUniformfv"); - glad_glGetnUniformiv = (PFNGLGETNUNIFORMIVPROC)load("glGetnUniformiv"); - glad_glGetnUniformuiv = (PFNGLGETNUNIFORMUIVPROC)load("glGetnUniformuiv"); - glad_glReadnPixels = (PFNGLREADNPIXELSPROC)load("glReadnPixels"); - glad_glGetnMapdv = (PFNGLGETNMAPDVPROC)load("glGetnMapdv"); - glad_glGetnMapfv = (PFNGLGETNMAPFVPROC)load("glGetnMapfv"); - glad_glGetnMapiv = (PFNGLGETNMAPIVPROC)load("glGetnMapiv"); - glad_glGetnPixelMapfv = (PFNGLGETNPIXELMAPFVPROC)load("glGetnPixelMapfv"); - glad_glGetnPixelMapuiv = (PFNGLGETNPIXELMAPUIVPROC)load("glGetnPixelMapuiv"); - glad_glGetnPixelMapusv = (PFNGLGETNPIXELMAPUSVPROC)load("glGetnPixelMapusv"); - glad_glGetnPolygonStipple = (PFNGLGETNPOLYGONSTIPPLEPROC)load("glGetnPolygonStipple"); - glad_glGetnColorTable = (PFNGLGETNCOLORTABLEPROC)load("glGetnColorTable"); - glad_glGetnConvolutionFilter = (PFNGLGETNCONVOLUTIONFILTERPROC)load("glGetnConvolutionFilter"); - glad_glGetnSeparableFilter = (PFNGLGETNSEPARABLEFILTERPROC)load("glGetnSeparableFilter"); - glad_glGetnHistogram = (PFNGLGETNHISTOGRAMPROC)load("glGetnHistogram"); - glad_glGetnMinmax = (PFNGLGETNMINMAXPROC)load("glGetnMinmax"); - glad_glTextureBarrier = (PFNGLTEXTUREBARRIERPROC)load("glTextureBarrier"); -} -static int find_extensionsGL(void) { - if (!get_exts()) return 0; - (void)&has_ext; - free_exts(); - return 1; -} - -static void find_coreGL(void) { - - /* Thank you @elmindreda - * https://github.com/elmindreda/greg/blob/master/templates/greg.c.in#L176 - * https://github.com/glfw/glfw/blob/master/src/context.c#L36 - */ - int i, major, minor; - - const char* version; - const char* prefixes[] = { - "OpenGL ES-CM ", - "OpenGL ES-CL ", - "OpenGL ES ", - NULL - }; - - version = (const char*) glGetString(GL_VERSION); - if (!version) return; - - for (i = 0; prefixes[i]; i++) { - const size_t length = strlen(prefixes[i]); - if (strncmp(version, prefixes[i], length) == 0) { - version += length; - break; - } - } - -/* PR #18 */ -#ifdef _MSC_VER - sscanf_s(version, "%d.%d", &major, &minor); -#else - sscanf(version, "%d.%d", &major, &minor); -#endif - - GLVersion.major = major; GLVersion.minor = minor; - max_loaded_major = major; max_loaded_minor = minor; - GLAD_GL_VERSION_1_0 = (major == 1 && minor >= 0) || major > 1; - GLAD_GL_VERSION_1_1 = (major == 1 && minor >= 1) || major > 1; - GLAD_GL_VERSION_1_2 = (major == 1 && minor >= 2) || major > 1; - GLAD_GL_VERSION_1_3 = (major == 1 && minor >= 3) || major > 1; - GLAD_GL_VERSION_1_4 = (major == 1 && minor >= 4) || major > 1; - GLAD_GL_VERSION_1_5 = (major == 1 && minor >= 5) || major > 1; - GLAD_GL_VERSION_2_0 = (major == 2 && minor >= 0) || major > 2; - GLAD_GL_VERSION_2_1 = (major == 2 && minor >= 1) || major > 2; - GLAD_GL_VERSION_3_0 = (major == 3 && minor >= 0) || major > 3; - GLAD_GL_VERSION_3_1 = (major == 3 && minor >= 1) || major > 3; - GLAD_GL_VERSION_3_2 = (major == 3 && minor >= 2) || major > 3; - GLAD_GL_VERSION_3_3 = (major == 3 && minor >= 3) || major > 3; - GLAD_GL_VERSION_4_0 = (major == 4 && minor >= 0) || major > 4; - GLAD_GL_VERSION_4_1 = (major == 4 && minor >= 1) || major > 4; - GLAD_GL_VERSION_4_2 = (major == 4 && minor >= 2) || major > 4; - GLAD_GL_VERSION_4_3 = (major == 4 && minor >= 3) || major > 4; - GLAD_GL_VERSION_4_4 = (major == 4 && minor >= 4) || major > 4; - GLAD_GL_VERSION_4_5 = (major == 4 && minor >= 5) || major > 4; - if (GLVersion.major > 4 || (GLVersion.major >= 4 && GLVersion.minor >= 5)) { - max_loaded_major = 4; - max_loaded_minor = 5; - } -} - -int gladLoadGLLoader(GLADloadproc load) { - GLVersion.major = 0; GLVersion.minor = 0; - glGetString = (PFNGLGETSTRINGPROC)load("glGetString"); - if(glGetString == NULL) return 0; - if(glGetString(GL_VERSION) == NULL) return 0; - find_coreGL(); - load_GL_VERSION_1_0(load); - load_GL_VERSION_1_1(load); - load_GL_VERSION_1_2(load); - load_GL_VERSION_1_3(load); - load_GL_VERSION_1_4(load); - load_GL_VERSION_1_5(load); - load_GL_VERSION_2_0(load); - load_GL_VERSION_2_1(load); - load_GL_VERSION_3_0(load); - load_GL_VERSION_3_1(load); - load_GL_VERSION_3_2(load); - load_GL_VERSION_3_3(load); - load_GL_VERSION_4_0(load); - load_GL_VERSION_4_1(load); - load_GL_VERSION_4_2(load); - load_GL_VERSION_4_3(load); - load_GL_VERSION_4_4(load); - load_GL_VERSION_4_5(load); - - if (!find_extensionsGL()) return 0; - return GLVersion.major != 0 || GLVersion.minor != 0; -} - +/* + + OpenGL loader generated by glad 0.1.29 on Wed Apr 3 21:28:46 2019. + + Language/Generator: C/C++ + Specification: gl + APIs: gl=4.5 + Profile: core + Extensions: + + Loader: True + Local files: False + Omit khrplatform: False + Reproducible: False + + Commandline: + --profile="core" --api="gl=4.5" --generator="c" --spec="gl" --extensions="" + Online: + https://glad.dav1d.de/#profile=core&language=c&specification=gl&loader=on&api=gl%3D4.5 +*/ + +#include +#include +#include +#include + +static void* get_proc(const char *namez); + +#if defined(_WIN32) || defined(__CYGWIN__) +#include +static HMODULE libGL; + +typedef void* (APIENTRYP PFNWGLGETPROCADDRESSPROC_PRIVATE)(const char*); +static PFNWGLGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr; + +#ifdef _MSC_VER +#ifdef __has_include + #if __has_include() + #define HAVE_WINAPIFAMILY 1 + #endif +#elif _MSC_VER >= 1700 && !_USING_V110_SDK71_ + #define HAVE_WINAPIFAMILY 1 +#endif +#endif + +#ifdef HAVE_WINAPIFAMILY + #include + #if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) + #define IS_UWP 1 + #endif +#endif + +static +int open_gl(void) { +#ifndef IS_UWP + libGL = LoadLibraryW(L"opengl32.dll"); + if(libGL != NULL) { + void (* tmp)(void); + tmp = (void(*)(void)) GetProcAddress(libGL, "wglGetProcAddress"); + gladGetProcAddressPtr = (PFNWGLGETPROCADDRESSPROC_PRIVATE) tmp; + return gladGetProcAddressPtr != NULL; + } +#endif + + return 0; +} + +static +void close_gl(void) { + if(libGL != NULL) { + FreeLibrary((HMODULE) libGL); + libGL = NULL; + } +} +#else +#include +static void* libGL; + +#if !defined(__APPLE__) && !defined(__HAIKU__) +typedef void* (APIENTRYP PFNGLXGETPROCADDRESSPROC_PRIVATE)(const char*); +static PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr; +#endif + +static +int open_gl(void) { +#ifdef __APPLE__ + static const char *NAMES[] = { + "../Frameworks/OpenGL.framework/OpenGL", + "/Library/Frameworks/OpenGL.framework/OpenGL", + "/System/Library/Frameworks/OpenGL.framework/OpenGL", + "/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL" + }; +#else + static const char *NAMES[] = {"libGL.so.1", "libGL.so"}; +#endif + + unsigned int index = 0; + for(index = 0; index < (sizeof(NAMES) / sizeof(NAMES[0])); index++) { + libGL = dlopen(NAMES[index], RTLD_NOW | RTLD_GLOBAL); + + if(libGL != NULL) { +#if defined(__APPLE__) || defined(__HAIKU__) + return 1; +#else + gladGetProcAddressPtr = (PFNGLXGETPROCADDRESSPROC_PRIVATE)dlsym(libGL, + "glXGetProcAddressARB"); + return gladGetProcAddressPtr != NULL; +#endif + } + } + + return 0; +} + +static +void close_gl(void) { + if(libGL != NULL) { + dlclose(libGL); + libGL = NULL; + } +} +#endif + +static +void* get_proc(const char *namez) { + void* result = NULL; + if(libGL == NULL) return NULL; + +#if !defined(__APPLE__) && !defined(__HAIKU__) + if(gladGetProcAddressPtr != NULL) { + result = gladGetProcAddressPtr(namez); + } +#endif + if(result == NULL) { +#if defined(_WIN32) || defined(__CYGWIN__) + result = (void*)GetProcAddress((HMODULE) libGL, namez); +#else + result = dlsym(libGL, namez); +#endif + } + + return result; +} + +int gladLoadGL(void) { + int status = 0; + + if(open_gl()) { + status = gladLoadGLLoader(&get_proc); + close_gl(); + } + + return status; +} + +struct gladGLversionStruct GLVersion = { 0, 0 }; + +#if defined(GL_ES_VERSION_3_0) || defined(GL_VERSION_3_0) +#define _GLAD_IS_SOME_NEW_VERSION 1 +#endif + +static int max_loaded_major; +static int max_loaded_minor; + +static const char *exts = NULL; +static int num_exts_i = 0; +static char **exts_i = NULL; + +static int get_exts(void) { +#ifdef _GLAD_IS_SOME_NEW_VERSION + if(max_loaded_major < 3) { +#endif + exts = (const char *)glGetString(GL_EXTENSIONS); +#ifdef _GLAD_IS_SOME_NEW_VERSION + } else { + unsigned int index; + + num_exts_i = 0; + glGetIntegerv(GL_NUM_EXTENSIONS, &num_exts_i); + if (num_exts_i > 0) { + exts_i = (char **)malloc((size_t)num_exts_i * (sizeof *exts_i)); + } + + if (exts_i == NULL) { + return 0; + } + + for(index = 0; index < (unsigned)num_exts_i; index++) { + const char *gl_str_tmp = (const char*)glGetStringi(GL_EXTENSIONS, index); + size_t len = strlen(gl_str_tmp); + + char *local_str = (char*)malloc((len+1) * sizeof(char)); + if(local_str != NULL) { + memcpy(local_str, gl_str_tmp, (len+1) * sizeof(char)); + } + exts_i[index] = local_str; + } + } +#endif + return 1; +} + +static void free_exts(void) { + if (exts_i != NULL) { + int index; + for(index = 0; index < num_exts_i; index++) { + free((char *)exts_i[index]); + } + free((void *)exts_i); + exts_i = NULL; + } +} + +static int has_ext(const char *ext) { +#ifdef _GLAD_IS_SOME_NEW_VERSION + if(max_loaded_major < 3) { +#endif + const char *extensions; + const char *loc; + const char *terminator; + extensions = exts; + if(extensions == NULL || ext == NULL) { + return 0; + } + + while(1) { + loc = strstr(extensions, ext); + if(loc == NULL) { + return 0; + } + + terminator = loc + strlen(ext); + if((loc == extensions || *(loc - 1) == ' ') && + (*terminator == ' ' || *terminator == '\0')) { + return 1; + } + extensions = terminator; + } +#ifdef _GLAD_IS_SOME_NEW_VERSION + } else { + int index; + if(exts_i == NULL) return 0; + for(index = 0; index < num_exts_i; index++) { + const char *e = exts_i[index]; + + if(exts_i[index] != NULL && strcmp(e, ext) == 0) { + return 1; + } + } + } +#endif + + return 0; +} +int GLAD_GL_VERSION_1_0 = 0; +int GLAD_GL_VERSION_1_1 = 0; +int GLAD_GL_VERSION_1_2 = 0; +int GLAD_GL_VERSION_1_3 = 0; +int GLAD_GL_VERSION_1_4 = 0; +int GLAD_GL_VERSION_1_5 = 0; +int GLAD_GL_VERSION_2_0 = 0; +int GLAD_GL_VERSION_2_1 = 0; +int GLAD_GL_VERSION_3_0 = 0; +int GLAD_GL_VERSION_3_1 = 0; +int GLAD_GL_VERSION_3_2 = 0; +int GLAD_GL_VERSION_3_3 = 0; +int GLAD_GL_VERSION_4_0 = 0; +int GLAD_GL_VERSION_4_1 = 0; +int GLAD_GL_VERSION_4_2 = 0; +int GLAD_GL_VERSION_4_3 = 0; +int GLAD_GL_VERSION_4_4 = 0; +int GLAD_GL_VERSION_4_5 = 0; +PFNGLACTIVESHADERPROGRAMPROC glad_glActiveShaderProgram = NULL; +PFNGLACTIVETEXTUREPROC glad_glActiveTexture = NULL; +PFNGLATTACHSHADERPROC glad_glAttachShader = NULL; +PFNGLBEGINCONDITIONALRENDERPROC glad_glBeginConditionalRender = NULL; +PFNGLBEGINQUERYPROC glad_glBeginQuery = NULL; +PFNGLBEGINQUERYINDEXEDPROC glad_glBeginQueryIndexed = NULL; +PFNGLBEGINTRANSFORMFEEDBACKPROC glad_glBeginTransformFeedback = NULL; +PFNGLBINDATTRIBLOCATIONPROC glad_glBindAttribLocation = NULL; +PFNGLBINDBUFFERPROC glad_glBindBuffer = NULL; +PFNGLBINDBUFFERBASEPROC glad_glBindBufferBase = NULL; +PFNGLBINDBUFFERRANGEPROC glad_glBindBufferRange = NULL; +PFNGLBINDBUFFERSBASEPROC glad_glBindBuffersBase = NULL; +PFNGLBINDBUFFERSRANGEPROC glad_glBindBuffersRange = NULL; +PFNGLBINDFRAGDATALOCATIONPROC glad_glBindFragDataLocation = NULL; +PFNGLBINDFRAGDATALOCATIONINDEXEDPROC glad_glBindFragDataLocationIndexed = NULL; +PFNGLBINDFRAMEBUFFERPROC glad_glBindFramebuffer = NULL; +PFNGLBINDIMAGETEXTUREPROC glad_glBindImageTexture = NULL; +PFNGLBINDIMAGETEXTURESPROC glad_glBindImageTextures = NULL; +PFNGLBINDPROGRAMPIPELINEPROC glad_glBindProgramPipeline = NULL; +PFNGLBINDRENDERBUFFERPROC glad_glBindRenderbuffer = NULL; +PFNGLBINDSAMPLERPROC glad_glBindSampler = NULL; +PFNGLBINDSAMPLERSPROC glad_glBindSamplers = NULL; +PFNGLBINDTEXTUREPROC glad_glBindTexture = NULL; +PFNGLBINDTEXTUREUNITPROC glad_glBindTextureUnit = NULL; +PFNGLBINDTEXTURESPROC glad_glBindTextures = NULL; +PFNGLBINDTRANSFORMFEEDBACKPROC glad_glBindTransformFeedback = NULL; +PFNGLBINDVERTEXARRAYPROC glad_glBindVertexArray = NULL; +PFNGLBINDVERTEXBUFFERPROC glad_glBindVertexBuffer = NULL; +PFNGLBINDVERTEXBUFFERSPROC glad_glBindVertexBuffers = NULL; +PFNGLBLENDCOLORPROC glad_glBlendColor = NULL; +PFNGLBLENDEQUATIONPROC glad_glBlendEquation = NULL; +PFNGLBLENDEQUATIONSEPARATEPROC glad_glBlendEquationSeparate = NULL; +PFNGLBLENDEQUATIONSEPARATEIPROC glad_glBlendEquationSeparatei = NULL; +PFNGLBLENDEQUATIONIPROC glad_glBlendEquationi = NULL; +PFNGLBLENDFUNCPROC glad_glBlendFunc = NULL; +PFNGLBLENDFUNCSEPARATEPROC glad_glBlendFuncSeparate = NULL; +PFNGLBLENDFUNCSEPARATEIPROC glad_glBlendFuncSeparatei = NULL; +PFNGLBLENDFUNCIPROC glad_glBlendFunci = NULL; +PFNGLBLITFRAMEBUFFERPROC glad_glBlitFramebuffer = NULL; +PFNGLBLITNAMEDFRAMEBUFFERPROC glad_glBlitNamedFramebuffer = NULL; +PFNGLBUFFERDATAPROC glad_glBufferData = NULL; +PFNGLBUFFERSTORAGEPROC glad_glBufferStorage = NULL; +PFNGLBUFFERSUBDATAPROC glad_glBufferSubData = NULL; +PFNGLCHECKFRAMEBUFFERSTATUSPROC glad_glCheckFramebufferStatus = NULL; +PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC glad_glCheckNamedFramebufferStatus = NULL; +PFNGLCLAMPCOLORPROC glad_glClampColor = NULL; +PFNGLCLEARPROC glad_glClear = NULL; +PFNGLCLEARBUFFERDATAPROC glad_glClearBufferData = NULL; +PFNGLCLEARBUFFERSUBDATAPROC glad_glClearBufferSubData = NULL; +PFNGLCLEARBUFFERFIPROC glad_glClearBufferfi = NULL; +PFNGLCLEARBUFFERFVPROC glad_glClearBufferfv = NULL; +PFNGLCLEARBUFFERIVPROC glad_glClearBufferiv = NULL; +PFNGLCLEARBUFFERUIVPROC glad_glClearBufferuiv = NULL; +PFNGLCLEARCOLORPROC glad_glClearColor = NULL; +PFNGLCLEARDEPTHPROC glad_glClearDepth = NULL; +PFNGLCLEARDEPTHFPROC glad_glClearDepthf = NULL; +PFNGLCLEARNAMEDBUFFERDATAPROC glad_glClearNamedBufferData = NULL; +PFNGLCLEARNAMEDBUFFERSUBDATAPROC glad_glClearNamedBufferSubData = NULL; +PFNGLCLEARNAMEDFRAMEBUFFERFIPROC glad_glClearNamedFramebufferfi = NULL; +PFNGLCLEARNAMEDFRAMEBUFFERFVPROC glad_glClearNamedFramebufferfv = NULL; +PFNGLCLEARNAMEDFRAMEBUFFERIVPROC glad_glClearNamedFramebufferiv = NULL; +PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC glad_glClearNamedFramebufferuiv = NULL; +PFNGLCLEARSTENCILPROC glad_glClearStencil = NULL; +PFNGLCLEARTEXIMAGEPROC glad_glClearTexImage = NULL; +PFNGLCLEARTEXSUBIMAGEPROC glad_glClearTexSubImage = NULL; +PFNGLCLIENTWAITSYNCPROC glad_glClientWaitSync = NULL; +PFNGLCLIPCONTROLPROC glad_glClipControl = NULL; +PFNGLCOLORMASKPROC glad_glColorMask = NULL; +PFNGLCOLORMASKIPROC glad_glColorMaski = NULL; +PFNGLCOLORP3UIPROC glad_glColorP3ui = NULL; +PFNGLCOLORP3UIVPROC glad_glColorP3uiv = NULL; +PFNGLCOLORP4UIPROC glad_glColorP4ui = NULL; +PFNGLCOLORP4UIVPROC glad_glColorP4uiv = NULL; +PFNGLCOMPILESHADERPROC glad_glCompileShader = NULL; +PFNGLCOMPRESSEDTEXIMAGE1DPROC glad_glCompressedTexImage1D = NULL; +PFNGLCOMPRESSEDTEXIMAGE2DPROC glad_glCompressedTexImage2D = NULL; +PFNGLCOMPRESSEDTEXIMAGE3DPROC glad_glCompressedTexImage3D = NULL; +PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC glad_glCompressedTexSubImage1D = NULL; +PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glad_glCompressedTexSubImage2D = NULL; +PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glad_glCompressedTexSubImage3D = NULL; +PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC glad_glCompressedTextureSubImage1D = NULL; +PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC glad_glCompressedTextureSubImage2D = NULL; +PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC glad_glCompressedTextureSubImage3D = NULL; +PFNGLCOPYBUFFERSUBDATAPROC glad_glCopyBufferSubData = NULL; +PFNGLCOPYIMAGESUBDATAPROC glad_glCopyImageSubData = NULL; +PFNGLCOPYNAMEDBUFFERSUBDATAPROC glad_glCopyNamedBufferSubData = NULL; +PFNGLCOPYTEXIMAGE1DPROC glad_glCopyTexImage1D = NULL; +PFNGLCOPYTEXIMAGE2DPROC glad_glCopyTexImage2D = NULL; +PFNGLCOPYTEXSUBIMAGE1DPROC glad_glCopyTexSubImage1D = NULL; +PFNGLCOPYTEXSUBIMAGE2DPROC glad_glCopyTexSubImage2D = NULL; +PFNGLCOPYTEXSUBIMAGE3DPROC glad_glCopyTexSubImage3D = NULL; +PFNGLCOPYTEXTURESUBIMAGE1DPROC glad_glCopyTextureSubImage1D = NULL; +PFNGLCOPYTEXTURESUBIMAGE2DPROC glad_glCopyTextureSubImage2D = NULL; +PFNGLCOPYTEXTURESUBIMAGE3DPROC glad_glCopyTextureSubImage3D = NULL; +PFNGLCREATEBUFFERSPROC glad_glCreateBuffers = NULL; +PFNGLCREATEFRAMEBUFFERSPROC glad_glCreateFramebuffers = NULL; +PFNGLCREATEPROGRAMPROC glad_glCreateProgram = NULL; +PFNGLCREATEPROGRAMPIPELINESPROC glad_glCreateProgramPipelines = NULL; +PFNGLCREATEQUERIESPROC glad_glCreateQueries = NULL; +PFNGLCREATERENDERBUFFERSPROC glad_glCreateRenderbuffers = NULL; +PFNGLCREATESAMPLERSPROC glad_glCreateSamplers = NULL; +PFNGLCREATESHADERPROC glad_glCreateShader = NULL; +PFNGLCREATESHADERPROGRAMVPROC glad_glCreateShaderProgramv = NULL; +PFNGLCREATETEXTURESPROC glad_glCreateTextures = NULL; +PFNGLCREATETRANSFORMFEEDBACKSPROC glad_glCreateTransformFeedbacks = NULL; +PFNGLCREATEVERTEXARRAYSPROC glad_glCreateVertexArrays = NULL; +PFNGLCULLFACEPROC glad_glCullFace = NULL; +PFNGLDEBUGMESSAGECALLBACKPROC glad_glDebugMessageCallback = NULL; +PFNGLDEBUGMESSAGECONTROLPROC glad_glDebugMessageControl = NULL; +PFNGLDEBUGMESSAGEINSERTPROC glad_glDebugMessageInsert = NULL; +PFNGLDELETEBUFFERSPROC glad_glDeleteBuffers = NULL; +PFNGLDELETEFRAMEBUFFERSPROC glad_glDeleteFramebuffers = NULL; +PFNGLDELETEPROGRAMPROC glad_glDeleteProgram = NULL; +PFNGLDELETEPROGRAMPIPELINESPROC glad_glDeleteProgramPipelines = NULL; +PFNGLDELETEQUERIESPROC glad_glDeleteQueries = NULL; +PFNGLDELETERENDERBUFFERSPROC glad_glDeleteRenderbuffers = NULL; +PFNGLDELETESAMPLERSPROC glad_glDeleteSamplers = NULL; +PFNGLDELETESHADERPROC glad_glDeleteShader = NULL; +PFNGLDELETESYNCPROC glad_glDeleteSync = NULL; +PFNGLDELETETEXTURESPROC glad_glDeleteTextures = NULL; +PFNGLDELETETRANSFORMFEEDBACKSPROC glad_glDeleteTransformFeedbacks = NULL; +PFNGLDELETEVERTEXARRAYSPROC glad_glDeleteVertexArrays = NULL; +PFNGLDEPTHFUNCPROC glad_glDepthFunc = NULL; +PFNGLDEPTHMASKPROC glad_glDepthMask = NULL; +PFNGLDEPTHRANGEPROC glad_glDepthRange = NULL; +PFNGLDEPTHRANGEARRAYVPROC glad_glDepthRangeArrayv = NULL; +PFNGLDEPTHRANGEINDEXEDPROC glad_glDepthRangeIndexed = NULL; +PFNGLDEPTHRANGEFPROC glad_glDepthRangef = NULL; +PFNGLDETACHSHADERPROC glad_glDetachShader = NULL; +PFNGLDISABLEPROC glad_glDisable = NULL; +PFNGLDISABLEVERTEXARRAYATTRIBPROC glad_glDisableVertexArrayAttrib = NULL; +PFNGLDISABLEVERTEXATTRIBARRAYPROC glad_glDisableVertexAttribArray = NULL; +PFNGLDISABLEIPROC glad_glDisablei = NULL; +PFNGLDISPATCHCOMPUTEPROC glad_glDispatchCompute = NULL; +PFNGLDISPATCHCOMPUTEINDIRECTPROC glad_glDispatchComputeIndirect = NULL; +PFNGLDRAWARRAYSPROC glad_glDrawArrays = NULL; +PFNGLDRAWARRAYSINDIRECTPROC glad_glDrawArraysIndirect = NULL; +PFNGLDRAWARRAYSINSTANCEDPROC glad_glDrawArraysInstanced = NULL; +PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC glad_glDrawArraysInstancedBaseInstance = NULL; +PFNGLDRAWBUFFERPROC glad_glDrawBuffer = NULL; +PFNGLDRAWBUFFERSPROC glad_glDrawBuffers = NULL; +PFNGLDRAWELEMENTSPROC glad_glDrawElements = NULL; +PFNGLDRAWELEMENTSBASEVERTEXPROC glad_glDrawElementsBaseVertex = NULL; +PFNGLDRAWELEMENTSINDIRECTPROC glad_glDrawElementsIndirect = NULL; +PFNGLDRAWELEMENTSINSTANCEDPROC glad_glDrawElementsInstanced = NULL; +PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC glad_glDrawElementsInstancedBaseInstance = NULL; +PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC glad_glDrawElementsInstancedBaseVertex = NULL; +PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC glad_glDrawElementsInstancedBaseVertexBaseInstance = NULL; +PFNGLDRAWRANGEELEMENTSPROC glad_glDrawRangeElements = NULL; +PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC glad_glDrawRangeElementsBaseVertex = NULL; +PFNGLDRAWTRANSFORMFEEDBACKPROC glad_glDrawTransformFeedback = NULL; +PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC glad_glDrawTransformFeedbackInstanced = NULL; +PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC glad_glDrawTransformFeedbackStream = NULL; +PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC glad_glDrawTransformFeedbackStreamInstanced = NULL; +PFNGLENABLEPROC glad_glEnable = NULL; +PFNGLENABLEVERTEXARRAYATTRIBPROC glad_glEnableVertexArrayAttrib = NULL; +PFNGLENABLEVERTEXATTRIBARRAYPROC glad_glEnableVertexAttribArray = NULL; +PFNGLENABLEIPROC glad_glEnablei = NULL; +PFNGLENDCONDITIONALRENDERPROC glad_glEndConditionalRender = NULL; +PFNGLENDQUERYPROC glad_glEndQuery = NULL; +PFNGLENDQUERYINDEXEDPROC glad_glEndQueryIndexed = NULL; +PFNGLENDTRANSFORMFEEDBACKPROC glad_glEndTransformFeedback = NULL; +PFNGLFENCESYNCPROC glad_glFenceSync = NULL; +PFNGLFINISHPROC glad_glFinish = NULL; +PFNGLFLUSHPROC glad_glFlush = NULL; +PFNGLFLUSHMAPPEDBUFFERRANGEPROC glad_glFlushMappedBufferRange = NULL; +PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC glad_glFlushMappedNamedBufferRange = NULL; +PFNGLFRAMEBUFFERPARAMETERIPROC glad_glFramebufferParameteri = NULL; +PFNGLFRAMEBUFFERRENDERBUFFERPROC glad_glFramebufferRenderbuffer = NULL; +PFNGLFRAMEBUFFERTEXTUREPROC glad_glFramebufferTexture = NULL; +PFNGLFRAMEBUFFERTEXTURE1DPROC glad_glFramebufferTexture1D = NULL; +PFNGLFRAMEBUFFERTEXTURE2DPROC glad_glFramebufferTexture2D = NULL; +PFNGLFRAMEBUFFERTEXTURE3DPROC glad_glFramebufferTexture3D = NULL; +PFNGLFRAMEBUFFERTEXTURELAYERPROC glad_glFramebufferTextureLayer = NULL; +PFNGLFRONTFACEPROC glad_glFrontFace = NULL; +PFNGLGENBUFFERSPROC glad_glGenBuffers = NULL; +PFNGLGENFRAMEBUFFERSPROC glad_glGenFramebuffers = NULL; +PFNGLGENPROGRAMPIPELINESPROC glad_glGenProgramPipelines = NULL; +PFNGLGENQUERIESPROC glad_glGenQueries = NULL; +PFNGLGENRENDERBUFFERSPROC glad_glGenRenderbuffers = NULL; +PFNGLGENSAMPLERSPROC glad_glGenSamplers = NULL; +PFNGLGENTEXTURESPROC glad_glGenTextures = NULL; +PFNGLGENTRANSFORMFEEDBACKSPROC glad_glGenTransformFeedbacks = NULL; +PFNGLGENVERTEXARRAYSPROC glad_glGenVertexArrays = NULL; +PFNGLGENERATEMIPMAPPROC glad_glGenerateMipmap = NULL; +PFNGLGENERATETEXTUREMIPMAPPROC glad_glGenerateTextureMipmap = NULL; +PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC glad_glGetActiveAtomicCounterBufferiv = NULL; +PFNGLGETACTIVEATTRIBPROC glad_glGetActiveAttrib = NULL; +PFNGLGETACTIVESUBROUTINENAMEPROC glad_glGetActiveSubroutineName = NULL; +PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC glad_glGetActiveSubroutineUniformName = NULL; +PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC glad_glGetActiveSubroutineUniformiv = NULL; +PFNGLGETACTIVEUNIFORMPROC glad_glGetActiveUniform = NULL; +PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glad_glGetActiveUniformBlockName = NULL; +PFNGLGETACTIVEUNIFORMBLOCKIVPROC glad_glGetActiveUniformBlockiv = NULL; +PFNGLGETACTIVEUNIFORMNAMEPROC glad_glGetActiveUniformName = NULL; +PFNGLGETACTIVEUNIFORMSIVPROC glad_glGetActiveUniformsiv = NULL; +PFNGLGETATTACHEDSHADERSPROC glad_glGetAttachedShaders = NULL; +PFNGLGETATTRIBLOCATIONPROC glad_glGetAttribLocation = NULL; +PFNGLGETBOOLEANI_VPROC glad_glGetBooleani_v = NULL; +PFNGLGETBOOLEANVPROC glad_glGetBooleanv = NULL; +PFNGLGETBUFFERPARAMETERI64VPROC glad_glGetBufferParameteri64v = NULL; +PFNGLGETBUFFERPARAMETERIVPROC glad_glGetBufferParameteriv = NULL; +PFNGLGETBUFFERPOINTERVPROC glad_glGetBufferPointerv = NULL; +PFNGLGETBUFFERSUBDATAPROC glad_glGetBufferSubData = NULL; +PFNGLGETCOMPRESSEDTEXIMAGEPROC glad_glGetCompressedTexImage = NULL; +PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC glad_glGetCompressedTextureImage = NULL; +PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC glad_glGetCompressedTextureSubImage = NULL; +PFNGLGETDEBUGMESSAGELOGPROC glad_glGetDebugMessageLog = NULL; +PFNGLGETDOUBLEI_VPROC glad_glGetDoublei_v = NULL; +PFNGLGETDOUBLEVPROC glad_glGetDoublev = NULL; +PFNGLGETERRORPROC glad_glGetError = NULL; +PFNGLGETFLOATI_VPROC glad_glGetFloati_v = NULL; +PFNGLGETFLOATVPROC glad_glGetFloatv = NULL; +PFNGLGETFRAGDATAINDEXPROC glad_glGetFragDataIndex = NULL; +PFNGLGETFRAGDATALOCATIONPROC glad_glGetFragDataLocation = NULL; +PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glad_glGetFramebufferAttachmentParameteriv = NULL; +PFNGLGETFRAMEBUFFERPARAMETERIVPROC glad_glGetFramebufferParameteriv = NULL; +PFNGLGETGRAPHICSRESETSTATUSPROC glad_glGetGraphicsResetStatus = NULL; +PFNGLGETINTEGER64I_VPROC glad_glGetInteger64i_v = NULL; +PFNGLGETINTEGER64VPROC glad_glGetInteger64v = NULL; +PFNGLGETINTEGERI_VPROC glad_glGetIntegeri_v = NULL; +PFNGLGETINTEGERVPROC glad_glGetIntegerv = NULL; +PFNGLGETINTERNALFORMATI64VPROC glad_glGetInternalformati64v = NULL; +PFNGLGETINTERNALFORMATIVPROC glad_glGetInternalformativ = NULL; +PFNGLGETMULTISAMPLEFVPROC glad_glGetMultisamplefv = NULL; +PFNGLGETNAMEDBUFFERPARAMETERI64VPROC glad_glGetNamedBufferParameteri64v = NULL; +PFNGLGETNAMEDBUFFERPARAMETERIVPROC glad_glGetNamedBufferParameteriv = NULL; +PFNGLGETNAMEDBUFFERPOINTERVPROC glad_glGetNamedBufferPointerv = NULL; +PFNGLGETNAMEDBUFFERSUBDATAPROC glad_glGetNamedBufferSubData = NULL; +PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC glad_glGetNamedFramebufferAttachmentParameteriv = NULL; +PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC glad_glGetNamedFramebufferParameteriv = NULL; +PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC glad_glGetNamedRenderbufferParameteriv = NULL; +PFNGLGETOBJECTLABELPROC glad_glGetObjectLabel = NULL; +PFNGLGETOBJECTPTRLABELPROC glad_glGetObjectPtrLabel = NULL; +PFNGLGETPOINTERVPROC glad_glGetPointerv = NULL; +PFNGLGETPROGRAMBINARYPROC glad_glGetProgramBinary = NULL; +PFNGLGETPROGRAMINFOLOGPROC glad_glGetProgramInfoLog = NULL; +PFNGLGETPROGRAMINTERFACEIVPROC glad_glGetProgramInterfaceiv = NULL; +PFNGLGETPROGRAMPIPELINEINFOLOGPROC glad_glGetProgramPipelineInfoLog = NULL; +PFNGLGETPROGRAMPIPELINEIVPROC glad_glGetProgramPipelineiv = NULL; +PFNGLGETPROGRAMRESOURCEINDEXPROC glad_glGetProgramResourceIndex = NULL; +PFNGLGETPROGRAMRESOURCELOCATIONPROC glad_glGetProgramResourceLocation = NULL; +PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC glad_glGetProgramResourceLocationIndex = NULL; +PFNGLGETPROGRAMRESOURCENAMEPROC glad_glGetProgramResourceName = NULL; +PFNGLGETPROGRAMRESOURCEIVPROC glad_glGetProgramResourceiv = NULL; +PFNGLGETPROGRAMSTAGEIVPROC glad_glGetProgramStageiv = NULL; +PFNGLGETPROGRAMIVPROC glad_glGetProgramiv = NULL; +PFNGLGETQUERYBUFFEROBJECTI64VPROC glad_glGetQueryBufferObjecti64v = NULL; +PFNGLGETQUERYBUFFEROBJECTIVPROC glad_glGetQueryBufferObjectiv = NULL; +PFNGLGETQUERYBUFFEROBJECTUI64VPROC glad_glGetQueryBufferObjectui64v = NULL; +PFNGLGETQUERYBUFFEROBJECTUIVPROC glad_glGetQueryBufferObjectuiv = NULL; +PFNGLGETQUERYINDEXEDIVPROC glad_glGetQueryIndexediv = NULL; +PFNGLGETQUERYOBJECTI64VPROC glad_glGetQueryObjecti64v = NULL; +PFNGLGETQUERYOBJECTIVPROC glad_glGetQueryObjectiv = NULL; +PFNGLGETQUERYOBJECTUI64VPROC glad_glGetQueryObjectui64v = NULL; +PFNGLGETQUERYOBJECTUIVPROC glad_glGetQueryObjectuiv = NULL; +PFNGLGETQUERYIVPROC glad_glGetQueryiv = NULL; +PFNGLGETRENDERBUFFERPARAMETERIVPROC glad_glGetRenderbufferParameteriv = NULL; +PFNGLGETSAMPLERPARAMETERIIVPROC glad_glGetSamplerParameterIiv = NULL; +PFNGLGETSAMPLERPARAMETERIUIVPROC glad_glGetSamplerParameterIuiv = NULL; +PFNGLGETSAMPLERPARAMETERFVPROC glad_glGetSamplerParameterfv = NULL; +PFNGLGETSAMPLERPARAMETERIVPROC glad_glGetSamplerParameteriv = NULL; +PFNGLGETSHADERINFOLOGPROC glad_glGetShaderInfoLog = NULL; +PFNGLGETSHADERPRECISIONFORMATPROC glad_glGetShaderPrecisionFormat = NULL; +PFNGLGETSHADERSOURCEPROC glad_glGetShaderSource = NULL; +PFNGLGETSHADERIVPROC glad_glGetShaderiv = NULL; +PFNGLGETSTRINGPROC glad_glGetString = NULL; +PFNGLGETSTRINGIPROC glad_glGetStringi = NULL; +PFNGLGETSUBROUTINEINDEXPROC glad_glGetSubroutineIndex = NULL; +PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC glad_glGetSubroutineUniformLocation = NULL; +PFNGLGETSYNCIVPROC glad_glGetSynciv = NULL; +PFNGLGETTEXIMAGEPROC glad_glGetTexImage = NULL; +PFNGLGETTEXLEVELPARAMETERFVPROC glad_glGetTexLevelParameterfv = NULL; +PFNGLGETTEXLEVELPARAMETERIVPROC glad_glGetTexLevelParameteriv = NULL; +PFNGLGETTEXPARAMETERIIVPROC glad_glGetTexParameterIiv = NULL; +PFNGLGETTEXPARAMETERIUIVPROC glad_glGetTexParameterIuiv = NULL; +PFNGLGETTEXPARAMETERFVPROC glad_glGetTexParameterfv = NULL; +PFNGLGETTEXPARAMETERIVPROC glad_glGetTexParameteriv = NULL; +PFNGLGETTEXTUREIMAGEPROC glad_glGetTextureImage = NULL; +PFNGLGETTEXTURELEVELPARAMETERFVPROC glad_glGetTextureLevelParameterfv = NULL; +PFNGLGETTEXTURELEVELPARAMETERIVPROC glad_glGetTextureLevelParameteriv = NULL; +PFNGLGETTEXTUREPARAMETERIIVPROC glad_glGetTextureParameterIiv = NULL; +PFNGLGETTEXTUREPARAMETERIUIVPROC glad_glGetTextureParameterIuiv = NULL; +PFNGLGETTEXTUREPARAMETERFVPROC glad_glGetTextureParameterfv = NULL; +PFNGLGETTEXTUREPARAMETERIVPROC glad_glGetTextureParameteriv = NULL; +PFNGLGETTEXTURESUBIMAGEPROC glad_glGetTextureSubImage = NULL; +PFNGLGETTRANSFORMFEEDBACKVARYINGPROC glad_glGetTransformFeedbackVarying = NULL; +PFNGLGETTRANSFORMFEEDBACKI64_VPROC glad_glGetTransformFeedbacki64_v = NULL; +PFNGLGETTRANSFORMFEEDBACKI_VPROC glad_glGetTransformFeedbacki_v = NULL; +PFNGLGETTRANSFORMFEEDBACKIVPROC glad_glGetTransformFeedbackiv = NULL; +PFNGLGETUNIFORMBLOCKINDEXPROC glad_glGetUniformBlockIndex = NULL; +PFNGLGETUNIFORMINDICESPROC glad_glGetUniformIndices = NULL; +PFNGLGETUNIFORMLOCATIONPROC glad_glGetUniformLocation = NULL; +PFNGLGETUNIFORMSUBROUTINEUIVPROC glad_glGetUniformSubroutineuiv = NULL; +PFNGLGETUNIFORMDVPROC glad_glGetUniformdv = NULL; +PFNGLGETUNIFORMFVPROC glad_glGetUniformfv = NULL; +PFNGLGETUNIFORMIVPROC glad_glGetUniformiv = NULL; +PFNGLGETUNIFORMUIVPROC glad_glGetUniformuiv = NULL; +PFNGLGETVERTEXARRAYINDEXED64IVPROC glad_glGetVertexArrayIndexed64iv = NULL; +PFNGLGETVERTEXARRAYINDEXEDIVPROC glad_glGetVertexArrayIndexediv = NULL; +PFNGLGETVERTEXARRAYIVPROC glad_glGetVertexArrayiv = NULL; +PFNGLGETVERTEXATTRIBIIVPROC glad_glGetVertexAttribIiv = NULL; +PFNGLGETVERTEXATTRIBIUIVPROC glad_glGetVertexAttribIuiv = NULL; +PFNGLGETVERTEXATTRIBLDVPROC glad_glGetVertexAttribLdv = NULL; +PFNGLGETVERTEXATTRIBPOINTERVPROC glad_glGetVertexAttribPointerv = NULL; +PFNGLGETVERTEXATTRIBDVPROC glad_glGetVertexAttribdv = NULL; +PFNGLGETVERTEXATTRIBFVPROC glad_glGetVertexAttribfv = NULL; +PFNGLGETVERTEXATTRIBIVPROC glad_glGetVertexAttribiv = NULL; +PFNGLGETNCOLORTABLEPROC glad_glGetnColorTable = NULL; +PFNGLGETNCOMPRESSEDTEXIMAGEPROC glad_glGetnCompressedTexImage = NULL; +PFNGLGETNCONVOLUTIONFILTERPROC glad_glGetnConvolutionFilter = NULL; +PFNGLGETNHISTOGRAMPROC glad_glGetnHistogram = NULL; +PFNGLGETNMAPDVPROC glad_glGetnMapdv = NULL; +PFNGLGETNMAPFVPROC glad_glGetnMapfv = NULL; +PFNGLGETNMAPIVPROC glad_glGetnMapiv = NULL; +PFNGLGETNMINMAXPROC glad_glGetnMinmax = NULL; +PFNGLGETNPIXELMAPFVPROC glad_glGetnPixelMapfv = NULL; +PFNGLGETNPIXELMAPUIVPROC glad_glGetnPixelMapuiv = NULL; +PFNGLGETNPIXELMAPUSVPROC glad_glGetnPixelMapusv = NULL; +PFNGLGETNPOLYGONSTIPPLEPROC glad_glGetnPolygonStipple = NULL; +PFNGLGETNSEPARABLEFILTERPROC glad_glGetnSeparableFilter = NULL; +PFNGLGETNTEXIMAGEPROC glad_glGetnTexImage = NULL; +PFNGLGETNUNIFORMDVPROC glad_glGetnUniformdv = NULL; +PFNGLGETNUNIFORMFVPROC glad_glGetnUniformfv = NULL; +PFNGLGETNUNIFORMIVPROC glad_glGetnUniformiv = NULL; +PFNGLGETNUNIFORMUIVPROC glad_glGetnUniformuiv = NULL; +PFNGLHINTPROC glad_glHint = NULL; +PFNGLINVALIDATEBUFFERDATAPROC glad_glInvalidateBufferData = NULL; +PFNGLINVALIDATEBUFFERSUBDATAPROC glad_glInvalidateBufferSubData = NULL; +PFNGLINVALIDATEFRAMEBUFFERPROC glad_glInvalidateFramebuffer = NULL; +PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC glad_glInvalidateNamedFramebufferData = NULL; +PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC glad_glInvalidateNamedFramebufferSubData = NULL; +PFNGLINVALIDATESUBFRAMEBUFFERPROC glad_glInvalidateSubFramebuffer = NULL; +PFNGLINVALIDATETEXIMAGEPROC glad_glInvalidateTexImage = NULL; +PFNGLINVALIDATETEXSUBIMAGEPROC glad_glInvalidateTexSubImage = NULL; +PFNGLISBUFFERPROC glad_glIsBuffer = NULL; +PFNGLISENABLEDPROC glad_glIsEnabled = NULL; +PFNGLISENABLEDIPROC glad_glIsEnabledi = NULL; +PFNGLISFRAMEBUFFERPROC glad_glIsFramebuffer = NULL; +PFNGLISPROGRAMPROC glad_glIsProgram = NULL; +PFNGLISPROGRAMPIPELINEPROC glad_glIsProgramPipeline = NULL; +PFNGLISQUERYPROC glad_glIsQuery = NULL; +PFNGLISRENDERBUFFERPROC glad_glIsRenderbuffer = NULL; +PFNGLISSAMPLERPROC glad_glIsSampler = NULL; +PFNGLISSHADERPROC glad_glIsShader = NULL; +PFNGLISSYNCPROC glad_glIsSync = NULL; +PFNGLISTEXTUREPROC glad_glIsTexture = NULL; +PFNGLISTRANSFORMFEEDBACKPROC glad_glIsTransformFeedback = NULL; +PFNGLISVERTEXARRAYPROC glad_glIsVertexArray = NULL; +PFNGLLINEWIDTHPROC glad_glLineWidth = NULL; +PFNGLLINKPROGRAMPROC glad_glLinkProgram = NULL; +PFNGLLOGICOPPROC glad_glLogicOp = NULL; +PFNGLMAPBUFFERPROC glad_glMapBuffer = NULL; +PFNGLMAPBUFFERRANGEPROC glad_glMapBufferRange = NULL; +PFNGLMAPNAMEDBUFFERPROC glad_glMapNamedBuffer = NULL; +PFNGLMAPNAMEDBUFFERRANGEPROC glad_glMapNamedBufferRange = NULL; +PFNGLMEMORYBARRIERPROC glad_glMemoryBarrier = NULL; +PFNGLMEMORYBARRIERBYREGIONPROC glad_glMemoryBarrierByRegion = NULL; +PFNGLMINSAMPLESHADINGPROC glad_glMinSampleShading = NULL; +PFNGLMULTIDRAWARRAYSPROC glad_glMultiDrawArrays = NULL; +PFNGLMULTIDRAWARRAYSINDIRECTPROC glad_glMultiDrawArraysIndirect = NULL; +PFNGLMULTIDRAWELEMENTSPROC glad_glMultiDrawElements = NULL; +PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC glad_glMultiDrawElementsBaseVertex = NULL; +PFNGLMULTIDRAWELEMENTSINDIRECTPROC glad_glMultiDrawElementsIndirect = NULL; +PFNGLMULTITEXCOORDP1UIPROC glad_glMultiTexCoordP1ui = NULL; +PFNGLMULTITEXCOORDP1UIVPROC glad_glMultiTexCoordP1uiv = NULL; +PFNGLMULTITEXCOORDP2UIPROC glad_glMultiTexCoordP2ui = NULL; +PFNGLMULTITEXCOORDP2UIVPROC glad_glMultiTexCoordP2uiv = NULL; +PFNGLMULTITEXCOORDP3UIPROC glad_glMultiTexCoordP3ui = NULL; +PFNGLMULTITEXCOORDP3UIVPROC glad_glMultiTexCoordP3uiv = NULL; +PFNGLMULTITEXCOORDP4UIPROC glad_glMultiTexCoordP4ui = NULL; +PFNGLMULTITEXCOORDP4UIVPROC glad_glMultiTexCoordP4uiv = NULL; +PFNGLNAMEDBUFFERDATAPROC glad_glNamedBufferData = NULL; +PFNGLNAMEDBUFFERSTORAGEPROC glad_glNamedBufferStorage = NULL; +PFNGLNAMEDBUFFERSUBDATAPROC glad_glNamedBufferSubData = NULL; +PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC glad_glNamedFramebufferDrawBuffer = NULL; +PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC glad_glNamedFramebufferDrawBuffers = NULL; +PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC glad_glNamedFramebufferParameteri = NULL; +PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC glad_glNamedFramebufferReadBuffer = NULL; +PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC glad_glNamedFramebufferRenderbuffer = NULL; +PFNGLNAMEDFRAMEBUFFERTEXTUREPROC glad_glNamedFramebufferTexture = NULL; +PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC glad_glNamedFramebufferTextureLayer = NULL; +PFNGLNAMEDRENDERBUFFERSTORAGEPROC glad_glNamedRenderbufferStorage = NULL; +PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC glad_glNamedRenderbufferStorageMultisample = NULL; +PFNGLNORMALP3UIPROC glad_glNormalP3ui = NULL; +PFNGLNORMALP3UIVPROC glad_glNormalP3uiv = NULL; +PFNGLOBJECTLABELPROC glad_glObjectLabel = NULL; +PFNGLOBJECTPTRLABELPROC glad_glObjectPtrLabel = NULL; +PFNGLPATCHPARAMETERFVPROC glad_glPatchParameterfv = NULL; +PFNGLPATCHPARAMETERIPROC glad_glPatchParameteri = NULL; +PFNGLPAUSETRANSFORMFEEDBACKPROC glad_glPauseTransformFeedback = NULL; +PFNGLPIXELSTOREFPROC glad_glPixelStoref = NULL; +PFNGLPIXELSTOREIPROC glad_glPixelStorei = NULL; +PFNGLPOINTPARAMETERFPROC glad_glPointParameterf = NULL; +PFNGLPOINTPARAMETERFVPROC glad_glPointParameterfv = NULL; +PFNGLPOINTPARAMETERIPROC glad_glPointParameteri = NULL; +PFNGLPOINTPARAMETERIVPROC glad_glPointParameteriv = NULL; +PFNGLPOINTSIZEPROC glad_glPointSize = NULL; +PFNGLPOLYGONMODEPROC glad_glPolygonMode = NULL; +PFNGLPOLYGONOFFSETPROC glad_glPolygonOffset = NULL; +PFNGLPOPDEBUGGROUPPROC glad_glPopDebugGroup = NULL; +PFNGLPRIMITIVERESTARTINDEXPROC glad_glPrimitiveRestartIndex = NULL; +PFNGLPROGRAMBINARYPROC glad_glProgramBinary = NULL; +PFNGLPROGRAMPARAMETERIPROC glad_glProgramParameteri = NULL; +PFNGLPROGRAMUNIFORM1DPROC glad_glProgramUniform1d = NULL; +PFNGLPROGRAMUNIFORM1DVPROC glad_glProgramUniform1dv = NULL; +PFNGLPROGRAMUNIFORM1FPROC glad_glProgramUniform1f = NULL; +PFNGLPROGRAMUNIFORM1FVPROC glad_glProgramUniform1fv = NULL; +PFNGLPROGRAMUNIFORM1IPROC glad_glProgramUniform1i = NULL; +PFNGLPROGRAMUNIFORM1IVPROC glad_glProgramUniform1iv = NULL; +PFNGLPROGRAMUNIFORM1UIPROC glad_glProgramUniform1ui = NULL; +PFNGLPROGRAMUNIFORM1UIVPROC glad_glProgramUniform1uiv = NULL; +PFNGLPROGRAMUNIFORM2DPROC glad_glProgramUniform2d = NULL; +PFNGLPROGRAMUNIFORM2DVPROC glad_glProgramUniform2dv = NULL; +PFNGLPROGRAMUNIFORM2FPROC glad_glProgramUniform2f = NULL; +PFNGLPROGRAMUNIFORM2FVPROC glad_glProgramUniform2fv = NULL; +PFNGLPROGRAMUNIFORM2IPROC glad_glProgramUniform2i = NULL; +PFNGLPROGRAMUNIFORM2IVPROC glad_glProgramUniform2iv = NULL; +PFNGLPROGRAMUNIFORM2UIPROC glad_glProgramUniform2ui = NULL; +PFNGLPROGRAMUNIFORM2UIVPROC glad_glProgramUniform2uiv = NULL; +PFNGLPROGRAMUNIFORM3DPROC glad_glProgramUniform3d = NULL; +PFNGLPROGRAMUNIFORM3DVPROC glad_glProgramUniform3dv = NULL; +PFNGLPROGRAMUNIFORM3FPROC glad_glProgramUniform3f = NULL; +PFNGLPROGRAMUNIFORM3FVPROC glad_glProgramUniform3fv = NULL; +PFNGLPROGRAMUNIFORM3IPROC glad_glProgramUniform3i = NULL; +PFNGLPROGRAMUNIFORM3IVPROC glad_glProgramUniform3iv = NULL; +PFNGLPROGRAMUNIFORM3UIPROC glad_glProgramUniform3ui = NULL; +PFNGLPROGRAMUNIFORM3UIVPROC glad_glProgramUniform3uiv = NULL; +PFNGLPROGRAMUNIFORM4DPROC glad_glProgramUniform4d = NULL; +PFNGLPROGRAMUNIFORM4DVPROC glad_glProgramUniform4dv = NULL; +PFNGLPROGRAMUNIFORM4FPROC glad_glProgramUniform4f = NULL; +PFNGLPROGRAMUNIFORM4FVPROC glad_glProgramUniform4fv = NULL; +PFNGLPROGRAMUNIFORM4IPROC glad_glProgramUniform4i = NULL; +PFNGLPROGRAMUNIFORM4IVPROC glad_glProgramUniform4iv = NULL; +PFNGLPROGRAMUNIFORM4UIPROC glad_glProgramUniform4ui = NULL; +PFNGLPROGRAMUNIFORM4UIVPROC glad_glProgramUniform4uiv = NULL; +PFNGLPROGRAMUNIFORMMATRIX2DVPROC glad_glProgramUniformMatrix2dv = NULL; +PFNGLPROGRAMUNIFORMMATRIX2FVPROC glad_glProgramUniformMatrix2fv = NULL; +PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC glad_glProgramUniformMatrix2x3dv = NULL; +PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC glad_glProgramUniformMatrix2x3fv = NULL; +PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC glad_glProgramUniformMatrix2x4dv = NULL; +PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC glad_glProgramUniformMatrix2x4fv = NULL; +PFNGLPROGRAMUNIFORMMATRIX3DVPROC glad_glProgramUniformMatrix3dv = NULL; +PFNGLPROGRAMUNIFORMMATRIX3FVPROC glad_glProgramUniformMatrix3fv = NULL; +PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC glad_glProgramUniformMatrix3x2dv = NULL; +PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC glad_glProgramUniformMatrix3x2fv = NULL; +PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC glad_glProgramUniformMatrix3x4dv = NULL; +PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC glad_glProgramUniformMatrix3x4fv = NULL; +PFNGLPROGRAMUNIFORMMATRIX4DVPROC glad_glProgramUniformMatrix4dv = NULL; +PFNGLPROGRAMUNIFORMMATRIX4FVPROC glad_glProgramUniformMatrix4fv = NULL; +PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC glad_glProgramUniformMatrix4x2dv = NULL; +PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC glad_glProgramUniformMatrix4x2fv = NULL; +PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC glad_glProgramUniformMatrix4x3dv = NULL; +PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC glad_glProgramUniformMatrix4x3fv = NULL; +PFNGLPROVOKINGVERTEXPROC glad_glProvokingVertex = NULL; +PFNGLPUSHDEBUGGROUPPROC glad_glPushDebugGroup = NULL; +PFNGLQUERYCOUNTERPROC glad_glQueryCounter = NULL; +PFNGLREADBUFFERPROC glad_glReadBuffer = NULL; +PFNGLREADPIXELSPROC glad_glReadPixels = NULL; +PFNGLREADNPIXELSPROC glad_glReadnPixels = NULL; +PFNGLRELEASESHADERCOMPILERPROC glad_glReleaseShaderCompiler = NULL; +PFNGLRENDERBUFFERSTORAGEPROC glad_glRenderbufferStorage = NULL; +PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glad_glRenderbufferStorageMultisample = NULL; +PFNGLRESUMETRANSFORMFEEDBACKPROC glad_glResumeTransformFeedback = NULL; +PFNGLSAMPLECOVERAGEPROC glad_glSampleCoverage = NULL; +PFNGLSAMPLEMASKIPROC glad_glSampleMaski = NULL; +PFNGLSAMPLERPARAMETERIIVPROC glad_glSamplerParameterIiv = NULL; +PFNGLSAMPLERPARAMETERIUIVPROC glad_glSamplerParameterIuiv = NULL; +PFNGLSAMPLERPARAMETERFPROC glad_glSamplerParameterf = NULL; +PFNGLSAMPLERPARAMETERFVPROC glad_glSamplerParameterfv = NULL; +PFNGLSAMPLERPARAMETERIPROC glad_glSamplerParameteri = NULL; +PFNGLSAMPLERPARAMETERIVPROC glad_glSamplerParameteriv = NULL; +PFNGLSCISSORPROC glad_glScissor = NULL; +PFNGLSCISSORARRAYVPROC glad_glScissorArrayv = NULL; +PFNGLSCISSORINDEXEDPROC glad_glScissorIndexed = NULL; +PFNGLSCISSORINDEXEDVPROC glad_glScissorIndexedv = NULL; +PFNGLSECONDARYCOLORP3UIPROC glad_glSecondaryColorP3ui = NULL; +PFNGLSECONDARYCOLORP3UIVPROC glad_glSecondaryColorP3uiv = NULL; +PFNGLSHADERBINARYPROC glad_glShaderBinary = NULL; +PFNGLSHADERSOURCEPROC glad_glShaderSource = NULL; +PFNGLSHADERSTORAGEBLOCKBINDINGPROC glad_glShaderStorageBlockBinding = NULL; +PFNGLSTENCILFUNCPROC glad_glStencilFunc = NULL; +PFNGLSTENCILFUNCSEPARATEPROC glad_glStencilFuncSeparate = NULL; +PFNGLSTENCILMASKPROC glad_glStencilMask = NULL; +PFNGLSTENCILMASKSEPARATEPROC glad_glStencilMaskSeparate = NULL; +PFNGLSTENCILOPPROC glad_glStencilOp = NULL; +PFNGLSTENCILOPSEPARATEPROC glad_glStencilOpSeparate = NULL; +PFNGLTEXBUFFERPROC glad_glTexBuffer = NULL; +PFNGLTEXBUFFERRANGEPROC glad_glTexBufferRange = NULL; +PFNGLTEXCOORDP1UIPROC glad_glTexCoordP1ui = NULL; +PFNGLTEXCOORDP1UIVPROC glad_glTexCoordP1uiv = NULL; +PFNGLTEXCOORDP2UIPROC glad_glTexCoordP2ui = NULL; +PFNGLTEXCOORDP2UIVPROC glad_glTexCoordP2uiv = NULL; +PFNGLTEXCOORDP3UIPROC glad_glTexCoordP3ui = NULL; +PFNGLTEXCOORDP3UIVPROC glad_glTexCoordP3uiv = NULL; +PFNGLTEXCOORDP4UIPROC glad_glTexCoordP4ui = NULL; +PFNGLTEXCOORDP4UIVPROC glad_glTexCoordP4uiv = NULL; +PFNGLTEXIMAGE1DPROC glad_glTexImage1D = NULL; +PFNGLTEXIMAGE2DPROC glad_glTexImage2D = NULL; +PFNGLTEXIMAGE2DMULTISAMPLEPROC glad_glTexImage2DMultisample = NULL; +PFNGLTEXIMAGE3DPROC glad_glTexImage3D = NULL; +PFNGLTEXIMAGE3DMULTISAMPLEPROC glad_glTexImage3DMultisample = NULL; +PFNGLTEXPARAMETERIIVPROC glad_glTexParameterIiv = NULL; +PFNGLTEXPARAMETERIUIVPROC glad_glTexParameterIuiv = NULL; +PFNGLTEXPARAMETERFPROC glad_glTexParameterf = NULL; +PFNGLTEXPARAMETERFVPROC glad_glTexParameterfv = NULL; +PFNGLTEXPARAMETERIPROC glad_glTexParameteri = NULL; +PFNGLTEXPARAMETERIVPROC glad_glTexParameteriv = NULL; +PFNGLTEXSTORAGE1DPROC glad_glTexStorage1D = NULL; +PFNGLTEXSTORAGE2DPROC glad_glTexStorage2D = NULL; +PFNGLTEXSTORAGE2DMULTISAMPLEPROC glad_glTexStorage2DMultisample = NULL; +PFNGLTEXSTORAGE3DPROC glad_glTexStorage3D = NULL; +PFNGLTEXSTORAGE3DMULTISAMPLEPROC glad_glTexStorage3DMultisample = NULL; +PFNGLTEXSUBIMAGE1DPROC glad_glTexSubImage1D = NULL; +PFNGLTEXSUBIMAGE2DPROC glad_glTexSubImage2D = NULL; +PFNGLTEXSUBIMAGE3DPROC glad_glTexSubImage3D = NULL; +PFNGLTEXTUREBARRIERPROC glad_glTextureBarrier = NULL; +PFNGLTEXTUREBUFFERPROC glad_glTextureBuffer = NULL; +PFNGLTEXTUREBUFFERRANGEPROC glad_glTextureBufferRange = NULL; +PFNGLTEXTUREPARAMETERIIVPROC glad_glTextureParameterIiv = NULL; +PFNGLTEXTUREPARAMETERIUIVPROC glad_glTextureParameterIuiv = NULL; +PFNGLTEXTUREPARAMETERFPROC glad_glTextureParameterf = NULL; +PFNGLTEXTUREPARAMETERFVPROC glad_glTextureParameterfv = NULL; +PFNGLTEXTUREPARAMETERIPROC glad_glTextureParameteri = NULL; +PFNGLTEXTUREPARAMETERIVPROC glad_glTextureParameteriv = NULL; +PFNGLTEXTURESTORAGE1DPROC glad_glTextureStorage1D = NULL; +PFNGLTEXTURESTORAGE2DPROC glad_glTextureStorage2D = NULL; +PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC glad_glTextureStorage2DMultisample = NULL; +PFNGLTEXTURESTORAGE3DPROC glad_glTextureStorage3D = NULL; +PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC glad_glTextureStorage3DMultisample = NULL; +PFNGLTEXTURESUBIMAGE1DPROC glad_glTextureSubImage1D = NULL; +PFNGLTEXTURESUBIMAGE2DPROC glad_glTextureSubImage2D = NULL; +PFNGLTEXTURESUBIMAGE3DPROC glad_glTextureSubImage3D = NULL; +PFNGLTEXTUREVIEWPROC glad_glTextureView = NULL; +PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC glad_glTransformFeedbackBufferBase = NULL; +PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC glad_glTransformFeedbackBufferRange = NULL; +PFNGLTRANSFORMFEEDBACKVARYINGSPROC glad_glTransformFeedbackVaryings = NULL; +PFNGLUNIFORM1DPROC glad_glUniform1d = NULL; +PFNGLUNIFORM1DVPROC glad_glUniform1dv = NULL; +PFNGLUNIFORM1FPROC glad_glUniform1f = NULL; +PFNGLUNIFORM1FVPROC glad_glUniform1fv = NULL; +PFNGLUNIFORM1IPROC glad_glUniform1i = NULL; +PFNGLUNIFORM1IVPROC glad_glUniform1iv = NULL; +PFNGLUNIFORM1UIPROC glad_glUniform1ui = NULL; +PFNGLUNIFORM1UIVPROC glad_glUniform1uiv = NULL; +PFNGLUNIFORM2DPROC glad_glUniform2d = NULL; +PFNGLUNIFORM2DVPROC glad_glUniform2dv = NULL; +PFNGLUNIFORM2FPROC glad_glUniform2f = NULL; +PFNGLUNIFORM2FVPROC glad_glUniform2fv = NULL; +PFNGLUNIFORM2IPROC glad_glUniform2i = NULL; +PFNGLUNIFORM2IVPROC glad_glUniform2iv = NULL; +PFNGLUNIFORM2UIPROC glad_glUniform2ui = NULL; +PFNGLUNIFORM2UIVPROC glad_glUniform2uiv = NULL; +PFNGLUNIFORM3DPROC glad_glUniform3d = NULL; +PFNGLUNIFORM3DVPROC glad_glUniform3dv = NULL; +PFNGLUNIFORM3FPROC glad_glUniform3f = NULL; +PFNGLUNIFORM3FVPROC glad_glUniform3fv = NULL; +PFNGLUNIFORM3IPROC glad_glUniform3i = NULL; +PFNGLUNIFORM3IVPROC glad_glUniform3iv = NULL; +PFNGLUNIFORM3UIPROC glad_glUniform3ui = NULL; +PFNGLUNIFORM3UIVPROC glad_glUniform3uiv = NULL; +PFNGLUNIFORM4DPROC glad_glUniform4d = NULL; +PFNGLUNIFORM4DVPROC glad_glUniform4dv = NULL; +PFNGLUNIFORM4FPROC glad_glUniform4f = NULL; +PFNGLUNIFORM4FVPROC glad_glUniform4fv = NULL; +PFNGLUNIFORM4IPROC glad_glUniform4i = NULL; +PFNGLUNIFORM4IVPROC glad_glUniform4iv = NULL; +PFNGLUNIFORM4UIPROC glad_glUniform4ui = NULL; +PFNGLUNIFORM4UIVPROC glad_glUniform4uiv = NULL; +PFNGLUNIFORMBLOCKBINDINGPROC glad_glUniformBlockBinding = NULL; +PFNGLUNIFORMMATRIX2DVPROC glad_glUniformMatrix2dv = NULL; +PFNGLUNIFORMMATRIX2FVPROC glad_glUniformMatrix2fv = NULL; +PFNGLUNIFORMMATRIX2X3DVPROC glad_glUniformMatrix2x3dv = NULL; +PFNGLUNIFORMMATRIX2X3FVPROC glad_glUniformMatrix2x3fv = NULL; +PFNGLUNIFORMMATRIX2X4DVPROC glad_glUniformMatrix2x4dv = NULL; +PFNGLUNIFORMMATRIX2X4FVPROC glad_glUniformMatrix2x4fv = NULL; +PFNGLUNIFORMMATRIX3DVPROC glad_glUniformMatrix3dv = NULL; +PFNGLUNIFORMMATRIX3FVPROC glad_glUniformMatrix3fv = NULL; +PFNGLUNIFORMMATRIX3X2DVPROC glad_glUniformMatrix3x2dv = NULL; +PFNGLUNIFORMMATRIX3X2FVPROC glad_glUniformMatrix3x2fv = NULL; +PFNGLUNIFORMMATRIX3X4DVPROC glad_glUniformMatrix3x4dv = NULL; +PFNGLUNIFORMMATRIX3X4FVPROC glad_glUniformMatrix3x4fv = NULL; +PFNGLUNIFORMMATRIX4DVPROC glad_glUniformMatrix4dv = NULL; +PFNGLUNIFORMMATRIX4FVPROC glad_glUniformMatrix4fv = NULL; +PFNGLUNIFORMMATRIX4X2DVPROC glad_glUniformMatrix4x2dv = NULL; +PFNGLUNIFORMMATRIX4X2FVPROC glad_glUniformMatrix4x2fv = NULL; +PFNGLUNIFORMMATRIX4X3DVPROC glad_glUniformMatrix4x3dv = NULL; +PFNGLUNIFORMMATRIX4X3FVPROC glad_glUniformMatrix4x3fv = NULL; +PFNGLUNIFORMSUBROUTINESUIVPROC glad_glUniformSubroutinesuiv = NULL; +PFNGLUNMAPBUFFERPROC glad_glUnmapBuffer = NULL; +PFNGLUNMAPNAMEDBUFFERPROC glad_glUnmapNamedBuffer = NULL; +PFNGLUSEPROGRAMPROC glad_glUseProgram = NULL; +PFNGLUSEPROGRAMSTAGESPROC glad_glUseProgramStages = NULL; +PFNGLVALIDATEPROGRAMPROC glad_glValidateProgram = NULL; +PFNGLVALIDATEPROGRAMPIPELINEPROC glad_glValidateProgramPipeline = NULL; +PFNGLVERTEXARRAYATTRIBBINDINGPROC glad_glVertexArrayAttribBinding = NULL; +PFNGLVERTEXARRAYATTRIBFORMATPROC glad_glVertexArrayAttribFormat = NULL; +PFNGLVERTEXARRAYATTRIBIFORMATPROC glad_glVertexArrayAttribIFormat = NULL; +PFNGLVERTEXARRAYATTRIBLFORMATPROC glad_glVertexArrayAttribLFormat = NULL; +PFNGLVERTEXARRAYBINDINGDIVISORPROC glad_glVertexArrayBindingDivisor = NULL; +PFNGLVERTEXARRAYELEMENTBUFFERPROC glad_glVertexArrayElementBuffer = NULL; +PFNGLVERTEXARRAYVERTEXBUFFERPROC glad_glVertexArrayVertexBuffer = NULL; +PFNGLVERTEXARRAYVERTEXBUFFERSPROC glad_glVertexArrayVertexBuffers = NULL; +PFNGLVERTEXATTRIB1DPROC glad_glVertexAttrib1d = NULL; +PFNGLVERTEXATTRIB1DVPROC glad_glVertexAttrib1dv = NULL; +PFNGLVERTEXATTRIB1FPROC glad_glVertexAttrib1f = NULL; +PFNGLVERTEXATTRIB1FVPROC glad_glVertexAttrib1fv = NULL; +PFNGLVERTEXATTRIB1SPROC glad_glVertexAttrib1s = NULL; +PFNGLVERTEXATTRIB1SVPROC glad_glVertexAttrib1sv = NULL; +PFNGLVERTEXATTRIB2DPROC glad_glVertexAttrib2d = NULL; +PFNGLVERTEXATTRIB2DVPROC glad_glVertexAttrib2dv = NULL; +PFNGLVERTEXATTRIB2FPROC glad_glVertexAttrib2f = NULL; +PFNGLVERTEXATTRIB2FVPROC glad_glVertexAttrib2fv = NULL; +PFNGLVERTEXATTRIB2SPROC glad_glVertexAttrib2s = NULL; +PFNGLVERTEXATTRIB2SVPROC glad_glVertexAttrib2sv = NULL; +PFNGLVERTEXATTRIB3DPROC glad_glVertexAttrib3d = NULL; +PFNGLVERTEXATTRIB3DVPROC glad_glVertexAttrib3dv = NULL; +PFNGLVERTEXATTRIB3FPROC glad_glVertexAttrib3f = NULL; +PFNGLVERTEXATTRIB3FVPROC glad_glVertexAttrib3fv = NULL; +PFNGLVERTEXATTRIB3SPROC glad_glVertexAttrib3s = NULL; +PFNGLVERTEXATTRIB3SVPROC glad_glVertexAttrib3sv = NULL; +PFNGLVERTEXATTRIB4NBVPROC glad_glVertexAttrib4Nbv = NULL; +PFNGLVERTEXATTRIB4NIVPROC glad_glVertexAttrib4Niv = NULL; +PFNGLVERTEXATTRIB4NSVPROC glad_glVertexAttrib4Nsv = NULL; +PFNGLVERTEXATTRIB4NUBPROC glad_glVertexAttrib4Nub = NULL; +PFNGLVERTEXATTRIB4NUBVPROC glad_glVertexAttrib4Nubv = NULL; +PFNGLVERTEXATTRIB4NUIVPROC glad_glVertexAttrib4Nuiv = NULL; +PFNGLVERTEXATTRIB4NUSVPROC glad_glVertexAttrib4Nusv = NULL; +PFNGLVERTEXATTRIB4BVPROC glad_glVertexAttrib4bv = NULL; +PFNGLVERTEXATTRIB4DPROC glad_glVertexAttrib4d = NULL; +PFNGLVERTEXATTRIB4DVPROC glad_glVertexAttrib4dv = NULL; +PFNGLVERTEXATTRIB4FPROC glad_glVertexAttrib4f = NULL; +PFNGLVERTEXATTRIB4FVPROC glad_glVertexAttrib4fv = NULL; +PFNGLVERTEXATTRIB4IVPROC glad_glVertexAttrib4iv = NULL; +PFNGLVERTEXATTRIB4SPROC glad_glVertexAttrib4s = NULL; +PFNGLVERTEXATTRIB4SVPROC glad_glVertexAttrib4sv = NULL; +PFNGLVERTEXATTRIB4UBVPROC glad_glVertexAttrib4ubv = NULL; +PFNGLVERTEXATTRIB4UIVPROC glad_glVertexAttrib4uiv = NULL; +PFNGLVERTEXATTRIB4USVPROC glad_glVertexAttrib4usv = NULL; +PFNGLVERTEXATTRIBBINDINGPROC glad_glVertexAttribBinding = NULL; +PFNGLVERTEXATTRIBDIVISORPROC glad_glVertexAttribDivisor = NULL; +PFNGLVERTEXATTRIBFORMATPROC glad_glVertexAttribFormat = NULL; +PFNGLVERTEXATTRIBI1IPROC glad_glVertexAttribI1i = NULL; +PFNGLVERTEXATTRIBI1IVPROC glad_glVertexAttribI1iv = NULL; +PFNGLVERTEXATTRIBI1UIPROC glad_glVertexAttribI1ui = NULL; +PFNGLVERTEXATTRIBI1UIVPROC glad_glVertexAttribI1uiv = NULL; +PFNGLVERTEXATTRIBI2IPROC glad_glVertexAttribI2i = NULL; +PFNGLVERTEXATTRIBI2IVPROC glad_glVertexAttribI2iv = NULL; +PFNGLVERTEXATTRIBI2UIPROC glad_glVertexAttribI2ui = NULL; +PFNGLVERTEXATTRIBI2UIVPROC glad_glVertexAttribI2uiv = NULL; +PFNGLVERTEXATTRIBI3IPROC glad_glVertexAttribI3i = NULL; +PFNGLVERTEXATTRIBI3IVPROC glad_glVertexAttribI3iv = NULL; +PFNGLVERTEXATTRIBI3UIPROC glad_glVertexAttribI3ui = NULL; +PFNGLVERTEXATTRIBI3UIVPROC glad_glVertexAttribI3uiv = NULL; +PFNGLVERTEXATTRIBI4BVPROC glad_glVertexAttribI4bv = NULL; +PFNGLVERTEXATTRIBI4IPROC glad_glVertexAttribI4i = NULL; +PFNGLVERTEXATTRIBI4IVPROC glad_glVertexAttribI4iv = NULL; +PFNGLVERTEXATTRIBI4SVPROC glad_glVertexAttribI4sv = NULL; +PFNGLVERTEXATTRIBI4UBVPROC glad_glVertexAttribI4ubv = NULL; +PFNGLVERTEXATTRIBI4UIPROC glad_glVertexAttribI4ui = NULL; +PFNGLVERTEXATTRIBI4UIVPROC glad_glVertexAttribI4uiv = NULL; +PFNGLVERTEXATTRIBI4USVPROC glad_glVertexAttribI4usv = NULL; +PFNGLVERTEXATTRIBIFORMATPROC glad_glVertexAttribIFormat = NULL; +PFNGLVERTEXATTRIBIPOINTERPROC glad_glVertexAttribIPointer = NULL; +PFNGLVERTEXATTRIBL1DPROC glad_glVertexAttribL1d = NULL; +PFNGLVERTEXATTRIBL1DVPROC glad_glVertexAttribL1dv = NULL; +PFNGLVERTEXATTRIBL2DPROC glad_glVertexAttribL2d = NULL; +PFNGLVERTEXATTRIBL2DVPROC glad_glVertexAttribL2dv = NULL; +PFNGLVERTEXATTRIBL3DPROC glad_glVertexAttribL3d = NULL; +PFNGLVERTEXATTRIBL3DVPROC glad_glVertexAttribL3dv = NULL; +PFNGLVERTEXATTRIBL4DPROC glad_glVertexAttribL4d = NULL; +PFNGLVERTEXATTRIBL4DVPROC glad_glVertexAttribL4dv = NULL; +PFNGLVERTEXATTRIBLFORMATPROC glad_glVertexAttribLFormat = NULL; +PFNGLVERTEXATTRIBLPOINTERPROC glad_glVertexAttribLPointer = NULL; +PFNGLVERTEXATTRIBP1UIPROC glad_glVertexAttribP1ui = NULL; +PFNGLVERTEXATTRIBP1UIVPROC glad_glVertexAttribP1uiv = NULL; +PFNGLVERTEXATTRIBP2UIPROC glad_glVertexAttribP2ui = NULL; +PFNGLVERTEXATTRIBP2UIVPROC glad_glVertexAttribP2uiv = NULL; +PFNGLVERTEXATTRIBP3UIPROC glad_glVertexAttribP3ui = NULL; +PFNGLVERTEXATTRIBP3UIVPROC glad_glVertexAttribP3uiv = NULL; +PFNGLVERTEXATTRIBP4UIPROC glad_glVertexAttribP4ui = NULL; +PFNGLVERTEXATTRIBP4UIVPROC glad_glVertexAttribP4uiv = NULL; +PFNGLVERTEXATTRIBPOINTERPROC glad_glVertexAttribPointer = NULL; +PFNGLVERTEXBINDINGDIVISORPROC glad_glVertexBindingDivisor = NULL; +PFNGLVERTEXP2UIPROC glad_glVertexP2ui = NULL; +PFNGLVERTEXP2UIVPROC glad_glVertexP2uiv = NULL; +PFNGLVERTEXP3UIPROC glad_glVertexP3ui = NULL; +PFNGLVERTEXP3UIVPROC glad_glVertexP3uiv = NULL; +PFNGLVERTEXP4UIPROC glad_glVertexP4ui = NULL; +PFNGLVERTEXP4UIVPROC glad_glVertexP4uiv = NULL; +PFNGLVIEWPORTPROC glad_glViewport = NULL; +PFNGLVIEWPORTARRAYVPROC glad_glViewportArrayv = NULL; +PFNGLVIEWPORTINDEXEDFPROC glad_glViewportIndexedf = NULL; +PFNGLVIEWPORTINDEXEDFVPROC glad_glViewportIndexedfv = NULL; +PFNGLWAITSYNCPROC glad_glWaitSync = NULL; +static void load_GL_VERSION_1_0(GLADloadproc load) { + if(!GLAD_GL_VERSION_1_0) return; + glad_glCullFace = (PFNGLCULLFACEPROC)load("glCullFace"); + glad_glFrontFace = (PFNGLFRONTFACEPROC)load("glFrontFace"); + glad_glHint = (PFNGLHINTPROC)load("glHint"); + glad_glLineWidth = (PFNGLLINEWIDTHPROC)load("glLineWidth"); + glad_glPointSize = (PFNGLPOINTSIZEPROC)load("glPointSize"); + glad_glPolygonMode = (PFNGLPOLYGONMODEPROC)load("glPolygonMode"); + glad_glScissor = (PFNGLSCISSORPROC)load("glScissor"); + glad_glTexParameterf = (PFNGLTEXPARAMETERFPROC)load("glTexParameterf"); + glad_glTexParameterfv = (PFNGLTEXPARAMETERFVPROC)load("glTexParameterfv"); + glad_glTexParameteri = (PFNGLTEXPARAMETERIPROC)load("glTexParameteri"); + glad_glTexParameteriv = (PFNGLTEXPARAMETERIVPROC)load("glTexParameteriv"); + glad_glTexImage1D = (PFNGLTEXIMAGE1DPROC)load("glTexImage1D"); + glad_glTexImage2D = (PFNGLTEXIMAGE2DPROC)load("glTexImage2D"); + glad_glDrawBuffer = (PFNGLDRAWBUFFERPROC)load("glDrawBuffer"); + glad_glClear = (PFNGLCLEARPROC)load("glClear"); + glad_glClearColor = (PFNGLCLEARCOLORPROC)load("glClearColor"); + glad_glClearStencil = (PFNGLCLEARSTENCILPROC)load("glClearStencil"); + glad_glClearDepth = (PFNGLCLEARDEPTHPROC)load("glClearDepth"); + glad_glStencilMask = (PFNGLSTENCILMASKPROC)load("glStencilMask"); + glad_glColorMask = (PFNGLCOLORMASKPROC)load("glColorMask"); + glad_glDepthMask = (PFNGLDEPTHMASKPROC)load("glDepthMask"); + glad_glDisable = (PFNGLDISABLEPROC)load("glDisable"); + glad_glEnable = (PFNGLENABLEPROC)load("glEnable"); + glad_glFinish = (PFNGLFINISHPROC)load("glFinish"); + glad_glFlush = (PFNGLFLUSHPROC)load("glFlush"); + glad_glBlendFunc = (PFNGLBLENDFUNCPROC)load("glBlendFunc"); + glad_glLogicOp = (PFNGLLOGICOPPROC)load("glLogicOp"); + glad_glStencilFunc = (PFNGLSTENCILFUNCPROC)load("glStencilFunc"); + glad_glStencilOp = (PFNGLSTENCILOPPROC)load("glStencilOp"); + glad_glDepthFunc = (PFNGLDEPTHFUNCPROC)load("glDepthFunc"); + glad_glPixelStoref = (PFNGLPIXELSTOREFPROC)load("glPixelStoref"); + glad_glPixelStorei = (PFNGLPIXELSTOREIPROC)load("glPixelStorei"); + glad_glReadBuffer = (PFNGLREADBUFFERPROC)load("glReadBuffer"); + glad_glReadPixels = (PFNGLREADPIXELSPROC)load("glReadPixels"); + glad_glGetBooleanv = (PFNGLGETBOOLEANVPROC)load("glGetBooleanv"); + glad_glGetDoublev = (PFNGLGETDOUBLEVPROC)load("glGetDoublev"); + glad_glGetError = (PFNGLGETERRORPROC)load("glGetError"); + glad_glGetFloatv = (PFNGLGETFLOATVPROC)load("glGetFloatv"); + glad_glGetIntegerv = (PFNGLGETINTEGERVPROC)load("glGetIntegerv"); + glad_glGetString = (PFNGLGETSTRINGPROC)load("glGetString"); + glad_glGetTexImage = (PFNGLGETTEXIMAGEPROC)load("glGetTexImage"); + glad_glGetTexParameterfv = (PFNGLGETTEXPARAMETERFVPROC)load("glGetTexParameterfv"); + glad_glGetTexParameteriv = (PFNGLGETTEXPARAMETERIVPROC)load("glGetTexParameteriv"); + glad_glGetTexLevelParameterfv = (PFNGLGETTEXLEVELPARAMETERFVPROC)load("glGetTexLevelParameterfv"); + glad_glGetTexLevelParameteriv = (PFNGLGETTEXLEVELPARAMETERIVPROC)load("glGetTexLevelParameteriv"); + glad_glIsEnabled = (PFNGLISENABLEDPROC)load("glIsEnabled"); + glad_glDepthRange = (PFNGLDEPTHRANGEPROC)load("glDepthRange"); + glad_glViewport = (PFNGLVIEWPORTPROC)load("glViewport"); +} +static void load_GL_VERSION_1_1(GLADloadproc load) { + if(!GLAD_GL_VERSION_1_1) return; + glad_glDrawArrays = (PFNGLDRAWARRAYSPROC)load("glDrawArrays"); + glad_glDrawElements = (PFNGLDRAWELEMENTSPROC)load("glDrawElements"); + glad_glPolygonOffset = (PFNGLPOLYGONOFFSETPROC)load("glPolygonOffset"); + glad_glCopyTexImage1D = (PFNGLCOPYTEXIMAGE1DPROC)load("glCopyTexImage1D"); + glad_glCopyTexImage2D = (PFNGLCOPYTEXIMAGE2DPROC)load("glCopyTexImage2D"); + glad_glCopyTexSubImage1D = (PFNGLCOPYTEXSUBIMAGE1DPROC)load("glCopyTexSubImage1D"); + glad_glCopyTexSubImage2D = (PFNGLCOPYTEXSUBIMAGE2DPROC)load("glCopyTexSubImage2D"); + glad_glTexSubImage1D = (PFNGLTEXSUBIMAGE1DPROC)load("glTexSubImage1D"); + glad_glTexSubImage2D = (PFNGLTEXSUBIMAGE2DPROC)load("glTexSubImage2D"); + glad_glBindTexture = (PFNGLBINDTEXTUREPROC)load("glBindTexture"); + glad_glDeleteTextures = (PFNGLDELETETEXTURESPROC)load("glDeleteTextures"); + glad_glGenTextures = (PFNGLGENTEXTURESPROC)load("glGenTextures"); + glad_glIsTexture = (PFNGLISTEXTUREPROC)load("glIsTexture"); +} +static void load_GL_VERSION_1_2(GLADloadproc load) { + if(!GLAD_GL_VERSION_1_2) return; + glad_glDrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC)load("glDrawRangeElements"); + glad_glTexImage3D = (PFNGLTEXIMAGE3DPROC)load("glTexImage3D"); + glad_glTexSubImage3D = (PFNGLTEXSUBIMAGE3DPROC)load("glTexSubImage3D"); + glad_glCopyTexSubImage3D = (PFNGLCOPYTEXSUBIMAGE3DPROC)load("glCopyTexSubImage3D"); +} +static void load_GL_VERSION_1_3(GLADloadproc load) { + if(!GLAD_GL_VERSION_1_3) return; + glad_glActiveTexture = (PFNGLACTIVETEXTUREPROC)load("glActiveTexture"); + glad_glSampleCoverage = (PFNGLSAMPLECOVERAGEPROC)load("glSampleCoverage"); + glad_glCompressedTexImage3D = (PFNGLCOMPRESSEDTEXIMAGE3DPROC)load("glCompressedTexImage3D"); + glad_glCompressedTexImage2D = (PFNGLCOMPRESSEDTEXIMAGE2DPROC)load("glCompressedTexImage2D"); + glad_glCompressedTexImage1D = (PFNGLCOMPRESSEDTEXIMAGE1DPROC)load("glCompressedTexImage1D"); + glad_glCompressedTexSubImage3D = (PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC)load("glCompressedTexSubImage3D"); + glad_glCompressedTexSubImage2D = (PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)load("glCompressedTexSubImage2D"); + glad_glCompressedTexSubImage1D = (PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC)load("glCompressedTexSubImage1D"); + glad_glGetCompressedTexImage = (PFNGLGETCOMPRESSEDTEXIMAGEPROC)load("glGetCompressedTexImage"); +} +static void load_GL_VERSION_1_4(GLADloadproc load) { + if(!GLAD_GL_VERSION_1_4) return; + glad_glBlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC)load("glBlendFuncSeparate"); + glad_glMultiDrawArrays = (PFNGLMULTIDRAWARRAYSPROC)load("glMultiDrawArrays"); + glad_glMultiDrawElements = (PFNGLMULTIDRAWELEMENTSPROC)load("glMultiDrawElements"); + glad_glPointParameterf = (PFNGLPOINTPARAMETERFPROC)load("glPointParameterf"); + glad_glPointParameterfv = (PFNGLPOINTPARAMETERFVPROC)load("glPointParameterfv"); + glad_glPointParameteri = (PFNGLPOINTPARAMETERIPROC)load("glPointParameteri"); + glad_glPointParameteriv = (PFNGLPOINTPARAMETERIVPROC)load("glPointParameteriv"); + glad_glBlendColor = (PFNGLBLENDCOLORPROC)load("glBlendColor"); + glad_glBlendEquation = (PFNGLBLENDEQUATIONPROC)load("glBlendEquation"); +} +static void load_GL_VERSION_1_5(GLADloadproc load) { + if(!GLAD_GL_VERSION_1_5) return; + glad_glGenQueries = (PFNGLGENQUERIESPROC)load("glGenQueries"); + glad_glDeleteQueries = (PFNGLDELETEQUERIESPROC)load("glDeleteQueries"); + glad_glIsQuery = (PFNGLISQUERYPROC)load("glIsQuery"); + glad_glBeginQuery = (PFNGLBEGINQUERYPROC)load("glBeginQuery"); + glad_glEndQuery = (PFNGLENDQUERYPROC)load("glEndQuery"); + glad_glGetQueryiv = (PFNGLGETQUERYIVPROC)load("glGetQueryiv"); + glad_glGetQueryObjectiv = (PFNGLGETQUERYOBJECTIVPROC)load("glGetQueryObjectiv"); + glad_glGetQueryObjectuiv = (PFNGLGETQUERYOBJECTUIVPROC)load("glGetQueryObjectuiv"); + glad_glBindBuffer = (PFNGLBINDBUFFERPROC)load("glBindBuffer"); + glad_glDeleteBuffers = (PFNGLDELETEBUFFERSPROC)load("glDeleteBuffers"); + glad_glGenBuffers = (PFNGLGENBUFFERSPROC)load("glGenBuffers"); + glad_glIsBuffer = (PFNGLISBUFFERPROC)load("glIsBuffer"); + glad_glBufferData = (PFNGLBUFFERDATAPROC)load("glBufferData"); + glad_glBufferSubData = (PFNGLBUFFERSUBDATAPROC)load("glBufferSubData"); + glad_glGetBufferSubData = (PFNGLGETBUFFERSUBDATAPROC)load("glGetBufferSubData"); + glad_glMapBuffer = (PFNGLMAPBUFFERPROC)load("glMapBuffer"); + glad_glUnmapBuffer = (PFNGLUNMAPBUFFERPROC)load("glUnmapBuffer"); + glad_glGetBufferParameteriv = (PFNGLGETBUFFERPARAMETERIVPROC)load("glGetBufferParameteriv"); + glad_glGetBufferPointerv = (PFNGLGETBUFFERPOINTERVPROC)load("glGetBufferPointerv"); +} +static void load_GL_VERSION_2_0(GLADloadproc load) { + if(!GLAD_GL_VERSION_2_0) return; + glad_glBlendEquationSeparate = (PFNGLBLENDEQUATIONSEPARATEPROC)load("glBlendEquationSeparate"); + glad_glDrawBuffers = (PFNGLDRAWBUFFERSPROC)load("glDrawBuffers"); + glad_glStencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC)load("glStencilOpSeparate"); + glad_glStencilFuncSeparate = (PFNGLSTENCILFUNCSEPARATEPROC)load("glStencilFuncSeparate"); + glad_glStencilMaskSeparate = (PFNGLSTENCILMASKSEPARATEPROC)load("glStencilMaskSeparate"); + glad_glAttachShader = (PFNGLATTACHSHADERPROC)load("glAttachShader"); + glad_glBindAttribLocation = (PFNGLBINDATTRIBLOCATIONPROC)load("glBindAttribLocation"); + glad_glCompileShader = (PFNGLCOMPILESHADERPROC)load("glCompileShader"); + glad_glCreateProgram = (PFNGLCREATEPROGRAMPROC)load("glCreateProgram"); + glad_glCreateShader = (PFNGLCREATESHADERPROC)load("glCreateShader"); + glad_glDeleteProgram = (PFNGLDELETEPROGRAMPROC)load("glDeleteProgram"); + glad_glDeleteShader = (PFNGLDELETESHADERPROC)load("glDeleteShader"); + glad_glDetachShader = (PFNGLDETACHSHADERPROC)load("glDetachShader"); + glad_glDisableVertexAttribArray = (PFNGLDISABLEVERTEXATTRIBARRAYPROC)load("glDisableVertexAttribArray"); + glad_glEnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC)load("glEnableVertexAttribArray"); + glad_glGetActiveAttrib = (PFNGLGETACTIVEATTRIBPROC)load("glGetActiveAttrib"); + glad_glGetActiveUniform = (PFNGLGETACTIVEUNIFORMPROC)load("glGetActiveUniform"); + glad_glGetAttachedShaders = (PFNGLGETATTACHEDSHADERSPROC)load("glGetAttachedShaders"); + glad_glGetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC)load("glGetAttribLocation"); + glad_glGetProgramiv = (PFNGLGETPROGRAMIVPROC)load("glGetProgramiv"); + glad_glGetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC)load("glGetProgramInfoLog"); + glad_glGetShaderiv = (PFNGLGETSHADERIVPROC)load("glGetShaderiv"); + glad_glGetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC)load("glGetShaderInfoLog"); + glad_glGetShaderSource = (PFNGLGETSHADERSOURCEPROC)load("glGetShaderSource"); + glad_glGetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC)load("glGetUniformLocation"); + glad_glGetUniformfv = (PFNGLGETUNIFORMFVPROC)load("glGetUniformfv"); + glad_glGetUniformiv = (PFNGLGETUNIFORMIVPROC)load("glGetUniformiv"); + glad_glGetVertexAttribdv = (PFNGLGETVERTEXATTRIBDVPROC)load("glGetVertexAttribdv"); + glad_glGetVertexAttribfv = (PFNGLGETVERTEXATTRIBFVPROC)load("glGetVertexAttribfv"); + glad_glGetVertexAttribiv = (PFNGLGETVERTEXATTRIBIVPROC)load("glGetVertexAttribiv"); + glad_glGetVertexAttribPointerv = (PFNGLGETVERTEXATTRIBPOINTERVPROC)load("glGetVertexAttribPointerv"); + glad_glIsProgram = (PFNGLISPROGRAMPROC)load("glIsProgram"); + glad_glIsShader = (PFNGLISSHADERPROC)load("glIsShader"); + glad_glLinkProgram = (PFNGLLINKPROGRAMPROC)load("glLinkProgram"); + glad_glShaderSource = (PFNGLSHADERSOURCEPROC)load("glShaderSource"); + glad_glUseProgram = (PFNGLUSEPROGRAMPROC)load("glUseProgram"); + glad_glUniform1f = (PFNGLUNIFORM1FPROC)load("glUniform1f"); + glad_glUniform2f = (PFNGLUNIFORM2FPROC)load("glUniform2f"); + glad_glUniform3f = (PFNGLUNIFORM3FPROC)load("glUniform3f"); + glad_glUniform4f = (PFNGLUNIFORM4FPROC)load("glUniform4f"); + glad_glUniform1i = (PFNGLUNIFORM1IPROC)load("glUniform1i"); + glad_glUniform2i = (PFNGLUNIFORM2IPROC)load("glUniform2i"); + glad_glUniform3i = (PFNGLUNIFORM3IPROC)load("glUniform3i"); + glad_glUniform4i = (PFNGLUNIFORM4IPROC)load("glUniform4i"); + glad_glUniform1fv = (PFNGLUNIFORM1FVPROC)load("glUniform1fv"); + glad_glUniform2fv = (PFNGLUNIFORM2FVPROC)load("glUniform2fv"); + glad_glUniform3fv = (PFNGLUNIFORM3FVPROC)load("glUniform3fv"); + glad_glUniform4fv = (PFNGLUNIFORM4FVPROC)load("glUniform4fv"); + glad_glUniform1iv = (PFNGLUNIFORM1IVPROC)load("glUniform1iv"); + glad_glUniform2iv = (PFNGLUNIFORM2IVPROC)load("glUniform2iv"); + glad_glUniform3iv = (PFNGLUNIFORM3IVPROC)load("glUniform3iv"); + glad_glUniform4iv = (PFNGLUNIFORM4IVPROC)load("glUniform4iv"); + glad_glUniformMatrix2fv = (PFNGLUNIFORMMATRIX2FVPROC)load("glUniformMatrix2fv"); + glad_glUniformMatrix3fv = (PFNGLUNIFORMMATRIX3FVPROC)load("glUniformMatrix3fv"); + glad_glUniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC)load("glUniformMatrix4fv"); + glad_glValidateProgram = (PFNGLVALIDATEPROGRAMPROC)load("glValidateProgram"); + glad_glVertexAttrib1d = (PFNGLVERTEXATTRIB1DPROC)load("glVertexAttrib1d"); + glad_glVertexAttrib1dv = (PFNGLVERTEXATTRIB1DVPROC)load("glVertexAttrib1dv"); + glad_glVertexAttrib1f = (PFNGLVERTEXATTRIB1FPROC)load("glVertexAttrib1f"); + glad_glVertexAttrib1fv = (PFNGLVERTEXATTRIB1FVPROC)load("glVertexAttrib1fv"); + glad_glVertexAttrib1s = (PFNGLVERTEXATTRIB1SPROC)load("glVertexAttrib1s"); + glad_glVertexAttrib1sv = (PFNGLVERTEXATTRIB1SVPROC)load("glVertexAttrib1sv"); + glad_glVertexAttrib2d = (PFNGLVERTEXATTRIB2DPROC)load("glVertexAttrib2d"); + glad_glVertexAttrib2dv = (PFNGLVERTEXATTRIB2DVPROC)load("glVertexAttrib2dv"); + glad_glVertexAttrib2f = (PFNGLVERTEXATTRIB2FPROC)load("glVertexAttrib2f"); + glad_glVertexAttrib2fv = (PFNGLVERTEXATTRIB2FVPROC)load("glVertexAttrib2fv"); + glad_glVertexAttrib2s = (PFNGLVERTEXATTRIB2SPROC)load("glVertexAttrib2s"); + glad_glVertexAttrib2sv = (PFNGLVERTEXATTRIB2SVPROC)load("glVertexAttrib2sv"); + glad_glVertexAttrib3d = (PFNGLVERTEXATTRIB3DPROC)load("glVertexAttrib3d"); + glad_glVertexAttrib3dv = (PFNGLVERTEXATTRIB3DVPROC)load("glVertexAttrib3dv"); + glad_glVertexAttrib3f = (PFNGLVERTEXATTRIB3FPROC)load("glVertexAttrib3f"); + glad_glVertexAttrib3fv = (PFNGLVERTEXATTRIB3FVPROC)load("glVertexAttrib3fv"); + glad_glVertexAttrib3s = (PFNGLVERTEXATTRIB3SPROC)load("glVertexAttrib3s"); + glad_glVertexAttrib3sv = (PFNGLVERTEXATTRIB3SVPROC)load("glVertexAttrib3sv"); + glad_glVertexAttrib4Nbv = (PFNGLVERTEXATTRIB4NBVPROC)load("glVertexAttrib4Nbv"); + glad_glVertexAttrib4Niv = (PFNGLVERTEXATTRIB4NIVPROC)load("glVertexAttrib4Niv"); + glad_glVertexAttrib4Nsv = (PFNGLVERTEXATTRIB4NSVPROC)load("glVertexAttrib4Nsv"); + glad_glVertexAttrib4Nub = (PFNGLVERTEXATTRIB4NUBPROC)load("glVertexAttrib4Nub"); + glad_glVertexAttrib4Nubv = (PFNGLVERTEXATTRIB4NUBVPROC)load("glVertexAttrib4Nubv"); + glad_glVertexAttrib4Nuiv = (PFNGLVERTEXATTRIB4NUIVPROC)load("glVertexAttrib4Nuiv"); + glad_glVertexAttrib4Nusv = (PFNGLVERTEXATTRIB4NUSVPROC)load("glVertexAttrib4Nusv"); + glad_glVertexAttrib4bv = (PFNGLVERTEXATTRIB4BVPROC)load("glVertexAttrib4bv"); + glad_glVertexAttrib4d = (PFNGLVERTEXATTRIB4DPROC)load("glVertexAttrib4d"); + glad_glVertexAttrib4dv = (PFNGLVERTEXATTRIB4DVPROC)load("glVertexAttrib4dv"); + glad_glVertexAttrib4f = (PFNGLVERTEXATTRIB4FPROC)load("glVertexAttrib4f"); + glad_glVertexAttrib4fv = (PFNGLVERTEXATTRIB4FVPROC)load("glVertexAttrib4fv"); + glad_glVertexAttrib4iv = (PFNGLVERTEXATTRIB4IVPROC)load("glVertexAttrib4iv"); + glad_glVertexAttrib4s = (PFNGLVERTEXATTRIB4SPROC)load("glVertexAttrib4s"); + glad_glVertexAttrib4sv = (PFNGLVERTEXATTRIB4SVPROC)load("glVertexAttrib4sv"); + glad_glVertexAttrib4ubv = (PFNGLVERTEXATTRIB4UBVPROC)load("glVertexAttrib4ubv"); + glad_glVertexAttrib4uiv = (PFNGLVERTEXATTRIB4UIVPROC)load("glVertexAttrib4uiv"); + glad_glVertexAttrib4usv = (PFNGLVERTEXATTRIB4USVPROC)load("glVertexAttrib4usv"); + glad_glVertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC)load("glVertexAttribPointer"); +} +static void load_GL_VERSION_2_1(GLADloadproc load) { + if(!GLAD_GL_VERSION_2_1) return; + glad_glUniformMatrix2x3fv = (PFNGLUNIFORMMATRIX2X3FVPROC)load("glUniformMatrix2x3fv"); + glad_glUniformMatrix3x2fv = (PFNGLUNIFORMMATRIX3X2FVPROC)load("glUniformMatrix3x2fv"); + glad_glUniformMatrix2x4fv = (PFNGLUNIFORMMATRIX2X4FVPROC)load("glUniformMatrix2x4fv"); + glad_glUniformMatrix4x2fv = (PFNGLUNIFORMMATRIX4X2FVPROC)load("glUniformMatrix4x2fv"); + glad_glUniformMatrix3x4fv = (PFNGLUNIFORMMATRIX3X4FVPROC)load("glUniformMatrix3x4fv"); + glad_glUniformMatrix4x3fv = (PFNGLUNIFORMMATRIX4X3FVPROC)load("glUniformMatrix4x3fv"); +} +static void load_GL_VERSION_3_0(GLADloadproc load) { + if(!GLAD_GL_VERSION_3_0) return; + glad_glColorMaski = (PFNGLCOLORMASKIPROC)load("glColorMaski"); + glad_glGetBooleani_v = (PFNGLGETBOOLEANI_VPROC)load("glGetBooleani_v"); + glad_glGetIntegeri_v = (PFNGLGETINTEGERI_VPROC)load("glGetIntegeri_v"); + glad_glEnablei = (PFNGLENABLEIPROC)load("glEnablei"); + glad_glDisablei = (PFNGLDISABLEIPROC)load("glDisablei"); + glad_glIsEnabledi = (PFNGLISENABLEDIPROC)load("glIsEnabledi"); + glad_glBeginTransformFeedback = (PFNGLBEGINTRANSFORMFEEDBACKPROC)load("glBeginTransformFeedback"); + glad_glEndTransformFeedback = (PFNGLENDTRANSFORMFEEDBACKPROC)load("glEndTransformFeedback"); + glad_glBindBufferRange = (PFNGLBINDBUFFERRANGEPROC)load("glBindBufferRange"); + glad_glBindBufferBase = (PFNGLBINDBUFFERBASEPROC)load("glBindBufferBase"); + glad_glTransformFeedbackVaryings = (PFNGLTRANSFORMFEEDBACKVARYINGSPROC)load("glTransformFeedbackVaryings"); + glad_glGetTransformFeedbackVarying = (PFNGLGETTRANSFORMFEEDBACKVARYINGPROC)load("glGetTransformFeedbackVarying"); + glad_glClampColor = (PFNGLCLAMPCOLORPROC)load("glClampColor"); + glad_glBeginConditionalRender = (PFNGLBEGINCONDITIONALRENDERPROC)load("glBeginConditionalRender"); + glad_glEndConditionalRender = (PFNGLENDCONDITIONALRENDERPROC)load("glEndConditionalRender"); + glad_glVertexAttribIPointer = (PFNGLVERTEXATTRIBIPOINTERPROC)load("glVertexAttribIPointer"); + glad_glGetVertexAttribIiv = (PFNGLGETVERTEXATTRIBIIVPROC)load("glGetVertexAttribIiv"); + glad_glGetVertexAttribIuiv = (PFNGLGETVERTEXATTRIBIUIVPROC)load("glGetVertexAttribIuiv"); + glad_glVertexAttribI1i = (PFNGLVERTEXATTRIBI1IPROC)load("glVertexAttribI1i"); + glad_glVertexAttribI2i = (PFNGLVERTEXATTRIBI2IPROC)load("glVertexAttribI2i"); + glad_glVertexAttribI3i = (PFNGLVERTEXATTRIBI3IPROC)load("glVertexAttribI3i"); + glad_glVertexAttribI4i = (PFNGLVERTEXATTRIBI4IPROC)load("glVertexAttribI4i"); + glad_glVertexAttribI1ui = (PFNGLVERTEXATTRIBI1UIPROC)load("glVertexAttribI1ui"); + glad_glVertexAttribI2ui = (PFNGLVERTEXATTRIBI2UIPROC)load("glVertexAttribI2ui"); + glad_glVertexAttribI3ui = (PFNGLVERTEXATTRIBI3UIPROC)load("glVertexAttribI3ui"); + glad_glVertexAttribI4ui = (PFNGLVERTEXATTRIBI4UIPROC)load("glVertexAttribI4ui"); + glad_glVertexAttribI1iv = (PFNGLVERTEXATTRIBI1IVPROC)load("glVertexAttribI1iv"); + glad_glVertexAttribI2iv = (PFNGLVERTEXATTRIBI2IVPROC)load("glVertexAttribI2iv"); + glad_glVertexAttribI3iv = (PFNGLVERTEXATTRIBI3IVPROC)load("glVertexAttribI3iv"); + glad_glVertexAttribI4iv = (PFNGLVERTEXATTRIBI4IVPROC)load("glVertexAttribI4iv"); + glad_glVertexAttribI1uiv = (PFNGLVERTEXATTRIBI1UIVPROC)load("glVertexAttribI1uiv"); + glad_glVertexAttribI2uiv = (PFNGLVERTEXATTRIBI2UIVPROC)load("glVertexAttribI2uiv"); + glad_glVertexAttribI3uiv = (PFNGLVERTEXATTRIBI3UIVPROC)load("glVertexAttribI3uiv"); + glad_glVertexAttribI4uiv = (PFNGLVERTEXATTRIBI4UIVPROC)load("glVertexAttribI4uiv"); + glad_glVertexAttribI4bv = (PFNGLVERTEXATTRIBI4BVPROC)load("glVertexAttribI4bv"); + glad_glVertexAttribI4sv = (PFNGLVERTEXATTRIBI4SVPROC)load("glVertexAttribI4sv"); + glad_glVertexAttribI4ubv = (PFNGLVERTEXATTRIBI4UBVPROC)load("glVertexAttribI4ubv"); + glad_glVertexAttribI4usv = (PFNGLVERTEXATTRIBI4USVPROC)load("glVertexAttribI4usv"); + glad_glGetUniformuiv = (PFNGLGETUNIFORMUIVPROC)load("glGetUniformuiv"); + glad_glBindFragDataLocation = (PFNGLBINDFRAGDATALOCATIONPROC)load("glBindFragDataLocation"); + glad_glGetFragDataLocation = (PFNGLGETFRAGDATALOCATIONPROC)load("glGetFragDataLocation"); + glad_glUniform1ui = (PFNGLUNIFORM1UIPROC)load("glUniform1ui"); + glad_glUniform2ui = (PFNGLUNIFORM2UIPROC)load("glUniform2ui"); + glad_glUniform3ui = (PFNGLUNIFORM3UIPROC)load("glUniform3ui"); + glad_glUniform4ui = (PFNGLUNIFORM4UIPROC)load("glUniform4ui"); + glad_glUniform1uiv = (PFNGLUNIFORM1UIVPROC)load("glUniform1uiv"); + glad_glUniform2uiv = (PFNGLUNIFORM2UIVPROC)load("glUniform2uiv"); + glad_glUniform3uiv = (PFNGLUNIFORM3UIVPROC)load("glUniform3uiv"); + glad_glUniform4uiv = (PFNGLUNIFORM4UIVPROC)load("glUniform4uiv"); + glad_glTexParameterIiv = (PFNGLTEXPARAMETERIIVPROC)load("glTexParameterIiv"); + glad_glTexParameterIuiv = (PFNGLTEXPARAMETERIUIVPROC)load("glTexParameterIuiv"); + glad_glGetTexParameterIiv = (PFNGLGETTEXPARAMETERIIVPROC)load("glGetTexParameterIiv"); + glad_glGetTexParameterIuiv = (PFNGLGETTEXPARAMETERIUIVPROC)load("glGetTexParameterIuiv"); + glad_glClearBufferiv = (PFNGLCLEARBUFFERIVPROC)load("glClearBufferiv"); + glad_glClearBufferuiv = (PFNGLCLEARBUFFERUIVPROC)load("glClearBufferuiv"); + glad_glClearBufferfv = (PFNGLCLEARBUFFERFVPROC)load("glClearBufferfv"); + glad_glClearBufferfi = (PFNGLCLEARBUFFERFIPROC)load("glClearBufferfi"); + glad_glGetStringi = (PFNGLGETSTRINGIPROC)load("glGetStringi"); + glad_glIsRenderbuffer = (PFNGLISRENDERBUFFERPROC)load("glIsRenderbuffer"); + glad_glBindRenderbuffer = (PFNGLBINDRENDERBUFFERPROC)load("glBindRenderbuffer"); + glad_glDeleteRenderbuffers = (PFNGLDELETERENDERBUFFERSPROC)load("glDeleteRenderbuffers"); + glad_glGenRenderbuffers = (PFNGLGENRENDERBUFFERSPROC)load("glGenRenderbuffers"); + glad_glRenderbufferStorage = (PFNGLRENDERBUFFERSTORAGEPROC)load("glRenderbufferStorage"); + glad_glGetRenderbufferParameteriv = (PFNGLGETRENDERBUFFERPARAMETERIVPROC)load("glGetRenderbufferParameteriv"); + glad_glIsFramebuffer = (PFNGLISFRAMEBUFFERPROC)load("glIsFramebuffer"); + glad_glBindFramebuffer = (PFNGLBINDFRAMEBUFFERPROC)load("glBindFramebuffer"); + glad_glDeleteFramebuffers = (PFNGLDELETEFRAMEBUFFERSPROC)load("glDeleteFramebuffers"); + glad_glGenFramebuffers = (PFNGLGENFRAMEBUFFERSPROC)load("glGenFramebuffers"); + glad_glCheckFramebufferStatus = (PFNGLCHECKFRAMEBUFFERSTATUSPROC)load("glCheckFramebufferStatus"); + glad_glFramebufferTexture1D = (PFNGLFRAMEBUFFERTEXTURE1DPROC)load("glFramebufferTexture1D"); + glad_glFramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DPROC)load("glFramebufferTexture2D"); + glad_glFramebufferTexture3D = (PFNGLFRAMEBUFFERTEXTURE3DPROC)load("glFramebufferTexture3D"); + glad_glFramebufferRenderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFERPROC)load("glFramebufferRenderbuffer"); + glad_glGetFramebufferAttachmentParameteriv = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)load("glGetFramebufferAttachmentParameteriv"); + glad_glGenerateMipmap = (PFNGLGENERATEMIPMAPPROC)load("glGenerateMipmap"); + glad_glBlitFramebuffer = (PFNGLBLITFRAMEBUFFERPROC)load("glBlitFramebuffer"); + glad_glRenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC)load("glRenderbufferStorageMultisample"); + glad_glFramebufferTextureLayer = (PFNGLFRAMEBUFFERTEXTURELAYERPROC)load("glFramebufferTextureLayer"); + glad_glMapBufferRange = (PFNGLMAPBUFFERRANGEPROC)load("glMapBufferRange"); + glad_glFlushMappedBufferRange = (PFNGLFLUSHMAPPEDBUFFERRANGEPROC)load("glFlushMappedBufferRange"); + glad_glBindVertexArray = (PFNGLBINDVERTEXARRAYPROC)load("glBindVertexArray"); + glad_glDeleteVertexArrays = (PFNGLDELETEVERTEXARRAYSPROC)load("glDeleteVertexArrays"); + glad_glGenVertexArrays = (PFNGLGENVERTEXARRAYSPROC)load("glGenVertexArrays"); + glad_glIsVertexArray = (PFNGLISVERTEXARRAYPROC)load("glIsVertexArray"); +} +static void load_GL_VERSION_3_1(GLADloadproc load) { + if(!GLAD_GL_VERSION_3_1) return; + glad_glDrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDPROC)load("glDrawArraysInstanced"); + glad_glDrawElementsInstanced = (PFNGLDRAWELEMENTSINSTANCEDPROC)load("glDrawElementsInstanced"); + glad_glTexBuffer = (PFNGLTEXBUFFERPROC)load("glTexBuffer"); + glad_glPrimitiveRestartIndex = (PFNGLPRIMITIVERESTARTINDEXPROC)load("glPrimitiveRestartIndex"); + glad_glCopyBufferSubData = (PFNGLCOPYBUFFERSUBDATAPROC)load("glCopyBufferSubData"); + glad_glGetUniformIndices = (PFNGLGETUNIFORMINDICESPROC)load("glGetUniformIndices"); + glad_glGetActiveUniformsiv = (PFNGLGETACTIVEUNIFORMSIVPROC)load("glGetActiveUniformsiv"); + glad_glGetActiveUniformName = (PFNGLGETACTIVEUNIFORMNAMEPROC)load("glGetActiveUniformName"); + glad_glGetUniformBlockIndex = (PFNGLGETUNIFORMBLOCKINDEXPROC)load("glGetUniformBlockIndex"); + glad_glGetActiveUniformBlockiv = (PFNGLGETACTIVEUNIFORMBLOCKIVPROC)load("glGetActiveUniformBlockiv"); + glad_glGetActiveUniformBlockName = (PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC)load("glGetActiveUniformBlockName"); + glad_glUniformBlockBinding = (PFNGLUNIFORMBLOCKBINDINGPROC)load("glUniformBlockBinding"); + glad_glBindBufferRange = (PFNGLBINDBUFFERRANGEPROC)load("glBindBufferRange"); + glad_glBindBufferBase = (PFNGLBINDBUFFERBASEPROC)load("glBindBufferBase"); + glad_glGetIntegeri_v = (PFNGLGETINTEGERI_VPROC)load("glGetIntegeri_v"); +} +static void load_GL_VERSION_3_2(GLADloadproc load) { + if(!GLAD_GL_VERSION_3_2) return; + glad_glDrawElementsBaseVertex = (PFNGLDRAWELEMENTSBASEVERTEXPROC)load("glDrawElementsBaseVertex"); + glad_glDrawRangeElementsBaseVertex = (PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC)load("glDrawRangeElementsBaseVertex"); + glad_glDrawElementsInstancedBaseVertex = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC)load("glDrawElementsInstancedBaseVertex"); + glad_glMultiDrawElementsBaseVertex = (PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC)load("glMultiDrawElementsBaseVertex"); + glad_glProvokingVertex = (PFNGLPROVOKINGVERTEXPROC)load("glProvokingVertex"); + glad_glFenceSync = (PFNGLFENCESYNCPROC)load("glFenceSync"); + glad_glIsSync = (PFNGLISSYNCPROC)load("glIsSync"); + glad_glDeleteSync = (PFNGLDELETESYNCPROC)load("glDeleteSync"); + glad_glClientWaitSync = (PFNGLCLIENTWAITSYNCPROC)load("glClientWaitSync"); + glad_glWaitSync = (PFNGLWAITSYNCPROC)load("glWaitSync"); + glad_glGetInteger64v = (PFNGLGETINTEGER64VPROC)load("glGetInteger64v"); + glad_glGetSynciv = (PFNGLGETSYNCIVPROC)load("glGetSynciv"); + glad_glGetInteger64i_v = (PFNGLGETINTEGER64I_VPROC)load("glGetInteger64i_v"); + glad_glGetBufferParameteri64v = (PFNGLGETBUFFERPARAMETERI64VPROC)load("glGetBufferParameteri64v"); + glad_glFramebufferTexture = (PFNGLFRAMEBUFFERTEXTUREPROC)load("glFramebufferTexture"); + glad_glTexImage2DMultisample = (PFNGLTEXIMAGE2DMULTISAMPLEPROC)load("glTexImage2DMultisample"); + glad_glTexImage3DMultisample = (PFNGLTEXIMAGE3DMULTISAMPLEPROC)load("glTexImage3DMultisample"); + glad_glGetMultisamplefv = (PFNGLGETMULTISAMPLEFVPROC)load("glGetMultisamplefv"); + glad_glSampleMaski = (PFNGLSAMPLEMASKIPROC)load("glSampleMaski"); +} +static void load_GL_VERSION_3_3(GLADloadproc load) { + if(!GLAD_GL_VERSION_3_3) return; + glad_glBindFragDataLocationIndexed = (PFNGLBINDFRAGDATALOCATIONINDEXEDPROC)load("glBindFragDataLocationIndexed"); + glad_glGetFragDataIndex = (PFNGLGETFRAGDATAINDEXPROC)load("glGetFragDataIndex"); + glad_glGenSamplers = (PFNGLGENSAMPLERSPROC)load("glGenSamplers"); + glad_glDeleteSamplers = (PFNGLDELETESAMPLERSPROC)load("glDeleteSamplers"); + glad_glIsSampler = (PFNGLISSAMPLERPROC)load("glIsSampler"); + glad_glBindSampler = (PFNGLBINDSAMPLERPROC)load("glBindSampler"); + glad_glSamplerParameteri = (PFNGLSAMPLERPARAMETERIPROC)load("glSamplerParameteri"); + glad_glSamplerParameteriv = (PFNGLSAMPLERPARAMETERIVPROC)load("glSamplerParameteriv"); + glad_glSamplerParameterf = (PFNGLSAMPLERPARAMETERFPROC)load("glSamplerParameterf"); + glad_glSamplerParameterfv = (PFNGLSAMPLERPARAMETERFVPROC)load("glSamplerParameterfv"); + glad_glSamplerParameterIiv = (PFNGLSAMPLERPARAMETERIIVPROC)load("glSamplerParameterIiv"); + glad_glSamplerParameterIuiv = (PFNGLSAMPLERPARAMETERIUIVPROC)load("glSamplerParameterIuiv"); + glad_glGetSamplerParameteriv = (PFNGLGETSAMPLERPARAMETERIVPROC)load("glGetSamplerParameteriv"); + glad_glGetSamplerParameterIiv = (PFNGLGETSAMPLERPARAMETERIIVPROC)load("glGetSamplerParameterIiv"); + glad_glGetSamplerParameterfv = (PFNGLGETSAMPLERPARAMETERFVPROC)load("glGetSamplerParameterfv"); + glad_glGetSamplerParameterIuiv = (PFNGLGETSAMPLERPARAMETERIUIVPROC)load("glGetSamplerParameterIuiv"); + glad_glQueryCounter = (PFNGLQUERYCOUNTERPROC)load("glQueryCounter"); + glad_glGetQueryObjecti64v = (PFNGLGETQUERYOBJECTI64VPROC)load("glGetQueryObjecti64v"); + glad_glGetQueryObjectui64v = (PFNGLGETQUERYOBJECTUI64VPROC)load("glGetQueryObjectui64v"); + glad_glVertexAttribDivisor = (PFNGLVERTEXATTRIBDIVISORPROC)load("glVertexAttribDivisor"); + glad_glVertexAttribP1ui = (PFNGLVERTEXATTRIBP1UIPROC)load("glVertexAttribP1ui"); + glad_glVertexAttribP1uiv = (PFNGLVERTEXATTRIBP1UIVPROC)load("glVertexAttribP1uiv"); + glad_glVertexAttribP2ui = (PFNGLVERTEXATTRIBP2UIPROC)load("glVertexAttribP2ui"); + glad_glVertexAttribP2uiv = (PFNGLVERTEXATTRIBP2UIVPROC)load("glVertexAttribP2uiv"); + glad_glVertexAttribP3ui = (PFNGLVERTEXATTRIBP3UIPROC)load("glVertexAttribP3ui"); + glad_glVertexAttribP3uiv = (PFNGLVERTEXATTRIBP3UIVPROC)load("glVertexAttribP3uiv"); + glad_glVertexAttribP4ui = (PFNGLVERTEXATTRIBP4UIPROC)load("glVertexAttribP4ui"); + glad_glVertexAttribP4uiv = (PFNGLVERTEXATTRIBP4UIVPROC)load("glVertexAttribP4uiv"); + glad_glVertexP2ui = (PFNGLVERTEXP2UIPROC)load("glVertexP2ui"); + glad_glVertexP2uiv = (PFNGLVERTEXP2UIVPROC)load("glVertexP2uiv"); + glad_glVertexP3ui = (PFNGLVERTEXP3UIPROC)load("glVertexP3ui"); + glad_glVertexP3uiv = (PFNGLVERTEXP3UIVPROC)load("glVertexP3uiv"); + glad_glVertexP4ui = (PFNGLVERTEXP4UIPROC)load("glVertexP4ui"); + glad_glVertexP4uiv = (PFNGLVERTEXP4UIVPROC)load("glVertexP4uiv"); + glad_glTexCoordP1ui = (PFNGLTEXCOORDP1UIPROC)load("glTexCoordP1ui"); + glad_glTexCoordP1uiv = (PFNGLTEXCOORDP1UIVPROC)load("glTexCoordP1uiv"); + glad_glTexCoordP2ui = (PFNGLTEXCOORDP2UIPROC)load("glTexCoordP2ui"); + glad_glTexCoordP2uiv = (PFNGLTEXCOORDP2UIVPROC)load("glTexCoordP2uiv"); + glad_glTexCoordP3ui = (PFNGLTEXCOORDP3UIPROC)load("glTexCoordP3ui"); + glad_glTexCoordP3uiv = (PFNGLTEXCOORDP3UIVPROC)load("glTexCoordP3uiv"); + glad_glTexCoordP4ui = (PFNGLTEXCOORDP4UIPROC)load("glTexCoordP4ui"); + glad_glTexCoordP4uiv = (PFNGLTEXCOORDP4UIVPROC)load("glTexCoordP4uiv"); + glad_glMultiTexCoordP1ui = (PFNGLMULTITEXCOORDP1UIPROC)load("glMultiTexCoordP1ui"); + glad_glMultiTexCoordP1uiv = (PFNGLMULTITEXCOORDP1UIVPROC)load("glMultiTexCoordP1uiv"); + glad_glMultiTexCoordP2ui = (PFNGLMULTITEXCOORDP2UIPROC)load("glMultiTexCoordP2ui"); + glad_glMultiTexCoordP2uiv = (PFNGLMULTITEXCOORDP2UIVPROC)load("glMultiTexCoordP2uiv"); + glad_glMultiTexCoordP3ui = (PFNGLMULTITEXCOORDP3UIPROC)load("glMultiTexCoordP3ui"); + glad_glMultiTexCoordP3uiv = (PFNGLMULTITEXCOORDP3UIVPROC)load("glMultiTexCoordP3uiv"); + glad_glMultiTexCoordP4ui = (PFNGLMULTITEXCOORDP4UIPROC)load("glMultiTexCoordP4ui"); + glad_glMultiTexCoordP4uiv = (PFNGLMULTITEXCOORDP4UIVPROC)load("glMultiTexCoordP4uiv"); + glad_glNormalP3ui = (PFNGLNORMALP3UIPROC)load("glNormalP3ui"); + glad_glNormalP3uiv = (PFNGLNORMALP3UIVPROC)load("glNormalP3uiv"); + glad_glColorP3ui = (PFNGLCOLORP3UIPROC)load("glColorP3ui"); + glad_glColorP3uiv = (PFNGLCOLORP3UIVPROC)load("glColorP3uiv"); + glad_glColorP4ui = (PFNGLCOLORP4UIPROC)load("glColorP4ui"); + glad_glColorP4uiv = (PFNGLCOLORP4UIVPROC)load("glColorP4uiv"); + glad_glSecondaryColorP3ui = (PFNGLSECONDARYCOLORP3UIPROC)load("glSecondaryColorP3ui"); + glad_glSecondaryColorP3uiv = (PFNGLSECONDARYCOLORP3UIVPROC)load("glSecondaryColorP3uiv"); +} +static void load_GL_VERSION_4_0(GLADloadproc load) { + if(!GLAD_GL_VERSION_4_0) return; + glad_glMinSampleShading = (PFNGLMINSAMPLESHADINGPROC)load("glMinSampleShading"); + glad_glBlendEquationi = (PFNGLBLENDEQUATIONIPROC)load("glBlendEquationi"); + glad_glBlendEquationSeparatei = (PFNGLBLENDEQUATIONSEPARATEIPROC)load("glBlendEquationSeparatei"); + glad_glBlendFunci = (PFNGLBLENDFUNCIPROC)load("glBlendFunci"); + glad_glBlendFuncSeparatei = (PFNGLBLENDFUNCSEPARATEIPROC)load("glBlendFuncSeparatei"); + glad_glDrawArraysIndirect = (PFNGLDRAWARRAYSINDIRECTPROC)load("glDrawArraysIndirect"); + glad_glDrawElementsIndirect = (PFNGLDRAWELEMENTSINDIRECTPROC)load("glDrawElementsIndirect"); + glad_glUniform1d = (PFNGLUNIFORM1DPROC)load("glUniform1d"); + glad_glUniform2d = (PFNGLUNIFORM2DPROC)load("glUniform2d"); + glad_glUniform3d = (PFNGLUNIFORM3DPROC)load("glUniform3d"); + glad_glUniform4d = (PFNGLUNIFORM4DPROC)load("glUniform4d"); + glad_glUniform1dv = (PFNGLUNIFORM1DVPROC)load("glUniform1dv"); + glad_glUniform2dv = (PFNGLUNIFORM2DVPROC)load("glUniform2dv"); + glad_glUniform3dv = (PFNGLUNIFORM3DVPROC)load("glUniform3dv"); + glad_glUniform4dv = (PFNGLUNIFORM4DVPROC)load("glUniform4dv"); + glad_glUniformMatrix2dv = (PFNGLUNIFORMMATRIX2DVPROC)load("glUniformMatrix2dv"); + glad_glUniformMatrix3dv = (PFNGLUNIFORMMATRIX3DVPROC)load("glUniformMatrix3dv"); + glad_glUniformMatrix4dv = (PFNGLUNIFORMMATRIX4DVPROC)load("glUniformMatrix4dv"); + glad_glUniformMatrix2x3dv = (PFNGLUNIFORMMATRIX2X3DVPROC)load("glUniformMatrix2x3dv"); + glad_glUniformMatrix2x4dv = (PFNGLUNIFORMMATRIX2X4DVPROC)load("glUniformMatrix2x4dv"); + glad_glUniformMatrix3x2dv = (PFNGLUNIFORMMATRIX3X2DVPROC)load("glUniformMatrix3x2dv"); + glad_glUniformMatrix3x4dv = (PFNGLUNIFORMMATRIX3X4DVPROC)load("glUniformMatrix3x4dv"); + glad_glUniformMatrix4x2dv = (PFNGLUNIFORMMATRIX4X2DVPROC)load("glUniformMatrix4x2dv"); + glad_glUniformMatrix4x3dv = (PFNGLUNIFORMMATRIX4X3DVPROC)load("glUniformMatrix4x3dv"); + glad_glGetUniformdv = (PFNGLGETUNIFORMDVPROC)load("glGetUniformdv"); + glad_glGetSubroutineUniformLocation = (PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC)load("glGetSubroutineUniformLocation"); + glad_glGetSubroutineIndex = (PFNGLGETSUBROUTINEINDEXPROC)load("glGetSubroutineIndex"); + glad_glGetActiveSubroutineUniformiv = (PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC)load("glGetActiveSubroutineUniformiv"); + glad_glGetActiveSubroutineUniformName = (PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC)load("glGetActiveSubroutineUniformName"); + glad_glGetActiveSubroutineName = (PFNGLGETACTIVESUBROUTINENAMEPROC)load("glGetActiveSubroutineName"); + glad_glUniformSubroutinesuiv = (PFNGLUNIFORMSUBROUTINESUIVPROC)load("glUniformSubroutinesuiv"); + glad_glGetUniformSubroutineuiv = (PFNGLGETUNIFORMSUBROUTINEUIVPROC)load("glGetUniformSubroutineuiv"); + glad_glGetProgramStageiv = (PFNGLGETPROGRAMSTAGEIVPROC)load("glGetProgramStageiv"); + glad_glPatchParameteri = (PFNGLPATCHPARAMETERIPROC)load("glPatchParameteri"); + glad_glPatchParameterfv = (PFNGLPATCHPARAMETERFVPROC)load("glPatchParameterfv"); + glad_glBindTransformFeedback = (PFNGLBINDTRANSFORMFEEDBACKPROC)load("glBindTransformFeedback"); + glad_glDeleteTransformFeedbacks = (PFNGLDELETETRANSFORMFEEDBACKSPROC)load("glDeleteTransformFeedbacks"); + glad_glGenTransformFeedbacks = (PFNGLGENTRANSFORMFEEDBACKSPROC)load("glGenTransformFeedbacks"); + glad_glIsTransformFeedback = (PFNGLISTRANSFORMFEEDBACKPROC)load("glIsTransformFeedback"); + glad_glPauseTransformFeedback = (PFNGLPAUSETRANSFORMFEEDBACKPROC)load("glPauseTransformFeedback"); + glad_glResumeTransformFeedback = (PFNGLRESUMETRANSFORMFEEDBACKPROC)load("glResumeTransformFeedback"); + glad_glDrawTransformFeedback = (PFNGLDRAWTRANSFORMFEEDBACKPROC)load("glDrawTransformFeedback"); + glad_glDrawTransformFeedbackStream = (PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC)load("glDrawTransformFeedbackStream"); + glad_glBeginQueryIndexed = (PFNGLBEGINQUERYINDEXEDPROC)load("glBeginQueryIndexed"); + glad_glEndQueryIndexed = (PFNGLENDQUERYINDEXEDPROC)load("glEndQueryIndexed"); + glad_glGetQueryIndexediv = (PFNGLGETQUERYINDEXEDIVPROC)load("glGetQueryIndexediv"); +} +static void load_GL_VERSION_4_1(GLADloadproc load) { + if(!GLAD_GL_VERSION_4_1) return; + glad_glReleaseShaderCompiler = (PFNGLRELEASESHADERCOMPILERPROC)load("glReleaseShaderCompiler"); + glad_glShaderBinary = (PFNGLSHADERBINARYPROC)load("glShaderBinary"); + glad_glGetShaderPrecisionFormat = (PFNGLGETSHADERPRECISIONFORMATPROC)load("glGetShaderPrecisionFormat"); + glad_glDepthRangef = (PFNGLDEPTHRANGEFPROC)load("glDepthRangef"); + glad_glClearDepthf = (PFNGLCLEARDEPTHFPROC)load("glClearDepthf"); + glad_glGetProgramBinary = (PFNGLGETPROGRAMBINARYPROC)load("glGetProgramBinary"); + glad_glProgramBinary = (PFNGLPROGRAMBINARYPROC)load("glProgramBinary"); + glad_glProgramParameteri = (PFNGLPROGRAMPARAMETERIPROC)load("glProgramParameteri"); + glad_glUseProgramStages = (PFNGLUSEPROGRAMSTAGESPROC)load("glUseProgramStages"); + glad_glActiveShaderProgram = (PFNGLACTIVESHADERPROGRAMPROC)load("glActiveShaderProgram"); + glad_glCreateShaderProgramv = (PFNGLCREATESHADERPROGRAMVPROC)load("glCreateShaderProgramv"); + glad_glBindProgramPipeline = (PFNGLBINDPROGRAMPIPELINEPROC)load("glBindProgramPipeline"); + glad_glDeleteProgramPipelines = (PFNGLDELETEPROGRAMPIPELINESPROC)load("glDeleteProgramPipelines"); + glad_glGenProgramPipelines = (PFNGLGENPROGRAMPIPELINESPROC)load("glGenProgramPipelines"); + glad_glIsProgramPipeline = (PFNGLISPROGRAMPIPELINEPROC)load("glIsProgramPipeline"); + glad_glGetProgramPipelineiv = (PFNGLGETPROGRAMPIPELINEIVPROC)load("glGetProgramPipelineiv"); + glad_glProgramParameteri = (PFNGLPROGRAMPARAMETERIPROC)load("glProgramParameteri"); + glad_glProgramUniform1i = (PFNGLPROGRAMUNIFORM1IPROC)load("glProgramUniform1i"); + glad_glProgramUniform1iv = (PFNGLPROGRAMUNIFORM1IVPROC)load("glProgramUniform1iv"); + glad_glProgramUniform1f = (PFNGLPROGRAMUNIFORM1FPROC)load("glProgramUniform1f"); + glad_glProgramUniform1fv = (PFNGLPROGRAMUNIFORM1FVPROC)load("glProgramUniform1fv"); + glad_glProgramUniform1d = (PFNGLPROGRAMUNIFORM1DPROC)load("glProgramUniform1d"); + glad_glProgramUniform1dv = (PFNGLPROGRAMUNIFORM1DVPROC)load("glProgramUniform1dv"); + glad_glProgramUniform1ui = (PFNGLPROGRAMUNIFORM1UIPROC)load("glProgramUniform1ui"); + glad_glProgramUniform1uiv = (PFNGLPROGRAMUNIFORM1UIVPROC)load("glProgramUniform1uiv"); + glad_glProgramUniform2i = (PFNGLPROGRAMUNIFORM2IPROC)load("glProgramUniform2i"); + glad_glProgramUniform2iv = (PFNGLPROGRAMUNIFORM2IVPROC)load("glProgramUniform2iv"); + glad_glProgramUniform2f = (PFNGLPROGRAMUNIFORM2FPROC)load("glProgramUniform2f"); + glad_glProgramUniform2fv = (PFNGLPROGRAMUNIFORM2FVPROC)load("glProgramUniform2fv"); + glad_glProgramUniform2d = (PFNGLPROGRAMUNIFORM2DPROC)load("glProgramUniform2d"); + glad_glProgramUniform2dv = (PFNGLPROGRAMUNIFORM2DVPROC)load("glProgramUniform2dv"); + glad_glProgramUniform2ui = (PFNGLPROGRAMUNIFORM2UIPROC)load("glProgramUniform2ui"); + glad_glProgramUniform2uiv = (PFNGLPROGRAMUNIFORM2UIVPROC)load("glProgramUniform2uiv"); + glad_glProgramUniform3i = (PFNGLPROGRAMUNIFORM3IPROC)load("glProgramUniform3i"); + glad_glProgramUniform3iv = (PFNGLPROGRAMUNIFORM3IVPROC)load("glProgramUniform3iv"); + glad_glProgramUniform3f = (PFNGLPROGRAMUNIFORM3FPROC)load("glProgramUniform3f"); + glad_glProgramUniform3fv = (PFNGLPROGRAMUNIFORM3FVPROC)load("glProgramUniform3fv"); + glad_glProgramUniform3d = (PFNGLPROGRAMUNIFORM3DPROC)load("glProgramUniform3d"); + glad_glProgramUniform3dv = (PFNGLPROGRAMUNIFORM3DVPROC)load("glProgramUniform3dv"); + glad_glProgramUniform3ui = (PFNGLPROGRAMUNIFORM3UIPROC)load("glProgramUniform3ui"); + glad_glProgramUniform3uiv = (PFNGLPROGRAMUNIFORM3UIVPROC)load("glProgramUniform3uiv"); + glad_glProgramUniform4i = (PFNGLPROGRAMUNIFORM4IPROC)load("glProgramUniform4i"); + glad_glProgramUniform4iv = (PFNGLPROGRAMUNIFORM4IVPROC)load("glProgramUniform4iv"); + glad_glProgramUniform4f = (PFNGLPROGRAMUNIFORM4FPROC)load("glProgramUniform4f"); + glad_glProgramUniform4fv = (PFNGLPROGRAMUNIFORM4FVPROC)load("glProgramUniform4fv"); + glad_glProgramUniform4d = (PFNGLPROGRAMUNIFORM4DPROC)load("glProgramUniform4d"); + glad_glProgramUniform4dv = (PFNGLPROGRAMUNIFORM4DVPROC)load("glProgramUniform4dv"); + glad_glProgramUniform4ui = (PFNGLPROGRAMUNIFORM4UIPROC)load("glProgramUniform4ui"); + glad_glProgramUniform4uiv = (PFNGLPROGRAMUNIFORM4UIVPROC)load("glProgramUniform4uiv"); + glad_glProgramUniformMatrix2fv = (PFNGLPROGRAMUNIFORMMATRIX2FVPROC)load("glProgramUniformMatrix2fv"); + glad_glProgramUniformMatrix3fv = (PFNGLPROGRAMUNIFORMMATRIX3FVPROC)load("glProgramUniformMatrix3fv"); + glad_glProgramUniformMatrix4fv = (PFNGLPROGRAMUNIFORMMATRIX4FVPROC)load("glProgramUniformMatrix4fv"); + glad_glProgramUniformMatrix2dv = (PFNGLPROGRAMUNIFORMMATRIX2DVPROC)load("glProgramUniformMatrix2dv"); + glad_glProgramUniformMatrix3dv = (PFNGLPROGRAMUNIFORMMATRIX3DVPROC)load("glProgramUniformMatrix3dv"); + glad_glProgramUniformMatrix4dv = (PFNGLPROGRAMUNIFORMMATRIX4DVPROC)load("glProgramUniformMatrix4dv"); + glad_glProgramUniformMatrix2x3fv = (PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC)load("glProgramUniformMatrix2x3fv"); + glad_glProgramUniformMatrix3x2fv = (PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC)load("glProgramUniformMatrix3x2fv"); + glad_glProgramUniformMatrix2x4fv = (PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC)load("glProgramUniformMatrix2x4fv"); + glad_glProgramUniformMatrix4x2fv = (PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC)load("glProgramUniformMatrix4x2fv"); + glad_glProgramUniformMatrix3x4fv = (PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC)load("glProgramUniformMatrix3x4fv"); + glad_glProgramUniformMatrix4x3fv = (PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC)load("glProgramUniformMatrix4x3fv"); + glad_glProgramUniformMatrix2x3dv = (PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC)load("glProgramUniformMatrix2x3dv"); + glad_glProgramUniformMatrix3x2dv = (PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC)load("glProgramUniformMatrix3x2dv"); + glad_glProgramUniformMatrix2x4dv = (PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC)load("glProgramUniformMatrix2x4dv"); + glad_glProgramUniformMatrix4x2dv = (PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC)load("glProgramUniformMatrix4x2dv"); + glad_glProgramUniformMatrix3x4dv = (PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC)load("glProgramUniformMatrix3x4dv"); + glad_glProgramUniformMatrix4x3dv = (PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC)load("glProgramUniformMatrix4x3dv"); + glad_glValidateProgramPipeline = (PFNGLVALIDATEPROGRAMPIPELINEPROC)load("glValidateProgramPipeline"); + glad_glGetProgramPipelineInfoLog = (PFNGLGETPROGRAMPIPELINEINFOLOGPROC)load("glGetProgramPipelineInfoLog"); + glad_glVertexAttribL1d = (PFNGLVERTEXATTRIBL1DPROC)load("glVertexAttribL1d"); + glad_glVertexAttribL2d = (PFNGLVERTEXATTRIBL2DPROC)load("glVertexAttribL2d"); + glad_glVertexAttribL3d = (PFNGLVERTEXATTRIBL3DPROC)load("glVertexAttribL3d"); + glad_glVertexAttribL4d = (PFNGLVERTEXATTRIBL4DPROC)load("glVertexAttribL4d"); + glad_glVertexAttribL1dv = (PFNGLVERTEXATTRIBL1DVPROC)load("glVertexAttribL1dv"); + glad_glVertexAttribL2dv = (PFNGLVERTEXATTRIBL2DVPROC)load("glVertexAttribL2dv"); + glad_glVertexAttribL3dv = (PFNGLVERTEXATTRIBL3DVPROC)load("glVertexAttribL3dv"); + glad_glVertexAttribL4dv = (PFNGLVERTEXATTRIBL4DVPROC)load("glVertexAttribL4dv"); + glad_glVertexAttribLPointer = (PFNGLVERTEXATTRIBLPOINTERPROC)load("glVertexAttribLPointer"); + glad_glGetVertexAttribLdv = (PFNGLGETVERTEXATTRIBLDVPROC)load("glGetVertexAttribLdv"); + glad_glViewportArrayv = (PFNGLVIEWPORTARRAYVPROC)load("glViewportArrayv"); + glad_glViewportIndexedf = (PFNGLVIEWPORTINDEXEDFPROC)load("glViewportIndexedf"); + glad_glViewportIndexedfv = (PFNGLVIEWPORTINDEXEDFVPROC)load("glViewportIndexedfv"); + glad_glScissorArrayv = (PFNGLSCISSORARRAYVPROC)load("glScissorArrayv"); + glad_glScissorIndexed = (PFNGLSCISSORINDEXEDPROC)load("glScissorIndexed"); + glad_glScissorIndexedv = (PFNGLSCISSORINDEXEDVPROC)load("glScissorIndexedv"); + glad_glDepthRangeArrayv = (PFNGLDEPTHRANGEARRAYVPROC)load("glDepthRangeArrayv"); + glad_glDepthRangeIndexed = (PFNGLDEPTHRANGEINDEXEDPROC)load("glDepthRangeIndexed"); + glad_glGetFloati_v = (PFNGLGETFLOATI_VPROC)load("glGetFloati_v"); + glad_glGetDoublei_v = (PFNGLGETDOUBLEI_VPROC)load("glGetDoublei_v"); +} +static void load_GL_VERSION_4_2(GLADloadproc load) { + if(!GLAD_GL_VERSION_4_2) return; + glad_glDrawArraysInstancedBaseInstance = (PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC)load("glDrawArraysInstancedBaseInstance"); + glad_glDrawElementsInstancedBaseInstance = (PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC)load("glDrawElementsInstancedBaseInstance"); + glad_glDrawElementsInstancedBaseVertexBaseInstance = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC)load("glDrawElementsInstancedBaseVertexBaseInstance"); + glad_glGetInternalformativ = (PFNGLGETINTERNALFORMATIVPROC)load("glGetInternalformativ"); + glad_glGetActiveAtomicCounterBufferiv = (PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC)load("glGetActiveAtomicCounterBufferiv"); + glad_glBindImageTexture = (PFNGLBINDIMAGETEXTUREPROC)load("glBindImageTexture"); + glad_glMemoryBarrier = (PFNGLMEMORYBARRIERPROC)load("glMemoryBarrier"); + glad_glTexStorage1D = (PFNGLTEXSTORAGE1DPROC)load("glTexStorage1D"); + glad_glTexStorage2D = (PFNGLTEXSTORAGE2DPROC)load("glTexStorage2D"); + glad_glTexStorage3D = (PFNGLTEXSTORAGE3DPROC)load("glTexStorage3D"); + glad_glDrawTransformFeedbackInstanced = (PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC)load("glDrawTransformFeedbackInstanced"); + glad_glDrawTransformFeedbackStreamInstanced = (PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC)load("glDrawTransformFeedbackStreamInstanced"); +} +static void load_GL_VERSION_4_3(GLADloadproc load) { + if(!GLAD_GL_VERSION_4_3) return; + glad_glClearBufferData = (PFNGLCLEARBUFFERDATAPROC)load("glClearBufferData"); + glad_glClearBufferSubData = (PFNGLCLEARBUFFERSUBDATAPROC)load("glClearBufferSubData"); + glad_glDispatchCompute = (PFNGLDISPATCHCOMPUTEPROC)load("glDispatchCompute"); + glad_glDispatchComputeIndirect = (PFNGLDISPATCHCOMPUTEINDIRECTPROC)load("glDispatchComputeIndirect"); + glad_glCopyImageSubData = (PFNGLCOPYIMAGESUBDATAPROC)load("glCopyImageSubData"); + glad_glFramebufferParameteri = (PFNGLFRAMEBUFFERPARAMETERIPROC)load("glFramebufferParameteri"); + glad_glGetFramebufferParameteriv = (PFNGLGETFRAMEBUFFERPARAMETERIVPROC)load("glGetFramebufferParameteriv"); + glad_glGetInternalformati64v = (PFNGLGETINTERNALFORMATI64VPROC)load("glGetInternalformati64v"); + glad_glInvalidateTexSubImage = (PFNGLINVALIDATETEXSUBIMAGEPROC)load("glInvalidateTexSubImage"); + glad_glInvalidateTexImage = (PFNGLINVALIDATETEXIMAGEPROC)load("glInvalidateTexImage"); + glad_glInvalidateBufferSubData = (PFNGLINVALIDATEBUFFERSUBDATAPROC)load("glInvalidateBufferSubData"); + glad_glInvalidateBufferData = (PFNGLINVALIDATEBUFFERDATAPROC)load("glInvalidateBufferData"); + glad_glInvalidateFramebuffer = (PFNGLINVALIDATEFRAMEBUFFERPROC)load("glInvalidateFramebuffer"); + glad_glInvalidateSubFramebuffer = (PFNGLINVALIDATESUBFRAMEBUFFERPROC)load("glInvalidateSubFramebuffer"); + glad_glMultiDrawArraysIndirect = (PFNGLMULTIDRAWARRAYSINDIRECTPROC)load("glMultiDrawArraysIndirect"); + glad_glMultiDrawElementsIndirect = (PFNGLMULTIDRAWELEMENTSINDIRECTPROC)load("glMultiDrawElementsIndirect"); + glad_glGetProgramInterfaceiv = (PFNGLGETPROGRAMINTERFACEIVPROC)load("glGetProgramInterfaceiv"); + glad_glGetProgramResourceIndex = (PFNGLGETPROGRAMRESOURCEINDEXPROC)load("glGetProgramResourceIndex"); + glad_glGetProgramResourceName = (PFNGLGETPROGRAMRESOURCENAMEPROC)load("glGetProgramResourceName"); + glad_glGetProgramResourceiv = (PFNGLGETPROGRAMRESOURCEIVPROC)load("glGetProgramResourceiv"); + glad_glGetProgramResourceLocation = (PFNGLGETPROGRAMRESOURCELOCATIONPROC)load("glGetProgramResourceLocation"); + glad_glGetProgramResourceLocationIndex = (PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC)load("glGetProgramResourceLocationIndex"); + glad_glShaderStorageBlockBinding = (PFNGLSHADERSTORAGEBLOCKBINDINGPROC)load("glShaderStorageBlockBinding"); + glad_glTexBufferRange = (PFNGLTEXBUFFERRANGEPROC)load("glTexBufferRange"); + glad_glTexStorage2DMultisample = (PFNGLTEXSTORAGE2DMULTISAMPLEPROC)load("glTexStorage2DMultisample"); + glad_glTexStorage3DMultisample = (PFNGLTEXSTORAGE3DMULTISAMPLEPROC)load("glTexStorage3DMultisample"); + glad_glTextureView = (PFNGLTEXTUREVIEWPROC)load("glTextureView"); + glad_glBindVertexBuffer = (PFNGLBINDVERTEXBUFFERPROC)load("glBindVertexBuffer"); + glad_glVertexAttribFormat = (PFNGLVERTEXATTRIBFORMATPROC)load("glVertexAttribFormat"); + glad_glVertexAttribIFormat = (PFNGLVERTEXATTRIBIFORMATPROC)load("glVertexAttribIFormat"); + glad_glVertexAttribLFormat = (PFNGLVERTEXATTRIBLFORMATPROC)load("glVertexAttribLFormat"); + glad_glVertexAttribBinding = (PFNGLVERTEXATTRIBBINDINGPROC)load("glVertexAttribBinding"); + glad_glVertexBindingDivisor = (PFNGLVERTEXBINDINGDIVISORPROC)load("glVertexBindingDivisor"); + glad_glDebugMessageControl = (PFNGLDEBUGMESSAGECONTROLPROC)load("glDebugMessageControl"); + glad_glDebugMessageInsert = (PFNGLDEBUGMESSAGEINSERTPROC)load("glDebugMessageInsert"); + glad_glDebugMessageCallback = (PFNGLDEBUGMESSAGECALLBACKPROC)load("glDebugMessageCallback"); + glad_glGetDebugMessageLog = (PFNGLGETDEBUGMESSAGELOGPROC)load("glGetDebugMessageLog"); + glad_glPushDebugGroup = (PFNGLPUSHDEBUGGROUPPROC)load("glPushDebugGroup"); + glad_glPopDebugGroup = (PFNGLPOPDEBUGGROUPPROC)load("glPopDebugGroup"); + glad_glObjectLabel = (PFNGLOBJECTLABELPROC)load("glObjectLabel"); + glad_glGetObjectLabel = (PFNGLGETOBJECTLABELPROC)load("glGetObjectLabel"); + glad_glObjectPtrLabel = (PFNGLOBJECTPTRLABELPROC)load("glObjectPtrLabel"); + glad_glGetObjectPtrLabel = (PFNGLGETOBJECTPTRLABELPROC)load("glGetObjectPtrLabel"); + glad_glGetPointerv = (PFNGLGETPOINTERVPROC)load("glGetPointerv"); +} +static void load_GL_VERSION_4_4(GLADloadproc load) { + if(!GLAD_GL_VERSION_4_4) return; + glad_glBufferStorage = (PFNGLBUFFERSTORAGEPROC)load("glBufferStorage"); + glad_glClearTexImage = (PFNGLCLEARTEXIMAGEPROC)load("glClearTexImage"); + glad_glClearTexSubImage = (PFNGLCLEARTEXSUBIMAGEPROC)load("glClearTexSubImage"); + glad_glBindBuffersBase = (PFNGLBINDBUFFERSBASEPROC)load("glBindBuffersBase"); + glad_glBindBuffersRange = (PFNGLBINDBUFFERSRANGEPROC)load("glBindBuffersRange"); + glad_glBindTextures = (PFNGLBINDTEXTURESPROC)load("glBindTextures"); + glad_glBindSamplers = (PFNGLBINDSAMPLERSPROC)load("glBindSamplers"); + glad_glBindImageTextures = (PFNGLBINDIMAGETEXTURESPROC)load("glBindImageTextures"); + glad_glBindVertexBuffers = (PFNGLBINDVERTEXBUFFERSPROC)load("glBindVertexBuffers"); +} +static void load_GL_VERSION_4_5(GLADloadproc load) { + if(!GLAD_GL_VERSION_4_5) return; + glad_glClipControl = (PFNGLCLIPCONTROLPROC)load("glClipControl"); + glad_glCreateTransformFeedbacks = (PFNGLCREATETRANSFORMFEEDBACKSPROC)load("glCreateTransformFeedbacks"); + glad_glTransformFeedbackBufferBase = (PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC)load("glTransformFeedbackBufferBase"); + glad_glTransformFeedbackBufferRange = (PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC)load("glTransformFeedbackBufferRange"); + glad_glGetTransformFeedbackiv = (PFNGLGETTRANSFORMFEEDBACKIVPROC)load("glGetTransformFeedbackiv"); + glad_glGetTransformFeedbacki_v = (PFNGLGETTRANSFORMFEEDBACKI_VPROC)load("glGetTransformFeedbacki_v"); + glad_glGetTransformFeedbacki64_v = (PFNGLGETTRANSFORMFEEDBACKI64_VPROC)load("glGetTransformFeedbacki64_v"); + glad_glCreateBuffers = (PFNGLCREATEBUFFERSPROC)load("glCreateBuffers"); + glad_glNamedBufferStorage = (PFNGLNAMEDBUFFERSTORAGEPROC)load("glNamedBufferStorage"); + glad_glNamedBufferData = (PFNGLNAMEDBUFFERDATAPROC)load("glNamedBufferData"); + glad_glNamedBufferSubData = (PFNGLNAMEDBUFFERSUBDATAPROC)load("glNamedBufferSubData"); + glad_glCopyNamedBufferSubData = (PFNGLCOPYNAMEDBUFFERSUBDATAPROC)load("glCopyNamedBufferSubData"); + glad_glClearNamedBufferData = (PFNGLCLEARNAMEDBUFFERDATAPROC)load("glClearNamedBufferData"); + glad_glClearNamedBufferSubData = (PFNGLCLEARNAMEDBUFFERSUBDATAPROC)load("glClearNamedBufferSubData"); + glad_glMapNamedBuffer = (PFNGLMAPNAMEDBUFFERPROC)load("glMapNamedBuffer"); + glad_glMapNamedBufferRange = (PFNGLMAPNAMEDBUFFERRANGEPROC)load("glMapNamedBufferRange"); + glad_glUnmapNamedBuffer = (PFNGLUNMAPNAMEDBUFFERPROC)load("glUnmapNamedBuffer"); + glad_glFlushMappedNamedBufferRange = (PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC)load("glFlushMappedNamedBufferRange"); + glad_glGetNamedBufferParameteriv = (PFNGLGETNAMEDBUFFERPARAMETERIVPROC)load("glGetNamedBufferParameteriv"); + glad_glGetNamedBufferParameteri64v = (PFNGLGETNAMEDBUFFERPARAMETERI64VPROC)load("glGetNamedBufferParameteri64v"); + glad_glGetNamedBufferPointerv = (PFNGLGETNAMEDBUFFERPOINTERVPROC)load("glGetNamedBufferPointerv"); + glad_glGetNamedBufferSubData = (PFNGLGETNAMEDBUFFERSUBDATAPROC)load("glGetNamedBufferSubData"); + glad_glCreateFramebuffers = (PFNGLCREATEFRAMEBUFFERSPROC)load("glCreateFramebuffers"); + glad_glNamedFramebufferRenderbuffer = (PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC)load("glNamedFramebufferRenderbuffer"); + glad_glNamedFramebufferParameteri = (PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC)load("glNamedFramebufferParameteri"); + glad_glNamedFramebufferTexture = (PFNGLNAMEDFRAMEBUFFERTEXTUREPROC)load("glNamedFramebufferTexture"); + glad_glNamedFramebufferTextureLayer = (PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC)load("glNamedFramebufferTextureLayer"); + glad_glNamedFramebufferDrawBuffer = (PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC)load("glNamedFramebufferDrawBuffer"); + glad_glNamedFramebufferDrawBuffers = (PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC)load("glNamedFramebufferDrawBuffers"); + glad_glNamedFramebufferReadBuffer = (PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC)load("glNamedFramebufferReadBuffer"); + glad_glInvalidateNamedFramebufferData = (PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC)load("glInvalidateNamedFramebufferData"); + glad_glInvalidateNamedFramebufferSubData = (PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC)load("glInvalidateNamedFramebufferSubData"); + glad_glClearNamedFramebufferiv = (PFNGLCLEARNAMEDFRAMEBUFFERIVPROC)load("glClearNamedFramebufferiv"); + glad_glClearNamedFramebufferuiv = (PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC)load("glClearNamedFramebufferuiv"); + glad_glClearNamedFramebufferfv = (PFNGLCLEARNAMEDFRAMEBUFFERFVPROC)load("glClearNamedFramebufferfv"); + glad_glClearNamedFramebufferfi = (PFNGLCLEARNAMEDFRAMEBUFFERFIPROC)load("glClearNamedFramebufferfi"); + glad_glBlitNamedFramebuffer = (PFNGLBLITNAMEDFRAMEBUFFERPROC)load("glBlitNamedFramebuffer"); + glad_glCheckNamedFramebufferStatus = (PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC)load("glCheckNamedFramebufferStatus"); + glad_glGetNamedFramebufferParameteriv = (PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC)load("glGetNamedFramebufferParameteriv"); + glad_glGetNamedFramebufferAttachmentParameteriv = (PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC)load("glGetNamedFramebufferAttachmentParameteriv"); + glad_glCreateRenderbuffers = (PFNGLCREATERENDERBUFFERSPROC)load("glCreateRenderbuffers"); + glad_glNamedRenderbufferStorage = (PFNGLNAMEDRENDERBUFFERSTORAGEPROC)load("glNamedRenderbufferStorage"); + glad_glNamedRenderbufferStorageMultisample = (PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC)load("glNamedRenderbufferStorageMultisample"); + glad_glGetNamedRenderbufferParameteriv = (PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC)load("glGetNamedRenderbufferParameteriv"); + glad_glCreateTextures = (PFNGLCREATETEXTURESPROC)load("glCreateTextures"); + glad_glTextureBuffer = (PFNGLTEXTUREBUFFERPROC)load("glTextureBuffer"); + glad_glTextureBufferRange = (PFNGLTEXTUREBUFFERRANGEPROC)load("glTextureBufferRange"); + glad_glTextureStorage1D = (PFNGLTEXTURESTORAGE1DPROC)load("glTextureStorage1D"); + glad_glTextureStorage2D = (PFNGLTEXTURESTORAGE2DPROC)load("glTextureStorage2D"); + glad_glTextureStorage3D = (PFNGLTEXTURESTORAGE3DPROC)load("glTextureStorage3D"); + glad_glTextureStorage2DMultisample = (PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC)load("glTextureStorage2DMultisample"); + glad_glTextureStorage3DMultisample = (PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC)load("glTextureStorage3DMultisample"); + glad_glTextureSubImage1D = (PFNGLTEXTURESUBIMAGE1DPROC)load("glTextureSubImage1D"); + glad_glTextureSubImage2D = (PFNGLTEXTURESUBIMAGE2DPROC)load("glTextureSubImage2D"); + glad_glTextureSubImage3D = (PFNGLTEXTURESUBIMAGE3DPROC)load("glTextureSubImage3D"); + glad_glCompressedTextureSubImage1D = (PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC)load("glCompressedTextureSubImage1D"); + glad_glCompressedTextureSubImage2D = (PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC)load("glCompressedTextureSubImage2D"); + glad_glCompressedTextureSubImage3D = (PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC)load("glCompressedTextureSubImage3D"); + glad_glCopyTextureSubImage1D = (PFNGLCOPYTEXTURESUBIMAGE1DPROC)load("glCopyTextureSubImage1D"); + glad_glCopyTextureSubImage2D = (PFNGLCOPYTEXTURESUBIMAGE2DPROC)load("glCopyTextureSubImage2D"); + glad_glCopyTextureSubImage3D = (PFNGLCOPYTEXTURESUBIMAGE3DPROC)load("glCopyTextureSubImage3D"); + glad_glTextureParameterf = (PFNGLTEXTUREPARAMETERFPROC)load("glTextureParameterf"); + glad_glTextureParameterfv = (PFNGLTEXTUREPARAMETERFVPROC)load("glTextureParameterfv"); + glad_glTextureParameteri = (PFNGLTEXTUREPARAMETERIPROC)load("glTextureParameteri"); + glad_glTextureParameterIiv = (PFNGLTEXTUREPARAMETERIIVPROC)load("glTextureParameterIiv"); + glad_glTextureParameterIuiv = (PFNGLTEXTUREPARAMETERIUIVPROC)load("glTextureParameterIuiv"); + glad_glTextureParameteriv = (PFNGLTEXTUREPARAMETERIVPROC)load("glTextureParameteriv"); + glad_glGenerateTextureMipmap = (PFNGLGENERATETEXTUREMIPMAPPROC)load("glGenerateTextureMipmap"); + glad_glBindTextureUnit = (PFNGLBINDTEXTUREUNITPROC)load("glBindTextureUnit"); + glad_glGetTextureImage = (PFNGLGETTEXTUREIMAGEPROC)load("glGetTextureImage"); + glad_glGetCompressedTextureImage = (PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC)load("glGetCompressedTextureImage"); + glad_glGetTextureLevelParameterfv = (PFNGLGETTEXTURELEVELPARAMETERFVPROC)load("glGetTextureLevelParameterfv"); + glad_glGetTextureLevelParameteriv = (PFNGLGETTEXTURELEVELPARAMETERIVPROC)load("glGetTextureLevelParameteriv"); + glad_glGetTextureParameterfv = (PFNGLGETTEXTUREPARAMETERFVPROC)load("glGetTextureParameterfv"); + glad_glGetTextureParameterIiv = (PFNGLGETTEXTUREPARAMETERIIVPROC)load("glGetTextureParameterIiv"); + glad_glGetTextureParameterIuiv = (PFNGLGETTEXTUREPARAMETERIUIVPROC)load("glGetTextureParameterIuiv"); + glad_glGetTextureParameteriv = (PFNGLGETTEXTUREPARAMETERIVPROC)load("glGetTextureParameteriv"); + glad_glCreateVertexArrays = (PFNGLCREATEVERTEXARRAYSPROC)load("glCreateVertexArrays"); + glad_glDisableVertexArrayAttrib = (PFNGLDISABLEVERTEXARRAYATTRIBPROC)load("glDisableVertexArrayAttrib"); + glad_glEnableVertexArrayAttrib = (PFNGLENABLEVERTEXARRAYATTRIBPROC)load("glEnableVertexArrayAttrib"); + glad_glVertexArrayElementBuffer = (PFNGLVERTEXARRAYELEMENTBUFFERPROC)load("glVertexArrayElementBuffer"); + glad_glVertexArrayVertexBuffer = (PFNGLVERTEXARRAYVERTEXBUFFERPROC)load("glVertexArrayVertexBuffer"); + glad_glVertexArrayVertexBuffers = (PFNGLVERTEXARRAYVERTEXBUFFERSPROC)load("glVertexArrayVertexBuffers"); + glad_glVertexArrayAttribBinding = (PFNGLVERTEXARRAYATTRIBBINDINGPROC)load("glVertexArrayAttribBinding"); + glad_glVertexArrayAttribFormat = (PFNGLVERTEXARRAYATTRIBFORMATPROC)load("glVertexArrayAttribFormat"); + glad_glVertexArrayAttribIFormat = (PFNGLVERTEXARRAYATTRIBIFORMATPROC)load("glVertexArrayAttribIFormat"); + glad_glVertexArrayAttribLFormat = (PFNGLVERTEXARRAYATTRIBLFORMATPROC)load("glVertexArrayAttribLFormat"); + glad_glVertexArrayBindingDivisor = (PFNGLVERTEXARRAYBINDINGDIVISORPROC)load("glVertexArrayBindingDivisor"); + glad_glGetVertexArrayiv = (PFNGLGETVERTEXARRAYIVPROC)load("glGetVertexArrayiv"); + glad_glGetVertexArrayIndexediv = (PFNGLGETVERTEXARRAYINDEXEDIVPROC)load("glGetVertexArrayIndexediv"); + glad_glGetVertexArrayIndexed64iv = (PFNGLGETVERTEXARRAYINDEXED64IVPROC)load("glGetVertexArrayIndexed64iv"); + glad_glCreateSamplers = (PFNGLCREATESAMPLERSPROC)load("glCreateSamplers"); + glad_glCreateProgramPipelines = (PFNGLCREATEPROGRAMPIPELINESPROC)load("glCreateProgramPipelines"); + glad_glCreateQueries = (PFNGLCREATEQUERIESPROC)load("glCreateQueries"); + glad_glGetQueryBufferObjecti64v = (PFNGLGETQUERYBUFFEROBJECTI64VPROC)load("glGetQueryBufferObjecti64v"); + glad_glGetQueryBufferObjectiv = (PFNGLGETQUERYBUFFEROBJECTIVPROC)load("glGetQueryBufferObjectiv"); + glad_glGetQueryBufferObjectui64v = (PFNGLGETQUERYBUFFEROBJECTUI64VPROC)load("glGetQueryBufferObjectui64v"); + glad_glGetQueryBufferObjectuiv = (PFNGLGETQUERYBUFFEROBJECTUIVPROC)load("glGetQueryBufferObjectuiv"); + glad_glMemoryBarrierByRegion = (PFNGLMEMORYBARRIERBYREGIONPROC)load("glMemoryBarrierByRegion"); + glad_glGetTextureSubImage = (PFNGLGETTEXTURESUBIMAGEPROC)load("glGetTextureSubImage"); + glad_glGetCompressedTextureSubImage = (PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC)load("glGetCompressedTextureSubImage"); + glad_glGetGraphicsResetStatus = (PFNGLGETGRAPHICSRESETSTATUSPROC)load("glGetGraphicsResetStatus"); + glad_glGetnCompressedTexImage = (PFNGLGETNCOMPRESSEDTEXIMAGEPROC)load("glGetnCompressedTexImage"); + glad_glGetnTexImage = (PFNGLGETNTEXIMAGEPROC)load("glGetnTexImage"); + glad_glGetnUniformdv = (PFNGLGETNUNIFORMDVPROC)load("glGetnUniformdv"); + glad_glGetnUniformfv = (PFNGLGETNUNIFORMFVPROC)load("glGetnUniformfv"); + glad_glGetnUniformiv = (PFNGLGETNUNIFORMIVPROC)load("glGetnUniformiv"); + glad_glGetnUniformuiv = (PFNGLGETNUNIFORMUIVPROC)load("glGetnUniformuiv"); + glad_glReadnPixels = (PFNGLREADNPIXELSPROC)load("glReadnPixels"); + glad_glGetnMapdv = (PFNGLGETNMAPDVPROC)load("glGetnMapdv"); + glad_glGetnMapfv = (PFNGLGETNMAPFVPROC)load("glGetnMapfv"); + glad_glGetnMapiv = (PFNGLGETNMAPIVPROC)load("glGetnMapiv"); + glad_glGetnPixelMapfv = (PFNGLGETNPIXELMAPFVPROC)load("glGetnPixelMapfv"); + glad_glGetnPixelMapuiv = (PFNGLGETNPIXELMAPUIVPROC)load("glGetnPixelMapuiv"); + glad_glGetnPixelMapusv = (PFNGLGETNPIXELMAPUSVPROC)load("glGetnPixelMapusv"); + glad_glGetnPolygonStipple = (PFNGLGETNPOLYGONSTIPPLEPROC)load("glGetnPolygonStipple"); + glad_glGetnColorTable = (PFNGLGETNCOLORTABLEPROC)load("glGetnColorTable"); + glad_glGetnConvolutionFilter = (PFNGLGETNCONVOLUTIONFILTERPROC)load("glGetnConvolutionFilter"); + glad_glGetnSeparableFilter = (PFNGLGETNSEPARABLEFILTERPROC)load("glGetnSeparableFilter"); + glad_glGetnHistogram = (PFNGLGETNHISTOGRAMPROC)load("glGetnHistogram"); + glad_glGetnMinmax = (PFNGLGETNMINMAXPROC)load("glGetnMinmax"); + glad_glTextureBarrier = (PFNGLTEXTUREBARRIERPROC)load("glTextureBarrier"); +} +static int find_extensionsGL(void) { + if (!get_exts()) return 0; + (void)&has_ext; + free_exts(); + return 1; +} + +static void find_coreGL(void) { + + /* Thank you @elmindreda + * https://github.com/elmindreda/greg/blob/master/templates/greg.c.in#L176 + * https://github.com/glfw/glfw/blob/master/src/context.c#L36 + */ + int i, major, minor; + + const char* version; + const char* prefixes[] = { + "OpenGL ES-CM ", + "OpenGL ES-CL ", + "OpenGL ES ", + NULL + }; + + version = (const char*) glGetString(GL_VERSION); + if (!version) return; + + for (i = 0; prefixes[i]; i++) { + const size_t length = strlen(prefixes[i]); + if (strncmp(version, prefixes[i], length) == 0) { + version += length; + break; + } + } + +/* PR #18 */ +#ifdef _MSC_VER + sscanf_s(version, "%d.%d", &major, &minor); +#else + sscanf(version, "%d.%d", &major, &minor); +#endif + + GLVersion.major = major; GLVersion.minor = minor; + max_loaded_major = major; max_loaded_minor = minor; + GLAD_GL_VERSION_1_0 = (major == 1 && minor >= 0) || major > 1; + GLAD_GL_VERSION_1_1 = (major == 1 && minor >= 1) || major > 1; + GLAD_GL_VERSION_1_2 = (major == 1 && minor >= 2) || major > 1; + GLAD_GL_VERSION_1_3 = (major == 1 && minor >= 3) || major > 1; + GLAD_GL_VERSION_1_4 = (major == 1 && minor >= 4) || major > 1; + GLAD_GL_VERSION_1_5 = (major == 1 && minor >= 5) || major > 1; + GLAD_GL_VERSION_2_0 = (major == 2 && minor >= 0) || major > 2; + GLAD_GL_VERSION_2_1 = (major == 2 && minor >= 1) || major > 2; + GLAD_GL_VERSION_3_0 = (major == 3 && minor >= 0) || major > 3; + GLAD_GL_VERSION_3_1 = (major == 3 && minor >= 1) || major > 3; + GLAD_GL_VERSION_3_2 = (major == 3 && minor >= 2) || major > 3; + GLAD_GL_VERSION_3_3 = (major == 3 && minor >= 3) || major > 3; + GLAD_GL_VERSION_4_0 = (major == 4 && minor >= 0) || major > 4; + GLAD_GL_VERSION_4_1 = (major == 4 && minor >= 1) || major > 4; + GLAD_GL_VERSION_4_2 = (major == 4 && minor >= 2) || major > 4; + GLAD_GL_VERSION_4_3 = (major == 4 && minor >= 3) || major > 4; + GLAD_GL_VERSION_4_4 = (major == 4 && minor >= 4) || major > 4; + GLAD_GL_VERSION_4_5 = (major == 4 && minor >= 5) || major > 4; + if (GLVersion.major > 4 || (GLVersion.major >= 4 && GLVersion.minor >= 5)) { + max_loaded_major = 4; + max_loaded_minor = 5; + } +} + +int gladLoadGLLoader(GLADloadproc load) { + GLVersion.major = 0; GLVersion.minor = 0; + glGetString = (PFNGLGETSTRINGPROC)load("glGetString"); + if(glGetString == NULL) return 0; + if(glGetString(GL_VERSION) == NULL) return 0; + find_coreGL(); + load_GL_VERSION_1_0(load); + load_GL_VERSION_1_1(load); + load_GL_VERSION_1_2(load); + load_GL_VERSION_1_3(load); + load_GL_VERSION_1_4(load); + load_GL_VERSION_1_5(load); + load_GL_VERSION_2_0(load); + load_GL_VERSION_2_1(load); + load_GL_VERSION_3_0(load); + load_GL_VERSION_3_1(load); + load_GL_VERSION_3_2(load); + load_GL_VERSION_3_3(load); + load_GL_VERSION_4_0(load); + load_GL_VERSION_4_1(load); + load_GL_VERSION_4_2(load); + load_GL_VERSION_4_3(load); + load_GL_VERSION_4_4(load); + load_GL_VERSION_4_5(load); + + if (!find_extensionsGL()) return 0; + return GLVersion.major != 0 || GLVersion.minor != 0; +} + diff --git a/frontends/gl/main.c b/frontends/gl/main.c index 6c8d047..06ddab6 100644 --- a/frontends/gl/main.c +++ b/frontends/gl/main.c @@ -1,226 +1,226 @@ -#include - -#include -#include - -#define STB_IMAGE_IMPLEMENTATION -#include "stb_image.h" - -#include - -const char *vertex_shader_source = "#version 450 core\n" - "layout (location = 0) in vec3 aPos;\n" - "layout (location = 1) in vec3 aColor;\n" - "layout (location = 2) in vec2 aTexCoord;\n" - "out vec3 ourColor;\n" - "out vec2 TexCoord;\n" - "void main()\n" - "{\n" - " gl_Position = vec4(aPos, 1.0);\n" - " ourColor = aColor;\n" - " TexCoord = aTexCoord;\n" - "}\0"; - -const char *fragment_shader_source = "#version 450 core\n" - "out vec4 FragColor;\n" - "in vec3 ourColor;\n" - "in vec2 TexCoord;\n" - "uniform sampler2D ourTexture;\n" - "void main()\n" - "{\n" - " FragColor = texture(ourTexture, TexCoord) * vec4(ourColor, 1.0);\n" - "}\n\0"; - - -GLuint shader_program; - -GLfloat default_rect[32] = { - // positions // colors // texture coords - 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, // top right - 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, // bottom right - 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, // bottom left - 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f // top left -}; - -typedef struct { - GLfloat r; - GLfloat g; - GLfloat b; -} rbg_color; - -GLuint indices[] = { - 0, 1, 3, // first triangle - 1, 2, 3 // second triangle -}; - -rbg_color colors[8] = { - {0.0f, 0.0f, 0.0f}, // Black - {0.127f,0.219f,0.255f}, // Aqua - {0.61f,0.153f,0.112f}, // Olive - {0.177f,0.13f,0.201f}, // Purple - {0.240f,0.18f,0.190f}, // Fuchsia - {0.255f,0.133f,0.27f}, // Orange - {0.0f,0.31f,0.63f}, // Navy - {0.255f,0.220f,0.0f} // Yellow -}; - -struct block_drawable { - GLuint vao; - GLuint vbo; - GLuint ebo; - GLuint texture; -}; - -void framebuffer_size_callback(GLFWwindow* window, int width, int height) { - glViewport(0, 0, width, height); -} - -void process_input(GLFWwindow *window) { - if (glfwGetKey(window, GLFW_KEY_ESCAPE) == GLFW_PRESS) - glfwSetWindowShouldClose(window, 1); -} - -void load_texture(char *file_name, GLuint texture) { - int w, h, channel; - unsigned char *data = stbi_load(file_name, &w, &h, &channel, 0); - glBindTexture(GL_TEXTURE_2D, texture); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, w, h, 0, GL_RGB, GL_UNSIGNED_BYTE, data); - glGenerateMipmap(GL_TEXTURE_2D); - stbi_image_free(data); -} - -void load_vertex_shader(GLuint program) { - GLint vertex_shader; - vertex_shader = glCreateShader(GL_VERTEX_SHADER); - - glShaderSource(vertex_shader, 1, &vertex_shader_source, NULL); - glCompileShader(vertex_shader); - glAttachShader(program, vertex_shader); - glDeleteShader(vertex_shader); -} - -void load_fragment_shader(GLuint program) { - GLint fragment_shader; - fragment_shader = glCreateShader(GL_FRAGMENT_SHADER); - - glShaderSource(fragment_shader, 1, &fragment_shader_source, NULL); - glCompileShader(fragment_shader); - glAttachShader(program, fragment_shader); - glDeleteShader(fragment_shader); -} - -void create_block(struct block_drawable *b) { - glGenVertexArrays(1, &b->vao); - glGenBuffers(1, &b->vbo); - glGenBuffers(1, &b->ebo); - glGenTextures(1, &b->texture); - - glBindVertexArray(b->vao); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, b->ebo); - glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(indices), indices, GL_STATIC_DRAW); - - glBindBuffer(GL_ARRAY_BUFFER, b->vbo); - glBufferData(GL_ARRAY_BUFFER, 32 * sizeof(GLfloat), default_rect, GL_DYNAMIC_DRAW); - - glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 8 * sizeof(GLfloat), (void*)0); - glEnableVertexAttribArray(0); - - glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 8 * sizeof(GLfloat), (void*)(3* sizeof(GLfloat))); - glEnableVertexAttribArray(1); - - glVertexAttribPointer(2, 2, GL_FLOAT, GL_FALSE, 8 * sizeof(GLfloat), (void*)(6 * sizeof(GLfloat))); - glEnableVertexAttribArray(2); - - load_texture("block.jpg", b->texture); -} - -void update_block(struct block_drawable *b, int x, int y, int color) { - GLfloat block[32]; - memcpy(block, default_rect, sizeof(GLfloat) * 32); - - block[0] = block[8] = (x + 1.0f) / 10.0f; - block[1] = block[25] = (((y - CETRIS_BOARD_VISABLE) * -1.0f) + 1.0f) / 20.0f; - block[9] = block[17] = block[1] - .05f; - block[16] = block[24] = block[0] - .1f; - - block[3] = block[11] = block[19] = block[27] = colors[color].r; - block[4] = block[12] = block[20] = block[28] = colors[color].g; - block[5] = block[13] = block[21] = block[29] = colors[color].b; - - glBindVertexArray(b->vao); - glBindBuffer(GL_ARRAY_BUFFER, b->vbo); - glBufferData(GL_ARRAY_BUFFER, 32 * sizeof(GLfloat), block, GL_DYNAMIC_DRAW); -} - -int main(void) { - glfwInit(); - glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4); - glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 5); - glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - - GLFWwindow* window = glfwCreateWindow(400, 800, "Cetris", NULL, NULL); - if (window == NULL) { - printf("[Error] failed to create GLFW window\n"); - glfwTerminate(); - return -1; - } - - glfwMakeContextCurrent(window); - - if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)) { - printf("[Error] failed to load GLAD\n"); - return -1; - } - - glViewport(0, 0, 400, 800); - - glfwSetFramebufferSizeCallback(window, framebuffer_size_callback); - - shader_program = glCreateProgram(); - load_fragment_shader(shader_program); - load_vertex_shader(shader_program); - glLinkProgram(shader_program); - - struct block_drawable block; - create_block(&block); - - struct cetris_game cetris; - init_game(&cetris); - - double prev_time = glfwGetTime(); - - while(!glfwWindowShouldClose(window)) { - process_input(window); - - glClearColor(0.2f, 0.3f, 0.3f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - - glBindTexture(GL_TEXTURE_2D, block.texture); - glUseProgram(shader_program); - glBindVertexArray(block.vao); - for (int x = 0; x < CETRIS_BOARD_X; x++) { - for (int y = CETRIS_BOARD_VISABLE; y < CETRIS_BOARD_Y; y++) { - if (cetris.board[x][y].occupied) { - update_block(&block, x, y, cetris.board[x][y].c); - glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_INT, 0); - } - } - } - - double current_time = glfwGetTime(); - if (current_time - prev_time >= 0.0166) { - update_game_tick(&cetris); - prev_time = current_time; - } - - glfwSwapBuffers(window); - glfwPollEvents(); - } - - glfwTerminate(); - return 0; -} +#include + +#include +#include + +#define STB_IMAGE_IMPLEMENTATION +#include "stb_image.h" + +#include + +const char *vertex_shader_source = "#version 450 core\n" + "layout (location = 0) in vec3 aPos;\n" + "layout (location = 1) in vec3 aColor;\n" + "layout (location = 2) in vec2 aTexCoord;\n" + "out vec3 ourColor;\n" + "out vec2 TexCoord;\n" + "void main()\n" + "{\n" + " gl_Position = vec4(aPos, 1.0);\n" + " ourColor = aColor;\n" + " TexCoord = aTexCoord;\n" + "}\0"; + +const char *fragment_shader_source = "#version 450 core\n" + "out vec4 FragColor;\n" + "in vec3 ourColor;\n" + "in vec2 TexCoord;\n" + "uniform sampler2D ourTexture;\n" + "void main()\n" + "{\n" + " FragColor = texture(ourTexture, TexCoord) * vec4(ourColor, 1.0);\n" + "}\n\0"; + + +GLuint shader_program; + +GLfloat default_rect[32] = { + // positions // colors // texture coords + 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, // top right + 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, // bottom right + 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, // bottom left + 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f // top left +}; + +typedef struct { + GLfloat r; + GLfloat g; + GLfloat b; +} rbg_color; + +GLuint indices[] = { + 0, 1, 3, // first triangle + 1, 2, 3 // second triangle +}; + +rbg_color colors[8] = { + {0.0f, 0.0f, 0.0f}, // Black + {0.127f,0.219f,0.255f}, // Aqua + {0.61f,0.153f,0.112f}, // Olive + {0.177f,0.13f,0.201f}, // Purple + {0.240f,0.18f,0.190f}, // Fuchsia + {0.255f,0.133f,0.27f}, // Orange + {0.0f,0.31f,0.63f}, // Navy + {0.255f,0.220f,0.0f} // Yellow +}; + +struct block_drawable { + GLuint vao; + GLuint vbo; + GLuint ebo; + GLuint texture; +}; + +void framebuffer_size_callback(GLFWwindow* window, int width, int height) { + glViewport(0, 0, width, height); +} + +void process_input(GLFWwindow *window) { + if (glfwGetKey(window, GLFW_KEY_ESCAPE) == GLFW_PRESS) + glfwSetWindowShouldClose(window, 1); +} + +void load_texture(char *file_name, GLuint texture) { + int w, h, channel; + unsigned char *data = stbi_load(file_name, &w, &h, &channel, 0); + glBindTexture(GL_TEXTURE_2D, texture); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, w, h, 0, GL_RGB, GL_UNSIGNED_BYTE, data); + glGenerateMipmap(GL_TEXTURE_2D); + stbi_image_free(data); +} + +void load_vertex_shader(GLuint program) { + GLint vertex_shader; + vertex_shader = glCreateShader(GL_VERTEX_SHADER); + + glShaderSource(vertex_shader, 1, &vertex_shader_source, NULL); + glCompileShader(vertex_shader); + glAttachShader(program, vertex_shader); + glDeleteShader(vertex_shader); +} + +void load_fragment_shader(GLuint program) { + GLint fragment_shader; + fragment_shader = glCreateShader(GL_FRAGMENT_SHADER); + + glShaderSource(fragment_shader, 1, &fragment_shader_source, NULL); + glCompileShader(fragment_shader); + glAttachShader(program, fragment_shader); + glDeleteShader(fragment_shader); +} + +void create_block(struct block_drawable *b) { + glGenVertexArrays(1, &b->vao); + glGenBuffers(1, &b->vbo); + glGenBuffers(1, &b->ebo); + glGenTextures(1, &b->texture); + + glBindVertexArray(b->vao); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, b->ebo); + glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(indices), indices, GL_STATIC_DRAW); + + glBindBuffer(GL_ARRAY_BUFFER, b->vbo); + glBufferData(GL_ARRAY_BUFFER, 32 * sizeof(GLfloat), default_rect, GL_DYNAMIC_DRAW); + + glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 8 * sizeof(GLfloat), (void*)0); + glEnableVertexAttribArray(0); + + glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 8 * sizeof(GLfloat), (void*)(3* sizeof(GLfloat))); + glEnableVertexAttribArray(1); + + glVertexAttribPointer(2, 2, GL_FLOAT, GL_FALSE, 8 * sizeof(GLfloat), (void*)(6 * sizeof(GLfloat))); + glEnableVertexAttribArray(2); + + load_texture("block.jpg", b->texture); +} + +void update_block(struct block_drawable *b, int x, int y, int color) { + GLfloat block[32]; + memcpy(block, default_rect, sizeof(GLfloat) * 32); + + block[0] = block[8] = (x + 1.0f) / 10.0f; + block[1] = block[25] = (((y - CETRIS_BOARD_VISABLE) * -1.0f) + 1.0f) / 20.0f; + block[9] = block[17] = block[1] - .05f; + block[16] = block[24] = block[0] - .1f; + + block[3] = block[11] = block[19] = block[27] = colors[color].r; + block[4] = block[12] = block[20] = block[28] = colors[color].g; + block[5] = block[13] = block[21] = block[29] = colors[color].b; + + glBindVertexArray(b->vao); + glBindBuffer(GL_ARRAY_BUFFER, b->vbo); + glBufferData(GL_ARRAY_BUFFER, 32 * sizeof(GLfloat), block, GL_DYNAMIC_DRAW); +} + +int main(void) { + glfwInit(); + glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4); + glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 5); + glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); + + GLFWwindow* window = glfwCreateWindow(400, 800, "Cetris", NULL, NULL); + if (window == NULL) { + printf("[Error] failed to create GLFW window\n"); + glfwTerminate(); + return -1; + } + + glfwMakeContextCurrent(window); + + if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)) { + printf("[Error] failed to load GLAD\n"); + return -1; + } + + glViewport(0, 0, 400, 800); + + glfwSetFramebufferSizeCallback(window, framebuffer_size_callback); + + shader_program = glCreateProgram(); + load_fragment_shader(shader_program); + load_vertex_shader(shader_program); + glLinkProgram(shader_program); + + struct block_drawable block; + create_block(&block); + + struct cetris_game cetris; + init_game(&cetris); + + double prev_time = glfwGetTime(); + + while(!glfwWindowShouldClose(window)) { + process_input(window); + + glClearColor(0.2f, 0.3f, 0.3f, 1.0f); + glClear(GL_COLOR_BUFFER_BIT); + + glBindTexture(GL_TEXTURE_2D, block.texture); + glUseProgram(shader_program); + glBindVertexArray(block.vao); + for (int x = 0; x < CETRIS_BOARD_X; x++) { + for (int y = CETRIS_BOARD_VISABLE; y < CETRIS_BOARD_Y; y++) { + if (cetris.board[x][y].occupied) { + update_block(&block, x, y, cetris.board[x][y].c); + glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_INT, 0); + } + } + } + + double current_time = glfwGetTime(); + if (current_time - prev_time >= 0.0166) { + update_game_tick(&cetris); + prev_time = current_time; + } + + glfwSwapBuffers(window); + glfwPollEvents(); + } + + glfwTerminate(); + return 0; +} diff --git a/frontends/gl/meson.build b/frontends/gl/meson.build index 385e158..d74b441 100644 --- a/frontends/gl/meson.build +++ b/frontends/gl/meson.build @@ -1,21 +1,21 @@ -src = ['main.c', 'glad/src/glad.c'] -inc = [include_directories('glad/include')] - -deps = [] -if host_machine.system() == 'windows' - deps += compiler.find_library('glfw3', dirs: meson.current_source_dir() + '/win/glfw') - inc += include_directories('win/glfw/include') -else - deps += dependency('glfw3') - deps += compiler.find_library('m') - deps += compiler.find_library('dl') -endif - -configure_file(input: 'block.jpg', - output: 'block.jpg', - copy: true, install: false) - -executable('cetris_gl', src, - dependencies: [deps, cetris], - include_directories: [inc, cetris_inc], - install: false) +src = ['main.c', 'glad/src/glad.c'] +inc = [include_directories('glad/include')] + +deps = [] +if host_machine.system() == 'windows' + deps += compiler.find_library('glfw3', dirs: meson.current_source_dir() + '/win/glfw') + inc += include_directories('win/glfw/include') +else + deps += dependency('glfw3') + deps += compiler.find_library('m') + deps += compiler.find_library('dl') +endif + +configure_file(input: 'block.jpg', + output: 'block.jpg', + copy: true, install: false) + +executable('cetris_gl', src, + dependencies: [deps, cetris], + include_directories: [inc, cetris_inc], + install: false) diff --git a/frontends/gl/stb_image.h b/frontends/gl/stb_image.h index a6202a3..f8fb2a0 100644 --- a/frontends/gl/stb_image.h +++ b/frontends/gl/stb_image.h @@ -1,7547 +1,7547 @@ -/* stb_image - v2.22 - public domain image loader - http://nothings.org/stb - no warranty implied; use at your own risk - - Do this: - #define STB_IMAGE_IMPLEMENTATION - before you include this file in *one* C or C++ file to create the implementation. - - // i.e. it should look like this: - #include ... - #include ... - #include ... - #define STB_IMAGE_IMPLEMENTATION - #include "stb_image.h" - - You can #define STBI_ASSERT(x) before the #include to avoid using assert.h. - And #define STBI_MALLOC, STBI_REALLOC, and STBI_FREE to avoid using malloc,realloc,free - - - QUICK NOTES: - Primarily of interest to game developers and other people who can - avoid problematic images and only need the trivial interface - - JPEG baseline & progressive (12 bpc/arithmetic not supported, same as stock IJG lib) - PNG 1/2/4/8/16-bit-per-channel - - TGA (not sure what subset, if a subset) - BMP non-1bpp, non-RLE - PSD (composited view only, no extra channels, 8/16 bit-per-channel) - - GIF (*comp always reports as 4-channel) - HDR (radiance rgbE format) - PIC (Softimage PIC) - PNM (PPM and PGM binary only) - - Animated GIF still needs a proper API, but here's one way to do it: - http://gist.github.com/urraka/685d9a6340b26b830d49 - - - decode from memory or through FILE (define STBI_NO_STDIO to remove code) - - decode from arbitrary I/O callbacks - - SIMD acceleration on x86/x64 (SSE2) and ARM (NEON) - - Full documentation under "DOCUMENTATION" below. - - -LICENSE - - See end of file for license information. - -RECENT REVISION HISTORY: - - 2.22 (2019-03-04) gif fixes, fix warnings - 2.21 (2019-02-25) fix typo in comment - 2.20 (2019-02-07) support utf8 filenames in Windows; fix warnings and platform ifdefs - 2.19 (2018-02-11) fix warning - 2.18 (2018-01-30) fix warnings - 2.17 (2018-01-29) bugfix, 1-bit BMP, 16-bitness query, fix warnings - 2.16 (2017-07-23) all functions have 16-bit variants; optimizations; bugfixes - 2.15 (2017-03-18) fix png-1,2,4; all Imagenet JPGs; no runtime SSE detection on GCC - 2.14 (2017-03-03) remove deprecated STBI_JPEG_OLD; fixes for Imagenet JPGs - 2.13 (2016-12-04) experimental 16-bit API, only for PNG so far; fixes - 2.12 (2016-04-02) fix typo in 2.11 PSD fix that caused crashes - 2.11 (2016-04-02) 16-bit PNGS; enable SSE2 in non-gcc x64 - RGB-format JPEG; remove white matting in PSD; - allocate large structures on the stack; - correct channel count for PNG & BMP - 2.10 (2016-01-22) avoid warning introduced in 2.09 - 2.09 (2016-01-16) 16-bit TGA; comments in PNM files; STBI_REALLOC_SIZED - - See end of file for full revision history. - - - ============================ Contributors ========================= - - Image formats Extensions, features - Sean Barrett (jpeg, png, bmp) Jetro Lauha (stbi_info) - Nicolas Schulz (hdr, psd) Martin "SpartanJ" Golini (stbi_info) - Jonathan Dummer (tga) James "moose2000" Brown (iPhone PNG) - Jean-Marc Lienher (gif) Ben "Disch" Wenger (io callbacks) - Tom Seddon (pic) Omar Cornut (1/2/4-bit PNG) - Thatcher Ulrich (psd) Nicolas Guillemot (vertical flip) - Ken Miller (pgm, ppm) Richard Mitton (16-bit PSD) - github:urraka (animated gif) Junggon Kim (PNM comments) - Christopher Forseth (animated gif) Daniel Gibson (16-bit TGA) - socks-the-fox (16-bit PNG) - Jeremy Sawicki (handle all ImageNet JPGs) - Optimizations & bugfixes Mikhail Morozov (1-bit BMP) - Fabian "ryg" Giesen Anael Seghezzi (is-16-bit query) - Arseny Kapoulkine - John-Mark Allen - Carmelo J Fdez-Aguera - - Bug & warning fixes - Marc LeBlanc David Woo Guillaume George Martins Mozeiko - Christpher Lloyd Jerry Jansson Joseph Thomson Phil Jordan - Dave Moore Roy Eltham Hayaki Saito Nathan Reed - Won Chun Luke Graham Johan Duparc Nick Verigakis - the Horde3D community Thomas Ruf Ronny Chevalier github:rlyeh - Janez Zemva John Bartholomew Michal Cichon github:romigrou - Jonathan Blow Ken Hamada Tero Hanninen github:svdijk - Laurent Gomila Cort Stratton Sergio Gonzalez github:snagar - Aruelien Pocheville Thibault Reuille Cass Everitt github:Zelex - Ryamond Barbiero Paul Du Bois Engin Manap github:grim210 - Aldo Culquicondor Philipp Wiesemann Dale Weiler github:sammyhw - Oriol Ferrer Mesia Josh Tobin Matthew Gregan github:phprus - Julian Raschke Gregory Mullen Baldur Karlsson github:poppolopoppo - Christian Floisand Kevin Schmidt JR Smith github:darealshinji - Blazej Dariusz Roszkowski github:Michaelangel007 -*/ - -#ifndef STBI_INCLUDE_STB_IMAGE_H -#define STBI_INCLUDE_STB_IMAGE_H - -// DOCUMENTATION -// -// Limitations: -// - no 12-bit-per-channel JPEG -// - no JPEGs with arithmetic coding -// - GIF always returns *comp=4 -// -// Basic usage (see HDR discussion below for HDR usage): -// int x,y,n; -// unsigned char *data = stbi_load(filename, &x, &y, &n, 0); -// // ... process data if not NULL ... -// // ... x = width, y = height, n = # 8-bit components per pixel ... -// // ... replace '0' with '1'..'4' to force that many components per pixel -// // ... but 'n' will always be the number that it would have been if you said 0 -// stbi_image_free(data) -// -// Standard parameters: -// int *x -- outputs image width in pixels -// int *y -- outputs image height in pixels -// int *channels_in_file -- outputs # of image components in image file -// int desired_channels -- if non-zero, # of image components requested in result -// -// The return value from an image loader is an 'unsigned char *' which points -// to the pixel data, or NULL on an allocation failure or if the image is -// corrupt or invalid. The pixel data consists of *y scanlines of *x pixels, -// with each pixel consisting of N interleaved 8-bit components; the first -// pixel pointed to is top-left-most in the image. There is no padding between -// image scanlines or between pixels, regardless of format. The number of -// components N is 'desired_channels' if desired_channels is non-zero, or -// *channels_in_file otherwise. If desired_channels is non-zero, -// *channels_in_file has the number of components that _would_ have been -// output otherwise. E.g. if you set desired_channels to 4, you will always -// get RGBA output, but you can check *channels_in_file to see if it's trivially -// opaque because e.g. there were only 3 channels in the source image. -// -// An output image with N components has the following components interleaved -// in this order in each pixel: -// -// N=#comp components -// 1 grey -// 2 grey, alpha -// 3 red, green, blue -// 4 red, green, blue, alpha -// -// If image loading fails for any reason, the return value will be NULL, -// and *x, *y, *channels_in_file will be unchanged. The function -// stbi_failure_reason() can be queried for an extremely brief, end-user -// unfriendly explanation of why the load failed. Define STBI_NO_FAILURE_STRINGS -// to avoid compiling these strings at all, and STBI_FAILURE_USERMSG to get slightly -// more user-friendly ones. -// -// Paletted PNG, BMP, GIF, and PIC images are automatically depalettized. -// -// =========================================================================== -// -// UNICODE: -// -// If compiling for Windows and you wish to use Unicode filenames, compile -// with -// #define STBI_WINDOWS_UTF8 -// and pass utf8-encoded filenames. Call stbi_convert_wchar_to_utf8 to convert -// Windows wchar_t filenames to utf8. -// -// =========================================================================== -// -// Philosophy -// -// stb libraries are designed with the following priorities: -// -// 1. easy to use -// 2. easy to maintain -// 3. good performance -// -// Sometimes I let "good performance" creep up in priority over "easy to maintain", -// and for best performance I may provide less-easy-to-use APIs that give higher -// performance, in addition to the easy-to-use ones. Nevertheless, it's important -// to keep in mind that from the standpoint of you, a client of this library, -// all you care about is #1 and #3, and stb libraries DO NOT emphasize #3 above all. -// -// Some secondary priorities arise directly from the first two, some of which -// provide more explicit reasons why performance can't be emphasized. -// -// - Portable ("ease of use") -// - Small source code footprint ("easy to maintain") -// - No dependencies ("ease of use") -// -// =========================================================================== -// -// I/O callbacks -// -// I/O callbacks allow you to read from arbitrary sources, like packaged -// files or some other source. Data read from callbacks are processed -// through a small internal buffer (currently 128 bytes) to try to reduce -// overhead. -// -// The three functions you must define are "read" (reads some bytes of data), -// "skip" (skips some bytes of data), "eof" (reports if the stream is at the end). -// -// =========================================================================== -// -// SIMD support -// -// The JPEG decoder will try to automatically use SIMD kernels on x86 when -// supported by the compiler. For ARM Neon support, you must explicitly -// request it. -// -// (The old do-it-yourself SIMD API is no longer supported in the current -// code.) -// -// On x86, SSE2 will automatically be used when available based on a run-time -// test; if not, the generic C versions are used as a fall-back. On ARM targets, -// the typical path is to have separate builds for NEON and non-NEON devices -// (at least this is true for iOS and Android). Therefore, the NEON support is -// toggled by a build flag: define STBI_NEON to get NEON loops. -// -// If for some reason you do not want to use any of SIMD code, or if -// you have issues compiling it, you can disable it entirely by -// defining STBI_NO_SIMD. -// -// =========================================================================== -// -// HDR image support (disable by defining STBI_NO_HDR) -// -// stb_image supports loading HDR images in general, and currently the Radiance -// .HDR file format specifically. You can still load any file through the existing -// interface; if you attempt to load an HDR file, it will be automatically remapped -// to LDR, assuming gamma 2.2 and an arbitrary scale factor defaulting to 1; -// both of these constants can be reconfigured through this interface: -// -// stbi_hdr_to_ldr_gamma(2.2f); -// stbi_hdr_to_ldr_scale(1.0f); -// -// (note, do not use _inverse_ constants; stbi_image will invert them -// appropriately). -// -// Additionally, there is a new, parallel interface for loading files as -// (linear) floats to preserve the full dynamic range: -// -// float *data = stbi_loadf(filename, &x, &y, &n, 0); -// -// If you load LDR images through this interface, those images will -// be promoted to floating point values, run through the inverse of -// constants corresponding to the above: -// -// stbi_ldr_to_hdr_scale(1.0f); -// stbi_ldr_to_hdr_gamma(2.2f); -// -// Finally, given a filename (or an open file or memory block--see header -// file for details) containing image data, you can query for the "most -// appropriate" interface to use (that is, whether the image is HDR or -// not), using: -// -// stbi_is_hdr(char *filename); -// -// =========================================================================== -// -// iPhone PNG support: -// -// By default we convert iphone-formatted PNGs back to RGB, even though -// they are internally encoded differently. You can disable this conversion -// by calling stbi_convert_iphone_png_to_rgb(0), in which case -// you will always just get the native iphone "format" through (which -// is BGR stored in RGB). -// -// Call stbi_set_unpremultiply_on_load(1) as well to force a divide per -// pixel to remove any premultiplied alpha *only* if the image file explicitly -// says there's premultiplied data (currently only happens in iPhone images, -// and only if iPhone convert-to-rgb processing is on). -// -// =========================================================================== -// -// ADDITIONAL CONFIGURATION -// -// - You can suppress implementation of any of the decoders to reduce -// your code footprint by #defining one or more of the following -// symbols before creating the implementation. -// -// STBI_NO_JPEG -// STBI_NO_PNG -// STBI_NO_BMP -// STBI_NO_PSD -// STBI_NO_TGA -// STBI_NO_GIF -// STBI_NO_HDR -// STBI_NO_PIC -// STBI_NO_PNM (.ppm and .pgm) -// -// - You can request *only* certain decoders and suppress all other ones -// (this will be more forward-compatible, as addition of new decoders -// doesn't require you to disable them explicitly): -// -// STBI_ONLY_JPEG -// STBI_ONLY_PNG -// STBI_ONLY_BMP -// STBI_ONLY_PSD -// STBI_ONLY_TGA -// STBI_ONLY_GIF -// STBI_ONLY_HDR -// STBI_ONLY_PIC -// STBI_ONLY_PNM (.ppm and .pgm) -// -// - If you use STBI_NO_PNG (or _ONLY_ without PNG), and you still -// want the zlib decoder to be available, #define STBI_SUPPORT_ZLIB -// - - -#ifndef STBI_NO_STDIO -#include -#endif // STBI_NO_STDIO - -#define STBI_VERSION 1 - -enum -{ - STBI_default = 0, // only used for desired_channels - - STBI_grey = 1, - STBI_grey_alpha = 2, - STBI_rgb = 3, - STBI_rgb_alpha = 4 -}; - -#include -typedef unsigned char stbi_uc; -typedef unsigned short stbi_us; - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef STBIDEF -#ifdef STB_IMAGE_STATIC -#define STBIDEF static -#else -#define STBIDEF extern -#endif -#endif - -////////////////////////////////////////////////////////////////////////////// -// -// PRIMARY API - works on images of any type -// - -// -// load image by filename, open file, or memory buffer -// - -typedef struct -{ - int (*read) (void *user,char *data,int size); // fill 'data' with 'size' bytes. return number of bytes actually read - void (*skip) (void *user,int n); // skip the next 'n' bytes, or 'unget' the last -n bytes if negative - int (*eof) (void *user); // returns nonzero if we are at end of file/data -} stbi_io_callbacks; - -//////////////////////////////////// -// -// 8-bits-per-channel interface -// - -STBIDEF stbi_uc *stbi_load_from_memory (stbi_uc const *buffer, int len , int *x, int *y, int *channels_in_file, int desired_channels); -STBIDEF stbi_uc *stbi_load_from_callbacks(stbi_io_callbacks const *clbk , void *user, int *x, int *y, int *channels_in_file, int desired_channels); - -#ifndef STBI_NO_STDIO -STBIDEF stbi_uc *stbi_load (char const *filename, int *x, int *y, int *channels_in_file, int desired_channels); -STBIDEF stbi_uc *stbi_load_from_file (FILE *f, int *x, int *y, int *channels_in_file, int desired_channels); -// for stbi_load_from_file, file pointer is left pointing immediately after image -#endif - -#ifndef STBI_NO_GIF -STBIDEF stbi_uc *stbi_load_gif_from_memory(stbi_uc const *buffer, int len, int **delays, int *x, int *y, int *z, int *comp, int req_comp); -#endif - -#ifdef STBI_WINDOWS_UTF8 -STBIDEF int stbi_convert_wchar_to_utf8(char *buffer, size_t bufferlen, const wchar_t* input); -#endif - -//////////////////////////////////// -// -// 16-bits-per-channel interface -// - -STBIDEF stbi_us *stbi_load_16_from_memory (stbi_uc const *buffer, int len, int *x, int *y, int *channels_in_file, int desired_channels); -STBIDEF stbi_us *stbi_load_16_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *channels_in_file, int desired_channels); - -#ifndef STBI_NO_STDIO -STBIDEF stbi_us *stbi_load_16 (char const *filename, int *x, int *y, int *channels_in_file, int desired_channels); -STBIDEF stbi_us *stbi_load_from_file_16(FILE *f, int *x, int *y, int *channels_in_file, int desired_channels); -#endif - -//////////////////////////////////// -// -// float-per-channel interface -// -#ifndef STBI_NO_LINEAR - STBIDEF float *stbi_loadf_from_memory (stbi_uc const *buffer, int len, int *x, int *y, int *channels_in_file, int desired_channels); - STBIDEF float *stbi_loadf_from_callbacks (stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *channels_in_file, int desired_channels); - - #ifndef STBI_NO_STDIO - STBIDEF float *stbi_loadf (char const *filename, int *x, int *y, int *channels_in_file, int desired_channels); - STBIDEF float *stbi_loadf_from_file (FILE *f, int *x, int *y, int *channels_in_file, int desired_channels); - #endif -#endif - -#ifndef STBI_NO_HDR - STBIDEF void stbi_hdr_to_ldr_gamma(float gamma); - STBIDEF void stbi_hdr_to_ldr_scale(float scale); -#endif // STBI_NO_HDR - -#ifndef STBI_NO_LINEAR - STBIDEF void stbi_ldr_to_hdr_gamma(float gamma); - STBIDEF void stbi_ldr_to_hdr_scale(float scale); -#endif // STBI_NO_LINEAR - -// stbi_is_hdr is always defined, but always returns false if STBI_NO_HDR -STBIDEF int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user); -STBIDEF int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len); -#ifndef STBI_NO_STDIO -STBIDEF int stbi_is_hdr (char const *filename); -STBIDEF int stbi_is_hdr_from_file(FILE *f); -#endif // STBI_NO_STDIO - - -// get a VERY brief reason for failure -// NOT THREADSAFE -STBIDEF const char *stbi_failure_reason (void); - -// free the loaded image -- this is just free() -STBIDEF void stbi_image_free (void *retval_from_stbi_load); - -// get image dimensions & components without fully decoding -STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp); -STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp); -STBIDEF int stbi_is_16_bit_from_memory(stbi_uc const *buffer, int len); -STBIDEF int stbi_is_16_bit_from_callbacks(stbi_io_callbacks const *clbk, void *user); - -#ifndef STBI_NO_STDIO -STBIDEF int stbi_info (char const *filename, int *x, int *y, int *comp); -STBIDEF int stbi_info_from_file (FILE *f, int *x, int *y, int *comp); -STBIDEF int stbi_is_16_bit (char const *filename); -STBIDEF int stbi_is_16_bit_from_file(FILE *f); -#endif - - - -// for image formats that explicitly notate that they have premultiplied alpha, -// we just return the colors as stored in the file. set this flag to force -// unpremultiplication. results are undefined if the unpremultiply overflow. -STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply); - -// indicate whether we should process iphone images back to canonical format, -// or just pass them through "as-is" -STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert); - -// flip the image vertically, so the first pixel in the output array is the bottom left -STBIDEF void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip); - -// ZLIB client - used by PNG, available for other purposes - -STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen); -STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header); -STBIDEF char *stbi_zlib_decode_malloc(const char *buffer, int len, int *outlen); -STBIDEF int stbi_zlib_decode_buffer(char *obuffer, int olen, const char *ibuffer, int ilen); - -STBIDEF char *stbi_zlib_decode_noheader_malloc(const char *buffer, int len, int *outlen); -STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen); - - -#ifdef __cplusplus -} -#endif - -// -// -//// end header file ///////////////////////////////////////////////////// -#endif // STBI_INCLUDE_STB_IMAGE_H - -#ifdef STB_IMAGE_IMPLEMENTATION - -#if defined(STBI_ONLY_JPEG) || defined(STBI_ONLY_PNG) || defined(STBI_ONLY_BMP) \ - || defined(STBI_ONLY_TGA) || defined(STBI_ONLY_GIF) || defined(STBI_ONLY_PSD) \ - || defined(STBI_ONLY_HDR) || defined(STBI_ONLY_PIC) || defined(STBI_ONLY_PNM) \ - || defined(STBI_ONLY_ZLIB) - #ifndef STBI_ONLY_JPEG - #define STBI_NO_JPEG - #endif - #ifndef STBI_ONLY_PNG - #define STBI_NO_PNG - #endif - #ifndef STBI_ONLY_BMP - #define STBI_NO_BMP - #endif - #ifndef STBI_ONLY_PSD - #define STBI_NO_PSD - #endif - #ifndef STBI_ONLY_TGA - #define STBI_NO_TGA - #endif - #ifndef STBI_ONLY_GIF - #define STBI_NO_GIF - #endif - #ifndef STBI_ONLY_HDR - #define STBI_NO_HDR - #endif - #ifndef STBI_ONLY_PIC - #define STBI_NO_PIC - #endif - #ifndef STBI_ONLY_PNM - #define STBI_NO_PNM - #endif -#endif - -#if defined(STBI_NO_PNG) && !defined(STBI_SUPPORT_ZLIB) && !defined(STBI_NO_ZLIB) -#define STBI_NO_ZLIB -#endif - - -#include -#include // ptrdiff_t on osx -#include -#include -#include - -#if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR) -#include // ldexp, pow -#endif - -#ifndef STBI_NO_STDIO -#include -#endif - -#ifndef STBI_ASSERT -#include -#define STBI_ASSERT(x) assert(x) -#endif - -#ifdef __cplusplus -#define STBI_EXTERN extern "C" -#else -#define STBI_EXTERN extern -#endif - - -#ifndef _MSC_VER - #ifdef __cplusplus - #define stbi_inline inline - #else - #define stbi_inline - #endif -#else - #define stbi_inline __forceinline -#endif - - -#ifdef _MSC_VER -typedef unsigned short stbi__uint16; -typedef signed short stbi__int16; -typedef unsigned int stbi__uint32; -typedef signed int stbi__int32; -#else -#include -typedef uint16_t stbi__uint16; -typedef int16_t stbi__int16; -typedef uint32_t stbi__uint32; -typedef int32_t stbi__int32; -#endif - -// should produce compiler error if size is wrong -typedef unsigned char validate_uint32[sizeof(stbi__uint32)==4 ? 1 : -1]; - -#ifdef _MSC_VER -#define STBI_NOTUSED(v) (void)(v) -#else -#define STBI_NOTUSED(v) (void)sizeof(v) -#endif - -#ifdef _MSC_VER -#define STBI_HAS_LROTL -#endif - -#ifdef STBI_HAS_LROTL - #define stbi_lrot(x,y) _lrotl(x,y) -#else - #define stbi_lrot(x,y) (((x) << (y)) | ((x) >> (32 - (y)))) -#endif - -#if defined(STBI_MALLOC) && defined(STBI_FREE) && (defined(STBI_REALLOC) || defined(STBI_REALLOC_SIZED)) -// ok -#elif !defined(STBI_MALLOC) && !defined(STBI_FREE) && !defined(STBI_REALLOC) && !defined(STBI_REALLOC_SIZED) -// ok -#else -#error "Must define all or none of STBI_MALLOC, STBI_FREE, and STBI_REALLOC (or STBI_REALLOC_SIZED)." -#endif - -#ifndef STBI_MALLOC -#define STBI_MALLOC(sz) malloc(sz) -#define STBI_REALLOC(p,newsz) realloc(p,newsz) -#define STBI_FREE(p) free(p) -#endif - -#ifndef STBI_REALLOC_SIZED -#define STBI_REALLOC_SIZED(p,oldsz,newsz) STBI_REALLOC(p,newsz) -#endif - -// x86/x64 detection -#if defined(__x86_64__) || defined(_M_X64) -#define STBI__X64_TARGET -#elif defined(__i386) || defined(_M_IX86) -#define STBI__X86_TARGET -#endif - -#if defined(__GNUC__) && defined(STBI__X86_TARGET) && !defined(__SSE2__) && !defined(STBI_NO_SIMD) -// gcc doesn't support sse2 intrinsics unless you compile with -msse2, -// which in turn means it gets to use SSE2 everywhere. This is unfortunate, -// but previous attempts to provide the SSE2 functions with runtime -// detection caused numerous issues. The way architecture extensions are -// exposed in GCC/Clang is, sadly, not really suited for one-file libs. -// New behavior: if compiled with -msse2, we use SSE2 without any -// detection; if not, we don't use it at all. -#define STBI_NO_SIMD -#endif - -#if defined(__MINGW32__) && defined(STBI__X86_TARGET) && !defined(STBI_MINGW_ENABLE_SSE2) && !defined(STBI_NO_SIMD) -// Note that __MINGW32__ doesn't actually mean 32-bit, so we have to avoid STBI__X64_TARGET -// -// 32-bit MinGW wants ESP to be 16-byte aligned, but this is not in the -// Windows ABI and VC++ as well as Windows DLLs don't maintain that invariant. -// As a result, enabling SSE2 on 32-bit MinGW is dangerous when not -// simultaneously enabling "-mstackrealign". -// -// See https://github.com/nothings/stb/issues/81 for more information. -// -// So default to no SSE2 on 32-bit MinGW. If you've read this far and added -// -mstackrealign to your build settings, feel free to #define STBI_MINGW_ENABLE_SSE2. -#define STBI_NO_SIMD -#endif - -#if !defined(STBI_NO_SIMD) && (defined(STBI__X86_TARGET) || defined(STBI__X64_TARGET)) -#define STBI_SSE2 -#include - -#ifdef _MSC_VER - -#if _MSC_VER >= 1400 // not VC6 -#include // __cpuid -static int stbi__cpuid3(void) -{ - int info[4]; - __cpuid(info,1); - return info[3]; -} -#else -static int stbi__cpuid3(void) -{ - int res; - __asm { - mov eax,1 - cpuid - mov res,edx - } - return res; -} -#endif - -#define STBI_SIMD_ALIGN(type, name) __declspec(align(16)) type name - -#if !defined(STBI_NO_JPEG) && defined(STBI_SSE2) -static int stbi__sse2_available(void) -{ - int info3 = stbi__cpuid3(); - return ((info3 >> 26) & 1) != 0; -} -#endif - -#else // assume GCC-style if not VC++ -#define STBI_SIMD_ALIGN(type, name) type name __attribute__((aligned(16))) - -#if !defined(STBI_NO_JPEG) && defined(STBI_SSE2) -static int stbi__sse2_available(void) -{ - // If we're even attempting to compile this on GCC/Clang, that means - // -msse2 is on, which means the compiler is allowed to use SSE2 - // instructions at will, and so are we. - return 1; -} -#endif - -#endif -#endif - -// ARM NEON -#if defined(STBI_NO_SIMD) && defined(STBI_NEON) -#undef STBI_NEON -#endif - -#ifdef STBI_NEON -#include -// assume GCC or Clang on ARM targets -#define STBI_SIMD_ALIGN(type, name) type name __attribute__((aligned(16))) -#endif - -#ifndef STBI_SIMD_ALIGN -#define STBI_SIMD_ALIGN(type, name) type name -#endif - -/////////////////////////////////////////////// -// -// stbi__context struct and start_xxx functions - -// stbi__context structure is our basic context used by all images, so it -// contains all the IO context, plus some basic image information -typedef struct -{ - stbi__uint32 img_x, img_y; - int img_n, img_out_n; - - stbi_io_callbacks io; - void *io_user_data; - - int read_from_callbacks; - int buflen; - stbi_uc buffer_start[128]; - - stbi_uc *img_buffer, *img_buffer_end; - stbi_uc *img_buffer_original, *img_buffer_original_end; -} stbi__context; - - -static void stbi__refill_buffer(stbi__context *s); - -// initialize a memory-decode context -static void stbi__start_mem(stbi__context *s, stbi_uc const *buffer, int len) -{ - s->io.read = NULL; - s->read_from_callbacks = 0; - s->img_buffer = s->img_buffer_original = (stbi_uc *) buffer; - s->img_buffer_end = s->img_buffer_original_end = (stbi_uc *) buffer+len; -} - -// initialize a callback-based context -static void stbi__start_callbacks(stbi__context *s, stbi_io_callbacks *c, void *user) -{ - s->io = *c; - s->io_user_data = user; - s->buflen = sizeof(s->buffer_start); - s->read_from_callbacks = 1; - s->img_buffer_original = s->buffer_start; - stbi__refill_buffer(s); - s->img_buffer_original_end = s->img_buffer_end; -} - -#ifndef STBI_NO_STDIO - -static int stbi__stdio_read(void *user, char *data, int size) -{ - return (int) fread(data,1,size,(FILE*) user); -} - -static void stbi__stdio_skip(void *user, int n) -{ - fseek((FILE*) user, n, SEEK_CUR); -} - -static int stbi__stdio_eof(void *user) -{ - return feof((FILE*) user); -} - -static stbi_io_callbacks stbi__stdio_callbacks = -{ - stbi__stdio_read, - stbi__stdio_skip, - stbi__stdio_eof, -}; - -static void stbi__start_file(stbi__context *s, FILE *f) -{ - stbi__start_callbacks(s, &stbi__stdio_callbacks, (void *) f); -} - -//static void stop_file(stbi__context *s) { } - -#endif // !STBI_NO_STDIO - -static void stbi__rewind(stbi__context *s) -{ - // conceptually rewind SHOULD rewind to the beginning of the stream, - // but we just rewind to the beginning of the initial buffer, because - // we only use it after doing 'test', which only ever looks at at most 92 bytes - s->img_buffer = s->img_buffer_original; - s->img_buffer_end = s->img_buffer_original_end; -} - -enum -{ - STBI_ORDER_RGB, - STBI_ORDER_BGR -}; - -typedef struct -{ - int bits_per_channel; - int num_channels; - int channel_order; -} stbi__result_info; - -#ifndef STBI_NO_JPEG -static int stbi__jpeg_test(stbi__context *s); -static void *stbi__jpeg_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); -static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp); -#endif - -#ifndef STBI_NO_PNG -static int stbi__png_test(stbi__context *s); -static void *stbi__png_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); -static int stbi__png_info(stbi__context *s, int *x, int *y, int *comp); -static int stbi__png_is16(stbi__context *s); -#endif - -#ifndef STBI_NO_BMP -static int stbi__bmp_test(stbi__context *s); -static void *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); -static int stbi__bmp_info(stbi__context *s, int *x, int *y, int *comp); -#endif - -#ifndef STBI_NO_TGA -static int stbi__tga_test(stbi__context *s); -static void *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); -static int stbi__tga_info(stbi__context *s, int *x, int *y, int *comp); -#endif - -#ifndef STBI_NO_PSD -static int stbi__psd_test(stbi__context *s); -static void *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri, int bpc); -static int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp); -static int stbi__psd_is16(stbi__context *s); -#endif - -#ifndef STBI_NO_HDR -static int stbi__hdr_test(stbi__context *s); -static float *stbi__hdr_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); -static int stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp); -#endif - -#ifndef STBI_NO_PIC -static int stbi__pic_test(stbi__context *s); -static void *stbi__pic_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); -static int stbi__pic_info(stbi__context *s, int *x, int *y, int *comp); -#endif - -#ifndef STBI_NO_GIF -static int stbi__gif_test(stbi__context *s); -static void *stbi__gif_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); -static void *stbi__load_gif_main(stbi__context *s, int **delays, int *x, int *y, int *z, int *comp, int req_comp); -static int stbi__gif_info(stbi__context *s, int *x, int *y, int *comp); -#endif - -#ifndef STBI_NO_PNM -static int stbi__pnm_test(stbi__context *s); -static void *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); -static int stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp); -#endif - -// this is not threadsafe -static const char *stbi__g_failure_reason; - -STBIDEF const char *stbi_failure_reason(void) -{ - return stbi__g_failure_reason; -} - -static int stbi__err(const char *str) -{ - stbi__g_failure_reason = str; - return 0; -} - -static void *stbi__malloc(size_t size) -{ - return STBI_MALLOC(size); -} - -// stb_image uses ints pervasively, including for offset calculations. -// therefore the largest decoded image size we can support with the -// current code, even on 64-bit targets, is INT_MAX. this is not a -// significant limitation for the intended use case. -// -// we do, however, need to make sure our size calculations don't -// overflow. hence a few helper functions for size calculations that -// multiply integers together, making sure that they're non-negative -// and no overflow occurs. - -// return 1 if the sum is valid, 0 on overflow. -// negative terms are considered invalid. -static int stbi__addsizes_valid(int a, int b) -{ - if (b < 0) return 0; - // now 0 <= b <= INT_MAX, hence also - // 0 <= INT_MAX - b <= INTMAX. - // And "a + b <= INT_MAX" (which might overflow) is the - // same as a <= INT_MAX - b (no overflow) - return a <= INT_MAX - b; -} - -// returns 1 if the product is valid, 0 on overflow. -// negative factors are considered invalid. -static int stbi__mul2sizes_valid(int a, int b) -{ - if (a < 0 || b < 0) return 0; - if (b == 0) return 1; // mul-by-0 is always safe - // portable way to check for no overflows in a*b - return a <= INT_MAX/b; -} - -// returns 1 if "a*b + add" has no negative terms/factors and doesn't overflow -static int stbi__mad2sizes_valid(int a, int b, int add) -{ - return stbi__mul2sizes_valid(a, b) && stbi__addsizes_valid(a*b, add); -} - -// returns 1 if "a*b*c + add" has no negative terms/factors and doesn't overflow -static int stbi__mad3sizes_valid(int a, int b, int c, int add) -{ - return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a*b, c) && - stbi__addsizes_valid(a*b*c, add); -} - -// returns 1 if "a*b*c*d + add" has no negative terms/factors and doesn't overflow -#if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR) -static int stbi__mad4sizes_valid(int a, int b, int c, int d, int add) -{ - return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a*b, c) && - stbi__mul2sizes_valid(a*b*c, d) && stbi__addsizes_valid(a*b*c*d, add); -} -#endif - -// mallocs with size overflow checking -static void *stbi__malloc_mad2(int a, int b, int add) -{ - if (!stbi__mad2sizes_valid(a, b, add)) return NULL; - return stbi__malloc(a*b + add); -} - -static void *stbi__malloc_mad3(int a, int b, int c, int add) -{ - if (!stbi__mad3sizes_valid(a, b, c, add)) return NULL; - return stbi__malloc(a*b*c + add); -} - -#if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR) -static void *stbi__malloc_mad4(int a, int b, int c, int d, int add) -{ - if (!stbi__mad4sizes_valid(a, b, c, d, add)) return NULL; - return stbi__malloc(a*b*c*d + add); -} -#endif - -// stbi__err - error -// stbi__errpf - error returning pointer to float -// stbi__errpuc - error returning pointer to unsigned char - -#ifdef STBI_NO_FAILURE_STRINGS - #define stbi__err(x,y) 0 -#elif defined(STBI_FAILURE_USERMSG) - #define stbi__err(x,y) stbi__err(y) -#else - #define stbi__err(x,y) stbi__err(x) -#endif - -#define stbi__errpf(x,y) ((float *)(size_t) (stbi__err(x,y)?NULL:NULL)) -#define stbi__errpuc(x,y) ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL)) - -STBIDEF void stbi_image_free(void *retval_from_stbi_load) -{ - STBI_FREE(retval_from_stbi_load); -} - -#ifndef STBI_NO_LINEAR -static float *stbi__ldr_to_hdr(stbi_uc *data, int x, int y, int comp); -#endif - -#ifndef STBI_NO_HDR -static stbi_uc *stbi__hdr_to_ldr(float *data, int x, int y, int comp); -#endif - -static int stbi__vertically_flip_on_load = 0; - -STBIDEF void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip) -{ - stbi__vertically_flip_on_load = flag_true_if_should_flip; -} - -static void *stbi__load_main(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri, int bpc) -{ - memset(ri, 0, sizeof(*ri)); // make sure it's initialized if we add new fields - ri->bits_per_channel = 8; // default is 8 so most paths don't have to be changed - ri->channel_order = STBI_ORDER_RGB; // all current input & output are this, but this is here so we can add BGR order - ri->num_channels = 0; - - #ifndef STBI_NO_JPEG - if (stbi__jpeg_test(s)) return stbi__jpeg_load(s,x,y,comp,req_comp, ri); - #endif - #ifndef STBI_NO_PNG - if (stbi__png_test(s)) return stbi__png_load(s,x,y,comp,req_comp, ri); - #endif - #ifndef STBI_NO_BMP - if (stbi__bmp_test(s)) return stbi__bmp_load(s,x,y,comp,req_comp, ri); - #endif - #ifndef STBI_NO_GIF - if (stbi__gif_test(s)) return stbi__gif_load(s,x,y,comp,req_comp, ri); - #endif - #ifndef STBI_NO_PSD - if (stbi__psd_test(s)) return stbi__psd_load(s,x,y,comp,req_comp, ri, bpc); - #endif - #ifndef STBI_NO_PIC - if (stbi__pic_test(s)) return stbi__pic_load(s,x,y,comp,req_comp, ri); - #endif - #ifndef STBI_NO_PNM - if (stbi__pnm_test(s)) return stbi__pnm_load(s,x,y,comp,req_comp, ri); - #endif - - #ifndef STBI_NO_HDR - if (stbi__hdr_test(s)) { - float *hdr = stbi__hdr_load(s, x,y,comp,req_comp, ri); - return stbi__hdr_to_ldr(hdr, *x, *y, req_comp ? req_comp : *comp); - } - #endif - - #ifndef STBI_NO_TGA - // test tga last because it's a crappy test! - if (stbi__tga_test(s)) - return stbi__tga_load(s,x,y,comp,req_comp, ri); - #endif - - return stbi__errpuc("unknown image type", "Image not of any known type, or corrupt"); -} - -static stbi_uc *stbi__convert_16_to_8(stbi__uint16 *orig, int w, int h, int channels) -{ - int i; - int img_len = w * h * channels; - stbi_uc *reduced; - - reduced = (stbi_uc *) stbi__malloc(img_len); - if (reduced == NULL) return stbi__errpuc("outofmem", "Out of memory"); - - for (i = 0; i < img_len; ++i) - reduced[i] = (stbi_uc)((orig[i] >> 8) & 0xFF); // top half of each byte is sufficient approx of 16->8 bit scaling - - STBI_FREE(orig); - return reduced; -} - -static stbi__uint16 *stbi__convert_8_to_16(stbi_uc *orig, int w, int h, int channels) -{ - int i; - int img_len = w * h * channels; - stbi__uint16 *enlarged; - - enlarged = (stbi__uint16 *) stbi__malloc(img_len*2); - if (enlarged == NULL) return (stbi__uint16 *) stbi__errpuc("outofmem", "Out of memory"); - - for (i = 0; i < img_len; ++i) - enlarged[i] = (stbi__uint16)((orig[i] << 8) + orig[i]); // replicate to high and low byte, maps 0->0, 255->0xffff - - STBI_FREE(orig); - return enlarged; -} - -static void stbi__vertical_flip(void *image, int w, int h, int bytes_per_pixel) -{ - int row; - size_t bytes_per_row = (size_t)w * bytes_per_pixel; - stbi_uc temp[2048]; - stbi_uc *bytes = (stbi_uc *)image; - - for (row = 0; row < (h>>1); row++) { - stbi_uc *row0 = bytes + row*bytes_per_row; - stbi_uc *row1 = bytes + (h - row - 1)*bytes_per_row; - // swap row0 with row1 - size_t bytes_left = bytes_per_row; - while (bytes_left) { - size_t bytes_copy = (bytes_left < sizeof(temp)) ? bytes_left : sizeof(temp); - memcpy(temp, row0, bytes_copy); - memcpy(row0, row1, bytes_copy); - memcpy(row1, temp, bytes_copy); - row0 += bytes_copy; - row1 += bytes_copy; - bytes_left -= bytes_copy; - } - } -} - -#ifndef STBI_NO_GIF -static void stbi__vertical_flip_slices(void *image, int w, int h, int z, int bytes_per_pixel) -{ - int slice; - int slice_size = w * h * bytes_per_pixel; - - stbi_uc *bytes = (stbi_uc *)image; - for (slice = 0; slice < z; ++slice) { - stbi__vertical_flip(bytes, w, h, bytes_per_pixel); - bytes += slice_size; - } -} -#endif - -static unsigned char *stbi__load_and_postprocess_8bit(stbi__context *s, int *x, int *y, int *comp, int req_comp) -{ - stbi__result_info ri; - void *result = stbi__load_main(s, x, y, comp, req_comp, &ri, 8); - - if (result == NULL) - return NULL; - - if (ri.bits_per_channel != 8) { - STBI_ASSERT(ri.bits_per_channel == 16); - result = stbi__convert_16_to_8((stbi__uint16 *) result, *x, *y, req_comp == 0 ? *comp : req_comp); - ri.bits_per_channel = 8; - } - - // @TODO: move stbi__convert_format to here - - if (stbi__vertically_flip_on_load) { - int channels = req_comp ? req_comp : *comp; - stbi__vertical_flip(result, *x, *y, channels * sizeof(stbi_uc)); - } - - return (unsigned char *) result; -} - -static stbi__uint16 *stbi__load_and_postprocess_16bit(stbi__context *s, int *x, int *y, int *comp, int req_comp) -{ - stbi__result_info ri; - void *result = stbi__load_main(s, x, y, comp, req_comp, &ri, 16); - - if (result == NULL) - return NULL; - - if (ri.bits_per_channel != 16) { - STBI_ASSERT(ri.bits_per_channel == 8); - result = stbi__convert_8_to_16((stbi_uc *) result, *x, *y, req_comp == 0 ? *comp : req_comp); - ri.bits_per_channel = 16; - } - - // @TODO: move stbi__convert_format16 to here - // @TODO: special case RGB-to-Y (and RGBA-to-YA) for 8-bit-to-16-bit case to keep more precision - - if (stbi__vertically_flip_on_load) { - int channels = req_comp ? req_comp : *comp; - stbi__vertical_flip(result, *x, *y, channels * sizeof(stbi__uint16)); - } - - return (stbi__uint16 *) result; -} - -#if !defined(STBI_NO_HDR) && !defined(STBI_NO_LINEAR) -static void stbi__float_postprocess(float *result, int *x, int *y, int *comp, int req_comp) -{ - if (stbi__vertically_flip_on_load && result != NULL) { - int channels = req_comp ? req_comp : *comp; - stbi__vertical_flip(result, *x, *y, channels * sizeof(float)); - } -} -#endif - -#ifndef STBI_NO_STDIO - -#if defined(_MSC_VER) && defined(STBI_WINDOWS_UTF8) -STBI_EXTERN __declspec(dllimport) int __stdcall MultiByteToWideChar(unsigned int cp, unsigned long flags, const char *str, int cbmb, wchar_t *widestr, int cchwide); -STBI_EXTERN __declspec(dllimport) int __stdcall WideCharToMultiByte(unsigned int cp, unsigned long flags, const wchar_t *widestr, int cchwide, char *str, int cbmb, const char *defchar, int *used_default); -#endif - -#if defined(_MSC_VER) && defined(STBI_WINDOWS_UTF8) -STBIDEF int stbi_convert_wchar_to_utf8(char *buffer, size_t bufferlen, const wchar_t* input) -{ - return WideCharToMultiByte(65001 /* UTF8 */, 0, input, -1, buffer, (int) bufferlen, NULL, NULL); -} -#endif - -static FILE *stbi__fopen(char const *filename, char const *mode) -{ - FILE *f; -#if defined(_MSC_VER) && defined(STBI_WINDOWS_UTF8) - wchar_t wMode[64]; - wchar_t wFilename[1024]; - if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, filename, -1, wFilename, sizeof(wFilename))) - return 0; - - if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, mode, -1, wMode, sizeof(wMode))) - return 0; - -#if _MSC_VER >= 1400 - if (0 != _wfopen_s(&f, wFilename, wMode)) - f = 0; -#else - f = _wfopen(wFilename, wMode); -#endif - -#elif defined(_MSC_VER) && _MSC_VER >= 1400 - if (0 != fopen_s(&f, filename, mode)) - f=0; -#else - f = fopen(filename, mode); -#endif - return f; -} - - -STBIDEF stbi_uc *stbi_load(char const *filename, int *x, int *y, int *comp, int req_comp) -{ - FILE *f = stbi__fopen(filename, "rb"); - unsigned char *result; - if (!f) return stbi__errpuc("can't fopen", "Unable to open file"); - result = stbi_load_from_file(f,x,y,comp,req_comp); - fclose(f); - return result; -} - -STBIDEF stbi_uc *stbi_load_from_file(FILE *f, int *x, int *y, int *comp, int req_comp) -{ - unsigned char *result; - stbi__context s; - stbi__start_file(&s,f); - result = stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp); - if (result) { - // need to 'unget' all the characters in the IO buffer - fseek(f, - (int) (s.img_buffer_end - s.img_buffer), SEEK_CUR); - } - return result; -} - -STBIDEF stbi__uint16 *stbi_load_from_file_16(FILE *f, int *x, int *y, int *comp, int req_comp) -{ - stbi__uint16 *result; - stbi__context s; - stbi__start_file(&s,f); - result = stbi__load_and_postprocess_16bit(&s,x,y,comp,req_comp); - if (result) { - // need to 'unget' all the characters in the IO buffer - fseek(f, - (int) (s.img_buffer_end - s.img_buffer), SEEK_CUR); - } - return result; -} - -STBIDEF stbi_us *stbi_load_16(char const *filename, int *x, int *y, int *comp, int req_comp) -{ - FILE *f = stbi__fopen(filename, "rb"); - stbi__uint16 *result; - if (!f) return (stbi_us *) stbi__errpuc("can't fopen", "Unable to open file"); - result = stbi_load_from_file_16(f,x,y,comp,req_comp); - fclose(f); - return result; -} - - -#endif //!STBI_NO_STDIO - -STBIDEF stbi_us *stbi_load_16_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *channels_in_file, int desired_channels) -{ - stbi__context s; - stbi__start_mem(&s,buffer,len); - return stbi__load_and_postprocess_16bit(&s,x,y,channels_in_file,desired_channels); -} - -STBIDEF stbi_us *stbi_load_16_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *channels_in_file, int desired_channels) -{ - stbi__context s; - stbi__start_callbacks(&s, (stbi_io_callbacks *)clbk, user); - return stbi__load_and_postprocess_16bit(&s,x,y,channels_in_file,desired_channels); -} - -STBIDEF stbi_uc *stbi_load_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp) -{ - stbi__context s; - stbi__start_mem(&s,buffer,len); - return stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp); -} - -STBIDEF stbi_uc *stbi_load_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp) -{ - stbi__context s; - stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user); - return stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp); -} - -#ifndef STBI_NO_GIF -STBIDEF stbi_uc *stbi_load_gif_from_memory(stbi_uc const *buffer, int len, int **delays, int *x, int *y, int *z, int *comp, int req_comp) -{ - unsigned char *result; - stbi__context s; - stbi__start_mem(&s,buffer,len); - - result = (unsigned char*) stbi__load_gif_main(&s, delays, x, y, z, comp, req_comp); - if (stbi__vertically_flip_on_load) { - stbi__vertical_flip_slices( result, *x, *y, *z, *comp ); - } - - return result; -} -#endif - -#ifndef STBI_NO_LINEAR -static float *stbi__loadf_main(stbi__context *s, int *x, int *y, int *comp, int req_comp) -{ - unsigned char *data; - #ifndef STBI_NO_HDR - if (stbi__hdr_test(s)) { - stbi__result_info ri; - float *hdr_data = stbi__hdr_load(s,x,y,comp,req_comp, &ri); - if (hdr_data) - stbi__float_postprocess(hdr_data,x,y,comp,req_comp); - return hdr_data; - } - #endif - data = stbi__load_and_postprocess_8bit(s, x, y, comp, req_comp); - if (data) - return stbi__ldr_to_hdr(data, *x, *y, req_comp ? req_comp : *comp); - return stbi__errpf("unknown image type", "Image not of any known type, or corrupt"); -} - -STBIDEF float *stbi_loadf_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp) -{ - stbi__context s; - stbi__start_mem(&s,buffer,len); - return stbi__loadf_main(&s,x,y,comp,req_comp); -} - -STBIDEF float *stbi_loadf_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp) -{ - stbi__context s; - stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user); - return stbi__loadf_main(&s,x,y,comp,req_comp); -} - -#ifndef STBI_NO_STDIO -STBIDEF float *stbi_loadf(char const *filename, int *x, int *y, int *comp, int req_comp) -{ - float *result; - FILE *f = stbi__fopen(filename, "rb"); - if (!f) return stbi__errpf("can't fopen", "Unable to open file"); - result = stbi_loadf_from_file(f,x,y,comp,req_comp); - fclose(f); - return result; -} - -STBIDEF float *stbi_loadf_from_file(FILE *f, int *x, int *y, int *comp, int req_comp) -{ - stbi__context s; - stbi__start_file(&s,f); - return stbi__loadf_main(&s,x,y,comp,req_comp); -} -#endif // !STBI_NO_STDIO - -#endif // !STBI_NO_LINEAR - -// these is-hdr-or-not is defined independent of whether STBI_NO_LINEAR is -// defined, for API simplicity; if STBI_NO_LINEAR is defined, it always -// reports false! - -STBIDEF int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len) -{ - #ifndef STBI_NO_HDR - stbi__context s; - stbi__start_mem(&s,buffer,len); - return stbi__hdr_test(&s); - #else - STBI_NOTUSED(buffer); - STBI_NOTUSED(len); - return 0; - #endif -} - -#ifndef STBI_NO_STDIO -STBIDEF int stbi_is_hdr (char const *filename) -{ - FILE *f = stbi__fopen(filename, "rb"); - int result=0; - if (f) { - result = stbi_is_hdr_from_file(f); - fclose(f); - } - return result; -} - -STBIDEF int stbi_is_hdr_from_file(FILE *f) -{ - #ifndef STBI_NO_HDR - long pos = ftell(f); - int res; - stbi__context s; - stbi__start_file(&s,f); - res = stbi__hdr_test(&s); - fseek(f, pos, SEEK_SET); - return res; - #else - STBI_NOTUSED(f); - return 0; - #endif -} -#endif // !STBI_NO_STDIO - -STBIDEF int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user) -{ - #ifndef STBI_NO_HDR - stbi__context s; - stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user); - return stbi__hdr_test(&s); - #else - STBI_NOTUSED(clbk); - STBI_NOTUSED(user); - return 0; - #endif -} - -#ifndef STBI_NO_LINEAR -static float stbi__l2h_gamma=2.2f, stbi__l2h_scale=1.0f; - -STBIDEF void stbi_ldr_to_hdr_gamma(float gamma) { stbi__l2h_gamma = gamma; } -STBIDEF void stbi_ldr_to_hdr_scale(float scale) { stbi__l2h_scale = scale; } -#endif - -static float stbi__h2l_gamma_i=1.0f/2.2f, stbi__h2l_scale_i=1.0f; - -STBIDEF void stbi_hdr_to_ldr_gamma(float gamma) { stbi__h2l_gamma_i = 1/gamma; } -STBIDEF void stbi_hdr_to_ldr_scale(float scale) { stbi__h2l_scale_i = 1/scale; } - - -////////////////////////////////////////////////////////////////////////////// -// -// Common code used by all image loaders -// - -enum -{ - STBI__SCAN_load=0, - STBI__SCAN_type, - STBI__SCAN_header -}; - -static void stbi__refill_buffer(stbi__context *s) -{ - int n = (s->io.read)(s->io_user_data,(char*)s->buffer_start,s->buflen); - if (n == 0) { - // at end of file, treat same as if from memory, but need to handle case - // where s->img_buffer isn't pointing to safe memory, e.g. 0-byte file - s->read_from_callbacks = 0; - s->img_buffer = s->buffer_start; - s->img_buffer_end = s->buffer_start+1; - *s->img_buffer = 0; - } else { - s->img_buffer = s->buffer_start; - s->img_buffer_end = s->buffer_start + n; - } -} - -stbi_inline static stbi_uc stbi__get8(stbi__context *s) -{ - if (s->img_buffer < s->img_buffer_end) - return *s->img_buffer++; - if (s->read_from_callbacks) { - stbi__refill_buffer(s); - return *s->img_buffer++; - } - return 0; -} - -stbi_inline static int stbi__at_eof(stbi__context *s) -{ - if (s->io.read) { - if (!(s->io.eof)(s->io_user_data)) return 0; - // if feof() is true, check if buffer = end - // special case: we've only got the special 0 character at the end - if (s->read_from_callbacks == 0) return 1; - } - - return s->img_buffer >= s->img_buffer_end; -} - -static void stbi__skip(stbi__context *s, int n) -{ - if (n < 0) { - s->img_buffer = s->img_buffer_end; - return; - } - if (s->io.read) { - int blen = (int) (s->img_buffer_end - s->img_buffer); - if (blen < n) { - s->img_buffer = s->img_buffer_end; - (s->io.skip)(s->io_user_data, n - blen); - return; - } - } - s->img_buffer += n; -} - -static int stbi__getn(stbi__context *s, stbi_uc *buffer, int n) -{ - if (s->io.read) { - int blen = (int) (s->img_buffer_end - s->img_buffer); - if (blen < n) { - int res, count; - - memcpy(buffer, s->img_buffer, blen); - - count = (s->io.read)(s->io_user_data, (char*) buffer + blen, n - blen); - res = (count == (n-blen)); - s->img_buffer = s->img_buffer_end; - return res; - } - } - - if (s->img_buffer+n <= s->img_buffer_end) { - memcpy(buffer, s->img_buffer, n); - s->img_buffer += n; - return 1; - } else - return 0; -} - -static int stbi__get16be(stbi__context *s) -{ - int z = stbi__get8(s); - return (z << 8) + stbi__get8(s); -} - -static stbi__uint32 stbi__get32be(stbi__context *s) -{ - stbi__uint32 z = stbi__get16be(s); - return (z << 16) + stbi__get16be(s); -} - -#if defined(STBI_NO_BMP) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) -// nothing -#else -static int stbi__get16le(stbi__context *s) -{ - int z = stbi__get8(s); - return z + (stbi__get8(s) << 8); -} -#endif - -#ifndef STBI_NO_BMP -static stbi__uint32 stbi__get32le(stbi__context *s) -{ - stbi__uint32 z = stbi__get16le(s); - return z + (stbi__get16le(s) << 16); -} -#endif - -#define STBI__BYTECAST(x) ((stbi_uc) ((x) & 255)) // truncate int to byte without warnings - - -////////////////////////////////////////////////////////////////////////////// -// -// generic converter from built-in img_n to req_comp -// individual types do this automatically as much as possible (e.g. jpeg -// does all cases internally since it needs to colorspace convert anyway, -// and it never has alpha, so very few cases ). png can automatically -// interleave an alpha=255 channel, but falls back to this for other cases -// -// assume data buffer is malloced, so malloc a new one and free that one -// only failure mode is malloc failing - -static stbi_uc stbi__compute_y(int r, int g, int b) -{ - return (stbi_uc) (((r*77) + (g*150) + (29*b)) >> 8); -} - -static unsigned char *stbi__convert_format(unsigned char *data, int img_n, int req_comp, unsigned int x, unsigned int y) -{ - int i,j; - unsigned char *good; - - if (req_comp == img_n) return data; - STBI_ASSERT(req_comp >= 1 && req_comp <= 4); - - good = (unsigned char *) stbi__malloc_mad3(req_comp, x, y, 0); - if (good == NULL) { - STBI_FREE(data); - return stbi__errpuc("outofmem", "Out of memory"); - } - - for (j=0; j < (int) y; ++j) { - unsigned char *src = data + j * x * img_n ; - unsigned char *dest = good + j * x * req_comp; - - #define STBI__COMBO(a,b) ((a)*8+(b)) - #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) - // convert source image with img_n components to one with req_comp components; - // avoid switch per pixel, so use switch per scanline and massive macros - switch (STBI__COMBO(img_n, req_comp)) { - STBI__CASE(1,2) { dest[0]=src[0]; dest[1]=255; } break; - STBI__CASE(1,3) { dest[0]=dest[1]=dest[2]=src[0]; } break; - STBI__CASE(1,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=255; } break; - STBI__CASE(2,1) { dest[0]=src[0]; } break; - STBI__CASE(2,3) { dest[0]=dest[1]=dest[2]=src[0]; } break; - STBI__CASE(2,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=src[1]; } break; - STBI__CASE(3,4) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2];dest[3]=255; } break; - STBI__CASE(3,1) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); } break; - STBI__CASE(3,2) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); dest[1] = 255; } break; - STBI__CASE(4,1) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); } break; - STBI__CASE(4,2) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); dest[1] = src[3]; } break; - STBI__CASE(4,3) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2]; } break; - default: STBI_ASSERT(0); - } - #undef STBI__CASE - } - - STBI_FREE(data); - return good; -} - -static stbi__uint16 stbi__compute_y_16(int r, int g, int b) -{ - return (stbi__uint16) (((r*77) + (g*150) + (29*b)) >> 8); -} - -static stbi__uint16 *stbi__convert_format16(stbi__uint16 *data, int img_n, int req_comp, unsigned int x, unsigned int y) -{ - int i,j; - stbi__uint16 *good; - - if (req_comp == img_n) return data; - STBI_ASSERT(req_comp >= 1 && req_comp <= 4); - - good = (stbi__uint16 *) stbi__malloc(req_comp * x * y * 2); - if (good == NULL) { - STBI_FREE(data); - return (stbi__uint16 *) stbi__errpuc("outofmem", "Out of memory"); - } - - for (j=0; j < (int) y; ++j) { - stbi__uint16 *src = data + j * x * img_n ; - stbi__uint16 *dest = good + j * x * req_comp; - - #define STBI__COMBO(a,b) ((a)*8+(b)) - #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) - // convert source image with img_n components to one with req_comp components; - // avoid switch per pixel, so use switch per scanline and massive macros - switch (STBI__COMBO(img_n, req_comp)) { - STBI__CASE(1,2) { dest[0]=src[0]; dest[1]=0xffff; } break; - STBI__CASE(1,3) { dest[0]=dest[1]=dest[2]=src[0]; } break; - STBI__CASE(1,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=0xffff; } break; - STBI__CASE(2,1) { dest[0]=src[0]; } break; - STBI__CASE(2,3) { dest[0]=dest[1]=dest[2]=src[0]; } break; - STBI__CASE(2,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=src[1]; } break; - STBI__CASE(3,4) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2];dest[3]=0xffff; } break; - STBI__CASE(3,1) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); } break; - STBI__CASE(3,2) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); dest[1] = 0xffff; } break; - STBI__CASE(4,1) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); } break; - STBI__CASE(4,2) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); dest[1] = src[3]; } break; - STBI__CASE(4,3) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2]; } break; - default: STBI_ASSERT(0); - } - #undef STBI__CASE - } - - STBI_FREE(data); - return good; -} - -#ifndef STBI_NO_LINEAR -static float *stbi__ldr_to_hdr(stbi_uc *data, int x, int y, int comp) -{ - int i,k,n; - float *output; - if (!data) return NULL; - output = (float *) stbi__malloc_mad4(x, y, comp, sizeof(float), 0); - if (output == NULL) { STBI_FREE(data); return stbi__errpf("outofmem", "Out of memory"); } - // compute number of non-alpha components - if (comp & 1) n = comp; else n = comp-1; - for (i=0; i < x*y; ++i) { - for (k=0; k < n; ++k) { - output[i*comp + k] = (float) (pow(data[i*comp+k]/255.0f, stbi__l2h_gamma) * stbi__l2h_scale); - } - } - if (n < comp) { - for (i=0; i < x*y; ++i) { - output[i*comp + n] = data[i*comp + n]/255.0f; - } - } - STBI_FREE(data); - return output; -} -#endif - -#ifndef STBI_NO_HDR -#define stbi__float2int(x) ((int) (x)) -static stbi_uc *stbi__hdr_to_ldr(float *data, int x, int y, int comp) -{ - int i,k,n; - stbi_uc *output; - if (!data) return NULL; - output = (stbi_uc *) stbi__malloc_mad3(x, y, comp, 0); - if (output == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); } - // compute number of non-alpha components - if (comp & 1) n = comp; else n = comp-1; - for (i=0; i < x*y; ++i) { - for (k=0; k < n; ++k) { - float z = (float) pow(data[i*comp+k]*stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f; - if (z < 0) z = 0; - if (z > 255) z = 255; - output[i*comp + k] = (stbi_uc) stbi__float2int(z); - } - if (k < comp) { - float z = data[i*comp+k] * 255 + 0.5f; - if (z < 0) z = 0; - if (z > 255) z = 255; - output[i*comp + k] = (stbi_uc) stbi__float2int(z); - } - } - STBI_FREE(data); - return output; -} -#endif - -////////////////////////////////////////////////////////////////////////////// -// -// "baseline" JPEG/JFIF decoder -// -// simple implementation -// - doesn't support delayed output of y-dimension -// - simple interface (only one output format: 8-bit interleaved RGB) -// - doesn't try to recover corrupt jpegs -// - doesn't allow partial loading, loading multiple at once -// - still fast on x86 (copying globals into locals doesn't help x86) -// - allocates lots of intermediate memory (full size of all components) -// - non-interleaved case requires this anyway -// - allows good upsampling (see next) -// high-quality -// - upsampled channels are bilinearly interpolated, even across blocks -// - quality integer IDCT derived from IJG's 'slow' -// performance -// - fast huffman; reasonable integer IDCT -// - some SIMD kernels for common paths on targets with SSE2/NEON -// - uses a lot of intermediate memory, could cache poorly - -#ifndef STBI_NO_JPEG - -// huffman decoding acceleration -#define FAST_BITS 9 // larger handles more cases; smaller stomps less cache - -typedef struct -{ - stbi_uc fast[1 << FAST_BITS]; - // weirdly, repacking this into AoS is a 10% speed loss, instead of a win - stbi__uint16 code[256]; - stbi_uc values[256]; - stbi_uc size[257]; - unsigned int maxcode[18]; - int delta[17]; // old 'firstsymbol' - old 'firstcode' -} stbi__huffman; - -typedef struct -{ - stbi__context *s; - stbi__huffman huff_dc[4]; - stbi__huffman huff_ac[4]; - stbi__uint16 dequant[4][64]; - stbi__int16 fast_ac[4][1 << FAST_BITS]; - -// sizes for components, interleaved MCUs - int img_h_max, img_v_max; - int img_mcu_x, img_mcu_y; - int img_mcu_w, img_mcu_h; - -// definition of jpeg image component - struct - { - int id; - int h,v; - int tq; - int hd,ha; - int dc_pred; - - int x,y,w2,h2; - stbi_uc *data; - void *raw_data, *raw_coeff; - stbi_uc *linebuf; - short *coeff; // progressive only - int coeff_w, coeff_h; // number of 8x8 coefficient blocks - } img_comp[4]; - - stbi__uint32 code_buffer; // jpeg entropy-coded buffer - int code_bits; // number of valid bits - unsigned char marker; // marker seen while filling entropy buffer - int nomore; // flag if we saw a marker so must stop - - int progressive; - int spec_start; - int spec_end; - int succ_high; - int succ_low; - int eob_run; - int jfif; - int app14_color_transform; // Adobe APP14 tag - int rgb; - - int scan_n, order[4]; - int restart_interval, todo; - -// kernels - void (*idct_block_kernel)(stbi_uc *out, int out_stride, short data[64]); - void (*YCbCr_to_RGB_kernel)(stbi_uc *out, const stbi_uc *y, const stbi_uc *pcb, const stbi_uc *pcr, int count, int step); - stbi_uc *(*resample_row_hv_2_kernel)(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs); -} stbi__jpeg; - -static int stbi__build_huffman(stbi__huffman *h, int *count) -{ - int i,j,k=0; - unsigned int code; - // build size list for each symbol (from JPEG spec) - for (i=0; i < 16; ++i) - for (j=0; j < count[i]; ++j) - h->size[k++] = (stbi_uc) (i+1); - h->size[k] = 0; - - // compute actual symbols (from jpeg spec) - code = 0; - k = 0; - for(j=1; j <= 16; ++j) { - // compute delta to add to code to compute symbol id - h->delta[j] = k - code; - if (h->size[k] == j) { - while (h->size[k] == j) - h->code[k++] = (stbi__uint16) (code++); - if (code-1 >= (1u << j)) return stbi__err("bad code lengths","Corrupt JPEG"); - } - // compute largest code + 1 for this size, preshifted as needed later - h->maxcode[j] = code << (16-j); - code <<= 1; - } - h->maxcode[j] = 0xffffffff; - - // build non-spec acceleration table; 255 is flag for not-accelerated - memset(h->fast, 255, 1 << FAST_BITS); - for (i=0; i < k; ++i) { - int s = h->size[i]; - if (s <= FAST_BITS) { - int c = h->code[i] << (FAST_BITS-s); - int m = 1 << (FAST_BITS-s); - for (j=0; j < m; ++j) { - h->fast[c+j] = (stbi_uc) i; - } - } - } - return 1; -} - -// build a table that decodes both magnitude and value of small ACs in -// one go. -static void stbi__build_fast_ac(stbi__int16 *fast_ac, stbi__huffman *h) -{ - int i; - for (i=0; i < (1 << FAST_BITS); ++i) { - stbi_uc fast = h->fast[i]; - fast_ac[i] = 0; - if (fast < 255) { - int rs = h->values[fast]; - int run = (rs >> 4) & 15; - int magbits = rs & 15; - int len = h->size[fast]; - - if (magbits && len + magbits <= FAST_BITS) { - // magnitude code followed by receive_extend code - int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits); - int m = 1 << (magbits - 1); - if (k < m) k += (~0U << magbits) + 1; - // if the result is small enough, we can fit it in fast_ac table - if (k >= -128 && k <= 127) - fast_ac[i] = (stbi__int16) ((k * 256) + (run * 16) + (len + magbits)); - } - } - } -} - -static void stbi__grow_buffer_unsafe(stbi__jpeg *j) -{ - do { - unsigned int b = j->nomore ? 0 : stbi__get8(j->s); - if (b == 0xff) { - int c = stbi__get8(j->s); - while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes - if (c != 0) { - j->marker = (unsigned char) c; - j->nomore = 1; - return; - } - } - j->code_buffer |= b << (24 - j->code_bits); - j->code_bits += 8; - } while (j->code_bits <= 24); -} - -// (1 << n) - 1 -static const stbi__uint32 stbi__bmask[17]={0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535}; - -// decode a jpeg huffman value from the bitstream -stbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg *j, stbi__huffman *h) -{ - unsigned int temp; - int c,k; - - if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - - // look at the top FAST_BITS and determine what symbol ID it is, - // if the code is <= FAST_BITS - c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1); - k = h->fast[c]; - if (k < 255) { - int s = h->size[k]; - if (s > j->code_bits) - return -1; - j->code_buffer <<= s; - j->code_bits -= s; - return h->values[k]; - } - - // naive test is to shift the code_buffer down so k bits are - // valid, then test against maxcode. To speed this up, we've - // preshifted maxcode left so that it has (16-k) 0s at the - // end; in other words, regardless of the number of bits, it - // wants to be compared against something shifted to have 16; - // that way we don't need to shift inside the loop. - temp = j->code_buffer >> 16; - for (k=FAST_BITS+1 ; ; ++k) - if (temp < h->maxcode[k]) - break; - if (k == 17) { - // error! code not found - j->code_bits -= 16; - return -1; - } - - if (k > j->code_bits) - return -1; - - // convert the huffman code to the symbol id - c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k]; - STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]); - - // convert the id to a symbol - j->code_bits -= k; - j->code_buffer <<= k; - return h->values[c]; -} - -// bias[n] = (-1<code_bits < n) stbi__grow_buffer_unsafe(j); - - sgn = (stbi__int32)j->code_buffer >> 31; // sign bit is always in MSB - k = stbi_lrot(j->code_buffer, n); - STBI_ASSERT(n >= 0 && n < (int) (sizeof(stbi__bmask)/sizeof(*stbi__bmask))); - j->code_buffer = k & ~stbi__bmask[n]; - k &= stbi__bmask[n]; - j->code_bits -= n; - return k + (stbi__jbias[n] & ~sgn); -} - -// get some unsigned bits -stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg *j, int n) -{ - unsigned int k; - if (j->code_bits < n) stbi__grow_buffer_unsafe(j); - k = stbi_lrot(j->code_buffer, n); - j->code_buffer = k & ~stbi__bmask[n]; - k &= stbi__bmask[n]; - j->code_bits -= n; - return k; -} - -stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg *j) -{ - unsigned int k; - if (j->code_bits < 1) stbi__grow_buffer_unsafe(j); - k = j->code_buffer; - j->code_buffer <<= 1; - --j->code_bits; - return k & 0x80000000; -} - -// given a value that's at position X in the zigzag stream, -// where does it appear in the 8x8 matrix coded as row-major? -static const stbi_uc stbi__jpeg_dezigzag[64+15] = -{ - 0, 1, 8, 16, 9, 2, 3, 10, - 17, 24, 32, 25, 18, 11, 4, 5, - 12, 19, 26, 33, 40, 48, 41, 34, - 27, 20, 13, 6, 7, 14, 21, 28, - 35, 42, 49, 56, 57, 50, 43, 36, - 29, 22, 15, 23, 30, 37, 44, 51, - 58, 59, 52, 45, 38, 31, 39, 46, - 53, 60, 61, 54, 47, 55, 62, 63, - // let corrupt input sample past end - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63 -}; - -// decode one 64-entry block-- -static int stbi__jpeg_decode_block(stbi__jpeg *j, short data[64], stbi__huffman *hdc, stbi__huffman *hac, stbi__int16 *fac, int b, stbi__uint16 *dequant) -{ - int diff,dc,k; - int t; - - if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - t = stbi__jpeg_huff_decode(j, hdc); - if (t < 0) return stbi__err("bad huffman code","Corrupt JPEG"); - - // 0 all the ac values now so we can do it 32-bits at a time - memset(data,0,64*sizeof(data[0])); - - diff = t ? stbi__extend_receive(j, t) : 0; - dc = j->img_comp[b].dc_pred + diff; - j->img_comp[b].dc_pred = dc; - data[0] = (short) (dc * dequant[0]); - - // decode AC components, see JPEG spec - k = 1; - do { - unsigned int zig; - int c,r,s; - if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1); - r = fac[c]; - if (r) { // fast-AC path - k += (r >> 4) & 15; // run - s = r & 15; // combined length - j->code_buffer <<= s; - j->code_bits -= s; - // decode into unzigzag'd location - zig = stbi__jpeg_dezigzag[k++]; - data[zig] = (short) ((r >> 8) * dequant[zig]); - } else { - int rs = stbi__jpeg_huff_decode(j, hac); - if (rs < 0) return stbi__err("bad huffman code","Corrupt JPEG"); - s = rs & 15; - r = rs >> 4; - if (s == 0) { - if (rs != 0xf0) break; // end block - k += 16; - } else { - k += r; - // decode into unzigzag'd location - zig = stbi__jpeg_dezigzag[k++]; - data[zig] = (short) (stbi__extend_receive(j,s) * dequant[zig]); - } - } - } while (k < 64); - return 1; -} - -static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg *j, short data[64], stbi__huffman *hdc, int b) -{ - int diff,dc; - int t; - if (j->spec_end != 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); - - if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - - if (j->succ_high == 0) { - // first scan for DC coefficient, must be first - memset(data,0,64*sizeof(data[0])); // 0 all the ac values now - t = stbi__jpeg_huff_decode(j, hdc); - diff = t ? stbi__extend_receive(j, t) : 0; - - dc = j->img_comp[b].dc_pred + diff; - j->img_comp[b].dc_pred = dc; - data[0] = (short) (dc << j->succ_low); - } else { - // refinement scan for DC coefficient - if (stbi__jpeg_get_bit(j)) - data[0] += (short) (1 << j->succ_low); - } - return 1; -} - -// @OPTIMIZE: store non-zigzagged during the decode passes, -// and only de-zigzag when dequantizing -static int stbi__jpeg_decode_block_prog_ac(stbi__jpeg *j, short data[64], stbi__huffman *hac, stbi__int16 *fac) -{ - int k; - if (j->spec_start == 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); - - if (j->succ_high == 0) { - int shift = j->succ_low; - - if (j->eob_run) { - --j->eob_run; - return 1; - } - - k = j->spec_start; - do { - unsigned int zig; - int c,r,s; - if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1); - r = fac[c]; - if (r) { // fast-AC path - k += (r >> 4) & 15; // run - s = r & 15; // combined length - j->code_buffer <<= s; - j->code_bits -= s; - zig = stbi__jpeg_dezigzag[k++]; - data[zig] = (short) ((r >> 8) << shift); - } else { - int rs = stbi__jpeg_huff_decode(j, hac); - if (rs < 0) return stbi__err("bad huffman code","Corrupt JPEG"); - s = rs & 15; - r = rs >> 4; - if (s == 0) { - if (r < 15) { - j->eob_run = (1 << r); - if (r) - j->eob_run += stbi__jpeg_get_bits(j, r); - --j->eob_run; - break; - } - k += 16; - } else { - k += r; - zig = stbi__jpeg_dezigzag[k++]; - data[zig] = (short) (stbi__extend_receive(j,s) << shift); - } - } - } while (k <= j->spec_end); - } else { - // refinement scan for these AC coefficients - - short bit = (short) (1 << j->succ_low); - - if (j->eob_run) { - --j->eob_run; - for (k = j->spec_start; k <= j->spec_end; ++k) { - short *p = &data[stbi__jpeg_dezigzag[k]]; - if (*p != 0) - if (stbi__jpeg_get_bit(j)) - if ((*p & bit)==0) { - if (*p > 0) - *p += bit; - else - *p -= bit; - } - } - } else { - k = j->spec_start; - do { - int r,s; - int rs = stbi__jpeg_huff_decode(j, hac); // @OPTIMIZE see if we can use the fast path here, advance-by-r is so slow, eh - if (rs < 0) return stbi__err("bad huffman code","Corrupt JPEG"); - s = rs & 15; - r = rs >> 4; - if (s == 0) { - if (r < 15) { - j->eob_run = (1 << r) - 1; - if (r) - j->eob_run += stbi__jpeg_get_bits(j, r); - r = 64; // force end of block - } else { - // r=15 s=0 should write 16 0s, so we just do - // a run of 15 0s and then write s (which is 0), - // so we don't have to do anything special here - } - } else { - if (s != 1) return stbi__err("bad huffman code", "Corrupt JPEG"); - // sign bit - if (stbi__jpeg_get_bit(j)) - s = bit; - else - s = -bit; - } - - // advance by r - while (k <= j->spec_end) { - short *p = &data[stbi__jpeg_dezigzag[k++]]; - if (*p != 0) { - if (stbi__jpeg_get_bit(j)) - if ((*p & bit)==0) { - if (*p > 0) - *p += bit; - else - *p -= bit; - } - } else { - if (r == 0) { - *p = (short) s; - break; - } - --r; - } - } - } while (k <= j->spec_end); - } - } - return 1; -} - -// take a -128..127 value and stbi__clamp it and convert to 0..255 -stbi_inline static stbi_uc stbi__clamp(int x) -{ - // trick to use a single test to catch both cases - if ((unsigned int) x > 255) { - if (x < 0) return 0; - if (x > 255) return 255; - } - return (stbi_uc) x; -} - -#define stbi__f2f(x) ((int) (((x) * 4096 + 0.5))) -#define stbi__fsh(x) ((x) * 4096) - -// derived from jidctint -- DCT_ISLOW -#define STBI__IDCT_1D(s0,s1,s2,s3,s4,s5,s6,s7) \ - int t0,t1,t2,t3,p1,p2,p3,p4,p5,x0,x1,x2,x3; \ - p2 = s2; \ - p3 = s6; \ - p1 = (p2+p3) * stbi__f2f(0.5411961f); \ - t2 = p1 + p3*stbi__f2f(-1.847759065f); \ - t3 = p1 + p2*stbi__f2f( 0.765366865f); \ - p2 = s0; \ - p3 = s4; \ - t0 = stbi__fsh(p2+p3); \ - t1 = stbi__fsh(p2-p3); \ - x0 = t0+t3; \ - x3 = t0-t3; \ - x1 = t1+t2; \ - x2 = t1-t2; \ - t0 = s7; \ - t1 = s5; \ - t2 = s3; \ - t3 = s1; \ - p3 = t0+t2; \ - p4 = t1+t3; \ - p1 = t0+t3; \ - p2 = t1+t2; \ - p5 = (p3+p4)*stbi__f2f( 1.175875602f); \ - t0 = t0*stbi__f2f( 0.298631336f); \ - t1 = t1*stbi__f2f( 2.053119869f); \ - t2 = t2*stbi__f2f( 3.072711026f); \ - t3 = t3*stbi__f2f( 1.501321110f); \ - p1 = p5 + p1*stbi__f2f(-0.899976223f); \ - p2 = p5 + p2*stbi__f2f(-2.562915447f); \ - p3 = p3*stbi__f2f(-1.961570560f); \ - p4 = p4*stbi__f2f(-0.390180644f); \ - t3 += p1+p4; \ - t2 += p2+p3; \ - t1 += p2+p4; \ - t0 += p1+p3; - -static void stbi__idct_block(stbi_uc *out, int out_stride, short data[64]) -{ - int i,val[64],*v=val; - stbi_uc *o; - short *d = data; - - // columns - for (i=0; i < 8; ++i,++d, ++v) { - // if all zeroes, shortcut -- this avoids dequantizing 0s and IDCTing - if (d[ 8]==0 && d[16]==0 && d[24]==0 && d[32]==0 - && d[40]==0 && d[48]==0 && d[56]==0) { - // no shortcut 0 seconds - // (1|2|3|4|5|6|7)==0 0 seconds - // all separate -0.047 seconds - // 1 && 2|3 && 4|5 && 6|7: -0.047 seconds - int dcterm = d[0]*4; - v[0] = v[8] = v[16] = v[24] = v[32] = v[40] = v[48] = v[56] = dcterm; - } else { - STBI__IDCT_1D(d[ 0],d[ 8],d[16],d[24],d[32],d[40],d[48],d[56]) - // constants scaled things up by 1<<12; let's bring them back - // down, but keep 2 extra bits of precision - x0 += 512; x1 += 512; x2 += 512; x3 += 512; - v[ 0] = (x0+t3) >> 10; - v[56] = (x0-t3) >> 10; - v[ 8] = (x1+t2) >> 10; - v[48] = (x1-t2) >> 10; - v[16] = (x2+t1) >> 10; - v[40] = (x2-t1) >> 10; - v[24] = (x3+t0) >> 10; - v[32] = (x3-t0) >> 10; - } - } - - for (i=0, v=val, o=out; i < 8; ++i,v+=8,o+=out_stride) { - // no fast case since the first 1D IDCT spread components out - STBI__IDCT_1D(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7]) - // constants scaled things up by 1<<12, plus we had 1<<2 from first - // loop, plus horizontal and vertical each scale by sqrt(8) so together - // we've got an extra 1<<3, so 1<<17 total we need to remove. - // so we want to round that, which means adding 0.5 * 1<<17, - // aka 65536. Also, we'll end up with -128 to 127 that we want - // to encode as 0..255 by adding 128, so we'll add that before the shift - x0 += 65536 + (128<<17); - x1 += 65536 + (128<<17); - x2 += 65536 + (128<<17); - x3 += 65536 + (128<<17); - // tried computing the shifts into temps, or'ing the temps to see - // if any were out of range, but that was slower - o[0] = stbi__clamp((x0+t3) >> 17); - o[7] = stbi__clamp((x0-t3) >> 17); - o[1] = stbi__clamp((x1+t2) >> 17); - o[6] = stbi__clamp((x1-t2) >> 17); - o[2] = stbi__clamp((x2+t1) >> 17); - o[5] = stbi__clamp((x2-t1) >> 17); - o[3] = stbi__clamp((x3+t0) >> 17); - o[4] = stbi__clamp((x3-t0) >> 17); - } -} - -#ifdef STBI_SSE2 -// sse2 integer IDCT. not the fastest possible implementation but it -// produces bit-identical results to the generic C version so it's -// fully "transparent". -static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64]) -{ - // This is constructed to match our regular (generic) integer IDCT exactly. - __m128i row0, row1, row2, row3, row4, row5, row6, row7; - __m128i tmp; - - // dot product constant: even elems=x, odd elems=y - #define dct_const(x,y) _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y)) - - // out(0) = c0[even]*x + c0[odd]*y (c0, x, y 16-bit, out 32-bit) - // out(1) = c1[even]*x + c1[odd]*y - #define dct_rot(out0,out1, x,y,c0,c1) \ - __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \ - __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \ - __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \ - __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \ - __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \ - __m128i out1##_h = _mm_madd_epi16(c0##hi, c1) - - // out = in << 12 (in 16-bit, out 32-bit) - #define dct_widen(out, in) \ - __m128i out##_l = _mm_srai_epi32(_mm_unpacklo_epi16(_mm_setzero_si128(), (in)), 4); \ - __m128i out##_h = _mm_srai_epi32(_mm_unpackhi_epi16(_mm_setzero_si128(), (in)), 4) - - // wide add - #define dct_wadd(out, a, b) \ - __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \ - __m128i out##_h = _mm_add_epi32(a##_h, b##_h) - - // wide sub - #define dct_wsub(out, a, b) \ - __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \ - __m128i out##_h = _mm_sub_epi32(a##_h, b##_h) - - // butterfly a/b, add bias, then shift by "s" and pack - #define dct_bfly32o(out0, out1, a,b,bias,s) \ - { \ - __m128i abiased_l = _mm_add_epi32(a##_l, bias); \ - __m128i abiased_h = _mm_add_epi32(a##_h, bias); \ - dct_wadd(sum, abiased, b); \ - dct_wsub(dif, abiased, b); \ - out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \ - out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \ - } - - // 8-bit interleave step (for transposes) - #define dct_interleave8(a, b) \ - tmp = a; \ - a = _mm_unpacklo_epi8(a, b); \ - b = _mm_unpackhi_epi8(tmp, b) - - // 16-bit interleave step (for transposes) - #define dct_interleave16(a, b) \ - tmp = a; \ - a = _mm_unpacklo_epi16(a, b); \ - b = _mm_unpackhi_epi16(tmp, b) - - #define dct_pass(bias,shift) \ - { \ - /* even part */ \ - dct_rot(t2e,t3e, row2,row6, rot0_0,rot0_1); \ - __m128i sum04 = _mm_add_epi16(row0, row4); \ - __m128i dif04 = _mm_sub_epi16(row0, row4); \ - dct_widen(t0e, sum04); \ - dct_widen(t1e, dif04); \ - dct_wadd(x0, t0e, t3e); \ - dct_wsub(x3, t0e, t3e); \ - dct_wadd(x1, t1e, t2e); \ - dct_wsub(x2, t1e, t2e); \ - /* odd part */ \ - dct_rot(y0o,y2o, row7,row3, rot2_0,rot2_1); \ - dct_rot(y1o,y3o, row5,row1, rot3_0,rot3_1); \ - __m128i sum17 = _mm_add_epi16(row1, row7); \ - __m128i sum35 = _mm_add_epi16(row3, row5); \ - dct_rot(y4o,y5o, sum17,sum35, rot1_0,rot1_1); \ - dct_wadd(x4, y0o, y4o); \ - dct_wadd(x5, y1o, y5o); \ - dct_wadd(x6, y2o, y5o); \ - dct_wadd(x7, y3o, y4o); \ - dct_bfly32o(row0,row7, x0,x7,bias,shift); \ - dct_bfly32o(row1,row6, x1,x6,bias,shift); \ - dct_bfly32o(row2,row5, x2,x5,bias,shift); \ - dct_bfly32o(row3,row4, x3,x4,bias,shift); \ - } - - __m128i rot0_0 = dct_const(stbi__f2f(0.5411961f), stbi__f2f(0.5411961f) + stbi__f2f(-1.847759065f)); - __m128i rot0_1 = dct_const(stbi__f2f(0.5411961f) + stbi__f2f( 0.765366865f), stbi__f2f(0.5411961f)); - __m128i rot1_0 = dct_const(stbi__f2f(1.175875602f) + stbi__f2f(-0.899976223f), stbi__f2f(1.175875602f)); - __m128i rot1_1 = dct_const(stbi__f2f(1.175875602f), stbi__f2f(1.175875602f) + stbi__f2f(-2.562915447f)); - __m128i rot2_0 = dct_const(stbi__f2f(-1.961570560f) + stbi__f2f( 0.298631336f), stbi__f2f(-1.961570560f)); - __m128i rot2_1 = dct_const(stbi__f2f(-1.961570560f), stbi__f2f(-1.961570560f) + stbi__f2f( 3.072711026f)); - __m128i rot3_0 = dct_const(stbi__f2f(-0.390180644f) + stbi__f2f( 2.053119869f), stbi__f2f(-0.390180644f)); - __m128i rot3_1 = dct_const(stbi__f2f(-0.390180644f), stbi__f2f(-0.390180644f) + stbi__f2f( 1.501321110f)); - - // rounding biases in column/row passes, see stbi__idct_block for explanation. - __m128i bias_0 = _mm_set1_epi32(512); - __m128i bias_1 = _mm_set1_epi32(65536 + (128<<17)); - - // load - row0 = _mm_load_si128((const __m128i *) (data + 0*8)); - row1 = _mm_load_si128((const __m128i *) (data + 1*8)); - row2 = _mm_load_si128((const __m128i *) (data + 2*8)); - row3 = _mm_load_si128((const __m128i *) (data + 3*8)); - row4 = _mm_load_si128((const __m128i *) (data + 4*8)); - row5 = _mm_load_si128((const __m128i *) (data + 5*8)); - row6 = _mm_load_si128((const __m128i *) (data + 6*8)); - row7 = _mm_load_si128((const __m128i *) (data + 7*8)); - - // column pass - dct_pass(bias_0, 10); - - { - // 16bit 8x8 transpose pass 1 - dct_interleave16(row0, row4); - dct_interleave16(row1, row5); - dct_interleave16(row2, row6); - dct_interleave16(row3, row7); - - // transpose pass 2 - dct_interleave16(row0, row2); - dct_interleave16(row1, row3); - dct_interleave16(row4, row6); - dct_interleave16(row5, row7); - - // transpose pass 3 - dct_interleave16(row0, row1); - dct_interleave16(row2, row3); - dct_interleave16(row4, row5); - dct_interleave16(row6, row7); - } - - // row pass - dct_pass(bias_1, 17); - - { - // pack - __m128i p0 = _mm_packus_epi16(row0, row1); // a0a1a2a3...a7b0b1b2b3...b7 - __m128i p1 = _mm_packus_epi16(row2, row3); - __m128i p2 = _mm_packus_epi16(row4, row5); - __m128i p3 = _mm_packus_epi16(row6, row7); - - // 8bit 8x8 transpose pass 1 - dct_interleave8(p0, p2); // a0e0a1e1... - dct_interleave8(p1, p3); // c0g0c1g1... - - // transpose pass 2 - dct_interleave8(p0, p1); // a0c0e0g0... - dct_interleave8(p2, p3); // b0d0f0h0... - - // transpose pass 3 - dct_interleave8(p0, p2); // a0b0c0d0... - dct_interleave8(p1, p3); // a4b4c4d4... - - // store - _mm_storel_epi64((__m128i *) out, p0); out += out_stride; - _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p0, 0x4e)); out += out_stride; - _mm_storel_epi64((__m128i *) out, p2); out += out_stride; - _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p2, 0x4e)); out += out_stride; - _mm_storel_epi64((__m128i *) out, p1); out += out_stride; - _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p1, 0x4e)); out += out_stride; - _mm_storel_epi64((__m128i *) out, p3); out += out_stride; - _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p3, 0x4e)); - } - -#undef dct_const -#undef dct_rot -#undef dct_widen -#undef dct_wadd -#undef dct_wsub -#undef dct_bfly32o -#undef dct_interleave8 -#undef dct_interleave16 -#undef dct_pass -} - -#endif // STBI_SSE2 - -#ifdef STBI_NEON - -// NEON integer IDCT. should produce bit-identical -// results to the generic C version. -static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64]) -{ - int16x8_t row0, row1, row2, row3, row4, row5, row6, row7; - - int16x4_t rot0_0 = vdup_n_s16(stbi__f2f(0.5411961f)); - int16x4_t rot0_1 = vdup_n_s16(stbi__f2f(-1.847759065f)); - int16x4_t rot0_2 = vdup_n_s16(stbi__f2f( 0.765366865f)); - int16x4_t rot1_0 = vdup_n_s16(stbi__f2f( 1.175875602f)); - int16x4_t rot1_1 = vdup_n_s16(stbi__f2f(-0.899976223f)); - int16x4_t rot1_2 = vdup_n_s16(stbi__f2f(-2.562915447f)); - int16x4_t rot2_0 = vdup_n_s16(stbi__f2f(-1.961570560f)); - int16x4_t rot2_1 = vdup_n_s16(stbi__f2f(-0.390180644f)); - int16x4_t rot3_0 = vdup_n_s16(stbi__f2f( 0.298631336f)); - int16x4_t rot3_1 = vdup_n_s16(stbi__f2f( 2.053119869f)); - int16x4_t rot3_2 = vdup_n_s16(stbi__f2f( 3.072711026f)); - int16x4_t rot3_3 = vdup_n_s16(stbi__f2f( 1.501321110f)); - -#define dct_long_mul(out, inq, coeff) \ - int32x4_t out##_l = vmull_s16(vget_low_s16(inq), coeff); \ - int32x4_t out##_h = vmull_s16(vget_high_s16(inq), coeff) - -#define dct_long_mac(out, acc, inq, coeff) \ - int32x4_t out##_l = vmlal_s16(acc##_l, vget_low_s16(inq), coeff); \ - int32x4_t out##_h = vmlal_s16(acc##_h, vget_high_s16(inq), coeff) - -#define dct_widen(out, inq) \ - int32x4_t out##_l = vshll_n_s16(vget_low_s16(inq), 12); \ - int32x4_t out##_h = vshll_n_s16(vget_high_s16(inq), 12) - -// wide add -#define dct_wadd(out, a, b) \ - int32x4_t out##_l = vaddq_s32(a##_l, b##_l); \ - int32x4_t out##_h = vaddq_s32(a##_h, b##_h) - -// wide sub -#define dct_wsub(out, a, b) \ - int32x4_t out##_l = vsubq_s32(a##_l, b##_l); \ - int32x4_t out##_h = vsubq_s32(a##_h, b##_h) - -// butterfly a/b, then shift using "shiftop" by "s" and pack -#define dct_bfly32o(out0,out1, a,b,shiftop,s) \ - { \ - dct_wadd(sum, a, b); \ - dct_wsub(dif, a, b); \ - out0 = vcombine_s16(shiftop(sum_l, s), shiftop(sum_h, s)); \ - out1 = vcombine_s16(shiftop(dif_l, s), shiftop(dif_h, s)); \ - } - -#define dct_pass(shiftop, shift) \ - { \ - /* even part */ \ - int16x8_t sum26 = vaddq_s16(row2, row6); \ - dct_long_mul(p1e, sum26, rot0_0); \ - dct_long_mac(t2e, p1e, row6, rot0_1); \ - dct_long_mac(t3e, p1e, row2, rot0_2); \ - int16x8_t sum04 = vaddq_s16(row0, row4); \ - int16x8_t dif04 = vsubq_s16(row0, row4); \ - dct_widen(t0e, sum04); \ - dct_widen(t1e, dif04); \ - dct_wadd(x0, t0e, t3e); \ - dct_wsub(x3, t0e, t3e); \ - dct_wadd(x1, t1e, t2e); \ - dct_wsub(x2, t1e, t2e); \ - /* odd part */ \ - int16x8_t sum15 = vaddq_s16(row1, row5); \ - int16x8_t sum17 = vaddq_s16(row1, row7); \ - int16x8_t sum35 = vaddq_s16(row3, row5); \ - int16x8_t sum37 = vaddq_s16(row3, row7); \ - int16x8_t sumodd = vaddq_s16(sum17, sum35); \ - dct_long_mul(p5o, sumodd, rot1_0); \ - dct_long_mac(p1o, p5o, sum17, rot1_1); \ - dct_long_mac(p2o, p5o, sum35, rot1_2); \ - dct_long_mul(p3o, sum37, rot2_0); \ - dct_long_mul(p4o, sum15, rot2_1); \ - dct_wadd(sump13o, p1o, p3o); \ - dct_wadd(sump24o, p2o, p4o); \ - dct_wadd(sump23o, p2o, p3o); \ - dct_wadd(sump14o, p1o, p4o); \ - dct_long_mac(x4, sump13o, row7, rot3_0); \ - dct_long_mac(x5, sump24o, row5, rot3_1); \ - dct_long_mac(x6, sump23o, row3, rot3_2); \ - dct_long_mac(x7, sump14o, row1, rot3_3); \ - dct_bfly32o(row0,row7, x0,x7,shiftop,shift); \ - dct_bfly32o(row1,row6, x1,x6,shiftop,shift); \ - dct_bfly32o(row2,row5, x2,x5,shiftop,shift); \ - dct_bfly32o(row3,row4, x3,x4,shiftop,shift); \ - } - - // load - row0 = vld1q_s16(data + 0*8); - row1 = vld1q_s16(data + 1*8); - row2 = vld1q_s16(data + 2*8); - row3 = vld1q_s16(data + 3*8); - row4 = vld1q_s16(data + 4*8); - row5 = vld1q_s16(data + 5*8); - row6 = vld1q_s16(data + 6*8); - row7 = vld1q_s16(data + 7*8); - - // add DC bias - row0 = vaddq_s16(row0, vsetq_lane_s16(1024, vdupq_n_s16(0), 0)); - - // column pass - dct_pass(vrshrn_n_s32, 10); - - // 16bit 8x8 transpose - { -// these three map to a single VTRN.16, VTRN.32, and VSWP, respectively. -// whether compilers actually get this is another story, sadly. -#define dct_trn16(x, y) { int16x8x2_t t = vtrnq_s16(x, y); x = t.val[0]; y = t.val[1]; } -#define dct_trn32(x, y) { int32x4x2_t t = vtrnq_s32(vreinterpretq_s32_s16(x), vreinterpretq_s32_s16(y)); x = vreinterpretq_s16_s32(t.val[0]); y = vreinterpretq_s16_s32(t.val[1]); } -#define dct_trn64(x, y) { int16x8_t x0 = x; int16x8_t y0 = y; x = vcombine_s16(vget_low_s16(x0), vget_low_s16(y0)); y = vcombine_s16(vget_high_s16(x0), vget_high_s16(y0)); } - - // pass 1 - dct_trn16(row0, row1); // a0b0a2b2a4b4a6b6 - dct_trn16(row2, row3); - dct_trn16(row4, row5); - dct_trn16(row6, row7); - - // pass 2 - dct_trn32(row0, row2); // a0b0c0d0a4b4c4d4 - dct_trn32(row1, row3); - dct_trn32(row4, row6); - dct_trn32(row5, row7); - - // pass 3 - dct_trn64(row0, row4); // a0b0c0d0e0f0g0h0 - dct_trn64(row1, row5); - dct_trn64(row2, row6); - dct_trn64(row3, row7); - -#undef dct_trn16 -#undef dct_trn32 -#undef dct_trn64 - } - - // row pass - // vrshrn_n_s32 only supports shifts up to 16, we need - // 17. so do a non-rounding shift of 16 first then follow - // up with a rounding shift by 1. - dct_pass(vshrn_n_s32, 16); - - { - // pack and round - uint8x8_t p0 = vqrshrun_n_s16(row0, 1); - uint8x8_t p1 = vqrshrun_n_s16(row1, 1); - uint8x8_t p2 = vqrshrun_n_s16(row2, 1); - uint8x8_t p3 = vqrshrun_n_s16(row3, 1); - uint8x8_t p4 = vqrshrun_n_s16(row4, 1); - uint8x8_t p5 = vqrshrun_n_s16(row5, 1); - uint8x8_t p6 = vqrshrun_n_s16(row6, 1); - uint8x8_t p7 = vqrshrun_n_s16(row7, 1); - - // again, these can translate into one instruction, but often don't. -#define dct_trn8_8(x, y) { uint8x8x2_t t = vtrn_u8(x, y); x = t.val[0]; y = t.val[1]; } -#define dct_trn8_16(x, y) { uint16x4x2_t t = vtrn_u16(vreinterpret_u16_u8(x), vreinterpret_u16_u8(y)); x = vreinterpret_u8_u16(t.val[0]); y = vreinterpret_u8_u16(t.val[1]); } -#define dct_trn8_32(x, y) { uint32x2x2_t t = vtrn_u32(vreinterpret_u32_u8(x), vreinterpret_u32_u8(y)); x = vreinterpret_u8_u32(t.val[0]); y = vreinterpret_u8_u32(t.val[1]); } - - // sadly can't use interleaved stores here since we only write - // 8 bytes to each scan line! - - // 8x8 8-bit transpose pass 1 - dct_trn8_8(p0, p1); - dct_trn8_8(p2, p3); - dct_trn8_8(p4, p5); - dct_trn8_8(p6, p7); - - // pass 2 - dct_trn8_16(p0, p2); - dct_trn8_16(p1, p3); - dct_trn8_16(p4, p6); - dct_trn8_16(p5, p7); - - // pass 3 - dct_trn8_32(p0, p4); - dct_trn8_32(p1, p5); - dct_trn8_32(p2, p6); - dct_trn8_32(p3, p7); - - // store - vst1_u8(out, p0); out += out_stride; - vst1_u8(out, p1); out += out_stride; - vst1_u8(out, p2); out += out_stride; - vst1_u8(out, p3); out += out_stride; - vst1_u8(out, p4); out += out_stride; - vst1_u8(out, p5); out += out_stride; - vst1_u8(out, p6); out += out_stride; - vst1_u8(out, p7); - -#undef dct_trn8_8 -#undef dct_trn8_16 -#undef dct_trn8_32 - } - -#undef dct_long_mul -#undef dct_long_mac -#undef dct_widen -#undef dct_wadd -#undef dct_wsub -#undef dct_bfly32o -#undef dct_pass -} - -#endif // STBI_NEON - -#define STBI__MARKER_none 0xff -// if there's a pending marker from the entropy stream, return that -// otherwise, fetch from the stream and get a marker. if there's no -// marker, return 0xff, which is never a valid marker value -static stbi_uc stbi__get_marker(stbi__jpeg *j) -{ - stbi_uc x; - if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; } - x = stbi__get8(j->s); - if (x != 0xff) return STBI__MARKER_none; - while (x == 0xff) - x = stbi__get8(j->s); // consume repeated 0xff fill bytes - return x; -} - -// in each scan, we'll have scan_n components, and the order -// of the components is specified by order[] -#define STBI__RESTART(x) ((x) >= 0xd0 && (x) <= 0xd7) - -// after a restart interval, stbi__jpeg_reset the entropy decoder and -// the dc prediction -static void stbi__jpeg_reset(stbi__jpeg *j) -{ - j->code_bits = 0; - j->code_buffer = 0; - j->nomore = 0; - j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0; - j->marker = STBI__MARKER_none; - j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; - j->eob_run = 0; - // no more than 1<<31 MCUs if no restart_interal? that's plenty safe, - // since we don't even allow 1<<30 pixels -} - -static int stbi__parse_entropy_coded_data(stbi__jpeg *z) -{ - stbi__jpeg_reset(z); - if (!z->progressive) { - if (z->scan_n == 1) { - int i,j; - STBI_SIMD_ALIGN(short, data[64]); - int n = z->order[0]; - // non-interleaved data, we just need to process one block at a time, - // in trivial scanline order - // number of blocks to do just depends on how many actual "pixels" this - // component has, independent of interleaved MCU blocking and such - int w = (z->img_comp[n].x+7) >> 3; - int h = (z->img_comp[n].y+7) >> 3; - for (j=0; j < h; ++j) { - for (i=0; i < w; ++i) { - int ha = z->img_comp[n].ha; - if (!stbi__jpeg_decode_block(z, data, z->huff_dc+z->img_comp[n].hd, z->huff_ac+ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; - z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*j*8+i*8, z->img_comp[n].w2, data); - // every data block is an MCU, so countdown the restart interval - if (--z->todo <= 0) { - if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); - // if it's NOT a restart, then just bail, so we get corrupt data - // rather than no data - if (!STBI__RESTART(z->marker)) return 1; - stbi__jpeg_reset(z); - } - } - } - return 1; - } else { // interleaved - int i,j,k,x,y; - STBI_SIMD_ALIGN(short, data[64]); - for (j=0; j < z->img_mcu_y; ++j) { - for (i=0; i < z->img_mcu_x; ++i) { - // scan an interleaved mcu... process scan_n components in order - for (k=0; k < z->scan_n; ++k) { - int n = z->order[k]; - // scan out an mcu's worth of this component; that's just determined - // by the basic H and V specified for the component - for (y=0; y < z->img_comp[n].v; ++y) { - for (x=0; x < z->img_comp[n].h; ++x) { - int x2 = (i*z->img_comp[n].h + x)*8; - int y2 = (j*z->img_comp[n].v + y)*8; - int ha = z->img_comp[n].ha; - if (!stbi__jpeg_decode_block(z, data, z->huff_dc+z->img_comp[n].hd, z->huff_ac+ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; - z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*y2+x2, z->img_comp[n].w2, data); - } - } - } - // after all interleaved components, that's an interleaved MCU, - // so now count down the restart interval - if (--z->todo <= 0) { - if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); - if (!STBI__RESTART(z->marker)) return 1; - stbi__jpeg_reset(z); - } - } - } - return 1; - } - } else { - if (z->scan_n == 1) { - int i,j; - int n = z->order[0]; - // non-interleaved data, we just need to process one block at a time, - // in trivial scanline order - // number of blocks to do just depends on how many actual "pixels" this - // component has, independent of interleaved MCU blocking and such - int w = (z->img_comp[n].x+7) >> 3; - int h = (z->img_comp[n].y+7) >> 3; - for (j=0; j < h; ++j) { - for (i=0; i < w; ++i) { - short *data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); - if (z->spec_start == 0) { - if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) - return 0; - } else { - int ha = z->img_comp[n].ha; - if (!stbi__jpeg_decode_block_prog_ac(z, data, &z->huff_ac[ha], z->fast_ac[ha])) - return 0; - } - // every data block is an MCU, so countdown the restart interval - if (--z->todo <= 0) { - if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); - if (!STBI__RESTART(z->marker)) return 1; - stbi__jpeg_reset(z); - } - } - } - return 1; - } else { // interleaved - int i,j,k,x,y; - for (j=0; j < z->img_mcu_y; ++j) { - for (i=0; i < z->img_mcu_x; ++i) { - // scan an interleaved mcu... process scan_n components in order - for (k=0; k < z->scan_n; ++k) { - int n = z->order[k]; - // scan out an mcu's worth of this component; that's just determined - // by the basic H and V specified for the component - for (y=0; y < z->img_comp[n].v; ++y) { - for (x=0; x < z->img_comp[n].h; ++x) { - int x2 = (i*z->img_comp[n].h + x); - int y2 = (j*z->img_comp[n].v + y); - short *data = z->img_comp[n].coeff + 64 * (x2 + y2 * z->img_comp[n].coeff_w); - if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) - return 0; - } - } - } - // after all interleaved components, that's an interleaved MCU, - // so now count down the restart interval - if (--z->todo <= 0) { - if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); - if (!STBI__RESTART(z->marker)) return 1; - stbi__jpeg_reset(z); - } - } - } - return 1; - } - } -} - -static void stbi__jpeg_dequantize(short *data, stbi__uint16 *dequant) -{ - int i; - for (i=0; i < 64; ++i) - data[i] *= dequant[i]; -} - -static void stbi__jpeg_finish(stbi__jpeg *z) -{ - if (z->progressive) { - // dequantize and idct the data - int i,j,n; - for (n=0; n < z->s->img_n; ++n) { - int w = (z->img_comp[n].x+7) >> 3; - int h = (z->img_comp[n].y+7) >> 3; - for (j=0; j < h; ++j) { - for (i=0; i < w; ++i) { - short *data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); - stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]); - z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*j*8+i*8, z->img_comp[n].w2, data); - } - } - } - } -} - -static int stbi__process_marker(stbi__jpeg *z, int m) -{ - int L; - switch (m) { - case STBI__MARKER_none: // no marker found - return stbi__err("expected marker","Corrupt JPEG"); - - case 0xDD: // DRI - specify restart interval - if (stbi__get16be(z->s) != 4) return stbi__err("bad DRI len","Corrupt JPEG"); - z->restart_interval = stbi__get16be(z->s); - return 1; - - case 0xDB: // DQT - define quantization table - L = stbi__get16be(z->s)-2; - while (L > 0) { - int q = stbi__get8(z->s); - int p = q >> 4, sixteen = (p != 0); - int t = q & 15,i; - if (p != 0 && p != 1) return stbi__err("bad DQT type","Corrupt JPEG"); - if (t > 3) return stbi__err("bad DQT table","Corrupt JPEG"); - - for (i=0; i < 64; ++i) - z->dequant[t][stbi__jpeg_dezigzag[i]] = (stbi__uint16)(sixteen ? stbi__get16be(z->s) : stbi__get8(z->s)); - L -= (sixteen ? 129 : 65); - } - return L==0; - - case 0xC4: // DHT - define huffman table - L = stbi__get16be(z->s)-2; - while (L > 0) { - stbi_uc *v; - int sizes[16],i,n=0; - int q = stbi__get8(z->s); - int tc = q >> 4; - int th = q & 15; - if (tc > 1 || th > 3) return stbi__err("bad DHT header","Corrupt JPEG"); - for (i=0; i < 16; ++i) { - sizes[i] = stbi__get8(z->s); - n += sizes[i]; - } - L -= 17; - if (tc == 0) { - if (!stbi__build_huffman(z->huff_dc+th, sizes)) return 0; - v = z->huff_dc[th].values; - } else { - if (!stbi__build_huffman(z->huff_ac+th, sizes)) return 0; - v = z->huff_ac[th].values; - } - for (i=0; i < n; ++i) - v[i] = stbi__get8(z->s); - if (tc != 0) - stbi__build_fast_ac(z->fast_ac[th], z->huff_ac + th); - L -= n; - } - return L==0; - } - - // check for comment block or APP blocks - if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) { - L = stbi__get16be(z->s); - if (L < 2) { - if (m == 0xFE) - return stbi__err("bad COM len","Corrupt JPEG"); - else - return stbi__err("bad APP len","Corrupt JPEG"); - } - L -= 2; - - if (m == 0xE0 && L >= 5) { // JFIF APP0 segment - static const unsigned char tag[5] = {'J','F','I','F','\0'}; - int ok = 1; - int i; - for (i=0; i < 5; ++i) - if (stbi__get8(z->s) != tag[i]) - ok = 0; - L -= 5; - if (ok) - z->jfif = 1; - } else if (m == 0xEE && L >= 12) { // Adobe APP14 segment - static const unsigned char tag[6] = {'A','d','o','b','e','\0'}; - int ok = 1; - int i; - for (i=0; i < 6; ++i) - if (stbi__get8(z->s) != tag[i]) - ok = 0; - L -= 6; - if (ok) { - stbi__get8(z->s); // version - stbi__get16be(z->s); // flags0 - stbi__get16be(z->s); // flags1 - z->app14_color_transform = stbi__get8(z->s); // color transform - L -= 6; - } - } - - stbi__skip(z->s, L); - return 1; - } - - return stbi__err("unknown marker","Corrupt JPEG"); -} - -// after we see SOS -static int stbi__process_scan_header(stbi__jpeg *z) -{ - int i; - int Ls = stbi__get16be(z->s); - z->scan_n = stbi__get8(z->s); - if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int) z->s->img_n) return stbi__err("bad SOS component count","Corrupt JPEG"); - if (Ls != 6+2*z->scan_n) return stbi__err("bad SOS len","Corrupt JPEG"); - for (i=0; i < z->scan_n; ++i) { - int id = stbi__get8(z->s), which; - int q = stbi__get8(z->s); - for (which = 0; which < z->s->img_n; ++which) - if (z->img_comp[which].id == id) - break; - if (which == z->s->img_n) return 0; // no match - z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return stbi__err("bad DC huff","Corrupt JPEG"); - z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return stbi__err("bad AC huff","Corrupt JPEG"); - z->order[i] = which; - } - - { - int aa; - z->spec_start = stbi__get8(z->s); - z->spec_end = stbi__get8(z->s); // should be 63, but might be 0 - aa = stbi__get8(z->s); - z->succ_high = (aa >> 4); - z->succ_low = (aa & 15); - if (z->progressive) { - if (z->spec_start > 63 || z->spec_end > 63 || z->spec_start > z->spec_end || z->succ_high > 13 || z->succ_low > 13) - return stbi__err("bad SOS", "Corrupt JPEG"); - } else { - if (z->spec_start != 0) return stbi__err("bad SOS","Corrupt JPEG"); - if (z->succ_high != 0 || z->succ_low != 0) return stbi__err("bad SOS","Corrupt JPEG"); - z->spec_end = 63; - } - } - - return 1; -} - -static int stbi__free_jpeg_components(stbi__jpeg *z, int ncomp, int why) -{ - int i; - for (i=0; i < ncomp; ++i) { - if (z->img_comp[i].raw_data) { - STBI_FREE(z->img_comp[i].raw_data); - z->img_comp[i].raw_data = NULL; - z->img_comp[i].data = NULL; - } - if (z->img_comp[i].raw_coeff) { - STBI_FREE(z->img_comp[i].raw_coeff); - z->img_comp[i].raw_coeff = 0; - z->img_comp[i].coeff = 0; - } - if (z->img_comp[i].linebuf) { - STBI_FREE(z->img_comp[i].linebuf); - z->img_comp[i].linebuf = NULL; - } - } - return why; -} - -static int stbi__process_frame_header(stbi__jpeg *z, int scan) -{ - stbi__context *s = z->s; - int Lf,p,i,q, h_max=1,v_max=1,c; - Lf = stbi__get16be(s); if (Lf < 11) return stbi__err("bad SOF len","Corrupt JPEG"); // JPEG - p = stbi__get8(s); if (p != 8) return stbi__err("only 8-bit","JPEG format not supported: 8-bit only"); // JPEG baseline - s->img_y = stbi__get16be(s); if (s->img_y == 0) return stbi__err("no header height", "JPEG format not supported: delayed height"); // Legal, but we don't handle it--but neither does IJG - s->img_x = stbi__get16be(s); if (s->img_x == 0) return stbi__err("0 width","Corrupt JPEG"); // JPEG requires - c = stbi__get8(s); - if (c != 3 && c != 1 && c != 4) return stbi__err("bad component count","Corrupt JPEG"); - s->img_n = c; - for (i=0; i < c; ++i) { - z->img_comp[i].data = NULL; - z->img_comp[i].linebuf = NULL; - } - - if (Lf != 8+3*s->img_n) return stbi__err("bad SOF len","Corrupt JPEG"); - - z->rgb = 0; - for (i=0; i < s->img_n; ++i) { - static const unsigned char rgb[3] = { 'R', 'G', 'B' }; - z->img_comp[i].id = stbi__get8(s); - if (s->img_n == 3 && z->img_comp[i].id == rgb[i]) - ++z->rgb; - q = stbi__get8(s); - z->img_comp[i].h = (q >> 4); if (!z->img_comp[i].h || z->img_comp[i].h > 4) return stbi__err("bad H","Corrupt JPEG"); - z->img_comp[i].v = q & 15; if (!z->img_comp[i].v || z->img_comp[i].v > 4) return stbi__err("bad V","Corrupt JPEG"); - z->img_comp[i].tq = stbi__get8(s); if (z->img_comp[i].tq > 3) return stbi__err("bad TQ","Corrupt JPEG"); - } - - if (scan != STBI__SCAN_load) return 1; - - if (!stbi__mad3sizes_valid(s->img_x, s->img_y, s->img_n, 0)) return stbi__err("too large", "Image too large to decode"); - - for (i=0; i < s->img_n; ++i) { - if (z->img_comp[i].h > h_max) h_max = z->img_comp[i].h; - if (z->img_comp[i].v > v_max) v_max = z->img_comp[i].v; - } - - // compute interleaved mcu info - z->img_h_max = h_max; - z->img_v_max = v_max; - z->img_mcu_w = h_max * 8; - z->img_mcu_h = v_max * 8; - // these sizes can't be more than 17 bits - z->img_mcu_x = (s->img_x + z->img_mcu_w-1) / z->img_mcu_w; - z->img_mcu_y = (s->img_y + z->img_mcu_h-1) / z->img_mcu_h; - - for (i=0; i < s->img_n; ++i) { - // number of effective pixels (e.g. for non-interleaved MCU) - z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max-1) / h_max; - z->img_comp[i].y = (s->img_y * z->img_comp[i].v + v_max-1) / v_max; - // to simplify generation, we'll allocate enough memory to decode - // the bogus oversized data from using interleaved MCUs and their - // big blocks (e.g. a 16x16 iMCU on an image of width 33); we won't - // discard the extra data until colorspace conversion - // - // img_mcu_x, img_mcu_y: <=17 bits; comp[i].h and .v are <=4 (checked earlier) - // so these muls can't overflow with 32-bit ints (which we require) - z->img_comp[i].w2 = z->img_mcu_x * z->img_comp[i].h * 8; - z->img_comp[i].h2 = z->img_mcu_y * z->img_comp[i].v * 8; - z->img_comp[i].coeff = 0; - z->img_comp[i].raw_coeff = 0; - z->img_comp[i].linebuf = NULL; - z->img_comp[i].raw_data = stbi__malloc_mad2(z->img_comp[i].w2, z->img_comp[i].h2, 15); - if (z->img_comp[i].raw_data == NULL) - return stbi__free_jpeg_components(z, i+1, stbi__err("outofmem", "Out of memory")); - // align blocks for idct using mmx/sse - z->img_comp[i].data = (stbi_uc*) (((size_t) z->img_comp[i].raw_data + 15) & ~15); - if (z->progressive) { - // w2, h2 are multiples of 8 (see above) - z->img_comp[i].coeff_w = z->img_comp[i].w2 / 8; - z->img_comp[i].coeff_h = z->img_comp[i].h2 / 8; - z->img_comp[i].raw_coeff = stbi__malloc_mad3(z->img_comp[i].w2, z->img_comp[i].h2, sizeof(short), 15); - if (z->img_comp[i].raw_coeff == NULL) - return stbi__free_jpeg_components(z, i+1, stbi__err("outofmem", "Out of memory")); - z->img_comp[i].coeff = (short*) (((size_t) z->img_comp[i].raw_coeff + 15) & ~15); - } - } - - return 1; -} - -// use comparisons since in some cases we handle more than one case (e.g. SOF) -#define stbi__DNL(x) ((x) == 0xdc) -#define stbi__SOI(x) ((x) == 0xd8) -#define stbi__EOI(x) ((x) == 0xd9) -#define stbi__SOF(x) ((x) == 0xc0 || (x) == 0xc1 || (x) == 0xc2) -#define stbi__SOS(x) ((x) == 0xda) - -#define stbi__SOF_progressive(x) ((x) == 0xc2) - -static int stbi__decode_jpeg_header(stbi__jpeg *z, int scan) -{ - int m; - z->jfif = 0; - z->app14_color_transform = -1; // valid values are 0,1,2 - z->marker = STBI__MARKER_none; // initialize cached marker to empty - m = stbi__get_marker(z); - if (!stbi__SOI(m)) return stbi__err("no SOI","Corrupt JPEG"); - if (scan == STBI__SCAN_type) return 1; - m = stbi__get_marker(z); - while (!stbi__SOF(m)) { - if (!stbi__process_marker(z,m)) return 0; - m = stbi__get_marker(z); - while (m == STBI__MARKER_none) { - // some files have extra padding after their blocks, so ok, we'll scan - if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG"); - m = stbi__get_marker(z); - } - } - z->progressive = stbi__SOF_progressive(m); - if (!stbi__process_frame_header(z, scan)) return 0; - return 1; -} - -// decode image to YCbCr format -static int stbi__decode_jpeg_image(stbi__jpeg *j) -{ - int m; - for (m = 0; m < 4; m++) { - j->img_comp[m].raw_data = NULL; - j->img_comp[m].raw_coeff = NULL; - } - j->restart_interval = 0; - if (!stbi__decode_jpeg_header(j, STBI__SCAN_load)) return 0; - m = stbi__get_marker(j); - while (!stbi__EOI(m)) { - if (stbi__SOS(m)) { - if (!stbi__process_scan_header(j)) return 0; - if (!stbi__parse_entropy_coded_data(j)) return 0; - if (j->marker == STBI__MARKER_none ) { - // handle 0s at the end of image data from IP Kamera 9060 - while (!stbi__at_eof(j->s)) { - int x = stbi__get8(j->s); - if (x == 255) { - j->marker = stbi__get8(j->s); - break; - } - } - // if we reach eof without hitting a marker, stbi__get_marker() below will fail and we'll eventually return 0 - } - } else if (stbi__DNL(m)) { - int Ld = stbi__get16be(j->s); - stbi__uint32 NL = stbi__get16be(j->s); - if (Ld != 4) return stbi__err("bad DNL len", "Corrupt JPEG"); - if (NL != j->s->img_y) return stbi__err("bad DNL height", "Corrupt JPEG"); - } else { - if (!stbi__process_marker(j, m)) return 0; - } - m = stbi__get_marker(j); - } - if (j->progressive) - stbi__jpeg_finish(j); - return 1; -} - -// static jfif-centered resampling (across block boundaries) - -typedef stbi_uc *(*resample_row_func)(stbi_uc *out, stbi_uc *in0, stbi_uc *in1, - int w, int hs); - -#define stbi__div4(x) ((stbi_uc) ((x) >> 2)) - -static stbi_uc *resample_row_1(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) -{ - STBI_NOTUSED(out); - STBI_NOTUSED(in_far); - STBI_NOTUSED(w); - STBI_NOTUSED(hs); - return in_near; -} - -static stbi_uc* stbi__resample_row_v_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) -{ - // need to generate two samples vertically for every one in input - int i; - STBI_NOTUSED(hs); - for (i=0; i < w; ++i) - out[i] = stbi__div4(3*in_near[i] + in_far[i] + 2); - return out; -} - -static stbi_uc* stbi__resample_row_h_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) -{ - // need to generate two samples horizontally for every one in input - int i; - stbi_uc *input = in_near; - - if (w == 1) { - // if only one sample, can't do any interpolation - out[0] = out[1] = input[0]; - return out; - } - - out[0] = input[0]; - out[1] = stbi__div4(input[0]*3 + input[1] + 2); - for (i=1; i < w-1; ++i) { - int n = 3*input[i]+2; - out[i*2+0] = stbi__div4(n+input[i-1]); - out[i*2+1] = stbi__div4(n+input[i+1]); - } - out[i*2+0] = stbi__div4(input[w-2]*3 + input[w-1] + 2); - out[i*2+1] = input[w-1]; - - STBI_NOTUSED(in_far); - STBI_NOTUSED(hs); - - return out; -} - -#define stbi__div16(x) ((stbi_uc) ((x) >> 4)) - -static stbi_uc *stbi__resample_row_hv_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) -{ - // need to generate 2x2 samples for every one in input - int i,t0,t1; - if (w == 1) { - out[0] = out[1] = stbi__div4(3*in_near[0] + in_far[0] + 2); - return out; - } - - t1 = 3*in_near[0] + in_far[0]; - out[0] = stbi__div4(t1+2); - for (i=1; i < w; ++i) { - t0 = t1; - t1 = 3*in_near[i]+in_far[i]; - out[i*2-1] = stbi__div16(3*t0 + t1 + 8); - out[i*2 ] = stbi__div16(3*t1 + t0 + 8); - } - out[w*2-1] = stbi__div4(t1+2); - - STBI_NOTUSED(hs); - - return out; -} - -#if defined(STBI_SSE2) || defined(STBI_NEON) -static stbi_uc *stbi__resample_row_hv_2_simd(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) -{ - // need to generate 2x2 samples for every one in input - int i=0,t0,t1; - - if (w == 1) { - out[0] = out[1] = stbi__div4(3*in_near[0] + in_far[0] + 2); - return out; - } - - t1 = 3*in_near[0] + in_far[0]; - // process groups of 8 pixels for as long as we can. - // note we can't handle the last pixel in a row in this loop - // because we need to handle the filter boundary conditions. - for (; i < ((w-1) & ~7); i += 8) { -#if defined(STBI_SSE2) - // load and perform the vertical filtering pass - // this uses 3*x + y = 4*x + (y - x) - __m128i zero = _mm_setzero_si128(); - __m128i farb = _mm_loadl_epi64((__m128i *) (in_far + i)); - __m128i nearb = _mm_loadl_epi64((__m128i *) (in_near + i)); - __m128i farw = _mm_unpacklo_epi8(farb, zero); - __m128i nearw = _mm_unpacklo_epi8(nearb, zero); - __m128i diff = _mm_sub_epi16(farw, nearw); - __m128i nears = _mm_slli_epi16(nearw, 2); - __m128i curr = _mm_add_epi16(nears, diff); // current row - - // horizontal filter works the same based on shifted vers of current - // row. "prev" is current row shifted right by 1 pixel; we need to - // insert the previous pixel value (from t1). - // "next" is current row shifted left by 1 pixel, with first pixel - // of next block of 8 pixels added in. - __m128i prv0 = _mm_slli_si128(curr, 2); - __m128i nxt0 = _mm_srli_si128(curr, 2); - __m128i prev = _mm_insert_epi16(prv0, t1, 0); - __m128i next = _mm_insert_epi16(nxt0, 3*in_near[i+8] + in_far[i+8], 7); - - // horizontal filter, polyphase implementation since it's convenient: - // even pixels = 3*cur + prev = cur*4 + (prev - cur) - // odd pixels = 3*cur + next = cur*4 + (next - cur) - // note the shared term. - __m128i bias = _mm_set1_epi16(8); - __m128i curs = _mm_slli_epi16(curr, 2); - __m128i prvd = _mm_sub_epi16(prev, curr); - __m128i nxtd = _mm_sub_epi16(next, curr); - __m128i curb = _mm_add_epi16(curs, bias); - __m128i even = _mm_add_epi16(prvd, curb); - __m128i odd = _mm_add_epi16(nxtd, curb); - - // interleave even and odd pixels, then undo scaling. - __m128i int0 = _mm_unpacklo_epi16(even, odd); - __m128i int1 = _mm_unpackhi_epi16(even, odd); - __m128i de0 = _mm_srli_epi16(int0, 4); - __m128i de1 = _mm_srli_epi16(int1, 4); - - // pack and write output - __m128i outv = _mm_packus_epi16(de0, de1); - _mm_storeu_si128((__m128i *) (out + i*2), outv); -#elif defined(STBI_NEON) - // load and perform the vertical filtering pass - // this uses 3*x + y = 4*x + (y - x) - uint8x8_t farb = vld1_u8(in_far + i); - uint8x8_t nearb = vld1_u8(in_near + i); - int16x8_t diff = vreinterpretq_s16_u16(vsubl_u8(farb, nearb)); - int16x8_t nears = vreinterpretq_s16_u16(vshll_n_u8(nearb, 2)); - int16x8_t curr = vaddq_s16(nears, diff); // current row - - // horizontal filter works the same based on shifted vers of current - // row. "prev" is current row shifted right by 1 pixel; we need to - // insert the previous pixel value (from t1). - // "next" is current row shifted left by 1 pixel, with first pixel - // of next block of 8 pixels added in. - int16x8_t prv0 = vextq_s16(curr, curr, 7); - int16x8_t nxt0 = vextq_s16(curr, curr, 1); - int16x8_t prev = vsetq_lane_s16(t1, prv0, 0); - int16x8_t next = vsetq_lane_s16(3*in_near[i+8] + in_far[i+8], nxt0, 7); - - // horizontal filter, polyphase implementation since it's convenient: - // even pixels = 3*cur + prev = cur*4 + (prev - cur) - // odd pixels = 3*cur + next = cur*4 + (next - cur) - // note the shared term. - int16x8_t curs = vshlq_n_s16(curr, 2); - int16x8_t prvd = vsubq_s16(prev, curr); - int16x8_t nxtd = vsubq_s16(next, curr); - int16x8_t even = vaddq_s16(curs, prvd); - int16x8_t odd = vaddq_s16(curs, nxtd); - - // undo scaling and round, then store with even/odd phases interleaved - uint8x8x2_t o; - o.val[0] = vqrshrun_n_s16(even, 4); - o.val[1] = vqrshrun_n_s16(odd, 4); - vst2_u8(out + i*2, o); -#endif - - // "previous" value for next iter - t1 = 3*in_near[i+7] + in_far[i+7]; - } - - t0 = t1; - t1 = 3*in_near[i] + in_far[i]; - out[i*2] = stbi__div16(3*t1 + t0 + 8); - - for (++i; i < w; ++i) { - t0 = t1; - t1 = 3*in_near[i]+in_far[i]; - out[i*2-1] = stbi__div16(3*t0 + t1 + 8); - out[i*2 ] = stbi__div16(3*t1 + t0 + 8); - } - out[w*2-1] = stbi__div4(t1+2); - - STBI_NOTUSED(hs); - - return out; -} -#endif - -static stbi_uc *stbi__resample_row_generic(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) -{ - // resample with nearest-neighbor - int i,j; - STBI_NOTUSED(in_far); - for (i=0; i < w; ++i) - for (j=0; j < hs; ++j) - out[i*hs+j] = in_near[i]; - return out; -} - -// this is a reduced-precision calculation of YCbCr-to-RGB introduced -// to make sure the code produces the same results in both SIMD and scalar -#define stbi__float2fixed(x) (((int) ((x) * 4096.0f + 0.5f)) << 8) -static void stbi__YCbCr_to_RGB_row(stbi_uc *out, const stbi_uc *y, const stbi_uc *pcb, const stbi_uc *pcr, int count, int step) -{ - int i; - for (i=0; i < count; ++i) { - int y_fixed = (y[i] << 20) + (1<<19); // rounding - int r,g,b; - int cr = pcr[i] - 128; - int cb = pcb[i] - 128; - r = y_fixed + cr* stbi__float2fixed(1.40200f); - g = y_fixed + (cr*-stbi__float2fixed(0.71414f)) + ((cb*-stbi__float2fixed(0.34414f)) & 0xffff0000); - b = y_fixed + cb* stbi__float2fixed(1.77200f); - r >>= 20; - g >>= 20; - b >>= 20; - if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; } - if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; } - if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; } - out[0] = (stbi_uc)r; - out[1] = (stbi_uc)g; - out[2] = (stbi_uc)b; - out[3] = 255; - out += step; - } -} - -#if defined(STBI_SSE2) || defined(STBI_NEON) -static void stbi__YCbCr_to_RGB_simd(stbi_uc *out, stbi_uc const *y, stbi_uc const *pcb, stbi_uc const *pcr, int count, int step) -{ - int i = 0; - -#ifdef STBI_SSE2 - // step == 3 is pretty ugly on the final interleave, and i'm not convinced - // it's useful in practice (you wouldn't use it for textures, for example). - // so just accelerate step == 4 case. - if (step == 4) { - // this is a fairly straightforward implementation and not super-optimized. - __m128i signflip = _mm_set1_epi8(-0x80); - __m128i cr_const0 = _mm_set1_epi16( (short) ( 1.40200f*4096.0f+0.5f)); - __m128i cr_const1 = _mm_set1_epi16( - (short) ( 0.71414f*4096.0f+0.5f)); - __m128i cb_const0 = _mm_set1_epi16( - (short) ( 0.34414f*4096.0f+0.5f)); - __m128i cb_const1 = _mm_set1_epi16( (short) ( 1.77200f*4096.0f+0.5f)); - __m128i y_bias = _mm_set1_epi8((char) (unsigned char) 128); - __m128i xw = _mm_set1_epi16(255); // alpha channel - - for (; i+7 < count; i += 8) { - // load - __m128i y_bytes = _mm_loadl_epi64((__m128i *) (y+i)); - __m128i cr_bytes = _mm_loadl_epi64((__m128i *) (pcr+i)); - __m128i cb_bytes = _mm_loadl_epi64((__m128i *) (pcb+i)); - __m128i cr_biased = _mm_xor_si128(cr_bytes, signflip); // -128 - __m128i cb_biased = _mm_xor_si128(cb_bytes, signflip); // -128 - - // unpack to short (and left-shift cr, cb by 8) - __m128i yw = _mm_unpacklo_epi8(y_bias, y_bytes); - __m128i crw = _mm_unpacklo_epi8(_mm_setzero_si128(), cr_biased); - __m128i cbw = _mm_unpacklo_epi8(_mm_setzero_si128(), cb_biased); - - // color transform - __m128i yws = _mm_srli_epi16(yw, 4); - __m128i cr0 = _mm_mulhi_epi16(cr_const0, crw); - __m128i cb0 = _mm_mulhi_epi16(cb_const0, cbw); - __m128i cb1 = _mm_mulhi_epi16(cbw, cb_const1); - __m128i cr1 = _mm_mulhi_epi16(crw, cr_const1); - __m128i rws = _mm_add_epi16(cr0, yws); - __m128i gwt = _mm_add_epi16(cb0, yws); - __m128i bws = _mm_add_epi16(yws, cb1); - __m128i gws = _mm_add_epi16(gwt, cr1); - - // descale - __m128i rw = _mm_srai_epi16(rws, 4); - __m128i bw = _mm_srai_epi16(bws, 4); - __m128i gw = _mm_srai_epi16(gws, 4); - - // back to byte, set up for transpose - __m128i brb = _mm_packus_epi16(rw, bw); - __m128i gxb = _mm_packus_epi16(gw, xw); - - // transpose to interleave channels - __m128i t0 = _mm_unpacklo_epi8(brb, gxb); - __m128i t1 = _mm_unpackhi_epi8(brb, gxb); - __m128i o0 = _mm_unpacklo_epi16(t0, t1); - __m128i o1 = _mm_unpackhi_epi16(t0, t1); - - // store - _mm_storeu_si128((__m128i *) (out + 0), o0); - _mm_storeu_si128((__m128i *) (out + 16), o1); - out += 32; - } - } -#endif - -#ifdef STBI_NEON - // in this version, step=3 support would be easy to add. but is there demand? - if (step == 4) { - // this is a fairly straightforward implementation and not super-optimized. - uint8x8_t signflip = vdup_n_u8(0x80); - int16x8_t cr_const0 = vdupq_n_s16( (short) ( 1.40200f*4096.0f+0.5f)); - int16x8_t cr_const1 = vdupq_n_s16( - (short) ( 0.71414f*4096.0f+0.5f)); - int16x8_t cb_const0 = vdupq_n_s16( - (short) ( 0.34414f*4096.0f+0.5f)); - int16x8_t cb_const1 = vdupq_n_s16( (short) ( 1.77200f*4096.0f+0.5f)); - - for (; i+7 < count; i += 8) { - // load - uint8x8_t y_bytes = vld1_u8(y + i); - uint8x8_t cr_bytes = vld1_u8(pcr + i); - uint8x8_t cb_bytes = vld1_u8(pcb + i); - int8x8_t cr_biased = vreinterpret_s8_u8(vsub_u8(cr_bytes, signflip)); - int8x8_t cb_biased = vreinterpret_s8_u8(vsub_u8(cb_bytes, signflip)); - - // expand to s16 - int16x8_t yws = vreinterpretq_s16_u16(vshll_n_u8(y_bytes, 4)); - int16x8_t crw = vshll_n_s8(cr_biased, 7); - int16x8_t cbw = vshll_n_s8(cb_biased, 7); - - // color transform - int16x8_t cr0 = vqdmulhq_s16(crw, cr_const0); - int16x8_t cb0 = vqdmulhq_s16(cbw, cb_const0); - int16x8_t cr1 = vqdmulhq_s16(crw, cr_const1); - int16x8_t cb1 = vqdmulhq_s16(cbw, cb_const1); - int16x8_t rws = vaddq_s16(yws, cr0); - int16x8_t gws = vaddq_s16(vaddq_s16(yws, cb0), cr1); - int16x8_t bws = vaddq_s16(yws, cb1); - - // undo scaling, round, convert to byte - uint8x8x4_t o; - o.val[0] = vqrshrun_n_s16(rws, 4); - o.val[1] = vqrshrun_n_s16(gws, 4); - o.val[2] = vqrshrun_n_s16(bws, 4); - o.val[3] = vdup_n_u8(255); - - // store, interleaving r/g/b/a - vst4_u8(out, o); - out += 8*4; - } - } -#endif - - for (; i < count; ++i) { - int y_fixed = (y[i] << 20) + (1<<19); // rounding - int r,g,b; - int cr = pcr[i] - 128; - int cb = pcb[i] - 128; - r = y_fixed + cr* stbi__float2fixed(1.40200f); - g = y_fixed + cr*-stbi__float2fixed(0.71414f) + ((cb*-stbi__float2fixed(0.34414f)) & 0xffff0000); - b = y_fixed + cb* stbi__float2fixed(1.77200f); - r >>= 20; - g >>= 20; - b >>= 20; - if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; } - if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; } - if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; } - out[0] = (stbi_uc)r; - out[1] = (stbi_uc)g; - out[2] = (stbi_uc)b; - out[3] = 255; - out += step; - } -} -#endif - -// set up the kernels -static void stbi__setup_jpeg(stbi__jpeg *j) -{ - j->idct_block_kernel = stbi__idct_block; - j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row; - j->resample_row_hv_2_kernel = stbi__resample_row_hv_2; - -#ifdef STBI_SSE2 - if (stbi__sse2_available()) { - j->idct_block_kernel = stbi__idct_simd; - j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; - j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; - } -#endif - -#ifdef STBI_NEON - j->idct_block_kernel = stbi__idct_simd; - j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; - j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; -#endif -} - -// clean up the temporary component buffers -static void stbi__cleanup_jpeg(stbi__jpeg *j) -{ - stbi__free_jpeg_components(j, j->s->img_n, 0); -} - -typedef struct -{ - resample_row_func resample; - stbi_uc *line0,*line1; - int hs,vs; // expansion factor in each axis - int w_lores; // horizontal pixels pre-expansion - int ystep; // how far through vertical expansion we are - int ypos; // which pre-expansion row we're on -} stbi__resample; - -// fast 0..255 * 0..255 => 0..255 rounded multiplication -static stbi_uc stbi__blinn_8x8(stbi_uc x, stbi_uc y) -{ - unsigned int t = x*y + 128; - return (stbi_uc) ((t + (t >>8)) >> 8); -} - -static stbi_uc *load_jpeg_image(stbi__jpeg *z, int *out_x, int *out_y, int *comp, int req_comp) -{ - int n, decode_n, is_rgb; - z->s->img_n = 0; // make stbi__cleanup_jpeg safe - - // validate req_comp - if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); - - // load a jpeg image from whichever source, but leave in YCbCr format - if (!stbi__decode_jpeg_image(z)) { stbi__cleanup_jpeg(z); return NULL; } - - // determine actual number of components to generate - n = req_comp ? req_comp : z->s->img_n >= 3 ? 3 : 1; - - is_rgb = z->s->img_n == 3 && (z->rgb == 3 || (z->app14_color_transform == 0 && !z->jfif)); - - if (z->s->img_n == 3 && n < 3 && !is_rgb) - decode_n = 1; - else - decode_n = z->s->img_n; - - // resample and color-convert - { - int k; - unsigned int i,j; - stbi_uc *output; - stbi_uc *coutput[4] = { NULL, NULL, NULL, NULL }; - - stbi__resample res_comp[4]; - - for (k=0; k < decode_n; ++k) { - stbi__resample *r = &res_comp[k]; - - // allocate line buffer big enough for upsampling off the edges - // with upsample factor of 4 - z->img_comp[k].linebuf = (stbi_uc *) stbi__malloc(z->s->img_x + 3); - if (!z->img_comp[k].linebuf) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } - - r->hs = z->img_h_max / z->img_comp[k].h; - r->vs = z->img_v_max / z->img_comp[k].v; - r->ystep = r->vs >> 1; - r->w_lores = (z->s->img_x + r->hs-1) / r->hs; - r->ypos = 0; - r->line0 = r->line1 = z->img_comp[k].data; - - if (r->hs == 1 && r->vs == 1) r->resample = resample_row_1; - else if (r->hs == 1 && r->vs == 2) r->resample = stbi__resample_row_v_2; - else if (r->hs == 2 && r->vs == 1) r->resample = stbi__resample_row_h_2; - else if (r->hs == 2 && r->vs == 2) r->resample = z->resample_row_hv_2_kernel; - else r->resample = stbi__resample_row_generic; - } - - // can't error after this so, this is safe - output = (stbi_uc *) stbi__malloc_mad3(n, z->s->img_x, z->s->img_y, 1); - if (!output) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } - - // now go ahead and resample - for (j=0; j < z->s->img_y; ++j) { - stbi_uc *out = output + n * z->s->img_x * j; - for (k=0; k < decode_n; ++k) { - stbi__resample *r = &res_comp[k]; - int y_bot = r->ystep >= (r->vs >> 1); - coutput[k] = r->resample(z->img_comp[k].linebuf, - y_bot ? r->line1 : r->line0, - y_bot ? r->line0 : r->line1, - r->w_lores, r->hs); - if (++r->ystep >= r->vs) { - r->ystep = 0; - r->line0 = r->line1; - if (++r->ypos < z->img_comp[k].y) - r->line1 += z->img_comp[k].w2; - } - } - if (n >= 3) { - stbi_uc *y = coutput[0]; - if (z->s->img_n == 3) { - if (is_rgb) { - for (i=0; i < z->s->img_x; ++i) { - out[0] = y[i]; - out[1] = coutput[1][i]; - out[2] = coutput[2][i]; - out[3] = 255; - out += n; - } - } else { - z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); - } - } else if (z->s->img_n == 4) { - if (z->app14_color_transform == 0) { // CMYK - for (i=0; i < z->s->img_x; ++i) { - stbi_uc m = coutput[3][i]; - out[0] = stbi__blinn_8x8(coutput[0][i], m); - out[1] = stbi__blinn_8x8(coutput[1][i], m); - out[2] = stbi__blinn_8x8(coutput[2][i], m); - out[3] = 255; - out += n; - } - } else if (z->app14_color_transform == 2) { // YCCK - z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); - for (i=0; i < z->s->img_x; ++i) { - stbi_uc m = coutput[3][i]; - out[0] = stbi__blinn_8x8(255 - out[0], m); - out[1] = stbi__blinn_8x8(255 - out[1], m); - out[2] = stbi__blinn_8x8(255 - out[2], m); - out += n; - } - } else { // YCbCr + alpha? Ignore the fourth channel for now - z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); - } - } else - for (i=0; i < z->s->img_x; ++i) { - out[0] = out[1] = out[2] = y[i]; - out[3] = 255; // not used if n==3 - out += n; - } - } else { - if (is_rgb) { - if (n == 1) - for (i=0; i < z->s->img_x; ++i) - *out++ = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); - else { - for (i=0; i < z->s->img_x; ++i, out += 2) { - out[0] = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); - out[1] = 255; - } - } - } else if (z->s->img_n == 4 && z->app14_color_transform == 0) { - for (i=0; i < z->s->img_x; ++i) { - stbi_uc m = coutput[3][i]; - stbi_uc r = stbi__blinn_8x8(coutput[0][i], m); - stbi_uc g = stbi__blinn_8x8(coutput[1][i], m); - stbi_uc b = stbi__blinn_8x8(coutput[2][i], m); - out[0] = stbi__compute_y(r, g, b); - out[1] = 255; - out += n; - } - } else if (z->s->img_n == 4 && z->app14_color_transform == 2) { - for (i=0; i < z->s->img_x; ++i) { - out[0] = stbi__blinn_8x8(255 - coutput[0][i], coutput[3][i]); - out[1] = 255; - out += n; - } - } else { - stbi_uc *y = coutput[0]; - if (n == 1) - for (i=0; i < z->s->img_x; ++i) out[i] = y[i]; - else - for (i=0; i < z->s->img_x; ++i) { *out++ = y[i]; *out++ = 255; } - } - } - } - stbi__cleanup_jpeg(z); - *out_x = z->s->img_x; - *out_y = z->s->img_y; - if (comp) *comp = z->s->img_n >= 3 ? 3 : 1; // report original components, not output - return output; - } -} - -static void *stbi__jpeg_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) -{ - unsigned char* result; - stbi__jpeg* j = (stbi__jpeg*) stbi__malloc(sizeof(stbi__jpeg)); - STBI_NOTUSED(ri); - j->s = s; - stbi__setup_jpeg(j); - result = load_jpeg_image(j, x,y,comp,req_comp); - STBI_FREE(j); - return result; -} - -static int stbi__jpeg_test(stbi__context *s) -{ - int r; - stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); - j->s = s; - stbi__setup_jpeg(j); - r = stbi__decode_jpeg_header(j, STBI__SCAN_type); - stbi__rewind(s); - STBI_FREE(j); - return r; -} - -static int stbi__jpeg_info_raw(stbi__jpeg *j, int *x, int *y, int *comp) -{ - if (!stbi__decode_jpeg_header(j, STBI__SCAN_header)) { - stbi__rewind( j->s ); - return 0; - } - if (x) *x = j->s->img_x; - if (y) *y = j->s->img_y; - if (comp) *comp = j->s->img_n >= 3 ? 3 : 1; - return 1; -} - -static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp) -{ - int result; - stbi__jpeg* j = (stbi__jpeg*) (stbi__malloc(sizeof(stbi__jpeg))); - j->s = s; - result = stbi__jpeg_info_raw(j, x, y, comp); - STBI_FREE(j); - return result; -} -#endif - -// public domain zlib decode v0.2 Sean Barrett 2006-11-18 -// simple implementation -// - all input must be provided in an upfront buffer -// - all output is written to a single output buffer (can malloc/realloc) -// performance -// - fast huffman - -#ifndef STBI_NO_ZLIB - -// fast-way is faster to check than jpeg huffman, but slow way is slower -#define STBI__ZFAST_BITS 9 // accelerate all cases in default tables -#define STBI__ZFAST_MASK ((1 << STBI__ZFAST_BITS) - 1) - -// zlib-style huffman encoding -// (jpegs packs from left, zlib from right, so can't share code) -typedef struct -{ - stbi__uint16 fast[1 << STBI__ZFAST_BITS]; - stbi__uint16 firstcode[16]; - int maxcode[17]; - stbi__uint16 firstsymbol[16]; - stbi_uc size[288]; - stbi__uint16 value[288]; -} stbi__zhuffman; - -stbi_inline static int stbi__bitreverse16(int n) -{ - n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1); - n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2); - n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4); - n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); - return n; -} - -stbi_inline static int stbi__bit_reverse(int v, int bits) -{ - STBI_ASSERT(bits <= 16); - // to bit reverse n bits, reverse 16 and shift - // e.g. 11 bits, bit reverse and shift away 5 - return stbi__bitreverse16(v) >> (16-bits); -} - -static int stbi__zbuild_huffman(stbi__zhuffman *z, const stbi_uc *sizelist, int num) -{ - int i,k=0; - int code, next_code[16], sizes[17]; - - // DEFLATE spec for generating codes - memset(sizes, 0, sizeof(sizes)); - memset(z->fast, 0, sizeof(z->fast)); - for (i=0; i < num; ++i) - ++sizes[sizelist[i]]; - sizes[0] = 0; - for (i=1; i < 16; ++i) - if (sizes[i] > (1 << i)) - return stbi__err("bad sizes", "Corrupt PNG"); - code = 0; - for (i=1; i < 16; ++i) { - next_code[i] = code; - z->firstcode[i] = (stbi__uint16) code; - z->firstsymbol[i] = (stbi__uint16) k; - code = (code + sizes[i]); - if (sizes[i]) - if (code-1 >= (1 << i)) return stbi__err("bad codelengths","Corrupt PNG"); - z->maxcode[i] = code << (16-i); // preshift for inner loop - code <<= 1; - k += sizes[i]; - } - z->maxcode[16] = 0x10000; // sentinel - for (i=0; i < num; ++i) { - int s = sizelist[i]; - if (s) { - int c = next_code[s] - z->firstcode[s] + z->firstsymbol[s]; - stbi__uint16 fastv = (stbi__uint16) ((s << 9) | i); - z->size [c] = (stbi_uc ) s; - z->value[c] = (stbi__uint16) i; - if (s <= STBI__ZFAST_BITS) { - int j = stbi__bit_reverse(next_code[s],s); - while (j < (1 << STBI__ZFAST_BITS)) { - z->fast[j] = fastv; - j += (1 << s); - } - } - ++next_code[s]; - } - } - return 1; -} - -// zlib-from-memory implementation for PNG reading -// because PNG allows splitting the zlib stream arbitrarily, -// and it's annoying structurally to have PNG call ZLIB call PNG, -// we require PNG read all the IDATs and combine them into a single -// memory buffer - -typedef struct -{ - stbi_uc *zbuffer, *zbuffer_end; - int num_bits; - stbi__uint32 code_buffer; - - char *zout; - char *zout_start; - char *zout_end; - int z_expandable; - - stbi__zhuffman z_length, z_distance; -} stbi__zbuf; - -stbi_inline static stbi_uc stbi__zget8(stbi__zbuf *z) -{ - if (z->zbuffer >= z->zbuffer_end) return 0; - return *z->zbuffer++; -} - -static void stbi__fill_bits(stbi__zbuf *z) -{ - do { - STBI_ASSERT(z->code_buffer < (1U << z->num_bits)); - z->code_buffer |= (unsigned int) stbi__zget8(z) << z->num_bits; - z->num_bits += 8; - } while (z->num_bits <= 24); -} - -stbi_inline static unsigned int stbi__zreceive(stbi__zbuf *z, int n) -{ - unsigned int k; - if (z->num_bits < n) stbi__fill_bits(z); - k = z->code_buffer & ((1 << n) - 1); - z->code_buffer >>= n; - z->num_bits -= n; - return k; -} - -static int stbi__zhuffman_decode_slowpath(stbi__zbuf *a, stbi__zhuffman *z) -{ - int b,s,k; - // not resolved by fast table, so compute it the slow way - // use jpeg approach, which requires MSbits at top - k = stbi__bit_reverse(a->code_buffer, 16); - for (s=STBI__ZFAST_BITS+1; ; ++s) - if (k < z->maxcode[s]) - break; - if (s == 16) return -1; // invalid code! - // code size is s, so: - b = (k >> (16-s)) - z->firstcode[s] + z->firstsymbol[s]; - STBI_ASSERT(z->size[b] == s); - a->code_buffer >>= s; - a->num_bits -= s; - return z->value[b]; -} - -stbi_inline static int stbi__zhuffman_decode(stbi__zbuf *a, stbi__zhuffman *z) -{ - int b,s; - if (a->num_bits < 16) stbi__fill_bits(a); - b = z->fast[a->code_buffer & STBI__ZFAST_MASK]; - if (b) { - s = b >> 9; - a->code_buffer >>= s; - a->num_bits -= s; - return b & 511; - } - return stbi__zhuffman_decode_slowpath(a, z); -} - -static int stbi__zexpand(stbi__zbuf *z, char *zout, int n) // need to make room for n bytes -{ - char *q; - int cur, limit, old_limit; - z->zout = zout; - if (!z->z_expandable) return stbi__err("output buffer limit","Corrupt PNG"); - cur = (int) (z->zout - z->zout_start); - limit = old_limit = (int) (z->zout_end - z->zout_start); - while (cur + n > limit) - limit *= 2; - q = (char *) STBI_REALLOC_SIZED(z->zout_start, old_limit, limit); - STBI_NOTUSED(old_limit); - if (q == NULL) return stbi__err("outofmem", "Out of memory"); - z->zout_start = q; - z->zout = q + cur; - z->zout_end = q + limit; - return 1; -} - -static const int stbi__zlength_base[31] = { - 3,4,5,6,7,8,9,10,11,13, - 15,17,19,23,27,31,35,43,51,59, - 67,83,99,115,131,163,195,227,258,0,0 }; - -static const int stbi__zlength_extra[31]= -{ 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; - -static const int stbi__zdist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, -257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; - -static const int stbi__zdist_extra[32] = -{ 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; - -static int stbi__parse_huffman_block(stbi__zbuf *a) -{ - char *zout = a->zout; - for(;;) { - int z = stbi__zhuffman_decode(a, &a->z_length); - if (z < 256) { - if (z < 0) return stbi__err("bad huffman code","Corrupt PNG"); // error in huffman codes - if (zout >= a->zout_end) { - if (!stbi__zexpand(a, zout, 1)) return 0; - zout = a->zout; - } - *zout++ = (char) z; - } else { - stbi_uc *p; - int len,dist; - if (z == 256) { - a->zout = zout; - return 1; - } - z -= 257; - len = stbi__zlength_base[z]; - if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]); - z = stbi__zhuffman_decode(a, &a->z_distance); - if (z < 0) return stbi__err("bad huffman code","Corrupt PNG"); - dist = stbi__zdist_base[z]; - if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]); - if (zout - a->zout_start < dist) return stbi__err("bad dist","Corrupt PNG"); - if (zout + len > a->zout_end) { - if (!stbi__zexpand(a, zout, len)) return 0; - zout = a->zout; - } - p = (stbi_uc *) (zout - dist); - if (dist == 1) { // run of one byte; common in images. - stbi_uc v = *p; - if (len) { do *zout++ = v; while (--len); } - } else { - if (len) { do *zout++ = *p++; while (--len); } - } - } - } -} - -static int stbi__compute_huffman_codes(stbi__zbuf *a) -{ - static const stbi_uc length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; - stbi__zhuffman z_codelength; - stbi_uc lencodes[286+32+137];//padding for maximum single op - stbi_uc codelength_sizes[19]; - int i,n; - - int hlit = stbi__zreceive(a,5) + 257; - int hdist = stbi__zreceive(a,5) + 1; - int hclen = stbi__zreceive(a,4) + 4; - int ntot = hlit + hdist; - - memset(codelength_sizes, 0, sizeof(codelength_sizes)); - for (i=0; i < hclen; ++i) { - int s = stbi__zreceive(a,3); - codelength_sizes[length_dezigzag[i]] = (stbi_uc) s; - } - if (!stbi__zbuild_huffman(&z_codelength, codelength_sizes, 19)) return 0; - - n = 0; - while (n < ntot) { - int c = stbi__zhuffman_decode(a, &z_codelength); - if (c < 0 || c >= 19) return stbi__err("bad codelengths", "Corrupt PNG"); - if (c < 16) - lencodes[n++] = (stbi_uc) c; - else { - stbi_uc fill = 0; - if (c == 16) { - c = stbi__zreceive(a,2)+3; - if (n == 0) return stbi__err("bad codelengths", "Corrupt PNG"); - fill = lencodes[n-1]; - } else if (c == 17) - c = stbi__zreceive(a,3)+3; - else { - STBI_ASSERT(c == 18); - c = stbi__zreceive(a,7)+11; - } - if (ntot - n < c) return stbi__err("bad codelengths", "Corrupt PNG"); - memset(lencodes+n, fill, c); - n += c; - } - } - if (n != ntot) return stbi__err("bad codelengths","Corrupt PNG"); - if (!stbi__zbuild_huffman(&a->z_length, lencodes, hlit)) return 0; - if (!stbi__zbuild_huffman(&a->z_distance, lencodes+hlit, hdist)) return 0; - return 1; -} - -static int stbi__parse_uncompressed_block(stbi__zbuf *a) -{ - stbi_uc header[4]; - int len,nlen,k; - if (a->num_bits & 7) - stbi__zreceive(a, a->num_bits & 7); // discard - // drain the bit-packed data into header - k = 0; - while (a->num_bits > 0) { - header[k++] = (stbi_uc) (a->code_buffer & 255); // suppress MSVC run-time check - a->code_buffer >>= 8; - a->num_bits -= 8; - } - STBI_ASSERT(a->num_bits == 0); - // now fill header the normal way - while (k < 4) - header[k++] = stbi__zget8(a); - len = header[1] * 256 + header[0]; - nlen = header[3] * 256 + header[2]; - if (nlen != (len ^ 0xffff)) return stbi__err("zlib corrupt","Corrupt PNG"); - if (a->zbuffer + len > a->zbuffer_end) return stbi__err("read past buffer","Corrupt PNG"); - if (a->zout + len > a->zout_end) - if (!stbi__zexpand(a, a->zout, len)) return 0; - memcpy(a->zout, a->zbuffer, len); - a->zbuffer += len; - a->zout += len; - return 1; -} - -static int stbi__parse_zlib_header(stbi__zbuf *a) -{ - int cmf = stbi__zget8(a); - int cm = cmf & 15; - /* int cinfo = cmf >> 4; */ - int flg = stbi__zget8(a); - if ((cmf*256+flg) % 31 != 0) return stbi__err("bad zlib header","Corrupt PNG"); // zlib spec - if (flg & 32) return stbi__err("no preset dict","Corrupt PNG"); // preset dictionary not allowed in png - if (cm != 8) return stbi__err("bad compression","Corrupt PNG"); // DEFLATE required for png - // window = 1 << (8 + cinfo)... but who cares, we fully buffer output - return 1; -} - -static const stbi_uc stbi__zdefault_length[288] = -{ - 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, - 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, - 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, - 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, - 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, - 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, - 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, - 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8 -}; -static const stbi_uc stbi__zdefault_distance[32] = -{ - 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5 -}; -/* -Init algorithm: -{ - int i; // use <= to match clearly with spec - for (i=0; i <= 143; ++i) stbi__zdefault_length[i] = 8; - for ( ; i <= 255; ++i) stbi__zdefault_length[i] = 9; - for ( ; i <= 279; ++i) stbi__zdefault_length[i] = 7; - for ( ; i <= 287; ++i) stbi__zdefault_length[i] = 8; - - for (i=0; i <= 31; ++i) stbi__zdefault_distance[i] = 5; -} -*/ - -static int stbi__parse_zlib(stbi__zbuf *a, int parse_header) -{ - int final, type; - if (parse_header) - if (!stbi__parse_zlib_header(a)) return 0; - a->num_bits = 0; - a->code_buffer = 0; - do { - final = stbi__zreceive(a,1); - type = stbi__zreceive(a,2); - if (type == 0) { - if (!stbi__parse_uncompressed_block(a)) return 0; - } else if (type == 3) { - return 0; - } else { - if (type == 1) { - // use fixed code lengths - if (!stbi__zbuild_huffman(&a->z_length , stbi__zdefault_length , 288)) return 0; - if (!stbi__zbuild_huffman(&a->z_distance, stbi__zdefault_distance, 32)) return 0; - } else { - if (!stbi__compute_huffman_codes(a)) return 0; - } - if (!stbi__parse_huffman_block(a)) return 0; - } - } while (!final); - return 1; -} - -static int stbi__do_zlib(stbi__zbuf *a, char *obuf, int olen, int exp, int parse_header) -{ - a->zout_start = obuf; - a->zout = obuf; - a->zout_end = obuf + olen; - a->z_expandable = exp; - - return stbi__parse_zlib(a, parse_header); -} - -STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen) -{ - stbi__zbuf a; - char *p = (char *) stbi__malloc(initial_size); - if (p == NULL) return NULL; - a.zbuffer = (stbi_uc *) buffer; - a.zbuffer_end = (stbi_uc *) buffer + len; - if (stbi__do_zlib(&a, p, initial_size, 1, 1)) { - if (outlen) *outlen = (int) (a.zout - a.zout_start); - return a.zout_start; - } else { - STBI_FREE(a.zout_start); - return NULL; - } -} - -STBIDEF char *stbi_zlib_decode_malloc(char const *buffer, int len, int *outlen) -{ - return stbi_zlib_decode_malloc_guesssize(buffer, len, 16384, outlen); -} - -STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header) -{ - stbi__zbuf a; - char *p = (char *) stbi__malloc(initial_size); - if (p == NULL) return NULL; - a.zbuffer = (stbi_uc *) buffer; - a.zbuffer_end = (stbi_uc *) buffer + len; - if (stbi__do_zlib(&a, p, initial_size, 1, parse_header)) { - if (outlen) *outlen = (int) (a.zout - a.zout_start); - return a.zout_start; - } else { - STBI_FREE(a.zout_start); - return NULL; - } -} - -STBIDEF int stbi_zlib_decode_buffer(char *obuffer, int olen, char const *ibuffer, int ilen) -{ - stbi__zbuf a; - a.zbuffer = (stbi_uc *) ibuffer; - a.zbuffer_end = (stbi_uc *) ibuffer + ilen; - if (stbi__do_zlib(&a, obuffer, olen, 0, 1)) - return (int) (a.zout - a.zout_start); - else - return -1; -} - -STBIDEF char *stbi_zlib_decode_noheader_malloc(char const *buffer, int len, int *outlen) -{ - stbi__zbuf a; - char *p = (char *) stbi__malloc(16384); - if (p == NULL) return NULL; - a.zbuffer = (stbi_uc *) buffer; - a.zbuffer_end = (stbi_uc *) buffer+len; - if (stbi__do_zlib(&a, p, 16384, 1, 0)) { - if (outlen) *outlen = (int) (a.zout - a.zout_start); - return a.zout_start; - } else { - STBI_FREE(a.zout_start); - return NULL; - } -} - -STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen) -{ - stbi__zbuf a; - a.zbuffer = (stbi_uc *) ibuffer; - a.zbuffer_end = (stbi_uc *) ibuffer + ilen; - if (stbi__do_zlib(&a, obuffer, olen, 0, 0)) - return (int) (a.zout - a.zout_start); - else - return -1; -} -#endif - -// public domain "baseline" PNG decoder v0.10 Sean Barrett 2006-11-18 -// simple implementation -// - only 8-bit samples -// - no CRC checking -// - allocates lots of intermediate memory -// - avoids problem of streaming data between subsystems -// - avoids explicit window management -// performance -// - uses stb_zlib, a PD zlib implementation with fast huffman decoding - -#ifndef STBI_NO_PNG -typedef struct -{ - stbi__uint32 length; - stbi__uint32 type; -} stbi__pngchunk; - -static stbi__pngchunk stbi__get_chunk_header(stbi__context *s) -{ - stbi__pngchunk c; - c.length = stbi__get32be(s); - c.type = stbi__get32be(s); - return c; -} - -static int stbi__check_png_header(stbi__context *s) -{ - static const stbi_uc png_sig[8] = { 137,80,78,71,13,10,26,10 }; - int i; - for (i=0; i < 8; ++i) - if (stbi__get8(s) != png_sig[i]) return stbi__err("bad png sig","Not a PNG"); - return 1; -} - -typedef struct -{ - stbi__context *s; - stbi_uc *idata, *expanded, *out; - int depth; -} stbi__png; - - -enum { - STBI__F_none=0, - STBI__F_sub=1, - STBI__F_up=2, - STBI__F_avg=3, - STBI__F_paeth=4, - // synthetic filters used for first scanline to avoid needing a dummy row of 0s - STBI__F_avg_first, - STBI__F_paeth_first -}; - -static stbi_uc first_row_filter[5] = -{ - STBI__F_none, - STBI__F_sub, - STBI__F_none, - STBI__F_avg_first, - STBI__F_paeth_first -}; - -static int stbi__paeth(int a, int b, int c) -{ - int p = a + b - c; - int pa = abs(p-a); - int pb = abs(p-b); - int pc = abs(p-c); - if (pa <= pb && pa <= pc) return a; - if (pb <= pc) return b; - return c; -} - -static const stbi_uc stbi__depth_scale_table[9] = { 0, 0xff, 0x55, 0, 0x11, 0,0,0, 0x01 }; - -// create the png data from post-deflated data -static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__uint32 raw_len, int out_n, stbi__uint32 x, stbi__uint32 y, int depth, int color) -{ - int bytes = (depth == 16? 2 : 1); - stbi__context *s = a->s; - stbi__uint32 i,j,stride = x*out_n*bytes; - stbi__uint32 img_len, img_width_bytes; - int k; - int img_n = s->img_n; // copy it into a local for later - - int output_bytes = out_n*bytes; - int filter_bytes = img_n*bytes; - int width = x; - - STBI_ASSERT(out_n == s->img_n || out_n == s->img_n+1); - a->out = (stbi_uc *) stbi__malloc_mad3(x, y, output_bytes, 0); // extra bytes to write off the end into - if (!a->out) return stbi__err("outofmem", "Out of memory"); - - if (!stbi__mad3sizes_valid(img_n, x, depth, 7)) return stbi__err("too large", "Corrupt PNG"); - img_width_bytes = (((img_n * x * depth) + 7) >> 3); - img_len = (img_width_bytes + 1) * y; - - // we used to check for exact match between raw_len and img_len on non-interlaced PNGs, - // but issue #276 reported a PNG in the wild that had extra data at the end (all zeros), - // so just check for raw_len < img_len always. - if (raw_len < img_len) return stbi__err("not enough pixels","Corrupt PNG"); - - for (j=0; j < y; ++j) { - stbi_uc *cur = a->out + stride*j; - stbi_uc *prior; - int filter = *raw++; - - if (filter > 4) - return stbi__err("invalid filter","Corrupt PNG"); - - if (depth < 8) { - STBI_ASSERT(img_width_bytes <= x); - cur += x*out_n - img_width_bytes; // store output to the rightmost img_len bytes, so we can decode in place - filter_bytes = 1; - width = img_width_bytes; - } - prior = cur - stride; // bugfix: need to compute this after 'cur +=' computation above - - // if first row, use special filter that doesn't sample previous row - if (j == 0) filter = first_row_filter[filter]; - - // handle first byte explicitly - for (k=0; k < filter_bytes; ++k) { - switch (filter) { - case STBI__F_none : cur[k] = raw[k]; break; - case STBI__F_sub : cur[k] = raw[k]; break; - case STBI__F_up : cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break; - case STBI__F_avg : cur[k] = STBI__BYTECAST(raw[k] + (prior[k]>>1)); break; - case STBI__F_paeth : cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(0,prior[k],0)); break; - case STBI__F_avg_first : cur[k] = raw[k]; break; - case STBI__F_paeth_first: cur[k] = raw[k]; break; - } - } - - if (depth == 8) { - if (img_n != out_n) - cur[img_n] = 255; // first pixel - raw += img_n; - cur += out_n; - prior += out_n; - } else if (depth == 16) { - if (img_n != out_n) { - cur[filter_bytes] = 255; // first pixel top byte - cur[filter_bytes+1] = 255; // first pixel bottom byte - } - raw += filter_bytes; - cur += output_bytes; - prior += output_bytes; - } else { - raw += 1; - cur += 1; - prior += 1; - } - - // this is a little gross, so that we don't switch per-pixel or per-component - if (depth < 8 || img_n == out_n) { - int nk = (width - 1)*filter_bytes; - #define STBI__CASE(f) \ - case f: \ - for (k=0; k < nk; ++k) - switch (filter) { - // "none" filter turns into a memcpy here; make that explicit. - case STBI__F_none: memcpy(cur, raw, nk); break; - STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k-filter_bytes]); } break; - STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; - STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k-filter_bytes])>>1)); } break; - STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],prior[k],prior[k-filter_bytes])); } break; - STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k-filter_bytes] >> 1)); } break; - STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],0,0)); } break; - } - #undef STBI__CASE - raw += nk; - } else { - STBI_ASSERT(img_n+1 == out_n); - #define STBI__CASE(f) \ - case f: \ - for (i=x-1; i >= 1; --i, cur[filter_bytes]=255,raw+=filter_bytes,cur+=output_bytes,prior+=output_bytes) \ - for (k=0; k < filter_bytes; ++k) - switch (filter) { - STBI__CASE(STBI__F_none) { cur[k] = raw[k]; } break; - STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k- output_bytes]); } break; - STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; - STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k- output_bytes])>>1)); } break; - STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],prior[k],prior[k- output_bytes])); } break; - STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k- output_bytes] >> 1)); } break; - STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],0,0)); } break; - } - #undef STBI__CASE - - // the loop above sets the high byte of the pixels' alpha, but for - // 16 bit png files we also need the low byte set. we'll do that here. - if (depth == 16) { - cur = a->out + stride*j; // start at the beginning of the row again - for (i=0; i < x; ++i,cur+=output_bytes) { - cur[filter_bytes+1] = 255; - } - } - } - } - - // we make a separate pass to expand bits to pixels; for performance, - // this could run two scanlines behind the above code, so it won't - // intefere with filtering but will still be in the cache. - if (depth < 8) { - for (j=0; j < y; ++j) { - stbi_uc *cur = a->out + stride*j; - stbi_uc *in = a->out + stride*j + x*out_n - img_width_bytes; - // unpack 1/2/4-bit into a 8-bit buffer. allows us to keep the common 8-bit path optimal at minimal cost for 1/2/4-bit - // png guarante byte alignment, if width is not multiple of 8/4/2 we'll decode dummy trailing data that will be skipped in the later loop - stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range - - // note that the final byte might overshoot and write more data than desired. - // we can allocate enough data that this never writes out of memory, but it - // could also overwrite the next scanline. can it overwrite non-empty data - // on the next scanline? yes, consider 1-pixel-wide scanlines with 1-bit-per-pixel. - // so we need to explicitly clamp the final ones - - if (depth == 4) { - for (k=x*img_n; k >= 2; k-=2, ++in) { - *cur++ = scale * ((*in >> 4) ); - *cur++ = scale * ((*in ) & 0x0f); - } - if (k > 0) *cur++ = scale * ((*in >> 4) ); - } else if (depth == 2) { - for (k=x*img_n; k >= 4; k-=4, ++in) { - *cur++ = scale * ((*in >> 6) ); - *cur++ = scale * ((*in >> 4) & 0x03); - *cur++ = scale * ((*in >> 2) & 0x03); - *cur++ = scale * ((*in ) & 0x03); - } - if (k > 0) *cur++ = scale * ((*in >> 6) ); - if (k > 1) *cur++ = scale * ((*in >> 4) & 0x03); - if (k > 2) *cur++ = scale * ((*in >> 2) & 0x03); - } else if (depth == 1) { - for (k=x*img_n; k >= 8; k-=8, ++in) { - *cur++ = scale * ((*in >> 7) ); - *cur++ = scale * ((*in >> 6) & 0x01); - *cur++ = scale * ((*in >> 5) & 0x01); - *cur++ = scale * ((*in >> 4) & 0x01); - *cur++ = scale * ((*in >> 3) & 0x01); - *cur++ = scale * ((*in >> 2) & 0x01); - *cur++ = scale * ((*in >> 1) & 0x01); - *cur++ = scale * ((*in ) & 0x01); - } - if (k > 0) *cur++ = scale * ((*in >> 7) ); - if (k > 1) *cur++ = scale * ((*in >> 6) & 0x01); - if (k > 2) *cur++ = scale * ((*in >> 5) & 0x01); - if (k > 3) *cur++ = scale * ((*in >> 4) & 0x01); - if (k > 4) *cur++ = scale * ((*in >> 3) & 0x01); - if (k > 5) *cur++ = scale * ((*in >> 2) & 0x01); - if (k > 6) *cur++ = scale * ((*in >> 1) & 0x01); - } - if (img_n != out_n) { - int q; - // insert alpha = 255 - cur = a->out + stride*j; - if (img_n == 1) { - for (q=x-1; q >= 0; --q) { - cur[q*2+1] = 255; - cur[q*2+0] = cur[q]; - } - } else { - STBI_ASSERT(img_n == 3); - for (q=x-1; q >= 0; --q) { - cur[q*4+3] = 255; - cur[q*4+2] = cur[q*3+2]; - cur[q*4+1] = cur[q*3+1]; - cur[q*4+0] = cur[q*3+0]; - } - } - } - } - } else if (depth == 16) { - // force the image data from big-endian to platform-native. - // this is done in a separate pass due to the decoding relying - // on the data being untouched, but could probably be done - // per-line during decode if care is taken. - stbi_uc *cur = a->out; - stbi__uint16 *cur16 = (stbi__uint16*)cur; - - for(i=0; i < x*y*out_n; ++i,cur16++,cur+=2) { - *cur16 = (cur[0] << 8) | cur[1]; - } - } - - return 1; -} - -static int stbi__create_png_image(stbi__png *a, stbi_uc *image_data, stbi__uint32 image_data_len, int out_n, int depth, int color, int interlaced) -{ - int bytes = (depth == 16 ? 2 : 1); - int out_bytes = out_n * bytes; - stbi_uc *final; - int p; - if (!interlaced) - return stbi__create_png_image_raw(a, image_data, image_data_len, out_n, a->s->img_x, a->s->img_y, depth, color); - - // de-interlacing - final = (stbi_uc *) stbi__malloc_mad3(a->s->img_x, a->s->img_y, out_bytes, 0); - for (p=0; p < 7; ++p) { - int xorig[] = { 0,4,0,2,0,1,0 }; - int yorig[] = { 0,0,4,0,2,0,1 }; - int xspc[] = { 8,8,4,4,2,2,1 }; - int yspc[] = { 8,8,8,4,4,2,2 }; - int i,j,x,y; - // pass1_x[4] = 0, pass1_x[5] = 1, pass1_x[12] = 1 - x = (a->s->img_x - xorig[p] + xspc[p]-1) / xspc[p]; - y = (a->s->img_y - yorig[p] + yspc[p]-1) / yspc[p]; - if (x && y) { - stbi__uint32 img_len = ((((a->s->img_n * x * depth) + 7) >> 3) + 1) * y; - if (!stbi__create_png_image_raw(a, image_data, image_data_len, out_n, x, y, depth, color)) { - STBI_FREE(final); - return 0; - } - for (j=0; j < y; ++j) { - for (i=0; i < x; ++i) { - int out_y = j*yspc[p]+yorig[p]; - int out_x = i*xspc[p]+xorig[p]; - memcpy(final + out_y*a->s->img_x*out_bytes + out_x*out_bytes, - a->out + (j*x+i)*out_bytes, out_bytes); - } - } - STBI_FREE(a->out); - image_data += img_len; - image_data_len -= img_len; - } - } - a->out = final; - - return 1; -} - -static int stbi__compute_transparency(stbi__png *z, stbi_uc tc[3], int out_n) -{ - stbi__context *s = z->s; - stbi__uint32 i, pixel_count = s->img_x * s->img_y; - stbi_uc *p = z->out; - - // compute color-based transparency, assuming we've - // already got 255 as the alpha value in the output - STBI_ASSERT(out_n == 2 || out_n == 4); - - if (out_n == 2) { - for (i=0; i < pixel_count; ++i) { - p[1] = (p[0] == tc[0] ? 0 : 255); - p += 2; - } - } else { - for (i=0; i < pixel_count; ++i) { - if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) - p[3] = 0; - p += 4; - } - } - return 1; -} - -static int stbi__compute_transparency16(stbi__png *z, stbi__uint16 tc[3], int out_n) -{ - stbi__context *s = z->s; - stbi__uint32 i, pixel_count = s->img_x * s->img_y; - stbi__uint16 *p = (stbi__uint16*) z->out; - - // compute color-based transparency, assuming we've - // already got 65535 as the alpha value in the output - STBI_ASSERT(out_n == 2 || out_n == 4); - - if (out_n == 2) { - for (i = 0; i < pixel_count; ++i) { - p[1] = (p[0] == tc[0] ? 0 : 65535); - p += 2; - } - } else { - for (i = 0; i < pixel_count; ++i) { - if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) - p[3] = 0; - p += 4; - } - } - return 1; -} - -static int stbi__expand_png_palette(stbi__png *a, stbi_uc *palette, int len, int pal_img_n) -{ - stbi__uint32 i, pixel_count = a->s->img_x * a->s->img_y; - stbi_uc *p, *temp_out, *orig = a->out; - - p = (stbi_uc *) stbi__malloc_mad2(pixel_count, pal_img_n, 0); - if (p == NULL) return stbi__err("outofmem", "Out of memory"); - - // between here and free(out) below, exitting would leak - temp_out = p; - - if (pal_img_n == 3) { - for (i=0; i < pixel_count; ++i) { - int n = orig[i]*4; - p[0] = palette[n ]; - p[1] = palette[n+1]; - p[2] = palette[n+2]; - p += 3; - } - } else { - for (i=0; i < pixel_count; ++i) { - int n = orig[i]*4; - p[0] = palette[n ]; - p[1] = palette[n+1]; - p[2] = palette[n+2]; - p[3] = palette[n+3]; - p += 4; - } - } - STBI_FREE(a->out); - a->out = temp_out; - - STBI_NOTUSED(len); - - return 1; -} - -static int stbi__unpremultiply_on_load = 0; -static int stbi__de_iphone_flag = 0; - -STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply) -{ - stbi__unpremultiply_on_load = flag_true_if_should_unpremultiply; -} - -STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert) -{ - stbi__de_iphone_flag = flag_true_if_should_convert; -} - -static void stbi__de_iphone(stbi__png *z) -{ - stbi__context *s = z->s; - stbi__uint32 i, pixel_count = s->img_x * s->img_y; - stbi_uc *p = z->out; - - if (s->img_out_n == 3) { // convert bgr to rgb - for (i=0; i < pixel_count; ++i) { - stbi_uc t = p[0]; - p[0] = p[2]; - p[2] = t; - p += 3; - } - } else { - STBI_ASSERT(s->img_out_n == 4); - if (stbi__unpremultiply_on_load) { - // convert bgr to rgb and unpremultiply - for (i=0; i < pixel_count; ++i) { - stbi_uc a = p[3]; - stbi_uc t = p[0]; - if (a) { - stbi_uc half = a / 2; - p[0] = (p[2] * 255 + half) / a; - p[1] = (p[1] * 255 + half) / a; - p[2] = ( t * 255 + half) / a; - } else { - p[0] = p[2]; - p[2] = t; - } - p += 4; - } - } else { - // convert bgr to rgb - for (i=0; i < pixel_count; ++i) { - stbi_uc t = p[0]; - p[0] = p[2]; - p[2] = t; - p += 4; - } - } - } -} - -#define STBI__PNG_TYPE(a,b,c,d) (((unsigned) (a) << 24) + ((unsigned) (b) << 16) + ((unsigned) (c) << 8) + (unsigned) (d)) - -static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp) -{ - stbi_uc palette[1024], pal_img_n=0; - stbi_uc has_trans=0, tc[3]={0}; - stbi__uint16 tc16[3]; - stbi__uint32 ioff=0, idata_limit=0, i, pal_len=0; - int first=1,k,interlace=0, color=0, is_iphone=0; - stbi__context *s = z->s; - - z->expanded = NULL; - z->idata = NULL; - z->out = NULL; - - if (!stbi__check_png_header(s)) return 0; - - if (scan == STBI__SCAN_type) return 1; - - for (;;) { - stbi__pngchunk c = stbi__get_chunk_header(s); - switch (c.type) { - case STBI__PNG_TYPE('C','g','B','I'): - is_iphone = 1; - stbi__skip(s, c.length); - break; - case STBI__PNG_TYPE('I','H','D','R'): { - int comp,filter; - if (!first) return stbi__err("multiple IHDR","Corrupt PNG"); - first = 0; - if (c.length != 13) return stbi__err("bad IHDR len","Corrupt PNG"); - s->img_x = stbi__get32be(s); if (s->img_x > (1 << 24)) return stbi__err("too large","Very large image (corrupt?)"); - s->img_y = stbi__get32be(s); if (s->img_y > (1 << 24)) return stbi__err("too large","Very large image (corrupt?)"); - z->depth = stbi__get8(s); if (z->depth != 1 && z->depth != 2 && z->depth != 4 && z->depth != 8 && z->depth != 16) return stbi__err("1/2/4/8/16-bit only","PNG not supported: 1/2/4/8/16-bit only"); - color = stbi__get8(s); if (color > 6) return stbi__err("bad ctype","Corrupt PNG"); - if (color == 3 && z->depth == 16) return stbi__err("bad ctype","Corrupt PNG"); - if (color == 3) pal_img_n = 3; else if (color & 1) return stbi__err("bad ctype","Corrupt PNG"); - comp = stbi__get8(s); if (comp) return stbi__err("bad comp method","Corrupt PNG"); - filter= stbi__get8(s); if (filter) return stbi__err("bad filter method","Corrupt PNG"); - interlace = stbi__get8(s); if (interlace>1) return stbi__err("bad interlace method","Corrupt PNG"); - if (!s->img_x || !s->img_y) return stbi__err("0-pixel image","Corrupt PNG"); - if (!pal_img_n) { - s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0); - if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode"); - if (scan == STBI__SCAN_header) return 1; - } else { - // if paletted, then pal_n is our final components, and - // img_n is # components to decompress/filter. - s->img_n = 1; - if ((1 << 30) / s->img_x / 4 < s->img_y) return stbi__err("too large","Corrupt PNG"); - // if SCAN_header, have to scan to see if we have a tRNS - } - break; - } - - case STBI__PNG_TYPE('P','L','T','E'): { - if (first) return stbi__err("first not IHDR", "Corrupt PNG"); - if (c.length > 256*3) return stbi__err("invalid PLTE","Corrupt PNG"); - pal_len = c.length / 3; - if (pal_len * 3 != c.length) return stbi__err("invalid PLTE","Corrupt PNG"); - for (i=0; i < pal_len; ++i) { - palette[i*4+0] = stbi__get8(s); - palette[i*4+1] = stbi__get8(s); - palette[i*4+2] = stbi__get8(s); - palette[i*4+3] = 255; - } - break; - } - - case STBI__PNG_TYPE('t','R','N','S'): { - if (first) return stbi__err("first not IHDR", "Corrupt PNG"); - if (z->idata) return stbi__err("tRNS after IDAT","Corrupt PNG"); - if (pal_img_n) { - if (scan == STBI__SCAN_header) { s->img_n = 4; return 1; } - if (pal_len == 0) return stbi__err("tRNS before PLTE","Corrupt PNG"); - if (c.length > pal_len) return stbi__err("bad tRNS len","Corrupt PNG"); - pal_img_n = 4; - for (i=0; i < c.length; ++i) - palette[i*4+3] = stbi__get8(s); - } else { - if (!(s->img_n & 1)) return stbi__err("tRNS with alpha","Corrupt PNG"); - if (c.length != (stbi__uint32) s->img_n*2) return stbi__err("bad tRNS len","Corrupt PNG"); - has_trans = 1; - if (z->depth == 16) { - for (k = 0; k < s->img_n; ++k) tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is - } else { - for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger - } - } - break; - } - - case STBI__PNG_TYPE('I','D','A','T'): { - if (first) return stbi__err("first not IHDR", "Corrupt PNG"); - if (pal_img_n && !pal_len) return stbi__err("no PLTE","Corrupt PNG"); - if (scan == STBI__SCAN_header) { s->img_n = pal_img_n; return 1; } - if ((int)(ioff + c.length) < (int)ioff) return 0; - if (ioff + c.length > idata_limit) { - stbi__uint32 idata_limit_old = idata_limit; - stbi_uc *p; - if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096; - while (ioff + c.length > idata_limit) - idata_limit *= 2; - STBI_NOTUSED(idata_limit_old); - p = (stbi_uc *) STBI_REALLOC_SIZED(z->idata, idata_limit_old, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory"); - z->idata = p; - } - if (!stbi__getn(s, z->idata+ioff,c.length)) return stbi__err("outofdata","Corrupt PNG"); - ioff += c.length; - break; - } - - case STBI__PNG_TYPE('I','E','N','D'): { - stbi__uint32 raw_len, bpl; - if (first) return stbi__err("first not IHDR", "Corrupt PNG"); - if (scan != STBI__SCAN_load) return 1; - if (z->idata == NULL) return stbi__err("no IDAT","Corrupt PNG"); - // initial guess for decoded data size to avoid unnecessary reallocs - bpl = (s->img_x * z->depth + 7) / 8; // bytes per line, per component - raw_len = bpl * s->img_y * s->img_n /* pixels */ + s->img_y /* filter mode per row */; - z->expanded = (stbi_uc *) stbi_zlib_decode_malloc_guesssize_headerflag((char *) z->idata, ioff, raw_len, (int *) &raw_len, !is_iphone); - if (z->expanded == NULL) return 0; // zlib should set error - STBI_FREE(z->idata); z->idata = NULL; - if ((req_comp == s->img_n+1 && req_comp != 3 && !pal_img_n) || has_trans) - s->img_out_n = s->img_n+1; - else - s->img_out_n = s->img_n; - if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, z->depth, color, interlace)) return 0; - if (has_trans) { - if (z->depth == 16) { - if (!stbi__compute_transparency16(z, tc16, s->img_out_n)) return 0; - } else { - if (!stbi__compute_transparency(z, tc, s->img_out_n)) return 0; - } - } - if (is_iphone && stbi__de_iphone_flag && s->img_out_n > 2) - stbi__de_iphone(z); - if (pal_img_n) { - // pal_img_n == 3 or 4 - s->img_n = pal_img_n; // record the actual colors we had - s->img_out_n = pal_img_n; - if (req_comp >= 3) s->img_out_n = req_comp; - if (!stbi__expand_png_palette(z, palette, pal_len, s->img_out_n)) - return 0; - } else if (has_trans) { - // non-paletted image with tRNS -> source image has (constant) alpha - ++s->img_n; - } - STBI_FREE(z->expanded); z->expanded = NULL; - return 1; - } - - default: - // if critical, fail - if (first) return stbi__err("first not IHDR", "Corrupt PNG"); - if ((c.type & (1 << 29)) == 0) { - #ifndef STBI_NO_FAILURE_STRINGS - // not threadsafe - static char invalid_chunk[] = "XXXX PNG chunk not known"; - invalid_chunk[0] = STBI__BYTECAST(c.type >> 24); - invalid_chunk[1] = STBI__BYTECAST(c.type >> 16); - invalid_chunk[2] = STBI__BYTECAST(c.type >> 8); - invalid_chunk[3] = STBI__BYTECAST(c.type >> 0); - #endif - return stbi__err(invalid_chunk, "PNG not supported: unknown PNG chunk type"); - } - stbi__skip(s, c.length); - break; - } - // end of PNG chunk, read and skip CRC - stbi__get32be(s); - } -} - -static void *stbi__do_png(stbi__png *p, int *x, int *y, int *n, int req_comp, stbi__result_info *ri) -{ - void *result=NULL; - if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); - if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) { - if (p->depth < 8) - ri->bits_per_channel = 8; - else - ri->bits_per_channel = p->depth; - result = p->out; - p->out = NULL; - if (req_comp && req_comp != p->s->img_out_n) { - if (ri->bits_per_channel == 8) - result = stbi__convert_format((unsigned char *) result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); - else - result = stbi__convert_format16((stbi__uint16 *) result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); - p->s->img_out_n = req_comp; - if (result == NULL) return result; - } - *x = p->s->img_x; - *y = p->s->img_y; - if (n) *n = p->s->img_n; - } - STBI_FREE(p->out); p->out = NULL; - STBI_FREE(p->expanded); p->expanded = NULL; - STBI_FREE(p->idata); p->idata = NULL; - - return result; -} - -static void *stbi__png_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) -{ - stbi__png p; - p.s = s; - return stbi__do_png(&p, x,y,comp,req_comp, ri); -} - -static int stbi__png_test(stbi__context *s) -{ - int r; - r = stbi__check_png_header(s); - stbi__rewind(s); - return r; -} - -static int stbi__png_info_raw(stbi__png *p, int *x, int *y, int *comp) -{ - if (!stbi__parse_png_file(p, STBI__SCAN_header, 0)) { - stbi__rewind( p->s ); - return 0; - } - if (x) *x = p->s->img_x; - if (y) *y = p->s->img_y; - if (comp) *comp = p->s->img_n; - return 1; -} - -static int stbi__png_info(stbi__context *s, int *x, int *y, int *comp) -{ - stbi__png p; - p.s = s; - return stbi__png_info_raw(&p, x, y, comp); -} - -static int stbi__png_is16(stbi__context *s) -{ - stbi__png p; - p.s = s; - if (!stbi__png_info_raw(&p, NULL, NULL, NULL)) - return 0; - if (p.depth != 16) { - stbi__rewind(p.s); - return 0; - } - return 1; -} -#endif - -// Microsoft/Windows BMP image - -#ifndef STBI_NO_BMP -static int stbi__bmp_test_raw(stbi__context *s) -{ - int r; - int sz; - if (stbi__get8(s) != 'B') return 0; - if (stbi__get8(s) != 'M') return 0; - stbi__get32le(s); // discard filesize - stbi__get16le(s); // discard reserved - stbi__get16le(s); // discard reserved - stbi__get32le(s); // discard data offset - sz = stbi__get32le(s); - r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124); - return r; -} - -static int stbi__bmp_test(stbi__context *s) -{ - int r = stbi__bmp_test_raw(s); - stbi__rewind(s); - return r; -} - - -// returns 0..31 for the highest set bit -static int stbi__high_bit(unsigned int z) -{ - int n=0; - if (z == 0) return -1; - if (z >= 0x10000) { n += 16; z >>= 16; } - if (z >= 0x00100) { n += 8; z >>= 8; } - if (z >= 0x00010) { n += 4; z >>= 4; } - if (z >= 0x00004) { n += 2; z >>= 2; } - if (z >= 0x00002) { n += 1; z >>= 1; } - return n; -} - -static int stbi__bitcount(unsigned int a) -{ - a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 - a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4 - a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits - a = (a + (a >> 8)); // max 16 per 8 bits - a = (a + (a >> 16)); // max 32 per 8 bits - return a & 0xff; -} - -// extract an arbitrarily-aligned N-bit value (N=bits) -// from v, and then make it 8-bits long and fractionally -// extend it to full full range. -static int stbi__shiftsigned(unsigned int v, int shift, int bits) -{ - static unsigned int mul_table[9] = { - 0, - 0xff/*0b11111111*/, 0x55/*0b01010101*/, 0x49/*0b01001001*/, 0x11/*0b00010001*/, - 0x21/*0b00100001*/, 0x41/*0b01000001*/, 0x81/*0b10000001*/, 0x01/*0b00000001*/, - }; - static unsigned int shift_table[9] = { - 0, 0,0,1,0,2,4,6,0, - }; - if (shift < 0) - v <<= -shift; - else - v >>= shift; - STBI_ASSERT(v >= 0 && v < 256); - v >>= (8-bits); - STBI_ASSERT(bits >= 0 && bits <= 8); - return (int) ((unsigned) v * mul_table[bits]) >> shift_table[bits]; -} - -typedef struct -{ - int bpp, offset, hsz; - unsigned int mr,mg,mb,ma, all_a; -} stbi__bmp_data; - -static void *stbi__bmp_parse_header(stbi__context *s, stbi__bmp_data *info) -{ - int hsz; - if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP"); - stbi__get32le(s); // discard filesize - stbi__get16le(s); // discard reserved - stbi__get16le(s); // discard reserved - info->offset = stbi__get32le(s); - info->hsz = hsz = stbi__get32le(s); - info->mr = info->mg = info->mb = info->ma = 0; - - if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown"); - if (hsz == 12) { - s->img_x = stbi__get16le(s); - s->img_y = stbi__get16le(s); - } else { - s->img_x = stbi__get32le(s); - s->img_y = stbi__get32le(s); - } - if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP"); - info->bpp = stbi__get16le(s); - if (hsz != 12) { - int compress = stbi__get32le(s); - if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE"); - stbi__get32le(s); // discard sizeof - stbi__get32le(s); // discard hres - stbi__get32le(s); // discard vres - stbi__get32le(s); // discard colorsused - stbi__get32le(s); // discard max important - if (hsz == 40 || hsz == 56) { - if (hsz == 56) { - stbi__get32le(s); - stbi__get32le(s); - stbi__get32le(s); - stbi__get32le(s); - } - if (info->bpp == 16 || info->bpp == 32) { - if (compress == 0) { - if (info->bpp == 32) { - info->mr = 0xffu << 16; - info->mg = 0xffu << 8; - info->mb = 0xffu << 0; - info->ma = 0xffu << 24; - info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0 - } else { - info->mr = 31u << 10; - info->mg = 31u << 5; - info->mb = 31u << 0; - } - } else if (compress == 3) { - info->mr = stbi__get32le(s); - info->mg = stbi__get32le(s); - info->mb = stbi__get32le(s); - // not documented, but generated by photoshop and handled by mspaint - if (info->mr == info->mg && info->mg == info->mb) { - // ?!?!? - return stbi__errpuc("bad BMP", "bad BMP"); - } - } else - return stbi__errpuc("bad BMP", "bad BMP"); - } - } else { - int i; - if (hsz != 108 && hsz != 124) - return stbi__errpuc("bad BMP", "bad BMP"); - info->mr = stbi__get32le(s); - info->mg = stbi__get32le(s); - info->mb = stbi__get32le(s); - info->ma = stbi__get32le(s); - stbi__get32le(s); // discard color space - for (i=0; i < 12; ++i) - stbi__get32le(s); // discard color space parameters - if (hsz == 124) { - stbi__get32le(s); // discard rendering intent - stbi__get32le(s); // discard offset of profile data - stbi__get32le(s); // discard size of profile data - stbi__get32le(s); // discard reserved - } - } - } - return (void *) 1; -} - - -static void *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) -{ - stbi_uc *out; - unsigned int mr=0,mg=0,mb=0,ma=0, all_a; - stbi_uc pal[256][4]; - int psize=0,i,j,width; - int flip_vertically, pad, target; - stbi__bmp_data info; - STBI_NOTUSED(ri); - - info.all_a = 255; - if (stbi__bmp_parse_header(s, &info) == NULL) - return NULL; // error code already set - - flip_vertically = ((int) s->img_y) > 0; - s->img_y = abs((int) s->img_y); - - mr = info.mr; - mg = info.mg; - mb = info.mb; - ma = info.ma; - all_a = info.all_a; - - if (info.hsz == 12) { - if (info.bpp < 24) - psize = (info.offset - 14 - 24) / 3; - } else { - if (info.bpp < 16) - psize = (info.offset - 14 - info.hsz) >> 2; - } - - s->img_n = ma ? 4 : 3; - if (req_comp && req_comp >= 3) // we can directly decode 3 or 4 - target = req_comp; - else - target = s->img_n; // if they want monochrome, we'll post-convert - - // sanity-check size - if (!stbi__mad3sizes_valid(target, s->img_x, s->img_y, 0)) - return stbi__errpuc("too large", "Corrupt BMP"); - - out = (stbi_uc *) stbi__malloc_mad3(target, s->img_x, s->img_y, 0); - if (!out) return stbi__errpuc("outofmem", "Out of memory"); - if (info.bpp < 16) { - int z=0; - if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); } - for (i=0; i < psize; ++i) { - pal[i][2] = stbi__get8(s); - pal[i][1] = stbi__get8(s); - pal[i][0] = stbi__get8(s); - if (info.hsz != 12) stbi__get8(s); - pal[i][3] = 255; - } - stbi__skip(s, info.offset - 14 - info.hsz - psize * (info.hsz == 12 ? 3 : 4)); - if (info.bpp == 1) width = (s->img_x + 7) >> 3; - else if (info.bpp == 4) width = (s->img_x + 1) >> 1; - else if (info.bpp == 8) width = s->img_x; - else { STBI_FREE(out); return stbi__errpuc("bad bpp", "Corrupt BMP"); } - pad = (-width)&3; - if (info.bpp == 1) { - for (j=0; j < (int) s->img_y; ++j) { - int bit_offset = 7, v = stbi__get8(s); - for (i=0; i < (int) s->img_x; ++i) { - int color = (v>>bit_offset)&0x1; - out[z++] = pal[color][0]; - out[z++] = pal[color][1]; - out[z++] = pal[color][2]; - if (target == 4) out[z++] = 255; - if (i+1 == (int) s->img_x) break; - if((--bit_offset) < 0) { - bit_offset = 7; - v = stbi__get8(s); - } - } - stbi__skip(s, pad); - } - } else { - for (j=0; j < (int) s->img_y; ++j) { - for (i=0; i < (int) s->img_x; i += 2) { - int v=stbi__get8(s),v2=0; - if (info.bpp == 4) { - v2 = v & 15; - v >>= 4; - } - out[z++] = pal[v][0]; - out[z++] = pal[v][1]; - out[z++] = pal[v][2]; - if (target == 4) out[z++] = 255; - if (i+1 == (int) s->img_x) break; - v = (info.bpp == 8) ? stbi__get8(s) : v2; - out[z++] = pal[v][0]; - out[z++] = pal[v][1]; - out[z++] = pal[v][2]; - if (target == 4) out[z++] = 255; - } - stbi__skip(s, pad); - } - } - } else { - int rshift=0,gshift=0,bshift=0,ashift=0,rcount=0,gcount=0,bcount=0,acount=0; - int z = 0; - int easy=0; - stbi__skip(s, info.offset - 14 - info.hsz); - if (info.bpp == 24) width = 3 * s->img_x; - else if (info.bpp == 16) width = 2*s->img_x; - else /* bpp = 32 and pad = 0 */ width=0; - pad = (-width) & 3; - if (info.bpp == 24) { - easy = 1; - } else if (info.bpp == 32) { - if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000) - easy = 2; - } - if (!easy) { - if (!mr || !mg || !mb) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } - // right shift amt to put high bit in position #7 - rshift = stbi__high_bit(mr)-7; rcount = stbi__bitcount(mr); - gshift = stbi__high_bit(mg)-7; gcount = stbi__bitcount(mg); - bshift = stbi__high_bit(mb)-7; bcount = stbi__bitcount(mb); - ashift = stbi__high_bit(ma)-7; acount = stbi__bitcount(ma); - } - for (j=0; j < (int) s->img_y; ++j) { - if (easy) { - for (i=0; i < (int) s->img_x; ++i) { - unsigned char a; - out[z+2] = stbi__get8(s); - out[z+1] = stbi__get8(s); - out[z+0] = stbi__get8(s); - z += 3; - a = (easy == 2 ? stbi__get8(s) : 255); - all_a |= a; - if (target == 4) out[z++] = a; - } - } else { - int bpp = info.bpp; - for (i=0; i < (int) s->img_x; ++i) { - stbi__uint32 v = (bpp == 16 ? (stbi__uint32) stbi__get16le(s) : stbi__get32le(s)); - unsigned int a; - out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mr, rshift, rcount)); - out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mg, gshift, gcount)); - out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount)); - a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255); - all_a |= a; - if (target == 4) out[z++] = STBI__BYTECAST(a); - } - } - stbi__skip(s, pad); - } - } - - // if alpha channel is all 0s, replace with all 255s - if (target == 4 && all_a == 0) - for (i=4*s->img_x*s->img_y-1; i >= 0; i -= 4) - out[i] = 255; - - if (flip_vertically) { - stbi_uc t; - for (j=0; j < (int) s->img_y>>1; ++j) { - stbi_uc *p1 = out + j *s->img_x*target; - stbi_uc *p2 = out + (s->img_y-1-j)*s->img_x*target; - for (i=0; i < (int) s->img_x*target; ++i) { - t = p1[i]; p1[i] = p2[i]; p2[i] = t; - } - } - } - - if (req_comp && req_comp != target) { - out = stbi__convert_format(out, target, req_comp, s->img_x, s->img_y); - if (out == NULL) return out; // stbi__convert_format frees input on failure - } - - *x = s->img_x; - *y = s->img_y; - if (comp) *comp = s->img_n; - return out; -} -#endif - -// Targa Truevision - TGA -// by Jonathan Dummer -#ifndef STBI_NO_TGA -// returns STBI_rgb or whatever, 0 on error -static int stbi__tga_get_comp(int bits_per_pixel, int is_grey, int* is_rgb16) -{ - // only RGB or RGBA (incl. 16bit) or grey allowed - if (is_rgb16) *is_rgb16 = 0; - switch(bits_per_pixel) { - case 8: return STBI_grey; - case 16: if(is_grey) return STBI_grey_alpha; - // fallthrough - case 15: if(is_rgb16) *is_rgb16 = 1; - return STBI_rgb; - case 24: // fallthrough - case 32: return bits_per_pixel/8; - default: return 0; - } -} - -static int stbi__tga_info(stbi__context *s, int *x, int *y, int *comp) -{ - int tga_w, tga_h, tga_comp, tga_image_type, tga_bits_per_pixel, tga_colormap_bpp; - int sz, tga_colormap_type; - stbi__get8(s); // discard Offset - tga_colormap_type = stbi__get8(s); // colormap type - if( tga_colormap_type > 1 ) { - stbi__rewind(s); - return 0; // only RGB or indexed allowed - } - tga_image_type = stbi__get8(s); // image type - if ( tga_colormap_type == 1 ) { // colormapped (paletted) image - if (tga_image_type != 1 && tga_image_type != 9) { - stbi__rewind(s); - return 0; - } - stbi__skip(s,4); // skip index of first colormap entry and number of entries - sz = stbi__get8(s); // check bits per palette color entry - if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) { - stbi__rewind(s); - return 0; - } - stbi__skip(s,4); // skip image x and y origin - tga_colormap_bpp = sz; - } else { // "normal" image w/o colormap - only RGB or grey allowed, +/- RLE - if ( (tga_image_type != 2) && (tga_image_type != 3) && (tga_image_type != 10) && (tga_image_type != 11) ) { - stbi__rewind(s); - return 0; // only RGB or grey allowed, +/- RLE - } - stbi__skip(s,9); // skip colormap specification and image x/y origin - tga_colormap_bpp = 0; - } - tga_w = stbi__get16le(s); - if( tga_w < 1 ) { - stbi__rewind(s); - return 0; // test width - } - tga_h = stbi__get16le(s); - if( tga_h < 1 ) { - stbi__rewind(s); - return 0; // test height - } - tga_bits_per_pixel = stbi__get8(s); // bits per pixel - stbi__get8(s); // ignore alpha bits - if (tga_colormap_bpp != 0) { - if((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16)) { - // when using a colormap, tga_bits_per_pixel is the size of the indexes - // I don't think anything but 8 or 16bit indexes makes sense - stbi__rewind(s); - return 0; - } - tga_comp = stbi__tga_get_comp(tga_colormap_bpp, 0, NULL); - } else { - tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3) || (tga_image_type == 11), NULL); - } - if(!tga_comp) { - stbi__rewind(s); - return 0; - } - if (x) *x = tga_w; - if (y) *y = tga_h; - if (comp) *comp = tga_comp; - return 1; // seems to have passed everything -} - -static int stbi__tga_test(stbi__context *s) -{ - int res = 0; - int sz, tga_color_type; - stbi__get8(s); // discard Offset - tga_color_type = stbi__get8(s); // color type - if ( tga_color_type > 1 ) goto errorEnd; // only RGB or indexed allowed - sz = stbi__get8(s); // image type - if ( tga_color_type == 1 ) { // colormapped (paletted) image - if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9 - stbi__skip(s,4); // skip index of first colormap entry and number of entries - sz = stbi__get8(s); // check bits per palette color entry - if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd; - stbi__skip(s,4); // skip image x and y origin - } else { // "normal" image w/o colormap - if ( (sz != 2) && (sz != 3) && (sz != 10) && (sz != 11) ) goto errorEnd; // only RGB or grey allowed, +/- RLE - stbi__skip(s,9); // skip colormap specification and image x/y origin - } - if ( stbi__get16le(s) < 1 ) goto errorEnd; // test width - if ( stbi__get16le(s) < 1 ) goto errorEnd; // test height - sz = stbi__get8(s); // bits per pixel - if ( (tga_color_type == 1) && (sz != 8) && (sz != 16) ) goto errorEnd; // for colormapped images, bpp is size of an index - if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd; - - res = 1; // if we got this far, everything's good and we can return 1 instead of 0 - -errorEnd: - stbi__rewind(s); - return res; -} - -// read 16bit value and convert to 24bit RGB -static void stbi__tga_read_rgb16(stbi__context *s, stbi_uc* out) -{ - stbi__uint16 px = (stbi__uint16)stbi__get16le(s); - stbi__uint16 fiveBitMask = 31; - // we have 3 channels with 5bits each - int r = (px >> 10) & fiveBitMask; - int g = (px >> 5) & fiveBitMask; - int b = px & fiveBitMask; - // Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later - out[0] = (stbi_uc)((r * 255)/31); - out[1] = (stbi_uc)((g * 255)/31); - out[2] = (stbi_uc)((b * 255)/31); - - // some people claim that the most significant bit might be used for alpha - // (possibly if an alpha-bit is set in the "image descriptor byte") - // but that only made 16bit test images completely translucent.. - // so let's treat all 15 and 16bit TGAs as RGB with no alpha. -} - -static void *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) -{ - // read in the TGA header stuff - int tga_offset = stbi__get8(s); - int tga_indexed = stbi__get8(s); - int tga_image_type = stbi__get8(s); - int tga_is_RLE = 0; - int tga_palette_start = stbi__get16le(s); - int tga_palette_len = stbi__get16le(s); - int tga_palette_bits = stbi__get8(s); - int tga_x_origin = stbi__get16le(s); - int tga_y_origin = stbi__get16le(s); - int tga_width = stbi__get16le(s); - int tga_height = stbi__get16le(s); - int tga_bits_per_pixel = stbi__get8(s); - int tga_comp, tga_rgb16=0; - int tga_inverted = stbi__get8(s); - // int tga_alpha_bits = tga_inverted & 15; // the 4 lowest bits - unused (useless?) - // image data - unsigned char *tga_data; - unsigned char *tga_palette = NULL; - int i, j; - unsigned char raw_data[4] = {0}; - int RLE_count = 0; - int RLE_repeating = 0; - int read_next_pixel = 1; - STBI_NOTUSED(ri); - - // do a tiny bit of precessing - if ( tga_image_type >= 8 ) - { - tga_image_type -= 8; - tga_is_RLE = 1; - } - tga_inverted = 1 - ((tga_inverted >> 5) & 1); - - // If I'm paletted, then I'll use the number of bits from the palette - if ( tga_indexed ) tga_comp = stbi__tga_get_comp(tga_palette_bits, 0, &tga_rgb16); - else tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3), &tga_rgb16); - - if(!tga_comp) // shouldn't really happen, stbi__tga_test() should have ensured basic consistency - return stbi__errpuc("bad format", "Can't find out TGA pixelformat"); - - // tga info - *x = tga_width; - *y = tga_height; - if (comp) *comp = tga_comp; - - if (!stbi__mad3sizes_valid(tga_width, tga_height, tga_comp, 0)) - return stbi__errpuc("too large", "Corrupt TGA"); - - tga_data = (unsigned char*)stbi__malloc_mad3(tga_width, tga_height, tga_comp, 0); - if (!tga_data) return stbi__errpuc("outofmem", "Out of memory"); - - // skip to the data's starting position (offset usually = 0) - stbi__skip(s, tga_offset ); - - if ( !tga_indexed && !tga_is_RLE && !tga_rgb16 ) { - for (i=0; i < tga_height; ++i) { - int row = tga_inverted ? tga_height -i - 1 : i; - stbi_uc *tga_row = tga_data + row*tga_width*tga_comp; - stbi__getn(s, tga_row, tga_width * tga_comp); - } - } else { - // do I need to load a palette? - if ( tga_indexed) - { - // any data to skip? (offset usually = 0) - stbi__skip(s, tga_palette_start ); - // load the palette - tga_palette = (unsigned char*)stbi__malloc_mad2(tga_palette_len, tga_comp, 0); - if (!tga_palette) { - STBI_FREE(tga_data); - return stbi__errpuc("outofmem", "Out of memory"); - } - if (tga_rgb16) { - stbi_uc *pal_entry = tga_palette; - STBI_ASSERT(tga_comp == STBI_rgb); - for (i=0; i < tga_palette_len; ++i) { - stbi__tga_read_rgb16(s, pal_entry); - pal_entry += tga_comp; - } - } else if (!stbi__getn(s, tga_palette, tga_palette_len * tga_comp)) { - STBI_FREE(tga_data); - STBI_FREE(tga_palette); - return stbi__errpuc("bad palette", "Corrupt TGA"); - } - } - // load the data - for (i=0; i < tga_width * tga_height; ++i) - { - // if I'm in RLE mode, do I need to get a RLE stbi__pngchunk? - if ( tga_is_RLE ) - { - if ( RLE_count == 0 ) - { - // yep, get the next byte as a RLE command - int RLE_cmd = stbi__get8(s); - RLE_count = 1 + (RLE_cmd & 127); - RLE_repeating = RLE_cmd >> 7; - read_next_pixel = 1; - } else if ( !RLE_repeating ) - { - read_next_pixel = 1; - } - } else - { - read_next_pixel = 1; - } - // OK, if I need to read a pixel, do it now - if ( read_next_pixel ) - { - // load however much data we did have - if ( tga_indexed ) - { - // read in index, then perform the lookup - int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s); - if ( pal_idx >= tga_palette_len ) { - // invalid index - pal_idx = 0; - } - pal_idx *= tga_comp; - for (j = 0; j < tga_comp; ++j) { - raw_data[j] = tga_palette[pal_idx+j]; - } - } else if(tga_rgb16) { - STBI_ASSERT(tga_comp == STBI_rgb); - stbi__tga_read_rgb16(s, raw_data); - } else { - // read in the data raw - for (j = 0; j < tga_comp; ++j) { - raw_data[j] = stbi__get8(s); - } - } - // clear the reading flag for the next pixel - read_next_pixel = 0; - } // end of reading a pixel - - // copy data - for (j = 0; j < tga_comp; ++j) - tga_data[i*tga_comp+j] = raw_data[j]; - - // in case we're in RLE mode, keep counting down - --RLE_count; - } - // do I need to invert the image? - if ( tga_inverted ) - { - for (j = 0; j*2 < tga_height; ++j) - { - int index1 = j * tga_width * tga_comp; - int index2 = (tga_height - 1 - j) * tga_width * tga_comp; - for (i = tga_width * tga_comp; i > 0; --i) - { - unsigned char temp = tga_data[index1]; - tga_data[index1] = tga_data[index2]; - tga_data[index2] = temp; - ++index1; - ++index2; - } - } - } - // clear my palette, if I had one - if ( tga_palette != NULL ) - { - STBI_FREE( tga_palette ); - } - } - - // swap RGB - if the source data was RGB16, it already is in the right order - if (tga_comp >= 3 && !tga_rgb16) - { - unsigned char* tga_pixel = tga_data; - for (i=0; i < tga_width * tga_height; ++i) - { - unsigned char temp = tga_pixel[0]; - tga_pixel[0] = tga_pixel[2]; - tga_pixel[2] = temp; - tga_pixel += tga_comp; - } - } - - // convert to target component count - if (req_comp && req_comp != tga_comp) - tga_data = stbi__convert_format(tga_data, tga_comp, req_comp, tga_width, tga_height); - - // the things I do to get rid of an error message, and yet keep - // Microsoft's C compilers happy... [8^( - tga_palette_start = tga_palette_len = tga_palette_bits = - tga_x_origin = tga_y_origin = 0; - // OK, done - return tga_data; -} -#endif - -// ************************************************************************************************* -// Photoshop PSD loader -- PD by Thatcher Ulrich, integration by Nicolas Schulz, tweaked by STB - -#ifndef STBI_NO_PSD -static int stbi__psd_test(stbi__context *s) -{ - int r = (stbi__get32be(s) == 0x38425053); - stbi__rewind(s); - return r; -} - -static int stbi__psd_decode_rle(stbi__context *s, stbi_uc *p, int pixelCount) -{ - int count, nleft, len; - - count = 0; - while ((nleft = pixelCount - count) > 0) { - len = stbi__get8(s); - if (len == 128) { - // No-op. - } else if (len < 128) { - // Copy next len+1 bytes literally. - len++; - if (len > nleft) return 0; // corrupt data - count += len; - while (len) { - *p = stbi__get8(s); - p += 4; - len--; - } - } else if (len > 128) { - stbi_uc val; - // Next -len+1 bytes in the dest are replicated from next source byte. - // (Interpret len as a negative 8-bit int.) - len = 257 - len; - if (len > nleft) return 0; // corrupt data - val = stbi__get8(s); - count += len; - while (len) { - *p = val; - p += 4; - len--; - } - } - } - - return 1; -} - -static void *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri, int bpc) -{ - int pixelCount; - int channelCount, compression; - int channel, i; - int bitdepth; - int w,h; - stbi_uc *out; - STBI_NOTUSED(ri); - - // Check identifier - if (stbi__get32be(s) != 0x38425053) // "8BPS" - return stbi__errpuc("not PSD", "Corrupt PSD image"); - - // Check file type version. - if (stbi__get16be(s) != 1) - return stbi__errpuc("wrong version", "Unsupported version of PSD image"); - - // Skip 6 reserved bytes. - stbi__skip(s, 6 ); - - // Read the number of channels (R, G, B, A, etc). - channelCount = stbi__get16be(s); - if (channelCount < 0 || channelCount > 16) - return stbi__errpuc("wrong channel count", "Unsupported number of channels in PSD image"); - - // Read the rows and columns of the image. - h = stbi__get32be(s); - w = stbi__get32be(s); - - // Make sure the depth is 8 bits. - bitdepth = stbi__get16be(s); - if (bitdepth != 8 && bitdepth != 16) - return stbi__errpuc("unsupported bit depth", "PSD bit depth is not 8 or 16 bit"); - - // Make sure the color mode is RGB. - // Valid options are: - // 0: Bitmap - // 1: Grayscale - // 2: Indexed color - // 3: RGB color - // 4: CMYK color - // 7: Multichannel - // 8: Duotone - // 9: Lab color - if (stbi__get16be(s) != 3) - return stbi__errpuc("wrong color format", "PSD is not in RGB color format"); - - // Skip the Mode Data. (It's the palette for indexed color; other info for other modes.) - stbi__skip(s,stbi__get32be(s) ); - - // Skip the image resources. (resolution, pen tool paths, etc) - stbi__skip(s, stbi__get32be(s) ); - - // Skip the reserved data. - stbi__skip(s, stbi__get32be(s) ); - - // Find out if the data is compressed. - // Known values: - // 0: no compression - // 1: RLE compressed - compression = stbi__get16be(s); - if (compression > 1) - return stbi__errpuc("bad compression", "PSD has an unknown compression format"); - - // Check size - if (!stbi__mad3sizes_valid(4, w, h, 0)) - return stbi__errpuc("too large", "Corrupt PSD"); - - // Create the destination image. - - if (!compression && bitdepth == 16 && bpc == 16) { - out = (stbi_uc *) stbi__malloc_mad3(8, w, h, 0); - ri->bits_per_channel = 16; - } else - out = (stbi_uc *) stbi__malloc(4 * w*h); - - if (!out) return stbi__errpuc("outofmem", "Out of memory"); - pixelCount = w*h; - - // Initialize the data to zero. - //memset( out, 0, pixelCount * 4 ); - - // Finally, the image data. - if (compression) { - // RLE as used by .PSD and .TIFF - // Loop until you get the number of unpacked bytes you are expecting: - // Read the next source byte into n. - // If n is between 0 and 127 inclusive, copy the next n+1 bytes literally. - // Else if n is between -127 and -1 inclusive, copy the next byte -n+1 times. - // Else if n is 128, noop. - // Endloop - - // The RLE-compressed data is preceded by a 2-byte data count for each row in the data, - // which we're going to just skip. - stbi__skip(s, h * channelCount * 2 ); - - // Read the RLE data by channel. - for (channel = 0; channel < 4; channel++) { - stbi_uc *p; - - p = out+channel; - if (channel >= channelCount) { - // Fill this channel with default data. - for (i = 0; i < pixelCount; i++, p += 4) - *p = (channel == 3 ? 255 : 0); - } else { - // Read the RLE data. - if (!stbi__psd_decode_rle(s, p, pixelCount)) { - STBI_FREE(out); - return stbi__errpuc("corrupt", "bad RLE data"); - } - } - } - - } else { - // We're at the raw image data. It's each channel in order (Red, Green, Blue, Alpha, ...) - // where each channel consists of an 8-bit (or 16-bit) value for each pixel in the image. - - // Read the data by channel. - for (channel = 0; channel < 4; channel++) { - if (channel >= channelCount) { - // Fill this channel with default data. - if (bitdepth == 16 && bpc == 16) { - stbi__uint16 *q = ((stbi__uint16 *) out) + channel; - stbi__uint16 val = channel == 3 ? 65535 : 0; - for (i = 0; i < pixelCount; i++, q += 4) - *q = val; - } else { - stbi_uc *p = out+channel; - stbi_uc val = channel == 3 ? 255 : 0; - for (i = 0; i < pixelCount; i++, p += 4) - *p = val; - } - } else { - if (ri->bits_per_channel == 16) { // output bpc - stbi__uint16 *q = ((stbi__uint16 *) out) + channel; - for (i = 0; i < pixelCount; i++, q += 4) - *q = (stbi__uint16) stbi__get16be(s); - } else { - stbi_uc *p = out+channel; - if (bitdepth == 16) { // input bpc - for (i = 0; i < pixelCount; i++, p += 4) - *p = (stbi_uc) (stbi__get16be(s) >> 8); - } else { - for (i = 0; i < pixelCount; i++, p += 4) - *p = stbi__get8(s); - } - } - } - } - } - - // remove weird white matte from PSD - if (channelCount >= 4) { - if (ri->bits_per_channel == 16) { - for (i=0; i < w*h; ++i) { - stbi__uint16 *pixel = (stbi__uint16 *) out + 4*i; - if (pixel[3] != 0 && pixel[3] != 65535) { - float a = pixel[3] / 65535.0f; - float ra = 1.0f / a; - float inv_a = 65535.0f * (1 - ra); - pixel[0] = (stbi__uint16) (pixel[0]*ra + inv_a); - pixel[1] = (stbi__uint16) (pixel[1]*ra + inv_a); - pixel[2] = (stbi__uint16) (pixel[2]*ra + inv_a); - } - } - } else { - for (i=0; i < w*h; ++i) { - unsigned char *pixel = out + 4*i; - if (pixel[3] != 0 && pixel[3] != 255) { - float a = pixel[3] / 255.0f; - float ra = 1.0f / a; - float inv_a = 255.0f * (1 - ra); - pixel[0] = (unsigned char) (pixel[0]*ra + inv_a); - pixel[1] = (unsigned char) (pixel[1]*ra + inv_a); - pixel[2] = (unsigned char) (pixel[2]*ra + inv_a); - } - } - } - } - - // convert to desired output format - if (req_comp && req_comp != 4) { - if (ri->bits_per_channel == 16) - out = (stbi_uc *) stbi__convert_format16((stbi__uint16 *) out, 4, req_comp, w, h); - else - out = stbi__convert_format(out, 4, req_comp, w, h); - if (out == NULL) return out; // stbi__convert_format frees input on failure - } - - if (comp) *comp = 4; - *y = h; - *x = w; - - return out; -} -#endif - -// ************************************************************************************************* -// Softimage PIC loader -// by Tom Seddon -// -// See http://softimage.wiki.softimage.com/index.php/INFO:_PIC_file_format -// See http://ozviz.wasp.uwa.edu.au/~pbourke/dataformats/softimagepic/ - -#ifndef STBI_NO_PIC -static int stbi__pic_is4(stbi__context *s,const char *str) -{ - int i; - for (i=0; i<4; ++i) - if (stbi__get8(s) != (stbi_uc)str[i]) - return 0; - - return 1; -} - -static int stbi__pic_test_core(stbi__context *s) -{ - int i; - - if (!stbi__pic_is4(s,"\x53\x80\xF6\x34")) - return 0; - - for(i=0;i<84;++i) - stbi__get8(s); - - if (!stbi__pic_is4(s,"PICT")) - return 0; - - return 1; -} - -typedef struct -{ - stbi_uc size,type,channel; -} stbi__pic_packet; - -static stbi_uc *stbi__readval(stbi__context *s, int channel, stbi_uc *dest) -{ - int mask=0x80, i; - - for (i=0; i<4; ++i, mask>>=1) { - if (channel & mask) { - if (stbi__at_eof(s)) return stbi__errpuc("bad file","PIC file too short"); - dest[i]=stbi__get8(s); - } - } - - return dest; -} - -static void stbi__copyval(int channel,stbi_uc *dest,const stbi_uc *src) -{ - int mask=0x80,i; - - for (i=0;i<4; ++i, mask>>=1) - if (channel&mask) - dest[i]=src[i]; -} - -static stbi_uc *stbi__pic_load_core(stbi__context *s,int width,int height,int *comp, stbi_uc *result) -{ - int act_comp=0,num_packets=0,y,chained; - stbi__pic_packet packets[10]; - - // this will (should...) cater for even some bizarre stuff like having data - // for the same channel in multiple packets. - do { - stbi__pic_packet *packet; - - if (num_packets==sizeof(packets)/sizeof(packets[0])) - return stbi__errpuc("bad format","too many packets"); - - packet = &packets[num_packets++]; - - chained = stbi__get8(s); - packet->size = stbi__get8(s); - packet->type = stbi__get8(s); - packet->channel = stbi__get8(s); - - act_comp |= packet->channel; - - if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (reading packets)"); - if (packet->size != 8) return stbi__errpuc("bad format","packet isn't 8bpp"); - } while (chained); - - *comp = (act_comp & 0x10 ? 4 : 3); // has alpha channel? - - for(y=0; ytype) { - default: - return stbi__errpuc("bad format","packet has bad compression type"); - - case 0: {//uncompressed - int x; - - for(x=0;xchannel,dest)) - return 0; - break; - } - - case 1://Pure RLE - { - int left=width, i; - - while (left>0) { - stbi_uc count,value[4]; - - count=stbi__get8(s); - if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (pure read count)"); - - if (count > left) - count = (stbi_uc) left; - - if (!stbi__readval(s,packet->channel,value)) return 0; - - for(i=0; ichannel,dest,value); - left -= count; - } - } - break; - - case 2: {//Mixed RLE - int left=width; - while (left>0) { - int count = stbi__get8(s), i; - if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (mixed read count)"); - - if (count >= 128) { // Repeated - stbi_uc value[4]; - - if (count==128) - count = stbi__get16be(s); - else - count -= 127; - if (count > left) - return stbi__errpuc("bad file","scanline overrun"); - - if (!stbi__readval(s,packet->channel,value)) - return 0; - - for(i=0;ichannel,dest,value); - } else { // Raw - ++count; - if (count>left) return stbi__errpuc("bad file","scanline overrun"); - - for(i=0;ichannel,dest)) - return 0; - } - left-=count; - } - break; - } - } - } - } - - return result; -} - -static void *stbi__pic_load(stbi__context *s,int *px,int *py,int *comp,int req_comp, stbi__result_info *ri) -{ - stbi_uc *result; - int i, x,y, internal_comp; - STBI_NOTUSED(ri); - - if (!comp) comp = &internal_comp; - - for (i=0; i<92; ++i) - stbi__get8(s); - - x = stbi__get16be(s); - y = stbi__get16be(s); - if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (pic header)"); - if (!stbi__mad3sizes_valid(x, y, 4, 0)) return stbi__errpuc("too large", "PIC image too large to decode"); - - stbi__get32be(s); //skip `ratio' - stbi__get16be(s); //skip `fields' - stbi__get16be(s); //skip `pad' - - // intermediate buffer is RGBA - result = (stbi_uc *) stbi__malloc_mad3(x, y, 4, 0); - memset(result, 0xff, x*y*4); - - if (!stbi__pic_load_core(s,x,y,comp, result)) { - STBI_FREE(result); - result=0; - } - *px = x; - *py = y; - if (req_comp == 0) req_comp = *comp; - result=stbi__convert_format(result,4,req_comp,x,y); - - return result; -} - -static int stbi__pic_test(stbi__context *s) -{ - int r = stbi__pic_test_core(s); - stbi__rewind(s); - return r; -} -#endif - -// ************************************************************************************************* -// GIF loader -- public domain by Jean-Marc Lienher -- simplified/shrunk by stb - -#ifndef STBI_NO_GIF -typedef struct -{ - stbi__int16 prefix; - stbi_uc first; - stbi_uc suffix; -} stbi__gif_lzw; - -typedef struct -{ - int w,h; - stbi_uc *out; // output buffer (always 4 components) - stbi_uc *background; // The current "background" as far as a gif is concerned - stbi_uc *history; - int flags, bgindex, ratio, transparent, eflags; - stbi_uc pal[256][4]; - stbi_uc lpal[256][4]; - stbi__gif_lzw codes[8192]; - stbi_uc *color_table; - int parse, step; - int lflags; - int start_x, start_y; - int max_x, max_y; - int cur_x, cur_y; - int line_size; - int delay; -} stbi__gif; - -static int stbi__gif_test_raw(stbi__context *s) -{ - int sz; - if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') return 0; - sz = stbi__get8(s); - if (sz != '9' && sz != '7') return 0; - if (stbi__get8(s) != 'a') return 0; - return 1; -} - -static int stbi__gif_test(stbi__context *s) -{ - int r = stbi__gif_test_raw(s); - stbi__rewind(s); - return r; -} - -static void stbi__gif_parse_colortable(stbi__context *s, stbi_uc pal[256][4], int num_entries, int transp) -{ - int i; - for (i=0; i < num_entries; ++i) { - pal[i][2] = stbi__get8(s); - pal[i][1] = stbi__get8(s); - pal[i][0] = stbi__get8(s); - pal[i][3] = transp == i ? 0 : 255; - } -} - -static int stbi__gif_header(stbi__context *s, stbi__gif *g, int *comp, int is_info) -{ - stbi_uc version; - if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') - return stbi__err("not GIF", "Corrupt GIF"); - - version = stbi__get8(s); - if (version != '7' && version != '9') return stbi__err("not GIF", "Corrupt GIF"); - if (stbi__get8(s) != 'a') return stbi__err("not GIF", "Corrupt GIF"); - - stbi__g_failure_reason = ""; - g->w = stbi__get16le(s); - g->h = stbi__get16le(s); - g->flags = stbi__get8(s); - g->bgindex = stbi__get8(s); - g->ratio = stbi__get8(s); - g->transparent = -1; - - if (comp != 0) *comp = 4; // can't actually tell whether it's 3 or 4 until we parse the comments - - if (is_info) return 1; - - if (g->flags & 0x80) - stbi__gif_parse_colortable(s,g->pal, 2 << (g->flags & 7), -1); - - return 1; -} - -static int stbi__gif_info_raw(stbi__context *s, int *x, int *y, int *comp) -{ - stbi__gif* g = (stbi__gif*) stbi__malloc(sizeof(stbi__gif)); - if (!stbi__gif_header(s, g, comp, 1)) { - STBI_FREE(g); - stbi__rewind( s ); - return 0; - } - if (x) *x = g->w; - if (y) *y = g->h; - STBI_FREE(g); - return 1; -} - -static void stbi__out_gif_code(stbi__gif *g, stbi__uint16 code) -{ - stbi_uc *p, *c; - int idx; - - // recurse to decode the prefixes, since the linked-list is backwards, - // and working backwards through an interleaved image would be nasty - if (g->codes[code].prefix >= 0) - stbi__out_gif_code(g, g->codes[code].prefix); - - if (g->cur_y >= g->max_y) return; - - idx = g->cur_x + g->cur_y; - p = &g->out[idx]; - g->history[idx / 4] = 1; - - c = &g->color_table[g->codes[code].suffix * 4]; - if (c[3] > 128) { // don't render transparent pixels; - p[0] = c[2]; - p[1] = c[1]; - p[2] = c[0]; - p[3] = c[3]; - } - g->cur_x += 4; - - if (g->cur_x >= g->max_x) { - g->cur_x = g->start_x; - g->cur_y += g->step; - - while (g->cur_y >= g->max_y && g->parse > 0) { - g->step = (1 << g->parse) * g->line_size; - g->cur_y = g->start_y + (g->step >> 1); - --g->parse; - } - } -} - -static stbi_uc *stbi__process_gif_raster(stbi__context *s, stbi__gif *g) -{ - stbi_uc lzw_cs; - stbi__int32 len, init_code; - stbi__uint32 first; - stbi__int32 codesize, codemask, avail, oldcode, bits, valid_bits, clear; - stbi__gif_lzw *p; - - lzw_cs = stbi__get8(s); - if (lzw_cs > 12) return NULL; - clear = 1 << lzw_cs; - first = 1; - codesize = lzw_cs + 1; - codemask = (1 << codesize) - 1; - bits = 0; - valid_bits = 0; - for (init_code = 0; init_code < clear; init_code++) { - g->codes[init_code].prefix = -1; - g->codes[init_code].first = (stbi_uc) init_code; - g->codes[init_code].suffix = (stbi_uc) init_code; - } - - // support no starting clear code - avail = clear+2; - oldcode = -1; - - len = 0; - for(;;) { - if (valid_bits < codesize) { - if (len == 0) { - len = stbi__get8(s); // start new block - if (len == 0) - return g->out; - } - --len; - bits |= (stbi__int32) stbi__get8(s) << valid_bits; - valid_bits += 8; - } else { - stbi__int32 code = bits & codemask; - bits >>= codesize; - valid_bits -= codesize; - // @OPTIMIZE: is there some way we can accelerate the non-clear path? - if (code == clear) { // clear code - codesize = lzw_cs + 1; - codemask = (1 << codesize) - 1; - avail = clear + 2; - oldcode = -1; - first = 0; - } else if (code == clear + 1) { // end of stream code - stbi__skip(s, len); - while ((len = stbi__get8(s)) > 0) - stbi__skip(s,len); - return g->out; - } else if (code <= avail) { - if (first) { - return stbi__errpuc("no clear code", "Corrupt GIF"); - } - - if (oldcode >= 0) { - p = &g->codes[avail++]; - if (avail > 8192) { - return stbi__errpuc("too many codes", "Corrupt GIF"); - } - - p->prefix = (stbi__int16) oldcode; - p->first = g->codes[oldcode].first; - p->suffix = (code == avail) ? p->first : g->codes[code].first; - } else if (code == avail) - return stbi__errpuc("illegal code in raster", "Corrupt GIF"); - - stbi__out_gif_code(g, (stbi__uint16) code); - - if ((avail & codemask) == 0 && avail <= 0x0FFF) { - codesize++; - codemask = (1 << codesize) - 1; - } - - oldcode = code; - } else { - return stbi__errpuc("illegal code in raster", "Corrupt GIF"); - } - } - } -} - -// this function is designed to support animated gifs, although stb_image doesn't support it -// two back is the image from two frames ago, used for a very specific disposal format -static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, int req_comp, stbi_uc *two_back) -{ - int dispose; - int first_frame; - int pi; - int pcount; - STBI_NOTUSED(req_comp); - - // on first frame, any non-written pixels get the background colour (non-transparent) - first_frame = 0; - if (g->out == 0) { - if (!stbi__gif_header(s, g, comp,0)) return 0; // stbi__g_failure_reason set by stbi__gif_header - if (!stbi__mad3sizes_valid(4, g->w, g->h, 0)) - return stbi__errpuc("too large", "GIF image is too large"); - pcount = g->w * g->h; - g->out = (stbi_uc *) stbi__malloc(4 * pcount); - g->background = (stbi_uc *) stbi__malloc(4 * pcount); - g->history = (stbi_uc *) stbi__malloc(pcount); - if (!g->out || !g->background || !g->history) - return stbi__errpuc("outofmem", "Out of memory"); - - // image is treated as "transparent" at the start - ie, nothing overwrites the current background; - // background colour is only used for pixels that are not rendered first frame, after that "background" - // color refers to the color that was there the previous frame. - memset(g->out, 0x00, 4 * pcount); - memset(g->background, 0x00, 4 * pcount); // state of the background (starts transparent) - memset(g->history, 0x00, pcount); // pixels that were affected previous frame - first_frame = 1; - } else { - // second frame - how do we dispoase of the previous one? - dispose = (g->eflags & 0x1C) >> 2; - pcount = g->w * g->h; - - if ((dispose == 3) && (two_back == 0)) { - dispose = 2; // if I don't have an image to revert back to, default to the old background - } - - if (dispose == 3) { // use previous graphic - for (pi = 0; pi < pcount; ++pi) { - if (g->history[pi]) { - memcpy( &g->out[pi * 4], &two_back[pi * 4], 4 ); - } - } - } else if (dispose == 2) { - // restore what was changed last frame to background before that frame; - for (pi = 0; pi < pcount; ++pi) { - if (g->history[pi]) { - memcpy( &g->out[pi * 4], &g->background[pi * 4], 4 ); - } - } - } else { - // This is a non-disposal case eithe way, so just - // leave the pixels as is, and they will become the new background - // 1: do not dispose - // 0: not specified. - } - - // background is what out is after the undoing of the previou frame; - memcpy( g->background, g->out, 4 * g->w * g->h ); - } - - // clear my history; - memset( g->history, 0x00, g->w * g->h ); // pixels that were affected previous frame - - for (;;) { - int tag = stbi__get8(s); - switch (tag) { - case 0x2C: /* Image Descriptor */ - { - stbi__int32 x, y, w, h; - stbi_uc *o; - - x = stbi__get16le(s); - y = stbi__get16le(s); - w = stbi__get16le(s); - h = stbi__get16le(s); - if (((x + w) > (g->w)) || ((y + h) > (g->h))) - return stbi__errpuc("bad Image Descriptor", "Corrupt GIF"); - - g->line_size = g->w * 4; - g->start_x = x * 4; - g->start_y = y * g->line_size; - g->max_x = g->start_x + w * 4; - g->max_y = g->start_y + h * g->line_size; - g->cur_x = g->start_x; - g->cur_y = g->start_y; - - // if the width of the specified rectangle is 0, that means - // we may not see *any* pixels or the image is malformed; - // to make sure this is caught, move the current y down to - // max_y (which is what out_gif_code checks). - if (w == 0) - g->cur_y = g->max_y; - - g->lflags = stbi__get8(s); - - if (g->lflags & 0x40) { - g->step = 8 * g->line_size; // first interlaced spacing - g->parse = 3; - } else { - g->step = g->line_size; - g->parse = 0; - } - - if (g->lflags & 0x80) { - stbi__gif_parse_colortable(s,g->lpal, 2 << (g->lflags & 7), g->eflags & 0x01 ? g->transparent : -1); - g->color_table = (stbi_uc *) g->lpal; - } else if (g->flags & 0x80) { - g->color_table = (stbi_uc *) g->pal; - } else - return stbi__errpuc("missing color table", "Corrupt GIF"); - - o = stbi__process_gif_raster(s, g); - if (!o) return NULL; - - // if this was the first frame, - pcount = g->w * g->h; - if (first_frame && (g->bgindex > 0)) { - // if first frame, any pixel not drawn to gets the background color - for (pi = 0; pi < pcount; ++pi) { - if (g->history[pi] == 0) { - g->pal[g->bgindex][3] = 255; // just in case it was made transparent, undo that; It will be reset next frame if need be; - memcpy( &g->out[pi * 4], &g->pal[g->bgindex], 4 ); - } - } - } - - return o; - } - - case 0x21: // Comment Extension. - { - int len; - int ext = stbi__get8(s); - if (ext == 0xF9) { // Graphic Control Extension. - len = stbi__get8(s); - if (len == 4) { - g->eflags = stbi__get8(s); - g->delay = 10 * stbi__get16le(s); // delay - 1/100th of a second, saving as 1/1000ths. - - // unset old transparent - if (g->transparent >= 0) { - g->pal[g->transparent][3] = 255; - } - if (g->eflags & 0x01) { - g->transparent = stbi__get8(s); - if (g->transparent >= 0) { - g->pal[g->transparent][3] = 0; - } - } else { - // don't need transparent - stbi__skip(s, 1); - g->transparent = -1; - } - } else { - stbi__skip(s, len); - break; - } - } - while ((len = stbi__get8(s)) != 0) { - stbi__skip(s, len); - } - break; - } - - case 0x3B: // gif stream termination code - return (stbi_uc *) s; // using '1' causes warning on some compilers - - default: - return stbi__errpuc("unknown code", "Corrupt GIF"); - } - } -} - -static void *stbi__load_gif_main(stbi__context *s, int **delays, int *x, int *y, int *z, int *comp, int req_comp) -{ - if (stbi__gif_test(s)) { - int layers = 0; - stbi_uc *u = 0; - stbi_uc *out = 0; - stbi_uc *two_back = 0; - stbi__gif g; - int stride; - memset(&g, 0, sizeof(g)); - if (delays) { - *delays = 0; - } - - do { - u = stbi__gif_load_next(s, &g, comp, req_comp, two_back); - if (u == (stbi_uc *) s) u = 0; // end of animated gif marker - - if (u) { - *x = g.w; - *y = g.h; - ++layers; - stride = g.w * g.h * 4; - - if (out) { - out = (stbi_uc*) STBI_REALLOC( out, layers * stride ); - if (delays) { - *delays = (int*) STBI_REALLOC( *delays, sizeof(int) * layers ); - } - } else { - out = (stbi_uc*)stbi__malloc( layers * stride ); - if (delays) { - *delays = (int*) stbi__malloc( layers * sizeof(int) ); - } - } - memcpy( out + ((layers - 1) * stride), u, stride ); - if (layers >= 2) { - two_back = out - 2 * stride; - } - - if (delays) { - (*delays)[layers - 1U] = g.delay; - } - } - } while (u != 0); - - // free temp buffer; - STBI_FREE(g.out); - STBI_FREE(g.history); - STBI_FREE(g.background); - - // do the final conversion after loading everything; - if (req_comp && req_comp != 4) - out = stbi__convert_format(out, 4, req_comp, layers * g.w, g.h); - - *z = layers; - return out; - } else { - return stbi__errpuc("not GIF", "Image was not as a gif type."); - } -} - -static void *stbi__gif_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) -{ - stbi_uc *u = 0; - stbi__gif g; - memset(&g, 0, sizeof(g)); - STBI_NOTUSED(ri); - - u = stbi__gif_load_next(s, &g, comp, req_comp, 0); - if (u == (stbi_uc *) s) u = 0; // end of animated gif marker - if (u) { - *x = g.w; - *y = g.h; - - // moved conversion to after successful load so that the same - // can be done for multiple frames. - if (req_comp && req_comp != 4) - u = stbi__convert_format(u, 4, req_comp, g.w, g.h); - } else if (g.out) { - // if there was an error and we allocated an image buffer, free it! - STBI_FREE(g.out); - } - - // free buffers needed for multiple frame loading; - STBI_FREE(g.history); - STBI_FREE(g.background); - - return u; -} - -static int stbi__gif_info(stbi__context *s, int *x, int *y, int *comp) -{ - return stbi__gif_info_raw(s,x,y,comp); -} -#endif - -// ************************************************************************************************* -// Radiance RGBE HDR loader -// originally by Nicolas Schulz -#ifndef STBI_NO_HDR -static int stbi__hdr_test_core(stbi__context *s, const char *signature) -{ - int i; - for (i=0; signature[i]; ++i) - if (stbi__get8(s) != signature[i]) - return 0; - stbi__rewind(s); - return 1; -} - -static int stbi__hdr_test(stbi__context* s) -{ - int r = stbi__hdr_test_core(s, "#?RADIANCE\n"); - stbi__rewind(s); - if(!r) { - r = stbi__hdr_test_core(s, "#?RGBE\n"); - stbi__rewind(s); - } - return r; -} - -#define STBI__HDR_BUFLEN 1024 -static char *stbi__hdr_gettoken(stbi__context *z, char *buffer) -{ - int len=0; - char c = '\0'; - - c = (char) stbi__get8(z); - - while (!stbi__at_eof(z) && c != '\n') { - buffer[len++] = c; - if (len == STBI__HDR_BUFLEN-1) { - // flush to end of line - while (!stbi__at_eof(z) && stbi__get8(z) != '\n') - ; - break; - } - c = (char) stbi__get8(z); - } - - buffer[len] = 0; - return buffer; -} - -static void stbi__hdr_convert(float *output, stbi_uc *input, int req_comp) -{ - if ( input[3] != 0 ) { - float f1; - // Exponent - f1 = (float) ldexp(1.0f, input[3] - (int)(128 + 8)); - if (req_comp <= 2) - output[0] = (input[0] + input[1] + input[2]) * f1 / 3; - else { - output[0] = input[0] * f1; - output[1] = input[1] * f1; - output[2] = input[2] * f1; - } - if (req_comp == 2) output[1] = 1; - if (req_comp == 4) output[3] = 1; - } else { - switch (req_comp) { - case 4: output[3] = 1; /* fallthrough */ - case 3: output[0] = output[1] = output[2] = 0; - break; - case 2: output[1] = 1; /* fallthrough */ - case 1: output[0] = 0; - break; - } - } -} - -static float *stbi__hdr_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) -{ - char buffer[STBI__HDR_BUFLEN]; - char *token; - int valid = 0; - int width, height; - stbi_uc *scanline; - float *hdr_data; - int len; - unsigned char count, value; - int i, j, k, c1,c2, z; - const char *headerToken; - STBI_NOTUSED(ri); - - // Check identifier - headerToken = stbi__hdr_gettoken(s,buffer); - if (strcmp(headerToken, "#?RADIANCE") != 0 && strcmp(headerToken, "#?RGBE") != 0) - return stbi__errpf("not HDR", "Corrupt HDR image"); - - // Parse header - for(;;) { - token = stbi__hdr_gettoken(s,buffer); - if (token[0] == 0) break; - if (strcmp(token, "FORMAT=32-bit_rle_rgbe") == 0) valid = 1; - } - - if (!valid) return stbi__errpf("unsupported format", "Unsupported HDR format"); - - // Parse width and height - // can't use sscanf() if we're not using stdio! - token = stbi__hdr_gettoken(s,buffer); - if (strncmp(token, "-Y ", 3)) return stbi__errpf("unsupported data layout", "Unsupported HDR format"); - token += 3; - height = (int) strtol(token, &token, 10); - while (*token == ' ') ++token; - if (strncmp(token, "+X ", 3)) return stbi__errpf("unsupported data layout", "Unsupported HDR format"); - token += 3; - width = (int) strtol(token, NULL, 10); - - *x = width; - *y = height; - - if (comp) *comp = 3; - if (req_comp == 0) req_comp = 3; - - if (!stbi__mad4sizes_valid(width, height, req_comp, sizeof(float), 0)) - return stbi__errpf("too large", "HDR image is too large"); - - // Read data - hdr_data = (float *) stbi__malloc_mad4(width, height, req_comp, sizeof(float), 0); - if (!hdr_data) - return stbi__errpf("outofmem", "Out of memory"); - - // Load image data - // image data is stored as some number of sca - if ( width < 8 || width >= 32768) { - // Read flat data - for (j=0; j < height; ++j) { - for (i=0; i < width; ++i) { - stbi_uc rgbe[4]; - main_decode_loop: - stbi__getn(s, rgbe, 4); - stbi__hdr_convert(hdr_data + j * width * req_comp + i * req_comp, rgbe, req_comp); - } - } - } else { - // Read RLE-encoded data - scanline = NULL; - - for (j = 0; j < height; ++j) { - c1 = stbi__get8(s); - c2 = stbi__get8(s); - len = stbi__get8(s); - if (c1 != 2 || c2 != 2 || (len & 0x80)) { - // not run-length encoded, so we have to actually use THIS data as a decoded - // pixel (note this can't be a valid pixel--one of RGB must be >= 128) - stbi_uc rgbe[4]; - rgbe[0] = (stbi_uc) c1; - rgbe[1] = (stbi_uc) c2; - rgbe[2] = (stbi_uc) len; - rgbe[3] = (stbi_uc) stbi__get8(s); - stbi__hdr_convert(hdr_data, rgbe, req_comp); - i = 1; - j = 0; - STBI_FREE(scanline); - goto main_decode_loop; // yes, this makes no sense - } - len <<= 8; - len |= stbi__get8(s); - if (len != width) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("invalid decoded scanline length", "corrupt HDR"); } - if (scanline == NULL) { - scanline = (stbi_uc *) stbi__malloc_mad2(width, 4, 0); - if (!scanline) { - STBI_FREE(hdr_data); - return stbi__errpf("outofmem", "Out of memory"); - } - } - - for (k = 0; k < 4; ++k) { - int nleft; - i = 0; - while ((nleft = width - i) > 0) { - count = stbi__get8(s); - if (count > 128) { - // Run - value = stbi__get8(s); - count -= 128; - if (count > nleft) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("corrupt", "bad RLE data in HDR"); } - for (z = 0; z < count; ++z) - scanline[i++ * 4 + k] = value; - } else { - // Dump - if (count > nleft) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("corrupt", "bad RLE data in HDR"); } - for (z = 0; z < count; ++z) - scanline[i++ * 4 + k] = stbi__get8(s); - } - } - } - for (i=0; i < width; ++i) - stbi__hdr_convert(hdr_data+(j*width + i)*req_comp, scanline + i*4, req_comp); - } - if (scanline) - STBI_FREE(scanline); - } - - return hdr_data; -} - -static int stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp) -{ - char buffer[STBI__HDR_BUFLEN]; - char *token; - int valid = 0; - int dummy; - - if (!x) x = &dummy; - if (!y) y = &dummy; - if (!comp) comp = &dummy; - - if (stbi__hdr_test(s) == 0) { - stbi__rewind( s ); - return 0; - } - - for(;;) { - token = stbi__hdr_gettoken(s,buffer); - if (token[0] == 0) break; - if (strcmp(token, "FORMAT=32-bit_rle_rgbe") == 0) valid = 1; - } - - if (!valid) { - stbi__rewind( s ); - return 0; - } - token = stbi__hdr_gettoken(s,buffer); - if (strncmp(token, "-Y ", 3)) { - stbi__rewind( s ); - return 0; - } - token += 3; - *y = (int) strtol(token, &token, 10); - while (*token == ' ') ++token; - if (strncmp(token, "+X ", 3)) { - stbi__rewind( s ); - return 0; - } - token += 3; - *x = (int) strtol(token, NULL, 10); - *comp = 3; - return 1; -} -#endif // STBI_NO_HDR - -#ifndef STBI_NO_BMP -static int stbi__bmp_info(stbi__context *s, int *x, int *y, int *comp) -{ - void *p; - stbi__bmp_data info; - - info.all_a = 255; - p = stbi__bmp_parse_header(s, &info); - stbi__rewind( s ); - if (p == NULL) - return 0; - if (x) *x = s->img_x; - if (y) *y = s->img_y; - if (comp) *comp = info.ma ? 4 : 3; - return 1; -} -#endif - -#ifndef STBI_NO_PSD -static int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp) -{ - int channelCount, dummy, depth; - if (!x) x = &dummy; - if (!y) y = &dummy; - if (!comp) comp = &dummy; - if (stbi__get32be(s) != 0x38425053) { - stbi__rewind( s ); - return 0; - } - if (stbi__get16be(s) != 1) { - stbi__rewind( s ); - return 0; - } - stbi__skip(s, 6); - channelCount = stbi__get16be(s); - if (channelCount < 0 || channelCount > 16) { - stbi__rewind( s ); - return 0; - } - *y = stbi__get32be(s); - *x = stbi__get32be(s); - depth = stbi__get16be(s); - if (depth != 8 && depth != 16) { - stbi__rewind( s ); - return 0; - } - if (stbi__get16be(s) != 3) { - stbi__rewind( s ); - return 0; - } - *comp = 4; - return 1; -} - -static int stbi__psd_is16(stbi__context *s) -{ - int channelCount, depth; - if (stbi__get32be(s) != 0x38425053) { - stbi__rewind( s ); - return 0; - } - if (stbi__get16be(s) != 1) { - stbi__rewind( s ); - return 0; - } - stbi__skip(s, 6); - channelCount = stbi__get16be(s); - if (channelCount < 0 || channelCount > 16) { - stbi__rewind( s ); - return 0; - } - (void) stbi__get32be(s); - (void) stbi__get32be(s); - depth = stbi__get16be(s); - if (depth != 16) { - stbi__rewind( s ); - return 0; - } - return 1; -} -#endif - -#ifndef STBI_NO_PIC -static int stbi__pic_info(stbi__context *s, int *x, int *y, int *comp) -{ - int act_comp=0,num_packets=0,chained,dummy; - stbi__pic_packet packets[10]; - - if (!x) x = &dummy; - if (!y) y = &dummy; - if (!comp) comp = &dummy; - - if (!stbi__pic_is4(s,"\x53\x80\xF6\x34")) { - stbi__rewind(s); - return 0; - } - - stbi__skip(s, 88); - - *x = stbi__get16be(s); - *y = stbi__get16be(s); - if (stbi__at_eof(s)) { - stbi__rewind( s); - return 0; - } - if ( (*x) != 0 && (1 << 28) / (*x) < (*y)) { - stbi__rewind( s ); - return 0; - } - - stbi__skip(s, 8); - - do { - stbi__pic_packet *packet; - - if (num_packets==sizeof(packets)/sizeof(packets[0])) - return 0; - - packet = &packets[num_packets++]; - chained = stbi__get8(s); - packet->size = stbi__get8(s); - packet->type = stbi__get8(s); - packet->channel = stbi__get8(s); - act_comp |= packet->channel; - - if (stbi__at_eof(s)) { - stbi__rewind( s ); - return 0; - } - if (packet->size != 8) { - stbi__rewind( s ); - return 0; - } - } while (chained); - - *comp = (act_comp & 0x10 ? 4 : 3); - - return 1; -} -#endif - -// ************************************************************************************************* -// Portable Gray Map and Portable Pixel Map loader -// by Ken Miller -// -// PGM: http://netpbm.sourceforge.net/doc/pgm.html -// PPM: http://netpbm.sourceforge.net/doc/ppm.html -// -// Known limitations: -// Does not support comments in the header section -// Does not support ASCII image data (formats P2 and P3) -// Does not support 16-bit-per-channel - -#ifndef STBI_NO_PNM - -static int stbi__pnm_test(stbi__context *s) -{ - char p, t; - p = (char) stbi__get8(s); - t = (char) stbi__get8(s); - if (p != 'P' || (t != '5' && t != '6')) { - stbi__rewind( s ); - return 0; - } - return 1; -} - -static void *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) -{ - stbi_uc *out; - STBI_NOTUSED(ri); - - if (!stbi__pnm_info(s, (int *)&s->img_x, (int *)&s->img_y, (int *)&s->img_n)) - return 0; - - *x = s->img_x; - *y = s->img_y; - if (comp) *comp = s->img_n; - - if (!stbi__mad3sizes_valid(s->img_n, s->img_x, s->img_y, 0)) - return stbi__errpuc("too large", "PNM too large"); - - out = (stbi_uc *) stbi__malloc_mad3(s->img_n, s->img_x, s->img_y, 0); - if (!out) return stbi__errpuc("outofmem", "Out of memory"); - stbi__getn(s, out, s->img_n * s->img_x * s->img_y); - - if (req_comp && req_comp != s->img_n) { - out = stbi__convert_format(out, s->img_n, req_comp, s->img_x, s->img_y); - if (out == NULL) return out; // stbi__convert_format frees input on failure - } - return out; -} - -static int stbi__pnm_isspace(char c) -{ - return c == ' ' || c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r'; -} - -static void stbi__pnm_skip_whitespace(stbi__context *s, char *c) -{ - for (;;) { - while (!stbi__at_eof(s) && stbi__pnm_isspace(*c)) - *c = (char) stbi__get8(s); - - if (stbi__at_eof(s) || *c != '#') - break; - - while (!stbi__at_eof(s) && *c != '\n' && *c != '\r' ) - *c = (char) stbi__get8(s); - } -} - -static int stbi__pnm_isdigit(char c) -{ - return c >= '0' && c <= '9'; -} - -static int stbi__pnm_getinteger(stbi__context *s, char *c) -{ - int value = 0; - - while (!stbi__at_eof(s) && stbi__pnm_isdigit(*c)) { - value = value*10 + (*c - '0'); - *c = (char) stbi__get8(s); - } - - return value; -} - -static int stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp) -{ - int maxv, dummy; - char c, p, t; - - if (!x) x = &dummy; - if (!y) y = &dummy; - if (!comp) comp = &dummy; - - stbi__rewind(s); - - // Get identifier - p = (char) stbi__get8(s); - t = (char) stbi__get8(s); - if (p != 'P' || (t != '5' && t != '6')) { - stbi__rewind(s); - return 0; - } - - *comp = (t == '6') ? 3 : 1; // '5' is 1-component .pgm; '6' is 3-component .ppm - - c = (char) stbi__get8(s); - stbi__pnm_skip_whitespace(s, &c); - - *x = stbi__pnm_getinteger(s, &c); // read width - stbi__pnm_skip_whitespace(s, &c); - - *y = stbi__pnm_getinteger(s, &c); // read height - stbi__pnm_skip_whitespace(s, &c); - - maxv = stbi__pnm_getinteger(s, &c); // read max value - - if (maxv > 255) - return stbi__err("max value > 255", "PPM image not 8-bit"); - else - return 1; -} -#endif - -static int stbi__info_main(stbi__context *s, int *x, int *y, int *comp) -{ - #ifndef STBI_NO_JPEG - if (stbi__jpeg_info(s, x, y, comp)) return 1; - #endif - - #ifndef STBI_NO_PNG - if (stbi__png_info(s, x, y, comp)) return 1; - #endif - - #ifndef STBI_NO_GIF - if (stbi__gif_info(s, x, y, comp)) return 1; - #endif - - #ifndef STBI_NO_BMP - if (stbi__bmp_info(s, x, y, comp)) return 1; - #endif - - #ifndef STBI_NO_PSD - if (stbi__psd_info(s, x, y, comp)) return 1; - #endif - - #ifndef STBI_NO_PIC - if (stbi__pic_info(s, x, y, comp)) return 1; - #endif - - #ifndef STBI_NO_PNM - if (stbi__pnm_info(s, x, y, comp)) return 1; - #endif - - #ifndef STBI_NO_HDR - if (stbi__hdr_info(s, x, y, comp)) return 1; - #endif - - // test tga last because it's a crappy test! - #ifndef STBI_NO_TGA - if (stbi__tga_info(s, x, y, comp)) - return 1; - #endif - return stbi__err("unknown image type", "Image not of any known type, or corrupt"); -} - -static int stbi__is_16_main(stbi__context *s) -{ - #ifndef STBI_NO_PNG - if (stbi__png_is16(s)) return 1; - #endif - - #ifndef STBI_NO_PSD - if (stbi__psd_is16(s)) return 1; - #endif - - return 0; -} - -#ifndef STBI_NO_STDIO -STBIDEF int stbi_info(char const *filename, int *x, int *y, int *comp) -{ - FILE *f = stbi__fopen(filename, "rb"); - int result; - if (!f) return stbi__err("can't fopen", "Unable to open file"); - result = stbi_info_from_file(f, x, y, comp); - fclose(f); - return result; -} - -STBIDEF int stbi_info_from_file(FILE *f, int *x, int *y, int *comp) -{ - int r; - stbi__context s; - long pos = ftell(f); - stbi__start_file(&s, f); - r = stbi__info_main(&s,x,y,comp); - fseek(f,pos,SEEK_SET); - return r; -} - -STBIDEF int stbi_is_16_bit(char const *filename) -{ - FILE *f = stbi__fopen(filename, "rb"); - int result; - if (!f) return stbi__err("can't fopen", "Unable to open file"); - result = stbi_is_16_bit_from_file(f); - fclose(f); - return result; -} - -STBIDEF int stbi_is_16_bit_from_file(FILE *f) -{ - int r; - stbi__context s; - long pos = ftell(f); - stbi__start_file(&s, f); - r = stbi__is_16_main(&s); - fseek(f,pos,SEEK_SET); - return r; -} -#endif // !STBI_NO_STDIO - -STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp) -{ - stbi__context s; - stbi__start_mem(&s,buffer,len); - return stbi__info_main(&s,x,y,comp); -} - -STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *c, void *user, int *x, int *y, int *comp) -{ - stbi__context s; - stbi__start_callbacks(&s, (stbi_io_callbacks *) c, user); - return stbi__info_main(&s,x,y,comp); -} - -STBIDEF int stbi_is_16_bit_from_memory(stbi_uc const *buffer, int len) -{ - stbi__context s; - stbi__start_mem(&s,buffer,len); - return stbi__is_16_main(&s); -} - -STBIDEF int stbi_is_16_bit_from_callbacks(stbi_io_callbacks const *c, void *user) -{ - stbi__context s; - stbi__start_callbacks(&s, (stbi_io_callbacks *) c, user); - return stbi__is_16_main(&s); -} - -#endif // STB_IMAGE_IMPLEMENTATION - -/* - revision history: - 2.20 (2019-02-07) support utf8 filenames in Windows; fix warnings and platform ifdefs - 2.19 (2018-02-11) fix warning - 2.18 (2018-01-30) fix warnings - 2.17 (2018-01-29) change sbti__shiftsigned to avoid clang -O2 bug - 1-bit BMP - *_is_16_bit api - avoid warnings - 2.16 (2017-07-23) all functions have 16-bit variants; - STBI_NO_STDIO works again; - compilation fixes; - fix rounding in unpremultiply; - optimize vertical flip; - disable raw_len validation; - documentation fixes - 2.15 (2017-03-18) fix png-1,2,4 bug; now all Imagenet JPGs decode; - warning fixes; disable run-time SSE detection on gcc; - uniform handling of optional "return" values; - thread-safe initialization of zlib tables - 2.14 (2017-03-03) remove deprecated STBI_JPEG_OLD; fixes for Imagenet JPGs - 2.13 (2016-11-29) add 16-bit API, only supported for PNG right now - 2.12 (2016-04-02) fix typo in 2.11 PSD fix that caused crashes - 2.11 (2016-04-02) allocate large structures on the stack - remove white matting for transparent PSD - fix reported channel count for PNG & BMP - re-enable SSE2 in non-gcc 64-bit - support RGB-formatted JPEG - read 16-bit PNGs (only as 8-bit) - 2.10 (2016-01-22) avoid warning introduced in 2.09 by STBI_REALLOC_SIZED - 2.09 (2016-01-16) allow comments in PNM files - 16-bit-per-pixel TGA (not bit-per-component) - info() for TGA could break due to .hdr handling - info() for BMP to shares code instead of sloppy parse - can use STBI_REALLOC_SIZED if allocator doesn't support realloc - code cleanup - 2.08 (2015-09-13) fix to 2.07 cleanup, reading RGB PSD as RGBA - 2.07 (2015-09-13) fix compiler warnings - partial animated GIF support - limited 16-bpc PSD support - #ifdef unused functions - bug with < 92 byte PIC,PNM,HDR,TGA - 2.06 (2015-04-19) fix bug where PSD returns wrong '*comp' value - 2.05 (2015-04-19) fix bug in progressive JPEG handling, fix warning - 2.04 (2015-04-15) try to re-enable SIMD on MinGW 64-bit - 2.03 (2015-04-12) extra corruption checking (mmozeiko) - stbi_set_flip_vertically_on_load (nguillemot) - fix NEON support; fix mingw support - 2.02 (2015-01-19) fix incorrect assert, fix warning - 2.01 (2015-01-17) fix various warnings; suppress SIMD on gcc 32-bit without -msse2 - 2.00b (2014-12-25) fix STBI_MALLOC in progressive JPEG - 2.00 (2014-12-25) optimize JPG, including x86 SSE2 & NEON SIMD (ryg) - progressive JPEG (stb) - PGM/PPM support (Ken Miller) - STBI_MALLOC,STBI_REALLOC,STBI_FREE - GIF bugfix -- seemingly never worked - STBI_NO_*, STBI_ONLY_* - 1.48 (2014-12-14) fix incorrectly-named assert() - 1.47 (2014-12-14) 1/2/4-bit PNG support, both direct and paletted (Omar Cornut & stb) - optimize PNG (ryg) - fix bug in interlaced PNG with user-specified channel count (stb) - 1.46 (2014-08-26) - fix broken tRNS chunk (colorkey-style transparency) in non-paletted PNG - 1.45 (2014-08-16) - fix MSVC-ARM internal compiler error by wrapping malloc - 1.44 (2014-08-07) - various warning fixes from Ronny Chevalier - 1.43 (2014-07-15) - fix MSVC-only compiler problem in code changed in 1.42 - 1.42 (2014-07-09) - don't define _CRT_SECURE_NO_WARNINGS (affects user code) - fixes to stbi__cleanup_jpeg path - added STBI_ASSERT to avoid requiring assert.h - 1.41 (2014-06-25) - fix search&replace from 1.36 that messed up comments/error messages - 1.40 (2014-06-22) - fix gcc struct-initialization warning - 1.39 (2014-06-15) - fix to TGA optimization when req_comp != number of components in TGA; - fix to GIF loading because BMP wasn't rewinding (whoops, no GIFs in my test suite) - add support for BMP version 5 (more ignored fields) - 1.38 (2014-06-06) - suppress MSVC warnings on integer casts truncating values - fix accidental rename of 'skip' field of I/O - 1.37 (2014-06-04) - remove duplicate typedef - 1.36 (2014-06-03) - convert to header file single-file library - if de-iphone isn't set, load iphone images color-swapped instead of returning NULL - 1.35 (2014-05-27) - various warnings - fix broken STBI_SIMD path - fix bug where stbi_load_from_file no longer left file pointer in correct place - fix broken non-easy path for 32-bit BMP (possibly never used) - TGA optimization by Arseny Kapoulkine - 1.34 (unknown) - use STBI_NOTUSED in stbi__resample_row_generic(), fix one more leak in tga failure case - 1.33 (2011-07-14) - make stbi_is_hdr work in STBI_NO_HDR (as specified), minor compiler-friendly improvements - 1.32 (2011-07-13) - support for "info" function for all supported filetypes (SpartanJ) - 1.31 (2011-06-20) - a few more leak fixes, bug in PNG handling (SpartanJ) - 1.30 (2011-06-11) - added ability to load files via callbacks to accomidate custom input streams (Ben Wenger) - removed deprecated format-specific test/load functions - removed support for installable file formats (stbi_loader) -- would have been broken for IO callbacks anyway - error cases in bmp and tga give messages and don't leak (Raymond Barbiero, grisha) - fix inefficiency in decoding 32-bit BMP (David Woo) - 1.29 (2010-08-16) - various warning fixes from Aurelien Pocheville - 1.28 (2010-08-01) - fix bug in GIF palette transparency (SpartanJ) - 1.27 (2010-08-01) - cast-to-stbi_uc to fix warnings - 1.26 (2010-07-24) - fix bug in file buffering for PNG reported by SpartanJ - 1.25 (2010-07-17) - refix trans_data warning (Won Chun) - 1.24 (2010-07-12) - perf improvements reading from files on platforms with lock-heavy fgetc() - minor perf improvements for jpeg - deprecated type-specific functions so we'll get feedback if they're needed - attempt to fix trans_data warning (Won Chun) - 1.23 fixed bug in iPhone support - 1.22 (2010-07-10) - removed image *writing* support - stbi_info support from Jetro Lauha - GIF support from Jean-Marc Lienher - iPhone PNG-extensions from James Brown - warning-fixes from Nicolas Schulz and Janez Zemva (i.stbi__err. Janez (U+017D)emva) - 1.21 fix use of 'stbi_uc' in header (reported by jon blow) - 1.20 added support for Softimage PIC, by Tom Seddon - 1.19 bug in interlaced PNG corruption check (found by ryg) - 1.18 (2008-08-02) - fix a threading bug (local mutable static) - 1.17 support interlaced PNG - 1.16 major bugfix - stbi__convert_format converted one too many pixels - 1.15 initialize some fields for thread safety - 1.14 fix threadsafe conversion bug - header-file-only version (#define STBI_HEADER_FILE_ONLY before including) - 1.13 threadsafe - 1.12 const qualifiers in the API - 1.11 Support installable IDCT, colorspace conversion routines - 1.10 Fixes for 64-bit (don't use "unsigned long") - optimized upsampling by Fabian "ryg" Giesen - 1.09 Fix format-conversion for PSD code (bad global variables!) - 1.08 Thatcher Ulrich's PSD code integrated by Nicolas Schulz - 1.07 attempt to fix C++ warning/errors again - 1.06 attempt to fix C++ warning/errors again - 1.05 fix TGA loading to return correct *comp and use good luminance calc - 1.04 default float alpha is 1, not 255; use 'void *' for stbi_image_free - 1.03 bugfixes to STBI_NO_STDIO, STBI_NO_HDR - 1.02 support for (subset of) HDR files, float interface for preferred access to them - 1.01 fix bug: possible bug in handling right-side up bmps... not sure - fix bug: the stbi__bmp_load() and stbi__tga_load() functions didn't work at all - 1.00 interface to zlib that skips zlib header - 0.99 correct handling of alpha in palette - 0.98 TGA loader by lonesock; dynamically add loaders (untested) - 0.97 jpeg errors on too large a file; also catch another malloc failure - 0.96 fix detection of invalid v value - particleman@mollyrocket forum - 0.95 during header scan, seek to markers in case of padding - 0.94 STBI_NO_STDIO to disable stdio usage; rename all #defines the same - 0.93 handle jpegtran output; verbose errors - 0.92 read 4,8,16,24,32-bit BMP files of several formats - 0.91 output 24-bit Windows 3.0 BMP files - 0.90 fix a few more warnings; bump version number to approach 1.0 - 0.61 bugfixes due to Marc LeBlanc, Christopher Lloyd - 0.60 fix compiling as c++ - 0.59 fix warnings: merge Dave Moore's -Wall fixes - 0.58 fix bug: zlib uncompressed mode len/nlen was wrong endian - 0.57 fix bug: jpg last huffman symbol before marker was >9 bits but less than 16 available - 0.56 fix bug: zlib uncompressed mode len vs. nlen - 0.55 fix bug: restart_interval not initialized to 0 - 0.54 allow NULL for 'int *comp' - 0.53 fix bug in png 3->4; speedup png decoding - 0.52 png handles req_comp=3,4 directly; minor cleanup; jpeg comments - 0.51 obey req_comp requests, 1-component jpegs return as 1-component, - on 'test' only check type, not whether we support this variant - 0.50 (2006-11-19) - first released version -*/ - - -/* ------------------------------------------------------------------------------- -This software is available under 2 licenses -- choose whichever you prefer. ------------------------------------------------------------------------------- -ALTERNATIVE A - MIT License -Copyright (c) 2017 Sean Barrett -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. ------------------------------------------------------------------------------- -ALTERNATIVE B - Public Domain (www.unlicense.org) -This is free and unencumbered software released into the public domain. -Anyone is free to copy, modify, publish, use, compile, sell, or distribute this -software, either in source code form or as a compiled binary, for any purpose, -commercial or non-commercial, and by any means. -In jurisdictions that recognize copyright laws, the author or authors of this -software dedicate any and all copyright interest in the software to the public -domain. We make this dedication for the benefit of the public at large and to -the detriment of our heirs and successors. We intend this dedication to be an -overt act of relinquishment in perpetuity of all present and future rights to -this software under copyright law. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------- -*/ +/* stb_image - v2.22 - public domain image loader - http://nothings.org/stb + no warranty implied; use at your own risk + + Do this: + #define STB_IMAGE_IMPLEMENTATION + before you include this file in *one* C or C++ file to create the implementation. + + // i.e. it should look like this: + #include ... + #include ... + #include ... + #define STB_IMAGE_IMPLEMENTATION + #include "stb_image.h" + + You can #define STBI_ASSERT(x) before the #include to avoid using assert.h. + And #define STBI_MALLOC, STBI_REALLOC, and STBI_FREE to avoid using malloc,realloc,free + + + QUICK NOTES: + Primarily of interest to game developers and other people who can + avoid problematic images and only need the trivial interface + + JPEG baseline & progressive (12 bpc/arithmetic not supported, same as stock IJG lib) + PNG 1/2/4/8/16-bit-per-channel + + TGA (not sure what subset, if a subset) + BMP non-1bpp, non-RLE + PSD (composited view only, no extra channels, 8/16 bit-per-channel) + + GIF (*comp always reports as 4-channel) + HDR (radiance rgbE format) + PIC (Softimage PIC) + PNM (PPM and PGM binary only) + + Animated GIF still needs a proper API, but here's one way to do it: + http://gist.github.com/urraka/685d9a6340b26b830d49 + + - decode from memory or through FILE (define STBI_NO_STDIO to remove code) + - decode from arbitrary I/O callbacks + - SIMD acceleration on x86/x64 (SSE2) and ARM (NEON) + + Full documentation under "DOCUMENTATION" below. + + +LICENSE + + See end of file for license information. + +RECENT REVISION HISTORY: + + 2.22 (2019-03-04) gif fixes, fix warnings + 2.21 (2019-02-25) fix typo in comment + 2.20 (2019-02-07) support utf8 filenames in Windows; fix warnings and platform ifdefs + 2.19 (2018-02-11) fix warning + 2.18 (2018-01-30) fix warnings + 2.17 (2018-01-29) bugfix, 1-bit BMP, 16-bitness query, fix warnings + 2.16 (2017-07-23) all functions have 16-bit variants; optimizations; bugfixes + 2.15 (2017-03-18) fix png-1,2,4; all Imagenet JPGs; no runtime SSE detection on GCC + 2.14 (2017-03-03) remove deprecated STBI_JPEG_OLD; fixes for Imagenet JPGs + 2.13 (2016-12-04) experimental 16-bit API, only for PNG so far; fixes + 2.12 (2016-04-02) fix typo in 2.11 PSD fix that caused crashes + 2.11 (2016-04-02) 16-bit PNGS; enable SSE2 in non-gcc x64 + RGB-format JPEG; remove white matting in PSD; + allocate large structures on the stack; + correct channel count for PNG & BMP + 2.10 (2016-01-22) avoid warning introduced in 2.09 + 2.09 (2016-01-16) 16-bit TGA; comments in PNM files; STBI_REALLOC_SIZED + + See end of file for full revision history. + + + ============================ Contributors ========================= + + Image formats Extensions, features + Sean Barrett (jpeg, png, bmp) Jetro Lauha (stbi_info) + Nicolas Schulz (hdr, psd) Martin "SpartanJ" Golini (stbi_info) + Jonathan Dummer (tga) James "moose2000" Brown (iPhone PNG) + Jean-Marc Lienher (gif) Ben "Disch" Wenger (io callbacks) + Tom Seddon (pic) Omar Cornut (1/2/4-bit PNG) + Thatcher Ulrich (psd) Nicolas Guillemot (vertical flip) + Ken Miller (pgm, ppm) Richard Mitton (16-bit PSD) + github:urraka (animated gif) Junggon Kim (PNM comments) + Christopher Forseth (animated gif) Daniel Gibson (16-bit TGA) + socks-the-fox (16-bit PNG) + Jeremy Sawicki (handle all ImageNet JPGs) + Optimizations & bugfixes Mikhail Morozov (1-bit BMP) + Fabian "ryg" Giesen Anael Seghezzi (is-16-bit query) + Arseny Kapoulkine + John-Mark Allen + Carmelo J Fdez-Aguera + + Bug & warning fixes + Marc LeBlanc David Woo Guillaume George Martins Mozeiko + Christpher Lloyd Jerry Jansson Joseph Thomson Phil Jordan + Dave Moore Roy Eltham Hayaki Saito Nathan Reed + Won Chun Luke Graham Johan Duparc Nick Verigakis + the Horde3D community Thomas Ruf Ronny Chevalier github:rlyeh + Janez Zemva John Bartholomew Michal Cichon github:romigrou + Jonathan Blow Ken Hamada Tero Hanninen github:svdijk + Laurent Gomila Cort Stratton Sergio Gonzalez github:snagar + Aruelien Pocheville Thibault Reuille Cass Everitt github:Zelex + Ryamond Barbiero Paul Du Bois Engin Manap github:grim210 + Aldo Culquicondor Philipp Wiesemann Dale Weiler github:sammyhw + Oriol Ferrer Mesia Josh Tobin Matthew Gregan github:phprus + Julian Raschke Gregory Mullen Baldur Karlsson github:poppolopoppo + Christian Floisand Kevin Schmidt JR Smith github:darealshinji + Blazej Dariusz Roszkowski github:Michaelangel007 +*/ + +#ifndef STBI_INCLUDE_STB_IMAGE_H +#define STBI_INCLUDE_STB_IMAGE_H + +// DOCUMENTATION +// +// Limitations: +// - no 12-bit-per-channel JPEG +// - no JPEGs with arithmetic coding +// - GIF always returns *comp=4 +// +// Basic usage (see HDR discussion below for HDR usage): +// int x,y,n; +// unsigned char *data = stbi_load(filename, &x, &y, &n, 0); +// // ... process data if not NULL ... +// // ... x = width, y = height, n = # 8-bit components per pixel ... +// // ... replace '0' with '1'..'4' to force that many components per pixel +// // ... but 'n' will always be the number that it would have been if you said 0 +// stbi_image_free(data) +// +// Standard parameters: +// int *x -- outputs image width in pixels +// int *y -- outputs image height in pixels +// int *channels_in_file -- outputs # of image components in image file +// int desired_channels -- if non-zero, # of image components requested in result +// +// The return value from an image loader is an 'unsigned char *' which points +// to the pixel data, or NULL on an allocation failure or if the image is +// corrupt or invalid. The pixel data consists of *y scanlines of *x pixels, +// with each pixel consisting of N interleaved 8-bit components; the first +// pixel pointed to is top-left-most in the image. There is no padding between +// image scanlines or between pixels, regardless of format. The number of +// components N is 'desired_channels' if desired_channels is non-zero, or +// *channels_in_file otherwise. If desired_channels is non-zero, +// *channels_in_file has the number of components that _would_ have been +// output otherwise. E.g. if you set desired_channels to 4, you will always +// get RGBA output, but you can check *channels_in_file to see if it's trivially +// opaque because e.g. there were only 3 channels in the source image. +// +// An output image with N components has the following components interleaved +// in this order in each pixel: +// +// N=#comp components +// 1 grey +// 2 grey, alpha +// 3 red, green, blue +// 4 red, green, blue, alpha +// +// If image loading fails for any reason, the return value will be NULL, +// and *x, *y, *channels_in_file will be unchanged. The function +// stbi_failure_reason() can be queried for an extremely brief, end-user +// unfriendly explanation of why the load failed. Define STBI_NO_FAILURE_STRINGS +// to avoid compiling these strings at all, and STBI_FAILURE_USERMSG to get slightly +// more user-friendly ones. +// +// Paletted PNG, BMP, GIF, and PIC images are automatically depalettized. +// +// =========================================================================== +// +// UNICODE: +// +// If compiling for Windows and you wish to use Unicode filenames, compile +// with +// #define STBI_WINDOWS_UTF8 +// and pass utf8-encoded filenames. Call stbi_convert_wchar_to_utf8 to convert +// Windows wchar_t filenames to utf8. +// +// =========================================================================== +// +// Philosophy +// +// stb libraries are designed with the following priorities: +// +// 1. easy to use +// 2. easy to maintain +// 3. good performance +// +// Sometimes I let "good performance" creep up in priority over "easy to maintain", +// and for best performance I may provide less-easy-to-use APIs that give higher +// performance, in addition to the easy-to-use ones. Nevertheless, it's important +// to keep in mind that from the standpoint of you, a client of this library, +// all you care about is #1 and #3, and stb libraries DO NOT emphasize #3 above all. +// +// Some secondary priorities arise directly from the first two, some of which +// provide more explicit reasons why performance can't be emphasized. +// +// - Portable ("ease of use") +// - Small source code footprint ("easy to maintain") +// - No dependencies ("ease of use") +// +// =========================================================================== +// +// I/O callbacks +// +// I/O callbacks allow you to read from arbitrary sources, like packaged +// files or some other source. Data read from callbacks are processed +// through a small internal buffer (currently 128 bytes) to try to reduce +// overhead. +// +// The three functions you must define are "read" (reads some bytes of data), +// "skip" (skips some bytes of data), "eof" (reports if the stream is at the end). +// +// =========================================================================== +// +// SIMD support +// +// The JPEG decoder will try to automatically use SIMD kernels on x86 when +// supported by the compiler. For ARM Neon support, you must explicitly +// request it. +// +// (The old do-it-yourself SIMD API is no longer supported in the current +// code.) +// +// On x86, SSE2 will automatically be used when available based on a run-time +// test; if not, the generic C versions are used as a fall-back. On ARM targets, +// the typical path is to have separate builds for NEON and non-NEON devices +// (at least this is true for iOS and Android). Therefore, the NEON support is +// toggled by a build flag: define STBI_NEON to get NEON loops. +// +// If for some reason you do not want to use any of SIMD code, or if +// you have issues compiling it, you can disable it entirely by +// defining STBI_NO_SIMD. +// +// =========================================================================== +// +// HDR image support (disable by defining STBI_NO_HDR) +// +// stb_image supports loading HDR images in general, and currently the Radiance +// .HDR file format specifically. You can still load any file through the existing +// interface; if you attempt to load an HDR file, it will be automatically remapped +// to LDR, assuming gamma 2.2 and an arbitrary scale factor defaulting to 1; +// both of these constants can be reconfigured through this interface: +// +// stbi_hdr_to_ldr_gamma(2.2f); +// stbi_hdr_to_ldr_scale(1.0f); +// +// (note, do not use _inverse_ constants; stbi_image will invert them +// appropriately). +// +// Additionally, there is a new, parallel interface for loading files as +// (linear) floats to preserve the full dynamic range: +// +// float *data = stbi_loadf(filename, &x, &y, &n, 0); +// +// If you load LDR images through this interface, those images will +// be promoted to floating point values, run through the inverse of +// constants corresponding to the above: +// +// stbi_ldr_to_hdr_scale(1.0f); +// stbi_ldr_to_hdr_gamma(2.2f); +// +// Finally, given a filename (or an open file or memory block--see header +// file for details) containing image data, you can query for the "most +// appropriate" interface to use (that is, whether the image is HDR or +// not), using: +// +// stbi_is_hdr(char *filename); +// +// =========================================================================== +// +// iPhone PNG support: +// +// By default we convert iphone-formatted PNGs back to RGB, even though +// they are internally encoded differently. You can disable this conversion +// by calling stbi_convert_iphone_png_to_rgb(0), in which case +// you will always just get the native iphone "format" through (which +// is BGR stored in RGB). +// +// Call stbi_set_unpremultiply_on_load(1) as well to force a divide per +// pixel to remove any premultiplied alpha *only* if the image file explicitly +// says there's premultiplied data (currently only happens in iPhone images, +// and only if iPhone convert-to-rgb processing is on). +// +// =========================================================================== +// +// ADDITIONAL CONFIGURATION +// +// - You can suppress implementation of any of the decoders to reduce +// your code footprint by #defining one or more of the following +// symbols before creating the implementation. +// +// STBI_NO_JPEG +// STBI_NO_PNG +// STBI_NO_BMP +// STBI_NO_PSD +// STBI_NO_TGA +// STBI_NO_GIF +// STBI_NO_HDR +// STBI_NO_PIC +// STBI_NO_PNM (.ppm and .pgm) +// +// - You can request *only* certain decoders and suppress all other ones +// (this will be more forward-compatible, as addition of new decoders +// doesn't require you to disable them explicitly): +// +// STBI_ONLY_JPEG +// STBI_ONLY_PNG +// STBI_ONLY_BMP +// STBI_ONLY_PSD +// STBI_ONLY_TGA +// STBI_ONLY_GIF +// STBI_ONLY_HDR +// STBI_ONLY_PIC +// STBI_ONLY_PNM (.ppm and .pgm) +// +// - If you use STBI_NO_PNG (or _ONLY_ without PNG), and you still +// want the zlib decoder to be available, #define STBI_SUPPORT_ZLIB +// + + +#ifndef STBI_NO_STDIO +#include +#endif // STBI_NO_STDIO + +#define STBI_VERSION 1 + +enum +{ + STBI_default = 0, // only used for desired_channels + + STBI_grey = 1, + STBI_grey_alpha = 2, + STBI_rgb = 3, + STBI_rgb_alpha = 4 +}; + +#include +typedef unsigned char stbi_uc; +typedef unsigned short stbi_us; + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef STBIDEF +#ifdef STB_IMAGE_STATIC +#define STBIDEF static +#else +#define STBIDEF extern +#endif +#endif + +////////////////////////////////////////////////////////////////////////////// +// +// PRIMARY API - works on images of any type +// + +// +// load image by filename, open file, or memory buffer +// + +typedef struct +{ + int (*read) (void *user,char *data,int size); // fill 'data' with 'size' bytes. return number of bytes actually read + void (*skip) (void *user,int n); // skip the next 'n' bytes, or 'unget' the last -n bytes if negative + int (*eof) (void *user); // returns nonzero if we are at end of file/data +} stbi_io_callbacks; + +//////////////////////////////////// +// +// 8-bits-per-channel interface +// + +STBIDEF stbi_uc *stbi_load_from_memory (stbi_uc const *buffer, int len , int *x, int *y, int *channels_in_file, int desired_channels); +STBIDEF stbi_uc *stbi_load_from_callbacks(stbi_io_callbacks const *clbk , void *user, int *x, int *y, int *channels_in_file, int desired_channels); + +#ifndef STBI_NO_STDIO +STBIDEF stbi_uc *stbi_load (char const *filename, int *x, int *y, int *channels_in_file, int desired_channels); +STBIDEF stbi_uc *stbi_load_from_file (FILE *f, int *x, int *y, int *channels_in_file, int desired_channels); +// for stbi_load_from_file, file pointer is left pointing immediately after image +#endif + +#ifndef STBI_NO_GIF +STBIDEF stbi_uc *stbi_load_gif_from_memory(stbi_uc const *buffer, int len, int **delays, int *x, int *y, int *z, int *comp, int req_comp); +#endif + +#ifdef STBI_WINDOWS_UTF8 +STBIDEF int stbi_convert_wchar_to_utf8(char *buffer, size_t bufferlen, const wchar_t* input); +#endif + +//////////////////////////////////// +// +// 16-bits-per-channel interface +// + +STBIDEF stbi_us *stbi_load_16_from_memory (stbi_uc const *buffer, int len, int *x, int *y, int *channels_in_file, int desired_channels); +STBIDEF stbi_us *stbi_load_16_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *channels_in_file, int desired_channels); + +#ifndef STBI_NO_STDIO +STBIDEF stbi_us *stbi_load_16 (char const *filename, int *x, int *y, int *channels_in_file, int desired_channels); +STBIDEF stbi_us *stbi_load_from_file_16(FILE *f, int *x, int *y, int *channels_in_file, int desired_channels); +#endif + +//////////////////////////////////// +// +// float-per-channel interface +// +#ifndef STBI_NO_LINEAR + STBIDEF float *stbi_loadf_from_memory (stbi_uc const *buffer, int len, int *x, int *y, int *channels_in_file, int desired_channels); + STBIDEF float *stbi_loadf_from_callbacks (stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *channels_in_file, int desired_channels); + + #ifndef STBI_NO_STDIO + STBIDEF float *stbi_loadf (char const *filename, int *x, int *y, int *channels_in_file, int desired_channels); + STBIDEF float *stbi_loadf_from_file (FILE *f, int *x, int *y, int *channels_in_file, int desired_channels); + #endif +#endif + +#ifndef STBI_NO_HDR + STBIDEF void stbi_hdr_to_ldr_gamma(float gamma); + STBIDEF void stbi_hdr_to_ldr_scale(float scale); +#endif // STBI_NO_HDR + +#ifndef STBI_NO_LINEAR + STBIDEF void stbi_ldr_to_hdr_gamma(float gamma); + STBIDEF void stbi_ldr_to_hdr_scale(float scale); +#endif // STBI_NO_LINEAR + +// stbi_is_hdr is always defined, but always returns false if STBI_NO_HDR +STBIDEF int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user); +STBIDEF int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len); +#ifndef STBI_NO_STDIO +STBIDEF int stbi_is_hdr (char const *filename); +STBIDEF int stbi_is_hdr_from_file(FILE *f); +#endif // STBI_NO_STDIO + + +// get a VERY brief reason for failure +// NOT THREADSAFE +STBIDEF const char *stbi_failure_reason (void); + +// free the loaded image -- this is just free() +STBIDEF void stbi_image_free (void *retval_from_stbi_load); + +// get image dimensions & components without fully decoding +STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp); +STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp); +STBIDEF int stbi_is_16_bit_from_memory(stbi_uc const *buffer, int len); +STBIDEF int stbi_is_16_bit_from_callbacks(stbi_io_callbacks const *clbk, void *user); + +#ifndef STBI_NO_STDIO +STBIDEF int stbi_info (char const *filename, int *x, int *y, int *comp); +STBIDEF int stbi_info_from_file (FILE *f, int *x, int *y, int *comp); +STBIDEF int stbi_is_16_bit (char const *filename); +STBIDEF int stbi_is_16_bit_from_file(FILE *f); +#endif + + + +// for image formats that explicitly notate that they have premultiplied alpha, +// we just return the colors as stored in the file. set this flag to force +// unpremultiplication. results are undefined if the unpremultiply overflow. +STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply); + +// indicate whether we should process iphone images back to canonical format, +// or just pass them through "as-is" +STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert); + +// flip the image vertically, so the first pixel in the output array is the bottom left +STBIDEF void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip); + +// ZLIB client - used by PNG, available for other purposes + +STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen); +STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header); +STBIDEF char *stbi_zlib_decode_malloc(const char *buffer, int len, int *outlen); +STBIDEF int stbi_zlib_decode_buffer(char *obuffer, int olen, const char *ibuffer, int ilen); + +STBIDEF char *stbi_zlib_decode_noheader_malloc(const char *buffer, int len, int *outlen); +STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen); + + +#ifdef __cplusplus +} +#endif + +// +// +//// end header file ///////////////////////////////////////////////////// +#endif // STBI_INCLUDE_STB_IMAGE_H + +#ifdef STB_IMAGE_IMPLEMENTATION + +#if defined(STBI_ONLY_JPEG) || defined(STBI_ONLY_PNG) || defined(STBI_ONLY_BMP) \ + || defined(STBI_ONLY_TGA) || defined(STBI_ONLY_GIF) || defined(STBI_ONLY_PSD) \ + || defined(STBI_ONLY_HDR) || defined(STBI_ONLY_PIC) || defined(STBI_ONLY_PNM) \ + || defined(STBI_ONLY_ZLIB) + #ifndef STBI_ONLY_JPEG + #define STBI_NO_JPEG + #endif + #ifndef STBI_ONLY_PNG + #define STBI_NO_PNG + #endif + #ifndef STBI_ONLY_BMP + #define STBI_NO_BMP + #endif + #ifndef STBI_ONLY_PSD + #define STBI_NO_PSD + #endif + #ifndef STBI_ONLY_TGA + #define STBI_NO_TGA + #endif + #ifndef STBI_ONLY_GIF + #define STBI_NO_GIF + #endif + #ifndef STBI_ONLY_HDR + #define STBI_NO_HDR + #endif + #ifndef STBI_ONLY_PIC + #define STBI_NO_PIC + #endif + #ifndef STBI_ONLY_PNM + #define STBI_NO_PNM + #endif +#endif + +#if defined(STBI_NO_PNG) && !defined(STBI_SUPPORT_ZLIB) && !defined(STBI_NO_ZLIB) +#define STBI_NO_ZLIB +#endif + + +#include +#include // ptrdiff_t on osx +#include +#include +#include + +#if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR) +#include // ldexp, pow +#endif + +#ifndef STBI_NO_STDIO +#include +#endif + +#ifndef STBI_ASSERT +#include +#define STBI_ASSERT(x) assert(x) +#endif + +#ifdef __cplusplus +#define STBI_EXTERN extern "C" +#else +#define STBI_EXTERN extern +#endif + + +#ifndef _MSC_VER + #ifdef __cplusplus + #define stbi_inline inline + #else + #define stbi_inline + #endif +#else + #define stbi_inline __forceinline +#endif + + +#ifdef _MSC_VER +typedef unsigned short stbi__uint16; +typedef signed short stbi__int16; +typedef unsigned int stbi__uint32; +typedef signed int stbi__int32; +#else +#include +typedef uint16_t stbi__uint16; +typedef int16_t stbi__int16; +typedef uint32_t stbi__uint32; +typedef int32_t stbi__int32; +#endif + +// should produce compiler error if size is wrong +typedef unsigned char validate_uint32[sizeof(stbi__uint32)==4 ? 1 : -1]; + +#ifdef _MSC_VER +#define STBI_NOTUSED(v) (void)(v) +#else +#define STBI_NOTUSED(v) (void)sizeof(v) +#endif + +#ifdef _MSC_VER +#define STBI_HAS_LROTL +#endif + +#ifdef STBI_HAS_LROTL + #define stbi_lrot(x,y) _lrotl(x,y) +#else + #define stbi_lrot(x,y) (((x) << (y)) | ((x) >> (32 - (y)))) +#endif + +#if defined(STBI_MALLOC) && defined(STBI_FREE) && (defined(STBI_REALLOC) || defined(STBI_REALLOC_SIZED)) +// ok +#elif !defined(STBI_MALLOC) && !defined(STBI_FREE) && !defined(STBI_REALLOC) && !defined(STBI_REALLOC_SIZED) +// ok +#else +#error "Must define all or none of STBI_MALLOC, STBI_FREE, and STBI_REALLOC (or STBI_REALLOC_SIZED)." +#endif + +#ifndef STBI_MALLOC +#define STBI_MALLOC(sz) malloc(sz) +#define STBI_REALLOC(p,newsz) realloc(p,newsz) +#define STBI_FREE(p) free(p) +#endif + +#ifndef STBI_REALLOC_SIZED +#define STBI_REALLOC_SIZED(p,oldsz,newsz) STBI_REALLOC(p,newsz) +#endif + +// x86/x64 detection +#if defined(__x86_64__) || defined(_M_X64) +#define STBI__X64_TARGET +#elif defined(__i386) || defined(_M_IX86) +#define STBI__X86_TARGET +#endif + +#if defined(__GNUC__) && defined(STBI__X86_TARGET) && !defined(__SSE2__) && !defined(STBI_NO_SIMD) +// gcc doesn't support sse2 intrinsics unless you compile with -msse2, +// which in turn means it gets to use SSE2 everywhere. This is unfortunate, +// but previous attempts to provide the SSE2 functions with runtime +// detection caused numerous issues. The way architecture extensions are +// exposed in GCC/Clang is, sadly, not really suited for one-file libs. +// New behavior: if compiled with -msse2, we use SSE2 without any +// detection; if not, we don't use it at all. +#define STBI_NO_SIMD +#endif + +#if defined(__MINGW32__) && defined(STBI__X86_TARGET) && !defined(STBI_MINGW_ENABLE_SSE2) && !defined(STBI_NO_SIMD) +// Note that __MINGW32__ doesn't actually mean 32-bit, so we have to avoid STBI__X64_TARGET +// +// 32-bit MinGW wants ESP to be 16-byte aligned, but this is not in the +// Windows ABI and VC++ as well as Windows DLLs don't maintain that invariant. +// As a result, enabling SSE2 on 32-bit MinGW is dangerous when not +// simultaneously enabling "-mstackrealign". +// +// See https://github.com/nothings/stb/issues/81 for more information. +// +// So default to no SSE2 on 32-bit MinGW. If you've read this far and added +// -mstackrealign to your build settings, feel free to #define STBI_MINGW_ENABLE_SSE2. +#define STBI_NO_SIMD +#endif + +#if !defined(STBI_NO_SIMD) && (defined(STBI__X86_TARGET) || defined(STBI__X64_TARGET)) +#define STBI_SSE2 +#include + +#ifdef _MSC_VER + +#if _MSC_VER >= 1400 // not VC6 +#include // __cpuid +static int stbi__cpuid3(void) +{ + int info[4]; + __cpuid(info,1); + return info[3]; +} +#else +static int stbi__cpuid3(void) +{ + int res; + __asm { + mov eax,1 + cpuid + mov res,edx + } + return res; +} +#endif + +#define STBI_SIMD_ALIGN(type, name) __declspec(align(16)) type name + +#if !defined(STBI_NO_JPEG) && defined(STBI_SSE2) +static int stbi__sse2_available(void) +{ + int info3 = stbi__cpuid3(); + return ((info3 >> 26) & 1) != 0; +} +#endif + +#else // assume GCC-style if not VC++ +#define STBI_SIMD_ALIGN(type, name) type name __attribute__((aligned(16))) + +#if !defined(STBI_NO_JPEG) && defined(STBI_SSE2) +static int stbi__sse2_available(void) +{ + // If we're even attempting to compile this on GCC/Clang, that means + // -msse2 is on, which means the compiler is allowed to use SSE2 + // instructions at will, and so are we. + return 1; +} +#endif + +#endif +#endif + +// ARM NEON +#if defined(STBI_NO_SIMD) && defined(STBI_NEON) +#undef STBI_NEON +#endif + +#ifdef STBI_NEON +#include +// assume GCC or Clang on ARM targets +#define STBI_SIMD_ALIGN(type, name) type name __attribute__((aligned(16))) +#endif + +#ifndef STBI_SIMD_ALIGN +#define STBI_SIMD_ALIGN(type, name) type name +#endif + +/////////////////////////////////////////////// +// +// stbi__context struct and start_xxx functions + +// stbi__context structure is our basic context used by all images, so it +// contains all the IO context, plus some basic image information +typedef struct +{ + stbi__uint32 img_x, img_y; + int img_n, img_out_n; + + stbi_io_callbacks io; + void *io_user_data; + + int read_from_callbacks; + int buflen; + stbi_uc buffer_start[128]; + + stbi_uc *img_buffer, *img_buffer_end; + stbi_uc *img_buffer_original, *img_buffer_original_end; +} stbi__context; + + +static void stbi__refill_buffer(stbi__context *s); + +// initialize a memory-decode context +static void stbi__start_mem(stbi__context *s, stbi_uc const *buffer, int len) +{ + s->io.read = NULL; + s->read_from_callbacks = 0; + s->img_buffer = s->img_buffer_original = (stbi_uc *) buffer; + s->img_buffer_end = s->img_buffer_original_end = (stbi_uc *) buffer+len; +} + +// initialize a callback-based context +static void stbi__start_callbacks(stbi__context *s, stbi_io_callbacks *c, void *user) +{ + s->io = *c; + s->io_user_data = user; + s->buflen = sizeof(s->buffer_start); + s->read_from_callbacks = 1; + s->img_buffer_original = s->buffer_start; + stbi__refill_buffer(s); + s->img_buffer_original_end = s->img_buffer_end; +} + +#ifndef STBI_NO_STDIO + +static int stbi__stdio_read(void *user, char *data, int size) +{ + return (int) fread(data,1,size,(FILE*) user); +} + +static void stbi__stdio_skip(void *user, int n) +{ + fseek((FILE*) user, n, SEEK_CUR); +} + +static int stbi__stdio_eof(void *user) +{ + return feof((FILE*) user); +} + +static stbi_io_callbacks stbi__stdio_callbacks = +{ + stbi__stdio_read, + stbi__stdio_skip, + stbi__stdio_eof, +}; + +static void stbi__start_file(stbi__context *s, FILE *f) +{ + stbi__start_callbacks(s, &stbi__stdio_callbacks, (void *) f); +} + +//static void stop_file(stbi__context *s) { } + +#endif // !STBI_NO_STDIO + +static void stbi__rewind(stbi__context *s) +{ + // conceptually rewind SHOULD rewind to the beginning of the stream, + // but we just rewind to the beginning of the initial buffer, because + // we only use it after doing 'test', which only ever looks at at most 92 bytes + s->img_buffer = s->img_buffer_original; + s->img_buffer_end = s->img_buffer_original_end; +} + +enum +{ + STBI_ORDER_RGB, + STBI_ORDER_BGR +}; + +typedef struct +{ + int bits_per_channel; + int num_channels; + int channel_order; +} stbi__result_info; + +#ifndef STBI_NO_JPEG +static int stbi__jpeg_test(stbi__context *s); +static void *stbi__jpeg_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); +static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp); +#endif + +#ifndef STBI_NO_PNG +static int stbi__png_test(stbi__context *s); +static void *stbi__png_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); +static int stbi__png_info(stbi__context *s, int *x, int *y, int *comp); +static int stbi__png_is16(stbi__context *s); +#endif + +#ifndef STBI_NO_BMP +static int stbi__bmp_test(stbi__context *s); +static void *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); +static int stbi__bmp_info(stbi__context *s, int *x, int *y, int *comp); +#endif + +#ifndef STBI_NO_TGA +static int stbi__tga_test(stbi__context *s); +static void *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); +static int stbi__tga_info(stbi__context *s, int *x, int *y, int *comp); +#endif + +#ifndef STBI_NO_PSD +static int stbi__psd_test(stbi__context *s); +static void *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri, int bpc); +static int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp); +static int stbi__psd_is16(stbi__context *s); +#endif + +#ifndef STBI_NO_HDR +static int stbi__hdr_test(stbi__context *s); +static float *stbi__hdr_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); +static int stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp); +#endif + +#ifndef STBI_NO_PIC +static int stbi__pic_test(stbi__context *s); +static void *stbi__pic_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); +static int stbi__pic_info(stbi__context *s, int *x, int *y, int *comp); +#endif + +#ifndef STBI_NO_GIF +static int stbi__gif_test(stbi__context *s); +static void *stbi__gif_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); +static void *stbi__load_gif_main(stbi__context *s, int **delays, int *x, int *y, int *z, int *comp, int req_comp); +static int stbi__gif_info(stbi__context *s, int *x, int *y, int *comp); +#endif + +#ifndef STBI_NO_PNM +static int stbi__pnm_test(stbi__context *s); +static void *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); +static int stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp); +#endif + +// this is not threadsafe +static const char *stbi__g_failure_reason; + +STBIDEF const char *stbi_failure_reason(void) +{ + return stbi__g_failure_reason; +} + +static int stbi__err(const char *str) +{ + stbi__g_failure_reason = str; + return 0; +} + +static void *stbi__malloc(size_t size) +{ + return STBI_MALLOC(size); +} + +// stb_image uses ints pervasively, including for offset calculations. +// therefore the largest decoded image size we can support with the +// current code, even on 64-bit targets, is INT_MAX. this is not a +// significant limitation for the intended use case. +// +// we do, however, need to make sure our size calculations don't +// overflow. hence a few helper functions for size calculations that +// multiply integers together, making sure that they're non-negative +// and no overflow occurs. + +// return 1 if the sum is valid, 0 on overflow. +// negative terms are considered invalid. +static int stbi__addsizes_valid(int a, int b) +{ + if (b < 0) return 0; + // now 0 <= b <= INT_MAX, hence also + // 0 <= INT_MAX - b <= INTMAX. + // And "a + b <= INT_MAX" (which might overflow) is the + // same as a <= INT_MAX - b (no overflow) + return a <= INT_MAX - b; +} + +// returns 1 if the product is valid, 0 on overflow. +// negative factors are considered invalid. +static int stbi__mul2sizes_valid(int a, int b) +{ + if (a < 0 || b < 0) return 0; + if (b == 0) return 1; // mul-by-0 is always safe + // portable way to check for no overflows in a*b + return a <= INT_MAX/b; +} + +// returns 1 if "a*b + add" has no negative terms/factors and doesn't overflow +static int stbi__mad2sizes_valid(int a, int b, int add) +{ + return stbi__mul2sizes_valid(a, b) && stbi__addsizes_valid(a*b, add); +} + +// returns 1 if "a*b*c + add" has no negative terms/factors and doesn't overflow +static int stbi__mad3sizes_valid(int a, int b, int c, int add) +{ + return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a*b, c) && + stbi__addsizes_valid(a*b*c, add); +} + +// returns 1 if "a*b*c*d + add" has no negative terms/factors and doesn't overflow +#if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR) +static int stbi__mad4sizes_valid(int a, int b, int c, int d, int add) +{ + return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a*b, c) && + stbi__mul2sizes_valid(a*b*c, d) && stbi__addsizes_valid(a*b*c*d, add); +} +#endif + +// mallocs with size overflow checking +static void *stbi__malloc_mad2(int a, int b, int add) +{ + if (!stbi__mad2sizes_valid(a, b, add)) return NULL; + return stbi__malloc(a*b + add); +} + +static void *stbi__malloc_mad3(int a, int b, int c, int add) +{ + if (!stbi__mad3sizes_valid(a, b, c, add)) return NULL; + return stbi__malloc(a*b*c + add); +} + +#if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR) +static void *stbi__malloc_mad4(int a, int b, int c, int d, int add) +{ + if (!stbi__mad4sizes_valid(a, b, c, d, add)) return NULL; + return stbi__malloc(a*b*c*d + add); +} +#endif + +// stbi__err - error +// stbi__errpf - error returning pointer to float +// stbi__errpuc - error returning pointer to unsigned char + +#ifdef STBI_NO_FAILURE_STRINGS + #define stbi__err(x,y) 0 +#elif defined(STBI_FAILURE_USERMSG) + #define stbi__err(x,y) stbi__err(y) +#else + #define stbi__err(x,y) stbi__err(x) +#endif + +#define stbi__errpf(x,y) ((float *)(size_t) (stbi__err(x,y)?NULL:NULL)) +#define stbi__errpuc(x,y) ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL)) + +STBIDEF void stbi_image_free(void *retval_from_stbi_load) +{ + STBI_FREE(retval_from_stbi_load); +} + +#ifndef STBI_NO_LINEAR +static float *stbi__ldr_to_hdr(stbi_uc *data, int x, int y, int comp); +#endif + +#ifndef STBI_NO_HDR +static stbi_uc *stbi__hdr_to_ldr(float *data, int x, int y, int comp); +#endif + +static int stbi__vertically_flip_on_load = 0; + +STBIDEF void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip) +{ + stbi__vertically_flip_on_load = flag_true_if_should_flip; +} + +static void *stbi__load_main(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri, int bpc) +{ + memset(ri, 0, sizeof(*ri)); // make sure it's initialized if we add new fields + ri->bits_per_channel = 8; // default is 8 so most paths don't have to be changed + ri->channel_order = STBI_ORDER_RGB; // all current input & output are this, but this is here so we can add BGR order + ri->num_channels = 0; + + #ifndef STBI_NO_JPEG + if (stbi__jpeg_test(s)) return stbi__jpeg_load(s,x,y,comp,req_comp, ri); + #endif + #ifndef STBI_NO_PNG + if (stbi__png_test(s)) return stbi__png_load(s,x,y,comp,req_comp, ri); + #endif + #ifndef STBI_NO_BMP + if (stbi__bmp_test(s)) return stbi__bmp_load(s,x,y,comp,req_comp, ri); + #endif + #ifndef STBI_NO_GIF + if (stbi__gif_test(s)) return stbi__gif_load(s,x,y,comp,req_comp, ri); + #endif + #ifndef STBI_NO_PSD + if (stbi__psd_test(s)) return stbi__psd_load(s,x,y,comp,req_comp, ri, bpc); + #endif + #ifndef STBI_NO_PIC + if (stbi__pic_test(s)) return stbi__pic_load(s,x,y,comp,req_comp, ri); + #endif + #ifndef STBI_NO_PNM + if (stbi__pnm_test(s)) return stbi__pnm_load(s,x,y,comp,req_comp, ri); + #endif + + #ifndef STBI_NO_HDR + if (stbi__hdr_test(s)) { + float *hdr = stbi__hdr_load(s, x,y,comp,req_comp, ri); + return stbi__hdr_to_ldr(hdr, *x, *y, req_comp ? req_comp : *comp); + } + #endif + + #ifndef STBI_NO_TGA + // test tga last because it's a crappy test! + if (stbi__tga_test(s)) + return stbi__tga_load(s,x,y,comp,req_comp, ri); + #endif + + return stbi__errpuc("unknown image type", "Image not of any known type, or corrupt"); +} + +static stbi_uc *stbi__convert_16_to_8(stbi__uint16 *orig, int w, int h, int channels) +{ + int i; + int img_len = w * h * channels; + stbi_uc *reduced; + + reduced = (stbi_uc *) stbi__malloc(img_len); + if (reduced == NULL) return stbi__errpuc("outofmem", "Out of memory"); + + for (i = 0; i < img_len; ++i) + reduced[i] = (stbi_uc)((orig[i] >> 8) & 0xFF); // top half of each byte is sufficient approx of 16->8 bit scaling + + STBI_FREE(orig); + return reduced; +} + +static stbi__uint16 *stbi__convert_8_to_16(stbi_uc *orig, int w, int h, int channels) +{ + int i; + int img_len = w * h * channels; + stbi__uint16 *enlarged; + + enlarged = (stbi__uint16 *) stbi__malloc(img_len*2); + if (enlarged == NULL) return (stbi__uint16 *) stbi__errpuc("outofmem", "Out of memory"); + + for (i = 0; i < img_len; ++i) + enlarged[i] = (stbi__uint16)((orig[i] << 8) + orig[i]); // replicate to high and low byte, maps 0->0, 255->0xffff + + STBI_FREE(orig); + return enlarged; +} + +static void stbi__vertical_flip(void *image, int w, int h, int bytes_per_pixel) +{ + int row; + size_t bytes_per_row = (size_t)w * bytes_per_pixel; + stbi_uc temp[2048]; + stbi_uc *bytes = (stbi_uc *)image; + + for (row = 0; row < (h>>1); row++) { + stbi_uc *row0 = bytes + row*bytes_per_row; + stbi_uc *row1 = bytes + (h - row - 1)*bytes_per_row; + // swap row0 with row1 + size_t bytes_left = bytes_per_row; + while (bytes_left) { + size_t bytes_copy = (bytes_left < sizeof(temp)) ? bytes_left : sizeof(temp); + memcpy(temp, row0, bytes_copy); + memcpy(row0, row1, bytes_copy); + memcpy(row1, temp, bytes_copy); + row0 += bytes_copy; + row1 += bytes_copy; + bytes_left -= bytes_copy; + } + } +} + +#ifndef STBI_NO_GIF +static void stbi__vertical_flip_slices(void *image, int w, int h, int z, int bytes_per_pixel) +{ + int slice; + int slice_size = w * h * bytes_per_pixel; + + stbi_uc *bytes = (stbi_uc *)image; + for (slice = 0; slice < z; ++slice) { + stbi__vertical_flip(bytes, w, h, bytes_per_pixel); + bytes += slice_size; + } +} +#endif + +static unsigned char *stbi__load_and_postprocess_8bit(stbi__context *s, int *x, int *y, int *comp, int req_comp) +{ + stbi__result_info ri; + void *result = stbi__load_main(s, x, y, comp, req_comp, &ri, 8); + + if (result == NULL) + return NULL; + + if (ri.bits_per_channel != 8) { + STBI_ASSERT(ri.bits_per_channel == 16); + result = stbi__convert_16_to_8((stbi__uint16 *) result, *x, *y, req_comp == 0 ? *comp : req_comp); + ri.bits_per_channel = 8; + } + + // @TODO: move stbi__convert_format to here + + if (stbi__vertically_flip_on_load) { + int channels = req_comp ? req_comp : *comp; + stbi__vertical_flip(result, *x, *y, channels * sizeof(stbi_uc)); + } + + return (unsigned char *) result; +} + +static stbi__uint16 *stbi__load_and_postprocess_16bit(stbi__context *s, int *x, int *y, int *comp, int req_comp) +{ + stbi__result_info ri; + void *result = stbi__load_main(s, x, y, comp, req_comp, &ri, 16); + + if (result == NULL) + return NULL; + + if (ri.bits_per_channel != 16) { + STBI_ASSERT(ri.bits_per_channel == 8); + result = stbi__convert_8_to_16((stbi_uc *) result, *x, *y, req_comp == 0 ? *comp : req_comp); + ri.bits_per_channel = 16; + } + + // @TODO: move stbi__convert_format16 to here + // @TODO: special case RGB-to-Y (and RGBA-to-YA) for 8-bit-to-16-bit case to keep more precision + + if (stbi__vertically_flip_on_load) { + int channels = req_comp ? req_comp : *comp; + stbi__vertical_flip(result, *x, *y, channels * sizeof(stbi__uint16)); + } + + return (stbi__uint16 *) result; +} + +#if !defined(STBI_NO_HDR) && !defined(STBI_NO_LINEAR) +static void stbi__float_postprocess(float *result, int *x, int *y, int *comp, int req_comp) +{ + if (stbi__vertically_flip_on_load && result != NULL) { + int channels = req_comp ? req_comp : *comp; + stbi__vertical_flip(result, *x, *y, channels * sizeof(float)); + } +} +#endif + +#ifndef STBI_NO_STDIO + +#if defined(_MSC_VER) && defined(STBI_WINDOWS_UTF8) +STBI_EXTERN __declspec(dllimport) int __stdcall MultiByteToWideChar(unsigned int cp, unsigned long flags, const char *str, int cbmb, wchar_t *widestr, int cchwide); +STBI_EXTERN __declspec(dllimport) int __stdcall WideCharToMultiByte(unsigned int cp, unsigned long flags, const wchar_t *widestr, int cchwide, char *str, int cbmb, const char *defchar, int *used_default); +#endif + +#if defined(_MSC_VER) && defined(STBI_WINDOWS_UTF8) +STBIDEF int stbi_convert_wchar_to_utf8(char *buffer, size_t bufferlen, const wchar_t* input) +{ + return WideCharToMultiByte(65001 /* UTF8 */, 0, input, -1, buffer, (int) bufferlen, NULL, NULL); +} +#endif + +static FILE *stbi__fopen(char const *filename, char const *mode) +{ + FILE *f; +#if defined(_MSC_VER) && defined(STBI_WINDOWS_UTF8) + wchar_t wMode[64]; + wchar_t wFilename[1024]; + if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, filename, -1, wFilename, sizeof(wFilename))) + return 0; + + if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, mode, -1, wMode, sizeof(wMode))) + return 0; + +#if _MSC_VER >= 1400 + if (0 != _wfopen_s(&f, wFilename, wMode)) + f = 0; +#else + f = _wfopen(wFilename, wMode); +#endif + +#elif defined(_MSC_VER) && _MSC_VER >= 1400 + if (0 != fopen_s(&f, filename, mode)) + f=0; +#else + f = fopen(filename, mode); +#endif + return f; +} + + +STBIDEF stbi_uc *stbi_load(char const *filename, int *x, int *y, int *comp, int req_comp) +{ + FILE *f = stbi__fopen(filename, "rb"); + unsigned char *result; + if (!f) return stbi__errpuc("can't fopen", "Unable to open file"); + result = stbi_load_from_file(f,x,y,comp,req_comp); + fclose(f); + return result; +} + +STBIDEF stbi_uc *stbi_load_from_file(FILE *f, int *x, int *y, int *comp, int req_comp) +{ + unsigned char *result; + stbi__context s; + stbi__start_file(&s,f); + result = stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp); + if (result) { + // need to 'unget' all the characters in the IO buffer + fseek(f, - (int) (s.img_buffer_end - s.img_buffer), SEEK_CUR); + } + return result; +} + +STBIDEF stbi__uint16 *stbi_load_from_file_16(FILE *f, int *x, int *y, int *comp, int req_comp) +{ + stbi__uint16 *result; + stbi__context s; + stbi__start_file(&s,f); + result = stbi__load_and_postprocess_16bit(&s,x,y,comp,req_comp); + if (result) { + // need to 'unget' all the characters in the IO buffer + fseek(f, - (int) (s.img_buffer_end - s.img_buffer), SEEK_CUR); + } + return result; +} + +STBIDEF stbi_us *stbi_load_16(char const *filename, int *x, int *y, int *comp, int req_comp) +{ + FILE *f = stbi__fopen(filename, "rb"); + stbi__uint16 *result; + if (!f) return (stbi_us *) stbi__errpuc("can't fopen", "Unable to open file"); + result = stbi_load_from_file_16(f,x,y,comp,req_comp); + fclose(f); + return result; +} + + +#endif //!STBI_NO_STDIO + +STBIDEF stbi_us *stbi_load_16_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *channels_in_file, int desired_channels) +{ + stbi__context s; + stbi__start_mem(&s,buffer,len); + return stbi__load_and_postprocess_16bit(&s,x,y,channels_in_file,desired_channels); +} + +STBIDEF stbi_us *stbi_load_16_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *channels_in_file, int desired_channels) +{ + stbi__context s; + stbi__start_callbacks(&s, (stbi_io_callbacks *)clbk, user); + return stbi__load_and_postprocess_16bit(&s,x,y,channels_in_file,desired_channels); +} + +STBIDEF stbi_uc *stbi_load_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp) +{ + stbi__context s; + stbi__start_mem(&s,buffer,len); + return stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp); +} + +STBIDEF stbi_uc *stbi_load_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp) +{ + stbi__context s; + stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user); + return stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp); +} + +#ifndef STBI_NO_GIF +STBIDEF stbi_uc *stbi_load_gif_from_memory(stbi_uc const *buffer, int len, int **delays, int *x, int *y, int *z, int *comp, int req_comp) +{ + unsigned char *result; + stbi__context s; + stbi__start_mem(&s,buffer,len); + + result = (unsigned char*) stbi__load_gif_main(&s, delays, x, y, z, comp, req_comp); + if (stbi__vertically_flip_on_load) { + stbi__vertical_flip_slices( result, *x, *y, *z, *comp ); + } + + return result; +} +#endif + +#ifndef STBI_NO_LINEAR +static float *stbi__loadf_main(stbi__context *s, int *x, int *y, int *comp, int req_comp) +{ + unsigned char *data; + #ifndef STBI_NO_HDR + if (stbi__hdr_test(s)) { + stbi__result_info ri; + float *hdr_data = stbi__hdr_load(s,x,y,comp,req_comp, &ri); + if (hdr_data) + stbi__float_postprocess(hdr_data,x,y,comp,req_comp); + return hdr_data; + } + #endif + data = stbi__load_and_postprocess_8bit(s, x, y, comp, req_comp); + if (data) + return stbi__ldr_to_hdr(data, *x, *y, req_comp ? req_comp : *comp); + return stbi__errpf("unknown image type", "Image not of any known type, or corrupt"); +} + +STBIDEF float *stbi_loadf_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp) +{ + stbi__context s; + stbi__start_mem(&s,buffer,len); + return stbi__loadf_main(&s,x,y,comp,req_comp); +} + +STBIDEF float *stbi_loadf_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp) +{ + stbi__context s; + stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user); + return stbi__loadf_main(&s,x,y,comp,req_comp); +} + +#ifndef STBI_NO_STDIO +STBIDEF float *stbi_loadf(char const *filename, int *x, int *y, int *comp, int req_comp) +{ + float *result; + FILE *f = stbi__fopen(filename, "rb"); + if (!f) return stbi__errpf("can't fopen", "Unable to open file"); + result = stbi_loadf_from_file(f,x,y,comp,req_comp); + fclose(f); + return result; +} + +STBIDEF float *stbi_loadf_from_file(FILE *f, int *x, int *y, int *comp, int req_comp) +{ + stbi__context s; + stbi__start_file(&s,f); + return stbi__loadf_main(&s,x,y,comp,req_comp); +} +#endif // !STBI_NO_STDIO + +#endif // !STBI_NO_LINEAR + +// these is-hdr-or-not is defined independent of whether STBI_NO_LINEAR is +// defined, for API simplicity; if STBI_NO_LINEAR is defined, it always +// reports false! + +STBIDEF int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len) +{ + #ifndef STBI_NO_HDR + stbi__context s; + stbi__start_mem(&s,buffer,len); + return stbi__hdr_test(&s); + #else + STBI_NOTUSED(buffer); + STBI_NOTUSED(len); + return 0; + #endif +} + +#ifndef STBI_NO_STDIO +STBIDEF int stbi_is_hdr (char const *filename) +{ + FILE *f = stbi__fopen(filename, "rb"); + int result=0; + if (f) { + result = stbi_is_hdr_from_file(f); + fclose(f); + } + return result; +} + +STBIDEF int stbi_is_hdr_from_file(FILE *f) +{ + #ifndef STBI_NO_HDR + long pos = ftell(f); + int res; + stbi__context s; + stbi__start_file(&s,f); + res = stbi__hdr_test(&s); + fseek(f, pos, SEEK_SET); + return res; + #else + STBI_NOTUSED(f); + return 0; + #endif +} +#endif // !STBI_NO_STDIO + +STBIDEF int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user) +{ + #ifndef STBI_NO_HDR + stbi__context s; + stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user); + return stbi__hdr_test(&s); + #else + STBI_NOTUSED(clbk); + STBI_NOTUSED(user); + return 0; + #endif +} + +#ifndef STBI_NO_LINEAR +static float stbi__l2h_gamma=2.2f, stbi__l2h_scale=1.0f; + +STBIDEF void stbi_ldr_to_hdr_gamma(float gamma) { stbi__l2h_gamma = gamma; } +STBIDEF void stbi_ldr_to_hdr_scale(float scale) { stbi__l2h_scale = scale; } +#endif + +static float stbi__h2l_gamma_i=1.0f/2.2f, stbi__h2l_scale_i=1.0f; + +STBIDEF void stbi_hdr_to_ldr_gamma(float gamma) { stbi__h2l_gamma_i = 1/gamma; } +STBIDEF void stbi_hdr_to_ldr_scale(float scale) { stbi__h2l_scale_i = 1/scale; } + + +////////////////////////////////////////////////////////////////////////////// +// +// Common code used by all image loaders +// + +enum +{ + STBI__SCAN_load=0, + STBI__SCAN_type, + STBI__SCAN_header +}; + +static void stbi__refill_buffer(stbi__context *s) +{ + int n = (s->io.read)(s->io_user_data,(char*)s->buffer_start,s->buflen); + if (n == 0) { + // at end of file, treat same as if from memory, but need to handle case + // where s->img_buffer isn't pointing to safe memory, e.g. 0-byte file + s->read_from_callbacks = 0; + s->img_buffer = s->buffer_start; + s->img_buffer_end = s->buffer_start+1; + *s->img_buffer = 0; + } else { + s->img_buffer = s->buffer_start; + s->img_buffer_end = s->buffer_start + n; + } +} + +stbi_inline static stbi_uc stbi__get8(stbi__context *s) +{ + if (s->img_buffer < s->img_buffer_end) + return *s->img_buffer++; + if (s->read_from_callbacks) { + stbi__refill_buffer(s); + return *s->img_buffer++; + } + return 0; +} + +stbi_inline static int stbi__at_eof(stbi__context *s) +{ + if (s->io.read) { + if (!(s->io.eof)(s->io_user_data)) return 0; + // if feof() is true, check if buffer = end + // special case: we've only got the special 0 character at the end + if (s->read_from_callbacks == 0) return 1; + } + + return s->img_buffer >= s->img_buffer_end; +} + +static void stbi__skip(stbi__context *s, int n) +{ + if (n < 0) { + s->img_buffer = s->img_buffer_end; + return; + } + if (s->io.read) { + int blen = (int) (s->img_buffer_end - s->img_buffer); + if (blen < n) { + s->img_buffer = s->img_buffer_end; + (s->io.skip)(s->io_user_data, n - blen); + return; + } + } + s->img_buffer += n; +} + +static int stbi__getn(stbi__context *s, stbi_uc *buffer, int n) +{ + if (s->io.read) { + int blen = (int) (s->img_buffer_end - s->img_buffer); + if (blen < n) { + int res, count; + + memcpy(buffer, s->img_buffer, blen); + + count = (s->io.read)(s->io_user_data, (char*) buffer + blen, n - blen); + res = (count == (n-blen)); + s->img_buffer = s->img_buffer_end; + return res; + } + } + + if (s->img_buffer+n <= s->img_buffer_end) { + memcpy(buffer, s->img_buffer, n); + s->img_buffer += n; + return 1; + } else + return 0; +} + +static int stbi__get16be(stbi__context *s) +{ + int z = stbi__get8(s); + return (z << 8) + stbi__get8(s); +} + +static stbi__uint32 stbi__get32be(stbi__context *s) +{ + stbi__uint32 z = stbi__get16be(s); + return (z << 16) + stbi__get16be(s); +} + +#if defined(STBI_NO_BMP) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) +// nothing +#else +static int stbi__get16le(stbi__context *s) +{ + int z = stbi__get8(s); + return z + (stbi__get8(s) << 8); +} +#endif + +#ifndef STBI_NO_BMP +static stbi__uint32 stbi__get32le(stbi__context *s) +{ + stbi__uint32 z = stbi__get16le(s); + return z + (stbi__get16le(s) << 16); +} +#endif + +#define STBI__BYTECAST(x) ((stbi_uc) ((x) & 255)) // truncate int to byte without warnings + + +////////////////////////////////////////////////////////////////////////////// +// +// generic converter from built-in img_n to req_comp +// individual types do this automatically as much as possible (e.g. jpeg +// does all cases internally since it needs to colorspace convert anyway, +// and it never has alpha, so very few cases ). png can automatically +// interleave an alpha=255 channel, but falls back to this for other cases +// +// assume data buffer is malloced, so malloc a new one and free that one +// only failure mode is malloc failing + +static stbi_uc stbi__compute_y(int r, int g, int b) +{ + return (stbi_uc) (((r*77) + (g*150) + (29*b)) >> 8); +} + +static unsigned char *stbi__convert_format(unsigned char *data, int img_n, int req_comp, unsigned int x, unsigned int y) +{ + int i,j; + unsigned char *good; + + if (req_comp == img_n) return data; + STBI_ASSERT(req_comp >= 1 && req_comp <= 4); + + good = (unsigned char *) stbi__malloc_mad3(req_comp, x, y, 0); + if (good == NULL) { + STBI_FREE(data); + return stbi__errpuc("outofmem", "Out of memory"); + } + + for (j=0; j < (int) y; ++j) { + unsigned char *src = data + j * x * img_n ; + unsigned char *dest = good + j * x * req_comp; + + #define STBI__COMBO(a,b) ((a)*8+(b)) + #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) + // convert source image with img_n components to one with req_comp components; + // avoid switch per pixel, so use switch per scanline and massive macros + switch (STBI__COMBO(img_n, req_comp)) { + STBI__CASE(1,2) { dest[0]=src[0]; dest[1]=255; } break; + STBI__CASE(1,3) { dest[0]=dest[1]=dest[2]=src[0]; } break; + STBI__CASE(1,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=255; } break; + STBI__CASE(2,1) { dest[0]=src[0]; } break; + STBI__CASE(2,3) { dest[0]=dest[1]=dest[2]=src[0]; } break; + STBI__CASE(2,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=src[1]; } break; + STBI__CASE(3,4) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2];dest[3]=255; } break; + STBI__CASE(3,1) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); } break; + STBI__CASE(3,2) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); dest[1] = 255; } break; + STBI__CASE(4,1) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); } break; + STBI__CASE(4,2) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); dest[1] = src[3]; } break; + STBI__CASE(4,3) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2]; } break; + default: STBI_ASSERT(0); + } + #undef STBI__CASE + } + + STBI_FREE(data); + return good; +} + +static stbi__uint16 stbi__compute_y_16(int r, int g, int b) +{ + return (stbi__uint16) (((r*77) + (g*150) + (29*b)) >> 8); +} + +static stbi__uint16 *stbi__convert_format16(stbi__uint16 *data, int img_n, int req_comp, unsigned int x, unsigned int y) +{ + int i,j; + stbi__uint16 *good; + + if (req_comp == img_n) return data; + STBI_ASSERT(req_comp >= 1 && req_comp <= 4); + + good = (stbi__uint16 *) stbi__malloc(req_comp * x * y * 2); + if (good == NULL) { + STBI_FREE(data); + return (stbi__uint16 *) stbi__errpuc("outofmem", "Out of memory"); + } + + for (j=0; j < (int) y; ++j) { + stbi__uint16 *src = data + j * x * img_n ; + stbi__uint16 *dest = good + j * x * req_comp; + + #define STBI__COMBO(a,b) ((a)*8+(b)) + #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) + // convert source image with img_n components to one with req_comp components; + // avoid switch per pixel, so use switch per scanline and massive macros + switch (STBI__COMBO(img_n, req_comp)) { + STBI__CASE(1,2) { dest[0]=src[0]; dest[1]=0xffff; } break; + STBI__CASE(1,3) { dest[0]=dest[1]=dest[2]=src[0]; } break; + STBI__CASE(1,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=0xffff; } break; + STBI__CASE(2,1) { dest[0]=src[0]; } break; + STBI__CASE(2,3) { dest[0]=dest[1]=dest[2]=src[0]; } break; + STBI__CASE(2,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=src[1]; } break; + STBI__CASE(3,4) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2];dest[3]=0xffff; } break; + STBI__CASE(3,1) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); } break; + STBI__CASE(3,2) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); dest[1] = 0xffff; } break; + STBI__CASE(4,1) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); } break; + STBI__CASE(4,2) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); dest[1] = src[3]; } break; + STBI__CASE(4,3) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2]; } break; + default: STBI_ASSERT(0); + } + #undef STBI__CASE + } + + STBI_FREE(data); + return good; +} + +#ifndef STBI_NO_LINEAR +static float *stbi__ldr_to_hdr(stbi_uc *data, int x, int y, int comp) +{ + int i,k,n; + float *output; + if (!data) return NULL; + output = (float *) stbi__malloc_mad4(x, y, comp, sizeof(float), 0); + if (output == NULL) { STBI_FREE(data); return stbi__errpf("outofmem", "Out of memory"); } + // compute number of non-alpha components + if (comp & 1) n = comp; else n = comp-1; + for (i=0; i < x*y; ++i) { + for (k=0; k < n; ++k) { + output[i*comp + k] = (float) (pow(data[i*comp+k]/255.0f, stbi__l2h_gamma) * stbi__l2h_scale); + } + } + if (n < comp) { + for (i=0; i < x*y; ++i) { + output[i*comp + n] = data[i*comp + n]/255.0f; + } + } + STBI_FREE(data); + return output; +} +#endif + +#ifndef STBI_NO_HDR +#define stbi__float2int(x) ((int) (x)) +static stbi_uc *stbi__hdr_to_ldr(float *data, int x, int y, int comp) +{ + int i,k,n; + stbi_uc *output; + if (!data) return NULL; + output = (stbi_uc *) stbi__malloc_mad3(x, y, comp, 0); + if (output == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); } + // compute number of non-alpha components + if (comp & 1) n = comp; else n = comp-1; + for (i=0; i < x*y; ++i) { + for (k=0; k < n; ++k) { + float z = (float) pow(data[i*comp+k]*stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f; + if (z < 0) z = 0; + if (z > 255) z = 255; + output[i*comp + k] = (stbi_uc) stbi__float2int(z); + } + if (k < comp) { + float z = data[i*comp+k] * 255 + 0.5f; + if (z < 0) z = 0; + if (z > 255) z = 255; + output[i*comp + k] = (stbi_uc) stbi__float2int(z); + } + } + STBI_FREE(data); + return output; +} +#endif + +////////////////////////////////////////////////////////////////////////////// +// +// "baseline" JPEG/JFIF decoder +// +// simple implementation +// - doesn't support delayed output of y-dimension +// - simple interface (only one output format: 8-bit interleaved RGB) +// - doesn't try to recover corrupt jpegs +// - doesn't allow partial loading, loading multiple at once +// - still fast on x86 (copying globals into locals doesn't help x86) +// - allocates lots of intermediate memory (full size of all components) +// - non-interleaved case requires this anyway +// - allows good upsampling (see next) +// high-quality +// - upsampled channels are bilinearly interpolated, even across blocks +// - quality integer IDCT derived from IJG's 'slow' +// performance +// - fast huffman; reasonable integer IDCT +// - some SIMD kernels for common paths on targets with SSE2/NEON +// - uses a lot of intermediate memory, could cache poorly + +#ifndef STBI_NO_JPEG + +// huffman decoding acceleration +#define FAST_BITS 9 // larger handles more cases; smaller stomps less cache + +typedef struct +{ + stbi_uc fast[1 << FAST_BITS]; + // weirdly, repacking this into AoS is a 10% speed loss, instead of a win + stbi__uint16 code[256]; + stbi_uc values[256]; + stbi_uc size[257]; + unsigned int maxcode[18]; + int delta[17]; // old 'firstsymbol' - old 'firstcode' +} stbi__huffman; + +typedef struct +{ + stbi__context *s; + stbi__huffman huff_dc[4]; + stbi__huffman huff_ac[4]; + stbi__uint16 dequant[4][64]; + stbi__int16 fast_ac[4][1 << FAST_BITS]; + +// sizes for components, interleaved MCUs + int img_h_max, img_v_max; + int img_mcu_x, img_mcu_y; + int img_mcu_w, img_mcu_h; + +// definition of jpeg image component + struct + { + int id; + int h,v; + int tq; + int hd,ha; + int dc_pred; + + int x,y,w2,h2; + stbi_uc *data; + void *raw_data, *raw_coeff; + stbi_uc *linebuf; + short *coeff; // progressive only + int coeff_w, coeff_h; // number of 8x8 coefficient blocks + } img_comp[4]; + + stbi__uint32 code_buffer; // jpeg entropy-coded buffer + int code_bits; // number of valid bits + unsigned char marker; // marker seen while filling entropy buffer + int nomore; // flag if we saw a marker so must stop + + int progressive; + int spec_start; + int spec_end; + int succ_high; + int succ_low; + int eob_run; + int jfif; + int app14_color_transform; // Adobe APP14 tag + int rgb; + + int scan_n, order[4]; + int restart_interval, todo; + +// kernels + void (*idct_block_kernel)(stbi_uc *out, int out_stride, short data[64]); + void (*YCbCr_to_RGB_kernel)(stbi_uc *out, const stbi_uc *y, const stbi_uc *pcb, const stbi_uc *pcr, int count, int step); + stbi_uc *(*resample_row_hv_2_kernel)(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs); +} stbi__jpeg; + +static int stbi__build_huffman(stbi__huffman *h, int *count) +{ + int i,j,k=0; + unsigned int code; + // build size list for each symbol (from JPEG spec) + for (i=0; i < 16; ++i) + for (j=0; j < count[i]; ++j) + h->size[k++] = (stbi_uc) (i+1); + h->size[k] = 0; + + // compute actual symbols (from jpeg spec) + code = 0; + k = 0; + for(j=1; j <= 16; ++j) { + // compute delta to add to code to compute symbol id + h->delta[j] = k - code; + if (h->size[k] == j) { + while (h->size[k] == j) + h->code[k++] = (stbi__uint16) (code++); + if (code-1 >= (1u << j)) return stbi__err("bad code lengths","Corrupt JPEG"); + } + // compute largest code + 1 for this size, preshifted as needed later + h->maxcode[j] = code << (16-j); + code <<= 1; + } + h->maxcode[j] = 0xffffffff; + + // build non-spec acceleration table; 255 is flag for not-accelerated + memset(h->fast, 255, 1 << FAST_BITS); + for (i=0; i < k; ++i) { + int s = h->size[i]; + if (s <= FAST_BITS) { + int c = h->code[i] << (FAST_BITS-s); + int m = 1 << (FAST_BITS-s); + for (j=0; j < m; ++j) { + h->fast[c+j] = (stbi_uc) i; + } + } + } + return 1; +} + +// build a table that decodes both magnitude and value of small ACs in +// one go. +static void stbi__build_fast_ac(stbi__int16 *fast_ac, stbi__huffman *h) +{ + int i; + for (i=0; i < (1 << FAST_BITS); ++i) { + stbi_uc fast = h->fast[i]; + fast_ac[i] = 0; + if (fast < 255) { + int rs = h->values[fast]; + int run = (rs >> 4) & 15; + int magbits = rs & 15; + int len = h->size[fast]; + + if (magbits && len + magbits <= FAST_BITS) { + // magnitude code followed by receive_extend code + int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits); + int m = 1 << (magbits - 1); + if (k < m) k += (~0U << magbits) + 1; + // if the result is small enough, we can fit it in fast_ac table + if (k >= -128 && k <= 127) + fast_ac[i] = (stbi__int16) ((k * 256) + (run * 16) + (len + magbits)); + } + } + } +} + +static void stbi__grow_buffer_unsafe(stbi__jpeg *j) +{ + do { + unsigned int b = j->nomore ? 0 : stbi__get8(j->s); + if (b == 0xff) { + int c = stbi__get8(j->s); + while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes + if (c != 0) { + j->marker = (unsigned char) c; + j->nomore = 1; + return; + } + } + j->code_buffer |= b << (24 - j->code_bits); + j->code_bits += 8; + } while (j->code_bits <= 24); +} + +// (1 << n) - 1 +static const stbi__uint32 stbi__bmask[17]={0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535}; + +// decode a jpeg huffman value from the bitstream +stbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg *j, stbi__huffman *h) +{ + unsigned int temp; + int c,k; + + if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); + + // look at the top FAST_BITS and determine what symbol ID it is, + // if the code is <= FAST_BITS + c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1); + k = h->fast[c]; + if (k < 255) { + int s = h->size[k]; + if (s > j->code_bits) + return -1; + j->code_buffer <<= s; + j->code_bits -= s; + return h->values[k]; + } + + // naive test is to shift the code_buffer down so k bits are + // valid, then test against maxcode. To speed this up, we've + // preshifted maxcode left so that it has (16-k) 0s at the + // end; in other words, regardless of the number of bits, it + // wants to be compared against something shifted to have 16; + // that way we don't need to shift inside the loop. + temp = j->code_buffer >> 16; + for (k=FAST_BITS+1 ; ; ++k) + if (temp < h->maxcode[k]) + break; + if (k == 17) { + // error! code not found + j->code_bits -= 16; + return -1; + } + + if (k > j->code_bits) + return -1; + + // convert the huffman code to the symbol id + c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k]; + STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]); + + // convert the id to a symbol + j->code_bits -= k; + j->code_buffer <<= k; + return h->values[c]; +} + +// bias[n] = (-1<code_bits < n) stbi__grow_buffer_unsafe(j); + + sgn = (stbi__int32)j->code_buffer >> 31; // sign bit is always in MSB + k = stbi_lrot(j->code_buffer, n); + STBI_ASSERT(n >= 0 && n < (int) (sizeof(stbi__bmask)/sizeof(*stbi__bmask))); + j->code_buffer = k & ~stbi__bmask[n]; + k &= stbi__bmask[n]; + j->code_bits -= n; + return k + (stbi__jbias[n] & ~sgn); +} + +// get some unsigned bits +stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg *j, int n) +{ + unsigned int k; + if (j->code_bits < n) stbi__grow_buffer_unsafe(j); + k = stbi_lrot(j->code_buffer, n); + j->code_buffer = k & ~stbi__bmask[n]; + k &= stbi__bmask[n]; + j->code_bits -= n; + return k; +} + +stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg *j) +{ + unsigned int k; + if (j->code_bits < 1) stbi__grow_buffer_unsafe(j); + k = j->code_buffer; + j->code_buffer <<= 1; + --j->code_bits; + return k & 0x80000000; +} + +// given a value that's at position X in the zigzag stream, +// where does it appear in the 8x8 matrix coded as row-major? +static const stbi_uc stbi__jpeg_dezigzag[64+15] = +{ + 0, 1, 8, 16, 9, 2, 3, 10, + 17, 24, 32, 25, 18, 11, 4, 5, + 12, 19, 26, 33, 40, 48, 41, 34, + 27, 20, 13, 6, 7, 14, 21, 28, + 35, 42, 49, 56, 57, 50, 43, 36, + 29, 22, 15, 23, 30, 37, 44, 51, + 58, 59, 52, 45, 38, 31, 39, 46, + 53, 60, 61, 54, 47, 55, 62, 63, + // let corrupt input sample past end + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63 +}; + +// decode one 64-entry block-- +static int stbi__jpeg_decode_block(stbi__jpeg *j, short data[64], stbi__huffman *hdc, stbi__huffman *hac, stbi__int16 *fac, int b, stbi__uint16 *dequant) +{ + int diff,dc,k; + int t; + + if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); + t = stbi__jpeg_huff_decode(j, hdc); + if (t < 0) return stbi__err("bad huffman code","Corrupt JPEG"); + + // 0 all the ac values now so we can do it 32-bits at a time + memset(data,0,64*sizeof(data[0])); + + diff = t ? stbi__extend_receive(j, t) : 0; + dc = j->img_comp[b].dc_pred + diff; + j->img_comp[b].dc_pred = dc; + data[0] = (short) (dc * dequant[0]); + + // decode AC components, see JPEG spec + k = 1; + do { + unsigned int zig; + int c,r,s; + if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); + c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1); + r = fac[c]; + if (r) { // fast-AC path + k += (r >> 4) & 15; // run + s = r & 15; // combined length + j->code_buffer <<= s; + j->code_bits -= s; + // decode into unzigzag'd location + zig = stbi__jpeg_dezigzag[k++]; + data[zig] = (short) ((r >> 8) * dequant[zig]); + } else { + int rs = stbi__jpeg_huff_decode(j, hac); + if (rs < 0) return stbi__err("bad huffman code","Corrupt JPEG"); + s = rs & 15; + r = rs >> 4; + if (s == 0) { + if (rs != 0xf0) break; // end block + k += 16; + } else { + k += r; + // decode into unzigzag'd location + zig = stbi__jpeg_dezigzag[k++]; + data[zig] = (short) (stbi__extend_receive(j,s) * dequant[zig]); + } + } + } while (k < 64); + return 1; +} + +static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg *j, short data[64], stbi__huffman *hdc, int b) +{ + int diff,dc; + int t; + if (j->spec_end != 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); + + if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); + + if (j->succ_high == 0) { + // first scan for DC coefficient, must be first + memset(data,0,64*sizeof(data[0])); // 0 all the ac values now + t = stbi__jpeg_huff_decode(j, hdc); + diff = t ? stbi__extend_receive(j, t) : 0; + + dc = j->img_comp[b].dc_pred + diff; + j->img_comp[b].dc_pred = dc; + data[0] = (short) (dc << j->succ_low); + } else { + // refinement scan for DC coefficient + if (stbi__jpeg_get_bit(j)) + data[0] += (short) (1 << j->succ_low); + } + return 1; +} + +// @OPTIMIZE: store non-zigzagged during the decode passes, +// and only de-zigzag when dequantizing +static int stbi__jpeg_decode_block_prog_ac(stbi__jpeg *j, short data[64], stbi__huffman *hac, stbi__int16 *fac) +{ + int k; + if (j->spec_start == 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); + + if (j->succ_high == 0) { + int shift = j->succ_low; + + if (j->eob_run) { + --j->eob_run; + return 1; + } + + k = j->spec_start; + do { + unsigned int zig; + int c,r,s; + if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); + c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1); + r = fac[c]; + if (r) { // fast-AC path + k += (r >> 4) & 15; // run + s = r & 15; // combined length + j->code_buffer <<= s; + j->code_bits -= s; + zig = stbi__jpeg_dezigzag[k++]; + data[zig] = (short) ((r >> 8) << shift); + } else { + int rs = stbi__jpeg_huff_decode(j, hac); + if (rs < 0) return stbi__err("bad huffman code","Corrupt JPEG"); + s = rs & 15; + r = rs >> 4; + if (s == 0) { + if (r < 15) { + j->eob_run = (1 << r); + if (r) + j->eob_run += stbi__jpeg_get_bits(j, r); + --j->eob_run; + break; + } + k += 16; + } else { + k += r; + zig = stbi__jpeg_dezigzag[k++]; + data[zig] = (short) (stbi__extend_receive(j,s) << shift); + } + } + } while (k <= j->spec_end); + } else { + // refinement scan for these AC coefficients + + short bit = (short) (1 << j->succ_low); + + if (j->eob_run) { + --j->eob_run; + for (k = j->spec_start; k <= j->spec_end; ++k) { + short *p = &data[stbi__jpeg_dezigzag[k]]; + if (*p != 0) + if (stbi__jpeg_get_bit(j)) + if ((*p & bit)==0) { + if (*p > 0) + *p += bit; + else + *p -= bit; + } + } + } else { + k = j->spec_start; + do { + int r,s; + int rs = stbi__jpeg_huff_decode(j, hac); // @OPTIMIZE see if we can use the fast path here, advance-by-r is so slow, eh + if (rs < 0) return stbi__err("bad huffman code","Corrupt JPEG"); + s = rs & 15; + r = rs >> 4; + if (s == 0) { + if (r < 15) { + j->eob_run = (1 << r) - 1; + if (r) + j->eob_run += stbi__jpeg_get_bits(j, r); + r = 64; // force end of block + } else { + // r=15 s=0 should write 16 0s, so we just do + // a run of 15 0s and then write s (which is 0), + // so we don't have to do anything special here + } + } else { + if (s != 1) return stbi__err("bad huffman code", "Corrupt JPEG"); + // sign bit + if (stbi__jpeg_get_bit(j)) + s = bit; + else + s = -bit; + } + + // advance by r + while (k <= j->spec_end) { + short *p = &data[stbi__jpeg_dezigzag[k++]]; + if (*p != 0) { + if (stbi__jpeg_get_bit(j)) + if ((*p & bit)==0) { + if (*p > 0) + *p += bit; + else + *p -= bit; + } + } else { + if (r == 0) { + *p = (short) s; + break; + } + --r; + } + } + } while (k <= j->spec_end); + } + } + return 1; +} + +// take a -128..127 value and stbi__clamp it and convert to 0..255 +stbi_inline static stbi_uc stbi__clamp(int x) +{ + // trick to use a single test to catch both cases + if ((unsigned int) x > 255) { + if (x < 0) return 0; + if (x > 255) return 255; + } + return (stbi_uc) x; +} + +#define stbi__f2f(x) ((int) (((x) * 4096 + 0.5))) +#define stbi__fsh(x) ((x) * 4096) + +// derived from jidctint -- DCT_ISLOW +#define STBI__IDCT_1D(s0,s1,s2,s3,s4,s5,s6,s7) \ + int t0,t1,t2,t3,p1,p2,p3,p4,p5,x0,x1,x2,x3; \ + p2 = s2; \ + p3 = s6; \ + p1 = (p2+p3) * stbi__f2f(0.5411961f); \ + t2 = p1 + p3*stbi__f2f(-1.847759065f); \ + t3 = p1 + p2*stbi__f2f( 0.765366865f); \ + p2 = s0; \ + p3 = s4; \ + t0 = stbi__fsh(p2+p3); \ + t1 = stbi__fsh(p2-p3); \ + x0 = t0+t3; \ + x3 = t0-t3; \ + x1 = t1+t2; \ + x2 = t1-t2; \ + t0 = s7; \ + t1 = s5; \ + t2 = s3; \ + t3 = s1; \ + p3 = t0+t2; \ + p4 = t1+t3; \ + p1 = t0+t3; \ + p2 = t1+t2; \ + p5 = (p3+p4)*stbi__f2f( 1.175875602f); \ + t0 = t0*stbi__f2f( 0.298631336f); \ + t1 = t1*stbi__f2f( 2.053119869f); \ + t2 = t2*stbi__f2f( 3.072711026f); \ + t3 = t3*stbi__f2f( 1.501321110f); \ + p1 = p5 + p1*stbi__f2f(-0.899976223f); \ + p2 = p5 + p2*stbi__f2f(-2.562915447f); \ + p3 = p3*stbi__f2f(-1.961570560f); \ + p4 = p4*stbi__f2f(-0.390180644f); \ + t3 += p1+p4; \ + t2 += p2+p3; \ + t1 += p2+p4; \ + t0 += p1+p3; + +static void stbi__idct_block(stbi_uc *out, int out_stride, short data[64]) +{ + int i,val[64],*v=val; + stbi_uc *o; + short *d = data; + + // columns + for (i=0; i < 8; ++i,++d, ++v) { + // if all zeroes, shortcut -- this avoids dequantizing 0s and IDCTing + if (d[ 8]==0 && d[16]==0 && d[24]==0 && d[32]==0 + && d[40]==0 && d[48]==0 && d[56]==0) { + // no shortcut 0 seconds + // (1|2|3|4|5|6|7)==0 0 seconds + // all separate -0.047 seconds + // 1 && 2|3 && 4|5 && 6|7: -0.047 seconds + int dcterm = d[0]*4; + v[0] = v[8] = v[16] = v[24] = v[32] = v[40] = v[48] = v[56] = dcterm; + } else { + STBI__IDCT_1D(d[ 0],d[ 8],d[16],d[24],d[32],d[40],d[48],d[56]) + // constants scaled things up by 1<<12; let's bring them back + // down, but keep 2 extra bits of precision + x0 += 512; x1 += 512; x2 += 512; x3 += 512; + v[ 0] = (x0+t3) >> 10; + v[56] = (x0-t3) >> 10; + v[ 8] = (x1+t2) >> 10; + v[48] = (x1-t2) >> 10; + v[16] = (x2+t1) >> 10; + v[40] = (x2-t1) >> 10; + v[24] = (x3+t0) >> 10; + v[32] = (x3-t0) >> 10; + } + } + + for (i=0, v=val, o=out; i < 8; ++i,v+=8,o+=out_stride) { + // no fast case since the first 1D IDCT spread components out + STBI__IDCT_1D(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7]) + // constants scaled things up by 1<<12, plus we had 1<<2 from first + // loop, plus horizontal and vertical each scale by sqrt(8) so together + // we've got an extra 1<<3, so 1<<17 total we need to remove. + // so we want to round that, which means adding 0.5 * 1<<17, + // aka 65536. Also, we'll end up with -128 to 127 that we want + // to encode as 0..255 by adding 128, so we'll add that before the shift + x0 += 65536 + (128<<17); + x1 += 65536 + (128<<17); + x2 += 65536 + (128<<17); + x3 += 65536 + (128<<17); + // tried computing the shifts into temps, or'ing the temps to see + // if any were out of range, but that was slower + o[0] = stbi__clamp((x0+t3) >> 17); + o[7] = stbi__clamp((x0-t3) >> 17); + o[1] = stbi__clamp((x1+t2) >> 17); + o[6] = stbi__clamp((x1-t2) >> 17); + o[2] = stbi__clamp((x2+t1) >> 17); + o[5] = stbi__clamp((x2-t1) >> 17); + o[3] = stbi__clamp((x3+t0) >> 17); + o[4] = stbi__clamp((x3-t0) >> 17); + } +} + +#ifdef STBI_SSE2 +// sse2 integer IDCT. not the fastest possible implementation but it +// produces bit-identical results to the generic C version so it's +// fully "transparent". +static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64]) +{ + // This is constructed to match our regular (generic) integer IDCT exactly. + __m128i row0, row1, row2, row3, row4, row5, row6, row7; + __m128i tmp; + + // dot product constant: even elems=x, odd elems=y + #define dct_const(x,y) _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y)) + + // out(0) = c0[even]*x + c0[odd]*y (c0, x, y 16-bit, out 32-bit) + // out(1) = c1[even]*x + c1[odd]*y + #define dct_rot(out0,out1, x,y,c0,c1) \ + __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \ + __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \ + __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \ + __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \ + __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \ + __m128i out1##_h = _mm_madd_epi16(c0##hi, c1) + + // out = in << 12 (in 16-bit, out 32-bit) + #define dct_widen(out, in) \ + __m128i out##_l = _mm_srai_epi32(_mm_unpacklo_epi16(_mm_setzero_si128(), (in)), 4); \ + __m128i out##_h = _mm_srai_epi32(_mm_unpackhi_epi16(_mm_setzero_si128(), (in)), 4) + + // wide add + #define dct_wadd(out, a, b) \ + __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \ + __m128i out##_h = _mm_add_epi32(a##_h, b##_h) + + // wide sub + #define dct_wsub(out, a, b) \ + __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \ + __m128i out##_h = _mm_sub_epi32(a##_h, b##_h) + + // butterfly a/b, add bias, then shift by "s" and pack + #define dct_bfly32o(out0, out1, a,b,bias,s) \ + { \ + __m128i abiased_l = _mm_add_epi32(a##_l, bias); \ + __m128i abiased_h = _mm_add_epi32(a##_h, bias); \ + dct_wadd(sum, abiased, b); \ + dct_wsub(dif, abiased, b); \ + out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \ + out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \ + } + + // 8-bit interleave step (for transposes) + #define dct_interleave8(a, b) \ + tmp = a; \ + a = _mm_unpacklo_epi8(a, b); \ + b = _mm_unpackhi_epi8(tmp, b) + + // 16-bit interleave step (for transposes) + #define dct_interleave16(a, b) \ + tmp = a; \ + a = _mm_unpacklo_epi16(a, b); \ + b = _mm_unpackhi_epi16(tmp, b) + + #define dct_pass(bias,shift) \ + { \ + /* even part */ \ + dct_rot(t2e,t3e, row2,row6, rot0_0,rot0_1); \ + __m128i sum04 = _mm_add_epi16(row0, row4); \ + __m128i dif04 = _mm_sub_epi16(row0, row4); \ + dct_widen(t0e, sum04); \ + dct_widen(t1e, dif04); \ + dct_wadd(x0, t0e, t3e); \ + dct_wsub(x3, t0e, t3e); \ + dct_wadd(x1, t1e, t2e); \ + dct_wsub(x2, t1e, t2e); \ + /* odd part */ \ + dct_rot(y0o,y2o, row7,row3, rot2_0,rot2_1); \ + dct_rot(y1o,y3o, row5,row1, rot3_0,rot3_1); \ + __m128i sum17 = _mm_add_epi16(row1, row7); \ + __m128i sum35 = _mm_add_epi16(row3, row5); \ + dct_rot(y4o,y5o, sum17,sum35, rot1_0,rot1_1); \ + dct_wadd(x4, y0o, y4o); \ + dct_wadd(x5, y1o, y5o); \ + dct_wadd(x6, y2o, y5o); \ + dct_wadd(x7, y3o, y4o); \ + dct_bfly32o(row0,row7, x0,x7,bias,shift); \ + dct_bfly32o(row1,row6, x1,x6,bias,shift); \ + dct_bfly32o(row2,row5, x2,x5,bias,shift); \ + dct_bfly32o(row3,row4, x3,x4,bias,shift); \ + } + + __m128i rot0_0 = dct_const(stbi__f2f(0.5411961f), stbi__f2f(0.5411961f) + stbi__f2f(-1.847759065f)); + __m128i rot0_1 = dct_const(stbi__f2f(0.5411961f) + stbi__f2f( 0.765366865f), stbi__f2f(0.5411961f)); + __m128i rot1_0 = dct_const(stbi__f2f(1.175875602f) + stbi__f2f(-0.899976223f), stbi__f2f(1.175875602f)); + __m128i rot1_1 = dct_const(stbi__f2f(1.175875602f), stbi__f2f(1.175875602f) + stbi__f2f(-2.562915447f)); + __m128i rot2_0 = dct_const(stbi__f2f(-1.961570560f) + stbi__f2f( 0.298631336f), stbi__f2f(-1.961570560f)); + __m128i rot2_1 = dct_const(stbi__f2f(-1.961570560f), stbi__f2f(-1.961570560f) + stbi__f2f( 3.072711026f)); + __m128i rot3_0 = dct_const(stbi__f2f(-0.390180644f) + stbi__f2f( 2.053119869f), stbi__f2f(-0.390180644f)); + __m128i rot3_1 = dct_const(stbi__f2f(-0.390180644f), stbi__f2f(-0.390180644f) + stbi__f2f( 1.501321110f)); + + // rounding biases in column/row passes, see stbi__idct_block for explanation. + __m128i bias_0 = _mm_set1_epi32(512); + __m128i bias_1 = _mm_set1_epi32(65536 + (128<<17)); + + // load + row0 = _mm_load_si128((const __m128i *) (data + 0*8)); + row1 = _mm_load_si128((const __m128i *) (data + 1*8)); + row2 = _mm_load_si128((const __m128i *) (data + 2*8)); + row3 = _mm_load_si128((const __m128i *) (data + 3*8)); + row4 = _mm_load_si128((const __m128i *) (data + 4*8)); + row5 = _mm_load_si128((const __m128i *) (data + 5*8)); + row6 = _mm_load_si128((const __m128i *) (data + 6*8)); + row7 = _mm_load_si128((const __m128i *) (data + 7*8)); + + // column pass + dct_pass(bias_0, 10); + + { + // 16bit 8x8 transpose pass 1 + dct_interleave16(row0, row4); + dct_interleave16(row1, row5); + dct_interleave16(row2, row6); + dct_interleave16(row3, row7); + + // transpose pass 2 + dct_interleave16(row0, row2); + dct_interleave16(row1, row3); + dct_interleave16(row4, row6); + dct_interleave16(row5, row7); + + // transpose pass 3 + dct_interleave16(row0, row1); + dct_interleave16(row2, row3); + dct_interleave16(row4, row5); + dct_interleave16(row6, row7); + } + + // row pass + dct_pass(bias_1, 17); + + { + // pack + __m128i p0 = _mm_packus_epi16(row0, row1); // a0a1a2a3...a7b0b1b2b3...b7 + __m128i p1 = _mm_packus_epi16(row2, row3); + __m128i p2 = _mm_packus_epi16(row4, row5); + __m128i p3 = _mm_packus_epi16(row6, row7); + + // 8bit 8x8 transpose pass 1 + dct_interleave8(p0, p2); // a0e0a1e1... + dct_interleave8(p1, p3); // c0g0c1g1... + + // transpose pass 2 + dct_interleave8(p0, p1); // a0c0e0g0... + dct_interleave8(p2, p3); // b0d0f0h0... + + // transpose pass 3 + dct_interleave8(p0, p2); // a0b0c0d0... + dct_interleave8(p1, p3); // a4b4c4d4... + + // store + _mm_storel_epi64((__m128i *) out, p0); out += out_stride; + _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p0, 0x4e)); out += out_stride; + _mm_storel_epi64((__m128i *) out, p2); out += out_stride; + _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p2, 0x4e)); out += out_stride; + _mm_storel_epi64((__m128i *) out, p1); out += out_stride; + _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p1, 0x4e)); out += out_stride; + _mm_storel_epi64((__m128i *) out, p3); out += out_stride; + _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p3, 0x4e)); + } + +#undef dct_const +#undef dct_rot +#undef dct_widen +#undef dct_wadd +#undef dct_wsub +#undef dct_bfly32o +#undef dct_interleave8 +#undef dct_interleave16 +#undef dct_pass +} + +#endif // STBI_SSE2 + +#ifdef STBI_NEON + +// NEON integer IDCT. should produce bit-identical +// results to the generic C version. +static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64]) +{ + int16x8_t row0, row1, row2, row3, row4, row5, row6, row7; + + int16x4_t rot0_0 = vdup_n_s16(stbi__f2f(0.5411961f)); + int16x4_t rot0_1 = vdup_n_s16(stbi__f2f(-1.847759065f)); + int16x4_t rot0_2 = vdup_n_s16(stbi__f2f( 0.765366865f)); + int16x4_t rot1_0 = vdup_n_s16(stbi__f2f( 1.175875602f)); + int16x4_t rot1_1 = vdup_n_s16(stbi__f2f(-0.899976223f)); + int16x4_t rot1_2 = vdup_n_s16(stbi__f2f(-2.562915447f)); + int16x4_t rot2_0 = vdup_n_s16(stbi__f2f(-1.961570560f)); + int16x4_t rot2_1 = vdup_n_s16(stbi__f2f(-0.390180644f)); + int16x4_t rot3_0 = vdup_n_s16(stbi__f2f( 0.298631336f)); + int16x4_t rot3_1 = vdup_n_s16(stbi__f2f( 2.053119869f)); + int16x4_t rot3_2 = vdup_n_s16(stbi__f2f( 3.072711026f)); + int16x4_t rot3_3 = vdup_n_s16(stbi__f2f( 1.501321110f)); + +#define dct_long_mul(out, inq, coeff) \ + int32x4_t out##_l = vmull_s16(vget_low_s16(inq), coeff); \ + int32x4_t out##_h = vmull_s16(vget_high_s16(inq), coeff) + +#define dct_long_mac(out, acc, inq, coeff) \ + int32x4_t out##_l = vmlal_s16(acc##_l, vget_low_s16(inq), coeff); \ + int32x4_t out##_h = vmlal_s16(acc##_h, vget_high_s16(inq), coeff) + +#define dct_widen(out, inq) \ + int32x4_t out##_l = vshll_n_s16(vget_low_s16(inq), 12); \ + int32x4_t out##_h = vshll_n_s16(vget_high_s16(inq), 12) + +// wide add +#define dct_wadd(out, a, b) \ + int32x4_t out##_l = vaddq_s32(a##_l, b##_l); \ + int32x4_t out##_h = vaddq_s32(a##_h, b##_h) + +// wide sub +#define dct_wsub(out, a, b) \ + int32x4_t out##_l = vsubq_s32(a##_l, b##_l); \ + int32x4_t out##_h = vsubq_s32(a##_h, b##_h) + +// butterfly a/b, then shift using "shiftop" by "s" and pack +#define dct_bfly32o(out0,out1, a,b,shiftop,s) \ + { \ + dct_wadd(sum, a, b); \ + dct_wsub(dif, a, b); \ + out0 = vcombine_s16(shiftop(sum_l, s), shiftop(sum_h, s)); \ + out1 = vcombine_s16(shiftop(dif_l, s), shiftop(dif_h, s)); \ + } + +#define dct_pass(shiftop, shift) \ + { \ + /* even part */ \ + int16x8_t sum26 = vaddq_s16(row2, row6); \ + dct_long_mul(p1e, sum26, rot0_0); \ + dct_long_mac(t2e, p1e, row6, rot0_1); \ + dct_long_mac(t3e, p1e, row2, rot0_2); \ + int16x8_t sum04 = vaddq_s16(row0, row4); \ + int16x8_t dif04 = vsubq_s16(row0, row4); \ + dct_widen(t0e, sum04); \ + dct_widen(t1e, dif04); \ + dct_wadd(x0, t0e, t3e); \ + dct_wsub(x3, t0e, t3e); \ + dct_wadd(x1, t1e, t2e); \ + dct_wsub(x2, t1e, t2e); \ + /* odd part */ \ + int16x8_t sum15 = vaddq_s16(row1, row5); \ + int16x8_t sum17 = vaddq_s16(row1, row7); \ + int16x8_t sum35 = vaddq_s16(row3, row5); \ + int16x8_t sum37 = vaddq_s16(row3, row7); \ + int16x8_t sumodd = vaddq_s16(sum17, sum35); \ + dct_long_mul(p5o, sumodd, rot1_0); \ + dct_long_mac(p1o, p5o, sum17, rot1_1); \ + dct_long_mac(p2o, p5o, sum35, rot1_2); \ + dct_long_mul(p3o, sum37, rot2_0); \ + dct_long_mul(p4o, sum15, rot2_1); \ + dct_wadd(sump13o, p1o, p3o); \ + dct_wadd(sump24o, p2o, p4o); \ + dct_wadd(sump23o, p2o, p3o); \ + dct_wadd(sump14o, p1o, p4o); \ + dct_long_mac(x4, sump13o, row7, rot3_0); \ + dct_long_mac(x5, sump24o, row5, rot3_1); \ + dct_long_mac(x6, sump23o, row3, rot3_2); \ + dct_long_mac(x7, sump14o, row1, rot3_3); \ + dct_bfly32o(row0,row7, x0,x7,shiftop,shift); \ + dct_bfly32o(row1,row6, x1,x6,shiftop,shift); \ + dct_bfly32o(row2,row5, x2,x5,shiftop,shift); \ + dct_bfly32o(row3,row4, x3,x4,shiftop,shift); \ + } + + // load + row0 = vld1q_s16(data + 0*8); + row1 = vld1q_s16(data + 1*8); + row2 = vld1q_s16(data + 2*8); + row3 = vld1q_s16(data + 3*8); + row4 = vld1q_s16(data + 4*8); + row5 = vld1q_s16(data + 5*8); + row6 = vld1q_s16(data + 6*8); + row7 = vld1q_s16(data + 7*8); + + // add DC bias + row0 = vaddq_s16(row0, vsetq_lane_s16(1024, vdupq_n_s16(0), 0)); + + // column pass + dct_pass(vrshrn_n_s32, 10); + + // 16bit 8x8 transpose + { +// these three map to a single VTRN.16, VTRN.32, and VSWP, respectively. +// whether compilers actually get this is another story, sadly. +#define dct_trn16(x, y) { int16x8x2_t t = vtrnq_s16(x, y); x = t.val[0]; y = t.val[1]; } +#define dct_trn32(x, y) { int32x4x2_t t = vtrnq_s32(vreinterpretq_s32_s16(x), vreinterpretq_s32_s16(y)); x = vreinterpretq_s16_s32(t.val[0]); y = vreinterpretq_s16_s32(t.val[1]); } +#define dct_trn64(x, y) { int16x8_t x0 = x; int16x8_t y0 = y; x = vcombine_s16(vget_low_s16(x0), vget_low_s16(y0)); y = vcombine_s16(vget_high_s16(x0), vget_high_s16(y0)); } + + // pass 1 + dct_trn16(row0, row1); // a0b0a2b2a4b4a6b6 + dct_trn16(row2, row3); + dct_trn16(row4, row5); + dct_trn16(row6, row7); + + // pass 2 + dct_trn32(row0, row2); // a0b0c0d0a4b4c4d4 + dct_trn32(row1, row3); + dct_trn32(row4, row6); + dct_trn32(row5, row7); + + // pass 3 + dct_trn64(row0, row4); // a0b0c0d0e0f0g0h0 + dct_trn64(row1, row5); + dct_trn64(row2, row6); + dct_trn64(row3, row7); + +#undef dct_trn16 +#undef dct_trn32 +#undef dct_trn64 + } + + // row pass + // vrshrn_n_s32 only supports shifts up to 16, we need + // 17. so do a non-rounding shift of 16 first then follow + // up with a rounding shift by 1. + dct_pass(vshrn_n_s32, 16); + + { + // pack and round + uint8x8_t p0 = vqrshrun_n_s16(row0, 1); + uint8x8_t p1 = vqrshrun_n_s16(row1, 1); + uint8x8_t p2 = vqrshrun_n_s16(row2, 1); + uint8x8_t p3 = vqrshrun_n_s16(row3, 1); + uint8x8_t p4 = vqrshrun_n_s16(row4, 1); + uint8x8_t p5 = vqrshrun_n_s16(row5, 1); + uint8x8_t p6 = vqrshrun_n_s16(row6, 1); + uint8x8_t p7 = vqrshrun_n_s16(row7, 1); + + // again, these can translate into one instruction, but often don't. +#define dct_trn8_8(x, y) { uint8x8x2_t t = vtrn_u8(x, y); x = t.val[0]; y = t.val[1]; } +#define dct_trn8_16(x, y) { uint16x4x2_t t = vtrn_u16(vreinterpret_u16_u8(x), vreinterpret_u16_u8(y)); x = vreinterpret_u8_u16(t.val[0]); y = vreinterpret_u8_u16(t.val[1]); } +#define dct_trn8_32(x, y) { uint32x2x2_t t = vtrn_u32(vreinterpret_u32_u8(x), vreinterpret_u32_u8(y)); x = vreinterpret_u8_u32(t.val[0]); y = vreinterpret_u8_u32(t.val[1]); } + + // sadly can't use interleaved stores here since we only write + // 8 bytes to each scan line! + + // 8x8 8-bit transpose pass 1 + dct_trn8_8(p0, p1); + dct_trn8_8(p2, p3); + dct_trn8_8(p4, p5); + dct_trn8_8(p6, p7); + + // pass 2 + dct_trn8_16(p0, p2); + dct_trn8_16(p1, p3); + dct_trn8_16(p4, p6); + dct_trn8_16(p5, p7); + + // pass 3 + dct_trn8_32(p0, p4); + dct_trn8_32(p1, p5); + dct_trn8_32(p2, p6); + dct_trn8_32(p3, p7); + + // store + vst1_u8(out, p0); out += out_stride; + vst1_u8(out, p1); out += out_stride; + vst1_u8(out, p2); out += out_stride; + vst1_u8(out, p3); out += out_stride; + vst1_u8(out, p4); out += out_stride; + vst1_u8(out, p5); out += out_stride; + vst1_u8(out, p6); out += out_stride; + vst1_u8(out, p7); + +#undef dct_trn8_8 +#undef dct_trn8_16 +#undef dct_trn8_32 + } + +#undef dct_long_mul +#undef dct_long_mac +#undef dct_widen +#undef dct_wadd +#undef dct_wsub +#undef dct_bfly32o +#undef dct_pass +} + +#endif // STBI_NEON + +#define STBI__MARKER_none 0xff +// if there's a pending marker from the entropy stream, return that +// otherwise, fetch from the stream and get a marker. if there's no +// marker, return 0xff, which is never a valid marker value +static stbi_uc stbi__get_marker(stbi__jpeg *j) +{ + stbi_uc x; + if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; } + x = stbi__get8(j->s); + if (x != 0xff) return STBI__MARKER_none; + while (x == 0xff) + x = stbi__get8(j->s); // consume repeated 0xff fill bytes + return x; +} + +// in each scan, we'll have scan_n components, and the order +// of the components is specified by order[] +#define STBI__RESTART(x) ((x) >= 0xd0 && (x) <= 0xd7) + +// after a restart interval, stbi__jpeg_reset the entropy decoder and +// the dc prediction +static void stbi__jpeg_reset(stbi__jpeg *j) +{ + j->code_bits = 0; + j->code_buffer = 0; + j->nomore = 0; + j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0; + j->marker = STBI__MARKER_none; + j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; + j->eob_run = 0; + // no more than 1<<31 MCUs if no restart_interal? that's plenty safe, + // since we don't even allow 1<<30 pixels +} + +static int stbi__parse_entropy_coded_data(stbi__jpeg *z) +{ + stbi__jpeg_reset(z); + if (!z->progressive) { + if (z->scan_n == 1) { + int i,j; + STBI_SIMD_ALIGN(short, data[64]); + int n = z->order[0]; + // non-interleaved data, we just need to process one block at a time, + // in trivial scanline order + // number of blocks to do just depends on how many actual "pixels" this + // component has, independent of interleaved MCU blocking and such + int w = (z->img_comp[n].x+7) >> 3; + int h = (z->img_comp[n].y+7) >> 3; + for (j=0; j < h; ++j) { + for (i=0; i < w; ++i) { + int ha = z->img_comp[n].ha; + if (!stbi__jpeg_decode_block(z, data, z->huff_dc+z->img_comp[n].hd, z->huff_ac+ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; + z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*j*8+i*8, z->img_comp[n].w2, data); + // every data block is an MCU, so countdown the restart interval + if (--z->todo <= 0) { + if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); + // if it's NOT a restart, then just bail, so we get corrupt data + // rather than no data + if (!STBI__RESTART(z->marker)) return 1; + stbi__jpeg_reset(z); + } + } + } + return 1; + } else { // interleaved + int i,j,k,x,y; + STBI_SIMD_ALIGN(short, data[64]); + for (j=0; j < z->img_mcu_y; ++j) { + for (i=0; i < z->img_mcu_x; ++i) { + // scan an interleaved mcu... process scan_n components in order + for (k=0; k < z->scan_n; ++k) { + int n = z->order[k]; + // scan out an mcu's worth of this component; that's just determined + // by the basic H and V specified for the component + for (y=0; y < z->img_comp[n].v; ++y) { + for (x=0; x < z->img_comp[n].h; ++x) { + int x2 = (i*z->img_comp[n].h + x)*8; + int y2 = (j*z->img_comp[n].v + y)*8; + int ha = z->img_comp[n].ha; + if (!stbi__jpeg_decode_block(z, data, z->huff_dc+z->img_comp[n].hd, z->huff_ac+ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; + z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*y2+x2, z->img_comp[n].w2, data); + } + } + } + // after all interleaved components, that's an interleaved MCU, + // so now count down the restart interval + if (--z->todo <= 0) { + if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); + if (!STBI__RESTART(z->marker)) return 1; + stbi__jpeg_reset(z); + } + } + } + return 1; + } + } else { + if (z->scan_n == 1) { + int i,j; + int n = z->order[0]; + // non-interleaved data, we just need to process one block at a time, + // in trivial scanline order + // number of blocks to do just depends on how many actual "pixels" this + // component has, independent of interleaved MCU blocking and such + int w = (z->img_comp[n].x+7) >> 3; + int h = (z->img_comp[n].y+7) >> 3; + for (j=0; j < h; ++j) { + for (i=0; i < w; ++i) { + short *data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); + if (z->spec_start == 0) { + if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) + return 0; + } else { + int ha = z->img_comp[n].ha; + if (!stbi__jpeg_decode_block_prog_ac(z, data, &z->huff_ac[ha], z->fast_ac[ha])) + return 0; + } + // every data block is an MCU, so countdown the restart interval + if (--z->todo <= 0) { + if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); + if (!STBI__RESTART(z->marker)) return 1; + stbi__jpeg_reset(z); + } + } + } + return 1; + } else { // interleaved + int i,j,k,x,y; + for (j=0; j < z->img_mcu_y; ++j) { + for (i=0; i < z->img_mcu_x; ++i) { + // scan an interleaved mcu... process scan_n components in order + for (k=0; k < z->scan_n; ++k) { + int n = z->order[k]; + // scan out an mcu's worth of this component; that's just determined + // by the basic H and V specified for the component + for (y=0; y < z->img_comp[n].v; ++y) { + for (x=0; x < z->img_comp[n].h; ++x) { + int x2 = (i*z->img_comp[n].h + x); + int y2 = (j*z->img_comp[n].v + y); + short *data = z->img_comp[n].coeff + 64 * (x2 + y2 * z->img_comp[n].coeff_w); + if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) + return 0; + } + } + } + // after all interleaved components, that's an interleaved MCU, + // so now count down the restart interval + if (--z->todo <= 0) { + if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); + if (!STBI__RESTART(z->marker)) return 1; + stbi__jpeg_reset(z); + } + } + } + return 1; + } + } +} + +static void stbi__jpeg_dequantize(short *data, stbi__uint16 *dequant) +{ + int i; + for (i=0; i < 64; ++i) + data[i] *= dequant[i]; +} + +static void stbi__jpeg_finish(stbi__jpeg *z) +{ + if (z->progressive) { + // dequantize and idct the data + int i,j,n; + for (n=0; n < z->s->img_n; ++n) { + int w = (z->img_comp[n].x+7) >> 3; + int h = (z->img_comp[n].y+7) >> 3; + for (j=0; j < h; ++j) { + for (i=0; i < w; ++i) { + short *data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); + stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]); + z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*j*8+i*8, z->img_comp[n].w2, data); + } + } + } + } +} + +static int stbi__process_marker(stbi__jpeg *z, int m) +{ + int L; + switch (m) { + case STBI__MARKER_none: // no marker found + return stbi__err("expected marker","Corrupt JPEG"); + + case 0xDD: // DRI - specify restart interval + if (stbi__get16be(z->s) != 4) return stbi__err("bad DRI len","Corrupt JPEG"); + z->restart_interval = stbi__get16be(z->s); + return 1; + + case 0xDB: // DQT - define quantization table + L = stbi__get16be(z->s)-2; + while (L > 0) { + int q = stbi__get8(z->s); + int p = q >> 4, sixteen = (p != 0); + int t = q & 15,i; + if (p != 0 && p != 1) return stbi__err("bad DQT type","Corrupt JPEG"); + if (t > 3) return stbi__err("bad DQT table","Corrupt JPEG"); + + for (i=0; i < 64; ++i) + z->dequant[t][stbi__jpeg_dezigzag[i]] = (stbi__uint16)(sixteen ? stbi__get16be(z->s) : stbi__get8(z->s)); + L -= (sixteen ? 129 : 65); + } + return L==0; + + case 0xC4: // DHT - define huffman table + L = stbi__get16be(z->s)-2; + while (L > 0) { + stbi_uc *v; + int sizes[16],i,n=0; + int q = stbi__get8(z->s); + int tc = q >> 4; + int th = q & 15; + if (tc > 1 || th > 3) return stbi__err("bad DHT header","Corrupt JPEG"); + for (i=0; i < 16; ++i) { + sizes[i] = stbi__get8(z->s); + n += sizes[i]; + } + L -= 17; + if (tc == 0) { + if (!stbi__build_huffman(z->huff_dc+th, sizes)) return 0; + v = z->huff_dc[th].values; + } else { + if (!stbi__build_huffman(z->huff_ac+th, sizes)) return 0; + v = z->huff_ac[th].values; + } + for (i=0; i < n; ++i) + v[i] = stbi__get8(z->s); + if (tc != 0) + stbi__build_fast_ac(z->fast_ac[th], z->huff_ac + th); + L -= n; + } + return L==0; + } + + // check for comment block or APP blocks + if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) { + L = stbi__get16be(z->s); + if (L < 2) { + if (m == 0xFE) + return stbi__err("bad COM len","Corrupt JPEG"); + else + return stbi__err("bad APP len","Corrupt JPEG"); + } + L -= 2; + + if (m == 0xE0 && L >= 5) { // JFIF APP0 segment + static const unsigned char tag[5] = {'J','F','I','F','\0'}; + int ok = 1; + int i; + for (i=0; i < 5; ++i) + if (stbi__get8(z->s) != tag[i]) + ok = 0; + L -= 5; + if (ok) + z->jfif = 1; + } else if (m == 0xEE && L >= 12) { // Adobe APP14 segment + static const unsigned char tag[6] = {'A','d','o','b','e','\0'}; + int ok = 1; + int i; + for (i=0; i < 6; ++i) + if (stbi__get8(z->s) != tag[i]) + ok = 0; + L -= 6; + if (ok) { + stbi__get8(z->s); // version + stbi__get16be(z->s); // flags0 + stbi__get16be(z->s); // flags1 + z->app14_color_transform = stbi__get8(z->s); // color transform + L -= 6; + } + } + + stbi__skip(z->s, L); + return 1; + } + + return stbi__err("unknown marker","Corrupt JPEG"); +} + +// after we see SOS +static int stbi__process_scan_header(stbi__jpeg *z) +{ + int i; + int Ls = stbi__get16be(z->s); + z->scan_n = stbi__get8(z->s); + if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int) z->s->img_n) return stbi__err("bad SOS component count","Corrupt JPEG"); + if (Ls != 6+2*z->scan_n) return stbi__err("bad SOS len","Corrupt JPEG"); + for (i=0; i < z->scan_n; ++i) { + int id = stbi__get8(z->s), which; + int q = stbi__get8(z->s); + for (which = 0; which < z->s->img_n; ++which) + if (z->img_comp[which].id == id) + break; + if (which == z->s->img_n) return 0; // no match + z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return stbi__err("bad DC huff","Corrupt JPEG"); + z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return stbi__err("bad AC huff","Corrupt JPEG"); + z->order[i] = which; + } + + { + int aa; + z->spec_start = stbi__get8(z->s); + z->spec_end = stbi__get8(z->s); // should be 63, but might be 0 + aa = stbi__get8(z->s); + z->succ_high = (aa >> 4); + z->succ_low = (aa & 15); + if (z->progressive) { + if (z->spec_start > 63 || z->spec_end > 63 || z->spec_start > z->spec_end || z->succ_high > 13 || z->succ_low > 13) + return stbi__err("bad SOS", "Corrupt JPEG"); + } else { + if (z->spec_start != 0) return stbi__err("bad SOS","Corrupt JPEG"); + if (z->succ_high != 0 || z->succ_low != 0) return stbi__err("bad SOS","Corrupt JPEG"); + z->spec_end = 63; + } + } + + return 1; +} + +static int stbi__free_jpeg_components(stbi__jpeg *z, int ncomp, int why) +{ + int i; + for (i=0; i < ncomp; ++i) { + if (z->img_comp[i].raw_data) { + STBI_FREE(z->img_comp[i].raw_data); + z->img_comp[i].raw_data = NULL; + z->img_comp[i].data = NULL; + } + if (z->img_comp[i].raw_coeff) { + STBI_FREE(z->img_comp[i].raw_coeff); + z->img_comp[i].raw_coeff = 0; + z->img_comp[i].coeff = 0; + } + if (z->img_comp[i].linebuf) { + STBI_FREE(z->img_comp[i].linebuf); + z->img_comp[i].linebuf = NULL; + } + } + return why; +} + +static int stbi__process_frame_header(stbi__jpeg *z, int scan) +{ + stbi__context *s = z->s; + int Lf,p,i,q, h_max=1,v_max=1,c; + Lf = stbi__get16be(s); if (Lf < 11) return stbi__err("bad SOF len","Corrupt JPEG"); // JPEG + p = stbi__get8(s); if (p != 8) return stbi__err("only 8-bit","JPEG format not supported: 8-bit only"); // JPEG baseline + s->img_y = stbi__get16be(s); if (s->img_y == 0) return stbi__err("no header height", "JPEG format not supported: delayed height"); // Legal, but we don't handle it--but neither does IJG + s->img_x = stbi__get16be(s); if (s->img_x == 0) return stbi__err("0 width","Corrupt JPEG"); // JPEG requires + c = stbi__get8(s); + if (c != 3 && c != 1 && c != 4) return stbi__err("bad component count","Corrupt JPEG"); + s->img_n = c; + for (i=0; i < c; ++i) { + z->img_comp[i].data = NULL; + z->img_comp[i].linebuf = NULL; + } + + if (Lf != 8+3*s->img_n) return stbi__err("bad SOF len","Corrupt JPEG"); + + z->rgb = 0; + for (i=0; i < s->img_n; ++i) { + static const unsigned char rgb[3] = { 'R', 'G', 'B' }; + z->img_comp[i].id = stbi__get8(s); + if (s->img_n == 3 && z->img_comp[i].id == rgb[i]) + ++z->rgb; + q = stbi__get8(s); + z->img_comp[i].h = (q >> 4); if (!z->img_comp[i].h || z->img_comp[i].h > 4) return stbi__err("bad H","Corrupt JPEG"); + z->img_comp[i].v = q & 15; if (!z->img_comp[i].v || z->img_comp[i].v > 4) return stbi__err("bad V","Corrupt JPEG"); + z->img_comp[i].tq = stbi__get8(s); if (z->img_comp[i].tq > 3) return stbi__err("bad TQ","Corrupt JPEG"); + } + + if (scan != STBI__SCAN_load) return 1; + + if (!stbi__mad3sizes_valid(s->img_x, s->img_y, s->img_n, 0)) return stbi__err("too large", "Image too large to decode"); + + for (i=0; i < s->img_n; ++i) { + if (z->img_comp[i].h > h_max) h_max = z->img_comp[i].h; + if (z->img_comp[i].v > v_max) v_max = z->img_comp[i].v; + } + + // compute interleaved mcu info + z->img_h_max = h_max; + z->img_v_max = v_max; + z->img_mcu_w = h_max * 8; + z->img_mcu_h = v_max * 8; + // these sizes can't be more than 17 bits + z->img_mcu_x = (s->img_x + z->img_mcu_w-1) / z->img_mcu_w; + z->img_mcu_y = (s->img_y + z->img_mcu_h-1) / z->img_mcu_h; + + for (i=0; i < s->img_n; ++i) { + // number of effective pixels (e.g. for non-interleaved MCU) + z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max-1) / h_max; + z->img_comp[i].y = (s->img_y * z->img_comp[i].v + v_max-1) / v_max; + // to simplify generation, we'll allocate enough memory to decode + // the bogus oversized data from using interleaved MCUs and their + // big blocks (e.g. a 16x16 iMCU on an image of width 33); we won't + // discard the extra data until colorspace conversion + // + // img_mcu_x, img_mcu_y: <=17 bits; comp[i].h and .v are <=4 (checked earlier) + // so these muls can't overflow with 32-bit ints (which we require) + z->img_comp[i].w2 = z->img_mcu_x * z->img_comp[i].h * 8; + z->img_comp[i].h2 = z->img_mcu_y * z->img_comp[i].v * 8; + z->img_comp[i].coeff = 0; + z->img_comp[i].raw_coeff = 0; + z->img_comp[i].linebuf = NULL; + z->img_comp[i].raw_data = stbi__malloc_mad2(z->img_comp[i].w2, z->img_comp[i].h2, 15); + if (z->img_comp[i].raw_data == NULL) + return stbi__free_jpeg_components(z, i+1, stbi__err("outofmem", "Out of memory")); + // align blocks for idct using mmx/sse + z->img_comp[i].data = (stbi_uc*) (((size_t) z->img_comp[i].raw_data + 15) & ~15); + if (z->progressive) { + // w2, h2 are multiples of 8 (see above) + z->img_comp[i].coeff_w = z->img_comp[i].w2 / 8; + z->img_comp[i].coeff_h = z->img_comp[i].h2 / 8; + z->img_comp[i].raw_coeff = stbi__malloc_mad3(z->img_comp[i].w2, z->img_comp[i].h2, sizeof(short), 15); + if (z->img_comp[i].raw_coeff == NULL) + return stbi__free_jpeg_components(z, i+1, stbi__err("outofmem", "Out of memory")); + z->img_comp[i].coeff = (short*) (((size_t) z->img_comp[i].raw_coeff + 15) & ~15); + } + } + + return 1; +} + +// use comparisons since in some cases we handle more than one case (e.g. SOF) +#define stbi__DNL(x) ((x) == 0xdc) +#define stbi__SOI(x) ((x) == 0xd8) +#define stbi__EOI(x) ((x) == 0xd9) +#define stbi__SOF(x) ((x) == 0xc0 || (x) == 0xc1 || (x) == 0xc2) +#define stbi__SOS(x) ((x) == 0xda) + +#define stbi__SOF_progressive(x) ((x) == 0xc2) + +static int stbi__decode_jpeg_header(stbi__jpeg *z, int scan) +{ + int m; + z->jfif = 0; + z->app14_color_transform = -1; // valid values are 0,1,2 + z->marker = STBI__MARKER_none; // initialize cached marker to empty + m = stbi__get_marker(z); + if (!stbi__SOI(m)) return stbi__err("no SOI","Corrupt JPEG"); + if (scan == STBI__SCAN_type) return 1; + m = stbi__get_marker(z); + while (!stbi__SOF(m)) { + if (!stbi__process_marker(z,m)) return 0; + m = stbi__get_marker(z); + while (m == STBI__MARKER_none) { + // some files have extra padding after their blocks, so ok, we'll scan + if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG"); + m = stbi__get_marker(z); + } + } + z->progressive = stbi__SOF_progressive(m); + if (!stbi__process_frame_header(z, scan)) return 0; + return 1; +} + +// decode image to YCbCr format +static int stbi__decode_jpeg_image(stbi__jpeg *j) +{ + int m; + for (m = 0; m < 4; m++) { + j->img_comp[m].raw_data = NULL; + j->img_comp[m].raw_coeff = NULL; + } + j->restart_interval = 0; + if (!stbi__decode_jpeg_header(j, STBI__SCAN_load)) return 0; + m = stbi__get_marker(j); + while (!stbi__EOI(m)) { + if (stbi__SOS(m)) { + if (!stbi__process_scan_header(j)) return 0; + if (!stbi__parse_entropy_coded_data(j)) return 0; + if (j->marker == STBI__MARKER_none ) { + // handle 0s at the end of image data from IP Kamera 9060 + while (!stbi__at_eof(j->s)) { + int x = stbi__get8(j->s); + if (x == 255) { + j->marker = stbi__get8(j->s); + break; + } + } + // if we reach eof without hitting a marker, stbi__get_marker() below will fail and we'll eventually return 0 + } + } else if (stbi__DNL(m)) { + int Ld = stbi__get16be(j->s); + stbi__uint32 NL = stbi__get16be(j->s); + if (Ld != 4) return stbi__err("bad DNL len", "Corrupt JPEG"); + if (NL != j->s->img_y) return stbi__err("bad DNL height", "Corrupt JPEG"); + } else { + if (!stbi__process_marker(j, m)) return 0; + } + m = stbi__get_marker(j); + } + if (j->progressive) + stbi__jpeg_finish(j); + return 1; +} + +// static jfif-centered resampling (across block boundaries) + +typedef stbi_uc *(*resample_row_func)(stbi_uc *out, stbi_uc *in0, stbi_uc *in1, + int w, int hs); + +#define stbi__div4(x) ((stbi_uc) ((x) >> 2)) + +static stbi_uc *resample_row_1(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) +{ + STBI_NOTUSED(out); + STBI_NOTUSED(in_far); + STBI_NOTUSED(w); + STBI_NOTUSED(hs); + return in_near; +} + +static stbi_uc* stbi__resample_row_v_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) +{ + // need to generate two samples vertically for every one in input + int i; + STBI_NOTUSED(hs); + for (i=0; i < w; ++i) + out[i] = stbi__div4(3*in_near[i] + in_far[i] + 2); + return out; +} + +static stbi_uc* stbi__resample_row_h_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) +{ + // need to generate two samples horizontally for every one in input + int i; + stbi_uc *input = in_near; + + if (w == 1) { + // if only one sample, can't do any interpolation + out[0] = out[1] = input[0]; + return out; + } + + out[0] = input[0]; + out[1] = stbi__div4(input[0]*3 + input[1] + 2); + for (i=1; i < w-1; ++i) { + int n = 3*input[i]+2; + out[i*2+0] = stbi__div4(n+input[i-1]); + out[i*2+1] = stbi__div4(n+input[i+1]); + } + out[i*2+0] = stbi__div4(input[w-2]*3 + input[w-1] + 2); + out[i*2+1] = input[w-1]; + + STBI_NOTUSED(in_far); + STBI_NOTUSED(hs); + + return out; +} + +#define stbi__div16(x) ((stbi_uc) ((x) >> 4)) + +static stbi_uc *stbi__resample_row_hv_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) +{ + // need to generate 2x2 samples for every one in input + int i,t0,t1; + if (w == 1) { + out[0] = out[1] = stbi__div4(3*in_near[0] + in_far[0] + 2); + return out; + } + + t1 = 3*in_near[0] + in_far[0]; + out[0] = stbi__div4(t1+2); + for (i=1; i < w; ++i) { + t0 = t1; + t1 = 3*in_near[i]+in_far[i]; + out[i*2-1] = stbi__div16(3*t0 + t1 + 8); + out[i*2 ] = stbi__div16(3*t1 + t0 + 8); + } + out[w*2-1] = stbi__div4(t1+2); + + STBI_NOTUSED(hs); + + return out; +} + +#if defined(STBI_SSE2) || defined(STBI_NEON) +static stbi_uc *stbi__resample_row_hv_2_simd(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) +{ + // need to generate 2x2 samples for every one in input + int i=0,t0,t1; + + if (w == 1) { + out[0] = out[1] = stbi__div4(3*in_near[0] + in_far[0] + 2); + return out; + } + + t1 = 3*in_near[0] + in_far[0]; + // process groups of 8 pixels for as long as we can. + // note we can't handle the last pixel in a row in this loop + // because we need to handle the filter boundary conditions. + for (; i < ((w-1) & ~7); i += 8) { +#if defined(STBI_SSE2) + // load and perform the vertical filtering pass + // this uses 3*x + y = 4*x + (y - x) + __m128i zero = _mm_setzero_si128(); + __m128i farb = _mm_loadl_epi64((__m128i *) (in_far + i)); + __m128i nearb = _mm_loadl_epi64((__m128i *) (in_near + i)); + __m128i farw = _mm_unpacklo_epi8(farb, zero); + __m128i nearw = _mm_unpacklo_epi8(nearb, zero); + __m128i diff = _mm_sub_epi16(farw, nearw); + __m128i nears = _mm_slli_epi16(nearw, 2); + __m128i curr = _mm_add_epi16(nears, diff); // current row + + // horizontal filter works the same based on shifted vers of current + // row. "prev" is current row shifted right by 1 pixel; we need to + // insert the previous pixel value (from t1). + // "next" is current row shifted left by 1 pixel, with first pixel + // of next block of 8 pixels added in. + __m128i prv0 = _mm_slli_si128(curr, 2); + __m128i nxt0 = _mm_srli_si128(curr, 2); + __m128i prev = _mm_insert_epi16(prv0, t1, 0); + __m128i next = _mm_insert_epi16(nxt0, 3*in_near[i+8] + in_far[i+8], 7); + + // horizontal filter, polyphase implementation since it's convenient: + // even pixels = 3*cur + prev = cur*4 + (prev - cur) + // odd pixels = 3*cur + next = cur*4 + (next - cur) + // note the shared term. + __m128i bias = _mm_set1_epi16(8); + __m128i curs = _mm_slli_epi16(curr, 2); + __m128i prvd = _mm_sub_epi16(prev, curr); + __m128i nxtd = _mm_sub_epi16(next, curr); + __m128i curb = _mm_add_epi16(curs, bias); + __m128i even = _mm_add_epi16(prvd, curb); + __m128i odd = _mm_add_epi16(nxtd, curb); + + // interleave even and odd pixels, then undo scaling. + __m128i int0 = _mm_unpacklo_epi16(even, odd); + __m128i int1 = _mm_unpackhi_epi16(even, odd); + __m128i de0 = _mm_srli_epi16(int0, 4); + __m128i de1 = _mm_srli_epi16(int1, 4); + + // pack and write output + __m128i outv = _mm_packus_epi16(de0, de1); + _mm_storeu_si128((__m128i *) (out + i*2), outv); +#elif defined(STBI_NEON) + // load and perform the vertical filtering pass + // this uses 3*x + y = 4*x + (y - x) + uint8x8_t farb = vld1_u8(in_far + i); + uint8x8_t nearb = vld1_u8(in_near + i); + int16x8_t diff = vreinterpretq_s16_u16(vsubl_u8(farb, nearb)); + int16x8_t nears = vreinterpretq_s16_u16(vshll_n_u8(nearb, 2)); + int16x8_t curr = vaddq_s16(nears, diff); // current row + + // horizontal filter works the same based on shifted vers of current + // row. "prev" is current row shifted right by 1 pixel; we need to + // insert the previous pixel value (from t1). + // "next" is current row shifted left by 1 pixel, with first pixel + // of next block of 8 pixels added in. + int16x8_t prv0 = vextq_s16(curr, curr, 7); + int16x8_t nxt0 = vextq_s16(curr, curr, 1); + int16x8_t prev = vsetq_lane_s16(t1, prv0, 0); + int16x8_t next = vsetq_lane_s16(3*in_near[i+8] + in_far[i+8], nxt0, 7); + + // horizontal filter, polyphase implementation since it's convenient: + // even pixels = 3*cur + prev = cur*4 + (prev - cur) + // odd pixels = 3*cur + next = cur*4 + (next - cur) + // note the shared term. + int16x8_t curs = vshlq_n_s16(curr, 2); + int16x8_t prvd = vsubq_s16(prev, curr); + int16x8_t nxtd = vsubq_s16(next, curr); + int16x8_t even = vaddq_s16(curs, prvd); + int16x8_t odd = vaddq_s16(curs, nxtd); + + // undo scaling and round, then store with even/odd phases interleaved + uint8x8x2_t o; + o.val[0] = vqrshrun_n_s16(even, 4); + o.val[1] = vqrshrun_n_s16(odd, 4); + vst2_u8(out + i*2, o); +#endif + + // "previous" value for next iter + t1 = 3*in_near[i+7] + in_far[i+7]; + } + + t0 = t1; + t1 = 3*in_near[i] + in_far[i]; + out[i*2] = stbi__div16(3*t1 + t0 + 8); + + for (++i; i < w; ++i) { + t0 = t1; + t1 = 3*in_near[i]+in_far[i]; + out[i*2-1] = stbi__div16(3*t0 + t1 + 8); + out[i*2 ] = stbi__div16(3*t1 + t0 + 8); + } + out[w*2-1] = stbi__div4(t1+2); + + STBI_NOTUSED(hs); + + return out; +} +#endif + +static stbi_uc *stbi__resample_row_generic(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) +{ + // resample with nearest-neighbor + int i,j; + STBI_NOTUSED(in_far); + for (i=0; i < w; ++i) + for (j=0; j < hs; ++j) + out[i*hs+j] = in_near[i]; + return out; +} + +// this is a reduced-precision calculation of YCbCr-to-RGB introduced +// to make sure the code produces the same results in both SIMD and scalar +#define stbi__float2fixed(x) (((int) ((x) * 4096.0f + 0.5f)) << 8) +static void stbi__YCbCr_to_RGB_row(stbi_uc *out, const stbi_uc *y, const stbi_uc *pcb, const stbi_uc *pcr, int count, int step) +{ + int i; + for (i=0; i < count; ++i) { + int y_fixed = (y[i] << 20) + (1<<19); // rounding + int r,g,b; + int cr = pcr[i] - 128; + int cb = pcb[i] - 128; + r = y_fixed + cr* stbi__float2fixed(1.40200f); + g = y_fixed + (cr*-stbi__float2fixed(0.71414f)) + ((cb*-stbi__float2fixed(0.34414f)) & 0xffff0000); + b = y_fixed + cb* stbi__float2fixed(1.77200f); + r >>= 20; + g >>= 20; + b >>= 20; + if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; } + if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; } + if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; } + out[0] = (stbi_uc)r; + out[1] = (stbi_uc)g; + out[2] = (stbi_uc)b; + out[3] = 255; + out += step; + } +} + +#if defined(STBI_SSE2) || defined(STBI_NEON) +static void stbi__YCbCr_to_RGB_simd(stbi_uc *out, stbi_uc const *y, stbi_uc const *pcb, stbi_uc const *pcr, int count, int step) +{ + int i = 0; + +#ifdef STBI_SSE2 + // step == 3 is pretty ugly on the final interleave, and i'm not convinced + // it's useful in practice (you wouldn't use it for textures, for example). + // so just accelerate step == 4 case. + if (step == 4) { + // this is a fairly straightforward implementation and not super-optimized. + __m128i signflip = _mm_set1_epi8(-0x80); + __m128i cr_const0 = _mm_set1_epi16( (short) ( 1.40200f*4096.0f+0.5f)); + __m128i cr_const1 = _mm_set1_epi16( - (short) ( 0.71414f*4096.0f+0.5f)); + __m128i cb_const0 = _mm_set1_epi16( - (short) ( 0.34414f*4096.0f+0.5f)); + __m128i cb_const1 = _mm_set1_epi16( (short) ( 1.77200f*4096.0f+0.5f)); + __m128i y_bias = _mm_set1_epi8((char) (unsigned char) 128); + __m128i xw = _mm_set1_epi16(255); // alpha channel + + for (; i+7 < count; i += 8) { + // load + __m128i y_bytes = _mm_loadl_epi64((__m128i *) (y+i)); + __m128i cr_bytes = _mm_loadl_epi64((__m128i *) (pcr+i)); + __m128i cb_bytes = _mm_loadl_epi64((__m128i *) (pcb+i)); + __m128i cr_biased = _mm_xor_si128(cr_bytes, signflip); // -128 + __m128i cb_biased = _mm_xor_si128(cb_bytes, signflip); // -128 + + // unpack to short (and left-shift cr, cb by 8) + __m128i yw = _mm_unpacklo_epi8(y_bias, y_bytes); + __m128i crw = _mm_unpacklo_epi8(_mm_setzero_si128(), cr_biased); + __m128i cbw = _mm_unpacklo_epi8(_mm_setzero_si128(), cb_biased); + + // color transform + __m128i yws = _mm_srli_epi16(yw, 4); + __m128i cr0 = _mm_mulhi_epi16(cr_const0, crw); + __m128i cb0 = _mm_mulhi_epi16(cb_const0, cbw); + __m128i cb1 = _mm_mulhi_epi16(cbw, cb_const1); + __m128i cr1 = _mm_mulhi_epi16(crw, cr_const1); + __m128i rws = _mm_add_epi16(cr0, yws); + __m128i gwt = _mm_add_epi16(cb0, yws); + __m128i bws = _mm_add_epi16(yws, cb1); + __m128i gws = _mm_add_epi16(gwt, cr1); + + // descale + __m128i rw = _mm_srai_epi16(rws, 4); + __m128i bw = _mm_srai_epi16(bws, 4); + __m128i gw = _mm_srai_epi16(gws, 4); + + // back to byte, set up for transpose + __m128i brb = _mm_packus_epi16(rw, bw); + __m128i gxb = _mm_packus_epi16(gw, xw); + + // transpose to interleave channels + __m128i t0 = _mm_unpacklo_epi8(brb, gxb); + __m128i t1 = _mm_unpackhi_epi8(brb, gxb); + __m128i o0 = _mm_unpacklo_epi16(t0, t1); + __m128i o1 = _mm_unpackhi_epi16(t0, t1); + + // store + _mm_storeu_si128((__m128i *) (out + 0), o0); + _mm_storeu_si128((__m128i *) (out + 16), o1); + out += 32; + } + } +#endif + +#ifdef STBI_NEON + // in this version, step=3 support would be easy to add. but is there demand? + if (step == 4) { + // this is a fairly straightforward implementation and not super-optimized. + uint8x8_t signflip = vdup_n_u8(0x80); + int16x8_t cr_const0 = vdupq_n_s16( (short) ( 1.40200f*4096.0f+0.5f)); + int16x8_t cr_const1 = vdupq_n_s16( - (short) ( 0.71414f*4096.0f+0.5f)); + int16x8_t cb_const0 = vdupq_n_s16( - (short) ( 0.34414f*4096.0f+0.5f)); + int16x8_t cb_const1 = vdupq_n_s16( (short) ( 1.77200f*4096.0f+0.5f)); + + for (; i+7 < count; i += 8) { + // load + uint8x8_t y_bytes = vld1_u8(y + i); + uint8x8_t cr_bytes = vld1_u8(pcr + i); + uint8x8_t cb_bytes = vld1_u8(pcb + i); + int8x8_t cr_biased = vreinterpret_s8_u8(vsub_u8(cr_bytes, signflip)); + int8x8_t cb_biased = vreinterpret_s8_u8(vsub_u8(cb_bytes, signflip)); + + // expand to s16 + int16x8_t yws = vreinterpretq_s16_u16(vshll_n_u8(y_bytes, 4)); + int16x8_t crw = vshll_n_s8(cr_biased, 7); + int16x8_t cbw = vshll_n_s8(cb_biased, 7); + + // color transform + int16x8_t cr0 = vqdmulhq_s16(crw, cr_const0); + int16x8_t cb0 = vqdmulhq_s16(cbw, cb_const0); + int16x8_t cr1 = vqdmulhq_s16(crw, cr_const1); + int16x8_t cb1 = vqdmulhq_s16(cbw, cb_const1); + int16x8_t rws = vaddq_s16(yws, cr0); + int16x8_t gws = vaddq_s16(vaddq_s16(yws, cb0), cr1); + int16x8_t bws = vaddq_s16(yws, cb1); + + // undo scaling, round, convert to byte + uint8x8x4_t o; + o.val[0] = vqrshrun_n_s16(rws, 4); + o.val[1] = vqrshrun_n_s16(gws, 4); + o.val[2] = vqrshrun_n_s16(bws, 4); + o.val[3] = vdup_n_u8(255); + + // store, interleaving r/g/b/a + vst4_u8(out, o); + out += 8*4; + } + } +#endif + + for (; i < count; ++i) { + int y_fixed = (y[i] << 20) + (1<<19); // rounding + int r,g,b; + int cr = pcr[i] - 128; + int cb = pcb[i] - 128; + r = y_fixed + cr* stbi__float2fixed(1.40200f); + g = y_fixed + cr*-stbi__float2fixed(0.71414f) + ((cb*-stbi__float2fixed(0.34414f)) & 0xffff0000); + b = y_fixed + cb* stbi__float2fixed(1.77200f); + r >>= 20; + g >>= 20; + b >>= 20; + if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; } + if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; } + if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; } + out[0] = (stbi_uc)r; + out[1] = (stbi_uc)g; + out[2] = (stbi_uc)b; + out[3] = 255; + out += step; + } +} +#endif + +// set up the kernels +static void stbi__setup_jpeg(stbi__jpeg *j) +{ + j->idct_block_kernel = stbi__idct_block; + j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row; + j->resample_row_hv_2_kernel = stbi__resample_row_hv_2; + +#ifdef STBI_SSE2 + if (stbi__sse2_available()) { + j->idct_block_kernel = stbi__idct_simd; + j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; + j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; + } +#endif + +#ifdef STBI_NEON + j->idct_block_kernel = stbi__idct_simd; + j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; + j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; +#endif +} + +// clean up the temporary component buffers +static void stbi__cleanup_jpeg(stbi__jpeg *j) +{ + stbi__free_jpeg_components(j, j->s->img_n, 0); +} + +typedef struct +{ + resample_row_func resample; + stbi_uc *line0,*line1; + int hs,vs; // expansion factor in each axis + int w_lores; // horizontal pixels pre-expansion + int ystep; // how far through vertical expansion we are + int ypos; // which pre-expansion row we're on +} stbi__resample; + +// fast 0..255 * 0..255 => 0..255 rounded multiplication +static stbi_uc stbi__blinn_8x8(stbi_uc x, stbi_uc y) +{ + unsigned int t = x*y + 128; + return (stbi_uc) ((t + (t >>8)) >> 8); +} + +static stbi_uc *load_jpeg_image(stbi__jpeg *z, int *out_x, int *out_y, int *comp, int req_comp) +{ + int n, decode_n, is_rgb; + z->s->img_n = 0; // make stbi__cleanup_jpeg safe + + // validate req_comp + if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); + + // load a jpeg image from whichever source, but leave in YCbCr format + if (!stbi__decode_jpeg_image(z)) { stbi__cleanup_jpeg(z); return NULL; } + + // determine actual number of components to generate + n = req_comp ? req_comp : z->s->img_n >= 3 ? 3 : 1; + + is_rgb = z->s->img_n == 3 && (z->rgb == 3 || (z->app14_color_transform == 0 && !z->jfif)); + + if (z->s->img_n == 3 && n < 3 && !is_rgb) + decode_n = 1; + else + decode_n = z->s->img_n; + + // resample and color-convert + { + int k; + unsigned int i,j; + stbi_uc *output; + stbi_uc *coutput[4] = { NULL, NULL, NULL, NULL }; + + stbi__resample res_comp[4]; + + for (k=0; k < decode_n; ++k) { + stbi__resample *r = &res_comp[k]; + + // allocate line buffer big enough for upsampling off the edges + // with upsample factor of 4 + z->img_comp[k].linebuf = (stbi_uc *) stbi__malloc(z->s->img_x + 3); + if (!z->img_comp[k].linebuf) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } + + r->hs = z->img_h_max / z->img_comp[k].h; + r->vs = z->img_v_max / z->img_comp[k].v; + r->ystep = r->vs >> 1; + r->w_lores = (z->s->img_x + r->hs-1) / r->hs; + r->ypos = 0; + r->line0 = r->line1 = z->img_comp[k].data; + + if (r->hs == 1 && r->vs == 1) r->resample = resample_row_1; + else if (r->hs == 1 && r->vs == 2) r->resample = stbi__resample_row_v_2; + else if (r->hs == 2 && r->vs == 1) r->resample = stbi__resample_row_h_2; + else if (r->hs == 2 && r->vs == 2) r->resample = z->resample_row_hv_2_kernel; + else r->resample = stbi__resample_row_generic; + } + + // can't error after this so, this is safe + output = (stbi_uc *) stbi__malloc_mad3(n, z->s->img_x, z->s->img_y, 1); + if (!output) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } + + // now go ahead and resample + for (j=0; j < z->s->img_y; ++j) { + stbi_uc *out = output + n * z->s->img_x * j; + for (k=0; k < decode_n; ++k) { + stbi__resample *r = &res_comp[k]; + int y_bot = r->ystep >= (r->vs >> 1); + coutput[k] = r->resample(z->img_comp[k].linebuf, + y_bot ? r->line1 : r->line0, + y_bot ? r->line0 : r->line1, + r->w_lores, r->hs); + if (++r->ystep >= r->vs) { + r->ystep = 0; + r->line0 = r->line1; + if (++r->ypos < z->img_comp[k].y) + r->line1 += z->img_comp[k].w2; + } + } + if (n >= 3) { + stbi_uc *y = coutput[0]; + if (z->s->img_n == 3) { + if (is_rgb) { + for (i=0; i < z->s->img_x; ++i) { + out[0] = y[i]; + out[1] = coutput[1][i]; + out[2] = coutput[2][i]; + out[3] = 255; + out += n; + } + } else { + z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); + } + } else if (z->s->img_n == 4) { + if (z->app14_color_transform == 0) { // CMYK + for (i=0; i < z->s->img_x; ++i) { + stbi_uc m = coutput[3][i]; + out[0] = stbi__blinn_8x8(coutput[0][i], m); + out[1] = stbi__blinn_8x8(coutput[1][i], m); + out[2] = stbi__blinn_8x8(coutput[2][i], m); + out[3] = 255; + out += n; + } + } else if (z->app14_color_transform == 2) { // YCCK + z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); + for (i=0; i < z->s->img_x; ++i) { + stbi_uc m = coutput[3][i]; + out[0] = stbi__blinn_8x8(255 - out[0], m); + out[1] = stbi__blinn_8x8(255 - out[1], m); + out[2] = stbi__blinn_8x8(255 - out[2], m); + out += n; + } + } else { // YCbCr + alpha? Ignore the fourth channel for now + z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); + } + } else + for (i=0; i < z->s->img_x; ++i) { + out[0] = out[1] = out[2] = y[i]; + out[3] = 255; // not used if n==3 + out += n; + } + } else { + if (is_rgb) { + if (n == 1) + for (i=0; i < z->s->img_x; ++i) + *out++ = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); + else { + for (i=0; i < z->s->img_x; ++i, out += 2) { + out[0] = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); + out[1] = 255; + } + } + } else if (z->s->img_n == 4 && z->app14_color_transform == 0) { + for (i=0; i < z->s->img_x; ++i) { + stbi_uc m = coutput[3][i]; + stbi_uc r = stbi__blinn_8x8(coutput[0][i], m); + stbi_uc g = stbi__blinn_8x8(coutput[1][i], m); + stbi_uc b = stbi__blinn_8x8(coutput[2][i], m); + out[0] = stbi__compute_y(r, g, b); + out[1] = 255; + out += n; + } + } else if (z->s->img_n == 4 && z->app14_color_transform == 2) { + for (i=0; i < z->s->img_x; ++i) { + out[0] = stbi__blinn_8x8(255 - coutput[0][i], coutput[3][i]); + out[1] = 255; + out += n; + } + } else { + stbi_uc *y = coutput[0]; + if (n == 1) + for (i=0; i < z->s->img_x; ++i) out[i] = y[i]; + else + for (i=0; i < z->s->img_x; ++i) { *out++ = y[i]; *out++ = 255; } + } + } + } + stbi__cleanup_jpeg(z); + *out_x = z->s->img_x; + *out_y = z->s->img_y; + if (comp) *comp = z->s->img_n >= 3 ? 3 : 1; // report original components, not output + return output; + } +} + +static void *stbi__jpeg_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) +{ + unsigned char* result; + stbi__jpeg* j = (stbi__jpeg*) stbi__malloc(sizeof(stbi__jpeg)); + STBI_NOTUSED(ri); + j->s = s; + stbi__setup_jpeg(j); + result = load_jpeg_image(j, x,y,comp,req_comp); + STBI_FREE(j); + return result; +} + +static int stbi__jpeg_test(stbi__context *s) +{ + int r; + stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); + j->s = s; + stbi__setup_jpeg(j); + r = stbi__decode_jpeg_header(j, STBI__SCAN_type); + stbi__rewind(s); + STBI_FREE(j); + return r; +} + +static int stbi__jpeg_info_raw(stbi__jpeg *j, int *x, int *y, int *comp) +{ + if (!stbi__decode_jpeg_header(j, STBI__SCAN_header)) { + stbi__rewind( j->s ); + return 0; + } + if (x) *x = j->s->img_x; + if (y) *y = j->s->img_y; + if (comp) *comp = j->s->img_n >= 3 ? 3 : 1; + return 1; +} + +static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp) +{ + int result; + stbi__jpeg* j = (stbi__jpeg*) (stbi__malloc(sizeof(stbi__jpeg))); + j->s = s; + result = stbi__jpeg_info_raw(j, x, y, comp); + STBI_FREE(j); + return result; +} +#endif + +// public domain zlib decode v0.2 Sean Barrett 2006-11-18 +// simple implementation +// - all input must be provided in an upfront buffer +// - all output is written to a single output buffer (can malloc/realloc) +// performance +// - fast huffman + +#ifndef STBI_NO_ZLIB + +// fast-way is faster to check than jpeg huffman, but slow way is slower +#define STBI__ZFAST_BITS 9 // accelerate all cases in default tables +#define STBI__ZFAST_MASK ((1 << STBI__ZFAST_BITS) - 1) + +// zlib-style huffman encoding +// (jpegs packs from left, zlib from right, so can't share code) +typedef struct +{ + stbi__uint16 fast[1 << STBI__ZFAST_BITS]; + stbi__uint16 firstcode[16]; + int maxcode[17]; + stbi__uint16 firstsymbol[16]; + stbi_uc size[288]; + stbi__uint16 value[288]; +} stbi__zhuffman; + +stbi_inline static int stbi__bitreverse16(int n) +{ + n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1); + n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2); + n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4); + n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); + return n; +} + +stbi_inline static int stbi__bit_reverse(int v, int bits) +{ + STBI_ASSERT(bits <= 16); + // to bit reverse n bits, reverse 16 and shift + // e.g. 11 bits, bit reverse and shift away 5 + return stbi__bitreverse16(v) >> (16-bits); +} + +static int stbi__zbuild_huffman(stbi__zhuffman *z, const stbi_uc *sizelist, int num) +{ + int i,k=0; + int code, next_code[16], sizes[17]; + + // DEFLATE spec for generating codes + memset(sizes, 0, sizeof(sizes)); + memset(z->fast, 0, sizeof(z->fast)); + for (i=0; i < num; ++i) + ++sizes[sizelist[i]]; + sizes[0] = 0; + for (i=1; i < 16; ++i) + if (sizes[i] > (1 << i)) + return stbi__err("bad sizes", "Corrupt PNG"); + code = 0; + for (i=1; i < 16; ++i) { + next_code[i] = code; + z->firstcode[i] = (stbi__uint16) code; + z->firstsymbol[i] = (stbi__uint16) k; + code = (code + sizes[i]); + if (sizes[i]) + if (code-1 >= (1 << i)) return stbi__err("bad codelengths","Corrupt PNG"); + z->maxcode[i] = code << (16-i); // preshift for inner loop + code <<= 1; + k += sizes[i]; + } + z->maxcode[16] = 0x10000; // sentinel + for (i=0; i < num; ++i) { + int s = sizelist[i]; + if (s) { + int c = next_code[s] - z->firstcode[s] + z->firstsymbol[s]; + stbi__uint16 fastv = (stbi__uint16) ((s << 9) | i); + z->size [c] = (stbi_uc ) s; + z->value[c] = (stbi__uint16) i; + if (s <= STBI__ZFAST_BITS) { + int j = stbi__bit_reverse(next_code[s],s); + while (j < (1 << STBI__ZFAST_BITS)) { + z->fast[j] = fastv; + j += (1 << s); + } + } + ++next_code[s]; + } + } + return 1; +} + +// zlib-from-memory implementation for PNG reading +// because PNG allows splitting the zlib stream arbitrarily, +// and it's annoying structurally to have PNG call ZLIB call PNG, +// we require PNG read all the IDATs and combine them into a single +// memory buffer + +typedef struct +{ + stbi_uc *zbuffer, *zbuffer_end; + int num_bits; + stbi__uint32 code_buffer; + + char *zout; + char *zout_start; + char *zout_end; + int z_expandable; + + stbi__zhuffman z_length, z_distance; +} stbi__zbuf; + +stbi_inline static stbi_uc stbi__zget8(stbi__zbuf *z) +{ + if (z->zbuffer >= z->zbuffer_end) return 0; + return *z->zbuffer++; +} + +static void stbi__fill_bits(stbi__zbuf *z) +{ + do { + STBI_ASSERT(z->code_buffer < (1U << z->num_bits)); + z->code_buffer |= (unsigned int) stbi__zget8(z) << z->num_bits; + z->num_bits += 8; + } while (z->num_bits <= 24); +} + +stbi_inline static unsigned int stbi__zreceive(stbi__zbuf *z, int n) +{ + unsigned int k; + if (z->num_bits < n) stbi__fill_bits(z); + k = z->code_buffer & ((1 << n) - 1); + z->code_buffer >>= n; + z->num_bits -= n; + return k; +} + +static int stbi__zhuffman_decode_slowpath(stbi__zbuf *a, stbi__zhuffman *z) +{ + int b,s,k; + // not resolved by fast table, so compute it the slow way + // use jpeg approach, which requires MSbits at top + k = stbi__bit_reverse(a->code_buffer, 16); + for (s=STBI__ZFAST_BITS+1; ; ++s) + if (k < z->maxcode[s]) + break; + if (s == 16) return -1; // invalid code! + // code size is s, so: + b = (k >> (16-s)) - z->firstcode[s] + z->firstsymbol[s]; + STBI_ASSERT(z->size[b] == s); + a->code_buffer >>= s; + a->num_bits -= s; + return z->value[b]; +} + +stbi_inline static int stbi__zhuffman_decode(stbi__zbuf *a, stbi__zhuffman *z) +{ + int b,s; + if (a->num_bits < 16) stbi__fill_bits(a); + b = z->fast[a->code_buffer & STBI__ZFAST_MASK]; + if (b) { + s = b >> 9; + a->code_buffer >>= s; + a->num_bits -= s; + return b & 511; + } + return stbi__zhuffman_decode_slowpath(a, z); +} + +static int stbi__zexpand(stbi__zbuf *z, char *zout, int n) // need to make room for n bytes +{ + char *q; + int cur, limit, old_limit; + z->zout = zout; + if (!z->z_expandable) return stbi__err("output buffer limit","Corrupt PNG"); + cur = (int) (z->zout - z->zout_start); + limit = old_limit = (int) (z->zout_end - z->zout_start); + while (cur + n > limit) + limit *= 2; + q = (char *) STBI_REALLOC_SIZED(z->zout_start, old_limit, limit); + STBI_NOTUSED(old_limit); + if (q == NULL) return stbi__err("outofmem", "Out of memory"); + z->zout_start = q; + z->zout = q + cur; + z->zout_end = q + limit; + return 1; +} + +static const int stbi__zlength_base[31] = { + 3,4,5,6,7,8,9,10,11,13, + 15,17,19,23,27,31,35,43,51,59, + 67,83,99,115,131,163,195,227,258,0,0 }; + +static const int stbi__zlength_extra[31]= +{ 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; + +static const int stbi__zdist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, +257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; + +static const int stbi__zdist_extra[32] = +{ 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; + +static int stbi__parse_huffman_block(stbi__zbuf *a) +{ + char *zout = a->zout; + for(;;) { + int z = stbi__zhuffman_decode(a, &a->z_length); + if (z < 256) { + if (z < 0) return stbi__err("bad huffman code","Corrupt PNG"); // error in huffman codes + if (zout >= a->zout_end) { + if (!stbi__zexpand(a, zout, 1)) return 0; + zout = a->zout; + } + *zout++ = (char) z; + } else { + stbi_uc *p; + int len,dist; + if (z == 256) { + a->zout = zout; + return 1; + } + z -= 257; + len = stbi__zlength_base[z]; + if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]); + z = stbi__zhuffman_decode(a, &a->z_distance); + if (z < 0) return stbi__err("bad huffman code","Corrupt PNG"); + dist = stbi__zdist_base[z]; + if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]); + if (zout - a->zout_start < dist) return stbi__err("bad dist","Corrupt PNG"); + if (zout + len > a->zout_end) { + if (!stbi__zexpand(a, zout, len)) return 0; + zout = a->zout; + } + p = (stbi_uc *) (zout - dist); + if (dist == 1) { // run of one byte; common in images. + stbi_uc v = *p; + if (len) { do *zout++ = v; while (--len); } + } else { + if (len) { do *zout++ = *p++; while (--len); } + } + } + } +} + +static int stbi__compute_huffman_codes(stbi__zbuf *a) +{ + static const stbi_uc length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; + stbi__zhuffman z_codelength; + stbi_uc lencodes[286+32+137];//padding for maximum single op + stbi_uc codelength_sizes[19]; + int i,n; + + int hlit = stbi__zreceive(a,5) + 257; + int hdist = stbi__zreceive(a,5) + 1; + int hclen = stbi__zreceive(a,4) + 4; + int ntot = hlit + hdist; + + memset(codelength_sizes, 0, sizeof(codelength_sizes)); + for (i=0; i < hclen; ++i) { + int s = stbi__zreceive(a,3); + codelength_sizes[length_dezigzag[i]] = (stbi_uc) s; + } + if (!stbi__zbuild_huffman(&z_codelength, codelength_sizes, 19)) return 0; + + n = 0; + while (n < ntot) { + int c = stbi__zhuffman_decode(a, &z_codelength); + if (c < 0 || c >= 19) return stbi__err("bad codelengths", "Corrupt PNG"); + if (c < 16) + lencodes[n++] = (stbi_uc) c; + else { + stbi_uc fill = 0; + if (c == 16) { + c = stbi__zreceive(a,2)+3; + if (n == 0) return stbi__err("bad codelengths", "Corrupt PNG"); + fill = lencodes[n-1]; + } else if (c == 17) + c = stbi__zreceive(a,3)+3; + else { + STBI_ASSERT(c == 18); + c = stbi__zreceive(a,7)+11; + } + if (ntot - n < c) return stbi__err("bad codelengths", "Corrupt PNG"); + memset(lencodes+n, fill, c); + n += c; + } + } + if (n != ntot) return stbi__err("bad codelengths","Corrupt PNG"); + if (!stbi__zbuild_huffman(&a->z_length, lencodes, hlit)) return 0; + if (!stbi__zbuild_huffman(&a->z_distance, lencodes+hlit, hdist)) return 0; + return 1; +} + +static int stbi__parse_uncompressed_block(stbi__zbuf *a) +{ + stbi_uc header[4]; + int len,nlen,k; + if (a->num_bits & 7) + stbi__zreceive(a, a->num_bits & 7); // discard + // drain the bit-packed data into header + k = 0; + while (a->num_bits > 0) { + header[k++] = (stbi_uc) (a->code_buffer & 255); // suppress MSVC run-time check + a->code_buffer >>= 8; + a->num_bits -= 8; + } + STBI_ASSERT(a->num_bits == 0); + // now fill header the normal way + while (k < 4) + header[k++] = stbi__zget8(a); + len = header[1] * 256 + header[0]; + nlen = header[3] * 256 + header[2]; + if (nlen != (len ^ 0xffff)) return stbi__err("zlib corrupt","Corrupt PNG"); + if (a->zbuffer + len > a->zbuffer_end) return stbi__err("read past buffer","Corrupt PNG"); + if (a->zout + len > a->zout_end) + if (!stbi__zexpand(a, a->zout, len)) return 0; + memcpy(a->zout, a->zbuffer, len); + a->zbuffer += len; + a->zout += len; + return 1; +} + +static int stbi__parse_zlib_header(stbi__zbuf *a) +{ + int cmf = stbi__zget8(a); + int cm = cmf & 15; + /* int cinfo = cmf >> 4; */ + int flg = stbi__zget8(a); + if ((cmf*256+flg) % 31 != 0) return stbi__err("bad zlib header","Corrupt PNG"); // zlib spec + if (flg & 32) return stbi__err("no preset dict","Corrupt PNG"); // preset dictionary not allowed in png + if (cm != 8) return stbi__err("bad compression","Corrupt PNG"); // DEFLATE required for png + // window = 1 << (8 + cinfo)... but who cares, we fully buffer output + return 1; +} + +static const stbi_uc stbi__zdefault_length[288] = +{ + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8 +}; +static const stbi_uc stbi__zdefault_distance[32] = +{ + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5 +}; +/* +Init algorithm: +{ + int i; // use <= to match clearly with spec + for (i=0; i <= 143; ++i) stbi__zdefault_length[i] = 8; + for ( ; i <= 255; ++i) stbi__zdefault_length[i] = 9; + for ( ; i <= 279; ++i) stbi__zdefault_length[i] = 7; + for ( ; i <= 287; ++i) stbi__zdefault_length[i] = 8; + + for (i=0; i <= 31; ++i) stbi__zdefault_distance[i] = 5; +} +*/ + +static int stbi__parse_zlib(stbi__zbuf *a, int parse_header) +{ + int final, type; + if (parse_header) + if (!stbi__parse_zlib_header(a)) return 0; + a->num_bits = 0; + a->code_buffer = 0; + do { + final = stbi__zreceive(a,1); + type = stbi__zreceive(a,2); + if (type == 0) { + if (!stbi__parse_uncompressed_block(a)) return 0; + } else if (type == 3) { + return 0; + } else { + if (type == 1) { + // use fixed code lengths + if (!stbi__zbuild_huffman(&a->z_length , stbi__zdefault_length , 288)) return 0; + if (!stbi__zbuild_huffman(&a->z_distance, stbi__zdefault_distance, 32)) return 0; + } else { + if (!stbi__compute_huffman_codes(a)) return 0; + } + if (!stbi__parse_huffman_block(a)) return 0; + } + } while (!final); + return 1; +} + +static int stbi__do_zlib(stbi__zbuf *a, char *obuf, int olen, int exp, int parse_header) +{ + a->zout_start = obuf; + a->zout = obuf; + a->zout_end = obuf + olen; + a->z_expandable = exp; + + return stbi__parse_zlib(a, parse_header); +} + +STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen) +{ + stbi__zbuf a; + char *p = (char *) stbi__malloc(initial_size); + if (p == NULL) return NULL; + a.zbuffer = (stbi_uc *) buffer; + a.zbuffer_end = (stbi_uc *) buffer + len; + if (stbi__do_zlib(&a, p, initial_size, 1, 1)) { + if (outlen) *outlen = (int) (a.zout - a.zout_start); + return a.zout_start; + } else { + STBI_FREE(a.zout_start); + return NULL; + } +} + +STBIDEF char *stbi_zlib_decode_malloc(char const *buffer, int len, int *outlen) +{ + return stbi_zlib_decode_malloc_guesssize(buffer, len, 16384, outlen); +} + +STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header) +{ + stbi__zbuf a; + char *p = (char *) stbi__malloc(initial_size); + if (p == NULL) return NULL; + a.zbuffer = (stbi_uc *) buffer; + a.zbuffer_end = (stbi_uc *) buffer + len; + if (stbi__do_zlib(&a, p, initial_size, 1, parse_header)) { + if (outlen) *outlen = (int) (a.zout - a.zout_start); + return a.zout_start; + } else { + STBI_FREE(a.zout_start); + return NULL; + } +} + +STBIDEF int stbi_zlib_decode_buffer(char *obuffer, int olen, char const *ibuffer, int ilen) +{ + stbi__zbuf a; + a.zbuffer = (stbi_uc *) ibuffer; + a.zbuffer_end = (stbi_uc *) ibuffer + ilen; + if (stbi__do_zlib(&a, obuffer, olen, 0, 1)) + return (int) (a.zout - a.zout_start); + else + return -1; +} + +STBIDEF char *stbi_zlib_decode_noheader_malloc(char const *buffer, int len, int *outlen) +{ + stbi__zbuf a; + char *p = (char *) stbi__malloc(16384); + if (p == NULL) return NULL; + a.zbuffer = (stbi_uc *) buffer; + a.zbuffer_end = (stbi_uc *) buffer+len; + if (stbi__do_zlib(&a, p, 16384, 1, 0)) { + if (outlen) *outlen = (int) (a.zout - a.zout_start); + return a.zout_start; + } else { + STBI_FREE(a.zout_start); + return NULL; + } +} + +STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen) +{ + stbi__zbuf a; + a.zbuffer = (stbi_uc *) ibuffer; + a.zbuffer_end = (stbi_uc *) ibuffer + ilen; + if (stbi__do_zlib(&a, obuffer, olen, 0, 0)) + return (int) (a.zout - a.zout_start); + else + return -1; +} +#endif + +// public domain "baseline" PNG decoder v0.10 Sean Barrett 2006-11-18 +// simple implementation +// - only 8-bit samples +// - no CRC checking +// - allocates lots of intermediate memory +// - avoids problem of streaming data between subsystems +// - avoids explicit window management +// performance +// - uses stb_zlib, a PD zlib implementation with fast huffman decoding + +#ifndef STBI_NO_PNG +typedef struct +{ + stbi__uint32 length; + stbi__uint32 type; +} stbi__pngchunk; + +static stbi__pngchunk stbi__get_chunk_header(stbi__context *s) +{ + stbi__pngchunk c; + c.length = stbi__get32be(s); + c.type = stbi__get32be(s); + return c; +} + +static int stbi__check_png_header(stbi__context *s) +{ + static const stbi_uc png_sig[8] = { 137,80,78,71,13,10,26,10 }; + int i; + for (i=0; i < 8; ++i) + if (stbi__get8(s) != png_sig[i]) return stbi__err("bad png sig","Not a PNG"); + return 1; +} + +typedef struct +{ + stbi__context *s; + stbi_uc *idata, *expanded, *out; + int depth; +} stbi__png; + + +enum { + STBI__F_none=0, + STBI__F_sub=1, + STBI__F_up=2, + STBI__F_avg=3, + STBI__F_paeth=4, + // synthetic filters used for first scanline to avoid needing a dummy row of 0s + STBI__F_avg_first, + STBI__F_paeth_first +}; + +static stbi_uc first_row_filter[5] = +{ + STBI__F_none, + STBI__F_sub, + STBI__F_none, + STBI__F_avg_first, + STBI__F_paeth_first +}; + +static int stbi__paeth(int a, int b, int c) +{ + int p = a + b - c; + int pa = abs(p-a); + int pb = abs(p-b); + int pc = abs(p-c); + if (pa <= pb && pa <= pc) return a; + if (pb <= pc) return b; + return c; +} + +static const stbi_uc stbi__depth_scale_table[9] = { 0, 0xff, 0x55, 0, 0x11, 0,0,0, 0x01 }; + +// create the png data from post-deflated data +static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__uint32 raw_len, int out_n, stbi__uint32 x, stbi__uint32 y, int depth, int color) +{ + int bytes = (depth == 16? 2 : 1); + stbi__context *s = a->s; + stbi__uint32 i,j,stride = x*out_n*bytes; + stbi__uint32 img_len, img_width_bytes; + int k; + int img_n = s->img_n; // copy it into a local for later + + int output_bytes = out_n*bytes; + int filter_bytes = img_n*bytes; + int width = x; + + STBI_ASSERT(out_n == s->img_n || out_n == s->img_n+1); + a->out = (stbi_uc *) stbi__malloc_mad3(x, y, output_bytes, 0); // extra bytes to write off the end into + if (!a->out) return stbi__err("outofmem", "Out of memory"); + + if (!stbi__mad3sizes_valid(img_n, x, depth, 7)) return stbi__err("too large", "Corrupt PNG"); + img_width_bytes = (((img_n * x * depth) + 7) >> 3); + img_len = (img_width_bytes + 1) * y; + + // we used to check for exact match between raw_len and img_len on non-interlaced PNGs, + // but issue #276 reported a PNG in the wild that had extra data at the end (all zeros), + // so just check for raw_len < img_len always. + if (raw_len < img_len) return stbi__err("not enough pixels","Corrupt PNG"); + + for (j=0; j < y; ++j) { + stbi_uc *cur = a->out + stride*j; + stbi_uc *prior; + int filter = *raw++; + + if (filter > 4) + return stbi__err("invalid filter","Corrupt PNG"); + + if (depth < 8) { + STBI_ASSERT(img_width_bytes <= x); + cur += x*out_n - img_width_bytes; // store output to the rightmost img_len bytes, so we can decode in place + filter_bytes = 1; + width = img_width_bytes; + } + prior = cur - stride; // bugfix: need to compute this after 'cur +=' computation above + + // if first row, use special filter that doesn't sample previous row + if (j == 0) filter = first_row_filter[filter]; + + // handle first byte explicitly + for (k=0; k < filter_bytes; ++k) { + switch (filter) { + case STBI__F_none : cur[k] = raw[k]; break; + case STBI__F_sub : cur[k] = raw[k]; break; + case STBI__F_up : cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break; + case STBI__F_avg : cur[k] = STBI__BYTECAST(raw[k] + (prior[k]>>1)); break; + case STBI__F_paeth : cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(0,prior[k],0)); break; + case STBI__F_avg_first : cur[k] = raw[k]; break; + case STBI__F_paeth_first: cur[k] = raw[k]; break; + } + } + + if (depth == 8) { + if (img_n != out_n) + cur[img_n] = 255; // first pixel + raw += img_n; + cur += out_n; + prior += out_n; + } else if (depth == 16) { + if (img_n != out_n) { + cur[filter_bytes] = 255; // first pixel top byte + cur[filter_bytes+1] = 255; // first pixel bottom byte + } + raw += filter_bytes; + cur += output_bytes; + prior += output_bytes; + } else { + raw += 1; + cur += 1; + prior += 1; + } + + // this is a little gross, so that we don't switch per-pixel or per-component + if (depth < 8 || img_n == out_n) { + int nk = (width - 1)*filter_bytes; + #define STBI__CASE(f) \ + case f: \ + for (k=0; k < nk; ++k) + switch (filter) { + // "none" filter turns into a memcpy here; make that explicit. + case STBI__F_none: memcpy(cur, raw, nk); break; + STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k-filter_bytes]); } break; + STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; + STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k-filter_bytes])>>1)); } break; + STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],prior[k],prior[k-filter_bytes])); } break; + STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k-filter_bytes] >> 1)); } break; + STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],0,0)); } break; + } + #undef STBI__CASE + raw += nk; + } else { + STBI_ASSERT(img_n+1 == out_n); + #define STBI__CASE(f) \ + case f: \ + for (i=x-1; i >= 1; --i, cur[filter_bytes]=255,raw+=filter_bytes,cur+=output_bytes,prior+=output_bytes) \ + for (k=0; k < filter_bytes; ++k) + switch (filter) { + STBI__CASE(STBI__F_none) { cur[k] = raw[k]; } break; + STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k- output_bytes]); } break; + STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; + STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k- output_bytes])>>1)); } break; + STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],prior[k],prior[k- output_bytes])); } break; + STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k- output_bytes] >> 1)); } break; + STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],0,0)); } break; + } + #undef STBI__CASE + + // the loop above sets the high byte of the pixels' alpha, but for + // 16 bit png files we also need the low byte set. we'll do that here. + if (depth == 16) { + cur = a->out + stride*j; // start at the beginning of the row again + for (i=0; i < x; ++i,cur+=output_bytes) { + cur[filter_bytes+1] = 255; + } + } + } + } + + // we make a separate pass to expand bits to pixels; for performance, + // this could run two scanlines behind the above code, so it won't + // intefere with filtering but will still be in the cache. + if (depth < 8) { + for (j=0; j < y; ++j) { + stbi_uc *cur = a->out + stride*j; + stbi_uc *in = a->out + stride*j + x*out_n - img_width_bytes; + // unpack 1/2/4-bit into a 8-bit buffer. allows us to keep the common 8-bit path optimal at minimal cost for 1/2/4-bit + // png guarante byte alignment, if width is not multiple of 8/4/2 we'll decode dummy trailing data that will be skipped in the later loop + stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range + + // note that the final byte might overshoot and write more data than desired. + // we can allocate enough data that this never writes out of memory, but it + // could also overwrite the next scanline. can it overwrite non-empty data + // on the next scanline? yes, consider 1-pixel-wide scanlines with 1-bit-per-pixel. + // so we need to explicitly clamp the final ones + + if (depth == 4) { + for (k=x*img_n; k >= 2; k-=2, ++in) { + *cur++ = scale * ((*in >> 4) ); + *cur++ = scale * ((*in ) & 0x0f); + } + if (k > 0) *cur++ = scale * ((*in >> 4) ); + } else if (depth == 2) { + for (k=x*img_n; k >= 4; k-=4, ++in) { + *cur++ = scale * ((*in >> 6) ); + *cur++ = scale * ((*in >> 4) & 0x03); + *cur++ = scale * ((*in >> 2) & 0x03); + *cur++ = scale * ((*in ) & 0x03); + } + if (k > 0) *cur++ = scale * ((*in >> 6) ); + if (k > 1) *cur++ = scale * ((*in >> 4) & 0x03); + if (k > 2) *cur++ = scale * ((*in >> 2) & 0x03); + } else if (depth == 1) { + for (k=x*img_n; k >= 8; k-=8, ++in) { + *cur++ = scale * ((*in >> 7) ); + *cur++ = scale * ((*in >> 6) & 0x01); + *cur++ = scale * ((*in >> 5) & 0x01); + *cur++ = scale * ((*in >> 4) & 0x01); + *cur++ = scale * ((*in >> 3) & 0x01); + *cur++ = scale * ((*in >> 2) & 0x01); + *cur++ = scale * ((*in >> 1) & 0x01); + *cur++ = scale * ((*in ) & 0x01); + } + if (k > 0) *cur++ = scale * ((*in >> 7) ); + if (k > 1) *cur++ = scale * ((*in >> 6) & 0x01); + if (k > 2) *cur++ = scale * ((*in >> 5) & 0x01); + if (k > 3) *cur++ = scale * ((*in >> 4) & 0x01); + if (k > 4) *cur++ = scale * ((*in >> 3) & 0x01); + if (k > 5) *cur++ = scale * ((*in >> 2) & 0x01); + if (k > 6) *cur++ = scale * ((*in >> 1) & 0x01); + } + if (img_n != out_n) { + int q; + // insert alpha = 255 + cur = a->out + stride*j; + if (img_n == 1) { + for (q=x-1; q >= 0; --q) { + cur[q*2+1] = 255; + cur[q*2+0] = cur[q]; + } + } else { + STBI_ASSERT(img_n == 3); + for (q=x-1; q >= 0; --q) { + cur[q*4+3] = 255; + cur[q*4+2] = cur[q*3+2]; + cur[q*4+1] = cur[q*3+1]; + cur[q*4+0] = cur[q*3+0]; + } + } + } + } + } else if (depth == 16) { + // force the image data from big-endian to platform-native. + // this is done in a separate pass due to the decoding relying + // on the data being untouched, but could probably be done + // per-line during decode if care is taken. + stbi_uc *cur = a->out; + stbi__uint16 *cur16 = (stbi__uint16*)cur; + + for(i=0; i < x*y*out_n; ++i,cur16++,cur+=2) { + *cur16 = (cur[0] << 8) | cur[1]; + } + } + + return 1; +} + +static int stbi__create_png_image(stbi__png *a, stbi_uc *image_data, stbi__uint32 image_data_len, int out_n, int depth, int color, int interlaced) +{ + int bytes = (depth == 16 ? 2 : 1); + int out_bytes = out_n * bytes; + stbi_uc *final; + int p; + if (!interlaced) + return stbi__create_png_image_raw(a, image_data, image_data_len, out_n, a->s->img_x, a->s->img_y, depth, color); + + // de-interlacing + final = (stbi_uc *) stbi__malloc_mad3(a->s->img_x, a->s->img_y, out_bytes, 0); + for (p=0; p < 7; ++p) { + int xorig[] = { 0,4,0,2,0,1,0 }; + int yorig[] = { 0,0,4,0,2,0,1 }; + int xspc[] = { 8,8,4,4,2,2,1 }; + int yspc[] = { 8,8,8,4,4,2,2 }; + int i,j,x,y; + // pass1_x[4] = 0, pass1_x[5] = 1, pass1_x[12] = 1 + x = (a->s->img_x - xorig[p] + xspc[p]-1) / xspc[p]; + y = (a->s->img_y - yorig[p] + yspc[p]-1) / yspc[p]; + if (x && y) { + stbi__uint32 img_len = ((((a->s->img_n * x * depth) + 7) >> 3) + 1) * y; + if (!stbi__create_png_image_raw(a, image_data, image_data_len, out_n, x, y, depth, color)) { + STBI_FREE(final); + return 0; + } + for (j=0; j < y; ++j) { + for (i=0; i < x; ++i) { + int out_y = j*yspc[p]+yorig[p]; + int out_x = i*xspc[p]+xorig[p]; + memcpy(final + out_y*a->s->img_x*out_bytes + out_x*out_bytes, + a->out + (j*x+i)*out_bytes, out_bytes); + } + } + STBI_FREE(a->out); + image_data += img_len; + image_data_len -= img_len; + } + } + a->out = final; + + return 1; +} + +static int stbi__compute_transparency(stbi__png *z, stbi_uc tc[3], int out_n) +{ + stbi__context *s = z->s; + stbi__uint32 i, pixel_count = s->img_x * s->img_y; + stbi_uc *p = z->out; + + // compute color-based transparency, assuming we've + // already got 255 as the alpha value in the output + STBI_ASSERT(out_n == 2 || out_n == 4); + + if (out_n == 2) { + for (i=0; i < pixel_count; ++i) { + p[1] = (p[0] == tc[0] ? 0 : 255); + p += 2; + } + } else { + for (i=0; i < pixel_count; ++i) { + if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) + p[3] = 0; + p += 4; + } + } + return 1; +} + +static int stbi__compute_transparency16(stbi__png *z, stbi__uint16 tc[3], int out_n) +{ + stbi__context *s = z->s; + stbi__uint32 i, pixel_count = s->img_x * s->img_y; + stbi__uint16 *p = (stbi__uint16*) z->out; + + // compute color-based transparency, assuming we've + // already got 65535 as the alpha value in the output + STBI_ASSERT(out_n == 2 || out_n == 4); + + if (out_n == 2) { + for (i = 0; i < pixel_count; ++i) { + p[1] = (p[0] == tc[0] ? 0 : 65535); + p += 2; + } + } else { + for (i = 0; i < pixel_count; ++i) { + if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) + p[3] = 0; + p += 4; + } + } + return 1; +} + +static int stbi__expand_png_palette(stbi__png *a, stbi_uc *palette, int len, int pal_img_n) +{ + stbi__uint32 i, pixel_count = a->s->img_x * a->s->img_y; + stbi_uc *p, *temp_out, *orig = a->out; + + p = (stbi_uc *) stbi__malloc_mad2(pixel_count, pal_img_n, 0); + if (p == NULL) return stbi__err("outofmem", "Out of memory"); + + // between here and free(out) below, exitting would leak + temp_out = p; + + if (pal_img_n == 3) { + for (i=0; i < pixel_count; ++i) { + int n = orig[i]*4; + p[0] = palette[n ]; + p[1] = palette[n+1]; + p[2] = palette[n+2]; + p += 3; + } + } else { + for (i=0; i < pixel_count; ++i) { + int n = orig[i]*4; + p[0] = palette[n ]; + p[1] = palette[n+1]; + p[2] = palette[n+2]; + p[3] = palette[n+3]; + p += 4; + } + } + STBI_FREE(a->out); + a->out = temp_out; + + STBI_NOTUSED(len); + + return 1; +} + +static int stbi__unpremultiply_on_load = 0; +static int stbi__de_iphone_flag = 0; + +STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply) +{ + stbi__unpremultiply_on_load = flag_true_if_should_unpremultiply; +} + +STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert) +{ + stbi__de_iphone_flag = flag_true_if_should_convert; +} + +static void stbi__de_iphone(stbi__png *z) +{ + stbi__context *s = z->s; + stbi__uint32 i, pixel_count = s->img_x * s->img_y; + stbi_uc *p = z->out; + + if (s->img_out_n == 3) { // convert bgr to rgb + for (i=0; i < pixel_count; ++i) { + stbi_uc t = p[0]; + p[0] = p[2]; + p[2] = t; + p += 3; + } + } else { + STBI_ASSERT(s->img_out_n == 4); + if (stbi__unpremultiply_on_load) { + // convert bgr to rgb and unpremultiply + for (i=0; i < pixel_count; ++i) { + stbi_uc a = p[3]; + stbi_uc t = p[0]; + if (a) { + stbi_uc half = a / 2; + p[0] = (p[2] * 255 + half) / a; + p[1] = (p[1] * 255 + half) / a; + p[2] = ( t * 255 + half) / a; + } else { + p[0] = p[2]; + p[2] = t; + } + p += 4; + } + } else { + // convert bgr to rgb + for (i=0; i < pixel_count; ++i) { + stbi_uc t = p[0]; + p[0] = p[2]; + p[2] = t; + p += 4; + } + } + } +} + +#define STBI__PNG_TYPE(a,b,c,d) (((unsigned) (a) << 24) + ((unsigned) (b) << 16) + ((unsigned) (c) << 8) + (unsigned) (d)) + +static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp) +{ + stbi_uc palette[1024], pal_img_n=0; + stbi_uc has_trans=0, tc[3]={0}; + stbi__uint16 tc16[3]; + stbi__uint32 ioff=0, idata_limit=0, i, pal_len=0; + int first=1,k,interlace=0, color=0, is_iphone=0; + stbi__context *s = z->s; + + z->expanded = NULL; + z->idata = NULL; + z->out = NULL; + + if (!stbi__check_png_header(s)) return 0; + + if (scan == STBI__SCAN_type) return 1; + + for (;;) { + stbi__pngchunk c = stbi__get_chunk_header(s); + switch (c.type) { + case STBI__PNG_TYPE('C','g','B','I'): + is_iphone = 1; + stbi__skip(s, c.length); + break; + case STBI__PNG_TYPE('I','H','D','R'): { + int comp,filter; + if (!first) return stbi__err("multiple IHDR","Corrupt PNG"); + first = 0; + if (c.length != 13) return stbi__err("bad IHDR len","Corrupt PNG"); + s->img_x = stbi__get32be(s); if (s->img_x > (1 << 24)) return stbi__err("too large","Very large image (corrupt?)"); + s->img_y = stbi__get32be(s); if (s->img_y > (1 << 24)) return stbi__err("too large","Very large image (corrupt?)"); + z->depth = stbi__get8(s); if (z->depth != 1 && z->depth != 2 && z->depth != 4 && z->depth != 8 && z->depth != 16) return stbi__err("1/2/4/8/16-bit only","PNG not supported: 1/2/4/8/16-bit only"); + color = stbi__get8(s); if (color > 6) return stbi__err("bad ctype","Corrupt PNG"); + if (color == 3 && z->depth == 16) return stbi__err("bad ctype","Corrupt PNG"); + if (color == 3) pal_img_n = 3; else if (color & 1) return stbi__err("bad ctype","Corrupt PNG"); + comp = stbi__get8(s); if (comp) return stbi__err("bad comp method","Corrupt PNG"); + filter= stbi__get8(s); if (filter) return stbi__err("bad filter method","Corrupt PNG"); + interlace = stbi__get8(s); if (interlace>1) return stbi__err("bad interlace method","Corrupt PNG"); + if (!s->img_x || !s->img_y) return stbi__err("0-pixel image","Corrupt PNG"); + if (!pal_img_n) { + s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0); + if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode"); + if (scan == STBI__SCAN_header) return 1; + } else { + // if paletted, then pal_n is our final components, and + // img_n is # components to decompress/filter. + s->img_n = 1; + if ((1 << 30) / s->img_x / 4 < s->img_y) return stbi__err("too large","Corrupt PNG"); + // if SCAN_header, have to scan to see if we have a tRNS + } + break; + } + + case STBI__PNG_TYPE('P','L','T','E'): { + if (first) return stbi__err("first not IHDR", "Corrupt PNG"); + if (c.length > 256*3) return stbi__err("invalid PLTE","Corrupt PNG"); + pal_len = c.length / 3; + if (pal_len * 3 != c.length) return stbi__err("invalid PLTE","Corrupt PNG"); + for (i=0; i < pal_len; ++i) { + palette[i*4+0] = stbi__get8(s); + palette[i*4+1] = stbi__get8(s); + palette[i*4+2] = stbi__get8(s); + palette[i*4+3] = 255; + } + break; + } + + case STBI__PNG_TYPE('t','R','N','S'): { + if (first) return stbi__err("first not IHDR", "Corrupt PNG"); + if (z->idata) return stbi__err("tRNS after IDAT","Corrupt PNG"); + if (pal_img_n) { + if (scan == STBI__SCAN_header) { s->img_n = 4; return 1; } + if (pal_len == 0) return stbi__err("tRNS before PLTE","Corrupt PNG"); + if (c.length > pal_len) return stbi__err("bad tRNS len","Corrupt PNG"); + pal_img_n = 4; + for (i=0; i < c.length; ++i) + palette[i*4+3] = stbi__get8(s); + } else { + if (!(s->img_n & 1)) return stbi__err("tRNS with alpha","Corrupt PNG"); + if (c.length != (stbi__uint32) s->img_n*2) return stbi__err("bad tRNS len","Corrupt PNG"); + has_trans = 1; + if (z->depth == 16) { + for (k = 0; k < s->img_n; ++k) tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is + } else { + for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger + } + } + break; + } + + case STBI__PNG_TYPE('I','D','A','T'): { + if (first) return stbi__err("first not IHDR", "Corrupt PNG"); + if (pal_img_n && !pal_len) return stbi__err("no PLTE","Corrupt PNG"); + if (scan == STBI__SCAN_header) { s->img_n = pal_img_n; return 1; } + if ((int)(ioff + c.length) < (int)ioff) return 0; + if (ioff + c.length > idata_limit) { + stbi__uint32 idata_limit_old = idata_limit; + stbi_uc *p; + if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096; + while (ioff + c.length > idata_limit) + idata_limit *= 2; + STBI_NOTUSED(idata_limit_old); + p = (stbi_uc *) STBI_REALLOC_SIZED(z->idata, idata_limit_old, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory"); + z->idata = p; + } + if (!stbi__getn(s, z->idata+ioff,c.length)) return stbi__err("outofdata","Corrupt PNG"); + ioff += c.length; + break; + } + + case STBI__PNG_TYPE('I','E','N','D'): { + stbi__uint32 raw_len, bpl; + if (first) return stbi__err("first not IHDR", "Corrupt PNG"); + if (scan != STBI__SCAN_load) return 1; + if (z->idata == NULL) return stbi__err("no IDAT","Corrupt PNG"); + // initial guess for decoded data size to avoid unnecessary reallocs + bpl = (s->img_x * z->depth + 7) / 8; // bytes per line, per component + raw_len = bpl * s->img_y * s->img_n /* pixels */ + s->img_y /* filter mode per row */; + z->expanded = (stbi_uc *) stbi_zlib_decode_malloc_guesssize_headerflag((char *) z->idata, ioff, raw_len, (int *) &raw_len, !is_iphone); + if (z->expanded == NULL) return 0; // zlib should set error + STBI_FREE(z->idata); z->idata = NULL; + if ((req_comp == s->img_n+1 && req_comp != 3 && !pal_img_n) || has_trans) + s->img_out_n = s->img_n+1; + else + s->img_out_n = s->img_n; + if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, z->depth, color, interlace)) return 0; + if (has_trans) { + if (z->depth == 16) { + if (!stbi__compute_transparency16(z, tc16, s->img_out_n)) return 0; + } else { + if (!stbi__compute_transparency(z, tc, s->img_out_n)) return 0; + } + } + if (is_iphone && stbi__de_iphone_flag && s->img_out_n > 2) + stbi__de_iphone(z); + if (pal_img_n) { + // pal_img_n == 3 or 4 + s->img_n = pal_img_n; // record the actual colors we had + s->img_out_n = pal_img_n; + if (req_comp >= 3) s->img_out_n = req_comp; + if (!stbi__expand_png_palette(z, palette, pal_len, s->img_out_n)) + return 0; + } else if (has_trans) { + // non-paletted image with tRNS -> source image has (constant) alpha + ++s->img_n; + } + STBI_FREE(z->expanded); z->expanded = NULL; + return 1; + } + + default: + // if critical, fail + if (first) return stbi__err("first not IHDR", "Corrupt PNG"); + if ((c.type & (1 << 29)) == 0) { + #ifndef STBI_NO_FAILURE_STRINGS + // not threadsafe + static char invalid_chunk[] = "XXXX PNG chunk not known"; + invalid_chunk[0] = STBI__BYTECAST(c.type >> 24); + invalid_chunk[1] = STBI__BYTECAST(c.type >> 16); + invalid_chunk[2] = STBI__BYTECAST(c.type >> 8); + invalid_chunk[3] = STBI__BYTECAST(c.type >> 0); + #endif + return stbi__err(invalid_chunk, "PNG not supported: unknown PNG chunk type"); + } + stbi__skip(s, c.length); + break; + } + // end of PNG chunk, read and skip CRC + stbi__get32be(s); + } +} + +static void *stbi__do_png(stbi__png *p, int *x, int *y, int *n, int req_comp, stbi__result_info *ri) +{ + void *result=NULL; + if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); + if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) { + if (p->depth < 8) + ri->bits_per_channel = 8; + else + ri->bits_per_channel = p->depth; + result = p->out; + p->out = NULL; + if (req_comp && req_comp != p->s->img_out_n) { + if (ri->bits_per_channel == 8) + result = stbi__convert_format((unsigned char *) result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); + else + result = stbi__convert_format16((stbi__uint16 *) result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); + p->s->img_out_n = req_comp; + if (result == NULL) return result; + } + *x = p->s->img_x; + *y = p->s->img_y; + if (n) *n = p->s->img_n; + } + STBI_FREE(p->out); p->out = NULL; + STBI_FREE(p->expanded); p->expanded = NULL; + STBI_FREE(p->idata); p->idata = NULL; + + return result; +} + +static void *stbi__png_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) +{ + stbi__png p; + p.s = s; + return stbi__do_png(&p, x,y,comp,req_comp, ri); +} + +static int stbi__png_test(stbi__context *s) +{ + int r; + r = stbi__check_png_header(s); + stbi__rewind(s); + return r; +} + +static int stbi__png_info_raw(stbi__png *p, int *x, int *y, int *comp) +{ + if (!stbi__parse_png_file(p, STBI__SCAN_header, 0)) { + stbi__rewind( p->s ); + return 0; + } + if (x) *x = p->s->img_x; + if (y) *y = p->s->img_y; + if (comp) *comp = p->s->img_n; + return 1; +} + +static int stbi__png_info(stbi__context *s, int *x, int *y, int *comp) +{ + stbi__png p; + p.s = s; + return stbi__png_info_raw(&p, x, y, comp); +} + +static int stbi__png_is16(stbi__context *s) +{ + stbi__png p; + p.s = s; + if (!stbi__png_info_raw(&p, NULL, NULL, NULL)) + return 0; + if (p.depth != 16) { + stbi__rewind(p.s); + return 0; + } + return 1; +} +#endif + +// Microsoft/Windows BMP image + +#ifndef STBI_NO_BMP +static int stbi__bmp_test_raw(stbi__context *s) +{ + int r; + int sz; + if (stbi__get8(s) != 'B') return 0; + if (stbi__get8(s) != 'M') return 0; + stbi__get32le(s); // discard filesize + stbi__get16le(s); // discard reserved + stbi__get16le(s); // discard reserved + stbi__get32le(s); // discard data offset + sz = stbi__get32le(s); + r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124); + return r; +} + +static int stbi__bmp_test(stbi__context *s) +{ + int r = stbi__bmp_test_raw(s); + stbi__rewind(s); + return r; +} + + +// returns 0..31 for the highest set bit +static int stbi__high_bit(unsigned int z) +{ + int n=0; + if (z == 0) return -1; + if (z >= 0x10000) { n += 16; z >>= 16; } + if (z >= 0x00100) { n += 8; z >>= 8; } + if (z >= 0x00010) { n += 4; z >>= 4; } + if (z >= 0x00004) { n += 2; z >>= 2; } + if (z >= 0x00002) { n += 1; z >>= 1; } + return n; +} + +static int stbi__bitcount(unsigned int a) +{ + a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 + a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4 + a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits + a = (a + (a >> 8)); // max 16 per 8 bits + a = (a + (a >> 16)); // max 32 per 8 bits + return a & 0xff; +} + +// extract an arbitrarily-aligned N-bit value (N=bits) +// from v, and then make it 8-bits long and fractionally +// extend it to full full range. +static int stbi__shiftsigned(unsigned int v, int shift, int bits) +{ + static unsigned int mul_table[9] = { + 0, + 0xff/*0b11111111*/, 0x55/*0b01010101*/, 0x49/*0b01001001*/, 0x11/*0b00010001*/, + 0x21/*0b00100001*/, 0x41/*0b01000001*/, 0x81/*0b10000001*/, 0x01/*0b00000001*/, + }; + static unsigned int shift_table[9] = { + 0, 0,0,1,0,2,4,6,0, + }; + if (shift < 0) + v <<= -shift; + else + v >>= shift; + STBI_ASSERT(v >= 0 && v < 256); + v >>= (8-bits); + STBI_ASSERT(bits >= 0 && bits <= 8); + return (int) ((unsigned) v * mul_table[bits]) >> shift_table[bits]; +} + +typedef struct +{ + int bpp, offset, hsz; + unsigned int mr,mg,mb,ma, all_a; +} stbi__bmp_data; + +static void *stbi__bmp_parse_header(stbi__context *s, stbi__bmp_data *info) +{ + int hsz; + if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP"); + stbi__get32le(s); // discard filesize + stbi__get16le(s); // discard reserved + stbi__get16le(s); // discard reserved + info->offset = stbi__get32le(s); + info->hsz = hsz = stbi__get32le(s); + info->mr = info->mg = info->mb = info->ma = 0; + + if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown"); + if (hsz == 12) { + s->img_x = stbi__get16le(s); + s->img_y = stbi__get16le(s); + } else { + s->img_x = stbi__get32le(s); + s->img_y = stbi__get32le(s); + } + if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP"); + info->bpp = stbi__get16le(s); + if (hsz != 12) { + int compress = stbi__get32le(s); + if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE"); + stbi__get32le(s); // discard sizeof + stbi__get32le(s); // discard hres + stbi__get32le(s); // discard vres + stbi__get32le(s); // discard colorsused + stbi__get32le(s); // discard max important + if (hsz == 40 || hsz == 56) { + if (hsz == 56) { + stbi__get32le(s); + stbi__get32le(s); + stbi__get32le(s); + stbi__get32le(s); + } + if (info->bpp == 16 || info->bpp == 32) { + if (compress == 0) { + if (info->bpp == 32) { + info->mr = 0xffu << 16; + info->mg = 0xffu << 8; + info->mb = 0xffu << 0; + info->ma = 0xffu << 24; + info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0 + } else { + info->mr = 31u << 10; + info->mg = 31u << 5; + info->mb = 31u << 0; + } + } else if (compress == 3) { + info->mr = stbi__get32le(s); + info->mg = stbi__get32le(s); + info->mb = stbi__get32le(s); + // not documented, but generated by photoshop and handled by mspaint + if (info->mr == info->mg && info->mg == info->mb) { + // ?!?!? + return stbi__errpuc("bad BMP", "bad BMP"); + } + } else + return stbi__errpuc("bad BMP", "bad BMP"); + } + } else { + int i; + if (hsz != 108 && hsz != 124) + return stbi__errpuc("bad BMP", "bad BMP"); + info->mr = stbi__get32le(s); + info->mg = stbi__get32le(s); + info->mb = stbi__get32le(s); + info->ma = stbi__get32le(s); + stbi__get32le(s); // discard color space + for (i=0; i < 12; ++i) + stbi__get32le(s); // discard color space parameters + if (hsz == 124) { + stbi__get32le(s); // discard rendering intent + stbi__get32le(s); // discard offset of profile data + stbi__get32le(s); // discard size of profile data + stbi__get32le(s); // discard reserved + } + } + } + return (void *) 1; +} + + +static void *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) +{ + stbi_uc *out; + unsigned int mr=0,mg=0,mb=0,ma=0, all_a; + stbi_uc pal[256][4]; + int psize=0,i,j,width; + int flip_vertically, pad, target; + stbi__bmp_data info; + STBI_NOTUSED(ri); + + info.all_a = 255; + if (stbi__bmp_parse_header(s, &info) == NULL) + return NULL; // error code already set + + flip_vertically = ((int) s->img_y) > 0; + s->img_y = abs((int) s->img_y); + + mr = info.mr; + mg = info.mg; + mb = info.mb; + ma = info.ma; + all_a = info.all_a; + + if (info.hsz == 12) { + if (info.bpp < 24) + psize = (info.offset - 14 - 24) / 3; + } else { + if (info.bpp < 16) + psize = (info.offset - 14 - info.hsz) >> 2; + } + + s->img_n = ma ? 4 : 3; + if (req_comp && req_comp >= 3) // we can directly decode 3 or 4 + target = req_comp; + else + target = s->img_n; // if they want monochrome, we'll post-convert + + // sanity-check size + if (!stbi__mad3sizes_valid(target, s->img_x, s->img_y, 0)) + return stbi__errpuc("too large", "Corrupt BMP"); + + out = (stbi_uc *) stbi__malloc_mad3(target, s->img_x, s->img_y, 0); + if (!out) return stbi__errpuc("outofmem", "Out of memory"); + if (info.bpp < 16) { + int z=0; + if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); } + for (i=0; i < psize; ++i) { + pal[i][2] = stbi__get8(s); + pal[i][1] = stbi__get8(s); + pal[i][0] = stbi__get8(s); + if (info.hsz != 12) stbi__get8(s); + pal[i][3] = 255; + } + stbi__skip(s, info.offset - 14 - info.hsz - psize * (info.hsz == 12 ? 3 : 4)); + if (info.bpp == 1) width = (s->img_x + 7) >> 3; + else if (info.bpp == 4) width = (s->img_x + 1) >> 1; + else if (info.bpp == 8) width = s->img_x; + else { STBI_FREE(out); return stbi__errpuc("bad bpp", "Corrupt BMP"); } + pad = (-width)&3; + if (info.bpp == 1) { + for (j=0; j < (int) s->img_y; ++j) { + int bit_offset = 7, v = stbi__get8(s); + for (i=0; i < (int) s->img_x; ++i) { + int color = (v>>bit_offset)&0x1; + out[z++] = pal[color][0]; + out[z++] = pal[color][1]; + out[z++] = pal[color][2]; + if (target == 4) out[z++] = 255; + if (i+1 == (int) s->img_x) break; + if((--bit_offset) < 0) { + bit_offset = 7; + v = stbi__get8(s); + } + } + stbi__skip(s, pad); + } + } else { + for (j=0; j < (int) s->img_y; ++j) { + for (i=0; i < (int) s->img_x; i += 2) { + int v=stbi__get8(s),v2=0; + if (info.bpp == 4) { + v2 = v & 15; + v >>= 4; + } + out[z++] = pal[v][0]; + out[z++] = pal[v][1]; + out[z++] = pal[v][2]; + if (target == 4) out[z++] = 255; + if (i+1 == (int) s->img_x) break; + v = (info.bpp == 8) ? stbi__get8(s) : v2; + out[z++] = pal[v][0]; + out[z++] = pal[v][1]; + out[z++] = pal[v][2]; + if (target == 4) out[z++] = 255; + } + stbi__skip(s, pad); + } + } + } else { + int rshift=0,gshift=0,bshift=0,ashift=0,rcount=0,gcount=0,bcount=0,acount=0; + int z = 0; + int easy=0; + stbi__skip(s, info.offset - 14 - info.hsz); + if (info.bpp == 24) width = 3 * s->img_x; + else if (info.bpp == 16) width = 2*s->img_x; + else /* bpp = 32 and pad = 0 */ width=0; + pad = (-width) & 3; + if (info.bpp == 24) { + easy = 1; + } else if (info.bpp == 32) { + if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000) + easy = 2; + } + if (!easy) { + if (!mr || !mg || !mb) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } + // right shift amt to put high bit in position #7 + rshift = stbi__high_bit(mr)-7; rcount = stbi__bitcount(mr); + gshift = stbi__high_bit(mg)-7; gcount = stbi__bitcount(mg); + bshift = stbi__high_bit(mb)-7; bcount = stbi__bitcount(mb); + ashift = stbi__high_bit(ma)-7; acount = stbi__bitcount(ma); + } + for (j=0; j < (int) s->img_y; ++j) { + if (easy) { + for (i=0; i < (int) s->img_x; ++i) { + unsigned char a; + out[z+2] = stbi__get8(s); + out[z+1] = stbi__get8(s); + out[z+0] = stbi__get8(s); + z += 3; + a = (easy == 2 ? stbi__get8(s) : 255); + all_a |= a; + if (target == 4) out[z++] = a; + } + } else { + int bpp = info.bpp; + for (i=0; i < (int) s->img_x; ++i) { + stbi__uint32 v = (bpp == 16 ? (stbi__uint32) stbi__get16le(s) : stbi__get32le(s)); + unsigned int a; + out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mr, rshift, rcount)); + out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mg, gshift, gcount)); + out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount)); + a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255); + all_a |= a; + if (target == 4) out[z++] = STBI__BYTECAST(a); + } + } + stbi__skip(s, pad); + } + } + + // if alpha channel is all 0s, replace with all 255s + if (target == 4 && all_a == 0) + for (i=4*s->img_x*s->img_y-1; i >= 0; i -= 4) + out[i] = 255; + + if (flip_vertically) { + stbi_uc t; + for (j=0; j < (int) s->img_y>>1; ++j) { + stbi_uc *p1 = out + j *s->img_x*target; + stbi_uc *p2 = out + (s->img_y-1-j)*s->img_x*target; + for (i=0; i < (int) s->img_x*target; ++i) { + t = p1[i]; p1[i] = p2[i]; p2[i] = t; + } + } + } + + if (req_comp && req_comp != target) { + out = stbi__convert_format(out, target, req_comp, s->img_x, s->img_y); + if (out == NULL) return out; // stbi__convert_format frees input on failure + } + + *x = s->img_x; + *y = s->img_y; + if (comp) *comp = s->img_n; + return out; +} +#endif + +// Targa Truevision - TGA +// by Jonathan Dummer +#ifndef STBI_NO_TGA +// returns STBI_rgb or whatever, 0 on error +static int stbi__tga_get_comp(int bits_per_pixel, int is_grey, int* is_rgb16) +{ + // only RGB or RGBA (incl. 16bit) or grey allowed + if (is_rgb16) *is_rgb16 = 0; + switch(bits_per_pixel) { + case 8: return STBI_grey; + case 16: if(is_grey) return STBI_grey_alpha; + // fallthrough + case 15: if(is_rgb16) *is_rgb16 = 1; + return STBI_rgb; + case 24: // fallthrough + case 32: return bits_per_pixel/8; + default: return 0; + } +} + +static int stbi__tga_info(stbi__context *s, int *x, int *y, int *comp) +{ + int tga_w, tga_h, tga_comp, tga_image_type, tga_bits_per_pixel, tga_colormap_bpp; + int sz, tga_colormap_type; + stbi__get8(s); // discard Offset + tga_colormap_type = stbi__get8(s); // colormap type + if( tga_colormap_type > 1 ) { + stbi__rewind(s); + return 0; // only RGB or indexed allowed + } + tga_image_type = stbi__get8(s); // image type + if ( tga_colormap_type == 1 ) { // colormapped (paletted) image + if (tga_image_type != 1 && tga_image_type != 9) { + stbi__rewind(s); + return 0; + } + stbi__skip(s,4); // skip index of first colormap entry and number of entries + sz = stbi__get8(s); // check bits per palette color entry + if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) { + stbi__rewind(s); + return 0; + } + stbi__skip(s,4); // skip image x and y origin + tga_colormap_bpp = sz; + } else { // "normal" image w/o colormap - only RGB or grey allowed, +/- RLE + if ( (tga_image_type != 2) && (tga_image_type != 3) && (tga_image_type != 10) && (tga_image_type != 11) ) { + stbi__rewind(s); + return 0; // only RGB or grey allowed, +/- RLE + } + stbi__skip(s,9); // skip colormap specification and image x/y origin + tga_colormap_bpp = 0; + } + tga_w = stbi__get16le(s); + if( tga_w < 1 ) { + stbi__rewind(s); + return 0; // test width + } + tga_h = stbi__get16le(s); + if( tga_h < 1 ) { + stbi__rewind(s); + return 0; // test height + } + tga_bits_per_pixel = stbi__get8(s); // bits per pixel + stbi__get8(s); // ignore alpha bits + if (tga_colormap_bpp != 0) { + if((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16)) { + // when using a colormap, tga_bits_per_pixel is the size of the indexes + // I don't think anything but 8 or 16bit indexes makes sense + stbi__rewind(s); + return 0; + } + tga_comp = stbi__tga_get_comp(tga_colormap_bpp, 0, NULL); + } else { + tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3) || (tga_image_type == 11), NULL); + } + if(!tga_comp) { + stbi__rewind(s); + return 0; + } + if (x) *x = tga_w; + if (y) *y = tga_h; + if (comp) *comp = tga_comp; + return 1; // seems to have passed everything +} + +static int stbi__tga_test(stbi__context *s) +{ + int res = 0; + int sz, tga_color_type; + stbi__get8(s); // discard Offset + tga_color_type = stbi__get8(s); // color type + if ( tga_color_type > 1 ) goto errorEnd; // only RGB or indexed allowed + sz = stbi__get8(s); // image type + if ( tga_color_type == 1 ) { // colormapped (paletted) image + if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9 + stbi__skip(s,4); // skip index of first colormap entry and number of entries + sz = stbi__get8(s); // check bits per palette color entry + if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd; + stbi__skip(s,4); // skip image x and y origin + } else { // "normal" image w/o colormap + if ( (sz != 2) && (sz != 3) && (sz != 10) && (sz != 11) ) goto errorEnd; // only RGB or grey allowed, +/- RLE + stbi__skip(s,9); // skip colormap specification and image x/y origin + } + if ( stbi__get16le(s) < 1 ) goto errorEnd; // test width + if ( stbi__get16le(s) < 1 ) goto errorEnd; // test height + sz = stbi__get8(s); // bits per pixel + if ( (tga_color_type == 1) && (sz != 8) && (sz != 16) ) goto errorEnd; // for colormapped images, bpp is size of an index + if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd; + + res = 1; // if we got this far, everything's good and we can return 1 instead of 0 + +errorEnd: + stbi__rewind(s); + return res; +} + +// read 16bit value and convert to 24bit RGB +static void stbi__tga_read_rgb16(stbi__context *s, stbi_uc* out) +{ + stbi__uint16 px = (stbi__uint16)stbi__get16le(s); + stbi__uint16 fiveBitMask = 31; + // we have 3 channels with 5bits each + int r = (px >> 10) & fiveBitMask; + int g = (px >> 5) & fiveBitMask; + int b = px & fiveBitMask; + // Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later + out[0] = (stbi_uc)((r * 255)/31); + out[1] = (stbi_uc)((g * 255)/31); + out[2] = (stbi_uc)((b * 255)/31); + + // some people claim that the most significant bit might be used for alpha + // (possibly if an alpha-bit is set in the "image descriptor byte") + // but that only made 16bit test images completely translucent.. + // so let's treat all 15 and 16bit TGAs as RGB with no alpha. +} + +static void *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) +{ + // read in the TGA header stuff + int tga_offset = stbi__get8(s); + int tga_indexed = stbi__get8(s); + int tga_image_type = stbi__get8(s); + int tga_is_RLE = 0; + int tga_palette_start = stbi__get16le(s); + int tga_palette_len = stbi__get16le(s); + int tga_palette_bits = stbi__get8(s); + int tga_x_origin = stbi__get16le(s); + int tga_y_origin = stbi__get16le(s); + int tga_width = stbi__get16le(s); + int tga_height = stbi__get16le(s); + int tga_bits_per_pixel = stbi__get8(s); + int tga_comp, tga_rgb16=0; + int tga_inverted = stbi__get8(s); + // int tga_alpha_bits = tga_inverted & 15; // the 4 lowest bits - unused (useless?) + // image data + unsigned char *tga_data; + unsigned char *tga_palette = NULL; + int i, j; + unsigned char raw_data[4] = {0}; + int RLE_count = 0; + int RLE_repeating = 0; + int read_next_pixel = 1; + STBI_NOTUSED(ri); + + // do a tiny bit of precessing + if ( tga_image_type >= 8 ) + { + tga_image_type -= 8; + tga_is_RLE = 1; + } + tga_inverted = 1 - ((tga_inverted >> 5) & 1); + + // If I'm paletted, then I'll use the number of bits from the palette + if ( tga_indexed ) tga_comp = stbi__tga_get_comp(tga_palette_bits, 0, &tga_rgb16); + else tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3), &tga_rgb16); + + if(!tga_comp) // shouldn't really happen, stbi__tga_test() should have ensured basic consistency + return stbi__errpuc("bad format", "Can't find out TGA pixelformat"); + + // tga info + *x = tga_width; + *y = tga_height; + if (comp) *comp = tga_comp; + + if (!stbi__mad3sizes_valid(tga_width, tga_height, tga_comp, 0)) + return stbi__errpuc("too large", "Corrupt TGA"); + + tga_data = (unsigned char*)stbi__malloc_mad3(tga_width, tga_height, tga_comp, 0); + if (!tga_data) return stbi__errpuc("outofmem", "Out of memory"); + + // skip to the data's starting position (offset usually = 0) + stbi__skip(s, tga_offset ); + + if ( !tga_indexed && !tga_is_RLE && !tga_rgb16 ) { + for (i=0; i < tga_height; ++i) { + int row = tga_inverted ? tga_height -i - 1 : i; + stbi_uc *tga_row = tga_data + row*tga_width*tga_comp; + stbi__getn(s, tga_row, tga_width * tga_comp); + } + } else { + // do I need to load a palette? + if ( tga_indexed) + { + // any data to skip? (offset usually = 0) + stbi__skip(s, tga_palette_start ); + // load the palette + tga_palette = (unsigned char*)stbi__malloc_mad2(tga_palette_len, tga_comp, 0); + if (!tga_palette) { + STBI_FREE(tga_data); + return stbi__errpuc("outofmem", "Out of memory"); + } + if (tga_rgb16) { + stbi_uc *pal_entry = tga_palette; + STBI_ASSERT(tga_comp == STBI_rgb); + for (i=0; i < tga_palette_len; ++i) { + stbi__tga_read_rgb16(s, pal_entry); + pal_entry += tga_comp; + } + } else if (!stbi__getn(s, tga_palette, tga_palette_len * tga_comp)) { + STBI_FREE(tga_data); + STBI_FREE(tga_palette); + return stbi__errpuc("bad palette", "Corrupt TGA"); + } + } + // load the data + for (i=0; i < tga_width * tga_height; ++i) + { + // if I'm in RLE mode, do I need to get a RLE stbi__pngchunk? + if ( tga_is_RLE ) + { + if ( RLE_count == 0 ) + { + // yep, get the next byte as a RLE command + int RLE_cmd = stbi__get8(s); + RLE_count = 1 + (RLE_cmd & 127); + RLE_repeating = RLE_cmd >> 7; + read_next_pixel = 1; + } else if ( !RLE_repeating ) + { + read_next_pixel = 1; + } + } else + { + read_next_pixel = 1; + } + // OK, if I need to read a pixel, do it now + if ( read_next_pixel ) + { + // load however much data we did have + if ( tga_indexed ) + { + // read in index, then perform the lookup + int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s); + if ( pal_idx >= tga_palette_len ) { + // invalid index + pal_idx = 0; + } + pal_idx *= tga_comp; + for (j = 0; j < tga_comp; ++j) { + raw_data[j] = tga_palette[pal_idx+j]; + } + } else if(tga_rgb16) { + STBI_ASSERT(tga_comp == STBI_rgb); + stbi__tga_read_rgb16(s, raw_data); + } else { + // read in the data raw + for (j = 0; j < tga_comp; ++j) { + raw_data[j] = stbi__get8(s); + } + } + // clear the reading flag for the next pixel + read_next_pixel = 0; + } // end of reading a pixel + + // copy data + for (j = 0; j < tga_comp; ++j) + tga_data[i*tga_comp+j] = raw_data[j]; + + // in case we're in RLE mode, keep counting down + --RLE_count; + } + // do I need to invert the image? + if ( tga_inverted ) + { + for (j = 0; j*2 < tga_height; ++j) + { + int index1 = j * tga_width * tga_comp; + int index2 = (tga_height - 1 - j) * tga_width * tga_comp; + for (i = tga_width * tga_comp; i > 0; --i) + { + unsigned char temp = tga_data[index1]; + tga_data[index1] = tga_data[index2]; + tga_data[index2] = temp; + ++index1; + ++index2; + } + } + } + // clear my palette, if I had one + if ( tga_palette != NULL ) + { + STBI_FREE( tga_palette ); + } + } + + // swap RGB - if the source data was RGB16, it already is in the right order + if (tga_comp >= 3 && !tga_rgb16) + { + unsigned char* tga_pixel = tga_data; + for (i=0; i < tga_width * tga_height; ++i) + { + unsigned char temp = tga_pixel[0]; + tga_pixel[0] = tga_pixel[2]; + tga_pixel[2] = temp; + tga_pixel += tga_comp; + } + } + + // convert to target component count + if (req_comp && req_comp != tga_comp) + tga_data = stbi__convert_format(tga_data, tga_comp, req_comp, tga_width, tga_height); + + // the things I do to get rid of an error message, and yet keep + // Microsoft's C compilers happy... [8^( + tga_palette_start = tga_palette_len = tga_palette_bits = + tga_x_origin = tga_y_origin = 0; + // OK, done + return tga_data; +} +#endif + +// ************************************************************************************************* +// Photoshop PSD loader -- PD by Thatcher Ulrich, integration by Nicolas Schulz, tweaked by STB + +#ifndef STBI_NO_PSD +static int stbi__psd_test(stbi__context *s) +{ + int r = (stbi__get32be(s) == 0x38425053); + stbi__rewind(s); + return r; +} + +static int stbi__psd_decode_rle(stbi__context *s, stbi_uc *p, int pixelCount) +{ + int count, nleft, len; + + count = 0; + while ((nleft = pixelCount - count) > 0) { + len = stbi__get8(s); + if (len == 128) { + // No-op. + } else if (len < 128) { + // Copy next len+1 bytes literally. + len++; + if (len > nleft) return 0; // corrupt data + count += len; + while (len) { + *p = stbi__get8(s); + p += 4; + len--; + } + } else if (len > 128) { + stbi_uc val; + // Next -len+1 bytes in the dest are replicated from next source byte. + // (Interpret len as a negative 8-bit int.) + len = 257 - len; + if (len > nleft) return 0; // corrupt data + val = stbi__get8(s); + count += len; + while (len) { + *p = val; + p += 4; + len--; + } + } + } + + return 1; +} + +static void *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri, int bpc) +{ + int pixelCount; + int channelCount, compression; + int channel, i; + int bitdepth; + int w,h; + stbi_uc *out; + STBI_NOTUSED(ri); + + // Check identifier + if (stbi__get32be(s) != 0x38425053) // "8BPS" + return stbi__errpuc("not PSD", "Corrupt PSD image"); + + // Check file type version. + if (stbi__get16be(s) != 1) + return stbi__errpuc("wrong version", "Unsupported version of PSD image"); + + // Skip 6 reserved bytes. + stbi__skip(s, 6 ); + + // Read the number of channels (R, G, B, A, etc). + channelCount = stbi__get16be(s); + if (channelCount < 0 || channelCount > 16) + return stbi__errpuc("wrong channel count", "Unsupported number of channels in PSD image"); + + // Read the rows and columns of the image. + h = stbi__get32be(s); + w = stbi__get32be(s); + + // Make sure the depth is 8 bits. + bitdepth = stbi__get16be(s); + if (bitdepth != 8 && bitdepth != 16) + return stbi__errpuc("unsupported bit depth", "PSD bit depth is not 8 or 16 bit"); + + // Make sure the color mode is RGB. + // Valid options are: + // 0: Bitmap + // 1: Grayscale + // 2: Indexed color + // 3: RGB color + // 4: CMYK color + // 7: Multichannel + // 8: Duotone + // 9: Lab color + if (stbi__get16be(s) != 3) + return stbi__errpuc("wrong color format", "PSD is not in RGB color format"); + + // Skip the Mode Data. (It's the palette for indexed color; other info for other modes.) + stbi__skip(s,stbi__get32be(s) ); + + // Skip the image resources. (resolution, pen tool paths, etc) + stbi__skip(s, stbi__get32be(s) ); + + // Skip the reserved data. + stbi__skip(s, stbi__get32be(s) ); + + // Find out if the data is compressed. + // Known values: + // 0: no compression + // 1: RLE compressed + compression = stbi__get16be(s); + if (compression > 1) + return stbi__errpuc("bad compression", "PSD has an unknown compression format"); + + // Check size + if (!stbi__mad3sizes_valid(4, w, h, 0)) + return stbi__errpuc("too large", "Corrupt PSD"); + + // Create the destination image. + + if (!compression && bitdepth == 16 && bpc == 16) { + out = (stbi_uc *) stbi__malloc_mad3(8, w, h, 0); + ri->bits_per_channel = 16; + } else + out = (stbi_uc *) stbi__malloc(4 * w*h); + + if (!out) return stbi__errpuc("outofmem", "Out of memory"); + pixelCount = w*h; + + // Initialize the data to zero. + //memset( out, 0, pixelCount * 4 ); + + // Finally, the image data. + if (compression) { + // RLE as used by .PSD and .TIFF + // Loop until you get the number of unpacked bytes you are expecting: + // Read the next source byte into n. + // If n is between 0 and 127 inclusive, copy the next n+1 bytes literally. + // Else if n is between -127 and -1 inclusive, copy the next byte -n+1 times. + // Else if n is 128, noop. + // Endloop + + // The RLE-compressed data is preceded by a 2-byte data count for each row in the data, + // which we're going to just skip. + stbi__skip(s, h * channelCount * 2 ); + + // Read the RLE data by channel. + for (channel = 0; channel < 4; channel++) { + stbi_uc *p; + + p = out+channel; + if (channel >= channelCount) { + // Fill this channel with default data. + for (i = 0; i < pixelCount; i++, p += 4) + *p = (channel == 3 ? 255 : 0); + } else { + // Read the RLE data. + if (!stbi__psd_decode_rle(s, p, pixelCount)) { + STBI_FREE(out); + return stbi__errpuc("corrupt", "bad RLE data"); + } + } + } + + } else { + // We're at the raw image data. It's each channel in order (Red, Green, Blue, Alpha, ...) + // where each channel consists of an 8-bit (or 16-bit) value for each pixel in the image. + + // Read the data by channel. + for (channel = 0; channel < 4; channel++) { + if (channel >= channelCount) { + // Fill this channel with default data. + if (bitdepth == 16 && bpc == 16) { + stbi__uint16 *q = ((stbi__uint16 *) out) + channel; + stbi__uint16 val = channel == 3 ? 65535 : 0; + for (i = 0; i < pixelCount; i++, q += 4) + *q = val; + } else { + stbi_uc *p = out+channel; + stbi_uc val = channel == 3 ? 255 : 0; + for (i = 0; i < pixelCount; i++, p += 4) + *p = val; + } + } else { + if (ri->bits_per_channel == 16) { // output bpc + stbi__uint16 *q = ((stbi__uint16 *) out) + channel; + for (i = 0; i < pixelCount; i++, q += 4) + *q = (stbi__uint16) stbi__get16be(s); + } else { + stbi_uc *p = out+channel; + if (bitdepth == 16) { // input bpc + for (i = 0; i < pixelCount; i++, p += 4) + *p = (stbi_uc) (stbi__get16be(s) >> 8); + } else { + for (i = 0; i < pixelCount; i++, p += 4) + *p = stbi__get8(s); + } + } + } + } + } + + // remove weird white matte from PSD + if (channelCount >= 4) { + if (ri->bits_per_channel == 16) { + for (i=0; i < w*h; ++i) { + stbi__uint16 *pixel = (stbi__uint16 *) out + 4*i; + if (pixel[3] != 0 && pixel[3] != 65535) { + float a = pixel[3] / 65535.0f; + float ra = 1.0f / a; + float inv_a = 65535.0f * (1 - ra); + pixel[0] = (stbi__uint16) (pixel[0]*ra + inv_a); + pixel[1] = (stbi__uint16) (pixel[1]*ra + inv_a); + pixel[2] = (stbi__uint16) (pixel[2]*ra + inv_a); + } + } + } else { + for (i=0; i < w*h; ++i) { + unsigned char *pixel = out + 4*i; + if (pixel[3] != 0 && pixel[3] != 255) { + float a = pixel[3] / 255.0f; + float ra = 1.0f / a; + float inv_a = 255.0f * (1 - ra); + pixel[0] = (unsigned char) (pixel[0]*ra + inv_a); + pixel[1] = (unsigned char) (pixel[1]*ra + inv_a); + pixel[2] = (unsigned char) (pixel[2]*ra + inv_a); + } + } + } + } + + // convert to desired output format + if (req_comp && req_comp != 4) { + if (ri->bits_per_channel == 16) + out = (stbi_uc *) stbi__convert_format16((stbi__uint16 *) out, 4, req_comp, w, h); + else + out = stbi__convert_format(out, 4, req_comp, w, h); + if (out == NULL) return out; // stbi__convert_format frees input on failure + } + + if (comp) *comp = 4; + *y = h; + *x = w; + + return out; +} +#endif + +// ************************************************************************************************* +// Softimage PIC loader +// by Tom Seddon +// +// See http://softimage.wiki.softimage.com/index.php/INFO:_PIC_file_format +// See http://ozviz.wasp.uwa.edu.au/~pbourke/dataformats/softimagepic/ + +#ifndef STBI_NO_PIC +static int stbi__pic_is4(stbi__context *s,const char *str) +{ + int i; + for (i=0; i<4; ++i) + if (stbi__get8(s) != (stbi_uc)str[i]) + return 0; + + return 1; +} + +static int stbi__pic_test_core(stbi__context *s) +{ + int i; + + if (!stbi__pic_is4(s,"\x53\x80\xF6\x34")) + return 0; + + for(i=0;i<84;++i) + stbi__get8(s); + + if (!stbi__pic_is4(s,"PICT")) + return 0; + + return 1; +} + +typedef struct +{ + stbi_uc size,type,channel; +} stbi__pic_packet; + +static stbi_uc *stbi__readval(stbi__context *s, int channel, stbi_uc *dest) +{ + int mask=0x80, i; + + for (i=0; i<4; ++i, mask>>=1) { + if (channel & mask) { + if (stbi__at_eof(s)) return stbi__errpuc("bad file","PIC file too short"); + dest[i]=stbi__get8(s); + } + } + + return dest; +} + +static void stbi__copyval(int channel,stbi_uc *dest,const stbi_uc *src) +{ + int mask=0x80,i; + + for (i=0;i<4; ++i, mask>>=1) + if (channel&mask) + dest[i]=src[i]; +} + +static stbi_uc *stbi__pic_load_core(stbi__context *s,int width,int height,int *comp, stbi_uc *result) +{ + int act_comp=0,num_packets=0,y,chained; + stbi__pic_packet packets[10]; + + // this will (should...) cater for even some bizarre stuff like having data + // for the same channel in multiple packets. + do { + stbi__pic_packet *packet; + + if (num_packets==sizeof(packets)/sizeof(packets[0])) + return stbi__errpuc("bad format","too many packets"); + + packet = &packets[num_packets++]; + + chained = stbi__get8(s); + packet->size = stbi__get8(s); + packet->type = stbi__get8(s); + packet->channel = stbi__get8(s); + + act_comp |= packet->channel; + + if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (reading packets)"); + if (packet->size != 8) return stbi__errpuc("bad format","packet isn't 8bpp"); + } while (chained); + + *comp = (act_comp & 0x10 ? 4 : 3); // has alpha channel? + + for(y=0; ytype) { + default: + return stbi__errpuc("bad format","packet has bad compression type"); + + case 0: {//uncompressed + int x; + + for(x=0;xchannel,dest)) + return 0; + break; + } + + case 1://Pure RLE + { + int left=width, i; + + while (left>0) { + stbi_uc count,value[4]; + + count=stbi__get8(s); + if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (pure read count)"); + + if (count > left) + count = (stbi_uc) left; + + if (!stbi__readval(s,packet->channel,value)) return 0; + + for(i=0; ichannel,dest,value); + left -= count; + } + } + break; + + case 2: {//Mixed RLE + int left=width; + while (left>0) { + int count = stbi__get8(s), i; + if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (mixed read count)"); + + if (count >= 128) { // Repeated + stbi_uc value[4]; + + if (count==128) + count = stbi__get16be(s); + else + count -= 127; + if (count > left) + return stbi__errpuc("bad file","scanline overrun"); + + if (!stbi__readval(s,packet->channel,value)) + return 0; + + for(i=0;ichannel,dest,value); + } else { // Raw + ++count; + if (count>left) return stbi__errpuc("bad file","scanline overrun"); + + for(i=0;ichannel,dest)) + return 0; + } + left-=count; + } + break; + } + } + } + } + + return result; +} + +static void *stbi__pic_load(stbi__context *s,int *px,int *py,int *comp,int req_comp, stbi__result_info *ri) +{ + stbi_uc *result; + int i, x,y, internal_comp; + STBI_NOTUSED(ri); + + if (!comp) comp = &internal_comp; + + for (i=0; i<92; ++i) + stbi__get8(s); + + x = stbi__get16be(s); + y = stbi__get16be(s); + if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (pic header)"); + if (!stbi__mad3sizes_valid(x, y, 4, 0)) return stbi__errpuc("too large", "PIC image too large to decode"); + + stbi__get32be(s); //skip `ratio' + stbi__get16be(s); //skip `fields' + stbi__get16be(s); //skip `pad' + + // intermediate buffer is RGBA + result = (stbi_uc *) stbi__malloc_mad3(x, y, 4, 0); + memset(result, 0xff, x*y*4); + + if (!stbi__pic_load_core(s,x,y,comp, result)) { + STBI_FREE(result); + result=0; + } + *px = x; + *py = y; + if (req_comp == 0) req_comp = *comp; + result=stbi__convert_format(result,4,req_comp,x,y); + + return result; +} + +static int stbi__pic_test(stbi__context *s) +{ + int r = stbi__pic_test_core(s); + stbi__rewind(s); + return r; +} +#endif + +// ************************************************************************************************* +// GIF loader -- public domain by Jean-Marc Lienher -- simplified/shrunk by stb + +#ifndef STBI_NO_GIF +typedef struct +{ + stbi__int16 prefix; + stbi_uc first; + stbi_uc suffix; +} stbi__gif_lzw; + +typedef struct +{ + int w,h; + stbi_uc *out; // output buffer (always 4 components) + stbi_uc *background; // The current "background" as far as a gif is concerned + stbi_uc *history; + int flags, bgindex, ratio, transparent, eflags; + stbi_uc pal[256][4]; + stbi_uc lpal[256][4]; + stbi__gif_lzw codes[8192]; + stbi_uc *color_table; + int parse, step; + int lflags; + int start_x, start_y; + int max_x, max_y; + int cur_x, cur_y; + int line_size; + int delay; +} stbi__gif; + +static int stbi__gif_test_raw(stbi__context *s) +{ + int sz; + if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') return 0; + sz = stbi__get8(s); + if (sz != '9' && sz != '7') return 0; + if (stbi__get8(s) != 'a') return 0; + return 1; +} + +static int stbi__gif_test(stbi__context *s) +{ + int r = stbi__gif_test_raw(s); + stbi__rewind(s); + return r; +} + +static void stbi__gif_parse_colortable(stbi__context *s, stbi_uc pal[256][4], int num_entries, int transp) +{ + int i; + for (i=0; i < num_entries; ++i) { + pal[i][2] = stbi__get8(s); + pal[i][1] = stbi__get8(s); + pal[i][0] = stbi__get8(s); + pal[i][3] = transp == i ? 0 : 255; + } +} + +static int stbi__gif_header(stbi__context *s, stbi__gif *g, int *comp, int is_info) +{ + stbi_uc version; + if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') + return stbi__err("not GIF", "Corrupt GIF"); + + version = stbi__get8(s); + if (version != '7' && version != '9') return stbi__err("not GIF", "Corrupt GIF"); + if (stbi__get8(s) != 'a') return stbi__err("not GIF", "Corrupt GIF"); + + stbi__g_failure_reason = ""; + g->w = stbi__get16le(s); + g->h = stbi__get16le(s); + g->flags = stbi__get8(s); + g->bgindex = stbi__get8(s); + g->ratio = stbi__get8(s); + g->transparent = -1; + + if (comp != 0) *comp = 4; // can't actually tell whether it's 3 or 4 until we parse the comments + + if (is_info) return 1; + + if (g->flags & 0x80) + stbi__gif_parse_colortable(s,g->pal, 2 << (g->flags & 7), -1); + + return 1; +} + +static int stbi__gif_info_raw(stbi__context *s, int *x, int *y, int *comp) +{ + stbi__gif* g = (stbi__gif*) stbi__malloc(sizeof(stbi__gif)); + if (!stbi__gif_header(s, g, comp, 1)) { + STBI_FREE(g); + stbi__rewind( s ); + return 0; + } + if (x) *x = g->w; + if (y) *y = g->h; + STBI_FREE(g); + return 1; +} + +static void stbi__out_gif_code(stbi__gif *g, stbi__uint16 code) +{ + stbi_uc *p, *c; + int idx; + + // recurse to decode the prefixes, since the linked-list is backwards, + // and working backwards through an interleaved image would be nasty + if (g->codes[code].prefix >= 0) + stbi__out_gif_code(g, g->codes[code].prefix); + + if (g->cur_y >= g->max_y) return; + + idx = g->cur_x + g->cur_y; + p = &g->out[idx]; + g->history[idx / 4] = 1; + + c = &g->color_table[g->codes[code].suffix * 4]; + if (c[3] > 128) { // don't render transparent pixels; + p[0] = c[2]; + p[1] = c[1]; + p[2] = c[0]; + p[3] = c[3]; + } + g->cur_x += 4; + + if (g->cur_x >= g->max_x) { + g->cur_x = g->start_x; + g->cur_y += g->step; + + while (g->cur_y >= g->max_y && g->parse > 0) { + g->step = (1 << g->parse) * g->line_size; + g->cur_y = g->start_y + (g->step >> 1); + --g->parse; + } + } +} + +static stbi_uc *stbi__process_gif_raster(stbi__context *s, stbi__gif *g) +{ + stbi_uc lzw_cs; + stbi__int32 len, init_code; + stbi__uint32 first; + stbi__int32 codesize, codemask, avail, oldcode, bits, valid_bits, clear; + stbi__gif_lzw *p; + + lzw_cs = stbi__get8(s); + if (lzw_cs > 12) return NULL; + clear = 1 << lzw_cs; + first = 1; + codesize = lzw_cs + 1; + codemask = (1 << codesize) - 1; + bits = 0; + valid_bits = 0; + for (init_code = 0; init_code < clear; init_code++) { + g->codes[init_code].prefix = -1; + g->codes[init_code].first = (stbi_uc) init_code; + g->codes[init_code].suffix = (stbi_uc) init_code; + } + + // support no starting clear code + avail = clear+2; + oldcode = -1; + + len = 0; + for(;;) { + if (valid_bits < codesize) { + if (len == 0) { + len = stbi__get8(s); // start new block + if (len == 0) + return g->out; + } + --len; + bits |= (stbi__int32) stbi__get8(s) << valid_bits; + valid_bits += 8; + } else { + stbi__int32 code = bits & codemask; + bits >>= codesize; + valid_bits -= codesize; + // @OPTIMIZE: is there some way we can accelerate the non-clear path? + if (code == clear) { // clear code + codesize = lzw_cs + 1; + codemask = (1 << codesize) - 1; + avail = clear + 2; + oldcode = -1; + first = 0; + } else if (code == clear + 1) { // end of stream code + stbi__skip(s, len); + while ((len = stbi__get8(s)) > 0) + stbi__skip(s,len); + return g->out; + } else if (code <= avail) { + if (first) { + return stbi__errpuc("no clear code", "Corrupt GIF"); + } + + if (oldcode >= 0) { + p = &g->codes[avail++]; + if (avail > 8192) { + return stbi__errpuc("too many codes", "Corrupt GIF"); + } + + p->prefix = (stbi__int16) oldcode; + p->first = g->codes[oldcode].first; + p->suffix = (code == avail) ? p->first : g->codes[code].first; + } else if (code == avail) + return stbi__errpuc("illegal code in raster", "Corrupt GIF"); + + stbi__out_gif_code(g, (stbi__uint16) code); + + if ((avail & codemask) == 0 && avail <= 0x0FFF) { + codesize++; + codemask = (1 << codesize) - 1; + } + + oldcode = code; + } else { + return stbi__errpuc("illegal code in raster", "Corrupt GIF"); + } + } + } +} + +// this function is designed to support animated gifs, although stb_image doesn't support it +// two back is the image from two frames ago, used for a very specific disposal format +static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, int req_comp, stbi_uc *two_back) +{ + int dispose; + int first_frame; + int pi; + int pcount; + STBI_NOTUSED(req_comp); + + // on first frame, any non-written pixels get the background colour (non-transparent) + first_frame = 0; + if (g->out == 0) { + if (!stbi__gif_header(s, g, comp,0)) return 0; // stbi__g_failure_reason set by stbi__gif_header + if (!stbi__mad3sizes_valid(4, g->w, g->h, 0)) + return stbi__errpuc("too large", "GIF image is too large"); + pcount = g->w * g->h; + g->out = (stbi_uc *) stbi__malloc(4 * pcount); + g->background = (stbi_uc *) stbi__malloc(4 * pcount); + g->history = (stbi_uc *) stbi__malloc(pcount); + if (!g->out || !g->background || !g->history) + return stbi__errpuc("outofmem", "Out of memory"); + + // image is treated as "transparent" at the start - ie, nothing overwrites the current background; + // background colour is only used for pixels that are not rendered first frame, after that "background" + // color refers to the color that was there the previous frame. + memset(g->out, 0x00, 4 * pcount); + memset(g->background, 0x00, 4 * pcount); // state of the background (starts transparent) + memset(g->history, 0x00, pcount); // pixels that were affected previous frame + first_frame = 1; + } else { + // second frame - how do we dispoase of the previous one? + dispose = (g->eflags & 0x1C) >> 2; + pcount = g->w * g->h; + + if ((dispose == 3) && (two_back == 0)) { + dispose = 2; // if I don't have an image to revert back to, default to the old background + } + + if (dispose == 3) { // use previous graphic + for (pi = 0; pi < pcount; ++pi) { + if (g->history[pi]) { + memcpy( &g->out[pi * 4], &two_back[pi * 4], 4 ); + } + } + } else if (dispose == 2) { + // restore what was changed last frame to background before that frame; + for (pi = 0; pi < pcount; ++pi) { + if (g->history[pi]) { + memcpy( &g->out[pi * 4], &g->background[pi * 4], 4 ); + } + } + } else { + // This is a non-disposal case eithe way, so just + // leave the pixels as is, and they will become the new background + // 1: do not dispose + // 0: not specified. + } + + // background is what out is after the undoing of the previou frame; + memcpy( g->background, g->out, 4 * g->w * g->h ); + } + + // clear my history; + memset( g->history, 0x00, g->w * g->h ); // pixels that were affected previous frame + + for (;;) { + int tag = stbi__get8(s); + switch (tag) { + case 0x2C: /* Image Descriptor */ + { + stbi__int32 x, y, w, h; + stbi_uc *o; + + x = stbi__get16le(s); + y = stbi__get16le(s); + w = stbi__get16le(s); + h = stbi__get16le(s); + if (((x + w) > (g->w)) || ((y + h) > (g->h))) + return stbi__errpuc("bad Image Descriptor", "Corrupt GIF"); + + g->line_size = g->w * 4; + g->start_x = x * 4; + g->start_y = y * g->line_size; + g->max_x = g->start_x + w * 4; + g->max_y = g->start_y + h * g->line_size; + g->cur_x = g->start_x; + g->cur_y = g->start_y; + + // if the width of the specified rectangle is 0, that means + // we may not see *any* pixels or the image is malformed; + // to make sure this is caught, move the current y down to + // max_y (which is what out_gif_code checks). + if (w == 0) + g->cur_y = g->max_y; + + g->lflags = stbi__get8(s); + + if (g->lflags & 0x40) { + g->step = 8 * g->line_size; // first interlaced spacing + g->parse = 3; + } else { + g->step = g->line_size; + g->parse = 0; + } + + if (g->lflags & 0x80) { + stbi__gif_parse_colortable(s,g->lpal, 2 << (g->lflags & 7), g->eflags & 0x01 ? g->transparent : -1); + g->color_table = (stbi_uc *) g->lpal; + } else if (g->flags & 0x80) { + g->color_table = (stbi_uc *) g->pal; + } else + return stbi__errpuc("missing color table", "Corrupt GIF"); + + o = stbi__process_gif_raster(s, g); + if (!o) return NULL; + + // if this was the first frame, + pcount = g->w * g->h; + if (first_frame && (g->bgindex > 0)) { + // if first frame, any pixel not drawn to gets the background color + for (pi = 0; pi < pcount; ++pi) { + if (g->history[pi] == 0) { + g->pal[g->bgindex][3] = 255; // just in case it was made transparent, undo that; It will be reset next frame if need be; + memcpy( &g->out[pi * 4], &g->pal[g->bgindex], 4 ); + } + } + } + + return o; + } + + case 0x21: // Comment Extension. + { + int len; + int ext = stbi__get8(s); + if (ext == 0xF9) { // Graphic Control Extension. + len = stbi__get8(s); + if (len == 4) { + g->eflags = stbi__get8(s); + g->delay = 10 * stbi__get16le(s); // delay - 1/100th of a second, saving as 1/1000ths. + + // unset old transparent + if (g->transparent >= 0) { + g->pal[g->transparent][3] = 255; + } + if (g->eflags & 0x01) { + g->transparent = stbi__get8(s); + if (g->transparent >= 0) { + g->pal[g->transparent][3] = 0; + } + } else { + // don't need transparent + stbi__skip(s, 1); + g->transparent = -1; + } + } else { + stbi__skip(s, len); + break; + } + } + while ((len = stbi__get8(s)) != 0) { + stbi__skip(s, len); + } + break; + } + + case 0x3B: // gif stream termination code + return (stbi_uc *) s; // using '1' causes warning on some compilers + + default: + return stbi__errpuc("unknown code", "Corrupt GIF"); + } + } +} + +static void *stbi__load_gif_main(stbi__context *s, int **delays, int *x, int *y, int *z, int *comp, int req_comp) +{ + if (stbi__gif_test(s)) { + int layers = 0; + stbi_uc *u = 0; + stbi_uc *out = 0; + stbi_uc *two_back = 0; + stbi__gif g; + int stride; + memset(&g, 0, sizeof(g)); + if (delays) { + *delays = 0; + } + + do { + u = stbi__gif_load_next(s, &g, comp, req_comp, two_back); + if (u == (stbi_uc *) s) u = 0; // end of animated gif marker + + if (u) { + *x = g.w; + *y = g.h; + ++layers; + stride = g.w * g.h * 4; + + if (out) { + out = (stbi_uc*) STBI_REALLOC( out, layers * stride ); + if (delays) { + *delays = (int*) STBI_REALLOC( *delays, sizeof(int) * layers ); + } + } else { + out = (stbi_uc*)stbi__malloc( layers * stride ); + if (delays) { + *delays = (int*) stbi__malloc( layers * sizeof(int) ); + } + } + memcpy( out + ((layers - 1) * stride), u, stride ); + if (layers >= 2) { + two_back = out - 2 * stride; + } + + if (delays) { + (*delays)[layers - 1U] = g.delay; + } + } + } while (u != 0); + + // free temp buffer; + STBI_FREE(g.out); + STBI_FREE(g.history); + STBI_FREE(g.background); + + // do the final conversion after loading everything; + if (req_comp && req_comp != 4) + out = stbi__convert_format(out, 4, req_comp, layers * g.w, g.h); + + *z = layers; + return out; + } else { + return stbi__errpuc("not GIF", "Image was not as a gif type."); + } +} + +static void *stbi__gif_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) +{ + stbi_uc *u = 0; + stbi__gif g; + memset(&g, 0, sizeof(g)); + STBI_NOTUSED(ri); + + u = stbi__gif_load_next(s, &g, comp, req_comp, 0); + if (u == (stbi_uc *) s) u = 0; // end of animated gif marker + if (u) { + *x = g.w; + *y = g.h; + + // moved conversion to after successful load so that the same + // can be done for multiple frames. + if (req_comp && req_comp != 4) + u = stbi__convert_format(u, 4, req_comp, g.w, g.h); + } else if (g.out) { + // if there was an error and we allocated an image buffer, free it! + STBI_FREE(g.out); + } + + // free buffers needed for multiple frame loading; + STBI_FREE(g.history); + STBI_FREE(g.background); + + return u; +} + +static int stbi__gif_info(stbi__context *s, int *x, int *y, int *comp) +{ + return stbi__gif_info_raw(s,x,y,comp); +} +#endif + +// ************************************************************************************************* +// Radiance RGBE HDR loader +// originally by Nicolas Schulz +#ifndef STBI_NO_HDR +static int stbi__hdr_test_core(stbi__context *s, const char *signature) +{ + int i; + for (i=0; signature[i]; ++i) + if (stbi__get8(s) != signature[i]) + return 0; + stbi__rewind(s); + return 1; +} + +static int stbi__hdr_test(stbi__context* s) +{ + int r = stbi__hdr_test_core(s, "#?RADIANCE\n"); + stbi__rewind(s); + if(!r) { + r = stbi__hdr_test_core(s, "#?RGBE\n"); + stbi__rewind(s); + } + return r; +} + +#define STBI__HDR_BUFLEN 1024 +static char *stbi__hdr_gettoken(stbi__context *z, char *buffer) +{ + int len=0; + char c = '\0'; + + c = (char) stbi__get8(z); + + while (!stbi__at_eof(z) && c != '\n') { + buffer[len++] = c; + if (len == STBI__HDR_BUFLEN-1) { + // flush to end of line + while (!stbi__at_eof(z) && stbi__get8(z) != '\n') + ; + break; + } + c = (char) stbi__get8(z); + } + + buffer[len] = 0; + return buffer; +} + +static void stbi__hdr_convert(float *output, stbi_uc *input, int req_comp) +{ + if ( input[3] != 0 ) { + float f1; + // Exponent + f1 = (float) ldexp(1.0f, input[3] - (int)(128 + 8)); + if (req_comp <= 2) + output[0] = (input[0] + input[1] + input[2]) * f1 / 3; + else { + output[0] = input[0] * f1; + output[1] = input[1] * f1; + output[2] = input[2] * f1; + } + if (req_comp == 2) output[1] = 1; + if (req_comp == 4) output[3] = 1; + } else { + switch (req_comp) { + case 4: output[3] = 1; /* fallthrough */ + case 3: output[0] = output[1] = output[2] = 0; + break; + case 2: output[1] = 1; /* fallthrough */ + case 1: output[0] = 0; + break; + } + } +} + +static float *stbi__hdr_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) +{ + char buffer[STBI__HDR_BUFLEN]; + char *token; + int valid = 0; + int width, height; + stbi_uc *scanline; + float *hdr_data; + int len; + unsigned char count, value; + int i, j, k, c1,c2, z; + const char *headerToken; + STBI_NOTUSED(ri); + + // Check identifier + headerToken = stbi__hdr_gettoken(s,buffer); + if (strcmp(headerToken, "#?RADIANCE") != 0 && strcmp(headerToken, "#?RGBE") != 0) + return stbi__errpf("not HDR", "Corrupt HDR image"); + + // Parse header + for(;;) { + token = stbi__hdr_gettoken(s,buffer); + if (token[0] == 0) break; + if (strcmp(token, "FORMAT=32-bit_rle_rgbe") == 0) valid = 1; + } + + if (!valid) return stbi__errpf("unsupported format", "Unsupported HDR format"); + + // Parse width and height + // can't use sscanf() if we're not using stdio! + token = stbi__hdr_gettoken(s,buffer); + if (strncmp(token, "-Y ", 3)) return stbi__errpf("unsupported data layout", "Unsupported HDR format"); + token += 3; + height = (int) strtol(token, &token, 10); + while (*token == ' ') ++token; + if (strncmp(token, "+X ", 3)) return stbi__errpf("unsupported data layout", "Unsupported HDR format"); + token += 3; + width = (int) strtol(token, NULL, 10); + + *x = width; + *y = height; + + if (comp) *comp = 3; + if (req_comp == 0) req_comp = 3; + + if (!stbi__mad4sizes_valid(width, height, req_comp, sizeof(float), 0)) + return stbi__errpf("too large", "HDR image is too large"); + + // Read data + hdr_data = (float *) stbi__malloc_mad4(width, height, req_comp, sizeof(float), 0); + if (!hdr_data) + return stbi__errpf("outofmem", "Out of memory"); + + // Load image data + // image data is stored as some number of sca + if ( width < 8 || width >= 32768) { + // Read flat data + for (j=0; j < height; ++j) { + for (i=0; i < width; ++i) { + stbi_uc rgbe[4]; + main_decode_loop: + stbi__getn(s, rgbe, 4); + stbi__hdr_convert(hdr_data + j * width * req_comp + i * req_comp, rgbe, req_comp); + } + } + } else { + // Read RLE-encoded data + scanline = NULL; + + for (j = 0; j < height; ++j) { + c1 = stbi__get8(s); + c2 = stbi__get8(s); + len = stbi__get8(s); + if (c1 != 2 || c2 != 2 || (len & 0x80)) { + // not run-length encoded, so we have to actually use THIS data as a decoded + // pixel (note this can't be a valid pixel--one of RGB must be >= 128) + stbi_uc rgbe[4]; + rgbe[0] = (stbi_uc) c1; + rgbe[1] = (stbi_uc) c2; + rgbe[2] = (stbi_uc) len; + rgbe[3] = (stbi_uc) stbi__get8(s); + stbi__hdr_convert(hdr_data, rgbe, req_comp); + i = 1; + j = 0; + STBI_FREE(scanline); + goto main_decode_loop; // yes, this makes no sense + } + len <<= 8; + len |= stbi__get8(s); + if (len != width) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("invalid decoded scanline length", "corrupt HDR"); } + if (scanline == NULL) { + scanline = (stbi_uc *) stbi__malloc_mad2(width, 4, 0); + if (!scanline) { + STBI_FREE(hdr_data); + return stbi__errpf("outofmem", "Out of memory"); + } + } + + for (k = 0; k < 4; ++k) { + int nleft; + i = 0; + while ((nleft = width - i) > 0) { + count = stbi__get8(s); + if (count > 128) { + // Run + value = stbi__get8(s); + count -= 128; + if (count > nleft) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("corrupt", "bad RLE data in HDR"); } + for (z = 0; z < count; ++z) + scanline[i++ * 4 + k] = value; + } else { + // Dump + if (count > nleft) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("corrupt", "bad RLE data in HDR"); } + for (z = 0; z < count; ++z) + scanline[i++ * 4 + k] = stbi__get8(s); + } + } + } + for (i=0; i < width; ++i) + stbi__hdr_convert(hdr_data+(j*width + i)*req_comp, scanline + i*4, req_comp); + } + if (scanline) + STBI_FREE(scanline); + } + + return hdr_data; +} + +static int stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp) +{ + char buffer[STBI__HDR_BUFLEN]; + char *token; + int valid = 0; + int dummy; + + if (!x) x = &dummy; + if (!y) y = &dummy; + if (!comp) comp = &dummy; + + if (stbi__hdr_test(s) == 0) { + stbi__rewind( s ); + return 0; + } + + for(;;) { + token = stbi__hdr_gettoken(s,buffer); + if (token[0] == 0) break; + if (strcmp(token, "FORMAT=32-bit_rle_rgbe") == 0) valid = 1; + } + + if (!valid) { + stbi__rewind( s ); + return 0; + } + token = stbi__hdr_gettoken(s,buffer); + if (strncmp(token, "-Y ", 3)) { + stbi__rewind( s ); + return 0; + } + token += 3; + *y = (int) strtol(token, &token, 10); + while (*token == ' ') ++token; + if (strncmp(token, "+X ", 3)) { + stbi__rewind( s ); + return 0; + } + token += 3; + *x = (int) strtol(token, NULL, 10); + *comp = 3; + return 1; +} +#endif // STBI_NO_HDR + +#ifndef STBI_NO_BMP +static int stbi__bmp_info(stbi__context *s, int *x, int *y, int *comp) +{ + void *p; + stbi__bmp_data info; + + info.all_a = 255; + p = stbi__bmp_parse_header(s, &info); + stbi__rewind( s ); + if (p == NULL) + return 0; + if (x) *x = s->img_x; + if (y) *y = s->img_y; + if (comp) *comp = info.ma ? 4 : 3; + return 1; +} +#endif + +#ifndef STBI_NO_PSD +static int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp) +{ + int channelCount, dummy, depth; + if (!x) x = &dummy; + if (!y) y = &dummy; + if (!comp) comp = &dummy; + if (stbi__get32be(s) != 0x38425053) { + stbi__rewind( s ); + return 0; + } + if (stbi__get16be(s) != 1) { + stbi__rewind( s ); + return 0; + } + stbi__skip(s, 6); + channelCount = stbi__get16be(s); + if (channelCount < 0 || channelCount > 16) { + stbi__rewind( s ); + return 0; + } + *y = stbi__get32be(s); + *x = stbi__get32be(s); + depth = stbi__get16be(s); + if (depth != 8 && depth != 16) { + stbi__rewind( s ); + return 0; + } + if (stbi__get16be(s) != 3) { + stbi__rewind( s ); + return 0; + } + *comp = 4; + return 1; +} + +static int stbi__psd_is16(stbi__context *s) +{ + int channelCount, depth; + if (stbi__get32be(s) != 0x38425053) { + stbi__rewind( s ); + return 0; + } + if (stbi__get16be(s) != 1) { + stbi__rewind( s ); + return 0; + } + stbi__skip(s, 6); + channelCount = stbi__get16be(s); + if (channelCount < 0 || channelCount > 16) { + stbi__rewind( s ); + return 0; + } + (void) stbi__get32be(s); + (void) stbi__get32be(s); + depth = stbi__get16be(s); + if (depth != 16) { + stbi__rewind( s ); + return 0; + } + return 1; +} +#endif + +#ifndef STBI_NO_PIC +static int stbi__pic_info(stbi__context *s, int *x, int *y, int *comp) +{ + int act_comp=0,num_packets=0,chained,dummy; + stbi__pic_packet packets[10]; + + if (!x) x = &dummy; + if (!y) y = &dummy; + if (!comp) comp = &dummy; + + if (!stbi__pic_is4(s,"\x53\x80\xF6\x34")) { + stbi__rewind(s); + return 0; + } + + stbi__skip(s, 88); + + *x = stbi__get16be(s); + *y = stbi__get16be(s); + if (stbi__at_eof(s)) { + stbi__rewind( s); + return 0; + } + if ( (*x) != 0 && (1 << 28) / (*x) < (*y)) { + stbi__rewind( s ); + return 0; + } + + stbi__skip(s, 8); + + do { + stbi__pic_packet *packet; + + if (num_packets==sizeof(packets)/sizeof(packets[0])) + return 0; + + packet = &packets[num_packets++]; + chained = stbi__get8(s); + packet->size = stbi__get8(s); + packet->type = stbi__get8(s); + packet->channel = stbi__get8(s); + act_comp |= packet->channel; + + if (stbi__at_eof(s)) { + stbi__rewind( s ); + return 0; + } + if (packet->size != 8) { + stbi__rewind( s ); + return 0; + } + } while (chained); + + *comp = (act_comp & 0x10 ? 4 : 3); + + return 1; +} +#endif + +// ************************************************************************************************* +// Portable Gray Map and Portable Pixel Map loader +// by Ken Miller +// +// PGM: http://netpbm.sourceforge.net/doc/pgm.html +// PPM: http://netpbm.sourceforge.net/doc/ppm.html +// +// Known limitations: +// Does not support comments in the header section +// Does not support ASCII image data (formats P2 and P3) +// Does not support 16-bit-per-channel + +#ifndef STBI_NO_PNM + +static int stbi__pnm_test(stbi__context *s) +{ + char p, t; + p = (char) stbi__get8(s); + t = (char) stbi__get8(s); + if (p != 'P' || (t != '5' && t != '6')) { + stbi__rewind( s ); + return 0; + } + return 1; +} + +static void *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) +{ + stbi_uc *out; + STBI_NOTUSED(ri); + + if (!stbi__pnm_info(s, (int *)&s->img_x, (int *)&s->img_y, (int *)&s->img_n)) + return 0; + + *x = s->img_x; + *y = s->img_y; + if (comp) *comp = s->img_n; + + if (!stbi__mad3sizes_valid(s->img_n, s->img_x, s->img_y, 0)) + return stbi__errpuc("too large", "PNM too large"); + + out = (stbi_uc *) stbi__malloc_mad3(s->img_n, s->img_x, s->img_y, 0); + if (!out) return stbi__errpuc("outofmem", "Out of memory"); + stbi__getn(s, out, s->img_n * s->img_x * s->img_y); + + if (req_comp && req_comp != s->img_n) { + out = stbi__convert_format(out, s->img_n, req_comp, s->img_x, s->img_y); + if (out == NULL) return out; // stbi__convert_format frees input on failure + } + return out; +} + +static int stbi__pnm_isspace(char c) +{ + return c == ' ' || c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r'; +} + +static void stbi__pnm_skip_whitespace(stbi__context *s, char *c) +{ + for (;;) { + while (!stbi__at_eof(s) && stbi__pnm_isspace(*c)) + *c = (char) stbi__get8(s); + + if (stbi__at_eof(s) || *c != '#') + break; + + while (!stbi__at_eof(s) && *c != '\n' && *c != '\r' ) + *c = (char) stbi__get8(s); + } +} + +static int stbi__pnm_isdigit(char c) +{ + return c >= '0' && c <= '9'; +} + +static int stbi__pnm_getinteger(stbi__context *s, char *c) +{ + int value = 0; + + while (!stbi__at_eof(s) && stbi__pnm_isdigit(*c)) { + value = value*10 + (*c - '0'); + *c = (char) stbi__get8(s); + } + + return value; +} + +static int stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp) +{ + int maxv, dummy; + char c, p, t; + + if (!x) x = &dummy; + if (!y) y = &dummy; + if (!comp) comp = &dummy; + + stbi__rewind(s); + + // Get identifier + p = (char) stbi__get8(s); + t = (char) stbi__get8(s); + if (p != 'P' || (t != '5' && t != '6')) { + stbi__rewind(s); + return 0; + } + + *comp = (t == '6') ? 3 : 1; // '5' is 1-component .pgm; '6' is 3-component .ppm + + c = (char) stbi__get8(s); + stbi__pnm_skip_whitespace(s, &c); + + *x = stbi__pnm_getinteger(s, &c); // read width + stbi__pnm_skip_whitespace(s, &c); + + *y = stbi__pnm_getinteger(s, &c); // read height + stbi__pnm_skip_whitespace(s, &c); + + maxv = stbi__pnm_getinteger(s, &c); // read max value + + if (maxv > 255) + return stbi__err("max value > 255", "PPM image not 8-bit"); + else + return 1; +} +#endif + +static int stbi__info_main(stbi__context *s, int *x, int *y, int *comp) +{ + #ifndef STBI_NO_JPEG + if (stbi__jpeg_info(s, x, y, comp)) return 1; + #endif + + #ifndef STBI_NO_PNG + if (stbi__png_info(s, x, y, comp)) return 1; + #endif + + #ifndef STBI_NO_GIF + if (stbi__gif_info(s, x, y, comp)) return 1; + #endif + + #ifndef STBI_NO_BMP + if (stbi__bmp_info(s, x, y, comp)) return 1; + #endif + + #ifndef STBI_NO_PSD + if (stbi__psd_info(s, x, y, comp)) return 1; + #endif + + #ifndef STBI_NO_PIC + if (stbi__pic_info(s, x, y, comp)) return 1; + #endif + + #ifndef STBI_NO_PNM + if (stbi__pnm_info(s, x, y, comp)) return 1; + #endif + + #ifndef STBI_NO_HDR + if (stbi__hdr_info(s, x, y, comp)) return 1; + #endif + + // test tga last because it's a crappy test! + #ifndef STBI_NO_TGA + if (stbi__tga_info(s, x, y, comp)) + return 1; + #endif + return stbi__err("unknown image type", "Image not of any known type, or corrupt"); +} + +static int stbi__is_16_main(stbi__context *s) +{ + #ifndef STBI_NO_PNG + if (stbi__png_is16(s)) return 1; + #endif + + #ifndef STBI_NO_PSD + if (stbi__psd_is16(s)) return 1; + #endif + + return 0; +} + +#ifndef STBI_NO_STDIO +STBIDEF int stbi_info(char const *filename, int *x, int *y, int *comp) +{ + FILE *f = stbi__fopen(filename, "rb"); + int result; + if (!f) return stbi__err("can't fopen", "Unable to open file"); + result = stbi_info_from_file(f, x, y, comp); + fclose(f); + return result; +} + +STBIDEF int stbi_info_from_file(FILE *f, int *x, int *y, int *comp) +{ + int r; + stbi__context s; + long pos = ftell(f); + stbi__start_file(&s, f); + r = stbi__info_main(&s,x,y,comp); + fseek(f,pos,SEEK_SET); + return r; +} + +STBIDEF int stbi_is_16_bit(char const *filename) +{ + FILE *f = stbi__fopen(filename, "rb"); + int result; + if (!f) return stbi__err("can't fopen", "Unable to open file"); + result = stbi_is_16_bit_from_file(f); + fclose(f); + return result; +} + +STBIDEF int stbi_is_16_bit_from_file(FILE *f) +{ + int r; + stbi__context s; + long pos = ftell(f); + stbi__start_file(&s, f); + r = stbi__is_16_main(&s); + fseek(f,pos,SEEK_SET); + return r; +} +#endif // !STBI_NO_STDIO + +STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp) +{ + stbi__context s; + stbi__start_mem(&s,buffer,len); + return stbi__info_main(&s,x,y,comp); +} + +STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *c, void *user, int *x, int *y, int *comp) +{ + stbi__context s; + stbi__start_callbacks(&s, (stbi_io_callbacks *) c, user); + return stbi__info_main(&s,x,y,comp); +} + +STBIDEF int stbi_is_16_bit_from_memory(stbi_uc const *buffer, int len) +{ + stbi__context s; + stbi__start_mem(&s,buffer,len); + return stbi__is_16_main(&s); +} + +STBIDEF int stbi_is_16_bit_from_callbacks(stbi_io_callbacks const *c, void *user) +{ + stbi__context s; + stbi__start_callbacks(&s, (stbi_io_callbacks *) c, user); + return stbi__is_16_main(&s); +} + +#endif // STB_IMAGE_IMPLEMENTATION + +/* + revision history: + 2.20 (2019-02-07) support utf8 filenames in Windows; fix warnings and platform ifdefs + 2.19 (2018-02-11) fix warning + 2.18 (2018-01-30) fix warnings + 2.17 (2018-01-29) change sbti__shiftsigned to avoid clang -O2 bug + 1-bit BMP + *_is_16_bit api + avoid warnings + 2.16 (2017-07-23) all functions have 16-bit variants; + STBI_NO_STDIO works again; + compilation fixes; + fix rounding in unpremultiply; + optimize vertical flip; + disable raw_len validation; + documentation fixes + 2.15 (2017-03-18) fix png-1,2,4 bug; now all Imagenet JPGs decode; + warning fixes; disable run-time SSE detection on gcc; + uniform handling of optional "return" values; + thread-safe initialization of zlib tables + 2.14 (2017-03-03) remove deprecated STBI_JPEG_OLD; fixes for Imagenet JPGs + 2.13 (2016-11-29) add 16-bit API, only supported for PNG right now + 2.12 (2016-04-02) fix typo in 2.11 PSD fix that caused crashes + 2.11 (2016-04-02) allocate large structures on the stack + remove white matting for transparent PSD + fix reported channel count for PNG & BMP + re-enable SSE2 in non-gcc 64-bit + support RGB-formatted JPEG + read 16-bit PNGs (only as 8-bit) + 2.10 (2016-01-22) avoid warning introduced in 2.09 by STBI_REALLOC_SIZED + 2.09 (2016-01-16) allow comments in PNM files + 16-bit-per-pixel TGA (not bit-per-component) + info() for TGA could break due to .hdr handling + info() for BMP to shares code instead of sloppy parse + can use STBI_REALLOC_SIZED if allocator doesn't support realloc + code cleanup + 2.08 (2015-09-13) fix to 2.07 cleanup, reading RGB PSD as RGBA + 2.07 (2015-09-13) fix compiler warnings + partial animated GIF support + limited 16-bpc PSD support + #ifdef unused functions + bug with < 92 byte PIC,PNM,HDR,TGA + 2.06 (2015-04-19) fix bug where PSD returns wrong '*comp' value + 2.05 (2015-04-19) fix bug in progressive JPEG handling, fix warning + 2.04 (2015-04-15) try to re-enable SIMD on MinGW 64-bit + 2.03 (2015-04-12) extra corruption checking (mmozeiko) + stbi_set_flip_vertically_on_load (nguillemot) + fix NEON support; fix mingw support + 2.02 (2015-01-19) fix incorrect assert, fix warning + 2.01 (2015-01-17) fix various warnings; suppress SIMD on gcc 32-bit without -msse2 + 2.00b (2014-12-25) fix STBI_MALLOC in progressive JPEG + 2.00 (2014-12-25) optimize JPG, including x86 SSE2 & NEON SIMD (ryg) + progressive JPEG (stb) + PGM/PPM support (Ken Miller) + STBI_MALLOC,STBI_REALLOC,STBI_FREE + GIF bugfix -- seemingly never worked + STBI_NO_*, STBI_ONLY_* + 1.48 (2014-12-14) fix incorrectly-named assert() + 1.47 (2014-12-14) 1/2/4-bit PNG support, both direct and paletted (Omar Cornut & stb) + optimize PNG (ryg) + fix bug in interlaced PNG with user-specified channel count (stb) + 1.46 (2014-08-26) + fix broken tRNS chunk (colorkey-style transparency) in non-paletted PNG + 1.45 (2014-08-16) + fix MSVC-ARM internal compiler error by wrapping malloc + 1.44 (2014-08-07) + various warning fixes from Ronny Chevalier + 1.43 (2014-07-15) + fix MSVC-only compiler problem in code changed in 1.42 + 1.42 (2014-07-09) + don't define _CRT_SECURE_NO_WARNINGS (affects user code) + fixes to stbi__cleanup_jpeg path + added STBI_ASSERT to avoid requiring assert.h + 1.41 (2014-06-25) + fix search&replace from 1.36 that messed up comments/error messages + 1.40 (2014-06-22) + fix gcc struct-initialization warning + 1.39 (2014-06-15) + fix to TGA optimization when req_comp != number of components in TGA; + fix to GIF loading because BMP wasn't rewinding (whoops, no GIFs in my test suite) + add support for BMP version 5 (more ignored fields) + 1.38 (2014-06-06) + suppress MSVC warnings on integer casts truncating values + fix accidental rename of 'skip' field of I/O + 1.37 (2014-06-04) + remove duplicate typedef + 1.36 (2014-06-03) + convert to header file single-file library + if de-iphone isn't set, load iphone images color-swapped instead of returning NULL + 1.35 (2014-05-27) + various warnings + fix broken STBI_SIMD path + fix bug where stbi_load_from_file no longer left file pointer in correct place + fix broken non-easy path for 32-bit BMP (possibly never used) + TGA optimization by Arseny Kapoulkine + 1.34 (unknown) + use STBI_NOTUSED in stbi__resample_row_generic(), fix one more leak in tga failure case + 1.33 (2011-07-14) + make stbi_is_hdr work in STBI_NO_HDR (as specified), minor compiler-friendly improvements + 1.32 (2011-07-13) + support for "info" function for all supported filetypes (SpartanJ) + 1.31 (2011-06-20) + a few more leak fixes, bug in PNG handling (SpartanJ) + 1.30 (2011-06-11) + added ability to load files via callbacks to accomidate custom input streams (Ben Wenger) + removed deprecated format-specific test/load functions + removed support for installable file formats (stbi_loader) -- would have been broken for IO callbacks anyway + error cases in bmp and tga give messages and don't leak (Raymond Barbiero, grisha) + fix inefficiency in decoding 32-bit BMP (David Woo) + 1.29 (2010-08-16) + various warning fixes from Aurelien Pocheville + 1.28 (2010-08-01) + fix bug in GIF palette transparency (SpartanJ) + 1.27 (2010-08-01) + cast-to-stbi_uc to fix warnings + 1.26 (2010-07-24) + fix bug in file buffering for PNG reported by SpartanJ + 1.25 (2010-07-17) + refix trans_data warning (Won Chun) + 1.24 (2010-07-12) + perf improvements reading from files on platforms with lock-heavy fgetc() + minor perf improvements for jpeg + deprecated type-specific functions so we'll get feedback if they're needed + attempt to fix trans_data warning (Won Chun) + 1.23 fixed bug in iPhone support + 1.22 (2010-07-10) + removed image *writing* support + stbi_info support from Jetro Lauha + GIF support from Jean-Marc Lienher + iPhone PNG-extensions from James Brown + warning-fixes from Nicolas Schulz and Janez Zemva (i.stbi__err. Janez (U+017D)emva) + 1.21 fix use of 'stbi_uc' in header (reported by jon blow) + 1.20 added support for Softimage PIC, by Tom Seddon + 1.19 bug in interlaced PNG corruption check (found by ryg) + 1.18 (2008-08-02) + fix a threading bug (local mutable static) + 1.17 support interlaced PNG + 1.16 major bugfix - stbi__convert_format converted one too many pixels + 1.15 initialize some fields for thread safety + 1.14 fix threadsafe conversion bug + header-file-only version (#define STBI_HEADER_FILE_ONLY before including) + 1.13 threadsafe + 1.12 const qualifiers in the API + 1.11 Support installable IDCT, colorspace conversion routines + 1.10 Fixes for 64-bit (don't use "unsigned long") + optimized upsampling by Fabian "ryg" Giesen + 1.09 Fix format-conversion for PSD code (bad global variables!) + 1.08 Thatcher Ulrich's PSD code integrated by Nicolas Schulz + 1.07 attempt to fix C++ warning/errors again + 1.06 attempt to fix C++ warning/errors again + 1.05 fix TGA loading to return correct *comp and use good luminance calc + 1.04 default float alpha is 1, not 255; use 'void *' for stbi_image_free + 1.03 bugfixes to STBI_NO_STDIO, STBI_NO_HDR + 1.02 support for (subset of) HDR files, float interface for preferred access to them + 1.01 fix bug: possible bug in handling right-side up bmps... not sure + fix bug: the stbi__bmp_load() and stbi__tga_load() functions didn't work at all + 1.00 interface to zlib that skips zlib header + 0.99 correct handling of alpha in palette + 0.98 TGA loader by lonesock; dynamically add loaders (untested) + 0.97 jpeg errors on too large a file; also catch another malloc failure + 0.96 fix detection of invalid v value - particleman@mollyrocket forum + 0.95 during header scan, seek to markers in case of padding + 0.94 STBI_NO_STDIO to disable stdio usage; rename all #defines the same + 0.93 handle jpegtran output; verbose errors + 0.92 read 4,8,16,24,32-bit BMP files of several formats + 0.91 output 24-bit Windows 3.0 BMP files + 0.90 fix a few more warnings; bump version number to approach 1.0 + 0.61 bugfixes due to Marc LeBlanc, Christopher Lloyd + 0.60 fix compiling as c++ + 0.59 fix warnings: merge Dave Moore's -Wall fixes + 0.58 fix bug: zlib uncompressed mode len/nlen was wrong endian + 0.57 fix bug: jpg last huffman symbol before marker was >9 bits but less than 16 available + 0.56 fix bug: zlib uncompressed mode len vs. nlen + 0.55 fix bug: restart_interval not initialized to 0 + 0.54 allow NULL for 'int *comp' + 0.53 fix bug in png 3->4; speedup png decoding + 0.52 png handles req_comp=3,4 directly; minor cleanup; jpeg comments + 0.51 obey req_comp requests, 1-component jpegs return as 1-component, + on 'test' only check type, not whether we support this variant + 0.50 (2006-11-19) + first released version +*/ + + +/* +------------------------------------------------------------------------------ +This software is available under 2 licenses -- choose whichever you prefer. +------------------------------------------------------------------------------ +ALTERNATIVE A - MIT License +Copyright (c) 2017 Sean Barrett +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +------------------------------------------------------------------------------ +ALTERNATIVE B - Public Domain (www.unlicense.org) +This is free and unencumbered software released into the public domain. +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------ +*/ diff --git a/frontends/gl/win/glfw/include/GLFW/glfw3.h b/frontends/gl/win/glfw/include/GLFW/glfw3.h index 1fc8fe5..c1e6145 100644 --- a/frontends/gl/win/glfw/include/GLFW/glfw3.h +++ b/frontends/gl/win/glfw/include/GLFW/glfw3.h @@ -1,5544 +1,5544 @@ -/************************************************************************* - * GLFW 3.3 - www.glfw.org - * A library for OpenGL, window and input - *------------------------------------------------------------------------ - * Copyright (c) 2002-2006 Marcus Geelnard - * Copyright (c) 2006-2016 Camilla Löwy - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would - * be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and must not - * be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - *************************************************************************/ - -#ifndef _glfw3_h_ -#define _glfw3_h_ - -#ifdef __cplusplus -extern "C" { -#endif - - -/************************************************************************* - * Doxygen documentation - *************************************************************************/ - -/*! @file glfw3.h - * @brief The header of the GLFW 3 API. - * - * This is the header file of the GLFW 3 API. It defines all its types and - * declares all its functions. - * - * For more information about how to use this file, see @ref build_include. - */ -/*! @defgroup context Context reference - * @brief Functions and types related to OpenGL and OpenGL ES contexts. - * - * This is the reference documentation for OpenGL and OpenGL ES context related - * functions. For more task-oriented information, see the @ref context_guide. - */ -/*! @defgroup vulkan Vulkan reference - * @brief Functions and types related to Vulkan. - * - * This is the reference documentation for Vulkan related functions and types. - * For more task-oriented information, see the @ref vulkan_guide. - */ -/*! @defgroup init Initialization, version and error reference - * @brief Functions and types related to initialization and error handling. - * - * This is the reference documentation for initialization and termination of - * the library, version management and error handling. For more task-oriented - * information, see the @ref intro_guide. - */ -/*! @defgroup input Input reference - * @brief Functions and types related to input handling. - * - * This is the reference documentation for input related functions and types. - * For more task-oriented information, see the @ref input_guide. - */ -/*! @defgroup monitor Monitor reference - * @brief Functions and types related to monitors. - * - * This is the reference documentation for monitor related functions and types. - * For more task-oriented information, see the @ref monitor_guide. - */ -/*! @defgroup window Window reference - * @brief Functions and types related to windows. - * - * This is the reference documentation for window related functions and types, - * including creation, deletion and event polling. For more task-oriented - * information, see the @ref window_guide. - */ - - -/************************************************************************* - * Compiler- and platform-specific preprocessor work - *************************************************************************/ - -/* If we are we on Windows, we want a single define for it. - */ -#if !defined(_WIN32) && (defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__)) - #define _WIN32 -#endif /* _WIN32 */ - -/* It is customary to use APIENTRY for OpenGL function pointer declarations on - * all platforms. Additionally, the Windows OpenGL header needs APIENTRY. - */ -#ifndef APIENTRY - #ifdef _WIN32 - #define APIENTRY __stdcall - #else - #define APIENTRY - #endif - #define GLFW_APIENTRY_DEFINED -#endif /* APIENTRY */ - -/* Some Windows OpenGL headers need this. - */ -#if !defined(WINGDIAPI) && defined(_WIN32) - #define WINGDIAPI __declspec(dllimport) - #define GLFW_WINGDIAPI_DEFINED -#endif /* WINGDIAPI */ - -/* Some Windows GLU headers need this. - */ -#if !defined(CALLBACK) && defined(_WIN32) - #define CALLBACK __stdcall - #define GLFW_CALLBACK_DEFINED -#endif /* CALLBACK */ - -/* Include because most Windows GLU headers need wchar_t and - * the macOS OpenGL header blocks the definition of ptrdiff_t by glext.h. - * Include it unconditionally to avoid surprising side-effects. - */ -#include - -/* Include because it is needed by Vulkan and related functions. - * Include it unconditionally to avoid surprising side-effects. - */ -#include - -/* Include the chosen OpenGL or OpenGL ES headers. - */ -#if defined(GLFW_INCLUDE_ES1) - - #include - #if defined(GLFW_INCLUDE_GLEXT) - #include - #endif - -#elif defined(GLFW_INCLUDE_ES2) - - #include - #if defined(GLFW_INCLUDE_GLEXT) - #include - #endif - -#elif defined(GLFW_INCLUDE_ES3) - - #include - #if defined(GLFW_INCLUDE_GLEXT) - #include - #endif - -#elif defined(GLFW_INCLUDE_ES31) - - #include - #if defined(GLFW_INCLUDE_GLEXT) - #include - #endif - -#elif defined(GLFW_INCLUDE_ES32) - - #include - #if defined(GLFW_INCLUDE_GLEXT) - #include - #endif - -#elif defined(GLFW_INCLUDE_GLCOREARB) - - #if defined(__APPLE__) - - #include - #if defined(GLFW_INCLUDE_GLEXT) - #include - #endif /*GLFW_INCLUDE_GLEXT*/ - - #else /*__APPLE__*/ - - #include - - #endif /*__APPLE__*/ - -#elif !defined(GLFW_INCLUDE_NONE) - - #if defined(__APPLE__) - - #if !defined(GLFW_INCLUDE_GLEXT) - #define GL_GLEXT_LEGACY - #endif - #include - #if defined(GLFW_INCLUDE_GLU) - #include - #endif - - #else /*__APPLE__*/ - - #include - #if defined(GLFW_INCLUDE_GLEXT) - #include - #endif - #if defined(GLFW_INCLUDE_GLU) - #include - #endif - - #endif /*__APPLE__*/ - -#endif /* OpenGL and OpenGL ES headers */ - -#if defined(GLFW_INCLUDE_VULKAN) - #include -#endif /* Vulkan header */ - -#if defined(GLFW_DLL) && defined(_GLFW_BUILD_DLL) - /* GLFW_DLL must be defined by applications that are linking against the DLL - * version of the GLFW library. _GLFW_BUILD_DLL is defined by the GLFW - * configuration header when compiling the DLL version of the library. - */ - #error "You must not have both GLFW_DLL and _GLFW_BUILD_DLL defined" -#endif - -/* GLFWAPI is used to declare public API functions for export - * from the DLL / shared library / dynamic library. - */ -#if defined(_WIN32) && defined(_GLFW_BUILD_DLL) - /* We are building GLFW as a Win32 DLL */ - #define GLFWAPI __declspec(dllexport) -#elif defined(_WIN32) && defined(GLFW_DLL) - /* We are calling GLFW as a Win32 DLL */ - #define GLFWAPI __declspec(dllimport) -#elif defined(__GNUC__) && defined(_GLFW_BUILD_DLL) - /* We are building GLFW as a shared / dynamic library */ - #define GLFWAPI __attribute__((visibility("default"))) -#else - /* We are building or calling GLFW as a static library */ - #define GLFWAPI -#endif - - -/************************************************************************* - * GLFW API tokens - *************************************************************************/ - -/*! @name GLFW version macros - * @{ */ -/*! @brief The major version number of the GLFW library. - * - * This is incremented when the API is changed in non-compatible ways. - * @ingroup init - */ -#define GLFW_VERSION_MAJOR 3 -/*! @brief The minor version number of the GLFW library. - * - * This is incremented when features are added to the API but it remains - * backward-compatible. - * @ingroup init - */ -#define GLFW_VERSION_MINOR 3 -/*! @brief The revision number of the GLFW library. - * - * This is incremented when a bug fix release is made that does not contain any - * API changes. - * @ingroup init - */ -#define GLFW_VERSION_REVISION 0 -/*! @} */ - -/*! @name Boolean values - * @{ */ -/*! @brief One. - * - * One. Seriously. You don't _need_ to use this symbol in your code. It's - * semantic sugar for the number 1. You can also use `1` or `true` or `_True` - * or `GL_TRUE` or whatever you want. - */ -#define GLFW_TRUE 1 -/*! @brief Zero. - * - * Zero. Seriously. You don't _need_ to use this symbol in your code. It's - * semantic sugar for the number 0. You can also use `0` or `false` or - * `_False` or `GL_FALSE` or whatever you want. - */ -#define GLFW_FALSE 0 -/*! @} */ - -/*! @name Key and button actions - * @{ */ -/*! @brief The key or mouse button was released. - * - * The key or mouse button was released. - * - * @ingroup input - */ -#define GLFW_RELEASE 0 -/*! @brief The key or mouse button was pressed. - * - * The key or mouse button was pressed. - * - * @ingroup input - */ -#define GLFW_PRESS 1 -/*! @brief The key was held down until it repeated. - * - * The key was held down until it repeated. - * - * @ingroup input - */ -#define GLFW_REPEAT 2 -/*! @} */ - -/*! @defgroup hat_state Joystick hat states - * - * See [joystick hat input](@ref joystick_hat) for how these are used. - * - * @ingroup input - * @{ */ -#define GLFW_HAT_CENTERED 0 -#define GLFW_HAT_UP 1 -#define GLFW_HAT_RIGHT 2 -#define GLFW_HAT_DOWN 4 -#define GLFW_HAT_LEFT 8 -#define GLFW_HAT_RIGHT_UP (GLFW_HAT_RIGHT | GLFW_HAT_UP) -#define GLFW_HAT_RIGHT_DOWN (GLFW_HAT_RIGHT | GLFW_HAT_DOWN) -#define GLFW_HAT_LEFT_UP (GLFW_HAT_LEFT | GLFW_HAT_UP) -#define GLFW_HAT_LEFT_DOWN (GLFW_HAT_LEFT | GLFW_HAT_DOWN) -/*! @} */ - -/*! @defgroup keys Keyboard keys - * @brief Keyboard key IDs. - * - * See [key input](@ref input_key) for how these are used. - * - * These key codes are inspired by the _USB HID Usage Tables v1.12_ (p. 53-60), - * but re-arranged to map to 7-bit ASCII for printable keys (function keys are - * put in the 256+ range). - * - * The naming of the key codes follow these rules: - * - The US keyboard layout is used - * - Names of printable alpha-numeric characters are used (e.g. "A", "R", - * "3", etc.) - * - For non-alphanumeric characters, Unicode:ish names are used (e.g. - * "COMMA", "LEFT_SQUARE_BRACKET", etc.). Note that some names do not - * correspond to the Unicode standard (usually for brevity) - * - Keys that lack a clear US mapping are named "WORLD_x" - * - For non-printable keys, custom names are used (e.g. "F4", - * "BACKSPACE", etc.) - * - * @ingroup input - * @{ - */ - -/* The unknown key */ -#define GLFW_KEY_UNKNOWN -1 - -/* Printable keys */ -#define GLFW_KEY_SPACE 32 -#define GLFW_KEY_APOSTROPHE 39 /* ' */ -#define GLFW_KEY_COMMA 44 /* , */ -#define GLFW_KEY_MINUS 45 /* - */ -#define GLFW_KEY_PERIOD 46 /* . */ -#define GLFW_KEY_SLASH 47 /* / */ -#define GLFW_KEY_0 48 -#define GLFW_KEY_1 49 -#define GLFW_KEY_2 50 -#define GLFW_KEY_3 51 -#define GLFW_KEY_4 52 -#define GLFW_KEY_5 53 -#define GLFW_KEY_6 54 -#define GLFW_KEY_7 55 -#define GLFW_KEY_8 56 -#define GLFW_KEY_9 57 -#define GLFW_KEY_SEMICOLON 59 /* ; */ -#define GLFW_KEY_EQUAL 61 /* = */ -#define GLFW_KEY_A 65 -#define GLFW_KEY_B 66 -#define GLFW_KEY_C 67 -#define GLFW_KEY_D 68 -#define GLFW_KEY_E 69 -#define GLFW_KEY_F 70 -#define GLFW_KEY_G 71 -#define GLFW_KEY_H 72 -#define GLFW_KEY_I 73 -#define GLFW_KEY_J 74 -#define GLFW_KEY_K 75 -#define GLFW_KEY_L 76 -#define GLFW_KEY_M 77 -#define GLFW_KEY_N 78 -#define GLFW_KEY_O 79 -#define GLFW_KEY_P 80 -#define GLFW_KEY_Q 81 -#define GLFW_KEY_R 82 -#define GLFW_KEY_S 83 -#define GLFW_KEY_T 84 -#define GLFW_KEY_U 85 -#define GLFW_KEY_V 86 -#define GLFW_KEY_W 87 -#define GLFW_KEY_X 88 -#define GLFW_KEY_Y 89 -#define GLFW_KEY_Z 90 -#define GLFW_KEY_LEFT_BRACKET 91 /* [ */ -#define GLFW_KEY_BACKSLASH 92 /* \ */ -#define GLFW_KEY_RIGHT_BRACKET 93 /* ] */ -#define GLFW_KEY_GRAVE_ACCENT 96 /* ` */ -#define GLFW_KEY_WORLD_1 161 /* non-US #1 */ -#define GLFW_KEY_WORLD_2 162 /* non-US #2 */ - -/* Function keys */ -#define GLFW_KEY_ESCAPE 256 -#define GLFW_KEY_ENTER 257 -#define GLFW_KEY_TAB 258 -#define GLFW_KEY_BACKSPACE 259 -#define GLFW_KEY_INSERT 260 -#define GLFW_KEY_DELETE 261 -#define GLFW_KEY_RIGHT 262 -#define GLFW_KEY_LEFT 263 -#define GLFW_KEY_DOWN 264 -#define GLFW_KEY_UP 265 -#define GLFW_KEY_PAGE_UP 266 -#define GLFW_KEY_PAGE_DOWN 267 -#define GLFW_KEY_HOME 268 -#define GLFW_KEY_END 269 -#define GLFW_KEY_CAPS_LOCK 280 -#define GLFW_KEY_SCROLL_LOCK 281 -#define GLFW_KEY_NUM_LOCK 282 -#define GLFW_KEY_PRINT_SCREEN 283 -#define GLFW_KEY_PAUSE 284 -#define GLFW_KEY_F1 290 -#define GLFW_KEY_F2 291 -#define GLFW_KEY_F3 292 -#define GLFW_KEY_F4 293 -#define GLFW_KEY_F5 294 -#define GLFW_KEY_F6 295 -#define GLFW_KEY_F7 296 -#define GLFW_KEY_F8 297 -#define GLFW_KEY_F9 298 -#define GLFW_KEY_F10 299 -#define GLFW_KEY_F11 300 -#define GLFW_KEY_F12 301 -#define GLFW_KEY_F13 302 -#define GLFW_KEY_F14 303 -#define GLFW_KEY_F15 304 -#define GLFW_KEY_F16 305 -#define GLFW_KEY_F17 306 -#define GLFW_KEY_F18 307 -#define GLFW_KEY_F19 308 -#define GLFW_KEY_F20 309 -#define GLFW_KEY_F21 310 -#define GLFW_KEY_F22 311 -#define GLFW_KEY_F23 312 -#define GLFW_KEY_F24 313 -#define GLFW_KEY_F25 314 -#define GLFW_KEY_KP_0 320 -#define GLFW_KEY_KP_1 321 -#define GLFW_KEY_KP_2 322 -#define GLFW_KEY_KP_3 323 -#define GLFW_KEY_KP_4 324 -#define GLFW_KEY_KP_5 325 -#define GLFW_KEY_KP_6 326 -#define GLFW_KEY_KP_7 327 -#define GLFW_KEY_KP_8 328 -#define GLFW_KEY_KP_9 329 -#define GLFW_KEY_KP_DECIMAL 330 -#define GLFW_KEY_KP_DIVIDE 331 -#define GLFW_KEY_KP_MULTIPLY 332 -#define GLFW_KEY_KP_SUBTRACT 333 -#define GLFW_KEY_KP_ADD 334 -#define GLFW_KEY_KP_ENTER 335 -#define GLFW_KEY_KP_EQUAL 336 -#define GLFW_KEY_LEFT_SHIFT 340 -#define GLFW_KEY_LEFT_CONTROL 341 -#define GLFW_KEY_LEFT_ALT 342 -#define GLFW_KEY_LEFT_SUPER 343 -#define GLFW_KEY_RIGHT_SHIFT 344 -#define GLFW_KEY_RIGHT_CONTROL 345 -#define GLFW_KEY_RIGHT_ALT 346 -#define GLFW_KEY_RIGHT_SUPER 347 -#define GLFW_KEY_MENU 348 - -#define GLFW_KEY_LAST GLFW_KEY_MENU - -/*! @} */ - -/*! @defgroup mods Modifier key flags - * @brief Modifier key flags. - * - * See [key input](@ref input_key) for how these are used. - * - * @ingroup input - * @{ */ - -/*! @brief If this bit is set one or more Shift keys were held down. - * - * If this bit is set one or more Shift keys were held down. - */ -#define GLFW_MOD_SHIFT 0x0001 -/*! @brief If this bit is set one or more Control keys were held down. - * - * If this bit is set one or more Control keys were held down. - */ -#define GLFW_MOD_CONTROL 0x0002 -/*! @brief If this bit is set one or more Alt keys were held down. - * - * If this bit is set one or more Alt keys were held down. - */ -#define GLFW_MOD_ALT 0x0004 -/*! @brief If this bit is set one or more Super keys were held down. - * - * If this bit is set one or more Super keys were held down. - */ -#define GLFW_MOD_SUPER 0x0008 -/*! @brief If this bit is set the Caps Lock key is enabled. - * - * If this bit is set the Caps Lock key is enabled and the @ref - * GLFW_LOCK_KEY_MODS input mode is set. - */ -#define GLFW_MOD_CAPS_LOCK 0x0010 -/*! @brief If this bit is set the Num Lock key is enabled. - * - * If this bit is set the Num Lock key is enabled and the @ref - * GLFW_LOCK_KEY_MODS input mode is set. - */ -#define GLFW_MOD_NUM_LOCK 0x0020 - -/*! @} */ - -/*! @defgroup buttons Mouse buttons - * @brief Mouse button IDs. - * - * See [mouse button input](@ref input_mouse_button) for how these are used. - * - * @ingroup input - * @{ */ -#define GLFW_MOUSE_BUTTON_1 0 -#define GLFW_MOUSE_BUTTON_2 1 -#define GLFW_MOUSE_BUTTON_3 2 -#define GLFW_MOUSE_BUTTON_4 3 -#define GLFW_MOUSE_BUTTON_5 4 -#define GLFW_MOUSE_BUTTON_6 5 -#define GLFW_MOUSE_BUTTON_7 6 -#define GLFW_MOUSE_BUTTON_8 7 -#define GLFW_MOUSE_BUTTON_LAST GLFW_MOUSE_BUTTON_8 -#define GLFW_MOUSE_BUTTON_LEFT GLFW_MOUSE_BUTTON_1 -#define GLFW_MOUSE_BUTTON_RIGHT GLFW_MOUSE_BUTTON_2 -#define GLFW_MOUSE_BUTTON_MIDDLE GLFW_MOUSE_BUTTON_3 -/*! @} */ - -/*! @defgroup joysticks Joysticks - * @brief Joystick IDs. - * - * See [joystick input](@ref joystick) for how these are used. - * - * @ingroup input - * @{ */ -#define GLFW_JOYSTICK_1 0 -#define GLFW_JOYSTICK_2 1 -#define GLFW_JOYSTICK_3 2 -#define GLFW_JOYSTICK_4 3 -#define GLFW_JOYSTICK_5 4 -#define GLFW_JOYSTICK_6 5 -#define GLFW_JOYSTICK_7 6 -#define GLFW_JOYSTICK_8 7 -#define GLFW_JOYSTICK_9 8 -#define GLFW_JOYSTICK_10 9 -#define GLFW_JOYSTICK_11 10 -#define GLFW_JOYSTICK_12 11 -#define GLFW_JOYSTICK_13 12 -#define GLFW_JOYSTICK_14 13 -#define GLFW_JOYSTICK_15 14 -#define GLFW_JOYSTICK_16 15 -#define GLFW_JOYSTICK_LAST GLFW_JOYSTICK_16 -/*! @} */ - -/*! @defgroup gamepad_buttons Gamepad buttons - * @brief Gamepad buttons. - * - * See @ref gamepad for how these are used. - * - * @ingroup input - * @{ */ -#define GLFW_GAMEPAD_BUTTON_A 0 -#define GLFW_GAMEPAD_BUTTON_B 1 -#define GLFW_GAMEPAD_BUTTON_X 2 -#define GLFW_GAMEPAD_BUTTON_Y 3 -#define GLFW_GAMEPAD_BUTTON_LEFT_BUMPER 4 -#define GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER 5 -#define GLFW_GAMEPAD_BUTTON_BACK 6 -#define GLFW_GAMEPAD_BUTTON_START 7 -#define GLFW_GAMEPAD_BUTTON_GUIDE 8 -#define GLFW_GAMEPAD_BUTTON_LEFT_THUMB 9 -#define GLFW_GAMEPAD_BUTTON_RIGHT_THUMB 10 -#define GLFW_GAMEPAD_BUTTON_DPAD_UP 11 -#define GLFW_GAMEPAD_BUTTON_DPAD_RIGHT 12 -#define GLFW_GAMEPAD_BUTTON_DPAD_DOWN 13 -#define GLFW_GAMEPAD_BUTTON_DPAD_LEFT 14 -#define GLFW_GAMEPAD_BUTTON_LAST GLFW_GAMEPAD_BUTTON_DPAD_LEFT - -#define GLFW_GAMEPAD_BUTTON_CROSS GLFW_GAMEPAD_BUTTON_A -#define GLFW_GAMEPAD_BUTTON_CIRCLE GLFW_GAMEPAD_BUTTON_B -#define GLFW_GAMEPAD_BUTTON_SQUARE GLFW_GAMEPAD_BUTTON_X -#define GLFW_GAMEPAD_BUTTON_TRIANGLE GLFW_GAMEPAD_BUTTON_Y -/*! @} */ - -/*! @defgroup gamepad_axes Gamepad axes - * @brief Gamepad axes. - * - * See @ref gamepad for how these are used. - * - * @ingroup input - * @{ */ -#define GLFW_GAMEPAD_AXIS_LEFT_X 0 -#define GLFW_GAMEPAD_AXIS_LEFT_Y 1 -#define GLFW_GAMEPAD_AXIS_RIGHT_X 2 -#define GLFW_GAMEPAD_AXIS_RIGHT_Y 3 -#define GLFW_GAMEPAD_AXIS_LEFT_TRIGGER 4 -#define GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER 5 -#define GLFW_GAMEPAD_AXIS_LAST GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER -/*! @} */ - -/*! @defgroup errors Error codes - * @brief Error codes. - * - * See [error handling](@ref error_handling) for how these are used. - * - * @ingroup init - * @{ */ -/*! @brief No error has occurred. - * - * No error has occurred. - * - * @analysis Yay. - */ -#define GLFW_NO_ERROR 0 -/*! @brief GLFW has not been initialized. - * - * This occurs if a GLFW function was called that must not be called unless the - * library is [initialized](@ref intro_init). - * - * @analysis Application programmer error. Initialize GLFW before calling any - * function that requires initialization. - */ -#define GLFW_NOT_INITIALIZED 0x00010001 -/*! @brief No context is current for this thread. - * - * This occurs if a GLFW function was called that needs and operates on the - * current OpenGL or OpenGL ES context but no context is current on the calling - * thread. One such function is @ref glfwSwapInterval. - * - * @analysis Application programmer error. Ensure a context is current before - * calling functions that require a current context. - */ -#define GLFW_NO_CURRENT_CONTEXT 0x00010002 -/*! @brief One of the arguments to the function was an invalid enum value. - * - * One of the arguments to the function was an invalid enum value, for example - * requesting @ref GLFW_RED_BITS with @ref glfwGetWindowAttrib. - * - * @analysis Application programmer error. Fix the offending call. - */ -#define GLFW_INVALID_ENUM 0x00010003 -/*! @brief One of the arguments to the function was an invalid value. - * - * One of the arguments to the function was an invalid value, for example - * requesting a non-existent OpenGL or OpenGL ES version like 2.7. - * - * Requesting a valid but unavailable OpenGL or OpenGL ES version will instead - * result in a @ref GLFW_VERSION_UNAVAILABLE error. - * - * @analysis Application programmer error. Fix the offending call. - */ -#define GLFW_INVALID_VALUE 0x00010004 -/*! @brief A memory allocation failed. - * - * A memory allocation failed. - * - * @analysis A bug in GLFW or the underlying operating system. Report the bug - * to our [issue tracker](https://github.com/glfw/glfw/issues). - */ -#define GLFW_OUT_OF_MEMORY 0x00010005 -/*! @brief GLFW could not find support for the requested API on the system. - * - * GLFW could not find support for the requested API on the system. - * - * @analysis The installed graphics driver does not support the requested - * API, or does not support it via the chosen context creation backend. - * Below are a few examples. - * - * @par - * Some pre-installed Windows graphics drivers do not support OpenGL. AMD only - * supports OpenGL ES via EGL, while Nvidia and Intel only support it via - * a WGL or GLX extension. macOS does not provide OpenGL ES at all. The Mesa - * EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary - * driver. Older graphics drivers do not support Vulkan. - */ -#define GLFW_API_UNAVAILABLE 0x00010006 -/*! @brief The requested OpenGL or OpenGL ES version is not available. - * - * The requested OpenGL or OpenGL ES version (including any requested context - * or framebuffer hints) is not available on this machine. - * - * @analysis The machine does not support your requirements. If your - * application is sufficiently flexible, downgrade your requirements and try - * again. Otherwise, inform the user that their machine does not match your - * requirements. - * - * @par - * Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0 - * comes out before the 4.x series gets that far, also fail with this error and - * not @ref GLFW_INVALID_VALUE, because GLFW cannot know what future versions - * will exist. - */ -#define GLFW_VERSION_UNAVAILABLE 0x00010007 -/*! @brief A platform-specific error occurred that does not match any of the - * more specific categories. - * - * A platform-specific error occurred that does not match any of the more - * specific categories. - * - * @analysis A bug or configuration error in GLFW, the underlying operating - * system or its drivers, or a lack of required resources. Report the issue to - * our [issue tracker](https://github.com/glfw/glfw/issues). - */ -#define GLFW_PLATFORM_ERROR 0x00010008 -/*! @brief The requested format is not supported or available. - * - * If emitted during window creation, the requested pixel format is not - * supported. - * - * If emitted when querying the clipboard, the contents of the clipboard could - * not be converted to the requested format. - * - * @analysis If emitted during window creation, one or more - * [hard constraints](@ref window_hints_hard) did not match any of the - * available pixel formats. If your application is sufficiently flexible, - * downgrade your requirements and try again. Otherwise, inform the user that - * their machine does not match your requirements. - * - * @par - * If emitted when querying the clipboard, ignore the error or report it to - * the user, as appropriate. - */ -#define GLFW_FORMAT_UNAVAILABLE 0x00010009 -/*! @brief The specified window does not have an OpenGL or OpenGL ES context. - * - * A window that does not have an OpenGL or OpenGL ES context was passed to - * a function that requires it to have one. - * - * @analysis Application programmer error. Fix the offending call. - */ -#define GLFW_NO_WINDOW_CONTEXT 0x0001000A -/*! @} */ - -/*! @addtogroup window - * @{ */ -/*! @brief Input focus window hint and attribute - * - * Input focus [window hint](@ref GLFW_FOCUSED_hint) or - * [window attribute](@ref GLFW_FOCUSED_attrib). - */ -#define GLFW_FOCUSED 0x00020001 -/*! @brief Window iconification window attribute - * - * Window iconification [window attribute](@ref GLFW_ICONIFIED_attrib). - */ -#define GLFW_ICONIFIED 0x00020002 -/*! @brief Window resize-ability window hint and attribute - * - * Window resize-ability [window hint](@ref GLFW_RESIZABLE_hint) and - * [window attribute](@ref GLFW_RESIZABLE_attrib). - */ -#define GLFW_RESIZABLE 0x00020003 -/*! @brief Window visibility window hint and attribute - * - * Window visibility [window hint](@ref GLFW_VISIBLE_hint) and - * [window attribute](@ref GLFW_VISIBLE_attrib). - */ -#define GLFW_VISIBLE 0x00020004 -/*! @brief Window decoration window hint and attribute - * - * Window decoration [window hint](@ref GLFW_DECORATED_hint) and - * [window attribute](@ref GLFW_DECORATED_attrib). - */ -#define GLFW_DECORATED 0x00020005 -/*! @brief Window auto-iconification window hint and attribute - * - * Window auto-iconification [window hint](@ref GLFW_AUTO_ICONIFY_hint) and - * [window attribute](@ref GLFW_AUTO_ICONIFY_attrib). - */ -#define GLFW_AUTO_ICONIFY 0x00020006 -/*! @brief Window decoration window hint and attribute - * - * Window decoration [window hint](@ref GLFW_FLOATING_hint) and - * [window attribute](@ref GLFW_FLOATING_attrib). - */ -#define GLFW_FLOATING 0x00020007 -/*! @brief Window maximization window hint and attribute - * - * Window maximization [window hint](@ref GLFW_MAXIMIZED_hint) and - * [window attribute](@ref GLFW_MAXIMIZED_attrib). - */ -#define GLFW_MAXIMIZED 0x00020008 -/*! @brief Cursor centering window hint - * - * Cursor centering [window hint](@ref GLFW_CENTER_CURSOR_hint). - */ -#define GLFW_CENTER_CURSOR 0x00020009 -/*! @brief Window framebuffer transparency hint and attribute - * - * Window framebuffer transparency - * [window hint](@ref GLFW_TRANSPARENT_FRAMEBUFFER_hint) and - * [window attribute](@ref GLFW_TRANSPARENT_FRAMEBUFFER_attrib). - */ -#define GLFW_TRANSPARENT_FRAMEBUFFER 0x0002000A -/*! @brief Mouse cursor hover window attribute. - * - * Mouse cursor hover [window attribute](@ref GLFW_HOVERED_attrib). - */ -#define GLFW_HOVERED 0x0002000B -/*! @brief Input focus on calling show window hint and attribute - * - * Input focus [window hint](@ref GLFW_FOCUS_ON_SHOW_hint) or - * [window attribute](@ref GLFW_FOCUS_ON_SHOW_attrib). - */ -#define GLFW_FOCUS_ON_SHOW 0x0002000C - -/*! @brief Framebuffer bit depth hint. - * - * Framebuffer bit depth [hint](@ref GLFW_RED_BITS). - */ -#define GLFW_RED_BITS 0x00021001 -/*! @brief Framebuffer bit depth hint. - * - * Framebuffer bit depth [hint](@ref GLFW_GREEN_BITS). - */ -#define GLFW_GREEN_BITS 0x00021002 -/*! @brief Framebuffer bit depth hint. - * - * Framebuffer bit depth [hint](@ref GLFW_BLUE_BITS). - */ -#define GLFW_BLUE_BITS 0x00021003 -/*! @brief Framebuffer bit depth hint. - * - * Framebuffer bit depth [hint](@ref GLFW_ALPHA_BITS). - */ -#define GLFW_ALPHA_BITS 0x00021004 -/*! @brief Framebuffer bit depth hint. - * - * Framebuffer bit depth [hint](@ref GLFW_DEPTH_BITS). - */ -#define GLFW_DEPTH_BITS 0x00021005 -/*! @brief Framebuffer bit depth hint. - * - * Framebuffer bit depth [hint](@ref GLFW_STENCIL_BITS). - */ -#define GLFW_STENCIL_BITS 0x00021006 -/*! @brief Framebuffer bit depth hint. - * - * Framebuffer bit depth [hint](@ref GLFW_ACCUM_RED_BITS). - */ -#define GLFW_ACCUM_RED_BITS 0x00021007 -/*! @brief Framebuffer bit depth hint. - * - * Framebuffer bit depth [hint](@ref GLFW_ACCUM_GREEN_BITS). - */ -#define GLFW_ACCUM_GREEN_BITS 0x00021008 -/*! @brief Framebuffer bit depth hint. - * - * Framebuffer bit depth [hint](@ref GLFW_ACCUM_BLUE_BITS). - */ -#define GLFW_ACCUM_BLUE_BITS 0x00021009 -/*! @brief Framebuffer bit depth hint. - * - * Framebuffer bit depth [hint](@ref GLFW_ACCUM_ALPHA_BITS). - */ -#define GLFW_ACCUM_ALPHA_BITS 0x0002100A -/*! @brief Framebuffer auxiliary buffer hint. - * - * Framebuffer auxiliary buffer [hint](@ref GLFW_AUX_BUFFERS). - */ -#define GLFW_AUX_BUFFERS 0x0002100B -/*! @brief OpenGL stereoscopic rendering hint. - * - * OpenGL stereoscopic rendering [hint](@ref GLFW_STEREO). - */ -#define GLFW_STEREO 0x0002100C -/*! @brief Framebuffer MSAA samples hint. - * - * Framebuffer MSAA samples [hint](@ref GLFW_SAMPLES). - */ -#define GLFW_SAMPLES 0x0002100D -/*! @brief Framebuffer sRGB hint. - * - * Framebuffer sRGB [hint](@ref GLFW_SRGB_CAPABLE). - */ -#define GLFW_SRGB_CAPABLE 0x0002100E -/*! @brief Monitor refresh rate hint. - * - * Monitor refresh rate [hint](@ref GLFW_REFRESH_RATE). - */ -#define GLFW_REFRESH_RATE 0x0002100F -/*! @brief Framebuffer double buffering hint. - * - * Framebuffer double buffering [hint](@ref GLFW_DOUBLEBUFFER). - */ -#define GLFW_DOUBLEBUFFER 0x00021010 - -/*! @brief Context client API hint and attribute. - * - * Context client API [hint](@ref GLFW_CLIENT_API_hint) and - * [attribute](@ref GLFW_CLIENT_API_attrib). - */ -#define GLFW_CLIENT_API 0x00022001 -/*! @brief Context client API major version hint and attribute. - * - * Context client API major version [hint](@ref GLFW_CLIENT_API_hint) and - * [attribute](@ref GLFW_CLIENT_API_attrib). - */ -#define GLFW_CONTEXT_VERSION_MAJOR 0x00022002 -/*! @brief Context client API minor version hint and attribute. - * - * Context client API minor version [hint](@ref GLFW_CLIENT_API_hint) and - * [attribute](@ref GLFW_CLIENT_API_attrib). - */ -#define GLFW_CONTEXT_VERSION_MINOR 0x00022003 -/*! @brief Context client API revision number hint and attribute. - * - * Context client API revision number [hint](@ref GLFW_CLIENT_API_hint) and - * [attribute](@ref GLFW_CLIENT_API_attrib). - */ -#define GLFW_CONTEXT_REVISION 0x00022004 -/*! @brief Context robustness hint and attribute. - * - * Context client API revision number [hint](@ref GLFW_CLIENT_API_hint) and - * [attribute](@ref GLFW_CLIENT_API_attrib). - */ -#define GLFW_CONTEXT_ROBUSTNESS 0x00022005 -/*! @brief OpenGL forward-compatibility hint and attribute. - * - * OpenGL forward-compatibility [hint](@ref GLFW_CLIENT_API_hint) and - * [attribute](@ref GLFW_CLIENT_API_attrib). - */ -#define GLFW_OPENGL_FORWARD_COMPAT 0x00022006 -/*! @brief OpenGL debug context hint and attribute. - * - * OpenGL debug context [hint](@ref GLFW_CLIENT_API_hint) and - * [attribute](@ref GLFW_CLIENT_API_attrib). - */ -#define GLFW_OPENGL_DEBUG_CONTEXT 0x00022007 -/*! @brief OpenGL profile hint and attribute. - * - * OpenGL profile [hint](@ref GLFW_CLIENT_API_hint) and - * [attribute](@ref GLFW_CLIENT_API_attrib). - */ -#define GLFW_OPENGL_PROFILE 0x00022008 -/*! @brief Context flush-on-release hint and attribute. - * - * Context flush-on-release [hint](@ref GLFW_CLIENT_API_hint) and - * [attribute](@ref GLFW_CLIENT_API_attrib). - */ -#define GLFW_CONTEXT_RELEASE_BEHAVIOR 0x00022009 -/*! @brief Context error suppression hint and attribute. - * - * Context error suppression [hint](@ref GLFW_CLIENT_API_hint) and - * [attribute](@ref GLFW_CLIENT_API_attrib). - */ -#define GLFW_CONTEXT_NO_ERROR 0x0002200A -/*! @brief Context creation API hint and attribute. - * - * Context creation API [hint](@ref GLFW_CLIENT_API_hint) and - * [attribute](@ref GLFW_CLIENT_API_attrib). - */ -#define GLFW_CONTEXT_CREATION_API 0x0002200B -/*! @brief Window content area scaling window - * [window hint](@ref GLFW_SCALE_TO_MONITOR). - */ -#define GLFW_SCALE_TO_MONITOR 0x0002200C - -#define GLFW_COCOA_RETINA_FRAMEBUFFER 0x00023001 -#define GLFW_COCOA_FRAME_NAME 0x00023002 -#define GLFW_COCOA_GRAPHICS_SWITCHING 0x00023003 - -#define GLFW_X11_CLASS_NAME 0x00024001 -#define GLFW_X11_INSTANCE_NAME 0x00024002 -/*! @} */ - -#define GLFW_NO_API 0 -#define GLFW_OPENGL_API 0x00030001 -#define GLFW_OPENGL_ES_API 0x00030002 - -#define GLFW_NO_ROBUSTNESS 0 -#define GLFW_NO_RESET_NOTIFICATION 0x00031001 -#define GLFW_LOSE_CONTEXT_ON_RESET 0x00031002 - -#define GLFW_OPENGL_ANY_PROFILE 0 -#define GLFW_OPENGL_CORE_PROFILE 0x00032001 -#define GLFW_OPENGL_COMPAT_PROFILE 0x00032002 - -#define GLFW_CURSOR 0x00033001 -#define GLFW_STICKY_KEYS 0x00033002 -#define GLFW_STICKY_MOUSE_BUTTONS 0x00033003 -#define GLFW_LOCK_KEY_MODS 0x00033004 - -#define GLFW_CURSOR_NORMAL 0x00034001 -#define GLFW_CURSOR_HIDDEN 0x00034002 -#define GLFW_CURSOR_DISABLED 0x00034003 - -#define GLFW_ANY_RELEASE_BEHAVIOR 0 -#define GLFW_RELEASE_BEHAVIOR_FLUSH 0x00035001 -#define GLFW_RELEASE_BEHAVIOR_NONE 0x00035002 - -#define GLFW_NATIVE_CONTEXT_API 0x00036001 -#define GLFW_EGL_CONTEXT_API 0x00036002 -#define GLFW_OSMESA_CONTEXT_API 0x00036003 - -/*! @defgroup shapes Standard cursor shapes - * @brief Standard system cursor shapes. - * - * See [standard cursor creation](@ref cursor_standard) for how these are used. - * - * @ingroup input - * @{ */ - -/*! @brief The regular arrow cursor shape. - * - * The regular arrow cursor. - */ -#define GLFW_ARROW_CURSOR 0x00036001 -/*! @brief The text input I-beam cursor shape. - * - * The text input I-beam cursor shape. - */ -#define GLFW_IBEAM_CURSOR 0x00036002 -/*! @brief The crosshair shape. - * - * The crosshair shape. - */ -#define GLFW_CROSSHAIR_CURSOR 0x00036003 -/*! @brief The hand shape. - * - * The hand shape. - */ -#define GLFW_HAND_CURSOR 0x00036004 -/*! @brief The horizontal resize arrow shape. - * - * The horizontal resize arrow shape. - */ -#define GLFW_HRESIZE_CURSOR 0x00036005 -/*! @brief The vertical resize arrow shape. - * - * The vertical resize arrow shape. - */ -#define GLFW_VRESIZE_CURSOR 0x00036006 -/*! @} */ - -#define GLFW_CONNECTED 0x00040001 -#define GLFW_DISCONNECTED 0x00040002 - -/*! @addtogroup init - * @{ */ -#define GLFW_JOYSTICK_HAT_BUTTONS 0x00050001 - -#define GLFW_COCOA_CHDIR_RESOURCES 0x00051001 -#define GLFW_COCOA_MENUBAR 0x00051002 -/*! @} */ - -#define GLFW_DONT_CARE -1 - - -/************************************************************************* - * GLFW API types - *************************************************************************/ - -/*! @brief Client API function pointer type. - * - * Generic function pointer used for returning client API function pointers - * without forcing a cast from a regular pointer. - * - * @sa @ref context_glext - * @sa @ref glfwGetProcAddress - * - * @since Added in version 3.0. - * - * @ingroup context - */ -typedef void (*GLFWglproc)(void); - -/*! @brief Vulkan API function pointer type. - * - * Generic function pointer used for returning Vulkan API function pointers - * without forcing a cast from a regular pointer. - * - * @sa @ref vulkan_proc - * @sa @ref glfwGetInstanceProcAddress - * - * @since Added in version 3.2. - * - * @ingroup vulkan - */ -typedef void (*GLFWvkproc)(void); - -/*! @brief Opaque monitor object. - * - * Opaque monitor object. - * - * @see @ref monitor_object - * - * @since Added in version 3.0. - * - * @ingroup monitor - */ -typedef struct GLFWmonitor GLFWmonitor; - -/*! @brief Opaque window object. - * - * Opaque window object. - * - * @see @ref window_object - * - * @since Added in version 3.0. - * - * @ingroup window - */ -typedef struct GLFWwindow GLFWwindow; - -/*! @brief Opaque cursor object. - * - * Opaque cursor object. - * - * @see @ref cursor_object - * - * @since Added in version 3.1. - * - * @ingroup cursor - */ -typedef struct GLFWcursor GLFWcursor; - -/*! @brief The function signature for error callbacks. - * - * This is the function signature for error callback functions. - * - * @param[in] error An [error code](@ref errors). - * @param[in] description A UTF-8 encoded string describing the error. - * - * @sa @ref error_handling - * @sa @ref glfwSetErrorCallback - * - * @since Added in version 3.0. - * - * @ingroup init - */ -typedef void (* GLFWerrorfun)(int,const char*); - -/*! @brief The function signature for window position callbacks. - * - * This is the function signature for window position callback functions. - * - * @param[in] window The window that was moved. - * @param[in] xpos The new x-coordinate, in screen coordinates, of the - * upper-left corner of the client area of the window. - * @param[in] ypos The new y-coordinate, in screen coordinates, of the - * upper-left corner of the client area of the window. - * - * @sa @ref window_pos - * @sa @ref glfwSetWindowPosCallback - * - * @since Added in version 3.0. - * - * @ingroup window - */ -typedef void (* GLFWwindowposfun)(GLFWwindow*,int,int); - -/*! @brief The function signature for window resize callbacks. - * - * This is the function signature for window size callback functions. - * - * @param[in] window The window that was resized. - * @param[in] width The new width, in screen coordinates, of the window. - * @param[in] height The new height, in screen coordinates, of the window. - * - * @sa @ref window_size - * @sa @ref glfwSetWindowSizeCallback - * - * @since Added in version 1.0. - * @glfw3 Added window handle parameter. - * - * @ingroup window - */ -typedef void (* GLFWwindowsizefun)(GLFWwindow*,int,int); - -/*! @brief The function signature for window close callbacks. - * - * This is the function signature for window close callback functions. - * - * @param[in] window The window that the user attempted to close. - * - * @sa @ref window_close - * @sa @ref glfwSetWindowCloseCallback - * - * @since Added in version 2.5. - * @glfw3 Added window handle parameter. - * - * @ingroup window - */ -typedef void (* GLFWwindowclosefun)(GLFWwindow*); - -/*! @brief The function signature for window content refresh callbacks. - * - * This is the function signature for window refresh callback functions. - * - * @param[in] window The window whose content needs to be refreshed. - * - * @sa @ref window_refresh - * @sa @ref glfwSetWindowRefreshCallback - * - * @since Added in version 2.5. - * @glfw3 Added window handle parameter. - * - * @ingroup window - */ -typedef void (* GLFWwindowrefreshfun)(GLFWwindow*); - -/*! @brief The function signature for window focus/defocus callbacks. - * - * This is the function signature for window focus callback functions. - * - * @param[in] window The window that gained or lost input focus. - * @param[in] focused `GLFW_TRUE` if the window was given input focus, or - * `GLFW_FALSE` if it lost it. - * - * @sa @ref window_focus - * @sa @ref glfwSetWindowFocusCallback - * - * @since Added in version 3.0. - * - * @ingroup window - */ -typedef void (* GLFWwindowfocusfun)(GLFWwindow*,int); - -/*! @brief The function signature for window iconify/restore callbacks. - * - * This is the function signature for window iconify/restore callback - * functions. - * - * @param[in] window The window that was iconified or restored. - * @param[in] iconified `GLFW_TRUE` if the window was iconified, or - * `GLFW_FALSE` if it was restored. - * - * @sa @ref window_iconify - * @sa @ref glfwSetWindowIconifyCallback - * - * @since Added in version 3.0. - * - * @ingroup window - */ -typedef void (* GLFWwindowiconifyfun)(GLFWwindow*,int); - -/*! @brief The function signature for window maximize/restore callbacks. - * - * This is the function signature for window maximize/restore callback - * functions. - * - * @param[in] window The window that was maximized or restored. - * @param[in] iconified `GLFW_TRUE` if the window was maximized, or - * `GLFW_FALSE` if it was restored. - * - * @sa @ref window_maximize - * @sa glfwSetWindowMaximizeCallback - * - * @since Added in version 3.3. - * - * @ingroup window - */ -typedef void (* GLFWwindowmaximizefun)(GLFWwindow*,int); - -/*! @brief The function signature for framebuffer resize callbacks. - * - * This is the function signature for framebuffer resize callback - * functions. - * - * @param[in] window The window whose framebuffer was resized. - * @param[in] width The new width, in pixels, of the framebuffer. - * @param[in] height The new height, in pixels, of the framebuffer. - * - * @sa @ref window_fbsize - * @sa @ref glfwSetFramebufferSizeCallback - * - * @since Added in version 3.0. - * - * @ingroup window - */ -typedef void (* GLFWframebuffersizefun)(GLFWwindow*,int,int); - -/*! @brief The function signature for window content scale callbacks. - * - * This is the function signature for window content scale callback - * functions. - * - * @param[in] window The window whose content scale changed. - * @param[in] xscale The new x-axis content scale of the window. - * @param[in] yscale The new y-axis content scale of the window. - * - * @sa @ref window_scale - * @sa @ref glfwSetWindowContentScaleCallback - * - * @since Added in version 3.3. - * - * @ingroup window - */ -typedef void (* GLFWwindowcontentscalefun)(GLFWwindow*,float,float); - -/*! @brief The function signature for mouse button callbacks. - * - * This is the function signature for mouse button callback functions. - * - * @param[in] window The window that received the event. - * @param[in] button The [mouse button](@ref buttons) that was pressed or - * released. - * @param[in] action One of `GLFW_PRESS` or `GLFW_RELEASE`. - * @param[in] mods Bit field describing which [modifier keys](@ref mods) were - * held down. - * - * @sa @ref input_mouse_button - * @sa @ref glfwSetMouseButtonCallback - * - * @since Added in version 1.0. - * @glfw3 Added window handle and modifier mask parameters. - * - * @ingroup input - */ -typedef void (* GLFWmousebuttonfun)(GLFWwindow*,int,int,int); - -/*! @brief The function signature for cursor position callbacks. - * - * This is the function signature for cursor position callback functions. - * - * @param[in] window The window that received the event. - * @param[in] xpos The new cursor x-coordinate, relative to the left edge of - * the client area. - * @param[in] ypos The new cursor y-coordinate, relative to the top edge of the - * client area. - * - * @sa @ref cursor_pos - * @sa @ref glfwSetCursorPosCallback - * - * @since Added in version 3.0. Replaces `GLFWmouseposfun`. - * - * @ingroup input - */ -typedef void (* GLFWcursorposfun)(GLFWwindow*,double,double); - -/*! @brief The function signature for cursor enter/leave callbacks. - * - * This is the function signature for cursor enter/leave callback functions. - * - * @param[in] window The window that received the event. - * @param[in] entered `GLFW_TRUE` if the cursor entered the window's client - * area, or `GLFW_FALSE` if it left it. - * - * @sa @ref cursor_enter - * @sa @ref glfwSetCursorEnterCallback - * - * @since Added in version 3.0. - * - * @ingroup input - */ -typedef void (* GLFWcursorenterfun)(GLFWwindow*,int); - -/*! @brief The function signature for scroll callbacks. - * - * This is the function signature for scroll callback functions. - * - * @param[in] window The window that received the event. - * @param[in] xoffset The scroll offset along the x-axis. - * @param[in] yoffset The scroll offset along the y-axis. - * - * @sa @ref scrolling - * @sa @ref glfwSetScrollCallback - * - * @since Added in version 3.0. Replaces `GLFWmousewheelfun`. - * - * @ingroup input - */ -typedef void (* GLFWscrollfun)(GLFWwindow*,double,double); - -/*! @brief The function signature for keyboard key callbacks. - * - * This is the function signature for keyboard key callback functions. - * - * @param[in] window The window that received the event. - * @param[in] key The [keyboard key](@ref keys) that was pressed or released. - * @param[in] scancode The system-specific scancode of the key. - * @param[in] action `GLFW_PRESS`, `GLFW_RELEASE` or `GLFW_REPEAT`. - * @param[in] mods Bit field describing which [modifier keys](@ref mods) were - * held down. - * - * @sa @ref input_key - * @sa @ref glfwSetKeyCallback - * - * @since Added in version 1.0. - * @glfw3 Added window handle, scancode and modifier mask parameters. - * - * @ingroup input - */ -typedef void (* GLFWkeyfun)(GLFWwindow*,int,int,int,int); - -/*! @brief The function signature for Unicode character callbacks. - * - * This is the function signature for Unicode character callback functions. - * - * @param[in] window The window that received the event. - * @param[in] codepoint The Unicode code point of the character. - * - * @sa @ref input_char - * @sa @ref glfwSetCharCallback - * - * @since Added in version 2.4. - * @glfw3 Added window handle parameter. - * - * @ingroup input - */ -typedef void (* GLFWcharfun)(GLFWwindow*,unsigned int); - -/*! @brief The function signature for Unicode character with modifiers - * callbacks. - * - * This is the function signature for Unicode character with modifiers callback - * functions. It is called for each input character, regardless of what - * modifier keys are held down. - * - * @param[in] window The window that received the event. - * @param[in] codepoint The Unicode code point of the character. - * @param[in] mods Bit field describing which [modifier keys](@ref mods) were - * held down. - * - * @sa @ref input_char - * @sa @ref glfwSetCharModsCallback - * - * @deprecated Scheduled for removal in version 4.0. - * - * @since Added in version 3.1. - * - * @ingroup input - */ -typedef void (* GLFWcharmodsfun)(GLFWwindow*,unsigned int,int); - -/*! @brief The function signature for file drop callbacks. - * - * This is the function signature for file drop callbacks. - * - * @param[in] window The window that received the event. - * @param[in] count The number of dropped files. - * @param[in] paths The UTF-8 encoded file and/or directory path names. - * - * @sa @ref path_drop - * @sa @ref glfwSetDropCallback - * - * @since Added in version 3.1. - * - * @ingroup input - */ -typedef void (* GLFWdropfun)(GLFWwindow*,int,const char**); - -/*! @brief The function signature for monitor configuration callbacks. - * - * This is the function signature for monitor configuration callback functions. - * - * @param[in] monitor The monitor that was connected or disconnected. - * @param[in] event One of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`. Remaining - * values reserved for future use. - * - * @sa @ref monitor_event - * @sa @ref glfwSetMonitorCallback - * - * @since Added in version 3.0. - * - * @ingroup monitor - */ -typedef void (* GLFWmonitorfun)(GLFWmonitor*,int); - -/*! @brief The function signature for joystick configuration callbacks. - * - * This is the function signature for joystick configuration callback - * functions. - * - * @param[in] jid The joystick that was connected or disconnected. - * @param[in] event One of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`. Remaining - * values reserved for future use. - * - * @sa @ref joystick_event - * @sa @ref glfwSetJoystickCallback - * - * @since Added in version 3.2. - * - * @ingroup input - */ -typedef void (* GLFWjoystickfun)(int,int); - -/*! @brief Video mode type. - * - * This describes a single video mode. - * - * @sa @ref monitor_modes - * @sa @ref glfwGetVideoMode - * @sa @ref glfwGetVideoModes - * - * @since Added in version 1.0. - * @glfw3 Added refresh rate member. - * - * @ingroup monitor - */ -typedef struct GLFWvidmode -{ - /*! The width, in screen coordinates, of the video mode. - */ - int width; - /*! The height, in screen coordinates, of the video mode. - */ - int height; - /*! The bit depth of the red channel of the video mode. - */ - int redBits; - /*! The bit depth of the green channel of the video mode. - */ - int greenBits; - /*! The bit depth of the blue channel of the video mode. - */ - int blueBits; - /*! The refresh rate, in Hz, of the video mode. - */ - int refreshRate; -} GLFWvidmode; - -/*! @brief Gamma ramp. - * - * This describes the gamma ramp for a monitor. - * - * @sa @ref monitor_gamma - * @sa @ref glfwGetGammaRamp - * @sa @ref glfwSetGammaRamp - * - * @since Added in version 3.0. - * - * @ingroup monitor - */ -typedef struct GLFWgammaramp -{ - /*! An array of value describing the response of the red channel. - */ - unsigned short* red; - /*! An array of value describing the response of the green channel. - */ - unsigned short* green; - /*! An array of value describing the response of the blue channel. - */ - unsigned short* blue; - /*! The number of elements in each array. - */ - unsigned int size; -} GLFWgammaramp; - -/*! @brief Image data. - * - * This describes a single 2D image. See the documentation for each related - * function what the expected pixel format is. - * - * @sa @ref cursor_custom - * @sa @ref window_icon - * - * @since Added in version 2.1. - * @glfw3 Removed format and bytes-per-pixel members. - */ -typedef struct GLFWimage -{ - /*! The width, in pixels, of this image. - */ - int width; - /*! The height, in pixels, of this image. - */ - int height; - /*! The pixel data of this image, arranged left-to-right, top-to-bottom. - */ - unsigned char* pixels; -} GLFWimage; - -/*! @brief Gamepad input state - * - * This describes the input state of a gamepad. - * - * @sa @ref gamepad - * @sa @ref glfwGetGamepadState - * - * @since Added in version 3.3. - */ -typedef struct GLFWgamepadstate -{ - /*! The states of each [gamepad button](@ref gamepad_buttons), `GLFW_PRESS` - * or `GLFW_RELEASE`. - */ - unsigned char buttons[15]; - /*! The states of each [gamepad axis](@ref gamepad_axes), in the range -1.0 - * to 1.0 inclusive. - */ - float axes[6]; -} GLFWgamepadstate; - - -/************************************************************************* - * GLFW API functions - *************************************************************************/ - -/*! @brief Initializes the GLFW library. - * - * This function initializes the GLFW library. Before most GLFW functions can - * be used, GLFW must be initialized, and before an application terminates GLFW - * should be terminated in order to free any resources allocated during or - * after initialization. - * - * If this function fails, it calls @ref glfwTerminate before returning. If it - * succeeds, you should call @ref glfwTerminate before the application exits. - * - * Additional calls to this function after successful initialization but before - * termination will return `GLFW_TRUE` immediately. - * - * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_PLATFORM_ERROR. - * - * @remark @macos This function will change the current directory of the - * application to the `Contents/Resources` subdirectory of the application's - * bundle, if present. This can be disabled with the @ref - * GLFW_COCOA_CHDIR_RESOURCES init hint. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref intro_init - * @sa @ref glfwTerminate - * - * @since Added in version 1.0. - * - * @ingroup init - */ -GLFWAPI int glfwInit(void); - -/*! @brief Terminates the GLFW library. - * - * This function destroys all remaining windows and cursors, restores any - * modified gamma ramps and frees any other allocated resources. Once this - * function is called, you must again call @ref glfwInit successfully before - * you will be able to use most GLFW functions. - * - * If GLFW has been successfully initialized, this function should be called - * before the application exits. If initialization fails, there is no need to - * call this function, as it is called by @ref glfwInit before it returns - * failure. - * - * @errors Possible errors include @ref GLFW_PLATFORM_ERROR. - * - * @remark This function may be called before @ref glfwInit. - * - * @warning The contexts of any remaining windows must not be current on any - * other thread when this function is called. - * - * @reentrancy This function must not be called from a callback. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref intro_init - * @sa @ref glfwInit - * - * @since Added in version 1.0. - * - * @ingroup init - */ -GLFWAPI void glfwTerminate(void); - -/*! @brief Sets the specified init hint to the desired value. - * - * This function sets hints for the next initialization of GLFW. - * - * The values you set hints to are never reset by GLFW, but they only take - * effect during initialization. Once GLFW has been initialized, any values - * you set will be ignored until the library is terminated and initialized - * again. - * - * Some hints are platform specific. These may be set on any platform but they - * will only affect their specific platform. Other platforms will ignore them. - * Setting these hints requires no platform specific headers or functions. - * - * @param[in] hint The [init hint](@ref init_hints) to set. - * @param[in] value The new value of the init hint. - * - * @errors Possible errors include @ref GLFW_INVALID_ENUM and @ref - * GLFW_INVALID_VALUE. - * - * @remarks This function may be called before @ref glfwInit. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa init_hints - * @sa glfwInit - * - * @since Added in version 3.3. - * - * @ingroup init - */ -GLFWAPI void glfwInitHint(int hint, int value); - -/*! @brief Retrieves the version of the GLFW library. - * - * This function retrieves the major, minor and revision numbers of the GLFW - * library. It is intended for when you are using GLFW as a shared library and - * want to ensure that you are using the minimum required version. - * - * Any or all of the version arguments may be `NULL`. - * - * @param[out] major Where to store the major version number, or `NULL`. - * @param[out] minor Where to store the minor version number, or `NULL`. - * @param[out] rev Where to store the revision number, or `NULL`. - * - * @errors None. - * - * @remark This function may be called before @ref glfwInit. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref intro_version - * @sa @ref glfwGetVersionString - * - * @since Added in version 1.0. - * - * @ingroup init - */ -GLFWAPI void glfwGetVersion(int* major, int* minor, int* rev); - -/*! @brief Returns a string describing the compile-time configuration. - * - * This function returns the compile-time generated - * [version string](@ref intro_version_string) of the GLFW library binary. It - * describes the version, platform, compiler and any platform-specific - * compile-time options. It should not be confused with the OpenGL or OpenGL - * ES version string, queried with `glGetString`. - * - * __Do not use the version string__ to parse the GLFW library version. The - * @ref glfwGetVersion function provides the version of the running library - * binary in numerical format. - * - * @return The ASCII encoded GLFW version string. - * - * @errors None. - * - * @remark This function may be called before @ref glfwInit. - * - * @pointer_lifetime The returned string is static and compile-time generated. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref intro_version - * @sa @ref glfwGetVersion - * - * @since Added in version 3.0. - * - * @ingroup init - */ -GLFWAPI const char* glfwGetVersionString(void); - -/*! @brief Returns and clears the last error for the calling thread. - * - * This function returns and clears the [error code](@ref errors) of the last - * error that occurred on the calling thread, and optionally a UTF-8 encoded - * human-readable description of it. If no error has occurred since the last - * call, it returns @ref GLFW_NO_ERROR (zero) and the description pointer is - * set to `NULL`. - * - * @param[in] description Where to store the error description pointer, or `NULL`. - * @return The last error code for the calling thread, or @ref GLFW_NO_ERROR - * (zero). - * - * @errors None. - * - * @pointer_lifetime The returned string is allocated and freed by GLFW. You - * should not free it yourself. It is guaranteed to be valid only until the - * next error occurs or the library is terminated. - * - * @remark This function may be called before @ref glfwInit. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref error_handling - * @sa @ref glfwSetErrorCallback - * - * @since Added in version 3.3. - * - * @ingroup init - */ -GLFWAPI int glfwGetError(const char** description); - -/*! @brief Sets the error callback. - * - * This function sets the error callback, which is called with an error code - * and a human-readable description each time a GLFW error occurs. - * - * The error code is set before the callback is called. Calling @ref - * glfwGetError from the error callback will return the same value as the error - * code argument. - * - * The error callback is called on the thread where the error occurred. If you - * are using GLFW from multiple threads, your error callback needs to be - * written accordingly. - * - * Because the description string may have been generated specifically for that - * error, it is not guaranteed to be valid after the callback has returned. If - * you wish to use it after the callback returns, you need to make a copy. - * - * Once set, the error callback remains set even after the library has been - * terminated. - * - * @param[in] cbfun The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set. - * - * @errors None. - * - * @remark This function may be called before @ref glfwInit. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref error_handling - * @sa @ref glfwGetError - * - * @since Added in version 3.0. - * - * @ingroup init - */ -GLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun cbfun); - -/*! @brief Returns the currently connected monitors. - * - * This function returns an array of handles for all currently connected - * monitors. The primary monitor is always first in the returned array. If no - * monitors were found, this function returns `NULL`. - * - * @param[out] count Where to store the number of monitors in the returned - * array. This is set to zero if an error occurred. - * @return An array of monitor handles, or `NULL` if no monitors were found or - * if an [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @pointer_lifetime The returned array is allocated and freed by GLFW. You - * should not free it yourself. It is guaranteed to be valid only until the - * monitor configuration changes or the library is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref monitor_monitors - * @sa @ref monitor_event - * @sa @ref glfwGetPrimaryMonitor - * - * @since Added in version 3.0. - * - * @ingroup monitor - */ -GLFWAPI GLFWmonitor** glfwGetMonitors(int* count); - -/*! @brief Returns the primary monitor. - * - * This function returns the primary monitor. This is usually the monitor - * where elements like the task bar or global menu bar are located. - * - * @return The primary monitor, or `NULL` if no monitors were found or if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @remark The primary monitor is always first in the array returned by @ref - * glfwGetMonitors. - * - * @sa @ref monitor_monitors - * @sa @ref glfwGetMonitors - * - * @since Added in version 3.0. - * - * @ingroup monitor - */ -GLFWAPI GLFWmonitor* glfwGetPrimaryMonitor(void); - -/*! @brief Returns the position of the monitor's viewport on the virtual screen. - * - * This function returns the position, in screen coordinates, of the upper-left - * corner of the specified monitor. - * - * Any or all of the position arguments may be `NULL`. If an error occurs, all - * non-`NULL` position arguments will be set to zero. - * - * @param[in] monitor The monitor to query. - * @param[out] xpos Where to store the monitor x-coordinate, or `NULL`. - * @param[out] ypos Where to store the monitor y-coordinate, or `NULL`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref monitor_properties - * - * @since Added in version 3.0. - * - * @ingroup monitor - */ -GLFWAPI void glfwGetMonitorPos(GLFWmonitor* monitor, int* xpos, int* ypos); - -/*! @brief Returns the physical size of the monitor. - * - * This function returns the size, in millimetres, of the display area of the - * specified monitor. - * - * Some systems do not provide accurate monitor size information, either - * because the monitor - * [EDID](https://en.wikipedia.org/wiki/Extended_display_identification_data) - * data is incorrect or because the driver does not report it accurately. - * - * Any or all of the size arguments may be `NULL`. If an error occurs, all - * non-`NULL` size arguments will be set to zero. - * - * @param[in] monitor The monitor to query. - * @param[out] widthMM Where to store the width, in millimetres, of the - * monitor's display area, or `NULL`. - * @param[out] heightMM Where to store the height, in millimetres, of the - * monitor's display area, or `NULL`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @remark @win32 calculates the returned physical size from the - * current resolution and system DPI instead of querying the monitor EDID data. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref monitor_properties - * - * @since Added in version 3.0. - * - * @ingroup monitor - */ -GLFWAPI void glfwGetMonitorPhysicalSize(GLFWmonitor* monitor, int* widthMM, int* heightMM); - -/*! @brief Retrieves the content scale for the specified monitor. - * - * This function retrieves the content scale for the specified monitor. The - * content scale is the ratio between the current DPI and the platform's - * default DPI. If you scale all pixel dimensions by this scale then your - * content should appear at an appropriate size. This is especially important - * for text and any UI elements. - * - * The content scale may depend on both the monitor resolution and pixel - * density and on user settings. It may be very different from the raw DPI - * calculated from the physical size and current resolution. - * - * @param[in] monitor The monitor to query. - * @param[out] xscale Where to store the x-axis content scale, or `NULL`. - * @param[out] yscale Where to store the y-axis content scale, or `NULL`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref monitor_scale - * @sa @ref glfwGetWindowContentScale - * - * @since Added in version 3.3. - * - * @ingroup monitor - */ -GLFWAPI void glfwGetMonitorContentScale(GLFWmonitor* monitor, float* xscale, float* yscale); - -/*! @brief Returns the name of the specified monitor. - * - * This function returns a human-readable name, encoded as UTF-8, of the - * specified monitor. The name typically reflects the make and model of the - * monitor and is not guaranteed to be unique among the connected monitors. - * - * @param[in] monitor The monitor to query. - * @return The UTF-8 encoded name of the monitor, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @pointer_lifetime The returned string is allocated and freed by GLFW. You - * should not free it yourself. It is valid until the specified monitor is - * disconnected or the library is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref monitor_properties - * - * @since Added in version 3.0. - * - * @ingroup monitor - */ -GLFWAPI const char* glfwGetMonitorName(GLFWmonitor* monitor); - -/*! @brief Sets the user pointer of the specified monitor. - * - * This function sets the user-defined pointer of the specified monitor. The - * current value is retained until the monitor is disconnected. The initial - * value is `NULL`. - * - * This function may be called from the monitor callback, even for a monitor - * that is being disconnected. - * - * @param[in] monitor The monitor whose pointer to set. - * @param[in] pointer The new value. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @sa @ref monitor_userptr - * @sa @ref glfwGetMonitorUserPointer - * - * @since Added in version 3.3. - * - * @ingroup monitor - */ -GLFWAPI void glfwSetMonitorUserPointer(GLFWmonitor* monitor, void* pointer); - -/*! @brief Returns the user pointer of the specified monitor. - * - * This function returns the current value of the user-defined pointer of the - * specified monitor. The initial value is `NULL`. - * - * This function may be called from the monitor callback, even for a monitor - * that is being disconnected. - * - * @param[in] monitor The monitor whose pointer to return. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @sa @ref monitor_userptr - * @sa @ref glfwSetMonitorUserPointer - * - * @since Added in version 3.3. - * - * @ingroup monitor - */ -GLFWAPI void* glfwGetMonitorUserPointer(GLFWmonitor* monitor); - -/*! @brief Sets the monitor configuration callback. - * - * This function sets the monitor configuration callback, or removes the - * currently set callback. This is called when a monitor is connected to or - * disconnected from the system. - * - * @param[in] cbfun The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref monitor_event - * - * @since Added in version 3.0. - * - * @ingroup monitor - */ -GLFWAPI GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun cbfun); - -/*! @brief Returns the available video modes for the specified monitor. - * - * This function returns an array of all video modes supported by the specified - * monitor. The returned array is sorted in ascending order, first by color - * bit depth (the sum of all channel depths) and then by resolution area (the - * product of width and height). - * - * @param[in] monitor The monitor to query. - * @param[out] count Where to store the number of video modes in the returned - * array. This is set to zero if an error occurred. - * @return An array of video modes, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The returned array is allocated and freed by GLFW. You - * should not free it yourself. It is valid until the specified monitor is - * disconnected, this function is called again for that monitor or the library - * is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref monitor_modes - * @sa @ref glfwGetVideoMode - * - * @since Added in version 1.0. - * @glfw3 Changed to return an array of modes for a specific monitor. - * - * @ingroup monitor - */ -GLFWAPI const GLFWvidmode* glfwGetVideoModes(GLFWmonitor* monitor, int* count); - -/*! @brief Returns the current mode of the specified monitor. - * - * This function returns the current video mode of the specified monitor. If - * you have created a full screen window for that monitor, the return value - * will depend on whether that window is iconified. - * - * @param[in] monitor The monitor to query. - * @return The current mode of the monitor, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The returned array is allocated and freed by GLFW. You - * should not free it yourself. It is valid until the specified monitor is - * disconnected or the library is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref monitor_modes - * @sa @ref glfwGetVideoModes - * - * @since Added in version 3.0. Replaces `glfwGetDesktopMode`. - * - * @ingroup monitor - */ -GLFWAPI const GLFWvidmode* glfwGetVideoMode(GLFWmonitor* monitor); - -/*! @brief Generates a gamma ramp and sets it for the specified monitor. - * - * This function generates a 256-element gamma ramp from the specified exponent - * and then calls @ref glfwSetGammaRamp with it. The value must be a finite - * number greater than zero. - * - * The software controlled gamma ramp is applied _in addition_ to the hardware - * gamma correction, which today is usually an approximation of sRGB gamma. - * This means that setting a perfectly linear ramp, or gamma 1.0, will produce - * the default (usually sRGB-like) behavior. - * - * For gamma correct rendering with OpenGL or OpenGL ES, see the @ref - * GLFW_SRGB_CAPABLE hint. - * - * @param[in] monitor The monitor whose gamma ramp to set. - * @param[in] gamma The desired exponent. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR. - * - * @remark @wayland Gamma handling is a priviledged protocol, this function - * will thus never be implemented and emits @ref GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref monitor_gamma - * - * @since Added in version 3.0. - * - * @ingroup monitor - */ -GLFWAPI void glfwSetGamma(GLFWmonitor* monitor, float gamma); - -/*! @brief Returns the current gamma ramp for the specified monitor. - * - * This function returns the current gamma ramp of the specified monitor. - * - * @param[in] monitor The monitor to query. - * @return The current gamma ramp, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark @wayland Gamma handling is a priviledged protocol, this function - * will thus never be implemented and emits @ref GLFW_PLATFORM_ERROR while - * returning `NULL`. - * - * @pointer_lifetime The returned structure and its arrays are allocated and - * freed by GLFW. You should not free them yourself. They are valid until the - * specified monitor is disconnected, this function is called again for that - * monitor or the library is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref monitor_gamma - * - * @since Added in version 3.0. - * - * @ingroup monitor - */ -GLFWAPI const GLFWgammaramp* glfwGetGammaRamp(GLFWmonitor* monitor); - -/*! @brief Sets the current gamma ramp for the specified monitor. - * - * This function sets the current gamma ramp for the specified monitor. The - * original gamma ramp for that monitor is saved by GLFW the first time this - * function is called and is restored by @ref glfwTerminate. - * - * The software controlled gamma ramp is applied _in addition_ to the hardware - * gamma correction, which today is usually an approximation of sRGB gamma. - * This means that setting a perfectly linear ramp, or gamma 1.0, will produce - * the default (usually sRGB-like) behavior. - * - * For gamma correct rendering with OpenGL or OpenGL ES, see the @ref - * GLFW_SRGB_CAPABLE hint. - * - * @param[in] monitor The monitor whose gamma ramp to set. - * @param[in] ramp The gamma ramp to use. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark Gamma ramp sizes other than 256 are not supported by all platforms - * or graphics hardware. - * - * @remark @win32 The gamma ramp size must be 256. - * - * @remark @wayland Gamma handling is a priviledged protocol, this function - * will thus never be implemented and emits @ref GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The specified gamma ramp is copied before this function - * returns. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref monitor_gamma - * - * @since Added in version 3.0. - * - * @ingroup monitor - */ -GLFWAPI void glfwSetGammaRamp(GLFWmonitor* monitor, const GLFWgammaramp* ramp); - -/*! @brief Resets all window hints to their default values. - * - * This function resets all window hints to their - * [default values](@ref window_hints_values). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_hints - * @sa @ref glfwWindowHint - * @sa @ref glfwWindowHintString - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI void glfwDefaultWindowHints(void); - -/*! @brief Sets the specified window hint to the desired value. - * - * This function sets hints for the next call to @ref glfwCreateWindow. The - * hints, once set, retain their values until changed by a call to this - * function or @ref glfwDefaultWindowHints, or until the library is terminated. - * - * Only integer value hints can be set with this function. String value hints - * are set with @ref glfwWindowHintString. - * - * This function does not check whether the specified hint values are valid. - * If you set hints to invalid values this will instead be reported by the next - * call to @ref glfwCreateWindow. - * - * Some hints are platform specific. These may be set on any platform but they - * will only affect their specific platform. Other platforms will ignore them. - * Setting these hints requires no platform specific headers or functions. - * - * @param[in] hint The [window hint](@ref window_hints) to set. - * @param[in] value The new value of the window hint. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_INVALID_ENUM. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_hints - * @sa @ref glfwWindowHintString - * @sa @ref glfwDefaultWindowHints - * - * @since Added in version 3.0. Replaces `glfwOpenWindowHint`. - * - * @ingroup window - */ -GLFWAPI void glfwWindowHint(int hint, int value); - -/*! @brief Sets the specified window hint to the desired value. - * - * This function sets hints for the next call to @ref glfwCreateWindow. The - * hints, once set, retain their values until changed by a call to this - * function or @ref glfwDefaultWindowHints, or until the library is terminated. - * - * Only string type hints can be set with this function. Integer value hints - * are set with @ref glfwWindowHint. - * - * This function does not check whether the specified hint values are valid. - * If you set hints to invalid values this will instead be reported by the next - * call to @ref glfwCreateWindow. - * - * Some hints are platform specific. These may be set on any platform but they - * will only affect their specific platform. Other platforms will ignore them. - * Setting these hints requires no platform specific headers or functions. - * - * @param[in] hint The [window hint](@ref window_hints) to set. - * @param[in] value The new value of the window hint. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_INVALID_ENUM. - * - * @pointer_lifetime The specified string is copied before this function - * returns. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_hints - * @sa @ref glfwWindowHint - * @sa @ref glfwDefaultWindowHints - * - * @since Added in version 3.3. - * - * @ingroup window - */ -GLFWAPI void glfwWindowHintString(int hint, const char* value); - -/*! @brief Creates a window and its associated context. - * - * This function creates a window and its associated OpenGL or OpenGL ES - * context. Most of the options controlling how the window and its context - * should be created are specified with [window hints](@ref window_hints). - * - * Successful creation does not change which context is current. Before you - * can use the newly created context, you need to - * [make it current](@ref context_current). For information about the `share` - * parameter, see @ref context_sharing. - * - * The created window, framebuffer and context may differ from what you - * requested, as not all parameters and hints are - * [hard constraints](@ref window_hints_hard). This includes the size of the - * window, especially for full screen windows. To query the actual attributes - * of the created window, framebuffer and context, see @ref - * glfwGetWindowAttrib, @ref glfwGetWindowSize and @ref glfwGetFramebufferSize. - * - * To create a full screen window, you need to specify the monitor the window - * will cover. If no monitor is specified, the window will be windowed mode. - * Unless you have a way for the user to choose a specific monitor, it is - * recommended that you pick the primary monitor. For more information on how - * to query connected monitors, see @ref monitor_monitors. - * - * For full screen windows, the specified size becomes the resolution of the - * window's _desired video mode_. As long as a full screen window is not - * iconified, the supported video mode most closely matching the desired video - * mode is set for the specified monitor. For more information about full - * screen windows, including the creation of so called _windowed full screen_ - * or _borderless full screen_ windows, see @ref window_windowed_full_screen. - * - * Once you have created the window, you can switch it between windowed and - * full screen mode with @ref glfwSetWindowMonitor. This will not affect its - * OpenGL or OpenGL ES context. - * - * By default, newly created windows use the placement recommended by the - * window system. To create the window at a specific position, make it - * initially invisible using the [GLFW_VISIBLE](@ref GLFW_VISIBLE_hint) window - * hint, set its [position](@ref window_pos) and then [show](@ref window_hide) - * it. - * - * As long as at least one full screen window is not iconified, the screensaver - * is prohibited from starting. - * - * Window systems put limits on window sizes. Very large or very small window - * dimensions may be overridden by the window system on creation. Check the - * actual [size](@ref window_size) after creation. - * - * The [swap interval](@ref buffer_swap) is not set during window creation and - * the initial value may vary depending on driver settings and defaults. - * - * @param[in] width The desired width, in screen coordinates, of the window. - * This must be greater than zero. - * @param[in] height The desired height, in screen coordinates, of the window. - * This must be greater than zero. - * @param[in] title The initial, UTF-8 encoded window title. - * @param[in] monitor The monitor to use for full screen mode, or `NULL` for - * windowed mode. - * @param[in] share The window whose context to share resources with, or `NULL` - * to not share resources. - * @return The handle of the created window, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE, @ref GLFW_API_UNAVAILABLE, @ref - * GLFW_VERSION_UNAVAILABLE, @ref GLFW_FORMAT_UNAVAILABLE and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark @win32 Window creation will fail if the Microsoft GDI software - * OpenGL implementation is the only one available. - * - * @remark @win32 If the executable has an icon resource named `GLFW_ICON,` it - * will be set as the initial icon for the window. If no such icon is present, - * the `IDI_APPLICATION` icon will be used instead. To set a different icon, - * see @ref glfwSetWindowIcon. - * - * @remark @win32 The context to share resources with must not be current on - * any other thread. - * - * @remark @macos The OS only supports forward-compatible core profile contexts - * for OpenGL versions 3.2 and later. Before creating an OpenGL context of - * version 3.2 or later you must set the - * [GLFW_OPENGL_FORWARD_COMPAT](@ref GLFW_OPENGL_FORWARD_COMPAT_hint) and - * [GLFW_OPENGL_PROFILE](@ref GLFW_OPENGL_PROFILE_hint) hints accordingly. - * OpenGL 3.0 and 3.1 contexts are not supported at all on macOS. - * - * @remark @macos The GLFW window has no icon, as it is not a document - * window, but the dock icon will be the same as the application bundle's icon. - * For more information on bundles, see the - * [Bundle Programming Guide](https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/) - * in the Mac Developer Library. - * - * @remark @macos The first time a window is created the menu bar is created. - * If GLFW finds a `MainMenu.nib` it is loaded and assumed to contain a menu - * bar. Otherwise a minimal menu bar is created manually with common commands - * like Hide, Quit and About. The About entry opens a minimal about dialog - * with information from the application's bundle. Menu bar creation can be - * disabled entirely with the @ref GLFW_COCOA_MENUBAR init hint. - * - * @remark @macos On OS X 10.10 and later the window frame will not be rendered - * at full resolution on Retina displays unless the - * [GLFW_COCOA_RETINA_FRAMEBUFFER](@ref GLFW_COCOA_RETINA_FRAMEBUFFER_hint) - * hint is `GLFW_TRUE` and the `NSHighResolutionCapable` key is enabled in the - * application bundle's `Info.plist`. For more information, see - * [High Resolution Guidelines for OS X](https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Explained/Explained.html) - * in the Mac Developer Library. The GLFW test and example programs use - * a custom `Info.plist` template for this, which can be found as - * `CMake/MacOSXBundleInfo.plist.in` in the source tree. - * - * @remark @macos When activating frame autosaving with - * [GLFW_COCOA_FRAME_NAME](@ref GLFW_COCOA_FRAME_NAME_hint), the specified - * window size and position may be overriden by previously saved values. - * - * @remark @x11 Some window managers will not respect the placement of - * initially hidden windows. - * - * @remark @x11 Due to the asynchronous nature of X11, it may take a moment for - * a window to reach its requested state. This means you may not be able to - * query the final size, position or other attributes directly after window - * creation. - * - * @remark @x11 The class part of the `WM_CLASS` window property will by - * default be set to the window title passed to this function. The instance - * part will use the contents of the `RESOURCE_NAME` environment variable, if - * present and not empty, or fall back to the window title. Set the @ref - * GLFW_X11_CLASS_NAME and @ref GLFW_X11_INSTANCE_NAME window hints to override - * this. - * - * @remark @wayland The window frame is currently very simple, only allowing - * window resize or move. A compositor can still emit close, maximize or - * fullscreen events, using for example a keybind mechanism. Additionally, - * the wp_viewporter protocol is required for this feature, otherwise the - * window will not be decorated. - * - * @remark @wayland A full screen window will not attempt to change the mode, - * no matter what the requested size or refresh rate. - * - * @remark @wayland Screensaver inhibition requires the idle-inhibit protocol - * to be implemented in the user's compositor. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_creation - * @sa @ref glfwDestroyWindow - * - * @since Added in version 3.0. Replaces `glfwOpenWindow`. - * - * @ingroup window - */ -GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, const char* title, GLFWmonitor* monitor, GLFWwindow* share); - -/*! @brief Destroys the specified window and its context. - * - * This function destroys the specified window and its context. On calling - * this function, no further callbacks will be called for that window. - * - * If the context of the specified window is current on the main thread, it is - * detached before being destroyed. - * - * @param[in] window The window to destroy. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @note The context of the specified window must not be current on any other - * thread when this function is called. - * - * @reentrancy This function must not be called from a callback. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_creation - * @sa @ref glfwCreateWindow - * - * @since Added in version 3.0. Replaces `glfwCloseWindow`. - * - * @ingroup window - */ -GLFWAPI void glfwDestroyWindow(GLFWwindow* window); - -/*! @brief Checks the close flag of the specified window. - * - * This function returns the value of the close flag of the specified window. - * - * @param[in] window The window to query. - * @return The value of the close flag. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @sa @ref window_close - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI int glfwWindowShouldClose(GLFWwindow* window); - -/*! @brief Sets the close flag of the specified window. - * - * This function sets the value of the close flag of the specified window. - * This can be used to override the user's attempt to close the window, or - * to signal that it should be closed. - * - * @param[in] window The window whose flag to change. - * @param[in] value The new value. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @sa @ref window_close - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI void glfwSetWindowShouldClose(GLFWwindow* window, int value); - -/*! @brief Sets the title of the specified window. - * - * This function sets the window title, encoded as UTF-8, of the specified - * window. - * - * @param[in] window The window whose title to change. - * @param[in] title The UTF-8 encoded window title. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark @macos The window title will not be updated until the next time you - * process events. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_title - * - * @since Added in version 1.0. - * @glfw3 Added window handle parameter. - * - * @ingroup window - */ -GLFWAPI void glfwSetWindowTitle(GLFWwindow* window, const char* title); - -/*! @brief Sets the icon for the specified window. - * - * This function sets the icon of the specified window. If passed an array of - * candidate images, those of or closest to the sizes desired by the system are - * selected. If no images are specified, the window reverts to its default - * icon. - * - * The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight - * bits per channel with the red channel first. They are arranged canonically - * as packed sequential rows, starting from the top-left corner. - * - * The desired image sizes varies depending on platform and system settings. - * The selected images will be rescaled as needed. Good sizes include 16x16, - * 32x32 and 48x48. - * - * @param[in] window The window whose icon to set. - * @param[in] count The number of images in the specified array, or zero to - * revert to the default window icon. - * @param[in] images The images to create the icon from. This is ignored if - * count is zero. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The specified image data is copied before this function - * returns. - * - * @remark @macos The GLFW window has no icon, as it is not a document - * window, so this function does nothing. The dock icon will be the same as - * the application bundle's icon. For more information on bundles, see the - * [Bundle Programming Guide](https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/) - * in the Mac Developer Library. - * - * @remark @wayland There is no existing protocol to change an icon, the - * window will thus inherit the one defined in the application's desktop file. - * This function always emits @ref GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_icon - * - * @since Added in version 3.2. - * - * @ingroup window - */ -GLFWAPI void glfwSetWindowIcon(GLFWwindow* window, int count, const GLFWimage* images); - -/*! @brief Retrieves the position of the client area of the specified window. - * - * This function retrieves the position, in screen coordinates, of the - * upper-left corner of the client area of the specified window. - * - * Any or all of the position arguments may be `NULL`. If an error occurs, all - * non-`NULL` position arguments will be set to zero. - * - * @param[in] window The window to query. - * @param[out] xpos Where to store the x-coordinate of the upper-left corner of - * the client area, or `NULL`. - * @param[out] ypos Where to store the y-coordinate of the upper-left corner of - * the client area, or `NULL`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark @wayland There is no way for an application to retrieve the global - * position of its windows, this function will always emit @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_pos - * @sa @ref glfwSetWindowPos - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI void glfwGetWindowPos(GLFWwindow* window, int* xpos, int* ypos); - -/*! @brief Sets the position of the client area of the specified window. - * - * This function sets the position, in screen coordinates, of the upper-left - * corner of the client area of the specified windowed mode window. If the - * window is a full screen window, this function does nothing. - * - * __Do not use this function__ to move an already visible window unless you - * have very good reasons for doing so, as it will confuse and annoy the user. - * - * The window manager may put limits on what positions are allowed. GLFW - * cannot and should not override these limits. - * - * @param[in] window The window to query. - * @param[in] xpos The x-coordinate of the upper-left corner of the client area. - * @param[in] ypos The y-coordinate of the upper-left corner of the client area. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark @wayland There is no way for an application to set the global - * position of its windows, this function will always emit @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_pos - * @sa @ref glfwGetWindowPos - * - * @since Added in version 1.0. - * @glfw3 Added window handle parameter. - * - * @ingroup window - */ -GLFWAPI void glfwSetWindowPos(GLFWwindow* window, int xpos, int ypos); - -/*! @brief Retrieves the size of the client area of the specified window. - * - * This function retrieves the size, in screen coordinates, of the client area - * of the specified window. If you wish to retrieve the size of the - * framebuffer of the window in pixels, see @ref glfwGetFramebufferSize. - * - * Any or all of the size arguments may be `NULL`. If an error occurs, all - * non-`NULL` size arguments will be set to zero. - * - * @param[in] window The window whose size to retrieve. - * @param[out] width Where to store the width, in screen coordinates, of the - * client area, or `NULL`. - * @param[out] height Where to store the height, in screen coordinates, of the - * client area, or `NULL`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_size - * @sa @ref glfwSetWindowSize - * - * @since Added in version 1.0. - * @glfw3 Added window handle parameter. - * - * @ingroup window - */ -GLFWAPI void glfwGetWindowSize(GLFWwindow* window, int* width, int* height); - -/*! @brief Sets the size limits of the specified window. - * - * This function sets the size limits of the client area of the specified - * window. If the window is full screen, the size limits only take effect - * once it is made windowed. If the window is not resizable, this function - * does nothing. - * - * The size limits are applied immediately to a windowed mode window and may - * cause it to be resized. - * - * The maximum dimensions must be greater than or equal to the minimum - * dimensions and all must be greater than or equal to zero. - * - * @param[in] window The window to set limits for. - * @param[in] minwidth The minimum width, in screen coordinates, of the client - * area, or `GLFW_DONT_CARE`. - * @param[in] minheight The minimum height, in screen coordinates, of the - * client area, or `GLFW_DONT_CARE`. - * @param[in] maxwidth The maximum width, in screen coordinates, of the client - * area, or `GLFW_DONT_CARE`. - * @param[in] maxheight The maximum height, in screen coordinates, of the - * client area, or `GLFW_DONT_CARE`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR. - * - * @remark If you set size limits and an aspect ratio that conflict, the - * results are undefined. - * - * @remark @wayland The size limits will not be applied until the window is - * actually resized, either by the user or by the compositor. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_sizelimits - * @sa @ref glfwSetWindowAspectRatio - * - * @since Added in version 3.2. - * - * @ingroup window - */ -GLFWAPI void glfwSetWindowSizeLimits(GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight); - -/*! @brief Sets the aspect ratio of the specified window. - * - * This function sets the required aspect ratio of the client area of the - * specified window. If the window is full screen, the aspect ratio only takes - * effect once it is made windowed. If the window is not resizable, this - * function does nothing. - * - * The aspect ratio is specified as a numerator and a denominator and both - * values must be greater than zero. For example, the common 16:9 aspect ratio - * is specified as 16 and 9, respectively. - * - * If the numerator and denominator is set to `GLFW_DONT_CARE` then the aspect - * ratio limit is disabled. - * - * The aspect ratio is applied immediately to a windowed mode window and may - * cause it to be resized. - * - * @param[in] window The window to set limits for. - * @param[in] numer The numerator of the desired aspect ratio, or - * `GLFW_DONT_CARE`. - * @param[in] denom The denominator of the desired aspect ratio, or - * `GLFW_DONT_CARE`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR. - * - * @remark If you set size limits and an aspect ratio that conflict, the - * results are undefined. - * - * @remark @wayland The aspect ratio will not be applied until the window is - * actually resized, either by the user or by the compositor. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_sizelimits - * @sa @ref glfwSetWindowSizeLimits - * - * @since Added in version 3.2. - * - * @ingroup window - */ -GLFWAPI void glfwSetWindowAspectRatio(GLFWwindow* window, int numer, int denom); - -/*! @brief Sets the size of the client area of the specified window. - * - * This function sets the size, in screen coordinates, of the client area of - * the specified window. - * - * For full screen windows, this function updates the resolution of its desired - * video mode and switches to the video mode closest to it, without affecting - * the window's context. As the context is unaffected, the bit depths of the - * framebuffer remain unchanged. - * - * If you wish to update the refresh rate of the desired video mode in addition - * to its resolution, see @ref glfwSetWindowMonitor. - * - * The window manager may put limits on what sizes are allowed. GLFW cannot - * and should not override these limits. - * - * @param[in] window The window to resize. - * @param[in] width The desired width, in screen coordinates, of the window - * client area. - * @param[in] height The desired height, in screen coordinates, of the window - * client area. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark @wayland A full screen window will not attempt to change the mode, - * no matter what the requested size. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_size - * @sa @ref glfwGetWindowSize - * @sa @ref glfwSetWindowMonitor - * - * @since Added in version 1.0. - * @glfw3 Added window handle parameter. - * - * @ingroup window - */ -GLFWAPI void glfwSetWindowSize(GLFWwindow* window, int width, int height); - -/*! @brief Retrieves the size of the framebuffer of the specified window. - * - * This function retrieves the size, in pixels, of the framebuffer of the - * specified window. If you wish to retrieve the size of the window in screen - * coordinates, see @ref glfwGetWindowSize. - * - * Any or all of the size arguments may be `NULL`. If an error occurs, all - * non-`NULL` size arguments will be set to zero. - * - * @param[in] window The window whose framebuffer to query. - * @param[out] width Where to store the width, in pixels, of the framebuffer, - * or `NULL`. - * @param[out] height Where to store the height, in pixels, of the framebuffer, - * or `NULL`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_fbsize - * @sa @ref glfwSetFramebufferSizeCallback - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI void glfwGetFramebufferSize(GLFWwindow* window, int* width, int* height); - -/*! @brief Retrieves the size of the frame of the window. - * - * This function retrieves the size, in screen coordinates, of each edge of the - * frame of the specified window. This size includes the title bar, if the - * window has one. The size of the frame may vary depending on the - * [window-related hints](@ref window_hints_wnd) used to create it. - * - * Because this function retrieves the size of each window frame edge and not - * the offset along a particular coordinate axis, the retrieved values will - * always be zero or positive. - * - * Any or all of the size arguments may be `NULL`. If an error occurs, all - * non-`NULL` size arguments will be set to zero. - * - * @param[in] window The window whose frame size to query. - * @param[out] left Where to store the size, in screen coordinates, of the left - * edge of the window frame, or `NULL`. - * @param[out] top Where to store the size, in screen coordinates, of the top - * edge of the window frame, or `NULL`. - * @param[out] right Where to store the size, in screen coordinates, of the - * right edge of the window frame, or `NULL`. - * @param[out] bottom Where to store the size, in screen coordinates, of the - * bottom edge of the window frame, or `NULL`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_size - * - * @since Added in version 3.1. - * - * @ingroup window - */ -GLFWAPI void glfwGetWindowFrameSize(GLFWwindow* window, int* left, int* top, int* right, int* bottom); - -/*! @brief Retrieves the content scale for the specified window. - * - * This function retrieves the content scale for the specified window. The - * content scale is the ratio between the current DPI and the platform's - * default DPI. If you scale all pixel dimensions by this scale then your - * content should appear at an appropriate size. This is especially important - * for text and any UI elements. - * - * On systems where each monitors can have its own content scale, the window - * content scale will depend on which monitor the system considers the window - * to be on. - * - * @param[in] window The window to query. - * @param[out] xscale Where to store the x-axis content scale, or `NULL`. - * @param[out] yscale Where to store the y-axis content scale, or `NULL`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_scale - * @sa @ref glfwSetWindowContentScaleCallback - * @sa @ref glfwGetMonitorContentScale - * - * @since Added in version 3.3. - * - * @ingroup window - */ -GLFWAPI void glfwGetWindowContentScale(GLFWwindow* window, float* xscale, float* yscale); - -/*! @brief Returns the opacity of the whole window. - * - * This function returns the opacity of the window, including any decorations. - * - * The opacity (or alpha) value is a positive finite number between zero and - * one, where zero is fully transparent and one is fully opaque. If the system - * does not support whole window transparency, this function always returns one. - * - * The initial opacity value for newly created windows is one. - * - * @param[in] window The window to query. - * @return The opacity value of the specified window. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_transparency - * @sa @ref glfwSetWindowOpacity - * - * @since Added in version 3.3. - * - * @ingroup window - */ -GLFWAPI float glfwGetWindowOpacity(GLFWwindow* window); - -/*! @brief Sets the opacity of the whole window. - * - * This function sets the opacity of the window, including any decorations. - * - * The opacity (or alpha) value is a positive finite number between zero and - * one, where zero is fully transparent and one is fully opaque. - * - * The initial opacity value for newly created windows is one. - * - * A window created with framebuffer transparency may not use whole window - * transparency. The results of doing this are undefined. - * - * @param[in] window The window to set the opacity for. - * @param[in] opacity The desired opacity of the specified window. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_transparency - * @sa @ref glfwGetWindowOpacity - * - * @since Added in version 3.3. - * - * @ingroup window - */ -GLFWAPI void glfwSetWindowOpacity(GLFWwindow* window, float opacity); - -/*! @brief Iconifies the specified window. - * - * This function iconifies (minimizes) the specified window if it was - * previously restored. If the window is already iconified, this function does - * nothing. - * - * If the specified window is a full screen window, the original monitor - * resolution is restored until the window is restored. - * - * @param[in] window The window to iconify. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark @wayland There is no concept of iconification in wl_shell, this - * function will emit @ref GLFW_PLATFORM_ERROR when using this deprecated - * protocol. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_iconify - * @sa @ref glfwRestoreWindow - * @sa @ref glfwMaximizeWindow - * - * @since Added in version 2.1. - * @glfw3 Added window handle parameter. - * - * @ingroup window - */ -GLFWAPI void glfwIconifyWindow(GLFWwindow* window); - -/*! @brief Restores the specified window. - * - * This function restores the specified window if it was previously iconified - * (minimized) or maximized. If the window is already restored, this function - * does nothing. - * - * If the specified window is a full screen window, the resolution chosen for - * the window is restored on the selected monitor. - * - * @param[in] window The window to restore. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_iconify - * @sa @ref glfwIconifyWindow - * @sa @ref glfwMaximizeWindow - * - * @since Added in version 2.1. - * @glfw3 Added window handle parameter. - * - * @ingroup window - */ -GLFWAPI void glfwRestoreWindow(GLFWwindow* window); - -/*! @brief Maximizes the specified window. - * - * This function maximizes the specified window if it was previously not - * maximized. If the window is already maximized, this function does nothing. - * - * If the specified window is a full screen window, this function does nothing. - * - * @param[in] window The window to maximize. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @par Thread Safety - * This function may only be called from the main thread. - * - * @sa @ref window_iconify - * @sa @ref glfwIconifyWindow - * @sa @ref glfwRestoreWindow - * - * @since Added in GLFW 3.2. - * - * @ingroup window - */ -GLFWAPI void glfwMaximizeWindow(GLFWwindow* window); - -/*! @brief Makes the specified window visible. - * - * This function makes the specified window visible if it was previously - * hidden. If the window is already visible or is in full screen mode, this - * function does nothing. - * - * By default, windowed mode windows are focused when shown - * Set the [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_hint) window hint - * to change this behavior for all newly created windows, or change the - * behavior for an existing window with @ref glfwSetWindowAttrib. - * - * @param[in] window The window to make visible. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_hide - * @sa @ref glfwHideWindow - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI void glfwShowWindow(GLFWwindow* window); - -/*! @brief Hides the specified window. - * - * This function hides the specified window if it was previously visible. If - * the window is already hidden or is in full screen mode, this function does - * nothing. - * - * @param[in] window The window to hide. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_hide - * @sa @ref glfwShowWindow - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI void glfwHideWindow(GLFWwindow* window); - -/*! @brief Brings the specified window to front and sets input focus. - * - * This function brings the specified window to front and sets input focus. - * The window should already be visible and not iconified. - * - * By default, both windowed and full screen mode windows are focused when - * initially created. Set the [GLFW_FOCUSED](@ref GLFW_FOCUSED_hint) to - * disable this behavior. - * - * Also by default, windowed mode windows are focused when shown - * with @ref glfwShowWindow. Set the - * [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_hint) to disable this behavior. - * - * __Do not use this function__ to steal focus from other applications unless - * you are certain that is what the user wants. Focus stealing can be - * extremely disruptive. - * - * For a less disruptive way of getting the user's attention, see - * [attention requests](@ref window_attention). - * - * @param[in] window The window to give input focus. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark @wayland It is not possible for an application to bring its windows - * to front, this function will always emit @ref GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_focus - * @sa @ref window_attention - * - * @since Added in version 3.2. - * - * @ingroup window - */ -GLFWAPI void glfwFocusWindow(GLFWwindow* window); - -/*! @brief Requests user attention to the specified window. - * - * This function requests user attention to the specified window. On - * platforms where this is not supported, attention is requested to the - * application as a whole. - * - * Once the user has given attention, usually by focusing the window or - * application, the system will end the request automatically. - * - * @param[in] window The window to request attention to. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark @macos Attention is requested to the application as a whole, not the - * specific window. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_attention - * - * @since Added in version 3.3. - * - * @ingroup window - */ -GLFWAPI void glfwRequestWindowAttention(GLFWwindow* window); - -/*! @brief Returns the monitor that the window uses for full screen mode. - * - * This function returns the handle of the monitor that the specified window is - * in full screen on. - * - * @param[in] window The window to query. - * @return The monitor, or `NULL` if the window is in windowed mode or an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_monitor - * @sa @ref glfwSetWindowMonitor - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI GLFWmonitor* glfwGetWindowMonitor(GLFWwindow* window); - -/*! @brief Sets the mode, monitor, video mode and placement of a window. - * - * This function sets the monitor that the window uses for full screen mode or, - * if the monitor is `NULL`, makes it windowed mode. - * - * When setting a monitor, this function updates the width, height and refresh - * rate of the desired video mode and switches to the video mode closest to it. - * The window position is ignored when setting a monitor. - * - * When the monitor is `NULL`, the position, width and height are used to - * place the window client area. The refresh rate is ignored when no monitor - * is specified. - * - * If you only wish to update the resolution of a full screen window or the - * size of a windowed mode window, see @ref glfwSetWindowSize. - * - * When a window transitions from full screen to windowed mode, this function - * restores any previous window settings such as whether it is decorated, - * floating, resizable, has size or aspect ratio limits, etc. - * - * @param[in] window The window whose monitor, size or video mode to set. - * @param[in] monitor The desired monitor, or `NULL` to set windowed mode. - * @param[in] xpos The desired x-coordinate of the upper-left corner of the - * client area. - * @param[in] ypos The desired y-coordinate of the upper-left corner of the - * client area. - * @param[in] width The desired with, in screen coordinates, of the client area - * or video mode. - * @param[in] height The desired height, in screen coordinates, of the client - * area or video mode. - * @param[in] refreshRate The desired refresh rate, in Hz, of the video mode, - * or `GLFW_DONT_CARE`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark The OpenGL or OpenGL ES context will not be destroyed or otherwise - * affected by any resizing or mode switching, although you may need to update - * your viewport if the framebuffer size has changed. - * - * @remark @wayland The desired window position is ignored, as there is no way - * for an application to set this property. - * - * @remark @wayland Setting the window to full screen will not attempt to - * change the mode, no matter what the requested size or refresh rate. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_monitor - * @sa @ref window_full_screen - * @sa @ref glfwGetWindowMonitor - * @sa @ref glfwSetWindowSize - * - * @since Added in version 3.2. - * - * @ingroup window - */ -GLFWAPI void glfwSetWindowMonitor(GLFWwindow* window, GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate); - -/*! @brief Returns an attribute of the specified window. - * - * This function returns the value of an attribute of the specified window or - * its OpenGL or OpenGL ES context. - * - * @param[in] window The window to query. - * @param[in] attrib The [window attribute](@ref window_attribs) whose value to - * return. - * @return The value of the attribute, or zero if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. - * - * @remark Framebuffer related hints are not window attributes. See @ref - * window_attribs_fb for more information. - * - * @remark Zero is a valid value for many window and context related - * attributes so you cannot use a return value of zero as an indication of - * errors. However, this function should not fail as long as it is passed - * valid arguments and the library has been [initialized](@ref intro_init). - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_attribs - * @sa @ref glfwSetWindowAttrib - * - * @since Added in version 3.0. Replaces `glfwGetWindowParam` and - * `glfwGetGLVersion`. - * - * @ingroup window - */ -GLFWAPI int glfwGetWindowAttrib(GLFWwindow* window, int attrib); - -/*! @brief Sets an attribute of the specified window. - * - * This function sets the value of an attribute of the specified window. - * - * The supported attributes are [GLFW_DECORATED](@ref GLFW_DECORATED_attrib), - * [GLFW_RESIZABLE](@ref GLFW_RESIZABLE_attrib), - * [GLFW_FLOATING](@ref GLFW_FLOATING_attrib), - * [GLFW_AUTO_ICONIFY](@ref GLFW_AUTO_ICONIFY_attrib) and - * [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_attrib). - * - * Some of these attributes are ignored for full screen windows. The new - * value will take effect if the window is later made windowed. - * - * Some of these attributes are ignored for windowed mode windows. The new - * value will take effect if the window is later made full screen. - * - * @param[in] window The window to set the attribute for. - * @param[in] attrib A supported window attribute. - * @param[in] value `GLFW_TRUE` or `GLFW_FALSE`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR. - * - * @remark Calling @ref glfwGetWindowAttrib will always return the latest - * value, even if that value is ignored by the current mode of the window. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_attribs - * @sa @ref glfwGetWindowAttrib - * - * @since Added in version 3.3. - * - * @ingroup window - */ -GLFWAPI void glfwSetWindowAttrib(GLFWwindow* window, int attrib, int value); - -/*! @brief Sets the user pointer of the specified window. - * - * This function sets the user-defined pointer of the specified window. The - * current value is retained until the window is destroyed. The initial value - * is `NULL`. - * - * @param[in] window The window whose pointer to set. - * @param[in] pointer The new value. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @sa @ref window_userptr - * @sa @ref glfwGetWindowUserPointer - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI void glfwSetWindowUserPointer(GLFWwindow* window, void* pointer); - -/*! @brief Returns the user pointer of the specified window. - * - * This function returns the current value of the user-defined pointer of the - * specified window. The initial value is `NULL`. - * - * @param[in] window The window whose pointer to return. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @sa @ref window_userptr - * @sa @ref glfwSetWindowUserPointer - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI void* glfwGetWindowUserPointer(GLFWwindow* window); - -/*! @brief Sets the position callback for the specified window. - * - * This function sets the position callback of the specified window, which is - * called when the window is moved. The callback is provided with the - * position, in screen coordinates, of the upper-left corner of the client area - * of the window. - * - * @param[in] window The window whose callback to set. - * @param[in] cbfun The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @remark @wayland This callback will never be called, as there is no way for - * an application to know its global position. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_pos - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI GLFWwindowposfun glfwSetWindowPosCallback(GLFWwindow* window, GLFWwindowposfun cbfun); - -/*! @brief Sets the size callback for the specified window. - * - * This function sets the size callback of the specified window, which is - * called when the window is resized. The callback is provided with the size, - * in screen coordinates, of the client area of the window. - * - * @param[in] window The window whose callback to set. - * @param[in] cbfun The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_size - * - * @since Added in version 1.0. - * @glfw3 Added window handle parameter and return value. - * - * @ingroup window - */ -GLFWAPI GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow* window, GLFWwindowsizefun cbfun); - -/*! @brief Sets the close callback for the specified window. - * - * This function sets the close callback of the specified window, which is - * called when the user attempts to close the window, for example by clicking - * the close widget in the title bar. - * - * The close flag is set before this callback is called, but you can modify it - * at any time with @ref glfwSetWindowShouldClose. - * - * The close callback is not triggered by @ref glfwDestroyWindow. - * - * @param[in] window The window whose callback to set. - * @param[in] cbfun The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @remark @macos Selecting Quit from the application menu will trigger the - * close callback for all windows. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_close - * - * @since Added in version 2.5. - * @glfw3 Added window handle parameter and return value. - * - * @ingroup window - */ -GLFWAPI GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow* window, GLFWwindowclosefun cbfun); - -/*! @brief Sets the refresh callback for the specified window. - * - * This function sets the refresh callback of the specified window, which is - * called when the client area of the window needs to be redrawn, for example - * if the window has been exposed after having been covered by another window. - * - * On compositing window systems such as Aero, Compiz, Aqua or Wayland, where - * the window contents are saved off-screen, this callback may be called only - * very infrequently or never at all. - * - * @param[in] window The window whose callback to set. - * @param[in] cbfun The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_refresh - * - * @since Added in version 2.5. - * @glfw3 Added window handle parameter and return value. - * - * @ingroup window - */ -GLFWAPI GLFWwindowrefreshfun glfwSetWindowRefreshCallback(GLFWwindow* window, GLFWwindowrefreshfun cbfun); - -/*! @brief Sets the focus callback for the specified window. - * - * This function sets the focus callback of the specified window, which is - * called when the window gains or loses input focus. - * - * After the focus callback is called for a window that lost input focus, - * synthetic key and mouse button release events will be generated for all such - * that had been pressed. For more information, see @ref glfwSetKeyCallback - * and @ref glfwSetMouseButtonCallback. - * - * @param[in] window The window whose callback to set. - * @param[in] cbfun The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_focus - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI GLFWwindowfocusfun glfwSetWindowFocusCallback(GLFWwindow* window, GLFWwindowfocusfun cbfun); - -/*! @brief Sets the iconify callback for the specified window. - * - * This function sets the iconification callback of the specified window, which - * is called when the window is iconified or restored. - * - * @param[in] window The window whose callback to set. - * @param[in] cbfun The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @remark @wayland The wl_shell protocol has no concept of iconification, - * this callback will never be called when using this deprecated protocol. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_iconify - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI GLFWwindowiconifyfun glfwSetWindowIconifyCallback(GLFWwindow* window, GLFWwindowiconifyfun cbfun); - -/*! @brief Sets the maximize callback for the specified window. - * - * This function sets the maximization callback of the specified window, which - * is called when the window is maximized or restored. - * - * @param[in] window The window whose callback to set. - * @param[in] cbfun The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_maximize - * - * @since Added in version 3.3. - * - * @ingroup window - */ -GLFWAPI GLFWwindowmaximizefun glfwSetWindowMaximizeCallback(GLFWwindow* window, GLFWwindowmaximizefun cbfun); - -/*! @brief Sets the framebuffer resize callback for the specified window. - * - * This function sets the framebuffer resize callback of the specified window, - * which is called when the framebuffer of the specified window is resized. - * - * @param[in] window The window whose callback to set. - * @param[in] cbfun The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_fbsize - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow* window, GLFWframebuffersizefun cbfun); - -/*! @brief Sets the window content scale callback for the specified window. - * - * This function sets the window content scale callback of the specified window, - * which is called when the content scale of the specified window changes. - * - * @param[in] window The window whose callback to set. - * @param[in] cbfun The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_scale - * @sa @ref glfwGetWindowContentScale - * - * @since Added in version 3.3. - * - * @ingroup window - */ -GLFWAPI GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(GLFWwindow* window, GLFWwindowcontentscalefun cbfun); - -/*! @brief Processes all pending events. - * - * This function processes only those events that are already in the event - * queue and then returns immediately. Processing events will cause the window - * and input callbacks associated with those events to be called. - * - * On some platforms, a window move, resize or menu operation will cause event - * processing to block. This is due to how event processing is designed on - * those platforms. You can use the - * [window refresh callback](@ref window_refresh) to redraw the contents of - * your window when necessary during such operations. - * - * Do not assume that callbacks you set will _only_ be called in response to - * event processing functions like this one. While it is necessary to poll for - * events, window systems that require GLFW to register callbacks of its own - * can pass events to GLFW in response to many window system function calls. - * GLFW will pass those events on to the application callbacks before - * returning. - * - * Event processing is not required for joystick input to work. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @reentrancy This function must not be called from a callback. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref events - * @sa @ref glfwWaitEvents - * @sa @ref glfwWaitEventsTimeout - * - * @since Added in version 1.0. - * - * @ingroup window - */ -GLFWAPI void glfwPollEvents(void); - -/*! @brief Waits until events are queued and processes them. - * - * This function puts the calling thread to sleep until at least one event is - * available in the event queue. Once one or more events are available, - * it behaves exactly like @ref glfwPollEvents, i.e. the events in the queue - * are processed and the function then returns immediately. Processing events - * will cause the window and input callbacks associated with those events to be - * called. - * - * Since not all events are associated with callbacks, this function may return - * without a callback having been called even if you are monitoring all - * callbacks. - * - * On some platforms, a window move, resize or menu operation will cause event - * processing to block. This is due to how event processing is designed on - * those platforms. You can use the - * [window refresh callback](@ref window_refresh) to redraw the contents of - * your window when necessary during such operations. - * - * Do not assume that callbacks you set will _only_ be called in response to - * event processing functions like this one. While it is necessary to poll for - * events, window systems that require GLFW to register callbacks of its own - * can pass events to GLFW in response to many window system function calls. - * GLFW will pass those events on to the application callbacks before - * returning. - * - * If no windows exist, this function returns immediately. For synchronization - * of threads in applications that do not create windows, use your threading - * library of choice. - * - * Event processing is not required for joystick input to work. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @reentrancy This function must not be called from a callback. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref events - * @sa @ref glfwPollEvents - * @sa @ref glfwWaitEventsTimeout - * - * @since Added in version 2.5. - * - * @ingroup window - */ -GLFWAPI void glfwWaitEvents(void); - -/*! @brief Waits with timeout until events are queued and processes them. - * - * This function puts the calling thread to sleep until at least one event is - * available in the event queue, or until the specified timeout is reached. If - * one or more events are available, it behaves exactly like @ref - * glfwPollEvents, i.e. the events in the queue are processed and the function - * then returns immediately. Processing events will cause the window and input - * callbacks associated with those events to be called. - * - * The timeout value must be a positive finite number. - * - * Since not all events are associated with callbacks, this function may return - * without a callback having been called even if you are monitoring all - * callbacks. - * - * On some platforms, a window move, resize or menu operation will cause event - * processing to block. This is due to how event processing is designed on - * those platforms. You can use the - * [window refresh callback](@ref window_refresh) to redraw the contents of - * your window when necessary during such operations. - * - * Do not assume that callbacks you set will _only_ be called in response to - * event processing functions like this one. While it is necessary to poll for - * events, window systems that require GLFW to register callbacks of its own - * can pass events to GLFW in response to many window system function calls. - * GLFW will pass those events on to the application callbacks before - * returning. - * - * If no windows exist, this function returns immediately. For synchronization - * of threads in applications that do not create windows, use your threading - * library of choice. - * - * Event processing is not required for joystick input to work. - * - * @param[in] timeout The maximum amount of time, in seconds, to wait. - * - * @reentrancy This function must not be called from a callback. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref events - * @sa @ref glfwPollEvents - * @sa @ref glfwWaitEvents - * - * @since Added in version 3.2. - * - * @ingroup window - */ -GLFWAPI void glfwWaitEventsTimeout(double timeout); - -/*! @brief Posts an empty event to the event queue. - * - * This function posts an empty event from the current thread to the event - * queue, causing @ref glfwWaitEvents or @ref glfwWaitEventsTimeout to return. - * - * If no windows exist, this function returns immediately. For synchronization - * of threads in applications that do not create windows, use your threading - * library of choice. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref events - * @sa @ref glfwWaitEvents - * @sa @ref glfwWaitEventsTimeout - * - * @since Added in version 3.1. - * - * @ingroup window - */ -GLFWAPI void glfwPostEmptyEvent(void); - -/*! @brief Returns the value of an input option for the specified window. - * - * This function returns the value of an input option for the specified window. - * The mode must be one of @ref GLFW_CURSOR, @ref GLFW_STICKY_KEYS, - * @ref GLFW_STICKY_MOUSE_BUTTONS or @ref GLFW_LOCK_KEY_MODS. - * - * @param[in] window The window to query. - * @param[in] mode One of `GLFW_CURSOR`, `GLFW_STICKY_KEYS`, - * `GLFW_STICKY_MOUSE_BUTTONS` or `GLFW_LOCK_KEY_MODS`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_INVALID_ENUM. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref glfwSetInputMode - * - * @since Added in version 3.0. - * - * @ingroup input - */ -GLFWAPI int glfwGetInputMode(GLFWwindow* window, int mode); - -/*! @brief Sets an input option for the specified window. - * - * This function sets an input mode option for the specified window. The mode - * must be one of @ref GLFW_CURSOR, @ref GLFW_STICKY_KEYS, - * @ref GLFW_STICKY_MOUSE_BUTTONS or @ref GLFW_LOCK_KEY_MODS. - * - * If the mode is `GLFW_CURSOR`, the value must be one of the following cursor - * modes: - * - `GLFW_CURSOR_NORMAL` makes the cursor visible and behaving normally. - * - `GLFW_CURSOR_HIDDEN` makes the cursor invisible when it is over the client - * area of the window but does not restrict the cursor from leaving. - * - `GLFW_CURSOR_DISABLED` hides and grabs the cursor, providing virtual - * and unlimited cursor movement. This is useful for implementing for - * example 3D camera controls. - * - * If the mode is `GLFW_STICKY_KEYS`, the value must be either `GLFW_TRUE` to - * enable sticky keys, or `GLFW_FALSE` to disable it. If sticky keys are - * enabled, a key press will ensure that @ref glfwGetKey returns `GLFW_PRESS` - * the next time it is called even if the key had been released before the - * call. This is useful when you are only interested in whether keys have been - * pressed but not when or in which order. - * - * If the mode is `GLFW_STICKY_MOUSE_BUTTONS`, the value must be either - * `GLFW_TRUE` to enable sticky mouse buttons, or `GLFW_FALSE` to disable it. - * If sticky mouse buttons are enabled, a mouse button press will ensure that - * @ref glfwGetMouseButton returns `GLFW_PRESS` the next time it is called even - * if the mouse button had been released before the call. This is useful when - * you are only interested in whether mouse buttons have been pressed but not - * when or in which order. - * - * If the mode is `GLFW_LOCK_KEY_MODS`, the value must be either `GLFW_TRUE` to - * enable lock key modifier bits, or `GLFW_FALSE` to disable them. If enabled, - * callbacks that receive modifier bits will also have the @ref - * GLFW_MOD_CAPS_LOCK bit set when the event was generated with Caps Lock on, - * and the @ref GLFW_MOD_NUM_LOCK bit when Num Lock was on. - * - * @param[in] window The window whose input mode to set. - * @param[in] mode One of `GLFW_CURSOR`, `GLFW_STICKY_KEYS`, - * `GLFW_STICKY_MOUSE_BUTTONS` or `GLFW_LOCK_KEY_MODS`. - * @param[in] value The new value of the specified input mode. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref glfwGetInputMode - * - * @since Added in version 3.0. Replaces `glfwEnable` and `glfwDisable`. - * - * @ingroup input - */ -GLFWAPI void glfwSetInputMode(GLFWwindow* window, int mode, int value); - -/*! @brief Returns the layout-specific name of the specified printable key. - * - * This function returns the name of the specified printable key, encoded as - * UTF-8. This is typically the character that key would produce without any - * modifier keys, intended for displaying key bindings to the user. For dead - * keys, it is typically the diacritic it would add to a character. - * - * __Do not use this function__ for [text input](@ref input_char). You will - * break text input for many languages even if it happens to work for yours. - * - * If the key is `GLFW_KEY_UNKNOWN`, the scancode is used to identify the key, - * otherwise the scancode is ignored. If you specify a non-printable key, or - * `GLFW_KEY_UNKNOWN` and a scancode that maps to a non-printable key, this - * function returns `NULL` but does not emit an error. - * - * This behavior allows you to always pass in the arguments in the - * [key callback](@ref input_key) without modification. - * - * The printable keys are: - * - `GLFW_KEY_APOSTROPHE` - * - `GLFW_KEY_COMMA` - * - `GLFW_KEY_MINUS` - * - `GLFW_KEY_PERIOD` - * - `GLFW_KEY_SLASH` - * - `GLFW_KEY_SEMICOLON` - * - `GLFW_KEY_EQUAL` - * - `GLFW_KEY_LEFT_BRACKET` - * - `GLFW_KEY_RIGHT_BRACKET` - * - `GLFW_KEY_BACKSLASH` - * - `GLFW_KEY_WORLD_1` - * - `GLFW_KEY_WORLD_2` - * - `GLFW_KEY_0` to `GLFW_KEY_9` - * - `GLFW_KEY_A` to `GLFW_KEY_Z` - * - `GLFW_KEY_KP_0` to `GLFW_KEY_KP_9` - * - `GLFW_KEY_KP_DECIMAL` - * - `GLFW_KEY_KP_DIVIDE` - * - `GLFW_KEY_KP_MULTIPLY` - * - `GLFW_KEY_KP_SUBTRACT` - * - `GLFW_KEY_KP_ADD` - * - `GLFW_KEY_KP_EQUAL` - * - * Names for printable keys depend on keyboard layout, while names for - * non-printable keys are the same across layouts but depend on the application - * language and should be localized along with other user interface text. - * - * @param[in] key The key to query, or `GLFW_KEY_UNKNOWN`. - * @param[in] scancode The scancode of the key to query. - * @return The UTF-8 encoded, layout-specific name of the key, or `NULL`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The returned string is allocated and freed by GLFW. You - * should not free it yourself. It is valid until the next call to @ref - * glfwGetKeyName, or until the library is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref input_key_name - * - * @since Added in version 3.2. - * - * @ingroup input - */ -GLFWAPI const char* glfwGetKeyName(int key, int scancode); - -/*! @brief Returns the platform-specific scancode of the specified key. - * - * This function returns the platform-specific scancode of the specified key. - * - * If the key is `GLFW_KEY_UNKNOWN` or does not exist on the keyboard this - * method will return `-1`. - * - * @param[in] key Any [named key](@ref keys). - * @return The platform-specific scancode for the key, or `-1` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref input_key - * - * @since Added in version 3.3. - * - * @ingroup input - */ -GLFWAPI int glfwGetKeyScancode(int key); - -/*! @brief Returns the last reported state of a keyboard key for the specified - * window. - * - * This function returns the last state reported for the specified key to the - * specified window. The returned state is one of `GLFW_PRESS` or - * `GLFW_RELEASE`. The higher-level action `GLFW_REPEAT` is only reported to - * the key callback. - * - * If the @ref GLFW_STICKY_KEYS input mode is enabled, this function returns - * `GLFW_PRESS` the first time you call it for a key that was pressed, even if - * that key has already been released. - * - * The key functions deal with physical keys, with [key tokens](@ref keys) - * named after their use on the standard US keyboard layout. If you want to - * input text, use the Unicode character callback instead. - * - * The [modifier key bit masks](@ref mods) are not key tokens and cannot be - * used with this function. - * - * __Do not use this function__ to implement [text input](@ref input_char). - * - * @param[in] window The desired window. - * @param[in] key The desired [keyboard key](@ref keys). `GLFW_KEY_UNKNOWN` is - * not a valid key for this function. - * @return One of `GLFW_PRESS` or `GLFW_RELEASE`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_INVALID_ENUM. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref input_key - * - * @since Added in version 1.0. - * @glfw3 Added window handle parameter. - * - * @ingroup input - */ -GLFWAPI int glfwGetKey(GLFWwindow* window, int key); - -/*! @brief Returns the last reported state of a mouse button for the specified - * window. - * - * This function returns the last state reported for the specified mouse button - * to the specified window. The returned state is one of `GLFW_PRESS` or - * `GLFW_RELEASE`. - * - * If the @ref GLFW_STICKY_MOUSE_BUTTONS input mode is enabled, this function - * returns `GLFW_PRESS` the first time you call it for a mouse button that was - * pressed, even if that mouse button has already been released. - * - * @param[in] window The desired window. - * @param[in] button The desired [mouse button](@ref buttons). - * @return One of `GLFW_PRESS` or `GLFW_RELEASE`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_INVALID_ENUM. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref input_mouse_button - * - * @since Added in version 1.0. - * @glfw3 Added window handle parameter. - * - * @ingroup input - */ -GLFWAPI int glfwGetMouseButton(GLFWwindow* window, int button); - -/*! @brief Retrieves the position of the cursor relative to the client area of - * the window. - * - * This function returns the position of the cursor, in screen coordinates, - * relative to the upper-left corner of the client area of the specified - * window. - * - * If the cursor is disabled (with `GLFW_CURSOR_DISABLED`) then the cursor - * position is unbounded and limited only by the minimum and maximum values of - * a `double`. - * - * The coordinate can be converted to their integer equivalents with the - * `floor` function. Casting directly to an integer type works for positive - * coordinates, but fails for negative ones. - * - * Any or all of the position arguments may be `NULL`. If an error occurs, all - * non-`NULL` position arguments will be set to zero. - * - * @param[in] window The desired window. - * @param[out] xpos Where to store the cursor x-coordinate, relative to the - * left edge of the client area, or `NULL`. - * @param[out] ypos Where to store the cursor y-coordinate, relative to the to - * top edge of the client area, or `NULL`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref cursor_pos - * @sa @ref glfwSetCursorPos - * - * @since Added in version 3.0. Replaces `glfwGetMousePos`. - * - * @ingroup input - */ -GLFWAPI void glfwGetCursorPos(GLFWwindow* window, double* xpos, double* ypos); - -/*! @brief Sets the position of the cursor, relative to the client area of the - * window. - * - * This function sets the position, in screen coordinates, of the cursor - * relative to the upper-left corner of the client area of the specified - * window. The window must have input focus. If the window does not have - * input focus when this function is called, it fails silently. - * - * __Do not use this function__ to implement things like camera controls. GLFW - * already provides the `GLFW_CURSOR_DISABLED` cursor mode that hides the - * cursor, transparently re-centers it and provides unconstrained cursor - * motion. See @ref glfwSetInputMode for more information. - * - * If the cursor mode is `GLFW_CURSOR_DISABLED` then the cursor position is - * unconstrained and limited only by the minimum and maximum values of - * a `double`. - * - * @param[in] window The desired window. - * @param[in] xpos The desired x-coordinate, relative to the left edge of the - * client area. - * @param[in] ypos The desired y-coordinate, relative to the top edge of the - * client area. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark @wayland This function will only work when the cursor mode is - * `GLFW_CURSOR_DISABLED`, otherwise it will do nothing. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref cursor_pos - * @sa @ref glfwGetCursorPos - * - * @since Added in version 3.0. Replaces `glfwSetMousePos`. - * - * @ingroup input - */ -GLFWAPI void glfwSetCursorPos(GLFWwindow* window, double xpos, double ypos); - -/*! @brief Creates a custom cursor. - * - * Creates a new custom cursor image that can be set for a window with @ref - * glfwSetCursor. The cursor can be destroyed with @ref glfwDestroyCursor. - * Any remaining cursors are destroyed by @ref glfwTerminate. - * - * The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight - * bits per channel with the red channel first. They are arranged canonically - * as packed sequential rows, starting from the top-left corner. - * - * The cursor hotspot is specified in pixels, relative to the upper-left corner - * of the cursor image. Like all other coordinate systems in GLFW, the X-axis - * points to the right and the Y-axis points down. - * - * @param[in] image The desired cursor image. - * @param[in] xhot The desired x-coordinate, in pixels, of the cursor hotspot. - * @param[in] yhot The desired y-coordinate, in pixels, of the cursor hotspot. - * @return The handle of the created cursor, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The specified image data is copied before this function - * returns. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref cursor_object - * @sa @ref glfwDestroyCursor - * @sa @ref glfwCreateStandardCursor - * - * @since Added in version 3.1. - * - * @ingroup input - */ -GLFWAPI GLFWcursor* glfwCreateCursor(const GLFWimage* image, int xhot, int yhot); - -/*! @brief Creates a cursor with a standard shape. - * - * Returns a cursor with a [standard shape](@ref shapes), that can be set for - * a window with @ref glfwSetCursor. - * - * @param[in] shape One of the [standard shapes](@ref shapes). - * @return A new cursor ready to use or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref cursor_object - * @sa @ref glfwCreateCursor - * - * @since Added in version 3.1. - * - * @ingroup input - */ -GLFWAPI GLFWcursor* glfwCreateStandardCursor(int shape); - -/*! @brief Destroys a cursor. - * - * This function destroys a cursor previously created with @ref - * glfwCreateCursor. Any remaining cursors will be destroyed by @ref - * glfwTerminate. - * - * If the specified cursor is current for any window, that window will be - * reverted to the default cursor. This does not affect the cursor mode. - * - * @param[in] cursor The cursor object to destroy. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @reentrancy This function must not be called from a callback. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref cursor_object - * @sa @ref glfwCreateCursor - * - * @since Added in version 3.1. - * - * @ingroup input - */ -GLFWAPI void glfwDestroyCursor(GLFWcursor* cursor); - -/*! @brief Sets the cursor for the window. - * - * This function sets the cursor image to be used when the cursor is over the - * client area of the specified window. The set cursor will only be visible - * when the [cursor mode](@ref cursor_mode) of the window is - * `GLFW_CURSOR_NORMAL`. - * - * On some platforms, the set cursor may not be visible unless the window also - * has input focus. - * - * @param[in] window The window to set the cursor for. - * @param[in] cursor The cursor to set, or `NULL` to switch back to the default - * arrow cursor. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref cursor_object - * - * @since Added in version 3.1. - * - * @ingroup input - */ -GLFWAPI void glfwSetCursor(GLFWwindow* window, GLFWcursor* cursor); - -/*! @brief Sets the key callback. - * - * This function sets the key callback of the specified window, which is called - * when a key is pressed, repeated or released. - * - * The key functions deal with physical keys, with layout independent - * [key tokens](@ref keys) named after their values in the standard US keyboard - * layout. If you want to input text, use the - * [character callback](@ref glfwSetCharCallback) instead. - * - * When a window loses input focus, it will generate synthetic key release - * events for all pressed keys. You can tell these events from user-generated - * events by the fact that the synthetic ones are generated after the focus - * loss event has been processed, i.e. after the - * [window focus callback](@ref glfwSetWindowFocusCallback) has been called. - * - * The scancode of a key is specific to that platform or sometimes even to that - * machine. Scancodes are intended to allow users to bind keys that don't have - * a GLFW key token. Such keys have `key` set to `GLFW_KEY_UNKNOWN`, their - * state is not saved and so it cannot be queried with @ref glfwGetKey. - * - * Sometimes GLFW needs to generate synthetic key events, in which case the - * scancode may be zero. - * - * @param[in] window The window whose callback to set. - * @param[in] cbfun The new key callback, or `NULL` to remove the currently - * set callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref input_key - * - * @since Added in version 1.0. - * @glfw3 Added window handle parameter and return value. - * - * @ingroup input - */ -GLFWAPI GLFWkeyfun glfwSetKeyCallback(GLFWwindow* window, GLFWkeyfun cbfun); - -/*! @brief Sets the Unicode character callback. - * - * This function sets the character callback of the specified window, which is - * called when a Unicode character is input. - * - * The character callback is intended for Unicode text input. As it deals with - * characters, it is keyboard layout dependent, whereas the - * [key callback](@ref glfwSetKeyCallback) is not. Characters do not map 1:1 - * to physical keys, as a key may produce zero, one or more characters. If you - * want to know whether a specific physical key was pressed or released, see - * the key callback instead. - * - * The character callback behaves as system text input normally does and will - * not be called if modifier keys are held down that would prevent normal text - * input on that platform, for example a Super (Command) key on macOS or Alt key - * on Windows. There is a - * [character with modifiers callback](@ref glfwSetCharModsCallback) that - * receives these events. - * - * @param[in] window The window whose callback to set. - * @param[in] cbfun The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref input_char - * - * @since Added in version 2.4. - * @glfw3 Added window handle parameter and return value. - * - * @ingroup input - */ -GLFWAPI GLFWcharfun glfwSetCharCallback(GLFWwindow* window, GLFWcharfun cbfun); - -/*! @brief Sets the Unicode character with modifiers callback. - * - * This function sets the character with modifiers callback of the specified - * window, which is called when a Unicode character is input regardless of what - * modifier keys are used. - * - * The character with modifiers callback is intended for implementing custom - * Unicode character input. For regular Unicode text input, see the - * [character callback](@ref glfwSetCharCallback). Like the character - * callback, the character with modifiers callback deals with characters and is - * keyboard layout dependent. Characters do not map 1:1 to physical keys, as - * a key may produce zero, one or more characters. If you want to know whether - * a specific physical key was pressed or released, see the - * [key callback](@ref glfwSetKeyCallback) instead. - * - * @param[in] window The window whose callback to set. - * @param[in] cbfun The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or an - * [error](@ref error_handling) occurred. - * - * @deprecated Scheduled for removal in version 4.0. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref input_char - * - * @since Added in version 3.1. - * - * @ingroup input - */ -GLFWAPI GLFWcharmodsfun glfwSetCharModsCallback(GLFWwindow* window, GLFWcharmodsfun cbfun); - -/*! @brief Sets the mouse button callback. - * - * This function sets the mouse button callback of the specified window, which - * is called when a mouse button is pressed or released. - * - * When a window loses input focus, it will generate synthetic mouse button - * release events for all pressed mouse buttons. You can tell these events - * from user-generated events by the fact that the synthetic ones are generated - * after the focus loss event has been processed, i.e. after the - * [window focus callback](@ref glfwSetWindowFocusCallback) has been called. - * - * @param[in] window The window whose callback to set. - * @param[in] cbfun The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref input_mouse_button - * - * @since Added in version 1.0. - * @glfw3 Added window handle parameter and return value. - * - * @ingroup input - */ -GLFWAPI GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow* window, GLFWmousebuttonfun cbfun); - -/*! @brief Sets the cursor position callback. - * - * This function sets the cursor position callback of the specified window, - * which is called when the cursor is moved. The callback is provided with the - * position, in screen coordinates, relative to the upper-left corner of the - * client area of the window. - * - * @param[in] window The window whose callback to set. - * @param[in] cbfun The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref cursor_pos - * - * @since Added in version 3.0. Replaces `glfwSetMousePosCallback`. - * - * @ingroup input - */ -GLFWAPI GLFWcursorposfun glfwSetCursorPosCallback(GLFWwindow* window, GLFWcursorposfun cbfun); - -/*! @brief Sets the cursor enter/exit callback. - * - * This function sets the cursor boundary crossing callback of the specified - * window, which is called when the cursor enters or leaves the client area of - * the window. - * - * @param[in] window The window whose callback to set. - * @param[in] cbfun The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref cursor_enter - * - * @since Added in version 3.0. - * - * @ingroup input - */ -GLFWAPI GLFWcursorenterfun glfwSetCursorEnterCallback(GLFWwindow* window, GLFWcursorenterfun cbfun); - -/*! @brief Sets the scroll callback. - * - * This function sets the scroll callback of the specified window, which is - * called when a scrolling device is used, such as a mouse wheel or scrolling - * area of a touchpad. - * - * The scroll callback receives all scrolling input, like that from a mouse - * wheel or a touchpad scrolling area. - * - * @param[in] window The window whose callback to set. - * @param[in] cbfun The new scroll callback, or `NULL` to remove the currently - * set callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref scrolling - * - * @since Added in version 3.0. Replaces `glfwSetMouseWheelCallback`. - * - * @ingroup input - */ -GLFWAPI GLFWscrollfun glfwSetScrollCallback(GLFWwindow* window, GLFWscrollfun cbfun); - -/*! @brief Sets the file drop callback. - * - * This function sets the file drop callback of the specified window, which is - * called when one or more dragged files are dropped on the window. - * - * Because the path array and its strings may have been generated specifically - * for that event, they are not guaranteed to be valid after the callback has - * returned. If you wish to use them after the callback returns, you need to - * make a deep copy. - * - * @param[in] window The window whose callback to set. - * @param[in] cbfun The new file drop callback, or `NULL` to remove the - * currently set callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @remark @wayland File drop is currently unimplemented. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref path_drop - * - * @since Added in version 3.1. - * - * @ingroup input - */ -GLFWAPI GLFWdropfun glfwSetDropCallback(GLFWwindow* window, GLFWdropfun cbfun); - -/*! @brief Returns whether the specified joystick is present. - * - * This function returns whether the specified joystick is present. - * - * There is no need to call this function before other functions that accept - * a joystick ID, as they all check for presence before performing any other - * work. - * - * @param[in] jid The [joystick](@ref joysticks) to query. - * @return `GLFW_TRUE` if the joystick is present, or `GLFW_FALSE` otherwise. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref joystick - * - * @since Added in version 3.0. Replaces `glfwGetJoystickParam`. - * - * @ingroup input - */ -GLFWAPI int glfwJoystickPresent(int jid); - -/*! @brief Returns the values of all axes of the specified joystick. - * - * This function returns the values of all axes of the specified joystick. - * Each element in the array is a value between -1.0 and 1.0. - * - * If the specified joystick is not present this function will return `NULL` - * but will not generate an error. This can be used instead of first calling - * @ref glfwJoystickPresent. - * - * @param[in] jid The [joystick](@ref joysticks) to query. - * @param[out] count Where to store the number of axis values in the returned - * array. This is set to zero if the joystick is not present or an error - * occurred. - * @return An array of axis values, or `NULL` if the joystick is not present or - * an [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The returned array is allocated and freed by GLFW. You - * should not free it yourself. It is valid until the specified joystick is - * disconnected or the library is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref joystick_axis - * - * @since Added in version 3.0. Replaces `glfwGetJoystickPos`. - * - * @ingroup input - */ -GLFWAPI const float* glfwGetJoystickAxes(int jid, int* count); - -/*! @brief Returns the state of all buttons of the specified joystick. - * - * This function returns the state of all buttons of the specified joystick. - * Each element in the array is either `GLFW_PRESS` or `GLFW_RELEASE`. - * - * For backward compatibility with earlier versions that did not have @ref - * glfwGetJoystickHats, the button array also includes all hats, each - * represented as four buttons. The hats are in the same order as returned by - * __glfwGetJoystickHats__ and are in the order _up_, _right_, _down_ and - * _left_. To disable these extra buttons, set the @ref - * GLFW_JOYSTICK_HAT_BUTTONS init hint before initialization. - * - * If the specified joystick is not present this function will return `NULL` - * but will not generate an error. This can be used instead of first calling - * @ref glfwJoystickPresent. - * - * @param[in] jid The [joystick](@ref joysticks) to query. - * @param[out] count Where to store the number of button states in the returned - * array. This is set to zero if the joystick is not present or an error - * occurred. - * @return An array of button states, or `NULL` if the joystick is not present - * or an [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The returned array is allocated and freed by GLFW. You - * should not free it yourself. It is valid until the specified joystick is - * disconnected or the library is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref joystick_button - * - * @since Added in version 2.2. - * @glfw3 Changed to return a dynamic array. - * - * @ingroup input - */ -GLFWAPI const unsigned char* glfwGetJoystickButtons(int jid, int* count); - -/*! @brief Returns the state of all hats of the specified joystick. - * - * This function returns the state of all hats of the specified joystick. - * Each element in the array is one of the following values: - * - * Name | Value - * --------------------- | -------------------------------- - * `GLFW_HAT_CENTERED` | 0 - * `GLFW_HAT_UP` | 1 - * `GLFW_HAT_RIGHT` | 2 - * `GLFW_HAT_DOWN` | 4 - * `GLFW_HAT_LEFT` | 8 - * `GLFW_HAT_RIGHT_UP` | `GLFW_HAT_RIGHT` \| `GLFW_HAT_UP` - * `GLFW_HAT_RIGHT_DOWN` | `GLFW_HAT_RIGHT` \| `GLFW_HAT_DOWN` - * `GLFW_HAT_LEFT_UP` | `GLFW_HAT_LEFT` \| `GLFW_HAT_UP` - * `GLFW_HAT_LEFT_DOWN` | `GLFW_HAT_LEFT` \| `GLFW_HAT_DOWN` - * - * The diagonal directions are bitwise combinations of the primary (up, right, - * down and left) directions and you can test for these individually by ANDing - * it with the corresponding direction. - * - * @code - * if (hats[2] & GLFW_HAT_RIGHT) - * { - * // State of hat 2 could be right-up, right or right-down - * } - * @endcode - * - * If the specified joystick is not present this function will return `NULL` - * but will not generate an error. This can be used instead of first calling - * @ref glfwJoystickPresent. - * - * @param[in] jid The [joystick](@ref joysticks) to query. - * @param[out] count Where to store the number of hat states in the returned - * array. This is set to zero if the joystick is not present or an error - * occurred. - * @return An array of hat states, or `NULL` if the joystick is not present - * or an [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The returned array is allocated and freed by GLFW. You - * should not free it yourself. It is valid until the specified joystick is - * disconnected, this function is called again for that joystick or the library - * is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref joystick_hat - * - * @since Added in version 3.3. - * - * @ingroup input - */ -GLFWAPI const unsigned char* glfwGetJoystickHats(int jid, int* count); - -/*! @brief Returns the name of the specified joystick. - * - * This function returns the name, encoded as UTF-8, of the specified joystick. - * The returned string is allocated and freed by GLFW. You should not free it - * yourself. - * - * If the specified joystick is not present this function will return `NULL` - * but will not generate an error. This can be used instead of first calling - * @ref glfwJoystickPresent. - * - * @param[in] jid The [joystick](@ref joysticks) to query. - * @return The UTF-8 encoded name of the joystick, or `NULL` if the joystick - * is not present or an [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The returned string is allocated and freed by GLFW. You - * should not free it yourself. It is valid until the specified joystick is - * disconnected or the library is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref joystick_name - * - * @since Added in version 3.0. - * - * @ingroup input - */ -GLFWAPI const char* glfwGetJoystickName(int jid); - -/*! @brief Returns the SDL comaptible GUID of the specified joystick. - * - * This function returns the SDL compatible GUID, as a UTF-8 encoded - * hexadecimal string, of the specified joystick. The returned string is - * allocated and freed by GLFW. You should not free it yourself. - * - * The GUID is what connects a joystick to a gamepad mapping. A connected - * joystick will always have a GUID even if there is no gamepad mapping - * assigned to it. - * - * If the specified joystick is not present this function will return `NULL` - * but will not generate an error. This can be used instead of first calling - * @ref glfwJoystickPresent. - * - * The GUID uses the format introduced in SDL 2.0.5. This GUID tries to - * uniquely identify the make and model of a joystick but does not identify - * a specific unit, e.g. all wired Xbox 360 controllers will have the same - * GUID on that platform. The GUID for a unit may vary between platforms - * depending on what hardware information the platform specific APIs provide. - * - * @param[in] jid The [joystick](@ref joysticks) to query. - * @return The UTF-8 encoded GUID of the joystick, or `NULL` if the joystick - * is not present or an [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The returned string is allocated and freed by GLFW. You - * should not free it yourself. It is valid until the specified joystick is - * disconnected or the library is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref gamepad - * - * @since Added in version 3.3. - * - * @ingroup input - */ -GLFWAPI const char* glfwGetJoystickGUID(int jid); - -/*! @brief Sets the user pointer of the specified joystick. - * - * This function sets the user-defined pointer of the specified joystick. The - * current value is retained until the joystick is disconnected. The initial - * value is `NULL`. - * - * This function may be called from the joystick callback, even for a joystick - * that is being disconnected. - * - * @param[in] jid The joystick whose pointer to set. - * @param[in] pointer The new value. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @sa @ref joystick_userptr - * @sa @ref glfwGetJoystickUserPointer - * - * @since Added in version 3.3. - * - * @ingroup input - */ -GLFWAPI void glfwSetJoystickUserPointer(int jid, void* pointer); - -/*! @brief Returns the user pointer of the specified joystick. - * - * This function returns the current value of the user-defined pointer of the - * specified joystick. The initial value is `NULL`. - * - * This function may be called from the joystick callback, even for a joystick - * that is being disconnected. - * - * @param[in] jid The joystick whose pointer to return. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @sa @ref joystick_userptr - * @sa @ref glfwSetJoystickUserPointer - * - * @since Added in version 3.3. - * - * @ingroup input - */ -GLFWAPI void* glfwGetJoystickUserPointer(int jid); - -/*! @brief Returns whether the specified joystick has a gamepad mapping. - * - * This function returns whether the specified joystick is both present and has - * a gamepad mapping. - * - * If the specified joystick is present but does not have a gamepad mapping - * this function will return `GLFW_FALSE` but will not generate an error. Call - * @ref glfwJoystickPresent to check if a joystick is present regardless of - * whether it has a mapping. - * - * @param[in] jid The [joystick](@ref joysticks) to query. - * @return `GLFW_TRUE` if a joystick is both present and has a gamepad mapping, - * or `GLFW_FALSE` otherwise. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_INVALID_ENUM. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref gamepad - * @sa @ref glfwGetGamepadState - * - * @since Added in version 3.3. - * - * @ingroup input - */ -GLFWAPI int glfwJoystickIsGamepad(int jid); - -/*! @brief Sets the joystick configuration callback. - * - * This function sets the joystick configuration callback, or removes the - * currently set callback. This is called when a joystick is connected to or - * disconnected from the system. - * - * For joystick connection and disconnection events to be delivered on all - * platforms, you need to call one of the [event processing](@ref events) - * functions. Joystick disconnection may also be detected and the callback - * called by joystick functions. The function will then return whatever it - * returns if the joystick is not present. - * - * @param[in] cbfun The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref joystick_event - * - * @since Added in version 3.2. - * - * @ingroup input - */ -GLFWAPI GLFWjoystickfun glfwSetJoystickCallback(GLFWjoystickfun cbfun); - -/*! @brief Adds the specified SDL_GameControllerDB gamepad mappings. - * - * This function parses the specified ASCII encoded string and updates the - * internal list with any gamepad mappings it finds. This string may - * contain either a single gamepad mapping or many mappings separated by - * newlines. The parser supports the full format of the `gamecontrollerdb.txt` - * source file including empty lines and comments. - * - * See @ref gamepad_mapping for a description of the format. - * - * If there is already a gamepad mapping for a given GUID in the internal list, - * it will be replaced by the one passed to this function. If the library is - * terminated and re-initialized the internal list will revert to the built-in - * default. - * - * @param[in] string The string containing the gamepad mappings. - * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_INVALID_VALUE. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref gamepad - * @sa @ref glfwJoystickIsGamepad - * @sa @ref glfwGetGamepadName - * - * @since Added in version 3.3. - * - * @ingroup input - */ -GLFWAPI int glfwUpdateGamepadMappings(const char* string); - -/*! @brief Returns the human-readable gamepad name for the specified joystick. - * - * This function returns the human-readable name of the gamepad from the - * gamepad mapping assigned to the specified joystick. - * - * If the specified joystick is not present or does not have a gamepad mapping - * this function will return `NULL` but will not generate an error. Call - * @ref glfwJoystickPresent to check whether it is present regardless of - * whether it has a mapping. - * - * @param[in] jid The [joystick](@ref joysticks) to query. - * @return The UTF-8 encoded name of the gamepad, or `NULL` if the - * joystick is not present, does not have a mapping or an - * [error](@ref error_handling) occurred. - * - * @pointer_lifetime The returned string is allocated and freed by GLFW. You - * should not free it yourself. It is valid until the specified joystick is - * disconnected, the gamepad mappings are updated or the library is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref gamepad - * @sa @ref glfwJoystickIsGamepad - * - * @since Added in version 3.3. - * - * @ingroup input - */ -GLFWAPI const char* glfwGetGamepadName(int jid); - -/*! @brief Retrieves the state of the specified joystick remapped as a gamepad. - * - * This function retrives the state of the specified joystick remapped to - * an Xbox-like gamepad. - * - * If the specified joystick is not present or does not have a gamepad mapping - * this function will return `GLFW_FALSE` but will not generate an error. Call - * @ref glfwJoystickPresent to check whether it is present regardless of - * whether it has a mapping. - * - * The Guide button may not be available for input as it is often hooked by the - * system or the Steam client. - * - * Not all devices have all the buttons or axes provided by @ref - * GLFWgamepadstate. Unavailable buttons and axes will always report - * `GLFW_RELEASE` and 0.0 respectively. - * - * @param[in] jid The [joystick](@ref joysticks) to query. - * @param[out] state The gamepad input state of the joystick. - * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if no joystick is - * connected, it has no gamepad mapping or an [error](@ref error_handling) - * occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_INVALID_ENUM. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref gamepad - * @sa @ref glfwUpdateGamepadMappings - * @sa @ref glfwJoystickIsGamepad - * - * @since Added in version 3.3. - * - * @ingroup input - */ -GLFWAPI int glfwGetGamepadState(int jid, GLFWgamepadstate* state); - -/*! @brief Sets the clipboard to the specified string. - * - * This function sets the system clipboard to the specified, UTF-8 encoded - * string. - * - * @param[in] window Deprecated. Any valid window or `NULL`. - * @param[in] string A UTF-8 encoded string. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark @wayland Clipboard is currently unimplemented. - * - * @pointer_lifetime The specified string is copied before this function - * returns. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref clipboard - * @sa @ref glfwGetClipboardString - * - * @since Added in version 3.0. - * - * @ingroup input - */ -GLFWAPI void glfwSetClipboardString(GLFWwindow* window, const char* string); - -/*! @brief Returns the contents of the clipboard as a string. - * - * This function returns the contents of the system clipboard, if it contains - * or is convertible to a UTF-8 encoded string. If the clipboard is empty or - * if its contents cannot be converted, `NULL` is returned and a @ref - * GLFW_FORMAT_UNAVAILABLE error is generated. - * - * @param[in] window Deprecated. Any valid window or `NULL`. - * @return The contents of the clipboard as a UTF-8 encoded string, or `NULL` - * if an [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark @wayland Clipboard is currently unimplemented. - * - * @pointer_lifetime The returned string is allocated and freed by GLFW. You - * should not free it yourself. It is valid until the next call to @ref - * glfwGetClipboardString or @ref glfwSetClipboardString, or until the library - * is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref clipboard - * @sa @ref glfwSetClipboardString - * - * @since Added in version 3.0. - * - * @ingroup input - */ -GLFWAPI const char* glfwGetClipboardString(GLFWwindow* window); - -/*! @brief Returns the value of the GLFW timer. - * - * This function returns the value of the GLFW timer. Unless the timer has - * been set using @ref glfwSetTime, the timer measures time elapsed since GLFW - * was initialized. - * - * The resolution of the timer is system dependent, but is usually on the order - * of a few micro- or nanoseconds. It uses the highest-resolution monotonic - * time source on each supported platform. - * - * @return The current value, in seconds, or zero if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. Reading and - * writing of the internal timer offset is not atomic, so it needs to be - * externally synchronized with calls to @ref glfwSetTime. - * - * @sa @ref time - * - * @since Added in version 1.0. - * - * @ingroup input - */ -GLFWAPI double glfwGetTime(void); - -/*! @brief Sets the GLFW timer. - * - * This function sets the value of the GLFW timer. It then continues to count - * up from that value. The value must be a positive finite number less than - * or equal to 18446744073.0, which is approximately 584.5 years. - * - * @param[in] time The new value, in seconds. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_INVALID_VALUE. - * - * @remark The upper limit of the timer is calculated as - * floor((264 - 1) / 109) and is due to implementations - * storing nanoseconds in 64 bits. The limit may be increased in the future. - * - * @thread_safety This function may be called from any thread. Reading and - * writing of the internal timer offset is not atomic, so it needs to be - * externally synchronized with calls to @ref glfwGetTime. - * - * @sa @ref time - * - * @since Added in version 2.2. - * - * @ingroup input - */ -GLFWAPI void glfwSetTime(double time); - -/*! @brief Returns the current value of the raw timer. - * - * This function returns the current value of the raw timer, measured in - * 1 / frequency seconds. To get the frequency, call @ref - * glfwGetTimerFrequency. - * - * @return The value of the timer, or zero if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref time - * @sa @ref glfwGetTimerFrequency - * - * @since Added in version 3.2. - * - * @ingroup input - */ -GLFWAPI uint64_t glfwGetTimerValue(void); - -/*! @brief Returns the frequency, in Hz, of the raw timer. - * - * This function returns the frequency, in Hz, of the raw timer. - * - * @return The frequency of the timer, in Hz, or zero if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref time - * @sa @ref glfwGetTimerValue - * - * @since Added in version 3.2. - * - * @ingroup input - */ -GLFWAPI uint64_t glfwGetTimerFrequency(void); - -/*! @brief Makes the context of the specified window current for the calling - * thread. - * - * This function makes the OpenGL or OpenGL ES context of the specified window - * current on the calling thread. A context must only be made current on - * a single thread at a time and each thread can have only a single current - * context at a time. - * - * When moving a context between threads, you must make it non-current on the - * old thread before making it current on the new one. - * - * By default, making a context non-current implicitly forces a pipeline flush. - * On machines that support `GL_KHR_context_flush_control`, you can control - * whether a context performs this flush by setting the - * [GLFW_CONTEXT_RELEASE_BEHAVIOR](@ref GLFW_CONTEXT_RELEASE_BEHAVIOR_hint) - * hint. - * - * The specified window must have an OpenGL or OpenGL ES context. Specifying - * a window without a context will generate a @ref GLFW_NO_WINDOW_CONTEXT - * error. - * - * @param[in] window The window whose context to make current, or `NULL` to - * detach the current context. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref context_current - * @sa @ref glfwGetCurrentContext - * - * @since Added in version 3.0. - * - * @ingroup context - */ -GLFWAPI void glfwMakeContextCurrent(GLFWwindow* window); - -/*! @brief Returns the window whose context is current on the calling thread. - * - * This function returns the window whose OpenGL or OpenGL ES context is - * current on the calling thread. - * - * @return The window whose context is current, or `NULL` if no window's - * context is current. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref context_current - * @sa @ref glfwMakeContextCurrent - * - * @since Added in version 3.0. - * - * @ingroup context - */ -GLFWAPI GLFWwindow* glfwGetCurrentContext(void); - -/*! @brief Swaps the front and back buffers of the specified window. - * - * This function swaps the front and back buffers of the specified window when - * rendering with OpenGL or OpenGL ES. If the swap interval is greater than - * zero, the GPU driver waits the specified number of screen updates before - * swapping the buffers. - * - * The specified window must have an OpenGL or OpenGL ES context. Specifying - * a window without a context will generate a @ref GLFW_NO_WINDOW_CONTEXT - * error. - * - * This function does not apply to Vulkan. If you are rendering with Vulkan, - * see `vkQueuePresentKHR` instead. - * - * @param[in] window The window whose buffers to swap. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR. - * - * @remark __EGL:__ The context of the specified window must be current on the - * calling thread. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref buffer_swap - * @sa @ref glfwSwapInterval - * - * @since Added in version 1.0. - * @glfw3 Added window handle parameter. - * - * @ingroup window - */ -GLFWAPI void glfwSwapBuffers(GLFWwindow* window); - -/*! @brief Sets the swap interval for the current context. - * - * This function sets the swap interval for the current OpenGL or OpenGL ES - * context, i.e. the number of screen updates to wait from the time @ref - * glfwSwapBuffers was called before swapping the buffers and returning. This - * is sometimes called _vertical synchronization_, _vertical retrace - * synchronization_ or just _vsync_. - * - * A context that supports either of the `WGL_EXT_swap_control_tear` and - * `GLX_EXT_swap_control_tear` extensions also accepts _negative_ swap - * intervals, which allows the driver to swap immediately even if a frame - * arrives a little bit late. You can check for these extensions with @ref - * glfwExtensionSupported. - * - * A context must be current on the calling thread. Calling this function - * without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error. - * - * This function does not apply to Vulkan. If you are rendering with Vulkan, - * see the present mode of your swapchain instead. - * - * @param[in] interval The minimum number of screen updates to wait for - * until the buffers are swapped by @ref glfwSwapBuffers. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_NO_CURRENT_CONTEXT and @ref GLFW_PLATFORM_ERROR. - * - * @remark This function is not called during context creation, leaving the - * swap interval set to whatever is the default on that platform. This is done - * because some swap interval extensions used by GLFW do not allow the swap - * interval to be reset to zero once it has been set to a non-zero value. - * - * @remark Some GPU drivers do not honor the requested swap interval, either - * because of a user setting that overrides the application's request or due to - * bugs in the driver. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref buffer_swap - * @sa @ref glfwSwapBuffers - * - * @since Added in version 1.0. - * - * @ingroup context - */ -GLFWAPI void glfwSwapInterval(int interval); - -/*! @brief Returns whether the specified extension is available. - * - * This function returns whether the specified - * [API extension](@ref context_glext) is supported by the current OpenGL or - * OpenGL ES context. It searches both for client API extension and context - * creation API extensions. - * - * A context must be current on the calling thread. Calling this function - * without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error. - * - * As this functions retrieves and searches one or more extension strings each - * call, it is recommended that you cache its results if it is going to be used - * frequently. The extension strings will not change during the lifetime of - * a context, so there is no danger in doing this. - * - * This function does not apply to Vulkan. If you are using Vulkan, see @ref - * glfwGetRequiredInstanceExtensions, `vkEnumerateInstanceExtensionProperties` - * and `vkEnumerateDeviceExtensionProperties` instead. - * - * @param[in] extension The ASCII encoded name of the extension. - * @return `GLFW_TRUE` if the extension is available, or `GLFW_FALSE` - * otherwise. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_NO_CURRENT_CONTEXT, @ref GLFW_INVALID_VALUE and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref context_glext - * @sa @ref glfwGetProcAddress - * - * @since Added in version 1.0. - * - * @ingroup context - */ -GLFWAPI int glfwExtensionSupported(const char* extension); - -/*! @brief Returns the address of the specified function for the current - * context. - * - * This function returns the address of the specified OpenGL or OpenGL ES - * [core or extension function](@ref context_glext), if it is supported - * by the current context. - * - * A context must be current on the calling thread. Calling this function - * without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error. - * - * This function does not apply to Vulkan. If you are rendering with Vulkan, - * see @ref glfwGetInstanceProcAddress, `vkGetInstanceProcAddr` and - * `vkGetDeviceProcAddr` instead. - * - * @param[in] procname The ASCII encoded name of the function. - * @return The address of the function, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_NO_CURRENT_CONTEXT and @ref GLFW_PLATFORM_ERROR. - * - * @remark The address of a given function is not guaranteed to be the same - * between contexts. - * - * @remark This function may return a non-`NULL` address despite the - * associated version or extension not being available. Always check the - * context version or extension string first. - * - * @pointer_lifetime The returned function pointer is valid until the context - * is destroyed or the library is terminated. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref context_glext - * @sa @ref glfwExtensionSupported - * - * @since Added in version 1.0. - * - * @ingroup context - */ -GLFWAPI GLFWglproc glfwGetProcAddress(const char* procname); - -/*! @brief Returns whether the Vulkan loader and an ICD have been found. - * - * This function returns whether the Vulkan loader and any minimally functional - * ICD have been found. - * - * The availability of a Vulkan loader and even an ICD does not by itself - * guarantee that surface creation or even instance creation is possible. - * For example, on Fermi systems Nvidia will install an ICD that provides no - * actual Vulkan support. Call @ref glfwGetRequiredInstanceExtensions to check - * whether the extensions necessary for Vulkan surface creation are available - * and @ref glfwGetPhysicalDevicePresentationSupport to check whether a queue - * family of a physical device supports image presentation. - * - * @return `GLFW_TRUE` if Vulkan is minimally available, or `GLFW_FALSE` - * otherwise. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref vulkan_support - * - * @since Added in version 3.2. - * - * @ingroup vulkan - */ -GLFWAPI int glfwVulkanSupported(void); - -/*! @brief Returns the Vulkan instance extensions required by GLFW. - * - * This function returns an array of names of Vulkan instance extensions required - * by GLFW for creating Vulkan surfaces for GLFW windows. If successful, the - * list will always contains `VK_KHR_surface`, so if you don't require any - * additional extensions you can pass this list directly to the - * `VkInstanceCreateInfo` struct. - * - * If Vulkan is not available on the machine, this function returns `NULL` and - * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported - * to check whether Vulkan is at least minimally available. - * - * If Vulkan is available but no set of extensions allowing window surface - * creation was found, this function returns `NULL`. You may still use Vulkan - * for off-screen rendering and compute work. - * - * @param[out] count Where to store the number of extensions in the returned - * array. This is set to zero if an error occurred. - * @return An array of ASCII encoded extension names, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_API_UNAVAILABLE. - * - * @remark Additional extensions may be required by future versions of GLFW. - * You should check if any extensions you wish to enable are already in the - * returned array, as it is an error to specify an extension more than once in - * the `VkInstanceCreateInfo` struct. - * - * @remark @macos This function currently only supports the - * `VK_MVK_macos_surface` extension from MoltenVK. - * - * @pointer_lifetime The returned array is allocated and freed by GLFW. You - * should not free it yourself. It is guaranteed to be valid only until the - * library is terminated. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref vulkan_ext - * @sa @ref glfwCreateWindowSurface - * - * @since Added in version 3.2. - * - * @ingroup vulkan - */ -GLFWAPI const char** glfwGetRequiredInstanceExtensions(uint32_t* count); - -#if defined(VK_VERSION_1_0) - -/*! @brief Returns the address of the specified Vulkan instance function. - * - * This function returns the address of the specified Vulkan core or extension - * function for the specified instance. If instance is set to `NULL` it can - * return any function exported from the Vulkan loader, including at least the - * following functions: - * - * - `vkEnumerateInstanceExtensionProperties` - * - `vkEnumerateInstanceLayerProperties` - * - `vkCreateInstance` - * - `vkGetInstanceProcAddr` - * - * If Vulkan is not available on the machine, this function returns `NULL` and - * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported - * to check whether Vulkan is at least minimally available. - * - * This function is equivalent to calling `vkGetInstanceProcAddr` with - * a platform-specific query of the Vulkan loader as a fallback. - * - * @param[in] instance The Vulkan instance to query, or `NULL` to retrieve - * functions related to instance creation. - * @param[in] procname The ASCII encoded name of the function. - * @return The address of the function, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_API_UNAVAILABLE. - * - * @pointer_lifetime The returned function pointer is valid until the library - * is terminated. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref vulkan_proc - * - * @since Added in version 3.2. - * - * @ingroup vulkan - */ -GLFWAPI GLFWvkproc glfwGetInstanceProcAddress(VkInstance instance, const char* procname); - -/*! @brief Returns whether the specified queue family can present images. - * - * This function returns whether the specified queue family of the specified - * physical device supports presentation to the platform GLFW was built for. - * - * If Vulkan or the required window surface creation instance extensions are - * not available on the machine, or if the specified instance was not created - * with the required extensions, this function returns `GLFW_FALSE` and - * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported - * to check whether Vulkan is at least minimally available and @ref - * glfwGetRequiredInstanceExtensions to check what instance extensions are - * required. - * - * @param[in] instance The instance that the physical device belongs to. - * @param[in] device The physical device that the queue family belongs to. - * @param[in] queuefamily The index of the queue family to query. - * @return `GLFW_TRUE` if the queue family supports presentation, or - * `GLFW_FALSE` otherwise. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_API_UNAVAILABLE and @ref GLFW_PLATFORM_ERROR. - * - * @remark @macos This function currently always returns `GLFW_TRUE`, as the - * `VK_MVK_macos_surface` extension does not provide - * a `vkGetPhysicalDevice*PresentationSupport` type function. - * - * @thread_safety This function may be called from any thread. For - * synchronization details of Vulkan objects, see the Vulkan specification. - * - * @sa @ref vulkan_present - * - * @since Added in version 3.2. - * - * @ingroup vulkan - */ -GLFWAPI int glfwGetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily); - -/*! @brief Creates a Vulkan surface for the specified window. - * - * This function creates a Vulkan surface for the specified window. - * - * If the Vulkan loader or at least one minimally functional ICD were not found, - * this function returns `VK_ERROR_INITIALIZATION_FAILED` and generates a @ref - * GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported to check whether - * Vulkan is at least minimally available. - * - * If the required window surface creation instance extensions are not - * available or if the specified instance was not created with these extensions - * enabled, this function returns `VK_ERROR_EXTENSION_NOT_PRESENT` and - * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref - * glfwGetRequiredInstanceExtensions to check what instance extensions are - * required. - * - * The window surface cannot be shared with another API so the window must - * have been created with the [client api hint](@ref GLFW_CLIENT_API_attrib) - * set to `GLFW_NO_API` otherwise it generates a @ref GLFW_INVALID_VALUE error - * and returns `VK_ERROR_NATIVE_WINDOW_IN_USE_KHR`. - * - * The window surface must be destroyed before the specified Vulkan instance. - * It is the responsibility of the caller to destroy the window surface. GLFW - * does not destroy it for you. Call `vkDestroySurfaceKHR` to destroy the - * surface. - * - * @param[in] instance The Vulkan instance to create the surface in. - * @param[in] window The window to create the surface for. - * @param[in] allocator The allocator to use, or `NULL` to use the default - * allocator. - * @param[out] surface Where to store the handle of the surface. This is set - * to `VK_NULL_HANDLE` if an error occurred. - * @return `VK_SUCCESS` if successful, or a Vulkan error code if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_API_UNAVAILABLE, @ref GLFW_PLATFORM_ERROR and @ref GLFW_INVALID_VALUE - * - * @remark If an error occurs before the creation call is made, GLFW returns - * the Vulkan error code most appropriate for the error. Appropriate use of - * @ref glfwVulkanSupported and @ref glfwGetRequiredInstanceExtensions should - * eliminate almost all occurrences of these errors. - * - * @remark @macos This function currently only supports the - * `VK_MVK_macos_surface` extension from MoltenVK. - * - * @remark @macos This function creates and sets a `CAMetalLayer` instance for - * the window content view, which is required for MoltenVK to function. - * - * @thread_safety This function may be called from any thread. For - * synchronization details of Vulkan objects, see the Vulkan specification. - * - * @sa @ref vulkan_surface - * @sa @ref glfwGetRequiredInstanceExtensions - * - * @since Added in version 3.2. - * - * @ingroup vulkan - */ -GLFWAPI VkResult glfwCreateWindowSurface(VkInstance instance, GLFWwindow* window, const VkAllocationCallbacks* allocator, VkSurfaceKHR* surface); - -#endif /*VK_VERSION_1_0*/ - - -/************************************************************************* - * Global definition cleanup - *************************************************************************/ - -/* ------------------- BEGIN SYSTEM/COMPILER SPECIFIC -------------------- */ - -#ifdef GLFW_WINGDIAPI_DEFINED - #undef WINGDIAPI - #undef GLFW_WINGDIAPI_DEFINED -#endif - -#ifdef GLFW_CALLBACK_DEFINED - #undef CALLBACK - #undef GLFW_CALLBACK_DEFINED -#endif - -/* Some OpenGL related headers need GLAPIENTRY, but it is unconditionally - * defined by some gl.h variants (OpenBSD) so define it after if needed. - */ -#ifndef GLAPIENTRY - #define GLAPIENTRY APIENTRY -#endif - -/* -------------------- END SYSTEM/COMPILER SPECIFIC --------------------- */ - - -#ifdef __cplusplus -} -#endif - -#endif /* _glfw3_h_ */ - +/************************************************************************* + * GLFW 3.3 - www.glfw.org + * A library for OpenGL, window and input + *------------------------------------------------------------------------ + * Copyright (c) 2002-2006 Marcus Geelnard + * Copyright (c) 2006-2016 Camilla Löwy + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would + * be appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not + * be misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + *************************************************************************/ + +#ifndef _glfw3_h_ +#define _glfw3_h_ + +#ifdef __cplusplus +extern "C" { +#endif + + +/************************************************************************* + * Doxygen documentation + *************************************************************************/ + +/*! @file glfw3.h + * @brief The header of the GLFW 3 API. + * + * This is the header file of the GLFW 3 API. It defines all its types and + * declares all its functions. + * + * For more information about how to use this file, see @ref build_include. + */ +/*! @defgroup context Context reference + * @brief Functions and types related to OpenGL and OpenGL ES contexts. + * + * This is the reference documentation for OpenGL and OpenGL ES context related + * functions. For more task-oriented information, see the @ref context_guide. + */ +/*! @defgroup vulkan Vulkan reference + * @brief Functions and types related to Vulkan. + * + * This is the reference documentation for Vulkan related functions and types. + * For more task-oriented information, see the @ref vulkan_guide. + */ +/*! @defgroup init Initialization, version and error reference + * @brief Functions and types related to initialization and error handling. + * + * This is the reference documentation for initialization and termination of + * the library, version management and error handling. For more task-oriented + * information, see the @ref intro_guide. + */ +/*! @defgroup input Input reference + * @brief Functions and types related to input handling. + * + * This is the reference documentation for input related functions and types. + * For more task-oriented information, see the @ref input_guide. + */ +/*! @defgroup monitor Monitor reference + * @brief Functions and types related to monitors. + * + * This is the reference documentation for monitor related functions and types. + * For more task-oriented information, see the @ref monitor_guide. + */ +/*! @defgroup window Window reference + * @brief Functions and types related to windows. + * + * This is the reference documentation for window related functions and types, + * including creation, deletion and event polling. For more task-oriented + * information, see the @ref window_guide. + */ + + +/************************************************************************* + * Compiler- and platform-specific preprocessor work + *************************************************************************/ + +/* If we are we on Windows, we want a single define for it. + */ +#if !defined(_WIN32) && (defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__)) + #define _WIN32 +#endif /* _WIN32 */ + +/* It is customary to use APIENTRY for OpenGL function pointer declarations on + * all platforms. Additionally, the Windows OpenGL header needs APIENTRY. + */ +#ifndef APIENTRY + #ifdef _WIN32 + #define APIENTRY __stdcall + #else + #define APIENTRY + #endif + #define GLFW_APIENTRY_DEFINED +#endif /* APIENTRY */ + +/* Some Windows OpenGL headers need this. + */ +#if !defined(WINGDIAPI) && defined(_WIN32) + #define WINGDIAPI __declspec(dllimport) + #define GLFW_WINGDIAPI_DEFINED +#endif /* WINGDIAPI */ + +/* Some Windows GLU headers need this. + */ +#if !defined(CALLBACK) && defined(_WIN32) + #define CALLBACK __stdcall + #define GLFW_CALLBACK_DEFINED +#endif /* CALLBACK */ + +/* Include because most Windows GLU headers need wchar_t and + * the macOS OpenGL header blocks the definition of ptrdiff_t by glext.h. + * Include it unconditionally to avoid surprising side-effects. + */ +#include + +/* Include because it is needed by Vulkan and related functions. + * Include it unconditionally to avoid surprising side-effects. + */ +#include + +/* Include the chosen OpenGL or OpenGL ES headers. + */ +#if defined(GLFW_INCLUDE_ES1) + + #include + #if defined(GLFW_INCLUDE_GLEXT) + #include + #endif + +#elif defined(GLFW_INCLUDE_ES2) + + #include + #if defined(GLFW_INCLUDE_GLEXT) + #include + #endif + +#elif defined(GLFW_INCLUDE_ES3) + + #include + #if defined(GLFW_INCLUDE_GLEXT) + #include + #endif + +#elif defined(GLFW_INCLUDE_ES31) + + #include + #if defined(GLFW_INCLUDE_GLEXT) + #include + #endif + +#elif defined(GLFW_INCLUDE_ES32) + + #include + #if defined(GLFW_INCLUDE_GLEXT) + #include + #endif + +#elif defined(GLFW_INCLUDE_GLCOREARB) + + #if defined(__APPLE__) + + #include + #if defined(GLFW_INCLUDE_GLEXT) + #include + #endif /*GLFW_INCLUDE_GLEXT*/ + + #else /*__APPLE__*/ + + #include + + #endif /*__APPLE__*/ + +#elif !defined(GLFW_INCLUDE_NONE) + + #if defined(__APPLE__) + + #if !defined(GLFW_INCLUDE_GLEXT) + #define GL_GLEXT_LEGACY + #endif + #include + #if defined(GLFW_INCLUDE_GLU) + #include + #endif + + #else /*__APPLE__*/ + + #include + #if defined(GLFW_INCLUDE_GLEXT) + #include + #endif + #if defined(GLFW_INCLUDE_GLU) + #include + #endif + + #endif /*__APPLE__*/ + +#endif /* OpenGL and OpenGL ES headers */ + +#if defined(GLFW_INCLUDE_VULKAN) + #include +#endif /* Vulkan header */ + +#if defined(GLFW_DLL) && defined(_GLFW_BUILD_DLL) + /* GLFW_DLL must be defined by applications that are linking against the DLL + * version of the GLFW library. _GLFW_BUILD_DLL is defined by the GLFW + * configuration header when compiling the DLL version of the library. + */ + #error "You must not have both GLFW_DLL and _GLFW_BUILD_DLL defined" +#endif + +/* GLFWAPI is used to declare public API functions for export + * from the DLL / shared library / dynamic library. + */ +#if defined(_WIN32) && defined(_GLFW_BUILD_DLL) + /* We are building GLFW as a Win32 DLL */ + #define GLFWAPI __declspec(dllexport) +#elif defined(_WIN32) && defined(GLFW_DLL) + /* We are calling GLFW as a Win32 DLL */ + #define GLFWAPI __declspec(dllimport) +#elif defined(__GNUC__) && defined(_GLFW_BUILD_DLL) + /* We are building GLFW as a shared / dynamic library */ + #define GLFWAPI __attribute__((visibility("default"))) +#else + /* We are building or calling GLFW as a static library */ + #define GLFWAPI +#endif + + +/************************************************************************* + * GLFW API tokens + *************************************************************************/ + +/*! @name GLFW version macros + * @{ */ +/*! @brief The major version number of the GLFW library. + * + * This is incremented when the API is changed in non-compatible ways. + * @ingroup init + */ +#define GLFW_VERSION_MAJOR 3 +/*! @brief The minor version number of the GLFW library. + * + * This is incremented when features are added to the API but it remains + * backward-compatible. + * @ingroup init + */ +#define GLFW_VERSION_MINOR 3 +/*! @brief The revision number of the GLFW library. + * + * This is incremented when a bug fix release is made that does not contain any + * API changes. + * @ingroup init + */ +#define GLFW_VERSION_REVISION 0 +/*! @} */ + +/*! @name Boolean values + * @{ */ +/*! @brief One. + * + * One. Seriously. You don't _need_ to use this symbol in your code. It's + * semantic sugar for the number 1. You can also use `1` or `true` or `_True` + * or `GL_TRUE` or whatever you want. + */ +#define GLFW_TRUE 1 +/*! @brief Zero. + * + * Zero. Seriously. You don't _need_ to use this symbol in your code. It's + * semantic sugar for the number 0. You can also use `0` or `false` or + * `_False` or `GL_FALSE` or whatever you want. + */ +#define GLFW_FALSE 0 +/*! @} */ + +/*! @name Key and button actions + * @{ */ +/*! @brief The key or mouse button was released. + * + * The key or mouse button was released. + * + * @ingroup input + */ +#define GLFW_RELEASE 0 +/*! @brief The key or mouse button was pressed. + * + * The key or mouse button was pressed. + * + * @ingroup input + */ +#define GLFW_PRESS 1 +/*! @brief The key was held down until it repeated. + * + * The key was held down until it repeated. + * + * @ingroup input + */ +#define GLFW_REPEAT 2 +/*! @} */ + +/*! @defgroup hat_state Joystick hat states + * + * See [joystick hat input](@ref joystick_hat) for how these are used. + * + * @ingroup input + * @{ */ +#define GLFW_HAT_CENTERED 0 +#define GLFW_HAT_UP 1 +#define GLFW_HAT_RIGHT 2 +#define GLFW_HAT_DOWN 4 +#define GLFW_HAT_LEFT 8 +#define GLFW_HAT_RIGHT_UP (GLFW_HAT_RIGHT | GLFW_HAT_UP) +#define GLFW_HAT_RIGHT_DOWN (GLFW_HAT_RIGHT | GLFW_HAT_DOWN) +#define GLFW_HAT_LEFT_UP (GLFW_HAT_LEFT | GLFW_HAT_UP) +#define GLFW_HAT_LEFT_DOWN (GLFW_HAT_LEFT | GLFW_HAT_DOWN) +/*! @} */ + +/*! @defgroup keys Keyboard keys + * @brief Keyboard key IDs. + * + * See [key input](@ref input_key) for how these are used. + * + * These key codes are inspired by the _USB HID Usage Tables v1.12_ (p. 53-60), + * but re-arranged to map to 7-bit ASCII for printable keys (function keys are + * put in the 256+ range). + * + * The naming of the key codes follow these rules: + * - The US keyboard layout is used + * - Names of printable alpha-numeric characters are used (e.g. "A", "R", + * "3", etc.) + * - For non-alphanumeric characters, Unicode:ish names are used (e.g. + * "COMMA", "LEFT_SQUARE_BRACKET", etc.). Note that some names do not + * correspond to the Unicode standard (usually for brevity) + * - Keys that lack a clear US mapping are named "WORLD_x" + * - For non-printable keys, custom names are used (e.g. "F4", + * "BACKSPACE", etc.) + * + * @ingroup input + * @{ + */ + +/* The unknown key */ +#define GLFW_KEY_UNKNOWN -1 + +/* Printable keys */ +#define GLFW_KEY_SPACE 32 +#define GLFW_KEY_APOSTROPHE 39 /* ' */ +#define GLFW_KEY_COMMA 44 /* , */ +#define GLFW_KEY_MINUS 45 /* - */ +#define GLFW_KEY_PERIOD 46 /* . */ +#define GLFW_KEY_SLASH 47 /* / */ +#define GLFW_KEY_0 48 +#define GLFW_KEY_1 49 +#define GLFW_KEY_2 50 +#define GLFW_KEY_3 51 +#define GLFW_KEY_4 52 +#define GLFW_KEY_5 53 +#define GLFW_KEY_6 54 +#define GLFW_KEY_7 55 +#define GLFW_KEY_8 56 +#define GLFW_KEY_9 57 +#define GLFW_KEY_SEMICOLON 59 /* ; */ +#define GLFW_KEY_EQUAL 61 /* = */ +#define GLFW_KEY_A 65 +#define GLFW_KEY_B 66 +#define GLFW_KEY_C 67 +#define GLFW_KEY_D 68 +#define GLFW_KEY_E 69 +#define GLFW_KEY_F 70 +#define GLFW_KEY_G 71 +#define GLFW_KEY_H 72 +#define GLFW_KEY_I 73 +#define GLFW_KEY_J 74 +#define GLFW_KEY_K 75 +#define GLFW_KEY_L 76 +#define GLFW_KEY_M 77 +#define GLFW_KEY_N 78 +#define GLFW_KEY_O 79 +#define GLFW_KEY_P 80 +#define GLFW_KEY_Q 81 +#define GLFW_KEY_R 82 +#define GLFW_KEY_S 83 +#define GLFW_KEY_T 84 +#define GLFW_KEY_U 85 +#define GLFW_KEY_V 86 +#define GLFW_KEY_W 87 +#define GLFW_KEY_X 88 +#define GLFW_KEY_Y 89 +#define GLFW_KEY_Z 90 +#define GLFW_KEY_LEFT_BRACKET 91 /* [ */ +#define GLFW_KEY_BACKSLASH 92 /* \ */ +#define GLFW_KEY_RIGHT_BRACKET 93 /* ] */ +#define GLFW_KEY_GRAVE_ACCENT 96 /* ` */ +#define GLFW_KEY_WORLD_1 161 /* non-US #1 */ +#define GLFW_KEY_WORLD_2 162 /* non-US #2 */ + +/* Function keys */ +#define GLFW_KEY_ESCAPE 256 +#define GLFW_KEY_ENTER 257 +#define GLFW_KEY_TAB 258 +#define GLFW_KEY_BACKSPACE 259 +#define GLFW_KEY_INSERT 260 +#define GLFW_KEY_DELETE 261 +#define GLFW_KEY_RIGHT 262 +#define GLFW_KEY_LEFT 263 +#define GLFW_KEY_DOWN 264 +#define GLFW_KEY_UP 265 +#define GLFW_KEY_PAGE_UP 266 +#define GLFW_KEY_PAGE_DOWN 267 +#define GLFW_KEY_HOME 268 +#define GLFW_KEY_END 269 +#define GLFW_KEY_CAPS_LOCK 280 +#define GLFW_KEY_SCROLL_LOCK 281 +#define GLFW_KEY_NUM_LOCK 282 +#define GLFW_KEY_PRINT_SCREEN 283 +#define GLFW_KEY_PAUSE 284 +#define GLFW_KEY_F1 290 +#define GLFW_KEY_F2 291 +#define GLFW_KEY_F3 292 +#define GLFW_KEY_F4 293 +#define GLFW_KEY_F5 294 +#define GLFW_KEY_F6 295 +#define GLFW_KEY_F7 296 +#define GLFW_KEY_F8 297 +#define GLFW_KEY_F9 298 +#define GLFW_KEY_F10 299 +#define GLFW_KEY_F11 300 +#define GLFW_KEY_F12 301 +#define GLFW_KEY_F13 302 +#define GLFW_KEY_F14 303 +#define GLFW_KEY_F15 304 +#define GLFW_KEY_F16 305 +#define GLFW_KEY_F17 306 +#define GLFW_KEY_F18 307 +#define GLFW_KEY_F19 308 +#define GLFW_KEY_F20 309 +#define GLFW_KEY_F21 310 +#define GLFW_KEY_F22 311 +#define GLFW_KEY_F23 312 +#define GLFW_KEY_F24 313 +#define GLFW_KEY_F25 314 +#define GLFW_KEY_KP_0 320 +#define GLFW_KEY_KP_1 321 +#define GLFW_KEY_KP_2 322 +#define GLFW_KEY_KP_3 323 +#define GLFW_KEY_KP_4 324 +#define GLFW_KEY_KP_5 325 +#define GLFW_KEY_KP_6 326 +#define GLFW_KEY_KP_7 327 +#define GLFW_KEY_KP_8 328 +#define GLFW_KEY_KP_9 329 +#define GLFW_KEY_KP_DECIMAL 330 +#define GLFW_KEY_KP_DIVIDE 331 +#define GLFW_KEY_KP_MULTIPLY 332 +#define GLFW_KEY_KP_SUBTRACT 333 +#define GLFW_KEY_KP_ADD 334 +#define GLFW_KEY_KP_ENTER 335 +#define GLFW_KEY_KP_EQUAL 336 +#define GLFW_KEY_LEFT_SHIFT 340 +#define GLFW_KEY_LEFT_CONTROL 341 +#define GLFW_KEY_LEFT_ALT 342 +#define GLFW_KEY_LEFT_SUPER 343 +#define GLFW_KEY_RIGHT_SHIFT 344 +#define GLFW_KEY_RIGHT_CONTROL 345 +#define GLFW_KEY_RIGHT_ALT 346 +#define GLFW_KEY_RIGHT_SUPER 347 +#define GLFW_KEY_MENU 348 + +#define GLFW_KEY_LAST GLFW_KEY_MENU + +/*! @} */ + +/*! @defgroup mods Modifier key flags + * @brief Modifier key flags. + * + * See [key input](@ref input_key) for how these are used. + * + * @ingroup input + * @{ */ + +/*! @brief If this bit is set one or more Shift keys were held down. + * + * If this bit is set one or more Shift keys were held down. + */ +#define GLFW_MOD_SHIFT 0x0001 +/*! @brief If this bit is set one or more Control keys were held down. + * + * If this bit is set one or more Control keys were held down. + */ +#define GLFW_MOD_CONTROL 0x0002 +/*! @brief If this bit is set one or more Alt keys were held down. + * + * If this bit is set one or more Alt keys were held down. + */ +#define GLFW_MOD_ALT 0x0004 +/*! @brief If this bit is set one or more Super keys were held down. + * + * If this bit is set one or more Super keys were held down. + */ +#define GLFW_MOD_SUPER 0x0008 +/*! @brief If this bit is set the Caps Lock key is enabled. + * + * If this bit is set the Caps Lock key is enabled and the @ref + * GLFW_LOCK_KEY_MODS input mode is set. + */ +#define GLFW_MOD_CAPS_LOCK 0x0010 +/*! @brief If this bit is set the Num Lock key is enabled. + * + * If this bit is set the Num Lock key is enabled and the @ref + * GLFW_LOCK_KEY_MODS input mode is set. + */ +#define GLFW_MOD_NUM_LOCK 0x0020 + +/*! @} */ + +/*! @defgroup buttons Mouse buttons + * @brief Mouse button IDs. + * + * See [mouse button input](@ref input_mouse_button) for how these are used. + * + * @ingroup input + * @{ */ +#define GLFW_MOUSE_BUTTON_1 0 +#define GLFW_MOUSE_BUTTON_2 1 +#define GLFW_MOUSE_BUTTON_3 2 +#define GLFW_MOUSE_BUTTON_4 3 +#define GLFW_MOUSE_BUTTON_5 4 +#define GLFW_MOUSE_BUTTON_6 5 +#define GLFW_MOUSE_BUTTON_7 6 +#define GLFW_MOUSE_BUTTON_8 7 +#define GLFW_MOUSE_BUTTON_LAST GLFW_MOUSE_BUTTON_8 +#define GLFW_MOUSE_BUTTON_LEFT GLFW_MOUSE_BUTTON_1 +#define GLFW_MOUSE_BUTTON_RIGHT GLFW_MOUSE_BUTTON_2 +#define GLFW_MOUSE_BUTTON_MIDDLE GLFW_MOUSE_BUTTON_3 +/*! @} */ + +/*! @defgroup joysticks Joysticks + * @brief Joystick IDs. + * + * See [joystick input](@ref joystick) for how these are used. + * + * @ingroup input + * @{ */ +#define GLFW_JOYSTICK_1 0 +#define GLFW_JOYSTICK_2 1 +#define GLFW_JOYSTICK_3 2 +#define GLFW_JOYSTICK_4 3 +#define GLFW_JOYSTICK_5 4 +#define GLFW_JOYSTICK_6 5 +#define GLFW_JOYSTICK_7 6 +#define GLFW_JOYSTICK_8 7 +#define GLFW_JOYSTICK_9 8 +#define GLFW_JOYSTICK_10 9 +#define GLFW_JOYSTICK_11 10 +#define GLFW_JOYSTICK_12 11 +#define GLFW_JOYSTICK_13 12 +#define GLFW_JOYSTICK_14 13 +#define GLFW_JOYSTICK_15 14 +#define GLFW_JOYSTICK_16 15 +#define GLFW_JOYSTICK_LAST GLFW_JOYSTICK_16 +/*! @} */ + +/*! @defgroup gamepad_buttons Gamepad buttons + * @brief Gamepad buttons. + * + * See @ref gamepad for how these are used. + * + * @ingroup input + * @{ */ +#define GLFW_GAMEPAD_BUTTON_A 0 +#define GLFW_GAMEPAD_BUTTON_B 1 +#define GLFW_GAMEPAD_BUTTON_X 2 +#define GLFW_GAMEPAD_BUTTON_Y 3 +#define GLFW_GAMEPAD_BUTTON_LEFT_BUMPER 4 +#define GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER 5 +#define GLFW_GAMEPAD_BUTTON_BACK 6 +#define GLFW_GAMEPAD_BUTTON_START 7 +#define GLFW_GAMEPAD_BUTTON_GUIDE 8 +#define GLFW_GAMEPAD_BUTTON_LEFT_THUMB 9 +#define GLFW_GAMEPAD_BUTTON_RIGHT_THUMB 10 +#define GLFW_GAMEPAD_BUTTON_DPAD_UP 11 +#define GLFW_GAMEPAD_BUTTON_DPAD_RIGHT 12 +#define GLFW_GAMEPAD_BUTTON_DPAD_DOWN 13 +#define GLFW_GAMEPAD_BUTTON_DPAD_LEFT 14 +#define GLFW_GAMEPAD_BUTTON_LAST GLFW_GAMEPAD_BUTTON_DPAD_LEFT + +#define GLFW_GAMEPAD_BUTTON_CROSS GLFW_GAMEPAD_BUTTON_A +#define GLFW_GAMEPAD_BUTTON_CIRCLE GLFW_GAMEPAD_BUTTON_B +#define GLFW_GAMEPAD_BUTTON_SQUARE GLFW_GAMEPAD_BUTTON_X +#define GLFW_GAMEPAD_BUTTON_TRIANGLE GLFW_GAMEPAD_BUTTON_Y +/*! @} */ + +/*! @defgroup gamepad_axes Gamepad axes + * @brief Gamepad axes. + * + * See @ref gamepad for how these are used. + * + * @ingroup input + * @{ */ +#define GLFW_GAMEPAD_AXIS_LEFT_X 0 +#define GLFW_GAMEPAD_AXIS_LEFT_Y 1 +#define GLFW_GAMEPAD_AXIS_RIGHT_X 2 +#define GLFW_GAMEPAD_AXIS_RIGHT_Y 3 +#define GLFW_GAMEPAD_AXIS_LEFT_TRIGGER 4 +#define GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER 5 +#define GLFW_GAMEPAD_AXIS_LAST GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER +/*! @} */ + +/*! @defgroup errors Error codes + * @brief Error codes. + * + * See [error handling](@ref error_handling) for how these are used. + * + * @ingroup init + * @{ */ +/*! @brief No error has occurred. + * + * No error has occurred. + * + * @analysis Yay. + */ +#define GLFW_NO_ERROR 0 +/*! @brief GLFW has not been initialized. + * + * This occurs if a GLFW function was called that must not be called unless the + * library is [initialized](@ref intro_init). + * + * @analysis Application programmer error. Initialize GLFW before calling any + * function that requires initialization. + */ +#define GLFW_NOT_INITIALIZED 0x00010001 +/*! @brief No context is current for this thread. + * + * This occurs if a GLFW function was called that needs and operates on the + * current OpenGL or OpenGL ES context but no context is current on the calling + * thread. One such function is @ref glfwSwapInterval. + * + * @analysis Application programmer error. Ensure a context is current before + * calling functions that require a current context. + */ +#define GLFW_NO_CURRENT_CONTEXT 0x00010002 +/*! @brief One of the arguments to the function was an invalid enum value. + * + * One of the arguments to the function was an invalid enum value, for example + * requesting @ref GLFW_RED_BITS with @ref glfwGetWindowAttrib. + * + * @analysis Application programmer error. Fix the offending call. + */ +#define GLFW_INVALID_ENUM 0x00010003 +/*! @brief One of the arguments to the function was an invalid value. + * + * One of the arguments to the function was an invalid value, for example + * requesting a non-existent OpenGL or OpenGL ES version like 2.7. + * + * Requesting a valid but unavailable OpenGL or OpenGL ES version will instead + * result in a @ref GLFW_VERSION_UNAVAILABLE error. + * + * @analysis Application programmer error. Fix the offending call. + */ +#define GLFW_INVALID_VALUE 0x00010004 +/*! @brief A memory allocation failed. + * + * A memory allocation failed. + * + * @analysis A bug in GLFW or the underlying operating system. Report the bug + * to our [issue tracker](https://github.com/glfw/glfw/issues). + */ +#define GLFW_OUT_OF_MEMORY 0x00010005 +/*! @brief GLFW could not find support for the requested API on the system. + * + * GLFW could not find support for the requested API on the system. + * + * @analysis The installed graphics driver does not support the requested + * API, or does not support it via the chosen context creation backend. + * Below are a few examples. + * + * @par + * Some pre-installed Windows graphics drivers do not support OpenGL. AMD only + * supports OpenGL ES via EGL, while Nvidia and Intel only support it via + * a WGL or GLX extension. macOS does not provide OpenGL ES at all. The Mesa + * EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary + * driver. Older graphics drivers do not support Vulkan. + */ +#define GLFW_API_UNAVAILABLE 0x00010006 +/*! @brief The requested OpenGL or OpenGL ES version is not available. + * + * The requested OpenGL or OpenGL ES version (including any requested context + * or framebuffer hints) is not available on this machine. + * + * @analysis The machine does not support your requirements. If your + * application is sufficiently flexible, downgrade your requirements and try + * again. Otherwise, inform the user that their machine does not match your + * requirements. + * + * @par + * Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0 + * comes out before the 4.x series gets that far, also fail with this error and + * not @ref GLFW_INVALID_VALUE, because GLFW cannot know what future versions + * will exist. + */ +#define GLFW_VERSION_UNAVAILABLE 0x00010007 +/*! @brief A platform-specific error occurred that does not match any of the + * more specific categories. + * + * A platform-specific error occurred that does not match any of the more + * specific categories. + * + * @analysis A bug or configuration error in GLFW, the underlying operating + * system or its drivers, or a lack of required resources. Report the issue to + * our [issue tracker](https://github.com/glfw/glfw/issues). + */ +#define GLFW_PLATFORM_ERROR 0x00010008 +/*! @brief The requested format is not supported or available. + * + * If emitted during window creation, the requested pixel format is not + * supported. + * + * If emitted when querying the clipboard, the contents of the clipboard could + * not be converted to the requested format. + * + * @analysis If emitted during window creation, one or more + * [hard constraints](@ref window_hints_hard) did not match any of the + * available pixel formats. If your application is sufficiently flexible, + * downgrade your requirements and try again. Otherwise, inform the user that + * their machine does not match your requirements. + * + * @par + * If emitted when querying the clipboard, ignore the error or report it to + * the user, as appropriate. + */ +#define GLFW_FORMAT_UNAVAILABLE 0x00010009 +/*! @brief The specified window does not have an OpenGL or OpenGL ES context. + * + * A window that does not have an OpenGL or OpenGL ES context was passed to + * a function that requires it to have one. + * + * @analysis Application programmer error. Fix the offending call. + */ +#define GLFW_NO_WINDOW_CONTEXT 0x0001000A +/*! @} */ + +/*! @addtogroup window + * @{ */ +/*! @brief Input focus window hint and attribute + * + * Input focus [window hint](@ref GLFW_FOCUSED_hint) or + * [window attribute](@ref GLFW_FOCUSED_attrib). + */ +#define GLFW_FOCUSED 0x00020001 +/*! @brief Window iconification window attribute + * + * Window iconification [window attribute](@ref GLFW_ICONIFIED_attrib). + */ +#define GLFW_ICONIFIED 0x00020002 +/*! @brief Window resize-ability window hint and attribute + * + * Window resize-ability [window hint](@ref GLFW_RESIZABLE_hint) and + * [window attribute](@ref GLFW_RESIZABLE_attrib). + */ +#define GLFW_RESIZABLE 0x00020003 +/*! @brief Window visibility window hint and attribute + * + * Window visibility [window hint](@ref GLFW_VISIBLE_hint) and + * [window attribute](@ref GLFW_VISIBLE_attrib). + */ +#define GLFW_VISIBLE 0x00020004 +/*! @brief Window decoration window hint and attribute + * + * Window decoration [window hint](@ref GLFW_DECORATED_hint) and + * [window attribute](@ref GLFW_DECORATED_attrib). + */ +#define GLFW_DECORATED 0x00020005 +/*! @brief Window auto-iconification window hint and attribute + * + * Window auto-iconification [window hint](@ref GLFW_AUTO_ICONIFY_hint) and + * [window attribute](@ref GLFW_AUTO_ICONIFY_attrib). + */ +#define GLFW_AUTO_ICONIFY 0x00020006 +/*! @brief Window decoration window hint and attribute + * + * Window decoration [window hint](@ref GLFW_FLOATING_hint) and + * [window attribute](@ref GLFW_FLOATING_attrib). + */ +#define GLFW_FLOATING 0x00020007 +/*! @brief Window maximization window hint and attribute + * + * Window maximization [window hint](@ref GLFW_MAXIMIZED_hint) and + * [window attribute](@ref GLFW_MAXIMIZED_attrib). + */ +#define GLFW_MAXIMIZED 0x00020008 +/*! @brief Cursor centering window hint + * + * Cursor centering [window hint](@ref GLFW_CENTER_CURSOR_hint). + */ +#define GLFW_CENTER_CURSOR 0x00020009 +/*! @brief Window framebuffer transparency hint and attribute + * + * Window framebuffer transparency + * [window hint](@ref GLFW_TRANSPARENT_FRAMEBUFFER_hint) and + * [window attribute](@ref GLFW_TRANSPARENT_FRAMEBUFFER_attrib). + */ +#define GLFW_TRANSPARENT_FRAMEBUFFER 0x0002000A +/*! @brief Mouse cursor hover window attribute. + * + * Mouse cursor hover [window attribute](@ref GLFW_HOVERED_attrib). + */ +#define GLFW_HOVERED 0x0002000B +/*! @brief Input focus on calling show window hint and attribute + * + * Input focus [window hint](@ref GLFW_FOCUS_ON_SHOW_hint) or + * [window attribute](@ref GLFW_FOCUS_ON_SHOW_attrib). + */ +#define GLFW_FOCUS_ON_SHOW 0x0002000C + +/*! @brief Framebuffer bit depth hint. + * + * Framebuffer bit depth [hint](@ref GLFW_RED_BITS). + */ +#define GLFW_RED_BITS 0x00021001 +/*! @brief Framebuffer bit depth hint. + * + * Framebuffer bit depth [hint](@ref GLFW_GREEN_BITS). + */ +#define GLFW_GREEN_BITS 0x00021002 +/*! @brief Framebuffer bit depth hint. + * + * Framebuffer bit depth [hint](@ref GLFW_BLUE_BITS). + */ +#define GLFW_BLUE_BITS 0x00021003 +/*! @brief Framebuffer bit depth hint. + * + * Framebuffer bit depth [hint](@ref GLFW_ALPHA_BITS). + */ +#define GLFW_ALPHA_BITS 0x00021004 +/*! @brief Framebuffer bit depth hint. + * + * Framebuffer bit depth [hint](@ref GLFW_DEPTH_BITS). + */ +#define GLFW_DEPTH_BITS 0x00021005 +/*! @brief Framebuffer bit depth hint. + * + * Framebuffer bit depth [hint](@ref GLFW_STENCIL_BITS). + */ +#define GLFW_STENCIL_BITS 0x00021006 +/*! @brief Framebuffer bit depth hint. + * + * Framebuffer bit depth [hint](@ref GLFW_ACCUM_RED_BITS). + */ +#define GLFW_ACCUM_RED_BITS 0x00021007 +/*! @brief Framebuffer bit depth hint. + * + * Framebuffer bit depth [hint](@ref GLFW_ACCUM_GREEN_BITS). + */ +#define GLFW_ACCUM_GREEN_BITS 0x00021008 +/*! @brief Framebuffer bit depth hint. + * + * Framebuffer bit depth [hint](@ref GLFW_ACCUM_BLUE_BITS). + */ +#define GLFW_ACCUM_BLUE_BITS 0x00021009 +/*! @brief Framebuffer bit depth hint. + * + * Framebuffer bit depth [hint](@ref GLFW_ACCUM_ALPHA_BITS). + */ +#define GLFW_ACCUM_ALPHA_BITS 0x0002100A +/*! @brief Framebuffer auxiliary buffer hint. + * + * Framebuffer auxiliary buffer [hint](@ref GLFW_AUX_BUFFERS). + */ +#define GLFW_AUX_BUFFERS 0x0002100B +/*! @brief OpenGL stereoscopic rendering hint. + * + * OpenGL stereoscopic rendering [hint](@ref GLFW_STEREO). + */ +#define GLFW_STEREO 0x0002100C +/*! @brief Framebuffer MSAA samples hint. + * + * Framebuffer MSAA samples [hint](@ref GLFW_SAMPLES). + */ +#define GLFW_SAMPLES 0x0002100D +/*! @brief Framebuffer sRGB hint. + * + * Framebuffer sRGB [hint](@ref GLFW_SRGB_CAPABLE). + */ +#define GLFW_SRGB_CAPABLE 0x0002100E +/*! @brief Monitor refresh rate hint. + * + * Monitor refresh rate [hint](@ref GLFW_REFRESH_RATE). + */ +#define GLFW_REFRESH_RATE 0x0002100F +/*! @brief Framebuffer double buffering hint. + * + * Framebuffer double buffering [hint](@ref GLFW_DOUBLEBUFFER). + */ +#define GLFW_DOUBLEBUFFER 0x00021010 + +/*! @brief Context client API hint and attribute. + * + * Context client API [hint](@ref GLFW_CLIENT_API_hint) and + * [attribute](@ref GLFW_CLIENT_API_attrib). + */ +#define GLFW_CLIENT_API 0x00022001 +/*! @brief Context client API major version hint and attribute. + * + * Context client API major version [hint](@ref GLFW_CLIENT_API_hint) and + * [attribute](@ref GLFW_CLIENT_API_attrib). + */ +#define GLFW_CONTEXT_VERSION_MAJOR 0x00022002 +/*! @brief Context client API minor version hint and attribute. + * + * Context client API minor version [hint](@ref GLFW_CLIENT_API_hint) and + * [attribute](@ref GLFW_CLIENT_API_attrib). + */ +#define GLFW_CONTEXT_VERSION_MINOR 0x00022003 +/*! @brief Context client API revision number hint and attribute. + * + * Context client API revision number [hint](@ref GLFW_CLIENT_API_hint) and + * [attribute](@ref GLFW_CLIENT_API_attrib). + */ +#define GLFW_CONTEXT_REVISION 0x00022004 +/*! @brief Context robustness hint and attribute. + * + * Context client API revision number [hint](@ref GLFW_CLIENT_API_hint) and + * [attribute](@ref GLFW_CLIENT_API_attrib). + */ +#define GLFW_CONTEXT_ROBUSTNESS 0x00022005 +/*! @brief OpenGL forward-compatibility hint and attribute. + * + * OpenGL forward-compatibility [hint](@ref GLFW_CLIENT_API_hint) and + * [attribute](@ref GLFW_CLIENT_API_attrib). + */ +#define GLFW_OPENGL_FORWARD_COMPAT 0x00022006 +/*! @brief OpenGL debug context hint and attribute. + * + * OpenGL debug context [hint](@ref GLFW_CLIENT_API_hint) and + * [attribute](@ref GLFW_CLIENT_API_attrib). + */ +#define GLFW_OPENGL_DEBUG_CONTEXT 0x00022007 +/*! @brief OpenGL profile hint and attribute. + * + * OpenGL profile [hint](@ref GLFW_CLIENT_API_hint) and + * [attribute](@ref GLFW_CLIENT_API_attrib). + */ +#define GLFW_OPENGL_PROFILE 0x00022008 +/*! @brief Context flush-on-release hint and attribute. + * + * Context flush-on-release [hint](@ref GLFW_CLIENT_API_hint) and + * [attribute](@ref GLFW_CLIENT_API_attrib). + */ +#define GLFW_CONTEXT_RELEASE_BEHAVIOR 0x00022009 +/*! @brief Context error suppression hint and attribute. + * + * Context error suppression [hint](@ref GLFW_CLIENT_API_hint) and + * [attribute](@ref GLFW_CLIENT_API_attrib). + */ +#define GLFW_CONTEXT_NO_ERROR 0x0002200A +/*! @brief Context creation API hint and attribute. + * + * Context creation API [hint](@ref GLFW_CLIENT_API_hint) and + * [attribute](@ref GLFW_CLIENT_API_attrib). + */ +#define GLFW_CONTEXT_CREATION_API 0x0002200B +/*! @brief Window content area scaling window + * [window hint](@ref GLFW_SCALE_TO_MONITOR). + */ +#define GLFW_SCALE_TO_MONITOR 0x0002200C + +#define GLFW_COCOA_RETINA_FRAMEBUFFER 0x00023001 +#define GLFW_COCOA_FRAME_NAME 0x00023002 +#define GLFW_COCOA_GRAPHICS_SWITCHING 0x00023003 + +#define GLFW_X11_CLASS_NAME 0x00024001 +#define GLFW_X11_INSTANCE_NAME 0x00024002 +/*! @} */ + +#define GLFW_NO_API 0 +#define GLFW_OPENGL_API 0x00030001 +#define GLFW_OPENGL_ES_API 0x00030002 + +#define GLFW_NO_ROBUSTNESS 0 +#define GLFW_NO_RESET_NOTIFICATION 0x00031001 +#define GLFW_LOSE_CONTEXT_ON_RESET 0x00031002 + +#define GLFW_OPENGL_ANY_PROFILE 0 +#define GLFW_OPENGL_CORE_PROFILE 0x00032001 +#define GLFW_OPENGL_COMPAT_PROFILE 0x00032002 + +#define GLFW_CURSOR 0x00033001 +#define GLFW_STICKY_KEYS 0x00033002 +#define GLFW_STICKY_MOUSE_BUTTONS 0x00033003 +#define GLFW_LOCK_KEY_MODS 0x00033004 + +#define GLFW_CURSOR_NORMAL 0x00034001 +#define GLFW_CURSOR_HIDDEN 0x00034002 +#define GLFW_CURSOR_DISABLED 0x00034003 + +#define GLFW_ANY_RELEASE_BEHAVIOR 0 +#define GLFW_RELEASE_BEHAVIOR_FLUSH 0x00035001 +#define GLFW_RELEASE_BEHAVIOR_NONE 0x00035002 + +#define GLFW_NATIVE_CONTEXT_API 0x00036001 +#define GLFW_EGL_CONTEXT_API 0x00036002 +#define GLFW_OSMESA_CONTEXT_API 0x00036003 + +/*! @defgroup shapes Standard cursor shapes + * @brief Standard system cursor shapes. + * + * See [standard cursor creation](@ref cursor_standard) for how these are used. + * + * @ingroup input + * @{ */ + +/*! @brief The regular arrow cursor shape. + * + * The regular arrow cursor. + */ +#define GLFW_ARROW_CURSOR 0x00036001 +/*! @brief The text input I-beam cursor shape. + * + * The text input I-beam cursor shape. + */ +#define GLFW_IBEAM_CURSOR 0x00036002 +/*! @brief The crosshair shape. + * + * The crosshair shape. + */ +#define GLFW_CROSSHAIR_CURSOR 0x00036003 +/*! @brief The hand shape. + * + * The hand shape. + */ +#define GLFW_HAND_CURSOR 0x00036004 +/*! @brief The horizontal resize arrow shape. + * + * The horizontal resize arrow shape. + */ +#define GLFW_HRESIZE_CURSOR 0x00036005 +/*! @brief The vertical resize arrow shape. + * + * The vertical resize arrow shape. + */ +#define GLFW_VRESIZE_CURSOR 0x00036006 +/*! @} */ + +#define GLFW_CONNECTED 0x00040001 +#define GLFW_DISCONNECTED 0x00040002 + +/*! @addtogroup init + * @{ */ +#define GLFW_JOYSTICK_HAT_BUTTONS 0x00050001 + +#define GLFW_COCOA_CHDIR_RESOURCES 0x00051001 +#define GLFW_COCOA_MENUBAR 0x00051002 +/*! @} */ + +#define GLFW_DONT_CARE -1 + + +/************************************************************************* + * GLFW API types + *************************************************************************/ + +/*! @brief Client API function pointer type. + * + * Generic function pointer used for returning client API function pointers + * without forcing a cast from a regular pointer. + * + * @sa @ref context_glext + * @sa @ref glfwGetProcAddress + * + * @since Added in version 3.0. + * + * @ingroup context + */ +typedef void (*GLFWglproc)(void); + +/*! @brief Vulkan API function pointer type. + * + * Generic function pointer used for returning Vulkan API function pointers + * without forcing a cast from a regular pointer. + * + * @sa @ref vulkan_proc + * @sa @ref glfwGetInstanceProcAddress + * + * @since Added in version 3.2. + * + * @ingroup vulkan + */ +typedef void (*GLFWvkproc)(void); + +/*! @brief Opaque monitor object. + * + * Opaque monitor object. + * + * @see @ref monitor_object + * + * @since Added in version 3.0. + * + * @ingroup monitor + */ +typedef struct GLFWmonitor GLFWmonitor; + +/*! @brief Opaque window object. + * + * Opaque window object. + * + * @see @ref window_object + * + * @since Added in version 3.0. + * + * @ingroup window + */ +typedef struct GLFWwindow GLFWwindow; + +/*! @brief Opaque cursor object. + * + * Opaque cursor object. + * + * @see @ref cursor_object + * + * @since Added in version 3.1. + * + * @ingroup cursor + */ +typedef struct GLFWcursor GLFWcursor; + +/*! @brief The function signature for error callbacks. + * + * This is the function signature for error callback functions. + * + * @param[in] error An [error code](@ref errors). + * @param[in] description A UTF-8 encoded string describing the error. + * + * @sa @ref error_handling + * @sa @ref glfwSetErrorCallback + * + * @since Added in version 3.0. + * + * @ingroup init + */ +typedef void (* GLFWerrorfun)(int,const char*); + +/*! @brief The function signature for window position callbacks. + * + * This is the function signature for window position callback functions. + * + * @param[in] window The window that was moved. + * @param[in] xpos The new x-coordinate, in screen coordinates, of the + * upper-left corner of the client area of the window. + * @param[in] ypos The new y-coordinate, in screen coordinates, of the + * upper-left corner of the client area of the window. + * + * @sa @ref window_pos + * @sa @ref glfwSetWindowPosCallback + * + * @since Added in version 3.0. + * + * @ingroup window + */ +typedef void (* GLFWwindowposfun)(GLFWwindow*,int,int); + +/*! @brief The function signature for window resize callbacks. + * + * This is the function signature for window size callback functions. + * + * @param[in] window The window that was resized. + * @param[in] width The new width, in screen coordinates, of the window. + * @param[in] height The new height, in screen coordinates, of the window. + * + * @sa @ref window_size + * @sa @ref glfwSetWindowSizeCallback + * + * @since Added in version 1.0. + * @glfw3 Added window handle parameter. + * + * @ingroup window + */ +typedef void (* GLFWwindowsizefun)(GLFWwindow*,int,int); + +/*! @brief The function signature for window close callbacks. + * + * This is the function signature for window close callback functions. + * + * @param[in] window The window that the user attempted to close. + * + * @sa @ref window_close + * @sa @ref glfwSetWindowCloseCallback + * + * @since Added in version 2.5. + * @glfw3 Added window handle parameter. + * + * @ingroup window + */ +typedef void (* GLFWwindowclosefun)(GLFWwindow*); + +/*! @brief The function signature for window content refresh callbacks. + * + * This is the function signature for window refresh callback functions. + * + * @param[in] window The window whose content needs to be refreshed. + * + * @sa @ref window_refresh + * @sa @ref glfwSetWindowRefreshCallback + * + * @since Added in version 2.5. + * @glfw3 Added window handle parameter. + * + * @ingroup window + */ +typedef void (* GLFWwindowrefreshfun)(GLFWwindow*); + +/*! @brief The function signature for window focus/defocus callbacks. + * + * This is the function signature for window focus callback functions. + * + * @param[in] window The window that gained or lost input focus. + * @param[in] focused `GLFW_TRUE` if the window was given input focus, or + * `GLFW_FALSE` if it lost it. + * + * @sa @ref window_focus + * @sa @ref glfwSetWindowFocusCallback + * + * @since Added in version 3.0. + * + * @ingroup window + */ +typedef void (* GLFWwindowfocusfun)(GLFWwindow*,int); + +/*! @brief The function signature for window iconify/restore callbacks. + * + * This is the function signature for window iconify/restore callback + * functions. + * + * @param[in] window The window that was iconified or restored. + * @param[in] iconified `GLFW_TRUE` if the window was iconified, or + * `GLFW_FALSE` if it was restored. + * + * @sa @ref window_iconify + * @sa @ref glfwSetWindowIconifyCallback + * + * @since Added in version 3.0. + * + * @ingroup window + */ +typedef void (* GLFWwindowiconifyfun)(GLFWwindow*,int); + +/*! @brief The function signature for window maximize/restore callbacks. + * + * This is the function signature for window maximize/restore callback + * functions. + * + * @param[in] window The window that was maximized or restored. + * @param[in] iconified `GLFW_TRUE` if the window was maximized, or + * `GLFW_FALSE` if it was restored. + * + * @sa @ref window_maximize + * @sa glfwSetWindowMaximizeCallback + * + * @since Added in version 3.3. + * + * @ingroup window + */ +typedef void (* GLFWwindowmaximizefun)(GLFWwindow*,int); + +/*! @brief The function signature for framebuffer resize callbacks. + * + * This is the function signature for framebuffer resize callback + * functions. + * + * @param[in] window The window whose framebuffer was resized. + * @param[in] width The new width, in pixels, of the framebuffer. + * @param[in] height The new height, in pixels, of the framebuffer. + * + * @sa @ref window_fbsize + * @sa @ref glfwSetFramebufferSizeCallback + * + * @since Added in version 3.0. + * + * @ingroup window + */ +typedef void (* GLFWframebuffersizefun)(GLFWwindow*,int,int); + +/*! @brief The function signature for window content scale callbacks. + * + * This is the function signature for window content scale callback + * functions. + * + * @param[in] window The window whose content scale changed. + * @param[in] xscale The new x-axis content scale of the window. + * @param[in] yscale The new y-axis content scale of the window. + * + * @sa @ref window_scale + * @sa @ref glfwSetWindowContentScaleCallback + * + * @since Added in version 3.3. + * + * @ingroup window + */ +typedef void (* GLFWwindowcontentscalefun)(GLFWwindow*,float,float); + +/*! @brief The function signature for mouse button callbacks. + * + * This is the function signature for mouse button callback functions. + * + * @param[in] window The window that received the event. + * @param[in] button The [mouse button](@ref buttons) that was pressed or + * released. + * @param[in] action One of `GLFW_PRESS` or `GLFW_RELEASE`. + * @param[in] mods Bit field describing which [modifier keys](@ref mods) were + * held down. + * + * @sa @ref input_mouse_button + * @sa @ref glfwSetMouseButtonCallback + * + * @since Added in version 1.0. + * @glfw3 Added window handle and modifier mask parameters. + * + * @ingroup input + */ +typedef void (* GLFWmousebuttonfun)(GLFWwindow*,int,int,int); + +/*! @brief The function signature for cursor position callbacks. + * + * This is the function signature for cursor position callback functions. + * + * @param[in] window The window that received the event. + * @param[in] xpos The new cursor x-coordinate, relative to the left edge of + * the client area. + * @param[in] ypos The new cursor y-coordinate, relative to the top edge of the + * client area. + * + * @sa @ref cursor_pos + * @sa @ref glfwSetCursorPosCallback + * + * @since Added in version 3.0. Replaces `GLFWmouseposfun`. + * + * @ingroup input + */ +typedef void (* GLFWcursorposfun)(GLFWwindow*,double,double); + +/*! @brief The function signature for cursor enter/leave callbacks. + * + * This is the function signature for cursor enter/leave callback functions. + * + * @param[in] window The window that received the event. + * @param[in] entered `GLFW_TRUE` if the cursor entered the window's client + * area, or `GLFW_FALSE` if it left it. + * + * @sa @ref cursor_enter + * @sa @ref glfwSetCursorEnterCallback + * + * @since Added in version 3.0. + * + * @ingroup input + */ +typedef void (* GLFWcursorenterfun)(GLFWwindow*,int); + +/*! @brief The function signature for scroll callbacks. + * + * This is the function signature for scroll callback functions. + * + * @param[in] window The window that received the event. + * @param[in] xoffset The scroll offset along the x-axis. + * @param[in] yoffset The scroll offset along the y-axis. + * + * @sa @ref scrolling + * @sa @ref glfwSetScrollCallback + * + * @since Added in version 3.0. Replaces `GLFWmousewheelfun`. + * + * @ingroup input + */ +typedef void (* GLFWscrollfun)(GLFWwindow*,double,double); + +/*! @brief The function signature for keyboard key callbacks. + * + * This is the function signature for keyboard key callback functions. + * + * @param[in] window The window that received the event. + * @param[in] key The [keyboard key](@ref keys) that was pressed or released. + * @param[in] scancode The system-specific scancode of the key. + * @param[in] action `GLFW_PRESS`, `GLFW_RELEASE` or `GLFW_REPEAT`. + * @param[in] mods Bit field describing which [modifier keys](@ref mods) were + * held down. + * + * @sa @ref input_key + * @sa @ref glfwSetKeyCallback + * + * @since Added in version 1.0. + * @glfw3 Added window handle, scancode and modifier mask parameters. + * + * @ingroup input + */ +typedef void (* GLFWkeyfun)(GLFWwindow*,int,int,int,int); + +/*! @brief The function signature for Unicode character callbacks. + * + * This is the function signature for Unicode character callback functions. + * + * @param[in] window The window that received the event. + * @param[in] codepoint The Unicode code point of the character. + * + * @sa @ref input_char + * @sa @ref glfwSetCharCallback + * + * @since Added in version 2.4. + * @glfw3 Added window handle parameter. + * + * @ingroup input + */ +typedef void (* GLFWcharfun)(GLFWwindow*,unsigned int); + +/*! @brief The function signature for Unicode character with modifiers + * callbacks. + * + * This is the function signature for Unicode character with modifiers callback + * functions. It is called for each input character, regardless of what + * modifier keys are held down. + * + * @param[in] window The window that received the event. + * @param[in] codepoint The Unicode code point of the character. + * @param[in] mods Bit field describing which [modifier keys](@ref mods) were + * held down. + * + * @sa @ref input_char + * @sa @ref glfwSetCharModsCallback + * + * @deprecated Scheduled for removal in version 4.0. + * + * @since Added in version 3.1. + * + * @ingroup input + */ +typedef void (* GLFWcharmodsfun)(GLFWwindow*,unsigned int,int); + +/*! @brief The function signature for file drop callbacks. + * + * This is the function signature for file drop callbacks. + * + * @param[in] window The window that received the event. + * @param[in] count The number of dropped files. + * @param[in] paths The UTF-8 encoded file and/or directory path names. + * + * @sa @ref path_drop + * @sa @ref glfwSetDropCallback + * + * @since Added in version 3.1. + * + * @ingroup input + */ +typedef void (* GLFWdropfun)(GLFWwindow*,int,const char**); + +/*! @brief The function signature for monitor configuration callbacks. + * + * This is the function signature for monitor configuration callback functions. + * + * @param[in] monitor The monitor that was connected or disconnected. + * @param[in] event One of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`. Remaining + * values reserved for future use. + * + * @sa @ref monitor_event + * @sa @ref glfwSetMonitorCallback + * + * @since Added in version 3.0. + * + * @ingroup monitor + */ +typedef void (* GLFWmonitorfun)(GLFWmonitor*,int); + +/*! @brief The function signature for joystick configuration callbacks. + * + * This is the function signature for joystick configuration callback + * functions. + * + * @param[in] jid The joystick that was connected or disconnected. + * @param[in] event One of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`. Remaining + * values reserved for future use. + * + * @sa @ref joystick_event + * @sa @ref glfwSetJoystickCallback + * + * @since Added in version 3.2. + * + * @ingroup input + */ +typedef void (* GLFWjoystickfun)(int,int); + +/*! @brief Video mode type. + * + * This describes a single video mode. + * + * @sa @ref monitor_modes + * @sa @ref glfwGetVideoMode + * @sa @ref glfwGetVideoModes + * + * @since Added in version 1.0. + * @glfw3 Added refresh rate member. + * + * @ingroup monitor + */ +typedef struct GLFWvidmode +{ + /*! The width, in screen coordinates, of the video mode. + */ + int width; + /*! The height, in screen coordinates, of the video mode. + */ + int height; + /*! The bit depth of the red channel of the video mode. + */ + int redBits; + /*! The bit depth of the green channel of the video mode. + */ + int greenBits; + /*! The bit depth of the blue channel of the video mode. + */ + int blueBits; + /*! The refresh rate, in Hz, of the video mode. + */ + int refreshRate; +} GLFWvidmode; + +/*! @brief Gamma ramp. + * + * This describes the gamma ramp for a monitor. + * + * @sa @ref monitor_gamma + * @sa @ref glfwGetGammaRamp + * @sa @ref glfwSetGammaRamp + * + * @since Added in version 3.0. + * + * @ingroup monitor + */ +typedef struct GLFWgammaramp +{ + /*! An array of value describing the response of the red channel. + */ + unsigned short* red; + /*! An array of value describing the response of the green channel. + */ + unsigned short* green; + /*! An array of value describing the response of the blue channel. + */ + unsigned short* blue; + /*! The number of elements in each array. + */ + unsigned int size; +} GLFWgammaramp; + +/*! @brief Image data. + * + * This describes a single 2D image. See the documentation for each related + * function what the expected pixel format is. + * + * @sa @ref cursor_custom + * @sa @ref window_icon + * + * @since Added in version 2.1. + * @glfw3 Removed format and bytes-per-pixel members. + */ +typedef struct GLFWimage +{ + /*! The width, in pixels, of this image. + */ + int width; + /*! The height, in pixels, of this image. + */ + int height; + /*! The pixel data of this image, arranged left-to-right, top-to-bottom. + */ + unsigned char* pixels; +} GLFWimage; + +/*! @brief Gamepad input state + * + * This describes the input state of a gamepad. + * + * @sa @ref gamepad + * @sa @ref glfwGetGamepadState + * + * @since Added in version 3.3. + */ +typedef struct GLFWgamepadstate +{ + /*! The states of each [gamepad button](@ref gamepad_buttons), `GLFW_PRESS` + * or `GLFW_RELEASE`. + */ + unsigned char buttons[15]; + /*! The states of each [gamepad axis](@ref gamepad_axes), in the range -1.0 + * to 1.0 inclusive. + */ + float axes[6]; +} GLFWgamepadstate; + + +/************************************************************************* + * GLFW API functions + *************************************************************************/ + +/*! @brief Initializes the GLFW library. + * + * This function initializes the GLFW library. Before most GLFW functions can + * be used, GLFW must be initialized, and before an application terminates GLFW + * should be terminated in order to free any resources allocated during or + * after initialization. + * + * If this function fails, it calls @ref glfwTerminate before returning. If it + * succeeds, you should call @ref glfwTerminate before the application exits. + * + * Additional calls to this function after successful initialization but before + * termination will return `GLFW_TRUE` immediately. + * + * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_PLATFORM_ERROR. + * + * @remark @macos This function will change the current directory of the + * application to the `Contents/Resources` subdirectory of the application's + * bundle, if present. This can be disabled with the @ref + * GLFW_COCOA_CHDIR_RESOURCES init hint. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref intro_init + * @sa @ref glfwTerminate + * + * @since Added in version 1.0. + * + * @ingroup init + */ +GLFWAPI int glfwInit(void); + +/*! @brief Terminates the GLFW library. + * + * This function destroys all remaining windows and cursors, restores any + * modified gamma ramps and frees any other allocated resources. Once this + * function is called, you must again call @ref glfwInit successfully before + * you will be able to use most GLFW functions. + * + * If GLFW has been successfully initialized, this function should be called + * before the application exits. If initialization fails, there is no need to + * call this function, as it is called by @ref glfwInit before it returns + * failure. + * + * @errors Possible errors include @ref GLFW_PLATFORM_ERROR. + * + * @remark This function may be called before @ref glfwInit. + * + * @warning The contexts of any remaining windows must not be current on any + * other thread when this function is called. + * + * @reentrancy This function must not be called from a callback. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref intro_init + * @sa @ref glfwInit + * + * @since Added in version 1.0. + * + * @ingroup init + */ +GLFWAPI void glfwTerminate(void); + +/*! @brief Sets the specified init hint to the desired value. + * + * This function sets hints for the next initialization of GLFW. + * + * The values you set hints to are never reset by GLFW, but they only take + * effect during initialization. Once GLFW has been initialized, any values + * you set will be ignored until the library is terminated and initialized + * again. + * + * Some hints are platform specific. These may be set on any platform but they + * will only affect their specific platform. Other platforms will ignore them. + * Setting these hints requires no platform specific headers or functions. + * + * @param[in] hint The [init hint](@ref init_hints) to set. + * @param[in] value The new value of the init hint. + * + * @errors Possible errors include @ref GLFW_INVALID_ENUM and @ref + * GLFW_INVALID_VALUE. + * + * @remarks This function may be called before @ref glfwInit. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa init_hints + * @sa glfwInit + * + * @since Added in version 3.3. + * + * @ingroup init + */ +GLFWAPI void glfwInitHint(int hint, int value); + +/*! @brief Retrieves the version of the GLFW library. + * + * This function retrieves the major, minor and revision numbers of the GLFW + * library. It is intended for when you are using GLFW as a shared library and + * want to ensure that you are using the minimum required version. + * + * Any or all of the version arguments may be `NULL`. + * + * @param[out] major Where to store the major version number, or `NULL`. + * @param[out] minor Where to store the minor version number, or `NULL`. + * @param[out] rev Where to store the revision number, or `NULL`. + * + * @errors None. + * + * @remark This function may be called before @ref glfwInit. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref intro_version + * @sa @ref glfwGetVersionString + * + * @since Added in version 1.0. + * + * @ingroup init + */ +GLFWAPI void glfwGetVersion(int* major, int* minor, int* rev); + +/*! @brief Returns a string describing the compile-time configuration. + * + * This function returns the compile-time generated + * [version string](@ref intro_version_string) of the GLFW library binary. It + * describes the version, platform, compiler and any platform-specific + * compile-time options. It should not be confused with the OpenGL or OpenGL + * ES version string, queried with `glGetString`. + * + * __Do not use the version string__ to parse the GLFW library version. The + * @ref glfwGetVersion function provides the version of the running library + * binary in numerical format. + * + * @return The ASCII encoded GLFW version string. + * + * @errors None. + * + * @remark This function may be called before @ref glfwInit. + * + * @pointer_lifetime The returned string is static and compile-time generated. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref intro_version + * @sa @ref glfwGetVersion + * + * @since Added in version 3.0. + * + * @ingroup init + */ +GLFWAPI const char* glfwGetVersionString(void); + +/*! @brief Returns and clears the last error for the calling thread. + * + * This function returns and clears the [error code](@ref errors) of the last + * error that occurred on the calling thread, and optionally a UTF-8 encoded + * human-readable description of it. If no error has occurred since the last + * call, it returns @ref GLFW_NO_ERROR (zero) and the description pointer is + * set to `NULL`. + * + * @param[in] description Where to store the error description pointer, or `NULL`. + * @return The last error code for the calling thread, or @ref GLFW_NO_ERROR + * (zero). + * + * @errors None. + * + * @pointer_lifetime The returned string is allocated and freed by GLFW. You + * should not free it yourself. It is guaranteed to be valid only until the + * next error occurs or the library is terminated. + * + * @remark This function may be called before @ref glfwInit. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref error_handling + * @sa @ref glfwSetErrorCallback + * + * @since Added in version 3.3. + * + * @ingroup init + */ +GLFWAPI int glfwGetError(const char** description); + +/*! @brief Sets the error callback. + * + * This function sets the error callback, which is called with an error code + * and a human-readable description each time a GLFW error occurs. + * + * The error code is set before the callback is called. Calling @ref + * glfwGetError from the error callback will return the same value as the error + * code argument. + * + * The error callback is called on the thread where the error occurred. If you + * are using GLFW from multiple threads, your error callback needs to be + * written accordingly. + * + * Because the description string may have been generated specifically for that + * error, it is not guaranteed to be valid after the callback has returned. If + * you wish to use it after the callback returns, you need to make a copy. + * + * Once set, the error callback remains set even after the library has been + * terminated. + * + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set. + * + * @errors None. + * + * @remark This function may be called before @ref glfwInit. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref error_handling + * @sa @ref glfwGetError + * + * @since Added in version 3.0. + * + * @ingroup init + */ +GLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun cbfun); + +/*! @brief Returns the currently connected monitors. + * + * This function returns an array of handles for all currently connected + * monitors. The primary monitor is always first in the returned array. If no + * monitors were found, this function returns `NULL`. + * + * @param[out] count Where to store the number of monitors in the returned + * array. This is set to zero if an error occurred. + * @return An array of monitor handles, or `NULL` if no monitors were found or + * if an [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @pointer_lifetime The returned array is allocated and freed by GLFW. You + * should not free it yourself. It is guaranteed to be valid only until the + * monitor configuration changes or the library is terminated. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref monitor_monitors + * @sa @ref monitor_event + * @sa @ref glfwGetPrimaryMonitor + * + * @since Added in version 3.0. + * + * @ingroup monitor + */ +GLFWAPI GLFWmonitor** glfwGetMonitors(int* count); + +/*! @brief Returns the primary monitor. + * + * This function returns the primary monitor. This is usually the monitor + * where elements like the task bar or global menu bar are located. + * + * @return The primary monitor, or `NULL` if no monitors were found or if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @remark The primary monitor is always first in the array returned by @ref + * glfwGetMonitors. + * + * @sa @ref monitor_monitors + * @sa @ref glfwGetMonitors + * + * @since Added in version 3.0. + * + * @ingroup monitor + */ +GLFWAPI GLFWmonitor* glfwGetPrimaryMonitor(void); + +/*! @brief Returns the position of the monitor's viewport on the virtual screen. + * + * This function returns the position, in screen coordinates, of the upper-left + * corner of the specified monitor. + * + * Any or all of the position arguments may be `NULL`. If an error occurs, all + * non-`NULL` position arguments will be set to zero. + * + * @param[in] monitor The monitor to query. + * @param[out] xpos Where to store the monitor x-coordinate, or `NULL`. + * @param[out] ypos Where to store the monitor y-coordinate, or `NULL`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref monitor_properties + * + * @since Added in version 3.0. + * + * @ingroup monitor + */ +GLFWAPI void glfwGetMonitorPos(GLFWmonitor* monitor, int* xpos, int* ypos); + +/*! @brief Returns the physical size of the monitor. + * + * This function returns the size, in millimetres, of the display area of the + * specified monitor. + * + * Some systems do not provide accurate monitor size information, either + * because the monitor + * [EDID](https://en.wikipedia.org/wiki/Extended_display_identification_data) + * data is incorrect or because the driver does not report it accurately. + * + * Any or all of the size arguments may be `NULL`. If an error occurs, all + * non-`NULL` size arguments will be set to zero. + * + * @param[in] monitor The monitor to query. + * @param[out] widthMM Where to store the width, in millimetres, of the + * monitor's display area, or `NULL`. + * @param[out] heightMM Where to store the height, in millimetres, of the + * monitor's display area, or `NULL`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @remark @win32 calculates the returned physical size from the + * current resolution and system DPI instead of querying the monitor EDID data. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref monitor_properties + * + * @since Added in version 3.0. + * + * @ingroup monitor + */ +GLFWAPI void glfwGetMonitorPhysicalSize(GLFWmonitor* monitor, int* widthMM, int* heightMM); + +/*! @brief Retrieves the content scale for the specified monitor. + * + * This function retrieves the content scale for the specified monitor. The + * content scale is the ratio between the current DPI and the platform's + * default DPI. If you scale all pixel dimensions by this scale then your + * content should appear at an appropriate size. This is especially important + * for text and any UI elements. + * + * The content scale may depend on both the monitor resolution and pixel + * density and on user settings. It may be very different from the raw DPI + * calculated from the physical size and current resolution. + * + * @param[in] monitor The monitor to query. + * @param[out] xscale Where to store the x-axis content scale, or `NULL`. + * @param[out] yscale Where to store the y-axis content scale, or `NULL`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref monitor_scale + * @sa @ref glfwGetWindowContentScale + * + * @since Added in version 3.3. + * + * @ingroup monitor + */ +GLFWAPI void glfwGetMonitorContentScale(GLFWmonitor* monitor, float* xscale, float* yscale); + +/*! @brief Returns the name of the specified monitor. + * + * This function returns a human-readable name, encoded as UTF-8, of the + * specified monitor. The name typically reflects the make and model of the + * monitor and is not guaranteed to be unique among the connected monitors. + * + * @param[in] monitor The monitor to query. + * @return The UTF-8 encoded name of the monitor, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @pointer_lifetime The returned string is allocated and freed by GLFW. You + * should not free it yourself. It is valid until the specified monitor is + * disconnected or the library is terminated. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref monitor_properties + * + * @since Added in version 3.0. + * + * @ingroup monitor + */ +GLFWAPI const char* glfwGetMonitorName(GLFWmonitor* monitor); + +/*! @brief Sets the user pointer of the specified monitor. + * + * This function sets the user-defined pointer of the specified monitor. The + * current value is retained until the monitor is disconnected. The initial + * value is `NULL`. + * + * This function may be called from the monitor callback, even for a monitor + * that is being disconnected. + * + * @param[in] monitor The monitor whose pointer to set. + * @param[in] pointer The new value. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @sa @ref monitor_userptr + * @sa @ref glfwGetMonitorUserPointer + * + * @since Added in version 3.3. + * + * @ingroup monitor + */ +GLFWAPI void glfwSetMonitorUserPointer(GLFWmonitor* monitor, void* pointer); + +/*! @brief Returns the user pointer of the specified monitor. + * + * This function returns the current value of the user-defined pointer of the + * specified monitor. The initial value is `NULL`. + * + * This function may be called from the monitor callback, even for a monitor + * that is being disconnected. + * + * @param[in] monitor The monitor whose pointer to return. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @sa @ref monitor_userptr + * @sa @ref glfwSetMonitorUserPointer + * + * @since Added in version 3.3. + * + * @ingroup monitor + */ +GLFWAPI void* glfwGetMonitorUserPointer(GLFWmonitor* monitor); + +/*! @brief Sets the monitor configuration callback. + * + * This function sets the monitor configuration callback, or removes the + * currently set callback. This is called when a monitor is connected to or + * disconnected from the system. + * + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref monitor_event + * + * @since Added in version 3.0. + * + * @ingroup monitor + */ +GLFWAPI GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun cbfun); + +/*! @brief Returns the available video modes for the specified monitor. + * + * This function returns an array of all video modes supported by the specified + * monitor. The returned array is sorted in ascending order, first by color + * bit depth (the sum of all channel depths) and then by resolution area (the + * product of width and height). + * + * @param[in] monitor The monitor to query. + * @param[out] count Where to store the number of video modes in the returned + * array. This is set to zero if an error occurred. + * @return An array of video modes, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @pointer_lifetime The returned array is allocated and freed by GLFW. You + * should not free it yourself. It is valid until the specified monitor is + * disconnected, this function is called again for that monitor or the library + * is terminated. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref monitor_modes + * @sa @ref glfwGetVideoMode + * + * @since Added in version 1.0. + * @glfw3 Changed to return an array of modes for a specific monitor. + * + * @ingroup monitor + */ +GLFWAPI const GLFWvidmode* glfwGetVideoModes(GLFWmonitor* monitor, int* count); + +/*! @brief Returns the current mode of the specified monitor. + * + * This function returns the current video mode of the specified monitor. If + * you have created a full screen window for that monitor, the return value + * will depend on whether that window is iconified. + * + * @param[in] monitor The monitor to query. + * @return The current mode of the monitor, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @pointer_lifetime The returned array is allocated and freed by GLFW. You + * should not free it yourself. It is valid until the specified monitor is + * disconnected or the library is terminated. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref monitor_modes + * @sa @ref glfwGetVideoModes + * + * @since Added in version 3.0. Replaces `glfwGetDesktopMode`. + * + * @ingroup monitor + */ +GLFWAPI const GLFWvidmode* glfwGetVideoMode(GLFWmonitor* monitor); + +/*! @brief Generates a gamma ramp and sets it for the specified monitor. + * + * This function generates a 256-element gamma ramp from the specified exponent + * and then calls @ref glfwSetGammaRamp with it. The value must be a finite + * number greater than zero. + * + * The software controlled gamma ramp is applied _in addition_ to the hardware + * gamma correction, which today is usually an approximation of sRGB gamma. + * This means that setting a perfectly linear ramp, or gamma 1.0, will produce + * the default (usually sRGB-like) behavior. + * + * For gamma correct rendering with OpenGL or OpenGL ES, see the @ref + * GLFW_SRGB_CAPABLE hint. + * + * @param[in] monitor The monitor whose gamma ramp to set. + * @param[in] gamma The desired exponent. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR. + * + * @remark @wayland Gamma handling is a priviledged protocol, this function + * will thus never be implemented and emits @ref GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref monitor_gamma + * + * @since Added in version 3.0. + * + * @ingroup monitor + */ +GLFWAPI void glfwSetGamma(GLFWmonitor* monitor, float gamma); + +/*! @brief Returns the current gamma ramp for the specified monitor. + * + * This function returns the current gamma ramp of the specified monitor. + * + * @param[in] monitor The monitor to query. + * @return The current gamma ramp, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @remark @wayland Gamma handling is a priviledged protocol, this function + * will thus never be implemented and emits @ref GLFW_PLATFORM_ERROR while + * returning `NULL`. + * + * @pointer_lifetime The returned structure and its arrays are allocated and + * freed by GLFW. You should not free them yourself. They are valid until the + * specified monitor is disconnected, this function is called again for that + * monitor or the library is terminated. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref monitor_gamma + * + * @since Added in version 3.0. + * + * @ingroup monitor + */ +GLFWAPI const GLFWgammaramp* glfwGetGammaRamp(GLFWmonitor* monitor); + +/*! @brief Sets the current gamma ramp for the specified monitor. + * + * This function sets the current gamma ramp for the specified monitor. The + * original gamma ramp for that monitor is saved by GLFW the first time this + * function is called and is restored by @ref glfwTerminate. + * + * The software controlled gamma ramp is applied _in addition_ to the hardware + * gamma correction, which today is usually an approximation of sRGB gamma. + * This means that setting a perfectly linear ramp, or gamma 1.0, will produce + * the default (usually sRGB-like) behavior. + * + * For gamma correct rendering with OpenGL or OpenGL ES, see the @ref + * GLFW_SRGB_CAPABLE hint. + * + * @param[in] monitor The monitor whose gamma ramp to set. + * @param[in] ramp The gamma ramp to use. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @remark Gamma ramp sizes other than 256 are not supported by all platforms + * or graphics hardware. + * + * @remark @win32 The gamma ramp size must be 256. + * + * @remark @wayland Gamma handling is a priviledged protocol, this function + * will thus never be implemented and emits @ref GLFW_PLATFORM_ERROR. + * + * @pointer_lifetime The specified gamma ramp is copied before this function + * returns. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref monitor_gamma + * + * @since Added in version 3.0. + * + * @ingroup monitor + */ +GLFWAPI void glfwSetGammaRamp(GLFWmonitor* monitor, const GLFWgammaramp* ramp); + +/*! @brief Resets all window hints to their default values. + * + * This function resets all window hints to their + * [default values](@ref window_hints_values). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_hints + * @sa @ref glfwWindowHint + * @sa @ref glfwWindowHintString + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI void glfwDefaultWindowHints(void); + +/*! @brief Sets the specified window hint to the desired value. + * + * This function sets hints for the next call to @ref glfwCreateWindow. The + * hints, once set, retain their values until changed by a call to this + * function or @ref glfwDefaultWindowHints, or until the library is terminated. + * + * Only integer value hints can be set with this function. String value hints + * are set with @ref glfwWindowHintString. + * + * This function does not check whether the specified hint values are valid. + * If you set hints to invalid values this will instead be reported by the next + * call to @ref glfwCreateWindow. + * + * Some hints are platform specific. These may be set on any platform but they + * will only affect their specific platform. Other platforms will ignore them. + * Setting these hints requires no platform specific headers or functions. + * + * @param[in] hint The [window hint](@ref window_hints) to set. + * @param[in] value The new value of the window hint. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_INVALID_ENUM. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_hints + * @sa @ref glfwWindowHintString + * @sa @ref glfwDefaultWindowHints + * + * @since Added in version 3.0. Replaces `glfwOpenWindowHint`. + * + * @ingroup window + */ +GLFWAPI void glfwWindowHint(int hint, int value); + +/*! @brief Sets the specified window hint to the desired value. + * + * This function sets hints for the next call to @ref glfwCreateWindow. The + * hints, once set, retain their values until changed by a call to this + * function or @ref glfwDefaultWindowHints, or until the library is terminated. + * + * Only string type hints can be set with this function. Integer value hints + * are set with @ref glfwWindowHint. + * + * This function does not check whether the specified hint values are valid. + * If you set hints to invalid values this will instead be reported by the next + * call to @ref glfwCreateWindow. + * + * Some hints are platform specific. These may be set on any platform but they + * will only affect their specific platform. Other platforms will ignore them. + * Setting these hints requires no platform specific headers or functions. + * + * @param[in] hint The [window hint](@ref window_hints) to set. + * @param[in] value The new value of the window hint. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_INVALID_ENUM. + * + * @pointer_lifetime The specified string is copied before this function + * returns. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_hints + * @sa @ref glfwWindowHint + * @sa @ref glfwDefaultWindowHints + * + * @since Added in version 3.3. + * + * @ingroup window + */ +GLFWAPI void glfwWindowHintString(int hint, const char* value); + +/*! @brief Creates a window and its associated context. + * + * This function creates a window and its associated OpenGL or OpenGL ES + * context. Most of the options controlling how the window and its context + * should be created are specified with [window hints](@ref window_hints). + * + * Successful creation does not change which context is current. Before you + * can use the newly created context, you need to + * [make it current](@ref context_current). For information about the `share` + * parameter, see @ref context_sharing. + * + * The created window, framebuffer and context may differ from what you + * requested, as not all parameters and hints are + * [hard constraints](@ref window_hints_hard). This includes the size of the + * window, especially for full screen windows. To query the actual attributes + * of the created window, framebuffer and context, see @ref + * glfwGetWindowAttrib, @ref glfwGetWindowSize and @ref glfwGetFramebufferSize. + * + * To create a full screen window, you need to specify the monitor the window + * will cover. If no monitor is specified, the window will be windowed mode. + * Unless you have a way for the user to choose a specific monitor, it is + * recommended that you pick the primary monitor. For more information on how + * to query connected monitors, see @ref monitor_monitors. + * + * For full screen windows, the specified size becomes the resolution of the + * window's _desired video mode_. As long as a full screen window is not + * iconified, the supported video mode most closely matching the desired video + * mode is set for the specified monitor. For more information about full + * screen windows, including the creation of so called _windowed full screen_ + * or _borderless full screen_ windows, see @ref window_windowed_full_screen. + * + * Once you have created the window, you can switch it between windowed and + * full screen mode with @ref glfwSetWindowMonitor. This will not affect its + * OpenGL or OpenGL ES context. + * + * By default, newly created windows use the placement recommended by the + * window system. To create the window at a specific position, make it + * initially invisible using the [GLFW_VISIBLE](@ref GLFW_VISIBLE_hint) window + * hint, set its [position](@ref window_pos) and then [show](@ref window_hide) + * it. + * + * As long as at least one full screen window is not iconified, the screensaver + * is prohibited from starting. + * + * Window systems put limits on window sizes. Very large or very small window + * dimensions may be overridden by the window system on creation. Check the + * actual [size](@ref window_size) after creation. + * + * The [swap interval](@ref buffer_swap) is not set during window creation and + * the initial value may vary depending on driver settings and defaults. + * + * @param[in] width The desired width, in screen coordinates, of the window. + * This must be greater than zero. + * @param[in] height The desired height, in screen coordinates, of the window. + * This must be greater than zero. + * @param[in] title The initial, UTF-8 encoded window title. + * @param[in] monitor The monitor to use for full screen mode, or `NULL` for + * windowed mode. + * @param[in] share The window whose context to share resources with, or `NULL` + * to not share resources. + * @return The handle of the created window, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE, @ref GLFW_API_UNAVAILABLE, @ref + * GLFW_VERSION_UNAVAILABLE, @ref GLFW_FORMAT_UNAVAILABLE and @ref + * GLFW_PLATFORM_ERROR. + * + * @remark @win32 Window creation will fail if the Microsoft GDI software + * OpenGL implementation is the only one available. + * + * @remark @win32 If the executable has an icon resource named `GLFW_ICON,` it + * will be set as the initial icon for the window. If no such icon is present, + * the `IDI_APPLICATION` icon will be used instead. To set a different icon, + * see @ref glfwSetWindowIcon. + * + * @remark @win32 The context to share resources with must not be current on + * any other thread. + * + * @remark @macos The OS only supports forward-compatible core profile contexts + * for OpenGL versions 3.2 and later. Before creating an OpenGL context of + * version 3.2 or later you must set the + * [GLFW_OPENGL_FORWARD_COMPAT](@ref GLFW_OPENGL_FORWARD_COMPAT_hint) and + * [GLFW_OPENGL_PROFILE](@ref GLFW_OPENGL_PROFILE_hint) hints accordingly. + * OpenGL 3.0 and 3.1 contexts are not supported at all on macOS. + * + * @remark @macos The GLFW window has no icon, as it is not a document + * window, but the dock icon will be the same as the application bundle's icon. + * For more information on bundles, see the + * [Bundle Programming Guide](https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/) + * in the Mac Developer Library. + * + * @remark @macos The first time a window is created the menu bar is created. + * If GLFW finds a `MainMenu.nib` it is loaded and assumed to contain a menu + * bar. Otherwise a minimal menu bar is created manually with common commands + * like Hide, Quit and About. The About entry opens a minimal about dialog + * with information from the application's bundle. Menu bar creation can be + * disabled entirely with the @ref GLFW_COCOA_MENUBAR init hint. + * + * @remark @macos On OS X 10.10 and later the window frame will not be rendered + * at full resolution on Retina displays unless the + * [GLFW_COCOA_RETINA_FRAMEBUFFER](@ref GLFW_COCOA_RETINA_FRAMEBUFFER_hint) + * hint is `GLFW_TRUE` and the `NSHighResolutionCapable` key is enabled in the + * application bundle's `Info.plist`. For more information, see + * [High Resolution Guidelines for OS X](https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Explained/Explained.html) + * in the Mac Developer Library. The GLFW test and example programs use + * a custom `Info.plist` template for this, which can be found as + * `CMake/MacOSXBundleInfo.plist.in` in the source tree. + * + * @remark @macos When activating frame autosaving with + * [GLFW_COCOA_FRAME_NAME](@ref GLFW_COCOA_FRAME_NAME_hint), the specified + * window size and position may be overriden by previously saved values. + * + * @remark @x11 Some window managers will not respect the placement of + * initially hidden windows. + * + * @remark @x11 Due to the asynchronous nature of X11, it may take a moment for + * a window to reach its requested state. This means you may not be able to + * query the final size, position or other attributes directly after window + * creation. + * + * @remark @x11 The class part of the `WM_CLASS` window property will by + * default be set to the window title passed to this function. The instance + * part will use the contents of the `RESOURCE_NAME` environment variable, if + * present and not empty, or fall back to the window title. Set the @ref + * GLFW_X11_CLASS_NAME and @ref GLFW_X11_INSTANCE_NAME window hints to override + * this. + * + * @remark @wayland The window frame is currently very simple, only allowing + * window resize or move. A compositor can still emit close, maximize or + * fullscreen events, using for example a keybind mechanism. Additionally, + * the wp_viewporter protocol is required for this feature, otherwise the + * window will not be decorated. + * + * @remark @wayland A full screen window will not attempt to change the mode, + * no matter what the requested size or refresh rate. + * + * @remark @wayland Screensaver inhibition requires the idle-inhibit protocol + * to be implemented in the user's compositor. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_creation + * @sa @ref glfwDestroyWindow + * + * @since Added in version 3.0. Replaces `glfwOpenWindow`. + * + * @ingroup window + */ +GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, const char* title, GLFWmonitor* monitor, GLFWwindow* share); + +/*! @brief Destroys the specified window and its context. + * + * This function destroys the specified window and its context. On calling + * this function, no further callbacks will be called for that window. + * + * If the context of the specified window is current on the main thread, it is + * detached before being destroyed. + * + * @param[in] window The window to destroy. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @note The context of the specified window must not be current on any other + * thread when this function is called. + * + * @reentrancy This function must not be called from a callback. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_creation + * @sa @ref glfwCreateWindow + * + * @since Added in version 3.0. Replaces `glfwCloseWindow`. + * + * @ingroup window + */ +GLFWAPI void glfwDestroyWindow(GLFWwindow* window); + +/*! @brief Checks the close flag of the specified window. + * + * This function returns the value of the close flag of the specified window. + * + * @param[in] window The window to query. + * @return The value of the close flag. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @sa @ref window_close + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI int glfwWindowShouldClose(GLFWwindow* window); + +/*! @brief Sets the close flag of the specified window. + * + * This function sets the value of the close flag of the specified window. + * This can be used to override the user's attempt to close the window, or + * to signal that it should be closed. + * + * @param[in] window The window whose flag to change. + * @param[in] value The new value. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @sa @ref window_close + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI void glfwSetWindowShouldClose(GLFWwindow* window, int value); + +/*! @brief Sets the title of the specified window. + * + * This function sets the window title, encoded as UTF-8, of the specified + * window. + * + * @param[in] window The window whose title to change. + * @param[in] title The UTF-8 encoded window title. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @remark @macos The window title will not be updated until the next time you + * process events. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_title + * + * @since Added in version 1.0. + * @glfw3 Added window handle parameter. + * + * @ingroup window + */ +GLFWAPI void glfwSetWindowTitle(GLFWwindow* window, const char* title); + +/*! @brief Sets the icon for the specified window. + * + * This function sets the icon of the specified window. If passed an array of + * candidate images, those of or closest to the sizes desired by the system are + * selected. If no images are specified, the window reverts to its default + * icon. + * + * The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight + * bits per channel with the red channel first. They are arranged canonically + * as packed sequential rows, starting from the top-left corner. + * + * The desired image sizes varies depending on platform and system settings. + * The selected images will be rescaled as needed. Good sizes include 16x16, + * 32x32 and 48x48. + * + * @param[in] window The window whose icon to set. + * @param[in] count The number of images in the specified array, or zero to + * revert to the default window icon. + * @param[in] images The images to create the icon from. This is ignored if + * count is zero. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @pointer_lifetime The specified image data is copied before this function + * returns. + * + * @remark @macos The GLFW window has no icon, as it is not a document + * window, so this function does nothing. The dock icon will be the same as + * the application bundle's icon. For more information on bundles, see the + * [Bundle Programming Guide](https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/) + * in the Mac Developer Library. + * + * @remark @wayland There is no existing protocol to change an icon, the + * window will thus inherit the one defined in the application's desktop file. + * This function always emits @ref GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_icon + * + * @since Added in version 3.2. + * + * @ingroup window + */ +GLFWAPI void glfwSetWindowIcon(GLFWwindow* window, int count, const GLFWimage* images); + +/*! @brief Retrieves the position of the client area of the specified window. + * + * This function retrieves the position, in screen coordinates, of the + * upper-left corner of the client area of the specified window. + * + * Any or all of the position arguments may be `NULL`. If an error occurs, all + * non-`NULL` position arguments will be set to zero. + * + * @param[in] window The window to query. + * @param[out] xpos Where to store the x-coordinate of the upper-left corner of + * the client area, or `NULL`. + * @param[out] ypos Where to store the y-coordinate of the upper-left corner of + * the client area, or `NULL`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @remark @wayland There is no way for an application to retrieve the global + * position of its windows, this function will always emit @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_pos + * @sa @ref glfwSetWindowPos + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI void glfwGetWindowPos(GLFWwindow* window, int* xpos, int* ypos); + +/*! @brief Sets the position of the client area of the specified window. + * + * This function sets the position, in screen coordinates, of the upper-left + * corner of the client area of the specified windowed mode window. If the + * window is a full screen window, this function does nothing. + * + * __Do not use this function__ to move an already visible window unless you + * have very good reasons for doing so, as it will confuse and annoy the user. + * + * The window manager may put limits on what positions are allowed. GLFW + * cannot and should not override these limits. + * + * @param[in] window The window to query. + * @param[in] xpos The x-coordinate of the upper-left corner of the client area. + * @param[in] ypos The y-coordinate of the upper-left corner of the client area. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @remark @wayland There is no way for an application to set the global + * position of its windows, this function will always emit @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_pos + * @sa @ref glfwGetWindowPos + * + * @since Added in version 1.0. + * @glfw3 Added window handle parameter. + * + * @ingroup window + */ +GLFWAPI void glfwSetWindowPos(GLFWwindow* window, int xpos, int ypos); + +/*! @brief Retrieves the size of the client area of the specified window. + * + * This function retrieves the size, in screen coordinates, of the client area + * of the specified window. If you wish to retrieve the size of the + * framebuffer of the window in pixels, see @ref glfwGetFramebufferSize. + * + * Any or all of the size arguments may be `NULL`. If an error occurs, all + * non-`NULL` size arguments will be set to zero. + * + * @param[in] window The window whose size to retrieve. + * @param[out] width Where to store the width, in screen coordinates, of the + * client area, or `NULL`. + * @param[out] height Where to store the height, in screen coordinates, of the + * client area, or `NULL`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_size + * @sa @ref glfwSetWindowSize + * + * @since Added in version 1.0. + * @glfw3 Added window handle parameter. + * + * @ingroup window + */ +GLFWAPI void glfwGetWindowSize(GLFWwindow* window, int* width, int* height); + +/*! @brief Sets the size limits of the specified window. + * + * This function sets the size limits of the client area of the specified + * window. If the window is full screen, the size limits only take effect + * once it is made windowed. If the window is not resizable, this function + * does nothing. + * + * The size limits are applied immediately to a windowed mode window and may + * cause it to be resized. + * + * The maximum dimensions must be greater than or equal to the minimum + * dimensions and all must be greater than or equal to zero. + * + * @param[in] window The window to set limits for. + * @param[in] minwidth The minimum width, in screen coordinates, of the client + * area, or `GLFW_DONT_CARE`. + * @param[in] minheight The minimum height, in screen coordinates, of the + * client area, or `GLFW_DONT_CARE`. + * @param[in] maxwidth The maximum width, in screen coordinates, of the client + * area, or `GLFW_DONT_CARE`. + * @param[in] maxheight The maximum height, in screen coordinates, of the + * client area, or `GLFW_DONT_CARE`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR. + * + * @remark If you set size limits and an aspect ratio that conflict, the + * results are undefined. + * + * @remark @wayland The size limits will not be applied until the window is + * actually resized, either by the user or by the compositor. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_sizelimits + * @sa @ref glfwSetWindowAspectRatio + * + * @since Added in version 3.2. + * + * @ingroup window + */ +GLFWAPI void glfwSetWindowSizeLimits(GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight); + +/*! @brief Sets the aspect ratio of the specified window. + * + * This function sets the required aspect ratio of the client area of the + * specified window. If the window is full screen, the aspect ratio only takes + * effect once it is made windowed. If the window is not resizable, this + * function does nothing. + * + * The aspect ratio is specified as a numerator and a denominator and both + * values must be greater than zero. For example, the common 16:9 aspect ratio + * is specified as 16 and 9, respectively. + * + * If the numerator and denominator is set to `GLFW_DONT_CARE` then the aspect + * ratio limit is disabled. + * + * The aspect ratio is applied immediately to a windowed mode window and may + * cause it to be resized. + * + * @param[in] window The window to set limits for. + * @param[in] numer The numerator of the desired aspect ratio, or + * `GLFW_DONT_CARE`. + * @param[in] denom The denominator of the desired aspect ratio, or + * `GLFW_DONT_CARE`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR. + * + * @remark If you set size limits and an aspect ratio that conflict, the + * results are undefined. + * + * @remark @wayland The aspect ratio will not be applied until the window is + * actually resized, either by the user or by the compositor. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_sizelimits + * @sa @ref glfwSetWindowSizeLimits + * + * @since Added in version 3.2. + * + * @ingroup window + */ +GLFWAPI void glfwSetWindowAspectRatio(GLFWwindow* window, int numer, int denom); + +/*! @brief Sets the size of the client area of the specified window. + * + * This function sets the size, in screen coordinates, of the client area of + * the specified window. + * + * For full screen windows, this function updates the resolution of its desired + * video mode and switches to the video mode closest to it, without affecting + * the window's context. As the context is unaffected, the bit depths of the + * framebuffer remain unchanged. + * + * If you wish to update the refresh rate of the desired video mode in addition + * to its resolution, see @ref glfwSetWindowMonitor. + * + * The window manager may put limits on what sizes are allowed. GLFW cannot + * and should not override these limits. + * + * @param[in] window The window to resize. + * @param[in] width The desired width, in screen coordinates, of the window + * client area. + * @param[in] height The desired height, in screen coordinates, of the window + * client area. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @remark @wayland A full screen window will not attempt to change the mode, + * no matter what the requested size. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_size + * @sa @ref glfwGetWindowSize + * @sa @ref glfwSetWindowMonitor + * + * @since Added in version 1.0. + * @glfw3 Added window handle parameter. + * + * @ingroup window + */ +GLFWAPI void glfwSetWindowSize(GLFWwindow* window, int width, int height); + +/*! @brief Retrieves the size of the framebuffer of the specified window. + * + * This function retrieves the size, in pixels, of the framebuffer of the + * specified window. If you wish to retrieve the size of the window in screen + * coordinates, see @ref glfwGetWindowSize. + * + * Any or all of the size arguments may be `NULL`. If an error occurs, all + * non-`NULL` size arguments will be set to zero. + * + * @param[in] window The window whose framebuffer to query. + * @param[out] width Where to store the width, in pixels, of the framebuffer, + * or `NULL`. + * @param[out] height Where to store the height, in pixels, of the framebuffer, + * or `NULL`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_fbsize + * @sa @ref glfwSetFramebufferSizeCallback + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI void glfwGetFramebufferSize(GLFWwindow* window, int* width, int* height); + +/*! @brief Retrieves the size of the frame of the window. + * + * This function retrieves the size, in screen coordinates, of each edge of the + * frame of the specified window. This size includes the title bar, if the + * window has one. The size of the frame may vary depending on the + * [window-related hints](@ref window_hints_wnd) used to create it. + * + * Because this function retrieves the size of each window frame edge and not + * the offset along a particular coordinate axis, the retrieved values will + * always be zero or positive. + * + * Any or all of the size arguments may be `NULL`. If an error occurs, all + * non-`NULL` size arguments will be set to zero. + * + * @param[in] window The window whose frame size to query. + * @param[out] left Where to store the size, in screen coordinates, of the left + * edge of the window frame, or `NULL`. + * @param[out] top Where to store the size, in screen coordinates, of the top + * edge of the window frame, or `NULL`. + * @param[out] right Where to store the size, in screen coordinates, of the + * right edge of the window frame, or `NULL`. + * @param[out] bottom Where to store the size, in screen coordinates, of the + * bottom edge of the window frame, or `NULL`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_size + * + * @since Added in version 3.1. + * + * @ingroup window + */ +GLFWAPI void glfwGetWindowFrameSize(GLFWwindow* window, int* left, int* top, int* right, int* bottom); + +/*! @brief Retrieves the content scale for the specified window. + * + * This function retrieves the content scale for the specified window. The + * content scale is the ratio between the current DPI and the platform's + * default DPI. If you scale all pixel dimensions by this scale then your + * content should appear at an appropriate size. This is especially important + * for text and any UI elements. + * + * On systems where each monitors can have its own content scale, the window + * content scale will depend on which monitor the system considers the window + * to be on. + * + * @param[in] window The window to query. + * @param[out] xscale Where to store the x-axis content scale, or `NULL`. + * @param[out] yscale Where to store the y-axis content scale, or `NULL`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_scale + * @sa @ref glfwSetWindowContentScaleCallback + * @sa @ref glfwGetMonitorContentScale + * + * @since Added in version 3.3. + * + * @ingroup window + */ +GLFWAPI void glfwGetWindowContentScale(GLFWwindow* window, float* xscale, float* yscale); + +/*! @brief Returns the opacity of the whole window. + * + * This function returns the opacity of the window, including any decorations. + * + * The opacity (or alpha) value is a positive finite number between zero and + * one, where zero is fully transparent and one is fully opaque. If the system + * does not support whole window transparency, this function always returns one. + * + * The initial opacity value for newly created windows is one. + * + * @param[in] window The window to query. + * @return The opacity value of the specified window. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_transparency + * @sa @ref glfwSetWindowOpacity + * + * @since Added in version 3.3. + * + * @ingroup window + */ +GLFWAPI float glfwGetWindowOpacity(GLFWwindow* window); + +/*! @brief Sets the opacity of the whole window. + * + * This function sets the opacity of the window, including any decorations. + * + * The opacity (or alpha) value is a positive finite number between zero and + * one, where zero is fully transparent and one is fully opaque. + * + * The initial opacity value for newly created windows is one. + * + * A window created with framebuffer transparency may not use whole window + * transparency. The results of doing this are undefined. + * + * @param[in] window The window to set the opacity for. + * @param[in] opacity The desired opacity of the specified window. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_transparency + * @sa @ref glfwGetWindowOpacity + * + * @since Added in version 3.3. + * + * @ingroup window + */ +GLFWAPI void glfwSetWindowOpacity(GLFWwindow* window, float opacity); + +/*! @brief Iconifies the specified window. + * + * This function iconifies (minimizes) the specified window if it was + * previously restored. If the window is already iconified, this function does + * nothing. + * + * If the specified window is a full screen window, the original monitor + * resolution is restored until the window is restored. + * + * @param[in] window The window to iconify. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @remark @wayland There is no concept of iconification in wl_shell, this + * function will emit @ref GLFW_PLATFORM_ERROR when using this deprecated + * protocol. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_iconify + * @sa @ref glfwRestoreWindow + * @sa @ref glfwMaximizeWindow + * + * @since Added in version 2.1. + * @glfw3 Added window handle parameter. + * + * @ingroup window + */ +GLFWAPI void glfwIconifyWindow(GLFWwindow* window); + +/*! @brief Restores the specified window. + * + * This function restores the specified window if it was previously iconified + * (minimized) or maximized. If the window is already restored, this function + * does nothing. + * + * If the specified window is a full screen window, the resolution chosen for + * the window is restored on the selected monitor. + * + * @param[in] window The window to restore. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_iconify + * @sa @ref glfwIconifyWindow + * @sa @ref glfwMaximizeWindow + * + * @since Added in version 2.1. + * @glfw3 Added window handle parameter. + * + * @ingroup window + */ +GLFWAPI void glfwRestoreWindow(GLFWwindow* window); + +/*! @brief Maximizes the specified window. + * + * This function maximizes the specified window if it was previously not + * maximized. If the window is already maximized, this function does nothing. + * + * If the specified window is a full screen window, this function does nothing. + * + * @param[in] window The window to maximize. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @par Thread Safety + * This function may only be called from the main thread. + * + * @sa @ref window_iconify + * @sa @ref glfwIconifyWindow + * @sa @ref glfwRestoreWindow + * + * @since Added in GLFW 3.2. + * + * @ingroup window + */ +GLFWAPI void glfwMaximizeWindow(GLFWwindow* window); + +/*! @brief Makes the specified window visible. + * + * This function makes the specified window visible if it was previously + * hidden. If the window is already visible or is in full screen mode, this + * function does nothing. + * + * By default, windowed mode windows are focused when shown + * Set the [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_hint) window hint + * to change this behavior for all newly created windows, or change the + * behavior for an existing window with @ref glfwSetWindowAttrib. + * + * @param[in] window The window to make visible. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_hide + * @sa @ref glfwHideWindow + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI void glfwShowWindow(GLFWwindow* window); + +/*! @brief Hides the specified window. + * + * This function hides the specified window if it was previously visible. If + * the window is already hidden or is in full screen mode, this function does + * nothing. + * + * @param[in] window The window to hide. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_hide + * @sa @ref glfwShowWindow + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI void glfwHideWindow(GLFWwindow* window); + +/*! @brief Brings the specified window to front and sets input focus. + * + * This function brings the specified window to front and sets input focus. + * The window should already be visible and not iconified. + * + * By default, both windowed and full screen mode windows are focused when + * initially created. Set the [GLFW_FOCUSED](@ref GLFW_FOCUSED_hint) to + * disable this behavior. + * + * Also by default, windowed mode windows are focused when shown + * with @ref glfwShowWindow. Set the + * [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_hint) to disable this behavior. + * + * __Do not use this function__ to steal focus from other applications unless + * you are certain that is what the user wants. Focus stealing can be + * extremely disruptive. + * + * For a less disruptive way of getting the user's attention, see + * [attention requests](@ref window_attention). + * + * @param[in] window The window to give input focus. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @remark @wayland It is not possible for an application to bring its windows + * to front, this function will always emit @ref GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_focus + * @sa @ref window_attention + * + * @since Added in version 3.2. + * + * @ingroup window + */ +GLFWAPI void glfwFocusWindow(GLFWwindow* window); + +/*! @brief Requests user attention to the specified window. + * + * This function requests user attention to the specified window. On + * platforms where this is not supported, attention is requested to the + * application as a whole. + * + * Once the user has given attention, usually by focusing the window or + * application, the system will end the request automatically. + * + * @param[in] window The window to request attention to. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @remark @macos Attention is requested to the application as a whole, not the + * specific window. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_attention + * + * @since Added in version 3.3. + * + * @ingroup window + */ +GLFWAPI void glfwRequestWindowAttention(GLFWwindow* window); + +/*! @brief Returns the monitor that the window uses for full screen mode. + * + * This function returns the handle of the monitor that the specified window is + * in full screen on. + * + * @param[in] window The window to query. + * @return The monitor, or `NULL` if the window is in windowed mode or an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_monitor + * @sa @ref glfwSetWindowMonitor + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI GLFWmonitor* glfwGetWindowMonitor(GLFWwindow* window); + +/*! @brief Sets the mode, monitor, video mode and placement of a window. + * + * This function sets the monitor that the window uses for full screen mode or, + * if the monitor is `NULL`, makes it windowed mode. + * + * When setting a monitor, this function updates the width, height and refresh + * rate of the desired video mode and switches to the video mode closest to it. + * The window position is ignored when setting a monitor. + * + * When the monitor is `NULL`, the position, width and height are used to + * place the window client area. The refresh rate is ignored when no monitor + * is specified. + * + * If you only wish to update the resolution of a full screen window or the + * size of a windowed mode window, see @ref glfwSetWindowSize. + * + * When a window transitions from full screen to windowed mode, this function + * restores any previous window settings such as whether it is decorated, + * floating, resizable, has size or aspect ratio limits, etc. + * + * @param[in] window The window whose monitor, size or video mode to set. + * @param[in] monitor The desired monitor, or `NULL` to set windowed mode. + * @param[in] xpos The desired x-coordinate of the upper-left corner of the + * client area. + * @param[in] ypos The desired y-coordinate of the upper-left corner of the + * client area. + * @param[in] width The desired with, in screen coordinates, of the client area + * or video mode. + * @param[in] height The desired height, in screen coordinates, of the client + * area or video mode. + * @param[in] refreshRate The desired refresh rate, in Hz, of the video mode, + * or `GLFW_DONT_CARE`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @remark The OpenGL or OpenGL ES context will not be destroyed or otherwise + * affected by any resizing or mode switching, although you may need to update + * your viewport if the framebuffer size has changed. + * + * @remark @wayland The desired window position is ignored, as there is no way + * for an application to set this property. + * + * @remark @wayland Setting the window to full screen will not attempt to + * change the mode, no matter what the requested size or refresh rate. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_monitor + * @sa @ref window_full_screen + * @sa @ref glfwGetWindowMonitor + * @sa @ref glfwSetWindowSize + * + * @since Added in version 3.2. + * + * @ingroup window + */ +GLFWAPI void glfwSetWindowMonitor(GLFWwindow* window, GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate); + +/*! @brief Returns an attribute of the specified window. + * + * This function returns the value of an attribute of the specified window or + * its OpenGL or OpenGL ES context. + * + * @param[in] window The window to query. + * @param[in] attrib The [window attribute](@ref window_attribs) whose value to + * return. + * @return The value of the attribute, or zero if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. + * + * @remark Framebuffer related hints are not window attributes. See @ref + * window_attribs_fb for more information. + * + * @remark Zero is a valid value for many window and context related + * attributes so you cannot use a return value of zero as an indication of + * errors. However, this function should not fail as long as it is passed + * valid arguments and the library has been [initialized](@ref intro_init). + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_attribs + * @sa @ref glfwSetWindowAttrib + * + * @since Added in version 3.0. Replaces `glfwGetWindowParam` and + * `glfwGetGLVersion`. + * + * @ingroup window + */ +GLFWAPI int glfwGetWindowAttrib(GLFWwindow* window, int attrib); + +/*! @brief Sets an attribute of the specified window. + * + * This function sets the value of an attribute of the specified window. + * + * The supported attributes are [GLFW_DECORATED](@ref GLFW_DECORATED_attrib), + * [GLFW_RESIZABLE](@ref GLFW_RESIZABLE_attrib), + * [GLFW_FLOATING](@ref GLFW_FLOATING_attrib), + * [GLFW_AUTO_ICONIFY](@ref GLFW_AUTO_ICONIFY_attrib) and + * [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_attrib). + * + * Some of these attributes are ignored for full screen windows. The new + * value will take effect if the window is later made windowed. + * + * Some of these attributes are ignored for windowed mode windows. The new + * value will take effect if the window is later made full screen. + * + * @param[in] window The window to set the attribute for. + * @param[in] attrib A supported window attribute. + * @param[in] value `GLFW_TRUE` or `GLFW_FALSE`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR. + * + * @remark Calling @ref glfwGetWindowAttrib will always return the latest + * value, even if that value is ignored by the current mode of the window. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_attribs + * @sa @ref glfwGetWindowAttrib + * + * @since Added in version 3.3. + * + * @ingroup window + */ +GLFWAPI void glfwSetWindowAttrib(GLFWwindow* window, int attrib, int value); + +/*! @brief Sets the user pointer of the specified window. + * + * This function sets the user-defined pointer of the specified window. The + * current value is retained until the window is destroyed. The initial value + * is `NULL`. + * + * @param[in] window The window whose pointer to set. + * @param[in] pointer The new value. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @sa @ref window_userptr + * @sa @ref glfwGetWindowUserPointer + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI void glfwSetWindowUserPointer(GLFWwindow* window, void* pointer); + +/*! @brief Returns the user pointer of the specified window. + * + * This function returns the current value of the user-defined pointer of the + * specified window. The initial value is `NULL`. + * + * @param[in] window The window whose pointer to return. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @sa @ref window_userptr + * @sa @ref glfwSetWindowUserPointer + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI void* glfwGetWindowUserPointer(GLFWwindow* window); + +/*! @brief Sets the position callback for the specified window. + * + * This function sets the position callback of the specified window, which is + * called when the window is moved. The callback is provided with the + * position, in screen coordinates, of the upper-left corner of the client area + * of the window. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @remark @wayland This callback will never be called, as there is no way for + * an application to know its global position. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_pos + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI GLFWwindowposfun glfwSetWindowPosCallback(GLFWwindow* window, GLFWwindowposfun cbfun); + +/*! @brief Sets the size callback for the specified window. + * + * This function sets the size callback of the specified window, which is + * called when the window is resized. The callback is provided with the size, + * in screen coordinates, of the client area of the window. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_size + * + * @since Added in version 1.0. + * @glfw3 Added window handle parameter and return value. + * + * @ingroup window + */ +GLFWAPI GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow* window, GLFWwindowsizefun cbfun); + +/*! @brief Sets the close callback for the specified window. + * + * This function sets the close callback of the specified window, which is + * called when the user attempts to close the window, for example by clicking + * the close widget in the title bar. + * + * The close flag is set before this callback is called, but you can modify it + * at any time with @ref glfwSetWindowShouldClose. + * + * The close callback is not triggered by @ref glfwDestroyWindow. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @remark @macos Selecting Quit from the application menu will trigger the + * close callback for all windows. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_close + * + * @since Added in version 2.5. + * @glfw3 Added window handle parameter and return value. + * + * @ingroup window + */ +GLFWAPI GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow* window, GLFWwindowclosefun cbfun); + +/*! @brief Sets the refresh callback for the specified window. + * + * This function sets the refresh callback of the specified window, which is + * called when the client area of the window needs to be redrawn, for example + * if the window has been exposed after having been covered by another window. + * + * On compositing window systems such as Aero, Compiz, Aqua or Wayland, where + * the window contents are saved off-screen, this callback may be called only + * very infrequently or never at all. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_refresh + * + * @since Added in version 2.5. + * @glfw3 Added window handle parameter and return value. + * + * @ingroup window + */ +GLFWAPI GLFWwindowrefreshfun glfwSetWindowRefreshCallback(GLFWwindow* window, GLFWwindowrefreshfun cbfun); + +/*! @brief Sets the focus callback for the specified window. + * + * This function sets the focus callback of the specified window, which is + * called when the window gains or loses input focus. + * + * After the focus callback is called for a window that lost input focus, + * synthetic key and mouse button release events will be generated for all such + * that had been pressed. For more information, see @ref glfwSetKeyCallback + * and @ref glfwSetMouseButtonCallback. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_focus + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI GLFWwindowfocusfun glfwSetWindowFocusCallback(GLFWwindow* window, GLFWwindowfocusfun cbfun); + +/*! @brief Sets the iconify callback for the specified window. + * + * This function sets the iconification callback of the specified window, which + * is called when the window is iconified or restored. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @remark @wayland The wl_shell protocol has no concept of iconification, + * this callback will never be called when using this deprecated protocol. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_iconify + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI GLFWwindowiconifyfun glfwSetWindowIconifyCallback(GLFWwindow* window, GLFWwindowiconifyfun cbfun); + +/*! @brief Sets the maximize callback for the specified window. + * + * This function sets the maximization callback of the specified window, which + * is called when the window is maximized or restored. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_maximize + * + * @since Added in version 3.3. + * + * @ingroup window + */ +GLFWAPI GLFWwindowmaximizefun glfwSetWindowMaximizeCallback(GLFWwindow* window, GLFWwindowmaximizefun cbfun); + +/*! @brief Sets the framebuffer resize callback for the specified window. + * + * This function sets the framebuffer resize callback of the specified window, + * which is called when the framebuffer of the specified window is resized. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_fbsize + * + * @since Added in version 3.0. + * + * @ingroup window + */ +GLFWAPI GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow* window, GLFWframebuffersizefun cbfun); + +/*! @brief Sets the window content scale callback for the specified window. + * + * This function sets the window content scale callback of the specified window, + * which is called when the content scale of the specified window changes. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref window_scale + * @sa @ref glfwGetWindowContentScale + * + * @since Added in version 3.3. + * + * @ingroup window + */ +GLFWAPI GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(GLFWwindow* window, GLFWwindowcontentscalefun cbfun); + +/*! @brief Processes all pending events. + * + * This function processes only those events that are already in the event + * queue and then returns immediately. Processing events will cause the window + * and input callbacks associated with those events to be called. + * + * On some platforms, a window move, resize or menu operation will cause event + * processing to block. This is due to how event processing is designed on + * those platforms. You can use the + * [window refresh callback](@ref window_refresh) to redraw the contents of + * your window when necessary during such operations. + * + * Do not assume that callbacks you set will _only_ be called in response to + * event processing functions like this one. While it is necessary to poll for + * events, window systems that require GLFW to register callbacks of its own + * can pass events to GLFW in response to many window system function calls. + * GLFW will pass those events on to the application callbacks before + * returning. + * + * Event processing is not required for joystick input to work. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @reentrancy This function must not be called from a callback. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref events + * @sa @ref glfwWaitEvents + * @sa @ref glfwWaitEventsTimeout + * + * @since Added in version 1.0. + * + * @ingroup window + */ +GLFWAPI void glfwPollEvents(void); + +/*! @brief Waits until events are queued and processes them. + * + * This function puts the calling thread to sleep until at least one event is + * available in the event queue. Once one or more events are available, + * it behaves exactly like @ref glfwPollEvents, i.e. the events in the queue + * are processed and the function then returns immediately. Processing events + * will cause the window and input callbacks associated with those events to be + * called. + * + * Since not all events are associated with callbacks, this function may return + * without a callback having been called even if you are monitoring all + * callbacks. + * + * On some platforms, a window move, resize or menu operation will cause event + * processing to block. This is due to how event processing is designed on + * those platforms. You can use the + * [window refresh callback](@ref window_refresh) to redraw the contents of + * your window when necessary during such operations. + * + * Do not assume that callbacks you set will _only_ be called in response to + * event processing functions like this one. While it is necessary to poll for + * events, window systems that require GLFW to register callbacks of its own + * can pass events to GLFW in response to many window system function calls. + * GLFW will pass those events on to the application callbacks before + * returning. + * + * If no windows exist, this function returns immediately. For synchronization + * of threads in applications that do not create windows, use your threading + * library of choice. + * + * Event processing is not required for joystick input to work. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @reentrancy This function must not be called from a callback. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref events + * @sa @ref glfwPollEvents + * @sa @ref glfwWaitEventsTimeout + * + * @since Added in version 2.5. + * + * @ingroup window + */ +GLFWAPI void glfwWaitEvents(void); + +/*! @brief Waits with timeout until events are queued and processes them. + * + * This function puts the calling thread to sleep until at least one event is + * available in the event queue, or until the specified timeout is reached. If + * one or more events are available, it behaves exactly like @ref + * glfwPollEvents, i.e. the events in the queue are processed and the function + * then returns immediately. Processing events will cause the window and input + * callbacks associated with those events to be called. + * + * The timeout value must be a positive finite number. + * + * Since not all events are associated with callbacks, this function may return + * without a callback having been called even if you are monitoring all + * callbacks. + * + * On some platforms, a window move, resize or menu operation will cause event + * processing to block. This is due to how event processing is designed on + * those platforms. You can use the + * [window refresh callback](@ref window_refresh) to redraw the contents of + * your window when necessary during such operations. + * + * Do not assume that callbacks you set will _only_ be called in response to + * event processing functions like this one. While it is necessary to poll for + * events, window systems that require GLFW to register callbacks of its own + * can pass events to GLFW in response to many window system function calls. + * GLFW will pass those events on to the application callbacks before + * returning. + * + * If no windows exist, this function returns immediately. For synchronization + * of threads in applications that do not create windows, use your threading + * library of choice. + * + * Event processing is not required for joystick input to work. + * + * @param[in] timeout The maximum amount of time, in seconds, to wait. + * + * @reentrancy This function must not be called from a callback. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref events + * @sa @ref glfwPollEvents + * @sa @ref glfwWaitEvents + * + * @since Added in version 3.2. + * + * @ingroup window + */ +GLFWAPI void glfwWaitEventsTimeout(double timeout); + +/*! @brief Posts an empty event to the event queue. + * + * This function posts an empty event from the current thread to the event + * queue, causing @ref glfwWaitEvents or @ref glfwWaitEventsTimeout to return. + * + * If no windows exist, this function returns immediately. For synchronization + * of threads in applications that do not create windows, use your threading + * library of choice. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref events + * @sa @ref glfwWaitEvents + * @sa @ref glfwWaitEventsTimeout + * + * @since Added in version 3.1. + * + * @ingroup window + */ +GLFWAPI void glfwPostEmptyEvent(void); + +/*! @brief Returns the value of an input option for the specified window. + * + * This function returns the value of an input option for the specified window. + * The mode must be one of @ref GLFW_CURSOR, @ref GLFW_STICKY_KEYS, + * @ref GLFW_STICKY_MOUSE_BUTTONS or @ref GLFW_LOCK_KEY_MODS. + * + * @param[in] window The window to query. + * @param[in] mode One of `GLFW_CURSOR`, `GLFW_STICKY_KEYS`, + * `GLFW_STICKY_MOUSE_BUTTONS` or `GLFW_LOCK_KEY_MODS`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_INVALID_ENUM. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref glfwSetInputMode + * + * @since Added in version 3.0. + * + * @ingroup input + */ +GLFWAPI int glfwGetInputMode(GLFWwindow* window, int mode); + +/*! @brief Sets an input option for the specified window. + * + * This function sets an input mode option for the specified window. The mode + * must be one of @ref GLFW_CURSOR, @ref GLFW_STICKY_KEYS, + * @ref GLFW_STICKY_MOUSE_BUTTONS or @ref GLFW_LOCK_KEY_MODS. + * + * If the mode is `GLFW_CURSOR`, the value must be one of the following cursor + * modes: + * - `GLFW_CURSOR_NORMAL` makes the cursor visible and behaving normally. + * - `GLFW_CURSOR_HIDDEN` makes the cursor invisible when it is over the client + * area of the window but does not restrict the cursor from leaving. + * - `GLFW_CURSOR_DISABLED` hides and grabs the cursor, providing virtual + * and unlimited cursor movement. This is useful for implementing for + * example 3D camera controls. + * + * If the mode is `GLFW_STICKY_KEYS`, the value must be either `GLFW_TRUE` to + * enable sticky keys, or `GLFW_FALSE` to disable it. If sticky keys are + * enabled, a key press will ensure that @ref glfwGetKey returns `GLFW_PRESS` + * the next time it is called even if the key had been released before the + * call. This is useful when you are only interested in whether keys have been + * pressed but not when or in which order. + * + * If the mode is `GLFW_STICKY_MOUSE_BUTTONS`, the value must be either + * `GLFW_TRUE` to enable sticky mouse buttons, or `GLFW_FALSE` to disable it. + * If sticky mouse buttons are enabled, a mouse button press will ensure that + * @ref glfwGetMouseButton returns `GLFW_PRESS` the next time it is called even + * if the mouse button had been released before the call. This is useful when + * you are only interested in whether mouse buttons have been pressed but not + * when or in which order. + * + * If the mode is `GLFW_LOCK_KEY_MODS`, the value must be either `GLFW_TRUE` to + * enable lock key modifier bits, or `GLFW_FALSE` to disable them. If enabled, + * callbacks that receive modifier bits will also have the @ref + * GLFW_MOD_CAPS_LOCK bit set when the event was generated with Caps Lock on, + * and the @ref GLFW_MOD_NUM_LOCK bit when Num Lock was on. + * + * @param[in] window The window whose input mode to set. + * @param[in] mode One of `GLFW_CURSOR`, `GLFW_STICKY_KEYS`, + * `GLFW_STICKY_MOUSE_BUTTONS` or `GLFW_LOCK_KEY_MODS`. + * @param[in] value The new value of the specified input mode. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref glfwGetInputMode + * + * @since Added in version 3.0. Replaces `glfwEnable` and `glfwDisable`. + * + * @ingroup input + */ +GLFWAPI void glfwSetInputMode(GLFWwindow* window, int mode, int value); + +/*! @brief Returns the layout-specific name of the specified printable key. + * + * This function returns the name of the specified printable key, encoded as + * UTF-8. This is typically the character that key would produce without any + * modifier keys, intended for displaying key bindings to the user. For dead + * keys, it is typically the diacritic it would add to a character. + * + * __Do not use this function__ for [text input](@ref input_char). You will + * break text input for many languages even if it happens to work for yours. + * + * If the key is `GLFW_KEY_UNKNOWN`, the scancode is used to identify the key, + * otherwise the scancode is ignored. If you specify a non-printable key, or + * `GLFW_KEY_UNKNOWN` and a scancode that maps to a non-printable key, this + * function returns `NULL` but does not emit an error. + * + * This behavior allows you to always pass in the arguments in the + * [key callback](@ref input_key) without modification. + * + * The printable keys are: + * - `GLFW_KEY_APOSTROPHE` + * - `GLFW_KEY_COMMA` + * - `GLFW_KEY_MINUS` + * - `GLFW_KEY_PERIOD` + * - `GLFW_KEY_SLASH` + * - `GLFW_KEY_SEMICOLON` + * - `GLFW_KEY_EQUAL` + * - `GLFW_KEY_LEFT_BRACKET` + * - `GLFW_KEY_RIGHT_BRACKET` + * - `GLFW_KEY_BACKSLASH` + * - `GLFW_KEY_WORLD_1` + * - `GLFW_KEY_WORLD_2` + * - `GLFW_KEY_0` to `GLFW_KEY_9` + * - `GLFW_KEY_A` to `GLFW_KEY_Z` + * - `GLFW_KEY_KP_0` to `GLFW_KEY_KP_9` + * - `GLFW_KEY_KP_DECIMAL` + * - `GLFW_KEY_KP_DIVIDE` + * - `GLFW_KEY_KP_MULTIPLY` + * - `GLFW_KEY_KP_SUBTRACT` + * - `GLFW_KEY_KP_ADD` + * - `GLFW_KEY_KP_EQUAL` + * + * Names for printable keys depend on keyboard layout, while names for + * non-printable keys are the same across layouts but depend on the application + * language and should be localized along with other user interface text. + * + * @param[in] key The key to query, or `GLFW_KEY_UNKNOWN`. + * @param[in] scancode The scancode of the key to query. + * @return The UTF-8 encoded, layout-specific name of the key, or `NULL`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @pointer_lifetime The returned string is allocated and freed by GLFW. You + * should not free it yourself. It is valid until the next call to @ref + * glfwGetKeyName, or until the library is terminated. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref input_key_name + * + * @since Added in version 3.2. + * + * @ingroup input + */ +GLFWAPI const char* glfwGetKeyName(int key, int scancode); + +/*! @brief Returns the platform-specific scancode of the specified key. + * + * This function returns the platform-specific scancode of the specified key. + * + * If the key is `GLFW_KEY_UNKNOWN` or does not exist on the keyboard this + * method will return `-1`. + * + * @param[in] key Any [named key](@ref keys). + * @return The platform-specific scancode for the key, or `-1` if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref input_key + * + * @since Added in version 3.3. + * + * @ingroup input + */ +GLFWAPI int glfwGetKeyScancode(int key); + +/*! @brief Returns the last reported state of a keyboard key for the specified + * window. + * + * This function returns the last state reported for the specified key to the + * specified window. The returned state is one of `GLFW_PRESS` or + * `GLFW_RELEASE`. The higher-level action `GLFW_REPEAT` is only reported to + * the key callback. + * + * If the @ref GLFW_STICKY_KEYS input mode is enabled, this function returns + * `GLFW_PRESS` the first time you call it for a key that was pressed, even if + * that key has already been released. + * + * The key functions deal with physical keys, with [key tokens](@ref keys) + * named after their use on the standard US keyboard layout. If you want to + * input text, use the Unicode character callback instead. + * + * The [modifier key bit masks](@ref mods) are not key tokens and cannot be + * used with this function. + * + * __Do not use this function__ to implement [text input](@ref input_char). + * + * @param[in] window The desired window. + * @param[in] key The desired [keyboard key](@ref keys). `GLFW_KEY_UNKNOWN` is + * not a valid key for this function. + * @return One of `GLFW_PRESS` or `GLFW_RELEASE`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_INVALID_ENUM. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref input_key + * + * @since Added in version 1.0. + * @glfw3 Added window handle parameter. + * + * @ingroup input + */ +GLFWAPI int glfwGetKey(GLFWwindow* window, int key); + +/*! @brief Returns the last reported state of a mouse button for the specified + * window. + * + * This function returns the last state reported for the specified mouse button + * to the specified window. The returned state is one of `GLFW_PRESS` or + * `GLFW_RELEASE`. + * + * If the @ref GLFW_STICKY_MOUSE_BUTTONS input mode is enabled, this function + * returns `GLFW_PRESS` the first time you call it for a mouse button that was + * pressed, even if that mouse button has already been released. + * + * @param[in] window The desired window. + * @param[in] button The desired [mouse button](@ref buttons). + * @return One of `GLFW_PRESS` or `GLFW_RELEASE`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_INVALID_ENUM. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref input_mouse_button + * + * @since Added in version 1.0. + * @glfw3 Added window handle parameter. + * + * @ingroup input + */ +GLFWAPI int glfwGetMouseButton(GLFWwindow* window, int button); + +/*! @brief Retrieves the position of the cursor relative to the client area of + * the window. + * + * This function returns the position of the cursor, in screen coordinates, + * relative to the upper-left corner of the client area of the specified + * window. + * + * If the cursor is disabled (with `GLFW_CURSOR_DISABLED`) then the cursor + * position is unbounded and limited only by the minimum and maximum values of + * a `double`. + * + * The coordinate can be converted to their integer equivalents with the + * `floor` function. Casting directly to an integer type works for positive + * coordinates, but fails for negative ones. + * + * Any or all of the position arguments may be `NULL`. If an error occurs, all + * non-`NULL` position arguments will be set to zero. + * + * @param[in] window The desired window. + * @param[out] xpos Where to store the cursor x-coordinate, relative to the + * left edge of the client area, or `NULL`. + * @param[out] ypos Where to store the cursor y-coordinate, relative to the to + * top edge of the client area, or `NULL`. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref cursor_pos + * @sa @ref glfwSetCursorPos + * + * @since Added in version 3.0. Replaces `glfwGetMousePos`. + * + * @ingroup input + */ +GLFWAPI void glfwGetCursorPos(GLFWwindow* window, double* xpos, double* ypos); + +/*! @brief Sets the position of the cursor, relative to the client area of the + * window. + * + * This function sets the position, in screen coordinates, of the cursor + * relative to the upper-left corner of the client area of the specified + * window. The window must have input focus. If the window does not have + * input focus when this function is called, it fails silently. + * + * __Do not use this function__ to implement things like camera controls. GLFW + * already provides the `GLFW_CURSOR_DISABLED` cursor mode that hides the + * cursor, transparently re-centers it and provides unconstrained cursor + * motion. See @ref glfwSetInputMode for more information. + * + * If the cursor mode is `GLFW_CURSOR_DISABLED` then the cursor position is + * unconstrained and limited only by the minimum and maximum values of + * a `double`. + * + * @param[in] window The desired window. + * @param[in] xpos The desired x-coordinate, relative to the left edge of the + * client area. + * @param[in] ypos The desired y-coordinate, relative to the top edge of the + * client area. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @remark @wayland This function will only work when the cursor mode is + * `GLFW_CURSOR_DISABLED`, otherwise it will do nothing. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref cursor_pos + * @sa @ref glfwGetCursorPos + * + * @since Added in version 3.0. Replaces `glfwSetMousePos`. + * + * @ingroup input + */ +GLFWAPI void glfwSetCursorPos(GLFWwindow* window, double xpos, double ypos); + +/*! @brief Creates a custom cursor. + * + * Creates a new custom cursor image that can be set for a window with @ref + * glfwSetCursor. The cursor can be destroyed with @ref glfwDestroyCursor. + * Any remaining cursors are destroyed by @ref glfwTerminate. + * + * The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight + * bits per channel with the red channel first. They are arranged canonically + * as packed sequential rows, starting from the top-left corner. + * + * The cursor hotspot is specified in pixels, relative to the upper-left corner + * of the cursor image. Like all other coordinate systems in GLFW, the X-axis + * points to the right and the Y-axis points down. + * + * @param[in] image The desired cursor image. + * @param[in] xhot The desired x-coordinate, in pixels, of the cursor hotspot. + * @param[in] yhot The desired y-coordinate, in pixels, of the cursor hotspot. + * @return The handle of the created cursor, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @pointer_lifetime The specified image data is copied before this function + * returns. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref cursor_object + * @sa @ref glfwDestroyCursor + * @sa @ref glfwCreateStandardCursor + * + * @since Added in version 3.1. + * + * @ingroup input + */ +GLFWAPI GLFWcursor* glfwCreateCursor(const GLFWimage* image, int xhot, int yhot); + +/*! @brief Creates a cursor with a standard shape. + * + * Returns a cursor with a [standard shape](@ref shapes), that can be set for + * a window with @ref glfwSetCursor. + * + * @param[in] shape One of the [standard shapes](@ref shapes). + * @return A new cursor ready to use or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref cursor_object + * @sa @ref glfwCreateCursor + * + * @since Added in version 3.1. + * + * @ingroup input + */ +GLFWAPI GLFWcursor* glfwCreateStandardCursor(int shape); + +/*! @brief Destroys a cursor. + * + * This function destroys a cursor previously created with @ref + * glfwCreateCursor. Any remaining cursors will be destroyed by @ref + * glfwTerminate. + * + * If the specified cursor is current for any window, that window will be + * reverted to the default cursor. This does not affect the cursor mode. + * + * @param[in] cursor The cursor object to destroy. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @reentrancy This function must not be called from a callback. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref cursor_object + * @sa @ref glfwCreateCursor + * + * @since Added in version 3.1. + * + * @ingroup input + */ +GLFWAPI void glfwDestroyCursor(GLFWcursor* cursor); + +/*! @brief Sets the cursor for the window. + * + * This function sets the cursor image to be used when the cursor is over the + * client area of the specified window. The set cursor will only be visible + * when the [cursor mode](@ref cursor_mode) of the window is + * `GLFW_CURSOR_NORMAL`. + * + * On some platforms, the set cursor may not be visible unless the window also + * has input focus. + * + * @param[in] window The window to set the cursor for. + * @param[in] cursor The cursor to set, or `NULL` to switch back to the default + * arrow cursor. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref cursor_object + * + * @since Added in version 3.1. + * + * @ingroup input + */ +GLFWAPI void glfwSetCursor(GLFWwindow* window, GLFWcursor* cursor); + +/*! @brief Sets the key callback. + * + * This function sets the key callback of the specified window, which is called + * when a key is pressed, repeated or released. + * + * The key functions deal with physical keys, with layout independent + * [key tokens](@ref keys) named after their values in the standard US keyboard + * layout. If you want to input text, use the + * [character callback](@ref glfwSetCharCallback) instead. + * + * When a window loses input focus, it will generate synthetic key release + * events for all pressed keys. You can tell these events from user-generated + * events by the fact that the synthetic ones are generated after the focus + * loss event has been processed, i.e. after the + * [window focus callback](@ref glfwSetWindowFocusCallback) has been called. + * + * The scancode of a key is specific to that platform or sometimes even to that + * machine. Scancodes are intended to allow users to bind keys that don't have + * a GLFW key token. Such keys have `key` set to `GLFW_KEY_UNKNOWN`, their + * state is not saved and so it cannot be queried with @ref glfwGetKey. + * + * Sometimes GLFW needs to generate synthetic key events, in which case the + * scancode may be zero. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new key callback, or `NULL` to remove the currently + * set callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref input_key + * + * @since Added in version 1.0. + * @glfw3 Added window handle parameter and return value. + * + * @ingroup input + */ +GLFWAPI GLFWkeyfun glfwSetKeyCallback(GLFWwindow* window, GLFWkeyfun cbfun); + +/*! @brief Sets the Unicode character callback. + * + * This function sets the character callback of the specified window, which is + * called when a Unicode character is input. + * + * The character callback is intended for Unicode text input. As it deals with + * characters, it is keyboard layout dependent, whereas the + * [key callback](@ref glfwSetKeyCallback) is not. Characters do not map 1:1 + * to physical keys, as a key may produce zero, one or more characters. If you + * want to know whether a specific physical key was pressed or released, see + * the key callback instead. + * + * The character callback behaves as system text input normally does and will + * not be called if modifier keys are held down that would prevent normal text + * input on that platform, for example a Super (Command) key on macOS or Alt key + * on Windows. There is a + * [character with modifiers callback](@ref glfwSetCharModsCallback) that + * receives these events. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref input_char + * + * @since Added in version 2.4. + * @glfw3 Added window handle parameter and return value. + * + * @ingroup input + */ +GLFWAPI GLFWcharfun glfwSetCharCallback(GLFWwindow* window, GLFWcharfun cbfun); + +/*! @brief Sets the Unicode character with modifiers callback. + * + * This function sets the character with modifiers callback of the specified + * window, which is called when a Unicode character is input regardless of what + * modifier keys are used. + * + * The character with modifiers callback is intended for implementing custom + * Unicode character input. For regular Unicode text input, see the + * [character callback](@ref glfwSetCharCallback). Like the character + * callback, the character with modifiers callback deals with characters and is + * keyboard layout dependent. Characters do not map 1:1 to physical keys, as + * a key may produce zero, one or more characters. If you want to know whether + * a specific physical key was pressed or released, see the + * [key callback](@ref glfwSetKeyCallback) instead. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or an + * [error](@ref error_handling) occurred. + * + * @deprecated Scheduled for removal in version 4.0. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref input_char + * + * @since Added in version 3.1. + * + * @ingroup input + */ +GLFWAPI GLFWcharmodsfun glfwSetCharModsCallback(GLFWwindow* window, GLFWcharmodsfun cbfun); + +/*! @brief Sets the mouse button callback. + * + * This function sets the mouse button callback of the specified window, which + * is called when a mouse button is pressed or released. + * + * When a window loses input focus, it will generate synthetic mouse button + * release events for all pressed mouse buttons. You can tell these events + * from user-generated events by the fact that the synthetic ones are generated + * after the focus loss event has been processed, i.e. after the + * [window focus callback](@ref glfwSetWindowFocusCallback) has been called. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref input_mouse_button + * + * @since Added in version 1.0. + * @glfw3 Added window handle parameter and return value. + * + * @ingroup input + */ +GLFWAPI GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow* window, GLFWmousebuttonfun cbfun); + +/*! @brief Sets the cursor position callback. + * + * This function sets the cursor position callback of the specified window, + * which is called when the cursor is moved. The callback is provided with the + * position, in screen coordinates, relative to the upper-left corner of the + * client area of the window. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref cursor_pos + * + * @since Added in version 3.0. Replaces `glfwSetMousePosCallback`. + * + * @ingroup input + */ +GLFWAPI GLFWcursorposfun glfwSetCursorPosCallback(GLFWwindow* window, GLFWcursorposfun cbfun); + +/*! @brief Sets the cursor enter/exit callback. + * + * This function sets the cursor boundary crossing callback of the specified + * window, which is called when the cursor enters or leaves the client area of + * the window. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref cursor_enter + * + * @since Added in version 3.0. + * + * @ingroup input + */ +GLFWAPI GLFWcursorenterfun glfwSetCursorEnterCallback(GLFWwindow* window, GLFWcursorenterfun cbfun); + +/*! @brief Sets the scroll callback. + * + * This function sets the scroll callback of the specified window, which is + * called when a scrolling device is used, such as a mouse wheel or scrolling + * area of a touchpad. + * + * The scroll callback receives all scrolling input, like that from a mouse + * wheel or a touchpad scrolling area. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new scroll callback, or `NULL` to remove the currently + * set callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref scrolling + * + * @since Added in version 3.0. Replaces `glfwSetMouseWheelCallback`. + * + * @ingroup input + */ +GLFWAPI GLFWscrollfun glfwSetScrollCallback(GLFWwindow* window, GLFWscrollfun cbfun); + +/*! @brief Sets the file drop callback. + * + * This function sets the file drop callback of the specified window, which is + * called when one or more dragged files are dropped on the window. + * + * Because the path array and its strings may have been generated specifically + * for that event, they are not guaranteed to be valid after the callback has + * returned. If you wish to use them after the callback returns, you need to + * make a deep copy. + * + * @param[in] window The window whose callback to set. + * @param[in] cbfun The new file drop callback, or `NULL` to remove the + * currently set callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @remark @wayland File drop is currently unimplemented. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref path_drop + * + * @since Added in version 3.1. + * + * @ingroup input + */ +GLFWAPI GLFWdropfun glfwSetDropCallback(GLFWwindow* window, GLFWdropfun cbfun); + +/*! @brief Returns whether the specified joystick is present. + * + * This function returns whether the specified joystick is present. + * + * There is no need to call this function before other functions that accept + * a joystick ID, as they all check for presence before performing any other + * work. + * + * @param[in] jid The [joystick](@ref joysticks) to query. + * @return `GLFW_TRUE` if the joystick is present, or `GLFW_FALSE` otherwise. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref joystick + * + * @since Added in version 3.0. Replaces `glfwGetJoystickParam`. + * + * @ingroup input + */ +GLFWAPI int glfwJoystickPresent(int jid); + +/*! @brief Returns the values of all axes of the specified joystick. + * + * This function returns the values of all axes of the specified joystick. + * Each element in the array is a value between -1.0 and 1.0. + * + * If the specified joystick is not present this function will return `NULL` + * but will not generate an error. This can be used instead of first calling + * @ref glfwJoystickPresent. + * + * @param[in] jid The [joystick](@ref joysticks) to query. + * @param[out] count Where to store the number of axis values in the returned + * array. This is set to zero if the joystick is not present or an error + * occurred. + * @return An array of axis values, or `NULL` if the joystick is not present or + * an [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. + * + * @pointer_lifetime The returned array is allocated and freed by GLFW. You + * should not free it yourself. It is valid until the specified joystick is + * disconnected or the library is terminated. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref joystick_axis + * + * @since Added in version 3.0. Replaces `glfwGetJoystickPos`. + * + * @ingroup input + */ +GLFWAPI const float* glfwGetJoystickAxes(int jid, int* count); + +/*! @brief Returns the state of all buttons of the specified joystick. + * + * This function returns the state of all buttons of the specified joystick. + * Each element in the array is either `GLFW_PRESS` or `GLFW_RELEASE`. + * + * For backward compatibility with earlier versions that did not have @ref + * glfwGetJoystickHats, the button array also includes all hats, each + * represented as four buttons. The hats are in the same order as returned by + * __glfwGetJoystickHats__ and are in the order _up_, _right_, _down_ and + * _left_. To disable these extra buttons, set the @ref + * GLFW_JOYSTICK_HAT_BUTTONS init hint before initialization. + * + * If the specified joystick is not present this function will return `NULL` + * but will not generate an error. This can be used instead of first calling + * @ref glfwJoystickPresent. + * + * @param[in] jid The [joystick](@ref joysticks) to query. + * @param[out] count Where to store the number of button states in the returned + * array. This is set to zero if the joystick is not present or an error + * occurred. + * @return An array of button states, or `NULL` if the joystick is not present + * or an [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. + * + * @pointer_lifetime The returned array is allocated and freed by GLFW. You + * should not free it yourself. It is valid until the specified joystick is + * disconnected or the library is terminated. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref joystick_button + * + * @since Added in version 2.2. + * @glfw3 Changed to return a dynamic array. + * + * @ingroup input + */ +GLFWAPI const unsigned char* glfwGetJoystickButtons(int jid, int* count); + +/*! @brief Returns the state of all hats of the specified joystick. + * + * This function returns the state of all hats of the specified joystick. + * Each element in the array is one of the following values: + * + * Name | Value + * --------------------- | -------------------------------- + * `GLFW_HAT_CENTERED` | 0 + * `GLFW_HAT_UP` | 1 + * `GLFW_HAT_RIGHT` | 2 + * `GLFW_HAT_DOWN` | 4 + * `GLFW_HAT_LEFT` | 8 + * `GLFW_HAT_RIGHT_UP` | `GLFW_HAT_RIGHT` \| `GLFW_HAT_UP` + * `GLFW_HAT_RIGHT_DOWN` | `GLFW_HAT_RIGHT` \| `GLFW_HAT_DOWN` + * `GLFW_HAT_LEFT_UP` | `GLFW_HAT_LEFT` \| `GLFW_HAT_UP` + * `GLFW_HAT_LEFT_DOWN` | `GLFW_HAT_LEFT` \| `GLFW_HAT_DOWN` + * + * The diagonal directions are bitwise combinations of the primary (up, right, + * down and left) directions and you can test for these individually by ANDing + * it with the corresponding direction. + * + * @code + * if (hats[2] & GLFW_HAT_RIGHT) + * { + * // State of hat 2 could be right-up, right or right-down + * } + * @endcode + * + * If the specified joystick is not present this function will return `NULL` + * but will not generate an error. This can be used instead of first calling + * @ref glfwJoystickPresent. + * + * @param[in] jid The [joystick](@ref joysticks) to query. + * @param[out] count Where to store the number of hat states in the returned + * array. This is set to zero if the joystick is not present or an error + * occurred. + * @return An array of hat states, or `NULL` if the joystick is not present + * or an [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. + * + * @pointer_lifetime The returned array is allocated and freed by GLFW. You + * should not free it yourself. It is valid until the specified joystick is + * disconnected, this function is called again for that joystick or the library + * is terminated. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref joystick_hat + * + * @since Added in version 3.3. + * + * @ingroup input + */ +GLFWAPI const unsigned char* glfwGetJoystickHats(int jid, int* count); + +/*! @brief Returns the name of the specified joystick. + * + * This function returns the name, encoded as UTF-8, of the specified joystick. + * The returned string is allocated and freed by GLFW. You should not free it + * yourself. + * + * If the specified joystick is not present this function will return `NULL` + * but will not generate an error. This can be used instead of first calling + * @ref glfwJoystickPresent. + * + * @param[in] jid The [joystick](@ref joysticks) to query. + * @return The UTF-8 encoded name of the joystick, or `NULL` if the joystick + * is not present or an [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. + * + * @pointer_lifetime The returned string is allocated and freed by GLFW. You + * should not free it yourself. It is valid until the specified joystick is + * disconnected or the library is terminated. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref joystick_name + * + * @since Added in version 3.0. + * + * @ingroup input + */ +GLFWAPI const char* glfwGetJoystickName(int jid); + +/*! @brief Returns the SDL comaptible GUID of the specified joystick. + * + * This function returns the SDL compatible GUID, as a UTF-8 encoded + * hexadecimal string, of the specified joystick. The returned string is + * allocated and freed by GLFW. You should not free it yourself. + * + * The GUID is what connects a joystick to a gamepad mapping. A connected + * joystick will always have a GUID even if there is no gamepad mapping + * assigned to it. + * + * If the specified joystick is not present this function will return `NULL` + * but will not generate an error. This can be used instead of first calling + * @ref glfwJoystickPresent. + * + * The GUID uses the format introduced in SDL 2.0.5. This GUID tries to + * uniquely identify the make and model of a joystick but does not identify + * a specific unit, e.g. all wired Xbox 360 controllers will have the same + * GUID on that platform. The GUID for a unit may vary between platforms + * depending on what hardware information the platform specific APIs provide. + * + * @param[in] jid The [joystick](@ref joysticks) to query. + * @return The UTF-8 encoded GUID of the joystick, or `NULL` if the joystick + * is not present or an [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. + * + * @pointer_lifetime The returned string is allocated and freed by GLFW. You + * should not free it yourself. It is valid until the specified joystick is + * disconnected or the library is terminated. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref gamepad + * + * @since Added in version 3.3. + * + * @ingroup input + */ +GLFWAPI const char* glfwGetJoystickGUID(int jid); + +/*! @brief Sets the user pointer of the specified joystick. + * + * This function sets the user-defined pointer of the specified joystick. The + * current value is retained until the joystick is disconnected. The initial + * value is `NULL`. + * + * This function may be called from the joystick callback, even for a joystick + * that is being disconnected. + * + * @param[in] jid The joystick whose pointer to set. + * @param[in] pointer The new value. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @sa @ref joystick_userptr + * @sa @ref glfwGetJoystickUserPointer + * + * @since Added in version 3.3. + * + * @ingroup input + */ +GLFWAPI void glfwSetJoystickUserPointer(int jid, void* pointer); + +/*! @brief Returns the user pointer of the specified joystick. + * + * This function returns the current value of the user-defined pointer of the + * specified joystick. The initial value is `NULL`. + * + * This function may be called from the joystick callback, even for a joystick + * that is being disconnected. + * + * @param[in] jid The joystick whose pointer to return. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @sa @ref joystick_userptr + * @sa @ref glfwSetJoystickUserPointer + * + * @since Added in version 3.3. + * + * @ingroup input + */ +GLFWAPI void* glfwGetJoystickUserPointer(int jid); + +/*! @brief Returns whether the specified joystick has a gamepad mapping. + * + * This function returns whether the specified joystick is both present and has + * a gamepad mapping. + * + * If the specified joystick is present but does not have a gamepad mapping + * this function will return `GLFW_FALSE` but will not generate an error. Call + * @ref glfwJoystickPresent to check if a joystick is present regardless of + * whether it has a mapping. + * + * @param[in] jid The [joystick](@ref joysticks) to query. + * @return `GLFW_TRUE` if a joystick is both present and has a gamepad mapping, + * or `GLFW_FALSE` otherwise. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_INVALID_ENUM. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref gamepad + * @sa @ref glfwGetGamepadState + * + * @since Added in version 3.3. + * + * @ingroup input + */ +GLFWAPI int glfwJoystickIsGamepad(int jid); + +/*! @brief Sets the joystick configuration callback. + * + * This function sets the joystick configuration callback, or removes the + * currently set callback. This is called when a joystick is connected to or + * disconnected from the system. + * + * For joystick connection and disconnection events to be delivered on all + * platforms, you need to call one of the [event processing](@ref events) + * functions. Joystick disconnection may also be detected and the callback + * called by joystick functions. The function will then return whatever it + * returns if the joystick is not present. + * + * @param[in] cbfun The new callback, or `NULL` to remove the currently set + * callback. + * @return The previously set callback, or `NULL` if no callback was set or the + * library had not been [initialized](@ref intro_init). + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref joystick_event + * + * @since Added in version 3.2. + * + * @ingroup input + */ +GLFWAPI GLFWjoystickfun glfwSetJoystickCallback(GLFWjoystickfun cbfun); + +/*! @brief Adds the specified SDL_GameControllerDB gamepad mappings. + * + * This function parses the specified ASCII encoded string and updates the + * internal list with any gamepad mappings it finds. This string may + * contain either a single gamepad mapping or many mappings separated by + * newlines. The parser supports the full format of the `gamecontrollerdb.txt` + * source file including empty lines and comments. + * + * See @ref gamepad_mapping for a description of the format. + * + * If there is already a gamepad mapping for a given GUID in the internal list, + * it will be replaced by the one passed to this function. If the library is + * terminated and re-initialized the internal list will revert to the built-in + * default. + * + * @param[in] string The string containing the gamepad mappings. + * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_INVALID_VALUE. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref gamepad + * @sa @ref glfwJoystickIsGamepad + * @sa @ref glfwGetGamepadName + * + * @since Added in version 3.3. + * + * @ingroup input + */ +GLFWAPI int glfwUpdateGamepadMappings(const char* string); + +/*! @brief Returns the human-readable gamepad name for the specified joystick. + * + * This function returns the human-readable name of the gamepad from the + * gamepad mapping assigned to the specified joystick. + * + * If the specified joystick is not present or does not have a gamepad mapping + * this function will return `NULL` but will not generate an error. Call + * @ref glfwJoystickPresent to check whether it is present regardless of + * whether it has a mapping. + * + * @param[in] jid The [joystick](@ref joysticks) to query. + * @return The UTF-8 encoded name of the gamepad, or `NULL` if the + * joystick is not present, does not have a mapping or an + * [error](@ref error_handling) occurred. + * + * @pointer_lifetime The returned string is allocated and freed by GLFW. You + * should not free it yourself. It is valid until the specified joystick is + * disconnected, the gamepad mappings are updated or the library is terminated. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref gamepad + * @sa @ref glfwJoystickIsGamepad + * + * @since Added in version 3.3. + * + * @ingroup input + */ +GLFWAPI const char* glfwGetGamepadName(int jid); + +/*! @brief Retrieves the state of the specified joystick remapped as a gamepad. + * + * This function retrives the state of the specified joystick remapped to + * an Xbox-like gamepad. + * + * If the specified joystick is not present or does not have a gamepad mapping + * this function will return `GLFW_FALSE` but will not generate an error. Call + * @ref glfwJoystickPresent to check whether it is present regardless of + * whether it has a mapping. + * + * The Guide button may not be available for input as it is often hooked by the + * system or the Steam client. + * + * Not all devices have all the buttons or axes provided by @ref + * GLFWgamepadstate. Unavailable buttons and axes will always report + * `GLFW_RELEASE` and 0.0 respectively. + * + * @param[in] jid The [joystick](@ref joysticks) to query. + * @param[out] state The gamepad input state of the joystick. + * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if no joystick is + * connected, it has no gamepad mapping or an [error](@ref error_handling) + * occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_INVALID_ENUM. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref gamepad + * @sa @ref glfwUpdateGamepadMappings + * @sa @ref glfwJoystickIsGamepad + * + * @since Added in version 3.3. + * + * @ingroup input + */ +GLFWAPI int glfwGetGamepadState(int jid, GLFWgamepadstate* state); + +/*! @brief Sets the clipboard to the specified string. + * + * This function sets the system clipboard to the specified, UTF-8 encoded + * string. + * + * @param[in] window Deprecated. Any valid window or `NULL`. + * @param[in] string A UTF-8 encoded string. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @remark @wayland Clipboard is currently unimplemented. + * + * @pointer_lifetime The specified string is copied before this function + * returns. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref clipboard + * @sa @ref glfwGetClipboardString + * + * @since Added in version 3.0. + * + * @ingroup input + */ +GLFWAPI void glfwSetClipboardString(GLFWwindow* window, const char* string); + +/*! @brief Returns the contents of the clipboard as a string. + * + * This function returns the contents of the system clipboard, if it contains + * or is convertible to a UTF-8 encoded string. If the clipboard is empty or + * if its contents cannot be converted, `NULL` is returned and a @ref + * GLFW_FORMAT_UNAVAILABLE error is generated. + * + * @param[in] window Deprecated. Any valid window or `NULL`. + * @return The contents of the clipboard as a UTF-8 encoded string, or `NULL` + * if an [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @remark @wayland Clipboard is currently unimplemented. + * + * @pointer_lifetime The returned string is allocated and freed by GLFW. You + * should not free it yourself. It is valid until the next call to @ref + * glfwGetClipboardString or @ref glfwSetClipboardString, or until the library + * is terminated. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref clipboard + * @sa @ref glfwSetClipboardString + * + * @since Added in version 3.0. + * + * @ingroup input + */ +GLFWAPI const char* glfwGetClipboardString(GLFWwindow* window); + +/*! @brief Returns the value of the GLFW timer. + * + * This function returns the value of the GLFW timer. Unless the timer has + * been set using @ref glfwSetTime, the timer measures time elapsed since GLFW + * was initialized. + * + * The resolution of the timer is system dependent, but is usually on the order + * of a few micro- or nanoseconds. It uses the highest-resolution monotonic + * time source on each supported platform. + * + * @return The current value, in seconds, or zero if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function may be called from any thread. Reading and + * writing of the internal timer offset is not atomic, so it needs to be + * externally synchronized with calls to @ref glfwSetTime. + * + * @sa @ref time + * + * @since Added in version 1.0. + * + * @ingroup input + */ +GLFWAPI double glfwGetTime(void); + +/*! @brief Sets the GLFW timer. + * + * This function sets the value of the GLFW timer. It then continues to count + * up from that value. The value must be a positive finite number less than + * or equal to 18446744073.0, which is approximately 584.5 years. + * + * @param[in] time The new value, in seconds. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_INVALID_VALUE. + * + * @remark The upper limit of the timer is calculated as + * floor((264 - 1) / 109) and is due to implementations + * storing nanoseconds in 64 bits. The limit may be increased in the future. + * + * @thread_safety This function may be called from any thread. Reading and + * writing of the internal timer offset is not atomic, so it needs to be + * externally synchronized with calls to @ref glfwGetTime. + * + * @sa @ref time + * + * @since Added in version 2.2. + * + * @ingroup input + */ +GLFWAPI void glfwSetTime(double time); + +/*! @brief Returns the current value of the raw timer. + * + * This function returns the current value of the raw timer, measured in + * 1 / frequency seconds. To get the frequency, call @ref + * glfwGetTimerFrequency. + * + * @return The value of the timer, or zero if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref time + * @sa @ref glfwGetTimerFrequency + * + * @since Added in version 3.2. + * + * @ingroup input + */ +GLFWAPI uint64_t glfwGetTimerValue(void); + +/*! @brief Returns the frequency, in Hz, of the raw timer. + * + * This function returns the frequency, in Hz, of the raw timer. + * + * @return The frequency of the timer, in Hz, or zero if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref time + * @sa @ref glfwGetTimerValue + * + * @since Added in version 3.2. + * + * @ingroup input + */ +GLFWAPI uint64_t glfwGetTimerFrequency(void); + +/*! @brief Makes the context of the specified window current for the calling + * thread. + * + * This function makes the OpenGL or OpenGL ES context of the specified window + * current on the calling thread. A context must only be made current on + * a single thread at a time and each thread can have only a single current + * context at a time. + * + * When moving a context between threads, you must make it non-current on the + * old thread before making it current on the new one. + * + * By default, making a context non-current implicitly forces a pipeline flush. + * On machines that support `GL_KHR_context_flush_control`, you can control + * whether a context performs this flush by setting the + * [GLFW_CONTEXT_RELEASE_BEHAVIOR](@ref GLFW_CONTEXT_RELEASE_BEHAVIOR_hint) + * hint. + * + * The specified window must have an OpenGL or OpenGL ES context. Specifying + * a window without a context will generate a @ref GLFW_NO_WINDOW_CONTEXT + * error. + * + * @param[in] window The window whose context to make current, or `NULL` to + * detach the current context. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref context_current + * @sa @ref glfwGetCurrentContext + * + * @since Added in version 3.0. + * + * @ingroup context + */ +GLFWAPI void glfwMakeContextCurrent(GLFWwindow* window); + +/*! @brief Returns the window whose context is current on the calling thread. + * + * This function returns the window whose OpenGL or OpenGL ES context is + * current on the calling thread. + * + * @return The window whose context is current, or `NULL` if no window's + * context is current. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref context_current + * @sa @ref glfwMakeContextCurrent + * + * @since Added in version 3.0. + * + * @ingroup context + */ +GLFWAPI GLFWwindow* glfwGetCurrentContext(void); + +/*! @brief Swaps the front and back buffers of the specified window. + * + * This function swaps the front and back buffers of the specified window when + * rendering with OpenGL or OpenGL ES. If the swap interval is greater than + * zero, the GPU driver waits the specified number of screen updates before + * swapping the buffers. + * + * The specified window must have an OpenGL or OpenGL ES context. Specifying + * a window without a context will generate a @ref GLFW_NO_WINDOW_CONTEXT + * error. + * + * This function does not apply to Vulkan. If you are rendering with Vulkan, + * see `vkQueuePresentKHR` instead. + * + * @param[in] window The window whose buffers to swap. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR. + * + * @remark __EGL:__ The context of the specified window must be current on the + * calling thread. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref buffer_swap + * @sa @ref glfwSwapInterval + * + * @since Added in version 1.0. + * @glfw3 Added window handle parameter. + * + * @ingroup window + */ +GLFWAPI void glfwSwapBuffers(GLFWwindow* window); + +/*! @brief Sets the swap interval for the current context. + * + * This function sets the swap interval for the current OpenGL or OpenGL ES + * context, i.e. the number of screen updates to wait from the time @ref + * glfwSwapBuffers was called before swapping the buffers and returning. This + * is sometimes called _vertical synchronization_, _vertical retrace + * synchronization_ or just _vsync_. + * + * A context that supports either of the `WGL_EXT_swap_control_tear` and + * `GLX_EXT_swap_control_tear` extensions also accepts _negative_ swap + * intervals, which allows the driver to swap immediately even if a frame + * arrives a little bit late. You can check for these extensions with @ref + * glfwExtensionSupported. + * + * A context must be current on the calling thread. Calling this function + * without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error. + * + * This function does not apply to Vulkan. If you are rendering with Vulkan, + * see the present mode of your swapchain instead. + * + * @param[in] interval The minimum number of screen updates to wait for + * until the buffers are swapped by @ref glfwSwapBuffers. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_NO_CURRENT_CONTEXT and @ref GLFW_PLATFORM_ERROR. + * + * @remark This function is not called during context creation, leaving the + * swap interval set to whatever is the default on that platform. This is done + * because some swap interval extensions used by GLFW do not allow the swap + * interval to be reset to zero once it has been set to a non-zero value. + * + * @remark Some GPU drivers do not honor the requested swap interval, either + * because of a user setting that overrides the application's request or due to + * bugs in the driver. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref buffer_swap + * @sa @ref glfwSwapBuffers + * + * @since Added in version 1.0. + * + * @ingroup context + */ +GLFWAPI void glfwSwapInterval(int interval); + +/*! @brief Returns whether the specified extension is available. + * + * This function returns whether the specified + * [API extension](@ref context_glext) is supported by the current OpenGL or + * OpenGL ES context. It searches both for client API extension and context + * creation API extensions. + * + * A context must be current on the calling thread. Calling this function + * without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error. + * + * As this functions retrieves and searches one or more extension strings each + * call, it is recommended that you cache its results if it is going to be used + * frequently. The extension strings will not change during the lifetime of + * a context, so there is no danger in doing this. + * + * This function does not apply to Vulkan. If you are using Vulkan, see @ref + * glfwGetRequiredInstanceExtensions, `vkEnumerateInstanceExtensionProperties` + * and `vkEnumerateDeviceExtensionProperties` instead. + * + * @param[in] extension The ASCII encoded name of the extension. + * @return `GLFW_TRUE` if the extension is available, or `GLFW_FALSE` + * otherwise. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_NO_CURRENT_CONTEXT, @ref GLFW_INVALID_VALUE and @ref + * GLFW_PLATFORM_ERROR. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref context_glext + * @sa @ref glfwGetProcAddress + * + * @since Added in version 1.0. + * + * @ingroup context + */ +GLFWAPI int glfwExtensionSupported(const char* extension); + +/*! @brief Returns the address of the specified function for the current + * context. + * + * This function returns the address of the specified OpenGL or OpenGL ES + * [core or extension function](@ref context_glext), if it is supported + * by the current context. + * + * A context must be current on the calling thread. Calling this function + * without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error. + * + * This function does not apply to Vulkan. If you are rendering with Vulkan, + * see @ref glfwGetInstanceProcAddress, `vkGetInstanceProcAddr` and + * `vkGetDeviceProcAddr` instead. + * + * @param[in] procname The ASCII encoded name of the function. + * @return The address of the function, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_NO_CURRENT_CONTEXT and @ref GLFW_PLATFORM_ERROR. + * + * @remark The address of a given function is not guaranteed to be the same + * between contexts. + * + * @remark This function may return a non-`NULL` address despite the + * associated version or extension not being available. Always check the + * context version or extension string first. + * + * @pointer_lifetime The returned function pointer is valid until the context + * is destroyed or the library is terminated. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref context_glext + * @sa @ref glfwExtensionSupported + * + * @since Added in version 1.0. + * + * @ingroup context + */ +GLFWAPI GLFWglproc glfwGetProcAddress(const char* procname); + +/*! @brief Returns whether the Vulkan loader and an ICD have been found. + * + * This function returns whether the Vulkan loader and any minimally functional + * ICD have been found. + * + * The availability of a Vulkan loader and even an ICD does not by itself + * guarantee that surface creation or even instance creation is possible. + * For example, on Fermi systems Nvidia will install an ICD that provides no + * actual Vulkan support. Call @ref glfwGetRequiredInstanceExtensions to check + * whether the extensions necessary for Vulkan surface creation are available + * and @ref glfwGetPhysicalDevicePresentationSupport to check whether a queue + * family of a physical device supports image presentation. + * + * @return `GLFW_TRUE` if Vulkan is minimally available, or `GLFW_FALSE` + * otherwise. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref vulkan_support + * + * @since Added in version 3.2. + * + * @ingroup vulkan + */ +GLFWAPI int glfwVulkanSupported(void); + +/*! @brief Returns the Vulkan instance extensions required by GLFW. + * + * This function returns an array of names of Vulkan instance extensions required + * by GLFW for creating Vulkan surfaces for GLFW windows. If successful, the + * list will always contains `VK_KHR_surface`, so if you don't require any + * additional extensions you can pass this list directly to the + * `VkInstanceCreateInfo` struct. + * + * If Vulkan is not available on the machine, this function returns `NULL` and + * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported + * to check whether Vulkan is at least minimally available. + * + * If Vulkan is available but no set of extensions allowing window surface + * creation was found, this function returns `NULL`. You may still use Vulkan + * for off-screen rendering and compute work. + * + * @param[out] count Where to store the number of extensions in the returned + * array. This is set to zero if an error occurred. + * @return An array of ASCII encoded extension names, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_API_UNAVAILABLE. + * + * @remark Additional extensions may be required by future versions of GLFW. + * You should check if any extensions you wish to enable are already in the + * returned array, as it is an error to specify an extension more than once in + * the `VkInstanceCreateInfo` struct. + * + * @remark @macos This function currently only supports the + * `VK_MVK_macos_surface` extension from MoltenVK. + * + * @pointer_lifetime The returned array is allocated and freed by GLFW. You + * should not free it yourself. It is guaranteed to be valid only until the + * library is terminated. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref vulkan_ext + * @sa @ref glfwCreateWindowSurface + * + * @since Added in version 3.2. + * + * @ingroup vulkan + */ +GLFWAPI const char** glfwGetRequiredInstanceExtensions(uint32_t* count); + +#if defined(VK_VERSION_1_0) + +/*! @brief Returns the address of the specified Vulkan instance function. + * + * This function returns the address of the specified Vulkan core or extension + * function for the specified instance. If instance is set to `NULL` it can + * return any function exported from the Vulkan loader, including at least the + * following functions: + * + * - `vkEnumerateInstanceExtensionProperties` + * - `vkEnumerateInstanceLayerProperties` + * - `vkCreateInstance` + * - `vkGetInstanceProcAddr` + * + * If Vulkan is not available on the machine, this function returns `NULL` and + * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported + * to check whether Vulkan is at least minimally available. + * + * This function is equivalent to calling `vkGetInstanceProcAddr` with + * a platform-specific query of the Vulkan loader as a fallback. + * + * @param[in] instance The Vulkan instance to query, or `NULL` to retrieve + * functions related to instance creation. + * @param[in] procname The ASCII encoded name of the function. + * @return The address of the function, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_API_UNAVAILABLE. + * + * @pointer_lifetime The returned function pointer is valid until the library + * is terminated. + * + * @thread_safety This function may be called from any thread. + * + * @sa @ref vulkan_proc + * + * @since Added in version 3.2. + * + * @ingroup vulkan + */ +GLFWAPI GLFWvkproc glfwGetInstanceProcAddress(VkInstance instance, const char* procname); + +/*! @brief Returns whether the specified queue family can present images. + * + * This function returns whether the specified queue family of the specified + * physical device supports presentation to the platform GLFW was built for. + * + * If Vulkan or the required window surface creation instance extensions are + * not available on the machine, or if the specified instance was not created + * with the required extensions, this function returns `GLFW_FALSE` and + * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported + * to check whether Vulkan is at least minimally available and @ref + * glfwGetRequiredInstanceExtensions to check what instance extensions are + * required. + * + * @param[in] instance The instance that the physical device belongs to. + * @param[in] device The physical device that the queue family belongs to. + * @param[in] queuefamily The index of the queue family to query. + * @return `GLFW_TRUE` if the queue family supports presentation, or + * `GLFW_FALSE` otherwise. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_API_UNAVAILABLE and @ref GLFW_PLATFORM_ERROR. + * + * @remark @macos This function currently always returns `GLFW_TRUE`, as the + * `VK_MVK_macos_surface` extension does not provide + * a `vkGetPhysicalDevice*PresentationSupport` type function. + * + * @thread_safety This function may be called from any thread. For + * synchronization details of Vulkan objects, see the Vulkan specification. + * + * @sa @ref vulkan_present + * + * @since Added in version 3.2. + * + * @ingroup vulkan + */ +GLFWAPI int glfwGetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily); + +/*! @brief Creates a Vulkan surface for the specified window. + * + * This function creates a Vulkan surface for the specified window. + * + * If the Vulkan loader or at least one minimally functional ICD were not found, + * this function returns `VK_ERROR_INITIALIZATION_FAILED` and generates a @ref + * GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported to check whether + * Vulkan is at least minimally available. + * + * If the required window surface creation instance extensions are not + * available or if the specified instance was not created with these extensions + * enabled, this function returns `VK_ERROR_EXTENSION_NOT_PRESENT` and + * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref + * glfwGetRequiredInstanceExtensions to check what instance extensions are + * required. + * + * The window surface cannot be shared with another API so the window must + * have been created with the [client api hint](@ref GLFW_CLIENT_API_attrib) + * set to `GLFW_NO_API` otherwise it generates a @ref GLFW_INVALID_VALUE error + * and returns `VK_ERROR_NATIVE_WINDOW_IN_USE_KHR`. + * + * The window surface must be destroyed before the specified Vulkan instance. + * It is the responsibility of the caller to destroy the window surface. GLFW + * does not destroy it for you. Call `vkDestroySurfaceKHR` to destroy the + * surface. + * + * @param[in] instance The Vulkan instance to create the surface in. + * @param[in] window The window to create the surface for. + * @param[in] allocator The allocator to use, or `NULL` to use the default + * allocator. + * @param[out] surface Where to store the handle of the surface. This is set + * to `VK_NULL_HANDLE` if an error occurred. + * @return `VK_SUCCESS` if successful, or a Vulkan error code if an + * [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref + * GLFW_API_UNAVAILABLE, @ref GLFW_PLATFORM_ERROR and @ref GLFW_INVALID_VALUE + * + * @remark If an error occurs before the creation call is made, GLFW returns + * the Vulkan error code most appropriate for the error. Appropriate use of + * @ref glfwVulkanSupported and @ref glfwGetRequiredInstanceExtensions should + * eliminate almost all occurrences of these errors. + * + * @remark @macos This function currently only supports the + * `VK_MVK_macos_surface` extension from MoltenVK. + * + * @remark @macos This function creates and sets a `CAMetalLayer` instance for + * the window content view, which is required for MoltenVK to function. + * + * @thread_safety This function may be called from any thread. For + * synchronization details of Vulkan objects, see the Vulkan specification. + * + * @sa @ref vulkan_surface + * @sa @ref glfwGetRequiredInstanceExtensions + * + * @since Added in version 3.2. + * + * @ingroup vulkan + */ +GLFWAPI VkResult glfwCreateWindowSurface(VkInstance instance, GLFWwindow* window, const VkAllocationCallbacks* allocator, VkSurfaceKHR* surface); + +#endif /*VK_VERSION_1_0*/ + + +/************************************************************************* + * Global definition cleanup + *************************************************************************/ + +/* ------------------- BEGIN SYSTEM/COMPILER SPECIFIC -------------------- */ + +#ifdef GLFW_WINGDIAPI_DEFINED + #undef WINGDIAPI + #undef GLFW_WINGDIAPI_DEFINED +#endif + +#ifdef GLFW_CALLBACK_DEFINED + #undef CALLBACK + #undef GLFW_CALLBACK_DEFINED +#endif + +/* Some OpenGL related headers need GLAPIENTRY, but it is unconditionally + * defined by some gl.h variants (OpenBSD) so define it after if needed. + */ +#ifndef GLAPIENTRY + #define GLAPIENTRY APIENTRY +#endif + +/* -------------------- END SYSTEM/COMPILER SPECIFIC --------------------- */ + + +#ifdef __cplusplus +} +#endif + +#endif /* _glfw3_h_ */ + diff --git a/frontends/gl/win/glfw/include/GLFW/glfw3native.h b/frontends/gl/win/glfw/include/GLFW/glfw3native.h index 83d3ca4..0630693 100644 --- a/frontends/gl/win/glfw/include/GLFW/glfw3native.h +++ b/frontends/gl/win/glfw/include/GLFW/glfw3native.h @@ -1,525 +1,525 @@ -/************************************************************************* - * GLFW 3.3 - www.glfw.org - * A library for OpenGL, window and input - *------------------------------------------------------------------------ - * Copyright (c) 2002-2006 Marcus Geelnard - * Copyright (c) 2006-2016 Camilla Löwy - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would - * be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and must not - * be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - *************************************************************************/ - -#ifndef _glfw3_native_h_ -#define _glfw3_native_h_ - -#ifdef __cplusplus -extern "C" { -#endif - - -/************************************************************************* - * Doxygen documentation - *************************************************************************/ - -/*! @file glfw3native.h - * @brief The header of the native access functions. - * - * This is the header file of the native access functions. See @ref native for - * more information. - */ -/*! @defgroup native Native access - * @brief Functions related to accessing native handles. - * - * **By using the native access functions you assert that you know what you're - * doing and how to fix problems caused by using them. If you don't, you - * shouldn't be using them.** - * - * Before the inclusion of @ref glfw3native.h, you may define zero or more - * window system API macro and zero or more context creation API macros. - * - * The chosen backends must match those the library was compiled for. Failure - * to do this will cause a link-time error. - * - * The available window API macros are: - * * `GLFW_EXPOSE_NATIVE_WIN32` - * * `GLFW_EXPOSE_NATIVE_COCOA` - * * `GLFW_EXPOSE_NATIVE_X11` - * * `GLFW_EXPOSE_NATIVE_WAYLAND` - * - * The available context API macros are: - * * `GLFW_EXPOSE_NATIVE_WGL` - * * `GLFW_EXPOSE_NATIVE_NSGL` - * * `GLFW_EXPOSE_NATIVE_GLX` - * * `GLFW_EXPOSE_NATIVE_EGL` - * * `GLFW_EXPOSE_NATIVE_OSMESA` - * - * These macros select which of the native access functions that are declared - * and which platform-specific headers to include. It is then up your (by - * definition platform-specific) code to handle which of these should be - * defined. - */ - - -/************************************************************************* - * System headers and types - *************************************************************************/ - -#if defined(GLFW_EXPOSE_NATIVE_WIN32) - // This is a workaround for the fact that glfw3.h needs to export APIENTRY (for - // example to allow applications to correctly declare a GL_ARB_debug_output - // callback) but windows.h assumes no one will define APIENTRY before it does - #if defined(GLFW_APIENTRY_DEFINED) - #undef APIENTRY - #undef GLFW_APIENTRY_DEFINED - #endif - #include -#elif defined(GLFW_EXPOSE_NATIVE_COCOA) - #include - #if defined(__OBJC__) - #import - #else - typedef void* id; - #endif -#elif defined(GLFW_EXPOSE_NATIVE_X11) - #include - #include -#elif defined(GLFW_EXPOSE_NATIVE_WAYLAND) - #include -#endif - -#if defined(GLFW_EXPOSE_NATIVE_WGL) - /* WGL is declared by windows.h */ -#endif -#if defined(GLFW_EXPOSE_NATIVE_NSGL) - /* NSGL is declared by Cocoa.h */ -#endif -#if defined(GLFW_EXPOSE_NATIVE_GLX) - #include -#endif -#if defined(GLFW_EXPOSE_NATIVE_EGL) - #include -#endif -#if defined(GLFW_EXPOSE_NATIVE_OSMESA) - #include -#endif - - -/************************************************************************* - * Functions - *************************************************************************/ - -#if defined(GLFW_EXPOSE_NATIVE_WIN32) -/*! @brief Returns the adapter device name of the specified monitor. - * - * @return The UTF-8 encoded adapter device name (for example `\\.\DISPLAY1`) - * of the specified monitor, or `NULL` if an [error](@ref error_handling) - * occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.1. - * - * @ingroup native - */ -GLFWAPI const char* glfwGetWin32Adapter(GLFWmonitor* monitor); - -/*! @brief Returns the display device name of the specified monitor. - * - * @return The UTF-8 encoded display device name (for example - * `\\.\DISPLAY1\Monitor0`) of the specified monitor, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.1. - * - * @ingroup native - */ -GLFWAPI const char* glfwGetWin32Monitor(GLFWmonitor* monitor); - -/*! @brief Returns the `HWND` of the specified window. - * - * @return The `HWND` of the specified window, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.0. - * - * @ingroup native - */ -GLFWAPI HWND glfwGetWin32Window(GLFWwindow* window); -#endif - -#if defined(GLFW_EXPOSE_NATIVE_WGL) -/*! @brief Returns the `HGLRC` of the specified window. - * - * @return The `HGLRC` of the specified window, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.0. - * - * @ingroup native - */ -GLFWAPI HGLRC glfwGetWGLContext(GLFWwindow* window); -#endif - -#if defined(GLFW_EXPOSE_NATIVE_COCOA) -/*! @brief Returns the `CGDirectDisplayID` of the specified monitor. - * - * @return The `CGDirectDisplayID` of the specified monitor, or - * `kCGNullDirectDisplay` if an [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.1. - * - * @ingroup native - */ -GLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor); - -/*! @brief Returns the `NSWindow` of the specified window. - * - * @return The `NSWindow` of the specified window, or `nil` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.0. - * - * @ingroup native - */ -GLFWAPI id glfwGetCocoaWindow(GLFWwindow* window); -#endif - -#if defined(GLFW_EXPOSE_NATIVE_NSGL) -/*! @brief Returns the `NSOpenGLContext` of the specified window. - * - * @return The `NSOpenGLContext` of the specified window, or `nil` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.0. - * - * @ingroup native - */ -GLFWAPI id glfwGetNSGLContext(GLFWwindow* window); -#endif - -#if defined(GLFW_EXPOSE_NATIVE_X11) -/*! @brief Returns the `Display` used by GLFW. - * - * @return The `Display` used by GLFW, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.0. - * - * @ingroup native - */ -GLFWAPI Display* glfwGetX11Display(void); - -/*! @brief Returns the `RRCrtc` of the specified monitor. - * - * @return The `RRCrtc` of the specified monitor, or `None` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.1. - * - * @ingroup native - */ -GLFWAPI RRCrtc glfwGetX11Adapter(GLFWmonitor* monitor); - -/*! @brief Returns the `RROutput` of the specified monitor. - * - * @return The `RROutput` of the specified monitor, or `None` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.1. - * - * @ingroup native - */ -GLFWAPI RROutput glfwGetX11Monitor(GLFWmonitor* monitor); - -/*! @brief Returns the `Window` of the specified window. - * - * @return The `Window` of the specified window, or `None` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.0. - * - * @ingroup native - */ -GLFWAPI Window glfwGetX11Window(GLFWwindow* window); - -/*! @brief Sets the current primary selection to the specified string. - * - * @param[in] string A UTF-8 encoded string. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The specified string is copied before this function - * returns. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref clipboard - * @sa glfwGetX11SelectionString - * @sa glfwSetClipboardString - * - * @since Added in version 3.3. - * - * @ingroup native - */ -GLFWAPI void glfwSetX11SelectionString(const char* string); - -/*! @brief Returns the contents of the current primary selection as a string. - * - * If the selection is empty or if its contents cannot be converted, `NULL` - * is returned and a @ref GLFW_FORMAT_UNAVAILABLE error is generated. - * - * @return The contents of the selection as a UTF-8 encoded string, or `NULL` - * if an [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The returned string is allocated and freed by GLFW. You - * should not free it yourself. It is valid until the next call to @ref - * glfwGetX11SelectionString or @ref glfwSetX11SelectionString, or until the - * library is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref clipboard - * @sa glfwSetX11SelectionString - * @sa glfwGetClipboardString - * - * @since Added in version 3.3. - * - * @ingroup native - */ -GLFWAPI const char* glfwGetX11SelectionString(void); -#endif - -#if defined(GLFW_EXPOSE_NATIVE_GLX) -/*! @brief Returns the `GLXContext` of the specified window. - * - * @return The `GLXContext` of the specified window, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.0. - * - * @ingroup native - */ -GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* window); - -/*! @brief Returns the `GLXWindow` of the specified window. - * - * @return The `GLXWindow` of the specified window, or `None` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.2. - * - * @ingroup native - */ -GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* window); -#endif - -#if defined(GLFW_EXPOSE_NATIVE_WAYLAND) -/*! @brief Returns the `struct wl_display*` used by GLFW. - * - * @return The `struct wl_display*` used by GLFW, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.2. - * - * @ingroup native - */ -GLFWAPI struct wl_display* glfwGetWaylandDisplay(void); - -/*! @brief Returns the `struct wl_output*` of the specified monitor. - * - * @return The `struct wl_output*` of the specified monitor, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.2. - * - * @ingroup native - */ -GLFWAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* monitor); - -/*! @brief Returns the main `struct wl_surface*` of the specified window. - * - * @return The main `struct wl_surface*` of the specified window, or `NULL` if - * an [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.2. - * - * @ingroup native - */ -GLFWAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* window); -#endif - -#if defined(GLFW_EXPOSE_NATIVE_EGL) -/*! @brief Returns the `EGLDisplay` used by GLFW. - * - * @return The `EGLDisplay` used by GLFW, or `EGL_NO_DISPLAY` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.0. - * - * @ingroup native - */ -GLFWAPI EGLDisplay glfwGetEGLDisplay(void); - -/*! @brief Returns the `EGLContext` of the specified window. - * - * @return The `EGLContext` of the specified window, or `EGL_NO_CONTEXT` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.0. - * - * @ingroup native - */ -GLFWAPI EGLContext glfwGetEGLContext(GLFWwindow* window); - -/*! @brief Returns the `EGLSurface` of the specified window. - * - * @return The `EGLSurface` of the specified window, or `EGL_NO_SURFACE` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.0. - * - * @ingroup native - */ -GLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow* window); -#endif - -#if defined(GLFW_EXPOSE_NATIVE_OSMESA) -/*! @brief Retrieves the color buffer associated with the specified window. - * - * @param[in] window The window whose color buffer to retrieve. - * @param[out] width Where to store the width of the color buffer, or `NULL`. - * @param[out] height Where to store the height of the color buffer, or `NULL`. - * @param[out] format Where to store the OSMesa pixel format of the color - * buffer, or `NULL`. - * @param[out] buffer Where to store the address of the color buffer, or - * `NULL`. - * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.3. - * - * @ingroup native - */ -GLFWAPI int glfwGetOSMesaColorBuffer(GLFWwindow* window, int* width, int* height, int* format, void** buffer); - -/*! @brief Retrieves the depth buffer associated with the specified window. - * - * @param[in] window The window whose depth buffer to retrieve. - * @param[out] width Where to store the width of the depth buffer, or `NULL`. - * @param[out] height Where to store the height of the depth buffer, or `NULL`. - * @param[out] bytesPerValue Where to store the number of bytes per depth - * buffer element, or `NULL`. - * @param[out] buffer Where to store the address of the depth buffer, or - * `NULL`. - * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.3. - * - * @ingroup native - */ -GLFWAPI int glfwGetOSMesaDepthBuffer(GLFWwindow* window, int* width, int* height, int* bytesPerValue, void** buffer); - -/*! @brief Returns the `OSMesaContext` of the specified window. - * - * @return The `OSMesaContext` of the specified window, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.3. - * - * @ingroup native - */ -GLFWAPI OSMesaContext glfwGetOSMesaContext(GLFWwindow* window); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* _glfw3_native_h_ */ - +/************************************************************************* + * GLFW 3.3 - www.glfw.org + * A library for OpenGL, window and input + *------------------------------------------------------------------------ + * Copyright (c) 2002-2006 Marcus Geelnard + * Copyright (c) 2006-2016 Camilla Löwy + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would + * be appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not + * be misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + *************************************************************************/ + +#ifndef _glfw3_native_h_ +#define _glfw3_native_h_ + +#ifdef __cplusplus +extern "C" { +#endif + + +/************************************************************************* + * Doxygen documentation + *************************************************************************/ + +/*! @file glfw3native.h + * @brief The header of the native access functions. + * + * This is the header file of the native access functions. See @ref native for + * more information. + */ +/*! @defgroup native Native access + * @brief Functions related to accessing native handles. + * + * **By using the native access functions you assert that you know what you're + * doing and how to fix problems caused by using them. If you don't, you + * shouldn't be using them.** + * + * Before the inclusion of @ref glfw3native.h, you may define zero or more + * window system API macro and zero or more context creation API macros. + * + * The chosen backends must match those the library was compiled for. Failure + * to do this will cause a link-time error. + * + * The available window API macros are: + * * `GLFW_EXPOSE_NATIVE_WIN32` + * * `GLFW_EXPOSE_NATIVE_COCOA` + * * `GLFW_EXPOSE_NATIVE_X11` + * * `GLFW_EXPOSE_NATIVE_WAYLAND` + * + * The available context API macros are: + * * `GLFW_EXPOSE_NATIVE_WGL` + * * `GLFW_EXPOSE_NATIVE_NSGL` + * * `GLFW_EXPOSE_NATIVE_GLX` + * * `GLFW_EXPOSE_NATIVE_EGL` + * * `GLFW_EXPOSE_NATIVE_OSMESA` + * + * These macros select which of the native access functions that are declared + * and which platform-specific headers to include. It is then up your (by + * definition platform-specific) code to handle which of these should be + * defined. + */ + + +/************************************************************************* + * System headers and types + *************************************************************************/ + +#if defined(GLFW_EXPOSE_NATIVE_WIN32) + // This is a workaround for the fact that glfw3.h needs to export APIENTRY (for + // example to allow applications to correctly declare a GL_ARB_debug_output + // callback) but windows.h assumes no one will define APIENTRY before it does + #if defined(GLFW_APIENTRY_DEFINED) + #undef APIENTRY + #undef GLFW_APIENTRY_DEFINED + #endif + #include +#elif defined(GLFW_EXPOSE_NATIVE_COCOA) + #include + #if defined(__OBJC__) + #import + #else + typedef void* id; + #endif +#elif defined(GLFW_EXPOSE_NATIVE_X11) + #include + #include +#elif defined(GLFW_EXPOSE_NATIVE_WAYLAND) + #include +#endif + +#if defined(GLFW_EXPOSE_NATIVE_WGL) + /* WGL is declared by windows.h */ +#endif +#if defined(GLFW_EXPOSE_NATIVE_NSGL) + /* NSGL is declared by Cocoa.h */ +#endif +#if defined(GLFW_EXPOSE_NATIVE_GLX) + #include +#endif +#if defined(GLFW_EXPOSE_NATIVE_EGL) + #include +#endif +#if defined(GLFW_EXPOSE_NATIVE_OSMESA) + #include +#endif + + +/************************************************************************* + * Functions + *************************************************************************/ + +#if defined(GLFW_EXPOSE_NATIVE_WIN32) +/*! @brief Returns the adapter device name of the specified monitor. + * + * @return The UTF-8 encoded adapter device name (for example `\\.\DISPLAY1`) + * of the specified monitor, or `NULL` if an [error](@ref error_handling) + * occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.1. + * + * @ingroup native + */ +GLFWAPI const char* glfwGetWin32Adapter(GLFWmonitor* monitor); + +/*! @brief Returns the display device name of the specified monitor. + * + * @return The UTF-8 encoded display device name (for example + * `\\.\DISPLAY1\Monitor0`) of the specified monitor, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.1. + * + * @ingroup native + */ +GLFWAPI const char* glfwGetWin32Monitor(GLFWmonitor* monitor); + +/*! @brief Returns the `HWND` of the specified window. + * + * @return The `HWND` of the specified window, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.0. + * + * @ingroup native + */ +GLFWAPI HWND glfwGetWin32Window(GLFWwindow* window); +#endif + +#if defined(GLFW_EXPOSE_NATIVE_WGL) +/*! @brief Returns the `HGLRC` of the specified window. + * + * @return The `HGLRC` of the specified window, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.0. + * + * @ingroup native + */ +GLFWAPI HGLRC glfwGetWGLContext(GLFWwindow* window); +#endif + +#if defined(GLFW_EXPOSE_NATIVE_COCOA) +/*! @brief Returns the `CGDirectDisplayID` of the specified monitor. + * + * @return The `CGDirectDisplayID` of the specified monitor, or + * `kCGNullDirectDisplay` if an [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.1. + * + * @ingroup native + */ +GLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor); + +/*! @brief Returns the `NSWindow` of the specified window. + * + * @return The `NSWindow` of the specified window, or `nil` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.0. + * + * @ingroup native + */ +GLFWAPI id glfwGetCocoaWindow(GLFWwindow* window); +#endif + +#if defined(GLFW_EXPOSE_NATIVE_NSGL) +/*! @brief Returns the `NSOpenGLContext` of the specified window. + * + * @return The `NSOpenGLContext` of the specified window, or `nil` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.0. + * + * @ingroup native + */ +GLFWAPI id glfwGetNSGLContext(GLFWwindow* window); +#endif + +#if defined(GLFW_EXPOSE_NATIVE_X11) +/*! @brief Returns the `Display` used by GLFW. + * + * @return The `Display` used by GLFW, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.0. + * + * @ingroup native + */ +GLFWAPI Display* glfwGetX11Display(void); + +/*! @brief Returns the `RRCrtc` of the specified monitor. + * + * @return The `RRCrtc` of the specified monitor, or `None` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.1. + * + * @ingroup native + */ +GLFWAPI RRCrtc glfwGetX11Adapter(GLFWmonitor* monitor); + +/*! @brief Returns the `RROutput` of the specified monitor. + * + * @return The `RROutput` of the specified monitor, or `None` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.1. + * + * @ingroup native + */ +GLFWAPI RROutput glfwGetX11Monitor(GLFWmonitor* monitor); + +/*! @brief Returns the `Window` of the specified window. + * + * @return The `Window` of the specified window, or `None` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.0. + * + * @ingroup native + */ +GLFWAPI Window glfwGetX11Window(GLFWwindow* window); + +/*! @brief Sets the current primary selection to the specified string. + * + * @param[in] string A UTF-8 encoded string. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @pointer_lifetime The specified string is copied before this function + * returns. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref clipboard + * @sa glfwGetX11SelectionString + * @sa glfwSetClipboardString + * + * @since Added in version 3.3. + * + * @ingroup native + */ +GLFWAPI void glfwSetX11SelectionString(const char* string); + +/*! @brief Returns the contents of the current primary selection as a string. + * + * If the selection is empty or if its contents cannot be converted, `NULL` + * is returned and a @ref GLFW_FORMAT_UNAVAILABLE error is generated. + * + * @return The contents of the selection as a UTF-8 encoded string, or `NULL` + * if an [error](@ref error_handling) occurred. + * + * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref + * GLFW_PLATFORM_ERROR. + * + * @pointer_lifetime The returned string is allocated and freed by GLFW. You + * should not free it yourself. It is valid until the next call to @ref + * glfwGetX11SelectionString or @ref glfwSetX11SelectionString, or until the + * library is terminated. + * + * @thread_safety This function must only be called from the main thread. + * + * @sa @ref clipboard + * @sa glfwSetX11SelectionString + * @sa glfwGetClipboardString + * + * @since Added in version 3.3. + * + * @ingroup native + */ +GLFWAPI const char* glfwGetX11SelectionString(void); +#endif + +#if defined(GLFW_EXPOSE_NATIVE_GLX) +/*! @brief Returns the `GLXContext` of the specified window. + * + * @return The `GLXContext` of the specified window, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.0. + * + * @ingroup native + */ +GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* window); + +/*! @brief Returns the `GLXWindow` of the specified window. + * + * @return The `GLXWindow` of the specified window, or `None` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.2. + * + * @ingroup native + */ +GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* window); +#endif + +#if defined(GLFW_EXPOSE_NATIVE_WAYLAND) +/*! @brief Returns the `struct wl_display*` used by GLFW. + * + * @return The `struct wl_display*` used by GLFW, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.2. + * + * @ingroup native + */ +GLFWAPI struct wl_display* glfwGetWaylandDisplay(void); + +/*! @brief Returns the `struct wl_output*` of the specified monitor. + * + * @return The `struct wl_output*` of the specified monitor, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.2. + * + * @ingroup native + */ +GLFWAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* monitor); + +/*! @brief Returns the main `struct wl_surface*` of the specified window. + * + * @return The main `struct wl_surface*` of the specified window, or `NULL` if + * an [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.2. + * + * @ingroup native + */ +GLFWAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* window); +#endif + +#if defined(GLFW_EXPOSE_NATIVE_EGL) +/*! @brief Returns the `EGLDisplay` used by GLFW. + * + * @return The `EGLDisplay` used by GLFW, or `EGL_NO_DISPLAY` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.0. + * + * @ingroup native + */ +GLFWAPI EGLDisplay glfwGetEGLDisplay(void); + +/*! @brief Returns the `EGLContext` of the specified window. + * + * @return The `EGLContext` of the specified window, or `EGL_NO_CONTEXT` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.0. + * + * @ingroup native + */ +GLFWAPI EGLContext glfwGetEGLContext(GLFWwindow* window); + +/*! @brief Returns the `EGLSurface` of the specified window. + * + * @return The `EGLSurface` of the specified window, or `EGL_NO_SURFACE` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.0. + * + * @ingroup native + */ +GLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow* window); +#endif + +#if defined(GLFW_EXPOSE_NATIVE_OSMESA) +/*! @brief Retrieves the color buffer associated with the specified window. + * + * @param[in] window The window whose color buffer to retrieve. + * @param[out] width Where to store the width of the color buffer, or `NULL`. + * @param[out] height Where to store the height of the color buffer, or `NULL`. + * @param[out] format Where to store the OSMesa pixel format of the color + * buffer, or `NULL`. + * @param[out] buffer Where to store the address of the color buffer, or + * `NULL`. + * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.3. + * + * @ingroup native + */ +GLFWAPI int glfwGetOSMesaColorBuffer(GLFWwindow* window, int* width, int* height, int* format, void** buffer); + +/*! @brief Retrieves the depth buffer associated with the specified window. + * + * @param[in] window The window whose depth buffer to retrieve. + * @param[out] width Where to store the width of the depth buffer, or `NULL`. + * @param[out] height Where to store the height of the depth buffer, or `NULL`. + * @param[out] bytesPerValue Where to store the number of bytes per depth + * buffer element, or `NULL`. + * @param[out] buffer Where to store the address of the depth buffer, or + * `NULL`. + * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.3. + * + * @ingroup native + */ +GLFWAPI int glfwGetOSMesaDepthBuffer(GLFWwindow* window, int* width, int* height, int* bytesPerValue, void** buffer); + +/*! @brief Returns the `OSMesaContext` of the specified window. + * + * @return The `OSMesaContext` of the specified window, or `NULL` if an + * [error](@ref error_handling) occurred. + * + * @thread_safety This function may be called from any thread. Access is not + * synchronized. + * + * @since Added in version 3.3. + * + * @ingroup native + */ +GLFWAPI OSMesaContext glfwGetOSMesaContext(GLFWwindow* window); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _glfw3_native_h_ */ + -- cgit v1.2.3-101-g0448