this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

merge shared api to main branch (#2568)

authored by

Vadim Grigoruk and committed by
GitHub
5aab512a 49b9a42d

+1723 -2238
+7 -299
.github/workflows/build.yml
··· 25 25 run: | 26 26 COPY /Y build\janet\janetconf.h vendor\janet\src\conf\janetconf.h 27 27 cd build 28 - cmake -G "Visual Studio 16 2019" -A Win32 -T v141_xp -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DBUILD_STUB=On .. 28 + cmake -G "Visual Studio 16 2019" -A Win32 -T v141_xp -DCMAKE_BUILD_TYPE=%BUILD_TYPE% .. 29 29 cmake --build . --config %BUILD_TYPE% --parallel 30 30 31 31 - name: Deploy ··· 33 33 with: 34 34 name: "tic80-winxp" 35 35 path: build/bin/tic80.exe 36 - 37 - - name: Deploy stubs 38 - uses: actions/upload-artifact@v3 39 - with: 40 - name: "tic80-winxp-stub" 41 - path: build/bin/tic80*.exe 42 36 43 37 # === Windows XP PRO === 44 38 winxp-pro: ··· 62 56 cmake -G "Visual Studio 16 2019" -A Win32 -T v141_xp -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DBUILD_PRO=On .. 63 57 cmake --build . --config %BUILD_TYPE% --parallel 64 58 65 - - name: Deploy 66 - uses: actions/upload-artifact@v3 67 - with: 68 - name: "tic80-winxp-pro" 69 - path: build/bin/tic80.exe 70 - 71 59 # === Windows === 72 60 windows: 73 61 runs-on: windows-2019 ··· 86 74 shell: cmd 87 75 run: | 88 76 cd build 89 - cmake -G "Visual Studio 16 2019" -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DBUILD_STUB=On .. 77 + cmake -G "Visual Studio 16 2019" -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=%BUILD_TYPE% .. 90 78 cmake --build . --config %BUILD_TYPE% --parallel 91 79 92 80 - name: Deploy ··· 95 83 name: "tic80-windows" 96 84 path: build/bin/tic80.exe 97 85 98 - - name: Deploy stubs 99 - uses: actions/upload-artifact@v3 100 - with: 101 - name: "tic80-windows-stub" 102 - path: build/bin/tic80*.exe 103 - 104 86 # === Windows PRO === 105 87 windows-pro: 106 88 runs-on: windows-2019 ··· 121 103 cd build 122 104 cmake -G "Visual Studio 16 2019" -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DBUILD_PRO=On .. 123 105 cmake --build . --config %BUILD_TYPE% --parallel 124 - 125 - - name: Deploy 126 - uses: actions/upload-artifact@v3 127 - with: 128 - name: "tic80-windows-pro" 129 - path: build/bin/tic80.exe 130 106 131 107 # === Windows Sokol === 132 108 windows-sokol: ··· 217 193 cmake --build . --config $BUILD_TYPE --parallel 218 194 cpack 219 195 220 - - name: Deploy DEB 221 - uses: actions/upload-artifact@v3 222 - with: 223 - name: "tic80-linux-deb-pro" 224 - path: build/tic80.deb 225 - 226 - - name: Deploy ZIP 227 - uses: actions/upload-artifact@v3 228 - with: 229 - name: "tic80-linux-pro" 230 - path: build/bin/tic80 231 - 232 196 # === Ubuntu === 233 197 linux: 234 198 runs-on: ubuntu-20.04 ··· 251 215 - name: Build 252 216 run: | 253 217 cd build 254 - cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SDLGPU=On -DBUILD_STUB=On .. 218 + cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SDLGPU=On .. 255 219 cmake --build . --config $BUILD_TYPE --parallel 256 220 cpack 257 221 ··· 267 231 name: "tic80-linux" 268 232 path: build/bin/tic80 269 233 270 - - name: Deploy stubs 271 - uses: actions/upload-artifact@v3 272 - with: 273 - name: "tic80-linux-stub" 274 - path: build/bin/tic80* 275 - 276 234 # === Raspberry PI === 277 235 rpi: 278 236 runs-on: ubuntu-latest ··· 292 250 - name: Build 293 251 run: | 294 252 cd build 295 - cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_STUB=On -DCMAKE_TOOLCHAIN_FILE=rpi/toolchain.cmake .. 253 + cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=rpi/toolchain.cmake .. 296 254 cmake --build . --config $BUILD_TYPE --parallel 297 255 cpack 298 256 ··· 308 266 name: "tic80-rpi" 309 267 path: build/bin/tic80 310 268 311 - - name: Deploy stubs 312 - uses: actions/upload-artifact@v3 313 - with: 314 - name: "tic80-rpi-stub" 315 - path: build/bin/tic80* 316 - 317 269 # === Raspberry PI PRO === 318 270 rpi-pro: 319 271 runs-on: ubuntu-latest ··· 330 282 apt-get update 331 283 apt-get install --assume-yes build-essential ruby-full gcc-8-arm-linux-gnueabihf g++-8-arm-linux-gnueabihf 332 284 333 - 334 285 - name: Build 335 286 run: | 336 287 cd build 337 288 cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_PRO=On -DCMAKE_TOOLCHAIN_FILE=rpi/toolchain.cmake .. 338 289 cmake --build . --config $BUILD_TYPE --parallel 339 290 cpack 340 - 341 - - name: Deploy DEB 342 - uses: actions/upload-artifact@v3 343 - with: 344 - name: "tic80-rpi-deb-pro" 345 - path: build/tic80.deb 346 - 347 - - name: Deploy 348 - uses: actions/upload-artifact@v3 349 - with: 350 - name: "tic80-rpi-pro" 351 - path: build/bin/tic80 352 291 353 292 # === Raspberry PI 1-3 Bare Metal === 354 293 rpi-baremetal: ··· 517 456 - name: Build 518 457 run: | 519 458 cd build 520 - cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SDLGPU=On -DBUILD_STUB=On .. 459 + cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SDLGPU=On .. 521 460 cmake --build . --config $BUILD_TYPE --parallel 522 461 cpack 523 462 cp *.dmg tic80.dmg ··· 533 472 with: 534 473 name: "tic80-macos" 535 474 path: build/bin/tic80 536 - 537 - - name: Deploy stubs 538 - uses: actions/upload-artifact@v3 539 - with: 540 - name: "tic80-macos-stub" 541 - path: build/bin/tic80* 542 475 543 476 # === MacOS 12 PRO === 544 477 macos-pro: ··· 561 494 cpack 562 495 cp *.dmg tic80.dmg 563 496 564 - - name: Deploy DMG 565 - uses: actions/upload-artifact@v3 566 - with: 567 - name: "tic80-macos-dmg-pro" 568 - path: build/tic80.dmg 569 - 570 - - name: Deploy 571 - uses: actions/upload-artifact@v3 572 - with: 573 - name: "tic80-macos-pro" 574 - path: build/bin/tic80 575 - 576 497 # === MacOS 14 / arm64 === 577 498 macos-arm64: 578 499 runs-on: macos-14 ··· 589 510 - name: Build 590 511 run: | 591 512 cd build 592 - cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SDLGPU=On -DBUILD_STUB=On .. 513 + cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SDLGPU=On .. 593 514 cmake --build . --config $BUILD_TYPE --parallel 594 515 cpack 595 516 cp *.dmg tic80.dmg ··· 606 527 name: "tic80-macos-arm64" 607 528 path: build/bin/tic80 608 529 609 - - name: Deploy stubs 610 - uses: actions/upload-artifact@v3 611 - with: 612 - name: "tic80-macos-arm64-stub" 613 - path: build/bin/tic80* 614 - 615 530 # === MacOS 14 / arm64 PRO === 616 531 macos-arm64-pro: 617 532 runs-on: macos-14 ··· 633 548 cpack 634 549 cp *.dmg tic80.dmg 635 550 636 - - name: Deploy DMG 637 - uses: actions/upload-artifact@v3 638 - with: 639 - name: "tic80-macos-arm64-dmg-pro" 640 - path: build/tic80.dmg 641 - 642 - - name: Deploy 643 - uses: actions/upload-artifact@v3 644 - with: 645 - name: "tic80-macos-arm64-pro" 646 - path: build/bin/tic80 647 - 648 551 # === Android === 649 552 android: 650 553 runs-on: ubuntu-latest ··· 704 607 - name: Build 705 608 run: | 706 609 cd build 707 - emcmake cmake -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_STUB=On .. 610 + emcmake cmake -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=$BUILD_TYPE .. 708 611 cmake --build . --config $BUILD_TYPE --parallel 709 612 mkdir bin/html bin/html-export 710 613 cp html/export.html bin/html-export/index.html ··· 740 643 build/webapp/tic80.webmanifest 741 644 build/webapp/tic80.js 742 645 build/webapp/tic80.wasm 743 - 744 - - name: Deploy stubs 745 - uses: actions/upload-artifact@v3 746 - with: 747 - name: "tic80-html-stub" 748 - path: | 749 - build/bin/html-export/tic80*.js 750 - build/bin/html-export/tic80*.wasm 751 - build/bin/html-export/index.html 752 - 753 - # === Export === 754 - export: 755 - needs: [winxp, windows, linux, rpi, macos, macos-arm64, html] 756 - runs-on: ubuntu-latest 757 - 758 - steps: 759 - - name: Download Windows XP artifact 760 - uses: actions/download-artifact@v3 761 - with: 762 - name: tic80-winxp 763 - path: winxpdir 764 - 765 - - name: Download Windows artifact 766 - uses: actions/download-artifact@v3 767 - with: 768 - name: tic80-windows 769 - path: windir 770 - 771 - - name: Download Ubuntu artifact 772 - uses: actions/download-artifact@v3 773 - with: 774 - name: tic80-linux 775 - path: linuxdir 776 - 777 - - name: Download RPI artifact 778 - uses: actions/download-artifact@v3 779 - with: 780 - name: tic80-rpi 781 - path: rpidir 782 - 783 - - name: Download MacOS artifact 784 - uses: actions/download-artifact@v3 785 - with: 786 - name: tic80-macos 787 - path: macdir 788 - 789 - - name: Download MacOS arm64 artifact 790 - uses: actions/download-artifact@v3 791 - with: 792 - name: tic80-macos-arm64 793 - path: macdir-arm64 794 - 795 - - name: Download HTML artifact 796 - uses: actions/download-artifact@v3 797 - with: 798 - name: tic80-html 799 - 800 - - name: Rename 801 - run: | 802 - cp winxpdir/* winxp 803 - cp windir/* win 804 - cp linuxdir/* linux 805 - cp macdir/* mac 806 - cp macdir-arm64/* mac-arm64 807 - cp rpidir/* rpi 808 - mv -f export.html index.html 809 - zip html.zip index.html tic80.js tic80.wasm 810 - mv -f html.zip html 811 - 812 - - name: Deploy 813 - uses: actions/upload-artifact@v3 814 - with: 815 - name: "tic80-export" 816 - path: | 817 - winxp 818 - win 819 - linux 820 - mac 821 - mac-arm64 822 - rpi 823 - html 824 - 825 - # === Export stub === 826 - export-stub: 827 - needs: [export] 828 - runs-on: ubuntu-latest 829 - strategy: 830 - matrix: 831 - script: [lua, moon, fennel, ruby, js, wren, squirrel, wasm, scheme, janet, python] 832 - 833 - steps: 834 - - name: Download Windows XP artifact 835 - uses: actions/download-artifact@v3 836 - with: 837 - name: tic80-winxp-stub 838 - path: winxpdir 839 - 840 - - name: Download Windows artifact 841 - uses: actions/download-artifact@v3 842 - with: 843 - name: tic80-windows-stub 844 - path: windir 845 - 846 - - name: Download Ubuntu artifact 847 - uses: actions/download-artifact@v3 848 - with: 849 - name: tic80-linux-stub 850 - path: linuxdir 851 - 852 - - name: Download RPI artifact 853 - uses: actions/download-artifact@v3 854 - with: 855 - name: tic80-rpi-stub 856 - path: rpidir 857 - 858 - - name: Download MacOS artifact 859 - uses: actions/download-artifact@v3 860 - with: 861 - name: tic80-macos-stub 862 - path: macdir 863 - 864 - - name: Download MacOS arm64 artifact 865 - uses: actions/download-artifact@v3 866 - with: 867 - name: tic80-macos-arm64-stub 868 - path: macdir-arm64 869 - 870 - - name: Download HTML artifact 871 - uses: actions/download-artifact@v3 872 - with: 873 - name: tic80-html-stub 874 - 875 - - name: Rename 876 - run: | 877 - cp winxpdir/tic80${{ matrix.script }}.exe winxp${{ matrix.script }} 878 - cp windir/tic80${{ matrix.script }}.exe win${{ matrix.script }} 879 - cp linuxdir/tic80${{ matrix.script }} linux${{ matrix.script }} 880 - cp rpidir/tic80${{ matrix.script }} rpi${{ matrix.script }} 881 - cp macdir/tic80${{ matrix.script }} mac${{ matrix.script }} 882 - cp macdir-arm64/tic80${{ matrix.script }} mac-arm64${{ matrix.script }} 883 - mv -f tic80${{ matrix.script }}.js tic80.js 884 - zip html${{ matrix.script }}.zip index.html tic80.js tic80${{ matrix.script }}.wasm 885 - mv -f html${{ matrix.script }}.zip html${{ matrix.script }} 886 - 887 - - name: Deploy 888 - uses: actions/upload-artifact@v3 889 - with: 890 - name: "tic80-export" 891 - path: | 892 - winxp${{ matrix.script }} 893 - win${{ matrix.script }} 894 - linux${{ matrix.script }} 895 - rpi${{ matrix.script }} 896 - mac${{ matrix.script }} 897 - mac-arm64${{ matrix.script }} 898 - html${{ matrix.script }} 899 - 900 - # === Delete stub artifacts === 901 - delete-stub: 902 - needs: [export-stub] 903 - runs-on: ubuntu-latest 904 - 905 - steps: 906 - - name: Delete artifacts 907 - uses: geekyeggo/delete-artifact@v2 908 - with: 909 - name: | 910 - tic80-winxp-stub 911 - tic80-windows-stub 912 - tic80-linux-stub 913 - tic80-rpi-stub 914 - tic80-macos-stub 915 - tic80-macos-arm64-stub 916 - tic80-html-stub 917 - 918 - # === Delete PRO artifacts === 919 - delete-pro: 920 - needs: [winxp-pro, windows-pro, linux-pro, macos-pro, macos-arm64-pro, rpi-pro] 921 - runs-on: ubuntu-latest 922 - 923 - steps: 924 - - name: Delete artifacts 925 - uses: geekyeggo/delete-artifact@v2 926 - with: 927 - name: | 928 - tic80-macos-pro 929 - tic80-macos-dmg-pro 930 - tic80-macos-arm64-pro 931 - tic80-macos-arm64-dmg-pro 932 - tic80-winxp-pro 933 - tic80-windows-pro 934 - tic80-linux-deb-pro 935 - tic80-linux-pro 936 - tic80-rpi-deb-pro 937 - tic80-rpi-pro
+8
.gitmodules
··· 87 87 path = vendor/msf_gif 88 88 url = https://github.com/notnullnotvoid/msf_gif.git 89 89 shallow = true 90 + [submodule "vendor/dlfcn"] 91 + path = vendor/dlfcn 92 + url = https://github.com/dlfcn-win32/dlfcn-win32.git 93 + shallow = true 94 + [submodule "vendor/jsmn"] 95 + path = vendor/jsmn 96 + url = https://github.com/zserge/jsmn.git 97 + shallow = true
+10 -10
CMakeLists.txt
··· 16 16 17 17 if(ANDROID OR EMSCRIPTEN OR N3DS OR RPI) 18 18 set(BUILD_LIBRETRO_DEFAULT OFF) 19 - set(BUILD_DEMO_CARTS_DEFAULT OFF) 20 19 set(BUILD_PLAYER_DEFAULT OFF) 20 + set(BUILD_TOOLS OFF) 21 21 else() 22 22 set(BUILD_LIBRETRO_DEFAULT ON) 23 - set(BUILD_DEMO_CARTS_DEFAULT ON) 24 23 set(BUILD_PLAYER_DEFAULT ON) 24 + set(BUILD_TOOLS ON) 25 25 endif() 26 26 27 27 set(BUILD_TOUCH_INPUT_DEFAULT ${ANDROID}) ··· 31 31 option(BUILD_SDLGPU "SDL GPU Enabled" OFF) 32 32 option(BUILD_SOKOL "Sokol Enabled" OFF) 33 33 option(BUILD_LIBRETRO "libretro Enabled" ${BUILD_LIBRETRO_DEFAULT}) 34 - option(BUILD_DEMO_CARTS "Demo Carts Enabled" ${BUILD_DEMO_CARTS_DEFAULT}) 34 + option(BUILD_TOOLS "bin2txt prj2cart" ${BUILD_TOOLS}) 35 35 option(BUILD_PRO "Build PRO version" FALSE) 36 36 option(BUILD_PLAYER "Build standalone players" ${BUILD_PLAYER_DEFAULT}) 37 37 option(BUILD_TOUCH_INPUT "Build with touch input support" ${BUILD_TOUCH_INPUT_DEFAULT}) 38 - option(BUILD_STUB "Build stub without editors" OFF) 39 38 option(BUILD_NO_OPTIMIZATION "Build without optimizations for debugging" OFF) 40 39 option(BUILD_ASAN_DEBUG "Build with AddressSanitizer" OFF) 41 40 ··· 53 52 set(BUILD_SDLGPU OFF) 54 53 endif() 55 54 55 + add_library(runtime INTERFACE) 56 + 56 57 if(BUILD_STATIC) 57 58 set(TIC_RUNTIME STATIC) 59 + target_compile_definitions(runtime INTERFACE TIC_RUNTIME_STATIC) 58 60 else() 59 61 set(TIC_RUNTIME SHARED) 60 62 endif() 61 63 64 + target_compile_definitions(runtime INTERFACE BUILD_DEPRECATED) 65 + 62 66 message("BUILD_STATIC: ${BUILD_STATIC}") 63 67 message("BUILD_SDLGPU: ${BUILD_SDLGPU}") 64 68 message("BUILD_TOUCH_INPUT: ${BUILD_TOUCH_INPUT}") 65 - message("BUILD_STUB: ${BUILD_STUB}") 66 69 67 70 if (N3DS) 68 71 set(BUILD_SDL OFF) ··· 70 73 71 74 if (BAREMETALPI) 72 75 set(BUILD_SDL OFF) 73 - set(BUILD_DEMO_CARTS OFF) 74 76 endif() 75 77 76 78 if(UNIX AND NOT APPLE AND NOT EMSCRIPTEN AND NOT ANDROID AND NOT N3DS) ··· 129 131 include(cmake/tools.cmake) 130 132 131 133 include(cmake/lua.cmake) 134 + include(cmake/moon.cmake) 135 + include(cmake/fennel.cmake) 132 136 include(cmake/wren.cmake) 133 137 include(cmake/mruby.cmake) 134 138 include(cmake/wasm.cmake) ··· 138 142 include(cmake/quickjs.cmake) 139 143 include(cmake/janet.cmake) 140 144 141 - include(cmake/demos.cmake) 142 145 include(cmake/core.cmake) 143 - 144 146 include(cmake/wave.cmake) 145 147 include(cmake/argparse.cmake) 146 148 include(cmake/naett.cmake) 147 149 include(cmake/png.cmake) 148 - 149 150 include(cmake/studio.cmake) 150 151 151 152 include(cmake/sdl.cmake) ··· 153 154 include(cmake/libretro.cmake) 154 155 include(cmake/n3ds.cmake) 155 156 156 - include(cmake/stub.cmake) 157 157 include(cmake/install.cmake)
+73
assets.bat
··· 1 + build\bin\prj2cart config.js build\config.tic 2 + build\bin\prj2cart demos\luademo.lua build\luademo.tic 3 + build\bin\prj2cart demos\benchmark.lua build\benchmark.tic 4 + build\bin\prj2cart demos\bpp.lua build\bpp.tic 5 + build\bin\prj2cart demos\car.lua build\car.tic 6 + build\bin\prj2cart demos\fenneldemo.fnl build\fenneldemo.tic 7 + build\bin\prj2cart demos\fire.lua build\fire.tic 8 + build\bin\prj2cart demos\font.lua build\font.tic 9 + build\bin\prj2cart demos\janetdemo.janet build\janetdemo.tic 10 + build\bin\prj2cart demos\jsdemo.js build\jsdemo.tic 11 + build\bin\prj2cart demos\luademo.lua build\luademo.tic 12 + build\bin\prj2cart demos\moondemo.moon build\moondemo.tic 13 + build\bin\prj2cart demos\music.lua build\music.tic 14 + build\bin\prj2cart demos\p3d.lua build\p3d.tic 15 + build\bin\prj2cart demos\palette.lua build\palette.tic 16 + build\bin\prj2cart demos\pythondemo.py build\pythondemo.tic 17 + build\bin\prj2cart demos\quest.lua build\quest.tic 18 + build\bin\prj2cart demos\rubydemo.rb build\rubydemo.tic 19 + build\bin\prj2cart demos\schemedemo.scm build\schemedemo.tic 20 + build\bin\prj2cart demos\sfx.lua build\sfx.tic 21 + build\bin\prj2cart demos\squirreldemo.nut build\squirreldemo.tic 22 + build\bin\prj2cart demos\tetris.lua build\tetris.tic 23 + build\bin\prj2cart demos\wrendemo.wren build\wrendemo.tic 24 + 25 + build\bin\wasmp2cart demos\wasm\wasmdemo.wasmp build\wasmdemo.tic --binary demos\wasm\wasmdemo.wasm 26 + build\bin\wasmp2cart demos\bunny\wasmmark\wasmmark.wasmp build\wasmmark.tic --binary demos\bunny\wasmmark\wasmmark.wasm 27 + 28 + build\bin\prj2cart demos\bunny\janetmark.janet build\janetmark.tic 29 + build\bin\prj2cart demos\bunny\jsmark.js build\jsmark.tic 30 + build\bin\prj2cart demos\bunny\luamark.lua build\luamark.tic 31 + build\bin\prj2cart demos\bunny\moonmark.moon build\moonmark.tic 32 + build\bin\prj2cart demos\bunny\pythonmark.py build\pythonmark.tic 33 + build\bin\prj2cart demos\bunny\rubymark.rb build\rubymark.tic 34 + build\bin\prj2cart demos\bunny\schememark.scm build\schememark.tic 35 + build\bin\prj2cart demos\bunny\squirrelmark.nut build\squirrelmark.tic 36 + build\bin\prj2cart demos\bunny\wrenmark.wren build\wrenmark.tic 37 + 38 + build\bin\bin2txt build\config.tic build\assets\config.tic.dat -z 39 + build\bin\bin2txt build\luademo.tic build\assets\luademo.tic.dat -z 40 + build\bin\bin2txt build\benchmark.tic build\assets\benchmark.tic.dat -z 41 + build\bin\bin2txt build\bpp.tic build\assets\bpp.tic.dat -z 42 + build\bin\bin2txt build\car.tic build\assets\car.tic.dat -z 43 + build\bin\bin2txt build\fenneldemo.tic build\assets\fenneldemo.tic.dat -z 44 + build\bin\bin2txt build\fire.tic build\assets\fire.tic.dat -z 45 + build\bin\bin2txt build\font.tic build\assets\font.tic.dat -z 46 + build\bin\bin2txt build\janetdemo.tic build\assets\janetdemo.tic.dat -z 47 + build\bin\bin2txt build\jsdemo.tic build\assets\jsdemo.tic.dat -z 48 + build\bin\bin2txt build\luademo.tic build\assets\luademo.tic.dat -z 49 + build\bin\bin2txt build\moondemo.tic build\assets\moondemo.tic.dat -z 50 + build\bin\bin2txt build\music.tic build\assets\music.tic.dat -z 51 + build\bin\bin2txt build\p3d.tic build\assets\p3d.tic.dat -z 52 + build\bin\bin2txt build\palette.tic build\assets\palette.tic.dat -z 53 + build\bin\bin2txt build\pythondemo.tic build\assets\pythondemo.tic.dat -z 54 + build\bin\bin2txt build\quest.tic build\assets\quest.tic.dat -z 55 + build\bin\bin2txt build\rubydemo.tic build\assets\rubydemo.tic.dat -z 56 + build\bin\bin2txt build\schemedemo.tic build\assets\schemedemo.tic.dat -z 57 + build\bin\bin2txt build\sfx.tic build\assets\sfx.tic.dat -z 58 + build\bin\bin2txt build\squirreldemo.tic build\assets\squirreldemo.tic.dat -z 59 + build\bin\bin2txt build\tetris.tic build\assets\tetris.tic.dat -z 60 + build\bin\bin2txt build\wrendemo.tic build\assets\wrendemo.tic.dat -z 61 + build\bin\bin2txt build\janetmark.tic build\assets\janetmark.tic.dat -z 62 + build\bin\bin2txt build\jsmark.tic build\assets\jsmark.tic.dat -z 63 + build\bin\bin2txt build\luamark.tic build\assets\luamark.tic.dat -z 64 + build\bin\bin2txt build\moonmark.tic build\assets\moonmark.tic.dat -z 65 + build\bin\bin2txt build\pythonmark.tic build\assets\pythonmark.tic.dat -z 66 + build\bin\bin2txt build\rubymark.tic build\assets\rubymark.tic.dat -z 67 + build\bin\bin2txt build\schememark.tic build\assets\schememark.tic.dat -z 68 + build\bin\bin2txt build\squirrelmark.tic build\assets\squirrelmark.tic.dat -z 69 + build\bin\bin2txt build\wasmmark.tic build\assets\wasmmark.tic.dat -z 70 + build\bin\bin2txt build\wrenmark.tic build\assets\wrenmark.tic.dat -z 71 + build\bin\bin2txt build\wasmdemo.tic build\assets\wasmdemo.tic.dat -z 72 + 73 + build\bin\bin2txt build\cart.png build\assets\cart.png.dat
+1 -1
build/assets/config.tic.dat
··· 1 - 0x78, 0xda, 0xed, 0x5c, 0xcd, 0x6f, 0x1c, 0xb7, 0x15, 0xa7, 0x63, 0xa7, 0x86, 0xb6, 0xcf, 0x76, 0x95, 0x73, 0x81, 0xc8, 0x93, 0x8b, 0x0d, 0xac, 0x11, 0x5b, 0xeb, 0x06, 0x3d, 0xac, 0x0e, 0x8a, 0xb4, 0xb6, 0x84, 0x58, 0x92, 0x21, 0xad, 0x62, 0xf4, 0xa4, 0xba, 0x8e, 0x56, 0x15, 0xb0, 0xb5, 0x03, 0xcb, 0xb6, 0xd0, 0x0f, 0x03, 0x3d, 0xea, 0xd0, 0x43, 0xaf, 0xf1, 0xc9, 0x6d, 0x2f, 0x8d, 0xa0, 0x43, 0x3f, 0xfe, 0x01, 0xda, 0x6e, 0xd3, 0x26, 0x65, 0xd7, 0x69, 0xd3, 0xef, 0x46, 0xda, 0xf4, 0xfb, 0x6b, 0x34, 0x51, 0x9b, 0x7e, 0xd7, 0x80, 0xca, 0xc7, 0x21, 0x67, 0x39, 0xe4, 0xe3, 0xac, 0x9c, 0xb8, 0x88, 0xa3, 0x2e, 0xe9, 0x17, 0xce, 0xf0, 0xcd, 0x7b, 0x24, 0xdf, 0xef, 0xbd, 0x37, 0xb3, 0xa4, 0x90, 0x7e, 0xc6, 0xd8, 0x9e, 0x9b, 0x8f, 0xb3, 0x96, 0x90, 0x65, 0x65, 0x65, 0x65, 0x6d, 0x75, 0x75, 0x75, 0x0d, 0x5b, 0x79, 0xbb, 0x26, 0x78, 0x46, 0x42, 0xc4, 0xc9, 0xca, 0x8a, 0x48, 0x56, 0x57, 0x79, 0xb2, 0xf2, 0x65, 0x9e, 0x88, 0x35, 0x2e, 0xf8, 0x1a, 0xe7, 0x86, 0x94, 0x7c, 0x7f, 0x7f, 0x7f, 0x39, 0x8a, 0xa2, 0x32, 0xb6, 0xf2, 0xb6,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c5, 0x25, 0x4f, 0xcd, 0xca, 0x72, 0xd7, 0x67, 0x19, 0xb9, 0xe7, 0x9a, 0xca, 0x33, 0x17, 0xa6, 0xe7, 0x3b, 0x97, 0xa7, 0x67, 0x57, 0x97, 0xbb, 0x2b, 0x4a, 0xc3, 0xf4, 0xa5, 0xcb, 0x17, 0xa7, 0xb3, 0x73, 0x67, 0x9e, 0x78, 0xbc, 0xa9, 0x9c, 0x76, 0xb1, 0x33, 0xf3, 0xd4, 0xea, 0x42, 0xe7, 0xca, 0xea, 0xd3, 0x4a, 0x6e, 0xae, 0xab, 0x6c, 0x29, 0x95, 0x66, 0x4b, 0xdd, 0xf3, 0xcb, 0x57, 0xd4, 0x22, 0x56, 0x17, 0x3b, 0x0b, 0xb3, 0x9d, 0xd2, 0x61, 0x46, 0x69, 0xb6, 0x32, 0xb7, 0xba, 0x34, 0x33, 0x7d, 0x49, 0x39, 0x5a, 0x99, 0x99, 0x29, 0x6f, 0xce, 0xaf, 0x76, 0x17, 0x56, 0x97, 0xa6, 0x9f, 0xee, 0x54, 0xd7, 0x4c, 0x3d, 0x37, 0xf5, 0x5f, 0xec, 0x29, 0xd4, 0x17,
+2
build/baremetalpi/Makefile
··· 28 28 $(TIC80LIB)/libgiflib.a \ 29 29 $(TIC80LIB)/liblpeg.a \ 30 30 $(TIC80LIB)/liblua.a \ 31 + $(TIC80LIB)/libmoon.a \ 32 + $(TIC80LIB)/libfennel.a \ 31 33 $(TIC80LIB)/libzip.a \ 32 34 $(TIC80LIB)/libblipbuf.a \ 33 35 $(TIC80LIB)/libsquirrel.a \
+1 -1
build/tools/prj2cart.c
··· 47 47 48 48 tic_cartridge* cart = calloc(1, sizeof(tic_cartridge)); 49 49 50 - tic_project_load(argv[1], buffer, size, cart); 50 + tic_project_load(argv[1], (char*)buffer, size, cart); 51 51 52 52 FILE* cartFile = fopen(argv[2], "wb"); 53 53
+2 -2
build/tools/wasmp2cart.c
··· 46 46 } 47 47 } 48 48 49 - char * readFile(char* name, unsigned int* size) { 49 + char * readFile(char* name, int* size) { 50 50 FILE* file = fopen(name, "rb"); 51 51 52 52 if(!file) { ··· 63 63 fread(buffer, *size, 1, file); 64 64 fclose(file); 65 65 66 - return buffer; 66 + return (char*)buffer; 67 67 } 68 68 69 69 int main(int argc, char** argv)
+1 -1
build/tools/xplode.c
··· 122 122 123 123 // save code 124 124 { 125 - writeFile("code.lua", (FileBuffer){strlen(cart->code.data), cart->code.data}); 125 + writeFile("code.lua", (FileBuffer){strlen(cart->code.data), (u8*)cart->code.data}); 126 126 printf("code.lua successfully exported\n"); 127 127 } 128 128
+65 -93
cmake/core.cmake
··· 2 2 # TIC-80 core 3 3 ################################ 4 4 5 - macro(MACRO_CORE SCRIPT DEFINE BUILD_DEPRECATED) 6 - 7 - set(TIC80CORE_DIR ${CMAKE_SOURCE_DIR}/src) 8 - set(TIC80CORE_SRC 9 - ${TIC80CORE_DIR}/core/core.c 10 - ${TIC80CORE_DIR}/core/languages.c 11 - ${TIC80CORE_DIR}/core/draw.c 12 - ${TIC80CORE_DIR}/core/io.c 13 - ${TIC80CORE_DIR}/core/sound.c 14 - ${TIC80CORE_DIR}/tic.c 15 - ${TIC80CORE_DIR}/cart.c 16 - ${TIC80CORE_DIR}/tools.c 17 - ${TIC80CORE_DIR}/zip.c 18 - ${TIC80CORE_DIR}/tilesheet.c 19 - ) 20 - 21 - if(${BUILD_DEPRECATED}) 22 - set(TIC80CORE_SRC ${TIC80CORE_SRC} ${TIC80CORE_DIR}/ext/gif.c) 23 - endif() 5 + if(WIN32) 6 + add_library(dlfcn STATIC ${THIRDPARTY_DIR}/dlfcn/src/dlfcn.c) 24 7 25 - add_library(tic80core${SCRIPT} STATIC ${TIC80CORE_SRC}) 8 + target_include_directories(dlfcn 9 + INTERFACE 10 + ${THIRDPARTY_DIR}/dirent/include 11 + ${THIRDPARTY_DIR}/dlfcn/src) 12 + endif() 26 13 27 - if (FREEBSD) 28 - target_include_directories(tic80core${SCRIPT} PRIVATE ${SYSROOT_PATH}/usr/local/include) 29 - target_link_directories(tic80core${SCRIPT} PRIVATE ${SYSROOT_PATH}/usr/local/lib) 30 - endif() 14 + set(BUILD_DEPRECATED TRUE) 31 15 32 - target_include_directories(tic80core${SCRIPT} 33 - PRIVATE 34 - ${THIRDPARTY_DIR}/moonscript 35 - ${THIRDPARTY_DIR}/fennel 36 - ${POCKETPY_DIR}/src 37 - PUBLIC 38 - ${CMAKE_SOURCE_DIR}/include 39 - ${CMAKE_SOURCE_DIR}/src) 40 - 41 - target_link_libraries(tic80core${SCRIPT} blipbuf zlib) 42 - 43 - if(BUILD_WITH_LUA) 44 - target_link_libraries(tic80core${SCRIPT} lua) 45 - endif() 46 - 47 - if(BUILD_WITH_JS) 48 - target_link_libraries(tic80core${SCRIPT} js) 49 - endif() 50 - 51 - if(BUILD_WITH_SCHEME) 52 - target_link_libraries(tic80core${SCRIPT} scheme) 53 - endif() 54 - 55 - if(BUILD_WITH_SQUIRREL) 56 - target_link_libraries(tic80core${SCRIPT} squirrel) 57 - endif() 58 - 59 - if(BUILD_WITH_PYTHON) 60 - target_link_libraries(tic80core${SCRIPT} python) 61 - endif() 62 - 63 - if(BUILD_WITH_WREN) 64 - target_link_libraries(tic80core${SCRIPT} wren) 65 - endif() 66 - 67 - if(BUILD_WITH_MRUBY) 68 - target_link_libraries(tic80core${SCRIPT} ruby) 69 - endif() 70 - 71 - if(BUILD_WITH_JANET) 72 - target_link_libraries(tic80core${SCRIPT} janet) 73 - endif() 74 - 75 - if(BUILD_WITH_WASM) 76 - target_link_libraries(tic80core${SCRIPT} wasm) 77 - endif() 16 + set(TIC80CORE_DIR ${CMAKE_SOURCE_DIR}/src) 17 + set(TIC80CORE_SRC 18 + ${TIC80CORE_DIR}/core/core.c 19 + ${TIC80CORE_DIR}/core/draw.c 20 + ${TIC80CORE_DIR}/core/io.c 21 + ${TIC80CORE_DIR}/core/sound.c 22 + ${TIC80CORE_DIR}/tic.c 23 + ${TIC80CORE_DIR}/cart.c 24 + ${TIC80CORE_DIR}/tools.c 25 + ${TIC80CORE_DIR}/zip.c 26 + ${TIC80CORE_DIR}/tilesheet.c 27 + ${TIC80CORE_DIR}/script.c 28 + ) 78 29 79 - if(${BUILD_DEPRECATED}) 80 - target_compile_definitions(tic80core${SCRIPT} PRIVATE BUILD_DEPRECATED) 81 - target_link_libraries(tic80core${SCRIPT} giflib) 82 - endif() 30 + if(BUILD_DEPRECATED) 31 + set(TIC80CORE_SRC ${TIC80CORE_SRC} ${TIC80CORE_DIR}/ext/gif.c) 32 + endif() 83 33 84 - if(LINUX) 85 - target_link_libraries(tic80core${SCRIPT} m) 86 - endif() 34 + add_library(tic80core STATIC ${TIC80CORE_SRC}) 87 35 88 - target_compile_definitions(tic80core${SCRIPT} PUBLIC ${DEFINE}) 36 + if (FREEBSD) 37 + target_include_directories(tic80core PRIVATE ${SYSROOT_PATH}/usr/local/include) 38 + target_link_directories(tic80core PRIVATE ${SYSROOT_PATH}/usr/local/lib) 39 + endif() 89 40 90 - endmacro() 41 + if(WIN32) 42 + target_link_libraries(tic80core PUBLIC dlfcn) 43 + endif() 91 44 92 - MACRO_CORE("" "" TRUE) 45 + target_include_directories(tic80core 46 + PRIVATE 47 + ${THIRDPARTY_DIR}/moonscript 48 + ${THIRDPARTY_DIR}/fennel 49 + ${POCKETPY_DIR}/src 50 + PUBLIC 51 + ${CMAKE_SOURCE_DIR}/include 52 + ${CMAKE_SOURCE_DIR}/src) 93 53 94 - if(BUILD_STUB) 54 + target_link_libraries(tic80core PRIVATE blipbuf zlib) 95 55 56 + if(BUILD_STATIC) 96 57 if(BUILD_WITH_LUA) 97 - MACRO_CORE(lua TIC_BUILD_WITH_LUA FALSE) 58 + target_link_libraries(tic80core PRIVATE lua) 98 59 endif() 99 60 100 61 if(BUILD_WITH_MOON) 101 - MACRO_CORE(moon TIC_BUILD_WITH_MOON FALSE) 62 + target_link_libraries(tic80core PRIVATE moon) 102 63 endif() 103 64 104 65 if(BUILD_WITH_FENNEL) 105 - MACRO_CORE(fennel TIC_BUILD_WITH_FENNEL FALSE) 66 + target_link_libraries(tic80core PRIVATE fennel) 106 67 endif() 107 - 68 + 108 69 if(BUILD_WITH_JS) 109 - MACRO_CORE(js TIC_BUILD_WITH_JS FALSE) 70 + target_link_libraries(tic80core PRIVATE js) 110 71 endif() 111 72 112 73 if(BUILD_WITH_SCHEME) 113 - MACRO_CORE(scheme TIC_BUILD_WITH_SCHEME FALSE) 74 + target_link_libraries(tic80core PRIVATE scheme) 114 75 endif() 115 76 116 77 if(BUILD_WITH_SQUIRREL) 117 - MACRO_CORE(squirrel TIC_BUILD_WITH_SQUIRREL FALSE) 78 + target_link_libraries(tic80core PRIVATE squirrel) 118 79 endif() 119 80 120 81 if(BUILD_WITH_PYTHON) 121 - MACRO_CORE(python TIC_BUILD_WITH_PYTHON FALSE) 82 + target_link_libraries(tic80core PRIVATE python) 122 83 endif() 123 84 124 85 if(BUILD_WITH_WREN) 125 - MACRO_CORE(wren TIC_BUILD_WITH_WREN FALSE) 86 + target_link_libraries(tic80core PRIVATE wren) 126 87 endif() 127 88 128 89 if(BUILD_WITH_MRUBY) 129 - MACRO_CORE(ruby TIC_BUILD_WITH_MRUBY FALSE) 90 + target_link_libraries(tic80core PRIVATE ruby) 130 91 endif() 131 92 132 93 if(BUILD_WITH_JANET) 133 - MACRO_CORE(janet TIC_BUILD_WITH_JANET FALSE) 94 + target_link_libraries(tic80core PRIVATE janet) 134 95 endif() 135 96 136 97 if(BUILD_WITH_WASM) 137 - MACRO_CORE(wasm TIC_BUILD_WITH_WASM FALSE) 98 + target_link_libraries(tic80core PRIVATE wasm) 138 99 endif() 139 100 101 + target_link_libraries(tic80core PRIVATE runtime) 102 + 103 + endif() 104 + 105 + if(BUILD_DEPRECATED) 106 + target_compile_definitions(tic80core PRIVATE BUILD_DEPRECATED) 107 + target_link_libraries(tic80core PRIVATE giflib) 108 + endif() 109 + 110 + if(LINUX) 111 + target_link_libraries(tic80core PRIVATE m) 140 112 endif()
-19
cmake/demos.cmake
··· 1 - if(BUILD_DEMO_CARTS) 2 - 3 - foreach(CART_FILE ${DEMO_CARTS}) 4 - 5 - get_filename_component(CART_NAME ${CART_FILE} NAME_WE) 6 - 7 - set(OUTNAME ${CMAKE_SOURCE_DIR}/build/assets/${CART_NAME}.tic.dat) 8 - set(OUTPRJ ${CMAKE_SOURCE_DIR}/build/${CART_NAME}.tic) 9 - 10 - list(APPEND DEMO_CARTS_OUT ${OUTNAME}) 11 - 12 - add_custom_command(OUTPUT ${OUTNAME} 13 - COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/prj2cart ${CART_FILE} ${OUTPRJ} && ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/bin2txt ${OUTPRJ} ${OUTNAME} -z 14 - DEPENDS bin2txt prj2cart ${CART_FILE} 15 - ) 16 - 17 - endforeach(CART_FILE) 18 - 19 - endif()
+22
cmake/fennel.cmake
··· 1 + ################################ 2 + # Fennel 3 + ################################ 4 + 5 + if(BUILD_WITH_FENNEL) 6 + 7 + add_library(fennel ${TIC_RUNTIME} ${CMAKE_SOURCE_DIR}/src/api/fennel.c) 8 + 9 + if(NOT BUILD_STATIC) 10 + set_target_properties(fennel PROPERTIES PREFIX "") 11 + endif() 12 + 13 + target_link_libraries(fennel PRIVATE lua runtime) 14 + target_include_directories(fennel 15 + PRIVATE 16 + ${THIRDPARTY_DIR}/fennel 17 + ${CMAKE_SOURCE_DIR}/include 18 + ${CMAKE_SOURCE_DIR}/src 19 + ) 20 + target_compile_definitions(fennel INTERFACE TIC_BUILD_WITH_FENNEL) 21 + 22 + endif()
+2 -5
cmake/janet.cmake
··· 49 49 set_target_properties(janet PROPERTIES PREFIX "") 50 50 endif() 51 51 52 + target_link_libraries(janet PRIVATE runtime) 53 + 52 54 target_include_directories(janet 53 55 PRIVATE 54 56 ${THIRDPARTY_DIR}/janet/src/include ··· 58 60 ) 59 61 60 62 target_compile_definitions(janet INTERFACE TIC_BUILD_WITH_JANET=1) 61 - 62 - if(BUILD_DEMO_CARTS) 63 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/janetdemo.janet) 64 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/bunny/janetmark.janet) 65 - endif() 66 63 67 64 endif()
+2 -64
cmake/lua.cmake
··· 61 61 list(APPEND LUA_SRC ${CMAKE_SOURCE_DIR}/src/api/lua.c) 62 62 list(APPEND LUA_SRC ${CMAKE_SOURCE_DIR}/src/api/parse_note.c) 63 63 64 - if(BUILD_WITH_MOON) 65 - list(APPEND LUA_SRC ${CMAKE_SOURCE_DIR}/src/api/moonscript.c) 66 - endif() 67 - 68 - if(BUILD_WITH_FENNEL) 69 - list(APPEND LUA_SRC ${CMAKE_SOURCE_DIR}/src/api/fennel.c) 70 - endif() 71 - 72 64 add_library(lua ${TIC_RUNTIME} ${LUA_SRC}) 73 65 74 66 if(NOT BUILD_STATIC) 75 67 set_target_properties(lua PROPERTIES PREFIX "") 76 68 endif() 77 69 70 + target_link_libraries(lua PRIVATE runtime) 71 + 78 72 target_compile_definitions(lua PRIVATE LUA_COMPAT_5_2) 79 73 target_include_directories(lua 80 74 PUBLIC ${THIRDPARTY_DIR}/lua ··· 89 83 90 84 target_compile_definitions(lua INTERFACE TIC_BUILD_WITH_LUA) 91 85 92 - if(BUILD_WITH_MOON) 93 - target_include_directories(lua PRIVATE ${THIRDPARTY_DIR}/moonscript) 94 - target_compile_definitions(lua INTERFACE TIC_BUILD_WITH_MOON) 95 - endif() 96 - 97 - if(BUILD_WITH_FENNEL) 98 - target_include_directories(lua PRIVATE ${THIRDPARTY_DIR}/fennel) 99 - target_compile_definitions(lua INTERFACE TIC_BUILD_WITH_FENNEL) 100 - endif() 101 - 102 - if(BUILD_DEMO_CARTS) 103 - list(APPEND DEMO_CARTS ${CMAKE_SOURCE_DIR}/config.lua) 104 - 105 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/quest.lua) 106 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/car.lua) 107 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/music.lua) 108 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/sfx.lua) 109 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/palette.lua) 110 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/bpp.lua) 111 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/tetris.lua) 112 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/font.lua) 113 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/fire.lua) 114 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/benchmark.lua) 115 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/p3d.lua) 116 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/luademo.lua) 117 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/bunny/luamark.lua) 118 - 119 - if(BUILD_WITH_MOON) 120 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/moondemo.moon) 121 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/bunny/moonmark.moon) 122 - endif() 123 - 124 - if(BUILD_WITH_FENNEL) 125 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/fenneldemo.fnl) 126 - endif() 127 - endif() 128 - endif() 129 - 130 - ################################ 131 - # LPEG 132 - ################################ 133 - 134 - if(BUILD_WITH_MOON) 135 - 136 - set(LPEG_DIR ${THIRDPARTY_DIR}/lpeg) 137 - set(LPEG_SRC 138 - ${LPEG_DIR}/lpcap.c 139 - ${LPEG_DIR}/lpcode.c 140 - ${LPEG_DIR}/lpprint.c 141 - ${LPEG_DIR}/lptree.c 142 - ${LPEG_DIR}/lpvm.c 143 - ) 144 - 145 - add_library(lpeg STATIC ${LPEG_SRC}) 146 - target_include_directories(lpeg PRIVATE ${LUA_DIR}) 147 - target_link_libraries(lua PRIVATE lpeg) 148 86 endif()
+36
cmake/moon.cmake
··· 1 + ################################ 2 + # MoonScript 3 + ################################ 4 + 5 + if(BUILD_WITH_MOON) 6 + 7 + set(LPEG_DIR ${THIRDPARTY_DIR}/lpeg) 8 + set(LPEG_SRC 9 + ${LPEG_DIR}/lpcap.c 10 + ${LPEG_DIR}/lpcode.c 11 + ${LPEG_DIR}/lpprint.c 12 + ${LPEG_DIR}/lptree.c 13 + ${LPEG_DIR}/lpvm.c 14 + ) 15 + 16 + add_library(lpeg STATIC ${LPEG_SRC}) 17 + target_include_directories(lpeg PRIVATE ${LUA_DIR}) 18 + 19 + add_library(moon ${TIC_RUNTIME} ${CMAKE_SOURCE_DIR}/src/api/moonscript.c) 20 + 21 + if(NOT BUILD_STATIC) 22 + set_target_properties(moon PROPERTIES PREFIX "") 23 + endif() 24 + 25 + target_link_libraries(moon PRIVATE lpeg lua runtime) 26 + 27 + target_include_directories(moon 28 + PRIVATE 29 + ${THIRDPARTY_DIR}/moonscript 30 + ${CMAKE_SOURCE_DIR}/include 31 + ${CMAKE_SOURCE_DIR}/src 32 + ) 33 + 34 + target_compile_definitions(moon INTERFACE TIC_BUILD_WITH_MOON) 35 + 36 + endif()
+2 -5
cmake/mruby.cmake
··· 23 23 set_target_properties(ruby PROPERTIES PREFIX "") 24 24 endif() 25 25 26 + target_link_libraries(ruby PRIVATE runtime) 27 + 26 28 if(CMAKE_BUILD_TYPE) 27 29 string(TOUPPER ${CMAKE_BUILD_TYPE} BUILD_TYPE_UC) 28 30 endif() ··· 89 91 target_link_libraries(ruby PRIVATE ${MRUBY_LIB}) 90 92 91 93 target_compile_definitions(ruby INTERFACE TIC_BUILD_WITH_MRUBY=1) 92 - 93 - if(BUILD_DEMO_CARTS) 94 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/rubydemo.rb) 95 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/bunny/rubymark.rb) 96 - endif() 97 94 98 95 endif()
+2 -5
cmake/pocketpy.cmake
··· 26 26 set_target_properties(python PROPERTIES PREFIX "") 27 27 endif() 28 28 29 + target_link_libraries(python PRIVATE runtime) 30 + 29 31 target_include_directories(python 30 32 PRIVATE 31 33 ${THIRDPARTY_DIR}/pocketpy/include ··· 41 43 endif() 42 44 43 45 target_compile_definitions(python INTERFACE TIC_BUILD_WITH_PYTHON=1) 44 - 45 - if(BUILD_DEMO_CARTS) 46 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/pythondemo.py) 47 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/bunny/pythonmark.py) 48 - endif() 49 46 50 47 endif()
+2 -5
cmake/quickjs.cmake
··· 47 47 set_target_properties(js PROPERTIES PREFIX "") 48 48 endif() 49 49 50 + target_link_libraries(js PRIVATE runtime) 51 + 50 52 target_link_libraries(js PRIVATE quickjs) 51 53 target_include_directories(js 52 54 PRIVATE ··· 56 58 ) 57 59 58 60 target_compile_definitions(js INTERFACE TIC_BUILD_WITH_JS=1) 59 - 60 - if(BUILD_DEMO_CARTS) 61 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/jsdemo.js) 62 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/bunny/jsmark.js) 63 - endif() 64 61 65 62 endif()
+2 -5
cmake/scheme.cmake
··· 20 20 set_target_properties(scheme PROPERTIES PREFIX "") 21 21 endif() 22 22 23 + target_link_libraries(scheme PRIVATE runtime) 24 + 23 25 set_target_properties(scheme PROPERTIES LINKER_LANGUAGE CXX) 24 26 target_include_directories(scheme 25 27 PUBLIC ${SCHEME_DIR} ··· 37 39 endif() 38 40 39 41 target_compile_definitions(scheme INTERFACE TIC_BUILD_WITH_SCHEME=1) 40 - 41 - if(BUILD_DEMO_CARTS) 42 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/schemedemo.scm) 43 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/bunny/schememark.scm) 44 - endif() 45 42 46 43 endif()
+4 -6
cmake/sdl.cmake
··· 35 35 ${CMAKE_SOURCE_DIR}/src) 36 36 37 37 if(MINGW) 38 - target_link_libraries(player-sdl mingw32) 38 + target_link_libraries(player-sdl PRIVATE mingw32) 39 39 target_link_options(player-sdl PRIVATE -static) 40 40 endif() 41 41 42 - target_link_libraries(player-sdl tic80core SDL2main) 42 + target_link_libraries(player-sdl PRIVATE tic80core SDL2main) 43 43 44 44 if(BUILD_STATIC) 45 - target_link_libraries(player-sdl SDL2-static) 45 + target_link_libraries(player-sdl PRIVATE SDL2-static) 46 46 else() 47 - target_link_libraries(player-sdl SDL2) 47 + target_link_libraries(player-sdl PRIVATE SDL2) 48 48 endif() 49 49 endif() 50 50 ··· 146 146 set(TIC80_SRC ${TIC80_SRC} ${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c) 147 147 148 148 add_library(tic80 SHARED ${TIC80_SRC}) 149 - 150 - target_link_libraries(tic80) 151 149 152 150 else() 153 151 add_executable(tic80 ${TIC80_SRC})
+2 -5
cmake/squirrel.cmake
··· 43 43 set_target_properties(squirrel PROPERTIES PREFIX "") 44 44 endif() 45 45 46 + target_link_libraries(squirrel PRIVATE runtime) 47 + 46 48 set_target_properties(squirrel PROPERTIES LINKER_LANGUAGE CXX) 47 49 48 50 target_include_directories(squirrel ··· 55 57 ) 56 58 57 59 target_compile_definitions(squirrel INTERFACE TIC_BUILD_WITH_SQUIRREL=1) 58 - 59 - if(BUILD_DEMO_CARTS) 60 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/squirreldemo.nut) 61 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/bunny/squirrelmark.nut) 62 - endif() 63 60 64 61 endif()
-120
cmake/stub.cmake
··· 1 - ################################ 2 - # TIC-80 stub 3 - ################################ 4 - 5 - if(BUILD_STUB) 6 - 7 - macro(MACRO_STUB SCRIPT) 8 - 9 - set(TIC80_SRC 10 - src/system/sdl/main.c 11 - src/studio/screens/run.c 12 - src/studio/screens/menu.c 13 - src/studio/screens/mainmenu.c 14 - src/studio/screens/start.c 15 - src/studio/config.c 16 - src/studio/studio.c 17 - src/studio/fs.c 18 - src/ext/md5.c) 19 - 20 - if(WIN32) 21 - 22 - configure_file("${PROJECT_SOURCE_DIR}/build/windows/tic80.rc.in" "${PROJECT_SOURCE_DIR}/build/windows/tic80.rc") 23 - set(TIC80_SRC ${TIC80_SRC} "${PROJECT_SOURCE_DIR}/build/windows/tic80.rc") 24 - 25 - add_executable(tic80${SCRIPT} ${SYSTEM_TYPE} ${TIC80_SRC}) 26 - 27 - target_include_directories(tic80${SCRIPT} PRIVATE ${THIRDPARTY_DIR}/dirent/include) 28 - else() 29 - add_executable(tic80${SCRIPT} ${TIC80_SRC}) 30 - endif() 31 - 32 - target_include_directories(tic80${SCRIPT} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) 33 - 34 - if(BUILD_SDLGPU) 35 - target_compile_definitions(tic80${SCRIPT} PRIVATE CRT_SHADER_SUPPORT) 36 - endif() 37 - 38 - if(MINGW) 39 - target_link_libraries(tic80${SCRIPT} mingw32) 40 - target_link_options(tic80${SCRIPT} PRIVATE -static -mconsole) 41 - endif() 42 - 43 - if(EMSCRIPTEN) 44 - set_target_properties(tic80${SCRIPT} PROPERTIES LINK_FLAGS "-s WASM=1 -s USE_SDL=2 -s ALLOW_MEMORY_GROWTH=1 -s FETCH=1 -s EXPORT_ES6=1 -s MODULARIZE=1 -s ENVIRONMENT=web -s EXPORT_NAME=createModule -s EXPORTED_RUNTIME_METHODS=['ENV'] -lidbfs.js") 45 - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s USE_SDL=2") 46 - 47 - if(CMAKE_BUILD_TYPE STREQUAL "Debug") 48 - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s ASSERTIONS=1") 49 - endif() 50 - 51 - else() 52 - target_link_libraries(tic80${SCRIPT} SDL2main) 53 - endif() 54 - 55 - target_link_libraries(tic80${SCRIPT} tic80core${SCRIPT} argparse) 56 - 57 - if(RPI) 58 - target_include_directories(tic80${SCRIPT} PRIVATE ${SYSROOT_PATH}/usr/local/include/SDL2) 59 - target_link_directories(tic80${SCRIPT} PRIVATE ${SYSROOT_PATH}/usr/local/lib ${SYSROOT_PATH}/opt/vc/lib) 60 - target_compile_definitions(tic80${SCRIPT} PRIVATE __RPI__) 61 - endif() 62 - 63 - if(BUILD_SDLGPU) 64 - target_link_libraries(tic80${SCRIPT} sdlgpu) 65 - else() 66 - if(EMSCRIPTEN) 67 - elseif(RPI) 68 - target_link_libraries(tic80${SCRIPT} libSDL2.a bcm_host pthread dl) 69 - else() 70 - target_link_libraries(tic80${SCRIPT} SDL2-static) 71 - endif() 72 - endif() 73 - 74 - endmacro() 75 - 76 - if(BUILD_WITH_LUA) 77 - MACRO_STUB(lua) 78 - endif() 79 - 80 - if(BUILD_WITH_MOON) 81 - MACRO_STUB(moon) 82 - endif() 83 - 84 - if(BUILD_WITH_FENNEL) 85 - MACRO_STUB(fennel) 86 - endif() 87 - 88 - if(BUILD_WITH_JS) 89 - MACRO_STUB(js) 90 - endif() 91 - 92 - if(BUILD_WITH_SCHEME) 93 - MACRO_STUB(scheme) 94 - endif() 95 - 96 - if(BUILD_WITH_SQUIRREL) 97 - MACRO_STUB(squirrel) 98 - endif() 99 - 100 - if(BUILD_WITH_PYTHON) 101 - MACRO_STUB(python) 102 - endif() 103 - 104 - if(BUILD_WITH_WREN) 105 - MACRO_STUB(wren) 106 - endif() 107 - 108 - if(BUILD_WITH_JANET) 109 - MACRO_STUB(janet) 110 - endif() 111 - 112 - if(BUILD_WITH_MRUBY) 113 - MACRO_STUB(ruby) 114 - endif() 115 - 116 - if(BUILD_WITH_WASM) 117 - MACRO_STUB(wasm) 118 - endif() 119 - 120 - endif()
+7 -9
cmake/studio.cmake
··· 18 18 ${TIC80LIB_DIR}/studio/editors/music.c 19 19 ${TIC80LIB_DIR}/studio/studio.c 20 20 ${TIC80LIB_DIR}/studio/config.c 21 - ${TIC80LIB_DIR}/studio/demos.c 22 21 ${TIC80LIB_DIR}/studio/fs.c 23 22 ${TIC80LIB_DIR}/studio/net.c 24 23 ${TIC80LIB_DIR}/ext/md5.c 25 24 ${TIC80LIB_DIR}/ext/history.c 26 25 ${TIC80LIB_DIR}/ext/gif.c 27 26 ${TIC80LIB_DIR}/ext/png.c 27 + ${TIC80LIB_DIR}/ext/json.c 28 28 ) 29 29 30 30 if(${BUILD_PRO}) ··· 35 35 36 36 add_library(tic80studio STATIC 37 37 ${TIC80STUDIO_SRC} 38 - ${DEMO_CARTS_OUT} 39 38 ${CMAKE_SOURCE_DIR}/build/assets/cart.png.dat) 40 39 41 - if(WIN32) 42 - target_include_directories(tic80studio PRIVATE ${THIRDPARTY_DIR}/dirent/include) 43 - endif() 44 - 45 - target_include_directories(tic80studio PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) 40 + target_include_directories(tic80studio 41 + PRIVATE ${THIRDPARTY_DIR}/jsmn 42 + PUBLIC ${CMAKE_CURRENT_BINARY_DIR} 43 + ) 46 44 47 - target_link_libraries(tic80studio tic80core zip wave_writer argparse giflib png) 45 + target_link_libraries(tic80studio PUBLIC tic80core PRIVATE zip wave_writer argparse giflib png) 48 46 49 47 if(USE_NAETT) 50 48 target_compile_definitions(tic80studio PRIVATE USE_NAETT) 51 - target_link_libraries(tic80studio naett) 49 + target_link_libraries(tic80studio PRIVATE naett) 52 50 endif() 53 51 54 52 if(BUILD_PRO)
+1 -5
cmake/tools.cmake
··· 2 2 # bin2txt cart2prj prj2cart xplode wasmp2cart 3 3 ################################ 4 4 5 - if(BUILD_DEMO_CARTS) 5 + if(BUILD_TOOLS) 6 6 7 7 set(TOOLS_DIR ${CMAKE_SOURCE_DIR}/build/tools) 8 8 ··· 32 32 if(LINUX) 33 33 target_link_libraries(xplode m) 34 34 endif() 35 - 36 - add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/build/assets/cart.png.dat 37 - COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/bin2txt ${CMAKE_SOURCE_DIR}/build/cart.png ${CMAKE_SOURCE_DIR}/build/assets/cart.png.dat 38 - DEPENDS bin2txt ${CMAKE_SOURCE_DIR}/build/cart.png) 39 35 40 36 endif()
+2 -28
cmake/wasm.cmake
··· 32 32 set_target_properties(wasm PROPERTIES PREFIX "") 33 33 endif() 34 34 35 + target_link_libraries(wasm PRIVATE runtime) 36 + 35 37 target_include_directories(wasm 36 38 PUBLIC ${WASM_DIR} 37 39 PRIVATE ··· 40 42 ) 41 43 42 44 target_compile_definitions(wasm INTERFACE TIC_BUILD_WITH_WASM=1) 43 - 44 - # we need to build these separately combining both the project 45 - # and the external WASM binary chunk since projects do not 46 - # include BINARY chunks 47 - 48 - if(BUILD_DEMO_CARTS) 49 - 50 - file(GLOB WASM_DEMOS 51 - ${DEMO_CARTS_IN}/wasm/*.wasmp 52 - ${DEMO_CARTS_IN}/bunny/wasmmark/*.wasmp 53 - ) 54 - 55 - foreach(CART_FILE ${WASM_DEMOS}) 56 - 57 - get_filename_component(CART_NAME ${CART_FILE} NAME_WE) 58 - get_filename_component(DIR ${CART_FILE} DIRECTORY) 59 - 60 - set(OUTNAME ${CMAKE_SOURCE_DIR}/build/assets/${CART_NAME}.tic.dat) 61 - set(WASM_BINARY ${DIR}/${CART_NAME}.wasm) 62 - set(OUTPRJ ${CMAKE_SOURCE_DIR}/build/${CART_NAME}.tic) 63 - list(APPEND DEMO_CARTS_OUT ${OUTNAME}) 64 - add_custom_command(OUTPUT ${OUTNAME} 65 - COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/wasmp2cart ${CART_FILE} ${OUTPRJ} --binary ${WASM_BINARY} && ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/bin2txt ${OUTPRJ} ${OUTNAME} -z 66 - DEPENDS bin2txt wasmp2cart ${CART_FILE} ${WASM_BINARY} 67 - ) 68 - 69 - endforeach(CART_FILE) 70 - endif() 71 45 72 46 endif()
+3 -6
cmake/wren.cmake
··· 30 30 if(NOT BUILD_STATIC) 31 31 set_target_properties(wren PROPERTIES PREFIX "") 32 32 endif() 33 - 33 + 34 + target_link_libraries(wren PRIVATE runtime) 35 + 34 36 target_include_directories(wren 35 37 PRIVATE 36 38 ${CMAKE_SOURCE_DIR}/include ··· 41 43 target_include_directories(wren PRIVATE ${THIRDPARTY_DIR}/wren/src/optional) 42 44 target_include_directories(wren PRIVATE ${THIRDPARTY_DIR}/wren/src/vm) 43 45 target_compile_definitions(wren INTERFACE TIC_BUILD_WITH_WREN=1) 44 - 45 - if(BUILD_DEMO_CARTS) 46 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/wrendemo.wren) 47 - list(APPEND DEMO_CARTS ${DEMO_CARTS_IN}/bunny/wrenmark.wren) 48 - endif() 49 46 50 47 endif()
+431
config.js
··· 1 + { 2 + 3 + "CODE_THEME": 4 + { 5 + "BG": 15, 6 + "FG": 12, 7 + "STRING": 4, 8 + "NUMBER": 11, 9 + "KEYWORD": 3, 10 + "API": 5, 11 + "COMMENT": 14, 12 + "SIGN": 13, 13 + "SELECT": 14, 14 + "CURSOR": 2, 15 + "SHADOW": true, 16 + "ALT_FONT": false, 17 + "ALT_CARET": false, 18 + "MATCH_DELIMITERS": true, 19 + "AUTO_DELIMITERS": false, 20 + }, 21 + 22 + "GAMEPAD_TOUCH_ALPHA":180, 23 + "CHECK_NEW_VERSION":true, 24 + "SOFTWARE_RENDERING":false, 25 + "UI_SCALE":4, 26 + "TRIM_ON_SAVE":false 27 + 28 + } 29 + 30 + // <TILES> 31 + // 000:eccccccccc888888caaaaaaaca888888cacccccccacc0ccccacc0ccccacc0ccc 32 + // 001:ccccceee8888cceeaaaa0cee888a0ceeccca0ccc0cca0c0c0cca0c0c0cca0c0c 33 + // 002:eccccccccc111111c2222222c2111111c2ccccccc2cc0cccc2cc0cccc2cc0ccc 34 + // 003:ccccceee1111ccee22220cee11120ceeccc20cee0cc20cee0cc20cce0cc200cc 35 + // 004:eccccccccc222222c3333333c3222222c3ccccccc3c0ccccc3cc0cccc3cc0ccc 36 + // 005:ccccceee2222ccee33330cee22230ceeccc30ceec0c30cee0cc30cce0cc300cc 37 + // 006:eccccccccc777777c6666666c6777777c6ccccccc6ccccccc6c000c0c6cccccc 38 + // 007:ccccceee7777ccee66660cee77760ceeccc60cccccc60c0c00c60c0cccc60c0c 39 + // 008:0dddddd0dddddddddddeedddddeeeedddeeeeeedddddddddedddddde0eeeeee0 40 + // 009:0dddddd0dddddddddeeeeeedddeeeedddddeedddddddddddedddddde0eeeeee0 41 + // 010:0dddddd0ddddeddddddeedddddeeeddddddeedddddddedddedddddde0eeeeee0 42 + // 011:0dddddd0dddedddddddeeddddddeeedddddeeddddddeddddedddddde0eeeeee0 43 + // 012:0666666066677666667667666676676666777766667667667666666707777770 44 + // 013:0222222022111222221221222211122222122122221112221222222101111110 45 + // 014:0aaaaaa0aa9aa9aaaa9aa9aaaaa99aaaaa9aa9aaaa9aa9aa9aaaaaa909999990 46 + // 015:0333333033233233332332333332223333333233333223332333333202222220 47 + // 016:cacccccccaaaaaaacaaacaaacaaaaccccaaaaaaac8888888cc000cccecccccec 48 + // 017:ccca00ccaaaa0ccecaaa0ceeaaaa0ceeaaaa0cee8888ccee000cceeecccceeee 49 + // 018:c2ccccccc2222222c2222cccc222c222c2222222c1111111cc000cccecccccec 50 + // 019:ccc20c0c22220c0c22220c0cc2220ccc22220cee1111ccee000cceeecccceeee 51 + // 020:c3ccccccc3333333c33c3c3cc333c3c3c3333333c2222222cc000cccecccccec 52 + // 021:ccc30c0c33330c0c3c330c0cc3330ccc33330cee2222ccee000cceeecccceeee 53 + // 022:c6ccccccc6666666c666ccccc6666cccc6666666c7777777cc000cccecccccec 54 + // 023:ccc600cc66660ccec6660cee66660cee66660cee7777ccee000cceeecccceeee 55 + // 024:000000000dddddd0dddddddddddeedddddeeeedddeeeeeeddddddddd0dddddd0 56 + // 025:000000000dddddd0dddddddddeeeeeedddeeeedddddeeddddddddddd0dddddd0 57 + // 026:000000000dddddd0ddddeddddddeedddddeeeddddddeedddddddeddd0dddddd0 58 + // 027:000000000dddddd0dddedddddddeeddddddeeedddddeeddddddedddd0dddddd0 59 + // 028:0000000006666660666776666676676666766766667777666676676606666660 60 + // 029:0000000002222220221112222212212222111222221221222211122202222220 61 + // 030:000000000aaaaaa0aa9aa9aaaa9aa9aaaaa99aaaaa9aa9aaaa9aa9aa0aaaaaa0 62 + // 031:0000000003333330332332333323323333322233333332333332233303333330 63 + // 032:eccccccccc111111c2222222c2111111c2ccccccc2c2c2c2c2c222c2c2cc2ccc 64 + // 033:ccccceee1111ccee22220cee11120ceeccc20cccc2c20c0c22c20c0c2cc20c0c 65 + // 036:0000000076555670000000000000000000000000000000000000000000000000 66 + // 039:ccc33333ccc33333ccc33333ccc33333ccc33333ccccc033ccccc033ddddd033 67 + // 040:33333333ccc33333ccc33333ccc33333ccc33333cccdd033ccccc033ccccc033 68 + // 041:3330000033300000333fffff33300000333dd0dd333333333333333333333333 69 + // 042:33300000333000003330000033300000333fffff333333333333333333333333 70 + // 048:c2ccccccc2222222c222ccccc2222cccc2222222c1111111cc000cccecccccec 71 + // 049:ccc200cc22220ccec2220cee22220cee22220cee1111ccee000cceeecccceeee 72 + // 052:000000000fffff00000000000000000000000000000000000000000000000000 73 + // 080:0000000000c0c00000c0c000000c00000cc0cc000cc0cc000000000000000000 74 + // 081:000000000cccc0000c00c0000c0ccc000ccc0c00000ccc000000000000000000 75 + // 082:0000000000ccc0000c000c000ccccc000cc0cc000ccccc000000000000000000 76 + // 083:00000000000cc00000cc00000ccccc0000cc0000000cc0000000000000000000 77 + // 084:0000000000cc0000000cc0000ccccc00000cc00000cc00000000000000000000 78 + // 085:000000000ccccc000c000c000c000c000ccccc000cccc0000000000000000000 79 + // 086:0000000000ccc00000c0c0000ccccc00000c0000000c00000000000000000000 80 + // 087:ccccccc0ccccccc0ccccccc0ccccccc0ccccccc0ccccccc0ccccccc000000000 81 + // 088:000000000cc0cc000c000c000c000c000c000c000cc0cc000000000000000000 82 + // 089:0000000000ccc0000c0c0c000ccccc000ccccc000c0c0c000000000000000000 83 + // 090:000000000cc0cc000cc0cc00000000000cc0cc000cc0cc000000000000000000 84 + // 091:00000000000cc00000cc0c000ccc0c0000cc0c00000cc0000000000000000000 85 + // 092:0000000000cccc0000c00c0000c00c000cc0cc000cc0cc000000000000000000 86 + // 093:0000000000ccc00c0ccccc0c0ccccc0c0ccccc0c00ccc00c0000000000000000 87 + // 094:00000000c00cc00c0c0c00c0c00cc0c00c0c00c00c0cc00c0000000000000000 88 + // 095:000000000ccccc000ccccc000ccccc000cc0cc000c000c000000000000000000 89 + // 096:000000000cccc0000c00cc000c00cc000ccccc0000cccc000000000000000000 90 + // 097:000000000000000000000c0000000c0000000c0000cccc000000000000000000 91 + // 098:00000000000c0000000cc000000ccc00000cc000000c00000000000000000000 92 + // 099:00000000000cc000000ccc000c0ccc0000cccc00000cc0000000000000000000 93 + // 100:0000000000ccc0000c000c000c000c0000ccc000000c00000000000000000000 94 + // 101:00000000000c0000000cc0000ccccc00000cc000000c00000000000000000000 95 + // 102:000000000ccccc00000000000ccccc00000000000ccccc000000000000000000 96 + // 103:00000000000ccc0000c000c00c00c00c00c000c0000ccc000000000000000000 97 + // 104:000000000ccccc000c0c0c000ccccc000c0c0c000ccccc000000000000000000 98 + // 105:00000000000000000ccccc0000ccc000000c0000000000000000000000000000 99 + // 106:0000000000000000000c000000ccc0000ccccc00000000000000000000000000 100 + // 107:000000000000c00000000c0000ccccc00c0ccc000c00c0000000000000000000 101 + // 108:000000000c0c0c00000000000c000c00000000000c0c0c000000000000000000 102 + // 109:000000000000c000000c0c0000c0c0000c0c00000cc000000000000000000000 103 + // 110:000000000c0c0c00000000000c0c0c00000000000c0c0c000000000000000000 104 + // 111:0000000000ccc0000c0c0c000ccccc000c000c0000ccc0000000000000000000 105 + // 112:000000000000c000000cc00000ccc000000cc0000000c0000000000000000000 106 + // 113:0000000000c0000000cc000000ccc00000cc000000c000000000000000000000 107 + // 114:000000000ccccc00000000000c0ccc000c0ccc000c0ccc000000000000000000 108 + // 115:000000000ccccc00000000000c0c0c000c0c0c000c0c0c000000000000000000 109 + // 116:00000000000c00000000c0000c0ccc000000c000000c00000000000000000000 110 + // 117:000000000cccc00000000c000c000c000c00000000cccc000000000000000000 111 + // 118:0000000000c00000000c00000000c000000c000000c000000000000000000000 112 + // 119:000000000c0c00000c0cc0000c0ccc000c0cc0000c0c00000000000000000000 113 + // 120:000000000ccccc000ccccc000ccccc000ccccc000ccccc000000000000000000 114 + // 121:0c000000cccccccc00000000000000c0cccccccc00000000000c0000cccccccc 115 + // 122:0000000000c000000cc0000000c0000000000000000000000000000000000000 116 + // 123:000000000ccc00000ccc00000ccc000000000000000000000000000000000000 117 + // 124:000000000c0000000cc000000c00000000000000000000000000000000000000 118 + // 125:000c000000ccc0000ccccc00ccccccc000000000000000000000000000000000 119 + // 126:ccccccc00ccccc0000ccc000000c000000000000000000000000000000000000 120 + // 127:000c000000cc00000ccc0000cccc00000ccc000000cc0000000c000000000000 121 + // 128:c0000000cc000000ccc00000cccc0000ccc00000cc000000c000000000000000 122 + // 129:ccc0ccc0cc0c0cc0ccc0ccc0ccc0ccc0ccc0ccc0cc0c0cc0ccc0ccc000000000 123 + // 130:ccccccc0ccccccc0c0ccc0c00c000c00c0ccc0c0ccccccc0ccccccc000000000 124 + // 131:00ccc0000c000c00c00c0c0cc000ccc0c0000c000c00000000ccc00000000000 125 + // 132:0ccccc00ccccccc00c0c0c000c0c0c000c0c0c000c0c0c000ccccc0000000000 126 + // 133:0000c000000ccc0000ccccc00ccccc00c0ccc000c00c0000ccc0000000000000 127 + // 134:00ccc00000ccc0000ccccc0000c0c00000c0c00000c0c000000c000000000000 128 + // 135:c0c0c0c000000000c00000c000000000c00000c000000000c0c0c0c000000000 129 + // 136:0000c00000000c00000000c00cccccccc0ccccc0c00ccc00c000c00000000000 130 + // 137:000000000ccccc000c000c000c0c0c0000000c000c0ccc000000000000000000 131 + // 160:cccccccccceeeeeececccccccecececececcccccceceececceccccccceceecee 132 + // 161:cccccccceeeeeeeccccccccecececececcccccceececeececcccccceeeeceece 133 + // 162:cccccccccccccccccccccccccceeeeeececccccccecececececcccccceceecec 134 + // 163:cccccccccccccccccccccccceeeeeeeccccccccecececececcccccceececeece 135 + // 176:ceecccccceeeeeeeceeeeeeecceeeeeecccccccccccccccccccccccccccccccc 136 + // 177:cccccceeeeeeeeeeeeeeeeeeeeeeeeeccccccccccccccccccccccccccccccccc 137 + // 178:ceccccccceceeceeceeccccccceeeeeecccccccccccccccccccccccccccccccc 138 + // 179:ccccccceeeeceececccccceeeeeeeeeccccccccccccccccccccccccccccccccc 139 + // 192:cccccccccceeeeeececccccccecccccccecccccccecccccccecccccccecccccc 140 + // 193:cccccccceeeeeeccccccccecccccccecccccccecccccccecccccccecccccccec 141 + // 194:cccccccccceeeeeececccccccecccccccecccccccecccccececccceececcceee 142 + // 195:cccccccceeeeeeccccccccecccccccecccccccececcccceceecccceceeecccec 143 + // 196:cccccccccceeeeeececcccccceccccccceccccccceccceeececcceeececcccee 144 + // 197:cccccccceeeeeecccccccceccccccceccccccceceeeccceceeeccceceeccccec 145 + // 198:cccccccccceeeeeececccccccecccccccecccccccecccccececccceececcccee 146 + // 199:cccccccceeeeeecccccccceccccccceceecccceceecccceceecccceceeccccec 147 + // 200:cccccccccceeeeeececccccccecccccccecccceececccceececccceececcccee 148 + // 201:cccccccceeeeeeccccccccecccccccecccccccececcccceceecccceceeccccec 149 + // 202:cccccccccceeeeeececccccccecccccccecccccececccceececcceeececcccce 150 + // 203:cccccccceeeeeeccccccccecccccccececcccceceecccceceeecccececccccec 151 + // 204:ceecccccceeeeeeeceeeeeeecceeeeeecccccccccccccccccccccccccccccccc 152 + // 205:ccccceeceeeeeeeceeeeeeeceeeeeecccccccccccccccccccccccccccccccccc 153 + // 206:cccccccceeeeeeeecccccccccccccccccccccccccccccccccccccccccccccccc 154 + // 207:cccccccccccccccccccccccccccccccceeeeeeeeeeeeeeeeeeeeeeeecccccccc 155 + // 208:ceccccccceccccccceccccccceecccccceeeeeeeceeeeeeecceeeeeecccccccc 156 + // 209:ccccccecccccccecccccccecccccceeceeeeeeeceeeeeeeceeeeeecccccccccc 157 + // 210:ceccceeececcccccceccccccceecccccceeeeeeeceeeeeeecceeeeeecccccccc 158 + // 211:eeecccecccccccecccccccecccccceeceeeeeeeceeeeeeeceeeeeecccccccccc 159 + // 212:cecccccececcccccceccccccceecccccceeeeeeeceeeeeeecceeeeeecccccccc 160 + // 213:ecccccecccccccecccccccecccccceeceeeeeeeceeeeeeeceeeeeecccccccccc 161 + // 214:cecccccececcccccceccccccceecccccceeeeeeeceeeeeeecceeeeeecccccccc 162 + // 215:eecccceceeccccecccccccecccccceeceeeeeeeceeeeeeeceeeeeecccccccccc 163 + // 216:cecccceececccceececcccccceecccccceeeeeeeceeeeeeecceeeeeecccccccc 164 + // 217:ecccccecccccccecccccccecccccceeceeeeeeeceeeeeeeceeeeeecccccccccc 165 + // 218:cecccccececccccececcccccceecccccceeeeeeeceeeeeeecceeeeeecccccccc 166 + // 219:ecccccececccccecccccccecccccceeceeeeeeeceeeeeeeceeeeeecccccccccc 167 + // 220:cccccccccccccccccccccccccccccccceccccccceecccccceecccccccecccccc 168 + // 221:cecccccccecccccccecccccccecccccccecccccccecccccccecccccccecccccc 169 + // 222:ccccccecccccccecccccccecccccccecccccccecccccccecccccccecccccccec 170 + // 223:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 171 + // 224:cccccccccccccccccccccccccceeeeeececccccccecccccccecccccccecccccc 172 + // 225:cccccccccccccccccccccccceeeeeeccccccccecccccccecccccccecccccccec 173 + // 226:cccccccccccccccccccccccccceeeeeececcccccceccccccceccccccceccccce 174 + // 227:cccccccccccccccccccccccceeeeeeccccccccecccccccecccccccececccccec 175 + // 228:cccccccccccccccccccccccccceeeeeececcccccceccccccceccccccceccceee 176 + // 229:cccccccccccccccccccccccceeeeeecccccccceccccccceccccccceceeecccec 177 + // 230:cccccccccccccccccccccccccceeeeeececcccccceccccccceccccccceccccce 178 + // 231:cccccccccccccccccccccccceeeeeecccccccceccccccceceecccceceeccccec 179 + // 232:cccccccccccccccccccccccccceeeeeececccccccecccccccecccceececcccee 180 + // 233:cccccccccccccccccccccccceeeeeeccccccccecccccccecccccccececccccec 181 + // 234:cccccccccccccccccccccccccceeeeeececccccccecccccccecccccececcccee 182 + // 235:cccccccccccccccccccccccceeeeeeccccccccecccccccececcccceceeccccec 183 + // 236:ceccccccceccccccceeccccccceeeeeecccccccccccccccccccccccccccccccc 184 + // 237:ccccccecccccccecccccceeceeeeeecccccccccccccccccccccccccccccccccc 185 + // 238:cccccccccccccccccccccccceeeeeeeecccccccccccccccccccccccccccccccc 186 + // 239:cccccccccccccccccccccccccccccccccccccccccccccccceeeeeeeecccccccc 187 + // 240:ceccccccceccccccceccccccceccccccceccccccceeccccccceeeeeecccccccc 188 + // 241:ccccccecccccccecccccccecccccccecccccccecccccceeceeeeeecccccccccc 189 + // 242:cecccceececcceeececcceeececcccccceccccccceeccccccceeeeeecccccccc 190 + // 243:eecccceceeeccceceeecccecccccccecccccccecccccceeceeeeeecccccccccc 191 + // 244:ceccceeececccceececccccececcccccceccccccceeccccccceeeeeecccccccc 192 + // 245:eeeccceceeccccececccccecccccccecccccccecccccceeceeeeeecccccccccc 193 + // 246:cecccceececccceececccccececcccccceccccccceeccccccceeeeeecccccccc 194 + // 247:eecccceceecccceceecccceceeccccecccccccecccccceeceeeeeecccccccccc 195 + // 248:cecccceececccceececccceececccceececcccccceeccccccceeeeeecccccccc 196 + // 249:eecccceceeccccececccccecccccccecccccccecccccceeceeeeeecccccccccc 197 + // 250:ceccceeececccccececccccececccccececcccccceeccccccceeeeeecccccccc 198 + // 251:eeecccececccccececccccececccccecccccccecccccceeceeeeeecccccccccc 199 + // 252:cccccccccccccccccccccccccccccccccccccccccccccccceccccccccecccccc 200 + // </TILES> 201 + 202 + // <SPRITES> 203 + // 000:ff000000fcf00000fccf0000fcccf000fccccf00fcccf000fcfccf000f0fcf00 204 + // 001:000f000000fcf00000fcff000ffcccf0fcfccccf0fcccccf00fcccf0000fff00 205 + // 002:0fff0000fcccf0000fcf00000fcf00000fcf00000fcf0000fcccf0000fff0000 206 + // 033:00cc000000cc000000cc00000000000000cc0000000000000000000000000000 207 + // 034:0c0c00000c0c0000000000000000000000000000000000000000000000000000 208 + // 035:0c0c0000ccccc0000c0c0000ccccc0000c0c0000000000000000000000000000 209 + // 036:0cccc000c0c000000ccc000000c0c000cccc0000000000000000000000000000 210 + // 037:c000c000000c000000c000000c000000c000c000000000000000000000000000 211 + // 038:0c000000c0c000000cc0c000c00c00000cc0c000000000000000000000000000 212 + // 039:00c000000c000000000000000000000000000000000000000000000000000000 213 + // 040:000c000000c0000000c0000000c00000000c0000000000000000000000000000 214 + // 041:0c00000000c0000000c0000000c000000c000000000000000000000000000000 215 + // 042:00c00000c0c0c0000ccc0000c0c0c00000c00000000000000000000000000000 216 + // 043:0000000000c000000ccc000000c0000000000000000000000000000000000000 217 + // 044:0000000000000000000000000cc0000000c000000c0000000000000000000000 218 + // 045:00000000000000000ccc00000000000000000000000000000000000000000000 219 + // 046:0000000000000000000000000cc000000cc00000000000000000000000000000 220 + // 047:0000c000000c000000c000000c000000c0000000000000000000000000000000 221 + // 048:0ccc0000cc0cc000ccc0c000cc00c0000ccc0000000000000000000000000000 222 + // 049:00cc00000ccc000000cc000000cc00000cccc000000000000000000000000000 223 + // 050:cccc0000000cc0000ccc0000cc000000ccccc000000000000000000000000000 224 + // 051:ccccc000000cc00000cc0000c00cc0000ccc0000000000000000000000000000 225 + // 052:00cc00000ccc0000cc0c0000ccccc000000c0000000000000000000000000000 226 + // 053:ccccc000cc000000cccc0000000cc000cccc0000000000000000000000000000 227 + // 054:0ccc0000cc000000cccc0000cc00c0000ccc0000000000000000000000000000 228 + // 055:ccccc000000cc00000cc00000cc00000cc000000000000000000000000000000 229 + // 056:0ccc0000cc00c0000ccc0000cc00c0000ccc0000000000000000000000000000 230 + // 057:0ccc0000cc00c0000cccc0000000c0000ccc0000000000000000000000000000 231 + // 058:0cc000000cc00000000000000cc000000cc00000000000000000000000000000 232 + // 059:0cc000000cc00000000000000cc0000000c000000c0000000000000000000000 233 + // 060:000c000000c000000c00000000c00000000c0000000000000000000000000000 234 + // 061:000000000ccc0000000000000ccc000000000000000000000000000000000000 235 + // 062:0c00000000c00000000c000000c000000c000000000000000000000000000000 236 + // 063:0cccc000000cc00000cc00000000000000cc0000000000000000000000000000 237 + // 064:0ccc0000c0c0c000c0ccc000c00000000ccc0000000000000000000000000000 238 + // 065:0ccc0000cc00c000cc00c000ccccc000cc00c000000000000000000000000000 239 + // 066:cccc0000cc00c000cccc0000cc00c000cccc0000000000000000000000000000 240 + // 067:0ccc0000cc00c000cc000000cc00c0000ccc0000000000000000000000000000 241 + // 068:cccc0000cc00c000cc00c000cc00c000cccc0000000000000000000000000000 242 + // 069:ccccc000cc000000cccc0000cc000000ccccc000000000000000000000000000 243 + // 070:ccccc000cc000000cccc0000cc000000cc000000000000000000000000000000 244 + // 071:0cccc000cc000000cc0cc000cc00c0000cccc000000000000000000000000000 245 + // 072:cc00c000cc00c000ccccc000cc00c000cc00c000000000000000000000000000 246 + // 073:0cccc00000cc000000cc000000cc00000cccc000000000000000000000000000 247 + // 074:ccccc000000cc000000cc000cc0cc0000ccc0000000000000000000000000000 248 + // 075:cc00c000cc0c0000ccc00000cc0c0000cc00c000000000000000000000000000 249 + // 076:cc000000cc000000cc000000cc000000ccccc000000000000000000000000000 250 + // 077:cc0cc000ccccc000ccccc000c0c0c000c000c000000000000000000000000000 251 + // 078:cc00c000ccc0c000ccccc000cc0cc000cc00c000000000000000000000000000 252 + // 079:0ccc0000cc00c000cc00c000cc00c0000ccc0000000000000000000000000000 253 + // 080:cccc0000cc00c000cc00c000cccc0000cc000000000000000000000000000000 254 + // 081:0ccc0000cc00c000cc00c000cc00c0000ccc00000000c0000000000000000000 255 + // 082:cccc0000cc00c000cc00c000cccc0000cc00c000000000000000000000000000 256 + // 083:0cccc000ccc000000ccc000000ccc000cccc0000000000000000000000000000 257 + // 084:0cccc00000cc000000cc000000cc000000cc0000000000000000000000000000 258 + // 085:cc00c000cc00c000cc00c000cc00c0000ccc0000000000000000000000000000 259 + // 086:cc00c000cc00c000cc00c0000ccc000000c00000000000000000000000000000 260 + // 087:c000c000c0c0c000ccccc000ccccc000cc0cc000000000000000000000000000 261 + // 088:cc00c000cc00c0000ccc0000cc00c000cc00c000000000000000000000000000 262 + // 089:0cc0c0000cc0c0000cccc00000cc000000cc0000000000000000000000000000 263 + // 090:ccccc00000cc00000cc00000cc000000ccccc000000000000000000000000000 264 + // 091:00cc000000c0000000c0000000c0000000cc0000000000000000000000000000 265 + // 092:c00000000c00000000c00000000c00000000c000000000000000000000000000 266 + // 093:0cc0000000c0000000c0000000c000000cc00000000000000000000000000000 267 + // 094:00c000000c0c0000c000c0000000000000000000000000000000000000000000 268 + // 095:000000000000000000000000000000000cccc000000000000000000000000000 269 + // 096:0c00000000c00000000000000000000000000000000000000000000000000000 270 + // 097:000000000cccc000c00cc000c00cc0000cccc000000000000000000000000000 271 + // 098:cc000000cccc0000cc00c000cc00c000cccc0000000000000000000000000000 272 + // 099:000000000cccc000ccc00000ccc000000cccc000000000000000000000000000 273 + // 100:000cc0000cccc000c00cc000c00cc0000cccc000000000000000000000000000 274 + // 101:000000000ccc0000cc0cc000ccc000000ccc0000000000000000000000000000 275 + // 102:00ccc0000cc00000ccccc0000cc000000cc00000000000000000000000000000 276 + // 103:000000000ccc0000c00cc000ccccc000000cc0000ccc00000000000000000000 277 + // 104:cc000000cccc0000cc00c000cc00c000cc00c000000000000000000000000000 278 + // 105:00cc00000000000000cc000000cc000000cc0000000000000000000000000000 279 + // 106:000cc00000000000000cc000000cc000c00cc0000ccc00000000000000000000 280 + // 107:cc000000cc00c000cccc0000cc00c000cc00c000000000000000000000000000 281 + // 108:0cc000000cc000000cc000000cc0000000ccc000000000000000000000000000 282 + // 109:00000000cc0c0000ccccc000c0c0c000c0c0c000000000000000000000000000 283 + // 110:00000000cccc0000cc00c000cc00c000cc00c000000000000000000000000000 284 + // 111:000000000ccc0000cc00c000cc00c0000ccc0000000000000000000000000000 285 + // 112:00000000cccc0000cc00c000cc00c000cccc0000cc0000000000000000000000 286 + // 113:000000000cccc000c00cc000c00cc0000cccc000000cc0000000000000000000 287 + // 114:00000000cccc0000cc00c000cc000000cc000000000000000000000000000000 288 + // 115:000000000cccc000ccc0000000ccc000cccc0000000000000000000000000000 289 + // 116:0cc00000ccccc0000cc000000cc0000000ccc000000000000000000000000000 290 + // 117:00000000cc00c000cc00c000cc00c0000ccc0000000000000000000000000000 291 + // 118:00000000cc00c000cc00c0000ccc000000c00000000000000000000000000000 292 + // 119:00000000c000c000c0c0c000ccccc000cc0cc000000000000000000000000000 293 + // 120:00000000cc0cc0000ccc00000ccc0000cc0cc000000000000000000000000000 294 + // 121:00000000c00cc000c00cc0000cccc000000cc0000ccc00000000000000000000 295 + // 122:00000000ccccc00000cc00000cc00000ccccc000000000000000000000000000 296 + // 123:00cc000000c000000cc0000000c0000000cc0000000000000000000000000000 297 + // 124:00c0000000c0000000c0000000c0000000c00000000000000000000000000000 298 + // 125:0cc0000000c0000000cc000000c000000cc00000000000000000000000000000 299 + // 126:0000000000c0c0000c0c00000000000000000000000000000000000000000000 300 + // 161:0c0000000c0000000c000000000000000c000000000000000000000000000000 301 + // 162:c0c00000c0c00000000000000000000000000000000000000000000000000000 302 + // 163:c0c00000ccc00000c0c00000ccc00000c0c00000000000000000000000000000 303 + // 164:0cc00000cc0000000cc00000cc0000000c000000000000000000000000000000 304 + // 165:c000000000c000000c000000c000000000c00000000000000000000000000000 305 + // 166:0cc000000cc00000cc000000c0c000000cc00000000000000000000000000000 306 + // 167:0c0000000c000000000000000000000000000000000000000000000000000000 307 + // 168:00c000000c0000000c0000000c00000000c00000000000000000000000000000 308 + // 169:c00000000c0000000c0000000c000000c0000000000000000000000000000000 309 + // 170:00000000c0c000000c000000c0c0000000000000000000000000000000000000 310 + // 171:000000000c000000ccc000000c00000000000000000000000000000000000000 311 + // 172:000000000000000000000000000000000c000000c00000000000000000000000 312 + // 173:0000000000000000ccc000000000000000000000000000000000000000000000 313 + // 174:000000000000000000000000000000000c000000000000000000000000000000 314 + // 175:0000000000c000000c000000c000000000000000000000000000000000000000 315 + // 176:0cc00000c0c00000c0c00000c0c00000cc000000000000000000000000000000 316 + // 177:0c000000cc0000000c0000000c000000ccc00000000000000000000000000000 317 + // 178:cc00000000c000000c000000c0000000ccc00000000000000000000000000000 318 + // 179:cc00000000c000000c00000000c00000cc000000000000000000000000000000 319 + // 180:c0c00000c0c00000ccc0000000c0000000c00000000000000000000000000000 320 + // 181:ccc00000c0000000cc00000000c00000cc000000000000000000000000000000 321 + // 182:0cc00000c0000000ccc00000c0c00000ccc00000000000000000000000000000 322 + // 183:ccc0000000c000000c000000c0000000c0000000000000000000000000000000 323 + // 184:ccc00000c0c00000ccc00000c0c00000ccc00000000000000000000000000000 324 + // 185:ccc00000c0c00000ccc0000000c0000000c00000000000000000000000000000 325 + // 186:000000000c000000000000000c00000000000000000000000000000000000000 326 + // 187:000000000c000000000000000c000000c0000000000000000000000000000000 327 + // 188:00c000000c000000c00000000c00000000c00000000000000000000000000000 328 + // 189:00000000ccc0000000000000ccc0000000000000000000000000000000000000 329 + // 190:c00000000c00000000c000000c000000c0000000000000000000000000000000 330 + // 191:ccc0000000c000000c000000000000000c000000000000000000000000000000 331 + // 192:0cc00000c0c00000ccc00000c00000000cc00000000000000000000000000000 332 + // 193:0c000000c0c00000ccc00000c0c00000c0c00000000000000000000000000000 333 + // 194:cc000000c0c00000cc000000c0c00000cc000000000000000000000000000000 334 + // 195:0cc00000c0000000c0000000c00000000cc00000000000000000000000000000 335 + // 196:cc000000c0c00000c0c00000c0c00000cc000000000000000000000000000000 336 + // 197:ccc00000c0000000cc000000c0000000ccc00000000000000000000000000000 337 + // 198:ccc00000c0000000cc000000c0000000c0000000000000000000000000000000 338 + // 199:0cc00000c0000000c0c00000c0c000000cc00000000000000000000000000000 339 + // 200:c0c00000c0c00000ccc00000c0c00000c0c00000000000000000000000000000 340 + // 201:ccc000000c0000000c0000000c000000ccc00000000000000000000000000000 341 + // 202:ccc0000000c0000000c00000c0c000000c000000000000000000000000000000 342 + // 203:c0c00000c0c00000cc000000c0c00000c0c00000000000000000000000000000 343 + // 204:c0000000c0000000c0000000c0000000ccc00000000000000000000000000000 344 + // 205:ccc00000ccc00000c0c00000c0c00000c0c00000000000000000000000000000 345 + // 206:cc000000c0c00000c0c00000c0c00000c0c00000000000000000000000000000 346 + // 207:0c000000c0c00000c0c00000c0c000000c000000000000000000000000000000 347 + // 208:cc000000c0c00000cc000000c0000000c0000000000000000000000000000000 348 + // 209:0c000000c0c00000c0c00000ccc000000cc00000000000000000000000000000 349 + // 210:cc000000c0c00000ccc00000cc000000c0c00000000000000000000000000000 350 + // 211:0cc00000c00000000c00000000c00000cc000000000000000000000000000000 351 + // 212:ccc000000c0000000c0000000c0000000c000000000000000000000000000000 352 + // 213:c0c00000c0c00000c0c00000c0c000000cc00000000000000000000000000000 353 + // 214:c0c00000c0c00000c0c00000c0c000000c000000000000000000000000000000 354 + // 215:c0c00000c0c00000c0c00000ccc00000ccc00000000000000000000000000000 355 + // 216:c0c00000c0c000000c000000c0c00000c0c00000000000000000000000000000 356 + // 217:c0c00000c0c000000c0000000c0000000c000000000000000000000000000000 357 + // 218:ccc0000000c000000c000000c0000000ccc00000000000000000000000000000 358 + // 219:0cc000000c0000000c0000000c0000000cc00000000000000000000000000000 359 + // 220:00000000c00000000c00000000c0000000000000000000000000000000000000 360 + // 221:cc0000000c0000000c0000000c000000cc000000000000000000000000000000 361 + // 222:0c000000c0c00000000000000000000000000000000000000000000000000000 362 + // 223:00000000000000000000000000000000ccc00000000000000000000000000000 363 + // 224:0c00000000c00000000000000000000000000000000000000000000000000000 364 + // 225:00000000cc0000000cc00000c0c00000ccc00000000000000000000000000000 365 + // 226:c0000000cc000000c0c00000c0c00000cc000000000000000000000000000000 366 + // 227:000000000cc00000c0000000c00000000cc00000000000000000000000000000 367 + // 228:00c000000cc00000c0c00000c0c000000cc00000000000000000000000000000 368 + // 229:000000000cc00000c0c00000cc0000000cc00000000000000000000000000000 369 + // 230:00c000000c000000ccc000000c0000000c000000000000000000000000000000 370 + // 231:000000000cc00000c0c00000ccc0000000c000000c0000000000000000000000 371 + // 232:c0000000cc000000c0c00000c0c00000c0c00000000000000000000000000000 372 + // 233:0c000000000000000c0000000c0000000c000000000000000000000000000000 373 + // 234:00c000000000000000c0000000c00000c0c000000c0000000000000000000000 374 + // 235:c0000000c0c00000cc000000cc000000c0c00000000000000000000000000000 375 + // 236:cc0000000c0000000c0000000c000000ccc00000000000000000000000000000 376 + // 237:00000000ccc00000ccc00000c0c00000c0c00000000000000000000000000000 377 + // 238:00000000cc000000c0c00000c0c00000c0c00000000000000000000000000000 378 + // 239:000000000c000000c0c00000c0c000000c000000000000000000000000000000 379 + // 240:00000000cc000000c0c00000c0c00000cc000000c00000000000000000000000 380 + // 241:000000000cc00000c0c00000c0c000000cc0000000c000000000000000000000 381 + // 242:00000000c0c00000cc000000c0000000c0000000000000000000000000000000 382 + // 243:000000000cc00000cc00000000c00000cc000000000000000000000000000000 383 + // 244:0c000000ccc000000c0000000c00000000c00000000000000000000000000000 384 + // 245:00000000c0c00000c0c00000c0c000000cc00000000000000000000000000000 385 + // 246:00000000c0c00000c0c00000c0c000000c000000000000000000000000000000 386 + // 247:00000000c0c00000c0c00000ccc00000ccc00000000000000000000000000000 387 + // 248:00000000c0c000000c000000c0c00000c0c00000000000000000000000000000 388 + // 249:00000000c0c00000c0c000000cc0000000c000000c0000000000000000000000 389 + // 250:00000000ccc000000cc00000c0000000ccc00000000000000000000000000000 390 + // 251:0cc000000c000000cc0000000c0000000cc00000000000000000000000000000 391 + // 252:0c0000000c000000000000000c0000000c000000000000000000000000000000 392 + // 253:cc0000000c0000000cc000000c000000cc000000000000000000000000000000 393 + // 254:000000000cc00000cc0000000000000000000000000000000000000000000000 394 + // </SPRITES> 395 + 396 + // <MAP> 397 + // 000:0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 398 + // 001:ccdcccdcccdcccdcccdcccdcccdcccdcccdcccdcccdccedecedecedecedecedecedecedecedecedecedecede00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 399 + // 002:0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 400 + // 003:0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1dccdcccdc0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1fcedecede00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 401 + // 004:0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 402 + // 005:0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 403 + // 006:0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 404 + // 007:0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 405 + // 008:fd0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0cec1cfd0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0eee1e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 406 + // 009:fd0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0dcdedfd0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f0fcfed00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 407 + // 010:acbc0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1cddedaebe0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1edded00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 408 + // 011:adbd0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1dafbf0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 409 + // 012:0cec1c0c1c0cececececec1c0c1c0c1cfdfdfdfdfdfd0eee1e0e1e0eeeeeeeeeee1e0e1e0e1efdfdfdfdfdfd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 410 + // 013:0dfc1d0d1d0dfcfcfcfcfc1d0d1d0d1dfdfd2c3cfdfd0ffe1f0f1f0ffefefefefe1f0f1f0f1ffdfd2e3efdfd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 411 + // 014:fdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfd2d3dfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfd2f3ffdfd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 412 + // 015:fd0a1afdfdfdfdfdfdfdfdfdfdfdfdfd6c7c4c5c8c9cfd2a3afdfdfdfdfdfdfdfdfdfdfdfdfd6e7e4e5e8e9e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 413 + // 016:fd0b1bfdfdfdfdfdfdfdfdfdfdfdfdfd6d7d4d5d8d9dfd2b3bfdfdfdfdfdfdfdfdfdfdfdfdfd6f7f4f5f8f9f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 414 + // </MAP> 415 + 416 + // <WAVES> 417 + // 000:00000000ffffffff00000000ffffffff 418 + // 001:0123456789abcdeffedcba9876543210 419 + // 002:0123456789abcdef0123456789abcdef 420 + // </WAVES> 421 + 422 + // <SFX> 423 + // 000:500050005000f090f090f090b090b090b090f090f090f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000200000000000 424 + // 001:30003000304030403070307030c030c090009000900090009000900090009000c000c000c000c000c000c000c000c000f000f000f000f000f000f000302000000800 425 + // 002:e000e010e010f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000400000000000 426 + // </SFX> 427 + 428 + // <PALETTE> 429 + // 000:1a1c2c5d275db13e53ef7d57ffcd75a7f07038b76425717929366f3b5dc941a6f673eff7f4f4f494b0c2566c86333c57 430 + // </PALETTE> 431 +
-445
config.lua
··· 1 - THEME= 2 - { 3 - CODE = 4 - { 5 - BG =15, 6 - FG =12, 7 - STRING =4, 8 - NUMBER =11, 9 - KEYWORD=3, 10 - API =5, 11 - COMMENT=14, 12 - SIGN =13, 13 - SELECT =14, 14 - CURSOR =2, 15 - SHADOW =true, 16 - ALT_FONT=false, 17 - ALT_CARET=false, 18 - MATCH_DELIMITERS=true, 19 - AUTO_DELIMITERS=false, 20 - }, 21 - 22 - GAMEPAD= 23 - { 24 - TOUCH= 25 - { 26 - ALPHA=180, 27 - }, 28 - }, 29 - } 30 - 31 - CHECK_NEW_VERSION=true 32 - SOFTWARE_RENDERING=false 33 - UI_SCALE=4 34 - TRIM_ON_SAVE=false 35 - 36 - --------------------------- 37 - function TIC() 38 - cls() 39 - local label="This is system configuration cartridge" 40 - local size=print(label,0,-6) 41 - print(label,(240-size)//2,(136-6)//2) 42 - end 43 - 44 - -- <TILES> 45 - -- 000:eccccccccc888888caaaaaaaca888888cacccccccacc0ccccacc0ccccacc0ccc 46 - -- 001:ccccceee8888cceeaaaa0cee888a0ceeccca0ccc0cca0c0c0cca0c0c0cca0c0c 47 - -- 002:eccccccccc111111c2222222c2111111c2ccccccc2cc0cccc2cc0cccc2cc0ccc 48 - -- 003:ccccceee1111ccee22220cee11120ceeccc20cee0cc20cee0cc20cce0cc200cc 49 - -- 004:eccccccccc222222c3333333c3222222c3ccccccc3c0ccccc3cc0cccc3cc0ccc 50 - -- 005:ccccceee2222ccee33330cee22230ceeccc30ceec0c30cee0cc30cce0cc300cc 51 - -- 006:eccccccccc777777c6666666c6777777c6ccccccc6ccccccc6c000c0c6cccccc 52 - -- 007:ccccceee7777ccee66660cee77760ceeccc60cccccc60c0c00c60c0cccc60c0c 53 - -- 008:0dddddd0dddddddddddeedddddeeeedddeeeeeedddddddddedddddde0eeeeee0 54 - -- 009:0dddddd0dddddddddeeeeeedddeeeedddddeedddddddddddedddddde0eeeeee0 55 - -- 010:0dddddd0ddddeddddddeedddddeeeddddddeedddddddedddedddddde0eeeeee0 56 - -- 011:0dddddd0dddedddddddeeddddddeeedddddeeddddddeddddedddddde0eeeeee0 57 - -- 012:0666666066677666667667666676676666777766667667667666666707777770 58 - -- 013:0222222022111222221221222211122222122122221112221222222101111110 59 - -- 014:0aaaaaa0aa9aa9aaaa9aa9aaaaa99aaaaa9aa9aaaa9aa9aa9aaaaaa909999990 60 - -- 015:0333333033233233332332333332223333333233333223332333333202222220 61 - -- 016:cacccccccaaaaaaacaaacaaacaaaaccccaaaaaaac8888888cc000cccecccccec 62 - -- 017:ccca00ccaaaa0ccecaaa0ceeaaaa0ceeaaaa0cee8888ccee000cceeecccceeee 63 - -- 018:c2ccccccc2222222c2222cccc222c222c2222222c1111111cc000cccecccccec 64 - -- 019:ccc20c0c22220c0c22220c0cc2220ccc22220cee1111ccee000cceeecccceeee 65 - -- 020:c3ccccccc3333333c33c3c3cc333c3c3c3333333c2222222cc000cccecccccec 66 - -- 021:ccc30c0c33330c0c3c330c0cc3330ccc33330cee2222ccee000cceeecccceeee 67 - -- 022:c6ccccccc6666666c666ccccc6666cccc6666666c7777777cc000cccecccccec 68 - -- 023:ccc600cc66660ccec6660cee66660cee66660cee7777ccee000cceeecccceeee 69 - -- 024:000000000dddddd0dddddddddddeedddddeeeedddeeeeeeddddddddd0dddddd0 70 - -- 025:000000000dddddd0dddddddddeeeeeedddeeeedddddeeddddddddddd0dddddd0 71 - -- 026:000000000dddddd0ddddeddddddeedddddeeeddddddeedddddddeddd0dddddd0 72 - -- 027:000000000dddddd0dddedddddddeeddddddeeedddddeeddddddedddd0dddddd0 73 - -- 028:0000000006666660666776666676676666766766667777666676676606666660 74 - -- 029:0000000002222220221112222212212222111222221221222211122202222220 75 - -- 030:000000000aaaaaa0aa9aa9aaaa9aa9aaaaa99aaaaa9aa9aaaa9aa9aa0aaaaaa0 76 - -- 031:0000000003333330332332333323323333322233333332333332233303333330 77 - -- 032:eccccccccc111111c2222222c2111111c2ccccccc2c2c2c2c2c222c2c2cc2ccc 78 - -- 033:ccccceee1111ccee22220cee11120ceeccc20cccc2c20c0c22c20c0c2cc20c0c 79 - -- 036:0000000076555670000000000000000000000000000000000000000000000000 80 - -- 039:ccc33333ccc33333ccc33333ccc33333ccc33333ccccc033ccccc033ddddd033 81 - -- 040:33333333ccc33333ccc33333ccc33333ccc33333cccdd033ccccc033ccccc033 82 - -- 041:3330000033300000333fffff33300000333dd0dd333333333333333333333333 83 - -- 042:33300000333000003330000033300000333fffff333333333333333333333333 84 - -- 048:c2ccccccc2222222c222ccccc2222cccc2222222c1111111cc000cccecccccec 85 - -- 049:ccc200cc22220ccec2220cee22220cee22220cee1111ccee000cceeecccceeee 86 - -- 052:000000000fffff00000000000000000000000000000000000000000000000000 87 - -- 080:0000000000c0c00000c0c000000c00000cc0cc000cc0cc000000000000000000 88 - -- 081:000000000cccc0000c00c0000c0ccc000ccc0c00000ccc000000000000000000 89 - -- 082:0000000000ccc0000c000c000ccccc000cc0cc000ccccc000000000000000000 90 - -- 083:00000000000cc00000cc00000ccccc0000cc0000000cc0000000000000000000 91 - -- 084:0000000000cc0000000cc0000ccccc00000cc00000cc00000000000000000000 92 - -- 085:000000000ccccc000c000c000c000c000ccccc000cccc0000000000000000000 93 - -- 086:0000000000ccc00000c0c0000ccccc00000c0000000c00000000000000000000 94 - -- 087:ccccccc0ccccccc0ccccccc0ccccccc0ccccccc0ccccccc0ccccccc000000000 95 - -- 088:000000000cc0cc000c000c000c000c000c000c000cc0cc000000000000000000 96 - -- 089:0000000000ccc0000c0c0c000ccccc000ccccc000c0c0c000000000000000000 97 - -- 090:000000000cc0cc000cc0cc00000000000cc0cc000cc0cc000000000000000000 98 - -- 091:00000000000cc00000cc0c000ccc0c0000cc0c00000cc0000000000000000000 99 - -- 092:0000000000cccc0000c00c0000c00c000cc0cc000cc0cc000000000000000000 100 - -- 093:0000000000ccc00c0ccccc0c0ccccc0c0ccccc0c00ccc00c0000000000000000 101 - -- 094:00000000c00cc00c0c0c00c0c00cc0c00c0c00c00c0cc00c0000000000000000 102 - -- 095:000000000ccccc000ccccc000ccccc000cc0cc000c000c000000000000000000 103 - -- 096:000000000cccc0000c00cc000c00cc000ccccc0000cccc000000000000000000 104 - -- 097:000000000000000000000c0000000c0000000c0000cccc000000000000000000 105 - -- 098:00000000000c0000000cc000000ccc00000cc000000c00000000000000000000 106 - -- 099:00000000000cc000000ccc000c0ccc0000cccc00000cc0000000000000000000 107 - -- 100:0000000000ccc0000c000c000c000c0000ccc000000c00000000000000000000 108 - -- 101:00000000000c0000000cc0000ccccc00000cc000000c00000000000000000000 109 - -- 102:000000000ccccc00000000000ccccc00000000000ccccc000000000000000000 110 - -- 103:00000000000ccc0000c000c00c00c00c00c000c0000ccc000000000000000000 111 - -- 104:000000000ccccc000c0c0c000ccccc000c0c0c000ccccc000000000000000000 112 - -- 105:00000000000000000ccccc0000ccc000000c0000000000000000000000000000 113 - -- 106:0000000000000000000c000000ccc0000ccccc00000000000000000000000000 114 - -- 107:000000000000c00000000c0000ccccc00c0ccc000c00c0000000000000000000 115 - -- 108:000000000c0c0c00000000000c000c00000000000c0c0c000000000000000000 116 - -- 109:000000000000c000000c0c0000c0c0000c0c00000cc000000000000000000000 117 - -- 110:000000000c0c0c00000000000c0c0c00000000000c0c0c000000000000000000 118 - -- 111:0000000000ccc0000c0c0c000ccccc000c000c0000ccc0000000000000000000 119 - -- 112:000000000000c000000cc00000ccc000000cc0000000c0000000000000000000 120 - -- 113:0000000000c0000000cc000000ccc00000cc000000c000000000000000000000 121 - -- 114:000000000ccccc00000000000c0ccc000c0ccc000c0ccc000000000000000000 122 - -- 115:000000000ccccc00000000000c0c0c000c0c0c000c0c0c000000000000000000 123 - -- 116:00000000000c00000000c0000c0ccc000000c000000c00000000000000000000 124 - -- 117:000000000cccc00000000c000c000c000c00000000cccc000000000000000000 125 - -- 118:0000000000c00000000c00000000c000000c000000c000000000000000000000 126 - -- 119:000000000c0c00000c0cc0000c0ccc000c0cc0000c0c00000000000000000000 127 - -- 120:000000000ccccc000ccccc000ccccc000ccccc000ccccc000000000000000000 128 - -- 121:0c000000cccccccc00000000000000c0cccccccc00000000000c0000cccccccc 129 - -- 122:0000000000c000000cc0000000c0000000000000000000000000000000000000 130 - -- 123:000000000ccc00000ccc00000ccc000000000000000000000000000000000000 131 - -- 124:000000000c0000000cc000000c00000000000000000000000000000000000000 132 - -- 125:000c000000ccc0000ccccc00ccccccc000000000000000000000000000000000 133 - -- 126:ccccccc00ccccc0000ccc000000c000000000000000000000000000000000000 134 - -- 127:000c000000cc00000ccc0000cccc00000ccc000000cc0000000c000000000000 135 - -- 128:c0000000cc000000ccc00000cccc0000ccc00000cc000000c000000000000000 136 - -- 129:ccc0ccc0cc0c0cc0ccc0ccc0ccc0ccc0ccc0ccc0cc0c0cc0ccc0ccc000000000 137 - -- 130:ccccccc0ccccccc0c0ccc0c00c000c00c0ccc0c0ccccccc0ccccccc000000000 138 - -- 131:00ccc0000c000c00c00c0c0cc000ccc0c0000c000c00000000ccc00000000000 139 - -- 132:0ccccc00ccccccc00c0c0c000c0c0c000c0c0c000c0c0c000ccccc0000000000 140 - -- 133:0000c000000ccc0000ccccc00ccccc00c0ccc000c00c0000ccc0000000000000 141 - -- 134:00ccc00000ccc0000ccccc0000c0c00000c0c00000c0c000000c000000000000 142 - -- 135:c0c0c0c000000000c00000c000000000c00000c000000000c0c0c0c000000000 143 - -- 136:0000c00000000c00000000c00cccccccc0ccccc0c00ccc00c000c00000000000 144 - -- 137:000000000ccccc000c000c000c0c0c0000000c000c0ccc000000000000000000 145 - -- 160:cccccccccceeeeeececccccccecececececcccccceceececceccccccceceecee 146 - -- 161:cccccccceeeeeeeccccccccecececececcccccceececeececcccccceeeeceece 147 - -- 162:cccccccccccccccccccccccccceeeeeececccccccecececececcccccceceecec 148 - -- 163:cccccccccccccccccccccccceeeeeeeccccccccecececececcccccceececeece 149 - -- 176:ceecccccceeeeeeeceeeeeeecceeeeeecccccccccccccccccccccccccccccccc 150 - -- 177:cccccceeeeeeeeeeeeeeeeeeeeeeeeeccccccccccccccccccccccccccccccccc 151 - -- 178:ceccccccceceeceeceeccccccceeeeeecccccccccccccccccccccccccccccccc 152 - -- 179:ccccccceeeeceececccccceeeeeeeeeccccccccccccccccccccccccccccccccc 153 - -- 192:cccccccccceeeeeececccccccecccccccecccccccecccccccecccccccecccccc 154 - -- 193:cccccccceeeeeeccccccccecccccccecccccccecccccccecccccccecccccccec 155 - -- 194:cccccccccceeeeeececccccccecccccccecccccccecccccececccceececcceee 156 - -- 195:cccccccceeeeeeccccccccecccccccecccccccececcccceceecccceceeecccec 157 - -- 196:cccccccccceeeeeececcccccceccccccceccccccceccceeececcceeececcccee 158 - -- 197:cccccccceeeeeecccccccceccccccceccccccceceeeccceceeeccceceeccccec 159 - -- 198:cccccccccceeeeeececccccccecccccccecccccccecccccececccceececcccee 160 - -- 199:cccccccceeeeeecccccccceccccccceceecccceceecccceceecccceceeccccec 161 - -- 200:cccccccccceeeeeececccccccecccccccecccceececccceececccceececcccee 162 - -- 201:cccccccceeeeeeccccccccecccccccecccccccececcccceceecccceceeccccec 163 - -- 202:cccccccccceeeeeececccccccecccccccecccccececccceececcceeececcccce 164 - -- 203:cccccccceeeeeeccccccccecccccccececcccceceecccceceeecccececccccec 165 - -- 204:ceecccccceeeeeeeceeeeeeecceeeeeecccccccccccccccccccccccccccccccc 166 - -- 205:ccccceeceeeeeeeceeeeeeeceeeeeecccccccccccccccccccccccccccccccccc 167 - -- 206:cccccccceeeeeeeecccccccccccccccccccccccccccccccccccccccccccccccc 168 - -- 207:cccccccccccccccccccccccccccccccceeeeeeeeeeeeeeeeeeeeeeeecccccccc 169 - -- 208:ceccccccceccccccceccccccceecccccceeeeeeeceeeeeeecceeeeeecccccccc 170 - -- 209:ccccccecccccccecccccccecccccceeceeeeeeeceeeeeeeceeeeeecccccccccc 171 - -- 210:ceccceeececcccccceccccccceecccccceeeeeeeceeeeeeecceeeeeecccccccc 172 - -- 211:eeecccecccccccecccccccecccccceeceeeeeeeceeeeeeeceeeeeecccccccccc 173 - -- 212:cecccccececcccccceccccccceecccccceeeeeeeceeeeeeecceeeeeecccccccc 174 - -- 213:ecccccecccccccecccccccecccccceeceeeeeeeceeeeeeeceeeeeecccccccccc 175 - -- 214:cecccccececcccccceccccccceecccccceeeeeeeceeeeeeecceeeeeecccccccc 176 - -- 215:eecccceceeccccecccccccecccccceeceeeeeeeceeeeeeeceeeeeecccccccccc 177 - -- 216:cecccceececccceececcccccceecccccceeeeeeeceeeeeeecceeeeeecccccccc 178 - -- 217:ecccccecccccccecccccccecccccceeceeeeeeeceeeeeeeceeeeeecccccccccc 179 - -- 218:cecccccececccccececcccccceecccccceeeeeeeceeeeeeecceeeeeecccccccc 180 - -- 219:ecccccececccccecccccccecccccceeceeeeeeeceeeeeeeceeeeeecccccccccc 181 - -- 220:cccccccccccccccccccccccccccccccceccccccceecccccceecccccccecccccc 182 - -- 221:cecccccccecccccccecccccccecccccccecccccccecccccccecccccccecccccc 183 - -- 222:ccccccecccccccecccccccecccccccecccccccecccccccecccccccecccccccec 184 - -- 223:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 185 - -- 224:cccccccccccccccccccccccccceeeeeececccccccecccccccecccccccecccccc 186 - -- 225:cccccccccccccccccccccccceeeeeeccccccccecccccccecccccccecccccccec 187 - -- 226:cccccccccccccccccccccccccceeeeeececcccccceccccccceccccccceccccce 188 - -- 227:cccccccccccccccccccccccceeeeeeccccccccecccccccecccccccececccccec 189 - -- 228:cccccccccccccccccccccccccceeeeeececcccccceccccccceccccccceccceee 190 - -- 229:cccccccccccccccccccccccceeeeeecccccccceccccccceccccccceceeecccec 191 - -- 230:cccccccccccccccccccccccccceeeeeececcccccceccccccceccccccceccccce 192 - -- 231:cccccccccccccccccccccccceeeeeecccccccceccccccceceecccceceeccccec 193 - -- 232:cccccccccccccccccccccccccceeeeeececccccccecccccccecccceececcccee 194 - -- 233:cccccccccccccccccccccccceeeeeeccccccccecccccccecccccccececccccec 195 - -- 234:cccccccccccccccccccccccccceeeeeececccccccecccccccecccccececcccee 196 - -- 235:cccccccccccccccccccccccceeeeeeccccccccecccccccececcccceceeccccec 197 - -- 236:ceccccccceccccccceeccccccceeeeeecccccccccccccccccccccccccccccccc 198 - -- 237:ccccccecccccccecccccceeceeeeeecccccccccccccccccccccccccccccccccc 199 - -- 238:cccccccccccccccccccccccceeeeeeeecccccccccccccccccccccccccccccccc 200 - -- 239:cccccccccccccccccccccccccccccccccccccccccccccccceeeeeeeecccccccc 201 - -- 240:ceccccccceccccccceccccccceccccccceccccccceeccccccceeeeeecccccccc 202 - -- 241:ccccccecccccccecccccccecccccccecccccccecccccceeceeeeeecccccccccc 203 - -- 242:cecccceececcceeececcceeececcccccceccccccceeccccccceeeeeecccccccc 204 - -- 243:eecccceceeeccceceeecccecccccccecccccccecccccceeceeeeeecccccccccc 205 - -- 244:ceccceeececccceececccccececcccccceccccccceeccccccceeeeeecccccccc 206 - -- 245:eeeccceceeccccececccccecccccccecccccccecccccceeceeeeeecccccccccc 207 - -- 246:cecccceececccceececccccececcccccceccccccceeccccccceeeeeecccccccc 208 - -- 247:eecccceceecccceceecccceceeccccecccccccecccccceeceeeeeecccccccccc 209 - -- 248:cecccceececccceececccceececccceececcccccceeccccccceeeeeecccccccc 210 - -- 249:eecccceceeccccececccccecccccccecccccccecccccceeceeeeeecccccccccc 211 - -- 250:ceccceeececccccececccccececccccececcccccceeccccccceeeeeecccccccc 212 - -- 251:eeecccececccccececccccececccccecccccccecccccceeceeeeeecccccccccc 213 - -- 252:cccccccccccccccccccccccccccccccccccccccccccccccceccccccccecccccc 214 - -- </TILES> 215 - 216 - -- <SPRITES> 217 - -- 000:ff000000fcf00000fccf0000fcccf000fccccf00fcccf000fcfccf000f0fcf00 218 - -- 001:000f000000fcf00000fcff000ffcccf0fcfccccf0fcccccf00fcccf0000fff00 219 - -- 002:0fff0000fcccf0000fcf00000fcf00000fcf00000fcf0000fcccf0000fff0000 220 - -- 033:00cc000000cc000000cc00000000000000cc0000000000000000000000000000 221 - -- 034:0c0c00000c0c0000000000000000000000000000000000000000000000000000 222 - -- 035:0c0c0000ccccc0000c0c0000ccccc0000c0c0000000000000000000000000000 223 - -- 036:0cccc000c0c000000ccc000000c0c000cccc0000000000000000000000000000 224 - -- 037:c000c000000c000000c000000c000000c000c000000000000000000000000000 225 - -- 038:0c000000c0c000000cc0c000c00c00000cc0c000000000000000000000000000 226 - -- 039:00c000000c000000000000000000000000000000000000000000000000000000 227 - -- 040:000c000000c0000000c0000000c00000000c0000000000000000000000000000 228 - -- 041:0c00000000c0000000c0000000c000000c000000000000000000000000000000 229 - -- 042:00c00000c0c0c0000ccc0000c0c0c00000c00000000000000000000000000000 230 - -- 043:0000000000c000000ccc000000c0000000000000000000000000000000000000 231 - -- 044:0000000000000000000000000cc0000000c000000c0000000000000000000000 232 - -- 045:00000000000000000ccc00000000000000000000000000000000000000000000 233 - -- 046:0000000000000000000000000cc000000cc00000000000000000000000000000 234 - -- 047:0000c000000c000000c000000c000000c0000000000000000000000000000000 235 - -- 048:0ccc0000cc0cc000ccc0c000cc00c0000ccc0000000000000000000000000000 236 - -- 049:00cc00000ccc000000cc000000cc00000cccc000000000000000000000000000 237 - -- 050:cccc0000000cc0000ccc0000cc000000ccccc000000000000000000000000000 238 - -- 051:ccccc000000cc00000cc0000c00cc0000ccc0000000000000000000000000000 239 - -- 052:00cc00000ccc0000cc0c0000ccccc000000c0000000000000000000000000000 240 - -- 053:ccccc000cc000000cccc0000000cc000cccc0000000000000000000000000000 241 - -- 054:0ccc0000cc000000cccc0000cc00c0000ccc0000000000000000000000000000 242 - -- 055:ccccc000000cc00000cc00000cc00000cc000000000000000000000000000000 243 - -- 056:0ccc0000cc00c0000ccc0000cc00c0000ccc0000000000000000000000000000 244 - -- 057:0ccc0000cc00c0000cccc0000000c0000ccc0000000000000000000000000000 245 - -- 058:0cc000000cc00000000000000cc000000cc00000000000000000000000000000 246 - -- 059:0cc000000cc00000000000000cc0000000c000000c0000000000000000000000 247 - -- 060:000c000000c000000c00000000c00000000c0000000000000000000000000000 248 - -- 061:000000000ccc0000000000000ccc000000000000000000000000000000000000 249 - -- 062:0c00000000c00000000c000000c000000c000000000000000000000000000000 250 - -- 063:0cccc000000cc00000cc00000000000000cc0000000000000000000000000000 251 - -- 064:0ccc0000c0c0c000c0ccc000c00000000ccc0000000000000000000000000000 252 - -- 065:0ccc0000cc00c000cc00c000ccccc000cc00c000000000000000000000000000 253 - -- 066:cccc0000cc00c000cccc0000cc00c000cccc0000000000000000000000000000 254 - -- 067:0ccc0000cc00c000cc000000cc00c0000ccc0000000000000000000000000000 255 - -- 068:cccc0000cc00c000cc00c000cc00c000cccc0000000000000000000000000000 256 - -- 069:ccccc000cc000000cccc0000cc000000ccccc000000000000000000000000000 257 - -- 070:ccccc000cc000000cccc0000cc000000cc000000000000000000000000000000 258 - -- 071:0cccc000cc000000cc0cc000cc00c0000cccc000000000000000000000000000 259 - -- 072:cc00c000cc00c000ccccc000cc00c000cc00c000000000000000000000000000 260 - -- 073:0cccc00000cc000000cc000000cc00000cccc000000000000000000000000000 261 - -- 074:ccccc000000cc000000cc000cc0cc0000ccc0000000000000000000000000000 262 - -- 075:cc00c000cc0c0000ccc00000cc0c0000cc00c000000000000000000000000000 263 - -- 076:cc000000cc000000cc000000cc000000ccccc000000000000000000000000000 264 - -- 077:cc0cc000ccccc000ccccc000c0c0c000c000c000000000000000000000000000 265 - -- 078:cc00c000ccc0c000ccccc000cc0cc000cc00c000000000000000000000000000 266 - -- 079:0ccc0000cc00c000cc00c000cc00c0000ccc0000000000000000000000000000 267 - -- 080:cccc0000cc00c000cc00c000cccc0000cc000000000000000000000000000000 268 - -- 081:0ccc0000cc00c000cc00c000cc00c0000ccc00000000c0000000000000000000 269 - -- 082:cccc0000cc00c000cc00c000cccc0000cc00c000000000000000000000000000 270 - -- 083:0cccc000ccc000000ccc000000ccc000cccc0000000000000000000000000000 271 - -- 084:0cccc00000cc000000cc000000cc000000cc0000000000000000000000000000 272 - -- 085:cc00c000cc00c000cc00c000cc00c0000ccc0000000000000000000000000000 273 - -- 086:cc00c000cc00c000cc00c0000ccc000000c00000000000000000000000000000 274 - -- 087:c000c000c0c0c000ccccc000ccccc000cc0cc000000000000000000000000000 275 - -- 088:cc00c000cc00c0000ccc0000cc00c000cc00c000000000000000000000000000 276 - -- 089:0cc0c0000cc0c0000cccc00000cc000000cc0000000000000000000000000000 277 - -- 090:ccccc00000cc00000cc00000cc000000ccccc000000000000000000000000000 278 - -- 091:00cc000000c0000000c0000000c0000000cc0000000000000000000000000000 279 - -- 092:c00000000c00000000c00000000c00000000c000000000000000000000000000 280 - -- 093:0cc0000000c0000000c0000000c000000cc00000000000000000000000000000 281 - -- 094:00c000000c0c0000c000c0000000000000000000000000000000000000000000 282 - -- 095:000000000000000000000000000000000cccc000000000000000000000000000 283 - -- 096:0c00000000c00000000000000000000000000000000000000000000000000000 284 - -- 097:000000000cccc000c00cc000c00cc0000cccc000000000000000000000000000 285 - -- 098:cc000000cccc0000cc00c000cc00c000cccc0000000000000000000000000000 286 - -- 099:000000000cccc000ccc00000ccc000000cccc000000000000000000000000000 287 - -- 100:000cc0000cccc000c00cc000c00cc0000cccc000000000000000000000000000 288 - -- 101:000000000ccc0000cc0cc000ccc000000ccc0000000000000000000000000000 289 - -- 102:00ccc0000cc00000ccccc0000cc000000cc00000000000000000000000000000 290 - -- 103:000000000ccc0000c00cc000ccccc000000cc0000ccc00000000000000000000 291 - -- 104:cc000000cccc0000cc00c000cc00c000cc00c000000000000000000000000000 292 - -- 105:00cc00000000000000cc000000cc000000cc0000000000000000000000000000 293 - -- 106:000cc00000000000000cc000000cc000c00cc0000ccc00000000000000000000 294 - -- 107:cc000000cc00c000cccc0000cc00c000cc00c000000000000000000000000000 295 - -- 108:0cc000000cc000000cc000000cc0000000ccc000000000000000000000000000 296 - -- 109:00000000cc0c0000ccccc000c0c0c000c0c0c000000000000000000000000000 297 - -- 110:00000000cccc0000cc00c000cc00c000cc00c000000000000000000000000000 298 - -- 111:000000000ccc0000cc00c000cc00c0000ccc0000000000000000000000000000 299 - -- 112:00000000cccc0000cc00c000cc00c000cccc0000cc0000000000000000000000 300 - -- 113:000000000cccc000c00cc000c00cc0000cccc000000cc0000000000000000000 301 - -- 114:00000000cccc0000cc00c000cc000000cc000000000000000000000000000000 302 - -- 115:000000000cccc000ccc0000000ccc000cccc0000000000000000000000000000 303 - -- 116:0cc00000ccccc0000cc000000cc0000000ccc000000000000000000000000000 304 - -- 117:00000000cc00c000cc00c000cc00c0000ccc0000000000000000000000000000 305 - -- 118:00000000cc00c000cc00c0000ccc000000c00000000000000000000000000000 306 - -- 119:00000000c000c000c0c0c000ccccc000cc0cc000000000000000000000000000 307 - -- 120:00000000cc0cc0000ccc00000ccc0000cc0cc000000000000000000000000000 308 - -- 121:00000000c00cc000c00cc0000cccc000000cc0000ccc00000000000000000000 309 - -- 122:00000000ccccc00000cc00000cc00000ccccc000000000000000000000000000 310 - -- 123:00cc000000c000000cc0000000c0000000cc0000000000000000000000000000 311 - -- 124:00c0000000c0000000c0000000c0000000c00000000000000000000000000000 312 - -- 125:0cc0000000c0000000cc000000c000000cc00000000000000000000000000000 313 - -- 126:0000000000c0c0000c0c00000000000000000000000000000000000000000000 314 - -- 161:0c0000000c0000000c000000000000000c000000000000000000000000000000 315 - -- 162:c0c00000c0c00000000000000000000000000000000000000000000000000000 316 - -- 163:c0c00000ccc00000c0c00000ccc00000c0c00000000000000000000000000000 317 - -- 164:0cc00000cc0000000cc00000cc0000000c000000000000000000000000000000 318 - -- 165:c000000000c000000c000000c000000000c00000000000000000000000000000 319 - -- 166:0cc000000cc00000cc000000c0c000000cc00000000000000000000000000000 320 - -- 167:0c0000000c000000000000000000000000000000000000000000000000000000 321 - -- 168:00c000000c0000000c0000000c00000000c00000000000000000000000000000 322 - -- 169:c00000000c0000000c0000000c000000c0000000000000000000000000000000 323 - -- 170:00000000c0c000000c000000c0c0000000000000000000000000000000000000 324 - -- 171:000000000c000000ccc000000c00000000000000000000000000000000000000 325 - -- 172:000000000000000000000000000000000c000000c00000000000000000000000 326 - -- 173:0000000000000000ccc000000000000000000000000000000000000000000000 327 - -- 174:000000000000000000000000000000000c000000000000000000000000000000 328 - -- 175:0000000000c000000c000000c000000000000000000000000000000000000000 329 - -- 176:0cc00000c0c00000c0c00000c0c00000cc000000000000000000000000000000 330 - -- 177:0c000000cc0000000c0000000c000000ccc00000000000000000000000000000 331 - -- 178:cc00000000c000000c000000c0000000ccc00000000000000000000000000000 332 - -- 179:cc00000000c000000c00000000c00000cc000000000000000000000000000000 333 - -- 180:c0c00000c0c00000ccc0000000c0000000c00000000000000000000000000000 334 - -- 181:ccc00000c0000000cc00000000c00000cc000000000000000000000000000000 335 - -- 182:0cc00000c0000000ccc00000c0c00000ccc00000000000000000000000000000 336 - -- 183:ccc0000000c000000c000000c0000000c0000000000000000000000000000000 337 - -- 184:ccc00000c0c00000ccc00000c0c00000ccc00000000000000000000000000000 338 - -- 185:ccc00000c0c00000ccc0000000c0000000c00000000000000000000000000000 339 - -- 186:000000000c000000000000000c00000000000000000000000000000000000000 340 - -- 187:000000000c000000000000000c000000c0000000000000000000000000000000 341 - -- 188:00c000000c000000c00000000c00000000c00000000000000000000000000000 342 - -- 189:00000000ccc0000000000000ccc0000000000000000000000000000000000000 343 - -- 190:c00000000c00000000c000000c000000c0000000000000000000000000000000 344 - -- 191:ccc0000000c000000c000000000000000c000000000000000000000000000000 345 - -- 192:0cc00000c0c00000ccc00000c00000000cc00000000000000000000000000000 346 - -- 193:0c000000c0c00000ccc00000c0c00000c0c00000000000000000000000000000 347 - -- 194:cc000000c0c00000cc000000c0c00000cc000000000000000000000000000000 348 - -- 195:0cc00000c0000000c0000000c00000000cc00000000000000000000000000000 349 - -- 196:cc000000c0c00000c0c00000c0c00000cc000000000000000000000000000000 350 - -- 197:ccc00000c0000000cc000000c0000000ccc00000000000000000000000000000 351 - -- 198:ccc00000c0000000cc000000c0000000c0000000000000000000000000000000 352 - -- 199:0cc00000c0000000c0c00000c0c000000cc00000000000000000000000000000 353 - -- 200:c0c00000c0c00000ccc00000c0c00000c0c00000000000000000000000000000 354 - -- 201:ccc000000c0000000c0000000c000000ccc00000000000000000000000000000 355 - -- 202:ccc0000000c0000000c00000c0c000000c000000000000000000000000000000 356 - -- 203:c0c00000c0c00000cc000000c0c00000c0c00000000000000000000000000000 357 - -- 204:c0000000c0000000c0000000c0000000ccc00000000000000000000000000000 358 - -- 205:ccc00000ccc00000c0c00000c0c00000c0c00000000000000000000000000000 359 - -- 206:cc000000c0c00000c0c00000c0c00000c0c00000000000000000000000000000 360 - -- 207:0c000000c0c00000c0c00000c0c000000c000000000000000000000000000000 361 - -- 208:cc000000c0c00000cc000000c0000000c0000000000000000000000000000000 362 - -- 209:0c000000c0c00000c0c00000ccc000000cc00000000000000000000000000000 363 - -- 210:cc000000c0c00000ccc00000cc000000c0c00000000000000000000000000000 364 - -- 211:0cc00000c00000000c00000000c00000cc000000000000000000000000000000 365 - -- 212:ccc000000c0000000c0000000c0000000c000000000000000000000000000000 366 - -- 213:c0c00000c0c00000c0c00000c0c000000cc00000000000000000000000000000 367 - -- 214:c0c00000c0c00000c0c00000c0c000000c000000000000000000000000000000 368 - -- 215:c0c00000c0c00000c0c00000ccc00000ccc00000000000000000000000000000 369 - -- 216:c0c00000c0c000000c000000c0c00000c0c00000000000000000000000000000 370 - -- 217:c0c00000c0c000000c0000000c0000000c000000000000000000000000000000 371 - -- 218:ccc0000000c000000c000000c0000000ccc00000000000000000000000000000 372 - -- 219:0cc000000c0000000c0000000c0000000cc00000000000000000000000000000 373 - -- 220:00000000c00000000c00000000c0000000000000000000000000000000000000 374 - -- 221:cc0000000c0000000c0000000c000000cc000000000000000000000000000000 375 - -- 222:0c000000c0c00000000000000000000000000000000000000000000000000000 376 - -- 223:00000000000000000000000000000000ccc00000000000000000000000000000 377 - -- 224:0c00000000c00000000000000000000000000000000000000000000000000000 378 - -- 225:00000000cc0000000cc00000c0c00000ccc00000000000000000000000000000 379 - -- 226:c0000000cc000000c0c00000c0c00000cc000000000000000000000000000000 380 - -- 227:000000000cc00000c0000000c00000000cc00000000000000000000000000000 381 - -- 228:00c000000cc00000c0c00000c0c000000cc00000000000000000000000000000 382 - -- 229:000000000cc00000c0c00000cc0000000cc00000000000000000000000000000 383 - -- 230:00c000000c000000ccc000000c0000000c000000000000000000000000000000 384 - -- 231:000000000cc00000c0c00000ccc0000000c000000c0000000000000000000000 385 - -- 232:c0000000cc000000c0c00000c0c00000c0c00000000000000000000000000000 386 - -- 233:0c000000000000000c0000000c0000000c000000000000000000000000000000 387 - -- 234:00c000000000000000c0000000c00000c0c000000c0000000000000000000000 388 - -- 235:c0000000c0c00000cc000000cc000000c0c00000000000000000000000000000 389 - -- 236:cc0000000c0000000c0000000c000000ccc00000000000000000000000000000 390 - -- 237:00000000ccc00000ccc00000c0c00000c0c00000000000000000000000000000 391 - -- 238:00000000cc000000c0c00000c0c00000c0c00000000000000000000000000000 392 - -- 239:000000000c000000c0c00000c0c000000c000000000000000000000000000000 393 - -- 240:00000000cc000000c0c00000c0c00000cc000000c00000000000000000000000 394 - -- 241:000000000cc00000c0c00000c0c000000cc0000000c000000000000000000000 395 - -- 242:00000000c0c00000cc000000c0000000c0000000000000000000000000000000 396 - -- 243:000000000cc00000cc00000000c00000cc000000000000000000000000000000 397 - -- 244:0c000000ccc000000c0000000c00000000c00000000000000000000000000000 398 - -- 245:00000000c0c00000c0c00000c0c000000cc00000000000000000000000000000 399 - -- 246:00000000c0c00000c0c00000c0c000000c000000000000000000000000000000 400 - -- 247:00000000c0c00000c0c00000ccc00000ccc00000000000000000000000000000 401 - -- 248:00000000c0c000000c000000c0c00000c0c00000000000000000000000000000 402 - -- 249:00000000c0c00000c0c000000cc0000000c000000c0000000000000000000000 403 - -- 250:00000000ccc000000cc00000c0000000ccc00000000000000000000000000000 404 - -- 251:0cc000000c000000cc0000000c0000000cc00000000000000000000000000000 405 - -- 252:0c0000000c000000000000000c0000000c000000000000000000000000000000 406 - -- 253:cc0000000c0000000cc000000c000000cc000000000000000000000000000000 407 - -- 254:000000000cc00000cc0000000000000000000000000000000000000000000000 408 - -- </SPRITES> 409 - 410 - -- <MAP> 411 - -- 000:0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 412 - -- 001:ccdcccdcccdcccdcccdcccdcccdcccdcccdcccdcccdccedecedecedecedecedecedecedecedecedecedecede00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 413 - -- 002:0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 414 - -- 003:0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1dccdcccdc0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1fcedecede00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 415 - -- 004:0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 416 - -- 005:0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 417 - -- 006:0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 418 - -- 007:0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 419 - -- 008:fd0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0cec1cfd0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0eee1e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 420 - -- 009:fd0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0dcdedfd0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f0fcfed00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 421 - -- 010:acbc0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1c0c1cddedaebe0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1e0e1edded00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 422 - -- 011:adbd0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1d0d1dafbf0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f0f1f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 423 - -- 012:0cec1c0c1c0cececececec1c0c1c0c1cfdfdfdfdfdfd0eee1e0e1e0eeeeeeeeeee1e0e1e0e1efdfdfdfdfdfd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 424 - -- 013:0dfc1d0d1d0dfcfcfcfcfc1d0d1d0d1dfdfd2c3cfdfd0ffe1f0f1f0ffefefefefe1f0f1f0f1ffdfd2e3efdfd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 425 - -- 014:fdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfd2d3dfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdfd2f3ffdfd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 426 - -- 015:fd0a1afdfdfdfdfdfdfdfdfdfdfdfdfd6c7c4c5c8c9cfd2a3afdfdfdfdfdfdfdfdfdfdfdfdfd6e7e4e5e8e9e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 427 - -- 016:fd0b1bfdfdfdfdfdfdfdfdfdfdfdfdfd6d7d4d5d8d9dfd2b3bfdfdfdfdfdfdfdfdfdfdfdfdfd6f7f4f5f8f9f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 428 - -- </MAP> 429 - 430 - -- <WAVES> 431 - -- 000:00000000ffffffff00000000ffffffff 432 - -- 001:0123456789abcdeffedcba9876543210 433 - -- 002:0123456789abcdef0123456789abcdef 434 - -- </WAVES> 435 - 436 - -- <SFX> 437 - -- 000:500050005000f090f090f090b090b090b090f090f090f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000200000000000 438 - -- 001:30003000304030403070307030c030c090009000900090009000900090009000c000c000c000c000c000c000c000c000f000f000f000f000f000f000302000000800 439 - -- 002:e000e010e010f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000400000000000 440 - -- </SFX> 441 - 442 - -- <PALETTE> 443 - -- 000:1a1c2c5d275db13e53ef7d57ffcd75a7f07038b76425717929366f3b5dc941a6f673eff7f4f4f494b0c2566c86333c57 444 - -- </PALETTE> 445 -
+4
include/tic80_config.h
··· 29 29 // # ifndef TARGET_OS_IPHONE 30 30 # undef __TIC_MACOSX__ 31 31 # define __TIC_MACOSX__ 1 32 + # define TIC_MODULE_EXT ".dylib" 32 33 // # endif /* TARGET_OS_IPHONE */ 33 34 #endif /* defined(__APPLE__) */ 34 35 35 36 #if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) 36 37 # undef __TIC_WINDOWS__ 37 38 # define __TIC_WINDOWS__ 1 39 + # define TIC_MODULE_EXT ".dll" 38 40 #endif 39 41 40 42 #if defined(ANDROID) || defined(__ANDROID__) 41 43 # undef __TIC_ANDROID__ 42 44 # define __TIC_ANDROID__ 1 45 + # define TIC_MODULE_EXT ".so" 43 46 #elif (defined(linux) || defined(__linux) || defined(__linux__)) 44 47 # undef __TIC_LINUX__ 45 48 # define __TIC_LINUX__ 1 49 + # define TIC_MODULE_EXT ".so" 46 50 #endif 47 51 48 52 #ifndef TIC80_API
+2 -50
src/api.h
··· 26 26 #include "tic.h" 27 27 #include "time.h" 28 28 29 - // convenience macros to loop languages 30 - #define FOR_EACH_LANG(ln) for (tic_script_config** conf = Languages ; *conf != NULL; conf++ ) { tic_script_config* ln = *conf; 31 - #define FOR_EACH_LANG_END } 32 - 33 - 34 29 typedef struct { u8 index; tic_flip flip; tic_rotate rotate; } RemapResult; 35 30 typedef void(*RemapFunc)(void*, s32 x, s32 y, RemapResult* result); 36 31 ··· 74 69 tic_gamemenu menu; 75 70 void* data; 76 71 } tic_blit_callback; 77 - 78 - typedef struct 79 - { 80 - u8 id; 81 - const char* name; 82 - const char* fileExtension; 83 - const char* projectComment; 84 - struct 85 - { 86 - bool(*init)(tic_mem* memory, const char* code); 87 - void(*close)(tic_mem* memory); 88 - 89 - tic_tick tick; 90 - tic_boot boot; 91 - tic_blit_callback callback; 92 - }; 93 - 94 - const tic_outline_item* (*getOutline)(const char* code, s32* size); 95 - void (*eval)(tic_mem* tic, const char* code); 96 - 97 - const char* blockCommentStart; 98 - const char* blockCommentEnd; 99 - const char* blockCommentStart2; 100 - const char* blockCommentEnd2; 101 - const char* blockStringStart; 102 - const char* blockStringEnd; 103 - const char* stdStringStartEnd; 104 - const char* singleComment; 105 - const char* blockEnd; 106 - 107 - const char* const * keywords; 108 - s32 keywordsCount; 109 - 110 - tic_lang_isalnum lang_isalnum; 111 - bool useStructuredEdition; 112 - 113 - s32 api_keywordsCount; 114 - const char** api_keywords; 115 - 116 - } tic_script_config; 117 - 118 - extern tic_script_config* Languages[]; 119 72 120 73 typedef enum 121 74 { ··· 838 791 struct tic_mem 839 792 { 840 793 tic80 product; 841 - tic_ram* ram; 842 - tic_cartridge cart; 794 + tic_ram* ram; 795 + tic_cartridge cart; 843 796 844 797 tic_ram* base_ram; 845 798 ··· 876 829 void tic_core_synth_sound(tic_mem* tic); 877 830 void tic_core_blit(tic_mem* tic); 878 831 void tic_core_blit_ex(tic_mem* tic, tic_blit_callback clb); 879 - const tic_script_config* tic_core_script_config(tic_mem* memory); 880 832 881 833 #define VBANK(tic, bank) \ 882 834 bool MACROVAR(_bank_) = tic_api_vbank(tic, bank); \
+8 -1
src/api/fennel.c
··· 182 182 } 183 183 } 184 184 185 - tic_script_config FennelSyntaxConfig = 185 + static const u8 DemoRom[] = 186 + { 187 + #include "../build/assets/fenneldemo.tic.dat" 188 + }; 189 + 190 + const tic_script EXPORT_SCRIPT(Fennel) = 186 191 { 187 192 .id = 14, 188 193 .name = "fennel", ··· 220 225 .keywordsCount = COUNT_OF(FennelKeywords), 221 226 222 227 .useStructuredEdition = true, 228 + 229 + .demo = {DemoRom, sizeof DemoRom}, 223 230 };
+15 -2
src/api/janet.c
··· 1041 1041 { 1042 1042 janet_stacktrace(GameFiber, result); 1043 1043 janet_buffer_push_u8(errBuffer, 0); 1044 - core->data->error(core->data->data, errBuffer->data); 1044 + core->data->error(core->data->data, (char*)errBuffer->data); 1045 1045 } 1046 1046 1047 1047 ··· 1266 1266 return items; 1267 1267 } 1268 1268 1269 - JANET_API const tic_script_config JanetSyntaxConfig = 1269 + static const u8 DemoRom[] = 1270 + { 1271 + #include "../build/assets/janetdemo.tic.dat" 1272 + }; 1273 + 1274 + static const u8 MarkRom[] = 1275 + { 1276 + #include "../build/assets/janetmark.tic.dat" 1277 + }; 1278 + 1279 + JANET_API const tic_script EXPORT_SCRIPT(Janet) = 1270 1280 { 1271 1281 .id = 18, 1272 1282 .name = "janet", ··· 1298 1308 1299 1309 .keywords = JanetKeywords, 1300 1310 .keywordsCount = COUNT_OF(JanetKeywords), 1311 + 1312 + .demo = {DemoRom, sizeof DemoRom}, 1313 + .mark = {MarkRom, sizeof MarkRom, "janetmark.tic"}, 1301 1314 };
+15 -2
src/api/js.c
··· 830 830 count = 1; 831 831 } 832 832 833 - tic_core_textri_dep(getCore(ctx), 833 + core->api.textri(tic, 834 834 pt[0], pt[1], // xy 1 835 835 pt[2], pt[3], // xy 2 836 836 pt[4], pt[5], // xy 3 ··· 1254 1254 core->data->error(core->data->data, "TODO: JS eval not yet implemented\n."); 1255 1255 } 1256 1256 1257 - const tic_script_config JsSyntaxConfig = 1257 + static const u8 DemoRom[] = 1258 + { 1259 + #include "../build/assets/jsdemo.tic.dat" 1260 + }; 1261 + 1262 + static const u8 MarkRom[] = 1263 + { 1264 + #include "../build/assets/jsmark.tic.dat" 1265 + }; 1266 + 1267 + const tic_script EXPORT_SCRIPT(Js) = 1258 1268 { 1259 1269 .id = 12, 1260 1270 .name = "js", ··· 1287 1297 1288 1298 .keywords = JsKeywords, 1289 1299 .keywordsCount = COUNT_OF(JsKeywords), 1300 + 1301 + .demo = {DemoRom, sizeof DemoRom}, 1302 + .mark = {MarkRom, sizeof MarkRom, "jsmark.tic"}, 1290 1303 };
+86 -2
src/api/lua.c
··· 487 487 } 488 488 } 489 489 490 - tic_core_textri_dep(getLuaCore(lua), 490 + core->api.textri(tic, 491 491 pt[0], pt[1], // xy 1 492 492 pt[2], pt[3], // xy 2 493 493 pt[4], pt[5], // xy 3 ··· 1830 1830 } 1831 1831 } 1832 1832 1833 - tic_script_config LuaSyntaxConfig = 1833 + static const u8 DemoRom[] = 1834 + { 1835 + #include "../build/assets/luademo.tic.dat" 1836 + }; 1837 + 1838 + static const u8 MarkRom[] = 1839 + { 1840 + #include "../build/assets/luamark.tic.dat" 1841 + }; 1842 + 1843 + static const u8 DemoFire[] = 1844 + { 1845 + #include "../build/assets/fire.tic.dat" 1846 + }; 1847 + 1848 + static const u8 DemoP3d[] = 1849 + { 1850 + #include "../build/assets/p3d.tic.dat" 1851 + }; 1852 + 1853 + static const u8 DemoSfx[] = 1854 + { 1855 + #include "../build/assets/sfx.tic.dat" 1856 + }; 1857 + 1858 + static const u8 DemoPalette[] = 1859 + { 1860 + #include "../build/assets/palette.tic.dat" 1861 + }; 1862 + 1863 + static const u8 DemoFont[] = 1864 + { 1865 + #include "../build/assets/font.tic.dat" 1866 + }; 1867 + 1868 + static const u8 DemoMusic[] = 1869 + { 1870 + #include "../build/assets/music.tic.dat" 1871 + }; 1872 + 1873 + static const u8 DemoQuest[] = 1874 + { 1875 + #include "../build/assets/quest.tic.dat" 1876 + }; 1877 + 1878 + static const u8 DemoTetris[] = 1879 + { 1880 + #include "../build/assets/tetris.tic.dat" 1881 + }; 1882 + 1883 + static const u8 DemoBenchmark[] = 1884 + { 1885 + #include "../build/assets/benchmark.tic.dat" 1886 + }; 1887 + 1888 + static const u8 DemoBpp[] = 1889 + { 1890 + #include "../build/assets/bpp.tic.dat" 1891 + }; 1892 + 1893 + static const u8 DemoCar[] = 1894 + { 1895 + #include "../build/assets/car.tic.dat" 1896 + }; 1897 + 1898 + const tic_script EXPORT_SCRIPT(Lua) = 1834 1899 { 1835 1900 .id = 10, 1836 1901 .name = "lua", ··· 1865 1930 1866 1931 .keywords = LuaKeywords, 1867 1932 .keywordsCount = COUNT_OF(LuaKeywords), 1933 + 1934 + .demo = {DemoRom, sizeof DemoRom}, 1935 + .mark = {MarkRom, sizeof MarkRom, "luamark.tic"}, 1936 + 1937 + .demos = (struct tic_demo[]) 1938 + { 1939 + {DemoFire, sizeof DemoFire, "fire.tic"}, 1940 + {DemoP3d, sizeof DemoP3d, "p3d.tic"}, 1941 + {DemoSfx, sizeof DemoSfx, "sfx.tic"}, 1942 + {DemoPalette, sizeof DemoPalette, "palette.tic"}, 1943 + {DemoFont, sizeof DemoFont, "font.tic"}, 1944 + {DemoMusic, sizeof DemoMusic, "music.tic"}, 1945 + {DemoQuest, sizeof DemoQuest, "quest.tic"}, 1946 + {DemoTetris, sizeof DemoTetris, "tetris.tic"}, 1947 + {DemoBenchmark, sizeof DemoBenchmark, "benchmark.tic"}, 1948 + {DemoBpp, sizeof DemoBpp, "bpp.tic"}, 1949 + {DemoCar, sizeof DemoCar, "car.tic"}, 1950 + {0}, 1951 + }, 1868 1952 };
+14 -1
src/api/moonscript.c
··· 186 186 return items; 187 187 } 188 188 189 - tic_script_config MoonSyntaxConfig = 189 + static const u8 DemoRom[] = 190 + { 191 + #include "../build/assets/moondemo.tic.dat" 192 + }; 193 + 194 + static const u8 MarkRom[] = 195 + { 196 + #include "../build/assets/moonmark.tic.dat" 197 + }; 198 + 199 + const tic_script EXPORT_SCRIPT(Moon) = 190 200 { 191 201 .id = 13, 192 202 .name = "moon", ··· 220 230 221 231 .keywords = MoonKeywords, 222 232 .keywordsCount = COUNT_OF(MoonKeywords), 233 + 234 + .demo = {DemoRom, sizeof DemoRom}, 235 + .mark = {MarkRom, sizeof MarkRom, "moonmark.tic"}, 223 236 };
+14 -1
src/api/mruby.c
··· 1216 1216 return items; 1217 1217 } 1218 1218 1219 - const tic_script_config MRubySyntaxConfig = 1219 + static const u8 DemoRom[] = 1220 + { 1221 + #include "../build/assets/rubydemo.tic.dat" 1222 + }; 1223 + 1224 + static const u8 MarkRom[] = 1225 + { 1226 + #include "../build/assets/rubymark.tic.dat" 1227 + }; 1228 + 1229 + const tic_script EXPORT_SCRIPT(Ruby) = 1220 1230 { 1221 1231 .id = 11, 1222 1232 .name = "ruby", ··· 1248 1258 1249 1259 .keywords = MRubyKeywords, 1250 1260 .keywordsCount = COUNT_OF(MRubyKeywords), 1261 + 1262 + .demo = {DemoRom, sizeof DemoRom}, 1263 + .mark = {MarkRom, sizeof MarkRom, "rubymark.tic"}, 1251 1264 };
+13 -1
src/api/python.c
··· 1517 1517 "while", "for", "if", "elif", "else", "break", "continue", "return", "assert", "raise" 1518 1518 }; 1519 1519 1520 + static const u8 DemoRom[] = 1521 + { 1522 + #include "../build/assets/pythondemo.tic.dat" 1523 + }; 1520 1524 1521 - PK_EXPORT const tic_script_config PythonSyntaxConfig = 1525 + static const u8 MarkRom[] = 1526 + { 1527 + #include "../build/assets/pythonmark.tic.dat" 1528 + }; 1529 + 1530 + PK_EXPORT const tic_script EXPORT_SCRIPT(Python) = 1522 1531 { 1523 1532 .id = 20, 1524 1533 .name = "python", ··· 1551 1560 1552 1561 .keywords = PythonKeywords, 1553 1562 .keywordsCount = COUNT_OF(PythonKeywords), 1563 + 1564 + .demo = {DemoRom, sizeof DemoRom}, 1565 + .mark = {MarkRom, sizeof MarkRom, "pythonmark.tic"}, 1554 1566 };
+14 -1
src/api/scheme.c
··· 1018 1018 #undef API_KEYWORD_DEF 1019 1019 }; 1020 1020 1021 - tic_script_config SchemeSyntaxConfig = 1021 + static const u8 DemoRom[] = 1022 + { 1023 + #include "../build/assets/schemedemo.tic.dat" 1024 + }; 1025 + 1026 + static const u8 MarkRom[] = 1027 + { 1028 + #include "../build/assets/schememark.tic.dat" 1029 + }; 1030 + 1031 + const tic_script EXPORT_SCRIPT(Scheme) = 1022 1032 { 1023 1033 .id = 19, 1024 1034 .name = "scheme", ··· 1057 1067 1058 1068 .keywords = SchemeKeywords, 1059 1069 .keywordsCount = COUNT_OF(SchemeKeywords), 1070 + 1071 + .demo = {DemoRom, sizeof DemoRom}, 1072 + .mark = {MarkRom, sizeof MarkRom, "schememark.tic"}, 1060 1073 };
+14 -1
src/api/squirrel.c
··· 1848 1848 sq_settop(vm, 0); 1849 1849 } 1850 1850 1851 - tic_script_config SquirrelSyntaxConfig = 1851 + static const u8 DemoRom[] = 1852 + { 1853 + #include "../build/assets/squirreldemo.tic.dat" 1854 + }; 1855 + 1856 + static const u8 MarkRom[] = 1857 + { 1858 + #include "../build/assets/squirrelmark.tic.dat" 1859 + }; 1860 + 1861 + const tic_script EXPORT_SCRIPT(Squirrel) = 1852 1862 { 1853 1863 .id = 15, 1854 1864 .name = "squirrel", ··· 1882 1892 1883 1893 .keywords = SquirrelKeywords, 1884 1894 .keywordsCount = COUNT_OF(SquirrelKeywords), 1895 + 1896 + .demo = {DemoRom, sizeof DemoRom}, 1897 + .mark = {MarkRom, sizeof MarkRom, "squirrelmark.tic"}, 1885 1898 };
+14 -6
src/api/wasm.c
··· 1312 1312 printf("TODO: Wasm eval not yet implemented\n."); 1313 1313 } 1314 1314 1315 - const tic_script_config WasmSyntaxConfig = 1315 + static const u8 DemoRom[] = 1316 + { 1317 + #include "../build/assets/wasmdemo.tic.dat" 1318 + }; 1319 + 1320 + static const u8 MarkRom[] = 1321 + { 1322 + #include "../build/assets/wasmmark.tic.dat" 1323 + }; 1324 + 1325 + const tic_script EXPORT_SCRIPT(Wasm) = 1316 1326 { 1317 1327 .id = 17, 1318 1328 .name = "wasm", ··· 1345 1355 1346 1356 .keywords = NULL, 1347 1357 .keywordsCount = 0, 1348 - }; 1349 1358 1350 - const tic_script_config* get_wasm_script_config() 1351 - { 1352 - return &WasmSyntaxConfig; 1353 - } 1359 + .demo = {DemoRom, sizeof DemoRom}, 1360 + .mark = {MarkRom, sizeof MarkRom, "wasmmark.tic"}, 1361 + };
+15 -2
src/api/wren.c
··· 876 876 count = 1; 877 877 } 878 878 879 - tic_core_textri_dep(core, 879 + core->api.textri(tic, 880 880 pt[0], pt[1], // xy 1 881 881 pt[2], pt[3], // xy 2 882 882 pt[4], pt[5], // xy 3 ··· 1819 1819 wrenInterpret(core->currentVM, "main", code); 1820 1820 } 1821 1821 1822 - tic_script_config WrenSyntaxConfig = 1822 + static const u8 DemoRom[] = 1823 + { 1824 + #include "../build/assets/wrendemo.tic.dat" 1825 + }; 1826 + 1827 + static const u8 MarkRom[] = 1828 + { 1829 + #include "../build/assets/wrenmark.tic.dat" 1830 + }; 1831 + 1832 + const tic_script EXPORT_SCRIPT(Wren) = 1823 1833 { 1824 1834 .id = 16, 1825 1835 .name = "wren", ··· 1853 1863 1854 1864 .keywords = WrenKeywords, 1855 1865 .keywordsCount = COUNT_OF(WrenKeywords), 1866 + 1867 + .demo = {DemoRom, sizeof DemoRom}, 1868 + .mark = {MarkRom, sizeof MarkRom, "wrenmark.tic"}, 1856 1869 };
+2 -2
src/cart.c
··· 151 151 } 152 152 153 153 struct CodeChunk {s32 size; const char* data;} code[TIC_BANKS] = {0}; 154 - struct BinaryChunk {s32 size; const char* data;} binary[TIC_BINARY_BANKS] = {0}; 154 + struct BinaryChunk {s32 size; const u8* data;} binary[TIC_BINARY_BANKS] = {0}; 155 155 156 156 { 157 157 const u8* ptr = buffer; ··· 176 176 binary[chunk->bank] = (struct BinaryChunk){chunkSize(chunk), ptr}; 177 177 break; 178 178 case CHUNK_CODE: 179 - code[chunk->bank] = (struct CodeChunk){chunkSize(chunk), ptr}; 179 + code[chunk->bank] = (struct CodeChunk){chunkSize(chunk), (char*)ptr}; 180 180 break; 181 181 #if defined(BUILD_DEPRECATED) 182 182 case CHUNK_CODE_ZIP:
+17 -39
src/core/core.c
··· 42 42 43 43 static_assert(TIC_BANK_BITS == 3, "tic_bank_bits"); 44 44 static_assert(sizeof(tic_map) < 1024 * 32, "tic_map"); 45 - static_assert(sizeof(tic_rgb) == 3, "tic_rgb"); 46 - static_assert(sizeof(tic_palette) == 48, "tic_palette"); 47 - static_assert(sizeof(((tic_vram *)0)->vars) == 4, "tic_vram vars"); 45 + static_assert(sizeof(tic_rgb) == 3, "tic_rgb"); 46 + static_assert(sizeof(tic_palette) == 48, "tic_palette"); 47 + static_assert(sizeof(((tic_vram *)0)->vars) == 4, "tic_vram vars"); 48 48 static_assert(sizeof(tic_vram) == TIC_VRAM_SIZE, "tic_vram"); 49 49 static_assert(sizeof(tic_ram) == TIC_RAM_SIZE, "tic_ram"); 50 50 ··· 244 244 return (s32)time(NULL); 245 245 } 246 246 247 - static bool compareMetatag(const char* code, const char* tag, const char* value, const char* comment) 248 - { 249 - bool result = false; 250 - 251 - char* str = tic_tool_metatag(code, tag, comment); 252 - 253 - if (str) 254 - { 255 - result = strcmp(str, value) == 0; 256 - free(str); 257 - } 258 - 259 - return result; 260 - } 261 - 262 - const tic_script_config* tic_core_script_config(tic_mem* memory) 263 - { 264 - FOR_EACH_LANG(it) 265 - { 266 - if(it->id == memory->cart.lang || compareMetatag(memory->cart.code.data, "script", it->name, it->singleComment)) 267 - return it; 268 - } 269 - FOR_EACH_LANG_END 270 - 271 - return Languages[0]; 272 - } 273 - 274 247 static void updateSaveid(tic_mem* memory) 275 248 { 276 249 memset(memory->saveid, 0, sizeof memory->saveid); 277 - char* saveid = tic_tool_metatag(memory->cart.code.data, "saveid", tic_core_script_config(memory)->singleComment); 278 - if (saveid) 250 + const char* saveid = tic_tool_metatag(memory->cart.code.data, "saveid", NULL); 251 + if (*saveid) 279 252 { 280 253 strncpy(memory->saveid, saveid, TIC_SAVEID_SIZE - 1); 281 - free(saveid); 282 254 } 283 255 } 284 256 ··· 420 392 } 421 393 } 422 394 423 - static bool tic_init_vm(tic_core* core, const char* code, const tic_script_config* config) 395 + static bool tic_init_vm(tic_core* core, const char* code, const tic_script* config) 424 396 { 425 397 tic_close_current_vm(core); 426 398 // set current script config and init ··· 467 439 const char* code = tic->cart.code.data; 468 440 469 441 bool done = false; 470 - const tic_script_config* config = tic_core_script_config(tic); 442 + const tic_script* config = tic_get_script(tic); 471 443 472 - if (strlen(code)) 444 + if (config && strlen(code)) 473 445 { 474 446 cart2ram(tic); 475 447 476 448 core->state.synced = 0; 477 449 tic->input.data = 0; 478 450 479 - if (compareMetatag(code, "input", "mouse", config->singleComment)) 451 + if(strcmp(tic_tool_metatag(code, "input", config->singleComment), "mouse") == 0) 480 452 tic->input.mouse = 1; 481 - else if (compareMetatag(code, "input", "gamepad", config->singleComment)) 453 + else if(strcmp(tic_tool_metatag(code, "input", config->singleComment), "gamepad") == 0) 482 454 tic->input.gamepad = 1; 483 - else if (compareMetatag(code, "input", "keyboard", config->singleComment)) 455 + else if(strcmp(tic_tool_metatag(code, "input", config->singleComment), "keyboard") == 0) 484 456 tic->input.keyboard = 1; 485 457 else tic->input.data = -1; // default is all enabled 486 458 487 459 data->start = data->counter(core->data->data); 488 460 461 + // !TODO: move it to wasm module? 489 462 // TODO: does where to fetch code from need to be a config option so this isn't hard 490 463 // coded for just a single language? perhaps change it later when we have a second script 491 464 // engine that uses BINARY? ··· 768 741 #define API_FUNC_DEF(name, ...) core->api.name = tic_api_ ## name; 769 742 TIC_API_LIST(API_FUNC_DEF) 770 743 #undef API_FUNC_DEF 744 + 745 + #if defined BUILD_DEPRECATED 746 + void tic_api_textri(tic_mem* tic, float x1, float y1, float x2, float y2, float x3, float y3, float u1, float v1, float u2, float v2, float u3, float v3, bool use_map, u8* colors, s32 count); 747 + core->api.textri = tic_api_textri; 748 + #endif 771 749 } 772 750 773 751 tic_api_reset(&core->memory);
+8 -4
src/core/core.h
··· 24 24 25 25 #include "api.h" 26 26 #include "tools.h" 27 + #include "script.h" 27 28 28 29 #define CLOCKRATE (255<<13) 29 30 #define TIC_DEFAULT_COLOR 15 ··· 173 174 tic80_pixel_color_format screen_format; 174 175 175 176 void* currentVM; 176 - const tic_script_config* currentScript; 177 + const tic_script* currentScript; 177 178 178 179 struct 179 180 { ··· 203 204 #define API_FUNC_DEF(name, _, __, ___, ____, _____, ret, ...) ret (*name)(__VA_ARGS__); 204 205 TIC_API_LIST(API_FUNC_DEF) 205 206 #undef API_FUNC_DEF 207 + 208 + #if defined BUILD_DEPRECATED 209 + void (*textri)(tic_mem* tic, float x1, float y1, float x2, float y2, float x3, float y3, float u1, float v1, float u2, float v2, float u3, float v3, bool use_map, u8* colors, s32 count); 210 + #endif 206 211 } api; 207 212 208 213 } tic_core; ··· 215 220 // mouse cursor is the same in both modes 216 221 // for backward compatibility 217 222 #define OVR_COMPAT(CORE, BANK) \ 218 - tic_api_vbank(&CORE->memory, BANK), \ 223 + core->api.vbank(&CORE->memory, BANK), \ 219 224 CORE->memory.ram->vram.vars.cursor = CORE->state.vbank.mem.vars.cursor 220 225 221 226 #define OVR(CORE) \ 222 227 s32 MACROVAR(_bank_) = CORE->state.vbank.id; \ 223 228 OVR_COMPAT(CORE, 1); \ 224 - tic_api_cls(&CORE->memory, 0); \ 229 + core->api.cls(&CORE->memory, 0); \ 225 230 SCOPE(OVR_COMPAT(CORE, MACROVAR(_bank_))) 226 231 227 - void tic_core_textri_dep(tic_core* core, float x1, float y1, float x2, float y2, float x3, float y3, float u1, float v1, float u2, float v2, float u3, float v3, bool use_map, u8* colors, s32 count); 228 232 #endif
+2 -2
src/core/draw_dep.c
··· 103 103 } 104 104 } 105 105 106 - void tic_core_textri_dep(tic_core* core, float x1, float y1, float x2, float y2, float x3, float y3, float u1, float v1, float u2, float v2, float u3, float v3, bool use_map, u8* colors, s32 count) 106 + void tic_api_textri(tic_mem* memory, float x1, float y1, float x2, float y2, float x3, float y3, float u1, float v1, float u2, float v2, float u3, float v3, bool use_map, u8* colors, s32 count) 107 107 { 108 - tic_mem* memory = &core->memory; 108 + tic_core* core = (tic_core*)memory; 109 109 tic_vram* vram = &memory->ram->vram; 110 110 111 111 u8* mapping = getPalette(memory, colors, count);
-96
src/core/languages.c
··· 1 - #include <stddef.h> 2 - #include "api.h" 3 - 4 - #if defined(TIC_BUILD_WITH_MRUBY) 5 - extern tic_script_config MRubySyntaxConfig; 6 - #endif 7 - 8 - #if defined(TIC_BUILD_WITH_JS) 9 - extern tic_script_config JsSyntaxConfig; 10 - #endif 11 - 12 - #if defined (TIC_BUILD_WITH_LUA) 13 - extern tic_script_config LuaSyntaxConfig; 14 - #endif 15 - 16 - #if defined(TIC_BUILD_WITH_MOON) 17 - extern tic_script_config MoonSyntaxConfig; 18 - #endif 19 - 20 - #if defined(TIC_BUILD_WITH_FENNEL) 21 - extern tic_script_config FennelSyntaxConfig; 22 - #endif 23 - 24 - #if defined(TIC_BUILD_WITH_SQUIRREL) 25 - extern tic_script_config SquirrelSyntaxConfig; 26 - #endif 27 - 28 - #if defined(TIC_BUILD_WITH_SCHEME) 29 - extern tic_script_config SchemeSyntaxConfig; 30 - #endif 31 - 32 - #if defined(TIC_BUILD_WITH_WREN) 33 - extern tic_script_config WrenSyntaxConfig; 34 - #endif 35 - 36 - #if defined(TIC_BUILD_WITH_WASM) 37 - extern tic_script_config WasmSyntaxConfig; 38 - #endif 39 - 40 - #if defined(TIC_BUILD_WITH_JANET) 41 - extern tic_script_config JanetSyntaxConfig; 42 - #endif 43 - 44 - #if defined(TIC_BUILD_WITH_PYTHON) 45 - extern tic_script_config PythonSyntaxConfig; 46 - #endif 47 - 48 - tic_script_config* Languages[] = 49 - { 50 - 51 - #if defined (TIC_BUILD_WITH_LUA) 52 - &LuaSyntaxConfig, 53 - #endif 54 - 55 - #if defined(TIC_BUILD_WITH_MRUBY) 56 - &MRubySyntaxConfig, 57 - #endif 58 - 59 - #if defined(TIC_BUILD_WITH_JS) 60 - &JsSyntaxConfig, 61 - #endif 62 - 63 - #if defined(TIC_BUILD_WITH_MOON) 64 - &MoonSyntaxConfig, 65 - #endif 66 - 67 - #if defined(TIC_BUILD_WITH_FENNEL) 68 - &FennelSyntaxConfig, 69 - #endif 70 - 71 - #if defined(TIC_BUILD_WITH_SCHEME) 72 - &SchemeSyntaxConfig, 73 - #endif 74 - 75 - #if defined(TIC_BUILD_WITH_SQUIRREL) 76 - &SquirrelSyntaxConfig, 77 - #endif 78 - 79 - #if defined(TIC_BUILD_WITH_WREN) 80 - &WrenSyntaxConfig, 81 - #endif 82 - 83 - #if defined(TIC_BUILD_WITH_WASM) 84 - &WasmSyntaxConfig, 85 - #endif 86 - 87 - #if defined(TIC_BUILD_WITH_JANET) 88 - &JanetSyntaxConfig, 89 - #endif 90 - 91 - #if defined(TIC_BUILD_WITH_PYTHON) 92 - &PythonSyntaxConfig, 93 - #endif 94 - 95 - NULL 96 - };
+118
src/ext/json.c
··· 1 + // MIT License 2 + 3 + // Copyright (c) 2017 Vadim Grigoruk @nesbox // grigoruk@gmail.com 4 + 5 + // Permission is hereby granted, free of charge, to any person obtaining a copy 6 + // of this software and associated documentation files (the "Software"), to deal 7 + // in the Software without restriction, including without limitation the rights 8 + // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 + // copies of the Software, and to permit persons to whom the Software is 10 + // furnished to do so, subject to the following conditions: 11 + 12 + // The above copyright notice and this permission notice shall be included in all 13 + // copies or substantial portions of the Software. 14 + 15 + // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 + // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 + // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 + // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 + // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 + // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 + // SOFTWARE. 22 + 23 + #include "json.h" 24 + 25 + #define JSMN_STATIC 26 + #define JSMN_PARENT_LINKS 27 + #include <jsmn.h> 28 + 29 + #include <stdio.h> 30 + 31 + static struct 32 + { 33 + jsmn_parser p; 34 + jsmntok_t* t; 35 + s32 tcount, count; 36 + const char* json; 37 + } state = {.tcount = 128}; 38 + 39 + bool json_parse(const char *json, s32 size) 40 + { 41 + if(state.t == NULL) 42 + state.t = malloc(state.tcount * sizeof *state.t); 43 + 44 + jsmn_init(&state.p); 45 + 46 + state.json = json; 47 + 48 + while((state.count = jsmn_parse(&state.p, state.json, size, state.t, state.tcount)) == JSMN_ERROR_NOMEM) 49 + state.t = realloc(state.t, (state.tcount *= 2) * sizeof *state.t); 50 + 51 + return state.count >= 0 && state.t[0].type == JSMN_OBJECT; 52 + } 53 + 54 + static s32 jsoneq(const char *json, const jsmntok_t *tok, const char *s) 55 + { 56 + if (tok->type & JSMN_STRING 57 + && strlen(s) == tok->end - tok->start 58 + && strncmp(json + tok->start, s, tok->end - tok->start) == 0) 59 + return 0; 60 + 61 + return -1; 62 + } 63 + 64 + static s32 getJsonItem(const char *var, s32 parent, jsmntype_t type) 65 + { 66 + for(s32 i = parent; i < state.count; i++) 67 + if(jsoneq(state.json, &state.t[i], var) == 0 && state.t[i + 1].type & type) 68 + return i + 1; 69 + 70 + return 0; 71 + } 72 + 73 + bool json_bool(const char *var, s32 parent) 74 + { 75 + const jsmntok_t *t = &state.t[getJsonItem(var, parent, JSMN_PRIMITIVE)]; 76 + return strncmp(state.json + t->start, "true", t->end - t->start) == 0; 77 + } 78 + 79 + s32 json_int(const char *var, s32 parent) 80 + { 81 + return atoi(state.json + state.t[getJsonItem(var, parent, JSMN_PRIMITIVE)].start); 82 + } 83 + 84 + bool json_string(const char *var, s32 parent, char* value, s32 size) 85 + { 86 + const jsmntok_t* t = &state.t[getJsonItem(var, parent, JSMN_STRING)]; 87 + return snprintf(value, size, "%.*s", t->end - t->start, state.json + t->start) > 0; 88 + } 89 + 90 + s32 json_array(const char *var, s32 parent) 91 + { 92 + return getJsonItem(var, parent, JSMN_ARRAY); 93 + } 94 + 95 + s32 json_array_size(s32 array) 96 + { 97 + s32 count = 0; 98 + 99 + for(s32 i = state.t[array].parent; i < state.count; i++) 100 + if(state.t[i].parent == array) 101 + count++; 102 + 103 + return count; 104 + } 105 + 106 + s32 json_array_item(s32 array, s32 index) 107 + { 108 + for(s32 i = state.t[array].parent, count = 0; i < state.count; i++) 109 + if(state.t[i].parent == array && index == count++) 110 + return i; 111 + 112 + return 0; 113 + } 114 + 115 + s32 json_object(const char *var, s32 parent) 116 + { 117 + return getJsonItem(var, parent, JSMN_OBJECT); 118 + }
+35
src/ext/json.h
··· 1 + // MIT License 2 + 3 + // Copyright (c) 2017 Vadim Grigoruk @nesbox // grigoruk@gmail.com 4 + 5 + // Permission is hereby granted, free of charge, to any person obtaining a copy 6 + // of this software and associated documentation files (the "Software"), to deal 7 + // in the Software without restriction, including without limitation the rights 8 + // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 + // copies of the Software, and to permit persons to whom the Software is 10 + // furnished to do so, subject to the following conditions: 11 + 12 + // The above copyright notice and this permission notice shall be included in all 13 + // copies or substantial portions of the Software. 14 + 15 + // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 + // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 + // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 + // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 + // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 + // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 + // SOFTWARE. 22 + 23 + #pragma once 24 + 25 + #include "tic.h" 26 + 27 + bool json_parse(const char *json, s32 size); 28 + 29 + s32 json_int(const char *var, s32 parent); 30 + bool json_bool(const char *var, s32 parent); 31 + bool json_string(const char *var, s32 parent, char* value, s32 size); 32 + s32 json_array(const char *var, s32 parent); 33 + s32 json_array_size(s32 array); 34 + s32 json_array_item(s32 array, s32 index); 35 + s32 json_object(const char *var, s32 parent);
+176
src/script.c
··· 1 + // MIT License 2 + 3 + // Copyright (c) 2017 Vadim Grigoruk @nesbox // grigoruk@gmail.com 4 + 5 + // Permission is hereby granted, free of charge, to any person obtaining a copy 6 + // of this software and associated documentation files (the "Software"), to deal 7 + // in the Software without restriction, including without limitation the rights 8 + // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 + // copies of the Software, and to permit persons to whom the Software is 10 + // furnished to do so, subject to the following conditions: 11 + 12 + // The above copyright notice and this permission notice shall be included in all 13 + // copies or substantial portions of the Software. 14 + 15 + // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 + // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 + // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 + // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 + // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 + // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 + // SOFTWARE. 22 + 23 + #include "script.h" 24 + #include "tools.h" 25 + 26 + #include <stdio.h> 27 + 28 + #define MAX_SUPPORTED_LANGS (16) 29 + 30 + #if defined(TIC_RUNTIME_STATIC) 31 + 32 + #if defined (TIC_BUILD_WITH_LUA) 33 + extern tic_script EXPORT_SCRIPT(Lua); 34 + #endif 35 + 36 + #if defined(TIC_BUILD_WITH_MRUBY) 37 + extern tic_script EXPORT_SCRIPT(Ruby); 38 + #endif 39 + 40 + #if defined(TIC_BUILD_WITH_JS) 41 + extern tic_script EXPORT_SCRIPT(Js); 42 + #endif 43 + 44 + #if defined(TIC_BUILD_WITH_MOON) 45 + extern tic_script EXPORT_SCRIPT(Moon); 46 + #endif 47 + 48 + #if defined(TIC_BUILD_WITH_FENNEL) 49 + extern tic_script EXPORT_SCRIPT(Fennel); 50 + #endif 51 + 52 + #if defined(TIC_BUILD_WITH_SQUIRREL) 53 + extern tic_script EXPORT_SCRIPT(Squirrel); 54 + #endif 55 + 56 + #if defined(TIC_BUILD_WITH_SCHEME) 57 + extern tic_script EXPORT_SCRIPT(Scheme); 58 + #endif 59 + 60 + #if defined(TIC_BUILD_WITH_WREN) 61 + extern tic_script EXPORT_SCRIPT(Wren); 62 + #endif 63 + 64 + #if defined(TIC_BUILD_WITH_WASM) 65 + extern tic_script EXPORT_SCRIPT(Wasm); 66 + #endif 67 + 68 + #if defined(TIC_BUILD_WITH_JANET) 69 + extern tic_script EXPORT_SCRIPT(Janet); 70 + #endif 71 + 72 + #if defined(TIC_BUILD_WITH_PYTHON) 73 + extern tic_script EXPORT_SCRIPT(Python); 74 + #endif 75 + 76 + #endif 77 + 78 + static const tic_script *Scripts[MAX_SUPPORTED_LANGS + 1] = 79 + { 80 + #if defined(TIC_RUNTIME_STATIC) 81 + #if defined (TIC_BUILD_WITH_LUA) 82 + &EXPORT_SCRIPT(Lua), 83 + #endif 84 + 85 + #if defined(TIC_BUILD_WITH_MRUBY) 86 + &EXPORT_SCRIPT(Ruby), 87 + #endif 88 + 89 + #if defined(TIC_BUILD_WITH_JS) 90 + &EXPORT_SCRIPT(Js), 91 + #endif 92 + 93 + #if defined(TIC_BUILD_WITH_MOON) 94 + &EXPORT_SCRIPT(Moon), 95 + #endif 96 + 97 + #if defined(TIC_BUILD_WITH_FENNEL) 98 + &EXPORT_SCRIPT(Fennel), 99 + #endif 100 + 101 + #if defined(TIC_BUILD_WITH_SCHEME) 102 + &EXPORT_SCRIPT(Scheme), 103 + #endif 104 + 105 + #if defined(TIC_BUILD_WITH_SQUIRREL) 106 + &EXPORT_SCRIPT(Squirrel), 107 + #endif 108 + 109 + #if defined(TIC_BUILD_WITH_WREN) 110 + &EXPORT_SCRIPT(Wren), 111 + #endif 112 + 113 + #if defined(TIC_BUILD_WITH_WASM) 114 + &EXPORT_SCRIPT(Wasm), 115 + #endif 116 + 117 + #if defined(TIC_BUILD_WITH_JANET) 118 + &EXPORT_SCRIPT(Janet), 119 + #endif 120 + 121 + #if defined(TIC_BUILD_WITH_PYTHON) 122 + &EXPORT_SCRIPT(Python), 123 + #endif 124 + 125 + #endif 126 + 127 + NULL, 128 + }; 129 + 130 + static s32 compareScripts(const void* a, const void* b) 131 + { 132 + const tic_script* script1 = *(const tic_script**)a; 133 + const tic_script* script2 = *(const tic_script**)b; 134 + 135 + if (script1->id < script2->id) return -1; 136 + if (script1->id > script2->id) return 1; 137 + return 0; 138 + } 139 + 140 + void tic_add_script(const tic_script* script) 141 + { 142 + s32 index = 0; 143 + FOREACH_LANG(it) 144 + { 145 + if(it->id == script->id || strcmp(it->name, script->name) == 0) 146 + { 147 + // script already exists 148 + return; 149 + } 150 + 151 + index++; 152 + } 153 + 154 + if(index < MAX_SUPPORTED_LANGS) 155 + { 156 + Scripts[index] = script; 157 + qsort(Scripts, index + 1, sizeof Scripts[0], compareScripts); 158 + } 159 + } 160 + 161 + const tic_script** tic_scripts() 162 + { 163 + return Scripts; 164 + } 165 + 166 + const tic_script* tic_get_script(tic_mem* memory) 167 + { 168 + FOREACH_LANG(script) 169 + { 170 + if(script->id == memory->cart.lang 171 + || strcmp(tic_tool_metatag(memory->cart.code.data, "script", script->singleComment), script->name) == 0) 172 + return script; 173 + } 174 + 175 + return NULL; 176 + }
+89
src/script.h
··· 1 + // MIT License 2 + 3 + // Copyright (c) 2017 Vadim Grigoruk @nesbox // grigoruk@gmail.com 4 + 5 + // Permission is hereby granted, free of charge, to any person obtaining a copy 6 + // of this software and associated documentation files (the "Software"), to deal 7 + // in the Software without restriction, including without limitation the rights 8 + // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 + // copies of the Software, and to permit persons to whom the Software is 10 + // furnished to do so, subject to the following conditions: 11 + 12 + // The above copyright notice and this permission notice shall be included in all 13 + // copies or substantial portions of the Software. 14 + 15 + // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 + // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 + // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 + // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 + // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 + // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 + // SOFTWARE. 22 + 23 + #pragma once 24 + 25 + #include "api.h" 26 + 27 + struct tic_script 28 + { 29 + u8 id; 30 + const char* name; 31 + const char* fileExtension; 32 + const char* projectComment; 33 + struct 34 + { 35 + bool(*init)(tic_mem* memory, const char* code); 36 + void(*close)(tic_mem* memory); 37 + 38 + tic_tick tick; 39 + tic_boot boot; 40 + tic_blit_callback callback; 41 + }; 42 + 43 + const tic_outline_item* (*getOutline)(const char* code, s32* size); 44 + void (*eval)(tic_mem* tic, const char* code); 45 + 46 + const char* blockCommentStart; 47 + const char* blockCommentEnd; 48 + const char* blockCommentStart2; 49 + const char* blockCommentEnd2; 50 + const char* blockStringStart; 51 + const char* blockStringEnd; 52 + const char* stdStringStartEnd; 53 + const char* singleComment; 54 + const char* blockEnd; 55 + 56 + const char* const * keywords; 57 + s32 keywordsCount; 58 + 59 + tic_lang_isalnum lang_isalnum; 60 + bool useStructuredEdition; 61 + 62 + s32 api_keywordsCount; 63 + const char** api_keywords; 64 + 65 + struct tic_demo 66 + { 67 + const u8* data; 68 + s32 size; 69 + const char* name; 70 + } demo, mark, *demos; 71 + 72 + }; 73 + 74 + typedef struct tic_script tic_script; 75 + 76 + const tic_script* tic_get_script(tic_mem* memory); 77 + void tic_add_script(const tic_script* script); 78 + const tic_script** tic_scripts(); 79 + 80 + #define FOREACH_LANG(script) \ 81 + for(const tic_script **MACROVAR(it) = tic_scripts(), *script = *MACROVAR(it); *MACROVAR(it); script = *++MACROVAR(it)) 82 + 83 + #define SCRIPT_CONFIG ScriptConfig 84 + 85 + #if defined(TIC_RUNTIME_STATIC) 86 + #define EXPORT_SCRIPT(X) CONCAT(X, SCRIPT_CONFIG) 87 + #else 88 + #define EXPORT_SCRIPT(X) SCRIPT_CONFIG 89 + #endif
+22 -123
src/studio/config.c
··· 23 23 #include "config.h" 24 24 #include "fs.h" 25 25 #include "cart.h" 26 + #include "ext/json.h" 26 27 27 28 #if defined(__EMSCRIPTEN__) 28 29 #define DEFAULT_VSYNC 0 ··· 30 31 #define DEFAULT_VSYNC 1 31 32 #endif 32 33 33 - #if defined(__TIC_ANDROID__) 34 + #if defined(__TIC_ANDROID__) 34 35 #define INTEGER_SCALE_DEFAULT false 35 36 #else 36 37 #define INTEGER_SCALE_DEFAULT true 37 38 #endif 38 39 39 - #if defined (TIC_BUILD_WITH_LUA) 40 - #include <lua.h> 41 - #include <lauxlib.h> 42 - #include <lualib.h> 43 - 44 - static void readBool(lua_State* lua, const char* name, bool* val) 40 + static void readConfig(Config* config) 45 41 { 46 - lua_getfield(lua, -1, name); 42 + const char* json = config->cart->code.data; 47 43 48 - if (lua_isboolean(lua, -1)) 49 - *val = lua_toboolean(lua, -1); 44 + if(json_parse(json, strlen(json))) 45 + { 46 + config->data.checkNewVersion = json_bool("CHECK_NEW_VERSION", 0); 47 + config->data.uiScale = json_int("UI_SCALE", 0); 48 + config->data.soft = json_bool("SOFTWARE_RENDERING", 0); 49 + config->data.trim = json_bool("TRIM_ON_SAVE", 0); 50 50 51 - lua_pop(lua, 1); 52 - } 53 - 54 - static void readInteger(lua_State* lua, const char* name, s32* val) 55 - { 56 - lua_getfield(lua, -1, name); 51 + if(config->data.uiScale <= 0) 52 + config->data.uiScale = 1; 57 53 58 - if (lua_isinteger(lua, -1)) 59 - *val = lua_tointeger(lua, -1); 54 + config->data.theme.gamepad.touch.alpha = json_int("GAMEPAD_TOUCH_ALPHA", 0); 60 55 61 - lua_pop(lua, 1); 62 - } 56 + s32 theme = json_object("CODE_THEME", 0); 63 57 64 - static void readByte(lua_State* lua, const char* name, u8* val) 65 - { 66 - s32 res = *val; 67 - readInteger(lua, name, &res); 68 - *val = res; 69 - } 70 - 71 - static void readGlobalInteger(lua_State* lua, const char* name, s32* val) 72 - { 73 - lua_getglobal(lua, name); 74 - 75 - if (lua_isinteger(lua, -1)) 76 - *val = lua_tointeger(lua, -1); 77 - 78 - lua_pop(lua, 1); 79 - } 80 - 81 - static void readGlobalBool(lua_State* lua, const char* name, bool* val) 82 - { 83 - lua_getglobal(lua, name); 84 - 85 - if (lua_isboolean(lua, -1)) 86 - *val = lua_toboolean(lua, -1); 87 - 88 - lua_pop(lua, 1); 89 - } 90 - 91 - static void readCodeTheme(Config* config, lua_State* lua) 92 - { 93 - lua_getfield(lua, -1, "CODE"); 94 - 95 - if(lua_type(lua, -1) == LUA_TTABLE) 96 - { 97 - 98 - #define CODE_COLOR_DEF(VAR) readByte(lua, #VAR, &config->data.theme.code.VAR); 58 + #define CODE_COLOR_DEF(VAR) config->data.theme.code.VAR = json_int(#VAR, theme); 99 59 CODE_COLORS_LIST(CODE_COLOR_DEF) 100 60 #undef CODE_COLOR_DEF 101 61 102 - readByte(lua, "SELECT", &config->data.theme.code.select); 103 - readByte(lua, "CURSOR", &config->data.theme.code.cursor); 62 + config->data.theme.code.select = json_int("SELECT", theme); 63 + config->data.theme.code.cursor = json_int("CURSOR", theme); 104 64 105 - readBool(lua, "SHADOW", &config->data.theme.code.shadow); 106 - readBool(lua, "ALT_FONT", &config->data.theme.code.altFont); 107 - readBool(lua, "ALT_CARET", &config->data.theme.code.altCaret); 108 - readBool(lua, "MATCH_DELIMITERS", &config->data.theme.code.matchDelimiters); 109 - readBool(lua, "AUTO_DELIMITERS", &config->data.theme.code.autoDelimiters); 110 - } 111 - 112 - lua_pop(lua, 1); 113 - } 114 - 115 - static void readGamepadTheme(Config* config, lua_State* lua) 116 - { 117 - lua_getfield(lua, -1, "GAMEPAD"); 118 - 119 - if(lua_type(lua, -1) == LUA_TTABLE) 120 - { 121 - lua_getfield(lua, -1, "TOUCH"); 122 - 123 - if(lua_type(lua, -1) == LUA_TTABLE) 124 - { 125 - readByte(lua, "ALPHA", &config->data.theme.gamepad.touch.alpha); 126 - } 127 - 128 - lua_pop(lua, 1); 129 - } 130 - 131 - lua_pop(lua, 1); 132 - } 133 - 134 - static void readTheme(Config* config, lua_State* lua) 135 - { 136 - lua_getglobal(lua, "THEME"); 137 - 138 - if(lua_type(lua, -1) == LUA_TTABLE) 139 - { 140 - readCodeTheme(config, lua); 141 - readGamepadTheme(config, lua); 142 - } 143 - 144 - lua_pop(lua, 1); 145 - } 146 - 147 - static void readConfig(Config* config) 148 - { 149 - lua_State* lua = luaL_newstate(); 150 - 151 - if(lua) 152 - { 153 - if(luaL_loadstring(lua, config->cart->code.data) == LUA_OK && lua_pcall(lua, 0, LUA_MULTRET, 0) == LUA_OK) 154 - { 155 - readGlobalBool(lua, "CHECK_NEW_VERSION", &config->data.checkNewVersion); 156 - readGlobalInteger(lua, "UI_SCALE", &config->data.uiScale); 157 - readGlobalBool(lua, "SOFTWARE_RENDERING", &config->data.soft); 158 - readGlobalBool(lua, "TRIM_ON_SAVE", &config->data.trim); 159 - 160 - if(config->data.uiScale <= 0) 161 - config->data.uiScale = 1; 162 - 163 - readTheme(config, lua); 164 - } 65 + config->data.theme.code.shadow = json_bool("SHADOW", theme); 66 + config->data.theme.code.altFont = json_bool("ALT_FONT", theme); 67 + config->data.theme.code.altCaret = json_bool("ALT_CARET", theme); 68 + config->data.theme.code.matchDelimiters = json_bool("MATCH_DELIMITERS", theme); 69 + config->data.theme.code.autoDelimiters = json_bool("AUTO_DELIMITERS", theme); 165 70 166 - lua_close(lua); 167 71 } 168 72 } 169 - #else 170 - 171 - static void readConfig(Config* config) {} 172 - 173 - #endif 174 73 175 74 static void update(Config* config, const u8* buffer, s32 size) 176 75 {
-298
src/studio/demos.c
··· 1 - #include <string.h> 2 - #include <stddef.h> 3 - #include <stdio.h> 4 - #include "demos.h" 5 - #include "api.h" 6 - 7 - #if defined (TIC_BUILD_WITH_LUA) 8 - static const u8 LuaDemoRom[] = 9 - { 10 - #include "../build/assets/luademo.tic.dat" 11 - }; 12 - static const u8 LuaMarkRom[] = 13 - { 14 - #include "../build/assets/luamark.tic.dat" 15 - }; 16 - tic_script_config_extra LuaSyntaxConfigExtra = 17 - { 18 - .name = "lua", 19 - .demoRom = LuaDemoRom, 20 - .demoRomSize = sizeof LuaDemoRom, 21 - .markRom = LuaMarkRom, 22 - .markRomSize = sizeof LuaMarkRom, 23 - }; 24 - #endif 25 - 26 - #if defined (TIC_BUILD_WITH_MOON) 27 - static const u8 MoonDemoRom[] = 28 - { 29 - #include "../build/assets/moondemo.tic.dat" 30 - }; 31 - static const u8 MoonMarkRom[] = 32 - { 33 - #include "../build/assets/moonmark.tic.dat" 34 - }; 35 - tic_script_config_extra MoonSyntaxConfigExtra = 36 - { 37 - .name = "moon", 38 - .demoRom = MoonDemoRom, 39 - .demoRomSize = sizeof MoonDemoRom, 40 - .markRom = MoonMarkRom, 41 - .markRomSize = sizeof MoonMarkRom, 42 - }; 43 - #endif 44 - 45 - #if defined (TIC_BUILD_WITH_FENNEL) 46 - static const u8 FennelDemoRom[] = 47 - { 48 - #include "../build/assets/fenneldemo.tic.dat" 49 - }; 50 - /* does not exists 51 - static const u8 FennelMarkRom[] = 52 - { 53 - #include "../build/assets/fennelmark.tic.dat" 54 - }; 55 - */ 56 - 57 - tic_script_config_extra FennelSyntaxConfigExtra = 58 - { 59 - .name = "fennel", 60 - .demoRom = FennelDemoRom, 61 - .demoRomSize = sizeof FennelDemoRom, 62 - .markRom = NULL, 63 - .markRomSize = 0, 64 - }; 65 - #endif 66 - 67 - 68 - #if defined(TIC_BUILD_WITH_JS) 69 - 70 - static const u8 JsDemoRom[] = 71 - { 72 - #include "../build/assets/jsdemo.tic.dat" 73 - }; 74 - 75 - static const u8 jsmark[] = 76 - { 77 - #include "../build/assets/jsmark.tic.dat" 78 - }; 79 - 80 - tic_script_config_extra JsSyntaxConfigExtra = 81 - { 82 - .name = "js", 83 - .demoRom = JsDemoRom, 84 - .demoRomSize = sizeof JsDemoRom, 85 - .markRom = jsmark, 86 - .markRomSize = sizeof jsmark, 87 - }; 88 - 89 - #endif 90 - 91 - #if defined(TIC_BUILD_WITH_MRUBY) 92 - 93 - static const u8 RubyDemoRom[] = 94 - { 95 - #include "../build/assets/rubydemo.tic.dat" 96 - }; 97 - 98 - static const u8 rubymark[] = 99 - { 100 - #include "../build/assets/rubymark.tic.dat" 101 - }; 102 - 103 - tic_script_config_extra MRubySyntaxConfigExtra = 104 - { 105 - .name = "ruby", 106 - .demoRom = RubyDemoRom, 107 - .demoRomSize = sizeof RubyDemoRom, 108 - .markRom = rubymark, 109 - .markRomSize = sizeof rubymark, 110 - }; 111 - 112 - #endif 113 - 114 - #if defined(TIC_BUILD_WITH_WREN) 115 - 116 - static const u8 WrenDemoRom[] = 117 - { 118 - #include "../build/assets/wrendemo.tic.dat" 119 - }; 120 - 121 - static const u8 wrenmark[] = 122 - { 123 - #include "../build/assets/wrenmark.tic.dat" 124 - }; 125 - 126 - tic_script_config_extra WrenSyntaxConfigExtra = 127 - { 128 - .name = "wren", 129 - .demoRom = WrenDemoRom, 130 - .demoRomSize = sizeof WrenDemoRom, 131 - .markRom = wrenmark, 132 - .markRomSize = sizeof wrenmark, 133 - }; 134 - 135 - #endif 136 - 137 - #if defined (TIC_BUILD_WITH_SCHEME) 138 - static const u8 SchemeDemoRom[] = 139 - { 140 - #include "../build/assets/schemedemo.tic.dat" 141 - }; 142 - 143 - static const u8 schememark[] = 144 - { 145 - #include "../build/assets/schememark.tic.dat" 146 - }; 147 - tic_script_config_extra SchemeSyntaxConfigExtra = 148 - { 149 - .name = "scheme", 150 - .demoRom = SchemeDemoRom, 151 - .demoRomSize = sizeof SchemeDemoRom, 152 - .markRom = schememark, 153 - .markRomSize = sizeof schememark, 154 - }; 155 - #endif 156 - 157 - 158 - #if defined (TIC_BUILD_WITH_SQUIRREL) 159 - static const u8 SquirrelDemoRom[] = 160 - { 161 - #include "../build/assets/squirreldemo.tic.dat" 162 - }; 163 - 164 - static const u8 squirrelmark[] = 165 - { 166 - #include "../build/assets/squirrelmark.tic.dat" 167 - }; 168 - tic_script_config_extra SquirrelSyntaxConfigExtra = 169 - { 170 - .name = "squirrel", 171 - .demoRom = SquirrelDemoRom, 172 - .demoRomSize = sizeof SquirrelDemoRom, 173 - .markRom = squirrelmark, 174 - .markRomSize = sizeof squirrelmark, 175 - }; 176 - #endif 177 - 178 - 179 - #if defined(TIC_BUILD_WITH_WASM) 180 - 181 - static const u8 WasmDemoRom[] = 182 - { 183 - #include "../build/assets/wasmdemo.tic.dat" 184 - }; 185 - 186 - static const u8 wasmmark[] = 187 - { 188 - #include "../build/assets/wasmmark.tic.dat" 189 - }; 190 - 191 - tic_script_config_extra WasmSyntaxConfigExtra = 192 - { 193 - .name = "wasm", 194 - .demoRom = WasmDemoRom, 195 - .demoRomSize = sizeof WasmDemoRom, 196 - .markRom = wasmmark, 197 - .markRomSize = sizeof wasmmark, 198 - }; 199 - 200 - #endif 201 - 202 - #if defined(TIC_BUILD_WITH_JANET) 203 - 204 - static const u8 JanetDemoRom[] = 205 - { 206 - #include "../build/assets/janetdemo.tic.dat" 207 - }; 208 - 209 - static const u8 janetmark[] = 210 - { 211 - #include "../build/assets/janetmark.tic.dat" 212 - }; 213 - 214 - tic_script_config_extra JanetSyntaxConfigExtra = 215 - { 216 - .name = "janet", 217 - .demoRom = JanetDemoRom, 218 - .demoRomSize = sizeof JanetDemoRom, 219 - .markRom = janetmark, 220 - .markRomSize = sizeof janetmark, 221 - }; 222 - 223 - #endif 224 - 225 - #if defined(TIC_BUILD_WITH_PYTHON) 226 - 227 - static const u8 PythonDemoRom[] = 228 - { 229 - #include "../build/assets/pythondemo.tic.dat" 230 - }; 231 - 232 - static const u8 pythonmark[] = 233 - { 234 - #include "../build/assets/pythonmark.tic.dat" 235 - }; 236 - 237 - tic_script_config_extra PythonSyntaxConfigExtra = 238 - { 239 - .name = "python", 240 - .demoRom = PythonDemoRom, 241 - .demoRomSize = sizeof PythonDemoRom, 242 - .markRom = pythonmark, 243 - .markRomSize = sizeof pythonmark, 244 - }; 245 - 246 - #endif 247 - 248 - 249 - tic_script_config_extra* getConfigExtra(const tic_script_config* config) 250 - { 251 - 252 - for (tic_script_config_extra** conf = LanguagesExtra ; *conf != NULL; conf++ ) { 253 - tic_script_config_extra* ln = *conf; 254 - if (strcmp(config->name, ln->name) == 0) 255 - { 256 - return ln; 257 - } 258 - } 259 - return NULL; 260 - } 261 - 262 - tic_script_config_extra* LanguagesExtra[] = { 263 - #if defined(TIC_BUILD_WITH_LUA) 264 - &LuaSyntaxConfigExtra, 265 - #endif 266 - #if defined(TIC_BUILD_WITH_MOON) 267 - &MoonSyntaxConfigExtra, 268 - #endif 269 - #if defined(TIC_BUILD_WITH_FENNEL) 270 - &FennelSyntaxConfigExtra, 271 - #endif 272 - #if defined(TIC_BUILD_WITH_WREN) 273 - &WrenSyntaxConfigExtra, 274 - #endif 275 - #if defined(TIC_BUILD_WITH_SCHEME) 276 - &SchemeSyntaxConfigExtra, 277 - #endif 278 - 279 - #if defined(TIC_BUILD_WITH_SQUIRREL) 280 - &SquirrelSyntaxConfigExtra, 281 - #endif 282 - #if defined(TIC_BUILD_WITH_JS) 283 - &JsSyntaxConfigExtra, 284 - #endif 285 - #if defined(TIC_BUILD_WITH_MRUBY) 286 - &MRubySyntaxConfigExtra, 287 - #endif 288 - #if defined(TIC_BUILD_WITH_WASM) 289 - &WasmSyntaxConfigExtra, 290 - #endif 291 - #if defined(TIC_BUILD_WITH_JANET) 292 - &JanetSyntaxConfigExtra, 293 - #endif 294 - #if defined(TIC_BUILD_WITH_PYTHON) 295 - &PythonSyntaxConfigExtra, 296 - #endif 297 - NULL 298 - };
-15
src/studio/demos.h
··· 1 - #include "api.h" 2 - 3 - typedef struct 4 - { 5 - const char* name; 6 - const void* demoRom; 7 - const s32 demoRomSize; 8 - const void* markRom; 9 - const s32 markRomSize; 10 - } tic_script_config_extra; 11 - 12 - 13 - extern tic_script_config_extra* LanguagesExtra[]; 14 - 15 - tic_script_config_extra* getConfigExtra(const tic_script_config* config);
+15 -12
src/studio/editors/code.c
··· 456 456 sprintf(code->status.line, "line %i/%i col %i", line + 1, getLinesCount(code) + 1, column + 1); 457 457 { 458 458 s32 codeLen = strlen(code->src); 459 - sprintf(code->status.size, "size %i/%zu", codeLen, MAX_CODE); 459 + sprintf(code->status.size, "size %i/%i", codeLen, MAX_CODE); 460 460 code->status.color = codeLen > MAX_CODE ? tic_color_red : tic_color_white; 461 461 } 462 462 } ··· 467 467 static inline bool isopenparen_(Code* code, char c) {return c == '(' || c == '{' || c == '[';} 468 468 static inline bool iscloseparen_(Code* code, char c) {return c == ')' || c == '}' || c == ']';} 469 469 470 - static inline bool config_isalnum_(const tic_script_config* config, char c) 470 + static inline bool config_isalnum_(const tic_script* config, char c) 471 471 { 472 472 if (config->lang_isalnum) 473 473 return config->lang_isalnum(c); ··· 478 478 static inline bool isalnum_(Code* code, char c) 479 479 { 480 480 tic_mem* tic = code->tic; 481 - const tic_script_config* config = tic_core_script_config(tic); 481 + const tic_script* config = tic_get_script(tic); 482 482 return config_isalnum_(config, c); 483 483 } 484 484 ··· 489 489 s->syntax = color; 490 490 } 491 491 492 - static void parseCode(const tic_script_config* config, const char* start, CodeState* state) 492 + static void parseCode(const tic_script* config, const char* start, CodeState* state) 493 493 { 494 494 const char* ptr = start; 495 495 ··· 699 699 700 700 tic_mem* tic = code->tic; 701 701 702 - const tic_script_config* config = tic_core_script_config(tic); 702 + const tic_script* config = tic_get_script(tic); 703 703 704 - parseCode(config, code->src, code->state); 704 + if(config) 705 + { 706 + parseCode(config, code->src, code->state); 707 + } 705 708 } 706 709 707 710 static char* getLineByPos(Code* code, char* pos) ··· 1107 1110 static inline bool shouldUseStructuredEdit(Code* code) 1108 1111 { 1109 1112 const bool emacsMode = getKeybindMode(code) == KEYBIND_EMACS; 1110 - return tic_core_script_config(code->tic)->useStructuredEdition && emacsMode; 1113 + return tic_get_script(code->tic)->useStructuredEdition && emacsMode; 1111 1114 } 1112 1115 1113 1116 ··· 1484 1487 return false; 1485 1488 else { //auto mode 1486 1489 tic_mem* tic = code->tic; 1487 - const tic_script_config* config = tic_core_script_config(tic); 1490 + const tic_script* config = tic_get_script(tic); 1488 1491 if (config->id == 20 || config->id == 13) //python or moonscript 1489 1492 return true; 1490 1493 return false; ··· 1601 1604 // Add a block-ending keyword or symbol, and put the cursor in the line between. 1602 1605 static void newLineAutoClose(Code* code) 1603 1606 { 1604 - const char* blockEnd = tic_core_script_config(code->tic)->blockEnd; 1607 + const char* blockEnd = tic_get_script(code->tic)->blockEnd; 1605 1608 if (blockEnd != NULL) 1606 1609 { 1607 1610 newLine(code); ··· 1739 1742 1740 1743 code->sidebar.size = 0; 1741 1744 1742 - const tic_script_config* config = tic_core_script_config(tic); 1745 + const tic_script* config = tic_get_script(tic); 1743 1746 1744 1747 if(config->getOutline) 1745 1748 { ··· 2013 2016 2014 2017 static void commentLine(Code* code) 2015 2018 { 2016 - const char* comment = tic_core_script_config(code->tic)->singleComment; 2019 + const char* comment = tic_get_script(code->tic)->singleComment; 2017 2020 size_t size = strlen(comment); 2018 2021 2019 2022 if(code->cursor.selection){ ··· 2395 2398 char* result = NULL; 2396 2399 2397 2400 tic_mem* tic = code->tic; 2398 - const tic_script_config* config = tic_core_script_config(tic); 2401 + const tic_script* config = tic_get_script(tic); 2399 2402 2400 2403 if(config->getOutline) 2401 2404 {
+68 -125
src/studio/fs.c
··· 23 23 #include "studio.h" 24 24 #include "fs.h" 25 25 #include "net.h" 26 + #include "ext/json.h" 26 27 27 28 #if defined(BAREMETALPI) || defined(_3DS) 28 29 #ifdef EN_DEBUG ··· 40 41 #include <sys/types.h> 41 42 #endif 42 43 43 - #if defined(TIC_BUILD_WITH_LUA) 44 - 45 - #include <lua.h> 46 - #include <lauxlib.h> 47 - #include <lualib.h> 48 - 49 - #endif 50 - 51 44 #if defined(__TIC_WINDOWS__) 52 45 #include <direct.h> 53 46 #include <windows.h> ··· 59 52 #include <emscripten.h> 60 53 #endif 61 54 55 + #if defined(__TIC_WINDOWS__) 56 + #define SLASH_SYMBOL ('\\') 57 + #else 58 + #define SLASH_SYMBOL ('/') 59 + #endif 60 + 62 61 static const char* PublicDir = TIC_HOST; 63 62 64 63 struct tic_fs ··· 85 84 char* ptr = path; 86 85 while (*ptr) 87 86 { 88 - if (*ptr == '/') *ptr = '\\'; 87 + if (*ptr == '/') *ptr = SLASH_SYMBOL; 89 88 ptr++; 90 89 } 91 90 #endif ··· 157 156 158 157 return str; 159 158 } 159 + 160 + #if defined(_MSC_VER) && defined(_USING_V110_SDK71_) 160 161 161 162 time_t FileTimeToTimeT(FILETIME* ft) { 162 163 ULARGE_INTEGER ull; ··· 202 203 return 0; 203 204 } 204 205 206 + #endif 207 + 205 208 #define freeString(S) free((void*)S) 206 209 207 210 ··· 261 264 void* data; 262 265 } NetDirData; 263 266 264 - #if defined(TIC_BUILD_WITH_LUA) 265 - 266 - static lua_State* netLuaInit(u8* buffer, s32 size) 267 - { 268 - if (buffer && size) 269 - { 270 - char* script = calloc(1, size + 1); 271 - memcpy(script, buffer, size); 272 - 273 - lua_State* lua = luaL_newstate(); 274 - 275 - if(lua) 276 - { 277 - if(luaL_loadstring(lua, script) == LUA_OK && lua_pcall(lua, 0, LUA_MULTRET, 0) == LUA_OK) 278 - { 279 - free(script); 280 - return lua; 281 - } 282 - else lua_close(lua); 283 - } 284 - 285 - free(script); 286 - } 287 - 288 - return NULL; 289 - } 290 - 291 267 static void onDirResponse(const net_get_data* netData) 292 268 { 293 269 NetDirData* netDirData = (NetDirData*)netData->calldata; 294 270 295 271 if(netData->type == net_get_done) 296 272 { 297 - lua_State* lua = netLuaInit(netData->done.data, netData->done.size); 298 - 299 - if (lua) 273 + if(json_parse(netData->done.data, netData->done.size)) 300 274 { 301 - { 302 - lua_getglobal(lua, "folders"); 303 - 304 - if (lua_type(lua, -1) == LUA_TTABLE) 305 - { 306 - s32 count = (s32)lua_rawlen(lua, -1); 307 - 308 - for (s32 i = 1; i <= count; i++) 309 - { 310 - lua_geti(lua, -1, i); 311 - 312 - { 313 - lua_getfield(lua, -1, "name"); 314 - if (lua_isstring(lua, -1)) 315 - netDirData->item(lua_tostring(lua, -1), NULL, NULL, 0, netDirData->data, true); 316 - 317 - lua_pop(lua, 1); 318 - } 275 + typedef char string[TICNAME_MAX]; 319 276 320 - lua_pop(lua, 1); 321 - } 322 - } 277 + string name, hash, filename; 323 278 324 - lua_pop(lua, 1); 279 + s32 folders = json_array("folders", 0); 280 + for(s32 i = 0, size = json_array_size(folders); i < size; i++) 281 + { 282 + if(json_string("name", json_array_item(folders, i), name, sizeof name)) 283 + netDirData->item(name, NULL, NULL, 0, netDirData->data, true); 325 284 } 326 285 286 + s32 files = json_array("files", 0); 287 + for(s32 i = 0, size = json_array_size(files); i < size; i++) 327 288 { 328 - lua_getglobal(lua, "files"); 329 - 330 - if (lua_type(lua, -1) == LUA_TTABLE) 331 - { 332 - s32 count = (s32)lua_rawlen(lua, -1); 333 - 334 - for (s32 i = 1; i <= count; i++) 335 - { 336 - lua_geti(lua, -1, i); 289 + s32 item = json_array_item(files, i); 337 290 338 - char hash[TICNAME_MAX]; 339 - char name[TICNAME_MAX]; 340 - char title[TICNAME_MAX]; 341 - 342 - { 343 - lua_getfield(lua, -1, "hash"); 344 - if (lua_isstring(lua, -1)) 345 - strncpy(hash, lua_tostring(lua, -1), sizeof hash); 346 - 347 - lua_pop(lua, 1); 348 - } 349 - 350 - { 351 - lua_getfield(lua, -1, "filename"); 352 - 353 - if (lua_isstring(lua, -1)) 354 - strncpy(name, lua_tostring(lua, -1), sizeof name); 355 - 356 - lua_pop(lua, 1); 357 - } 358 - 359 - { 360 - lua_getfield(lua, -1, "name"); 361 - 362 - if (lua_isstring(lua, -1)) 363 - strncpy(title, lua_tostring(lua, -1), sizeof title); 364 - 365 - lua_pop(lua, 1); 366 - } 367 - 368 - { 369 - lua_getfield(lua, -1, "id"); 370 - 371 - if (lua_isinteger(lua, -1)) 372 - netDirData->item(name, title, hash, (s32)lua_tointeger(lua, -1), netDirData->data, false); 373 - 374 - lua_pop(lua, 1); 375 - } 376 - 377 - lua_pop(lua, 1); 378 - } 379 - } 380 - 381 - lua_pop(lua, 1); 291 + if(json_string("name", item, name, sizeof name) 292 + && json_string("hash", item, hash, sizeof hash) 293 + && json_string("filename", item, filename, sizeof filename)) 294 + netDirData->item(filename, name, hash, json_int("id", item), netDirData->data, false); 382 295 } 383 - 384 - lua_close(lua); 385 296 } 386 297 } 387 298 ··· 396 307 } 397 308 } 398 309 399 - #endif 400 - 401 - static void enumFiles(tic_fs* fs, const char* path, fs_list_callback callback, void* data) 310 + void fs_enum(const char* path, fs_list_callback callback, void* data) 402 311 { 403 312 #if defined(BAREMETALPI) 404 - dbg("enumFiles %s", path); 313 + dbg("fs_enum %s", path); 405 314 406 315 if (path && *path) { 407 316 // ok ··· 417 326 if (path2[strlen(path2) - 1] == '/') // one character 418 327 path2[strlen(path2) - 1] = 0; 419 328 420 - dbg("enumFiles Real %s", path2); 329 + dbg("fs_enum Real %s", path2); 421 330 422 331 423 332 DIR Directory; ··· 484 393 return; 485 394 } 486 395 487 - #if defined(TIC_BUILD_WITH_LUA) && defined(BUILD_EDITORS) 396 + #if defined(BUILD_EDITORS) 488 397 if(isPublic(fs)) 489 398 { 490 399 char request[TICNAME_MAX]; 491 - snprintf(request, sizeof request, "/api?fn=dir&path=%s", fs->work + sizeof(TIC_HOST)); 400 + snprintf(request, sizeof request, "/json?fn=dir&path=%s", fs->work + sizeof(TIC_HOST)); 492 401 493 402 NetDirData netDirData = { onItem, onDone, data }; 494 403 tic_net_get(fs->net, request, onDirResponse, MOVE(netDirData)); ··· 499 408 500 409 const char* path = tic_fs_path(fs, ""); 501 410 502 - enumFiles(fs, path, onItem, data); 411 + fs_enum(path, onItem, data); 503 412 504 413 onDone(data); 505 414 } ··· 585 494 586 495 #if defined(__TIC_WINDOWS__) 587 496 for(char *ptr = fs->work, *end = ptr + strlen(ptr); ptr < end; ptr++) 588 - if(*ptr == '\\') 497 + if(*ptr == SLASH_SYMBOL) 589 498 *ptr = '/'; 590 499 #endif 591 500 } ··· 1027 936 1028 937 return fs; 1029 938 } 939 + 940 + const char* fs_apppath() 941 + { 942 + static char apppath[TICNAME_MAX]; 943 + 944 + #if defined(__TIC_WINDOWS__) 945 + { 946 + wchar_t wideAppPath[TICNAME_MAX]; 947 + GetModuleFileNameW(NULL, wideAppPath, sizeof wideAppPath); 948 + WideCharToMultiByte(CP_UTF8, 0, wideAppPath, COUNT_OF(wideAppPath), apppath, COUNT_OF(apppath), 0, 0); 949 + } 950 + #elif defined(__TIC_LINUX__) 951 + s32 size = readlink("/proc/self/exe", apppath, sizeof apppath); 952 + apppath[size] = '\0'; 953 + #elif defined(__TIC_MACOSX__) 954 + s32 size = sizeof apppath; 955 + _NSGetExecutablePath(apppath, &size); 956 + #endif 957 + 958 + return apppath; 959 + } 960 + 961 + const char* fs_appfolder() 962 + { 963 + static char appfolder[TICNAME_MAX]; 964 + strcpy(appfolder, fs_apppath()); 965 + 966 + char* pos = strrchr(appfolder, SLASH_SYMBOL); 967 + 968 + if(pos && pos[1]) 969 + pos[1] = '\0'; 970 + 971 + return appfolder; 972 + }
+4
src/studio/fs.h
··· 61 61 bool fs_exists (const char* name); 62 62 void* fs_read (const char* path, s32* size); 63 63 bool fs_write (const char* path, const void* data, s32 size); 64 + void fs_enum (const char* path, fs_list_callback callback, void* data); 65 + 66 + const char* fs_apppath(); 67 + const char* fs_appfolder();
+4 -4
src/studio/project.c
··· 22 22 23 23 #include "project.h" 24 24 #include "tools.h" 25 - #include "api.h" 25 + #include "script.h" 26 26 #include <stdlib.h> 27 27 #include <stdio.h> 28 28 #include <string.h> ··· 118 118 119 119 static const char* projectComment(const char* name) 120 120 { 121 - FOR_EACH_LANG(ln) 121 + FOREACH_LANG(ln) 122 122 { 123 123 if(tic_tool_has_ext(name, ln->fileExtension)) 124 124 return ln->projectComment; 125 125 } 126 - FOR_EACH_LANG_END 127 - return Languages[0]->projectComment; 126 + 127 + return NULL; 128 128 } 129 129 130 130 s32 tic_project_save(const char* name, void* data, const tic_cartridge* cart)
+88 -227
src/studio/screens/console.c
··· 27 27 #include "studio/net.h" 28 28 #include "studio/config.h" 29 29 #include "ext/png.h" 30 + #include "ext/json.h" 30 31 #include "zip.h" 31 - #include "studio/demos.h" 32 32 #include "retro_endianness.h" 33 33 34 34 #if defined(TIC80_PRO) ··· 42 42 43 43 #if !defined(__TIC_MACOSX__) 44 44 #include <malloc.h> 45 - #endif 46 - 47 - #if defined (TIC_BUILD_WITH_LUA) 48 - #include <lua.h> 49 - #include <lauxlib.h> 50 - #include <lualib.h> 51 45 #endif 52 46 53 47 #include <sys/stat.h> ··· 81 75 macro(commands) \ 82 76 macro(api) \ 83 77 macro(keys) \ 84 - macro(buttons) \ 78 + macro(buttons) \ 85 79 macro(startup) \ 86 80 macro(terms) \ 87 81 macro(license) ··· 264 258 265 259 static char* replaceHelpTokens(const char* text) 266 260 { 267 - char langnames[10240] = {0}; 268 - char langextensions[10240] = {0}; 269 - char langnamespipe[10240] = {0}; 261 + char langnames[TICNAME_MAX] = {0}; 262 + char langextensions[TICNAME_MAX] = {0}; 270 263 271 - FOR_EACH_LANG(ln) 272 - bool isLast = *(conf+1) == NULL; 273 - bool isSecondToLast = *(conf+2) == NULL; 264 + char langnamespipe[TICNAME_MAX] = {0}; 274 265 275 - strcat(langnames, ln->name); 266 + for(const tic_script **it = tic_scripts(); *it; ++it) 267 + { 268 + bool isLast = *(it + 1) == NULL; 269 + bool isSecondToLast = *(it + 2) == NULL; 270 + 271 + strcat(langnames, (*it)->name); 276 272 if (!isLast) 277 273 strcat(langnames, isSecondToLast ? " or " : ", "); 278 274 279 - strcat(langextensions, ln->fileExtension); 275 + strcat(langextensions, (*it)->fileExtension); 280 276 strcat(langextensions, " "); 281 277 282 - strcat(langnamespipe, ln->name); 278 + strcat(langnamespipe, (*it)->name); 283 279 if (!isLast) 284 280 strcat(langnamespipe, "|"); 285 - FOR_EACH_LANG_END 281 + } 286 282 287 283 char* replaced1 = str_replace(text, "$LANG_NAMES$", langnames); 288 284 char* replaced2 = str_replace(replaced1, "$LANG_EXTENSIONS$", langextensions); ··· 642 638 memcpy(&tic->cart, cart, sizeof(tic_cartridge)); 643 639 } 644 640 645 - static char* getDemoCartPath(char* path, tic_script_config* script) 641 + static char* getDemoCartPath(char* path, const tic_script* script) 646 642 { 647 643 strcpy(path, TIC_LOCAL_VERSION "default_"); 648 644 strcat(path, script->name); ··· 651 647 return path; 652 648 } 653 649 654 - static void* getDemoCart(Console* console, tic_script_config* script, s32* size) 650 + static void* getDemoCart(Console* console, const tic_script* script, s32* size) 655 651 { 656 652 char path[1024]; 657 653 getDemoCartPath(path, script); ··· 662 658 if(data && *size) 663 659 return data; 664 660 } 665 - tic_script_config_extra* ex = getConfigExtra(script); 666 - 667 - const u8* demo = ex->demoRom; 668 - s32 romSize = ex->demoRomSize; 669 661 670 662 u8* data = calloc(1, sizeof(tic_cartridge)); 671 663 672 664 if(data) 673 665 { 674 - *size = tic_tool_unzip(data, sizeof(tic_cartridge), demo, romSize); 666 + *size = tic_tool_unzip(data, sizeof(tic_cartridge), script->demo.data, script->demo.size); 675 667 676 668 if(*size) 677 669 tic_fs_saveroot(console->fs, path, data, *size, false); ··· 689 681 strcpy(console->rom.path, path); 690 682 } 691 683 692 - static void onLoadDemoCommandConfirmed(Console* console, tic_script_config* script) 684 + static void onLoadDemoCommandConfirmed(Console* console, const tic_script* script) 693 685 { 694 686 void* data = NULL; 695 687 s32 size = 0; ··· 749 741 if(data) SCOPE(free(data)) 750 742 { 751 743 #if defined(TIC80_PRO) 752 - if(tic_project_ext(path)) 744 + if(project_ext(path)) 753 745 tic_project_load(console->rom.name, data, size, &tic->cart); 754 746 else 755 747 #endif ··· 932 924 const char* name = param; 933 925 934 926 #if defined(TIC80_PRO) 935 - if(tic_project_ext(name)) 927 + if(project_ext(name)) 936 928 { 937 929 void* data = tic_fs_load(console->fs, name, &size); 938 930 ··· 952 944 } 953 945 else printError(console, "\nfile not found"); 954 946 #else 955 - if(tic_project_ext(name)) { 947 + if(project_ext(name)) { 956 948 printError(console, "\nproject loading error"); 957 949 printFront(console, "\nThis version only supports binary .png or .tic cartridges."); 958 950 printLine(console); ··· 1016 1008 } 1017 1009 } 1018 1010 1019 - typedef void(*LoadDemoConfirmCallback)(Console* console, tic_script_config* script); 1011 + typedef void(*LoadDemoConfirmCallback)(Console* console, const tic_script* script); 1020 1012 1021 1013 typedef struct 1022 1014 { 1023 1015 Console* console; 1024 1016 LoadDemoConfirmCallback callback; 1025 - tic_script_config* script; 1017 + const tic_script* script; 1026 1018 } LoadDemoConfirmData; 1027 1019 1028 1020 static void onLoadDemoConfirm(Studio* studio, bool yes, void* data) ··· 1045 1037 "Do you really want to load cart?", 1046 1038 }; 1047 1039 1048 - static void onLoadDemoCommand(Console* console, tic_script_config* script) 1040 + static void onLoadDemoCommand(Console* console, const tic_script* script) 1049 1041 { 1050 1042 if(studioCartChanged(console->studio)) 1051 1043 { ··· 1070 1062 } 1071 1063 } 1072 1064 1073 - static void loadDemo(Console* console, tic_script_config* script) 1065 + static void loadDemo(Console* console, const tic_script* script) 1074 1066 { 1075 - if (script == NULL) script = Languages[0]; // can be called with null, meaning first language (Lua) 1076 1067 s32 size = 0; 1077 1068 u8* data = getDemoCart(console, script, &size); 1078 1069 ··· 1093 1084 { 1094 1085 bool done = false; 1095 1086 1096 - if(console->desc->count) 1087 + s32 count = 0; 1088 + FOREACH_LANG(_) count++; 1089 + 1090 + if(count == 0) 1091 + { 1092 + printError(console, "\nerror: not found any language."); 1093 + } 1094 + else if(count == 1) 1095 + { 1096 + loadDemo(console, *tic_scripts()); 1097 + done = true; 1098 + } 1099 + else if(console->desc->count) 1097 1100 { 1098 1101 const char* param = console->desc->params->key; 1099 1102 1100 - FOR_EACH_LANG(ln) 1103 + FOREACH_LANG(ln) 1104 + { 1101 1105 if(strcmp(param, ln->name) == 0) 1102 1106 { 1103 1107 loadDemo(console, ln); 1104 1108 done = true; 1105 - } 1106 - FOR_EACH_LANG_END 1109 + } 1110 + } 1107 1111 1108 1112 if(!done) 1109 1113 { ··· 1257 1261 1258 1262 static void tabCompleteLanguages(TabCompleteData* data) 1259 1263 { 1260 - FOR_EACH_LANG(ln) 1264 + FOREACH_LANG(ln) 1265 + { 1261 1266 addTabCompleteOption(data, ln->name); 1262 - FOR_EACH_LANG_END 1267 + } 1268 + 1263 1269 finishTabComplete(data); 1264 1270 } 1265 1271 ··· 1531 1537 { 1532 1538 printBack(console, "\nadded carts:\n\n"); 1533 1539 1534 - #if defined(TIC_BUILD_WITH_LUA) 1535 - 1536 - static const u8 demofire[] = 1537 - { 1538 - #include "../build/assets/fire.tic.dat" 1539 - }; 1540 - 1541 - static const u8 demop3d[] = 1542 - { 1543 - #include "../build/assets/p3d.tic.dat" 1544 - }; 1545 - 1546 - static const u8 demosfx[] = 1547 - { 1548 - #include "../build/assets/sfx.tic.dat" 1549 - }; 1550 - 1551 - static const u8 demopalette[] = 1552 - { 1553 - #include "../build/assets/palette.tic.dat" 1554 - }; 1555 - 1556 - static const u8 demofont[] = 1557 - { 1558 - #include "../build/assets/font.tic.dat" 1559 - }; 1560 - 1561 - static const u8 demomusic[] = 1562 - { 1563 - #include "../build/assets/music.tic.dat" 1564 - }; 1565 - 1566 - static const u8 demoquest[] = 1567 - { 1568 - #include "../build/assets/quest.tic.dat" 1569 - }; 1570 - 1571 - static const u8 demotetris[] = 1572 - { 1573 - #include "../build/assets/tetris.tic.dat" 1574 - }; 1575 - 1576 - static const u8 demobenchmark[] = 1577 - { 1578 - #include "../build/assets/benchmark.tic.dat" 1579 - }; 1580 - 1581 - static const u8 demobpp[] = 1582 - { 1583 - #include "../build/assets/bpp.tic.dat" 1584 - }; 1585 - 1586 - static const u8 democar[] = 1540 + FOREACH_LANG(ln) 1587 1541 { 1588 - #include "../build/assets/car.tic.dat" 1589 - }; 1590 - 1591 - #define DEMOS_LIST(macro) \ 1592 - macro(fire) \ 1593 - macro(font) \ 1594 - macro(music) \ 1595 - macro(p3d) \ 1596 - macro(palette) \ 1597 - macro(quest) \ 1598 - macro(sfx) \ 1599 - macro(tetris) \ 1600 - macro(benchmark) \ 1601 - macro(bpp) \ 1602 - macro(car) 1603 - 1604 - static const struct Demo {const char* name; const u8* data; s32 size;} Demos[] = 1605 - { 1606 - #define DEMOS_DEF(name) {#name ".tic", demo ## name, sizeof demo ## name}, 1607 - DEMOS_LIST(DEMOS_DEF) 1608 - #undef DEMOS_DEF 1609 - }; 1610 - 1611 - #undef DEMOS_LIST 1612 - 1613 - FOR(const struct Demo*, demo, Demos) 1614 - { 1615 - tic_fs_save(fs, demo->name, data, tic_tool_unzip(data, sizeof(tic_cartridge), demo->data, demo->size), true); 1616 - printFront(console, demo->name); 1617 - printLine(console); 1542 + for(const struct tic_demo *demo = ln->demos; demo && demo->data; demo++) 1543 + { 1544 + tic_fs_save(fs, demo->name, data, tic_tool_unzip(data, sizeof(tic_cartridge), demo->data, demo->size), true); 1545 + printFront(console, demo->name); 1546 + printLine(console); 1547 + } 1618 1548 } 1619 - #endif 1620 1549 1621 1550 static const char* Bunny = "bunny"; 1622 1551 1623 1552 tic_fs_makedir(fs, Bunny); 1624 1553 tic_fs_changedir(fs, Bunny); 1625 1554 1626 - FOR_EACH_LANG(ln) 1555 + FOREACH_LANG(ln) 1627 1556 { 1628 - tic_script_config_extra* ex = getConfigExtra(ln); 1629 - if (ex->markRom != NULL) { // having a Mark is not mandatory 1630 - char cartname[1024]; 1631 - strcpy(cartname, ln->name); 1632 - strcat(cartname, "mark.tic"); 1633 - 1634 - tic_fs_save(fs, cartname, data, tic_tool_unzip(data, sizeof(tic_cartridge), ex->markRom, ex->markRomSize), true); 1557 + // having a Mark is not mandatory 1558 + if (ln->mark.data != NULL) 1559 + { 1560 + tic_fs_save(fs, ln->mark.name, data, tic_tool_unzip(data, sizeof(tic_cartridge), ln->mark.data, ln->mark.size), true); 1635 1561 printFront(console, Bunny); 1636 1562 printFront(console, "/"); 1637 - printFront(console, cartname); 1563 + printFront(console, ln->mark.name); 1638 1564 printLine(console); 1639 1565 } 1640 1566 } 1641 - FOR_EACH_LANG_END 1642 1567 1643 1568 tic_fs_dirback(fs); 1644 1569 } ··· 1684 1609 { 1685 1610 if (console->desc->count == 1) 1686 1611 { 1687 - onLoadDemoCommand(console, Languages[0]); 1612 + onLoadDemoCommand(console, *tic_scripts()); 1688 1613 } 1689 1614 else 1690 1615 { 1691 - FOR_EACH_LANG(script) 1616 + FOREACH_LANG(script) 1617 + { 1692 1618 if (strcmp(console->desc->params[1].key, script->name) == 0) 1693 1619 onLoadDemoCommand(console, script); 1694 - FOR_EACH_LANG_END 1620 + } 1695 1621 } 1696 1622 } 1697 1623 else ··· 2140 2066 2141 2067 #if defined(TIC80_PRO) 2142 2068 if (params.alone) 2143 - strcat(url, tic_core_script_config(console->tic)->name); 2069 + strcat(url, tic_get_script(console->tic)->name); 2144 2070 #endif 2145 2071 2146 2072 tic_net_get(console->net, url, callback, MOVE(data)); ··· 2482 2408 2483 2409 tic_api_cls(tic, tic_color_dark_grey); 2484 2410 2485 - const char* comment = tic_core_script_config(tic)->singleComment; 2411 + const char* comment = tic_get_script(tic)->singleComment; 2486 2412 2487 - char* title = tic_tool_metatag(tic->cart.code.data, "title", comment); 2488 - if(title) 2413 + const char* title = tic_tool_metatag(tic->cart.code.data, "title", comment); 2414 + if(*title) 2489 2415 { 2490 2416 drawShadowText(tic, title, 0, 0, tic_color_white, Scale); 2491 - free(title); 2492 2417 } 2493 2418 2494 - char* author = tic_tool_metatag(tic->cart.code.data, "author", comment); 2495 - if(author) 2419 + const char* author = tic_tool_metatag(tic->cart.code.data, "author", comment); 2420 + if(*author) 2496 2421 { 2497 2422 char buf[TICNAME_MAX]; 2498 2423 snprintf(buf, sizeof buf, "by %s", author); 2499 2424 drawShadowText(tic, buf, 0, Row, tic_color_grey, Scale); 2500 - free(author); 2501 2425 } 2502 2426 2503 2427 u32* ptr = img.values + PaddingTop * CoverWidth + PaddingLeft; ··· 2531 2455 size = result.size; 2532 2456 } 2533 2457 #if defined(TIC80_PRO) 2534 - else if(tic_project_ext(name)) 2458 + else if(project_ext(name)) 2535 2459 { 2536 2460 size = tic_project_save(name, buffer, &tic->cart); 2537 2461 } ··· 2626 2550 { 2627 2551 printLine(console); 2628 2552 2629 - const tic_script_config* script_config = tic_core_script_config(console->tic); 2553 + const tic_script* script_config = tic_get_script(console->tic); 2630 2554 2631 2555 if (script_config->eval) 2632 2556 { ··· 3789 3713 } 3790 3714 } 3791 3715 3792 - #if defined (TIC_BUILD_WITH_LUA) 3793 - 3794 - static lua_State* netLuaInit(u8* buffer, s32 size) 3795 - { 3796 - if (buffer && size) 3797 - { 3798 - char* script = calloc(1, size + 1); 3799 - memcpy(script, buffer, size); 3800 - lua_State* lua = luaL_newstate(); 3801 - 3802 - if(lua) 3803 - { 3804 - if(luaL_loadstring(lua, (char*)script) == LUA_OK && lua_pcall(lua, 0, LUA_MULTRET, 0) == LUA_OK) 3805 - { 3806 - free(script); 3807 - return lua; 3808 - } 3809 - else lua_close(lua); 3810 - } 3811 - 3812 - free(script); 3813 - } 3814 - 3815 - return NULL; 3816 - } 3817 - 3818 3716 static void onHttpVersionGet(const net_get_data* data) 3819 3717 { 3820 3718 Console* console = (Console*)data->calldata; ··· 3823 3721 { 3824 3722 case net_get_done: 3825 3723 { 3826 - lua_State* lua = netLuaInit(data->done.data, data->done.size); 3827 - 3828 - union 3829 - { 3830 - struct 3831 - { 3832 - s32 major; 3833 - s32 minor; 3834 - s32 patch; 3835 - }; 3836 - 3837 - s32 data[3]; 3838 - } version = 3724 + if(json_parse(data->done.data, data->done.size)) 3839 3725 { 3840 - { 3841 - .major = TIC_VERSION_MAJOR, 3842 - .minor = TIC_VERSION_MINOR, 3843 - .patch = TIC_VERSION_REVISION, 3844 - }, 3845 - }; 3846 - 3847 - if(lua) 3848 - { 3849 - static const char* Fields[] = {"major", "minor", "patch"}; 3726 + s32 major = json_int("major", 0); 3727 + s32 minor = json_int("minor", 0); 3728 + s32 patch = json_int("patch", 0); 3850 3729 3851 - for(s32 i = 0; i < COUNT_OF(Fields); i++) 3730 + if((major > TIC_VERSION_MAJOR) 3731 + || (major == TIC_VERSION_MAJOR && minor > TIC_VERSION_MINOR) 3732 + || (major == TIC_VERSION_MAJOR && minor == TIC_VERSION_MINOR && patch > TIC_VERSION_REVISION)) 3852 3733 { 3853 - lua_getglobal(lua, Fields[i]); 3734 + char msg[TICNAME_MAX]; 3735 + sprintf(msg, " new version %i.%i.%i available", major, minor, patch); 3854 3736 3855 - if(lua_isinteger(lua, -1)) 3856 - version.data[i] = (s32)lua_tointeger(lua, -1); 3737 + enum{Offset = (2 * STUDIO_TEXT_BUFFER_WIDTH)}; 3857 3738 3858 - lua_pop(lua, 1); 3739 + memset(console->text + Offset, ' ', STUDIO_TEXT_BUFFER_WIDTH); 3740 + strcpy(console->text + Offset, msg); 3741 + memset(console->color + Offset, tic_color_red, strlen(msg)); 3859 3742 } 3860 - 3861 - lua_close(lua); 3862 - } 3863 - 3864 - if((version.major > TIC_VERSION_MAJOR) || 3865 - (version.major == TIC_VERSION_MAJOR && version.minor > TIC_VERSION_MINOR) || 3866 - (version.major == TIC_VERSION_MAJOR && version.minor == TIC_VERSION_MINOR && version.patch > TIC_VERSION_REVISION)) 3867 - { 3868 - char msg[TICNAME_MAX]; 3869 - sprintf(msg, " new version %i.%i.%i available", version.major, version.minor, version.patch); 3870 - 3871 - enum{Offset = (2 * STUDIO_TEXT_BUFFER_WIDTH)}; 3872 - 3873 - memset(console->text + Offset, ' ', STUDIO_TEXT_BUFFER_WIDTH); 3874 - strcpy(console->text + Offset, msg); 3875 - memset(console->color + Offset, tic_color_red, strlen(msg)); 3876 3743 } 3877 3744 } 3878 3745 break; 3879 - default: 3880 - break; 3881 3746 } 3882 3747 } 3883 - 3884 - #endif 3885 3748 3886 3749 static char* getSelectionText(Console* console) 3887 3750 { ··· 4150 4013 if(console->input.pos > len) 4151 4014 console->input.pos = len; 4152 4015 } 4153 - else if(enterWasPressed(console->studio)) processConsoleCommand(console); 4016 + else if(enterWasPressed(console->studio)) processConsoleCommand(console); 4154 4017 else if(keyWasPressed(console->studio, tic_key_backspace)) processConsoleBackspace(console); 4155 4018 else if(keyWasPressed(console->studio, tic_key_delete)) processConsoleDel(console); 4156 4019 else if(keyWasPressed(console->studio, tic_key_home)) processConsoleHome(console); ··· 4200 4063 { 4201 4064 if(!start->embed) 4202 4065 { 4203 - loadDemo(console, 0); 4066 + loadDemo(console, *tic_scripts()); 4204 4067 4205 4068 if(!console->args.cli) 4206 4069 { ··· 4208 4071 printFront(console, "help"); 4209 4072 printBack(console, " for help\n"); 4210 4073 4211 - #if defined (TIC_BUILD_WITH_LUA) 4212 4074 if(getConfig(console->studio)->checkNewVersion) 4213 - tic_net_get(console->net, "/api?fn=version", onHttpVersionGet, console); 4214 - #endif 4075 + tic_net_get(console->net, "/json?fn=version", onHttpVersionGet, console); 4215 4076 } 4216 4077 4217 4078 commandDone(console); ··· 4309 4170 done = true; 4310 4171 } 4311 4172 #if defined(TIC80_PRO) 4312 - else if(tic_project_ext(cartName)) 4173 + else if(project_ext(cartName)) 4313 4174 { 4314 4175 if(tic_project_load(cartName, data, size, &tic->cart)) 4315 4176 done = true;
+22 -17
src/studio/screens/mainmenu.c
··· 364 364 StudioMainMenu* main = data; 365 365 tic_mem* tic = main->tic; 366 366 resumeGame(main->studio); 367 - tic_core_script_config(tic)->callback.menu(tic, pos, NULL); 367 + tic_get_script(tic)->callback.menu(tic, pos, NULL); 368 368 } 369 369 370 370 #if defined(BUILD_EDITORS) ··· 419 419 420 420 freeItems(main); 421 421 422 - char* menu = tic_tool_metatag(tic->cart.code.data, "menu", tic_core_script_config(tic)->singleComment); 422 + const char* value = tic_tool_metatag(tic->cart.code.data, "menu", tic_get_script(tic)->singleComment); 423 423 424 - if(menu) SCOPE(free(menu)) 424 + if(*value) 425 425 { 426 - MenuItem *items = NULL; 427 - s32 count = 0; 426 + char* menu = strdup(value); 428 427 429 - char* label = strtok(menu, " "); 430 - while(label) 428 + SCOPE(free(menu)) 431 429 { 432 - items = realloc(items, sizeof(MenuItem) * ++count); 433 - items[count - 1] = (MenuItem){strdup(label), gameMenuHandler}; 430 + MenuItem *items = NULL; 431 + s32 count = 0; 432 + 433 + char* label = strtok(menu, " "); 434 + while(label) 435 + { 436 + items = realloc(items, sizeof(MenuItem) * ++count); 437 + items[count - 1] = (MenuItem){strdup(label), gameMenuHandler}; 434 438 435 - label = strtok(NULL, " "); 436 - } 439 + label = strtok(NULL, " "); 440 + } 437 441 438 - count += 2; 439 - items = realloc(items, sizeof(MenuItem) * count); 440 - items[count - 2] = (MenuItem){strdup("")}; 441 - items[count - 1] = (MenuItem){strdup("BACK"), showMainMenu, .back = true}; 442 + count += 2; 443 + items = realloc(items, sizeof(MenuItem) * count); 444 + items[count - 2] = (MenuItem){strdup("")}; 445 + items[count - 1] = (MenuItem){strdup("BACK"), showMainMenu, .back = true}; 442 446 443 - main->items = items; 444 - main->count = count; 447 + main->items = items; 448 + main->count = count; 449 + } 445 450 } 446 451 } 447 452
+1 -15
src/studio/screens/start.c
··· 178 178 #else 179 179 180 180 { 181 - char appPath[TICNAME_MAX]; 182 - 183 - # if defined(__TIC_WINDOWS__) 184 - { 185 - wchar_t wideAppPath[TICNAME_MAX]; 186 - GetModuleFileNameW(NULL, wideAppPath, sizeof wideAppPath); 187 - WideCharToMultiByte(CP_UTF8, 0, wideAppPath, COUNT_OF(wideAppPath), appPath, COUNT_OF(appPath), 0, 0); 188 - } 189 - # elif defined(__TIC_LINUX__) 190 - s32 size = readlink("/proc/self/exe", appPath, sizeof appPath); 191 - appPath[size] = '\0'; 192 - # elif defined(__TIC_MACOSX__) 193 - s32 size = sizeof appPath; 194 - _NSGetExecutablePath(appPath, &size); 195 - # endif 181 + const char* appPath = fs_apppath(); 196 182 197 183 s32 appSize = 0; 198 184 u8* app = fs_read(appPath, &appSize);
+2 -2
src/studio/screens/surf.c
··· 194 194 || tic_tool_has_ext(name, CartExt) 195 195 || tic_tool_has_ext(name, PngExt) 196 196 #if defined(TIC80_PRO) 197 - || tic_project_ext(name) 197 + || project_ext(name) 198 198 #endif 199 199 ) 200 200 { ··· 411 411 else memset(cart, 0, sizeof(tic_cartridge)); 412 412 } 413 413 #if defined(TIC80_PRO) 414 - else if(tic_project_ext(item->name)) 414 + else if(project_ext(item->name)) 415 415 tic_project_load(item->name, data, size, cart); 416 416 #endif 417 417 else
+48 -2
src/studio/studio.c
··· 58 58 #define _USE_MATH_DEFINES 59 59 #include <math.h> 60 60 61 + #if defined(TIC_MODULE_EXT) 62 + #include <dlfcn.h> 63 + #endif 64 + 61 65 #define MD5_HASHSIZE 16 62 66 63 67 #if defined(TIC80_PRO) ··· 1508 1512 } 1509 1513 1510 1514 #if defined(BUILD_EDITORS) 1515 + 1516 + bool project_ext(const char* name) 1517 + { 1518 + FOREACH_LANG(script) 1519 + { 1520 + if(tic_tool_has_ext(name, script->fileExtension)) 1521 + return true; 1522 + } 1523 + 1524 + return false; 1525 + } 1526 + 1511 1527 tic_cartridge* loadPngCart(png_buffer buffer) 1512 1528 { 1513 1529 png_buffer zip = png_decode(buffer); ··· 2162 2178 tic_mem* tic = studio->tic; 2163 2179 tic80_mouse* m = &tic->ram->input.mouse; 2164 2180 2165 - if(tic->input.mouse && !m->relative && m->x < TIC80_FULLWIDTH && m->y < TIC80_FULLHEIGHT) 2181 + if(tic->input.mouse && !m->relative && (s32)m->x < TIC80_FULLWIDTH && (s32)m->y < TIC80_FULLHEIGHT) 2166 2182 { 2167 2183 s32 sprite = CLAMP(tic->ram->vram.vars.cursor.sprite, 0, TIC_BANK_SPRITES - 1); 2168 2184 const tic_bank* bank = &tic->cart.bank0; ··· 2431 2447 return studio->alive; 2432 2448 } 2433 2449 2450 + #if defined(TIC_MODULE_EXT) 2451 + static bool onEnumModule(const char* name, const char* title, const char* hash, s32 id, void* data, bool dir) 2452 + { 2453 + if(strstr(name, TIC_MODULE_EXT)) 2454 + { 2455 + void* module = dlopen(name, RTLD_NOW | RTLD_LOCAL); 2456 + 2457 + if(module) 2458 + { 2459 + const tic_script *config = dlsym(module, DEF2STR(SCRIPT_CONFIG)); 2460 + 2461 + if(config) 2462 + { 2463 + tic_add_script(config); 2464 + } 2465 + else 2466 + { 2467 + dlclose(module); 2468 + } 2469 + } 2470 + } 2471 + 2472 + return true; 2473 + } 2474 + #endif 2475 + 2434 2476 Studio* studio_create(s32 argc, char **argv, s32 samplerate, tic80_pixel_color_format format, const char* folder, s32 maxscale) 2435 2477 { 2436 2478 setbuf(stdout, NULL); ··· 2442 2484 printf("%s\n", TIC_VERSION); 2443 2485 exit(0); 2444 2486 } 2487 + 2488 + #if defined(TIC_MODULE_EXT) 2489 + // load script modules 2490 + fs_enum(fs_appfolder(), onEnumModule, NULL); 2491 + #endif 2445 2492 2446 2493 Studio* studio = NEW(Studio); 2447 2494 *studio = (Studio) ··· 2481 2528 #endif 2482 2529 .tic = tic_core_create(samplerate, format), 2483 2530 }; 2484 - 2485 2531 2486 2532 #if defined(BUILD_EDITORS) 2487 2533
+2
src/studio/studio.h
··· 30 30 31 31 #include "tic.h" 32 32 #include "api.h" 33 + #include "script.h" 33 34 #include "defines.h" 34 35 #include "tools.h" 35 36 #include "system.h" ··· 277 278 void map2ram(tic_ram* ram, const tic_map* src); 278 279 void tiles2ram(tic_ram* ram, const tic_tiles* src); 279 280 void fadePalette(tic_palette* pal, s32 value); 281 + bool project_ext(const char* name);
+1 -1
src/system/libretro/README.md
··· 11 11 cd TIC-80 12 12 git submodule update --init --recursive 13 13 cd build 14 - cmake .. -DBUILD_PLAYER=OFF -DBUILD_SOKOL=OFF -DBUILD_SDL=OFF -DBUILD_DEMO_CARTS=OFF -DBUILD_LIBRETRO=ON 14 + cmake .. -DBUILD_PLAYER=OFF -DBUILD_SOKOL=OFF -DBUILD_SDL=OFF -DBUILD_TOOLS=OFF -DBUILD_LIBRETRO=ON 15 15 make 16 16 ``` 17 17
+41 -5
src/tic.c
··· 20 20 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 21 // SOFTWARE. 22 22 23 + #include "tic80.h" 24 + #include "script.h" 25 + #include "tools.h" 26 + #include "cart.h" 27 + 28 + #include <stdio.h> 23 29 #include <stdlib.h> 24 30 #include <string.h> 25 31 26 - #include <tic80.h> 27 - #include "api.h" 28 - #include "tools.h" 29 - #include "cart.h" 32 + #if defined(TIC_MODULE_EXT) 33 + #include <dlfcn.h> 34 + #endif 30 35 31 36 static void onTrace(void* data, const char* text, u8 color) 32 37 { ··· 62 67 tic_mem* mem = (tic_mem*)tic; 63 68 64 69 tic_cart_load(&mem->cart, cart, size); 65 - tic_api_reset(mem); 70 + 71 + const tic_script* script = tic_get_script(mem); 72 + if(script) 73 + { 74 + tic_api_reset(mem); 75 + } 76 + 77 + #if defined(TIC_MODULE_EXT) 78 + else 79 + { 80 + const char* tag = tic_tool_metatag(mem->cart.code.data, "script", NULL); 81 + char name[128]; 82 + sprintf(name, "%s" TIC_MODULE_EXT, tag); 83 + 84 + void* module = dlopen(name, RTLD_NOW | RTLD_LOCAL); 85 + 86 + if(module) 87 + { 88 + const tic_script* config = dlsym(module, DEF2STR(SCRIPT_CONFIG)); 89 + 90 + if(config) 91 + { 92 + tic_add_script(config); 93 + tic_api_reset(mem); 94 + } 95 + else 96 + { 97 + dlclose(module); 98 + } 99 + } 100 + } 101 + #endif 66 102 } 67 103 68 104 TIC80_API void tic80_tick(tic80* tic, tic80_input input, CounterCallback counter, FreqCallback freq)
+15 -31
src/tools.c
··· 128 128 return pal; 129 129 } 130 130 131 - bool tic_project_ext(const char* name) 132 - { 133 - FOR_EACH_LANG(ln) 134 - { 135 - if(tic_tool_has_ext(name, ln->fileExtension)) 136 - return true; 137 - } 138 - FOR_EACH_LANG_END 139 - return false; 140 - } 141 - 142 131 bool tic_tool_has_ext(const char* name, const char* ext) 143 132 { 144 133 return strcmp(name + strlen(name) - strlen(ext), ext) == 0; ··· 204 193 } 205 194 } 206 195 207 - char* tic_tool_metatag(const char* code, const char* tag, const char* comment) 196 + const char* tic_tool_metatag(const char* code, const char* tag, const char* comment) 208 197 { 209 198 const char* start = NULL; 210 199 211 200 { 212 - static char format[] = "%s %s:"; 201 + char tagBuffer[128]; 213 202 214 - char* tagBuffer = malloc(sizeof format + strlen(tag)); 203 + if(comment) 204 + sprintf(tagBuffer, "%s %s:", comment, tag); 205 + else 206 + sprintf(tagBuffer, "%s:", tag); 215 207 216 - SCOPE(free(tagBuffer)) 217 - { 218 - sprintf(tagBuffer, format, comment, tag); 219 - if ((start = strstr(code, tagBuffer))) 220 - start += strlen(tagBuffer); 221 - } 208 + if ((start = strstr(code, tagBuffer))) 209 + start += strlen(tagBuffer); 222 210 } 223 211 212 + static char value[128]; 213 + *value = '\0'; 214 + 224 215 if (start) 225 216 { 226 217 const char* end = strstr(start, "\n"); ··· 230 221 while (isspace(*start) && start < end) start++; 231 222 while (isspace(*(end - 1)) && end > start) end--; 232 223 233 - const s32 size = (s32)(end - start); 224 + const s32 size = MIN((s32)(end - start), sizeof value - 1); 234 225 235 - char* value = (char*)malloc(size + 1); 236 - 237 - if (value) 238 - { 239 - memset(value, 0, size + 1); 240 - memcpy(value, start, size); 241 - 242 - return value; 243 - } 226 + memcpy(value, start, size); 227 + value[size] = '\0'; 244 228 } 245 229 } 246 230 247 - return NULL; 231 + return value; 248 232 }
+2 -2
src/tools.h
··· 91 91 92 92 s32 tic_tool_get_pattern_id(const tic_track* track, s32 frame, s32 channel); 93 93 void tic_tool_set_pattern_id(tic_track* track, s32 frame, s32 channel, s32 id); 94 - bool tic_project_ext(const char* name); 95 94 bool tic_tool_has_ext(const char* name, const char* ext); 96 95 s32 tic_tool_get_track_row_sfx(const tic_track_row* row); 97 96 void tic_tool_set_track_row_sfx(tic_track_row* row, s32 sfx); ··· 108 107 109 108 bool tic_tool_noise(const tic_waveform* wave); 110 109 u32 tic_nearest_color(const tic_rgb* palette, const tic_rgb* color, s32 count); 111 - char* tic_tool_metatag(const char* code, const char* tag, const char* comment); 110 + 111 + const char* tic_tool_metatag(const char* code, const char* tag, const char* comment);
+23 -7
tic80.sublime-project
··· 3 3 [ 4 4 { 5 5 "name": "build", 6 - "shell_cmd": "cd ${project_path}/build && cmake -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_STATIC=OFF .. && ninja", 7 - "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (error.*)$", 6 + "shell_cmd": "cd ${project_path}/build && cmake -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel .. && ninja", 7 + "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", 8 8 "working_dir": "${file_path}", 9 9 "variants": 10 10 [ 11 11 { 12 12 "name": "fresh", 13 - "shell_cmd": "cd ${project_path}/build && cmake -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel .. --fresh" 13 + "shell_cmd": "cd ${project_path}/build && cmake -G Ninja .. --fresh" 14 + }, 15 + { 16 + "name": "BUILD_STATIC=ON", 17 + "shell_cmd": "cd ${project_path}/build && cmake -DBUILD_STATIC=ON .." 18 + }, 19 + { 20 + "name": "BUILD_STATIC=OFF", 21 + "shell_cmd": "cd ${project_path}/build && cmake -DBUILD_STATIC=OFF .." 22 + }, 23 + { 24 + "name": "BUILD_SOKOL=ON", 25 + "shell_cmd": "cd ${project_path}/build && cmake -DBUILD_SOKOL=ON .." 26 + }, 27 + { 28 + "name": "BUILD_PRO=ON", 29 + "shell_cmd": "cd ${project_path}/build && cmake -DBUILD_PRO=ON .." 30 + }, 31 + { 32 + "name": "BUILD_PRO=OFF", 33 + "shell_cmd": "cd ${project_path}/build && cmake -DBUILD_PRO=OFF .." 14 34 }, 15 35 { 16 36 "name": "make", ··· 24 44 "name": "clean", 25 45 "shell_cmd": "cd ${project_path}/build && ninja -t clean" 26 46 }, 27 - { 28 - "name": "clean rebuild", 29 - "shell_cmd": "cd ${project_path}/build && ninja -t clean && ninja" 30 - } 31 47 ] 32 48 } 33 49 ],